Absolute DSM
For georeferenced inputs, DepthWizard can output an absolute DSM: elevation above a named vertical datum. The model predicts only height above ground, so the terrain has to come from somewhere else. Source: Model_Traning/v5/geo/.
The double-counting problem
Section titled “The double-counting problem”Free global elevation models such as SRTM and Copernicus GLO-30 have about 30 m cells, and they are surface models: each cell already includes the buildings and trees inside it, averaged. Adding the predicted nDSM on top counts those structures twice.
| Scene | Truth | DEM + nDSM | DTM + nDSM (ours) |
|---|---|---|---|
| Synthetic 30 m tower | 135.0 | 165.0 | 134.4 |
Elevation at the structure top, metres. Source: Research-Paper/main.tex Table V
Methods
Section titled “Methods”--dsm-mode dem_anchored. The idea: the final DSM, averaged over each DEM cell, should equal the DEM, because that is what the DEM measures. The fine detail inside each cell comes from the prediction.
- A averages to about 30 m cells, and U interpolates bilinearly back to pixels.
- The second term is the high-frequency part of the prediction, which has zero mean over each cell.
- X is a coarse field solved iteratively (Tobler’s pycnophylactic method) so that every 30 m cell of D averages exactly to the DEM.
- λ =
detail_gain(default 1.0) scales how much predicted detail is added.
This never double counts: building mass already present in the DEM is redistributed onto the building footprint instead of being added again.
--dsm-mode dtm_plus_ndsm. Fit a bare-earth DTM through ground pixels only, then add the nDSM.
- Ground mask: pixels that Head C labels as ground-like (ground, low vegetation, water, road) and whose nDSM is below 1.5 m. If fewer than 2 % of pixels qualify, the height test is used alone.
- Robust surface fit: a 2nd-order polynomial is fitted to the DEM at ground pixels with Tukey bi-weight re-weighting, plus a smoothed residual (64 px window) for local relief.
- DSM = DTM + nDSM.
This is the method behind the 134.4 m result above.
--gcps gcps.csv. When surveyed points are available, they correct the result directly, and no DEM is needed.
lon,lat,elevation<lon>,<lat>,<metres above datum>Rows can also be given as row,col,elevation in pixel coordinates. v5 fits each correction where its error actually lives (refine_with_gcps_decomposed):
- 1 point → offset a only;
- ≥ 2 points spanning more than 0.5 m of nDSM → also the structure scale s (ground-only points cannot measure it);
- ≥ 4 points → also the terrain tilt b, c.
The fit uses RANSAC over minimal sets with a 1 m inlier threshold, then least squares on the consensus, so a few bad points do not corrupt it. v4 fitted a single scale to the whole DSM, which also stretched the terrain: a 1.05 scale on a 400 m plateau is a 20 m error.
Outputs
Section titled “Outputs”With absolute enabled on a georeferenced input, a job writes dtm_m.tif and dsm_m.tif next to ndsm_m.tif. Each carries a compound CRS (horizontal EPSG + vertical datum), and meta.json records the vertical_datum.