Click or drag to resize
Accord.NET (logo)

FastRetinaKeypointDetector Class

Fast Retina Keypoint (FREAK) detector.
Inheritance Hierarchy
SystemObject
  Accord.ImagingBaseFeatureExtractorFastRetinaKeypoint
    Accord.ImagingBaseSparseFeatureExtractorFastRetinaKeypoint
      Accord.ImagingFastRetinaKeypointDetector

Namespace:  Accord.Imaging
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.8.0
Syntax
[SerializableAttribute]
public class FastRetinaKeypointDetector : BaseSparseFeatureExtractor<FastRetinaKeypoint>
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 propertyNumberOfInputs
Returns -1.
(Inherited from BaseFeatureExtractorTFeature.)
Public propertyNumberOfOutputs
Gets the dimensionality of the features generated by this extractor.
(Inherited from BaseFeatureExtractorTFeature.)
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.
Public propertySupportedFormats
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 BaseFeatureExtractorTFeature.)
Top
Methods
  NameDescription
Public methodClone
Creates a new object that is a copy of the current instance.
(Inherited from BaseFeatureExtractorTFeature.)
Protected methodClone(ISetPixelFormat)
Creates a new object that is a copy of the current instance.
(Overrides BaseFeatureExtractorTFeatureClone(ISetPixelFormat).)
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from BaseFeatureExtractorTFeature.)
Protected methodDispose(Boolean)
Releases unmanaged and - optionally - managed resources.
(Inherited from BaseFeatureExtractorTFeature.)
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 methodInnerTransform
This method should be implemented by inheriting classes to implement the actual feature extraction, transforming the input image into a list of features.
(Overrides BaseFeatureExtractorTFeatureInnerTransform(UnmanagedImage).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodProcessImage(Bitmap) Obsolete.
Obsolete. Please use the Transform(Bitmap) method instead.
(Inherited from BaseSparseFeatureExtractorTPoint.)
Public methodProcessImage(BitmapData) Obsolete.
Obsolete. Please use the Transform(Bitmap) method instead.
(Inherited from BaseSparseFeatureExtractorTPoint.)
Public methodProcessImage(UnmanagedImage) Obsolete.
Obsolete. Please use the Transform(Bitmap) method instead.
(Inherited from BaseSparseFeatureExtractorTPoint.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTransform(Bitmap)
Applies the transformation to an input, producing an associated output.
(Inherited from BaseFeatureExtractorTFeature.)
Public methodTransform(Bitmap)
Applies the transformation to an input, producing an associated output.
(Inherited from BaseFeatureExtractorTFeature.)
Public methodTransform(UnmanagedImage)
Applies the transformation to an input, producing an associated output.
(Inherited from BaseFeatureExtractorTFeature.)
Public methodTransform(UnmanagedImage)
Applies the transformation to an input, producing an associated output.
(Inherited from BaseFeatureExtractorTFeature.)
Public methodTransform(Bitmap, IEnumerableTFeature)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseFeatureExtractorTFeature.)
Public methodTransform(UnmanagedImage, IEnumerableTFeature)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from BaseFeatureExtractorTFeature.)
Top
Extension Methods
  NameDescription
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 MethodTo(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.)
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.)
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