17.12.2018 Views

Image Acquisitionand Proces

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

5.8 FILTERS<br />

<strong>Image</strong> Þlters are routines that either suppress or enhance data to meet a particular<br />

speciÞed criterion. Typical Þlter uses include high contrast area enhancement, edge<br />

detection and smoothing.<br />

The two general types of Þlters that you may come across are linear (often referred<br />

to as a convolution) and nonlinear. Linear Þlters are designed to recalculate the value<br />

of the PUI based on its original value and the values of those surrounding it. This<br />

convolution often weights the effect surrounding pixels have on the PUI, usually with<br />

respect to their distance from it (these weightings are reßected in the coefÞcients of<br />

the convolution kernel). An example convolution kernel is shown below:<br />

0 0 0<br />

0 1 0<br />

0 0 0<br />

The effect of this convolution kernel (hereafter referred to as the Þlter) is nothing.<br />

The recalculated value of the PUI is 1 time its original value, added to 0 times the<br />

values of those around it. A more useful example is:<br />

0 1 0<br />

1 1 1<br />

0 1 0<br />

This Þlter changes the value of the PUI to 1 time its original value, plus the sum<br />

of the North, East, South and West pixel values. Note: unless the intensity values<br />

of the used surrounding pixels are zero, the PUI’s value will become higher<br />

(brighter). If the PUI or its surrounding pixels’ intensities sum to a value higher<br />

than the maximum permitted for the image, intensity clipping will occur. A 256<br />

level grayscale image example using the above Þlter could be:<br />

122 127 125 0 1 0<br />

119 120 123 Æ 1 1 1 Æ 607<br />

115 118 120 0 1 0<br />

<strong>Image</strong> Data Filter New PUI Value<br />

As an intensity value of 607 is forbidden in a 256 level image, the new PUI<br />

value will be clipped to 255 (white), which does not reßect the true nature of the

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

Saved successfully!

Ooh no, something went wrong!