Install
openclaw skills install @ruiduobao/geoskill-map-style-transferTransfer map styles via color mapping and histogram matching with style templates
openclaw skills install @ruiduobao/geoskill-map-style-transferTransfers the visual style of a source raster to a target: histogram matching (CDF mapping to align the mean/variance of a reference image), style templates (vintage/cool/warm/noir with gamma/contrast/hue adjustments) and palette quantization (posterization).
The three techniques can be combined: first match with --reference, then apply a template with --style, and finally quantize the color levels with --levels.
histogram_match uses np.unique+np.interp to map the source CDF to the reference values → apply_style_template applies grayscale/gamma/contrast/hue adjustments → quantize_palette quantizes by levels.
pip install numpy rasterio scipy matplotlib geopandas shapely pillow
python geoskill-map-style-transfer.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-map-style-transfer.py --input src.tif --reference ref.tif
python geoskill-map-style-transfer.py --input src.tif --style noir
python geoskill-map-style-transfer.py --input src.tif --levels 6
python geoskill-map-style-transfer.py --bbox 116 39 117 40 --synthetic --style warm
| File | Format | Description |
|---|---|---|
styled.png | PNG | Stylized image (main deliverable) |
styled.tif | GeoTIFF | Processed grayscale raster (verifiable deliverable) |
style_meta.json | JSON | Template parameters/matching statistics |
Each run also produces output-manifest.json (run manifest).
Local GeoTIFF / vector files; --synthetic mode generates physically consistent simulated data, fully offline.
--synthetic mode requires no network at all.MIT
把源栅格的视觉风格迁移到目标:直方图匹配(CDF 映射对齐参考影像均值/方差)、风格模板(vintage/cool/warm/noir 的 gamma/对比度/色调)与调色板量化(海报化)。
三种手段可组合:先 --reference 匹配,再 --style 套模板,最后 --levels 量化色阶。
histogram_match 用 np.unique+np.interp 把源 CDF 映射到参考取值 → apply_style_template 做灰度/gamma/对比度/色调 → quantize_palette 按 levels 量化。
pip install numpy rasterio scipy matplotlib geopandas shapely pillow
python geoskill-map-style-transfer.py --bbox 116.0 39.0 117.0 40.0 --synthetic --output-dir ./out
python geoskill-map-style-transfer.py --input src.tif --reference ref.tif
python geoskill-map-style-transfer.py --input src.tif --style noir
python geoskill-map-style-transfer.py --input src.tif --levels 6
python geoskill-map-style-transfer.py --bbox 116 39 117 40 --synthetic --style warm
| 文件 | 格式 | 说明 |
|---|---|---|
styled.png | PNG | 风格化图(主产物) |
styled.tif | GeoTIFF | 处理后灰度栅格(可验证产物) |
style_meta.json | JSON | 模板参数/匹配统计 |
每次运行还会产出 output-manifest.json(运行清单)。
本地 GeoTIFF / 矢量文件;--synthetic 模式生成物理一致的模拟数据,完全离线。
--synthetic 模式完全无网络。MIT