View Source Evision.HOGDescriptor (Evision v0.1.7)

Link to this section Summary

cv

Checks if detector size equal to descriptor size.

Computes HOG descriptors of given image.

Computes HOG descriptors of given image.

Computes gradients and quantized gradient orientations.

Computes gradients and quantized gradient orientations.

Performs object detection without a multi-scale window.

Performs object detection without a multi-scale window.

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

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

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

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

Returns the number of coefficients required for the classification.

Returns winSigma value

Creates the HOG descriptor and detector with default parameters.

Positional Arguments

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

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

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

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

Sets coefficients for the linear SVM classifier.

Functions

Raising version of compute/2.

Raising version of compute/3.

Raising version of detect/2.

Raising version of detect/3.

Raising version of get_cellSize/1.

Raising version of get_nbins/1.

Raising version of get_nlevels/1.

Raising version of get_winSigma/1.

Raising version of get_winSize/1.

Raising version of getWinSigma/1.

Raising version of hogDescriptor/0.

Raising version of load/2.

Raising version of load/3.

Raising version of save/2.

Raising version of save/3.

Link to this section cv

Checks if detector size equal to descriptor size.

Python prototype (for reference):

checkDetectorSize() -> retval

Computes HOG descriptors of given image.

Positional Arguments
  • img: Evision.Mat.

    Matrix of the type CV_8U containing an image where HOG features will be calculated.

Keyword Arguments
  • winStride: Size.

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

  • padding: Size.

    Padding

  • locations: [Point].

    Vector of Point

Return
  • descriptors: [float].

    Matrix of the type CV_32F

Python prototype (for reference):

compute(img[, winStride[, padding[, locations]]]) -> descriptors
Link to this function

compute(self, img, opts)

View Source

Computes HOG descriptors of given image.

Positional Arguments
  • img: Evision.Mat.

    Matrix of the type CV_8U containing an image where HOG features will be calculated.

Keyword Arguments
  • winStride: Size.

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

  • padding: Size.

    Padding

  • locations: [Point].

    Vector of Point

Return
  • descriptors: [float].

    Matrix of the type CV_32F

Python prototype (for reference):

compute(img[, winStride[, padding[, locations]]]) -> descriptors
Link to this function

computeGradient(self, img, grad, angleOfs)

View Source

Computes gradients and quantized gradient orientations.

Positional Arguments
  • img: Evision.Mat.

    Matrix contains the image to be computed

Keyword Arguments
  • paddingTL: Size.

    Padding from top-left

  • paddingBR: Size.

    Padding from bottom-right

Return
  • grad: Evision.Mat.

    Matrix of type CV_32FC2 contains computed gradients

  • angleOfs: Evision.Mat.

    Matrix of type CV_8UC2 contains quantized gradient orientations

Python prototype (for reference):

computeGradient(img, grad, angleOfs[, paddingTL[, paddingBR]]) -> grad, angleOfs
Link to this function

computeGradient(self, img, grad, angleOfs, opts)

View Source

Computes gradients and quantized gradient orientations.

Positional Arguments
  • img: Evision.Mat.

    Matrix contains the image to be computed

Keyword Arguments
  • paddingTL: Size.

    Padding from top-left

  • paddingBR: Size.

    Padding from bottom-right

Return
  • grad: Evision.Mat.

    Matrix of type CV_32FC2 contains computed gradients

  • angleOfs: Evision.Mat.

    Matrix of type CV_8UC2 contains quantized gradient orientations

Python prototype (for reference):

computeGradient(img, grad, angleOfs[, paddingTL[, paddingBR]]) -> grad, angleOfs

Performs object detection without a multi-scale window.

Positional Arguments
  • img: Evision.Mat.

    Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.

Keyword Arguments
  • hitThreshold: double.

    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: Size.

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

  • padding: Size.

    Padding

  • searchLocations: [Point].

    Vector of Point includes set of requested locations to be evaluated.

Return
  • foundLocations: [Point].

    Vector of point where each point contains left-top corner point of detected object boundaries.

  • weights: [double].

    Vector that will contain confidence values for each detected object.

Python prototype (for reference):

detect(img[, hitThreshold[, winStride[, padding[, searchLocations]]]]) -> foundLocations, weights

Performs object detection without a multi-scale window.

Positional Arguments
  • img: Evision.Mat.

    Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.

Keyword Arguments
  • hitThreshold: double.

    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: Size.

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

  • padding: Size.

    Padding

  • searchLocations: [Point].

    Vector of Point includes set of requested locations to be evaluated.

Return
  • foundLocations: [Point].

    Vector of point where each point contains left-top corner point of detected object boundaries.

  • weights: [double].

    Vector that will contain confidence values for each detected object.

Python prototype (for reference):

detect(img[, hitThreshold[, winStride[, padding[, searchLocations]]]]) -> foundLocations, weights
Link to this function

detectMultiScale(self, img)

View Source

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

Positional Arguments
  • img: Evision.Mat.

    Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.

Keyword Arguments
  • hitThreshold: double.

    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: Size.

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

  • padding: Size.

    Padding

  • scale: double.

    Coefficient of the detection window increase.

  • groupThreshold: double.

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

  • useMeanshiftGrouping: bool.

    indicates grouping algorithm

Return
  • foundLocations: [Rect].

    Vector of rectangles where each rectangle contains the detected object.

  • foundWeights: [double].

    Vector that will contain confidence values for each detected object.

Python prototype (for reference):

detectMultiScale(img[, hitThreshold[, winStride[, padding[, scale[, groupThreshold[, useMeanshiftGrouping]]]]]]) -> foundLocations, foundWeights
Link to this function

detectMultiScale(self, img, opts)

View Source

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

Positional Arguments
  • img: Evision.Mat.

    Matrix of the type CV_8U or CV_8UC3 containing an image where objects are detected.

Keyword Arguments
  • hitThreshold: double.

    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: Size.

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

  • padding: Size.

    Padding

  • scale: double.

    Coefficient of the detection window increase.

  • groupThreshold: double.

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

  • useMeanshiftGrouping: bool.

    indicates grouping algorithm

Return
  • foundLocations: [Rect].

    Vector of rectangles where each rectangle contains the detected object.

  • foundWeights: [double].

    Vector that will contain confidence values for each detected object.

Python prototype (for reference):

detectMultiScale(img[, hitThreshold[, winStride[, padding[, scale[, groupThreshold[, useMeanshiftGrouping]]]]]]) -> foundLocations, foundWeights
Link to this function

getDaimlerPeopleDetector()

View Source

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

Python prototype (for reference):

getDaimlerPeopleDetector() -> retval
Link to this function

getDefaultPeopleDetector()

View Source

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

Python prototype (for reference):

getDefaultPeopleDetector() -> retval

Returns the number of coefficients required for the classification.

Python prototype (for reference):

getDescriptorSize() -> retval

Returns winSigma value

Python prototype (for reference):

getWinSigma() -> retval

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 )

Python prototype (for reference):

HOGDescriptor() -> <HOGDescriptor object>
Positional Arguments
  • filename: String.

    The file name containing HOGDescriptor properties and coefficients for the linear SVM classifier.

Has overloading in C++

Creates the HOG descriptor and detector and loads HOGDescriptor parameters and coefficients for the linear SVM classifier from a file.

Python prototype (for reference):

HOGDescriptor(filename) -> <HOGDescriptor object>
Link to this function

hogDescriptor(winSize, blockSize, blockStride, cellSize, nbins)

View Source
Positional Arguments
  • winSize: Size.

    sets winSize with given value.

  • blockSize: Size.

    sets blockSize with given value.

  • blockStride: Size.

    sets blockStride with given value.

  • cellSize: Size.

    sets cellSize with given value.

  • nbins: int.

    sets nbins with given value.

Keyword Arguments
  • derivAperture: int.

    sets derivAperture with given value.

  • winSigma: double.

    sets winSigma with given value.

  • histogramNormType: HOGDescriptor_HistogramNormType.

    sets histogramNormType with given value.

  • l2HysThreshold: double.

    sets L2HysThreshold with given value.

  • gammaCorrection: bool.

    sets gammaCorrection with given value.

  • nlevels: int.

    sets nlevels with given value.

  • signedGradient: bool.

    sets signedGradient with given value.

Has overloading in C++

Python prototype (for reference):

HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins[, _derivAperture[, _winSigma[, _histogramNormType[, _L2HysThreshold[, _gammaCorrection[, _nlevels[, _signedGradient]]]]]]]) -> <HOGDescriptor object>
Link to this function

hogDescriptor(winSize, blockSize, blockStride, cellSize, nbins, opts)

View Source
Positional Arguments
  • winSize: Size.

    sets winSize with given value.

  • blockSize: Size.

    sets blockSize with given value.

  • blockStride: Size.

    sets blockStride with given value.

  • cellSize: Size.

    sets cellSize with given value.

  • nbins: int.

    sets nbins with given value.

Keyword Arguments
  • derivAperture: int.

    sets derivAperture with given value.

  • winSigma: double.

    sets winSigma with given value.

  • histogramNormType: HOGDescriptor_HistogramNormType.

    sets histogramNormType with given value.

  • l2HysThreshold: double.

    sets L2HysThreshold with given value.

  • gammaCorrection: bool.

    sets gammaCorrection with given value.

  • nlevels: int.

    sets nlevels with given value.

  • signedGradient: bool.

    sets signedGradient with given value.

Has overloading in C++

Python prototype (for reference):

HOGDescriptor(_winSize, _blockSize, _blockStride, _cellSize, _nbins[, _derivAperture[, _winSigma[, _histogramNormType[, _L2HysThreshold[, _gammaCorrection[, _nlevels[, _signedGradient]]]]]]]) -> <HOGDescriptor object>

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

Positional Arguments
  • filename: String.

    Name of the file to read.

Keyword Arguments
  • objname: String.

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

Python prototype (for reference):

load(filename[, objname]) -> retval
Link to this function

load(self, filename, opts)

View Source

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

Positional Arguments
  • filename: String.

    Name of the file to read.

Keyword Arguments
  • objname: String.

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

Python prototype (for reference):

load(filename[, objname]) -> retval

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

Positional Arguments
Keyword Arguments

Python prototype (for reference):

save(filename[, objname]) -> None
Link to this function

save(self, filename, opts)

View Source

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

Positional Arguments
Keyword Arguments

Python prototype (for reference):

save(filename[, objname]) -> None
Link to this function

setSVMDetector(self, svmdetector)

View Source

Sets coefficients for the linear SVM classifier.

Positional Arguments
  • svmdetector: Evision.Mat.

    coefficients for the linear SVM classifier.

Python prototype (for reference):

setSVMDetector(svmdetector) -> None

Link to this section Functions

Link to this function

checkDetectorSize!(self)

View Source

Raising version of checkDetectorSize/1.

Raising version of compute/2.

Link to this function

compute!(self, img, opts)

View Source

Raising version of compute/3.

Link to this function

computeGradient!(self, img, grad, angleOfs)

View Source

Raising version of computeGradient/4.

Link to this function

computeGradient!(self, img, grad, angleOfs, opts)

View Source

Raising version of computeGradient/5.

Raising version of detect/2.

Link to this function

detect!(self, img, opts)

View Source

Raising version of detect/3.

Link to this function

detectMultiScale!(self, img)

View Source

Raising version of detectMultiScale/2.

Link to this function

detectMultiScale!(self, img, opts)

View Source

Raising version of detectMultiScale/3.

Raising version of get_blockSize/1.

Raising version of get_blockStride/1.

Raising version of get_cellSize/1.

Link to this function

get_derivAperture!(self)

View Source

Raising version of get_derivAperture/1.

Link to this function

get_gammaCorrection!(self)

View Source

Raising version of get_gammaCorrection/1.

Link to this function

get_gammaCorrection(self)

View Source
Link to this function

get_histogramNormType!(self)

View Source

Raising version of get_histogramNormType/1.

Link to this function

get_histogramNormType(self)

View Source
Link to this function

get_L2HysThreshold!(self)

View Source

Raising version of get_L2HysThreshold/1.

Link to this function

get_L2HysThreshold(self)

View Source

Raising version of get_nbins/1.

Raising version of get_nlevels/1.

Link to this function

get_signedGradient!(self)

View Source

Raising version of get_signedGradient/1.

Link to this function

get_signedGradient(self)

View Source

Raising version of get_svmDetector/1.

Raising version of get_winSigma/1.

Raising version of get_winSize/1.

Link to this function

getDaimlerPeopleDetector!()

View Source

Raising version of getDaimlerPeopleDetector/0.

Link to this function

getDefaultPeopleDetector!()

View Source

Raising version of getDefaultPeopleDetector/0.

Link to this function

getDescriptorSize!(self)

View Source

Raising version of getDescriptorSize/1.

Raising version of getWinSigma/1.

Raising version of hogDescriptor/0.

Link to this function

hogDescriptor!(filename)

View Source

Raising version of hogDescriptor/1.

Link to this function

hogDescriptor!(winSize, blockSize, blockStride, cellSize, nbins)

View Source

Raising version of hogDescriptor/5.

Link to this function

hogDescriptor!(winSize, blockSize, blockStride, cellSize, nbins, opts)

View Source

Raising version of hogDescriptor/6.

Raising version of load/2.

Link to this function

load!(self, filename, opts)

View Source

Raising version of load/3.

Raising version of save/2.

Link to this function

save!(self, filename, opts)

View Source

Raising version of save/3.

Link to this function

setSVMDetector!(self, svmdetector)

View Source

Raising version of setSVMDetector/2.