Great script, using it nearly daily.
But you should change
my $cmd = "convert $in -sigmoidal-contrast 5x$i\% $o";
to
my $cmd = "convert $in -format tif -compress none -sigmoidal-contrast
5x$i\% $o";
or
my $cmd = "convert $in -format tif -compress lzw -sigmoidal-contrast
5x$i\% $o";
since jpeg-compressed TIFFs will be recompressed and lose quality. The same
is valid if $in is a jpeg file itself.
Cheers
M. Bullinger
On Tuesday, December 11, 2012 5:06:06 PM UTC+1, bugbear wrote:
>
> JohnPW wrote:
> > Why not faux-bracket the source images first, then stack and enfuse them
> before stitching?
> > This is similar to making bracketed images from RAW files (eliminates
> alignment/movement difficulties common to conventional bracketing.)
> > I have to admit, most of my panos are from jpegs shot with cheap point
> and shoots that don't do RAW (and using TIFF is too onerous.)
>
> I just threw (almost literally) a perl
> script together to do this, and the results are impressive.
>
> BugBear (script appended)
>
> Here it is:
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> sub mk {
> my ($in) = @_;
> my $list;
> for(my $i = 0; $i <= 100; $i += 20) {
> my $o = sprintf("c%03d.tif", $i);
> my $cmd = "convert $in -sigmoidal-contrast 5x$i\% $o";
> `$cmd`;
> $list .= " $o";
> }
> return $list;
> }
>
> sub enf {
> my ($out, $list) = @_;
> my $cmd = "enfuse --output=$out $list";
> `$cmd`;
> }
>
> unless(scalar(@ARGV) == 2) { die "in, out" };
>
> my $in = $ARGV[0];
> my $out = $ARGV[1];
> my $list = mk($in);
> enf($out, $list);
>
--
A list of frequently asked questions is available at:
http://wiki.panotools.org/Hugin_FAQ
---
You received this message because you are subscribed to the Google Groups
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/hugin-ptx/a1f5ee5a-0b87-40d6-b7b4-19f11251854c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.