60 const std::vector<core::Dtype> &attr_dtypes,
61 const std::vector<core::SizeVector> &attr_channels,
62 float voxel_size = 0.0058,
63 int64_t block_resolution = 16,
64 int64_t block_count = 10000,
119 std::pair<core::Tensor, core::Tensor>
124 std::pair<core::Tensor, core::Tensor>
134 float depth_scale = 1000.0f,
135 float depth_max = 3.0f,
136 float trunc_voxel_multiplier = 4.0);
140 float trunc_voxel_multiplier = 4.0);
160 float depth_scale = 1000.0f,
161 float depth_max = 3.0f);
169 float depth_scale = 1000.0f,
170 float depth_max = 3.0f);
187 const std::vector<std::string> attrs = {
"depth",
"color"},
188 float depth_scale = 1000.0f,
189 float depth_min = 0.1f,
190 float depth_max = 3.0f,
191 float weight_threshold = 3.0f);
200 float weight_threshold = 3.0f);
209 float weight_threshold = 3.0f);
212 void Save(
const std::string &file_name)
const;
218 void AssertInitialized()
const;
220 float voxel_size_ = -1;
221 int64_t block_resolution_ = -1;
224 std::shared_ptr<core::HashMap> block_hashmap_;
227 std::shared_ptr<core::HashMap> frustum_hashmap_;
230 std::unordered_map<std::string, int> name_attr_map_;
math::float4 color
Definition: LineSetBuffers.cpp:64
A point cloud consists of point coordinates, and optionally point colors and point normals.
Definition: PointCloud.h:55
Triangle mesh contains vertices and triangles represented by the indices to the vertices.
Definition: TriangleMesh.h:54
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: TensorMap.h:49
Definition: VoxelBlockGrid.h:45
static VoxelBlockGrid Load(const std::string &file_name)
Load a voxel block grid from a .npz file.
Definition: VoxelBlockGrid.cpp:533
core::Tensor GetAttribute(const std::string &attr_name) const
Definition: VoxelBlockGrid.cpp:139
TriangleMesh ExtractTriangleMesh(int estimate_number=-1, float weight_threshold=3.0f)
Definition: VoxelBlockGrid.cpp:439
core::Tensor GetVoxelCoordinates(const core::Tensor &voxel_indices) const
Definition: VoxelBlockGrid.cpp:150
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)
Definition: VoxelBlockGrid.cpp:333
void Save(const std::string &file_name) const
Save a voxel block grid to a .npz file.
Definition: VoxelBlockGrid.cpp:478
core::Tensor GetVoxelIndices() const
Get all active voxel indices.
Definition: VoxelBlockGrid.cpp:200
core::HashMap GetHashMap()
Definition: VoxelBlockGrid.h:71
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=4.0)
Definition: VoxelBlockGrid.cpp:232
std::pair< core::Tensor, core::Tensor > GetVoxelCoordinatesAndFlattenedIndices()
Definition: VoxelBlockGrid.cpp:206
PointCloud ExtractPointCloud(int estimate_number=-1, float weight_threshold=3.0f)
Definition: VoxelBlockGrid.cpp:408
void Integrate(const core::Tensor &block_coords, const Image &depth, const Image &color, const core::Tensor &intrinsic, const core::Tensor &extrinsic, float depth_scale=1000.0f, float depth_max=3.0f)
Definition: VoxelBlockGrid.cpp:299
HashBackendType
Definition: HashMap.h:38
Definition: PinholeCameraIntrinsic.cpp:35