Table of Contents

Class HOGDescriptor

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

HOG (Histogram-of-Oriented-Gradients) Descriptor and Object Detector

public class HOGDescriptor : CvObject, IDisposable
Inheritance
HOGDescriptor
Implements
Inherited Members

Constructors

HOGDescriptor()

Default constructor

HOGDescriptor(Size?, Size?, Size?, Size?, int, int, double, HistogramNormType, double, bool, int)

Creates the HOG descriptor and detector.

HOGDescriptor(string)

Construct from a file containing HOGDescriptor properties and coefficients for the linear SVM classifier.

Fields

DaimlerPeopleDetector

This field returns 1981 SVM coeffs obtained from daimler's base. To use these coeffs the detection window size should be (48,96)

DefaultNlevels
DefaultPeopleDetector

Returns coefficients of the classifier trained for people detection (for default window size).

L2Hys

Properties

BlockSize

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

BlockStride

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

CellSize

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

DerivAperture
GammaCorrection

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

HistogramNormType

HistogramNormType

L2HysThreshold

L2-Hys normalization method shrinkage.

NLevels

Maximum number of detection window increases. Default value is 64

Nbins

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

SignedGradient

Indicates signed gradient will be used or not

WinSigma

Gaussian smoothing window parameter.

WinSize

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

Methods

CheckDetectorSize()
Compute(Mat, Size?, Size?, Point[]?)

Computes HOG descriptors of given image.

ComputeGradient(Mat, Mat, Mat, Size?, Size?)

Computes gradients and quantized gradient orientations.

Detect(Mat, double, Size?, Size?, Point[]?)

Performs object detection without a multi-scale window.

Detect(Mat, out double[], double, Size?, Size?, Point[]?)

Performs object detection without a multi-scale window.

DetectMultiScale(Mat, double, Size?, Size?, double, int)

Performs object detection with a multi-scale window.

DetectMultiScale(Mat, out double[], double, Size?, Size?, double, int)

Performs object detection with a multi-scale window.

DetectMultiScaleROI(Mat, out Rect[], out DetectionROI[], double, int)

evaluate specified ROI and return confidence value for each location in multiple scales

DetectROI(Mat, Point[], out Point[], out double[], double, Size?, Size?)

evaluate specified ROI and return confidence value for each location

GetDaimlerPeopleDetector()

This method returns 1981 SVM coeffs obtained from daimler's base. To use these coeffs the detection window size should be (48,96)

GetDefaultPeopleDetector()

Returns coefficients of the classifier trained for people detection (for default window size).

GetDescriptorSize()
GetWinSigma()
GroupRectangles(out Rect[], out double[], int, double)

Groups the object candidate rectangles.

Load(string, string?)

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

Save(string, string?)

saves HOGDescriptor parameters and coefficients for the linear SVM classifier to a file

SetSVMDetector(float[])

Sets coefficients for the linear SVM classifier.