## 3 Proposed Method
### Noise-Reduction Processing
#### 3.1.2 Suppression of Noise and Contrast Enhancement  
The bilateral filter is usually used to address the concern of amplifying severe noise in the low-intensity region when applying gamma modulation for brightness improvement [6]. This part aims to environment-adaptively preserve the edge of the lane while suppressing noise before enhancing brightness. To optimize the parameters of the bilateral filter, such as the spatial sigma (\(\sigma_{\mathrm{s}}\)) and intensity sigma (\(\sigma_{i}\)) in Equation (1), the line profile information in Figure 8 is utilized. By analyzing the line profile, the optimal values of \(\sigma_{\mathrm{s}}\) and \(\sigma_{i}\) can  
Figure 6: Comparison of the resulting images after suppressing noise and increasing contrast: (**a**) inappropriate parameters during the day; (**b**) appropriate parameters during the day; (**c**) inappropriate parameters at night; (**d**) appropriate parameters at night. Figure 7: The average pixel value of the upper area in day and night images (experiment for determining the thresholding point). be determined, ensuring a balance between noise suppression and edge preservation for accurate lane detection. \[l^{\prime}(x,\ y)=\sum_{y\in N(x)}e^{\frac{-\frac{1}{2}|y-x|^{2}}{2\sigma_{s}^{2} }}e^{\frac{-\frac{1}{2}|(x)-I(x)|^{2}}{2\sigma_{s}^{2}}}I(x,y) \tag{1}\]  
where \(\sigma_{s}\) and \(\sigma_{i}\) are the parameters controlling the fall-off of weights in spatial and intensity domains, respectively. \(N(x)\) is a spatial neighborhood of pixel \(I(x)\). \(\sigma_{s}\) is the geometric spread parameter that is to be chosen based on the extent of low-pass filtering required. A large value of \(\sigma_{s}\) implies a combination of values from farther distances in the image. Similarly, \(\sigma_{i}\) is the parametric spread that is set to achieve the desired amount of the combination of pixel values. This study sets the parameters of the bilateral filter according to the time of the input image. For daytime, the focus was on enhancing the edges and improving the details of the image, as the image already included sufficient illumination components due to sunlight. The images shown in Figure 9a,c have been passed through a bilateral filter with different parameters. Figure 9a is the image obtained by setting \(\sigma_{s}\) and \(\sigma_{i}\) to \(15/255\) and \(2\), respectively, as expressed in Equation (1). Furthermore, the image shown in Figure 9c was obtained by setting the values of \(\sigma_{s}\) and \(\sigma_{i}\) to \(3/255\) and \(12\), respectively. Figure 9b,d are the line profiles of the lanes in each image of Figure 9a,c, respectively. By comparing the edge gap between Figure 9c,d, the edge gap in Figure 9d is confirmed to be larger. Based on this, the parameters of the bilateral filter were set to high values for images acquired during the day. In contrast to daytime images, nighttime images present different challenges, including the absence of sunlight and the presence of severe noise caused by headlights from other vehicles and streetlights. Therefore, the focus in nighttime image processing is on suppressing noise around the lane. In Figure 10, different bilateral filter parameters are applied to the images shown in Figure 10a,c. The images shown in Figure 10b,d represent the line profiles corresponding to Figure 10a,c respectively. By comparing the two profiles, it can be observed that the noise is effectively suppressed and the edge gaps are preserved in Figure 10b. This demonstrates the effectiveness of the chosen bilateral filter parameters in suppressing noise while maintaining edge information in nighttime images. Figure 8: Comparison of the line profiles for noise reduction (The green line indicates the position of the line profile): (**a**) cropped image; (**b**) cropped image’s line profile; (**c**) image with suppressed noise using a bilateral filter; and (**d**) bilateral image’s line profile.