FFT - based Technique Simulation
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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)))
Réponses (0)
Voir également
Catégories
En savoir plus sur Spectral Measurements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!