How to convert RGB gcf to grayscale gcf ?

1 visualización (últimos 30 días)
도현 김
도현 김 el 29 de Mzo. de 2021
Comentada: KSSV el 29 de Mzo. de 2021
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 ?

Respuesta aceptada

KSSV
KSSV el 29 de Mzo. de 2021
h = rand(10)
heatmap(h) ;
colormap(gray)
  2 comentarios
도현 김
도현 김 el 29 de Mzo. de 2021
Editada: 도현 김 el 29 de Mzo. de 2021
Thank you! But that and grayscale are different.
Its size is (m*n*3 uint8) and grayscale is (m*n uint8).
KSSV
KSSV el 29 de Mzo. de 2021
If you have the values..you can striaght away use them with colormap. Read about it.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by