CN109978959B - Camera radial distortion correction parameter calibration method, device and system - Google Patents

Camera radial distortion correction parameter calibration method, device and system Download PDF

Info

Publication number
CN109978959B
CN109978959B CN201910249403.2A CN201910249403A CN109978959B CN 109978959 B CN109978959 B CN 109978959B CN 201910249403 A CN201910249403 A CN 201910249403A CN 109978959 B CN109978959 B CN 109978959B
Authority
CN
China
Prior art keywords
target
intersection point
intersection
line segment
determining
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.)
Active
Application number
CN201910249403.2A
Other languages
Chinese (zh)
Other versions
CN109978959A (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.)
Beijing Jingwei Hirain Tech Co Ltd
Original Assignee
Beijing Jingwei Hirain Tech 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 Beijing Jingwei Hirain Tech Co Ltd filed Critical Beijing Jingwei Hirain Tech Co Ltd
Priority to CN201910249403.2A priority Critical patent/CN109978959B/en
Publication of CN109978959A publication Critical patent/CN109978959A/en
Application granted granted Critical
Publication of CN109978959B publication Critical patent/CN109978959B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30204Marker

Landscapes

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

Abstract

The invention provides a method, a device and a system for calibrating a radial distortion correction parameter of a camera. Firstly, a shot image of a design graphic card shot by a camera to be calibrated is obtained, and then a first intersection point group of a preset horizontal straight line and the same curve segment in the shot image is obtained line by line. And acquiring a second intersection point group of the preset vertical straight line and the same curve segment in the shot image column by column. And forming at least one first target line segment and a second target line segment based on the first intersection group and the second intersection group. A distortion center is determined based on an intersection of the perpendicular bisector of the first target line segment and the perpendicular bisector of the second target line segment. The distortion center can be determined by the scheme, so that the unknown parameters in the model are reduced to three, at the moment, the least square method is utilized to solve the linear equation set, the convergence is easy, the calculated amount of the radial distortion correction parameters of the camera is reduced, and the calculation time is shortened.

Description

Camera radial distortion correction parameter calibration method, device and system
Technical Field
The invention relates to the technical field of parameter calibration, in particular to a method, a device and a system for calibrating a camera radial distortion correction parameter.
Background
Due to the optical design of the lens, assembly errors and the like, the image shot by the camera is distorted. The distortion includes two types, one is pincushion distortion, as shown in fig. 1, and the other is barrel distortion, as shown in fig. 2. However, in any type of distortion, when the real object is a straight line, a curve appears in the captured image.
In order to correct the distortion, a model is generally used
Figure BDA0002011955340000011
Determining camera internal parameters, wherein the camera internal parameters comprise a distortion center xc,ycAnd coefficient k of distortion correction Taylor series1,k2,k3,xu,yuIs the coordinates of the image point, x, in the ideal case without distortiond,ydIs the distorted coordinates of the image point. r isdIs the distorted image point xd,ydTo the centre of distortion xc,ycA distance of ruIs an undistorted image point xu,yuTo the centre of distortion xc,ycThe distance of (c).
In combination with a model, it can be easily found that the modified model contains xc,yc,k1,k2,k3Five unknown parameters. Using standard graphic cards containing target points with known coordinates of image pointsShooting pictures through a camera, obtaining coordinates of distorted target points, and listing unknown parameters x through the modelc,yc,k1,k2,k3Then solving the nonlinear equation system by adopting a least square method to obtain the internal reference.
However, the number of distorted image points is usually multiple, and the number of equations is often greater than the number of unknown parameters, so that the problems of non-convergence, long calculation time and the like when the least square method is used for solving the overdetermined nonlinear equation set occur.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, and a system for calibrating a radial distortion correction parameter of a camera, which can reduce a calculation amount of internal parameters of the camera.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
a camera radial distortion correction parameter calibration method is based on a design graphic card, the design graphic card comprises at least one first straight line segment parallel to a row direction and at least one second straight line segment parallel to a column direction, the row direction and the column direction are mutually perpendicular, and the camera radial distortion correction parameter calibration method comprises the following steps:
acquiring a shot image of the design graphic card shot by a camera to be calibrated;
acquiring at least one first intersection point group of a preset horizontal straight line and the same curve segment in the shot image line by line along the column direction, wherein the first intersection point group comprises two first target intersection points;
acquiring at least one second intersection point group of a preset vertical straight line and the same curve segment in the shot image column by column along the row direction, wherein the second intersection point group comprises two second target intersection points;
forming at least one first target line segment by taking two first target intersection points in the first intersection point group as end points;
forming at least one second target line segment by taking two second target intersection points in the second intersection point group as end points;
determining the intersection point of the perpendicular bisector of any one first target line segment and the perpendicular bisector of any one second target line segment as a target center;
based on at least one of the target centers, a distortion center is determined.
Optionally, the following is the direction of being listed as, obtain row by row and predetermine horizontal straight line with at least one first nodical group of same curve section in the shot image, first nodical group includes two first target nodical, includes:
acquiring the gray value of the pixel points of each row line by line along the column direction;
determining pixel points with gray values of a first preset value in each row of the pixel points as first target pixel points;
and determining the first target pixel points at two ends in the same row as the first target intersection point.
Optionally, the step of obtaining, in the row direction, at least one second intersection point group of a preset vertical straight line and the same curve segment in the shot image column by column, where the second intersection point group includes two second target intersection points includes:
acquiring the gray value of the pixel point of each column row by row along the row direction;
determining pixel points with gray values of a first preset value in each row of pixel points as second target pixel points;
and determining the second target pixel points at two ends of the same column as the second target intersection point.
Optionally, the determining a distortion center based on at least one of the target centers includes:
obtaining coordinate values of the target center;
determining an average of abscissas of a plurality of the target centers as an abscissa of the distortion center;
determining an average of the ordinates of the plurality of target centers as the ordinate of the distortion center.
Optionally, the design chart is a white background, and the first straight line segment and the second straight line segment are black lines;
or the like, or, alternatively,
the design chart card is a black background, and the first straight line segment and the second straight line segment are white lines.
A calibration device for camera radial distortion correction parameters is based on a design chart, wherein the design chart comprises at least one first straight line segment parallel to a row direction and at least one second straight line segment parallel to a column direction, the row direction and the column direction are mutually perpendicular, and the calibration device for camera radial distortion correction parameters comprises:
the shooting module is used for acquiring a shot image of the design chart shot by the camera to be calibrated;
the first acquisition module is used for acquiring at least one first intersection point group of a preset horizontal straight line and the same curve segment in the shot image line by line along the column direction, wherein the first intersection point group comprises two first target intersection points;
the second acquisition module is used for acquiring at least one second intersection point group of a preset vertical straight line and the same curve section in the shot image column by column along the row direction, and the second intersection point group comprises two second target intersection points;
the first processing module is used for forming at least one first target line segment by taking two first target intersection points in the first intersection point group as end points;
the second processing module is used for forming at least one second target line segment by taking two second target intersection points in the second intersection point group as end points;
the first determining module is used for determining that the intersection point of the perpendicular bisector of any one first target line segment and the perpendicular bisector of any one second target line segment is a target center;
a second determination module for determining a distortion center based on at least one of the target centers.
Optionally, the first obtaining module includes:
the first acquisition unit is used for acquiring the gray value of the pixel points of each row line by line along the column direction;
the first determining unit is used for determining pixel points with gray values of a first preset value in each row of pixel points as first target pixel points;
and the second determining unit is used for determining the first target pixel points at two ends in the same row as the first target intersection point.
Optionally, the second obtaining module includes:
the second acquisition unit is used for acquiring the gray value of the pixel point of each column row by row along the row direction;
the third determining unit is used for determining that the pixel point with the gray value of the first preset value in each row of pixel points is a second target pixel point;
and the fourth determining unit is used for determining the second target pixel points at two ends in the same column as the second target intersection point.
Optionally, the second determining module includes:
a third obtaining unit, configured to obtain coordinate values of the target center;
a fifth determination unit configured to determine an average of abscissas of a plurality of the target centers as an abscissa of the distortion center;
a sixth determining unit configured to determine that an average value of ordinate of the plurality of target centers is ordinate of the distortion center.
A camera radial distortion correction parameter calibration system comprises any one camera radial distortion correction parameter calibration device.
Based on the technical scheme, the embodiment of the invention provides a camera radial distortion correction parameter calibration method, which is based on a design chart, wherein the design chart comprises at least one first straight line section parallel to a row direction and at least one second straight line section parallel to a column direction, the row direction is perpendicular to the column direction, the camera radial distortion correction parameter calibration method firstly obtains a shot image of the design chart shot by a camera to be calibrated, and then obtains at least one first intersection point group of a preset horizontal straight line and the same curve section in the shot image line by line along the column direction, and the first intersection point group comprises two first target intersection points. And acquiring at least one second intersection point group of a preset vertical straight line and the same curve segment in the shot image column by column along the row direction, wherein the second intersection point group comprises two second target intersection points. And then forming at least one first target line segment by taking two first target intersection points in the first intersection point group as end points, and forming at least one second target line segment by taking two second target intersection points in the second intersection point group as end points. And then determining the intersection point of the perpendicular bisector of any one first target line segment and the perpendicular bisector of any one second target line segment as a target center, and determining a distortion center based on at least one target center. According to the scheme, the distortion center is determined, so that only three unknown parameters are obtained in the model, at the moment, the least square method is utilized to solve the linear equation set, convergence is easy, the calculated amount of the radial distortion correction parameters of the camera is reduced, and the calculation time is shortened.
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 embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic diagram of pincushion distortion of an image captured by a camera;
FIG. 2 is a schematic diagram of barrel distortion of an image captured by a camera;
fig. 3 is a schematic flow chart of a method for calibrating a radial distortion correction parameter of a camera according to an embodiment of the present invention;
FIG. 4 is a diagram of a design chart according to an embodiment of the present invention;
fig. 5 is a schematic diagram of another application of the calibration method for the radial distortion correction parameter of the camera according to the embodiment of the present invention;
fig. 6 is a schematic view of another application of the calibration method for the radial distortion correction parameter of the camera according to the embodiment of the present invention;
fig. 7 is a schematic view of another application of the calibration method for the radial distortion correction parameter of the camera according to the embodiment of the present invention;
fig. 8 is a schematic view of another application of the calibration method for the radial distortion correction parameter of the camera according to the embodiment of the present invention;
fig. 9 is a schematic flowchart of a calibration method for a radial distortion correction parameter of a camera according to an embodiment of the present invention;
fig. 10 is a schematic flowchart of a calibration method for a radial distortion correction parameter of a camera according to an embodiment of the present invention;
fig. 11 is a schematic flowchart of a calibration method for a radial distortion correction parameter of a camera according to an embodiment of the present invention;
FIG. 12 is a gray scale view of a line provided by an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a calibration apparatus for correcting parameters of radial distortion of a camera according to an embodiment of the present invention.
Detailed Description
As described in the background, at present, in order to correct distortion, a standard graphic card containing a target point with known coordinates of image points is generally used, a camera is used to take a picture to obtain the distorted coordinates of the target point, and then a model is used
Figure BDA0002011955340000061
Listing about unknown quantities xc,yc,k1,k2,k3And (3) selecting a plurality of uniformly distributed points, solving a nonlinear equation set by using a least square method, and solving to obtain camera internal parameters.
However, the least square method may have the problems of non-convergence and long calculation time when solving the nonlinear equation set, thereby affecting the calibration efficiency.
In view of the above, referring to fig. 3, fig. 3 is a flowchart of a calibration method for a radial distortion correction parameter of a camera according to an embodiment of the present invention, where the calibration method for the radial distortion correction parameter of the camera is based on a design chart. The design chart is shown in fig. 4, and includes at least one first straight line segment parallel to the row direction and at least one second straight line segment parallel to the column direction. It should be noted that, in this embodiment, the row direction is defined as a horizontal direction, and the column direction is defined as a vertical direction, that is, the row direction and the column direction are perpendicular to each other.
Then, in fig. 4, the straight line segment A1a2 and the straight line segment B1B2 are first straight line segments, and the straight line segment C1C2 and the straight line segment D1D2 are second straight line segments. Wherein, the coordinate of the point A1 is (x)u1,yu1) The coordinate of point A2 is (x)u2,yu1) And the point coordinate of B1 is (x)u3,yu2) And the point coordinate of B2 is (x)u4,yu2). The coordinate of the point C1 is (x)u5,yu3) And the coordinate of the point C2 is (x)u5,yu4) And D1 point coordinate is (x)u6,yu5) And D2 point coordinate is (x)u6,yu6)。
The calibration method for the radial distortion correction parameters of the camera comprises the following steps:
and S31, acquiring a shot image of the design chart shot by the camera to be calibrated.
Specifically, the design chart shown in fig. 4 is shot by using a camera to be calibrated, and a shot image distorted after shooting is obtained. Assuming that barrel distortion occurs in the photographed image, as shown in fig. 5, the first straight line segment A1a2 in fig. 4 becomes a curved line segment A1 'a 2' in fig. 5, the first straight line segment B1B2 in fig. 4 becomes a curved line segment B1 'B2' in fig. 5, the second straight line segment C1C2 in fig. 4 becomes a curved line segment C1 'C2' in fig. 5, and the second straight line segment D1D2 in fig. 4 becomes a curved line segment D1 'D2' in fig. 5.
And S32, acquiring at least one first intersection point group of a preset horizontal straight line and the same curve segment in the shot image line by line along the column direction, wherein the first intersection point group comprises two first target intersection points.
Specifically, a preset horizontal straight line, such as L1, is used to scan line by line from top to bottom along the column direction, and multiple first intersection sets of the preset horizontal straight line L1 and the same curve segment, such as curve segment a1 'a 2', are obtained.
When a plurality of first straight line segments are arranged on the design chart card, a plurality of curve segments are included in the shot image, and the step is to acquire at least one first intersection group of the preset horizontal straight line and the same curve segment line by line, for example, a first intersection group 1 of the preset horizontal straight line L1 and the curve segment A1 'A2' is determined, and simultaneously, a first intersection group 2 of the preset horizontal straight line L1 and the curve segment B1 'B2' is determined.
It should be noted that, as shown in fig. 6, since the horizontal straight line L1 is preset for line-by-line scanning, during the scanning, the first intersection set is multiple sets, for example, when the horizontal straight line L1 scans the m-th row, the intersection set of the horizontal straight line L1 and the curved line segment a1 'a 2' is { E, F }, and when the horizontal straight line L1 scans the n-th row, the intersection set of the horizontal straight line L1 and the curved line segment a1 'a 2' is { E1, F1 }. It can be seen that in the present embodiment, one first intersection group includes two first target intersections, for example, the first intersection group includes a first target intersection E and a first target intersection F. Another first intersection group includes a first target intersection E1 and a first target intersection F1.
Similarly, when the preset horizontal straight line segment L1 scans the ith row, the set of intersections of the horizontal straight line L1 and the curved line segment B1 'B2' is { M, N }, and when the horizontal straight line L1 scans the jth row, the set of intersections of the horizontal straight line L1 and the curved line segment B1 'B2' is { M1, N1 }. It can be seen that, in the present embodiment, one first intersection group includes two first target intersections, for example, the first intersection group includes a first target intersection M and a first target intersection N. Another first intersection group includes a first target intersection M1 and a first target intersection N1.
And S33, acquiring at least one second intersection point group of a preset vertical straight line and the same curve segment in the shot image column by column along the row direction, wherein the second intersection point group comprises two second target intersection points.
Similarly, the same principle as the progressive scanning is used, a preset vertical straight line, such as L2, is used to scan from left to right along the row direction, and multiple groups of second intersection groups of the preset vertical straight line L2 and the same curve segment, such as the curve segment C1 'C2', are obtained.
It should be noted that, as shown in fig. 7, since the vertical straight line L2 is preset to perform column-by-column scanning, during the scanning, the second intersection set is multiple sets, for example, when the vertical straight line L2 scans the m1 th column, the intersection set of the vertical straight line L2 and the curved line segment C1 'C2' is { H, I }, and when the vertical straight line L2 scans the n1 th column, the intersection set of the vertical straight line L2 and the curved line segment C1 'C2' is { H1, I1 }. It can be seen that, in the present embodiment, one second intersection group includes two second target intersections, for example, the second intersection group includes a second target intersection H and a second target intersection I. Another second intersection group includes a second target intersection H1 and a second target intersection I1.
Similarly, when the vertical straight line L2 scans the i1 th column, the set of intersection points of the vertical straight line L2 and the curved line segment D1 'D2' is { J, K }, and when the vertical straight line L2 scans the J1 th column, the set of intersection points of the vertical straight line L2 and the curved line segment D1 'D2' is { J1, K1 }. It can be seen that, in the present embodiment, one second intersection group includes two second target intersections, for example, the second intersection group includes a second target intersection J and a second target intersection K. Another second intersection group includes a second target intersection J1 and a second target intersection K1.
And S34, forming at least one first target line segment by taking two first target intersections in the first intersection group as end points.
The first intersection group includes a first target intersection E and a first target intersection F. Another first intersection group includes a first target intersection E1 and a first target intersection F1. The other first intersection group includes a first target intersection M and a first target intersection N. Another first intersection group includes a first target intersection M1 and a first target intersection N1.
Then, this step forms at least one first target line segment with two first target intersections in the first intersection group as end points, for example, forms a first target line segment EF with the first target intersection E and the first target intersection F as two end points of the line segment. The first target intersection point E1 and the first target intersection point F1 are defined as two end points of the line segment, and form a first target line segment E1F 1. And taking the first target intersection point M and the first target intersection point N as two end points of the line segment to form a first target line segment MN. The first target intersection point M1 and the first target intersection point N1 are defined as two end points of the line segment, and form a first target line segment M1N 1.
And S35, forming at least one second target line segment by taking two second target intersections in the second intersection group as end points.
Similarly, the second intersection group includes a second target intersection H and a second target intersection I. Another second intersection group includes a second target intersection H1 and a second target intersection I1. The other second intersection group includes a second target intersection J and a second target intersection K. Another second intersection group includes a second target intersection J1 and a second target intersection K1.
Then, this step forms at least one second target line segment with two second target intersection points in the second intersection point group as end points, for example, forms a second target line segment HI with the second target intersection point H and the second target intersection point I as two end points of the line segment. The second target intersection point H1 and the second target intersection point I1 are used as two end points of the line segment to form a second target line segment H1I 1. And taking the second target intersection point J and the second target intersection point K as two end points of the line segment to form a second target line segment JK. The second target intersection point J1 and the second target intersection point K1 are used as two end points of the line segment to form a second target line segment J1K 1.
And S36, determining the intersection point of the perpendicular bisector of any first target line segment and the perpendicular bisector of any second target line segment as a target center.
With reference to fig. 8, a plurality of first target line segments and a plurality of second target line segments are respectively made as perpendicular bisectors, and then the intersection points of the plurality of perpendicular bisectors are defined as the target centers.
For example, the perpendicular bisector of the first target line segment EF is the first perpendicular bisector EF ″. The perpendicular bisector of the first target line segment E1F1 is the first perpendicular bisector E1F1 ″. The perpendicular bisector of the first target line segment MN is the first perpendicular bisector MN |. The perpendicular bisector of the first target line segment M1N1 is the first perpendicular bisector M1N1 ″.
Similarly, the perpendicular bisector of the second target line segment HI is the second perpendicular bisector HI ″. The perpendicular bisector of the second target line segment H1I1 is the second perpendicular bisector H1I1 ″. The perpendicular bisector of the second target line segment JK is the second perpendicular bisector JK ″. The perpendicular bisector of the second target line segment J1K1 is the second perpendicular bisector J1K1 ″.
Then, in this step, intersection points of any one first perpendicular bisector and any one second perpendicular bisector need to be obtained, and these intersection points are determined as the target center. For example, it may be determined that an intersection point of the first perpendicular bisector EF ″) and the second perpendicular bisector HI ″, an intersection point of the first perpendicular bisector EF ″) and the second perpendicular bisector H1I1 ″, a target center 2, an intersection point of the first perpendicular bisector EF ″) and the second perpendicular bisector JK ″, a target center 3, and an intersection point of the first perpendicular bisector EF ″) and the second perpendicular bisector J1K1 ″, a target center 4.
It may be determined that an intersection point of the first perpendicular bisector E1F1 ″) and the second perpendicular bisector HI ″, an intersection point of the first perpendicular bisector E1F1 ″, and the second perpendicular bisector H1I1 ″, is a target center 5, an intersection point of the first perpendicular bisector E1F1 ″, and the second perpendicular bisector JK ″, is a target center 7, an intersection point of the first perpendicular bisector E1F1 ″, and the second perpendicular bisector J1K1 ″, is a target center 8, which is not shown in fig. 8.
It may be determined that an intersection point of the first perpendicular bisector MN ″) and the second perpendicular bisector HI ″, an intersection point of the first perpendicular bisector MN ″) and the second perpendicular bisector H1I1 ″, a target center 10, an intersection point of the first perpendicular bisector MN ″) and the second perpendicular bisector JK ″, a target center 11, and an intersection point of the first perpendicular bisector MN ″) and the second perpendicular bisector J1K1 ″, which are not shown in fig. 8, are the target center 12.
It may be determined that an intersection point of the first perpendicular bisector M1N1 ″) and the second perpendicular bisector HI ″, an intersection point of the first perpendicular bisector M1N1 ″, and the second perpendicular bisector H1I1 ″, is the target center 13, an intersection point of the first perpendicular bisector M1N1 ″, and the second perpendicular bisector JK ″, is the target center 15, an intersection point of the first perpendicular bisector M1N1 ″, and the second perpendicular bisector J1K1 ″, is the target center 16, which is not shown in fig. 8.
That is, in the present embodiment, the target centers are 16.
And S37, determining a distortion center based on at least one target center.
In combination with the above steps, in the present embodiment, 16 target centers are determined, and these target centers are generally distributed in a smaller area, so that in the present embodiment, any one target center may be determined as the distortion center, or the average coordinates of a plurality of target centers may be determined as the distortion center.
Distortion center x is determined according to the schemec,ycSo that the model
Figure BDA0002011955340000101
Only k is the unknown parameter in1,k2,k3And thirdly, solving the linear equation set by using a least square method, so that convergence is easy, the calculated amount of the radial distortion correction parameters of the camera is reduced, and the calculation time is shortened.
Specifically, this embodiment provides a specific implementation manner for determining a distortion center based on at least one target center, as shown in fig. 9, including:
s91, obtaining coordinate values of the target center;
s92, determining the average value of the abscissas of the target centers as the abscissas of the distortion centers;
and S93, determining the average value of the vertical coordinates of the target centers as the vertical coordinate of the distortion center.
That is, assuming that the above-described embodiment acquires coordinates of three target centers, where the coordinate of the target center 1 is (x1, y1), the coordinate of the target center 2 is (x2, y2), and the coordinate of the target center 3 is (x3, y3), then the average of the coordinates of the 3 target centers is determined as the coordinate of the distortion center, e.g., the coordinate of the distortion center is
Figure BDA0002011955340000102
On the basis of the foregoing embodiment, this embodiment further provides a specific implementation manner of obtaining, line by line, at least one first intersection group of a preset horizontal straight line and the same curve segment in the captured image along the column direction, as shown in fig. 10, including:
s101, acquiring the gray value of the pixel points of each row line by line along the column direction;
s102, determining pixel points with gray values of a first preset value in each row of pixel points as first target pixel points;
s103, determining the first target pixel points at two ends in the same row as the first target intersection point.
In addition, this embodiment further provides a specific implementation manner of obtaining at least one second intersection point group of the preset vertical straight line and the same curve segment in the captured image column by column along the row direction, where the second intersection point group includes two second target intersection points, as shown in fig. 11, including:
s111, acquiring the gray value of each column of pixel points column by column along the row direction;
s112, determining pixel points with gray values of a first preset value in each row of pixel points as second target pixel points;
s113, determining the second target pixel points at two ends of the same column as the second target intersection point.
Specifically, as shown in fig. 12, the curved line segment a1 'a 2' is actually wide and spans several pixels, so that the gray level gradually changes from white to black when the first target intersection point E or the first target intersection point F is obtained, and therefore, in this embodiment, when the curved line segment a1 'a 2' is binarized, the obtained line image actual boundary and the real object actual boundary may deviate, and if the deviation is δ, it may be set that, when 2 δ/| EF | is less than 5%, the position error between the first target intersection point E and the first target intersection point F is set to be ignored.
Illustratively, an 8-bit gray scale map is taken as an example to solve the distortion center COD, the design chart is taken as an example in fig. 4, a white background is taken as an example, and the first straight line segment and the second straight line segment are black lines.
First, an image of the design chart is photographed, and according to the gray scale value of the image, 125 is used as a threshold, and is set to 0 if smaller than 125, and is set to 255 if larger than 125.
Then, scanning is performed row by row from left to right, and when a point having a gradation value equal to 0 appears, the column in which the point is recorded as the first target intersection point E point, since the line has a certain width, a point continuously equal to 0 also appears, and thereafter, a point equal to 255 appears again. And then continuing to scan, and when the point equal to zero appears again, continuing to scan until the point equal to zero is ended, recording the last point equal to zero as the first target intersection point F.
And then, solving the midpoint coordinates of the point E of the first target intersection point and the point F of the first target intersection point, and recording yh.
And then, vertical scanning is carried out by adopting the same method, the midpoint coordinates of two second target intersection points are obtained in the same way, and xv is recorded.
The coordinates (xv, yh) of the central COD are distorted.
After the coordinates of the distortion center COD are determined, the following formula can be obtained from the coordinates before and after the distortion correction:
Figure BDA0002011955340000121
the above formula is modified as follows:
Figure BDA0002011955340000122
obtain information about three unknown parameters k1,k2,k3The overdetermined linear equation set is obtained by adopting a least square method:
Figure BDA0002011955340000123
wherein r isdCan be calculated according to the coordinates of points on the distorted image and the COD of the distortion center, ruThe coordinates of the corresponding points may be calculated from the design card.
According to the scheme, the distortion center is determined, so that only three unknown parameters are obtained in the model, at the moment, the least square method is utilized to solve the linear equation set, convergence is easy, the calculated amount of the radial distortion correction parameters of the camera is reduced, and the calculation time is shortened.
On the basis of the foregoing embodiment, this embodiment further provides a calibration device for calibration parameters of radial distortion correction of a camera, as shown in fig. 13, the calibration device for calibration parameters of radial distortion correction of a camera is based on a design chart, where the design chart includes at least one first straight line segment parallel to a row direction and at least one second straight line segment parallel to a column direction, and the row direction and the column direction are perpendicular to each other. The camera radial distortion correction parameter calibration device comprises:
the shooting module 131 is used for acquiring a shot image of the design chart shot by the camera to be calibrated;
the first obtaining module 132 is configured to obtain, line by line, at least one first intersection point group of a preset horizontal straight line and the same curve segment in the captured image along the column direction, where the first intersection point group includes two first target intersection points;
the second obtaining module 133 is configured to obtain, in the row direction, at least one second intersection point group of a preset vertical straight line and the same curve segment in the captured image column by column, where the second intersection point group includes two second target intersection points;
a first processing module 134, configured to form at least one first target line segment by using two first target intersections in the first intersection group as end points;
a second processing module 135, configured to form at least one second target line segment by using two second target intersections in the second intersection group as end points;
a first determining module 136, configured to determine an intersection point of a perpendicular bisector of any one of the first target line segments and a perpendicular bisector of any one of the second target line segments as a target center;
a second determination module 137 for determining a distortion center based on at least one of the target centers.
Wherein, the first obtaining module may include:
the first acquisition unit is used for acquiring the gray value of the pixel points of each row line by line along the column direction;
the first determining unit is used for determining pixel points with gray values of a first preset value in each row of pixel points as first target pixel points;
and the second determining unit is used for determining the first target pixel points at two ends in the same row as the first target intersection point.
The second obtaining module may include:
the second acquisition unit is used for acquiring the gray value of the pixel point of each column row by row along the row direction;
the third determining unit is used for determining that the pixel point with the gray value of the first preset value in each row of pixel points is a second target pixel point;
and the fourth determining unit is used for determining the second target pixel points at two ends in the same column as the second target intersection point.
The second determining module may include:
a third obtaining unit, configured to obtain coordinate values of the target center;
a fifth determination unit configured to determine an average of abscissas of a plurality of the target centers as an abscissa of the distortion center;
a sixth determining unit configured to determine that an average value of ordinate of the plurality of target centers is ordinate of the distortion center.
The working principle of the device is described in the above embodiments of the method, and will not be described repeatedly.
In addition, the present embodiment also provides a system for calibrating a radial distortion correction parameter of a camera, which includes any one of the above calibration devices for a radial distortion correction parameter of a camera, and the working principle thereof is as described in the above embodiment of the method.
To sum up, the embodiment of the present invention provides a calibration method for a radial distortion correction parameter of a camera, which is based on a design chart, wherein the design chart includes at least one first straight line segment parallel to a row direction and at least one second straight line segment parallel to a column direction, the row direction is perpendicular to the column direction, the calibration method for the radial distortion correction parameter of the camera first obtains a shot image of the design chart shot by the camera to be calibrated, and then obtains at least one first intersection point group of a preset horizontal straight line and the same curve segment in the shot image line by line along the column direction, and the first intersection point group includes two first target intersection points. And acquiring at least one second intersection point group of a preset vertical straight line and the same curve segment in the shot image column by column along the row direction, wherein the second intersection point group comprises two second target intersection points. And then forming at least one first target line segment by taking two first target intersection points in the first intersection point group as end points, and forming at least one second target line segment by taking two second target intersection points in the second intersection point group as end points. And then determining the intersection point of the perpendicular bisector of any one first target line segment and the perpendicular bisector of any one second target line segment as a target center, and determining a distortion center based on at least one target center. According to the scheme, the distortion center is determined, so that only three unknown parameters are obtained in the model, at the moment, the least square method is utilized to solve the linear equation set, convergence is easy, the calculated amount of the radial distortion correction parameters of the camera is reduced, and the calculation time is shortened.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A camera radial distortion correction parameter calibration method is characterized in that based on a design graphic card, the design graphic card comprises at least one first straight line segment parallel to a row direction and at least one second straight line segment parallel to a column direction, the row direction and the column direction are mutually perpendicular, and the camera radial distortion correction parameter calibration method comprises the following steps:
acquiring a shot image of the design graphic card shot by a camera to be calibrated;
acquiring at least one first intersection point group of a preset horizontal straight line and the same curve segment in the shot image line by line along the column direction, wherein the first intersection point group comprises two first target intersection points;
acquiring at least one second intersection point group of a preset vertical straight line and the same curve segment in the shot image column by column along the row direction, wherein the second intersection point group comprises two second target intersection points;
forming at least one first target line segment by taking two first target intersection points in the first intersection point group as end points;
forming at least one second target line segment by taking two second target intersection points in the second intersection point group as end points;
determining the intersection point of the perpendicular bisector of any one first target line segment and the perpendicular bisector of any one second target line segment as a target center;
determining a distortion center based on at least one of the target centers, including: obtaining coordinate values of the target center; determining an average of abscissas of a plurality of the target centers as an abscissa of the distortion center; determining an average of the ordinates of the plurality of target centers as the ordinate of the distortion center.
2. The method for calibrating the radial distortion correction parameter of the camera according to claim 1, wherein at least one first intersection point group of a preset horizontal straight line and the same curve segment in the shot image is obtained line by line along the column direction, and the first intersection point group includes two first target intersection points, including:
acquiring the gray value of the pixel points of each row line by line along the column direction;
determining pixel points with gray values of a first preset value in each row of the pixel points as first target pixel points;
and determining the first target pixel points at two ends in the same row as the first target intersection point.
3. The method for calibrating the radial distortion correction parameter of the camera according to claim 1, wherein at least one second intersection point group of a preset vertical straight line and the same curve segment in the shot image is obtained column by column along the row direction, and the second intersection point group includes two second target intersection points, which includes:
acquiring the gray value of the pixel point of each column row by row along the row direction;
determining pixel points with gray values of a first preset value in each row of pixel points as second target pixel points;
and determining the second target pixel points at two ends of the same column as the second target intersection point.
4. The method for calibrating the radial distortion correction parameter of the camera according to claim 1, wherein the design chart is a white background, and the first straight line segment and the second straight line segment are black lines;
or the like, or, alternatively,
the design chart card is a black background, and the first straight line segment and the second straight line segment are white lines.
5. A camera radial distortion correction parameter calibration device is characterized in that based on a design chart, the design chart comprises at least one first straight line segment parallel to a row direction and at least one second straight line segment parallel to a column direction, the row direction and the column direction are mutually perpendicular, and the camera radial distortion correction parameter calibration device comprises:
the shooting module is used for acquiring a shot image of the design chart shot by the camera to be calibrated;
the first acquisition module is used for acquiring at least one first intersection point group of a preset horizontal straight line and the same curve segment in the shot image line by line along the column direction, wherein the first intersection point group comprises two first target intersection points;
the second acquisition module is used for acquiring at least one second intersection point group of a preset vertical straight line and the same curve section in the shot image column by column along the row direction, and the second intersection point group comprises two second target intersection points;
the first processing module is used for forming at least one first target line segment by taking two first target intersection points in the first intersection point group as end points;
the second processing module is used for forming at least one second target line segment by taking two second target intersection points in the second intersection point group as end points;
the first determining module is used for determining that the intersection point of the perpendicular bisector of any one first target line segment and the perpendicular bisector of any one second target line segment is a target center;
a second determining module for determining a distortion center based on at least one of the target centers;
the second determining module includes:
a third obtaining unit, configured to obtain coordinate values of the target center;
a fifth determination unit configured to determine an average of abscissas of a plurality of the target centers as an abscissa of the distortion center;
a sixth determining unit configured to determine that an average value of ordinate of the plurality of target centers is ordinate of the distortion center.
6. The calibration device for calibrating the radial distortion correction parameter of the camera according to claim 5, wherein the first obtaining module comprises:
the first acquisition unit is used for acquiring the gray value of the pixel points of each row line by line along the column direction;
the first determining unit is used for determining pixel points with gray values of a first preset value in each row of pixel points as first target pixel points;
and the second determining unit is used for determining the first target pixel points at two ends in the same row as the first target intersection point.
7. The calibration device for calibrating the radial distortion correction parameter of the camera as claimed in claim 5, wherein the second obtaining module comprises:
the second acquisition unit is used for acquiring the gray value of the pixel point of each column row by row along the row direction;
the third determining unit is used for determining that the pixel point with the gray value of the first preset value in each row of pixel points is a second target pixel point;
and the fourth determining unit is used for determining the second target pixel points at two ends in the same column as the second target intersection point.
8. A camera radial distortion correction parameter calibration system is characterized by comprising a camera radial distortion correction parameter calibration device according to any one of claims 5 to 7.
CN201910249403.2A 2019-03-29 2019-03-29 Camera radial distortion correction parameter calibration method, device and system Active CN109978959B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910249403.2A CN109978959B (en) 2019-03-29 2019-03-29 Camera radial distortion correction parameter calibration method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910249403.2A CN109978959B (en) 2019-03-29 2019-03-29 Camera radial distortion correction parameter calibration method, device and system

Publications (2)

Publication Number Publication Date
CN109978959A CN109978959A (en) 2019-07-05
CN109978959B true CN109978959B (en) 2021-06-29

Family

ID=67081647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910249403.2A Active CN109978959B (en) 2019-03-29 2019-03-29 Camera radial distortion correction parameter calibration method, device and system

Country Status (1)

Country Link
CN (1) CN109978959B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111579220B (en) * 2020-05-29 2023-02-10 江苏迪盛智能科技有限公司 Resolution ratio board
CN111951335A (en) * 2020-08-13 2020-11-17 珠海格力电器股份有限公司 Method, device, processor and image acquisition system for determining camera calibration parameters
CN112070705B (en) * 2020-11-16 2021-02-02 天津天瞳威势电子科技有限公司 Camera evaluation method and device and storage medium
CN112614194B (en) * 2021-01-29 2021-09-03 北京经纬恒润科技股份有限公司 Data processing method, system and device of image acquisition equipment
CN113124763B (en) * 2021-04-22 2022-05-24 奥比中光科技集团股份有限公司 Optical axis calibration method, device, terminal, system and medium for optical axis detection system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617615A (en) * 2013-11-27 2014-03-05 华为技术有限公司 Radial distortion parameter obtaining method and obtaining device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101814186A (en) * 2010-02-04 2010-08-25 上海交通大学 Method utilizing curve-fitting to calibrate radial distortion of camera
PT2742484T (en) * 2011-07-25 2017-01-02 Univ De Coimbra Method and apparatus for automatic camera calibration using one or more images of a checkerboard pattern
CN105096269B (en) * 2015-07-21 2018-03-02 北京交通大学 The method and system of image radial distortion correction based on distortion linear structure detection
CN106327441B (en) * 2016-08-19 2018-11-06 北京交通大学 The automatic correction method and system of image radial distortion
CN107492080B (en) * 2017-09-25 2021-03-23 杭州云栖智慧视通科技有限公司 Calibration-free convenient monocular head image radial distortion correction method
CN108492263B (en) * 2018-03-07 2022-02-18 鞍钢集团矿业有限公司 Lens radial distortion correction method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617615A (en) * 2013-11-27 2014-03-05 华为技术有限公司 Radial distortion parameter obtaining method and obtaining device

Also Published As

Publication number Publication date
CN109978959A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
CN109978959B (en) Camera radial distortion correction parameter calibration method, device and system
CN110689581B (en) Structured light module calibration method, electronic device and computer readable storage medium
CN107749050B (en) Fisheye image correction method and device and computer equipment
JP2000196939A (en) Device and method for forming image without distortion and facial direction chromatic aberration
CN110288527A (en) The vehicle-mounted camera panorama of looking around of one kind gets a bird's eye view drawing generating method
CN112862895B (en) Fisheye camera calibration method, device and system
CN109685794B (en) Camera self-adaptive step length DPC algorithm and device for mobile phone screen defect detection
KR100544345B1 (en) Method of generating orthoimage for aerial-photo
JP5998532B2 (en) Correction formula calculation method, correction method, correction apparatus, and imaging apparatus
CN102236790A (en) Image processing method and device
US20030197780A1 (en) Method of recording image conversion parameters in annular images, and annular image data recorded with image conversion parameters
CN116777769A (en) Method and device for correcting distorted image, electronic equipment and storage medium
CN114187363A (en) Method and device for obtaining radial distortion parameter value and mobile terminal
CN111445513B (en) Plant canopy volume acquisition method and device based on depth image, computer equipment and storage medium
CN113223176A (en) Method and device for acquiring multi-dimensional pipeline characteristic parameters
CN115100078B (en) Method and related device for correcting and filling dot matrix coordinates in curved screen image
KR100456632B1 (en) Image-based lens distortion correction method and apparatus
CN115760653A (en) Image correction method, device, equipment and readable storage medium
CN112419172B (en) Remote sensing image processing method for correcting and deblurring inclined image
CN115115788A (en) Three-dimensional reconstruction method and device, electronic equipment and storage medium
CN114359401A (en) Calibration method, system and equipment
JP7003291B2 (en) Correction method and device for correcting image data
CN109615586B (en) Infrared image distortion correction algorithm
KR101550868B1 (en) Image distortion compensation method by lens and mirror
CN114792288B (en) Curved screen image gray scale correction method and related device

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 4 / F, building 1, No.14 Jiuxianqiao Road, Chaoyang District, Beijing 100020

Applicant after: Beijing Jingwei Hirain Technologies Co.,Inc.

Address before: 8 / F, block B, No. 11, Anxiang Beili, Chaoyang District, Beijing 100101

Applicant before: Beijing Jingwei HiRain Technologies Co.,Ltd.

GR01 Patent grant
GR01 Patent grant