JSEA  Vol.11 No.11 , November 2018
Performance Evaluation of Edge Detection Using Sobel, Homogeneity and Prewitt Algorithms
ABSTRACT
Edge detection considered as very important and fundamental tool in image processing. An image edge is a very sensitive place where the image information and details mostly placed on it. Different filters were used to detect and enhance these edges to improve the sharpness and raising the image clarity. The significance of this paper comes from the study, compare and evaluate the effects of three well-known edge detection techniques in a spatial domain, where this evaluation was performed using both subjective and objective manner to find out the best edge detection algorithm. The Sobel, Homogeneity and Prewitt algorithms were used on 2D gray-scale synthesis and real images in Jordan using C# programming language. According to the comparative results obtained using the three techniques, it was clearly found that Prewitt and Homogeneity algorithms performance were better than Sobel algorithm. Therefore, Prewitt and Homogeneity algorithms can be recommended as useful detection tools in edge detection.

1. Introduction

The science of image processing is considered as a very important digital computer processing technique. This technique is widely used on digital computer images for feature extractions, recognition, and segmentation etc. Image processing techniques were applied on different 2D and 3D gray and color images for recognizing an image special and important part. It is widely used in numerous applications such as medical images reading and recognizing, television broadcasting images, images collected from satellite, and computer vision applications.

Edge detection technique was started from the science of image analyzing and processing. The edge may contain the most important image information. This edge constituted from a set of pixels that are closely connected to form a boundary between two disjoints regions. It is the technique where the images are segmented into regions of discontinuity and working on that discontinuity to detect the meaningful information from both gray and color images. Looking inside the image to find the physical objects is the main objectives of edge detection. The edge consists of straight lines or curves in the perimeter of the image, where an important change in the image brightness is existed [1] [2].

The diversity in the pixels intensities plays an important role in selecting the edge detector type such as step edge detectors, line edge detectors, junction edge detectors, corner detectors, and roof edge detectors [3] [4]. The edge detectors main work includes smoothing, enhancing and localizing the image edges using the different filters such as the low pass and high pass filters [5].

Using the different edge detectors’ types requires a number of parameters to be initialized for each type. These parameters are used to define the common features that distinguish between the detectors performance and work [5].

Working on edge detection requires the design of new precise algorithms to be able to work on various image’s parts. In general, there are two models that are widely used for edge detection, the first one is working on finding the differentiation between the two colors, it is known as the ideal digital edge model, where the second model is working on identifying the edges that counted by moving from one color to another, which is known as ramp digital edge model [6] [7] [8]. We used the second model in this paper.

In this paper, we used the most popular detector known as a step edge detector, where most of its edges occurred at the time when two constant gray levels of distinct intensities are neighbored. The edge detector works on the concept of receiving a digitized discrete image as input, then analyzing it and producing a map for the edge as an output. These edges may contain important and obvious information about the edge position and strength [9]. The edges detectors can be classified as follows [9] :

1) Edge detectors that works based on the concept of Differentiation or the early vision like the Gradient method. [10] [11].

2) Models of parametric fitting that are used by operators [12] [13].

3) Detectors that work on optimal edges [14] [15].

4) Multiscale Edge detectors [16] [17] [18].

This work is an extension of a previous work done by [19]. This paper is organized according to the following format; Section 2 describes the literature review. Section 3 describes the edge detector masks. Section 4 describes the performance evaluation. Section 5 describes the image detection results. Finally, Section 6 presents the conclusion.

2. Literature Review

Researchers have released numerous edge detection techniques to be used in many applications, such as: Image segmentation, image compression, image enhancement, medical diagnosis, computer vision, etc. [20]. This section is concerned with the evolution of step edge detectors the eldest and the most popular edge detectors were the differentiation operators such as Gradient (such as Sobel, Homogeneity and Prewitt operators) and Laplacian operators [11] [21] proposed thirty years ago. The mask of these operators is fixed to a 3 by 3 cell matrix. Gradient operator is known as a local maxima operator while Laplacian operator is known as zero-crossing operator [2].

Object detection techniques depends on edge detection algorithms in initial steps, where the type of the edges can help in determine the type of detected object. Therefore, researchers found that edges can be categorized into for types; step edge, ramp edge, ridge/line edge, and roof edge [20]. Moreover, edge detection algorithm can serves as a good initial step to simplify the processed images which reduces the amount of data that need to be processed [22].

As a very common first order edge detection, Sobel and Prewitt algorithms compute the gradient of the image intensity approximately [20] [23]. Researchers in [20] [23] [24] [25] , benefit from MATLAB tools by implementing Sobel and Prewitt algorithms. Sahoo and Pine in [23] proposed a new design model for Sobel edge detection algorithm to be coded using MATLAB Simulink. The experimental results presented by Adlakha in [20] , shows that the used technique in Prewitt edge detection algorithm is better than the Sobel edge detection technique.

Zhang et al. in [26] improve the traditional Sobel algorithm to be based on field programmable gate arrays (FPGA) which is enhanced based on FPGA technology. The extended algorithm benefits from the FPGA technology which enhances the performance of improved algorithm according to parallel processing capability and high reliability. Where, the traditional Sobel algorithms were implemented by software. Authors in [19] evaluated the performance of four edge detectors, Sobel, Krish, vertical and horizontal. The comparative results show that the Sobel edge detector performance was better than the Krish vertical and horizontal edge detectors algorithms.

3. Description of Edge Detector Masks

3.1. Sobel and Prewitt Edge Detectors

Three involution masks were used by Sobel, and Prewitt techniques for edge detection purpose named as presumably. These masks were applied to find out the horizontal and vertical image edges using Equation (1) explained below.

Pixel = sqrt ( pexil v 1 pexil v 1 + pexil v 2 pexil v 2 ) (1)

Sobel and Prewitt involution masks can be illustrated in Table 1 and Table 2.

Different edge detector types mean different involution masks. The working of Sobel as an edge detector technique is based on finding the image gradient via

(a) (b)

Table 1. Sobel detector mask. (a) Gn; (b) Gm.

(a) (b)

Table 2. Prewitt detector mask. (a) Gn; (b) Gm.

computing the discrete differences between rows and columns of 3 × 3 neighborhoods. This is done based on image involution to a tiny, discrete filter with high valued. Moreover, the Sobel edge detector can be implemented on images of very low noise, it has the ability to find out the small edges in the image, and it produces images with less level of noise. Table 1 shows how the gradient is computed in both directions; vertical (n) and horizontal (m). In a similar way the Prewitt mask works to approximate digitally the first derivatives where the gradient is computed around the vertical (n) and horizontal (m) directions as shown in Table 2. Prewitt produce images with a high level of noise. The edge detection filters main work concentrates on discovering and finding the contrast of pixels in the image which is done via different ways. The negative weights applied on one edge, and the positive one applied to the other edge by the involution filters. This means that going towards the zero if the values are same and going upwards if contrast exists.

These masks were carried out by the detectors via selecting a window of 3 × 3 and multiplying the different pixels values by the mask value, where any increase in any point indicates the presence of an edge or a boundary.

3.2. Homogeneity Edge Detector

Convolution filters can do a different type of beneficial works. However, the minor problem with convolution masks for edge detection is in the unsatisfactory process, which it is as much as unnecessarily expensive. To overcome this problem, we used also the homogeneity algorithm for edge detection, which involves iterating through the image directly and doing several comparisons on neighboring pixels, by treating the resultant values differently to a convolution filter.

The edge is perceived in the image by conducting changes in the color between two objects, for an edge to be apparent. In other words, if the pixel value is taken and stored as its value indicates the greatest difference between its starting value and the values of its eight neighbors, the result will be a black part of the image because of the similarity between the pixels values. Furthermore, if the threshold is allowed to be a set and the set values below this to 0, then the soft edges are eliminated to whatever degree; the operator desires.

Using homogeneity algorithm, the edge pixel will have a high value and the non-edge pixel will have a low value. The threshold defined by the user will be applied to the image to mark the edges by using 8 pixels as neighbor on operator mask of 3 × 3.

4. Performance Evaluation

Evaluating the performance of the edge detector is a very sensitive task that should satisfy the following important points;

• Real images should be used to compare and evaluate the performance of the edge detectors.

• The comparison results should be close to the actual resulted edges quality.

• A visualized system must be used for the evaluation purpose [19] [20].

The process of detecting an edge can be done either using theoretical evaluation [11] [21] , where the inputs from the detector will be submitted to a simulator of simplified mathematical model to distinguish and measure its performance or by using analysis evaluation [2] [22] , where different parameters of an edge algorithm were applied to the image. The performance evaluation is computed according to efficiency of the different algorithms. This technique uses a very simple mathematical model which is more subdivided into either ground truth analysis evaluation [2] or with no ground truth analysis evaluation [11]. This Classification can be shown in Figure 1.

4.1. Subjective Performance Evaluation

In this research, the subjective evaluation was used to compare the various images. Four real and four synthesis images were used. According to Table 3, level of edge discontinuity, the amount of detail in the image and the level of noise in the image are the three different factors that we used in this research to determine the image edge quality. Each of these factors will be given a number from 1 to 5, where 1 is the lowest evaluation and 5 is the highest. Actually, these values are specified by three observers’ specialist in the image field. Everyone should decide separately his evaluation by comparing the original image with the produced one.

Figure 1. Edge detector evaluation criteria.

Table 3. Subjective evaluation.

4.2. Objective Performance Evaluation

Detecting an edge in the image is a very important task includes searching and finding the brightness pixels. Therefore, a more practical technique [27] has been developed to reduce the effort required to obtain the estimated ground truth. The proposed technique is addressed in the following phases:

1) Using the different picturing system to find out the ground truth manually.

2) Reading directly the edges that resulted from the ground truth.

3) Implement the required edge detector algorithm on the real image.

4) Comparing the results from both edges, i.e. the ground truth and the edges resulted from the detectors using Equation (2) by calculating the difference between the both:

P ( I , l , μ ) = | A B | A B | = | A B | | A | + | B | | A B | (2)

5. Images Detection Results

Different types of images were used in this study, these images were categorized into high, medium and low detailed images. These images are carefully selected taking into consideration to be a rich with details such as curves, lines, and special types of lines as shown in Figure 2 and Figure 3 for both synthesis and real images.

5.1. Subjective Images Evaluation Results

In the subjective evaluation as we explained before the observers judged the image edge quality based on the criteria explained in Table 2.

Figure 2. Synthesis images.

Figure 3. Real images in Jordan.

5.1.1. Synthesis City Image Result

Sobel, Homogeneity and Prewitt edge detectors were applied to the city image and the result of each one was compared with the original image as shown in Figure 4 and Table 4.

5.1.2. Synthesis Spider Image Result

Table 5 shows the professionals’ evaluation results. It is based on applying the three edge detectors on the spider image. Moreover, the output images of the three edge detectors were computed and compared with the original image as shown in Figure 5.

5.1.3. Synthesis Fahel City Image Result

The three edge detectors were applied on Fahel city image. Table 6 shows the professionals’ observation of the produced images. The original image and resulted images are shown in Figure 6.

5.1.4. Synthesis Village Map Result

The original image of the village map with the resulted images is shown in Figure 7. The resulted images were compared with the original image by the professionals’ observation as shown in Table 7.

Figure 4. City images using the three edge detectors.

Figure 5. Spider images using the three edge detectors.

Figure 6. Fahel city images using three edge detectors.

Figure 7. Village map using the three edge detectors.

Table 4. City image average assessment table.

Table 5. Spider image average assessment table.

Table 6. Fahel city image average assessment table.

Table 7. Village map average assessment table.

5.1.5. Real Petra Image Result

The performance of the edge detectors differs between synthetic and real images, that is; the real images might be considered more complicated than synthetic images in terms of having different granularities of a gray-scaled level. In addition, the noise pertained in the real images is considerably high when compared to the noise in the synthetic images. The historical Petra city was evaluated after applying the three different edge detectors where Figure 8 presents. The professionals’ observation also is presented in Table 8.

5.1.6. Real Jarash Image Result In Jordan

The resulted images in Figure 9, from applying the three edge detectors on Jarash real image in Jordan were compared to the original image. Table 9 presents the professionals’ observation.

5.1.7. Real Nature Image Result in Jordan

The results from applying the three edge detectors can be shown in Figure 10, and Table 10 shows the professionals’ observation.

5.1.8. Real Old Hotel Image Result in Jordan

The result from applying the three edge detectors on an old hotel image in Jordan is shown in Figure 11, where Table 11 shows the professionals’ observations.

5.2. Objective Tested Images Results

The objective evaluation of both images’ types is applied to compare the three edge detectors algorithms. The objective evaluation uses the rules explained in Equation 2 to compute the ratio of the number of edges matched between the ground truth image and the images produced from the applied edge detector. Tables below from 12-19 show the performance of the objective.

Figure 8. Petra real images using three edge detectors.

Figure 9. Jarash real images using the three edge detectors.

Figure 10. Nature real images using three edge detectors.

Figure 11. Real old hotel images using three edge detectors.

Table 8. Petra city image average assessment table.

Table 9. Jarash real image average assessment table.

Table 10. Nature image average assessment table.

Table 11. Real old hotel image average assessment table.

Table 12. City synthesis image objective test.

Table 13. Spider synthesis image objective test.

Table 14. Fahel synthesis image objective test.

Table 15. Village synthesis image objective test.

Table 16. Petra real image objective test.

Table 17. Jarash real image objective test.

Table 18. Nature real image objective test.

Table 19. Hotel real image objective test.

6. Conclusions

In this paper, a comparison was implemented between the three edge detectors techniques (Sobel, Homogeneity, and Prewitt) using synthesis and real images. Also, we applied a subjective and objective evaluation of the resulted images for the three edge detectors. The comparison results on the different images show that the Prewitt edge detector performance on synthesis images using subjective evaluation was better than other edge detectors, followed by Homogeneity and Sobel. On the other side, Prewitt edge detector produces images with the highest degree of edge connectivity. Moreover, it shows the highest amount of detail as well as producing images with the lowest degree of noise. For real images, Homogeneity and Prewitt edge detectors have almost a similar performance.

Using objective evaluation, all the images were also tested again. From the result obtained it was found that Prewitt and Homogeneity performance results are better than the Sobel edge detector results.

Cite this paper
Baareh, A. , Al-Jarrah, A. , Smadi, A. and Shakah, G. (2018) Performance Evaluation of Edge Detection Using Sobel, Homogeneity and Prewitt Algorithms. Journal of Software Engineering and Applications, 11, 537-551. doi: 10.4236/jsea.2018.1111032.
References
[1]   Russell, S.J. and Norvig, P. (2016) Artificial Intelligence: A Modern Approach.

[2]   Bae, S.C., Kweon, I.S. and Yoo, C.D. (2002) COP: A New Corner Detector. Pattern Recognition Letters, 23, 1349-1360.
https://doi.org/10.1016/S0167-8655(02)00083-1

[3]   Argialas, D. and Campus, Z. (2000) Comparison of Edge Detection and Hough Transform Techniques for the Extraction of Geologic Features. Image Rochester NY, 34, 790-795.

[4]   Canny, J. (1986) A Computational Approach to Edge Detection. IEEE Transactions on Pattern Analysis and Machine Intelligence.
https://doi.org/10.1109/TPAMI.1986.4767851

[5]   Ziou, D. and Tabbone, S. (1998) Edge Detection Techniques—An Overview.

[6]   Yen, T. (2003) A Qualitative Profile-Based Approach to Edge Detection. PhD Thesis, September 2003.

[7]   Parker, J.R., Jim, R. and Terzidis, K. (2011) Algorithms for Image Processing and Computer Vision. Wiley Pub.

[8]   Myler, H.R. (1999) Fundamentals of Machine Vision. SPIE Optical Engineering Press.

[9]   Armenakis, C. and Savopol, F. (2004) Image Processing and GIS Tools for Feature and Change Extraction. XXth Congress of the International Society for Photogrammetry and Remote Sensing, Istanbul, Commission IV, WG IV/7, 6.

[10]   Maini, R. and Sohal, J.S. (2006) Performance Evaluation of Prewitt Edge Detector for Noisy Images. International Journal on Graphics, Vision and Image Processing, 6, 39-46.

[11]   Hueckel, M.H. and H., M. (1973) A Local Visual Operator Which Recognizes Edges and Lines. Journal of the ACM, 20, 634-647.
https://doi.org/10.1145/321784.321791

[12]   Nalwa, V.S. and Binford, T.O. (1986) On Detecting Edges. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-8, 699-714.
https://doi.org/10.1109/TPAMI.1986.4767852

[13]   Roushdy, M. (2006) Comparative Study of Edge Detection Algorithms Applying on the Grayscale Noisy Image Using Morphological Filter. ICGST-GVIP Journal, 6, 17-23.

[14]   Tagare, H.D. and de Figueiredo, R.J.P. (1994) Reply to “On the Localization Performance Measure and Optimal Edge Detection”. IEEE Transactions on Pattern Analysis and Machine Intelligence, 16, 108-110.
https://doi.org/10.1109/34.273709

[15]   Fram, J.R. and Deutsch, E.S. (1975) On the Quantitative Evaluation of Edge Detection Schemes and Their Comparison with Human Performance. IEEE Transactions on Computers, C-24, 37-42.
https://doi.org/10.1109/T-C.1975.224274

[16]   Hou, Z.J. and Wei, G.W. (2002) A New Approach to Edge Detection. Pattern Recognition, 35, 1559-1570.
https://doi.org/10.1016/S0031-3203(01)00147-9

[17]   Zheng, S., Liu, J. and Tian, J.W. (2004) A New Efficient SVM-Based Edge Detection Method. Pattern Recognition Letters, 25, 1143-1154.
https://doi.org/10.1016/j.patrec.2004.03.009

[18]   Bowyer, K., Kranenburg, C. and Dougherty, S. (1999) Edge Detector Evaluation Using Empirical ROC Curves Service Productivity and Value Co-Creation View project Social Acceptance of Autonomous Trucks View Project Edge Detector Evaluation Using Empirical ROC Curves.

[19]   Baareh, A.K.M., Smadi, A.M., Freihat, K. and Al-jarrah, A. (2011) Evaluating the Performance of Edge Detection Techniques through Gradient Method. Engineering, 6, 115-127.

[20]   Adlakha, D., Adlakha, D. and Tanwar, R. (2016) Analytical Comparison between Sobel and Prewitt Edge Detection Techniques. International Journal of Scientific & Engineering Research, 7, 1482-1485.

[21]   Prewitt, J. (1970) Object Enhancement and Extraction. In: Picture Processing and Psychophysics, Elsevier Science, Amsterdam, 75-149.

[22]   Dutta, S. and Chaudhuri, B.B. (2009) A Statistics and Local Homogeneity Based Color Edge Detection Algorithm. International Conference on Advances in Recent Technologies in Communication and Computing, Athens, 29-31 October 2009, 546-548.
https://doi.org/10.1109/ARTCom.2009.71

[23]   Sahoo, T. and Pine, S. (2016) Design and Simulation of SOBEL Edge Detection Using MATLAB Simulink. International Research Journal of Engineering and Technology, 3, 2395-2356.

[24]   Acharjya, P.P., Das, R. and Ghoshal, D. (2012) A Study on Image Edge Detection Using the Gradients. International Journal of Scientific and Research Publications, 2, 2-6.

[25]   Shrivakshan, G.T. and Chandrasekar, C. (2012) A Comparison of Various Edge Detection Techniques Used in Image Processing. International Journal of Computer Science Issues, 9, 269-276.

[26]   Zhang, K., Zhang, Y., Wang, P., Tian, Y. and Yang, J. (2018) An Improved Sobel Edge Algorithm and FPGA Implementation an Improved Algorithm and FPGA Implementation. Procedia Computer Science, 131, 243-248.
https://doi.org/10.1016/j.procs.2018.04.209

[27]   Wang, S., Ge, F. and Liu, T. (2006) Evaluating Edge Detection through Boundary Detection. EURASIP Journal on Applied Signal Processing, 2006, Article ID: 076278.

 
 
Top