SaDVIO
|
This Class is design for CSV reading features. More...
#include <csvKeypointDetector.h>
Public Member Functions | |
CsvKeypointDetector (int n, int n_per_cell, double max_matching_dist=64) | |
void | customDetectAndCompute (const cv::Mat &img, const cv::Mat &mask, std::vector< std::shared_ptr< AFeature >> &features) override |
void | computeDescriptor (const cv::Mat &img, std::vector< std::shared_ptr< AFeature >> &features) override |
Virtual function to compute descriptors for a set of features. More... | |
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... | |
![]() | |
ACustomFeatureDetector (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... | |
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 >>()) |
Virtual function to detect and compute features in a grid (bucketting). 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) |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
const int | getDefaultNorm () const |
![]() | |
int | _defaultNorm |
![]() | |
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... | |
This Class is design for CSV reading features.
This is how it should be used: -> The convention is: timestamp.csv for each image -> The variable _folder_path indicates the folder where the csv are stored -> in customdetectAndCompute the cv::Mat contains a double with the timestamp of the image
Thus SLAMCore should be slightly edited to create the timestamp cv::Mat and pass it as argument in detectfeatures Moreover, klt tracking cannot be used because detectAndComputeAdditionnal won't work
Example:
CsvKeypointDetector csv_detector(1000); cv::Mat ts_mat = cv::Mat::zeros(1,1,CV_32F); ts_mat.at<double>(0,0) = (double)f->getTimestamp(); csv_detector.customDetectAndCompute(ts_mat, ts_mat, features); f->getSensors().at(i)->addFeatures("pointxd", features);
|
inline |
|
overridevirtual |
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. |
Implements isae::ACustomFeatureDetector.
|
overridevirtual |
Virtual function to compute the distance between two feature descriptors.
desc1 | The first feature descriptor. |
desc2 | The second feature descriptor. |
Implements isae::AFeatureDetector.
|
overridevirtual |
Implements isae::ACustomFeatureDetector.
|
overridevirtual |
Virtual function to initialize the feature detector.
This method should be called before using the detector.
Implements isae::AFeatureDetector.