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

相关文章

讯飞webapi语音识别接口调用示例代码(python)

《讯飞webapi语音识别接口调用示例代码(python)》:本文主要介绍如何使用Python3调用讯飞WebAPI语音识别接口,重点解决了在处理语音识别结果时判断是否为最后一帧的问题,通过运行代... 目录前言一、环境二、引入库三、代码实例四、运行结果五、总结前言基于python3 讯飞webAPI语音

什么是 Java 的 CyclicBarrier(代码示例)

《什么是Java的CyclicBarrier(代码示例)》CyclicBarrier是多线程协同的利器,适合需要多次同步的场景,本文通过代码示例讲解什么是Java的CyclicBarrier,感... 你的回答(口语化,面试场景)面试官:什么是 Java 的 CyclicBarrier?你:好的,我来举个例

Java使用Mail构建邮件功能的完整指南

《Java使用Mail构建邮件功能的完整指南》JavaMailAPI是一个功能强大的工具,它可以帮助开发者轻松实现邮件的发送与接收功能,本文将介绍如何使用JavaMail发送和接收邮件,希望对大家有所... 目录1、简述2、主要特点3、发送样例3.1 发送纯文本邮件3.2 发送 html 邮件3.3 发送带

Linux虚拟机不显示IP地址的解决方法(亲测有效)

《Linux虚拟机不显示IP地址的解决方法(亲测有效)》本文主要介绍了通过VMware新装的Linux系统没有IP地址的解决方法,主要步骤包括:关闭虚拟机、打开VM虚拟网络编辑器、还原VMnet8或修... 目录前言步骤0.问题情况1.关闭虚拟机2.China编程打开VM虚拟网络编辑器3.1 方法一:点击还原VM

Android WebView无法加载H5页面的常见问题和解决方法

《AndroidWebView无法加载H5页面的常见问题和解决方法》AndroidWebView是一种视图组件,使得Android应用能够显示网页内容,它基于Chromium,具备现代浏览器的许多功... 目录1. WebView 简介2. 常见问题3. 网络权限设置4. 启用 JavaScript5. D

使用DeepSeek搭建个人知识库(在笔记本电脑上)

《使用DeepSeek搭建个人知识库(在笔记本电脑上)》本文介绍了如何在笔记本电脑上使用DeepSeek和开源工具搭建个人知识库,通过安装DeepSeek和RAGFlow,并使用CherryStudi... 目录部署环境软件清单安装DeepSeek安装Cherry Studio安装RAGFlow设置知识库总

Java捕获ThreadPoolExecutor内部线程异常的四种方法

《Java捕获ThreadPoolExecutor内部线程异常的四种方法》这篇文章主要为大家详细介绍了Java捕获ThreadPoolExecutor内部线程异常的四种方法,文中的示例代码讲解详细,感... 目录方案 1方案 2方案 3方案 4结论方案 1使用 execute + try-catch 记录

Python FastAPI入门安装使用

《PythonFastAPI入门安装使用》FastAPI是一个现代、快速的PythonWeb框架,用于构建API,它基于Python3.6+的类型提示特性,使得代码更加简洁且易于绶护,这篇文章主要介... 目录第一节:FastAPI入门一、FastAPI框架介绍什么是ASGI服务(WSGI)二、FastAP

Spring-AOP-ProceedingJoinPoint的使用详解

《Spring-AOP-ProceedingJoinPoint的使用详解》:本文主要介绍Spring-AOP-ProceedingJoinPoint的使用方式,具有很好的参考价值,希望对大家有所帮... 目录ProceedingJoinPoijsnt简介获取环绕通知方法的相关信息1.proceed()2.g

Python中Windows和macOS文件路径格式不一致的解决方法

《Python中Windows和macOS文件路径格式不一致的解决方法》在Python中,Windows和macOS的文件路径字符串格式不一致主要体现在路径分隔符上,这种差异可能导致跨平台代码在处理文... 目录方法 1:使用 os.path 模块方法 2:使用 pathlib 模块(推荐)方法 3:统一使