Double-lamp calibration system for self-closed loop of vehicle lamp and calibration method of double-lamp calibration system
By introducing a dual-light automatic calibration system in the self-closing loop system of the car lights, using vehicle-mounted cameras and image processing technology to automatically calculate and adjust the spot center and brightness of the left and right lights, the problem of accurate calibration in the dual-light projection technology is solved, and efficient Accurate headlight calibration and projection effect improve.
Patent Information
- Application Number
- CN202411444424.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-11
AI Technical Summary
In the prior art, the self-closing loop system of the car lights cannot achieve accurate calibration in the dual-light projection technology, resulting in difficulty in ensuring the consistency of the lighting effect and the reliability of the entire lighting system is reduced.
A dual-light calibration system for self-closing loop of the car light is adopted, including an on-board development board, a headlight module with a controller, a on-board camera and a dual-light automatic calibration program. Through image acquisition and image processing technology, the spot center of the left and right lamps is automatically calculated, the beam overlap area is calculated, and the brightness attenuation process is performed in this area to generate a projection mask diagram corresponding to the left and right lamps.
It realizes the rapid and accurate calibration of the car lights without manual intervention, improves calibration efficiency and accuracy, solves the problem of inconsistent brightness in the overlapping areas of lights, and improves the projection effect of smart car lights.
Smart Images

Figure CN119417911A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent lighting of vehicle headlamps, and in particular to a dual-lamp calibration system and a calibration method thereof for a self-closing loop of vehicle lamps. Background Art
[0002] The headlight self-closing system is a cutting-edge automotive lighting management solution that cleverly integrates cutting-edge sensor technologies such as cameras, millimeter-wave radars, and lidars with headlights. By using advanced image processing algorithms and sophisticated electronic control technology, it can intelligently adjust the direction and brightness of the headlight beam or display different animation effects according to different scenes based on real-time road conditions and traffic conditions. This real-time dynamic adjustment mechanism ensures that the headlights can provide the most ideal road lighting and projection effects, thereby greatly improving driving safety and driving pleasure, especially at night and in bad weather conditions, effectively improving road lighting effects and reducing the occurrence of traffic accidents. It can also be personalized according to the driver's preferences, showing unique personalized characteristics. One of the most critical technologies of the headlight self-closing system is to achieve precise control of the light beam.
[0003] In actual applications, the self-closed-loop system of headlights is generally equipped with two intelligent headlights. When the two headlights work at the same time, there are overlapping parts in the illuminated area. In order to ensure the consistency of the pattern and brightness of the dual-headlight fusion effect, each headlight needs to accurately adjust its own brightness and direction according to different environments and driving conditions. How to ensure the seamless fusion of the dual lights in scenes such as pattern projection and light carpet projection is a difficult problem that must be solved in the self-closed-loop dual-light system of headlights. This requires the development of a high-efficiency and high-precision dual-light automatic calibration system for the self-closed-loop of headlights to achieve accurate and fast calibration of a group of left and right headlights. Summary of the invention
[0004] In order to solve the technical problem that the dual-lamp projection technology in the prior art cannot accurately calibrate the projection area, resulting in the inability to ensure the consistency of lighting effects and reduced reliability of the entire lighting system, the present invention provides a dual-lamp calibration system for a self-closed loop of vehicle lights and a calibration method thereof to solve the above problems.
[0005] The present invention proposes a dual-lamp calibration system for a self-closed loop of vehicle lamps, comprising an on-board development board, a headlamp module with a controller, an on-board camera and a dual-lamp automatic calibration program, wherein the on-board development board has a light control program and an image acquisition program; the headlamp module is driven by the light control program to drive the light emission mode of the headlamp module; and the on-board camera is controlled by the image acquisition program to capture corresponding images. The dual-lamp automatic calibration program uses a calibration method to automatically calculate the spot center of the left and right lamps, calculates the light beam overlap area according to the calibration results of the left and right lamps, performs brightness attenuation processing on the area, and generates a projection mask map corresponding to the left and right lamps.
[0006] The present invention proposes a calibration method, which adopts the above-mentioned dual-lamp calibration system for vehicle lamp self-closing loop, and includes the following steps:
[0007] S1: Design calibration map: select several calibration points corresponding to the lamp beads of the headlamp module to form a calibration map for projection, and collect two projection images of the left and right lamps and one background image of the ground without light projection.
[0008] S2: Obtain the center point of the light spot of the calibration image through image processing method.
[0009] S3: Obtain the coordinate point of the center point of the light spot in the ground coordinate system through the intrinsic parameter matrix and extrinsic parameter matrix of the vehicle-mounted camera.
[0010] S4: Calculate the transformation matrix between the left and right light projection coordinate systems and the ground coordinate system through the PNP algorithm.
[0011] S5: Calculate the position of the boundary line of the light on one side in the projection coordinate system of the light on the other side by matrix transformation, thereby determining the projection overlapping area in the projection coordinate system, and use the attenuation function to attenuate the brightness in the projection overlapping area to generate a projection mask map corresponding to the left and right lights.
[0012] Further, step S2 includes the following steps:
[0013] S21: Differentiate the projection images of the left and right lights from the background image of the ground, and convert the differential image into a binary image.
[0014] S22: Find the largest connected domain in the binary image, use the connected domain analysis algorithm of Opencv to process the binary image, extract the statistical information of each connected domain, sort the connected domains according to their area size, and select the connected domain with the largest area as the target connected domain.
[0015] S23: For each target connected domain, scan the pixel values inside it, find the pixel points with the largest light intensity in each target connected domain, and record the positions of these brightest points as the center points of the light spots.
[0016] Further, step S5 includes the following steps:
[0017] S51: multiply the point on the other side boundary line in the projection image of one side light by the transformation matrix from the projection coordinate system of the side to the ground coordinate system obtained by calibration in step S3 to obtain the boundary line of the projection of the side light in the ground coordinate system.
[0018] S52: multiply the boundary line in the ground coordinate system calculated in step S51 by the transformation matrix from the ground coordinate system to the projection coordinate system on the other side calibrated in step S3 to obtain the position of the boundary line in the projection coordinate system on the other side.
[0019] S53: Determine the overlapping area in the other side projection image described in step S52.
[0020] Further, in step S5, the attenuation function is a power attenuation function as shown below:
[0021]
[0022] Where d represents the horizontal distance from a point on one side of the projection image to the boundary line of the light on the other side in the overlapping area. max is the maximum distance from the boundary, and α is an exponential parameter that controls the degree of attenuation.
[0023] Furthermore, step S2 also includes a center point optimization step after step S23, which specifically includes the following steps:
[0024] S24: Draw a circular area with a certain radius with each light spot center point in step S23 as the center. If each circular area contains the light spot center point corresponding to at least one other circular area, then retain each light spot center point. If a circular area does not contain the light spot center point corresponding to any other circular area, then remove the light spot center point corresponding to the circular area, and form a new maximum connected domain with the circular areas corresponding to the screened light spot center points, and find the pixel points with the maximum light intensity with the same number of calibration points in the maximum connected domain to form a new light spot center point.
[0025] Furthermore, in step S1, the number of calibration points is 4-12, and each calibration point is set to the highest brightness.
[0026] Furthermore, in step S1, the lamp beads corresponding to the calibration points are evenly distributed in the headlamp module.
[0027] Furthermore, the calibration map is an array that is consistent with the number of lamp beads in the headlamp module, and each element in the array represents the on / off state of the corresponding lamp bead.
[0028] Furthermore, the projection mask image is a two-dimensional array consistent with the lamp beads in the headlight module, and each element in the two-dimensional array represents the ratio of the brightness that should be attenuated during the actual projection process of the corresponding lamp beads.
[0029] The beneficial effects of the present invention are:
[0030] (1) The present invention introduces an algorithm to automatically identify the position of the headlight beam. It can automatically complete the precise calibration of the headlight within 10 seconds through the vehicle-mounted camera without human intervention, thereby achieving more efficient and accurate calibration.
[0031] (2) The present invention realizes the simultaneous calibration of a group of left and right headlights, which not only improves the overall efficiency of headlight calibration, but also solves the problem of inconsistent brightness in the overlapping area of lights by automatically calculating the overlapping area and brightness attenuation, further improving the projection effect of the smart headlights. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0033] Figure 1 It is a working flow chart of the dual-lamp calibration system for vehicle lamp self-closing loop according to the present invention;
[0034] Figure 2 is a flow chart of a specific implementation of the calibration method of the present invention;
[0035] Figure 3 It is a flow chart of a specific implementation of the calibration method of the present invention. DETAILED DESCRIPTION
[0036] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0037] Embodiment 1
[0038] A dual-lamp calibration system for a self-closed loop of vehicle lamps includes an on-board development board, a headlamp module with a controller, an on-board camera, and a dual-lamp automatic calibration program. The on-board development board has a light control program and an image acquisition program; the headlamp module is driven by the light control program to achieve a light emission mode; and the on-board camera is controlled by the image acquisition program to capture corresponding images. The dual-lamp automatic calibration program uses a calibration method to automatically calculate the spot center of the left and right lamps, calculates the light beam overlap area based on the calibration results of the left and right lamps, performs brightness attenuation processing on the area, and generates a projection mask image corresponding to the left and right lamps.
[0039] The dual-lamp automatic calibration program runs on the PC and is connected to the vehicle development board via Ethernet. The purpose of installing the program on the PC is to provide a visual display and operation of the calibration process. However, the dual-lamp automatic calibration method proposed in the present invention has high adaptability and flexibility, and can be directly applied to various intelligent vehicle lamp programs on the vehicle development board that require dual-lamp calibration.
[0040] The on-board camera is installed on the back of the rearview mirror at the front of the vehicle, which can effectively capture images of the ground area in front. The camera can complete accurate calibration to ensure that it can provide stable image acquisition capabilities.
[0041] The vehicle development board contains a system-on-chip (SOC) and a microcontroller unit (MCU). The main programs on the SOC include the vehicle camera image acquisition program and the light control program. Figure 1 As shown, the function of the on-board camera image acquisition program is to receive the image acquisition request sent by the dual-light automatic calibration program, and send the image data currently collected by the on-board camera to the dual-light automatic calibration program for further processing and analysis. The light control program is responsible for receiving the calibration map information sent by the dual-light automatic calibration program and forwarding it to the microcontroller unit (MCU). The MCU parses and processes the received light control instructions, converts them into specific instructions that the headlight module can understand and execute, and sends them to the headlight module of the specified headlight. After receiving the signal, the controller in the headlight module lights up the lamp beads in the specified area.
[0042] The headlight module includes a left headlight and a right headlight. The left headlight and the right headlight preferably use high-definition (HD) technology, which can provide higher resolution and more precise beam control capabilities to ensure high accuracy and efficiency of the calibration process.
[0043] After the dual-lamp automatic calibration program establishes communication with the vehicle-mounted development board, the headlamp module and the vehicle-mounted camera, the entire system can have the ability to control lights and acquire images. The light control program and the image acquisition program are both existing technologies. The difference between the present invention and the traditional system is that the dual-lamp automatic calibration program is added. By calculating the center of the left and right light spots and combining the conversion matrix, the overlapping area of the left and right light beams is accurately obtained, thereby generating the projection mask map corresponding to the left and right lights, solving the problem of inconsistent brightness of the dual-lamp projection area, and improving the projection effect.
[0044] Embodiment 2
[0045] like Figure 2 As shown, a calibration method, the method adopts the above-mentioned dual-lamp calibration system for vehicle lamp self-closing loop, and includes the following steps:
[0046] S1: Design calibration map: select several calibration points corresponding to the lamp beads of the headlamp module to form a calibration map for projection, and collect two projection images of the left and right lamps and one background image of the ground without light projection.
[0047] The calibration diagram controls the left and right lights to project respectively. The calibration diagram is an array that is consistent with the number of lamp beads in the headlight module. Each element in the array represents the on / off state of the corresponding lamp bead. The on / off state refers not only to the on or off state, but also to the brightness of the lamp bead. The design of the calibration diagram needs to take into account the target projection angle of the headlight, and the position of the calibration point is designed to be projected to the ground area in front (controllable within 20m in front). The calibration point is the point where the lamp bead is lit. In the calibration state, the brightness of the lamp bead is set to the highest brightness. The number and distribution of the calibration points are considered to be set. In order to improve the accuracy of the measurement, the lamp beads corresponding to the calibration points are preferably evenly distributed in the headlight module, so that the projection distribution is uniform. The number of calibration points can be 4-12. In this embodiment, the number of calibration points selected is 8. The selection conditions of the calibration site should be that the ground is level and open, so that the projected light can be fully displayed, and the environment is dim and there are no reflective objects, so that the projected light is clear and obvious.
[0048] After projecting the left and right lights according to the calibration point, collect a background image of the ground without light projection, and two left and right light projection images of the calibration map projected by the left and right lights respectively. The time interval for collection should not be too long (can be controlled within 3s).
[0049] S2: Obtain the center point of the light spot of the calibration image through image processing method. After each calibration point is projected in step S1, a projection surface is formed. Each projection surface has a brightest point, which is the center point of the light spot. Step S2 is used to find the center points of these light spots in the projection images of the left and right lights, that is, the coordinate points of the center points of the light spots of the left and right lights in the projection coordinate system of the corresponding lights.
[0050] The center point of the light spot is the brightest point on the projection surface. It can be found through image processing based on the projection images of the left and right lights. The specific steps are as follows:
[0051] S21: Differentiate the projection images of the left and right lights from the background image of the ground, and convert the differential image into a binary image, which can effectively remove the influence of the environmental background and highlight the light spot area.
[0052] S22: Find the largest connected domain in the binary image, which corresponds to the area of the light spot. Use the connected domain analysis algorithm of Opencv to process the binary image and extract the statistical information of each connected domain, including area, center of gravity, bounding box, etc. Sort the connected domains according to the size of the area, and select the connected domain with the largest area as the target connected domain. The number of target connected domains is consistent with the number of calibration points in the calibration map. The number of target connected domains found in this embodiment is eight.
[0053] S23: For each target connected domain, scan the pixel values inside it, find the pixel points with the largest light intensity in each target connected domain, and record the positions of these brightest points as the center points of the light spots.
[0054] S3: Obtain the coordinate point of the center point of the light spot in the ground coordinate system through the intrinsic parameter matrix and extrinsic parameter matrix of the vehicle-mounted camera.
[0055] Specifically, first, the collected image is dedistorted by the intrinsic parameter matrix of the vehicle-mounted camera parameters, which describes the intrinsic parameters of the camera, including focal length and principal point offset. Then, the conversion relationship between the image coordinate system and the ground coordinate system is obtained by the extrinsic parameter matrix of the vehicle-mounted camera, which represents the position and direction of the camera in the ground coordinate system. Through the conversion relationship between the image coordinate system and the ground coordinate system, the coordinate point of the center point of the light spot found in the above step S2 is obtained.
[0056] S4: Calculate the transformation matrix between the left and right light projection coordinate systems and the ground coordinate system through the PNP algorithm.
[0057] The image coordinate system is a two-dimensional coordinate system that defines the position of the center point of the light spot in the camera image plane. The projection coordinate system is a two-dimensional coordinate system that defines the position of the center point of the light spot in the projection image plane. The ground coordinate system is a three-dimensional coordinate system that defines the position of the center point of the light spot on the actual ground. The goal of the PNP algorithm is to find the optimal rotation matrix R and translation vector t so that the three-dimensional point P on the ground coordinate system of each projection point i , after perspective projection, corresponds to the two-dimensional point p on the projection coordinate system i The projection error is minimized.
[0058] Step S2 and step S3 establish a one-to-one correspondence between the coordinates of the calibration points in the calibration map in the projection coordinate system and the coordinates in the ground coordinate system. The conversion matrix between the left and right lamp projection map coordinate system and the ground coordinate system can be solved by the PNP algorithm.
[0059] S5: Calculate the position of the boundary line of the light on one side in the projection coordinate system of the light on the other side by matrix conversion, thereby determining the projection overlap area in the projection coordinate system, and use the attenuation function to perform brightness attenuation in the projection overlap area to generate the projection mask map corresponding to the left and right lights. The projection overlap area includes the overlap area in the projection map of the left light and the overlap area in the projection map of the right light. The two overlap areas need to be calculated separately and the brightness is attenuated at the same time.
[0060] Taking one of the overlapping areas as an example, the specific calculation is introduced, which includes the following steps:
[0061] S51: multiply the point on the other side boundary line in the projection image of one side light by the transformation matrix from the projection coordinate system of the side to the ground coordinate system obtained by calibration in step S3 to obtain the boundary line of the projection of the side light in the ground coordinate system.
[0062] S52: multiply the boundary line in the ground coordinate system calculated in step S51 by the transformation matrix from the ground coordinate system to the projection coordinate system on the other side calibrated in step S3 to obtain the position of the boundary line in the projection coordinate system on the other side.
[0063] S53: Determine the overlapping area of the left and right lights in the other side projection image described in step S52.
[0064] In the actual illumination range of the left and right headlights of a vehicle, there must be an area of overlapping illumination, and the brightness of this area is higher than that of the area illuminated by a single headlight. Assuming that we are looking for the overlapping area in the projection image of the left headlight, the specific operation is as follows:
[0065] First, take the discrete points on the left boundary line of the right light projection map, multiply them by the conversion matrix from the right light projection map coordinate system to the ground coordinate system obtained in step S4, and obtain the left boundary line of the actual projection process of the right light, that is, the coordinate points of the discrete points on the left boundary line of the right light projection process in the ground coordinate system. Next, multiply the converted coordinate points by the conversion matrix from the ground coordinate system to the left light projection map coordinate system obtained in step S4, and obtain the coordinate points of the discrete points on the left boundary line of the right light projection process in the left light projection map, and then determine the part of the overlapping area on the left light projection map.
[0066] The overlapping area on the right light projection image can be determined in the same way. Then, the overlapping area of the two projection images is smoothly transitioned between the overlapping area and the non-overlapping area by using a brightness attenuation method, so that the brightness superposition is more uniform.
[0067] The attenuation function may adopt a power attenuation function as shown below:
[0068]
[0069] Where d represents the horizontal distance from a point on one side of the projection map to the boundary line of the other side of the light in the overlapping area, that is, the horizontal distance from each point on the left light projection map to the left boundary line of the right light, and the horizontal distance from each point on the right light projection map to the right boundary line of the left light. max is the maximum distance from the boundary, and α is an exponential parameter that controls the degree of attenuation. By adjusting the value of α, the smoothness of the transition can be controlled. A smaller α value will result in a more gradual transition, while a larger value will produce a more drastic change. Based on this, the projection mask map corresponding to the left and right lights is generated. Specifically, it is a two-dimensional array consistent with the lamp beads in the headlight module. Each element represents the proportion of the brightness that should be attenuated during the actual projection process of the corresponding lamp bead.
[0070] Embodiment 3
[0071] In the second embodiment, when obtaining the center point of the spot of the calibration image, abnormal center points of the spot may be generated due to image capture errors. The position deviation of these abnormal center points of the spot is large and may be located outside the projection area of the calibration point, thereby affecting the accuracy of the final calculation of the overlapping area of the left and right lamp projections. Therefore, in order to eliminate possible abnormal points, this embodiment performs regional optimization based on the center points of the spot found in the second embodiment and then searches for the center points of the spot again. Figure 3 As shown, it specifically includes the following steps:
[0072] S24: Draw a circular area with a certain radius with each light spot center point in step S23 as the center. If each circular area contains the light spot center point corresponding to at least one other circular area, then retain each light spot center point. If a circular area does not contain the light spot center point corresponding to any other circular area, then remove the light spot center point corresponding to the circular area, and form a new maximum connected domain with the circular areas corresponding to the screened light spot center points, and find the pixel points with the maximum light intensity with the same number of calibration points in the maximum connected domain to form a new light spot center point.
[0073] In this embodiment, there are eight calibration points in total, and thus eight spot center points. The eight calibration points are arranged in a chessboard array, so the distance between two adjacent calibration points is the same. Then, the distance between the points on the projection surface formed by the two adjacent calibration points is within a specific value range. The radius of the circular area is set according to the distance between the two adjacent calibration points. The setting standard is that for a normal spot center point, at least one other spot center point can be found in the circular area centered on any one of the spot centers. If no other spot center point can be found, it means that the spot center point corresponding to the circular area is an abnormal point.
[0074] After screening in step S24, the circular areas corresponding to the remaining center points of the light spots constitute a new maximum connected domain. Compared with the maximum connected domain in Example 2, the maximum connected domain at this time has a more accurate regional position, and the center points of the light spots found will not have deviations. Then, within the scope of the new maximum connected domain, eight new center points of the light spots are found in the projection image.
[0075] This embodiment can effectively reduce the interference of noise and ensure that the selected center point of the light spot truly represents the center of the light spot projected on the ground by the vehicle light.
[0076] The present invention can efficiently and accurately calibrate a set of left and right lights by sharing camera parameters and synchronous brightness attenuation, improve the consistency of calibration, and improve the overall visual experience of the projection effect of the left and right lights. At the same time, the present invention can complete the calibration in a short time, and a complete calibration time can be completed within 10 seconds.
[0077] The present invention accurately calculates the projection overlapping area corresponding to the left and right lights through the conversion matrix of a pair of left and right lights generated by the calibration method, and then generates a projection mask image corresponding to the left and right lights, multiplies each pixel of the projection image of the left and right lights by the ratio of the corresponding projection mask image, and projects the result through a lighting control program, and performs a visual inspection on the brightness adjustment effect of the overlapping area to ensure uniform brightness transition.
[0078] The calibration method of the present invention can generate a conversion matrix between the projection coordinate system of the headlight and the ground coordinate system for a single headlight, and evaluate it through the reprojection error. This measure ensures that the light beam of the headlight is controlled from the perspective of the actual ground coordinate system, and can achieve accurate ground projection. The method can be applied to the calibration of digital lighting headlights with multiple lamp beads whose projection range is at least half in the close-range area (5-40m). The present invention can calibrate a pair of left and right headlights according to the calibration method, but is not limited to two lights, and can actually calibrate any number of lights.
[0079] In this specification, the schematic representation of the terms does not necessarily refer to the same embodiment. Moreover, the specific features, structures, materials or characteristics described can be combined in any suitable manner in one or more embodiments.
[0080] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A dual-lamp calibration system for a self-closed loop of vehicle lamps, characterized in that: include: An on-board development board, wherein the on-board development board has a light control program and an image acquisition program; A headlamp module with a controller, wherein the light-emitting mode of the headlamp module is driven by a light-control program; The vehicle-mounted camera is controlled by the image acquisition program to capture corresponding images; The dual-lamp automatic calibration program uses the calibration method to automatically calculate the spot center of the left and right lamps. According to the calibration results of the left and right lamps, the beam overlap area is calculated, and the brightness attenuation processing is performed on the area to generate the projection mask map corresponding to the left and right lamps.
2. A calibration method, characterized in that: The method adopts the dual-lamp calibration system for the self-closing loop of vehicle lamps as claimed in claim 1, and comprises the following steps: S1: Design calibration map: select several calibration points corresponding to the lamp beads of the headlamp module to form a calibration map for projection, and collect two projection images of the left and right lamps and one background image of the ground without light projection; S2: Obtain the center point of the light spot of the calibration image through image processing method; S3: Obtain the coordinate point of the center point of the light spot in the ground coordinate system through the intrinsic parameter matrix and extrinsic parameter matrix of the vehicle-mounted camera; S4: Calculate the transformation matrix between the left and right light projection coordinate systems and the ground coordinate system through the PNP algorithm; S5: Calculate the position of the boundary line of the light on one side in the projection coordinate system of the light on the other side by matrix transformation, thereby determining the projection overlapping area in the projection coordinate system, and use the attenuation function to attenuate the brightness in the projection overlapping area to generate a projection mask map corresponding to the left and right lights.
3. The calibration method according to claim 2, characterized in that: Step S2 includes the following steps: S21: subtract the projection images of the left and right lights from the background image of the ground, and convert the difference image into a binary image; S22: Find the largest connected domain in the binary image, use the connected domain analysis algorithm of Opencv to process the binary image, and extract the statistical information of each connected domain. Sort the connected domains according to their area sizes, and select several connected domains with the largest areas as target connected domains; S23: For each target connected domain, scan the pixel values inside it, find the pixel points with the largest light intensity in each target connected domain, and record the positions of these brightest points as the center points of the light spots.
4. The calibration method according to claim 2, characterized in that: Step S5 includes the following steps: S51: multiply the point on the projection image of one side light close to the boundary line of the other side by the transformation matrix from the projection coordinate system of the side to the ground coordinate system obtained by calibration in step S3, to obtain the boundary line of the projection of the side light in the ground coordinate system; S52: multiply the boundary line in the ground coordinate system calculated in step S51 by the transformation matrix from the ground coordinate system to the projection coordinate system on the other side obtained by calibration in step S3 to obtain the position of the boundary line in the projection coordinate system on the other side; S53: Determine the overlapping area in the other side projection image described in step S52.
5. The calibration method according to claim 2, characterized in that: In step S5, the attenuation function is a power attenuation function as shown below: Where d represents the horizontal distance from a point on one side of the projection image to the boundary line of the light on the other side in the overlapping area. max is the maximum distance from the boundary, and α is an exponential parameter that controls the degree of attenuation.
6. The calibration method according to claim 3, characterized in that: Step S2 also includes a center point optimization step after step S23, which specifically includes the following steps: S24: Draw a circular area with a certain radius with each light spot center point in step S23 as the center. If each circular area contains the light spot center point corresponding to at least one other circular area, then retain each light spot center point. If a circular area does not contain the light spot center point corresponding to any other circular area, then remove the light spot center point corresponding to the circular area, and form a new maximum connected domain with the circular areas corresponding to the screened light spot center points, and find the pixel points with the maximum light intensity with the same number of calibration points in the maximum connected domain to form a new light spot center point.
7. The calibration method according to claim 2, characterized in that: In step S1, the number of calibration points is 4-12, and each calibration point is set to the highest brightness.
8. The calibration method according to claim 2, characterized in that: In step S1, the lamp beads corresponding to the calibration points are evenly distributed in the headlamp module.
9. The calibration method according to claim 2, characterized in that: The calibration diagram is an array that is consistent with the number of lamp beads in the headlamp module, and each element in the array represents the on / off state of the corresponding lamp bead.
10. The calibration method according to claim 2, characterized in that: The projection mask image is a two-dimensional array that is consistent with the lamp beads in the headlight module, and each element in the two-dimensional array represents the ratio of the brightness that should be attenuated during the actual projection process of the corresponding lamp beads.
Citation Information
Cited By
Double-lamp fusion image generation method and system for vehicle headlamp projection
CN120807316A