31 #include <unordered_map> 32 #include <unordered_set> 60 TSDFVoxelGrid(std::unordered_map<std::string, core::Dtype> attr_dtype_map =
64 float voxel_size = 3.0 / 512.0,
65 float sdf_trunc = 0.04,
66 int64_t block_resolution = 16,
67 int64_t block_count = 1000,
78 float depth_scale = 1000.0f,
79 float depth_max = 3.0f);
86 float depth_scale = 1000.0f,
87 float depth_max = 3.0f);
105 std::unordered_map<SurfaceMaskCode, core::Tensor>
RayCast(
110 float depth_scale = 1000.0f,
111 float depth_min = 0.1f,
112 float depth_max = 3.0f,
113 float weight_threshold = 3.0f,
114 int ray_cast_mask = SurfaceMaskCode::DepthMap |
115 SurfaceMaskCode::ColorMap);
123 int estimate_number = -1,
124 float weight_threshold = 3.0f,
125 int surface_mask = SurfaceMaskCode::VertexMap |
126 SurfaceMaskCode::ColorMap);
134 int estimate_vertices = -1,
135 float weight_threshold = 3.0f,
136 int surface_mask = SurfaceMaskCode::VertexMap |
137 SurfaceMaskCode::NormalMap |
138 SurfaceMaskCode::ColorMap);
TSDFVoxelGrid(std::unordered_map< std::string, core::Dtype > attr_dtype_map={{"tsdf", core::Dtype::Float32}, {"weight", core::Dtype::UInt16}, {"color", core::Dtype::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::HashmapBackend &backend=core::HashmapBackend::Default)
Default Constructor.
Definition: TSDFVoxelGrid.cpp:38
TSDFVoxelGrid CUDA(int device_id=0) const
Copy TSDFVoxelGrid to CUDA.
Definition: TSDFVoxelGrid.h:154
std::shared_ptr< core::Hashmap > block_hashmap_
Definition: TSDFVoxelGrid.h:185
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:111
Definition: TSDFVoxelGrid.h:94
~TSDFVoxelGrid()
Definition: TSDFVoxelGrid.h:72
Definition: TSDFVoxelGrid.h:91
TSDFVoxelGrid To(const core::Device &device, bool copy=false) const
Definition: TSDFVoxelGrid.cpp:374
Definition: TSDFVoxelGrid.h:92
HashmapBackend
Definition: Hashmap.h:38
A TriangleMesh contains vertices and triangles.
Definition: TriangleMesh.h:106
SurfaceMaskCode
Definition: TSDFVoxelGrid.h:89
PointCloud ExtractSurfacePoints(int estimate_number=-1, float weight_threshold=3.0f, int surface_mask=SurfaceMaskCode::VertexMap|SurfaceMaskCode::ColorMap)
Definition: TSDFVoxelGrid.cpp:274
TSDFVoxelGrid Clone() const
Clone TSDFVoxelGrid on the same device.
Definition: TSDFVoxelGrid.h:148
core::Device device_
Definition: TSDFVoxelGrid.h:182
std::unordered_map< std::string, core::Dtype > attr_dtype_map_
Definition: TSDFVoxelGrid.h:191
Definition: TSDFVoxelGrid.h:90
Definition: TSDFVoxelGrid.h:95
core::Tensor active_block_coords_
Definition: TSDFVoxelGrid.h:189
The Image class stores image with customizable rows, cols, channels, dtype and device.
Definition: Image.h:48
math::float4 color
Definition: LineSetBuffers.cpp:64
TSDFVoxelGrid CPU() const
Copy TSDFVoxelGrid to CPU.
Definition: TSDFVoxelGrid.h:151
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:213
float sdf_trunc_
Definition: TSDFVoxelGrid.h:177
TriangleMesh ExtractSurfaceMesh(int estimate_vertices=-1, float weight_threshold=3.0f, int surface_mask=SurfaceMaskCode::VertexMap|SurfaceMaskCode::NormalMap|SurfaceMaskCode::ColorMap)
Definition: TSDFVoxelGrid.cpp:319
core::Device GetDevice() const
Definition: TSDFVoxelGrid.h:159
A pointcloud contains a set of 3D points.
Definition: PointCloud.h:95
std::pair< core::Tensor, core::Tensor > BufferRadiusNeighbors(const core::Tensor &active_addrs)
Definition: TSDFVoxelGrid.cpp:387
Definition: TSDFVoxelGrid.h:57
static const Dtype UInt16
Definition: Dtype.h:49
static const Dtype Float32
Definition: Dtype.h:42
std::shared_ptr< core::Hashmap > point_hashmap_
Definition: TSDFVoxelGrid.h:188
int64_t block_resolution_
Definition: TSDFVoxelGrid.h:179
Definition: PinholeCameraIntrinsic.cpp:35
int64_t block_count_
Definition: TSDFVoxelGrid.h:180
int height
Definition: FilePCD.cpp:72
float voxel_size_
Definition: TSDFVoxelGrid.h:176
Definition: ColorMap.h:35
std::shared_ptr< core::Hashmap > GetBlockHashmap()
Definition: TSDFVoxelGrid.h:161
int width
Definition: FilePCD.cpp:71