Path: news.mathworks.com!not-for-mail
From: "Sadik " <sadik.hava@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: blue and white Logical image
Date: Sat, 17 Jan 2009 20:56:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <gktgl2$t68$1@fred.mathworks.com>
References: <gkt6tr$9tv$1@fred.mathworks.com>
Reply-To: "Sadik " <sadik.hava@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1232225762 29896 172.30.248.37 (17 Jan 2009 20:56:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 17 Jan 2009 20:56:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: news.mathworks.com comp.soft-sys.matlab:512245


"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.