Package org.opencv.xfeatures2d
Class SURF_CUDA
- java.lang.Object
-
- org.opencv.xfeatures2d.SURF_CUDA
-
public class SURF_CUDA extends java.lang.ObjectClass 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.
- An example for using the SURF keypoint matcher on GPU can be found at opencv_source_code/samples/gpu/surf_keypoint_matcher.cpp
-
-
Field Summary
Fields Modifier and Type Field Description static intANGLE_ROWstatic intHESSIAN_ROWstatic intLAPLACIAN_ROWprotected longnativeObjstatic intOCTAVE_ROWstatic intROWS_COUNTstatic intSIZE_ROWstatic intX_ROWstatic intY_ROW
-
Constructor Summary
Constructors Modifier Constructor Description protectedSURF_CUDA(long addr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SURF_CUDA__fromPtr__(long addr)static SURF_CUDAcreate(double _hessianThreshold)static SURF_CUDAcreate(double _hessianThreshold, int _nOctaves)static SURF_CUDAcreate(double _hessianThreshold, int _nOctaves, int _nOctaveLayers)static SURF_CUDAcreate(double _hessianThreshold, int _nOctaves, int _nOctaveLayers, boolean _extended)static SURF_CUDAcreate(double _hessianThreshold, int _nOctaves, int _nOctaveLayers, boolean _extended, float _keypointsRatio)static SURF_CUDAcreate(double _hessianThreshold, int _nOctaves, int _nOctaveLayers, boolean _extended, float _keypointsRatio, boolean _upright)intdefaultNorm()intdescriptorSize()protected voidfinalize()booleanget_extended()doubleget_hessianThreshold()floatget_keypointsRatio()intget_nOctaveLayers()intget_nOctaves()booleanget_upright()longgetNativeObjAddr()
-
-
-
Field Detail
-
nativeObj
protected final long nativeObj
-
X_ROW
public static final int X_ROW
- See Also:
- Constant Field Values
-
Y_ROW
public static final int Y_ROW
- See Also:
- Constant Field Values
-
LAPLACIAN_ROW
public static final int LAPLACIAN_ROW
- See Also:
- Constant Field Values
-
OCTAVE_ROW
public static final int OCTAVE_ROW
- See Also:
- Constant Field Values
-
SIZE_ROW
public static final int SIZE_ROW
- See Also:
- Constant Field Values
-
ANGLE_ROW
public static final int ANGLE_ROW
- See Also:
- Constant Field Values
-
HESSIAN_ROW
public static final int HESSIAN_ROW
- See Also:
- Constant Field Values
-
ROWS_COUNT
public static final int ROWS_COUNT
- See Also:
- Constant Field Values
-
-
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:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
-