OpenCV Python and Histogram of Oriented Gradient
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 (ie 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.
如何用一点Matlab作为灵感,属于这篇文章
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.
take a look at http://sourceforge.net/projects/hogtrainingtuto/?_test=beta for some HOG python code and a bunch of C, cpp, java implementations. As for real documentations of python and opencv, I too am at a loss. But this should help you a bit
链接地址: http://www.djcxy.com/p/64028.html上一篇: “边缘检测”和“图像轮廓”之间的区别