X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 27 May 2011 04:03 PM by  anon
Output to JPEG with stretch
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
27 May 2011 04:03 PM
    Hi, I'm working with ENVI and IDL. When I open an RGB image in ENVI, it applies a linear 2% stretch which I'm able to save as JPEG for use. While this is convenient, I can't open the GUI for say a 1000 files. Unfortunately, I don't see a programmatic way of doing this using ENVI functions. I would like to retain the 2% linear stretch in the JPEG outputs which I'm not able to, using IDL or other tools. I think I'm missing something here. Is there a way to apply a 2% linear stretch on an RGB image ( I find it confusing that 2% will be applied on all the three bands) and output to JPEG? Please let me know if you have any ideas. Thanks, Raghu

    Deleted User



    New Member


    Posts:
    New Member


    --
    13 Jun 2011 12:13 PM
    You can use ENVI's STRETCH_DOIT routine, with the METHOD set to 1 (Linear). You will want to set the RANGE_BY keyword to 0, then set I_MIN to 2 and I_MAX to 98, to make a 2% contrast stretch. This will not be exactly the same stretch that ENVI applies by default, but it will be similar. ENVI's default 2% stretch involves more complicated logic that adjusts the stretch differently if the image histogram is non-gaussian in shape. That stretch is not reproducible without getting into programming your own stretch logic in IDL. - Peg
    You are not authorized to post a reply.