ee-pansharpen: Apply panchromatic sharpening to an ee$Image or an...

ee-pansharpenR Documentation

Apply panchromatic sharpening to an ee$Image or an ee$ImageCollection

Description

Apply panchromatic sharpening to an ee$Image. Optionally, run quality assessments between the original and sharpened Image to measure spectral distortion and set results as properties of the sharpened Image.

Usage

`ee$Image$Extra_panSharpen(x, ...)`

Arguments

x

An ee$Image object, the image to sharpen.

...

Additional arguments including sharpening method, quality assessments, and parameters for ee.Image.reduceRegion(). See details for more information.

Details

The ... argument can include the following:

  • methodCharacter. The sharpening algorithm to apply. Options include “SFIM”, “HPFA”, “PCS”, and “SM”. Default is “SFIM”.

  • qaCharacter. One or more quality assessment names to apply after sharpening, such as “MSE”, “RASE”, “UIQI”, etc.

  • geometry, maxPixels, bestEffort, etc.Arguments passed to ee.Image.reduceRegion() during PCS sharpening and quality assessments.

For the PCS method, additional parameters for ee.Image.reduceRegion() can be specified, such as geometry, maxPixels, bestEffort, etc.

Value

The Image with all sharpenable bands sharpened to the panchromatic resolution and quality assessments run and set as properties.

Examples

## Not run: 
library(rgee)
library(rgeeExtra)

ee_Initialize()
extra_Initialize()

img <- ee$Image("LANDSAT/LC09/C02/T1_TOA/LC09_047027_20230815")
img_sharp <- ee$Image$Extra_panSharpen(img, method="HPFA", qa=c("MSE", "RMSE"), maxPixels=1e13)

Map$centerObject(img)
Map$addLayer(img_sharp, list(bands=c("B4", "B3", "B2"))) |
Map$addLayer(img, list(bands=c("B4", "B3", "B2")))

## End(Not run)

r-earthengine/rgeeExtra documentation built on Dec. 7, 2023, 9:03 p.m.