Glint in WorldView 2 Image

7771
33
01-11-2012 06:05 PM
RamiSaeed
New Contributor
Hello All,

I got my hands on an 8 band WorldView 2 image, sadly the entire image is covered with sun glint since its a marine image... i would like to know of how to remove this glint problem... Thanks
0 Kudos
33 Replies
RamiSaeed
New Contributor
I copy and pasted it, well it seems that even if i used a space between "do begin" it still doesnt work... maybe there is a problem with the isntallation of the program... ill try and reinsatall the software and see how things go from there... BTW, thanks for all the help that you gave...
0 Kudos
Luke_Pinner
MVP Regular Contributor
What version of ENVI do you have? You could also try (after opening the image in ENVI, selecting the ROI, exporting variables etc...) in the IDL Workbench, create a new file, paste my code in, save it and then click compile then click run.
0 Kudos
RamiSaeed
New Contributor
Im using Envi 4.7... I'll it again and see what i get...
0 Kudos
JeremyTaylor
New Contributor
lpinner,
   Love the script. Got it working on my second try but I have some questions. I am looking at the output data and it seems that the map info(projection,datum,etc.) is stripped away. I'll admit I am new to IDL and ENVI (in fact before someone pointed out your script I was writing a script of my own in perl). Looking through your code it looks like the map info is lost at line:

nird=data[*,*,7]

and never added back in.

Am I reading this right? Is there a way to add this data back in after the calculations are completed like you did for bands 7 & 8?
0 Kudos
Luke_Pinner
MVP Regular Contributor
IDL doesn't use ENVI georeferencing. The map info is lost from the time you export the data to IDL arrays. Just right click on the layer in the available bands window after you import the deglinted array back into ENVI, edit the header and import the header from the original glint affected image.
0 Kudos
RamiSaeed
New Contributor
Hello, been a while... so here's the update... In the end the IDL didnt work... which is kinda a downer.. but i think i figured something out in the process that i would like to share in order to determin if its legit or just my imagination...

You know in Envi it got this "relative water depth" wizard, so when i used it, it generated three files, and one of them was a RGB file, the when displayed, it kind of shows that the glint has be processed... does this mean that the glint is gone?

the down part is that its an RGB, and the total benifit of having an 8-band is gone... so still working on it trying to figure it out...


On another note...

Lets assume that for a moment that it did work.. and one of the files generated by envi is from using the "relative water depth" wizard is actually the water depth that i want to use... and from another source i got a marine survey done with coordinated depths... is there a way in ArcGIS to do an interpolation where i link the sampled water depths with the whole image in order to figure out the rest?
0 Kudos
LubaReshitnyk
New Contributor
Hi Luke,

I've managed to run the script, however, my results aren't anywhere close to useable. My question is: did you use your raw imagery or have you converted the data to radiance, or reflectance?

Cheers

Luba
0 Kudos
Luke_Pinner
MVP Regular Contributor
Both raw and radiance (output as integer with scale factor of 1000, standard ENVI WV2 radiance calculation).

Here's one done with integer radiance values, top is glint affected, bottom is same region following deglinting:
[ATTACH=CONFIG]12916[/ATTACH]
0 Kudos
Luke_Pinner
MVP Regular Contributor
I've updated this script (see attached) to run from an ENVI menu item.  From the readme file:

Reference:
    Hedley, JD, Harborne, AR and Mumby PJ (2005)
    Simple and robust removal of sun glint for mapping shallow-water benthos
    International Journal of Remote Sensing 26 (10), pp 2107�??2112.
   
Notes:
    If you have any land in your image, this method will make it look terrible.
    As is stated in Hedley et al. (2005): "the algorithm is valid only for submerged pixels".
   
    Only run this tool prior to pansharpening as:
       a. It loads the entire image into memory
       b. It will take a lot longer...
   
Installation:
   Copy deglint.sav to the ENVI "save_add" directory:

ENVI 4.8:
- Windows: C:\Program Files\ITT\IDL\IDL80\products\envi48\save_add\
- OSX: /Applications/itt/idl/idl80/products/envi48/save_add/
- *Nix: /usr/local/itt/idl/idl80/products/envi48/save_add/

ENVI 5.0 (Classic):
- Windows: C:\Program Files\Exelis\ENVI50\classic\save_add\
- OSX: /Applications/Exelis/ENVI50/classic/save_add/
- *Nix: /usr/local/Exelis/ENVI50/classic/save_add/

   Next time you start ENVI 4.8 or ENVI 5.0 (Classic) there will be a "Deglint" tool in the Spectral menu.
        
Usage:
   Start ENVI 4.8 or Envi Classic 5.0, open and display the image you want to deglint. Start the ROI tool and define an ROI containing a number of samples of areas of deep water. Select the "Spectral"->"Deglint" menu option and follow the prompts.
0 Kudos
RamiSaeed
New Contributor
Thanks lpinner, once i got an email that there was a new post i got all excited, especially to try out this new tool... I'll give it a shot and let you know how it turns out... BTW, does it work on 4.7 or just 4.8 & 5.0?
0 Kudos