HOGpp
This repository contains an implementation of the rectangular histogram of
oriented gradients feature descriptor (R-HOG) using integral histograms. The
integral histogram representation allows to quickly compute HOG features in
subregions of an image in constant time. This is particularly useful if the
features in an image must be computed repeatedly, e.g., in a sliding window
manner.
Features
- C++ templated implementation
- Python support for 32, 64, and 80 bit floating point precision
- Unrestricted input size (e.g., OpenCV as of version 4.5.5 requires the input
to be a multiple of the block
size)
- Support for arbitrary integer (8 bit to 64 bit, both signed and unsigned) and
floating point input (e.g., OpenCV requires 8-bit unsigned integer input)
- Masking support (i.e., spatial exclusion of gradient magnitudes from
contributing to features)
For a complete summary of differences between HOGpp and existing
implementations, refer to the feature
matrix.
Getting Started
In Python:
from hogpp import IntegralHOGDescriptor
desc = IntegralHOGDescriptor()
image =
desc.compute(image)
roi = (0, 0, 128, 64)
X = desc(roi)
License
HOGpp is provided under the Apache License 2.0.