CompareGoldenTemplate_Edges


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

Applications:Finding general object defects by analyzing missing or excessive edges.

Syntax

C++
C#
Python
 
def CompareGoldenTemplate_Edges(
	inImage: Image,
	inGoldenTemplate: EdgeGoldenTemplate,
	inGoldenTemplateAlignment: CoordinateSystem2D,
	outDefects: Region,
	outMissingEdges: Region,
	outExcessiveEdges: Region,
	/,
	*,
	inStdDevX: float = 2.0,
	inStdDevY: float | None = None,
	inEdgeThreshold: float = 35.0,
	inEdgeHysteresis: float = 15.0,
	inMaxDistance: int = 3,
	outImageEdges: Region | None = None,
	outGoldenEdges: Region | None = None,
	outMatchingEdges: Region | None = None,
	outObjectPosition: Rectangle2D | None = None
)
-> outDefectsPresent: bool

Parameters

Name Type Range Default Description
Input value inImage Image Input image
Input value inGoldenTemplate EdgeGoldenTemplate Golden edge template containing image with no defects
Input value inGoldenTemplateAlignment CoordinateSystem2D Adjusts the golden template to the position of the inspected object
Input value inStdDevX float 0.0 - 2.0 Amount of horizontal smoothing used by the edge filter
Input value inStdDevY float | None 0.0 - None Amount of vertical smoothing used by the edge filter (Auto = inStdDevX)
Input value inEdgeThreshold float 0.0 - 35.0 Sufficient edge strength; edges of that strength will always be detected on the input image
Input value inEdgeHysteresis float 0.0 - 15.0 Value by which the edge threshold is decreased for edge points neighboring with sufficiently strong edges
Input value inMaxDistance int 0 - 3 Maximal allowed distance between corresponding edges on the input and golden image
Output value outDefects Region Region of detected defects
Output value outDefectsPresent bool Flag indicating whether any defects were detected
Output value outMissingEdges Region Edges present on the golden image that are missing on the input image
Output value outExcessiveEdges Region Edges that are not present on the golden image
Output value outImageEdges Region | None None Edges on the input image
Output value outGoldenEdges Region | None None Edges on the golden image
Output value outMatchingEdges Region | None None Golden edges present on the input image
Output value outObjectPosition Rectangle2D | None None Position of the object being compared