-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.m
More file actions
48 lines (28 loc) · 630 Bytes
/
main.m
File metadata and controls
48 lines (28 loc) · 630 Bytes
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
clear all
close all
debugr=1;
debugl=1;
D=imread('droitef.png');
G=imread('gauchef.png');
N=12;%nombre de point de calibration
%Image Droite
[X2dr,X3dr] = calibD(D,debugr,N);
Pr=DLT(X3dr,X2dr);
%test DLT
errDLT(Pr,X3dr,X2dr,N,D);
%Image Gauche
[X2dl,X3dl] = calibG(G,debugl,N);
Pl=DLT(X3dl,X2dl);
%test DLT
errDLT(Pl,X3dl,X2dl,N,G);
%triangulation
Mr=X2dr(1,:);
Ml=X2dl(1,:);
Mr=Mr';
Ml=Ml';
M = triangulat(Pr,Pl,Mr,Ml);
M = round(M/M(end));
%Decomposition RQ
[K,Rt]=RQ(Pr(:,1:3));
K=K./K(3,3);
K(1,2)=0; %scew negligeable