|
vocabtree
0.0.1
|
Provides useful wrappers around many OpenCV functions as well as some simple vision - based routines. More...
Data Structures | |
| struct | SIFTParams |
| Describes SIFT extraction parameters when calling OpenCV's SIFT implementation. More... | |
Typedefs | |
| typedef std::set< std::pair < int, int > > | MatchesSet |
Functions | |
| void | geo_verify_f (const cv::Mat &descriptors0, const cv::Mat &points0, const cv::Mat &descriptors1, const cv::Mat &points1, cv::detail::MatchesInfo &matches_info, std::vector< uint32_t > *inliers0=0, std::vector< uint32_t > *inliers1=0) |
| Computes a fundamental matrix between the input pairs of points and descriptors and returns the result in MatchesInfo (including fundamental, confidence score, etc.) If output inlier vectors are provided, will insert a list of feature indices belonging to the fundamental inliers. More... | |
| void | geo_verify_h (const cv::Mat &descriptors0, const cv::Mat &points0, const cv::Mat &descriptors1, const cv::Mat &points1, cv::detail::MatchesInfo &matches_info, std::vector< uint32_t > *inliers0=0, std::vector< uint32_t > *inliers1=0) |
| Computes a homography between the input pairs of points and descriptors and returns the result in MatchesInfo (including homography, confidence score, etc.) If output inlier vectors are provided, will insert a list of feature indices belonging to the homography inliers. More... | |
| bool | compute_sparse_sift_feature (const cv::Mat &img, const std::shared_ptr< const SIFTParams > ¶ms, cv::Mat &keypoints, cv::Mat &descriptors) |
| Given a grayscale image, img, and SIFT extraction parameters computes sparse sift features. More... | |
| bool | compute_bow_feature (const cv::Mat &descriptors, const cv::Ptr< cv::DescriptorMatcher > &matcher, cv::Mat &bow_descriptors, std::shared_ptr< std::vector< std::vector< uint32_t > > > cluster_indices) |
| Given a set of image descriptors, a descriptor matcher computes the the cluster match based on the matcher of each descriptor and returns the histogram of clusters. More... | |
| cv::Ptr< cv::DescriptorMatcher > | construct_descriptor_matcher (const cv::Mat &vocabulary) |
| Given a vocabulary constructs a FLANN based matcher needed to compute Bag of Words (BoW) features. More... | |
| cv::Mat | merge_descriptors (std::vector< cv::Mat > &descriptors, bool release_original=true) |
| Merges the descriptors into a single matrix. More... | |
| bool | is_good_match (const cv::detail::MatchesInfo &matches_info) |
| Returns true if matches_info represents a good match, false if otherwise. More... | |
Provides useful wrappers around many OpenCV functions as well as some simple vision - based routines.
| typedef std::set<std::pair<int,int> > vision::MatchesSet |
Definition at line 11 of file vision.hpp.
| bool vision::compute_bow_feature | ( | const cv::Mat & | descriptors, |
| const cv::Ptr< cv::DescriptorMatcher > & | matcher, | ||
| cv::Mat & | bow_descriptors, | ||
| std::shared_ptr< std::vector< std::vector< uint32_t > > > | cluster_indices | ||
| ) |
Given a set of image descriptors, a descriptor matcher computes the the cluster match based on the matcher of each descriptor and returns the histogram of clusters.
If cluster_indices is not null, it will also return the cluster assignment of each descriptor vector. Returns true if successful, false otherwise.
Definition at line 221 of file vision.cxx.
Referenced by compute_bow(), compute_bow_features(), and main().
| bool vision::compute_sparse_sift_feature | ( | const cv::Mat & | img, |
| const std::shared_ptr< const SIFTParams > & | params, | ||
| cv::Mat & | keypoints, | ||
| cv::Mat & | descriptors | ||
| ) |
Given a grayscale image, img, and SIFT extraction parameters computes sparse sift features.
If params is a nullptr, we use the default settings for SIFTParams. Returns true if successful, false otherwise.
Definition at line 187 of file vision.cxx.
Referenced by compute_features(), and main().
| cv::Ptr< cv::DescriptorMatcher > vision::construct_descriptor_matcher | ( | const cv::Mat & | vocabulary | ) |
Given a vocabulary constructs a FLANN based matcher needed to compute Bag of Words (BoW) features.
Expects the vocabulary to be in the same format as computed in the search module.
Definition at line 250 of file vision.cxx.
Referenced by compute_bow(), compute_bow_features(), and main().
| void vision::geo_verify_f | ( | const cv::Mat & | descriptors0, |
| const cv::Mat & | points0, | ||
| const cv::Mat & | descriptors1, | ||
| const cv::Mat & | points1, | ||
| cv::detail::MatchesInfo & | matches_info, | ||
| std::vector< uint32_t > * | inliers0 = 0, |
||
| std::vector< uint32_t > * | inliers1 = 0 |
||
| ) |
Computes a fundamental matrix between the input pairs of points and descriptors and returns the result in MatchesInfo (including fundamental, confidence score, etc.) If output inlier vectors are provided, will insert a list of feature indices belonging to the fundamental inliers.
Definition at line 7 of file vision.cxx.
Referenced by bench_oxford(), and benchmark_dataset().
| void vision::geo_verify_h | ( | const cv::Mat & | descriptors0, |
| const cv::Mat & | points0, | ||
| const cv::Mat & | descriptors1, | ||
| const cv::Mat & | points1, | ||
| cv::detail::MatchesInfo & | matches_info, | ||
| std::vector< uint32_t > * | inliers0 = 0, |
||
| std::vector< uint32_t > * | inliers1 = 0 |
||
| ) |
Computes a homography between the input pairs of points and descriptors and returns the result in MatchesInfo (including homography, confidence score, etc.) If output inlier vectors are provided, will insert a list of feature indices belonging to the homography inliers.
Definition at line 98 of file vision.cxx.
| bool vision::is_good_match | ( | const cv::detail::MatchesInfo & | matches_info | ) |
Returns true if matches_info represents a good match, false if otherwise.
The heuristic is based on the total number of inliers and the ratio of inliers to outliers.
Definition at line 273 of file vision.cxx.
Referenced by bench_oxford(), and benchmark_dataset().
| cv::Mat vision::merge_descriptors | ( | std::vector< cv::Mat > & | descriptors, |
| bool | release_original = true |
||
| ) |
Merges the descriptors into a single matrix.
This is useful for clustering, which requires a single matrix.
Definition at line 256 of file vision.cxx.
Referenced by VocabTree::train(), and BagOfWords::train().