Struct opencv::objdetect::HOGDescriptor
source · pub struct HOGDescriptor { /* private fields */ }
Expand description
Implementation of HOG (Histogram of Oriented Gradients) descriptor and object detector.
the HOG descriptor algorithm introduced by Navneet Dalal and Bill Triggs Dalal2005 .
useful links:
https://hal.inria.fr/inria-00548512/document/
https://en.wikipedia.org/wiki/Histogram_of_oriented_gradients
https://software.intel.com/en-us/ipp-dev-reference-histogram-of-oriented-gradients-hog-descriptor
http://www.learnopencv.com/histogram-of-oriented-gradients
http://www.learnopencv.com/handwritten-digits-classification-an-opencv-c-python-tutorial
Implementations§
source§impl HOGDescriptor
impl HOGDescriptor
sourcepub fn default() -> Result<HOGDescriptor>
pub fn default() -> Result<HOGDescriptor>
Creates the HOG descriptor and detector with default parameters.
aqual to HOGDescriptor(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 )
sourcepub fn new(
_win_size: Size,
_block_size: Size,
_block_stride: Size,
_cell_size: Size,
_nbins: i32,
_deriv_aperture: i32,
_win_sigma: f64,
_histogram_norm_type: HOGDescriptor_HistogramNormType,
_l2_hys_threshold: f64,
_gamma_correction: bool,
_nlevels: i32,
_signed_gradient: bool
) -> Result<HOGDescriptor>
pub fn new( _win_size: Size, _block_size: Size, _block_stride: Size, _cell_size: Size, _nbins: i32, _deriv_aperture: i32, _win_sigma: f64, _histogram_norm_type: HOGDescriptor_HistogramNormType, _l2_hys_threshold: f64, _gamma_correction: bool, _nlevels: i32, _signed_gradient: bool ) -> Result<HOGDescriptor>
Creates the HOG descriptor and detector with default parameters.
aqual to HOGDescriptor(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 )
Overloaded parameters
Parameters
- _winSize: sets winSize with given value.
- _blockSize: sets blockSize with given value.
- _blockStride: sets blockStride with given value.
- _cellSize: sets cellSize with given value.
- _nbins: sets nbins with given value.
- _derivAperture: sets derivAperture with given value.
- _winSigma: sets winSigma with given value.
- _histogramNormType: sets histogramNormType with given value.
- _L2HysThreshold: sets L2HysThreshold with given value.
- _gammaCorrection: sets gammaCorrection with given value.
- _nlevels: sets nlevels with given value.
- _signedGradient: sets signedGradient with given value.
C++ default parameters
- _deriv_aperture: 1
- _win_sigma: -1
- _histogram_norm_type: HOGDescriptor::L2Hys
- _l2_hys_threshold: 0.2
- _gamma_correction: false
- _nlevels: HOGDescriptor::DEFAULT_NLEVELS
- _signed_gradient: false
sourcepub fn new_def(
_win_size: Size,
_block_size: Size,
_block_stride: Size,
_cell_size: Size,
_nbins: i32
) -> Result<HOGDescriptor>
pub fn new_def( _win_size: Size, _block_size: Size, _block_stride: Size, _cell_size: Size, _nbins: i32 ) -> Result<HOGDescriptor>
@overload
Parameters
- _winSize: sets winSize with given value.
- _blockSize: sets blockSize with given value.
- _blockStride: sets blockStride with given value.
- _cellSize: sets cellSize with given value.
- _nbins: sets nbins with given value.
- _derivAperture: sets derivAperture with given value.
- _winSigma: sets winSigma with given value.
- _histogramNormType: sets histogramNormType with given value.
- _L2HysThreshold: sets L2HysThreshold with given value.
- _gammaCorrection: sets gammaCorrection with given value.
- _nlevels: sets nlevels with given value.
- _signedGradient: sets signedGradient with given value.
Note
This alternative version of [new] function uses the following default values for its arguments:
- _deriv_aperture: 1
- _win_sigma: -1
- _histogram_norm_type: HOGDescriptor::L2Hys
- _l2_hys_threshold: 0.2
- _gamma_correction: false
- _nlevels: HOGDescriptor::DEFAULT_NLEVELS
- _signed_gradient: false
sourcepub fn new_from_file(filename: &str) -> Result<HOGDescriptor>
pub fn new_from_file(filename: &str) -> Result<HOGDescriptor>
Creates the HOG descriptor and detector with default parameters.
aqual to HOGDescriptor(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 )
Overloaded parameters
Creates the HOG descriptor and detector and loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file.
Parameters
- filename: The file name containing HOGDescriptor properties and coefficients for the linear SVM classifier.
sourcepub fn copy(d: &HOGDescriptor) -> Result<HOGDescriptor>
pub fn copy(d: &HOGDescriptor) -> Result<HOGDescriptor>
Creates the HOG descriptor and detector with default parameters.
aqual to HOGDescriptor(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 )
Overloaded parameters
Parameters
- d: the HOGDescriptor which cloned to create a new one.
sourcepub fn get_default_people_detector() -> Result<Vector<f32>>
pub fn get_default_people_detector() -> Result<Vector<f32>>
Returns coefficients of the classifier trained for people detection (for 64x128 windows).
sourcepub fn get_daimler_people_detector() -> Result<Vector<f32>>
pub fn get_daimler_people_detector() -> Result<Vector<f32>>
@example samples/tapi/hog.cpp / Returns coefficients of the classifier trained for people detection (for 48x96 windows).