Create a model to be used with CompareGoldenTemplate2 filter.
|inImages||ImageArray||List of input images that has to be uniform in terms of size and format.|
|inDownscale||Integer||1 -||Shrink the input for processing by dividing by specified value. Reduces sensitivity to minuscule (pixel-size) defects. Greatly improves processing speed.|
|inMaxDisplacement||Integer||0 -||Error in object positioning. If in doubt, it is better to set this value too high. If set too low, subtle defects won't be detected, or no defects may not be detected at all. High values may impair detection of small defects, especially near edges.|
|inLargeDefectSize||Integer||0 -||Expected size (diameter) of largest, extensive defects.|
|inBrightnessAugmentation||Integer||Allows for greater (additional to the value inferred from inImages training set) brightness deviation in inspected images.|
|inNoiseAugmentation||Integer||Allows for greater (additional to the value inferred from inImages training set) noise presence in inspected images. Uses an uniform noise with specified distribution width.|
|inSmoothingAugmentationStdDev||Real||0.0 -||Allows for greater (additional to the value inferred from inImages training set) image smoothing in inspected images. Uses gaussian smoothing with specified standard deviation.|
This filter creates a template that can be later used in CompareGoldenTemplate2 filter.
Multiple images (at least 3, however it is recommended to use at least 5) of inspected object are required to properly create the model. Also, the filter expects the object to be positioned precisely. The positioning of inspected object can be achieved in Adaptive Vision Studio by using following filter sequence.
Please note, that it is recommended to enable the scale adjustment in AdjustPathArrayToEdges filter. It is also required to set the inScaleMode to AlignedScale in CropImageToRectangle filter, as all input images for Golden Template model creation need to have the same dimensions.
The filter also requires an object mask - pixels outside this mask won't be taken into consideration, however when object is visible against an uniform and constant background it is recommended to include some of the background in order to improve defect detection near the object edges.
It is important to set the inMaxDisplacement parameter properly, which describes the object positioning error, in pixels. If it is set too low, subtle defects won't be detected, or no defects may not be detected at all. On the other hand, high values may impair detection of small defects, especially near edges.
The augmentation could be used when it is known that images subjected to inspection will be different in some specific manner from the training image set. Namely, inBrightnessAugmentation is to be used when inspected images could differ in brightness from the training set, inNoiseAugmentation - for noise content difference and inSmoothingAugmentationStdDev - when inspected images could be blurred w.r.t the training set. Note, that it is always better to obtain a representative training set than to use augmentation parameters. Also note, that the overall sensitivity of the defect detection is governed by CompareGoldenTemplate2 filter sensitivity parameters.
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
|DomainError||inImages - inObjectMask dimensions differ in CreateGoldenTemplate2.|
|DomainError||inImages array must contain at least 3 different images of the object, 5 is recommended in CreateGoldenTemplate2|
|DomainError||Input image dimensions differ in CreateGoldenTemplate2.|
|DomainError||Input image formats differ in CreateGoldenTemplate2.|
This filter is available on Basic Complexity Level.
- CompareGoldenTemplate2 – Compares an image with a multi-image model using an ensemble of image features approach.