forked from Rob2048/VectorONE
-
Notifications
You must be signed in to change notification settings - Fork 1
/
volume calibration process.txt
64 lines (48 loc) · 2.37 KB
/
volume calibration process.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Volume & camera calibration.
---------------------------------------------------------------------------------------
Build 2D markers.
---------------------------------------------------------------------------------------
- Undistort with pre calibrated K, D(k1, k2, p1, p2).
- Clip to view bounds. (Maybe not required? - depends on distortion issues).
Phase 1 - Build rough extrinsic parameters.
---------------------------------------------------------------------------------------
- For each camera & root camera pair:
- Find corresponding points.
- Look for frames that have a single 2D marker across all cameras and assume a match.
(Closest point match should remove outliers)
- Find fundamental matrix using Levenberg-Marquardt.
- Epiline errors may be useful to minimize sync video error.
- Essential matrix = Kt * fMat * K.
- Recover R,t for second camera in pair relative to first.
- Uses faux focal length and principal point.
- t is unit vector, needs to be scaled.
- Calculate camera matrices.
- Pairwise triangulate 3D markers.
- Build scale value by comparing 3D markers to root pair markers.
- Scale t by scale value.
- Calculate camera matrices.
- Output: Need R, t - relative to world 0,0,0 (Root camera).
Phase 2 - Create refined extrinsic & intrinsic parameters.
---------------------------------------------------------------------------------------
- Inputs: K, R, t, D(k1, k2, p1, p2)
- Bundle adjust.
- Outputs: K', R', t', D(k1, k2, p1, p2)'
Calculate camera matrices.
---------------------------------------------------------------------------------------
- Inputs: K, R, t
Cw (Camera world matrix) = [R|(-Rt * t)]
Pu (Camera unit projection matrix) = [R|t]
P (Camera projection matrix) = K[R|t]
Build 3D markers.
---------------------------------------------------------------------------------------
Assumes no distortion.
- Inputs: K, W
- Build 2D marker rays in world space.
- CSR(camera space ray direction) = Kinv[vec3(undistorted point pixel coords,1)]
- WSR(world space ray direction) = W * vec4(CSR,0)
- WSO(world space ray origin) = W * vec4(0,0,0,1)
- Find corresponding rays.
- A: Match 2D marker rays in undistorted camera space using pixel distance.
- Project ray into camera space. P projects world to undistorted camspace.
- B: Match 2D marker rays in world space using world unit distance.
- Find closest point between corresponding rays.