Edge Detection Using Histogram Localization

ABSTRACT


INTRODUCTION
Edges play a dominant role in the image processing and computer vision field. It is used in the object detection, shape detection and more. There are algorithms still in use for better edge detection. Edges within the noisy image are marked along with non-salient information. Image acquisition at some typical situation leads to noises. The image may be captured in the smoke or fog environment. The semantics part of the image may lose during its edge detection. In this paper, a new algorithm is developed based on the histogram technique. The result is based on the presence of intensity distribution, even the image is hazy. Even human perception may fail at just looking upon the image. The boundary of the object may be difficult to perceive due to heavy fog or smog. The computational approach of this algorithm determines the edges in the hazy situation and gives good results. There are results which have been discussed here. The astronomical image edge detection gives a great result compared with existing model. Texture determination is also difficult in noisy images. Even though there are few methods which are implemented to extract the edges, the proposed approach besides gives a better result. The texture content is preserved during this edge extraction method. At certain situation where the texture content is more important, the edge will be determined even in the obscure condition. Edge information is lost in low-resolution images when the images are converted from The most popular technique used for edge detection is canny edge detection method. This gives low error rate as proposed by Canny [18]. In this method, Image is smoothened by a Gaussian filter and the intensity gradient along x direction and y direction is computed using Sobel kernel. Gradient is the change in brightness over a series of pixels. Direction can be found using the gradient along x and y directions. Non maxima suppression is performed by removing pixels that are not considered to be part of an edge. A binary image is formed with the thin edge. The thin edge is maintained by removing the edge pixels that are not along the edge direction. Canny preserves the dominant edges. Canny detection methodology uses the gradient values in determining edges, where some low level gradients will be failed to recognize. Due to the loss of quality during the acquisition of the image, distortions of the intensity will be more that will make the edge detection worse.
The major advantage of the proposed work is the presence of intensity distribution over the image. The low level gradients are identified easily as the algorithm performs computation for all intensities individually using histogram technique.

Problem
The focal length of a camera affects the image in case of locating the far away objects. Edge detection over such images gives poor results. The images affected by noises will hold its most anticipated region less obscure. The proposed method recovers edge information in these noisy images. This method is found to be less affected by the illumination.

Proposed Solution
The proposed method can define the semantics part clearly along with the edges. Histogram technique is used to give the importance to all intensities. Hence, the weak gradients are also identified along with the salient edges. The nearer coherent intensity blocks sometimes deceived as separate regions due to the presence of noises or poor quality of the image. The proposed approach founds the nearer coherent region to avoid false noises and selects the better edge results. This is one of the major advantages over the proposed approach. This illusion of different region is clearly interpreted in Figure 8. These can be avoided by choosing better threshold value to trace out true edges. If threshold value is low then algorithm traces every nearer coherent intensity blocks boundary as edges and prediction of false noises will be more. Thus the threshold value is chosen bigger in order to avoid more false edge in the image. The canny edge detection algorithm works good but for certain noisy images, it gives the edge information for noises also. The performance of this approach is more evident when considering high resolution images.
The edge in the foreground shows much dominance than the background. Thus edges of the foreground objects will be traced evidently irrespective of the noises present in the image. Diagonal edges can also be traced using this proposed algorithm and provides obscure edge information as well. The dark textured background affected by shadows with and without noises can be traced. Experimental results shows that for lower resolution images, the parameters used for comparison here gives lower values indicates false edges are more. But for high resolution images, result shows that values are nearer to canny and sobel approach for common edge pixel present in both vertical and horizontal edge information. So, these results evidently shows, traced edges are nearly closer to true edges.

RESEARCH METHOD
The proposed approach is tested with BSDS300 Berkeley segmentation dataset and also with self acquired dataset which was made for this research. The images with various backgrounds and its noise model, texture model, astronomical images are tested with the proposed algorithm. Some of the sample images used [25], [20] and [21] here are shown in Figure 1.  The gray scale image is taken as input by the algorithm. The edge pixels are selected based on the localization of the intensities. The proposed technique will deliver two types of output: vertical edges and horizontal edges. Combination of these edges results in new kind of edge information. Results are unique. The overall system design is shown in Figure 2. The proposed method uses histogram for analyzing the intensity distribution. An edge has been determined from the intensity bin of the histogram rather generating directly from the image. Pixel coordinates are collected, for every intensity ranges. The distribution of these pixel values will not be continuous. This discontinuity determines the beginning and ending of edges all over the image in the proposed approach. Threshold value is finalized to avoid setting unnecessary pixels as edges. The image is recreated with edge distinguishing pixels from the histogram.
Let S be the set of pixel locations for the intensity p, The image ( , ) gives the edge information for the given image. The threshold value T is selected to suppress the few local maximum of the gradient values, for every intensity range. ( ) ( +1 ) both should lie on the same row or same column.
Steps involved in edge distinguishing algorithm are as follows: 1. Check the intensity values over the entire image.
2. If the values stored in histogram are consecutive and distributed with minimum gradient, set pixel value as black otherwise change to white. 3. Iterate through step 2 until last intensity value of the histogram bin.
The threshold value is chosen within the range of the first order derivative. It can be selected either as a local threshold for the individual intensity or as a global threshold for all the intensity. Threshold is performed to avoid certain local maximum of the first order derivative. The first order derivative of the cup image is shown in Figure 4(g). The results can be improved by adjusting the threshold value. The flow chart for the algorithm is shown in Figure 3. There are some studies made on the directional derivative as in [22] that also gives comparatively good results. The fractional differential gradient operator is also used for extracting the edges [25].  The rejection of pixels will follow the conditions as follows: The first order derivative of the clock image is shown in Figure 5(g). The threshold value has been taken as 500 by brute force method and this won't reject the pixels that has first order derivative less than the threshold value. The pixel intensity localization is considered if it is distributed continuously along the same row or column then the pixel is considered for comparing the first order derivative otherwise the pixel is rejected as non-salient edge.
Consider the sample intensity values of an Image as in Figure 6. The proposed algorithm is implemented in these values. The algorithm checks the consecutiveness of these values. If the intensity values are stored in consecutive locations, set pixel value as white at initial and terminal else set as black. Consider the intensity value 200, set the initial and terminal as 255 and remaining as 0. This sample value is verified, the result of the processed image is shown in Figure 7. The edge pixels are marked in white color.  The alarm clock image is taken for interpreting the pixel selection. The intensity value 149 is highlighted in Figure 8 (a). Figure 8 (a) and Figure 8 (b) show the comparison about the disappearances of certain pixels. Most of the pixels are not distributed continuously and they are rejected. The pixel that satisfies the constraint is marked in the resultant image is shown in Figure 8 This algorithm is tested with self-acquired data set. The gray level value of the alarm clock is given as input. It gives the result as shown in Figure 10. This gives vertical edges and horizontal edges. This edge information is utilized for developing new results by combining both the edges. It gives collective results as shown in Figure 10 (d). Comparison is made with the existent methodology is shown in Figure 10. Results are capable of recovering the trace of shadow, fine than the existing methodology.

RESULTS AND ANALYSIS
The algorithm is tested with standard dataset and also with the self-acquired dataset. The high resolution images are giving a better result. The results are good for higher resolution images since there is no loss of information or the original image is not under sampled. The intensity values are directly processed for finding its distribution to determine the edges. The horizontal and vertical edges are providing unique information. Few images gave a better detail in vertical edge information. Horizontal edge information had given enhanced results for other images. In this research the tests are done with different types of images. The result of the proposed algorithm is also utilized to bring two hybrid results. Combining both horizontal and vertical edge information had given stronger edge details. Common pixels present in both vertical edge information and horizontal edge information gives weaker edge details. For certain complicated images, the common pixel edge information results are clear compared to the other results.
Shadows are dark transparent part of the background present within the image. Shadow tracing of an object as shown in Figure 10 and Figure 11 is also possible with the algorithm. When compared the results with the existing methodology, shadow edge tracing gave fine results in this algorithm. The images shown in Figure 10 and Figure 11 are rich in illuminations. The edge detection for these images with the existing approach traces the unwanted edges along with salient information. Even though the canny approach performs Gaussian blurring [24] over the input image for edge detection, the edge traced by the proposed algorithm is improved for higher resolution images without implementing any preprocessing technique over the image.
Gorilla image as shown in Figure 17 had many noises around its body. Due to the intensity distribution of the hair, the output showed the intensity variations of every hair. The proposed approach brings the detail of the depth information in the image which is not shown in the existing model. This detail of the depth comparison is shown in Figure 17 with red markings. The comparison over the existing model is also shown for orangutan image in Figure 12 respectively. The proposed algorithm is also tested with noisy images. The prominent information of the image is retained. The noisy images used for testing contained Gaussian noises and salt & pepper noises. The output consists of more noises due to the presence of larger variations in intensity as noise pixels. As stated earlier, for certain images as shown in Table 1, the combined results of vertical and horizontal edge information gave good result compared with the individual results.
Texture contains more edge information than the typical region in an image. Texture tracing in this proposed approach gives good end result as traced in Table 2. The intensity distribution plays a dominant role in this method, even though the image is affected with noises.   The proposed algorithm works well in the astronomical images also. The distant object captured using the space telescope is processed very well using image processing techniques. The complex processing of the astronomical data shows much space debris. The image shown in Figure 13 contains stars in the core part, and it is not easily detected with human perception sometimes.  The edge detection in these images brings a good vision of exploring the space objects. The core region of the spiral galaxy consists of stars that are not visible and it can be seen clearly using the proposed approach. Even the swirl in the core is not visible with direct human vision also it is not observable by the existing edge detection approach but the proposed algorithm shows clearly about swirls within the core of the image as shown in Figure 13 (d). If the astronomical data is in original resolution without any compression then we can see the hidden objects even better than the human perception. Some of the detected cosmic dust and stars are highlighted in red mark with comparison over the existing methodology and it is shown in Figure 15 and Figure 16   Comparing the Lena image with different resolution in Table 3 with proposed and the existing approach, the higher resolution image has more prominent edge information. From top to bottom the image is filled with more noises given by the proposed approach. At the same time, when it is observed from bottom to top of the existing algorithm results, the results are better in low resolution images.
The major intensity variation is clearly visible in the higher resolution image than the lower resolution image. The results of the existing method are noble at low resolution. The proposed results shows fine results at the high resolution images. There is much variation in intensity at high resolution images so the existing approaches are showing maximum number of unwanted edges. Comparison of the performance of existing and the proposed edge detection methodology with respective ground truths are made and are shown in Table 4 and some of the image outputs are shown in Table 5. Ground truth images had been generated by using ImageJ tool. Berkeley Segmentation Dataset and few of its ground truth is taken for comparison as utilized in [25] Table 4 are taken for the low resolution images and high resolution images. PR is calculated as given in equation (1). True Edges (TE) referred here is edge pixels. False Edges (FE) referred here is the sum of non edge pixels identified as edges and edge pixels identified as non-edge pixels. JACCARD and DICE are calculated as given in equation (2) The performance results of the proposed and the existing algorithm is visualized by projecting them in charts. There are four charts shown in Figure 18, Figure 19, Figure 20 and Figure 21 each shows how the proposed work is deviated from the existing approach. These results are acquired for test images of different resolutions. This also shows how the results are better from the existing approach and every result is not better in the proposed approach. The Figure 18 shows the PSNR value, if the error in the edge image is minimum, the PSNR value raises. The higher the PSNR values better the results. If the error is maximum, then the value becomes low. From Figure 18, it is obvious that the low resolution image gives low values as a result of more noises. The combination of both horizontal and vertical edges of lower resolution image gives negative values proves the presence of more noise. Mostly, common edge image of the proposed work has the plot line closer to the existing approach than the other results. Especially, higher resolution image have nearly closer to the existing plot line. The Figure 19 shows the PR value.
The plot has some similar property as conferred in PSNR plot. The common edge image of higher resolution has the value closer to the existing approach. The plot in Figure 19 raises higher for certain images is actually depicting more false edges. The peak deviation is for the Lena image of dimension 256 X 256, as the proposed technique works better for high resolution images. The Figure 20 shows the JACCARD value. The Figure 21 shows the DICE value. The JACCARD index and DICE coefficient are similarity index describes how much the predicted image is similar to the ground truth image and its value lies between 0 and 1. Figure 18. PSNR values for each test images. Figure 19. PR values for each test images.
The common edge image line plot of higher resolution image mostly lies in between sobel and canny approach or nearer to the existing approach. The similar peak deviations in both of these plots are due to the result of the lower resolution lena image. From the overall performance, the common edge pixel of vertical and horizontal edges gives the most prominent edge information. For some cases the vertical edge or the horizontal edge gives better result depends on the applications.  The sample image taken for comparing the proposed method with canny edge detection result is shown in Figure 22 and Figure 23. The image has six parallel lines and another image is having an effect of salt and pepper noise. The major advantage over the proposed technique is that it rejects the false edges arise due to poor quality or the noises in the image. This can be explained by showing an intensity profile over the proposed output and the canny output over the test image. The spikes in the plot show how the edges are detected along with noises. Instead of six spikes for six parallel lines, the edge information for the noise image proves better than canny. The proposed approach is also tested with Gaussian noises in a similar way, but the results are not better as canny.

CONCLUSION
A novel approach for distinguish the edges for a given grey image is proposed. Edges are found along with noises for the lower resolution image. The results are improved over the existing approach for high resolution image. The proposed method uses the histogram technique to distinguish the edges within the image. The algorithm utilizes the discontinuity of the intensity distribution to mark the edge information. Even the algorithm is tested with Gaussian noise image and salt & pepper noise image, the results are better when compared with the existing approach. At a certain noisy type of images, edges of the texture are more visible than by the other methods. The depiction of the depth is also visible in the output. The algorithm can be enhanced by adjusting the threshold value to detect the prominent edges. The edge can be traced with the width of one pixel on further enhancement. Since it can trace the edges for every intensity bin of the given images, this will be more suitable for medical image analysis. The major advantage of the proposed work is rejection of the false edges for the nearer coherent region which sometime perceived to be two different region. This may be helpful in analyzing the medical images and other edge detection application.