I am trying to create a cloud free image to use in the unsupervised classification, however my final product ("composite collection without cloud") stays with stranger stains and it seems to influence on the classification. Does anyone know the reason for the stains, and how to soften them?

Link to my code:


  • QA layer isn't perfect. Cloud borders commonly aren't identified in this layer, this is why your image looks with stains. Fast solution? Line 70, change mosaic by median (var composite_free_mosaic = composite_free.median();) if you want to produce a single image, not a collection (as you said in the question). With median, you're avoiding high values produced by clouds in the final image – aldo_tapia Jul 15 '19 at 21:17
  • @aldo_tapia thank you for your help. Do you know how identify cloud borders, as you said the QA layer isn´t ok? – DEA Jul 16 '19 at 14:19
  • You can try an algorithm with thermal band + VIS, I've seen in some papers, but I don't remember right now – aldo_tapia Jul 16 '19 at 15:17
  • Thank you @aldo_tapia! – DEA Jul 16 '19 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.