DaHoC / trainHOG

Example program showing how to train your custom HOG detector using openCV
220 stars 109 forks source link

Window Size Change #5

Open bkolarov opened 9 years ago

bkolarov commented 9 years ago

What should I do when my images are 64x64 instead of 64x128? Is changing this line hog.winSize = Size(64, 128); to hog.winSize = Size(64, 64); enough?

neumann89 commented 9 years ago

That's the same question I wanted to ask. On this page (last question at bottom) someone says that opencv implementation of hog only can detect 64x128 windows: http://answers.opencv.org/question/10374/how-to-training-hog-and-use-my-hogdescriptor/

I tried some different window sizes and came to the same results, that only with 64x128 one can get some real detections. Otherwise nothing or only the centre of an image is (wrongly) detected.

neumann89 commented 9 years ago

Ah and see here: https://github.com/DaHoC/trainHOG/wiki/Frequently-Asked-Good-Questions-FAQ Thanks for this library and FAQ by the way :+1:

So, cropping the images to 64x128 seems to be the only possibility ;(