CN104077768A - Method and device for calibrating fish-eye lens radial distortion - Google Patents

Method and device for calibrating fish-eye lens radial distortion Download PDF

Info

Publication number
CN104077768A
CN104077768A CN201410244246.3A CN201410244246A CN104077768A CN 104077768 A CN104077768 A CN 104077768A CN 201410244246 A CN201410244246 A CN 201410244246A CN 104077768 A CN104077768 A CN 104077768A
Authority
CN
China
Prior art keywords
circular arc
center
group
distortion
circle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410244246.3A
Other languages
Chinese (zh)
Other versions
CN104077768B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410244246.3A priority Critical patent/CN104077768B/en
Publication of CN104077768A publication Critical patent/CN104077768A/en
Application granted granted Critical
Publication of CN104077768B publication Critical patent/CN104077768B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a method and device for calibrating fish-eye lens radial distortion. The method includes the following steps of obtaining a calibration image comprising at least two sets of space parallel straight lines; conducting fitting processing on circle center collinear arc sets mapped by each set of space parallel straight lines in the at least two sets of space parallel straight lines on a distortion image; generating a distortion calibration model according to a fitting processing result. The accuracy of calibrating results of the distortion calibration model can be improved.

Description

A kind of scaling method of fish eye lens radial distortion and caliberating device
Technical field
The present invention relates to electronic technology field, relate in particular to a kind of scaling method and caliberating device of fish eye lens radial distortion.
Background technology
Along with electronics technology continually develop and perfect; the terminal device that camera, mobile phone etc. possess photograph, camera function is applied in daily life widely; in order to increase the manifestation mode of photographic images; user can use the camera lens of some special-effects conventionally; for example: fish eye lens, move lens shaft, Macro Lens is first-class, has increased effect and the kind of image taking.
Fish eye lens is a kind of extreme wide-angle lens, and for making camera lens reach maximum Camera angle, the diameter of its front eyeglass is parabolical and protrudes to camera lens is anterior, and the scope that human eye can be seen is made every effort to reach or exceed in fish-eye visual angle.Therefore there is very large difference in the scene of the real world in fish eye lens and people's eye.But, there is polytype distortion in the captured image of fish eye lens, wherein radial distortion is considered to affect the principal element of picture quality, because only limiting to circular arc corresponding to matching list straight line, the calibration process of traditional radial distortion obtains distortion parameter, to generate distortion peg model, cause the calibration result accuracy rate of this distortion peg model low, cannot well solve the problem of fish eye lens radial distortion.
Summary of the invention
The embodiment of the present invention provides a kind of scaling method and caliberating device of fish eye lens radial distortion, can improve the accuracy rate of the calibration result of distortion peg model.
In order to solve the problems of the technologies described above, embodiment of the present invention first aspect provides a kind of scaling method of fish eye lens radial distortion, can comprise:
Obtain the uncalibrated image that comprises at least two group space parallel straight lines;
The center of circle conllinear circular arc group that in described at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment;
Generate distortion peg model according to process of fitting treatment result.
Based on first aspect, in the feasible embodiment of the first of first aspect, in described at least two group space parallel straight lines, arbitrary group of space parallel straight line is all mapped as a center of circle conllinear circular arc group on fault image, all has a corresponding circular arc in the center of circle conllinear circular arc group that in described arbitrary group of space parallel straight line, arbitrary straight line shines upon on fault image.
The feasible embodiment of the first based on first aspect or first aspect, in the feasible embodiment of the second of first aspect, described the center of circle conllinear circular arc group that in described at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment, comprising:
Adopt default nonlinear optimization algorithm, common parameter and the scale-up factor of the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image described in calculating;
Adopt described common coefficient and described scale-up factor to calculate and obtain process of fitting treatment result, described process of fitting treatment result comprises described in each in conllinear circular arc group of center of circle that the parametrization of every circular arc represents and two common intersection corresponding to center of circle conllinear circular arc group described in each;
Wherein, described common parameter comprises the middle point coordinate of line between described two common intersection and the described mid point vector to arbitrary intersection point in described two common intersection, and described scale-up factor comprises described in each every default coefficient that circular arc is corresponding in conllinear circular arc group of center of circle.
The feasible embodiment of the second based on first aspect, in the third feasible embodiment of first aspect, the nonlinear optimization algorithm that described employing is default, common parameter and the scale-up factor of the center of circle conllinear circular arc group that described in calculating, at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image, comprising:
Square distance minimization equation corresponding to center of circle conllinear circular arc group that described in obtaining, at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image;
Adopt default nonlinear optimization algorithm to calculate described square distance minimization equation, obtain common parameter and the scale-up factor of center of circle conllinear circular arc group described in each.
The feasible embodiment of the second based on first aspect, in the 4th kind of feasible embodiment of first aspect, described according to process of fitting treatment result generation distortion peg model, comprising:
Obtain center of distortion point coordinate and distortion parameter according to process of fitting treatment result;
Adopt described center of distortion point coordinate and described distortion parameter to generate distortion peg model.
Based on the 4th kind of feasible embodiment of first aspect, in the 5th kind of feasible embodiment of first aspect, describedly obtain center of distortion point coordinate and distortion parameter according to process of fitting treatment result, comprising:
Obtain the straight-line equation of two common intersection corresponding to each center of circle conllinear circular arc group, and the intersecting point coordinate of all straight-line equations is defined as to center of distortion point coordinate;
Represent according to the parametrization of arbitrary circular arc in described center of distortion point coordinate and arbitrary center of circle conllinear circular arc group, obtain distortion parameter.
Based on the third feasible embodiment of first aspect, in the 6th kind of feasible embodiment of first aspect, described square distance minimization equation is:
arg min p x , p y , t x , t y k 1 . . . k n Σ i = 1 n Σ j = 1 m [ | Q i , j o i | - r i ] 2
Wherein, m represents the number of the point of i article of circular arc of matching, | Q i,jo i| represent the some Q on i article of circular arc i,jwith center of circle o ibetween distance, r irepresent the radius of i article of circular arc, n represents the number of circular arc in a center of circle conllinear circular arc group, (p x, p y) represent the coordinate that the mid point P of line between described two common intersection M points and N point is ordered, (t x, t y) represent the vector that described P point is ordered to described M point or N, (k 1k n) represent the scale-up factor of every circular arc in n bar circular arc;
Described default nonlinear optimization algorithm is LM (Leven-Marquardt) algorithm.
Based on the 5th kind of feasible embodiment of first aspect, in the 7th kind of feasible embodiment of first aspect, suppose that the parametrization of arbitrary circular arc in the conllinear circular arc group of arbitrary center of circle is expressed as described center of distortion point coordinate is (x d0, y d0), described distortion parameter is:
λ = 1 x d 0 2 + y d 0 2 + Ax d 0 + By d 0 + C
Wherein, the parameter during the parametrization that A, B and C are arbitrary circular arc represents.
Based on the 7th kind of feasible embodiment of first aspect, in the 8th kind of feasible embodiment of first aspect, described distortion peg model is:
a = b 1 + λr d 2
Wherein, b=(x d, y d) be fault image coordinate points, a=(x u, y u) be the image coordinate point after distortion correction, r dfor the Euclidean distance of b and center of distortion point coordinate.
Embodiment of the present invention second aspect provides a kind of caliberating device of fish eye lens radial distortion, can comprise:
Uncalibrated image acquisition module, for obtaining the uncalibrated image that comprises at least two group space parallel straight lines;
Circular fitting module, carries out process of fitting treatment for the center of circle conllinear circular arc group that each group space parallel straight line of described at least two group space parallel straight lines is shone upon on fault image;
Model generation module, for generating distortion peg model according to process of fitting treatment result.
Based on second aspect, in the feasible embodiment of the first of second aspect, in described at least two group space parallel straight lines, arbitrary group of space parallel straight line is all mapped as a center of circle conllinear circular arc group on fault image, all has a corresponding circular arc in the center of circle conllinear circular arc group that in described arbitrary group of space parallel straight line, arbitrary straight line shines upon on fault image.
The feasible embodiment of the first based on second aspect or second aspect, in the feasible embodiment of the second of second aspect, described circular fitting module comprises:
Parameter coefficient calculation unit, for adopting default nonlinear optimization algorithm, common parameter and the scale-up factor of the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image described in calculating;
Result acquiring unit, be used for adopting described common coefficient and described scale-up factor to calculate and obtain process of fitting treatment result, described process of fitting treatment result comprises described in each in conllinear circular arc group of center of circle that the parametrization of every circular arc represents and two common intersection corresponding to center of circle conllinear circular arc group described in each;
Wherein, described common parameter comprises the middle point coordinate of line between described two common intersection and the described mid point vector to arbitrary intersection point in described two common intersection, and described scale-up factor comprises described in each every default coefficient that circular arc is corresponding in conllinear circular arc group of center of circle.
The feasible embodiment of the second based on second aspect, in the third feasible embodiment of second aspect, described parameter coefficient calculation unit comprises:
Equation obtains subelement, square distance minimization equation corresponding to center of circle conllinear circular arc group shining upon on fault image for each group space parallel straight line of at least two group space parallel straight lines described in obtaining;
Parameter coefficient obtains subelement, for adopting default nonlinear optimization algorithm to calculate described square distance minimization equation, obtains common parameter and the scale-up factor of center of circle conllinear circular arc group described in each.
The feasible embodiment of the second based on second aspect, in the 4th kind of feasible embodiment of second aspect, described model generation module comprises:
Coordinate parameters acquiring unit, for obtaining center of distortion point coordinate and distortion parameter according to process of fitting treatment result;
Model generation unit, for adopting described center of distortion point coordinate and described distortion parameter to generate distortion peg model.
Based on the 4th kind of feasible embodiment of second aspect, in the 5th kind of feasible embodiment of second aspect, described coordinate parameters acquiring unit comprises:
Coordinate obtains subelement, for obtaining the straight-line equation of two common intersection corresponding to each center of circle conllinear circular arc group, and the intersecting point coordinate of all straight-line equations is defined as to center of distortion point coordinate;
Parameter acquiring subelement, for representing according to the parametrization of described center of distortion point coordinate and the arbitrary circular arc of arbitrary center of circle conllinear circular arc group, obtains distortion parameter.
Based on the third feasible embodiment of second aspect, in the 6th kind of feasible embodiment of second aspect, described square distance minimization equation is:
arg min p x , p y , t x , t y k 1 . . . k n Σ i = 1 n Σ j = 1 m [ | Q i , j o i | - r i ] 2
Wherein, m represents the number of the point of i article of circular arc of matching, | Q i,jo i| represent the some Q on i article of circular arc i,jwith center of circle o ibetween distance, r irepresent the radius of i article of circular arc, n represents the number of circular arc in a center of circle conllinear circular arc group, (p x, p y) represent the coordinate that the mid point P of line between described two common intersection M points and N point is ordered, (t x, t y) represent the vector that described P point is ordered to described M point or N, (k 1k n) represent the scale-up factor of every circular arc in n bar circular arc;
Described default nonlinear optimization algorithm is LM algorithm.
Based on the 5th kind of feasible embodiment of second aspect, in the 7th kind of feasible embodiment of second aspect, suppose that the parametrization of arbitrary circular arc in the conllinear circular arc group of arbitrary center of circle is expressed as described center of distortion point coordinate is (x d0, y d0), described distortion parameter is:
λ = 1 x d 0 2 + y d 0 2 + Ax d 0 + By d 0 + C
Wherein, the parameter during the parametrization that A, B and C are arbitrary circular arc represents.
Based on the 7th kind of feasible embodiment of second aspect, in the 8th kind of feasible embodiment of second aspect, described distortion peg model is:
a = b 1 + λr d 2
Wherein, b=(x d, y d) be fault image coordinate points, a=(x u, y u) be the image coordinate point after distortion correction, r dfor the Euclidean distance of b and center of distortion point coordinate.
In embodiments of the present invention, by obtaining the uncalibrated image that comprises at least two group space parallel straight lines, the center of circle conllinear circular arc group that in described at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment, and generate distortion peg model according to process of fitting treatment result.By adopting at least two group space parallel straight lines, and respectively the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment, improve the accuracy rate of the calibration result of distortion peg model; By utilizing center of circle conllinear character, make calibration result in the situation that there is larger noise, still can keep robustness.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the schematic flow sheet of the scaling method of a kind of fish eye lens radial distortion of providing of the embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the scaling method of the another kind of fish eye lens radial distortion that provides of the embodiment of the present invention;
Fig. 3 is the schematic flow sheet of the scaling method of another fish eye lens radial distortion of providing of the embodiment of the present invention;
Fig. 4 is the example schematic of the center of circle conllinear circular arc group that provides of the embodiment of the present invention on fault image;
Fig. 5 is the structural representation of the caliberating device of a kind of fish eye lens radial distortion of providing of the embodiment of the present invention;
Fig. 6 is the structural representation of the circular fitting module that provides of the embodiment of the present invention;
Fig. 7 is the structural representation of the parameter coefficient calculation unit that provides of the embodiment of the present invention;
Fig. 8 is the structural representation of the model generation module that provides of the embodiment of the present invention;
Fig. 9 is the structural representation of the coordinate parameters acquiring unit that provides of the embodiment of the present invention;
Figure 10 is the structural representation of the caliberating device of the another kind of fish eye lens radial distortion that provides of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Below in conjunction with accompanying drawing 1-accompanying drawing 4, the scaling method of the fish eye lens radial distortion that the embodiment of the present invention is provided describes in detail.
Refer to Fig. 1, for the embodiment of the present invention provides a kind of schematic flow sheet of scaling method of fish eye lens radial distortion.As shown in Figure 1, the embodiment of the present invention said method comprising the steps of S101-step S103.
S101, obtains the uncalibrated image that comprises at least two group space parallel straight lines;
Concrete, the caliberating device of fish eye lens radial distortion obtains and adopts the captured uncalibrated image of fish eye lens, described uncalibrated image can comprise at least two group space parallel straight lines, and in described at least two group space parallel straight lines, every group of space parallel straight line all comprises some straight lines.
S102, carries out process of fitting treatment to the center of circle conllinear circular arc group that in described at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image;
Concrete, described caliberating device can operate each group space parallel straight line in described at least two group space parallel straight lines respectively.The center of circle conllinear circular arc group that described caliberating device shines upon on fault image each group space parallel straight line is carried out process of fitting treatment, further, described caliberating device adopts default nonlinear optimization algorithm, common parameter and the scale-up factor of the center of circle conllinear circular arc group that described in calculating, each group space parallel straight line shines upon on fault image, described caliberating device adopts described common coefficient and described scale-up factor to calculate and obtains process of fitting treatment result, described process of fitting treatment result comprises described in each in conllinear circular arc group of center of circle that the parametrization of every circular arc represents and two common intersection corresponding to center of circle conllinear circular arc group described in each.
Wherein, in described at least two group space parallel straight lines, arbitrary group of space parallel straight line is all mapped as a center of circle conllinear circular arc group on fault image, all has a corresponding circular arc in the center of circle conllinear circular arc group that in described arbitrary group of space parallel straight line, arbitrary straight line shines upon on fault image.Described common parameter comprises the middle point coordinate of line between described two common intersection and the described mid point vector to arbitrary intersection point in described two common intersection, and described scale-up factor comprises described in each every default coefficient that circular arc is corresponding in conllinear circular arc group of center of circle.
S103, generates distortion peg model according to process of fitting treatment result;
Concrete, described caliberating device represent according to the parametrization of every circular arc in center of circle conllinear circular arc group described in each and described in each two common intersection corresponding to center of circle conllinear circular arc group obtain center of distortion point coordinate and distortion parameter, and adopt described center of distortion point coordinate and described distortion parameter to generate distortion peg model.
In embodiments of the present invention, by obtaining the uncalibrated image that comprises at least two group space parallel straight lines, the center of circle conllinear circular arc group that in described at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment, and generate distortion peg model according to process of fitting treatment result.By adopting at least two group space parallel straight lines, and respectively the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment, improve the accuracy rate of the calibration result of distortion peg model; By utilizing center of circle conllinear character, make calibration result in the situation that there is larger noise, still can keep robustness.
Refer to Fig. 2, for the embodiment of the present invention provides the schematic flow sheet of the scaling method of another kind of fish eye lens radial distortion.As shown in Figure 2, the embodiment of the present invention said method comprising the steps of S201-step S205.
S201, obtains the uncalibrated image that comprises at least two group space parallel straight lines;
S202, adopts default nonlinear optimization algorithm, common parameter and the scale-up factor of the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image described in calculating;
S203, adopt described common coefficient and described scale-up factor to calculate and obtain process of fitting treatment result, described process of fitting treatment result comprises described in each in conllinear circular arc group of center of circle that the parametrization of every circular arc represents and two common intersection corresponding to center of circle conllinear circular arc group described in each;
Concrete, the caliberating device of fish eye lens radial distortion can operate each group space parallel straight line in described at least two group space parallel straight lines respectively.Described caliberating device can adopt default nonlinear optimization algorithm, calculate common parameter and the scale-up factor of the center of circle conllinear circular arc group that each group space parallel straight line shines upon on fault image, further, square distance minimization equation corresponding to center of circle conllinear circular arc group that described in described caliberating device obtains, at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image, and adopt default nonlinear optimization algorithm to calculate described square distance minimization equation, obtain common parameter and the scale-up factor of center of circle conllinear circular arc group described in each.
Being understandable that, there is common parameter and scale-up factor separately in each center of circle conllinear circular arc group.Described caliberating device can obtain two common intersection corresponding to center of circle conllinear circular arc group described in each according to the common coefficient of each center of circle conllinear circular arc group, and the parametrization of obtaining every circular arc in each center of circle conllinear circular arc group according to the scale-up factor of each center of circle conllinear circular arc group represents.
Wherein, in described at least two group space parallel straight lines, arbitrary group of space parallel straight line is all mapped as a center of circle conllinear circular arc group on fault image, all has a corresponding circular arc in the center of circle conllinear circular arc group that in described arbitrary group of space parallel straight line, arbitrary straight line shines upon on fault image.Described common parameter comprises the middle point coordinate of line between described two common intersection and the described mid point vector to arbitrary intersection point in described two common intersection, and described scale-up factor comprises described in each every default coefficient that circular arc is corresponding in conllinear circular arc group of center of circle.
S204, obtains center of distortion point coordinate and distortion parameter according to process of fitting treatment result;
S205, adopts described center of distortion point coordinate and described distortion parameter to generate distortion peg model;
Concrete, described caliberating device obtains the straight-line equation of two common intersection corresponding to each center of circle conllinear circular arc group, and the intersecting point coordinate of all straight-line equations is defined as to center of distortion point coordinate, described caliberating device represents according to the parametrization of arbitrary circular arc in described center of distortion point coordinate and arbitrary center of circle conllinear circular arc group, obtains distortion parameter.Described caliberating device can generate distortion peg model according to point coordinate in described distortion and described distortion parameter.
Wherein, the step S101 that the step S201 of the embodiment of the present invention can embodiment shown in Figure 1, does not repeat at this.
In embodiments of the present invention, by obtaining the uncalibrated image that comprises at least two group space parallel straight lines, the center of circle conllinear circular arc group that in described at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment, and generate distortion peg model according to process of fitting treatment result.By adopting at least two group space parallel straight lines, and respectively the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment, improve the accuracy rate of the calibration result of distortion peg model; By utilizing center of circle conllinear character, make calibration result in the situation that there is larger noise, still can keep robustness.
Refer to Fig. 3, for the embodiment of the present invention provides the schematic flow sheet of the scaling method of another fish eye lens radial distortion.As shown in Figure 3, the described method of the embodiment of the present invention can comprise the following steps S301-step S307.
S301, obtains the uncalibrated image that comprises at least two group space parallel straight lines;
Concrete, the caliberating device of fish eye lens radial distortion obtains and adopts the captured uncalibrated image of fish eye lens, described uncalibrated image can comprise at least two group space parallel straight lines, and in described at least two group space parallel straight lines, every group of space parallel straight line all comprises some straight lines.
In embodiments of the present invention, the distortion peg model adopting can be expressed as (1) formula:
a = b 1 + λr d 2
(1) in formula, b=(x d, y d) be fault image coordinate points, a=(x u, y u) be the image coordinate point after distortion correction, r dfor the Euclidean distance of b and center of distortion point coordinate.Because the distortion peg model of traditional radial distortion is the hypothesis as picture centre based on center of distortion point, to distortion parameter, λ solves, to generate this distortion peg model, but under normal conditions, center of distortion point is not positioned at picture centre, therefore in the embodiment of the present invention by center of distortion point coordinate (x d0, y d0) also solve as unknown parameter.
In three dimensions, the arbitrary straight-line equation in each group space parallel straight line can be expressed as (2) formula:
I 3 D i ( t ) = x i + t · dx y i + t · dy z i + t · dz
(2), in formula, D=(dx, dy, dz) is unit direction vector, (x i, y i, z i) be some three dimensions points of this straight line process, t is a scale factor, is used for being created on the difference on this straight line.From (2) formula, one group of space parallel straight line may pass through different point (x i, y i, z i), but necessarily there is the identical direction vector D of unit.
Under desirable perspective projection, this group space parallel straight line is mapped as one group of straight line on desirable fluoroscopy images, can be expressed as (3) formula:
I u i ( t ) = f x i + t · dx z i + t · dz f y i + t · dy z i + t · dz
(3), in formula, f is the focal length of desirable perspective camera.As the three-dimensional point (x of process i, y i, z i) when different, Zhe Zu space parallel linear projection may be no longer parallel to the straight line becoming on desirable fluoroscopy images.
In the time of t → ± ∞, can obtain the subpoint of this vanishing point of organizing space parallel straight line on desirable fluoroscopy images, can be expressed as (4) formula:
vp u = ( f dx dz , f dy dz ) T
From (4) formula, under desirable perspective projection, this group space parallel straight line can intersect at same point (being the vanishing point of the space parallel straight line subpoint on desirable fluoroscopy images) on desirable fluoroscopy images.
By (1) formula substitution (4) formula, and suppose that center of distortion is the initial point of image, can obtain (5) formula:
f dx dz = x d 1 + λ ( x d 2 + y d 2 )
And (6) formula:
f dy dz = y d 1 + λ ( x d 2 + y d 2 )
, obtain divided by (6) formula by (5) formula:
dx dy = x d y d
(7) formula is illustrated under the distortion peg model of traditional radial distortion, and a and b have identical slope, and they and image coordinate initial point three point on a straight line.By (7) formula substitution (6) formula, can obtain (8) formula:
( 1 + dx 2 dy 2 ) · f · dy · λy d 2 - dz · y d + f · dy = 0
This be one about y dquadratic equation with one unknown, its discriminant is (9) formula:
Δ = dz 2 - 4 · λ · ( 1 + dx 2 dy 2 ) · f 2 · dy 2
Due to for radial distortion, have λ < 0, thereby Δ must be greater than zero, can obtain thus formula (8) must have 2 real solutions.From above derivation, under the distortion peg model of traditional radial distortion, the vanishing point of one group of space parallel straight line has 2 subpoints on fault image.Be a center of circle conllinear circular arc group because one group of space parallel straight line is mapped under this model, therefore in this center of circle conllinear circular arc group, all circular arcs have 2 common intersection.
It should be noted that, in described at least two group space parallel straight lines, arbitrary group of space parallel straight line is all mapped as a center of circle conllinear circular arc group on fault image, all has a corresponding circular arc in the center of circle conllinear circular arc group that in described arbitrary group of space parallel straight line, arbitrary straight line shines upon on fault image.
S302, square distance minimization equation corresponding to center of circle conllinear circular arc group that described in obtaining, at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image;
Concrete, when the conllinear circular arc group of described caliberating device each group space parallel straight line shines upon on fault image at least two group space parallel straight lines described in matching the center of circle, described caliberating device obtains the square distance minimization equation of this center of circle conllinear circular arc group.
Please also refer to Fig. 4, for the embodiment of the present invention provides the example schematic of center of circle conllinear circular arc group on fault image.As shown in Figure 4, suppose that 2 common intersection are respectively M point and N point, the coordinate of the mid point P that supposes M, N point line on fault image is (p x, p y), obtaining the vector that P point is ordered to N point or M, the vector that adopts P point to order to N in the embodiment of the present invention, is designated as if the home position of i circular arc is o in this center of circle conllinear circular arc group i, point out and be dealt into o from P ithe vector of unit length of the directed line of point can be expressed as (10) formula:
Po i o = PN &RightArrow; &perp; / | PN &RightArrow; |
(10) in formula, represent and vector perpendicular vector, must meet PN &RightArrow; &perp; &CenterDot; PN &RightArrow; = 0 ; represent vector mould.Hence one can see that, Po i othere are two groups of solutions, are respectively - t y t x T t x 2 + t y 2 With t y - t x T t x 2 + t y 2 .
Set a scale-up factor center of circle o ican be expressed as (11) formula:
p x p y + po i o &CenterDot; | Po i &RightArrow; | = p x p y + k i &CenterDot; PN &RightArrow; &perp;
Suppose the total n bar circular arc of conllinear corresponding to this center of circle conllinear circular arc group circle group, the ading up to of known variables to be asked (4+n), (4+n) in n indicate n scale-up factor (k 1k n), 4 are expressed as the common common parameter of n bar circular arc, are respectively the p that represents P point position xand p y, and represent vector t xand t y.
For i article of circular arc in conllinear circle group, its radius can be expressed as (12) formula:
r i = | Po i &RightArrow; | 2 + | PN &RightArrow; | 2 = ( k i 2 + 1 ) ( t x 2 + t y 2 )
, in the time of this circular arc of matching, require minimized equation for (13) formula:
&epsiv; = &Sigma; j = 1 m [ | Q i , j o i | - r i ] 2
(13), in formula, m represents the number of the point of this circular arc of matching, | Q i,jo i| be the some Q on i article of circular arc i,jwith center of circle o ibetween distance.
In a center of circle conllinear circular arc group, the total n bar of such circular arc, therefore square distance minimization equation is (14) formula:
arg min p x , p y , t x , t y k 1 . . . k n &Sigma; i = 1 n &Sigma; j = 1 m [ | Q i , j o i | - r i ] 2
S303, adopts default nonlinear optimization algorithm to calculate described square distance minimization equation, obtains common parameter and the scale-up factor of center of circle conllinear circular arc group described in each;
Concrete, described default nonlinear optimization algorithm is preferably LM algorithm, described caliberating device adopts described default nonlinear optimization algorithm to calculate described square distance minimization equation, obtains common parameter and the scale-up factor of center of circle conllinear circular arc group described in each.
Wherein, described common parameter comprises the middle point coordinate of line between described two common intersection and the described mid point vector to arbitrary intersection point in described two common intersection, and described scale-up factor comprises described in each every default coefficient that circular arc is corresponding in conllinear circular arc group of center of circle.
S304, adopt described common coefficient and described scale-up factor to calculate and obtain process of fitting treatment result, described process of fitting treatment result comprises described in each in conllinear circular arc group of center of circle that the parametrization of every circular arc represents and two common intersection corresponding to center of circle conllinear circular arc group described in each;
Concrete, there is common parameter and scale-up factor separately in each center of circle conllinear circular arc group.Described caliberating device can obtain two common intersection corresponding to center of circle conllinear circular arc group described in each according to the common coefficient of each center of circle conllinear circular arc group, and the parametrization of obtaining every circular arc in each center of circle conllinear circular arc group according to the scale-up factor of each center of circle conllinear circular arc group represents.
S305, obtains the straight-line equation of two common intersection corresponding to each center of circle conllinear circular arc group, and the intersecting point coordinate of all straight-line equations is defined as to center of distortion point coordinate;
Concrete, described caliberating device obtains two straight-line equations that common intersection forms corresponding to each center of circle conllinear circular arc group, for example: M point and N point determined straight-line equation in fault image, if space parallel straight line has W group, corresponding center of circle conllinear circular arc group also has W, can obtain W bar straight-line equation, to W bar straight-line equation find intersection coordinate, and this intersecting point coordinate is defined as to center of distortion point coordinate.For example: the intersecting point coordinate that W bar straight-line equation draws is (x d0, y d0), by (x d0, y d0) be defined as center of distortion point coordinate.
S306, represents according to the parametrization of arbitrary circular arc in described center of distortion point coordinate and arbitrary center of circle conllinear circular arc group, obtains distortion parameter;
Concrete, in arbitrary center of circle conllinear circular arc group of supposing to try to achieve, the parametrization of arbitrary circular arc is expressed as described center of distortion point coordinate is (x d0, y d0), described distortion parameter is:
&lambda; = 1 x d 0 2 + y d 0 2 + Ax d 0 + By d 0 + C
Wherein, the parameter during the parametrization that A, B and C are arbitrary circular arc represents.
S307, adopts described center of distortion point coordinate and described distortion parameter to generate distortion peg model;
Concrete, described caliberating device can be determined r according to center of distortion point coordinate dexpression way, suppose that center of distortion point coordinate is c, expression way is:
r d=︱b-c︱
By described expression way and distortion parameter λ substitution (1) formula, generate distortion peg model.
In embodiments of the present invention, by obtaining the uncalibrated image that comprises at least two group space parallel straight lines, the center of circle conllinear circular arc group that in described at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment, and generate distortion peg model according to process of fitting treatment result.By adopting at least two group space parallel straight lines, respectively the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image being carried out to process of fitting treatment, and center of distortion point coordinate is asked for again, improve the accuracy rate of the calibration result of distortion peg model; By utilizing center of circle conllinear character, make calibration result in the situation that there is larger noise, still can keep robustness.
Below in conjunction with accompanying drawing 5 and accompanying drawing 9, the caliberating device of the fish eye lens radial distortion that the embodiment of the present invention is provided describes in detail.It should be noted that, the caliberating device shown in accompanying drawing 5 and accompanying drawing 9, for carrying out Fig. 1 of the present invention-method embodiment illustrated in fig. 4, for convenience of explanation, only show the part relevant to the embodiment of the present invention, concrete ins and outs do not disclose, and please refer to the embodiment shown in Fig. 1-Fig. 4 of the present invention.
Refer to Fig. 5, for the embodiment of the present invention provides a kind of structural representation of caliberating device of fish eye lens radial distortion.As shown in Figure 5, the described caliberating device 1 of the embodiment of the present invention can comprise: uncalibrated image acquisition module 11, circular fitting module 12 and model generation module 13.
Uncalibrated image acquisition module 11, for obtaining the uncalibrated image that comprises at least two group space parallel straight lines;
In specific implementation, described uncalibrated image acquisition module 11 obtains and adopts the captured uncalibrated image of fish eye lens, described uncalibrated image can comprise at least two group space parallel straight lines, and in described at least two group space parallel straight lines, every group of space parallel straight line all comprises some straight lines.
In embodiments of the present invention, the distortion peg model adopting can be expressed as (1) formula:
a = b 1 + &lambda;r d 2
(1) in formula, b=(x d, y d) be fault image coordinate points, a=(x u, y u) be the image coordinate point after distortion correction, r dfor the Euclidean distance of b and center of distortion point coordinate.Because the distortion peg model of traditional radial distortion is the hypothesis as picture centre based on center of distortion point, to distortion parameter, λ solves, to generate this distortion peg model, but under normal conditions, center of distortion point is not positioned at picture centre, therefore in the embodiment of the present invention by center of distortion point coordinate (x d0, y d0) also solve as unknown parameter.
In three dimensions, the arbitrary straight-line equation in each group space parallel straight line can be expressed as (2) formula:
I 3 D i ( t ) = x i + t &CenterDot; dx y i + t &CenterDot; dy z i + t &CenterDot; dz
(2), in formula, D=(dx, dy, dz) is unit direction vector, (x i, y i, z i) be some three dimensions points of this straight line process, t is a scale factor, is used for being created on the difference on this straight line.From (2) formula, one group of space parallel straight line may pass through different point (x i, y i, z i), but necessarily there is the identical direction vector D of unit.
Under desirable perspective projection, this group space parallel straight line is mapped as one group of straight line on desirable fluoroscopy images, can be expressed as (3) formula:
I u i ( t ) = f x i + t &CenterDot; dx z i + t &CenterDot; dz f y i + t &CenterDot; dy z i + t &CenterDot; dz
(3), in formula, f is the focal length of desirable perspective camera.As the three-dimensional point (x of process i, y i, z i) when different, Zhe Zu space parallel linear projection may be no longer parallel to the straight line becoming on desirable fluoroscopy images.
In the time of t → ± ∞, can obtain the subpoint of this vanishing point of organizing space parallel straight line on desirable fluoroscopy images, can be expressed as (4) formula:
vp u = ( f dx dz , f dy dz ) T
From (4) formula, under desirable perspective projection, this group space parallel straight line can intersect at same point (being the vanishing point of the space parallel straight line subpoint on desirable fluoroscopy images) on desirable fluoroscopy images.
By (1) formula substitution (4) formula, and suppose that center of distortion is the initial point of image, can obtain (5) formula:
f dx dz = x d 1 + &lambda; ( x d 2 + y d 2 )
And (6) formula:
f dy dz = y d 1 + &lambda; ( x d 2 + y d 2 )
, obtain divided by (6) formula by (5) formula:
dx dy = x d y d
(7) formula is illustrated under the distortion peg model of traditional radial distortion, and a and b have identical slope, and they and image coordinate initial point three point on a straight line.By (7) formula substitution (6) formula, can obtain (8) formula:
( 1 + dx 2 dy 2 ) &CenterDot; f &CenterDot; dy &CenterDot; &lambda;y d 2 - dz &CenterDot; y d + f &CenterDot; dy = 0
This be one about y dquadratic equation with one unknown, its discriminant is (9) formula:
&Delta; = dz 2 - 4 &CenterDot; &lambda; &CenterDot; ( 1 + dx 2 dy 2 ) &CenterDot; f 2 &CenterDot; dy 2
Due to for radial distortion, have λ < 0, thereby Δ must be greater than zero, can obtain thus formula (8) must have 2 real solutions.From above derivation, under the distortion peg model of traditional radial distortion, the vanishing point of one group of space parallel straight line has 2 subpoints on fault image.Be a center of circle conllinear circular arc group because one group of space parallel straight line is mapped under this model, therefore in this center of circle conllinear circular arc group, all circular arcs have 2 common intersection.
It should be noted that, in described at least two group space parallel straight lines, arbitrary group of space parallel straight line is all mapped as a center of circle conllinear circular arc group on fault image, all has a corresponding circular arc in the center of circle conllinear circular arc group that in described arbitrary group of space parallel straight line, arbitrary straight line shines upon on fault image.
Circular fitting module 12, carries out process of fitting treatment for the center of circle conllinear circular arc group that each group space parallel straight line of described at least two group space parallel straight lines is shone upon on fault image;
In specific implementation, described circular fitting module 12 can operate each group space parallel straight line in described at least two group space parallel straight lines respectively.The center of circle conllinear circular arc group that described circular fitting module 12 is shone upon on fault image each group space parallel straight line is carried out process of fitting treatment, further, described circular fitting module 12 adopts default nonlinear optimization algorithm, common parameter and the scale-up factor of the center of circle conllinear circular arc group that described in calculating, each group space parallel straight line shines upon on fault image, described circular fitting module 12 adopts described common coefficient and described scale-up factor to calculate and obtains process of fitting treatment result, described process of fitting treatment result comprises described in each in conllinear circular arc group of center of circle that the parametrization of every circular arc represents and two common intersection corresponding to center of circle conllinear circular arc group described in each.
Wherein, described common parameter comprises the middle point coordinate of line between described two common intersection and the described mid point vector to arbitrary intersection point in described two common intersection, and described scale-up factor comprises described in each every default coefficient that circular arc is corresponding in conllinear circular arc group of center of circle.
Concrete, please also refer to Fig. 6, for the embodiment of the present invention provides the structural representation of circular fitting module.As shown in Figure 6, described circular fitting module 12 can comprise:
Parameter coefficient calculation unit 121, for adopting default nonlinear optimization algorithm, common parameter and the scale-up factor of the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image described in calculating;
Result acquiring unit 122, be used for adopting described common coefficient and described scale-up factor to calculate and obtain process of fitting treatment result, described process of fitting treatment result comprises described in each in conllinear circular arc group of center of circle that the parametrization of every circular arc represents and two common intersection corresponding to center of circle conllinear circular arc group described in each;
In specific implementation, described parameter coefficient calculation unit 121 can operate each group space parallel straight line in described at least two group space parallel straight lines respectively.Described parameter coefficient calculation unit 121 can adopt default nonlinear optimization algorithm, calculate common parameter and the scale-up factor of the center of circle conllinear circular arc group that each group space parallel straight line shines upon on fault image, further, described parameter coefficient calculation unit 121 square distance minimization equation corresponding to center of circle conllinear circular arc group that each group space parallel straight line shines upon on fault image at least two group space parallel straight lines described in obtaining, and adopt default nonlinear optimization algorithm to calculate described square distance minimization equation, obtain common parameter and the scale-up factor of center of circle conllinear circular arc group described in each.
Being understandable that, there is common parameter and scale-up factor separately in each center of circle conllinear circular arc group.Described result acquiring unit 122 can obtain two common intersection corresponding to center of circle conllinear circular arc group described in each according to the common coefficient of each center of circle conllinear circular arc group, and the parametrization of obtaining every circular arc in each center of circle conllinear circular arc group according to the scale-up factor of each center of circle conllinear circular arc group represents.
Wherein, described common parameter comprises the middle point coordinate of line between described two common intersection and the described mid point vector to arbitrary intersection point in described two common intersection, and described scale-up factor comprises described in each every default coefficient that circular arc is corresponding in conllinear circular arc group of center of circle.
Concrete, please also refer to Fig. 7, for the embodiment of the present invention provides the structural representation of parameter coefficient calculation unit.As shown in Figure 7, described parameter coefficient calculation unit 121 can comprise:
Equation obtains subelement 1211, square distance minimization equation corresponding to center of circle conllinear circular arc group shining upon on fault image for each group space parallel straight line of at least two group space parallel straight lines described in obtaining;
In specific implementation, when described equation obtains subelement 1211 each group space parallel straight line shines upon on fault image at least two group space parallel straight lines described in matching center of circle conllinear circular arc group, described equation obtains subelement 1211 and obtains the square distance minimization equation of this center of circle conllinear circular arc group.
Please also refer to Fig. 4, for the embodiment of the present invention provides the example schematic of center of circle conllinear circular arc group on fault image.As shown in Figure 4, suppose that 2 common intersection are respectively M point and N point, the coordinate of the mid point P that supposes M, N point line on fault image is (p x, p y), obtaining the vector that P point is ordered to N point or M, the vector that adopts P point to order to N in the embodiment of the present invention, is designated as if the home position of i circular arc is o in this center of circle conllinear circular arc group i, point out and be dealt into o from P ithe vector of unit length of the directed line of point can be expressed as (10) formula:
Po i o = PN &RightArrow; &perp; / | PN &RightArrow; |
(10) in formula, represent and vector perpendicular vector, must meet PN &RightArrow; &perp; &CenterDot; PN &RightArrow; = 0 ; represent vector mould.Hence one can see that, Po i othere are two groups of solutions, are respectively - t y t x T t x 2 + t y 2 With t y - t x T t x 2 + t y 2 .
Set a scale-up factor center of circle o ican be expressed as (11) formula:
p x p y + po i o &CenterDot; | Po i &RightArrow; | = p x p y + k i &CenterDot; PN &RightArrow; &perp;
Suppose the total n bar circular arc of conllinear corresponding to this center of circle conllinear circular arc group circle group, the ading up to of known variables to be asked (4+n), (4+n) in n indicate n scale-up factor (k 1k n), 4 are expressed as the common common parameter of n bar circular arc, are respectively the p that represents P point position xand p y, and represent vector t xand t y.
For i article of circular arc in conllinear circle group, its radius can be expressed as (12) formula:
r i = | Po i &RightArrow; | 2 + | PN &RightArrow; | 2 = ( k i 2 + 1 ) ( t x 2 + t y 2 )
, in the time of this circular arc of matching, require minimized equation for (13) formula:
&epsiv; = &Sigma; j = 1 m [ | Q i , j o i | - r i ] 2
(13), in formula, m represents the number of the point of this circular arc of matching, | Q i,jo i| be the some Q on i article of circular arc i,jwith center of circle o ibetween distance.
In a center of circle conllinear circular arc group, the total n bar of such circular arc, therefore square distance minimization equation is (14) formula:
arg min p x , p y , t x , t y k 1 . . . k n &Sigma; i = 1 n &Sigma; j = 1 m [ | Q i , j o i | - r i ] 2
Parameter coefficient obtains subelement 1212, for adopting default nonlinear optimization algorithm to calculate described square distance minimization equation, obtains common parameter and the scale-up factor of center of circle conllinear circular arc group described in each;
In specific implementation, described default nonlinear optimization algorithm is preferably LM algorithm, described parameter coefficient obtains subelement 1212 and adopts described default nonlinear optimization algorithm to calculate described square distance minimization equation, obtains common parameter and the scale-up factor of center of circle conllinear circular arc group described in each.
Wherein, described common parameter comprises the middle point coordinate of line between described two common intersection and the described mid point vector to arbitrary intersection point in described two common intersection, and described scale-up factor comprises described in each every default coefficient that circular arc is corresponding in conllinear circular arc group of center of circle.
Model generation module 13, for generating distortion peg model according to process of fitting treatment result;
In specific implementation, described model generation module 13 represent according to the parametrization of every circular arc in center of circle conllinear circular arc group described in each and described in each two common intersection corresponding to center of circle conllinear circular arc group obtain center of distortion point coordinate and distortion parameter, and adopt described center of distortion point coordinate and described distortion parameter to generate distortion peg model.
Concrete, please also refer to Fig. 8, for the embodiment of the present invention provides the structural representation of model generation module.As shown in Figure 8, described model generation module 13 can comprise:
Coordinate parameters acquiring unit 131, for obtaining center of distortion point coordinate and distortion parameter according to process of fitting treatment result;
In specific implementation, described coordinate parameters acquiring unit 131 obtains the straight-line equation of two common intersection corresponding to each center of circle conllinear circular arc group, and the intersecting point coordinate of all straight-line equations is defined as to center of distortion point coordinate, described coordinate parameters acquiring unit 131 represents according to the parametrization of arbitrary circular arc in described center of distortion point coordinate and arbitrary center of circle conllinear circular arc group, obtains distortion parameter.
Concrete, please also refer to Fig. 9, for the embodiment of the present invention provides the structural representation of coordinate parameters acquiring unit.As shown in Figure 9, described coordinate parameters acquiring unit 131 can comprise:
Coordinate obtains subelement 1311, for obtaining the straight-line equation of two common intersection corresponding to each center of circle conllinear circular arc group, and the intersecting point coordinate of all straight-line equations is defined as to center of distortion point coordinate;
In specific implementation, described coordinate obtains subelement 1311 and obtains two straight-line equations that common intersection forms corresponding to each center of circle conllinear circular arc group, for example: M point and N point determined straight-line equation in fault image, if space parallel straight line has W group, corresponding center of circle conllinear circular arc group also has W, can obtain W bar straight-line equation, to W bar straight-line equation find intersection coordinate, and this intersecting point coordinate is defined as to center of distortion point coordinate.For example: the intersecting point coordinate that W bar straight-line equation draws is (x d0, y d0), by (x d0, y d0) be defined as center of distortion point coordinate.
Parameter acquiring subelement 1312, for representing according to the parametrization of described center of distortion point coordinate and the arbitrary circular arc of arbitrary center of circle conllinear circular arc group, obtains distortion parameter;
In specific implementation, suppose that the parametrization of arbitrary circular arc in arbitrary center of circle conllinear circular arc group that described parameter acquiring subelement 1312 obtains is expressed as described center of distortion point coordinate is (x d0, y d0), described distortion parameter is:
&lambda; = 1 x d 0 2 + y d 0 2 + Ax d 0 + By d 0 + C
Wherein, the parameter during the parametrization that A, B and C are arbitrary circular arc represents.
Model generation unit 132, for adopting described center of distortion point coordinate and described distortion parameter to generate distortion peg model;
In specific implementation, described model generation unit 132 can generate distortion peg model according to point coordinate in described distortion and described distortion parameter.
R can be determined according to center of distortion point coordinate in described model generation unit 132 dexpression way, suppose that center of distortion point coordinate is c, expression way is:
r d=︱b-c︱
Described model generation unit 132, by described expression way and distortion parameter λ substitution (1) formula, generates distortion peg model.
In embodiments of the present invention, by obtaining the uncalibrated image that comprises at least two group space parallel straight lines, the center of circle conllinear circular arc group that in described at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment, and generate distortion peg model according to process of fitting treatment result.By adopting at least two group space parallel straight lines, respectively the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image being carried out to process of fitting treatment, and center of distortion point coordinate is asked for again, improve the accuracy rate of the calibration result of distortion peg model; By utilizing center of circle conllinear character, make calibration result in the situation that there is larger noise, still can keep robustness.
Refer to Figure 10, for the embodiment of the present invention provides the structural representation of the caliberating device of another kind of fish eye lens radial distortion.As shown in figure 10, described caliberating device 1000 can comprise: at least one processor 1001, for example CPU, user interface 1003, at least one network interface 1004, storer 1005, at least one communication bus 1002.Wherein, communication bus 1002 is for realizing the connection communication between these assemblies.Wherein, user interface 1003 can comprise display screen (Display), keyboard (Keyboard), and selectable user interface 1003 can also comprise wireline interface, the wave point of standard.Network interface 1004 optionally can comprise wireline interface, the wave point (as WI-FI interface) of standard.Storer 1005 can be high-speed RAM storer, also can the unsettled storer of right and wrong (non-volatile memory), and for example at least one magnetic disk memory.Storer 1005 can also be optionally that at least one is positioned at the memory storage away from aforementioned processing device 1001.As shown in figure 10, in the storer 1005 as a kind of computer-readable storage medium, can comprise operating system, network communication module, Subscriber Interface Module SIM and Analysis program.
Described processor 1001 can be for calling in storer 1005 the Analysis program of storage, and specifically carry out following steps:
Obtain the uncalibrated image that comprises at least two group space parallel straight lines;
The center of circle conllinear circular arc group that in described at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment;
Generate distortion peg model according to process of fitting treatment result.
In at least two group space parallel straight lines described in a kind of feasible embodiment of the embodiment of the present invention, arbitrary group of space parallel straight line is all mapped as a center of circle conllinear circular arc group on fault image, all has a corresponding circular arc in the center of circle conllinear circular arc group that in described arbitrary group of space parallel straight line, arbitrary straight line shines upon on fault image.
In the feasible embodiment of the another kind of the embodiment of the present invention, when described processor 1001 center of circle conllinear circular arc group that each group space parallel straight line shines upon on fault image in carrying out described at least two group space parallel straight lines is carried out process of fitting treatment, specifically carry out following steps:
Adopt default nonlinear optimization algorithm, common parameter and the scale-up factor of the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image described in calculating;
Adopt described common coefficient and described scale-up factor to calculate and obtain process of fitting treatment result, described process of fitting treatment result comprises described in each in conllinear circular arc group of center of circle that the parametrization of every circular arc represents and two common intersection corresponding to center of circle conllinear circular arc group described in each;
Wherein, described common parameter comprises the middle point coordinate of line between described two common intersection and the described mid point vector to arbitrary intersection point in described two common intersection, and described scale-up factor comprises described in each every default coefficient that circular arc is corresponding in conllinear circular arc group of center of circle.
In another feasible embodiment of the embodiment of the present invention, described processor 1001 is being carried out the default nonlinear optimization algorithm of employing, when the common parameter of the center of circle conllinear circular arc group that described in calculating, at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image and scale-up factor, specifically carry out following steps:
Square distance minimization equation corresponding to center of circle conllinear circular arc group that described in obtaining, at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image;
Adopt default nonlinear optimization algorithm to calculate described square distance minimization equation, obtain common parameter and the scale-up factor of center of circle conllinear circular arc group described in each.
In another feasible embodiment of the embodiment of the present invention, described processor 1001, in the time carrying out according to process of fitting treatment result generation distortion peg model, is specifically carried out following steps:
Obtain center of distortion point coordinate and distortion parameter according to process of fitting treatment result;
Adopt described center of distortion point coordinate and described distortion parameter to generate distortion peg model.
In another feasible embodiment of the embodiment of the present invention, when described processor 1001 obtains center of distortion point coordinate and distortion parameter in execution according to process of fitting treatment result, specifically carry out following steps:
Obtain the straight-line equation of two common intersection corresponding to each center of circle conllinear circular arc group, and the intersecting point coordinate of all straight-line equations is defined as to center of distortion point coordinate;
Represent according to the parametrization of arbitrary circular arc in described center of distortion point coordinate and arbitrary center of circle conllinear circular arc group, obtain distortion parameter.
In another feasible embodiment of the embodiment of the present invention, described square distance minimization equation is:
arg min p x , p y , t x , t y k 1 . . . k n &Sigma; i = 1 n &Sigma; j = 1 m [ | Q i , j o i | - r i ] 2
Wherein, m represents the number of the point of i article of circular arc of matching, | Q i,jo i| represent the some Q on i article of circular arc i,jwith center of circle o ibetween distance, r irepresent the radius of i article of circular arc, n represents the number of circular arc in a center of circle conllinear circular arc group, (p x, p y) represent the coordinate that the mid point P of line between described two common intersection M points and N point is ordered, (t x, t y) represent the vector that described P point is ordered to described M point or N, (k 1k n) represent the scale-up factor of every circular arc in n bar circular arc;
Described default nonlinear optimization algorithm is LM algorithm.
In another feasible embodiment of the embodiment of the present invention, suppose that the parametrization of arbitrary circular arc in the conllinear circular arc group of arbitrary center of circle is expressed as described center of distortion point coordinate is (x d0, y d0), described distortion parameter is:
&lambda; = 1 x d 0 2 + y d 0 2 + Ax d 0 + By d 0 + C
Wherein, the parameter during the parametrization that A, B and C are arbitrary circular arc represents.
In another feasible embodiment of the embodiment of the present invention, described distortion peg model is:
a = b 1 + &lambda;r d 2
Wherein, b=(x d, y d) be fault image coordinate points, a=(x u, y u) be the image coordinate point after distortion correction, r dfor the Euclidean distance of b and center of distortion point coordinate.
In embodiments of the present invention, by obtaining the uncalibrated image that comprises at least two group space parallel straight lines, the center of circle conllinear circular arc group that in described at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment, and generate distortion peg model according to process of fitting treatment result.By adopting at least two group space parallel straight lines, respectively the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image being carried out to process of fitting treatment, and center of distortion point coordinate is asked for again, improve the accuracy rate of the calibration result of distortion peg model; By utilizing center of circle conllinear character, make calibration result in the situation that there is larger noise, still can keep robustness.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize with hardware, or firmware realization, or their array mode realizes.In the time using software to realize, one or more instructions or the code that above-mentioned functions can be stored in computer-readable medium or on computer-readable medium transmit.Computer-readable medium comprises computer-readable storage medium and communication media, and wherein communication media comprises any medium of being convenient to transmit from a place to another place computer program.Storage medium can be any usable medium that computing machine can access.As example but be not limited to: computer-readable medium can comprise RAM, ROM or other optical disc storage, magnetic disk storage medium or other magnetic storage apparatus or can be used in carry or store the expectation with instruction or data structure form program code and can be by any other medium of computer access.In addition.Any connection can be suitable become computer-readable medium.For example, if software be use concentric cable, optical fiber cable, twisted-pair feeder, Digital Subscriber Line or the wireless technology such as infrared ray, radio and microwave from website, server or the transmission of other remote source, so concentric cable, optical fiber cable, twisted-pair feeder, Digital Subscriber Line or the wireless technology such as infrared ray, wireless and microwave be included under in the photographic fixing of medium.As used in the present invention, dish (Disk) and dish (disc) comprise compression laser disc, laser dish, laser disc, digital universal laser disc, floppy disk and Blu-ray Disc, the copy data of the common magnetic of its mid-game, dish carrys out the copy data of optics with laser.Within combination above also should be included in the protection domain of computer-readable medium.
Above disclosed is only preferred embodiment of the present invention, certainly can not limit with this interest field of the present invention, and the equivalent variations of therefore doing according to the claims in the present invention, still belongs to the scope that the present invention is contained.

Claims (18)

1. a scaling method for fish eye lens radial distortion, is characterized in that, comprising:
Obtain the uncalibrated image that comprises at least two group space parallel straight lines;
The center of circle conllinear circular arc group that in described at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment;
Generate distortion peg model according to process of fitting treatment result.
2. method according to claim 1, it is characterized in that, in described at least two group space parallel straight lines, arbitrary group of space parallel straight line is all mapped as a center of circle conllinear circular arc group on fault image, all has a corresponding circular arc in the center of circle conllinear circular arc group that in described arbitrary group of space parallel straight line, arbitrary straight line shines upon on fault image.
3. method according to claim 1 and 2, is characterized in that, described the center of circle conllinear circular arc group that in described at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image is carried out to process of fitting treatment, comprising:
Adopt default nonlinear optimization algorithm, common parameter and the scale-up factor of the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image described in calculating;
Adopt described common coefficient and described scale-up factor to calculate and obtain process of fitting treatment result, described process of fitting treatment result comprises described in each in conllinear circular arc group of center of circle that the parametrization of every circular arc represents and two common intersection corresponding to center of circle conllinear circular arc group described in each;
Wherein, described common parameter comprises the middle point coordinate of line between described two common intersection and the described mid point vector to arbitrary intersection point in described two common intersection, and described scale-up factor comprises described in each every default coefficient that circular arc is corresponding in conllinear circular arc group of center of circle.
4. method according to claim 3, it is characterized in that, the nonlinear optimization algorithm that described employing is default, common parameter and the scale-up factor of the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image described in calculating, comprising:
Square distance minimization equation corresponding to center of circle conllinear circular arc group that described in obtaining, at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image;
Adopt default nonlinear optimization algorithm to calculate described square distance minimization equation, obtain common parameter and the scale-up factor of center of circle conllinear circular arc group described in each.
5. method according to claim 3, is characterized in that, described according to process of fitting treatment result generation distortion peg model, comprising:
Obtain center of distortion point coordinate and distortion parameter according to process of fitting treatment result;
Adopt described center of distortion point coordinate and described distortion parameter to generate distortion peg model.
6. method according to claim 5, is characterized in that, describedly obtains center of distortion point coordinate and distortion parameter according to process of fitting treatment result, comprising:
Obtain the straight-line equation of two common intersection corresponding to each center of circle conllinear circular arc group, and the intersecting point coordinate of all straight-line equations is defined as to center of distortion point coordinate;
Represent according to the parametrization of arbitrary circular arc in described center of distortion point coordinate and arbitrary center of circle conllinear circular arc group, obtain distortion parameter.
7. method according to claim 4, is characterized in that, described square distance minimization equation is:
arg min p x , p y , t x , t y k 1 . . . k n &Sigma; i = 1 n &Sigma; j = 1 m [ | Q i , j o i | - r i ] 2
Wherein, m represents the number of the point of i article of circular arc of matching, | Q i,jo i| represent the some Q on i article of circular arc i,jwith center of circle o ibetween distance, r irepresent the radius of i article of circular arc, n represents the number of circular arc in a center of circle conllinear circular arc group, (p x, p y) represent the coordinate that the mid point P of line between described two common intersection M points and N point is ordered, (t x, t y) represent the vector that described P point is ordered to described M point or N, (k 1k n) represent the scale-up factor of every circular arc in n bar circular arc;
Described default nonlinear optimization algorithm is LM (Leven-Marquardt) algorithm.
8. method according to claim 6, is characterized in that, supposes that the parametrization of arbitrary circular arc in the conllinear circular arc group of arbitrary center of circle is expressed as described center of distortion point coordinate is (x d0, y d0), described distortion parameter is:
&lambda; = 1 x d 0 2 + y d 0 2 + Ax d 0 + By d 0 + C
Wherein, the parameter during the parametrization that A, B and C are arbitrary circular arc represents.
9. method according to claim 8, is characterized in that, described distortion peg model is:
a = b 1 + &lambda;r d 2
Wherein, b=(x d, y d) be fault image coordinate points, a=(x u, y u) be the image coordinate point after distortion correction, r dfor the Euclidean distance of b and center of distortion point coordinate.
10. a caliberating device for fish eye lens radial distortion, is characterized in that, comprising:
Uncalibrated image acquisition module, for obtaining the uncalibrated image that comprises at least two group space parallel straight lines;
Circular fitting module, carries out process of fitting treatment for the center of circle conllinear circular arc group that each group space parallel straight line of described at least two group space parallel straight lines is shone upon on fault image;
Model generation module, for generating distortion peg model according to process of fitting treatment result.
11. caliberating devices according to claim 10, it is characterized in that, in described at least two group space parallel straight lines, arbitrary group of space parallel straight line is all mapped as a center of circle conllinear circular arc group on fault image, all has a corresponding circular arc in the center of circle conllinear circular arc group that in described arbitrary group of space parallel straight line, arbitrary straight line shines upon on fault image.
12. according to the caliberating device described in claim 10 or 11, it is characterized in that, described circular fitting module comprises:
Parameter coefficient calculation unit, for adopting default nonlinear optimization algorithm, common parameter and the scale-up factor of the center of circle conllinear circular arc group that at least two group space parallel straight lines, each group space parallel straight line shines upon on fault image described in calculating;
Result acquiring unit, be used for adopting described common coefficient and described scale-up factor to calculate and obtain process of fitting treatment result, described process of fitting treatment result comprises described in each in conllinear circular arc group of center of circle that the parametrization of every circular arc represents and two common intersection corresponding to center of circle conllinear circular arc group described in each;
Wherein, described common parameter comprises the middle point coordinate of line between described two common intersection and the described mid point vector to arbitrary intersection point in described two common intersection, and described scale-up factor comprises described in each every default coefficient that circular arc is corresponding in conllinear circular arc group of center of circle.
13. caliberating devices according to claim 12, is characterized in that, described parameter coefficient calculation unit comprises:
Equation obtains subelement, square distance minimization equation corresponding to center of circle conllinear circular arc group shining upon on fault image for each group space parallel straight line of at least two group space parallel straight lines described in obtaining;
Parameter coefficient obtains subelement, for adopting default nonlinear optimization algorithm to calculate described square distance minimization equation, obtains common parameter and the scale-up factor of center of circle conllinear circular arc group described in each.
14. caliberating devices according to claim 12, is characterized in that, described model generation module comprises:
Coordinate parameters acquiring unit, for obtaining center of distortion point coordinate and distortion parameter according to process of fitting treatment result;
Model generation unit, for adopting described center of distortion point coordinate and described distortion parameter to generate distortion peg model.
15. caliberating devices according to claim 14, is characterized in that, described coordinate parameters acquiring unit comprises:
Coordinate obtains subelement, for obtaining the straight-line equation of two common intersection corresponding to each center of circle conllinear circular arc group, and the intersecting point coordinate of all straight-line equations is defined as to center of distortion point coordinate;
Parameter acquiring subelement, for representing according to the parametrization of described center of distortion point coordinate and the arbitrary circular arc of arbitrary center of circle conllinear circular arc group, obtains distortion parameter.
16. caliberating devices according to claim 13, is characterized in that, described square distance minimization equation is:
arg min p x , p y , t x , t y k 1 . . . k n &Sigma; i = 1 n &Sigma; j = 1 m [ | Q i , j o i | - r i ] 2
Wherein, m represents the number of the point of i article of circular arc of matching, | Q i,jo i| represent the some Q on i article of circular arc i,jwith center of circle o ibetween distance, r irepresent the radius of i article of circular arc, n represents the number of circular arc in a center of circle conllinear circular arc group, (p x, p y) represent the coordinate that the mid point P of line between described two common intersection M points and N point is ordered, (t x, t y) represent the vector that described P point is ordered to described M point or N, (k 1k n) represent the scale-up factor of every circular arc in n bar circular arc;
Described default nonlinear optimization algorithm is LM algorithm.
17. caliberating devices according to claim 15, is characterized in that, suppose that the parametrization of arbitrary circular arc in the conllinear circular arc group of arbitrary center of circle is expressed as described center of distortion point coordinate is (x d0, y d0), described distortion parameter is:
&lambda; = 1 x d 0 2 + y d 0 2 + Ax d 0 + By d 0 + C
Wherein, the parameter during the parametrization that A, B and C are arbitrary circular arc represents.
18. caliberating devices according to claim 17, is characterized in that, described distortion peg model is:
a = b 1 + &lambda;r d 2
Wherein, b=(x d, y d) be fault image coordinate points, a=(x u, y u) be the image coordinate point after distortion correction, r dfor the Euclidean distance of b and center of distortion point coordinate.
CN201410244246.3A 2014-06-04 2014-06-04 Method and device for calibrating fish-eye lens radial distortion Expired - Fee Related CN104077768B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410244246.3A CN104077768B (en) 2014-06-04 2014-06-04 Method and device for calibrating fish-eye lens radial distortion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410244246.3A CN104077768B (en) 2014-06-04 2014-06-04 Method and device for calibrating fish-eye lens radial distortion

Publications (2)

Publication Number Publication Date
CN104077768A true CN104077768A (en) 2014-10-01
CN104077768B CN104077768B (en) 2017-04-19

Family

ID=51599010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410244246.3A Expired - Fee Related CN104077768B (en) 2014-06-04 2014-06-04 Method and device for calibrating fish-eye lens radial distortion

Country Status (1)

Country Link
CN (1) CN104077768B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408730A (en) * 2014-12-08 2015-03-11 北京市新技术应用研究所 Calibration device for fish eye lens
CN105096269A (en) * 2015-07-21 2015-11-25 北京交通大学 Radial image distortion rectifying method and system based on distorted linear structure detection
CN108009981A (en) * 2017-09-26 2018-05-08 深圳市易成自动驾驶技术有限公司 Optimization method, device and the computer-readable recording medium of distortion parameter
CN109102545A (en) * 2018-07-11 2018-12-28 大连理工大学 A kind of distortion correction method based on nonmetric
CN109215084A (en) * 2018-08-06 2019-01-15 杭州雄迈集成电路技术有限公司 A method of for distortion correction location of the core

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1507407A2 (en) * 2003-08-13 2005-02-16 Topcon Corporation Electronic image pickup apparatus with image correction function and method thereof
CN102750697A (en) * 2012-06-08 2012-10-24 华为技术有限公司 Parameter calibration method and device
CN103617615A (en) * 2013-11-27 2014-03-05 华为技术有限公司 Radial distortion parameter obtaining method and obtaining device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1507407A2 (en) * 2003-08-13 2005-02-16 Topcon Corporation Electronic image pickup apparatus with image correction function and method thereof
CN102750697A (en) * 2012-06-08 2012-10-24 华为技术有限公司 Parameter calibration method and device
CN103617615A (en) * 2013-11-27 2014-03-05 华为技术有限公司 Radial distortion parameter obtaining method and obtaining device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CIARAN HUGHES 等: "Equidistant (fθ) fish-eye perspective with application in distortion centre estimation", 《IMAGE AND VISION COMPUTING》 *
朱云芳: "摄像机径向畸变校正和内参估计的单图标定方法", 《光电工程》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408730A (en) * 2014-12-08 2015-03-11 北京市新技术应用研究所 Calibration device for fish eye lens
CN104408730B (en) * 2014-12-08 2018-08-07 北京市新技术应用研究所 Fish-eye caliberating device
CN105096269A (en) * 2015-07-21 2015-11-25 北京交通大学 Radial image distortion rectifying method and system based on distorted linear structure detection
CN105096269B (en) * 2015-07-21 2018-03-02 北京交通大学 The method and system of image radial distortion correction based on distortion linear structure detection
CN108009981A (en) * 2017-09-26 2018-05-08 深圳市易成自动驾驶技术有限公司 Optimization method, device and the computer-readable recording medium of distortion parameter
CN108009981B (en) * 2017-09-26 2021-06-01 深圳市易成自动驾驶技术有限公司 Method and device for optimizing distortion parameter and computer readable storage medium
CN109102545A (en) * 2018-07-11 2018-12-28 大连理工大学 A kind of distortion correction method based on nonmetric
CN109215084A (en) * 2018-08-06 2019-01-15 杭州雄迈集成电路技术有限公司 A method of for distortion correction location of the core

Also Published As

Publication number Publication date
CN104077768B (en) 2017-04-19

Similar Documents

Publication Publication Date Title
CN104077768A (en) Method and device for calibrating fish-eye lens radial distortion
CN109166156B (en) Camera calibration image generation method, mobile terminal and storage medium
JP6436373B2 (en) Distortion correction method and terminal
EP3376762A1 (en) Depth image composition method and apparatus
CN104994367A (en) Image correcting method and camera
CN113643414A (en) Three-dimensional image generation method and device, electronic equipment and storage medium
Traumann et al. Accurate 3D measurement using optical depth information
CN114494388A (en) Three-dimensional image reconstruction method, device, equipment and medium in large-view-field environment
CN107133981B (en) Image processing method and device
CN110099220B (en) Panoramic stitching method and device
CN107203961B (en) Expression migration method and electronic equipment
JP6283329B2 (en) Augmented Reality Object Recognition Device
CN106600691B (en) Fusion correction method and system of multi-channel two-dimensional video images in three-dimensional geographic space
CN111353945B (en) Fisheye image correction method, device and storage medium
CN106780758B (en) imaging method and device for virtual reality equipment and virtual reality equipment
CN105488764A (en) Fisheye image correction method and apparatus
US10489933B2 (en) Method for modelling an image device, corresponding computer program product and computer-readable carrier medium
CN112565730B (en) Road side sensing method and device, electronic equipment, storage medium and road side equipment
CN108122200A (en) Image split-joint method and device
Liu et al. Correcting large lens radial distortion using epipolar constraint
CN104994295A (en) Distortion correction method and mobile terminal
Kim et al. Extended fisheye lens model for practical geometric correction and image enhancement
CN110969701A (en) Method and device for modeling house and storage medium
CN112562071A (en) Method, device and equipment for calculating motion difference and storage medium
JPWO2019244200A1 (en) Learning device, image generator, learning method, image generation method and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170419

Termination date: 20200604

CF01 Termination of patent right due to non-payment of annual fee