Performance Evaluation of Edge Detection Using Sobel, Homogeneity and Prewitt Algorithms

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, Homogene-ity 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 Pre-witt and Homogeneity algorithms performance were better than Sobel algo-rithm. Therefore, Prewitt and Homogeneity algorithms can be recommended as useful detection tools in edge detection.


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].
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.

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.

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.

( )
Sobel and Prewitt involution masks can be illustrated in Table 1 and Table 2.
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.

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 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.

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.

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

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:

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.

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.

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. 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.

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.

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. Journal of Software Engineering and Applications

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.

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.

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.

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.

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

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.