You are here: Start » AVL.NET » AVL.CreateGoldenTemplate_Intensity(AvlNet.Image, AvlNet.Rectangle2D, AvlNet.Region, AvlNet.CoordinateSystem2D?, float, int, AvlNet.GrayGoldenTemplate, AvlNet.Image, AvlNet.Region, AvlNet.Region)

AVL.CreateGoldenTemplate_Intensity(AvlNet.Image, AvlNet.Rectangle2D, AvlNet.Region, AvlNet.CoordinateSystem2D?, float, int, AvlNet.GrayGoldenTemplate, AvlNet.Image, AvlNet.Region, AvlNet.Region)

Creates golden template for application in CompareGoldenTemplate_Intensity filter.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void CreateGoldenTemplate_Intensity(
	AvlNet.Image inTemplateImage,
	AvlNet.Rectangle2D inTemplateRegion,
	AvlNet.Region inMask,
	AvlNet.CoordinateSystem2D? inTemplateRegionAlignment,
	float inEdgeThreshold,
	int inEdgeDilation,
	out AvlNet.GrayGoldenTemplate outGoldenTemplate,
	out AvlNet.Image diagCroppedImage,
	out AvlNet.Region diagCroppedEdgeRegion,
	out AvlNet.Region diagEdgeRegion
)

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.
inEdgeThreshold
Type: System.Single
Minimum strength of edges on the golden image near which comparison is NOT performed
inEdgeDilation
Type: System.Int32
Defines for how far from the detected edges comparison is NOT performed
outGoldenTemplate
Type: AvlNet.GrayGoldenTemplate
The output golden template structure
diagCroppedImage
Type: AvlNet.Image
Cropped image to be analyzed
diagCroppedEdgeRegion
Type: AvlNet.Region
Region of pixels that will not be compared
diagEdgeRegion
Type: AvlNet.Region
Edges projected onto the input image

Description

This filter creates a template structure that can be later used in CompareGoldenTemplate_Intensity filter. This golden template method is especially useful for finding defects like: smudges, noises and dust particles. It can be used for finding missing holes or changes in complex shapes.

Filter finds edges on an image and removes nearby pixels to avoid comparing pixels near edges which may contains some distortions due to shadows or changes in lightning. Input inEdgeDilation defines the width of the quiet zone around the edges and the parameter inEdgeThreshold define how strong must be change of the color between pixels to treat them as an edge.

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