ee_extra.Algorithms.core.panSharpen#

ee_extra.Algorithms.core.panSharpen(img, method='SFIM', qa=None, prefix='ee_extra', **kwargs)[source]#

Apply panchromatic sharpening to an Image or ImageCollection.

Parameters:
  • img (TypeVar(ImageLike, Image, ImageCollection)) – Image or ImageCollection to sharpen.

  • method (str) – The sharpening algorithm to apply. Current options are “SFIM” (Smoothing Filter-based Intensity Modulation), “HPFA” (High Pass Filter Addition), “PCS” (Principal Component Substitution), and “SM” (simple mean).

  • qa (Union[str, List[str], None]) – One or more optional quality metrics to calculate and set as properties on the sharpened image. See ee_extra.QA.metrics.listMetrics().keys() for a list of supported metrics.

  • prefix (str) – A prefix for any new properties. For example, quality metrics will be set as prefix:metric, e.g. ee_extra:RMSE.

  • kwargs (Any) – Keyword arguments passed to ee.Image.reduceRegion() such as “geometry”, “maxPixels”, “bestEffort”, etc. These arguments are only used for PCS sharpening and quality assessments.

Return type:

TypeVar(ImageLike, Image, ImageCollection)

Returns:

The Image or Image Collection with all sharpenable bands sharpened to the panchromatic resolution.

Examples

>>> import ee
>>> from ee_extra.Algorithms.core import panSharpen
>>> ee.Initialize()
>>> img = ee.Image("LANDSAT/LC08/C01/T1_TOA/LC08_047027_20160819")
>>> sharp = panSharpen(img, method="HPFA", qa=["RMSE", "ERGAS"], maxPixels=1e13)