This application claims the benefit of U.S. Provisional Patent Application Ser. No. 62/579,813, filed Oct. 31, 2017 to El Dokor et al., and titled “Calibration for multi-camera and multisensory Systems”, the entire contents thereof being incorporated herein by reference.
Calibration, as an engineering challenge, has been around for a very long time. Many tools that are available in the industry are incapable of autocalibrating themselves. Such tools need to be constantly recalibrated in order for them to function well. As an example, most laser-based range finding tools that are used outdoors on robotics platforms require constant calibration. Such laser-based tools do not function very well in direct sunlight, since they are usually IR-based and require a significant amount of power to overcome the power of the sun's ambient radiance. They also can not function through a reflective surface, such as a car window. They do not perform very well on dark, light absorbing surfaces.
It would therefore be beneficial to present a method and apparatus for overcoming the drawbacks of the prior art that are not only associated with active light source sensors, but also with passive ones, such as stereo and multiview camera systems.
The inventors of the present invention have further recognized that another example of tools lacking autocalibration is presented when employing stereo rigs, i.e. two or more cameras placed at known locations, at least relative to each other, with the expectation that a measurement or distance analysis is to be performed using such a rig. The problem is that stereo calibration has not been perfected. Calibration algorithms for stereo rigs aim at capturing the intrinsic and extrinsic parameters that are associated with a given stereo rig. Intrinsic parameters are parameters that are associated with the individual cameras themselves (focal length, pixel pitch, camera resolution, etc.) The extrinsic parameters are ones that define the distance and orientation relationships (degrees of freedom) between the various camera nodes in a stereo rig. These parameters include rotation parameters, like pitch, yaw, and roll. They also include translation parameters, like distance in x, y and z, of the nodes relative to each other.
Calibration aims at estimating such parameters based on a series of observations. Most calibration approaches, such as those known in in the art, require known three-dimensional information from the scene. Such approaches often require a specialized calibration pattern or target.
The inventors of the present invention have further noted that if such information is absent from the scene, calibration is usually performed up to an unknown scale.
There is a significant amount of work in Industry and Academia pointing in the direction of solid autocalibration reconstruction. The problem, in many of these cases is that the authors themselves claim very high accuracy, but their work comes to within a few fractions of a degree to the ground truth. Such results are good, but not adequate for a highly accurate measuring device, where an error in under a degree could mean the difference in various inches of measurement for an object during a dimensioning (an object measurement) process.
Therefore, in accordance with one or more embodiments of the invention, a series of new techniques for in-line and offline calibration are presented to address the many shortcomings of current approaches. Multiple variants of calibration targets are proposed as well as techniques to take advantage of constancy relationships for objects in the field, and, in doing so, reduce the computational complexity as well as improve the accuracy rate. Most existing techniques suffer from not converging accurately enough on ground truth results. We address this problem as well as some of the other shortcomings associated with stereo and multi-view configurations. These new approaches are not only scalable to multiple configurations of cameras but also across cameras with different focal lengths. They also allow for mass production of calibrated, highly accurate camera systems that function very well in the operating environment. The invention also extends the inventive approach to address calibration of configurations comprised of cameras in conjunction with LIDAR and radar.
Still other objects and advantages of the invention will in part be obvious and will in part be apparent from the specifications and drawings.
The invention accordingly comprises the several steps and the relation of one or more of such steps with respect to each of the others, and the apparatus embodying features of construction, combinations of elements and arrangement of parts that are adapted to affect such steps, all as exemplified in the following detailed disclosure, and the scope of the invention will be indicated in the claims.
Auto Calibration within the Context of an Observed Constancy
We revisit the problem of auto calibration with an advantage: if a given distance, defined as a dimension, is constant, then it can be used to improve calibration. Incorporating such information into a new cost function becomes very critical to address the issue of better and more accurate calibration. In order to define such a cost function, a series of observations have to first be made:
Given two points in three-dimensional space, the distance between these two points will remain constant across multiple views taken by a camera rig. If one looks at a population of data from a calibrated stereo rig, then that population will be “well behaved” in so far as adhering to the overall disparity graph of the stereo rig. This means that the relationship between disparity and depth should follow and adhere to the overall theoretical curve. Given a hypothesis of a theoretical curve, if the data associated with real world observations does not match that curve, then the curve is fundamentally incorrect. Outliers between the theoretical curve and the data represent a good measurement of how far off the observed data is from the curve. A cost function can be defined that encapsulates information about outliers relative to the theoretical curve.
Calibration Targets
The first step in any calibration algorithm is to acquire images of the calibration target from one or more image acquisition angles. Two options are presented for a calibration target: The first consists of an object with a known size, preferably containing one or more patterns with detectable features; and the second consists of an object with unknown, albeit fixed size. Both options may produce reliable camera calibration.
Calibration with a Known Pattern Size
An example of a calibration target 110 with a known size is shown in
Alternative flower type calibration targets are shown in
Calibration with an Unknown Pattern Size
Additionally, an object of unknown size may be used as the calibration target. This target again must contain detectable features, but these features need not be a part of a repeating pattern. The only constraint is that the features remain in a fixed location on calibration target in all image captures. For example, as shown in
Cost Functions
A general framework for estimating calibration parameters is depicted in
If, on the other hand, the inquiry at step 525 is answered in the affirmative, and it is therefore determined that all cost terms have been considered, processing instead passes to step 545 all cost terms are preferably combined. Of course, any desirable or relevant subset of all cost terms may be employed at this point. An inquiry is then initiated at step 550 as to whether the cost has been minimized. If this inquiry at step 550 is answered in the affirmative, and it is determined that cost has been minimized, then processing ends at step 560.
If, on the other hand, the inquiry at step 550 is answered in the negative, and it is determined that the cost has not been minimized, processing passes to step 555 where a second inquiry is initiated to determine whether one or more particular exit criterium has been reached. Once again, if this inquiry is answered in the affirmative, and it is determined that an exit criterium has been met, processing again ends at step 560.
If, on the other hand, the inquiry at step 555 is answered in the negative, and it is therefore determined that an exit criterium has not been reached, processing then passes to step 565 where one or more calibration parameters is adjusted. The camera parameters are adjusted using an optimization algorithm until the cost has been minimized or an exit criterion like maximum number of iterations has been reached.
After adjustment, processing then returns to step 525 for additional computation of individual cost terms.
Mathematically, the general form for online and offline calibration recovers the calibration parameters which minimize the cost, ε, over a set of N datasets:
whereby, each dataset contains observations of matched features in the scene, and the cost of each dataset is determined by a weighted (α) combination of K terms which target individual calibration parameters:
Dimensional Consistency—This type of cost function utilizes the fact that the dimensions of a physical or virtual object do not vary with viewpoint or distance from the camera to estimate the camera parameters. As shown in
Referring next to
Processing then passes to step 625 where one or more 2D features is converted into 3D features. A Euclidian distance is then computed between the 3D features in step 630, followed by step 635, where a variance across all observations of the same dimension is computed. It is then queried at step 640 whether the variance computed at step 635 has been minimized. If this inquiry is answered in the affirmative, and it is therefore determined that the variance has been minimized, processing ends at step 655. If on the other hand it is determined at step 640 that the variance has not been minimized, then processing passes to step 645 where it is further queried whether an exit criterium has been reached. If the query at step 645 is answered in the affirmative, and it is therefore determined that an exit criterium has been reached, processing ends at step 655. If, on the other hand, it is determined at step 645 that an exit criterium has not yet been reached, processing passes to step 650 where the calibration parameters are adjusted. Calibration then returns to step 625 for further processing.
Mathematically, this approach can be described in the following lines:
Let mL,i,j=[xL,i,j yL,i,j 1]T and mR,i,j=[xR,i,j yR,i,j 1]T represent the image coordinates of matched feature j in left (L) and right (R) frames at time i. The 3D coordinates of the feature Mi,j=[Xi,j Yi,j Zi,j 1]T are computed from the singular value decomposition of:
where KR and KL describe the intrinsic camera parameters (focal length and principle point) and R and t describe the extrinsic parameters (rotation and translation). Given J tracked features, there exists Q dimensions between every feature pair:
where the dimension between any two features (j and j+l) is given as the Euclidean distance between the 3D coordinates:
Li,j,j+l=∥Mi,j−Mi,j+l∥ Equation 5
When the same features are tracked over all I frames, the dimension (distance between features) should remain constant. Accordingly, this cost term recovers the extrinsic parameters which minimize the variance, σ2, across all dimensions:
where the dimension variance between features j and j+l is given as a function of the mean μj,j+l:
This term specifically recovers the yaw element of the rotation matrix (vergence angle), but cannot recover pitch, roll, or translation very accurately. In such a case, it is pertinent to insure tight tolerances for pitch, roll or translation during a manufacturing process.
Reprojection Error—This approach is one of the most widely used techniques in industry and academia for camera calibration and can be used for both single and multi-view image capture setups. The cost function in this case is based on the difference between the 2D locations of the detected calibration features and reprojection of the same features from 3D to 2D using the current camera parameter. 2D to 3D conversion (and vice versa) can leverage stereo triangulation and/or projection of known feature coordinates in 3D. The main drawback of reprojection error is that it is fundamentally front-heavy in the analysis. The data that is associated with a given target upfront have more pixel resolution and more associated details than the data in the back, since pixel resolution is higher in the front. This implies that the reprojection error will be schewed to the front of the data. However, most of the error comes from the same, fixed size patterns that are moved to the back of the field of view. However, the reprojection error in the back is significantly lower than the front, contributing to a lower per-pixel value. One work-around would be to normalize via individual camera pixel resolution, so that the reprojection error is no longer in pixels, but rather in real-world coordinate systems, such as inches or centimeters.
Referring next to
Processing then passes to step 725 where one or more 2D features are converted into 3D features. 3D features are then reprojected to 2D features in step 730, followed by step 735, where a reprojection error is computed. It is then queried at step 740 whether the error computed at step 735 has been minimized. If this inquiry is answered in the affirmative, and it is therefore determined that the variance has been minimized, processing ends at step 755. If on the other hand it is determined at step 740 that the variance has not been minimized, then processing passes to step 745 where it is further queried whether an exit criterium has been reached. If the query at step 745 is answered in the affirmative, and it is therefore determined that an exit criterium has been reached, processing ends at step 755. If on the other hand it is determined at step 745 that an exit criterium has not yet been reached, processing passes to step 750 where the calibration parameters are adjusted. Processing then returns to step 725 for further processing.
Mathematically, this approach can be described as:
Given the matched 2D feature, mL,i,j and mR,i,j, the triangulated 3D coordinates, Mi,j, are reprojected onto the image plane using (pL,i,j and pR,i,j) which expands to:
Where the f describes the focal length and c the optical center. The reprojection error cost term recovers pitch and roll by minimizing:
Disparity Error—The disparity error approach depicted in
Referring next to
Processing then passes to step 825 where one or more 2D features are converted into 3D features. 3D features are then reprojected to 2D features in step 830, followed by step 835, where a disparity of the reprojected points is computed. At step 838 a difference between the observed and reprojected disparities is determined. It is then queried at step 840 whether the difference determined at step 838 has been minimized. If this inquiry is answered in the affirmative, and it is therefore determined that the difference has been minimized, processing ends at step 855. If on the other hand it is determined at step 840 that the difference has not been minimized, then processing passes to step 845 where it is further queried whether an exit criterium has been reached. If the query at step 845 is answered in the affirmative, and it is therefore determined that an exit criterium has been reached, processing ends at step 855. If on the other hand it is determined at step 845 that an exit criterium has not yet been reached, processing passes to step 850 where the calibration parameters are adjusted. Processing then returns to step 825 for further processing.
Mathematically, this approach can be described as follows:
The disparity error is an extension of the reprojection error, which compares the observed disparity of a matched feature (mL,i,j and mR,i,j):
dobs,i,j=mL,i,j−mR,i,j Equation 11
to an idealized disparity computed from the reprojection of the 3D point, Mi,j, onto the image plane (pL,i,j and pR,i,j):
dideal,i,j=[KL|0]Mi,j−KR[R|t]Mi,j=pL,i,j−pR,i,j Equation 12
where the cost term recovers the pitch and roll, minimizing to:
Epipolar Error—The epipolar error is another multi-view based approach that defines cost as the distance between the 2D location of a matched calibration feature and the corresponding epipolar line determined from the current parameter estimate. The iterative process then adjusts the parameters to minimize this difference. The details of the approach are described in
Referring next to
Processing then passes to step 925 a fundamental matrix is preferably extracted from the calibration parameters. Epipolar lines corresponding to matched 2D features are then computed in step 930, followed by step 935, where a distance between each feature and line is computed. It is then queried at step 940 whether the distance computed at step 935 has been minimized. If this inquiry is answered in the affirmative, and it is therefore determined that the distance has been minimized, processing ends at step 955. If on the other hand it is determined at step 940 that the distance has not been minimized, then processing passes to step 945 where it is further queried whether an exit criterium has been reached. If the query at step 945 is answered in the affirmative, and it is therefore determined that an exit criterium has been reached, processing ends at step 955. If on the other hand it is determined at step 945 that an exit criterium has not yet been reached, processing passes to step 950 where the calibration parameters are adjusted. Processing then returns to step 925 for further processing.
Mathematically, the 2D coordinates of a matched feature in left and right images, mL,i,j=[xL,i,j yL,i,j 1]T and mR,i,j=[xR,i,j yR,i,j 1]T, are related by the fundamental matrix, F:
mR,i,jTFmL,i,j=0 Equation 14
which can be expanded into the epipolar line equation at each i,j [16]:
(F11xL,i,j+F12yL,i,j+F13)xR,i,j+(F21xL,i,j+F22yL,i,j+F23)yR,i,j+(F31xL,i,j+F32yL,i,j+F33)=0 Equation 16
and represented in homogeneous coordinates as lR,i,j=[ai,j bi,j ci,j]T.
The distance between an observed point and the corresponding line is then given:
Where the epipolar error cost function minimizes (for all observations of all features):
Sampson Error—This approach uses the Sampson distance which is a first order approximation of the reprojection error (algebraic error) as the cost term. Sampson distance is based on the fundamental matrix extracted from the current calibration parameters and the 2D locations of a matched feature across multiple views. As shown in
Referring next to
Processing then passes to step 1025 where a fundamental matrix is preferably extracted from the calibration parameters. Sampson error for the observed features is then calculated at step 1035. It is then queried at step 1040 whether the error computed at step 1035 has been minimized. If this inquiry is answered in the affirmative, and it is therefore determined that the variance has been minimized, processing ends at step 1055. If on the other hand it is determined at step 1040 that the variance has not been minimized, then processing passes to step 1045 where it is further queried whether an exit criterium has been reached. If the query at step 1045 is answered in the affirmative, and it is therefore determined that an exit criterium has been reached, processing ends at step 1055. If on the other hand it is determined at step 1045 that an exit criterium has not yet been reached, processing passes to step 1050 where the calibration parameters are adjusted. Processing then returns to step 1025 for further processing.
Mathematically, the Sampson distance is defined as:
where mL,i,j and mR,i,j represent the observed image coordinates of a matched feature and F is the fundamental matrix. The Sampson error cost function minimizes (for all observations, i, of all features, j):
Fundamental Error—In this approach described in, the matched 2D locations of the features are used to estimate the fundamental matrix which can then be used to compute the essential matrix. When decomposed, the essential matrix gives the rotation and translation parameters. These estimated parameters are then compared to the current parameter set and the iterative procedure adjusts the parameters until the difference between the decomposed rotation and translation parameters and the current set of parameters is minimized.
Referring next to
Processing then passes to step 1125 where a fundamental matrix is computed from matched 2d features. An essential matrix is then calculated from the fundamental matrix in step 1130, followed by step 1135, where the essential matrix is preferably decomposed into rotation and translation parameters. At step 1138 a difference between the newly-calculated parameters and the initial parameters is determined. It is then queried at step 1140 whether the difference determined at step 1138 has been minimized. If this inquiry is answered in the affirmative, and it is therefore determined that the difference has been minimized, processing ends at step 1155. If on the other hand it is determined at step 1140 that the difference has not been minimized, then processing passes to step 1145 where it is further queried whether an exit criterium has been reached. If the query at step 1145 is answered in the affirmative, and it is therefore determined that an exit criterium has been reached, processing ends at step 1155. If on the other hand it is determined at step 1145 that an exit criterium has not yet been reached, processing passes to step 1150 where the calibration parameters are adjusted. Processing then returns to step 1125 for further processing.
Mathematically, this approach can be described as follows:
Specifically, the fundamental matrix, F, can be recovered from eight or more point correspondences, where F is related to the essential matrix E by the intrinsic camera matrices KL and KR:
F=KR−TEKL−1 Equation 21
The essential matrix E is defined up to scale w by the skew-symmetric translation matrix, [T]x and the rotation matrix R:
E=Rw[T]x Equation 22
Where the skew-symmetric matrix is defined from the stereo baseline, t=[tx ty tz]T, as:
If the rotation matrix is known, then translation can be extracted from the essential matrix:
R−1E=w[TR]x Equation 24
Allowing the cost to be defines based on the difference in the translation parameters:
Combined Measurement and Reprojection Error-based Cost function for Calibration using Checkerboard Patterns—This approach described in, uses a combination of the reprojection error described in Section 4.3 and a measurement error term that is based on the differences in known physical distances between calibration features on a calibration target and 3D distances between the same features obtained as Euclidean distances between triangulated points using the current camera parameter estimate.
Referring next to
Processing then passes to step 1225 where one or more 2D features are converted into 3D features. A Euclidian distance is then computed between the 3D features in step 1230, followed by step 1232, where a difference between the 3D measurements and a ground truth is computed. At step 1235 a dimensioning error is scaled to pixels using resolution. Processing then preferably passes to step 1237 where a reprojection error is computed, and then to step 1238 where the dimensioning and reprojection errors are aggregated. It is then queried at step 1240 whether the error aggregated at step 1238 has been minimized. If this inquiry is answered in the affirmative, and it is therefore determined that the error has been minimized, processing ends at step 1255. If on the other hand it is determined at step 1240 that the error has not been minimized, then processing passes to step 1245 where it is further queried whether an exit criterium has been reached. If the query at step 1245 is answered in the affirmative, and it is therefore determined that an exit criterium has been reached, processing ends at step 1255. If on the other hand it is determined at step 1245 that an exit criterium has not yet been reached, processing passes to step 1250 where the calibration parameters are adjusted. Processing then returns to step 1225 for further processing.
Mathematically, this approach can be described as follows:
If the J features detected are detected as corners on several images taken of a checkerboard calibration pattern consisting of R row and C column corners, then the total number of features is given as:
J=RC Equation 26
Additionally, there exists U unique edges formed between every adjacent corner pair, where
U=(R−1)C+(C−1)R=2RC−(R+C)=2J−(R+C) Equation 27
If a unique edge u in image i is defined by its reconstructed 3D endpoints Mi,u
Di,u=∥Mi,u
The measurement cost term is then given by the average squared error between the measurements of all unique edges and the true edge length D which are expressed in units of mm:
If, mL,i,j and mR,i,j represent the jth matched 2D corner for the ith image for the left and right views, respectively, and Mi,j represents the triangulated 3D co-ordinates that are reprojected onto the image plane as pL,i,j and pR,i,j by using Equation 9, the reprojection cost term is given as:
The two cost terms are combined by dividing the measurement term by the pixel pitch ppixel (expressed as mm/pixels):
Calibrating the Camera Response Function
The presented calibration targets can also be used in the calibration of the camera response function. The camera response function, ƒ, encapsulates the nonlinear relationship between sensor irradiance, E, and the measured intensity, Z, of a photosensitive element (pixel) over an exposure time, t:
Zij=ƒ(Eitj) Equation 32
where i represents a spatial pixel index and j represents an image exposure index. Assuming that the function is monotonic, the camera response can be used to convert intensity to irradiance by recovering the inverse of the response, f-1 (Grossberg & Nayar, 2003):
ƒ−1(Zij)=Eitj Equation 33
Taking the natural logarithm of both sides, the simplified notation, g, can be used to represent the log inverse function:
g(Zij)ln(ƒ−1(Zij))=ln(Ei)+ln(tj) Equation 34
Letting Zmin and Zmax define the minimum and maximum pixel intensities of N pixels and P images, g can be solved by minimizing the following quadratic objective function:
Where the second term imposes a smoothness constraint on the second derivative:
g″(z)=g(z−1)+2g(z)−g(z+1) Equation 36
With respect to the scalar coefficient, λ, and the weighting function, w:
Once the inverse camera response function is known, map of the scene radiance can be obtained from P images by weighting exposures, which produce intensities closer to the middle of the response function:
Multithreading—The iterative nature of the camera calibration process lends several opportunities for parallelization to speed up operations. As a first step, extraction of calibration features for the entire image capture set can be done in a highly parallelized manner by spawning multiple threads on specialized GPU hardware. Additionally, the cost aggregation over multiple image sets and the triangulation and reprojection operations to go from 2D to 3D coordinates and back to 2D coordinates can also be performed parallelly across multiple threads.
It will thus be seen that the objects set forth above, among those made apparent from the preceding descriptions, are efficiently attained and, because certain changes may be made in carrying out the above method and in the construction(s) set forth without departing from the spirit and scope of the invention, it is intended that all matter contained in the above description and shown in the accompanying drawings shall be interpreted as illustrative and not in a limiting sense.
It is also to be understood that this description is intended to coverall of the generic and specific features of the invention herein described and all statements of the scope of the invention which, as a matter of language, might be said to fall there between.
Number | Name | Date | Kind |
---|---|---|---|
20060274302 | Shylanski | Dec 2006 | A1 |
20070183669 | Owechko | Aug 2007 | A1 |
20100098293 | Chandraker | Apr 2010 | A1 |
20110063403 | Zhang | Mar 2011 | A1 |
20120194652 | Myokan | Aug 2012 | A1 |
20140300736 | Reitinger | Oct 2014 | A1 |
20160189358 | Boufarguine | Jun 2016 | A1 |
20180007345 | Bougnoux | Jan 2018 | A1 |
20180165875 | Yu | Jun 2018 | A1 |
20180249142 | Hicks | Aug 2018 | A1 |
20180330521 | Samples | Nov 2018 | A1 |
20210279845 | Feng | Sep 2021 | A1 |
20210327092 | Jiang | Oct 2021 | A1 |
Number | Date | Country |
---|---|---|
2012323096 | May 2014 | AU |
2779091 | Sep 2014 | EP |
WO-2013182873 | Dec 2013 | WO |
WO-2015185968 | Dec 2015 | WO |
WO-2016113429 | Jul 2016 | WO |
WO-2019202042 | Oct 2019 | WO |
WO-2021150369 | Jul 2021 | WO |
Number | Date | Country | |
---|---|---|---|
62579813 | Oct 2017 | US |