Just Rookie
Just Rookie

Reputation: 209

OpenCV:error: no match for call to '(cv::Mat) (int&, int&)'

I want to display the fundamental matrix,but I got the error like this: error: no match for call to '(cv::Mat) (int&, int&)'

Here is my code:

vector<Point2f> imgpts1,imgpts2;
    for(unsigned int i=0;i<matches.size();i++)
    {
        imgpts1.push_back(keypoint1[matches[i].trainIdx].pt);
        imgpts2.push_back(keypoint2[matches[i].trainIdx].pt);
    }
    //Mat fundamental=Mat(3,3,CV_32F);
    Mat fundamental=findFundamentalMat(imgpts1,imgpts2,FM_RANSAC,3,0.99);

cout<<"fundamental:"<<endl;
    for(int i=0;i<fundamental.rows;i++)
    {
        for(int j=0;j<fundamental.cols;j++)
        {
            cout<<fundamental(i,j)<<" ";
        }
        cout<<endl;
    }

Upvotes: 0

Views: 4349

Answers (1)

Just Rookie
Just Rookie

Reputation: 209

I found a way to solve the problem:

Mat fundamental=findFundamentalMat(imgpts1,imgpts2,FM_RANSAC,3,0.99);
    cout<<"fundamental="<<endl<<" "<<fundamental<<endl;

Upvotes: 1

Related Questions