Struct opencv::objdetect::HOGDescriptor [−][src]
pub struct HOGDescriptor { /* fields omitted */ }
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
Creates the HOG descriptor and detector with default params.
aqual to HOGDescriptor(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 )
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>
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 params.
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
Creates the HOG descriptor and detector with default params.
aqual to HOGDescriptor(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 )
Overloaded parameters
Parameters
- filename: The file name containing HOGDescriptor properties and coefficients for the linear SVM classifier.
Creates the HOG descriptor and detector with default params.
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.
Returns coefficients of the classifier trained for people detection (for 64x128 windows).
@example samples/tapi/hog.cpp / Returns coefficients of the classifier trained for people detection (for 48x96 windows).
Trait Implementations
Detection window size. Align to block size and block stride. Default value is Size(64,128).
Block size in pixels. Align to cell size. Default value is Size(16,16).
Block stride. It must be a multiple of cell size. Default value is Size(8,8).
Cell size. Default value is Size(8,8).
Number of bins used in the calculation of histogram of gradients. Default value is 9.
not documented
Gaussian smoothing window parameter.
histogramNormType
L2-Hys normalization method shrinkage.
Flag to specify whether the gamma correction preprocessing is required or not.
coefficients for the linear SVM classifier.
coefficients for the linear SVM classifier used when OpenCL is enabled
not documented
Maximum number of detection window increases. Default value is 64
Indicates signed gradient will be used or not
@example samples/cpp/peopledetect.cpp / Sets coefficients for the linear SVM classifier. Read more
Reads HOGDescriptor parameters from a cv::FileNode. Read more
Detection window size. Align to block size and block stride. Default value is Size(64,128).
Block size in pixels. Align to cell size. Default value is Size(16,16).
Block stride. It must be a multiple of cell size. Default value is Size(8,8).
Number of bins used in the calculation of histogram of gradients. Default value is 9.
not documented
histogramNormType
L2-Hys normalization method shrinkage.
Flag to specify whether the gamma correction preprocessing is required or not.
coefficients for the linear SVM classifier.
coefficients for the linear SVM classifier used when OpenCL is enabled
Indicates signed gradient will be used or not
Returns the number of coefficients required for the classification.
Checks if detector size equal to descriptor size.
Returns winSigma value
Stores HOGDescriptor parameters in a cv::FileStorage. Read more
saves HOGDescriptor parameters and coefficients for the linear SVM classifier to a file Read more
@example samples/cpp/train_HOG.cpp / Computes HOG descriptors of given image. Read more
Performs object detection without a multi-scale window. Read more
Performs object detection without a multi-scale window. Read more
Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles. Read more
Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles. Read more
fn compute_gradient(
&self,
img: &dyn ToInputArray,
grad: &mut dyn ToInputOutputArray,
angle_ofs: &mut dyn ToInputOutputArray,
padding_tl: Size,
padding_br: Size
) -> Result<()>
fn compute_gradient(
&self,
img: &dyn ToInputArray,
grad: &mut dyn ToInputOutputArray,
angle_ofs: &mut dyn ToInputOutputArray,
padding_tl: Size,
padding_br: Size
) -> Result<()>
Computes gradients and quantized gradient orientations. Read more
evaluate specified ROI and return confidence value for each location Read more
fn detect_multi_scale_roi(
&self,
img: &dyn ToInputArray,
found_locations: &mut Vector<Rect>,
locations: &mut Vector<DetectionROI>,
hit_threshold: f64,
group_threshold: i32
) -> Result<()>
fn detect_multi_scale_roi(
&self,
img: &dyn ToInputArray,
found_locations: &mut Vector<Rect>,
locations: &mut Vector<DetectionROI>,
hit_threshold: f64,
group_threshold: i32
) -> Result<()>
evaluate specified ROI and return confidence value for each location in multiple scales Read more