CN114581329A - Distorted image correction method and device - Google Patents

Distorted image correction method and device Download PDF

Info

Publication number
CN114581329A
CN114581329A CN202210212735.5A CN202210212735A CN114581329A CN 114581329 A CN114581329 A CN 114581329A CN 202210212735 A CN202210212735 A CN 202210212735A CN 114581329 A CN114581329 A CN 114581329A
Authority
CN
China
Prior art keywords
distortion
point
distance
distorted image
lines
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210212735.5A
Other languages
Chinese (zh)
Inventor
葛亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202210212735.5A priority Critical patent/CN114581329A/en
Publication of CN114581329A publication Critical patent/CN114581329A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20061Hough transform

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a method and a device for correcting a distorted image, which are suitable for the technical field of artificial intelligence, and the method comprises the following steps: extracting line contours of the target distorted image to obtain distortion point information of all lines; in a three-dimensional Hough space, obtaining a plurality of distortion line sets based on distortion point information of all lines; calculating an optimal distortion coefficient according to the distortion line sets; and automatically correcting the target distorted image reversely according to the optimal distortion coefficient. The invention can realize the correction of distorted images and has good correction effect.

Description

Distorted image correction method and device
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a method and a device for correcting a distorted image.
Background
The main processing flow of the current distorted image correction algorithm is edge detection and contour extraction, distorted line extraction, distorted parameter estimation and reverse correction of distorted images. The algorithm for extracting the distortion line is infinite, and the quality of the algorithm for extracting the distortion line directly determines the effect of correcting the distortion image.
At present, the most important distortion removal capability to be optimized and improved in the distorted image correction system is the distortion removal capability, especially the correction capability for the image with the serious distortion degree, so that the robustness of the distorted image correction system is directly determined by the extraction of the distorted line and the optimization of the distortion parameter estimation algorithm. The classical Hough transform straight line is divided into different line segments, and distortion lines of some small segments can not be correctly identified as distortion lines, so that straight line information is directly lost, and the correction effect is poor; and the existing distortion correction method has poor robustness.
Disclosure of Invention
The embodiment of the invention provides a distorted image correction method, which is used for realizing distorted image correction and has good correction effect, and the method comprises the following steps:
extracting line contours of the target distorted image to obtain distortion point information of all lines;
in a three-dimensional Hough space, obtaining a plurality of distortion line sets based on distortion point information of all lines;
calculating an optimal distortion coefficient according to the distortion line sets;
and automatically correcting the target distorted image reversely according to the optimal distortion coefficient.
The embodiment of the invention provides a distorted image correction device, which is used for realizing the distorted image correction and has good correction effect, and comprises:
the line contour extraction module is used for extracting line contours of the target distorted image to obtain distortion point information of all lines;
a distortion line set obtaining module, configured to obtain multiple distortion line sets based on distortion point information of all lines in a three-dimensional hough space;
the optimal distortion parameter calculation module is used for calculating an optimal distortion coefficient according to the distortion line sets;
and the automatic correction module is used for reversely automatically correcting the target distorted image according to the optimal distortion coefficient.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the distorted image correction method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the above distorted image correction method.
An embodiment of the present invention further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for correcting the distorted image is implemented.
In the embodiment of the invention, the line contour extraction is carried out on the target distorted image to obtain the distortion point information of all lines; in a three-dimensional Hough space, obtaining a plurality of distortion line sets based on distortion point information of all lines; calculating an optimal distortion coefficient according to the distortion line sets; and automatically correcting the target distorted image reversely according to the optimal distortion coefficient. In the process, in the three-dimensional Hough space, the distortion line set is extracted, the optimal distortion coefficient is calculated, and the distortion parameter with higher accuracy can be extracted, so that automatic distortion correction can be realized, and the correction effect is better.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
FIG. 1 is a first flowchart of a method for correcting a distorted image according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating obtaining distortion point information of all lines according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating an embodiment of obtaining a distortion line set;
FIG. 4 is a flow chart of calculating a plurality of distortion coefficients in an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for correcting a distorted image according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a distorted image correction apparatus according to an embodiment of the present invention;
FIG. 7 is a diagram of a computer device in an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
In the description of the present specification, the terms "comprising," "including," "having," "containing," and the like are used in an open-ended fashion, i.e., to mean including, but not limited to. Reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The sequence of steps involved in the embodiments is for illustrative purposes to illustrate the implementation of the present application, and the sequence of steps is not limited and can be adjusted as needed.
First, terms related to embodiments of the present invention are explained.
Fig. 1 is a first flowchart of a distorted image correction method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step 101, extracting line contours of a target distorted image to obtain distortion point information of all lines;
102, in a three-dimensional Hough space, obtaining a plurality of distortion line sets based on distortion point information of all lines;
103, calculating an optimal distortion coefficient according to a plurality of distortion line sets;
and 104, automatically correcting the target distorted image reversely according to the optimal distortion coefficient.
In the embodiment of the invention, in the three-dimensional Hough space, the distortion line set is extracted, the optimal distortion coefficient is calculated, and the distortion parameter with higher accuracy can be extracted, so that automatic distortion correction can be realized, and the correction effect is better.
In step 101, a line contour extraction is performed on the target distorted image to obtain distortion point information of all lines.
Fig. 2 is a flowchart illustrating obtaining distortion point information of all lines in an embodiment of the present invention, in an embodiment, performing line contour extraction on a target distortion image to obtain distortion point information of all lines, including:
step 201, performing smooth filtering processing on a target distorted image;
step 202, performing image enhancement processing on the target distorted image after the smoothing filtering processing;
and 203, removing inferior edge points from the target distorted image after the image enhancement processing, obtaining all lines after the inferior edge points are removed, and obtaining the distortion point information and the distortion center information of all the lines.
In the above embodiment, the introduction of the smoothing filtering process is mainly to reduce noise, and the image enhancement process is to highlight an image with significant gray level change in a neighborhood by obtaining a gradient amplitude, and when removing inferior edge points, some inferior edge points with large gradient change but not edge pixel points are removed by setting a gradient change threshold, so that all lines can be accurately positioned, and distortion point information and distortion center information of all lines are obtained.
In one embodiment, removing inferior edge points from a target distorted image after image enhancement processing comprises:
and removing inferior edge points from the target distorted image after the image enhancement processing by adopting an optimal Canny operator.
In step 102, a plurality of distortion line sets are obtained based on distortion point information of all lines in a three-dimensional hough space.
The three-dimensional Hough space is formed by introducing a new dimension of a distortion coefficient into the current two-dimensional Hough space.
Fig. 3 is a flowchart illustrating an embodiment of obtaining a distortion line set according to the present invention, in an embodiment, obtaining a plurality of distortion line sets based on distortion point information of all lines in a three-dimensional hough space includes:
step 301, obtaining a farthest distortion point set based on the distortion point information of all lines;
the farthest distortion point set is a set formed by finding a plurality of distortion points as far as possible from all the distortion point information.
Step 302, calculating a plurality of distortion coefficients according to the farthest distortion point set;
303, calculating a corresponding distortion parameter for each distortion coefficient, and carrying out distortion correction on distortion points of all lines based on the distortion parameters;
and 304, performing voting calculation in a three-dimensional Hough space based on the distortion points and voting functions after distortion correction, and obtaining a distortion line set corresponding to each distortion coefficient based on a voting threshold value and a voting calculation result.
Fig. 4 is a flowchart of calculating a plurality of distortion coefficients according to an embodiment of the present invention, in which calculating the plurality of distortion coefficients according to the farthest distortion point set includes:
step 401, calculating a first distance of each distortion point in the farthest distortion set, where the first distance is a distance from the distortion point to a distortion center;
step 402, calculating a second distance of each distortion point according to the first distance of each distortion point and the single-parameter division model, wherein the second distance is the distance from the distortion point after the single-parameter division model is applied to the center of the target distortion image after the single-parameter division model is applied;
and 403, calculating a distortion coefficient corresponding to each distortion point according to the first distance and the second distance of each distortion point.
In one embodiment, calculating the second distance of each distortion point according to the first distance of each distortion point and a single-parameter division model comprises:
and calculating the second distance of each distortion point according to the first distance of each distortion point and a plurality of cascaded single-parameter division models.
In the above embodiments, a method for correcting a distorted image of a target with a relatively severe distortion degree more accurately is provided, that is, a plurality of cascaded single-parameter division models are adopted, so that the accuracy of the corrected image is higher. The larger the number of cascades, the higher the correction accuracy, and for images with a more severe degree of distortion, the number of cascades determines the effect of distortion correction.
In an embodiment, calculating the distortion coefficient corresponding to each distortion point according to the first distance and the second distance of each distortion point by using the following formula includes:
Figure BDA0003531784800000051
wherein p isiFor the distortion coefficient corresponding to the distortion point i,
Figure BDA0003531784800000052
is the first distance of the distortion point i,
Figure BDA0003531784800000053
a second distance of distortion point i.
In one embodiment, the formula of the single parameter division model is as follows:
Figure BDA0003531784800000054
wherein λ isiIs the distortion parameter corresponding to the distortion point i.
It can be seen that each distortion coefficient has a corresponding distortion parameter. After applying the single division model, the target distorted image is corrected to correct the image. The influence of distorted image resolution is reduced by using distortion coefficients in a three-dimensional hough space.
In one embodiment, for each distortion coefficient, a corresponding distortion parameter is calculated using the following equation:
Figure BDA0003531784800000055
wherein λ isiDistortion parameter, p, corresponding to distortion point iiFor the distortion coefficient corresponding to the distortion point i,
Figure BDA0003531784800000056
is the first distance of the distortion point i.
Once the best distortion coefficients are obtained in the three-dimensional hough space, they are refined to obtain a more accurate approximation. To this end, using standard optimization techniques, in one embodiment, the voting function is formulated as follows:
Figure BDA0003531784800000057
wherein Nl is the number of distortion lines; np (j) is the number of distortion points on the jth distortion line; x is the number ofjiIs the point associated with the distortion line j.
It should be noted that, in voting, the vote of one line depends on the distance from the point to the line, and is given by v ═ 1/(1+ d), where d is the distance from the point to the line. The smaller the value of the voting function, the better.
In step 103, an optimal distortion coefficient is calculated from the plurality of distortion line sets.
In one embodiment, calculating an optimal distortion coefficient from a plurality of distortion line sets comprises:
and determining the distortion coefficient corresponding to the distortion line set with the maximum number of distortion lines as the optimal distortion coefficient in the distortion line sets.
By integrating the above embodiments, an algorithm flow for outputting an optimal distortion coefficient based on distortion point information of all lines in a three-dimensional hough space is given below, corresponding to step 102 and step 103;
inputting: distortion point position information of all lines { (x, y) }, distortion point direction information of all lines { α (x, y) }, the number of all lines N;
and (3) outputting: distortion line set sum and optimal distortion coefficient p0
Beginning:
Figure BDA0003531784800000061
Figure BDA0003531784800000071
the algorithm has the advantages that the distortion line set of the target distortion image can be accurately extracted, and a foundation is laid for the optimization of the distortion coefficient.
Fig. 5 is a flowchart of a distorted image correction method according to an embodiment of the present invention, and in an embodiment, the method further includes:
step 501, when the distortion error of the automatically corrected target distorted image is greater than the threshold, repeating the steps of the method of claim 1 until the distortion error of the automatically corrected target distorted image is not greater than the threshold.
The above embodiment proposes another method for correcting a target distorted image with a relatively severe distortion degree, namely, for the obtained set of distorted lines, repeatedly performing all the above steps, and iterating until the end condition of the iteration is that the distortion error of the target distorted image is not greater than the threshold value. The larger the number of iterations, the higher the correction accuracy, and for images with a higher degree of distortion, the number of iterations determines the effect of distortion correction.
In step 104, the target distorted image is automatically corrected in reverse direction according to the optimal distortion coefficient.
The automatic correction mainly comprises the steps that pixel points in a corrected image are compared with pixel point coordinate information in a target distorted image, the gray scale corresponding to the pixel points still keeps unchanged, the reverse method still has the situation that the pixel point positions are non-integer under the reverse mapping of a single-parameter division model, but the problem that the pixel density is uneven does not exist, the corrected image is taken as a reference, the density of the pixel points in the corrected image is moderate, and for the non-integer situation, an interpolation method can be adopted to avoid the problem, and common gray scale interpolation algorithms are classified into three types: experience shows that the bilinear gray scale interpolation algorithm is good in score on the computing effect and the operating efficiency.
In summary, in the method provided in the embodiment of the present invention, line contour extraction is performed on the target distorted image to obtain distortion point information of all lines; in a three-dimensional Hough space, obtaining a plurality of distortion line sets based on distortion point information of all lines; calculating an optimal distortion coefficient according to the distortion line sets; and automatically correcting the target distorted image reversely according to the optimal distortion coefficient. In the process, in the three-dimensional Hough space, the distortion line set is extracted, the optimal distortion coefficient is calculated, and the distortion parameter with higher accuracy can be extracted, so that automatic distortion correction can be realized, and the correction effect is better. In addition, for a distorted image with serious distortion, a cascaded single-parameter trigger model can be adopted, or the step of automatic correction is repeatedly executed, so that the robustness of the algorithm can be better reflected.
The embodiment of the present invention also provides a distorted image correction apparatus, as described in the following embodiments. Because the principle of the device for solving the problems is similar to the distorted image correction method, the implementation of the device can refer to the implementation of the distorted image correction method, and repeated details are not repeated.
Fig. 6 is a schematic diagram of a distorted image correction apparatus according to an embodiment of the present invention, including:
a line contour extraction module 601, configured to perform line contour extraction on the target distorted image to obtain distortion point information of all lines;
a distortion line set obtaining module 602, configured to obtain multiple distortion line sets in a three-dimensional hough space based on distortion point information of all lines;
an optimal distortion parameter calculation module 603, configured to calculate an optimal distortion coefficient according to the multiple distortion line sets;
and the automatic correction module 604 is configured to perform automatic correction of the target distorted image inversely according to the optimal distortion coefficient.
In one embodiment, the line contour extraction module 601 is specifically configured to:
carrying out smooth filtering processing on the target distorted image;
carrying out image enhancement processing on the target distorted image after the smoothing filtering processing;
and removing inferior edge points from the target distorted image after the image enhancement processing, obtaining all lines after the inferior edge points are removed, and obtaining the distortion point information and the distortion center information of all the lines.
In one embodiment, the line contour extraction module 601 is specifically configured to:
and removing inferior edge points from the target distorted image after the image enhancement processing by adopting an optimal Canny operator.
In an embodiment, the distorted line set obtaining module is specifically configured to:
obtaining a farthest distortion point set based on the distortion point information of all lines;
calculating a plurality of distortion coefficients according to the farthest distortion point set;
calculating a corresponding distortion parameter for each distortion coefficient, and carrying out distortion correction on distortion points of all lines based on the distortion parameters;
and voting calculation is carried out in a three-dimensional Hough space based on the distortion point and the voting function after the distortion correction, and a distortion line set corresponding to each distortion coefficient is obtained based on a voting threshold value and a voting calculation result.
In an embodiment, the distorted line set obtaining module is specifically configured to:
calculating a first distance of each distortion point in the farthest distortion set, wherein the first distance is the distance from the distortion point to the distortion center;
calculating a second distance of each distortion point according to the first distance of each distortion point and the single-parameter division model, wherein the second distance is the distance from the distortion point after the single-parameter division model is applied to the center of the target distortion image after the single-parameter division model is applied;
and calculating the distortion coefficient corresponding to each distortion point according to the first distance and the second distance of each distortion point.
In an embodiment, the distorted line set obtaining module is specifically configured to:
and calculating the second distance of each distortion point according to the first distance of each distortion point and a plurality of cascaded single-parameter division models.
In an embodiment, the distorted line set obtaining module is specifically configured to:
calculating a distortion coefficient corresponding to each distortion point according to the first distance and the second distance of each distortion point by adopting the following formula, wherein the formula comprises the following steps:
Figure BDA0003531784800000091
wherein p isiThe distortion coefficient corresponding to the distortion point i,
Figure BDA0003531784800000092
is the first distance of the distortion point i,
Figure BDA0003531784800000093
a second distance of distortion point i.
In one embodiment, the formula of the single parameter division model is as follows:
Figure BDA0003531784800000094
wherein λ isiIs the distortion parameter corresponding to the distortion point i.
In an embodiment, the distorted line set obtaining module is specifically configured to:
calculating a corresponding distortion parameter for each distortion coefficient by using the following formula:
Figure BDA0003531784800000095
wherein λ isiDistortion parameter, p, for distortion point iiFor the distortion coefficient corresponding to the distortion point i,
Figure BDA0003531784800000096
is the first distance of the distortion point i.
In one embodiment, the voting function is formulated as follows:
Figure BDA0003531784800000097
wherein Nl is the number of the distortion lines; np (j) is the number of distortion points on the jth distortion line; x is the number ofjiIs the point associated with the distortion line j.
In an embodiment, the optimal distortion parameter calculation module is specifically configured to:
and determining the distortion coefficient corresponding to the distortion line set with the maximum number of distortion lines as the optimal distortion coefficient in the distortion line sets.
In summary, in the apparatus provided in the embodiment of the present invention, line contour extraction is performed on the target distorted image to obtain distortion point information of all lines; in a three-dimensional Hough space, obtaining a plurality of distortion line sets based on distortion point information of all lines; calculating an optimal distortion coefficient according to the distortion line sets; and automatically correcting the target distorted image reversely according to the optimal distortion coefficient. In the process, in the three-dimensional Hough space, the distortion line set is extracted, the optimal distortion coefficient is calculated, and the distortion parameter with higher accuracy can be extracted, so that automatic distortion correction can be realized, and the correction effect is better. In addition, for a distorted image with serious distortion, a cascaded single-parameter trigger model can be adopted, or the step of automatic correction is repeatedly executed, so that the robustness of the algorithm can be better reflected.
Fig. 7 is a schematic diagram of a computer device according to an embodiment of the present invention, where the computer device 700 includes a memory 710, a processor 720, and a computer program 730 stored in the memory 710 and executable on the processor 720, and the processor 720 implements the above-mentioned distorted image correction method when executing the computer program 730.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the above distorted image correction method.
An embodiment of the present invention further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for correcting the distorted image is implemented.
It will be appreciated by one skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program service system embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program business systems according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (16)

1. A distorted image correction method, comprising:
extracting line contours of the target distorted image to obtain distortion point information of all lines;
in a three-dimensional Hough space, obtaining a plurality of distortion line sets based on distortion point information of all lines;
calculating an optimal distortion coefficient according to the distortion line sets;
and automatically correcting the target distorted image reversely according to the optimal distortion coefficient.
2. The method of claim 1, wherein extracting the line contour of the target distorted image to obtain the distortion point information of all lines comprises:
carrying out smooth filtering processing on the target distorted image;
carrying out image enhancement processing on the target distorted image after the smoothing filtering processing;
and removing inferior edge points from the target distorted image after the image enhancement processing, obtaining all lines after the inferior edge points are removed, and obtaining the distortion point information and the distortion center information of all the lines.
3. The method of claim 2, wherein removing inferior edge points from the target distorted image after the image enhancement process comprises:
and removing inferior edge points from the target distorted image after the image enhancement processing by adopting an optimal Canny operator.
4. The method of claim 1, wherein obtaining a plurality of distortion line sets based on distortion point information of all lines in a three-dimensional hough space comprises:
obtaining a farthest distortion point set based on the distortion point information of all lines;
calculating a plurality of distortion coefficients according to the farthest distortion point set;
calculating a corresponding distortion parameter for each distortion coefficient, and carrying out distortion correction on distortion points of all lines based on the distortion parameters;
and voting calculation is carried out in a three-dimensional Hough space based on the distortion point and the voting function after the distortion correction, and a distortion line set corresponding to each distortion coefficient is obtained based on a voting threshold value and a voting calculation result.
5. The method of claim 4, wherein computing a plurality of distortion coefficients from the set of farthest distortion points comprises:
calculating a first distance of each distortion point in the farthest distortion set, wherein the first distance is the distance from the distortion point to the distortion center;
calculating a second distance of each distortion point according to the first distance of each distortion point and the single-parameter division model, wherein the second distance is the distance from the distortion point after the single-parameter division model is applied to the center of the target distortion image after the single-parameter division model is applied;
and calculating the distortion coefficient corresponding to each distortion point according to the first distance and the second distance of each distortion point.
6. The method of claim 5, wherein calculating the second distance for each distortion point based on the first distance for each distortion point and a single parameter division model comprises:
and calculating the second distance of each distortion point according to the first distance of each distortion point and a plurality of cascaded single-parameter division models.
7. The method of claim 6, wherein calculating the distortion coefficient corresponding to each distortion point based on the first distance and the second distance for each distortion point using the following equation comprises:
Figure FDA0003531784790000021
wherein p isiFor the distortion coefficient corresponding to the distortion point i,
Figure FDA0003531784790000022
is the first distance of the distortion point i,
Figure FDA0003531784790000023
a second distance of the distortion point i.
8. The method of claim 7, wherein the formula of the single parameter division model is as follows:
Figure FDA0003531784790000024
wherein λ isiIs the distortion parameter corresponding to the distortion point i.
9. The method of claim 4, wherein for each distortion coefficient, a corresponding distortion parameter is calculated using the following equation:
Figure FDA0003531784790000025
wherein λ isiDistortion parameter, p, corresponding to distortion point iiFor the distortion coefficient corresponding to the distortion point i,
Figure FDA0003531784790000026
is the first distance of the distortion point i.
10. The method of claim 4, wherein the voting function is formulated as follows:
Figure FDA0003531784790000027
wherein Nl is the number of distortion lines; np (j) is the number of distortion points on the jth distortion line; x is the number ofjiIs the point associated with the distortion line j.
11. The method of claim 1, wherein calculating an optimal distortion coefficient based on a plurality of distortion line sets comprises:
and determining the distortion coefficient corresponding to the distortion line set with the maximum number of distortion lines as the optimal distortion coefficient in the distortion line sets.
12. The method of claim 1, further comprising:
when the distortion error of the automatically corrected target distorted image is greater than the threshold, the steps of the method of claim 1 are repeatedly performed until the distortion error of the automatically corrected target distorted image is not greater than the threshold.
13. A distorted image correction apparatus, comprising:
the line contour extraction module is used for extracting line contours of the target distorted image to obtain distortion point information of all lines;
a distortion line set obtaining module, configured to obtain multiple distortion line sets based on distortion point information of all lines in a three-dimensional hough space;
the optimal distortion parameter calculation module is used for calculating an optimal distortion coefficient according to the distortion line sets;
and the automatic correction module is used for reversely automatically correcting the target distorted image according to the optimal distortion coefficient.
14. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 12 when executing the computer program.
15. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any one of claims 1 to 12.
16. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, carries out the method of any one of claims 1 to 12.
CN202210212735.5A 2022-03-04 2022-03-04 Distorted image correction method and device Pending CN114581329A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210212735.5A CN114581329A (en) 2022-03-04 2022-03-04 Distorted image correction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210212735.5A CN114581329A (en) 2022-03-04 2022-03-04 Distorted image correction method and device

Publications (1)

Publication Number Publication Date
CN114581329A true CN114581329A (en) 2022-06-03

Family

ID=81774475

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210212735.5A Pending CN114581329A (en) 2022-03-04 2022-03-04 Distorted image correction method and device

Country Status (1)

Country Link
CN (1) CN114581329A (en)

Similar Documents

Publication Publication Date Title
CN111932552B (en) Aorta modeling method and device
CN108305268B (en) Image segmentation method and device
US9443312B2 (en) Line parametric object estimation
CN111739071A (en) Rapid iterative registration method, medium, terminal and device based on initial value
CN117237428B (en) Data registration method, device and medium for three-dimensional point cloud
CN103839059A (en) Device and method used for extracting document boundary in document image and electronic device
CN114581329A (en) Distorted image correction method and device
CN111489386B (en) Point cloud characteristic point extraction method, device, storage medium, equipment and system
CN116721228A (en) Building elevation extraction method and system based on low-density point cloud
CN108876711B (en) Sketch generation method, server and system based on image feature points
CN114066779B (en) Depth map filtering method and device, electronic equipment and storage medium
JP2005165969A (en) Image processor and method
CN115841496A (en) Contour extraction method and device for SEM image, computer equipment and storage medium
CN114092906A (en) Lane line segment fitting method and system, electronic device and storage medium
CN115100444A (en) Image mismatching filtering method and image matching device thereof
CN109858304B (en) Method and device for detecting two-dimensional code position detection graph and storage medium
CN113034556A (en) Frequency domain related semi-dense remote sensing image matching method
EP3624062A1 (en) Methods and apparatus for processing image data for machine vision
WO2022063386A1 (en) Generation of a 3d point cloud of a scene
CN116630205B (en) Image processing method, intelligent terminal and storage medium
CN110599511A (en) Image filtering method and device for reserving image edge and storage medium
Han et al. NM-FlowGAN: Modeling sRGB Noise with a Hybrid Approach based on Normalizing Flows and Generative Adversarial Networks
CN117576180B (en) Multi-view depth estimation method and application based on self-adaptive multi-scale window
CN115457101B (en) Edge-preserving multi-view depth estimation and ranging method for unmanned aerial vehicle platform
CN115049847B (en) ORB descriptor-based feature point local neighborhood feature matching method

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