Production line automatic vehicle lamp calibration method based on camera image assistance

By constructing a mapping relationship between vehicle lights and their light spot images, and using homography matrix calculation, the feature points of the vehicle light spot are directly calibrated. This solves the problem of camera intrinsic and extrinsic parameter calibration errors, achieving high-precision and fast vehicle light calibration, and making it suitable for large-scale production.

CN120953373APending Publication Date: 2025-11-14CHANGZHOU XINGYU AUTOMOTIVE LIGHTING SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511067120.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing vehicle headlight calibration methods introduce perceptual errors in the camera's internal and external parameter calibration process, resulting in low calibration accuracy and increased calibration time and operating costs, making it difficult to meet the needs of large-scale, high-efficiency production.

Method used

By constructing a mapping relationship between vehicle lights and their light spot images, and using homography matrix calculation, the feature points of the vehicle light spot are directly calibrated, avoiding the camera's intrinsic and extrinsic parameter calibration process, simplifying the calibration process and improving accuracy.

Benefits of technology

It improves the accuracy and reliability of vehicle headlight calibration, reduces errors, shortens calibration time, adapts to the needs of large-scale and efficient production, and enhances deployment flexibility and response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953373A_ABST
    Figure CN120953373A_ABST
Patent Text Reader

Abstract

The invention discloses a production line automatic vehicle lamp calibration method based on camera image assistance, and belongs to the field of vehicle lamp calibration. The method comprises the following steps: S1, building a production line vehicle lamp calibration system, and installing a camera; s2, constructing a homography matrix of a mapping relation between the vehicle lamp and the vehicle lamp light spot image; s3, connecting a standard vehicle lamp into the vehicle lamp calibration system and lightening the standard vehicle lamp; s4, establishing reference vehicle lamp data; s5, replacing the standard vehicle lamp with the to-be-calibrated vehicle lamp and lightening the to-be-calibrated vehicle lamp; s6, calculating theoretical space coordinates and actual space coordinates of the light spot feature points of the to-be-calibrated vehicle lamp; and S7, judging whether an error value between the theoretical space coordinates of the light spot feature points of the to-be-calibrated vehicle lamp and the actual space coordinates of the light spot feature points exceeds a preset error threshold value or not. According to the invention, the calibration precision and the calibration reliability are improved, the calibration error of the light spot position of the vehicle lamp is reduced, the calibration efficiency can be improved, and the deployment flexibility of the calibration system in a dynamic production line scene is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a camera image-assisted method for calibrating automotive headlights in an automated production line, belonging to the field of automotive headlight calibration. Background Technology

[0002] Current vehicle headlight calibration methods focus on using cameras to calibrate the headlight illumination area. Specifically, this involves: preparing relevant calibration tools and setting up the calibration site; placing targets on the walls of the calibration site to calibrate the camera's extrinsic parameters; preparing the required calibration images for the headlights and controlling the headlights via a driver board to project the required calibration patterns onto the walls; controlling the camera to capture the projected patterns, performing calibration calculations, and saving the calibration results; obtaining lane line detection results in the vehicle coordinate system using the vehicle's forward-looking visual perception system; converting the lane line detection results in the vehicle coordinate system to lane lines in the headlight image coordinate system using the transformation relationship between the vehicle coordinate system and the headlight image coordinate system; and controlling the matrix LED headlights to project a fixed range of light forward based on the lane lines in the headlight image coordinate system, thus achieving lane illumination and high-resolution matrix LED headlight calibration.

[0003] In traditional calibration methods, when focusing on calibrating the headlight illumination area using a camera, the calibration of the camera's intrinsic and extrinsic parameters must be a prerequisite for high-resolution headlight calibration. This presents significant drawbacks to traditional methods. First, the prerequisite camera calibration introduces perceptual errors (i.e., inherent errors from the camera's own calibration) into the headlight calibration system. Since camera calibration cannot achieve absolute zero error, these errors are directly added to the headlight calibration results, significantly increasing the complexity of system errors, reducing the controllability of calibration accuracy, and affecting the reliability of the final headlight calibration results. Second, the additional camera calibration process significantly prolongs the overall time required for production line calibration. In batch production line calibration scenarios, each additional prerequisite step slows down the calibration process, reduces the overall operational efficiency of the production line, and makes it difficult to adapt to the demands of large-scale, high-efficiency production. Third, existing solutions are heavily dependent on camera intrinsic and extrinsic parameters, greatly limiting the application scenarios and deployment flexibility of the technology. For example, when using industrial automatic zoom cameras, the camera's intrinsic parameters need to be recalibrated every time the vehicle lighting system is calibrated. This not only increases operating costs but also leads to cumbersome processes due to frequent calibrations, making it difficult to quickly respond to dynamic needs such as production line changes and equipment debugging. Therefore, how to perform calibration more quickly and accurately for high-pixel vehicle lighting has become a pressing practical problem that the industry needs to solve. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a camera image-assisted production line automated vehicle headlight calibration method, which improves calibration accuracy and reliability, reduces calibration error of vehicle headlight spot position, and can also improve calibration efficiency, reduce time cost, and improve the deployment flexibility and response speed of the calibration system in dynamic production line scenarios.

[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0006] This invention provides a camera image-assisted method for calibrating automotive headlights in automated production lines, comprising the following steps:

[0007] Step S1: Set up the production line headlight calibration system and install the camera;

[0008] Step S2: Construct the homography matrix of the mapping relationship between the vehicle headlights and the headlight spot images;

[0009] Step S3: Connect the standard vehicle headlight to the headlight calibration system and turn it on to form a standard vehicle headlight spot image;

[0010] Step S4: Acquire standard vehicle light spot images using a camera, and establish benchmark vehicle light data based on the homography matrix and the standard vehicle light spot images acquired by the camera;

[0011] Step S5: Remove the standard vehicle lamp from the vehicle lamp calibration system, replace it with the vehicle lamp to be calibrated, and light it up to form a light spot image of the vehicle lamp to be calibrated;

[0012] Step S6: Acquire images of the light spot of the vehicle lamp to be calibrated using a camera. Based on the homography matrix, the reference vehicle lamp data, and the image of the light spot of the vehicle lamp to be calibrated acquired by the camera, calculate the theoretical spatial coordinates and the actual spatial coordinates of the light spot feature points of the vehicle lamp to be calibrated.

[0013] Step S7: Determine whether the error value between the theoretical spatial coordinates of the light spot feature points of the headlight to be calibrated and the actual spatial coordinates of the light spot feature points exceeds the preset error threshold. If yes, adjust the headlight calibration influencing factors and then jump to step S6 to continue execution. If no, the headlight calibration ends.

[0014] Furthermore, the method for calculating the homography matrix in step S2 is as follows:

[0015] Step S21: Calculate the homogeneous linear equation based on the homography matrix according to the coordinates of the pixel feature points in the headlight and headlight spot image.

[0016] Step S22: Obtain the homography matrix through singular value decomposition.

[0017] Furthermore, the formula for calculating the homogeneous linear equation in step 21 is as follows:

[0018]

[0019] Where M and N are the coordinates in the mapping relationship between the vehicle headlight and the headlight spot image;

[0020] i represents the number of pixel feature points;

[0021] The x-coordinate corresponding to M in the mapping relationship between the vehicle headlight and the headlight spot image;

[0022] The vertical coordinate corresponding to M in the mapping relationship between the vehicle headlight and the headlight spot image;

[0023] The x-coordinate corresponding to N in the mapping relationship between the headlight and the headlight spot image;

[0024] The vertical coordinate corresponding to N in the mapping relationship between the headlight and the headlight spot image;

[0025] h is the homography matrix.

[0026] Furthermore, in step S4, the reference vehicle headlight data includes the preset internal pixel coordinates of the standard vehicle headlight, the coordinates of the feature points of the standard vehicle headlight spot image, the spatial coordinates of the feature points of the standard vehicle headlight spot, the projection matrix from the standard vehicle headlight pixel to the image, the projection matrix from the standard vehicle headlight image to space, and the projection matrix from the standard vehicle headlight pixel to space.

[0027] The specific steps for establishing baseline vehicle headlight data are as follows:

[0028] Step S41: Process the standard vehicle headlight spot image captured by the camera to obtain the coordinates of the feature points of the standard vehicle headlight spot image;

[0029] Step S42: Measure the spatial coordinates of the feature points of the standard vehicle headlight spot;

[0030] Step S43: Calculate the projection matrix from the standard vehicle headlight pixels to the image based on the preset internal pixel coordinates of the standard vehicle headlight, the feature point coordinates of the standard vehicle headlight spot image, and the homography matrix.

[0031] Step S44: Calculate the projection matrix from the standard vehicle headlight image to space based on the coordinates of the feature points of the standard vehicle headlight image, the spatial coordinates of the feature points of the standard vehicle headlight image, and the homography matrix.

[0032] Step S45: Calculate the projection matrix of standard vehicle light pixels to space based on the preset internal pixel coordinates of standard vehicle light, the spatial coordinates of standard vehicle light spot feature points, and the homography matrix.

[0033] Furthermore, in step S43, the projection matrix from the standard vehicle headlight pixels to the image is calculated based on the preset internal pixel coordinates of the standard vehicle headlight, the feature point coordinates of the standard vehicle headlight spot image, and the homography matrix. This specifically includes the following steps:

[0034] Substituting the preset internal pixel coordinates of the standard vehicle headlight and the feature point coordinates of the standard vehicle headlight spot image into the homography matrix, we obtain the projection matrix from the standard vehicle headlight pixels to the image.

[0035] Furthermore, in step S6, calculating the actual spatial coordinates of the feature points of the headlight spot to be calibrated specifically includes the following steps:

[0036] Step S611: Process the headlight spot image of the vehicle to be calibrated captured by the camera to obtain the coordinates of the feature points of the headlight spot image;

[0037] Step S612: Calculate the actual spatial coordinates of the feature points of the headlight spot image to be calibrated based on the coordinates of the feature points of the headlight spot image to be calibrated and the projection matrix of the standard headlight image to space.

[0038] Furthermore, in step S6, calculating the theoretical spatial coordinates of the light spot feature points of the headlight to be calibrated specifically includes the following steps:

[0039] Step S621: Process the headlight spot image of the vehicle to be calibrated captured by the camera to obtain the coordinates of the feature points of the headlight spot image;

[0040] Step S622: Calculate the projection matrix from the pixels of the vehicle lamp to be calibrated to the image based on the preset internal pixel coordinates of the vehicle lamp to be calibrated, the feature point coordinates of the light spot image of the vehicle lamp to be calibrated, and the homography matrix.

[0041] Step S623: Calculate the projection matrix of the standard vehicle headlight pixel to space based on the projection matrix of the standard vehicle headlight pixel to the image and the projection matrix of the vehicle headlight pixel to be calibrated to the image.

[0042] Step S624: Calculate the theoretical spatial coordinates of the feature points of the headlight spot of the headlight to be calibrated based on the projection matrix of the pixels of the headlight to be calibrated to space and the preset internal pixel coordinates of the headlight to be calibrated.

[0043] Furthermore, the formula for calculating the actual spatial coordinates of the feature points of the headlight spot to be calibrated in step S612 is as follows:

[0044]

[0045] in, The actual spatial coordinates of the feature points of the headlight spot to be calibrated;

[0046] X2 represents the coordinates of feature points in the headlight spot image to be calibrated;

[0047] T2 is the projection matrix of the headlight image to be calibrated onto space.

[0048] Furthermore, the formula for calculating the projection matrix of the headlight pixel to be calibrated into space in step S623 is as follows:

[0049]

[0050] Wherein, F2 is the projection matrix of the headlight pixels to be calibrated into space;

[0051] H2 is the projection matrix from the headlight pixels to the image to be calibrated;

[0052] H1 is the projection matrix from standard vehicle headlight pixels to the image;

[0053] F1 is the projection matrix of standard car headlight pixels into space.

[0054] Furthermore, the formula for calculating the theoretical spatial coordinates of the feature points of the headlight spot to be calibrated in step S624 is as follows:

[0055]

[0056] in, The theoretical spatial coordinates of the feature points of the headlight spot to be calibrated;

[0057] L2 represents the preset internal pixel coordinates of the headlight to be calibrated;

[0058] F2 is the projection matrix of the headlight pixels to be calibrated into space.

[0059] By adopting the above technical solution, the present invention has the following beneficial effects:

[0060] This invention eliminates the camera intrinsic and extrinsic parameter calibration process in traditional automotive headlight calibration methods. By constructing a correlation model between the headlight and its light spot image, it avoids the transmission of camera calibration errors to the headlight calibration results, reducing system error complexity and improving calibration accuracy. It also reduces light spot position calibration errors, providing a stable foundation for high-pixel headlight calibration. This invention simplifies the calibration process by eliminating the camera extrinsic and extrinsic parameter calibration step, shortening the production line calibration time for a single headlight. This significantly improves the overall operational efficiency of the production line, enabling it to adapt to large-scale, high-efficiency production rhythms and helping to reduce time costs and increase production capacity for enterprises. Furthermore, by reducing dependence on camera extrinsic and extrinsic parameters, it supports complex equipment such as zoom cameras, improving deployment response speed in dynamic production line scenarios. It can flexibly adapt to the headlight calibration needs of multiple vehicle models and scenarios, expanding the boundaries of technology application. Attached Figure Description

[0061] Figure 1This is a flowchart of the camera image-assisted production line automated vehicle headlight calibration method of the present invention;

[0062] Figure 2 This is a model diagram showing the association between the vehicle headlight and the headlight spot image of the present invention. Detailed Implementation

[0063] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0064] like Figure 1 As shown, this embodiment provides a camera image-assisted automated automotive lamp calibration method for production lines. Focusing on the precise calibration requirements of automotive lamps on production lines, it constructs a calibration system encompassing benchmark data establishment, production line calibration execution, and end-to-end collaboration. This achieves automated and high-precision calibration of automotive lamps on production lines, providing reliable technical support for the field of automotive lamp calibration and facilitating efficient and high-quality delivery from production lines. It includes the following steps:

[0065] Step S1: Plan an independent and stable calibration space, construct a standardized environment for automotive headlight calibration, and build a production line automotive headlight calibration system. The production line automotive headlight calibration system includes basic equipment such as lighting and power supply adapted to the production line calibration schedule, used to simulate the actual working scenario of automotive headlights. It also requires selecting an industrial-grade high-resolution camera based on the calibration accuracy requirements. The camera is fixedly installed in a suitable position next to the production line to ensure clear, unobstructed acquisition of headlight spot images, providing a reliable data source for subsequent image processing.

[0066] Step S2: Construct a homography matrix that maps the vehicle headlight to the headlight spot image. The homography matrix is ​​a mathematical matrix used to describe the headlight's luminous characteristics and light projection patterns, serving as a benchmark for headlight calibration.

[0067] Specifically, such as Figure 2 As shown, this is a model diagram illustrating the association between vehicle headlights and their light spot images. This model diagram describes the mapping relationship between the internal pixels of the headlight, the two-dimensional projection image of the headlight, and the three-dimensional spatial projection of the headlight. Figure 2 In the diagram, L1 represents the preset internal pixel coordinates of a standard vehicle headlight, which are the two-dimensional coordinates of the pixels inside the standard vehicle headlight. L2 represents the preset internal pixel coordinates of the headlight to be calibrated, which are the two-dimensional coordinates of the internal pixels of the headlight to be calibrated. X1 represents the coordinates of feature points in the standard vehicle headlight spot image. These are the two-dimensional coordinates of feature points in the standard vehicle headlight spot image formed after projection of the standard headlight, serving as the reference for the headlight projection image. X2 represents the coordinates of feature points in the headlight spot image of the vehicle to be calibrated. It is the two-dimensional coordinate of the feature points in the headlight spot image formed after the headlight is projected onto the camera. This coordinate is used as the projected image of the headlight to be calibrated. P1 represents the spatial coordinates of the feature point of the standard vehicle headlight spot, which is the position of the feature point of the standard vehicle headlight spot in the physical space coordinate system, and P2 represents the spatial coordinates of the feature point of the vehicle light beam to be calibrated, which is the position of the feature point of the vehicle light beam in the physical space coordinate system, and C represents the camera's optical center, which determines the camera's viewpoint; H1 represents the projection matrix from the standard headlight pixels to the image, describing the mapping relationship from L1 to X1; H2 represents the projection matrix from the headlight pixels to the image to be calibrated, describing the mapping relationship from L2 to X2; T1 represents the projection matrix from the standard headlight image to space, describing the mapping relationship from X1 to P1; T2 represents the projection matrix from the headlight image to space to be calibrated, describing the mapping relationship from X2 to P2; F1 represents the projection matrix from the standard headlight pixels to space, describing the mapping relationship from L1 to P1; F2 represents the projection matrix from the headlight pixels to space to space, describing the mapping relationship from L2 to P2.

[0068] Specifically, the homography matrix of the mapping relationship between the vehicle headlight and the headlight spot image in this embodiment is applicable to the calculation of the mapping relationship from L1 to X1, the mapping relationship from L2 to X2, the mapping relationship from X1 to P1, the mapping relationship from X2 to P2, the mapping relationship from L1 to P1, and the mapping relationship from L2 to P2.

[0069] Specifically, let h represent the homography matrix, and let M and N represent the coordinates in the mapping relationship between the headlight and the headlight spot image, i.e., M = L1, N = X1, or M = L2, N = X2, or M = X1, N = P1, or M = X2, N = P2, or M = L1, N = P1, or M = L2, N = P2. The mapping relationship between M and N is sN = hM, where s is the scale factor. For any pair of pixel feature points (M... 1,i N 1,i Homogeneous coordinates are represented as The homography matrix h is represented as

[0070] M 1,i N 1,i Substituting h into the mapping relationship formula sN 1,i =hM 1,i From this, we can obtain:

[0071]

[0072] Due to the scale invariance of homogeneous coordinates (sN and N represent the same pixel), s i Substituting the first two equations and rearranging, we get:

[0073]

[0074] Expand the elements of h into a column vector h = [h 11 h 12 h 13 h 21 h 22 h 23 h 31 h 32 h 33 ] T Where T denotes matrix transpose, the homography-based ...

[0075]

[0076] Where M and N are the coordinates in the mapping relationship between the vehicle headlight and the headlight spot image;

[0077] i represents the number of pixel feature points;

[0078] The x-coordinate corresponding to M in the mapping relationship between the vehicle headlight and the headlight spot image;

[0079] The vertical coordinate corresponding to M in the mapping relationship between the vehicle headlight and the headlight spot image;

[0080] The x-coordinate corresponding to N in the mapping relationship between the headlight and the headlight spot image;

[0081] The vertical coordinate corresponding to N in the mapping relationship between the headlight and the headlight spot image;

[0082] h is the homography matrix.

[0083] For n pairs of pixel feature points, a 2n×9 matrix A can be constructed such that A×h=0.

[0084] In the homogeneous linear equation of the above homography matrix:

[0085] Performing singular value decomposition (SVD) on A yields the right singular vector corresponding to the smallest singular value, which is the value of h. The formula for SVD of A is A = U·∑·V T Where U is an m-order orthogonal matrix (m is the number of rows in matrix A), V is an n-order orthogonal matrix (n is the number of columns in matrix A), T is the matrix transpose, and Σ is a singular value diagonal matrix. Due to the scale uncertainty of the homography matrix (h and kh represent the same mapping relation, and k is a non-zero constant), the last element h in h is usually... 33 Normalize to 1 (or constrain ||h|| = 1) to obtain the final h matrix.

[0086] Step S3: Select a standard headlight that has been calibrated and has accurate parameters, and connect it to the headlight calibration system. Place the standard headlight on a fixed stand on the production line to simulate the actual physical position of the headlight inside a real vehicle. Then, connect the standard headlight to a stable power supply and illuminate it, forming a standard headlight beam image. Using the standard headlight as a reference for headlight calibration abandons the traditional calibration method that uses world coordinates as an absolute benchmark, establishing a calibration reference system more adapted to the production line scenario. This solves the problems of absolute benchmarks being susceptible to environmental interference and having poor adaptability.

[0087] Step S4: Acquire standard vehicle light spot images using a camera, and establish benchmark vehicle light data based on the homography matrix and the standard vehicle light spot images acquired by the camera.

[0088] Specifically, the reference vehicle headlight data includes the standard vehicle headlight preset internal pixel coordinates L1, the standard vehicle headlight light spot image feature point coordinates X1, the standard vehicle headlight light spot feature point spatial coordinates P1, the standard vehicle headlight pixel to image projection matrix H1, the standard vehicle headlight image to space projection matrix T1, and the standard vehicle headlight pixel to space projection matrix F1.

[0089] Specifically, the steps for establishing baseline vehicle headlight data are as follows:

[0090] Step S41: Process the standard vehicle headlight spot image acquired by the camera to obtain the feature point coordinates X1 of the standard vehicle headlight spot image. The image processing steps are as follows: image preprocessing, difference processing, spot segmentation, morphological denoising, connected component analysis and filtering, subpixel localization, and coordinate output.

[0091] Step S42: Measure the spatial coordinates P1 of the feature point of the standard vehicle headlight spot. The measuring tool can be a tape measure.

[0092] Step S43: Calculate the projection matrix H1 from the standard vehicle headlight pixels to the image based on the preset internal pixel coordinates L1 of the standard vehicle headlight, the feature point coordinates X1 of the standard vehicle headlight spot image, and the homography matrix h.

[0093] Specifically, the preset internal pixel coordinates L1 of the standard vehicle headlight are substituted into M, the feature point coordinates X1 of the standard vehicle headlight spot image are substituted into N, and the projection matrix H1 from the standard vehicle headlight pixels to the image is substituted into h, resulting in... Then perform singular value decomposition to obtain the value of H1.

[0094] Step S44: Calculate the projection matrix T1 from the standard vehicle headlight image to space based on the coordinates X1 of the feature points of the standard vehicle headlight image, the spatial coordinates P1 of the feature points of the standard vehicle headlight image, and the homography matrix h.

[0095] Specifically, the coordinates X1 of the feature points in the standard vehicle headlight spot image are substituted into M, the spatial coordinates P1 of the feature points in the standard vehicle headlight spot are substituted into N, and the projection matrix T1 of the standard vehicle headlight image into space is substituted into h, to obtain Then perform singular value decomposition to obtain the value of T1.

[0096] Step S45: Calculate the projection matrix F1 of the standard vehicle light pixels to space based on the preset internal pixel coordinates L1 of the standard vehicle light, the spatial coordinates P1 of the feature points of the standard vehicle light spot, and the homography matrix h.

[0097] Specifically, the preset internal pixel coordinates L1 of the standard vehicle headlight are substituted into M, the spatial coordinates P1 of the standard vehicle headlight spot feature points are substituted into N, and the projection matrix F1 of the standard vehicle headlight pixels into space is substituted into h, resulting in... Then perform singular value decomposition to obtain the value of F1.

[0098] Step S5: Remove the standard vehicle lamp from the vehicle lamp calibration system and replace it with the vehicle lamp to be calibrated. The vehicle lamp to be calibrated and the standard vehicle lamp use the same power supply and installation interface, so that the vehicle lamp to be calibrated enters the same detection environment as the standard vehicle lamp (i.e. the lighting scene and the camera acquisition angle are the same). Then, turn on the power to the vehicle lamp to be calibrated to form the light spot image of the vehicle lamp to be calibrated.

[0099] Step S6: Acquire an image of the light spot of the vehicle lamp to be calibrated using a camera. Based on the homography matrix h, the reference vehicle lamp data, and the image of the light spot of the vehicle lamp to be calibrated acquired by the camera, calculate the theoretical spatial coordinates of the light spot feature points of the vehicle lamp to be calibrated. and the actual spatial coordinates of the light spot feature points Using benchmark headlight data as a standard, this system achieves automated, high-precision calibration of headlights on the production line, from individual units to groups, through image acquisition, algorithm analysis, and matrix transformation. Calibration errors are controlled to the centimeter level. Furthermore, it overcomes the limitations of traditional calibration methods that rely on camera intrinsic and extrinsic parameters, calibrating headlights solely based on image information acquired by the camera. This simplifies the calibration process, reduces the precision requirements of camera parameters, and adapts to the calibration needs of different production lines and headlight models. It enhances the versatility and robustness of headlight calibration across various production lines and camera configurations, demonstrating broad application potential.

[0100] Specifically, the actual spatial coordinates of the feature points of the headlight spot to be calibrated are calculated. Includes the following steps:

[0101] Step S611: Process the headlight spot image of the vehicle to be calibrated acquired by the camera to obtain the feature point coordinates X2 of the headlight spot image. The image processing steps are as follows: image preprocessing, difference processing, spot segmentation, morphological denoising, connected component analysis and filtering, sub-pixel localization and coordinate output.

[0102] Step S612: Calculate the actual spatial coordinates of the feature points of the headlight spot to be calibrated based on the coordinates X2 of the feature points in the headlight spot image to be calibrated and the projection matrix T1 of the standard headlight image into space. Since the feature points of the light spot images of the standard headlight and the headlight to be calibrated were acquired using the same camera at the same location, meaning that the standard headlight and the headlight to be calibrated have the same mapping relationship between the coordinates of the feature points in the light spot image and their spatial coordinates, T1 = T2. The actual spatial coordinates of the feature points of the headlight light spot to be calibrated are... The calculation formula is as follows:

[0103]

[0104] in, The actual spatial coordinates of the feature points of the headlight spot to be calibrated;

[0105] X2 represents the coordinates of feature points in the headlight spot image to be calibrated;

[0106] T2 is the projection matrix of the headlight image to be calibrated onto space.

[0107] Specifically, the theoretical spatial coordinates of the light spot feature points of the headlight to be calibrated are calculated. Specifically, the steps include the following:

[0108] Step S621: Process the headlight spot image of the vehicle to be calibrated acquired by the camera to obtain the feature point coordinates X2 of the headlight spot image. The image processing steps are as follows: image preprocessing, difference processing, spot segmentation, morphological denoising, connected component analysis and filtering, subpixel localization and coordinate output.

[0109] Step S622: Calculate the projection matrix H2 from the pixels of the vehicle lamp to be calibrated to the image based on the preset internal pixel coordinates L2, the feature point coordinates X2 of the lamp's light spot image, and the homography matrix h. The preset internal pixel coordinates L2 of the vehicle lamp to be calibrated are the same as L1.

[0110] Specifically, the preset internal pixel coordinates L2 of the headlight to be calibrated are substituted into M, the feature point coordinates X2 of the headlight spot image of the calibrated headlight are substituted into N, and the projection matrix H2 of the headlight pixel to be calibrated onto the image is substituted into h, thus obtaining... Then perform singular value decomposition to obtain the value of H2.

[0111] Step S623: Based on the projection matrix F1 of the standard vehicle headlight pixels to space, the projection matrix H1 of the standard vehicle headlight pixels to image, and the projection matrix H2 of the vehicle headlight pixels to be calibrated to image, calculate the projection matrix F2 of the vehicle headlight pixels to space to be calibrated. The specific calculation formula for the projection matrix F2 of the vehicle headlight pixels to space to be calibrated is as follows:

[0112]

[0113] Wherein, F2 is the projection matrix of the headlight pixels to be calibrated into space;

[0114] H2 is the projection matrix from the headlight pixels to the image to be calibrated;

[0115] H1 is the projection matrix from standard vehicle headlight pixels to the image;

[0116] F1 is the projection matrix of standard car headlight pixels into space.

[0117] The derivation of the above formula is as follows: From the correlation model diagram of the vehicle headlight and the headlight spot image, we know that F1 = H1T1, F2 = H2T2, and from F1 = H1T1, we know... Substituting this into F2 = H2T2, we can finally obtain... This formula reflects the calibration conversion relationship between the standard headlight and the headlight to be calibrated, describes the spatial position difference between the standard headlight and the headlight to be calibrated, provides a basis for the subsequent calculation of the spatial coordinates of the headlight spot feature points, and ensures the calibration accuracy of high-pixel headlights.

[0118] Step S624: Calculate the theoretical spatial coordinates of the feature points of the headlight beam to be calibrated based on the projection matrix F2 of the headlight pixels to space and the preset internal pixel coordinates L2 of the headlight. Theoretical spatial coordinates of the feature points of the headlight spot to be calibrated The calculation formula is as follows:

[0119]

[0120] in, The theoretical spatial coordinates of the feature points of the headlight spot to be calibrated;

[0121] L2 represents the preset internal pixel coordinates of the headlight to be calibrated;

[0122] F2 is the projection matrix of the headlight pixels to be calibrated into space.

[0123] Step S7: Determine the theoretical spatial coordinates of the light spot feature points of the headlight to be calibrated. and the actual spatial coordinates of the light spot feature points If the error value exceeds a preset error threshold, adjustments are made to the factors affecting headlight calibration, and then the process jumps to step S6 to continue. If not, the headlight calibration ends. The preset error threshold is designed based on application scenario requirements. Factors affecting headlight calibration include ambient light and headlight placement. If the error exceeds the preset threshold, adjustments are made to the ambient light intensity and headlight placement before returning to step S6 to continue, or the headlight to be calibrated is reworked before returning to step S6 to continue. By repeatedly using the same camera for image acquisition and employing a cyclic calibration mechanism, the process adapts to the production line cycle time, significantly shortening headlight calibration time and improving production line delivery efficiency.

[0124] Remove the calibrated headlight from the headlight calibration system and replace it with the next headlight to be calibrated on the production line. Repeat steps S6 to S7 to form a cyclic calibration mechanism until all headlights on the production line have been calibrated.

[0125] The working principle of this invention is as follows:

[0126] Set up a production line headlight calibration system and install cameras; construct a homography matrix to map the relationship between headlights and headlight spot images; connect a standard headlight to the headlight calibration system and illuminate it to form a standard headlight spot image; acquire the standard headlight spot image using the camera, and establish benchmark headlight data based on the homography matrix and the acquired standard headlight spot image; remove the standard headlight from the headlight calibration system, replace it with the headlight to be calibrated, and illuminate it to form a headlight spot image to be calibrated; acquire the headlight spot image to be calibrated using the camera, and calculate the theoretical and actual spatial coordinates of the spot feature points of the headlight to be calibrated based on the homography matrix, benchmark headlight data, and the acquired headlight spot image; determine whether the error value between the theoretical and actual spatial coordinates of the spot feature points of the headlight to be calibrated exceeds a preset error threshold. If so, adjust the factors affecting headlight calibration, and then continue image acquisition and headlight calibration; otherwise, the headlight calibration ends.

[0127] This invention eliminates the camera intrinsic and extrinsic parameter calibration process in traditional automotive headlight calibration methods. By constructing a correlation model between the headlight and its light spot image, it avoids the transmission of camera calibration errors to the headlight calibration results, reducing system error complexity and improving calibration accuracy. It also reduces light spot position calibration errors, providing a stable foundation for high-pixel headlight calibration. This invention simplifies the calibration process by eliminating the camera extrinsic and extrinsic parameter calibration step, shortening the production line calibration time for a single headlight. This significantly improves the overall operational efficiency of the production line, enabling it to adapt to large-scale, high-efficiency production rhythms and helping to reduce time costs and increase production capacity for enterprises. Furthermore, by reducing dependence on camera extrinsic and extrinsic parameters, it supports complex equipment such as zoom cameras, improving deployment response speed in dynamic production line scenarios. It can flexibly adapt to the headlight calibration needs of multiple vehicle models and scenarios, expanding the boundaries of technology application.

[0128] The specific embodiments described above further illustrate the technical problems, technical solutions, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A camera image-assisted method for calibrating automotive headlights in automated production lines, characterized in that, It includes the following steps: Step S1: Set up the production line headlight calibration system and install the camera; Step S2: Construct the homography matrix of the mapping relationship between the vehicle headlights and the headlight spot images; Step S3: Connect the standard vehicle headlight to the headlight calibration system and turn it on to form a standard vehicle headlight spot image; Step S4: Acquire standard vehicle light spot images using a camera, and establish benchmark vehicle light data based on the homography matrix and the standard vehicle light spot images acquired by the camera; Step S5: Remove the standard vehicle lamp from the vehicle lamp calibration system, replace it with the vehicle lamp to be calibrated, and light it up to form a light spot image of the vehicle lamp to be calibrated; Step S6: Acquire images of the light spot of the vehicle lamp to be calibrated using a camera. Based on the homography matrix, the reference vehicle lamp data, and the image of the light spot of the vehicle lamp to be calibrated acquired by the camera, calculate the theoretical spatial coordinates and the actual spatial coordinates of the light spot feature points of the vehicle lamp to be calibrated. Step S7: Determine whether the error value between the theoretical spatial coordinates of the light spot feature points of the headlight to be calibrated and the actual spatial coordinates of the light spot feature points exceeds the preset error threshold. If yes, adjust the headlight calibration influencing factors and then jump to step S6 to continue execution. If no, the headlight calibration ends.

2. The method for calibrating automotive headlights on an automated production line based on camera image assistance as described in claim 1, characterized in that, The method for calculating the homography matrix in step S2 is as follows: Step S21: Calculate the homogeneous linear equation based on the homography matrix according to the coordinates of the pixel feature points in the headlight and headlight spot image. Step S22: Obtain the homography matrix through singular value decomposition.

3. The method for calibrating automotive headlights on an automated production line based on camera image assistance as described in claim 1, characterized in that, The formula for calculating the homogeneous linear equation in step 21 is as follows: Where M and N are the coordinates in the mapping relationship between the vehicle headlight and the headlight spot image; i represents the number of pixel feature points; The x-coordinate corresponding to M in the mapping relationship between the vehicle headlight and the headlight spot image; The vertical coordinate corresponding to M in the mapping relationship between the vehicle headlight and the headlight spot image; The x-coordinate corresponding to N in the mapping relationship between the headlight and the headlight spot image; The vertical coordinate corresponding to N in the mapping relationship between the headlight and the headlight spot image; h is the homography matrix.

4. The method for calibrating automotive headlights on an automated production line based on camera image assistance as described in claim 1, characterized in that, In step S4, the reference vehicle headlight data includes the preset internal pixel coordinates of the standard vehicle headlight, the coordinates of the feature points of the standard vehicle headlight spot image, the spatial coordinates of the feature points of the standard vehicle headlight spot, the projection matrix from the standard vehicle headlight pixel to the image, the projection matrix from the standard vehicle headlight image to space, and the projection matrix from the standard vehicle headlight pixel to space. The specific steps for establishing baseline vehicle headlight data are as follows: Step S41: Process the standard vehicle headlight spot image captured by the camera to obtain the coordinates of the feature points of the standard vehicle headlight spot image; Step S42: Measure the spatial coordinates of the feature points of the standard vehicle headlight spot; Step S43: Calculate the projection matrix from the standard vehicle headlight pixels to the image based on the preset internal pixel coordinates of the standard vehicle headlight, the feature point coordinates of the standard vehicle headlight spot image, and the homography matrix. Step S44: Calculate the projection matrix from the standard vehicle headlight image to space based on the coordinates of the feature points of the standard vehicle headlight image, the spatial coordinates of the feature points of the standard vehicle headlight image, and the homography matrix. Step S45: Calculate the projection matrix of standard vehicle light pixels to space based on the preset internal pixel coordinates of standard vehicle light, the spatial coordinates of standard vehicle light spot feature points, and the homography matrix.

5. The method for calibrating automotive headlights on an automated production line based on camera image assistance according to claim 4, characterized in that, In step S43, the projection matrix from the standard vehicle headlight pixels to the image is calculated based on the preset internal pixel coordinates of the standard vehicle headlight, the feature point coordinates of the standard vehicle headlight spot image, and the homography matrix. This specifically includes the following steps: Substituting the preset internal pixel coordinates of the standard vehicle headlight and the feature point coordinates of the standard vehicle headlight spot image into the homography matrix, we obtain the projection matrix from the standard vehicle headlight pixels to the image.

6. The method for calibrating automotive headlights on an automated production line based on camera image assistance according to claim 4, characterized in that, In step S6, calculating the actual spatial coordinates of the feature points of the headlight spot to be calibrated specifically includes the following steps: Step S611: Process the headlight spot image of the vehicle to be calibrated captured by the camera to obtain the coordinates of the feature points of the headlight spot image; Step S612: Calculate the actual spatial coordinates of the feature points of the headlight spot image to be calibrated based on the coordinates of the feature points of the headlight spot image to be calibrated and the projection matrix of the standard headlight image to space.

7. The method for calibrating automotive headlights on an automated production line based on camera image assistance according to claim 4, characterized in that, In step S6, the theoretical spatial coordinates of the light spot feature points of the headlight to be calibrated are calculated, which specifically includes the following steps: Step S621: Process the headlight spot image of the vehicle to be calibrated captured by the camera to obtain the coordinates of the feature points of the headlight spot image; Step S622: Calculate the projection matrix from the pixels of the vehicle lamp to be calibrated to the image based on the preset internal pixel coordinates of the vehicle lamp to be calibrated, the feature point coordinates of the light spot image of the vehicle lamp to be calibrated, and the homography matrix. Step S623: Calculate the projection matrix of the standard vehicle headlight pixel to space based on the projection matrix of the standard vehicle headlight pixel to the image and the projection matrix of the vehicle headlight pixel to be calibrated to the image. Step S624: Calculate the theoretical spatial coordinates of the feature points of the headlight spot of the headlight to be calibrated based on the projection matrix of the pixels of the headlight to be calibrated to space and the preset internal pixel coordinates of the headlight to be calibrated.

8. The method for calibrating automotive headlights on an automated production line based on camera image assistance as described in claim 6, characterized in that, The formula for calculating the actual spatial coordinates of the feature points of the vehicle light spot to be calibrated in step S612 is as follows: in, The actual spatial coordinates of the feature points of the headlight spot to be calibrated; X2 represents the coordinates of the feature points in the headlight spot image to be calibrated; T2 is the projection matrix of the headlight image to be calibrated onto space.

9. The method for calibrating automotive headlights on an automated production line based on camera image assistance according to claim 7, characterized in that, The formula for calculating the projection matrix of the headlight pixels to be calibrated into space in step S623 is as follows: Wherein, F2 is the projection matrix of the headlight pixels to be calibrated into space; H2 is the projection matrix from the headlight pixels to the image to be calibrated; H1 is the projection matrix from standard vehicle headlight pixels to the image; F1 is the projection matrix of standard car headlight pixels into space.

10. The method for calibrating automotive headlights on an automated production line based on camera image assistance according to claim 7, characterized in that, The formula for calculating the theoretical spatial coordinates of the feature points of the headlight spot to be calibrated in step S624 is as follows: in, The theoretical spatial coordinates of the feature points of the headlight spot to be calibrated; L2 represents the preset internal pixel coordinates of the headlight to be calibrated; F2 is the projection matrix of the headlight pixels to be calibrated into space.