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§
fn as_raw_mut_HOGDescriptor(&mut self) -> *mut c_void
Provided Methods§
Sourcefn set_win_size(&mut self, val: Size)
fn set_win_size(&mut self, val: Size)
Detection window size. Align to block size and block stride. Default value is Size(64,128).
Sourcefn set_block_size(&mut self, val: Size)
fn set_block_size(&mut self, val: Size)
Block size in pixels. Align to cell size. Default value is Size(16,16).
Sourcefn set_block_stride(&mut self, val: Size)
fn set_block_stride(&mut self, val: Size)
Block stride. It must be a multiple of cell size. Default value is Size(8,8).
Sourcefn set_cell_size(&mut self, val: Size)
fn set_cell_size(&mut self, val: Size)
Cell size. Default value is Size(8,8).
Sourcefn set_nbins(&mut self, val: i32)
fn set_nbins(&mut self, val: i32)
Number of bins used in the calculation of histogram of gradients. Default value is 9.
Sourcefn set_deriv_aperture(&mut self, val: i32)
fn set_deriv_aperture(&mut self, val: i32)
not documented
Sourcefn set_win_sigma(&mut self, val: f64)
fn set_win_sigma(&mut self, val: f64)
Gaussian smoothing window parameter.
Sourcefn set_histogram_norm_type(&mut self, val: HOGDescriptor_HistogramNormType)
fn set_histogram_norm_type(&mut self, val: HOGDescriptor_HistogramNormType)
histogramNormType
Sourcefn set_l2_hys_threshold(&mut self, val: f64)
fn set_l2_hys_threshold(&mut self, val: f64)
L2-Hys normalization method shrinkage.
Sourcefn set_gamma_correction(&mut self, val: bool)
fn set_gamma_correction(&mut self, val: bool)
Flag to specify whether the gamma correction preprocessing is required or not.
Sourcefn set_svm_detector(&mut self, val: Vector<f32>)
fn set_svm_detector(&mut self, val: Vector<f32>)
coefficients for the linear SVM classifier.
Sourcefn set_ocl_svm_detector(&mut self, val: UMat)
fn set_ocl_svm_detector(&mut self, val: UMat)
coefficients for the linear SVM classifier used when OpenCL is enabled
Sourcefn set_free_coef(&mut self, val: f32)
fn set_free_coef(&mut self, val: f32)
not documented
Sourcefn set_nlevels(&mut self, val: i32)
fn set_nlevels(&mut self, val: i32)
Maximum number of detection window increases. Default value is 64
Sourcefn set_signed_gradient(&mut self, val: bool)
fn set_signed_gradient(&mut self, val: bool)
Indicates signed gradient will be used or not
Sourcefn set_svm_detector_input_array(
&mut self,
svmdetector: &impl ToInputArray,
) -> Result<()>
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.
Sourcefn read(&mut self, fn_: &mut impl FileNodeTrait) -> Result<bool>
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
Sourcefn load_def(&mut self, filename: &str) -> Result<bool>
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.