© 2025 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).
OPEN ACCESS
With the rapid advancement of intelligent driving technologies, visual navigation has become a core approach for environmental perception in autonomous vehicles. The accuracy of lane line detection under complex illumination directly limits the reliability of autonomous navigation. Existing methods face significant challenges: traditional threshold segmentation requires uniform lighting conditions; edge detection algorithms often produce false edges under strong light; deep learning methods suffer from high computational complexity and degraded feature extraction in low-light scenarios; and image enhancement techniques like histogram equalization (HE) struggle to adapt to dynamic lighting changes. To address these issues, this study proposes an integrated solution combining image enhancement and lane line detection. On one hand, an optimized Multi-Scale Retinex (MSR) method is employed to improve illumination component estimation and reflectance recovery, enhancing contrast in lane line images under complex lighting. On the other hand, a Sparrow Search Algorithm (SSA) is introduced to optimize the similarity matrix construction and cluster center initialization in spectral clustering, enabling precise separation of lane lines from the background. The proposed approach offers a robust and real-time solution for reliable navigation of intelligent vehicles in unstructured lighting environments, contributing significantly to the visual perception theory and advancing the industrialization of autonomous driving.
complex illumination, intelligent vehicles, lane line detection, Multi-Scale Retinex (MSR), Sparrow Search Algorithm (SSA), spectral clustering algorithm
With the rapid development of intelligent driving technology, the autonomous navigation capability of intelligent vehicles in dynamic environments has become a research hotspot [1-3]. Visual navigation, as the core method of the perception system of intelligent vehicles [4, 5], directly affects the vehicle’s path planning and decision control. However, in actual driving scenarios, illumination conditions are complex and variable, such as strong direct light [6], shadow occlusion [7], backlight environments [8], etc., which often cause problems such as reduced image contrast [9], increased noise [10], and feature blurring [11], seriously affecting the accuracy and robustness of traditional recognition algorithms. How to achieve high-precision lane line recognition under complex illumination conditions has become a key technical bottleneck restricting the widespread application of intelligent vehicles in unstructured environments.
This study has important theoretical significance and engineering value for improving the environmental adaptability of intelligent vehicles under complex illumination scenarios. From a theoretical perspective, by exploring the mapping relationship between illumination changes and image features and constructing a robust image processing model, it can enrich the theoretical system of visual perception for intelligent vehicles; from the engineering application perspective, accurate lane line recognition is the foundation for intelligent vehicles to achieve autonomous obstacle avoidance and lane line tracking. The research results can effectively improve driving safety and reliability of vehicles under all-weather conditions and provide technical support for the industrialization of autonomous driving technology.
Existing lane line recognition methods for intelligent vehicles have obvious limitations under complex illumination conditions. Traditional threshold segmentation-based methods [12, 13] require high illumination uniformity and are prone to mis-segmentation in shadow areas; edge detection-based algorithms [13, 14] are sensitive to contours but easily produce false edges under strong light interference. In recent years, deep learning-based methods [15-17] perform well under conventional illumination but suffer from degraded feature extraction capability due to image information degradation in low-light or strong-light scenarios. Moreover, these models have large numbers of parameters and high computational complexity, making it difficult to meet the real-time requirements of intelligent vehicles. Additionally, some studies use HE for image enhancement [18-20], but this method easily amplifies noise and has insufficient adaptability to dynamic illumination changes.
This paper focuses on the lane line recognition problem of intelligent vehicles under complex illumination conditions and mainly conducts two aspects of research: on the one hand, proposes an image enhancement method based on optimized MSR, improving the illumination component estimation and reflectance component recovery process to enhance the contrast and detail information of lane line images under complex illumination; on the other hand, constructs a lane line recognition algorithm based on SSA-optimized spectral clustering, utilizing the global optimization capability of the SSA to optimize the similarity matrix construction and cluster center initialization process of spectral clustering, improving the distinguishability between lane lines and background. The innovation of the research results lies in combining image enhancement and intelligent optimization algorithms to form an integrated “enhancement-recognition” solution, which can effectively suppress the influence of illumination changes and improve the robustness and real-time performance of the recognition algorithm, providing a new technical path for reliable navigation of intelligent vehicles in complex illumination environments.
Under complex illumination conditions, intelligent vehicle lane line images often face issues such as halo interference in strong light areas, detail blurring in low illumination areas, and noise surge caused by dynamic lighting. The traditional MSR algorithm, lacking an adaptive adjustment mechanism, tends to amplify the halo in bright regions and introduce noise during enhancement, thus affecting the integrity of lane line edge features and recognition accuracy. Therefore, this study introduces a coupling mechanism between adjustment factors and local average background luminance, constructing an adaptive adjustment model based on the minimum perceptible visual difference to suppress enhancement in regions with high background luminance, reducing halo effects under strong light, and ensuring clear presentation of lane line contours in bright areas. Meanwhile, a bilateral filtering function is applied to weaken noise generated during low illumination enhancement, maintaining image smoothness and avoiding noise interference in lane line feature extraction. In addition, by leveraging RGB and YUV format conversion to separate luminance and color information, combined with contrast-limited adaptive histogram equalization (CLAHE) to accurately improve the contrast between lane lines and background, and finally using an original image fusion strategy to retain real scene details, this series of innovations can effectively solve problems faced by traditional MSR algorithms during dynamic driving of intelligent vehicles such as illumination sudden changes, halo interference, and noise sensitivity, providing a high-quality image basis for subsequent lane line recognition. Figure 1 shows the flowchart of intelligent vehicle lane line image enhancement under complex illumination conditions.
Figure 1. Flowchart of intelligent vehicle lane line image enhancement under complex illumination conditions
2.1 YUV and RGB format conversion
Under complex illumination conditions, lane line images of intelligent vehicles often have blurred lane line features caused by abrupt luminance changes. Due to the strong correlation of the three channels in the RGB format, direct processing easily causes color distortion and noise coupling problems. Therefore, in the optimized MSR method of this paper, YUV and RGB format conversion are performed. Specifically, first, utilizing the characteristic of YUV format that decouples luminance component Y from chrominance components U and V, the RGB image collected by the vehicle-mounted camera is converted to YUV format, enabling the MSR algorithm to perform targeted multi-scale illumination estimation and reflectance recovery on the Y component, avoiding cross-interference among the three RGB channels; then the enhanced Y component is recombined with the original U and V components to form RGB format, which can achieve precise enhancement of lane line luminance under complex illumination by separating the luminance channel, and, using the human eye's sensitivity to luminance and relative insensitivity to chrominance, reduce chrominance sampling interference. Through CLAHE, the luminance contrast between lane lines and background is further improved, and finally, 1:1 image fusion preserves the real scene color information. This allows the enhanced lane lines to highlight contour features under dynamic illumination while avoiding color distortion. The specific conversion formulas between RGB and YUV formats are as follows:
$\left[\begin{array}{l}Y \\ U \\ V\end{array}\right]=\left[\begin{array}{ccc}0.298 & 0.587 & 0.114 \\ -0.147 & -0.289 & 0.436 \\ -0.615 & -0.515 & -0.100\end{array}\right]\left[\begin{array}{l}R \\ G \\ B\end{array}\right]$ (1)
$\left[\begin{array}{l}R \\ G \\ B\end{array}\right]=\left[\begin{array}{ccc}1 & 0 & 1.140 \\ 1 & -0.394 & -0.581 \\ 1 & 2.032 & 1\end{array}\right]\left[\begin{array}{l}Y \\ U \\ V\end{array}\right]$ (2)
2.2 Y channel enhancement based on adaptive adjustment
Under complex illumination conditions, lane line images of intelligent vehicles often suffer from uneven luminance distribution caused by strong direct light and shadow occlusion. The Y channel in the YUV format independently carries luminance information, providing a technical path to specifically address illumination issues. The proposed enhancement method based on optimized MSR focuses on luminance adjustment of the Y channel. That is, in low illumination areas, the Y channel is enhanced to improve lane line visibility; in strong light areas, the Y channel's over-enhancement is suppressed to avoid halo diffusion around lane line edges. This directional adjustment of the Y channel avoids color distortion problems caused by coupled adjustments of the three RGB channels and can precisely optimize lane line luminance in dynamic illumination scenes encountered during intelligent vehicle driving. The specific formula for Y channel enhancement using MSR is as follows:
$e(a, b)=\sum_{v=1}^V \mu_v \cdot\left[\begin{array}{l}\log B(a, b) \\ -\beta \cdot \log \left(D_v(a, b) * B(a, b)\right)\end{array}\right]$ (3)
To solve the problem of local over-enhancement caused by traditional MSR algorithms under complex illumination, this method introduces an adaptive adjustment factor β constructed based on the Just Noticeable Difference (JND) model, establishing a dynamic mapping relationship between luminance value and enhancement suppression degree. Specifically, by calculating the local average background luminance and based on the correlation between the visibility threshold in the JND model and average luminance, an adjustment factor β that varies with luminance is generated: in regions with high luminance values, β takes a larger value to strengthen suppression, reducing halo interference around lane lines under strong light; in low luminance regions, β takes a smaller value to retain necessary enhancement strength, ensuring lane line details are not overwhelmed by noise. By controlling the parameter J to adjust the maximum value of the adjustment factor, the algorithm can adapt to the dynamic range of different illumination scenes, avoiding overexposure in bright areas or blurring in dark areas caused by uniform enhancement parameters. Assuming the local average background luminance is denoted by yh(a,b), and the visibility threshold is denoted by S(a,b), the relationship between luminance JND threshold and background luminance is as follows:
$S(a, b)=\left\{\begin{array}{l}17\left(1-\sqrt{\frac{y h(a, b)}{127}+3}\right), \operatorname{IFyh}(a, b) \leq 127 \\ \frac{3}{128}(y h(a, b)-127)+3, E L\end{array}\right.$ (4)
$\beta(a, b)=j \cdot\left(-\frac{1}{17} S(a, b)+\frac{20}{17}\right)$ (5)
To further improve the quality of the enhanced image, a bilateral filtering function is introduced during the Y channel adjustment process. By combining spatial distance weighting and pixel similarity weighting, the dual objectives of noise suppression and edge preservation are achieved. In intelligent vehicle driving scenes, dynamic illumination changes easily cause image noise, while bilateral filtering suppresses interference from distant pixels in the spatial domain and preserves edge information similar to the central pixel in the range domain, ensuring that lane line contours remain clear after smoothing and denoising. After bilateral filtering, combined with RGB and YUV format conversion and CLAHE, the contrast between lane lines and background can be further improved. Finally, 1:1 fusion with the original image retains real scene illumination features while presenting lane lines with high contrast and low noise under complex illumination, providing high-quality input for subsequent recognition algorithms. Specifically, assuming the normalization constant is denoted by jf(a), the distance between the center point a and neighboring points is denoted by z(ζa), the spatial domain filtering formula is:
$g(a)=\frac{1}{j f(a)} \int_{-\infty}^{+\infty} h(a) z(\zeta a) d \zeta$ (6)
The range domain filtering formula is:
$g(a)=\frac{1}{j e(a)} \int_{-\infty}^{+\infty} h(a) t((\zeta a), d(a)) d \zeta$ (7)
The bilateral filtering formula is:
$g(a)=\frac{1}{j e(a)} \int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} h(a) z(\zeta a) t(h(\zeta), h(a)) d \zeta$ (8)
where,
$j(a)=\frac{1}{j e(a)} \int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} z(\zeta a) t(h(\zeta), h(a)) d \zeta$ (9)
2.3 CLAHE
Under complex lighting conditions, the intelligent vehicle lane line images often suffer from insufficient contrast between the lane lines and the background due to uneven illumination. Although the traditional HE algorithm can improve global contrast, it easily amplifies noise in low illumination regions and aggravates overexposure in high brightness regions, failing to meet the requirement of detail preservation for lane line recognition. Therefore, this paper selects CLAHE as the improved algorithm. The core principle of this method lies in a three-layer processing mechanism of "local block division - contrast limiting - interpolation fusion," which solves the problem of contrast imbalance under complex illumination. In intelligent vehicle application scenarios, when the onboard camera captures lane images containing shadow occlusion or strong light reflection, CLAHE can implement differential enhancement for different lighting regions: for low illumination areas with narrow gray value distribution, the local histogram is stretched to improve the distinction between the lane line and the background; for high brightness areas, the contrast enhancement amplitude is limited to avoid halo effects at the lane line edges caused by over-enhancement, thus maintaining the stability of lane line features under dynamic lighting changes. Figure 2 shows the schematic diagram of the CLAHE algorithm principle.
Figure 2. CLAHE algorithm principle
The specific implementation process of the CLAHE algorithm closely fits the enhancement needs of intelligent vehicle lane line images. First, the image is divided into several overlapping small blocks, and the local histogram of each block is calculated. Compared with global HE, this block processing can adapt to the non-uniform distribution of illumination in lane scenarios, such as alternating tree shade and open road segments. Furthermore, a contrast threshold is introduced to clip the histogram. When the pixel frequency of a certain gray level exceeds the threshold, the excess part is evenly distributed to other gray levels. This operation can effectively suppress the over-enhancement of background noise in strong light areas. Then, bilinear interpolation is used to handle boundary effects between adjacent blocks, avoiding lane line contour breaks caused by block enhancement.
During intelligent vehicle driving, adopting the above adaptive processing mechanism can respond in real time to sudden lighting changes. For example, when the vehicle drives from a tunnel into a strong light section, CLAHE can automatically reduce the contrast gain of bright areas, preventing the lane line from losing edge features due to overexposure. Under the framework of MSR algorithm optimization, CLAHE forms a synergistic enhancement system with Y channel adaptive adjustment and bilateral filtering, further improving the quality of lane line images. Specifically, after MSR optimization and bilateral filtering noise reduction, the Y channel luminance information is separated through RGB to YUV format conversion. At this time, applying CLAHE can accurately enhance the luminance contrast between the lane line and the background in low illumination scenarios. CLAHE enhances local contrast to make blurred lane line edges clearer; in high dynamic lighting scenarios, it limits contrast to avoid mixing the bright lane line with reflective backgrounds. Finally, the enhanced image is fused with the original image at a 1:1 ratio, preserving the real scene illumination characteristics while dynamically adjusting contrast through CLAHE, making the lane line "visible in dark areas, not overexposed in bright areas, and edges clear" under complex illumination, providing a high signal-to-noise ratio image input for the subsequent SSA-optimized spectral clustering lane line recognition.
3.1 Spectral clustering algorithm
Under complex lighting conditions, intelligent vehicle lane line images often present multimodal feature distributions of lane line and background due to shadow occlusion, strong light reflection, and other factors, such as asphalt pavement, white lane lines, tree shadows, and road reflections, forming different categories. Traditional two-class spectral clustering criteria, due to unbalanced segmentation problems, are difficult to accurately separate lane lines from multi-class backgrounds in complex scenes. In addition, image noise and contrast fluctuations caused by complex illumination lead to non-uniform distribution of lane line pixel features. Using two-class division easily causes misclustering of lane line edges with similar backgrounds. Therefore, this paper adopts multi-way partition criteria to meet the multi-class segmentation requirements of "lane line - strong light area - shadow area - background" in intelligent vehicle lane line recognition. By dividing image pixels into multiple categories, it adapts to the multimodal distribution of lane line features under complex illumination, avoiding recognition errors caused by information simplification in two-class division. Figure 3 shows the arc error schematic of intelligent vehicle lane line recognition.
Figure 3. Arc error of intelligent vehicle lane line recognition
The basic principle of the multi-way partition criterion is to construct a multi-way normalized cut model based on spectral graph theory, regarding the intelligent vehicle lane line image as an undirected graph, where pixel points are nodes and similarity between nodes is the edge weight. By solving the generalized eigenvalue problem, clustering eigenvectors are obtained. Specifically, the multi-way normalized cut criterion balances the number of nodes and the cut edge weights of each subgraph, avoiding the "small graph overcut" problem caused by the traditional minimum cut. In complex lighting scenes, this mechanism can ensure that lane line pixels in shadows, strong light, and different background categories are reasonably divided, preventing misclassification of lane line pixels into the background due to lighting differences. Assume the two subgraphs partitioned from the mother graph are represented by X and Y, with vertices of subgraphs X and Y represented by i and n, the weight between subgraphs denoted by q, and the similarity between the two subgraphs represented by CUT(X, Y), then there is the expression:
$\operatorname{CUT}(X, Y)=\sum_{i \in X, n \in Y} q(i, n)$ (10)
Assuming subgraph u is represented by Xu, and the remaining subgraphs except u are represented by $\bar{X}_u$, the sum of the weights of edges connecting all data samples within subgraph Xu is represented by AS(Xu,Xu), and the maximum minimum cut is represented by LVCUT, then there is the expression:
$L V C U T=\sum_{i=1}^j \frac{\operatorname{CUT}\left(X_u, \bar{X}_u\right)}{\operatorname{AS}\left(X_u, X_u\right)}$ (11)
3.2 Intelligent vehicle lane line recognition model
Under complex lighting conditions, the pixel features of intelligent vehicle lane line images exhibit highly non-uniform distributions due to interference such as strong light and shadows. Traditional spectral clustering algorithms cannot adaptively determine the number of clusters K and the key parameter v, which easily leads to mis-clustering between lane lines and the background. For example, when the vehicle drives from a tunnel into a sunlit road section, the sudden change of illumination causes drastic variations in the brightness and chromatic features of lane line pixels. If spectral clustering with fixed parameters is used, it may mistakenly classify lane lines under strong light as reflective background areas. Therefore, this paper proposes a SSA-optimized spectral clustering model. Its core idea is to use a heuristic algorithm to compensate for the parameter dependence deficiency of traditional spectral clustering, utilizing the global optimization capability of the SSA to dynamically adapt to the multi-modal distribution of lane line features under complex lighting, achieving adaptive optimization of clustering parameters and avoiding disconnection between manual parameter tuning and scenario changes. Figure 4 shows the schematic diagram of the intelligent vehicle lane line model constructed in this paper.
Figure 4. Intelligent vehicle lane line model schematic
The implementation process of this method closely revolves around the recognition needs of lane lines under complex lighting: first, randomly initialize the initial clustering centers for pixel features enhanced by optimized MSR, constructing initial partitions including lane lines, strong light areas, shadow areas, background, and other categories; then introduce the SSA, using the silhouette coefficient as the fitness function, simulating the foraging and vigilance behaviors of the sparrow population to iteratively optimize the spectral clustering similarity matrix construction parameter v and the number of clusters K. In scenarios with variable lighting, SSA can adjust parameters in real time. For example, when large shadow areas appear in the image, it automatically increases K to subdivide lane lines and dark backgrounds within the shadows, while optimizing v to enhance the connection weights of similar pixels; finally, through multi-way spectral graph partitioning under the optimal parameters, the lane lines are accurately separated from the complex background. Suppose the average dissimilarity between an intelligent vehicle lane line u and other lane lines in the same cluster is represented by R(Ou), and the minimum dissimilarity between u and lane lines in other clusters is represented by MIN(eu), then the silhouette coefficient calculation formula is given by:
$S C_n=\frac{M I N\left(e_n\right)-R\left(O_n\right)}{M I N\left\{R\left(O_n\right)-M I N\left(e_n\right)\right\}}$ (12)
Suppose the trace of a matrix is denoted by tr, the between-class covariance matrix is Sv, the within-cluster covariance matrix is Pv, the number of samples is L, and the number of classes is V, then the CH index calculation formula is given by:
$C H=\frac{t r\left(S_v\right)}{t \cdot\left(P_v\right)} \frac{L-V}{V-1}$ (13)
The steps of intelligent vehicle lane line recognition based on SSA-optimized spectral clustering are as follows, with the algorithm flowchart shown in Figure 5.
Figure 5. Intelligent vehicle lane line recognition algorithm flowchart
Step 1: Data Resampling and Preprocessing
Firstly, the original lane line images are resampled. Using cubic spline interpolation and other time synchronization strategies, images under different lighting conditions are unified to the same sampling density to weaken the feature fluctuations caused by dynamic lighting changes. The resampled data undergoes preprocessing and normalization to eliminate the direct influence of light intensity differences on pixel values. For example, in backlight scenarios, normalization can map the overexposed sky region and darker lane line pixels to a unified value range, avoiding feature shifts caused by large brightness spans. Based on optimized MSR enhanced image features, a fused similarity distance matrix E is constructed, which comprehensively considers the YUV luminance component and RGB color features. In complex lighting scenes with mixed shadows, it effectively measures the similarity between lane line pixels and the background.
Step 2: SSA Parameter Initialization
For the dynamic changes of lane line features under complex lighting, initialize the key parameters of the SSA. The population size v should balance computational efficiency and optimization capability; in scenarios of drastic light changes, a larger population size improves coverage of multi-modal features. The iteration number l must adapt to the frequency of lighting changes to ensure real-time parameter updates during high-speed driving. The alert threshold ts relates to sensitivity to sudden illumination changes; when the image brightness gradient exceeds ts, the vigilant sparrows trigger parameter adjustment to avoid clustering parameter failure due to abrupt light changes. The search dimension DIM corresponds to key parameters of spectral clustering, and its dimensionality should match the multi-class segmentation needs of lane line recognition under complex lighting.
Step 3: Fitness Function Definition and Optimization Preparation
Use the silhouette coefficient SC as the fitness function, whose core role is to quantify clustering quality under complex lighting conditions, solving the problem of manual tuning dependence in traditional spectral clustering parameters. In uneven lighting lane scenarios, SC effectively evaluates the tightness of lane line pixels within their clusters and the separation from other clusters. For lane lines heavily affected by reflections under strong light, SC can identify blurred boundaries with reflective background regions, improving distinguishability by parameter optimization. When setting the optimization parameter ranges, the feature fluctuation range caused by lighting changes should be considered: the upper limit of the number of clusters K must accommodate the multi-modal distribution under extreme lighting; the adjustment range of parameter v must cover pixel similarity calculation demands under different lighting intensities. SSA's global optimization ability computes the fitness value corresponding to each sparrow individual's parameter combination, providing quantitative support for dynamically adapting to lighting changes.
Step 4: Sparrow Population Position Update
During iterative optimization under complex lighting, the top V sparrows with better fitness values act as discoverers responsible for exploring new search areas in the parameter space, coping with sudden lighting changes. The discoverers' position update formula incorporates sensitivity factors to lighting changes; when image brightness variance exceeds the threshold, the exploration step size increases to quickly search for new parameter combinations. The remaining sparrows act as followers, following the optimal positions of the discoverers to fine-tune parameters in stable lighting regions. Simultaneously, a subset of sparrows is randomly selected as scouters. Their position update formula couples with the lightning sudden change detection mechanism; when local strong light spots or large shadow areas appear in the image, the scouters trigger parameter reset mechanisms to prevent clustering bias caused by local lighting anomalies, ensuring accurate recognition of lane lines under sudden lighting changes. Suppose the discoverers' and followers' individual positions are represented by Ns+1 and Ns+1c, the current iteration number by u, a normally distributed random number by W, the maximum iteration number by l, xs belongs to [0.5,1], the matrix R of ones with size 1×f, the population size v, the best discoverer position No, the current global worst position NBAD, and the matrix X with elements 1 or -1, then the position update formulas for discoverers and scouters are given by:
$N^{s+1}=\left\{\begin{array}{l}N^s * \exp \left(\frac{-u}{\partial^* l}\right), t s<x s \\ N^s+W^* R, t s>x s\end{array}\right.$ (14)
$\begin{aligned} & N_c^{s+1}=\left\{\begin{array}{l}W^* \exp \left(\frac{N_{B A D}^s-N^s}{u^2}\right), u<v / 2 \\ N_o^{s+1}+\left|N^s-N_o^{s+1}\right| * X^T\left(X X^T\right) * R, u>v / 2\end{array}\right.\end{aligned}$ (15)
Step 5: Population Best Position Update
In each iteration, by comparing the fitness values of all sparrows in the current population, update the global best position ca and the corresponding best fitness cd. This mechanism is crucial in complex lighting environments. For example, when vehicles continuously pass through multiple bridge tunnels with alternating light and shadow, the algorithm can accumulate the best parameters from historical iterations, forming a memory ability for periodic lighting changes, thereby improving the optimization speed of parameters for subsequent similar scenarios. The best position ca corresponds to the parameter combination that can dynamically adapt to feature distribution changes caused by lighting: in low-light scenes, increase the K value to subdivide the lane lines in shadows from the dark background; in strong light scenes, adjust the v value to weaken the similarity weight of reflective pixels, avoiding confusion between lane lines and background. By continuously updating the best position, the algorithm can maintain robust recognition of lane lines during driving with constantly changing lighting.
Step 6: Iteration Termination Condition Judgment
The setting of the iteration termination condition needs to balance computational real-time performance and parameter optimization accuracy to meet the requirements of high-speed intelligent vehicle scenarios. When the number of iterations reaches the preset value l or the change amplitude of the best fitness cd is less than the threshold, the optimization process terminates. In stable lighting scenes, the algorithm can converge early to reduce computational cost; in scenes with drastic lighting changes, the iteration number is automatically extended to ensure sufficient parameter optimization.
Step 7: Spectral Clustering Matrix Construction under Optimal Parameters
The best parameters obtained by SSA optimization are used in the spectral clustering algorithm to construct the adjacency matrix for the lane line image enhanced by MSR. The K-nearest neighbor method is used to calculate the similarity between each pixel and its nearest K points. In complex lighting scenes, this method can adaptively adjust the adjacency range: in strong light reflection areas, reduce the K value to shrink the adjacency range and avoid erroneous connections between reflective pixels and lane lines; in shadow blur areas, increase the K value to enhance the connection of weak feature pixels, ensuring the continuity of lane line edges. Based on the adjacency matrix, the degree matrix F and Laplacian matrix L are constructed. The construction of the Laplacian matrix incorporates lighting adjustment factors, applying similarity attenuation weights to pixels in strong light areas and similarity enhancement weights to pixels in shadow areas, thereby suppressing the interference of lighting changes on clustering at the matrix level. Assume the intelligent vehicle lane line samples are represented by au, ak, the specific formulas are as follows:
$Q_{u k}=\left\{\begin{array}{l}\exp \left(-\frac{\left\|a_u-a_k\right\|^2}{2 \delta^2}\right),(1) \\ 0,(2)\end{array}\right.$ (16)
Assuming the sum of each row of the adjacency matrix Q is fu. If au∈KNN(ak) and ak∈KNN(au), then formula (16) applies, otherwise formula (17) applies.
$F=\operatorname{DIAG}\left(f_1, f_2, f_3, \ldots, f_v\right)$ (17)
$f_u=\sum_{k=1}^v Q_{u k}$ (18)
Step 8: Feature Vector Extraction and Normalization
According to the optimal number of clusters K, extract the first K largest eigenvalue corresponding eigenvectors of the normalized Laplacian matrix L to construct a v×K dimensional feature matrix B. Under complex lighting conditions, this step reduces dimensionality to eliminate high-dimensional interference caused by lighting noise. For example, map lane line pixels under strong light from the RGB-YUV mixed feature space to low-dimensional feature vectors, highlighting their essential differences from the background. The normalization of feature vectors further balances the scale differences caused by lighting changes: in low-light scenes, enhance the weight of brightness features; in strong light scenes, suppress the abnormal contribution of over-bright pixels, making lane line features comparable under different lighting conditions.
Step 9: k-means Clustering and Lane Line Segmentation
Use the k-means algorithm to cluster the feature matrix B, dividing pixels into K clusters to separate lane lines from the background under complex lighting. During clustering, the initial cluster centers are initialized by the SSA optimization results, avoiding clustering bias caused by traditional random initialization in sudden lighting change scenarios. For example, at the strong light and shadow junction of a tunnel exit, the optimized initial centers can accurately capture the bimodal features of the lane line. The distance metric in clustering incorporates lighting adaptive weights: for pixels in strong light areas, use a combination metric of Euclidean distance and brightness penalty; for pixels in shadow areas, enhance the metric with color similarity, so that lane line pixels under different lighting are grouped into the same class, while background pixels with similar lighting are grouped into other classes. Finally, each row in Y corresponds to the cluster membership of the pixel, directly reflecting whether it belongs to the lane line.
Step 10: Lane Line Center Extraction and Recognition
Based on the clustering results, use the characteristic that lane lines have density maxima even under complex lighting to extract the central lane line as the recognition basis. Specifically, calculate the average sum of feature fusion Euclidean distances of pixels in each cluster, and determine the cluster corresponding to the minimum value as the central cluster of the lane line. When strong light reflection causes blurred edges of the lane line, density analysis can exclude reflective noise interference to locate the true center; when shadows cause lane line breaks, density connectivity can restore continuous central lane lines. The formula for extracting the central lane line incorporates lighting adjustment factors, applying attenuation coefficients to distance calculations for pixels in strong light areas and enhancement coefficients for pixels in shadow areas, so that in uneven lighting scenes, the center extraction results more closely match the actual lane line position, providing a reliable visual basis for intelligent vehicle path planning. Assume the lane line in cluster k is represented by Hk, and the remaining lane lines in the cluster by $\bar{H}_k$, the specific formula for extracting the central lane line is as follows:
$C_{M I N}=M I N\left\{\sum D I S\left(H_k, \bar{H}_k\right) / v\right\}, k \in(1, v)$ (19)
This paper first quantitatively compares the image enhancement effects of the traditional MSR algorithm, HE, adaptive histogram equalization (AHE), and the optimized MSR method proposed herein under three typical complex lighting scenarios: strong light, weak light, and shadow, as shown in Table 1. From the entropy perspective, the proposed method has higher values than the comparison methods in strong light, weak light, and shadow scenes, indicating richer retained image details; regarding peak signal-to-noise ratio, the proposed method is significantly superior in all three lighting scenarios, indicating obvious image quality improvement; the standard deviation and mean brightness data show that the proposed method has a lower mean brightness than AHE under strong light, avoiding overexposure; higher mean brightness than AHE under weak light, enhancing dark details; and lower standard deviation than AHE under shadow, making contrast more natural. The above indicators verify that the optimized MSR method, by improving illumination component estimation and reflectance component recovery, effectively enhances contrast, detail information, and brightness balance of lane images under complex lighting.
Table 1. Comparison of image enhancement metrics for intelligent vehicle lane images under complex lighting conditions
|
Lighting Scenario |
Method |
Entropy |
Peak Signal-to-Noise Ratio |
Standard Deviation |
Mean Brightness |
|
Strong Light |
Traditional MSR Algorithm |
5.7 |
/ |
13 |
21 |
|
HE |
6.6 |
12 |
34 |
71 |
|
|
Adaptive Histogram Equalization |
7.1 |
14 |
41 |
57 |
|
|
Proposed Method |
7.6 |
21 |
41 |
45 |
|
|
Weak Light |
Traditional MSR Algorithm |
7.2 |
/ |
54 |
83 |
|
HE |
7.3 |
13 |
61 |
124 |
|
|
Adaptive Histogram Equalization |
7.3 |
15 |
76 |
54 |
|
|
Proposed Method |
7.5 |
22 |
62 |
112 |
|
|
Shadow |
Traditional MSR Algorithm |
5.8 |
/ |
22 |
21 |
|
HE |
6.7 |
13 |
41 |
76 |
|
|
Adaptive Histogram Equalization |
7.1 |
16 |
51 |
62 |
|
|
Proposed Method |
7.4 |
22 |
44 |
54 |
In Figure 6, the total arc error convergence curves of traditional methods and the proposed method for different lanes a, b, and c show that the proposed method’s error decreases faster and converges to a lower final error. Taking lane b as an example, the proposed method’s total error drops below 5.5 after 20 iterations, whereas the traditional method takes about 40 iterations to approach this value, and its final error remains above 5.5. For lane a, the proposed method stabilizes below 6 after 100 iterations, while the traditional method fluctuates around 6.5. This indicates that the SSA-optimized spectral clustering method, through optimizing similarity matrix construction and cluster center initialization, significantly improves convergence speed and accuracy, reduces error accumulation during iteration, and more efficiently fits lane edges and distinguishes features under complex lighting.
Figure 6. Total convergence curve of arc error in intelligent vehicle lane recognition
Figure 7 shows the arc error variations of lanes a, b, and c across 30 segments. From the data, the proposed algorithm's arc error is overall lower than that of the traditional method. For lane b, its error in critical intervals such as segments 5-10 and 20-25 is significantly lower than the traditional recognition results of other lanes, with smaller fluctuations. Lane c's error rapidly decreases and stabilizes after segment 15, reflecting the algorithm’s high-precision edge fitting capability for lanes under complex lighting. This shows that the proposed algorithm effectively reduces arc error in segment recognition and improves edge fitting continuity and stability by optimizing the spectral clustering similarity matrix and cluster center initialization, performing better especially under abrupt lighting changes.
Figure 7. Arc error of intelligent vehicle lane recognition at different segments
Table 2 compares key indicators of different algorithms through ablation experiments. The accuracy of traditional spectral clustering is 93.21%, false detections 148, processing time 24.8 ms; only optimizing the similarity matrix (spectral clustering + SSA, random centers) achieves 96.58% accuracy, 62 false detections, processing time 27.6 ms; only optimizing cluster center initialization (spectral clustering + SSA, standard kernel) has 95.46% accuracy, 129 false detections, processing time 21.5 ms. The proposed method achieves 97.89% accuracy, only 32 false detections, processing time 24.6 ms. The data shows the proposed method’s accuracy is 4.68% higher than the traditional method and 1.31%-2.43% higher than single-module optimization (similarity or cluster center), indicating that the dual optimization significantly enhances lane line and background distinguishability and reduces false detections. Processing time is comparable to traditional methods, but false detections are reduced to less than one quarter, reflecting high efficiency of the algorithm under complex lighting.
Table 2. Comparison of ablation experiment results for intelligent vehicle lane line recognition
|
Lane Line Recognition Algorithm |
Frames |
Correct Recognitions |
False Detections |
Average Processing Time (ms) |
Accuracy (%) |
|
Traditional Spectral Clustering (no optimization, random cluster center initialization) |
2785 |
2658 |
148 |
24.8 |
93.21 |
|
Spectral Clustering + SSA (optimized similarity matrix construction, random cluster center initialization) |
2156 |
2214 |
62 |
27.6 |
96.58 |
|
Spectral Clustering + SSA (only optimized cluster center initialization, similarity matrix is standard Gaussian kernel) |
3256 |
2896 |
129 |
21.5 |
95.46 |
|
Proposed Method |
3214 |
3125 |
32 |
24.6 |
97.89 |
Table 3. Performance comparison of different intelligent vehicle lane line recognition methods on non-enhanced images
|
Network |
MPA (%) |
MioU (%) |
Parameters (M) |
FLOPs (G) |
FPS |
|
U-Net |
92.25 |
89.25 |
41.25 |
62.315 |
16.32 |
|
DeepLabv3+ |
92.36 |
89.36 |
7.56 |
12.356 |
23.15 |
|
LineMod |
92.58 |
89.58 |
6.23 |
12.485 |
34.58 |
|
LaneATT |
93.31 |
90.31 |
6.87 |
12.235 |
32.56 |
|
Ultra-Fast-Lane-Detection |
93.87 |
90.56 |
6.34 |
12.256 |
32.12 |
|
Proposed Method |
93.96 |
94.23 |
7.12 |
12.201 |
28.36 |
Table 4. Performance comparison of different intelligent vehicle lane line recognition methods on enhanced images
|
Network |
MPA (%) |
MioU (%) |
Parameters (M) |
FLOPs (G) |
FPS |
|
U-Net |
94.21 |
90.25 |
41.23 |
62.324 |
22.32 |
|
DeepLabv3+ |
94.26 |
90.35 |
7.23 |
12.325 |
34.58 |
|
LineMod |
95.32 |
90.54 |
6.24 |
12.326 |
48.62 |
|
LaneATT |
95.68 |
91.26 |
6.89 |
12.548 |
42.31 |
|
Ultra-Fast-Lane-Detection |
95.63 |
91.51 |
6.34 |
12.322 |
45.23 |
|
Proposed Method |
96.31 |
95.23 |
7.12 |
12.487 |
42.56 |
Tables 3 and 4 present the performance comparison of different intelligent vehicle lane line recognition methods on non-enhanced and enhanced images, respectively. Comparing the performance data on non-enhanced and enhanced images: on non-enhanced images, the proposed method already shows certain advantages in MPA and MIoU; after MSR optimization enhancement, MPA increases to 96.31% and MIoU reaches 95.23%. Compared with deep learning methods such as U-Net and LineMod, the enhanced proposed method leads comprehensively in MPA and MIoU, and has fewer parameters than Ultra-Fast-Lane-Detection, with FLOPs and FPS balancing computational efficiency and real-time performance. This shows that the improved image enhancement significantly improves contrast and detail of images under complex lighting, providing cleaner feature input for subsequent spectral clustering and directly improving recognition accuracy. On enhanced images, using global optimization capability to optimize the similarity matrix and cluster center initialization, accuracy is significantly improved compared to traditional spectral clustering. Meanwhile, the algorithm performs excellently in lightweight and real-time aspects, demonstrating high efficiency by combining traditional algorithms with intelligent optimization.
This paper first proposed an optimized MSR algorithm, effectively improving contrast, details, and brightness uniformity of lane line images under complex lighting. Experiments show that the method outperformed traditional methods in entropy, peak signal-to-noise ratio and other indicators under strong light, weak light, and shadow scenarios, providing high-quality input for subsequent recognition and solving image distortion caused by uneven lighting. Further, an SSA-optimized spectral clustering algorithm was constructed, using global optimization ability to optimize the similarity matrix and cluster center initialization, enhancing distinguishability between lane lines and background. Ablation experiments and convergence curves verified that the algorithm far exceeds traditional spectral clustering in accuracy, false detections, and convergence efficiency. Combined with enhanced MSR, it formed an "enhancement-recognition" closed loop, significantly improving robustness under complex lighting. Compared with deep learning methods, the proposed method shows excellent performance in accuracy, computational efficiency, and lightweight characteristics, especially stronger generalization in scenarios without massive labeled data, suitable for embedded deployment in intelligent vehicles.
This is the first time SSA is combined with spectral clustering, breaking the local optimum bottleneck of traditional clustering; the optimized MSR enhancement method solves brightness distortion and detail loss in light processing, forming a complete "front-end to back-end" technical chain. It provides a high-precision, real-time, robust lane line recognition solution for intelligent vehicle visual navigation, directly applicable to autonomous driving, intelligent vehicle competitions and other scenarios, improving system reliability.
Limitations of this research include: 1) Extreme scenario adaptability: insufficient handling capability for extreme weather such as heavy rain and thick fog, requiring multi-modal data fusion to improve robustness. 2) Computational efficiency: iteration overhead of SSA still needs optimization, which can be improved by lightweight strategies or hardware acceleration to enhance real-time performance. 3) Data dependency: spectral clustering’s feature representation relies on manual design; future work may introduce semi-supervised or self-supervised learning to reduce dependence on prior knowledge. Future work could integrate vision, lidar, and other data to enhance recognition accuracy under extreme weather. It also requires integrating enhancement and recognition modules into an end-to-end model, improving overall performance and convergence efficiency through joint training.
[1] Borraz, R., Navarro, P.J., Fernández, C., Alcover, P.M. (2018). Cloud incubator car: A reliable platform for autonomous driving. Applied Sciences, 8(2): 303. https://doi.org/10.3390/app8020303
[2] Kim, J., Park, J., Cho, K. (2022). Continuous autonomous ship learning framework for human policies on simulation. Applied Sciences, 12(3): 1631. https://doi.org/10.1177/1550147716665500
[3] Lee, E.K., Gerla, M., Pau, G., Lee, U., Lim, J.H. (2016). Internet of Vehicles: From intelligent grid to autonomous cars and vehicular fogs. International Journal of Distributed Sensor Networks, 12(9): 1550147716665500.
[4] Ragab, M., Abukhodair, F., Abdullah, A.L., Shabanah, S., Alfasi, B., Alyamani, M. (2024). Synergizing Remora optimization algorithm and transfer learning for visual places recognition in intelligent transportation systems and consumer electronics. IEEE Transactions on Consumer Electronics, 70(1): 3731-3739. https://doi.org/10.1109/TCE.2024.3376376
[5] Messelodi, S., Modena, C.M., Zanin, M., De Natale, F. G., Granelli, F., Betterle, E., Guarise, A. (2009). Intelligent extended floating car data collection. Expert Systems with Applications, 36(3): 4213-4227. https://doi.org/10.1016/j.eswa.2008.04.008
[6] Rittger, L., Schmidt, G., Maag, C., Kiesel, A. (2015). Driving behaviour at traffic light intersections. Cognition, Technology & Work, 17: 593-605. https://doi.org/10.1007/s10111-015-0339-x
[7] Zou, Q., Jiang, H., Dai, Q., Yue, Y., Chen, L., Wang, Q. (2019). Robust lane detection from continuous driving scenes using deep neural networks. IEEE Transactions on Vehicular Technology, 69(1): 41-54. https://doi.org/10.1109/TVT.2019.2949603
[8] Lee, K.S., Lim, J.K., Kim, J.H., Kim, H.J., Kim, D.H., Tae, H.S. (2015). Cost-effective local dimming driving scheme of Xe-lamp for low-power backlight unit. Molecular Crystals and Liquid Crystals, 617(1): 147-157. https://doi.org/10.1080/15421406.2015.1075844
[9] AbouElhamd, A.R., Saraiji, R. (2018). A contrast based calculation method for roadway lighting. Leukos, 14(3): 193-211. https://doi.org/10.1080/15502724.2018.1429931
[10] Gorai, A.K., Siddiqui, T.J., Dey, U.K., Singh, G. (2007). Combined effect of noise and illumination on worker performance. Noise Control Engineering Journal, 55(4): 417-424. https://doi.org/10.3397/1.2756625
[11] Yan, P., Liang, D., Tang, J., Zhu, M. (2016). Local feature descriptor invariant to monotonic illumination changes. Journal of Electronic Imaging, 25(1): 013023-013023. https://doi.org/10.1117/1.JEI.25.1.013023
[12] Ptak, R., Żygadło, B., Unold, O. (2017). Projection-based text line segmentation with a variable threshold. International Journal of Applied Mathematics and Computer Science, 27(1): 195-206. https://doi.org/10.1515/amcs-2017-0014
[13] Pujol, F.A., Pujol, M., Rizo, R., Pujol, M.J. (2011). On searching for an optimal threshold for morphological image segmentation. Pattern Analysis and Applications, 14: 235-250. https://doi.org/10.1007/s10044-011-0215-0
[14] Carmichael, O., Hebert, M. (2004). Shape-based recognition of wiry objects. IEEE Transactions on Pattern Analysis and Machine Intelligence, 26(12): 1537-1552. https://doi.org/10.1109/TPAMI.2004.128
[15] Rusli, F.H.B., Hasan, M.H., Saadon, S.Z.A.H., Azam, M.H. (2024). Enhancing hand sign recognition in challenging lighting conditions through hybrid edge detection. International Journal of Advanced Computer Science & Applications, 15(6): 1371-1381. https://doi.org/10.14569/ijacsa.2024.01506138
[16] Kansal, S., Jha, S., Samal, P. (2023). DL-DARE: Deep learning-based different activity recognition for the human–robot interaction environment. Neural Computing and Applications, 35(16): 12029-12037. https://doi.org/10.1007/s00521-023-08337-y
[17] Yang, D., He, Y. (2024). Research on micro defect recognition based on deep learning. International Journal of Bio-Inspired Computation, 23(4): 257-265. https://doi.org/10.1504/IJBIC.2024.139260
[18] Alqahtani, A.S., Madheswari, A.N., Mubarakali, A., Parthasarathy, P. (2023). Secure communication and implementation of handwritten digit recognition using deep neural network. Optical and Quantum Electronics, 55(1): 27. https://doi.org/10.1007/s11082-022-04290-7
[19] Cheng, H.D., Shi, X.J. (2004). A simple and effective histogram equalization approach to image enhancement. Digital Signal Processing, 14(2): 158-170. https://doi.org/10.1016/j.dsp.2003.07.002
[20] Kuo, C.F.J., Wu, H.C. (2019). Gaussian probability bi-histogram equalization for enhancement of the pathological features in medical images. International Journal of Imaging Systems and Technology, 29(2): 132-145. https://doi.org/10.1002/ima.22307