[−][src]Struct 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 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
impl SURF_CUDA
[src]
pub fn as_raw_SURF_CUDA(&self) -> *const c_void
[src]
pub fn as_raw_mut_SURF_CUDA(&mut self) -> *mut c_void
[src]
impl SURF_CUDA
[src]
pub fn default() -> Result<SURF_CUDA>
[src]
the default constructor
pub fn new(
_hessian_threshold: f64,
_n_octaves: i32,
_n_octave_layers: i32,
_extended: bool,
_keypoints_ratio: f32,
_upright: bool
) -> Result<SURF_CUDA>
[src]
_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
pub fn create(
_hessian_threshold: f64,
_n_octaves: i32,
_n_octave_layers: i32,
_extended: bool,
_keypoints_ratio: f32,
_upright: bool
) -> Result<Ptr<SURF_CUDA>>
[src]
_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
Trait Implementations
impl Boxed for SURF_CUDA
[src]
unsafe fn from_raw(ptr: *mut c_void) -> Self
[src]
fn into_raw(self) -> *mut c_void
[src]
fn as_raw(&self) -> *const c_void
[src]
fn as_raw_mut(&mut self) -> *mut c_void
[src]
impl Drop for SURF_CUDA
[src]
impl SURF_CUDATrait for SURF_CUDA
[src]
fn as_raw_SURF_CUDA(&self) -> *const c_void
[src]
fn as_raw_mut_SURF_CUDA(&mut self) -> *mut c_void
[src]
fn hessian_threshold(&self) -> f64
[src]
fn set_hessian_threshold(&mut self, val: f64)
[src]
fn n_octaves(&self) -> i32
[src]
fn set_n_octaves(&mut self, val: i32)
[src]
fn n_octave_layers(&self) -> i32
[src]
fn set_n_octave_layers(&mut self, val: i32)
[src]
fn extended(&self) -> bool
[src]
fn set_extended(&mut self, val: bool)
[src]
fn upright(&self) -> bool
[src]
fn set_upright(&mut self, val: bool)
[src]
fn keypoints_ratio(&self) -> f32
[src]
fn set_keypoints_ratio(&mut self, val: f32)
[src]
fn sum(&mut self) -> GpuMat
[src]
fn set_sum(&mut self, val: GpuMat)
[src]
fn mask1(&mut self) -> GpuMat
[src]
fn set_mask1(&mut self, val: GpuMat)
[src]
fn mask_sum(&mut self) -> GpuMat
[src]
fn set_mask_sum(&mut self, val: GpuMat)
[src]
fn det(&mut self) -> GpuMat
[src]
fn set_det(&mut self, val: GpuMat)
[src]
fn trace(&mut self) -> GpuMat
[src]
fn set_trace(&mut self, val: GpuMat)
[src]
fn max_pos_buffer(&mut self) -> GpuMat
[src]
fn set_max_pos_buffer(&mut self, val: GpuMat)
[src]
fn descriptor_size(&self) -> Result<i32>
[src]
fn default_norm(&self) -> Result<i32>
[src]
fn upload_keypoints(
&mut self,
keypoints: &Vector<KeyPoint>,
keypoints_gpu: &mut GpuMat
) -> Result<()>
[src]
&mut self,
keypoints: &Vector<KeyPoint>,
keypoints_gpu: &mut GpuMat
) -> Result<()>
fn download_keypoints(
&mut self,
keypoints_gpu: &GpuMat,
keypoints: &mut Vector<KeyPoint>
) -> Result<()>
[src]
&mut self,
keypoints_gpu: &GpuMat,
keypoints: &mut Vector<KeyPoint>
) -> Result<()>
fn download_descriptors(
&mut self,
descriptors_gpu: &GpuMat,
descriptors: &mut Vector<f32>
) -> Result<()>
[src]
&mut self,
descriptors_gpu: &GpuMat,
descriptors: &mut Vector<f32>
) -> Result<()>
fn detect(
&mut self,
img: &GpuMat,
mask: &GpuMat,
keypoints: &mut GpuMat
) -> Result<()>
[src]
&mut self,
img: &GpuMat,
mask: &GpuMat,
keypoints: &mut GpuMat
) -> Result<()>
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<()>
fn release_memory(&mut self) -> Result<()>
[src]
impl Send for SURF_CUDA
[src]
Auto Trait Implementations
impl RefUnwindSafe for SURF_CUDA
impl !Sync for SURF_CUDA
impl Unpin for SURF_CUDA
impl UnwindSafe for SURF_CUDA
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,