Resize of an image into 640 * 480 pixels

5 ビュー (過去 30 日間)
Niranjan Ravi
Niranjan Ravi 2018 年 4 月 25 日
回答済み: Ameer Hamza 2018 年 4 月 25 日
I tried to resize my image using imresize and following code does not work:
function y = fcn(u)
coder.extrinsic('imresize','imwrite');
imresize(u,[640 480]);
imwrite(u,'valli270.bmp');
y = u;
The code is just saving it as bmp file but the resize is not working

回答 (1 件)

Ameer Hamza
Ameer Hamza 2018 年 4 月 25 日
You need to save the output of imresize in a variable to use it later. Change your dunction like this.
function y = fcn(u)
coder.extrinsic('imresize','imwrite');
y = imresize(u,[640 480]);
imwrite(y,'valli270.bmp');
end

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by