homonim
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},
}
Metadata
Release files for homonim 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| homonim-0.4.3.tar.gz | 81.8 kB | With provenance | Details for homonim-0.4.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| homonim-0.4.3-py3-none-any.whl | Python 3 | none | any | Details for homonim-0.4.3-py3-none-any.whl |
Total release size: 154.1 kB
Release files / homonim-0.4.3.tar.gz
| Download URL | homonim-0.4.3.tar.gz |
|---|---|
| Size | 81.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5401260cf01a3911a3a3891a5e53713a7d3d0ccf72f6b4094de433263ed70ee3
|
|
BLAKE2b-256 checksum How to use checksums |
c142e3c2da9fa7ed775a7ae2b8b6fa4f1c03ca61bbb537a699e804ab223c9684
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2025.
Transparency logRelease files / homonim-0.4.3-py3-none-any.whl
| Download URL | homonim-0.4.3-py3-none-any.whl |
|---|---|
| Size | 72.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
082e39f55766097db38319aa14a38da13ffa5e02126c1cd6aa44a4f22c6801ef
|
|
BLAKE2b-256 checksum How to use checksums |
c28aa66beff7d24514674f36aec69fead22c1a2e77735bf068435deaca292fdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2025.
Transparency logSecurity for homonim 0.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for homonim-0.4.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.