CN116823681A - Method, device and system for correcting distortion of infrared image and storage medium - Google Patents

Method, device and system for correcting distortion of infrared image and storage medium Download PDF

Info

Publication number
CN116823681A
CN116823681A CN202311113133.5A CN202311113133A CN116823681A CN 116823681 A CN116823681 A CN 116823681A CN 202311113133 A CN202311113133 A CN 202311113133A CN 116823681 A CN116823681 A CN 116823681A
Authority
CN
China
Prior art keywords
distortion
infrared image
correction
coefficient
distortion coefficient
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.)
Granted
Application number
CN202311113133.5A
Other languages
Chinese (zh)
Other versions
CN116823681B (en
Inventor
汪忠杰
李永军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Snegrid Electric Technology Co ltd
Original Assignee
Snegrid Electric Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Snegrid Electric Technology Co ltd filed Critical Snegrid Electric Technology Co ltd
Priority to CN202311113133.5A priority Critical patent/CN116823681B/en
Publication of CN116823681A publication Critical patent/CN116823681A/en
Application granted granted Critical
Publication of CN116823681B publication Critical patent/CN116823681B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10048Infrared image

Landscapes

  • Image Processing (AREA)

Abstract

The invention discloses a distortion correction method, device and system for an infrared image and a storage medium, wherein the method comprises the following steps: acquiring a distorted infrared image and acquiring coordinates of a plurality of preset characteristic points in the distorted infrared image; obtaining a plurality of groups of distortion coefficients; substituting the coordinates of a plurality of preset characteristic points in the distorted infrared image and each group of distortion coefficients in a plurality of groups of distortion coefficients into a distortion correction model in sequence to obtain the coordinates of a plurality of groups of corrected preset characteristic points; determining straightness after each correction according to the coordinates of a plurality of groups of preset characteristic points after correction, wherein the straightness is used as an evaluation index of the correction effect after each correction; and determining an optimal distortion coefficient from the plurality of groups of distortion coefficients according to the straightness, and correcting the distorted infrared image according to the optimal distortion coefficient. Therefore, the distortion correction of the infrared image is realized on the premise of not needing a calibration plate.

Description

Method, device and system for correcting distortion of infrared image and storage medium
Technical Field
The present invention relates to the field of image distortion correction technology, and in particular, to a method for correcting distortion of an infrared image, a computer readable storage medium, an apparatus for correcting distortion of an infrared image, and a system for correcting distortion of an infrared image.
Background
For image correction, the distortion correction method of the related art generally obtains an image through a calibration plate, performs image processing to calculate distortion parameters, and corrects the image through a Zhengyou method, however, the problem of the related art is that since the resolution of an infrared image formed by an infrared camera through a temperature chip is low, the distortion correction method of the image of the commonly used calibration plate has a certain requirement on the resolution of the image, so that a good corrected infrared image cannot be obtained.
Disclosure of Invention
The present invention aims to solve at least one of the technical problems in the related art to some extent. Therefore, a first object of the present invention is to provide a method for correcting distortion of an infrared image, which can correct the distortion of the infrared image without a calibration plate.
A second object of the present invention is to propose a computer readable storage medium.
A third object of the present invention is to provide an apparatus for correcting distortion of an infrared image.
A fourth object of the present invention is to provide an infrared image distortion correction system.
In order to achieve the above object, a method for correcting distortion of an infrared image according to an embodiment of the first aspect of the present invention includes: acquiring a distorted infrared image and acquiring coordinates of a plurality of preset feature points in the distorted infrared image; obtaining a plurality of groups of distortion coefficients, wherein the distortion coefficients comprise a first radial distortion coefficient, a second radial distortion coefficient, a first tangential distortion coefficient and a second tangential distortion coefficient; substituting the coordinates of a plurality of preset feature points in the distorted infrared image and each set of distortion coefficients in the plurality of sets of distortion coefficients into a distortion correction model in sequence to obtain the coordinates of a plurality of sets of corrected preset feature points; determining straightness after each correction according to the coordinates of the plurality of groups of corrected preset characteristic points, wherein the straightness is used as an evaluation index of the correction effect after each correction; and determining an optimal distortion coefficient from the plurality of groups of distortion coefficients according to the straightness, and correcting the distorted infrared image according to the optimal distortion coefficient.
According to the distortion correction method for the infrared image, disclosed by the embodiment of the invention, the coordinates of a plurality of preset characteristic points in the distorted infrared image and each set of distortion coefficients in a plurality of sets of distortion coefficients are sequentially substituted into a distortion correction model to obtain the coordinates of a plurality of sets of corrected preset characteristic points, further, the straightness after each correction is determined according to the coordinates of a plurality of sets of corrected preset characteristic points, the straightness is used as an evaluation index of the correction effect after each correction, and the optimal distortion coefficient is determined from the plurality of sets of distortion coefficients according to the straightness, and the distorted infrared image is corrected according to the optimal distortion coefficient. Therefore, the distortion correction of the infrared image is realized without using a calibration plate and other calibration tools.
Further, the method for correcting the distortion of the infrared image according to the embodiment of the invention may further have the following additional technical features:
according to one embodiment of the present invention, the first radial distortion coefficient, the second radial distortion coefficient, and the first tangential distortion coefficient are all in the range (-1, 1).
According to one embodiment of the present invention, the obtaining a plurality of sets of correction distortion coefficients includes: and sequentially transforming the first radial distortion coefficient, the second radial distortion coefficient and the first tangential distortion coefficient from-1 to 1 according to a preset interval to obtain the plurality of groups of distortion coefficients.
According to one embodiment of the present invention, determining an optimal distortion coefficient from the plurality of sets of distortion coefficients according to the straightness comprises: determining the minimum straightness from the straightness after each correction; and determining the first radial distortion coefficient, the second radial distortion coefficient, the first tangential distortion coefficient and the second tangential distortion coefficient corresponding to the minimum straightness as the optimal distortion coefficients.
According to one embodiment of the invention, the sum of the first radial distortion coefficient, the second radial distortion coefficient, the first tangential distortion coefficient and the second tangential distortion coefficient is 1.
According to one embodiment of the present invention, the distortion correction model is:
wherein , and />For the coordinates of the corrected preset feature points, < >> and />For distorting the coordinates of preset feature points in the infrared image,/o> and />For the central coordinates of the distorted infrared image, < +.>For the first radial distortion coefficient, < >>For the second radial distortion coefficient,>for the first tangential distortion coefficient, +.>For the second tangential distortion coefficient, +.>The distance between the coordinates of the preset characteristic points in the distorted infrared image and the central coordinates of the distorted infrared image is set.
According to one embodiment of the present invention, the correcting the distorted infrared image according to the optimal distortion coefficient includes: substituting a first radial distortion coefficient, a second radial distortion coefficient, a first tangential distortion coefficient and a second tangential distortion coefficient corresponding to the minimum straightness into the distortion correction model; correcting the coordinates of all pixel points of the distorted infrared image through the distortion correction model; and generating a corrected infrared image according to the coordinates of all corrected pixel points.
To achieve the above object, a computer readable storage medium according to a second aspect of the present invention stores thereon a distortion correcting program for an infrared image, which when executed by a processor, implements the method for correcting distortion of an infrared image according to the above embodiment of the present invention.
According to the computer readable storage medium, the distortion correction of the infrared image can be realized under the condition that a calibration plate and other calibration tools are not used by executing the distortion correction program of the infrared image.
In order to achieve the above object, an apparatus for correcting distortion of an infrared image according to an embodiment of the present invention includes: the first acquisition module is used for acquiring the distorted infrared image and acquiring coordinates of a plurality of preset feature points in the distorted infrared image; the second acquisition module is used for acquiring a plurality of groups of distortion coefficients, wherein the distortion coefficients comprise a first radial distortion coefficient, a second radial distortion coefficient, a first tangential distortion coefficient and a second tangential distortion coefficient; the third acquisition module is used for substituting the coordinates of a plurality of preset characteristic points in the distorted infrared image and each group of distortion coefficients in the plurality of groups of distortion coefficients into a distortion correction model in sequence so as to acquire the coordinates of a plurality of groups of corrected preset characteristic points; the screening module is used for determining straightness after each correction according to the coordinates of the plurality of groups of corrected preset characteristic points, and the straightness is used as an evaluation index of the correction effect after each correction; and the image correction module is used for determining an optimal distortion coefficient from the plurality of groups of distortion coefficients according to the straightness and correcting the distorted infrared image according to the optimal distortion coefficient.
According to the distortion correction device for the infrared image, disclosed by the embodiment of the invention, the distorted infrared image is obtained through the first obtaining module, the coordinates of a plurality of preset characteristic points in the distorted infrared image are obtained through the second obtaining module, a plurality of groups of distortion coefficients are obtained through the second obtaining module, the coordinates of the preset characteristic points in the distorted infrared image and each group of distortion coefficients in the plurality of groups of distortion coefficients are sequentially substituted into the distortion correction model through the third obtaining module, the coordinates of a plurality of groups of corrected preset characteristic points are obtained, then the straightness after each correction is determined through the screening module according to the coordinates of the plurality of groups of corrected preset characteristic points, the straightness is used as an evaluation index of the correction effect after each correction, the optimal distortion coefficients are determined from the plurality of groups of distortion coefficients through the image correction module, and the distorted infrared image is corrected according to the optimal distortion coefficients. Therefore, the distortion correction of the infrared image is realized without using a calibration plate and other calibration tools.
In order to achieve the above object, an infrared image distortion correction system according to a fourth aspect of the present invention includes the above-mentioned infrared image distortion correction device according to the embodiment of the present invention.
According to the distortion correction system for the infrared image, provided by the embodiment of the invention, the distortion correction of the infrared image can be realized under the condition that a calibration plate and other calibration tools are not used by adopting the distortion correction device for the infrared image.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 is a flow chart of a method for distortion correction of an infrared image according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of a distorted infrared image marked with preset feature points according to one embodiment of the invention;
FIG. 3 is an image effect diagram of a distorted infrared image based on different distortion coefficients according to one embodiment of the invention;
FIG. 4 is an image effect diagram of a distorted infrared image based on different distortion coefficients according to one embodiment of the invention;
FIG. 5 is an image effect diagram of a distorted infrared image based on different distortion coefficients according to one embodiment of the invention;
FIG. 6 is an image effect diagram of a distorted infrared image based on different distortion coefficients according to one embodiment of the invention;
FIG. 7 is an image effect diagram of a distorted infrared image based on different distortion coefficients according to one embodiment of the invention;
FIG. 8 is an image effect diagram of a distorted infrared image based on different distortion coefficients according to one embodiment of the invention;
FIG. 9 is a flow chart of a method for distortion correction of an infrared image according to one embodiment of the present invention;
FIG. 10 is a flow chart of a method for distortion correction of an infrared image according to another embodiment of the present invention;
FIG. 11 is a schematic illustration of an distorted infrared image according to one embodiment of the invention;
FIG. 12 is a schematic illustration of a rectified infrared image in accordance with an embodiment of the invention;
FIG. 13 is a block schematic diagram of an infrared image distortion correction apparatus in accordance with an embodiment of the present invention;
fig. 14 is a block schematic diagram of an infrared image distortion correction system in accordance with an embodiment of the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
The method for correcting distortion of an infrared image, a computer-readable storage medium, an apparatus for correcting distortion of an infrared image, and a system for correcting distortion of an infrared image according to embodiments of the present invention are described below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a method for correcting distortion of an infrared image according to an embodiment of the present invention.
Specifically, in some embodiments of the present invention, as shown in fig. 1, a method for correcting distortion of an infrared image includes:
s101, acquiring a distorted infrared image and acquiring coordinates of a plurality of preset feature points in the distorted infrared image.
It will be appreciated that in this embodiment of the present invention, mxN preset feature points may be marked in the distorted infrared image, where M and N are both greater than or equal to 3, for example, as shown in fig. 2, 3x3 preset feature points are selected in the distorted infrared image, where the preset feature points are denoted as A1, A2, A3, B1, B2, B3, C1, C2, C3, respectively, where the preset feature points A1, A2, and A3 constitute a line segment a, the preset feature points B1, B2, and B3 constitute a line segment B, the preset feature points C1, C2, and C3 constitute a line segment C, coordinates of each preset feature may be expressed as (xn, yn), an upper left corner coordinate of the distorted infrared image is [0,0], a lower right corner coordinate of the distorted infrared image is [ w, h ] w is wide, and h is high in resolution of the distorted infrared image.
It should be noted that, in the above embodiment of the present invention, the preset feature points A1, A2 and A3 are all on the same line in the original infrared image, the preset feature points B1, B2 and B3 are all on the same line in the original infrared image, and the preset feature points C1, C2 and C3 are all on the same line in the original infrared image.
S102, obtaining a plurality of groups of distortion coefficients, wherein the distortion coefficients comprise a first radial distortion coefficient, a second radial distortion coefficient, a first tangential distortion coefficient and a second tangential distortion coefficient.
Alternatively, in some embodiments of the present invention, the first radial distortion coefficient, the second radial distortion coefficient, and the first tangential distortion coefficient are all in the range (-1, 1).
Further, in some embodiments of the invention, the sum of the first radial distortion coefficient, the second radial distortion coefficient, the first tangential distortion coefficient, and the second tangential distortion coefficient is 1.
It will be appreciated that in this embodiment of the invention, the first radial distortion coefficientSecond radial distortion coefficientFirst tangential distortion coefficient->And a second tangential distortion coefficient->The sum is 1, i.e.)>+/>+/>+/>=1。
It should be noted that, in the above embodiment of the present invention, as shown in fig. 3 to 8, assuming that the first radial distortion coefficient, the second radial distortion coefficient, the first tangential distortion coefficient, and the second tangential distortion coefficient are valued from the valued range, an image composed of all the deformed points of the image can be obtained, where fig. 3 shows that=-1,/>=0,/>An infrared image of =0, shown in fig. 4 is +.>=1,/>=0,/>An infrared image of =0, shown in fig. 5 is +.>=0,/>=-1,/>An infrared image of =0, shown in fig. 6 is +.>=0,/>=1,/>An infrared image of =0, fig. 7 shows +.>=0,/>=0,/>Infrared image of = -1, fig. 8 shows +.>=0,/>=0,/>Infrared image of=1.
Specifically, in some embodiments of the present invention, obtaining multiple sets of correction distortion coefficients includes: and sequentially transforming the first radial distortion coefficient, the second radial distortion coefficient and the first tangential distortion coefficient from-1 to 1 according to a preset interval to obtain a plurality of groups of distortion coefficients.
It will be appreciated that in the present inventionIn this embodiment, the first radial distortion coefficient may be computer programmedIs set to-1 and gradually increases the preset interval until the first radial distortion coefficient +.>Equal to 1, then, the second radial distortion coefficient +.>Is set to-1 and gradually increases the preset interval until the second radial distortion coefficient +.>Equal to 1, and, again, the first tangential distortion coefficient +.>Is set to-1 and gradually increases the preset interval until the first tangential distortion coefficient +.>Equal to 1. Thus, a plurality of sets of distortion coefficients are obtained.
Alternatively, in the above-described embodiment of the present invention, the preset interval may be set accordingly according to the calculation complexity and the calculation accuracy, for example, the preset interval may be 0.01, 0.001, 0.0001, or the like, wherein the longer the preset interval is, the more groups of distortion coefficients are.
S103, substituting the coordinates of a plurality of preset feature points in the distorted infrared image and each set of distortion coefficients in a plurality of sets of distortion coefficients into the distortion correction model in sequence to obtain the coordinates of a plurality of sets of corrected preset feature points.
It can be understood that the coordinates of a plurality of preset feature points in the distorted infrared image can be corrected by using the distortion correction model, and in this embodiment of the present invention, the coordinates of a plurality of preset feature points corresponding to each set of distortion coefficients after correction can be obtained by substituting the coordinates of a plurality of preset feature points in the distorted infrared image and each set of distortion coefficients in the distortion correction model in sequence.
And S104, determining straightness after each correction according to the coordinates of the plurality of groups of preset characteristic points after correction, wherein the straightness is used as an evaluation index of the correction effect after each correction.
It will be appreciated that in this embodiment of the present invention, the distance between each preset feature point may be determined according to the coordinates of a plurality of preset feature points after correction, and then the straightness after correction may be determined according to the distance between each preset feature point, for example, straightness s=d/L may be defined, taking line a (one end of line a is A1, the other end of line a is A3) as an example, the distance of the center point A2 from line a is denoted as DA, the length of line a is denoted as LA, the straightness sa=da/LA of line a may be obtained based on the above equation, and then the straightness SB of line B (one end of line B is B1, the other end of line B is B3) and the straightness SC of line C (one end of line C is C1, the other end of line C is C3) may be obtained based on the same principle, and further, the sum of straightness of line a, line B and line C is taken as straightness sk=sa+sc after correction each time, where the straightness Sk after correction is estimated to be equal to 0.
S105, determining an optimal distortion coefficient from a plurality of groups of distortion coefficients according to straightness, and correcting the distorted infrared image according to the optimal distortion coefficient.
It can be understood that in this embodiment of the present invention, the straightness after each correction corresponds to a set of distortion coefficients, so that the optimal distortion coefficient can be determined according to the straightness after each correction, and further, the distorted infrared image can be corrected according to the optimal distortion coefficient. Therefore, the distortion correction of the infrared image is realized by the distortion correction method of the infrared image in the embodiment of the invention under the condition of not using the calibration plate and other calibration tools.
Further, in some embodiments of the present invention, as shown in fig. 9, determining an optimal distortion coefficient from a plurality of sets of distortion coefficients according to straightness includes:
s201, determining the minimum straightness from the straightness after each correction.
It can be understood that, since the straightness can be used as an evaluation index of the correction effect after each correction, and each set of distortion coefficients in the plurality of sets of distortion coefficients corresponds to the corrected straightness, in this embodiment of the present invention, the minimum straightness can be determined from the straightness after each correction, so that the optimal distortion coefficient can be determined from the plurality of sets of distortion coefficients by using the minimum straightness.
S202, determining a first radial distortion coefficient, a second radial distortion coefficient, a first tangential distortion coefficient and a second tangential distortion coefficient corresponding to the minimum straightness as optimal distortion coefficients.
It can be understood that, since the distortion coefficient corresponding to the minimum straightness is optimal for the correction effect of the distorted infrared image, in this embodiment of the present invention, the first radial distortion coefficient, the second radial distortion coefficient, the first tangential distortion coefficient and the second tangential distortion coefficient corresponding to the minimum straightness may be determined as optimal distortion coefficients, so as to correct the distorted infrared image by using the optimal distortion coefficients, so as to obtain a good corrected infrared image.
Further, in some embodiments of the present invention, the distortion correction model is:
wherein , and />For the coordinates of the corrected preset feature points, < >> and />For distorting the coordinates of preset feature points in the infrared image,/o> and />For the central coordinates of the distorted infrared image, < +.>For the first radial distortion coefficient, < >>For the second radial distortion coefficient,>for the first tangential distortion coefficient, +.>For the second tangential distortion coefficient, +.>The distance between the coordinates of the preset characteristic points in the distorted infrared image and the central coordinates of the distorted infrared image is set.
It can be understood that in this embodiment of the present invention, the coordinates of a plurality of preset feature points in the distorted infrared image and each set of distortion coefficients in the plurality of sets of distortion coefficients may be substituted into the above formula in order to obtain the coordinates of a plurality of preset feature points corrected by the distortion coefficients corresponding to each set of distortion coefficients.
Further, in some embodiments of the present invention, as shown in fig. 10, correcting the distorted infrared image according to the optimal distortion coefficient includes:
s301, substituting a first radial distortion coefficient, a second radial distortion coefficient, a first tangential distortion coefficient and a second tangential distortion coefficient corresponding to the minimum straightness into the distortion correction model.
It will be appreciated that in this embodiment of the present invention, the first radial distortion coefficient, the second radial distortion coefficient, the first tangential distortion coefficient, and the second tangential distortion coefficient corresponding to the minimum straightness may be substituted into the distortion correction model to construct the distortion correction model for performing image correction.
And S302, correcting the coordinates of all pixel points of the distorted infrared image through the distortion correction model.
It can be appreciated that in this embodiment of the present invention, the coordinates of all the pixels of the distorted infrared image may be substituted into the distortion correction model to correct, and the distortion correction model may output the corrected coordinates of all the pixels of the distorted infrared image.
And S303, generating a corrected infrared image according to the coordinates of all corrected pixel points.
It is understood that a new image may be generated using the coordinates of all the corrected pixels and the image may be used as a corrected infrared image, so that the distorted infrared image with the distorted state is corrected into a corrected infrared image without the distorted state by substituting the distortion correction model with the optimal distortion coefficient.
The following describes a correction procedure of the distortion correction method for an infrared image with reference to the drawings and embodiments of the present invention.
Assume that 3x3 preset feature points (A1, A2, A3, B1, B2, B3, C1, C2, C3) are marked in the distorted infrared image to be corrected, wherein the preset feature points A1, A2, and A3 constitute a line segment a, the preset feature points B1, B2, and B3 constitute a line segment B, and the preset feature points C1, C2, and C3 constitute a line segment C.
Firstly, a plurality of groups of distortion coefficients (a first radial distortion coefficient, a second radial distortion coefficient, a first tangential distortion coefficient and a second tangential distortion coefficient in each group of distortion coefficients are not identical to those of other groups of distortion coefficients) are obtained, and the plurality of groups of distortion coefficients are sequentially substituted into a distortion correction model, and then, the coordinates of a plurality of groups of corrected preset feature points (A1 d, A2d, A3d, B1d, B2d, B3d, C1d, C2d and C3 d) are obtained through the coordinates of each preset feature point (A1, A2, A3, B2, C2, B2, C3 d) and the distortion correction model.
Secondly, calculating straightness after each correction according to the coordinates of a plurality of groups of preset characteristic points (A1 d, A2d, A3d, B1d, B2d, B3d, C1d, C2d and C3 d) after correction, wherein the straightness after each correction is the sum of the straightness of a line segment A, the straightness of a line segment B and the straightness of a line segment C, and each group of straightness sum corresponds to one group of distortion coefficients.
Finally, the minimum straightness is determined by screening the minimum value of the straightness after each correction, and then a first radial distortion coefficient, a second radial distortion coefficient, a first tangential distortion coefficient and a second tangential distortion coefficient corresponding to the minimum straightness are determined, and the first radial distortion coefficient, the second radial distortion coefficient, the first tangential distortion coefficient and the second tangential distortion coefficient corresponding to the minimum straightness are used as optimal distortion coefficients, so that the distorted infrared image with the distortion state shown in fig. 11 is corrected into the corrected infrared image without the distortion state shown in fig. 12 by substituting the distortion correction model with the optimal distortion coefficients.
For example, in one embodiment of the present invention, it is assumed that the coordinates of each preset feature point are as follows: a1 When the first radial distortion coefficient is-0.23, the second radial distortion coefficient is-0.17, the first tangential distortion coefficient is-0.67, the second tangential distortion coefficient is-1.73, the straightness is 0.107 by combining the coordinates of each preset feature point with the distortion correction model, the first tangential distortion coefficient is-0.2, the second radial distortion coefficient is 0.19, the first tangential distortion coefficient is-0.53, the second tangential distortion coefficient is 1.64, the straightness is 0.311 by combining the coordinates of each preset feature point with the distortion correction model, and the straightness is 0.112 by combining the coordinates of the first radial distortion coefficient with the first tangential distortion coefficient and the second tangential distortion coefficient.
As compared with the prior art, when the first radial distortion coefficient is-0.2, the second radial distortion coefficient is-0.19, the first tangential distortion coefficient is-0.53, and the second tangential distortion coefficient is-1.64, the straightness is 0.107, which is calculated, is the smallest, so that the first radial distortion coefficient is-0.2, the second radial distortion coefficient is-0.19, the first tangential distortion coefficient is-0.53, and the second tangential distortion coefficient is-1.64 as the optimal distortion coefficient, and further, the image can be corrected by substituting the distortion correction model with the optimal distortion coefficient, so that the distortion correction of the infrared image can be realized under the condition of not using a calibration plate and other calibration tools.
In summary, according to the distortion correction method for an infrared image of the embodiment of the present invention, coordinates of a plurality of preset feature points in a distorted infrared image and each set of distortion coefficients in a plurality of sets of distortion coefficients are sequentially substituted into a distortion correction model to obtain coordinates of a plurality of sets of corrected preset feature points, further, straightness after each correction is determined according to the coordinates of a plurality of sets of corrected preset feature points, the straightness is used as an evaluation index of a correction effect after each correction, an optimal distortion coefficient is determined from a plurality of sets of distortion coefficients according to the straightness, and the distorted infrared image is corrected according to the optimal distortion coefficient. Therefore, the distortion correction of the infrared image is realized without using a calibration plate and other calibration tools.
Based on the method for correcting the distortion of the infrared image according to the embodiment of the present invention, the embodiment of the present invention further provides a computer readable storage medium, on which a program for correcting the distortion of the infrared image is stored, where the program for correcting the distortion of the infrared image is executed by a processor to implement the method for correcting the distortion of the infrared image according to the embodiment of the present invention.
It should be noted that, for reducing redundancy, reference may be made to the specific implementation of the method for correcting distortion of an infrared image according to the embodiment of the present invention for the specific implementation of the computer readable storage medium according to the embodiment of the present invention.
In summary, according to the computer-readable storage medium of the embodiment of the present invention, by executing the distortion correction program of the infrared image, the distortion correction of the infrared image can be achieved without using a calibration board or other calibration tool.
Fig. 13 is a block schematic diagram of an infrared image distortion correction apparatus according to an embodiment of the present invention.
Specifically, in some implementations of the invention, as shown in fig. 13, an apparatus 100 for correcting distortion of an infrared image includes: the system comprises a first acquisition module 10, a second acquisition module 20, a third acquisition module 30, a screening module 40 and an image correction module 50.
Specifically, the first obtaining module 10 is configured to obtain a distorted infrared image, and obtain coordinates of a plurality of preset feature points in the distorted infrared image; the second obtaining module 20 is configured to obtain a plurality of sets of distortion coefficients, where the distortion coefficients include a first radial distortion coefficient, a second radial distortion coefficient, a first tangential distortion coefficient, and a second tangential distortion coefficient; the third obtaining module 30 is configured to sequentially substitute the coordinates of a plurality of preset feature points in the distorted infrared image and each set of distortion coefficients in the plurality of sets of distortion coefficients into the distortion correction model, so as to obtain the coordinates of a plurality of sets of corrected preset feature points; the screening module 40 is configured to determine straightness after each correction according to coordinates of a plurality of groups of preset feature points after correction, where the straightness is used as an evaluation index of correction effects after each correction; the image correction module 50 is configured to determine an optimal distortion coefficient from a plurality of sets of distortion coefficients according to the straightness and correct the distorted infrared image according to the optimal distortion coefficient.
Further, in one embodiment of the present invention, the first radial distortion coefficient, the second radial distortion coefficient, and the first tangential distortion coefficient are all in the range (-1, 1).
Further, in an embodiment of the present invention, the second obtaining module 20 is further configured to sequentially transform the first radial distortion coefficient, the second radial distortion coefficient, and the first tangential distortion coefficient from-1 to 1 according to a preset interval, so as to obtain multiple sets of distortion coefficients.
Further, in one embodiment of the present invention, the screening module 40 is further configured to determine a minimum straightness from the straightness after each correction; and determining the first radial distortion coefficient, the second radial distortion coefficient, the first tangential distortion coefficient and the second tangential distortion coefficient corresponding to the minimum straightness as optimal distortion coefficients.
Further, in one embodiment of the invention, the sum of the first radial distortion coefficient, the second radial distortion coefficient, the first tangential distortion coefficient, and the second tangential distortion coefficient is 1.
Further, in one embodiment of the present invention, the distortion correction model is:
wherein , and />For the coordinates of the corrected preset feature points, < >> and />For distorting the coordinates of preset feature points in the infrared image,/o> and />For the central coordinates of the distorted infrared image, < +.>For the first radial distortion coefficient, < >>Is the firstTwo radial distortion coefficients>For the first tangential distortion coefficient, +.>For the second tangential distortion coefficient, +.>The distance between the coordinates of the preset characteristic points in the distorted infrared image and the central coordinates of the distorted infrared image is set.
Further, in one embodiment of the present invention, the image correction module 50 is further configured to substitute the first radial distortion coefficient, the second radial distortion coefficient, the first tangential distortion coefficient, and the second tangential distortion coefficient corresponding to the minimum straightness into the distortion correction model; correcting the coordinates of all pixel points of the distorted infrared image through a distortion correction model; and generating a corrected infrared image according to the coordinates of all corrected pixel points.
It should be noted that, for the specific implementation manner of the distortion correction apparatus for an infrared image according to the embodiment of the present invention, reference may be made to the specific implementation manner of the distortion correction method for an infrared image according to the embodiment of the present invention, and in order to reduce redundancy, details are not repeated here.
In summary, according to the distortion correction device for an infrared image in the embodiment of the invention, a distorted infrared image is acquired through a first acquisition module, the coordinates of a plurality of preset feature points in the distorted infrared image are acquired, a plurality of groups of distortion coefficients are acquired through a second acquisition module, the coordinates of the plurality of preset feature points in the distorted infrared image and each group of distortion coefficients in the plurality of groups of distortion coefficients are sequentially substituted into a distortion correction model through a third acquisition module, the coordinates of a plurality of groups of corrected preset feature points are acquired, then, the straightness after each correction is determined through a screening module according to the coordinates of the plurality of groups of corrected preset feature points, the straightness is used as an evaluation index of the correction effect after each correction, and an optimal distortion coefficient is determined from the plurality of groups of distortion coefficients through an image correction module according to the straightness, and the distorted infrared image is corrected according to the optimal distortion coefficient. Therefore, the distortion correction of the infrared image is realized without using a calibration plate and other calibration tools.
Fig. 14 is a block schematic diagram of an infrared image distortion correction system in accordance with an embodiment of the present invention.
Specifically, in some implementations of the present invention, as shown in fig. 14, an infrared image distortion correction system 1000 includes the infrared image distortion correction apparatus 100 according to the above-described embodiments of the present invention.
It should be noted that, for the specific implementation of the distortion correction system for an infrared image according to the embodiment of the present invention, reference may be made to the specific implementation of the distortion correction method for an infrared image according to the embodiment of the present invention, and in order to reduce redundancy, details are not repeated here.
In summary, according to the system for correcting the distortion of the infrared image provided by the embodiment of the invention, by adopting the device for correcting the distortion of the infrared image, the distortion of the infrared image can be corrected under the condition that a calibration plate and other calibration tools are not used.
It should be noted that the logic and/or steps represented in the flowcharts or otherwise described herein, for example, may be considered as a ordered listing of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory. It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the device or element being referred to must have a specific orientation, be configured and operated in a specific orientation, and therefore should not be construed as limiting the present invention.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," "secured," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly, through intermediaries, or both, may be in communication with each other or in interaction with each other, unless expressly defined otherwise. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
In the present invention, unless expressly stated or limited otherwise, a first feature "up" or "down" a second feature may be the first and second features in direct contact, or the first and second features in indirect contact via an intervening medium. Moreover, a first feature being "above," "over" and "on" a second feature may be a first feature being directly above or obliquely above the second feature, or simply indicating that the first feature is level higher than the second feature. The first feature being "under", "below" and "beneath" the second feature may be the first feature being directly under or obliquely below the second feature, or simply indicating that the first feature is less level than the second feature. While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.

Claims (10)

1. A method for distortion correction of an infrared image, the method comprising:
acquiring a distorted infrared image and acquiring coordinates of a plurality of preset feature points in the distorted infrared image;
obtaining a plurality of groups of distortion coefficients, wherein the distortion coefficients comprise a first radial distortion coefficient, a second radial distortion coefficient, a first tangential distortion coefficient and a second tangential distortion coefficient;
substituting the coordinates of a plurality of preset feature points in the distorted infrared image and each set of distortion coefficients in the plurality of sets of distortion coefficients into a distortion correction model in sequence to obtain the coordinates of a plurality of sets of corrected preset feature points;
determining straightness after each correction according to the coordinates of the plurality of groups of corrected preset characteristic points, wherein the straightness is used as an evaluation index of the correction effect after each correction;
and determining an optimal distortion coefficient from the plurality of groups of distortion coefficients according to the straightness, and correcting the distorted infrared image according to the optimal distortion coefficient.
2. The method of claim 1, wherein the first radial distortion coefficient, the second radial distortion coefficient, and the first tangential distortion coefficient are all (-1, 1).
3. The method for correcting distortion of an infrared image according to claim 2, wherein said obtaining a plurality of sets of correction distortion coefficients comprises:
and sequentially transforming the first radial distortion coefficient, the second radial distortion coefficient and the first tangential distortion coefficient from-1 to 1 according to a preset interval to obtain the plurality of groups of distortion coefficients.
4. The method of distortion correction of an infrared image according to claim 1, wherein determining an optimal distortion coefficient from the plurality of sets of distortion coefficients based on the straightness comprises:
determining the minimum straightness from the straightness after each correction;
and determining the first radial distortion coefficient, the second radial distortion coefficient, the first tangential distortion coefficient and the second tangential distortion coefficient corresponding to the minimum straightness as the optimal distortion coefficients.
5. The method of distortion correction of an infrared image according to any of claims 1-4, wherein a sum of the first radial distortion coefficient, the second radial distortion coefficient, the first tangential distortion coefficient, and the second tangential distortion coefficient is 1.
6. The method for correcting distortion of an infrared image according to claim 1, wherein the distortion correction model is:
wherein , and />For the coordinates of the corrected preset feature points, < >> and />For distorting the coordinates of preset feature points in the infrared image,/o> and />For the central coordinates of the distorted infrared image, < +.>For the first radial distortion coefficient, < >>For the second radial distortion coefficient,for the first tangential distortion coefficient, +.>For the second tangential distortion coefficient, +.>The distance between the coordinates of the preset characteristic points in the distorted infrared image and the central coordinates of the distorted infrared image is set.
7. The method of correcting distortion of an infrared image according to claim 4, wherein correcting the distorted infrared image according to the optimal distortion coefficient comprises:
substituting a first radial distortion coefficient, a second radial distortion coefficient, a first tangential distortion coefficient and a second tangential distortion coefficient corresponding to the minimum straightness into the distortion correction model;
correcting the coordinates of all pixel points of the distorted infrared image through the distortion correction model;
and generating a corrected infrared image according to the coordinates of all corrected pixel points.
8. A computer-readable storage medium, characterized in that a distortion correcting program of an infrared image is stored thereon, which when executed by a processor, implements the method of distortion correcting of an infrared image according to any one of claims 1-7.
9. An apparatus for correcting distortion in an infrared image, the apparatus comprising:
the first acquisition module is used for acquiring the distorted infrared image and acquiring coordinates of a plurality of preset feature points in the distorted infrared image;
the second acquisition module is used for acquiring a plurality of groups of distortion coefficients, wherein the distortion coefficients comprise a first radial distortion coefficient, a second radial distortion coefficient, a first tangential distortion coefficient and a second tangential distortion coefficient;
the third acquisition module is used for substituting the coordinates of a plurality of preset characteristic points in the distorted infrared image and each group of distortion coefficients in the plurality of groups of distortion coefficients into a distortion correction model in sequence so as to acquire the coordinates of a plurality of groups of corrected preset characteristic points;
the screening module is used for determining straightness after each correction according to the coordinates of the plurality of groups of corrected preset characteristic points, and the straightness is used as an evaluation index of the correction effect after each correction;
and the image correction module is used for determining an optimal distortion coefficient from the plurality of groups of distortion coefficients according to the straightness and correcting the distorted infrared image according to the optimal distortion coefficient.
10. An infrared image distortion correction system, wherein the infrared image distortion correction system comprises the infrared image distortion correction apparatus of claim 9.
CN202311113133.5A 2023-08-31 2023-08-31 Method, device and system for correcting distortion of infrared image and storage medium Active CN116823681B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311113133.5A CN116823681B (en) 2023-08-31 2023-08-31 Method, device and system for correcting distortion of infrared image and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311113133.5A CN116823681B (en) 2023-08-31 2023-08-31 Method, device and system for correcting distortion of infrared image and storage medium

Publications (2)

Publication Number Publication Date
CN116823681A true CN116823681A (en) 2023-09-29
CN116823681B CN116823681B (en) 2024-01-26

Family

ID=88114940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311113133.5A Active CN116823681B (en) 2023-08-31 2023-08-31 Method, device and system for correcting distortion of infrared image and storage medium

Country Status (1)

Country Link
CN (1) CN116823681B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719477A (en) * 2005-05-19 2006-01-11 上海交通大学 Calibration method of pick up camera or photographic camera geographic distortion
US20120057053A1 (en) * 2007-06-26 2012-03-08 Airbus Opertations (S.A.S) Method for high precision lens distortion calibration and removal
US20130100290A1 (en) * 2010-06-29 2013-04-25 Keiji Sato Image calibration method and image calibration device
CN103593836A (en) * 2012-08-14 2014-02-19 无锡维森智能传感技术有限公司 A Camera parameter calculating method and a method for determining vehicle body posture with cameras
CN105528770A (en) * 2015-12-31 2016-04-27 河北工业大学 Projector lens distortion correcting method
JP6164564B1 (en) * 2016-03-14 2017-07-19 リアロップ株式会社 Image processing apparatus, image processing method, recording medium, program, and imaging apparatus
CN107871329A (en) * 2017-12-18 2018-04-03 横琴峰云视觉技术有限公司 A kind of quick calibrating method and device at camera opticses center
CN108009981A (en) * 2017-09-26 2018-05-08 深圳市易成自动驾驶技术有限公司 Optimization method, device and the computer-readable recording medium of distortion parameter
CN113284189A (en) * 2021-05-12 2021-08-20 深圳市格灵精睿视觉有限公司 Distortion parameter calibration method, device, equipment and storage medium
US20220012854A1 (en) * 2020-07-08 2022-01-13 Nxp Usa, Inc. Method and system for image distortion correction using quarter and tangential lookup tables
WO2022127010A1 (en) * 2020-12-18 2022-06-23 南京佗道医疗科技有限公司 Perspective image correction method
CN115293979A (en) * 2022-07-13 2022-11-04 中南大学 Infrared image radial and tangential distortion correction method
CN115660995A (en) * 2022-11-03 2023-01-31 江苏南高智能装备创新中心有限公司 Camera orthodontic method and system using linear patterns
CN116012242A (en) * 2022-12-26 2023-04-25 华人运通(上海)自动驾驶科技有限公司 Camera distortion correction effect evaluation method, device, medium and equipment

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719477A (en) * 2005-05-19 2006-01-11 上海交通大学 Calibration method of pick up camera or photographic camera geographic distortion
US20120057053A1 (en) * 2007-06-26 2012-03-08 Airbus Opertations (S.A.S) Method for high precision lens distortion calibration and removal
US20130100290A1 (en) * 2010-06-29 2013-04-25 Keiji Sato Image calibration method and image calibration device
CN103593836A (en) * 2012-08-14 2014-02-19 无锡维森智能传感技术有限公司 A Camera parameter calculating method and a method for determining vehicle body posture with cameras
CN105528770A (en) * 2015-12-31 2016-04-27 河北工业大学 Projector lens distortion correcting method
JP6164564B1 (en) * 2016-03-14 2017-07-19 リアロップ株式会社 Image processing apparatus, image processing method, recording medium, program, and imaging apparatus
CN108009981A (en) * 2017-09-26 2018-05-08 深圳市易成自动驾驶技术有限公司 Optimization method, device and the computer-readable recording medium of distortion parameter
CN107871329A (en) * 2017-12-18 2018-04-03 横琴峰云视觉技术有限公司 A kind of quick calibrating method and device at camera opticses center
US20220012854A1 (en) * 2020-07-08 2022-01-13 Nxp Usa, Inc. Method and system for image distortion correction using quarter and tangential lookup tables
WO2022127010A1 (en) * 2020-12-18 2022-06-23 南京佗道医疗科技有限公司 Perspective image correction method
CN113284189A (en) * 2021-05-12 2021-08-20 深圳市格灵精睿视觉有限公司 Distortion parameter calibration method, device, equipment and storage medium
CN115293979A (en) * 2022-07-13 2022-11-04 中南大学 Infrared image radial and tangential distortion correction method
CN115660995A (en) * 2022-11-03 2023-01-31 江苏南高智能装备创新中心有限公司 Camera orthodontic method and system using linear patterns
CN116012242A (en) * 2022-12-26 2023-04-25 华人运通(上海)自动驾驶科技有限公司 Camera distortion correction effect evaluation method, device, medium and equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨守瑞等: "光场相机建模与畸变校正改进方法", 《红外与激光工程》, vol. 52, no. 1, pages 1 - 9 *
郭雄飞等: "基于线性特征的鱼眼图像校正方法", 《计算机科学》, vol. 41, no. 6, pages 187 - 190 *

Also Published As

Publication number Publication date
CN116823681B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
CN110322513B (en) Camera external parameter calibration method and device and electronic equipment
CN110264426B (en) Image distortion correction method and device
KR101014572B1 (en) Method of correcting image distortion and Image processing device of adapting the same method
CN108932698B (en) Image distortion correction method, device, electronic equipment and storage medium
US20090141148A1 (en) Distortion-corrected image generation unit and distortion-corrected image generation method
JP5299383B2 (en) Image correction apparatus and image correction method
US10255665B2 (en) Image processing device and method, image capturing device, program, and record medium
CN107871329B (en) Method and device for quickly calibrating optical center of camera
CN103530852A (en) Method for correcting distortion of lens
CN110413805B (en) Image storage method and device, electronic equipment and storage medium
CN106780308B (en) Image perspective transformation method
KR20140072470A (en) Distorted Image Processing Method For Fish-Eye Lens
CN111353963A (en) Temperature compensation method and device for depth camera
TW201127074A (en) Image processing device, image processing method, and imaging device
CN116823681B (en) Method, device and system for correcting distortion of infrared image and storage medium
CN112040224A (en) Method, medium and electronic device for verifying camera module performance test equipment
JP7210337B2 (en) Image processing device and distortion correction coefficient calculation method
KR20100001608A (en) Apparatus and method for correcting lens distortion
JP2009177792A (en) Image processing unit and imaging device
JP5018052B2 (en) Image processing apparatus and image processing program for correcting image color
CN110197228B (en) Image correction method and device
JP4503106B2 (en) Information processing apparatus and method, information processing system, and recording medium
CN110519486A (en) Distortion compensation method, device and relevant device based on wide-angle lens
JP2008219593A (en) Image processing apparatus and method
CN113375687B (en) Method, system and device for lane line vanishing point compensation based on parallel constraint

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 230088 Building J6, Phase II, Zhong'an Chuanggu Science and Technology Park, Wangjiang West Road, High tech Zone, Hefei City, Anhui Province

Patentee after: SNEGRID ELECTRIC TECHNOLOGY Co.,Ltd.

Country or region after: China

Address before: Room 1701, Block C, Building 1, Zone J, Phase II, Hefei Innovation Industrial Park, No. 2800, Innovation Avenue, High-tech Zone, Hefei City, Anhui Province, 230088

Patentee before: SNEGRID ELECTRIC TECHNOLOGY Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address