Skip to content

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 ​

cpp
explicit CameraLensInverse(const CameraLensModel &lens)

Parameters

ParameterDescription
lens (in)Lens model; copied.

Public member functions ​

undistort ​

cpp
bool undistort(
    double xd,
    double yd,
    double &x,
    double &y,
    bool useGuess=false) const

undistortNormalizedPoint() with this lens's pinhole distortion.

undistortFisheyeAngle ​

cpp
bool undistortFisheyeAngle(double thetaD, double &theta) const

undistortFisheyeAngle() with this lens's fisheye coefficients.

pixelToRay ​

cpp
bool pixelToRay(
    const CameraIntrinsics &intrinsics,
    double u,
    double v,
    std::array<double, 3> &ray) const

cameraPixelToRay() with this lens.

rayToPixel ​

cpp
bool rayToPixel(
    const CameraIntrinsics &intrinsics,
    const std::array<double, 3> &ray,
    double &u,
    double &v) const

cameraRayToPixel() with this lens.

foldLimit ​

cpp
double foldLimit() const

Returns 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.

RaiSim — physics for robotics and AI.