我想使用此代码(source)在opencv中找到基本矩阵。
int point_count = 100;
vector<Point2f> points1(point_count);
vector<Point2f> points2(point_count);
// initialize the points here ... */
for( int i = 0; i < point_count; i++ )
{
points1[i] = ...;
points2[i] = ...;
}
Mat fundamental_matrix =
findFundamentalMat(points1, points2, FM_RANSAC, 3, 0.99);
但我不知道如何初始化for循环中的points1,points2。 我尝试过使用:
points1[i] = 10.0;
points1[i] = (10.0, 20.0);
points1[i] = {10.0, 20.0};
但是得到这样的错误
no match for ‘operator=’ (operand types are ‘cv::Point_<float>’ and ‘double’)
所有这些。