Trait HOGDescriptorTrait

Source
pub trait HOGDescriptorTrait: HOGDescriptorTraitConst {
Show 20 methods // Required method fn as_raw_mut_HOGDescriptor(&mut self) -> *mut c_void; // Provided methods fn set_win_size(&mut self, val: Size) { ... } fn set_block_size(&mut self, val: Size) { ... } fn set_block_stride(&mut self, val: Size) { ... } fn set_cell_size(&mut self, val: Size) { ... } fn set_nbins(&mut self, val: i32) { ... } fn set_deriv_aperture(&mut self, val: i32) { ... } fn set_win_sigma(&mut self, val: f64) { ... } fn set_histogram_norm_type(&mut self, val: HOGDescriptor_HistogramNormType) { ... } fn set_l2_hys_threshold(&mut self, val: f64) { ... } fn set_gamma_correction(&mut self, val: bool) { ... } fn set_svm_detector(&mut self, val: Vector<f32>) { ... } fn set_ocl_svm_detector(&mut self, val: UMat) { ... } fn set_free_coef(&mut self, val: f32) { ... } fn set_nlevels(&mut self, val: i32) { ... } fn set_signed_gradient(&mut self, val: bool) { ... } fn set_svm_detector_input_array( &mut self, svmdetector: &impl ToInputArray, ) -> Result<()> { ... } fn read(&mut self, fn_: &mut impl FileNodeTrait) -> Result<bool> { ... } fn load(&mut self, filename: &str, objname: &str) -> Result<bool> { ... } fn load_def(&mut self, filename: &str) -> Result<bool> { ... }
}
Expand description

Mutable methods for crate::objdetect::HOGDescriptor

Required Methods§

Provided Methods§

Source

fn set_win_size(&mut self, val: Size)

Detection window size. Align to block size and block stride. Default value is Size(64,128).

Source

fn set_block_size(&mut self, val: Size)

Block size in pixels. Align to cell size. Default value is Size(16,16).

Source

fn set_block_stride(&mut self, val: Size)

Block stride. It must be a multiple of cell size. Default value is Size(8,8).

Source

fn set_cell_size(&mut self, val: Size)

Cell size. Default value is Size(8,8).

Source

fn set_nbins(&mut self, val: i32)

Number of bins used in the calculation of histogram of gradients. Default value is 9.

Source

fn set_deriv_aperture(&mut self, val: i32)

not documented

Source

fn set_win_sigma(&mut self, val: f64)

Gaussian smoothing window parameter.

Source

fn set_histogram_norm_type(&mut self, val: HOGDescriptor_HistogramNormType)

histogramNormType

Source

fn set_l2_hys_threshold(&mut self, val: f64)

L2-Hys normalization method shrinkage.

Source

fn set_gamma_correction(&mut self, val: bool)

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

Source

fn set_svm_detector(&mut self, val: Vector<f32>)

coefficients for the linear SVM classifier.

Source

fn set_ocl_svm_detector(&mut self, val: UMat)

coefficients for the linear SVM classifier used when OpenCL is enabled

Source

fn set_free_coef(&mut self, val: f32)

not documented

Source

fn set_nlevels(&mut self, val: i32)

Maximum number of detection window increases. Default value is 64

Source

fn set_signed_gradient(&mut self, val: bool)

Indicates signed gradient will be used or not

Source

fn set_svm_detector_input_array( &mut self, svmdetector: &impl ToInputArray, ) -> Result<()>

@example samples/cpp/peopledetect.cpp / Sets coefficients for the linear SVM classifier.

§Parameters
  • svmdetector: coefficients for the linear SVM classifier.
Source

fn read(&mut self, fn_: &mut impl FileNodeTrait) -> Result<bool>

Reads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file node.

§Parameters
  • fn: File node
Source

fn load(&mut self, filename: &str, objname: &str) -> Result<bool>

loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file

§Parameters
  • filename: Name of the file to read.
  • objname: The optional name of the node to read (if empty, the first top-level node will be used).
§C++ default parameters
  • objname: String()
Source

fn load_def(&mut self, filename: &str) -> Result<bool>

loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file

§Parameters
  • filename: Name of the file to read.
  • objname: The optional name of the node to read (if empty, the first top-level node will be used).
§Note

This alternative version of HOGDescriptorTrait::load function uses the following default values for its arguments:

  • objname: String()

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§