Resizing image in pixels
5 次查看(过去 30 天)
显示 更早的评论
Is there anyway to resize an image in terms of pixels? say, i want to resize my picture with no change of proportion to 160x160 pixels?
help is very much appreciated!
0 个评论
回答(1 个)
Guillaume
2015-2-26
编辑:Guillaume
2015-2-26
resizedimage = imresize(originalimage, [160 160]);
2 个评论
Guillaume
2015-2-26
Then post the code you're using, as it works fine for me:
originalimage = randi([0 255], 1000, 1000);
resizedimage = imresize(originalimage, [160 160]);
whos resizedimage
returns:
Name Size Bytes Class Attributes
resizedimage 160x160 204800 double
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!