資源簡介
用于旋轉三維重建原理馬頌德 P73業。由已知對應圖像點(u1, v1),(u2, v2)和投影矩陣m1, m2求相應三維點。
%the function is used to reconstruct three dimension of the points
%u1,v1 is the computer image coordinate in the first image.
%u2,v2 is the computer image coordinate in the second image.
%u1,v1,u2,v2 must be the same dimension
%m1 is the projection matrix of the first camera
%m2 is the projection matrix of the second camera
%write by XiQing.Qi oct.20 2006
%the function is used to reconstruct three dimension of the points
%u1,v1 is the computer image coordinate in the first image.
%u2,v2 is the computer image coordinate in the second image.
%u1,v1,u2,v2 must be the same dimension
%m1 is the projection matrix of the first camera
%m2 is the projection matrix of the second camera
%write by XiQing.Qi oct.20 2006
代碼片段和文件信息
%三維重建畫圖關鍵:角點與側面點分開畫,不同的側面也分開畫。
V3D1=load(‘NV3D1.txt‘);
V3D2=load(‘NV3D2.txt‘);
V3D3=load(‘NV3D3.txt‘);????????????????????????????????????%讀取三維點坐標
V3D4=load(‘NV3D4.txt‘);
%V3D1=reshape(V3D11370);
V3D=[V3D1(1:)V3D2(1:)V3D3(1:)V3D4(1:);V3D1(2:)V3D2(2:)V3D3(2:)V3D4(2:);V3D1(3:)V3D2(3:)V3D3(3:)V3D4(3:)];
figure(1);
plot3([V3D(11)V3D(117)][V3D(21)V3D(217)][V3D(31)V3D(317)]);
%axis(axis);
hold?on;
for?m=1:15?%分開畫圖的原因是plot3畫圖非智能,可能從一個側面連到另一個側面。
???????????%分開的原則是每一個分開項都是一個獨立的側面。分開的臨界是角點等。?
???plot3([V3D(1m)V3D(1m+1)][V3D(2m)V3D(2m+1)][V3D(3m)V3D(3m+1)]);
????
end;
for?m=17:33
???plot3([V3D(1m)V3D(1m+1)][V3D(2m)V3D(2m+1)][V3D(3m)V3D(3m+1)]);
????
end;
for?m=36:52
???plot3([V3D(1m)V3D(1m+1)][V3D(2m)V3D(2m+1)][V3D(3m)V3D(3m+1)]);
????
end;
for?m=54:57
???plot3([V3D(1m)V3D(1m+1)][V3D(2m)V3D(2m+1)][V3D(3m)V3D(3m+1)]);
????
end;
for?m=59:62
???plot3([V3D(1m)V3D(1m+1)][V3D(2m)V3D(2m+1)][V3D(3m)V3D(3m+1)]);
????
end;
for?m=64:80
???plot3([V3D(1m)V3D(1m+1)][V3D(2m)V3D(2m+1)][V3D(3m)V3D(3m+1)]);
????
end;
for?m=82:96
???plot3([V3D(1m)V3D(1m+1)][V3D(2m)V3D(2m+1)][V3D(3m)V3D(3m+1)]);
????
end;
for?m=99:114
???plot3([V3D(1m)V3D(1m+1)][V3D(2m)V3D(2m+1)][V3D(3m)V3D(3m+1)]);
????
end;
for?m=116:117
???plot3([V3D(1m)V3D(1m+1)][V3D(2m)V3D(2m+1)][V3D(3m)V3D(3m+1)]);
????
end;
for?m=119:122
???plot3([V3D(1m)V3D(1m+1)][V3D(2m)V3D(2m+1)][V3D(3m)V3D(3m+1)]);
????
end;
%角點
?plot3([V3D(117)V3D(135)][V3D(217)V3D(235)][V3D(317)V3D(335)]);
?plot3([V3D(135)V3D(136)][V3D(235)V3D(236)][V3D(335)V3D(336)]);
?plot3([V3D(164)V3D(182)][V3D(264)V3D(282)][V3D(364)V3D(382)]);
?plot3([V3D(182)V3D(198)][V3D(282)V3D(298)][V3D(382)V3D(398)]);
?plot3([V3D(198)V3D(199)][V3D(298)V3D(299)][V3D(398)V3D(399)]);
?plot3([V3D(11)V3D(164)][V3D(21)V3D(264)][V3D(31)V3D(364)]);
?plot3([V3D(136)V3D(199)][V3D(236)V3D(299)][V3D(336)V3D(399)]);
?plot3([V3D(153)V3D(1115)][V3D(253)V3D(2115)][V3D(353)V3D(3115)]);
?plot3([V3D(154)V3D(1118)][V3D(254)V3D(2118)][V3D(354)V3D(3118)]);
?plot3([V3D(116)V3D(153)][V3D(216)V3D(253)][V3D(316)V3D(353)]);
?plot3([V3D(181)V3D(1116)][V3D(281)V3D(2116)][V3D(381)V3D(3116)]);
?plot3([V3D(116)V3D(181)][V3D(216)V3D(281)][V3D(316)V3D(381)]);
?plot3([V3D(159)V3D(1123)][V3D(259)V3D(2123)][V3D(359)V3D(3123)]);
?plot3([V3D(163)V3D(1119)][V3D(263)V3D(2119)][V3D(363)V3D(3119)]);
?plot3([V3D(1124)V3D(1137)][V3D(2124)V3D(2137)][V3D(3124)V3D(3137)]);
?for?m=124:137
???plot3([V3D(1m)V3D(1m+1)][V3D(2m)V3D(2m+1)][V3D(3m)V3D(3m+1)]);
????
end;
for?m=146:149
???plot3([V3D(1m)V3D(1m+1)][V3D(2m)V3D(2m+1)][V3D(3m)V3D(3m+1)]);
????
end;
%plot3(point1point3);
%plot3(point1point5);
%plot3(point6
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????3349??2009-08-05?10:56??3三維重建程序\clock_reconstruction.m
?????文件???????2085??2009-08-06?11:12??3三維重建程序\epilior_point.m
?????文件???????2016??2007-10-10?19:44??3三維重建程序\getm.m
?????文件????????556??2007-10-10?13:47??3三維重建程序\jidianxianshi.m
?????文件???????3030??2007-04-08?12:13??3三維重建程序\NV3D1.txt
?????文件???????2886??2007-04-08?12:36??3三維重建程序\NV3D2.txt
?????文件???????1062??2007-04-08?12:53??3三維重建程序\NV3D3.txt
?????文件????????246??2007-04-08?12:58??3三維重建程序\NV3D4.txt
?????文件???????2146??2009-08-06?15:23??3三維重建程序\RE.m
?????文件???????1729??2009-08-06?14:34??3三維重建程序\Reconstructn.m
?????文件???????1811??2007-09-22?15:48??3三維重建程序\self_box.m
?????文件???????3698??2007-10-20?16:43??3三維重建程序\showbox.m
?????文件????????883??2009-08-06?15:48??3三維重建程序\showclock.m
?????文件?????????18??2009-10-30?19:54??3三維重建程序\說明.txt
?????目錄??????????0??2009-10-30?19:54??3三維重建程序
-----------?---------??----------?-----??----
????????????????25515????????????????????15
- 上一篇:開源tinyxm
l - 下一篇:ipv6網絡抓包程序
評論
共有 條評論