acapixus01.gif (7718 bytes)


Converting diagonal fisheye images to rectilinear or an other projection
:

Fisheye lenses provide images with a different projection than rectilinear lenses. They have a constant angle of view coverage over the image as opposed to a rectilinear lens that has a constant field of view. One type of projection may be converted to the other using software like RectFish or Panorama Tools.

RectFish is especially useful for circular fisheye lenses, as it warps the circular projection into a rectangular image utilizing the full 180 degree AOV without mapping any of the image outside the final image. 

Panorama Tools is a free plug-in for PhotoShop developed by Helmut Dersch and it can warp images into either a rectilinear, Psphere, or QVTR projection. Download from panotools.sourceforge.net  

Several focal lengths of fisheye lenses exists, but they could be said to fall into three groups:
15 mm fisheye lenses, like the Canon EF 15/2.8 and Sigma EX 15/2.8, are generally referred to as "diagonal fisheyes", as they have an image circle just covering the 42 mm diagonal of a 24x36mm imager
. The Nikon DX 10.5 mm fisheye could also be considered a diagonal fisheye, but the image circle only just covers the 28.3 mm diagonal of (the 1.5X cropping) Nikon digital SLRs. This lens can also be used on other "full frame" Nikon mount cameras but it would not fill the full frame then. Finally there is the Sigma EX 8/4.0 fisheye which projects an image circle that will just fit within the height of an 24x36 imager. Generally, the diagonal angle of view of these lenses are about 180
° - but projected to image circles of different diameters.

Due to the different diameters of imagers of different digital SLRs the utilized angles of view varies with these lenses depending on the camera. The ratio of imager size relative to the size of a full frame imager is generally referred to as the crop factor. Based on this factor cameras for the Canon and Nikon mount (so far) fall into 4 groups:

Crop factor  Cameras 
1 x
1.3 x
1.5 x
1.6 x
Canon EOS 1Ds and film 24x36 format
Canon EOS 1D / 1D mkII
Nikon D1, D1h, D1x, D2
Canon D30 / D60 / 10D / 300D / 20D

To remap images captured with fisheye lenses to rectilinear or any other projection the correct angle of view (AOV) must be given. The horizontal and vertical AOV with common fisheye lenses on these cameras are given in the table below:

Crop factor 1.0 x 1.3 x 1.5 x 1.6 x
Dimension (mm) 35 23.3 27 17.8 23.7 15.5 22.7 15.1
  hAOV vAOV hAOV vAOV hAOV vAOV hAOV vAOV
Sigma 8 mm 180° 180° 180° 137° 180° 120° 175° 117°
Nikon 10.5 mm 180° 148° na na 142° 94° na na
C/N/S 15 mm 142° 94° 109° 72° 97° 63° 92° 61°

Panorama Tools requires the hAOV parameter (in addition to the image dimensions in pixels) in order to convert the fisheye image to an other projection, e.g. rectilinear. This parameter is entered into the inputbox that is incorrectly labelled HFOV (Horizonal Field Of View). This has to be entered according to landscape or portrait shooting mode, i.e. for images shot in portrait orientation vAOV becomes hAOV and vice versa. 

When converting images shot in the horizontal orientation the same hAOV could (should) be entered for both input and output. However, to retain the full image height of images shot in portrait orientation a larger hAOV should be entered for the output image.

Remapping images with an AOV of more than 120° to a rectilinear projection seldom yeild acceptable results as to much stretching will occour. Rather, try to remap to either a QTVR or PSphere projection.

Additional values for Yaw (Left/Right), Pitch (Up/down), and Roll may be entered. The Yaw and Pitch provides the ability to correct perspective, similarly to a (tilt and) shift lens. The Roll provides the ability to correct the horizon.

In the PhotoShop menu press 
Filter > Panorama Tools > adjust > Set button
to access the options dialogue and enter the required
parameters. Below is how the typical settings would look like for a D30 image that is to be converted from fisheye to rectilinear - for simplicity these have been converted using values of either 90° and 60°.

One advantage of using Panorama Tools is that all the remapping filters can be applied to the image in ONE process, reducing the image degrading calculations to a minimum.

Below some examples of the possibilities with Panorama Tools, all shot with Canon D30 and Canon EF 15/2.8.

Pano01a.jpg (23009 bytes)

 

Pano01b.jpg (20172 bytes)

Shopping area, Copenhagen Kastrup Airport
HFOV = 90, Yaw = 0, Pitch = 0, Roll = 0

 

Pano02a.jpg (24000 bytes)

Pano02b.jpg (26555 bytes)

Natural History Museum, London
HFOV = 60, Yaw = 15, Pitch = 7, Roll = 1.5

 

Pano03a.jpg (14650 bytes) Pano03b.jpg (12326 bytes)

Extinct Giant Armadillo, Glyptodon clavipes
Natural History Museum, London
HFOV = 90, Yaw = 0, Pitch = 0, Roll = 0

 

Since the rectilinearization essentially involves magnification at the perimeter and condensation in the center of the image, the resolution of the original image will be unevenly distributed in the resulting image. It is possible to define the size of the resulting image, and if a very large image (relative to the original) is produced most of the original detail can be preserved. If a rather small image is produced, much detail may be lost. In any case, some pixels will be remapped to outside the resulting rectangular crop, leading to a reduction in the utilized number of pixels.

Below are examples of the Central Hall in the Natural History Museum in London. A 2160 x 1440 pixel TIFF image was used for the rectilinearization using a HFOV of 60 (portrait). The resulting image was of the same dimensions. No Yaw, Pitch or Roll was applied. The images below represent crops of the original image located either near the center or near the edge. The crops have been magnified 300% without interpolation. No other post-processing have been applied.


Original Rectilinearized
Center pano_orig_c.jpg (11337 bytes) pano_pano_c.jpg (11719 bytes)
Edge pano_orig_e.jpg (7533 bytes) pano_pano_e.jpg (7142 bytes)

Below some examples of the possibilities with Panorama Tools and RectFish, all shot with Canon 10D and the Sigma EX 8/4.0.

Note that the maximum AOV accepted by the pano12.dll distributed with Panorama Tools is limited to 160°. To utilize the full 180° replace the pano12.dll with a version from the web without this unjustified limitation, e.g. from here.

I have only recently acquired this lens and started to remap images from it. I will provide more information about parameters for this lens shortly, including description of how the imagers on the EOS D30, D60, and 10D are not centred on the optical axis of the lens, and how to deal with this to obtain the best possible remap

 

Frederiksborg Castle, Hillerød, Denmark
Canon EOS 10D + Sigma EX 8 mm 4.0
 

Pano03a.jpg (14650 bytes) Pano03b.jpg (12326 bytes)

Panorama Tools
HFOV = 180, Yaw = 0, Pitch = -3, Roll = 0, PSphere projection
Images cropped 72 pixels at left.
 

Pano03a.jpg (14650 bytes)

RectFish
Images cropped 72 pixels at left.

 


Fishing party eating dinner in pavillon, Hökensås, Sweden
Canon EOS 10D + Sigma EX 8 mm 4.0
 

Pano03a.jpg (14650 bytes) Pano03b.jpg (12326 bytes)

Panorama Tools
HFOV = 180, Yaw = 0, Pitch = -3, Roll = 0, PSphere projection
Images cropped 72 pixels at left.
 

Pano03a.jpg (14650 bytes) Pano03b.jpg (12326 bytes)

RectFish
Images cropped 72 pixels at left.