一套关于sfm三维重建的代码,是基于matlab的,亲测能运行,无需进行相机标定,能实现三维稠密重建,有注释。
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 707 2018-08-27 13:52 3D-ReconstructionalgoEightPoints.m
文件 859 2018-08-27 13:52 3D-ReconstructionestimateFundamentalMatrixWithRANSAC.m
文件 438 2018-08-27 13:52 3D-ReconstructionestimateProjectionMatrix.m
文件 899 2018-08-27 13:52 3D-ReconstructionharrisDetector.m
文件 647655 2018-08-27 13:52 3D-ReconstructionimgfirstImage.JPG
....... 1397060 2018-08-27 13:52 3D-Reconstructionimgmineigen.png
文件 661796 2018-08-27 13:52 3D-ReconstructionimgsecondImage.JPG
文件 3375 2018-11-05 19:49 3D-Reconstructionmain.m
文件 376 2018-08-27 13:52 3D-ReconstructionmatchFeaturePoints.m
文件 829 2018-08-27 13:52 3D-ReconstructionmatchFeaturePointsSAD.m
文件 1124 2018-08-27 13:52 3D-Reconstruction
ormalize_pts.m
....... 379 2018-08-27 13:52 3D-ReconstructionREADME.md
文件 654 2018-08-27 13:52 3D-Reconstruction riangualation.m
目录 0 2018-08-27 13:52 3D-Reconstructionimg
目录 0 2018-11-05 19:51 3D-Reconstruction
----------- --------- ---------- ----- ----
2716151 15
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-ReconstructionalgoEightPoints.m
文件 859 2018-08-27 13:52 3D-ReconstructionestimateFundamentalMatrixWithRANSAC.m
文件 438 2018-08-27 13:52 3D-ReconstructionestimateProjectionMatrix.m
文件 899 2018-08-27 13:52 3D-ReconstructionharrisDetector.m
文件 647655 2018-08-27 13:52 3D-ReconstructionimgfirstImage.JPG
....... 1397060 2018-08-27 13:52 3D-Reconstructionimgmineigen.png
文件 661796 2018-08-27 13:52 3D-ReconstructionimgsecondImage.JPG
文件 3375 2018-11-05 19:49 3D-Reconstructionmain.m
文件 376 2018-08-27 13:52 3D-ReconstructionmatchFeaturePoints.m
文件 829 2018-08-27 13:52 3D-ReconstructionmatchFeaturePointsSAD.m
文件 1124 2018-08-27 13:52 3D-Reconstruction
ormalize_pts.m
....... 379 2018-08-27 13:52 3D-ReconstructionREADME.md
文件 654 2018-08-27 13:52 3D-Reconstruction riangualation.m
目录 0 2018-08-27 13:52 3D-Reconstructionimg
目录 0 2018-11-05 19:51 3D-Reconstruction
----------- --------- ---------- ----- ----
2716151 15
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)