OpenMP for align_image_stack
Bug #1266059 reported by
Daniel Kaneider
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Hugin |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
Hi,
I'm not sure if this is the right place for features requests, as this is one:
align_image_stack is very slow. On my system with 4 cpus (2 logical HT) I rarely have more than 30% of cpu usage. This means that alignment currently takes minutes with 3-5 bigger images (< 20MP). OpenMP is one of the easier possibilities to make the whole process faster. Please evaluate how/whether this could help. I observed that hugin, or parts of it, are already using OpenMP, since the specific dll is shipped on windows.
Changed in hugin: | |
milestone: | none → 2015.0beta1 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Hugin is not using OpenMP (it is only used by enblend/enfuse). Hugin is using boost::threads, zthreads and on Windows also the Parallel Patterns Library (PPL) in different code parts for multi-threading.
Align_image_stacks consists of 3 parts:
1.) Control points finding/fine tuning: This part can't be so easy made multi-threaded, because each iteration is using some variables from the previous iteration. This requires some more deeper changes to the code than a simple OpenMP pragma.
2.) Optimisation: this takes the shortest time (and is using libpano13) - this will remain single-threaded.
3.) Remapping: This part was only using one thread. I committed changes to use all available cores (or you can fine-tune the number of threads with --threads=NUM). The changeset contains also code to alternatively use the GPU for remapping (add switch --gpu, the GPU remapping code is still marked as experimental, but it works fine in my test). On my machine the new default setting with 4 cores is faster than the older version, the GPU version is even faster.