OpenCV:错误:无法调用'(cv :: Mat)(int&,int&)'

时间:2014-01-05 01:48:01

标签: c++ opencv

我想显示基本矩阵,但是我得到了这样的错误: 错误:无法匹配调用'(cv :: Mat)(int&,int&)'

这是我的代码:

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;
    }

1 个答案:

答案 0 :(得分:1)

我找到了解决问题的方法:

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