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_;
float GetVoxelSize() const
Definition: TSDFVoxelGrid.h:153
~TSDFVoxelGrid()
Definition: TSDFVoxelGrid.h:75
HashBackendType
Definition: HashMap.h:38
std::unordered_map< std::string, core::Dtype > GetAttrDtypeMap() const
Definition: TSDFVoxelGrid.h:161
int64_t GetBlockResolution() const
Definition: TSDFVoxelGrid.h:157
A triangle mesh contains vertices and triangles.
Definition: TriangleMesh.h:106
SurfaceMaskCode
Definition: TSDFVoxelGrid.h:92
const Dtype Float32
Definition: Dtype.cpp:61
TSDFVoxelGrid Clone() const
Clone TSDFVoxelGrid on the same device.
Definition: TSDFVoxelGrid.h:151
The Image class stores image with customizable rows, cols, channels, dtype and device.
Definition: Image.h:48
math::float4 color
Definition: LineSetBuffers.cpp:64
const Dtype UInt16
Definition: Dtype.cpp:68
core::Device GetDevice() const
Definition: TSDFVoxelGrid.h:165
A point cloud contains a list of 3D points.
Definition: PointCloud.h:95
Definition: TSDFVoxelGrid.h:60
void ExtractSurfacePoints(const core::Tensor &block_indices, const core::Tensor &nb_block_indices, const core::Tensor &nb_block_masks, const core::Tensor &block_keys, const core::Tensor &block_values, core::Tensor &points, utility::optional< std::reference_wrapper< core::Tensor >> normals, utility::optional< std::reference_wrapper< core::Tensor >> colors, int64_t block_resolution, float voxel_size, float weight_threshold, int &valid_size)
Definition: TSDFVoxelGrid.cpp:196
Definition: PinholeCameraIntrinsic.cpp:35
void To(const core::Tensor &src_im, core::Tensor &dst_im, double scale, double offset)
Definition: IPPImage.cpp:46
void RayCast(std::shared_ptr< core::DeviceHashBackend > &hashmap, const core::Tensor &block_values, const core::Tensor &range_map, core::Tensor &vertex_map, core::Tensor &depth_map, core::Tensor &color_map, core::Tensor &normal_map, const core::Tensor &intrinsics, const core::Tensor &extrinsics, int h, int w, int64_t block_resolution, float voxel_size, float sdf_trunc, float depth_scale, float depth_min, float depth_max, float weight_threshold)
Definition: TSDFVoxelGrid.cpp:153
std::shared_ptr< core::HashMap > GetBlockHashMap() const
Definition: TSDFVoxelGrid.h:169
void ExtractSurfaceMesh(const core::Tensor &block_indices, const core::Tensor &inv_block_indices, const core::Tensor &nb_block_indices, const core::Tensor &nb_block_masks, const core::Tensor &block_keys, const core::Tensor &block_values, core::Tensor &vertices, core::Tensor &triangles, utility::optional< std::reference_wrapper< core::Tensor >> vertex_normals, utility::optional< std::reference_wrapper< core::Tensor >> vertex_colors, int64_t block_resolution, float voxel_size, float weight_threshold, int &vertex_count)
Definition: TSDFVoxelGrid.cpp:231
float GetSDFTrunc() const
Definition: TSDFVoxelGrid.h:155
void Integrate(const core::Tensor &depth, const core::Tensor &color, const core::Tensor &block_indices, const core::Tensor &block_keys, core::Tensor &block_values, const core::Tensor &intrinsics, const core::Tensor &extrinsics, int64_t resolution, float voxel_size, float sdf_trunc, float depth_scale, float depth_max)
Definition: TSDFVoxelGrid.cpp:65
Definition: ColorMap.h:35
int64_t GetBlockCount() const
Definition: TSDFVoxelGrid.h:159
std::shared_ptr< core::HashMap > GetBlockHashMap()
Definition: TSDFVoxelGrid.h:167