Point Cloud Library (PCL)  1.14.0-dev
List of all members | Public Member Functions | Protected Attributes
pcl::DigitalElevationMapBuilder Class Reference

Build a Digital Elevation Map in the column-disparity space from a disparity map and a color image of the scene. More...

#include <pcl/stereo/digital_elevation_map.h>

+ Inheritance diagram for pcl::DigitalElevationMapBuilder:
+ Collaboration diagram for pcl::DigitalElevationMapBuilder:

Public Member Functions

 DigitalElevationMapBuilder ()
 DigitalElevationMapBuilder constructor. More...
 
 ~DigitalElevationMapBuilder () override
 Empty destructor. More...
 
void setResolution (std::size_t resolution_column, std::size_t resolution_disparity)
 Set resolution of the DEM. More...
 
std::size_t getColumnResolution () const
 Get column resolution of the DEM. More...
 
std::size_t getDisparityResolution () const
 Get disparity resolution of the DEM. More...
 
void setMinPointsInCell (std::size_t min_points_in_cell)
 Set minimum amount of points in a DEM's cell. More...
 
std::size_t getMinPointsInCell () const
 Get minimum amount of points in a DEM's cell. More...
 
void compute (pcl::PointCloud< PointDEM > &out_cloud) override
 Compute the Digital Elevation Map. More...
 
- Public Member Functions inherited from pcl::DisparityMapConverter< PointDEM >
 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 Attributes

std::size_t resolution_column_ {64}
 Column resolution of the DEM. More...
 
std::size_t resolution_disparity_ {32}
 disparity resolution of the DEM. More...
 
std::size_t min_points_in_cell_ {1}
 Minimum amount of points in a DEM's cell. More...
 
- Protected Attributes inherited from pcl::DisparityMapConverter< PointDEM >
float center_x_
 X-coordinate of the image center. More...
 
float center_y_
 Y-coordinate of the image center. More...
 
float focal_length_
 Focal length. More...
 
float baseline_
 Baseline. More...
 
bool is_color_
 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_
 X-size of the disparity map. More...
 
std::size_t disparity_map_height_
 Y-size of the disparity map. More...
 
float disparity_threshold_min_
 Thresholds of the disparity. More...
 
float disparity_threshold_max_
 

Additional Inherited Members

- Protected Types inherited from pcl::DisparityMapConverter< PointDEM >
using PointCloud = pcl::PointCloud< PointDEM >
 
- Protected Member Functions inherited from pcl::DisparityMapConverter< PointDEM >
PointXYZ translateCoordinates (std::size_t row, std::size_t column, float disparity) const
 Translate point from image coordinates and disparity to 3D-coordinates. More...
 

Detailed Description

Build a Digital Elevation Map in the column-disparity space from a disparity map and a color image of the scene.

Example of usage:

// Fill left image cloud.
demb.setBaseline (0.8387445f);
demb.setFocalLength (368.534700f);
demb.setImageCenterX (318.112200f);
demb.setImageCenterY (224.334900f);
demb.setResolution (64, 32);
// Left view of the scene.
demb.loadImage (left_image);
// Disparity map of the scene.
demb.loadDisparityMap ("disparity_map.txt", 640, 480);
demb.compute(*cloud);
Build a Digital Elevation Map in the column-disparity space from a disparity map and a color image of...
void setResolution(std::size_t resolution_column, std::size_t resolution_disparity)
Set resolution of the DEM.
void compute(pcl::PointCloud< PointDEM > &out_cloud) override
Compute the Digital Elevation Map.
void setDisparityThresholdMax(const float disparity_threshold_max)
Set max disparity threshold.
bool loadDisparityMap(const std::string &file_name)
Load the disparity map.
void setImageCenterX(const float center_x)
Set x-coordinate of the image center.
void setDisparityThresholdMin(const float disparity_threshold_min)
Set min disparity threshold.
void setBaseline(const float baseline)
Set baseline.
void setFocalLength(const float focal_length)
Set focal length.
void setImageCenterY(const float center_y)
Set y-coordinate of the image center.
PointCloud represents the base class in PCL for storing collections of 3D points.
Definition: point_cloud.h:173
shared_ptr< PointCloud< PointT > > Ptr
Definition: point_cloud.h:413
Author
Timur Ibadov (ibado.nosp@m.v.ti.nosp@m.mur@g.nosp@m.mail.nosp@m..com)

Definition at line 76 of file digital_elevation_map.h.

Constructor & Destructor Documentation

◆ DigitalElevationMapBuilder()

pcl::DigitalElevationMapBuilder::DigitalElevationMapBuilder ( )

◆ ~DigitalElevationMapBuilder()

pcl::DigitalElevationMapBuilder::~DigitalElevationMapBuilder ( )
override

Empty destructor.

Member Function Documentation

◆ compute()

void pcl::DigitalElevationMapBuilder::compute ( pcl::PointCloud< PointDEM > &  out_cloud)
override

Compute the Digital Elevation Map.

Parameters
[out]out_cloudthe variable to return the resulting cloud.

◆ getColumnResolution()

std::size_t pcl::DigitalElevationMapBuilder::getColumnResolution ( ) const

Get column resolution of the DEM.

Returns
column resolution of the DEM.

◆ getDisparityResolution()

std::size_t pcl::DigitalElevationMapBuilder::getDisparityResolution ( ) const

Get disparity resolution of the DEM.

Returns
disparity resolution of the DEM.

◆ getMinPointsInCell()

std::size_t pcl::DigitalElevationMapBuilder::getMinPointsInCell ( ) const

Get minimum amount of points in a DEM's cell.

Returns
minimum amount of points in a DEM's cell.

◆ setMinPointsInCell()

void pcl::DigitalElevationMapBuilder::setMinPointsInCell ( std::size_t  min_points_in_cell)

Set minimum amount of points in a DEM's cell.

Parameters
[in]min_points_in_cellminimum amount of points in a DEM's cell.

◆ setResolution()

void pcl::DigitalElevationMapBuilder::setResolution ( std::size_t  resolution_column,
std::size_t  resolution_disparity 
)

Set resolution of the DEM.

Parameters
[in]resolution_columnthe column resolution.
[in]resolution_disparitythe disparity resolution.

Member Data Documentation

◆ min_points_in_cell_

std::size_t pcl::DigitalElevationMapBuilder::min_points_in_cell_ {1}
protected

Minimum amount of points in a DEM's cell.

Definition at line 136 of file digital_elevation_map.h.

◆ resolution_column_

std::size_t pcl::DigitalElevationMapBuilder::resolution_column_ {64}
protected

Column resolution of the DEM.

Definition at line 132 of file digital_elevation_map.h.

◆ resolution_disparity_

std::size_t pcl::DigitalElevationMapBuilder::resolution_disparity_ {32}
protected

disparity resolution of the DEM.

Definition at line 134 of file digital_elevation_map.h.


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