Warping an image to a specified size
3 views (last 30 days)
Show older comments
I have an input image and have found the corners of the object I want to segment. I would like to transform the segmented object to a 500x500 image.

C = corner(mask,'Harris',4);
OutputC = [0 0; 500 0; 0 500; 500 500];
figure, imshow(mask), hold on
plot(C(:,1), C(:,2),'r*');

Tform2 = fitgeotrans(C,OutputC,'projective');
iout = imwarp(I1,Tform2);
figure;
imshow(iout);

The resulting output image is not my 500x500 size and I'm not sure why.
Should I be using a calculated homography matrix and applying that to my input image?
0 Comments
Accepted Answer
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!