Archive for May, 2012

New bundler version

May 26th, 2012

I’ve compiled a new version of Bundler with 2 interesting new options:

--parallel_epipolar
--ba sba

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_cpu_double
  • pba_cpu_float
  • pba_gpu_float

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:

Bundler BA Time Nb pictures registered
SBA 2h18min 233
PBA CPU double 23min 230
PBA CPU float 9min 230
PBA GPU float 6min 230
none (for debug) 2min 189 (bad reconstruction)

You can download this new version of bundler: bundler-multiBA-parallelEpipolar-x64.zip
Update: the source code is available on the MCBA branch of my Bundler fork.

Share

PhotoSynthToolkit 11

May 23rd, 2012

I’ve for some reason extra time to kill so I’ve updated PhotoSynthToolkit (SFMToolkit will follow soon). I’ve been only focusing on PMVS2 for this release: I’ve integrated Nghiaho optimization, fixed white-space folder handling in PMVS2 using boost::filesystem and fixed the timing output in the console. Thus there is no need for the ugly temporary z drive anymore :-) .

Nghiaho optimizations are disabled by default as I’ve found that it generates a point cloud less dense. You can enable the optimization by adding:

--optimize

as last PMVS2.exe parameter in your command prompt or just activate the optimization by modifying the following files:

  • 3 – Prepare for PMVS2.wsf line 49 -> var USE_OPTIMIZED_PMVS = true;
  • 4 – Prepare for CMVS.wsf line 46 -> var USE_OPTIMIZED_PMVS = true;

You can download PhotoSynthToolkit11.zip.

Share

PhotoSynthToolkit 10

May 1st, 2012

What do you think of this concept: a new PhotoSynthToolkit version almost everyday? :-) .

This version introduce a new feature that will allow you to process a PhotoSynth without needing to wait for the end of the upload. In fact you can even cancel your synth as soon as the computation is complete. But be aware that all pictures uploaded in the meantime will stay on photosynth server (AFAIK).

How to proceed:
- wait for synth to be processed (but not fully uploaded).
- copy the 2 following files from %temp%\Photosynther to another folder (d:\my_synth for example)

  • collection.dzcz
  • collection.synth.bin

- then you can launch the step 1 of the PhotoSynthToolkit by providing your folder (d:\my_synth).
- you’ll need then to copy your original jpegs to the distort folder and you’re done!

You can download PhotoSynthToolkit10.zip.

Share