Loading...
Searching...
No Matches
pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT > Class Template Reference

Pyramidal Kanade Lucas Tomasi tracker. More...

`#include <pcl/tracking/pyramidal_klt.h>`

Inheritance diagram for pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >:

## Public Types

using | TrackerBase = pcl::tracking::Tracker< PointInT, Eigen::Affine3f >
using | PointCloudIn = typename TrackerBase::PointCloudIn
using | PointCloudInPtr = typename PointCloudIn::Ptr
using | PointCloudInConstPtr = typename PointCloudIn::ConstPtr
using | FloatImage = pcl::PointCloud< float >
using | FloatImagePtr = FloatImage::Ptr
using | FloatImageConstPtr = FloatImage::ConstPtr
using | Ptr = shared_ptr< PyramidalKLTTracker< PointInT, IntensityT > >
using | ConstPtr = shared_ptr< const PyramidalKLTTracker< PointInT, IntensityT > >
Public Types inherited from pcl::tracking::Tracker< PointInT, Eigen::Affine3f >
using | BaseClass = PCLBase< PointInT >
using | Ptr = shared_ptr< Tracker< PointInT, Eigen::Affine3f > >
using | ConstPtr = shared_ptr< const Tracker< PointInT, Eigen::Affine3f > >
using | SearchPtr = typename pcl::search::Search< PointInT >::Ptr
using | SearchConstPtr = typename pcl::search::Search< PointInT >::ConstPtr
using | PointCloudIn = pcl::PointCloud< PointInT >
using | PointCloudInPtr = typename PointCloudIn::Ptr
using | PointCloudInConstPtr = typename PointCloudIn::ConstPtr
using | PointCloudState = pcl::PointCloud< Eigen::Affine3f >
using | PointCloudStatePtr = typename PointCloudState::Ptr
using | PointCloudStateConstPtr = typename PointCloudState::ConstPtr
Public Types inherited from pcl::PCLBase< PointInT >
using | PointCloud = pcl::PointCloud< PointInT >
using | PointCloudPtr = typename PointCloud::Ptr
using | PointCloudConstPtr = typename PointCloud::ConstPtr
using | PointIndicesPtr = PointIndices::Ptr
using | PointIndicesConstPtr = PointIndices::ConstPtr

## Public Member Functions

| PyramidalKLTTracker (int nb_levels=5, int tracking_window_width=7, int tracking_window_height=7)
| Constructor.
| ~PyramidalKLTTracker () override=default
| Destructor.
void | setNumberOfPyramidLevels (int levels)
| Set the number of pyramid levels.
int | getNumberOfPyramidLevels () const
void | setAccuracy (float accuracy)
| Set accuracy.
float | getAccuracy () const
void | setEpsilon (float epsilon)
| Set epsilon.
float | getEpsilon () const
void | setNumberOfKeypoints (std::size_t number)
| Set the maximum number of points to track after sorting detected keypoints according to their response measure.
std::size_t | getNumberOfKeypoints ()
void | setTrackingWindowSize (int width, int height)
| set the tracking window size
void | setTrackingWindowWidth (int width)
| Set tracking window width.
int | getTrackingWindowWidth ()
void | setTrackingWindowHeight (int height)
| Set tracking window height.
int | getTrackingWindowHeight ()
void | setNumberOfThreads (unsigned int nr_threads=0)
| Initialize the scheduler and set the number of threads to use.
PointCloudInConstPtr | getReferenceCloud () const
| Get a pointer of the cloud at t-1.
void | setMaxIterationsNumber (unsigned int max)
| Set the maximum number of iterations in the Lucas Kanade loop.
unsigned int | getMaxIterationsNumber () const
void | setPointsToTrack (const pcl::PointIndicesConstPtr &points)
| Provide a pointer to points to track.
void | setPointsToTrack (const pcl::PointCloud< pcl::PointUV >::ConstPtr &points)
| Provide a pointer to points to track.
pcl::PointCloud< pcl::PointUV >::ConstPtr | getTrackedPoints () const
pcl::PointIndicesConstPtr | getPointsToTrackStatus () const
pcl::shared_ptr< const std::vector< int > > | getStatusOfPointsToTrack () const
Eigen::Affine3f | getResult () const override
| Return the computed transformation from tracked points.
bool | getInitialized () const
Public Member Functions inherited from pcl::tracking::Tracker< PointInT, Eigen::Affine3f >
| Tracker ()
| Empty constructor.
void | compute ()
| Base method for tracking for all points given in <setInputCloud (), setIndices ()> using the indices in setIndices ()
Public Member Functions inherited from pcl::PCLBase< PointInT >
| PCLBase ()
| Empty constructor.
| PCLBase (const PCLBase &base)
| Copy constructor.
virtual | ~PCLBase ()=default
| Destructor.
virtual void | setInputCloud (const PointCloudConstPtr &cloud)
| Provide a pointer to the input dataset.
PointCloudConstPtr const | getInputCloud () const
| Get a pointer to the input point cloud dataset.
virtual void | setIndices (const IndicesPtr &indices)
| Provide a pointer to the vector of indices that represents the input data.
virtual void | setIndices (const IndicesConstPtr &indices)
| Provide a pointer to the vector of indices that represents the input data.
virtual void | setIndices (const PointIndicesConstPtr &indices)
| Provide a pointer to the vector of indices that represents the input data.
virtual void | setIndices (std::size_t row_start, std::size_t col_start, std::size_t nb_rows, std::size_t nb_cols)
| Set the indices for the points laying within an interest region of the point cloud.
IndicesPtr | getIndices ()
| Get a pointer to the vector of indices used.
IndicesConstPtr const | getIndices () const
| Get a pointer to the vector of indices used.
const PointInT & | operator[] (std::size_t pos) const
| Override PointCloud operator[] to shorten code.

## Protected Member Functions

bool | initCompute () override
| This method should get called before starting the actual computation.
void | derivatives (const FloatImage &src, FloatImage &grad_x, FloatImage &grad_y) const
| compute Scharr derivatives of a source cloud.
void | downsample (const FloatImageConstPtr &input, FloatImageConstPtr &output) const
| downsample input
void | downsample (const FloatImageConstPtr &input, FloatImageConstPtr &output, FloatImageConstPtr &output_grad_x, FloatImageConstPtr &output_grad_y) const
| downsample input and compute output gradients.
void | convolve (const FloatImageConstPtr &input, FloatImage &output) const
| Separately convolve image with decomposable convolution kernel.
void | convolveCols (const FloatImageConstPtr &input, FloatImage &output) const
| Convolve image columns.
void | convolveRows (const FloatImageConstPtr &input, FloatImage &output) const
| Convolve image rows.
virtual void | spatialGradient (const FloatImage &img, const FloatImage &grad_x, const FloatImage &grad_y, const Eigen::Array2i &location, const Eigen::Array4f &weights, Eigen::ArrayXXf &win, Eigen::ArrayXXf &grad_x_win, Eigen::ArrayXXf &grad_y_win, Eigen::Array3f &covariance) const
| extract the patch from the previous image, previous image gradients surrounding pixel allocation while interpolating image and gradients data and compute covariation matrix of derivatives.
void | mismatchVector (const Eigen::ArrayXXf &prev, const Eigen::ArrayXXf &prev_grad_x, const Eigen::ArrayXXf &prev_grad_y, const FloatImage &next, const Eigen::Array2i &location, const Eigen::Array4f &weights, Eigen::Array2f &b) const
virtual void | computePyramids (const PointCloudInConstPtr &input, std::vector< FloatImageConstPtr > &pyramid, pcl::InterpolationType border_type) const
| Compute the pyramidal representation of an image.

virtual void

track (const PointCloudInConstPtr &previous_input, const PointCloudInConstPtr &current_input, const std::vector< FloatImageConstPtr > &previous_pyramid, const std::vector< FloatImageConstPtr > &current_pyramid, const pcl::PointCloud< pcl::PointUV >::ConstPtr &previous_keypoints, pcl::PointCloud< pcl::PointUV >::Ptr &current_keypoints, std::vector< int > &status, Eigen::Affine3f &motion) const

void | computeTracking () override
| Abstract tracking method.
Protected Member Functions inherited from pcl::tracking::Tracker< PointInT, Eigen::Affine3f >
const std::string & | getClassName () const
| Get a string representation of the name of this class.
void | setSearchMethod (const SearchPtr &search)
| Provide a pointer to a dataset to add additional information to estimate the features for every point in the input dataset.
SearchPtr | getSearchMethod ()
| Get a pointer to the point cloud dataset.
Protected Member Functions inherited from pcl::PCLBase< PointInT >
bool | initCompute ()
| This method should get called before starting the actual computation.
bool | deinitCompute ()
| This method should get called after finishing the actual computation.

## Protected Attributes

std::vector< FloatImageConstPtr > | ref_pyramid_
| input pyranid at t-1
PointCloudInConstPtr | ref_
| point cloud at t-1
int | nb_levels_
| number of pyramid levels
pcl::PointCloud< pcl::PointUV >::ConstPtr | keypoints_
| detected keypoints 2D coordinates
pcl::shared_ptr< std::vector< int > > | keypoints_status_
| status of keypoints of t-1 at t
std::size_t | keypoints_nbr_
| number of points to detect
int | track_width_
| tracking width
int | track_width_2_
| half of tracking window width
int | track_height_
| tracking height
int | track_height_2_
| half of tracking window height
unsigned int | max_iterations_
| maximum number of iterations
float | accuracy_
| accuracy criterion to stop iterating
float | min_eigenvalue_threshold_
float | epsilon_
| epsilon for subpixel computation
float | max_residue_
unsigned int | threads_
| number of hardware threads
IntensityT | intensity_
| intensity accessor
bool | initialized_
| is the tracker initialized ?
pcl::TransformationFromCorrespondences | transformation_computer_
| compute transformation from successfully tracked points
Eigen::Affine3f | motion_
| computed transformation between tracked points
Eigen::Array< float, 5, 1 > | kernel_
| smoothing kernel
int | kernel_size_2_
| smoothing kernel half size
int | kernel_last_
| index of last element in kernel
Protected Attributes inherited from pcl::tracking::Tracker< PointInT, Eigen::Affine3f >
std::string | tracker_name_
| The tracker name.
SearchPtr | search_
| A pointer to the spatial search object.
Protected Attributes inherited from pcl::PCLBase< PointInT >
PointCloudConstPtr | input_
| The input point cloud dataset.
IndicesPtr | indices_
| A pointer to the vector of point indices to use.
bool | use_indices_
| Set to true if point indices are used.
bool | fake_indices_
| If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud.

## Detailed Description

template<typename PointInT, typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>
class pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >

Pyramidal Kanade Lucas Tomasi tracker.

This is an implementation of the Pyramidal Kanade Lucas Tomasi tracker that operates on organized 3D keypoints with color/intensity information (this is the default behaviour but you can alterate it by providing another operator as second template argument). It is an affine tracker that iteratively computes the optical flow to find the best guess for a point p at t given its location at t-1. User is advised to respect the Tomasi condition: the response computed is the maximum eigenvalue of the second moment matrix but no restrictin are applied to points to track so you can use a detector of your choice to indicate points to track.

Author
  Nizar Sallem

Definition at line 64 of file pyramidal_klt.h.

## Member Typedef Documentation

## ConstPtr

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

using pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::ConstPtr = shared_ptr<const PyramidalKLTTracker<PointInT, IntensityT> >

Definition at line 74 of file pyramidal_klt.h.

## FloatImage

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

using pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::FloatImage = pcl::PointCloud<float>

Definition at line 70 of file pyramidal_klt.h.

## FloatImageConstPtr

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

using pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::FloatImageConstPtr = FloatImage::ConstPtr

Definition at line 72 of file pyramidal_klt.h.

## FloatImagePtr

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

using pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::FloatImagePtr = FloatImage::Ptr

Definition at line 71 of file pyramidal_klt.h.

## PointCloudIn

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

using pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PointCloudIn = typename TrackerBase::PointCloudIn

Definition at line 67 of file pyramidal_klt.h.

## PointCloudInConstPtr

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

using pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PointCloudInConstPtr = typename PointCloudIn::ConstPtr

Definition at line 69 of file pyramidal_klt.h.

## PointCloudInPtr

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

using pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PointCloudInPtr = typename PointCloudIn::Ptr

Definition at line 68 of file pyramidal_klt.h.

## Ptr

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

using pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::Ptr = shared_ptr<PyramidalKLTTracker<PointInT, IntensityT> >

Definition at line 73 of file pyramidal_klt.h.

## TrackerBase

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

using pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::TrackerBase = pcl::tracking::Tracker<PointInT, Eigen::Affine3f>

Definition at line 66 of file pyramidal_klt.h.

## Constructor & Destructor Documentation

## PyramidalKLTTracker()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PyramidalKLTTracker | ( | int | nb_levels = `5`,
|  | int | tracking_window_width = `7`,
|  | int | tracking_window_height = `7`
| ) |  |

inline

Constructor.

Definition at line 81 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::accuracy_, pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::epsilon_, pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::kernel_, pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::kernel_last_, pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::kernel_size_2_, pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::keypoints_nbr_, pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::max_iterations_, pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::min_eigenvalue_threshold_, and pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::tracker_name_.

## ~PyramidalKLTTracker()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::~PyramidalKLTTracker | ( |  | ) |

override default

Destructor.

## Member Function Documentation

## computePyramids()

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::computePyramids | ( | const PointCloudInConstPtr & | input,
|  | std::vector< FloatImageConstPtr > & | pyramid,
|  | pcl::InterpolationType | border_type
| ) |  | const

protected virtual

Compute the pyramidal representation of an image.

Parameters

  [in] | input | the input cloud
  [out] | pyramid | computed pyramid levels along with their respective gradients
  [in] | border_type |

Definition at line 364 of file pyramidal_klt.hpp.

References pcl::BORDER_CONSTANT, and pcl::copyPointCloud().

## computeTracking()

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::computeTracking | ( |  | ) |

override protected virtual

Abstract tracking method.

Implements pcl::tracking::Tracker< PointInT, Eigen::Affine3f >.

Definition at line 713 of file pyramidal_klt.hpp.

References pcl::BORDER_REFLECT_101, and pcl::PointCloud< PointT >::reserve().

## convolve()

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::convolve | ( | const FloatImageConstPtr & | input,
|  | FloatImage & | output
| ) |  | const

protected

Separately convolve image with decomposable convolution kernel.

Parameters

  [in] | input | input the image to convolve
  [out] | output | output the convolved image

Definition at line 284 of file pyramidal_klt.hpp.

## convolveCols()

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::convolveCols | ( | const FloatImageConstPtr & | input,
|  | FloatImage & | output
| ) |  | const

protected

Convolve image columns.

Parameters

  [in] | input | input the image to convolve
  [out] | output | output the convolved image

Definition at line 329 of file pyramidal_klt.hpp.

## convolveRows()

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::convolveRows | ( | const FloatImageConstPtr & | input,
|  | FloatImage & | output
| ) |  | const

protected

Convolve image rows.

Parameters

  [in] | input | input the image to convolve
  [out] | output | output the convolved image

Definition at line 295 of file pyramidal_klt.hpp.

## derivatives()

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::derivatives | ( | const FloatImage & | src,
|  | FloatImage & | grad_x,
|  | FloatImage & | grad_y
| ) |  | const

protected

compute Scharr derivatives of a source cloud.

Parameters

  [in] | src | the image for which gradients are to be computed
  [out] | grad_x | image gradient along X direction
  [out] | grad_y | image gradient along Y direction

Definition at line 171 of file pyramidal_klt.hpp.

References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::size(), and pcl::PointCloud< PointT >::width.

## downsample() [1/2]

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::downsample | ( | const FloatImageConstPtr & | input,
|  | FloatImageConstPtr & | output
| ) |  | const

protected

downsample input

Parameters

  [in] | input | the image to downsample
  [out] | output | the downsampled image

Definition at line 235 of file pyramidal_klt.hpp.

References pcl::PointCloud< PointT >::height, and pcl::PointCloud< PointT >::width.

## downsample() [2/2]

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::downsample | ( | const FloatImageConstPtr & | input,
|  | FloatImageConstPtr & | output,
|  | FloatImageConstPtr & | output_grad_x,
|  | FloatImageConstPtr & | output_grad_y
| ) |  | const

protected

downsample input and compute output gradients.

Parameters

  [in] | input | the image to downsample
  [out] | output | the downsampled image
  [out] | output_grad_x | downsampled image gradient along X direction
  [out] | output_grad_y | downsampled image gradient along Y direction

Definition at line 267 of file pyramidal_klt.hpp.

## getAccuracy()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

float pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getAccuracy | ( |  | ) | const

inline

Returns
  the accuracy

Definition at line 132 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::accuracy_.

## getEpsilon()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

float pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getEpsilon | ( |  | ) | const

inline

Returns
  the epsilon

Definition at line 148 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::epsilon_.

## getInitialized()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

bool pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getInitialized | ( |  | ) | const

inline

Returns
  initialization state

Definition at line 294 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::initialized_.

## getMaxIterationsNumber()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

unsigned int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getMaxIterationsNumber | ( |  | ) | const

inline

Returns
  the maximum iterations number

Definition at line 233 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::max_iterations_.

## getNumberOfKeypoints()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

std::size_t pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getNumberOfKeypoints | ( |  | ) |

inline

Returns
  the maximum number of keypoints to keep

Definition at line 165 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::keypoints_nbr_.

## getNumberOfPyramidLevels()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getNumberOfPyramidLevels | ( |  | ) | const

inline

Returns
  the number of pyramid levels

Definition at line 116 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::nb_levels_.

## getPointsToTrackStatus()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

pcl::PointIndicesConstPtr pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getPointsToTrackStatus | ( |  | ) | const

inline

Returns
  the status of points to track. Status == 0 --> points successfully tracked; Status < 0 --> point is lost; Status == -1 --> point is out of bond; Status == -2 --> optical flow can not be computed for this point.

Deprecated:
  Scheduled for removal in version 1 . 15 : "use getStatusOfPointsToTrack instead"

Definition at line 265 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::keypoints_status_.

## getReferenceCloud()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

PointCloudInConstPtr pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getReferenceCloud | ( |  | ) | const

inline

Get a pointer of the cloud at t-1.

Definition at line 217 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::ref_.

## getResult()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

Eigen::Affine3f pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getResult | ( |  | ) | const

inline override virtual

Return the computed transformation from tracked points.

Implements pcl::tracking::Tracker< PointInT, Eigen::Affine3f >.

Definition at line 287 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::motion_.

## getStatusOfPointsToTrack()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

pcl::shared_ptr< const std::vector< int > > pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getStatusOfPointsToTrack | ( |  | ) | const

inline

Returns
  the status of points to track. Status == 0 --> points successfully tracked; Status < 0 --> point is lost; Status == -1 --> point is out of bond; Status == -2 --> optical flow can not be computed for this point.

Definition at line 280 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::keypoints_status_.

## getTrackedPoints()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

pcl::PointCloud< pcl::PointUV >::ConstPtr pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getTrackedPoints | ( |  | ) | const

inline

Returns
  a pointer to the points successfully tracked.

Definition at line 252 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::keypoints_.

## getTrackingWindowHeight()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getTrackingWindowHeight | ( |  | ) |

inline

Returns
  the tracking window size

Definition at line 200 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::track_height_.

## getTrackingWindowWidth()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getTrackingWindowWidth | ( |  | ) |

inline

Returns
  the tracking window size

Definition at line 186 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::track_width_.

## initCompute()

template<typename PointInT , typename IntensityT >

bool pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::initCompute | ( |  | ) |

override protected virtual

This method should get called before starting the actual computation.

Reimplemented from pcl::tracking::Tracker< PointInT, Eigen::Affine3f >.

Definition at line 98 of file pyramidal_klt.hpp.

References pcl::BORDER_REFLECT_101.

## mismatchVector()

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::mismatchVector | ( | const Eigen::ArrayXXf & | prev,
|  | const Eigen::ArrayXXf & | prev_grad_x,
|  | const Eigen::ArrayXXf & | prev_grad_y,
|  | const FloatImage & | next,
|  | const Eigen::Array2i & | location,
|  | const Eigen::Array4f & | weights,
|  | Eigen::Array2f & | b
| ) |  | const

protected

Definition at line 518 of file pyramidal_klt.hpp.

References pcl::PointCloud< PointT >::width.

## setAccuracy()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setAccuracy | ( | float | accuracy | ) |

inline

Set accuracy.

Parameters

  [in] | accuracy | desired accuracy.

Definition at line 125 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::accuracy_.

## setEpsilon()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setEpsilon | ( | float | epsilon | ) |

inline

Set epsilon.

Parameters

  [in] | epsilon | desired epsilon.

Definition at line 141 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::epsilon_.

## setMaxIterationsNumber()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setMaxIterationsNumber | ( | unsigned int | max | ) |

inline

Set the maximum number of iterations in the Lucas Kanade loop.

Parameters

  [in] | max | the desired maximum number of iterations

Definition at line 226 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::max_iterations_.

## setNumberOfKeypoints()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setNumberOfKeypoints | ( | std::size_t | number | ) |

inline

Set the maximum number of points to track after sorting detected keypoints according to their response measure.

Parameters

  [in] | number | the desired number of points to detect.

Definition at line 158 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::keypoints_nbr_.

## setNumberOfPyramidLevels()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setNumberOfPyramidLevels | ( | int | levels | ) |

inline

Set the number of pyramid levels.

Parameters

  levels | desired number of pyramid levels

Definition at line 109 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::nb_levels_.

## setNumberOfThreads()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setNumberOfThreads | ( | unsigned int | nr_threads = `0` | ) |

inline

Initialize the scheduler and set the number of threads to use.

Parameters

  nr_threads | the number of hardware threads to use (0 sets the value back to automatic).

Definition at line 210 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::threads_.

## setPointsToTrack() [1/2]

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setPointsToTrack | ( | const pcl::PointCloud< pcl::PointUV >::ConstPtr & | points | ) |

inline

Provide a pointer to points to track.

Parameters

  points | the const boost shared pointer to a PointIndices message

Definition at line 59 of file pyramidal_klt.hpp.

References pcl::PointCloud< PointT >::push_back(), pcl::PointCloud< PointT >::reserve(), pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::size().

## setPointsToTrack() [2/2]

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setPointsToTrack | ( | const pcl::PointIndicesConstPtr & | points | ) |

inline

Provide a pointer to points to track.

Parameters

  points | the const boost shared pointer to a PointIndices message

Definition at line 79 of file pyramidal_klt.hpp.

References pcl::PointCloud< PointT >::push_back(), pcl::PointCloud< PointT >::reserve(), pcl::PointUV::u, and pcl::PointUV::v.

## setTrackingWindowHeight()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setTrackingWindowHeight | ( | int | height | ) |

inline

Set tracking window height.

Definition at line 193 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::track_height_.

## setTrackingWindowSize()

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setTrackingWindowSize | ( | int | width,
|  | int | height
| ) |  |

inline

set the tracking window size

Parameters

  [in] | width | the tracking window width
  [in] | height | the tracking window height

Definition at line 50 of file pyramidal_klt.hpp.

## setTrackingWindowWidth()

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setTrackingWindowWidth | ( | int | width | ) |

inline

Set tracking window width.

Definition at line 179 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::track_width_.

## spatialGradient()

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::spatialGradient | ( | const FloatImage & | img,
|  | const FloatImage & | grad_x,
|  | const FloatImage & | grad_y,
|  | const Eigen::Array2i & | location,
|  | const Eigen::Array4f & | weights,
|  | Eigen::ArrayXXf & | win,
|  | Eigen::ArrayXXf & | grad_x_win,
|  | Eigen::ArrayXXf & | grad_y_win,
|  | Eigen::Array3f & | covariance
| ) |  | const

protected virtual

extract the patch from the previous image, previous image gradients surrounding pixel allocation while interpolating image and gradients data and compute covariation matrix of derivatives.

Parameters

  [in] | img | original image
  [in] | grad_x | original image gradient along X direction
  [in] | grad_y | original image gradient along Y direction
  [in] | location | pixel at the center of the patch
  [in] | weights | bilinear interpolation weights at this location computed from subpixel location
  [out] | win | patch with interpolated intensity values
  [out] | grad_x_win | patch with interpolated gradient along X values
  [out] | grad_y_win | patch with interpolated gradient along Y values
  [out] | covariance | covariance matrix coefficients

!! store those

Definition at line 474 of file pyramidal_klt.hpp.

References pcl::PointCloud< PointT >::width.

## track()

template<typename PointInT , typename IntensityT >

void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::track | ( | const PointCloudInConstPtr & | previous_input,
|  | const PointCloudInConstPtr & | current_input,
|  | const std::vector< FloatImageConstPtr > & | previous_pyramid,
|  | const std::vector< FloatImageConstPtr > & | current_pyramid,
|  | const pcl::PointCloud< pcl::PointUV >::ConstPtr & | previous_keypoints,
|  | pcl::PointCloud< pcl::PointUV >::Ptr & | current_keypoints,
|  | std::vector< int > & | status,
|  | Eigen::Affine3f & | motion
| ) |  | const

protected virtual

Definition at line 548 of file pyramidal_klt.hpp.

References pcl::TransformationFromCorrespondences::add(), pcl::TransformationFromCorrespondences::getTransformation(), pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::push_back(), pcl::PointCloud< PointT >::size(), pcl::PointUV::u, pcl::PointUV::v, and pcl::PointCloud< PointT >::width.

## Member Data Documentation

## accuracy_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

float pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::accuracy_

protected

accuracy criterion to stop iterating

Definition at line 431 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getAccuracy(), pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PyramidalKLTTracker(), and pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setAccuracy().

## epsilon_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

float pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::epsilon_

protected

epsilon for subpixel computation

Definition at line 434 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getEpsilon(), pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PyramidalKLTTracker(), and pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setEpsilon().

## initialized_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

bool pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::initialized_

protected

is the tracker initialized ?

Definition at line 441 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getInitialized().

## intensity_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

IntensityT pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::intensity_

protected

intensity accessor

Definition at line 439 of file pyramidal_klt.h.

## kernel_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

Eigen::Array<float, 5, 1> pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::kernel_

protected

smoothing kernel

Definition at line 447 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PyramidalKLTTracker().

## kernel_last_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::kernel_last_

protected

index of last element in kernel

Definition at line 451 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PyramidalKLTTracker().

## kernel_size_2_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::kernel_size_2_

protected

smoothing kernel half size

Definition at line 449 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PyramidalKLTTracker().

## keypoints_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

pcl::PointCloud<pcl::PointUV>::ConstPtr pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::keypoints_

protected

detected keypoints 2D coordinates

Definition at line 415 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getTrackedPoints().

## keypoints_nbr_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

std::size_t pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::keypoints_nbr_

protected

number of points to detect

Definition at line 419 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getNumberOfKeypoints(), pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PyramidalKLTTracker(), and pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setNumberOfKeypoints().

## keypoints_status_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

pcl::shared_ptr<std::vector<int> > pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::keypoints_status_

protected

status of keypoints of t-1 at t

Definition at line 417 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getPointsToTrackStatus(), and pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getStatusOfPointsToTrack().

## max_iterations_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

unsigned int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::max_iterations_

protected

maximum number of iterations

Definition at line 429 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getMaxIterationsNumber(), pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PyramidalKLTTracker(), and pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setMaxIterationsNumber().

## max_residue_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

float pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::max_residue_

protected

Definition at line 435 of file pyramidal_klt.h.

## min_eigenvalue_threshold_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

float pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::min_eigenvalue_threshold_

protected

Definition at line 432 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PyramidalKLTTracker().

## motion_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

Eigen::Affine3f pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::motion_

protected

computed transformation between tracked points

Definition at line 445 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getResult().

## nb_levels_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::nb_levels_

protected

number of pyramid levels

Definition at line 413 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getNumberOfPyramidLevels(), and pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setNumberOfPyramidLevels().

## ref_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

PointCloudInConstPtr pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::ref_

protected

point cloud at t-1

Definition at line 411 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getReferenceCloud().

## ref_pyramid_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

std::vector<FloatImageConstPtr> pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::ref_pyramid_

protected

input pyranid at t-1

Definition at line 409 of file pyramidal_klt.h.

## threads_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

unsigned int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::threads_

protected

number of hardware threads

Definition at line 437 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setNumberOfThreads().

## track_height_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::track_height_

protected

tracking height

Definition at line 425 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getTrackingWindowHeight(), and pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setTrackingWindowHeight().

## track_height_2_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::track_height_2_

protected

half of tracking window height

Definition at line 427 of file pyramidal_klt.h.

## track_width_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::track_width_

protected

tracking width

Definition at line 421 of file pyramidal_klt.h.

Referenced by pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getTrackingWindowWidth(), and pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setTrackingWindowWidth().

## track_width_2_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::track_width_2_

protected

half of tracking window width

Definition at line 423 of file pyramidal_klt.h.

## transformation_computer_

template<typename PointInT , typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>

pcl::TransformationFromCorrespondences pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::transformation_computer_

protected

compute transformation from successfully tracked points

Definition at line 443 of file pyramidal_klt.h.

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

- pcl/tracking/pyramidal_klt.h
- pcl/tracking/impl/pyramidal_klt.hpp