Smart vehicle lamp projection image correction method and device, vehicle lamp and storage medium
By correcting the projection image of the vehicle headlights using perspective transformation based on the homography matrix, the problem of projection distortion of the vehicle headlights was solved, and accurate and seamless image fusion and low-cost projection were achieved, thereby improving the safety of the vehicle headlights and the user experience.
Patent Information
- Application Number
- CN202511426416.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-01-06
AI Technical Summary
In existing vehicle headlight projection systems, the projected light rays form a certain angle with the target plane, resulting in trapezoidal distortion of the image, which affects the accuracy and readability of the image and poses a safety hazard.
By acquiring the image to be projected, the homography matrix is calculated based on the homography matrix and perspective transformation relationship using the intrinsic and extrinsic parameters of the internal projector of the vehicle headlight and the projection plane. The image is then corrected to obtain a corrected image, which is then projected onto the projection plane.
It achieves a high degree of consistency and seamless integration between the projected image and the physical world, ensuring the accuracy and readability of information, reducing hardware and computing costs, and making it suitable for resource-constrained embedded platforms.
Smart Images

Figure CN121280293A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent vehicle technology, and in particular to a method, device, vehicle lamp, and storage medium for correcting intelligent vehicle headlight projection images. Background Technology
[0002] Vehicle lighting systems are core components for ensuring driving safety. Traditional vehicle lights primarily provide basic illumination, but with the rapid development of intelligent connected technologies, they have gradually evolved into intelligent terminals that combine lighting, information interaction, and personalized display functions. Intelligent headlights based on technologies such as digital micromirror devices can project visual information such as images and symbols onto the ground or walls, enabling advanced functions such as adaptive high / low beam adjustment, lane marking projection, navigation guidance, and welcome lighting, significantly improving the human-vehicle interaction experience and driving safety.
[0003] However, during the projection of digital images onto a physical plane, trapezoidal distortion inevitably occurs due to the angle between the projected light rays and the target plane, severely affecting the accuracy and readability of the image. The main causes of this problem include the fixed mounting angle of the headlights on the vehicle, the nonlinear distortion of the optical lens, and factors such as unevenness or non-ideal orientation of the actual projection surface. Without effective correction, the projected pattern will be severely distorted, potentially leading to misinterpretation of information and posing safety hazards.
[0004] Therefore, there is an urgent need for a high-precision image correction method that can adapt to the dynamic operating state of vehicles and complex projection environments, so as to promote the reliable application of intelligent vehicle lighting technology in real-world scenarios. Summary of the Invention
[0005] This invention provides a method, device, vehicle headlight, and storage medium for correcting intelligent vehicle headlight projection images, in order to solve the defect of trapezoidal distortion in the projection images in the prior art. This invention provides a method for correcting intelligent vehicle headlight projection images, comprising: Obtain the image to be projected; Based on the homography matrix, the perspective transformation relationship is applied to correct the image to be projected to obtain a corrected image. The homography matrix is determined based on the intrinsic and extrinsic parameters of the internal projector of the vehicle headlight and the projection plane. The corrected image is sent to the headlight controller to project the corrected image onto the projection plane.
[0006] According to the intelligent vehicle headlight projection image correction method provided by the present invention, the homography matrix is determined based on the following steps: Extract the original image coordinates of each corner point of the original image; Based on the intrinsic and extrinsic parameters of the projector, the original image coordinates are transformed to the world coordinate system, and a minimum bounding rectangle is constructed on the projection plane to enclose each corner point. Then, each vertex of the rectangle is transformed to the image coordinate system to obtain the target image coordinates. The homography matrix is calculated based on the original image coordinates and the target image coordinates.
[0007] According to the intelligent vehicle headlight projection image correction method provided by the present invention, the step of calculating the homography matrix based on the original image coordinates and the target image coordinates includes: The target image coordinates are standardized to match the size of the original image to obtain the corrected image coordinates; The homography matrix is calculated based on the original image coordinates and the corrected image coordinates.
[0008] According to the intelligent vehicle headlight projection image correction method provided by the present invention, the standardization of the target image coordinates to match the size of the original image to obtain the corrected image coordinates includes: Based on the minimum values of the target image coordinates in each coordinate axis direction, the rectangle is translated to obtain the translated coordinates; Based on the ratio of the maximum values of the translated coordinates in each coordinate axis direction, the rectangle is scaled, and the coordinates of each vertex of the scaled rectangle are used as the coordinates of the corrected image.
[0009] According to the intelligent vehicle headlight projection image correction method provided by the present invention, the method involves transforming the original image coordinates to the world coordinate system based on the intrinsic and extrinsic parameter matrices of the projector, constructing a minimum bounding rectangle enclosing each corner point on the projection plane, and then transforming each vertex of the rectangle to the image coordinate system to obtain the target image coordinates. The method includes: Based on the intrinsic and extrinsic parameter matrices of the projector, calculate the original world coordinates of each corner point on the projection plane under the current posture of the projector; Extract the 2D coordinates of the corresponding projection plane from the original world coordinates to obtain the projection plane coordinates. Calculate the coordinate extrema of the projection plane coordinates. Construct a minimum bounding rectangle based on the coordinate extrema to obtain the world coordinates of each vertex of the rectangle. Based on the extrinsic parameter matrix of the projector, the world coordinates of each vertex are transformed to camera coordinates; Based on the projector's intrinsic parameter matrix, the camera coordinate system coordinates are transformed to the image coordinate system to obtain the target image coordinates.
[0010] According to the intelligent vehicle headlight projection image correction method provided by the present invention, the step of calculating the original world coordinates of each corner point on the projection plane under the current posture of the projector, based on the intrinsic and extrinsic parameter matrices of the projector, includes: Based on the intrinsic and extrinsic parameter matrices of the projector, each corner point is converted into a ray in the world coordinate system; Calculate the intersection points of the ray and the projection plane, and determine the coordinates of the intersection points as the original world coordinates of each corner point on the projection plane.
[0011] The present invention also provides a smart vehicle headlight projection image correction device, comprising: An image acquisition unit is used to acquire the image to be projected. The correction unit is used to correct the image to be projected based on the homography matrix and the perspective transformation relationship to obtain the corrected image. The homography matrix is determined based on the intrinsic and extrinsic parameters of the internal projector of the vehicle headlight and the projection plane. A projection unit is used to send the corrected image to the headlight controller to project the corrected image onto the projection plane.
[0012] The present invention also provides a smart vehicle light, including a vehicle light body and the aforementioned projection image correction device.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the intelligent vehicle headlight projection image correction method as described above.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the intelligent vehicle headlight projection image correction method as described above.
[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the intelligent vehicle headlight projection image correction method as described above.
[0016] The intelligent vehicle headlight projection image correction method, device, headlight, and storage medium provided by this invention, based on the homography matrix calculated from the intrinsic and extrinsic parameters of the headlight's internal projector and the projection plane, not only contain shape correction information but also spatial position information. The projected image, after homography matrix correction, can highly match the expected position in the physical world, achieving seamless integration of virtual information and the real environment. The final image presented on the target projection plane is the original image with correct proportions, regular shape, and no distortion.
[0017] Furthermore, the solution provided by this invention only requires calibrating the projector parameters, eliminating the need for additional sensors and resulting in low hardware costs. It also eliminates the need to calculate the homography matrix for each frame, reducing computational costs and making it suitable for resource-constrained embedded platforms for efficient operation. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is one of the flowcharts illustrating the intelligent vehicle headlight projection image correction method provided by the present invention.
[0020] Figure 2 This is a schematic diagram of the original image provided by the present invention.
[0021] Figure 3 This is a schematic diagram of the corrected image provided by the present invention.
[0022] Figure 4 This is a schematic diagram of the structure of the intelligent vehicle headlight projection correction device provided by the present invention.
[0023] Figure 5 This is a structural schematic diagram of the intelligent vehicle light provided by the present invention.
[0024] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0026] To address the problem of trapezoidal distortion in vehicle headlight projection images in related technologies, this invention proposes a smart vehicle headlight projection image correction method. In this method, the image to be projected is first acquired; based on the homography matrix, the perspective transformation relationship is applied to correct the image to be projected, resulting in a corrected image. The homography matrix is determined based on the intrinsic and extrinsic parameters of the vehicle headlight internal projector and the projection plane; the corrected image is then sent to the vehicle headlight controller to project the corrected image onto the projection plane.
[0027] The method provided in this invention calculates a homography matrix based on the intrinsic and extrinsic parameters of the projector inside the vehicle headlight and the projection plane. This homography matrix includes not only shape correction information but also spatial position information. The projected image, after homography matrix correction, closely matches the expected position in the physical world, achieving seamless integration of virtual information and the real environment. The final image presented on the target projection plane is the original image with correct proportions, regular shape, and no distortion, ensuring the accuracy and readability of information such as arrows, markings, and text.
[0028] This method only needs to calculate the homography matrix based on the intrinsic and extrinsic parameters of the internal projector of the vehicle headlight and the projection plane during initialization. For each subsequent frame of the image to be projected, the homography matrix is used to perform perspective transformation. It does not require calculating the corrected homography matrix for each frame, resulting in low computational cost. It is suitable for resource-constrained embedded platforms and runs efficiently.
[0029] Furthermore, the method provided in this invention only requires projector parameter calibration, eliminating the need for additional sensors and resulting in low hardware costs. This method offers a standardized and reproducible processing flow. Once the intrinsic parameters, extrinsic parameters, and projection plane are determined, the calculated homography matrix is unique, and the result obtained by applying this transformation is also deterministic. This ensures that the same function can exhibit highly consistent and reliable projection effects on different vehicles (provided the parameters are calibrated consistently) and throughout the lifecycle of the same vehicle, improving product quality and user experience.
[0030] This invention can be applied to scenarios where pattern projection using vehicle headlights is required. The implementing entity of this method can be a smart headlight or a projection pattern correction device installed in the smart headlight. This device can be implemented through software, hardware, or a combination of both.
[0031] In the description of the embodiments of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of the embodiments of the present invention, "multiple" means two or more, unless otherwise explicitly specified.
[0032] Figure 1 This is one of the flowcharts illustrating the intelligent vehicle headlight projection image correction method provided by the present invention, such as... Figure 1 As shown, the method includes steps 110-130.
[0033] Step 110: Obtain the image to be projected; Step 120: Based on the homography matrix, the perspective transformation relationship is applied to correct the image to be projected, and the corrected image is obtained. The homography matrix is determined based on the intrinsic and extrinsic parameters of the internal projector of the vehicle headlight and the projection plane. Step 130: Send the corrected image to the headlight controller to project the corrected image onto the projection plane.
[0034] Specifically, the image to be projected refers to the original image that the smart headlights want to project onto the external environment (such as the ground or a wall). The image to be projected is usually not an ordinary photograph, but a special graphic designed for a specific interaction scenario, such as navigation arrows: turning or lane guidance; warning symbols: pedestrian warning, blind spot reminder; light carpets: lane lighting or width guidance; interactive icons: such as charging status, welcome light messages; text information: such as "thank you" and "give way".
[0035] The image to be projected can be obtained from a service call. For example, a navigation system can publish a service message containing a navigation arrow image via in-vehicle communication protocols such as SOME / IP. The projection correction device, as a service consumer, subscribes to the service and receives image data packets as the image to be projected.
[0036] The projected image can also be read from local storage. For some fixed, predefined patterns (such as welcome animations and brand logos), they can be pre-stored in the flash memory of the headlight controller or related domain controller. Some simple images can also be generated in real time based on parameters.
[0037] In step 120, the homography matrix is a 3x3 mathematical transformation matrix. It describes the projection mapping relationship of the same plane in three-dimensional space under two different viewpoints. The homography matrix precisely defines the correspondence between pixels on the "image to be projected" and physical points on the "projection plane". It encapsulates all intrinsic parameters (distortion, focal length) and extrinsic parameters (installation position, angle) of the projector, as well as the geometric information of the projection plane.
[0038] In this embodiment, perspective transformation is applied based on the calculation result of the homography matrix H. The image to be projected is distorted into a special shape, which precisely cancels out the distortion caused by the subsequent physical projection by the projector, ultimately obtaining a correct original image on the target projection plane. The image correction process is expressed by the formula:
[0039] In the formula, It is a homography matrix. Let be the homogeneous coordinates of the nth pixel in the image to be projected. This is to correct the homogeneous coordinates of the nth pixel in the image.
[0040] The headlight controller is the electronic control unit that controls the entire intelligent headlight system. The headlight controller receives the corrected image from upstream and converts it into low-level electrical signals and timing commands required to drive the DMD chip micromirror array and the light source to achieve projection.
[0041] In some embodiments, the homography matrix is determined based on the following steps: Step 210: Extract the original image coordinates of each corner point of the original image.
[0042] Specifically, the original image is a digital image without any geometric correction, such as a rectangular arrow icon that is intended to be projected onto the ground. The corner points of the original image refer to the key vertices on the image's boundary. For a rectangular image, these are its four corner points (top left, top right, bottom right, and bottom left), represented as... The original image coordinates of each corner point refer to the position of the corner point in the original image pixel coordinate system. They are usually represented as (u, v), where u is the column coordinate (X-axis) and v is the row coordinate (Y-axis). For a standard rectangular image, its corner coordinates are known and fixed. Figure 2 This is a schematic diagram of the original image provided by the present invention.
[0043] Step 220: Based on the intrinsic and extrinsic parameters of the projector, the original image coordinates are transformed to the world coordinate system, and a minimum bounding rectangle is constructed on the projection plane to enclose each corner point. Then, each vertex of the rectangle is transformed to the image coordinate system to obtain the target image coordinates.
[0044] Specifically, the projector's intrinsic parameter matrix K describes the projector's internal optical characteristics, including focal length, principal point, and distortion coefficients. It maps 3D points in the camera coordinate system to 2D pixels in the image coordinate system.
[0045] The extrinsic parameter matrix typically consists of a 3x3 rotation matrix (R) and a 3x1 translation vector (T). The extrinsic parameter matrix describes how points in the world coordinate system are transformed to the projector coordinate system, thus defining the projector's position and orientation in space.
[0046] A projection plane is a plane in three-dimensional space on which the image is to be projected. For example, the ground is usually defined as a plane with Z = 0; the wall directly in front of a vehicle can be defined as a plane with Y = 5.0 (5 meters in front of the vehicle).
[0047] Preferably, step 220 specifically includes: Step 221: Based on the intrinsic and extrinsic parameter matrices of the projector, calculate the original world coordinates of each corner point on the projection plane under the current posture of the projector. Step 222: Extract the 2D coordinates of the corresponding projection plane from the original world coordinates to obtain the projection plane coordinates. Calculate the coordinate extrema of the projection plane coordinates. Construct the minimum bounding rectangle based on the coordinate extrema to obtain the world coordinates of each vertex of the rectangle. Step 223: Based on the extrinsic parameter matrix of the projector, transform the world coordinates of each vertex to the camera coordinate system coordinates; Step 224: Based on the projector's intrinsic parameter matrix, transform the camera coordinate system coordinates to the image coordinate system to obtain the target image coordinates.
[0048] Specifically, for each original image corner point, the inverse matrix K⁻¹ of the intrinsic parameter matrix K is used to convert the original image coordinates into normalized camera coordinates. Then, using the extrinsic parameters (R, T), the ray direction is transformed from the camera coordinate system to the world coordinate system, with the ray originating at the position of the camera optical center in the world coordinate system. The intersection points of the rays and the projection plane are calculated, and the coordinates of the intersection points are determined as the original world coordinates of each corner point on the projection plane.
[0049] Then, based on the projection plane (wall or ground), the 2D coordinates of the corresponding plane are extracted from the original world coordinate points (yz coordinates for the wall and xy coordinates for the ground) to form the projection plane coordinates.
[0050] Calculate the extreme values of the projection plane coordinates (x_min / x_max, y_min / y_max), and use these to construct the smallest bounding rectangle that can enclose all the original points. The vertices of the rectangle can be represented as... These vertices form a regular rectangle in the world coordinate system, which is the ideal area to be projected after correction.
[0051] Then, the vertices of the rectangle in the world coordinate system are determined using camera extrinsic parameters. The coordinates are converted to camera coordinates; then the camera coordinates are converted to image pixel coordinates through the camera intrinsic parameter matrix to obtain the target image coordinates, that is, the corresponding position of the ideal rectangle on the image, which is used as the target coordinates for correction.
[0052] Step 230: Calculate the homography matrix based on the original image coordinates and the target image coordinates.
[0053] Specifically, after obtaining the target image coordinates, the homography matrix between the original image coordinates and the target image coordinates can be calculated through direct linear transformation or OpenCV library functions.
[0054] In other embodiments, considering the change in the world coordinates of the projected image, the calculated... It will exceed The image range may be much larger than the original image size, or it may be negative or partially outside the effective imaging range of the projector.
[0055] Calculating the homography matrix directly using the target image coordinates and then transforming it may result in information loss: only a portion of the transformed image will be within the projector's displayable area, with the rest truncated, leading to an incomplete projected pattern. Alternatively, it may waste resolution: the transformed image may only occupy a small portion of the projector's resolution, failing to fully utilize the projector's resolution and resulting in a degraded projected image quality.
[0056] Therefore, after obtaining the target image coordinates in this embodiment, the target image coordinates are standardized to match the size of the original image to obtain the corrected image coordinates; based on the original image coordinates and the corrected image coordinates, the homography matrix is calculated.
[0057] Here, the corrected image coordinates fall completely within the range defined by the original image size. For the standardized target image coordinates, the corrected image coordinates can be obtained through translation and scaling. Specifically, based on the minimum values of the target image coordinates along each coordinate axis, the rectangle is translated to obtain the translated coordinates; based on the ratio of the maximum values of the translated coordinates along each coordinate axis, the rectangle is scaled, and the coordinates of each vertex of the scaled rectangle are used as the corrected image coordinates.
[0058] Specifically, for Perform a translation (subtract the minimum values in the x and y directions to eliminate negative coordinates), calculate the width and height of the translated region (x_max / y_max), and then adjust the dimensions according to the original image size. Calculate the scaling ratio (eliminate coordinates larger than the image size), and... Scale to a size that matches the original image to obtain the correction target points. This yields the coordinates of the corrected image. Figure 3 This is a schematic diagram of the corrected image provided by the present invention. Then, based on the original image coordinates and the corrected image coordinates, the homography matrix is calculated.
[0059] The intelligent vehicle headlight projection image correction device provided by the present invention is described below. The intelligent vehicle headlight projection image correction device described below and the intelligent vehicle headlight projection image correction method described above can be referred to in correspondence.
[0060] Based on the above embodiments, Figure 4 This is a structural schematic diagram of the intelligent vehicle headlight projection image correction device provided by the present invention, as shown below. Figure 4 As shown, the intelligent vehicle headlight projection correction device 400 includes: Image acquisition unit 410 is used to acquire the image to be projected; The correction unit 420 is used to correct the image to be projected based on the homography matrix and the perspective transformation relationship to obtain the corrected image. The homography matrix is determined based on the intrinsic and extrinsic parameters of the internal projector of the vehicle headlight and the projection plane. The projection unit 430 is used to send the corrected image to the headlight controller to project the corrected image onto the projection plane.
[0061] Based on the above embodiments, the device further includes a matrix determination unit, used for: Extract the original image coordinates of each corner point of the original image; Based on the intrinsic and extrinsic parameters of the projector, the original image coordinates are transformed to the world coordinate system, and a minimum bounding rectangle is constructed on the projection plane to enclose each corner point. Then, each vertex of the rectangle is transformed to the image coordinate system to obtain the target image coordinates. The homography matrix is calculated based on the original image coordinates and the target image coordinates.
[0062] Based on the above embodiments, the matrix determination unit is specifically used for: The target image coordinates are standardized to match the size of the original image to obtain the corrected image coordinates; The homography matrix is calculated based on the original image coordinates and the corrected image coordinates.
[0063] Based on the above embodiments, the matrix determination unit is specifically used for: Based on the minimum values of the target image coordinates in each coordinate axis direction, the rectangle is translated to obtain the translated coordinates; Based on the ratio of the maximum values of the translated coordinates in each coordinate axis direction, the rectangle is scaled, and the coordinates of each vertex of the scaled rectangle are used as the coordinates of the corrected image.
[0064] Based on the above embodiments, the matrix determination unit is specifically used for: Based on the intrinsic and extrinsic parameter matrices of the projector, calculate the original world coordinates of each corner point on the projection plane under the current posture of the projector; Extract the 2D coordinates of the corresponding projection plane from the original world coordinates to obtain the projection plane coordinates. Calculate the coordinate extrema of the projection plane coordinates. Construct a minimum bounding rectangle based on the coordinate extrema to obtain the world coordinates of each vertex of the rectangle. Based on the extrinsic parameter matrix of the projector, the world coordinates of each vertex are transformed to camera coordinates; Based on the projector's intrinsic parameter matrix, the camera coordinate system coordinates are transformed to the image coordinate system to obtain the target image coordinates.
[0065] Based on the above embodiments, the matrix determination unit is specifically used for: Based on the intrinsic and extrinsic parameter matrices of the projector, each corner point is converted into a ray in the world coordinate system; Calculate the intersection points of the ray and the projection plane, and determine the coordinates of the intersection points as the original world coordinates of each corner point on the projection plane.
[0066] Figure 5 This is a structural schematic diagram of the intelligent vehicle light provided by the present invention, as shown below. Figure 5 As shown, a smart vehicle light is provided, including a vehicle light body 510 and the aforementioned projection image correction device 400.
[0067] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6 As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640, wherein the processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute a smart vehicle headlight projection image correction method. This method includes: acquiring an image to be projected; correcting the image to be projected based on a homography matrix and applying perspective transformation relationships to obtain a corrected image, wherein the homography matrix is determined based on the intrinsic and extrinsic parameters of the vehicle headlight internal projector and the projection plane; and sending the corrected image to the vehicle headlight controller to project the corrected image onto the projection plane.
[0068] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0069] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the intelligent vehicle headlight projection image correction method provided by the above methods. The method includes: acquiring an image to be projected; correcting the image to be projected based on a homography matrix and applying perspective transformation relationships to obtain a corrected image, wherein the homography matrix is determined based on the intrinsic and extrinsic parameters of the vehicle headlight internal projector and the projection plane; and sending the corrected image to a vehicle headlight controller to project the corrected image onto the projection plane.
[0070] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the intelligent vehicle headlight projection image correction method provided by the above methods. The method includes: acquiring an image to be projected; correcting the image to be projected based on a homography matrix and applying a perspective transformation relationship to obtain a corrected image, wherein the homography matrix is determined based on the intrinsic and extrinsic parameters of the vehicle headlight internal projector and the projection plane; and sending the corrected image to a vehicle headlight controller to project the corrected image onto the projection plane.
[0071] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0072] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for correcting a smart headlamp projection map, characterized in that, The method comprises: acquiring a to-be-projected image; correcting the to-be-projected image based on a homography matrix to obtain a corrected image, the homography matrix being determined based on internal and external parameters of an internal projector of a vehicle lamp and a projection plane; sending the corrected image to a vehicle lamp controller to project the corrected image on the projection plane.
2. The intelligent headlamp projection map correction method of claim 1, wherein, The homography matrix is determined based on the following steps: extracting original image coordinates of each corner point of an original image; converting the original image coordinates to a world coordinate system and constructing a minimum circumscribed rectangular frame surrounding the each corner point on a projection plane based on internal and external parameter matrices of the projector, and then converting each vertex of the rectangular frame to an image coordinate system to obtain target image coordinates; calculating the homography matrix based on the original image coordinates and the target image coordinates. 3.The intelligent vehicle light projection map correction method of claim 2, wherein, The calculation of the homography matrix based on the original image coordinates and the target image coordinates comprises: normalizing the target image coordinates to match the size of the original image to obtain corrected image coordinates; calculating the homography matrix based on the original image coordinates and the corrected image coordinates. 4.The intelligent vehicle light projection map correction method of claim 3, wherein, The normalization of the target image coordinates to match the size of the original image to obtain corrected image coordinates comprises: translating the rectangular frame based on minimum values of the target image coordinates in each coordinate axis direction to obtain translated coordinates; scaling the rectangular frame based on maximum value ratios of the translated coordinates in each coordinate axis direction, and taking the coordinates of each vertex of the scaled rectangular frame as the corrected image coordinates. 5.The intelligent vehicle light projection map correction method of claim 2, wherein, The conversion of the original image coordinates to a world coordinate system and the construction of a minimum circumscribed rectangular frame surrounding the each corner point on a projection plane based on internal and external parameter matrices of the projector to obtain target image coordinates comprises: calculating original world coordinates of the each corner point on the projection plane under a current posture of the projector based on the internal and external parameter matrices of the projector; extracting 2D coordinates corresponding to the projection plane from the original world coordinates to obtain projection plane coordinates, calculating coordinate extreme values of the projection plane coordinates, constructing a minimum circumscribed rectangular frame based on the coordinate extreme values, and obtaining world coordinates of each vertex of the rectangular frame; converting the world coordinates of the each vertex to camera coordinate system coordinates based on the external parameter matrix of the projector; converting the camera coordinate system coordinates to an image coordinate system based on the internal parameter matrix of the projector to obtain target image coordinates. 6.The intelligent vehicle light projection map correction method of claim 5, wherein, The conversion of the original image coordinates to a world coordinate system and the construction of a minimum circumscribed rectangular frame surrounding the each corner point on a projection plane based on internal and external parameter matrices of the projector to obtain target image coordinates comprises: converting the each corner point to a ray in a world coordinate system based on the internal and external parameter matrices of the projector; calculating an intersection point of the ray and the projection plane, and determining the coordinates of the intersection point as the original world coordinates of the each corner point on the projection plane.
7. A smart headlamp projection map correction device, characterized by, The method comprises: an image acquisition unit configured to acquire a to-be-projected image; a correction unit configured to correct the to-be-projected image based on a homography matrix to obtain a corrected image, the homography matrix being determined based on internal and external parameters of an internal projector of a vehicle lamp and a projection plane; A projection unit is configured to send the corrected image to a vehicle lamp controller to project the corrected image on the projection plane.
8. A smart vehicle light comprising a vehicle light body, characterized in that, The projection image correction device of claim 7 is also included. 9.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to implement the intelligent vehicle lamp projection image correction method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by a processor to implement the intelligent vehicle lamp projection image correction method of any one of claims 1 to 6.