latest version v1.9 - last update 10 Apr 2010 |
Correlation functor. More...
#include <ltiCorrelation.h>
Classes | |
class | parameters |
parameters of the lti::correlation functor More... | |
Public Member Functions | |
correlation () | |
correlation (const mathObject &aKernel) | |
correlation (const correlation &other) | |
virtual | ~correlation () |
virtual const char * | getTypeName () const |
bool | apply (channel8 &srcdest) const |
bool | apply (matrix< float > &srcdest) const |
bool | apply (dmatrix &srcdest) const |
bool | apply (vector< channel8::value_type > &srcdest) const |
bool | apply (vector< channel::value_type > &srcdest) const |
bool | apply (dvector &srcdest) const |
bool | apply (const channel8 &src, channel8 &dest) const |
bool | apply (const matrix< float > &src, matrix< float > &dest) const |
bool | apply (const dmatrix &src, dmatrix &dest) const |
bool | apply (const vector< channel8::value_type > &src, vector< channel8::value_type > &dest) const |
bool | apply (const vector< channel::value_type > &src, vector< channel::value_type > &dest) const |
bool | apply (const dvector &src, dvector &dest) const |
correlation & | copy (const correlation &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
void | setKernel (const mathObject &aKernel) |
Correlation functor.
This functor convolves a filter kernel (given in the correlation::parameters) with a vector or matrix.
Example using a gaussian kernel
// the channel to be filtered: lti::channel data,result; // ... initialize channel here ... // gauss filter kernel with dimensions 5x5, and a variance of 1.3 lti::gaussKernel2D<lti::channel::value_type> kernel(5,1.3); lti::correlation filter; // correlation operator lti::correlation::parameters param; // parameters param.setKernel(kernel); // use the gauss kernel filter.setParameters(param); // use given parameters // filter the channel and leave the result there too filter.apply(data);
You can also create the functor with a given filter kernel:
lti::correlation filter(lti::gaussKernel2D<lti::channel::value_type>(5,1.3); filter.apply(data); // parameters already set in the constructor!
The filter kernel can also be change, changing the parameters or with the shortcut setKernel():
param.setKernel(anotherKernel); filter.setParamters(param); // this is equivalent to: filter.setKernel(anotherKernel);
lti::correlation::correlation | ( | ) |
default constructor
lti::correlation::correlation | ( | const mathObject & | aKernel | ) |
construct a correlation functor with a parameters set which includes the given filter kernel.
lti::correlation::correlation | ( | const correlation & | other | ) |
copy constructor
other | the other functor to be copied |
virtual lti::correlation::~correlation | ( | ) | [virtual] |
destructor
operates on a copy of the given parameters.
src | dvector with the source data. | |
dest | dvector where the result will be left. |
bool lti::correlation::apply | ( | const vector< channel::value_type > & | src, | |
vector< channel::value_type > & | dest | |||
) | const [virtual] |
operates on a copy of the given parameters.
src | vector<channel::value_type> with the source data. | |
dest | vector<channel::value_type> where the result will be left. |
Reimplemented from lti::modifier.
bool lti::correlation::apply | ( | const vector< channel8::value_type > & | src, | |
vector< channel8::value_type > & | dest | |||
) | const |
operates on a copy of the given parameters.
src | vector<channel8::value_type> with the source data. | |
dest | vector<channel8::value_type> where the result will be left. |
operates on a copy of the given parameters.
src | dmatrix with the source data. | |
dest | dmatrix where the result will be left. |
bool lti::correlation::apply | ( | const matrix< float > & | src, | |
matrix< float > & | dest | |||
) | const [virtual] |
operates on a copy of the given parameters.
Reimplemented from lti::modifier.
operates on a copy of the given parameters.
Reimplemented from lti::modifier.
bool lti::correlation::apply | ( | dvector & | srcdest | ) | const |
operates on the given parameter.
srcdest | dvector with the source data. The result will be left here too. |
bool lti::correlation::apply | ( | vector< channel::value_type > & | srcdest | ) | const |
operates on the given parameter.
srcdest | vector<channel::value_type> with the source data. The result will be left here too. |
Reimplemented from lti::modifier.
bool lti::correlation::apply | ( | vector< channel8::value_type > & | srcdest | ) | const |
operates on the given parameter.
srcdest | vector<channel8::value_type> with the source data. The result will be left here too. |
bool lti::correlation::apply | ( | dmatrix & | srcdest | ) | const |
operates on the given parameter.
srcdest | dmatrix with the source data. The result will be left here too. |
bool lti::correlation::apply | ( | matrix< float > & | srcdest | ) | const [virtual] |
operates on the given parameter.
srcdest | channel with the source data. The result will be left here too. |
Reimplemented from lti::modifier.
bool lti::correlation::apply | ( | channel8 & | srcdest | ) | const [virtual] |
operates on the given parameter.
srcdest | channel8 with the source data. The result will be left here too. |
Reimplemented from lti::modifier.
virtual functor* lti::correlation::clone | ( | ) | const [virtual] |
returns a pointer to a clone of the functor.
Implements lti::functor.
correlation& lti::correlation::copy | ( | const correlation & | other | ) |
copy data of "other" functor.
Reimplemented from lti::functor.
const parameters& lti::correlation::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::modifier.
virtual const char* lti::correlation::getTypeName | ( | ) | const [virtual] |
returns the name of this type
Reimplemented from lti::modifier.
void lti::correlation::setKernel | ( | const mathObject & | aKernel | ) |
shortcut to set the filter kernel in the functor parameters.
The other parameters remain unchanged.