我想使用此代码(源代码)在opencv中查找基本矩阵。
\n\nint point_count = 100;\n vector<Point2f> points1(point_count);\n vector<Point2f> points2(point_count);\n\n // initialize the points here ... */\n for( int i = 0; i < point_count; i++ )\n {\n points1[i] = ...;\n points2[i] = ...;\n }\n\n Mat fundamental_matrix =\n findFundamentalMat(points1, points2, FM_RANSAC, 3, 0.99);\n
Run Code Online (Sandbox Code Playgroud)\n\n但我不知道如何在for循环中初始化points1、point2。\n我尝试过使用:
\n\npoints1[i] = 10.0;\npoints1[i] = (10.0, 20.0);\npoints1[i] = {10.0, 20.0};\n
Run Code Online (Sandbox Code Playgroud)\n\n但出现这样的错误
\n\nno match for \xe2\x80\x98operator=\xe2\x80\x99 (operand types are \xe2\x80\x98cv::Point_<float>\xe2\x80\x99 and \xe2\x80\x98double\xe2\x80\x99)\n
Run Code Online (Sandbox Code Playgroud)\n\n在所有这些中。
\n 归档时间: |
|
查看次数: |
14515 次 |
最近记录: |