|
Point Cloud Library (PCL)
1.15.1-dev
|
KinfuTracker class encapsulates implementation of Microsoft Kinect Fusion algorithm. More...
#include </__w/1/s/gpu/kinfu/include/pcl/gpu/kinfu/kinfu.h>
Public Types | |
| using | PixelRGB = pcl::gpu::PixelRGB |
| Pixel type for rendered image. More... | |
| using | View = DeviceArray2D< PixelRGB > |
| using | DepthMap = DeviceArray2D< unsigned short > |
| using | PointType = pcl::PointXYZ |
| using | NormalType = pcl::Normal |
Public Member Functions | |
| KinfuTracker (int rows=480, int cols=640) | |
| Constructor. More... | |
| void | setDepthIntrinsics (float fx, float fy, float cx=-1, float cy=-1) |
| Sets Depth camera intrinsics. More... | |
| void | getDepthIntrinsics (float &fx, float &fy, float &cx, float &cy) const |
| Get Depth camera intrinsics. More... | |
| void | setInitalCameraPose (const Eigen::Affine3f &pose) |
| Sets initial camera pose relative to volume coordinate space. More... | |
| void | setDepthTruncationForICP (float max_icp_distance=0.f) |
| Sets truncation threshold for depth image for ICP step only! This helps to filter measurements that are outside tsdf volume. More... | |
| void | setIcpCorespFilteringParams (float distThreshold, float sineOfAngle) |
| Sets ICP filtering parameters. More... | |
| void | setCameraMovementThreshold (float threshold=0.001f) |
| Sets integration threshold. More... | |
| void | initColorIntegration (int max_weight=-1) |
| Performs initialization for color integration. More... | |
| int | cols () |
| Returns cols passed to ctor. More... | |
| int | rows () |
| Returns rows passed to ctor. More... | |
| bool | operator() (const DepthMap &depth, Eigen::Affine3f *hint=nullptr) |
| Processes next frame. More... | |
| bool | operator() (const DepthMap &depth, const View &colors) |
| Processes next frame (both depth and color integration). More... | |
| Eigen::Affine3f | getCameraPose (int time=-1) const |
| Returns camera pose at given time, default the last pose. More... | |
| std::size_t | getNumberOfPoses () const |
| Returns number of poses including initial. More... | |
| const TsdfVolume & | volume () const |
| Returns TSDF volume storage. More... | |
| TsdfVolume & | volume () |
| Returns TSDF volume storage. More... | |
| const ColorVolume & | colorVolume () const |
| Returns color volume storage. More... | |
| ColorVolume & | colorVolume () |
| Returns color volume storage. More... | |
| void | getImage (View &view) const |
| Renders 3D scene to display to human. More... | |
| void | getLastFrameCloud (DeviceArray2D< PointType > &cloud) const |
| Returns point cloud abserved from last camera pose. More... | |
| void | getLastFrameNormals (DeviceArray2D< NormalType > &normals) const |
| Returns point cloud abserved from last camera pose. More... | |
| void | disableIcp () |
| Disables ICP forever. More... | |
KinfuTracker class encapsulates implementation of Microsoft Kinect Fusion algorithm.
| using pcl::gpu::KinfuTracker::DepthMap = DeviceArray2D<unsigned short> |
| pcl::gpu::KinfuTracker::KinfuTracker | ( | int | rows = 480, |
| int | cols = 640 |
||
| ) |
Constructor.
| [in] | rows | height of depth image |
| [in] | cols | width of depth image |
| ColorVolume& pcl::gpu::KinfuTracker::colorVolume | ( | ) |
Returns color volume storage.
| const ColorVolume& pcl::gpu::KinfuTracker::colorVolume | ( | ) | const |
Returns color volume storage.
| int pcl::gpu::KinfuTracker::cols | ( | ) |
Returns cols passed to ctor.
| void pcl::gpu::KinfuTracker::disableIcp | ( | ) |
Disables ICP forever.
| Eigen::Affine3f pcl::gpu::KinfuTracker::getCameraPose | ( | int | time = -1 | ) | const |
Returns camera pose at given time, default the last pose.
| [in] | time | Index of frame for which camera pose is returned. |
| void pcl::gpu::KinfuTracker::getDepthIntrinsics | ( | float & | fx, |
| float & | fy, | ||
| float & | cx, | ||
| float & | cy | ||
| ) | const |
Get Depth camera intrinsics.
| [out] | fx | focal length x |
| [out] | fy | focal length y |
| [out] | cx | principal point x |
| [out] | cy | principal point y |
| void pcl::gpu::KinfuTracker::getImage | ( | View & | view | ) | const |
Renders 3D scene to display to human.
| [out] | view | output array with image |
| void pcl::gpu::KinfuTracker::getLastFrameCloud | ( | DeviceArray2D< PointType > & | cloud | ) | const |
Returns point cloud abserved from last camera pose.
| [out] | cloud | output array for points |
| void pcl::gpu::KinfuTracker::getLastFrameNormals | ( | DeviceArray2D< NormalType > & | normals | ) | const |
Returns point cloud abserved from last camera pose.
| [out] | normals | output array for normals |
| std::size_t pcl::gpu::KinfuTracker::getNumberOfPoses | ( | ) | const |
Returns number of poses including initial.
| void pcl::gpu::KinfuTracker::initColorIntegration | ( | int | max_weight = -1 | ) |
Performs initialization for color integration.
Must be called before calling color integration.
| [in] | max_weight | max weighe for color integration. -1 means default weight. |
Processes next frame (both depth and color integration).
Please call initColorIntegration before invpoking this.
| [in] | depth | next depth frame with values in millimeters |
| [in] | colors | next RGB frame |
| bool pcl::gpu::KinfuTracker::operator() | ( | const DepthMap & | depth, |
| Eigen::Affine3f * | hint = nullptr |
||
| ) |
Processes next frame.
| [in] | depth | next frame with values in millimeters |
| hint |
| int pcl::gpu::KinfuTracker::rows | ( | ) |
Returns rows passed to ctor.
| void pcl::gpu::KinfuTracker::setCameraMovementThreshold | ( | float | threshold = 0.001f | ) |
Sets integration threshold.
TSDF volume is integrated iff a camera movement metric exceeds the threshold value. The metric represents the following: M = (rodrigues(Rotation).norm() + alpha*translation.norm())/2, where alpha = 1.f (hardcoded constant)
| [in] | threshold | a value to compare with the metric. Suitable values are ~0.001 |
| void pcl::gpu::KinfuTracker::setDepthIntrinsics | ( | float | fx, |
| float | fy, | ||
| float | cx = -1, |
||
| float | cy = -1 |
||
| ) |
Sets Depth camera intrinsics.
| [in] | fx | focal length x |
| [in] | fy | focal length y |
| [in] | cx | principal point x |
| [in] | cy | principal point y |
| void pcl::gpu::KinfuTracker::setDepthTruncationForICP | ( | float | max_icp_distance = 0.f | ) |
Sets truncation threshold for depth image for ICP step only! This helps to filter measurements that are outside tsdf volume.
Pass zero to disable the truncation.
| [in] | max_icp_distance | Maximal distance, higher values are reset to zero (means no measurement). |
| void pcl::gpu::KinfuTracker::setIcpCorespFilteringParams | ( | float | distThreshold, |
| float | sineOfAngle | ||
| ) |
Sets ICP filtering parameters.
| [in] | distThreshold | distance. |
| [in] | sineOfAngle | sine of angle between normals. |
| void pcl::gpu::KinfuTracker::setInitalCameraPose | ( | const Eigen::Affine3f & | pose | ) |
Sets initial camera pose relative to volume coordinate space.
| [in] | pose | Initial camera pose |
| TsdfVolume& pcl::gpu::KinfuTracker::volume | ( | ) |
Returns TSDF volume storage.
| const TsdfVolume& pcl::gpu::KinfuTracker::volume | ( | ) | const |
Returns TSDF volume storage.