Point Cloud Library (PCL) 1.12.0
Loading...
Searching...
No Matches
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.
 
 ~DigitalElevationMapBuilder ()
 Empty destructor.
 
void setResolution (std::size_t resolution_column, std::size_t resolution_disparity)
 Set resolution of the DEM.
 
std::size_t getColumnResolution () const
 Get column resolution of the DEM.
 
std::size_t getDisparityResolution () const
 Get disparity resolution of the DEM.
 
void setMinPointsInCell (std::size_t min_points_in_cell)
 Set minimum amount of points in a DEM's cell.
 
std::size_t getMinPointsInCell () const
 Get minimum amount of points in a DEM's cell.
 
void compute (pcl::PointCloud< PointDEM > &out_cloud) override
 Compute the Digital Elevation Map.
 
- Public Member Functions inherited from pcl::DisparityMapConverter< PointDEM >
 DisparityMapConverter ()
 DisparityMapConverter constructor.
 
virtual ~DisparityMapConverter ()
 Empty destructor.
 
void setImageCenterX (const float center_x)
 Set x-coordinate of the image center.
 
float getImageCenterX () const
 Get x-coordinate of the image center.
 
void setImageCenterY (const float center_y)
 Set y-coordinate of the image center.
 
float getImageCenterY () const
 Get y-coordinate of the image center.
 
void setFocalLength (const float focal_length)
 Set focal length.
 
float getFocalLength () const
 Get focal length.
 
void setBaseline (const float baseline)
 Set baseline.
 
float getBaseline () const
 Get baseline.
 
void setDisparityThresholdMin (const float disparity_threshold_min)
 Set min disparity threshold.
 
float getDisparityThresholdMin () const
 Get min disparity threshold.
 
void setDisparityThresholdMax (const float disparity_threshold_max)
 Set max disparity threshold.
 
float getDisparityThresholdMax () const
 Get max disparity threshold.
 
void setImage (const pcl::PointCloud< pcl::RGB >::ConstPtr &image)
 Set an image, that will be used for coloring of the output cloud.
 
pcl::PointCloud< RGB >::Ptr getImage ()
 Get the image, that is used for coloring of the output cloud.
 
bool loadDisparityMap (const std::string &file_name)
 Load the disparity map.
 
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.
 
void setDisparityMap (const std::vector< float > &disparity_map)
 Set the disparity map.
 
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.
 
std::vector< floatgetDisparityMap ()
 Get the disparity map.
 
virtual void compute (PointCloud &out_cloud)
 Compute the output cloud.
 

Protected Attributes

std::size_t resolution_column_
 Column resolution of the DEM.
 
std::size_t resolution_disparity_
 disparity resolution of the DEM.
 
std::size_t min_points_in_cell_
 Minimum amount of points in a DEM's cell.
 
- Protected Attributes inherited from pcl::DisparityMapConverter< PointDEM >
float center_x_
 X-coordinate of the image center.
 
float center_y_
 Y-coordinate of the image center.
 
float focal_length_
 Focal length.
 
float baseline_
 Baseline.
 
bool is_color_
 Is color image is set.
 
pcl::PointCloud< pcl::RGB >::ConstPtr image_
 Color image of the scene.
 
std::vector< floatdisparity_map_
 Vector for the disparity map.
 
std::size_t disparity_map_width_
 X-size of the disparity map.
 
std::size_t disparity_map_height_
 Y-size of the disparity map.
 
float disparity_threshold_min_
 Thresholds of the disparity.
 
float disparity_threshold_max_
 

Additional Inherited Members

- Protected Types inherited from pcl::DisparityMapConverter< PointDEM >
using PointCloud
 
- 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.
 

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.setDisparityThresholdMin (15.0f);
demb.setDisparityThresholdMax (80.0f);
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);
Iterator class for point clouds with or without given indices.
Build a Digital Elevation Map in the column-disparity space from a disparity map and a color image of...
shared_ptr< PointCloud< PointT > > Ptr
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 ( )

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_
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_
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_
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: