4
$\begingroup$

When training a classifier for object detection using features extracted from images (eg HoG features), how important is it that the images used for training fed into the classifier in their natural aspect ratio?

For example, regardless of their aspect ratio, would a classifier work if all images were edited re-sized into squares of equal dimensions? (I know that OpenCV does this in its cascaded classifiers).

And if this is possible, then in the end, when we want to test the classifier, do we provide test images in their natural aspect ratio, or would the test images, too, have to be resized into squares?

$\endgroup$
4
$\begingroup$

It's important that all of the training and test images have the same aspect ratio but it doesn't necessarily have to be the natural one. If you think about it for a while you can see why that is. For example, if you're making a face detector and you have altered the aspect ratio to make all the faces look abnormally tall and skinny then you have a tall and skinny face detector. It won't work unless you do the same transform on the input images.

I'm not sure if I believe you about opencv making all the inputs to the cascade classifiers square. There is no reason it has to be square as long as all of the training images are the same size.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.