## 3 Proposed Method
### Noise-Reduction Processing
#### 3.1.2 Suppression of Noise and Contrast Enhancement
In this study, the MSR algorithm is adjusted to optimize the tone mapping for the enhanced lane detection in challenging harsh environments where lane identification is difficult. This processing is applied prior to the edge-detection step. Retinex image processing assumes that an image consists of a background illumination component and a reflection component. By using a Gaussian filter, the algorithm separates the illumination component from the original image and subtracts it, thus enhancing the reflection component. This can be expressed as Equation (2). To perform retinex at multiple scales, the sigma value of the  
Figure 10: A comparison for determining the appropriate parameters of a bilateral filter at nighttime (The red lines indicate the position of the lane profile, and the red dots represent the boundary of the lane edge): (**a**) high bilateral filter parameters and MSR with uniform weight on sigma; (**b**) image (**a**)’s lane-line profile; (**c**) low bilateral filter parameters and MSR with uniform weight on sigma; and (**d**) image (**c**)’s lane-line profile. Figure 9: A comparison for determining the appropriate parameters of a bilateral filter during daytime (The red lines indicate the position of the lane profile, and the red dots represent the boundary of the lane edge): (**a**) high bilateral filter parameters and MSR with uniform weight on sigma; (**b**) image (**a**)’s lane-line profile; (**c**) low bilateral filter parameters and MSR with uniform weight on sigma; and (**d**) image (**c**)’s lane-line profile. Gaussian filter is varied. By selecting and combining appropriate sigma values based on the image environment, the edge components of the lanes can be effectively emphasized. Mathematically, this can be represented by Equation (3). To improve processing speed, the convolution operation of the Gaussian filter with each frame and sigma is replaced with a multiplication process in the fast Fourier transform (FFT) domain. Overall, the application of the MSR algorithm with multiple scales and the use of FFT-based processing contribute to enhancing lane edge components and improving the efficiency of lane detection in challenging dark environments. \[SSR_{i}(x,y)=\log(I_{i}(x,y))-\log(I_{i}(x,y)*G_{\sigma_{i}}(x,y)), \tag{2}\]  
\[MSR(x,y)=\sum_{i=1}^{n}\omega_{i}SSR_{i}(x,y), \tag{3}\]  
where \(I_{i}(x,y)\) is the input image, \(G_{\sigma_{i}}(x,y)\) is a Gaussian filter, and \(\sigma_{i}\) is the \(i_{th}\) sigma; convolution \(I_{i}(x,y)\) and \(G_{\sigma_{i}}(x,y)\) background components can be obtained, and the background components can be subtracted from the original image. We can obtain an image in which the reflection component is emphasized. This process is performed at multiple scales \(n\) with the weight of each scale; finally, we sum them together. In this experiment, uniform weight is ensured. The lane in Figure 11 is emphasized to facilitate detection of the line profile. In the experimental determination of the MSR parameters, the focus was on enhancing the edge gap in daytime images where there is sufficient lighting and less noise. Figure 12 illustrates the results of this experiment. The experiment involved setting each single-scale sigma value in Equation (2) to different values: 10, 90, and 200. The resulting images shown in Figure 12a,c,e were created by assigning equal weight to each \(\omega_{i}\) in Equation (3), with higher weights given to lower sigma values and lower weights given to higher sigma values. By analyzing the line profiles shown in Figure 12b,d,f, it can be observed that the line profile of Figure 12f exhibits the largest edge gap. This indicates that by assigning higher weights to lower sigma values, the MSR algorithm effectively enhances the edge gap in daytime images. Through these experimental results, the optimal parameters for the MSR algorithm in daytime images were determined, enabling the enhancement of lane edge gaps for improved lane detection.