Я новичок в Matlab, и я пытаюсь сделать Регистрация Контрольного используя их руководство: http://www.mathworks.com/help/images/point-mapping.htmlКонтрольная точка регистрации с Matlab
В результате я получаю две картины один поверх другого, но они несогласованные, хотя они должны быть выровнены в соответствии с руководством.
Не могли бы вы рассказать мне, что я делаю неправильно?
спасибо.
Вот код:
function [Y] =EBL
ReferenceImg=imread('GFI.jpg'); %This is the fixed image
CroppedImg=imcrop(ReferenceImg); %Crop fixed image
close %close the imcrop window
MovingImg = imread('GF.bmp'); %This is the moving picture
ResizedIReferenceImg= imresize(CroppedImg,[1000 1000]); %resize the fixed image
ResizedMovingImg= imresize(MovingImg,[1000 1000]);%resize the moving image
[input_points,base_points] = cpselect(ResizedMovingImg,ResizedIReferenceImg,'Wait', true);%Estimate transformation
tform = fitgeotrans(input_points,base_points,'projective');
B = imwarp(ResizedMovingImg,tform);
imshow(B)
hold on
t=imagesc(ResizedIReferenceImg);%Set transparency of fixed image
set(t,'AlphaData',0.5);
end
Можете ли вы разместить изображения тоже, пожалуйста? –
Попробуйте: B = imwarp (ResizedIreferenceImg, tform); Я не уверен, что это все, но стоит попробовать. –