Ask Your Question
2

HoG detectMultiScale

asked 2012-11-16 02:48:00 -0600

fish gravatar image

Hello, I was looking at the objectdetect sample and tried to understand how it works. How does it work when i input a image with a small image size, smaller than the detection window(64x128)? Dose it directly perform detection or re-size the image to the window size?
Also, how dose it work when input image size is bigger than the detection window?

The parameter "scale" is default set to 1.05 If detectMultiScale scales the input image to different size with scale rate 1.05, when dose it stop scalling?

also, how dose detectMultiScale pad the input image with parameter padding Size(32,32) dose it pad with zero? or just copy the margin pixel? or copy pixels with mirror approach?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2012-11-16 07:40:05 -0600

Siegfried gravatar image

Hi, you have a lot of questions. :-) I try to answer some of them.

If the input image is smaller than the detection window nothing will be done. See hog.cpp line 1033. If you want to process the small image, you have to resize it by yourself before calling detectMultiScale.

In case that the input image is larger than the detector window. The method detectMultiScale compute the number of scales to downscale the input image depending on the size of the image, the detector window and the scaling factor. See the loop in hog.cpp at line 1030.

The maximum scaling level is limited to 64 levels by default. See: objdetect.hpp Line 596 and 604. You can change the number by putting a value to the nlevels param of the HOGDescriptor constructor.

I hope this helps you a bit

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-11-16 02:48:00 -0600

Seen: 3,141 times

Last updated: Nov 16 '12