## 2 Materials and Methods
### Proposed Method
#### 2.3.1. SSR Image Enhancement Based on Adaptive Bilateral Filtering  
Awareness of Retinex is not recent, having first been described in 1964 by [PERSON] et al. [30]. The theory is based on the physiological process by which the human eye perceives the color and luminance of objects. Although the amount of visible light reaching the eye depends on the product of the object's reflectivity and illuminance, human beings distinguishing the color and brightness of the object is still mainly dependent on the result of the object's reflection of the visible light. The schematic principle of Retinex is shown in Figure 5.  
So, Retinex theory views an image as the multiplication of the amount of reflection and the amount of illumination, i.e.,  
\[I(x,y)=R(x,y)\times L(x,y) \tag{1}\]  
where \((x,y)\) is the two-dimensional coordinates of the image pixel; \(I\) is the observed image; \(R\) is the reflection component, reflecting the color and luminance information of the object; and \(L\) is the illuminance component, reflecting the overall brightness of the environment. The Retinex theory aims to model the ambient illuminance component image to separate the reflective component image, which represents the object's own characteristics, from the observed image for the purpose of image enhancement [31]. Logarithmic domain  
Figure 4: The algorithmic framework of this paper. Figure 5: Schematic diagram of the Retinex principle. operations not only convert multiplication to addition to speed up the algorithm operation, but also conform to the physiological property of the human eye to perceive the brightness of the environment in a nonlinear manner. So, the reflection component can be derived in the following way:  
\[\log\,R(x,y)=\log\,I(x,y)-\log L(x,y) \tag{2}\]  
A specific filter size can only obtain the illuminance and reflection components of a particular feature, which is apparently lacking. Smaller filters retain more information about the details of the image itself, while larger filters can better simulate the real illumination component. Therefore, it is necessary to combine the combined information of various scales for correction. This extends the multi-scale Retinex (MSR) brightness correction method [32], which is calculated as follows:  
\[\log R(x,y)=\sum_{n=1}^{N}w_{n}\{\log I(x,y)-\log[F_{n}(x,y)*I(x,y)]\} \tag{3}\]  
where \(R\) is the output of MSR; \(w_{n}\) is the corresponding weight value of each scale; \(I\) is the original image input; \(N\) is the number of scales; \(F_{n}\) is the filter function at each scale. The MSR algorithm includes features from multiple scales simultaneously, enabling a more extensive range of dynamic compression [33]. The halo phenomenon, also known as the artifact effect at the edges, arises due to the Retinex theory on the assumptions about the illuminance components. The theory suggests that the light situation changes spatially smoothly, but in fact, at the edges or the junction of light and dark, the light situation changes abruptly [34]. A halo phenomenon is created in the reflection component after further separation of the illumination and reflection components, as shown in Figure 6.  
Bilateral filtering is used as the center-surround function of the Retinex algorithm. Compared to Gaussian filtering, bilateral filtering considers both spatial distance differences and color value differences in denoising, thus retaining more details while denoising. In contrast, Gaussian filtering only considers the spatial distance difference, which would lose some details and textures. Therefore, a bilateral filter was used instead of a Gaussian filter as the center-surround function to more accurately restore the spatial illumination variations. For the Retinex theory, the degree of spatial light reproduction determines how realistic the reflected component is. For scarred areas, we need such enhancement. Smooth areas, on the other hand, contain less useful information, and over-enhancement would be redundant.