-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcam_calib.m
48 lines (42 loc) · 1.18 KB
/
cam_calib.m
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
% TEAPOT
% LEFT CAMERA
%-- Focal length:
fc = [ 1843.463722950638200 ; 1831.060188472588600 ];
camL.f = fc(1);
%-- Principal point:
cc = [ 1457.180947340274300 ; 907.728368229318560 ];
camL.c = cc';
%-- Image #1:
omc_1 = [ 1.879510e+00 ; 1.687184e+00 ; 1.901256e-01 ];
camL.t = [ -8.540793e+02 ; -2.157167e+01 ; 2.936587e+03 ];
% omc_error_1 = [ 2.213462e-02 ; 1.969724e-02 ; 3.010863e-02 ];
% Tc_error_1 = [ 9.032617e+01 ; 8.023056e+01 ; 5.330009e+01 ];
camL.R = rodrigues(omc_1);
% camL.R
%
% ans =
%
% -0.7506 -0.4176 0.5121
% -0.6608 0.4737 -0.5822
% 0.0006 -0.7753 -0.6315
%%
% RIGHT CAMERA
%-- Focal length:
fc = [ 1834.982566594790100 ; 1840.126401445344300 ];
camR.f = fc(1);
%-- Principal point:
cc = [ 1463.788543422015700 ; 991.790475398290940 ];
camR.c = cc';
%-- Image #1:
omc_1 = [ 2.109946e+00 ; 2.179564e+00 ; -5.337366e-01 ];
Tc_1r = [ -2.297558e+02 ; -1.820600e+02 ; 3.346794e+03 ];
omc_error_1 = [ 1.051293e-02 ; 1.481943e-02 ; 3.078384e-02 ];
Tc_error_1 = [ 6.178080e+01 ; 5.312910e+01 ; 4.566885e+01 ];
camR.R = rodrigues(omc_1);
% camR.R
%
% ans =
%
% -0.0605 0.9792 -0.1937
% 0.9579 0.0024 -0.2871
% -0.2806 -0.2029 -0.9381