How to convert RGB gcf to grayscale gcf ?

3 ビュー (過去 30 日間)
도현 김
도현 김 2021 年 3 月 29 日
コメント済み: KSSV 2021 年 3 月 29 日
h = rand(10)
heatmap(h)
i want to using 'rgb2gray' without using imread.
The mechanism I want is to create heatmap and set it in set(gcf,~~~~).
How can I do it ?

採用された回答

KSSV
KSSV 2021 年 3 月 29 日
h = rand(10)
heatmap(h) ;
colormap(gray)
  2 件のコメント
도현 김
도현 김 2021 年 3 月 29 日
編集済み: 도현 김 2021 年 3 月 29 日
Thank you! But that and grayscale are different.
Its size is (m*n*3 uint8) and grayscale is (m*n uint8).
KSSV
KSSV 2021 年 3 月 29 日
If you have the values..you can striaght away use them with colormap. Read about it.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeColor and Styling についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by