[hugin-ptx] Re: 2016.2 RC1 - error on TIFF control point generation: "caught exception: std::bad_alloc"

2016-07-22 Thread Stefan Hoffmeister
On Friday, July 22, 2016 at 8:45:26 PM UTC+2, Stefan Hoffmeister wrote:
 

> TIFF files produced by the latest version Capture One 8.3 cannot be 
> processed in Hugin, the panorama editor (http://hugin.sourceforge.net/) - 
> in this case this is with 2016.2 RC1.
>

User error - it seems as if I had a 32 bit parallel installation of an old 
2016.0 release floating around, and I was unwittingly using that.

The diagnostic warning

Warning: TIFFDecoder: no TIFFTAG_SAMPLEFORMAT or TIFFTAG_DATATYPE

remains, though. I have contacted the vendor (PhaseOne for Capture One 
Professional 8.3.4 64 bit) on this.

Apologies for the noise!

-- 
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/432c5a24-e343-4614-b9d5-64866fb24974%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] 2016.2 RC1 - error on TIFF control point generation: "caught exception: std::bad_alloc"

2016-07-22 Thread David W. Jones

On 07/22/2016 11:57 AM, Donald Johnston wrote:



On Jul 22, 2016, at 12:45 PM, Stefan Hoffmeister
 wrote:

Hi,

TIFF files produced by the latest version Capture One 8.3 cannot be
processed in Hugin, the panorama editor
(http://hugin.sourceforge.net/) - in this case this is with 2016.2
RC1.

Every TIFF produced by Capture One yields the following messages in
Hugin

Warning: TIFFDecoder: no TIFFTAG_SAMPLEFORMAT or TIFFTAG_DATATYPE,
guessing pixeltype '

and following that

An error happened while loading image : caught exception:
std::bad_alloc

upon trying to find control points in Hugin (Hugin's CPFind).

Steps: - take any two raws - produce 16 bit TIFF from it - import
both TIFFs into Hugin - find control points //exp: yields results
//act: hugin fails to find control points

I have uploaded one sample TIFF file (90 MB) at
https://drive.google.com/file/d/0ByH5SmhVPMAQTG93TEkybmxrdkk/view?usp=sharing



I cannot tell anything about the root cause of this - it might be 
Capture One writing bad data, or Hugin reading too restrictive / bad?


Advice on how to proceed is greatly appreciated :)



I get a similar error (except for the ‘UNIT 16’ at the end).

Warning: TIFFDecoder: no TIFFTAG_SAMPLEFORMAT or TIFFTAG_DATATYPE,
guessing pixeltype ‘UINT16’.

My tiff files were created by DxO OpticsPro. The find control points
works fine and the output from hugin is fine. So, I don’t think the
problem you’re having is related to the "Warning: TIFFDecoder: …”.

I did not get a “caught exception”.


I get a similar warning about missing TIFFTAG_SAMPLEFORMAT. I produce my 
TIFF files using Raw Therapee on Linux.


It also doesn't hinder finding control points or generating output.

--
David W. Jones
gnomeno...@gmail.com
wandering the landscape of god
http://dancingtreefrog.com

--
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/52204a44-0c67-1184-e7e4-d82cc8ccfa6f%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] 2016.2 RC1 - error on TIFF control point generation: "caught exception: std::bad_alloc"

2016-07-22 Thread Donald Johnston

> On Jul 22, 2016, at 12:45 PM, Stefan Hoffmeister 
>  wrote:
> 
> Hi,
> 
> TIFF files produced by the latest version Capture One 8.3 cannot be processed 
> in Hugin, the panorama editor (http://hugin.sourceforge.net/) - in this case 
> this is with 2016.2 RC1.
> 
> Every TIFF produced by Capture One yields the following messages in Hugin
> 
> Warning: TIFFDecoder: no TIFFTAG_SAMPLEFORMAT or TIFFTAG_DATATYPE, guessing 
> pixeltype '
> 
> and following that
> 
> An error happened while loading image : caught exception: std::bad_alloc
> 
> upon trying to find control points in Hugin (Hugin's CPFind).
> 
> Steps:
> - take any two raws
> - produce 16 bit TIFF from it
> - import both TIFFs into Hugin
> - find control points
> //exp: yields results
> //act: hugin fails to find control points
> 
> I have uploaded one sample TIFF file (90 MB) at  
> https://drive.google.com/file/d/0ByH5SmhVPMAQTG93TEkybmxrdkk/view?usp=sharing
> 
> I cannot tell anything about the root cause of this - it might be Capture One 
> writing bad data, or Hugin reading too restrictive / bad?
> 
> Advice on how to proceed is greatly appreciated :)




I get a similar error (except for the ‘UNIT 16’ at the end).

Warning: TIFFDecoder: no TIFFTAG_SAMPLEFORMAT or TIFFTAG_DATATYPE, guessing 
pixeltype ‘UINT16’.

My tiff files were created by DxO OpticsPro. The find control points works fine 
and the output from hugin is fine.
So, I don’t think the problem you’re having is related to the "Warning: 
TIFFDecoder: …”.

I did not get a “caught exception”.

-- 
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/230BD342-8814-4AAA-8793-03FD926E7B9E%40accesscomm.ca.
For more options, visit https://groups.google.com/d/optout.


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

2016-07-22 Thread Donald Johnston
Attached below is what I think is a working copy of the ptoscale Perl module.

If anyone has a chance can you test it out and let me know if you have any 
problems.
It works in conjunction with and requires Bruno’s Panotools:: Script 
Perl module

> On Jul 11, 2016, at 3:22 AM, Bruno Postle  wrote:
> 

> On 11 July 2016 03:22:28 BST, Donald Johnston wrote:

> 

> >Following some examples in your code I wrote:

> 

> >> $i->{d} = int ($i->{d} *= $R if $i->{d} =~ /^[-0-9.]+$/);

> 
> Misplaced brackets, something like:
> 
> int ($i->{d} *= $R) if …

> 
> (writing on my phone, so excuse me for not typing the whole line!)

Thanks Bruno. I can see why the Perl compiler might have problems with an “if” 
statement as an argument for the “int” function.

> 

> >The first two lines seem to work but then I get an error (I think the

> >third line above is line 34)

> >

> >Also, if d, e, Vx, and Vy are pixel values why are you even doing the

> >match in those lines???

> 
> I have no idea, mistakes are always a possibility.

Never “mistakes”; best to refer to them as “features”.  I’ve just left them in 
the modified code for ptoscale.

> 
> -- 
> Bruno
> 

Some notes on the code.
I had to move the code that handles the crop (S) from the image lines to the 
$p->Panorama line. Is this something you would have to do with your ptohalf and 
ptodouble modules?
Is there a web page that details the format of the lines within a .pto file? 
I’ve done a search but haven’t been able to find anything.
The int function doesn’t work well with floating point numbers so I turned it 
into more of a rounding function by adding 0.5 to the values before doing the 
integer. Sometimes what Perl might display as 4913 for example is actually 
4912.99 in floating point and so int returns 4912.
I wrote an extensive help part for the module (I hope it is understandable).
To be quite honest I have no idea what some of the lines in the code do as this 
is my first attempt at Perl (Thanks for your help Bruno!!!)

One test I did (below) was because I had made the small trial .pto project at 
1600 pixels before I realized I’d want to scale back up to the large image size 
at 7360 pixels.

/Applications/Panotools-Script-0.28/bin/ptoscale -s 7360/1600 -o 
scaled.pto trial.pto




THE CODE


> #!/usr/bin/perl
> use strict;
> use warnings;
> use Panotools::Script;
> use Getopt::Long;
> use Pod::Usage;
> 
> my $scale;
> my $path_output;
> my $help = 0;
> 
> GetOptions ('s|scale=s' => \$scale,
> '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 $R = 1;
> if ($scale =~ /\//)
> {
> my @Ratio = split ('/', $scale);
> $R = $Ratio[0] / $Ratio[1];
> } else {
> $R=$scale
> }
> 
> my $p = new Panotools::Script;
> $p->Read ($path_pto);
> 
> $p->Panorama->{w} = int (0.5 + ($p->Panorama->{w} *= $R));
> $p->Panorama->{h} = int (0.5 + ($p->Panorama->{h} *= $R));
> if (defined $p->Panorama->{S})
> {
> my @S = split (',', $p->Panorama->{S});
> @S = map {int (0.5 + ($_ * $R))} @S;
> $p->Panorama->{S} = join ',', @S;
> }
> 
> for my $i (@{$p->Image})
> {
> $i->{w} = int (0.5 + ($i->{w} *= $R));
> $i->{h} = int (0.5 + ($i->{h} *= $R));
> $i->{d} = int (0.5 + ($i->{d} *= $R)) if $i->{d} =~ /^[-0-9.]+$/;
> $i->{e} = int (0.5 + ($i->{e} *= $R)) if $i->{e} =~ /^[-0-9.]+$/;
> $i->{Vx} = int (0.5 + ($i->{Vx} *= $R)) if $i->{Vx} =~ /^[-0-9.]+$/;
> $i->{Vy} = int (0.5 + ($i->{Vy} *= $R)) if $i->{Vy} =~ /^[-0-9.]+$/;
> }
> 
> 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 (0.5 + ($_ * $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 n; or m/n where m = new side 
> length, n = old side length)
>   -o | --output Filename of scaled project (can be 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).  It is best to use a scale factor consisting of the 
> common divisors of the width and height of the image (in pixels).
> 
> For example: an image that is 3648x2736 has common divisors of 2, 2, 2, 2, 
> and 3. So a scale factor of 4, 6, or 8 would work (also 3648/912, 3648/608, 
> or 3648/456). Inverses and rationals work also: 0.5, 1.5, and 2/3 for example.
> 
> You will need to rescale the photos to match:
> 
>   

[hugin-ptx] Re: 2016.2 RC1 - error on TIFF control point generation: "caught exception: std::bad_alloc"

2016-07-22 Thread Stefan Hoffmeister
FWIW - the 8 bit TIFFs are processed by Hugin as expected - no warnings, no 
error messages, rather good control points are found for the complete set 
of TIFFs, and a rather decent-looking panorama is being produced.

But with 8 bit TIFF, I loose colour resolution.

-- 
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/a9eeed7e-24a3-4a3f-b881-553840fe0134%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[hugin-ptx] 2016.2 RC1 - error on TIFF control point generation: "caught exception: std::bad_alloc"

2016-07-22 Thread Stefan Hoffmeister
Hi,

TIFF files produced by the latest version Capture One 8.3 cannot be 
processed in Hugin, the panorama editor (http://hugin.sourceforge.net/) - 
in this case this is with 2016.2 RC1.

Every TIFF produced by Capture One yields the following messages in Hugin

Warning: TIFFDecoder: no TIFFTAG_SAMPLEFORMAT or TIFFTAG_DATATYPE, guessing 
pixeltype '

and following that

An error happened while loading image : caught exception: std::bad_alloc

upon trying to find control points in Hugin (Hugin's CPFind).

Steps:
- take any two raws
- produce 16 bit TIFF from it
- import both TIFFs into Hugin
- find control points
//exp: yields results
//act: hugin fails to find control points

I have uploaded one sample TIFF file (90 MB) at 
 https://drive.google.com/file/d/0ByH5SmhVPMAQTG93TEkybmxrdkk/view?usp=sharing

I cannot tell anything about the root cause of this - it might be Capture 
One writing bad data, or Hugin reading too restrictive / bad?

Advice on how to proceed is greatly appreciated :)

-- 
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/c98735fe-3c42-4227-a4b3-07129d51c5a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[hugin-ptx] 2016.2.0 RC.1 Windows x64 Problem with large HDR output above 5000x2500 pixels

2016-07-22 Thread Chris Blunt
Hi folks, 

I've been really interested in panoramas for some time now and recently 
invested in some kit to get going on this.  When it comes to stitching I 
have been trying to get to grips with Hugin and after some perseverance I 
have made some good results.  

I do however have some issues and could really use some expert guidance. 
 To get a nice exposure I have shot my images bracketed -1, 0, +1, load 
those into Hugin which seems be OK at detecting the stacks, the panorama 
all looks good and I can stitch to an HDR output without any problems to a 
size of approximately 5000 x 2500 once I start heading up above there 
towards the native resolution of the images 18000 x 9000 my resulting image 
is missing a section.  If I just export to LDR JPG it will stitch full size 
but of course I loose the dynamic range.

I originally tried the Stable 32 bit version and it would suffer running 
out of memory, I then moved to this version: 2016.2.0.48cb11a23351 built by 
Thomas and now have 16 gig of RAM on an i5.

I don't want to give up on Hugin and my budget is cooked on the hardware.

Your guidance and support would be much appreciated.

Best regards

Chris





-- 
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/4000ef2f-c205-4bc8-9786-77c5125b345d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.