Leaper WaferScan Toolkit
中文 / English 2.x
LMatch Class Reference
Inheritance diagram for LMatch:
ILMatch ILObject

Additional Inherited Members

- Public Member Functions inherited from ILMatch
void GetPatCenter (double *patX, double *patY, double *patAngle)
 
LPVPatCenterMode GetPatCenterMode ()
 
ILPointsGetPatFeature ()
 
void GetPatImage (ILImage *img)
 
void GetPatMask (ILImage *mask)
 
void GetPatPruneMask (ILImage *mask)
 
BOOL IsLearnt ()
 
LPVErrorCode Learn (ILImage *img, ILRegion *region)
 
LPVErrorCode LearnWithShape (ILImage *img, ILRegion *region, ILRegion *shapeRegion)
 
LPVErrorCode LearnWithShapeImage (ILImage *img, ILRegion *region, ILImage *shapeImg)
 
LPVErrorCode Match (ILImage *img, ILRegion *region, ILMatchResults **results)
 
LPVErrorCode Prune (ILImage *img, ILRegion *region)
 
void SetPatCenter (LPVPatCenterMode centerMode, double patX, double patY, double patAngle)
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 
- Properties inherited from ILMatch
int AcceptScore [get, set]
 The minimum acceptable score, in range from 1 to 100. Higher score indicates more strict evaluation standard.
The searching wouldn't go through all candidates. It firstly sort the candidates by its approximate similarity to template, then optimize their position/angle/scale to sub-pixel level one-by-one. It stops if there are enough results met the specified acceptable score.
 
int AccuracyLevel [get, set]
 Accuracy level for the matching, higher level usually means more accurate and stable result but slower.
It should be either 0(Low), 1(Middle, default) or 2(High).
 
int AngleBias [get, set]
 The angle bias in range from -180 to 180. By default, it's 0.
 
int AngleTolerance [get, set]
 The angle tolerance in range from 0 to 180. By default, it's 5.
The matching angle range is based on the bias and tolerance as \( AngleBias \pm AngleTolerance \) .
 
double DetailLevel [get, set]
 Level of detail of the pattern template, in range of 0 ~ 1. By default, it's set to 0.5.
Higher level indicates more details contained in the trained template, while it may introduce more noise and slow down the detection.
You should set the proper detail level firstly, then train the template via Learn(), since the template features should be re-extracted again in the training process.
If at the same time DetailLevel and ShortThreshold / WeakThreshold is specified, we'll filter according to ShortThreshold / WeakThreshold firstly, then adjust to the required detail level.
. More...
 
BOOL ExcludeBoundary [get, set]
 Whether to exclude the matching result on the boundary of the input image or region.
 
int GrayValueWeight [get, set]
 The combination weight of the evaluation score based on the similarity of the matching result and the template image, using normalized cross correlation (NCC).
By default, it's 0, means the gray score does not take any effect. The final score of the result is calculated as: \( Score = Score_{shape} \times (1 - w) + Score_{gray} \times w \) .
 
BOOL IgnoreMissing [get, set]
 Whether the missing parts contribute negatively to the matching result. By default is true, the missing features are ignored when scoring and missing percentage check is skipped.
 
BOOL IgnorePolarity [get, set]
 Whether to ignore polarity in matching. By default, it's off.
 
BOOL IsotropicScale [get, set]
 Whether to keep aspect ratio when scaling, default to true.
 
int MaxCount [get, set]
 The expected maximum count of the matching results.
 
int MissingTolerance [get, set]
 The maximum acceptable missing rate of the matching features in percentage. The value range is 0 ~ 100. By default, it's 50, means 50% missing is acceptable.
Note missing part check is only enabled when IgnoreMissing is false.
 
int Overlap [get, set]
 The maximum acceptable overlap between the nearby matching results in percentage. The value range is 1 ~ 80. By default, it's 50, means 50% overlap. The recommended setting is around 30 ~ 70.
 
int ScaleBias [get, set]
 The scale bias in range from 50 to 150%. By default, it's 100.
 
int ScaleTolerance [get, set]
 The scale tolerance in range from 0 to 50%. By default, it's 0.
The matching scale range is based on the bias and tolerance as \( ScaleBias \pm ScaleTolerance \) .
 
int ShortThreshold [get, set]
 The short threshold is used to filter trained feature points extracted from short edge segments. It's a 0 ~ 100 percentage value related to the longer side of the training image or region, aka. the actual threshold is calculated as \( Max(Width, Height) \times ShortThreshold / 100 \) By default, it's set to 0 to skip the filtering.
You should set the proper short threshold firstly, then train the template via Learn(), since the template features should be re-extracted again in the training process. More...
 
BOOL StrictScore [get, set]
 Whether to enable strict scoring in matching. By default, it's off.
If it's on, scoring is done on the original image with most detail information. If it's off, scoring is done on the scaled and smoothed image which is much faster but with less detail.
 
BOOL UseCache [get, set]
 Whether to make use of cache in matching, it will slightly speed up the matching while consume more memory. By default, it's on.
 
int WeakThreshold [get, set]
 The weak threshold is used to filter trained feature points of low contrast, in range of 0 ~ 100. By default, it's set to 0 to skip the filtering.
You should set the proper weak threshold firstly, then train the template via Learn(), since the template features should be re-extracted again in the training process. More...
 

Detailed Description

This class implements the interface ILMatch, and is used to create an instance of pattern matching tool.