Defect

Measures defect

int Defect(
        const IMAGE     *image,
        const BYTE      *model,
        const int       elmStart,
        const int       elmEnd,
        const int       color,
        int             *size,
        double  *defect,
        double  *positionX,
        double  *positionY
)

Parameters
*image
Image data structure address
*model
Model data storage space address
elmStart
Start element size (default is 0)
elmEnd
End element size (default is 6)
Data: 4/8/12/16/24/32/64
Range: 0-6 (corresponding to the above values)
color
Detection object color
0: Both
1: White defect
2: Black defect
*size
Defect size (measurement result)
*defect
Defect level (measurement result)
*positionX
Defect coordinate (measurement result)
*positionY
Defect coordinate (measurement result)

Return Value
NORMAL(0): Successful completion
ERROR(-1): Unsuccessful completion

Description
Performs the defect measurement with the specified parameters.
Detection object color is only enabled for the monochrome images.

Notes