latest version v1.9 - last update 10 Apr 2010 |
the parameters for the class squareConvolution More...
#include <ltiSquareConvolution.h>
Public Member Functions | |
parameters (const int k=3) | |
parameters (const parameters &other) | |
~parameters () | |
const char * | getTypeName () const |
parameters & | copy (const parameters &other) |
virtual functor::parameters * | clone () const |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
void | initSquare (const int size) |
Public Attributes | |
rectangle | kernelSize |
T | kernelNorm |
the parameters for the class squareConvolution
lti::squareConvolution< T, A >::parameters::parameters | ( | const int | k = 3 |
) | [inline] |
default constructor to initialize a kernel of k x k size centered at (0,0)
References lti::squareConvolution< T, A >::parameters::initSquare().
lti::squareConvolution< T, A >::parameters::parameters | ( | const parameters & | other | ) | [inline] |
copy constructor
other | the parameters object to be copied |
Reimplemented from lti::modifier::parameters.
References lti::squareConvolution< T, A >::parameters::copy().
lti::squareConvolution< T, A >::parameters::~parameters | ( | ) | [inline, virtual] |
destructor
Reimplemented from lti::functor::parameters.
virtual functor::parameters* lti::squareConvolution< T, A >::parameters::clone | ( | ) | const [inline, virtual] |
returns a pointer to a clone of the parameters
Reimplemented from lti::modifier::parameters.
References lti::modifier::parameters::parameters().
parameters& lti::squareConvolution< T, A >::parameters::copy | ( | const parameters & | other | ) | [inline] |
copy the contents of a parameters object
other | the parameters object to be copied |
Reimplemented from lti::filter::parameters.
References lti::filter::parameters::copy(), lti::squareConvolution< T, A >::parameters::kernelNorm, and lti::squareConvolution< T, A >::parameters::kernelSize.
Referenced by lti::squareConvolution< T, A >::parameters::parameters().
const char* lti::squareConvolution< T, A >::parameters::getTypeName | ( | void | ) | const [inline, virtual] |
returns name of this type
Reimplemented from lti::modifier::parameters.
void lti::squareConvolution< T, A >::parameters::initSquare | ( | const int | size | ) | [inline] |
Initialize the parameters for a symmetric square kernel sizeXsize, where the sum of all elements equals one.
If the size is even, it will be "fixed" to the next odd number
References lti::trectangle< T, S >::br, lti::squareConvolution< T, A >::parameters::kernelNorm, lti::squareConvolution< T, A >::parameters::kernelSize, lti::trectangle< T, S >::ul, lti::tpoint< T >::x, and lti::tpoint< T >::y.
Referenced by lti::squareConvolution< T, A >::parameters::parameters().
virtual bool lti::squareConvolution< T, A >::parameters::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [inline, virtual] |
read the parameters from the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also read, otherwise only the data block will be read. |
Reimplemented from lti::modifier::parameters.
References lti::squareConvolution< T, A >::parameters::kernelNorm, lti::squareConvolution< T, A >::parameters::kernelSize, lti::ioHandler::readBegin(), and lti::ioHandler::readEnd().
virtual bool lti::squareConvolution< T, A >::parameters::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [inline, virtual] |
write the parameters in the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::modifier::parameters.
References lti::squareConvolution< T, A >::parameters::kernelNorm, lti::squareConvolution< T, A >::parameters::kernelSize, lti::ioHandler::writeBegin(), and lti::ioHandler::writeEnd().
T lti::squareConvolution< T, A >::parameters::kernelNorm |
The norm is the value which will be considered as "1.0" for the elements of the kernel.
The default value is 9 (for a 3x3 kernel). You can consider the square filter always as a kernel with nxn "ones". After the convolution, the resulting image will be divide by this value. The implementation combines the convolution with this normalization!
Referenced by lti::squareConvolution< T, A >::parameters::copy(), lti::squareConvolution< T, A >::parameters::initSquare(), lti::squareConvolution< T, A >::parameters::read(), and lti::squareConvolution< T, A >::parameters::write().
rectangle lti::squareConvolution< T, A >::parameters::kernelSize |
The rectangular kernel will have the value "1/kernelNorm" between the limits specified by this rectangle.
When convolving a vector, the "y" coordinates of this kernelSize will be ignored. Default value: rectangle(-1,-1,1,1), i.e. a 3x3 kernel
Referenced by lti::squareConvolution< T, A >::parameters::copy(), lti::squareConvolution< T, A >::parameters::initSquare(), lti::squareConvolution< T, A >::parameters::read(), and lti::squareConvolution< T, A >::parameters::write().