Class CudaHOG
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
SizeDetection 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
SizeBlock size in cells. Use (16, 16) for default.
blockStride
SizeBlock stride. Must be a multiple of cell size. Use (8,8) for default.
cellSize
SizeCell size. Use (8, 8) for default.
nbins
intNumber of bins.
Properties
BlockHistogramSize
Returns the block histogram size.
public nint BlockHistogramSize { get; }
Property Value
DescriptorFormat
The descriptor format
public CudaHOG.DescrFormat DescriptorFormat { get; }
Property Value
DescriptorSize
Returns the number of coefficients required for the classification.
public nint DescriptorSize { get; }
Property Value
GammaCorrection
Flag to specify whether the gamma correction preprocessing is required or not
public bool GammaCorrection { get; set; }
Property Value
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
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
L2HysThreshold
L2-Hys normalization method shrinkage.
public double L2HysThreshold { get; set; }
Property Value
NumLevels
Maximum number of detection window increases
public int NumLevels { get; set; }
Property Value
ScaleFactor
Coefficient of the detection window increase.
public double ScaleFactor { get; set; }
Property Value
WinSigma
Gaussian smoothing window parameter
public double WinSigma { get; set; }
Property Value
WinStride
Window stride. It must be a multiple of block stride.
public Size WinStride { get; set; }
Property Value
Methods
DetectMultiScale(IInputArray)
Performs object detection with increasing detection window.
public MCvObjectDetection[] DetectMultiScale(IInputArray image)
Parameters
image
IInputArrayThe 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
IInputArraySource image.
objects
VectorOfRectDetected objects boundaries.
confident
VectorOfDoubleOptional 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
IInputArrayThe SVM detector