Correlation method (ILEADRasterProcess)

Visual Basic example

Visual C++ example

 

Syntax

short Correlation (ILEADRaster *pRaster, ILEADRaster * pCorrelationRaster, short StepX, short StepY, short Threshold);

Overview

Refer to Bitmaps and Bitmap Lists

Remarks

(Medical only) This method compares the bitmap references by pCorrelationRaster (or part of the bitmap) with all the areas of the same dimensions in the bitmap references by pRaster and finds those portions that match according to the measure of correlation.

Correlation is a measure of association (resemblance) between two images. It varies from 0 (zero resemblance) to 100 (perfect resemblance). This method updates the CorrelationX and CorrelationY properties with the point of origin for those areas of the bitmap referenced by pRaster where the resemblance with the bitmap referenced by pCorrelationRaster (or part of the bitmap) is greater than the value of iThreshold. The dimensions of the bitmap referenced by pCorrelationRaster must be less than or equal to the dimensions of the bitmap referenced by pRaster.

For example:

  1. Select a bitmap of the object for which you want to look. Set it as the bitmap for pCorrelationRaster.

For example:

image\Correlation1.gif

  1. Select a bitmap that contains the object you are searching and set it as the bitmap for pRaster

For example:

image\Correlation2.gif

  1. Call Correlation.

  2. The method will update the CorrelationX and CorrelationY properties with the point of origin (top-left) for each area of the bitmap referenced by pRaster where the correlation with the bitmap referenced by pCorrelationRaster is greater than the correlation threshold. The height and width of the rectangles are the same as for the bitmap referenced by pCorrelationRaster.

  3. The result is:

image\Correlation3.gif

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

CorrelationX property, CorrelationY property, CorrelationMaxPoints property, CorrelationCount property, IntensityDetect method, SpatialFilter method, BinaryFilter method, MaxFilter method, MinFilter method.

Topics:

Raster Image Functions: Comparing Images