41 const std::vector<core::Dtype> &attr_dtypes,
42 const std::vector<core::SizeVector> &attr_channels,
43 float voxel_size = 0.0058,
44 int64_t block_resolution = 16,
45 int64_t block_count = 10000,
100 std::pair<core::Tensor, core::Tensor>
105 std::pair<core::Tensor, core::Tensor>
115 float depth_scale = 1000.0f,
116 float depth_max = 3.0f,
117 float trunc_voxel_multiplier = 8.0);
121 float trunc_voxel_multiplier = 8.0);
142 float depth_scale = 1000.0f,
143 float depth_max = 3.0f,
144 float trunc_voxel_multiplier = 8.0f);
154 float depth_scale = 1000.0f,
155 float depth_max = 3.0f,
156 float trunc_voxel_multiplier = 8.0f);
164 float depth_scale = 1000.0f,
165 float depth_max = 3.0f,
166 float trunc_voxel_multiplier = 8.0f);
183 const std::vector<std::string> attrs = {
"depth",
"color"},
184 float depth_scale = 1000.0f,
185 float depth_min = 0.1f,
186 float depth_max = 3.0f,
187 float weight_threshold = 3.0f,
188 float trunc_voxel_multiplier = 8.0f,
189 int range_map_down_factor = 8);
201 int estimated_point_number = -1);
213 int estimated_vertex_numer = -1);
216 void Save(
const std::string &file_name)
const;
225 void AssertInitialized()
const;
228 int64_t blockResolution,
229 const std::shared_ptr<core::HashMap> &blockHashmap,
230 const std::unordered_map<std::string, int> &nameAttrMap)
231 : voxel_size_(voxelSize),
232 block_resolution_(blockResolution),
233 block_hashmap_(blockHashmap),
234 name_attr_map_(nameAttrMap) {}
236 float voxel_size_ = -1;
237 int64_t block_resolution_ = -1;
240 std::shared_ptr<core::HashMap> block_hashmap_;
243 std::shared_ptr<core::HashMap> frustum_hashmap_;
246 std::unordered_map<std::string, int> name_attr_map_;
math::float4 color
Definition: LineSetBuffers.cpp:45
bool copy
Definition: VtkUtils.cpp:73
A point cloud consists of point coordinates, and optionally point colors and point normals.
Definition: PointCloud.h:36
Triangle mesh contains vertices and triangles represented by the indices to the vertices.
Definition: TriangleMesh.h:35
The Image class stores image with customizable rows, cols, channels, dtype and device.
Definition: Image.h:29
A point cloud contains a list of 3D points.
Definition: PointCloud.h:80
Definition: TensorMap.h:31
Definition: VoxelBlockGrid.h:26
static VoxelBlockGrid Load(const std::string &file_name)
Load a voxel block grid from a .npz file.
Definition: VoxelBlockGrid.cpp:540
PointCloud ExtractPointCloud(float weight_threshold=3.0f, int estimated_point_number=-1)
Definition: VoxelBlockGrid.cpp:404
void Integrate(const core::Tensor &block_coords, const Image &depth, const Image &color, const core::Tensor &depth_intrinsic, const core::Tensor &color_intrinsic, const core::Tensor &extrinsic, float depth_scale=1000.0f, float depth_max=3.0f, float trunc_voxel_multiplier=8.0f)
Definition: VoxelBlockGrid.cpp:292
core::Tensor GetAttribute(const std::string &attr_name) const
Definition: VoxelBlockGrid.cpp:119
VoxelBlockGrid To(const core::Device &device, bool copy=false) const
Convert the hash map to another device.
Definition: VoxelBlockGrid.cpp:529
core::Tensor GetVoxelCoordinates(const core::Tensor &voxel_indices) const
Definition: VoxelBlockGrid.cpp:130
TensorMap RayCast(const core::Tensor &block_coords, const core::Tensor &intrinsic, const core::Tensor &extrinsic, int width, int height, const std::vector< std::string > attrs={"depth", "color"}, float depth_scale=1000.0f, float depth_min=0.1f, float depth_max=3.0f, float weight_threshold=3.0f, float trunc_voxel_multiplier=8.0f, int range_map_down_factor=8)
Definition: VoxelBlockGrid.cpp:328
TriangleMesh ExtractTriangleMesh(float weight_threshold=3.0f, int estimated_vertex_numer=-1)
Definition: VoxelBlockGrid.cpp:436
void Save(const std::string &file_name) const
Save a voxel block grid to a .npz file.
Definition: VoxelBlockGrid.cpp:474
core::Tensor GetVoxelIndices() const
Get all active voxel indices.
Definition: VoxelBlockGrid.cpp:180
core::HashMap GetHashMap()
Definition: VoxelBlockGrid.h:52
std::pair< core::Tensor, core::Tensor > GetVoxelCoordinatesAndFlattenedIndices()
Definition: VoxelBlockGrid.cpp:186
core::Tensor GetUniqueBlockCoordinates(const Image &depth, const core::Tensor &intrinsic, const core::Tensor &extrinsic, float depth_scale=1000.0f, float depth_max=3.0f, float trunc_voxel_multiplier=8.0)
Definition: VoxelBlockGrid.cpp:212
HashBackendType
Definition: HashMap.h:20
Definition: PinholeCameraIntrinsic.cpp:16