天天看點

GEE(Google Earth Engine)——Landsat8TOA圖形顯示效果優化

衛星原有影像:

GEE(Google Earth Engine)——Landsat8TOA圖形顯示效果優化

HSV轉換後的影像:

GEE(Google Earth Engine)——Landsat8TOA圖形顯示效果優化

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');      

繼續閱讀