1
$\begingroup$

In Histogram of Oriented Gradients, the edge orientations within rectangular patches are binned into the bins of a histogram. Each pixel adds the strength of its orientation in the bin corresponding to that orientation. The image pixels are grouped in a regular grid of these patches, which are called 'cells'.

In the next layer, overlapping patches of cells are combined in order to create blocks. In these blocks the histograms are normalized.

1) How are the cells combined into a block? Are the cell histogram bin values added together, or are the bins of the cell histograms concatenated, forming one large histogram?

Suppose the cell histograms have $9$ bins and the blocks contain $2\times 2$ cells. Do the block histograms have $9$ bins, or $9\times2\times2 =36$ bins?

2) Why is adding or concatenating better than the other?

$\endgroup$
2
$\begingroup$

The histograms of the cells are concatenated. If you add them, then it would be like computing a single histogram of the whole block.

$\endgroup$
  • $\begingroup$ Indeed it would be like computing a single histogram for the whole block, but the difference would be that the block-histograms would be computed on overlapping image patches, while the cell-histograms are computed on non-overlapping patches. Why is concatenating a good idea? $\endgroup$ – Angelorf Jan 27 '15 at 9:27
  • $\begingroup$ Think of the concatenated histograms as one 3d histogram in x, y and orientation. $\endgroup$ – Dima Jan 27 '15 at 12:28
  • $\begingroup$ We can already view the cells as one 3d histogram. Why is concatenating (and thereby duplicating the cell info) preferable over adding the cells together? $\endgroup$ – Angelorf Jan 28 '15 at 12:42
1
$\begingroup$

As Dima answered, the histograms are concatenated. The reason it's better than adding is that, if you add them, you will lose local information.

As for the redundancy (if you have overlapping cells), that's why you should use a gaussian kernel (the same size of the cell) to prioritize the central pixels, which are far away from the overlapping area. Or you could just avoid overlap - I always do that.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.