colmap / glomap

GLOMAP - Global Structured-from-Motion Revisited
BSD 3-Clause "New" or "Revised" License
1.3k stars 76 forks source link

Parallelizing track retriangulation #79

Closed theartful closed 2 weeks ago

theartful commented 2 weeks ago

Is there any technical reason preventing this section of the code from being parallelized? The retriangulation / bundle adjustment loop takes a lot of time in my tests. Specifically the retriangulation section.

https://github.com/colmap/glomap/blob/4210f9392567c4f38dfd1300db0126b69606fc0e/glomap/controllers/track_retriangulation.cc#L62-L70

ahojnnes commented 2 weeks ago

Yes, the current implementation of the underlying data structures of the reconstruction are not thread safe. Triangulating the observations in one image may affect the observations in other images.

theartful commented 2 weeks ago

I see, thank you for your responses. I try running glomap on videos, and on some of these videos the retrinagulation steps takes more than 75% of the time. Do you think it's worthwhile for me to look into it, or is there something fundamental preventing it.