資源簡介
一套關于sfm三維重建的代碼,是基于matlab的,親測能運行,無需進行相機標定,能實現三維稠密重建,有注釋。

代碼片段和文件信息
function?F?=?algoEightPoints(pts1hom?pts2hom)
%?Normalize?the?points
num?=?size(pts1hom?2);
[pts1hom?t1]?=?normalize_pts(pts1hom?2?true);
[pts2hom?t2]?=?normalize_pts(pts2hom?2?true);
A?=?zeros(num9);
pts1hom?=?pts1hom‘;
pts2hom?=?pts2hom‘;
for?i?=?1:num
????A(i:)?=?[pts2hom(i1)*[pts1hom(i1)pts1hom(i2)1]pts2hom(i2)*[pts1hom(i1)pts1hom(i2)1][pts1hom(i1)pts1hom(i2)1]];
end
%?SVD?on?matrix?A?for?solving?Af?=?0
[~~v]?=?svd(A);
f?=?v(:9);
%?Reshape?vector?f?to?the?3*3?fundamental?matrix?F
F?=?reshape(f[33])‘;
%?SVD?on?fundamental?matrix?F
[u2s2v2]?=?svd(F);
F?=?u2*diag([110])*s2*v2‘;
%?Denormalize
F?=?t2‘?*?F?*?t1;
F?=?F?/?norm(F);
if?F(end)?0
??F?=?-F;
end
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????707??2018-08-27?13:52??3D-Reconstruction\algoEightPoints.m
?????文件????????859??2018-08-27?13:52??3D-Reconstruction\estimateFundamentalMatrixWithRANSAC.m
?????文件????????438??2018-08-27?13:52??3D-Reconstruction\estimateProjectionMatrix.m
?????文件????????899??2018-08-27?13:52??3D-Reconstruction\harrisDetector.m
?????文件?????647655??2018-08-27?13:52??3D-Reconstruction\img\firstImage.JPG
????.......???1397060??2018-08-27?13:52??3D-Reconstruction\img\mineigen.png
?????文件?????661796??2018-08-27?13:52??3D-Reconstruction\img\secondImage.JPG
?????文件???????3375??2018-11-05?19:49??3D-Reconstruction\main.m
?????文件????????376??2018-08-27?13:52??3D-Reconstruction\matchFeaturePoints.m
?????文件????????829??2018-08-27?13:52??3D-Reconstruction\matchFeaturePointsSAD.m
?????文件???????1124??2018-08-27?13:52??3D-Reconstruction\normalize_pts.m
????.......???????379??2018-08-27?13:52??3D-Reconstruction\README.md
?????文件????????654??2018-08-27?13:52??3D-Reconstruction\triangualation.m
?????目錄??????????0??2018-08-27?13:52??3D-Reconstruction\img
?????目錄??????????0??2018-11-05?19:51??3D-Reconstruction
-----------?---------??----------?-----??----
??????????????2716151????????????????????15
- 上一篇:Matlab在語音信號處理中的應用
- 下一篇:基于MATLAB的數字調制系統仿真設計
評論
共有 條評論