Calibration of a fisheye camera.
More...
#include <Cal3Fisheye.h>
|
enum | { dimension = 9
} |
|
using | shared_ptr = std::shared_ptr< Cal3Fisheye > |
|
enum | { dimension = 5
} |
|
|
double | fx_ = 1.0f |
|
double | fy_ = 1.0f |
| focal length
|
|
double | s_ = 0.0f |
| skew
|
|
double | u0_ = 0.0f |
|
double | v0_ = 0.0f |
| principal point
|
|
|
bool | equals (const Cal3 &K, double tol=10e-9) const |
| Check if equal up to specified tolerance.
|
|
|
double | fx () const |
| focal length x
|
|
double | fy () const |
| focal length y
|
|
double | aspectRatio () const |
| aspect ratio
|
|
double | skew () const |
| skew
|
|
double | px () const |
| image center in x
|
|
double | py () const |
| image center in y
|
|
Point2 | principalPoint () const |
| return the principal point
|
|
virtual Matrix3 | K () const |
| return calibration matrix K
|
|
Matrix3 | inverse () const |
| Return inverted calibration matrix inv(K)
|
|
|
| Cal3Fisheye ()=default |
| Default Constructor with only unit focal length.
|
|
| Cal3Fisheye (const double fx, const double fy, const double s, const double u0, const double v0, const double k1, const double k2, const double k3, const double k4, double tol=1e-5) |
|
| ~Cal3Fisheye () override |
|
|
| Cal3Fisheye (const Vector9 &v) |
|
|
double | k1 () const |
| First distortion coefficient.
|
|
double | k2 () const |
| Second distortion coefficient.
|
|
double | k3 () const |
| First tangential distortion coefficient.
|
|
double | k4 () const |
| Second tangential distortion coefficient.
|
|
Vector4 | k () const |
| return distortion parameter vector
|
|
Vector9 | vector () const |
| Return all parameters as a vector.
|
|
Point2 | uncalibrate (const Point2 &p, OptionalJacobian< 2, 9 > Dcal={}, OptionalJacobian< 2, 2 > Dp={}) const |
| convert intrinsic coordinates [x_i; y_i] to (distorted) image coordinates [u; v] More...
|
|
Point2 | calibrate (const Point2 &p, OptionalJacobian< 2, 9 > Dcal={}, OptionalJacobian< 2, 2 > Dp={}) const |
|
static double | Scaling (double r) |
| Helper function that calculates atan(r)/r.
|
|
|
void | print (const std::string &s="") const override |
| print with optional string
|
|
bool | equals (const Cal3Fisheye &K, double tol=10e-9) const |
| assert equality up to a tolerance
|
|
GTSAM_EXPORT friend std::ostream & | operator<< (std::ostream &os, const Cal3Fisheye &cal) |
| Output stream operator.
|
|
|
size_t | dim () const override |
| Return dimensions of calibration manifold object.
|
|
Cal3Fisheye | retract (const Vector &d) const |
| Given delta vector, update calibration.
|
|
Vector | localCoordinates (const Cal3Fisheye &T2) const |
| Given a different calibration, calculate update to obtain it.
|
|
static size_t | Dim () |
| Return dimensions of calibration manifold object.
|
|
Calibration of a fisheye camera.
Uses same distortionmodel as OpenCV, with https://docs.opencv.org/master/db/d58/group__calib3d__fisheye.html 3D point in camera frame p = (x, y, z) Intrinsic coordinates: [x_i;y_i] = [x/z; y/z] Distorted coordinates: r² = (x_i)² + (y_i)² th = atan(r) th_d = th(1 + k1*th² + k2*th⁴ + k3*th⁶ + k4*th⁸) [x_d; y_d] = (th_d / r)*[x_i; y_i] Pixel coordinates: K = [fx s u0; 0 fy v0 ;0 0 1] [u; v; 1] = K*[x_d; y_d; 1]
◆ calibrate()
Convert (distorted) image coordinates [u;v] to intrinsic coordinates [x_i, y_i]
- Parameters
-
p | point in image coordinates |
Dcal | optional 2*9 Jacobian wrpt intrinsic parameters |
Dp | optional 2*2 Jacobian wrpt intrinsic coordinates (xi, yi) |
- Returns
- point in intrinsic coordinates
◆ clone()
virtual std::shared_ptr<Cal3Fisheye> gtsam::Cal3Fisheye::clone |
( |
| ) |
const |
|
inlinevirtual |
- Returns
- a deep copy of this object
◆ uncalibrate()
convert intrinsic coordinates [x_i; y_i] to (distorted) image coordinates [u; v]
- Parameters
-
p | point in intrinsic coordinates |
Dcal | optional 2*9 Jacobian wrpt intrinsic parameters |
Dp | optional 2*2 Jacobian wrpt intrinsic coordinates (xi, yi) |
- Returns
- point in (distorted) image coordinates
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/gtsam-jlblanco-docs/checkouts/latest/gtsam/geometry/Cal3Fisheye.h