Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Need help understanding how the HOGDescriptor class works in Java 3.1.0

I am trying to extract HOG features from an image using OpenCV in Java. I have previously done this in MATLAB using its built in HOG functions, but I am having trouble doing it with OpenCV. In the constructor for HOGDescriptor, there are five parameters. My understanding is that only 16x16 is supported for blockSize, only 8x8 is supported for blockStride and cellSize, and only 9 is supported for nBins. There is no suggestion about what to set the window size to, although the program will throw an exception if both of the values for it are not divisible by 8. A lot of code I found online will set winSize to 64x128, but they don't provide any explanation as to why. What is this parameter for, and what does it do for extracting HOG features from an image? The test image I am using right now is a 196x240 grayscale image.

I am also unsure what the differences between the compute and computeGradient methods are. I honestly cannot find much information about it in the documentation, and I can't figure out what the difference between the two are. If you could help me understand these things, or point me to a good place to read about them, I would appreciate it a lot!

Thanks