ee_extra.QA.metrics.DIV#

class ee_extra.QA.metrics.DIV(original: Image, modified: Image, reproject: bool = True, **kwargs: Any)[source]#

Calculate band-wise Difference in Variance (DIV) between an original and modified image with the same bands. A value of 0 represents no change in variance.

Parameters:
  • original – The original image to use as a reference.

  • modified – The modified image to compare to the original.

  • reproject – If true, the original image will be reprojected to the modified image scale before calculation.

  • kwargs – Additional keyword arguments passed to ee.Image.reduceRegion.

Returns:

A dictionary with band names as keys and DIV values as values.

References

Vaiopoulos, A. D. (2011). Developing Matlab scripts for image analysis

and quality assessment. Earth Resources and Environmental Remote Sensing/GIS Applications II. https://doi.org/10.1117/12.897806

Examples

>>> from ee_extra.QA import metrics
>>> bands = ["B4", "B3", "B2"]
>>> img1 = ee.Image("COPERNICUS/S2_SR/20210703T170849_20210703T171938_T14SPG").select(bands)
>>> img2 = ee.Image("COPERNICUS/S2_SR/20210708T170851_20210708T171925_T14SPG").select(bands)
>>> metrics.DIV(img1, img2, bestEffort=True).getInfo()
{'B2': -0.11554855234271111, 'B3': -0.053204512324202424, 'B4': -0.07635340111753797}
__init__()#

Methods

__init__()