This interface provide functionalities of the edge-based gauge tool. More...
Public Member Functions | |
LPVErrorCode | Detect1 (ILImage *img, ILRotRectRegion *region, ILEdgeGaugeResult **gaugeResult) |
LPVErrorCode | Detect2 (ILImage *img, ILRotRectRegion *region, ILEdgeGaugeResult **gaugeResult) |
![]() | |
ILObject * | Copy () |
LPVErrorCode | Load (LString filename) |
void | Reset () |
LPVErrorCode | Save (LString filename) |
BOOL | Valid () |
Properties | |
double | Distance [get, set] |
The expected distance of edge pair used for double-side edge inspection. Works when SortBy enables LPVGaugeFeatureDistance. | |
double | DistanceTolerance [get, set] |
The tolerance in percentage for the difference between the true distance of edge pair and the expectation Distance, used for double-side edge inspection. Works when SortBy enables LPVGaugeFeatureDistance. | |
int | MaxCount [get, set] |
The maximum of edges or edge pairs to find. Modification to this property may also change MaxSamplePointCount. | |
LPVPolarity | Polarity2 [get, set] |
The detection polarity for the second edge, either object or edge polarity is acceptable. Used for double-side edge inspection. | |
![]() | |
int | AcceptScore [get, set] |
The accept score used in inspection. It defines the minimum score for identifying the sample point as a valid result. You may pick a proper score with help of the score chart. More... | |
int | KernelSize [get, set] |
The kernel size used in gradient filtering, should be an odd number in 3 ~ 31, say 3, 5, 7, etc. | |
int | MaxSamplePointCount [get, set] |
The maximum of sample points to find in each sample region. | |
BOOL | NormScore [get, set] |
Whether we should normalize the score based on maximum gradient or grayscale value in region. | |
LPVPolarity | Polarity [get, set] |
The detection polarity, either object or edge polarity is acceptable. | |
LPVGaugeFeatures | SortBy [get, set] |
The method used to sort all sample point candidates, the top ones are reported as final results. More... | |
LPVFindBy | SortByPosition [get, set] |
Works when SortBy enables LPVGaugeFeaturePosition, prefer either the last, the central or the last ones. More... | |
BOOL | SortByScoreDescending [get, set] |
Works when SortBy enables LPVGaugeFeatureScore. True to sort all sample point candidates descending(from large score to small, aka. prefer the maximum magnitude), false for sorting in ascending order. More... | |
![]() | |
LString | Name [get, set] |
Name of the object. By default, the object has no name. In most cases, LPV classes don't make use of the names. The name is drawn on canvas around the object if ILDrawable::SetDrawName() is enabled. More... | |
This interface provide functionalities of the edge-based gauge tool.
The edge gauge tool is used to measure the width of objects, the location of edges or features, and the location and spacing of pairs of edges in images. It locates single-side edges or double-side edge pairs by their peak locations in an image's projection applied a simple 1-D edge kernel.
To use this interface, you should create a LEdgeGauge object.
LPVErrorCode Detect1 | ( | ILImage * | img, |
ILRotRectRegion * | region, | ||
ILEdgeGaugeResult ** | gaugeResult | ||
) |
Detect the single-side edges using the edge gauge.
[in] | img | ![]() ![]() |
[in] | region | The input region, it should be a rotated rectangle region with its direction well-defined. |
[out] | gaugeResult | Return the edge gauge result contains the single-side edges. |
error | Return error code if anything is wrong. |
LPVErrorCode Detect2 | ( | ILImage * | img, |
ILRotRectRegion * | region, | ||
ILEdgeGaugeResult ** | gaugeResult | ||
) |
Detect the double-side edges using the edge gauge.
[in] | img | ![]() ![]() |
[in] | region | The input region, it should be a rotated rectangle region with its direction well-defined. |
[out] | gaugeResult | Return the edge gauge result contains the double-side edges. |
error | Return error code if anything is wrong. |