I was unable to find good explanations at one place on the internet. There are too much stuff and instead of finding out what to do, I get more confused.
My goal: Create an Android application that detects objects in real time using the camera (my objects are steering wheel and a car tire.)
Until now I tried the haar classifier but it was difficult to train, took a lot of time and couldn't train it correctly so I decided to look for another way to achieve my goal.
Now I found out about the Feature Detectors and the SVM training. My questions are:
1: Which algorithm should I use (SURF, ORB, FREAK etc.)?
2: What do you think about HOG + Bag-Of-Words?
3: Would you tell how to train the SVM or give a link if you have? - I didn't find any tutorial about this. I keep searching but my time is limited and I decided to ask.
4: Which algorithm will give the best results?
5: Should I implement it in native with the Android NDK or there wont be such a big difference with the Java implementation?
If you have any tutorials or references, please add them to your answer or in the comments. Sorry for the long question, as I said my time is limited (It's a school project.) and also I think it will be good if people can find those answers at one place. I will appreciate every answer, even if it is not a full answer. Thank you in advance!
1: There is no optimal algorithm for all cases but algorithms that suit certain very specific cases depending on the requirements of the application.
You can try SIFT and SURF which are the most popular descriptors but are not very efficient (slow) and require a lot of memory. If efficiency is your objective you can try binary descriptors (eg. BRIEF, ORB, BRISK, FREAK) which are much more efficient and require less storage. Take a look at FAST detector also.
2: Bag-of-Words for image classification problem is a method of recognizing object categories given a set of positive training images containing an object class, and a set of negative training images that don’t.
Bag-Of-Words will get you a vector representation of each training image.
After getting this you will have to train a classifier to discriminate vectors corresponding to positive (steering wheel and a car tire) and negative training images. You can use a SVM classifier for this.
3: You have here a tutorial of the complete approach (BOW + SVM) in OpenCV 2.3. You'll need to make some changes in the code but the general idea is there: http://www.morethantechnical.com/2011/08/25/a-simple-object-classifier-with-bag-of-words-using-opencv-2-3-w-code/
Also, the OpenCV tutorial for SVM: http://docs.opencv.org/doc/tutorials/ml/introduction_to_svm/introduction_to_svm.html
4: As I said before, there is no perfect algorithm so I can not answer you. I think after taking some tests with the alternatives you have in (1.) you're going to be able to answer it to us. :)
5. I think you should use the Android NDK but I don't know much about Android development.
http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/android_dev_intro.html http://opencv.org/platforms/android.html