PTOptimizer not working with Hugin generated script - "Syntax error in script: Line 8. Could not assign variable"

39 views
Skip to first unread message

Finfa811

unread,
Jul 4, 2016, 5:24:25 AM7/4/16
to hugin and other free panoramic software
Hello,


I am using a standalone executable of PTOptimizer that I downloaded from: https://www.ptgui.com/panotools.html. with a script generated with Hugin (2015.0.0 built). My script is:


# PTOptimizer script, written by hugin

p f2 w3000 h503 v340  n"TIFF_m c:LZW r:CROP"
m g1 i0 f0 m2 p0.00784314

# image lines
#-hugin  cropFactor=8.79121
i w4608 h3456 f0 v71.5915226899358 r0 p0 y-134.23410504363 TrX0 TrY0 TrZ0 Tpy0 Tpp0 a0 b0 c0 d0 e0 g0 t0  n"1.jpg"
#-hugin  cropFactor=8.79120826721191
i w4608 h3456 f0 v=0 r0 p0 y-80.5404630261777 TrX0 TrY0 TrZ0 Tpy0 Tpp0 a=0 b=0 c=0 d=0 e=0 g=0 t=0  n"2.jpg"
#-hugin  cropFactor=8.79120826721191
i w4608 h3456 f0 v=0 r0 p0 y-26.8468210087259 TrX0 TrY0 TrZ0 Tpy0 Tpp0 a=0 b=0 c=0 d=0 e=0 g=0 t=0  n"3.jpg"
#-hugin  cropFactor=8.79120826721191
i w4608 h3456 f0 v=0 r0 p0 y26.8468210087259 TrX0 TrY0 TrZ0 Tpy0 Tpp0 a=0 b=0 c=0 d=0 e=0 g=0 t=0  n"4.jpg"
#-hugin  cropFactor=8.79120826721191
i w4608 h3456 f0 v=0 r0 p0 y80.5404630261777 TrX0 TrY0 TrZ0 Tpy0 Tpp0 a=0 b=0 c=0 d=0 e=0 g=0 t=0  n"5.jpg"
#-hugin  cropFactor=8.79120826721191
i w4608 h3456 f0 v=0 r0 p0 y134.23410504363 TrX0 TrY0 TrZ0 Tpy0 Tpp0 a=0 b=0 c=0 d=0 e=0 g=0 t=0  n"6.jpg"


# specify variables that should be optimized
...

# control points
...


The program is crashing with the following output message: "Syntax error in script: Line 8. Could not assign variable".
Why is this so? Is it something related with PTOptimizer/Hugin version so it is not able to read "i" lines?

Thank you for your help.

Terry Duell

unread,
Jul 4, 2016, 5:48:17 AM7/4/16
to hugi...@googlegroups.com
On Mon, 04 Jul 2016 19:24:25 +1000, Finfa811 <esteban....@gmail.com>
wrote:

> Hello,
>
>
> I am using a standalone executable of PTOptimizer that I downloaded from:
> https://www.ptgui.com/panotools.html. with a script generated with Hugin
> (2015.0.0 built). My script is:
>

>
> The program is crashing with the following output message: "Syntax error
> in script: Line 8. Could not assign variable".
> Why is this so? Is it something related with PTOptimizer/Hugin version so
> it is not able to read "i" lines?
>

Using the part of the script included in your post, and using dummy image
files, it opened OK in Hugin-2016.3.0 without any errors.
What version of Hugin are you using, and which OS?

Cheers,
--
Regards,
Terry Duell

Finfa811

unread,
Jul 4, 2016, 6:32:21 AM7/4/16
to hugin and other free panoramic software
Hi, thanks for your reply.


I'm using Hugin 2015.0.0 in Windows to select control points and generating the script. If I optimize it in Hugin it's working, in PTOptimizer is crashing. I would like to make it work in PTOptimizer since I need to run the standalone .exe as a console application:

ptoptimizer <name of script file>


Cheers.

T. Modes

unread,
Jul 4, 2016, 12:27:32 PM7/4/16
to hugin and other free panoramic software
The version of the used ptoptimizer is probably too low.
You need at least PTOptimizer/libpano13 version 2.9.19 for the current pto files written by current Hugin version.
Or alternatively you can also use "autooptimiser".
Reply all
Reply to author
Forward
0 new messages