latest version v1.9 - last update 10 Apr 2010 |
pre-convolution algorithm for a matrix * kernel2D The type T is the type of the elements of the vector an kernel1D The class A determines how the values should be accumulated. More...
#include <ltiConvolutionHelper.h>
Public Member Functions | |
convHelper2D () | |
~convHelper2D () | |
bool | setKernel (const mathObject *kern) |
bool | isKernelSeparable () const |
void | apply (const matrix< T > &src, matrix< T > &dest, const modifier::parameters ¶m) |
void | applySep (const matrix< T > &src, matrix< T > &dest, const modifier::parameters ¶m) |
void | applyMask (const matrix< T > &src, matrix< T > &dest, const modifier::parameters ¶m) |
void | setMask (const channel8 &mask) |
const channel8 * | getMask () const |
A & | getAccumulator () |
const A & | getAccumulator () const |
pre-convolution algorithm for a matrix * kernel2D The type T is the type of the elements of the vector an kernel1D The class A determines how the values should be accumulated.
The class A must have following methods:
Examples of the accumulator class can be found in: lti::dilation::accumulatorGray, lti::dilation::accumulatorBin, lti::erosion::accumulatorGray, lti::erosion::accumulatorBin, lti::convolution::accumulator
The implementation of these methods allows the efficient use of this class for the implementation of convolution, dilation and erosion.
Please note that this class is intended to be used just as a helper class. The correctness of the parameters and input data must be ensured by the "helped" classes before these methods are called.
lti::convHelper2D< T, A >::convHelper2D | ( | ) |
default constructor
lti::convHelper2D< T, A >::~convHelper2D | ( | ) |
destructor
void lti::convHelper2D< T, A >::apply | ( | const matrix< T > & | src, | |
matrix< T > & | dest, | |||
const modifier::parameters & | param | |||
) |
void lti::convHelper2D< T, A >::applyMask | ( | const matrix< T > & | src, | |
matrix< T > & | dest, | |||
const modifier::parameters & | param | |||
) |
void lti::convHelper2D< T, A >::applySep | ( | const matrix< T > & | src, | |
matrix< T > & | dest, | |||
const modifier::parameters & | param | |||
) |
const A& lti::convHelper2D< T, A >::getAccumulator | ( | ) | const |
returns a reference to the accumulator object being used
A& lti::convHelper2D< T, A >::getAccumulator | ( | ) |
returns a reference to the accumulator object being used
const channel8* lti::convHelper2D< T, A >::getMask | ( | ) | const |
Returns a pointer to the current mask.
bool lti::convHelper2D< T, A >::isKernelSeparable | ( | ) | const [inline] |
get kernel type
bool lti::convHelper2D< T, A >::setKernel | ( | const mathObject * | kern | ) |
try to get a Kernel from the parameters.
If it is not possible to get it, return false; This will not copy the kernel, it just will keep a reference to it!
kern | the mathObject with the kernel. |
void lti::convHelper2D< T, A >::setMask | ( | const channel8 & | mask | ) |
Set the mask to be used with the kernel.