After-sales distortion correction method, head-up display and vehicle

By manually correcting the transformation matrix sequence and parameter values, pre-distortion correction is performed on the HUD image, solving the after-sales distortion problem, realizing the user-customized HUD display effect, and improving the display quality.

CN120976076APending Publication Date: 2025-11-18NINGBO ECHENG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510842541.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In existing technologies, HUDs require high computational power for after-sales maintenance or distortion correction methods caused by assembly errors, making them unsuitable for chips that do not support matrix solving operations.

Method used

A post-sales distortion correction method is provided, which determines the transformation matrix sequence and parameter values ​​by obtaining the type and adjustment amount of manual correction operation, generates a correction matrix, performs pre-distortion correction on the image to be corrected, and generates the target image.

Benefits of technology

It enables HUD display correction without matrix solving operations, allowing users to customize the display effect and improving HUD display performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976076A_ABST
    Figure CN120976076A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of head-up display, in particular to an after-sales distortion correction method, a head-up display and a vehicle. The after-sales distortion correction method comprises the steps of determining a transformation matrix sequence corresponding to manual correction operation based on an operation type of the manual correction operation, and determining values of parameters contained in the transformation matrix sequence based on an adjusting variable; determining a correction matrix corresponding to the manual correction operation based on the transformation matrix sequence and values of parameters contained in the transformation matrix sequence; and performing pre-distortion correction on the to-be-corrected image based on the correction matrix to generate a target image, and displaying the target image on a user interface. According to the method provided by the invention, the matrix does not need to be solved, and reverse predistortion is carried out on the to-be-corrected image through simple coordinate transformation operation, so that the HUD display effect can be corrected.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of head-up display, in particular to a post-sale distortion correction method, a head-up display and a vehicle. BACKGROUND

[0002] A HUD (Head Up Display) is a display device that projects information onto the windshield or other transparent medium, widely used in the fields of automobiles, aviation, etc. Due to the curved surface characteristics of the windshield, the projected image will form distortion on the windshield, affecting the user's viewing experience. To solve this problem, the HUD will set up a simulated environment or on a real car when it is off the production line, and complete the distortion state calibration through a specific camera, to obtain a distortion parameter table recording the distortion offset state, and store the table in the HUD.

[0003] Because of the different viewing angles of drivers of different heights / poses, or the introduction of new assembly errors after the vehicle is reassembled with the HUD in the 4S store or after long-term bumpy driving, some distortion still exists after correction based on the distortion parameter table, so manual distortion correction of the HUD display image is needed.

[0004] In the prior art, a homography matrix of four vertices of a UI area is generally calculated, and the whole image is corrected in trapezoidal or parallelogram shape through the homography matrix. This method requires chip support for matrix solving operation, and is not suitable for chips that do not support matrix solving operation. SUMMARY

[0005] Embodiments of the present application aim to provide a post-sale distortion correction method, a head-up display and a vehicle, to solve the problem of high operation requirement of manual distortion correction method on chips in the prior art.

[0006] To solve the above technical problems, the embodiments of the present application provide the following technical solutions: In a first aspect, the embodiments of the present application provide a post-sale distortion correction method, which comprises: displaying a to-be-corrected image on a user interface, obtaining an operation type of a manual correction operation on the to-be-corrected image and an adjustment amount of the manual correction operation; determining a transformation matrix sequence corresponding to the manual correction operation based on the operation type, and determining values of parameters contained in the transformation matrix sequence based on the adjustment amount; determining a correction matrix corresponding to the manual correction operation based on the transformation matrix sequence and the values of the parameters contained in the transformation matrix sequence; generating a target image by pre-distortion correction of the to-be-corrected image based on the correction matrix, and displaying the target image on the user interface.

[0007] Optionally, the sequence of transformation matrices is a single transformation matrix or a product of multiple transformation matrices, and the transformation matrix includes a translation matrix, a rotation matrix, a shearing matrix, a scaling matrix and a perspective projection matrix.

[0008] Optionally, the operation type includes trapezoidal correction, and the sequence of transformation matrices corresponding to the manual correction operation is determined based on the operation type, including: When the operation type is trapezoidal correction, the sequence of transformation matrices corresponding to the manual correction operation is determined as a first translation matrix a perspective projection matrix a rotation matrix a second translation matrix a scaling matrix.

[0009] Optionally, the trapezoidal correction includes left-converging and right-expanding correction, left-expanding and right-converging correction, top-converging and bottom-expanding correction, and top-expanding and bottom-converging correction. When the operation type is left-converging and right-expanding correction or left-expanding and right-converging correction, the rotation matrix of the trapezoidal correction is used to control the UI region to rotate an angle around the vertical center axis of the UI region, the translation matrix is used to control the UI region to translate a distance along the horizontal center axis of the UI region, and the scaling matrix is used to control the UI region to scale a proportion along the horizontal center axis of the UI region. When the operation type is top-converging and bottom-expanding correction or top-expanding and bottom-converging correction, the rotation matrix is used to control the UI region to rotate an angle around the horizontal center axis of the UI region, the translation matrix is used to control the UI region to translate a distance along the vertical center axis of the UI region, and the scaling matrix is used to control the UI region to scale a proportion along the vertical center axis of the UI region.

[0010] Optionally, the first translation matrix is used to move the center of the UI region to the origin position, and the second translation matrix is further used to return the transformed center of the UI region to the original position, so that the top-left corner of the screen is located at the origin position.

[0011] Optionally, the value of the parameter included in the sequence of transformation matrices is determined based on the adjustment amount, including: The angle, the distance and the proportion are determined based on the adjustment amount, a preset field of view angle size and a preset UI region size.

[0012] Optionally, the operation type includes parallelogram correction, and the sequence of transformation matrices corresponding to the manual correction operation is determined based on the operation type, including: When the operation type is parallelogram correction, the sequence of transformation matrices corresponding to the manual correction operation is determined as a first translation matrix Shearing matrix Third translation matrix.

[0013] Optionally, the parallelogram correction includes upward shearing correction, downward shearing correction, leftward shearing correction and rightward shearing correction, When the operation type is upward shearing correction or downward shearing correction, the shearing matrix contains a parameter of an up-down shearing ratio, and the up-down shearing ratio is ; When the operation type is leftward shearing correction or rightward shearing correction, the shearing matrix contains a parameter of a left-right shearing ratio, and the left-right shearing ratio is .

[0014] In a second aspect, an embodiment of the present application provides a head-up display, comprising: at least one processor and a memory connected with the at least one processor in communication, the memory storing instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of the above.

[0015] In a third aspect, an embodiment of the present application provides a vehicle, comprising the head-up display of the second aspect.

[0016] The beneficial effects of the embodiments of the present application are: different from the prior art, in the embodiments of the present application, a post-sale distortion correction method is provided, a transformation matrix sequence corresponding to a manual correction operation is determined based on an operation type of the manual correction operation, and a value of a parameter contained in the transformation matrix sequence is determined based on an adjustment amount; then a correction matrix corresponding to the manual correction operation is determined based on the transformation matrix sequence and the value of the parameter contained in the transformation matrix sequence; finally, a target image is generated by performing pre-distortion correction on a to-be-corrected image based on the correction matrix, and the target image is displayed on a user interface. The method of the present application does not require solving a matrix, and the to-be-corrected image is subjected to reverse pre-distortion through simple coordinate transformation operation, so that the display effect of the HUD can be corrected, and the user can still customize the display effect of the HUD after the HUD is delivered to the user. BRIEF DESCRIPTION OF DRAWINGS

[0017] One or more embodiments are illustrated by way of example in the figures that are part of this document, and which illustrate by way of example the principles of the embodiments. The same reference numbers in different drawings represent the same elements or the similar elements, unless otherwise indicated. The drawings in the accompanying drawings are not to scale, and are provided merely for purposes of illustration without limiting the scope of the embodiments.

[0018] Figure 1 An exemplary schematic diagram of a HUD projection display is shown; Figure 2An example shows a flow chart of a post-sale distortion correction method. Figure 3 An example shows a manual correction operation diagram of each operation type. Figure 4 An example shows a pre-distortion correction diagram of left-converging right-expanding correction. Figure 5 An example shows a geometric diagram of left-converging right-expanding correction. Figure 6 An example shows a UI area diagram of a HUD. Figure 7 An example shows a pre-distortion correction diagram of up-expanding down-converging correction. Figure 8 An example shows a geometric diagram of up-expanding down-converging correction. Figure 9 An example shows a pre-distortion correction diagram of upward shearing correction. Figure 10 An example shows a pre-distortion correction diagram of rightward shearing correction. Figure 11 An example shows a pre-distortion correction diagram of counterclockwise rotation correction. Figure 12 An example shows a hardware structure diagram of a head-up display. DETAILED DESCRIPTION

[0019] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0020] In addition, the technical features involved in each of the embodiments of the present application described below can be combined with each other as long as there is no conflict.

[0021] It should be noted that the steps shown in the flow chart of the drawings can be executed in a computer system such as a group of computer-executable instructions, and although the logical order is shown in the flow chart, in some cases, the steps shown or described herein can be executed in an order different from that shown.

[0022] Please refer to Figure 1 , Figure 1 An example shows a diagram of a HUD projection display. As shown in Figure 1As shown, the HUD includes a light engine 1, a first mirror 2, a second mirror 3, and the like. In operation, the light engine 1 projects a projection image containing information such as vehicle speed, fuel consumption, navigation, and the like to the first mirror 2. The projection image is projected onto the windshield 4 via the first mirror 2 and the second mirror 3, and a virtual image 5 is formed. The human eye 6 can see the virtual image 5 through the windshield 4. Due to the curved surface characteristics of the windshield, the virtual image 5 will be distorted relative to the original projection image, affecting the user's viewing experience.

[0023] To solve this problem, the HUD will set up a simulation environment or on the actual vehicle when it is off the production line, and complete the distortion state calibration through a specific camera to obtain an original distortion parameter table recording the distortion offset state, and store the table in the HUD. When the HUD projects an image, the original distortion parameter table is used to perform distortion processing on the projection image, and then the distorted image is projected out, thereby eliminating the distortion. However, due to the different viewing angles of drivers of different heights / poses, or the introduction of new assembly errors after the vehicle is reassembled for after-sales maintenance at a 4S store or after long-term bumpy driving, some distortion still exists after correction based on the distortion parameter table, and manual distortion correction of the HUD display image is required.

[0024] Therefore, the present application provides a simple and efficient after-sales distortion correction method, which can correct the display effect of the HUD through simple coordinate transformation operations, so that the user can still customize the display effect of the HUD after the HUD is delivered to the user, improving the display performance of the HUD and improving the picture display effect of the HUD.

[0025] The after-sales distortion correction method provided by the present application is applied to a head-up display. Please refer to Figures 2-11 The embodiment of the present application provides an after-sales distortion correction method. As shown in Figure 2 The method comprises the following steps: Step S201: displaying a to-be-corrected image on a user interface, and obtaining an operation type of a manual correction operation and an adjustment amount of the manual correction operation for the to-be-corrected image.

[0026] In an embodiment, the to-be-corrected image is an image obtained by correcting an original projection image based on a distortion parameter table. The to-be-corrected image is an image that has been distorted, such as trapezoidal distortion, parallelogram distortion, and the like. The correction of the original projection image based on the distortion parameter table is a prior art, and will not be described herein.

[0027] In an embodiment, the operation types of the manual correction operation include trapezoidal correction, parallelogram correction and rotation correction, wherein the trapezoidal correction includes left-converging right-expanding correction, left-expanding right-converging correction, upper-converging lower-expanding correction and upper-expanding lower-converging correction, the parallelogram correction includes upward shearing correction, downward shearing correction, leftward shearing correction and rightward shearing correction, and the rotation correction includes clockwise rotation correction and counterclockwise rotation correction. As shown in FIG. 10, the manual correction operation is illustrated for each operation type. Figure 3

[0028] In an embodiment, when manual distortion correction is needed, the host computer sends a manual correction mode entering instruction to the HUD through a specific CAN (Controller Area Network) message or a LIN (Local Interconnect Network) message. After receiving the manual correction mode entering instruction, the HUD controls the HUD to enter the manual correction mode. In the manual correction mode, the operator sets the adjustment amount of the manual correction operation of one or more operation types according to the distortion form of the image to be corrected on the host computer, and sends the operation type and the corresponding adjustment amount of each manual correction operation to the HUD.

[0029] In step S202, the transformation matrix sequence corresponding to the manual correction operation is determined based on the operation type, and the value of the parameter included in the transformation matrix sequence is determined based on the adjustment amount.

[0030] The manual correction operation of different operation types corresponds to different transformation matrix sequences, and the transformation matrix sequence is a single transformation matrix or a product of multiple transformation matrices. The transformation matrix includes a translation matrix, a rotation matrix, a shearing matrix, a scaling matrix and a perspective projection matrix. In the embodiment of the present application, each transformation matrix is a 4 matrix in the homogeneous coordinate system. The following describes each transformation matrix: (1) Translation Matrix The translation matrix is used to move a coordinate point or a coordinate axis by a preset distance in a specified direction. The specific form of the translation matrix is as follows:

[0031] wherein d x, d y and d z respectively represent the distances of movement in the X-axis direction, the Y-axis direction and the Z-axis direction. , and

[0032] (2) Rotation Matrix The rotation matrix is used to rotate a coordinate point or a coordinate axis by a preset angle along a specified axis. The rotation matrix includes an X-axis rotation matrix, a Y-axis rotation matrix and a Z-axis rotation matrix, wherein the specific form of the X-axis rotation matrix is as follows: ​​

[0033] The specific form of the Y-axis rotation matrix is:

[0034] The specific form of the Z-axis rotation matrix is:

[0035] where, , and are the angles of rotation around the X-axis, the Y-axis, and the Z-axis, respectively.

[0036] (3) Shear matrix The shear matrix is a linear transformation that causes the image to be distorted in a certain direction, while other directions remain unchanged. The specific form of the shear matrix is:

[0037] where, is the left-right shear ratio, is the up-down shear ratio.

[0038] (4) Scaling matrix The scaling matrix is used to stretch or compress the image along the specified axis direction to change the size of the image. The specific form of the scaling matrix is:

[0039] where, , and are the scaling ratios in the X-axis direction, the Y-axis direction, and the Z-axis direction, respectively, starting from the circle point.

[0040] (5) Perspective projection matrix The perspective projection matrix is used to simulate the visual effect of the human eye "near big and far small". The specific form of the perspective projection matrix is:

[0041] where, , are the horizontal and vertical field angles, respectively, is the near section, is the far section.

[0042] In the present application, the distortion of the image is offset by performing reverse pre-distortion processing on the image to be corrected, so as to correct the HUD display effect. For example, when the image to be corrected displayed by the user interface is a trapezoidal distortion with the left narrow and the right wide, the pre-distortion correction of the image to be corrected is performed by the left expansion and right collection correction operation in the trapezoidal correction to offset the distortion of the image itself, so as to obtain the target image with normal display. In an embodiment, when the operation type of the manual correction operation is trapezoidal correction, the transformation matrix sequence corresponding to the manual correction operation is a first translation matrix perspective projection matrix rotation matrix second translation matrix scaling matrix. Wherein, the first translation matrix is used to move the center of the UI region to the origin position. The head-up display is generally a three-dimensional coordinate system established on the basis of the screen coordinate system, that is, the top left vertex of the screen is taken as the origin, the right of the screen region is the positive direction of the X axis, the downward of the screen region is the positive direction of the Y axis, and the direction perpendicular to the screen region away from the viewer is the positive direction of the Z axis. By moving the center of the UI region to the origin position, rotation of the image during trapezoidal correction can be realized around the horizontal center axis of the UI region or the vertical center axis of the UI region.

[0043] The working principle of the transformation matrix sequence is as follows: first, the center of the UI region is moved to the origin position based on the first translation matrix, then the perspective projection of the image is performed based on the perspective projection matrix to simulate the visual effect of the human eye; then the image is rotated based on the rotation matrix to realize the pre-distortion correction of left collection and right expansion / left expansion and right collection / upper collection and lower expansion / upper expansion and lower collection; after the rotation of the image is completed, based on the principle of perspective projection, part of the image exceeds the range of the field of view angle and the rotated image is stretched relative to the image before rotation; in order to make the rotated image achieve the corresponding pre-distortion correction effect under the perspective projection, the image is further translated to the range of the field of view angle and the center of the transformed UI region is returned to the original position based on the second translation matrix, and finally, the image is enlarged to the image boundary corresponding to the boundary of the field of view angle based on the scaling matrix. Thus, one trapezoidal correction is completed.

[0044] It should be noted that the center of the UI region will be offset relative to the original center of the UI region after geometric transformation, therefore, after the center of the transformed UI region is returned to the original position, it will not return to the original position, but to a position where the top left vertex of the screen continues to be located at the origin position.

[0045] In one embodiment, when the operation type is left-converging right-diverging correction or right-converging left-diverging correction, the rotation matrix is used to control the UI region to rotate an angle around the vertical center axis of the UI region, the second translation matrix is used to control the UI region to translate a distance along the width direction of the UI region, and the scaling matrix is used to control the UI region to magnify a proportion along the width direction of the UI region; when the operation type is top-converging bottom-diverging correction or bottom-diverging top-converging correction, the rotation matrix is used to control the UI region to rotate an angle around the horizontal center axis of the UI region, the second translation matrix is used to control the UI region to translate a distance along the height direction of the UI region, and the scaling matrix is used to control the UI region to magnify a proportion along the height direction of the UI region.

[0046] Please refer to Figure 4 and Figure 5 , Figure 4 a pre-distortion correction schematic diagram of left-converging right-diverging correction is shown, Figure 5 a geometric diagram schematic diagram of left-converging right-diverging correction is shown. Figure 4 The blue rectangular frame in the middle is pre-distorted into a red trapezoidal frame after left-converging right-diverging correction. The transformation matrix sequence corresponding to this pre-distortion process is the first translation matrix perspective projection matrix rotation matrix second translation matrix scaling matrix. As shown in Figure 5 , first, the center of the UI region is moved to the origin position based on the first translation matrix, then the UI region is perspective projected based on the perspective projection matrix, and then the UI region is rotated clockwise by an angle around the vertical center axis of the UI region from the pre-rotation plane S1 to the post-rotation plane S2 by the rotation matrix. Under the perspective projection effect, the post-rotation plane S2 is stretched in the width direction of the UI region relative to the pre-rotation plane S1. Among them, the stretching distance in the left direction is LR Trapezoid X1 , the stretching distance in the right direction is LR Trapezoid X2 , and LR Trapezoid X1 > LR Trapezoid X2 . Based on LR Trapezoid X1 , LR Trapezoid X2 and the width of the UI region, the width stretching proportion can be calculated. Further, the UI region is translated leftward along the width direction of the UI region by LR Trapezoid X1 based on the second translation matrix, so that the left boundary of the UI region corresponds to the left boundary of the field of view angle and the center of the transformed UI region is returned, and finally the UI region is magnified by the width stretching proportion along the width direction of the UI region based on the scaling matrix, that is, the distortion of the blue rectangular frame into the red trapezoidal frame is realized.

[0047] The determination method of the values of the parameters contained in the transformation matrix sequence corresponding to left-diverging right-converging correction will be introduced below. Among them, the perspective projection matrix includes parameters , , and All parameters are preset. The rotation matrix contains parameters in the form of angles. The translation matrix contains the parameter of the leftward translation distance. LR Trapezoid X1 The scaling matrix contains parameters for the width stretching ratio. The specific calculation process for each parameter is as follows:

[0048]

[0049]

[0050]

[0051]

[0052]

[0053]

[0054]

[0055] in, , for Figure 4 Medium adjustment amount, The width of the UI area. This refers to the height of the UI area. It's understandable that the pre-distortion correction process for left-expansion / right-contraction correction is similar to that for left-contraction / right-expansion correction, and will not be elaborated upon here.

[0056] In HUD displays, for optical design reasons, the entire screen is not used to display images. Instead, a designated area is defined on the screen as the UI display area. For example... Figure 6 As shown, the height of the UI area is The width of the UI area is The pixel distance between the top edge of the UI area and the top edge of the screen is called the top margin; the pixel distance between the bottom edge of the UI area and the bottom edge of the screen is called the bottom margin; the pixel distance between the left edge of the UI area and the left edge of the screen is called the left margin; and the pixel distance between the right edge of the UI area and the right edge of the screen is called the right margin. The center of the UI area is point O. An axis parallel to the top and bottom edges of the UI area and passing through the center of the UI area is the horizontal central axis of the UI area. An axis parallel to the left and right edges of the UI area and passing through the center of the UI area is the vertical central axis of the UI area.

[0057] Please refer to Figure 7 and Figure 8 ,Figure 7 A schematic diagram of pre-distortion correction of upper expansion and lower contraction correction is shown, Figure 8 A schematic diagram of geometric interpretation of upper expansion and lower contraction correction is shown. Figure 7 The blue rectangular frame is distorted into a red trapezoidal frame after upper expansion and lower contraction correction. The Figure 4 and Figure 5 The pre-distortion process of left contraction and right expansion correction corresponds to a sequence of transformation matrices, which is a first translation matrix Figure 7 a perspective projection matrix a scaling matrix. Specifically, the center of the UI region is first moved to the origin position based on the first translation matrix, then the UI region is perspective projected based on the perspective projection matrix, and then the UI region is rotated counterclockwise by an angle Under the perspective projection effect, the plane after rotation is stretched in the height direction of the UI region relative to the plane before rotation. Let the stretching distance in the upper side direction be UD Trapezoid Y1 , the stretching distance in the lower side direction be UD Trapezoid Y2 , and UD Trapezoid Y1 > UD Trapezoid Y2 Based on UD Trapezoid Y1 , UD Trapezoid Y2 and the height of the UI region, the height stretching ratio can be calculated. Further, the UI region is translated upward along the height direction of the UI region by a distance UD Trapezoid Y1 based on the second translation matrix so that the upper boundary of the UI region corresponds to the upper boundary of the field of view angle and the center of the transformed UI region is returned to the original position. Finally, the UI region is scaled by the height stretching ratio along the height direction of the UI region based on the scaling matrix, that is, the blue rectangular frame is distorted into the red trapezoidal frame.

[0058] Figure 7 The parameters contained in the sequence of transformation matrices corresponding to the upper expansion and lower contraction correction in the middle include the angle , the upward translation distance UD Trapezoid Y1 and the height stretching ratio . The specific calculation process is as follows:

[0059]

[0060]

[0061]

[0062]

[0063]

[0064]

[0065]

[0066] wherein, , is Figure 7 the adjustment amount in the middle, is the width of the UI area, is the height of the UI area. It can be understood that the pre-distortion correction process of the upper expansion and lower contraction correction is similar to the pre-distortion correction process of the upper contraction and lower expansion correction, which will not be described here.

[0067] In an embodiment, when the operation type is parallelogram correction, the corresponding transformation matrix sequence is a first translation matrix a shear matrix a third translation matrix. Wherein, the first translation matrix is used to move the center of the UI area to the origin position, and the third translation matrix is used to return the center of the UI area after the shear transformation to the original position. After returning, the top left corner of the screen is located at the origin position. Different from the second translation matrix in the trapezoidal correction, the third translation matrix is only used to return the center of the UI area to the original position, while the second translation matrix is used to control the UI area to be translated along the horizontal center axis of the UI area or the vertical center axis of the UI area by a distance to translate the image to the field of view angle range in addition to returning the center of the UI area to the original position. Please refer to Figure 9 , Figure 9 shows a pre-distortion correction schematic diagram of upward shear correction. Figure 9 The blue rectangular frame in the middle is pre-distorted to a red parallelogram frame after upward shear correction. The shear matrix corresponding to the upward shear correction contains the parameter of the up-down shear ratio, which is . Wherein, the adjustment amount is positive when the operation type is upward shear correction, and the adjustment amount is negative when the operation type is downward shear correction. Please refer to Figure 10 , Figure 10 shows a pre-distortion correction schematic diagram of right shear correction. Figure 10 The blue rectangular frame in the middle is pre-distorted to a red parallelogram frame after right shear correction. The shear matrix corresponding to the right shear correction contains the parameter of the left-right shear ratio, which is . Wherein, the adjustment amount is positive when the operation type is right shear correction, and the adjustment amount is negative when the operation type is left shear correction.

[0068] In an embodiment, when the operation type is rotation correction, the corresponding transformation matrix sequence is a rotation matrix. The rotation correction includes clockwise rotation correction and counterclockwise rotation correction. It should be noted that the clockwise rotation correction and the counterclockwise rotation correction are rotations around an axis perpendicular to the image plane. Please refer to Figure 11 ,Figure 11 A pre-distortion correction diagram of counter-clockwise rotation correction is shown. Figure 11 In the figure, the blue rectangular frame is pre-distorted to the red rectangular frame after counter-clockwise rotation correction. The rotation matrix corresponding to the rotation correction contains the parameter of the angle of rotation around the Z axis, i.e. the adjustment amount Z Angle When the operation type is clockwise rotation correction, the adjustment amount Z Angle is negative, and when the operation type is counter-clockwise rotation correction, the adjustment amount Z Angle is positive.

[0069] Step S203: Determine the correction matrix corresponding to the manual correction operation based on the transformation matrix sequence and the values of the parameters contained in the transformation matrix sequence.

[0070] In an embodiment, when the manual correction operation contains multiple operation types, the transformation matrix sequences corresponding to the multiple operation types can be merged, and the determined parameters are substituted into each transformation matrix to obtain the final correction matrix. Specifically, the total calculation formula of the correction matrix containing one or more operation types is:

[0071]

[0072]

[0073]

[0074]

[0075] cale (xrate, yrate, 1) wherein, is the correction matrix, is the first translation matrix, is the shear matrix, is the perspective projection matrix, is the X-axis rotation matrix, is the Y-axis rotation matrix, is the Z-axis rotation matrix, is the second translation matrix, cale is the scaling matrix; is the width of the UI area, is the height of the UI area, is the left margin size, is the top margin size, is the left-right shear ratio, is the top-bottom shear ratio, is the horizontal field of view angle, is the vertical field of view angle, For near-section, For the far section, The angle is the rotation around the X-axis. The angle of rotation around the Y-axis. The rotation angle is about the Z-axis. This represents the stretching ratio along the X-axis. yrate This represents the stretching ratio in the Y-axis direction. .

[0076] Step S204: Based on the correction matrix, perform pre-distortion correction on the image to be corrected to generate a target image, and display the target image on the user interface.

[0077] Since all transformation matrices are in homogeneous coordinates (4... If the matrix is ​​4, then the resulting correction matrix is ​​also 4. 4. Matrix. The specific process of pre-distortion correction of the image to be corrected based on the correction matrix is ​​as follows: Assume the coordinates of a certain pixel Pixel1 in the image to be corrected are ( (,y), pixel value L1, correction matrix 4 For a matrix C44, first expand the coordinates of pixel Pixel1 to 1. The input point matrix M14 is 4. Multiplying the input point matrix M14 with the correction matrix C44 yields 1. The output point matrix T14 is calculated. Then, based on the output point matrix T14, the coordinates of the distorted pixel Pixel2 are obtained, and the pixel value of pixel Pixel1 is set to the pixel value L2 of pixel Pixel2. The input point matrix M14 and the output point matrix T14 are as follows: M14=

[0078] T14=M14*C44=

[0079] The coordinates of pixel Pixel2 are ( / B, / B).

[0080] For each pixel Pixel1 in the image to be corrected, the pixel value of Pixel1 is set to the pixel value L2 of Pixel2 to generate the target image. After displaying the target image on the user interface, the user sees a correctly displayed image.

[0081] The method for correcting distortion after sale provided by the embodiment of the application comprises the following steps: determining a transformation matrix sequence corresponding to a manual correction operation based on an operation type of the manual correction operation, and determining a value of a parameter included in the transformation matrix sequence based on an adjustment amount; determining a correction matrix corresponding to the manual correction operation based on the transformation matrix sequence and the value of the parameter included in the transformation matrix sequence; and finally, performing pre-distortion correction on a to-be-corrected image based on the correction matrix to generate a target image, and displaying the target image on a user interface. The method of the application does not require solving a matrix, and can realize correction of a HUD display effect by performing reverse pre-distortion on a to-be-corrected image through simple coordinate transformation operation, so that the user can still customize the display effect of the HUD after the HUD is delivered to the user.

[0082] According to the embodiment of the application, an electronic device is provided, as shown in the figure, which comprises a processor 10, a memory 20 and a communication interface 30. Figure 12 As shown in the figure, the hardware structure of the head-up display provided by the embodiment of the application comprises a processor 10, a memory 20 and a communication interface 30, which are connected through a line. Figure 12 In the embodiment shown in the figure, the processor 10, the memory 20 and the communication interface 30 are connected to each other through a bus.

[0083] The memory 20 is used for storing software programs, computer executable program instructions and the like. The memory 20 can comprise a program storage area and a data storage area, wherein the program storage area can store an operating system and application programs required by at least one function; and the data storage area can store data created according to the use of the electronic device and the like.

[0084] The memory 20 can be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), and the specific type is not limited here.

[0085] For example, the aforementioned memory 20 can be a double data rate synchronous dynamic random access memory (DDR SDRAM, referred to as DDR for short). The memory 20 can exist independently, but is connected to the processor 10. Optionally, the memory 20 can also be integrated with the processor 10. For example, the memory 20 can be integrated in one or more chips.

[0086] In some embodiments, the memory 20 can optionally include remote memory that is located remotely from the processor 10, which can be connected to the electronic device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0087] The processor 10 connects various parts of the entire head-up display 100 through various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs stored in the memory 20 and calling data stored in the memory 20, such as implementing the method described in any embodiment of the present application.

[0088] The processor 10 can be a field programmable gate array (FPGA), a digital signal processor (DSP), a central processing unit (CPU), or the like.

[0089] The processor 10 can be a single-core processor or a multi-core processor, for example, the processor 10 can be composed of multiple FPGAs or multiple DSPs. In addition, the processor 10 can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions). The processor 10 can be a separate semiconductor chip, or can be integrated with other circuits as a semiconductor chip, for example, it can be integrated with other circuits (such as coding and decoding circuits, hardware acceleration circuits, or various bus and interface circuits) to form a system on a chip (SoC), or it can be integrated as a built-in processor in an application specific integrated circuit (ASIC), and the ASIC integrated with the processor can be packaged separately or packaged together with other circuits.

[0090] The communication interface 30 can use a transceiver device such as a transceiver to realize communication between the electronic device and other devices or communication networks.

[0091] The embodiments of the present application also provide a computer storage medium, which stores instructions or programs, and the instructions or programs are executed by one or more processors, for example, one processor 10 in the computer storage medium, so that the one or more processors can execute the distortion correction data processing method in any method embodiment. Figure 12

[0092] ​The embodiments of the present application also provide a vehicle containing the head-up display device as provided above. The vehicle includes, but is not limited to, a bus, a car, a house car, an electric vehicle, etc. The vehicle can also include other devices, such as a radar, an image sensor, a positioning device, etc., and the embodiments are not limited.

[0093] Through the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus a general hardware platform, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part that contributes to the related art, can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0094] The above description is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application. Therefore, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for after-sales distortion correction, characterized in that, The method includes: The user interface displays the image to be corrected, and the operation type and adjustment amount of the manual correction operation performed on the image to be corrected are obtained. Based on the operation type, the transformation matrix sequence corresponding to the manual correction operation is determined, and based on the adjustment amount, the values ​​of the parameters contained in the transformation matrix sequence are determined. The correction matrix corresponding to the manual correction operation is determined based on the transformation matrix sequence and the values ​​of the parameters contained in the transformation matrix sequence; Based on the correction matrix, the image to be corrected is pre-distorted to generate a target image, which is then displayed on the user interface.

2. The method according to claim 1, characterized in that, The transformation matrix sequence is a single transformation matrix or a product of multiple transformation matrices, and the transformation matrices include translation matrix, rotation matrix, shearing matrix, scaling matrix, and perspective projection matrix.

3. The method according to claim 1, characterized in that, The operation type includes trapezoidal correction, and the step of determining the transformation matrix sequence corresponding to the manual correction operation based on the operation type includes: When the operation type is trapezoidal correction, the transformation matrix sequence corresponding to the manual correction operation is determined to be the first translation matrix. Perspective projection matrix Rotation matrix Second translation matrix Scaling matrix.

4. The method according to claim 3, characterized in that, The trapezoidal correction includes left contraction and right expansion correction, left expansion and right contraction correction, upper contraction and lower expansion correction, and upper expansion and lower contraction correction. When the operation type is left shrinking and right expanding correction or left expanding and right shrinking correction, the rotation matrix is ​​used to control the UI area to rotate around the vertical central axis of the UI area by an angle, the second translation matrix is ​​used to control the UI area to translate along the horizontal central axis of the UI area by a distance, and the scaling matrix is ​​used to control the UI area to be enlarged by a ratio along the horizontal central axis of the UI area. When the operation type is upward contraction and downward expansion correction or upward expansion and downward contraction correction, the rotation matrix is ​​used to control the UI area to rotate around the horizontal central axis of the UI area by an angle, the second translation matrix is ​​used to control the UI area to translate along the vertical central axis of the UI area by a distance, and the scaling matrix is ​​used to control the UI area to be enlarged by a ratio along the vertical central axis of the UI area.

5. The method according to claim 4, characterized in that, The first translation matrix is ​​used to move the center of the UI area to the origin position, and the second translation matrix is ​​also used to restore the center of the transformed UI area to its original position, so that the top left corner of the screen is located at the origin position.

6. The method according to claim 4 or 5, characterized in that, The determination of the values ​​of the parameters contained in the transformation matrix sequence based on the adjustment amount includes: Based on the adjustment amount, the preset field of view size, and the preset UI area size, the angle, the distance, and the ratio are determined.

7. The method according to claim 1, characterized in that, The operation type includes parallelogram correction, and the step of determining the transformation matrix sequence corresponding to the manual correction operation based on the operation type includes: When the operation type is parallelogram correction, the transformation matrix sequence corresponding to the manual correction operation is determined to be the first translation matrix. Shearing matrix The third translation matrix.

8. The method according to claim 7, characterized in that, The parallelogram correction includes upward shear correction, downward shear correction, leftward shear correction, and rightward shear correction. When the operation type is upward shearing correction or downward shearing correction, the parameter included in the shearing matrix is ​​the upward / downward shearing ratio, where the upward / downward shearing ratio = ; When the operation type is left shearing correction or right shearing correction, the parameter included in the shearing matrix is ​​the left-right shearing ratio, where the left-right shearing ratio = .

9. A head-up display, characterized in that, The method includes at least one processor and a memory communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1 to 8.

10. A means of transportation, characterized in that, Including the head-up display as described in claim 9.