Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
208c1ec
Added files from http://code.opencv.org/issues/1053
Yorwba Nov 16, 2016
7c5ebb7
Hide Harris-Laplace implementation behind pimpl-creating wrapper.
Yorwba Nov 18, 2016
9a39fd8
Add test for Harris-Laplace feature detector.
Yorwba Nov 18, 2016
ea38a0b
Handle empty images in Harris-Laplace detector.
Yorwba Nov 18, 2016
3bcc759
Replace HarrisAffineFeatureDetector with more flexible AffineFeature2D
Yorwba Nov 30, 2016
0f9be52
collapse unnecessary HarrisLaplace class into HarrisLaplaceFeatureDet…
Yorwba Dec 3, 2016
b53786a
fold DoG pyramid code into harris_laplace_detector.cpp
Yorwba Dec 4, 2016
bd149f9
tuck auxiliary functions for Harris-Laplace into anonymous namespace
Yorwba Dec 4, 2016
a7096bf
use mask to filter keypoints in Harris-Laplace detector
Yorwba Dec 5, 2016
7a8811d
remove unused value of differentiation scale from calcAffineAdaptation
Yorwba Dec 5, 2016
d7e16b9
make descriptor copy in AffineFeature2D independent of the data type
Yorwba Dec 13, 2016
5f43070
Document interface for Harris-Laplace and AffineFeature2D
Yorwba Jan 3, 2017
ba52a29
Make type conversions explicit and decorate float literals with f in …
Yorwba Jan 4, 2017
d71e571
Replace usage of non-standard log2 in Harris-Laplace feature detector
Yorwba Jan 4, 2017
c6c17cd
Fix virtual overload errors in AffineFeature2D
Yorwba Jan 4, 2017
165bc10
Add basic tests for AffineFeature2D and fix what they uncover
Yorwba Jan 4, 2017
89af97f
Make type conversions in Harris-Laplace feature detector explicit
Jan 7, 2017
8ca3c4b
Change license header for Harris-Laplace detector and AffineFeature2D
Yorwba Jan 9, 2017
c77a27f
Use Matx for small matrices in AffineFeature2D
Yorwba Jan 9, 2017
27f3835
Remove redundant attributes of Elliptic_KeyPoint
Yorwba Jan 9, 2017
02a3638
Convert Matx22f to Matx22d for inverting in AffineFeature2D
Yorwba Jan 9, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions modules/xfeatures2d/doc/xfeatures2d.bib
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,14 @@ @inproceedings{BeecksUS10
publisher = {{ACM}},
year = {2010}
}

@article{Mikolajczyk2004,
title={Scale \& affine invariant interest point detectors},
author={Mikolajczyk, Krystian and Schmid, Cordelia},
journal={International journal of computer vision},
volume={60},
number={1},
pages={63--86},
year={2004},
publisher={Springer}
}
91 changes: 91 additions & 0 deletions modules/xfeatures2d/include/opencv2/xfeatures2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,97 @@ class CV_EXPORTS_W PCTSignaturesSQFD : public Algorithm

};

/**
* @brief Elliptic region around an interest point.
*/
class CV_EXPORTS Elliptic_KeyPoint : public KeyPoint
{
public:
Size_<float> axes; //!< the lengths of the major and minor ellipse axes
float si; //!< the integration scale at which the parameters were estimated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KeyPoint already have similar fields:

  • centre -> pt
  • phi -> angle
  • size -> size
  • si (float) -> octave (int)

Matx23f transf; //!< the transformation between image space and local patch space
Elliptic_KeyPoint();
Elliptic_KeyPoint(Point2f pt, float angle, Size axes, float size, float si);
virtual ~Elliptic_KeyPoint();
};

/**
* @brief Class implementing the Harris-Laplace feature detector as described in @cite Mikolajczyk2004.
*/
class CV_EXPORTS_W HarrisLaplaceFeatureDetector : public Feature2D
{
public:
/**
* @brief Creates a new implementation instance.
*
* @param numOctaves the number of octaves in the scale-space pyramid
* @param corn_thresh the threshold for the Harris cornerness measure
* @param DOG_thresh the threshold for the Difference-of-Gaussians scale selection
* @param maxCorners the maximum number of corners to consider
* @param num_layers the number of intermediate scales per octave
*/
CV_WRAP static Ptr<HarrisLaplaceFeatureDetector> create(
int numOctaves=6,
float corn_thresh=0.01f,
float DOG_thresh=0.01f,
int maxCorners=5000,
int num_layers=4);
};

/**
* @brief Class implementing affine adaptation for key points.
*
* A @ref FeatureDetector and a @ref DescriptorExtractor are wrapped to augment the
* detected points with their affine invariant elliptic region and to compute
* the feature descriptors on the regions after warping them into circles.
*
* The interface is equivalent to @ref Feature2D, adding operations for
* @ref Elliptic_KeyPoint "Elliptic_KeyPoints" instead of @ref KeyPoint "KeyPoints".
*/
class CV_EXPORTS AffineFeature2D : public Feature2D
{
public:
/**
* @brief Creates an instance wrapping the given keypoint detector and
* descriptor extractor.
*/
static Ptr<AffineFeature2D> create(
Ptr<FeatureDetector> keypoint_detector,
Ptr<DescriptorExtractor> descriptor_extractor);

/**
* @brief Creates an instance where keypoint detector and descriptor
* extractor are identical.
*/
static Ptr<AffineFeature2D> create(
Ptr<FeatureDetector> keypoint_detector)
{
return create(keypoint_detector, keypoint_detector);
}

using Feature2D::detect; // overload, don't hide
/**
* @brief Detects keypoints in the image using the wrapped detector and
* performs affine adaptation to augment them with their elliptic regions.
*/
virtual void detect(
InputArray image,
CV_OUT std::vector<Elliptic_KeyPoint>& keypoints,
InputArray mask=noArray() ) = 0;

using Feature2D::detectAndCompute; // overload, don't hide
/**
* @brief Detects keypoints and computes descriptors for their surrounding
* regions, after warping them into circles.
*/
virtual void detectAndCompute(
InputArray image,
InputArray mask,
CV_OUT std::vector<Elliptic_KeyPoint>& keypoints,
OutputArray descriptors,
bool useProvidedKeypoints=false ) = 0;
};

//! @}

}
Expand Down
Loading