Download Image Processing with LabVIEW and IMAQ Vision

Transcript
162
IMAGE Processing with LabVIEW and IMAQ Vision
Figure 4.14. Diagram of Exercise 4.3
Exercise 4.5 compares the IMAQ function with a self-constructed one:
Exercise 4.5: BCG Look-up Table. The IMAQ function IMAQ BCGLookup modifies
the image by changing the values of brightness, contrast, and gamma. Create a VI
that does the same with a manually generated LuT.
Figure 4.17 shows a possible solution; Figure 4.18 shows the diagram. I did only the
brightness and the contrast adjustment; the realization of the gamma coefficient is
left for you.
Spatial Image Filtering
As the word filtering suggests, most of the methods described in this section
are used to improve the quality of the image. In general, these methods calculate new pixel values by using the original pixel value and those of its neighbors. For example, we can use the equation
sout (x, y) =
m−1
1 m−1
sin (x + k − u, y + k − v) · f (u, v)
2
m u=0 v=0
,
(4.12)
which looks very complicated. Let’s start from the left: Eq. (4.12) calculates
new pixel values sout by using an m × m array. Usually, m is 3, 5, or 7; in most