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.2.tar.gz (81.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

homonim-0.4.2-py3-none-any.whl (72.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: homonim-0.4.2.tar.gz
  • Upload date:
  • Size: 81.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for homonim-0.4.2.tar.gz
Algorithm Hash digest
SHA256 6733cd5b7ef3ba656c96e63e5d5dca643d92b84d4b379b3fd426fa2300698211
MD5 2fae19151d7c8d53f496fd44499cdf4c
BLAKE2b-256 cd9eb2af26d962428ae2cf3c643755e53a0e7e91ba0647ddd771f6d0fa760d80

See more details on using hashes here.

Provenance

The following attestation bundles were made for homonim-0.4.2.tar.gz:

Publisher: publish-pypi.yml on leftfield-geospatial/homonim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: homonim-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 72.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for homonim-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 348a08ff70ffd08e1b7268a178d8b0f37eba630e2f1a9046191f698c6492e32d
MD5 7c5421d5e3f6bd5669fa846535562bd0
BLAKE2b-256 3e56320aba305dad5da183f5c679bb80abd03e51ad370803c5c365cc0262f462

See more details on using hashes here.

Provenance

The following attestation bundles were made for homonim-0.4.2-py3-none-any.whl:

Publisher: publish-pypi.yml on leftfield-geospatial/homonim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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