Trait opencv::prelude::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_vec(&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(
&mut self,
svmdetector: &impl ToInputArray
) -> Result<()> { ... }
fn read(&mut self, fn_: &mut FileNode) -> 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_vec(&mut self, val: Vector<f32>)
fn set_svm_detector_vec(&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(&mut self, svmdetector: &impl ToInputArray) -> Result<()>
fn set_svm_detector(&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 FileNode) -> Result<bool>
fn read(&mut self, fn_: &mut FileNode) -> Result<bool>
Reads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file node.
Parameters
- fn: File node
sourcefn load(&mut self, filename: &str, objname: &str) -> Result<bool>
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()
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 [load] function uses the following default values for its arguments:
- objname: String()