2

I'm trying to implement automatic number plate detection (ANPR). I'm using following tools.
- Ubuntu 12.04 OS
- OpenCV 2.4.13 with C++

I'm using some sample images, each having different dimensions to prepare the training dataset. Some image dimensions I'm using are as follows:
- 468 * 294
- 600 * 375
- 1024 * 776
etc.

I've gone through using OpenCV and SVM with images , and got the impression that this method would work if all the images are of same dimension. Also Training a classifier using images of different dimensions but same number of HoG features, I think this might also not be an accurate solution.

Is there some other way to train SVM with different image dimensions?

Community
  • 1
  • 1
AkJ
  • 73
  • 2
  • 10
  • be aware that it is not enough to have the target object "somewhere" within the images, the image should contain just the target object and some minor background. In addition, the object should be centered and the orientaton of the objects should be the same in each of the images. I guess your images are ok, because they have similar ratio, but this is a common mistake, so I wanted to mention. In addition to Andrey's answer (resizing) you should be aware that the resized size is typically the MINIMUM size to recognize the object! – Micka Jul 04 '16 at 14:50
  • Remark: Resizing isn't always optimal if aspect ratios don't fit exactly. Maybe you'll have to crop (or add some additional background) before resizing to get the right aspect ratio! – Micka Jul 04 '16 at 14:52

1 Answers1

2

Usual practice is to resize input images before feeding them to classifier, because you have fixed number of inputs, you need fixed dimentionality of features, in your case features are pixel intensities, so, number of pixels in your input image must be fixed.

Andrey Smorodov
  • 10,649
  • 2
  • 35
  • 42