A nonseparable multiwavelet for edge detection - CiteSeerX

18 downloads 0 Views 191KB Size Report
results, – we obtained something looking like a Joan Miró in figure 10 (b)! –, whereas the modulus maxima results – see figures 11 (a) and (b) – were practically ...
A nonseparable multiwavelet for edge detection Ana M. C. Ruedin Departamento de Computaci´on, Facultad de Ciencias Exactas y Naturales, Universidad de Buenos Aires ABSTRACT The performance of a balanced, nonseparable orthogonal multiwavelet for edge detection is analized. We present two alternative methods to meet this objective: in the first one the normed fine detail coefficients of the multiwavelet transform are thresholded, in the other, we adapt the modulus maxima algorithm to nonseparable multiwavelets. Results are highly satisfactory. Keywords: edge, multiwavelet, modulus maxima, nonseparable, quincunx

1. INTRODUCTION In certain situations, the correct detection of edges in an image is of utmost importance. Applied to remote sensing images, edge detection can reveal the existence of geological faults, and this information can be used for efficient oil and gas exploration. Or it may assist medical staff in diagnosis, as well as in surgery, in the case of MRI, X-rays, CT-scan, etc.. Separable wavelets, which have been used efficiently for edge detection,1 ,2 capture the details of an image emphasizing horizontal and vertical directions. Nonseparable wavelets have been constructed in order to have a more isotropic treatment of an image,3 .4 Multiwavelets, on the other hand, have more flexibility in their construction, because they have matrix filter coefficients, instead of scalars,5,6 ,7 .8 In previous works,9 ,10 ,11 ,12 we constructed, by means of numerical optimization routines, examples of nonseparable quincunx multiwavelets, having many interesting properties. We analyse the performance of one of these new multiwavelets, named D1a1b1-094, in edge detection. The edges are detected with the information given by the detail coefficients of the multiwavelet transform: two heuristics are presented, the main difference between the two being the presence, or absence, of the downsampling operation. In section 2 are briefly stated some properties of the mentioned multiwavelet. In section 3 we give the analysis formula for the 2 fine detail images, and threshold the normed coefficients to obtain the edges. In section 4 we adapt Mallat’s modulus maxima algorithm to obtain the edges. Comparisons are made throughout the paper, and results are highly satisfactory.

2. A NONSEPARABLE QUINCUNX MULTIWAVELET The multiwavelet system built consists of 2 scaling functions Φ1 and Φ2 , and 2 multiwavelets Ψ1 and Ψ2 , defined on 2 , all having compact support. The dilation equation and the wavelet equation are      Φ1 (x) Φ1 (Dx − k) (k) H = , (1) Φ2 (x) Φ2 (Dx − k) k∈Λ



E-mail: [email protected]

Ψ1 (x) Ψ2 (x)

 =

   Φ1 (Dx − k) G(k) . Φ2 (Dx − k)

k∈Λ

Figure 1. Rice (original image).



 √ 1 1 , a reflection followed by an expansion by 2. This matrix 1 −1 induces a decomposition of Z 2 into 2 cosets, Γ0 and Γ1 , called quincunx sublattices:    1 2 2 2 . Z = Γ0 ∪ Γ1 ; Γ0 = {DZ } ; Γ1 = DZ + 0 The dilation matrix chosen is D =

H (k) and G(k) are 2 × 2 matrices, indexed by Λ = {(1, 1), (2, 1), (0, 0), (1, 0), (2, 0), (3, 0), (1, −1), (2, −1)}, having the following spatial disposition ⎡

0

⎣ H (0,0) 0

H (1,1) H (1,0) H (1,−1)

H (2,1) H (2,0) H (2,−1)

0

(2)



H (3,0) ⎦ , 0

(3)

where four of the matrices H (k) have indices in Γ0 ( marked O in the following graph) and the four remaining ones have indices in Γ1 (marked ×). See12 for the values of H (k) and G(k) . – O –

O × × O O ×

– × –

The scaling functions are balanced, i.e., their integrals are identical, they form an orthonormal system with their translations by pairs of integers, and they locally approximate constant planes. The multiwavelets are also orthonormal, they are moreover orthogonal to the scaling functions, their integral is zero, and the frequency response of the highpass polyphase filters is zero at the origin.

3. EDGE DETECTION BY THRESHOLDING MULTIWAVELET COEFFICIENTS The projection of an original image into the fine detail subspaces can be exploited to extract the edges it contains. A test for edge detection was carried on the 256 × 256 original rice image from figure 1.

Figure 2. 2 phases of the original image.

(0)

(0)

Before transforming the image X (0) , it was first separated into two input images c1,· and c2,· , according to its phases, or cosets, that is (0)

c1,· = X (0) ↓ D

(0) c2,· = X (0) ∗ ∂−10 ↓ D (0)

(0)

X (0) = [c1,· ↑ D] + [∂(10) ∗ (c2,· ↑ D)]. We recall that ∗ stands for discrete bidimensional convolution, the downward arrow stands for downsampling, and the upward arrow stands for upsampling. These last 2 operations respectively reduce and augment the size of the image. They are carried though with the dilation matrix D. Downsampling with D is defined as y=x↓D

⇐⇒

y(k) = x(Dk),

and upsampling with D is defined as  y=x↑D

⇐⇒

yk =

xr if k = Dr . 0 otherwise

Notice that an image of N × N pixels, when downsampled with D, has (N × N )/2 pixels. (0)

(0)

Because D is a reflection (followed by an expansion), c1,· and c2,· are a reflection of X (0) , both being contained in a square rotated at π/4 – see figure 2. Next, one step of the nonseparable multiwavelet transform was applied

Figure 3. One step of the multiwavelet transform; left: detail coeff. and right: approximation coeff.

(−1)

to obtain the approximation images c1,k analysis formulae

(−1)

c·,k

(−1)

d·,k where (m)

c·,k =



(m)

c1,k

(−1)

(−1)

and c2,k , and the fine detail images d1,k 1  (j−Dk) (0) =  H c·,j , |D| j∈Z 2 1  (j−Dk) (0) =  G c·,j , |D| j∈Z 2 (m)

c2,k

T

(m)

d·,k =



(m)

d1,k

(−1)

and d2,k , following the

(4)

(m)

d2,k

T

.

The result can be observed in figure 3. Notice that the detail coefficients were relatively small; in order to see their information content, they had to be rescaled before displaying their image. We included information from both detail subbands by calculating the 2-norm of the details at each position k ∈ Z 2 :    2  2  (−1)  (−1) (−1) d1,k + d2,k . d·,k  = 2

   (−1)  A threshold was chosen that allowed to pass 30% of the normed coefficients d·,k  , and a binary image was 2 generated, with values 1 or 0 depending on the coefficient at each position being above or below the threshold. The image obtained is in figure 4(a), where the outline of the rice grains is well distinguished. Finally, in order to obtain thinner edges, 4 iterations of an algorithm based on morphological operations was applied. The resulting image (figure 4(b)) shows that all the edges have been correctly identified.

(a)Location of 30% greatest coeffs.

(b)Edges of left image thinned out.

Figure 4. Edge detection with D1a1b1-094 fine detail normed coefficients.

(a)Location of 23% greatest coeffs.

(b)Location of 37% greatest coeffs.

Figure 5. Edge detection with Daubechies 4 fine detail normed coefficients.

The test was repeated with two separable wavelet transforms: Daubechies 4 and Symmlet 8. For the separable wavelet Daubechies4 transform, a threshold was chosen that allowed 23% of the coefficients to remain, and a binary image was generated, see figure 5(a). The definition of the outlines is poor. If the threshold is lowered, the interior of the rice grains begins to fill, instead of having more precision on the edges – see figure 5(b). Thresholding the normed coefficients of the fine detail subbands produced poor results when applied to the separable Symmlet 8 transform – see figures 6(a) and (b). The same technique was tried on the synthetic image 7 (a). In each case the threshold chosen was the one that allowed to ( correctly) detect most edges. In table 1 are listed the number of hits– correct guesses – in the edge detection. These results are consistent with the former ones.    (−1)  Notice that the size of the significance maps for d·,k  > threshold is not the same as the size of the 2 original image. Suppose that the original image has N rows and N columns: because of the 2 downsampling steps performed– one downsampling step for the separation of the image into its cosets, and one for the analysis step – the significance maps have N/2 rows and N/2 columns. Each pixel marking a border in the significance map corresponds to 4 pixels in the original image. Although this is quite acceptable for a wide variety of

(a)Location of 26% greatest coeffs.

(b)Location of 40% greatest coeffs.

Figure 6. Edge detection with Symmlet 8 fine detail coefficients.

Image: Lines edges correctly detected false edges detected missing edges

D1a1b1-094 15 1 4

Daubechies 4 14 1 5

Symmlet8 13 9 6

Table 1. Hits in edge identification

applications, for certain applications, such as edge detection in medical images, this loss of precision may not be acceptable. This is why another approach was tried.

4. EDGE DETECTION WITH MODULUS MAXIMA For this second approach, we adapted to nonseparable multiwavelets the modulus maxima transform, introduced (0) (0) by Mallat,13 .1 To begin, two copies X1,· and X2,· of the original image were made, and the nondecimated

Image “Lines”.

Image “objects”.

Figure 7. Synthetic images

(a) Location of the 15% largest normed coefficients.

(b) Edges of left image thinned out.

Figure 8. Threshold of 15% on nondecimated D1a1b1-094 fine detail coefficients

nonseparable multiwavelet transform was applied, giving for k ∈ Z 2 , the fine detail coefficients 1  (j−k) (0) (−1) G c·,j , d·,k =  |D| j∈Z 2 where the only difference between the above formula and 4 is that the downsampling operation with D is omitted. Our trials were carried out on the image “objects” – see figure 7 (b). We calculated the 2-norm of the details at each position k ∈ Z 2    2  2  (−1)  (−1) (−1) + d2,k . d1,k d·,k  = 2    (−1)  and generated a binary image or significance map with the values d·,k  above a threshold –see figure 8 (a). 2

The edges were well delimited; as before, they were thinned out with a morphological algorithm –figure 8(b). The result is highly satisfactory. However, we shall see that this technique can give erroneous edges if the threshold is inadequate. Therefore the modulus maxima were calculated. At each position (i, j) the direction of greatest variation V was found. Supposing the normed coefficients were the discretized values of a certain function f , that is    (−1)  f (xi , yj ) = fi,j = d  ·,(i,j)

2

the derivative of f at a point (xi , yj ) in the direction ν = (ν1 , ν2 ) was estimated by means of f (xi + λν1 , yj + λν2 ) − f (xi , yj ) ∂f ≈ ∂ν λ     and V was the direction that maximized  ∂f ∂ν  over 8 neighbouring coefficients. A point (xi , yj ) was considered a local maximum when f (xi , yj ) was greater than both its neighbours – or equal to one and greater than the other – along  the direction of maximum change V . The modulus maxima, calculated over the thresholded values  (−1)  fk = d·,k  of image “objects”, produced the binary image seen in figure 9 (a). The edges were further thinned 2

with a morphological algorithm – see figure 9 (b). The superior performance of the modulus maxima technique over thinning the edges outlined by the significance map was shown for a lower threshold, that allowed to pass 25% of the normed coefficients: many figures

(a) Location of modulus maxima.

(b) Edges of left image thinned out.

Figure 9. Modulus maxima on 15% of nondecimated D1a1b1-094 fine detail coefficients

(a) Location of 25% largest normed coeffs.

(b) Edges of left image thinned out.

Figure 10. Threshold of 25% on nondecimated D1a1b1-094 fine detail coefficients

of the significance map were filled in – see figure 10 (a) – and the morphological algorithm produced very poor results, – we obtained something looking like a Joan Mir´ o in figure 10 (b)! –, whereas the modulus maxima results – see figures 11 (a) and (b) – were practically identical to the figures 9 (a) and (b). The same process was applied to Lena see figures 12 (a) and (b), and figures 13 (a) and (b). This last image was obtained by thinning 13 (a) and by removing isolated pixels. Although the results may be improved, they are quite good.

5. CONCLUSIONS We have presented two ways of detecting the orthogonal, balanced, quincunx multiwavelet, highpass properties for the polyphase filters. nonseparable multiwavelets may be an efficient

edges of an image with the transform of a new nonseparable, having order 1 polynomial approximation, and verifying good The satisfactory results obtained in these tests indicate that tool in edge detection.

(a)Location of modulus maxima.

(b)Edges of left image thinned out.

Figure 11. Modulus maxima on 25% of nondecimated D1a1b1-094 fine detail coefficients

Location of 15% largest coeffs.

Edges of left image thinned out.

Figure 12. Threshold of 15% on nondecimated D1a1b1-094 fine detail coefficients

Modulus maxima of thresholded coeffs.

Edges of left image thinned out.

Figure 13. Modulus maxima on 15% of nondecimated D1a1b1-094 fine detail coefficients

REFERENCES 1. S. Mallat and S. Zhong, “Characterization of signals from multiscale edges,” IEEE Trans. Pattern Analysis Machine Intell. 14, pp. 710–732, 1992. 2. S. Zhong, Edges representation from Wavelet Transform Maxima. PhD thesis, New York University, Sept 1990. 3. A. Cohen and I. Daubechies, “Non-separable bidimensional wavelet bases,” Revista Matematica Iberoamericana 9(1), pp. 51–137, 1993. 4. J. Kovacevic and M. Vetterli, “Nonseparable multidimensional perfect reconstruction filter banks and wavelet bases for rn ,” IEEE Transactions on Information Theory 38(2), pp. 533–555, 1992. 5. J. Lebrun and M. Vetterli, “Balanced multiwavelets: Theory and design,” IEEE Transactions on Signal Processing 46(4), pp. 1119–1125, 1998. 6. M. Cotronei, L. Montefusco, and L. Puccio, “Multiwavelet analysis and signal processing,” IEEE Transactions on Circuits and Systems II: Analog and Digital Signal Processing, Special ISSUE on Multirate System, Filter Banks, Wavelets, and Applications , to appear. 7. J. Geronimo, D. Hardin, and P. Massopust, “Fractal functions and wavelet expansions based on several scaling functions,” Journal of Approximation Theory 78, pp. 373–401, 1994. 8. J. Lebrun and M. Vetterli, “High order balanced multiwavelets,” Proc.IEEE Int. Conf. Accoust.Speech and Signal Processing , 1998. 9. A. Ruedin, “Nonseparable orthogonal multiwavelets with 2 and 3 vanishing moments on the quincunx grid,” Proceedings SPIE Wavelet Appl. Signal Image Proc. VII 3813, pp. 455–466, 1999. 10. A. M. C. Ruedin, “Balanced nonseparable orthogonal multiwavelets with two and three vanishing moments on the quincunx grid,” Wavelet Applications in Signal and Image Processing VIII, A. Aldroubi, A. Laine, M. Unser, Editors, Proceedings of SPIE 4119, pp. 519–527, 2000. 11. A. M. C. Ruedin, “Construction of nonseparable multiwavelets for nonlinear image compression,” Eurasip Journal of Applied Signal Processing 2002, issue 1, pp. 73–79, 2002. 12. A. M. C. Ruedin, Nonseparable Multiwavelets: Construction and Applications to Image Processing. PhD thesis, Universidad de Buenos Aires, May 2003. 13. S. Mallat, A Wavelet Tour of Signal Processing, Academic Press, 1999.