Ocean
Ocean::CV::Depth::Rectifier Class Reference

This class implements frame rectification functions. More...

Static Public Member Functions

static bool rectify (const AnyCamera &cameraA, const AnyCamera &cameraB, const HomogenousMatrix4 &world_T_cameraA, const HomogenousMatrix4 &world_T_cameraB, const Frame &frameA, const Frame &frameB, const PinholeCamera &pinholeCamera, Frame &rectifiedFrameA, Frame &rectifiedFrameB, HomogenousMatrix4 &world_T_rectifiedA, HomogenousMatrix4 &world_T_rectifiedB, const bool useTangentMapping, Worker *worker=nullptr)
 Rectifies two images with given camera profile and camera pose. More...
 
static bool detemineRectificationRotation (const HomogenousMatrix4 &world_T_cameraA, const HomogenousMatrix4 &world_T_cameraB, Quaternion &world_R_rectified)
 Returns the rotation between the rectified pinhole camera(s) and world for two camera poses. More...
 
static bool resampleCameraImageWithOptionalTangentMapping (const Frame &sourceFrame, const AnyCamera &sourceCamera, const SquareMatrix3 &source_R_target, const AnyCamera &targetCamera, Frame &targetFrame, LookupCorner2< Vector2 > *source_OLT_target=nullptr, Worker *worker=nullptr, const unsigned int binSizeInPixel=8u, const void *borderColor=nullptr, const bool useTangentMapping=false)
 Re-samples a camera image which has been captured with a camera profile as if the image would have been captured with a second camera profile. More...
 

Detailed Description

This class implements frame rectification functions.

Member Function Documentation

◆ detemineRectificationRotation()

static bool Ocean::CV::Depth::Rectifier::detemineRectificationRotation ( const HomogenousMatrix4 world_T_cameraA,
const HomogenousMatrix4 world_T_cameraB,
Quaternion world_R_rectified 
)
static

Returns the rotation between the rectified pinhole camera(s) and world for two camera poses.

Parameters
world_T_cameraAThe transformation between the first camera and world, with default camera pointing towards the negative z-space with y-axis up
world_T_cameraBThe transformation between the second camera and world, with default camera pointing towards the negative z-space with y-axis up
world_R_rectifiedThe resulting transformation between rectified pinhole camera(s) and world, with default camera pointing towards the negative z-space with y-axis up
Returns
True, if succeeded

◆ rectify()

static bool Ocean::CV::Depth::Rectifier::rectify ( const AnyCamera cameraA,
const AnyCamera cameraB,
const HomogenousMatrix4 world_T_cameraA,
const HomogenousMatrix4 world_T_cameraB,
const Frame frameA,
const Frame frameB,
const PinholeCamera pinholeCamera,
Frame rectifiedFrameA,
Frame rectifiedFrameB,
HomogenousMatrix4 world_T_rectifiedA,
HomogenousMatrix4 world_T_rectifiedB,
const bool  useTangentMapping,
Worker worker = nullptr 
)
static

Rectifies two images with given camera profile and camera pose.

Parameters
cameraAThe camera profile of the first camera, must be valid
cameraBThe camera profile of the second camera, must be valid
world_T_cameraAThe transformation between the first camera and world, with default camera pointing towards the negative z-space with y-axis up
world_T_cameraBThe transformation between the first camera and world, with default camera pointing towards the negative z-space with y-axis up
frameAThe first camera image, must be valid
frameBThe second camera image, must be valid
pinholeCameraThe camera profile of the pinhole camera to be used when rectifying the images, must be valid
rectifiedFrameAThe resulting rectified image of the first camera, must be valid
rectifiedFrameBThe resulting rectified image of the second camera, must be valid
world_T_rectifiedAThe resulting transformation between the first rectified camera and world, with default camera pointing towards the negative z-space with y-axis up
world_T_rectifiedBThe resulting transformation between the second rectified camera and world, with default camera pointing towards the negative z-space with y-axis up
useTangentMappingWhether to use tangent mapping to better preserve the original resolution
workerOptional worker object to distribute the computation, nullptr to execute the code on one core only
Returns
True, if succeeded

◆ resampleCameraImageWithOptionalTangentMapping()

static bool Ocean::CV::Depth::Rectifier::resampleCameraImageWithOptionalTangentMapping ( const Frame sourceFrame,
const AnyCamera sourceCamera,
const SquareMatrix3 source_R_target,
const AnyCamera targetCamera,
Frame targetFrame,
LookupCorner2< Vector2 > *  source_OLT_target = nullptr,
Worker worker = nullptr,
const unsigned int  binSizeInPixel = 8u,
const void *  borderColor = nullptr,
const bool  useTangentMapping = false 
)
static

Re-samples a camera image which has been captured with a camera profile as if the image would have been captured with a second camera profile.

Optionally applies tangent mapping to the target image to better preserve the original resolution. The function can be used e.g., to rectify a fisheye camera image into a pinhole camera image.

Parameters
sourceFrameThe source image captured with the source camera profile, must be valid
sourceCameraThe source camera profile which has been used to capture the source image, with resolution sourceFrame.width() x sourceFrame.height(), must be valid
source_R_targetThe rotation transforming 3D points defined in the coordinate system of the target camera image to 3D points defined in the coordinate system of the source camera image, must be valid
targetCameraThe camera profile of the target frame, must be valid
targetFrameThe resulting target image, with resolution targetCamera.width() x targetCamera.height(), must be valid
source_OLT_targetOptional resulting offset lookup table between target image points and source image points
workerOptional worker object to distribute the computational load
binSizeInPixelThe size in pixel of the interpolation bins used for building the lookup table, with range [1, infinity)
borderColorThe color of border pixels for which now visual content exists, provide one value for each channel, nullptr to use ElementType(0) for each channel
Returns
True, if succeeded
See also
FrameInterpolatorBilinear::Comfort::resampleCameraImage().

The documentation for this class was generated from the following file: