資源簡介
三維重建中八點算法的MATLAB實現,通過45個圖像中的點以及相機參數恢復三維坐標

代碼片段和文件信息
%demo?code?designed?for?cs?551YM?HW4
%initialization
close?all;
clear?all;
%load?the?data?file.?The?feature?points?on?the?two?images
%are?stored?in?3?by?45?matrices?x1?and?x2.?There?are?45?
%feature?points?on?each?image.?Each?column?of?the?two?matrices
%is?a?point?in?image?coordinate?(using?homogenous?coordinate
%representation).?The?corresponding?two?columns?in?two?matrices
%are?corresponding?points.?The?3x3?calibration?matrix?is?stored
%in?the?matrix?called?Calib.
load(‘cube_data.mat‘);
%show?the?images?and?the?feature?points
figure;
I1?=?imread(‘1.jpg‘);
image(I1);
hold?on;
plot(x1(1:)x1(2:)‘dr‘);
figure;
I2?=?imread(‘2.jpg‘);
image(I2);
hold?on;
plot(x2(1:)x2(2:)‘dr‘);
%%you?need?to?finish?the?following?function?to?recontruct?the?3-D
%%coordinates?of?all?the?45?feature?points.
[X1?X2]=recover3dCoordinates(x1x2Calib);
%%show?the?reconstruction?resuld?in?3D
figure;
plot3(X1(1:)X1(2:)X1(3:)‘d‘);
axis?equal;
figure;
plot3(X2(1:)X2(2:)X2(3:)‘d‘);
axis?equal;
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-04-30?12:35??yingying-zhang-hw4-CV15\
?????文件???????53485??2015-04-29?15:50??yingying-zhang-hw4-CV15\1.jpg
?????文件???????53529??2015-04-30?12:35??yingying-zhang-hw4-CV15\2.jpg
?????文件????????2536??2015-04-29?15:54??yingying-zhang-hw4-CV15\cube_data.mat
?????文件????????1040??2015-04-29?15:54??yingying-zhang-hw4-CV15\Demo.m
?????文件????????2572??2015-04-30?12:21??yingying-zhang-hw4-CV15\recover3dCoordinates.m
?????文件???????94662??2015-04-30?12:33??yingying-zhang-hw4-CV15\yingying-zhang-hw4-CV15.pdf
- 上一篇:直流潮流程序,有用的
- 下一篇:基于simuli
nk的并網逆變器PQ控制仿真
評論
共有 條評論