LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::correlation Class Reference

Correlation functor. More...

#include <ltiCorrelation.h>

Inheritance diagram for lti::correlation:
Inheritance graph
[legend]
Collaboration diagram for lti::correlation:
Collaboration graph
[legend]

List of all members.

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
correlationcopy (const correlation &other)
virtual functorclone () const
const parametersgetParameters () const
void setKernel (const mathObject &aKernel)

Detailed Description

Correlation functor.

This functor convolves a filter kernel (given in the correlation::parameters) with a vector or matrix.

See also:
lti::gaussKernel, lti::gaborKernel

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);

Constructor & Destructor Documentation

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

Parameters:
other the other functor to be copied
virtual lti::correlation::~correlation (  )  [virtual]

destructor


Member Function Documentation

bool lti::correlation::apply ( const dvector src,
dvector dest 
) const

operates on a copy of the given parameters.

Parameters:
src dvector with the source data.
dest dvector where the result will be left.
Returns:
true if successful, false otherwise.
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.

Parameters:
src vector<channel::value_type> with the source data.
dest vector<channel::value_type> where the result will be left.
Returns:
true if successful, false otherwise.

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.

Parameters:
src vector<channel8::value_type> with the source data.
dest vector<channel8::value_type> where the result will be left.
Returns:
true if successful, false otherwise.
bool lti::correlation::apply ( const dmatrix src,
dmatrix dest 
) const

operates on a copy of the given parameters.

Parameters:
src dmatrix with the source data.
dest dmatrix where the result will be left.
Returns:
true if successful, false otherwise.
bool lti::correlation::apply ( const matrix< float > &  src,
matrix< float > &  dest 
) const [virtual]

operates on a copy of the given parameters.

Parameters:
src channel with the source data.
dest channel where the result will be left.
Returns:
true if successful, false otherwise.

Reimplemented from lti::modifier.

bool lti::correlation::apply ( const channel8 src,
channel8 dest 
) const [virtual]

operates on a copy of the given parameters.

Parameters:
src channel8 with the source data.
dest channel8 where the result will be left.
Returns:
true if successful, false otherwise.

Reimplemented from lti::modifier.

bool lti::correlation::apply ( dvector srcdest  )  const

operates on the given parameter.

Parameters:
srcdest dvector with the source data. The result will be left here too.
Returns:
true if successful, false otherwise.
bool lti::correlation::apply ( vector< channel::value_type > &  srcdest  )  const

operates on the given parameter.

Parameters:
srcdest vector<channel::value_type> with the source data. The result will be left here too.
Returns:
true if successful, false otherwise.

Reimplemented from lti::modifier.

bool lti::correlation::apply ( vector< channel8::value_type > &  srcdest  )  const

operates on the given parameter.

Parameters:
srcdest vector<channel8::value_type> with the source data. The result will be left here too.
Returns:
true if successful, false otherwise.
bool lti::correlation::apply ( dmatrix srcdest  )  const

operates on the given parameter.

Parameters:
srcdest dmatrix with the source data. The result will be left here too.
Returns:
true if successful, false otherwise.
bool lti::correlation::apply ( matrix< float > &  srcdest  )  const [virtual]

operates on the given parameter.

Parameters:
srcdest channel with the source data. The result will be left here too.
Returns:
true if successful, false otherwise.

Reimplemented from lti::modifier.

bool lti::correlation::apply ( channel8 srcdest  )  const [virtual]

operates on the given parameter.

Parameters:
srcdest channel8 with the source data. The result will be left here too.
Returns:
true if successful, false otherwise.

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.


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:27:10 2010 for LTI-Lib by Doxygen 1.6.1