Technical Article – Comparison of Contour Line Generation From Pix4D and WebODM

To create contour lines, I use the Qgis Raster Extraction tool on a DTM.

Using Pix4D’s default settings to create a DTM and Orthomosaic, Qgis generates contours like this:

These contour lines are quite smooth – and appear similar to those found on topological maps. However – without verification, it’s not possible to determine the accuracy of these contour lines.

Using default settings, WebODM to create a DTM from the same source photos, the Qgis generated contour lines appear quite different:

These contour lines are quite jagged by comparison to those generated from Pix4D. It’s possible that these contour lines are more accurate. It is also possible that these contour lines reflect more noise.

I’ve tried smoothing these contour lines in Qgis with a couple of the smoothing tools it has available. I was unable to produce satisfactory results with these tools.

Studying the options on WebODM, I found that there is an option of for the resolution of DEM outputs. The default is 5 cm per pixel. This produces a fairly large DTM – in this example the DTM is 52 megabytes. By comparison, the DTM produced by Pix4D is only 36 megabyte.

I tried reducing the resolution of the DTM created by WebODM to see if Qgis would create smoother contours. Here is the contours when the DEM resolution is set to 75 cm per pixel:

This is a far smoother result than I was ever able to achieve using the smoothing tools available in Qgis.

To compare the difference in data depicted by the contours made from Pix4D and WebODM DTMs, I overlaid them with elevation levels. (in meters) The red contours are from a Pix4D DTM and the green are from WebODM.

The both these Pix4D and WebODM models are generated from the same set of set of 550 images. Further research is required to know which model is more accurate.

However it does appear that by decreasing the resolution of the DEMs created by WebODM, it is far easier to obtain smoother contour lines.

Out of curiosity, I wanted to compare the measurements of the Pix4D contour lines with the higher resolution (5 pixel/cm) WebODM contour lines. To remove some of the “noise” in the WebODM contours, I removed the contours under 50 meters long. Here the higher resolution WebODM contours are in black, and the Pix4d contours are in red:

Neither contours from the WebODM high or low resolution DTM matches the Pix4D elevations perfectly. That suggests to me that it’s not the resolution of the DTM that affects it’s accuracy. It’s just as likely that the Pix4D as the WebODM DTM’s are imperfect in their elevations.


After working through more options on WebODM, I finally found options that create an Orthophoto and DTM that Qgis can use to create a orthomosaic with contours very similar to that generated by Pix4D.

Here are the settings:

What’s not displayed is that I reduced the image size by half – selecting 3000 for image size. (The original images are 6000×4000 – 24 megapixel) Note this reduction is the default setting for Pix4D. In my Pix4D examples on this report, I set Pix4D to use the full scale image.

Here is the result using these new options. (orthophoto resolution is set to 1 and DEM resolution is set to 75)