Package org.opencv.xfeatures2d
Class SURF_CUDA
java.lang.Object
org.opencv.xfeatures2d.SURF_CUDA
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.
- 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
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
protected final long
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SURF_CUDA
__fromPtr__
(long addr) static SURF_CUDA
create
(double _hessianThreshold) static SURF_CUDA
create
(double _hessianThreshold, int _nOctaves) static SURF_CUDA
create
(double _hessianThreshold, int _nOctaves, int _nOctaveLayers) static SURF_CUDA
create
(double _hessianThreshold, int _nOctaves, int _nOctaveLayers, boolean _extended) static SURF_CUDA
create
(double _hessianThreshold, int _nOctaves, int _nOctaveLayers, boolean _extended, float _keypointsRatio) static SURF_CUDA
create
(double _hessianThreshold, int _nOctaves, int _nOctaveLayers, boolean _extended, float _keypointsRatio, boolean _upright) int
int
protected void
finalize()
boolean
double
float
int
int
boolean
long
-
Field Details
-
nativeObj
protected final long nativeObj -
X_ROW
public static final int X_ROW- See Also:
-
Y_ROW
public static final int Y_ROW- See Also:
-
LAPLACIAN_ROW
public static final int LAPLACIAN_ROW- See Also:
-
OCTAVE_ROW
public static final int OCTAVE_ROW- See Also:
-
SIZE_ROW
public static final int SIZE_ROW- See Also:
-
ANGLE_ROW
public static final int ANGLE_ROW- See Also:
-
HESSIAN_ROW
public static final int HESSIAN_ROW- See Also:
-
ROWS_COUNT
public static final int ROWS_COUNT- See Also:
-
-
Constructor Details
-
SURF_CUDA
protected SURF_CUDA(long addr)
-
-
Method Details
-
getNativeObjAddr
public long getNativeObjAddr() -
__fromPtr__
-
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
- 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
- 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
- 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
-