フィルターのクリア

How to resize an image into size 256*256

4 ビュー (過去 30 日間)
Anushka
Anushka 2015 年 5 月 27 日
回答済み: Image Analyst 2015 年 5 月 27 日
I used the following code
J = J(1:256,1:256,:)
[r c]=size(J);
display(r); display(c);
But the value of c is displayed as 768.But the resized size is 256.What would be the error.And I cant use the command imresize since I need the third coordinate also.

回答 (2 件)

Image Analyst
Image Analyst 2015 年 5 月 27 日
Never use size like that for a color image. Use
[rows, columns, numberOfColorChannels] = size(J);

Thorsten
Thorsten 2015 年 5 月 27 日
編集済み: Thorsten 2015 年 5 月 27 日
Use
r = size(J, 1); c = size(J, 2);

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by