39 #include <pcl/point_cloud.h>
40 #include <pcl/point_types.h>
76 template <
typename Po
intT>
187 const std::size_t width,
188 const std::size_t height);
204 const std::size_t width,
205 const std::size_t height);
258 #include <pcl/stereo/impl/disparity_map_converter.hpp>
bool is_color_
Is color image is set.
shared_ptr< PointCloud< PointT > > Ptr
void setFocalLength(const float focal_length)
Set focal length.
float getDisparityThresholdMin() const
Get min disparity threshold.
float getFocalLength() const
Get focal length.
bool loadDisparityMap(const std::string &file_name)
Load the disparity map.
void setDisparityMap(const std::vector< float > &disparity_map)
Set the disparity map.
virtual void compute(PointCloud &out_cloud)
Compute the output cloud.
DisparityMapConverter()
DisparityMapConverter constructor.
std::vector< float > getDisparityMap()
Get the disparity map.
float focal_length_
Focal length.
void setDisparityThresholdMax(const float disparity_threshold_max)
Set max disparity threshold.
float getDisparityThresholdMax() const
Get max disparity threshold.
pcl::PointCloud< pcl::RGB >::ConstPtr image_
Color image of the scene.
float getImageCenterX() const
Get x-coordinate of the image center.
virtual ~DisparityMapConverter()
Empty destructor.
PointXYZ translateCoordinates(std::size_t row, std::size_t column, float disparity) const
Translate point from image coordinates and disparity to 3D-coordinates.
void setDisparityThresholdMin(const float disparity_threshold_min)
Set min disparity threshold.
A point structure representing Euclidean xyz coordinates.
Compute point cloud from the disparity map.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
float getBaseline() const
Get baseline.
std::size_t disparity_map_width_
X-size of the disparity map.
float center_x_
X-coordinate of the image center.
void setBaseline(const float baseline)
Set baseline.
float getImageCenterY() const
Get y-coordinate of the image center.
void setImageCenterY(const float center_y)
Set y-coordinate of the image center.
shared_ptr< const PointCloud< PointT > > ConstPtr
void setImage(const pcl::PointCloud< pcl::RGB >::ConstPtr &image)
Set an image, that will be used for coloring of the output cloud.
void setImageCenterX(const float center_x)
Set x-coordinate of the image center.
std::vector< float > disparity_map_
Vector for the disparity map.
float disparity_threshold_min_
Thresholds of the disparity.
float disparity_threshold_max_
std::size_t disparity_map_height_
Y-size of the disparity map.
pcl::PointCloud< RGB >::Ptr getImage()
Get the image, that is used for coloring of the output cloud.
float center_y_
Y-coordinate of the image center.