简体   繁体   中英

How to make two images with same dimensions to be same size in matlab

I have two images with same dimensions but with different sizes. I want the bigger image's size to be changed to match the smaller image's size. For example, I have an image A with size 300x400x3 and image B with size 600x800x3 . I want to change the size of image B to 300x400x3 . Thanks for any help.

Just one-liner as suggested by Andrey -

B = imresize( B,[size(A,1) size(A,2)]);

For accessing more options with resizing, use this resource .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM