You are here: Start » AVL.NET » AVL.CreateGoldenTemplate_Edges(AvlNet.Image, AvlNet.Rectangle2D, AvlNet.Region, AvlNet.CoordinateSystem2D?, float, float?, float, float, AvlNet.EdgeGoldenTemplate, AvlNet.Image, AvlNet.Region, AvlNet.Region)

AVL.CreateGoldenTemplate_Edges(AvlNet.Image, AvlNet.Rectangle2D, AvlNet.Region, AvlNet.CoordinateSystem2D?, float, float?, float, float, AvlNet.EdgeGoldenTemplate, AvlNet.Image, AvlNet.Region, AvlNet.Region)

Creates golden template for application in CompareGoldenTemplate_Edges filter.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void CreateGoldenTemplate_Edges(
	AvlNet.Image inTemplateImage,
	AvlNet.Rectangle2D inTemplateRegion,
	AvlNet.Region inMask,
	AvlNet.CoordinateSystem2D? inTemplateRegionAlignment,
	float inStdDevX,
	float? inStdDevY,
	float inEdgeThreshold,
	float inEdgeHysteresis,
	out AvlNet.EdgeGoldenTemplate outGoldenTemplate,
	out AvlNet.Image diagCroppedImage,
	out AvlNet.Region diagCroppedEdges,
	out AvlNet.Region diagEdges
)

Parameters

inTemplateImage
Type: AvlNet.Image
Template image containing an object with no defects
inTemplateRegion
Type: AvlNet.Rectangle2D
Region of desired area to compare
inMask
Type: AvlNet.Region
Range of pixels to compare, or null.
inTemplateRegionAlignment
Type: System.Nullable<AvlNet.CoordinateSystem2D>
Alignment of template bounded by inTemplateRegion, or null.
inStdDevX
Type: System.Single
Amount of horizontal smoothing used by the edge filter
inStdDevY
Type: System.Nullable<System.Single>
Amount of vertical smoothing used by the edge filter (Auto = inStdDevX), or null.
inEdgeThreshold
Type: System.Single
Sufficient edge strength; edges of that strength will always be detected on the template image
inEdgeHysteresis
Type: System.Single
Value by which the edge threshold is decreased for edge points neighboring with sufficiently strong edges
outGoldenTemplate
Type: AvlNet.EdgeGoldenTemplate
The output golden template structure
diagCroppedImage
Type: AvlNet.Image
Cropped image to be analyzed
diagCroppedEdges
Type: AvlNet.Region
Edges found on the cropped image
diagEdges
Type: AvlNet.Region
Edges projected onto the input image

Description

This filter creates a template structure that can be later used in CompareGoldenTemplate_Edges filter.

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.

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 outside a main loop of a program. It will create a model only once, instead of each iteration.

See also