Video keystone correction system based on FPGA
By using an FPGA video keystone correction system, road parameters are obtained from LiDAR for image correction and LED light flicker adjustment, which solves the problem of distorted vehicle headlight projection images and improves projection effect and driving safety.
Patent Information
- Application Number
- CN202410925973.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-11-12
AI Technical Summary
Existing vehicle headlight projection systems suffer from trapezoidal distortion in the projected image because the headlight projection is not perpendicular to the ground at a 90-degree angle, which affects driving safety and information interaction.
An FPGA-based video keystone correction system is adopted, including an image transmission module, a road parameter module, a data storage module, a keystone correction module, and a headlight adjustment module. The system acquires road parameters through LiDAR, establishes a keystone correction algorithm model, corrects image data, and adjusts the flashing time and frequency of LED lights according to the distance and speed of surrounding objects.
It achieves good correction of projected images, can adjust the projection effect in real time, reduce image noise, and improve driving safety and information interaction quality.
Smart Images

Figure CN118945301A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of video keystone correction, in particular to a video keystone correction system based on FPGA. Background Art
[0002] With the advancement of science and technology and the development of the economy and society, cars have gradually become one of the means of transportation for more and more families. Cars are assembled from multiple parts. In order to facilitate safe driving at night or in dimly lit environments, cars are equipped with headlights. With the increase in the number of cars, driving safety has received more and more attention from all walks of life. And improving the lighting conditions of the car lighting system to improve night driving safety has gradually attracted people's attention. With the development of headlights and the increase in the demand for interaction with pedestrians, a projection headlight based on MICRO-LED micro-light-emitting diode display technology is now widely used in the market. However, since the projection of the headlights is not 90 degrees vertical to the ground, the projected image has trapezoidal distortion, resulting in distortion of the image, making the image in the positive direction look like a trapezoid instead of a square. When most of the projection headlights on the market are projected on the road, due to the different road slopes and road flatness, the correction effect of the pictures or videos projected on the ground is general and the picture noise is high, which seriously affects the information interaction effect with pedestrians. Summary of the invention
[0003] The purpose of the present invention is to provide a video keystone correction system based on FPGA to solve the problems raised in the above background technology.
[0004] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0005] A video trapezoidal correction system based on FPGA, the video trapezoidal correction system includes an image transmission module, a road parameter module, a data storage module, a trapezoidal correction module and a vehicle light adjustment module;
[0006] The image transmission module is used to upload the original image and transmit the original image to the image processing FPGA unit through the microcontroller MCU unit;
[0007] The road parameter module is used to obtain road parameters and transmit the road parameters to the image processing FPGA unit through the microcontroller MCU unit;
[0008] The data storage module is used to obtain the image data in the original image and store the image data in the original image through the storage unit;
[0009] The trapezoidal correction module is used to establish a trapezoidal correction algorithm model. The trapezoidal correction algorithm model includes spatial transformation of coordinates and interpolation operation of pixels. The image data is corrected through the trapezoidal correction algorithm model, and the corrected image data is transmitted to the MICRO-LED module;
[0010] The vehicle light adjustment module is used to adjust the flashing time and flashing frequency of the LED light according to the distance of the surrounding moving objects from the vehicle body and the moving speed of the moving objects.
[0011] Further, the road parameter module includes a horizontal road beam unit, a road slope unit, and a slope side length unit;
[0012] The horizontal road beam unit is used to project the headlights on the horizontal road surface. The beam corresponding to the uppermost position in the projected image is regarded as the uppermost beam, and the beam corresponding to the lowermost position is regarded as the lowermost beam. A laser radar is installed at the headlight position. With the laser radar position as the starting point, laser beams are emitted along the directions of the uppermost beam and the lowermost beam, which are respectively regarded as the uppermost laser beam and the lowermost laser beam, and the time taken by the laser radar to receive the uppermost laser beam and the lowermost laser beam is T respectively. let and T leb ; The direction of the laser radar perpendicular to the horizontal road surface is taken as the reference vertical direction, and the angle between the top laser beam and the reference vertical direction is set as γ t , the angle between the bottom laser beam and the reference vertical direction is set to γ b .
[0013] Furthermore, if the vehicle is on a slope of α g On a slope, the road slope unit is used to receive the top laser beam and the bottom laser beam. The time taken to receive the top laser beam and the bottom laser beam is T respectively. slt and T slb , if T slt <T let And T slb >T leb , the vehicle is on an uphill section, the slope If T slt >T let And T slb <T leb , the vehicle is on a downhill section, the slope Among them, 0<α g ≤90.
[0014] Furthermore, the slope side length unit is used to obtain a trapezoidal image projected on a horizontal road surface, and the upper side length of the trapezoidal image is The length of the bottom side is If the road is sloping, the slope of the road is α g, the upper side length of the trapezoidal image projected on the sloped road is set to The length of the bottom side is set to but Among them, k a and k b They are the correlation coefficients of the upper and lower sides of the trapezoidal image, and when going uphill, there is and When going downhill and
[0015] Further, the trapezoidal correction module includes a coordinate space transformation unit and a pixel interpolation operation unit;
[0016] The coordinate space transformation unit is used to take the original image as Figure a, the projected real image as Figure b, and the compensated image calculated by compensating the trapezoidal distortion as Figure c; a coordinate system is established with the intersection of the bottom and the left side of the trapezoidal image in Figure c as the origin, the right direction of the bottom of the image as the horizontal axis, and the vertical direction perpendicular to the horizontal axis as the vertical axis; wherein the pixel point (x, y) of the trapezoidal image in Figure c corresponds to the pixel point (X, Y) of the image in Figure a, and the longest side of the upper and lower sides of the trapezoidal image in Figure b is recorded as S max , the shortest side is denoted as S min , the height of the trapezoidal image in Figure b is h, and the spatial transformation formula is:
[0017]
[0018] Among them, Y is the vertical coordinate of the pixel point in Figure a, X is the horizontal coordinate of the pixel point in Figure a, y is the vertical coordinate of the pixel point in Figure c, and x is the horizontal coordinate of the pixel point in Figure c. min max .
[0019] Furthermore, the pixel interpolation operation unit is used to obtain the RGB values of the four pixel points f(p0,q0), f(p1,q1), f(p0,q1), and f(p1,q0) closest to the pixel point f(p,q) according to the pixel point f(p,q) required for the compensation image c, wherein the image formed by the four pixel points is a rectangle, and the pixel point f(p,q) is within the rectangle; according to the RGB values of the four nearest pixel points, linear interpolation is first performed twice in the horizontal coordinate direction to obtain the image c. The RGB values of the pixels f(p,q0) and (p,q1), where the pixel f(p,q0) is obtained by f(p0,q0) and f(p1,q0), the pixel f(p,q1) is obtained by f(p0,q1) and f(p1,q1), and the pixels f(p,q0), f(p,q1) and f(p,q) have the same horizontal coordinates, and then a linear interpolation is performed in the vertical direction to obtain the RGB value of the pixel f(p,q) required to compensate the image c.
[0020] Further, the vehicle light adjustment module includes a center point unit, a moving object marking unit, and a flashing frequency unit;
[0021] The center point unit is used to set the first safety distance threshold of the vehicle to S1, and the range of S1 meters from the edge of the vehicle body is used as the first distance range, and the second safety distance threshold of the vehicle is set to S2, and the range of S2 meters from the edge of the vehicle body is used as the second distance range. The four corners of the vehicle body are marked to obtain four marked corner points, and the diagonal marked corner points are connected to obtain the vehicle center point P. cen , S1>S2.
[0022] Furthermore, the moving object marking unit is used to determine if the moving object enters the first distance range, mark the position of the moving object when it just enters the first distance range as P1, and obtain the maximum range that can cover the entire vehicle formed by the position P1 and the marking points on the vehicle body, take the maximum range as the danger range, and obtain the direction of the moving object at this time. If the moving direction of the moving object points to the danger range, the moving object is marked; if the moving speed of the marked moving object is greater than or equal to the first speed threshold, the vehicle lights start to light up.
[0023] Furthermore, the flashing frequency unit is used to determine if the moving speed of the marked moving object is less than the first speed threshold, track the moving object, and if the moving object enters the second distance range, mark the position of the moving object just entering the second distance range as P2, and obtain the marking point X closest to the position P2. re , get the center point P cen Point to the marked point X re The direction and center point P cen The angle θ between the directions pointing to position P2XP , if the angle θ XP >θ0, θ0 is the angle threshold, the vehicle lights start to light up, and the distance of the moving object from the vehicle is inversely proportional to the flashing frequency, where the flashing frequency L>L0, where F is the flicker frequency, k is the flicker frequency coefficient, sinθ XP To find the angle θ XP , v is the speed of the moving object, L is the distance between the moving object and the vehicle body, L0 is the distance threshold, when 0≤L≤L0, the flashing frequency is the flashing frequency when L=L0, until the moving object leaves the second distance range and stops flashing.
[0024] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: the present invention provides a video trapezoidal correction system based on FPGA, including the following modules: an image transmission module: used to upload the original image and transmit it to the image processing FPGA unit; a road parameter module: used to obtain the road parameters and transmit them to the image processing FPGA unit; a data storage module: used to obtain the image data in the original image and store it; a trapezoidal correction module: used to establish a trapezoidal correction algorithm model to correct the image data; a headlight adjustment module: used to adjust the flashing time and flashing frequency of the LED light according to the distance and speed of the surrounding moving objects. The present invention makes the headlight projection have a good projection effect by performing trapezoidal correction on the projected image, can adjust the projection effect in real time according to the road conditions, and has the advantages of simple image scaling algorithm and noise reduction algorithm, which can well reduce the delay of data. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0026] Figure 1 It is a structural diagram of a video trapezoidal correction system based on FPGA of the present invention;
[0027] Figure 2 It is a structural schematic diagram of a laser radar emitting a laser beam in a video trapezoidal correction system based on FPGA of the present invention;
[0028] Figure 3 It is a structural schematic diagram of an image to be projected, an offset projection image and a compensation image in a video trapezoidal correction system based on FPGA of the present invention;
[0029] Figure 3 Middle: a is the image to be projected; b is the real image projected with a downward offset; c is the compensated image calculated after compensating for keystone distortion. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] See also Figure 1-Figure 3 The present invention provides a video trapezoidal correction system based on FPGA, and the corresponding structure of the video trapezoidal correction system based on FPGA is shown in FIG. Figure 1 As shown. It includes the following modules: image transmission module, road parameter module, data storage module, trapezoidal correction module and headlight adjustment module. Among them, the units and functions of each module are as follows:
[0032] Image transmission module: used to upload the original image and transmit the original image to the image processing FPGA unit through the microcontroller MCU unit.
[0033] In this embodiment, the image is projected through the MICRO-LED module, and the original image to be projected is uploaded through the vehicle. The content and type of the original image can be determined according to the interactive content with pedestrians, vehicles, etc., and the uploaded original image is transmitted to the image processing FPGA unit. Among them, in this embodiment, the image processing FPGA unit adopts the LAE5UM-25 series chip of LATTICE.
[0034] Road parameter module: used to obtain road parameters and transmit them to the image processing FPGA unit through the microcontroller MCU unit. The function of this module is: since the upper and lower lengths of the image projected by the vehicle on a horizontal road are fixed, and the vehicle cannot determine the size of the slope on a sloping road, the upper and lower lengths of the image projected on the sloping road are unknown, so the image correction in the trapezoidal correction module cannot be performed. Therefore, this unit first obtains the road slope α through the laser radar g , and then according to the road slope α g The upper and lower lengths of the image projected on the sloped road are obtained. In this embodiment, the microcontroller MCU unit adopts the S32K314 series chip of NXP. The road parameter module includes a horizontal road beam unit, a road slope unit and a slope length unit, and the functions of each unit are as follows:
[0035] Horizontal road beam unit: used to project the headlights on the horizontal road surface. The beam corresponding to the uppermost position in the projected image is regarded as the uppermost beam, and the beam corresponding to the lowermost position is regarded as the lowermost beam. A laser radar is installed at the headlight position. With the laser radar position as the starting point, laser beams are emitted along the directions of the uppermost beam and the lowermost beam, which are respectively regarded as the uppermost laser beam and the lowermost laser beam. The time taken by the laser radar to receive the uppermost laser beam and the lowermost laser beam is T respectively. let and T leb ; The direction of the laser radar perpendicular to the horizontal road surface is taken as the reference vertical direction, and the angle between the top laser beam and the reference vertical direction is set as γ t , the angle between the bottom laser beam and the reference vertical direction is set to γ b . Details are as attached Figure 2 The schematic diagram of the structure of the laser radar emitting laser beam is shown in the figure.
[0036] Road slope unit: If the vehicle is on a slope of α g On a slope, the road slope unit is used to receive the top laser beam and the bottom laser beam. The time taken to receive the top laser beam and the bottom laser beam is T respectively. slt and T slb , if T slt <T let And T slb >T leb , the vehicle is on an uphill section. When going uphill, the distance of the upper laser beam becomes shorter and the distance of the lower laser beam becomes longer, so the slope If T slt >T let And T slb <T leb , the vehicle is on a downhill section. When going downhill, the distance of the upper laser beam becomes longer and the distance of the lower laser beam becomes shorter, so the slope Among them, 0<α g ≤90. Among them, Source description: Due to Therefore, we can get
[0037] Slope side length unit: used to obtain the trapezoidal image projected on the horizontal road surface. The upper side length of the trapezoidal image is The length of the bottom side is If the road is sloping, the slope of the road is α g , the upper side length of the trapezoidal image projected on the sloped road is set to The length of the bottom side is set to but Among them, k a and kb They are the correlation coefficients of the upper and lower sides of the trapezoidal image, and when going uphill, there is and When going downhill and Among them, we get k a and k b The specific value of can be: Set k a and k b The initial iteration value is based on the length of the upper side And the length of the bottom Perform keystone correction, and then further calculate k based on the keystone correction result. a and k b The reliability of the value of (such as the image display after trapezoidal correction, whether it is rectangular on a sloped road, etc.), and further set k based on the reliability results a and k b Iteration value until k is found a and k b until the best value of .
[0038] Road parameters include: T let and T leb , γ t and γ b 、T slt and T slb , α g , and and After obtaining the road parameters, they are transmitted to the image processing FPGA unit through the microcontroller MCU unit.
[0039] Data storage module: used to obtain image data in the original image and store the image data in the original image through a storage unit. In this embodiment, the image data of the original image is specifically the RGB value of each pixel in the image. The storage unit uses Winbond's W9825G6 SDRAM series chip.
[0040] Trapezoidal correction module: used to establish a trapezoidal correction algorithm model, which includes coordinate space transformation and pixel interpolation operations. The image data is corrected through the trapezoidal correction algorithm model, and the corrected image data is transmitted to the MICRO-LED module. Among them, the trapezoidal correction module includes a coordinate space transformation unit and a pixel interpolation operation unit. The functions of each unit are as follows:
[0041] FPGA (Field Programmable Gate Array) is a product further developed on the basis of programmable devices such as PAL (Programmable Array Logic) and GAL (General Array Logic). Applying FPGA to video trapezoidal correction can realize the rapid processing of video data, ensure that trapezoidal correction can be performed in real time, and avoid the impact of delay on the viewing experience. First, the transmitted image is pre-processed through image scaling and image noise reduction, among which image scaling and image noise reduction are both achieved through existing technologies. Then, image parameter correction is realized according to image trapezoidal correction, which mainly includes spatial transformation of coordinates and interpolation operation of pixels.
[0042] Coordinate space transformation unit: Figure 2 This is a schematic diagram of the structure of the image, offset projection image and compensation image that need to be projected by this system, as shown in the attached figure. Figure 2 As shown, Figure a is the image to be projected, which is the original ideal image without any processing. It contains complete and accurate content and expected visual presentation; Figure b is the real image projected with a downward offset, which is the image actually projected on the road surface by the projector; Figure c is the compensated image calculated to compensate for the trapezoidal distortion, which is an image specially designed to correct the difference between the projected real image and the image to be projected. The compensated image attempts to compensate and correct the defects of the real image through certain algorithms and processing to make it closer to the image to be projected. The compensated image is usually calculated and adjusted to improve the projection effect and reduce distortion and other problems. A coordinate system is established with the intersection of the bottom and the left side of the trapezoidal image in Figure c as the origin, the right direction of the bottom of the image as the horizontal axis, and the vertical direction perpendicular to the horizontal axis as the vertical axis. Among them, the pixel point (x, y) of the trapezoidal image in Figure c corresponds to the pixel point (X, Y) of the image in Figure a, and the longest side of the upper and lower sides of the trapezoidal image in Figure b is denoted as S max , the shortest side is denoted as S min , the height of the trapezoidal image in Figure b is h. The spatial transformation formula is:
[0043]
[0044] Among them, Y is the vertical coordinate of the pixel point in Figure a, X is the horizontal coordinate of the pixel point in Figure a, y is the vertical coordinate of the pixel point in Figure c, and x is the horizontal coordinate of the pixel point in Figure c. min max .
[0045] In this embodiment, Figure b is a real image projected downwardly. The upper side of Figure b is shorter than the lower side. If the upper side of the trapezoidal image in Figure b is t and the lower side is d, where d>t, then:
[0046]
[0047] It should be noted that Determines the pixel offset. The height h of the trapezoidal image in Figure b is the same as that in Figure a. When the horizontal coordinate of the pixel point (x, y) of the trapezoidal image in Figure c is When , it means that the relationship between the horizontal coordinate X of the pixel point in the original image a and the horizontal coordinate x of the pixel point in the image c is X>x; when When , it means X = x; when the horizontal coordinate of the pixel point (x, y) of the trapezoidal image in Figure c is When , it means that the relationship between the horizontal coordinate X of the pixel point in the original image a and the horizontal coordinate x of the pixel point in the image c is X <x。
[0048] And (dt)*y determines the degree of offset. The larger the difference between the lower side length d and the upper side length t, the more serious the trapezoidal distortion of the compensated image is compared with the original image. In this embodiment, since d>t, the closer the value of the vertical coordinate y of the pixel point in Figure c is to the height h of Figure b, the greater the impact of the trapezoidal distortion is, and the stronger the compensation required is. The closer the value of the vertical coordinate y of the pixel point in Figure c is to 0, the smaller the impact of the trapezoidal distortion is, and the weaker the compensation required is.
[0049] Pixel interpolation unit: used to obtain the RGB values of the four pixels f(p0,q0), f(p1,q1), f(p0,q1), and f(p1,q0) closest to the pixel f(p,q) according to the pixel f(p,q) required for the compensation image c, where the image formed by the four pixels is a rectangle and the pixel f(p,q) is within the rectangle; according to the RGB values of the four nearest pixels, linear interpolation is first performed twice in the horizontal coordinate direction to obtain the pixel The RGB values of f(p,q0) and (p,q1), where the pixel point f(p,q0) is obtained by f(p0,q0) and f(p1,q0), the pixel point f(p,q1) is obtained by f(p0,q1) and f(p1,q1), and the horizontal coordinates of the pixels f(p,q0), f(p,q1) and f(p,q) are the same, and then a linear interpolation is performed in the vertical coordinate direction to obtain the RGB value of the pixel point f(p,q) required to compensate the image c.
[0050] Bilinear interpolation is the generalization of linear interpolation in two dimensions. It performs three linear interpolations in two directions. It defines a hyperbolic paraboloid fitting with four known points. The specific operation is to perform two linear interpolation calculations in the horizontal direction and then one interpolation calculation in the vertical direction. As shown below:
[0051] First, determine the pixel point f(p,q) required to compensate the image c. f(p,q) is a binary function, and obtain the RGB values of the four pixels f(p0,q0), f(p1,q1), f(p0,q1), and f(p1,q0) closest to the pixel point f(p,q), which are RGB(p0,q0), RGB(p1,q1), RGB(p0,q1), and RGB(p1,q0) respectively. These four pixels determine a rectangle, and the pixel point f(p,q) is within the rectangle. First, perform two linear interpolations in the horizontal coordinate direction to obtain the RGB values of the pixels f(p,q0) and (p,q1): Among them, RGB(p,q0) is the RGB value of the pixel point f(p,q0), and RGB(p,q1) is the RGB value of the pixel point f(p,q1); then perform a linear interpolation in the ordinate direction to obtain: Among them, RGB(p,q) is the RGB value of the pixel point f(p,q). In summary, it is the result of bilinear interpolation. According to bilinear interpolation, the pixel RGB value is calculated to obtain the RGB value of each pixel in the compensated image c.
[0052] Light adjustment module: used to adjust the flashing time and flashing frequency of LED lights according to the distance and speed of surrounding moving objects. It includes center point unit, moving object marking unit and flashing frequency unit. The functions of each unit are as follows:
[0053] Center point unit: used to set the first safety distance threshold of the vehicle to S1, and take the range of S1 meters from the edge of the vehicle as the first distance range, set the second safety distance threshold of the vehicle to S2, and take the range of S2 meters from the edge of the vehicle as the second distance range, and mark the four corners of the vehicle to obtain four marked corner points, connect the diagonal marked corner points, and obtain the vehicle center point P cen , S1>S2.
[0054] Moving object marking unit: used to determine if a moving object enters the first distance range, mark the position of the moving object when it just enters the first distance range as P1, and obtain the maximum range that can cover the entire vehicle formed by the position P1 and the marking points on the vehicle body, take the maximum range as the danger range, and obtain the direction of the moving object at this time. If the moving direction of the moving object points to the danger range, mark the moving object; if the moving speed of the marked moving object is greater than or equal to the first speed threshold, the vehicle lights start to light up. In this embodiment, the first speed threshold is 1.5m / s.
[0055] Flashing frequency unit: used to determine if the moving speed of the marked moving object is less than the first speed threshold, track the moving object, and if the moving object enters the second distance range, mark the position of the moving object just entering the second distance range as P2, and obtain the mark point X closest to position P2 re , get the center point P cen Point to the marked point X re The direction and center point P cen The angle θ between the directions pointing to position P2 XP , if the angle θ XP >θ0, θ0 is the angle threshold, the vehicle lights start to light up, and the distance of the moving object from the vehicle is inversely proportional to the flashing frequency, where the flashing frequency L>L0, where F is the flicker frequency, k is the flicker frequency coefficient, sinθ XP To find the angle θ XP , v is the speed of the moving object, L is the distance between the moving object and the vehicle body, L0 is the distance threshold, in this embodiment, L0=1, when 0≤L≤L0, the flashing frequency is the flashing frequency when L=L0, until the moving object leaves the second distance range and stops flashing.
[0056] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0057] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A video keystone correction system based on FPGA, characterized in that: The video trapezoidal correction system includes an image transmission module, a road parameter module, a data storage module, a trapezoidal correction module and a vehicle light adjustment module; The image transmission module is used to upload the original image and transmit the original image to the image processing FPGA unit through the microcontroller MCU unit; The road parameter module is used to obtain road parameters and transmit the road parameters to the image processing FPGA unit through the microcontroller MCU unit; The data storage module is used to obtain image data in the original image and store the image data in the original image through a storage unit; The trapezoidal correction module is used to establish a trapezoidal correction algorithm model, which includes a spatial transformation of coordinates and an interpolation operation of pixels. The image data is corrected by the trapezoidal correction algorithm model, and the corrected image data is transmitted to the MICRO-LED module; The vehicle light adjustment module is used to adjust the flashing time and flashing frequency of the LED light according to the distance of the surrounding moving objects from the vehicle body and the moving speed of the moving objects.
2. The FPGA-based video keystone correction system according to claim 1, characterized in that: The road parameter module includes a horizontal road beam unit, a road slope unit and a slope side length unit; The horizontal road beam unit is used to project the headlight on the horizontal road surface, and the beam corresponding to the uppermost position in the projected image is regarded as the uppermost beam, and the beam corresponding to the lowermost position is regarded as the lowermost beam; a laser radar is installed at the headlight position, and the laser radar is used as the starting point to emit laser beams along the directions of the uppermost beam and the lowermost beam, which are respectively used as the uppermost laser beam and the lowermost laser beam, and the time taken by the laser radar to receive the uppermost laser beam and the lowermost laser beam is T respectively. let and T leb ; The direction of the laser radar perpendicular to the horizontal road surface is taken as the reference vertical direction, and the angle between the top laser beam and the reference vertical direction is set as γ t , the angle between the bottom laser beam and the reference vertical direction is set to γ b .
3. The FPGA-based video keystone correction system according to claim 2, characterized in that: If the vehicle is on a slope of α g On a slope, the road slope unit is used to receive the uppermost laser beam and the lowermost laser beam, and the time taken to receive the uppermost laser beam and the lowermost laser beam is T respectively. slt and T slb , if T slt <T let And T slb >T leb , the vehicle is on an uphill section, the slope If T slt >T let And T slb <T leb , the vehicle is on a downhill section, the slope Among them, 0<α g ≤90.
4. The FPGA-based video keystone correction system according to claim 3, characterized in that: The slope side length unit is used to obtain a trapezoidal image projected on a horizontal road surface, and the upper side length of the trapezoidal image is The length of the bottom side is If the road is sloping, the slope of the road is α g , the upper side length of the trapezoidal image projected on the sloped road is set to The length of the bottom side is set to but Among them, k a and k b They are the correlation coefficients of the upper and lower sides of the trapezoidal image, and when going uphill, there is and When going downhill and 5. The FPGA-based video keystone correction system according to claim 1, characterized in that: The trapezoidal correction module includes a coordinate space transformation unit and a pixel interpolation operation unit; The coordinate space transformation unit is used to take the original image as Figure a, the projected real image as Figure b, and the compensated image calculated by compensating the trapezoidal distortion as Figure c; a coordinate system is established with the intersection of the bottom and the left side of the trapezoidal image in Figure c as the origin, the right direction from the bottom of the image as the horizontal axis, and the vertical direction perpendicular to the horizontal axis as the vertical axis; wherein the pixel point (x, y) of the trapezoidal image in Figure c corresponds to the pixel point (X, Y) of the image in Figure a, and the longest side of the upper and lower sides of the trapezoidal image in Figure b is recorded as S max , the shortest side is denoted as S min , the height of the trapezoidal image in Figure b is h, and the spatial transformation formula is: Among them, Y is the vertical coordinate of the pixel point in Figure a, X is the horizontal coordinate of the pixel point in Figure a, y is the vertical coordinate of the pixel point in Figure c, and x is the horizontal coordinate of the pixel point in Figure c. min <S max .
6. The FPGA-based video keystone correction system according to claim 5, characterized in that: The pixel interpolation operation unit is used to obtain the RGB values of the four pixel points f(p0, q0), f(p1, q1), f(p0, q1), and f(p1, q0) closest to the pixel point f(p, q) according to the pixel point f(p, q) required for the compensation image c, wherein the image formed by the four pixel points is a rectangle and the pixel point f(p, q) is within the rectangle; according to the RGB values of the four nearest pixel points, linear interpolation is first performed twice in the horizontal coordinate direction to obtain The RGB values of the pixels f(p, q0) and (p, q1), wherein the pixel f(p, q0) is obtained by f(p0, q0) and f(p1, q0), the pixel f(p, q1) is obtained by f(p0, q1) and f(p1, q1), and the horizontal coordinates of the pixels f(p, q0), f(p, q1) and f(p, q) are the same, and then a linear interpolation is performed in the vertical coordinate direction to obtain the RGB value of the pixel f(p, q) required for the compensated image c.
7. The FPGA-based video keystone correction system according to claim 1, characterized in that: The vehicle light adjustment module includes a center point unit, a moving object marking unit and a flashing frequency unit; The center point unit is used to set the first safety distance threshold of the vehicle to S1, and take the range of S1 meters from the edge of the vehicle as the first distance range, set the second safety distance threshold of the vehicle to S2, and take the range of S2 meters from the edge of the vehicle as the second distance range, and mark the four corners of the vehicle to obtain four marked corner points, connect the diagonal marked corner points, and obtain the vehicle center point P cen , S1>S2.
8. The FPGA-based video keystone correction system according to claim 7, characterized in that: The moving object marking unit is used to determine if the moving object enters the first distance range, mark the position of the moving object just entering the first distance range as P1, and obtain the maximum range that can cover the entire vehicle formed by the position P1 and the marking points on the vehicle body, take the maximum range as the danger range, and obtain the direction of the moving object at this time. If the moving direction of the moving object points to the danger range, mark the moving object; If the moving speed of the marked moving object is greater than or equal to the first speed threshold, the vehicle lights start to light up.
9. The FPGA-based video keystone correction system according to claim 8, characterized in that: The flashing frequency unit is used to determine if the moving speed of the marked moving object is less than the first speed threshold, track the moving object, and if the moving object enters the second distance range, mark the position of the moving object just entering the second distance range as P2, and obtain the mark point X closest to the position P2. re , get the center point P cen Point to the marked point X re The direction and center point P cen The angle θ between the directions pointing to position P2 XP , if the angle θ XP >θ0, θ0 is the angle threshold, the vehicle lights start to light up, and the distance of the moving object from the vehicle is inversely proportional to the flashing frequency, where the flashing frequency L>L0, where F is the flicker frequency, k is the flicker frequency coefficient, sin θ XP To find the angle θ XP , v is the speed of the moving object, L is the distance between the moving object and the vehicle body, L0 is the distance threshold, when 0≤L≤L0, the flashing frequency is the flashing frequency when L=L0, until the moving object leaves the second distance range and stops flashing.
Citation Information
Cited By
A DLP car lamp projection adaptive distortion correction method based on a car body posture
CN120547315B
