Class SURF_CUDA


  • public class SURF_CUDA
    extends java.lang.Object
    Class used for extracting Speeded Up Robust Features (SURF) from an image. : The class SURF_CUDA implements Speeded Up Robust Features descriptor. There is a fast multi-scale Hessian keypoint detector that can be used to find the keypoints (which is the default option). But the descriptors can also be computed for the user-specified keypoints. Only 8-bit grayscale images are supported. The class SURF_CUDA can store results in the GPU and CPU memory. It provides functions to convert results between CPU and GPU version ( uploadKeypoints, downloadKeypoints, downloadDescriptors ). The format of CPU results is the same as SURF results. GPU results are stored in GpuMat. The keypoints matrix is \(\texttt{nFeatures} \times 7\) matrix with the CV_32FC1 type.
    • keypoints.ptr<float>(X_ROW)[i] contains x coordinate of the i-th feature.
    • keypoints.ptr<float>(Y_ROW)[i] contains y coordinate of the i-th feature.
    • keypoints.ptr<float>(LAPLACIAN_ROW)[i] contains the laplacian sign of the i-th feature.
    • keypoints.ptr<float>(OCTAVE_ROW)[i] contains the octave of the i-th feature.
    • keypoints.ptr<float>(SIZE_ROW)[i] contains the size of the i-th feature.
    • keypoints.ptr<float>(ANGLE_ROW)[i] contain orientation of the i-th feature.
    • keypoints.ptr<float>(HESSIAN_ROW)[i] contains the response of the i-th feature.
    The descriptors matrix is \(\texttt{nFeatures} \times \texttt{descriptorSize}\) matrix with the CV_32FC1 type. The class SURF_CUDA uses some buffers and provides access to it. All buffers can be safely released between function calls. SEE: SURF Note:
    • An example for using the SURF keypoint matcher on GPU can be found at opencv_source_code/samples/gpu/surf_keypoint_matcher.cpp
    • Constructor Detail

      • SURF_CUDA

        protected SURF_CUDA​(long addr)
    • Method Detail

      • getNativeObjAddr

        public long getNativeObjAddr()
      • __fromPtr__

        public static SURF_CUDA __fromPtr__​(long addr)
      • create

        public static SURF_CUDA create​(double _hessianThreshold,
                                       int _nOctaves,
                                       int _nOctaveLayers,
                                       boolean _extended,
                                       float _keypointsRatio,
                                       boolean _upright)
        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).
        _keypointsRatio - Limits a maximum number of features
        _upright - Up-right or rotated features flag (true - do not compute orientation of features; false - compute orientation).
        Returns:
        automatically generated
      • create

        public static SURF_CUDA create​(double _hessianThreshold,
                                       int _nOctaves,
                                       int _nOctaveLayers,
                                       boolean _extended,
                                       float _keypointsRatio)
        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).
        _keypointsRatio - Limits a maximum number of features false - compute orientation).
        Returns:
        automatically generated
      • create

        public static SURF_CUDA create​(double _hessianThreshold,
                                       int _nOctaves,
                                       int _nOctaveLayers,
                                       boolean _extended)
        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).
        Returns:
        automatically generated
      • create

        public static SURF_CUDA create​(double _hessianThreshold,
                                       int _nOctaves,
                                       int _nOctaveLayers)
        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).
        Returns:
        automatically generated
      • create

        public static SURF_CUDA create​(double _hessianThreshold,
                                       int _nOctaves)
        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).
        Returns:
        automatically generated
      • create

        public static SURF_CUDA create​(double _hessianThreshold)
        Parameters:
        _hessianThreshold - Threshold for hessian keypoint detector used in SURF. 64-element descriptors). false - compute orientation).
        Returns:
        automatically generated
      • descriptorSize

        public int descriptorSize()
      • defaultNorm

        public int defaultNorm()
      • get_hessianThreshold

        public double get_hessianThreshold()
      • get_nOctaves

        public int get_nOctaves()
      • get_nOctaveLayers

        public int get_nOctaveLayers()
      • get_extended

        public boolean get_extended()
      • get_upright

        public boolean get_upright()
      • get_keypointsRatio

        public float get_keypointsRatio()
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable