Ask Your Question

mike's profile - activity

2013-10-02 10:03:31 -0500 asked a question Evaluate Quality of Matching with SVM


I am implementing a BoF object detection and after training the SVM classifier I test it with the code below. My Problem is now that the classifier is not always right and I want to evaluate the quality of the matching. For example the tutorial about the extraction of SIFT/SURF Feature Points on, a distance measure between the feature vectors allows to judge if a matching is good or not. With the BoF I have a Support Vector Machine telling me match / nomatch. How can I evaluate the quality of the matching??


cout << "eval file " << filepath << endl;

    img = imread(filepath);
    bowide.compute(img, keypoints, response_hist);  //BOWImgDescriptorExtractor bowide

    for (map<string,CvSVM>::iterator it = classes_classifiers.begin(); it != classes_classifiers.end(); ++it) {
        float res = (*it).second.predict(response_hist,false);
        cout << "class: " << (*it).first << ", response: " << res << endl;

// cout << "."; } cout << endl; closedir( dp );

cout <<"done"<<endl;
return 0;
2013-09-24 13:55:10 -0500 asked a question Object Recognition with SIFT - to inaccurate??


I'm new in OpenCV and I try to do an object recognition based on SIFT. My final goal is an automatic object detector, which gets an image from a camera and can match this with other images which are already stored in a database. Or if it doesn't find an appropriate match, it should create a new ObjectID for this Object in its database and learn it.

I tried to start with a simple matching of SIFT descriptors I extracted from some sample Images to find out which images belong together (FLAN matcher). The results are very disappointing. I took pictures of a face and a bottle of water from different views. When I tried to match the objects, I could barely detect a big difference between them. The feature points were often detected on homogeneous areas where the matching then went completely wrong as there couldn't be found the corresponding patch in the compared image.

My question is now, do you think it's possible to design a object detector like this - and if, how can I improve the matching performance? I planned to use a Bag of Features approach with an SVN classifier, but I am afraid that the performance will still be poor. Better Ideas?


2013-09-24 11:27:06 -0500 received badge  Scholar (source)
2013-09-18 14:44:18 -0500 asked a question fail to load keypoints from .yml file


I want to find keypoints in different images and save them on my hard disk. The saving part works very well. To save the keypoints I use the following:

    Mat it;
    it = imread( "pic1.jpg", IMREAD_GRAYSCALE);
    vector<KeyPoint> keypoints;
    detector.detect( (it), keypoints );
    FileStorage fs("keypoint1.yml", FileStorage::WRITE);
    write( fs , "keypoint", keypoints );

When I try to read the file I fail with this :

            vector<KeyPoint> keypoint1s;
            FileStorage fs2("keypoint1.yml", FileStorage::READ);
            FileNode kptFileNode = fs2["keypoint1"];
            read( kptFileNode, keypoint1s );

If I do it like that, "keypoint1s" remains empty. Would be great if somebody knows how to fix this!