Skip to content

Commit 1c58015

Browse files
author
baudenri
committed
Enabled FAST feature detection on specific image locations
Some applications only want to know if there are feature at specific locations. To fit these needs the FAST approach is extended in FASTForPointSet to recieve a vector of locations and calculates the FAST response on these positions. If it is below the threshold, it will be removed from the list.
1 parent 5e008c8 commit 1c58015

File tree

2 files changed

+539
-0
lines changed

2 files changed

+539
-0
lines changed

modules/xfeatures2d/include/opencv2/xfeatures2d.hpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,32 @@ class CV_EXPORTS_W DAISY : public Feature2D
259259
};
260260

261261

262+
263+
/** @brief Estimates cornerness for prespecified KeyPoints using the FAST algorithm
264+
265+
@param image grayscale image where keypoints (corners) are detected.
266+
@param keypoints keypoints which should be tested to fit the FAST criteria. Keypoints not beeing
267+
detected as corners are removed.
268+
@param threshold threshold on difference between intensity of the central pixel and pixels of a
269+
circle around this pixel.
270+
@param nonmaxSuppression if true, non-maximum suppression is applied to detected corners
271+
(keypoints).
272+
@param type one of the three neighborhoods as defined in the paper:
273+
FastFeatureDetector::TYPE_9_16, FastFeatureDetector::TYPE_7_12,
274+
FastFeatureDetector::TYPE_5_8
275+
276+
Detects corners using the FAST algorithm by @cite Rosten06 .
277+
*/
278+
CV_EXPORTS void FASTForPointSet( InputArray image, CV_IN_OUT std::vector<KeyPoint>& keypoints,
279+
int threshold, bool nonmaxSuppression=true, int type=FastFeatureDetector::TYPE_9_16);
280+
281+
282+
void makeOffsets(int pixel[25], int row_stride, int patternSize);
283+
284+
template<int patternSize>
285+
int cornerScore(const uchar* ptr, const int pixel[], int threshold);
286+
287+
262288
//! @}
263289

264290
}

0 commit comments

Comments
 (0)