Skip to content

Commit 91dada7

Browse files
committed
hugin_executor support
Hugin 2015.0.0 hugin provides a command line tool to start the assistant
1 parent cc7ba37 commit 91dada7

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

contrib/hugin.lua

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ local function create_panorama(storage, image_table, extra_data) --finalize
6464
return
6565
end
6666

67+
-- Since Hugin 2015.0.0 hugin provides a command line tool to start the assistant
68+
-- http://wiki.panotools.org/Hugin_executor
69+
-- We need pto_gen to create pto file for hugin_executor
70+
-- http://hugin.sourceforge.net/docs/manual/Pto_gen.html
71+
72+
local hugin_executor = false
73+
if (checkIfBinExists("hugin_executor") and checkIfBinExists("pto_gen")) then
74+
hugin_executor = true
75+
end
76+
6777
-- list of exported images
6878
local img_list
6979

@@ -76,7 +86,14 @@ local function create_panorama(storage, image_table, extra_data) --finalize
7686

7787
dt.print("Will try to stitch now")
7888

79-
if coroutine.yield("RUN_COMMAND","hugin "..img_list)
89+
local huginStartCommand
90+
if (hugin_executor) then
91+
huginStartCommand = "pto_gen "..img_list.." -o project.pto | hugin_executor --assistant project.pto"
92+
else
93+
huginStartCommand = "hugin "..img_list
94+
end
95+
96+
if coroutine.yield("RUN_COMMAND", huginStartCommand)
8097
then
8198
dt.print("Command hugin failed ...")
8299
end

0 commit comments

Comments
 (0)