|
Calico
A visual-inertial calibration library designed for rapid problem construction and debugging.
|
#include <camera_models.h>


Public Member Functions | |
| ExtendedUnifiedCameraModel & | operator= (const ExtendedUnifiedCameraModel &)=default |
| CameraIntrinsicsModel | GetType () const final |
| Getter for camera model type. | |
| int | NumberOfParameters () const final |
| Getter for the number of parameters for this camera model. | |
Public Member Functions inherited from calico::sensors::CameraModel | |
| template<typename T > | |
| absl::StatusOr< Eigen::Vector2< T > > | ProjectPoint (const Eigen::VectorX< T > &intrinsics, const Eigen::Vector3< T > &point) const |
| template<typename T > | |
| absl::StatusOr< Eigen::Vector3< T > > | UnprojectPixel (const Eigen::VectorX< T > &intrinsics, const Eigen::Vector2< T > &pixel) const |
Static Public Member Functions | |
| template<typename T > | |
| static absl::StatusOr< Eigen::Vector2< T > > | ProjectPoint (const Eigen::VectorX< T > &intrinsics, const Eigen::Vector3< T > &point) |
| template<typename T > | |
| static absl::StatusOr< Eigen::Vector3< T > > | UnprojectPixel (const Eigen::VectorX< T > &intrinsics, const Eigen::Vector2< T > &pixel) |
Static Public Member Functions inherited from calico::sensors::CameraModel | |
| static std::unique_ptr< CameraModel > | Create (CameraIntrinsicsModel camera_model) |
Static Public Attributes | |
| static constexpr int | kNumberOfParameters = 5 |
| static constexpr CameraIntrinsicsModel | kModelType = CameraIntrinsicsModel::kExtendedUnifiedCamera |
Extended unified camera projection model. This model assumes an isotropic pinhole model, i.e. \(f_x == f_y = f\).
Parameters are in the following order: \([f, c_x, c_y, \alpha, \beta]\)
|
inlinestatic |
Returns projection \(\mathbf{p}\), a 2-D pixel coordinate such that
\[ \mathbf{p} = \left[\begin{matrix}f&0\\0&f\end{matrix}\right]\mathbf{p}_d + \left[\begin{matrix}c_x\\c_y\end{matrix}\right]\\ \mathbf{p}_d = s\mathbf{p}_m\\ s = \frac{1}{\alpha d + (1-\alpha)t_z}\\ d = \sqrt{\beta({t_x}^2 + {t_y}^2) + {t_z}^2}\\ \mathbf{p}_m = \left[\begin{matrix}t_x\\t_y\end{matrix}\right] \]
intrinsics is a vector of intrinsics parameters the following order: \([f, c_x, c_y, \xi, \alpha]\)
point is the location of the feature resolved in the camera frame \(\mathbf{t}^s_{sx} = \left[\begin{matrix}t_x&t_y&t_z\end{matrix}\right]^T\).
|
inlinestatic |
Inverts the projection model \(\mathbf{P}\) to obtain the bearing vector \(\mathbf{p}_m\) of the pixel location \(\mathbf{p}\).
\[ \mathbf{p}_m = \mathbf{p}_s / \|\mathbf{p}_s\|\\ \mathbf{p}_s = s\left[\begin{matrix} m_x\\m_y\\m_z \end{matrix}\right]\\ s = \frac{1}{\sqrt{m_x^2 + m_y^2 + m_z^2}}\\ m_x = \frac{p_x - c_x}{f}, m_y = \frac{p_y - c_y}{f}\\ m_z = \frac{1-\beta\alpha^2r^2} {\alpha\sqrt{1 - (2\alpha - 1)\beta r^2}+(1-\alpha)}\\ r^2 = m_x^2 + m_y^2,\\ \mathbf{p} = \left[\begin{matrix}p_x\\p_y\end{matrix}\right] \]
intrinsics is a vector of intrinsics parameters the following order: \([f, c_x, c_y, \xi, \alpha, \beta]\)
NOTE: This method is rather imprecise.