You are here: Start » AVL.NET » AVL.CompareGoldenTemplate_Edges(AvlNet.Image, AvlNet.EdgeGoldenTemplate, AvlNet.CoordinateSystem2D, float, float?, float, float, int, AvlNet.Region, bool, AvlNet.Region, AvlNet.Region, AvlNet.Region, AvlNet.Region, AvlNet.Region)
AVL.CompareGoldenTemplate_Edges(AvlNet.Image, AvlNet.EdgeGoldenTemplate, AvlNet.CoordinateSystem2D, float, float?, float, float, int, AvlNet.Region, bool, AvlNet.Region, AvlNet.Region, AvlNet.Region, AvlNet.Region, AvlNet.Region)
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
public static void CompareGoldenTemplate_Edges( AvlNet.Image inImage, AvlNet.EdgeGoldenTemplate inGoldenTemplate, AvlNet.CoordinateSystem2D inGoldenTemplateAlignment, float inStdDevX, float? inStdDevY, float inEdgeThreshold, float inEdgeHysteresis, int inMaxDistance, out AvlNet.Region outDefects, out bool outDefectsPresent, out AvlNet.Region outMissingEdges, out AvlNet.Region outExcessiveEdges, out AvlNet.Region outImageEdges, out AvlNet.Region outGoldenEdges, out AvlNet.Region outMatchingEdges )
Parameters
- inImage
- Type: AvlNet.Image
- inGoldenTemplate
- Type: AvlNet.EdgeGoldenTemplate
- inGoldenTemplateAlignment
- Type: AvlNet.CoordinateSystem2D
- inStdDevX
- Type: System.Single
- inStdDevY
- Type: System.Nullable<System.Single>
- inEdgeThreshold
- Type: System.Single
- inEdgeHysteresis
- Type: System.Single
- inMaxDistance
- Type: System.Int32
- outDefects
- Type: AvlNet.Region
- outDefectsPresent
- Type: System.Boolean
- outMissingEdges
- Type: AvlNet.Region
- outExcessiveEdges
- Type: AvlNet.Region
- outImageEdges
- Type: AvlNet.Region
- outGoldenEdges
- Type: AvlNet.Region
- outMatchingEdges
- Type: AvlNet.Region
Description
This filter compares edges given input image with an image stored in a golden template and then, as a result, creates a region containing only pixels where edges are different.
This method is especially useful for finding defects of the object shape. Due to invulnerability to color changes, it may be used in appliances with changing light conditions.
Parameter inMaxDistance defines the maximal distances of two edges that should be treated as the same edge.
To prepare image and area to be compared in it you can use CreateGoldenTemplate_Edges filter or property window.
Mostly the inEdgeThreshold and inEdgeHysteresis parameters should have the same value as in CreateGoldenTemplate_Edges filter. The values should be changed however if the brightness of the input image is significantly different from the brightness of the golden image used in CreateGoldenTemplate_Edges. The inEdgeThreshold can be also decreased slightly if one wants to concentrate on missing edges or increased to concentrate on excessive edges.
More information about this technique can be found in Machine Vision Guide: Golden Template.
Remarks
Due to performance, it is recommended to create a template using the CreateGoldenTemplate_Edges filter outside a main loop of a program. It will create a model only once, instead of each iteration.
