openMVG icon indicating copy to clipboard operation
openMVG copied to clipboard

[Multiview] Enhance L2 Rotation Averaging with Spectra library

Open rjanvier opened this issue 6 years ago • 2 comments

This PR integrate the Spectra library as a third party dependency into the build tree and take advantage of its features in the L2 RA solver. On some medium sized datasets, speed increase of L2RA is up to 10x. I haven't check for memory usage but it should be highly reduced because we use sparse matrices everywhere. This hopefully definitely close #937

EDIT: this PR is a WIP for testing it lacks:

  • [x] [Build] Install Spectra headers (within the other parts of the lib)

rjanvier avatar Nov 10 '19 21:11 rjanvier

Tested on my machine openMVG_test_rotation_averaging (Failed)

pmoulon avatar Nov 14 '19 18:11 pmoulon

The paramameters that control the convergence speed should be lowered. (see nvec parameter in the documentation https://spectralib.org/doc/classspectra_1_1symeigssolver). Initially I use a higher value (7) than the recommended one (2*3 = 6). It worked on my computer but it failed on travis (and on your computer). The recommended value should work on your computer but it still leeds to instabilities on travis (see this build https://travis-ci.org/rjanvier/openMVG/builds/612069353) so I lowered it (5) to make tests pass. I don't know if it's really rigorous...

rjanvier avatar Nov 15 '19 09:11 rjanvier