mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-07-03 05:17:05 +01:00
safer convolution
This commit is contained in:
@ -38,6 +38,10 @@ void filterConvolution(MatType &out, const MatType &data,
|
|||||||
{
|
{
|
||||||
Index n = data.rows(), nf = n*filter.size();
|
Index n = data.rows(), nf = n*filter.size();
|
||||||
|
|
||||||
|
if (&out == &data)
|
||||||
|
{
|
||||||
|
LATAN_ERROR(Argument, "filter convolution does not support in-place operation");
|
||||||
|
}
|
||||||
out.resizeLike(data);
|
out.resizeLike(data);
|
||||||
out.fill(0.);
|
out.fill(0.);
|
||||||
for (unsigned int i = 0; i < filter.size(); ++i)
|
for (unsigned int i = 0; i < filter.size(); ++i)
|
||||||
|
Reference in New Issue
Block a user