Skip to main content

Intro to photogrammetry

Note

Big disclaimer up front: the maths behind this stuff is far from my area of expertise. I’m writing as a photogrammetry layperson that got interested in this topic after processing a tonne of projects using OpenDroneMap. Excuse any ignorance you may observe!

How I ended up here

Note

If you didn’t know, I’m the tech lead @ HOTOSM, where we use drone imagery and tools like ODM to produce open geospatial data for humanitarian response. My lens is “what works for community drone mapping”.

What even is photogrammetry?

Photogrammetry is the art of turning a pile of overlapping 2D photos into a 3D reconstruction of the world.

In the context of aerial imagery, you can imagine it more like this:

The pipeline splits into two big stages, worth understanding separately:

  1. Sparse reconstruction (Structure-from-Motion): find the camera positions and a rough skeleton of 3D points.
  2. Dense reconstruction (Multi-View Stereo): use those camera positions to fill in a detailed surface.

Then downstream tools turn that into the things we actually want: orthophotos (a flat, top-down, distortion-corrected map image) and elevation models. Let’s take each stage in turn.

Stage 1: Structure-from-Motion (the sparse bit)

We hand over a folder of photos; ideally we get back every camera’s position, its lens settings, and a sparse cloud of 3D points. It happens in three steps.

1. Feature detection - find distinctive little landmarks in each photo: corners, textures, anything recognisable again elsewhere. Think of spotting the same chimney or road marking in shot after shot.

2. Feature matching - work out which landmark in photo A is the same landmark in photos B, C, D… This is what links the photos together.

Note

We match features across overlapping photos, so this is why we need to make sure to fly with good photo overlap!

3. Triangulation & bundle adjustment - the big number-crunch. Here’s the catch22: to place a 3D point you need to know where the cameras were, but to know where the cameras were you need 3D points. So the software solves for everything at once - all camera positions and all 3D points together - nudging them until the whole scene is as consistent as possible.

The output is a sparse point cloud - the scene’s skeleton - plus every camera’s pose. Not pretty yet, but the difficult geometry is done.

Incremental vs global

Two strategies for this are available.

COLMAP vs the OpenSfM fork

This was my original question. For drone mapping specifically:

OpenDroneMap’s OpenSfM fork

COLMAP

Stage 2: Multi-View Stereo (the dense bit)

Once SfM has nailed the camera positions, dense reconstruction fills in the detail - going from a sparse skeleton to a dense, photorealistic surface.

Above is the the sparse skeleton from SfM with the dense result below.

In ODM this is currently a separate tool, OpenMVS.

After this, it’s rasterised into the final orthophoto and elevation model.

Could OpenMVS be replaced?

Where COLMAP falls down here

Wrapping up: what’s best for what?

What to watch for