Pto var

From PanoTools.org Wiki
(Difference between revisions)
Jump to: navigation, search
m
(One intermediate revision by one user not shown)
Line 13: Line 13:
 
   pto_var --opt "image variables list" input.pto
 
   pto_var --opt "image variables list" input.pto
  
The image variable list consist of a colon separated list of image variables:  
+
The image variable list consist of a comma separated list of image variables:  
 
     [!]name[image number]
 
     [!]name[image number]
  
Line 33: Line 33:
 
== Link or unlink image variables ==
 
== Link or unlink image variables ==
  
To modify the link status of an image variable use '''--link''' or '''-unlink'''. Supply a list of colon separated image variables with corresponding image number.
+
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:
 
Examples:

Revision as of 23:48, 19 January 2013

Pto_var can manipulate image variables in Hugin .pto project files. This is intended for use in Scripting. It can set image variables to a given value, it change the link status and 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 then be 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.

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 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.)

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 variable of that sort or only to a single image, when given the image number.

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.
Personal tools
Namespaces

Variants
Actions
Navigation
tools
Tools