Grey Relevancy Degree and Improved Eight-Direction Sobel Operator Edge Detection

Edge detection is an important aspect to improve image edge quality in image processing. The purpose of edge detection is to identify the points in digital images with great brightness variation. However, the accuracy of traditional edge detection methods in edge extraction is low. For the actual image, the grey edge is sometimes not very clear, the image also contains noise. The detection result of the traditional Sobel operator is relatively accurate, but the detection result is rough and sensitive to noise. To solve the above problems, this paper proposes an improved eight-direction Sobel operator based on grey relevancy degree, which combines 5 × 5 Sobel operator with a grey relational degree and a new eight-direction grey relevancy method. The results show that this method can detect the useful information of edge more accurately and improve the anti-noise performance. However, the drawback is that the algorithm is not automatic.


Introduction
Edge is one of the most basic and important features of an image. In a digital image, edge refers to the collection of pixels with a step-change in the greyscale of surrounding pixels, which exists in the target and background, target and target, region and region, elements and elements [1]. So, the essence of image edge detection is to detect the change of position feature in the image. Edge detection has always been a hotspot and focuses in image processing technology, and has become one of the most standard research topics in image processing, image analysis, automatic target recognition, and computer vision [2].
In recent years, a variety of new edge detection theories and methods have How to cite this paper: Yang, Y. and Wei, L.X. (2021) Grey Relevancy Degree and Improved Eight-Direction Sobel Operator [5] proposed the Laplacian of Gaussian (LoG) operator for edge detection, which uses Gaussian function for image smoothing, then calculates the second derivative, the zero-crossing points are considered to be edge points. Canny presented an optimal edge detector, especially for two-dimensional images. Canny operators can give the edge information of both intensity and direction [6]. There are also new edge detection methods based on fuzzy mathematics, statistical analysis, wavelet transform, mathematical morphology, the genetic algorithm, neural network, etc. Edge is an important feature of the image, which is a greyscale mutation, and these greyscale mutations constitute the edge. The classical operator uses a derivative operator combined with the grey level change to detect the edge. The grey system is a model with incomplete information. Grey relevancy analysis is to analyze the grey system with mathematical theory. Its characteristic is "the data is little, the information is poor", take the known information as the reference, the quantitative acquisition unknown information development trend.
Aiming at the problem that the detection effect of the classical edge detection operator on the image with sufficient edge information and the weak edge image is not ideal, the traditional Sobel operator is improved and optimized by combining the grey relevancy degree.
In this paper, a new edge detection algorithm based on an improved eightdirection Sobel operator combined with a grey relevancy degree is proposed.
This algorithm firstly improves and expands the traditional Sobel, and then uses the improved Sobel operator as a reference sequence to calculate the relevant degree of each point in the image for edge detection. The experimental results show that this method can accurately detect useful edge information, and has a certain anti-noise ability, and is an effective new edge detection method. This paper is divided into the following parts. Section 1 introduces the research background, significance, and innovation points. Section 2 introduces traditional Sobel operators. Section 3 introduces how to improve and extend the Sobel operator. Section 4 introduces the concept of grey relevancy degree. Section 5 introduces how to combine the improved Sobel operator and grey relevancy degree. Section 6 compares and analyzes the method of this paper with other traditional detection methods. Section 7 introduces the feasibility and disadvantage of the edge detection method based on the Sobel eight-direction operator and grey relevancy degree.

Sobel Edge Detection Operator
Sobel proposed the Sobel edge detection method in 1970. In 2012, HE et al. [7] improved the traditional Sobel operator detection algorithm. In 2014, SUN et al. [1] expanded the Sobel operator into eight directions. In 2016, SHI et al. [8] Journal of Signal and Information Processing added 6 templates with different directions to Sobel operator. The traditional Sobel edge detection is to do 3 × 3 pixel area through the corresponding template convolution operation. It is concluded that the centre pixel gradient values; it is greater than the threshold criterion for determining the pixel image edge pixels, the opposite is not.
The operator uses two 3 × 3 kernels, which are convolved with the original image to calculate approximations of the derivatives one for horizontal changes and one for vertical. If we define A as the source image, and x G and y G are two images which at each point contain the horizontal and vertical derivative approximations respectively, the computations are as follows [9]: The corresponding calculation process is as follows: where,

( )
, f x y is the grey value at ( ) , x y in image A. The Sobel operator is the magnitude of the gradient computed by The gradient direction is calculated as follows:

Eight-Direction Edge Detection 5 × 5 Template
Edge detection is similar to difference operation, its essence is to detect the change of image brightness, so noise will inevitably affect the detection effect. To avoid the influence of noise, not only difference processing but also smoothing processing should be considered when constructing edge detection operators.
Similar to the first-order difference template, the Roberts crossover operator only considers difference factors. The Prewitt operator expands the first-order difference template to size 3 × 3, introducing the mean operation. In the edge detection algorithm, the Sobel operator is used as the detection template, which considers both the difference factor and the optimal smoothing coefficient [10].
The theoretical basis of constructing the Sobel operator is a pascal triangle.
The pascal's triangle can calculate a set of coefficients of the smoothing operator, which is roughly the same as that of the gaussian smoothing operator in the limit case [11]. , k n : For the template window size of winsize, the smoothing coefficient is: For the template window size of winsize, the difference coefficient is: Y. Yang, L. X. Wei Journal of Signal and Information Processing

Template Convolution Calculation
In the above improved Sobel operator detection template, each template is composed of symmetric numbers that are opposite to each other and equal in absolute value. The current pixel in the original image is convolved with a certain template in the eight-direction Sobel operator detection template to obtain the grayscale value of the image in all directions [12]. 6 4 f

Edge Detection Grey Relevancy Degree
Grey system theory [13], which is found by the Chinese scholar professor Deng Julong in the 1980's, is a method of studying the small sample and the uncertainty system of poor information. If we view a digital image as a random sequence, we can view an image as a grey system. Grey relevancy analysis is an important part of the grey system theory. Its basic idea is to measure the correlation degree among factors by the similarity degree of geometric relation or curve. The curvilinear relationship or geometric relationship between the comparison sequence and the reference sequence, if they are similar in shape, the degree of correlation is greater. The reference sequence is the representation of the change of system characteristics, while the comparison sequence is the description of the change of the affected system. Qi, Yingjian et al. [14] proposed a new image edge detection algorithm based on the grey system theory. When edge detection is carried out on a grayscale image, a certain pixel K and its 8-field pixels can be arranged to form a sub-sequence i K , and the ideal non-edge points and their 8-field pixels can be formed into a mother sequence 0 K . When the correlation degree of i K and 0 K is large, it means that the geometric shapes of the two sequences are relatively similar. Therefore, it is considered that the intensity of grey value change of pixel point at adjacent pixel point K is similar to that of an ideal non-edge point. So the pixel K can be considered as a non-edge point. Similarly, when the correlation between two sequences is small, pixel K can be regarded as the edge point. Grey relevancy calculation procedure [15] as follows: 1) Select the reference sequence ( ) y k , and find the conversion sequence of the sequence  3) Calculated correlation coefficient: , which is called the resolution coefficient, the smaller ρ , the greater the resolution, The value range of ρ is generally ( ) 0,1 , The specific value depends on the situation. When 0.5463 ≤ ρ , the resolution is the best.

Image Edge Detection Based on Grey Relevancy Degree and Sobel Operator with Eight Directions
The edge extracted by the traditional Sobel operator has noise interference, the boundary between the edge and the background is fuzzy, and the continuity of the detected image edge is poor. The improved Sobel operator has enhanced noise resistance, the boundary between the edge contour and the background is clear, and the overall edge continuity is good. However, there still exists a phenomenon of too thick edge texture. In the improved Sobel operator, grey relevancy is introduced to solve the problem of edge thickness, so that the contour and texture details of the image can be improved [16].
In the Grey relevancy method of image edge detection, the grey values of pixels as reference sequences are equal. This paper presents a new method based on grey relevancy degree and eight-direction Sobel operator. It is mainly divided into the following steps: 1) Select eight templates of Sobel operator as the reference sequence and the behavioral sequence which consists of each pixel and neighborhood pixels as the comparative sequence.
2) Calculating the grey relevancy degree of the eight-direction for each pixel, for the i R .
3) Setting the threshold θ , when i R > θ , then the pixel i X is the edge point, and the grey value is defined as 255; Otherwise, i X is not the edge point and the grey value is defined as 0.
4) It can get the edge point of the whole image with a 5 × 5 window over the entire image sequence, and then connect the edge points to get the edge of the image.

Experimental and Simulation Results
The feasibility of the proposed algorithm is verified by qualitative and quantitative analysis. The peak signal-to-noise ratio, average gradient and structural similarity index were used for quantitative comparison.
Peak signal to noise ratio (PSNR): provides an objective standard to measure Journal of Signal and Information Processing image distortion or noise level. It is often used to evaluate image degradation before and after compression in areas such as image compression. It is often defined simply by mean square error (MSE). If one of the two M N × monochromatic images I and K is the noise approximation of the other, then their mean square error is defined as: The PSNR is defined as: 2) The algorithm can detect the edges of Lena images with different parameters. In the experiment, a threshold value is used for segmentation. If the threshold value is set too large, the edge contour may be discontinuous or not smooth enough. An initial threshold value is selected and continuously adjusted during the experiment to obtain the best threshold value. First, select T = 0.48.
With the increase of the threshold, the extracted texture details gradually increase, as shown in Figure 2. However, after a certain threshold is exceeded, when more edges are detected, the image texture is too complex, resulting in the image edge contour is not smooth enough for better observation. Thus, when the threshold value is T = 0.54, the image can be observed with clear texture and smooth edges. In Table 1, it can be intuitively seen through structure similarity index (SSIM) and average gradient ( )     Table 2, the entropy value of Prewitt algorithm is the lowest, which means that Prewitt makes the de-noised image lose some details. Through the table, it can be seen clearly that the PSNA value of the algorithm in this paper is the largest, indicating that the algorithm in this paper has good visual effect and noise resistance.

Conclusions
This paper mainly introduces the research background of digital image edge detection and introduces various researches on edge detection in recent years. The traditional edge detection operator is improved to achieve a better detection effect.
In this paper, a new image edge detection algorithm is constructed by combining grey correlation degree and eight-direction Sobel operator. The eight-direction Sobel operator is used as the reference sequence, and the grey value of the central pixel and the surrounding 25 pixels is used as the comparison sequence of 5 × 5 pixels in the template. The experimental results show that this method can accurately extract useful edge information compared with the traditional Prewitt, Sobel, and LOG operators, which have strong anti-noise performance, can improve the image edge PSNR, and has a better adaptive ability.