Search code examples
opencvcomputer-visionobject-detectiontraining-datamatlab-cvst

Reasonable training image size for detection window of 60x60?


I'm going to train cascading boosted classifiers (using either OpenCV or Matlab) for detection of certain objects.

My question is that for a window detection size of 60x60, what's a reasonable resolution for training image samples, given that I don't have an unlimited time within which to train classifiers? Some of the images I've been given are 1200x600 and I'm quite certain this is unnecessarily large and that I must certain scale them down. I know that the testing datasets may have images or videos that big but the objects to detect within them are certainly not likely to be that big.


Solution

  • The answer is "It depends". If your window size is 60x60, then that is the minimum size that you will be able to detect. So the resolution of your images should be high enough so that all your object of interest have the size of at least 60x60.

    Also, if training time is a concern, then you should think about what features you are going to use. For example, training with Haar-like features takes much longer than with HoG or LBP.

    Both the OpenCV program opencv_traincascade and the MATLAB function trainCascadeObjectDetector (in the Computer Vision System Toolbox) give you a choice of Haar, HoG, and LBP features.