资源简介
多幅图像拼接matlab实现 sift特征提取、描述、匹配、RANSAC、仿射变换

代码片段和文件信息
function H = ComputeAffineMatrix( Pt1 Pt2 )
%ComputeAffineMatrix
% Computes the transformation matrix that transforms a point from
% coordinate frame 1 to coordinate frame 2
%Input:
% Pt1: N * 2 matrix each row is a point in image 1
% (N must be at least 3)
% Pt2: N * 2 matrix each row is the point in image 2 that
% matches the same point in image 1 (N should be more than 3)
%Output:
% H: 3 * 3 affine transformation matrix
% such that H*pt1(i:) = pt2(i:)
N = size(Pt11);
if size(Pt1 1) ~= size(Pt2 1)
error(‘Dimensions unmatched.‘);
elseif N<3
error(‘At least 3 points are required.‘);
end
% Convert the input points to homogeneous coordintes.
P1 = [Pt1‘;ones(1N)];
P2 = [Pt2‘;ones(1N)];
% Now we must solve for the unknown H that satisfies H*P1=P2
% But MATLAB needs a system in the form Ax=b and A\b solves for x.
% In other words the unknown matrix must be on the right.
% But we can use the properties of matrix transpose to get something
% in that form. Just take the transpose of both sides of our equation
% above to yield P1‘*H‘=P2‘. Then MATLAB can solve for H‘ and we can
% transpose the result to produce H.
H = [];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% YOUR CODE HERE: %
% Use MATLAB‘s “A\b“ syntax to solve for H_transpose as discussed %
% above then convert it to the final H %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
H_transpose=P1‘\P2‘;
H=H_transpose‘;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% END OF YOUR CODE %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Sometimes numerical issues cause least-squares to produce a bottom
% row which is not exactly [0 0 1] which confuses some of the later
% code. So we‘ll ensure the bottom row is exactly [0 0 1].
H(3:) = [0 0 1];
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 12292 2014-10-06 11:35 PA1\.DS_Store
文件 8435 2013-10-09 22:09 PA1\alternate template for LaTeX users\cvpr.sty
文件 10285 2013-10-09 22:09 PA1\alternate template for LaTeX users\yourSUNetID_PA1.tex
文件 207 2013-10-02 19:11 PA1\checkpoint\Affine_ref.mat
文件 987133 2013-10-02 19:23 PA1\checkpoint\Match_input.mat
文件 255 2013-10-02 19:27 PA1\checkpoint\Match_ref.mat
文件 76813 2013-10-06 12:46 PA1\checkpoint\SIFT_ref.mat
文件 2387 2016-10-19 15:55 PA1\ComputeAffineMatrix.m
文件 64410 2009-10-10 11:54 PA1\data\campus_000.jpg
文件 52963 2009-10-10 11:54 PA1\data\campus_001.jpg
文件 36253 2009-10-10 11:54 PA1\data\campus_002.jpg
文件 39294 2009-10-10 11:54 PA1\data\campus_003.jpg
文件 57098 2009-10-10 11:54 PA1\data\campus_004.jpg
文件 108679 2013-10-06 11:17 PA1\data\pine1.jpg
文件 128952 2013-10-06 11:18 PA1\data\pine2.jpg
文件 126069 2013-10-06 11:18 PA1\data\pine3.jpg
文件 120636 2013-10-06 11:18 PA1\data\pine4.jpg
文件 195037 2009-10-10 12:37 PA1\data\trees_000.jpg
文件 230526 2009-10-10 12:49 PA1\data\trees_001.jpg
文件 253284 2009-10-10 12:37 PA1\data\trees_002.jpg
文件 267269 2009-10-10 12:37 PA1\data\trees_003.jpg
文件 39785 2013-10-03 19:52 PA1\data\uttower1.jpg
文件 39568 2013-10-03 19:52 PA1\data\uttower2.jpg
文件 38794 2013-10-06 00:14 PA1\data\uttower2_bad.jpg
文件 169535 2013-10-05 17:04 PA1\data\uttower2_scaledup.jpg
文件 21755 2013-10-12 01:34 PA1\data\yard1.jpg
文件 19016 2013-10-12 01:34 PA1\data\yard2.jpg
文件 15919 2013-10-12 01:34 PA1\data\yard3.jpg
文件 14347 2013-10-12 01:34 PA1\data\yard4.jpg
文件 203176 2009-10-11 14:14 PA1\data\yosemite1.jpg
............此处省略69个文件信息
- 上一篇:matlab计算峰值旁瓣比和积分旁瓣比
- 下一篇:多机器人路径规划-matlab
相关资源
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
- k近邻算法matlab实现
- matlab识别系统
- 神经网络分类matlab程序
- matlab正弦信号发生器的设计
- matlab程序用Hopfield网络解决TSP
- 实例matlab 编程100个常用程序
评论
共有 条评论