首页 > 其他分享 >GEE C13 Exploring Image Collections 影像集详解

GEE C13 Exploring Image Collections 影像集详解

时间:2024-03-14 16:58:50浏览次数:19  
标签:Exploring Map ee Image Reducer filteredIC Collections image 影像

 

一、筛选和检查影像集

1.1代码

 1 // Define a region of interest as a point in haikou, hainan. 
 2 //var hkPoint = ee.Geometry.Point(110.3207, 20.04713); 定义一个点的时候,先经度后纬度。
 3 var hkPoint = geometry2; 
 4 // Center the map at that point. 
 5 Map.centerObject(hkPoint, 16); 
 6 
 7 // filter the large ImageCollection to be just images from 2020 
 8 // around Lisbon. From each image, select true-color bands to draw 
 9 var filteredIC = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA') 
10     .filterBounds(hkPoint) 
11     .filterDate('2023-01-01', '2024-01-01') 
12     .select(['B6', 'B5', 'B4']); 
13 print(filteredIC);
14 //查看筛选了多少张影像 
15 print('筛选后影像集合包含的影像张数:', filteredIC.size());
16 
17 // Add the filtered ImageCollection so that we can inspect values 
18 // via the Inspector tool 
19 Map.centerObject(filteredIC, 9);
20 Map.addLayer(filteredIC, {}, 'TOA image collection');

 

1 // Construct a chart using values queried from image collection. 
2 var chart = ui.Chart.image.series({ 
3     imageCollection: filteredIC, 
4     region: hkPoint, 
5     reducer: ee.Reducer.first(), 
6     scale: 10 
7 }); 
8 // Show the chart in the Console. 
9 print(chart);

 二、How many Images are there,everywhere on earth?

2.1 代码

 1 // compute and show the number of observations in an image collection 
 2 var count = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA') 
 3     .filterDate('2020-01-01', '2021-01-01') 
 4     .select(['B6']) 
 5     .count(); 
 6 print(count);
 7 // add white background and switch to HYBRID basemap 
 8 Map.addLayer(ee.Image(1), { palette: ['white'] }, 'white', true, 0.5); 
 9 Map.setOptions('HYBRID'); 
10 // show image count 
11 Map.addLayer(count, { 
12     min: 0, 
13     max: 50, 
14     palette: ['d7191c', 'fdae61', 'ffffbf', 'a6d96a', '1a9641'] 
15     }, 'landsat 8 image count (2020)'); 
16 // Center the map at that point. 
17 Map.centerObject(hkPoint, 5);

作用:可以查看某段时间内,某个地区某种传感器的影像覆盖的数量。

 可以看到红色箭头的地方B6波段有20个,说明2020年覆盖此区域的Landsat8影像有20景。

三、波段值

ee.Reducer.madian()

ee.Reducer.mean()

3.1 代码

 1 // Zoom to an informative scale for the code that follows. 
 2 Map.centerObject(hkPoint, 10); 
 3 // Add a mean composite image. 
 4 var meanFilteredIC = filteredIC.reduce(ee.Reducer.mean()); 
 5 print('meanFilteredIC',meanFilteredIC);
 6 Map.addLayer(meanFilteredIC, {}, 'Mean values within image collection'); 
 7 
 8 // Add a median composite image. 
 9 var medianFilteredIC = filteredIC.reduce(ee.Reducer.median()); 
10 print('medianFilteredIC',medianFilteredIC);
11 Map.addLayer(medianFilteredIC, {}, 'Median values within image collection'); 

mean:计算同一区域筛选的19景影像的平均值,即同一个像素处,19个值的平均值。

median:计算同一区域筛选的19景影像的中位数,即同一个像素处,19个值的中位数。

 ee.Reducer.madian()以及ee.Reducer.mean()之后,同一区域的19个影像集合ImageCollection 变成了单景影像Image。

 

四、Compute Multiple Percentile Images for an Image Collection

ee.Reducer.percentile()

4.1 作用

主要目的和应用

  • 理解数据分布:计算百分位数可以帮助你了解数据集中的数据分布情况,例如了解某个变量的中值(50th百分位)或者其他任何位置的分布情况。

  • 降噪和减少极值影响:通过集中于中位数(50th百分位)或其他百分位数(如25th或75th),可以减少极端值对分析的影响,从而在一定程度上降低数据的噪声。

  • 比较不同时间或地点:通过计算不同时间段或不同地理区域的百分位数,可以比较和评估变化趋势,例如气候变化研究中的温度或降水量变化。

  • 变化检测和趋势分析:在环境监测和资源管理中,利用百分位数来识别变化趋势或异常事件,如洪水、干旱等。

4.2 代码

1 // compute a single 30% percentile 
2 var p30 = filteredIC.reduce(ee.Reducer.percentile([30])); 
3 print('p30',p30);
4 Map.addLayer(p30, { min: 0.05, max: 0.35 }, '30%');

 

不是很懂。。。。

 再学习一下:https://download.csdn.net/blog/column/12161062/130162358

 

标签:Exploring,Map,ee,Image,Reducer,filteredIC,Collections,image,影像
From: https://www.cnblogs.com/bltstop/p/18073227

相关文章

  • Python collections详细介绍及实例
    Python的collections库提供了许多有用的数据结构,这些数据结构是对内建数据类型的补充。以下是一些collections库中主要数据结构的详细介绍和示例:CounterCounter是一个字典子类,用于计数可哈希对象。常用于统计字符出现的次数、列表中元素出现的次数等。示例:fromcollections......
  • Shopify 商品售卖属性优化插件之G:Variant Image + Color Swatch
    推荐一款很赞的Shopify商品售卖属性呈现样式优化的APP(G:VariantImage+ColorSwatch)安装此类插件列表页效果对比 图片来源:shejolly.com安装此类插件详情页效果对比未安装插件效果,图片来源:shejolly.com已安装插件效果,图片来源:shejolly.com未......
  • 中考英语首字母快速突破004-2021上海虹口英语二模-Exploring Fun Career Options for
    PDF格式公众号回复关键字:ZKSZM004原文​Withequalopportunities,womenareabletochoosetheirownidealjobs.Ifa9to5officejobisn'tyourstyle,considerthefollowingf(71)funjobsavailable.​Wedding(婚礼)planner​Whilesom......
  • 探索Flutter中的模糊毛玻璃滤镜效果:ImageFilter介绍使用和深入解析
    在Flutter中,模糊效果不仅可以增加应用的视觉吸引力,还可以用于多种场景,如背景模糊、图像处理等。通过BackdropFilter和ImageFilter.blur,Flutter使得添加和调整模糊效果变得异常简单。本文将深入探讨如何在Flutter中实现动态模糊效果,并通过TileMode参数调整模糊效果的边缘行为......
  • Collections
    一个操作集合的工具类setAll:批量添加数据shuffle:打乱List集合数据sort:对list集合进行排序......
  • SDI 通常指的是“System Deployment Image”,即系统部署映像。这是一个包含操作系统、
    SDI通常指的是“SystemDeploymentImage”,即系统部署映像。这是一个包含操作系统、应用程序和设置的映像文件,用于在多台计算机上进行相同配置的系统部署。如果您想要在Windows上读取用户的SDI文件,您可以按照以下步骤进行操作:使用DISM工具:Windows提供了一个名为DIS......
  • PhotoImage
    `PhotoImage`是`tkinter`(通常简称为`tk`)库中的一个类,用于在`tkinter`的GUI组件(如`Label`)中显示图像。`tkinter`是Python的标准图形用户界面(GUI)库,通常用于创建桌面应用程序。`ImageTk.PhotoImage`的作用是将PIL(PythonImagingLibrary,现在称为Pillow)图像对象转换为......
  • A Comprehensive Study of Image Classification Model Sensitivity to Foregrounds,
    问题引出概念  **背景敏感度(foregroundsensitivity)**是一种用于评估模型对前景和背景信息的敏感度的指标。通过计算模型在前景和背景噪声下的准确性,可以得到相对前景敏感度(RFS),用于比较不同模型在相同噪声水平下对前景和背景信息的敏感度。高RFS值表示模型在推断过程中更依......
  • tui-image-editor汉化
    tui-image-editor是一款开源的在线图片编辑包。官网:https://nhn.github.io/tui.image-editor/该工具未提供中文支持,下面是汉化的内容。//local_zh_cn.jsconstlocale_zh_cn={  'Load':'加载本地',  'Download':'下载当前',  'Custom':'自......
  • 【HarmonyOS】聊一聊ArkUI中的Image组件缓存
    【关键字】image组件,缓存 【问题描述】给Image组件设置网络图片展示,业务将图片进行了下线处理,再次进入这个页面Image组件还是展示着这张图,而不是恢复了默认占位图。 【问题分析】这个问题显然是跟Image组件的缓存机制有关。目前Image组件的图片会有内存缓存机制,会统计到......