Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

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: Re: 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: Re: 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

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics