Update: More photogrammetry posts on this blog see below or click on “Photogrammetry” in the “Categories” list
- Basic Operation of openMVG/MVE
- Full 3D Models With openMVG/MVE
- 3D Print from Photogrammetry Model
- Photogrammetry Using a Turntable
- Model House Photogrammetry
- Full Object Photogrammetry
- Model Hedgehog Photogrammetry
- Model Pig Photogrammetry
- Wizard Figurine Photogrammetry
- Sea Shell Photogrammetry
Wikipedia defines photogrammetry as
“… the science of making measurements from photographs, especially for recovering the exact positions of surface points.” If you can recover enough of the surface points then it’s perfectly possible to recreate a complete 3D model of an object from 2D photographs.
( I first got interested in 3D scanning some years ago when I managed a project to develop some software to map and record human body shapes using a ( then quite expensive ) scanner made by a company called TC2.
The project was health related – http://www.bodyvolume.com/home. It’s an interesting idea with lots of health benefits which unfortunately still hasn’t really got into widespread use. I think that’s mainly due to the problem of scanning a human body – you can have any two of quick, cheap and accurate 🙂 )
Today there’s a slightly overwhelming variety of photogrammetry software options available and this post is a summary of the analysis that I went through when trying to select a suitable FOSS toolset to experiment with. I started with the following criteria to assess each option:
- Sensible build / install process. Ideally I should be able to fork a GitHub repository and build the software on any recent Linux distribution with any other dependencies able to be installed via standard packages. Life is too short for messing around with complex build processes and arcane library requirements.
- Good results / easy setup. It needs to work reasonably well with images taken with my point & shoot camera and without having to fiddle with parameters for every scan.
- FOSS. It needs to be FOSS and have no restrictions on the program’s use or on the use of the 3D models generated by the software.
Nice to have:
- GUI. A GUI sometimes makes getting started a bit easier but I’m also quite happy with command line tools especially if they can be wrapped in a shell script.
- Programming language. It would good to contribute something back to the project so ideally it would be written in a language that I’m familiar with. I don’t mind learning a new programming language but it’s time that could be better spent on other things.
I looked at the following options:
Python Photogrammetry Toolbox & PPT-GUI
The scope of the Python Photogrammetry Toolbox and associated tools seems to have evolved over the years and so is not the easiest thing to define. The simplest way that I found to try it was using the Archeos distribution. This installed fine on an old laptop that I had lying around and also on VirtualBox.
( I did briefly try installing the software on my normal Ubuntu based machine and it mostly worked. There were some problems with paths which would probably been fixable had I spent more time on it )
It runs fine and the GUI is easy to use. The only minor but annoying quirk is that it writes the output files to the /tmp/… directory which gets cleared on a reboot. You have to remember to copy the files to somewhere more sensible before exiting. As the name suggests it’s written in Python, it’s fully FOSS and there are no restrictions on the use of the models.
Archeos is based on Debian and also comes with many other related applications already installed. The team behind Archeos also have an interesting blog
openMVG & MVE
“ … a library for computer-vision scientists and especially targeted to the Multiple View Geometry community. It is designed to provide an easy access to the classical problem solvers in Multiple View Geometry and solve them accurately.”
Both of these are written in C/C++ and are FOSS. I was able to clone and build from GitHub with no dramas other than installing a few extra packages.
There’s no GUI2,3 but it’s easy to put the commands into a shell script and run them that way. The outputs looked fine and I got good results fairly quickly from the models that I tried.
1It’s possible that MVE may do the whole job itself but I haven’t fully explored this yet
2There is a build of openMVG available with a GUI – https://github.com/open-anatomy/SfM_gui_for_openMVG/ However this seems to be a fork of openMVG and currently some way behind the original source. There’s a video tutorial using this GUI and it seems that it’s a way of selecting the command line options for the various tools, running them and displaying the output. For me that’s no real advantage over a shell script.
3MVE does contain a GUI for parts of the process but I haven’t investigated in any detail. See MVE build instructions for details.
Regard3D is essentially a GUI wrapper around several third party photogrammetry tools including openMVG and MVE. There are Windows, Linux and OSX versions but only the Windows and OSX versions have installers.
I tried the Windows version and it installed and ran fine. The GUI was easy to use and a useful guide to the options available to the various tools.
However I failed to get the Linux version to build despite spending a reasonable time trying. The main problems were with library versions, especially openCV.
The other drawback is that Regard3D uses a modified version of openMVG which means that there’s inevitably a delay in getting the latest version filtered through and it makes contributing changes back to openMVG more difficult.
I didn’t do any detailed tests on this one because it seems to be more aimed at aerial photography but I included it for completeness.
The GitHub pahttp://opencv.org/ge describes it as:
OpenDroneMap is a tool to postprocess drone, balloon, kite, and street view data to geographic data including orthophotos, point clouds, & textured mesh. In the tradition of the Ship of Theseus, it was originally forked from qwesda/BundlerTools https://github.com/qwesda/BundlerTools.
I think that it’s command line based and written in Python.
I also looked at a couple of other possibilities which didn’t quite meet the criteria above:
VisualFSM has Windows, Linux and OSX versions and is “free for personal, non-profit or academic use”. The Windows version installs and runs OK although my results were not as good as those with openMVG/MVE
Unfortunately the Linux install instructions were lengthy, possibly out of date now and I failed to get them to work.
There are a number of online photogrammetry services, some are free as in beer, some are paid for, the Wikipedia page referenced below lists a few of these.
I have previously tried Autodesk’s free offering – 123D Catch. It worked reasonably well but gave no control over how the images were interpreted. However I notice that there are now mobile device apps as well – it was web only when I tried. These may offer more control.
Another drawback with these services is the licencing of the scans. For 123D Catch the scans remain your property but you give Autodesk:
“ … a world-wide, royalty-free, fully paid-up, perpetual, non-exclusive, transferable, and fully sublicensable (through multiple tiers) right and license (but not the obligation) to reproduce, distribute, redistribute, modify, translate, adapt, prepare derivative works of, display, perform (each publicly or otherwise) and otherwise use all or part of Your Content, by any and all means and through any media and formats now known or hereafter discovered”
I suspect the other services have similar terms. Of course there is also the possibility that any free services may be discontinued or may have to be paid for at some point in the future.
For me the obvious solution was openMVG/MVE. They’re completely open source, build easily and provide good outputs with minimum configuration changes. There’s no GUI but, to be honest, it was trivial to write some shell scripts to manage the whole process.
In a future post I’ll document how I built these tools and how I set up the directories and shell scripts to manage the model creation process.
For now here are two sceenshots of a stone figure on my neighbour’s wall ( original photographs taken with my Canon IXUS 70 point & shoot camera )
Wikipedia also has a long list of photogrammetry software but this includes some very expensive commercial offerings. There’s an older ( 2015 ) summary of the cheap / free options here – https://ryanfb.github.io/etc/2015/01/23/photogrammetry_software_roundup.html