Skip to content

Commit 9221080

Browse files
authored
Merge pull request opencv#17907 from Yosshi999:gsoc_asift-py2cpp
* Implement ASIFT in C++ * '>>' should be '> >' within a nested template * add a sample for asift usage * bugfix empty keypoints cause crash * simpler initialization for mask * suppress the number of lines * correct tex document * type casting * add descriptorsize for asift * smaller testdata for asift * more smaller test data * add OpenCV short license header
1 parent ce74285 commit 9221080

File tree

5 files changed

+777
-0
lines changed

5 files changed

+777
-0
lines changed

doc/opencv.bib

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,16 @@ @inproceedings{Kolmogorov03
584584
pages = {1033--1040},
585585
publisher = {IEEE}
586586
}
587+
@article{YM11,
588+
author = {Yu, Guoshen and Morel, Jean-Michel},
589+
title = {ASIFT: An Algorithm for Fully Affine Invariant Comparison},
590+
year = {2011},
591+
pages = {11--38},
592+
journal = {Image Processing On Line},
593+
volume = {1},
594+
doi = {10.5201/ipol.2011.my-asift},
595+
url = {http://www.ipol.im/pub/algo/my_affine_sift/}
596+
}
587597
@inproceedings{LCS11,
588598
author = {Leutenegger, Stefan and Chli, Margarita and Siegwart, Roland Yves},
589599
title = {BRISK: Binary robust invariant scalable keypoints},

modules/features2d/include/opencv2/features2d.hpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,31 @@ typedef Feature2D DescriptorExtractor;
245245
//! @{
246246

247247

248+
/** @brief Class for implementing the wrapper which makes detectors and extractors to be affine invariant,
249+
described as ASIFT in @cite YM11 .
250+
*/
251+
class CV_EXPORTS_W AffineFeature : public Feature2D
252+
{
253+
public:
254+
/**
255+
@param backend The detector/extractor you want to use as backend.
256+
@param maxTilt The highest power index of tilt factor. 5 is used in the paper as tilt sampling range n.
257+
@param minTilt The lowest power index of tilt factor. 0 is used in the paper.
258+
@param tiltStep Tilt sampling step \f$\delta_t\f$ in Algorithm 1 in the paper.
259+
@param rotateStepBase Rotation sampling step factor b in Algorithm 1 in the paper.
260+
*/
261+
CV_WRAP static Ptr<AffineFeature> create(const Ptr<Feature2D>& backend,
262+
int maxTilt = 5, int minTilt = 0, float tiltStep = 1.4142135623730951f, float rotateStepBase = 72);
263+
264+
CV_WRAP virtual void setViewParams(const std::vector<float>& tilts, const std::vector<float>& rolls) = 0;
265+
CV_WRAP virtual void getViewParams(std::vector<float>& tilts, std::vector<float>& rolls) const = 0;
266+
CV_WRAP virtual String getDefaultName() const CV_OVERRIDE;
267+
};
268+
269+
typedef AffineFeature AffineFeatureDetector;
270+
typedef AffineFeature AffineDescriptorExtractor;
271+
272+
248273
/** @brief Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform
249274
(SIFT) algorithm by D. Lowe @cite Lowe04 .
250275
*/

0 commit comments

Comments
 (0)