latest version v1.9 - last update 10 Apr 2010 |
This class computes the normalized cross correlation coefficient between two matrices or vectors. More...
#include <ltiCrossCorrelationCoefficient.h>
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 |
crossCorrelationCoefficient & | copy (const crossCorrelationCoefficient &other) |
crossCorrelationCoefficient & | operator= (const crossCorrelationCoefficient &other) |
virtual functor * | clone () const |
const parameters & | getParameters () 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 |
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.
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.
other | the object to be copied |
virtual lti::crossCorrelationCoefficient::~crossCorrelationCoefficient | ( | ) | [virtual] |
Destructor.
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.
src1 | vector with the first intensities. | |
src2 | vector with the second intensities. | |
dest | the computed normalized cross correlation coefficient. |
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.
src1 | vector with the first intensities. | |
src2 | vector with the second intensities. | |
dest | the computed normalized cross correlation coefficient. |
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.
src1 | vector with the first intensities. | |
src2 | vector with the second intensities. | |
dest | the computed normalized cross correlation coefficient. |
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.
src1 | vector with the first intensities. | |
src2 | vector with the second intensities. | |
dest | the computed normalized cross correlation coefficient. |
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.
src1 | channel with the first intensities. | |
src2 | channel with the second intensities. | |
dest | the computed normalized cross correlation coefficient. |
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.
src1 | channel8 with the first intensities. | |
src2 | channel8 with the second intensities. | |
dest | the computed normalized cross correlation coefficient. |
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.
src1 | channel with the first intensities. | |
src2 | channel with the second intensities. | |
dest | the computed normalized cross correlation coefficient. |
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.
src1 | channel8 with the first intensities. | |
src2 | channel8 with the second intensities. | |
dest | the computed normalized cross correlation coefficient. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
other | the functor to be copied |
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 | ) |