CorrelationList method (ILEADRasterProcess)

Visual Basic example

Visual C++ example

 

Syntax

short CorrelationList(ILEADRaster * pRaster, long lXStep, long lYStep, long lThreshold);

Overview

Refer to Bitmaps and Bitmap Lists.

Remarks

(Document/Medical only) Compares the images in the BitmapList property with all the areas of the same dimensions in the bitmap referenced by pRaster and finds those portions that match according to the measure of correlation.

All the images in the BitmapList property must have the same dimensions. Correlation is a measure of the association (resemblance) between two images. It varies from 0 (zero resemblance) to 100 (perfect resemblance). This method updates the CorrelationListX and CorrelationListY properties with the X-axis and Y-axis coordinates of the origin for those areas of the bitmap that is referenced by pRaster where the resemblance with an image in the BitmapList property is greater than the value of lThreshold. This method also updates the CorrelationListIndex property with the index of that image. The dimensions of the BitmapList property images must be less than or equal to the bitmap dimensions that is referenced by pRaster.

This method also updates the CorrelationListCount property with the number of areas in the bitmap referenced by pRaster that correlate to an image in the BitmapList property.

For example:

1.

Select bitmaps of the objects for which you want to look. Put them in BitmapList property.

 

For example:

 

image\letterA.gif

 

image\letterD.gif

2.

Select a bitmap that contains the objects for which you are searching and put it in of the bitmap that is referenced by pRaster.

 

For example:

 

image\SampleTextSearch.gif

3.

Call the CorrelationList method.

4.

The method will update the CorrelationListX and CorrelationListY properties with the X-axis and Y-axis coordinates of the origin (top-left) for each area of the bitmap referenced by the pRaster where the correlation with the image in BitmapList property is greater than the correlation threshold. The height and width of the rectangles are the same as for BitmapList property image.

5.

The result is:

 

image\SampleResults.gif

To look for one object in a bitmap, use the Correlation method.

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.

If the bitmap has a region, this method works only on the region. If the bitmap does not have a region, this method works on the entire bitmap.

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:

CorrelationListMaxPoints property, CorrelationListX property, CorrelationListY property, CorrelationListCount property, CorrelationListIndex property, IntensityDetect method, SpatialFilter method, BinaryFilter method, MaxFilter method, MinFilter method, Correlation method, CorrelationList2 method.

Topics:

Raster Images: Comparing Images.