Main Content

detectFASTFeatures

Detect corners using FAST algorithm

Description

points = detectFASTFeatures(I) returns a cornerPoints object points that contains information about corner features detected in the 2-D grayscale or binary input using the Features from Accelerated Segment Test (FAST) algorithm.

example

points = detectFASTFeatures(I,Name,Value) uses additional options specified by one or more name-value arguments.

Examples

collapse all

Read the image.

I = imread('cameraman.tif');

Find the corners.

corners = detectFASTFeatures(I);

Display the results.

imshow(I); hold on;
plot(corners.selectStrongest(50));

Figure contains an axes object. The hidden axes object contains 2 objects of type image, line. One or more of the lines displays its values using only markers

Input Arguments

collapse all

Input image, specified as an M-by-N 2-D grayscale or binary image. The input image must be real and nonsparse.

Data Types: single | double | int16 | uint8 | uint16 | logical

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: 'MinQuality','0.01','ROI', [50,150,100,200] specifies that the detector must use a 1% minimum accepted quality of corners within the designated region of interest. This region of interest is located at x=50, y=150. The ROI has a width of 100 pixels, and a height of 200 pixels.

Minimum accepted quality of corners, specified as the comma-separated pair consisting of 'MinQuality' and a scalar value in the range [0,1].

The minimum accepted quality of corners represents a fraction of the maximum corner metric value in the image. Larger values can be used to remove erroneous corners.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Minimum intensity difference between corner and surrounding region, specified as the comma-separated pair consisting of 'MinContrast' and a scalar value in the range (0,1).

The minimum intensity represents a fraction of the maximum value of the image class. Increasing the value reduces the number of detected corners.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Rectangular region for corner detection, specified as a comma-separated pair consisting of 'ROI' and a vector of the format [x y width height]. The first two integer values [x y] represent the location of the upper-left corner of the region of interest. The last two integer values represent the width and height.

Example: 'ROI', [50,150,100,200]

Output Arguments

collapse all

Corner points object, returned as a cornerPoints object. The object contains information about the feature points detected in the 2-D grayscale or binary input image.

References

[1] Rosten, E., and T. Drummond. "Fusing Points and Lines for High Performance Tracking," Proceedings of the IEEE International Conference on Computer Vision, Vol. 2 (October 2005): pp. 1508–1511.

Extended Capabilities

Version History

Introduced in R2013a

collapse all

R2022a: GPU Use Being Removed for detectFASTFeatures function

The detectFASTFeatures function no longer supports GPU. You can use the detectHarrisFeatures on the GPU to detect corner points instead. Although, it won't provide identical results, it might be suitable based on the application.