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

lti::crossCorrelationCoefficient Class Reference

This class computes the normalized cross correlation coefficient between two matrices or vectors. More...

#include <ltiCrossCorrelationCoefficient.h>

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

List of all members.

Classes

class  parameters
 The parameters for the class crossCorrelationCoefficient. More...

Public Member Functions

 crossCorrelationCoefficient ()
 crossCorrelationCoefficient (const parameters &par)
 crossCorrelationCoefficient (const crossCorrelationCoefficient &other)
virtual ~crossCorrelationCoefficient ()
virtual const char * getTypeName () const
crossCorrelationCoefficientcopy (const crossCorrelationCoefficient &other)
crossCorrelationCoefficientoperator= (const crossCorrelationCoefficient &other)
virtual functorclone () const
const parametersgetParameters () const
Apply methods with one set of control points



bool apply (const matrix< ubyte > &src1, const matrix< ubyte > &src2, const pointList &controlPoints, const fvector &transf, float &dest) const
bool apply (const matrix< float > &src1, const matrix< float > &src2, const pointList &controlPoints, const fvector &transf, float &dest) const
bool apply (const matrix< ubyte > &src1, const matrix< ubyte > &src2, const pointList &controlPoints, const dvector &transf, double &dest) const
bool apply (const matrix< float > &src1, const matrix< float > &src2, const pointList &controlPoints, const dvector &transf, double &dest) const
Apply methods with two sets of control points



bool apply (const matrix< ubyte > &src1, const matrix< ubyte > &src2, const pointList &pts1, const pointList &pts2, float &dest) const
bool apply (const matrix< float > &src1, const matrix< float > &src2, const pointList &pts1, const pointList &pts2, float &dest) const
bool apply (const matrix< ubyte > &src1, const matrix< ubyte > &src2, const pointList &pts1, const pointList &pts2, double &dest) const
bool apply (const matrix< float > &src1, const matrix< float > &src2, const pointList &pts1, const pointList &pts2, double &dest) const
Apply methods with two points



bool apply (const matrix< ubyte > &src1, const matrix< ubyte > &src2, const ipoint &pt1, const ipoint &pt2, float &dest) const
bool apply (const matrix< float > &src1, const matrix< float > &src2, const ipoint &pt1, const ipoint &pt2, float &dest) const
bool apply (const matrix< ubyte > &src1, const matrix< ubyte > &src2, const ipoint &pt1, const ipoint &pt2, double &dest) const
bool apply (const matrix< float > &src1, const matrix< float > &src2, const ipoint &pt1, const ipoint &pt2, double &dest) const
Apply methods for entire matrices



bool apply (const matrix< ubyte > &src1, const matrix< ubyte > &src2, float &dest) const
bool apply (const matrix< float > &src1, const matrix< float > &src2, float &dest) const
bool apply (const matrix< ubyte > &src1, const matrix< ubyte > &src2, double &dest) const
bool apply (const matrix< float > &src1, const matrix< float > &src2, double &dest) const
Apply methods for vectors



bool apply (const vector< ubyte > &src1, const vector< ubyte > &src2, float &dest) const
bool apply (const vector< float > &src1, const vector< float > &src2, float &dest) const
bool apply (const vector< ubyte > &src1, const vector< ubyte > &src2, double &dest) const
bool apply (const vector< float > &src1, const vector< float > &src2, double &dest) const

Detailed Description

This class computes the normalized cross correlation coefficient between two matrices or vectors.

Some applies allow to transform the points in one source using nearest neighbor interpolation prior to computing the cross correlation coefficient. This is only done if you specify a homographyEstimatorBase in the parameters, though. The transformation is a short cut bypassing classes like geometricTransform, which is useful when estimating and verifying transformations (coming soon).

CAVEAT: This class could use more iterator arithmetic inside and thus is not implemented efficiently everywhere. Some applies also are less efficient than they could be because code duplication is avoided.


Constructor & Destructor Documentation

lti::crossCorrelationCoefficient::crossCorrelationCoefficient (  ) 

Default constructor.

lti::crossCorrelationCoefficient::crossCorrelationCoefficient ( const parameters par  ) 

Construct a functor using the given parameters.

lti::crossCorrelationCoefficient::crossCorrelationCoefficient ( const crossCorrelationCoefficient other  ) 

Copy constructor.

Parameters:
other the object to be copied
virtual lti::crossCorrelationCoefficient::~crossCorrelationCoefficient (  )  [virtual]

Destructor.


Member Function Documentation

bool lti::crossCorrelationCoefficient::apply ( const vector< float > &  src1,
const vector< float > &  src2,
double &  dest 
) const

Computes the normalized cross correlation coefficient between two vectors only considering all positions inside both vectors.

No window is used. Both vectors most have the same size.

Parameters:
src1 vector with the first intensities.
src2 vector with the second intensities.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const vector< ubyte > &  src1,
const vector< ubyte > &  src2,
double &  dest 
) const

Computes the normalized cross correlation coefficient between two vectors only considering all positions inside both vectors.

No window is used. Both vectors most have the same size.

Parameters:
src1 vector with the first intensities.
src2 vector with the second intensities.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const vector< float > &  src1,
const vector< float > &  src2,
float &  dest 
) const

Computes the normalized cross correlation coefficient between two vectors only considering all positions inside both vectors.

No window is used. Both vectors most have the same size.

Parameters:
src1 vector with the first intensities.
src2 vector with the second intensities.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const vector< ubyte > &  src1,
const vector< ubyte > &  src2,
float &  dest 
) const

Computes the normalized cross correlation coefficient between two vectors only considering all positions inside both vectors.

No window is used. Both vectors most have the same size.

Parameters:
src1 vector with the first intensities.
src2 vector with the second intensities.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< float > &  src1,
const matrix< float > &  src2,
double &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering all positions inside both channels.

No window is used. Both channels most have the same size.

Parameters:
src1 channel with the first intensities.
src2 channel with the second intensities.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< ubyte > &  src1,
const matrix< ubyte > &  src2,
double &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering all positions inside both channels.

No window is used. Both channels most have the same size.

Parameters:
src1 channel8 with the first intensities.
src2 channel8 with the second intensities.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< float > &  src1,
const matrix< float > &  src2,
float &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering all positions inside both channels.

No window is used. Both channels most have the same size.

Parameters:
src1 channel with the first intensities.
src2 channel with the second intensities.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< ubyte > &  src1,
const matrix< ubyte > &  src2,
float &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering all positions inside both channels.

No window is used. Both channels most have the same size.

Parameters:
src1 channel8 with the first intensities.
src2 channel8 with the second intensities.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< float > &  src1,
const matrix< float > &  src2,
const ipoint pt1,
const ipoint pt2,
double &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering a window located at a single control point.

Only positions inside both channels are considered. In both channels the same window is used.

Parameters:
src1 channel with the first intensities.
src2 channel with the second intensities.
pt1 the first control points.
pt2 the second control points.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< ubyte > &  src1,
const matrix< ubyte > &  src2,
const ipoint pt1,
const ipoint pt2,
double &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering a window located at a single control point.

Only positions inside both channels are considered. In both channels the same window is used.

Parameters:
src1 channel8 with the first intensities.
src2 channel8 with the second intensities.
pt1 the first control points.
pt2 the second control points.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< float > &  src1,
const matrix< float > &  src2,
const ipoint pt1,
const ipoint pt2,
float &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering a window located at a single control point.

Only positions inside both channels are considered. In both channels the same window is used.

Parameters:
src1 channel with the first intensities.
src2 channel with the second intensities.
pt1 the first control points.
pt2 the second control points.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< ubyte > &  src1,
const matrix< ubyte > &  src2,
const ipoint pt1,
const ipoint pt2,
float &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering a window located at a single control point.

Only positions inside both channels are considered. In both channels the same window is used.

Parameters:
src1 channel8 with the first intensities.
src2 channel8 with the second intensities.
pt1 the first control points.
pt2 the second control points.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< float > &  src1,
const matrix< float > &  src2,
const pointList pts1,
const pointList pts2,
double &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering a window located at each control point.

This is useful to exlude e.g. homogenous areas. Only positions inside both channels are considered. Please specify the same number of points in both point lists. In both channels the same window is used.

Parameters:
src1 channel with the first intensities.
src2 channel with the second intensities.
pts1 pointList with the first control points.
pts2 pointList with the second control points.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< ubyte > &  src1,
const matrix< ubyte > &  src2,
const pointList pts1,
const pointList pts2,
double &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering a window located at each control point.

This is useful to exlude e.g. homogenous areas. Only positions inside both channels are considered. Please specify the same number of points in both point lists. In both channels the same window is used.

Parameters:
src1 channel8 with the first intensities.
src2 channel8 with the second intensities.
pts1 pointList with the first control points.
pts2 pointList with the second control points.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< float > &  src1,
const matrix< float > &  src2,
const pointList pts1,
const pointList pts2,
float &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering a window located at each control point.

This is useful to exlude e.g. homogenous areas. Only positions inside both channels are considered. Please specify the same number of points in both point lists. In both channels the same window is used.

Parameters:
src1 channel with the first intensities.
src2 channel with the second intensities.
pts1 pointList with the first control points.
pts2 pointList with the second control points.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< ubyte > &  src1,
const matrix< ubyte > &  src2,
const pointList pts1,
const pointList pts2,
float &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering a window located at each control point.

This is useful to exlude e.g. homogenous areas. Only positions inside both channels are considered. Please specify the same number of points in both point lists. In both channels the same window is used.

Parameters:
src1 channel8 with the first intensities.
src2 channel8 with the second intensities.
pts1 pointList with the first control points.
pts2 pointList with the second control points.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< float > &  src1,
const matrix< float > &  src2,
const pointList controlPoints,
const dvector transf,
double &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering a window located at each control point.

This is useful to exlude e.g. homogenous areas. Only positions inside both channels are considered. If the channels are recorded from different positions it is advantageous to supply a transformation vector. Please do no forget to define a transformation in the parameters. On default no transformation is executed. E.g. the control points and the points inside the window have the same coordinates in both channels.

Parameters:
src1 channel with the first intensities.
src2 channel with the second intensities.
controlPoints pointList with the control points.
transf dvector with the transform by which the control points are fit inside the the second image. The window in the second image around the control points is distorted, too.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< ubyte > &  src1,
const matrix< ubyte > &  src2,
const pointList controlPoints,
const dvector transf,
double &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering a window located at each control point.

This is useful to exlude e.g. homogenous areas. Only positions inside both channels are considered. If the channels are recorded from different positions it is advantageous to supply a transformation vector. Please do no forget to define a transformation in the parameters. On default no transformation is executed. E.g. the control points and the points inside the window have the same coordinates in both channels.

Parameters:
src1 channel8 with the first intensities.
src2 channel8 with the second intensities.
controlPoints pointList with the control points.
transf dvector with the transform by which the control points are fit inside the the second image. The window in the second image around the control points is distorted, too.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< float > &  src1,
const matrix< float > &  src2,
const pointList controlPoints,
const fvector transf,
float &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering a window located at each control point.

This is useful to exlude e.g. homogenous areas. Only positions inside both channels are considered. If the channels are recorded from different positions it is advantageous to supply a transformation vector. Please do no forget to define a transformation in the parameters. On default no transformation is executed. E.g. the control points and the points inside the window have the same coordinates in both channels.

Parameters:
src1 channel with the first intensities.
src2 channel with the second intensities.
controlPoints pointList with the control points.
transf fvector with the transform by which the control points are fit inside the the second image. The window in the second image around the control points is distorted, too.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
bool lti::crossCorrelationCoefficient::apply ( const matrix< ubyte > &  src1,
const matrix< ubyte > &  src2,
const pointList controlPoints,
const fvector transf,
float &  dest 
) const

Computes the normalized cross correlation coefficient between two channels only considering a window located at each control point.

This is useful to exlude e.g. homogenous areas. Only positions inside both channels are considered. If the channels are recorded from different positions it is advantageous to supply a transformation vector. Please do no forget to define a transformation in the parameters. On default no transformation is executed. E.g. the control points and the points inside the window have the same coordinates in both channels.

Parameters:
src1 channel8 with the first intensities.
src2 channel8 with the second intensities.
controlPoints pointList with the control points.
transf fvector with the transform by which the control points are fit inside the the second image. The window in the second image around the control points is distorted, too.
dest the computed normalized cross correlation coefficient.
Returns:
true if apply successful or false otherwise.
virtual functor* lti::crossCorrelationCoefficient::clone (  )  const [virtual]

Returns a pointer to a clone of this functor.

Reimplemented from lti::featureExtractor.

crossCorrelationCoefficient& lti::crossCorrelationCoefficient::copy ( const crossCorrelationCoefficient other  ) 

Copy data of "other" functor.

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

Reimplemented from lti::featureExtractor.

const parameters& lti::crossCorrelationCoefficient::getParameters (  )  const

Returns used parameters.

Reimplemented from lti::featureExtractor.

virtual const char* lti::crossCorrelationCoefficient::getTypeName (  )  const [virtual]

Returns the name of this type ("crossCorrelationCoefficient").

Reimplemented from lti::featureExtractor.

crossCorrelationCoefficient& lti::crossCorrelationCoefficient::operator= ( const crossCorrelationCoefficient other  ) 

Alias for copy member.

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

Reimplemented from lti::functor.


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