[ptx] Hugin under OS X problems
Rik Littlefield
rj.littlefield at computer.org
Mon Apr 17 06:36:10 BST 2006
Daniel,
I respectfully disagree with Ed Halley on how to handle your problem.
The situation that I hear is this: The subject is a flat surface, the
lens is rectilinear, and the camera moves between shots. It's probably
pointed in slightly different directions too, and at different distances
from the subject surface.
The proper way to handle this is to set a=b=c=0 and optimize d, e, roll,
pitch, yaw, and fov for all images except one anchor. Roll, pitch, and
yaw correct for the camera pointing in different directions, while d, e,
and fov correct for the camera being in different places and distances
from the subject. Assuming that the lens is perfectly rectilinear, the
optimizing process is theoretically exact.
Where things get weird is if your lens is *not* perfectly rectilinear.
In that case, you really need to make two passes over the images -- one
with non-zero a/b/c and whatever d/e you need to correct the distortion
within each image, then a second as described above with a=b=c=0, to
stitch the corrected images together. The d and e parameters serve
completely different purposes in the two passes.
I have pored over the mathematics of this process to convince myself
that it really is right, and I have used it several times to stitch
pictures of public maps and murals that did not lend themselves to being
shot from a single position. Those experiences were with PTGui, not
Hugin, but the underlying issues are the same.
One big caution: the process works only if the subject is planar. If
the subject is not planar, all bets are off about correcting for changes
in camera position.
One last hint: I have found it helpful to include some horizontal and
vertical controls, scattered across the panorama, and allowing pitch,
roll, and yaw of the anchor to be optimized as well. This greatly
reduces the risk of getting a panorama that is well stitched but badly
stretched and skewed because the camera was not level and perpendicular
to the subject when the anchor image was shot..
--Rik
Ed Halley wrote:
>
>
> Daniel M. German wrote:
>
>> The panorama is a facade of building, and I walked parallel to the
>> building for each photo. So I want to use x,y shift (d,e).
>
>
> This is not the way to implement an orthographic panorama. The
> general case for panorama stitching is to NOT move between each shot,
> but to collect the whole scene from ONE position. An ortho panorama
> can still be done, but it's not by the use of D and E parameters in
> Hugin. D and E describe the offset from the center of the frame to
> the center of the optic curvature, which is usually pretty good in
> most cameras but can be wrong a bit when you scan film.
>
> To do an orthographic panorama as you discuss, where you move the
> camera along the scene, there are a few threads you might find on Max
> Lyons' tawbaware forums.
>
> Here is ONE thread to get you started, but there are many if you search.
>
> http://www.tawbaware.com/forum2/viewtopic.php?t=962&postdays=0&postorder=asc&start=0
>
>
More information about the ptx
mailing list