2

Having the required hardware available:

How do I enable the use of GPU and/or Multiprocessing in Hugin when creating stitched photographs?

Hannu
  • 8,740
  • 3
  • 21
  • 39

1 Answers1

2

Assumption: Hugin was compiled with OpenMP and/or GPU support,
which may be checked (from the Terminal) by:

$ enblend -v -V | grep -E 'Extra.*(MP|GPU|cache)'
Extra feature: image cache: yes
Extra feature: GPU acceleration: yes
Extra feature: OpenMP: no

(for GPU-only version)

and

$ enblend-mp -v -V | grep -E 'Extra.*(MP|GPU|cache)'
Extra feature: image cache: no
Extra feature: GPU acceleration: yes
Extra feature: OpenMP: yes

(for GPU and OpenMP [SMP] version)

If neither 'Extra feature' says 'yes' then that version will only run on a single CPU thread.

Hugin does not come with this enabled by default nor detect it automatically, at least not in version 2014.0.0.5da69bc383dd - as provided in the 'Software Center' on Ubuntu (14.04).

To enable: Open/Run Hugin, select Preferences in the File menu... Click /Programs\ in the dialog that opens.
Change the enblend executable to be enblend-mp, and the same with enfuse: enfuse-mp.

If you have the hardware you may also add --gpu (dash-dash+'gpu') to "Default arguments" for enblend (there is no such argument for enfuse). Which may be enabled also without ...-mp above.

You might wish to try [v] Use GPU for remapping (EXPERIMENTAL) - but as it is "EXPERIMENTAL" it might not work correctly, depending on the content of your project.

Note that OpenMP is mutually exclusive to the use of image cache (the executable above says 'Image cache: no', 'Image cache' cannot be used).

Hannu
  • 8,740
  • 3
  • 21
  • 39
  • i4770 @ 3.5GHz (4 core+HT) and NVidia GTX 780/3GB, simple test: Approximate tenfold speed increase with both MP and GPU active. – Hannu Jun 20 '15 at 14:45
  • Building an OpenMP+GPU enabled Hugin: http://wiki.panotools.org/Hugin_Compiling_Ubuntu – Hannu Jun 20 '15 at 14:49
  • I know this is an older question but do you know if there is a guide on how to get the enblend library for windows with gpu enabled? I can't seem to find any documentation on it :( . I'm guessing that building on linux doesn't make a compatible version with windows (if it does awesome, i'll get a VM going)? – user3797758 Dec 10 '16 at 19:55
  • No idea about windows versions, same with building open source on/for windows. Linux hosted builds might be possible but that is "crosscompiling" and requires thoughtful creation of the tools to begin with. Whether a guest Linux in a VM on Windows host would run Hugin efficiently; I have no idea, why not try it? – Hannu Dec 15 '16 at 18:24
  • I think i might just get a small SSD put linux on that and use it for large Hugin projects. Everything that is open source or complex to develop with lots of dependencies tends to work better on linux anyway... – user3797758 Dec 15 '16 at 19:12