Difference between revisions of "Pto var"

From PanoTools.org Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
'''Pto_var''' can manipulate image variables in [[Hugin]] .pto project files. This is intended for use in [[Panorama scripting in a nutshell|Scripting]]. It can set image variables to a given value, it change the link status and mark variables for [[optimization|optimisation]]
+
'''Pto_var''' can manipulate image variables in [[Hugin]] .pto project files. The intended use of Pto_var is in [[Panorama scripting in a nutshell|Scripting]]. Pto_var can set image variables to a given value, it can change the link status and it can mark variables for [[optimization|optimisation]].
  
The general use is
+
The general use is:
 
     pto_var [switches] --output=output.pto --opt|--link|--unlink|--set images input.pto
 
     pto_var [switches] --output=output.pto --opt|--link|--unlink|--set images input.pto
  
 
== Optimisation variables ==
 
== Optimisation variables ==
  
'''Pto_var''' can mark image variables for [[optimization|optimisation]]. (This information is stored in the v lines in the pto file.) This information is then be used by [[autooptimiser]] and [[vig_optimize]] to do the actual optimisation.
+
'''Pto_var''' can mark image variables for [[optimization|optimisation]]. (This information is stored in the v lines in the pto file.) This information is used by [[autooptimiser]] and [[vig_optimize]] to do the actual optimisation.
  
Running without other switches this will only mark the variables given on the command line for optimisation. If you want to modify the marked variables add '''--modify-opt''' to the command line.
+
Running without other switches will only mark the variables given on the command line for optimisation. If you want to modify the marked variables add '''--modify-opt''' to the command line.
  
The usage is
+
The usage is:
 
   pto_var --opt "image variables list" input.pto
 
   pto_var --opt "image variables list" input.pto
  
Line 21: Line 21:
 
* photometric parameters: EeV, Er, Eb, Vb, Vc, Vd, Vx, Vy, Ra, Rb, Rc, Rd, Re (Vignetting and response parameter will treated as group.)
 
* photometric parameters: EeV, Er, Eb, Vb, Vc, Vd, Vx, Vy, Ra, Rb, Rc, Rd, Re (Vignetting and response parameter will treated as group.)
  
The image numbers start with zero. If the number is missing this applies to the variables of all images. (In this case a special treatment applies to the position of the anchor image.)
+
The image numbers start with zero. If no number is given, the variables will be applied to all images. (In this case a special treatment applies to the position of the anchor image.)
  
 
An exclamation mark before the variable will remove the variable from the list of variables to optimised.
 
An exclamation mark before the variable will remove the variable from the list of variables to optimised.
Line 43: Line 43:
 
== Set image variables ==
 
== Set image variables ==
  
With this switch you can set the image variable to the given value. This applies to all the image variable of that sort or only to a single image, when given the image number.
+
With this switch you can set the image variable to the given value. This applies to all the image variables of that sort or only to a single image, when the image number is given.
  
 
Examples:
 
Examples:

Revision as of 10:10, 2 February 2013

Pto_var can manipulate image variables in Hugin .pto project files. The intended use of Pto_var is in Scripting. Pto_var can set image variables to a given value, it can change the link status and it can mark variables for optimisation.

The general use is:

   pto_var [switches] --output=output.pto --opt|--link|--unlink|--set images input.pto

Optimisation variables

Pto_var can mark image variables for optimisation. (This information is stored in the v lines in the pto file.) This information is used by autooptimiser and vig_optimize to do the actual optimisation.

Running without other switches will only mark the variables given on the command line for optimisation. If you want to modify the marked variables add --modify-opt to the command line.

The usage is:

  pto_var --opt "image variables list" input.pto

The image variable list consist of a comma separated list of image variables:

   [!]name[image number]

The following image variables are allowed:

  • position: y, p, r, TrX, TrY, TrZ
  • lens parameters: v, a, b, c, d, e, g, t
  • photometric parameters: EeV, Er, Eb, Vb, Vc, Vd, Vx, Vy, Ra, Rb, Rc, Rd, Re (Vignetting and response parameter will treated as group.)

The image numbers start with zero. If no number is given, the variables will be applied to all images. (In this case a special treatment applies to the position of the anchor image.)

An exclamation mark before the variable will remove the variable from the list of variables to optimised.

Examples:

  • --opt y,p,r will optimize position for all images.
  • --opt v,!v0 will optimize field of view for all images except the first.
  • --opt Vb1,Ra1 will optimize vignetting and response curve for the second image.
  • --modify-opt --opt !v will not optimize field of view.

Link or unlink image variables

To modify the link status of an image variable use --link or -unlink. Supply a list of comma separated image variables with corresponding image number.

Examples:

  • --link v3 will link field of view of image 3.
  • --link a1,b1,c1 will link lens distortion for second image.
  • --unlink v0 will unlink field of view for the first image.
  • --unlink Vb3,Ra3 will unlink vignetting and response curve for image 3.

Set image variables

With this switch you can set the image variable to the given value. This applies to all the image variables of that sort or only to a single image, when the image number is given.

Examples:

  • --set y=0,p=0,r=0 will reset all image positions.
  • --set a1=0,b1=-0.05,c1=0 will set the lens distortion parameters for the second image.

The switch supports also incremental changes.

  • --set y1+=10 will increase yaw of the second image by 10 degrees.
  • --set r2-=90 will decrease the roll angle of third image by 90 degrees.
  • --set v*=1.1 will increase field of view for all images by 10 %.
  • --set Er/=1.1,Eb/=1.2 will divide the red multiplier by 1.1, and the blue multiplier by 1.2 respective for all images.

General options

  • -o|--output output.pto Output a pto file with the given filename. If not given it will append "_var" to the input filename.
  • -h | --help Display help.