Algorithm based on Histogram and Entropy for Edge Detection in Gray Level Images

Edge detection and feature extraction are widely used in image processing and computer vision applications. Most of the traditional methods for edge detection are based on the first and second order derivatives of gray levels of the pixels of the original image utilizing 2D spatial convolution masks to approximate the derivative. In this paper we present an algorithm for edge detection in gray level images. The main objective is to solve the previous problem of traditional methods with generate suitable quality of edge detection. Our new algorithm is based on two definitions of entropy: Shannon’s classical concept and a variation called Tsallis entropy. The novel approach utilizing Subextensive Tsallis entropy rather than the evaluation of derivatives of the image in detecting edges in gray level images has been proposed. Here, we have used a suitable threshold value to segment the image and achieve the binary image. The effectiveness is demonstrated by using many different kinds of test images from the real-world and synthetic images. The results of this study were quite promising.


INTRODUCTION
Edge detection is a crucial step in edge extraction and object delineation in image processing. An effective edge detector reduces a large amount of data but still keeps most of the important feature of the image. As one of the first-use methods, edge detection is widely used in imagery data processing such as remote sensing data processing. For example, for an aerial image, a high quality edge detector not only obtains a good understanding of the image but also provides a simple but significant input for the process of extracting edges of some specific objects. So, edge detection has received much attention during the past two decade because of its significant importance in many research areas [2,14]. The detection results benefit applications such as image enhancement, recognition, morphing, compression, retrieval, watermarking, hiding, restoration and registration etc. Edge detection concerns localization of abrupt changes in the gray level of an image. Edge detection can be defined as the boundary between two regions separated by two relatively distinct gray level properties. The causes of the region dissimilarity may be due to some factors such as the geometry of the scene, the radio metric characteristics of the surface, the illumination and so on [10].
Most of the classical methods for edge detection based on the derivative of the pixels of the original image are Gradient operators, Laplacian and Laplacian of Gaussian operators [13]. Gradient based edge detection methods, such as Roberts, Sobel and Prewitts, have used two 2-D linear filters to process vertical edges and horizontal edges separately to approximate first-order derivative of pixel values of the image. The Laplacian edge detection method has used a 2-D linear filter to approximate second-order derivative of pixel values of the image [15]. Major drawback of second-order derivative approach is that the response at and around the isolated pixel is much stronger. The Laplacian generally is not used in its original form for edge detection for several reasons: As a second-order derivative, the Laplacian typically is unacceptably sensitive to noise. The magnitude of the Laplacian produces double edges, an undesirable effect because it complicates segmentation. For these reasons, the Laplacian is combined with smoothing as a precursor to finding edges via zerocrossings. Marr and Hildreth achieved this by using the Laplacian of a Gaussian (LOG) function as a filter [6]. The paper [7] classified and comparative study of edge detection algorithms are presented. Experimental results prove that Boie-Cox, Shen-Castan and Canny operators are better than Laplacian of Gaussian (LOG), while LOG is better than Prewitt and Sobel in case of noisy image.
To solve these problems, the study proposed a novel approach based on information theory. Tsallis entropy is the most important among several measures of information. Edges can be extracted by the detection of all pixels on the borders between different homogenous areas. Entropy measures the randomness of intensity distribution [3]. According to this property of entropy, the value of entropy is low for homogenous areas and is high where the diversity of gray level of pixels is large [11]. The proposed method is decrease the computation time.
This paper is organized as follows: in Section 2 presents some fundamental concepts of the mathematical setting of the threshold selection and Tsallis entropy. Section 3, we describe the newly proposed method of edge detection in gray level images using a Tsallis entropy. In Section 4, we report the effectiveness of our method when applied to some real-world and synthetic images. In Section 5, we present some concluding remarks about our method.

SELECTION OF THRESHOLD VALUE
Entropy is a concept in information theory. Entropy is used to measure the amount of information [8]. Entropy is defined in terms of the probabilistic behavior of a source of information. In accordance with this definition, a random event E that occurs with probability P(E) is said to contain I(E) = log( 1/ P(E) ) = -log( P(E) ) units of information. The amount I(E) is called the self-information of event E or information content of E. The amount of self information of the event is inversely related to its probability. If P(E)=1, then I(E) = 0 and no information is attributed to it. In this case, uncertainty associated with the event is zero. Thus, if the event always occurs, then no information would be transferred by communicating that the event has occurred. If P(E) = 0.8, then some information would be transferred by communicating that the event has occurred [10]. The base of the logarithm determines the unit which is used to measure the information. If the base of the logarithm is 2, then unit of information is bit. If P(E)= ½, then I(E)= -log2(½) = 1 bit. That is, 1 bit is the amount of information conveyed when one of two possible equally likely events occurs. A simple example of such a situation is flipping a coin and communicating the result (Head or Tail).
The set Z of source symbols is referred to as the source alphabet, Z= {s1, s2, s3, ..., sk }. The set of all source symbol probabilities is denoted by P, P= {p1, p2, p3, ..., pk }. This set of probabilities must satisfy the condition The average information per source output, denoted S(Z) [5], is: , being k the total number of states.
If we consider that a system can be decomposed in two statistical independent subsystems A and B, the Shannon entropy has the extensive property This formalism has been shown to be restricted to the Boltzmann-Gibbs-Shannon (BGS) statistics.
However, for non-extensive systems, some kind of extension appears to become necessary. Tsallis [12] has proposed a generalization of the BGS statistics which is useful for describing the thermo statistical properties of non-extensive systems. It is based on a generalized entropic form, where the real number q is a entropic index that characterizes the degree of non-extensivity. This expression recovers to BGS entropy in the limit 1 q .Tsallis entropy has a non-extensive property for statistical independent systems, defined by the following rule [1] : ( y x f be the gray value of the pixel located at the point In general, a thresholding method determines the value * t of t based on a certain criterion function. If * t is determined solely from the gray level of each pixel, the thresholding method is point dependent [9]. Let pi = p1, p2, . . . , pk be the probability distribution for an image with k gray-levels. From this distribution, we derive two probability distributions, one for the object (class A) and the other for the background (class B), given by: The Tsallis entropy of order q for each distribution is defined as: The Tsallis entropy ) (t S q is parametrically dependent upon the threshold value t for the foreground and background. It is formulated as the sum each entropy, allowing the pseudo -additive property, defined in equation (2). We try to maximize the information measure between the two classes (object and background). When ) (t S q is maximized, the luminance level t that maximizes the function is considered to be the optimum threshold value [4].
; for q = 1, the Tsallis entropy reduces to an standard "extensive entropy" where ; for q > 1, the Tsallis entropy becomes a "superextensive entropy" where In the proposed scheme, first create a binary image by choosing a suitable threshold value using Tsallis entropy. The Hence, when q → 1, the threshold value in Equation (1), equals to the same value found by Shannon's method. Thus this proposed method includes Shannon's method as a special case. The following expression can be used as a criterion function to obtain the optimal threshold at q → 1.
The TsallisThreshold procedure to select suitable threshold value * t and q can now be described as follows: Endfor End.

The Edge Detection:
We will use the usual masks for detecting the edges. A spatial filter mask may be defined as a matrix w of size m×n. Assume that m=2α+1 and n=2β+1, where α, β are nonzero positive integers. For this purpose, smallest meaningful size of O c t 5 , 2 0 1 3 the mask is 3×3. Such mask coefficients, showing coordinate arrangement as Figure 1.a . Image region under the above mask is shown as Figure 1 Table 1.  Output: The edge detection image g of A.

Begin
Step 1: Applying TsallisThreshold procedure to select suitable threshold value * t and q.
Step 4: Create an M×N output image, g: For all x and y, Set g(x, y) = f(x, y).
Step 5: Checking for edge pixels:

ANALYSIS OF TEST RESULTS
In this section, we discuss the experimental results obtained using the proposed method. The performance of the proposed scheme is evaluated through the simulation results using MATLAB for a set of sixteen test images and the results of the proposed scheme are compared with the results of well-established edge detection operator on the same set of test images. The resent published method by B. Singh and A. P. Singh [10] is chosen for comparison because both approaches are more similar in the technique of implementation. For this purpose, first group, a standard test images: bacteria.tif, blood1.tif, brain.tif, cameraman.tif, eight.tif, ic.tif, rice.tif; saturn.tif, and tree.tif were taken from MATLAB environment. second group, a test images from the real-world and synthetic images from other papers: analskin.tif, cell.tif, eggspindle.tif, pout.tif, rose.tif, synthetic.tif, and things.tif.
Here, we have used in addition to the original gray level function f(x, y), a function g(x, y) that is the average gray level value in a 3×3 neighborhood around the pixel (x, y). However, in most cases, when q was greater than 1, this proposed method did not produce good edge images and the threshold values produced were unacceptable (see the last columns of Table 2 and Figure2). When the value of q was one -Shannon entropy -the threshold value produced was not always a good edge images (see Figs. 3-18).
The results of edge detections for these test images using the method in [10] -Shannon entropy -and proposed scheme are shown in Figs. 3-18. From the results; it has again been observed that the performance of the proposed edge detection scheme is found to be satisfactory for all the test images as compare to the performance of the previous method. It has been observed that the proposed method for edge detection works well as compare to the previous method. original image  original image Figure 5. blood1 image, and its the edge images. Figure 6. brain image, and its the edge images.  . coins image, and its the edge images. Figure 10. eggspindle image, and its the edge images. Figure 11. ic image, and its the edge images. Figure 12. pout image, and its the edge images.
original image Figure 13. rice image, and its the edge images. Figure 14. rose image, and its the edge images.
original image  Figure 18. trees image, and its the edge images.

CONCLUSION
In this study, an attempt is made to develop a new technique for edge detection based on Tsallis entropy. It is already pointed out in the introduction that the traditional methods gives rise to the exponential increment of computational time. However, the proposed method is decrease the computation time with generate suitable quality of edge detection . Experiment results have demonstrated that the proposed scheme for edge detection works satisfactorily for different gray level digital images. The theoretical principles and systematic development of the algorithm for the proposed versatile edge detector is described in detail. The Tsallis q coefficient can be used as an adjustable value and can play an important role as a tuning parameter in the image processing chain for the same class of images. This can be an advantage when the image processing tasks depend on an automatic thresholding. The technique has potential future in the field of digital image processing.