X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 06 Jun 2018 06:33 AM by  MariM
ENVI - Estimate Noise Statistics From Data - Error
 15 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Vicente Jeria



New Member


Posts:9
New Member


--
05 Jun 2018 10:01 AM
    Hi everyone!

    I have this problem: when I am calculating the Estime Noise Statistics From Data in ENVI, I get the following error: "The number of the pixels in the shift difference spatial subset should greater than the number of input bands. Please enlarge the spatial subset for noise statistics". In other topic, I read that this problem may occur due bad bands, maybe identical min and max values or values equal to 0 and that I have to edit the header of image. In this sense, I don´t know how edit the header and what do I have to do.

    Please help me!

    Many thanks!

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    05 Jun 2018 10:31 AM
    What version of ENVI are you using? In the latest versions, you will go to View Metadata->Edit Metadata. Here you will need to set the bad bands to 'bad' in the dialog. This requires you first determine which bands are bad by looking at the image spectra, statistics, etc. For example, if you see two bands that have the same mean and standard deviation, then it is likely it is a duplicate band. Or more commonly, if one of the bands is all 0 due to a bad sensor which is common in many hyperspectral sensors in the blue bands. You may need to set these bands to 'bad' in the header. Once you set the bad bands in the header, save it and try the process again.

    Vicente Jeria



    New Member


    Posts:9
    New Member


    --
    05 Jun 2018 10:47 AM
    Many thanks Mari!

    I am using ENVI Classic 5.2 and I am preprocessing a Aster L1B image.

    Basic Stats Min Max Mean Stdev
    Band 1 0.026400 0.287000 0.098219 0.022197
    Band 2 0.030100 0.352200 0.111724 0.027324
    Band 3 0.039900 0.381000 0.122994 0.028320
    Band 4 1.000000 1.000000 1.000000 0.000000
    Band 5 0.890300 0.890300 0.890300 0.000000
    Band 6 0.844000 0.844000 0.844000 0.000000
    Band 7 0.921800 0.921900 0.921801 0.000012
    Band 8 0.856500 0.856500 0.856500 0.000000
    Band 9 1.000000 1.000000 1.000000 0.000000

    I think bands 4, 5, 6, 8 and 9 are wrong.

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    05 Jun 2018 11:16 AM
    I agree that those bands look incorrect. Are these the statistics from only opening the file in ENVI Classic? Did you pre-process the file in some way?

    Vicente Jeria



    New Member


    Posts:9
    New Member


    --
    05 Jun 2018 11:28 AM
    Yes, I did the following process:

    1. Cross-Talk correction using SWIR Data IO Setup
    2. Opening the file in ENVI Classic 5.2
    3. Layerstaking VNIR-SWIR bands
    4. Changing bands interleave
    5. FLAASH atmospheric correction
    6.Post-FLAASH Band Math
    7. Resizing data
    8. Reducing Noise (increasing S/N ratio)...... and here I get the problem.

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    05 Jun 2018 12:17 PM
    What are the statistics of the radiance image you use for input to FLAASH and what are they after FLAASH? Somewhere along the way, the statistics return bad values. I am not sure what the Cross-talk correction is doing but it sounds like this result is used directly in FLAASH (after stacking and changing the interleave).

    Vicente Jeria



    New Member


    Posts:9
    New Member


    --
    05 Jun 2018 12:46 PM
    The statistics of the radiance image (input) are:

    Basic Stats Min Max Mean Stdev
    Band 1 0.000000 171.703995 54.467728 41.190968
    Band 2 0.000000 179.832001 54.106559 42.184214
    Band 3 0.000000 207.742004 41.847880 32.968428
    Band 4 0.000000 55.219601 36.649617 26.087984
    Band 5 0.000000 17.678400 11.729868 8.353174
    Band 6 0.000000 15.875000 10.533317 7.501043
    Band 7 0.000000 15.163800 10.064847 7.163811
    Band 8 0.000000 10.591801 7.030525 5.003763
    Band 9 0.000000 8.077201 5.361170 3.815902

    And, the statistics of reflectance image (output) are:

    Basic Stats Min Max Mean Stdev
    Band 1 -858 4422 1079.866718 853.792764
    Band 2 -82 5334 1404.605135 1120.454958
    Band 3 -327 8662 1630.907828 1299.428456
    Band 4 -98 10157 6696.156529 4777.412446
    Band 5 -34 8909 5907.290458 4206.876722
    Band 6 -30 8454 5590.705676 3991.352726
    Band 7 -28 9238 6064.114314 4373.580403
    Band 8 -24 8580 5648.903304 4058.845735
    Band 9 -32 11872 7838.552624 5611.877334

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    05 Jun 2018 12:56 PM
    Those look like they have valid ranges. Did you use a scale factor of 10 for FLAASH?
    So after FLAASH, you performed Band Math, which would use an equation:
    float(b1)/10000
    to get to percent reflectance. How did you end up with all pixels having a value of 1.0 in band 4 and band 9? And all pixels in Band 6 having the exact same value 0.844?

    Vicente Jeria



    New Member


    Posts:9
    New Member


    --
    05 Jun 2018 01:10 PM
    Yes, I used scale factor of 10 for FLAASH and I used this equation post-FLAASH: (B1 le 0)*0+(B1 ge 10000)*1+(B1 gt 0 and B1 lt 10000)*float (b1)/10000.

    I don´t have answers for your two finals questions. :(

    I did the same pre-processing for another Aster image and it worked.

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    05 Jun 2018 01:36 PM
    And what are the stats of using your band math equation? This is the likely place where the bands became all 1.s or the same value.

    Vicente Jeria



    New Member


    Posts:9
    New Member


    --
    05 Jun 2018 01:43 PM
    The stats post band math are:

    Basic Stats Min Max Mean Stdev
    Band 1 0.000000 0.442200 0.108000 0.085357
    Band 2 0.000000 0.533400 0.140461 0.112045
    Band 3 0.000000 0.866200 0.163095 0.129937
    Band 4 0.000000 1.000000 0.662727 0.472779
    Band 5 0.000000 0.890900 0.590735 0.420679
    Band 6 0.000000 0.845400 0.559078 0.399125
    Band 7 0.000000 0.923800 0.606425 0.437339
    Band 8 0.000000 0.858000 0.564901 0.405870
    Band 9 0.000000 1.000000 0.661149 0.473319

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    05 Jun 2018 01:59 PM
    And this is the file you use as input to MNF and calculating noise statistics? Or is there another step? These are not the stats from the file you showed with the bands set to the same value.

    Vicente Jeria



    New Member


    Posts:9
    New Member


    --
    05 Jun 2018 02:09 PM
    Yes, one more step, and I think that here is the problem. I changed the size of image with Basic tools->Resize data and then I got the following stats:

    Basic Stats Min Max Mean Stdev
    Band 1 0.026400 0.287000 0.098219 0.022197
    Band 2 0.030100 0.352200 0.111724 0.027324
    Band 3 0.039900 0.381000 0.122994 0.028320
    Band 4 1.000000 1.000000 1.000000 0.000000
    Band 5 0.890300 0.890300 0.890300 0.000000
    Band 6 0.844000 0.844000 0.844000 0.000000
    Band 7 0.921800 0.921900 0.921801 0.000012
    Band 8 0.856500 0.856500 0.856500 0.000000
    Band 9 1.000000 1.000000 1.000000 0.000000


    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    05 Jun 2018 02:49 PM
    So you resized by dimensions/pixel size and some of the resulting bands are all 1s? I have not seen that behavior before. Did you use the Resize Data tool and what are the parameters did you use?

    Vicente Jeria



    New Member


    Posts:9
    New Member


    --
    05 Jun 2018 03:07 PM
    Yes, that is the situation. I used the Resize Data (Spatial/Spectral) tool, then I pushed "Spatial Subset" and then I tried selecting the area throught "map" and "file" and in both cases I got the same situation,

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    06 Jun 2018 06:33 AM
    Hmm, it doesn't make any sense to me. Can you post the .hdr information from the file before resizing. I will create a dummy dataset and see if I can reproduce the issue.
    You are not authorized to post a reply.