New Method Based on Multi-Threshold of Edges Detection in Digital Images

Edges characterize object boundaries in image and are therefore useful for segmentation, registration, feature extraction, and identification of objects in a scene. Edges detection is used to classify, interpret and analyze the digital images in a various fields of applications such as robots, the sensitive applications in military, optical character recognition, infrared gait recognition, automatic target recognition, detection of video changes, real-time video surveillance, medical images, and scientific research images. There are different methods of edges detection in digital image. Each one of these methods is suited to a particular type of images. But most of these methods have some defects in the resulting quality. Decreasing of computation time is needed in most applications related to life time, especially with large size of images, which require more time for processing. Threshold is one of the powerful methods used for edge detection of image. In this paper, We propose a new method based on different Multi-Threshold values using Shannon entropy to solve the problem of the traditional methods. It is minimize the computation time. In addition to the high quality of output of edge image. Another benefit comes from easy implementation of this method. Keywords—image processing; multi-threshold; edges detection; clustering


I. INTRODUCTION
In many applications of image processing, the gray levels of pixels belonging to the object are quite different from the gray levels of the pixels belonging to the background. Thresholding becomes then a simple but effective tool in edge detection to separate objects from the background. Edge detection using thresholding is significant importance in many research areas [1,2]. Since, the edge is a prominent feature of an image; it is the front-end processing stage in object recognition and image understanding system. The detection results benefit applications such as automatic target recognition [3], medical image applications [4], and detection of video changes [5].
Edge detection can be defined as the boundary between two regions separated by two relatively distinct gray level properties [6]. 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 [7]. An effective edge detector reduces a large amount of data but still keeps most of the important feature of the image. 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 [8,9].
Most of the classical methods for edge detection based on the derivative of the pixels of the original image are Gradient operators, Laplacien and Laplacien of Gaussian (LOG) operators [7]. Many operators have been introduced in the literature, for example Roberts, Sobel and Prewitt [10][11][12][13][14]. 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.
Gradient based edge detection methods, such as Roberts, Sobel and Prewitts, have used two linear filters to process vertical edges and horizontal edges separately to approximate first-order derivative of pixel values of the image. Marr and Hildreth achieved this by using the Laplacien of a Gaussian (LOG) function as a filter [15]. The paper [9] used 2-D gamma distribution, the experiment showed that the proposed method obtained very good results but with a big time complexity due to the big number of constructed masks. To solve these problems, the study proposed a novel approach based on information theory, which is entropy-based thresholding. The proposed method is decrease the computation time. The results were very good compared with the well-known Sobel gradient [16] and Canny [17] gradient results.
The outline of the paper is as follows. In section 2, we have presented the classical edge detection methods that related to the paper. Image thresholding based on Shannon entropy is presented in section 3. Section 4, describes the proposed algorithm of edge detection. In section 5,we have presented the effectiveness of proposed algorithm in the case of real-world and synthetic images, is also, we compare the results of the algorithm against several leading edge detection methods. Conclusion and feature work are presented in Section 6.

II. CLASSICAL EDGE DETECTION METHODS
Five most frequently used edge detection methods are used for comparison. These are: Gradient operators (Roberts, Prewitt, Sobel), Laplacian of Gaussian (LoG or Marr-Hildreth) and Gradient of Gaussian (Canny) edge detections [17,18]. People which would like to read about this subject are referred to [19,20,21] evaluation studies of edge detection algorithms according to different criteria. The details of methods as follows: 91 | P a g e www.ijacsa.thesai.org

A. Roberts edge detector:
It was one of the first edge detectors and was initially proposed by Lawrence Roberts in 1963. It performs a simple, quick to compute, 2-D spatial gradient measurement on an image. It thus highlights regions of high spatial frequency which often correspond to edges [18]. The input to the operator is a grayscale image the same as to the output is the most common usage for this technique. Pixel values in every point in the output represent the estimated complete magnitude of the spatial gradient of the input image at that point, as shown in Figure 1.

B. Prewitt edge detector:
It based on the idea of central difference. It measures two components. The Prewitt edge detector is an appropriate way to estimate the magnitude and orientation of an edge. Although differential gradient edge detection needs a rather time consuming calculation to estimate the orientation from the magnitudes in the x and y-directions, the compass edge detection obtains the orientation directly from the kernel with the maximum response. The operator is limited to 8 possible orientations, however experience shows that most direct orientation estimates are not much more accurate. This gradient based edge detector is estimated in the 3×3 neighbourhood for eight directions as shown in Figure 2. All the eight convolution masks are calculated. One convolution mask is then selected, namely that with the largest module [18].

C. Sobel edge detector:
The Sobel operators are named after Erwin Sobel. The Sobel operator relies on central difference, but gives greater weight to the central pixels when averaging. The Sobel operator can be thought of as 3×3 approximations to first derivative of Gaussian kernels. Sobel operators which are shown in the masks below (rotated by 90°): [18].
Gx Gy

D. Laplacian of Gaussian Edge detection (LOG)
This LOG operator smoothes the image through convolution with Gaussian-shaped kernel followed by applying the Laplacian operator. Laplacian of Gaussian edge detection mask is: Gx Gy Fig. 4. LOG gradient estimation operator.

E. Canny edge detector:
The Canny edge detector is an edge detection operator that uses a multi-stage algorithm to detect a wide range of edges in images. It was developed by John F. Canny in 1986. Canny's aim was to discover the optimal edge detection algorithm. In this situation, an "optimal" edge detector means:  Good detectionthe algorithm should mark as many real edges in the image as possible.
 Good localizationedges marked should be as close as possible to the edge in the real image.
 Minimal responsea given edge in the image should only be marked once, and where possible, image noise should not create false edges.
The method can be summarized below: [22] 1) The image is smoothed using a Gaussian filter with a specified standard deviation, to reduce noise.
2) The local gradient and edge direction are computed at each point using different operator.
3) Apply non-maximal or critical suppression to the gradient magnitude. 4) Apply threshold to the non-maximal suppression image.

III. SHANNON ENTROPY AND IMAGE THRESHOLDING
Entropy is a concept in information theory. It is used to measure the amount of information [23]. It 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) : 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. The base of the logarithm determines the unit which is used to measure the information. www.ijacsa.thesai.org If the base of the logarithm is 2, then unit of information is bit. If P(E)= ½, then I(E)= -log 2 (½) = 1 bit. That is, 1 bit is the amount of information conveyed when one of two possible equally likely events occurs. An example of such a situation is flipping a coin and communicating the result (Head or Tail) [24,25] The basic concept of entropy in information theory has to do with how much randomness is in a signal or in a random event. An alternative way to look at this is to talk about how much information is carried by the signal. Entropy is a measure of randomness. Consider a probabilistic experiment in which the output of a discrete source is observed during every unit of time (signaling interval). The source output is modeled as a discrete random variable Z. Z is referred as a set of source symbols [26]. The set Z of source symbols is referred to as the source alphabet, Z= {z 1 , z 2 , z 3 , ..., z k }.
The source symbol probabilities is P= {p 1 , p 2 , p 3 , ..., p k }. This set of probabilities must satisfy the condition sum(p i )=1, 0 ≤ p i ≤ 1. The average information per source output, denoted S(Z) [26], Shannon entropy may be described as: k is the total number of symbols. If we consider that a system can be decomposed in two statistical independent subsystems A and B, the Shannon entropy has the extensive property (additivity): this formalism has been shown to be restricted to the Boltzmann-Gibbs-Shannon (BGS) statistics.
Let f(x, y) be the gray value of the pixel located at the point (x, y). In a digital image Typically b 0 and b 1 are taken to be 0 and 1, respectively. The result of thresholding an image function f(x, y) at gray level t is a binary function ft(x, y) such that . 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 [24,25].
Let p i = p 1 , p 2 . . . p k 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 Shannon entropy for each distribution is defined as: We try to maximize the information measure between the two classes (object and background). When S(t) is maximized, the luminance level t that maximizes the function is considered to be the optimum threshold value .
In the proposed scheme, first create a binary image by choosing a suitable threshold value using Shannon entropy. The Threshold procedure find the suitable threshold value * t for grayscale image f . It can now be described as follows: Procedure Threshold,

Input:
A grayscale image f of size m × n with histogram H.

Output:
* t of f .

Begin
Step 1: Let f(x, y) be the original gray value of the pixel at the point (x, y), x=1..m, y=1..n .

IV. THE PROPOSED MULTI-THRESHOLD ALGORITHM
This section presents the concept of object connectivity. It introduces a technique of edge detection based on entropy and geometric properties of the object. Geometric properties such as connectivity, projection, area, and perimeter are important components in binary image processing. An object in a binary image is a connected set of pixels. In what follows, we present some definitions related to connectivity of pixels in a binary image [25]. www.ijacsa.thesai.org Connected Pixels: A pixel f 0 at (i 0 ,j 0 ) is connected to another pixel f n , at (i n ,j n ) if and only if there exists a path from f 0 to f n , which is a sequence of points (i 0 ,j 0 ), (i 1 ,j 1 ),…, (i n ,j n ), such that the pixel at (i k ,j k ) is a neighbor of the pixel at (i k+1 ,j k+1 ) and f k = f k+1 for all, 0< k < n -1.

8-connected:
When the pixel a t location (i, j) has. in addition to above two types of four immediate neighbors, together, they are known as 8-connected. Thus two pixels are eight neighbors if they share a common corner. This is shown in Figure (5-c).  In order to obtain edge detection, we find classification of all pixels that satisfy the criterion of homogeneousness, and detection of all pixels on the borders between different homogeneous areas. In the proposed scheme, first create a binary image by create a threshold value using Shannon entropy, using of the Threshold procedure. Region labeling in this system is done using 4-neighbor or 8-neighbor connectivity. A common alternative would be to use 4neighbor connectivity instead ( Figure 5).
The Edge Detection Procedure can be described as follows (using the 4-connected or diagonal 4-connected):

Procedure Edge Detection; Input:
A grayscale image f of size m×n and * t .
Output: The edge detection image g of f.

Begin
Step 1: Create a binary image: For all x, y, If Step 2: Initialization of the output edge image of size m×n, g(x, y) = 0 and for all x and y.
Step 3: Checking for edge pixels: For all 1< j< m, and 1< i< n do End For End Procedure.

and t 3 according to the condition, For all 1< j< m, and 1< i< n do: IF ((f(i,j)>= t 2 ) and (f(i,j)< t 1 )) or f(i,j)>= t 3 ) Then A(i,j)=1 else A(i,j) = 0. 5) Applying EdgeDetection procedure with A matrix to obtain the edge detection image g.
End Algorithm.
V. EXPERIMENTAL RESULTS AND DISCUSSION In order to test the method proposed in this paper and compare with the other edge detectors, common gray level test images with different resolutions and sizes are detected by the proposed method, Gradient of Gaussian (Canny), Laplacian of Gaussian (LoG or Marr-Hildreth), Prewitt, Roberts and Sobel methods respectively.
The performance of the proposed scheme is evaluated through the simulation results using MATLAB. Prior to the application of this algorithm, no pre-processing was done on the tested images.
As the algorithm has two main phasesglobal and local enhancement phase of the threshold values and detection phase, we present the results of implementation on these images separately. 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).
Though the performance of the proposed entropic edge detector excels as a shape and detail detector, it is fraught with some drawbacks. It fails to provide all thinned edges. The weak edges are not eliminated but for some applications, these may be required.
This detector has another distinctive feature, i.e. it retains the texture of the original image. This feature can be utilized for the identification of fingerprints, where the ridges may have different intensities. We are experimenting on several images to come up with a useful selection guideline.      Second, PSNR, Peak Signal-to-Noise Ratio, often abbreviated PSNR, is an engineering term for the ratio between the maximum possible power of a signal and the power of corrupting noise that affects the fidelity of its representation [26]. Because many signals have a very wide dynamic range, PSNR is usually expressed in terms of the logarithmic decibel scale.  This paper shows the new algorithm based on the Shannon entropy for edge detection using histogram of the image. The objective is to find the best edge representation and minimize the computation time. A set of experiments in the domain of edge detection are presented. An edge detection performance is compared to the previous classic methods, such as, LOG, Prewitt, Roberts and Sobel. Analysis show that the effect of the proposed method is better than those methods in execution time, also is considered as easy implementation. The significance of this study lies in decreasing the computation time with generate suitable quality of edge detection. In this way entropic edge detector presented in this paper uses Shannon entropy with multi threshold values. It is already pointed out in the introduction that the traditional methods give rise to the exponential increment of computational time.
Experiment results have demonstrated that the proposed scheme for edge detection can be used for different gray level digital images. Another benefit comes from easy implementation of this method. An important future investigation will be the study of edge detection in the case of automatic target recognition, medical image applications and detection of video changes.