non uniform interpolation code
Afficher commentaires plus anciens
is this code exact for nonuniform interpolation
A = phantom(256); a1=A(1:7:256,1:7:256);imshow(a1); a2=A(3:7:256,2:7:256);imshow(a2); a3=A(3:7:256,4:7:256);imshow(a3); %------------------------rotate and translate images----------------------% %tform = affine2d([2 0.33 0; 0 1 0; 0 0 1]); %b1=a1 %b2 = imrotate(a2,30,'bicubic','crop'); %b3 = imwarp(a3,tform); %apply transformation into image b1 = a1; b2 = shift_image(a2,[-1 3]); b3 = shift_image(a3,[2 5]); figure; imshowpair(b1,b2,'Scaling','joint'); figure; imshowpair(b1,b3,'Scaling','joint');
%-----------------------------registration--------------------------------% %[optimizer, metric] = imregconfig('monomodal');%or monomodal %optimizer.InitialRadius = 0.01; %optimizer.Epsilon = 1.5e-4; %optimizer.GrowthFactor = 1.009; %optimizer.MaximumIterations = 300; %_________________________________________________________________________% moving_reg1 = imregister(b2,b1,'similarity',optimizer,metric); % using phase correlation the ouput at translational 0,843 at 0.03 moving_reg2 = imregister(b3,b1,'similarity',optimizer,metric); %using intensity monomodal geometric 0.703 ,0.04 figure;imshowpair(b1,moving_reg1,'Scaling','joint');
figure;imshowpair(b1,moving_reg2,'Scaling','joint'); %-------------------------------interpolation-----------------------------% x=interp2(moving_reg1,moving_reg2); %end %-------------------------------
Réponses (0)
Catégories
En savoir plus sur Geometric Transformation and Image Registration dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!