- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

Functions
susan
Complete List of ArrayFire Functions ArrayFire Functions by Category » Computer Vision » | Feature detectors

SUSAN corner detector. More...

## Functions
AFAPI features | susan (const array &in, const unsigned radius=3, const float diff_thr=32.0f, const float geom_thr=10.0f, const float feature_ratio=0.05f, const unsigned edge=3)
| C++ Interface for SUSAN corner detector. More...
AFAPI af_err | af_susan (af_features *out, const af_array in, const unsigned radius, const float diff_thr, const float geom_thr, const float feature_ratio, const unsigned edge)
| C Interface for SUSAN corner detector. More...

## Detailed Description

SUSAN corner detector.

SUSAN is an acronym standing for Smallest Univalue Segment Assimilating Nucleus. This method places a circular disc over the pixel to be tested (a.k.a nucleus) to compute the corner measure of that corresponding pixel. The region covered by the circular disc is M, and a pixel in this region is represented by \(\vec{m} \in M\) where \(\vec{m}_0\) is the nucleus. Every pixel in the region is compared to the nucleus using the following comparison function:

\( c(\vec{m}) = e^{-{(({I(\vec{m}) - I(\vec{m}_0))} / t})^6}\)

where t is radius of the region, I is the brightness of the pixel.

Response of SUSAN operator is given by the following equation:

\( R(M) = \begin{cases} g - n(M) \quad \text{if } n(M) < g\\ 0 \quad \text{otherwise},\\ \end{cases}\)

where \( n(M) = \sum\nolimits_{\vec{m} \in M} c(\vec{m})\), g is named the geometric threshold and n is the number of pixels in the mask which are within t of the nucleus.

Importance of the parameters, t and g is explained below:

- t determines how similar points have to be to the nucleusbefore they are considered to be a part of the univalue segment
- g determines the minimum size of the univalue segment. For a large enough g, SUSAN operator becomes an edge dectector.

## Function Documentation

AFAPI af_err af_susan | ( | af_features * | out,
|  | const af_array | in,
|  | const unsigned | radius,
|  | const float | diff_thr,
|  | const float | geom_thr,
|  | const float | feature_ratio,
|  | const unsigned | edge
| ) |  |

C Interface for SUSAN corner detector.

Parameters

  [out] | out | is af_features struct composed of arrays for x and y coordinates, score, orientation and size of selected features
  [in] | in | is input grayscale/intensity image
  [in] | radius | nucleus radius for each pixel neighborhood
  [in] | diff_thr | intensity difference threshold a.k.a t from equations in description
  [in] | geom_thr | geometric threshold
  [in] | feature_ratio | is maximum number of features that will be returned by the function
  [in] | edge | indicates how many pixels width area should be skipped for corner detection

Returns
  AF_SUCCESS if SUSAN corner detection is successfull, otherwise an appropriate error code is returned.

Note
  If `in` is a 3d array, a batch operation will be performed.

AFAPI features af::susan | ( | const array & | in,
|  | const unsigned | radius = `3`,
|  | const float | diff_thr = `32.0f`,
|  | const float | geom_thr = `10.0f`,
|  | const float | feature_ratio = `0.05f`,
|  | const unsigned | edge = `3`
| ) |  |

C++ Interface for SUSAN corner detector.

Parameters

  [in] | in | is input grayscale/intensity image
  [in] | radius | nucleus radius for each pixel neighborhood
  [in] | diff_thr | intensity difference threshold
  [in] | geom_thr | geometric threshold a.k.a t from equations in description
  [in] | feature_ratio | is maximum number of features that will be returned by the function
  [in] | edge | indicates how many pixels width area should be skipped for corner detection

Returns
  If SUSAN corner detection is successfull returns an object of Features class, composed of arrays for x and y coordinates, score, orientation and size of selected features, otherwise exception is thrown.

Note
  If `in` is a 3d array, a batch operation will be performed.

Examples:
  susan.cpp.