The Pannini Projection



The Pannini projection is a mathematical rule for constructing perspective images with very wide fields of view. It is named in honor of Gian Paolo Pannini, an 18th Century Roman painter and professor of perspective, who may very well have used it to draw spectacular views such as the one above; for it can be realized with drawing instruments almost as easily as the standard rectilinear perspective projection. However it is not now taught in art schools, and was apparently never described in print before its recent rediscovery by a team of open source software developers.



The Pannini projection is now embodied in several software packages for creating and viewing panoramic photographs. In the future it may also be used to create ultra-wide angle television, movies and games.

Examples of the Use of the Pannini Projection

Fine Art Photography

Click on images for larger views / more information.



St. Francis Xavier, 145x85 degrees

Schuylkill River Bridges, 170x85 degrees



Rivelin Valley Bridge, 171 degrees wide

Friends' Arch Street Meeting, 130x60 degrees



Ultra-Wide Video



Video shot with a 180 degree fisheye lens, rendered in modified Panini projection at 170 degrees



Controlling

Wide Angle

Perspective



Ultra-wide Game Views





Videos from a Stills from a flight simulator Videos from a combat game

Published Implementations of the Pannini Projection

PanoTools Library

'panini_general' -- the general Pannini projection described in the 2010 research paper.

'equirectangular panini' -- the basic Pannini (cylindrical stereographic) projection, eye distance fixed at 1.

'panini' -- like the basic Pannini but with an exaggerated vertical scale (a mistake)

Hugin

Panini Panorama Viewer and Perspective Tool

Helmut Dersch's PTStitcherNG

PTStitcherNG is a very fast GPU-based panorama stitcher by the original author of PanoTools. Version 0.7b implements panini_general like libpano13, using the same script commands.





Joost Nieuwenhuis' PTGui



Max Lyons' PTAssembler



Klaus Reinfeld's KRPano

KRPano is a widely used web panorama viewer and publishing software. It provides several alternatives to the standard rectilinear view, including the stereographic and Pannini projections. For example, right-click on the panorama [here].



Thomas Sharpless' Panini-Pro

An ambitious expansion of the original Panini, with higher resolution and local image reshaping tools, published in 2011. Although intended as a commercial product, only a free beta version was ever made available.



Thomas Sharpless' Panini-Video

A commercial video transcoder that applies the general Panini projection, late 2012.

History and Mathematics of the Pannini Projection

Pannini: A New Projection for Rendering Wide Angle Perspective Images

Thomas K. Sharpless, Bruno Postle and Daniel M. German; International Symposium on Computational Aesthetics, London, June 2010.

Numerical Analysis of Paintings

The 1772 Painting of Wyatt's "London Pantheon"

Drawing a Rectilinear Projection

To draw the horizontal aspect of a rectilinear projection, locate the view point on a plan of the scene, and draw a horizontal line representing the picture plane. Transfer each point of the plan to the horizon line along a straight line through the view point. In this example, the vertical aspect is developed by means of straight lines through a vanishing point in the middle of the horizon line, a shortcut that often works for architecture.







Drawing a Pannini Projection

To draw the horizontal aspect of a Pannini projection, add a circle around the view point, representing the intermediate cylindrical image surface. Transfer points from the plan to the circle along straight lines through the view point (red). Then transfer points from the circle to the horizon line along straight lines through a second projection center (blue). Here, the second center is on the surface of the cylinder, giving the standard Pannini projection. Moving it closer to the view point would give less compression, farther away, more compression. Pannini himself used the most compressed form, in which the second set of lines are parallel (second center infinitely distant).









Comparison with Carroll's Method

Carroll, Agrawala and Agarwala [CAA09] present a method for generating ad-hoc projections that can improve the perceptual quality of wide angle images by straightening sets of lines, designated by the user, while minimizing numerical estimates of "distortion energy" like those used by Zorin and Barr [ZB95]. For many images, the method renders plausible perspective views, given a dozen or so suitably chosen control lines; the authors also present some cases in which it failed. More information, including the control line sets used for the example images, [here].

In the following table the first column is one of the original images used by Carroll et. al., the second is the result of their method (cropped), the third is a General Pannini projecton with horizontal and vertical compressions adjusted to match Carroll's result as nearly as possible.

It should be pointed out that the General Pannini image is obtained in real time, by interactive adjustment of just three numerical parameters, while the Carroll method requires skilled placement of the control ines followed by extensive computations.

Original Image Carroll's General Pannini

For the followng images, Carrol et al. considered that their method failed.

Original Image Carroll's General Pannini

Bibliography