latest version v1.9 - last update 10 Apr 2010 |
This is an efficient implementation of the convolution with a square or rectangular kernel. More...
#include <ltiSquareConvolution.h>
Classes | |
class | parameters |
the parameters for the class squareConvolution More... | |
Public Member Functions | |
squareConvolution () | |
squareConvolution (const int k) | |
squareConvolution (const squareConvolution &other) | |
virtual | ~squareConvolution () |
virtual const char * | getTypeName () const |
bool | apply (matrix< T > &srcdest) const |
bool | apply (vector< T > &srcdest) const |
bool | apply (const matrix< T > &src, matrix< T > &dest) const |
bool | apply (const vector< T > &src, vector< T > &dest) const |
squareConvolution & | copy (const squareConvolution &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Protected Member Functions | |
matrix< T > & | applyCol (const matrix< T > &src, matrix< T > &dest) const |
This is an efficient implementation of the convolution with a square or rectangular kernel.
The template parameter T defines the type of the matrix or vector to be filtered, and A represents the accumulator class, which allows different modi for the convolution.
The class A must implement following members:
This way, you can use any simple-types (as int, char, double...) as accumulator for a linear filter, or a user-defined class for a region normalization with any norm! For an example of an accumulator class see lti::chrominanzHistogram::l2accumulator<T>.
Note that for convolving a rectangular filter kernel with a channel8, you shoud use an instance squareConvolution<ubyte,int>. If you forget the "int" parameter, some quite noisy overflowing effects should be expected!
lti::squareConvolution< T, A >::squareConvolution | ( | ) |
default constructor
lti::squareConvolution< T, A >::squareConvolution | ( | const int | k | ) |
constructor to initialize the parameters with an square filter of k x k size.
lti::squareConvolution< T, A >::squareConvolution | ( | const squareConvolution< T, A > & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::squareConvolution< T, A >::~squareConvolution | ( | ) | [virtual] |
destructor
bool lti::squareConvolution< T, A >::apply | ( | const vector< T > & | src, | |
vector< T > & | dest | |||
) | const |
operates on a copy of the given parameters.
src | vector<T> with the source data. | |
dest | vector<T> where the result will be left. |
bool lti::squareConvolution< T, A >::apply | ( | const matrix< T > & | src, | |
matrix< T > & | dest | |||
) | const |
operates on a copy of the given parameters.
src | matrix<T> with the source data. | |
dest | matrix<T> where the result will be left. |
bool lti::squareConvolution< T, A >::apply | ( | vector< T > & | srcdest | ) | const |
operates on the given parameter.
srcdest | vector<T> with the source data. The result will be left here too. |
bool lti::squareConvolution< T, A >::apply | ( | matrix< T > & | srcdest | ) | const |
operates on the given parameter.
srcdest | matrix<T> with the source data. The result will be left here too. |
matrix<T>& lti::squareConvolution< T, A >::applyCol | ( | const matrix< T > & | src, | |
matrix< T > & | dest | |||
) | const [protected] |
applies the vertical part of the kernel to the matrix
src | matrix<T> with the source data. | |
dest | matrix<T> where the result will be left. |
dest
. virtual functor* lti::squareConvolution< T, A >::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
squareConvolution& lti::squareConvolution< T, A >::copy | ( | const squareConvolution< T, A > & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
const parameters& lti::squareConvolution< T, A >::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::modifier.
virtual const char* lti::squareConvolution< T, A >::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("squareConvolution")
Reimplemented from lti::modifier.