X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 17 May 2017 12:00 PM by  Dulci Avouris
Linear 2% Stretch for color display
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Dulci Avouris



New Member


Posts:51
New Member


--
16 May 2017 09:52 AM
    Hello! I am wondering if the linear stretch function has changed between ENVI 5.3.1 and 5.4. The exact same image is displayed differently using the default 2% linear stretch. I think the calculation of the 2% & 98% edges of the histogram is not correct in 5.4. Is this a known issue? When I use the histogram stretch tool in 5.4 the 2% linear stretch edge lines are actually at something like 6-7% & 99.98%. I can manually move those lines to the correct positions (2%, 98%) and match the color distribution that I have from ENVI 5.3.1. However, this is not precise, and is tedious when processing many images.

    Any input would be appreciated.

    Thank you!

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    16 May 2017 11:29 AM
    There were some updates to histograms and stretching in ENVI (not ENVI Classic) as mentioned in the What's new documentation under Image Processing:
    https://www.harrisgeospatial.com/docs/using_envi_WhatsNew.html#Image

    Could it be the difference is that you are auto-stretching on the view extent in 5.4?

    Dulci Avouris



    New Member


    Posts:51
    New Member


    --
    16 May 2017 01:19 PM
    Hello!

    I read the what's new update, with the added function of stretch on view extent. But the answer here is no, I am displaying the image at full extent, & comparing the rainbow color table display to the .tif from the exact same image generated in ENVI 5.3.1. There is a significant difference in the appearance of the image between the 2% stretch in 5.4 and the 2% stretch in 5.3.1. If I open the histogram stretch tool for 5.4, the edges - defining the pixel range that the 255 colors are distributed across - are at 99.99% on the high end, and 6-8% on the low end. When I manually move those edges to 98% and 2%, then the color distribution of the image in 5.4 matches that of 5.3.1. There was no additional processing or manipulation of the original image between when I opened it in 5.3.1. and in 5.4.

    So either the algorithm has been changed to calculate the 2% linear fit in a different way on purpose, or there is an error in the tool.

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    17 May 2017 09:14 AM
    I asked the developer who made the changes to the statistics calculation in ENVI 5.4 about any changes in the algorithm. There have been some changes but they did not think it would affect most data since it was primarily a change to support radar data that is floating point and have unusual data ranges. Would your data be similar to this?

    If not and you believe there is a problem with the statistics calculation, I would invite you to come through technical support so we might be able to access your data and determine what might be going on.

    Dulci Avouris



    New Member


    Posts:51
    New Member


    --
    17 May 2017 12:00 PM
    Thank you for the reply! I am working with MODIS data, where we have calculated the derivative and then performed a varimax-rotated PCA analysis on the data. The image that I am actually plotting is the VPCA score, which is a float point, but I don't think it has unusual data ranges, the value is in the range of -0.009 to 0.9.

    I can submit a technical support request, to further investigate. Thank you!
    You are not authorized to post a reply.