|
Point Cloud Library (PCL) 1.15.1
|
#include </build/pcl-uIWyNl/pcl-1.15.1+dfsg/gpu/kinfu/tools/tsdf_volume.h>
Classes | |
| struct | Header |
| Structure storing voxel grid resolution, volume size (in mm) and element_size of stored data. More... | |
| struct | Intr |
| Camera intrinsics structure. More... | |
Public Types | |
| using | Ptr = shared_ptr<TSDFVolume<VoxelT, WeightT> > |
| using | ConstPtr = shared_ptr<const TSDFVolume<VoxelT, WeightT> > |
| using | VoxelTVec = Eigen::VectorXf |
Public Member Functions | |
| TSDFVolume () | |
| Default constructor. | |
| TSDFVolume (const std::string &filename) | |
| Constructor loading data from file. | |
| void | setHeader (const Eigen::Vector3i &resolution, const Eigen::Vector3f &volume_size) |
| Set the header directly. | |
| void | resize (Eigen::Vector3i &grid_resolution, const Eigen::Vector3f &volume_size=Eigen::Vector3f(DEFAULT_VOLUME_SIZE_X, DEFAULT_VOLUME_SIZE_Y, DEFAULT_VOLUME_SIZE_Z)) |
| Resizes the internal storage and updates the header accordingly. | |
| void | resizeDefaultSize () |
| Resize internal storage and header to default sizes defined in tsdf_volume.h. | |
| bool | load (const std::string &filename, bool binary=true) |
| Loads volume from file. | |
| bool | save (const std::string &filename="tsdf_volume.dat", bool binary=true) const |
| Saves volume to file. | |
| std::size_t | size () const |
| Returns overall number of voxels in grid. | |
| const Eigen::Vector3f & | volumeSize () const |
| Returns the volume size in mm. | |
| Eigen::Vector3f | voxelSize () const |
| Returns the size of one voxel in mm. | |
| const Eigen::Vector3i & | gridResolution () const |
| Returns the voxel grid resolution. | |
| const Header & | header () const |
| Returns constant reference to header. | |
| const std::vector< VoxelT > & | volume () const |
| Returns constant reference to the volume std::vector. | |
| std::vector< VoxelT > & | volumeWriteable () const |
| Returns writebale(!) reference to volume. | |
| const std::vector< WeightT > & | weights () const |
| Returns constant reference to the weights std::vector. | |
| std::vector< WeightT > & | weightsWriteable () const |
| Returns writebale(!) reference to volume. | |
| void | convertToTsdfCloud (pcl::PointCloud< pcl::PointXYZI >::Ptr &cloud, const unsigned step=2) const |
| Converts volume to cloud of TSDF values. | |
| template<typename PointT> | |
| void | getVoxelCoord (const PointT &point, Eigen::Vector3i &voxel_coord) const |
| Converts the volume to a surface representation via a point cloud. | |
| template<typename PointT> | |
| void | getVoxelCoordAndOffset (const PointT &point, Eigen::Vector3i &voxel_coord, Eigen::Vector3f &offset) const |
| Returns the 3D voxel coordinate and point offset wrt. | |
| bool | extractNeighborhood (const Eigen::Vector3i &voxel_coord, int neighborhood_size, VoxelTVec &neighborhood) const |
| extracts voxels in neighborhood of given voxel | |
| bool | addNeighborhood (const Eigen::Vector3i &voxel_coord, int neighborhood_size, const VoxelTVec &neighborhood, WeightT voxel_weight) |
| adds voxel values in local neighborhood | |
| void | averageValues () |
| averages voxel values by the weight value | |
| int | getLinearVoxelIndex (const Eigen::Array3i &indices) const |
| Returns and index for linear access of the volume and weights. | |
| Eigen::VectorXi | getLinearVoxelIndinces (const Eigen::Matrix< int, 3, Eigen::Dynamic > &indices_matrix) const |
| Returns a vector of linear indices for voxel coordinates given in 3xn matrix. | |
Definition at line 58 of file tsdf_volume.h.
| using pcl::TSDFVolume< VoxelT, WeightT >::ConstPtr = shared_ptr<const TSDFVolume<VoxelT, WeightT> > |
Definition at line 63 of file tsdf_volume.h.
| using pcl::TSDFVolume< VoxelT, WeightT >::Ptr = shared_ptr<TSDFVolume<VoxelT, WeightT> > |
Definition at line 62 of file tsdf_volume.h.
| using pcl::TSDFVolume< VoxelT, WeightT >::VoxelTVec = Eigen::VectorXf |
Definition at line 66 of file tsdf_volume.h.
|
inline |
Default constructor.
Definition at line 135 of file tsdf_volume.h.
|
inline |
Constructor loading data from file.
Definition at line 141 of file tsdf_volume.h.
| bool pcl::TSDFVolume< VoxelT, WeightT >::addNeighborhood | ( | const Eigen::Vector3i & | voxel_coord, |
| int | neighborhood_size, | ||
| const VoxelTVec & | neighborhood, | ||
| WeightT | voxel_weight ) |
adds voxel values in local neighborhood
Definition at line 280 of file tsdf_volume.hpp.
References getLinearVoxelIndex(), pcl::console::print_info(), and size().
| void pcl::TSDFVolume< VoxelT, WeightT >::averageValues | ( | ) |
averages voxel values by the weight value
Definition at line 331 of file tsdf_volume.hpp.
| void pcl::TSDFVolume< VoxelT, WeightT >::convertToTsdfCloud | ( | pcl::PointCloud< pcl::PointXYZI >::Ptr & | cloud, |
| const unsigned | step = 2 ) const |
Converts volume to cloud of TSDF values.
| [out] | cloud | - the output point cloud |
| [in] | step | - the decimation step to use |
Definition at line 158 of file tsdf_volume.hpp.
References pcl::PointCloud< PointT >::clear(), pcl::_PointXYZI::intensity, pcl::PointCloud< PointT >::push_back(), and pcl::PointCloud< PointT >::reserve().
| bool pcl::TSDFVolume< VoxelT, WeightT >::extractNeighborhood | ( | const Eigen::Vector3i & | voxel_coord, |
| int | neighborhood_size, | ||
| VoxelTVec & | neighborhood ) const |
extracts voxels in neighborhood of given voxel
Definition at line 226 of file tsdf_volume.hpp.
References getLinearVoxelIndex(), pcl::console::print_info(), and size().
|
inline |
Returns and index for linear access of the volume and weights.
Definition at line 266 of file tsdf_volume.h.
Referenced by addNeighborhood(), and extractNeighborhood().
|
inline |
Returns a vector of linear indices for voxel coordinates given in 3xn matrix.
Definition at line 272 of file tsdf_volume.h.
| void pcl::TSDFVolume< VoxelT, WeightT >::getVoxelCoord | ( | const PointT & | point, |
| Eigen::Vector3i & | voxel_coord ) const |
Converts the volume to a surface representation via a point cloud.
Create Volume from Point Cloud
Returns the 3D voxel coordinate
Definition at line 193 of file tsdf_volume.hpp.
References voxelSize().
| void pcl::TSDFVolume< VoxelT, WeightT >::getVoxelCoordAndOffset | ( | const PointT & | point, |
| Eigen::Vector3i & | coord, | ||
| Eigen::Vector3f & | offset ) const |
Returns the 3D voxel coordinate and point offset wrt.
to the voxel center (in mm)
Definition at line 208 of file tsdf_volume.hpp.
References voxelSize().
|
inline |
Returns the voxel grid resolution.
Definition at line 203 of file tsdf_volume.h.
Referenced by load().
|
inline |
Returns constant reference to header.
Definition at line 207 of file tsdf_volume.h.
| bool pcl::TSDFVolume< VoxelT, WeightT >::load | ( | const std::string & | filename, |
| bool | binary = true ) |
Loads volume from file.
Definition at line 46 of file tsdf_volume.hpp.
References gridResolution(), pcl::console::print_error(), pcl::console::print_info(), pcl::console::print_value(), and size().
Referenced by TSDFVolume().
|
inline |
Resizes the internal storage and updates the header accordingly.
Definition at line 161 of file tsdf_volume.h.
References setHeader().
Referenced by resizeDefaultSize().
|
inline |
Resize internal storage and header to default sizes defined in tsdf_volume.h.
Definition at line 170 of file tsdf_volume.h.
References resize().
| bool pcl::TSDFVolume< VoxelT, WeightT >::save | ( | const std::string & | filename = "tsdf_volume.dat", |
| bool | binary = true ) const |
Saves volume to file.
Definition at line 104 of file tsdf_volume.hpp.
References pcl::console::print_error(), pcl::console::print_info(), pcl::console::print_value(), and size().
|
inline |
Set the header directly.
Useful if directly writing into volume and weights
Definition at line 153 of file tsdf_volume.h.
References pcl::console::print_warn(), and size().
Referenced by resize().
|
inline |
Returns overall number of voxels in grid.
Definition at line 188 of file tsdf_volume.h.
Referenced by addNeighborhood(), extractNeighborhood(), pcl::TSDFVolume< VoxelT, WeightT >::Header::Header(), load(), save(), setHeader(), and TSDFVolume().
|
inline |
Returns constant reference to the volume std::vector.
Definition at line 211 of file tsdf_volume.h.
|
inline |
Returns the volume size in mm.
Definition at line 192 of file tsdf_volume.h.
|
inline |
Returns writebale(!) reference to volume.
Definition at line 215 of file tsdf_volume.h.
|
inline |
Returns the size of one voxel in mm.
Definition at line 196 of file tsdf_volume.h.
Referenced by getVoxelCoord(), and getVoxelCoordAndOffset().
|
inline |
Returns constant reference to the weights std::vector.
Definition at line 219 of file tsdf_volume.h.
|
inline |
Returns writebale(!) reference to volume.
Definition at line 223 of file tsdf_volume.h.