Definitionintro
Reprojection error
Also called reprojection residual.
The image distance between a measured point and the projection of its estimated 3D point by the estimated camera, the usual cost in geometric vision.
The reprojection error of an image point is the distance in the image between where the point was measured and where the estimated camera projects the estimated 3D point. Summed in squares over all observations, it is the cost that bundle adjustment, optimal triangulation and the refinement step of most pose and homography methods minimize. Under independent isotropic Gaussian noise on the image points it is, up to a constant factor and offset, the negative log-likelihood, so its minimizer is the maximum likelihood estimate. The page algebraic and geometric error compares it with the residuals of linear methods, and the Sampson distance is its first-order approximation when the 3D point is eliminated.
Definition
Let be the estimated camera matrix of view , let be the estimated 3D point in homogeneous form, and let be the measured image of point in view . Write for the map from homogeneous to pixel coordinates. The reprojection residual and the reprojection error of this observation are
The total reprojection error over the set of observed pairs is
The root mean square (RMS) reprojection error is , in pixels. Some programs divide by , the number of scalar residuals, which gives a value smaller by the factor ; say which one you report.
If the camera model has lens distortion, includes it (for example the Brown-Conrady model). If the calibration is known, the error can also be measured in normalized image coordinates, and then it is the pixel error divided by the focal length, for square pixels.
Two views of a plane. For a homography the same idea gives the cost , minimized over and corrected points (HZ Section 4.2). The corrected points play the part of the 3D points.
Maximum likelihood. Suppose each measured point is the true projection plus independent Gaussian noise with covariance . The likelihood of the data is , and its negative logarithm is plus a constant. So the cameras and points that minimize are the maximum likelihood estimate. If the noise of each point has its own covariance , the right cost is the sum of .
Residual at the optimum. With scalar measurements and free parameters, the minimum of is, to first order in the noise, times a chi-square variable with degrees of freedom, with mean . This gives a check of the noise level and of the model.
Examples and non-examples
- One observation. Let , and . Then and . If the point was measured at , the residual is , the reprojection error is pixels and the squared error is .
- RMS over a set. Three observations with errors , and pixels give and an RMS error of pixels.
- Non-example: the algebraic residual. with in homogeneous form is 0 exactly when the reprojection error is 0, but otherwise it is the reprojection error times the depth factor of (up to the scale of and ). It is not a distance in pixels.
- Non-example: error in 3D. The distance in space between and the ray through is a different cost. It grows with depth for the same image error, so it gives far points too much weight.
- Non-example: a point behind the camera. , so a point behind the camera can have a reprojection error of 0. The error does not check cheirality; a method that minimizes it must check the sign of the depth on its own.
Related definitions
- Algebraic and geometric error: the reprojection error is the main geometric error; the residuals of linear methods are algebraic.
- Sampson distance: a first-order estimate of the reprojection error of a match without solving for the 3D point or the corrected points.
- Bundle adjustment: minimizes the total reprojection error over all cameras and points, often with a robust loss such as the Huber loss in place of the square.
- Optimal triangulation minimizes it over one 3D point with two known cameras; perspective-n-point refinement minimizes it over one camera pose with known 3D points.
- Homography estimation: the Gold Standard method minimizes the two-view form above.
References
- Richard Hartley and Andrew Zisserman, Multiple View Geometry in Computer Vision, second edition, Cambridge University Press, 2004, Section 4.2, Different cost functions (the reprojection error in both images and its geometric interpretation) and Section 4.3, Statistical cost functions and maximum likelihood estimation
- Bill Triggs, Philip McLauchlan, Richard Hartley and Andrew Fitzgibbon, Bundle adjustment - a modern synthesis, Vision Algorithms: Theory and Practice, LNCS 1883, Springer, 2000, 298-372, the sum of squared image residuals as the cost of bundle adjustment, its statistical meaning and its robust forms
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag SHPECC Edit this page History Report an error Markdown