![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <ScalableTSDFVolume.h>


Classes | |
| struct | VolumeUnit |
Public Member Functions | |
| ScalableTSDFVolume (double voxel_length, double sdf_trunc, TSDFVolumeColorType color_type, int volume_unit_resolution=16, int depth_sampling_stride=4) | |
| ~ScalableTSDFVolume () override | |
| void | Reset () override |
| Function to reset the TSDFVolume. More... | |
| void | Integrate (const geometry::RGBDImage &image, const camera::PinholeCameraIntrinsic &intrinsic, const Eigen::Matrix4d &extrinsic) override |
| Function to integrate an RGB-D image into the volume. More... | |
| std::shared_ptr< ccPointCloud > | ExtractPointCloud () override |
| Function to extract a point cloud with normals. More... | |
| std::shared_ptr< ccMesh > | ExtractTriangleMesh () override |
| Function to extract a triangle mesh, using the marching cubes algorithm. (https://en.wikipedia.org/wiki/Marching_cubes) More... | |
| std::shared_ptr< ccPointCloud > | ExtractVoxelPointCloud () |
| Debug function to extract the voxel data into a point cloud. More... | |
Public Member Functions inherited from cloudViewer::pipelines::integration::TSDFVolume | |
| TSDFVolume (double voxel_length, double sdf_trunc, TSDFVolumeColorType color_type) | |
| Default Constructor. More... | |
| virtual | ~TSDFVolume () |
Public Attributes | |
| int | volume_unit_resolution_ |
| double | volume_unit_length_ |
| int | depth_sampling_stride_ |
| std::unordered_map< Eigen::Vector3i, VolumeUnit, utility::hash_eigen< Eigen::Vector3i > > | volume_units_ |
Public Attributes inherited from cloudViewer::pipelines::integration::TSDFVolume | |
| double | voxel_length_ |
| Length of the voxel in meters. More... | |
| double | sdf_trunc_ |
| Truncation value for signed distance function (SDF). More... | |
| TSDFVolumeColorType | color_type_ |
| Color type of the TSDF volume. More... | |
The ScalableTSDFVolume implements a more memory efficient data structure for volumetric integration.
This implementation is based on the following repository: https://github.com/qianyizh/ElasticReconstruction/tree/master/Integrate The reference is: Q.-Y. Zhou and V. Koltun Dense Scene Reconstruction with Points of Interest In SIGGRAPH 2013
An observed depth pixel gives two types of information: (a) an approximation of the nearby surface, and (b) empty space from the camera to the surface. They induce two core concepts of volumetric integration: weighted average of a truncated signed distance function (TSDF), and carving. The weighted average of TSDF is great in addressing the Gaussian noise along surface normal and producing a smooth surface output. The carving is great in removing outlier structures like floating noise pixels and bumps along structure edges.
Definition at line 41 of file ScalableTSDFVolume.h.
| cloudViewer::pipelines::integration::ScalableTSDFVolume::ScalableTSDFVolume | ( | double | voxel_length, |
| double | sdf_trunc, | ||
| TSDFVolumeColorType | color_type, | ||
| int | volume_unit_resolution = 16, |
||
| int | depth_sampling_stride = 4 |
||
| ) |
Definition at line 24 of file ScalableTSDFVolume.cpp.
|
override |
Definition at line 34 of file ScalableTSDFVolume.cpp.
|
overridevirtual |
Function to extract a point cloud with normals.
Implements cloudViewer::pipelines::integration::TSDFVolume.
Definition at line 106 of file ScalableTSDFVolume.cpp.
References cloudViewer::pipelines::integration::TSDFVolume::color_type_, fabs(), cloudViewer::pipelines::integration::Gray32, cloudViewer::pipelines::integration::NoColor, cloudViewer::pipelines::integration::RGB8, volume_unit_length_, volume_units_, and cloudViewer::pipelines::integration::TSDFVolume::voxel_length_.
|
overridevirtual |
Function to extract a triangle mesh, using the marching cubes algorithm. (https://en.wikipedia.org/wiki/Marching_cubes)
Implements cloudViewer::pipelines::integration::TSDFVolume.
Definition at line 218 of file ScalableTSDFVolume.cpp.
References abs(), ccPointCloud::addEigenColor(), cloudViewer::PointCloudTpl< T >::addEigenPoint(), cloudViewer::pipelines::integration::TSDFVolume::color_type_, cloudViewer::pipelines::integration::Gray32, ccPointCloud::hasColors(), cloudViewer::pipelines::integration::NoColor, normals, cloudViewer::pipelines::integration::RGB8, ccObject::setEnabled(), ccObject::setLocked(), ccPointCloud::shrinkToFit(), cloudViewer::PointCloudTpl< T >::size(), volume_unit_resolution_, volume_units_, and cloudViewer::pipelines::integration::TSDFVolume::voxel_length_.
| std::shared_ptr< ccPointCloud > cloudViewer::pipelines::integration::ScalableTSDFVolume::ExtractVoxelPointCloud | ( | ) |
Debug function to extract the voxel data into a point cloud.
Definition at line 390 of file ScalableTSDFVolume.cpp.
References volume_units_.
Referenced by cloudViewer::pipelines::integration::pybind_integration_classes().
|
overridevirtual |
Function to integrate an RGB-D image into the volume.
Implements cloudViewer::pipelines::integration::TSDFVolume.
Definition at line 38 of file ScalableTSDFVolume.cpp.
References cloudViewer::pipelines::integration::TSDFVolume::color_type_, cloudViewer::geometry::Image::CreateDepthToCameraDistanceMultiplierFloatImage(), ccPointCloud::CreateFromDepthImage(), depth_sampling_stride_, cloudViewer::pipelines::integration::Gray32, cloudViewer::camera::PinholeCameraIntrinsic::height_, image, LogError, cloudViewer::pipelines::integration::NoColor, cloudViewer::pipelines::integration::RGB8, cloudViewer::pipelines::integration::TSDFVolume::sdf_trunc_, and cloudViewer::camera::PinholeCameraIntrinsic::width_.
|
overridevirtual |
Function to reset the TSDFVolume.
Implements cloudViewer::pipelines::integration::TSDFVolume.
Definition at line 36 of file ScalableTSDFVolume.cpp.
References volume_units_.
| int cloudViewer::pipelines::integration::ScalableTSDFVolume::depth_sampling_stride_ |
Definition at line 73 of file ScalableTSDFVolume.h.
Referenced by Integrate().
| double cloudViewer::pipelines::integration::ScalableTSDFVolume::volume_unit_length_ |
Definition at line 72 of file ScalableTSDFVolume.h.
Referenced by ExtractPointCloud().
| int cloudViewer::pipelines::integration::ScalableTSDFVolume::volume_unit_resolution_ |
Definition at line 71 of file ScalableTSDFVolume.h.
Referenced by ExtractTriangleMesh().
| std::unordered_map<Eigen::Vector3i, VolumeUnit, utility::hash_eigen<Eigen::Vector3i> > cloudViewer::pipelines::integration::ScalableTSDFVolume::volume_units_ |
Assume the index of the volume unit is (x, y, z), then the unit spans from (x, y, z) * volume_unit_length_ to (x + 1, y + 1, z + 1) * volume_unit_length_
Definition at line 81 of file ScalableTSDFVolume.h.
Referenced by ExtractPointCloud(), ExtractTriangleMesh(), ExtractVoxelPointCloud(), and Reset().