# opentl::modalities::SurfFeatures Class Reference

Inherits opentl::modalities::Modality.

List of all members.

## Classes
class | SURFKeyframe
## Public Types
## Public Member Functions
virtual modalities::Modality * | clone () const
| Clone this class and all potential childs RECURSIVELY!! (deep copy).
virtual void | init ()
| Initialize class.
virtual int | matchFeatLevel (const TargetPtrVector &targets, T_MEAS_FEATPtrVector &outputMeas, std::size_t partitionIdx)
| Feature-level matching.
virtual int | matchObjLevel (const TargetPtrVector &targets, T_MEAS_OBJPtrVector &outputMeas, std::size_t partitionIdx)
| Feature-level matching.
virtual int | preProcess (const opentl::core::cvdata::Image &image, const std::vector< std::vector< int > > &preProcessROIs)
| Detect SURF keypoints in the current image.
virtual int | sampleModelFeatures (const TargetPtrVector &targets)
| Detect SURF keypoints from the texture map, and back-project them in object space NOTE: If this function is called with multiple targets, it will add a keyframe for each of them. Therefore, in this case the option "addKeyframes" MUST be set true, otherwise an exception will be raised.
| SurfFeatures (const SurfFeatures &c)
| Copy constructor.
| SurfFeatures (opentl::modelprojection::WarpBack *warpBack, int camIdx, opentl::modelprojection::GLRenderer *renderer)
| Constructor.
virtual | ~SurfFeatures ()
| Destructor.

## Member Enumeration Documentation

enum opentl::modalities::SurfFeatures::OfflineParameters

Enumerator:

  OFFLINE_COUNT |

Reimplemented from opentl::modalities::Modality.

enum opentl::modalities::SurfFeatures::OnlineParameters

Enumerator:

  addKeyframes | (bool) Whether to add a new keyframe, each time sampleModelFeatures is called. Default = false.
  matchFeatMinInliers | (unsigned int) Minimum number of inliers for successful matching. Default = 10. Minimum = 8 (for RANSAC)
  matchFeatRansac | (bool) Whether to apply RANSAC with planar homography, for rejecting outliers. Default = true.
  matchFeatCov | (double) Inverse covariance of feature-level residuals (R)
  matchObjCov | (double) Covariance of object-level residuals (R)
  useFLANN | (bool) Whether to use approximate nearest neighbor search for matching
  drawCorresp | (bool) Whether to draw the correspondences after matching
  ONLINE_COUNT |

Reimplemented from opentl::modalities::Modality.

## Constructor & Destructor Documentation

opentl::modalities::SurfFeatures::SurfFeatures | ( | opentl::modelprojection::WarpBack * | warpBack,
|  | int | camIdx,
|  | opentl::modelprojection::GLRenderer * | renderer |
| ) |  |  |

Constructor.

opentl::modalities::SurfFeatures::SurfFeatures | ( | const SurfFeatures & | c | ) |

Copy constructor.

virtual opentl::modalities::SurfFeatures::~SurfFeatures | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

virtual modalities::Modality* opentl::modalities::SurfFeatures::clone | ( |  | ) | const`[inline, virtual]`

Clone this class and all potential childs RECURSIVELY!! (deep copy).

Implements opentl::modalities::Modality.

virtual void opentl::modalities::SurfFeatures::init | ( |  | ) | `[virtual]`

Initialize class.

Reimplemented from opentl::modalities::Modality.

virtual int opentl::modalities::SurfFeatures::matchFeatLevel | ( | const TargetPtrVector & | targets,
|  | T_MEAS_FEATPtrVector & | outputMeas,
|  | std::size_t | partitionIdx |
| ) |  |  | `[virtual]`

Feature-level matching.

Parameters:

  | targets | Input vector of targets
  | outputMeas | Output matched SURF features, for each target and state hypothesis
  | partitionIdx | Input partition number (for multi-threading)

Reimplemented from opentl::modalities::Modality.

virtual int opentl::modalities::SurfFeatures::matchObjLevel | ( | const TargetPtrVector & | targets,
|  | T_MEAS_OBJPtrVector & | outputMeas,
|  | std::size_t | partitionIdx |
| ) |  |  | `[virtual]`

Feature-level matching.

Parameters:

  | targets | Input vector of targets
  | outputMeas | Output estimated state for each target
  | partitionIdx | Input partition number (for multi-threading)

Reimplemented from opentl::modalities::Modality.

virtual int opentl::modalities::SurfFeatures::preProcess | ( | const opentl::core::cvdata::Image & | image,
|  | const std::vector< std::vector< int > > & | preProcessROIs |
| ) |  |  | `[virtual]`

Detect SURF keypoints in the current image.

Parameters:

  | image | Input sensor data (e.g. camera image in RGB)
  | preProcessROIs | Regions of interest (x0,y0,width,height), per target

Reimplemented from opentl::modalities::Modality.

virtual int opentl::modalities::SurfFeatures::sampleModelFeatures | ( | const TargetPtrVector & | targets | ) | `[virtual]`

Detect SURF keypoints from the texture map, and back-project them in object space NOTE: If this function is called with multiple targets, it will add a keyframe for each of them. Therefore, in this case the option "addKeyframes" MUST be set true, otherwise an exception will be raised.

Reimplemented from opentl::modalities::Modality.