Control Point Registration with Matlab
1 view (last 30 days)
Show older comments
Hello,
I'm new to Matlab and I'm trying to do a Control Point Registration using your guide: http://www.mathworks.com/help/images/point-mapping.html
The result I get is two pictures one on top of the other but they are misaligned .
Can you please tell me what am I doing wrong ?
Thank you.
Here is the code:
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
0 Comments
Answers (0)
See Also
Categories
Find more on Geometric Transformation and Image Registration in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!