System and method for detecting light distribution curve of vehicle headlamp
By using image acquisition devices and intelligent algorithms in the high beam detection system to extract the headlight distribution curve, combined with deep learning and optical principles, the problems of low accuracy, slow detection speed and high error detection rate in the existing high beam detection technology are solved, and higher detection accuracy and speed are achieved, and stable in complex environments are maintained.
Patent Information
- Application Number
- CN202510108232.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-06
AI Technical Summary
The existing high beam detection technology has problems with low accuracy, slow detection speed, high error detection rate and sensitivity to complex road environments.
A light distribution curve detection system for vehicle headlights is adopted to obtain road video data through an image acquisition device, and the headlight distribution curve is extracted using a built-in intelligent algorithm. Combined with deep learning and optical principles, the high beam is turned on.
Improves the accuracy and detection speed of high beam detection, reduces the false detection rate, and maintains stability in complex road environments.
Smart Images

Figure CN119935513A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and in particular relates to a system and method for detecting a light distribution curve of a vehicle headlamp. Background Art
[0002] Failure to use high beams at night will cause glare and visual disturbance to drivers of oncoming vehicles, reduce their driving safety, and easily cause traffic accidents. If you use high beams from behind, it will cause the reflectors of the vehicles in front to produce strong reflected light, which will affect their vision and increase driving risks. Traditional high beam detection methods are not only slow, but also have low detection accuracy and high missed detection and false detection rates. The existing optical algorithm based on deep learning effectively solves the problems of high false detection rate and missed detection rate, while improving the detection speed. Summary of the invention
[0003] In order to solve the shortcomings of the existing high beam detection technology, the purpose of the present invention is to provide a high beam detection method with high accuracy, fast detection speed, low false detection rate and no interference from complex road environment. Compared with the existing technology, the accuracy is improved to a certain extent and the detection system is more stable.
[0004] In order to achieve the above object, the present invention adopts the following technical solution:
[0005] A light distribution curve detection system for a vehicle headlamp, the system comprising: an image acquisition device, a vehicle headlamp and a bracket; the bracket is installed on a crossbar above a lane and provides a two-dimensional angle adjustment function for the image acquisition device fixed thereon;
[0006] The image acquisition device includes: a monitoring camera, a main control unit, a drive unit, and a network module.
[0007] The lens optical axis of the monitoring camera in the image acquisition device and the center line of the lane are both in the vertical plane and intersect at the center of the target area. Appropriate optical parameters are set to ensure that its field of view effectively covers the target area and continuously obtains clear road traffic video data.
[0008] The main control unit built into the image acquisition device contains an intelligent algorithm to complete the preprocessing of video data, the extraction of the headlamp distribution curve, the judgment of whether the high beam is on, and the management of system data; the intelligent algorithm judges whether the high beam is on based on the headlamp distribution curve, conforms to the principles of optics and lighting, and is a direct judgment algorithm.
[0009] Surveillance cameras are used to collect video data;
[0010] The main control unit is connected to the monitoring camera via a data cable. The main control unit can also adjust the optical parameters of the monitoring camera, store the collected images, and transmit the high beam identification results through the network module.
[0011] The drive unit is used to supply power to the camera and the main control unit respectively.
[0012] Furthermore, the field of view of the surveillance camera is between 48-53 degrees. The large horizontal field of view can capture enough road images, and the vertical field of view ensures that the surveillance can read images within a distance of 100 meters on the road. The video resolution is 2k-4k, the image quality is relatively high, and the reading of car lights is more accurate. The ISO is between 800-6400, which can make the images collected at night also clear.
[0013] Further, the main control unit includes: a processor and a readable storage medium, wherein the readable storage medium can be controlled by the processor to operate;
[0014] The processor is used to execute machine executable instructions and can implement the following steps:
[0015] The processor executes the operation instruction to read the image in the storage medium, and uses a vehicle headlamp light distribution curve detection method to detect the read image. This algorithm is an intelligent algorithm that can complete the preprocessing of video data, the extraction of the headlamp light distribution curve, the judgment of the high beam on, and the management of system data. This intelligent algorithm judges the high beam on based on the headlamp light distribution curve, conforms to the principles of optics and lighting, and is a direct judgment algorithm. This intelligent algorithm is used to detect the high beam. If the detected image belongs to the high beam, the image is saved and the result is transmitted to the server through the 4G network for storage. If the detected image does not belong to the high beam, the image is not saved.
[0016] A method for detecting a light distribution curve of a vehicle headlamp comprises the following steps:
[0017] Step 1) Detect, track and acquire the headlight image of the target vehicle;
[0018] Step 2) calculating the distance and illumination relationship curve of the headlight;
[0019] Step 3) fitting the light distribution curve;
[0020] Step 4) Create a scatter plot of car light classification;
[0021] Step 5) comparing the threshold value to determine whether the target vehicle has turned on the high beam;
[0022] Furthermore, detecting, tracking and acquiring the target vehicle headlight image includes:
[0023] The headlight image is extracted through detection and tracking using a specifically trained deep learning model; the grayscale threshold method and erosion and dilation method are used to extract accurate headlight images.
[0024] Furthermore, the distance-illuminance relationship curve of the vehicle headlight is calculated by:
[0025] Calculate the total grayscale value I of the light area extracted from each frame and the distance R to the camera, using the formula I×R 2 Get the light intensity E of the car light IR , the relationship between the headlight illumination intensity and the distance from the headlight to the camera is displayed on the coordinate axis to obtain the headlight illumination curve.
[0026] Fitting the light distribution curve uses the logarithmic function I = a + b * log e The illumination curve obtained by t is fitted to obtain two parameters a and b; parameter a is mainly reflected in the up and down translation of the curve, and parameter b is reflected in the degree of change of the curve.
[0027] Furthermore, the scatter plot of the headlights is to use the parameter b of the fitting curve as the horizontal coordinate and the average gray value I of the headlights 40 meters away from the camera as the vertical coordinate. Draw two curves, the dotted line is the low beam threshold dividing line, and the solid line is the high beam dividing line.
[0028] Furthermore, the threshold comparison to determine whether the target vehicle turns on the high beam includes:
[0029] If the threshold is greater than the set threshold, it is determined that the target vehicle has turned on the high beam; if the threshold is less than the set threshold, it is determined that the target vehicle has not turned on the high beam. Figure 7 In the figure, the distance from the data point to the origin, the minimum distance from the high beam scatter points to the origin is calculated as the high beam threshold);
[0030] The beneficial effects of the present invention are as follows: first, the video is detected by an image acquisition device to extract the car headlights, and then the light distribution curve of the headlights is extracted by a built-in intelligent algorithm, a scatter plot of the headlight classification is made, and a suitable high beam threshold is found. By setting the threshold for detecting high and low beams, the high and low beams of vehicles with turned on lights can be distinguished. The final detection accuracy meets the national standard requirements, and the detection speed is improved compared with the traditional high beam detection method.
[0031] The present invention uses a method that combines deep learning with optical light distribution curves to detect high beams, and uses grayscale values as the basis for distinguishing high beams. Compared with the past, this method is more innovative. At the same time, the accuracy, stability, and generalization of this algorithm are greatly improved compared with traditional image processing algorithms. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a side view of the road monitoring of this embodiment;
[0033] Figure 2 It is the detection flow chart of this embodiment;
[0034] Figure 3 The threshold method of this embodiment extracts the information of the headlight part;
[0035] Figure 4 This embodiment uses deep learning to extract information about the headlights;
[0036] Figure 5 This is a top view of the road monitoring in this embodiment;
[0037] Figure 6 is the fitted light distribution curve diagram of this embodiment;
[0038] Figure 7 It is a scatter plot drawn according to the gray value and distance in this embodiment. DETAILED DESCRIPTION
[0039] The present invention will be further described in detail below with reference to the accompanying drawings.
[0040] A light distribution curve detection system for vehicle headlights, such as Figure 1 The figure shows a side view of road monitoring (monitoring camera), where α is the pitch angle, θ is the vertical field angle, H is the height of the camera from the ground, Δθ is the angle between the position of the target vehicle and the position of D1, D1 is the actual distance from the bottom edge of the image to the camera, and D2 is the actual distance from the top edge of the image to the camera. The three parameters H, D1 and D2 are quantities that need to be measured in advance. After the camera is installed, the monitoring height H = 4.21m is measured. According to the image, D1 = 10m and D2 = 110m are measured in practice.
[0041] like Figure 2 As shown, a method for detecting a light distribution curve of a vehicle headlamp comprises the following steps:
[0042] Step 1) obtaining a target vehicle headlight image;
[0043] First, the headlights are detected using the target detection algorithm yolov5 that has been specifically trained and lightweight (the yolov5 detection algorithm can detect multiple categories. In the present invention, only a data set of headlight categories is designed for training to detect the single category of headlights; the convolution layer output channel of the backbone module of the original yolov5 model is lightweight modified. The number of channels in each convolution layer of the modified model is less than the original model, the model is lighter, and the detection speed is faster). Then, the deep learning target tracking algorithm deepsort is used for tracking, and then the adaptive grayscale threshold method and the corrosion and expansion algorithm are used to further extract the headlight information.
[0044] Step 2) calculating the distance-illuminance relationship curve of the vehicle light;
[0045] First, use the coordinate conversion formula to convert the pixel coordinates in the image into real coordinates, calculate the distance R between the headlights and the camera based on the real coordinates, calculate the illumination value I of the headlight area, display the relationship between the two on the coordinate axis, and obtain the illumination curve.
[0046] Step 3) fitting the light distribution curve;
[0047] The obtained illumination curve is fitted using a logarithmic function to obtain a smooth curve.
[0048] Step 4) Create a scatter plot of car lights;
[0049] The slope of the fitted curve is selected as the horizontal axis, and the average illuminance of the illuminance curve after 40 meters is selected as the vertical axis, and a scatter plot of the car's high and low beam lights is made to distinguish the high and low beam lights.
[0050] Step 5) Threshold comparison determines whether the target vehicle turns on the high beam.
[0051] like Figure 3 As shown, the acquired headlight photo is further processed. First, the image is binarized and converted into a single-channel black and white image. It is preliminarily processed using the adaptive grayscale threshold method, and then the corrosion and dilation morphological processing is used to finally extract the headlight information in the shape of the right side of the figure. Figure 3 Among them, (a) and (b) are one group, and (c) and (d) are another group. Only one group can be used.
[0052] like Figure 4 As shown, the obtained headlight photos are further processed, and polygons are drawn along the edges of the headlights using the LabelMe software. As many points as possible are used to describe the headlights, and as many data sets as possible are produced. In this embodiment, 2000 samples are produced and trained using the above software, and the trained weight file is used for testing, and finally the headlight information of the shape shown in the right side of the figure is extracted.
[0053] like Figure 5 The figure shows a road monitoring top view, where β is the horizontal field of view, w is the width of the image pixel, h is the height of the image pixel, (X1, Y1) is the actual coordinate position of the target vehicle, and (X0, Y0) is the pixel coordinate of the target vehicle in the image. β, w, and h are also quantities that need to be known in advance. is the width of the CCD, and f is the focal length of the camera.
[0054] According to the following formula
[0055] According to the proportional relationship Solve for Δθ,
[0056] according to Y1=Htan(α+Δθ) can be used to calculate the actual vertical distance Y1 of the target vehicle from the camera.
[0057] The next step is to calculate the actual horizontal distance X1 of the target vehicle from the camera, assuming that B1 is the maximum actual horizontal distance within the camera's field of view. There is also a proportional relationship between X0 and X1, but the requirement for X1 is a little different, and it needs to be solved with the help of Y1 that has been calculated.
[0058] Combining the video image, we can conclude that the pixel horizontal coordinate of the monitoring location is 450. At this point, we can use the above formula to calculate the actual horizontal distance X1 and vertical distance Y1 of the target vehicle from the camera. Assuming that the distance from the camera to the headlight of the target vehicle is R, h is the vertical distance between the headlight and the ground. The distance from the camera to the headlight of the target vehicle can be calculated by using the monocular ranging principle, which is used as the subsequent fitting optical curve parameter.
[0059] Before calculating the distance-illuminance relationship curve of the headlight, it is necessary to calculate the illuminance E of the light emitted by the headlight source projected onto the surface of the camera lens. There is a specific relationship between the actual illuminance E and the grayscale value of the CCD image:
[0060]
[0061] a and b represent constants, G represents the grayscale value of the image collected by the CCD, t is the exposure time, and g vis the gain term, assuming that the camera remains fixed. Therefore, the grayscale value of the image captured by the surveillance camera can be used to represent the illuminance E projected by the headlight onto the camera surface. Then, using the inverse square law of illuminance and distance, the luminous intensity of the headlight can be calculated; and then the relationship between the luminous intensity of the headlight and the distance is displayed on the coordinate axis.
[0062]
[0063] like Figure 6 As shown, select the logarithmic function I = a + b * log e By fitting the illuminance curve, we get a smooth curve that can distinguish high and low beam lights, and get two parameters a and b. a is the up and down translation of the curve, and b is the degree of change of the curve. Figure 6 61 represents a high beam curve fitted by a linear function, 62 represents a high beam curve fitted by a logarithmic function, 63 represents a low beam curve fitted by a logarithmic function, and 64 represents a low beam curve fitted by a linear function.
[0064] like Figure 7 As shown, by selecting the average value of the illumination curve after 40 meters as the ordinate and the slope b of the fitting curve, a scatter plot of high and low beam lights is obtained, through which high beam lights and low beam lights can be distinguished. By selecting a threshold greater than the high beam threshold dividing line 71, the high beam lights can be accurately detected.
[0065] If the threshold is greater than the high beam threshold dividing line 71, it is determined that the target vehicle has turned on the high beam; if the threshold is less than the high beam threshold dividing line 71, it is determined that the target vehicle has not turned on the high beam;
[0066] Figure 7 Among them, 71 represents the high beam threshold dividing line, 72 represents the low beam threshold dividing line, 73 represents the low beam scatter point, and 74 represents the high beam scatter point.
[0067] Example 2
[0068] The difference from Example 1 is that in step 1), the light-weighted target detection algorithm yolov5-lite is first used to detect the headlights (YOLOv5-Lite is a lightweight version of YOLOv5, which simplifies and compresses the model structure to reduce the number of model parameters and the amount of calculation. YOLOv5 Lite has a smaller model volume and faster reasoning speed than YOLOv5, but will sacrifice a certain detection accuracy accordingly. YOLOv5 Lite is also an open source tool. On the basis of open source, the output channels of the convolutional layer of the backbone module of the model are reduced to increase the detection speed, and the detection accuracy is reduced less), and then the deep learning target tracking algorithm deepsort is used for tracking, and then the trained deep learning algorithm U-Net is used to further extract the headlight information.
[0069] This method is suitable for complex environments with many interferences in the videos captured by traffic monitoring cameras. The steps are simple. The entire system has high accuracy and fast speed from acquiring videos to detecting high-beam vehicle information, and can accurately detect vehicles with high-beam lights turned on.
[0070] The above embodiments are only preferred embodiments of the present invention and are not limitations of the technical solutions of the present invention. Any technical solution that can be implemented on the basis of the above embodiments without creative work should be deemed to fall within the scope of protection of the patent of the present invention.
Claims
1. A vehicle headlamp light distribution curve detection system, characterized in that: It includes an image acquisition device, a car headlamp and a bracket; The image acquisition device is fixed to a bracket, which is mounted on a crossbar above the lane, and the bracket is capable of performing two-dimensional angle adjustment on the image acquisition device; The image acquisition device includes a monitoring camera, a main control unit, a drive unit, and a network module; The surveillance camera is used to collect target images; The optical axis of the surveillance camera's lens and the lane centerline are both in the same vertical plane and intersect at the center of the target area; The main control unit is connected to the monitoring camera via a data cable. The main control unit is used to adjust the optical parameters of the monitoring camera, pre-process image data, extract the headlamp distribution curve, determine whether the high beam is on, and manage system data; The network module is used to transmit the high beam identification result; The driving unit is used to supply power to the camera and the main control unit respectively.
2. A vehicle headlamp light distribution curve detection system according to claim 1, characterized in that: The surveillance camera has a field of view of 48-53 degrees, and the vertical field of view ensures that the surveillance can capture images within a distance of 100 meters on the road; the video resolution is 2k-4k, and the ISO is between 800-6400, ensuring the clarity of image capture at night.
3. The vehicle headlamp light distribution curve detection system according to claim 1, characterized in that: The main control unit includes a processor and a readable storage medium; The readable storage medium is controlled to operate by the processor; The processor is used to execute machine-executable instructions. The processor executes the operation instructions to read an image in a storage medium, uses a vehicle headlamp light distribution curve detection method to detect the read image, and judges whether the high beam is on based on the headlamp light distribution curve. If the detected image belongs to the high beam, the image is saved and the result is transmitted to the server via a 4G network for storage; if the detected image does not belong to the high beam, the image is not saved.
4. A method for detecting a light distribution curve of a vehicle headlamp, characterized in that: The following steps are involved: Step 1) detecting, tracking, and acquiring a target vehicle headlight image; Step 2) Calculate the distance and illumination relationship curve of the headlight; Step 3) fitting the light distribution curve; Step 4) Create a scatter plot of vehicle light classification; Step 5) Threshold comparison determines whether the target vehicle has turned on its high beam.
5. The method for detecting the light distribution curve of a vehicle headlamp according to claim 4, characterized in that: Step 1) detecting, tracking, and acquiring the target vehicle headlight image includes: 1.1) Detect and track the headlight image using the trained deep learning model; 1.2) Use grayscale thresholding and erosion and dilation methods to extract accurate car light images.
6. The method for detecting the light distribution curve of a vehicle headlamp according to claim 4, wherein: Step 2) calculating the distance-to-illuminance relationship curve of the vehicle light includes: Calculate the total grayscale value I of the headlight area extracted from each frame and the distance R from the headlight area to the camera, using the formula I×R 2 Get the light intensity E of the car light IR , the relationship between the headlight illumination intensity and the distance from the headlight to the camera is displayed on the coordinate axis to obtain the headlight illumination curve.
7. The method for detecting the light distribution curve of a vehicle headlamp according to claim 4, wherein: Step 3) Fitting the light distribution curve is done using the logarithmic function I = a + b * log e The illumination curve obtained is fitted to obtain two parameters, a and b. Parameter a is the intercept of the fitting curve, which is expressed as the up and down translation of the curve. Parameter b is the slope of the fitting curve, which is expressed as the degree of change of the curve, that is, the brightness of the high beam.
8. The method for detecting the light distribution curve of a vehicle headlamp according to claim 4, characterized in that: Step 4) Create a scatter plot of vehicle light classification; The high beam scatter plot is plotted with the parameter b of the fitting curve as the horizontal coordinate and the average grayscale value I of the headlights M meters away from the camera as the vertical coordinate. Draw two threshold dividing lines, namely the high beam threshold dividing line and the low beam threshold dividing line.
9. The method for detecting the light distribution curve of a vehicle headlamp according to claim 4, wherein: Step 5) Threshold comparison to determine whether the target vehicle has turned on the high beam: If the threshold is greater than the set high beam threshold, it is determined that the target vehicle has turned on the high beam; if the threshold is less than the set high beam threshold, it is determined that the target vehicle has not turned on the high beam.
Citation Information
Cited By
Performance evaluation method and system for vehicle-mounted optical lens
CN120507118A
A method and system for evaluating performance of a vehicle-mounted optical lens
CN120507118B
Method and system for detecting light distribution difference of high beam and low beam in narrow field of view
CN121937960A