Documentation of 'boofcv.alg.feature.detect.interest.FastHessianFeatureDetector' Java class
FastHessianFeatureDetector
boofcv.alg.feature.detect.interest

Class FastHessianFeatureDetector<II extends ImageGray>



  • public class FastHessianFeatureDetector<II extends ImageGray>
    extends java.lang.Object

    The Fast Hessian (FH) [1] interest point detector is designed to be a fast multi-scale "blob" detector. FH is intended for use as a feature detector for SURF [1]. It works by computing an approximation of the image Hessian's determinant using "box-lets" type features. Unlike traditional scale-space algorithms the feature itself is rescaled and is efficiently computed using an integral image.

    This class is intended to be a faithful implementation of the algorithm described in [1]. Deviations from that paper are noted in the code an in the comments below. This detector can be used to implement the FH-9 and FH-15 detectors. For the FH-15 detector the input image needs to be doubled in size prior to processing and the feature location rescaled.

    Description of scale space approach, see [1] for a more detailed and complete description. Features are detected in a series of octaves. Each octave is defined as a set of scales where higher octaves contain larger scales. A scale is defined by a feature's size in pixels, the size is the feature's width/height. Improved accuracy in done by interpolating feature location in pixel coordinates and scale.

    For example, the FH-9 detector has 4 octaves with the following detector sizes:
    Octave 1: Sizes = 9,15,21,27
    Octave 2: Sizes = 15,27,39,51
    Octave 3: Sizes = 27,51,75,99
    Octave 4: Sizes = 51,99,147,195

    Features are only detected for sizes which have a size smaller and larger. For the first octave in the example above that would be for sizes 15 and 21. Sizes 9 and 27 are only used to identify local maximums in scale space.

    Note: Interpolation is performed by fitting a second order polynomial instead of a quadratic, as suggested in the paper. See comments in polyPeak(float, float, float).

    [1] Herbert Bay, Andreas Ess, Tinne Tuytelaars, and Luc Van Gool, "Speeded-Up Robust Features (SURF)", CVIU June, 2008, Volume 110, Issue 3, pages 346-359

    See Also:
    FactoryInterestPoint
    • Constructor Summary

      Constructors 
      Constructor and Description
      FastHessianFeatureDetector(NonMaxSuppression extractor, int maxFeaturesPerScale, int initialSampleRate, int initialSize, int numberScalesPerOctave, int numberOfOctaves, int scaleStepSize)
      Defines the feature detector by specifying the size of features.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void detect(II integral)
      Detect interest points inside of the image.
      java.util.List<ScalePoint> getFoundPoints()
      Returns all the found interest points.
      int getSmallestWidth()
      Returns the width of the smallest feature it can detect
      static double polyPeak(double lower, double middle, double upper) 
      static double polyPeak(double lower, double middle, double upper, double lowerVal, double middleVal, double upperVal) 
      static float polyPeak(float lower, float middle, float upper)
      Fits a second order polynomial to the data and determines the location of the peak.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FastHessianFeatureDetector

        public FastHessianFeatureDetector(NonMaxSuppression extractor,
                                          int maxFeaturesPerScale,
                                          int initialSampleRate,
                                          int initialSize,
                                          int numberScalesPerOctave,
                                          int numberOfOctaves,
                                          int scaleStepSize)

        Defines the feature detector by specifying the size of features.

        Configuration for FH-9: initialSampleSize=1, initialSize=9, numberScalesPerOctave=4, numberOfOctaves=4
        Configuration for FH-15: initialSampleSize=1, initialSize=15, numberScalesPerOctave=5, numberOfOctaves=4
        * Note that FH-15 requires the image to be up sampled first. See [1] for details.

        Parameters:
        extractor - Feature extractor used to find local maximums in 2D image.
        maxFeaturesPerScale - Maximum number of features it can find per image scale. If set ≤ 0 then the all potential features will be returned, which is how it is in the original paper.
        initialSampleRate - How often pixels are sampled in the first octave.
        initialSize - Size/width of the smallest feature/kernel in the lowest octave.
        numberScalesPerOctave - How many different feature sizes are considered in a single octave
        numberOfOctaves - How many different octaves are considered.
        scaleStepSize - Increment between kernel sizes as it goes up in scale. Try 6
    • Method Detail

      • detect

        public void detect(II integral)
        Detect interest points inside of the image.
        Parameters:
        integral - Image transformed into an integral image.
      • polyPeak

        public static float polyPeak(float lower,
                                     float middle,
                                     float upper)

        Fits a second order polynomial to the data and determines the location of the peak.
        y = a*x2+b*x + c
        x = {-1,0,1}
        y = Feature value

        Note: The original paper fit a 3D Quadratic to the data instead. This required the first and second derivative of the Laplacian to be estimated. Such estimates are error prone and using the technique found in OpenSURF produced erratic results and required some hackery to get to work. This should always produce stable results and is much faster.

        Parameters:
        lower - Value at x=-1
        middle - Value at x=0
        upper - Value at x=1
        Returns:
        x-coordinate of the peak
      • polyPeak

        public static double polyPeak(double lower,
                                      double middle,
                                      double upper)
      • polyPeak

        public static double polyPeak(double lower,
                                      double middle,
                                      double upper,
                                      double lowerVal,
                                      double middleVal,
                                      double upperVal)
      • getFoundPoints

        public java.util.List<ScalePoint> getFoundPoints()
        Returns all the found interest points.
        Returns:
        Found interest points.
      • getSmallestWidth

        public int getSmallestWidth()
        Returns the width of the smallest feature it can detect

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.