Image Processing For Everyone
Image Processing For Everyone
Image Processing For Everyone
1
2 LabVIEW applications, which run at compiled execution
speeds. Another advantage of LabVIEW is the
LabVIEW (Laboratory Virtual Instru- fact that it includes built in applications, such as
ment Engineering Workbench) is a graphical the IMAQ Vision for image processing. IMAQ
programming language used as a powerful and Vision includes more than 400 imaging
flexible instrumentation and analysis software functions and interactive imaging windows and
system in industry and academia. LabVIEW utilities for displaying and building imaging
uses a graphical programming language - G to systems. IMAQ Vision gave us the opportunity
create programs called Virtual Instruments or VI to create examples for all the important
(pronounced vee-eye) in a pictorial form called a functions in image processing, and use them for
block diagram, eliminating a lot of the educational purposes. [3] provides information
syntactical details of other programming on IMAQ Vision.
languages like C and MATLAB that use a text
based programming approach. LabVIEW also 3 Visualization modules
includes many tools for data acquisition,
analysis and display of results. The analysis The front panel provides an excellent
library contains a multitude of functions in intuitive graphical user interface (GUI) to vary
signal generation, signal processing, filtering various parameters in the algorithm. These
and statistics. LabVIEW is available for all the GUIs resemble the controls on many
major platforms and is easily portable across instruments and provide a user-friendly
platforms. Each VI contains 3 parts: interface (hence the name Virtual Instrument).
1) The front panel contains the user interface We have developed a wide range of VI’s
like knobs, push buttons, graphs and many other that can be used in conjunction with class
controls (inputs) and indicators (outputs). Inputs lectures. In this section, we describe few of the
can be fed using the mouse or the keyboard. Fig LabVIEW VIs that we developed. The reader
1a shows a typical front panel. can download other VI’s from:
2) The block diagram shown in Fig 1b is the http://pineapple.ece.utexas.edu/class/ee371r/Mo
VI’s source code constructed in G and is the dules/demos.htm. [4] provides detailed
actual executable program. The block diagram information on how the VI s were created.
has other lower-level VIs and built in functions.
The blocks can be connected using wires to 3.1 Analog to digital conversion
indicate the dataflow. Front panel objects have
corresponding terminals on the block diagram to Sampling and quantization help to
allow dataflow from the user to the program and transform the continuous domain image into a
back to the user. digital format. The effects of sampling and
3) Sub-VIs are analogous to subroutines in quantization can be visualized effectively with
conventional programming languages. the following two VI’s. This is a basic concept
[1] provides an introduction to that must be understood by any practitioner in
LabVIEW. [2] provides more information on any field utilizing digital images.
LabVIEW. In some applications such as image
processing, execution speed is critical. 3.1.1 Quantization
LabVIEW is the only graphical programming The Quantization VI (front panel in Fig
system with a compiler that generates optimized 2a) demonstrates the effects that different
code with execution speeds comparable to quantization levels have on images. This VI
compiled C programs. Thus, LabVIEW has the reads in an 8-bits/pixel image and creates an
ability to create stand-alone executable output image whose number of bit levels is
2
specified by the input parameter Number of bits. Dilation, Erosion, Open, Close, Open-Clos, and
The user has the options to create images that Clos-Open. The user has the option to test all
have 1, 2, 4, or 8 bit levels. Fig 2b shows the the above morphological operations on an
effects of quantization. image, and also to modify the type and size of
the structuring element. The Morphology VI
3.1.2 Sampling allows the following structuring element types:
To demonstrate the effects that different Row, Column, Square, Cross, and X-Shape.
sampling rates have on images, we created the
Sampling VI whose front panel shown in Fig 3.3 Histogram and point operations (Grayscale)
3a. While there is a mathematical theory of
sampling, the intuitive aspects of sampling can We developed VIs that perform linear
be understood by a diversity of users by visual (offset, scaling and full-scale contrast stretch)
observation of its effects. This VI reads in an and non-linear (logarithmic range compression)
image and sub-samples it to the user-specified image point operations. The VI for a linear point
size. The user has the option to sub-sample the operation is shown in Fig 4a. The user has the
image to the sizes of 256*256, 128*128, 64*64, option to perform the offset and scaling
and 32*32, using our VI. Fig 3b shows the sub- operations or to perform a full scale contrast
sampling of the input image to the specified stretch operation on an input image. The
size. The sub-sampled image is scaled to the histograms of the input image and the image
size of the input image, by duplicating columns after the linear point operation are also
and rows of the sub-sampled image. In this displayed in the front panel in the Histogram
image, we can see the effects that sampling has and New Histogram Waveform Graph
on images. The effects of sampling become indicators. Effects of linear point operations on
more pronounced when the sampling rate is an image are shown in Fig 4b.
decreased. Aliasing effects can be demonstrated
when severe undersampling occurs. 3.4 Image analysis (Frequency interpretations)
3
with its low frequencies clustered together at the The other VI s developed includes linear and
center of the image or not. It is also the case non-linear filtering, image compression schemes
that the low-amplitude frequencies in the and a large number of edge detectors. We have
magnitude of the DFT will be hard to see, thus it presented the simplest ones here for the purpose
is best to logarithmically compress the DFT of illustration.
magnitude prior to display. An option is given
again for displaying the log compressed or 4 Conclusions
uncompressed magnitude of the DFT. This is
specified by the Compr/Uncompr input In this paper, we gave an overview of
parameter of the front panel. Fig 5b shows an Digital Image Processing education at UT-
image and the magnitude and phase of the DFT. Austin. We describe the use of powerful
visualization tools developed using LabVIEW
3.4.2 Directional DFTs for image processing. An overview of
When the DFT of an image is brighter LabVIEW and a few of the demonstrations
along a specific orientation, the image contains developed were provided.
highly oriented components in that direction.
Suppose that we define several oriented zero- 5 References
one images. Masking the DFT with these
images will produce IDFT images with only 1. Lisa K. Wells and Jeffrey Travis, "LabVIEW for
highly-oriented frequencies remaining. To Everyone, Graphical Programming made even
easier," Prentice Hall, 1997.
demonstrate this effect, we implemented the 2. ___,"Labview User Manual," National Instruments,
DFT Direction VI. The input parameters, Theta 1996.
1 and Theta 2, to this VI, are used as the starting 3. ___, "BridgeVIEW and LabVIEW IMAQ Vision for G
and final angles (in degrees) respectively, of the reference manual," National Instruments, 1996.
black region in the mask images as it can be 4. George C Panayi, "Implementation of Digital Image
Processing functions using LabVIEW," Master’s
seen from the “Circle” illustration in the front thesis, UT-Austin 1999.
panel in Fig 6a. Results of DFT masking are
shown in Fig 6b.
4
Fig 2a: Front panel for Quantization Fig 2b: Original (left), Quantized(right)
5
Fig 5a: Front panel for DFT