Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi,

its not only the number of cells in the descriptor window multiplied by the number of bins. You have also to consider the block stride. The following code is from the implementation of HOGDescriptor::getDescriptorSize() of OpenCV CPU HoG (see here).

(size_t)nbins*
(blockSize.width/cellSize.width)*
(blockSize.height/cellSize.height)*
((winSize.width - blockSize.width)/blockStride.width + 1)*
((winSize.height - blockSize.height)/blockStride.height + 1);

This image show the structure of the HoG Descriptor and how it is build (source: slide 18 from B. Triggs talk at icvss http://class.inrialpes.fr/tutorials/triggs-icvss1.pdf). The overlap of blocks is what is missing in your computation.

image description