Problem on gray scale image.
2 ビュー (過去 30 日間)
古いコメントを表示
Hi. i used gray = rgb2gray(I) at command window but why can't i get a grayscale image? thank you!
0 件のコメント
回答 (2 件)
Walter Roberson
2012 年 9 月 19 日
grayscaleimage = rgb2gray(I);
image(grayscaleimage);
colormap(gray);
Please note that "gray" is a MATLAB function for constructing grayscale colormaps. Writing to a variable named "gray" interferes with using the function "gray".
0 件のコメント
Esther
2012 年 9 月 20 日
6 件のコメント
Image Analyst
2012 年 9 月 20 日
編集済み: Image Analyst
2012 年 9 月 20 日
So you DID get a gray scale image. Why did you say you did not?
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!