image Comparison tool
The Image Comparison Tool allows you to compare the current image to a specific
template image. Each "Template" is correlated against the trained feature. The
correlation score returns the readability, i.e. a percentage where 100%
represents a perfectly readable feature. Template matching looks for any print
defects, the total defect area, and the largest defect area.
Methodology Template matching is the process of comparing a trained image to the
current sample image and analyzing the error produced. During the train, the
mean, variation, and threshold images are produced. During the Run, the error
image is produced.
Left-clicking the Image Comparison button will run the tool according to the
current settings.
Right-clicking on the Image Comparison button will display the edit menu:
Selecting Edit
will bring up edit boxes that will allow you to make various
adjustments. Select the blue arrow on the upper right to scroll
through the various selections. The blue arrow in the upper left
will bring you back to the previous selection.
The
Template page allows control of the parameters affecting the training of the
template image. When training the template, we are creating the threshold image.
The threshold image is comprised of the variation image. Where: Threshold =
Offset (0-255) + Variation Constant /10 * Variation Image
Train Settings--
Offset (Threshold): The maximum constant noise allowed in judging a
character in greylevels (0-255)
Variation: Constant by which to multiply the variation image. The constant
is divided by 10.
Method: The Variation Image can be calculated by one of 3 methods
Variation- The Variation Image is the difference between the
brightest pixels and the darkest pixels. This method requires statistical
training where, in the set of images captured, the greatest variation is sorted.
Thin Edge- Uses edge detection to determine the edge pixels. These
edge pixels form the variation image; thus, the edges are assumed to be the
areas with the greatest tolerance for print defects.
Thick Edge- Uses thick edge detection to determine the "variation" image.
This is like the thin edge method except with a greater tolerance for print
defect on the edges. NOTE: Edge Variation Image does not require multiple images
for the training set. A single image is used to calculate the variation image.
Run Settings--
When running the template, we are creating the error image. The error
image is calculated as: Error = Absolute(sample – mean) - Threshold
Normalization: The process by which the
current sample image brightness is adjusted to the trained image brightness.
Hence, this allows compensation for differing light levels and for the setting.
Off- No normalization is carried out
On (Destructive)- The current sample image is adjusted so that its intensities
match the trained sample. The current sample image pixel data is modified.
On (Non Destructive)- The current sample image is copied before it is adjusted.
All further analysis is carried out on the copied modified sample image.
Minimum Defect Level (Noise): Defects smaller than this defined size (in
pixels) are ignored.
Image Display--
As a utility to the operator this shows the different images in the trained
template. Displayed can be the
Mean-The mean image
Minimum- The darkest pixels in the training set
Maximum- The brightest pixel in the training set
Variation- The Variation Image
Threshold- The threshold Image
Error- The Calculated Error Image
The
Correlation page allows control of the comparison.
Location method: Used to define the search area.
Off- Search area if whole image.
At Trained Position-Uses the trained ROI area.
At Current ROI Position- Uses the current ROI as the search area.
Pad Size X/Pad Size Y: The added "pad size" to the trained ROI in pixels
that defines the ROI used to locate the feature in question
Sub Sample X/Sub Sample Y: The correlation does a low pass search for the
model. This low pass search is done before a high pass search is done. The low
pass search speeds up the execution time to find the model.
Retrain: Retrains the Low Pass model only. The Train button programs the low
pass and high pass model. This is useful when adjusting the Sub Sample X and Y
factors and when the image under the current ROI is not used. Hence, retraining
is independent on the current ROI position.
Image Display: Displays the selected image.
Model- Show image of feature being sorted.
Model Low Resolution- Shows how the model looks in low resolution mode.
Result Image- Shows the results of the correlation. This shows while spots.
The
Parameters page shows the results of the tool once run.
Score: The correlation score. 100% is a perfect match
Total Defect Area: The total defect area. These are returned in image units
Largest Defect Area: The Largest Defect Area
Position Misalignment: The misalignment between the trained and current
position
The
Results page shows the result information for each cell that was found when the
template image was compared.
The
Save Options page allows selection of the items to be reported.
Selecting Train will allow you to train the current image
underneath the region of interest rectangle as the template image to be used for
comparison.