CompareGoldenTemplate_Intensity
Compares an image with a template image considered to have no defects.
Applications:Finding general object defects by analyzing brightness deviations from a template image.
Syntax
C++
C#
Python
def CompareGoldenTemplate_Intensity( inImage: Image, inGoldenTemplate: GrayGoldenTemplate, outDefects: Region, outDifferenceRegion: Region, outEdgeRegion: Region, /, *, inGoldenTemplateAlignment: CoordinateSystem2D | None = None, inMaxDifference: float = 20.0, inMinDefectRadius: int = 1, outObjectPosition: Rectangle2D | None = None ) -> outDefectsPresent: bool
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inImage | Image | Input image | ||
![]() |
inGoldenTemplate | GrayGoldenTemplate | Golden gray template containing image of an object with no defects | ||
![]() |
inGoldenTemplateAlignment | CoordinateSystem2D | None | None | Adjusts the golden template to the position of the inspected object | |
![]() |
inMaxDifference | float | 0.0 - ![]() |
20.0 | Maximal allowed difference between corresponding pixels of the input and golden images |
![]() |
inMinDefectRadius | int | 0 - ![]() |
1 | Minimal radius of a defect |
![]() |
outDefects | Region | Region of detected defects | ||
![]() |
outDifferenceRegion | Region | Region of pixels differing too much between the golden image and the input image | ||
![]() |
outDefectsPresent | bool | Flag indicating whether any defects were detected | ||
![]() |
outEdgeRegion | Region | Region of pixels that will not be compared | ||
![]() |
outObjectPosition | Rectangle2D | None | None | Position of the object being compared |



