C# 클래스 OpenCvSharp.HOGDescriptor

HOG (Histogram-of-Oriented-Gradients) Descriptor and Object Detector
상속: OpenCvSharp.DisposableCvObject
파일 보기 프로젝트 열기: shimat/opencvsharp 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DaimlerPeopleDetector float[]
DefaultPeopleDetector float[]
SizeOf int

공개 메소드들

메소드 설명
CheckDetectorSize ( ) : bool

Compute ( OpenCvSharp.Mat img, Size winStride = null, Size padding = null, System.Point locations = null ) : float[]

ComputeGradient ( OpenCvSharp.Mat img, OpenCvSharp.Mat grad, OpenCvSharp.Mat angleOfs, Size paddingTL = null, Size paddingBR = null ) : void

Detect ( OpenCvSharp.Mat img, double hitThreshold, Size winStride = null, Size padding = null, System.Point searchLocations = null ) : System.Point[]

Performs object detection without a multi-scale window.

Detect ( OpenCvSharp.Mat img, double &weights, double hitThreshold, Size winStride = null, Size padding = null, System.Point searchLocations = null ) : System.Point[]

Performs object detection without a multi-scale window.

DetectMultiScale ( OpenCvSharp.Mat img, double hitThreshold, Size winStride = null, Size padding = null, double scale = 1.05, int groupThreshold = 2 ) : Rect[]

Performs object detection with a multi-scale window.

DetectMultiScale ( OpenCvSharp.Mat img, double &foundWeights, double hitThreshold, Size winStride = null, Size padding = null, double scale = 1.05, int groupThreshold = 2 ) : Rect[]

Performs object detection with a multi-scale window.

DetectMultiScaleROI ( OpenCvSharp.Mat img, Rect &foundLocations, DetectionROI &locations, double hitThreshold, int groupThreshold ) : void

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

DetectROI ( OpenCvSharp.Mat img, System.Point locations, System.Point &foundLocations, double &confidences, double hitThreshold, Size winStride = null, Size padding = null ) : void

evaluate specified ROI and return confidence value for each location

GetDaimlerPeopleDetector ( ) : float[]

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

GetDefaultPeopleDetector ( ) : float[]

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

GetDescriptorSize ( ) : int

GetWinSigma ( ) : double

GroupRectangles ( Rect &rectList, double &weights, int groupThreshold, double eps ) : void

HOGDescriptor ( ) : System

Default constructor

HOGDescriptor ( IntPtr ptr ) : System

Initializes from pointer

HOGDescriptor ( Size winSize = null, Size blockSize = null, Size blockStride = null, Size cellSize = null, int nbins = 9, int derivAperture = 1, double winSigma = -1, HistogramNormType histogramNormType = HistogramNormType.L2Hys, double l2HysThreshold = 0.2, bool gammaCorrection = true, int nlevels = DefaultNlevels ) : System

Creates the HOG descriptor and detector.

HOGDescriptor ( string fileName ) : System

Load ( string fileName, string objName = null ) : bool

ReadALTModel ( string modelFile ) : void

read/parse Dalal's alt model file

Save ( string fileName, string objName = null ) : void

SetSVMDetector ( float svmDetector ) : void

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Clean up any resources being used.

메소드 상세

CheckDetectorSize() 공개 메소드

public CheckDetectorSize ( ) : bool
리턴 bool

Compute() 공개 메소드

public Compute ( OpenCvSharp.Mat img, Size winStride = null, Size padding = null, System.Point locations = null ) : float[]
img OpenCvSharp.Mat
winStride Size
padding Size
locations System.Point
리턴 float[]

ComputeGradient() 공개 메소드

public ComputeGradient ( OpenCvSharp.Mat img, OpenCvSharp.Mat grad, OpenCvSharp.Mat angleOfs, Size paddingTL = null, Size paddingBR = null ) : void
img OpenCvSharp.Mat
grad OpenCvSharp.Mat
angleOfs OpenCvSharp.Mat
paddingTL Size
paddingBR Size
리턴 void

Detect() 공개 메소드

Performs object detection without a multi-scale window.
public Detect ( OpenCvSharp.Mat img, double hitThreshold, Size winStride = null, Size padding = null, System.Point searchLocations = null ) : System.Point[]
img OpenCvSharp.Mat Source image. CV_8UC1 and CV_8UC4 types are supported for now.
hitThreshold double 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.
winStride Size Window stride. It must be a multiple of block stride.
padding Size Mock parameter to keep the CPU interface compatibility. It must be (0,0).
searchLocations System.Point
리턴 System.Point[]

Detect() 공개 메소드

Performs object detection without a multi-scale window.
public Detect ( OpenCvSharp.Mat img, double &weights, double hitThreshold, Size winStride = null, Size padding = null, System.Point searchLocations = null ) : System.Point[]
img OpenCvSharp.Mat Source image. CV_8UC1 and CV_8UC4 types are supported for now.
weights double
hitThreshold double 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.
winStride Size Window stride. It must be a multiple of block stride.
padding Size Mock parameter to keep the CPU interface compatibility. It must be (0,0).
searchLocations System.Point
리턴 System.Point[]

DetectMultiScale() 공개 메소드

Performs object detection with a multi-scale window.
public DetectMultiScale ( OpenCvSharp.Mat img, double hitThreshold, Size winStride = null, Size padding = null, double scale = 1.05, int groupThreshold = 2 ) : Rect[]
img OpenCvSharp.Mat Source image. CV_8UC1 and CV_8UC4 types are supported for now.
hitThreshold double Threshold for the distance between features and SVM classifying plane.
winStride Size Window stride. It must be a multiple of block stride.
padding Size Mock parameter to keep the CPU interface compatibility. It must be (0,0).
scale double Coefficient of the detection window increase.
groupThreshold int Coefficient to regulate the similarity threshold. /// When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
리턴 Rect[]

DetectMultiScale() 공개 메소드

Performs object detection with a multi-scale window.
public DetectMultiScale ( OpenCvSharp.Mat img, double &foundWeights, double hitThreshold, Size winStride = null, Size padding = null, double scale = 1.05, int groupThreshold = 2 ) : Rect[]
img OpenCvSharp.Mat Source image. CV_8UC1 and CV_8UC4 types are supported for now.
foundWeights double
hitThreshold double Threshold for the distance between features and SVM classifying plane.
winStride Size Window stride. It must be a multiple of block stride.
padding Size Mock parameter to keep the CPU interface compatibility. It must be (0,0).
scale double Coefficient of the detection window increase.
groupThreshold int Coefficient to regulate the similarity threshold. /// When detected, some objects can be covered by many rectangles. 0 means not to perform grouping.
리턴 Rect[]

DetectMultiScaleROI() 공개 메소드

evaluate specified ROI and return confidence value for each location in multiple scales
public DetectMultiScaleROI ( OpenCvSharp.Mat img, Rect &foundLocations, DetectionROI &locations, double hitThreshold, int groupThreshold ) : void
img OpenCvSharp.Mat
foundLocations Rect
locations DetectionROI
hitThreshold double
groupThreshold int
리턴 void

DetectROI() 공개 메소드

evaluate specified ROI and return confidence value for each location
public DetectROI ( OpenCvSharp.Mat img, System.Point locations, System.Point &foundLocations, double &confidences, double hitThreshold, Size winStride = null, Size padding = null ) : void
img OpenCvSharp.Mat
locations System.Point
foundLocations System.Point
confidences double
hitThreshold double
winStride Size
padding Size
리턴 void

Dispose() 보호된 메소드

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. ///
리턴 void

GetDaimlerPeopleDetector() 공개 정적인 메소드

This method returns 1981 SVM coeffs obtained from daimler's base. To use these coeffs the detection window size should be (48,96)
public static GetDaimlerPeopleDetector ( ) : float[]
리턴 float[]

GetDefaultPeopleDetector() 공개 정적인 메소드

Returns coefficients of the classifier trained for people detection (for default window size).
public static GetDefaultPeopleDetector ( ) : float[]
리턴 float[]

GetDescriptorSize() 공개 메소드

public GetDescriptorSize ( ) : int
리턴 int

GetWinSigma() 공개 메소드

public GetWinSigma ( ) : double
리턴 double

GroupRectangles() 공개 메소드

public GroupRectangles ( Rect &rectList, double &weights, int groupThreshold, double eps ) : void
rectList Rect
weights double
groupThreshold int
eps double
리턴 void

HOGDescriptor() 공개 메소드

Default constructor
public HOGDescriptor ( ) : System
리턴 System

HOGDescriptor() 공개 메소드

Initializes from pointer
public HOGDescriptor ( IntPtr ptr ) : System
ptr System.IntPtr class HOGDescriptor*
리턴 System

HOGDescriptor() 공개 메소드

Creates the HOG descriptor and detector.
public HOGDescriptor ( Size winSize = null, Size blockSize = null, Size blockStride = null, Size cellSize = null, int nbins = 9, int derivAperture = 1, double winSigma = -1, HistogramNormType histogramNormType = HistogramNormType.L2Hys, double l2HysThreshold = 0.2, bool gammaCorrection = true, int nlevels = DefaultNlevels ) : System
winSize Size Detection window size. Align to block size and block stride.
blockSize Size Block size in pixels. Align to cell size. Only (16,16) is supported for now.
blockStride Size Block stride. It must be a multiple of cell size.
cellSize Size Cell size. Only (8, 8) is supported for now.
nbins int Number of bins. Only 9 bins per cell are supported for now.
derivAperture int
winSigma double Gaussian smoothing window parameter.
histogramNormType HistogramNormType
l2HysThreshold double L2-Hys normalization method shrinkage.
gammaCorrection bool Flag to specify whether the gamma correction preprocessing is required or not.
nlevels int Maximum number of detection window increases.
리턴 System

HOGDescriptor() 공개 메소드

public HOGDescriptor ( string fileName ) : System
fileName string
리턴 System

Load() 공개 메소드

public Load ( string fileName, string objName = null ) : bool
fileName string
objName string
리턴 bool

ReadALTModel() 공개 메소드

read/parse Dalal's alt model file
public ReadALTModel ( string modelFile ) : void
modelFile string
리턴 void

Save() 공개 메소드

public Save ( string fileName, string objName = null ) : void
fileName string
objName string
리턴 void

SetSVMDetector() 공개 메소드

public SetSVMDetector ( float svmDetector ) : void
svmDetector float
리턴 void

프로퍼티 상세

DaimlerPeopleDetector 공개적으로 정적으로 프로퍼티

This field returns 1981 SVM coeffs obtained from daimler's base. To use these coeffs the detection window size should be (48,96)
public static float[] DaimlerPeopleDetector
리턴 float[]

DefaultPeopleDetector 공개적으로 정적으로 프로퍼티

Returns coefficients of the classifier trained for people detection (for default window size).
public static float[] DefaultPeopleDetector
리턴 float[]

SizeOf 공개적으로 정적으로 프로퍼티

sizeof(HOGDescriptor)
public static int SizeOf
리턴 int