open-anatomy / SfM_gui_for_openMVG

SfM workflow GUI for the open Multiple View Geometry library. Including openMVG sources.
Other
35 stars 7 forks source link

Question: Is there a way to set the numThreads of openMVG_main_ComputeFeatures #7

Open Maaajaaa opened 8 years ago

Maaajaaa commented 8 years ago

Just figured out that the image listing & feature computing should be a lot faster when the numThreads was set to a higher value (depending on the CPU-cores). Is there a way to achieve that?

mad-de commented 8 years ago

this setting is restricted to be used with openmp (OPENMVG_USE_OPENMP) as far as I am aware. So using this option without openmp enabled will break the command. As main_compute_features should work in reasonable amount of time in most cases,, I failed to see the advantages of adding a point of failure.

The gui however already has a module which checks for the amount of cpu-cores, so if that really does make a difference and you feel like looking into that, you can use get_num_of_CPUs() to call a function which will return the number of cpus that can be called as a QString, which you could easily transmit as a command to the openMVG_main_ComputeFeatures module in the workflow.py. Should be quite easy to integrate, but the openmp part is what causes me headaches. If you have a good idea about that, feel free to do a PR.