An adaptive dimming control method for electric vehicle headlamps
By using a deep learning object detection network and a complex physical existence verification process, the problems of optical image false detection and high light interference of high reflectivity stationary objects in electric vehicle headlights under wet road and rainstorm scenarios are solved, achieving stable adaptive dimming control and avoiding erroneous occlusion and beam jitter.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU HANRAYSUN OPTOELECTRONICS
- Filing Date
- 2026-05-12
- Publication Date
- 2026-06-12
AI Technical Summary
In existing electric vehicle headlights, optical images are misdetected as real targets on wet roads and in heavy rain. High reflectivity of stationary objects causes target detection category jumps and confidence fluctuations, leading to adaptive PWM dimming errors such as occlusion and beam jitter.
A deep learning object detection network is used to extract target objects and multi-dimensional information. Combined with inverse perspective transformation mapping, collinear geometric relationship analysis and temporal fluctuation verification process, physical entity targets are screened. Then, through confusion risk assessment and double smoothing processing, occlusion instructions are generated to ensure that the occlusion area is accurately locked to the real physical entity target.
It effectively identifies and filters out optical reflections, suppresses detection confusion caused by the interference of high reflectivity static objects, achieves flicker-free, smooth and stable adaptive dimming control, and ensures the accuracy of the shading area and the effective use of lighting resources.
Smart Images

Figure CN122186010A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive lighting control technology, and specifically to an adaptive dimming control method for electric vehicle headlights. Background Technology
[0002] With the development of automotive lighting technology, electric vehicle headlights and adaptive high beam systems have become key features for improving nighttime driving safety. These systems use onboard cameras to detect vehicles, pedestrians, and other objects in the road environment ahead, and then selectively obscure or dim the brightness of corresponding pixels in the electric vehicle's headlights. This maximizes the driver's field of vision while preventing glare for other road users. However, in real-world, complex road environments, relying solely on conventional visual target detection and simple geometric mapping for occlusion control faces several severe technical challenges, limiting system reliability and user experience.
[0003] First, on roads flooded after rain or during prolonged heavy rain, the mirror-like reflections created by the wet surface produce clear reflections of vehicle taillights, headlights, and even the entire vehicle's outline. These optical images, appearing highly similar in visual appearance and geometric features to real objects in a single frame of a road image, are easily misidentified as real physical entities. This can lead to incorrect occlusion of electric vehicle headlights or repeated switching of occlusion areas between the reflection and the real target, causing perceptible optical jitter.
[0004] Secondly, when vehicles pass through tunnels, drive through sections of road with multiple metal guardrails, or areas with a large number of traffic signs, highly reflective stationary objects will produce large areas of light spots and localized highlights under the illumination of vehicle headlights. These highlights will overlap or partially obscure the actual vehicles in front in the image, causing the detection network to jump between consecutive frames in classifying the same vehicle target. This results in rapid alternation of brightness in the corresponding area of the electric vehicle headlights, which seriously affects driving safety and comfort.
[0005] To address the above problems, this invention proposes an adaptive dimming control method for electric vehicle headlights. Summary of the Invention
[0006] The purpose of this invention is to provide an adaptive dimming control method for electric vehicle headlights to solve the problems of optical image misdetection as real objects and visual confusion caused by high reflectivity stationary objects interfering with the target detection category jump and confidence jitter in existing wet road surface and rainstorm scenarios, resulting in adaptive PWM dimming error occlusion and light pattern jitter.
[0007] The objective of this invention can be achieved through the following technical solution: an adaptive dimming control method for electric vehicle headlights, comprising:
[0008] Collect road images and use a pre-built and trained deep learning object detection network to extract target objects and multi-dimensional information, and organize the object detection data frames;
[0009] Based on the target detection data frame, the physical existence verification of the target object is performed, including preliminary marking, collinear geometric relationship analysis and time series fluctuation verification, to screen physical entity targets and integrate target tracking data frames;
[0010] Based on the target tracking data frame, the physical entity target object is marked with a confusion risk label. The confusion risk label is used to determine whether to perform double smoothing processing and generate a masking instruction data frame.
[0011] Transition protection decisions are made based on the masking command data frame, and PWM control command data frames are generated.
[0012] Furthermore, the preliminary marking specifically includes:
[0013] The bounding box coordinates and spatial representative point coordinates of each target object in the target detection data frame are mapped to the global bounding box coordinates and global spatial representative point coordinates in the road plane coordinate system according to the inverse perspective transformation mapping relationship, and the estimated actual height of the target object is calculated.
[0014] The estimated actual height is compared with the reasonable height range queried based on the target object category label. If it is not within the reasonable height range, the target object is initially marked as a candidate mirror target object; otherwise, it is marked as a physical entity target object.
[0015] Furthermore, the collinear geometric relationship analysis process specifically includes:
[0016] For each candidate mirror target, in the road plane coordinate system, with the global spatial representative point coordinates of the candidate mirror target as the origin, a rectangular search area is formed by extending a preset longitudinal search distance in the opposite direction of the vehicle's travel direction and setting a preset lateral tolerance width.
[0017] For each similar physical entity target within the rectangular search area, calculate the angle between the direction vector between the candidate mirror target and the global spatial representative point coordinates of the physical entity target and the vehicle's travel direction vector, and calculate the distance between each of them and the origin of the road plane coordinate system.
[0018] If the included angle is less than the preset angle tolerance threshold, and the distance corresponding to the candidate mirror target is greater than the distance corresponding to the physical entity target, then it is determined that there is a physical entity target that satisfies the collinear geometric relationship, and the candidate mirror target is updated and marked as a confirmed mirror target.
[0019] Furthermore, the time series fluctuation verification process specifically includes:
[0020] For candidate mirror objects that have not been updated to confirmed mirror objects, the cosine similarity between the feature embedding vectors of the candidate mirror objects is calculated as the matching cost in the current frame road image and the previous frame road image. The Hungarian algorithm is used to solve the optimal matching relationship to obtain the adjacent frame matching pairs of the candidate mirror objects.
[0021] Define a time-series observation frame sequence with the current frame road image as the endpoint and a preset number of frames. Calculate the standard deviation of the bounding box size change rate, the standard deviation of the brightness change rate, and the trajectory offset after motion compensation within the time-series observation frame sequence. Motion compensation is achieved by using the vehicle displacement obtained by the onboard inertial measurement unit to compensate for the coordinates of the global spatial representative points of the candidate mirror target objects in each frame.
[0022] If the standard deviation of the bounding box size change rate exceeds the preset size fluctuation threshold, and the standard deviation of the brightness change rate exceeds the preset brightness fluctuation threshold, and the trajectory offset is always less than the preset stationary offset threshold, then the candidate mirror target is updated and marked as a confirmed mirror target; otherwise, it is updated and marked as a physical entity target and included in the Kalman filter tracker based on the constant velocity model for cross-frame matching and motion trajectory tracking.
[0023] Furthermore, the confusion risk assessment includes spatial overlap analysis, specifically as follows:
[0024] For physical entity targets labeled as vehicles in the target tracking data frame, high reflectivity stationary objects that are adjacent to or overlap with them in spatial location are retrieved. The high reflectivity stationary objects are determined based on the category labels included in the multi-dimensional information of the physical entity targets. If the cross-union ratio between the bounding box of the current physical entity target and the bounding box of any retrieved high reflectivity stationary object is greater than the preset high cross-union ratio risk threshold, then its confusion risk label is marked as high confusion risk.
[0025] Furthermore, the confusion risk assessment also includes feature consistency testing, specifically in the following manner:
[0026] For physical entities that are not marked as having a high risk of confusion due to spatial overlap, the absolute change in the cosine similarity of the feature embedding vectors of the physical entity is calculated between the current frame and the previous frame based on the target trajectory association records included in the target tracking data frame. If the absolute change exceeds the preset similarity mutation threshold and the motion speed between adjacent frames maintains the continuity of spatial position change, then the confusion risk label is marked as having a high risk of confusion.
[0027] If the physical entity target is not marked after spatial overlap analysis and feature consistency test, then the confusion risk label is marked as non-high confusion risk.
[0028] Furthermore, the determination of whether to perform double smoothing based on the confusion risk label specifically includes:
[0029] For physical entities with a non-high confusion risk label, an initial occlusion region is generated according to the preset geometric mapping rules from the bounding box to the occlusion region, and is directly used as the instruction occlusion region.
[0030] For physical entities labeled as having a high risk of confusion, after generating the initial occlusion region, a dual smoothing process is performed, which includes cascaded predictive feedforward compensation and nonlinear smoothing filtering.
[0031] Further, predictive feedforward compensation includes:
[0032] Obtain the preset total delay time of the PWM control signal output. Based on the motion velocity of the physical target object in the image coordinate system output by the Kalman filter tracker, calculate the predicted displacement of the physical target object within the total delay time. Then, shift the center position of the initial occlusion area in advance along the motion velocity direction by the predicted displacement to generate the feedforward compensation occlusion area.
[0033] Furthermore, nonlinear smoothing filtering specifically includes:
[0034] Set a dead zone threshold and a maximum boundary movement speed limit that are dynamically adjusted according to the distance from the physical target object to the vehicle. The dead zone threshold decreases monotonically as the distance increases, and the maximum boundary movement speed limit increases monotonically as the distance decreases.
[0035] Define the desired occlusion region as the feedforward compensation occlusion region generated in the current frame, and calculate the region deviation between the desired occlusion region and the instruction occlusion region finally output in the previous frame.
[0036] If the region deviation is less than the dead zone threshold, the command occlusion region of the previous frame is retained as the command occlusion region of the current frame.
[0037] If the area deviation is greater than or equal to the dead zone threshold, and the boundary movement rate required to eliminate the deviation does not exceed the maximum boundary movement rate limit, then the desired occlusion area is directly used as the instruction occlusion area of the current frame.
[0038] If the boundary movement rate exceeds the maximum boundary movement rate limit, then based on the boundary coordinates of the instruction occlusion area in the previous frame, the number of pixels corresponding to the maximum boundary movement rate limit is moved along the deviation direction to form the instruction occlusion area of the current frame.
[0039] Furthermore, transitional protection decisions specifically include:
[0040] Establish a continuous monitoring mechanism for confusion for each physical entity target object, record the number of consecutive frames in which it is continuously marked as having a high confusion risk, and calculate the standard deviation of its built-in confidence difference within a preset monitoring time window. The confidence difference is the absolute difference between the confidence score of a physical entity target object being detected as a vehicle category label and the confidence score of it being detected as another potential confusion category label.
[0041] When the number of consecutive frames exceeds the preset consecutive frame threshold and the standard deviation of the confidence difference exceeds the preset confidence fluctuation threshold, the transition protection mechanism is triggered. Within the preset transition time window, the PWM duty cycle of the corresponding instruction occlusion area of the physical entity target object is gradually transitioned from the current value to the preset low brightness reference value or full brightness value with a preset fixed step size.
[0042] If the transition protection mechanism is not triggered, the command masking area is directly mapped to the PWM duty cycle control signal of each independent LED pixel in the car headlight. For an LED pixel that falls within any command masking area, its target PWM duty cycle is set according to a preset low brightness reference value. If any LED pixel is located in the intersection of multiple command masking areas at the same time, the minimum value among the target PWM duty cycles is taken as the final target PWM duty cycle of the LED pixel.
[0043] The beneficial effects of this invention are as follows:
[0044] 1. This invention constructs a physical existence verification process that includes inverse perspective transformation mapping, collinear geometric relationship analysis, and temporal fluctuation verification. This process can systematically identify and filter out optical reflections on wet roads and in heavy rain scenarios. It fundamentally solves the problem of incorrect headlight occlusion and light pattern jitter caused by reflections on wet roads being mistaken for real objects. It ensures that the occlusion area is accurately locked to the real physical object, effectively guaranteeing the spatial accuracy of anti-glare occlusion and avoiding ineffective occlusion and waste of lighting resources caused by reflection interference.
[0045] 2. This invention designs a confusion risk assessment mechanism that integrates spatial overlap analysis and feature consistency testing, and introduces a dual smoothing process that includes predictive feedforward compensation and nonlinear smoothing filtering, as well as a transition protection decision and gradual dimming strategy based on the duration of confusion and the amplitude of confidence fluctuation. This can effectively identify and suppress detection confusion and command jitter caused by the high light of a stationary object with high reflectivity, and completely eliminate the sudden flickering of the brightness of the car headlights and the high-frequency shaking of the obscured area caused by this. Thus, while ensuring a fast response to real targets, it achieves flicker-free, smooth and stable adaptive dimming control that is comfortable for the human eye. Attached Figure Description
[0046] The invention will now be further described with reference to the accompanying drawings.
[0047] Figure 1 This is a flowchart illustrating the steps of an adaptive dimming control method for electric vehicle headlights according to an embodiment of the present invention.
[0048] Figure 2 This is a flowchart illustrating the specific steps involved in selecting physical target objects in an adaptive dimming control method for electric vehicle headlights according to an embodiment of the present invention. Detailed Implementation
[0049] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.
[0050] Example 1
[0051] Please see Figure 1 As shown in the embodiment of the present invention, an adaptive dimming control method for electric vehicle headlights aims to solve the problems of visual confusion caused by optical images being misdetected as real targets in wet road conditions and heavy rain scenarios, as well as the visual confusion caused by the intervention of high-reflectivity stationary objects leading to target detection category jumps and confidence fluctuations, resulting in adaptive PWM dimming errors, occlusion, and light pattern jitter. This ensures that the vehicle headlights achieve flicker-free and stable adaptive dimming that follows the real target object. Specifically, the method includes the following steps:
[0052] S1: Collect road images and use a pre-built and trained deep learning object detection network to extract target objects and multi-dimensional information, and organize the object detection data frames;
[0053] Specifically, an onboard camera is deployed at the top center of the inside of the vehicle's windshield to continuously capture road images in front of the vehicle at a preset fixed frame rate. For each captured road image, a pre-built and trained deep learning object detection network is used to process the images and extract the target objects and their multi-dimensional information. The deep learning object detection network is deployed in the vision processing unit.
[0054] It should be noted that the preset fixed frame rate ensures that the displacement of the target object between adjacent road images does not exceed the preset pixel offset limit. The vision processing unit, as a local edge computing node, is responsible for real-time inference and multi-dimensional information extraction of road images, aiming to ensure real-time response of the perception link.
[0055] The deep learning object detection network is constructed using a multi-task joint learning architecture. After the backbone network extracts the general features of the road image, it is divided into three parallel output branches: a category classification branch, a bounding box regression branch, and a feature embedding branch. The category classification branch uses a fully connected layer and a Softmax activation function to output the probability distribution of each object's bounding box corresponding to each category label. The bounding box regression branch outputs the offset parameters of the center point coordinates, width, and height of each bounding box, which are used to correct the default anchor box to accurately locate the object. The feature embedding branch maps the intermediate feature map including the general features to a fixed-dimensional feature embedding vector through global pooling and a fully connected layer, and performs L2 normalization to make it have a unit norm, which is convenient for cross-frame similarity calculation.
[0056] The training set of the deep learning object detection network uses a dataset of road images collected from a large number of sources. Each training sample in the training set contains a road image and its corresponding annotation information. The annotation information includes the category label of the target object, the ground truth coordinates of the corresponding bounding box, and the target object's identity. The road images of the training samples are subjected to data augmentation preprocessing, including standardization, random cropping, horizontal flipping, and color dithering. The loss function is defined as the weighted sum of the losses of the three output branches: the category classification branch uses the focus loss function to alleviate the problem of imbalance between positive and negative samples; the bounding box regression branch uses the smooth L1 loss function to enhance the robustness to anomaly annotations; and the feature embedding branch uses the triple loss function to constrain the distance between feature embedding vectors of the same target object in different frames to be less than the distance between different targets. The momentum stochastic gradient descent optimizer is used for end-to-end training on the visual processing unit. The initial learning rate is gradually decayed according to the cosine annealing strategy after the warm-up phase. Training continues until the loss function converges on the validation set, resulting in the trained deep learning object detection network.
[0057] The deep learning object detection network performs forward inference on each frame of road image. For each identifiable object in the image, it synchronously outputs multi-dimensional information of the object, including: the object's category label and corresponding confidence score, bounding box coordinates, the object's feature embedding vector, and the coordinates of the object's spatial representative point, where the spatial representative point is the midpoint of the bottom edge of the object's bounding box.
[0058] It should be noted that the category label is used to distinguish the type of target object, including, for example, vehicle, pedestrian, traffic sign and street light categories. The confidence score represents the degree of certainty of the current detection result, with a value range of [0,1]. The bounding box coordinates are represented by the coordinates of the upper left and lower right corners of the bounding box in the image coordinate system of the road image, defining the spatial range of the target object in the road image. The feature embedding vector is a high-dimensional numerical feature output by the intermediate layer of the deep learning object detection network, which is processed by L2 normalization and is used to uniquely represent the appearance attributes of the same target object across multiple frames. The midpoint of the bottom edge of the bounding box approximately corresponds to the contact point between the target object and the road plane in the inverse perspective transformation, and has a clear geometric mapping meaning. Therefore, it is selected as the spatial representative point of the target object in the road image.
[0059] All targets and multi-dimensional information detected in the current frame of the road image are processed to obtain the target detection data frame of the road image.
[0060] S2: Based on the target detection data frame, perform physical existence verification on the target object, including preliminary marking, collinear geometric relationship analysis and time series fluctuation verification, screen physical entity target objects, and integrate target tracking data frames;
[0061] like Figure 2 As shown, the specific steps for screening physical entity targets are as follows;
[0062] Specifically, the installation height and pitch angle of the vehicle camera are obtained, and combined with the vanishing point of the lane line, a system of linear equations is constructed to establish the correspondence between the image coordinate system and the road plane coordinate system of the road image, and the inverse perspective transformation homography matrix is obtained by solving the equations. The inverse perspective transformation homography matrix defines the mapping rule from any pixel in the image coordinate system to the corresponding physical position in the road plane coordinate system, and establishes the inverse perspective transformation mapping relationship from the image coordinate system to the road plane coordinate system.
[0063] It should be noted that the road plane coordinate system is a two-dimensional orthogonal coordinate system established with the road plane where the vehicle is located as the reference plane and the road projection point directly below the vehicle as the origin. It is used to represent the physical position of the target object on the real road surface.
[0064] Among them, the installation height of the vehicle camera is defined as the vertical distance from the optical center of the vehicle camera to the road plane where the vehicle is located, the pitch angle is defined as the angle between the optical axis of the vehicle camera and the horizontal plane, and the vanishing point of the lane line is obtained by performing edge detection and Hough transform on the road image to extract candidate straight line segments, and then fitting the intersection coordinates of the extended lines of the two straight line segments that meet the geometric constraints of the lane line.
[0065] It should be noted that when insufficient candidate straight lines cannot be found due to reasons including missing lane lines, the default lane line vanishing point position calibrated offline is used as the alternative input.
[0066] Based on the constructed inverse perspective transformation mapping relationship, the physical existence verification of the target object is performed. The physical existence verification includes preliminary marking, collinear geometric relationship analysis process and time series fluctuation verification process to screen physical entity target objects;
[0067] It should be noted that the role of physical existence verification is to identify and filter out optical images such as reflections on wet road surfaces. These optical images present visual features that are highly similar to real objects in road images, and deep learning object detection networks find it difficult to distinguish them based on the appearance of a single frame.
[0068] Specifically, within the target detection data frame of the current frame of the road image, the bounding box coordinates and spatial representative point coordinates of each target object within the target detection data frame are mapped to the global bounding box coordinates and global spatial representative point coordinates in the road plane coordinate system according to the inverse perspective transformation mapping relationship. The estimated actual height of the target object in three-dimensional space is calculated. The estimated actual height is compared with the reasonable height range of the target object. The reasonable height range is determined by querying the pre-calibrated category height mapping table according to the category label of the target object. If the estimated actual height is not within the corresponding reasonable height range, the target object is initially marked as a candidate mirror target object; otherwise, it is initially marked as a physical entity target object.
[0069] After the initial marking is completed, the collinear geometric relationship analysis process is executed. In the road plane coordinate system, for each candidate mirror target, the process is searched to determine whether there is a specific collinear geometric relationship between the candidate mirror target and the physical entity target of the same type. Physical entity target of the same type refers to physical entity target with the same category label as the candidate mirror target.
[0070] Specifically, the search range takes the coordinates of the global space representative point of the candidate mirror target as the origin, extends backward along the vehicle's direction of travel by a preset longitudinal search distance, and sets a preset lateral tolerance width to form a rectangular search area. For each similar physical entity target within the rectangular search area, the angle between the direction vector between the candidate mirror target and the global space representative point coordinates of the physical entity target and the vehicle's direction of travel vector is calculated. If the angle is less than the preset angle tolerance threshold, the direction vectors are determined to be parallel. The vehicle's direction of travel vector is obtained in real time by the on-board inertial measurement unit.
[0071] Calculate the distance between the global spatial representative point coordinates of the candidate mirror target and the physical entity target and the origin of the road plane coordinate system. If the distance corresponding to the candidate mirror target is greater than the distance corresponding to the physical entity target, then the candidate mirror target is determined to be located at a greater distance.
[0072] If a candidate mirror target and a physical entity target simultaneously satisfy the two conditions of parallel direction vectors and the candidate mirror target being located further away, then it is determined that there is a physical entity target that satisfies the collinear geometric relationship for the candidate mirror target, and the label of the candidate mirror target is updated from candidate mirror target to confirmed mirror target.
[0073] For candidate mirror objects that have not been updated to be confirmed mirror objects, perform the timing fluctuation verification process;
[0074] Specifically, in the current frame road image and the previous frame road image, the cosine similarity between the feature embedding vectors of the candidate mirror target in the two adjacent frames is calculated as the matching cost. The Hungarian algorithm is used to solve the optimal matching relationship to achieve the matching of the same candidate mirror target between adjacent frames, and the adjacent frame matching pairs of the candidate mirror target are obtained. The area of the bounding box is calculated according to the bounding box coordinates. The bounding box size change rate is defined as the absolute value of the relative change in the area of the bounding box between the adjacent frame matching pairs. The brightness change rate is defined as the absolute value of the relative change in the average pixel brightness within the bounding box between the adjacent frame matching pairs.
[0075] Define a time-series observation frame sequence with the current frame road image as the endpoint and a preset number of frames. Calculate the standard deviation of the bounding box size change rate and brightness change rate within the time-series observation frame sequence, and calculate the trajectory offset of candidate mirror targets on the time-series observation frame sequence. Specifically, use the vehicle-mounted inertial measurement unit to obtain the longitudinal and lateral displacements of the vehicle between each frame within the preset number of observation frames. Subtract the cumulative longitudinal and lateral displacements of the vehicle from the first frame to the current frame from the global spatial representative point coordinates of the selected mirror target in each frame to obtain the motion-compensated global spatial representative point coordinates. Calculate the Euclidean distance between the motion-compensated global spatial representative point coordinates of each frame and the global spatial representative point coordinates of the first frame within the time-series observation frame sequence, and take the maximum value as the trajectory offset.
[0076] If the standard deviation of the bounding box size change rate exceeds the preset size fluctuation threshold, and the standard deviation of the brightness change rate exceeds the preset brightness fluctuation threshold, and the trajectory offset within the preset number of observation frames is always less than the preset stationary offset threshold, it indicates that visual appearance jitter has occurred while the spatial position is relatively stationary. The label of the candidate mirror target object is updated from candidate mirror target object to confirmed mirror target object; otherwise, the label of the candidate mirror target object is updated from candidate mirror target object to physical entity target object.
[0077] For the selected physical entity targets, the feature embedding vector, bounding box coordinates, and spatial representative point coordinates of the physical entity targets in the current target detection data frame are used as observation inputs and incorporated into a Kalman filter tracker based on a constant velocity model for cross-frame matching and motion trajectory tracking. The Kalman filter tracker uses the spatial representative point coordinates as the measurement value and the cosine similarity of the feature embedding vectors as the matching cost for cross-frame data association. The optimal matching relationship of physical entity targets between adjacent frames is solved by the Hungarian algorithm. The state vector of the Kalman filter tracker includes the bounding box coordinates and motion velocity of the physical entity targets in the image coordinate system. The motion model of the Kalman filter tracker adopts the constant velocity assumption. Through the prediction and update iteration of the Kalman filter tracker, the motion velocity of each physical entity target in the image coordinate system is output.
[0078] It should be noted that the detection results of the confirmed mirror target are not included in the state update of the Kalman filter tracker, which fundamentally eliminates the possibility of the mirror target interfering with the motion estimation.
[0079] Record the target trajectory association record of the physical entity target object according to the optimal matching relationship between adjacent frames, and integrate it with the corresponding motion speed to obtain the target tracking data frame;
[0080] S3: Based on the target tracking data frame, perform a confusion risk assessment on the physical entity target and mark the confusion risk label. Determine whether to perform double smoothing based on the confusion risk label and generate a masking instruction data frame.
[0081] Specifically, a confusion risk assessment is performed on each physical entity target within the target tracking data frame. The confusion risk assessment includes two dimensions: spatial overlap analysis and feature consistency test.
[0082] It should be noted that the actual meaning of the confusion risk is that the category label and bounding box coordinates of the physical entity target in the current frame may be incorrect due to overlap with a high reflectivity stationary object in the image or due to a sudden change in its appearance features for non-physical reasons. Directly generating occlusion instructions based on this will lead to false occlusion or missed occlusion. Smoothing suppression is required in subsequent processing to ensure the stability of dimming.
[0083] It should be noted that spatial overlap determination targets the light spots or localized highlight areas formed by highly reflective stationary objects under vehicle headlight illumination. Their visual characteristics may be similar to those of vehicle taillights or headlights, leading to incorrect category labels or confidence scores output by deep learning object detection networks.
[0084] Specifically, spatial overlap determination is performed. For each physical entity target in the target tracking data frame, if the category label of the physical entity target is vehicle, then high reflectivity stationary objects that are adjacent to or overlap with the physical entity target in spatial position are retrieved. Whether the physical entity target is a high reflectivity stationary object is determined by querying the preset high reflectivity stationary object library through the category label. For example, the category labels of high reflectivity stationary objects include traffic signs and metal guardrails.
[0085] Specifically, the search range is centered on the bounding box coordinates of the current physical entity target object, and extends outward to a rectangular search area defined by a preset spatial neighborhood ratio coefficient. The crossover ratio (CR) between the bounding box of the current physical entity target object and the bounding box of each high-reflectivity stationary object within the rectangular search area is calculated. The CR is defined as the ratio of the intersection area to the union area of the two bounding boxes, and the value range is [0,1]. If any CR is greater than the preset high-risk threshold, the physical entity target object is determined to be in a high-confusion-risk state, and the CR label of the physical entity target object is marked as high-confusion-risk.
[0086] It should be noted that the high confusion risk state means that the physical entity target object in the road image has significant overlap with the high reflectivity stationary object, and the accuracy of the category label and bounding box coordinates is seriously challenged.
[0087] For physical entities that are not in a state of high confusion risk, perform a feature consistency check;
[0088] Specifically, the feature embedding vector of the physical entity target is obtained. Based on the target trajectory association records included in the target tracking data frame, the absolute change of the cosine similarity of the feature embedding vectors between the current frame road image and the previous frame road image is calculated. The cosine similarity is defined as the inner product of two feature embedding vectors that have been L2 normalized, and the value range is [-1,1].
[0089] If the absolute change exceeds the preset similarity mutation threshold, and the motion speed recorded in the target tracking data frame of the physical entity object maintains the continuity of spatial position change between adjacent road image frames, that is, the amplitude of the motion speed does not exceed the preset motion speed continuity upper limit, then the physical entity object is confirmed to have a high confusion risk, and the confusion risk label of the physical entity object is marked as high confusion risk.
[0090] It should be noted that the continuity of spatial position changes confirms that the position change of the physical entity target in the image is continuous and conforms to the laws of physical motion. This continuity further proves that the abrupt change in the cosine similarity of the feature embedding vector is not caused by the real change in the appearance of the target itself, but comes from the interference of external confusion factors such as the high reflectivity of the static object and the high light of the object. Therefore, it is judged as a high confusion risk.
[0091] It should be noted that spatial overlap determination focuses on the static spatial relationship between the physical entity target and the background object, while feature consistency test focuses on the temporal stability of the physical entity target's own appearance attributes. The two complement each other. Spatial overlap alone is not enough to determine confusion, because a vehicle may be driving normally in front of a traffic sign and partially occlude the traffic sign in the road image, but this does not constitute detection confusion. The feature consistency test is introduced to capture the situation where the feature embedding vector of the physical entity target changes abruptly due to non-physical reasons caused by the intervention of the specular highlights of a high-reflectivity stationary object.
[0092] If, after spatial overlap determination and feature consistency test, the physical entity target is still not determined to be of high confusion risk, then the confusion risk label of the physical entity target will be marked as non-high confusion risk.
[0093] For physical entity targets with a non-high confusion risk label, an initial occlusion region of the physical entity target is generated according to a preset geometric mapping rule from bounding box to occlusion region, and the initial occlusion region is used as the instruction occlusion region of the physical entity target.
[0094] It should be noted that the occlusion area is defined as the set of pixel coordinates in the car headlights that need to reduce brightness to cover physical objects and prevent glare. The geometric mapping rule from the bounding box to the occlusion area is to appropriately shift the bounding box vertically downward and appropriately widen it horizontally in the road image to cover the typical diffusion range of the vehicle taillights or headlights. The specific downward shift distance and widening ratio are pre-calibrated according to the installation angle of the vehicle camera and the light pattern distribution of the car headlights.
[0095] For physical entities labeled as having a high risk of confusion, a dual smoothing process is performed on the basis of the initial occlusion area. The dual smoothing process includes predictive feedforward compensation and nonlinear smoothing filtering.
[0096] Specifically, predictive feedforward compensation obtains the total delay time of the preset PWM control signal output. Based on the motion speed of the physical target object in the image coordinate system, the predicted displacement of the physical target object within the total delay time is calculated. The predicted displacement is defined as the number of horizontal and vertical offset pixels at the center position of the initial occlusion area. The calculation formula is the product of the horizontal and vertical components of the motion speed with the total delay time. Based on the predicted displacement, the center position of the initial occlusion area is translated in advance along the motion speed direction by the predicted displacement. The translated occlusion area is used as the feedforward compensation occlusion area.
[0097] It should be noted that the total delay time of the PWM control signal output is obtained by using a system delay calibration tool to synchronously record the start time of road image acquisition and exposure and the time when the LED driver chip receives the PWM control command data frame under preset test conditions. The average value of multiple measurements of the time difference between the two is calculated and stored. The core purpose of predictive feedforward compensation is to offset the tracking lag caused by the system loop delay, so that the occlusion area at the actual PWM dimming moment is consistent with the current real spatial position of the physical target.
[0098] Nonlinear smoothing filtering is performed on the feedforward compensation occlusion area. Specifically, the desired occlusion area is set as the feedforward compensation occlusion area calculated and generated in the current frame, and the actual occlusion area is the instruction occlusion area finally output in the previous frame. The area deviation is defined as the absolute difference between the boundary coordinates of the desired occlusion area and the boundary coordinates of the actual occlusion area in each direction. A dead zone threshold and a maximum boundary movement rate limit are set that are dynamically adjusted according to the distance from the physical entity target to the vehicle. The distance from the physical entity target to the vehicle is defined as the Euclidean distance from the global spatial representative point coordinate of the physical entity target in the road plane coordinate system to the origin of the road plane coordinate system. The dead zone threshold decreases monotonically as the distance from the physical entity target to the vehicle increases, and the maximum boundary movement rate limit increases monotonically as the distance from the physical entity target to the vehicle decreases. The specific functional relationship is determined by fitting through actual vehicle calibration.
[0099] The processing logic for nonlinear smoothing filtering is as follows:
[0100] The directional components of the region deviation are compared with the corresponding dead zone threshold. If the region deviation is less than the dead zone threshold, the command masking region of the last frame is retained as the command masking region of the current frame to completely suppress minor jitter.
[0101] If the area deviation is greater than or equal to the dead zone threshold, the boundary movement rate required to eliminate the area deviation is calculated. The boundary movement rate is defined as the ratio of the area deviation to the inter-frame time interval. The calculated boundary movement rate is compared with the upper limit of the maximum boundary movement rate. If the boundary movement rate does not exceed the upper limit of the maximum boundary movement rate, the response is direct, and the boundary coordinates of the desired occlusion area are used as the instruction occlusion area of the current frame.
[0102] If the boundary movement rate exceeds the maximum boundary movement rate limit, then based on the actual occlusion area boundary coordinates of the previous frame, the number of pixels corresponding to the maximum boundary movement rate limit is moved along the deviation direction to become the instruction occlusion area of the current frame.
[0103] It should be noted that in the dual smoothing process, predictive feedforward compensation is responsible for eliminating the deterministic lag error introduced by system delay, while nonlinear smoothing filtering is responsible for handling the random high-frequency jitter introduced by false detection and noise. The two work together to ensure timely response to the rapid movement of real physical target objects, while completely eliminating jitter and overshoot in the masking area, forming a stable and smooth masking command output.
[0104] In the vision processing unit, the instruction occlusion area, the corresponding physical entity target object's confusion risk label, and the bounding box coordinates are integrated into an occlusion instruction data frame output;
[0105] S4: Execute transition protection decisions based on the masking command data frame and generate PWM control command data frames;
[0106] Specifically, after obtaining the output masking instruction data frame, a transitional protection decision is further performed on the physical entity target object with the confusion risk label of high confusion risk in the masking instruction data frame;
[0107] It should be noted that the purpose of the transition protection decision is to prevent the headlights from flickering or brightness changes that are perceptible to the human eye due to the instantaneous switching of the headlights in response to extreme conditions where the output results of the deep learning object detection network fluctuate drastically due to severe visual confusion. The transition protection decision is deployed in the vision processing unit.
[0108] It should be noted that in scenarios such as heavy rain, flooded roads, or dense metal guardrails, large-area light spots generated by highly reflective stationary objects may cause deep learning object detection networks to repeatedly switch the classification of the same physical entity between consecutive frames of road images or cause significant jumps in confidence scores. If the PWM control signal output is directly executed based on the occlusion instruction data frame of each frame of road image, it will cause the brightness of the corresponding area of the car headlights to alternate rapidly between bright and dark. The transition protection decision identifies and smooths out such unstable conditions by monitoring the persistence of the confusion risk label and the fluctuation of the confidence score.
[0109] The specific operational logic of the transitional protection decision is as follows:
[0110] Establish a continuous obfuscation monitoring mechanism for each physical entity target. The obfuscation monitoring mechanism records the number of consecutive frames in which each physical entity target is marked as having a high obfuscation risk in consecutive frames of road images, with each consecutive frame being read and accumulated from the obfuscation risk labels of physical entity target in the masking instruction data frames. If any physical entity target changes from having a high obfuscation risk to having a non-high obfuscation risk between adjacent frames of road images, the consecutive frame count is reset to zero and the count is restarted.
[0111] The confidence score of physical entities in the output target detection data frame is continuously recorded, and the standard deviation of the confidence difference between the confidence score of the physical entity target as a vehicle category label and the confidence scores of other potentially confusing category labels is calculated within a preset monitoring time window. The confidence difference is defined as the absolute difference between the confidence score of the physical entity target as a vehicle category label and the confidence score of the physical entity target as another potentially confusing category label. The other potentially confusing category labels are a preset set of category labels that are easily confused with vehicles.
[0112] If the number of consecutive frames exceeds a preset threshold and the standard deviation of the confidence difference exceeds a preset confidence fluctuation threshold, the physical entity is determined to be in a severely visually confusing environment, and the transition protection mechanism is triggered. If neither condition is met, the physical entity is determined not to be in a severely visually confusing environment, and the transition protection mechanism is not triggered.
[0113] It should be noted that the preset consecutive frame number threshold defines the minimum number of consecutive high-confusion risk frames required to trigger transition protection, and the preset confidence fluctuation threshold defines the lower limit of the standard deviation for judging drastic fluctuations in confidence scores; both are determined through actual vehicle calibration.
[0114] It should be noted that the transition protection mechanism is triggered on the premise of the continuous accumulation of high confusion risk labels, so as to avoid incorrect intervention due to the instantaneous interference of a single frame of road image. The introduction of the confidence difference fluctuation range further confirms the uncertainty of the system in the current category judgment. The transition protection is only activated when this uncertainty reaches the threshold and continues to exist.
[0115] When the transition protection mechanism is triggered, the instantaneous switching method is abandoned for the physical target object. Instead, a gradual dimming strategy is used to soften the possible misjudgment effect by gradually transitioning within a preset transition time window. The duration of the preset transition time window is pre-calibrated based on the human eye's adaptation characteristics to brightness changes and typical vehicle driving scenarios. The gradual dimming strategy controls the PWM duty cycle of the corresponding command-shielded area in the car headlight to gradually adjust from the current value to the corresponding preset low brightness reference value or full brightness value. The rate of gradual adjustment is controlled by a preset fixed step size. The gradual transition value is calculated to ensure that the brightness change process is smooth and continuous, eliminating flicker that can be perceived by the human eye.
[0116] It should be noted that the low brightness reference value is a PWM duty cycle value pre-calibrated according to the maximum permissible illuminance of the target area in the applicable region's automotive lighting regulations, so that the beam brightness of the corresponding LED pixel is lower than the safety threshold that causes glare. The low brightness reference value is different for different types of labels.
[0117] If the transition protection mechanism is not triggered, the instruction occlusion area corresponding to the physical entity target in the occlusion instruction data frame will be directly mapped to the PWM duty cycle control signal of each independent pixel in the car headlight.
[0118] The car headlights are composed of M rows and N columns of independently controllable LED pixels. Each LED pixel corresponds to an independent PWM dimming channel. The PWM duty cycle control signal is defined as the ratio of the high level duration to the total PWM cycle time within a PWM cycle. The value range is [0,1], where 0 indicates that the LED pixel is completely off and 1 indicates that the LED pixel is lit at maximum brightness.
[0119] The specific mapping rules are as follows: For LED pixels that fall within any instruction occlusion area, the target PWM duty cycle is set according to the preset low brightness reference value. For LED pixels that do not fall within any instruction occlusion area, their target PWM duty cycle remains at the full brightness value of 1. If any LED pixel is located within the intersection of the instruction occlusion areas of multiple physical entities, the minimum value of the target PWM duty cycle corresponding to each instruction occlusion area is taken as the final target PWM duty cycle of the LED pixel.
[0120] It should be noted that the minimum value principle is adopted to prioritize the anti-glare effect. When the instruction occlusion areas of multiple physical targets overlap, taking the lowest brightness value can ensure that the lighting intensity of all occluded physical targets meets the regulatory compliance requirements.
[0121] If the current frame road image triggers the transition protection mechanism and performs a gradual dimming strategy on any physical entity target, the PWM duty cycle control signal of the corresponding LED pixel is determined by the gradual transition value output by the transition protection.
[0122] The PWM duty cycle control signals of all LED pixels in the automotive headlight are encapsulated into PWM control command data frames according to a preset communication protocol and sent to the LED driver chip via a high-speed bus. The high-speed bus uses a serial communication interface with deterministic transmission delay to ensure that the end-to-end delay of the PWM control command data frame from the vision processing unit to the LED driver chip meets the total delay time constraint. The LED driver chip updates the PWM channel of each independent LED pixel synchronously according to the received PWM control command data frame, driving the automotive headlight to achieve flicker-free, drift-free, and stable adaptive dimming that follows the real target object.
[0123] It should be noted that the transition protection decision and the PWM control signal output together form a complete closed-loop link from road image acquisition to execution control. When there is uncertainty in perception, the transition protection decision exchanges time domain smoothness for spatial accuracy to ensure the optical quality and human eye comfort of the dimming process. The direct mapping and transmission of the PWM control signal ensures a fast and accurate response under normal working conditions. The two work together to achieve a balance between the robustness and real-time performance of adaptive dimming.
[0124] The technical solution of this invention is as follows: acquire road images, extract target objects and multi-dimensional information using a pre-built and trained deep learning target detection network, organize target detection data frames, perform physical existence verification on the target objects based on the target detection data frames, including preliminary labeling, collinear geometric relationship analysis, and time series fluctuation verification, screen physical entity target objects, integrate target tracking data frames, perform confusion risk assessment and label confusion risk on the physical entity target objects based on the target tracking data frames, determine whether to perform double smoothing processing based on the confusion risk labels, generate occlusion instruction data frames, perform transition protection decisions based on the occlusion instruction data frames, and generate PWM control instruction data frames.
[0125] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should still fall within the scope of the present invention.
Claims
1. An adaptive dimming control method for electric vehicle headlights, characterized in that: Includes the following steps: Collect road images and use a pre-built and trained deep learning object detection network to extract target objects and multi-dimensional information, and organize the object detection data frames; Based on the target detection data frame, the physical existence verification of the target object is performed, including preliminary marking, collinear geometric relationship analysis and time series fluctuation verification, to screen physical entity targets and integrate target tracking data frames; Based on the target tracking data frame, the physical entity target object is marked with a confusion risk label. The confusion risk label is used to determine whether to perform double smoothing processing and generate a masking instruction data frame. Transition protection decisions are made based on the masking command data frame, and PWM control command data frames are generated.
2. The adaptive dimming control method for electric vehicle headlights according to claim 1, characterized in that: Preliminary marking specifically includes: The bounding box coordinates and spatial representative point coordinates of each target object in the target detection data frame are mapped to the global bounding box coordinates and global spatial representative point coordinates in the road plane coordinate system according to the inverse perspective transformation mapping relationship, and the estimated actual height of the target object is calculated. The estimated actual height is compared with the reasonable height range queried based on the target object category label. If it is not within the reasonable height range, the target object is initially marked as a candidate mirror target object; otherwise, it is marked as a physical entity target object.
3. The adaptive dimming control method for electric vehicle headlights according to claim 2, characterized in that: The collinear geometric relationship analysis process specifically includes: For each candidate mirror target, in the road plane coordinate system, with the global spatial representative point coordinates of the candidate mirror target as the origin, a rectangular search area is formed by extending a preset longitudinal search distance in the opposite direction of the vehicle's travel direction and setting a preset lateral tolerance width. For each similar physical entity target within the rectangular search area, calculate the angle between the direction vector between the candidate mirror target and the global spatial representative point coordinates of the physical entity target and the vehicle's travel direction vector, and calculate the distance between each of them and the origin of the road plane coordinate system. If the included angle is less than the preset angle tolerance threshold, and the distance corresponding to the candidate mirror target is greater than the distance corresponding to the physical entity target, then it is determined that there is a physical entity target that satisfies the collinear geometric relationship, and the candidate mirror target is updated and marked as a confirmed mirror target.
4. The adaptive dimming control method for electric vehicle headlights according to claim 3, characterized in that: The time series fluctuation verification process specifically includes: For candidate mirror objects that have not been updated to confirmed mirror objects, the cosine similarity between the feature embedding vectors of the candidate mirror objects is calculated as the matching cost in the current frame road image and the previous frame road image. The Hungarian algorithm is used to solve the optimal matching relationship to obtain the adjacent frame matching pairs of the candidate mirror objects. Define a time-series observation frame sequence with the current frame road image as the endpoint and a preset number of frames. Calculate the standard deviation of the bounding box size change rate, the standard deviation of the brightness change rate, and the trajectory offset after motion compensation within the time-series observation frame sequence. Motion compensation is achieved by using the vehicle displacement obtained by the onboard inertial measurement unit to compensate for the coordinates of the global spatial representative points of the candidate mirror target objects in each frame. If the standard deviation of the bounding box size change rate exceeds the preset size fluctuation threshold, and the standard deviation of the brightness change rate exceeds the preset brightness fluctuation threshold, and the trajectory offset is always less than the preset stationary offset threshold, then the candidate mirror target is updated and marked as a confirmed mirror target; otherwise, it is updated and marked as a physical entity target and included in the Kalman filter tracker based on the constant velocity model for cross-frame matching and motion trajectory tracking.
5. The adaptive dimming control method for electric vehicle headlights according to claim 1, characterized in that: Confusion risk assessment includes spatial overlap analysis, specifically as follows: For physical entity targets labeled as vehicles in the target tracking data frame, high reflectivity stationary objects that are adjacent to or overlap with them in spatial location are retrieved. The high reflectivity stationary objects are determined based on the category labels included in the multi-dimensional information of the physical entity targets. If the cross-union ratio between the bounding box of the current physical entity target and the bounding box of any retrieved high reflectivity stationary object is greater than the preset high cross-union ratio risk threshold, then its confusion risk label is marked as high confusion risk.
6. The adaptive dimming control method for electric vehicle headlights according to claim 5, characterized in that: Confusion risk assessment also includes feature consistency testing, specifically as follows: For physical entities that are not marked as having a high risk of confusion due to spatial overlap, the absolute change in the cosine similarity of the feature embedding vectors of the physical entity is calculated between the current frame and the previous frame based on the target trajectory association records included in the target tracking data frame. If the absolute change exceeds the preset similarity mutation threshold and the motion speed between adjacent frames maintains the continuity of spatial position change, then the confusion risk label is marked as having a high risk of confusion. If the physical entity target is not marked after spatial overlap analysis and feature consistency test, then the confusion risk label is marked as non-high confusion risk.
7. The adaptive dimming control method for electric vehicle headlights according to claim 6, characterized in that: Whether to perform double smoothing is determined based on the obfuscation risk label, specifically including: For physical entities with a non-high confusion risk label, an initial occlusion region is generated according to the preset geometric mapping rules from the bounding box to the occlusion region, and is directly used as the instruction occlusion region. For physical entities labeled as having a high risk of confusion, after generating the initial occlusion region, a dual smoothing process is performed, which includes cascaded predictive feedforward compensation and nonlinear smoothing filtering.
8. The adaptive dimming control method for electric vehicle headlights according to claim 7, characterized in that: Predictive feedforward compensation includes: Obtain the preset total delay time of the PWM control signal output. Based on the motion velocity of the physical target object in the image coordinate system output by the Kalman filter tracker, calculate the predicted displacement of the physical target object within the total delay time. Then, shift the center position of the initial occlusion area in advance along the motion velocity direction by the predicted displacement to generate the feedforward compensation occlusion area.
9. The adaptive dimming control method for an electric vehicle headlight according to claim 8, characterized in that: Nonlinear smoothing filtering specifically includes: Set a dead zone threshold and a maximum boundary movement speed limit that are dynamically adjusted according to the distance from the physical target object to the vehicle. The dead zone threshold decreases monotonically as the distance increases, and the maximum boundary movement speed limit increases monotonically as the distance decreases. Define the desired occlusion region as the feedforward compensation occlusion region generated in the current frame, and calculate the region deviation between the desired occlusion region and the instruction occlusion region finally output in the previous frame. If the region deviation is less than the dead zone threshold, the command occlusion region of the previous frame is retained as the command occlusion region of the current frame. If the area deviation is greater than or equal to the dead zone threshold, and the boundary movement rate required to eliminate the deviation does not exceed the maximum boundary movement rate limit, then the desired occlusion area is directly used as the instruction occlusion area of the current frame. If the boundary movement rate exceeds the maximum boundary movement rate limit, then based on the boundary coordinates of the instruction occlusion area in the previous frame, the number of pixels corresponding to the maximum boundary movement rate limit is moved along the deviation direction to form the instruction occlusion area of the current frame.
10. The adaptive dimming control method for an electric vehicle headlight according to claim 1, characterized in that: Transitional protection decisions specifically include: Establish a continuous monitoring mechanism for confusion for each physical entity target object, record the number of consecutive frames in which it is continuously marked as having a high confusion risk, and calculate the standard deviation of its built-in confidence difference within a preset monitoring time window. The confidence difference is the absolute difference between the confidence score of a physical entity target object being detected as a vehicle category label and the confidence score of it being detected as another potential confusion category label. When the number of consecutive frames exceeds the preset consecutive frame threshold and the standard deviation of the confidence difference exceeds the preset confidence fluctuation threshold, the transition protection mechanism is triggered. Within the preset transition time window, the PWM duty cycle of the corresponding instruction occlusion area of the physical entity target object is gradually transitioned from the current value to the preset low brightness reference value or full brightness value with a preset fixed step size. If the transition protection mechanism is not triggered, the command masking area is directly mapped to the PWM duty cycle control signal of each independent LED pixel in the car headlight. For an LED pixel that falls within any command masking area, its target PWM duty cycle is set according to a preset low brightness reference value. If any LED pixel is located in the intersection of multiple command masking areas at the same time, the minimum value among the target PWM duty cycles is taken as the final target PWM duty cycle of the LED pixel.