HoG Descriptor: signed 0-360 orientation bins?
I am trying to use HOG descriptors together with SVM classifiers to build a car detection algorithm. Of course inspiration for this approach is the original paper by Dalal & Triggs in which they build such detector for pedestrian detection. However for pedestrian detection it is best to use 9 orientation bins 0-180 degrees, so the orientation is UNSIGNED. Unfortunately for building a good descriptor for cars I probably need SIGNED orientation bins, for example in total 18 bins in the range 0-360 degrees.
In my application I am using the standard OpenCV implementation for extracting HOG descriptors. Currently only 9 histogram orientation bins are supported (see: http://docs.opencv.org/modules/gpu/do...). Is there any way to work around this limitation and easily compute SIGNED HOG descriptors?
Quote from Dalal & Triggs paper:
For humans, the wide range of clothing and background colours presum- ably makes the signs of contrasts uninformative. However note that including sign information does help substantially in some other object recognition tasks, e.g. cars, motorbikes
after a quick scan of the code, there indeed seems to be a hardcoded limit to 9 bins for the ocl/cuda versions of this (unrolling loops and such)
I would say, are you up to the task of changing the sourcecode? If so, please do submit a PR, this would be useful for everyone. On the other hand, I did a car detector on the 9 bin 0-180 degree approach for aerial imagery and it seemed to work pretty well.