How to convert RGB gcf to grayscale gcf ?

조회 수: 1 (최근 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 CenterFile Exchange에서 Colormaps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by