Class for detecting and computing GFTT (Good Features To Track) features using OpenCV.
More...
#include <cvGFTTFeatureDetector.h>
|
| cvGFTTFeatureDetector (int n, int n_per_cell, double max_matching_dist=64) |
|
void | init () override |
| Virtual function to initialize the feature detector. More...
|
|
double | computeDist (const cv::Mat &desc1, const cv::Mat &desc2) const override |
| Virtual function to compute the distance between two feature descriptors. More...
|
|
std::vector< std::shared_ptr< AFeature > > | detectAndComputeGrid (const cv::Mat &img, const cv::Mat &mask, std::vector< std::shared_ptr< AFeature >> existing_features) override |
| Virtual function to detect and compute features in a grid (bucketting). More...
|
|
| AOpenCVFeatureDetector (int n, int n_per_cell) |
|
void | detectAndCompute (const cv::Mat &img, const cv::Mat &mask, std::vector< cv::KeyPoint > &keypoints, cv::Mat &descriptors, int n_points=0) |
| Virtual function to detect and compute features in an image. More...
|
|
void | computeDescriptor (const cv::Mat &img, std::vector< std::shared_ptr< AFeature >> &features) |
| Virtual function to compute descriptors for a set of features. More...
|
|
void | retainBest (std::vector< cv::KeyPoint > &_keypoints, int n) |
| Retain the n best keypoints based on their response. More...
|
|
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | AFeatureDetector () |
|
| AFeatureDetector (int n, int n_per_cell) |
|
| ~AFeatureDetector () |
|
size_t | getNbDesiredFeatures () |
|
double | getMaxMatchingDist () const |
|
bool | getFeaturesInBox (int x, int y, int w, int h, const std::vector< std::shared_ptr< AFeature >> &features, std::vector< std::shared_ptr< AFeature >> &features_in_box) const |
| Get features from a feature set in a bounding box defined by (x, y, w, h). More...
|
|
void | deleteUndescribedFeatures (std::vector< std::shared_ptr< AFeature >> &features) |
|
|
static void | KeypointToFeature (std::vector< cv::KeyPoint > keypoints, cv::Mat descriptors, std::vector< std::shared_ptr< AFeature >> &features, const std::string &featurelabel="pointxd") |
| Convert OpenCV keypoints and descriptors to a vector of AFeature pointers. More...
|
|
static void | FeatureToKeypoint (std::vector< std::shared_ptr< AFeature >> features, std::vector< cv::KeyPoint > &keypoints, cv::Mat &descriptors) |
| Convert a vector of AFeature pointers to OpenCV keypoints and descriptors. More...
|
|
static void | FeatureToP2f (std::vector< std::shared_ptr< AFeature >> features, std::vector< cv::Point2f > &p2fs) |
| Convert a vector of AFeature pointers to a vector of cv::Point2f. More...
|
|
cv::Ptr< cv::FeatureDetector > | _detector |
| Stores the opencv detector. More...
|
|
cv::Ptr< cv::DescriptorExtractor > | _descriptor |
| Stores the opencv descriptor extractor. More...
|
|
int | _n_total |
| the maximum amount of features the detector should find for any given image More...
|
|
int | _n_per_cell |
| the number of features per cell More...
|
|
double | _max_matching_dist |
| distance threshold for matching More...
|
|
Class for detecting and computing GFTT (Good Features To Track) features using OpenCV.
◆ cvGFTTFeatureDetector()
isae::cvGFTTFeatureDetector::cvGFTTFeatureDetector |
( |
int |
n, |
|
|
int |
n_per_cell, |
|
|
double |
max_matching_dist = 64 |
|
) |
| |
|
inline |
◆ computeDist()
double isae::cvGFTTFeatureDetector::computeDist |
( |
const cv::Mat & |
desc1, |
|
|
const cv::Mat & |
desc2 |
|
) |
| const |
|
inlineoverridevirtual |
Virtual function to compute the distance between two feature descriptors.
- Parameters
-
desc1 | The first feature descriptor. |
desc2 | The second feature descriptor. |
Implements isae::AFeatureDetector.
◆ detectAndComputeGrid()
std::vector< std::shared_ptr< AFeature > > isae::cvGFTTFeatureDetector::detectAndComputeGrid |
( |
const cv::Mat & |
img, |
|
|
const cv::Mat & |
mask, |
|
|
std::vector< std::shared_ptr< AFeature >> |
existing_features |
|
) |
| |
|
overridevirtual |
Virtual function to detect and compute features in a grid (bucketting).
- Parameters
-
img | The input image in which to detect features. |
mask | An optional mask to specify regions of interest in the image. |
existing_features | A vector of existing features to consider (optional). |
Reimplemented from isae::AOpenCVFeatureDetector.
◆ init()
void isae::cvGFTTFeatureDetector::init |
( |
| ) |
|
|
inlineoverridevirtual |
Virtual function to initialize the feature detector.
This method should be called before using the detector.
Implements isae::AFeatureDetector.
The documentation for this class was generated from the following files: