<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164818</link>
    <title>MATLAB Central Newsreader - Black and white switch</title>
    <description>Feed for thread: Black and white switch</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 29 Feb 2008 00:09:06 -0500</pubDate>
      <title>Black and white switch</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164818#418115</link>
      <author>Phil Au</author>
      <description>Hi all,&lt;br&gt;
&lt;br&gt;
Does anyone know that a way to turn a logical image or &lt;br&gt;
uint8 image, from black background to white background from &lt;br&gt;
white line to black line in a simple step??&lt;br&gt;
&lt;br&gt;
Thx a lot&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Fri, 29 Feb 2008 00:44:09 -0500</pubDate>
      <title>Re: Black and white switch</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164818#418118</link>
      <author>Matthew Whitaker</author>
      <description>"Phil Au" &amp;lt;philipawt@gmail.com&amp;gt; wrote in message &amp;lt;fq7if2&lt;br&gt;
$nmt$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi all,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Does anyone know that a way to turn a logical image or &lt;br&gt;
&amp;gt; uint8 image, from black background to white background &lt;br&gt;
from &lt;br&gt;
&amp;gt; white line to black line in a simple step??&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thx a lot&lt;br&gt;
&lt;br&gt;
imshow(L)&lt;br&gt;
&lt;br&gt;
imshow(~L)%where L is a logical image&lt;br&gt;
&lt;br&gt;
imshow(u8)&lt;br&gt;
imshow(intmax(class(u8))-u8) %where u8 is a uint8 image&lt;br&gt;
&lt;br&gt;
Hope this helps&lt;br&gt;
Matt&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 04 Mar 2008 21:18:52 -0500</pubDate>
      <title>Re: Black and white switch</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164818#419041</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;fq7kgp$j2a$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
Matthew Whitaker &amp;lt;mattlwhitaker@REMOVEgmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;"Phil Au" &amp;lt;philipawt@gmail.com&amp;gt; wrote in message &amp;lt;fq7if2&lt;br&gt;
&amp;gt;$nmt$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; Does anyone know that a way to turn a logical image or &lt;br&gt;
&amp;gt;&amp;gt; uint8 image, from black background to white background &lt;br&gt;
&amp;gt;from &lt;br&gt;
&amp;gt;&amp;gt; white line to black line in a simple step??&lt;br&gt;
&lt;br&gt;
&amp;gt;imshow(u8)&lt;br&gt;
&amp;gt;imshow(intmax(class(u8))-u8) %where u8 is a uint8 image&lt;br&gt;
&lt;br&gt;
Unfortunately that last line does not generalize to int8&lt;br&gt;
as might be hinted by the use of intmax(class(u8)) instead than&lt;br&gt;
the hardcoding of the constant 255. &lt;br&gt;
&lt;br&gt;
This generalizes a little better, provided T is one of the int classes.&lt;br&gt;
&lt;br&gt;
reshape(typecast(bitxor(typecast(T(:),'uint8'),uint8(255)),class(T)),size(T))&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;"There are some ideas so wrong that only a very intelligent person&lt;br&gt;
&amp;nbsp;&amp;nbsp;could believe in them."                            -- George Orwell&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Wed, 05 Mar 2008 05:22:01 -0500</pubDate>
      <title>Re: Black and white switch</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/164818#419094</link>
      <author>Vihang Patil</author>
      <description>"Phil Au" &amp;lt;philipawt@gmail.com&amp;gt; wrote in message &amp;lt;fq7if2&lt;br&gt;
$nmt$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi all,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Does anyone know that a way to turn a logical image or &lt;br&gt;
&amp;gt; uint8 image, from black background to white background &lt;br&gt;
from &lt;br&gt;
&amp;gt; white line to black line in a simple step??&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thx a lot&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
doc imcomplement&lt;br&gt;
&lt;br&gt;
HTH&lt;br&gt;
VIhang&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
