CVB.Net 14.0
Correlation Class Reference

Collection of functions that calculate different kinds of correlation values. More...

Static Public Member Functions

static Image Calculate (ImagePlane plane, ImagePlane template, Rect aoi, CorrelationMethod method)
 Calculate the correlation between an plane and a template using a selectable calculation method . More...
 
static Image Calculate (ImagePlane plane, ImagePlane template, CorrelationMethod method)
 Calculate the correlation between an plane and a template using a selectable calculation method . More...
 
static Image Calculate (ImagePlane plane, ImagePlane template, Rect aoi)
 Calculate the correlation coefficients between an plane and a template . More...
 
static Image Calculate (ImagePlane plane, ImagePlane template)
 Calculate the correlation coefficients between an plane and a template . More...
 
static LocalMaximum[] FindMatches (ImagePlane plane, ImagePlane template, double threshold, int locality)
 Use the correlation coefficient calculation method to find locations in the input image plane that match the given template . More...
 
static LocalMaximum[] FindMatches (ImagePlane plane, ImagePlane template, double threshold, int locality, SubPixelMode subPixMode, Neighborhood subPixRadius)
 Use the correlation coefficient calculation method to find locations in the input image plane that match the given template . More...
 
static LocalMaximum[] FindMatches (ImagePlane plane, ImagePlane template, Rect aoi, double threshold, int locality)
 Use the correlation coefficient calculation method to find locations in the input image plane that match the given template . More...
 
static LocalMaximum[] FindMatches (ImagePlane plane, ImagePlane template, Rect aoi, double threshold, int locality, SubPixelMode subPixMode, Neighborhood subPixRadius)
 Use the correlation coefficient calculation method to find locations in the input image plane that match the given template . More...
 

Detailed Description

Collection of functions that calculate different kinds of correlation values.

Member Function Documentation

◆ Calculate() [1/4]

static Image Calculate ( ImagePlane  plane,
ImagePlane  template 
)
static

Calculate the correlation coefficients between an plane and a template .

The result of the correlation will be an accumulator image with 32 bit floating point pixels containing the results. The pixel (0, 0) of the accumulator corresponds to image position (int)(template width / 2, template height / 2) and its value will be a representation of the correlation between the input image and the template, centered around this very pixel.

Parameters
planeImage plane to perform the correlation on.
templateTemplate plane to perform the correlation with.
Returns
Accumulator image (DataTypes.Float32Bpp).
Exceptions
ObjectDisposedExceptionIf the plane to work on has already been disposed.

◆ Calculate() [2/4]

static Image Calculate ( ImagePlane  plane,
ImagePlane  template,
CorrelationMethod  method 
)
static

Calculate the correlation between an plane and a template using a selectable calculation method .

The result of the correlation will be an accumulator image with 32 bit floating point pixels containing the results. The pixel (0, 0) of the accumulator corresponds to image position (int)(template width / 2, template height / 2) and its value will be a representation of the correlation between the input image and the template, centered around this very pixel.

Parameters
planeImage plane to perform the correlation on.
templateTemplate plane to perform the correlation with.
methodCorrelation method to use.
Returns
Accumulator image (DataTypes.Float32Bpp).
Exceptions
ObjectDisposedExceptionIf the plane to work on has already been disposed.

◆ Calculate() [3/4]

static Image Calculate ( ImagePlane  plane,
ImagePlane  template,
Rect  aoi 
)
static

Calculate the correlation coefficients between an plane and a template .

The result of the correlation will be an accumulator image with 32 bit floating point pixels containing the results.

Note that the accumulator will be smaller than the input aoi , the difference being width (or height) of the template - 1. The template will be anchored at its central pixel (fractional positions cut off).

In other words: The pixel (0, 0) of the accumulator corresponds to image position (int)(template width / 2, template height / 2) and its value will be a representation of the correlation between the input image and the template, centered around this very pixel.

Parameters
planeImage plane to perform the correlation on.
templateTemplate plane to perform the correlation with.
aoiArea of interest to perform the correlation on.
Returns
Accumulator image (DataTypes.Float32Bpp).
Exceptions
ObjectDisposedExceptionIf the plane to work on has already been disposed.

◆ Calculate() [4/4]

static Image Calculate ( ImagePlane  plane,
ImagePlane  template,
Rect  aoi,
CorrelationMethod  method 
)
static

Calculate the correlation between an plane and a template using a selectable calculation method .

The result of the correlation will be an accumulator image with 32 bit floating point pixels containing the results.

Note that the accumulator will be smaller than the input aoi , the difference being width (or height) of the template - 1. The template will be anchored at its central pixel (fractional positions cut off).

In other words: The pixel (0, 0) of the accumulator corresponds to image position (int)(template width / 2, template height / 2) and its value will be a representation of the correlation between the input image and the template, centered around this very pixel.

Parameters
planeImage plane to perform the correlation on.
templateTemplate plane to perform the correlation with.
aoiArea of interest to perform the correlation on.
methodCorrelation method to use.
Returns
Accumulator image (DataTypes.Float32Bpp).
Exceptions
ObjectDisposedExceptionIf the plane to work on has already been disposed.
ArgumentExceptionThrown if method is unknown.

◆ FindMatches() [1/4]

static LocalMaximum[] FindMatches ( ImagePlane  plane,
ImagePlane  template,
double  threshold,
int  locality 
)
static

Use the correlation coefficient calculation method to find locations in the input image plane that match the given template .

If the matches fall within the locality distance (measured using the L1 norm), the one with the lower correlation coefficient will be removed from the result list.

This uses SubPixelMode.ParabolicFast and thus Neighborhood.Use3x3.

Parameters
planeImage plane in which to look for matches.
templateTemplate to match.
localityMinimum distance between two valid matches (measured using the L1 norm).
thresholdMinimum correlation coefficient to look for (valid values range from 0 to 1).
Returns
List of the local maxima that have been found.
Exceptions
ObjectDisposedExceptionIf the plane to work on has already been disposed.

◆ FindMatches() [2/4]

static LocalMaximum[] FindMatches ( ImagePlane  plane,
ImagePlane  template,
double  threshold,
int  locality,
SubPixelMode  subPixMode,
Neighborhood  subPixRadius 
)
static

Use the correlation coefficient calculation method to find locations in the input image plane that match the given template .

If the matches fall within the locality distance (measured using the L1 norm), the one with the lower correlation coefficient will be removed from the result list.

Parameters
planeImage plane in which to look for matches.
templateTemplate to match.
localityMinimum distance between two valid matches (measured using the L1 norm).
thresholdMinimum correlation coefficient to look for (valid values range from 0 to 1).
subPixModeMode to be used for determining sub pixel accuracy (see description of SubPixelMode values).
subPixRadiusNeighborhood to take account in the sub pixel calculation (see description of Neighborhood values).
Returns
List of the local maxima that have been found.
Exceptions
ObjectDisposedExceptionIf the plane to work on has already been disposed.

◆ FindMatches() [3/4]

static LocalMaximum[] FindMatches ( ImagePlane  plane,
ImagePlane  template,
Rect  aoi,
double  threshold,
int  locality 
)
static

Use the correlation coefficient calculation method to find locations in the input image plane that match the given template .

If the matches fall within the locality distance (measured using the L1 norm), the one with the lower correlation coefficient will be removed from the result list.

This uses SubPixelMode.ParabolicFast and thus Neighborhood.Use3x3.

Parameters
planeImage plane in which to look for matches.
templateTemplate to match.
aoiRegion of interest in which to look for matches.
localityMinimum distance between two valid matches (measured using the L1 norm).
thresholdMinimum correlation coefficient to look for (valid values range from 0 to 1).
Returns
List of the local maxima that have been found.
Exceptions
ObjectDisposedExceptionIf the plane to work on has already been disposed.

◆ FindMatches() [4/4]

static LocalMaximum[] FindMatches ( ImagePlane  plane,
ImagePlane  template,
Rect  aoi,
double  threshold,
int  locality,
SubPixelMode  subPixMode,
Neighborhood  subPixRadius 
)
static

Use the correlation coefficient calculation method to find locations in the input image plane that match the given template .

If the matches fall within the locality distance (measured using the L1 norm), the one with the lower correlation coefficient will be removed from the result list.

Parameters
planeImage plane in which to look for matches.
templateTemplate to match.
aoiRegion of interest in which to look for matches.
localityMinimum distance between two valid matches (measured using the L1 norm).
thresholdMinimum correlation coefficient to look for (valid values range from 0 to 1).
subPixModeMode to be used for determining sub pixel accuracy (see description of SubPixelMode values).
subPixRadiusNeighborhood to take account in the sub pixel calculation (see description of Neighborhood values).
Returns
List of the local maxima that have been found.
Exceptions
ObjectDisposedExceptionIf the plane to work on has already been disposed.