0

I've been trying to test SENTINEL, and found some functions to clean the clouds and edges of the images, but I do not understand exactly how this function works, and I'm very curious to understand better.

Which are, for example:

var cloudMask1 = function(image){
  var cfmask_conf = ee.Image(image.select(['B1']));
  return image.mask(cfmask_conf.lt(1600));
};

//Função que aplica uma máscara que remove os pixels com nuvem
//Essa função recebe cada imagem landsat e retorna a imagem sem nuvem
var cloudMask2 = function(image){
  var cfmask_conf = ee.Image(image.select(['B1']));
  return image.mask(cfmask_conf.lt(2700));
};

Could you explain me? Why the 1600 and 2700 values?

  • 1
    Hi, I suppose you understand what the code is doing, but you don't know why values of the aerosol band should be less than those values to be considered as clouds. Where did you get those values? You may get better answers if you indicate a source – Rodrigo E. Principe Jan 22 at 11:37
  • 1
    Hi Rodrigo. There are some approaches that triy to minimize the cloud effects doing some computation on the aerosol's band. But none of them are effective as your approach. :) Lilian, I guess this code is just a snippet from a cloud removal function, and the values were taken from interactive tests. – Etore Marcari Jr. Jan 22 at 13:59

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.