Two pass – Rockwell Automation 5370-CVIM2 Module User Manual

Page 291

Advertising
background image

5

Chapter

Chapter 7

Inspection Tools

7–53

Some morphology functions can create artifacts along the border of the
window. When two pass is used, the first pass actually processes additional
pixels around the border of the window. The second pass runs within the
border of the window to compute the result, which is unaffected by the
border artifacts. Thus, two pass can provide more accurate results, but it runs
slower.

Two Pass

is active only when a destination buffer is assigned to a window

in the toolset edit panel (such as “

Proc1

,” as shown in Figure 7.24, page

7–27). The destination buffer stores the results of the first image processing
pass, which the window then uses for the second image processing pass.

Figure 7.47 (page 7–54) provides an example that illustrates using

Two

Pass

to eliminate a white ring of pixels inside the border of a circular

window. This ring is the result of morphology operations performed in the
first image processing pass.

The example shows a circular window using the white pixel counting
operation and the two morphology stages (

Morph 1

and

Morph 2

).

Figure 7.47 (A) and (B) illustrate the results of applying MAX–MIN,
followed by binary dilations, to the image. The result of this morphology
processing shows the edges of the cross plus a ring of white pixels around the
edge of the window that are a side effect of the morphology processing.

If just one pass were used, the ring of pixels would remain inside the circular
window, and the window would count them along with the pixels in the
cross. The result would be, in this case, a “nominal” value of 10617 (not
shown), which is the sum of the pixels in the ring and the cross. This is an
inaccurate and unrepresentative pixel count for the purposes of the
inspection.

By using

Two Pass

, however, a second pass will exclude the ring of pixels,

as shown in Figure 7.47 (C), and count only the pixels in the cross. In this
case, the “nominal” value is 3711 pixels, which represents the pixel count in
the cross.

Two Pass

Advertising