编程

geoskill-polarimetric-decomposition

试用

极化SAR分解:Cloude-Pottier H/A/α 特征分解与 Freeman 三分量分解,输出散射熵、各向异性、散射角与表面/二面角/体散射功率

它能做什么

极化SAR分解:Cloude-Pottier H/A/α 特征分解与 Freeman 三分量分解,输出散射熵、各向异性、散射角与表面/二面角/体散射功率

技能文档

极化SAR分解 | Polarimetric SAR Decomposition

Performs polarimetric target decomposition on fully polarimetric SAR data to extract the physical scattering mechanisms of surface features. Two mainstream methods are implemented:

  • Cloude-Pottier (H/A/α) eigen decomposition: performs a Hermitian eigen decomposition of the 3×3 coherency matrix T3 for each pixel, yielding the entropy H (scattering randomness; 0 = a single mechanism, 1 = fully random), the anisotropy A and the scattering angle α (surface scattering α≈0–30°, volume scattering α≈40–60°, dihedral scattering α≈90°).
  • Freeman-Durden three-component decomposition (simplified): solves for the surface scattering Ps, double-bounce scattering Pd and volume scattering Pv from |Shh|², |Svv|² and |Shv|².

Application Scenarios / 应用场景

  • Land-cover classification and scattering mechanism identification (urban buildings, forest, bare soil, water)
  • Extraction of forest structural parameters, crop growth monitoring
  • Physical feature engineering for polarimetric SAR data

Dependencies / 依赖

pip install 'numpy' 'rasterio' 'scipy'

Input Conventions / 输入约定

  • Cloude / H/A/α: the input GeoTIFF must contain 9 bands encoding the upper triangle of T3 as [T11, T22, T33, Re T12, Im T12, Re T13, Im T13, Re T23, Im T23].
  • Freeman: the input GeoTIFF must contain 3 bands [|Shh|², |Svv|², |Shv|²].

Usage / 使用方法

Example 1 (synthetic data, offline)

python geoskill-polarimetric-decomposition.py --bbox 116.0 39.0 117.0 40.0 --method cloude --output-dir ./out

Example 2 (Freeman three-component synthetic)

python geoskill-polarimetric-decomposition.py --bbox 116.0 39.0 117.0 40.0 --method freeman --synthetic --output-dir ./out

Example 3 (real T3 data)

python geoskill-polarimetric-decomposition.py --input T3_9band.tif --method ha_alpha --output-dir ./out

Example 4 (real C3 three-component)

python geoskill-polarimetric-decomposition.py --input C3_3band.tif --method freeman --output-dir ./out

Output / 输出

FileFormatDescription
cloude_H_A_alpha.tifGeoTIFF (3 band)Entropy H, anisotropy A, scattering angle α (degrees)
freeman_three_component.tifGeoTIFF (3 band)Ps / Pd / Pv scattering powers
decomposition_stats.jsonJSONStatistics and synthetic ground truth
output-manifest.jsonJSONRun manifest

Data Source / 数据源 / Source

Local polarimetric GeoTIFF (T3 9-band or C3 3-band), or physically simulated scenes via --synthetic.

Privacy / 隐私声明 / Privacy

  • Runs offline by default; --synthetic mode requires no network at all.
  • All processing is performed locally; user data is never uploaded.

License / License

MIT



name: geoskill-polarimetric-decomposition description: '极化SAR分解:Cloude-Pottier H/A/α 特征分解与 Freeman 三分量分解,输出散射熵、各向异性、散射角与表面/二面角/体散射功率'

极化SAR分解 | Polarimetric SAR Decomposition

对全极化 SAR 数据执行极化目标分解,提取地物的散射物理机制。实现两类主流方法:

  • Cloude-Pottier(H/A/α)特征分解:对每个像元的 3×3 相干矩阵 T3 做 Hermitian 特征分解,得到熵 H(散射随机性,0=单一机制、1=完全随机)、各向异性 A 与散射角 α (表面散射 α≈0-30°、体散射 α≈40-60°、二面角散射 α≈90°)。
  • Freeman-Durden 三分量分解(简化):从 |Shh|²、|Svv|²、|Shv|² 求解表面散射 Ps、 二面角散射 Pd 与体散射 Pv。

应用场景

  • 地物分类与散射机制识别(城市建筑、森林、裸土、水体)
  • 森林结构参数提取、农作物长势监测
  • 极化 SAR 数据的物理特征工程

依赖

pip install 'numpy' 'rasterio' 'scipy'

输入约定

  • Cloude / H/A/α:输入 GeoTIFF 需含 9 个波段,按 T3 上三角编码 [T11, T22, T33, Re T12, Im T12, Re T13, Im T13, Re T23, Im T23]
  • Freeman:输入 GeoTIFF 需含 3 个波段 [|Shh|², |Svv|², |Shv|²]

使用方法

示例 1(合成数据,离线)

python geoskill-polarimetric-decomposition.py --bbox 116.0 39.0 117.0 40.0 --method cloude --output-dir ./out

示例 2(Freeman 三分量合成)

python geoskill-polarimetric-decomposition.py --bbox 116.0 39.0 117.0 40.0 --method freeman --synthetic --output-dir ./out

示例 3(真实 T3 数据)

python geoskill-polarimetric-decomposition.py --input T3_9band.tif --method ha_alpha --output-dir ./out

示例 4(真实 C3 三分量)

python geoskill-polarimetric-decomposition.py --input C3_3band.tif --method freeman --output-dir ./out

输出

文件格式说明
cloude_H_A_alpha.tifGeoTIFF (3 band)熵 H、各向异性 A、散射角 α(度)
freeman_three_component.tifGeoTIFF (3 band)Ps / Pd / Pv 散射功率
decomposition_stats.jsonJSON统计量与合成真值
output-manifest.jsonJSON运行清单

数据源 / Source

本地极化 GeoTIFF(T3 9 波段或 C3 3 波段),或 --synthetic 物理模拟场景。

隐私声明 / Privacy

  • 默认离线运行,--synthetic 模式完全无网络。
  • 所有处理在本地完成,不上传用户数据。

License

MIT

相关技能

多时相 SAR 后向散射时序统计:逐像元均值/标准差/振幅/变异系数与极化比。Multi-temporal SAR backscatter time-series statistics (mean/std/amplitude/CV) and polarization ratio. 输入多时相 σ⁰ 立方体(或用 --synthetic 生成含植被物候正弦信号的时序),输出多波段统计 GeoTIFF + 时序曲线 JSON。

1 次安装

SAR 船舶检测:CA/OS-CFAR 恒虚警检测 + 连通域聚类,从单极化 SAR 强度影像提取船舶目标并输出 GeoJSON 矢量与属性表

1 次安装

SAR 土壤湿度反演:基于简化 Dubois/Oh 半经验模型,由后向散射系数 σ⁰、入射角与地表粗糙度解析反演裸土体积含水量 (m³/m³)

1 次安装

融合InSAR形变速率、后向散射变化与DEM坡度综合加权评分,双门限提取疑似滑坡连通域并矢量化分级(high/medium/low),输出滑坡GeoJSON、形变速率/风险评分GeoTIFF与风险汇总JSON。SAR landslide detection fusing InSAR deformation, backscatter change and slope.

1 次安装

基于 SAR 低后向散射特性的洪水范围制图:Otsu 阈值分割低 σ⁰ 水体 + 形态学去噪 + 可选 DEM 坡度排除,并矢量化为 GeoJSON。SAR flood extent mapping via Otsu thresholding of low backscatter, morphological cleanup and vectorization. 输出洪水二值 GeoTIFF + 面积统计 JSON + 范围 GeoJSON。

1 次安装

基于多时相 SAR 后向散射时序的农作物分类:逐像元时序/统计/物候特征 + 随机森林。SAR crop classification from multi-temporal backscatter time series using per-pixel phenological features and Random Forest. 合成模式生成水稻/小麦/玉米三类时序真值并评估精度,输出分类 GeoTIFF + 面积统计 + 混淆矩阵 JSON。

1 次安装