I’ve compiled a new version of Bundler with 2 interesting new options:
BTW those options should be passed as command arguments to bundler.exe directly (and not been added to the options.txt file).
The parallel_epipolar option allows to estimate the fundamental matrices (ransac + lm) in parallel. This problem is embarrassingly parallel but due to some global variables used in the callback passed to lmfit it wasn’t that easy to implement: I’ve used a functor to hide the global variables used by the callback but sadly lmfit doesn’t have a void* userData parameter (only a pointer to the callback). Thus I’ve modified lmfit and add this missing parameter that allow me to pass a pointer to my functor. Furthermore I had to compile almost everything in C++ instead of C to use my functor inside lmfit. Thus I had to fix a lot of malloc calls that weren’t compiling in C++ due to missing cast. To keep a “backward behavior compatibility” this option is disabled by default.
The ba option allows to change the bundle adjustment “engine” used. Here is the list of available “engine”:
- sba (default)
- none (for debug only)
Pba stand for Parallel Bundle Adjustment: I’ve integrated mcba from Changchang Wu.
So if you have an Nvidia GPU card and installed the Cuda runtime you can add those options:
bundler.exe list_focal_absolute.txt --ba pba_gpu_float --parallel_epipolar
--options_file options.txt //on the same line
Timing on a 245 pictures dataset:
||Nb pictures registered
|PBA CPU double
|PBA CPU float
|PBA GPU float
|none (for debug)
||189 (bad reconstruction)
You can download this new version of bundler: bundler-multiBA-parallelEpipolar-x64.zip