1 | ==================== GENERAL ==================== |
---|
2 | This directory contains eucsbademo, an example of using sba for Euclidean bundle adjustment. |
---|
3 | Refer to ICS/FORTH TR-340 for documentation on sba. eucsbademo accepts 3 file names as arguments: |
---|
4 | They are the initial estimates for the camera motion parameters, the initial estimates for |
---|
5 | the 3D point parameters along with the 3D points image projections and the camera intrinsic |
---|
6 | calibration parameters. The file for the camera motion parameters has a separate line for |
---|
7 | every camera, each line containing 7 parameters (a 4 element quaternion for rotation and a |
---|
8 | 3 element vector for translation). The file for 3D points and image projections is made up |
---|
9 | of lines of the form |
---|
10 | |
---|
11 | X Y Z NFRAMES FRAME0 x0 y0 FRAME1 x1 y1 ... |
---|
12 | |
---|
13 | each corresponding to a single 3D point. X Y Z are the points' Euclidean 3D coordinates, |
---|
14 | NFRAMES the total number of images in which the points' projections are available and each |
---|
15 | of the NFRAMES subsequent triplets FRAME x y pecifies that the 3D point in question projects |
---|
16 | to pixel x y in image FRAME. For example, the line |
---|
17 | |
---|
18 | 100.0 200.0 300.0 3 2 270.0 114.1 4 234.2 321.7 5 173.6 425.8 |
---|
19 | |
---|
20 | specifies the 3D point (100.0, 200.0, 300.0) projecting to the 3 points (270.0, 114.1), |
---|
21 | (234.2, 321.7) and (173.6, 425.8) in images 2, 4 and 5 respectively. Camera and 3D point |
---|
22 | indices count from 0. |
---|
23 | |
---|
24 | ==================== FILES ==================== |
---|
25 | eucsbademo.c: main demo program |
---|
26 | readparams.c: functions to read the initial motion and structure estimates from text files |
---|
27 | imgproj.c: functions to estimate the projection on a given camera of a certain 3D point. Also |
---|
28 | includes code for evaluating the corresponding jacobian |
---|
29 | eucsbademo.h: function prototypes |
---|
30 | |
---|
31 | calib.txt: intrinsic calibration matrix for the employed camera |
---|
32 | |
---|
33 | 7cams.txt: initial motion parameters for a test case involving 7 cameras |
---|
34 | 7pts.txt: initial structure parameters for a test case involving 7 cameras |
---|
35 | |
---|
36 | 9cams.txt: initial motion parameters for a test case involving 9 cameras |
---|
37 | 9pts.txt: initial structure parameters for a test case involving 9 cameras |
---|
38 | |
---|
39 | 54cams.txt: initial motion parameters for a test case involving 54 cameras |
---|
40 | 54pts.txt: initial structure parameters for a test case involving 54 cameras |
---|
41 | |
---|
42 | ==================== COMPILING ==================== |
---|
43 | The demo program should be compiled during sba's compilation |
---|
44 | |
---|
45 | ==================== SAMPLE RUNS ==================== |
---|
46 | The command |
---|
47 | eucsbademo 7cams.txt 7pts.txt calib.txt |
---|
48 | produces the following output: |
---|
49 | SBA using 465 3D pts, 7 frames and 1916 image projections |
---|
50 | |
---|
51 | Method BA_MOTSTRUCT, expert driver, analytic jacobian |
---|
52 | |
---|
53 | SBA returned 20 in 20 iter, reason 2, error 0.675396 [initial 19.0947] |
---|
54 | Elapsed time: 0.50 seconds, 500.00 msecs |
---|
55 | |
---|
56 | |
---|
57 | For the 9 cameras case, |
---|
58 | eucsbademo 9cams.txt 9pts.txt calib.txt |
---|
59 | produces |
---|
60 | SBA using 559 3D pts, 9 frames and 2422 image projections |
---|
61 | |
---|
62 | Method BA_MOTSTRUCT, expert driver, analytic jacobian |
---|
63 | |
---|
64 | SBA returned 22 in 22 iter, reason 2, error 0.619559 [initial 8.17604] |
---|
65 | Elapsed time: 0.69 seconds, 690.00 msecs |
---|
66 | |
---|
67 | |
---|
68 | For the 54 cameras case, |
---|
69 | eucsbademo 54cams.txt 54pts.txt calib.txt |
---|
70 | produces |
---|
71 | SBA using 5207 3D pts, 54 frames and 24609 image projections, 15999 variables |
---|
72 | |
---|
73 | Method BA_MOTSTRUCT, expert driver, analytic jacobian |
---|
74 | |
---|
75 | SBA returned 23 in 23 iter, reason 2, error 0.176473 [initial 2.14707] |
---|
76 | Elapsed time: 13.56 seconds, 13560.00 msecs |
---|
77 | |
---|
78 | |
---|
79 | Send your comments/questions to lourakis@ics.forth.gr |
---|