[][src]Trait opencv::xfeatures2d::prelude::SURF_CUDATrait

pub trait SURF_CUDATrait {
    pub fn as_raw_SURF_CUDA(&self) -> *const c_void;
pub fn as_raw_mut_SURF_CUDA(&mut self) -> *mut c_void; pub fn hessian_threshold(&self) -> f64 { ... }
pub fn set_hessian_threshold(&mut self, val: f64) { ... }
pub fn n_octaves(&self) -> i32 { ... }
pub fn set_n_octaves(&mut self, val: i32) { ... }
pub fn n_octave_layers(&self) -> i32 { ... }
pub fn set_n_octave_layers(&mut self, val: i32) { ... }
pub fn extended(&self) -> bool { ... }
pub fn set_extended(&mut self, val: bool) { ... }
pub fn upright(&self) -> bool { ... }
pub fn set_upright(&mut self, val: bool) { ... }
pub fn keypoints_ratio(&self) -> f32 { ... }
pub fn set_keypoints_ratio(&mut self, val: f32) { ... }
pub fn sum(&mut self) -> GpuMat { ... }
pub fn set_sum(&mut self, val: GpuMat) { ... }
pub fn mask1(&mut self) -> GpuMat { ... }
pub fn set_mask1(&mut self, val: GpuMat) { ... }
pub fn mask_sum(&mut self) -> GpuMat { ... }
pub fn set_mask_sum(&mut self, val: GpuMat) { ... }
pub fn det(&mut self) -> GpuMat { ... }
pub fn set_det(&mut self, val: GpuMat) { ... }
pub fn trace(&mut self) -> GpuMat { ... }
pub fn set_trace(&mut self, val: GpuMat) { ... }
pub fn max_pos_buffer(&mut self) -> GpuMat { ... }
pub fn set_max_pos_buffer(&mut self, val: GpuMat) { ... }
pub fn descriptor_size(&self) -> Result<i32> { ... }
pub fn default_norm(&self) -> Result<i32> { ... }
pub fn upload_keypoints(
        &mut self,
        keypoints: &Vector<KeyPoint>,
        keypoints_gpu: &mut GpuMat
    ) -> Result<()> { ... }
pub fn download_keypoints(
        &mut self,
        keypoints_gpu: &GpuMat,
        keypoints: &mut Vector<KeyPoint>
    ) -> Result<()> { ... }
pub fn download_descriptors(
        &mut self,
        descriptors_gpu: &GpuMat,
        descriptors: &mut Vector<f32>
    ) -> Result<()> { ... }
pub fn detect(
        &mut self,
        img: &GpuMat,
        mask: &GpuMat,
        keypoints: &mut GpuMat
    ) -> Result<()> { ... }
pub fn detect_with_descriptors(
        &mut self,
        img: &GpuMat,
        mask: &GpuMat,
        keypoints: &mut GpuMat,
        descriptors: &mut GpuMat,
        use_provided_keypoints: bool
    ) -> Result<()> { ... }
pub fn release_memory(&mut self) -> Result<()> { ... } }

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 inline formula 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 inline formula 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

Loading content...

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]

upload host keypoints to device memory

pub fn download_keypoints(
    &mut self,
    keypoints_gpu: &GpuMat,
    keypoints: &mut Vector<KeyPoint>
) -> Result<()>
[src]

download keypoints from device to host memory

pub fn download_descriptors(
    &mut self,
    descriptors_gpu: &GpuMat,
    descriptors: &mut Vector<f32>
) -> Result<()>
[src]

download descriptors from device to host memory

pub fn detect(
    &mut self,
    img: &GpuMat,
    mask: &GpuMat,
    keypoints: &mut GpuMat
) -> Result<()>
[src]

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]

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

pub fn release_memory(&mut self) -> Result<()>[src]

Loading content...

Implementors

impl SURF_CUDATrait for SURF_CUDA[src]

impl SURF_CUDATrait for PtrOfSURF_CUDA[src]

Loading content...