Skip to main content

Correct aerial and satellite imagery to surface reflectance.

Project description

Tests codecov PyPI version conda-forge docs License: AGPL v3

homonim

example

Correct drone, aerial and satellite imagery to surface reflectance.

Description

homonim provides a command line interface and API for correcting remotely sensed imagery to approximate surface reflectance. It implements a form of spectral harmonisation, that adjusts for spatially varying atmospheric and anisotropic (BRDF) effects, by fusion with satellite surface reflectance data. Manual reflectance measurements and target placements are not required.

homonim is useful for pre-processing in quantitative mapping applications, and for reducing seamlines and other visual artefacts in image mosaics. It can be applied to multi-spectral drone, aerial and satellite imagery. The consistency of multi-temporal and multi-sensor data can improved through its use.

See the documentation site for more detail: https://homonim.readthedocs.io/.

Installation

homonim is available as a python 3 package, via pip or conda.

pip

pip install homonim

conda

conda install -c conda-forge homonim

Getting started

Command line interface

homonim command line functionality is accessed through the commands:

  • fuse: Correct image(s) to surface reflectance.

  • compare: Compare image(s) with a reference.

  • stats: Report parameter statistics.

Get help on homonim with:

homonim --help

and help on a homonim command with:

homonim <command> --help
Examples

Correct source.tif to surface reflectance by fusion with reference.tif, using the default settings:

homonim fuse source.tif reference.tif

Correct images matching source*.tif to surface reflectance by fusion with reference.tif. Use a 5 x 5 pixel kernel and the gain-blk-offset model for correction, and place corrected images in the ./corrected directory:

homonim fuse -k 5 5 -m gain-blk-offset -od ./corrected source*.tif reference.tif

Statistically compare source.tif and corrected.tif with reference.tif.

homonim compare source.tif corrected.tif reference.tif

API

Example

Surface reflectance correction of an aerial image using a Sentinel-2 reference.

from homonim import RasterFuse, Model

# urls of source and reference test images
src_file = (
    'https://raw.githubusercontent.com/leftfield-geospatial/homonim/main/'
    'tests/data/source/ngi_rgb_byte_1.tif'
)
ref_file = (
    'https://raw.githubusercontent.com/leftfield-geospatial/homonim/main/'
    'tests/data/reference/sentinel2_b432_byte.tif'
)

# path to corrected file to create
corr_file = './corrected.tif'

# Correct src_file to surface reflectance by fusion with ref_file, using the
# `gain-blk-offset` model and a kernel of 5 x 5 pixels.
with RasterFuse(src_file, ref_file) as fuse:
    fuse.process(corr_file, Model.gain_blk_offset, (5, 5), overwrite=True)

Reference imagery

geedim can be used as a companion tool for searching and downloading cloud-free reference imagery. Alternatively, satellite imagery is available from a number of sources, including the Google, Amazon and Microsoft repositories.

Usage

See the documentation here.

Terminology

homonim is shorthand for homogenise image and is a reference to the paper on which it is based.

Credits

homonim relies on these excellent packages:

License

homonim is licensed under the terms of the AGPLv3. This project is developed in collaboration with InnovUS at Stellenbosch University, alternative licenses can be arranged by contacting them.

Citation

Please cite use of the code as:

  • Dugal Harris & Adriaan Van Niekerk (2019) Radiometric homogenisation of aerial images by calibrating with satellite data, International Journal of Remote Sensing, 40:7, 2623-2647, DOI: https://doi.org/10.1080/01431161.2018.1528404.

Bibtex:

@article{doi:10.1080/01431161.2018.1528404,
    author = {Dugal Harris and Adriaan Van Niekerk},
    title = {Radiometric homogenisation of aerial images by calibrating with satellite data},
    journal = {International Journal of Remote Sensing},
    volume = {40},
    number = {7},
    pages = {2623-2647},
    year  = {2019},
    publisher = {Taylor & Francis},
    doi = {10.1080/01431161.2018.1528404},
    URL = {https://doi.org/10.1080/01431161.2018.1528404},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

homonim-0.4.1.tar.gz (81.8 kB view details)

Uploaded Source

Built Distribution

homonim-0.4.1-py3-none-any.whl (72.2 kB view details)

Uploaded Python 3

File details

Details for the file homonim-0.4.1.tar.gz.

File metadata

  • Download URL: homonim-0.4.1.tar.gz
  • Upload date:
  • Size: 81.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for homonim-0.4.1.tar.gz
Algorithm Hash digest
SHA256 0b918510750d831785b76a1e5d8de7a969adee9e04cbd1ce794542b3a166d214
MD5 cd4824483215ae273746ed104abad258
BLAKE2b-256 da1ee57380f5c347392cd703a2152183ef75bfb77ca326a90b9a223fbdb6c34f

See more details on using hashes here.

File details

Details for the file homonim-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: homonim-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 72.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for homonim-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d10ba8379d490de06c259a9e7738ad27859754fa6c06783adc72e9fb5bd36681
MD5 bd3d3af037c6e0055296c5e4f290d90b
BLAKE2b-256 ce42b8dc7bf0bb0e9f07dba4675517b4f9f004b985e597f8f3104d04fd0f4348

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page