KrisLibrary
1.0.0
|
Performs a kinect-fusion-like sparse TSDF reconstruction. A hash grid is used to build multiple TSDFs across an infinite domain. More...
#include <TSDFReconstruction.h>
Public Member Functions | |
SparseTSDFReconstruction (const Vector3 &cellSize, Real truncationDistance=0.1) | |
void | Register (const Meshing::PointCloud3D &pc, const RigidTransform &Tcamera_est, ICPParameters ¶ms) |
Performs registration between the point cloud and the TSDF. More... | |
void | Fuse (const RigidTransform &Tcamera, const Meshing::PointCloud3D &pc, Real weight=1.0) |
Fuses the point cloud (in camera coordinates) into the TSDF. | |
void | ExtractMesh (Meshing::TriMesh &mesh) |
Builds the mesh using the marching cubes algorithm. | |
void | ExtractMesh (Meshing::TriMesh &mesh, GLDraw::GeometryAppearance &app) |
Builds a colored mesh using the marching cubes algorithm. | |
void | ExtractMesh (const AABB3D &roi, Meshing::TriMesh &mesh) |
Extracts the mesh at a region of interest (bounding box) | |
void | ExtractMesh (const AABB3D &roi, Meshing::TriMesh &mesh, GLDraw::GeometryAppearance &app) |
Extracts a colored mesh at a region of interest (bounding box) | |
void | GetColor (const Vector3 &point, float *color) const |
Gets the 3 color channels of a point, if colored. Each of r,g,b is in the range [0,1]. | |
void | ClearPoint (const Vector3 &p, Real dist=0, Real weight=1.0) |
Clears the TSDF at a given point. | |
void | ClearBox (const Vector3 &bmin, const Vector3 &bmax, Real weight=1.0) |
Clears the TSDF in a given box. | |
size_t | MemoryUsage () const |
Estimates memory usage, in bytes. | |
void | StartThreads () |
void | StopThreads () |
Public Attributes | |
Real | truncationDistance |
The max truncation distance (default 0.1) | |
Real | depthStddev0 |
The standard deviation of a depth value is assumed to be depthStddev0 + d*depthStddev1 (defaults 0.005, 0.01) | |
Real | depthStddev1 |
Real | forgettingRate |
The rate at which voxel data is forgotten due to age e^-(forgettingRate*age) (default 0) | |
bool | colored |
If true, the TSDF will be colored (as long as the first point cloud is colored) (default true) | |
std::vector< int > | auxiliaryAttributes |
These indices are added from a PointCloud's attributes to the auxilary volume grid (default empty) | |
int | numThreads |
Number of threads to use (default 1) | |
SparseVolumeGrid | tsdf |
int | depthChannel |
int | weightChannel |
int | ageChannel |
int | rgbChannel |
int | surfaceWeightChannel |
int | auxiliaryChannelStart |
int | scanID |
std::map< int, int > | blockLastTouched |
std::vector< Thread > | threads |
std::vector< void * > | threadData |
Mutex | lock |
Performs a kinect-fusion-like sparse TSDF reconstruction. A hash grid is used to build multiple TSDFs across an infinite domain.
All camera transforms have the convention that z > 0 is forward.
void SparseTSDFReconstruction::Register | ( | const Meshing::PointCloud3D & | pc, |
const RigidTransform & | Tcamera_est, | ||
ICPParameters & | params | ||
) |
Performs registration between the point cloud and the TSDF.
References Math::IsFinite(), Math::IsInf(), ArrayUtils::nth_element(), and Math3D::TransformFit().