Namespace: Stemmer.Cvb.Foundation
Assembly: Stemmer.Cvb.Foundation (in Stemmer.Cvb.Foundation.dll) Version: 14.0.0.0
public static Image Calculate( ImagePlane plane, ImagePlane template, Rect aoi, CorrelationMethod method )
Parameters
- plane
- Type: Stemmer.CvbImagePlane
Image plane to perform the correlation on. - template
- Type: Stemmer.CvbImagePlane
Template plane to perform the correlation with. - aoi
- Type: Stemmer.CvbRect
Area of interest to perform the correlation on. - method
- Type: Stemmer.Cvb.FoundationCorrelationMethod
Correlation method to use.
Return Value
Type: ImageAccumulator image (Float32Bpp).
Exception | Condition |
---|---|
ObjectDisposedException | If the plane to work on has already been disposed. |
ArgumentException | Thrown if method is unknown. |
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.