Definitionadvanced
Sampson distance
Also called Sampson error, first-order geometric error.
A first-order approximation of the geometric distance of a point to a variety, the algebraic residual divided by the norm of its gradient.
The Sampson distance is a cheap estimate of the geometric distance of a measurement to the set of measurements that fit a model exactly. It linearizes the constraint at the measured point and returns the distance to the linearized set in closed form: for one scalar constraint, the algebraic residual divided by the norm of its gradient. For two-view matches it approximates the reprojection error of a match without solving for the 3D point or for the corrected points. The page algebraic and geometric error compares the two kinds of cost; this page defines the approximation that lies between them.
Definition
Let a model with parameters define, for a measurement vector , an algebraic residual , with . The measurements that fit the model exactly form the variety . The geometric distance of a measured is the length of the shortest with .
Replace by its first-order Taylor expansion at : , with the Jacobian matrix of at . If has full rank , the shortest with is
found with a Lagrange multiplier for the constraint. The Sampson error is its squared length, and the Sampson distance is its length:
For one scalar constraint () this is .
For the fundamental matrix. A match , is a measurement , and the constraint is . Its gradient with respect to is , so
The same formula holds for the essential matrix in normalized image coordinates.
For a homography. The two DLT equations of a pair give , and is the matrix of their derivatives with respect to ; the general formula applies with (HZ Section 4.2.6).
Properties.
- It is 0 exactly when , that is, when the measurement fits the model.
- It is exact when is affine in , because then the linearization is the constraint itself. An example is the distance of a point to a line.
- Near the variety it differs from the geometric distance by a term of higher order in the distance.
- It does not change when is multiplied by a nonzero constant, so the scale of or does not matter. Unlike the algebraic error, it does not depend on the choice of a Euclidean frame in the images.
- It needs to be invertible. For the fundamental matrix it fails at a match where and , which means that both points are the epipoles.
Examples and non-examples
- A circle. For and the point : , , so the Sampson distance is , against the true distance . For the far point it is against : the approximation is good only near the curve. This is the setting of Sampson's 1982 paper on conic fitting.
- A line. For and the point : and , so the Sampson distance is , which is the exact distance from the point to the line.
- A rectified stereo pair. For a camera that moves along the axis, , and . Then and , so . For and , . This is exact: the best correction moves each point by 1 pixel toward the other, and .
- Non-example: the algebraic error. alone changes with the scale of and with the position of the match in the image.
- Non-example: the symmetric epipolar distance. The sum of the squared distances of to the epipolar line and of to the line is . It has the same numerator but another weight. In the stereo example it gives , four times the Sampson value.
Related definitions
- Reprojection error: the geometric distance that the Sampson distance approximates. For two views, the exact value needs optimal triangulation of the match.
- Algebraic and geometric error: the Sampson distance is an algebraic residual with a weight that makes it a first-order geometric distance.
- RANSAC: the Sampson distance is a common test for inliers of a fundamental or essential matrix, since it is cheap and is in pixels.
- Homography estimation and the fundamental matrix: minimizing the sum of Sampson errors over the model parameters alone, with Gauss-Newton or Levenberg-Marquardt, gives results close to the Gold Standard method at a lower cost.
- Sampson correction: the vector itself, added to the measured points, is a first-order correction of a match onto the variety (HZ Section 12.4).
References
- Paul D. Sampson, Fitting conic sections to very scattered data: an iterative refinement of the Bookstein algorithm, Computer Graphics and Image Processing 18(1), 1982, 97-108, the weighting of the algebraic residual of a conic by its gradient
- Richard Hartley and Andrew Zisserman, Multiple View Geometry in Computer Vision, second edition, Cambridge University Press, 2004, Section 4.2.6, Sampson error (the derivation for a homography and the general form); Section 11.4, Geometric distance (the Sampson approximation for the fundamental matrix); Section 12.4, Sampson approximation (first-order geometric correction)
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 JT9XCG Edit this page History Report an error Markdown