Click or drag to resize
Accord.NET (logo)

FastCornersDetector Class

Features from Accelerated Segment Test (FAST) corners detector.
Inheritance Hierarchy

Namespace:  Accord.Imaging
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.7.0
public class FastCornersDetector : ICornersDetector, 
Request Example View Source

The FastCornersDetector type exposes the following members.

Public methodFastCornersDetector
Initializes a new instance of the FastCornersDetector class.
Public methodFastCornersDetector(Int32)
Initializes a new instance of the FastCornersDetector class.
Public propertyScores
Gets the scores of the each corner detected in the previous call to ProcessImage(Bitmap).
Public propertySuppress
Gets or sets a value indicating whether non-maximum points should be suppressed. Default is true.
Public propertyThreshold
Gets or sets the corner detection threshold. Increasing this value results in less corners, whereas decreasing this value will result in more corners detected by the algorithm.
Public methodClone
Creates a new object that is a copy of the current instance.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodProcessImage(Bitmap)
Process image looking for corners.
Public methodProcessImage(BitmapData)
Process image looking for corners.
Public methodProcessImage(UnmanagedImage)
Process image looking for corners.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Extension Methods
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodToT
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)

In the FAST corner detection algorithm, a pixel is defined as a corner if (in a circle surrounding the pixel), N or more contiguous pixels are all significantly brighter then or all significantly darker than the center pixel. The ordering of questions used to classify a pixel is learned using the ID3 algorithm.

This detector has been shown to exhibit a high degree of repeatability.

The code is roughly based on the 9 valued FAST corner detection algorithm implementation in C by Edward Rosten, which has been published under a 3-clause BSD license and is freely available at:


  • E. Rosten, T. Drummond. Fusing Points and Lines for High Performance Tracking, ICCV 2005.
  • E. Rosten, T. Drummond. Machine learning for high-speed corner detection, ICCV 2005

Bitmap image = ... // Lena's famous picture

// Create a new FAST Corners Detector
FastCornersDetector fast = new FastCornersDetector()
    Suppress = true, // suppress non-maximum points
    Threshold = 40   // less leads to more corners

// Process the image looking for corners
List<IntPoint> points = fast.ProcessImage(image);

// Create a filter to mark the corners
PointsMarker marker = new PointsMarker(points);

// Apply the corner-marking filter
Bitmap markers = marker.Apply(image);

// Show on the screen

The resulting image is shown below:

See Also