comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: hieghlighting pixel
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: hieghlighting pixel [message #71094 is a reply to message #71092] Thu, 27 May 2010 05:11 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
afzal writes:

> in my work i need to highlight some points(pixels) of binary image
> with some color(eg:-red). cud anybody help me to do this
> thanking you

Scale your image into some number of values less
that 256, then use these "extra" values for your
colors.

image = dist(200)
scaledImage = BytScl(image, Top=250)

Now, load your colors appropriately. For example,
your scaled image now has 251 values (0 to 250),
so the color table is loaded like this:

LoadCT, 0, NColors=251

Next, load your drawing color. Red in this case,
at color index number 251:

TVLCT, 255, 0, 0, 251

Now, select your pixels that will be red:

indices = Where(image gt 75 and image lt 85, count)
IF count gt 0 THEN scaledImage[indices] = 251

Then, just display your image:

TVImage, scaledImage, /NoInterp, /Keep_Aspect

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDLDE can not start in Ubuntu10.04
Next Topic: Re: Integrator taking vectors as input?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 06:29:55 PDT 2025

Total time taken to generate the page: 0.56649 seconds