CorrelationList2 method (ILEADRasterProcess)
short CorrelationList2(ILEADRaster * pRaster, long lXStep, long lYStep, long lThreshold, ILEADRaster * pRasterList); | |
Overview |
Refer to Bitmaps and Bitmap Lists |
Remarks
(Document/Medical only) Compares the images in the pRasterList parameter 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 pRasterList parameter 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 pRasterList parameter is greater than the value of lThreshold. This method also updates the CorrelationListIndex property with the index of that image. The dimensions of the pRasterList parameter 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 pRasterList parameter.
For example:
1. |
Select bitmaps of the objects for which you want to look. Put them in the pRasterList parameter. |
|
For example: |
|
|
|
|
2. |
Select a bitmap that contains the objects for which you are searching and put it in the bitmap that is referenced by pRaster. |
|
For example: |
|
|
3. |
Call the CorrelationList2 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 pRasterList parameter is greater than the correlation threshold. The height and width of the rectangles are the same as for pRasterList parameter image. |
5. |
The result is: |
|
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