|
stereo
|
#include <densestereo.h>
Public Member Functions | |
| DenseStereo () | |
| virtual | ~DenseStereo () |
| void | setStereoCalibration (const frame_helper::StereoCalibration &stereoCal, const int imgWidth, const int imgHeight) |
| void | setLibElasConfiguration (const libElasConfiguration &libElasParam) |
| void | setGaussianKernel (int size) |
| void | processFramePair (const cv::Mat &left_frame, const cv::Mat &right_frame, cv::Mat &left_output_frame, cv::Mat &right_output_frame, bool isRectified=false) |
| void | getDistanceImages (cv::Mat &left_disp_image, cv::Mat &right_disp_image) |
| void | getDistanceImages (const cv::Mat &left_frame, const cv::Mat &right_frame, cv::Mat &left_output_frame, cv::Mat &right_output_frame, bool isRectified=false) |
| void | getDistanceImages (const cv::Mat &left_frame, const cv::Mat &right_frame, base::samples::DistanceImage &left_output_frame, base::samples::DistanceImage &right_output_frame, bool isRectified=false) |
| cv::Mat | createDistanceImage (frame_helper::CameraCalibrationCv const &calib, base::samples::DistanceImage &dist_image) |
| cv::Mat | createLeftDistanceImage (base::samples::DistanceImage &dist_image) |
| cv::Mat | createRightDistanceImage (base::samples::DistanceImage &dist_image) |
This class performs dense stereo calculation and is mainly a wrapper to libelas. After construction, the setStereoCalibration method needs to be called with a valid calibration. Configuration itself has sane defaults, but can be changed any time. process_FramePair produces a disparity image, which by itself isn't all that usefull (function will probably be made private soon). getDistanceImage is more likely what you want to call, which produces images where the actual distance is encoded as a float. Use the createDistanceImage method beforehand to get the cv::Mat to pass as a parameter to getDistanceImage to get the base::samples::DistanceImage type filled from this class.
| stereo::DenseStereo::DenseStereo | ( | ) |
|
virtual |
| cv::Mat stereo::DenseStereo::createDistanceImage | ( | frame_helper::CameraCalibrationCv const & | calib, |
| base::samples::DistanceImage & | dist_image | ||
| ) |
prepare a distance image from the provided camera calibration the resulting cv::Mat shares the same data buffer as the dist_image and can be used as input to getDistanceImages
| calib | - the calibration for the camera to use |
| dist_image | - the dist_image which will be filled with the calib data and image size |
|
inline |
convenience method which doesn't require a calibration object but uses the camera calibration for the left camera
|
inline |
convenience method which doesn't require a calibration object but uses the camera calibration for the right camera
| void stereo::DenseStereo::getDistanceImages | ( | cv::Mat & | left_disp_image, |
| cv::Mat & | right_disp_image | ||
| ) |
perform conversion from disparity to distance image
| void stereo::DenseStereo::getDistanceImages | ( | const cv::Mat & | left_frame, |
| const cv::Mat & | right_frame, | ||
| cv::Mat & | left_output_frame, | ||
| cv::Mat & | right_output_frame, | ||
| bool | isRectified = false |
||
| ) |
computes the disparity images and calculates the distance images from them
| left_frame | left input frame |
| right_frame | right input frame |
| left_output_frame | left distance image |
| right_output_frame | right distance image |
| isRectified | tells the function if the input images are already rectified |
| void stereo::DenseStereo::getDistanceImages | ( | const cv::Mat & | left_frame, |
| const cv::Mat & | right_frame, | ||
| base::samples::DistanceImage & | left_output_frame, | ||
| base::samples::DistanceImage & | right_output_frame, | ||
| bool | isRectified = false |
||
| ) |
convenience method that takes base::samples::DistanceImages as the result objects
| left_frame | left input frame |
| right_frame | right input frame |
| left_output_frame | left distance image |
| right_output_frame | right distance image |
| isRectified | tells the function if the input images are already rectified |
| void stereo::DenseStereo::processFramePair | ( | const cv::Mat & | left_frame, |
| const cv::Mat & | right_frame, | ||
| cv::Mat & | left_output_frame, | ||
| cv::Mat & | right_output_frame, | ||
| bool | isRectified = false |
||
| ) |
computes disparities of input frame pair left_frame, right_frame
| left_frame | left input frame |
| right_frame | right input frame |
| left_output_frame | left output frame |
| right_output_frame | right output frame |
| isRectified | tells the function if the input images are already rectified |
|
inline |
if set to greater than 0, the images will be preprocessed with a gaussian blur filter with a kernel of the given size. Should be an odd number.
| void stereo::DenseStereo::setLibElasConfiguration | ( | const libElasConfiguration & | libElasParam | ) |
configures libElas
| libElasParam | libElas configuration |
| void stereo::DenseStereo::setStereoCalibration | ( | const frame_helper::StereoCalibration & | stereoCal, |
| const int | imgWidth, | ||
| const int | imgHeight | ||
| ) |
sets calibration parameters for stereo camera setup
| stereoCamCal | stereo camera calibration data |
1.8.6