Ask Your Question

csp256's profile - activity

2016-03-21 20:15:04 -0500 commented question error: (-215) scn == 3 || scn == 4 in function cv::ipp_cvtColor

I get this same error when my webcam crashes and stops supplying video. Are you certain that you are getting good data from your avi file?

2016-03-20 13:16:19 -0500 received badge  Student (source)
2016-03-20 13:10:37 -0500 received badge  Scholar (source)
2016-03-20 13:10:36 -0500 received badge  Supporter (source)
2016-03-20 10:50:27 -0500 commented question (3.1.0) Detected FAST keypoints offset from image

It was really that simple. Please resubmit as answer.

2016-03-20 02:27:57 -0500 asked a question (3.1.0) Detected FAST keypoints offset from image

I just compiled OpenCV 3.1.0 from source on Ubuntu 15.10. I disabled CUDA but kept everything else default.

Detected FAST features do not align with my image. Tellingly, when I rotate my camera, the keypoints move at a speed greater than the camera's rotation.

Here is a video.

    vector<KeyPoint> keypoints_1, keypoints_2;
    FAST(img_1, keypoints_1, 28);
    FAST(img_2, keypoints_2, 28);

    Mat descriptors_1, descriptors_2;
    Ptr<ORB> orb = ORB::create();
    orb->compute( img_1, keypoints_1, descriptors_1 );
    orb->compute( img_2, keypoints_2, descriptors_2 );

    BFMatcher matcher;
    vector<vector<DMatch> > knnMatches;
    matcher.knnMatch(descriptors_1, descriptors_2, knnMatches, 2 );

    vector< DMatch > good_matches;
    for( int i = 0; i < descriptors_1.rows; i++ ) {
      if( knnMatches[i][0].distance / knnMatches[i][1].distance <= 0.9 ) {
          good_matches.push_back( knnMatches[i][0]);
      }
    }

    Mat img_matches;
    drawMatches( img_1, keypoints_1, img_2, keypoints_2,
               good_matches, img_matches, Scalar::all(-1), Scalar::all(-1),
               vector<char>(), DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS );
    imshow( "Matches", img_matches );

Really looking forward to figuring out how I managed to mess this up... thanks everyone.