From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: display positive indexed pixels
Date: Sun, 23 Dec 2012 17:40:08 +0000 (UTC)
Organization: Procter &#38; Gamble Co
Lines: 15
Message-ID: <kb7flo$cd5$>
References: <kb6jr4$fag$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1356284408 12709 (23 Dec 2012 17:40:08 GMT)
NNTP-Posting-Date: Sun, 23 Dec 2012 17:40:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1343420
Xref: comp.soft-sys.matlab:785302

"Carl  S." wrote in message <kb6jr4$fag$>...
> Hi,
> I have a grayscale image. I have some pixels that have values
> index: 0.329
> RGB: 0.487 0.487 0.487 
> How can you show only these pixels ? (I do not want to display the pixels which have negative index values)
What does:

whos yourGrayScaleImage

display in the command window.  Replace yourGrayScaleImage with the actual variable name of your image.  Do you have a floating point (double) image and have some colormap associated with it?  Note that an indexed image is an integer grayscale image.  You can apply any colormap that you want to it.  If you have a floating point image and display it with imshow(yourGrayScaleImage, []) and then apply a colormap, it will associate the color map with the floating point values scaled from 0-255 so you have to know the min and max value of your image, or at least the max, to figure out what color is mapped to what floating point value.