CNES / MAJA

Level-2A processor used for atmospheric correction and cloud-detection. The active repository is the one below, this one is kept to leave access to the older issues.
https://gitlab.orfeo-toolbox.org/maja/maja
Apache License 2.0
137 stars 25 forks source link

Negative values of surface relectance #76

Open hanamthang opened 3 years ago

hanamthang commented 3 years ago

Dear Colleges,

I successfully did an atmospheric correction (AC) for my study site (Tauranga Harbour, New Zealand) using MAJA 4.2.1. However, I got areas with negative surface reflectance (SR) which are too dark objects. It is understandable when considering the cloud shadows (image 2) but I do not know why the seagrass meadows got the negative values of SR (image 1).

That means something happened to my AC processing?

Regards, Thang screen1 screen2

jerome-colin commented 3 years ago

Hello, Can you check how this seagrass meadows area is flagged using the image MASKS/xxxx_MG2_R1.tif ?

Thanks, Jerome

hanamthang commented 3 years ago

Attached is the part of R1 mask. Patterns are masked as value 0 in black and 1 in grey colors. maskR1

If you need more details, I can upload the L2 somewhere.

Many thanks, Thang

jerome-colin commented 3 years ago

Hello Thang, If you can send me this L2 via wetransfer or equivalent, I'll have a look. Thanks, Jerome

hanamthang commented 3 years ago

Please have a look at the L2 image from the following link:

https://drive.google.com/file/d/1_Z-SQJviSntpS_QoVGNMvG4MiO080xK7/view?usp=sharing

My appreciation to your time! Thang

jerome-colin commented 3 years ago

The content of your cloud mask may suggest that you used Maja in mono-temporal mode, and this would determine the strategy to estimate aerosol optical depth too, which varies strongly within your area of interest. Do you confirm you only used this image as input, or if not, how much products did you ingested in a multi-temporal sequence before this image of April 5th ? Besides, did you activated the CAMS aerosol option ? Thanks, Jerome

hanamthang commented 3 years ago

Thank you for the very useful information. I would like to confirm the following issues:

  1. I used MAJA in mono-temoporal mode.
  2. I used only the S2 scene date April 5th for testing purpose.
  3. I am not sure whether the CAMS aerosol option activated or not since I used MAJA for the first time.

The command line I used to process L1C:

./startmaja -f path-to-folders.txt -t 60HVD

Other parameters might be in default.

jerome-colin commented 3 years ago

Dear Thang, I see two problems that combine: the water mask may not be accurate enough on the bay of Plenty, such that some pixels over shallow water may be processed as land surface. Combined with the use of Maja in a mono-temporal mode, it significantly degrades the estimates of Aerosol Optical Thickness (in mono-temporal mode, the AOT estimate is based on a multi-spectral dark dense vegetation approach since no temporal information is available). In your case, if you look at the patterns in the band 2 of the file ending with "ATB_R1.tif" (AOT=DN/200), the AOT is probably largely over-estimated in the Bay, and dense vegetation pixels surrounding shallow water are over-corrected. This is not the nominal use of Maja. Instead, I recommend you to perform a multi-temporal run by providing L1C products for the period from early March to April 5th. This won't fix the shallow water pixels issue, but a least you'll benefit from the multi-temporal AOT estimation method. And since the default aerosol model is probably far from matching the actual situation over the coast of New-Zealand, I'd recommend you download the CAMS aerosol data (procedure described in the README) and activate the option --cams. Hope this helps, Jerome

hanamthang commented 3 years ago

I understood.

I can do the temporal L1C processing with downloaded CAMS aerosol data (using option --cams) in Maja.

Still wondering that how can I accurately use the water mask and at which steps I can do to make Maja accurately corrected for shallow water pixels? This is the most important part since my area of interest is the shallow water in the coastal zones.

The L1C scene date April 5th. acquired at the low tide - that means some parts of the harbour are exposed and the pixels might be corrected as the land pixel. If I use a scene in high tide, will the water mask be made accurately? And the problem of over-correction for dense vegetation will be fixed (assuming that a temporal and cams activation are both used)?

Regards, Thang

olivierhagolle commented 3 years ago

Hi Thang, MAJA is a multi-temporal method aimed at working on lands. It therefore when applied to time series, and for lands that it gives its best results. Over water, the information for aerosols is extrapolated from the available land nearby, it might therefore be less accurate. Moreover, MAJA isnot able to detect cloud shadows above water.

The water mask is also based on time series, and water must be present on more than 50 percent of the 10 previous images to e classified as water.

Best regards, Olivier

hanamthang commented 3 years ago

Thank you very much to clarify the field where MAJA work best. I will try to test later with temporal S2 images in the high tide. It is still very potentially for me to correct image and use for mangrove/salt-marsh scenes.

Thank you for all your efforts to make MAJA be open-source application for us.

Thang