Point Cloud Library (PCL) 1.15.1
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
using Ptr
using ConstPtr
using SearchPtr
using SearchConstPtr
using PointCloudIn
using PointCloudInPtr
using PointCloudInConstPtr
using PointCloudState
using PointCloudStatePtr
using PointCloudStateConstPtr
Public Types inherited from pcl::PCLBase< PointInT >
using PointCloud
using PointCloudPtr
using PointCloudConstPtr
using PointIndicesPtr
using PointIndicesConstPtr

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::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.

Public Attributes

std::string tracker_name_
 The tracker name.

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< FloatImageConstPtrref_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 alternate 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

◆ ~PyramidalKLTTracker()

template<typename PointInT, typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>
pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::~PyramidalKLTTracker ( )
overridedefault

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
protectedvirtual

Compute the pyramidal representation of an image.

Parameters
[in]inputthe input cloud
[out]pyramidcomputed pyramid levels along with their respective gradients
[in]border_type

Definition at line 364 of file pyramidal_klt.hpp.

References pcl::BORDER_CONSTANT, pcl::copyPointCloud(), derivatives(), downsample(), intensity_, nb_levels_, track_height_, and track_width_.

Referenced by computeTracking(), and initCompute().

◆ computeTracking()

template<typename PointInT, typename IntensityT>
void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::computeTracking ( )
overrideprotectedvirtual

◆ 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]inputinput the image to convolve
[out]outputoutput the convolved image

Definition at line 284 of file pyramidal_klt.hpp.

References convolveCols(), and convolveRows().

Referenced by downsample().

◆ 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]inputinput the image to convolve
[out]outputoutput the convolved image

Definition at line 329 of file pyramidal_klt.hpp.

References kernel_, kernel_last_, and kernel_size_2_.

Referenced by convolve().

◆ 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]inputinput the image to convolve
[out]outputoutput the convolved image

Definition at line 295 of file pyramidal_klt.hpp.

References kernel_, kernel_last_, and kernel_size_2_.

Referenced by convolve().

◆ 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]srcthe image for which gradients are to be computed
[out]grad_ximage gradient along X direction
[out]grad_yimage 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.

Referenced by computePyramids(), and downsample().

◆ 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]inputthe image to downsample
[out]outputthe downsampled image

Definition at line 235 of file pyramidal_klt.hpp.

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

Referenced by computePyramids(), and downsample().

◆ 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]inputthe image to downsample
[out]outputthe downsampled image
[out]output_grad_xdownsampled image gradient along X direction
[out]output_grad_ydownsampled image gradient along Y direction

Definition at line 267 of file pyramidal_klt.hpp.

References derivatives(), and downsample().

◆ 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 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 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 278 of file pyramidal_klt.h.

References 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 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 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 nb_levels_.

◆ 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 ref_.

◆ getResult()

template<typename PointInT, typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>
Eigen::Affine3f pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::getResult ( ) const
inlineoverridevirtual

Return the computed transformation from tracked points.

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

Definition at line 271 of file pyramidal_klt.h.

References 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 264 of file pyramidal_klt.h.

References 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 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 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 track_width_.

◆ initCompute()

template<typename PointInT, typename IntensityT>
bool pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::initCompute ( )
overrideprotectedvirtual

◆ 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 track_height_, track_width_, and pcl::PointCloud< PointT >::width.

Referenced by track().

◆ setAccuracy()

template<typename PointInT, typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>
void pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::setAccuracy ( float accuracy)
inline

Set accuracy.

Parameters
[in]accuracydesired accuracy.

Definition at line 125 of file pyramidal_klt.h.

References 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]epsilondesired epsilon.

Definition at line 141 of file pyramidal_klt.h.

References 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]maxthe desired maximum number of iterations

Definition at line 226 of file pyramidal_klt.h.

References 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]numberthe desired number of points to detect.

Definition at line 158 of file pyramidal_klt.h.

References 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
levelsdesired number of pyramid levels

Definition at line 109 of file pyramidal_klt.h.

References 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_threadsthe number of hardware threads to use (0 sets the value back to automatic).

Definition at line 210 of file pyramidal_klt.h.

References 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
pointsthe const boost shared pointer to a PointIndices message

Definition at line 59 of file pyramidal_klt.hpp.

References keypoints_, keypoints_nbr_, keypoints_status_, pcl::PointCloud< PointT >::push_back(), and pcl::PointCloud< PointT >::reserve().

◆ 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
pointsthe const boost shared pointer to a PointIndices message

Definition at line 79 of file pyramidal_klt.hpp.

References pcl::PCLBase< PointInT >::input_, keypoints_nbr_, ref_, setPointsToTrack(), pcl::PointUV::u, and pcl::PointUV::v.

Referenced by setPointsToTrack().

◆ 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 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]widththe tracking window width
[in]heightthe tracking window height

Definition at line 50 of file pyramidal_klt.hpp.

References track_height_, and track_width_.

◆ 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 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
protectedvirtual

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]imgoriginal image
[in]grad_xoriginal image gradient along X direction
[in]grad_yoriginal image gradient along Y direction
[in]locationpixel at the center of the patch
[in]weightsbilinear interpolation weights at this location computed from subpixel location
[out]winpatch with interpolated intensity values
[out]grad_x_winpatch with interpolated gradient along X values
[out]grad_y_winpatch with interpolated gradient along Y values
[out]covariancecovariance matrix coefficients

!! store those

Definition at line 474 of file pyramidal_klt.hpp.

References track_height_, track_width_, and pcl::PointCloud< PointT >::width.

Referenced by track().

◆ 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
protectedvirtual

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

Referenced by getAccuracy(), PyramidalKLTTracker(), and 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 418 of file pyramidal_klt.h.

Referenced by getEpsilon(), PyramidalKLTTracker(), setEpsilon(), and track().

◆ 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 425 of file pyramidal_klt.h.

Referenced by computeTracking(), getInitialized(), initCompute(), and PyramidalKLTTracker().

◆ intensity_

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

intensity accessor

Definition at line 423 of file pyramidal_klt.h.

Referenced by computePyramids().

◆ 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 431 of file pyramidal_klt.h.

Referenced by convolveCols(), convolveRows(), and 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 435 of file pyramidal_klt.h.

Referenced by convolveCols(), convolveRows(), and 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 433 of file pyramidal_klt.h.

Referenced by convolveCols(), convolveRows(), and 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 399 of file pyramidal_klt.h.

Referenced by computeTracking(), getTrackedPoints(), initCompute(), and setPointsToTrack().

◆ 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 403 of file pyramidal_klt.h.

Referenced by getNumberOfKeypoints(), PyramidalKLTTracker(), setNumberOfKeypoints(), setPointsToTrack(), and setPointsToTrack().

◆ 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 401 of file pyramidal_klt.h.

Referenced by computeTracking(), getStatusOfPointsToTrack(), and setPointsToTrack().

◆ 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 413 of file pyramidal_klt.h.

Referenced by getMaxIterationsNumber(), PyramidalKLTTracker(), setMaxIterationsNumber(), and track().

◆ max_residue_

template<typename PointInT, typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>
float pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::max_residue_
protected

Definition at line 419 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 416 of file pyramidal_klt.h.

Referenced by PyramidalKLTTracker(), and track().

◆ 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 429 of file pyramidal_klt.h.

Referenced by computeTracking(), and 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 397 of file pyramidal_klt.h.

Referenced by computePyramids(), getNumberOfPyramidLevels(), initCompute(), PyramidalKLTTracker(), setNumberOfPyramidLevels(), and track().

◆ 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 395 of file pyramidal_klt.h.

Referenced by computeTracking(), getReferenceCloud(), initCompute(), PyramidalKLTTracker(), and setPointsToTrack().

◆ 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 393 of file pyramidal_klt.h.

Referenced by computeTracking(), and initCompute().

◆ 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 421 of file pyramidal_klt.h.

Referenced by PyramidalKLTTracker(), and setNumberOfThreads().

◆ track_height_

template<typename PointInT, typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>
int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::track_height_
protected

◆ 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 411 of file pyramidal_klt.h.

Referenced by initCompute().

◆ track_width_

template<typename PointInT, typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>
int pcl::tracking::PyramidalKLTTracker< PointInT, IntensityT >::track_width_
protected

◆ 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 407 of file pyramidal_klt.h.

Referenced by initCompute().

◆ tracker_name_

template<typename PointInT, typename IntensityT = pcl::common::IntensityFieldAccessor<PointInT>>
std::string pcl::tracking::Tracker< PointInT, Eigen::Affine3f >::tracker_name_

The tracker name.

Definition at line 90 of file tracker.h.

Referenced by initCompute(), and PyramidalKLTTracker().

◆ 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 427 of file pyramidal_klt.h.


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