A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

Functions
fast
ArrayFire Functions | ArrayFire Functions by Category » Computer Vision » Feature detectors

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.
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.

## 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] | out | struct 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] | in | array containing a grayscale image (color images are not supported)
  [in] | thr | FAST threshold for which a pixel of the circle around the central pixel is considered to be greater or smaller
  [in] | arc_length | length of arc (or sequential segment) to be tested, must be within range [9-16]
  [in] | non_max | performs non-maximal suppression if true
  [in] | feature_ratio | maximum 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] | edge | is 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] | in | array containing a grayscale image (color images are not supported)
  [in] | thr | FAST threshold for which a pixel of the circle around the central pixel is considered to be greater or smaller
  [in] | arc_length | length of arc (or sequential segment) to be tested, must be within range [9-16]
  [in] | non_max | performs non-maximal suppression if true
  [in] | feature_ratio | maximum 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] | edge | is 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