Camera Models
Below are all supported camera intrinsics models in MetriCal. If there is a model that you use that is not listed here, just contact us! We're always looking to expand our support.
Common Variables and Definitions
Variables | Description |
---|---|
, | Pixel coordinates in the image plane, with origin at the principal point |
, , | Feature coordinates in the world, in 3D Euclidean Space |
, , | Corrected camera ray, in homogeneous coordinates centered on the camera origin |
, , | Distorted camera ray, in homogeneous coordinates centered on the camera origin |
Modeling (3D → 2D) refers to projecting a 3D point in the world to a 2D point in the image, given the intrinsics provided. In other words, it models the effect of distortion on a 3D point. This is also known as "forward projection".
Correcting (2D → 3D) refers to the process of finding the camera ray that is created when intrinsics are applied to a 2D point in the image. When "undistorting" a pixel, this can be thought of as finding the corrected ray's point of intersection with the image plane. In other words, it corrects for the effect of distortion. This is also known as "inverse projection".
Unified refers to a model that can be used to both model and correct for distortion.
No Distortion
MetriCal keyword: no_distortion
This model is a classic pinhole projection with no distortion or affine effects. This model is most applicable when you're already correcting your images with a rectification process, or when you're using a camera with a very low distortion profile.
Parameter | Description |
---|---|
focal length (px) | |
principal point in x (px) | |
principal point in y (px) |
De facto, nearly any camera that is already corrected for distortion uses this model. All models on this page are either pinhole models by design, or degrade to a pinhole model when no distortion is present.
OpenCV RadTan
OpenCV.org. Camera Calibration and 3D Reconstruction documentation. OpenCV 4.10-dev. https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#ga7dfb72c9cf9780a347fbe3d1c47e5d5a
MetriCal keyword: opencv_radtan
Type: Modeling
This is based on OpenCV's default distortion model, which is a modified Brown-Conrady model. If you've ever used OpenCV, you've most certainly used this.
Parameter | Description |
---|---|
focal length (px) | |
principal point in x (px) | |
principal point in y (px) | |
first radial distortion term | |
second radial distortion term | |
third radial distortion term | |
first tangential distortion term | |
second tangential distortion term |
Common Use Cases
OpenCV's adoption of this model has made it the de facto starting point for most calibration tasks. However, this does not mean it's multi-purpose. OpenCV RadTan is best suited for cameras with a field of view of 90° or less.
A good number of sensor packages use this model, including:
Model | Cameras With Model |
---|---|
Intel RealSense D435 | All cameras |
Intel RealSense D435i | All cameras |
Intel RealSense D455 | All cameras |
Modeling
Correcting
Correcting for OpenCV RadTan is a non-linear process. The most common method is to run a non-linear optimization to find the corrected point. This is the method used in MetriCal.
OpenCV Fisheye
OpenCV.org. Fisheye camera model documentation. OpenCV 4.10-dev. https://docs.opencv.org/3.4/db/d58/group__calib3d__fisheye.html
MetriCal keyword: opencv_fisheye
Type: Modeling
This model is based on OpenCV's Fisheye lens model, which is a modified Kannala-Brandt model. It has no tangential distortion terms, but is robust to wide-angle lens distortion.
Parameter | Description |
---|---|
focal length (px) | |
principal point in x (px) | |
principal point in y (px) | |
first radial distortion term | |
second radial distortion term | |
third radial distortion term | |
fourth radial distortion term |
Common Use Cases
Any camera with a fisheye lens below 140° diagonal field of view will probably benefit from this model.
Modeling
Correcting
Correcting for OpenCV Fisheye is a non-linear process. The most common method is to run a non-linear optimization to find the corrected point. This is the method used in MetriCal.
OpenCV Rational
OpenCV.org. Camera Calibration and 3D Reconstruction documentation. OpenCV 4.10-dev. https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#ga7dfb72c9cf9780a347fbe3d1c47e5d5a
MetriCal keyword: opencv_rational
Type: Modeling
OpenCV Rational is the full distortion model used by OpenCV. It is an extension of the RadTan model, in which the radial distortion is modeled as a rational function.
Parameter | Description |
---|---|
focal length (px) | |
principal point in x (px) | |
principal point in y (px) | |
first radial distortion term | |
second radial distortion term | |
third radial distortion term | |
first tangential distortion term | |
second tangential distortion term | |
fourth radial distortion term | |
fifth radial distortion term | |
sixth radial distortion term |
Common Use Cases
This model is mostly equivalent to OpenCV RadTan. Given the number of parameters, this model can overfit on the available data, making it tricky to generalize. However, if you know your camera benefits from this specification, it does offer additional flexibility.
As this is a modified version of OpenCV RadTan, we recommend its use for lenses with a field of view of 90° or less.
Modeling
Correcting
Correcting for OpenCV Rational is a non-linear process. The most common method is to run a non-linear optimization to find the corrected point. This is the method used in MetriCal.
Pinhole with (Inverse) Brown-Conrady
A. E. Conrady, Decentred Lens-Systems, Monthly Notices of the Royal Astronomical Society, Volume 79, Issue 5, March 1919, Pages 384–390, https://doi.org/10.1093/mnras/79.5.384
MetriCal keyword: pinhole_with_brown_conrady
Type: Correcting
This model is the first of our inverse models. These models correct for distortion terms in the image space, rather than modeling the effects of distortion in the world space. If you're just looking to correct for distortion, this could be the model for you!
Notice that the model parameters are identical to those found in OpenCV RadTan. This is because both models are based off of the Brown-Conrady approach to camera modeling. Don't mix up one for the other!
Parameter | Description |
---|---|
focal length (px) | |
principal point in x (px) | |
principal point in y (px) | |
first radial distortion term | |
second radial distortion term | |
third radial distortion term | |
first tangential distortion term | |
second tangential distortion term |
Common Use Cases
If you're just correcting for distortion, rather than modeling it, this model is a good choice.
Modeling
Modeling distortion for Inverse Brown-Conrady is a non-linear process. The most common method is to run a non-linear optimization to find the distorted point. This is the method used in MetriCal.
Correcting
Pinhole with (Inverse) Kannala-Brandt
J. Kannala and S. S. Brandt, "A generic camera model and calibration method for conventional, wide-angle, and fish-eye lenses," in IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 28, no. 8, pp. 1335-1340, Aug. 2006, doi: 10.1109/TPAMI.2006.153. https://oulu3dvision.github.io/calibgeneric/Kannala_Brandt_calibration.pdf
MetriCal keyword: pinhole_with_kannala_brandt
Type: Correcting
Inverse Kannala-Brandt follows the same paradigm as our other Inverse models: it corrects distortion in image space, rather than modeling it in world space.
Inverse Kannala-Brandt is close to the original Kannala-Brandt model, and therefore shares the same set of distortion parameters as OpenCV Fisheye. Don't get them mixed up!
Parameter | Description |
---|---|
focal length (px) | |
principal point in x (px) | |
principal point in y (px) | |
first radial distortion term | |
second radial distortion term | |
third radial distortion term | |
fourth radial distortion term |
Common Use Cases
If you're just correcting for distortion, rather than modeling it, this model is a good choice for lenses with a field of view of 140° or less.
Modeling
Modeling distortion for Inverse Kannala-Brandt is a non-linear process. The most common method is to run a non-linear optimization to find the distorted point. This is the method used in MetriCal.