Archive for the ‘photogrammetry’ category

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

PhotoSynthToolkit 9

April 29th, 2012

This is a quick post to announce the new version of the PhotoSyntToolkit with 2 new features:

  • CMVS support finally integrated :-)
  • proper handling of folder with white space

How to use CMVS with PhotoSynthToolkit:

  1. As usual run step 1 and move pictures from “hd” to “distort” folder.
  2. You need to run first “Prepare for PMVS2″ then do NOT launch the generated bat file.
  3. You can run “Prepare for CMVS” and run the generated bat file.

Warning: I’ve fixed all my programs to handle folder with white space (thanks to boost::filesystem). Sadly PMVS2/CMVS don’t handle them. The fix is trivial but instead of recompiling a new version I’ve found a bad workaround. I’m creating a temporary virtual drive z: pointing to your synth folder during the execution of PMVS2/CMVS using SUBST. The downside are that if you already have a z: drive it won’t work and if you kill PMVS2/CMVS you’ll have to manually remove the z: drive. To remove the z: drive type “subst z: /d” in your console.

If you need XSI/3DS max integration you’ll have to use the old version: PhotoSynthToolkit7.zip otherwise PhotoSynthToolkit9.zip is the latest version.

Share

PhotoSynthToolkit 8

April 14th, 2012

I’ve finally decided to release the new version of my PhotoSynthToolkit. This new version has bundle.out output support: this was indeed easy to add as I’ve already implemented it in my WebGL chrome extension. I’ve also rewritten the network part of the downloader by using libcurl. PhotoSynthDownloader is now replaced by my new tool PhotoSynthGrabber. BTW thumbnail/HD pictures downloading should be really much faster ;-) .

New feature coming:

  • CMVS support (coming very soon)
  • White space handling in the toolkit scripting (PhotoSynthGrabber is already ready)
  • Expose HTTP Proxy parameters for the downloader

You can download the new version: PhotoSynthToolkit8.zip or keep the previous one in case you miss some advanced feature (vis.dat generation, SoftImage XSI / 3DS Max scripting for example): PhotoSynthToolkit7.zip.

Share