Ask Your Question

Revision history [back]

For a starter the upcomming book we are writing on OpenCV Blueprints will be a great guideline for you, but basically all OpenCV books can give you a head start. For the time being I would suggest to make a single bottle object detection model, so mix up all types of bottles, then try to make a smart classifier based on features to destinguish between types, like for example Bag Of Words, SVM, ...

For a starter the upcomming book we are writing on OpenCV Blueprints will be a great guideline for you, but basically all OpenCV books can give you a head start. For the time being I would suggest to make a single bottle object detection model, so mix up all types of bottles, then try to make a smart classifier based on features to destinguish between types, like for example Bag Of Words, SVM, ...

EDIT: answer to your second question

OpenCV comes with several interfaces for training an object detector. However it might seem that some of them are very specific for a case, but almost always it will be able to train your own classifer with it for any possible object category.

  1. Start by making sure that you need an object detection framework. Is your first task explicitly detecting the bottles location or only varifying that it is on the expected location. In the first case you will need an object detector followed by a classifier. In the second case you actually need a recognition system instead of a detection system, maybe combined with a second classifier.
  2. If you need a detector, then there are several options. Take a look at cascade classifiers, which are used for faces, but could be applied to any possible objects, as illustrated here.
  3. Another idea could be to follow the approach of HOG+SVM, mainly used for pedestrian detection, but again applicable for each possible object category. Steps would be to first look for the HOG descriptor(do not worry on the GPU part, it exists also in CPU but the documentation is gone ..) of your object windows, then apply SVM training (or use the basic version) on the descriptors to learn a model.
  4. Finally if you have found your general object class, which will be bottles, then you will need to apply feature detection first. Several options could be SIFT, SURF, BRISK, ORB or even HOG features, color histograms, shape filters, ...
  5. Those will then again be added to a classifier learning process. For this you could use either the multiclass approach like multiclass SVM classifiers or you could apply a 1 versus 1 binary classification problem, where you make a classifier for each class with class, no class output and then try to look for that classifier that yields a hit. This can be done with linear SVM classifiers, naive bayes classifiers, random trees, ...

Enough info to start reading?