Re: [hugin-ptx] Alignment of multi-row images

2021-03-07 Thread Mike Cowlishaw
Thanks for the thanks :-).  Glad it was useful!

On Sun, Mar 7, 2021 at 8:54 AM Thomas Käfer  wrote:

> Thanks for publishing this. I've used what I've learned from your script
> to make this much simpler much more rigid script for a panorama poor in
> features that I'm currently trying to stich togetether:
>
> #!/bin/bash
>
> pto_gen -o scripting_step1_images.pto IMG_*.JPG
>
> # https://wiki.panotools.org/Panorama_scripting_in_a_nutshell
>
> # https://groups.google.com/g/hugin-ptx/c/ImcaDTH7KMY/m/GcHI-wNnFAAJ
> # https://wiki.panotools.org/Pto_var
> # simplified layout asuming 360° panorama
> # rows are not needed in calculation, it's assumed that rows = number of
> pictures / columns
> columns=8
> degrees_below_horizon=55 # how far below the horizon does the panorama
> start?
> field_of_view_horizontal=$((360/$columns)) # not the real field_of_view,
> subtract half of the overlap..
> echo "field_of_view_horizontal = $field_of_view_horizontal"
> field_of_view_vertical=$(($field_of_view_horizontal/4*3))
> pto_var
> --set="y=(i%$columns)*$field_of_view_horizontal,p=floor(i/$columns)*$field_of_view_vertical-$degrees_below_horizon,r=0"
> --output=scripting_step2_align_rows_and_columns.pto
> scripting_step1_images.pto
>
> pto_mask --process=CLIP --mask=mask.msk@0 --mask=mask.msk@1
> --mask=mask.msk@2 --mask=mask.msk@3 --mask=mask.msk@4 --mask=mask.msk@5
> --mask=mask.msk@6 --mask=mask.msk@7 --output=scripting_step3_masks.pto
> scripting_step2_align_rows_and_columns.pto
>
> # https://wiki.panotools.org/Cpfind
> # --multirow --sieve2width=10 --sieve2height=10 --sieve2size=20
> --minmatches=1
> cpfind --verbose --prealigned --fullscale --cache
> --output=scripting_step4_prealigned_cpfind.pto scripting_step3_masks.pto
>
> linefind --output=scripting_step5_vertical-lines.pto
> scripting_step4_prealigned_cpfind.pto
>
> # https://wiki.panotools.org/Geocpset
> geocpset --each-overlap --output=scripting_step6_geocpset.pto
> scripting_step5_vertical-lines.pto
>
> autooptimiser -a -m --output=scripting_step7_autoptimized.pto
> scripting_step6_geocpset.pto
>
> hugin scripting_step7_autoptimized.pto
>
>
> Thank you :)
>
> mfc.s...@gmail.com schrieb am Samstag, 7. November 2015 um 13:45:39 UTC+1:
>
>>
>>> Ah!!  That works perfectly!   Very many thanks.   Presumably I can add
>>> that step to the script by calling cpfind  again (with --prealigned?) ?
>>>
>>
>> Ignore that last question .. I see that won't work.
>>
>> Here, as promised, is the script I put together.  Plenty of room for
>> improvement...
>>
>> /* --- */
>> /* huginpan.rex --- run Hugin with layout hints*/
>> /* --- */
>> /* */
>> /* Call as:*/
>> /* */
>> /*   huginpan pattern lens columns rows order  */
>> /* */
>> /* where:  */
>> /* */
>> /*   pattern -- source files pattern (e.g., P*.jpg)*/
>> /*   lens-- lens length (mm, 35mm equivalent)  */
>> /*   columns -- number of images in X dimension*/
>> /*   rows-- ditto in Y */
>> /*   order   -- mapping of image sequence to rectangle */
>> /* */
>> /* pattern, lens, and columns are required */
>> /* rows default=1, order default=0 */
>> /* */
>> /* order is:   */
>> /* */
>> /*   0 -- rows, left->right, top->bottom (start top-left)  */
>> /*   1 -- columns, top->bottom, left->right (start top-left)   */
>> /* */
>> /* Before using this, it is suggested that you copy the source */
>> /* files to their own subdirectory, then run this command with */
>> /* that as the current directory.  */
>> /* */
>> /* Return codes from pto_ commands are not documented, so ignored. */
>> /* --- */
>> -- 2015.11.04 mfc initial vesrion
>> -- 2015.11.06 add lens length as parameter
>>
>> -- ensure path to Hugin 64-bit programs [needed for cpfind]
>> 'SET PATH=c:\Program Files\Hugin\bin;%PATH%'
>>
>> parse arg pattern lens columns rows order .
>> if columns='' then do
>>   

Re: [hugin-ptx] Alignment of multi-row images

2021-03-07 Thread Thomas Käfer
Thanks for publishing this. I've used what I've learned from your script to 
make this much simpler much more rigid script for a panorama poor in 
features that I'm currently trying to stich togetether:

#!/bin/bash

pto_gen -o scripting_step1_images.pto IMG_*.JPG

# https://wiki.panotools.org/Panorama_scripting_in_a_nutshell

# https://groups.google.com/g/hugin-ptx/c/ImcaDTH7KMY/m/GcHI-wNnFAAJ
# https://wiki.panotools.org/Pto_var
# simplified layout asuming 360° panorama
# rows are not needed in calculation, it's assumed that rows = number of 
pictures / columns
columns=8
degrees_below_horizon=55 # how far below the horizon does the panorama 
start?
field_of_view_horizontal=$((360/$columns)) # not the real field_of_view, 
subtract half of the overlap..
echo "field_of_view_horizontal = $field_of_view_horizontal"
field_of_view_vertical=$(($field_of_view_horizontal/4*3))
pto_var 
--set="y=(i%$columns)*$field_of_view_horizontal,p=floor(i/$columns)*$field_of_view_vertical-$degrees_below_horizon,r=0"
 
--output=scripting_step2_align_rows_and_columns.pto 
scripting_step1_images.pto

pto_mask --process=CLIP --mask=mask.msk@0 --mask=mask.msk@1 
--mask=mask.msk@2 --mask=mask.msk@3 --mask=mask.msk@4 --mask=mask.msk@5 
--mask=mask.msk@6 --mask=mask.msk@7 --output=scripting_step3_masks.pto 
scripting_step2_align_rows_and_columns.pto

# https://wiki.panotools.org/Cpfind
# --multirow --sieve2width=10 --sieve2height=10 --sieve2size=20 
--minmatches=1
cpfind --verbose --prealigned --fullscale --cache 
--output=scripting_step4_prealigned_cpfind.pto scripting_step3_masks.pto

linefind --output=scripting_step5_vertical-lines.pto 
scripting_step4_prealigned_cpfind.pto

# https://wiki.panotools.org/Geocpset
geocpset --each-overlap --output=scripting_step6_geocpset.pto 
scripting_step5_vertical-lines.pto

autooptimiser -a -m --output=scripting_step7_autoptimized.pto 
scripting_step6_geocpset.pto

hugin scripting_step7_autoptimized.pto


Thank you :)

mfc.s...@gmail.com schrieb am Samstag, 7. November 2015 um 13:45:39 UTC+1:

>
>> Ah!!  That works perfectly!   Very many thanks.   Presumably I can add 
>> that step to the script by calling cpfind  again (with --prealigned?) ?
>>
>
> Ignore that last question .. I see that won't work.
>
> Here, as promised, is the script I put together.  Plenty of room for 
> improvement...
>
> /* --- */
> /* huginpan.rex --- run Hugin with layout hints*/
> /* --- */
> /* */
> /* Call as:*/
> /* */
> /*   huginpan pattern lens columns rows order  */
> /* */
> /* where:  */
> /* */
> /*   pattern -- source files pattern (e.g., P*.jpg)*/
> /*   lens-- lens length (mm, 35mm equivalent)  */
> /*   columns -- number of images in X dimension*/
> /*   rows-- ditto in Y */
> /*   order   -- mapping of image sequence to rectangle */
> /* */
> /* pattern, lens, and columns are required */
> /* rows default=1, order default=0 */
> /* */
> /* order is:   */
> /* */
> /*   0 -- rows, left->right, top->bottom (start top-left)  */
> /*   1 -- columns, top->bottom, left->right (start top-left)   */
> /* */
> /* Before using this, it is suggested that you copy the source */
> /* files to their own subdirectory, then run this command with */
> /* that as the current directory.  */
> /* */
> /* Return codes from pto_ commands are not documented, so ignored. */
> /* --- */
> -- 2015.11.04 mfc initial vesrion
> -- 2015.11.06 add lens length as parameter
>
> -- ensure path to Hugin 64-bit programs [needed for cpfind]
> 'SET PATH=c:\Program Files\Hugin\bin;%PATH%'
>
> parse arg pattern lens columns rows order .
> if columns='' then do
>   say 'Pattern, lens, and columns must be specified'
>   exit -1
>   end
> if rows='' then rows=1
> if order='' then order=0
>
> -- set up constants (could be parameters or options, later)
> -- short-edge equivanet sensor size is 

Re: [hugin-ptx] Alignment of multi-row images

2015-11-07 Thread Mike Cowlishaw


On Saturday, 7 November 2015 18:51:56 UTC, Gerald wrote:
>
> Is it the same Rex as the one under OS/2?
>

There are several implementations (all support the ANSI Standard Rexx, I 
think).  The open object Rexx (ooRexx) that is the current open source/free 
version is, indeed, based on the OS/2 Object Rexx ... but much enhanced 
from that. 

Perhaps more to the point of this thread is that Rexx was designed to 
process strings in order to create "commands", which is exactly what is 
required for the commands that Hugin/panotools expect.  

-- 
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/a3188ef8-258c-43f6-9f58-c7ca0e646e12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-07 Thread Mike Cowlishaw

>
>
> see http://wiki.panotools.org/Panorama_scripting_in_a_nutshell
> This file is also contained in Hugins help file.
>

Perfect -- thanks.  

As mentioned, I didn't find anything like that when searching; maybe worth 
'highlighting' in some way? 

-- 
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/4f59f72e-b830-4acf-81a0-d646bf107fc5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-07 Thread T. Modes


Am Samstag, 7. November 2015 19:44:47 UTC+1 schrieb Mike Cowlishaw:
>
> OK .. many thanks; will try those soon (not tomorrow).   Is there an 
> overview of hugin commands, like those, somewhere?   I googled and browsed 
> for some time and did not come across 'hugin_executor',as far as I recall.


see http://wiki.panotools.org/Panorama_scripting_in_a_nutshell
This file is also contained in Hugins help file. 

-- 
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/27fffb73-e859-4f70-b0a0-07d70dd7ab8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-07 Thread Gerald Brosseau

Is it the same Rex as the one under OS/2?


Le 2015-11-07 13:01, Mike Cowlishaw a écrit :



On Saturday, 7 November 2015 17:29:10 UTC, bugbear wrote:

What (on earth) is your Hugin installed on, such that Rex
is your scripting language of choice?!


Windows.  But it is also my scripting language of choice on Linux. 
 After all, I created Rex[x] :-).


Mike
--
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/06f0ea44-3b6f-4816-8546-35578767ca2c%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
Gérald Brosseau
La Photo Du Jour
(www.gb-photodujour.com)
Sur internet depuis 1998

--
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/563E484A.4030007%40gb-photodujour.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-07 Thread Mike Cowlishaw


On Saturday, 7 November 2015 18:37:19 UTC, T. Modes wrote:
>
>
>
> Am Samstag, 7. November 2015 13:45:39 UTC+1 schrieb Mike Cowlishaw:
>>
>> 
>>
>  
>
>> -- add missing control points using geometry
>> 'geocpset --output='profile profile
>>
>> -- done
>> say
>> say 'Starting Hugin.  Open' profile', Align, 
>>
>
> this can also be achieved from the command line: hugin_executor 
> --assistant ..
>  
>
>> and Generate Panorama'
>>
>
> same here: hugin_executor --stitching … 
>  
>
> OK .. many thanks; will try those soon (not tomorrow).   Is there an 
overview of hugin commands, like those, somewhere?   I googled and browsed 
for some time and did not come across 'hugin_executor',as far as I recall.

>  
>

-- 
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/17b396a6-4793-44f7-aca6-1449116ddc3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-07 Thread T. Modes


Am Samstag, 7. November 2015 13:45:39 UTC+1 schrieb Mike Cowlishaw:
>
> 
>
 

> -- add missing control points using geometry
> 'geocpset --output='profile profile
>
> -- done
> say
> say 'Starting Hugin.  Open' profile', Align, 
>

this can also be achieved from the command line: hugin_executor --assistant 
..
 

> and Generate Panorama'
>

same here: hugin_executor --stitching … 
 

 

-- 
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/a0e1ad0c-03a8-443c-aaf0-c29624160d5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-07 Thread Mike Cowlishaw


On Saturday, 7 November 2015 17:29:10 UTC, bugbear wrote:
>
> What (on earth) is your Hugin installed on, such that Rex
> is your scripting language of choice?!
>

Windows.  But it is also my scripting language of choice on Linux.  After 
all, I created Rex[x] :-).  

Mike 

-- 
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/06f0ea44-3b6f-4816-8546-35578767ca2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-07 Thread Paul Womack
What (on earth) is your Hugin installed on, such that Rex
is your scripting language of choice?!

 BugBear

On 7 November 2015 at 12:45, Mike Cowlishaw  wrote:


>> Ah!!  That works perfectly!   Very many thanks.   Presumably I can add
>> that step to the script by calling cpfind  again (with --prealigned?) ?
>>
>
> Ignore that last question .. I see that won't work.
>
> Here, as promised, is the script I put together.  Plenty of room for
> improvement...
>
> /* --- */
> /* huginpan.rex --- run Hugin with layout hints*/
> /* --- */
>
>

-- 
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/CAES-0n-jwy1GNM-SEq_8BqPoH5wg0agnAoiQtN9ksEh_wiy%2BJA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-07 Thread T. Modes


Am Samstag, 7. November 2015 12:01:00 UTC+1 schrieb Mike Cowlishaw:
>
> Just tried running my script for just the pto_gen and pto_var commands, 
> then opening the .pto with Hugin, running Align, saving, running the 
> geocpset command, opening the .pto again, and stitching.
>
> This runs without errors, but the result is truly awful -- even 'easy' 
> bits such as the car is not stitched correctly.
>

After geocpset and opening the pto file again you need to optimize the 
position and photometric parameters to get the final result. (Do it 
manually on the photos tab or press align again)
Otherwise only rough position from pto_var are used.

-- 
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/5412d300-254b-416f-8134-92eb09642bfc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-07 Thread Mike Cowlishaw
Just tried running my script for just the pto_gen and pto_var commands, 
then opening the .pto with Hugin, running Align, saving, running the 
geocpset command, opening the .pto again, and stitching.

This runs without errors, but the result is truly awful -- even 'easy' bits 
such as the car is not stitched correctly.

So I am somewhat discouraged -- wondering if anyone else can get this to 
work.

Mike

-- 
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/0d137044-e2e6-4521-8e13-81cb9131289e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-07 Thread Mike Cowlishaw

>
>
> The errors are of the form:
>>
>>   i7 : Analyzing image...
>>   An error happened while loading image : caught exception: bad allocation
>>
>
> You are using the 64 bit version? (If you are using the 32 bit version, 
> try the 64 bit version.)
>

I believe so -- I only have the 64-bit installer .exe, but About Hugin 
doesn't say either way.
 

>
> You could try to limit the number of threads with
> SET OMP_NUM_THREADS=4
> (before running cpfind)
> to reduce the memory usage.
> (I have seen this error only when there is memory shortage in case of many 
> threads.)
>

That didn't help.   The odd thing is that these errors do not occur when 
cpfind is run from the Hugin assistant ('Align').



 

-- 
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/4c7b7fa9-e3ab-4ffb-aa16-bd2c91680fc9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-07 Thread T. Modes


Am Samstag, 7. November 2015 09:58:36 UTC+1 schrieb Mike Cowlishaw:
>
> The errors are of the form:
>
>   i7 : Analyzing image...
>   An error happened while loading image : caught exception: bad allocation
>

You are using the 64 bit version? (If you are using the 32 bit version, try 
the 64 bit version.)

You could try to limit the number of threads with
SET OMP_NUM_THREADS=4
(before running cpfind)
to reduce the memory usage.
(I have seen this error only when there is memory shortage in case of many 
threads.)

-- 
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/f4b187e1-55bf-4177-beb9-1e8757c2821c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-07 Thread Mike Cowlishaw
Hi, yes, the commands look good -- it is the errors that seem to be causing
the problems.  Sometimes (with the same set of images) there are only one
or two error messages, and the result then is OK.

The errors are of the form:

  i7 : Analyzing image...
  An error happened while loading image : caught exception: bad allocation

Mike

On Fri, Nov 6, 2015 at 10:19 PM, Terry Duell  wrote:

> Hello Mike,
>
> On Sat, 07 Nov 2015 02:24:32 +1100, Mike Cowlishaw 
> wrote:
>
> [Last post had wrong command copy .. retry...]
>>
>>
>> Many thanks for that.  Making progress :-).   My script generates the
>> correct commands, I think:
>>
>>   pto_gen -o project.pto p*.jpg
>>   pto_var
>> "--set=y=(floor(i/6)*13.5719189)-20.3578783,p=25.5922968-(i%6)*10.2369187"
>> --output=project.pto project.pto
>>   cpfind --output=project.pto --prealigned project.pto
>>   geocpset --output=project.pto project.pto
>>
>>
>> but the cpfind command gives the following errors (varies according to
>> the run):
>>
>
> One thing I do when first writing scripts like this is to have each step
> generate a new .pto file, then when it's done you can load each one in turn
> into Hugin and see if it has done what you want.
>
> Cheers,
> --
> Regards,
> Terry Duell
>
> --
> A list of frequently asked questions is available at:
> http://wiki.panotools.org/Hugin_FAQ
> ---You received this message because you are subscribed to a topic in the
> Google Groups "hugin and other free panoramic software" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/hugin-ptx/ImcaDTH7KMY/unsubscribe.
> To unsubscribe from this group and all its topics, 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/op.x7o9m2bers0ygh%40localhost.
>
> 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/CAC%3DyYA%3Db2V4s6G_V6ZLQvGgS3-qbwPvTWJ08QQraBp%3DKzuEXMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-06 Thread Terry Duell

Hello Mike,

On Sat, 07 Nov 2015 02:24:32 +1100, Mike Cowlishaw   
wrote:



[Last post had wrong command copy .. retry...]


Many thanks for that.  Making progress :-).   My script generates the
correct commands, I think:

  pto_gen -o project.pto p*.jpg
  pto_var
"--set=y=(floor(i/6)*13.5719189)-20.3578783,p=25.5922968-(i%6)*10.2369187"
--output=project.pto project.pto
  cpfind --output=project.pto --prealigned project.pto
  geocpset --output=project.pto project.pto


but the cpfind command gives the following errors (varies according to  
the run):


One thing I do when first writing scripts like this is to have each step  
generate a new .pto file, then when it's done you can load each one in  
turn into Hugin and see if it has done what you want.


Cheers,
--
Regards,
Terry Duell

--
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/op.x7o9m2bers0ygh%40localhost.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-06 Thread Mike Cowlishaw
[Last post had wrong command copy .. retry...]


Many thanks for that.  Making progress :-).   My script generates the 
correct commands, I think:

  pto_gen -o project.pto p*.jpg
  pto_var 
"--set=y=(floor(i/6)*13.5719189)-20.3578783,p=25.5922968-(i%6)*10.2369187" 
--output=project.pto project.pto
  cpfind --output=project.pto --prealigned project.pto
  geocpset --output=project.pto project.pto


but the cpfind command gives the following errors (varies according to the 
run):
 
  
  i0 : Analyzing image...
  i1 : Analyzing image...
  i2 : Analyzing image...
  i3 : Analyzing image...
  i4 : Analyzing image...
  i5 : Analyzing image...
  i6 : Analyzing image...
  i7 : Analyzing image...
  An error happened while loading image : caught exception: bad allocation
  i8 : Analyzing image...
  An error happened while loading image : caught exception: bad allocation
  i9 : Analyzing image...
  An error happened while loading image : caught exception: bad allocation
  i10 : Analyzing image...
  An error happened while loading image : caught exception: bad allocation

  [more of the same deleted]

The geocpset command seems to work, but when I then open the .pto file in 
Hugin there are severe stitching errors -- 

presumably only the geometrical control points are being used. 
 
This is on Windows 64 with 16GB of RAM (free RAM typically 10-12GB).  Any 
ideas?

Mike

-- 
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/bff7d13c-1e19-4cb8-9e9d-db0a10da9a45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-06 Thread Mike Cowlishaw

>
>
> Many thanks for that.  Making progress :-).   My script generates the 
> correct commands, I think:
>

  pto_gen -o project.pto p*.jpg
  pto_var "--set=y=(i%6)*92.9654310-232.413578,p=0-(floor(i/6)*88.1947662)" 
--output=project.pto project.pto
  cpfind --output=project.pto --prealigned project.pto
  geocpset --output=project.pto project.pto


but the cpfind command gives the following errors (varies according to the 
> run):
>
 

i0 : Analyzing image...

i1 : Analyzing image...

i2 : Analyzing image...

i3 : Analyzing image...

i4 : Analyzing image...

i5 : Analyzing image...

i6 : Analyzing image...

i7 : Analyzing image...

An error happened while loading image : caught exception: bad allocation

i8 : Analyzing image...

An error happened while loading image : caught exception: bad allocation

i9 : Analyzing image...

An error happened while loading image : caught exception: bad allocation

i10 : Analyzing image...

An error happened while loading image : caught exception: bad allocation


[more of the same deleted]

The geocpset command seems to work, but when I then open the .pto file in 
Hugin there are severe stitching errors -- presumably only the geometrical 
control points are being used. 
 
This is on Windows 64 with 16GB of RAM (free RAM typically 10-12GB).  Any 
ideas?

Mike

-- 
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/53d1995c-f51b-471f-a087-6bc2eba2dcfb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-04 Thread T. Modes


Am Mittwoch, 4. November 2015 16:15:22 UTC+1 schrieb Mike Cowlishaw:
>
> OK, many thanks .. working through the documentation on those and building 
> a script; will report in due course.  
>

That would be nice. There is no much feedback for this workflow/tools.
 

> The documentation for pto_var is especially skimpy.  
>

I know. It requires some knowledge of the pto file format. Until now nobody 
helped with this.
The easiest way is to have a look on the photos tab for an existing 
project. There you will find all variables (and it short character)
 

> Are the constants you suggest (13, 27, 9) in degrees?  The functions seem 
> to work in radians.   
>

Yes, yaw, pitch and roll are in degree.
Your example images have a horizontal field of view of about 22 deg. With 
an estimated overlap of 40 % you will get an delta yaw of 13 deg.
For pitch this is similar: The vertical field of view is about 16 deg. So 
you get an delta pitch of 9 deg. The 27 is to get the middle image of each 
row near to the horizon. This last one would not be strictly necessary.

An easier way is to use a subset (maybe all rows, but only 2 columns), run 
the assistant and look on the photo tab and deduce the necessary 
angle/formulas.
(Or load a subset of images and move them with the drag tool to raw 
positions and then look on the photos tab.)

Also I assume the origin for the positions is bottom-left.
>
> No. It is a spherical coordinate system with 0,0 in the middle. 
cpfind is using the full sphere for calculation. So the origin is not so 
important, because the 0-360/-90-+90 deg boundary is taken into account.

-- 
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/f2d842d1-4f39-4cc6-b6a2-87285d232cb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-04 Thread Mike Cowlishaw
OK, many thanks .. working through the documentation on those and building
a script; will report in due course.   The documentation for pto_var is
especially skimpy.   Are the constants you suggest (13, 27, 9) in degrees?
The functions seem to work in radians.   Also I assume the origin for the
positions is bottom-left.

Mike

On Tue, Nov 3, 2015 at 7:40 PM, T. Modes  wrote:

>
> Am Dienstag, 3. November 2015 16:09:07 UTC+1 schrieb Mike Cowlishaw:
>>
>> It should be able to cope with up-down patterns just as well as
>> left-right, and zig-zag arrangements should work as well.
>>
>>>
>>> Unless there are gaps or featureless areas, like blue sky, it's
>>> difficult to say what the problem is, can you upload a sample somewhere?
>>>
>>
>> Ah, thanks, that has prompted me to do some more experiments.  I can
>> process more than half the images without problems, but there are indeed 4
>> (of the 72) that are featureless white sky (necessarily/deliberately
>> overexposed), and the 'unconnected groups' messages appear when they are
>> part of the selected source images.
>>
>> I'm not sure what to do in this case: I am invited to add control points,
>> but there can be none?.
>>
>
> With the featureless images it becomes a little bit more complicated, but
> not impossible.
> Have a look at the geocpset tool http://wiki.panotools.org/Geocpset
>
>
>>
>> I've uploaded the rightmost 4 columns (24 JPGs) as a sample that 'fails'
>> (and also shows the less-than-ideal initial display of images), at
>> http://speleotrove.com/testpan.zip -- any suggestions on how to proceed
>> would be much appreciated!
>>
>
> For your test set the sequence would be something like:
> pto_gen --output=project.pto *.pto
> pto_var "--set=y=floor(i/6)*13,p=27-(i%6)*9" --output=project.pto
> project.pto
> cpfind --output=project.pto --prealigned project.pto
> geocpset --output=project.pto project.pto
>
> (Quoting is for Windows.)
>
> For your full project you will need to adopt probably the parameters for
> pto_var.
>
> --
> A list of frequently asked questions is available at:
> http://wiki.panotools.org/Hugin_FAQ
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "hugin and other free panoramic software" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/hugin-ptx/ImcaDTH7KMY/unsubscribe.
> To unsubscribe from this group and all its topics, 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/032c6202-bf80-430a-b4b6-21d3c28c73fb%40googlegroups.com
> 
> .
>
> 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/CAC%3DyYA%3DmWr8VnRZ7oeozGLSkaq5wao2P-bx0AmggDigQ9X%2B7Tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-03 Thread T. Modes

Am Dienstag, 3. November 2015 16:09:07 UTC+1 schrieb Mike Cowlishaw:
>
> It should be able to cope with up-down patterns just as well as 
> left-right, and zig-zag arrangements should work as well. 
>
>>
>> Unless there are gaps or featureless areas, like blue sky, it's difficult 
>> to say what the problem is, can you upload a sample somewhere?  
>>
>
> Ah, thanks, that has prompted me to do some more experiments.  I can 
> process more than half the images without problems, but there are indeed 4 
> (of the 72) that are featureless white sky (necessarily/deliberately 
> overexposed), and the 'unconnected groups' messages appear when they are 
> part of the selected source images.
>
> I'm not sure what to do in this case: I am invited to add control points, 
> but there can be none?.
>

With the featureless images it becomes a little bit more complicated, but 
not impossible.
Have a look at the geocpset tool http://wiki.panotools.org/Geocpset
 

>
> I've uploaded the rightmost 4 columns (24 JPGs) as a sample that 'fails' 
> (and also shows the less-than-ideal initial display of images), at 
> http://speleotrove.com/testpan.zip -- any suggestions on how to proceed 
> would be much appreciated!
>

For your test set the sequence would be something like:
pto_gen --output=project.pto *.pto
pto_var "--set=y=floor(i/6)*13,p=27-(i%6)*9" --output=project.pto 
project.pto
cpfind --output=project.pto --prealigned project.pto
geocpset --output=project.pto project.pto

(Quoting is for Windows.)

For your full project you will need to adopt probably the parameters for 
pto_var.

-- 
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/032c6202-bf80-430a-b4b6-21d3c28c73fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-03 Thread Mike Cowlishaw
Bruno, thanks for the quick reply!   Two separate questions here, I now 
think.


> >I wonder whether the order of the images makes a difference (these are 
> >top-to-bottom, a column at a time, whereas before I've always done 
> >left-to-right, a row at a time)? 
>
> Hugin does assume rows by default (you can change this in the preferences 
> window).


I looked before and just had another look -- where in Preferences does one 
change this?  I would have thought Hugin would need this in other to make a 
sensible initial display of the loaded images (at present it shows a 
strange patchwork).  Also, perhaps, if Hugin was told how the images were 
arranged it could speed up the alignment process.

 

> It should be able to cope with up-down patterns just as well as 
> left-right, and zig-zag arrangements should work as well. 
>
> Unless there are gaps or featureless areas, like blue sky, it's difficult 
> to say what the problem is, can you upload a sample somewhere?  
>

Ah, thanks, that has prompted me to do some more experiments.  I can 
process more than half the images without problems, but there are indeed 4 
(of the 72) that are featureless white sky (necessarily/deliberately 
overexposed), and the 'unconnected groups' messages appear when they are 
part of the selected source images.

I'm not sure what to do in this case: I am invited to add control points, 
but there can be none?.

I've uploaded the rightmost 4 columns (24 JPGs) as a sample that 'fails' 
(and also shows the less-than-ideal initial display of images), 
at http://speleotrove.com/testpan.zip -- any suggestions on how to proceed 
would be much appreciated!

Mike



 

-- 
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/c739631e-7d93-45eb-9ee1-32a2d4e95add%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [hugin-ptx] Alignment of multi-row images

2015-11-02 Thread Bruno Postle


On 2 November 2015 12:07:06 GMT+00:00, Mike Cowlishaw wrote:
>
>I wonder whether the order of the images makes a difference (these are 
>top-to-bottom, a column at a time, whereas before I've always done 
>left-to-right, a row at a time)?

Hugin does assume rows by default (you can change this in the preferences 
window). It should be able to cope with up-down patterns just as well as 
left-right, and zig-zag arrangements should work as well.

Unless there are gaps or featureless areas, like blue sky, it's difficult to 
say what the problem is, can you upload a sample somewhere?

-- 
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/06D5F686-A983-48EB-B38A-A748535C2586%40postle.net.
For more options, visit https://groups.google.com/d/optout.


[hugin-ptx] Alignment of multi-row images

2015-11-02 Thread Mike Cowlishaw
I've been using Hugin for some time and have always got excellent results 
with panoramas from up to 4 x 6 images.  However I recently tried a much 
larger set (6 x 12) and the align step failed badly with messages about 
many unconnected images.   If I take a subset (e.g., the first 12 images) 
alignment works as normal.

I wonder whether the order of the images makes a difference (these are 
top-to-bottom, a column at a time, whereas before I've always done 
left-to-right, a row at a time)?   Or is there a way I can 'tell' Hugin how 
the images are arranged?

If not, any suggestions?  This is a fresh installation of 2015.0.0 with no 
settings changed.

Thanks -- Mike

-- 
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/f3b70a6e-42c0-4d4c-8ab8-9519daff2c64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.