8 #ifndef META_OCEAN_CV_DETECTOR_FAST_FEATURE_DETECTOR_H
9 #define META_OCEAN_CV_DETECTOR_FAST_FEATURE_DETECTOR_H
42 FD_FRAME_IS_DISTORTED =
false,
44 FD_FRAME_IS_UNDISTORTED =
true,
53 SM_APPROXIMATED =
false,
78 static inline bool detectFeatures(
const Frame& frame,
const unsigned int threshold,
const bool frameIsUndistorted,
const bool preciseScoring,
FASTFeatures& features,
Worker* worker =
nullptr);
95 static bool detectFeatures(
const Frame& frame,
const unsigned int subRegionLeft,
const unsigned int subRegionTop,
const unsigned int subRegionWidth,
const unsigned int subRegionHeight,
const unsigned int threshold,
const bool frameIsUndistorted,
const bool preciseScoring,
FASTFeatures& features,
Worker* worker =
nullptr);
119 static inline void detectFeatures(
const uint8_t* yFrame,
const unsigned int width,
const unsigned int height,
const unsigned int threshold,
const bool frameIsUndistorted,
const bool preciseScoring,
FASTFeatures& features,
const unsigned int framePaddingElements,
Worker* worker =
nullptr);
137 static void detectFeatures(
const uint8_t* yFrame,
const unsigned int width,
const unsigned int height,
const unsigned int subRegionLeft,
const unsigned int subRegionTop,
const unsigned int subRegionWidth,
const unsigned int subRegionHeight,
const unsigned int threshold,
const bool frameIsUndistorted,
const bool preciseScoring,
FASTFeatures& features,
const unsigned int framePaddingElements,
Worker* worker =
nullptr);
154 static void detectFeatureCandidatesSubset(
const uint8_t* yFrame,
const unsigned int width,
const unsigned int height,
const unsigned int threshold,
NonMaximumSuppressionVote* nonMaximumSuppression,
const unsigned int firstColumn,
const unsigned int numberColumns,
const unsigned int framePaddingElements,
const unsigned int firstRow,
const unsigned int numberRows);
167 static void scoreFeaturesPrecise(
const uint8_t* yFrame,
const unsigned int width,
const unsigned int height,
const unsigned int threshold,
FASTFeatures& features,
const unsigned int framePaddingElements,
Worker* worker =
nullptr);
180 static void scoreFeaturesPreciseSubset(
const uint8_t* yFrame,
const unsigned int width,
const unsigned int height,
const unsigned int threshold,
FASTFeatures* features,
const unsigned int framePaddingElements,
const unsigned int firstFeature,
const unsigned int numberFeatures);
191 static void scoreFeaturePrecise(
const uint8_t* yFrame,
const unsigned int width,
const unsigned int height,
const unsigned int threshold,
FASTFeature& feature,
const unsigned int framePaddingElements);
196 constexpr
unsigned int subRegionLeft = 0u;
197 constexpr
unsigned int subRegionTop = 0u;
199 return detectFeatures(frame, subRegionLeft, subRegionTop, frame.
width(), frame.
height(), threshold, frameIsUndistorted, preciseScoring, features, worker);
202 inline void FASTFeatureDetector::detectFeatures(
const uint8_t* yFrame,
const unsigned int width,
const unsigned int height,
const unsigned int threshold,
const bool frameIsUndistorted,
const bool preciseScoring,
FASTFeatures& features,
const unsigned int framePaddingElements,
Worker* worker)
204 constexpr
unsigned int subRegionLeft = 0u;
205 constexpr
unsigned int subRegionTop = 0u;
207 detectFeatures(yFrame, width, height, subRegionLeft, subRegionTop, width, height, threshold, frameIsUndistorted, preciseScoring, features, framePaddingElements, worker);
The following comfort class provides comfortable functions simplifying prototyping applications but a...
Definition: FASTFeatureDetector.h:64
static bool detectFeatures(const Frame &frame, const unsigned int subRegionLeft, const unsigned int subRegionTop, const unsigned int subRegionWidth, const unsigned int subRegionHeight, const unsigned int threshold, const bool frameIsUndistorted, const bool preciseScoring, FASTFeatures &features, Worker *worker=nullptr)
Detects FAST features inside a narrow area of a given frame and can distribute the computation to sev...
static bool detectFeatures(const Frame &frame, const unsigned int threshold, const bool frameIsUndistorted, const bool preciseScoring, FASTFeatures &features, Worker *worker=nullptr)
Detects FAST features inside a given frame and can distribute the computation to several CPU cores.
Definition: FASTFeatureDetector.h:194
This class implements a FAST feature detector.
Definition: FASTFeatureDetector.h:33
static void scoreFeaturesPreciseSubset(const uint8_t *yFrame, const unsigned int width, const unsigned int height, const unsigned int threshold, FASTFeatures *features, const unsigned int framePaddingElements, const unsigned int firstFeature, const unsigned int numberFeatures)
Applies a more precise feature scoring using a binary threshold search to a subset of the given featu...
static void scoreFeaturesPrecise(const uint8_t *yFrame, const unsigned int width, const unsigned int height, const unsigned int threshold, FASTFeatures &features, const unsigned int framePaddingElements, Worker *worker=nullptr)
Applies a more precise feature scoring using a binary threshold search.
static void detectFeatures(const uint8_t *yFrame, const unsigned int width, const unsigned int height, const unsigned int threshold, const bool frameIsUndistorted, const bool preciseScoring, FASTFeatures &features, const unsigned int framePaddingElements, Worker *worker=nullptr)
Detects FAST features inside a given frame.
Definition: FASTFeatureDetector.h:202
static void detectFeatureCandidatesSubset(const uint8_t *yFrame, const unsigned int width, const unsigned int height, const unsigned int threshold, NonMaximumSuppressionVote *nonMaximumSuppression, const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int framePaddingElements, const unsigned int firstRow, const unsigned int numberRows)
Detects candidates of FAST features inside a sub region of a given frame.
static void detectFeatures(const uint8_t *yFrame, const unsigned int width, const unsigned int height, const unsigned int subRegionLeft, const unsigned int subRegionTop, const unsigned int subRegionWidth, const unsigned int subRegionHeight, const unsigned int threshold, const bool frameIsUndistorted, const bool preciseScoring, FASTFeatures &features, const unsigned int framePaddingElements, Worker *worker=nullptr)
Detects FAST features inside a sub-region of a given frame.
ScoringMethod
Definition of a boolean enum for scoring methods (to improve code readability).
Definition: FASTFeatureDetector.h:51
FrameDistortion
Definition of a boolean enum for frame un-/distortion properties (to improve code readability).
Definition: FASTFeatureDetector.h:40
NonMaximumSuppression< uint32_t > NonMaximumSuppressionVote
Definition of a maximum suppression object holding integer strength parameters.
Definition: FASTFeatureDetector.h:103
static void scoreFeaturePrecise(const uint8_t *yFrame, const unsigned int width, const unsigned int height, const unsigned int threshold, FASTFeature &feature, const unsigned int framePaddingElements)
Applies a more precise feature scoring using a binary threshold search for one feature.
This class implements a FAST feature.
Definition: FASTFeature.h:37
This class implements the possibility to find local maximum in a 2D array by applying a non-maximum-s...
Definition: NonMaximumSuppression.h:41
This class implements Ocean's image class.
Definition: Frame.h:1792
unsigned int width() const
Returns the width of the frame format in pixel.
Definition: Frame.h:3143
unsigned int height() const
Returns the height of the frame in pixel.
Definition: Frame.h:3148
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
std::vector< FASTFeature > FASTFeatures
Definition of a vector holding FAST features.
Definition: FASTFeature.h:24
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15