Whilst looking for the best available open source solution to generate terrain heightmaps from satellite stereo pairs, I stumbled upon the results of an international IARPA ‘Multiple view Stereo 3D Mapping challenge‘. The entries that secured 2nd and 3rd place used variation’s of Ames Stereo Pipeine (ASP) NASA’s automated, open-source pipeline for mass production of digital elevation models (DEMs) from very high-resolution commercial stereo satellite imagery. I couldn’t wait to dig deeper and review it’s capabilities. I started by setting up a QGIS project file which allowed me to load up my results from numerous test runs covering every key permutation available for the 2 most successful algorithms, this enabled quick comparison of sometimes subtle differences in results:
SGM (Semi-Global Matching) – a proven stereo algorithm with widesread popularity.
MGM (More Global Matching) – is a variation of SGM that can produce superior output at the cost of longer run-time and higher memory usage.
I added a red background on every resulting raster to highlight area’s where the algorithm had not been able to process. Click below image to see animated testing:
I didn’t think this was going to be so troublesome! but wanted to note down the steps to resolve.
The ‘Build Virtual Raster‘ process in QGIS will not bring together multiple rasters if they span across 2 CRS projections
Following my initial post of the issue on GIS stackexchange:
A users tip re unifying the projections for loaded data sent me in the right direction.
Testing supervised classification using another QGIS plugin SCP.
Example showing Maximum Likelihood classifier:
SCP comes with the following classifiers:
– Minimum Distance – Euclidean distance
– Maximum Likelihood – Bayes’ theorem
– Spectral Angle Mapping
Having discovered Orfeo ToolBox and it’s very handy QGIS plugin, I set about reviewing each of OTB’s supervised classifiers, to see which one performs the best with the goal of generating a perfect surface mask that I can use in my terrain project within RV4 engine.
Example showing source raster + libsvm_linear classifier:
I recently finished off a tutorial covering steps required to get real world data into Arma 3 (RV4 Engine) using only open source tools:
Whilst working out how to manage heightmap and satellite imagery within QGIS in preparation for loading into RV4 Engine, I discovered some interesting things along the way.
The first major issue reared it’s head following a GDAL update affecting the gdalwarp command, which broke a step I had been relying on – ‘Clip to raster by mask layer‘ I asked the question on gdal’s github page, and it was confirmed that I had to switch to use full extents, instead of the easier shapefile mask layer. See below original pipeline which mainly relied upon QGIS GUI config.
This lead me to invest more time learning the construct of the GDAL commands within QGIS’s python console. There is of course a lot more flexibility within command line than using the GUI.