A New Objective Evaluation Method on Image Edge Detection

: In the field of machine vision, image edge detection is an important technology, which can make necessary preparation for the later image processing. Consequently, accurate evaluation of the edge detection effect of the processed image is a more critical technology. In this paper, the new three criteria are proposed, which is based on Canny's three criteria for edge detection. Through theoretical analysis, three quantitative basic evaluation indexes are given to the new three criteria, namely SSIM index of image reconstruction similarity, BIdx index of edge reliability and CIdx index of edge continuity. Additionally, noise evaluation criteria is also considered. Then the four basic evaluation indexes are fused to get the objective evaluation index EIdx of image edge detection. Finally, the experimental data show that the accuracy of the method is better than that of the subjective evaluation system.


1.Introduction
Image edge detection is an important problem in image processing, and its results have a direct impact on the subsequent calculation. In 1965, someone proposed the edge detection operator based on spatial domain. The commonly used operators include Sobel, Robert, Canny and Prewitt. Literature [1] introduces several common algorithms, and compares their characteristics qualitatively through observation. In recent years, with the continuous development of computer and mathematics, there are a large number of detection algorithms, such as image edge detection based on multi granularity rough fuzzy set proposed by Wang Dan et al [2] ; A new fuzzy edge detection algorithm based on generalized fuzzy sets is proposed by Haitao Yu [3] . Image edge detection and location based on fourth order nonlinear interpolation is proposed by T.Hermosilla [4] . According to the idea of multi-structure and multi-scale, an edge detection method is proposed by Zheng Wang [5] , which combine morphological filtering and edge detection. On the basis of Canny algorithm, an adaptive smoothing and enhancement for image processing is proposed by Kegang Wang [6] . So far, there are many new models and algorithms for image denoising and edge detection [7] [8] . However, there is no quantitative numerical standard for the evaluation of edge detection results, which is often judged by the subjective evaluation method of the naked eyes [9][10] [11] .Due to the subjectivity of subjective evaluation methods, even for the same test results, the evaluation results are often different in different environments and different atmospheres [12][13] [14] .Therefore, a specific quantitative numerical index to evaluate the quality of the detection results is needed to be establish. Generally speaking, for mainstream computer vision, the results of edge detection should meet the following requirements, namely, canny proposed three criteria of edge detection in 1986 [15] [16] [17] [18] .
(3) Edge continuity. Among them, "Edge detection accuracy" requires that the algorithm does not miss the detection of effective edges [19] [20] ; "Edge location accuracy" requires that the edge detected by the algorithm should be reliable and reduce the existence of false edges such as noise; [21] [22] "Edge continuity" requires that the results detected by the algorithm should be as continuous as possible, so as to effectively describe the target object and prepare for the subsequent processing of computer vision [23] [24][25] [26] . Therefore, the above three criteria proposed by Canny are transformed into the following three criteria: (1)The image restored by edge detection results should be as similar as possible to the original image.
(2)The edge reliability of edge detection results should be as high as possible.
(3)The edge continuity of edge detection results should be as strong as possible.
Here, each criterion is quantified. The weighted sum of the three indexes is the evaluation index of edge detection. The diagram is illustrated in Figure 1. This method enriches the evaluation system of image edge detection, overcomes the subjective influence of the evaluation system, and improves the practical application of image edge detection results. At present, this method has achieved relatively good results.

2.Results
By testing the Lena image with size of 512 × 512, the edge detection models are selected as follows: (1)  (1)thermal diffusion model (2) P-M model (3) catte mode (4) classic TV model (5)generalized TV model (6) adaptive TV model (7) Y-K model (8) improved Y-K model Figure 2. Edge detection results of Lena images with eight models (noise interference) Through the subjective evaluation method, the following conclusions are obtained: (1) The thermal equation diffusion model and the generalized TV (P = 1.5) model have the worst edge detection results. The number of edge pixels is small and discontinuous, and the hair texture of Lena is seriously missing; (2) In the presence of noise, the detection results of P-M model and catte model are different. It can be seen that the edge of P-M model is shaky, and the edge positioning is not accurate. At the same time, it also verifies that the P-M method is "ill conditioned", that is, little input difference will cause complete change of output; (3) The classical TV model is similar to the adaptive TV model, which can not be observed by naked eyes; (4) Compared with the improved Y-K model, the classical Y-K model has the "speckle effect" interference, and the number of edge pixels, hair texture, and edge continuity are also significantly lower than the improved Y-K model; In order to verify the conclusion of the above subjective evaluation method, the new comprehensive evaluation index EIdx of edge detection proposed in this paper is used for verification, as shown in Table 1 and Figure 4. The comprehensive evaluation index of edge detection clearly shows the conclusion obtained by subjective evaluation method.
(1) The comprehensive evaluation index EIdx of thermal diffusion model and generalized TV (P = 1.5) model is the worst among all the models; (2) In the presence of noise, the effect of P-M model and catte model on edge detection is lower than that of catte model. It is verified that the P-M method is "ill conditioned", that is, a small change in the input will lead to a complete change in the output; (3) The results show that the adaptive TV model is better than the classical TV model in the case that the detection effect of the classical TV model and the adaptive TV model can not be observed by naked eyes, and the comprehensive evaluation index EIdx can accurately show that the adaptive TV model is better than the classic TV model, which proves that the adaptive TV model is an effective improvement of the classic TV model; (4) Compared with the traditional Y-K model and the improved Y-K model, the improved Y-K model is higher than the classical Y-K model in the comprehensive evaluation index EIdx of edge detection; For comparison, the original Lena test image without pollution is used for verification, and the results are shown in Figure 3.
(1)thermal diffusion model (2) P-M model (3) catte mode (4) classic TV model (5)generalized TV model (6) adaptive TV model (7) Y-K model (8) improved Y-K model Figure 3. Edge detection results of Lena images with eight models (without noise interference) Through the observation of subjective evaluation method, the following conclusions can be obtained: (1) The thermal diffusion model and the generalized TV (P = 1.5) model have the worst edge detection results. The number of edge pixels is small and discontinuous, and the hair texture of Lena is seriously missing; (2) There is no difference between P-M model and catte model. Because the P-M method has "ill conditioned" characteristics, the small change of input can completely cause the output. However, because there is no noise interference in this experiment, the Lena images of two groups of inputs are identical. Therefore the edge detection effect of the two models should be the same; (3) The classical TV model is similar to the adaptive TV model, which can not be observed by naked eyes; (4) Compared with the classical Y-K model and the improved Y-K model, the improved Y-K model is superior to the classical Y-K model in terms of the number of edge pixels, hair texture and edge continuity; In order to verify the conclusion of the above subjective evaluation method, the comprehensive evaluation index of edge detection proposed in this paper is used again for verification, as shown in Table 2 and Figure 4. The comprehensive evaluation index EIdx of edge detection clearly shows the conclusion obtained by subjective evaluation method again.   Figure 4, it can also be found that the comprehensive evaluation index of edge detection reflects the objective fact in the presence and absence of noise interference. That is, in the same detection model, the edge detection effect with noise interference is lower than that without noise interference. It shows that the new comprehensive index of edge detection reflects the objective facts, which is true and effective.

3.Discussion
However, for the edge detection of texture image and high noise image, the objective evaluation index is still insufficient.At present, this method can not effectively and accurately identify the texture and noise in the image. This situation will interfere with the objective comprehensive evaluation index EIdx . This will be the next step of the research.

4.Conclusion
At present, the evaluation of image edge detection results is still based on subjective evaluation system and methods with prior knowledge. For the subjective evaluation system, due to the differences of environment, psychology and individual, the evaluation results are very uncertain. For the evaluation method with prior knowledge as the premise, the prior knowledge of image edge is usually obtained by hand drawing, so there is a great non universality. On the basis of summarizing the above evaluation methods, this paper puts forward four basic requirements for the evaluation of image edge detection results:

Image reconstruction similarity index based on edge detection
The image recovered from the edge detection results should be as similar as possible to the original image. Therefore, eight direction image reconstruction based on linear interpolation is needed. The implementation process is shown in Figure 5. Based on the principle of vision, the effect of image reconstruction is greatly affected by spatial distance. That is to say, the effect factor of edge dilation set map pixel far away from the reconstructed pixel is weak, while the effect factor of edge expansion nested map closer to the reconstructed pixel is stronger, as shown in Figure 6. The black boxes represent the edge dilated set of pixels and the black dot represent the pixels to be reconstructed. Figure 6. The diagram of the reconstructed pixel searching edge point set in eight direction Because the distance between pixels detected by human vision is exponentially related to human spiritual distance. Therefore, through a large number of experiments, a formula considering the interaction between two pixels is obtained.
Where,   r w represents the degree of influence between two pixels whose spatial distance is r and its value range is [0,1]. The smaller the value is, the stronger the influence degree is and the larger the value is, the weaker the influence degree is. As According to the above analysis, the following reconstruction algorithms are obtained: (1) The edge detection image E is converted to ED by dilation operation, which is one of the basic methods of mathematical morphology; (2) The coordinates of pixels with ED median value of 1 are recorded, and the recorded coordinate positions are used to extract the pixel values in the source image to obtain the edge dilated set map ET ; (3) Taking the pixel to be reconstructed as the central position, the edge dilation set ET is searched in eight directions to obtain the reconstructed edge point set T . The spatial distance r between each pixel in the point set T and the pixel to be reconstructed is calculated. (4) According to equation (1), the spiritual distance between each pixel in the point set T and the pixel to be reconstructed is calculated. (5) According to equation (2), the gray value of the pixel to be reconstructed is calculated. The reconstructed image can be calculated from the edge image through the above reconstruction algorithm, and the similarity between the edge image and the source image is obtained according to the image similarity index proposed by Wang et al. The similarity index between source image and reconstructed image is defined as Where, A  represents the gray mean value of source image; B  represents the gray mean v;alue of reconstructed image; A  , B  represents the corresponding standard deviation. AB  represents the covariance between the source image and the reconstructed image.

Reliability index of edge detection image
For the similarity index of image reconstruction, the better the reconstruction effect is when the more image edges are detected; and the worse the reconstruction effect is when the fewer image edges are detected. The method to increase the image edge is to lower the threshold setting in the edge detection algorithm. The result is that the similarity of reconstructed image is improved, but the quality of edge detection decreases, which is at the cost of false edges such as a lot of noise in the detected edge. Therefore, we must correct this situation and introduce the edge reliability evaluation index. For the edge of an image, the gray value on both sides must change obviously. This change can be characterized by the standard deviation in its tiny neighborhood. Noise and edge are similar in nature. In order to overcome the influence of noise, we will remove the pixels with the maximum and minimum gray value in the neighborhood, and define the standard deviation of the remaining pixels as the neighborhood standard deviation.
That is, the standard deviation of pixels   j i I , in the neighborhood is 3  3 defined as: is the set of pixels whose maximum and minimum gray values are removed in  is the median value of the set of pixels whose maximum and minimum gray values are removed in the 3  3 neighborhood of   j i I , . By traversing the pixels, the neighborhood standard deviation set of each pixel in the source image   n m I  can be obtained as follows: Extract the position coordinates of the edge pixel in the source image, and assign the neighborhood standard deviation of the source image in these location coordinates to the neighborhood standard deviation of the edge pixel, which is recorded as: The E j i,  is normalized to get the relative neighborhood standard deviation of edge pixels as follows: The larger the relative standard deviation of edge pixels is, the more obvious the change of gray level in the neighborhood of the pixel is, and the higher the edge reliability is. The smaller the relative standard deviation of edge pixels is, the more stable the gray level changes in the neighborhood of the pixel is , and the lower the edge reliability. For this purpose, a function is needed to be constructed, as shown in Figure 7.
The edge detection image reliability index BIdx is defined as the average value of the reliability of all edge pixels.
EdgeNum BIdx (10) The bigger the reliability index of edge detection image is, the closer the edge image is to the real edge.

Edge detection image continuity index
The forms of expression of the edge are various and can not be generalized. Even for the same image, the results detected by different methods are often quite different. Some detection results are complete and continuous, while others are fragmented. For the algorithm with good detection effect, if the image is continuous and the space distance span is large, the continuity is strong; for the algorithm with poor detection effect, the image is separated and split, and the space distance span is small, the continuity is weak. The different edge results of the same image are as Figure 8 showed: The results show that the edge detected in figure (a) is continuous and the space span is large; the edge detected in figure (b) is continuous, but the space span is reduced; the edge detected in figure (c) is fractured; the edge detected in figure (d) is fractured Relative standard deviation of edge pixels and has small space span. Therefore, the continuity of edge detection image becomes weaker in turn.
(a) (b) (c) (d) Figure 8. Different edge results detected in the same image For edge binary image E , assuming that the number of continuous edge segments is m segment, and the i segment is composed of pixel set then the spatial center    (13) According to the theory of visual perception, in a continuous edge segment, the contribution value of each pixel contained in the edge segment to the continuity of the whole edge segment is different, that is, the closer the pixel is to the center of the space, the smaller the contribution value is; on the contrary, the contribution value of the pixel farther away from the space center is greater. However, considering the size and scale of the image, the contribution of the pixel to the continuity of the whole edge segment should be constant after a distance D , otherwise the contribution value will be infinite, which will lead to numerical calculation error. Therefore, the contribution value of edge segment pixel to the continuity of its edge segment is defined as The threshold D can be selected according to the image size and scale. i C is defined as the sum of the contribution values of each edge pixel in the i segment and denoted as: From the above analysis, it can be seen that the larger the i C is, the larger the space of continuous edge crossing is when there are the same number of edge pixels; In the case of the same edge continuous space span, the larger i C is, the more edge points it contains. Therefore, i C not only reflects the space spans distance, but also reflects the number of edge points it contains. In order to facilitate the comparison between multiple images, i C should be normalized to meet CIdx whose value range is   contrast. Therefore, an S-function reflecting edge continuity is constructed, as shown in Figure 9.
where i n is the number of pixels in the i edge segment. It can be seen that the value range of CIdx is   1 , 0 , and the smaller the value, the worse the continuity of edge detection image, otherwise, the better the continuity of edge detection image.

Evaluation index of image noise in edge detection
According to the theory of visual perception, there should be a gap between the edge detection effect of the image with noise interference and that of the image without noise interference. Therefore, the evaluation of noise should be integrated into the comprehensive index of the new objective evaluation system. The calculation formula of noise mean square error is as follows:

Comprehensive evaluation index of edge detection image
According to the above-mentioned benchmark indexes, a comprehensive evaluation index of edge image without prior knowledge is obtained:  (20) The larger the EIdx value, the better the effect of edge detection image and the more effective edge detection algorithm; on the contrary, the smaller the EIdx , the worse the effect of edge detection image, and the less satisfactory the edge detection algorithm. For the same image, when the detected edge pixels are relatively more, the image filtering process is not perfect, the noise evaluation index PSNR NORM _ will be significantly reduced, and the edge detection image reconstruction similarity index SSIM will be significantly increased. At the same time, due to the appearance of false edges such as noise, the edge reliability index BIdx and edge continuity index CIdx will be reduced at the same time. Therefore, in this case, the edge reliability index BIdx and edge continuity index CIdx play a major role in the comprehensive evaluation index of edge detection image, and the corresponding weight coefficient should be increased. However, the reconstruction similarity index SSIM weight coefficient should be reduced, and noise evaluation index PSNR NORM _ will appear double decreasing effect, that is, PSNR NORM _ and weight coefficient are reduced at the same time, which makes its contribution to the comprehensive evaluation index decrease rapidly. When the number of detected edge pixels is relatively small, it shows that the image filtering process is relatively perfect, the noise evaluation index PSNR NORM _ will be significantly increased, and the similarity index SSIM of edge detection image reconstruction will be significantly decreased. These detected pixels are almost the main contour edges in the image, and the edge reliability index BIdx and edge continuity index CIdx are improved at the same time. Therefore, in this case, the image reconstruction similarity index SSIM and noise evaluation index PSNR NORM _ play a major role in the comprehensive evaluation index EIdx of edge detection image. Therefore, the weight coefficient of reconstruction similarity index SSIM should be increased, and the noise evaluation index PSNR NORM _ will have double enhancement effect, that is to say, it will increase with its weight coefficient at the same time. For edge reliability index BIdx and edge continuity index CIdx , the corresponding weight coefficient will be lowered. Therefore,