Leaper WaferScan Toolkit
中文 / English 2.x
Public Member Functions | Properties
ILImageCompare Interface Reference

This interface provide functionalities of image comparison on pixel level. More...

Inheritance diagram for ILImageCompare:
ILObject LImageCompare

Public Member Functions

LPVErrorCode Compare (ILImage *img, ILRegion *region, ILImage *diffResult, ILImage *maskResult)
 
LPVErrorCode CompareSymmetric (ILImage *img, ILRegion *region, ILLine *refLine, ILImage *diffResult, ILImage *maskResult)
 
LPVErrorCode SetBaseline (ILImage *img, ILRegion *region)
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

Properties

int EdgeWidthTolerance [get, set]
 The difference tolerance of edge width, the pixel differences due to edge misalignment is ignored. It should be a positive value or zero, by default, it's 1.
 
int PixelTolerance [get, set]
 The difference tolerance of pixel values. It should be a positive value or zero, by default, it's 10.
 
BOOL RoundedCorner [get, set]
 Handle edge corners as rounded or miter joint. By default, it's enabled as rounded.
 

Detailed Description

This interface provide functionalities of image comparison on pixel level.

To use this interface, you should create a LImageCompare object.

Since
2.1.0

Example Code

Member Function Documentation

◆ Compare()

LPVErrorCode Compare ( ILImage img,
ILRegion region,
ILImage diffResult,
ILImage maskResult 
)

Compare with the baseline image (and mask).

Parameters
[in]imgThe input image
[in]regionThe input region, to limit the region of the comparison on the input image and also exclude some not-care pixels.
[out]diffResultThe pixel-level difference image in the same format as the input image and same size as the input region (or the input image if the region is empty)
[out]maskResult The pixel-level difference mask, white pixels represent those differences exceed PixelTolerance
Return values
errorReturn error code if anything is wrong.

◆ CompareSymmetric()

LPVErrorCode CompareSymmetric ( ILImage img,
ILRegion region,
ILLine refLine,
ILImage diffResult,
ILImage maskResult 
)

Compare two symmetric regions in the give image.

Parameters
[in]imgThe input image
[in]regionThe input region, to limit the region of the comparison on the input image and also exclude some not-care pixels.
[in]refLineThe input reference line used to generate the 2nd symmetric region.
[out]diffResultThe pixel-level difference image in the same image format as the input
[out]maskResult The pixel-level difference mask, white pixels represent those differences exceed PixelTolerance
Return values
errorReturn error code if anything is wrong.

◆ SetBaseline()

LPVErrorCode SetBaseline ( ILImage img,
ILRegion region 
)

Set the comparison baseline image (and mask).

Parameters
[in]imgThe input image
[in]regionThe input region, to limit the region of the baseline template on the input image and also exclude some not-care pixels.
Return values
errorReturn error code if anything is wrong.