MarcYin / SIAC

A sensor invariant Atmospheric Correction (SIAC)
http://www2.geog.ucl.ac.uk/~ucfafyi/Atmo_Cor/
GNU Affero General Public License v3.0
61 stars 17 forks source link

Strange RGB colors after applying NBAR #27

Closed nbennasr closed 1 year ago

nbennasr commented 1 year ago

Can you please take a look at the result of NBAR applied on the image below where RGB colors seem strange: id: 9c95c2cf-ce9a-4dd1-b29c-c065f10a119a name: downloads/S2B_MSIL1C_20220821T233649_N0400_R030_T60WWT_20220821T235303 mosaic periode: [2022-08-01 2022-08-31]

SIAC image

SIAC+NBAR image

MarcYin commented 1 year ago

Hi,

I tried with the same image and it seems to be ok for me?

SIAC:

Screenshot 2023-08-17 at 17 28 12

SIAC+ NBAR

Screenshot 2023-08-17 at 17 28 26

I run it with:

get_nbar.create_nbar('S2B_MSIL1C_20220821T233649_N0400_R030_T60WWT_20220821T235303.SAFE', mosaic_start_date = datetime(2022, 8, 1), mosaic_end_date=datetime(2022, 8, 31), Gee=False, use_VIIRS=True, nbar_sza = 'temporal_average_sza')
nbennasr commented 1 year ago

Hi @MarcYin

I run with the same parameters as you mentioned and I get the result of NBAR with strange colors. The last commit that I clone in my repo is 8afc2c3524e19df27cd7e906a7ce03b822896efd

SIAC: image

SIAC + NBAR: image

MarcYin commented 1 year ago

Yes, I have the same version. Could you please share the file so that I can check the intermediate outputs?

nbennasr commented 1 year ago

Thank you @MarcYin for your quick replay! You can find my output here

RGB band of SIAC + NBAR are: T01WCN_20220821T233649_B04_nbar_sza_temporal_avg.tif
T01WCN_20220821T233649_B03_nbar_sza_temporal_avg.tif
T01WCN_20220821T233649_B02_nbar_sza_temporal_avg.tif

MarcYin commented 1 year ago

Hi,

I can confirm this issue and it has been fixed in 6a41b20. It is caused by the calculation of mosaic hour crossing the antimeridian.

nbennasr commented 1 year ago

Thank you @MarcYin !