Selective edge enhancement using anisotropic vortex filter

2 downloads 0 Views 797KB Size Report
Sep 20, 2011 - amplitude objects using the anisotropic vortex phase mask by ... selective region and in the required direction by changing the power and offset ...
Selective edge enhancement using anisotropic vortex filter Manoj Kumar Sharma,* Joby Joseph, and Paramasivam Senthilkumaran Indian Institute of Technology Delhi, Hauz Khas, New Delhi 110016, India *Corresponding author: [email protected] Received 11 April 2011; revised 22 July 2011; accepted 28 July 2011; posted 3 August 2011 (Doc. ID 145630); published 15 September 2011

In optical image processing, selective edge enhancement is important when it is preferable to emphasize some edges of an object more than others. We propose a new method for selective edge enhancement of amplitude objects using the anisotropic vortex phase mask by introducing anisotropy in a conventional vortex mask with the help of the sine function. The anisotropy is capable of edge enhancement in the selective region and in the required direction by changing the power and offset angle, respectively, of the sine function. © 2011 Optical Society of America OCIS codes: 260.0260, 260.6042, 100.0100, 100.2980.

1. Introduction

Edge enhancement is one of the most fundamental operations in image processing, analysis, recognition, and in machine vision. Because edges play important role in understanding images, one way to enhance the contrast is to enhance the edges. For edge enhancement, optical Fourier transform techniques to filter out appropriate spatial frequency components are usually employed by using spatial light modulators (SLMs) or mechanical spatial filters [1,2]. An optical vortex with topological charge m can be used to perform the mth order Hankel transform [2]. It has been shown by Davis et al. [3] that a vortex phase mask expðimθÞ; 0 < θ < 2π can also be used as a spatial filter in 4f geometry to achieve symmetric edge enhancement with m ¼ 1, and selective edge enhancement can be achieved by tacking a fractional value of m. If the phase profile of the vortex mask is analyzed, it is obvious that there is a phase difference of mπ at a symmetric position in any radial line with respect to the vortex core. Similar characteristics can be seen in the onedimensional Hilbert transform [4–6]. Spiral phase filtering using a spiral phase plate (SPP), which is 0003-6935/11/275279-08$15.00/0 © 2011 Optical Society of America

characterized by function expðimθÞ, is regarded as a radial Hilbert phase mask with m as the order of the radial Hilbert transform. Generally, the edge-enhancing effect is isotropic, particularly when an SPP is used as a radial Hilbert phase mask. In certain applications, it may be preferable to have some edges emphasized more than others. The radial Hilbert transform, which is effectively the vortex spatial filtering, does the edge enhancement by redistributing the intensity. The intensity is redistributed in a symmetric manner because the radial Hilbert mask is symmetric. Therefore, to enhance the selective edges in a particular desired direction, one has to break this symmetry. The methods reported for selective edge enhancement, use the fractional vortex mask [7]. The fractional Hilbert transform [3,8,9] method uses the modified Hilbert transform, in which the phase difference between two radial points on either side of the origin is a fractional multiple of π. In another recent study, Situ et al. [9] have proposed selective edge enhancement using a fractional spiral phase filter with an additional offset angle and by shifting the singularity. In this paper, we demonstrate a new method for selective edge enhancement in any desired direction using the anisotropic vortex phase mask to perform the Hilbert transform. Analytical 20 September 2011 / Vol. 50, No. 27 / APPLIED OPTICS

5279

expressions are derived and are shown for selective edge enhancement. 2. Isotropic and Anisotropic Vortices

In an anisotropic optical vortex, this is not a constant. Consider an anisotropic vortex [11] given by ~ a ðx; yÞ ¼ x þ iσy ¼ r expðiψðx; yÞÞ; V

ð2Þ

Isolated optical vortices are phase singularities characterized by helical wavefronts winding about amplitude zeros where the phase is indeterminate. Around the singularity, the phase variation shows helical structure keeping the singularity at the center. The phase singularity in an optical beam is also known as the optical vortex. Even though the phase singularity exists at the center, it affects the phase distribution over the entire beam [10]. Analytically, an optical vortex can be defined by a complex field

Here, σ is an anisotropy parameter, which determines the internal structure of the optical vortex. The rate of change of phase of the anisotropic vortex is

~ i ðx; yÞ ¼ x þ iy ¼ r expðiθÞ; V

dψ σ ¼ : dθ cos2 ðθÞ þ σ sin2 ðθÞ

ð1Þ

where r is the distance from the vortex center and θ ¼ tan−1 ðy=xÞ is the azimuthal angle. The phase distribution ψðr; θÞ ¼ θ, and the rate of change of the phase around the vortex is given by dψ=dθ ¼ 1

where the phase is given as     y sin θ −1 −1 ψðx; yÞ ¼ tan σ σ ¼ tan : x cos θ

ð3Þ

ð4Þ

The phase profiles, phase plots, and dψ=dθ plots of the isotropic and anisotropic vortices are shown in Fig. 1. It is clear from Eq. (4) and Fig. 1(d) that for an anisotropic vortex, dψ=dθ is a function of θ. This

Fig. 1. (Color online) (a) Phase distribution of isotropic vortex, (b) phase distribution of anisotropic vortex, (c) phase plot for isotropic vortex (σ ¼ 1) and for anisotropic vortex (σ ¼ 5), and (d) rate of change of phase for isotropic and anisotropic vortices. 5280

APPLIED OPTICS / Vol. 50, No. 27 / 20 September 2011

Fig. 2. (Color online) Phase profiles of (a) function S (n ¼ 30) and (b) plot of phase of S (n ¼ 30) as a function of θ.

anisotropic characteristic can provide selective edge enhancement. We have defined an anisotropic vortex function for selective edge enhancement of amplitude objects, given by Sðr; θÞ ¼ exp½iθfj sinn ðθ=2Þjg ¼ expðiψ s Þ:

ð5Þ

Here, ψ S is the phase function corresponding to the anisotropic vortex function Sðr; θÞ. The modulus of the sine functions has been taken to preserve the helical wavefront shape of the vortices, and the parameter n is an integer. We have employed the modulo 2π operation to keep θ always in the interval ½−π; π. In other words, the phase is wrapped between −π and π. The rate of change of phase with respect to θ in our proposed anisotropic vortex functions is

3. Edge Enhancement Using Vortices A. Isotropic Edge Enhancement

The vortex phase mask is called the radial Hilbert phase mask [3] and is defined as Hðr; θÞ ¼ expðiθÞ. The function Hðr; θÞ can be seen as a signum function expressed in polar coordinates. In the conventional Hilbert transform setup, a signum function is used as a filter that retards the negative-frequency components of the object by π while leaving the positivefrequency components intact. The output f 0 ðρ0 ; ϕ0 Þ of the 4f system using the radial Hilbert phase mask Hðr; θÞ is given by the convolution of the input object f i ðρ; ϕÞ and the Fourier transform (FT) of the filter. The input object plane and output plane coordinates are ðρ; ϕÞ and ðρ0 ; ϕ0 Þ, respectively. By ignoring coordinate inversion in the image (output) plane and considering unit magnification in the 4f system, both

i h dψ S  ðn−1Þ n  ¼ sin ðθ=2Þ sinðθ=2Þ þ θ cosðθ=2Þ : ð6Þ dθ 2 Figure 2 shows the phase profile and phase plot of the anisotropic vortex phase mask of Eq. (5). The phase variation as a function of θ is monotonic for the proposed function S, as shown in Fig. 2(b). Figure 3 shows the plots of dψ s =dθ for the proposed function as a function of the azimuthal angle θ. The variation of the phase with the azimuthal angle is not uniform, as shown from the plot of the rate of change of the phase, and this anisotropy in the phase variation is responsible for the selective edge enhancement. On increasing n, the rate of change of the phase becomes steeper, and hence the enhancement becomes more selective. Anisotropy in the vortex can also be introduced by any other function that can give direction selectivity.

Fig. 3. (Color online) Plot of rate of change of phase of function S for n ¼ 10 and n ¼ 30 as a function of θ. 20 September 2011 / Vol. 50, No. 27 / APPLIED OPTICS

5281

input and output plane coordinates can be written as ðρ; ϕÞ f 0 ðρ; ϕÞ ¼ f i ðρ; ϕÞ  hðρ; ϕÞ;

ð7Þ

where hðρ; ϕÞ represents the FT of the radial Hilbert mask function. As the filter function is separable in the polar coordinates; i.e., Hðr; θÞ ¼ gR ðrÞgΘ ðθÞ, the FT is given by [12] hðρ; ϕÞ ¼

∞ X

cp ð−iÞp expðipϕÞHp fgR ðrÞg;

ð8Þ

−∞

where the coefficients of the expansion in Eq. (8) are given as Z 1 2π gΘ ðθÞ expð−ipθÞdθ; ð9Þ cp ¼ 2π 0 and the Hankel transform is given as Z ∞ rgR ðrÞJ 1 ð2πρrÞdr: Hp fgR ðrÞg ¼ 2π

ð10Þ

0

For the vortex phase mask Hðr; θÞ ¼ expðiθÞ, cp is defined for p ¼ 1 only. cp ¼ c1 ¼ 1 and if the mask function is restricted radially from 0 to R, then the Hankel transform in the Fraunhofer zone is given by [13–16] Z R rH R ðrÞJ 1 ð2πρr=λf Þdr H1 fH R ðrÞg ¼ 2π 0 Z R rJ 1 ð2πρr=λf Þdr ¼ 2π 0

πR ¼ ½J ðxÞH 0 ðxÞ − J 0 ðxÞH 1 ðxÞ; 2ρ 1 where x ¼ kRρ=f , f be the focal length of the Fourier transforming lens and k ¼ 2π=λ also J 0 and J 1 are Bessel functions of order 0 and 1, and H 0 and H 1 are Struve functions of the zero and first orders, respectively. Where we have also used [12] Z 2π e−iðp−1Þθ dθ ¼ 2πδ1p : ð11Þ

The filter function and its FT are symmetric. This function hðρ; ϕÞ convolving with the input field yields output. The output intensity jf 0 ðρ; ϕÞj2 is plotted and shown in Fig. 4 to show the edge enhancement using isotropic vortex function. B. Anisotropic Hilbert Mask for Selective Edge Enhancement

In an anisotropic vortex filter, the phase varies in such a manner that it enhances the edges selectively. The anisotropic vortex field used here is Sðr; θÞ and is given by Eq. (5). For the Hilbert transform mask Sðr; θÞ, the corresponding FT is sðρ; ϕÞ. The output of the 4f system will be given by the convolution of the input object with the FT of the filter function; therefore, we analytically obtain the FT of the function Sðr; θÞ below. As the function is separable in the polar coordinates, the FT will be the sum of the weighted Hankel transforms of all possible orders [10,12]. Thus the FT of the function S using Eq. (8) can be written as sðρ; ϕÞ ¼

∞ X

cp ð−iÞp expðipϕÞHp fSR ðrÞg;

ð13Þ

−∞

where Z 1 2π SΘ ðθÞ expð−ipθÞdθ cp ¼ 2π 0 Z 2π 1 n eiθ½j sin ðθ=2Þj−p dθ: ¼ 2π 0

ð14Þ

Now the analytical solution of integral (13) exists only if p ¼ j sinn ðθ=2Þj. The function sinn ðθ=2Þ assumes all values from 0 to 1, whereas p is an integer. The plot of sinn ðθ=2Þ versus θ is shown in Fig. 5, and it shows that the function is close to zero for a certain range of values of θ and close to 1 for the rest of the range of θ values. Hence by approximating

0

Hence, the FT of the filter function is hðρ; ϕÞ ¼ −i expðiϕÞ ×

πR fJ ðxÞH 0 ðxÞ − J 0 ðxÞH 1 ðxÞg: 2ρ 1 ð12Þ

Fig. 4. Simulation results for edge enhancement by isotropic vortex function (a) object, (b) isotropic edge enhancement, and (c) 3D view of (b). 5282

APPLIED OPTICS / Vol. 50, No. 27 / 20 September 2011

Fig. 5. (Color online) Plot of sinn ðθÞ for n ¼ 10 and n ¼ 30.

j sinn ðθ=2Þj to a binary integer valued function, coefficients cp can be found. The value of j sinn ðθ=2Þj is approximated to zero for θ ranging from 0 to θ1 and θ2 to 2π. It is approximated to 1 for θ ranging from θ1 to θ2 . Particularly important thing to note, is that between θ1 and θ2 , we have c1 ≠ 0, and c0 ¼ 0 for other values of θ we have c1 ¼ 0 and c0 ≠ 0 Therefore, for p ¼ j sinn ðθ=2Þj ¼ 0 1 cp ¼ 2π

Z

4. Simulation Results and Discussion 2π

iθðp−j sinn ðθ=2ÞjÞ

e

Orientation- and region-selective edge enhancement is obtained with the help of the proposed function S.

dθ;

0

1 c0 ¼ 2π

R θ1 0

1 dθ þ 2π

R 2π θ2

1 dθ ¼ 2π ð2π þ θ1 − θ2 Þ for 0 < θ < θ1 and θ2 < θ < 2π ; ¼0 otherwise

and for p ¼ 1 1 c1 ¼ 2π

R θ2 θ1

1 dθ ¼ 2π ðθ2 − θ1 Þ ¼0

for θ1 < θ < θ2 : otherwise

ð16Þ

First- and zero-order Hankel transforms with a radial limit from 0 to R can be calculated as Z H 1 fSR ðrÞg ¼ 2π

R

0

Z ¼ 2π ¼

R

0

rSR ðrÞJ 1 ð2πρr=λf Þdr rJ 1 ð2πρr=λf Þdr

πR ½J ðxÞH 0 ðxÞ − J 0 ðxÞH 1 ðxÞ; 2ρ 1

ð17Þ

where x ¼ kRρ=f , f be the focal length of Fourier transforming lens and k ¼ 2π=λ Z H0 fSR ðrÞg ¼ 2π

0

difference (θ2 − θ1 ), which covers the azimuthal region where the FT coefficients are nonzero, i.e., where j sinn ðθ=2Þj is approximated to be 1. Therefore, as shown in Fig. 5 also, on increasing the value of n (θ2 − θ1 ) covers a lesser region, and thus the enhancement selectivity is manifested. The function sðρ; ϕÞ appears in the output as a convolution with the input function and is seen as orientation selective.

R

ð15Þ

Edge enhancement in a smaller region can be achieved by increasing the power n of the sine function. The orientation selection is done by adding θ0 such that Sðr; θÞ ¼ exp½iðθ þ θ0 Þfj sinn ððθ þ θ0 Þ=2Þjg:

ð20Þ

The addition of θ0 rotates the orientation of the radial signum function of the vortex mask; hence, selective edge enhancement in different azimuthal directions is achieved. Moreover, after adding θ0 to θ, the function θ þ θ0 is made to lie between −π and π by the modulo 2π operation. This is done to preserve the helical shape of the wavefront. The helical phase structure of an optical vortex is identical to that of a signum filter; e.g., in the case of the radially symmetric mask function, the amplitude changes sign from þ to − while passing through the vortex core. In other words, the radially symmetric Hilbert mask

rSR ðrÞJ 0 ð2πρrÞdr ¼ xJ 1 ðxÞ: ð18Þ

Hence, substituting Eqs. (15)–(18) in Eq. (13) we can write sðρ; ϕÞ ¼ c0 H0 fSR ðrÞg þ c1 ð−iÞ expðiϕÞH1 fSR ðrÞg: Hence we get sðρ; ϕÞ ¼

ð2π þ θ2 − θ1 Þ ðθ − θ1 Þ xJ 1 ðxÞ − i expðiϕÞ × 2 2π 2π πR × ½J ðxÞH 0 ðxÞ − J 0 ðxÞH 1 ðxÞ; ð19Þ 2ρ 1

where θ1 and θ2 represent the numerical values of the azimuthal angle and x ¼ kRρ=f . The FT sðρ; ϕÞ of the proposed function S depends on the angular

Fig. 6. (Color online) Phase difference between two radially opposite points about the phase singularity for the function S with n ¼ 30 and for an isotropic vortex. 20 September 2011 / Vol. 50, No. 27 / APPLIED OPTICS

5283

Fig. 7. Simulation results of selective edge enhancement for a circular aperture using the anisotropic vortex function S when n is 10. Enhanced edges in different orientations of 0, π=4, π=2, and 3π=4 are shown in (a)–(d), respectively.

Fig. 8. Simulation results to show the effect of increasing n in the function S on the selectivity. (a)–(d) Show that the region of edge enhancement gets narrower when the power n in S is increased by 5, 10, 30, and 50.

Fig. 9. (Color online) Simulation results to show the selectivity with increasing n in 3D plots (a)–(c) and show that the region of edge enhancement decreases when n in S is increased by 5, 10, 30, and 50, respectively.

is the superposition of the signum functions in all possible directions. In the case of our function, the phase difference between two radially opposite directions is not π but varies from 0 to π, and hence we get selective edge enhancement at the positions where the phase difference is π: this is because of the fact that weightage of the Hankel transform is maximum where the signum function exists. The plot of the phase difference in radially opposite positions of the proposed function is shown in Fig. 6. All the simulations have been carried out in the MATLAB platform. It is quite obvious from Fig. 6 that the phase difference in radially opposite directions for the isotropic vortex phase function is π for all orientations, while for anisotropic proposed functions, it is an azimuthally varying quantity. Thus, wherever this difference is π, the edge is enhanced, and at the rest of the orientations there is no such signum formation, and hence the edges are not enhanced. Figure 7 shows the simulation results of edge enhancement at selective angles for a circular aperture, using function S with a fixed value of n. It is clearly visible that in every case, the position of the enhanced region is according to the selected θ0 value. In our simulation, the grid size is taken equal to 600 × 600 pixels and the size of the circular aperture is kept equal to 150 pixels. Figure 8 shows that as the power n in function S is increased, the selective edge 5284

APPLIED OPTICS / Vol. 50, No. 27 / 20 September 2011

enhancement is pronounced. The three-dimensional (3D) plots of the intensity versus azimuthal angle, in Fig. 9, show the angular selectivity of edge enhancement. Increased enhancement at selected orientations is clearly visible. This function is capable of doing the selective edge enhancement for arbitrarily shaped objects. To confirm this, the simulation has been performed by taking a picture of the number 4 as the object, and the results are shown in Fig. 10. 5. Experimental Results

We have implemented the phase masks corresponding to the function S with the help of a reflective SLM (HOLOEYE LC-R 2500) with resolution of 1024 × 768 and pixel pitch of 19 μm. The objects used are a circular aperture of size 200 μm and the number 4 from the resolution chart, of the order of a few hundred micrometers. The experimental setup is

Fig. 10. Simulation results for selective edge enhancement of the number 4 using the anisotropic vortex function S for n ¼ 10, and the angle of rotation is (a) 0, (b) π=4, and (c) π=2.

Fig. 11. (Color online) Experimental setup: SF, spatial filter; L1 , collimator; S, sample stage; M, microscopic objective; L2 , lens to image the FT on the SLM with magnification of 4; SLM, spatial light modulator to display the CGH of the proposed functions in phase mode; L3 , imaging lens; NDF, neutral density filter; CCD, charge-coupled device to record the images after the filtering process.

shown in Fig. 11. The object is illuminated by a collimated beam from an He–Ne laser (632:8 nm) and Fourier transformed with the help of a Newport 10× microscopic objective, and the FT is imaged on the SLM with 4× magnification by a lens of focal length 135 mm. The SLM is operated in phase mode, keeping the polarizer at the angle 170° to get the phase shift up to 2π. The computer-generated hologram (CGH) corresponding to function S is formed and displayed on the SLM. This CGH is a fork grating formed by the interference of the anisotropic vortex beam and a tilted plane wave. The CGH corresponding to the proposed function S is formed in MATLAB keeping the resolution the same as that of the SLM, and the grating period has been kept equal to the six pixels of the SLM. The incident light wave is then diffracted by the fork grating displayed on the SLM, and only the light diffracted at the first diffraction order is used. The undesired diffraction orders are blocked. Imaging is done with help of a lens of focal length 200 mm, kept in between SLM and the Infinity-1 CMOS camera. The images so recorded are shown in Fig. 12 for the number four and in Fig. 13 for the circular aperture. The experimental results using the number 4 as the object are shown for a fixed value of n, while the results for the

Fig. 13. (1) Experimental result: (a) object (b) isotropic edge enhancement. (2) Experimental results for selective edge enhancement for a circular aperture using the sin-anisotropic function S when n is 10, and orientation selection is done by changing θ0 by (a) 0, (b) π=4, (c) π=2, and (d) 3π=2. (3) Experimental results for selective edge enhancement for a circular aperture using the sin-anisotropic function S at a particular angle θ0 ¼ 0 and n is (a) 5, (b) 10, (c) 30, and (d) 50.

selective edge enhancement for the circular aperture as an object are also shown for different values of n. The experimental results are in good agreement of the simulated results. 6. Conclusions

We have proposed a novel technique for selective edge enhancement, capable of selecting a desired region at any required redial direction. The proposed function provides controllable anisotropy, and hence it is possible to edge enhance only the region of interest. Using a high-resolution SLM for displaying the phase masks corresponding to the proposed function S, it is possible to get selective edge enhancement for an object of any arbitrary shape. The FT calculations have been done and are checked by directly taking the convolution of the FT with the object. We have successfully implemented the method for the selective edge enhancement of a circular aperture as well as of the number 4. The method is efficient and useful in image processing when the selective region of the edges of the objects is important. M. K. Sharma thankfully acknowledges the Council of Scientific and Industrial Research (CSIR) of India for a junior research fellowship.

Fig. 12. (1) Experimental result: (a) object (b) isotropic edge enhancement. (2) Experimental results for selective edge enhancement for the number 4, using the anisotropic vortex function S when n is 10, and the orientation selection is done by θ0 equal to (a) 0, (b) π=4, and (c) π=2.

References 1. J. W. Goodman, Introduction to Fourier Optics (Roberts, 2007). 2. S. N. Khonina, V. V. Kotlyar, M. V. Shinkaryev, V. A. Soifer, and G. V. Uspleniev, “The phase rotor filter,” J. Mod. Opt. 39, 1147–1154 (1992). 20 September 2011 / Vol. 50, No. 27 / APPLIED OPTICS

5285

3. J. A. Davis, D. E. Mcnamara, D. M. Cottrel, and J. Campos, “Image processing with the radial Hilbert transform: theory and experiments,” Opt. Lett. 25, 99–101 (2000). 4. R. B. Bracewell, The Fourier Transform and Its Application (McGraw-Hill, 1965). 5. J. A. Davis, D. E. McNamara, and D. M. Cottrell, “Analysis of the fractional Hilbert transform,” Appl. Opt. 37, 6911–6913 (1998). 6. J. A. Davis, D. A. Smith, D. E. McNamara, D. M. Cottrell, and J. Campos, “Fractional derivatives—analysis and experimental implementation,” Appl. Opt. 40, 5943–5948 (2001). 7. A. W. Lohmann, D. Mendlovic, and Z. Zalevsky, “Fractional Hilbert transform,” Opt. Lett. 21, 281–283 (1996). 8. A. W. Lohmann, E. Tepichín, and J. G. Ramírez, “Optical implementation of the fractional Hilbert transform for twodimensional objects,” Appl. Opt. 36, 6620–6626 (1997). 9. G. Situ, G. Pedrini, and W. Osten, “Spiral phase filtering and orientation-selective edge detection/enhancement,” J. Opt. Soc. Am. A 26, 1788–1797 (2009).

5286

APPLIED OPTICS / Vol. 50, No. 27 / 20 September 2011

10. A. Papoulis, “Optical systems, singularity functions, complex Hankel transforms,” J. Opt. Soc. Am. A 57, 207–213 (1967). 11. G.-H. Kim, H. J. Lee, J.-U. Kim, and H. Suk, “Propagation dynamics of optical vortices with anisotropic phase profiles,” J. Opt. Soc. Am. B 20, 351–359 (2003). 12. N. Baddour, “Operational and convolution properties of two-dimensional Fourier transforms in polar coordinates,” J. Opt. Soc. Am. A 26, 1767–1777 (2009). 13. C.-S. Guo, Y.-J. Han, J.-B. Xu, and J. Ding, “Radial Hilbert transform with Laguerre–Gaussian spatial filters,” Opt. Lett. 31, 1394–1396 (2006). 14. I. S. Gradshteyn and I. M. Ryzhik, Table of Integrals, Series and Products (Academic, 1983). 15. S. Fürhapter, A. Jesacher, S. Bernet, and M. Ritsch-Marte, “Spiral phase contrast imaging in microscopy,” Opt. Express 13, 689–694 (2005). 16. V. V. Kotlyar, A. A. Almazov, S. N. Khonina, and V. A. Soifer, “Generation of phase singularities through diffracting a plane or Gaussian beam by a spiral phase plate,” J. Opt. Soc. Am. A 22, 849–861 (2005).

Suggest Documents