matlab相位相关图像配准,基于相位相关和重采样的亚像素图像配准算法问题

在这里,亚像素图像配准算法是采用的方法是相位相关和重采样,实现的程序参考网址为:http://www.mathworks.com/matlabc ... t/dftregistration.m,所有的程序将在下面贴出来,程序中有几个地方看了很长时间看不明白,所以写了这个帖子,希望研究过亚像素图像配准算法或者看懂程序的前辈能给小弟指教一下,疑惑的问题将在附件中的程序疑惑1,2,3,具体的疑惑为:

疑惑1:

在讨论中,有多个地方出现了(出现的位置在程序疑惑1和2用红色方框标记出来了)

if rloc > md2

row_shift = rloc - m - 1;

else

row_shift = rloc - 1;

end

if cloc > nd2

col_shift = cloc - n - 1;

else

col_shift = cloc - 1;

end

这里的代码的意思,好像是平移的意思,但是具体为什么这样操作思索了很长时间还是不明白????

疑惑2:(出现的位置在程序疑惑3用红色方框标记出来了)

程序中

buf1ft是基准图像,buf2ft待匹配的图像,usfac是图像的采样倍数,程序中讨论了usfac=1时,用FFT计算,而usfac不等于1的计算方法不同于usfac==1的情况,另外usfac>2时是用DFT计算的,所以这里我就疑惑了,为什么讨论usfac不同的值时,计算的方法不一样???

为了方便大家理解,我截出了亚像素图像配准的计算过程图,见附件 亚像素图像匹配算法的计算过程.PNG

程序的全部代码:

function [output Greg] = dftregistration(buf1ft,buf2ft,usfac)

% function [output Greg] = dftregistration(buf1ft,buf2ft,usfac);

% Efficient subpixel image registration by crosscorrelation. This code

% gives the same precision as the FFT upsampled cross correlation in a

% small fraction of the computation time and with reduced memory

% requirements. It obtains an initial estimate of the crosscorrelation peak

% by an FFT and then refines the shift estimation by upsampling the DFT

% only in a small neighborhood of that estimate by means of a

% matrix-multiply DFT. With this procedure all the image points are used to

% compute the upsampled crosscorrelation.

% Manuel Guizar - Dec 13, 2007

% Portions of this code were taken from code written by Ann M. Kowalczyk

% and James R. Fienup.

% J.R. Fienup and A.M. Kowalczyk, "Phase retrieval for a complex-valued

% object by using a low-resolution image," J. Opt. Soc. Am. A 7, 450-458

% (1990).

% Citation for this algorithm:

% Manuel Guizar-Sicairos, Samuel T. Thurman, and James R. Fienup,</

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值