How can I resize a rectangular image of size 1280x512 to a square image of size (2048x2048)? I have used the following code. Is it correct or is there any other better methods to perform resizing?
Show older comments
% First read the image I of size (1280x512) using imread, then used imresize to change the size of I to (2048x2048) and used imwrite to save the image
I=imread('I.tif');
J=imresize(I,[2048 2048],'bicubic');
imwrite(J,'J.tif','tiff');
Accepted Answer
More Answers (0)
Categories
Find more on Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!