Definitionadvanced
Photometric error
Also called photometric residual.
The difference in intensity between a pixel and its warp into another image under an estimated pose and depth, the cost of direct methods.
Definition
Setting. Two grayscale images (the host or reference) and (the target) come from a calibrated pinhole camera with intrinsics . The relative pose from camera to camera is , so a point in the frame of camera is in the frame of camera . A pixel of has a depth , or an inverse depth .
Warp. The warp of into is
Photometric residual. Under the brightness constancy assumption (a scene point has the same intensity in both images), the photometric residual of is
The warped position is not an integer pixel in general, so is evaluated by bilinear interpolation or a higher order interpolation. With an affine brightness model, as in direct sparse odometry, the residual is
where are the exposure times (1 if unknown) and are a gain and an offset per image.
Photometric error. The photometric error of a set of pixels (a patch, a pattern of pixels around a point, or all pixels with enough gradient) is
with a loss (the square , or a robust function such as the Huber function) and weights . With and this is the sum of squared differences (SSD) between the patch of and the warped patch of . The photometric error is the cost that direct image alignment minimizes over the pose, and in some methods also over the depths and the brightness terms.
Examples and non-examples
One residual by hand. Let , , and let the pixel of have depth , so . Then . With and , the point in camera is , so . If and , bilinear interpolation gives . If , the residual is , and the squared error of this pixel is .
Brightness change. Let for every pixel, as when the gain doubles. The plain residual is , which is not zero even at the true pose and depth. With , , and , the affine residual is for every pixel.
A patch. For a patch with host values and warped target values , the residuals are and the SSD is . With the Huber function of threshold , for and otherwise, the error is .
Non-examples.
- The reprojection error of a matched feature. It is a distance in pixels between two positions, and it needs a match found before; the photometric error compares intensities and needs no match.
- The difference at the same pixel, with no warp. This is a frame difference, used for change detection; it is the photometric residual only for zero motion.
- The zero-mean normalized cross-correlation of two patches. It is a similarity score, not a residual of one pixel, and it is invariant to gain and offset by construction. It is related (see normalized cross-correlation), but it is not the error that Gauss-Newton direct methods minimize.
- The error of a census transform match. It compares bit strings of local orderings, not intensities.
Related definitions
- Brightness constancy. The assumption behind the plain residual. Its first order form, , is the constraint of optical flow and of the Lucas-Kanade method.
- Direct image alignment. The minimization of the photometric error over the warp parameters; see direct image alignment.
- Gradient weights. Direct sparse odometry weights each residual by , which lowers the weight of pixels with a very large gradient, where small errors of the warp give large residuals.
- Photometric calibration. The response function of the camera and the vignetting of the lens change the intensities before the residual is formed. A calibrated method removes them first, so that the affine model holds better.
- Uses. Direct sparse odometry minimizes the photometric error of 8-pixel patterns over a window of keyframes; semi-direct visual odometry uses it only to track the camera and then switches to the reprojection error.
References
- Jakob Engel, Vladlen Koltun and Daniel Cremers, Direct sparse odometry, IEEE Transactions on Pattern Analysis and Machine Intelligence 40(3), 2018, 611-625, Section 2 (the photometric camera model and the photometric error of a point over a residual pattern, with affine brightness terms, exposure times, gradient weights and the Huber norm)
- Michal Irani and P. Anandan, About direct methods, Vision Algorithms: Theory and Practice, Lecture Notes in Computer Science 1883, Springer, 2000, 267-277, the case for estimating motion and structure directly from image intensities
- Simon Baker and Iain Matthews, Lucas-Kanade 20 years on: a unifying framework, International Journal of Computer Vision 56(3), 2004, 221-255, the sum of squared differences between a template and a warped image as the cost of image alignment
- Richard Szeliski, Computer Vision: Algorithms and Applications, second edition, Springer, 2022, Chapter 9, Motion estimation (error metrics for direct alignment, bias and gain, robust error metrics)
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 | W0 stub |
|
Tag BZD8NJ Edit this page History Report an error Markdown