Re: [hugin-ptx] Scaling a PTO file ..

2016-07-09 Thread Donald Johnston
Bruno, thanks for your feedback on this.

I’ve modified you ptodouble to create ptoscale (see below). Will this work? 
Feel free to do with this as you please.


> #!/usr/bin/perl
> use strict;
> use warnings;
> use Panotools::Script;
> use Getopt::Long;
> use Pod::Usage;
> 
> my $scale_pair;
> my $path_output;
> my $help = 0;
> 
> GetOptions (’s|scale=s’ => \$scale_pair,
> 'o|output=s' => \$path_output,
> 'h|help' => \$help);
> 
> pod2usage (-verbose => 2) if $help;
> 
> my $path_pto = shift || pod2usage;
> die "Can't find $path_pto" unless -e $path_pto;
> 
> my @Ratio = split ('/', $scale_pair);
> my $R = $Ratio[0] / $Ratio[1];
> 
> my $p = new Panotools::Script;
> $p->Read ($path_pto);
> 
> $p->Panorama->{w} *= $R;
> $p->Panorama->{h} *= $R;
> 
> for my $i (@{$p->Image})
> {
> $i->{w} *= $R;
> $i->{h} *= $R;
> $i->{d} *= $R if $i->{d} =~ /^[-0-9.]+$/;
> $i->{e} *= $R if $i->{e} =~ /^[-0-9.]+$/;
> $i->{Vx} *= $R if $i->{Vx} =~ /^[-0-9.]+$/;
> $i->{Vy} *= $R if $i->{Vy} =~ /^[-0-9.]+$/;
> 
> if (defined $i->{S})
> {
> my @S = split (',', $i->{S});
> @S = map {int ($_ * $R)} @S;
> $i->{S} = join ',', @S;
> }
> }
> 
> for my $c (@{$p->Control})
> {
> $c->{x} *= $R;
> $c->{y} *= $R;
> $c->{X} *= $R;
> $c->{Y} *= $R;
> }
> 
> for my $k (@{$p->Mask})
> {
> my $string = $k->{p};
> $string =~ s/"//g;
> my @p = split (' ', $string);
> @p = map {int ($_ * $R)} @p;
> $k->{p} = '"'. (join ' ', @p) .'"';
> }
> 
> $p->Write ($path_output);
> 
> exit 0;
> 
> __END__
> 
> =head1 NAME
> 
> ptoscale - rescale a panorama project
> 
> =head1 SYNOPSIS
> 
> ptoscale [options] --output scaled.pto project.pto
> 
>  Options:
>   -s | --scale  Scale ratio (in the format m/n; m = new long side, n = 
> old long side)
>   -o | --output Filename of scaled project (can be the the same as the 
> input)
>   -h | --help   Outputs help documentation
> 
> =head1 DESCRIPTION
> 
> B takes a hugin .pto project and scales all pixel dimensions by the 
> ratio given (--scale).
> You will need to rescale the photos to match:
> 
>   mogrify -geometry {m/n}% *.JPG
> 
> Note, this tool is useful in conjunction with the L and 
> L tools which
> perform the specific scaling of 2 and 0.5 respectively.
> 
> =head1 LICENSE
> 
> 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.
> 
> =head1 SEE ALSO
> 
> L
> 
> L
> 
> L
> 
> =head1 AUTHOR
> 
> Donald Johnston; modified from Bruno Postle’s ptodouble - July 2016.
> 
> =cut






> On Jul 9, 2016, at 4:48 PM, Bruno Postle  wrote:
> 
> 
> 
> On 9 July 2016 23:15:04 BST, Donald Johnston wrote:
>> is there a script or program available that can scale the parameters in
>> a PTO file?
> 
> See ptohalve and prodouble in the Panotools:: Script Perl module, these 
> mostly do what you want.
> 
> -- 
> Bruno
> 
> -- 
> 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 hugin-ptx+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/hugin-ptx/6CB7B73D-9353-4E29-B122-9CB6CBCACCD0%40postle.net.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/1107DB39-38E8-477B-88B8-EEB25E307D86%40accesscomm.ca.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Scaling a PTO file ..

2016-07-09 Thread Bruno Postle


On 9 July 2016 23:15:04 BST, Donald Johnston wrote:
>is there a script or program available that can scale the parameters in
>a PTO file?

See ptohalve and prodouble in the Panotools:: Script Perl module, these mostly 
do what you want.

-- 
Bruno

-- 
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 hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/6CB7B73D-9353-4E29-B122-9CB6CBCACCD0%40postle.net.
For more options, visit https://groups.google.com/d/optout.


[hugin-ptx] Scaling a PTO file ..

2016-07-09 Thread Donald Johnston
is there a script or program available that can scale the parameters in a PTO 
file?

I’m thinking of the idea of using a lot of JPG images at 1600 pixels long side 
to set all CPs, masks, etc so it is quick for Hugin to process and create 
output images. I can then iterate through different settings/changes and 
quickly see what the output stitched image will look like.

Then, when all looks well, I’ll recreate JPG (or TIFF) images from my raw 
images at original resolution (say 7360 pixels long side). It would be nice to 
then run a script on the PTO file that would scale all i, c, k, etc. lines and 
output a new PTO file that would work with the higher resolution images.

For example:

pto_scale —scale=7360/1600 —output=upscaled.pto trial.pto

Has anyone done this?

Don ...

-- 
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 hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/6B5CBC20-DE68-403A-BE8D-3BAD268E38DF%40accesscomm.ca.
For more options, visit https://groups.google.com/d/optout.


[hugin-ptx] Re: Hugin 2016.2 RC 1 released

2016-07-09 Thread Niklas Mischkulnig
Mac build:
https://sourceforge.net/projects/hugin/files/hugin/hugin-2016.2/Hugin-2016.2.0-rc1.dmg/download

sha1: cac4eb13cd0d88f2bca7f46d09a2df6da9cf167b  Hugin-2016.2.0-rc1.dmg

Changes to previous build
- compiled with LAPACK (no new dependency, ships with OS X)

Niklas


Am Samstag, 9. Juli 2016 11:04:31 UTC+2 schrieb T. Modes:
>
> Hi all,
>
> today we are releasing the Hugin 2016.2 rc 1.
>
> Source tarball can be downloaded
> at sourceforge: 
> https://sourceforge.net/projects/hugin/files/hugin/hugin-2016.2/hugin-2016.2.0-rc1.tar.bz2/download
> or at launchpad: 
> https://launchpad.net/hugin/2016.2/2016.2rc1/+download/hugin-2016.2.0-rc1.tar.bz2
>
> Verify its checksums:
> md5: f77ce8a1dc0a337b99eca8fb8841e00d  hugin-2016.2.0-rc1.tar.bz2
> sha1: db9af9c228f83828d4c82b927140dcf3d9f4d5c7  hugin-2016.2.0-rc1.tar.bz2
>
> This is a source code release. 
> Users communities produce executables for their respective platforms. 
> Please announce them here.
>
> (The rc 1 correspond to changeset 48cb11a23351 in our repository, which is 
> also tagged as 2016.2rc1).
>
> Changes since beta 1
> * More fixes for Mac OS build
> * Updated translations
> * More fixes for initialization of fast preview window
> * Cpfind: Improved finding of cp for float/double images by applying 
> logarithm mapping to internal images
>
> Changes since 2016.0.0
>
> * Allow reading of image positions from Papywizard XML files: First add 
> the image to a new project and then select File, Import settings from 
> Papywizard XML file... This will read the lens settings, the image 
> positions and also, if applicable, the bracket settings. After this, the 
> usual workflow is to run cpfind with --prealigned switch and then geocpset 
> to connect orphanded images.
> * The internal blender and verdandi got the possibility to blend seams as 
> alternative to current hard seam: For each seam the color of second image 
> is adapted to the match the color of the first seam. For this blender, the 
> blender order changes according to the overlap. The blending starts with 
> the exposure anchor and blends then all overlapping images. This blending 
> mode is not suited if there are bigger misalignments or bigger parallax 
> errors.
> * The display of the control point error (after optimizing and in fast 
> preview window) and the control point list window can now limited to take 
> only control points in active images into account (menu Edit, Optimize only 
> active images, connected with the setting on the optimizer tab).
> * Improvements to mask tab in Hugin (edit crop of all images of the same 
> lens at once) and find panorama dialog in PTBatcherGUI (remove images from 
> found panoramas, split found panorama into two).
> * Several improvements for Mac OS.
> * Fixes several issues with fast preview window which could result in 
> random crashes (uninitialized variables, memory leaks).
>
> Upgrading from previous versions of Hugin should be seamless. If you do 
> have problems with old settings, these can be reset in the Preferences 
> window by clicking 'Load defaults'.
>
>
> A draft of release notes can be found at 
> http://hugin.sourceforge.net/releases/2016.2.0/en.shtml
>

-- 
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 hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/f532888a-b90e-46b0-aaf8-4323be82a05e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[hugin-ptx] Hugin 2016.2 RC 1 released

2016-07-09 Thread T. Modes
Hi all,

today we are releasing the Hugin 2016.2 rc 1.

Source tarball can be downloaded
at sourceforge: 
https://sourceforge.net/projects/hugin/files/hugin/hugin-2016.2/hugin-2016.2.0-rc1.tar.bz2/download
or at launchpad: 
https://launchpad.net/hugin/2016.2/2016.2rc1/+download/hugin-2016.2.0-rc1.tar.bz2

Verify its checksums:
md5: f77ce8a1dc0a337b99eca8fb8841e00d  hugin-2016.2.0-rc1.tar.bz2
sha1: db9af9c228f83828d4c82b927140dcf3d9f4d5c7  hugin-2016.2.0-rc1.tar.bz2

This is a source code release. 
Users communities produce executables for their respective platforms. 
Please announce them here.

(The rc 1 correspond to changeset 48cb11a23351 in our repository, which is 
also tagged as 2016.2rc1).

Changes since beta 1
* More fixes for Mac OS build
* Updated translations
* More fixes for initialization of fast preview window
* Cpfind: Improved finding of cp for float/double images by applying 
logarithm mapping to internal images

Changes since 2016.0.0

* Allow reading of image positions from Papywizard XML files: First add the 
image to a new project and then select File, Import settings from 
Papywizard XML file... This will read the lens settings, the image 
positions and also, if applicable, the bracket settings. After this, the 
usual workflow is to run cpfind with --prealigned switch and then geocpset 
to connect orphanded images.
* The internal blender and verdandi got the possibility to blend seams as 
alternative to current hard seam: For each seam the color of second image 
is adapted to the match the color of the first seam. For this blender, the 
blender order changes according to the overlap. The blending starts with 
the exposure anchor and blends then all overlapping images. This blending 
mode is not suited if there are bigger misalignments or bigger parallax 
errors.
* The display of the control point error (after optimizing and in fast 
preview window) and the control point list window can now limited to take 
only control points in active images into account (menu Edit, Optimize only 
active images, connected with the setting on the optimizer tab).
* Improvements to mask tab in Hugin (edit crop of all images of the same 
lens at once) and find panorama dialog in PTBatcherGUI (remove images from 
found panoramas, split found panorama into two).
* Several improvements for Mac OS.
* Fixes several issues with fast preview window which could result in 
random crashes (uninitialized variables, memory leaks).

Upgrading from previous versions of Hugin should be seamless. If you do 
have problems with old settings, these can be reset in the Preferences 
window by clicking 'Load defaults'.


A draft of release notes can be found at 
http://hugin.sourceforge.net/releases/2016.2.0/en.shtml

-- 
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 hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/2bacce03-ad68-43c8-88a2-cbe0a31fc0c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.