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.

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

5.5 USER SOLUTION: IMAGE AVERAGING WITH<br />

LABVIEW<br />

Don J. Roth<br />

Senior Research Engineer<br />

NASA Glenn Research Center<br />

Cleveland, Ohio<br />

e-mail: don.j.roth@grc.nasa.gov<br />

Many data acquisition processes are besieged by noise, including those that are<br />

image-based. 1 Signal averaging is a simple and popular technique to reduce noise<br />

or increase the signal-to-noise ratio (SNR). SNR is proportional to the square root<br />

of the number of averages. Based on the circular buffer technique, the routines I<br />

present allow the running image average of the most recent x number of images,<br />

with the number being continuously adjustable in real-time, without disruption or<br />

discontinuity of the averaging computation. The advantage of this is that you can<br />

manage the trade-off between noise reduction and the amount of processing in the<br />

time-domain during the test, if so desired. In other words, you can tune to, or “dial<br />

in,” the level of SNR desired while the experiment is running and actually see the<br />

in-situ effect on the image (Figure 5.37).<br />

When dealing with continuous single shot measurements, a one-dimensional<br />

array is needed to hold the collection of point measurements. When dealing with<br />

waveforms, a two-dimensional array is needed to hold the collection of one-dimensional<br />

waveforms. When dealing with images, a three-dimensional array is needed<br />

to hold the two-dimensional image frames. LabVIEW functions (such as initialize<br />

array, array subset and insert into array) need to be expanded to deal<br />

with the different array sizes in each of the averaging schemes, as shown below.<br />

This is achieved by right clicking on the appropriate input terminal of the function<br />

and selecting “add dimension” (Figure 5.38).<br />

<strong>Image</strong> averaging was performed by indexing out the columns of the threedimensional<br />

array and then using the LabVIEW Mean function (from the Mathematics,<br />

Probability and Statistics subfunction palette) on each column (one-dimensional<br />

array) within the three-dimensional array. To better visualize this, consider<br />

each image frame as a checkerboard of squares (pixels). Stack the checkerboards<br />

on top of each other. Now extract out the vertical columns at every location and<br />

calculate the mean of each one. The result is a two-dimensional array of mean values<br />

(or an image average) (Figure 5.39).<br />

The National Instruments Developer Zone shows an example running image<br />

averager using IMAQ Vision functions 2 that operates somewhat differently than the<br />

one presented here. In the National Instruments example, after a speciÞed number<br />

of images are averaged, the averaged image becomes the Þrst image for the new set<br />

of images to be averaged, whereas the routines presented here allow the running<br />

image average of the most recent x number of images.<br />

1<br />

Roth, Don J., LabVIEW Technical Resource, Vol. 8, No. 4, pp. 12–14.<br />

2<br />

NI Developer Zone (http://zone.ni.com/) Example: Real-time <strong>Image</strong> Averaging.vi.

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

Saved successfully!

Ooh no, something went wrong!