资源简介
三维重建中八点算法的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控制仿真
评论
共有 条评论