A Python package to fusion LR and HR imagery
Project description
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,
)
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
sathybrid-0.1.0.tar.gz
(18.3 kB
view details)
Built Distribution
sathybrid-0.1.0-py3-none-any.whl
(19.2 kB
view details)
File details
Details for the file sathybrid-0.1.0.tar.gz
.
File metadata
- Download URL: sathybrid-0.1.0.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using 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.31.0 rfc3986/1.5.0 tqdm/4.66.1 urllib3/2.2.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71a70fcb616c23f17201956e068d5a5780356ee9fc233b35f0b4da21d301d946 |
|
MD5 | 8da05c5ddf097fe21e10c2706540a2f0 |
|
BLAKE2b-256 | 45c4e0dd44be39c2e19e98d79a69e605d8bfbca19050e1f4341b9f0003bdb3c8 |
File details
Details for the file sathybrid-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: sathybrid-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using 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.31.0 rfc3986/1.5.0 tqdm/4.66.1 urllib3/2.2.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e30271c9cfe2801d3de8b35d2a42bafafbf72f982016c1e2c470b2f637ba7550 |
|
MD5 | 8d6df34367b02411356ba74af79b3ea8 |
|
BLAKE2b-256 | 1f656f88f1b6069768bcf3566f6be12144cfbd3c25f4ee8ec072e1f0afe1f04e |