Trait CUDA_HOGTrait

Source
pub trait CUDA_HOGTrait: AlgorithmTrait + CUDA_HOGTraitConst {
Show 21 methods // Required method fn as_raw_mut_CUDA_HOG(&mut self) -> *mut c_void; // Provided methods fn set_win_sigma(&mut self, win_sigma: f64) -> Result<()> { ... } fn set_l2_hys_threshold(&mut self, threshold_l2hys: f64) -> Result<()> { ... } fn set_gamma_correction(&mut self, gamma_correction: bool) -> Result<()> { ... } fn set_num_levels(&mut self, nlevels: i32) -> Result<()> { ... } fn set_hit_threshold(&mut self, hit_threshold: f64) -> Result<()> { ... } fn set_win_stride(&mut self, win_stride: Size) -> Result<()> { ... } fn set_scale_factor(&mut self, scale0: f64) -> Result<()> { ... } fn set_group_threshold(&mut self, group_threshold: i32) -> Result<()> { ... } fn set_descriptor_format( &mut self, descr_format: HOGDescriptor_DescriptorStorageFormat, ) -> Result<()> { ... } fn set_svm_detector(&mut self, detector: &impl ToInputArray) -> Result<()> { ... } fn detect( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, confidences: &mut Vector<f64>, ) -> Result<()> { ... } fn detect_def( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, ) -> Result<()> { ... } fn detect_1( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, confidences: &mut Vector<f64>, ) -> Result<()> { ... } fn detect_without_conf( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, ) -> Result<()> { ... } fn detect_multi_scale( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, confidences: &mut Vector<f64>, ) -> Result<()> { ... } fn detect_multi_scale_def( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, ) -> Result<()> { ... } fn detect_multi_scale_1( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, confidences: &mut Vector<f64>, ) -> Result<()> { ... } fn detect_multi_scale_without_conf( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, ) -> Result<()> { ... } fn compute( &mut self, img: &impl ToInputArray, descriptors: &mut impl ToOutputArray, stream: &mut impl StreamTrait, ) -> Result<()> { ... } fn compute_def( &mut self, img: &impl ToInputArray, descriptors: &mut impl ToOutputArray, ) -> Result<()> { ... }
}
Expand description

Mutable methods for crate::cudaobjdetect::CUDA_HOG

Required Methods§

Provided Methods§

Source

fn set_win_sigma(&mut self, win_sigma: f64) -> Result<()>

Gaussian smoothing window parameter.

Source

fn set_l2_hys_threshold(&mut self, threshold_l2hys: f64) -> Result<()>

L2-Hys normalization method shrinkage.

Source

fn set_gamma_correction(&mut self, gamma_correction: bool) -> Result<()>

Flag to specify whether the gamma correction preprocessing is required or not.

Source

fn set_num_levels(&mut self, nlevels: i32) -> Result<()>

Maximum number of detection window increases.

Source

fn set_hit_threshold(&mut self, hit_threshold: f64) -> Result<()>

Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.

Source

fn set_win_stride(&mut self, win_stride: Size) -> Result<()>

Window stride. It must be a multiple of block stride.

Source

fn set_scale_factor(&mut self, scale0: f64) -> Result<()>

Coefficient of the detection window increase.

Source

fn set_group_threshold(&mut self, group_threshold: i32) -> Result<()>

Coefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping. See groupRectangles.

Source

fn set_descriptor_format( &mut self, descr_format: HOGDescriptor_DescriptorStorageFormat, ) -> Result<()>

Descriptor storage format:

  • DESCR_FORMAT_ROW_BY_ROW - Row-major order.
  • DESCR_FORMAT_COL_BY_COL - Column-major order.
Source

fn set_svm_detector(&mut self, detector: &impl ToInputArray) -> Result<()>

Sets coefficients for the linear SVM classifier.

Source

fn detect( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, confidences: &mut Vector<f64>, ) -> Result<()>

Performs object detection without a multi-scale window.

§Parameters
  • img: Source image. CV_8UC1 and CV_8UC4 types are supported for now.
  • found_locations: Left-top corner points of detected objects boundaries.
  • confidences: Optional output array for confidences.
§C++ default parameters
  • confidences: NULL
Source

fn detect_def( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, ) -> Result<()>

Performs object detection without a multi-scale window.

§Parameters
  • img: Source image. CV_8UC1 and CV_8UC4 types are supported for now.
  • found_locations: Left-top corner points of detected objects boundaries.
  • confidences: Optional output array for confidences.
§Note

This alternative version of CUDA_HOGTrait::detect function uses the following default values for its arguments:

  • confidences: NULL
Source

fn detect_1( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, confidences: &mut Vector<f64>, ) -> Result<()>

Source

fn detect_without_conf( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Point>, ) -> Result<()>

Performs object detection without a multi-scale window.

§Parameters
  • img: Source image. CV_8UC1 and CV_8UC4 types are supported for now.
  • found_locations: Left-top corner points of detected objects boundaries.
Source

fn detect_multi_scale( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, confidences: &mut Vector<f64>, ) -> Result<()>

Performs object detection with a multi-scale window.

§Parameters
  • img: Source image. See cuda::HOGDescriptor::detect for type limitations.
  • found_locations: Detected objects boundaries.
  • confidences: Optional output array for confidences.
§C++ default parameters
  • confidences: NULL
Source

fn detect_multi_scale_def( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, ) -> Result<()>

Performs object detection with a multi-scale window.

§Parameters
  • img: Source image. See cuda::HOGDescriptor::detect for type limitations.
  • found_locations: Detected objects boundaries.
  • confidences: Optional output array for confidences.
§Note

This alternative version of CUDA_HOGTrait::detect_multi_scale function uses the following default values for its arguments:

  • confidences: NULL
Source

fn detect_multi_scale_1( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, confidences: &mut Vector<f64>, ) -> Result<()>

Source

fn detect_multi_scale_without_conf( &mut self, img: &impl ToInputArray, found_locations: &mut Vector<Rect>, ) -> Result<()>

Performs object detection with a multi-scale window.

§Parameters
  • img: Source image. See cuda::HOGDescriptor::detect for type limitations.
  • found_locations: Detected objects boundaries.
Source

fn compute( &mut self, img: &impl ToInputArray, descriptors: &mut impl ToOutputArray, stream: &mut impl StreamTrait, ) -> Result<()>

Returns block descriptors computed for the whole image.

§Parameters
  • img: Source image. See cuda::HOGDescriptor::detect for type limitations.
  • descriptors: 2D array of descriptors.
  • stream: CUDA stream.
§C++ default parameters
  • stream: Stream::Null()
Source

fn compute_def( &mut self, img: &impl ToInputArray, descriptors: &mut impl ToOutputArray, ) -> Result<()>

Returns block descriptors computed for the whole image.

§Parameters
  • img: Source image. See cuda::HOGDescriptor::detect for type limitations.
  • descriptors: 2D array of descriptors.
  • stream: CUDA stream.
§Note

This alternative version of CUDA_HOGTrait::compute function uses the following default values for its arguments:

  • stream: Stream::Null()

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§