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§
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)
Sourcefn set_keypoints_ratio(&mut self, val: f32)
fn set_keypoints_ratio(&mut self, val: f32)
max keypoints = min(keypointsRatio * img.size().area(), 65535)
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)
Sourcefn upload_keypoints(
&mut self,
keypoints: &Vector<KeyPoint>,
keypoints_gpu: &mut impl GpuMatTrait,
) -> Result<()>
fn upload_keypoints( &mut self, keypoints: &Vector<KeyPoint>, keypoints_gpu: &mut impl GpuMatTrait, ) -> Result<()>
upload host keypoints to device memory
Sourcefn download_keypoints(
&mut self,
keypoints_gpu: &impl GpuMatTraitConst,
keypoints: &mut Vector<KeyPoint>,
) -> Result<()>
fn download_keypoints( &mut self, keypoints_gpu: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, ) -> Result<()>
download keypoints from device to host memory
Sourcefn download_descriptors(
&mut self,
descriptors_gpu: &impl GpuMatTraitConst,
descriptors: &mut Vector<f32>,
) -> Result<()>
fn download_descriptors( &mut self, descriptors_gpu: &impl GpuMatTraitConst, descriptors: &mut Vector<f32>, ) -> Result<()>
download descriptors from device to host memory
Sourcefn apply(
&mut self,
img: &impl GpuMatTraitConst,
mask: &impl GpuMatTraitConst,
keypoints: &mut impl GpuMatTrait,
) -> Result<()>
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
Sourcefn 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_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
Sourcefn apply_def(
&mut self,
img: &impl GpuMatTraitConst,
mask: &impl GpuMatTraitConst,
keypoints: &mut impl GpuMatTrait,
descriptors: &mut impl GpuMatTrait,
) -> Result<()>
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
Sourcefn detect(
&mut self,
img: &impl GpuMatTraitConst,
mask: &impl GpuMatTraitConst,
keypoints: &mut impl GpuMatTrait,
) -> Result<()>
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.
fn apply_2( &mut self, img: &impl GpuMatTraitConst, mask: &impl GpuMatTraitConst, keypoints: &mut Vector<KeyPoint>, ) -> Result<()>
Sourcefn 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_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
Sourcefn apply_def_1(
&mut self,
img: &impl GpuMatTraitConst,
mask: &impl GpuMatTraitConst,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut impl GpuMatTrait,
) -> Result<()>
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
Sourcefn 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( &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
Sourcefn detect_with_descriptors_def(
&mut self,
img: &impl GpuMatTraitConst,
mask: &impl GpuMatTraitConst,
keypoints: &mut impl GpuMatTrait,
descriptors: &mut impl GpuMatTrait,
) -> Result<()>
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
Sourcefn 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_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
Sourcefn apply_def_2(
&mut self,
img: &impl GpuMatTraitConst,
mask: &impl GpuMatTraitConst,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut Vector<f32>,
) -> Result<()>
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
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.