GEE——使用cart机器学习方法对Landsat影像条带修复以NDVI和NDWI为例(全代码)

本文主要是介绍GEE——使用cart机器学习方法对Landsat影像条带修复以NDVI和NDWI为例(全代码),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

简介

之前发表了两篇关于影像修复的文章,并且制作了APP,大家可以去看以下的两篇博客来了解具体的研究内容和整个方法的有效性:

Google Earth Engine APP——影像条带色差、色调不均匀等现象解决方案Landsat5 NDWI Image Restoration APP_ndwi不能识别泛红水体怎么办-CSDN博客

基于GEE云平台一种快速修复Landsat影像条带色差的方法_gee平台-CSDN博客

影像条带色差产生的主要原因有以下几点:

1. 光学系统问题:光学系统中的透镜、滤光片等元件可能存在偏差或缺陷,导致不同波长的光在传输过程中被聚焦的位置不一致,从而产生色差。

2. 图像传感器问题:图像传感器中的像素单元可能对不同波长的光的响应度不同,导致不同波长的光在图像传感器上形成的图像亮度不一致,从而产生色差。

3. 色彩处理问题:在图像的处理过程中,可能会对不同波长的光进行不同的处理,如增强某个颜色通道的亮度或饱和度,从而导致色差。

4. 环境光影响:在拍摄现场,环境光的波长和强度可能有所不同,对拍摄的影像产生影响,从而产生色差。

总的来说,影像条带色差的产生主要是由于光学系统、图像传感器、色彩处理和环境光等多个因素综合作用的结果。

函数:

本文里面的主要使用的函数众多,包含了归一化函数,直方图统计,机器学习方法以及图形展示等 

normalizedDifference(bandNames)

Computes the normalized difference between two bands. If the bands to use are not specified, uses the first two bands. The normalized difference is computed as (first − second) / (first + second). Note that the returned image band name is 'nd', the input image properties are not retained in the output image, and a negative pixel value in either input band will cause the output pixel to be masked. To avoid masking negative input values, use ee.Image.expression() to compute normalized difference.

Arguments:

this:input (Image):

The input image.

bandNames (List, default: null):

A list of names specifying the bands to use. If not specified, the first and second bands are used.

Returns: Image

CLOSE

ee.ImageCollection.fromImages(images)

Returns the image collection containing the given images.

Arguments:

images (List):

The images to include in the collection.

Returns: ImageCollection

ui.Chart.image.histogram(image, regionscalemaxBucketsminBucketWidthmaxRawmaxPixels)

Generates a Chart from an image. Computes and plots histograms of the values of the bands in the specified region of the image.

  • X-axis: Histogram buckets (of band value).

  • Y-axis: Frequency (number of pixels with a band value in the bucket).

Returns a chart.

Arguments:

image (Image):

The image to generate a histogram from.

region (Feature|FeatureCollection|Geometry, optional):

The region to reduce. If omitted, uses the entire image.

scale (Number, optional):

The pixel scale used when applying the histogram reducer, in meters.

maxBuckets (Number, optional):

The maximum number of buckets to use when building a histogram; will be rounded up to a power of 2.

minBucketWidth (Number, optional):

The minimum histogram bucket width, or null to allow any power of 2.

maxRaw (Number, optional):

The number of values to accumulate before building the initial histogram.

maxPixels (Number, optional):

If specified, overrides the maximum number of pixels allowed in the histogram reduction. Defaults to 1e6.

Returns: ui.Chart

setSeriesNames(seriesNames, seriesIndex)

Returns a copy of this chart with updated series names.

Arguments:

this:ui.chart (ui.Chart):

The ui.Chart instance.

seriesNames (Dictionary|Dictionary<String>|List|List<String>|String):

New series names. If it's a string, the name of the series at seriesIndex is set to seriesNames. If it's a list, the value at index i in the list is used as a label for series number i. If it's a dictionary or an object, it's treated as a map from existing series names to new series names. In the last two cases, seriesIndex is ignored.

seriesIndex (Number, optional):

The index of the series to rename. Ignored if seriesNames is a list or dictionary. Series are 0-indexed.

Returns: ui.Chart

ee.Reducer.histogram(maxBucketsminBucketWidthmaxRaw)

Create a reducer that will compute a histogram of the inputs.

Arguments:

maxBuckets (Integer, default: null):

The maximum number of buckets to use when building a histogram; will be rounded up to a power of 2.

这篇关于GEE——使用cart机器学习方法对Landsat影像条带修复以NDVI和NDWI为例(全代码)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/499024

相关文章

shell编程之函数与数组的使用详解

《shell编程之函数与数组的使用详解》:本文主要介绍shell编程之函数与数组的使用,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录shell函数函数的用法俩个数求和系统资源监控并报警函数函数变量的作用范围函数的参数递归函数shell数组获取数组的长度读取某下的

使用Python开发一个带EPUB转换功能的Markdown编辑器

《使用Python开发一个带EPUB转换功能的Markdown编辑器》Markdown因其简单易用和强大的格式支持,成为了写作者、开发者及内容创作者的首选格式,本文将通过Python开发一个Markd... 目录应用概览代码结构与核心组件1. 初始化与布局 (__init__)2. 工具栏 (setup_t

Python中的魔术方法__new__详解

《Python中的魔术方法__new__详解》:本文主要介绍Python中的魔术方法__new__的使用,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、核心意义与机制1.1 构造过程原理1.2 与 __init__ 对比二、核心功能解析2.1 核心能力2.2

Python虚拟环境终极(含PyCharm的使用教程)

《Python虚拟环境终极(含PyCharm的使用教程)》:本文主要介绍Python虚拟环境终极(含PyCharm的使用教程),具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,... 目录一、为什么需要虚拟环境?二、虚拟环境创建方式对比三、命令行创建虚拟环境(venv)3.1 基础命令3

Python Transformer 库安装配置及使用方法

《PythonTransformer库安装配置及使用方法》HuggingFaceTransformers是自然语言处理(NLP)领域最流行的开源库之一,支持基于Transformer架构的预训练模... 目录python 中的 Transformer 库及使用方法一、库的概述二、安装与配置三、基础使用:Pi

关于pandas的read_csv方法使用解读

《关于pandas的read_csv方法使用解读》:本文主要介绍关于pandas的read_csv方法使用,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录pandas的read_csv方法解读read_csv中的参数基本参数通用解析参数空值处理相关参数时间处理相关

前端下载文件时如何后端返回的文件流一些常见方法

《前端下载文件时如何后端返回的文件流一些常见方法》:本文主要介绍前端下载文件时如何后端返回的文件流一些常见方法,包括使用Blob和URL.createObjectURL创建下载链接,以及处理带有C... 目录1. 使用 Blob 和 URL.createObjectURL 创建下载链接例子:使用 Blob

使用Node.js制作图片上传服务的详细教程

《使用Node.js制作图片上传服务的详细教程》在现代Web应用开发中,图片上传是一项常见且重要的功能,借助Node.js强大的生态系统,我们可以轻松搭建高效的图片上传服务,本文将深入探讨如何使用No... 目录准备工作搭建 Express 服务器配置 multer 进行图片上传处理图片上传请求完整代码示例

SpringBoot条件注解核心作用与使用场景详解

《SpringBoot条件注解核心作用与使用场景详解》SpringBoot的条件注解为开发者提供了强大的动态配置能力,理解其原理和适用场景是构建灵活、可扩展应用的关键,本文将系统梳理所有常用的条件注... 目录引言一、条件注解的核心机制二、SpringBoot内置条件注解详解1、@ConditionalOn

Python中使用正则表达式精准匹配IP地址的案例

《Python中使用正则表达式精准匹配IP地址的案例》Python的正则表达式(re模块)是完成这个任务的利器,但你知道怎么写才能准确匹配各种合法的IP地址吗,今天我们就来详细探讨这个问题,感兴趣的朋... 目录为什么需要IP正则表达式?IP地址的基本结构基础正则表达式写法精确匹配0-255的数字验证IP地