Open3D (C++ API)  0.18.0
TSDFVolume.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
14 
15 namespace open3d {
16 namespace pipelines {
17 namespace integration {
18 
22 enum class TSDFVolumeColorType {
24  NoColor = 0,
26  RGB8 = 1,
28  Gray32 = 2,
29 };
30 
42 class TSDFVolume {
43 public:
49  TSDFVolume(double voxel_length,
50  double sdf_trunc,
51  TSDFVolumeColorType color_type)
52  : voxel_length_(voxel_length),
53  sdf_trunc_(sdf_trunc),
54  color_type_(color_type) {}
55  virtual ~TSDFVolume() {}
56 
57 public:
59  virtual void Reset() = 0;
60 
62  virtual void Integrate(const geometry::RGBDImage &image,
63  const camera::PinholeCameraIntrinsic &intrinsic,
64  const Eigen::Matrix4d &extrinsic) = 0;
65 
67  virtual std::shared_ptr<geometry::PointCloud> ExtractPointCloud() = 0;
68 
71  virtual std::shared_ptr<geometry::TriangleMesh> ExtractTriangleMesh() = 0;
72 
73 public:
75  double voxel_length_;
77  double sdf_trunc_;
80 };
81 
82 } // namespace integration
83 } // namespace pipelines
84 } // namespace open3d
std::shared_ptr< core::Tensor > image
Definition: FilamentRenderer.cpp:183
Contains the pinhole camera intrinsic parameters.
Definition: PinholeCameraIntrinsic.h:32
RGBDImage is for a pair of registered color and depth images,.
Definition: RGBDImage.h:27
Base class of the Truncated Signed Distance Function (TSDF) volume.
Definition: TSDFVolume.h:42
virtual void Reset()=0
Function to reset the TSDFVolume.
virtual std::shared_ptr< geometry::TriangleMesh > ExtractTriangleMesh()=0
Function to extract a triangle mesh, using the marching cubes algorithm. (https://en....
virtual std::shared_ptr< geometry::PointCloud > ExtractPointCloud()=0
Function to extract a point cloud with normals.
double sdf_trunc_
Truncation value for signed distance function (SDF).
Definition: TSDFVolume.h:77
virtual ~TSDFVolume()
Definition: TSDFVolume.h:55
TSDFVolumeColorType color_type_
Color type of the TSDF volume.
Definition: TSDFVolume.h:79
virtual void Integrate(const geometry::RGBDImage &image, const camera::PinholeCameraIntrinsic &intrinsic, const Eigen::Matrix4d &extrinsic)=0
Function to integrate an RGB-D image into the volume.
double voxel_length_
Length of the voxel in meters.
Definition: TSDFVolume.h:75
TSDFVolume(double voxel_length, double sdf_trunc, TSDFVolumeColorType color_type)
Default Constructor.
Definition: TSDFVolume.h:49
TSDFVolumeColorType
Definition: TSDFVolume.h:22
Definition: PinholeCameraIntrinsic.cpp:16