© 2010 Science Publications A Novel Method for Edge Detection Using 2 Dimensional Gamma Distribution

Problem statement: Edge detection is an important field in image proc essing. Edges characterize object boundaries and are therefore us eful for segmentation, registration, feature extraction, and identification of objects in a scen e. Approach: This study presented a novel method for edge detection using 2D Gamma distribution. Edge detection is traditionally implemented by convolving the image with masks. These masks are constructed using a first derivative, called gradient or second derivative called Laplacien. Thus, the pr oblem of edge detection is therefore related to the problem of mask construction. We propose a novel method to construct different gradient masks from 2D Gamma distribution. Results: The different constructed masks from 2D Gamma distribution are applied on images and we obtained very good results in comparing with the well-known Sobel gradient and Canny gradient results. Conclusion: The experiment showed that the proposed method obtained very good results but with a big time complexity du e to the big number of constructed masks.


INTRODUCTION
Edge detection is an important field in image processing. It can be used in many applications such as segmentation, registration, feature extraction, and identification of objects in a scene. Edge detection refers to the process of locating sharp discontinuities in an image. These discontinuities originate from different scene features such as discontinuities in depth, discontinuities in surface orientation, and changes in material properties and variations in scene illumination. Many operators have been introduced in the literature, for example Roberts, Sobel and Prewitt (Zhu, 1996;Siuzdak, 1998;Basu, 1994;Aurich and Weule, 1995;Deng and Cahill, 1993;Kang and Wang, 2007).
Edges are mostly detected using either the first derivatives, called gradient, or the second derivatives, called Laplacien. Laplacien is more sensitive to noise since it uses more information because of the nature of the second derivatives.
In this study, we propose a novel method for edge detection using the gradient of Gamma distribution. We constructed many masks with different values of Gamma parameters and took the maximum result from the convolution of these masks with the input image, to reduce the sensitivity to noise and produce thinner edges. The results were very good compared with the well-known Sobel gradient (Gonzalez and Woods, 2008) and Canny (1986) gradient results.
The rest of the study is organized as follows: material and methods, results, discussion, and conclusion.

2D Gamma distribution:
The probability density function for Gamma distribution, as in (Papoulis, 1991), is: where, α>0 and θ>0 are the parameters for shape and scale, respectively. Where x>0 and ( ) Γ α is the Gamma function, as in (Papoulis, 1991). So the 2D Gamma distribution will be: The following Fig. 1-4 illustrate the 1D Gamma distribution with different values of the parameters, notice that the curve is not symmetrical. Notice that in Fig. 2, α is the same as in Fig. 1 but θ is larger, the shape resulted is almost the same but it is larger (expanded a larger area). Notice that from Fig. 3-6 the peak is shifting to the right as α gets larger (it gets more symmetrical). Thus, when α gets larger the Gamma distribution will take the symmetric shape.

New Gradient Masks from 2D Gamma distribution:
To detect the edges in an image f(x,y), we use the first derivatives-the gradient. First, the two gradient masks, M x and M y , are constructed. Then the result of convolving these two masks with the image f is used to compute the gradient of the image f as expressed in the following equation: where, F x and F y are the result of the convolution of the two masks, expressed in the following equations: Where: * = The convolution symbol f = The input image In this study, we developed a new formula to construct gradient masks Mx and My using 2D Gamma distribution. The 1D Gamma distribution is a density probability function, thus: G1D(x)dx 1 = ∫ and therefore: G2D(x, y)dxdy 1 =

∫∫
The first derivatives for x and y of the 2D Gamma distribution contain negative and positive values. We know that the sum of elements in each gradient masks M x and M y is equal to zero, thus our new idea in this study is to build masks from the first derivatives of 2D Gamma distribution. The first derivatives are computed as follows: Table 1 shows the new gradient masks M x and M y masks.
Where d is the distance, which is a user defined value. And these mask values need to be normalized before it is used because the summation of the gradient mask must be zero. One way to achieve this, is to divide the positive values by the summation of all the positive values in the mask, also dividing the negative values by the summation of all the negative values in the mask after multiplying it by -1 so they remain negative.   When d = 1, θ = 50 and α = 2, we get the normalized masks in Table 2. While if d = 1, θ = 50 and α = 8, we get the normalized masks in Table 3. When d = 1, θ = 80 and α = 2, we get the normalized masks in Table 4.
For each pair of (α, θ), we can construct one set of gradient masks (M x , M y ). Therefore, from different values of (α, θ), we can construct different masks sets. This way, the method becomes less sensitive to noise and produces thinner edges because it takes for each pixel the largest gradient value from the most suitable mask for that pixel.

RESULTS
The novel method of edge detection using 2D Gamma distribution was implemented and tested on three images. We constructed masks with different values of the parameters: from α = 2 to α = 12, and from θ = 50 to θ = 80, yielding 300 different mask sets (M x and M y ) are constructed. Then after the convolution of one set of masks, the gradient is calculated. Then the final gradient is assigned to the maximum gradient value calculated from these different mask sets. The Gamma and Sobel gradients for the images were obtained by our implementation, while Canny gradients were obtained online from (Canny, 1986). For each gradient, a segmented image was obtained using a suitable threshold. We notice that the Gamma gradients are much better than Sobel gradients and the lines are thinner and better than Canny gradients.

DISCUSSION
From Fig. 9-11, we can remark the following points: (i) Sobel gave thick gradient and then the edge detect by Sobel is also thick. The results are obtained using only two masks. (ii) Canny gave good gradient and thin edges. Note that the Canny edge detector is a post-processing of a gradient. (iii) Our method gave good gradient and thin edges without post-processing as Canny case. Our results are obtained using 300 different masks. The time complexity is very big in comparison with Sobel and Canny. Our method gave thinner edges than the Canny result without doing any post-processing.

CONCLUSION
In this study, we presented a new method for detecting edges of an image. We used the gradient of 2D Gamma distribution. Many masks were constructed using different values of Gamma parameters. Then for each pixel, the maximum result was taken as the gradient for this pixel. The proposed method was tested on different types of images. The results were very good compared with Sobel and Canny gradient results. They were less sensitive to noise and the edges were thinner.
Further research can be using the Laplacien of the Gamma distribution or improving the efficiency of the method used to calculate the Gamma gradient.

ACKNOWLEDGMENT
I would like to thank Hessah Alsaaran for her help in preparation of this study. This work was supported by the Research Center of the College of Computer and Information Sciences, King Saud University, Riyadh, Saudi Arabia.