scikit-image/scikit-image — pull request #715 by angelatlarge (2013-08-26 16:57:03+00:00)
Title: Added a parameter for signed orientations in HOGs

The original Dalal and Triggs paper discusses signed versus unsigned orientations. While for pedestrian detectors unsigned orientations seemed to be more robust, D&T discussed that for vehicle detection, signed orientations seemed to perform better. It seemed like it might be useful to offer this feature in scikit-image.

The change is implemented by pulling out the 180 angle maximum into a separate variable initialized based on the signed parameter to the _hog(...) function. The signed parameter defaults to false because a) it is more useful in most cases and b) to maintain compatibility with existing code. The one place where 180 immediate constant wasn't replace in _hog(...) code is the radian->degree conversion on line 104