Here I have updated the script a bit. Lots of queries regarding replacement. code.earthengine.google.com/ea87531615f4612cd36359c295140194 First I masked the cloudy image as well as the replacement image and merged them together as mean. You can even apply add at the end of the script if you don't prefer the image collection method. It is necessary to mention that both images that you are merging must have the same number of bands. Dr. Ujaval Gandhi @SpatialThoughts have interesting script on time-series interpolation (gap-filling). Here is the link spatialthoughts.com/2021/11/08/temporal-interpolation-gee/ Dr. Ujaval's methodology is the correct way to achieve it. I presented the concept of replacing masks for this video only. 🙂
Hi, I'm a newbie to GEE. I am working on one project where I have to calculate NDVI value for a month. And I wanted to ask you, then I fill empty places with other image's pixels, can I still calculate NDVI on it? Can I make calculations? Or is it only for visualization?
Yes you will be able to calculate NDVI but suppose your point lies at location where pixel value of previous date image is present. That will give you same value for the two dates. Since it is your project I suggest you do time-series interpolation rather than doing this. I also understand that you’re a newbie to Earth Engine so I’ll share the link with you. Look at the code and try to implement it. Where you face an error or issue we will discuss. Write an email to me muddasirshah@outlook.com, I will try my best to solve this problem of yours.
Thank you a lot for this very interesting tutorial! I have two questions: 1. How can I apply the correction on an entire collection without merging the images ? Should I just delete the word 'mean' from this script ? "var filled = ee.ImageCollection([orignal_cm,replacement_fill]).mean()" 2. why the var 'replacementImage' has different filter date from cloudy image? thanks !
Hi thank you for the complements. 1. Basically it is a naive kind of approach of mine to fill the masked portion. What I did was that I filtered another cloud free image and wanted to replace the cloudy portion with portion of that image. So basically I had two images the cloudy masked image and the replacement image that is cloud free. I applied a mean reducer. If you remove the mean it will give you error. This overall process is known as image timeseries cloud interpolation. Read the pinned comment and you’ll get an idea like how it’s actually dealt with. Dr. Ujaval Gandhi has explained the process well.
Hi Sofy! Thank you for the comment. Actually it’s not the cloud of the original image. If you see that one the cloud is more dense and shadow is dark. This I believe is the cloud in second image (mean image with less than 10% CC). The whole Idea is that I replaced it with pixels of other image. You can apply a mean filter on the cloud masked image and blend that or interpolate the same image that will also fill the nulls. 🙂
Here I have updated the script a bit. Lots of queries regarding replacement.
code.earthengine.google.com/ea87531615f4612cd36359c295140194
First I masked the cloudy image as well as the replacement image and merged them together as mean. You can even apply add at the end of the script if you don't prefer the image collection method.
It is necessary to mention that both images that you are merging must have the same number of bands.
Dr. Ujaval Gandhi @SpatialThoughts have interesting script on time-series interpolation (gap-filling). Here is the link
spatialthoughts.com/2021/11/08/temporal-interpolation-gee/
Dr. Ujaval's methodology is the correct way to achieve it. I presented the concept of replacing masks for this video only. 🙂
This chanel is a gem!
Haha thank you
After blend, there is no pixel value why? it say no unmasked pixel. it is not possible to use for LULC
PFA code.earthengine.google.com/ea87531615f4612cd36359c295140194
Please, how can i do Cloud Masking and Cloud Removal (Fill Nulls) of Landsat 8 and Landsat 7 in Google Earth Engine ?
Hi use can use the quality bands from Landsat and generate cloud mask from the cloudy bits.
Watch this tutorial. It’s for Sentinel-2 but the idea the same
ua-cam.com/video/989DoViDORo/v-deo.htmlsi=4HqgVniZpXhsCD7N
@@MuddasirShah Thank you for your reply. I did already remove cloud but the problem is the pixels that contains clouds has been delete.
@@hindlamrani7078 so you want gap filling?
@@hindlamrani7078 spatialthoughts.com/2021/11/08/temporal-interpolation-gee/
Hello sir, I'm wondering why we use first() image on "maskedCollection" and "filled"?
That is just for the tutorial 🙂 you can use any image
@@MuddasirShah i use filtering image by id but it doesn't work. Where is the mistake?
@@bobayato2274 ua-cam.com/video/DFlmm7jr1pw/v-deo.html
@@MuddasirShah Thank you, sir.
@@bobayato2274 most welcome 🤗
Hi, I'm a newbie to GEE. I am working on one project where I have to calculate NDVI value for a month. And I wanted to ask you, then I fill empty places with other image's pixels, can I still calculate NDVI on it? Can I make calculations? Or is it only for visualization?
Yes you will be able to calculate NDVI but suppose your point lies at location where pixel value of previous date image is present. That will give you same value for the two dates.
Since it is your project I suggest you do time-series interpolation rather than doing this. I also understand that you’re a newbie to Earth Engine so I’ll share the link with you. Look at the code and try to implement it. Where you face an error or issue we will discuss. Write an email to me muddasirshah@outlook.com, I will try my best to solve this problem of yours.
spatialthoughts.com/2021/11/08/temporal-interpolation-gee/
how to see metadata selected image,
Print the image variable
ua-cam.com/video/UrmOKofhCmA/v-deo.html
@@MuddasirShah i've some trouble when print metadata, would you check my script
Where i get contact for you
@@thebelltools9673 please send script link on muddasirshah@outlook.com
@@thebelltools9673 please make sure assets are open to read.
plz make video for Landsat 5, 7, 8 cloud masking too. Thanks
Sure
Thank you a lot for this very interesting tutorial!
I have two questions:
1.
How can I apply the correction on an entire collection without merging the images ?
Should I just delete the word 'mean' from this script ? "var filled = ee.ImageCollection([orignal_cm,replacement_fill]).mean()"
2. why the var 'replacementImage' has different filter date from cloudy image?
thanks !
Hi thank you for the complements.
1. Basically it is a naive kind of approach of mine to fill the masked portion. What I did was that I filtered another cloud free image and wanted to replace the cloudy portion with portion of that image. So basically I had two images the cloudy masked image and the replacement image that is cloud free. I applied a mean reducer. If you remove the mean it will give you error.
This overall process is known as image timeseries cloud interpolation. Read the pinned comment and you’ll get an idea like how it’s actually dealt with. Dr. Ujaval Gandhi has explained the process well.
I received your email too. I’ll write to you tomorrow if I get time :)
Hi, you haven't pasted a link to the code, it still says "coming soon"
Hi, I am very busy these days. If you have any queries I reply through emails quickly
muddasirshah@outlook.com
but it's still a cloud that is visible and not covered
Hi Sofy!
Thank you for the comment. Actually it’s not the cloud of the original image. If you see that one the cloud is more dense and shadow is dark.
This I believe is the cloud in second image (mean image with less than 10% CC). The whole Idea is that I replaced it with pixels of other image. You can apply a mean filter on the cloud masked image and blend that or interpolate the same image that will also fill the nulls. 🙂
@@MuddasirShah Thankyou for the response....
@@MuddasirShah muddasir why do you use mean ?
@@sofypuspita7715 because I like mean. Just needed an image
@@MuddasirShah okey, thank youu...
muddasir how are you? I lost contact with you
Hi Sofy, How are you? Pls email me at muddasirshah@outlook.com, I will share my WhatsApp there
Jinab tuhi hakwa eh provide aase kareth
Mudarris, where are you from? from Palestine, right?
Pakistan
Second version:
var cld = require('users/fitoprincipe/geetools:cloud_masks')
var test_image = s2SR.first()
var masked = cld.sclMask(['cloud_low', 'cloud_medium', 'cloud_high', 'shadow'])(test_image)
Map.addLayer(masked, {bands:['B8', 'B11', 'B4'], min:0, max:5000}, 'masked')