Statistics 谷歌地球引擎的光谱可分性分析
我是个新来的使用GEE的人 我需要使用Sentinel 2图像进行分类,为此,我需要进行光谱可分性分析,以选择最佳波段和植被指数。所以,我需要计算训练场地的平均值和标准差。我尝试使用这段代码,但结果没有用Statistics 谷歌地球引擎的光谱可分性分析,statistics,classification,spectral,gee,sentinel2,Statistics,Classification,Spectral,Gee,Sentinel2,我是个新来的使用GEE的人 我需要使用Sentinel 2图像进行分类,为此,我需要进行光谱可分性分析,以选择最佳波段和植被指数。所以,我需要计算训练场地的平均值和标准差。我尝试使用这段代码,但结果没有用 // Get the Mean of the bands of the image for the polygons of the Vegetation class var MeanTraining = Image.reduceRegions({ collection: Vegetatio
// Get the Mean of the bands of the image for the polygons of the Vegetation class
var MeanTraining = Image.reduceRegions({
collection: Vegetation, // Vegetation is a FeatureCollection of polygons
reducer: ee.reducer.mean(),
scale:30
});
此代码计算在“植被”类中分隔的每个多边形的平均值和标准偏差,而不是该类的全局值。所以在运行了这段代码之后,我得到了植被类的很多方法和SD。有人知道如何获得ee.FeatureCollection
的平均值和标准偏差吗
提前感谢,,
马科斯我在脚本中发现了错误 在定义矢量(植被)时,有必要使用几何体,而不是集合。下面是正确的脚本
// Get the Mean of the bands of the image for the polygons of the Vegetation class
var MeanTraining = Image.reduceRegions({
geometry: Vegetation,
reducer: ee.Reducer.mean(),
scale:30
});
我在脚本中发现了错误 在定义矢量(植被)时,有必要使用几何体,而不是集合。下面是正确的脚本
// Get the Mean of the bands of the image for the polygons of the Vegetation class
var MeanTraining = Image.reduceRegions({
geometry: Vegetation,
reducer: ee.Reducer.mean(),
scale:30
});