Package org.opencv.objdetect
Class HOGDescriptor
- java.lang.Object
- 
- org.opencv.objdetect.HOGDescriptor
 
- 
 public class HOGDescriptor extends java.lang.ObjectImplementation of HOG (Histogram of Oriented Gradients) descriptor and object detector. the HOG descriptor algorithm introduced by Navneet Dalal and Bill Triggs CITE: 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
- 
- 
Field SummaryFields Modifier and Type Field Description static intDEFAULT_NLEVELSstatic intDESCR_FORMAT_COL_BY_COLstatic intDESCR_FORMAT_ROW_BY_ROWstatic intL2Hysprotected longnativeObj
 - 
Constructor SummaryConstructors Modifier Constructor Description HOGDescriptor()Creates the HOG descriptor and detector with default params.protectedHOGDescriptor(long addr)HOGDescriptor(java.lang.String filename)HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins)HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture)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, double _winSigma, int _histogramNormType)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, double _L2HysThreshold, boolean _gammaCorrection)HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection, int _nlevels)HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection, int _nlevels, boolean _signedGradient)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HOGDescriptor__fromPtr__(long addr)booleancheckDetectorSize()Checks if detector size equal to descriptor size.voidcompute(Mat img, MatOfFloat descriptors)Computes HOG descriptors of given image.voidcompute(Mat img, MatOfFloat descriptors, Size winStride)Computes HOG descriptors of given image.voidcompute(Mat img, MatOfFloat descriptors, Size winStride, Size padding)Computes HOG descriptors of given image.voidcompute(Mat img, MatOfFloat descriptors, Size winStride, Size padding, MatOfPoint locations)Computes HOG descriptors of given image.voidcomputeGradient(Mat img, Mat grad, Mat angleOfs)Computes gradients and quantized gradient orientations.voidcomputeGradient(Mat img, Mat grad, Mat angleOfs, Size paddingTL)Computes gradients and quantized gradient orientations.voidcomputeGradient(Mat img, Mat grad, Mat angleOfs, Size paddingTL, Size paddingBR)Computes gradients and quantized gradient orientations.voiddetect(Mat img, MatOfPoint foundLocations, MatOfDouble weights)Performs object detection without a multi-scale window.voiddetect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold)Performs object detection without a multi-scale window.voiddetect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride)Performs object detection without a multi-scale window.voiddetect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding)Performs object detection without a multi-scale window.voiddetect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding, MatOfPoint searchLocations)Performs object detection without a multi-scale window.voiddetectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights)Detects objects of different sizes in the input image.voiddetectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold)Detects objects of different sizes in the input image.voiddetectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride)Detects objects of different sizes in the input image.voiddetectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding)Detects objects of different sizes in the input image.voiddetectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale)Detects objects of different sizes in the input image.voiddetectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold)Detects objects of different sizes in the input image.voiddetectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping)Detects objects of different sizes in the input image.protected voidfinalize()Sizeget_blockSize()Sizeget_blockStride()Sizeget_cellSize()intget_derivAperture()booleanget_gammaCorrection()intget_histogramNormType()doubleget_L2HysThreshold()intget_nbins()intget_nlevels()booleanget_signedGradient()MatOfFloatget_svmDetector()doubleget_winSigma()Sizeget_winSize()static MatOfFloatgetDaimlerPeopleDetector()Returns coefficients of the classifier trained for people detection (for 48x96 windows).static MatOfFloatgetDefaultPeopleDetector()Returns coefficients of the classifier trained for people detection (for 64x128 windows).longgetDescriptorSize()Returns the number of coefficients required for the classification.longgetNativeObjAddr()doublegetWinSigma()Returns winSigma valuebooleanload(java.lang.String filename)loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file.booleanload(java.lang.String filename, java.lang.String objname)loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file.voidsave(java.lang.String filename)saves HOGDescriptor parameters and coefficients for the linear SVM classifier to a filevoidsave(java.lang.String filename, java.lang.String objname)saves HOGDescriptor parameters and coefficients for the linear SVM classifier to a filevoidsetSVMDetector(Mat svmdetector)Sets coefficients for the linear SVM classifier.
 
- 
- 
- 
Field Detail- 
nativeObjprotected final long nativeObj 
 - 
DEFAULT_NLEVELSpublic static final int DEFAULT_NLEVELS - See Also:
- Constant Field Values
 
 - 
DESCR_FORMAT_COL_BY_COLpublic static final int DESCR_FORMAT_COL_BY_COL - See Also:
- Constant Field Values
 
 - 
DESCR_FORMAT_ROW_BY_ROWpublic static final int DESCR_FORMAT_ROW_BY_ROW - See Also:
- Constant Field Values
 
 - 
L2Hyspublic static final int L2Hys - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
HOGDescriptorprotected HOGDescriptor(long addr) 
 - 
HOGDescriptorpublic HOGDescriptor() Creates the HOG descriptor and detector with default params. aqual to HOGDescriptor(Size(64,128), Size(16,16), Size(8,8), Size(8,8), 9 )
 - 
HOGDescriptorpublic HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection, int _nlevels, boolean _signedGradient) - Parameters:
- _winSize- sets winSize with given value.
- _blockSize- sets blockSize with given value.
- _blockStride- sets blockStride with given value.
- _cellSize- sets cellSize with given value.
- _nbins- sets nbins with given value.
- _derivAperture- sets derivAperture with given value.
- _winSigma- sets winSigma with given value.
- _histogramNormType- sets histogramNormType with given value.
- _L2HysThreshold- sets L2HysThreshold with given value.
- _gammaCorrection- sets gammaCorrection with given value.
- _nlevels- sets nlevels with given value.
- _signedGradient- sets signedGradient with given value.
 
 - 
HOGDescriptorpublic HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection, int _nlevels) - Parameters:
- _winSize- sets winSize with given value.
- _blockSize- sets blockSize with given value.
- _blockStride- sets blockStride with given value.
- _cellSize- sets cellSize with given value.
- _nbins- sets nbins with given value.
- _derivAperture- sets derivAperture with given value.
- _winSigma- sets winSigma with given value.
- _histogramNormType- sets histogramNormType with given value.
- _L2HysThreshold- sets L2HysThreshold with given value.
- _gammaCorrection- sets gammaCorrection with given value.
- _nlevels- sets nlevels with given value.
 
 - 
HOGDescriptorpublic HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold, boolean _gammaCorrection) - Parameters:
- _winSize- sets winSize with given value.
- _blockSize- sets blockSize with given value.
- _blockStride- sets blockStride with given value.
- _cellSize- sets cellSize with given value.
- _nbins- sets nbins with given value.
- _derivAperture- sets derivAperture with given value.
- _winSigma- sets winSigma with given value.
- _histogramNormType- sets histogramNormType with given value.
- _L2HysThreshold- sets L2HysThreshold with given value.
- _gammaCorrection- sets gammaCorrection with given value.
 
 - 
HOGDescriptorpublic HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType, double _L2HysThreshold) - Parameters:
- _winSize- sets winSize with given value.
- _blockSize- sets blockSize with given value.
- _blockStride- sets blockStride with given value.
- _cellSize- sets cellSize with given value.
- _nbins- sets nbins with given value.
- _derivAperture- sets derivAperture with given value.
- _winSigma- sets winSigma with given value.
- _histogramNormType- sets histogramNormType with given value.
- _L2HysThreshold- sets L2HysThreshold with given value.
 
 - 
HOGDescriptorpublic HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma, int _histogramNormType) - Parameters:
- _winSize- sets winSize with given value.
- _blockSize- sets blockSize with given value.
- _blockStride- sets blockStride with given value.
- _cellSize- sets cellSize with given value.
- _nbins- sets nbins with given value.
- _derivAperture- sets derivAperture with given value.
- _winSigma- sets winSigma with given value.
- _histogramNormType- sets histogramNormType with given value.
 
 - 
HOGDescriptorpublic HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture, double _winSigma) - Parameters:
- _winSize- sets winSize with given value.
- _blockSize- sets blockSize with given value.
- _blockStride- sets blockStride with given value.
- _cellSize- sets cellSize with given value.
- _nbins- sets nbins with given value.
- _derivAperture- sets derivAperture with given value.
- _winSigma- sets winSigma with given value.
 
 - 
HOGDescriptorpublic HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins, int _derivAperture) - Parameters:
- _winSize- sets winSize with given value.
- _blockSize- sets blockSize with given value.
- _blockStride- sets blockStride with given value.
- _cellSize- sets cellSize with given value.
- _nbins- sets nbins with given value.
- _derivAperture- sets derivAperture with given value.
 
 - 
HOGDescriptorpublic HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride, Size _cellSize, int _nbins) - Parameters:
- _winSize- sets winSize with given value.
- _blockSize- sets blockSize with given value.
- _blockStride- sets blockStride with given value.
- _cellSize- sets cellSize with given value.
- _nbins- sets nbins with given value.
 
 - 
HOGDescriptorpublic HOGDescriptor(java.lang.String filename) - Parameters:
- filename- The file name containing HOGDescriptor properties and coefficients for the linear SVM classifier.
 
 
- 
 - 
Method Detail- 
getNativeObjAddrpublic long getNativeObjAddr() 
 - 
__fromPtr__public static HOGDescriptor __fromPtr__(long addr) 
 - 
getDescriptorSizepublic long getDescriptorSize() Returns the number of coefficients required for the classification.- Returns:
- automatically generated
 
 - 
checkDetectorSizepublic boolean checkDetectorSize() Checks if detector size equal to descriptor size.- Returns:
- automatically generated
 
 - 
getWinSigmapublic double getWinSigma() Returns winSigma value- Returns:
- automatically generated
 
 - 
setSVMDetectorpublic void setSVMDetector(Mat svmdetector) Sets coefficients for the linear SVM classifier.- Parameters:
- svmdetector- coefficients for the linear SVM classifier.
 
 - 
loadpublic boolean load(java.lang.String filename, java.lang.String objname)loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file.- Parameters:
- filename- Path of the file to read.
- objname- The optional name of the node to read (if empty, the first top-level node will be used).
- Returns:
- automatically generated
 
 - 
loadpublic boolean load(java.lang.String filename) loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file.- Parameters:
- filename- Path of the file to read.
- Returns:
- automatically generated
 
 - 
savepublic void save(java.lang.String filename, java.lang.String objname)saves HOGDescriptor parameters and coefficients for the linear SVM classifier to a file- Parameters:
- filename- File name
- objname- Object name
 
 - 
savepublic void save(java.lang.String filename) saves HOGDescriptor parameters and coefficients for the linear SVM classifier to a file- Parameters:
- filename- File name
 
 - 
computepublic void compute(Mat img, MatOfFloat descriptors, Size winStride, Size padding, MatOfPoint locations) Computes HOG descriptors of given image.- Parameters:
- img- Matrix of the type CV_8U containing an image where HOG features will be calculated.
- descriptors- Matrix of the type CV_32F
- winStride- Window stride. It must be a multiple of block stride.
- padding- Padding
- locations- Vector of Point
 
 - 
computepublic void compute(Mat img, MatOfFloat descriptors, Size winStride, Size padding) Computes HOG descriptors of given image.- Parameters:
- img- Matrix of the type CV_8U containing an image where HOG features will be calculated.
- descriptors- Matrix of the type CV_32F
- winStride- Window stride. It must be a multiple of block stride.
- padding- Padding
 
 - 
computepublic void compute(Mat img, MatOfFloat descriptors, Size winStride) Computes HOG descriptors of given image.- Parameters:
- img- Matrix of the type CV_8U containing an image where HOG features will be calculated.
- descriptors- Matrix of the type CV_32F
- winStride- Window stride. It must be a multiple of block stride.
 
 - 
computepublic void compute(Mat img, MatOfFloat descriptors) Computes HOG descriptors of given image.- Parameters:
- img- Matrix of the type CV_8U containing an image where HOG features will be calculated.
- descriptors- Matrix of the type CV_32F
 
 - 
detectpublic void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding, MatOfPoint searchLocations) Performs object detection without a multi-scale window.- Parameters:
- img- Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations- Vector of point where each point contains left-top corner point of detected object boundaries.
- weights- Vector that will contain confidence values for each detected object.
- hitThreshold- Threshold 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.
- winStride- Window stride. It must be a multiple of block stride.
- padding- Padding
- searchLocations- Vector of Point includes set of requested locations to be evaluated.
 
 - 
detectpublic void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding) Performs object detection without a multi-scale window.- Parameters:
- img- Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations- Vector of point where each point contains left-top corner point of detected object boundaries.
- weights- Vector that will contain confidence values for each detected object.
- hitThreshold- Threshold 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.
- winStride- Window stride. It must be a multiple of block stride.
- padding- Padding
 
 - 
detectpublic void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride) Performs object detection without a multi-scale window.- Parameters:
- img- Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations- Vector of point where each point contains left-top corner point of detected object boundaries.
- weights- Vector that will contain confidence values for each detected object.
- hitThreshold- Threshold 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.
- winStride- Window stride. It must be a multiple of block stride.
 
 - 
detectpublic void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold) Performs object detection without a multi-scale window.- Parameters:
- img- Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations- Vector of point where each point contains left-top corner point of detected object boundaries.
- weights- Vector that will contain confidence values for each detected object.
- hitThreshold- Threshold 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.
 
 - 
detectpublic void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights) Performs object detection without a multi-scale window.- Parameters:
- img- Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations- Vector of point where each point contains left-top corner point of detected object boundaries.
- weights- Vector that will contain confidence values for each detected object. 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.
 
 - 
detectMultiScalepublic void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping) Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.- Parameters:
- img- Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations- Vector of rectangles where each rectangle contains the detected object.
- foundWeights- Vector that will contain confidence values for each detected object.
- hitThreshold- Threshold 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.
- winStride- Window stride. It must be a multiple of block stride.
- padding- Padding
- scale- Coefficient of the detection window increase.
- finalThreshold- Final threshold
- useMeanshiftGrouping- indicates grouping algorithm
 
 - 
detectMultiScalepublic void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold) Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.- Parameters:
- img- Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations- Vector of rectangles where each rectangle contains the detected object.
- foundWeights- Vector that will contain confidence values for each detected object.
- hitThreshold- Threshold 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.
- winStride- Window stride. It must be a multiple of block stride.
- padding- Padding
- scale- Coefficient of the detection window increase.
- finalThreshold- Final threshold
 
 - 
detectMultiScalepublic 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.- Parameters:
- img- Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations- Vector of rectangles where each rectangle contains the detected object.
- foundWeights- Vector that will contain confidence values for each detected object.
- hitThreshold- Threshold 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.
- winStride- Window stride. It must be a multiple of block stride.
- padding- Padding
- scale- Coefficient of the detection window increase.
 
 - 
detectMultiScalepublic 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.- Parameters:
- img- Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations- Vector of rectangles where each rectangle contains the detected object.
- foundWeights- Vector that will contain confidence values for each detected object.
- hitThreshold- Threshold 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.
- winStride- Window stride. It must be a multiple of block stride.
- padding- Padding
 
 - 
detectMultiScalepublic 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.- Parameters:
- img- Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations- Vector of rectangles where each rectangle contains the detected object.
- foundWeights- Vector that will contain confidence values for each detected object.
- hitThreshold- Threshold 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.
- winStride- Window stride. It must be a multiple of block stride.
 
 - 
detectMultiScalepublic 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.- Parameters:
- img- Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations- Vector of rectangles where each rectangle contains the detected object.
- foundWeights- Vector that will contain confidence values for each detected object.
- hitThreshold- Threshold 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.
 
 - 
detectMultiScalepublic 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.- Parameters:
- img- Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.
- foundLocations- Vector of rectangles where each rectangle contains the detected object.
- foundWeights- Vector that will contain confidence values for each detected object. 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.
 
 - 
computeGradientpublic void computeGradient(Mat img, Mat grad, Mat angleOfs, Size paddingTL, Size paddingBR) Computes gradients and quantized gradient orientations.- Parameters:
- img- Matrix contains the image to be computed
- grad- Matrix of type CV_32FC2 contains computed gradients
- angleOfs- Matrix of type CV_8UC2 contains quantized gradient orientations
- paddingTL- Padding from top-left
- paddingBR- Padding from bottom-right
 
 - 
computeGradientpublic void computeGradient(Mat img, Mat grad, Mat angleOfs, Size paddingTL) Computes gradients and quantized gradient orientations.- Parameters:
- img- Matrix contains the image to be computed
- grad- Matrix of type CV_32FC2 contains computed gradients
- angleOfs- Matrix of type CV_8UC2 contains quantized gradient orientations
- paddingTL- Padding from top-left
 
 - 
computeGradientpublic void computeGradient(Mat img, Mat grad, Mat angleOfs) Computes gradients and quantized gradient orientations.- Parameters:
- img- Matrix contains the image to be computed
- grad- Matrix of type CV_32FC2 contains computed gradients
- angleOfs- Matrix of type CV_8UC2 contains quantized gradient orientations
 
 - 
getDefaultPeopleDetectorpublic static MatOfFloat getDefaultPeopleDetector() Returns coefficients of the classifier trained for people detection (for 64x128 windows).- Returns:
- automatically generated
 
 - 
getDaimlerPeopleDetectorpublic static MatOfFloat getDaimlerPeopleDetector() Returns coefficients of the classifier trained for people detection (for 48x96 windows).- Returns:
- automatically generated
 
 - 
get_winSizepublic Size get_winSize() 
 - 
get_blockSizepublic Size get_blockSize() 
 - 
get_blockStridepublic Size get_blockStride() 
 - 
get_cellSizepublic Size get_cellSize() 
 - 
get_nbinspublic int get_nbins() 
 - 
get_derivAperturepublic int get_derivAperture() 
 - 
get_winSigmapublic double get_winSigma() 
 - 
get_histogramNormTypepublic int get_histogramNormType() 
 - 
get_L2HysThresholdpublic double get_L2HysThreshold() 
 - 
get_gammaCorrectionpublic boolean get_gammaCorrection() 
 - 
get_svmDetectorpublic MatOfFloat get_svmDetector() 
 - 
get_nlevelspublic int get_nlevels() 
 - 
get_signedGradientpublic boolean get_signedGradient() 
 - 
finalizeprotected void finalize() throws java.lang.Throwable- Overrides:
- finalizein class- java.lang.Object
- Throws:
- java.lang.Throwable
 
 
- 
 
-