A high-performance general-purpose compute library

FAST feature detector. More...

Functions

AFAPI features fast (const array &in, const float thr=20.0f, const unsigned arc_length=9, const bool non_max=true, const float feature_ratio=0.05f, const unsigned edge=3)
 C++ Interface for FAST feature detector. More...
 
AFAPI af_err af_fast (af_features *out, const af_array in, const float thr, const unsigned arc_length, const bool non_max, const float feature_ratio, const unsigned edge)
 C Interface for FAST feature detector. More...
 

Detailed Description

FAST feature detector.

A circle of radius 3 pixels, translating into a total of 16 pixels, is checked for sequential segments of pixels much brighter or much darker than the central one. For a pixel p to be considered a feature, there must exist a sequential segment of arc_length pixels in the circle around it such that all are greather than (p + thr) or smaller than (p - thr). After all features in the image are detected, if nonmax is true, the non-maximal suppression is applied, checking all detected features and the features detected in its 8-neighborhood and discard it if its score is non maximal.


Function Documentation

◆ af_fast()

AFAPI af_err af_fast ( af_features out,
const af_array  in,
const float  thr,
const unsigned  arc_length,
const bool  non_max,
const float  feature_ratio,
const unsigned  edge 
)

C Interface for FAST feature detector.

Parameters
[out]outstruct containing arrays for x and y coordinates and score, while array orientation is set to 0 as FAST does not compute orientation, and size is set to 1 as FAST does not compute multiple scales
[in]inarray containing a grayscale image (color images are not supported)
[in]thrFAST threshold for which a pixel of the circle around the central pixel is considered to be greater or smaller
[in]arc_lengthlength of arc (or sequential segment) to be tested, must be within range [9-16]
[in]non_maxperforms non-maximal suppression if true
[in]feature_ratiomaximum ratio of features to detect, the maximum number of features is calculated by feature_ratio * in.elements(). The maximum number of features is not based on the score, instead, features detected after the limit is reached are discarded
[in]edgeis the length of the edges in the image to be discarded by FAST (minimum is 3, as the radius of the circle)

◆ fast()

AFAPI features fast ( const array in,
const float  thr = 20.0f,
const unsigned  arc_length = 9,
const bool  non_max = true,
const float  feature_ratio = 0.05f,
const unsigned  edge = 3 
)

C++ Interface for FAST feature detector.

Parameters
[in]inarray containing a grayscale image (color images are not supported)
[in]thrFAST threshold for which a pixel of the circle around the central pixel is considered to be greater or smaller
[in]arc_lengthlength of arc (or sequential segment) to be tested, must be within range [9-16]
[in]non_maxperforms non-maximal suppression if true
[in]feature_ratiomaximum ratio of features to detect, the maximum number of features is calculated by feature_ratio * in.elements(). The maximum number of features is not based on the score, instead, features detected after the limit is reached are discarded
[in]edgeis the length of the edges in the image to be discarded by FAST (minimum is 3, as the radius of the circle)
Returns
features object containing arrays for x and y coordinates and score, while array orientation is set to 0 as FAST does not compute orientation, and size is set to 1 as FAST does not compute multiple scales