17.12.2018 Views

Image Acquisitionand Proces

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

144 <strong>Image</strong> Acquisition <strong>Proces</strong>sing with LabVIEW<br />

FIGURE 6.1 Simple morphology — erosion and dilation.<br />

repeated for n colors –1 (i.e., the number of color neighboring couples), and then these<br />

morphed images are weighted back using their respective gray levels (each morphed<br />

binary is typically promoted to the next highest gray level) and recombined into an<br />

image with n colors –1 colors.<br />

6.2 PRACTICAL MORPHOLOGY<br />

Simple dilation, erosion, opening and closing can be easily achieved using either<br />

IMAQ Morphology or IMAQ GrayMorphology 1 (Figure 6.1).<br />

The morphological function performed on the source image in Figure 6.1 was<br />

performed using the code shown in Figure 6.2. Similarly, both opening and closing<br />

FIGURE 6.2 Simple morphology: erosion and dilation — wiring diagram.<br />

can be achieved using the same VIs. As you can see in Figure 6.3, the opening<br />

routine discards the small specular objects around the main object, whereas the<br />

closing routine attempts to include the specular data to the east of the circle,<br />

effectively closing the spaces between the solid object and close outlying objects<br />

(Figure 6.4)<br />

1<br />

These vision routines presume that the object of an image is the brightest section, and the background<br />

is the darkest; therefore, you may need to invert an image before attempting practical morphology.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!