⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_11_9.m

📁 包括计算机科学和工程、信号处理、物理学、应用数学和统计学
💻 M
字号:
% Example for alg. 11.9  "An introduction to 3-D Vision"
% by Y. Ma, S. Soatto, J. Kosecka, S. Sastry (MASKS)
% Code distributed free for non-commercial use
% Copyright (c) MASKS, 2003

% Projective rectification example
% Given fundamental matrix between two views compute 
% warping homographies H1, H2 for both views.
% See step-by-step.m for use in an example.
% May 2003, Jana Kosecka, George Mason University
% ================================================

% loads x1, x2 and F
load rectifData;

im0 = imread('oldhouse2/A2000000.bmp');
im1 = imread('oldhouse2/A2000084.bmp');
[ydim, xdim] = size(im0);

[H1, H2] = projRectify(F,x1, x2, xdim, ydim)
 Tr = [1 0 -xdim/2; 0 1 -ydim/2 ; 0 0 1]; 
 H1 = inv(Tr)*H1;
 H2 = inv(Tr)*H2;
 xim1r = project(H1*x1);
 xim2r = project(H2*x2);
 [im0w, xi0, yi0] = Hwarp(H1, im0); 
 [im1w, xi1, yi1] = Hwarp(H2, im1);
 figure;
 imagesc(im0w); colormap gray; hold on; axis image;
 figure; 
 imagesc(im1w); colormap gray; hold on; axis image;
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -