2

How can I determine/detect if I have a necessary object in the photo or not?

I don't need to recognize the class of the object, but I need to know if I have exactly the same object as in the template picture.

Thus far I have tried to use template matching, histogram matching and SIFT-like methods, but none of these methods have the level of accuracy I need.

Can anyone suggest a precise method?

UPD

DB size in release - 5.000-10.000 unique objects

Available training data set - 50 objects.

  • Could you post an example image? – Bull Nov 03 '13 at 12:17
  • Template [link](http://s9.postimg.org/w28mo6lmn/0198.jpg). Photo [link](http://s17.postimg.org/u94akizsv/image.jpg) – Sghwarzengold Nov 03 '13 at 13:07
  • Do you know the scale of the object, in other words, will it occupy the same space on test images? – ivan_a Nov 04 '13 at 08:38
  • How much effort are you willing to spend on it? a day, week, month, year? – ivan_a Nov 04 '13 at 20:30
  • Couple of month if necessary – Sghwarzengold Nov 04 '13 at 22:14
  • Machine learning is the only solution I could come up by now.You could use SVM or ANN to train your samples.After training, use findCountour to find the contours, approximate them to boundingRect or rotatedRect(if the angle may not 0).Then let the ml to determine it is a bag or not.You could extract different sift features from the samples and train them by SVM too. – StereoMatching Nov 05 '13 at 17:04

3 Answers3

2

If you're only interested in this object (or a small number of objects) you can train a classifier - for example V&J (cascade classifier) or try a Bag of words approach.

You can read about cascade classifier here: http://docs.opencv.org/modules/objdetect/doc/cascade_classification.html

Theoretical background on bag of words: http://gilscvblog.wordpress.com/2013/08/23/bag-of-words-models-for-visual-categorization/

And openCV's implementation of bag of words: http://docs.opencv.org/modules/features2d/doc/object_categorization.html

GilLevi
  • 2,117
  • 5
  • 22
  • 38
1

The difference in lighting, the strap that exists in one image, the deformation (non-linear), rotation, translation, scale etc... increase the difficulty of this problem.

For starters you could perhaps select 10-20 images of this purse. Compute features such as histogram, sift features, or some wavelet based features for each purse, and then see if an incoming image of the purse matches any subset of the points in any of the training images.

If you have some success here, then you could consider building an image classifier using machine learning techniques. You would need to collect training data, having each object you want to recognize from multiple views, orientations, deformations. Searching the net for "machine learning in image process" will get you in the right direction.

Paul
  • 7,155
  • 8
  • 41
  • 40
1
  1. I think if you need high accuracy just one method won't suffice. You will have to use a combination of methods. Like you have tried template matching, histogram matching and SIFT-like methods separately. But if you try an intelligent combination of these, it may help.

  2. Apart from this you can try machine learning approach. It is usually said to be more robust

  3. Classifiers may be one of the solutions also
Armin Mustafa
  • 652
  • 1
  • 7
  • 13