Open3D (C++ API)
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 integration {
36 
37 enum class TSDFVolumeColorType {
38  None = 0,
39  RGB8 = 1,
40  Gray32 = 2,
41 };
42 
50 class TSDFVolume {
51 public:
52  TSDFVolume(double voxel_length,
53  double sdf_trunc,
54  TSDFVolumeColorType color_type)
55  : voxel_length_(voxel_length),
56  sdf_trunc_(sdf_trunc),
57  color_type_(color_type) {}
58  virtual ~TSDFVolume() {}
59 
60 public:
62  virtual void Reset() = 0;
63 
65  virtual void Integrate(const geometry::RGBDImage &image,
66  const camera::PinholeCameraIntrinsic &intrinsic,
67  const Eigen::Matrix4d &extrinsic) = 0;
68 
70  virtual std::shared_ptr<geometry::PointCloud> ExtractPointCloud() = 0;
71 
74  virtual std::shared_ptr<geometry::TriangleMesh> ExtractTriangleMesh() = 0;
75 
76 public:
77  double voxel_length_;
78  double sdf_trunc_;
80 };
81 
82 } // namespace integration
83 } // namespace open3d
double voxel_length_
Definition: TSDFVolume.h:77
TSDFVolumeColorType
Definition: TSDFVolume.h:37
double sdf_trunc_
Definition: TSDFVolume.h:78
Definition: PinholeCameraIntrinsic.h:42
Definition: TSDFVolume.h:50
TSDFVolumeColorType color_type_
Definition: TSDFVolume.h:79
Definition: RGBDImage.h:38
Definition: PinholeCameraIntrinsic.cpp:34
TSDFVolume(double voxel_length, double sdf_trunc, TSDFVolumeColorType color_type)
Definition: TSDFVolume.h:52
virtual ~TSDFVolume()
Definition: TSDFVolume.h:58