Thread Subject: blue and white Logical image

Subject: blue and white Logical image

From: Henry Bourne

Date: 17 Jan, 2009 18:10:03

Message: 1 of 3

Hi guys,

I have a logical array representing an image. this was created from an rgb array using im2bw with a classification threshold set.

The logical result is correct, but when I show it on an axis (using image()) in my GUI it appears blue and white, not black and white as I'd like.

If I run the program in debug mode, and manually enter the im2bw and image() lines it appears black and white... I'm not sure what's going on!

Can anyone offer some advice? I'm using 7.6.0 R2008a. Have built the gui using the guide utility.

Thanks very much.

Subject: blue and white Logical image

From: Sadik

Date: 17 Jan, 2009 20:56:02

Message: 2 of 3

"Henry Bourne" <henrybourne.remove_-_this@mac.com> wrote in message <gkt6tr$9tv$1@fred.mathworks.com>...
> Hi guys,
>
> I have a logical array representing an image. this was created from an rgb array using im2bw with a classification threshold set.
>
> The logical result is correct, but when I show it on an axis (using image()) in my GUI it appears blue and white, not black and white as I'd like.
>
> If I run the program in debug mode, and manually enter the im2bw and image() lines it appears black and white... I'm not sure what's going on!
>
> Can anyone offer some advice? I'm using 7.6.0 R2008a. Have built the gui using the guide utility.
>
> Thanks very much.

I don't know exactly but maybe you could try playing with the colormap of the figure like the following:

colormap(gray)

Because I had the same problem and the zero values were shown with dark blue.

Hope it helps.

Subject: blue and white Logical image

From: Henry Bourne

Date: 18 Jan, 2009 01:04:02

Message: 3 of 3

> I don't know exactly but maybe you could try playing with the colormap of the figure like the following:
>
> colormap(gray)
>
> Because I had the same problem and the zero values were shown with dark blue.
>
> Hope it helps.

Figured it out.

It displays in black and white if I use imshow() instead of image(). Not entirely sure of the specifics why... But it works!

Thanks!

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
 

MATLAB Central Terms of Use

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 Terms prior to use.

Contact us at files@mathworks.com