Create a filter function for matop mode, where the user may supply his data and a custom filter kernel. The user may also select between the boundary modes boundary_reflect = 1 and boundary_clamp = 0 using the VectorIndex functionalities. The function can be named as filter(MAT,KERNEL,MODE) -> MAT and shall support parallel computation.
This requries creating a new function signature MATSIG_MAT_MAT_N in "kernel/core/maths/matdatastructures.hpp" and implementing the handling code in this statement switch (fIter->second.signature) in Matrix evalMatOp(...). Combine MATSIG_MAT_MAT with MATSIG_MAT_N_MOPT to achieve this.
The function itself shall use the second matrix KERNEL as convolution kernel, so that the user may supply a custom filter kernel. To implement the convolution, follow the moving average approach in movavg() (found in Matrix matrixMovAvg(...)) and use the #pragma omp parallel fordirective after the implementation is running correctly.
To handle the boundary conditions, using a VectorIndex might be reasonable, esp. because of its prepending and appending features. Have a look into bool Memory::smooth(...) (search for _vLine.prepend() in "kernel/core/datamanagement/memory.cpp" to get an impression on how this can be done.
The new functionality was added to the automatic SW test. Detected deviation was fixed in [r1347].
Commit: [r1237]
Commit: [r1347]
Anonymous
Diff:
Diff:
Diff:
Related
Commit: [r1237]
Diff:
Related
Commit: [r1347]