In hope this is of use to someone.
Apart from running hugin to create the panorama, there is quite a lot
of work managing the files. Here is what I do. Some of it I hope can
some day be done semi-automatically by hugin or some photo
manipulation programme.
I usually take several overlapping pictures using a wide angle setting
(~36mm) of the camera. All pictures are copied from the camera to a
directory (this is a LINUX computer) named after the month (e.g.
200810) and the files are renamed using jhead:
alias jname='jhead -nf"%G%m%d-%H%M%S"'
I manually select the pictures and place a copy of them in a
subdirectory (e.g. 200810/scene1). The original images are not
touched.
I run manually (add_lens.pl script is a posting earlier today). This
givem me freedom to change parameters:
$ autopano-c-complete.sh -o a.pto [other options] 2008*.jpg
$ add_lens.pl a.pto > a_mod.pto
$ hugin a_mod.pto
The output is always in TIFF format and named a.tiff or a_fused.tif.
I open the output file in gimp and finalize the picture and save using
the same name.
Then I run the following script that cleans up and moves a JPG format
copy to the work directory (e.g. 200810/work).
(This script is a work in progress and far from general enough, but
it works for me.)
-Heikki
-------- mv_panorama.pl --------------------------------
#!/usr/bin/perl -l
use strict;
use Carp;
=pod
This sript assumes the following workflow:
1) pictures follow a naming convention: 20081009-121345.jpg
2) the work directory is a subdirectory to the original image
directory. Images worked on are copies of the pictures one above.
3) The hugin project file and output are consistently named 'a': a.pto
and a.tif/a_fused.tif.
4. If a.pto file contents are modified, the new copy is called
a_mod.pto
5. Program jhead is available
6. Imagemagic program 'convert' is available
=cut
my $PIC = '200[\d-]{12}[a-d]?.jpg';
# rename a_fused to a.tif
if ( -e 'a_fused.tif' ) {
print "\trenaming a_fused.tif to a.tif";
`mv a_fused.tif a.tif`;
}
# check for existance of a.jpg
unless ( -e 'a.jpg' ) {
croak "no such file, a.tif" unless -e 'a.tif';
print "\tconverting a.tif to a.jpg";
croak "No convert program!" unless `which convert`;
`convert a.tif a.jpg`;
}
print "\tmodifying a.jpg";
# find the first pic file
my @f = `ls`;
chomp(@f);
my $fname = $f[0];
# copy EXIF header
croak "the first file [$fname] is probably not "
. "the file you want to copy EXIF header from"
unless $fname =~ /$PIC/;
# die unless jhead is on path
croak "No jhead program!" unless `which jhead`;
`jhead -te $fname a.jpg`;
# move a.jpg
print "\tmoving a.jpg to a ../work dir as $fname";
`mkdir '../work'` unless -e '../work';
print "\tfile [$fname] exists. Overwriting" if -e '../work/$fname';
`mv a.jpg ../work/$fname`;
# remove all original files from this directory
print "\tdeleting original files; modify a.pto to point to parent dir";
# create a log of file names just in case something goes wrong
open ORI, '>>', 'imagefiles.dat';
foreach (@f) {
if (/$PIC$/) {
print ORI "../$_";
print "\t\tdeleting $_";
unlink $_;
}
}
close ORI;
# remove all temp files
print "\tdeleting temp files";
foreach (@f) {
next unless -e $_;
if ( /a00\d*.tif$/ or /a_\w+_\d+.tif$/ or /.*\.key\.gz$/ ) {
print "\t\tdeleting $_";
unlink $_;
}
}
# modify a.pto
if ( -e 'a_mod.pto' ) {
print "\trenaming a_mod.pto a.pto";
`mv a.pto a.pto.ori1; mv a_mod.pto a.pto`;
}
if ( -e 'a.pto' ) {
open PTO, '<', 'a.pto';
open OUT, '>', 'a_mod2.pto';
while (<PTO>) {
s/n"200/n"..\/200/;
print OUT;
}
close PTO;
close OUT;
print "\tmodifying a.pto";
`mv a.pto a.pto.ori`;
`mv a_mod2.pto a.pto`;
}
# compress a.tif
if ( -e 'a.tif' ) {
print "\tcompressing a.tif";
`gzip a.tif`;
}
----------------------------------------
--
-Heikki
Heikki Lehvaslaiho - heikki lehvaslaiho gmail com
http://kapkaupunki.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"hugin and other free panoramic software" group.
A list of frequently asked questions is available at:
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~----------~----~----~----~------~----~------~--~---