Rockwell Automation 5370-CVIM2 Module User Manual

Page 460

Advertising
background image

5

Chapter

Chapter 8

Thresholds, Filters, and Morphology

8–21

Here are the gray scale morphology functions shown in the

Function

selection panel, along with a brief description of each:

Identity –– This operation performs no filtering effect on the image. It is
equivalent to making the gray scale morphology inactive.

MIN –– This function uses only the selections in the

Min

boxes. The

result is the minimum of the neighbors enabled in the

MIN

kernel.

When the

Min

kernel is fully configured with asterisks, the

Min

function

is analogous to the binary erosion function, in the sense that it makes
bright objects smaller (and dark objects larger).

MAX –– This function uses only the selections in the

Max

boxes. The

result is the maximum of the neighbors enabled in the

MAX

kernel.

When the

Max

kernel is fully configured with asterisks, the

Max

function

is analogous to the binary dilation function, in the sense that it makes
bright objects larger (and dark objects smaller).

MAX – MIN –– This function uses the selections in both the

Min

and the

Max

boxes. It is used to detect edges, and it smoothes the image slightly.

(MAX + MIN) / 2 –– This function uses the selections in both the

Min

and the

Max

boxes. The result value is the average of the

Max

and

Min

selections.

Gray scale morphology processing uses a “kernel” structure to examine each
pixel in the image. The “kernel” structure is represented by a group of seven
boxes, as shown in the gray scale selection panel in Figure 8.13 (page 8–15).
This structure comprises a “neighborhood” of seven pixels.

Each box can contain either an asterisk (*) or a minus sign (–). An asterisk
designates the neighborhood pixels that the morphology processor will
evaluate; a minus sign designates the neighborhood pixels that the processor
will not evaluate.

Figure 8.17 (page 8–22) illustrates the relation of the kernel structure to the
matrix of pixels in the image. The pixel being examined currently is the one
under the “C” (center) box in the kernel structure. (The arrows indicate the
path of the kernel through the image matrix.)

As noted above, the morphology processor evaluates only the neighborhood
pixels under the boxes containing asterisks. It determines (and replaces the
center pixel with) the largest gray scale value of these pixels in the

MAX

kernel. Similarly, it determines (and replaces the center pixel with) the
smallest gray scale value of these neighborhood pixels in the

MIN

kernel.

Advertising