SURF_CUDATrait

Trait SURF_CUDATrait 

Source
pub trait SURF_CUDATrait: SURF_CUDATraitConst {
Show 28 methods // Required method fn as_raw_mut_SURF_CUDA(&mut self) -> *mut c_void; // Provided methods fn set_hessian_threshold(&mut self, val: f64) { ... } fn set_n_octaves(&mut self, val: i32) { ... } fn set_n_octave_layers(&mut self, val: i32) { ... } fn set_extended(&mut self, val: bool) { ... } fn set_upright(&mut self, val: bool) { ... } fn set_keypoints_ratio(&mut self, val: f32) { ... } fn set_sum(&mut self, val: GpuMat) { ... } fn set_mask1(&mut self, val: GpuMat) { ... } fn set_mask_sum(&mut self, val: GpuMat) { ... } fn set_det(&mut self, val: GpuMat) { ... } fn set_trace(&mut self, val: GpuMat) { ... } fn set_max_pos_buffer(&mut self, val: GpuMat) { ... } fn upload_keypoints( &mut self, keypoints: &Vector<KeyPoint>, keypoints_gpu: &mut impl GpuMatTrait, ) -> Result<()> { ... } fn download_keypoints( &mut self, keypoints_gpu: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, ) -> Result<()> { ... } fn download_descriptors( &mut self, descriptors_gpu: &impl GpuMatTraitConst, descriptors: &mut Vector<f32>, ) -> Result<()> { ... } fn apply( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut impl GpuMatTrait, ) -> Result<()> { ... } fn apply_1( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut impl GpuMatTrait, descriptors: &mut impl GpuMatTrait, use_provided_keypoints: bool, ) -> Result<()> { ... } fn apply_def( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut impl GpuMatTrait, descriptors: &mut impl GpuMatTrait, ) -> Result<()> { ... } fn detect( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut impl GpuMatTrait, ) -> Result<()> { ... } fn apply_2( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, ) -> Result<()> { ... } fn apply_3( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, descriptors: &mut impl GpuMatTrait, use_provided_keypoints: bool, ) -> Result<()> { ... } fn apply_def_1( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, descriptors: &mut impl GpuMatTrait, ) -> Result<()> { ... } fn detect_with_descriptors( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut impl GpuMatTrait, descriptors: &mut impl GpuMatTrait, use_provided_keypoints: bool, ) -> Result<()> { ... } fn detect_with_descriptors_def( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut impl GpuMatTrait, descriptors: &mut impl GpuMatTrait, ) -> Result<()> { ... } fn apply_4( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, descriptors: &mut Vector<f32>, use_provided_keypoints: bool, ) -> Result<()> { ... } fn apply_def_2( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, descriptors: &mut Vector<f32>, ) -> Result<()> { ... } fn release_memory(&mut self) -> Result<()> { ... }
}
Expand description

Mutable methods for crate::xfeatures2d::SURF_CUDA

Required Methods§

Provided Methods§

Source

fn set_hessian_threshold(&mut self, val: f64)

Source

fn set_n_octaves(&mut self, val: i32)

Source

fn set_n_octave_layers(&mut self, val: i32)

Source

fn set_extended(&mut self, val: bool)

Source

fn set_upright(&mut self, val: bool)

Source

fn set_keypoints_ratio(&mut self, val: f32)

max keypoints = min(keypointsRatio * img.size().area(), 65535)

Source

fn set_sum(&mut self, val: GpuMat)

Source

fn set_mask1(&mut self, val: GpuMat)

Source

fn set_mask_sum(&mut self, val: GpuMat)

Source

fn set_det(&mut self, val: GpuMat)

Source

fn set_trace(&mut self, val: GpuMat)

Source

fn set_max_pos_buffer(&mut self, val: GpuMat)

Source

fn upload_keypoints( &mut self, keypoints: &Vector<KeyPoint>, keypoints_gpu: &mut impl GpuMatTrait, ) -> Result<()>

upload host keypoints to device memory

Source

fn download_keypoints( &mut self, keypoints_gpu: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, ) -> Result<()>

download keypoints from device to host memory

Source

fn download_descriptors( &mut self, descriptors_gpu: &impl GpuMatTraitConst, descriptors: &mut Vector<f32>, ) -> Result<()>

download descriptors from device to host memory

Source

fn apply( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut impl GpuMatTrait, ) -> Result<()>

finds the keypoints using fast hessian detector used in SURF supports CV_8UC1 images keypoints will have nFeature cols and 6 rows keypoints.ptr(X_ROW)[i] will contain x coordinate of i’th feature keypoints.ptr(Y_ROW)[i] will contain y coordinate of i’th feature keypoints.ptr(LAPLACIAN_ROW)[i] will contain laplacian sign of i’th feature keypoints.ptr(OCTAVE_ROW)[i] will contain octave of i’th feature keypoints.ptr(SIZE_ROW)[i] will contain size of i’th feature keypoints.ptr(ANGLE_ROW)[i] will contain orientation of i’th feature keypoints.ptr(HESSIAN_ROW)[i] will contain response of i’th feature

Source

fn apply_1( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut impl GpuMatTrait, descriptors: &mut impl GpuMatTrait, use_provided_keypoints: bool, ) -> Result<()>

finds the keypoints and computes their descriptors. Optionally it can compute descriptors for the user-provided keypoints and recompute keypoints direction

§C++ default parameters
  • use_provided_keypoints: false
Source

fn apply_def( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut impl GpuMatTrait, descriptors: &mut impl GpuMatTrait, ) -> Result<()>

finds the keypoints and computes their descriptors. Optionally it can compute descriptors for the user-provided keypoints and recompute keypoints direction

§Note

This alternative version of SURF_CUDATrait::apply function uses the following default values for its arguments:

  • use_provided_keypoints: false
Source

fn detect( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut impl GpuMatTrait, ) -> 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.
Source

fn apply_2( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, ) -> Result<()>

Source

fn apply_3( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, descriptors: &mut impl GpuMatTrait, use_provided_keypoints: bool, ) -> Result<()>

§C++ default parameters
  • use_provided_keypoints: false
Source

fn apply_def_1( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, descriptors: &mut impl GpuMatTrait, ) -> Result<()>

§Note

This alternative version of SURF_CUDATrait::apply function uses the following default values for its arguments:

  • use_provided_keypoints: false
Source

fn detect_with_descriptors( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut impl GpuMatTrait, descriptors: &mut impl GpuMatTrait, 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
Source

fn detect_with_descriptors_def( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut impl GpuMatTrait, descriptors: &mut impl GpuMatTrait, ) -> 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.
§Note

This alternative version of SURF_CUDATrait::detect_with_descriptors function uses the following default values for its arguments:

  • use_provided_keypoints: false
Source

fn apply_4( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, descriptors: &mut Vector<f32>, use_provided_keypoints: bool, ) -> Result<()>

§C++ default parameters
  • use_provided_keypoints: false
Source

fn apply_def_2( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, descriptors: &mut Vector<f32>, ) -> Result<()>

§Note

This alternative version of SURF_CUDATrait::apply function uses the following default values for its arguments:

  • use_provided_keypoints: false
Source

fn release_memory(&mut self) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§