Skip to content

Instantly share code, notes, and snippets.

@Meekohi
Created January 23, 2014 19:43
Show Gist options
  • Select an option

  • Save Meekohi/8585446 to your computer and use it in GitHub Desktop.

Select an option

Save Meekohi/8585446 to your computer and use it in GitHub Desktop.
Incremental reconstruction
Perform incremental SfM (Initial Pair Essential + Resection).
Track building
Track filtering
Track filtering : min occurence
42 Tracks will be removed
Track export to internal struct
Track stats
------------------
-- Tracks Stats --
Tracks number: 1899
Images Id:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
------------------
TrackLength, Occurrence
2 1716
3 154
4 21
5 8
---------------------------------------------------
IncrementalReconstructionEngine::InitialPairChoice
---------------------------------------------------
The best F matrix validated pair are displayed
Choose one pair manually by typing the two integer indexes
---------------------------------------------------
(3,4) 530 matches
(9,10) 460 matches
(0,1) 408 matches
(7,8) 175 matches
(2,4) 102 matches
(5,6) 99 matches
(1,2) 91 matches
(3,6) 82 matches
(0,2) 73 matches
(2,3) 66 matches
type INITIAL pair Indexes: X enter Y enter
3
6
Putative starting pair is: (3,6)
nfa=-27.487 inliers=60 precisionNormalized=88838.5 precision=88838.5 (iter=0,sample=14,18,27,41,54,)
nfa=-45.9625 inliers=66 precisionNormalized=57227.6 precision=57227.6 (iter=1,sample=45,22,30,16,28,)
nfa=-46.1826 inliers=66 precisionNormalized=56284.6 precision=56284.6 (iter=6,sample=23,33,9,49,17,)
nfa=-55.3175 inliers=66 precisionNormalized=28241.3 precision=28241.3 (iter=7,sample=22,21,40,54,6,)
nfa=-75.2153 inliers=66 precisionNormalized=6287.79 precision=6287.79 (iter=13,sample=35,0,43,38,65,)
nfa=-76.9787 inliers=47 precisionNormalized=52.2045 precision=52.2045 (iter=15,sample=29,12,48,15,44,)
nfa=-77.1374 inliers=48 precisionNormalized=69.182 precision=69.182 (iter=144,sample=46,20,0,37,61,)
nfa=-81.2458 inliers=48 precisionNormalized=44.5559 precision=44.5559 (iter=297,sample=0,46,8,52,50,)
-- Robust Essential Matrix estimation
-- 66 / 48 tentative/inliers
-- Threshold: 44.5559
bundlerHelp::estimate_Rt_fromE
Number of points in front of both cameras:5 43 0 0
-- Rotation|Translation matrices: --
-0.820225 0.571403 0.0270038
0.571449 0.82061 -0.00675284
-0.0260182 0.00989245 -0.999613
-0.988477
0.150882
-0.0121312
SfMRobust::triangulate2View_Vector
-- Residual min max -- 1.48567e-07 720.082
--Triangulated 3D points count: 48
--Triangulated 3D points count under threshold: 43
--Putative correspondences: 66
=========================
MSE Residual InitialPair Inlier:
IncrementalReconstructionEngine::ComputeResidualsMSE.
-- nbTracks: 43
-- Residual min: 1.44437e-07
-- Residual median: 1.48969
-- Residual max: 3.4448
-- Residual mean: 1.44885
1.44885
=========================
---------------------------------
-- BUNDLE ADJUSTMENT --
---------------------------------
nbCams: 2
nbIntrinsics:2
nbPoints3D: 43
measurements: 86
Ceres Solver Report
-------------------
Original Reduced
Parameter blocks 47 46
Parameters 153 147
Residual blocks 86 86
Residual 172 172
Minimizer TRUST_REGION
Trust region strategy LEVENBERG_MARQUARDT
Given Used
Linear solver ITERATIVE_SCHUR ITERATIVE_SCHUR
Preconditioner SCHUR_JACOBI SCHUR_JACOBI
Threads 1 1
Linear solver threads 1 1
Linear solver ordering AUTOMATIC 43, 3
Cost:
Initial 1.292108e+02
Final 2.818661e+01
Change 1.010242e+02
Minimizer iterations 50
Successful steps 40
Unsuccessful steps 10
Time (in seconds):
Preprocessor 0.000
Residual evaluation 0.000
Jacobian evaluation 0.004
Linear solver 0.016
Minimizer 0.021
Postprocessor 0.000
Total 0.021
Termination: NO_CONVERGENCE
Bundle Adjustment statistics:
Initial RMSE: 0.866733
Final RMSE: 0.404816
for camera Idx=[0]:
focal: 4.58684
ppx: 2013.32
ppy: 1464.28
k1: -3.22153e-07
k2: -7.26323e-13
k3: 1.27583e-17
for camera Idx=[1]:
focal: 5.29071
ppx: 1863.36
ppy: 1490.39
k1: -7.81604e-07
k2: 3.53526e-12
k3: -1.92641e-17
TEMPORARY return only the best image
-------------------------------
-- Resection of camera index: 4
-------------------------------
Tracks in: 4
576
Reconstructed tracks:
43
Tracks Valid for resection:
29
nfa=13.0273 inliers=4 precisionNormalized=343082 precision=2413.22 (iter=0,sample=3,12,16,)
nfa=6.92953 inliers=4 precisionNormalized=0.273905 precision=2.15624 (iter=0,sample=3,12,16,)
nfa=5.42047 inliers=4 precisionNormalized=0.00848301 precision=0.379465 (iter=0,sample=3,12,16,)
nfa=5.1211 inliers=4 precisionNormalized=0.00425766 precision=0.268833 (iter=2,sample=2,23,28,)
nfa=4.14373 inliers=4 precisionNormalized=0.000448539 precision=0.0872564 (iter=2,sample=2,23,28,)
nfa=3.92806 inliers=4 precisionNormalized=0.000272982 precision=0.0680714 (iter=3,sample=2,22,26,)
nfa=3.92212 inliers=4 precisionNormalized=0.000269273 precision=0.0676073 (iter=12,sample=12,22,26,)
nfa=3.8609 inliers=4 precisionNormalized=0.000233873 precision=0.0630067 (iter=35,sample=0,4,26,)
nfa=3.84288 inliers=4 precisionNormalized=0.000224363 precision=0.0617125 (iter=77,sample=3,4,26,)
nfa=3.68067 inliers=4 precisionNormalized=0.000154433 precision=0.0511997 (iter=143,sample=5,25,28,)
nfa=3.66027 inliers=4 precisionNormalized=0.00014735 precision=0.0500117 (iter=346,sample=3,25,28,)
nfa=3.59881 inliers=4 precisionNormalized=0.000127904 precision=0.0465951 (iter=448,sample=0,25,28,)
nfa=3.50532 inliers=4 precisionNormalized=0.000103133 precision=0.0418404 (iter=954,sample=13,14,28,)
nfa=3.36748 inliers=4 precisionNormalized=7.50852e-05 precision=0.0357005 (iter=1281,sample=6,7,26,)
-------------------------------
-- Robust Resection of camera index: 4
-- Resection status: 0
-- Nb points used for Resection: 29
-- Nb points validated by robust Resection: 0
-- Threshold: 7.50852e-05
-------------------------------
Resection of image: 4 was not possible
TEMPORARY return only the best image
-------------------------------
-- Resection of camera index: 5
-------------------------------
Tracks in: 5
203
Reconstructed tracks:
43
Tracks Valid for resection:
20
nfa=9.36342 inliers=4 precisionNormalized=557.704 precision=97.2969 (iter=0,sample=4,6,8,)
nfa=7.07435 inliers=4 precisionNormalized=2.8664 precision=6.97534 (iter=0,sample=4,6,8,)
nfa=6.56402 inliers=4 precisionNormalized=0.885122 precision=3.87613 (iter=1,sample=0,2,13,)
nfa=2.95159 inliers=4 precisionNormalized=0.00021606 precision=0.0605598 (iter=2,sample=1,16,17,)
nfa=2.17812 inliers=4 precisionNormalized=3.64008e-05 precision=0.0248572 (iter=4,sample=10,13,17,)
nfa=1.45228 inliers=4 precisionNormalized=6.84339e-06 precision=0.0107779 (iter=52,sample=11,12,19,)
nfa=1.30315 inliers=4 precisionNormalized=4.85438e-06 precision=0.00907746 (iter=69,sample=4,8,19,)
nfa=1.23566 inliers=4 precisionNormalized=4.15573e-06 precision=0.00839887 (iter=266,sample=8,9,17,)
nfa=1.11931 inliers=4 precisionNormalized=3.17904e-06 precision=0.00734591 (iter=305,sample=8,14,19,)
-------------------------------
-- Robust Resection of camera index: 5
-- Resection status: 0
-- Nb points used for Resection: 20
-- Nb points validated by robust Resection: 0
-- Threshold: 3.17904e-06
-------------------------------
Resection of image: 5 was not possible
TEMPORARY return only the best image
-------------------------------
-- Resection of camera index: 7
-------------------------------
Tracks in: 7
212
Reconstructed tracks:
43
Tracks Valid for resection:
15
nfa=10.2984 inliers=4 precisionNormalized=24146.9 precision=640.217 (iter=0,sample=2,11,13,)
nfa=5.49206 inliers=4 precisionNormalized=0.377121 precision=2.5301 (iter=0,sample=2,11,13,)
nfa=5.48423 inliers=4 precisionNormalized=0.370382 precision=2.50739 (iter=4,sample=9,11,14,)
nfa=5.15067 inliers=4 precisionNormalized=0.171827 precision=1.70782 (iter=4,sample=9,11,14,)
nfa=5.02232 inliers=4 precisionNormalized=0.12786 precision=1.47321 (iter=7,sample=4,10,13,)
nfa=5.00437 inliers=4 precisionNormalized=0.122683 precision=1.44308 (iter=11,sample=1,2,9,)
nfa=4.30483 inliers=4 precisionNormalized=0.0245047 precision=0.644945 (iter=44,sample=7,10,11,)
nfa=3.56768 inliers=4 precisionNormalized=0.00448847 precision=0.276024 (iter=78,sample=2,6,12,)
nfa=3.48883 inliers=4 precisionNormalized=0.00374326 precision=0.252071 (iter=87,sample=2,3,12,)
nfa=3.40315 inliers=4 precisionNormalized=0.00307303 precision=0.228392 (iter=548,sample=5,9,14,)
-------------------------------
-- Robust Resection of camera index: 7
-- Resection status: 0
-- Nb points used for Resection: 15
-- Nb points validated by robust Resection: 0
-- Threshold: 0.00307303
-------------------------------
Resection of image: 7 was not possible
TEMPORARY return only the best image
-------------------------------
-- Resection of camera index: 0
-------------------------------
Tracks in: 0
448
Reconstructed tracks:
43
Tracks Valid for resection:
0
Resection of image: 0 was not possible
TEMPORARY return only the best image
-------------------------------
-- Resection of camera index: 1
-------------------------------
Tracks in: 1
449
Reconstructed tracks:
43
Tracks Valid for resection:
0
Resection of image: 1 was not possible
TEMPORARY return only the best image
-------------------------------
-- Resection of camera index: 2
-------------------------------
Tracks in: 2
249
Reconstructed tracks:
43
Tracks Valid for resection:
0
Resection of image: 2 was not possible
TEMPORARY return only the best image
-------------------------------
-- Resection of camera index: 8
-------------------------------
Tracks in: 8
222
Reconstructed tracks:
43
Tracks Valid for resection:
0
Resection of image: 8 was not possible
TEMPORARY return only the best image
-------------------------------
-- Resection of camera index: 9
-------------------------------
Tracks in: 9
460
Reconstructed tracks:
43
Tracks Valid for resection:
0
Resection of image: 9 was not possible
TEMPORARY return only the best image
-------------------------------
-- Resection of camera index: 10
-------------------------------
Tracks in: 10
460
Reconstructed tracks:
43
Tracks Valid for resection:
0
Resection of image: 10 was not possible
-------------------------------
-- Structure from Motion (statistics):
-- #Camera calibrated: 2 from 11 input images.
-- #Tracks, #3D points: 43
-------------------------------
IncrementalReconstructionEngine::ComputeResidualsMSE.
-- nbTracks: 43
-- Residual min: 0.0238509
-- Residual median: 0.537457
-- Residual max: 2.16696
-- Residual mean: 0.656092
Histogram of residuals:
0 | 19
0.214 | 17
0.429 | 15
0.643 | 10
0.857 | 13
1.07 | 3
1.29 | 5
1.5 | 1
1.71 | 1
1.93 | 1
2.17
Ac-Sfm took : 0 seconds.
Compute and export colorized point cloud
Export 3D scene to openMVG format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment