GEE(Google Earth Engine)——Landsat8TOA图形显示效果优化

举报
此星光明 发表于 2022/04/16 01:17:49 2022/04/16
【摘要】 卫星原有影像: HSV转换后的影像:   rgbToHsv() Transforms the image from the RGB color space to the HSV color space. Expects a 3 band image in the range [0, 1], and produc...

卫星原有影像:

HSV转换后的影像:

 

rgbToHsv()

Transforms the image from the RGB color space to the HSV color space. Expects a 3 band image in the range [0, 1], and produces three bands: hue, saturation and value with values in the range [0, 1].

Arguments:

this:image (Image):

The image to transform.

Returns: Image

hsvToRgb()

Transforms the image from the HSV color space to the RGB color space. Expects a 3 band image in the range [0, 1], and produces three bands: red, green and blue with values in the range [0, 1].

Arguments:

this:image (Image):

The image to transform.

Returns: Image

代码:

var image = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_044034_20140318');
Map.addLayer(
    image,
    {bands: ['B4', 'B3', 'B2'], min: 0, max: 0.25, gamma: [1.1, 1.1, 1]},
    'rgb');

//将 RGB 波段转换为 HSV 颜色空间。
var hsv = image.select(['B4', 'B3', 'B2']).rgbToHsv();

//交换全色波段并转换回 RGB。通过CAT将影像合并最后转化为RGB
var sharpened = ee.Image.cat([
  hsv.select('hue'), hsv.select('saturation'), image.select('B8')
]).hsvToRgb();


Map.setCenter(-122.44829, 37.76664, 13);
Map.addLayer(sharpened,
             {min: 0, max: 0.25, gamma: [1.3, 1.3, 1.3]},
             'pan-sharpened');

 

文章来源: blog.csdn.net,作者:此星光明2021年博客之星云计算Top3,版权归原作者所有,如需转载,请联系作者。

原文链接:blog.csdn.net/qq_31988139/article/details/119281754

【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。