pcl::gpu::KinfuTracker Class Reference

KinfuTracker class encapsulates implementation of Microsoft Kinect Fusion algorithm. More...

`#include </build/pcl-gWGA5r/pcl-1.10.0+dfsg/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)
| 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...

## 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

## DepthMap

using pcl::gpu::KinfuTracker::DepthMap = DeviceArray2D<unsigned short>

Definition at line 73 of file kinfu.h.

## NormalType

using pcl::gpu::KinfuTracker::NormalType = pcl::Normal

Definition at line 76 of file kinfu.h.

## PixelRGB

using pcl::gpu::KinfuTracker::PixelRGB = pcl::gpu::PixelRGB

Pixel type for rendered image.

Definition at line 70 of file kinfu.h.

## PointType

using pcl::gpu::KinfuTracker::PointType = pcl::PointXYZ

Definition at line 75 of file kinfu.h.

## View

using pcl::gpu::KinfuTracker::View = DeviceArray2D<PixelRGB>

Definition at line 72 of file kinfu.h.

## Constructor & Destructor Documentation

## KinfuTracker()

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

Constructor.

Parameters

  [in] | rows | height of depth image
  [in] | cols | width 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] | time | Index 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
| ) |  |

Get Depth camera intrinsics.

Parameters

  [out] | fx | focal length x
  [out] | fy | focal length y
  [out] | cx | principal point x
  [out] | cy | principal point y

## getImage()

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

Renders 3D scene to display to human.

Parameters

  [out] | view | output array with image

## getLastFrameCloud()

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

Returns point cloud abserved from last camera pose.

Parameters

  [out] | cloud | output array for points

## getLastFrameNormals()

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

Returns point cloud abserved from last camera pose.

Parameters

  [out] | normals | output 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_weight | max 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] | depth | next depth frame with values in millimeters
  [in] | colors | next 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] | depth | next 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 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] | threshold | a 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] | fx | focal length x
  [in] | fy | focal length y
  [in] | cx | principal point x
  [in] | cy | principal 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_distance | Maximal 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] | distThreshold | distance.
  [in] | sineOfAngle | sine 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] | pose | Initial 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:

- /build/pcl-gWGA5r/pcl-1.10.0+dfsg/gpu/kinfu/include/pcl/gpu/kinfu/kinfu.h