资源简介
相位相关法图像拼接,代码使用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\
相关资源
- LEACH仿真 簇头 节点存活 系统能耗
- 基于matlab的灰色预测模型GM1,1预测标
- 基于帧差法的运动目标检测的matlab代
- matlab产生正弦光栅条纹
- 雷英杰《MATLAB遗传算法工具箱与应用
- 小波锐化matlab
- matlab AR模型参数谱估计
- 基于MATLAB的运动物体检测与识别
- prim算法在matlab中的代码
-
直接转矩控制的matlab/Simuli
nk模型 - 循环平稳信号的MATLAB的仿真
- 肤色检测matlab
- matlab产生正弦波及.mif文件的程序
- matlab实现十进制到二进制定点有符号
- 各类杂波模拟及Matlab实现.zip
- 异步电机矢量控制MATLAB 仿真
- 生成pwm波形的matlab编程
- matlab边缘化处理代码
- 业界良心版BP神经网络分类MATLAB代码
- huff编解码matlab算法
- 朴素贝叶斯算法matlab代码实现
- FDBPM算法matlab程序
- matlab数据的读入和预处理
- 14节点潮流计算matlab程序
- 图像稀疏表示MATLAB
- 基于MATLAB的OFDM系统仿真程序
- 用matlab实现的bezier n阶三角曲面生成算
- 毕业设计 基于MATLAB的vsb调制解调源代
- 毕业设计 基于MATLAB的qdpsk仿真调制解
- 音乐合成之MATLAB实现
评论
共有 条评论