Table of Contents

Class CudaHOG

Namespace
Emgu.CV.Cuda
Assembly
Emgu.CV.dll

A HOG descriptor

public class CudaHOG : SharedPtrObject, IDisposable
Inheritance
CudaHOG
Implements
Inherited Members

Constructors

CudaHOG(Size, Size, Size, Size, int)

Create a new HOGDescriptor using the specific parameters

public CudaHOG(Size winSize, Size blockSize, Size blockStride, Size cellSize, int nbins = 9)

Parameters

winSize Size

Detection window size. Must be aligned to block size and block stride. Must match the size of the training image. Use (64, 128) for default.

blockSize Size

Block size in cells. Use (16, 16) for default.

blockStride Size

Block stride. Must be a multiple of cell size. Use (8,8) for default.

cellSize Size

Cell size. Use (8, 8) for default.

nbins int

Number of bins.

Properties

BlockHistogramSize

Returns the block histogram size.

public nint BlockHistogramSize { get; }

Property Value

nint

DescriptorFormat

The descriptor format

public CudaHOG.DescrFormat DescriptorFormat { get; }

Property Value

CudaHOG.DescrFormat

DescriptorSize

Returns the number of coefficients required for the classification.

public nint DescriptorSize { get; }

Property Value

nint

GammaCorrection

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

public bool GammaCorrection { get; set; }

Property Value

bool

GroupThreshold

Coefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping. See groupRectangles.

public int GroupThreshold { get; set; }

Property Value

int

HitThreshold

Threshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specfied in the detector coefficients (as the last free coefficient). But if the free coefficient is omitted (which is allowed), you can specify it manually here.

public double HitThreshold { get; set; }

Property Value

double

L2HysThreshold

L2-Hys normalization method shrinkage.

public double L2HysThreshold { get; set; }

Property Value

double

NumLevels

Maximum number of detection window increases

public int NumLevels { get; set; }

Property Value

int

ScaleFactor

Coefficient of the detection window increase.

public double ScaleFactor { get; set; }

Property Value

double

WinSigma

Gaussian smoothing window parameter

public double WinSigma { get; set; }

Property Value

double

WinStride

Window stride. It must be a multiple of block stride.

public Size WinStride { get; set; }

Property Value

Size

Methods

DetectMultiScale(IInputArray)

Performs object detection with increasing detection window.

public MCvObjectDetection[] DetectMultiScale(IInputArray image)

Parameters

image IInputArray

The CudaImage to search in

Returns

MCvObjectDetection[]

The regions where positives are found

DetectMultiScale(IInputArray, VectorOfRect, VectorOfDouble)

Performs object detection with a multi-scale window.

public void DetectMultiScale(IInputArray image, VectorOfRect objects, VectorOfDouble confident = null)

Parameters

image IInputArray

Source image.

objects VectorOfRect

Detected objects boundaries.

confident VectorOfDouble

Optional output array for confidences.

DisposeObject()

Release the unmanaged memory associated with this HOGDescriptor

protected override void DisposeObject()

GetDefaultPeopleDetector()

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

public Mat GetDefaultPeopleDetector()

Returns

Mat

The default people detector

SetSVMDetector(IInputArray)

Set the SVM detector

public void SetSVMDetector(IInputArray detector)

Parameters

detector IInputArray

The SVM detector