Rockwell Automation 5370-CVIM2 Module User Manual

Page 203

Advertising
background image

Chapter 6

Reference Tools

6–44

In a typical system, small gray value variations or “dithering” may be present
from the following sources:

Thermal “noise” in the camera system.

Fluctuations in the lighting used.

The use of “baseline” compression when the feature image is stored (the
decompressed image used during the search operation may not match the
original image exactly).

Variations in part position.

Variations from part to part.

The “

Ignore

” parameter can be adjusted so that the reference window will

ignore these variations and will recognize as errors only those variations
resulting from actual feature mismatches.

In general, you should set the “

Ignore

” parameter as low as possible,

consistent with the expected variations resulting from dither and other system
causes.

Max. RMS

Pixel Error –– This parameter sets the maximum RMS (root

mean square) error that is acceptable for the purpose of template matching.

During a search operation, the reference window calculates the difference
between the gray value of each pixel in the feature image and the gray value
of each corresponding pixel in the search image. Each difference that is
higher than the “

Ignore

parameter is squared, and all of the squared

differences are then summed for a given feature position. The sum of these
squares is divided by the number of pixels in the feature image, and the
square root of that value is then calculated. The square root is the RMS error
for a particular point in the search operation. A “match” will occur only if the
RMS error is at or below the “

Max. RMS

” parameter.

The reason for using the RMS method of processing pixel errors is that it
more closely approximates the kind of template matching that a human
observer would perform. As one example, if each of the four pixels in a
2–by–2 feature image had a difference of exactly 1 with each corresponding
search image pixel, the RMS error would be 1. As another example, if the
feature image had differences of 0 on three pixels, and 4 on the fourth pixel,
the RMS error would be 2.

To a human observer, the first example would be a closer match than the
second. Generally, a large number of small differences yields a good match,
and a small number of large differences yields a bad match. As these
examples indicate, using the RMS imposes a higher penalty on large pixel
errors than on small pixel errors.

Advertising