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

lti::correlation::parameters Class Reference

parameters of the lti::correlation functor More...

#include <ltiCorrelation.h>

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

List of all members.

Public Types

enum  eMode {
  Classic, Coefficient, C1, C2,
  C3
}

Public Member Functions

 parameters ()
 parameters (const parameters &other)
virtual ~parameters ()
const char * getTypeName () const
parameterscopy (const parameters &other)
virtual functor::parametersclone () const
const mathObjectgetKernel () const
void setKernel (const mathObject &aKernel)
const channel8getMask () const
void setMask (const channel8 &aMask)
void setUseMask (const bool b)
const bool & getUseMask () const
virtual bool write (ioHandler &handler, const bool complete=true) const
virtual bool read (ioHandler &handler, const bool complete=true)
const double & getKernelAverage () const
const int & getKernelSize () const

Public Attributes

eMode mode
mathObjectkernel
const channel8mask
bool useMask

Protected Attributes

double kernelAverage
int kernelSize

Detailed Description

parameters of the lti::correlation functor


Member Enumeration Documentation

Specify the correlation type to be used.

Enumerator:
Classic 

The correlation is defined as f(x)*k(-x), where "*" specifies convolution, f(x) is the image or data where the kernel k(x) must be searched

Coefficient 

Calculates the correlation coefficient defined in Gonzales&Woods, 1993, "Digital Image Processing", pp. 584.

$\gamma(s,t) = \frac{\displaystyle\sum_{x,y}\left[f(x,y)- \overline{f}(x,y)\right] \left[w(x-s,y-t)-\overline{w}\right]} {\left\{\displaystyle\sum_{x,y}\left[f(x,y)- \overline{f}(x,y)\right]^2 \sum_{x,y}\left[w(x-s,y-t)- \overline{w}\right]^2\right\}^{1/2}}$

C1 

Calculates matching criteria C1 defined in Sonka et.al 2nd Edition, pp. 191:

$C_1(u,v)= \displaystyle\frac{1} {\displaystyle\max_{(i,j)\in V} \left|{f(i+u,j+v)-h(i,j)}\right|+1}$

C2 

Calculates matching criteria C2 defined in Sonka et.al 2nd Edition, pp. 191: $C_2(u,v)= \displaystyle\frac{1} {\left(\displaystyle\sum_{(i,j)\in V}\left| f(i+u,j+v)-h(i,j)\right|+1\right)}$

C3 

Calculates matching criteria C3 defined in Sonka et.al 2nd Edition, pp. 191:

$C_3(u,v)= \displaystyle\frac{1} {\left(\displaystyle\sum_{(i,j)\in V} \left[f(i+u,j+v)-h(i,j)\right]^2+1\right)}$


Constructor & Destructor Documentation

lti::correlation::parameters::parameters (  ) 

default constructor

Reimplemented from lti::modifier::parameters.

lti::correlation::parameters::parameters ( const parameters other  ) 

copy constructor

Parameters:
other the parameters object to be copied

Reimplemented from lti::modifier::parameters.

virtual lti::correlation::parameters::~parameters (  )  [virtual]

destructor

Reimplemented from lti::functor::parameters.


Member Function Documentation

virtual functor::parameters* lti::correlation::parameters::clone (  )  const [virtual]

returns a pointer to a clone of this parameters

Reimplemented from lti::modifier::parameters.

parameters& lti::correlation::parameters::copy ( const parameters other  ) 

copy the contents of other parameter object

Parameters:
other the parameters object to be copied
Returns:
a reference to this object

Reimplemented from lti::filter::parameters.

const mathObject& lti::correlation::parameters::getKernel (  )  const

returns the kernel in use.

If it is not set yet, an lti::invalidParameters exception will be thrown

Returns:
a const reference to the filter kernel.
const double& lti::correlation::parameters::getKernelAverage (  )  const

get kernel average

const int& lti::correlation::parameters::getKernelSize (  )  const

get kernel size

const channel8& lti::correlation::parameters::getMask (  )  const

Returns the mask in use.

If none is set yet, an lti::invalidParametersException will be thrown.

const char* lti::correlation::parameters::getTypeName (  )  const [virtual]

returns name of this type

Reimplemented from lti::modifier::parameters.

const bool& lti::correlation::parameters::getUseMask (  )  const

Returns the value set by setUseMask.

virtual bool lti::correlation::parameters::read ( ioHandler handler,
const bool  complete = true 
) [virtual]

write the parameters in the given ioHandler

Parameters:
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.
Returns:
true if write was successful

Reimplemented from lti::modifier::parameters.

void lti::correlation::parameters::setKernel ( const mathObject aKernel  ) 

sets the filter kernel to be used.

A copy of the given parameter will be made!

Parameters:
aKernel the filter kernel to be used
void lti::correlation::parameters::setMask ( const channel8 aMask  ) 

Sets the maks to be used for the kernel.

void lti::correlation::parameters::setUseMask ( const bool  b  ) 

Determine whether the whole (rectangular) kernel should be convolved, or only an arbitrarily shaped object within in, described by the mask.

The default value for this option is false, meaning the whole kernel is convolved (just as one would expect).

virtual bool lti::correlation::parameters::write ( ioHandler handler,
const bool  complete = true 
) const [virtual]

write the parameters in the given ioHandler

Parameters:
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.
Returns:
true if write was successful

Reimplemented from lti::modifier::parameters.


Member Data Documentation

pointer to the filter kernel copy

average of the kernel elements.

This pseudo-parameters is calculated by set kernel

the number of elements of the kernel is also needed

The mask that defines the object depicted in the kernel.

Convolve the whole kernel, or just the object defined by the mask?


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

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