I have implemented the s2cloudless code as written in the official documentation. The only changes I did were:
- Skipping the step where the median is calculated (I aim to do a time-series analysis);
- Adding code for: NDVI as well as more specific band maths, visparams for my assets and charting.
The code works perfectly and clouds as well as sometimes cloud shadows are masked out. However, I have noticed that sometimes agricultural fields are also nullified - see below.
I am guessing this is because recently mown fields look very pale? Albeit I was under the impression that the algorithm learnt cloud probability from a variety of pictures taken at different times, not from pixel colour.
Changing the var MAX_CLOUD_PROBABILITY doesn't yield different results.
What could lie behing that, and is there a way to refine the output? Alternatively, do you suggest any other cloud masking code that does not run the risk of masking out fields?
I am working with grass mowing detection, which is why it's important that pale fields remain in the picture.
Link to my code, if helpful.