GTSAM
4.0.2
C++ library for smoothing and mapping (SAM)
|
Calibration of a omni-directional camera with mirror + lens radial distortion. More...
#include <Cal3Unified.h>
Public Types | |
enum | { dimension = 10 } |
using | shared_ptr = std::shared_ptr< Cal3Unified > |
enum | { dimension = 9 } |
enum | { dimension = 5 } |
Protected Attributes | |
double | k1_ = 0.0f |
double | k2_ = 0.0f |
radial 2nd-order and 4th-order | |
double | p1_ = 0.0f |
double | p2_ = 0.0f |
tangential distortion | |
double | tol_ = 1e-5 |
tolerance value when calibrating | |
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 | |
Testable | |
bool | equals (const Cal3 &K, double tol=10e-9) const |
Check if equal up to specified tolerance. | |
Standard Interface | |
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) | |
Testable | |
bool | equals (const Cal3DS2_Base &K, double tol=1e-8) const |
assert equality up to a tolerance | |
Standard Interface | |
double | k1 () const |
First distortion coefficient. | |
double | k2 () const |
Second distortion coefficient. | |
double | p1 () const |
First tangential distortion coefficient. | |
double | p2 () const |
Second tangential distortion coefficient. | |
Vector4 | k () const |
return distortion parameter vector | |
Point2 | uncalibrate (const Point2 &p, OptionalJacobian< 2, 9 > Dcal={}, OptionalJacobian< 2, 2 > Dp={}) const |
Point2 | calibrate (const Point2 &p, OptionalJacobian< 2, 9 > Dcal={}, OptionalJacobian< 2, 2 > Dp={}) const |
Convert (distorted) image coordinates uv to intrinsic coordinates xy. | |
Matrix2 | D2d_intrinsic (const Point2 &p) const |
Derivative of uncalibrate wrpt intrinsic coordinates. | |
Matrix29 | D2d_calibration (const Point2 &p) const |
Derivative of uncalibrate wrpt the calibration parameters. | |
Clone | |
virtual std::shared_ptr< Cal3DS2_Base > | clone () const |
Standard Constructors | |
Cal3Unified ()=default | |
Default Constructor with only unit focal length. | |
Cal3Unified (double fx, double fy, double s, double u0, double v0, double k1, double k2, double p1=0.0, double p2=0.0, double xi=0.0) | |
~Cal3Unified () override | |
Advanced Constructors | |
Cal3Unified (const Vector10 &v) | |
Testable | |
void | print (const std::string &s="") const override |
print with optional string | |
bool | equals (const Cal3Unified &K, double tol=10e-9) const |
assert equality up to a tolerance | |
GTSAM_EXPORT friend std::ostream & | operator<< (std::ostream &os, const Cal3Unified &cal) |
Output stream operator. | |
Standard Interface | |
double | xi () const |
mirror parameter | |
Vector10 | vector () const |
Return all parameters as a vector. | |
Point2 | uncalibrate (const Point2 &p, OptionalJacobian< 2, 10 > Dcal={}, OptionalJacobian< 2, 2 > Dp={}) const |
Point2 | calibrate (const Point2 &p, OptionalJacobian< 2, 10 > Dcal={}, OptionalJacobian< 2, 2 > Dp={}) const |
Conver a pixel coordinate to ideal coordinate. | |
Point2 | spaceToNPlane (const Point2 &p) const |
Convert a 3D point to normalized unit plane. | |
Point2 | nPlaneToSpace (const Point2 &p) const |
Convert a normalized unit plane point to 3D space. | |
Manifold | |
Cal3Unified | retract (const Vector &d) const |
Given delta vector, update calibration. | |
Vector | localCoordinates (const Cal3Unified &T2) const |
Given a different calibration, calculate update to obtain it. | |
size_t | dim () const override |
Return dimensions of calibration manifold object. | |
static size_t | Dim () |
Return dimensions of calibration manifold object. | |
Calibration of a omni-directional camera with mirror + lens radial distortion.
Similar to Cal3DS2, does distortion but has additional mirror parameter xi K = [ fx s u0 ; 0 fy v0 ; 0 0 1 ] Pn = [ P.x / (1 + xi * {P.x² + P.y² + 1}), P.y / (1 + xi * {P.x² + P.y² + 1})] r² = Pn.x² + Pn.y² {pn} = (1 + k1*r² + k2*r⁴ ) pn + [ 2*k3 pn.x pn.y + k4 (r² + 2 Pn.x²) ; k3 (rr + 2 Pn.y²) + 2*k4 pn.x pn.y ] pi = K*pn
|
inlinevirtualinherited |
Reimplemented in gtsam::Cal3DS2.
Point2 gtsam::Cal3Unified::uncalibrate | ( | const Point2 & | p, |
OptionalJacobian< 2, 10 > | Dcal = {} , |
||
OptionalJacobian< 2, 2 > | Dp = {} |
||
) | const |
convert intrinsic coordinates xy to image coordinates uv
p | point in intrinsic coordinates |
Dcal | optional 2*10 Jacobian wrpt Cal3Unified parameters |
Dp | optional 2*2 Jacobian wrpt intrinsic coordinates |
|
inherited |
convert intrinsic coordinates xy to (distorted) image coordinates uv
p | point in intrinsic coordinates |
Dcal | optional 2*9 Jacobian wrpt Cal3DS2 parameters |
Dp | optional 2*2 Jacobian wrpt intrinsic coordinates |