Why does the figure show black image only in Matlab?

How to make the data tip of matlab figure show the image gray level color and not its RGB value?

  • I have images with gray level value and I'm displaying them using matlab imagesc function. However, when using the data tip with these figures the RGB value is displayed instead of the true gray level color. How can I change that to display the gray level color of each pixel of the image?

  • Answer:

    Using colormap(gray) after your imagesc() function will convert the display image to grey scale. imagesc(image), colormap(gray) or imshow(uint8(image)) where uint8() is trying to scale the value to 0~255 if you need, or it will show the true grey value.

user4861528 at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.