Open helloliver opened 2 years ago
十二讲第二版书中运行结果,误差在0.001,但我运行程序pose_estimation_2d2d时,输出的结果为
pose_estimation_2d2d
./pose_estimation_2d2d ../1.png ..2.png -- Max dist : 94.000000 -- Min dist : 4.000000 共找到79组匹配点 fundamental_matrix is [4.54443750398184e-06, 0.0001333855576992603, -0.01798499246479044; -0.0001275657012964255, 2.266794804645652e-05, -0.01416678429206633; 0.01814994639971766, 0.004146055870980492, 1] essential_matrix is [-0.008455114492964278, 0.05451570701059781, 0.1546375809484052; -0.008287154708445212, 0.03351311565984172, -0.6896472136971504; -0.1153993974485718, 0.6945899967012867, 0.02159624094256633] homography_matrix is [0.926121428117554, -0.1445322024509823, 33.26921085699323; 0.04535424464910425, 0.9386696693816733, 8.570979966717408; -1.006197561051851e-05, -3.008140280167667e-05, 1] R is [0.9956584940813579, -0.05615340406690447, 0.07423582945816433; 0.05268846331440004, 0.9974645001566195, 0.04783823534446425; -0.07673388428334535, -0.0437191735855581, 0.9960926386957119] t is [-0.9726703113454949; -0.2153829834753195; 0.08673313009645391] t^R = [0.01195733758736675, -0.07709685221674556, -0.2186905642298021; 0.01171980658216709, -0.04739470268352609, 0.9753084428633267; 0.1631993929614534, -0.9822985936236425, -0.03054169683725466] epipolar constraint = [-0.04174349109967315] epipolar constraint = [0.03889681955103257] epipolar constraint = [0.318544550501749] epipolar constraint = [-0.1588102091798896] epipolar constraint = [-0.295731891763937] epipolar constraint = [0.2262943387506186] epipolar constraint = [0.035942295713844] epipolar constraint = [-0.2370020131930551] epipolar constraint = [0.001239646187747481] epipolar constraint = [-0.03561921127826907] epipolar constraint = [-0.3550729684930912] epipolar constraint = [0.05255350948680214] epipolar constraint = [-0.5013141283582616] epipolar constraint = [0.03499475583609603] epipolar constraint = [-0.05028947713058515] epipolar constraint = [-0.05586036457391569] epipolar constraint = [-0.006621579419851642] epipolar constraint = [0.2568805877495495] epipolar constraint = [-0.105960273577219] epipolar constraint = [-0.2035313869808909] epipolar constraint = [0.181504288601562] epipolar constraint = [-0.03500377938427771] epipolar constraint = [0.2022636388770583] epipolar constraint = [0.3175538192739373] epipolar constraint = [-0.3793680174091685] epipolar constraint = [-0.1415711927070099] epipolar constraint = [-0.1535301597318547] epipolar constraint = [-0.2240936579415184] epipolar constraint = [-0.04276623066959503] epipolar constraint = [0.203311050356438] epipolar constraint = [-0.2140281089786749] epipolar constraint = [-0.2117271690791074] epipolar constraint = [-0.5017208919877371] epipolar constraint = [0.05746527691970152] epipolar constraint = [-0.4699601456333802] epipolar constraint = [-0.1199929997239536] epipolar constraint = [-0.1107331057576054] epipolar constraint = [0.4166123212309968] epipolar constraint = [-0.212311020251197] epipolar constraint = [0.1488497679746872] epipolar constraint = [-0.1008217523925371] epipolar constraint = [-0.01063042706433287] epipolar constraint = [-0.3642523836129378] epipolar constraint = [-0.2325112070145744] epipolar constraint = [0.2311037890850768] epipolar constraint = [-0.3224337622412802] epipolar constraint = [-0.2788056076333967] epipolar constraint = [-0.2102267012030882] epipolar constraint = [-0.0554794846632746] epipolar constraint = [0.00594920723833417] epipolar constraint = [0.04516500571008632] epipolar constraint = [-0.2035741950482616] epipolar constraint = [0.2057097030934672] epipolar constraint = [-0.09344151124385626] epipolar constraint = [-0.2201344121851928] epipolar constraint = [-0.1792811477850846] epipolar constraint = [0.05820849091264332] epipolar constraint = [-0.03912735072360332] epipolar constraint = [-0.05420474114868826] epipolar constraint = [0.2190430057975537] epipolar constraint = [0.001272436358736889] epipolar constraint = [-0.1031503092915086] epipolar constraint = [0.0516008860828269] epipolar constraint = [0.000401189111909464] epipolar constraint = [0.04048004738498322] epipolar constraint = [0.1240543980790168] epipolar constraint = [-0.2694363390982075] epipolar constraint = [-0.06587681779429658] epipolar constraint = [-0.06859085828692454] epipolar constraint = [-0.2559543478160231] epipolar constraint = [-0.1861339649403193] epipolar constraint = [-0.0193929787651777] epipolar constraint = [-0.04827656520926885] epipolar constraint = [-0.203400895596226] epipolar constraint = [-0.03787715419550421] epipolar constraint = [-0.2684091342574775] epipolar constraint = [-0.1118852554021042] epipolar constraint = [-0.1777524447464409] epipolar constraint = [-0.1730983806544727]
误差很大,而且输出的旋转矩阵以及平移部分差别也很大
我的环境为ubuntu20.04,opencv版本为4.2.0
此外由于版本原因,编译时遇到错误,改动代码如下
fundamental_matrix = findFundamentalMat(points1, points2, CV_FM_8POINT);
修改为
fundamental_matrix = findFundamentalMat(points1, points2, cv::FM_8POINT);
十二讲第二版书中运行结果,误差在0.001,但我运行程序
pose_estimation_2d2d
时,输出的结果为误差很大,而且输出的旋转矩阵以及平移部分差别也很大
我的环境为ubuntu20.04,opencv版本为4.2.0
此外由于版本原因,编译时遇到错误,改动代码如下
修改为