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.

## ◆ 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
 plane Image plane to perform the correlation on. template Template plane to perform the correlation with.
Returns
Accumulator image (DataTypes.Float32Bpp).
Exceptions
 ObjectDisposedException If 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
 plane Image plane to perform the correlation on. template Template plane to perform the correlation with. method Correlation method to use.
Returns
Accumulator image (DataTypes.Float32Bpp).
Exceptions
 ObjectDisposedException If 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
 plane Image plane to perform the correlation on. template Template plane to perform the correlation with. aoi Area of interest to perform the correlation on.
Returns
Accumulator image (DataTypes.Float32Bpp).
Exceptions
 ObjectDisposedException If 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
 plane Image plane to perform the correlation on. template Template plane to perform the correlation with. aoi Area of interest to perform the correlation on. method Correlation method to use.
Returns
Accumulator image (DataTypes.Float32Bpp).
Exceptions
 ObjectDisposedException If the plane to work on has already been disposed. ArgumentException Thrown 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
 plane Image plane in which to look for matches. template Template to match. locality Minimum distance between two valid matches (measured using the L1 norm). threshold Minimum correlation coefficient to look for (valid values range from 0 to 1).
Returns
List of the local maxima that have been found.
Exceptions
 ObjectDisposedException If 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
 plane Image plane in which to look for matches. template Template to match. locality Minimum distance between two valid matches (measured using the L1 norm). threshold Minimum correlation coefficient to look for (valid values range from 0 to 1). subPixMode Mode to be used for determining sub pixel accuracy (see description of SubPixelMode values). subPixRadius Neighborhood to take account in the sub pixel calculation (see description of Neighborhood values).
Returns
List of the local maxima that have been found.
Exceptions
 ObjectDisposedException If 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
 plane Image plane in which to look for matches. template Template to match. aoi Region of interest in which to look for matches. locality Minimum distance between two valid matches (measured using the L1 norm). threshold Minimum correlation coefficient to look for (valid values range from 0 to 1).
Returns
List of the local maxima that have been found.
Exceptions
 ObjectDisposedException If 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
 plane Image plane in which to look for matches. template Template to match. aoi Region of interest in which to look for matches. locality Minimum distance between two valid matches (measured using the L1 norm). threshold Minimum correlation coefficient to look for (valid values range from 0 to 1). subPixMode Mode to be used for determining sub pixel accuracy (see description of SubPixelMode values). subPixRadius Neighborhood to take account in the sub pixel calculation (see description of Neighborhood values).
Returns
List of the local maxima that have been found.
Exceptions
 ObjectDisposedException If the plane to work on has already been disposed.