Added a parameter for signed orientations in HOGs #715
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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