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

ArgumentTypeRequiredDescription
reference_sarString pathConditionalReference SAR raster (direct raster mode). Required unless reference_sar_bundle is provided.
reference_sar_bundleString pathConditionalReference SAR sensor bundle root or archive (.zip/.tar/.tar.gz/.tgz). Required unless reference_sar is provided.
reference_measurement_keyStringNoMeasurement key within reference bundle when bundle contains multiple SAR assets.
moving_sarString pathConditionalMoving SAR raster (direct raster mode). Required unless moving_sar_bundle is provided.
moving_sar_bundleString pathConditionalMoving SAR sensor bundle root or archive. Required unless moving_sar is provided.
moving_measurement_keyStringNoMeasurement key within moving bundle.
input_demString pathNoOptional DEM raster for geometry initialization in mountainous terrain.

Parameters

ArgumentTypeDefaultDescription
coreg_modeStringtranslationCoregistration model: translation (production), affine (experimental), local_offset_grid (experimental).
max_offset_pxInteger24Maximum pixel search radius in x and y.
decimationInteger4Sampling stride during search (larger = faster, coarser).
min_overlap_fractionFloat0.20Minimum valid overlap fraction required to accept a candidate shift.
dem_z_factorFloat1.0Vertical exaggeration for DEM slope derivation.
resample_methodStringbilinearResampling method: bilinear or nearest.
output_prefixStringsar_coregFile name prefix for all output artifacts.
phase_a_residual_mae_threshold_pxFloat2.0Phase-A gate: max allowed residual MAE (px).
phase_a_dem_informative_fraction_minFloat0.01Phase-A gate: min DEM informative fraction (when DEM provided).
phase_a_continuity_jump_threshold_pxFloat0.75Phase-A gate: max burst-boundary offset jump (px).
phase_a_continuity_residual_jump_thresholdFloat0.08Phase-A gate: max adjacent-burst residual MAE jump.

Outputs

OutputTypeDescription
moving_alignedRasterMoving raster aligned to reference geometry.
offset_xRaster (Float32)Per-pixel estimated X-offset in pixels.
offset_yRaster (Float32)Per-pixel estimated Y-offset in pixels.
transformJSONEstimated transform, Phase-A QA gates, and per-burst diagnostics.
summaryJSONRun summary with parameters and Phase-A gate results.
html_reportHTMLHuman-readable coregistration report.

Runtime output keys (returned in ToolRunResult.outputs):

KeyPoints to
moving_alignedAligned moving raster file
offset_xX-offset raster file
offset_yY-offset raster file
transformTransform JSON artifact
summarySummary JSON artifact
html_reportHTML report

Transform JSON Schema (transform)

  • workflow: "sar_coregistration"
  • coreg_mode: mode used
  • dx_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_pass
    • burst_continuity_pass
    • dem_informative_fraction (null when no DEM provided)
    • dem_informative_fraction_threshold, dem_informative_fraction_pass
    • overall_pass

Summary JSON Schema (summary)

  • schema_version: "1.0.0"
  • summary.phase_a_acceptance_gates: same schema as transform.qa.phase_a_acceptance_gates
  • parameters: 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_px and decimation interact: high decimation with small max offset can silently miss the true peak. Reduce decimation before increasing max_offset_px.
  • coreg_mode=affine and local_offset_grid are experimental and can produce unstable results on speckle-dominated inputs; use translation for production.
  • Phase-A gate thresholds evaluate residuals post-warp regardless of mode; phase_a_residual_mae_threshold_px=0.5 is appropriate for InSAR-quality assurance.
  • resample_method=nearest degrades sub-pixel alignment quality; use bilinear for all phase-sensitive products.

QA and Acceptance Criteria

  1. Input compatibility: use sar_analysis_readiness to confirm the pair is compatible before coregistration.
  2. Phase-A gate: summary["summary"]["phase_a_acceptance_gates"]["overall_pass"] must be true before using outputs in coherence or interferogram workflows.
  3. Residual MAE: < 0.3 px for deformation campaigns; < 1.0 px for change detection.
  4. Burst continuity: burst_continuity_pass: false requires investigation — often resolved by providing input_dem for mountainous terrain.
  5. Visual check: flicker reference vs aligned moving raster; stable edges must show no lateral shift.

Advanced Operational Guidance

  • Archive transform.json per pair as the canonical alignment record for audit trails.
  • Do not proceed to sar_interferogram_coherence without verifying overall_pass=true.
  • If DEM informative fraction gate fails, check whether the DEM covers the SAR scene; remove input_dem if 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_readinesssar_coregistrationsar_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_dem and set decimation=2
  • Rapid QA screening: decimation=8, max_offset_px=16 before full production run
  • sar_analysis_readiness — validate scene compatibility before coregistration
  • sar_interferogram_coherence — consumes moving_aligned output
  • registration_oriented_feature_workflow — complementary alignment QC for optical/SAR pairs

Results Delivery Checklist

  • moving_aligned delivered and spot-checked visually
  • transform.json archived as alignment record
  • Phase-A overall_pass=true confirmed 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.