[−][src]Trait opencv::prelude::SURF_CUDATrait
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
Required methods
pub fn as_raw_SURF_CUDA(&self) -> *const c_void
[src]
pub fn as_raw_mut_SURF_CUDA(&mut self) -> *mut c_void
[src]
Provided methods
pub fn hessian_threshold(&self) -> f64
[src]
pub fn set_hessian_threshold(&mut self, val: f64)
[src]
pub fn n_octaves(&self) -> i32
[src]
pub fn set_n_octaves(&mut self, val: i32)
[src]
pub fn n_octave_layers(&self) -> i32
[src]
pub fn set_n_octave_layers(&mut self, val: i32)
[src]
pub fn extended(&self) -> bool
[src]
pub fn set_extended(&mut self, val: bool)
[src]
pub fn upright(&self) -> bool
[src]
pub fn set_upright(&mut self, val: bool)
[src]
pub fn keypoints_ratio(&self) -> f32
[src]
max keypoints = min(keypointsRatio * img.size().area(), 65535)
pub fn set_keypoints_ratio(&mut self, val: f32)
[src]
max keypoints = min(keypointsRatio * img.size().area(), 65535)
pub fn sum(&mut self) -> GpuMat
[src]
pub fn set_sum(&mut self, val: GpuMat)
[src]
pub fn mask1(&mut self) -> GpuMat
[src]
pub fn set_mask1(&mut self, val: GpuMat)
[src]
pub fn mask_sum(&mut self) -> GpuMat
[src]
pub fn set_mask_sum(&mut self, val: GpuMat)
[src]
pub fn det(&mut self) -> GpuMat
[src]
pub fn set_det(&mut self, val: GpuMat)
[src]
pub fn trace(&mut self) -> GpuMat
[src]
pub fn set_trace(&mut self, val: GpuMat)
[src]
pub fn max_pos_buffer(&mut self) -> GpuMat
[src]
pub fn set_max_pos_buffer(&mut self, val: GpuMat)
[src]
pub fn descriptor_size(&self) -> Result<i32>
[src]
returns the descriptor size in float's (64 or 128)
pub fn default_norm(&self) -> Result<i32>
[src]
returns the default norm type
pub fn upload_keypoints(
&mut self,
keypoints: &Vector<KeyPoint>,
keypoints_gpu: &mut GpuMat
) -> Result<()>
[src]
&mut self,
keypoints: &Vector<KeyPoint>,
keypoints_gpu: &mut GpuMat
) -> Result<()>
upload host keypoints to device memory
pub fn download_keypoints(
&mut self,
keypoints_gpu: &GpuMat,
keypoints: &mut Vector<KeyPoint>
) -> Result<()>
[src]
&mut self,
keypoints_gpu: &GpuMat,
keypoints: &mut Vector<KeyPoint>
) -> Result<()>
download keypoints from device to host memory
pub fn download_descriptors(
&mut self,
descriptors_gpu: &GpuMat,
descriptors: &mut Vector<f32>
) -> Result<()>
[src]
&mut self,
descriptors_gpu: &GpuMat,
descriptors: &mut Vector<f32>
) -> Result<()>
download descriptors from device to host memory
pub fn detect(
&mut self,
img: &GpuMat,
mask: &GpuMat,
keypoints: &mut GpuMat
) -> Result<()>
[src]
&mut self,
img: &GpuMat,
mask: &GpuMat,
keypoints: &mut GpuMat
) -> Result<()>
Finds the keypoints using fast hessian detector used in SURF
Parameters
- img: Source image, currently supports only CV_8UC1 images.
- mask: A mask image same size as src and of type CV_8UC1.
- keypoints: Detected keypoints.
pub fn detect_with_descriptors(
&mut self,
img: &GpuMat,
mask: &GpuMat,
keypoints: &mut GpuMat,
descriptors: &mut GpuMat,
use_provided_keypoints: bool
) -> Result<()>
[src]
&mut self,
img: &GpuMat,
mask: &GpuMat,
keypoints: &mut GpuMat,
descriptors: &mut GpuMat,
use_provided_keypoints: bool
) -> Result<()>
Finds the keypoints and computes their descriptors using fast hessian detector used in SURF
Parameters
- img: Source image, currently supports only CV_8UC1 images.
- mask: A mask image same size as src and of type CV_8UC1.
- keypoints: Detected keypoints.
- descriptors: Keypoint descriptors.
- useProvidedKeypoints: Compute descriptors for the user-provided keypoints and recompute keypoints direction.
C++ default parameters
- use_provided_keypoints: false