Why does my image does not conert to grayscale?
22 ビュー (過去 30 日間)
古いコメントを表示
I need to convert an image that we were given to grayscale.
I wrote the code below. When I highlight the whole 'imagesc' line and 'evaluate selction' the image pops up but in color.
logo = imread('..._logo.jpg');
figure;
imagesc(logo);
colormap gray;
0 件のコメント
採用された回答
Image Analyst
2021 年 8 月 31 日
Use imshow() because imagesc() applies some funky colormap by default, and that is usually not what you want.
3 件のコメント
Image Analyst
2021 年 8 月 31 日
No, you don't need that last line. The default for gray scale images is to not use a colormap and show everything in it's original, native gray color.
Image Analyst
2021 年 9 月 5 日
Andrew, if this solved it, can you click the "Accept this answer" link? Thanks in advance.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Orange についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!