I’m trying to implement SVM in opencv for features that I have extracted features by using SIFT. I have extracted features for 2 different objects (each object has features of 10 different images which in total I got more than 3000 features for one object) and I put those features in one file (yaml file)..
My problem is: I don’t know how to label them? so I need to label these two files (as I said each file is the type of yaml and it contains matrix 3260*128 and the second yaml file for the second object is 3349*128)…
So please help me to show me how to label these files in order to train them later on… I’m using openCV c++.. by the way, the openCV code for SVM is based on LIBSVM
Thank you in advanced
Assume you get your matrix correctly, and each row represents one sample, what you can do is similar to what lakesh suggested:
Hope this helps.