Documentation of 'boofcv.alg.feature.describe.DescribePointSurf' Java class
DescribePointSurf
boofcv.alg.feature.describe

Class DescribePointSurf<II extends ImageGray>

  • Direct Known Subclasses:
    DescribePointSurfMod


    public class DescribePointSurf<II extends ImageGray>
    extends java.lang.Object

    Implementation of the SURF feature descriptor, see [1]. SURF features are invariant to illumination, scale, and orientation. Both the orientated and unoriented varieties can be computed. SURF-64 describes an interest point using a 64 values that are computed from 16 sub regions. Each sub-region contributes 4 features, the sum of dx,|dx|,dy,|dy|, where dx and dy are the local derivatives.

    To improve performance (stability and/or computational) there are a few (intentional) deviations from the original paper.

    • Haar wavelet or image derivative can be used.
    • Derivative sample coordinates are interpolated by rounding to the nearest integer.
    • Weighting function is applied to each sub region as a whole and not to each wavelet inside the sub region. This allows the weight to be precomputed once. Unlikely to degrade quality significantly.

    Usage Notes:
    If the input image is floating point then normalizing it will very slightly improves stability. Normalization in this situation means dividing the input image by the maximum pixel intensity value, typically 255. In stability benchmarks it slightly change the results, but not enough to justify the runtime performance hit.

    [1] Bay, Herbert and Ess, Andreas and Tuytelaars, Tinne and Van Gool, Luc, "Speeded-Up Robust Features (SURF)" Comput. Vis. Image Underst., vol 110, issue 3, 2008

    • Constructor Summary

      Constructors 
      Constructor and Description
      DescribePointSurf(java.lang.Class<II> inputType)
      Create a SURF-64 descriptor.
      DescribePointSurf(int widthLargeGrid, int widthSubRegion, int widthSample, double weightSigma, boolean useHaar, java.lang.Class<II> inputType)
      Creates a SURF descriptor of arbitrary dimension by changing how the local region is sampled.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean computeLaplaceSign(int x, int y, double scale)
      Compute the sign of the Laplacian using a sparse convolution.
      BrightFeature createDescription() 
      void describe(double x, double y, double angle, double scale, BrightFeature ret)
      Computes the SURF descriptor for the specified interest point.
      void describe(double x, double y, double angle, double scale, TupleDesc_F64 ret)
      Compute SURF descriptor, but without laplacian sign
      void features(double c_x, double c_y, double c, double s, double scale, SparseImageGradient gradient, double[] features)
      Computes features in the SURF descriptor.
      int getCanonicalWidth()
      Width of sampled region when sampling is aligned with image pixels
      int getDescriptionLength() 
      void setImage(II integralImage) 
      • Methods inherited from class java.lang.Object

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

      • DescribePointSurf

        public DescribePointSurf(int widthLargeGrid,
                                 int widthSubRegion,
                                 int widthSample,
                                 double weightSigma,
                                 boolean useHaar,
                                 java.lang.Class<II> inputType)
        Creates a SURF descriptor of arbitrary dimension by changing how the local region is sampled.
        Parameters:
        widthLargeGrid - Number of sub-regions wide the large grid is. Typically 4
        widthSubRegion - Number of sample points wide a sub-region is. Typically 5
        widthSample - The width of a sample point. Typically 4
        weightSigma - Weighting factor's sigma. Try 3.8
        useHaar - If true the Haar wavelet will be used (what was used in [1]), false means an image gradient approximation will be used. False is recommended.
      • DescribePointSurf

        public DescribePointSurf(java.lang.Class<II> inputType)
        Create a SURF-64 descriptor. See [1] for details.
    • Method Detail

      • setImage

        public void setImage(II integralImage)
      • describe

        public void describe(double x,
                             double y,
                             double angle,
                             double scale,
                             BrightFeature ret)

        Computes the SURF descriptor for the specified interest point. If the feature goes outside of the image border (including convolution kernels) then null is returned.

        Parameters:
        x - Location of interest point.
        y - Location of interest point.
        angle - The angle the feature is pointing at in radians.
        scale - Scale of the interest point. Null is returned if the feature goes outside the image border.
        ret - storage for the feature. Must have 64 values.
      • describe

        public void describe(double x,
                             double y,
                             double angle,
                             double scale,
                             TupleDesc_F64 ret)
        Compute SURF descriptor, but without laplacian sign
        Parameters:
        x - Location of interest point.
        y - Location of interest point.
        angle - The angle the feature is pointing at in radians.
        scale - Scale of the interest point. Null is returned if the feature goes outside the image border.
        ret - storage for the feature. Must have 64 values.
      • features

        public void features(double c_x,
                             double c_y,
                             double c,
                             double s,
                             double scale,
                             SparseImageGradient gradient,
                             double[] features)

        Computes features in the SURF descriptor.

        Deviation from paper:

        • Weighting function is applied to each sub region as a whole and not to each wavelet inside the sub region. This allows the weight to be precomputed once. Unlikely to degrade quality significantly.

        Parameters:
        c_x - Center of the feature x-coordinate.
        c_y - Center of the feature y-coordinate.
        c - cosine of the orientation
        s - sine of the orientation
        scale - The scale of the wavelets.
        features - Where the features are written to. Must be 4*(widthLargeGrid*widthSubRegion)^2 large.
      • computeLaplaceSign

        public boolean computeLaplaceSign(int x,
                                          int y,
                                          double scale)
        Compute the sign of the Laplacian using a sparse convolution.
        Parameters:
        x - center
        y - center
        scale - scale of the feature
        Returns:
        true if positive
      • getDescriptionLength

        public int getDescriptionLength()
      • getCanonicalWidth

        public int getCanonicalWidth()
        Width of sampled region when sampling is aligned with image pixels
        Returns:
        width of descriptor sample

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.