Back to Aurora Vision Studio website

You are here: Start » Filter Reference » Computer Vision » Image Analysis » CreateGoldenTemplate_Edges


Module: FoundationPro

Creates golden template for application in CompareGoldenTemplate_Edges filter.

Name Type Range Description
Input value inTemplateImage Image Template image containing an object with no defects
Input value inTemplateArea Rectangle2D* Desired area to compare
Input value inMask Region* Range of pixels to compare
Input value inTemplateAreaAlignment CoordinateSystem2D* Alignment of template bounded by inTemplateArea
Input value inStdDevX Real 0.0 - Amount of horizontal smoothing used by the edge filter
Input value inStdDevY Real* 0.0 - Amount of vertical smoothing used by the edge filter (Auto = inStdDevX)
Input value inEdgeThreshold Real 0.0 - Sufficient edge strength; edges of that strength will always be detected on the template image
Input value inEdgeHysteresis Real 0.0 - Value by which the edge threshold is decreased for edge points neighboring with sufficiently strong edges
Output value outGoldenTemplate EdgeGoldenTemplate The output golden template structure
Diagnostic input diagCroppedImage Image Cropped image to be analyzed
Diagnostic input diagCroppedEdges Region Edges found on the cropped image
Diagnostic input diagEdges Region Edges projected onto the input image


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.


  • A golden template comparison filter should be preceded with filters finding the object in certain location. Most typically we do this with LocateSingleObject_Edges1 filter.
  • Connect the inTemplateImage input with the image containing the perfect object.
  • Set inEdgeThreshold, inEdgeHysteresis, inStdDevX and inStdDevY as in DetectEdges_AsRegion filter. These will control detection of the edges used for object comparison.


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.

Complexity Level

This filter is available on Basic Complexity Level.

Filter Group

This filter is member of CreateGoldenTemplate filter group.

See Also

  • CompareGoldenTemplate_Edges – Compares image edges with the edges of a perfect template. Significant differences are considered defects.