did u figure out it now ?
FFT - based Technique Simulation
2 次查看(过去 30 天)
显示 更早的评论
i want to simulation of 'An FFT-Based Technique for Translation,Rotation, and Scale-Invariant Image Registration'. First of all, i tried to A(without Scale Change)for find out theta & translation (x0,y0), but i failed.
This is my code. plz advise me.
close all; clc; clear all;
im1 = imread('IU.jpg');
%making image
im01 = im1(1:400,1:400);
im02 = im1(50:449,30:429);
im02 = imrotate(im02,30);
im02 = imresize(im02,[400,400]);
imshow(im01)
figure,imshow(im02)
%Fourier transform
F1 = fft2(im01);
F2 = fft2(im02);
%magnitude
M1 = abs(F1);
M2 = abs(F2);
f1 = fft2(M1);
f2 = fft2(M2);
%cross power spectrum
cp = f1.*conj(f2)/abs(f1.*conj(f2));
mag = ifft(cp);
[x, y] = find(mag ==max(max(mag)))
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!