To help in my understanding of the HOG descriptor, as well as to allow me to easily test out modifications to the descriptor, I wrote functions in Octave for computing the HOG descriptor for a detection window.
For a tutorial on the HOG descriptor, check out my HOG tutorial post.
Update: Revision 1.2
- Thanks to Carlos Sampedro Pérez for identifying the bellow issues.
- Fixed a bug in getHOGDescriptor–it was referencing ‘getUnsHistogram’ instead of ‘getHistogram’
- The ‘rows’ and ‘columns’ calls were causing problems for Matlab users, so I replaced these with ‘size’ calls. Also expanded ‘+=’ operators for Matlab users.
getHOGDescriptor.m – Computes the HOG descriptor for a 66×130 pixel image / detection window. The detection window is actually 64×128 pixels, but an extra pixel is required on all sides for computing the gradients.
getHistogram.m – Computes a single 9-bin histogram for a cell. Used by ‘getHOGDescriptor’.
View original post 407 more words