30 #include <unordered_map>
31 #include <unordered_set>
63 TSDFVoxelGrid(std::unordered_map<std::string, core::Dtype> attr_dtype_map =
67 float voxel_size = 3.0 / 512.0,
68 float sdf_trunc = 0.04,
69 int64_t block_resolution = 16,
70 int64_t block_count = 1000,
81 float depth_scale = 1000.0f,
82 float depth_max = 3.0f);
89 float depth_scale = 1000.0f,
90 float depth_max = 3.0f);
108 std::unordered_map<SurfaceMaskCode, core::Tensor>
RayCast(
113 float depth_scale = 1000.0f,
114 float depth_min = 0.1f,
115 float depth_max = 3.0f,
116 float weight_threshold = 3.0f,
117 int ray_cast_mask = SurfaceMaskCode::DepthMap |
118 SurfaceMaskCode::ColorMap);
126 int estimate_number = -1,
127 float weight_threshold = 3.0f,
128 int surface_mask = SurfaceMaskCode::VertexMap |
129 SurfaceMaskCode::ColorMap);
137 int estimate_vertices = -1,
138 float weight_threshold = 3.0f,
139 int surface_mask = SurfaceMaskCode::VertexMap |
140 SurfaceMaskCode::NormalMap |
141 SurfaceMaskCode::ColorMap);
162 return attr_dtype_map_;
170 return block_hashmap_;
178 int64_t block_resolution_;
180 int64_t block_count_;
182 std::unordered_map<std::string, core::Dtype> attr_dtype_map_;
193 std::pair<core::Tensor, core::Tensor> BufferRadiusNeighbors(
197 std::shared_ptr<core::HashMap> block_hashmap_;
200 std::shared_ptr<core::HashMap> point_hashmap_;
math::float4 color
Definition: LineSetBuffers.cpp:64
The Image class stores image with customizable rows, cols, channels, dtype and device.
Definition: Image.h:48
A point cloud contains a list of 3D points.
Definition: PointCloud.h:95
Definition: TSDFVoxelGrid.h:60
std::shared_ptr< core::HashMap > GetBlockHashMap() const
Definition: TSDFVoxelGrid.h:169
core::Device GetDevice() const
Definition: TSDFVoxelGrid.h:165
~TSDFVoxelGrid()
Definition: TSDFVoxelGrid.h:75
std::shared_ptr< core::HashMap > GetBlockHashMap()
Definition: TSDFVoxelGrid.h:167
SurfaceMaskCode
Definition: TSDFVoxelGrid.h:92
@ RangeMap
Definition: TSDFVoxelGrid.h:98
@ NormalMap
Definition: TSDFVoxelGrid.h:97
@ VertexMap
Definition: TSDFVoxelGrid.h:94
@ DepthMap
Definition: TSDFVoxelGrid.h:95
@ None
Definition: TSDFVoxelGrid.h:93
std::unordered_map< SurfaceMaskCode, core::Tensor > RayCast(const core::Tensor &intrinsics, const core::Tensor &extrinsics, int width, int height, float depth_scale=1000.0f, float depth_min=0.1f, float depth_max=3.0f, float weight_threshold=3.0f, int ray_cast_mask=SurfaceMaskCode::DepthMap|SurfaceMaskCode::ColorMap)
Definition: TSDFVoxelGrid.cpp:212
void Integrate(const Image &depth, const core::Tensor &intrinsics, const core::Tensor &extrinsics, float depth_scale=1000.0f, float depth_max=3.0f)
Depth-only integration.
Definition: TSDFVoxelGrid.cpp:109
int64_t GetBlockCount() const
Definition: TSDFVoxelGrid.h:159
TriangleMesh ExtractSurfaceMesh(int estimate_vertices=-1, float weight_threshold=3.0f, int surface_mask=SurfaceMaskCode::VertexMap|SurfaceMaskCode::NormalMap|SurfaceMaskCode::ColorMap)
Definition: TSDFVoxelGrid.cpp:317
PointCloud ExtractSurfacePoints(int estimate_number=-1, float weight_threshold=3.0f, int surface_mask=SurfaceMaskCode::VertexMap|SurfaceMaskCode::ColorMap)
Definition: TSDFVoxelGrid.cpp:272
int64_t GetBlockResolution() const
Definition: TSDFVoxelGrid.h:157
std::unordered_map< std::string, core::Dtype > GetAttrDtypeMap() const
Definition: TSDFVoxelGrid.h:161
float GetSDFTrunc() const
Definition: TSDFVoxelGrid.h:155
TSDFVoxelGrid(std::unordered_map< std::string, core::Dtype > attr_dtype_map={{"tsdf", core::Float32}, {"weight", core::UInt16}, {"color", core::UInt16}}, float voxel_size=3.0/512.0, float sdf_trunc=0.04, int64_t block_resolution=16, int64_t block_count=1000, const core::Device &device=core::Device("CPU:0"), const core::HashBackendType &backend=core::HashBackendType::Default)
Default Constructor.
Definition: TSDFVoxelGrid.cpp:37
float GetVoxelSize() const
Definition: TSDFVoxelGrid.h:153
TSDFVoxelGrid To(const core::Device &device, bool copy=false) const
Definition: TSDFVoxelGrid.cpp:372
TSDFVoxelGrid Clone() const
Clone TSDFVoxelGrid on the same device.
Definition: TSDFVoxelGrid.h:151
A triangle mesh contains vertices and triangles.
Definition: TriangleMesh.h:106
Definition: ColorMap.h:35
const Dtype UInt16
Definition: Dtype.cpp:68
HashBackendType
Definition: HashMap.h:38
const Dtype Float32
Definition: Dtype.cpp:61
Definition: PinholeCameraIntrinsic.cpp:35