|
@@ -2,6 +2,7 @@
|
|
|
from __future__ import unicode_literals, division, print_function, absolute_import
|
|
|
|
|
|
import os
|
|
|
+import shutil
|
|
|
import subprocess
|
|
|
import tempfile
|
|
|
|
|
@@ -50,13 +51,13 @@ def autocrop(input_pto, output_pto):
|
|
|
|
|
|
@shared_task
|
|
|
def generate_pano(input_pto, dirname, output_image):
|
|
|
- project_name = output_image[output_image.rfind(".tif")]
|
|
|
- output_name = os.path.join(dirname, project_name)
|
|
|
+ project_name = os.path.join(dirname, "pano")
|
|
|
# hugin_executor is only available since hugin 2015.0
|
|
|
- # return subprocess.call(["hugin_executor", "--prefix", output_name, input_pto])
|
|
|
+ # return subprocess.call(["hugin_executor", "--prefix", project_name, input_pto])
|
|
|
makefile_name = os.path.join(dirname, "celery_pano.mk")
|
|
|
subprocess.call(["pto2mk", "-o", makefile_name, "-p", project_name, input_pto])
|
|
|
- return subprocess.call(["make", "-f", makefile_name])
|
|
|
+ subprocess.call(["make", "-f", makefile_name])
|
|
|
+ shutil.move(project_name + ".tif", output_image)
|
|
|
|
|
|
@shared_task
|
|
|
def panorama_pipeline(images, output_image):
|