资源简介
相位相关法图像拼接,代码使用MATLAB编写。 傅里叶方法。

代码片段和文件信息
% RegisterFourierMellin
% This code is the result of my messing around with Matlab investigating
% various image registration techniques. I came across the excellent
% (although perhaps a little messy and buggy) fm_gui_v2 from Adam Wilmer
% here:
% http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=3000&objectType=file
% Because my needs are essentially the algorithm itself in a neat and tidy
% format to enable an easier conversion to C++ I‘ve extracted what I think
% is the essence of the Fourier Mellin method into this file. Obviously
% I haven‘t included a GUI. In order to test it you need to set the first
% two statements to load in 2 image files of the same size in 8 bit grayscale.
% I took lena and then used Gimp to rotate/shift/crop at various angles.
% It isn‘t sub-pixel accurate although I‘m aware of methods to achieve
% this by extracting the peaks around the peak of the phase correlation and
% finding the maxima (least squares perhaps).
% The methods towards the end of the program are cribbed directly from
% Adam‘s version. I‘m new to Matlab (been playing with it for less than
% a fortnight) so I wasn‘t able to get my head around his log polar transform
% or the final “blending“ of the two images together.
% I‘d like to thank Adam for publishing his version. Without it I‘d never
% have known I had to take the log polar transform of the magnitude of the
% FFT rather than the log polar transform of the original image!
function RegnisterFourierMellin()
% The procedure is as follows (note this does not compute scale)
% (1) Read in I1 - the image to register against
% (2) Read in I2 - the image to register
% (3) Take the FFT of I1 shifting it to center on zero frequency
% (4) Take the FFT of I2 shifting it to center on zero frequency
% (5) Convolve the magnitude of (3) with a high pass filter
% (6) Convolve the magnitude of (4) with a high pass filter
% (7) Transform (5) into log polar space
% (8) Transform (6) into log polar space
% (9) Take the FFT of (7)
% (10) Take the FFT of (8)
% (11) Compute phase correlation of (9) and (10)
% (12) Find the location (xy) in (11) of the peak of the phase correlation
% (13) Compute angle (360 / Image Y Size) * y from (12)
% (14) Rotate the image from (2) by - angle from (13)
% (15) Rotate the image from (2) by - angle + 180 from (13)
% (16) Take the FFT of (14)
% (17) Take the FFT of (15)
% (18) Compute phase correlation of (3) and (16)
% (19) Compute phase correlation of (3) and (17)
% (20) Find the location (xy) in (18) of the peak of the phase correlation
% (21) Find the location (xy) in (19) of the peak of the phase correlation
% (22) If phase peak in (20) > phase peak in (21) (yx) from (20) is the translation
% (23a) Else (yx) from (21) is the translation and also:
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 12590 2008-04-28 20:49 Fourier-Mellin\Register.m
文件 66614 2008-04-27 20:44 Fourier-Mellin\lena.bmp
文件 66614 2008-04-27 20:57 Fourier-Mellin\lena_cropped.bmp
文件 66614 2008-04-27 20:57 Fourier-Mellin\lena_cropped_rotated.bmp
文件 66614 2008-04-27 21:00 Fourier-Mellin\lena_cropped_rotated_shifted.bmp
文件 66614 2008-04-27 20:59 Fourier-Mellin\lena_cropped_shifted.bmp
目录 0 2010-04-26 23:06 Fourier-Mellin\
相关资源
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的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实现
评论
共有 条评论