The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Panotools::Script - Panorama Tools scripting

SYNOPSIS

Read, write and manipulate hugin script files.

DESCRIPTION

Library and utilities for manipulating project files created by the hugin photo stitching software.

This file format is shared with various other tools, in particular this module is also capable of working with Panorama Tools script files.

USAGE

  my $p = new Panotools::Script;
  $p->Read ('/path/to/script.txt');
  $p->Write ('/path/to/script.txt');

File paths in a Panorama Tools script file are generally relative to the directory containing the script. Modify this or otherwise prefix the filenames by supplying an optional second argument:

  $p->Write ('/path/to/script.txt', '../path/to/prefix/tofiles');

Clone a script object

 $clone = $p->Clone;

Access various sections of the scriptfile:

 $p->Mode;          # a L<Panotools::Script::Line::Mode> object
 $p->Panorama;      # a L<Panotools::Script::Line::Panorama> object
 $p->Variable;      # a L<Panotools::Script::Line::Variable> object
 $p->Image;         # an array of L<Panotools::Script::Line::Image> objects
 $p->Output;        # an array of L<Panotools::Script::Line::Output> objects
 $p->Control;       # an array of L<Panotools::Script::Line::Control> objects
 $p->ControlMorph;  # an array of L<Panotools::Script::Line::ControlMorph> objects

Rotate transform all the images in a project, angles in degrees:

  $p->Transform ($roll, $pitch, $yaw);

'o' output lines are generated by PTOptimizer and contain stitching parameters for each input image. 'i' image lines provide parameters for optimisation as well as stitching.

Update the 'image' lines based on 'output' lines and vice-versa like so:

  $p->Output2Image;
  $p->Image2Output;

Remove duplicate control points from the project, returns a list of deleted points:

  my $deleted = $p->Duplicates;

Extract a new object consisting of just the requested images, related control points and optimisation settings:

  my $subset = $p->Subset (1, 2, 34, 56);

Images can be requested in any order, but they will be returned in the same order as the 'parent' project.

Merge a project with another:

  $p->Merge ($newstuff);

This adds extra images from $newstuff, skipping duplicates. All control points except exact duplicates are imported regardless.

COPYRIGHT

Copyright (c) 2001 Bruno Postle <bruno@postle.net>. All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this software; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA