EasySFM
EasySFM copied to clipboard
Errors when running
Hi, and thank you for this code! I am running it with the provided test data, and i see the following output and error:
sfm.exe
0: ../test_data/images/0000.png
1: ../test_data/images/0001.png
2: ../test_data/images/0002.png
3: ../test_data/images/0003.png
4: ../test_data/images/0004.png
5: ../test_data/images/0005.png
6: ../test_data/images/0006.png
7: ../test_data/images/0007.png
8: ../test_data/images/0008.png
9: ../test_data/images/0009.png
10: ../test_data/images/0010.png
Frame number is 11
No distortion coefficients imported. Use defualt one (0).
Begin feature extraction
Import Image [ ../test_data/images/0000.png ] done in 0.0059645 seconds.
Import calibration data done
K Matrix:
2.35099e-38 0 6.24494e-39
7.07143e-39 3.21932e-34 1.08367e-38
1.87347e-38 3.19496e-43 9.09186e-39
Feature extraction of Frame [ 0 ]
extract SURF cost = 0.160484 seconds.
Found [64 x 988] features.
Import Image [ ../test_data/images/0001.png ] done in 0.0059567 seconds.
Feature extraction of Frame [ 1 ]
extract SURF cost = 0.0201939 seconds.
Found [64 x 1169] features.
Import Image [ ../test_data/images/0002.png ] done in 0.0059904 seconds.
Feature extraction of Frame [ 2 ]
extract SURF cost = 0.0217146 seconds.
Found [64 x 1254] features.
Import Image [ ../test_data/images/0003.png ] done in 0.006218 seconds.
Feature extraction of Frame [ 3 ]
extract SURF cost = 0.0211189 seconds.
Found [64 x 1371] features.
Import Image [ ../test_data/images/0004.png ] done in 0.006127 seconds.
Feature extraction of Frame [ 4 ]
extract SURF cost = 0.0215587 seconds.
Found [64 x 1251] features.
Import Image [ ../test_data/images/0005.png ] done in 0.005771 seconds.
Feature extraction of Frame [ 5 ]
extract SURF cost = 0.0225038 seconds.
Found [64 x 1287] features.
Import Image [ ../test_data/images/0006.png ] done in 0.0062929 seconds.
Feature extraction of Frame [ 6 ]
extract SURF cost = 0.024643 seconds.
Found [64 x 1472] features.
Import Image [ ../test_data/images/0007.png ] done in 0.0061723 seconds.
Feature extraction of Frame [ 7 ]
extract SURF cost = 0.028355 seconds.
Found [64 x 1555] features.
Import Image [ ../test_data/images/0008.png ] done in 0.0065825 seconds.
Feature extraction of Frame [ 8 ]
extract SURF cost = 0.028425 seconds.
Found [64 x 1675] features.
Import Image [ ../test_data/images/0009.png ] done in 0.0061999 seconds.
Feature extraction of Frame [ 9 ]
extract SURF cost = 0.0265732 seconds.
Found [64 x 1843] features.
Import Image [ ../test_data/images/0010.png ] done in 0.0061556 seconds.
Feature extraction of Frame [ 10 ]
extract SURF cost = 0.032918 seconds.
Found [64 x 2064] features.
Feature extraction done
Begin pairwise feature matching
Initial matching done.
match SURF cost = 0.0106942 seconds.
# Correspondence: Initial [ 1169 ] Filtered by Lowe ratio test [ 147 ]
essential_matrix is
[-4.054191079126466e-05, -0.01689223249347582, -0.3603043999429407;
0.4988385481837281, -0.01370375366381636, 0.4311661940440692;
0.4988624078959729, -0.05399246145518122, -0.4280006137948445]
Estimate Motion [2D-2D] cost = 0.0018811 seconds.
Find [147] inlier matches from [147] total matches.
Transform is
-0.450644 0.891726 -0.0417563 0.860111
0.631234 0.285228 -0.721241 0.360744
-0.63124 -0.351381 -0.691424 -0.360657
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [1] and Frame [0] matching done.
Initial matching done.
match SURF cost = 0.0108269 seconds.
# Correspondence: Initial [ 1254 ] Filtered by Lowe ratio test [ 51 ]
essential_matrix is
[-2.923250237140058e-05, -0.01689281697752387, -0.3603048257783195;
0.4988395638490177, -0.01370216049977059, 0.4311692298578854;
0.4988616313251937, -0.05399024192220766, -0.4279972272456278]
Estimate Motion [2D-2D] cost = 0.0011693 seconds.
Find [51] inlier matches from [51] total matches.
Transform is
-0.450648 0.891724 -0.0417717 0.860111
0.631236 0.285221 -0.721242 0.360734
-0.631235 -0.351394 -0.691422 -0.360667
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [2] and Frame [0] matching done.
Initial matching done.
match SURF cost = 0.0113063 seconds.
# Correspondence: Initial [ 1254 ] Filtered by Lowe ratio test [ 240 ]
essential_matrix is
[-3.781322741641227e-05, -0.01689100565115121, -0.3603048285301984;
0.4988391772832941, -0.01370509787545983, 0.4311664346675829;
0.4988618324279884, -0.05399030092020163, -0.4280002262906038]
Estimate Motion [2D-2D] cost = 0.0020988 seconds.
Find [240] inlier matches from [240] total matches.
Transform is
-0.450646 0.891726 -0.0417566 -0.860111
0.631234 0.285229 -0.721241 -0.360741
-0.631239 -0.351382 -0.691424 0.36066
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [2] and Frame [1] matching done.
Initial matching done.
match SURF cost = 0.0114401 seconds.
# Correspondence: Initial [ 1371 ] Filtered by Lowe ratio test [ 22 ]
Frame [3] and Frame [0] matching done.
Initial matching done.
match SURF cost = 0.0120715 seconds.
# Correspondence: Initial [ 1371 ] Filtered by Lowe ratio test [ 84 ]
essential_matrix is
[-2.711983968165055e-05, -0.01689096724424614, -0.3603058703224263;
0.4988412101466279, -0.01370447761791204, 0.4311681053029613;
0.4988600233893473, -0.0539874411741754, -0.4279977884088123]
Estimate Motion [2D-2D] cost = 0.0010994 seconds.
Find [84] inlier matches from [84] total matches.
Transform is
0.567223 0.822659 -0.0386086 0.86011
-0.582344 0.433792 0.687532 0.360732
0.582352 -0.3675 0.725127 -0.360671
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [3] and Frame [1] matching done.
Initial matching done.
match SURF cost = 0.0120346 seconds.
# Correspondence: Initial [ 1371 ] Filtered by Lowe ratio test [ 212 ]
essential_matrix is
[-7.329948028449804e-05, -0.01686672312074985, -0.3603117343696814;
0.4988475602475631, -0.01373927410282451, 0.4311430981045495;
0.4988526278213637, -0.05397025568196863, -0.4280212640864956]
Estimate Motion [2D-2D] cost = 0.0016648 seconds.
Find [212] inlier matches from [212] total matches.
Transform is
0.567242 0.822645 -0.0386246 -0.860106
-0.5823 0.433798 0.687565 -0.360771
0.582377 -0.367525 0.725095 0.360641
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [3] and Frame [2] matching done.
Initial matching done.
match SURF cost = 0.0106251 seconds.
# Correspondence: Initial [ 1251 ] Filtered by Lowe ratio test [ 9 ]
Frame [4] and Frame [0] matching done.
Initial matching done.
match SURF cost = 0.0116849 seconds.
# Correspondence: Initial [ 1251 ] Filtered by Lowe ratio test [ 34 ]
Frame [4] and Frame [1] matching done.
Initial matching done.
match SURF cost = 0.0122882 seconds.
# Correspondence: Initial [ 1251 ] Filtered by Lowe ratio test [ 88 ]
essential_matrix is
[-6.828778233305395e-05, -0.01687697799770418, -0.3603077647449456;
0.4988419692161544, -0.01372543932918386, 0.4311515616773085;
0.4988583568514334, -0.05398135639927343, -0.4280145599190704]
Estimate Motion [2D-2D] cost = 0.0011594 seconds.
Find [88] inlier matches from [88] total matches.
Transform is
0.567235 0.822649 -0.0386407 -0.860109
-0.582313 0.433813 0.687545 -0.360768
0.582371 -0.367499 0.725113 0.360638
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [4] and Frame [2] matching done.
Initial matching done.
match SURF cost = 0.0125703 seconds.
# Correspondence: Initial [ 1251 ] Filtered by Lowe ratio test [ 240 ]
essential_matrix is
[0.0003801158643716548, -0.3535170045080517, -0.5720913083621024;
-9.557016843496188e-05, -0.2184991724656098, 0.3535077809578952;
-8.026779285592419e-05, 0.5720872209102636, -0.2185032596113513]
Estimate Motion [2D-2D] cost = 0.0017104 seconds.
Find [240] inlier matches from [240] total matches.
Transform is
-0.308965 -0.809158 0.499804 0.308989
-0.809365 0.499678 0.308626 0.809062
-0.499468 -0.30917 -0.809287 0.499945
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [4] and Frame [3] matching done.
Initial matching done.
match SURF cost = 0.0106483 seconds.
# Correspondence: Initial [ 1287 ] Filtered by Lowe ratio test [ 2 ]
Frame [5] and Frame [0] matching done.
Initial matching done.
match SURF cost = 0.0124478 seconds.
# Correspondence: Initial [ 1287 ] Filtered by Lowe ratio test [ 18 ]
Frame [5] and Frame [1] matching done.
Initial matching done.
match SURF cost = 0.0114449 seconds.
# Correspondence: Initial [ 1287 ] Filtered by Lowe ratio test [ 22 ]
Frame [5] and Frame [2] matching done.
Initial matching done.
match SURF cost = 0.0116795 seconds.
# Correspondence: Initial [ 1287 ] Filtered by Lowe ratio test [ 65 ]
essential_matrix is
[-7.97715600360359e-05, -0.01687435197676532, -0.3603077267368964;
0.4988413447931776, -0.01372960010866688, 0.4311479256245809;
0.4988587315380025, -0.05398120642526795, -0.4280185326503181]
Estimate Motion [2D-2D] cost = 0.0012502 seconds.
Find [65] inlier matches from [65] total matches.
Transform is
0.567238 0.822646 -0.0386527 -0.860109
-0.582305 0.433821 0.687546 -0.360778
0.582376 -0.367495 0.725111 0.360628
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [5] and Frame [3] matching done.
Initial matching done.
match SURF cost = 0.0124595 seconds.
# Correspondence: Initial [ 1287 ] Filtered by Lowe ratio test [ 222 ]
essential_matrix is
[-2.125018844128939e-05, -0.01688621397653802, -0.3603087219909361;
0.4988457513675736, -0.01371043924209039, 0.4311650372564132;
0.4988555897468404, -0.05398011347682569, -0.4279992744813632]
Estimate Motion [2D-2D] cost = 0.0016371 seconds.
Find [222] inlier matches from [222] total matches.
Transform is
0.567225 0.822658 -0.0385881 -0.860108
-0.582341 0.433776 0.687545 -0.360726
0.582353 -0.367521 0.725116 0.360682
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [5] and Frame [4] matching done.
Initial matching done.
match SURF cost = 0.01213 seconds.
# Correspondence: Initial [ 1472 ] Filtered by Lowe ratio test [ 1 ]
Frame [6] and Frame [0] matching done.
Initial matching done.
match SURF cost = 0.012406 seconds.
# Correspondence: Initial [ 1472 ] Filtered by Lowe ratio test [ 6 ]
Frame [6] and Frame [1] matching done.
Initial matching done.
match SURF cost = 0.0122891 seconds.
# Correspondence: Initial [ 1472 ] Filtered by Lowe ratio test [ 8 ]
Frame [6] and Frame [2] matching done.
Initial matching done.
match SURF cost = 0.0122745 seconds.
# Correspondence: Initial [ 1472 ] Filtered by Lowe ratio test [ 29 ]
Frame [6] and Frame [3] matching done.
Initial matching done.
match SURF cost = 0.0128239 seconds.
# Correspondence: Initial [ 1472 ] Filtered by Lowe ratio test [ 72 ]
essential_matrix is
[-6.330721981256707e-05, -0.01688057755763482, -0.3603069501355393;
0.4988411032800715, -0.01372045667390668, 0.4311545091197603;
0.4988593386026277, -0.05398437354508085, -0.4280117796184068]
Estimate Motion [2D-2D] cost = 0.0019437 seconds.
Find [72] inlier matches from [72] total matches.
Transform is
0.567233 0.82265 -0.0386413 -0.860109
-0.582318 0.433814 0.68754 -0.360763
0.582368 -0.367494 0.725117 0.360641
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [6] and Frame [4] matching done.
Initial matching done.
match SURF cost = 0.0128487 seconds.
# Correspondence: Initial [ 1472 ] Filtered by Lowe ratio test [ 233 ]
essential_matrix is
[-0.0001299593407176936, -0.01685913331623179, -0.3603093994515486;
0.4988413892092982, -0.01375277647801455, 0.4311288098883419;
0.4988575802836442, -0.05397599451710701, -0.4280381698468509]
Estimate Motion [2D-2D] cost = 0.0017504 seconds.
Find [233] inlier matches from [233] total matches.
Transform is
-0.450624 0.891746 -0.0415629 -0.860108
0.631196 0.285345 -0.721228 -0.360822
-0.631293 -0.351237 -0.691449 0.360586
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [6] and Frame [5] matching done.
Initial matching done.
match SURF cost = 0.0129979 seconds.
# Correspondence: Initial [ 1555 ] Filtered by Lowe ratio test [ 1 ]
Frame [7] and Frame [0] matching done.
Initial matching done.
match SURF cost = 0.0132002 seconds.
# Correspondence: Initial [ 1555 ] Filtered by Lowe ratio test [ 1 ]
Frame [7] and Frame [1] matching done.
Initial matching done.
match SURF cost = 0.0131738 seconds.
# Correspondence: Initial [ 1555 ] Filtered by Lowe ratio test [ 3 ]
Frame [7] and Frame [2] matching done.
Initial matching done.
match SURF cost = 0.0135081 seconds.
# Correspondence: Initial [ 1555 ] Filtered by Lowe ratio test [ 8 ]
Frame [7] and Frame [3] matching done.
Initial matching done.
match SURF cost = 0.0131139 seconds.
# Correspondence: Initial [ 1555 ] Filtered by Lowe ratio test [ 24 ]
Frame [7] and Frame [4] matching done.
Initial matching done.
match SURF cost = 0.0136555 seconds.
# Correspondence: Initial [ 1555 ] Filtered by Lowe ratio test [ 74 ]
essential_matrix is
[-1.126277321991541e-05, -0.01688965151693678, -0.3603082480195891;
0.4988455472880448, -0.01370529720509319, 0.4311690743020677;
0.4988560134554472, -0.05398164220236564, -0.4279951871729685]
Estimate Motion [2D-2D] cost = 0.0014464 seconds.
Find [74] inlier matches from [74] total matches.
Transform is
-0.450658 0.891718 -0.0417857 -0.860108
0.631233 0.285216 -0.721246 -0.360717
-0.63123 -0.351412 -0.691417 0.36069
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [7] and Frame [5] matching done.
Initial matching done.
match SURF cost = 0.0221999 seconds.
# Correspondence: Initial [ 1555 ] Filtered by Lowe ratio test [ 224 ]
essential_matrix is
[-0.0001166008809010193, -0.01685222412917882, -0.3603134377750888;
0.4988478651515304, -0.01376098231657952, 0.4311262411262419;
0.498851364652257, -0.05396414124670763, -0.4280385613011039]
Estimate Motion [2D-2D] cost = 0.0017157 seconds.
Find [224] inlier matches from [224] total matches.
Transform is
-0.450632 0.891742 -0.0415618 -0.860105
0.631191 0.285351 -0.72123 -0.360809
-0.631292 -0.351243 -0.691447 0.360606
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [7] and Frame [6] matching done.
Initial matching done.
match SURF cost = 0.0122501 seconds.
# Correspondence: Initial [ 1675 ] Filtered by Lowe ratio test [ 0 ]
Frame [8] and Frame [0] matching done.
Initial matching done.
match SURF cost = 0.0132553 seconds.
# Correspondence: Initial [ 1675 ] Filtered by Lowe ratio test [ 0 ]
Frame [8] and Frame [1] matching done.
Initial matching done.
match SURF cost = 0.013974 seconds.
# Correspondence: Initial [ 1675 ] Filtered by Lowe ratio test [ 5 ]
Frame [8] and Frame [2] matching done.
Initial matching done.
match SURF cost = 0.0134758 seconds.
# Correspondence: Initial [ 1675 ] Filtered by Lowe ratio test [ 9 ]
Frame [8] and Frame [3] matching done.
Initial matching done.
match SURF cost = 0.0135339 seconds.
# Correspondence: Initial [ 1675 ] Filtered by Lowe ratio test [ 13 ]
Frame [8] and Frame [4] matching done.
Initial matching done.
match SURF cost = 0.0133383 seconds.
# Correspondence: Initial [ 1675 ] Filtered by Lowe ratio test [ 18 ]
Frame [8] and Frame [5] matching done.
Initial matching done.
match SURF cost = 0.014455 seconds.
# Correspondence: Initial [ 1675 ] Filtered by Lowe ratio test [ 48 ]
Frame [8] and Frame [6] matching done.
Initial matching done.
match SURF cost = 0.0141643 seconds.
# Correspondence: Initial [ 1675 ] Filtered by Lowe ratio test [ 134 ]
essential_matrix is
[-0.0001524553525616538, -0.01686906475880679, -0.3603033930450538;
0.4988316690287257, -0.01374121902664273, 0.4311317520698297;
0.4988668553787254, -0.05399388711899322, -0.4280384963539495]
Estimate Motion [2D-2D] cost = 0.0013204 seconds.
Find [134] inlier matches from [134] total matches.
Transform is
-0.45061 0.891753 -0.0415604 -0.860113
0.631203 0.285339 -0.721225 -0.360842
-0.631296 -0.351224 -0.691453 0.360554
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [8] and Frame [7] matching done.
Initial matching done.
match SURF cost = 0.0127412 seconds.
# Correspondence: Initial [ 1843 ] Filtered by Lowe ratio test [ 0 ]
Frame [9] and Frame [0] matching done.
Initial matching done.
match SURF cost = 0.0135702 seconds.
# Correspondence: Initial [ 1843 ] Filtered by Lowe ratio test [ 1 ]
Frame [9] and Frame [1] matching done.
Initial matching done.
match SURF cost = 0.0134923 seconds.
# Correspondence: Initial [ 1843 ] Filtered by Lowe ratio test [ 2 ]
Frame [9] and Frame [2] matching done.
Initial matching done.
match SURF cost = 0.0153808 seconds.
# Correspondence: Initial [ 1843 ] Filtered by Lowe ratio test [ 7 ]
Frame [9] and Frame [3] matching done.
Initial matching done.
match SURF cost = 0.0138417 seconds.
# Correspondence: Initial [ 1843 ] Filtered by Lowe ratio test [ 5 ]
Frame [9] and Frame [4] matching done.
Initial matching done.
match SURF cost = 0.0146426 seconds.
# Correspondence: Initial [ 1843 ] Filtered by Lowe ratio test [ 10 ]
Frame [9] and Frame [5] matching done.
Initial matching done.
match SURF cost = 0.0146466 seconds.
# Correspondence: Initial [ 1843 ] Filtered by Lowe ratio test [ 19 ]
Frame [9] and Frame [6] matching done.
Initial matching done.
match SURF cost = 0.0153424 seconds.
# Correspondence: Initial [ 1843 ] Filtered by Lowe ratio test [ 34 ]
Frame [9] and Frame [7] matching done.
Initial matching done.
match SURF cost = 0.0153846 seconds.
# Correspondence: Initial [ 1843 ] Filtered by Lowe ratio test [ 208 ]
essential_matrix is
[-0.000606237363223059, -0.0167082893288336, -0.3603257621755999;
0.4988416183391554, -0.01398043204392543, 0.4309470131606996;
0.4988465564862467, -0.05391911207827231, -0.428225305501147]
Estimate Motion [2D-2D] cost = 0.0024616 seconds.
Find [208] inlier matches from [208] total matches.
Transform is
0.567392 0.822519 -0.0390948 -0.8601
-0.581923 0.43411 0.687687 -0.361237
0.582607 -0.367438 0.724954 0.360189
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [9] and Frame [8] matching done.
Initial matching done.
match SURF cost = 0.0150632 seconds.
# Correspondence: Initial [ 2064 ] Filtered by Lowe ratio test [ 1 ]
Frame [10] and Frame [0] matching done.
Initial matching done.
match SURF cost = 0.0153474 seconds.
# Correspondence: Initial [ 2064 ] Filtered by Lowe ratio test [ 0 ]
Frame [10] and Frame [1] matching done.
Initial matching done.
match SURF cost = 0.0178879 seconds.
# Correspondence: Initial [ 2064 ] Filtered by Lowe ratio test [ 5 ]
Frame [10] and Frame [2] matching done.
Initial matching done.
match SURF cost = 0.0149881 seconds.
# Correspondence: Initial [ 2064 ] Filtered by Lowe ratio test [ 4 ]
Frame [10] and Frame [3] matching done.
Initial matching done.
match SURF cost = 0.0160783 seconds.
# Correspondence: Initial [ 2064 ] Filtered by Lowe ratio test [ 7 ]
Frame [10] and Frame [4] matching done.
Initial matching done.
match SURF cost = 0.0159267 seconds.
# Correspondence: Initial [ 2064 ] Filtered by Lowe ratio test [ 3 ]
Frame [10] and Frame [5] matching done.
Initial matching done.
match SURF cost = 0.0159594 seconds.
# Correspondence: Initial [ 2064 ] Filtered by Lowe ratio test [ 5 ]
Frame [10] and Frame [6] matching done.
Initial matching done.
match SURF cost = 0.0171597 seconds.
# Correspondence: Initial [ 2064 ] Filtered by Lowe ratio test [ 5 ]
Frame [10] and Frame [7] matching done.
Initial matching done.
match SURF cost = 0.0383256 seconds.
# Correspondence: Initial [ 2064 ] Filtered by Lowe ratio test [ 15 ]
Frame [10] and Frame [8] matching done.
Initial matching done.
match SURF cost = 0.026389 seconds.
# Correspondence: Initial [ 2064 ] Filtered by Lowe ratio test [ 124 ]
essential_matrix is
[-0.0001634812728369833, -0.01684404105962003, -0.3603127967985078;
0.4988448159466937, -0.01377479181414645, 0.4311120730692495;
0.4988533952661748, -0.05396653062654573, -0.4280541189954331]
Estimate Motion [2D-2D] cost = 0.0031546 seconds.
Find [124] inlier matches from [124] total matches.
Transform is
-0.450618 0.891753 -0.0414835 -0.860106
0.631178 0.285394 -0.721224 -0.36085
-0.631315 -0.35118 -0.691458 0.360562
0 0 0 1
Mean relative depth is about -nan(ind) * baseline length.
Frame [10] and Frame [9] matching done.
Pairwise feature matching done.
Feature tracking done, there are 13883 unique points in total.
Find initialization frame pair done in 0.0006787 seconds.
Frame 4 and Frame 3 with 830 trackings
The relative depth is -nan(ind) . They are set as the frame pair for initialization.
Frame [4] 's pose:
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Frame [3] 's pose:
-0.308965 -0.809158 0.499804 0.308989
-0.809365 0.499678 0.308626 0.809062
-0.499468 -0.30917 -0.809287 0.499945
0 0 0 1
Triangulate [ 240 ] new points, [ 240 ] points in total.
Triangularization done in 0.0025987 seconds.
Generate new sparse point cloud done.
Add frame [ 3 ] , pose:
-0.308965 -0.809158 0.499804 0.308989
-0.809365 0.499678 0.308626 0.809062
-0.499468 -0.30917 -0.809287 0.499945
0 0 0 1
Add frame [ 4 ] , pose:
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Update the viewer done.
Bundle Ajustment parameters initialization done.
Process frame 3 Done
Process frame 4 Done
Find the observation done
Set camera pose parameters inital value done
Set points inital value done
Find [ 329 ] Observations in total.
There are [ 2 ] cameras and [ 240 ] 3D points.
So there should be [ 732 ] unknown parameters with [ 658 ] observation functions.
Too much unknown parameters ...
Begin to calculate the loss (reprojection error)
Solver Summary (v 2.1.0-eigen-(3.4.0)-lapack-suitesparse-()-no_openmp-cuda-(11070))
Original Reduced
Parameter blocks 231 -1
Parameters 699 -1
Residual blocks 329 -1
Residuals 658 -1
Minimizer TRUST_REGION
Sparse linear algebra library SUITE_SPARSE
Trust region strategy LEVENBERG_MARQUARDT
Given Used
Linear solver DENSE_SCHUR SPARSE_NORMAL_CHOLESKY
Threads 4 4
Linear solver ordering AUTOMATIC AUTOMATIC
Cost:
Initial -1.000000e+00
Minimizer iterations -2
Successful steps -1
Unsuccessful steps -1
Time (in seconds):
Preprocessor 0.000097
Residual only evaluation -1.000000 (-1)
Jacobian & residual evaluation -1.000000 (-1)
Linear solver -1.000000 (-1)
Minimizer -1.000000
Postprocessor 0.000003
Total 0.000100
Termination: FAILURE (ParameterBlock: 00000252E00E9A50 with size 3 has at least one invalid value.
First invalid value is at index: 0.
Parameter block values: -nan(ind) -nan(ind) -nan(ind) )
Bundle Ajustment cost = 0.0048758 seconds.
Bundle Ajustment done.
BA for initialization done
Now register the next frame
Find next frame done in 3.2e-06 seconds.
Frame 2 is found with 93 common points
2D points: 1254
3D points: 240
0 initial correspondences are used.
OpenCV: terminate handler is called! The last OpenCV error is:
OpenCV(4.6.0-dev) Error: Assertion failed (npoints >= 4 && npoints == std::max(ipoints.checkVector(2, CV_32F), ipoints.checkVector(2, CV_64F))) in cv::solvePnPRansac, file D:\ThirdParty\OpenCv_4.6\opencv-master\modules\calib3d\src\solvepnp.cpp, line 241
My variables are the defeult:
// The file to read from.
std::string image_data_path = "../test_data/images";
std::string image_list_path = "../test_data/image_list.txt";
std::string calib_file_path = "../test_data/k/K.txt";
std::string distort_file_path = "";
std::string output_file_path = "../test_data/output/sfm_sparse_point_cloud_fountain22.ply";
// Key processing and visualization parameters
std::string use_feature = "S";
std::string feature_extraction_parameter = "300";
std::string ransac_reproj_dist_thre = "1";
std::string find_best_initialization = "1";
std::string ba_fix_calib_tolerance = "0";
std::string ba_frequency = "1";
std::string launch_viewer_or_not = "1";
std::string view_sphere_or_not = "0";
What am i missing? Thank you!