Skip to main content

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

Uploaded Source

Built Distribution

sathybrid-0.2.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file sathybrid-0.2.0.tar.gz.

File metadata

  • Download URL: sathybrid-0.2.0.tar.gz
  • Upload date:
  • Size: 17.9 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.32.3 rfc3986/1.5.0 tqdm/4.66.1 urllib3/2.2.1 CPython/3.10.12

File hashes

Hashes for sathybrid-0.2.0.tar.gz
Algorithm Hash digest
SHA256 dba3351bce5adf4fbdf611c820c34469100782ce06a9ba323fb7f166f9990eb1
MD5 76b6a2a7f8d80d7788cb39827db1f394
BLAKE2b-256 07fc981f49bc0890c7613caf9bcad5dc990f5cf43ff4d5a8ddd01da5e1fa52b3

See more details on using hashes here.

File details

Details for the file sathybrid-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sathybrid-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.3 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.32.3 rfc3986/1.5.0 tqdm/4.66.1 urllib3/2.2.1 CPython/3.10.12

File hashes

Hashes for sathybrid-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74ad8083d9312acb73d63a2d1208a639125cd092820d9c203a8fcf0b695bf5ac
MD5 3573528469137424b9f845b95d9913ee
BLAKE2b-256 98e922597663b53bc0e36c4c4f47def1de19c75dadbfd8cf8c7f560460f4eec0

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