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

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

## Public Member Functions

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

## Protected Member Functions

virtual bool | initCompute ()
| This method should get called before starting the actual computation. More...
void | derivatives (const FloatImage &src, FloatImage &grad_x, FloatImage &grad_y) const
| compute Scharr derivatives of a source cloud. More...
void | downsample (const FloatImageConstPtr &input, FloatImageConstPtr &output) const
| downsample input More...
void | downsample (const FloatImageConstPtr &input, FloatImageConstPtr &output, FloatImageConstPtr &output_grad_x, FloatImageConstPtr &output_grad_y) const
| downsample input and compute output gradients. More...
void | convolve (const FloatImageConstPtr &input, FloatImage &output) const
| Separately convolve image with decomposable convolution kernel. More...
void | convolveCols (const FloatImageConstPtr &input, FloatImage &output) const
| Convolve image columns. More...
void | convolveRows (const FloatImageConstPtr &input, FloatImage &output) const
| Convolve image rows. More...
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 alocation while interpolating image and gradients data and compute covariation matrix of derivatives. More...
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. More...

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

virtual void | computeTracking ()
| Abstract tracking method. More...
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. More...
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. More...
SearchPtr | getSearchMethod ()
| Get a pointer to the point cloud dataset. More...
Protected Member Functions inherited from pcl::PCLBase< PointInT >
bool | initCompute ()
| This method should get called before starting the actual computation. More...
bool | deinitCompute ()
| This method should get called after finishing the actual computation. More...

## Protected Attributes

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

## 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 implemntation 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 63 of file pyramidal_klt.h.

## Member Typedef Documentation

## FloatImage

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

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

Definition at line 70 of file pyramidal_klt.h.

## FloatImageConstPtr

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

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

Definition at line 72 of file pyramidal_klt.h.

## FloatImagePtr

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

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

Definition at line 71 of file pyramidal_klt.h.

## PointCloudIn

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

typedef TrackerBase::PointCloudIn pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PointCloudIn

Definition at line 67 of file pyramidal_klt.h.

## PointCloudInConstPtr

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

typedef PointCloudIn::ConstPtr pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PointCloudInConstPtr

Definition at line 69 of file pyramidal_klt.h.

## PointCloudInPtr

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

typedef PointCloudIn::Ptr pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::PointCloudInPtr

Definition at line 68 of file pyramidal_klt.h.

## TrackerBase

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

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

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

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

inline virtual

Destructor.

Definition at line 99 of file pyramidal_klt.h.

## 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 336 of file pyramidal_klt.hpp.

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

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

## computeTracking()

template<typename PointInT , typename IntensityT >

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

protected virtual

Abstract tracking method.

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

Definition at line 625 of file pyramidal_klt.hpp.

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

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

## 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 264 of file pyramidal_klt.hpp.

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

## 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 304 of file pyramidal_klt.hpp.

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

## 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 273 of file pyramidal_klt.hpp.

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

## 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 166 of file pyramidal_klt.hpp.

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

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

## 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 221 of file pyramidal_klt.hpp.

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

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

## 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 249 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 119 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 129 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 218 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::computePyramids(), pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::computeTracking(), pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::convolve(), pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::convolveCols(), pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::convolveRows(), pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::derivatives(), pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::downsample(), pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::initCompute(), pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::initialized_, pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::mismatchVector(), pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::spatialGradient(), and pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::track().

## 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 185 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::max_iterations_, and pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setPointsToTrack().

## 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 141 of file pyramidal_klt.h.

References pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::keypoints_nbr_, and pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setTrackingWindowSize().

## 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 109 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 succesfully 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 210 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 175 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 virtual

Return the computed transfromation from tracked points.

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

Definition at line 214 of file pyramidal_klt.h.

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

## 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 succesfully tracked.

Definition at line 201 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 164 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 156 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 | ( |  | ) |

protected virtual

This method should get called before starting the actual computation.

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

Definition at line 94 of file pyramidal_klt.hpp.

References pcl::BORDER_REFLECT_101.

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

## 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 445 of file pyramidal_klt.hpp.

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

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

## 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 115 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 125 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 181 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.

Only the first keypoints_nbr_ are used as 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 137 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 105 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 171 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::PointIndicesConstPtr & | points | ) |

inline

Provide a pointer to points to track.

Parameters

  points | the const boost shared pointer to a PointIndices message

Definition at line 76 of file pyramidal_klt.hpp.

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

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

## setPointsToTrack() [2/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 57 of file pyramidal_klt.hpp.

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

## 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 160 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 49 of file pyramidal_klt.hpp.

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

## 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 152 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 alocation 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 coefficents

!! store those

Definition at line 404 of file pyramidal_klt.hpp.

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

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

## 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 474 of file pyramidal_klt.hpp.

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

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

## 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 349 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 352 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 359 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 357 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 365 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 369 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 367 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 333 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 337 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::PointIndicesPtr pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::keypoints_status_

protected

status of keypoints of t-1 at t

Definition at line 335 of file pyramidal_klt.h.

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

## 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 347 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 353 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 350 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 363 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 331 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 329 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 327 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 355 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 343 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 345 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 339 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 341 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 361 of file pyramidal_klt.h.

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

- /build/pcl-qv3n_B/pcl-1.8.1+dfsg1/tracking/include/pcl/tracking/pyramidal_klt.h
- /build/pcl-qv3n_B/pcl-1.8.1+dfsg1/tracking/include/pcl/tracking/impl/pyramidal_klt.hpp