class
CamEquiFisheye / equadistant model pinhole camera model class.
Contents
As fisheye or wide-angle lenses are widely used in practice, we here provide mathematical derivations of such distortion model as in OpenCV fisheye.
where are the normalized coordinates of the 3D feature and u and v are the distorted image coordinates on the image plane. Clearly, the following distortion intrinsic parameters are used in the above model:
In analogy to the previous radial distortion (see ov_core::
Similarly, with the chain rule of differentiation, we can compute the following Jacobian with respect to the normalized coordinates:
To equate this to one of Kalibr's models, this is what you would use for pinhole-equi
.
Base classes
- class CamBase
- Base pinhole camera model class.
Constructors, destructors, conversion operators
- CamEqui(int width, int height)
- Default constructor.
Public functions
- auto undistort_f(const Eigen::Vector2f& uv_dist) -> Eigen::Vector2f override
- Given a raw uv point, this will undistort it based on the camera matrices into normalized camera coords.
- auto distort_f(const Eigen::Vector2f& uv_norm) -> Eigen::Vector2f override
- Given a normalized uv coordinate this will distort it to the raw image plane.
- void compute_distort_jacobian(const Eigen::Vector2d& uv_norm, Eigen::MatrixXd& H_dz_dzn, Eigen::MatrixXd& H_dz_dzeta) override
- Computes the derivative of raw distorted to normalized coordinate.
Function documentation
ov_core:: CamEqui:: CamEqui(int width,
int height)
Default constructor.
Parameters | |
---|---|
width | Width of the camera (raw pixels) |
height | Height of the camera (raw pixels) |
Eigen::Vector2f ov_core:: CamEqui:: undistort_f(const Eigen::Vector2f& uv_dist) override
Given a raw uv point, this will undistort it based on the camera matrices into normalized camera coords.
Parameters | |
---|---|
uv_dist | Raw uv coordinate we wish to undistort |
Returns | 2d vector of normalized coordinates |
Eigen::Vector2f ov_core:: CamEqui:: distort_f(const Eigen::Vector2f& uv_norm) override
Given a normalized uv coordinate this will distort it to the raw image plane.
Parameters | |
---|---|
uv_norm | Normalized coordinates we wish to distort |
Returns | 2d vector of raw uv coordinate |
void ov_core:: CamEqui:: compute_distort_jacobian(const Eigen::Vector2d& uv_norm,
Eigen::MatrixXd& H_dz_dzn,
Eigen::MatrixXd& H_dz_dzeta) override
Computes the derivative of raw distorted to normalized coordinate.
Parameters | |
---|---|
uv_norm | Normalized coordinates we wish to distort |
H_dz_dzn | Derivative of measurement z in respect to normalized |
H_dz_dzeta | Derivative of measurement z in respect to intrinic parameters |