I am figuring out the structure of the HOGDescriptor.execute in Python using the following code:
import cv2
win_size = (64, 128)
img = cv2.imread("test.png")
img = cv2.resize(img, win_size)
img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
d = cv2.HOGDescriptor()
hog = d.compute(img)
print hog.shape
The output is (3780, 1), so it is a 3780-element list. Why? I thought it should be: the number of cells in the image (64*128)/(8*8) = 128 multiplied by the number of bins per cell, i.e. 128*9 = 1152.