Open3D (C++ API)  0.11.0
TSDFVolume.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // The MIT License (MIT)
5 //
6 // Copyright (c) 2018 www.open3d.org
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 // IN THE SOFTWARE.
25 // ----------------------------------------------------------------------------
26 
27 #pragma once
28 
33 
34 namespace open3d {
35 namespace pipelines {
36 namespace integration {
37 
41 enum class TSDFVolumeColorType {
43  NoColor = 0,
45  RGB8 = 1,
47  Gray32 = 2,
48 };
49 
61 class TSDFVolume {
62 public:
68  TSDFVolume(double voxel_length,
69  double sdf_trunc,
70  TSDFVolumeColorType color_type)
71  : voxel_length_(voxel_length),
72  sdf_trunc_(sdf_trunc),
73  color_type_(color_type) {}
74  virtual ~TSDFVolume() {}
75 
76 public:
78  virtual void Reset() = 0;
79 
81  virtual void Integrate(const geometry::RGBDImage &image,
82  const camera::PinholeCameraIntrinsic &intrinsic,
83  const Eigen::Matrix4d &extrinsic) = 0;
84 
86  virtual std::shared_ptr<geometry::PointCloud> ExtractPointCloud() = 0;
87 
90  virtual std::shared_ptr<geometry::TriangleMesh> ExtractTriangleMesh() = 0;
91 
92 public:
94  double voxel_length_;
96  double sdf_trunc_;
99 };
100 
101 } // namespace integration
102 } // namespace pipelines
103 } // namespace open3d
double voxel_length_
Length of the voxel in meters.
Definition: TSDFVolume.h:94
virtual ~TSDFVolume()
Definition: TSDFVolume.h:74
TSDFVolume(double voxel_length, double sdf_trunc, TSDFVolumeColorType color_type)
Default Constructor.
Definition: TSDFVolume.h:68
Contains the pinhole camera intrinsic parameters.
Definition: PinholeCameraIntrinsic.h:51
TSDFVolumeColorType color_type_
Color type of the TSDF volume.
Definition: TSDFVolume.h:98
double sdf_trunc_
Truncation value for signed distance function (SDF).
Definition: TSDFVolume.h:96
RGBDImage is for a pair of registered color and depth images,.
Definition: RGBDImage.h:46
TSDFVolumeColorType
Definition: TSDFVolume.h:41
Definition: PinholeCameraIntrinsic.cpp:35
Base class of the Truncated Signed Distance Function (TSDF) volume.
Definition: TSDFVolume.h:61