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


Public Member Functions | |
| DoubleSphereModel & | operator= (const DoubleSphereModel &)=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::kDoubleSphere |
Double-Sphere 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, \xi, \alpha]\)
|
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 = \left(\alpha d + \left(1-\alpha\right) \left(\xi r+t_z\right)\right)^{-1} \left[\begin{matrix}t_x\\t_y\end{matrix}\right]\\ d = \sqrt{r^2\left(1 + \xi^2\right) + 2\xi r t_z}\\ r^2 = {\mathbf{t}^s_{sx}}^T\mathbf{t}^s_{sx} \]
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 = \frac{m_z\xi + \sqrt{m_z^2 + (1-\xi^2)r^2}}{m_z^2+r^2} \left[\begin{matrix}m_x\\m_y\\m_z\end{matrix}\right] - \left[\begin{matrix}0\\0\\\xi\end{matrix}\right]\\ r^2 = {\mathbf{p}}^T\mathbf{p},\\ m_x = \frac{p_x - c_x}{f}, m_y = \frac{p_y - c_y}{f}, m_z = \frac{1-\alpha^2r^2}{\alpha\sqrt{1-(2\alpha-1)r^2}+1-\alpha}\\ \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]\)