OpenSfM and OpenDroneMap could be used as an alternative for the VisualSFM & CMPMVS process. OpenSfM is a free open source SfM library, which reconstructs only point clouds. OpenDroneMap implements OpenSfM and extends to solid 3D model reconstrucion. OpenSfM and OpenDroneMap can integrates GPS information for robustness.
OpenSfM and OpenDroneMap run on Linux machine only. Possible solution for Windows users is to install an Ubuntu GNU/Linux OS on the Windows machine.
Image Capturing
(Same as in reconstruction workflow)
Recommended equipment:
Digital camera is recommended. We used Samsung Galaxy camera, which captures images that are 4608 pixels wide and 3456 pixels high; and videos that are 1920x1080. The idea is to get better quality images. Higher resolution images usually help preserve detail and get better reconstruction result.
We recommend using images from a single camera for OpenDroneMap toolkit.
Software Installation & Usage
Read and follow the instructions from authors:
https://github.com/mapillary/OpenSfM
https://github.com/OpenDroneMap/OpenDroneMap
For Windows users, install a virtual Linux environment first: https://github.com/OpenDroneMap/odm_vagrant
Run run.py from a directory full of your images.
For example, in the terminal:
dir/of/your/image$:../../OpenDroneMap/run.py
Settings and Troubleshooting
When using OpenSfM, how to generate output in ply format, other than json file?
Browse to open bin/run_all in the location where OpenSfM is installed. Add one line to the end of the file:
$DIR/opensfm export_ply $1
After modification, the file run_all should look like this:
#!/usr/bin/env bash set -e DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) $DIR/opensfm extract_metadata $1 $DIR/opensfm detect_features $1 $DIR/opensfm match_features $1 $DIR/opensfm create_tracks $1 $DIR/opensfm reconstruct $1 $DIR/opensfm mesh $1 $DIR/opensfm export_ply $1
When installing OpenDroneMap, how to solve the errors?
1. Double check that all required packages are installed and updated.
2. Check for linking error when multiple versions are installed.
For example:
error:
unfinished exiting during building odm_texturing. undefined reference to `cv::imread(cv::String const&, int)
solution:
Add
opencv_imgcodecs
in the makefile:
set(OpenCV_LIBS opencv_core opencv_imgproc opencv_highgui opencv_imgcodecs) Make the same changes for odm_georef, odm_orthophoto reference: https://github.com/BVLC/caffe/issues/1276
another possible solution:
Check and modify the library path. View an example on github.
When using OpenDroneMap, how to solve the ccd errors?
Reason:
your camera is not in the database, https://github.com/OpenDroneMap/OpenDroneMap/blob/gh-pages/ccd_defs.json
Solution:
OpenDroneMap needs to know CCD size in the camera. Get these information from websites like dpreview.
For example, for a Sony Cyber-shot DSC-HX5 from dpreview: http://www.dpreview.com/products/sony/compacts/sony_dschx5/specifications
So, we'll add the following line to our ccd_defs.json:
"SONY DSC-HX5V": 6.104,
Similarly, we look for the CCD information for our Samsung Galaxy camera, and add:
"SAMSUNG EK-GC200": 6.17,
To check that ccd_defs.json compiles, run ccd_defs_check.py If it prints the message 'CCD_DEFS compiles OK', then you can commit your changes.
Another possible solution:
Modify run time parameters.
For example, add --force-ccd and --force-focal parameters.
../../OpenDroneMap/run.py --force-ccd 6.17 --force-focal 4.1
Reference: https://github.com/OpenDroneMap/OpenDroneMap/wiki/3.-Run-Time-Parameters
Why does OpenDroneMap work correctly for some dataset, yet crash other times?
Before reading the following solutions, make sure your OpenDroneMap has successfully accomplished at least once.
Possible solution 1:
The program quits due to momery allocation issues.
In run.py, make the following changes:
--no-notice --halt-on-error 1 -j1Possible solution 2:
Your image width is smaller than 2400. Since OpenDroneMap automatically resize large images to size 2400, it runs into issues when original images are smaller.
Modify run time parameters:
../../vsfm/OpenDroneMap/run.py --force-ccd 6.17 --resize-to 2304
where 2304 is your original image width.
Performance Comparison
OpenDroneMap vs CMPMVS:
CMPMVS |
OpenDroneMap |
|
---|---|---|
OS |
Windows only |
Linux, Windows(possible) |
License |
Research Only |
Free open source |
Time |
Slow |
Fast |
GPS |
No |
Possible |
GUI |
No |
No |
I/O |
Requires VisualSFM output |
One script from start to end |
OpenDroneMap use Poisson Surface Reconstruction to generate the solid model. The poisson algorithm is a quick yet less accurate approach. The textured mesh reconstruction results from CMPMVS, MVE and OpenDroneMap are shown below: