OpenCV for Unity  2.6.3
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
OpenCVForUnity.ObjdetectModule.HOGDescriptor Class Reference

Implementation of HOG (Histogram of Oriented Gradients) descriptor and object detector. More...

Inheritance diagram for OpenCVForUnity.ObjdetectModule.HOGDescriptor:
OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableObject

Public Member Functions

IntPtr getNativeObjAddr ()
 
 HOGDescriptor ()
 Creates the HOG descriptor and detector with default parameters. More...
 
 HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, bool _gammaCorrection, int _nlevels, bool _signedGradient)
 
 HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, bool _gammaCorrection, int _nlevels)
 
 HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, bool _gammaCorrection)
 
 HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold)
 
 HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType)
 
 HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma)
 
 HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture)
 
 HOGDescriptor (Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins)
 
 HOGDescriptor (string filename)
 
long getDescriptorSize ()
 Returns the number of coefficients required for the classification. More...
 
bool checkDetectorSize ()
 Checks if detector size equal to descriptor size. More...
 
double getWinSigma ()
 Returns winSigma value. More...
 
void setSVMDetector (Mat svmdetector)
 Sets coefficients for the linear SVM classifier. More...
 
bool load (string filename, string objname)
 loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file More...
 
bool load (string filename)
 loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file More...
 
void save (string filename, string objname)
 saves HOGDescriptor parameters and coefficients for the linear SVM classifier to a file More...
 
void save (string filename)
 saves HOGDescriptor parameters and coefficients for the linear SVM classifier to a file More...
 
void compute (Mat img, MatOfFloat descriptors, Size winStride, Size padding, MatOfPoint locations)
 Computes HOG descriptors of given image. More...
 
void compute (Mat img, MatOfFloat descriptors, Size winStride, Size padding)
 Computes HOG descriptors of given image. More...
 
void compute (Mat img, MatOfFloat descriptors, Size winStride)
 Computes HOG descriptors of given image. More...
 
void compute (Mat img, MatOfFloat descriptors)
 Computes HOG descriptors of given image. More...
 
void detect (Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding, MatOfPoint searchLocations)
 Performs object detection without a multi-scale window. More...
 
void detect (Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding)
 Performs object detection without a multi-scale window. More...
 
void detect (Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride)
 Performs object detection without a multi-scale window. More...
 
void detect (Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold)
 Performs object detection without a multi-scale window. More...
 
void detect (Mat img, MatOfPoint foundLocations, MatOfDouble weights)
 Performs object detection without a multi-scale window. More...
 
void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double groupThreshold, bool useMeanshiftGrouping)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles. More...
 
void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double groupThreshold)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles. More...
 
void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles. More...
 
void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles. More...
 
void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles. More...
 
void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles. More...
 
void detectMultiScale (Mat img, MatOfRect foundLocations, MatOfDouble foundWeights)
 Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles. More...
 
void computeGradient (Mat img, Mat grad, Mat angleOfs, Size paddingTL, Size paddingBR)
 Computes gradients and quantized gradient orientations. More...
 
void computeGradient (Mat img, Mat grad, Mat angleOfs, Size paddingTL)
 Computes gradients and quantized gradient orientations. More...
 
void computeGradient (Mat img, Mat grad, Mat angleOfs)
 Computes gradients and quantized gradient orientations. More...
 
Size get_winSize ()
 
Size get_blockSize ()
 
Size get_blockStride ()
 
Size get_cellSize ()
 
int get_nbins ()
 
int get_derivAperture ()
 
double get_winSigma ()
 
int get_histogramNormType ()
 
double get_L2HysThreshold ()
 
bool get_gammaCorrection ()
 
MatOfFloat get_svmDetector ()
 
int get_nlevels ()
 
bool get_signedGradient ()
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static HOGDescriptor __fromPtr__ (IntPtr addr)
 
static MatOfFloat getDefaultPeopleDetector ()
 Returns coefficients of the classifier trained for people detection (for 64x128 windows). More...
 
static MatOfFloat getDaimlerPeopleDetector ()
 Returns coefficients of the classifier trained for people detection (for 48x96 windows). More...
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Public Attributes

const int DEFAULT_NLEVELS = 64
 
const int DESCR_FORMAT_COL_BY_COL = 0
 
const int DESCR_FORMAT_ROW_BY_ROW = 1
 
const int L2Hys = 0
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed 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

Constructor & Destructor Documentation

◆ HOGDescriptor() [1/10]

OpenCVForUnity.ObjdetectModule.HOGDescriptor.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 )

◆ HOGDescriptor() [2/10]

OpenCVForUnity.ObjdetectModule.HOGDescriptor.HOGDescriptor ( Size  _winSize,
Size  _blockSize,
Size  _blockStride,
Size  _cellSize,
int  _nbins,
int  _derivAperture,
double  _winSigma,
int  _histogramNormType,
double  _L2HysThreshold,
bool  _gammaCorrection,
int  _nlevels,
bool  _signedGradient 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
_winSizesets winSize with given value.
_blockSizesets blockSize with given value.
_blockStridesets blockStride with given value.
_cellSizesets cellSize with given value.
_nbinssets nbins with given value.
_derivAperturesets derivAperture with given value.
_winSigmasets winSigma with given value.
_histogramNormTypesets histogramNormType with given value.
_L2HysThresholdsets L2HysThreshold with given value.
_gammaCorrectionsets gammaCorrection with given value.
_nlevelssets nlevels with given value.
_signedGradientsets signedGradient with given value.

◆ HOGDescriptor() [3/10]

OpenCVForUnity.ObjdetectModule.HOGDescriptor.HOGDescriptor ( Size  _winSize,
Size  _blockSize,
Size  _blockStride,
Size  _cellSize,
int  _nbins,
int  _derivAperture,
double  _winSigma,
int  _histogramNormType,
double  _L2HysThreshold,
bool  _gammaCorrection,
int  _nlevels 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
_winSizesets winSize with given value.
_blockSizesets blockSize with given value.
_blockStridesets blockStride with given value.
_cellSizesets cellSize with given value.
_nbinssets nbins with given value.
_derivAperturesets derivAperture with given value.
_winSigmasets winSigma with given value.
_histogramNormTypesets histogramNormType with given value.
_L2HysThresholdsets L2HysThreshold with given value.
_gammaCorrectionsets gammaCorrection with given value.
_nlevelssets nlevels with given value.
_signedGradientsets signedGradient with given value.

◆ HOGDescriptor() [4/10]

OpenCVForUnity.ObjdetectModule.HOGDescriptor.HOGDescriptor ( Size  _winSize,
Size  _blockSize,
Size  _blockStride,
Size  _cellSize,
int  _nbins,
int  _derivAperture,
double  _winSigma,
int  _histogramNormType,
double  _L2HysThreshold,
bool  _gammaCorrection 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
_winSizesets winSize with given value.
_blockSizesets blockSize with given value.
_blockStridesets blockStride with given value.
_cellSizesets cellSize with given value.
_nbinssets nbins with given value.
_derivAperturesets derivAperture with given value.
_winSigmasets winSigma with given value.
_histogramNormTypesets histogramNormType with given value.
_L2HysThresholdsets L2HysThreshold with given value.
_gammaCorrectionsets gammaCorrection with given value.
_nlevelssets nlevels with given value.
_signedGradientsets signedGradient with given value.

◆ HOGDescriptor() [5/10]

OpenCVForUnity.ObjdetectModule.HOGDescriptor.HOGDescriptor ( Size  _winSize,
Size  _blockSize,
Size  _blockStride,
Size  _cellSize,
int  _nbins,
int  _derivAperture,
double  _winSigma,
int  _histogramNormType,
double  _L2HysThreshold 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
_winSizesets winSize with given value.
_blockSizesets blockSize with given value.
_blockStridesets blockStride with given value.
_cellSizesets cellSize with given value.
_nbinssets nbins with given value.
_derivAperturesets derivAperture with given value.
_winSigmasets winSigma with given value.
_histogramNormTypesets histogramNormType with given value.
_L2HysThresholdsets L2HysThreshold with given value.
_gammaCorrectionsets gammaCorrection with given value.
_nlevelssets nlevels with given value.
_signedGradientsets signedGradient with given value.

◆ HOGDescriptor() [6/10]

OpenCVForUnity.ObjdetectModule.HOGDescriptor.HOGDescriptor ( Size  _winSize,
Size  _blockSize,
Size  _blockStride,
Size  _cellSize,
int  _nbins,
int  _derivAperture,
double  _winSigma,
int  _histogramNormType 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
_winSizesets winSize with given value.
_blockSizesets blockSize with given value.
_blockStridesets blockStride with given value.
_cellSizesets cellSize with given value.
_nbinssets nbins with given value.
_derivAperturesets derivAperture with given value.
_winSigmasets winSigma with given value.
_histogramNormTypesets histogramNormType with given value.
_L2HysThresholdsets L2HysThreshold with given value.
_gammaCorrectionsets gammaCorrection with given value.
_nlevelssets nlevels with given value.
_signedGradientsets signedGradient with given value.

◆ HOGDescriptor() [7/10]

OpenCVForUnity.ObjdetectModule.HOGDescriptor.HOGDescriptor ( Size  _winSize,
Size  _blockSize,
Size  _blockStride,
Size  _cellSize,
int  _nbins,
int  _derivAperture,
double  _winSigma 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
_winSizesets winSize with given value.
_blockSizesets blockSize with given value.
_blockStridesets blockStride with given value.
_cellSizesets cellSize with given value.
_nbinssets nbins with given value.
_derivAperturesets derivAperture with given value.
_winSigmasets winSigma with given value.
_histogramNormTypesets histogramNormType with given value.
_L2HysThresholdsets L2HysThreshold with given value.
_gammaCorrectionsets gammaCorrection with given value.
_nlevelssets nlevels with given value.
_signedGradientsets signedGradient with given value.

◆ HOGDescriptor() [8/10]

OpenCVForUnity.ObjdetectModule.HOGDescriptor.HOGDescriptor ( Size  _winSize,
Size  _blockSize,
Size  _blockStride,
Size  _cellSize,
int  _nbins,
int  _derivAperture 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
_winSizesets winSize with given value.
_blockSizesets blockSize with given value.
_blockStridesets blockStride with given value.
_cellSizesets cellSize with given value.
_nbinssets nbins with given value.
_derivAperturesets derivAperture with given value.
_winSigmasets winSigma with given value.
_histogramNormTypesets histogramNormType with given value.
_L2HysThresholdsets L2HysThreshold with given value.
_gammaCorrectionsets gammaCorrection with given value.
_nlevelssets nlevels with given value.
_signedGradientsets signedGradient with given value.

◆ HOGDescriptor() [9/10]

OpenCVForUnity.ObjdetectModule.HOGDescriptor.HOGDescriptor ( Size  _winSize,
Size  _blockSize,
Size  _blockStride,
Size  _cellSize,
int  _nbins 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
_winSizesets winSize with given value.
_blockSizesets blockSize with given value.
_blockStridesets blockStride with given value.
_cellSizesets cellSize with given value.
_nbinssets nbins with given value.
_derivAperturesets derivAperture with given value.
_winSigmasets winSigma with given value.
_histogramNormTypesets histogramNormType with given value.
_L2HysThresholdsets L2HysThreshold with given value.
_gammaCorrectionsets gammaCorrection with given value.
_nlevelssets nlevels with given value.
_signedGradientsets signedGradient with given value.

◆ HOGDescriptor() [10/10]

OpenCVForUnity.ObjdetectModule.HOGDescriptor.HOGDescriptor ( string  filename)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Creates the HOG descriptor and detector and loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file.
Parameters
filenameThe file name containing HOGDescriptor properties and coefficients for the linear SVM classifier.

Member Function Documentation

◆ __fromPtr__()

static HOGDescriptor OpenCVForUnity.ObjdetectModule.HOGDescriptor.__fromPtr__ ( IntPtr  addr)
static

◆ checkDetectorSize()

bool OpenCVForUnity.ObjdetectModule.HOGDescriptor.checkDetectorSize ( )

Checks if detector size equal to descriptor size.

◆ compute() [1/4]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.compute ( Mat  img,
MatOfFloat  descriptors,
Size  winStride,
Size  padding,
MatOfPoint  locations 
)

Computes HOG descriptors of given image.

Parameters
imgMatrix of the type CV_8U containing an image where HOG features will be calculated.
descriptorsMatrix of the type CV_32F
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
locationsVector of Point

◆ compute() [2/4]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.compute ( Mat  img,
MatOfFloat  descriptors,
Size  winStride,
Size  padding 
)

Computes HOG descriptors of given image.

Parameters
imgMatrix of the type CV_8U containing an image where HOG features will be calculated.
descriptorsMatrix of the type CV_32F
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
locationsVector of Point

◆ compute() [3/4]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.compute ( Mat  img,
MatOfFloat  descriptors,
Size  winStride 
)

Computes HOG descriptors of given image.

Parameters
imgMatrix of the type CV_8U containing an image where HOG features will be calculated.
descriptorsMatrix of the type CV_32F
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
locationsVector of Point

◆ compute() [4/4]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.compute ( Mat  img,
MatOfFloat  descriptors 
)

Computes HOG descriptors of given image.

Parameters
imgMatrix of the type CV_8U containing an image where HOG features will be calculated.
descriptorsMatrix of the type CV_32F
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
locationsVector of Point

◆ computeGradient() [1/3]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.computeGradient ( Mat  img,
Mat  grad,
Mat  angleOfs,
Size  paddingTL,
Size  paddingBR 
)

Computes gradients and quantized gradient orientations.

Parameters
imgMatrix contains the image to be computed
gradMatrix of type CV_32FC2 contains computed gradients
angleOfsMatrix of type CV_8UC2 contains quantized gradient orientations
paddingTLPadding from top-left
paddingBRPadding from bottom-right

◆ computeGradient() [2/3]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.computeGradient ( Mat  img,
Mat  grad,
Mat  angleOfs,
Size  paddingTL 
)

Computes gradients and quantized gradient orientations.

Parameters
imgMatrix contains the image to be computed
gradMatrix of type CV_32FC2 contains computed gradients
angleOfsMatrix of type CV_8UC2 contains quantized gradient orientations
paddingTLPadding from top-left
paddingBRPadding from bottom-right

◆ computeGradient() [3/3]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.computeGradient ( Mat  img,
Mat  grad,
Mat  angleOfs 
)

Computes gradients and quantized gradient orientations.

Parameters
imgMatrix contains the image to be computed
gradMatrix of type CV_32FC2 contains computed gradients
angleOfsMatrix of type CV_8UC2 contains quantized gradient orientations
paddingTLPadding from top-left
paddingBRPadding from bottom-right

◆ detect() [1/5]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.detect ( Mat  img,
MatOfPoint  foundLocations,
MatOfDouble  weights,
double  hitThreshold,
Size  winStride,
Size  padding,
MatOfPoint  searchLocations 
)

Performs object detection without a multi-scale window.

Parameters
imgMatrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
foundLocationsVector of point where each point contains left-top corner point of detected object boundaries.
weightsVector that will contain confidence values for each detected object.
hitThresholdThreshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified 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.
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
searchLocationsVector of Point includes set of requested locations to be evaluated.

◆ detect() [2/5]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.detect ( Mat  img,
MatOfPoint  foundLocations,
MatOfDouble  weights,
double  hitThreshold,
Size  winStride,
Size  padding 
)

Performs object detection without a multi-scale window.

Parameters
imgMatrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
foundLocationsVector of point where each point contains left-top corner point of detected object boundaries.
weightsVector that will contain confidence values for each detected object.
hitThresholdThreshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified 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.
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
searchLocationsVector of Point includes set of requested locations to be evaluated.

◆ detect() [3/5]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.detect ( Mat  img,
MatOfPoint  foundLocations,
MatOfDouble  weights,
double  hitThreshold,
Size  winStride 
)

Performs object detection without a multi-scale window.

Parameters
imgMatrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
foundLocationsVector of point where each point contains left-top corner point of detected object boundaries.
weightsVector that will contain confidence values for each detected object.
hitThresholdThreshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified 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.
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
searchLocationsVector of Point includes set of requested locations to be evaluated.

◆ detect() [4/5]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.detect ( Mat  img,
MatOfPoint  foundLocations,
MatOfDouble  weights,
double  hitThreshold 
)

Performs object detection without a multi-scale window.

Parameters
imgMatrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
foundLocationsVector of point where each point contains left-top corner point of detected object boundaries.
weightsVector that will contain confidence values for each detected object.
hitThresholdThreshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified 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.
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
searchLocationsVector of Point includes set of requested locations to be evaluated.

◆ detect() [5/5]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.detect ( Mat  img,
MatOfPoint  foundLocations,
MatOfDouble  weights 
)

Performs object detection without a multi-scale window.

Parameters
imgMatrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
foundLocationsVector of point where each point contains left-top corner point of detected object boundaries.
weightsVector that will contain confidence values for each detected object.
hitThresholdThreshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified 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.
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
searchLocationsVector of Point includes set of requested locations to be evaluated.

◆ detectMultiScale() [1/7]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.detectMultiScale ( Mat  img,
MatOfRect  foundLocations,
MatOfDouble  foundWeights,
double  hitThreshold,
Size  winStride,
Size  padding,
double  scale,
double  groupThreshold,
bool  useMeanshiftGrouping 
)

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

Parameters
imgMatrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
foundLocationsVector of rectangles where each rectangle contains the detected object.
foundWeightsVector that will contain confidence values for each detected object.
hitThresholdThreshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified 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.
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
scaleCoefficient of the detection window increase.
groupThresholdCoefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
useMeanshiftGroupingindicates grouping algorithm

◆ detectMultiScale() [2/7]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.detectMultiScale ( Mat  img,
MatOfRect  foundLocations,
MatOfDouble  foundWeights,
double  hitThreshold,
Size  winStride,
Size  padding,
double  scale,
double  groupThreshold 
)

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

Parameters
imgMatrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
foundLocationsVector of rectangles where each rectangle contains the detected object.
foundWeightsVector that will contain confidence values for each detected object.
hitThresholdThreshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified 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.
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
scaleCoefficient of the detection window increase.
groupThresholdCoefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
useMeanshiftGroupingindicates grouping algorithm

◆ detectMultiScale() [3/7]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.detectMultiScale ( Mat  img,
MatOfRect  foundLocations,
MatOfDouble  foundWeights,
double  hitThreshold,
Size  winStride,
Size  padding,
double  scale 
)

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

Parameters
imgMatrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
foundLocationsVector of rectangles where each rectangle contains the detected object.
foundWeightsVector that will contain confidence values for each detected object.
hitThresholdThreshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified 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.
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
scaleCoefficient of the detection window increase.
groupThresholdCoefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
useMeanshiftGroupingindicates grouping algorithm

◆ detectMultiScale() [4/7]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.detectMultiScale ( Mat  img,
MatOfRect  foundLocations,
MatOfDouble  foundWeights,
double  hitThreshold,
Size  winStride,
Size  padding 
)

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

Parameters
imgMatrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
foundLocationsVector of rectangles where each rectangle contains the detected object.
foundWeightsVector that will contain confidence values for each detected object.
hitThresholdThreshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified 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.
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
scaleCoefficient of the detection window increase.
groupThresholdCoefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
useMeanshiftGroupingindicates grouping algorithm

◆ detectMultiScale() [5/7]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.detectMultiScale ( Mat  img,
MatOfRect  foundLocations,
MatOfDouble  foundWeights,
double  hitThreshold,
Size  winStride 
)

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

Parameters
imgMatrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
foundLocationsVector of rectangles where each rectangle contains the detected object.
foundWeightsVector that will contain confidence values for each detected object.
hitThresholdThreshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified 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.
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
scaleCoefficient of the detection window increase.
groupThresholdCoefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
useMeanshiftGroupingindicates grouping algorithm

◆ detectMultiScale() [6/7]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.detectMultiScale ( Mat  img,
MatOfRect  foundLocations,
MatOfDouble  foundWeights,
double  hitThreshold 
)

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

Parameters
imgMatrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
foundLocationsVector of rectangles where each rectangle contains the detected object.
foundWeightsVector that will contain confidence values for each detected object.
hitThresholdThreshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified 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.
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
scaleCoefficient of the detection window increase.
groupThresholdCoefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
useMeanshiftGroupingindicates grouping algorithm

◆ detectMultiScale() [7/7]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.detectMultiScale ( Mat  img,
MatOfRect  foundLocations,
MatOfDouble  foundWeights 
)

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

Parameters
imgMatrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
foundLocationsVector of rectangles where each rectangle contains the detected object.
foundWeightsVector that will contain confidence values for each detected object.
hitThresholdThreshold for the distance between features and SVM classifying plane. Usually it is 0 and should be specified 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.
winStrideWindow stride. It must be a multiple of block stride.
paddingPadding
scaleCoefficient of the detection window increase.
groupThresholdCoefficient to regulate the similarity threshold. When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
useMeanshiftGroupingindicates grouping algorithm

◆ Dispose()

override void OpenCVForUnity.ObjdetectModule.HOGDescriptor.Dispose ( bool  disposing)
protectedvirtual

◆ get_blockSize()

Size OpenCVForUnity.ObjdetectModule.HOGDescriptor.get_blockSize ( )

◆ get_blockStride()

Size OpenCVForUnity.ObjdetectModule.HOGDescriptor.get_blockStride ( )

◆ get_cellSize()

Size OpenCVForUnity.ObjdetectModule.HOGDescriptor.get_cellSize ( )

◆ get_derivAperture()

int OpenCVForUnity.ObjdetectModule.HOGDescriptor.get_derivAperture ( )

◆ get_gammaCorrection()

bool OpenCVForUnity.ObjdetectModule.HOGDescriptor.get_gammaCorrection ( )

◆ get_histogramNormType()

int OpenCVForUnity.ObjdetectModule.HOGDescriptor.get_histogramNormType ( )

◆ get_L2HysThreshold()

double OpenCVForUnity.ObjdetectModule.HOGDescriptor.get_L2HysThreshold ( )

◆ get_nbins()

int OpenCVForUnity.ObjdetectModule.HOGDescriptor.get_nbins ( )

◆ get_nlevels()

int OpenCVForUnity.ObjdetectModule.HOGDescriptor.get_nlevels ( )

◆ get_signedGradient()

bool OpenCVForUnity.ObjdetectModule.HOGDescriptor.get_signedGradient ( )

◆ get_svmDetector()

MatOfFloat OpenCVForUnity.ObjdetectModule.HOGDescriptor.get_svmDetector ( )

◆ get_winSigma()

double OpenCVForUnity.ObjdetectModule.HOGDescriptor.get_winSigma ( )

◆ get_winSize()

Size OpenCVForUnity.ObjdetectModule.HOGDescriptor.get_winSize ( )

◆ getDaimlerPeopleDetector()

static MatOfFloat OpenCVForUnity.ObjdetectModule.HOGDescriptor.getDaimlerPeopleDetector ( )
static

Returns coefficients of the classifier trained for people detection (for 48x96 windows).

◆ getDefaultPeopleDetector()

static MatOfFloat OpenCVForUnity.ObjdetectModule.HOGDescriptor.getDefaultPeopleDetector ( )
static

Returns coefficients of the classifier trained for people detection (for 64x128 windows).

◆ getDescriptorSize()

long OpenCVForUnity.ObjdetectModule.HOGDescriptor.getDescriptorSize ( )

Returns the number of coefficients required for the classification.

◆ getNativeObjAddr()

IntPtr OpenCVForUnity.ObjdetectModule.HOGDescriptor.getNativeObjAddr ( )

◆ getWinSigma()

double OpenCVForUnity.ObjdetectModule.HOGDescriptor.getWinSigma ( )

Returns winSigma value.

◆ load() [1/2]

bool OpenCVForUnity.ObjdetectModule.HOGDescriptor.load ( string  filename,
string  objname 
)

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

Parameters
filenameName of the file to read.
objnameThe optional name of the node to read (if empty, the first top-level node will be used).

◆ load() [2/2]

bool OpenCVForUnity.ObjdetectModule.HOGDescriptor.load ( string  filename)

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

Parameters
filenameName of the file to read.
objnameThe optional name of the node to read (if empty, the first top-level node will be used).

◆ save() [1/2]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.save ( string  filename,
string  objname 
)

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

Parameters
filenameFile name
objnameObject name

◆ save() [2/2]

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.save ( string  filename)

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

Parameters
filenameFile name
objnameObject name

◆ setSVMDetector()

void OpenCVForUnity.ObjdetectModule.HOGDescriptor.setSVMDetector ( Mat  svmdetector)

Sets coefficients for the linear SVM classifier.

Parameters
svmdetectorcoefficients for the linear SVM classifier.

Member Data Documentation

◆ DEFAULT_NLEVELS

const int OpenCVForUnity.ObjdetectModule.HOGDescriptor.DEFAULT_NLEVELS = 64

◆ DESCR_FORMAT_COL_BY_COL

const int OpenCVForUnity.ObjdetectModule.HOGDescriptor.DESCR_FORMAT_COL_BY_COL = 0

◆ DESCR_FORMAT_ROW_BY_ROW

const int OpenCVForUnity.ObjdetectModule.HOGDescriptor.DESCR_FORMAT_ROW_BY_ROW = 1

◆ L2Hys

const int OpenCVForUnity.ObjdetectModule.HOGDescriptor.L2Hys = 0

The documentation for this class was generated from the following file: