FastCornersDetector Class |
Namespace: Accord.Imaging
The FastCornersDetector type exposes the following members.
Name | Description | |
---|---|---|
FastCornersDetector |
Initializes a new instance of the FastCornersDetector class.
|
Name | Description | |
---|---|---|
NumberOfInputs |
Returns -1.
(Inherited from BaseFeatureExtractor<TFeature>.) | |
NumberOfOutputs |
Gets the dimensionality of the features generated by this extractor.
(Inherited from BaseFeatureExtractor<TFeature>.) | |
Scores |
Gets the scores of the each corner detected in
the previous call to Transform(Bitmap).
| |
SupportedFormats |
Gets the list of image pixel formats that are supported by
this extractor. The extractor will check whether the pixel
format of any provided images are in this list to determine
whether the image can be processed or not.
(Inherited from BaseFeatureExtractor<TFeature>.) | |
Suppress |
Gets or sets a value indicating whether non-maximum
points should be suppressed. Default is true.
| |
Threshold |
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.
|
Name | Description | |
---|---|---|
Clone() |
Creates a new object that is a copy of the current instance.
(Inherited from BaseFeatureExtractor<TFeature>.) | |
Clone(ISet<PixelFormat>) |
Creates a new object that is a copy of the current instance.
(Overrides BaseFeatureExtractor<TFeature>.Clone(ISet<PixelFormat>).) | |
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from BaseFeatureExtractor<TFeature>.) | |
Dispose(Boolean) |
Releases unmanaged and - optionally - managed resources.
(Inherited from BaseFeatureExtractor<TFeature>.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
InnerProcess |
This method should be implemented by inheriting classes to implement the
actual corners detection, transforming the input image into a list of points.
(Overrides BaseCornersDetector.InnerProcess(UnmanagedImage).) | |
InnerTransform |
This method should be implemented by inheriting classes to implement the
actual feature extraction, transforming the input image into a list of features.
(Inherited from BaseCornersDetector.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ProcessImage(Bitmap) |
Process image looking for corners.
(Inherited from BaseCornersDetector.) | |
ProcessImage(BitmapData) |
Process image looking for corners.
(Inherited from BaseCornersDetector.) | |
ProcessImage(UnmanagedImage) |
Process image looking for corners.
(Inherited from BaseCornersDetector.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Transform(Bitmap) |
Applies the transformation to an input, producing an associated output.
(Inherited from BaseFeatureExtractor<TFeature>.) | |
Transform(Bitmap[]) |
Applies the transformation to an input, producing an associated output.
(Inherited from BaseFeatureExtractor<TFeature>.) | |
Transform(UnmanagedImage) |
Applies the transformation to an input, producing an associated output.
(Inherited from BaseFeatureExtractor<TFeature>.) | |
Transform(UnmanagedImage[]) |
Applies the transformation to an input, producing an associated output.
(Inherited from BaseFeatureExtractor<TFeature>.) | |
Transform(Bitmap[],IEnumerable<TFeature>[]) |
Applies the transformation to a set of input vectors,
producing an associated set of output vectors.
(Inherited from BaseFeatureExtractor<TFeature>.) | |
Transform(UnmanagedImage[],IEnumerable<TFeature>[]) |
Applies the transformation to a set of input vectors,
producing an associated set of output vectors.
(Inherited from BaseFeatureExtractor<TFeature>.) |
Name | Description | |
---|---|---|
HasMethod |
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) | |
IsEqual |
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.) | |
To(Type) | Overloaded.
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.) | |
To<T>() | Overloaded.
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: http://svr-www.eng.cam.ac.uk/~er258/work/fast.html.
References:
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 ImageBox.Show(markers);
The resulting image is shown below:
The second example shows how to extract FAST descriptors from a standard test image:
// Let's load an example image, such as Lena, // from a standard dataset of example images: var images = new TestImages(path: localPath); Bitmap lena = images["lena.bmp"]; // Create FAST with the default parameter values: var fast = new FastCornersDetector(threshold: 20); // Use it to extract interest points from the Lena image: List<IntPoint> descriptors = fast.ProcessImage(lena); // Now those descriptors can be used to represent the image itself, such // as for example, in the Bag-of-Visual-Words approach for classification.