CN114331888B - Anti-distortion method and device and head-up display system - Google Patents

Anti-distortion method and device and head-up display system Download PDF

Info

Publication number
CN114331888B
CN114331888B CN202111591000.XA CN202111591000A CN114331888B CN 114331888 B CN114331888 B CN 114331888B CN 202111591000 A CN202111591000 A CN 202111591000A CN 114331888 B CN114331888 B CN 114331888B
Authority
CN
China
Prior art keywords
pixel
point
type
vertex
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111591000.XA
Other languages
Chinese (zh)
Other versions
CN114331888A (en
Inventor
付楠
康栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Jiangcheng Technology Co ltd
Original Assignee
Hefei Jiangcheng Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Jiangcheng Technology Co ltd filed Critical Hefei Jiangcheng Technology Co ltd
Priority to CN202111591000.XA priority Critical patent/CN114331888B/en
Publication of CN114331888A publication Critical patent/CN114331888A/en
Application granted granted Critical
Publication of CN114331888B publication Critical patent/CN114331888B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The application discloses an anti-distortion method, an anti-distortion device and a head-up display system, wherein the anti-distortion method comprises the following steps: receiving first information, and moving a first vertex of the light source end according to the first information to obtain a first coordinate after the first vertex moves; determining an equation of a first boundary line of the moved first vertex according to the first coordinates; determining a first parameter of each row of pixels or a second parameter of each column of pixels according to an equation of the first boundary line; changing the display content of each row of pixels according to the first parameter or changing the display content of each column of pixels according to the second parameter; receiving second information, repeating the operation on the vertexes of the light source end according to the second information so as to continuously change the display content of each row of pixel rows or the display content of each column of pixel columns, wherein the vertexes comprise first vertexes; and receiving the third information, finishing the anti-distortion operation and storing the anti-distortion information. The anti-distortion is realized by adjusting the position of a single vertex multiple times, the operation of the anti-distortion is simplified, and new distortion is not generated.

Description

Anti-distortion method and device and head-up display system
Technical Field
The present invention relates to the field of display technologies, and in particular, to an anti-distortion method, an anti-distortion device, and a head-up display system.
Background
The Head-Up Display, abbreviated as HUD (Head-Up-Display), is also called Head-Up Display system, and has been used in the field of automobile driving in recent years, and has the function of projecting important driving information such as speed per hour and navigation onto a windshield in front of a driver, so that the driver can see the important driving information such as speed per hour and navigation without lowering the Head or turning the Head as much as possible.
However, since the HUD images a virtual image generated by specular reflection projection, due to the tolerances of the installation and the materials, the reflection surface cannot reach an absolute standard state, so that the result of the light source projection is not a rectangle in design, but is a trapezoid state, the original pattern is deformed by projection, and in order to reduce the distortion of the display result, the pattern needs to be corrected to ensure that the display effect is close to the rectangle, and the display effect is ensured.
However, in the conventional correction method, the positions of more than 2 vertices need to be simultaneously transformed during the transformation of the anti-distortion. At the same time, the symmetry axis needs to be defined, but the actual graph condition often has only one vertex offset to be obvious, and the corner with serious correction distortion also affects the relatively normal vertex for correcting the correction. The existing distortion correction method corrects included angles of all planes, namely, performs certain rotation operation on the whole image, and can correct the original deformation but also can generate new distortion at the same time. Moreover, the actual distortion is often not symmetrical, which results in existing distortion correction methods and modes of operation that are cumbersome, complex and inconvenient for the user to understand and perform.
Disclosure of Invention
The application provides an anti-distortion method, an anti-distortion device and a terminal. The anti-distortion is realized by adjusting the positions of the single vertexes multiple times, the anti-distortion operation is simplified, and the rest vertexes cannot generate new distortion.
The embodiment of the invention provides the following technical scheme:
In a first aspect, an embodiment of the present invention provides an anti-distortion method applied to a head-up display system, where the head-up display system includes a light source end, the method includes:
Receiving first information, and moving a first vertex of the light source end according to the first information to obtain a first coordinate after the first vertex moves;
determining an equation of a first boundary line of the moved first vertex according to the first coordinates;
determining a first parameter of each row of pixels or a second parameter of each column of pixels according to an equation of the first boundary line;
Changing the display content of each row of pixels according to the first parameter or changing the display content of each column of pixels according to the second parameter;
Receiving second information, repeating the operation on the vertexes of the light source end according to the second information so as to continuously change the display content of each row of pixel rows or the display content of each column of pixel columns, wherein the vertexes comprise first vertexes;
and receiving the third information, finishing the anti-distortion operation and storing the anti-distortion information.
In some embodiments, prior to receiving the first information, the method further comprises:
Establishing a rectangular coordinate system at the light source end, determining coordinates of vertexes in the light source end, wherein the vertexes comprise a first vertex, a second vertex and a third vertex, the first vertex is adjacent to the second vertex and the third vertex, the second vertex is in the vertical direction of the first vertex, and the third vertex is in the horizontal direction of the first vertex.
In some embodiments, the first information includes a direction of movement of the first vertex, the method further comprising:
if the moving direction is the horizontal direction, determining an equation of a first boundary straight line according to the first coordinates and the coordinates of the second vertexes;
if the moving direction is the vertical direction, determining an equation of a first boundary straight line according to the first coordinate and the coordinate of the third vertex.
In some embodiments, the light source end includes a first type of pixel point and a second type of pixel point, where the number of the first type of pixel points on each row of pixel lines or each column of pixel columns is known, the second type of pixel point is a pixel point whose display content needs to be changed according to a first parameter or a second parameter, and determining the first parameter of each row of pixel lines or the second parameter of each column of pixel columns according to an equation of a first boundary line includes:
If the moving direction of the first vertex is the horizontal direction, calculating a second coordinate of an intersection point of the first boundary straight line and each row of pixel rows according to an equation of the first boundary straight line;
determining the number of second-type pixel points in each pixel row according to the second coordinates, wherein the first parameter is the number of first-type pixel points in each pixel row/the number of second-type pixel points in each pixel row;
if the moving direction of the first vertex is the vertical direction, calculating a third coordinate of an intersection point of the first boundary straight line and each column of pixel columns according to an equation of the first boundary straight line;
and determining the number of the second type of pixels in each column of pixels according to the third coordinates, wherein the second parameter is the number of the first type of pixels in each column of pixels/the number of the second type of pixels in each column of pixels.
In some embodiments, the method further comprises:
Assuming that the number of first-class pixel points in each row of pixel rows is w, the number of first-class pixel points in each column of pixel columns is h, a rectangular coordinate system of a light source end is established by taking a point B in a vertex as an origin, the coordinate of the point B is (0, 0), the point A in the vertex is in the vertical direction of the point B, the coordinate of the point A is (0, h-1), the point C in the vertex is in the horizontal direction of the point B, the coordinate of the point C is (w-1, 0), the point D and the point B in the vertex are on a diagonal line of a rectangle formed by the vertices, and the coordinate of the point D is (w-1, h-1);
If the first vertex is point a, the moving direction of point a is horizontal, the coordinates of point a after moving are (x 1, y 1), the first boundary line passes through point a and point B, the equation of the first boundary line is y=k 1x,k1=y1/x1,k=1/k1 =x1/y 1, the second coordinates of the intersection point of the nth row of pixels and the first boundary line are (kn, n), the number of the second type of pixels is w-kn, and the first parameter is w/(w-kn);
If the first vertex is point C, the moving direction of point C is vertical, the coordinates of point C after moving are (x 1, y 1), the first boundary line passes through point B and point C, the equation of the first boundary line is y=k 1x,k1=y1/x1,k=1/k1 =x1/y 1, the third coordinates of the intersection point of the nth column of pixels and the first boundary line are (n, n/k), the number of second type of pixels is h-n/k, and the second parameter is h/(h-n/k).
In some embodiments, altering the display content of each row of pixels according to a first parameter or altering the display content of each column of pixels according to a second parameter comprises:
If the moving direction of the first vertex is the horizontal direction, displaying the display content of the first type of pixel points in the pixel row in the second type of pixel points in the pixel row according to the first parameter from the second coordinate;
And if the moving direction of the first vertex is the vertical direction, displaying the display content of the first type of pixel points in the pixel columns in the second type of pixel points in the pixel columns according to the second parameter from the third coordinate.
In some embodiments, the method further comprises:
If the first vertex is the point a, the moving direction of the point a is the horizontal direction, assuming that the second coordinate is (kn, n), the first parameter is w/(w-kn), the coordinates of the first type pixel points in the nth row of pixels are (0, n), (1, n), (2, n), (3, n), …, (w-1, n), the coordinates of the second type pixel points are (kn, n), (kn+1, n), (kn+2, n), …, (kn+i, n), i is a positive integer, w is a positive integer, kn+i=w-1;
Changing the display content of the second type pixel point in the nth row of pixels according to the first parameter, wherein the first second type pixel point (kn, n) displays the content of the first type pixel point (0, n), the second type pixel point (kn+1, n) displays the content of the first type pixel point (w/(w-kn, n), the third second type pixel point (kn+2, n) displays the content of the first type pixel point (2 w/(w-kn, n), and so on, and the last second type pixel point (kn+i, n) displays the content of the first type pixel point (w-1, n);
If the first vertex is point C, the moving direction of point C is vertical, assuming that the third coordinate is (n, n/k), the second parameter is h/(h-n/k), the coordinates of the first type pixel point in the nth column of pixels are (n, 0), (n, 2), (n, 3), …, (n, h-1), the coordinates of the second type pixel point are (n, n/k), (n, (n/k) +1), (n, (n/k) +2), …, (n, (n/k) +i), i is a positive integer, h is a positive integer, (n/k) +i=h-1;
The display content of the second type pixel point in the nth column of pixels is changed according to the second parameter, the first second type pixel point (n, n/k) displays the content of the first type pixel point (n, 0), the second type pixel point (n, (n/k) +1) displays the content of the first type pixel point (n, h/(h-k)), the third second type pixel point (n, (n/k) +2) displays the content of the first type pixel point (n, 2 h/(h-k)), and so on, and the last second type pixel point (n, (n/k) +i) displays the content of the first type pixel point (n, h-1).
In some embodiments, the method further comprises:
If the coordinates of the first type of pixel points corresponding to the second type of pixel points are not integers, the coordinates are adjusted to integers according to the first method, and the pixel values of the first type of pixel points which do not belong to the second type of pixel points are set as first pixel values.
In a second aspect, an embodiment of the present invention provides an anti-distortion device, applied to a head-up display system, where the head-up display system includes a light source end, the anti-distortion device includes:
The mobile unit is used for receiving the first information, and moving a first vertex of the light source end according to the first information to obtain a first coordinate after the first vertex moves;
a first calculation unit for determining an equation of a first boundary line passing through the first vertex based on the first coordinates;
A second calculation unit, configured to determine a first parameter of each row of pixels or a second parameter of each column of pixels according to an equation of the first boundary line;
A changing unit, configured to change the display content of each row of pixels according to a first parameter, or change the display content of each column of pixels according to a second parameter;
The receiving unit is used for receiving the second information, repeating the operation on the vertexes of the light source end according to the second information so as to change the display content of each row of pixels or the display content of each column of pixels, wherein the vertexes comprise first vertexes;
And the storage unit is used for receiving the third information, finishing the anti-distortion operation and storing the anti-distortion information.
In a third aspect, an embodiment of the present invention provides a head-up display system, including:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the anti-aliasing method as in the first aspect.
In a fourth aspect, embodiments of the present invention provide a non-volatile computer-readable storage medium having stored thereon computer-executable instructions for causing a terminal to perform the anti-distortion method as in the first aspect.
The embodiment of the invention has the beneficial effects that: in comparison with the prior art, the embodiment of the invention provides an anti-distortion method, which is applied to a terminal and comprises the following steps: receiving first information, and moving a first vertex of the light source end according to the first information to obtain a first coordinate after the first vertex moves; determining an equation of a first boundary line of the moved first vertex according to the first coordinates; determining a first parameter of each row of pixels or a second parameter of each column of pixels according to an equation of the first boundary line; changing the display content of each row of pixels according to the first parameter or changing the display content of each column of pixels according to the second parameter; receiving second information, repeating the operation on the vertexes of the light source end according to the second information so as to continuously change the display content of each row of pixel rows or the display content of each column of pixel columns, wherein the vertexes comprise first vertexes; and receiving the third information, finishing the anti-distortion operation and storing the anti-distortion information. The anti-distortion is realized by adjusting the position of a single vertex multiple times, the operation of the anti-distortion is simplified, and new distortion is not generated.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures of the drawings are not to be taken in a limiting sense, unless otherwise indicated.
Fig. 1 is a schematic diagram of an application scenario of an anti-distortion method provided in an embodiment of the present invention;
FIG. 2 is a schematic flow chart of an anti-distortion method according to an embodiment of the present invention;
FIG. 3 is a detailed flow chart of an anti-distortion method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a horizontal movement of a first vertex of a light source end according to an anti-distortion method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating a change of a frame displayed by the projection end corresponding to FIG. 4;
fig. 6 is a schematic view illustrating a vertical movement of a first vertex of a light source end according to an anti-distortion method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of an anti-distortion device according to an embodiment of the present invention;
Fig. 8 is a schematic structural diagram of a head-up display system according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic view of an application scenario of an anti-distortion method according to an embodiment of the present invention;
As shown in fig. 1, the application scenario is a light source end 10 of a head-up display system, where the light source end 10 includes: line 1, line 2, line 3, line 4, line 5.
The Head-up Display system is also called as Head-up Display system (HUD), which displays automobile driving auxiliary information, navigation information, inspection control information and the like on windshield glass or above the tip of engine cover in a projection mode by utilizing an optical reflection principle, is convenient for a driver to watch, can Display warning information from each driving auxiliary system, such as lane departure warning, pedestrian avoidance warning from the night vision auxiliary system with a pedestrian recognition function and the like, avoids the driver from frequently looking down at an instrument or a vehicle-mounted screen in the driving process, and plays a good auxiliary role for driving safety. The head-up display system includes: windscreen-image head-up display systems, front-end reflective screen head-up display systems, free-form surface head-up display systems, etc.
The light source end 10 of the head-up display system is composed of a plurality of small pixels, such as a plurality of small squares in fig. 1, each square is a pixel, and the whole picture is composed of the pixels. The positions of the pixels are fixed, the positions of the pixels cannot be changed physically, and only the content displayed by the pixels can be changed, for example, the whole content displayed by the line 2 is displayed at the position of one pixel on the right side of the line 2, and then the display of the whole image is moved to the right.
In the structure of the actual head-up display system, since the mounting tolerance in the optical path structure, the mirror surface type, etc. cannot be realized in accordance with the theoretical value, the image formed on the front windshield (i.e., on the projection end) after the image emitted from the light source end 10 is reflected by various mirrors on the optical path may be deformed, that is, distorted.
In order to make the display result meet the expectations, a certain offset needs to be made on the pixel point of the light source for normal display, such as line 3, and in an ideal situation, the line 3 on the light source end 10 should be the shape and orientation of the line 3 after being projected onto the projection end, but the final projection result of the line 3 on the light source end 10 may be as shown by line 4 due to the distortion. It is therefore necessary to change the shape and position of the line 3, for example, to move the line 3 in the light source end 10 to the position of the line 5, so that the display result of the projection end is changed from the line 4 to the line 3. That is, the line 3 is manually adjusted to the state of the line 5 at the light source end 10, so that the picture displayed on the projection end is changed from the line 4 to the line 3. The image displayed on the light source end 10 before the anti-distortion is normal, the image displayed on the light source end 10 after the anti-distortion is abnormal, but the image displayed on the projection end is changed from the original abnormal to the normal.
Referring to fig. 2, fig. 2 is a schematic flow chart of an anti-distortion method according to an embodiment of the invention;
As shown in fig. 2, the anti-distortion method is applied to a head-up display system, wherein the head-up display system comprises a light source end, and the method comprises the following steps:
step S101: receiving first information, and moving a first vertex of the light source end according to the first information to obtain a first coordinate after the first vertex moves;
Specifically, the first information is movement information of the vertex of the light source end, including a movement distance and a movement direction of the moved vertex. Because the image displayed on the light source end is undistorted before adjustment, the image on the light source end can be considered to be a regular rectangle, the vertexes of the light source end are four vertexes of the rectangle, that is, the pixels of the default light source end are not offset under the condition that distortion correction is not carried out, that is, all pixel offset amounts are 0. The left and right borders of the rectangle are parallel with no intersection therebetween, and the upper and lower borders of the rectangle are parallel with no intersection therebetween.
In the embodiment of the invention, if the head-up display system is applied to a vehicle, the first information may be sent by a vehicle driver, and the vehicle driver selects a severely distorted vertex to adjust by observing the front windshield, that is, the image on the projection end, and the vehicle driver may input the distance and direction in which the vehicle driver wants to move the vertex by means of a key or the like.
After receiving the first information, the head-up display system moves the corresponding vertex on the light source end, namely, the first vertex, and it can be understood that if a user observes the projection end and finds that the distortion of the point A is serious, the user inputs the first information to move the point A, the point A (the first vertex) on the light source end actually moves, coordinates of the point A on the light source end after the point A moves can be obtained, and the moving direction of the first vertex comprises a horizontal direction and a vertical direction.
In the embodiment of the present invention, before step S101, the method further includes:
Establishing a rectangular coordinate system at the light source end, determining coordinates of vertexes in the light source end, wherein the vertexes comprise a first vertex, a second vertex and a third vertex, the first vertex is adjacent to the second vertex and the third vertex, the second vertex is in the vertical direction of the first vertex, the third vertex is in the horizontal direction of the first vertex, and the fourth vertex is in the diagonal direction of the first vertex.
Further, it is also necessary to determine the number of first-type pixels on each row and each column of the first-vertex-moving front light source end, where the first-type pixels are pixels for displaying the content of the picture, and since the image displayed on the first-vertex-moving front light source end is a matrix if it is undistorted by default, the number of first-type pixels on each row is equal, and the number of first-type pixels on each column is also equal. If the number of pixel points in each row is w, the number of pixel points in each column is h, a rectangular coordinate system of a light source end is established by taking a point B in a vertex as an origin, the coordinates of the point B are (0, 0), the coordinates of a point A in the vertex are in the vertical direction of the point B, the coordinates of the point A are (0, h-1), the coordinates of a point C in the vertex are in the horizontal direction of the point B, the coordinates of the point C are (w-1, 0), the coordinates of a point D and the point B in the vertex are on the diagonal line of a rectangle formed by the vertices, and the coordinates of the point D are (w-1, h-1), and it is required to be explained that if the first vertex is the point A, the point C is in the diagonal direction of the point A, namely the point C is a fourth vertex;
step S102: determining an equation of a first boundary line of the moved first vertex according to the first coordinates;
Specifically, if the moving direction is a horizontal direction, determining an equation of a first boundary line according to the first coordinate and the coordinate of the second vertex; if the moving direction is the vertical direction, determining an equation of a first boundary straight line according to the first coordinate and the coordinate of the third vertex.
In the embodiment of the present invention, if the first vertex is the point a, the moving direction of the point a is the horizontal direction, and the coordinates of the point a after moving are (x 1, y 1), the first boundary line passes through the point a and the point B, and the equation of the first boundary line is y=k 1x,k1=y1/x1,k=1/k1 =x1/y 1.
In the embodiment of the present invention, if the first vertex is point C, the moving direction of point C is the vertical direction, and the coordinates of point C after moving are (x 1, y 1), the first boundary line passes through point B and point C, and the equation of the first boundary line is y=k 1x,k1=y1/x1,k=1/k1 =x1/y 1.
Step S103: determining a first parameter of each row of pixels or a second parameter of each column of pixels according to an equation of the first boundary line;
Specifically, the light source end includes a first type of pixel point and a second type of pixel point, where the number of the first type of pixel points on each row of pixel lines or each column of pixel columns is known, the second type of pixel point is a pixel point whose display content needs to be changed according to a first parameter or a second parameter, and determining the first parameter of each row of pixel lines or the second parameter of each column of pixel columns according to an equation of a first boundary line includes:
If the moving direction of the first vertex is the horizontal direction, calculating a second coordinate of an intersection point of the first boundary straight line and each row of pixel rows according to an equation of the first boundary straight line;
determining the number of second-type pixel points in each pixel row according to the second coordinates, wherein the first parameter is the number of first-type pixel points in each pixel row/the number of second-type pixel points in each pixel row;
further, determining the number of the second type of pixel points in each row of pixels according to the second coordinates includes:
The first vertex is adjacent to the second vertex and the third vertex, the second vertex is in the vertical direction of the first vertex, the third vertex is in the horizontal direction of the first vertex, the fourth vertex is in the diagonal direction of the first vertex, and a rectangular coordinate system is established by taking the second vertex or the third vertex as an origin, in the embodiment of the invention, if the first vertex moves in the horizontal direction, the rectangular coordinate system is preferably established by taking the second vertex in the vertical direction as the origin;
If the abscissa value of the second coordinate corresponding to the pixel row is smaller than the maximum abscissa value of the first type pixel points on the pixel row, the number of the second type pixel points in the pixel row is the number of the first type pixel points on the pixel row minus the abscissa value of the second coordinate;
If the abscissa value of the second coordinate corresponding to the pixel row is greater than the maximum abscissa value of the first type pixel points on the pixel row, the number of the second type pixel points in the pixel row is equal to the abscissa value of the second coordinate plus one.
If the moving direction of the first vertex is the vertical direction, calculating a third coordinate of an intersection point of the first boundary straight line and each column of pixel columns according to an equation of the first boundary straight line;
and determining the number of the second type of pixels in each column of pixels according to the third coordinates, wherein the second parameter is the number of the first type of pixels in each column of pixels/the number of the second type of pixels in each column of pixels.
Further, determining the number of the second type of pixel points in each column of pixels according to the second coordinates includes:
The first vertex is adjacent to the second vertex and the third vertex, the second vertex is in the vertical direction of the first vertex, the third vertex is in the horizontal direction of the first vertex, the fourth vertex is in the diagonal direction of the first vertex, and a rectangular coordinate system is established by taking the second vertex or the third vertex as an origin;
If the ordinate value of the second coordinate corresponding to the pixel column is smaller than the maximum ordinate value of the first type pixel points on the pixel column, the number of the second type pixel points in the pixel column is the number of the first type pixel points on the pixel column minus the ordinate value of the second coordinate, in the embodiment of the invention, if the first vertex moves in the vertical direction, a rectangular coordinate system is preferably established by taking the third vertex in the horizontal direction as the origin; ;
If the ordinate value of the second coordinate corresponding to the pixel row is greater than the maximum ordinate value of the first type pixel points on the pixel row, the number of the second type pixel points in the pixel row is one more than the ordinate value of the second coordinate.
Further, assuming that the number of first-type pixel points in each row of pixel rows is w, the number of first-type pixel points in each column of pixel columns is h, a rectangular coordinate system of a light source end is established by taking a point B in a vertex as an origin, the coordinate of the point B is (0, 0), the point A in the vertex is in the vertical direction of the point B, the coordinate of the point A is (0, h-1), the point C in the vertex is in the horizontal direction of the point B, the coordinate of the point C is (w-1, 0), the point D and the point B in the vertex are on a diagonal line of a rectangle formed by the vertexes, and the coordinate of the point D is (w-1, h-1);
If the first vertex is point a, the moving direction of point a is horizontal, the coordinates of point a after moving are (x 1, y 1), x1 < (w-1), the first boundary line passes through point a and point B, the equation of the first boundary line is y=k 1x,k1=y1/x1,k=1/k1 =x1/y 1, the second coordinates of the intersection point of the nth row of pixel lines and the first boundary line are (kn, n), the number of the second type of pixel points is w-kn, and the first parameter is w/(w-kn);
If the first vertex is point C, the moving direction of point C is vertical, the coordinates of point C after moving are (x 1, y 1), y1 < (h-1), the first boundary line passes through point B and point C, the equation of the first boundary line is y=k 1x,k1=y1/x1,k=1/k1 =x1/y 1, the third coordinates of the intersection point of the nth column of pixels and the first boundary line are (n, n/k), the number of the second type of pixels is h-n/k, and the second parameter is h/(h-n/k).
Step S104: changing the display content of each row of pixels according to the first parameter or changing the display content of each column of pixels according to the second parameter;
altering the display content of each row of pixels according to a first parameter or altering the display content of each column of pixels according to a second parameter, comprising:
If the moving direction of the first vertex is the horizontal direction, displaying the display content of the first type of pixel points in the pixel row in the second type of pixel points in the pixel row according to the first parameter from the second coordinate;
And if the moving direction of the first vertex is the vertical direction, displaying the display content of the first type of pixel points in the pixel columns in the second type of pixel points in the pixel columns according to the second parameter from the third coordinate.
Further, if the first vertex is the point a, the moving direction of the point a is the horizontal direction, assuming that the second coordinate is (kn, n), the first parameter is w/(w-kn), the coordinates of the first type pixel points in the nth row of pixels are (0, n), (1, n), (2, n), (3, n), …, (w-1, n), the coordinates of the second type pixel points are (kn, n), (kn+1, n), (kn+2, n), …, (kn+i, n), i is a positive integer, w is a positive integer, kn+i=w-1;
Changing the display content of the second type pixel point in the nth row of pixels according to the first parameter, wherein the first second type pixel point (kn, n) displays the content of the first type pixel point (0, n), the second type pixel point (kn+1, n) displays the content of the first type pixel point (w/(w-kn, n), the third second type pixel point (kn+2, n) displays the content of the first type pixel point (2 w/(w-kn, n), and so on, and the last second type pixel point (kn+i, n) displays the content of the first type pixel point (w-1, n);
If the first vertex is point C, the moving direction of point C is vertical, assuming that the third coordinate is (n, n/k), the second parameter is h/(h-n/k), the coordinates of the first type pixel point in the nth column of pixels are (n, 0), (n, 2), (n, 3), …, (n, h-1), the coordinates of the second type pixel point are (n, n/k), (n, (n/k) +1), (n, (n/k) +2), …, (n, (n/k) +i), i is a positive integer, h is a positive integer, (n/k) +i=h-1;
The display content of the second type pixel point in the nth column of pixels is changed according to the second parameter, the first second type pixel point (n, n/k) displays the content of the first type pixel point (n, 0), the second type pixel point (n, (n/k) +1) displays the content of the first type pixel point (n, h/(h-k)), the third second type pixel point (n, (n/k) +2) displays the content of the first type pixel point (n, 2 h/(h-k)), and so on, and the last second type pixel point (n, (n/k) +i) displays the content of the first type pixel point (n, h-1).
Further, if the coordinates of the first type of pixel points corresponding to the second type of pixel points are not integers, the coordinates are adjusted to integers according to the first method, and the pixel values of the first type of pixel points which do not belong to the second type of pixel points are set as the first pixel values.
Specifically, taking the first vertex as the point a, the moving direction of the point a as the horizontal direction as an example, assuming that the coordinates of the first type pixel point of the last row (the row at the bottom of the screen) are (0, n), (1, n), (2, n), (3, n,) …, (w-1, n), the coordinates of the first vertex a move from (0, h) to (x, h), then the coordinates of the first type pixel point on the last row are from (0, n) to (w-1, n), w in total, and the coordinates of the second type pixel point on the last row are from (x, n) to (w-1, n) in total. The pixel points on the left side of the x-1 th pixel point in the last row are the first type of pixel points which do not belong to the second type of pixel points, and can be called third type of pixel points, the pixel values of the third type of pixel points are set to be the first pixel values (in the embodiment of the invention, the x coordinate of the third type of pixel points can be changed to be-1 to represent black.
Further, the first method may be a rounding method, coordinates of the pixel points of the row before the movement are (0, n), (1, n), (2, n), (3, n), (4, n), each pixel point displays a letter, abcde, coordinates of the pixel points of the second type after the movement of the point a to (1, n) are (1, n), (2, n), (3, n), (4, n), the first parameter is 5/4=1.25, then the pixel points of the first type after the movement are displayed (1, n) the content of the pixel points of the first type (0, n), the pixel points of the first type after the movement are displayed (2, n) the content of the pixel points of the first type (1, n) after the rounding is displayed, the pixel points of the first type after the movement are displayed (3, n) the pixel points of the first type after the rounding is displayed (2.5, n), the pixel points of the first type after the rounding (4, n) display the content of the pixel points of the first type (4, n) are displayed, and then the pixel points of the first type after the movement are displayed (4, n) the black content of the pixel points (2, n) are displayed for the final display of the first line (2, n) and the content of the pixel points of the first line (2, n) is displayed.
Wherein, the content of the second type pixel point displaying the first type pixel point means that the pixel value of the second type pixel point is set to be the same as the corresponding first type pixel point, for example: the pixel point corresponding to the point (0, n) displays the letter a, and the corresponding pixel value is (10, 20, 30), so that the content of the pixel point (0, n) of the original first type displayed by the point (1, n) after the movement refers to that the pixel value of the pixel point on the point (1, n) is replaced by (10, 20, 30).
Step S105: and receiving the second information, repeating the operation on the vertexes of the light source end according to the second information so as to continuously change the display content of each row of pixel rows or the display content of each column of pixel columns, wherein the vertexes comprise the first vertexes.
Specifically, in the embodiment of the present invention, only one of 4 vertexes in the light source end is moved at a time, the movement direction is a horizontal direction or a vertical direction, when a certain vertex is moved once, the movement of the vertex can be continued, or another 3 vertexes can be moved, and the second information is the same as the first information, including the moved vertex and the movement distance and movement direction of the moved vertex. The operations in steps S101-S104 are repeated after receiving the second information to continue the anti-distortion operation.
Step S106: receiving third information, finishing the anti-distortion operation and storing the anti-distortion information;
Specifically, when the user judges that the image on the projection end has no distortion or no obvious distortion, the third information can be sent by means of a key or a mobile phone APP, so that the head-up display system can complete the anti-distortion operation and store the anti-distortion information. The step of storing the anti-distortion information refers to storing the coordinates after the movement of all the moving vertexes and the corresponding first parameters and second parameters so as to automatically adjust the picture of the image input to the light source end according to the stored anti-distortion information.
For example, the coordinates of the point a before moving are (x, y), the default image size of the light source end is 10cm x 10cm, the coordinates of the point a after the anti-distortion are (x 1, y 1), the first parameter is a, the second parameter is b, the image size on the light source end becomes 9cm x 9cm, then the vertex a of the image on the subsequent input light source end is automatically moved from the coordinates (x, y) to (x 1, y 1), the display content of the pixel points in each row and each column on the light source end is changed according to the first parameter and the second parameter corresponding to the point a, so that the image size on the light source end is automatically adjusted to 9cm x 9cm, and it is required to be explained that the first parameter and the second parameter are stored by using different channels and do not interfere with each other.
Referring to fig. 3 again, fig. 3 is a detailed flow chart of an anti-distortion method according to an embodiment of the invention;
as shown in fig. 3, the anti-distortion method is applied to a head-up display system, wherein the head-up display system comprises a light source end, and the method comprises the following steps:
Step S201: receiving mobile information;
Specifically, the movement information includes first information and second information, including moved vertex information (i.e., which of 4 vertices is moved), movement direction information of the moved vertex (horizontal movement or vertical movement, which is divided into horizontal leftward movement and horizontal upward movement, which is divided into vertical upward and vertical downward movement), movement distance information of the moved vertex (in units of pixel points, representing how many pixel points the vertex is moved), wherein the movement information is determined by a user observing distortion conditions of an image of the projection end, and in the embodiment of the present invention, the user can first select the vertex to be moved according to a key and then input the movement direction and movement distance of the vertex to transmit the movement information to the terminal.
Step S202: moving the vertex of the light source end according to the movement information to obtain coordinates after the vertex moves;
The specific step S101 is not described herein.
Step S203: determining an equation of a first boundary line of the moved vertex;
the specific step S102 is not described herein.
Step S204: determining a first parameter of each row of pixels or a second parameter of each column of pixels according to an equation of the first boundary line;
The specific step S103 is not described herein.
Step S205: changing the display content of each row of pixels according to the first parameter or changing the display content of each column of pixels according to the second parameter;
The specific step S104 is not described herein.
Step S206: whether the movement information is received again;
Specifically, if the movement information is received again, that is, the second information is received in step S105, the above operation is repeated for the vertices of the light source end according to the second information, so as to continuously change the display content of each row of pixels or the display content of each column of pixels, where the vertices include the first vertex. The specific step S105 is not described herein, where receiving the movement information again represents that the user determines that the effect of the anti-distortion has not reached the expected level, and needs to perform the anti-distortion again to move the vertex.
Further, if the movement information is not received again, the user is represented to judge that the effect of the anti-distortion reaches the expectations.
If the movement information is received again, step S202 is executed;
If the movement information is not received again, step S207 is performed.
Step S207: receiving the ending anti-distortion information;
specifically, this step is equivalent to the user judging whether to end the anti-distortion, and the user can send an instruction for ending the anti-distortion through a key or a mobile phone APP to end the anti-distortion.
If the end anti-distortion information is not received, executing step S206;
If the end anti-distortion information is received, executing step S208;
Step S208: finishing the anti-distortion operation and storing the anti-distortion information;
the specific steps are the same as S106, and will not be described here again.
Referring to fig. 4 again, fig. 4 is a schematic diagram illustrating a horizontal movement of a first vertex of a light source end of an anti-distortion method according to an embodiment of the present invention;
As shown in fig. 4, the light source end 20 includes an image 21 before moving the first vertex (point a) and an image 22 after moving the first vertex (point a), and the image displayed by the light source end 10 after moving the first vertex is changed from a regular image 21 to an irregular image 22.
Assuming that the number of pixels in each row is w, the number of pixels in each column is h, a coordinate system is established by taking a point B as an origin, a vector BA as a positive Y axis, a vector BC as a positive X axis, coordinates (0, h-1) before moving the point A, coordinates (0, 0) of the point B, coordinates (w-1, 0) of the point C, and coordinates (w-1, h-1) of the point D;
moving the point A to (x 1, y 1), wherein x1 and y1 are integers, the point A is adjacent to the point B and the point D respectively, and the two points determine a straight line, so that the equation of the straight line AB and the straight line AD can be obtained, namely knowing the coordinates of any point on the AB and AD lines, and the first boundary straight line is AB because of horizontal movement, and the equation of the straight line AB is y=k 1x,k1=y1/x1,k=1/k1 =x1/y 1;
The intersection point of the n-th line after the movement of the point a and the straight line AB is (kn, n), k=x1/y 1. Because the pixel points from (0, n) to (w-1, n) are the first type of pixel points, the pixel points from (kn, n) to (w-1, n) after the point A moves are the second type of pixel points, that is, the pixel points on the left side of the (kn, n) coordinate on the n-th row are the first type of pixel points which do not belong to the second type of pixel points, the displayed content of the pixel points from (kn, n) to (w-1, n) needs to be set to black, the displayed content of the pixel points on the left side of the (kn, n) coordinate is replaced by the displayed content of the pixel points on the left side of the (kn, n) coordinate on the n-th row, the displayed content on the right side of the (kn, n) coordinate on the n-th row needs to be changed, that is, the number of the first type of pixel points on the n-th row is w, kn < (w-1), the first parameter is w/(w-n), and the ratio of the first parameter to the last type of pixel points on the n-th row and the last pixel point on the first row is the last pixel point;
The display content of the pixel point on the right side of the straight line AB needs to be changed according to a first parameter so as to realize compression or stretching of a projection picture (if w > (w-kn) is compression, w < (w-kn) is stretching), the second coordinate of the intersection point of the first boundary straight line and the nth row of pixels is (kn, n), the display content of the second coordinate (kn, n) increasing to the right side is the display content of the first type of pixels on the row before the point A moves, but the display content of some first type of pixels needs to be deleted or copied according to the first parameter.
For example, assume that the last row of the nth row, i.e., the pixels on the row all have coordinates equal to h on the ordinate, the pixels on the row have coordinates of (0, n), (1, n), (2, n), (3, n), …, (w-1, n), n=h. The coordinates of a are moving from (0, h) to (x, h), k=x/h. The pixel values of the pixels to the left of the x-th pixel on the last line should be set to black, and the x-axis coordinates of these pixels may be changed to-1 to be set to black, for example (-1, h), since the x-axis coordinates of the pixels to the left of the coordinates (x, h) are changed to-1, the coordinates (x, h) should be changed to (0, h), the coordinates of the pixels of the last line may be described as (-1, h), …, (0, h), …, (w-1, h), and a total of x pixels before (0, h). (0, h), …, (w-1, h) for a total of w-x pixels, the first parameter being w/(w-x), the last row of pixels displaying content (-1, h), …, (0, h), (w/(w-x), h), (2 w/(w-x), h), …, (w-1, h) after de-distortion according to the first parameter.
For example, w=7, the coordinates of the pixel point in the last row before the anti-distortion are (0, h), (1, h), (2,h), (3, h), (4,h), (5, h), (6,h), the pixel point corresponding to the coordinates (0, h) is called the first pixel point, the pixel point corresponding to the coordinates (6,h) is the 7 th pixel point, the coordinates after the movement of the a point are (3, h), the first parameter is 7/4=1.75, the content displayed by the pixel points in the last row after the anti-distortion is (-1, h), (0, h), (1.75, h), (3.5, h), (6,h), the coordinates corresponding to the displayed content are rounded up to be (-1, h), (0, h), (2,h), (4,h), (6,h), namely, the first pixel point, the second pixel point and the third pixel point are changed to the original content of the fifth pixel point, the first pixel point and the fifth pixel point are the original content of the fifth pixel point, the original content of the fifth pixel point is changed, the original content of the fifth pixel point is displayed, the seventh pixel displays the content originally displayed by the seventh pixel. Note that, the content of displaying another pixel by the pixel means that the pixel value of the pixel is replaced by the pixel value of another pixel, for example, the pixel value of the original first pixel is (20, 26, 95), and the content of displaying the original first pixel by the fourth pixel means that the pixel value of the fourth pixel is changed to (20, 26, 95).
Referring to fig. 5, fig. 5 is a schematic diagram illustrating a change of a frame displayed by the projection end corresponding to fig. 4;
as shown in fig. 5, the projection end 30 includes an image 21 corresponding to the vertex of the light source end 20 before moving and an image 22 corresponding to the vertex of the light source end 20 after moving;
Specifically, the user observes the image 31 in fig. 5, determines the vertex with the most serious anti-distortion as the point a, sends the first information to move the point a by means of a key or the like, and after the first information is received by the processor of the head-up display system, the point a on the image 21 on the light source end 20 is moved, the image on the light source end 20 is changed from the image 21 to the image 22, and the image on the projection end 30 is changed from the image 31 to the image 32. By moving only one vertex, the image on the projection end successfully eliminates distortion, realizes anti-distortion operation, reduces the complexity of the anti-distortion operation, and is convenient for users to use.
Referring to fig. 6 again, fig. 6 is a schematic view illustrating a vertical movement of a first vertex of a light source end of an anti-distortion method according to an embodiment of the present invention;
As shown in fig. 6, the light source end 40 includes an image 41 before moving the first vertex (point C) and an image 42 after moving the first vertex (point C), and the image displayed by the light source end 40 after moving the first vertex is changed from a regular image 41 to an irregular image 42.
Assuming that the number of pixels in each row in the image 41 is w, the number of pixels in each column is h, a coordinate system is established by taking a point B as an origin, a vector BA as a positive Y axis, a vector BC as a positive X axis, coordinates of a point A as (0, h-1), coordinates of a point B as (0, 0), coordinates of a point C before moving as (w-1, 0), and coordinates of a point D as (w-1, h-1);
Moving point C to (x 1, y 1), wherein x1 and y1 are integers, point C is connected with point B and point D respectively, and since two points determine a straight line, equations of straight line BC and straight line CD can be obtained, that is, coordinates of any point on the straight line BC and the straight line CD are known, and since the straight line BC is vertically moved, the first boundary straight line is straight line BC, and equations of straight line BC are y=k 1x,k1=y1/x1,k=1/k1 =x1/y 1;
The intersection point of the n-th column after the movement of the C point and the first boundary line BC is (n, n/k), k=x1/y 1. Because the pixel points on (n, 0) to (n, h-1) are the first type of pixel points, the pixel points on (n, n/k) to (n, h-1) are the second type of pixel points after the C point moves, that is to say, the pixel points above the (n, n/k) coordinates are the first type of pixel points which do not belong to the second type of pixel points, the content displayed by the pixel points above the (n, n/k) coordinates on the light source end all need to be set to black, the content displayed by the second type of pixel points on the coordinates (n, n/k) to (n, h-1) on the nth column is replaced by the content displayed by the first type of pixel points, so that the content displayed by the pixel points below the coordinates (n, n/k) needs to be changed, namely, the number of h-n/k pixel points above the (n, n/k) is the first type of pixel points on the nth column, the number h < (n/k) is the number h < (n/h) and the number h 1), and the ratio between the second parameter and the first type of pixel points on the nth column and the last pixel point is the last parameter representing the first type of pixel points;
the display content of the pixel points below the straight line BC needs to be changed according to a second parameter so as to realize compression or stretching of a projection picture (if h > (h-n/k) is compression, h < (h-n/k) is stretching), a third coordinate of an intersection point of the first boundary straight line and the nth column of pixel columns is (n, n/k), and the display content of the third coordinate (n, n/k) which is gradually increased downwards is the display content of the first type of pixel points on the columns before the C point moves, but the display content of some first type of pixel points needs to be deleted or copied according to the second parameter.
For example, let n be the last column, i.e., the pixels on the column all have the abscissa equal to w, and the pixels on the column have the coordinates of (n, 0), (n, 1), (n, 2), (n, 3) … (n, h-1), n=w. The coordinates of C are moving from (w, 0) to (w, y), k=w/y. The pixel values of the pixels above the y-th pixel on the last column should be set to black, and the y-axis coordinates of the pixels can be changed to-1 to be set to black, for example, to (w-1), and since the y-axis coordinates of the pixels above the coordinates (w, y) are changed to-1, the coordinates (w, y) should be changed to (w, 0), the coordinates of the pixels of the last column can be described as (w-1), (w-1) … (w, h-1), (w, 0) … (w, h-1), and a total of x pixels above. (w, 0) … (w, h-1) for a total of h-x pixels, and the last column of pixels after the anti-distortion shows (w, -1), (w, -1), (w, -1) … (w, 0) (w, h/(h-y)) (w, 2 h/(h-y)) … (w, h-1).
For example, h=7, the coordinates of the pixel point in the last column before the anti-distortion are (w, 0), (w, 1), (w, 2), (w, 3), (w, 4), (w, 5), (w, 6), the pixel point corresponding to the coordinates (w, 1) is called the first pixel point, the pixel point corresponding to the coordinates (w, 7) is the 7 th pixel point, the coordinates after the movement of the C point are (w, 3), the second parameter is 7/4=1.75, the content displayed by each pixel point in the last column after the movement of the C point is (w, -1), (w, -1), (w, 0), (w, 1.75), (w, 3.5), (w, 6), the coordinates corresponding to the displayed content are rounded to be processed, the processed is (w, -1), (w, -1), (w, 0), (w, 2), (w, 4), (w, 6), that is, the pixel value of the first pixel point, the second pixel point, the pixel value of the third pixel point is the original content displayed by the first pixel point is the first pixel value, the first pixel value is the original content of the fifth pixel point, the original content is the fifth pixel value is the original content displayed by the fifth pixel point, the original content is displayed by the fifth pixel value of the fifth pixel point, and the original content is displayed by the fifth pixel value, the seventh pixel displays the content originally displayed by the seventh pixel. Note that, the content of displaying another pixel by the pixel means that the pixel value of the pixel is replaced by the pixel value of another pixel, for example, the pixel value of the original first pixel is (20, 26, 95), and the content of displaying the original first pixel by the fourth pixel means that the pixel value of the fourth pixel is changed to (20, 26, 95).
Referring to fig. 7, fig. 7 is a schematic structural diagram of an anti-distortion device according to an embodiment of the present invention;
As shown in fig. 7, the anti-distortion device 50 is applied to a head-up display system including a light source end, and the anti-distortion device includes:
A moving unit 51, configured to receive the first information, move the first vertex of the light source end according to the first information, and obtain a first coordinate after the first vertex is moved;
a first calculation unit 52 for determining an equation of a first boundary line passing through the first vertex based on the first coordinates;
A second calculation unit 53 for determining a first parameter of each row of pixels or a second parameter of each column of pixels according to an equation of the first boundary line;
a changing unit 54 for changing the display content of each row of pixels according to the first parameter or changing the display content of each column of pixels according to the second parameter;
A receiving unit 55, configured to receive the second information, and repeat the above operations on the vertices of the light source end according to the second information, so as to change the display content of each row of pixels or the display content of each column of pixels, where the vertices include the first vertex;
and a storage unit 56 for receiving the third information, completing the anti-distortion operation and storing the anti-distortion information.
In an embodiment of the present invention, the anti-distortion device further includes a coordinate system establishing unit, specifically configured to: establishing a rectangular coordinate system at the light source end, determining coordinates of vertexes in the light source end, wherein the vertexes comprise a first vertex, a second vertex and a third vertex, the first vertex is adjacent to the second vertex and the third vertex, the second vertex is in the vertical direction of the first vertex, and the third vertex is in the horizontal direction of the first vertex.
In an embodiment of the present invention, the anti-distortion device further includes a first boundary line determining unit, specifically configured to: the first information comprises a moving direction of the first vertex, and if the moving direction is a horizontal direction, an equation of a first boundary straight line is determined according to the first coordinate and the coordinate of the second vertex; if the moving direction is the vertical direction, determining an equation of a first boundary straight line according to the first coordinate and the coordinate of the third vertex.
In the embodiment of the present invention, the light source end includes a first type of pixel points and a second type of pixel points, where the number of the first type of pixel points on each row of pixel lines or each column of pixel columns is known, and the second type of pixel points are pixel points that need to change display content according to a first parameter or a second parameter, and the second computing unit 53 is specifically configured to: determining a first parameter for each row of pixels or a second parameter for each column of pixels according to the equation for the first boundary line, comprising: if the moving direction of the first vertex is the horizontal direction, calculating a second coordinate of an intersection point of the first boundary straight line and each row of pixel rows according to an equation of the first boundary straight line; determining the number of second-type pixel points in each pixel row according to the second coordinates, wherein the first parameter is the number of first-type pixel points in each pixel row/the number of second-type pixel points in each pixel row; if the moving direction of the first vertex is the vertical direction, calculating a third coordinate of an intersection point of the first boundary straight line and each column of pixel columns according to an equation of the first boundary straight line; and determining the number of the second type of pixels in each column of pixels according to the third coordinates, wherein the second parameter is the number of the first type of pixels in each column of pixels/the number of the second type of pixels in each column of pixels.
In the embodiment of the present invention, the modification unit 54 is specifically configured to: if the moving direction of the first vertex is the horizontal direction, displaying the display content of the first type of pixel points in the pixel row in the second type of pixel points in the pixel row according to the first parameter from the second coordinate; and if the moving direction of the first vertex is the vertical direction, displaying the display content of the first type of pixel points in the pixel columns in the second type of pixel points in the pixel columns according to the second parameter from the third coordinate.
In the embodiment of the present invention, the anti-distortion device 50 further includes a setting unit, specifically configured to: if the coordinates of the first type of pixel points corresponding to the second type of pixel points are not integers, the coordinates are adjusted to integers according to the first method, and the pixel values of the first type of pixel points which do not belong to the second type of pixel points are set as first pixel values.
Since the apparatus embodiments and the method embodiments are based on the same concept, on the premise that the contents do not conflict with each other, the contents of the apparatus embodiments may refer to the method embodiments, which are not described herein.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a head-up display system according to an embodiment of the invention.
As shown in fig. 8, the head-up display system 60 includes: one or more processors 61 and a memory 62, one processor 61 being exemplified in fig. 8.
The Head-up Display system is also called as Head-up Display system (HUD), which displays automobile driving auxiliary information, navigation information, inspection control information and the like on windshield glass or above the tip of engine cover in a projection mode by utilizing an optical reflection principle, is convenient for a driver to watch, can Display warning information from each driving auxiliary system, such as lane departure warning, pedestrian avoidance warning from the night vision auxiliary system with a pedestrian recognition function and the like, avoids the driver from frequently looking down at an instrument or a vehicle-mounted screen in the driving process, and plays a good auxiliary role for driving safety. The head-up display system includes: windscreen-image head-up display systems, front-end reflective screen head-up display systems, free-form surface head-up display systems, etc.
The processor 61 and the memory 62 may be connected by a bus or otherwise, which is illustrated in fig. 8 as a bus connection.
The processor 61 receives the first information, and moves the first vertex of the light source end according to the first information to obtain a first coordinate after the first vertex moves; determining an equation of a first boundary line of the moved first vertex according to the first coordinates; determining a first parameter of each row of pixels or a second parameter of each column of pixels according to an equation of the first boundary line; changing the display content of each row of pixels according to the first parameter or changing the display content of each column of pixels according to the second parameter; receiving second information, repeating the operation on the vertexes of the light source end according to the second information so as to continuously change the display content of each row of pixel rows or the display content of each column of pixel columns, wherein the vertexes comprise first vertexes; and receiving the third information, finishing the anti-distortion operation and storing the anti-distortion information. The anti-distortion is realized by adjusting the position of a single vertex multiple times, the operation of the anti-distortion is simplified, and new distortion is not generated. The memory 62 serves as a non-volatile computer readable storage medium for storing non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions/modules for the anti-aliasing method in embodiments of the present application. The processor 61 executes various functional applications of the head-up display system and data processing, that is, implements the anti-distortion method of the above-described method embodiment, by running nonvolatile software programs, instructions, and modules stored in the memory 62.
Memory 62 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the heads-up display system, and the like. In addition, memory 62 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 62 may optionally include memory located remotely from processor 61, which may be connected to the controller via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in the memory 62 that, when executed by the one or more processors 61, perform the anti-aliasing method in any of the method embodiments described above, e.g., perform method steps S101 through S106 in fig. 2 described above.
It should be noted that the above product may execute the method provided by the embodiment of the present application, and has the corresponding functional module and beneficial effects of executing the method. Technical details not described in detail in this embodiment may be found in the methods provided in the embodiments of the present application.
Embodiments of the present application provide a non-transitory computer readable storage medium storing computer executable instructions for execution by one or more processors, such as one processor 61 in fig. 8, to cause the one or more processors to perform the anti-aliasing method of any of the method embodiments described above, performing the method steps S101 through S106 in fig. 2 described above.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the invention, the steps may be implemented in any order, and there are many other variations of the different aspects of the invention as above, which are not provided in details for the sake of brevity; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention. From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, but may also be implemented by means of hardware. Those skilled in the art will appreciate that a program implementing all or part of the above-described embodiment method steps can be implemented by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium, and the program can include the above-described embodiment method steps when executed. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random-access Memory (Random Access Memory, RAM), or the like.

Claims (7)

1. An anti-distortion method applied to a head-up display system, wherein the head-up display system comprises a light source end, and the method comprises the following steps:
Receiving first information, and moving a first vertex of the light source end according to the first information to obtain a first coordinate of the moved first vertex;
determining an equation of a first boundary straight line of the first vertex after moving according to the first coordinate;
determining a first parameter of each row of pixels or a second parameter of each column of pixels according to the equation of the first boundary straight line;
Changing the display content of each pixel row according to the first parameter or changing the display content of each pixel column according to the second parameter;
Receiving second information, and repeating the operations on the vertexes of the light source end according to the second information so as to continuously change the display content of each row of pixels or the display content of each column of pixels, wherein the vertexes comprise the first vertexes, and the second information comprises the moved vertexes and the moving distance and the moving direction of the moved vertexes;
Receiving third information, finishing anti-distortion operation and storing anti-distortion information, wherein the third information is information for ending the anti-distortion;
Before said receiving the first information, the method further comprises:
establishing a rectangular coordinate system at the light source end, and determining coordinates of the vertexes in the light source end, wherein the vertexes comprise a first vertex, a second vertex and a third vertex, the first vertex is adjacent to the second vertex and the third vertex, the second vertex is in the vertical direction of the first vertex, and the third vertex is in the horizontal direction of the first vertex;
The first information includes a direction of movement of the first vertex, the method further comprising:
If the moving direction is a horizontal direction, determining an equation of the first boundary straight line according to the first coordinates and the coordinates of the second vertex;
if the moving direction is a vertical direction, determining an equation of the first boundary straight line according to the first coordinate and the coordinate of the third vertex;
the light source end includes a first type of pixel points and a second type of pixel points, the number of the first type of pixel points on each row of pixel lines or each column of pixel lines is known, the second type of pixel points are pixel points which need to change display content according to the first parameter or the second parameter, and the determining the first parameter of each row of pixel lines or the second parameter of each column of pixel lines according to the equation of the first boundary straight line includes:
if the moving direction of the first vertex is a horizontal direction, calculating a second coordinate of an intersection point of the first boundary straight line and each row of pixel rows according to an equation of the first boundary straight line;
Determining the number of the second type of pixel points in each pixel row according to the second coordinates, wherein the first parameter is the number of the first type of pixel points in each pixel row/the number of the second type of pixel points in each pixel row;
If the moving direction of the first vertex is a vertical direction, calculating a third coordinate of an intersection point of the first boundary straight line and each column of the pixel columns according to an equation of the first boundary straight line;
and determining the number of the second type of pixel points in each pixel column according to the third coordinate, wherein the second parameter is the number of the first type of pixel points in each pixel column/the number of the second type of pixel points in each pixel column.
2. The method according to claim 1, wherein the method further comprises:
Assuming that the number of first-type pixel points in each row of the pixel rows is w, the number of first-type pixel points in each column of the pixel rows is h, a rectangular coordinate system of the light source end is established by taking a point B in the vertex as an origin, the coordinate of the point B is (0, 0), the coordinate of the point A in the vertex is (0, h-1) in the vertical direction of the point B, the coordinate of the point C in the vertex is (w-1, 0) in the horizontal direction of the point B, the coordinate of the point D in the vertex and the point B are on a diagonal line of a rectangle formed by the vertex, and the coordinate of the point D is (w-1, h-1);
if the first vertex is point a, the moving direction of point a is horizontal, and the coordinates of point a after moving are (x 1, y 1), the first boundary line passes through point a and point B, and the equation of the first boundary line is y= x,/>=y1/x1,k=1//>=X1/y 1, the second coordinate of the intersection point of the nth row of pixels and the first boundary line is (kn, n), the number of the second type of pixels is w-kn, and the first parameter is w/(w-kn);
If the first vertex is a point C, the moving direction of the point C is a vertical direction, and the coordinates of the point C after the movement are (x 1, y 1), the first boundary line passes through the point B and the point C, and the equation of the first boundary line is y= x,/>=y1/x1,k=1//>And (2) x1/y1, wherein the third coordinate of the intersection point of the nth column of pixels and the first boundary line is (n, n/k), the number of the second type of pixel points is h-n/k, and the second parameter is h/(h-n/k).
3. The method of claim 2, wherein said changing the display content of each row of said pixels according to said first parameter or changing the display content of each column of said pixels according to said second parameter comprises:
If the moving direction of the first vertex is a horizontal direction, displaying the display content of the first type of pixel points in the pixel row in the second type of pixel points in the pixel row according to the first parameter from the second coordinate;
And if the moving direction of the first vertex is a vertical direction, displaying the display content of the first type pixel point in the pixel column in the second type pixel point in the pixel column according to the second parameter from the third coordinate.
4. A method according to claim 3, characterized in that the method further comprises:
If the first vertex is a point a, the moving direction of the point a is a horizontal direction, assuming that the second coordinate is (kn, n), the first parameter is w/(w-kn), the coordinates of the first type pixel points in the nth row of pixels are (0, n), (1, n), (2, n), (3, n), …, (w-1, n), the coordinates of the second type pixel points are (kn, n), (kn+1, n), (kn+2, n), …, (kn+i, n), i is a positive integer, w is a positive integer, kn+i=w-1;
changing the display content of a second type of pixel point in the nth row of pixels according to the first parameter, wherein a first second type of pixel point (kn, n) displays the content of the first type of pixel point (0, n), a second type of pixel point (kn+1, n) displays the content of the first type of pixel point (w/(w-kn, n), a third second type of pixel point (kn+2, n) displays the content of the first type of pixel point (2 w/(w-kn, n), and so on, and a last second type of pixel point (kn+i, n) displays the content of the first type of pixel point (w-1, n);
If the first vertex is a point C, the moving direction of the point C is a vertical direction, assuming that the third coordinate is (n, n/k), the second parameter is h/(h-n/k), the coordinates of the first type pixel point in the nth column of pixels are (n, 0), (n, 2), (n, 3), …, (n, h-1), the coordinates of the second type pixel point are (n, n/k), (n, (n/k) +1), (n, (n/k) +2), …, (n, (n/k) +i), i is a positive integer, h is a positive integer, (n/k) +i=h-1;
changing the display content of the second type of pixel points in the nth column of pixel columns according to the second parameter, wherein the first second type of pixel points (n, n/k) display the content of the first type of pixel points (n, 0), the second type of pixel points (n, (n/k) +1) display the content of the first type of pixel points (n, h/(h-k)), the third second type of pixel points (n, (n/k) +2) display the content of the first type of pixel points (n, 2 h/(h-k)), and so on, and the last second type of pixel points (n, (n/k) +i) display the content of the first type of pixel points (n, h-1).
5. The method according to claim 4, wherein the method further comprises:
If the coordinates of the first type pixel points corresponding to the second type pixel points are not integers, the coordinates are adjusted to integers according to a first method, and the pixel values of the first type pixel points which do not belong to the second type pixel points are set to be first pixel values.
6. An anti-distortion device for use in a heads-up display system, the heads-up display system including a light source end, the anti-distortion device configured to implement the anti-distortion method of any of claims 1-5, the anti-distortion device comprising:
The mobile unit is used for receiving the first information, and moving a first vertex of the light source end according to the first information to obtain a first coordinate of the moved first vertex;
a first calculation unit configured to determine an equation of a first boundary line passing through the first vertex, based on the first coordinates;
a second calculation unit, configured to determine a first parameter of each row of pixels or a second parameter of each column of pixels according to the equation of the first boundary line;
A changing unit, configured to change display content of the pixel rows of each row according to the first parameter, or change display content of the pixel columns of each column according to the second parameter;
The receiving unit is used for receiving second information, repeating the operation on the vertexes of the light source end according to the second information so as to change the display content of each row of pixel rows or the display content of each column of pixel columns, wherein the vertexes comprise the first vertexes;
And the storage unit is used for receiving the third information, finishing the anti-distortion operation and storing the anti-distortion information.
7. A heads-up display system, the heads-up display system comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the antialiasing method of any of claims 1-5.
CN202111591000.XA 2021-12-23 2021-12-23 Anti-distortion method and device and head-up display system Active CN114331888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111591000.XA CN114331888B (en) 2021-12-23 2021-12-23 Anti-distortion method and device and head-up display system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111591000.XA CN114331888B (en) 2021-12-23 2021-12-23 Anti-distortion method and device and head-up display system

Publications (2)

Publication Number Publication Date
CN114331888A CN114331888A (en) 2022-04-12
CN114331888B true CN114331888B (en) 2024-06-18

Family

ID=81055387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111591000.XA Active CN114331888B (en) 2021-12-23 2021-12-23 Anti-distortion method and device and head-up display system

Country Status (1)

Country Link
CN (1) CN114331888B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115904195A (en) * 2023-02-24 2023-04-04 江苏泽景汽车电子股份有限公司 Image processing method, system and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105844584A (en) * 2016-03-19 2016-08-10 上海大学 Method for correcting image distortion of fisheye lens
CN112488966A (en) * 2020-12-23 2021-03-12 深圳疆程技术有限公司 Image anti-distortion method and device, electronic equipment and automobile

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107650799B (en) * 2017-09-27 2019-11-29 京东方科技集团股份有限公司 A kind of head-up display, head-up display system and its display methods, automobile
CN113160067A (en) * 2021-01-26 2021-07-23 睿爱智能科技(上海)有限责任公司 Method for correcting VR (virtual reality) large-field-angle distortion

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105844584A (en) * 2016-03-19 2016-08-10 上海大学 Method for correcting image distortion of fisheye lens
CN112488966A (en) * 2020-12-23 2021-03-12 深圳疆程技术有限公司 Image anti-distortion method and device, electronic equipment and automobile

Also Published As

Publication number Publication date
CN114331888A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN109688392B (en) AR-HUD optical projection system, mapping relation calibration method and distortion correction method
US7835592B2 (en) Calibration technique for heads up display system
CN109389650B (en) Vehicle-mounted camera calibration method and device, vehicle and storage medium
CN105306805B (en) Apparatus and method for correcting image distortion of camera for vehicle
JP4677104B2 (en) Vehicle display device
JP5222597B2 (en) Image processing apparatus and method, driving support system, and vehicle
CN111443490B (en) Virtual image display area adjusting method of AR HUD
US9245313B2 (en) Semiconductor device, electronic apparatus, and image processing method
CN114331888B (en) Anti-distortion method and device and head-up display system
US20220319145A1 (en) Image processing device, image processing method, moving device, and storage medium
US11273763B2 (en) Image processing apparatus, image processing method, and image processing program
US9317895B1 (en) Non-linear image mapping
CN111667414A (en) Image distortion correction method and computer-readable storage medium
JP2017016455A (en) Image correction device and image correction method
CN108713216B (en) Method for perspective transformation and output of image content, head-up display and output system, and vehicle
US11376961B2 (en) Method and system for demonstrating function of vehicle-mounted heads up display, and computer-readable storage medium
JP2021103274A (en) Head-up display device
CN107621743B (en) Projection system and method for correcting distortion of projected image
JP2019161346A (en) Head-up display device and display image correction method
CN115270290A (en) Method, apparatus, system, and storage medium for implementing HUD platformization
CN115147797B (en) Intelligent adjusting method, system and medium for visual field of electronic exterior rearview mirror
CN112977469A (en) Navigation device based on vehicle-mounted holographic projection and control method thereof
CN115578283B (en) Distortion correction method and device for HUD imaging, terminal equipment and storage medium
CN117011185B (en) Electronic rearview mirror CMS image correction method and system and electronic rearview mirror
EP4383185A1 (en) Processing method for vehicle surround view, vehicle surround view system and in-vehicle processing device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant