Struct opencv::xfeatures2d::SURF_CUDA
source · [−]pub struct SURF_CUDA { /* private fields */ }
Expand description
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 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 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 also
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
Implementations
sourceimpl SURF_CUDA
impl SURF_CUDA
sourcepub fn new(
_hessian_threshold: f64,
_n_octaves: i32,
_n_octave_layers: i32,
_extended: bool,
_keypoints_ratio: f32,
_upright: bool
) -> Result<SURF_CUDA>
pub fn new(
_hessian_threshold: f64,
_n_octaves: i32,
_n_octave_layers: i32,
_extended: bool,
_keypoints_ratio: f32,
_upright: bool
) -> Result<SURF_CUDA>
the full constructor taking all the necessary parameters
C++ default parameters
- _n_octaves: 4
- _n_octave_layers: 2
- _extended: false
- _keypoints_ratio: 0.01f
- _upright: false
sourcepub fn create(
_hessian_threshold: f64,
_n_octaves: i32,
_n_octave_layers: i32,
_extended: bool,
_keypoints_ratio: f32,
_upright: bool
) -> Result<Ptr<SURF_CUDA>>
pub fn create(
_hessian_threshold: f64,
_n_octaves: i32,
_n_octave_layers: i32,
_extended: bool,
_keypoints_ratio: f32,
_upright: bool
) -> Result<Ptr<SURF_CUDA>>
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:
- _upright: Up-right or rotated features flag (true - do not compute orientation of features; false - compute orientation).
C++ default parameters
- _n_octaves: 4
- _n_octave_layers: 2
- _extended: false
- _keypoints_ratio: 0.01f
- _upright: false