raisim::CameraLensInverse
class · #include <raisim/sensors/CameraLens.hpp>
The inverse of one lens, prepared for many points: where the lens first stops increasing monotonically from the optical axis (its fold), and a bound on the distorted radius inside the fold, so points without a solution are rejected without a search. Gives the results of undistortNormalizedPoint(), undistortFisheyeAngle(), cameraPixelToRay() and cameraRayToPixel(), which prepare one per call; build one per lens to map many points.
Constructors & destructor
CameraLensInverse
explicit CameraLensInverse(const CameraLensModel &lens)Parameters
| Parameter | Description |
|---|---|
lens (in) | Lens model; copied. |
Public member functions
undistort
bool undistort(
double xd,
double yd,
double &x,
double &y,
bool useGuess=false) constundistortNormalizedPoint() with this lens's pinhole distortion.
undistortFisheyeAngle
bool undistortFisheyeAngle(double thetaD, double &theta) constundistortFisheyeAngle() with this lens's fisheye coefficients.
pixelToRay
bool pixelToRay(
const CameraIntrinsics &intrinsics,
double u,
double v,
std::array<double, 3> &ray) constcameraPixelToRay() with this lens.
rayToPixel
bool rayToPixel(
const CameraIntrinsics &intrinsics,
const std::array<double, 3> &ray,
double &u,
double &v) constcameraRayToPixel() with this lens.
foldLimit
double foldLimit() constReturns The fold: the squared normalized radius x^2 + y^2 (pinhole) or the ray angle (fisheye, at most pi) at which the lens stops increasing monotonically; infinity if it never does.