Forum: Q & A

Thread: Lens calibration and PTGUI workflow

back to threads list | this thread is closed
Search the forums:
Author  Message 
Scott DuBose

Posts: 18
Location: San Jose, CA, United States
Registered: 22 Jan 2008
Lens calibration and PTGUI workflow
Posted: 5 Feb 2008 at 2:04 GMT
Hi guys, I'd like to understand what steps in a PTGUI process I can avoid through lens calibration. I've taken a 360 degree, one row pano with more than 50% overlap, assigned tons of control points per image pair, optimized, got a clean stitch. Now what -- how do I save the information and apply to future panos? How do I invoke those same parameters in my future workflow?

Sorry if this is very basic... thanks,
Scott
alert moderator
gus

Posts: 373
Location: United Kingdom
Registered: 19 Jun 2007
Re: Lens calibration and PTGUI workflow
Posted: 5 Feb 2008 at 8:02 GMT
updated: 5 Feb 2008 at 8:02 GMT
HI Scott,
I asked a similar question not too long ago and was provided with the following helpful reply by another forum member, John Houghton:

"A template is simply a PTGui project file. After loading a set of images into PTGui, a template is applied using File->Apply template. It will copy in lens and image parameters and also a crop circle if applicable. Control points are not copied over.

Making a template is a matter of shooting a set of images and stitching them, but with more than the usual care and attention to detail:

1. Choose a venue that is rich in features for assigning control points in all directions - the larger the better, as this ensures that parallax errors will not be an issue.

2. Set up the camera on the pano head as accurately as you can with the lens at the no parallax point.

3. Take a full set of images including zenith and nadir with the camea on the head for all.

4. Stitch the images manually. You don't need a large number of control points per seam, but they do need to be accurately placed and spread out reasonably evenly along the full length of the overlapped areas. The automatic control point generator is inclined to cluster the points in the middle, which is something to be avoided when calibrating the lens parameters, as here.

5. Follow the optimization instructions in my post at www.panoguide.com/forums/qna/3004 (Mar 28, 19:26). This was for a circular fisheye, but a fullframe fisheye is similar (no crop, of course, and 6 horizontal instead of 4). You can set the hfov intitially to 87.1 degrees (portrait orientation), and lens parameter b to -0.015.

Save the project file for use as a template. You would need to adapt the project for different combinations of images, but you can apply a 6+Z+N template to 6 horizontal shots, or to 6+Z without any problems. You can make a 6+N template by deleting the zenith from the 6+Z+N project.

Obviously, if you are using different pitch angles for the horizontal shots to minimize holes at the nadir or zenith in these alternative templates, then you should really shoot new panoramas for these configurations so that the y,p,r values are correct - essential if you have a highly accurate head and want to stitch with templates without assigning control points. The important thing here is that the y,p,r values need to be set with high repeat accuracy. It doesn't matter the yaw angles are not individually exactly 60 degrees; they just need to be exactly the same in sequence to match the template vaues. So care needs to be taken to ensure the same detent position is used for each shot as was used for the template.

Note that when stitching with a template and assisted with control points, you can manage with only a few points per seam (as few as 2 per seam if need be when features are scarce, but 4 spread out would be preferable). The lens parameters a,b,c should not generally be optimized, especially if control points are are few and not well spread out.

John "
alert moderator
John Houghton

Posts: 2133
Location: Hitchin, United Kingdom
Registered: 17 Jan 2005
Re: Lens calibration and PTGUI workflow
Posted: 5 Feb 2008 at 8:26 GMT
updated: 5 Feb 2008 at 8:27 GMT
-deleted-
alert moderator
Scott DuBose

Posts: 18
Location: San Jose, CA, United States
Registered: 22 Jan 2008
Re: Lens calibration and PTGUI workflow
Posted: 5 Feb 2008 at 16:20 GMT
Thanks Gus and John, that worked great. My avg distance is .25, max is .92 and got "This is too good to be true." YES!

The missing piece of the puzzle in my mind was "what does that save you?" I guess doing it this way allows you to use known accurate lens parameters rather than trying to stitch and optimize what could sometimes be a poor subject for the stitch. In my test case, this produced a very clean stitch requiring no additional control points. What other advantages do you see for doing the lens calibration?

It appears my most simple workflow could now be
shoot
load images
align images
create panorama

Next I will work on batching.

Scott
alert moderator
gus

Posts: 373
Location: United Kingdom
Registered: 19 Jun 2007
Re: Lens calibration and PTGUI workflow
Posted: 5 Feb 2008 at 17:28 GMT
""I guess doing it this way allows you to use known accurate lens parameters rather than trying to stitch and optimize what could sometimes be a poor subject for the stitch. ""

Thats exactly it. Once you've done the optimisation, you can simply apply this template to any future panos. Which will assist the stitcher in achieving better results when there is a deficiency of control points.
alert moderator