can't use Smartblend instead of Enblend in Hugin 2013

Asked by Richard Rutz

I used Smartblend with Hugin 2011 instead of Enblend because it gave better results in some cases.
Smartblend can't be used in Hugin directly because it doesn't understand some of the parameters. So, there has been a "wrapper", a .bat file, that was used to circumvent the problems. I was able to get this to work with Hugin 2011.4.

However, for me the wrapper does not work with Hugin 2013. I can get Smartblend to be launched and used instead of Enblend, but the operation ceases and dumps out a .pto.mk file instead of the stitched product. I've not been able to modify the wrapper to make Smartblend fully work with Hugin 2013.

The log of one such effort gave the following:
"C:/Program Files/Hugin/smartblend-hugin.bat" --compression=LZW -f4279x1935+1457+179 -o "IMG_6809 - IMG_6810.tif" -- "IMG_6809 - IMG_68100000.tif" "IMG_6809 - IMG_68100001.tif"
- was unexpected at this time.
make: *** [IMG_6809 - IMG_6810.tif] Error 255

My question is, Can someone review the wrapper and fix it so that Smartblend will work again?
Alternatively,
If one has already been prepared, can it be posted at SourceForge / Launchpad?
Or, if you think that Enblend has now matched or surpassed Smartblend's abilities, and so the effort would be wasted, could someone post something to the effect that in their knowledge and experience the virtues and capabilities of Smartblend are now met by Enblend?
Or, perhaps the Hugin code could be modified to branch and accommodate Smartblend (i.e., incorporate the wrapper's methodology into Hugin). This would be more difficult, but a more permanent fix.

Thank you.

Question information

Language:
English Edit question
Status:
Open
For:
Hugin Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Nick Cool (coca-cola1) said :
#2

Hi,
after a long night a friend and I finally fixed it:

--------------------------------------
@echo on & setlocal
rem set SMARTBLEND=%~dp0\smartblend.exe
set SMARTBLENDARGS=
set SMARTBLEND=D:\Blender\smartblend_1_2_5\smartblend.exe

rem This is where we strip out arguments, which Smartblend does not understand.
rem Hugin automatically sets a few (-w, -o, --compression, -f), but out of
rem these, Smartblend can only handle -o and -w (the latter only partly).
rem See the readme.txt bundled with Smartblend for details.
echo %1 %2 %3 %4 %5 %6 %7 %8 %9 %10
:paramstrip
set arg=%~1
if not "%arg%"=="" (
 if "%arg%"=="--compression" (
  echo [smartblend-wrapper] Skipping compression argument and its parameter: %1 %2
  shift
 ) else if "%arg:~0,2%"=="-f" (
  echo [smartblend-wrapper] Skipping crop argument: %1
 ) else if "%arg:~0,2%"=="--" (
  echo [smartblend-wrapper] Skipping argument separator: %1
 ) else if "%arg:~0,2%"=="-o" (
  echo [smartblend-wrapper] Output file: %2
  set SMARTBLENDARGS=%SMARTBLENDARGS% -o %2
  shift
 ) else (
  rem Copy other arguments
  set SMARTBLENDARGS=%SMARTBLENDARGS% %1
 )
 shift
 goto :paramstrip
)

echo.
echo Executing "%SMARTBLEND%" %SMARTBLENDARGS%
echo.

"%SMARTBLEND%" %SMARTBLENDARGS%

endlocal

---------------------------------

I hope it'll be fixed inside hugin in the future! In the meantime above is the solutin! But: The path to smartblend is hardcoded! Pay attention to this, everyone HAS to change it to his needs...

Works here with hugin 2013 and smartblend 1.2.5 on Win 8.1 64bit.
smartblend.exe and the script are in the same folder.

regards,
Stefan

Revision history for this message
Richard Rutz (richardr1066) said :
#3

Thanks, Nick. I revised my script based on your information, and have gotten it to work with Hugin 2013. Great!

Richard

----- Original Message -----

From: "Nick Cool" <email address hidden>
To: <email address hidden>
Sent: Sunday, January 4, 2015 2:01:37 PM
Subject: Re: [Question #255589]: can't use Smartblend instead of Enblend in Hugin 2013

Your question #255589 on Hugin changed:
https://answers.launchpad.net/hugin/+question/255589

Nick Cool posted a new comment:
Hi,
after a long night a friend and I finally fixed it:

--------------------------------------
@echo on & setlocal
rem set SMARTBLEND=%~dp0\smartblend.exe
set SMARTBLENDARGS=
set SMARTBLEND=D:\Blender\smartblend_1_2_5\smartblend.exe

rem This is where we strip out arguments, which Smartblend does not understand.
rem Hugin automatically sets a few (-w, -o, --compression, -f), but out of
rem these, Smartblend can only handle -o and -w (the latter only partly).
rem See the readme.txt bundled with Smartblend for details.
echo %1 %2 %3 %4 %5 %6 %7 %8 %9 %10
:paramstrip
set arg=%~1
if not "%arg%"=="" (
if "%arg%"=="--compression" (
echo [smartblend-wrapper] Skipping compression argument and its parameter: %1 %2
shift
) else if "%arg:~0,2%"=="-f" (
echo [smartblend-wrapper] Skipping crop argument: %1
) else if "%arg:~0,2%"=="--" (
echo [smartblend-wrapper] Skipping argument separator: %1
) else if "%arg:~0,2%"=="-o" (
echo [smartblend-wrapper] Output file: %2
set SMARTBLENDARGS=%SMARTBLENDARGS% -o %2
shift
) else (
rem Copy other arguments
set SMARTBLENDARGS=%SMARTBLENDARGS% %1
)
shift
goto :paramstrip
)

echo.
echo Executing "%SMARTBLEND%" %SMARTBLENDARGS%
echo.

"%SMARTBLEND%" %SMARTBLENDARGS%

endlocal

---------------------------------

I hope it'll be fixed inside hugin in the future! In the meantime above
is the solutin! But: The path to smartblend is hardcoded! Pay attention
to this, everyone HAS to change it to his needs...

Works here with hugin 2013 and smartblend 1.2.5 on Win 8.1 64bit.
smartblend.exe and the script are in the same folder.

regards,
Stefan

--
You received this question notification because you asked the question.

Can you help with this problem?

Provide an answer of your own, or ask Richard Rutz for more information if necessary.

To post a message you must log in.