# Contrast-Invariant Edge Detection: A Methodological Advance in Medical Image Analysis
## 3 Proposed Methods
We perform the neighborhood analysis process on these 4 layers of bit planes, respectively, to obtain the edge detection result. For a better grasp of the local characteristics of the image, we choose the 3 \(\times\) 3 neighborhood to analyze the bit plane. Compared with larger  
Figure 3: The demonstration of the proposed Contrast-Invariant Edge Detection (CIED) method. size neighborhoods, \(3\times 3\) neighborhoods involve fewer pixels, and \(3\times 3\) neighborhoods can effectively capture information in eight different directions. According to the sum of neighboring pixel points, we judge whether the pixel point is an edge point. The neighborhood analysis step does not depend on a specific direction, and as long as the threshold condition is satisfied in the \(3\times 3\) neighborhood, it is determined as an edge point, so it has the advantage of isotropy. When performing \(3\times 3\) neighborhood analysis on the bit plane, in order to improve computational efficiency, we adopt the integral image method to perform integral operations on the entire bit plane. Then, the sum of the \(3\times 3\) neighborhood of any pixel can be obtained through simple addition and subtraction operations using the values at four positions of the integral image. It can avoid the repeated summation operation of the nine pixels in the \(3\times 3\) neighborhood one by one, improving the calculation speed. After the neighborhood analysis step, each bit plane obtains an edge detection result. Next, the edge detection results of the three MSB planes are fused. When the sum of the values of the corresponding pixels within the \(3\) MSB planes reaches \(2\) or exceeds it, a value of \(1\) is assigned to the empty plane, thereby attaining a fused outcome for edge detection. Finally, the edge detection outcomes of the binary image and the fused edge detection results of the \(3\) MSB planes are combined to obtain the ultimate edge detection result. Figure 4 shows the flowchart of the proposed CIED method. The flowchart is divided into \(6\) main steps, where Step \(0\) is preprocessing of the grayscale image, Steps \(1\) to \(3\) on the left side are processed for three MSB planes, and Steps \(4\) to \(5\) on the right side are processed for the binary image. The red and green arrows indicate the order in which the steps are executed, and the small arrow in the box indicates the output of the current step. In fact, the processing of \(3\) MSB planes and the binary image are synchronized in order. Here, we describe them separately for easier observation and understanding. The detailed CIED edge detection process is explained below. * Input: The input should be grayscale images. In the case of a color image, it should be converted into a grayscale image for uniform processing. We employ the weighted  
Figure 4: The flowchart of the proposed Contrast-Invariant Edge Detection (CIED) method. average method in line with the human eye's sensitivity to the distinct colors of red, green, and blue to assign different weights to each channel, and then the pixel values of the three channels are weighted and summed according to the corresponding weights. The result is the pixel value of the converted grayscale image. For an original color image, its red component is set as \(R_{o}\), its green component as \(G_{o}\), and its blue component as \(B_{o}\). The grayscale value I can be calculated by the following Equation (2), where coefficients 0.299, 0.587, and 0.114 are based on the sensitivity of the human eye to the colors red, green, and blue. In practical applications, it is widely used in the field of image processing and it can well convert color images into grayscale images that conform to the visual perception of the human eye. \[I(x,y)=0.299R_{o}(x,y)+0.587G_{o}(x,y)+0.114B_{o}(x,y)\] (2)
* Step 0: This step is image preprocessing. First, Gaussian filtering is performed on the image. Gaussian filtering is a type of linear smoothing filter.