|
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 which is ≥ 3, 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...
|
|
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.
Example Code
C++
Code snippets: snippets/PitchCount.cpp
ILEdgeGaugePtr edgeGauge = LEdgeGauge::Create();
edgeGauge->Polarity = LPVPolarity::LPVBlack2White;
edgeGauge->Polarity2 = LPVPolarity::LPVWhite2Black;
edgeGauge->AcceptScore = 40;
edgeGauge->SortBy = (
LPVGaugeFeatures)(LPVGaugeFeatures::LPVGaugeFeatureScore + LPVGaugeFeatures::LPVGaugeFeatureDistance);
edgeGauge->Distance = 100;
edgeGauge->DistanceTolerance = 30;
ILEdgeGaugeResultPtr edgeGaugeResult;
LPVErrorCode err = polyGauge->Detect2(img, rotRectRoi, &edgeGaugeResult);
if (err != LPVErrorCode::LPVNoError) return;
LPVErrorCode
This enumeration represents the type of a LPV function error.
Definition: LPVCore.idl:530
LPVGaugeFeatures
This enumeration represents the features of the sample points.
Definition: LPVGauge.idl:130
C#
Code snippets: snippets/PitchCount.cs
LEdgeGauge edgeGauge = new LEdgeGauge();
edgeGauge.AcceptScore = 40;
edgeGauge.Distance = 100;
edgeGauge.DistanceTolerance = 30;
LEdgeGaugeResult edgeGaugeResult;
LPVErrorCode err = polyGauge.Detect2(img, rotRectRoi, out edgeGaugeResult);
LPVPolarity
This enumeration represents the polarity of the edge or object to be located.
Definition: LPVCore.idl:1094
COM
ILEdgeGaugePtr edgeGauge = LEdgeGauge::Create();
edgeGauge->Polarity = LPVPolarity::LPVBlack2White;
edgeGauge->Polarity2 = LPVPolarity::LPVWhite2Black;
edgeGauge->AcceptScore = 40;
edgeGauge->SortBy = (
LPVGaugeFeatures)(LPVGaugeFeatures::LPVGaugeFeatureScore + LPVGaugeFeatures::LPVGaugeFeatureDistance);
edgeGauge->Distance = 100;
edgeGauge->DistanceTolerance = 30;
ILEdgeGaugeResultPtr edgeGaugeResult;
LPVErrorCode err = polyGauge->Detect2(img, rotRectRoi, &edgeGaugeResult);
if (err != LPVErrorCode::LPVNoError) return;