Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
display positive indexed pixels

Subject: display positive indexed pixels

From: Carl S.

Date: 23 Dec, 2012 09:45:08

Message: 1 of 4

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)

Subject: display positive indexed pixels

From: Nasser M. Abbasi

Date: 23 Dec, 2012 15:21:58

Message: 2 of 4

On 12/23/2012 3:45 AM, Carl S. wrote:
> Hi,
> I have a grayscale image. I have some pixels that have values
>
> index: 0.329
> RGB: 0.487 0.487 0.487
>

hi;

I am not expert in image processing (took only 2 course sometime ago).
But how could a grayscale image have RGB values?

--Nasser

Subject: display positive indexed pixels

From: dpb

Date: 23 Dec, 2012 16:09:26

Message: 3 of 4

On 12/23/2012 9:21 AM, Nasser M. Abbasi wrote:
> On 12/23/2012 3:45 AM, Carl S. wrote:
>> Hi,
>> I have a grayscale image. I have some pixels that have values
>>
>> index: 0.329
>> RGB: 0.487 0.487 0.487
>>
>
> hi;
>
> I am not expert in image processing (took only 2 course sometime ago).
> But how could a grayscale image have RGB values?

ind2rgb(), maybe?

Just 'cuz it's a set of gray values doesn't mean there isn't an
equivalent colormap in whatever scale one chooses...

Try

 >> plot(1:4,[1:4].^2,'color',[0.487 0.487 0.48])

or somesuch to see what OP's particular pixel looks like...

--


--

Subject: display positive indexed pixels

From: Image Analyst

Date: 23 Dec, 2012 17:40:08

Message: 4 of 4

"Carl S." wrote in message <kb6jr4$fag$1@newscl01ah.mathworks.com>...
> 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.
-ImageAnalyst

Tags for this Thread

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.

Contact us