Ask Your Question

karl71's profile - activity

2017-03-06 09:38:45 -0600 received badge  Supporter (source)
2017-02-16 05:05:41 -0600 received badge  Enthusiast
2017-02-09 05:55:25 -0600 commented question HOG pedestrian Detection

What do you mean by "It doesn't work"? it breaks or you don't detect people?

2017-02-09 05:43:23 -0600 received badge  Student (source)
2017-02-09 04:49:31 -0600 asked a question structure of opencv's hog output

I'm extracting the HOG features of a grayscale image using OpenCV's HOG implementation. Assuming that my image matches the default window size, i.e. 128x64, I'm struggling to understand correctly how that feature vector is organised. This is what I know:

  • Every cell outputs a 9 elements histogram quantifying the orientations of the edges lying within that cell (8x8 pixels by default).
  • Each block contains 2x2 cells.
  • By default, an 8x8 block stride is used.

This results in a 7 * 15 * 9 * 4 = 3780 elements feature vector. 7 and 15 are the number of blocks that fit horizontally and vertically when a 50% block overlap is used. All great until here.

If we examine the features of the first block, i.e. the first 9*4 elements, how are they arranged? Do the first 9 bins correspond to the top left cell in the block? what about the next 9? and the next? And which orientation angle does each of the 9 bins represent? Does bins[0] = 0 degrees, bins[1] = 20 degrees, bins[2] = 40 degrees, ... bins[8] = 160 degrees. Or is the order different, for instance going from -pi/2 to +pi/2?