RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
rtabmap::StereoSGBM Class Reference

Semi-Global Block Matching algorithm for dense stereo matching. More...

#include <StereoSGBM.h>

Inheritance diagram for rtabmap::StereoSGBM:
Collaboration diagram for rtabmap::StereoSGBM:

Public Member Functions

 StereoSGBM (const ParametersMap &parameters=ParametersMap())
 Constructor with parameters map.
 
virtual ~StereoSGBM ()
 Virtual destructor.
 
virtual void parseParameters (const ParametersMap &parameters)
 Parse parameters from a parameters map.
 
virtual cv::Mat computeDisparity (const cv::Mat &leftImage, const cv::Mat &rightImage) const
 Compute disparity map from stereo image pair.
 
- Public Member Functions inherited from rtabmap::StereoDense
virtual ~StereoDense ()
 Virtual destructor.
 

Additional Inherited Members

- Public Types inherited from rtabmap::StereoDense
enum  Type { kTypeBM = 0 , kTypeSGBM = 1 }
 Enumeration of available stereo matching algorithm types. More...
 
- Static Public Member Functions inherited from rtabmap::StereoDense
static StereoDensecreate (const ParametersMap &parameters)
 Factory method to create a StereoDense instance from parameters.
 
static StereoDensecreate (StereoDense::Type type, const ParametersMap &parameters=ParametersMap())
 Factory method to create a StereoDense instance of a specific type.
 
- Protected Member Functions inherited from rtabmap::StereoDense
 StereoDense (const ParametersMap &parameters=ParametersMap())
 Protected constructor.
 

Detailed Description

Semi-Global Block Matching algorithm for dense stereo matching.

This class implements the Semi-Global Block Matching (SGBM) algorithm for computing disparity maps from stereo image pairs.

SGBM generally produces more accurate results than Block Matching, especially in textureless regions and areas with repetitive patterns, but is computationally more expensive.

Note
This class wraps OpenCV's cv::StereoSGBM implementation.
See also
StereoBM for a faster but less accurate alternative

Definition at line 51 of file StereoSGBM.h.

Constructor & Destructor Documentation

◆ StereoSGBM()

rtabmap::StereoSGBM::StereoSGBM ( const ParametersMap parameters = ParametersMap())

Constructor with parameters map.

Creates a StereoSGBM instance and initializes it from the provided parameters map.

Parameters
parametersParameters map containing configuration values

◆ ~StereoSGBM()

virtual rtabmap::StereoSGBM::~StereoSGBM ( )
inlinevirtual

Virtual destructor.

Definition at line 65 of file StereoSGBM.h.

Member Function Documentation

◆ parseParameters()

virtual void rtabmap::StereoSGBM::parseParameters ( const ParametersMap parameters)
virtual

◆ computeDisparity()

virtual cv::Mat rtabmap::StereoSGBM::computeDisparity ( const cv::Mat &  leftImage,
const cv::Mat &  rightImage 
) const
virtual

Compute disparity map from stereo image pair.

Computes a disparity map using the Semi-Global Block Matching algorithm. The images must have the same size and be either grayscale (CV_8UC1) or color (CV_8UC3). Color images are automatically converted to grayscale.

Parameters
leftImageLeft stereo image (CV_8UC1 or CV_8UC3)
rightImageRight stereo image (CV_8UC1 or CV_8UC3), must have same size as leftImage
Returns
Disparity map as a 16-bit signed integer image (CV_16SC1)
Note
The disparity values are stored as fixed-point numbers with 4 fractional bits. To get the actual disparity, divide by 16.

Implements rtabmap::StereoDense.


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