please explain size function in MATLAB
1 回表示 (過去 30 日間)
古いコメントを表示
if(size(img,3) == 1) disp('Error: Pick a color image'); return;
0 件のコメント
回答 (1 件)
Image Analyst
2017 年 10 月 18 日
size(img,3) returns the number of color channels in an image. It will be 1 for a gray scale image and 3 for an RGB image. That should explain it (why they ask for a color image if the program was given a gray scale image).
0 件のコメント
参考
カテゴリ
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!