CN105488764A - Fisheye image correction method and apparatus - Google Patents
Fisheye image correction method and apparatus Download PDFInfo
- Publication number
- CN105488764A CN105488764A CN201510817400.6A CN201510817400A CN105488764A CN 105488764 A CN105488764 A CN 105488764A CN 201510817400 A CN201510817400 A CN 201510817400A CN 105488764 A CN105488764 A CN 105488764A
- Authority
- CN
- China
- Prior art keywords
- fish eye
- correction parameter
- point
- coordinate system
- fisheye
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000003702 image correction Methods 0.000 title abstract description 4
- 238000012937 correction Methods 0.000 claims abstract description 108
- 238000003384 imaging method Methods 0.000 claims abstract description 63
- 238000006243 chemical reaction Methods 0.000 claims abstract description 24
- 241000251468 Actinopterygii Species 0.000 claims description 115
- 230000015572 biosynthetic process Effects 0.000 claims description 42
- 238000013507 mapping Methods 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 abstract description 3
- 230000000694 effects Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The invention provides a fisheye image correction method and apparatus. The method comprises: obtaining included angles theta between a plurality of pixel points in a fisheye image and a central axis in a fisheye lens coordinate system; according to a preset fisheye lens parameter list, determining distances r and distances theta d that correspond to the included angles theta; obtaining multiple groups of the included angles theta, the distances r and the distances theta d; according to the multiple groups of the included angles theta, the distances r and the distances theta d and a preset fisheye lens imaging model formula, obtaining correction parameters; according to the correction parameters and a preset conversion formula, establishing a correspondence relationship between a correction imaging point and a fisheye imaging point of each pixel point; according to the correspondence relationship, obtaining a pixel value of the fisheye imaging point; and endowing the correction imaging point with the pixel value to obtain a correction image. According to the method, the calculation is performed only by utilizing the fisheye lens parameter list, the fisheye lens imaging model formula and the conversion formula, the realization method is very simple, and the precision of fisheye image correction can be ensured.
Description
Technical field
The present invention relates to image processing techniques, particularly relate to a kind of fisheye image correcting method and device.
Background technology
Fish eye lens is as a kind of bugeye lens, and its visual angle can meet or exceed 180 °, and the scope that can take is very large, is therefore widely used in video monitoring, virtual reality, three-dimensional modeling, vision guided navigation field.
Particularly, semisphere object plane is imaged as plane by fish eye lens, therefore captured image Severe distortion, makes the visually impression not nature of people, therefore needs the vision acceptable perspective projection image of being behaved by the distorted image correction captured by fish eye lens.Carry out in prior art in the method for correcting fisheye image, comprise flake imaging surface projection model, two dimensional image distortion correction, 3-D view distortion correction three class.Wherein comparatively conventional 3-D view distortion correction method, realizes based on spherical coordinate orientation method.
But, adopt the bearing calibration of prior art, need to adopt polynomial expression coordinate transform and polar radius to map based on spherical co-ordinate, its calculation of complex and precision is low, cause the efficiency of correcting fisheye image and accuracy rate not high.
Summary of the invention
The invention provides a kind of fisheye image correcting method and device, for solving calculation of complex in prior art and precision is low causes the problem that the efficiency of correcting fisheye image and accuracy rate are not high.
First aspect present invention provides a kind of fisheye image correcting method, comprising:
To obtain in fish eye images multiple pixel in fish eye lens coordinate system with the angle theta of central shaft;
According to the fish eye lens parameter list preset, determine the distance r corresponding respectively with multiple described angle theta and distance theta
d, obtain and organize θ, r, θ more
d, wherein, described fish eye lens parameter list comprises: θ, r, θ
dbetween mapping relations, described distance r is the distance that be corrected in picture point to described fish eye images plane coordinate system initial point of described pixel in fish eye images plane coordinate system, described distance theta
dfor the flake imaging point of described pixel in fish eye images plane coordinate system is to the distance of initial point in described fish eye images plane coordinate system;
Organize θ, r, θ according to described more
dand the panorama picture of fisheye lens model formation preset obtains correction parameter;
According to described correction parameter and default conversion formula, set up the corresponding relation being corrected into picture point and flake imaging point of each described pixel;
According to described corresponding relation, obtain the pixel value of described flake imaging point, be corrected into picture point described in being given by described pixel value, obtain correcting image.
In conjunction with first aspect, in the first possible implementation of first aspect, describedly organize θ, r, θ according to described more
dand the panorama picture of fisheye lens model formation preset obtains correction parameter, comprising:
Organize θ, r and default first panorama picture of fisheye lens model formation r=ftan (θ) according to described more, obtain the first correction parameter f;
Organize θ, θ according to described more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), obtain the second correction parameter k
0, k
1, k
2, k
3, k
4.
In conjunction with the first possible implementation of first aspect, in the implementation that the second of first aspect is possible, described organize θ, r and the first default panorama picture of fisheye lens model formation r=ftan (θ) according to described more, obtain the first correction parameter f, comprising:
According to the first panorama picture of fisheye lens model formation r=ftan (θ), calculate respectively and often organize initial first correction parameter corresponding to θ, r, obtain multiple initial first correction parameter;
Matching is carried out to described multiple initial first correction parameter, obtains described first correction parameter f.
In conjunction with the first possible implementation of first aspect, in the third possible implementation of first aspect, describedly organize θ, θ according to described more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), obtain the second correction parameter k
0, k
1, k
2, k
3, k
4, comprising:
Organize θ, θ according to described more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), set up at least one system of equations;
Calculate each described system of equations respectively, obtain multiple initial second correction parameter;
Matching is carried out to described multiple initial second correction parameter, obtains described second correction parameter k
0, k
1, k
2, k
3, k
4.
In conjunction with the first of first aspect to any one in the third possible implementation, in the 4th kind of possible implementation of first aspect, in described acquisition fish eye images multiple pixel in fish eye lens coordinate system with the angle theta of central shaft before, also comprise:
Described fish eye images is carried out ellipse fitting, obtain elliptic fisheye image, again described elliptic fisheye image is converted into circle fisheye image, and obtain the central point of circle fisheye image, using the initial point of described central point as described fish eye lens coordinate system, determine described fish eye lens coordinate system according to the initial point of described fish eye lens coordinate system;
According to described central point and fish-eye focal length, determine the initial point of described fish eye images plane coordinate system, and determine described fish eye images plane coordinate system according to the initial point of described fish eye images plane coordinate system.
In conjunction with first aspect, in the 5th kind of possible implementation of first aspect, described according to described corresponding relation, obtain the pixel value of described flake imaging point, be corrected into picture point described in being given by described pixel value, obtain correcting image, comprising:
According to described corresponding relation, adopt bilinear interpolation process, obtain pixel value from described flake imaging point, be corrected into picture point described in being given by described pixel value, obtain correcting image.
Second aspect present invention provides a kind of correcting fisheye image device, comprising:
First acquisition module, for obtain in fish eye images multiple pixel in fish eye lens coordinate system with the angle theta of central shaft;
Determination module, for according to the fish eye lens parameter list preset, determines the distance r corresponding respectively with multiple described angle theta and distance theta
d, obtain and organize θ, r, θ more
d, wherein, described fish eye lens parameter list comprises: θ, r, θ
dbetween mapping relations, described distance r is the distance, the described distance theta that are corrected in picture point to described fish eye images plane coordinate system initial point of described pixel in fish eye images plane coordinate system
dfor the flake imaging point of described pixel in fish eye images plane coordinate system is to the distance of initial point in described fish eye images plane coordinate system;
Second acquisition module, for organizing θ, r, θ according to described more
dand the panorama picture of fisheye lens model formation preset obtains correction parameter;
Set up module, for according to described correction parameter and default conversion formula, set up the corresponding relation being corrected into picture point and flake imaging point of each described pixel;
Generation module, for according to described corresponding relation, obtains the pixel value of described flake imaging point, is corrected into picture point, obtains correcting image described in being given by described pixel value.
In conjunction with second aspect, in the first possible implementation of second aspect, described second acquisition module comprises:
First correcting unit, for organizing θ, r and the first default panorama picture of fisheye lens model formation r=ftan (θ) according to described, obtains the first correction parameter f more;
Second correcting unit, for organizing θ, θ according to described more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), obtain the second correction parameter k
0, k
1, k
2, k
3, k
4.
In conjunction with the first possible implementation of second aspect, in the implementation that the second of second aspect is possible, described first correcting unit, specifically for: according to the first panorama picture of fisheye lens model formation r=ftan (θ), calculate respectively and often organize initial first correction parameter corresponding to θ, r, obtain multiple initial first correction parameter; Matching is carried out to described multiple initial first correction parameter, obtains described first correction parameter f.
In conjunction with the first possible implementation of second aspect, in the third possible implementation of second aspect, described second correcting unit, specifically for: organize θ, θ according to described more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), set up at least one system of equations; Calculate each described system of equations respectively, obtain multiple initial second correction parameter; Matching is carried out to described multiple initial second correction parameter, obtains described second correction parameter k
0, k
1, k
2, k
3, k
4.
Fisheye image correcting method provided by the present invention, gets at the fish eye lens parameter list that basis is default and organizes θ, r, θ more
dafter, according to accessed many groups θ, r, θ
dand the panorama picture of fisheye lens model formation preset gets correction parameter, the corresponding relation be corrected between picture point and flake imaging point can be set up again according to correction parameter and default conversion formula, carrying out the comparatively timing of concrete fish eye images, what direct use had been set up the corresponding relation be corrected between picture point and flake imaging point can realize the real time correction of fish eye images.Fisheye image correcting method provided by the present invention, fish eye lens parameter list, default panorama picture of fisheye lens model formation and default conversion formula is only utilized to calculate, compared to fisheye image correcting method of the prior art, implementation method is very simple, simultaneously owing to using formulae discovery, therefore, it is possible to ensure the precision of correcting fisheye image, thus ensure efficiency and the accuracy rate of correcting fisheye image.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is panorama picture of fisheye lens model schematic provided by the present invention;
Fig. 2 is the schematic flow sheet of the embodiment one of fisheye image correcting method provided by the present invention;
Fig. 3 is the schematic flow sheet of the embodiment two of fisheye image correcting method provided by the present invention;
Fig. 4 is the schematic flow sheet of the embodiment three of fisheye image correcting method provided by the present invention;
Fig. 5 is the schematic flow sheet of the embodiment four of fisheye image correcting method provided by the present invention;
Fig. 6 is the schematic flow sheet of the embodiment five of fisheye image correcting method provided by the present invention;
Fig. 7 is the structural representation of the embodiment one of correcting fisheye image device provided by the present invention;
Fig. 8 is the structural representation of the embodiment two of correcting fisheye image device provided by the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 is panorama picture of fisheye lens model schematic provided by the present invention, as shown in Figure 1, OcXcYcZc is fish eye lens coordinate system, OiXiYiZi is fish eye images plane coordinate system, and the distance between the initial point of fish eye lens coordinate system and the initial point of fish eye images plane coordinate system is fish-eye focal distance f.θ represents the angle of the imaging point that the pixel of the fish eye images captured by fish eye lens is corresponding in fish eye lens coordinate system and central shaft.Suppose that the imaging point that one of them pixel of the fish eye images captured by fish eye lens is corresponding in fish eye lens coordinate system is Pc, flake imaging point in fish eye images plane coordinate system then corresponding to this imaging point Pc is Pi, the picture point that is corrected into after correcting imaging point Pi is Pr, this is corrected into the coordinate of picture point Pr in fish eye images plane coordinate system for (a, b).Distance between the initial point of flake imaging point Pi and fish eye images plane coordinate system is θ
d, the distance between the initial point being corrected into picture point Pr and fish eye images plane coordinate system is r.In correcting fisheye image, the relation between the coordinate system needing to use above-mentioned model to define, imaging point is to carry out correcting fisheye image.
It should be noted that, the label symbol used in the following embodiment of the present invention is all the label symbol defined based on Fig. 1.
Fig. 2 is the schematic flow sheet of the embodiment one of fisheye image correcting method provided by the present invention, and the executive agent of the method can be terminal, the such as equipment such as computing machine, server, and as shown in Figure 2, the method comprises:
S101, to obtain in fish eye images multiple pixel in fish eye lens coordinate system with the angle theta of central shaft.
The fish eye lens parameter list that S102, basis are preset, determines the distance r corresponding respectively with multiple angle theta and distance theta
d, obtain and organize θ, r, θ more
d, wherein, fish eye lens parameter list comprises: θ, r, θ
dbetween mapping relations, distance r is the distance that be corrected in picture point to fish eye images plane coordinate system initial point of above-mentioned pixel in fish eye images plane coordinate system, distance theta
dfor the flake imaging point of above-mentioned pixel in fish eye images plane coordinate system is to the distance of initial point in fish eye images plane coordinate system.
Generally, for each fish eye lens, fish eye lens manufacturer can provide a fish eye lens parameter list, and this parameter list gives for different θ, r and θ corresponding to it
d.Namely each fish eye lens parameter list includes θ, r, θ
dbetween mapping relations.
After getting θ according to certain pixel of fish eye images, r and θ corresponding to it can be obtained according to fish eye lens parameter list
d.The like, adopt the θ that multiple pixel is corresponding, just can obtain and organize θ, r, θ more
d.
Table 1 is the example of fish eye lens parameter list, as shown in table 1:
Table 1
Wherein, the dist in table 1 represents distortion rate.
S103, organize θ, r, θ according to above-mentioned more
dand the panorama picture of fisheye lens model formation preset obtains correction parameter.
S104, according to above-mentioned correction parameter and default conversion formula, set up the corresponding relation being corrected into picture point and flake imaging point of each pixel.
Particularly, after getting correction parameter, substituted in the conversion formula preset by correction parameter, conversion formula illustrates the formula that the coordinate conversion being corrected into picture point is flake imaging point coordinate.
Alternatively, when set up each pixel be corrected into the corresponding relation of picture point and flake imaging point after, can by corresponding relation preserve hereof, such as, in binary file.Due to for same image resolution ratio, the corresponding relation be corrected between picture point and flake imaging point is all unique, therefore, by said method set up the corresponding relation be corrected between picture point and flake imaging point stood up and can be applied to all concrete fish eye images under a kind of image resolution ratio.This corresponding relation is preserved hereof, when needs carry out timing to a specific fish eye images, directly use the corresponding relation preserved in file.Thus meet the requirement of real-time of correcting fisheye image.
S105, according to above-mentioned corresponding relation, obtain the pixel value of flake imaging point, pixel value is given and is corrected into picture point, obtain correcting image.
Particularly, based on the corresponding relation be corrected between picture point and flake imaging point generated, timing is being carried out to a specific fish eye images, first the pixel value of flake imaging point is obtained, again corresponding with flake imaging point for the imparting of this pixel value is corrected into picture point, be corrected into after picture point has all been endowed pixel value when all, then define the complete image after correction, thus complete the correction of fish eye images.
In the present embodiment, get at the fish eye lens parameter list that basis is default and organize θ, r, θ more
dafter, according to accessed many groups θ, r, θ
dand the panorama picture of fisheye lens model formation preset gets correction parameter, the corresponding relation be corrected between picture point and flake imaging point can be set up again according to correction parameter and default conversion formula, carrying out the comparatively timing of concrete fish eye images, what direct use had been set up the corresponding relation be corrected between picture point and flake imaging point can realize the real time correction of fish eye images.The fisheye image correcting method that the present embodiment provides, fish eye lens parameter list, default panorama picture of fisheye lens model formation and default conversion formula is only utilized to calculate, compared to fisheye image correcting method of the prior art, implementation method is very simple, simultaneously owing to using formulae discovery, therefore, it is possible to ensure the precision of correcting fisheye image, thus ensure efficiency and the accuracy rate of correcting fisheye image.
Fig. 3 is the schematic flow sheet of the embodiment two of fisheye image correcting method provided by the present invention, and as shown in Figure 3, above-mentioned steps S103 specifically comprises:
S201, basis organize θ, r and the first default panorama picture of fisheye lens model formation r=ftan (θ) more, obtain the first correction parameter f.
Above-mentioned first panorama picture of fisheye lens model formation r=ftan (θ) uses formula to represent the relation between r and θ, f in formula represents the first correction parameter, for each group θ, r, the f that meeting correspondence one is concrete, the f often organized corresponding to θ, r may not be identical.By carrying out respective handling to the concrete f organized corresponding to θ, r, the first correction parameter f that applies specifically to all θ, r groups can be obtained more.
After respective handling is carried out to different concrete f, a specific first correction parameter f can be obtained, this parameter be substituted into the conversion formula preset, the corresponding relation that can calculate flake imaging point fast and be corrected between picture point.
S202, organize θ, θ according to described more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), obtain the second correction parameter k
0, k
1, k
2, k
3, k
4.
Above-mentioned second panorama picture of fisheye lens model formation θ
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8) use formula to represent θ and θ
dbetween relation, the k in formula
0, k
1, k
2, k
3, k
4represent the second correction parameter, for each group θ, θ
d, can corresponding one group of concrete k
0, k
1, k
2, k
3, k
4, often organize θ, θ
dcorresponding concrete k
0, k
1, k
2, k
3, k
4value may not be identical.By to organizing θ, θ more
dcorresponding concrete k
0, k
1, k
2, k
3, k
4carry out respective handling, one can be obtained and apply specifically to all θ, θ
dsecond correction parameter k of group
0, k
1, k
2, k
3, k
4.
To different concrete k
0, k
1, k
2, k
3, k
4after carrying out respective handling, a specific second correction parameter k can be obtained
0, k
1, k
2, k
3, k
4, this parameter is substituted into the conversion formula preset, the corresponding relation that can calculate flake imaging point fast and be corrected between picture point.
Fig. 4 is the schematic flow sheet of the embodiment three of fisheye image correcting method provided by the present invention, and as shown in Figure 4, above-mentioned steps S201 specifically comprises:
S301, according to the first panorama picture of fisheye lens model formation r=ftan (θ), calculate respectively and often organize initial first correction parameter corresponding to θ, r, obtain multiple initial first correction parameter.
S302, matching is carried out to above-mentioned multiple initial first correction parameter, obtain the first correction parameter f.
After calculating multiple initial first correction parameter specifically, use the mode of matching to obtain specific first correction parameter f, this specific first correction parameter f is applicable to all θ, r groups.Again this specific first correction parameter f is substituted into the conversion formula preset, the corresponding relation that can calculate flake imaging point fast and be corrected between picture point.Use the mode of matching to determine specific first correction parameter, make to use conversion formula to set up the calculating of flake imaging point and correcting imaging point correspondence more simply with efficient.
Fig. 5 is the schematic flow sheet of the embodiment four of fisheye image correcting method provided by the present invention, and as shown in Figure 5, above-mentioned steps S202 specifically comprises:
S401, basis organize θ, θ more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), set up at least one system of equations.
S402, calculate each system of equations respectively, obtain multiple initial second correction parameter.
S403, matching is carried out to above-mentioned multiple initial second correction parameter, obtain the second correction parameter k
0, k
1, k
2, k
3, k
4.
After calculating multiple initial second correction parameter specifically, the mode of matching is used to obtain specific second correction parameter k
0, k
1, k
2, k
3, k
4, this specific second correction parameter k
0, k
1, k
2, k
3, k
4be applicable to all θ, θ
dgroup.Again by this specific second correction parameter k
0, k
1, k
2, k
3, k
4substitute into the conversion formula preset, the corresponding relation that can calculate flake imaging point fast and be corrected between picture point.Use the mode of matching to determine specific second correction parameter, make to use conversion formula to set up the calculating of flake imaging point and correcting imaging point correspondence more simply with efficient.
In another embodiment, above-mentioned default conversion formula is specifically as follows:
θ
d=k
0θ(1+k
1θ
2+k
2θ
4+k
3θ
6+k
4θ
8)
Wherein, (a, b) represents the coordinate being corrected into picture point, and (u, v) represents the coordinate of flake imaging point, and f represents above-mentioned first correction parameter f, k
0, k
1, k
2, k
3, k
4represent above-mentioned second correction parameter k
0, k
1, k
2, k
3, k
4.After getting the coordinate being corrected into picture point, calculate one by one according to above-mentioned conversion formula, the coordinate of the flake imaging point corresponding with it can be calculated.Namely for one determine be corrected into picture point, through above-mentioned calculating, the flake imaging point of its correspondence can be obtained, thus set up the corresponding relation being corrected into picture point and flake imaging point of each pixel.
Fig. 6 is the schematic flow sheet of the embodiment five of fisheye image correcting method provided by the present invention, as shown in Figure 6, also comprises before above-mentioned steps S101:
S501, fish eye images is carried out ellipse fitting, obtain elliptic fisheye image, again this elliptic fisheye image is converted into circle fisheye image, and obtain the central point of circle fisheye image, using the initial point of this central point as fish eye lens coordinate system, according to the initial point determination fish eye lens coordinate system of fish eye lens coordinate system.
The horizontal direction of the unequal or fish eye images of the quantization parameter due to the horizontal and vertical direction in panorama picture of fisheye lens face expands, and causes fish eye images and non-circular, therefore can use ellipse fitting that fish eye images is fitted to elliptic fisheye image.Particularly, can binary conversion treatment be carried out to fish eye images and obtain the outline map of fish eye images, re-use least square method and carry out fitted ellipse, thus obtain elliptic fisheye image and central point thereof.
Further, above-mentioned elliptic fisheye image is reduced corresponding multiple in the horizontal direction, elliptic fisheye image is converted into circle fisheye image, thus obtain the central point of circle fisheye image and circle fisheye image.This central point is the initial point of fish eye lens coordinate system.
S502, according to above-mentioned central point and fish-eye focal length, determine the initial point of fish eye images plane coordinate system, and according to the initial point determination fish eye images plane coordinate system of fish eye images plane coordinate system.
In another embodiment, above-mentioned steps S105 specifically comprises:
According to above-mentioned corresponding relation, adopt bilinear interpolation process, obtain pixel value from flake imaging point, be corrected into picture point described in being given by described pixel value, obtain correcting image.
Particularly, flake imaging point and the corresponding relation being corrected into picture point are represented by the corresponding relation of its coordinate in fish eye images plane coordinate system, the coordinate supposing to be corrected into picture point is (a, b), the coordinate of flake imaging point is (u, v), and supposing that i is the integral part of u, s is the fraction part of u, and j is the integral part of v, t is the fraction part of v, f (a, b) represents the pixel value being corrected into picture point (a, b), then the computing formula of f (a, b) is:
f(a,b)=(1-s)(1-t)f(i,j)+(1-s)tf(i,j+1)+s(1-t)f(i+1,j)+stf(i+1,j+1)
According to above-mentioned formula, the pixel value being corrected into picture point (a, b) can be (i by coordinate, j), (i+1, j), the pixel value bilinear interpolation of four flake imaging points of (i, j+1), (i+1, j+1) obtains.
Fig. 7 is the structural representation of the embodiment one of correcting fisheye image device provided by the present invention, and as shown in Figure 7, this device comprises:
First acquisition module 701, for obtain in fish eye images multiple pixel in fish eye lens coordinate system with the angle theta of central shaft.
Determination module 702, for according to the fish eye lens parameter list preset, determines the distance r corresponding respectively with multiple angle theta and distance theta
d, obtain and organize θ, r, θ more
d, wherein, fish eye lens parameter list comprises: θ, r, θ
dbetween mapping relations, distance r is the distance, the distance theta that are corrected in picture point to fish eye images plane coordinate system initial point of above-mentioned pixel in fish eye images plane coordinate system
dfor the flake imaging point of above-mentioned pixel in fish eye images plane coordinate system is to the distance of initial point in fish eye images plane coordinate system.
Second acquisition module 703, for organizing θ, r, θ according to above-mentioned more
dand the panorama picture of fisheye lens model formation preset obtains correction parameter.
Set up module 704, for according to above-mentioned correction parameter and default conversion formula, set up the corresponding relation being corrected into picture point and flake imaging point of each pixel.
Generation module 705, for according to above-mentioned corresponding relation, obtains the pixel value of flake imaging point, is given by this pixel value and is corrected into picture point, obtain correcting image.
This device is for performing preceding method embodiment, and it realizes principle and technique effect is similar, does not repeat them here.
Fig. 8 is the structural representation of the embodiment two of correcting fisheye image device provided by the present invention, and as shown in Figure 8, the second acquisition module 703 specifically comprises:
First correcting unit 7031, for according to organizing θ, r and the first default panorama picture of fisheye lens model formation r=ftan (θ), obtains the first correction parameter f more.
Second correcting unit 7032, organizes θ, θ for basis more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), obtain the second correction parameter k
0, k
1, k
2, k
3, k
4.
Further, the first correcting unit 7031, specifically for according to the first panorama picture of fisheye lens model formation r=ftan (θ), calculates respectively and often organizes initial first correction parameter corresponding to θ, r, obtain multiple initial first correction parameter; Matching is carried out to multiple initial first correction parameter, obtains the first correction parameter f.
Further, the second correcting unit 7032, organizes θ, θ specifically for basis more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), set up at least one system of equations; Calculate each system of equations respectively, obtain multiple initial second correction parameter; Matching is carried out to multiple initial second correction parameter, obtains the second correction parameter k
0, k
1, k
2, k
3, k
4.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can have been come by the hardware that programmed instruction is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.
Claims (10)
1. a fisheye image correcting method, is characterized in that, comprising:
To obtain in fish eye images multiple pixel in fish eye lens coordinate system with the angle theta of central shaft;
According to the fish eye lens parameter list preset, determine the distance r corresponding respectively with multiple described angle theta and distance theta
d, obtain and organize θ, r, θ more
d, wherein, described fish eye lens parameter list comprises: θ, r, θ
dbetween mapping relations, described distance r is the distance that be corrected in picture point to described fish eye images plane coordinate system initial point of described pixel in fish eye images plane coordinate system, described distance theta
dfor the flake imaging point of described pixel in fish eye images plane coordinate system is to the distance of initial point in described fish eye images plane coordinate system;
Organize θ, r, θ according to described more
dand the panorama picture of fisheye lens model formation preset obtains correction parameter;
According to described correction parameter and default conversion formula, set up the corresponding relation being corrected into picture point and flake imaging point of each described pixel;
According to described corresponding relation, obtain the pixel value of described flake imaging point, be corrected into picture point described in being given by described pixel value, obtain correcting image.
2. method according to claim 1, is characterized in that, describedly organizes θ, r, θ according to described more
dand the panorama picture of fisheye lens model formation preset obtains correction parameter, comprising:
Organize θ, r and default first panorama picture of fisheye lens model formation r=ftan (θ) according to described more, obtain the first correction parameter f;
Organize θ, θ according to described more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), obtain the second correction parameter k
0, k
1, k
2, k
3, k
4.
3. method according to claim 2, is characterized in that, describedly organizes θ, r and the first default panorama picture of fisheye lens model formation r=ftan (θ) according to described more, obtains the first correction parameter f, comprising:
According to the first panorama picture of fisheye lens model formation r=ftan (θ), calculate respectively and often organize initial first correction parameter corresponding to θ, r, obtain multiple initial first correction parameter;
Matching is carried out to described multiple initial first correction parameter, obtains described first correction parameter f.
4. method according to claim 2, is characterized in that, describedly organizes θ, θ according to described more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), obtain the second correction parameter k
0, k
1, k
2, k
3, k
4, comprising:
Organize θ, θ according to described more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), set up at least one system of equations;
Calculate each described system of equations respectively, obtain multiple initial second correction parameter;
Matching is carried out to described multiple initial second correction parameter, obtains described second correction parameter k
0, k
1, k
2, k
3, k
4.
5. the method according to any one of claim 2-4, is characterized in that, in described acquisition fish eye images multiple pixel in fish eye lens coordinate system with the angle theta of central shaft before, also comprise:
Described fish eye images is carried out ellipse fitting, obtain elliptic fisheye image, again described elliptic fisheye image is converted into circle fisheye image, and obtain the central point of circle fisheye image, using the initial point of described central point as described fish eye lens coordinate system, determine described fish eye lens coordinate system according to the initial point of described fish eye lens coordinate system;
According to described central point and fish-eye focal length, determine the initial point of described fish eye images plane coordinate system, and determine described fish eye images plane coordinate system according to the initial point of described fish eye images plane coordinate system.
6. method according to claim 1, is characterized in that, described according to described corresponding relation, obtains the pixel value of described flake imaging point, is corrected into picture point, obtains correcting image, comprising described in being given by described pixel value:
According to described corresponding relation, adopt bilinear interpolation process, obtain pixel value from described flake imaging point, be corrected into picture point described in being given by described pixel value, obtain correcting image.
7. a correcting fisheye image device, is characterized in that, comprising:
First acquisition module, for obtain in fish eye images multiple pixel in fish eye lens coordinate system with the angle theta of central shaft;
Determination module, for according to the fish eye lens parameter list preset, determines the distance r corresponding respectively with multiple described angle theta and distance theta
d, obtain and organize θ, r, θ more
d, wherein, described fish eye lens parameter list comprises: θ, r, θ
dbetween mapping relations, described distance r is the distance, the described distance theta that are corrected in picture point to described fish eye images plane coordinate system initial point of described pixel in fish eye images plane coordinate system
dfor the flake imaging point of described pixel in fish eye images plane coordinate system is to the distance of initial point in described fish eye images plane coordinate system;
Second acquisition module, for organizing θ, r, θ according to described more
dand the panorama picture of fisheye lens model formation preset obtains correction parameter;
Set up module, for according to described correction parameter and default conversion formula, set up the corresponding relation being corrected into picture point and flake imaging point of each described pixel;
Generation module, for according to described corresponding relation, obtains the pixel value of described flake imaging point, is corrected into picture point, obtains correcting image described in being given by described pixel value.
8. device according to claim 7, is characterized in that, described second acquisition module comprises:
First correcting unit, for organizing θ, r and the first default panorama picture of fisheye lens model formation r=ftan (θ) according to described, obtains the first correction parameter f more;
Second correcting unit, for organizing θ, θ according to described more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), obtain the second correction parameter k
0, k
1, k
2, k
3, k
4.
9. device according to claim 8, it is characterized in that, described first correcting unit, specifically for: according to the first panorama picture of fisheye lens model formation r=ftan (θ), calculate respectively and often organize initial first correction parameter corresponding to θ, r, obtain multiple initial first correction parameter; Matching is carried out to described multiple initial first correction parameter, obtains described first correction parameter f.
10. device according to claim 8, is characterized in that, described second correcting unit, specifically for: organize θ, θ according to described more
dand the second panorama picture of fisheye lens model formation θ preset
d=k
0θ (1+k
1θ
2+ k
2θ
4+ k
3θ
6+ k
4θ
8), set up at least one system of equations; Calculate each described system of equations respectively, obtain multiple initial second correction parameter; Matching is carried out to described multiple initial second correction parameter, obtains described second correction parameter k
0, k
1, k
2, k
3, k
4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510817400.6A CN105488764B (en) | 2015-11-23 | 2015-11-23 | Fisheye image correcting method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510817400.6A CN105488764B (en) | 2015-11-23 | 2015-11-23 | Fisheye image correcting method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105488764A true CN105488764A (en) | 2016-04-13 |
CN105488764B CN105488764B (en) | 2018-05-29 |
Family
ID=55675729
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510817400.6A Active CN105488764B (en) | 2015-11-23 | 2015-11-23 | Fisheye image correcting method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105488764B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106097357A (en) * | 2016-06-17 | 2016-11-09 | 深圳市灵动飞扬科技有限公司 | The bearing calibration of auto-panorama photographic head |
CN106780389A (en) * | 2016-12-23 | 2017-05-31 | 浙江宇视科技有限公司 | A kind of fisheye image correcting method and device based on Coordinate Conversion |
CN108932698A (en) * | 2017-11-17 | 2018-12-04 | 北京猎户星空科技有限公司 | Bearing calibration, device, electronic equipment and the storage medium of pattern distortion |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103996173A (en) * | 2014-05-09 | 2014-08-20 | 东北大学 | Fisheye image correction method based on changed long axis ellipse fitting |
CN104574289A (en) * | 2013-10-29 | 2015-04-29 | 深圳市中航比特通讯技术有限公司 | Fish-eye image distortion correction algorithm based on ellipsoidal model |
CN104835159A (en) * | 2015-05-07 | 2015-08-12 | 中国科学院长春光学精密机械与物理研究所 | Digital image correction method for continuous variable-focal-length optical imaging system |
-
2015
- 2015-11-23 CN CN201510817400.6A patent/CN105488764B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104574289A (en) * | 2013-10-29 | 2015-04-29 | 深圳市中航比特通讯技术有限公司 | Fish-eye image distortion correction algorithm based on ellipsoidal model |
CN103996173A (en) * | 2014-05-09 | 2014-08-20 | 东北大学 | Fisheye image correction method based on changed long axis ellipse fitting |
CN104835159A (en) * | 2015-05-07 | 2015-08-12 | 中国科学院长春光学精密机械与物理研究所 | Digital image correction method for continuous variable-focal-length optical imaging system |
Non-Patent Citations (4)
Title |
---|
JUHO KANNALA 等: "A Generic Camera Model and Calibration Method for Conventional,Wide-Angle, and Fish-Eye Lenses", 《IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE》 * |
OPENCV DEV TEAM: "OpenCV 3.0.0-dev documentation- OpenCV API reference-calib3d.camera calibration and 3d reconstruction", 《HTTPS://DOCS.OPENCV.ORG/3.0-BETA/MODULES/CALIB3D/DOC/CAMERA-CALIBRATION_AND_3D_RECONSTRUCTION.HTML》 * |
赵瑞 等: "一种大视角鱼眼图像校正算法的实现", 《河北农业大学学报》 * |
霍薇薇 等: "基于坐标投影的鱼眼图像校正方法研究", 《电子测量技术》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106097357A (en) * | 2016-06-17 | 2016-11-09 | 深圳市灵动飞扬科技有限公司 | The bearing calibration of auto-panorama photographic head |
CN106097357B (en) * | 2016-06-17 | 2019-04-16 | 深圳市灵动飞扬科技有限公司 | The bearing calibration of auto-panorama camera |
CN106780389A (en) * | 2016-12-23 | 2017-05-31 | 浙江宇视科技有限公司 | A kind of fisheye image correcting method and device based on Coordinate Conversion |
CN108932698A (en) * | 2017-11-17 | 2018-12-04 | 北京猎户星空科技有限公司 | Bearing calibration, device, electronic equipment and the storage medium of pattern distortion |
CN108932698B (en) * | 2017-11-17 | 2021-07-23 | 北京猎户星空科技有限公司 | Image distortion correction method, device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN105488764B (en) | 2018-05-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108257183B (en) | Camera lens optical axis calibration method and device | |
CN111127422B (en) | Image labeling method, device, system and host | |
Mueggler et al. | Continuous-time trajectory estimation for event-based vision sensors | |
CN109308686B (en) | Fisheye image processing method, device, equipment and storage medium | |
CN107705252B (en) | Method and system suitable for splicing, unfolding and correcting binocular fisheye image | |
CN106331527A (en) | Image splicing method and device | |
CN105678740B (en) | A kind of camera geometric calibration processing method and processing device | |
CN104994367A (en) | Image correcting method and camera | |
CN106709865B (en) | Depth image synthesis method and device | |
CN102096923A (en) | Fisheye calibration method and device | |
CN101577004B (en) | Rectification method for polar lines, appliance and system thereof | |
CN102842117A (en) | Method for correcting kinematic errors in microscopic vision system | |
CN103473771A (en) | Method for calibrating camera | |
CN104778656A (en) | Fisheye image correction method on basis of spherical perspective projection | |
CN106570907B (en) | Camera calibration method and device | |
CN109544643A (en) | A kind of camera review bearing calibration and device | |
Lin et al. | Cylindrical panoramic image stitching method based on multi-cameras | |
CN105825470A (en) | Fisheye image correction method base on point cloud image | |
CN103247020A (en) | Fisheye image spread method based on radial characteristics | |
CN105488764A (en) | Fisheye image correction method and apparatus | |
CN111507894B (en) | Image stitching processing method and device | |
CN105469386A (en) | Method and device for determining height and pitch angle of stereo camera | |
Pathak et al. | Dense 3D reconstruction from two spherical images via optical flow-based equirectangular epipolar rectification | |
CN104077768A (en) | Method and device for calibrating fish-eye lens radial distortion | |
CN109685800B (en) | Calibration template and method for quickly calibrating external parameters of camera |
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 |