# Contrast-Invariant Edge Detection: A Methodological Advance in Medical Image Analysis
## 2 Preliminaries  
### The Most Significant Bit (MSB) and the Least Significant Bit (LSB)  
Digital image processing and many aspects of related fields are highly dependent on the MSB and the LSB [23]. For a pixel value in a digital image, it usually consists of multiple bits. For an 8-bit grayscale image, MSB refers to the corresponding binary value in the highest bit with a weight of \(2^{7}\). As shown in Figure 1, the pixel value is 149, and MSB is distributed in the leftmost of the 8 bits with a value of one. The MSB contributes more to the pixel value and it largely determines the main features and contours of the image. This is due to a change in the higher bits causing pixel values to be highly variable. In the visualization of an image, the information represented by the MSB is usually expressed in terms of the overall lightness and darkness and the main structure of the image. For example, changing the MSB may cause the image to change from bright to dark, or may lead to significant changes in the main contours. When it comes to image processing and analysis, MSB is crucial. In image compression, MSB usually contains important information about the image, so in some compression algorithms, MSB is protected to ensure that key image features are not lost in the compression process [24]. In image enhancement and filtering processes, the manipulation of the MSB can effectively adjust the contrast and brightness of images and highlight the main structure of images [25]. In image segmentation, MSB is usually used for threshold-based segmentation methods [26]. By choosing a suitable threshold to determine the MSB of a pixel value, an image can be quickly divided into different regions. This MSB-based threshold segmentation method is computationally efficient and can quickly provide approximate segmentation results of an image. It can provide an initial segment region for subsequent more accurate segmentation algorithms. In noise removal and detail preservation, MSB can be used to localize noise [27]. Due to the stability of the MSB, it is an important basis for determining whether a pixel has been disturbed by noise. Noise leads to random alterations in the lower bits of pixel values. When the MSB of a certain pixel varies considerably from those of its neighboring pixels and its lower bits change randomly, it is highly likely to be affected by noise. In this case, the pixel is corrected according to the MSB of the surrounding pixels to effectively remove the noise.  
The LSB is the bit with the lowest weight. For an 8-bit binary pixel value, the LSB is the corresponding binary value in the lowest bit with weight \(2^{0}\). As shown in Figure 1, the pixel value is 149, and LSB is distributed in the rightmost of the 8 bits with a value of one. The LSB contributes less to the pixel value, but it contains information about the details and small changes. In the grayscale image, LSB variations may show up as subtle textures and noise in the image. Since the variation of LSB has less impact on the overall visual effect of the image, it is often used in some special image processing methods like digital watermarking and steganography. By modifying the LSB, information can be hidden without causing significant visual changes [28]. The LSB is relatively sensitive to noise and interference. This is due to it having a low weight, and small variations may result in a change in its value. However, it is also due to this sensitivity of the LSB that it can be used to detect and analyze image changes in some specific applications [29]. For example, in image tampering detection, the changes in LSB can be analyzed to determine whether the image has been modified.