【问题标题】:OpenCV:error: no match for call to '(cv::Mat) (int&, int&)'OpenCV:错误:不匹配调用 '(cv::Mat) (int&, int&)'
【发布时间】:2014-01-05 10:30:34
【问题描述】:

我想显示基本矩阵,但出现如下错误: 错误:不匹配调用 '(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;
    }

【问题讨论】:

  • Mat::operator()的签名是什么?

标签: c++ opencv


【解决方案1】:

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

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

【讨论】:

  • +1 我弄错了。我以为你在调用操作符方法。
猜你喜欢
  • 1970-01-01
  • 2017-04-02
  • 1970-01-01
  • 1970-01-01
  • 2015-05-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多