reducing resolution of an image
13 ビュー (過去 30 日間)
古いコメントを表示
I have a 2MP image and i need to reduce to 1MP, but must not crop the image.
can i know how and command to be used.
0 件のコメント
採用された回答
Rik
2019 年 3 月 11 日
You can use the imresize function to resample images:
A=uint8(randi(255,1666,1200,3));%generate random 2MP image
dims=size(A);dims=dims(1:2);%determine rows and cols
dims=round(dims/sqrt(2));%determine new dimensions for 1MP
B=imresize(A,dims);
2 件のコメント
Rik
2019 年 3 月 11 日
If this suggestion solved your problem, please consider marking it as accepted answer. It will make it easier for other people with the same question to find an answer. If this didn't solve your question, please comment with what problems you are still having.
その他の回答 (1 件)
Adam
2019 年 3 月 11 日
I have no idea what MP means in this context, but
doc imresize
will resize an image.
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!