A dual-lamp calibration and fusion system and method for vehicle lights
Through the dual-light calibration and fusion system, the conversion matrix is generated using the singular value decomposition method to realize the accurate calibration of car light projection and the integration of left and right lights, solving the problem of time-consuming and large errors in the traditional car light calibration method, and improving projection accuracy and system intelligence.
Patent Information
- Application Number
- CN202411910603.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-24
AI Technical Summary
Traditional car light calibration methods rely on manual debugging, which consumes time and is prone to artificial errors, and cannot meet the high-precision needs of high-pixel headlights.
The dual-light calibration and fusion system is adopted to establish the world coordinate system and projection map coordinate system through the controller, left projection lamp and right projection lamp, and generate a transformation matrix using the singular value decomposition method to realize the accurate calibration of car light projection and the fusion of left and right lights.
The precise projection of the headlights in the designated area is realized, the accuracy and stability of the projection is improved, manual intervention is reduced, the error of traditional manual debugging is avoided, and the degree of intelligence of the system and the efficiency of actual use is improved.
Smart Images

Figure CN119342654B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent lighting of vehicle lamps, and in particular to a system and method for calibrating and fusing dual lamps of a vehicle lamp. Background Art
[0002] As an important component of a car, headlights are the key carrier of interaction between cars, roads and people. With the advancement of technology, car headlights have gradually evolved from traditional lighting equipment to intelligent systems. Especially in the context of the continuous improvement of the level of vehicle intelligence, the requirements for the pixel and interactive functions of headlights are also gradually increasing. Headlights are upgrading to pixelated headlights. The current main pixelated headlight technologies include DLP (Digital Light Processing) and HD (Micro LED). Smart headlights mainly have the following functions: First, smart headlights can automatically adjust the brightness and angle of lighting according to the lighting conditions of the surrounding environment. For example, when driving at night, the high-precision adaptive high beam system (Adaptive Driving Beam System, ADB) can be turned on to improve driving safety. In addition, smart headlights can also interact and communicate with the surrounding environment to improve driving efficiency and safety. For example, on roads without zebra crossings, headlights can project graphic symbols to give way to pedestrians and communicate with pedestrians through the language of headlights. Smart headlights can also project customized startup welcome messages, patterns, and car search signs.
[0003] However, accurate light calibration is essential to realize the above intelligent functions. Traditional headlight calibration methods usually rely on manual debugging, which is not only time-consuming, but also prone to human errors, resulting in inaccurate projection position and uneven lighting effects, which cannot meet the high-precision requirements of pixelated headlights. With the rapid development of high-pixel headlight technologies such as DLP and HD, the accuracy requirements for headlight projection are increasing, and simple manual debugging can no longer adapt to complex application scenarios.
[0004] The above problems need to be solved urgently. Summary of the invention
[0005] The purpose of the present invention is to overcome at least one technical problem existing in the prior art and to provide a dual-lamp calibration and fusion system and method for vehicle lights.
[0006] On the one hand, an embodiment of the present invention provides a dual-lamp calibration and fusion system for vehicle lights, the system comprising a dual-lamp calibration subsystem and a dual-lamp fusion subsystem, both of which adopt a controller, a left projection lamp and a right projection lamp, the controller being electrically connected to the left projection lamp and the right projection lamp respectively; the dual-lamp calibration subsystem establishes a world coordinate system and a projection map coordinate system through the controller, the left projection lamp and the right projection lamp to complete the calibration of the vehicle lights, the world coordinate system includes the coordinates of the light spot projected by the projection point on the ground, and the projection map coordinate system includes the position coordinates of the corresponding projection point on the projection map; the dual-lamp fusion subsystem completes the fusion of the left projection lamp and the right projection lamp through the controller, the left projection lamp and the right projection lamp after the dual-lamp calibration subsystem completes the calibration of the vehicle lights, comprising: the controller is used to generate a first projection image and a second projection image based on the input projection map respectively, and control the left projection lamp to project based on the first projection image, and control the right projection lamp to project based on the second projection image; the left projection lamp and the right projection lamp are respectively based on the input projection map. The control instruction sent by the controller displays the corresponding projection image; the controller integrates a coordinate conversion module, an overlapping area calculation module, an image decomposition module, a projection area definition module and a projection image generation module; the coordinate conversion module is used to obtain the conversion matrix between the world coordinate system and the projection image coordinate system based on the singular value decomposition method, and establish the conversion relationship between the world coordinate system and the projection image coordinate system based on the conversion matrix; the overlapping area calculation module is used to calculate the projection overlapping area of the left projection lamp and the right projection lamp based on the conversion matrix; the image decomposition module is used to calculate the decomposition ratio based on the projection overlapping area, and decompose the image to be projected based on the decomposition ratio to obtain the image to be projected by the left projection lamp and the image to be projected by the right projection lamp respectively; the projection area definition module is used to define the projection area; the projection image generation module is used to use the perspective transformation method based on the defined projection area to perform affine transformation on the image to be projected by the left projection lamp and the image to be projected by the right projection lamp respectively to generate the first projection image and the second projection image corresponding thereto respectively.
[0007] Furthermore, the dual-lamp calibration subsystem is used to: connect the controller to the left and right projection lamps respectively, call the corresponding instructions to light up the left and right projection lamps; design the projection images of the left and right projection lamps according to the installation angle of the lamps so that the projection points are evenly distributed on the ground; measure the lateral distance and longitudinal distance from the projection point to the vehicle; establish a world coordinate system with the center point of the front axle of the vehicle as the origin of the world coordinate system, the direction parallel to the front axle as the y-axis of the world coordinate system, and the direction perpendicular to the front axle as the x-axis of the world coordinate system; based on the lateral and longitudinal distances from the projection point to the vehicle, record the coordinates of each projection point spot as , record the pixel coordinates of the corresponding projection point on the projection image as ,in, , n is the number of projection points.
[0008] Furthermore, the size of the designed projection image matches the pixels of the lamp bead array of the vehicle lamp.
[0009] Furthermore, the coordinate conversion module is also used to convert the actual position coordinates of the projection point in the world coordinate system into and its pixel coordinates in the projected image , establish the homography transformation relationship between world coordinates and projected image, and solve the transformation matrix through the singular value decomposition method.
[0010] Furthermore, the coordinate conversion module is also used for:
[0011] Construct the homography projection equation:
[0012] ;
[0013] Among them, H is a 3×3 homography matrix, which describes the transformation relationship from world coordinates to projection coordinates. Expressed as pixel coordinates on the projection image, Expressed as the actual position coordinates of the projection point in the world coordinate system;
[0014] The linearized equation system expands the projection equation to obtain the linearized equation:
[0015] ;
[0016] For each projection point, two sets of linear equations are generated to form the final system of equations:
[0017] ;
[0018] Among them, matrix A is a 2n×9 coefficient matrix, and h is a vector containing 9 unknown numbers in the homography matrix H;
[0019] The transformation matrix is obtained by solving the singular value decomposition method.
[0020] Furthermore, the step of solving the transformation matrix by singular value decomposition method includes:
[0021] Decompose the matrix A by singular value decomposition: ;
[0022] Where U and V are orthogonal matrices;
[0023] From the decomposition results, select the solution corresponding to the smallest singular value in the singular value matrix Σ to obtain the vector h;
[0024] Reorganize the vector h into a 3×3 homography matrix H, which represents the transformation relationship from world coordinates to projected image coordinates:
[0025] .
[0026] Furthermore, the world coordinates of the two endpoints corresponding to the overlapping bottom edges of the overlapping projections of the left and right projection lamps in the overlapping projection overlap area are respectively , ;
[0027] The calculation method is:
[0028] ;
[0029] in is the pixel point in the projected image, H is the homography matrix, is the homogeneous coordinate corresponding to the pixel point, is the homogeneous coordinate of the world coordinate of the bottom edge endpoint of the overlapping area, The pixel point obtained after the final conversion The corresponding world coordinates.
[0030] Furthermore, the image decomposition module is also used for:
[0031] For the left portion of the image to be projected, Position interception:
[0032] ;
[0033] Where W is the pixel width of the image to be projected, ( , ) is the world coordinate of the right end point of the bottom edge of the projection overlap area, ( , ) is the world coordinate of the left end point of the bottom edge of the projection area formed by the left and right projection lights, ( , ) is the world coordinate of the right end point of the bottom edge of the projection area formed by the left and right projection lights;
[0034] For the right part of the image to be projected, Position to intercept the right side of the image:
[0035] ;
[0036] In the formula, ( , ) is the world coordinate of the left end point of the bottom edge of the projection overlap area, ( , ) is the world coordinate of the left end point of the bottom edge of the projection area formed by the left and right projection lights, ( , ) is the world coordinate of the right end point of the bottom edge of the projection area formed by the left and right projection lamps, I is the image to be projected, is the right projection, For the left projection, the image to be projected is is a two-dimensional matrix with dimensions , where each pixel Indicates that the image is at a height of , width is The pixel value at position, .
[0037] Furthermore, the projection image generation module is also used for:
[0038] Convert the left and right projection areas into the projection image coordinate system, calculate the perspective transformation matrix between the converted projection image coordinates and the left and right projection images, and perform affine transformation on the left and right projection images to generate the final left and right light projection images;
[0039] The calculation is as follows:
[0040] ;
[0041] Where B is the perspective transformation matrix, is the point on the graph to be projected, is the point after affine transformation, To project a diagram, is the final projection image after perspective transformation.
[0042] In a second aspect, the present invention provides a method for calibrating and fusing dual-lamp headlights, and the method is applied to the above-mentioned dual-lamp headlight calibration and fusion system. The method includes: establishing a world coordinate system and a projection map coordinate system through a controller, a left projection lamp, and a right projection lamp to complete the calibration of the headlights, the world coordinate system includes the coordinates of the light spot projected by the projection point on the ground, and the projection map coordinate system includes the position coordinates of the corresponding projection point on the projection map; after completing the calibration of the headlights, the controller, the left projection lamp, and the right projection lamp are used to complete the fusion of the left projection lamp and the right projection lamp, including: obtaining a conversion matrix between the world coordinate system and the projection map coordinate system based on a singular value decomposition method, and based on the conversion matrix Establish a conversion relationship between the world coordinate system and the projection image coordinate system; calculate the projection overlap area of the left projection lamp and the right projection lamp based on the conversion matrix; calculate the decomposition ratio based on the projection overlap area, and decompose the image to be projected based on the decomposition ratio to obtain the image to be projected by the left projection lamp and the image to be projected by the right projection lamp; define the projection area; based on the defined projection area, use the perspective transformation method to perform affine transformation on the image to be projected by the left projection lamp and the image to be projected by the right projection lamp to generate the corresponding first projection image and second projection image respectively; control the left projection lamp to project based on the first projection image, and control the right projection lamp to project based on the second projection image.
[0043] On the other hand, the present invention further provides a computer-readable storage medium, wherein one or more instructions are stored in the computer-readable storage medium, and the computer instructions are used to enable the computer to execute the above-mentioned vehicle dual-lamp calibration and fusion method.
[0044] On the other hand, the present invention provides an electronic device, comprising: a memory and a processor; the memory stores at least one program instruction; the processor implements the above-mentioned vehicle dual-lamp calibration and fusion method by loading and executing the at least one program instruction.
[0045] The beneficial effects of the present invention are: through precise calibration steps and automated control, accurate projection of the headlights in a specified area is achieved, and further through perspective transformation technology, the fusion of the light from the left and right headlights is completed. The system not only improves the accuracy and stability of the projection, but also can automatically adjust the projection area of the headlights in a dynamic environment to ensure the best lighting effect in different scenes. At the same time, the present invention greatly reduces manual intervention, avoids the errors of traditional manual debugging, and improves the intelligence of the system and the efficiency of actual use. This intelligent calibration and fusion method provides a solid technical foundation for the efficient application and interactive functions of future smart headlights. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0047] Figure 1 It is a schematic diagram of the structure of a dual-lamp calibration and fusion system for vehicle lights provided in Example 1 of the present invention.
[0048] Figure 2 This is a schematic diagram of the structure of a controller provided in Example 1 of the present invention.
[0049] Figure 3 It is a schematic diagram of defining a projection area provided by Example 1 of the present invention.
[0050] Figure 4 This is a flow chart of a dual-lamp calibration and fusion method for vehicle lights provided in Example 2 of the present invention.
[0051] Figure 5 This is a partial block diagram of an electronic device provided in Example 4 of the present invention. DETAILED DESCRIPTION
[0052] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations as sequential processes, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0053] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0054] The present invention will now be described in detail with reference to the accompanying drawings. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore only shows the components related to the present invention.
[0055] Example 1
[0056] For ease of understanding, the invention concept is generally described before describing the embodiments of the present invention in detail: the present invention provides a dual-lamp calibration and fusion system and method, the system includes a left projection lamp, a right projection lamp and a controller. The controller is connected to the left and right projection lamps to control the projection images of the headlights on both sides. According to the installation angles of the left and right projection lamps, the projection images of the left and right lamps are designed. The specific operation is as follows: the left lamp is controlled by the controller to project a set of points, and the lateral and longitudinal distances of the projection points relative to the vehicle are measured; similarly, the right lamp is controlled by the controller to project a set of points, and the lateral and longitudinal distances of the projection points relative to the vehicle are measured. Based on the measured projection point distances and their coordinates in the projection image, a set of equations is constructed, and solved by the singular value decomposition (SVD) method to obtain a conversion matrix between the measurement results and the projection image. According to the required projection pattern and the calculated conversion matrix, the perspective transformation is applied to calculate the projection images of the left and right lamps, and the headlights are controlled by the controller to realize the projection of the left and right lights, and the light fusion of the dual lamps is completed. By accurately measuring and calibrating the position of the headlight projection points, the conversion matrix is generated in combination with the singular value decomposition (SVD) method to ensure the precise control of the headlight projection in the specified area, thereby improving the accuracy and stability of the calibration. On this basis, the present invention automatically generates the projection images of the left and right lights through the perspective transformation method, realizing the seamless fusion of the two lights, so that the two lights can be projected collaboratively and evenly distributed in the same projection area. The system uses an intelligent controller for real-time adjustment and control, avoiding the errors of traditional manual debugging, and significantly improving the projection effect and work efficiency in practical applications.
[0057] The specific implementation is as follows:
[0058] like Figure 1-2 As shown, it is a schematic diagram of the structure of a dual-lamp calibration and fusion system for vehicle lights provided by the present invention.
[0059] As an example, the system includes a dual-lamp calibration subsystem and a dual-lamp fusion subsystem, both of which use a controller 1, a left projection lamp 2 and a right projection lamp 3, and the controller 1 is electrically connected to the left projection lamp 2 and the right projection lamp 3 respectively; the dual-lamp calibration subsystem establishes a world coordinate system and a projection map coordinate system through the controller 1, the left projection lamp 2 and the right projection lamp 3 to complete the calibration of the vehicle lights, the world coordinate system includes the coordinates of the light spot projected by the projection point on the ground, and the projection map coordinate system includes the position coordinates of the corresponding projection point on the projection map; the dual-lamp fusion subsystem completes the fusion of the left projection lamp 1 and the right projection lamp 2 through the controller 1, the left projection lamp 2 and the right projection lamp 3 after the dual-lamp calibration subsystem completes the calibration of the vehicle lights, including: the controller 1 is used to generate a first projection image and a second projection image based on the input projection map, and control the left projection lamp to project based on the first projection image, and control the right projection lamp to project based on the second projection image; the left projection lamp 2 and the right projection lamp 3 respectively display the corresponding control instructions sent by the controller 1 The controller 1 is integrated with a coordinate conversion module 110, an overlap area calculation module 120, an image decomposition module 130, a projection area definition module 140 and a projection image generation module 150; the coordinate conversion module 110 is used to obtain a conversion matrix between a world coordinate system and a projection image coordinate system based on a singular value decomposition method, and to establish a conversion relationship between the world coordinate system and the projection image coordinate system based on the conversion matrix; the overlap area calculation module 120 is used to calculate the projection overlap area of the left projection lamp and the right projection lamp based on the conversion matrix; the image decomposition module 130 is used to calculate a decomposition ratio based on the projection overlap area, and to decompose the image to be projected based on the decomposition ratio to obtain the image to be projected by the left projection lamp and the image to be projected by the right projection lamp respectively; the projection area definition module 140 is used to define a projection area; the projection image generation module 150 is used to perform affine transformation on the image to be projected by the left projection lamp and the image to be projected by the right projection lamp based on the defined projection area by using a perspective transformation method to generate the first projection image and the second projection image corresponding thereto respectively.
[0060] Preferably, the dual-lamp calibration subsystem is used to: connect the controller 1 to the left and right projection lamps respectively, call the corresponding instructions to light up the left and right projection lamps; design the projection images of the left and right projection lamps according to the installation angle of the lamps so that the projection points are evenly distributed on the ground; measure the lateral distance and longitudinal distance from the projection point to the vehicle; establish a world coordinate system with the center point of the front axle of the vehicle as the origin of the world coordinate system, the direction parallel to the front axle as the y-axis of the world coordinate system, and the direction perpendicular to the front axle as the x-axis of the world coordinate system; based on the lateral and longitudinal distances from the projection point to the vehicle, record the coordinates of the light spot of each projection point as , record the pixel coordinates of the corresponding projection point on the projection image as ,in, , n is the number of projection points. Specifically, in order for the subsequent images projected by the left and right projection lamps to be more accurate, it is necessary to first build a dual-lamp calibration system to ensure that the system can control the car lights. The specific operations are as follows: connect the on-board development board (controller) with MCU to the left and right projection lamps respectively, and call the corresponding instructions to light up the left and right projection lamps. The lamp bead array of the HD lamp used in this embodiment is 320×80 pixels. The lighting status of each lamp bead can be independently controlled by the MCU. When designing the projection diagram, this embodiment uses a 320×80 size projection diagram that matches the HD lamp for precise control. Combined with Figure 3 As shown, the projection diagram of the left and right lights is designed according to the installation angle of the headlights, and the projection of the headlights is controlled, and the distance from the projection point to the vehicle is measured. The specific operations are as follows: First, design the projection diagram to ensure that the projection points are evenly distributed on the ground. Usually 4-12 projection points are designed, and 8 projection points are designed in this embodiment. The headlights are controlled by MCU for projection, and the lateral and longitudinal distances from each projection point to the vehicle are measured. Since the light will be scattered when the headlights are projected, each pixel point in the projection diagram will form a long strip of light spot on the ground. In this embodiment, the center point of the light spot is used as the basis for position measurement. During measurement, it is assumed that the center point of the front axle of the vehicle is the origin of the coordinate system, and the coordinates of each light spot are recorded as , and record the position of the corresponding projection point on the projection map as , [1,8].
[0061] Preferably, the coordinate conversion module 110 is also used to convert the actual position coordinates of the projection point in the world coordinate system into and its pixel coordinates in the projected image , establish the homography transformation relationship between world coordinates and projected image, and solve the transformation matrix through the singular value decomposition method.
[0062] Preferably, the coordinate conversion module 110 is further used for:
[0063] Construct the homography projection equation:
[0064] ;
[0065] Among them, H is a 3×3 homography matrix, which describes the transformation relationship from world coordinates to projection coordinates. Expressed as pixel coordinates on the projection image, Expressed as the actual position coordinates of the projection point in the world coordinate system;
[0066] The linearized equation system expands the projection equation to obtain the linearized equation:
[0067] ;
[0068] For each projection point, two sets of linear equations are generated to form the final system of equations:
[0069] ;
[0070] Among them, matrix A is a 2n×9 coefficient matrix, and h is a vector containing 9 unknown numbers in the homography matrix H;
[0071] The transformation matrix is obtained by solving the singular value decomposition method.
[0072] Preferably, the step of obtaining the transformation matrix by using the singular value decomposition method comprises: decomposing the matrix A by using the singular value decomposition method into: ; Where U and V are orthogonal matrices; From the decomposition result, select the solution corresponding to the minimum singular value in the singular value matrix Σ to obtain the vector h; Reorganize the vector h into a 3×3 homography matrix H, which represents the transformation relationship from world coordinates to projected image coordinates:
[0073] .
[0074] Preferably, combined Figure 3 As shown, the projection overlap area is the world coordinates of the two endpoints corresponding to the overlapping bottom edges of the overlapping parts of the projections of the left and right projection lamps (corresponding to Figure 3 The marker points 1 and 2 in , ;
[0075] The calculation method is:
[0076] ;
[0077] in is the pixel point in the projected image, H is the homography matrix, is the homogeneous coordinate corresponding to the pixel point, is the homogeneous coordinate of the world coordinate of the bottom edge endpoint of the overlapping area, The pixel point obtained after the final conversion The corresponding world coordinates.
[0078] Preferably, the image decomposition module 130 is further used for:
[0079] For the left portion of the image to be projected, Position interception:
[0080] ;
[0081] Where W is the pixel width of the image to be projected, ( , ) is the world coordinate of the right end point of the bottom edge of the projection overlap area, ( , ) is the world coordinate of the left end point of the bottom edge of the projection area formed by the left and right projection lights, ( , ) is the world coordinate of the right end point of the bottom edge of the projection area formed by the left and right projection lights;
[0082] For the right part of the image to be projected, Position to intercept the right side of the image:
[0083] ;
[0084] In the formula, ( , ) is the world coordinate of the left end point of the bottom edge of the projection overlap area, ( , ) is the world coordinate of the left end point of the bottom edge of the projection area formed by the left and right projection lights, ( , ) is the world coordinate of the right end point of the bottom edge of the projection area formed by the left and right projection lamps, I is the image to be projected, is the right projection, For the left projection, the image to be projected is is a two-dimensional matrix with dimensions , where each pixel Indicates that the image is at a height of , width is The pixel value at position, That is, the division ratio for the left part of the image to be projected is: the distance between mark point 2 and mark point 3 / the distance between mark point 3 and mark point 4; the division ratio for the right part of the image to be projected is: the distance between mark point 1 and mark point 4 / the distance between mark point 3 and mark point 4. In short, the image to be projected is divided into two projection images through the distance between mark point 2 and mark point 3 / the distance between mark point 3 and mark point 4 and the distance between mark point 1 and mark point 4 / the distance between mark point 3 and mark point 4, which are the image to be projected by the left projection lamp and the image to be projected by the right projection lamp.
[0085] Preferably, in the actual application of the car lamp, the ideal state is that the illumination area of the light is a rectangle, therefore, a projection area is customized, and the world coordinates of the four vertices of the defined projection area are shown in 3. , , , Since the actual image sizes of the images to be projected by the left projection lamp and the right projection lamp obtained above are smaller than the original image sizes to be projected, however, since the lamp arrays of the left and right lamps are Because, in order to ensure the accuracy of the subsequent fusion of the car light projection images, the images to be projected by the left projection lamp and the right projection lamp need to be converted into projection image coordinates, and their sizes need to be calibrated to equal array sizes.
[0086] Preferably, the projection image generation module 150 is further used to: transform the left and right projection areas into the projection image coordinate system, calculate the perspective transformation matrix between the transformed projection image coordinates and the left and right projection images, and perform affine transformation on the left and right projection images to generate the final left and right light projection images;
[0087] The calculation is as follows:
[0088] ;
[0089] Where B is the perspective transformation matrix, is the point on the graph to be projected, is the point after affine transformation, To project a diagram, is the final projection image after perspective transformation.
[0090] The above embodiment accurately measures and calibrates the position of the projection point of the headlights, combines the singular value decomposition (SVD) method to generate a transformation matrix, ensures the precise control of the headlight projection in the specified area, and improves the accuracy and stability of the calibration. On this basis, the present invention automatically generates the projection images of the left and right headlights through the perspective transformation method, realizes the seamless fusion of the dual-lamp light, enables the two beams of light to be projected collaboratively, and achieves uniform distribution in the same projection area. The system uses an intelligent controller for real-time adjustment and control, avoiding the errors of traditional manual debugging, and significantly improving the projection effect and work efficiency in practical applications.
[0091] It is worth mentioning that all modules involved in this embodiment are logical units. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by the present invention, but this does not mean that there are no other units in this embodiment.
[0092] Example 2
[0093] See also Figure 4 , this embodiment provides a flow chart of a method for calibrating and fusing dual headlights of a vehicle.
[0094] As an example, the method includes:
[0095] S410: A world coordinate system and a projection map coordinate system are established through the controller, the left projection lamp and the right projection lamp to complete the calibration of the vehicle lights. The world coordinate system includes the coordinates of the light spot projected by the projection point on the ground, and the projection map coordinate system includes the position coordinates of the corresponding projection point on the projection map.
[0096] S420: After the vehicle lamp calibration is completed, the left projection lamp and the right projection lamp are integrated through the controller, the left projection lamp and the right projection lamp. Including:
[0097] S4201: Obtain a transformation matrix between the world coordinate system and the projection image coordinate system based on a singular value decomposition method, and establish a transformation relationship between the world coordinate system and the projection image coordinate system based on the transformation matrix.
[0098] S4202: Calculate the projection overlap area of the left projection lamp and the right projection lamp based on the conversion matrix.
[0099] S4203: Calculate a decomposition ratio based on the projection overlap area, and decompose the image to be projected based on the decomposition ratio to obtain an image to be projected by a left projection lamp and an image to be projected by a right projection lamp.
[0100] S4204: Define the projection area.
[0101] S4205: Based on the defined projection area, use the perspective transformation method to perform affine transformation on the image to be projected by the left projection lamp and the image to be projected by the right projection lamp to generate corresponding first projection images and second projection images respectively.
[0102] S4206: Control the left projection lamp to perform projection based on the first projection image, and control the right projection lamp to perform projection based on the second projection image.
[0103] It is not difficult to find that this embodiment is a method embodiment corresponding to the first embodiment, and this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.
[0104] Example 3
[0105] The embodiment of the present invention further provides a storage medium, on which a method for calibrating and fusing dual-lamp headlights is stored, and when the program for calibrating and fusing dual-lamp headlights is executed by a processor, the steps of the method for calibrating and fusing dual-lamp headlights as described above are implemented. Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.
[0106] Example 4
[0107] See also Figure 5 An embodiment of the present invention further provides an electronic device, comprising: a memory and a processor; the memory stores at least one program instruction; the processor implements the vehicle dual-lamp calibration and fusion method provided in Example 2 by loading and executing the at least one program instruction.
[0108] The memory 702 and the processor 701 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 701 and the memory 702 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor 701 is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor 701.
[0109] The processor 701 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 702 can be used to store data used by the processor 701 when performing operations.
[0110] The above is only an embodiment of the present invention. The common sense such as the known specific structure and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field know all the common technical knowledge in the technical field of the invention before the application date or priority date, can know all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the scope of protection of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. A dual-lamp calibration and fusion system for vehicle lights, characterized in that: The system includes a dual-lamp calibration subsystem and a dual-lamp fusion subsystem, both of which use a controller, a left projection lamp and a right projection lamp, and the controller is electrically connected to the left projection lamp and the right projection lamp respectively; The dual-lamp calibration subsystem establishes a world coordinate system and a projection map coordinate system through the controller, the left projection lamp and the right projection lamp to complete the calibration of the vehicle lamp. The world coordinate system includes the coordinates of the light spot projected by the projection point on the ground, and the projection map coordinate system includes the position coordinates of the corresponding projection point on the projection map. The dual-lamp fusion subsystem completes the fusion of the left projection lamp and the right projection lamp through the controller, the left projection lamp and the right projection lamp after the dual-lamp calibration subsystem completes the vehicle lamp calibration, including: The controller is used to generate a first projection image and a second projection image based on the input projection image, and control the left projection lamp to project based on the first projection image, and control the right projection lamp to project based on the second projection image; The left projection lamp and the right projection lamp respectively display corresponding projection images based on the control instructions sent by the controller; The controller is integrated with a coordinate conversion module, an overlapping area calculation module, an image decomposition module, a projection area definition module and a projection image generation module; The coordinate conversion module is used to obtain a conversion matrix between the world coordinate system and the projection image coordinate system based on a singular value decomposition method, and to establish a conversion relationship between the world coordinate system and the projection image coordinate system based on the conversion matrix; The overlapping area calculation module is used to calculate the projection overlapping area of the left projection lamp and the right projection lamp based on the conversion matrix; The image decomposition module is used to calculate the decomposition ratio based on the projection overlap area, and decompose the image to be projected based on the decomposition ratio to obtain the image to be projected by the left projection lamp and the image to be projected by the right projection lamp respectively; The image decomposition module is also used to: for the left part of the image to be projected, from the left side of the image to Position interception: ; Where W is the pixel width of the image to be projected, ( , ) is the world coordinate of the right end point of the bottom edge of the projection overlap area, ( , ) is the world coordinate of the left end point of the bottom edge of the projection area formed by the left and right projection lights, ( , ) is the world coordinate of the right end point of the bottom edge of the projection area formed by the left and right projection lights; For the right part of the image to be projected, Position the image to the right: ; In the formula, ( , ) is the world coordinate of the left end point of the bottom edge of the projection overlap area, ( , ) is the world coordinate of the left end point of the bottom edge of the projection area formed by the left and right projection lights, ( , ) is the world coordinate of the right end point of the bottom edge of the projection area formed by the left and right projection lamps, I is the image to be projected, is the right projection, For the left projection, the image to be projected is is a two-dimensional matrix with dimensions , where each pixel Indicates that the image is at a height of , width is The pixel value at position, ; The projection area definition module is used to define the projection area; The projection image generation module is used to perform affine transformation on the image to be projected by the left projection lamp and the image to be projected by the right projection lamp based on the defined projection area by using the perspective transformation method to generate the corresponding first projection image and second projection image respectively.
2. The vehicle lamp dual-lamp calibration and fusion system according to claim 1, characterized in that: The dual-light calibration subsystem is used for: Connect the controller to the left and right projection lamps respectively, and call the corresponding instructions to light up the left and right projection lamps; Design the projection images of the left and right projection lamps according to the installation angle of the headlights so that the projection points are evenly distributed on the ground; Measure the lateral and longitudinal distances from the projection point to the vehicle; The world coordinate system is established with the center point of the front axle of the vehicle as the origin of the world coordinate system, the direction parallel to the front axle as the y-axis of the world coordinate system, and the direction perpendicular to the front axle as the x-axis of the world coordinate system; The coordinates of each projection point spot are recorded based on the lateral and longitudinal distances from the projection point to the vehicle: , record the pixel coordinates of the corresponding projection point on the projection image as ,in, , n is the number of projection points.
3. The vehicle lamp dual-lamp calibration and fusion system according to claim 2, characterized in that: The size of the projected image of the design matches the pixels of the lamp bead array of the vehicle lamp.
4. The vehicle lamp dual-lamp calibration and fusion system according to claim 2, characterized in that: The coordinate conversion module is also used to convert the actual position coordinates of the projection point in the world coordinate system and its pixel coordinates in the projected image , establish the homography transformation relationship between world coordinates and projected image, and solve the transformation matrix through the singular value decomposition method.
5. The vehicle lamp dual-lamp calibration and fusion system according to claim 4, characterized in that: The coordinate conversion module is also used for: Construct the homography projection equation: ; Among them, H is a 3×3 homography matrix, which describes the transformation relationship from world coordinates to projection coordinates. Expressed as pixel coordinates on the projection image, Expressed as the actual position coordinates of the projection point in the world coordinate system; The linearized equation system expands the projection equation to obtain the linearized equation: ; For each projection point, two sets of linear equations are generated to form the final system of equations: ; Among them, matrix A is a 2n×9 coefficient matrix, and h is a vector containing 9 unknown numbers in the homography matrix H; The transformation matrix is obtained by solving the singular value decomposition method.
6. The vehicle lamp dual-lamp calibration and fusion system according to claim 5, characterized in that: The method of solving the transformation matrix by singular value decomposition method includes: Decompose the matrix A by singular value decomposition: ; Where U and V are orthogonal matrices; From the decomposition results, select the solution corresponding to the smallest singular value in the singular value matrix Σ to obtain the vector h; Reorganize the vector h into a 3×3 homography matrix H, which represents the transformation relationship from world coordinates to projected image coordinates: 。 7. The vehicle lamp dual-lamp calibration and fusion system according to claim 1, characterized in that: The projection overlap area is the world coordinates of the two endpoints corresponding to the overlapping bottom edges of the overlapping parts of the projections of the left and right projection lamps, respectively. , ; The calculation method is: ; in is the pixel point in the projected image, H is the homography matrix, is the secondary coordinate corresponding to the pixel point, is the homogeneous coordinate of the world coordinate of the bottom edge endpoint of the overlapping area, The pixel point obtained after the final conversion The corresponding world coordinates.
8. The vehicle lamp dual-lamp calibration and fusion system according to claim 1, characterized in that: The projection image generation module is also used for: Convert the left and right projection areas into the projection image coordinate system, calculate the perspective transformation matrix between the converted projection image coordinates and the left and right projection images, and perform affine transformation on the left and right projection images to generate the final left and right light projection images; The calculation is as follows: ; Where B is the perspective transformation matrix, is the point on the graph to be projected, is the point after affine transformation, To project a diagram, is the final projection image after perspective transformation.
9. A method for calibrating and fusing dual headlights of a vehicle, characterized in that: The method is applied to the vehicle lamp dual-lamp calibration and fusion system according to any one of claims 1 to 8, and the method comprises: The world coordinate system and the projection map coordinate system are established by the controller, the left projection lamp and the right projection lamp to complete the calibration of the headlight, wherein the world coordinate system includes the coordinates of the light spot projected by the projection point on the ground, and the projection map coordinate system includes the position coordinates of the corresponding projection point on the projection map; After the vehicle lamp calibration is completed, the left projection lamp and the right projection lamp are integrated through the controller, the left projection lamp and the right projection lamp, including: Obtaining a conversion matrix between a world coordinate system and a projection image coordinate system based on a singular value decomposition method, and establishing a conversion relationship between the world coordinate system and the projection image coordinate system based on the conversion matrix; Calculate the overlapping area of projections of the left projection lamp and the right projection lamp based on the conversion matrix; Calculate a decomposition ratio based on the projection overlap area, and decompose the image to be projected based on the decomposition ratio to obtain an image to be projected by a left projection lamp and an image to be projected by a right projection lamp; Define the projection area; Based on the defined projection area, the image to be projected by the left projection lamp and the image to be projected by the right projection lamp are affine transformed by using a perspective transformation method to generate a first projection image and a second projection image corresponding thereto respectively; The left projection lamp is controlled to perform projection based on the first projection image, and the right projection lamp is controlled to perform projection based on the second projection image.
Citation Information
Patent Citations
Homography matrix acquisition method as well as image pickup equipment calibrating method and device
CN101998136A
Projection method, device and equipment of intelligent vehicle lamp and storage medium
CN116238414A
Special vehicle aided driving panoramic look-around splicing method and device
CN118485567A