Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to show a gray image in a Gui axes ???

Subject: How to show a gray image in a Gui axes ???

From: Jan Sieh

Date: 15 Mar, 2008 16:54:04

Message: 1 of 3

Hey @ all,

I converted a color(rgb) *.jpg image into a gray image. When
I want to show the image in a axes in the gui, it looks like
a rainbow. I saved the converted image and its pefect gray.
Why does the axes couldn?t display gray images??

Hope you can help me.

Greetings Jan

Subject: How to show a gray image in a Gui axes ???

From: ImageAnalyst

Date: 15 Mar, 2008 17:14:39

Message: 2 of 3

On Mar 15, 12:54=A0pm, "Jan Sieh" <corone...@gmx.de> wrote:
> Hey @ all,
>
> I converted a color(rgb) *.jpg image into a gray image. When
> I want to show the image in a axes in the gui, it looks like
> a rainbow. I saved the converted image and its pefect gray.
> Why does the axes couldn?t display gray images??
>
> Hope you can help me.
>
> Greetings Jan

------------------------------------
Jan:
Check the color map. Make sure you're using a gray color map. Maybe
it got assigned to something else prior to you stuffing the gray scale
image in there. Something like
imshow(myGrayScaleImageArray, []);
colormap('gray');

Regards,
ImageAnalyst

Subject: How to show a gray image in a Gui axes ???

From: Vihang Patil

Date: 16 Mar, 2008 07:09:05

Message: 3 of 3

"Jan Sieh" <coronet67@gmx.de> wrote in message
<frguvc$mer$1@fred.mathworks.com>...
> Hey @ all,
>
> I converted a color(rgb) *.jpg image into a gray image. When
> I want to show the image in a axes in the gui, it looks like
> a rainbow. I saved the converted image and its pefect gray.
> Why does the axes couldn?t display gray images??
>
> Hope you can help me.
>
> Greetings Jan

Probable answer could be that you are using either image()
or imagesc() instead of imshow().
If you dont have ImageProcessing ToolBox then you wont be
having imshow(). Nevertheless you can use still update
grayscale images on the axes like;
image(yourimage);
colormap(gray);
as Image Analyst pointed out
HTH
VIHANG

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us