This interface provide functionalities of image comparison on pixel level. More...
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 | |
ILObject * | Copy () |
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. | |
This interface provide functionalities of image comparison on pixel level.
To use this interface, you should create a LImageCompare object.
LPVErrorCode Compare | ( | ILImage * | img, |
ILRegion * | region, | ||
ILImage * | diffResult, | ||
ILImage * | maskResult | ||
) |
Compare with the baseline image (and mask).
[in] | img | The input image |
[in] | region | The input region, to limit the region of the comparison on the input image and also exclude some not-care pixels. |
[out] | diffResult | The 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 |
error | Return error code if anything is wrong. |
LPVErrorCode CompareSymmetric | ( | ILImage * | img, |
ILRegion * | region, | ||
ILLine * | refLine, | ||
ILImage * | diffResult, | ||
ILImage * | maskResult | ||
) |
Compare two symmetric regions in the give image.
[in] | img | The input image |
[in] | region | The input region, to limit the region of the comparison on the input image and also exclude some not-care pixels. |
[in] | refLine | The input reference line used to generate the 2nd symmetric region. |
[out] | diffResult | The 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 |
error | Return error code if anything is wrong. |
LPVErrorCode SetBaseline | ( | ILImage * | img, |
ILRegion * | region | ||
) |
Set the comparison baseline image (and mask).
[in] | img | The input image |
[in] | region | The input region, to limit the region of the baseline template on the input image and also exclude some not-care pixels. |
error | Return error code if anything is wrong. |