Rockwell Automation 5370-CVIM2 Module User Manual

Page 452

Advertising
background image

5

Chapter

Chapter 8

Thresholds, Filters, and Morphology

8–13

NOTE 1: In this example, the formula,

({back}+{fore})/2

, could have been

entered directly as the third window’s “

Low

” dynamic threshold math

formula, in order to save space. If, however, the formula will be used by
other windows, placing the formula in an intermediate math tool, as shown
by the example, is useful.

NOTE 2: Maximum size of a dynamic threshold formula is 32 characters. If
more characters are needed, use an intermediate math tool, which can hold
up to 128 characters.

NOTE 3: If the formula used to compute the dynamic threshold fails (for
example, it cannot access the specified inspection result), then the tool using
the dynamic thresholding will fail. The tool will also fail if the dynamic
thresholding formula produces an invalid threshold setting (for example, a
negative value, or a value above 255).

Morphology Function

Morphology is a technique for performing image enhancements such as edge
detection, noise removal, and smoothing.

The CVIM2 system has two morphology processors, each of which can
operate in either gray scale or binary mode, as follows:

In gray scale mode, the morphology processor receives gray scale image
data as input. It processes this data and produces a new gray scale image
as its output.

In binary mode, the morphology processor receives binary image data as
input. It processes this data, using up to six operation, and produces a new
binary image as its output.

One example of the utility of morphology is where low contrast exists
between the workpiece features and the thresholded image contains white or
black “noise.”

When you optimize the threshold settings for solid white features, for
example, the black background may show white “noise,” which would
interfere with the counting of the white pixels in the features. In such a case,
you may be able to eliminate the white noise from the black background by
using morphology.

Figure 8.10 (page 8–14) shows a window placed over a workpiece. In this
example, white noise appears in the black background.

Advertising