# Contrast-Invariant Edge Detection: A Methodological Advance in Medical Image Analysis
## 5 Discussion  
In medical image-assisted diagnosis, accurate edge detection is crucial for clinical decisions such as diagnosis and treatment planning, which can help doctors quickly target the lesion area observe the location, size, and shape of the lesion, and then quickly carry out diagnosis and treatment. However, many of the existing edge detection methods rely on gradient computation and often face challenges in processing medical images, especially those with low contrast and blurred edges, which make it difficult to extract clear and complete edges [40]. To tackle these challenges, we put forward a novel edge detection method, CIED. The CIED preprocesses medical images by a combination of Gaussian filtering and morphological processing. After processing, the CIED utilizes three MSB planes, respectively. These planes are processed for neighborhood analysis and finally fused with the processed results to obtain the final edge detection results. In the CIED method, it is necessary to use binary image information corresponding to the target image, which can usually be processed as known information. Therefore, we use the thresholding method to obtain the binary version of the target image, which is regarded as a preprocessing operation. The thresholding method used to binarize the target image can be regarded as a custom modular operation, and in this paper, we suggest choosing the Otsu thresholding method with better performance. In addition, we tested the experimental effects of image binarization pre-operation under different thresholding methods. We tested CIED based on different thresholding methods, which include Li [42], Sauvola [43], Yen [44], and Iteration [45]. Among them, the Li method determines the threshold by minimizing the cross-entropy between the foreground and the background. The Sauvola method is based on the local mean and standard deviation and introduces an adjustment parameter to determine the threshold. The Yen method determines the threshold by maximizing the entropy of the inter-class probability. The Iteration method obtains a stable threshold by performing multiple iterations based on the current average grayscale. We use these different thresholding methods to run the same group of random images and then calculate their evaluation metrics including accuracy, precision, recall, and F1-score, respectively. Table 4 shows the comparison results of the edge images detected by different automatic thresholding methods. Among them, the Otsu method performs the best. The mean indicators of Otsu all reach the highest. Its average accuracy rate is 0.971, the average precision rate is 0.505, the average recall rate is 0.925, and the average F1-score is 0.642. The Iteration is second. Its average accuracy rate is 0.970, the average precision rate is 0.495, the average recall rate is 0.920, and the average F1-score is 0.632. The methods that follow closely are the Li and Sauvola methods, and their performances are similar, with the mean F1-scores reaching 0.566 and 0.577, respectively. The method with a relatively weaker performance is the Yen method, whose mean F1-score is 0.512. Finally,