Click or drag to resize
Accord.NET (logo) FastRetinaKeypointDetector Class
Fast Retina Keypoint (FREAK) detector.
Inheritance Hierarchy
SystemObject
  Accord.ImagingFastRetinaKeypointDetector

Namespace:  Accord.Imaging
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.4.0
Syntax
[SerializableAttribute]
public class FastRetinaKeypointDetector : IFeatureDetector<IFeatureDescriptor<byte[]>, byte[]>, 
	ICloneable, IDisposable, IFeatureDetector<FastRetinaKeypoint, byte[]>, 
	IFeatureDetector<FastRetinaKeypoint, double[]>
Request Example View Source

The FastRetinaKeypointDetector type exposes the following members.

Constructors
  NameDescription
Public methodFastRetinaKeypointDetector
Initializes a new instance of the FastRetinaKeypointDetector class.
Public methodFastRetinaKeypointDetector(Int32)
Initializes a new instance of the FastRetinaKeypointDetector class.
Public methodFastRetinaKeypointDetector(ICornersDetector)
Initializes a new instance of the FastRetinaKeypointDetector class.
Top
Properties
  NameDescription
Public propertyComputeDescriptors
Gets or sets a value indicating whether all feature points should have their descriptors computed after being detected. Default is to compute standard descriptors.
Public propertyDetector
Gets the corners detector used to generate features.
Public propertyOctaves
Gets or sets the number of octaves to use when building the feature descriptor. Default is 4.
Public propertyScale
Gets or sets the scale used when building the feature descriptor. Default is 22.
Top
Methods
  NameDescription
Public methodClone
Creates a new object that is a copy of the current instance.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected methodDispose(Boolean)
Releases unmanaged and - optionally - managed resources.
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 methodGetDescriptor
Gets the feature descriptor for the last processed image.
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 interest points.
Public methodProcessImage(BitmapData)
Process image looking for interest points.
Public methodProcessImage(UnmanagedImage)
Process image looking for interest points.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
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.)
Public Extension MethodToTOverloaded.
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 Matrix.)
Top
Remarks
The FREAK algorithm is a binary based interest point descriptor algorithm that relies in another corner
Examples

In the following example, we will see how can we extract binary descriptor vectors from a given image using the Fast Retina Keypoint Detector together a FAST corners detection algorithm.

Bitmap lena = Resources.lena512;

// The freak detector can be used with any other corners detection
// algorithm. The default corners detection method used is the FAST
// corners detection. So, let's start creating this detector first:
// 
var detector = new FastCornersDetector(60);

// Now that we have a corners detector, we can pass it to the FREAK
// feature extraction algorithm. Please note that if we leave this
// parameter empty, FAST will be used by default.
// 
var freak = new FastRetinaKeypointDetector(detector);

// Now, all we have to do is to process our image:
List<FastRetinaKeypoint> points = freak.ProcessImage(lena);

// Afterwards, we should obtain 83 feature points. We can inspect
// the feature points visually using the FeaturesMarker class as
// 
FeaturesMarker marker = new FeaturesMarker(points, scale: 20);

// And showing it on screen with
ImageBox.Show(marker.Apply(lena));

// We can also inspect the feature vectors (descriptors) associated
// with each feature point. In order to get a descriptor vector for
// any given point, we can use
// 
byte[] feature = points[42].Descriptor;

// By default, feature vectors will have 64 bytes in length. We can also
// display those vectors in more readable formats such as HEX or base64
// 
string hex = points[42].ToHex();
string b64 = points[42].ToBase64();

// The above base64 result should be:
// 
//  "3W8M/ev///ffbr/+v3f34vz//7X+f0609v//+++/1+jfq/e83/X5/+6ft3//b4uaPZf7ePb3n/P93/rIbZlf+g=="

The resulting image is shown below:

See Also