SURF

Objective-C

@interface SURF : Feature2D

Swift

class SURF : Feature2D

Class for extracting Speeded Up Robust Features from an image CITE: Bay06 .

The algorithm parameters:

  • member int extended
    • 0 means that the basic descriptors (64 elements each) shall be computed
    • 1 means that the extended descriptors (128 elements each) shall be computed
  • member int upright
    • 0 means that detector computes orientation of each feature.
    • 1 means that the orientation is not computed (which is much, much faster). For example, if you match images from a stereo pair, or do image stitching, the matched features likely have very similar angles, and you can speed up feature extraction by setting upright=1.
  • member double hessianThreshold Threshold for the keypoint detector. Only features, whose hessian is larger than hessianThreshold are retained by the detector. Therefore, the larger the value, the less keypoints you will get. A good default value could be from 300 to 500, depending from the image contrast.
  • member int nOctaves The number of a gaussian pyramid octaves that the detector uses. It is set to 4 by default. If you want to get very large features, use the larger value. If you want just small features, decrease it.
  • member int nOctaveLayers The number of images within each octave of a gaussian pyramid. It is set to 2 by default. @note
    • An example using the SURF feature detector can be found at opencv_source_code/samples/cpp/generic_descriptor_match.cpp
      • Another example using the SURF feature detector, extractor and matcher can be found at opencv_source_code/samples/cpp/matcher_simple.cpp

Member of Xfeatures2d

Methods

  • Declaration

    Objective-C

    + (nonnull SURF *)create:(double)hessianThreshold
                    nOctaves:(int)nOctaves
               nOctaveLayers:(int)nOctaveLayers
                    extended:(BOOL)extended
                     upright:(BOOL)upright;

    Swift

    class func create(hessianThreshold: Double, nOctaves: Int32, nOctaveLayers: Int32, extended: Bool, upright: Bool) -> SURF

    Parameters

    hessianThreshold

    Threshold for hessian keypoint detector used in SURF.

    nOctaves

    Number of pyramid octaves the keypoint detector will use.

    nOctaveLayers

    Number of octave layers within each octave.

    extended

    Extended descriptor flag (true - use extended 128-element descriptors; false - use 64-element descriptors).

    upright

    Up-right or rotated features flag (true - do not compute orientation of features; false - compute orientation).

  • Declaration

    Objective-C

    + (nonnull SURF *)create:(double)hessianThreshold
                    nOctaves:(int)nOctaves
               nOctaveLayers:(int)nOctaveLayers
                    extended:(BOOL)extended;

    Swift

    class func create(hessianThreshold: Double, nOctaves: Int32, nOctaveLayers: Int32, extended: Bool) -> SURF

    Parameters

    hessianThreshold

    Threshold for hessian keypoint detector used in SURF.

    nOctaves

    Number of pyramid octaves the keypoint detector will use.

    nOctaveLayers

    Number of octave layers within each octave.

    extended

    Extended descriptor flag (true - use extended 128-element descriptors; false - use 64-element descriptors). false - compute orientation).

  • Declaration

    Objective-C

    + (nonnull SURF *)create:(double)hessianThreshold
                    nOctaves:(int)nOctaves
               nOctaveLayers:(int)nOctaveLayers;

    Swift

    class func create(hessianThreshold: Double, nOctaves: Int32, nOctaveLayers: Int32) -> SURF

    Parameters

    hessianThreshold

    Threshold for hessian keypoint detector used in SURF.

    nOctaves

    Number of pyramid octaves the keypoint detector will use.

    nOctaveLayers

    Number of octave layers within each octave. 64-element descriptors). false - compute orientation).

  • Declaration

    Objective-C

    + (nonnull SURF *)create:(double)hessianThreshold nOctaves:(int)nOctaves;

    Swift

    class func create(hessianThreshold: Double, nOctaves: Int32) -> SURF

    Parameters

    hessianThreshold

    Threshold for hessian keypoint detector used in SURF.

    nOctaves

    Number of pyramid octaves the keypoint detector will use. 64-element descriptors). false - compute orientation).

  • Declaration

    Objective-C

    + (nonnull SURF *)create:(double)hessianThreshold;

    Swift

    class func create(hessianThreshold: Double) -> SURF

    Parameters

    hessianThreshold

    Threshold for hessian keypoint detector used in SURF. 64-element descriptors). false - compute orientation).

  • 64-element descriptors). false - compute orientation).

    Declaration

    Objective-C

    + (nonnull SURF *)create;

    Swift

    class func create() -> SURF
  • Declaration

    Objective-C

    - (BOOL)getExtended NS_SWIFT_NAME(getExtended());

    Swift

    func getExtended() -> Bool
  • Declaration

    Objective-C

    - (BOOL)getUpright NS_SWIFT_NAME(getUpright());

    Swift

    func getUpright() -> Bool
  • Declaration

    Objective-C

    - (double)getHessianThreshold NS_SWIFT_NAME(getHessianThreshold());

    Swift

    func getHessianThreshold() -> Double
  • Declaration

    Objective-C

    - (int)getNOctaveLayers NS_SWIFT_NAME(getNOctaveLayers());

    Swift

    func getNOctaveLayers() -> Int32
  • Declaration

    Objective-C

    - (int)getNOctaves NS_SWIFT_NAME(getNOctaves());

    Swift

    func getNOctaves() -> Int32
  • Declaration

    Objective-C

    - (void)setExtended:(BOOL)extended NS_SWIFT_NAME(setExtended(extended:));

    Swift

    func setExtended(extended: Bool)
  • Declaration

    Objective-C

    - (void)setHessianThreshold:(double)hessianThreshold NS_SWIFT_NAME(setHessianThreshold(hessianThreshold:));

    Swift

    func setHessianThreshold(hessianThreshold: Double)
  • Declaration

    Objective-C

    - (void)setNOctaveLayers:(int)nOctaveLayers NS_SWIFT_NAME(setNOctaveLayers(nOctaveLayers:));

    Swift

    func setNOctaveLayers(nOctaveLayers: Int32)
  • Declaration

    Objective-C

    - (void)setNOctaves:(int)nOctaves NS_SWIFT_NAME(setNOctaves(nOctaves:));

    Swift

    func setNOctaves(nOctaves: Int32)
  • Declaration

    Objective-C

    - (void)setUpright:(BOOL)upright NS_SWIFT_NAME(setUpright(upright:));

    Swift

    func setUpright(upright: Bool)