Wavelet based Scalable Edge Detector

Fixed size kernels are used to extract differential structure of images. Increasing the kernal size reduces the localization accuracy and noise along with increase in computational complexity. The computational cost of edge extraction is related to the image resolution or scale. In this paper wavelet scale correlation for edge detection along with scalability in edge detector has been envisaged. The image is decomposed according to its resolution, structural parameters and noise level by multilevel wavelet decomposition using Quadrature Mirror Filters (QMF). The property that image structural information is preserved at each decomposition level whereas noise is partially reduced within subbands, is being exploited. An innovative wavelet synthesis approach is conceived based on scale correlation of the concordant detail bands such that the reconstructed image fabricates an edge map of the image. Although this technique falls short to spot few edge pixels at contours but the results are better than the classical operators in noisy scenario and noise elimination is significant in the edge maps keeping default threshold constraint. Keywords—Wavelet scales correlation; Edge detection; image denoising; Multiresolution analysis; entropy reduction


INTRODUCTION
Spatial domain, frequency domain and wavelet based techniques are being used independently to detect edges in an image.Spatial filters are good at localization accuracy but lack control over the operator's scale.Similarly Fourier transform being global in nature can neither localize sharp transients nor differentiate between true and false edges under noisy scenario.The classical edge detectors [1,2] do not yield adequate edge maps of the noisy images over default threshold values.The choice of optimum threshold for edge detection [3] is not generic.A good threshold assigned to yield a good edge map for a particular type of image and noise model may be inappropriate for other type of image or the different noise model.Thus it requires user's intervention to assign suitable threshold value to differentiate between true and false edges.A multiscale edge detection algorithm has been presented in [4] for SAR images but it is not advocated for the low PSNR images Thus the two major dilemmas for edge detection are; firstly the choice of appropriate threshold [5] to segregate noise and true edges and secondly to opt for an appropriate scale for edge detection.
Usually threshold is empirically found using trial and error process and varies for different noise models and intensities in the image.Figure 1 highlights the results of edge detection using default and manually assigned threshold value for a noisy image.
Another dilemma in edge detection is that the edge operators are fixed size masks.Compactly supported kernels are good to identify sharp transients whereas fall short to spot structural variations in the image.On the other hand large size masks are good to identify large scale variations but these are not sensitive to swift variations and lose localization accuracy and fidelity.Thus the objective of this paper is to explore an edge detection paradigm such that:  It efficiently works on default threshold value, does not require user intervention to assign an appropriate threshold value and thus can be independently used in any pre-processing stage in digital image processing applications.
 It incorporates an inbuilt technique for partial noise elimination that holds equally for different noise models and intensities.
 It facilitates scalability in edge detection.

II. NOISE MODELS IN IMAGES
The noise models assume that the noise is oscillatory and image is smooth or piecewise smooth.Segregation of noise and information in a signal is an ill posed problem.High noise fluctuates image entropy hiding information contents of the image and behaves differently for versatile images [6], [7].More information an image has more abruptly entropy maxima will be reached by noise induction.Figure 2(a) depicts that image entropy is proportional to noise induction and it decreases monotonically with increase of noise after its maxima.Multiresolution analysis (MRA) is concerned with the representation and analysis of signals or images at more than one resolution [8][9][10].The appeal of such an approach is obvious; the features that might go undetected at one resolution may be easy to spot at another.Wavelet analysis is well suited to isolate sharp transients in a signal, a task at which Fourier analysis is not so pleasing.Analysis of images with QMF has been exploited for edge detection.For images, a two dimensional scaling function φ(x, y) and three two dimensional wavelets, ψ 1 (x, y), ψ 2 (x, y) and ψ 3 (x,y) are required.
Image resolution ascertains the choice of appropriate scale [11] for edge detection which is not adjustable with classical edge detectors.However with the wavelet model, we can construct our own edge detector with appropriate scale.Scale is controlled by regularization parameters that further control the significance of edges to be shown.Edges of higher significance are likely to be kept by the wavelet transform across scales and lower significance are likely to disappear when scale increases [11].Wavelet filters of large scales are more effective for removing noise, but at the same time increase the uncertainty of the edges locations.Small scale wavelet filters have good localization accuracy, but can hardly distinguish between noise and true edges.Many techniques have been proposed for multiscale edge detection [12,13], however, there is less agreement on the following;  Number of scales of edge detector or decomposition levels.
 Methods to opt for optimum scale.
 How to synthesize the results at different scales.
 Choice of threshold value.
Edge detection based on wavelet analysis is efficient in the sense that it requires least visual interpretation.Different wavelet basis functions have different waveforms, central frequencies and vanishing moments.Suitable decomposition level is desirable to maintain a clear background, edge contour and to remove irrelevant higher frequency components on the surface.The decomposition performed by different wavelet function captures features with different spatial frequencies based on the characteristics of the selected wavelet function at each level.Theoretically, the wavelet decomposition can be iterated n times on an image, where 2n ≤m<2n+1 and m is the min of number of pixels of an image in either direction.Image decomposition up to apex is a non-optimal solution for edge detection.Total bands constituting directional edges are thrice the decomposition level with an additional approximation band which is susceptible to further wavelet decomposition.Decomposition of lower resolution generates artifacts and discontinuity in edges.Similarly thick edges support high level decomposition where as thin edges in images suffer more edge losses as scale increase.Further that noise in the image is inversely proportional to decomposition level for edge detection.Due to vast diversity and complexity in the image structural parameters and noise models/ intensities, optimal decomposition level (n) for edge detection has not been derived.However its dependence on three image parameters i.e. resolution(r), structural parameters(s) that includes statistical parameters and noise level(η) has been established.

IV. WAVELET SYNTHESIS FOR EDGE DETECTION
The lower resolution wavelet detail bands are interpolated to the original image size that partially recaptures the missing edge pixels besides facilitating matrix multiplications of the concordant wavelet bands.Equations ( 1)-( 4) can be exploited by WSC to detect edges from an image in nine steps S-1 to S-9: S-1.A pair of QMF is operated on gray level image in vertical followed by horizontal direction.
S-2. Decimation by two after each filtering stage is applied and high frequency details are extracted at level-1.
S-3.On the magnitude image so obtained thresholding is performed to obtain the edge map at level- S-9.The harmonic mean of the cumulated detail band yields image edge map.
Figure 3 shows the practical implementation of proposed algorithm showing the wavelet analysis filter bank for the input image I followed by its synthesis filter bank for edge detection for n=4.E is the resultant image edge map.The optimum decomposition level is not generic.Initially [6,7] results were compiled up to fourth level wavelet decomposition which are enhanced to nth level based on subjective analysis.The analytical expression for WSC edge detection is as follows: ∏ Where ψ represents the synthesis of all the detail band coefficients by the given technique, superscript d=1,2,3 represents interpolated horizontal, vertical and diagonal detail bands to the original image size after multiplication of concordant bands, subscripts l represents the decomposition level.E is the resultant edge map of the image, n is the decomposition level and its dependence has been established in (5).A, H, V and D represents decimated approximations, horizontal, vertical and diagonal detail coefficients, subscripts indicate decomposition level.ψ1, ψ2 and ψ3 represents horizontal, vertical and diagonal interpolated edge maps after point wise multiplication of concordant band coefficients up to nth level respectively.Encircled X and + denote multiplier and summer respectively.E is the resultant image edge map.
The computational complexity of the algorithm is linear.It is proportional to the order of the wavelet filter, decomposition level and the interpolation technique used for synthesis.Haar offers least complexity.The computational complexity for first level wavelet decomposition using Haar equals to N and for nth level becomes ∑ ( ) .During WSC synthesis the image in lower resolutions are interpolated to original size prior to multiplication of the concordant bands.The nearest neighborhood interpolation in 2D is the order of N2 comparisons.Bilinear interpolation consists of N2 multiplications.The details bands up to nth level are interpolated.The complexity of each directional detail band becomes n x N2 and total interpolation complexity turns out to be 3 x n x N2.The harmonic mean of the image prior to display adds complexity by N2.Thus the overall complexity of the algorithm for (10) is www.ijacsa.thesai.org The computational complexity of image size 512 x 512 for edge detection at 4th level is equal to 3.6599x106.If the n th root of product of interpolated approximation bands up to nth level is added to the edge detected image, it gives denoised image with reduced entropy.
where R is the denoised reconstructed image with reduced entropy.The product of approximation concordant band's computational complexity is added in ( 11) by a factor of 4nN2.However analysis of denoised reconstructed image is not carried out in this paper. V.
QUALITY METRIC The pixels constituting edges are delocalized; therefore legitimate MSE does not correlate with Psycho visual comparison.The absolute difference in the Distance Transform (DT) [14] of edges detected from original and noisy image is taken as measure of error.PSNR based on the DT [5], [6] is evaluated as where is the peak signal value which is 255 in the experiments.DT1 is the DT of the edge detected image from original image and DT2 is the DT of the edge detected image from noisy image and their second norm is taken that computes MSE.If m and n are the rows and columns of the DT matrix respectively such that dt1(m,n)∈DT1 and dt2(m,n)∈DT2 then their second norm is defined as Entropy H(x) of the edge map is determined as where P(xi) is the probability of ith pixel value.It is not possible exactly to infer the entropy measure for edge map of the image because the entropy variation in the image due to noise or information contents is an ill posed problem.There exists no such known method to infer weather the increase or decrease in entropy of the image edge map is due to variations in noise density or there exists true edges.Among different wavelet basis functions, the entropy values obtained at optimal decomposition levels will be different, which means that their information contents will also be different.In this sense, the higher entropy value is where more information is contained.
The entropy criteria used coincide with [15],[16] within the family of wavelets and supplements psycho visual comparison.

VI. EXPERIMENTAL RESULTS
The edges detected by WSC and Canny edge detector for Lena image of resolution 512 x 512 and 128 x 128 as demonstrated in Figure 4 has yielded better results for high resolution images.Classical detectors failed to extract edges from Lena image with N(0, .02)(Figure 4d) and were dominated by noisy pixels (Figure 4e) on default threshold values where as proposed scheme yielded significant edge map of the image (Figure 4f) keeping the same noise level.Thick edges are vulnerable at multiple scales, thus are prominent in the final edge map of the image.Further that Canny failed to produce edge map of Lena at default threshold for N(0, .02)or above.Whereas proposed scheme has given an adequate edge map of Lena upto noise of variance 0.09 as shown in Figure 4(g, h, i). Figure 4(j, k, l) also reveals that the proposed scheme does not give equivalent results for low resolution images and for Lena image of resolution 128 x 128 Canny performed better than the proposed technique.The proposed detector is equally good for other noise models as well.Results for uniform noise induced in the image are trivial due to wavelets in built approximating and detailing characteristics.Difference of entropies of spatial domain [1][2][3] filters and wavelet filters is eminent in Figure 7. DWT level-1 edge detector has the maximum entropy followed by level -2, level-3, level-4 and the proposed algorithm.Entropy of the proposed algorithm is decreased due to partial noise suppression.The noise saturates pixel's intensity values and conceals intelligence contents of the image.The entropy maxima by the increase in noise density changes from image to image.Greater the information contents an image has more suddenly the maxima will be reached and vice versa.In spatial domain filters maximum entropy is preserved by Canny.The optimal results of Canny depend upon selection of optimal threshold for edge detection, however, in this work all the experimental results are based on default threshold values.

VII. CONCLUSION
The scale correlation of concordant wavelet bands significantly capture edges present at multiple scales and elegantly discard isolated spikes and thus noise is partially segregated from true edges.The technique justifies for higher resolution images.However wavelet decomposition level cannot be unique and varies from image to image and depends upon image resolution, type, noise model and pixel intensities.The image decomposition level is function of its resolution.The said technique has outperformed the existing schemes keeping default threshold constraint.The algorithm is equally applicable to images with depleted PSNR where conventional filters fall short to give adequate edge map.The algorithm is advocated for edge detection where noise model or noise intensity either varies or unpredictable prior to image processing.Greater the image noise level greater is the performance difference of the proposed detector with classical edge operators.Moreover it performs without the user's interaction and can be elegantly cascaded in preprocessing stage such as segmentation or feature extraction/matching.The reconstructed image through scale correlation gracefully suppresses noise, reduces image entropy and favors further processing in diverse image processing applications.

Fig. 1 .Fig. 2 .
Fig. 1.Effects of threshold on edge detection.(a) Noisy Lena image.(b) Edges detected by Canny using default threshold.(c) Edges detected by Canny using threshold as 0.37

Fig. 3 .
Fig. 3. Wavelet analysis filter banks and its synthesis for edge detection for n=4

Fig. 4 .
Fig. 4. Edge detection comparison using Lena image over default threshold value.(a) Lena image of resolution 512x512 (b) Canny edge detector (c) edges detected by WSC (d) Gaussian noise N(0,.02) induced in Lena image (512x512), (e) Canny edge detector result (f) edges detected by WSC from (d).Similarly (g), (h) and (i), are edge maps by the proposed technique of Lena image(512x512) induced with Gaussian noise of variance .04,.05 and .09respectively.(J) Lena image of resolution 128 x 128, ( k) is edge detected by Canny and (l) is the proposed edge detector

Figure 5 shows
Figure 5 shows Lena image subjected to salt and pepper noise with noise density .01,.02and .05.The edge detection by classical filters are dominated by spikes and unable to classify

Fig. 7 .
Fig. 7. (a) Entropy of edges detected from Lena image under Gaussian noise of varying mean and variance.(b) Comparison of entropies for different edge detectors for Gaussian noise of varying variance The horizontal, vertical and diagonal interpolated bands up to nth level are point wise multiplied respectively and the product of concordant detail bands are cumulated.The synthesis of product bands if yielded at level-1 is re-interpolated to match the original size of the image.However it is convenient to interpolate the product bands to the original size and then synthesize.
S-7.The inbuilt noise suppression technique and downsampling diminishes few edge pixels.The lower resolution bands are interpolated by nearest www.ijacsa.thesai.org