Hi,
On 26 Mar 2014 06:41, "Torsten Bronger" wrote:
>
> If I understand the Hugin projection model correctly, the distance
> of a pixel from the image centre r (in real-world coordinates),
> depending of the angle of the incoming light ray with respect to the
> optical axis, is
>
> r(alpha) = f * (a*r^3 + b*r^2 +c*r + 1 - a - b - c) * tan(alpha)
>
> where "tan(alpha)" is for rectilinear lenses, and being replaced by
> other terms of other types of lenses.
>
> However then, the focal length f is wrongly defined. In the
> paraxial approximation, where r and alpha --> 0, you get
It is a long time since I looked at this, and I haven't checked your maths, but this is how I remember it:
The field of view and any calculation of focal length is correct — when a, b & c are zero.
The a, b & c parameters shift pixels radially, so pixels at the sides of a landscape format photo will move. For example a 50° landscape photo will occupy 50° of the output panorama; but if you change a, b or c then the same photo might occupy 52° (or some other value).
The a, b & c parameters are fixed to the narrowest width, so the side pixels of a portrait photo _don't_ move.
This does seem odd, but it is difficult to think of a lens model where there is a simple relationship between horizontal and vertical angle of view for anything other than a simple pinhole camera. The panotools model has an advantage that you can use the same distortion parameters for portrait and landscape images taken with the same setup.
--
Bruno