Loading...
Searching...
No Matches
pcl::gpu::kinfuLS::KinfuTracker Class Reference

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

`#include </build/pcl-k79KrG/pcl-1.15.1+dfsg/gpu/kinfu_large_scale/include/pcl/gpu/kinfu_large_scale/kinfu.h>`

## Public Types

using | PixelRGB = pcl::gpu::kinfuLS::PixelRGB
| Pixel type for rendered image.
using | View = DeviceArray2D<PixelRGB>
using | DepthMap = DeviceArray2D<unsigned short>
using | PointType = pcl::PointXYZ
using | NormalType = pcl::Normal

## Public Member Functions

void | performLastScan ()
bool | isFinished ()
| KinfuTracker (const Eigen::Vector3f &volumeSize, const float shiftingDistance, int rows=480, int cols=640)
| Constructor.
void | setDepthIntrinsics (float fx, float fy, float cx=-1, float cy=-1)
| Sets Depth camera intrinsics.
void | setInitialCameraPose (const Eigen::Affine3f &pose)
| Sets initial camera pose relative to volume coordinate space.
void | setDepthTruncationForICP (float max_icp_distance=0.f)
| Sets truncation threshold for depth image for ICP step only!
void | setIcpCorespFilteringParams (float distThreshold, float sineOfAngle)
| Sets ICP filtering parameters.
void | setCameraMovementThreshold (float threshold=0.001f)
| Sets integration threshold.
void | initColorIntegration (int max_weight=-1)
| Performs initialization for color integration.
int | cols ()
| Returns cols passed to ctor.
int | rows ()
| Returns rows passed to ctor.
bool | operator() (const DepthMap &depth)
| Processes next frame.
bool | operator() (const DepthMap &depth, const View &colors)
| Processes next frame (both depth and color integration).
Eigen::Affine3f | getCameraPose (int time=-1) const
| Returns camera pose at given time, default the last pose.
Eigen::Affine3f | getLastEstimatedPose () const
std::size_t | getNumberOfPoses () const
| Returns number of poses including initial.
const TsdfVolume & | volume () const
| Returns TSDF volume storage.
TsdfVolume & | volume ()
| Returns TSDF volume storage.
const ColorVolume & | colorVolume () const
| Returns color volume storage.
ColorVolume & | colorVolume ()
| Returns color volume storage.
void | getImage (View &view) const
| Renders 3D scene to display to human.
void | getLastFrameCloud (DeviceArray2D< PointType > &cloud) const
| Returns point cloud abserved from last camera pose.
void | getLastFrameNormals (DeviceArray2D< NormalType > &normals) const
| Returns point cloud abserved from last camera pose.
tsdf_buffer * | getCyclicalBufferStructure ()
| Returns pointer to the cyclical buffer structure.
void | extractAndSaveWorld ()
| Extract the world and save it.
bool | icpIsLost ()
| Returns true if ICP is currently lost.
void | reset ()
| Performs the tracker reset to initial state.
void | setDisableICP ()
bool | hasShifted () const
| Return whether the last update resulted in a shift.

## 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 71 of file kinfu.h.

## Member Typedef Documentation

## DepthMap

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

Definition at line 79 of file kinfu.h.

## NormalType

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

Definition at line 82 of file kinfu.h.

## PixelRGB

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

Pixel type for rendered image.

Definition at line 76 of file kinfu.h.

## PointType

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

Definition at line 81 of file kinfu.h.

## View

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

Definition at line 78 of file kinfu.h.

## Constructor & Destructor Documentation

## KinfuTracker()

pcl::gpu::kinfuLS::KinfuTracker::KinfuTracker | ( | const Eigen::Vector3f & | volumeSize,
|  | const float | shiftingDistance,
|  | int | rows = 480,
|  | int | cols = 640 )

Constructor.

Parameters

  [in] | volumeSize | physical size of the volume represented by the tdsf volume. In meters.
  [in] | shiftingDistance | when the camera target point is farther than shiftingDistance from the center of the volume, shiting occurs. In meters.

Note
  The target point is located at (0, 0, 0.6*volumeSize) in camera coordinates.

Parameters

  [in] | rows | height of depth image
  [in] | cols | width of depth image

References cols(), and rows().

## Member Function Documentation

## colorVolume() [1/2]

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

Returns color volume storage.

## colorVolume() [2/2]

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

Returns color volume storage.

## cols()

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

Returns cols passed to ctor.

Referenced by KinfuTracker().

## extractAndSaveWorld()

void pcl::gpu::kinfuLS::KinfuTracker::extractAndSaveWorld | ( |  | ) |

Extract the world and save it.

## getCameraPose()

Eigen::Affine3f pcl::gpu::kinfuLS::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

## getCyclicalBufferStructure()

tsdf_buffer * pcl::gpu::kinfuLS::KinfuTracker::getCyclicalBufferStructure | ( |  | ) |

inline

Returns pointer to the cyclical buffer structure.

Definition at line 210 of file kinfu.h.

## getImage()

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

Renders 3D scene to display to human.

Parameters

  [out] | view | output array with image

## getLastEstimatedPose()

Eigen::Affine3f pcl::gpu::kinfuLS::KinfuTracker::getLastEstimatedPose | ( |  | ) | const

## getLastFrameCloud()

void pcl::gpu::kinfuLS::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::kinfuLS::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::kinfuLS::KinfuTracker::getNumberOfPoses | ( |  | ) | const

Returns number of poses including initial.

## hasShifted()

bool pcl::gpu::kinfuLS::KinfuTracker::hasShifted | ( |  | ) | const

inline

Return whether the last update resulted in a shift.

Definition at line 240 of file kinfu.h.

## icpIsLost()

bool pcl::gpu::kinfuLS::KinfuTracker::icpIsLost | ( |  | ) |

inline

Returns true if ICP is currently lost.

Definition at line 222 of file kinfu.h.

## initColorIntegration()

void pcl::gpu::kinfuLS::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.

## isFinished()

bool pcl::gpu::kinfuLS::KinfuTracker::isFinished | ( |  | ) |

inline

Definition at line 88 of file kinfu.h.

## operator()() [1/2]

bool pcl::gpu::kinfuLS::KinfuTracker::operator() | ( | const DepthMap & | depth | ) |

Processes next frame.

Parameters

  [in] | depth | next frame with values in millimeters

Returns
  true if can render 3D view.

## operator()() [2/2]

bool pcl::gpu::kinfuLS::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.

## performLastScan()

void pcl::gpu::kinfuLS::KinfuTracker::performLastScan | ( |  | ) |

inline

Definition at line 85 of file kinfu.h.

## reset()

void pcl::gpu::kinfuLS::KinfuTracker::reset | ( |  | ) |

Performs the tracker reset to initial state.

It's used if camera tracking fails.

## rows()

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

Returns rows passed to ctor.

Referenced by KinfuTracker().

## setCameraMovementThreshold()

void pcl::gpu::kinfuLS::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] | threshold | a value to compare with the metric. Suitable values are ~0.001

## setDepthIntrinsics()

void pcl::gpu::kinfuLS::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::kinfuLS::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).

## setDisableICP()

void pcl::gpu::kinfuLS::KinfuTracker::setDisableICP | ( |  | ) |

inline

Definition at line 232 of file kinfu.h.

## setIcpCorespFilteringParams()

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

Sets ICP filtering parameters.

Parameters

  [in] | distThreshold | distance.
  [in] | sineOfAngle | sine of angle between normals.

## setInitialCameraPose()

void pcl::gpu::kinfuLS::KinfuTracker::setInitialCameraPose | ( | 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::kinfuLS::KinfuTracker::volume | ( |  | ) |

Returns TSDF volume storage.

## volume() [2/2]

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

Returns TSDF volume storage.

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

- /build/pcl-k79KrG/pcl-1.15.1+dfsg/gpu/kinfu_large_scale/include/pcl/gpu/kinfu_large_scale/kinfu.h