The following steps describe the algorithm:
- If you wish to, you can globally normalize the image
- Compute the horizontal and vertical gradient images
- Compute the gradient histograms
- Normalize across blocks
- Flatten into a feature descriptor vector
HOG descriptors are the normalized block descriptors finally obtained by using the algorithm.