Point Cloud Library (PCL)  1.14.0-dev
List of all members | Public Types | Public Member Functions
pcl::gpu::KinfuTracker Class Reference

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 TsdfVolumevolume () const
 Returns TSDF volume storage. More...
 
TsdfVolumevolume ()
 Returns TSDF volume storage. More...
 
const ColorVolumecolorVolume () const
 Returns color volume storage. More...
 
ColorVolumecolorVolume ()
 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...
 

Detailed Description

KinfuTracker class encapsulates implementation of Microsoft Kinect Fusion algorithm.

Author
Anatoly Baskeheev, Itseez Ltd, (mynam.nosp@m.e.my.nosp@m.surna.nosp@m.me@m.nosp@m.ycomp.nosp@m.any..nosp@m.com)

Definition at line 67 of file kinfu.h.

Member Typedef Documentation

◆ DepthMap

Definition at line 74 of file kinfu.h.

◆ NormalType

Definition at line 77 of file kinfu.h.

◆ PixelRGB

Pixel type for rendered image.

Definition at line 71 of file kinfu.h.

◆ PointType

Definition at line 76 of file kinfu.h.

◆ View

Definition at line 73 of file kinfu.h.

Constructor & Destructor Documentation

◆ KinfuTracker()

pcl::gpu::KinfuTracker::KinfuTracker ( int  rows = 480,
int  cols = 640 
)

Constructor.

Parameters
[in]rowsheight of depth image
[in]colswidth of depth image

Member Function Documentation

◆ colorVolume() [1/2]

ColorVolume& pcl::gpu::KinfuTracker::colorVolume ( )

Returns color volume storage.

◆ colorVolume() [2/2]

const ColorVolume& pcl::gpu::KinfuTracker::colorVolume ( ) const

Returns color volume storage.

◆ cols()

int pcl::gpu::KinfuTracker::cols ( )

Returns cols passed to ctor.

◆ disableIcp()

void pcl::gpu::KinfuTracker::disableIcp ( )

Disables ICP forever.

◆ getCameraPose()

Eigen::Affine3f pcl::gpu::KinfuTracker::getCameraPose ( int  time = -1) const

Returns camera pose at given time, default the last pose.

Parameters
[in]timeIndex of frame for which camera pose is returned.
Returns
camera pose

◆ getDepthIntrinsics()

void pcl::gpu::KinfuTracker::getDepthIntrinsics ( float &  fx,
float &  fy,
float &  cx,
float &  cy 
) const

Get Depth camera intrinsics.

Parameters
[out]fxfocal length x
[out]fyfocal length y
[out]cxprincipal point x
[out]cyprincipal point y

◆ getImage()

void pcl::gpu::KinfuTracker::getImage ( View view) const

Renders 3D scene to display to human.

Parameters
[out]viewoutput array with image

◆ getLastFrameCloud()

void pcl::gpu::KinfuTracker::getLastFrameCloud ( DeviceArray2D< PointType > &  cloud) const

Returns point cloud abserved from last camera pose.

Parameters
[out]cloudoutput array for points

◆ getLastFrameNormals()

void pcl::gpu::KinfuTracker::getLastFrameNormals ( DeviceArray2D< NormalType > &  normals) const

Returns point cloud abserved from last camera pose.

Parameters
[out]normalsoutput array for normals

◆ getNumberOfPoses()

std::size_t pcl::gpu::KinfuTracker::getNumberOfPoses ( ) const

Returns number of poses including initial.

◆ initColorIntegration()

void pcl::gpu::KinfuTracker::initColorIntegration ( int  max_weight = -1)

Performs initialization for color integration.

Must be called before calling color integration.

Parameters
[in]max_weightmax weighe for color integration. -1 means default weight.

◆ operator()() [1/2]

bool pcl::gpu::KinfuTracker::operator() ( const DepthMap depth,
const View colors 
)

Processes next frame (both depth and color integration).

Please call initColorIntegration before invpoking this.

Parameters
[in]depthnext depth frame with values in millimeters
[in]colorsnext RGB frame
Returns
true if can render 3D view.

◆ operator()() [2/2]

bool pcl::gpu::KinfuTracker::operator() ( const DepthMap depth,
Eigen::Affine3f *  hint = nullptr 
)

Processes next frame.

Parameters
[in]depthnext frame with values in millimeters
hint
Returns
true if can render 3D view.

◆ rows()

int pcl::gpu::KinfuTracker::rows ( )

Returns rows passed to ctor.

◆ setCameraMovementThreshold()

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)

Parameters
[in]thresholda value to compare with the metric. Suitable values are ~0.001

◆ setDepthIntrinsics()

void pcl::gpu::KinfuTracker::setDepthIntrinsics ( float  fx,
float  fy,
float  cx = -1,
float  cy = -1 
)

Sets Depth camera intrinsics.

Parameters
[in]fxfocal length x
[in]fyfocal length y
[in]cxprincipal point x
[in]cyprincipal point y

◆ setDepthTruncationForICP()

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.

Parameters
[in]max_icp_distanceMaximal distance, higher values are reset to zero (means no measurement).

◆ setIcpCorespFilteringParams()

void pcl::gpu::KinfuTracker::setIcpCorespFilteringParams ( float  distThreshold,
float  sineOfAngle 
)

Sets ICP filtering parameters.

Parameters
[in]distThresholddistance.
[in]sineOfAnglesine of angle between normals.

◆ setInitalCameraPose()

void pcl::gpu::KinfuTracker::setInitalCameraPose ( const Eigen::Affine3f &  pose)

Sets initial camera pose relative to volume coordinate space.

Parameters
[in]poseInitial camera pose

◆ volume() [1/2]

TsdfVolume& pcl::gpu::KinfuTracker::volume ( )

Returns TSDF volume storage.

◆ volume() [2/2]

const TsdfVolume& pcl::gpu::KinfuTracker::volume ( ) const

Returns TSDF volume storage.


The documentation for this class was generated from the following file: