I am trying to make an Object Recognition software for my final year project using OpenCV. After studying quite a lot about this field, I found out the plan of action should be this:
- Extract features from a lot of images.
- Create a training dataset from the extracted features.
- Label the dataset.
- Make the machine learn from the dataset.
- Test the model.
I started from a single image. I was able to extract features from the image using SurfFeatureDetector class of OpenCV (simple_matcher.cpp program given in the samples). I saved the detected KeyPoints in an XML File using the following code:
SurfFeatureDetector detector(400);
vector<KeyPoint> keypoints1, keypoints2;
detector.detect(img1, keypoints1);
detector.detect(img2, keypoints2);
FileStorage fs("test.xml", FileStorage::WRITE);
write(fs, "data", keypoints1);
Now I am stuck at this point. I am not able to understand how do I create the training dataset from these features? And what should be my next step? Or, is my plan of action correct?
Thanks in advance.