Change colormap image processing

조회 수: 1 (최근 30일)
Ashray Malhotra
Ashray Malhotra 2014년 8월 13일
답변: Joseph Cheng 2014년 8월 13일
I need a 256 intensity colormap, for which I am using the following code.
colormap(gray(256));
But when I print out the cmap using
cmap = colormap;
I still get 64*3 double instead of a 256*3 value. What am I doing wrong?

채택된 답변

Yu Jiang
Yu Jiang 2014년 8월 13일
Hi Ashray
Can you try executing the following command in MATLAB
>> set(gcf, renderer, opengl).
and see if it works?
This command changes your renderer to opengl.
If it does not work, could you let me know which release of MATLAB you are using? What is your operating system?
-Yu Jiang

추가 답변 (1개)

Joseph Cheng
Joseph Cheng 2014년 8월 13일
I would check to see if the figure is still open, or is the active figure. is the cmap = colormap; directly after you create the figure? if you're confident that the figure is being displayed with a 256 grayscale then why not save the cmap when you do the colormap(gray(256))?

카테고리

Help CenterFile Exchange에서 Red에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by