comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: how to give specific colour to a pixel on an image
items: Re: how to give specific colour to a pixel on an image

how to give specific colour to a pixel on an image
type: item
description: Hi I am using the cgimage function to display my images. I was wondering how can I specify the colour of a pixel location by a particular colour. What I mean is, once I display my image then, the pixel at location [5,8] make it blue. Is that possible? With Thanks
creator: g.nacarts
date: 2015-04-20T16:17:06-00:00

Re: how to give specific colour to a pixel on an image
type: item
description: There is likely a more Coyote-like way of doing this, but I follow two steps: 1. Don't scale the image between 0 and 255 but between, say, 0 and 253, so that the "colored" pixels -- and no others -- can be given the value of 254. 2. Assign the desired color to the lookup table at a location of 254 im = dist(512) ;test image imscl = bytscl(im,top=253) ;Scale to top value of 253 imscl[5,8] = 254 ;give desired pixel a value of 254 col = cgcolor('magenta',/triple) ;Let's make the pixel magenta tvlct,col,254 ;Load at 254 in the lookup table cgimage, imscl ;Now display the image On Monday, April 20, 2015 at 12:17:08 PM UTC-4, g.na...@gmail.com wrote: > Hi > > I am using the cgimage function to display my images. I was wondering how can I specify the colour of a pixel location by a particular colour. What I mean is, once I display my image then, the pixel at location [5,8] make it blue. Is that possible? > > With Thanks
creator: wlandsman
date: 2015-04-20T19:52:56-00:00

Re: how to give specific colour to a pixel on an image
type: item
description: Thank you very much! that was very helpful :)
creator: g.nacarts
date: 2015-04-21T08:05:32-00:00