An edge detection algorithm for neutrosophic set based on adaptive threshold

In image processing, edge detection is extremely important especially in feature detection. An edge detection algorithm for neutrosophic set based on adaptive threshold is proposed to effectively �lter out the large amount of noise in the image and improve the detection speed and accuracy. The algorithm uses side window �ltering algorithm to �lter out noise based on neutrosophic set; Furthermore, it modi�es the subset segmentation algorithm to split the image into three subsets of T, F, I; Then, an adaptive threshold extraction algorithm is proposed to segment the subset information; Finally, the segmentation information is merged to obtain edge features. In order to verify the effectiveness of the algorithm, an experiment is compared with the neutrosophic set edge detection algorithm based on maximum entropy (NMNE) under different noise conditions. An experimental comparison between Canny and Sober is also carried out additionally. Experimental results show that the algorithm has good anti-noise performance and improves the detection speed and accuracy of the neutrosophic set edge detection algorithm based on maximum entropy (NMNE). The algorithm proposed in this paper can provide an effective reference for mid-and high-level vision tasks.


Introduction
The aim of edge detection is to extract object boundaries and perceptually signi cant edges from natural images, thereby preserving key points of the image and ignoring unexpected details, especially important for various mid-to-high-level vision tasks (such as image segmentation, object detection and recognition, image classi cation).With the development of technology, the demand for edge detection is getting higher and higher.The required edge information is more abundant and more accurate in the areas of intelligent driving, medical detection, and industrial applications [1].
Over time, edge detection algorithms can be divided into two categories.One is traditional edge detection algorithms, such as Canny, Sober, Laplacian edge detection [2][3][4]; The second is modern edge detection algorithms, such as SUSAN edge detection algorithm, ant colony optimization, neural network detection algorithm (fast-rcnn), watershed algorithm based on neutrosophic sets, etc [5][6][7][8].There is no balance between detection accuracy and detection speed although the detection accuracy is constantly improved.
In addition, images are susceptible to various types of noise during collecting image process.Therefore, it is more important to apply new methods and concepts.
In image processing, traditional fuzzy theory is limited to some applications.For example, fuzzy sets not only fail to effectively process noisy images, but are still sensitive to noise, and have defects in processing spatial uncertainty [9].Therefore, people found that the edge of image is actually an uncertain information.It is in an uncertain state on both the object and the background.Smarandache proposed the concept of intelligence set (NS), which can effectively solve the problem of uncertainty [10].In NS, real, uncertain and false information can be independent, and this assumption is important in many applications.Therefore, someone introduced True(T), Uncertain(I) and False(F) subsets into image processing, such as edge detection and image segmentation, and achieved good results [11,12].[15].However, there are few researches on edge detection.Therefore, Eser and Derya proposed a maximum entropy-based neutrosophic edge detection algorithm (NMNE) [16].But there are common problems, the algorithm is complex and sensitive to noise.Therefore, this paper proposes an edge detection algorithm based on adaptive threshold for neutrosophic set (P_NMNE), which effectively solves the problem of high complexity and sensitivity to noise.The proposed algorithm is compared with NMNE to reveal its effectiveness.Furthermore, the anti-noise performance of the proposed algorithm is compared with Canny edge and Sobel edge detection methods.The experimental results prove that the proposed algorithm has the advantages of low complexity and high anti-noise performance.The work is organized as follows: Following the introduction, Section 2 describes the theory of neutrosophic sets, and based on it, an edge detection algorithm with adaptive threshold is proposed; Section 3 conducts edge detection experiments on images in multiple domains, comparing the P_NMNE algorithm with other algorithms to verify the accuracy and performance improvement of the proposed algorithm.The conclusion is given in Section 4 to end the paper.

The concept of neutrosophic set (NS)
Brie y introduce the concept of the neutrosophic sets, which referred as NS below.In the NS, it supposes that E represents an event and -E is the opposite event of E. N-E is de ned as neither E nor -E.For example, if E = large size, -E = small size, and N-E is medium, which is neither large nor small size.The basic idea of neutrosophic theory is that any point of view has a certain degree of authenticity, uncertainty and falsehood [17].Therefore, the neutrosophic theory introduces T, I and F, which represent the authenticity, uncertainty and falseness of events, respectively [11][12][13][14][15][16].In this paper, the image is divided into T, F, I, where T represents the object information of the image, F represents the background information, and I represents the other information such as color, noise, edge and so on.Figure 1 shows the entire image processing process, which can be roughly divided into: Step 1: Obtain the original image and perform grayscale processing.
Step 4: Adaptive thresholding to segment the subset.
Step 5: Obtain edge feature information by fusing segmentation subset information.

Proposed method 2.2.1 Preprocessing
The images to be processed are generally noisy in the real environment, so some image preprocessing work is needed.Firstly, the original image is converted to a grayscale image, and then ltered for denoising.At present, the widely used and effective image smoothing methods mainly include: mean ltering, Gaussian ltering, etc, but they are easy to cause loss of details.
However, the recently emerged Side Window Filtering (SWF) algorithm can better preserve edge details while de-tuning noise [18].The ltering divides any kind of lter into 8 directions, and then adaptively selects the best direction, as shown in Fig. 2. Therefore, this paper compares the mean ltering and Gaussian ltering experimentally.Finally, the edge window mean ltering algorithm is used, as shown in Fig. 3-4.

Acquisition of T and F
In this paper, T subset mainly contains detected object information, F subset mainly contains background information, and the fuzzy boundary is mainly in I.The entropy method is used to obtain subsets of T and F, but its obvious disadvantage is that the algorithm is complex, the calculation amount is large, and the calculation process is somewhat cumbersome [16].This paper improves it and proposes a more e cient subset acquisition algorithm to solve the problem of complexity and time-consuming.According to Function1, the image can be converted into T and F subsets, as shown in Fig. 5 and Fig. 6 (i.e.T subset and F subset). ( The de nition details of the equation are as follows: ( (3) Among them, img represents the pixel value of the image, min(img) represents the minimum value of the image pixel, and max(img) represents the maximum value of the image pixel value.The acquisition of subset I plays an important role in image edge detection in this paper.One of the most important parameters is homogeneity (ho), which is associated with local information.The value of this parameter is increased in various situations in the image, such as edge regions, color transitions, and background transitions [13].Thus, the I subset can be obtained according to function2, as shown in Fig. 7.

Acquisition of I
( The detailed steps are as follows: (1) Select the 8-connected area (3⊆3), calculate the mean Localmean[i,j] of the 8-connected area, and calculate the mean square error of the 8-connected area, save it as devia[i,j]. ( (2) Calculate the discontinuity of the image according to the Gaussian kernel.where , are the horizontal and vertical discontinuities of the image.(6) (3) The image subset I is calculated according to the formula.(7) Among them, img is the image pixel value, devia is the average difference value of the 8-connected areas, and dis is the image discontinuity.

Obtaining edge information
Traditional edge detection, such as Canny, uses xed threshold segmentation to obtain edge information.
Although adaptive threshold edge detection algorithms have emerged in recent years, there is no simple and effective threshold extraction algorithm.For this reason, an adaptive threshold extraction algorithm based on maximum algorithm is proposed.According to the subset, its gray histograms and the probability values between the pixels are obtained.The pixel value of the image is between 0-256 [19], and the pixel value of subsets in this paper is between 0-1.In this paper, L represents the range of pixel values, n represents the number of pixels in this interval, and N represents the size of the image ( ) Therefore, this article can obtain the segmentation threshold according to Function3, as shown in Fig. 8 for the image histogram of the subset: The de nition details of the equation are as follows: The value of k is [L0, L1, L2...L255].When the maximum value is obtained, the corresponding L value is opt.Similarly, opf and opi can be obtained, where opt is the segmentation threshold of T subset, opf is the segmentation threshold of F subset, and opi is the segmentation threshold of I subset.The values obtained in this case are 0.50390625, 0.49609375, and 0.25390625, respectively.
As introduced above, the T subset contains object information, the F subset contains background information, and the I subset contains edge information.Therefore the T subset is used to obtain the body information of the object, and the F subset is reversely divided to obtain the object information and I subsets are divided to obtain information such as edges.The speci c designed edge extraction algorithm is shown in Funtion4, and the detection results are shown in Fig. 9. ( The de nition details of the equation are as follows: (12) x × y (opt, opf, opi) = F unction3(F , T , I)  From the results, it is not di cult to see that the algorithm in this paper has a great improvement in processing conditions at any scale, with a minimum improvement of 12.84% and a maximum improvement of 96.96%.The average performance is improved by 59.77% under Gaussian noise image processing.Under the image processing of salt and pepper noise, the performance is improved by 60.51% on average.The whole show superiority.

Conclusions
In this study, an adaptive threshold-based edge detection algorithm for neutrosomatic sets is proposed, which can better locate the edge and suppress noise.And the method is fast in detection speed.This algorithm improves the image subset segmentation algorithm, and proposes an adaptive threshold extraction algorithm to segment the subset image.Finally, the edge features are obtained by fusing the segmentation information, and compared with Canny, Sober, and NMNE.The experimental results show that the proposed algorithm solves the problem that the traditional Canny, Sober and NMNE edge detection algorithms are sensitive to noise, and effectively suppresses the noise in the image.Among them, the algorithm has good suppression effect on salt and pepper noise, relatively weak on Gaussian noise.It protects the edges with rich details and slow changes, and has high edge location accuracy.In       Multidomain image (1) unction4(T , F , I, opt, opf, opi) If(F ⩾ opf ∥ T ⩽ opt)and(I ⩾ opi) : Figures Figure 1

Figure 13
Figure 13 However, there are only a few studies on edge detection based on NS.SudanJha et al. proposed a neutrosophic image segmentation with Dice Coe cients.The neutrosophic sets and Dice Coe cients were fused to ensure correct assessment of missing data uncertainty and image segmentation uncertainty [13].Ahmed M.Anter et al. proposed a hybrid segmentation method for CT liver tumor based on neutrosophic set, fast fuzzy C-means and adaptive watershed algorithm [14].Ming Zhang et al. proposed a watershed-based CIMC image segmentation algorithm.The watershed algorithm was used