IT

Photogrammetry and drones · 14 April 2018

Photogrammetry with PhotoScan part 5 – control points and alignment optimisation

Paolo Rossi on ground control points in a modern photogrammetric survey with Agisoft PhotoScan: how many to place, how to mark them, and how to optimise the alignment and edit the sparse cloud.

Clicking loads the video from YouTube: Google will receive your IP address and may store data on your device. Privacy · Watch it on YouTube

This article is about photogrammetry with PhotoScan, control points and optimising the alignment of the images.

The series written by Paolo Rossi on modern photogrammetry with the Agisoft PhotoScan software continues with episode five.

You’ll find links to all the articles at the bottom of the page.

Control points

Control points, also called Ground Control Points (GCPs), are points identifiable in the images whose coordinates are known (because they’ve been measured).
These points have much in common with the photogrammetric control points of traditional photogrammetry.
Their job is to deliver a scaled and georeferenced model.
They’re also a way of constraining the model during reconstruction, reducing the distortions caused by chaining the images together.

The survey

The GCP coordinates are surveyed at the same time as the drone flight.
Before the flight, the targets are placed in the area of interest.
The centre of the targets must be visible and identifiable in the images acquired (target size depends on flight height and the camera used).
The position of the point (the position of the target centre) is often measured with classic surveying techniques such as GNSS or a total station.

There’s no general, certain answer to the question “how many targets should I place?”!

This is where the surveyor’s experience and a good dose of common sense come in.

The factors that influence the choice are:

  • the size of the area
  • the flight height
  • the camera
  • the characteristics of the area
  • the geometric complexity of the surface (in both plan and height)
  • the accuracy you want to achieve

A general rule is that the control points should be evenly distributed over the whole area of interest. We constrain the edges and place some points in the centre; if the area has marked height differences, points must be placed at the different heights.

Some thoughts on the number of control points

If we think of a classic georeferencing operation (roto-translation with a change of scale), there are 7 unknown parameters, and we need the 3D coordinates of at least 3 points for a solution (better 4, so there’s redundancy for an adjustment).
The same applies to SfM.
And if we think of a “typical” square area, we’ll place a target at each corner plus one in the centre, so 5 targets in total.

I’d say 5–6 targets is the minimum.
Adding more also increases the achievable accuracy.
Above a certain threshold the improvements are no longer so marked.

Markers in PhotoScan

In PhotoScan, control points are entered as markers. The process of identifying the target in the images is called marking (or collimation).
Marking is usually done after alignment, because identifying the target in images that are already positioned is quicker.

The window for adding markers in Agisoft PhotoScan

  • Create a new marker: in the Reference pane, right-click in the markers window.
  • Place the marker in the first image: once the target is identified, right-click and place the corresponding marker.
  • Refine the placement: at any time the marker can be selected and moved to the most suitable position. A green flag means “position manually refined by the user”.
  • Place the marker in the second image: in any other image containing the target you’ll see a dashed white-red line showing the line on which the target lies. This line comes from epipolar geometry, a technique that reduces the search space for matches between aligned images to a line.
  • Place the marker in further images: once the target is marked in the second image, grey flags appear in all the images where the target is visible. A grey flag means the target was identified automatically and that the marking isn’t used for processing. I usually refine the target position manually in all the images (helped by image filtering tools). I refine the position (the grey flag turns green) in as many images as possible to constrain the dataset as well as possible, leaving out those where the target centre isn’t clearly visible or is at the edge of the image.
  • Export markers: once all the markers are marked, you can save their positions to a file (.xml) and export it so it can be imported into other projects.
  • Enter coordinates: in the Reference pane you can type in the point’s coordinates and their accuracy. Alternatively you can import the values from a suitably edited txt file (Import…).

Scale bars

In PhotoScan you can also work with scale bars.
If you don’t have point coordinates but only distances, you can use those to constrain the model and get a product that’s scaled but not georeferenced. Adding scale bars is similar to adding markers; in fact a scale bar is simply a distance between two markers (the manual has all the information).

Coded targets

If you always work with PhotoScan, you might be interested in trying coded targets: targets with a particular geometry that the software can recognise automatically.
This avoids manual marking in the images, speeding up processing and improving the precision with which the target centre is identified.

I’ve never used them (I will soon!), but here are some thoughts:

  • Benefits in terms of time and precision;
  • Automatic identification means they can also be used as tie points during alignment (the first step);
  • If the coding pattern isn’t displayed correctly and PhotoScan doesn’t recognise the target, marking becomes very difficult (there are no numbers we can recognise!). This could happen if the camera resolution is insufficient, or with chromatic aberration or blurring.
    The manual itself suggests using coded targets in close-range photogrammetry projects, because at greater distances the target would have to be very large.

Optimisation

Optimising the alignment is done on the basis of the data “ticked” in the Reference pane.
You can use information on the camera positions and the marker coordinates.
At this stage the manual recommends using only the markers, because they’re more accurate than the data recorded by the drone’s on-board positioning systems.

Optimisation is launched from the Tools menu, Optimize Cameras, and takes a few minutes.
The parameters to optimise are chosen automatically by the software according to the type of camera used and the results of the alignment phase (for example: if p1 and p2 are close to 0, p3 and p4 aren’t optimised).

At the end of the optimisation no new outputs are created, only “updates” of the results already obtained.
The Reference pane shows the errors on the markers entered (the difference between entered and estimated coordinates), the sparse cloud is georeferenced, and the camera positions and calibration parameters are updated.
In the Tools, Camera Calibration window you can see the new distortion and residual plots and the new adjusted parameter values.

Editing the sparse cloud

Another useful operation while optimising the alignment is editing the sparse cloud.

The points that make up this first reconstruction of the geometry were chosen automatically by the software (we can set maximum limits during alignment, but nothing more).
It can be useful to remove some of these points to improve the alignment of the whole dataset.

The Gradual Selection command lets you do this editing (you’ll find it in the Edit menu, or Model in a recent version).

Let’s look at the parameters you can query:

  • Reprojection error: points with high values were poorly located during matching and often indicate wrong matches;
  • Reconstruction uncertainty: high values indicate points reconstructed from images very close together, with a short baseline;
  • Image count: the number of images the point is visible in (points visible in only two images may not have been reconstructed well);
  • Projection accuracy: selects points poorly located because of the scale at which they were identified.

What I do, after optimising the alignment with the control points, is use these editing tools and optimise again.

I use Image count to remove points seen in only two images (they’re more likely to be the result of errors), re-run the optimisation, then select the points with high reprojection error values, delete them and optimise again.
I only use these two filters because I’ve noticed that the other values “settle” as a result.
I use reprojection error values of around one pixel (or slightly less).
This is only a guideline, because the choice must depend on the accuracy required and the ground pixel size.

Reading the PhotoScan forum, I found some advice saying that you shouldn’t remove more than 10–15% of the points of the sparse cloud, otherwise you risk reducing it too much and worsening the results.

With the construction of the sparse cloud, the “package” called SfM comes to an end: as the acronym suggests, it reconstructs the object’s geometry from “motion”. We now have the sparse cloud, which describes the object, and the poses of the camera shots.

In building the dense cloud, these alignments are used to determine the 3D position pixel by pixel with dense image matching algorithms.

Until next time!

Thanks to Paolo for his contribution, which I hope is useful to you.
For doubts or questions, get in touch!

See you soon!

Paolo Corradeghini

These are the articles in this series:

Photo of Paolo RossiPaolo Rossi, engineer and PhD in Industrial and Environmental Engineering at the University of Modena and Reggio Emilia, works at the Geomatics Laboratory of the “Enzo Ferrari” Department of Engineering, on 3D reconstruction from images.

I published a video on the YouTube channel about control points and alignment optimisation. The video is in Italian.

← All articles