I've read this post about how to use OpenCV's HOG-based pedestrian detector: How can I detect and track people using OpenCV?
I want to use HOG for detecting other types of objects in images (not just pedestrians). However, the Python binding of HOGDetectMultiScale doesn't seem to give access to the actual HOG features.
Is there any way to use Python + OpenCV to extract the HOG features directly from any image?
If you want fast Python code for HOG features, I've ported the code to Cython: https://github.com/cvondrick/pyvision/blob/master/vision/features.pyx
In python opencv you can compute hog like this:
import cv2 hog = cv2.HOGDescriptor() im = cv2.imread(sample) h = hog.compute(im)