Glint correction over UK coastal water

Discussion of your results and ACOLITE in general
Post Reply
JANETNICHOL
Posts: 21
Joined: Tue May 03, 2022 11:55 am

Glint correction over UK coastal water

Post by JANETNICHOL »

Hi Quinten
I am using Acolite for glint removal in UK coastal waters. I'm seeing what seems to be over-correction of glint, as the output images are extremely noisy, with many areas near the coast still showing strong glint, and null value pixels in deeper waters. The image was taken on a day of very low wind so the sea surface would be almost flat and most of the glint could be sky glint which unlike sun glint, is not directional. All the output bands show the same noise and null pixels. I used the Acolite default glint correction, then tried using the 865 NIR band, as well as increasing the glint theshold to 0.09, and these gave even worse results
I'm attaching an example of an output image as an example
Can you comment?
Many thanks, Janet
Attachments
Example of glint corrected Sentinel 2, bands 4,3,2
Example of glint corrected Sentinel 2, bands 4,3,2
Acolite_Glint_corrected_UKcoast.JPG (247.19 KiB) Viewed 91054 times
quinten
Posts: 1019
Joined: Tue Mar 03, 2015 8:13 am

Re: Glint correction over UK coastal water

Post by quinten »

Hi Janet

It looks to me the speckle is introduced by the flagging step. Could you share the scene filename then I can take a look?

If you are looking at relatively clear offshore waters that are affected by glint, perhaps other methods like POLYMER or C2RCC provide more robust results if the target can be modeled by their respective water models.

Quinten
JANETNICHOL
Posts: 21
Joined: Tue May 03, 2022 11:55 am

Re: Glint correction over UK coastal water

Post by JANETNICHOL »

HI Quinten
Many thanks for your reply
Here is the settings file I used

## ACOLITE settings
## Written at 2022-05-05 18:40:52
inputfile=C:/Users/Jannet/Documents/AtmCorr/S2A_MSIL1C_20200615T110631_N0209_R137_T30UYB_20200615T114105.SAFE
output=C:/Users/Jannet/Documents/AtmCorr/Out/20m
l2w_parameters=rhow_*
s2_target_res=20
l2w_mask_threshold=0.05
dsf_interface_reflectance=False
dsf_residual_glint_correction=True
l2w_export_geotiff=True
polygon=
rgb_rhot=False
rgb_rhos=False
map_l2w=False
runid=20220505_184051

By the way I have also tried the Venice study area used in the paper by Harmel et al 1018 and I attach the result of glint corrected images compared with mine using Acolite in the same study area.
JANETNICHOL
Posts: 21
Joined: Tue May 03, 2022 11:55 am

Re: Glint correction over UK coastal water

Post by JANETNICHOL »

Example_glint_corrections.jpg
Example_glint_corrections.jpg (140.29 KiB) Viewed 91043 times
Dear Quinten
Here are the glint corrected images of Venice study area for comparison
Janet
quinten
Posts: 1019
Joined: Tue Mar 03, 2015 8:13 am

Re: Glint correction over UK coastal water

Post by quinten »

Hi Janet

In the case of your first image, it seems in the strongest glint there are some negatives retrieved, leading to this speckle in the rhow products due to the masking. (You can check the l2_flags dataset, where most of the noise comes from pixels masked with value 8, some more details here: viewtopic.php?f=5&t=311)

In the case of the second image, how the RGB image is stretched determines how much of the glint signal is still visible in the composite (or single band data). The removal is not perfect and there will be some residual patterns in the image. Using the ACOLITE default of scaling the reflectances between 0 and 0.15 in each of the 8 bit RGB channels leads to quite good results:

TOA reflectance, 32TQR and 30UYB:
S2A_MSI_2016_07_18_10_10_28_T32TQR_L1R_rgb_rhot_50p.png
S2A_MSI_2016_07_18_10_10_28_T32TQR_L1R_rgb_rhot_50p.png (486.49 KiB) Viewed 91036 times
S2A_MSI_2020_06_15_11_17_04_T30UYB_L1R_rgb_rhot_50p.png
S2A_MSI_2020_06_15_11_17_04_T30UYB_L1R_rgb_rhot_50p.png (281.41 KiB) Viewed 91036 times
Surface level reflectance with glint correction:
S2A_MSI_2016_07_18_10_10_28_T32TQR_L2R_rgb_rhos_50p.png
S2A_MSI_2016_07_18_10_10_28_T32TQR_L2R_rgb_rhos_50p.png (500.02 KiB) Viewed 91036 times
S2A_MSI_2020_06_15_11_17_04_T30UYB_L2R_rgb_rhos_50p.png
S2A_MSI_2020_06_15_11_17_04_T30UYB_L2R_rgb_rhos_50p.png (290.31 KiB) Viewed 91036 times
Quinten
JANETNICHOL
Posts: 21
Joined: Tue May 03, 2022 11:55 am

Re: Glint correction over UK coastal water

Post by JANETNICHOL »

Hi Quinten
Thank you so much for going to all that trouble of downloading and processing my images!
Yes the RGB images do look better and glint seems non-exixtent or minimal
However I am wondering why, if glint can be reomoved from the RGB images why cannot it be removed from the rhow_* images?
I may follow your suggestion to try POLYMER and C2CRCC
Janet
quinten
Posts: 1019
Joined: Tue Mar 03, 2015 8:13 am

Re: Glint correction over UK coastal water

Post by quinten »

Hi Janet

The rhow_* data also have the glint correction applied, but due to the scaling of the data during visualisation the glint artefacts may still be very obvious. Many programs do an auto stretch, which will bring out detail and/or these artifacts. Perhaps my explanation in the previous post was not super clear, there are two effects in your examples:

1) The rhow_* are masked for some pixels where negatives are retrieved, i.e. the speckle/noise in the first post in this thread. The main culprit seems to be the 10 metre NIR band. You can disable this negatives mask by setting l2w_mask_negative_rhow=False or by changing the wavelength range to check for negatives, e.g. l2w_mask_negative_wave_range=400,800 If you do any of these changes, be aware you may have negatives in the results. :-) (See also the post I linked to before: viewtopic.php?f=5&t=311)

2) The glint appears to be still in the data, even after glint correction was applied. The glint patterns may be still present in the data as the correction is not perfect, but the bulk of the glint signal should be removed. It becomes more obvious if the data is stretched to smaller value ranges during visualisation. Detector boundary effects are also visible.

For example, making a rhow_* RGB composite from your scene in UK waters, with the default RGB stretch (note I also disabled negatives flagging here):
rgb_min=0.0,0.0,0.0
rgb_max=0.15,0.15,0.15
S2A_MSI_2020_06_15_11_17_04_T30UYB_L2W_rgb_rhow_default.png
S2A_MSI_2020_06_15_11_17_04_T30UYB_L2W_rgb_rhow_default.png (100.26 KiB) Viewed 91030 times
With a more narrow stretch:
rgb_min=0.0,0.0,0.0
rgb_max=0.05,0.05,0.05
S2A_MSI_2020_06_15_11_17_04_T30UYB_L2W_rgb_rhow_stretch1.png
S2A_MSI_2020_06_15_11_17_04_T30UYB_L2W_rgb_rhow_stretch1.png (131.37 KiB) Viewed 91030 times
With an even more narrow stretch:
rgb_min=0.0,0.0,0.0
rgb_max=0.025,0.025,0.025
S2A_MSI_2020_06_15_11_17_04_T30UYB_L2W_rgb_rhow_stretch2.png
S2A_MSI_2020_06_15_11_17_04_T30UYB_L2W_rgb_rhow_stretch2.png (124.43 KiB) Viewed 91030 times
With a stretch to 5th and 95th percentiles:
S2A_MSI_2020_06_15_11_17_04_T30UYB_L2W_rgb_rhow_stretchauto.png
S2A_MSI_2020_06_15_11_17_04_T30UYB_L2W_rgb_rhow_stretchauto.png (152.8 KiB) Viewed 91030 times
And for comparison the RGB generated by SNAP from the L2W data:
S2A_MSI_2020_06_15_11_17_04_T30UYB_L2W_RGB_SNAP25prc.png
S2A_MSI_2020_06_15_11_17_04_T30UYB_L2W_RGB_SNAP25prc.png (136.38 KiB) Viewed 91030 times

Note that rhow_* RGB output and the RGB autostretch are not available currently in the binary version of ACOLITE. (I have added them to the GitHub code just now for the purpose of this post. They can be generated from the GitHub code and future binaries by setting rgb_rhow=True and rgb_autoscale=True)

Let me know if there are still things unclear!

Quinten
JANETNICHOL
Posts: 21
Joined: Tue May 03, 2022 11:55 am

Re: Glint correction over UK coastal water

Post by JANETNICHOL »

Hi Quinten
Thank you so much for taking the time to reply to my queries
I've tried your advice about disabling the Glint Mask and the influence of contrast stretching on the output, and I think the result is now acceptable
Comparing (1) no glint correction, (2)Default Glint corrected and (3) Glint Mask Disabled. RGB images with Max Min 0.5%, 0.5% stretch
Comparing (1) no glint correction, (2)Default Glint corrected and (3) Glint Mask Disabled. RGB images with Max Min 0.5%, 0.5% stretch
Glint_Results1.jpg (226.69 KiB) Viewed 90973 times
Here are also the spectral plots across a small traverse of approximately 6km showing before any glint correction, and following glint correction with glint mask disabled
Many thanks again!
Janet
Attachments
Spectral profiles comparing no glint correction with glint correction with glint ams disabled
Spectral profiles comparing no glint correction with glint correction with glint ams disabled
graphs.jpg (462.81 KiB) Viewed 90973 times
Post Reply