Orthomosaic and elevation model processing
UAT 451 UAS Technology for Surveying, Mapping and Photogrammetry
Lesson
By the end of this module you will be able to
- Explain the processing chain from images to tie points, adjustment, dense point cloud, DSM, DTM and orthomosaic
- Read a processing report, check GCP residuals and find outliers
- Explain ground filtering with a morphological filter and the effect of window size
- Choose product resolutions and map products that match the requirements
- Choose the contour interval, the number of printed sheets and the file formats of the delivered map
Why this matters
Modern processing software produces a map at the press of a button, but the result may hide a wrongly marked control point, a DTM that still contains house roofs, or an orthomosaic with leaning buildings. A surveyor must know what each stage does, read the quality report and adjust the key settings, rather than trusting the result because the image looks good.
The processing chain
- Tie points: the software finds distinctive points visible in several images and matches them between images
- Bundle adjustment: estimates the position and orientation of every camera, the lens constants and the 3D positions of the tie points together, using GCPs to tie everything to the coordinate system. This is structure from motion, widely used in geoscience and surveying
- Dense point cloud: depth is computed for almost every pixel
- DSM (digital surface model): the top surface, including roofs and tree canopies
- DTM (digital terrain model): bare ground only, after filtering out buildings and vegetation
- Orthomosaic: an image corrected so that every point is seen from directly above, so distances can be measured on it
The first quality measure is the reprojection error: the distance in pixels between where a point was measured in an image and where its 3D position projects back into that image. It is usually below one pixel for good images; unusually high values indicate blurred images, wrong matches or poorly estimated lens parameters.
Checking GCP residuals
The processing report lists the residual at each GCP. This shows whether the GCPs agree with each other, not the accuracy of the map (which needs independent checkpoints, in module 5). A point far from the rest is usually marked in the wrong image, given the wrong target code, or recorded with the wrong pole height.
Example 1 Finding an abnormal GCP
A simple rule flags values above three times the median. The median, unlike the mean, is not dragged by outliers.
import statistics
residual = { # 3D GCP residuals from the processing report (cm)
"G01": 1.8, "G02": 2.1, "G03": 1.5, "G04": 2.4, "G05": 1.9,
"G06": 9.6, "G07": 2.0, "G08": 1.7, "G09": 2.2,
}
med = statistics.median(residual.values())
for gcp, r in residual.items():
if r > 3 * med:
print(f"{gcp}: {r} cm is more than 3 x median ({med} cm) -> check marking and field record")
rest = [r for g, r in residual.items() if r <= 3 * med]
print(f"median {med} cm, mean of the others {statistics.mean(rest):.2f} cm")
G06: 9.6 cm is more than 3 x median (2.0 cm) -> check marking and field record
median 2.0 cm, mean of the others 1.95 cm
G06 is off by 9.6 cm while the others are about 2 cm. Before removing it, open the images where it was marked and its field record. If it was marked in the wrong place, fix it and reprocess. If no cause can be found, it may be excluded from the adjustment, but the reason must be recorded in the report.
From DSM to DTM
There are several ways to separate the ground from what stands on it. OpenDroneMap uses the improved simple morphological filter (SMRF) of Pingel et al. (2013). Its core idea is a morphological opening: take the minimum within a window (erosion), then the maximum within the same window (dilation). Anything narrower than the window is removed; anything wider remains.
Picture pressing a long ruler onto the surface. If the ruler is longer than a roof, it bridges over it; if it is shorter, the ruler rests on the roof and the roof counts as ground.
Example 2 Window size changes the DTM
A 60 m profile with ground rising 1 cm per metre, a tree 5 m tall and 6 m wide, and a house 6 m tall and 14 m wide.
ground = [2.0 + 0.01 * x for x in range(60)] # ground rising 1 cm per metre, 60 m sampled every 1 m
dsm = list(ground)
for x in range(10, 16): # tree 5 m tall, 6 m wide
dsm[x] += 5.0
for x in range(30, 44): # house 6 m tall, 14 m wide
dsm[x] += 6.0
def opening(z, r):
"""minimum in the window, then maximum in the same window (morphological opening)"""
lo = [min(z[max(0, i - r):i + r + 1]) for i in range(len(z))]
return [max(lo[max(0, i - r):i + r + 1]) for i in range(len(z))]
for r in (4, 9):
dtm = opening(dsm, r)
worst = max(abs(a - b) for a, b in zip(dtm, ground))
print(f"window radius {r} m: max DTM error {worst:.2f} m, house top in DTM {dtm[36] - ground[36]:.2f} m")
window radius 4 m: max DTM error 6.00 m, house top in DTM 5.99 m
window radius 9 m: max DTM error 0.14 m, house top in DTM 0.08 m
A window of radius 4 m (9 m wide) removes the tree, but the house is wider than the window and stays in the DTM at almost 6 m. A window of radius 9 m (19 m wide) removes both, leaving a maximum error of about 14 cm caused by the slope, because opening flattens the sloping ground under the house. SMRF has a slope parameter to compensate for this. ODM’s defaults are an 18 m window, a slope of 0.15 and an elevation threshold of 0.5 m; areas with larger buildings, such as factories, need a bigger window.
A key limit of photogrammetry is that it cannot see the ground under dense foliage, unlike lidar, where some pulses pass through gaps in the leaves to the ground. In tall grass or shrubs, a DTM from images is therefore usually higher than the real ground and must be reported separately (module 5).
Resolution and products
- Ortho and DEM resolution are set in ODM with
--orthophoto-resolutionand--dem-resolution(cm per pixel) and are capped so they cannot be finer than the estimated GSD. DEMs are usually set coarser than the ortho, because each height is computed from several pixels together - An ordinary orthomosaic still shows buildings leaning away from the image centre, because it uses a smoothed surface. Precise building outlines need a detailed DSM or a true ortho
- Contours are generated from the DTM. An interval much finer than the vertical accuracy shows detail that does not really exist
- Flow direction computed from the DTM in GIS is used to design pipe routes, the product the municipality actually needs
From products to a delivered map
Users want files they can open straight away, so the format follows the data type. Images and elevation models go out as GeoTIFF with the coordinate system embedded. Large files become a Cloud Optimized GeoTIFF, which is tiled and carries reduced-resolution overviews inside the file, so software reads only the part on screen (OGC, 2023). Contours go out as a GeoPackage. A printed map is built in the QGIS Print Layout, which adds a scale bar, a north arrow and a legend and exports to PDF.
The contour interval must be checked against accuracy. The US National Map Accuracy Standards (NMAS) require that no more than 10% of tested points be in error by more than half the contour interval. If errors are normally distributed with zero mean, 90% of absolute errors lie within , so the interval must be at least . ASPRS Edition 2 has dropped map scale and contour interval as accuracy measures and keeps RMSE alone (Abdullah, 2025), so use the NMAS rule only as a back-check, not as the acceptance criterion.
Example 3 Choosing the contour interval and the number of printed sheets
Use the ten vertical errors from Example 1 of module 5 (six on hard surface, four on grass). An A1 sheet less margins leaves 801 x 554 mm, and the printer is 300 dots per inch.
import math
from statistics import NormalDist
z90 = NormalDist().inv_cdf(0.95) # 90% of absolute errors lie within 1.645 sigma
print(f"contour interval >= {2 * z90:.2f} x sigma (z = {z90:.3f})")
errors = [4, -5, 6, -3, 5, -4, 12, 15, 9, 13] # vertical errors (cm) at the ten checkpoints of module 5
for ci in (25, 50): # candidate contour intervals (cm)
off = sum(abs(e) > ci / 2 for e in errors)
print(f"interval {ci} cm: {off}/10 points off by more than {ci / 2:.1f} cm -> {'pass' if off <= 1 else 'fail'}")
w, h = 801, 554 # an A1 sheet less margins covers 801 x 554 m at 1:1,000
print(f"1:1000 sheet covers {w} x {h} m: {math.ceil(1200 / w) * math.ceil(800 / h)} sheets, one 300-dpi dot = {25.4 / 300 * 1000 / 10:.1f} cm")
contour interval >= 3.29 x sigma (z = 1.645)
interval 25 cm: 2/10 points off by more than 12.5 cm -> fail
interval 50 cm: 0/10 points off by more than 25.0 cm -> pass
1:1000 sheet covers 801 x 554 m: 4 sheets, one 300-dpi dot = 8.5 cm
A 25 cm interval fails because two grass points are off by 15 and 13 cm, more than 12.5 cm, which is 20% of all points. A 50 cm interval passes, so draw 0.5 m contours over the whole site. At 1:1,000 the map needs 4 sheets, and one printed dot stands for 8.5 cm on the ground, coarser than the 2.5 cm GSD of the image. Paper therefore shows less detail than the data, and users who need full detail must use the digital file.
Module lab
Lab: process and read the report
- Process the images from module 2 in WebODM, with a GCP file whose first line gives the coordinate system, such as
EPSG:32647, and turn on--dsmand--dtm - Open the quality report, record the reprojection error and GCP residuals, and check for outliers with the code in Example 1
- Draw a profile across a building in QGIS and compare the DSM with the DTM to see whether the building was filtered out
- Try two values of
--smrf-windowand compare the DTM around a large building - Generate contours and flow direction from the best DTM, and record every setting in the project folder
Common mistakes
Watch out
- Reporting GCP residuals as map accuracy
- Deleting a GCP with a large residual at once without checking its images and field record
- Using a filter window smaller than the buildings, so roofs remain in the DTM
- Delivering a DSM to a user who needs a DTM because the names look alike
- Setting DEM resolution equal to the GSD and believing heights are that detailed
Summary
- Processing runs from tie points and bundle adjustment to a dense point cloud, then splits into DSM, DTM and orthomosaic
- Reprojection error shows adjustment quality; GCP residuals show consistency, not accuracy
- Check outliers against the median, then find the cause before removing a point
- A morphological filter removes what is narrower than the window; the window must be larger than buildings, but slopes cause errors
- Photogrammetry cannot see ground under dense vegetation, so report the DTM there separately
Check your understanding
- How does a DSM differ from a DTM?
- GCP residuals are 2, 2, 3, 2 and 12 cm. What is the median, and which point exceeds the three-times rule?
- A filter window is 9 m wide and a building is 14 m wide. Will the building be filtered out?
- Why is a DTM from images in dense shrubs usually higher than the real ground?
- Why is DEM resolution usually set coarser than the ortho?
Answers
- A DSM is the top surface including buildings and vegetation; a DTM is bare ground only
- The median is 2 cm; the 12 cm point exceeds cm
- No, because the building is wider than the window
- The camera cannot see the ground under the leaves, so the points are on top of or inside the canopy
- Each height is computed from several pixels together, so the true height resolution is coarser than the image
Key formulas
| Reprojection error | |
| Morphological opening | |
| Outlier criterion | |
| Minimum contour interval |
Key references
- OpenDroneMap Authors. Options and flags. OpenDroneMap documentation (Version 3.6.0). link
- OpenDroneMap Authors. Outputs. OpenDroneMap documentation (Version 3.6.0). link
- OpenDroneMap Authors. Ground control points. OpenDroneMap documentation (Version 3.6.0). link
- Pingel, T. J., Clarke, K. C., & McBride, W. A. (2013). An improved simple morphological filter for the terrain classification of airborne LIDAR data. ISPRS Journal of Photogrammetry and Remote Sensing, 77, 21-30. https://doi.org/10.1016/j.isprsjprs.2012.12.002 link
- Snavely, N., Seitz, S. M., & Szeliski, R. (2006). Photo tourism: Exploring photo collections in 3D. ACM Transactions on Graphics, 25(3), 835–846. link
- Westoby, M. J., Brasington, J., Glasser, N. F., Hambrey, M. J., & Reynolds, J. M. (2012). 'Structure-from-Motion' photogrammetry: A low-cost, effective tool for geoscience applications. Geomorphology, 179, 300–314. link
- Wolf, P. R., DeWitt, B. A., & Wilkinson, B. E. (2014). Elements of photogrammetry with applications in GIS (4th ed.). McGraw-Hill Education. link
- Abdullah, Q. A. (2025). Overview of the ASPRS positional accuracy standards for digital geospatial data. LIDAR Magazine, 15(2). link
- U.S. Geological Survey. (n.d.). Map accuracy [National Mapping Program fact sheet]. U.S. Department of the Interior. link
- Maso, J. (Ed.). (2023). OGC Cloud Optimized GeoTIFF standard (OGC 21-026, version 1.0). Open Geospatial Consortium. link
- QGIS Project. QGIS user guide. link
Further reading
Study the assigned knowledge units in advance, review media and take the module quiz
In class / field
Lab or field practice from worksheets with a safety checklist
Learning evidence: Checked worksheets and quiz results