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 = 8.0);
140 float trunc_voxel_multiplier = 8.0);
161 float depth_scale = 1000.0f,
162 float depth_max = 3.0f,
163 float trunc_voxel_multiplier = 8.0f);
173 float depth_scale = 1000.0f,
174 float depth_max = 3.0f,
175 float trunc_voxel_multiplier = 8.0f);
183 float depth_scale = 1000.0f,
184 float depth_max = 3.0f,
185 float trunc_voxel_multiplier = 8.0f);
202 const std::vector<std::string> attrs = {
"depth",
"color"},
203 float depth_scale = 1000.0f,
204 float depth_min = 0.1f,
205 float depth_max = 3.0f,
206 float weight_threshold = 3.0f,
207 float trunc_voxel_multiplier = 8.0f,
208 int range_map_down_factor = 8);
220 int estimated_point_number = -1);
232 int estimated_vertex_numer = -1);
235 void Save(
const std::string &file_name)
const;
244 void AssertInitialized()
const;
247 int64_t blockResolution,
248 const std::shared_ptr<core::HashMap> &blockHashmap,
249 const std::unordered_map<std::string, int> &nameAttrMap)
250 : voxel_size_(voxelSize),
251 block_resolution_(blockResolution),
252 block_hashmap_(blockHashmap),
253 name_attr_map_(nameAttrMap) {}
255 float voxel_size_ = -1;
256 int64_t block_resolution_ = -1;
259 std::shared_ptr<core::HashMap> block_hashmap_;
262 std::shared_ptr<core::HashMap> frustum_hashmap_;
265 std::unordered_map<std::string, int> name_attr_map_;
HashBackendType
Definition: HashMap.h:39
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:347
core::HashMap GetHashMap()
Definition: VoxelBlockGrid.h:71
core::Tensor GetVoxelIndices() const
Get all active voxel indices.
Definition: VoxelBlockGrid.cpp:199
core::Tensor GetAttribute(const std::string &attr_name) const
Definition: VoxelBlockGrid.cpp:138
A triangle mesh contains vertices and triangles.
Definition: TriangleMesh.h:111
void Save(const std::string &file_name) const
Save a voxel block grid to a .npz file.
Definition: VoxelBlockGrid.cpp:493
PointCloud ExtractPointCloud(float weight_threshold=3.0f, int estimated_point_number=-1)
Definition: VoxelBlockGrid.cpp:423
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:311
VoxelBlockGrid To(const core::Device &device, bool copy=false) const
Convert the hash map to another device.
Definition: VoxelBlockGrid.cpp:548
static VoxelBlockGrid Load(const std::string &file_name)
Load a voxel block grid from a .npz file.
Definition: VoxelBlockGrid.cpp:559
core::Tensor GetVoxelCoordinates(const core::Tensor &voxel_indices) const
Definition: VoxelBlockGrid.cpp:149
The Image class stores image with customizable rows, cols, channels, dtype and device.
Definition: Image.h:48
math::float4 color
Definition: LineSetBuffers.cpp:64
A point cloud contains a list of 3D points.
Definition: PointCloud.h:99
TriangleMesh ExtractTriangleMesh(float weight_threshold=3.0f, int estimated_vertex_numer=-1)
Definition: VoxelBlockGrid.cpp:455
Definition: PinholeCameraIntrinsic.cpp:35
Definition: VoxelBlockGrid.h:45
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:231
bool copy
Definition: VtkUtils.cpp:89
std::pair< core::Tensor, core::Tensor > GetVoxelCoordinatesAndFlattenedIndices()
Definition: VoxelBlockGrid.cpp:205
Definition: TensorMap.h:50