Install
openclaw skills install @ruiduobao/geoskill-image-fusion-pan-sharpeningopenclaw skills install @ruiduobao/geoskill-image-fusion-pan-sharpeningFuses a high spatial resolution panchromatic band (PAN) with lower-resolution multispectral (MS) imagery to produce imagery that combines high spatial resolution with multispectral information. Two classic methods are implemented: the Brovey transform (fused_b = MS_b↑ × PAN / Σ(MS↑), which preserves the per-band proportions so that the fused bands sum to PAN) and IHS (the intensity component is replaced by PAN, then inverse-transformed as fused_b = MS_b↑ + (PAN − I), injecting spatial detail into each band via the intensity difference). The multispectral bands are first upsampled to the PAN resolution with bicubic interpolation before fusion.
Typical applications: Landsat-8/9 OLI (30 m MS + 15 m PAN), Sentinel-2 (fusion of 10/20/60 m bands to 10 m), Gaofen (GF) series, Ziyuan (ZY) series, WorldView/GeoEye, etc. Brovey suits scenes with few bands and low noise; IHS is simple to implement and preserves hue well.
pip install 'numpy' 'rasterio' 'scipy'
python geoskill-image-fusion-pan-sharpening.py --bbox 116.0 39.0 117.0 40.0 [other arguments]
python geoskill-image-fusion-pan-sharpening.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-image-fusion-pan-sharpening.py --bbox 121.0 31.0 122.0 32.0 --synthetic --method ihs --scale 4 --output-dir ./out2
python geoskill-image-fusion-pan-sharpening.py --input ms.tif --pan pan.tif --method brovey --output-dir ./out3
python geoskill-image-fusion-pan-sharpening.py --bbox 116.39 39.90 116.40 39.91 --synthetic --output-dir ./out4 --quiet
python geoskill-image-fusion-pan-sharpening.py --bbox 116.0 39.0 117.0 40.0 --synthetic --method ihs --scale 2 --output-dir ./out5
| File | Format | Description |
|---|---|---|
fused_pansharpened.tif | GeoTIFF | Primary output: fused multispectral (bands × H × W; H, W = PAN resolution) |
fusion_params.json | JSON | Algorithm parameters (method, scale, ms_shape, pan_shape, output_shape) |
output-manifest.json | JSON | Run manifest (output files + QA metrics) |
--synthetic mode is fully offline with no network access.MIT
将高空间分辨率全色波段(PAN)与低分辨率多光谱(MS)融合,生成兼具高空间分辨率与多光谱信息的影像。实现了两种经典方法:Brovey 变换(fused_b = MS_b↑ × PAN / Σ(MS↑),保持各波段比例,融合后各波段之和等于 PAN)与 IHS(用 PAN 替换强度分量,反变换 fused_b = MS_b↑ + (PAN − I),空间细节通过强度差注入各波段)。多光谱先经双三次插值上采样到 PAN 的分辨率,再参与融合。
典型应用:Landsat-8/9 OLI(30 m MS + 15 m PAN)、Sentinel-2(10/20/60 m 多波段融合到 10 m)、高分系列、资源系列、WorldView/GeoEye 等。Brovey 适合波段数较少、噪声小的场景;IHS 实现简洁、对色相保持较好。
pip install 'numpy' 'rasterio' 'scipy'
python geoskill-image-fusion-pan-sharpening.py --bbox 116.0 39.0 117.0 40.0 [其他参数]
python geoskill-image-fusion-pan-sharpening.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-image-fusion-pan-sharpening.py --bbox 121.0 31.0 122.0 32.0 --synthetic --method ihs --scale 4 --output-dir ./out2
python geoskill-image-fusion-pan-sharpening.py --input ms.tif --pan pan.tif --method brovey --output-dir ./out3
python geoskill-image-fusion-pan-sharpening.py --bbox 116.39 39.90 116.40 39.91 --synthetic --output-dir ./out4 --quiet
python geoskill-image-fusion-pan-sharpening.py --bbox 116.0 39.0 117.0 40.0 --synthetic --method ihs --scale 2 --output-dir ./out5
| 文件 | 格式 | 说明 |
|---|---|---|
fused_pansharpened.tif | GeoTIFF | 主产物,融合后多光谱(bands × H × W,H,W = PAN 分辨率) |
fusion_params.json | JSON | 算法参数(method、scale、ms_shape、pan_shape、output_shape) |
output-manifest.json | JSON | 运行清单(输出文件 + qa 指标) |
--synthetic 模式完全无网络。MIT