Actually it more or less is doable like that, so long as you want to
do simple stuff. The clunky script at the end of this page does
what you are asking (and the page was created by the script itself):
http://bugbear.postle.net/~bruno/misc/2007-06-23-goodwood-panorama/
Basically it runs match-n-shift using (my) known lens parameters,
then autooptimiser produces a straightened and centred .pto project.
After that it isn't as good as it could be, there is a tool in
Panotools::Script called pto2tiff that I use here to render and
blend the project file - But this doesn't use the recent hugin
Makefile stitching system, because there currently isn't a
command-line tool to create the .mk Makefiles from a .pto project.
So you can automatically stitch and blend a panorama so long as you
don't want enfuse or HDR.
The rest of the script just creates QTVR and 'little planet' views,
you probably don't need that. So an all-purpose script that
stitches normal non-fisheye photos would look something like this
(completely untested as usual):
#!/usr/bin/perl
use strict;
use warnings;
my $projection = 0;
my $fieldofview = 50;
my $a = $ARGV[0];
my $b = $ARGV[-1];
$a =~ s/\.[[:alnum:]]+$//;
$b =~ s/\.[[:alnum:]]+$//;
$b =~ s/.*[\/\\]//;
my $stub = "$a-$b";
system ('match-n-shift', '-c', '-o', "$stub.oto", '-f', $projection, '-v', $fieldofview, @ARGV);
system ('autooptimiser', '-a', '-l', '-s', '-o', "$stub.pto", "$stub.oto");
system ('pto2tiff', "$stub.pto");
..you'll need to do some fiddling to get vig_optimize and exiftool
in there.
--
Bruno
Try ImageMagick. There is a command line tool called mogrify, use the
-trim option.
See http://www.imagemagick.org/script/mogrify.php for more details.
James