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.
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.