Trouble with creating zenith fisheye from 3 fixed cameras

81 views
Skip to first unread message

Alister Ling

unread,
Apr 10, 2017, 12:04:27 AM4/10/17
to hugin and other free panoramic software
Hi, a friend has provided me with 3 *fixed* wide-angle shots of an aurora display and I am trying to stitch it into a single circular fisheye image for projection in a planetarium dome. I almost have it: https://sites.google.com/site/alistargazing/articles/aurora-pano-creation-1. 3 cameras, one pointing N, one pointing ESE, the other pointing WSW, all taking a picture at the same time (within a second). One camera has a different lens (of course Hugin detects it!).

The move/drag seems to let me change the scale, but it really should be fixed based on the lens parameters.Is there any way to tell hugin this is a zenith point and that one is horizon, 90 deg away, because I know exactly where they are? Am I looking at this the wrong way? 

The final goal is to make a time-lapse of the ~ 600 sets of 3-images. I am hoping that I can stitch one trio very carefully, save its parameters, then (say in a perl script on a Windows box) provide those parameters for the next trio and the next trio, and next trio... I may be naive about Hugin and its underlying components, but it seems to me for this situation all the following sets simply need to be merged based on the parameters from the initial image set since the cameras do not move: the zenith and horizons remain stationary. With the aurora moving, I would want to turn off any control points - the individual image X,Y would *always* map to the final image x,y. Doing each trio by hand seems crazy, because I would never be able to repeat the y,p,r of each. Are these the parameters that need to be captured and fed back? If so, how?

Regards,
Alister.
P.S. I am retiring later this year, so I hope I can take your advice/ideas and pay it forward by contributing something to the project. 

Andrew Hazelden

unread,
Apr 10, 2017, 5:51:40 AM4/10/17
to hugin and other free panoramic software
Hi Alister.

I noticed on the "Alister's Skygazing: Aurora: Pano creation 1" webpage you have three different image numbering approaches in use for the camera views:

3O9A3427.JPG
IMG_3602.JPG
IMG_6922.JPG

From a workflow perspective, your first step if you want to take on an image sequence processing and stitching task would be to rename the three sets of fisheye image sequences to a consistent format that would make it easier for you to automate the processing of the imagery.

* * *

Your main choices would be to either go with a naming format like this:

Cam1.[0000-0500].jpg
Cam2.[0000-0500].jpg
Cam2.[0000-0500].jpg

or create numbered folders for each frame of the image sequence and go for a naming format like

/[0000-0500]/Cam1.jpg
/[0000-0500]/Cam2.jpg
/[0000-0500]/Cam3.jpg

This format of using a numbered folder for each frame of the sequence has some benefits as it means you could place a copy of the same Hugin stitching project file (that has relative file paths to the images) in each of the numbered folders.

Either way of naming the files would dramatically simplify the process of stitching the footage vs trying to match random names for each sequence frames.

* * *

With the image renaming taken care of, Hugin would be able to stitch the three sets of images from the command prompt or with the PTBatcherGUI tool.

If you have batch scripting skills then this wiki page might be of use to you:

http://wiki.panotools.org/Hugin_Batch_Processor

Regards,
Andrew Hazelden

T. Modes

unread,
Apr 10, 2017, 11:10:29 AM4/10/17
to hugin and other free panoramic software
Hi Alister,


Am Montag, 10. April 2017 06:04:27 UTC+2 schrieb Alister Ling:
The move/drag seems to let me change the scale, but it really should be fixed based on the lens parameters.
Move/drag does only influence the position (yaw/pitch/roll), but does not change the fov. So I don't know, how do you think it changes the fov = scale.
 
Is there any way to tell hugin this is a zenith point and that one is horizon, 90 deg away, because I know exactly where they are? Am I looking at this the wrong way? 
This is not possible.
 
The final goal is to make a time-lapse of the ~ 600 sets of 3-images. I am hoping that I can stitch one trio very carefully, save its parameters, then (say in a perl script on a Windows box) provide those parameters for the next trio and the next trio, and next trio...
For this you need the project file for the first triple, I assume it it called first.pto.
Then you call for each triple nona once:

nona -m TIFF -o prefixXXX first.pto imageXXX_1.tif imageXXX_2.tif imageXXX_3.tif


(maybe adding --gpu for using the GPU, if it works for you).
You need to specify the images in the same order as in the pto file.

This will use the internal blender and only output the blended result.
If the seams are problematic, e.g. if the change in the result, you need to switch to the enblend blender. This becomes a little bit more complicated. For each triple you need 2 commands:

nona -m TIFF_m -o prefixXXX first.pto imageXXX_1.tif imageXXX_2.tif imageXXX_3.tif
enblend --no-optimize -o prefixXXX.tif prefixXXX*.tif


(I added --no-optimize to enblend to prevent seam optimization)

Thomas

Alister Ling

unread,
Apr 10, 2017, 6:36:07 PM4/10/17
to hugin and other free panoramic software

Wow great answers Andrew and Thomas! Looks like a pretty ideal way of approaching this project. Hopefully I will be able to try it out this week. I will post my progress
Thank you and regards,
Alister. 

Alister Ling

unread,
Apr 14, 2017, 11:21:13 PM4/14/17
to hugin and other free panoramic software
Ta da!

GOT IT!   Thank you so much Thomas Modes and Andrew Hazelden
Your advice was bang on, I have created 2 frames manually using your framework, and now the rest is, as they say, SMOP, simple matter of programming to put it all in a loop.

Alister 

Alister Ling

unread,
Apr 14, 2017, 11:25:41 PM4/14/17
to hugin and other free panoramic software
I forgot to add that I will post a tutorial and code snippets when I am done.

Alister Ling

unread,
Mar 1, 2018, 4:34:36 PM3/1/18
to hugin and other free panoramic software
As promised, here is the webpage I created as a tutorial. It is not (yet) complete down to the smallest details, but is a good outline:

And a teaser a few seconds from the finished time-lapse:

Regards,
Alister.
Reply all
Reply to author
Forward
0 new messages