Point Cloud Library (PCL)
1.14.1-dev
|
Compute point cloud from the disparity map. More...
#include <pcl/stereo/disparity_map_converter.h>
Public Member Functions | |
DisparityMapConverter () | |
DisparityMapConverter constructor. More... | |
virtual | ~DisparityMapConverter () |
Empty destructor. More... | |
void | setImageCenterX (const float center_x) |
Set x-coordinate of the image center. More... | |
float | getImageCenterX () const |
Get x-coordinate of the image center. More... | |
void | setImageCenterY (const float center_y) |
Set y-coordinate of the image center. More... | |
float | getImageCenterY () const |
Get y-coordinate of the image center. More... | |
void | setFocalLength (const float focal_length) |
Set focal length. More... | |
float | getFocalLength () const |
Get focal length. More... | |
void | setBaseline (const float baseline) |
Set baseline. More... | |
float | getBaseline () const |
Get baseline. More... | |
void | setDisparityThresholdMin (const float disparity_threshold_min) |
Set min disparity threshold. More... | |
float | getDisparityThresholdMin () const |
Get min disparity threshold. More... | |
void | setDisparityThresholdMax (const float disparity_threshold_max) |
Set max disparity threshold. More... | |
float | getDisparityThresholdMax () const |
Get max disparity threshold. More... | |
void | setImage (const pcl::PointCloud< pcl::RGB >::ConstPtr &image) |
Set an image, that will be used for coloring of the output cloud. More... | |
pcl::PointCloud< RGB >::Ptr | getImage () |
Get the image, that is used for coloring of the output cloud. More... | |
bool | loadDisparityMap (const std::string &file_name) |
Load the disparity map. More... | |
bool | loadDisparityMap (const std::string &file_name, const std::size_t width, const std::size_t height) |
Load the disparity map and initialize it's size. More... | |
void | setDisparityMap (const std::vector< float > &disparity_map) |
Set the disparity map. More... | |
void | setDisparityMap (const std::vector< float > &disparity_map, const std::size_t width, const std::size_t height) |
Set the disparity map and initialize it's size. More... | |
std::vector< float > | getDisparityMap () |
Get the disparity map. More... | |
virtual void | compute (PointCloud &out_cloud) |
Compute the output cloud. More... | |
Protected Types | |
using | PointCloud = pcl::PointCloud< PointT > |
Protected Member Functions | |
PointXYZ | translateCoordinates (std::size_t row, std::size_t column, float disparity) const |
Translate point from image coordinates and disparity to 3D-coordinates. More... | |
Protected Attributes | |
float | center_x_ {0.0f} |
X-coordinate of the image center. More... | |
float | center_y_ {0.0f} |
Y-coordinate of the image center. More... | |
float | focal_length_ {0.0f} |
Focal length. More... | |
float | baseline_ {0.0f} |
Baseline. More... | |
bool | is_color_ {false} |
Is color image is set. More... | |
pcl::PointCloud< pcl::RGB >::ConstPtr | image_ |
Color image of the scene. More... | |
std::vector< float > | disparity_map_ |
Vector for the disparity map. More... | |
std::size_t | disparity_map_width_ {640} |
X-size of the disparity map. More... | |
std::size_t | disparity_map_height_ {480} |
Y-size of the disparity map. More... | |
float | disparity_threshold_min_ {0.0f} |
Thresholds of the disparity. More... | |
float | disparity_threshold_max_ |
Compute point cloud from the disparity map.
Example of usage:
Definition at line 77 of file disparity_map_converter.h.
|
protected |
Definition at line 79 of file disparity_map_converter.h.
pcl::DisparityMapConverter< PointT >::DisparityMapConverter |
DisparityMapConverter constructor.
Definition at line 49 of file disparity_map_converter.hpp.
|
virtualdefault |
Empty destructor.
|
virtual |
Compute the output cloud.
[out] | out_cloud | the variable to return the resulting cloud. |
Definition at line 238 of file disparity_map_converter.hpp.
References pcl::PointCloud< PointT >::clear(), pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::resize(), pcl::common::IntensityFieldAccessor< PointT >::set(), and pcl::PointCloud< PointT >::width.
|
inline |
std::vector< float > pcl::DisparityMapConverter< PointT >::getDisparityMap |
Get the disparity map.
Definition at line 231 of file disparity_map_converter.hpp.
|
inline |
Get max disparity threshold.
Definition at line 137 of file disparity_map_converter.hpp.
|
inline |
Get min disparity threshold.
Definition at line 122 of file disparity_map_converter.hpp.
|
inline |
Get focal length.
Definition at line 93 of file disparity_map_converter.hpp.
pcl::PointCloud< pcl::RGB >::Ptr pcl::DisparityMapConverter< PointT >::getImage |
Get the image, that is used for coloring of the output cloud.
Definition at line 158 of file disparity_map_converter.hpp.
|
inline |
Get x-coordinate of the image center.
Definition at line 65 of file disparity_map_converter.hpp.
|
inline |
Get y-coordinate of the image center.
Definition at line 79 of file disparity_map_converter.hpp.
bool pcl::DisparityMapConverter< PointT >::loadDisparityMap | ( | const std::string & | file_name | ) |
Load the disparity map.
[in] | file_name | the name of the disparity map file. |
Definition at line 167 of file disparity_map_converter.hpp.
bool pcl::DisparityMapConverter< PointT >::loadDisparityMap | ( | const std::string & | file_name, |
const std::size_t | width, | ||
const std::size_t | height | ||
) |
Load the disparity map and initialize it's size.
[in] | file_name | the name of the disparity map file. |
[in] | width | width of the disparity map. |
[in] | height | height of the disparity map. |
Definition at line 196 of file disparity_map_converter.hpp.
|
inline |
Set baseline.
[in] | baseline | baseline. |
Definition at line 100 of file disparity_map_converter.hpp.
void pcl::DisparityMapConverter< PointT >::setDisparityMap | ( | const std::vector< float > & | disparity_map | ) |
Set the disparity map.
[in] | disparity_map | the disparity map. |
Definition at line 210 of file disparity_map_converter.hpp.
void pcl::DisparityMapConverter< PointT >::setDisparityMap | ( | const std::vector< float > & | disparity_map, |
const std::size_t | width, | ||
const std::size_t | height | ||
) |
Set the disparity map and initialize it's size.
[in] | disparity_map | the disparity map. |
[in] | width | width of the disparity map. |
[in] | height | height of the disparity map. |
Definition at line 218 of file disparity_map_converter.hpp.
|
inline |
Set max disparity threshold.
[in] | disparity_threshold_max | max disparity threshold. |
Definition at line 129 of file disparity_map_converter.hpp.
|
inline |
Set min disparity threshold.
[in] | disparity_threshold_min | min disparity threshold. |
Definition at line 114 of file disparity_map_converter.hpp.
|
inline |
Set focal length.
[in] | focal_length | the focal length. |
Definition at line 86 of file disparity_map_converter.hpp.
void pcl::DisparityMapConverter< PointT >::setImage | ( | const pcl::PointCloud< pcl::RGB >::ConstPtr & | image | ) |
Set an image, that will be used for coloring of the output cloud.
[in] | image | the image. |
Definition at line 144 of file disparity_map_converter.hpp.
|
inline |
Set x-coordinate of the image center.
[in] | center_x | x-coordinate of the image center. |
Definition at line 58 of file disparity_map_converter.hpp.
|
inline |
Set y-coordinate of the image center.
[in] | center_y | y-coordinate of the image center. |
Definition at line 72 of file disparity_map_converter.hpp.
|
protected |
Translate point from image coordinates and disparity to 3D-coordinates.
[in] | row | |
[in] | column | |
[in] | disparity |
Definition at line 295 of file disparity_map_converter.hpp.
|
protected |
Baseline.
Definition at line 237 of file disparity_map_converter.h.
|
protected |
X-coordinate of the image center.
Definition at line 231 of file disparity_map_converter.h.
|
protected |
Y-coordinate of the image center.
Definition at line 233 of file disparity_map_converter.h.
|
protected |
Vector for the disparity map.
Definition at line 245 of file disparity_map_converter.h.
|
protected |
Y-size of the disparity map.
Definition at line 249 of file disparity_map_converter.h.
|
protected |
X-size of the disparity map.
Definition at line 247 of file disparity_map_converter.h.
|
protected |
Definition at line 253 of file disparity_map_converter.h.
|
protected |
Thresholds of the disparity.
Definition at line 252 of file disparity_map_converter.h.
|
protected |
Focal length.
Definition at line 235 of file disparity_map_converter.h.
|
protected |
Color image of the scene.
Definition at line 242 of file disparity_map_converter.h.
|
protected |
Is color image is set.
Definition at line 240 of file disparity_map_converter.h.