X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 16 Sep 2003 09:56 AM by  anon
Creating a Transparency over a gray scale image
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
16 Sep 2003 09:56 AM
    Hello I would like to use as many envi functions as possible to accomplish the following, but if needed, I can also do some stuff in IDL. What I would like to do is create something like a transparency to overlay on a gray scale image. The transparency will be made up of red pixels that correspond to the original gray scale image. I can do this using the 8 color scheme and changing the color table, but I want to find a way to do this using the True color scheme. Thanks for your time, Afsheen Khan

    Deleted User



    New Member


    Posts:
    New Member


    --
    16 Sep 2003 09:56 AM
    Hi Afsheen, One easy way to do this sort of thing (if you don't mind a little IDL programming) is to assemble the image in the HSV colour space. Put your backdrop band as the V (intensity) band, construct an H (hue) band from your overlay band, and make up an S (saturation) band that's 1.0 where you want your overlay band to show and 0.0 where you don't want to show it. Transform this lot to the RGB colour space using IDL's COLOR_CONVERT,/HSV_RGB and give the result to ENVI using ENVI_ENTER_DATA or ENVI_SETUP_HEAD (after assembling the 3 RGB bands into a 3D BSQ array if in memory or writing them to disk if not). That's the general idea. A bit more on making an H band... In HSV space, hue values go from 0=red to 120=green to 240=blue, then through purple back to red=360 (== red=0). If your overlay band's just boolean (a mask of 0 and 1 values) then simply pick the hue you want and multiply it with your overlay band. If it has a range of values then either threshhold it to a mask for a single colour, or scale it to the hue range that you'd like (0 .. about 270 is a common choice). There are other things that you can experiment with in the HSV colour space, e.g., rescaling the intensity and bumping it up with an offset where the overlay band is valid, or varying the "amount" of overlay shown by adjusting the saturation values.
    You are not authorized to post a reply.