SAR Coregistration
Purpose
SAR Coregistration aligns a secondary SAR acquisition to a reference SAR geometry with sub-pixel precision for downstream phase-sensitive products.
Primary use cases:
- InSAR and coherence workflows
- Multi-temporal SAR change analysis
- Polarimetric stack harmonization
- Cross-track quality control before interferometric differencing
Typical Questions This Tool Helps Answer
- Are the reference and secondary SAR acquisitions sufficiently aligned to produce reliable interferometric phase measurements?
- What is the residual misregistration across the scene, and where does it exceed acceptable limits for the intended product?
- Which areas have poor coregistration quality that will contaminate coherence estimates or phase-unwrapping results?
When To Use This Workflow
Use SAR Coregistration when:
- You have two or more SAR acquisitions that need geometric alignment before phase-sensitive analysis
- Downstream workflows (coherence, interferogram, change detection) require sub-pixel alignment
- You want machine-readable pass/fail QA gates embedded in deliverables for governance or audit purposes
Do not use SAR Coregistration as a substitute for orthorectification or radiometric calibration — those steps should precede coregistration.
Background
SAR coregistration aligns secondary imagery to a reference geometry so phase and amplitude comparisons are physically meaningful. The core objective is to estimate transform $\mathcal{T}$ such that:
$$I_s'(x,y)=I_s(\mathcal{T}(x,y))\approx I_r(x,y)$$
Where $I_r$ is reference (master) and $I_s$ is secondary (slave).
Why Sub-Pixel Accuracy Matters
Interferometric quality can degrade rapidly with registration error. A practical approximation is that coherence decreases as residual misregistration variance rises, so sub-pixel residual control is required for reliable downstream interferometric and coherence products.
Estimation Approaches
Frequency-domain phase correlation estimates global translation from normalized cross-power:
$$R(u,v)=\frac{F_r(u,v)F_s^(u,v)}{|F_r(u,v)F_s^(u,v)|}$$
The inverse FFT peak gives coarse offset $(\Delta x,\Delta y)$.
Spatial-domain normalized cross-correlation refines local alignment:
$$\rho=\frac{\sum(A-\bar A)(B-\bar B)}{\sqrt{\sum(A-\bar A)^2\sum(B-\bar B)^2}}$$
High-$\rho$ tie windows support local correction and residual diagnostics.
Transform and Residual Models
- Translation-only for near-rigid alignment cases.
- Affine for rotation/scale/shear effects.
- Higher-order or piecewise models where residual distortion is spatially non-linear.
Methodological Considerations
- Use a coarse-to-fine strategy: global offset first, then local residual correction.
- Track residual displacement statistics across the scene, not just mean shift.
- Reject low-information windows to avoid propagating unstable tie estimates.
Practical Interpretation Pitfalls
Typical failures include accepting visually plausible alignment without residual statistics, mixing low-coherence windows into tie solutions, and assuming one transform family is valid for all terrain/scene conditions.
Inputs
| Argument | Type | Required | Description |
|---|---|---|---|
| reference_sar | String path | Conditional | Reference SAR raster (direct raster mode). Required unless reference_sar_bundle is provided. |
| reference_sar_bundle | String path | Conditional | Reference SAR sensor bundle root or archive (.zip/.tar/.tar.gz/.tgz). Required unless reference_sar is provided. |
| reference_measurement_key | String | No | Measurement key within reference bundle when bundle contains multiple SAR assets. |
| moving_sar | String path | Conditional | Moving SAR raster (direct raster mode). Required unless moving_sar_bundle is provided. |
| moving_sar_bundle | String path | Conditional | Moving SAR sensor bundle root or archive. Required unless moving_sar is provided. |
| moving_measurement_key | String | No | Measurement key within moving bundle. |
| input_dem | String path | No | Optional DEM raster for geometry initialization in mountainous terrain. |
Parameters
| Argument | Type | Default | Description |
|---|---|---|---|
| coreg_mode | String | translation | Coregistration model: translation (production), affine (experimental), local_offset_grid (experimental). |
| max_offset_px | Integer | 24 | Maximum pixel search radius in x and y. |
| decimation | Integer | 4 | Sampling stride during search (larger = faster, coarser). |
| min_overlap_fraction | Float | 0.20 | Minimum valid overlap fraction required to accept a candidate shift. |
| dem_z_factor | Float | 1.0 | Vertical exaggeration for DEM slope derivation. |
| resample_method | String | bilinear | Resampling method: bilinear or nearest. |
| output_prefix | String | sar_coreg | File name prefix for all output artifacts. |
| phase_a_residual_mae_threshold_px | Float | 2.0 | Phase-A gate: max allowed residual MAE (px). |
| phase_a_dem_informative_fraction_min | Float | 0.01 | Phase-A gate: min DEM informative fraction (when DEM provided). |
| phase_a_continuity_jump_threshold_px | Float | 0.75 | Phase-A gate: max burst-boundary offset jump (px). |
| phase_a_continuity_residual_jump_threshold | Float | 0.08 | Phase-A gate: max adjacent-burst residual MAE jump. |
Outputs
| Output | Type | Description |
|---|---|---|
| moving_aligned | Raster | Moving raster aligned to reference geometry. |
| offset_x | Raster (Float32) | Per-pixel estimated X-offset in pixels. |
| offset_y | Raster (Float32) | Per-pixel estimated Y-offset in pixels. |
| transform | JSON | Estimated transform, Phase-A QA gates, and per-burst diagnostics. |
| summary | JSON | Run summary with parameters and Phase-A gate results. |
| html_report | HTML | Human-readable coregistration report. |
Runtime output keys (returned in ToolRunResult.outputs):
| Key | Points to |
|---|---|
moving_aligned | Aligned moving raster file |
offset_x | X-offset raster file |
offset_y | Y-offset raster file |
transform | Transform JSON artifact |
summary | Summary JSON artifact |
html_report | HTML report |
Transform JSON Schema (transform)
workflow:"sar_coregistration"coreg_mode: mode useddx_px: estimated global x-offset (translation mode)dy_px: estimated global y-offset (translation mode)qa.phase_a_acceptance_gates:residual_mae_px,residual_mae_threshold_px,residual_mae_passburst_continuity_passdem_informative_fraction(null when no DEM provided)dem_informative_fraction_threshold,dem_informative_fraction_passoverall_pass
Summary JSON Schema (summary)
schema_version:"1.0.0"summary.phase_a_acceptance_gates: same schema astransform.qa.phase_a_acceptance_gatesparameters: echo of Phase-A threshold parameters used
Example
import whitebox_workflows as wbw
env = wbw.WbEnvironment()
env.working_directory = "/data/sar_project"
result = env.earth_observation_sar.sar_coregistration(
reference_sar="s1_20260401_vv.tif",
moving_sar="s1_20260413_vv.tif",
coreg_mode="translation",
max_offset_px=24,
decimation=4,
resample_method="bilinear",
output_prefix="outputs/s1_20260413_coreg"
)
import json
summary = json.loads(open(result.outputs["summary"]).read())
print(summary["summary"]["phase_a_acceptance_gates"]["overall_pass"])
Bundle Mode (Sentinel-1 SAFE)
result = env.earth_observation_sar.sar_coregistration(
reference_sar_bundle="s1_20260401.SAFE",
reference_measurement_key="vv",
moving_sar_bundle="s1_20260413.SAFE",
moving_measurement_key="vv",
output_prefix="outputs/s1_20260413_coreg"
)
References
- Bamler, R., & Hartl, P. (1998). Synthetic aperture radar interferometry. Inverse Problems, 14(4), R1–R54.
- Eineder, M., et al. (2011). Imaging geodesy — toward centimeter-level ranging accuracy with TerraSAR-X. IEEE TGRS, 49(2), 661–671.
- Zitova, B., & Flusser, J. (2003). Image registration methods: a survey. Image and Vision Computing, 21(11), 977–1000.
Parameter Interaction Notes
max_offset_pxanddecimationinteract: high decimation with small max offset can silently miss the true peak. Reducedecimationbefore increasingmax_offset_px.coreg_mode=affineandlocal_offset_gridare experimental and can produce unstable results on speckle-dominated inputs; usetranslationfor production.- Phase-A gate thresholds evaluate residuals post-warp regardless of mode;
phase_a_residual_mae_threshold_px=0.5is appropriate for InSAR-quality assurance. resample_method=nearestdegrades sub-pixel alignment quality; usebilinearfor all phase-sensitive products.
QA and Acceptance Criteria
- Input compatibility: use
sar_analysis_readinessto confirm the pair is compatible before coregistration. - Phase-A gate:
summary["summary"]["phase_a_acceptance_gates"]["overall_pass"]must betruebefore using outputs in coherence or interferogram workflows. - Residual MAE: < 0.3 px for deformation campaigns; < 1.0 px for change detection.
- Burst continuity:
burst_continuity_pass: falserequires investigation — often resolved by providinginput_demfor mountainous terrain. - Visual check: flicker reference vs aligned moving raster; stable edges must show no lateral shift.
Advanced Operational Guidance
- Archive
transform.jsonper pair as the canonical alignment record for audit trails. - Do not proceed to
sar_interferogram_coherencewithout verifyingoverall_pass=true. - If DEM informative fraction gate fails, check whether the DEM covers the SAR scene; remove
input_demif overlap is insufficient. - For large multi-date stacks, use a single fixed reference scene and apply coregistration independently per date.
Implementation Patterns
- Sentinel-1 InSAR preparation:
sar_analysis_readiness→sar_coregistration→sar_interferogram_coherence - Multi-temporal change stack: run coregistration per date against a fixed reference; archive transform JSON per pair
- DEM-assisted complex terrain: supply
input_demand setdecimation=2 - Rapid QA screening:
decimation=8,max_offset_px=16before full production run
Related Tools
sar_analysis_readiness— validate scene compatibility before coregistrationsar_interferogram_coherence— consumesmoving_alignedoutputregistration_oriented_feature_workflow— complementary alignment QC for optical/SAR pairs
Results Delivery Checklist
-
moving_aligneddelivered and spot-checked visually -
transform.jsonarchived as alignment record -
Phase-A
overall_pass=trueconfirmed before downstream use - HTML report reviewed and attached to project record
-
Input pair compatibility confirmed via
sar_analysis_readiness
Common Questions
Q: What does overall_pass: false mean for my project?
A: One or more Phase-A gates failed — residual MAE exceeded threshold, burst continuity was poor, or DEM coverage was insufficient. Inspect residual_mae_px and burst_continuity_pass to determine corrective action. Do not use the moving_aligned raster for coherence or interferogram products until the issue is resolved.
Q: The offset rasters are non-zero everywhere — did the coregistration fail?
A: No. Small non-zero offsets are normal and expected even for well-aligned pairs — they reflect local speckle, topographic effects, and interpolation residuals. Evaluate alignment quality by residual_mae_px in the summary JSON and by visual flickering, not by expecting zero-valued offset rasters.
Q: Should I supply a DEM for every run?
A: Only when the scene contains significant topographic relief. For flat or low-relief terrain, omitting input_dem has no penalty. For mountainous or hilly terrain, supplying a DEM improves initialization and typically reduces residual MAE.
Q: How do I know the coregistration is accurate enough for my coherence product?
A: Check residual_mae_px in the summary JSON. For deformation/InSAR, target < 0.3 px. The default Phase-A gate of 2.0 px is a minimum production floor; tighten phase_a_residual_mae_threshold_px to 0.5 px for InSAR-quality assurance.