Is there any useful documentation for using the HOGDescriptor functionality in Python OpenCV? I have read the C++ documentation, but the Python version functions differently and I cannot figure it out just by tinkering.
Most specifically, I am seeking an OpenCV command in Python that takes an image and a pixel location as input (and possibly also some parameters about the size of a detection window) and then just returns a Python array that contains the HOG feature vector (i.e. a list or NumPy array, etc., where the jth element of the list is the jth histogram component from a histogram of oriented gradients).
My goal is to feed these histograms into the scikits.learn SVM pipelines (so I can avoid the OpenCV SVM training), but to do this I need the actual feature vectors themselves and not the sort of HOG processing chain pipelines stuff that OpenCV appears to use.
Any other Python implementations of HOG code would work too. I need something reasonably efficient though to compare with another code base that I am writing myself.
The histogram of oriented gradients (HOG) is a feature descriptor used in computer vision and image processing for the purpose of object detection. The technique counts occurrences of gradient orientation in localized portions of an image.
HOG decomposes an image into small squared cells, computes an histogram of oriented gradients in each cell, normalizes the result using a block-wise pattern, and return a descriptor for each cell.
This is a little late, but, for future reference, scikit-image has an implementation of HOG. This is a single function that could extract the Histogram of Oriented Gradients for a given image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With