Point Cloud Library (PCL)  1.9.1-dev
List of all members | Public Member Functions
pcl::AdaptiveCostSOStereoMatching Class Reference

Adaptive Cost 2-pass Scanline Optimization Stereo Matching class. More...

#include <pcl/stereo/stereo_matching.h>

+ Inheritance diagram for pcl::AdaptiveCostSOStereoMatching:

Public Member Functions

 AdaptiveCostSOStereoMatching (void)
 
virtual ~AdaptiveCostSOStereoMatching (void)
 
void setRadius (int radius)
 setter for the radius (half length) of the column used for cost aggregation More...
 
void setGammaS (int gamma_s)
 setter for the spatial bandwidth used for cost aggregation based on adaptive weights More...
 
void setGammaC (int gamma_c)
 setter for the color bandwidth used for cost aggregation based on adaptive weights More...
 
void setSmoothWeak (int smoothness_weak)
 "weak" smoothness penalty used within 2-pass Scanline Optimization More...
 
void setSmoothStrong (int smoothness_strong)
 "strong" smoothness penalty used within 2-pass Scanline Optimization More...
 
- Public Member Functions inherited from pcl::GrayStereoMatching
 GrayStereoMatching (void)
 
virtual ~GrayStereoMatching (void)
 
virtual void compute (unsigned char *ref_img, unsigned char *trg_img, int width, int height)
 stereo processing, it computes a disparity map stored internally by the class More...
 
virtual void compute (pcl::PointCloud< pcl::RGB > &ref, pcl::PointCloud< pcl::RGB > &trg)
 stereo processing, it computes a disparity map stored internally by the class More...
 
- Public Member Functions inherited from pcl::StereoMatching
 StereoMatching (void)
 
virtual ~StereoMatching (void)
 
void setMaxDisparity (int max_disp)
 setter for number of disparity candidates (disparity range) More...
 
void setXOffset (int x_off)
 setter for horizontal offset, i.e. More...
 
void setRatioFilter (int ratio_filter)
 setter for the value of the ratio filter More...
 
void setPeakFilter (int peak_filter)
 setter for the value of the peak filter More...
 
void setPreProcessing (bool is_pre_proc)
 setter for the pre processing step More...
 
void setLeftRightCheck (bool is_lr_check)
 setter for the left-right consistency check stage, that eliminates inconsistent/wrong disparity values from the disparity map at approx. More...
 
void setLeftRightCheckThreshold (int lr_check_th)
 setter for the left-right consistency check threshold More...
 
void medianFilter (int radius)
 median filter applied on the previously computed disparity map Note: the "compute" method must have been previously called at least once in order for this function to have any effect More...
 
virtual bool getPointCloud (float u_c, float v_c, float focal, float baseline, pcl::PointCloud< pcl::PointXYZ >::Ptr cloud)
 computation of the 3D point cloud from the previously computed disparity map without color information Note: the "compute" method must have been previously called at least once in order for this function to have any effect More...
 
virtual bool getPointCloud (float u_c, float v_c, float focal, float baseline, pcl::PointCloud< pcl::PointXYZRGB >::Ptr cloud, pcl::PointCloud< pcl::RGB >::Ptr texture)
 computation of the 3D point cloud from the previously computed disparity map including color information Note: the "compute" method must have been previously called at least once in order for this function to have any effect More...
 
void getVisualMap (pcl::PointCloud< pcl::RGB >::Ptr vMap)
 computation of a pcl::RGB cloud with scaled disparity values it can be used to display a rescaled version of the disparity map by means of the pcl::ImageViewer invalid disparity values are shown in green Note: the "compute" method must have been previously called at least once in order for this function to have any effect More...
 

Additional Inherited Members

- Protected Member Functions inherited from pcl::GrayStereoMatching
virtual void preProcessing (unsigned char *img, unsigned char *pp_img)
 
virtual void imgFlip (unsigned char *&img)
 
- Protected Member Functions inherited from pcl::StereoMatching
void leftRightCheck ()
 
short int computeStereoSubpixel (int dbest, int s1, int s2, int s3)
 
short int computeStereoSubpixel (int dbest, float s1, float s2, float s3)
 
short int doStereoRatioFilter (int *acc, short int dbest, int sad_min, int ratio_filter, int maxdisp, int precision=100)
 
short int doStereoRatioFilter (float *acc, short int dbest, float sad_min, int ratio_filter, int maxdisp, int precision=100)
 
short int doStereoPeakFilter (int *acc, short int dbest, int peak_filter, int maxdisp)
 
short int doStereoPeakFilter (float *acc, short int dbest, int peak_filter, int maxdisp)
 
- Protected Attributes inherited from pcl::StereoMatching
short int * disp_map_
 The internal disparity map. More...
 
unsigned char * ref_img_
 Local aligned copies of the cloud data. More...
 
unsigned char * trg_img_
 
short int * disp_map_trg_
 Disparity map used for left-right check. More...
 
unsigned char * pp_ref_img_
 Local aligned copies used for pre processing. More...
 
unsigned char * pp_trg_img_
 
int width_
 number of pixels per column of the input stereo pair . More...
 
int height_
 number of pixels per row of the input stereo pair . More...
 
int max_disp_
 Disparity range used for stereo processing. More...
 
int x_off_
 Horizontal displacemente (x offset) used for stereo processing. More...
 
int ratio_filter_
 Threshold for the ratio filter, $\in [0 100]$. More...
 
int peak_filter_
 Threshold for the peak filter, $\in [0 \infty]$. More...
 
bool is_pre_proc_
 toggle for the activation of the pre-processing stage More...
 
bool is_lr_check_
 toggle for the activation of the left-right consistency check stage More...
 
int lr_check_th_
 Threshold for the left-right consistency check, typically either 0 or 1. More...
 

Detailed Description

Adaptive Cost 2-pass Scanline Optimization Stereo Matching class.

This class implements an adaptive-cost stereo matching algorithm based on 2-pass Scanline Optimization. The algorithm is inspired by the paper: [1] L. Wang et al., "High Quality Real-time Stereo using Adaptive Cost Aggregation and Dynamic Programming", 3DPVT 2006 Cost aggregation is performed using adaptive weigths computed on a single column as proposed in [1]. Instead of using Dynamic Programming as in [1], the optimization is performed via 2-pass Scanline Optimization. The algorithm is based on the Sum of Absolute Differences (SAD) matching function Only works with grayscale (single channel) rectified images

Author
Federico Tombari (feder.nosp@m.ico..nosp@m.tomba.nosp@m.ri@u.nosp@m.nibo..nosp@m.it)

Definition at line 442 of file stereo_matching.h.

Constructor & Destructor Documentation

pcl::AdaptiveCostSOStereoMatching::AdaptiveCostSOStereoMatching ( void  )
virtual pcl::AdaptiveCostSOStereoMatching::~AdaptiveCostSOStereoMatching ( void  )
inlinevirtual

Definition at line 447 of file stereo_matching.h.

Member Function Documentation

void pcl::AdaptiveCostSOStereoMatching::setGammaC ( int  gamma_c)
inline

setter for the color bandwidth used for cost aggregation based on adaptive weights

Parameters
[in]gamma_ccolor bandwidth used for cost aggregation based on adaptive weights

Definition at line 474 of file stereo_matching.h.

void pcl::AdaptiveCostSOStereoMatching::setGammaS ( int  gamma_s)
inline

setter for the spatial bandwidth used for cost aggregation based on adaptive weights

Parameters
[in]gamma_sspatial bandwidth used for cost aggregation based on adaptive weights

Definition at line 465 of file stereo_matching.h.

void pcl::AdaptiveCostSOStereoMatching::setRadius ( int  radius)
inline

setter for the radius (half length) of the column used for cost aggregation

Parameters
[in]radiusradius (half length) of the column used for cost aggregation; the total column length is equal to 2*radius + 1

Definition at line 456 of file stereo_matching.h.

void pcl::AdaptiveCostSOStereoMatching::setSmoothStrong ( int  smoothness_strong)
inline

"strong" smoothness penalty used within 2-pass Scanline Optimization

Parameters
[in]smoothness_strong"strong" smoothness penalty cost

Definition at line 492 of file stereo_matching.h.

void pcl::AdaptiveCostSOStereoMatching::setSmoothWeak ( int  smoothness_weak)
inline

"weak" smoothness penalty used within 2-pass Scanline Optimization

Parameters
[in]smoothness_weak"weak" smoothness penalty cost

Definition at line 483 of file stereo_matching.h.


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