在OpenCV中,我将焦距设置为1.0,主要点设置为(0.0,0.0)。我希望findFundamentalMat
和findEssentialMat
给出相同的答案。
默认参数如下:
double focal_length = 1.0;
Point2d principle_point (0.0, 0.0);
vector<Point2f> points1(20), points2(20);
points1.at(0) = Point2f (-2.9496655e-01, -2.4483292e-01);
points1.at(1) = Point2f (-1.6068510e-01, 4.5064249e-01);
points1.at(2) = Point2f (7.3542821e-02, -2.0346491e-01);
points1.at(3) = Point2f (-1.5002556e-02, -3.4229789e-01);
points1.at(4) = Point2f (-2.3837910e-01, -1.3700490e-01);
points1.at(5) = Point2f (7.8435557e-02, 2.4203330e-01);
points1.at(6) = Point2f (3.7706445e-01, 2.0632080e-01);
points1.at(7) = Point2f (-4.3844956e-01, 2.0297146e-01);
points1.at(8) = Point2f (-5.9011579e-02, -4.9340762e-01);
points1.at(9) = Point2f (-4.1616564e-01, -1.2804709e-01);
points1.at(10) = Point2f (6.1859647e-02, 4.0300625e-01);
points1.at(11) = Point2f (4.1061330e-02,-1.8112388e-01);
points1.at(12) = Point2f (2.6982064e-01,9.6984845e-02);
points1.at(13) = Point2f (-2.6796471e-01,-2.0333548e-01);
points1.at(14) = Point2f (8.7925184e-02,-3.7616679e-01);
points1.at(15) = Point2f (-3.9661438e-02,-1.1173706e-01);
points1.at(16) = Point2f (3.6320246e-01,3.1635640e-01);
points1.at(17) = Point2f (1.6288494e-01,4.7897161e-01);
points1.at(18) = Point2f (-1.4668326e-01,3.6037481e-01);
points1.at(19) = Point2f (-1.5446095e-01,-4.1735858e-01);
points2.at(0) = Point2f (-4.6969940e-01,7.7697154e-02);
points2.at(1) = Point2f (-3.0035511e-01,9.8658871e-01);
points2.at(2) = Point2f (-7.7474275e-02,7.7484553e-02);
points2.at(3) = Point2f (-2.0804027e-01,-5.9697456e-02);
points2.at(4) = Point2f (-4.2303674e-01,1.8555308e-01);
points2.at(5) = Point2f (1.3338451e-03,6.0742712e-01);
points2.at(6) = Point2f (3.2751035e-01,5.1658284e-01);
points2.at(7) = Point2f (-7.4720923e-01,6.6693123e-01);
points2.at(8) = Point2f (-2.3442464e-01,-1.9148161e-01);
points2.at(9) = Point2f (-6.9969149e-01,2.2685454e-01);
points2.at(10) = Point2f (-6.9873886e-02,8.8685138e-01);
points2.at(11) = Point2f (-1.3513031e-01,9.8115840e-02);
points2.at(12) = Point2f (1.7724731e-01,3.9173593e-01);
points2.at(13) = Point2f (-4.6261299e-01,1.2161056e-01);
points2.at(14) = Point2f (-1.4726442e-01,-1.1684731e-01);
points2.at(15) = Point2f (-2.7394748e-01,1.8811233e-01);
points2.at(16) = Point2f (3.1677134e-01,6.8988510e-01);
points2.at(17) = Point2f (1.3712308e-01,9.6475239e-01);
points2.at(18) = Point2f (-3.3534566e-01,8.5627094e-01);
points2.at(19) = Point2f (-3.2324184e-01,-1.0689210e-01);
Mat essential_matrix = findEssentialMat(points1, points2);
Mat fundamental_matrix = findFundamentalMat(points1, points2);
cout << "FMat: " << fundamental_matrix << endl;
cout << "EMat: " << essential_matrix << endl;
结果输出为:
FMat: [-0.4132771577338289, 18.00494950681355, 5.239388991460945;
-21.41951475698524, -1.950952124492188, -0.9449632756546773;
0.5950288281603779, 3.395814209045324, 1]
EMat: [-0.08497831971657961, 0.6510511102645874, 0.1527450970807699;
-0.6960196789161947, -0.05422527175261067, -0.1065912226642807;
0.009670877943450031, 0.2093312962419801, 0.05405083318805392]
为什么即使一切都正常化,基本矩阵和基本矩阵也不同?