Google earth Image:从图像集合创建上下四分位数合成图像
Google earth Image: Create an upper and lower quartile composite image from an image collection
我正在尝试从图像集合(在此示例中为 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');
如果有人能提出一种方法来创建下四分位数像素值的合成,那将非常有用。
一个好人帮我回答了这个问题,所以我想我会post在这里:
您可以使用 ee.ImageCollection.reduce() 和 ee.Reducer.percentile() 创建下四分位数组合。例如:
Map.addLayer(
withNDVI.reduce(ee.Reducer.percentile([25])),
{bands:'NDVI_p25', min:-1, max:1},
'25 percentile NDVI'
);
我正在尝试从图像集合(在此示例中为 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');
如果有人能提出一种方法来创建下四分位数像素值的合成,那将非常有用。
一个好人帮我回答了这个问题,所以我想我会post在这里:
您可以使用 ee.ImageCollection.reduce() 和 ee.Reducer.percentile() 创建下四分位数组合。例如:
Map.addLayer(
withNDVI.reduce(ee.Reducer.percentile([25])),
{bands:'NDVI_p25', min:-1, max:1},
'25 percentile NDVI'
);