CN111667414A - Image distortion correction method and computer-readable storage medium - Google Patents

Image distortion correction method and computer-readable storage medium Download PDF

Info

Publication number
CN111667414A
CN111667414A CN201910167303.5A CN201910167303A CN111667414A CN 111667414 A CN111667414 A CN 111667414A CN 201910167303 A CN201910167303 A CN 201910167303A CN 111667414 A CN111667414 A CN 111667414A
Authority
CN
China
Prior art keywords
line segment
distorted
point
original
image
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.)
Pending
Application number
CN201910167303.5A
Other languages
Chinese (zh)
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.)
Xiamen Yaxon Networks Co Ltd
Original Assignee
Xiamen Yaxon Networks 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 Xiamen Yaxon Networks Co Ltd filed Critical Xiamen Yaxon Networks Co Ltd
Priority to CN201910167303.5A priority Critical patent/CN111667414A/en
Publication of CN111667414A publication Critical patent/CN111667414A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B27/00Optical systems or apparatus not provided for by any of the groups G02B1/00 - G02B26/00, G02B30/00
    • G02B27/01Head-up displays
    • G02B27/0101Head-up displays characterised by optical features
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B27/00Optical systems or apparatus not provided for by any of the groups G02B1/00 - G02B26/00, G02B30/00
    • G02B27/01Head-up displays
    • G02B27/0101Head-up displays characterised by optical features
    • G02B2027/014Head-up displays characterised by optical features comprising information/image processing systems

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an image distortion correction method and a computer readable storage medium, the method comprises: acquiring an original image and a distorted image; decomposing the distorted image to obtain a plurality of sub-images only containing a single distorted line segment; respectively acquiring distortion line segments in the sub-images, and respectively acquiring characteristic points of the distortion line segments; generating a correction curve according to the characteristic points of the distorted line segment and the original line segment corresponding to the distorted line segment; generating a corrected image according to the correction curve corresponding to each original line segment; projecting the corrected image. The invention can counteract the distortion generated after optical refraction and present correct images.

Description

Image distortion correction method and computer-readable storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image distortion correction method and a computer-readable storage medium.
Background
With the continuous development of social economy and the improvement of living standard, more and more families begin to own automobiles. Nowadays, the driver assistance function can help people to realize the accurate control to the vehicle, and the navigation suggestion in the driver assistance equipment is gone with the vehicle like head-up display (HUD), and important information such as road conditions and speed of a motor vehicle, rotational speed shows on the front windshield in the car, lets the driver need not to bow at the in-process of going and looks over the panel board, has brought very big facility for driving.
However, the HUD projection effect is not ideal, and the image projected on the front windshield is distorted to some extent (image distortion is distortion, deviation, and dislocation of geometric positions of pixels of the image relative to a reference system during optical imaging, which changes the position, shape, orientation, and the like of the image to some extent), and affects the driver's observation of the display effect.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: an image distortion correction method and a computer readable storage medium are provided, which can cancel the distortion generated by optical refraction and present a correct image.
In order to solve the technical problems, the invention adopts the technical scheme that: an image distortion correction method comprising:
acquiring an original image and a distorted image;
decomposing the distorted image to obtain a plurality of sub-images only containing a single distorted line segment;
respectively acquiring distortion line segments in the sub-images, and respectively acquiring characteristic points of the distortion line segments;
generating a correction curve according to the characteristic points of the distorted line segment and the original line segment corresponding to the distorted line segment;
generating a corrected image according to the correction curve corresponding to each original line segment;
projecting the corrected image.
The invention also relates to a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of:
acquiring an original image and a distorted image;
decomposing the distorted image to obtain a plurality of sub-images only containing a single distorted line segment;
respectively acquiring distortion line segments in the sub-images, and respectively acquiring characteristic points of the distortion line segments;
generating a correction curve according to the characteristic points of the distorted line segment and the original line segment corresponding to the distorted line segment;
generating a corrected image according to the correction curve corresponding to each original line segment;
projecting the corrected image.
The invention has the beneficial effects that: decomposing the distorted image, respectively analyzing and processing each distorted line segment, and adjusting the original image to obtain a corrected image, so that a correct image without distortion is presented in the visual field of a driver; by the feature point-based analysis, the correction accuracy can be improved. The invention can counteract the distortion generated by the image projected on the front windshield after optical refraction, thereby acquiring the corrected correct image in the visual field of a driver and enhancing the use experience of the driver.
Drawings
FIG. 1 is a flowchart illustrating an image distortion correction method according to a first embodiment of the present invention;
FIG. 2 is a first schematic diagram illustrating a process of generating a calibration curve according to a first embodiment of the present invention;
FIG. 3 is a second schematic diagram illustrating a process of generating a calibration curve according to a first embodiment of the present invention;
FIG. 4 is a third schematic diagram illustrating a process of generating a calibration curve according to a first embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a principle of image distortion correction according to a first embodiment of the present invention.
Detailed Description
In order to explain technical contents, objects and effects of the present invention in detail, the following detailed description is given with reference to the accompanying drawings in conjunction with the embodiments.
The most key concept of the invention is as follows: and respectively analyzing each distorted line segment in the distorted image, and reversely adjusting the original line segment.
Referring to fig. 1, an image distortion correction method includes:
acquiring an original image and a distorted image;
decomposing the distorted image to obtain a plurality of sub-images only containing a single distorted line segment;
respectively acquiring distortion line segments in the sub-images, and respectively acquiring characteristic points of the distortion line segments;
generating a correction curve according to the characteristic points of the distorted line segment and the original line segment corresponding to the distorted line segment;
generating a corrected image according to the correction curve corresponding to each original line segment;
projecting the corrected image.
From the above description, the beneficial effects of the present invention are: the distortion generated after the optical refraction can be counteracted, and a correct image is presented.
Further, the respectively obtaining the distortion line segments in the sub-images specifically includes:
carrying out graying processing on a sub-image;
respectively carrying out binarization processing on the sub-image after the graying processing according to a preset threshold value;
and obtaining pixel points with the gray value of a preset gray value in the sub-image after the binarization processing to obtain distorted line segments.
From the above description, a more accurate distorted line segment can be obtained.
Further, the feature points include a start point, an end point, a most significant point between the start point and the end point, a bisector between the start point and the most significant point, and a bisector between the most significant point and the end point.
Further, the 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 specifically includes:
obtaining a distorted line segment and an original line segment corresponding to the distorted line segment;
acquiring original points of the original line segment, which respectively correspond to the characteristic points of the distorted line segment;
making a first straight line, wherein the first straight line passes through the maximum point on the distorted line segment and is parallel to the straight line where the starting point and the end point of the original line segment are located;
respectively calculating the distance from each characteristic point to the first straight line;
respectively acquiring correction points corresponding to the original points according to the distance of each characteristic point;
a correction curve is generated from the correction points.
As can be seen from the above description, the accuracy of correction is ensured by performing the reverse adjustment according to the deviation value.
Further, the original line segment corresponding to the distorted line segment is a straight line segment;
the generating of the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment specifically comprises:
obtaining a distorted line segment and an original line segment corresponding to the distorted line segment;
taking the starting point of the distorted line segment as an origin, taking the straight line of the original line segment as a coordinate axis, and establishing a rectangular coordinate system;
calculating to obtain a second coordinate value set of the distortion line segment in the rectangular coordinate system according to the first coordinate value set of the distortion line segment in the sub-image;
fitting to obtain a corresponding curve formula according to the second coordinate value set of the distorted line segment;
according to the curve formula and a second coordinate value of the characteristic point in the rectangular coordinate system, obtaining the curvature of the distorted line segment at each characteristic point;
and carrying out reverse rotation on the original line segment corresponding to the distorted line segment according to the curvature of each characteristic point to obtain a correction curve.
As can be seen from the above description, by performing the inverse adjustment according to the curvature, the data processing amount can be reduced, and the correction efficiency can be improved.
The invention also proposes a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of:
acquiring an original image and a distorted image;
decomposing the distorted image to obtain a plurality of sub-images only containing a single distorted line segment;
respectively acquiring distortion line segments in the sub-images, and respectively acquiring characteristic points of the distortion line segments;
generating a correction curve according to the characteristic points of the distorted line segment and the original line segment corresponding to the distorted line segment;
generating a corrected image according to the correction curve corresponding to each original line segment;
projecting the corrected image.
Further, the respectively obtaining the distortion line segments in the sub-images specifically includes:
carrying out graying processing on a sub-image;
respectively carrying out binarization processing on the sub-image after the graying processing according to a preset threshold value;
and obtaining pixel points with the gray value of a preset gray value in the sub-image after the binarization processing to obtain distorted line segments.
Further, the feature points include a start point, an end point, a most significant point between the start point and the end point, a bisector between the start point and the most significant point, and a bisector between the most significant point and the end point.
Further, the 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 specifically includes:
obtaining a distorted line segment and an original line segment corresponding to the distorted line segment;
acquiring original points of the original line segment, which respectively correspond to the characteristic points of the distorted line segment;
making a first straight line, wherein the first straight line passes through the maximum point on the distorted line segment and is parallel to the straight line where the starting point and the end point of the original line segment are located;
respectively calculating the distance from each characteristic point to the first straight line;
respectively acquiring correction points corresponding to the original points according to the distance of each characteristic point;
a correction curve is generated from the correction points.
Further, the original line segment corresponding to the distorted line segment is a straight line segment;
the generating of the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment specifically comprises:
obtaining a distorted line segment and an original line segment corresponding to the distorted line segment;
taking the starting point of the distorted line segment as an origin, taking the straight line of the original line segment as a coordinate axis, and establishing a rectangular coordinate system;
calculating to obtain a second coordinate value set of the distortion line segment in the rectangular coordinate system according to the first coordinate value set of the distortion line segment in the sub-image;
fitting to obtain a corresponding curve formula according to the second coordinate value set of the distorted line segment;
according to the curve formula and a second coordinate value of the characteristic point in the rectangular coordinate system, obtaining the curvature of the distorted line segment at each characteristic point;
and carrying out reverse rotation on the original line segment corresponding to the distorted line segment according to the curvature of each characteristic point to obtain a correction curve.
Example one
Referring to fig. 1-5, a first embodiment of the present invention is: an image distortion correction method, applicable to distortion correction of HUD projection images, comprises the following steps:
s1: acquiring an original image and a distorted image; namely, the original image before projection and the distorted image after projection are obtained.
S2: decomposing the distorted image to obtain a plurality of sub-images only containing a single distorted line segment; specifically, a distorted line segment in the distorted image may be selected first, and the other parts may be blanked to obtain a sub-image including only the distorted line segment, and then a next distorted line segment may be selected, and the other parts may be blanked, and so on.
Further, if a distorted line segment includes more than two peaks, such as a double peak or a wave, the line segment formula of the distorted line segment can be calculated through the coordinates of the distorted line segment in the distorted image, then the points with the second derivative equal to 0 are calculated for the formula, and the points are used as the dividing points to divide the distorted line segment into a plurality of lines. That is, the single distortion line segment obtained is a curved line segment or a straight line segment containing only one peak.
S3: and respectively acquiring distortion line segments in the sub-images, and respectively acquiring characteristic points of the distortion line segments.
Specifically, graying a sub-image; then, according to a preset threshold value, respectively carrying out binarization processing on the sub-image after the graying processing, wherein the gray value of a pixel point of a background part in the sub-image can be set to be 0, and the gray value of a pixel point of an object part can be set to be 1; and then obtaining pixel points with the gray value of 1 in the sub-image after binarization processing, so as to obtain distorted line segments. The initial value of the preset threshold may be 0.5, and if the distorted line segment cannot be obtained, the adjustment is performed, such as 0.6 and 0.7, to filter out more background portions.
And then selecting characteristic points in the distorted line segment, wherein the characteristic points are preferably points capable of reflecting the specific line type of the line segment, and comprise a starting point, an end point, a maximum point between the starting point and the end point, an equant point between the starting point and the maximum point, and an equant point between the maximum point and the end point, wherein the maximum point can be a highest point of a protrusion or a lowest point of a depression, and the equant point can be a trisection point.
S4: and generating a correction curve according to the characteristic points of the distorted line segment and the original line segment corresponding to the distorted line segment.
Specifically, a distorted line segment and an original line segment corresponding to the distorted line segment are obtained, and original points corresponding to feature points of the distorted line segment on the original line segment are obtained. In this embodiment, an original line segment corresponding to the distorted line segment is taken as an example for explanation, and it is assumed that a start point and an end point of the distorted line segment coincide with a start point and an end point of the original line segment corresponding thereto, respectively, and then a group of distorted line segments and the original line segments corresponding thereto are obtained, as shown in fig. 2, the straight line segment is an original line segment, the curve segment is a distorted line segment, points a and G are a start point and an end point, respectively, point D 'is a maximum point of the distorted line segment, point D is an original point corresponding to point D', point B and point C are trisection points of AD, point E and point F are trisection points of DG, and point B ', point C', point E ', and point F' are feature points corresponding to the points B, point C, point E, and point F, respectively (a connection line of the feature points and the original points corresponding thereto is perpendicular to the original line segment. That is, in the present embodiment, the bisector in the feature points is obtained from the bisector in the original point.
And then, making a first straight line which passes through a maximum point D' on the distorted line segment and is parallel to a straight line where a starting point and an end point of the original line segment are located, wherein the original line segment is a straight line segment, so that the original line segment is parallel to the original line segment, and then respectively calculating to obtain the distance from each characteristic point to the first straight line. As shown in FIG. 3, AA ' is perpendicular to the first straight line, B ' is perpendicular to the first straight line, C ' is perpendicular to the first straight line, E ' is perpendicular to the first straight line, F ' is perpendicular to the first straight line, GG ' is 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 respectively the distances from AA ', B ', C ' C ", E ' E", F ' and GG '.
Further, a rectangular coordinate system may be established with the origin, i.e. the point a, as the origin, and the straight line of the original line segment as the coordinate axis (e.g. X axis), and the coordinate values of the points in the graph in the rectangular coordinate system may be obtained by analyzing 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, and then the distances AA ', B' B ", C 'C", E' E ", F 'F", GG' may be obtained by coordinate value calculation or by vector calculation.
Then, acquiring correction points corresponding to the original points according to the distances of the characteristic points; specifically, a correction point is made on the same side of the distorted line segment with respect to the original line segment, and the distance between the correction point and its corresponding original point is equal to the distance from the corresponding feature point to the first straight line. As shown in fig. 4, the correction point of point a is point a ', the correction point of point G is point G ', the correction point of point D ' is point D, then B ' ", the distance between BB '" is equal to B ' B ", and so on, to obtain C '", E ' ", F '".
Finally, a correction curve is generated according to the correction points, namely, the correction curves are generated according to A ', B', C ', D, E', F ', G'.
S5: generating a corrected image according to the correction curve corresponding to each original line segment; specifically, the start point and the end point of the correction curve may be respectively overlapped with the positions of the start point and the end point of the original line segment in the original image, so as to obtain the corrected image.
S6: projecting the corrected image. As shown in fig. 5, (a) is an original image and is projected as a distorted image (b), and (c) is a corrected image obtained from the distorted image and is projected as a correct image (d).
The embodiment is based on the image processing technology, the image information source can be acquired through the shooting module, the image is analyzed and processed through the correction module to generate a correction image, and finally the correction image is projected onto the front windshield of the vehicle through the projection module, so that the distortion generated by the image projected onto the front windshield after optical refraction can be counteracted, the corrected correct image can be acquired in the field of vision of a driver, and the use experience of the driver can be enhanced.
Example two
The present embodiment is another implementation manner of the first embodiment in the step S4, when the original line segment corresponding to the distorted line segment is a straight line segment.
Firstly, obtaining a distorted line segment and an original line segment corresponding to the distorted line segment;
then, taking the starting point of the distorted line segment as an origin, taking the straight line where the original line segment is located as a coordinate axis, and establishing a rectangular coordinate system; similarly, a second coordinate value set of the distortion line segment in the rectangular coordinate system can be calculated according to the first coordinate value set of the distortion line segment in the sub-image.
Then, according to the second coordinate value set of the distorted line segment, fitting to obtain a corresponding curve formula, wherein the coordinate value set is a coordinate value of a preset point on the distorted line segment, and the more the number of the preset points is, the more accurate the curve formula obtained by fitting is, and the preset points can contain characteristic points; further, the optimized curve formula can be obtained by an approximation method.
Then, according to the curve formula and a second coordinate value of the characteristic point in the rectangular coordinate system, obtaining the curvature of the distorted line segment at each characteristic point; the curvature of the distorted line segment at each characteristic point can be calculated by using the existing curvature calculation formula.
And finally, carrying out reverse rotation on the original line segment corresponding to the distorted line segment according to the curvature of each characteristic point to obtain a correction curve. Specifically, each original point on the original line segment corresponding to each feature point may be obtained first, and then the correction curve may be obtained by performing reverse rotation according to the curvature of the corresponding feature point.
In the embodiment, by calculating the curvature, in the distortion correction process of the fixed image, the correction of the multiple-cycle distortion image is not needed in real time, only the curvature parameter which is calculated in advance is input into the system, and the correction is performed once, so that the data processing amount of the system is greatly reduced, the system operation speed is increased, and the efficiency is improved.
EXAMPLE III
The present embodiment is a computer-readable storage medium corresponding to the above-described embodiments, on which a computer program is stored, which when executed by a processor, implements the steps of:
acquiring an original image and a distorted image;
decomposing the distorted image to obtain a plurality of sub-images only containing a single distorted line segment;
respectively acquiring distortion line segments in the sub-images, and respectively acquiring characteristic points of the distortion line segments;
generating a correction curve according to the characteristic points of the distorted line segment and the original line segment corresponding to the distorted line segment;
generating a corrected image according to the correction curve corresponding to each original line segment;
projecting the corrected image.
Further, the respectively obtaining the distortion line segments in the sub-images specifically includes:
carrying out graying processing on a sub-image;
respectively carrying out binarization processing on the sub-image after the graying processing according to a preset threshold value;
and obtaining pixel points with the gray value of a preset gray value in the sub-image after the binarization processing to obtain distorted line segments.
Further, the feature points include a start point, an end point, a most significant point between the start point and the end point, a bisector between the start point and the most significant point, and a bisector between the most significant point and the end point.
Further, the 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 specifically includes:
obtaining a distorted line segment and an original line segment corresponding to the distorted line segment;
acquiring original points of the original line segment, which respectively correspond to the characteristic points of the distorted line segment;
making a first straight line, wherein the first straight line passes through the maximum point on the distorted line segment and is parallel to the straight line where the starting point and the end point of the original line segment are located;
respectively calculating the distance from each characteristic point to the first straight line;
respectively acquiring correction points corresponding to the original points according to the distance of each characteristic point;
a correction curve is generated from the correction points.
Further, the original line segment corresponding to the distorted line segment is a straight line segment;
the generating of the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment specifically comprises:
obtaining a distorted line segment and an original line segment corresponding to the distorted line segment;
taking the starting point of the distorted line segment as an origin, taking the straight line of the original line segment as a coordinate axis, and establishing a rectangular coordinate system;
calculating to obtain a second coordinate value set of the distortion line segment in the rectangular coordinate system according to the first coordinate value set of the distortion line segment in the sub-image;
fitting to obtain a corresponding curve formula according to the second coordinate value set of the distorted line segment;
according to the curve formula and a second coordinate value of the characteristic point in the rectangular coordinate system, obtaining the curvature of the distorted line segment at each characteristic point;
and carrying out reverse rotation on the original line segment corresponding to the distorted line segment according to the curvature of each characteristic point to obtain a correction curve.
In summary, the image distortion correction method and the computer-readable storage medium provided by the present invention decompose the distorted image, analyze and process each distorted line segment, and adjust the original image, so as to obtain a corrected image, and enable the driver to present a correct image without distortion in the visual field; by the feature point-based analysis, the correction accuracy can be improved. The invention can counteract the distortion generated by the image projected on the front windshield after optical refraction, thereby acquiring the corrected correct image in the visual field of a driver and enhancing the use experience of the driver.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (10)

1. An image distortion correction method, comprising:
acquiring an original image and a distorted image;
decomposing the distorted image to obtain a plurality of sub-images only containing a single distorted line segment;
respectively acquiring distortion line segments in the sub-images, and respectively acquiring characteristic points of the distortion line segments;
generating a correction curve according to the characteristic points of the distorted line segment and the original line segment corresponding to the distorted line segment;
generating a corrected image according to the correction curve corresponding to each original line segment;
projecting the corrected image.
2. The image distortion correction method according to claim 1, wherein the respectively obtaining distortion line segments in the sub-images specifically includes:
carrying out graying processing on a sub-image;
respectively carrying out binarization processing on the sub-image after the graying processing according to a preset threshold value;
and obtaining pixel points with the gray value of a preset gray value in the sub-image after the binarization processing to obtain distorted line segments.
3. The image distortion correction method according to claim 1, wherein the feature points include a start point, an end point, a most significant point between the start point and the end point, a bisector between the start point and the most significant point, and a bisector between the most significant point and the end point.
4. The image distortion correction method according to claim 3, wherein the generating of the correction curve according to the feature points of the distortion line segment and the original line segment corresponding to the distortion line segment specifically includes:
obtaining a distorted line segment and an original line segment corresponding to the distorted line segment;
acquiring original points of the original line segment, which respectively correspond to the characteristic points of the distorted line segment;
making a first straight line, wherein the first straight line passes through the maximum point on the distorted line segment and is parallel to the straight line where the starting point and the end point of the original line segment are located;
respectively calculating the distance from each characteristic point to the first straight line;
respectively acquiring correction points corresponding to the original points according to the distance of each characteristic point;
a correction curve is generated from the correction points.
5. The image distortion correction method of claim 3, wherein the original line segment corresponding to the distorted line segment is a straight line segment;
the generating of the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment specifically comprises:
obtaining a distorted line segment and an original line segment corresponding to the distorted line segment;
taking the starting point of the distorted line segment as an origin, taking the straight line of the original line segment as a coordinate axis, and establishing a rectangular coordinate system;
calculating to obtain a second coordinate value set of the distortion line segment in the rectangular coordinate system according to the first coordinate value set of the distortion line segment in the sub-image;
fitting to obtain a corresponding curve formula according to the second coordinate value set of the distorted line segment;
according to the curve formula and a second coordinate value of the characteristic point in the rectangular coordinate system, obtaining the curvature of the distorted line segment at each characteristic point;
and carrying out reverse rotation on the original line segment corresponding to the distorted line segment according to the curvature of each characteristic point to obtain a correction curve.
6. A computer-readable storage medium, on which a computer program is stored, which program, when executed by a processor, carries out the steps of:
acquiring an original image and a distorted image;
decomposing the distorted image to obtain a plurality of sub-images only containing a single distorted line segment;
respectively acquiring distortion line segments in the sub-images, and respectively acquiring characteristic points of the distortion line segments;
generating a correction curve according to the characteristic points of the distorted line segment and the original line segment corresponding to the distorted line segment;
generating a corrected image according to the correction curve corresponding to each original line segment;
projecting the corrected image.
7. The computer-readable storage medium of claim 6, wherein the obtaining the distortion line segments in the sub-images respectively is specifically:
carrying out graying processing on a sub-image;
respectively carrying out binarization processing on the sub-image after the graying processing according to a preset threshold value;
and obtaining pixel points with the gray value of a preset gray value in the sub-image after the binarization processing to obtain distorted line segments.
8. The computer-readable storage medium of claim 6, wherein the feature points comprise a start point, an end point, a most significant point between the start point and the end point, a bisector point between the start point and the most significant point, and a bisector point between the most significant point and the end point.
9. The computer-readable storage medium according to claim 8, wherein the 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 specifically includes:
obtaining a distorted line segment and an original line segment corresponding to the distorted line segment;
acquiring original points of the original line segment, which respectively correspond to the characteristic points of the distorted line segment;
making a first straight line, wherein the first straight line passes through the maximum point on the distorted line segment and is parallel to the straight line where the starting point and the end point of the original line segment are located;
respectively calculating the distance from each characteristic point to the first straight line;
respectively acquiring correction points corresponding to the original points according to the distance of each characteristic point;
a correction curve is generated from the correction points.
10. The computer-readable storage medium of claim 8, wherein the distorted line segment corresponds to an original line segment that is a straight line segment;
the generating of the correction curve according to the feature points of the distorted line segment and the original line segment corresponding to the distorted line segment specifically comprises:
obtaining a distorted line segment and an original line segment corresponding to the distorted line segment;
taking the starting point of the distorted line segment as an origin, taking the straight line of the original line segment as a coordinate axis, and establishing a rectangular coordinate system;
calculating to obtain a second coordinate value set of the distortion line segment in the rectangular coordinate system according to the first coordinate value set of the distortion line segment in the sub-image;
fitting to obtain a corresponding curve formula according to the second coordinate value set of the distorted line segment;
according to the curve formula and a second coordinate value of the characteristic point in the rectangular coordinate system, obtaining the curvature of the distorted line segment at each characteristic point;
and carrying out reverse rotation on the original line segment corresponding to the distorted line segment according to the curvature of each characteristic point to obtain a correction curve.
CN201910167303.5A 2019-03-06 2019-03-06 Image distortion correction method and computer-readable storage medium Pending CN111667414A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910167303.5A CN111667414A (en) 2019-03-06 2019-03-06 Image distortion correction method and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910167303.5A CN111667414A (en) 2019-03-06 2019-03-06 Image distortion correction method and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN111667414A true CN111667414A (en) 2020-09-15

Family

ID=72381893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910167303.5A Pending CN111667414A (en) 2019-03-06 2019-03-06 Image distortion correction method and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN111667414A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112070705A (en) * 2020-11-16 2020-12-11 天津天瞳威势电子科技有限公司 Camera evaluation method and device and storage medium
CN112164377A (en) * 2020-08-27 2021-01-01 江苏泽景汽车电子股份有限公司 Self-adaption method for HUD image correction
CN114302044A (en) * 2021-12-30 2022-04-08 江西盛泰精密光学有限公司 AA assembling method for medical lens module
CN115760595A (en) * 2022-10-26 2023-03-07 中国电子科技集团公司第五十四研究所 Ultra-wide-angle lens photo distortion correction method based on line segment characteristics

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112164377A (en) * 2020-08-27 2021-01-01 江苏泽景汽车电子股份有限公司 Self-adaption method for HUD image correction
CN112164377B (en) * 2020-08-27 2022-04-01 江苏泽景汽车电子股份有限公司 Self-adaption method for HUD image correction
CN112070705A (en) * 2020-11-16 2020-12-11 天津天瞳威势电子科技有限公司 Camera evaluation method and device and storage medium
CN112070705B (en) * 2020-11-16 2021-02-02 天津天瞳威势电子科技有限公司 Camera evaluation method and device and storage medium
CN114302044A (en) * 2021-12-30 2022-04-08 江西盛泰精密光学有限公司 AA assembling method for medical lens module
CN114302044B (en) * 2021-12-30 2023-11-28 江西盛泰精密光学有限公司 AA assembling method for medical lens module
CN115760595A (en) * 2022-10-26 2023-03-07 中国电子科技集团公司第五十四研究所 Ultra-wide-angle lens photo distortion correction method based on line segment characteristics

Similar Documents

Publication Publication Date Title
CN111667414A (en) Image distortion correction method and computer-readable storage medium
CN109688392B (en) AR-HUD optical projection system, mapping relation calibration method and distortion correction method
EP2009590B1 (en) Drive assistance device
US8675041B2 (en) Vehicle periphery monitoring device
CN111476104B (en) AR-HUD image distortion correction method, device and system under dynamic eye position
JP5011049B2 (en) Image processing system
WO2009116328A1 (en) Image processing device and method, driving support system, and vehicle
US11263758B2 (en) Image processing method and apparatus
JP6390032B2 (en) Head-up display distortion correction method and head-up display distortion correction apparatus using the same
CN112584114B (en) Head-up display and image correction method thereof
CN111127365B (en) HUD distortion correction method based on cubic spline curve fitting
EP3326145B1 (en) Panel transform
WO2016129552A1 (en) Camera parameter adjustment device
CN111242866A (en) Neural network interpolation method for AR-HUD virtual image distortion correction under observer dynamic eye position condition
WO2018222122A1 (en) Methods for perspective correction, computer program products and systems
CN112825546A (en) Generating a composite image using an intermediate image surface
US20120106868A1 (en) Apparatus and method for image correction
JP7081265B2 (en) Image processing equipment
CN108713216B (en) Method for perspective transformation and output of image content, head-up display and output system, and vehicle
JP2006127083A (en) Image processing method, and image processor
US20210400190A1 (en) Partial image generating device, storage medium storing computer program for partial image generation and partial image generating method
CN111241946B (en) Method and system for increasing FOV (field of view) based on single DLP (digital light processing) optical machine
US20230085310A1 (en) Image processing device, image processing method, program, and image presentation system
US20220222947A1 (en) Method for generating an image of vehicle surroundings, and apparatus for generating an image of vehicle surroundings
CN115509213A (en) Vehicle live-action navigation display control method and system, controller and vehicle-mounted AR-HUD

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