Book Image

Mastering OpenCV Android Application Programming

Book Image

Mastering OpenCV Android Application Programming

Overview of this book

Table of Contents (16 chapters)
Mastering OpenCV Android Application Programming
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
6
Working with Image Alignment and Stitching
Index

HOG descriptors


Histogram of Oriented Gradients (HOG) descriptors are feature descriptors that use the direction of intensity of the gradients and edge directions. For HOG descriptors, we divide the image into small cells, compute a histogram for each cell, and further combine these histograms to compute one single descriptor. They are similar to SIFT descriptors in the sense that both use image gradients and both divide the image into spatial bins and form a histogram, but SIFT descriptors help you to match local regions (using keypoint locations), while HOG descriptors use sliding windows to detect objects. The HOG descriptor works well with geometric and illumination transformations, but does not work well with object orientations (unlike SIFT, which works well with change in orientations).

The HOG descriptor is divided into multiple steps:

  • Computing gradient: We first calculate the gradient values for all the pixels in the image using any derivative mask over the image in horizontal...