Panchromatic Sharpening

Guide by Aaron Zuspan

Panchromatic sharpening is simple in eemont!

Before anything, let’s import our modules and authenticate in Google Earth Engine:

import ee, eemont

ee.Authenticate()
ee.Initialize()

Now, we are ready to go!

Overview

The eemont package extends the ee.Image and ee.ImageCollection classes with the method panSharpen():

ee.Image

panSharpen(self[, method, qa])

Apply panchromatic sharpening to the Image.

ee.ImageCollection

panSharpen(self[, method, qa])

Apply panchromatic sharpening to each Image in the Image Collection.

Algorithms

The panSharpen method can be run using a variety of different algorithms by setting the method argument. The following sharpening algorithms are supported by eemont:

Available algorithm methods.

Method

Name

kwargs

SFIM (default)

Smoothing-Filter Based Intensity Modulation

No

HPFA

High-Pass Filter Addition

No

PCS

Principal Component Substitution

Yes

SM

Simple Mean

No

See also

Some algorithms take additional keyword arguments (kwargs) such as maxPixels, geometry, or bestEffort. These are passed to ee.Image.reduceRegion. More information on how to set these arguments can be found here.

Usage

Let’s load a supported image from Landsat 8:

img = ee.Image("LANDSAT/LC08/C01/T1_TOA/LC08_047027_20160819")

And sharpen it using the panSharpen method with the default SFIM algorithm.

sharp = img.panSharpen()

Easy as that!

We can also try sharpening with a different algorithm. Remember that some algorirthms take additional keyword arguments. Here, we’ll specify maxPixels to avoid pixel limitations with the PCS algorithm.

sharp = img.panSharpen(method="PCS", maxPixels=1e13)

Pan-sharpening image collections is identical to sharpening images:

imgCollection = ee.ImageCollection("LANDSAT/LC08/C01/T1_TOA")
sharpCollection = imgCollection.panSharpen()

Quality Assessment

Quality assessment (QA) metrics can be calculated by the panSharpen method to measure how much spectral distortion was introduced by sharpening and to compare different sharpening algorithms. eemont supports the following QA metrics:

Available QA metrics.

QA

Name

Ideal Value

Mode

MSE

Mean Squared Error

0

Band

RMSE

Root-Mean Squared Error

0

Band

RASE

Relative Average Spectral Error

0

Image

ERGAS

Dimensionless Global Relative Error of Synthesis

0

Image

DIV

Difference in Variance

0

Band

bias

Bias

0

Band

CC

Correlation Coefficient

1

Band

CML

Change in mean luminance

1

Band

CMC

Change in mean contrast

1

Band

UIQI

Universal Image Quality Index

1

Band

Note

Some metrics are calculated image-wise and others are calculated band-wise. Image-wise metrics return one value for the entire image while band-wise metrics return one value for each band.

QA metrics are calculated by passing a list of one or more metrics to the qa argument of the panSharpen method. Below, we’ll calculate RASE and UIQI while sharpening an image.

metrics = ["RASE", "UIQI"]
img = ee.Image("LANDSAT/LC08/C01/T1_TOA/LC08_047027_20160819")
sharp = img.panSharpen(qa=metrics, maxPixels=1e13)

See also

All QA metrics take additional keyword arguments (kwargs) such as maxPixels, geometry, or bestEffort. These are passed to ee.Image.reduceRegion. More information can be found here.

Calculated QA metrics are set as properties of the sharpened image and can be retrieved with the get method. QA property names use the format eemont:{QA}.

sharp.get("eemont:RASE").getInfo()