惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
The Register - Security
The Register - Security
量子位
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
Jina AI
Jina AI
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
T
Tor Project blog
H
Hacker News: Front Page
A
Arctic Wolf
NISL@THU
NISL@THU
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
V
V2EX
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
I
InfoQ
D
Docker
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42

博客园 - 风过 无痕

ArcGIS Pro+Gemini+ChatGPT+遥感AI+图解建模+无人机赠送GMail+高分影像 3种数字高程模型模型精度对比研究Accuracy Assessment of Alos W3d30, Aster Gdem and Srtm30 Dem The State of World Fisheries and Aquaculture 2024 - Blue Transformation in action Global Food and Nutrition Security - Key messages What is the naming convention for Landsat Collections Level-1 scenes? 大模型的幻觉是不可避免 GEE哨兵-2光学卫星(S2)地表反射率和NDVI下载 CreateHolesInImage说明文档-对于遥感影像的空洞创建多边形矢量数据 博客园导入word文档docx, doc, markdown md文档的方法 搜狗输入法占用vs visual studio 编译快捷键冲突的解决方法 安卓平板小米平板5取消自动分屏 LANDSAT LC08 C02 T1_L2 metadata dictory 元数据字典 Landsat 8 Collection 2 Tier 1 calibrated top-of-atmosphere (TOA) reflectance Acrobat pdf 编辑添加下划线acrobat pro SuperMap iObjects.NET 64位开发入门 多个文本文件合并 IDL实现TM遥感影像直方图统计(中值、均值、方差、众数及峰度系数计算)(转) envi5.3打开失败JSON_PARSE: Invalid string, no closing '"' GEE的存储空间 Photoshop无法载入动作,因为意外地遇到文件尾-处理办法 ArcGIS空间分析案例教程-网格和标记生成
GEE云量计算简单云量估计 主要功能 从数据集中选择云量最小的像素,输出展示
风过 无痕 · 2023-11-27 · via 博客园 - 风过 无痕

 GEE云量计算

作者:赤豆冰棍
链接:https://www.jianshu.com/p/b9e8de78c951

简单云量估计

主要功能

从数据集中选择云量最小的像素,输出展示

代码

// SimpleCloudScore, an example of computing a cloud-free composite with L8

// by selecting the least-cloudy pixel from the collection.

// A mapping from a common name to the sensor-specific bands.

var LC8_BANDS = ['B2',   'B3',    'B4',  'B5',  'B6',    'B7',    'B10'];

var STD_NAMES = ['blue', 'green', 'red', 'nir', 'swir1', 'swir2', 'temp'];

// Compute a cloud score.  This expects the input image to have the common

// band names: ["red", "blue", etc], so it can work across sensors.

var cloudScore = function(img) {

  // A helper to apply an expression and linearly rescale the output.

  var rescale = function(img, exp, thresholds) {

    return img.expression(exp, {img: img})

        .subtract(thresholds[0]).divide(thresholds[1] - thresholds[0]);

  };

  // Compute several indicators of cloudyness and take the minimum of them.

  var score = ee.Image(1.0);

  // Clouds are reasonably bright in the blue band.

  score = score.min(rescale(img, 'img.blue', [0.1, 0.3]));

  // Clouds are reasonably bright in all visible bands.

  score = score.min(rescale(img, 'img.red + img.green + img.blue', [0.2, 0.8]));

  // Clouds are reasonably bright in all infrared bands.

  score = score.min(

      rescale(img, 'img.nir + img.swir1 + img.swir2', [0.3, 0.8]));

  // Clouds are reasonably cool in temperature.

  score = score.min(rescale(img, 'img.temp', [300, 290]));

  // However, clouds are not snow.

  var ndsi = img.normalizedDifference(['green', 'swir1']);

  return score.min(rescale(ndsi, 'img', [0.8, 0.6]));

};

// Filter the TOA collection to a time-range and add the cloudscore band.

var collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')

    .filterDate('2017-05-01', '2017-07-01')

    .map(function(img) {

      // Invert the cloudscore so 1 is least cloudy, and rename the band.

      var score = cloudScore(img.select(LC8_BANDS, STD_NAMES));

      score = ee.Image(1).subtract(score).select([0], ['cloudscore']);

      return img.addBands(score);

    });

// Define visualization parameters for a true color image.

var vizParams = {bands: ['B4', 'B3', 'B2'], max: 0.4, gamma: 1.6};

Map.setCenter(-120.24487, 37.52280, 8);

Map.addLayer(collection.qualityMosaic('cloudscore'), vizParams);

步骤分析

  1. 创建LC8波段顺序名称列表
  2. 定义函数cloudScore用于计算云量
  3. 创建数据集对象,获取LC8数据,使用时间筛选,选择云量(cloudscore)波段,获取1-cloudscore结果作为score新波段,添加到该景影像中
  4. 定义显示参数
  5. 设置地图中心,缩放等级
  6. 添加图层,图层内容使用函数cloudScore来计算数据集中的所有数据,并且返回云量最少部分,镶嵌成为一个图层用于显示

主要方法

  1. ee.Image.qualityMosaic()
    Composites all the images in a collection, using a quality band as a per-pixel ordering function.
    Arguments:
    this:collection (ImageCollection):
    The collection to mosaic.
    qualityBand (String):
    The name of the quality band in the collection.
    Returns: Image

组合一个数据集内的所有数据,使用一个质量控制波段来决定像素值
输入参数:数据集,质量控制波段名称