Point Cloud Library (PCL)  1.9.1-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

typedef pcl::gpu::PixelRGB PixelRGB
 Pixel type for rendered image. More...
 
typedef DeviceArray2D< PixelRGBView
 
typedef DeviceArray2D< unsigned short > DepthMap
 
typedef pcl::PointXYZ PointType
 
typedef pcl::Normal NormalType
 

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)
 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=NULL)
 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...
 
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 66 of file kinfu.h.

Member Typedef Documentation

Definition at line 73 of file kinfu.h.

Definition at line 76 of file kinfu.h.

Pixel type for rendered image.

Definition at line 70 of file kinfu.h.

Definition at line 75 of file kinfu.h.

Definition at line 72 of file kinfu.h.

Constructor & Destructor Documentation

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

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

Returns color volume storage.

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

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.

Parameters
[in]timeIndex of frame for which camera pose is returned.
Returns
camera pose
void pcl::gpu::KinfuTracker::getDepthIntrinsics ( float &  fx,
float &  fy,
float &  cx,
float &  cy 
)

Get Depth camera intrinsics.

Parameters
[out]fxfocal length x
[out]fyfocal length y
[out]cxprincipal point x
[out]cyprincipal point y
void pcl::gpu::KinfuTracker::getImage ( View view) const

Renders 3D scene to display to human.

Parameters
[out]viewoutput array with image
void pcl::gpu::KinfuTracker::getLastFrameCloud ( DeviceArray2D< PointType > &  cloud) const

Returns point cloud abserved from last camera pose.

Parameters
[out]cloudoutput array for points
void pcl::gpu::KinfuTracker::getLastFrameNormals ( DeviceArray2D< NormalType > &  normals) const

Returns point cloud abserved from last camera pose.

Parameters
[out]normalsoutput array for normals
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.

Parameters
[in]max_weightmax weighe for color integration. -1 means default weight.
bool pcl::gpu::KinfuTracker::operator() ( const DepthMap depth,
Eigen::Affine3f *  hint = NULL 
)

Processes next frame.

Parameters
[in]depthnext frame with values in millimeters
hint
Returns
true if can render 3D view.
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.
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 exceedes 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
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
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).
void pcl::gpu::KinfuTracker::setIcpCorespFilteringParams ( float  distThreshold,
float  sineOfAngle 
)

Sets ICP filtering parameters.

Parameters
[in]distThresholddistance.
[in]sineOfAnglesine of angle between normals.
void pcl::gpu::KinfuTracker::setInitalCameraPose ( const Eigen::Affine3f &  pose)

Sets initial camera pose relative to volume coordinate space.

Parameters
[in]poseInitial camera pose
const TsdfVolume& pcl::gpu::KinfuTracker::volume ( ) const

Returns TSDF volume storage.

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

Returns TSDF volume storage.


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