|
SaDVIO
|
Abstract class for feature detectors. More...
#include <aFeatureDetector.h>

Public Member Functions | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW | AFeatureDetector () |
| AFeatureDetector (int n, int n_per_cell) | |
| ~AFeatureDetector () | |
| virtual void | init ()=0 |
| Virtual function to initialize the feature detector. More... | |
| virtual void | detectAndCompute (const cv::Mat &img, const cv::Mat &mask, std::vector< cv::KeyPoint > &keypoints, cv::Mat &descriptors, int n_points=0)=0 |
| Virtual function to detect and compute features in an image. More... | |
| virtual void | computeDescriptor (const cv::Mat &img, std::vector< std::shared_ptr< AFeature >> &features)=0 |
| Virtual function to compute descriptors for a set of features. More... | |
| virtual std::vector< std::shared_ptr< AFeature > > | detectAndComputeGrid (const cv::Mat &img, const cv::Mat &mask, std::vector< std::shared_ptr< AFeature >> existing_features=std::vector< std::shared_ptr< AFeature >>())=0 |
| Virtual function to detect and compute features in a grid (bucketting). More... | |
| virtual double | computeDist (const cv::Mat &desc1, const cv::Mat &desc2) const =0 |
| Virtual function to compute the distance between two feature descriptors. More... | |
| 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 Public Member Functions | |
| 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... | |
Protected Attributes | |
| 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... | |
Abstract class for feature detectors.
This class defines the interface for feature detection and descriptor computation.
|
inline |
|
inline |
|
inline |
|
pure virtual |
Virtual function to compute descriptors for a set of features.
| img | The input image from which to compute descriptors. |
| features | A vector of features for which to compute descriptors. |
Implemented in isae::ACustomFeatureDetector, isae::CsvKeypointDetector, isae::Line2DFeatureDetector, isae::semanticBBoxFeatureDetector, and isae::AOpenCVFeatureDetector.
|
pure virtual |
Virtual function to compute the distance between two feature descriptors.
| desc1 | The first feature descriptor. |
| desc2 | The second feature descriptor. |
Implemented in isae::CsvKeypointDetector, isae::Line2DFeatureDetector, isae::cvBRISKFeatureDetector, isae::cvFASTFeatureDetector, isae::cvGFTTFeatureDetector, isae::cvKAZEFeatureDetector, isae::semanticBBoxFeatureDetector, and isae::cvORBFeatureDetector.
| void isae::AFeatureDetector::deleteUndescribedFeatures | ( | std::vector< std::shared_ptr< AFeature >> & | features | ) |
|
pure virtual |
Virtual function to detect and compute features in an image.
| img | The input image in which to detect features. |
| mask | An optional mask to specify regions of interest in the image. |
| keypoints | Output vector to store detected keypoints. |
| descriptors | Output matrix to store computed descriptors. |
| n_points | The number of points to detect (optional, default is 0 which means all). |
Implemented in isae::ACustomFeatureDetector, and isae::AOpenCVFeatureDetector.
|
pure virtual |
Virtual function to detect and compute features in a grid (bucketting).
| 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). |
Implemented in isae::AOpenCVFeatureDetector, isae::ACustomFeatureDetector, and isae::cvGFTTFeatureDetector.
|
static |
|
static |
| bool isae::AFeatureDetector::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).
| x | The x-coordinate of the top-left corner of the bounding box. |
| y | The y-coordinate of the top-left corner of the bounding box. |
| w | The width of the bounding box. |
| h | The height of the bounding box. |
| features | The vector of features to search in. |
| features_in_box | The vector to store the features found in the bounding box. |
|
inline |
|
inline |
|
pure virtual |
Virtual function to initialize the feature detector.
This method should be called before using the detector.
Implemented in isae::CsvKeypointDetector, isae::Line2DFeatureDetector, isae::cvBRISKFeatureDetector, isae::cvFASTFeatureDetector, isae::cvGFTTFeatureDetector, isae::cvKAZEFeatureDetector, isae::cvORBFeatureDetector, and isae::semanticBBoxFeatureDetector.
|
static |
Convert OpenCV keypoints and descriptors to a vector of AFeature pointers.
| keypoints | The input vector of OpenCV keypoints. |
| descriptors | The input matrix of descriptors corresponding to the keypoints. |
| features | Output vector to store the converted AFeature pointers. |
| featurelabel | Optional label for the features (default is "pointxd"). |
|
protected |
distance threshold for matching
|
protected |
the number of features per cell
|
protected |
the maximum amount of features the detector should find for any given image
1.8.17