"For flat panoramas, the pixel location is based on the tangent of the angle from the image center"
told me Kevin, aka Kekus, from the Panotools-plugins (Mac)
That's correct, a rectilinear projection will try to project on a flat surface, which means that for an ultra wide angle projection things will be stretched towards infinity when we appoach a 180degree field of view. Generally, a 100-120 degrees FOV is considered the maximum for a realistic rendering, unless the viewing distance is relatively short. When we view a flat plane at an oblique angle, the exaggerated perspective is restored (e.g. signs on the road).
So now, I'm looking for a app/plugin to calculate this back, any idea?
It's clear, that it doesn't works for 180 degs, aka infinity.
But how about some settings for 110, 120 degs, 130 degs, 140 degs?
Unfortunately, especially for architecture with straight egdes, the only way to keep all straight edges straight is by using the rectilinear projection. When we only have to deal with vertical edges, we can use a cylindrical projection, but that will start to 'distort' the horizontal edges and lines into curves as we depart from the 'horizon'.
So, when we have to cover such wide angles of view, there are 2 possible 'cures' (which can be used simultaneously). However, anything other than rectilinear projection,
will introduce distortions, although some distortions are preferred over certain others.
1. Although not always practical, reduce the viewing distance
or increase the output size. When the output size versus the viewing distance maintains the same ratio as the physical shooting (sensor) size versus the focal length, then the observed perspective will be identical, i.e. correct. When we cannot (fully) achieve that scenario, then we need to (re)introduce some distortion.
2. Distortion can be done during the stitching/blending phase, and that's preferred because we'll lose less quality. Alternatively we can re-introduce some distortion as a second resampling operation, but this will probably lose additional FOV coverage
and some image quality due to the two stage resampling.
If we have to resort to introducing some deliberate distortion because we cannot match the viewing distance/focal length ratio in our output size, then we need to use a projection method other than rectilinear. Depending on the subject, there are different candidates that produce better looking results than others. A method I occasionally use, is the
Mercator projection, but not all stitching programs offer it as an option. Programs based on "Panotools" generally do offer it, including multiple others. Unfortunately Autopano Pro is lacking in this respect.
I would even install ImageMagick for it:
ImageMagick: Image calculator: apply a mathematical expression to an image or image channels.
Does it works with entire images as well? In 16 bit?
Although I wouldn't recommend multistep distortions/resampling, ImageMagick would allow to distort the stitched image. However, because ImageMagick tries to apply the image math as correct as possible (incl. 16-bit/channel or more, depending on the version), it is going to be very slow on such very large files. It has a distort command which works similar to Photoshop's displace filter, and a very slow "-fx" command option that allows to apply mathematical manipulations.
Bart