Using prealigned option in cpfind

58 views
Skip to first unread message

Amir Shenhav

unread,
May 11, 2020, 12:06:14 PM5/11/20
to hugin and other free panoramic software
Hi,

I am trying to create a 360 panorama by using Hugin with the command line interface. The order of the images in known and I saw the following in the documentation regarding the prealinged option:

"This setting is for finding control points in panorama, in which the rough positions of the images are already known (e.g. when using a template or when generating the pto file by a script)"

I couldn't find any example or better instructions on how to create this "template". 

I'm interested in this option since sometimes cpfind does not match the images in the right order, and I need this workflow to work automatically using a script.

I'd be grateful for any explanation or reference of how to use this option.

Thanks,
Amir Shenhav

Bruno Postle

unread,
May 12, 2020, 3:14:48 AM5/12/20
to hugi...@googlegroups.com
Hi Amir, in general a 'template' is just another PTO project file. When you use it as a template, the image filenames are ignored. You can create a template by saving a Hugin project, creating one in a text editor, or using one of various tools that output PTO files.

--
Bruno

Amir Shenhav

unread,
May 12, 2020, 5:04:59 AM5/12/20
to hugin and other free panoramic software
Thanks Bruno!

I am using pto_gen to create the pto project file. I noticed that the order in which the images are listed inside the pto file is alphabetic (regardless of the order in which I list the images in pto_gen command). I see that this alphabetic order is then used in the next steps. 
I want to create a 360 panorama in which the order of the images is known. I'm currently using cpfind with the --multirow option which sometimes creates bad panoramas (either "upside-down", or "inside-out"). I thought that maybe the prealigned will be better since I know the order of the images.
The images are taken in "rings". Each ring use the same angle of the camera from the z axis and it rotates the camera around the z axis. 
Assuming I can write a script that generates the pto with the right image order (under the #image lines part of the file), would that order be used if I use the --prealigned option in cpfind? 
Would it then match and create control points for all the pairs in the list according to their order? Anything else that I should do?

Thanks,
Amir

T. Modes

unread,
May 12, 2020, 12:13:35 PM5/12/20
to hugin and other free panoramic software
Hi Amir,


Am Dienstag, 12. Mai 2020 11:04:59 UTC+2 schrieb Amir Shenhav:
regardless of the order in which I list the images in pto_gen command). I see that this alphabetic order is then used in the next steps. 
This was a bug in pto_gen. It should be fixed now.

Assuming I can write a script that generates the pto with the right image order (under the #image lines part of the file), would that order be used if I use the --prealigned option in cpfind? 
The prealigned option does not take the image order into account. Only the position of the images on the pano is used to determine which images does overlap and only these images pairs are processed.
The positions can be set using a template or with pto_var.

Thomas
Reply all
Reply to author
Forward
0 new messages