sathybrid
A Python package to fusion LR and HR imagery
Installation
pip install sathybrid
Usage
import sathybrid
import pathlib
# Select the HR image
PATH = pathlib.Path("/home/cesar/demo/NA5120_E1186N0724/")
HRfile = PATH / "naip" / "m_3812243_nw_10_060_20220524.tif"
# Find the most similar LR image
data_stats = sathybrid.utils.find_similar_lr(
hr_file=HRfile,
lr_folder=PATH / "s2",
hr_bands=[1, 2, 3],
hr_normalization=255,
lr_bands=[3, 2, 1],
lr_normalization=10_000,
downsampling_method="lanczos3",
method="fft_l1",
)
# Select the best LR image
LRfile = PATH / "s2" / (data_stats.iloc[0]["lr_img"] + ".tif")
# Define the output path
OUTfile = PATH / "fusion.tif"
# Fusion
sathybrid.image_fusion(
hr_file=HRfile,
lr_file=LRfile,
output_file=OUTfile,
hr_bands=[1, 2, 3],
hr_normalization=255,
lr_bands=[3, 2, 1],
lr_normalization=10_000,
upsampling_method="lanczos3",
fourier=True,
fourier_params={"method": "ideal", "order": 6, "sharpness": 3},
scale_factor=8,
denoise=True,
)
Metadata
Release files for sathybrid 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sathybrid-0.2.0.tar.gz | 17.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sathybrid-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.2 kB
Release files / sathybrid-0.2.0.tar.gz
| Download URL | sathybrid-0.2.0.tar.gz |
|---|---|
| Size | 17.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dba3351bce5adf4fbdf611c820c34469100782ce06a9ba323fb7f166f9990eb1
|
|
BLAKE2b-256 checksum How to use checksums |
07fc981f49bc0890c7613caf9bcad5dc990f5cf43ff4d5a8ddd01da5e1fa52b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 colorama/0.4.4 importlib-metadata/7.0.1 keyring/24.3.1 pkginfo/1.9.6 readme-renderer/34.0 requests-toolbelt/1.0.0 requests/2.32.3 rfc3986/1.5.0 tqdm/4.66.1 urllib3/2.2.1 CPython/3.10.12
|
Release files / sathybrid-0.2.0-py3-none-any.whl
| Download URL | sathybrid-0.2.0-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74ad8083d9312acb73d63a2d1208a639125cd092820d9c203a8fcf0b695bf5ac
|
|
BLAKE2b-256 checksum How to use checksums |
98e922597663b53bc0e36c4c4f47def1de19c75dadbfd8cf8c7f560460f4eec0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 colorama/0.4.4 importlib-metadata/7.0.1 keyring/24.3.1 pkginfo/1.9.6 readme-renderer/34.0 requests-toolbelt/1.0.0 requests/2.32.3 rfc3986/1.5.0 tqdm/4.66.1 urllib3/2.2.1 CPython/3.10.12
|