我想在Google Earth Engine(GEE)中对Sentinel-2图像应用大气校正。我看到了用Python编写的Sammurphy代码,不幸的是它不适用于我。我使用下面的代码(Java)尝试了暗像素减法,但它在我感兴趣的区域上产生了一个完全黑暗的图像。
我对Earth Engine和JavaScript都是新手。有没有人尝试过对GEE中的Sentinel 2图像使用暗像素减法或任何其他大气校正(最好是用Java编写的代码)?
var toa=maskedComposite1;
var thresh= 0.5;
var dark=findDarkPixels(toa, thresh)
print(dark);
//Function to find dark pixels from threshold on sum of NIR, SWIR1, & SWIR2 bands
//Returns classified image with binary [0,1] 'dark' band
// toa: Sentinel 2 image converted to surface radiance
// thresh: threshold (0.2 - 0.5) value for sum of NIR, SWIR1 & SWIR2 bands
function findDarkPixels(toa, thresh) {
var darkPixels1 = toa.select(['B8','B11','B12']);
var darkPixels = darkPixels1.reduce(ee.Reducer.sum()).lt(thresh);
var filtered = darkPixels.focal_mode(0.1, 'square', 'pixels');
Map.addLayer(filtered,{},'darkPixel');
return filtered.rename(['dark']);
}
发布于 2020-07-07 18:28:23
如果您不需要特定的大气校正,则可以使用 GEE 中已有的 Level-2A Sentinel-2 数据。Here is the link to dataset info.该数据集的大气校正由 sen2cor 执行。请注意数据可用的时间段,因为 2A 级数据不适用于整个数据存档。
https://stackoverflow.com/questions/62723351
复制相似问题