Edge detection using nonlinear structure tensor

: In order to improve the performance of edge detection for noisy images, a new edge detection method based on nonlinear structure tensor is proposed. First, the tensor product of noisy images is calculated. The tensor product is di ﬀ used according to the image gradient, which depends on the tensor product itself. Finally, the eigenvalues and eigenvectors of the di ﬀ usion tensor pro - duct are calculated, and the edges of the image are detected according to the eigenvalues. The method is com - pared with other methods. The experimental results show that the average number of edge points detected by method 1, method 2, method 3, and this method are 513.7, 530.0, 509.0, and 719.3, respectively. The average detection time of method 1, method 2, method 3, and this method were 65.3, 54.9, 57.3, and 33.6 s, respectively. When the number of edge detection is the largest, the average detection time of this method is signi ﬁ cantly smaller than that of the three comparison methods. Therefore, this method is more sui - table for edge detection of noisy images, and the perfor - mance of this method is better than that of the comparison method and can improve the performance of edge detection of noisy images.


Introduction
Image processing technology in recent years, with the improvement of networked data fields related to textual, is becoming more and more important and effective. The experiment results ensure the quality of image post-processing and analysis. The image edge detection technology is a key step in image processing, and noise in image edge detection is a basic problem in low-level vision [1]. The edge in the image is the basic structure of the image, which contains important information. There are many existing methods of image edge detection, mainly including spatial detection and transform domain detection [2]. Sobel operator, Canny operator, Laplace operator, Robert's operator, and other traditional classical edge detection algorithms belong to spatial detection. Among them, Sobel operator and canny operator are the most widely used, and the canny operator has theoretically formed a perfect optimal edge detection theory for the first time, which has become the standard edge detection method. Its main feature is that it is very sensitive to noise in the image [3], because edge detection method detects edge according to the discontinuity of gray value and noise also has a discontinuity. The noise will also be detected as edge, which leads to the failure of most edge detection methods when the image is polluted by mediumintensity or high-intensity noise. If it is necessary to detect edges in noisy images, the following two strategies can be adopted: (a) smooth the image first and then detect edges; (b) directly detect the edges in the image and then adjust the edges.
The edge detection method in the spatial domain is used to calculate the image gradient and determine whether the pixel point at this gradient is edge according to whether the gradient amplitude is greater than a threshold value. As edge detection involves directivity, these operators are generally sensitive to noise and have great defects in practical use [4]. Because of its good performance in multi-scale analysis and time-frequency localization, wavelet transform is suitable for detecting local mutation signals and is an effective tool for filtering image noise and edge detection. According to the difference between edge and noise, the separation of noise and edge is achieved by using the mode maximum method. Mathematical morphology is a nonlinear filtering method, which is an interaction between object shape set and structural elements. It is insensitive to edge direction and can suppress noise to a large extent and detect the real edge. For example, Sitohang and Sinaga [5] use the mathematical morphology detector containing multiple structural elements to detect the edge of medical images containing noise so that the medical images can obtain clearer and better continuity of edge map. The edge detection method in the transform domain first transforms the image to the frequency domain and detects the edge according to the local maximum value of the transform domain system. The spatial detection and transform domain detection are based on the discontinuity of pixel gray values in images. Tang et al. [6] proposed a system based on a singular value feature vector, and the gradient operator edge detection algorithm. The calculation of the singular values of the image block first and the Sobel gradient template spread to eight other directions and then according to the stability of the singular values of the image block are determined. The gradient value of image pixels is considered from the aspects of global and local gradient threshold determination. In calculating the global and local gradient threshold value of the original image, the weighted function is used to determine the whole image of the gradient threshold. Then, according to the gradient threshold filtering, image edge pixels are obtained. The image edge information of the original image shows that the algorithm can resist a certain amount of noise interference, and it shows the accuracy and efficiency of edge detection are better than another similar algorithm.
Based on the current research, this article proposes a method to improve the edge detection of noisy images based on nonlinear structure tensors. First, the tensor product of noisy images is calculated, and then, the tensor product is diffused according to the image gradient. It depends on the tensor product, and diffusion equation of the diffusion matrix contains the tensor product through the guidance of anisotropic kernel space adaptive average, rather than through the isotropic Gaussian kernel average and finally calculated diffusion tensor product of eigenvalue and eigenvector [7][8][9][10]. Based on the detection of image edge analysis, it shows that the method of different types and the edge detection results of noise images with different concentrations are superior to other methods. Under the premise of containing noise, the method can better suppress noise, extract image edges and retain more details, and has good robustness to different images [11][12][13]. Therefore, the proposed method is more suitable for edge detection of noisy images, and the performance of the proposed method is better than the comparison method, which is more suitable for subsequent image processing and analysis [13][14][15]. Nonlinear structural tensor edge detection method with second-order gradient adjustment and nonlinear structural tensor edge detection method is proposed. The experimental analysis shows that the method detects better than other noise images at different types and different concentrations of noise; it can better suppress noise.

Related work
There are many studies in the literature that attempts to neglect the blurring effects of orthodox structure tensor through discontinuities. Fleet and Weiss [16] proposed an approach for of structure tensor for the estimation of optic flow by utilizing the local information for adapting Gaussian kernel in data [17]. Although adaptive Gaussian smoothing and nonlinear diffusion filtering are equivalent to less volumes of smoothing, important dissimilarities rise when additional significant smoothing is accomplished [18]. The nonlinear diffusion on the basis of small averaging kernels-based iterative application can examine the kernel structures of highly complex adaptive types. Maronna et al. [19] proposed an orientation estimation approach on the basis of robust statistics. Nurunnabi et al. [20] proposed one more approach for orientation estimation. An adaptive shaped filter is utilized in order to smooth the structure tensor and to detect the corners and edges [21].
To analyze the differences and relation understanding among various adaptive filters, nonlinear diffusion and robust estimation methods are gaining universal attention from various researchers. In one study, the scalar case is analyzed by implementing the nonlinear diffusion and robust estimation methods [22]. In another study, the tensor case is analyzed by implementing nonlinear diffusion and robust estimation methods [23]. Chen et al. [24] proposed an approach to study the noise and vibration and their influence on the optimization of mower blades. Li et al. [25] proposed a model for analyzing the performance of the transmission control protocol model in a wireless network. Their approach significantly improves the uplink bandwidth utilization rate. Zhou et al. [26] introduced a linear programming approach for analyzing the mathematical model of agricultural machinery. The proposed work in this article is comprised of an extended version of the studies discussed at conferences [27,28]. The extension of previous work consists of four major additions. The first addition is structure tensor diffusion through diffusivities considering TV flow. The second addition is that the proposed approach provides proof that implemented scheme reserves the original matrix field of progressive semidefiniteness along with the continuous setting. The third addition is that this study presents an intense comparison of structure tensors in terms of isotropic, anisotropic, and linear diffusion. The fourth addition is the implementation of nonlinear structure tensor for corner detection.

Linear structural tensors
The linear structural tensor is obtained by performing a Gaussian convolution of the tensor product, as defined in Eq. (1): where i is an image I ρ that indicates the image of the Gaussian filtering. The Gaussian nuclear standard deviation is ρ; ∇I ρ is a gradient of I p , ( ) ij is the amount of sheet passed through the gaussian filter. The standard deviation of the gaussian nucleus is σ. The gaussian nuclear width ρ reflects the strength of noise in the original image, and the gaussian nuclear width σ reflects the neighborhood size for local structure analysis. When the calculated ∇I ρ gaussian nuclear width ρ is sufficient, linear structural sheets can be effectively adjusted to the edge. In the PM (Perona-Mali) model, the image is first smooth, and then, the gradient of the smoothed image is subjected to the edge of the adjustable edge. In the linear structure sheet, first the image gradient is first, and then the gradient is followed. Filtering results from the adjusted edge [10]. Because the order in which two operations are exchanged, the linear structure tubes are more representative of the edge structure in the image. However, in the linear structure tensor, each solely filter pair is used. The quantity is filtered, and the amount of tensus after adjustment will become blurred.

Nonlinear structural tensor based on tensor gradient diffusion
This article presents a nonlinear partial differential equations (PDE) for tuning the tensor product, which contains the gradient of the tensor as shown in Eq. (2): Among these, g is a function defined on the set S, which contains all the × 2 2 symmetric matrices. The g is defined as shown in formula (3): is a regular parameter. Because the amount of sheet volume already contains information on firstorder derivatives in the image, information on the second-order derivative of the image can be obtained. On testing a pixel point on the edge, in the direction along the edge gradient, the second-order derivative of the pixel point is 0. The maximum feature value of the matrix ∑ ∇ ∇ u u ij ij ij T is equal to the change in the image gradation value along the tensile gradient direction. Because the direction of the tensile gradient is substantially consistent with the direction of the image gradient, the maximum feature value is close to 0, and thus, the value calculated by the function g is large; that is, the filter strength is large. On the edge, the original sheet volume will take a large value. After a strong filtering force, the sheet volume will be smoothed, resulting in marginal information being destroyed. The method of using the tensive gradient for the sheet volume adjustment can be referred to as a sheet volume method based on the second-order derivative.

Nonlinear structural tensor based on image gradient diffusion
To overcome the shortcomings in the diffusion Eq.
(2), a nonlinear PDE is proposed for adjusting the tensor product, which contains the gradient of the image as shown in Eq.
where the function G is consistent with the form of the formula (2), * U σ indicates the amount of sheet passed through the gaussian filter, and the width of the gaussian nucleus is * σ . From the comparison of Eqs. (4) and (2), the method of Eq. (4) and the method of Eq. (2), the unique difference in the method of formula (4), depending on the diffusion matrix of the product itself, and the diffusion matrix rely on the gradient of the volume in the method of Eq. (2). The image gradient is used to adjust the sheet volume of the sheet and is referred to as a sheet-based method for adjustment based on the first-order derivative. There is a key point in Eq. (4), and the maximum feature value of the sheet is provided, and the corresponding feature vector provides information in the edge strength and the edge direction in the image. The significant difference between the sheet volume adjustment of the second-order derivative adjustment in Eq. (2) is a significant difference in the amount of sheet quantity adjustment in Eq. (4) to the eigen x diffusion characteristic value from different information. Since the amount of the sheet has a large eigenvalue in the image gradient direction, the tail of the first-order derivative adjustment is faster in the direction perpendicular to the image gradient, and the diffusion is slow in the direction parallel to the image gradient [8]. On the other hand, the gradient of the sheet has a smaller feature value in the image gradient direction, and the second-order derivative adjustment is faster than the direction perpendicular to the image gradient, in the direction parallel to the image gradient. It is also spread faster. Experiments show that the first-order derivative adjustment sheet volume can better reflect gradient information of the image than the number of sheets adjusted by the secondorder derivative. The diffusion matrix in Eq. (4) is constructed by the linear structure tensor * U σ , as previously described, and the linear structure tensor is a blurred sheet quantity. If the space-constant Gaussian can be replaced by space adaptation, then the filtered sheet is not blurred, so that better image gradient information can be provided.

Edge detection method based on the guided kernel and nonlinear structural tensors 3.2.1 Guide core
Guided nuclei were used for image de-noising and structural clustering. The guide core is a directed Gaussian core as defined in Eq. (5): where x and x i are the coordinates of central pixels and neighboring pixels, and h is a global smoothing parameter. C i is a gradient covariance matrix that can be defined as shown in Eq. (6) by the following formula: are first-order derivatives along the x 1 and x 2 directions, and w i is a local analytical window around the center pixel point. It can be seen that the boot core is a Gaussian adjusted through the gradient covariance matrix; the gradient covariance matrix is actually | | w i times the average of the sheets in the local analysis windoww i , and the relationship between them is as if the relationship is as in Eq. (7): where | | w i is the number of pixel points in local analysis window w i . The guiding core can be obtained by elongation, rotation, and scaling of a Gaussian nucleus, so the guide core is an elliptical core. The direction in which the elliptical core spindle is perpendicular to the direction of the image gradient, the direction of the feature vector corresponding to the maximum feature value of the matrix C i , the ratio of the spindle length, and the secondary axis length depending on the ratio of the maximum feature of the matrix C i and the minimum feature value.

The tensor product adjustment method
The tensor product-adjusted diffusion equation presented in this article is shown in Eq. (8): Among them, U steer is the amount of sheet with guiding core filtering. The guidance core is calculated from the amount of the sheet, and the average operation is not taken during the calculation process, so in the diffusion equation, the calculation of C i is as shown in Eq. (9): The guide kernel is calculated as shown in Eq. (10): U steer can be expressed as shown in Eq. (11): Comparisons of Eqs. (8) and (4) show that replacing isotropic gaussian filtering with spatially adaptive guide kernel filtering ensures that the tensor product is not blurred to better represent the gradient information of the image. The flow of the edge detection method presented in this article is shown in Figure 1.

Result analysis 4.1 Edge detection of the noise-containing images
The parameters of this method and other comparison methods are given below. The parameters of this article are set as follows: Gaussian nuclear width = ρ 1, the size of the local window for constructing the guide core is × 7 7, and the number of iterations is 20. The parameters of the adjustment method 1 are = = ρ ρ 1 and 2. The parameters of the adjustment method 2 are = ρ 1, and the number of iterations is 20. The parameter of the adjustment method 3 is = ρ 1, * σ 3, and the number of iterations is 20. The result of the image edge detection is shown in Figure 2. The added noise is Gaussian noise, and the standard deviation is 30. As shown in Figure 2, the edges detected by the linear structure tensor are not complete enough, and many important edges are lost in the test results. This is because the amount of the sheet is lost by the Gaussian nucleus, the calculated feature vector cannot accurately reflect the information in the image gradient direction, and the calculated feature value cannot accurately reflect the image gradient direction pixel gray variation of value [9]. The edges detected by the nonlinear structure tensile amount adjusted using the second-order derivative contain a lot of noise. This phenomenon can be interpreted that the tensile gradient is used to adjust the sheet, and the amount of tensor is faster in the direction perpendicular to the sheet gradient, and the diffusion is slow in the direction along the tensile gradient. Because the tensor gradient and image gradient are different, the edges of the tensor cannot be smoothed during the adjustment process, resulting in detecting the edges without the image edge. The nonlinear structural tubes adjusted using first-order derivatives and the edges of this method detected are similar because both use the image gradient adjustment tensor [10]. However, the edges detected by this article are more complete and accurate than the number of nonlinear structural sheets adjusted based on a first-order gradient. The edge detected by adjustment method 3 is not very continuous, there are some noise residues. In contrast, the edge detected by this article is continuous and clear, with only a small amount of noise residue in the results.
In Figure 3, there are some weak edges on the left side of the image, which all edge detection methods cannot detect, indicating that tensor product-based methods cannot detect weak edges in the image. This is evident because the weak edges are regions with gently varying gray values, while tensor product-based methods can only detect rapidly changing strong edges. To further verify the effectiveness of this algorithm, the experiment is designed with the number of edge detection and detection time consumption. The specific experimental results are shown in Table 1.
As shown in Table 1, the average number of edge points detected by method 1, method 2, method 3, and this method is 513.7, 530.0, 509.0, and 719.3, respectively. The average detection time of method 1, method 2, method 3, and this method was 65.3, 54.9, 57.3, and 33.6 s, respectively. In the case of the largest number of edge detection, the   average detection time of the proposed method is significantly less than that of the three comparison methods.
It is shown that the image edge detection method designed in this article based on a nonlinear structure tensor has higher detection efficiency by expanding the detection of image edge information based on eliminating image noise. Peak signal-to-noise ratio of the detection results of the four methods was calculated, and the line graph as shown in Figure 4 was drawn. It is verified that the robustness of the experimental results is better than expected.

Conclusion
This article presents a new noise-containing image edge detection method to improve the detection effect of noise images. The proposed method is compared with the edge detection method based on linear structural tensor, nonlinear structural tensor edge detection method with second-order gradient adjustment, and nonlinear structural tensor edge detection method. The experimental analysis shows that the method detects better than other noise images at different types and different concentrations. With noise, it can better suppress noise, extract image edges, retain more detailed information, and have good robustness to different images. Therefore, the present method is more suitable for edge detection of noise-containing images, and the proposed method performs better than the existing methods and for the processing and analysis of subsequent images. In the age of information digitalization, image restoration is a new scientific research subject, but its development affects countless man's hearts. After years of research and practice by many scholars, image restoration technology is developing rapidly in production industry, medical research, and other fields. As various restoration theories have been proposed, the corresponding research results are continuously obtained. However, due to the complex causes of image degradation, relevant theoretical analysis is not established yet. Therefore, some problems need to be further considered and explored when restoring the image. There are various reasons for image degradation, and different degradation factors lead to different resulting images. For different types of degraded images, it is necessary to analyze and confirm the reasons for degraded images, dig out the inherent prior images of Knowledge, and then design a feasible model and algorithm to find the solution for image degradation. This is mainly based on empirical judgment, but there is still a lack of such methods to evaluate degrading categories with theoretical guidance. Future exploration is considered to effectively define the causes of image degradation.
Funding information: The authors state no funding involved.
Author contributions: All authors have accepted responsibility for the entire content of this manuscript and approved its submission.  Edge detection using nonlinear structure tensor  337