Image distortion correction method and computer-readable storage medium

By decomposing and analyzing the feature points of the HUD projected image and generating a correction curve, the problem of HUD projected image distortion is solved, distortion-free image correction is achieved, and the driving experience is improved.

CN111667414BActive Publication Date: 2025-09-26XIAMEN YAXON ZHILLAN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910167303.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-03-06
Publication Date
2025-09-26
Estimated Expiration
2039-03-06

AI Technical Summary

Technical Problem

The image projected by the HUD on the front windshield is prone to distortion, affecting the driver's observation effect.

Method used

By acquiring the original image and the distorted image, decomposing the distorted image into multiple sub-images of single distorted line segments, obtaining the feature points of each sub-image, generating a correction curve and a corrected image, and projecting the corrected image to offset the distortion.

Benefits of technology

The accuracy of image correction is improved, presenting correct images without distortion and enhancing the driver's user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111667414B_ABST
    Figure CN111667414B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for image distortion correction and a computer-readable storage medium. The method comprises: obtaining an original image and a distorted image; decomposing the distorted image to obtain multiple sub-images each containing only a single distorted line segment; obtaining the distorted line segment in each sub-image and the feature points of each distorted line segment; generating a correction curve based on the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment; generating a corrected image based on the correction curve corresponding to each original line segment; and projecting the corrected image. The present invention can offset the distortion caused by optical refraction and present a corrected image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an image distortion correction method and a computer-readable storage medium. Background Art

[0002] With the continuous development of society and the improvement of living standards, more and more families are starting to own their own cars. Today, assisted driving functions can help people achieve precise control of their vehicles. Assisted driving devices such as head-up displays (HUDs) display important information such as navigation instructions, road conditions, speed, and RPM on the front windshield, eliminating the need for drivers to look down at the instrument panel while driving, bringing great convenience to driving.

[0003] However, the HUD projection effect is often not very ideal. The image projected on the front windshield will be distorted to a certain extent (image distortion refers to the distortion, offset and misalignment of the geometric position of the pixels of the image generated in the optical imaging process relative to the reference system, causing the position, shape, orientation, etc. of the image to change to a certain extent), which affects the driver's observation of the display effect. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide an image distortion correction method and a computer-readable storage medium, which can offset the distortion caused by optical refraction and present a correct image.

[0005] In order to solve the above technical problems, the present invention adopts a technical solution: a method for correcting image distortion, comprising:

[0006] Obtain the original image and the distorted image;

[0007] Decomposing the distorted image to obtain a plurality of sub-images each containing only a single distorted line segment;

[0008] Obtaining the distorted line segments in each sub-image respectively, and obtaining the feature points of each distorted line segment respectively;

[0009] generating a correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment;

[0010] Generate a corrected image according to the correction curve corresponding to each original line segment;

[0011] The correction image is projected.

[0012] The present invention also relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0013] Obtain the original image and the distorted image;

[0014] Decomposing the distorted image to obtain a plurality of sub-images each containing only a single distorted line segment;

[0015] Obtaining the distorted line segments in each sub-image respectively, and obtaining the feature points of each distorted line segment respectively;

[0016] generating a correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment;

[0017] Generate a corrected image according to the correction curve corresponding to each original line segment;

[0018] The correction image is projected.

[0019] The beneficial effects of the present invention lie in: by decomposing the distorted image, analyzing and processing each distorted line segment separately, and adjusting the original image to obtain a corrected image, the driver's field of view is presented with a corrected image free of distortion. Analysis based on feature points improves correction accuracy. The present invention offsets the distortion caused by the image projected onto the windshield after optical refraction, thereby providing the driver with a corrected image in their field of view, enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a flowchart of an image distortion correction method according to the first embodiment of the present invention;

[0021] Figure 2 Schematic diagram of the process of generating a calibration curve according to the first embodiment of the present invention Figure 1 ;

[0022] Figure 3 Schematic diagram of the process of generating a calibration curve according to the first embodiment of the present invention Figure 2 ;

[0023] Figure 4 Schematic diagram of the process of generating a calibration curve according to the first embodiment of the present invention Figure 3 ;

[0024] Figure 5 Schematic diagram of the principle of image distortion correction according to the first embodiment of the present invention. DETAILED DESCRIPTION

[0025] To illustrate the technical content, achieved objectives and effects of the present invention in detail, the following is a detailed description in conjunction with the embodiments and accompanying drawings.

[0026] The key concept of the present invention is to analyze each distorted line segment in the distorted image separately and perform reverse adjustment on the original line segment.

[0027] See also Figure 1, an image distortion correction method, comprising:

[0028] Obtain the original image and the distorted image;

[0029] Decomposing the distorted image to obtain a plurality of sub-images each containing only a single distorted line segment;

[0030] Obtaining the distorted line segments in each sub-image respectively, and obtaining the feature points of each distorted line segment respectively;

[0031] generating a correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment;

[0032] Generate a corrected image according to the correction curve corresponding to each original line segment;

[0033] The correction image is projected.

[0034] From the above description, it can be seen that the beneficial effect of the present invention is that it can offset the distortion caused by optical refraction and present a correct image.

[0035] Furthermore, the step of respectively obtaining the distorted line segments in each sub-image is specifically as follows:

[0036] grayscale processing is performed on a sub-image;

[0037] performing binarization processing on each of the sub-images after the grayscale processing according to a preset threshold value;

[0038] Pixel points with grayscale values ​​of preset grayscale values ​​in the binarized sub-image are obtained to obtain distorted line segments.

[0039] From the above description, it can be seen that a relatively accurate distorted line segment can be obtained.

[0040] Furthermore, the characteristic points include a starting point, an end point, an extreme point between the starting point and the end point, an equally divided point between the starting point and the extreme point, and an equally divided point between the extreme point and the end point.

[0041] Furthermore, generating the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment is specifically as follows:

[0042] Get the distorted line segment and its corresponding original line segment;

[0043] Obtaining original points on the original line segment corresponding to the feature points of the distorted line segment;

[0044] Draw a first straight line, which passes through the maximum point on the distorted line segment and is parallel to the straight lines where the starting point and the end point of the original line segment are located;

[0045] Calculate the distance between each feature point and the first straight line respectively;

[0046] Obtaining the correction points corresponding to the original points according to the distances of the feature points;

[0047] A calibration curve is generated based on each calibration point.

[0048] As can be seen from the above description, the accuracy of the correction is ensured by performing reverse adjustment according to the deviation value.

[0049] Furthermore, the original line segment corresponding to the distorted line segment is a straight line segment;

[0050] Generating the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment is specifically as follows:

[0051] Get the distorted line segment and its corresponding original line segment;

[0052] Taking the starting point of the distorted line segment as the origin and the straight line where the original line segment is located as a coordinate axis, a rectangular coordinate system is established;

[0053] Calculating a second set of coordinate values ​​of the distorted line segment in the rectangular coordinate system according to the first set of coordinate values ​​of the distorted line segment in the sub-image;

[0054] According to the second coordinate value set of the distorted line segment, a corresponding curve formula is obtained by fitting;

[0055] Obtaining the curvature of the distorted line segment at each feature point according to the curve formula and the second coordinate value of the feature point in the rectangular coordinate system;

[0056] According to the curvature of each feature point, the original line segment corresponding to the distorted line segment is reversely rotated to obtain a correction curve.

[0057] It can be seen from the above description that by performing reverse adjustment according to the curvature, the amount of data processing can be reduced and the correction efficiency can be improved.

[0058] The present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the following steps are implemented:

[0059] Obtain the original image and the distorted image;

[0060] Decomposing the distorted image to obtain a plurality of sub-images each containing only a single distorted line segment;

[0061] Obtaining the distorted line segments in each sub-image respectively, and obtaining the feature points of each distorted line segment respectively;

[0062] generating a correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment;

[0063] Generate a corrected image according to the correction curve corresponding to each original line segment;

[0064] The correction image is projected.

[0065] Furthermore, the step of respectively obtaining the distorted line segments in each sub-image is specifically as follows:

[0066] grayscale processing is performed on a sub-image;

[0067] performing binarization processing on each of the sub-images after the grayscale processing according to a preset threshold value;

[0068] Pixel points with grayscale values ​​of preset grayscale values ​​in the binarized sub-image are obtained to obtain distorted line segments.

[0069] Furthermore, the characteristic points include a starting point, an end point, an extreme point between the starting point and the end point, an equally divided point between the starting point and the extreme point, and an equally divided point between the extreme point and the end point.

[0070] Furthermore, generating the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment is specifically as follows:

[0071] Get the distorted line segment and its corresponding original line segment;

[0072] Obtaining original points on the original line segment corresponding to the feature points of the distorted line segment;

[0073] Draw a first straight line, which passes through the maximum point on the distorted line segment and is parallel to the straight lines where the starting point and the end point of the original line segment are located;

[0074] Calculate the distance between each feature point and the first straight line respectively;

[0075] Obtaining the correction points corresponding to the original points according to the distances of the feature points;

[0076] A calibration curve is generated based on each calibration point.

[0077] Furthermore, the original line segment corresponding to the distorted line segment is a straight line segment;

[0078] Generating the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment is specifically as follows:

[0079] Get the distorted line segment and its corresponding original line segment;

[0080] Taking the starting point of the distorted line segment as the origin and the straight line where the original line segment is located as a coordinate axis, a rectangular coordinate system is established;

[0081] Calculating a second set of coordinate values ​​of the distorted line segment in the rectangular coordinate system according to the first set of coordinate values ​​of the distorted line segment in the sub-image;

[0082] According to the second coordinate value set of the distorted line segment, a corresponding curve formula is obtained by fitting;

[0083] Obtaining the curvature of the distorted line segment at each feature point according to the curve formula and the second coordinate value of the feature point in the rectangular coordinate system;

[0084] According to the curvature of each feature point, the original line segment corresponding to the distorted line segment is reversely rotated to obtain a correction curve.

[0085] Example 1

[0086] Please refer to Figure 1-5 The first embodiment of the present invention is: an image distortion correction method, which can be applied to the distortion correction of HUD projected images, comprising the following steps:

[0087] S1: Acquire the original image and the distorted image; that is, acquire the original image before projection and the distorted image after projection.

[0088] S2: Decompose the distorted image to obtain multiple sub-images containing only a single distorted line segment. Specifically, a distorted line segment in the distorted image may be first selected, and the remaining portions may be blanked to obtain a sub-image containing only the distorted line segment. Then, the next distorted line segment may be selected, and the remaining portions may be blanked, and so on.

[0089] Furthermore, if a distorted line segment contains more than two peaks, such as a double-peaked or wavy shape, the line segment formula can be calculated using the coordinates of the distorted line segment in the distorted image. The points where the second-order derivative of the formula is equal to 0 are then used as segmentation points to divide the distorted line segment into multiple segments. In other words, the resulting single distorted line segment is a curved or straight line segment containing only one peak.

[0090] S3: Obtain the distorted line segments in each sub-image respectively, and obtain the feature points of each distorted line segment respectively.

[0091] Specifically, a sub-image is grayscaled; then, based on a preset threshold, the grayscale value of each sub-image is binarized, with the grayscale value of background pixels in the sub-image set to 0 and the grayscale value of object pixels set to 1. Pixels with a grayscale value of 1 in the binarized sub-image are then obtained to obtain distorted line segments. The initial value of the preset threshold can be 0.5. If distorted line segments cannot be obtained, the threshold is adjusted, such as to 0.6 or 0.7, to filter out more background.

[0092] Then, feature points in the distorted line segment are selected. Preferably, the feature points are points that can reflect the specific line type of the line segment, including the starting point, the end point, the maximum point between the starting point and the end point, the equal-division point between the starting point and the maximum point, and the equal-division point between the maximum point and the end point. Among them, the maximum point can be the highest point of the convexity or the lowest point of the concave, and the equal-division point can be a three-equal-division point.

[0093] S4: Generate a correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment.

[0094] Specifically, first obtain the distorted line segment and its corresponding original line segment, and obtain the original points on the original line segment that correspond to the feature points of the distorted line segment. In this embodiment, the original line segment corresponding to the distorted line segment is taken as an example for explanation, and it is assumed that the starting point and end point of the distorted line segment coincide with the starting point and end point of the original line segment corresponding to it. After obtaining a set of distorted line segments and their corresponding original line segments, Figure 2 As shown, the straight line segment is the original line segment, the curved line segment is the distorted line segment, points A and G are the starting point and end point, respectively, point D' is the maximum point of the distorted line segment, point D is the original point corresponding to point D', points B and C are the points that divide AD into three equal parts, points E and F are the points that divide DG into three equal parts, and points B', C', E', and F' are the feature points corresponding to points B, C, E, and F, respectively (the line connecting the feature points and their corresponding original points is perpendicular to the original line segment). In other words, in this embodiment, the equal-division points in the feature points are obtained based on the equal-division points in the original points.

[0095] Then draw a first straight line that passes through the maximum point D' on the distorted line segment and is parallel to the lines where the starting and ending points of the original line segment are located. Since the original line segment is a straight line segment, it is parallel to the original line segment. Then calculate the distance from each feature point to the first straight line. Figure 3As shown, draw AA' perpendicular to the first straight line, draw B'B" perpendicular to the first straight line, draw C'C" perpendicular to the first straight line, draw E'E" perpendicular to the first straight line, draw F'F" perpendicular to the first straight line, draw GG' perpendicular to the first straight line, the distance from the feature point D' to the first straight line is 0, and the distances from other feature points to the first straight line are AA', B'B", C'C", E'E", F'F", and GG' respectively.

[0096] Furthermore, a rectangular coordinate system can be established with the starting point, that is, point A, as the origin and the straight line on which the original line segment is located as the coordinate axis (such as the X-axis). According to the coordinate values ​​of the original line segment in the original image and the coordinate values ​​of the distorted line segment in the distorted image, the coordinate values ​​of each point in the image in the rectangular coordinate system can be analyzed and obtained. Then, the distances of AA', B'B", C'C", E'E", F'F", and GG' can be obtained by coordinate value calculation or vector calculation.

[0097] Then, based on the distances of the feature points, the correction points corresponding to the original points are obtained. Specifically, the correction points are made on the same side of the distorted line segment relative to the original line segment, and the distance between the correction points and their corresponding original points is equal to the distance from the corresponding feature point to the first straight line. Figure 4 As shown, the correction point of point A is point A', the correction point of point G is point G', and the correction point of point D' is point D. Then the distance between B'' and BB'' is equal to B'B', and so on, to obtain C'', E'', and F''.

[0098] Finally, a calibration curve is generated according to each calibration point, that is, a calibration curve is generated according to A', B'', C'', D, E'', F'', and G'.

[0099] S5: Generate a corrected image based on the correction curve corresponding to each original line segment; specifically, the start point and end point of the correction curve may be overlapped with the positions of the start point and end point of the original line segment in the original image, thereby obtaining the corrected image.

[0100] S6: Project the correction image. Figure 5 As shown, (a) is the original image, which becomes the distorted image (b) after projection, and (c) is the corrected image obtained based on the distorted image, which can be obtained after projection (d).

[0101] This embodiment is based on image processing technology. The shooting module can collect the image information source, and then the correction module analyzes and processes the image to generate a corrected image. Finally, the projection module projects the corrected image onto the front windshield of the vehicle. This can offset the distortion caused by the image projected on the front windshield after optical refraction, thereby obtaining the corrected image in the driver's field of view, enhancing the driver's user experience.

[0102] Example 2

[0103] This embodiment is another implementation method for the case where the original line segment corresponding to the distorted line segment is a straight line segment in step S4 of the first embodiment.

[0104] First, obtain the distorted line segment and its corresponding original line segment;

[0105] Then, a rectangular coordinate system is established by taking the starting point of the distorted line segment as the origin and the straight line on which the original line segment is located as a coordinate axis; similarly, the second coordinate value set of the distorted line segment in the rectangular coordinate system can be calculated based on the first coordinate value set of the distorted line segment in the sub-image.

[0106] Then, based on the second coordinate value set of the distorted line segment, the corresponding curve formula is fitted, wherein the coordinate value set is the coordinate value of the preset point on the distorted line segment. The more preset points there are, the more accurate the fitted curve formula is, and the preset points may include feature points. Furthermore, the optimized curve formula can be obtained by using an approximation method.

[0107] Then, the curvature of the distorted line segment at each feature point is obtained according to the curve formula and the second coordinate value of the feature point in the rectangular coordinate system; the curvature of the distorted line segment at each feature point can be calculated using the existing curvature calculation formula.

[0108] Finally, the original line segment corresponding to the distorted line segment is reversely rotated based on the curvature of each feature point to obtain a correction curve. Specifically, each original point on the original line segment corresponding to each feature point can be obtained first, and then reversely rotated based on the curvature of the corresponding feature point to obtain the correction curve.

[0109] By calculating the curvature, this embodiment eliminates the need to perform multiple cycles of distortion correction in real time during the distortion correction process of a fixed image. Instead, it is only necessary to input the previously calculated curvature parameters into the system and perform a correction once. This greatly reduces the amount of data processing required by the system, speeds up the system operation, and improves efficiency.

[0110] Example 3

[0111] This embodiment is a computer-readable storage medium corresponding to the above embodiment, on which a computer program is stored. When the program is executed by a processor, the following steps are implemented:

[0112] Obtain the original image and the distorted image;

[0113] Decomposing the distorted image to obtain a plurality of sub-images each containing only a single distorted line segment;

[0114] Obtaining the distorted line segments in each sub-image respectively, and obtaining the feature points of each distorted line segment respectively;

[0115] generating a correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment;

[0116] Generate a corrected image according to the correction curve corresponding to each original line segment;

[0117] The correction image is projected.

[0118] Furthermore, the step of respectively obtaining the distorted line segments in each sub-image is specifically as follows:

[0119] grayscale processing is performed on a sub-image;

[0120] performing binarization processing on each of the sub-images after the grayscale processing according to a preset threshold value;

[0121] Pixel points with grayscale values ​​of preset grayscale values ​​in the binarized sub-image are obtained to obtain distorted line segments.

[0122] Furthermore, the characteristic points include a starting point, an end point, an extreme point between the starting point and the end point, an equally divided point between the starting point and the extreme point, and an equally divided point between the extreme point and the end point.

[0123] Furthermore, generating the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment is specifically as follows:

[0124] Get the distorted line segment and its corresponding original line segment;

[0125] Obtaining original points on the original line segment corresponding to the feature points of the distorted line segment;

[0126] Draw a first straight line, which passes through the maximum point on the distorted line segment and is parallel to the straight lines where the starting point and the end point of the original line segment are located;

[0127] Calculate the distance between each feature point and the first straight line respectively;

[0128] Obtaining the correction points corresponding to the original points according to the distances of the feature points;

[0129] A calibration curve is generated based on each calibration point.

[0130] Furthermore, the original line segment corresponding to the distorted line segment is a straight line segment;

[0131] Generating the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment is specifically as follows:

[0132] Get the distorted line segment and its corresponding original line segment;

[0133] Taking the starting point of the distorted line segment as the origin and the straight line where the original line segment is located as a coordinate axis, a rectangular coordinate system is established;

[0134] Calculating a second set of coordinate values ​​of the distorted line segment in the rectangular coordinate system according to the first set of coordinate values ​​of the distorted line segment in the sub-image;

[0135] According to the second coordinate value set of the distorted line segment, a corresponding curve formula is obtained by fitting;

[0136] Obtaining the curvature of the distorted line segment at each feature point according to the curve formula and the second coordinate value of the feature point in the rectangular coordinate system;

[0137] According to the curvature of each feature point, the original line segment corresponding to the distorted line segment is reversely rotated to obtain a correction curve.

[0138] In summary, the present invention provides an image distortion correction method and computer-readable storage medium. By decomposing a distorted image, analyzing and processing each distorted line segment, and adjusting the original image, a corrected image is generated, presenting a corrected image without distortion to the driver's field of view. This correction accuracy is enhanced through feature point-based analysis. This method offsets the distortion caused by the image projected onto the windshield after optical refraction, thereby providing the driver with a corrected image in their field of view and enhancing the user experience.

[0139] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for correcting image distortion, characterized in that: include: Obtain the original image and the distorted image; Decomposing the distorted image to obtain a plurality of sub-images each containing only a single distorted line segment; Obtaining the distorted line segments in each sub-image respectively, and obtaining the characteristic points of each distorted line segment respectively; the characteristic points include the starting point, the end point, the maximum point between the starting point and the end point, the equal-division point between the starting point and the maximum point, and the equal-division point between the maximum point and the end point; generating a correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment; Generate a corrected image according to the correction curve corresponding to each original line segment; projecting the correction image; Generating the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment is specifically as follows: Get the distorted line segment and its corresponding original line segment; Obtaining original points on the original line segment corresponding to the feature points of the distorted line segment; Draw a first straight line, which passes through the maximum point on the distorted line segment and is parallel to the straight lines where the starting point and the end point of the original line segment are located; Calculate the distance between each feature point and the first straight line respectively; Obtaining the correction points corresponding to the original points according to the distances of the feature points; A calibration curve is generated based on each calibration point.

2. The image distortion correction method according to claim 1, wherein: The specific steps of respectively obtaining the distorted line segments in each sub-image are as follows: grayscale processing is performed on a sub-image; performing binarization processing on each of the sub-images after the grayscale processing according to a preset threshold value; Pixel points with grayscale values ​​of preset grayscale values ​​in the binarized sub-image are obtained to obtain distorted line segments.

3. The image distortion correction method according to claim 1, wherein: The original line segment corresponding to the distorted line segment is a straight line segment; Generating the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment is specifically as follows: Get the distorted line segment and its corresponding original line segment; Taking the starting point of the distorted line segment as the origin and the straight line where the original line segment is located as a coordinate axis, a rectangular coordinate system is established; Calculating a second set of coordinate values ​​of the distorted line segment in the rectangular coordinate system according to the first set of coordinate values ​​of the distorted line segment in the sub-image; According to the second coordinate value set of the distorted line segment, a corresponding curve formula is obtained by fitting; Obtaining the curvature of the distorted line segment at each feature point according to the curve formula and the second coordinate value of the feature point in the rectangular coordinate system; According to the curvature of each feature point, the original line segment corresponding to the distorted line segment is reversely rotated to obtain a correction curve.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, the following steps are implemented: Obtain the original image and the distorted image; Decomposing the distorted image to obtain a plurality of sub-images each containing only a single distorted line segment; Obtaining the distorted line segments in each sub-image respectively, and obtaining the characteristic points of each distorted line segment respectively; the characteristic points include the starting point, the end point, the maximum point between the starting point and the end point, the equal-division point between the starting point and the maximum point, and the equal-division point between the maximum point and the end point; generating a correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment; Generate a corrected image according to the correction curve corresponding to each original line segment; projecting the correction image; Generating the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment is specifically as follows: Get the distorted line segment and its corresponding original line segment; Obtaining original points on the original line segment corresponding to the feature points of the distorted line segment; Draw a first straight line, which passes through the maximum point on the distorted line segment and is parallel to the straight lines where the starting point and the end point of the original line segment are located; Calculate the distance between each feature point and the first straight line respectively; Obtaining the correction points corresponding to the original points according to the distances of the feature points; A calibration curve is generated based on each calibration point.

5. The computer-readable storage medium according to claim 4, wherein: The specific steps of respectively obtaining the distorted line segments in each sub-image are as follows: grayscale processing is performed on a sub-image; performing binarization processing on each of the sub-images after the grayscale processing according to a preset threshold value; Pixel points with grayscale values ​​of preset grayscale values ​​in the binarized sub-image are obtained to obtain distorted line segments.

6. The computer-readable storage medium according to claim 4, wherein: The original line segment corresponding to the distorted line segment is a straight line segment; Generating the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment is specifically as follows: Get the distorted line segment and its corresponding original line segment; Taking the starting point of the distorted line segment as the origin and the straight line where the original line segment is located as a coordinate axis, a rectangular coordinate system is established; Calculating a second set of coordinate values ​​of the distorted line segment in the rectangular coordinate system according to the first set of coordinate values ​​of the distorted line segment in the sub-image; According to the second coordinate value set of the distorted line segment, a corresponding curve formula is obtained by fitting; Obtaining the curvature of the distorted line segment at each feature point according to the curve formula and the second coordinate value of the feature point in the rectangular coordinate system; According to the curvature of each feature point, the original line segment corresponding to the distorted line segment is reversely rotated to obtain a correction curve.

Citation Information

Patent Citations

  • Image deformation calibration method irrespective with shooting apparatus

    CN101271573A

  • Image processing method and device

    CN102236790A