W3cubDocs

/PointCloudLibrary

Pyramidal Kanade Lucas Tomasi tracker. More...

#include <pcl/tracking/pyramidal_klt.h>

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. More...
~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 after sorting detected keypoints according to their response measure. 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
pcl::shared_ptr< const std::vector< int > > getStatusOfPointsToTrack () const
Eigen::Affine3f getResult () const override
Return the computed transformation 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 ()=default
Destructor. More...
virtual void setInputCloud (const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset. More...
const PointCloudConstPtr 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 (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. More...
IndicesPtr getIndices ()
Get a pointer to the vector of indices used. More...
const IndicesConstPtr getIndices () const
Get a pointer to the vector of indices used. More...
const PointInT & operator[] (std::size_t pos) const
Override PointCloud operator[] to shorten code. More...

Protected Member Functions

bool initCompute () override
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
void computeTracking () override
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...
virtual Eigen::Affine3f getResult () const=0
Get an instance of the result of tracking. 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::shared_ptr< std::vector< int > > 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 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()

~PyramidalKLTTracker()

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

Destructor.

Definition at line 103 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
protectedvirtual

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 362 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
overrideprotectedvirtual

Abstract tracking method.

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

Definition at line 711 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 282 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 327 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 293 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 233 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 265 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
inlineoverride

Return the computed transformation from tracked points.

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
overrideprotectedvirtual

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

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 coefficients

!! store those

Definition at line 472 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
protectedvirtual

Member Data Documentation

accuracy_

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

epsilon_

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

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

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

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

max_iterations_

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

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

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

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

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

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:

© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1tracking_1_1_pyramidal_k_l_t_tracker.html