Image processing with the radial Hilbert transform: theory and ...

3 downloads 0 Views 602KB Size Report
Jan 15, 2000 - theory and experiments. Jeffrey A. ... The Hilbert transform is useful for image processing because it can select which edges of an input image.
January 15, 2000 / Vol. 25, No. 2 / OPTICS LETTERS

99

Image processing with the radial Hilbert transform: theory and experiments Jeffrey A. Davis, Dylan E. McNamara, and Don M. Cottrell Department of Physics, San Diego State University, San Diego, California 92182

Juan Campos Departamento de Fisica, Universidad Autonoma de Barcelona, 08193 Bellaterra, Spain Received August 18, 1999 The Hilbert transform is useful for image processing because it can select which edges of an input image are enhanced and to what degree the edge enhancement occurs. However, the transform operation is one dimensional and is not applicable for arbitrarily shaped two-dimensional objects. We introduce a radially symmetric Hilbert transform that permits two-dimensional edge enhancement. We implement onedimensional, two-dimensional, and radial Hilbert transforms with a programmable phase-only liquid-crystal spatial light modulator. Experimental results are presented.  2000 Optical Society of America OCIS codes: 120.2440, 100.0100, 230.3720, 070.0070, 200.3050, 230.6120.

The Hilbert and fractional Hilbert transform spatial filtering operations are useful in image processing because they can selectively emphasize features of an input object. The Hilbert transform1 forms an image that is edge enhanced relative to the input object, whereas the fractional Hilbert transform2 – 4 changes the nature of the edge enhancement. First the right-hand edges (which have a negative slope) of the input object are emphasized. Then both edges are emphasized, and finally the left-hand edges (which have a positive slope) are emphasized. However, this operation is one dimensional: It enhances edges along only a single direction. Here we introduce a radially symmetric version of the Hilbert transform that permits two-dimensional edge enhancement of arbitrarily shaped objects. We also present a simple experimental technique for implementing the Hilbert transform operation with a programmable phase-only liquid-crystal spatial light modulator (LCSLM). First we review the theory. We assume that an input image g共x, y兲 is presented to a 4f optical Fourier transform correlator. The first half of the system forms the Fourier transform G共u, v兲 of the input function. Here u and v are the spatial frequency variables. The Fourier transform is then multiplied by a Hilbert transform mask function H 共u, v兲. Finally the product G共u, v兲H 共u, v兲 is again Fourier transformed to yield a modified output func˜ tion g共x, y兲 that represents the convolution between the input function g共x, y兲 and the Hilbert function h共x, y兲 as ˜ g共x, y兲 苷 g共x, y兲 ⴱ h共x, y兲 ,

where S共u兲 represents the step function and the parameter P represents the fractional order of the Hilbert transform. When P 苷 1, this mask reduces to the classic Hilbert transform mask H1 共u兲. Note the symmetry of these masks: Each point on the left half of the filter plane has a phase of 2P p兾2, and each point on the right half of the filter has a phase of P p兾2, as shown in Fig. 1(a). Previously4 we showed how to rewrite this filter function as HP 共u兲 苷 cos共P p兾2兲 1 i sin共P p兾2兲sgn共u兲 ,

(3)

where sgn共u兲 represents the signum function. With this filter, the output of the spatial filtering operation is the sum of two terms as ˜ g共x, y兲 苷 g共x, y兲cos共P p兾2兲 1 i兵关g共x, y兲兴 ⴱ 共1兾ipx兲其 3 sin共P p兾2兲 ,

(4)

where the Fourier transform of the signum function is given by 1兾ipx. Therefore the output of the spatial filtering operation will be the superposition of a copy of the original function g共x, y兲 with a version of the input

(1)

where h共x, y兲 is the Fourier transform of the Hilbert function H 共u, v兲 and ⴱ represents the convolution operation. The one-dimensional fractional Hilbert transform mask function HP 共u兲 of order P is def ined as HP 共u兲 苷 exp共iP p兾2兲S共u兲 1 exp共2iP p兾2兲S共2u兲 , (2) 0146-9592/00/020099-03$15.00/0

Fig. 1. (a) One-dimensional Hilbert mask. Gray levels represent different phase values. ( b) Radial Hilbert mask. Gray levels represent different phase values for P 苷 1.  2000 Optical Society of America

100

OPTICS LETTERS / Vol. 25, No. 2 / January 15, 2000

Fig. 2. Imaginary component of h1 共r, u兲 along the x axis. The real component vanishes along this axis. The horizontal axis is in units of lf 兾2R.

function that is convolved with the Fourier transform of the signum function. The relative sizes of the two contributions will depend on the parameter P and will change as the fractional order of the Hilbert transform changes. However, edge enhancement occurs only in the x direction for the example discussed above. If the valuable features of the object are oriented in a different direction, the edge enhancement will be smeared. We can create two-dimensional masks by forming the product of two Hilbert masks as HP 共u兲HQ 共v兲. However, these masks also retain the basic x, y symmetry. We can maintain the basic idea of the Hilbert mask and avoid the x, y symmetry by making a radial mask in which opposite halves of any radial line have a relative phase difference of P p rad, as shown in Fig. 1(b). Therefore for each radial line we have the equivalent of a one-dimensional Hilbert transform of order P , which we can obtain by writing a radial Hilbert phase mask HP 共r, u兲 as HP 共r, u兲 苷 exp共iP u兲 ,

by x 苷 kRr兾f , where R is the radius of the aperture, k is the wave vector for the light, and f is the focal length of the Fourier-transform lens. Figure 2 graphs h1 共r, u兲 along the x axis, where it is completely imaginary. The first maximum occurs at r 苷 0.78lf 兾2R. At other angles in the 共r, u兲 plane this function is multiplied by an angular phase factor exp共iu兲 and becomes completely real along the vertical axis. However, the odd radial symmetry of this function makes it ideal for edge enhancing of objects that have arbitrary shape. The higher-order Hankel functions also produce edgeenhancing effects, but the edges are wider. We can implement the desired masks by using our LCSLM. In our experimental setup the 514-nm output from an air-cooled argon laser was sent through a focusing lens with a focal length of 36.8 cm and illuminated an input object consisting of either a slit (with a width of 200 mm) or a circular aperture (with a diameter of 300 mm). The LCSLM was placed in the Fourier plane of the lens where the diffraction pattern of the input object was formed. The image of the object was formed with a magnif ication of approximately 43 by use of a second lens with a focal length of 36.8 cm placed behind the LCSLM. The image was detected with either a one-dimensional linear diode array or a CCD camera.

(5)

where the variables 共r, u兲 represent polar coordinates on the plane of the spatial light modulator and P represents the order of the radial Hilbert transform. Using this filter, we obtain the output of the spatial filtering operation as ˜ g共x, y兲 苷 g共x, y兲 ⴱ hP 共r, u兲 ,

(6)

where the Fourier transform of the radial Hilbert mask HP 共r, u兲 is the Hankel transform function hP 共r, u兲 of order P .5 This convolution results in an edgeenhanced version of the input object that depends on the order of the Hankel transform function. The Hankel functions are diff icult to describe mathematically. We concentrate on the P 苷 1 case because it provides the narrowest edge-enhancing operation. The Fourier transform of the mask function in Eq. (5) for P 苷 1 is given as a sum of Bessel functions5 as h1 共r, u兲 苷 xJ0 共x兲 1 共px兾2兲 关J1 共x兲H0 共x兲 2 J0 共x兲H1 共x兲兴 , (7) where J0 and J1 are Bessel functions of zero and first orders and H0 and H1 are Struve functions of zero and first orders, respectively.6 The parameter x is given

Fig. 3. Output when a one-dimensional slit is used as the input object. LCSLM programmed with (a) no pattern, ( b) the P 苷 1兾2 Hilbert transform (the right-hand edge is emphasized), (c) the P 苷 1 Hilbert transform (both edges are emphasized), (d) the P 苷 3兾2 Hilbert transform (the left-hand edge is emphasized).

January 15, 2000 / Vol. 25, No. 2 / OPTICS LETTERS

Fig. 4. Output when a circular aperture is used as the input object. LCSLM programmed with (a) no pattern, ( b) the P 苷 1, Q 苷 1 two-dimensional Hilbert transform, (c) the P 苷 1 radial Hilbert transform, (d) the P 苷 1兾2 radial Hilbert transform.

The LCSLM in the filter plane is a proprietary parallel-aligned active matrix nematic LCSLM7,8 manufactured by Seiko Epson and with high resolution 共640 3 480 pixels兲 on a 3.3-cm diagonal display. The pixel spacing is 42 mm, and the thickness of the pixels is 4.5 mm. The LCSLM acts as an electrically controllable wave plate with a voltage-dependent phase shift d共V 兲. Using the argon-laser wavelength of 514 nm yields a phase-shift range that exceeds 2p rad as a function of gray level. First we examined the one-dimensional fractional Hilbert transform, using a slit as the input object. The image of the input slit is shown in Fig. 3(a). We programmed the LCSLM with the one-dimensional mask function HP 共u兲 given by Eq. (2). In these experiments, half of the LCSLM was programmed with one phase value and the other half was programmed with the other phase value. Figures 3(b), 3(c), and 3(d) show experimental results for P 苷 1兾2, 1, 3兾2, respectively. Experimental results agree perfectly with theory, showing the selective edge enhancement discussed earlier.2 – 4 We next examined the two-dimensional Hilbert transform, using the circular aperture as the input object. Figure 4(a) shows the image of the input object. We applied a two-dimensional mask written as HP 共u兲HQ 共v兲, where u and v are the two-dimensional coordinates on the spatial light modulator. The orders of the two orthogonal Hilbert transforms are P and Q.

101

Figure 4(b) shows the results when P 苷 Q 苷 1. Note that the edges are not evenly enhanced because the symmetry of the object does not match the symmetry of these two-dimensional masks. Next we tried the new radial Hilbert mask as described in Eq. (5). Figure 4(c) shows the results of using a radial Hilbert mask for P 苷 1. Now the entire object is uniformly edge enhanced, regardless of the orientation of the edges. Finally we tried a fractional radial Hilbert mask where P 苷 1兾2, and the results are shown in Fig. 4(d). The resultant image is shadowed: The lower portion of the image is brighter than the upper portion. We can change the orientation of the shadowing by rotating the phase mask on the LCSLM. This fractional operation might be of interest for imaging of phase-only objects and will be examined in the future. In conclusion, we have shown that the Hilbert transform can easily be implemented with a phaseonly LCSLM. We experimentally demonstrated onedimensional Hilbert transforms and introduced a new radial Hilbert transform that permits edge-enhanced images of arbitrarily shaped input objects. This radial Hilbert operator is actually equivalent to the generalized Hankel transform. We expect these results to be useful in image processing applications. We thank Tomio Sonehara of Seiko Epson Corporation for the use of the LCSLM in these experiments. We also thank the reviewers for their helpful insights. J. A. Davis’s e-mail address is jdavis@ sciences.sdsu.edu. References 1. R. B. Bracewell, The Fourier Transform and Its Application (McGraw-Hill, New York, 1965), Chap. 12. 2. A. W. Lohmann, D. Mendlovic, and Z. Zalevsky, Opt. Lett. 21, 281 (1996). 3. A. W. Lohmann, E. Tepichin, and J. G. Ramirez, Appl. Opt. 36, 6620 (1997). 4. J. A. Davis, D. E. McNamara, and D. M. Cottrell, Appl. Opt. 37, 6911 (1999). 5. A. Jaroszewicz and A. Kolodziejczyk, Opt. Commun. 102, 391 (1993). 6. M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions (Dover, New York, 1970), p. 480. 7. T. Sonehara and J. Amako, in Spatial Light Modulators, G. Burdge and S. Esener, eds., Vol. 14 of OSA Trends in Optics and Photonics Series (Optical Society of America, Washington, D.C., 1997), pp. 165–168. 8. J. A. Davis, P. S. Tsai, D. M. Cottrell, T. Sonehara, and J. Amako, Opt. Eng. 38, 1051 (1999).

Suggest Documents