0

我正在尝试从图像集合(在此示例中为 Sentinel 2)创建合成图像,其中生成的合成的像素值是像素值分布的下四分位数或上四分位数。

很容易获得平均值、中值、最大和最小像素值,但我不知道如何合成较低的四分位数值。

// In this code I created a collection where all the clouds had been removed
// I then mapped the NDVI values to the entire Collection.
// I want to create a composite image of the lower quartile NDVI values

var withNDVI = col_noclouds.map(addNDVI);

// Get the max, min and median values in each band.
var maximum = withNDVI.max();
var minimum = withNDVI.min();
var median = withNDVI.median();


// Display the composite.
Map.addLayer(maximum, ndviParams_Col, 'maximum_NDVI');
Map.addLayer(median, ndviParams_Col, 'median_NDVI');
Map.addLayer(minimum, ndviParams_Col, 'minimum_NDVI');

如果有人可以建议一种方法来创建较低四分位数像素值的组合,那将非常有用。

4

1 回答 1

0

所以一个好人为我回答了这个问题,所以我想我会把它贴在这里:

您可以使用 ee.ImageCollection.reduce() 和 ee.Reducer.percentile() 创建下四分位数合成。例如:

Map.addLayer(
withNDVI.reduce(ee.Reducer.percentile([25])),
{bands:'NDVI_p25', min:-1, max:1},
'25 percentile NDVI'
);
于 2018-01-05T13:03:33.733 回答