我正在使用此代码查找极线(source)。
#include <iostream>
using namespace std;
#include <opencv2/opencv.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
int main(){
int point_count = 8;
vector<Point2f> points1(point_count);
vector<Point2f> points2(point_count);
points1[0] = Point2f(330, 123);
points1[1] = Point2f(330,240);
points1[2] = Point2f(260,223);
points1[3] = Point2f(202,109);
points1[4] = Point2f(204,207);
points1[5] = Point2f(118,104);
points1[6] = Point2f(41,174);
points1[7] = Point2f(205,209);
points2[0] = Point2f(268,89);
points2[1] = Point2f(268,207);
points2[2] = Point2f(212,191);
points2[3] = Point2f(164,82);
points2[4] = Point2f(168,176);
points2[5] = Point2f(116,74);
points2[6] = Point2f(29,143);
points2[7] = Point2f(167,178);
Mat fundamental_matrix = findFundamentalMat(points1, points2, FM_8POINT);
cout<<"hello!!"<<endl;
cout << "fundamental Matrix ="<<endl<< " " << fundamental_matrix << endl << endl;
computeCorrespondEpilines(points1, 1, fundamental_matrix);
}
但我在函数computeCorrespondEpilines()
中遇到错误Invalid arguments '
Candidates are:
void computeCorrespondEpilines(const cv::_InputArray &, int, const cv::_InputArray &, const cv::_OutputArray &)
'
我不确定如何使用此功能,并对第二个和最后一个参数感到困惑。 请指出我正确的方向,提前谢谢。