Go to the documentation of this file.
9 #ifndef mrpt_CStereoRectifyMap_H
10 #define mrpt_CStereoRectifyMap_H
151 bool enable,
unsigned int target_width = 0,
152 unsigned int target_height = 0);
205 const std::vector<int16_t>& left_x,
const std::vector<uint16_t>& left_y,
206 const std::vector<int16_t>& right_x,
207 const std::vector<uint16_t>& right_y);
212 std::vector<int16_t>& left_x, std::vector<uint16_t>& left_y,
213 std::vector<int16_t>& right_x, std::vector<uint16_t>& right_y);
250 const bool use_internal_mem_cache =
true)
const;
271 const bool use_internal_mem_cache =
true)
const;
277 const void* in_left_image,
const void* in_right_image,
278 void* out_left_image,
void* out_right_image)
const;
mrpt::img::TImageSize getResizeOutputSize() const
Only when isEnabledResizeOutput() returns true, this gets the target size.
const mrpt::img::TStereoCamera & getCameraParams() const
Returns the camera parameters which were used to generate the distortion map, as passed by the user t...
mrpt::poses::CPose3DQuat m_rot_left
The rotation applied to the left/right camera so their virtual image plane is the same after rectific...
void setAlpha(double alpha)
Sets the alpha parameter which controls the zoom in/out of the rectified images, such that:
const mrpt::img::TCamera & getRectifiedLeftImageParams() const
Just like getRectifiedImageParams() but for the left camera only.
double getAlpha() const
Return the alpha parameter.
const mrpt::poses::CPose3DQuat & getRightCameraRot() const
See getLeftCameraRot()
const mrpt::poses::CPose3DQuat & getLeftCameraRot() const
After computing the rectification maps, get the rotation applied to the left/right camera so their vi...
void setInterpolationMethod(const mrpt::img::TInterpolationMethod interp)
Change remap interpolation method (default=Lineal).
CStereoRectifyMap()
Default ctor.
const mrpt::img::TCamera & getRectifiedRightImageParams() const
Just like getRectifiedImageParams() but for the right camera only.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,...
mrpt::img::CImage m_cache1
Memory caches for in-place rectification speed-up.
GLclampf GLclampf GLclampf alpha
const mrpt::img::TStereoCamera & getRectifiedImageParams() const
After computing the rectification maps, this method retrieves the calibration parameters of the recti...
Use this class to rectify stereo images if the same distortion maps are reused over and over again.
mrpt::poses::CPose3DQuat m_rot_right
bool isEnabledResizeOutput() const
Returns whether resizing is enabled (default=false)
void setRectifyMapsFast(std::vector< int16_t > &left_x, std::vector< uint16_t > &left_y, std::vector< int16_t > &right_x, std::vector< uint16_t > &right_y)
Direct input access to rectify maps.
mrpt::img::TInterpolationMethod m_interpolation_method
Structure to hold the parameters of a pinhole stereo camera model.
void setFromCamParams(const mrpt::obs::CObservationStereoImages &stereo_obs)
A wrapper to setFromCamParams() which takes the parameters from an stereo observation object.
TInterpolationMethod
Interpolation methods for images.
std::vector< uint16_t > m_dat_mapy_left
mrpt::img::TStereoCamera m_camera_params
A copy of the data provided by the user.
Structure to hold the parameters of a pinhole camera model.
bool isEnabledBothCentersCoincide() const
void enableResizeOutput(bool enable, unsigned int target_width=0, unsigned int target_height=0)
If enabled, the computed maps will rectify images to a size different than their original size.
void getStereoCameraParams(mrpt::img::TStereoCamera &out_params) const
Populates a TStereoCamera structure with the parameters in leftCamera, rightCamera and rightCameraPos...
mrpt::img::TStereoCamera m_rectified_image_params
Resulting images params.
bool m_enable_both_centers_coincide
A class for storing images as grayscale or RGB bitmaps.
void setRectifyMaps(const std::vector< int16_t > &left_x, const std::vector< uint16_t > &left_y, const std::vector< int16_t > &right_x, const std::vector< uint16_t > &right_y)
Direct input access to rectify maps.
void setFromCamParams(const mrpt::img::TStereoCamera ¶ms)
Prepares the mapping from the intrinsic, distortion and relative pose parameters of a stereo camera.
void rectify(const mrpt::img::CImage &in_left_image, const mrpt::img::CImage &in_right_image, mrpt::img::CImage &out_left_image, mrpt::img::CImage &out_right_image) const
Rectify the input image pair and save the result in a different output images - setFromCamParams() mu...
void internal_invalidate()
std::vector< int16_t > m_dat_mapx_left
mrpt::img::TInterpolationMethod getInterpolationMethod() const
Get the currently selected interpolation method.
bool isSet() const
Returns true if setFromCamParams() has been already called, false otherwise.
std::vector< uint16_t > m_dat_mapy_right
void enableBothCentersCoincide(bool enable=true)
If enabled (default=false), the principal points in both output images will coincide.
std::vector< int16_t > m_dat_mapx_right
TPixelCoord TImageSize
A type for image sizes.
Observation class for either a pair of left+right or left+disparity images from a stereo camera.
void rectify_IPL(const void *in_left_image, const void *in_right_image, void *out_left_image, void *out_right_image) const
Just like rectify() but directly works with OpenCV's "IplImage*", which must be passed as "void*" to ...
GLenum const GLfloat * params
mrpt::img::TImageSize m_resize_output_value
mrpt::img::CImage m_cache2
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |