OpenCV 4 with Python Blueprints - Second Edition
by Dr. Menua Gevorgyan, Michael Beyeler (USD), Arsen Mamikonyan, Michael Beyeler
Mapping HOG descriptor
The last feature descriptor to consider is the HOG. HOG features have previously been shown to work exceptionally well in combination with SVMs, especially when applied to tasks such as pedestrian recognition.
The essential idea behind HOG features is that the local shapes and appearance of objects within an image can be described by the distribution of edge directions. The image is divided into small connected regions, within which a histogram of gradient directions (or edge directions) is compiled.
The following screenshot shows such a histogram from a region in a picture. Angles are not directional; that's why the range is (-180, 180):
As you can see, it has a lot of edge directions in the horizontal direction (angles ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access