Path: news.mathworks.com!not-for-mail
From: "Matthew Whitaker" <mattlwhitaker@REMOVEgmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Black and white switch
Date: Fri, 29 Feb 2008 00:44:09 +0000 (UTC)
Organization: Radiological Imaging Technology Inc
Lines: 20
Message-ID: <fq7kgp$j2a$1@fred.mathworks.com>
References: <fq7if2$nmt$1@fred.mathworks.com>
Reply-To: "Matthew Whitaker" <mattlwhitaker@REMOVEgmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1204245849 19530 172.30.248.38 (29 Feb 2008 00:44:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 29 Feb 2008 00:44:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 10959
Xref: news.mathworks.com comp.soft-sys.matlab:454453


"Phil Au" <philipawt@gmail.com> wrote in message <fq7if2
$nmt$1@fred.mathworks.com>...
> Hi all,
> 
> Does anyone know that a way to turn a logical image or 
> uint8 image, from black background to white background 
from 
> white line to black line in a simple step??
> 
> Thx a lot

imshow(L)

imshow(~L)%where L is a logical image

imshow(u8)
imshow(intmax(class(u8))-u8) %where u8 is a uint8 image

Hope this helps
Matt