How to downsize image in x and y direction?
7 次查看(过去 30 天)
显示 更早的评论
I have image with size 484x680 and i want to downsize with fector 2. final size should be 241x340.
i have tried it but it downsized in only one direction
img = imread('img')
new_img2 = downsample(img, 2);
imshow(new_img2)
I have also uplod the result of imshow(new_img2) which is img2
0 个评论
采纳的回答
更多回答(1 个)
yanqi liu
2021-11-25
yes, sir,may be use
clc; clear all; close all;
img = imread('https://ww2.mathworks.cn/matlabcentral/answers/uploaded_files/811604/img1.png');
new_img2 = img(1:2:end,1:2:end,:);
imshow(new_img2)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 DALSA Sapera Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!