Difference between revisions of "The General Panini Projection"

From PanoTools.org Wiki
Jump to navigation Jump to search
(Created page with 'The general Panini projection is an adjustable projection, or more properly a parameterized family of projections, that can render convincing simulated perspectives on fields of ...')
 
Line 8: Line 8:
  
 
== Appropriate Images ==
 
== Appropriate Images ==
The general Panini projection is suitable for subjects that have a lot of architectural content, especially interiors.  It works best for views that have a single central vanishing point -- straight down a city street, or the aisle of a church, for example.  However it is useful for oblique interior views too.  It does not work well on exterior views of large buildings, especially when looking toward a corner of the building.
+
The general Panini projection is suitable for subjects that have a lot of architectural content, especially interiors.  It works best for views that have a single central vanishing point -- straight down a city street, or the aisle of a church, for example.  However it is useful for oblique interior views too.  It does not work well on close-up exterior views of large buildings, especially when looking toward a corner of the building.
  
 
== Visual Effects ==
 
== Visual Effects ==

Revision as of 05:56, 19 January 2010

The general Panini projection is an adjustable projection, or more properly a parameterized family of projections, that can render convincing simulated perspectives on fields of view up to 150 degrees wide, or even wider in some cases. It was first implemented in early 2009 in the panorama viewer, Panini, and in limited form in the panotools library. This page describes the improved version that was added to the library in January 2010.

For best results the general Panini projection should be used interactively: adjust the control parameters until your image looks just right. Much of this discussion assumes you will be using the 'fast' preview window in the 2010 version of hugin for that. However, with experience it is possible to get very nice results with the command line tool, PTmender, as well.


Prerequisites

Your panotools and hugin must have been built after 18 January 2010, from panotools source version SVN 1235 and hugin source version SVN 4911 or later.

Appropriate Images

The general Panini projection is suitable for subjects that have a lot of architectural content, especially interiors. It works best for views that have a single central vanishing point -- straight down a city street, or the aisle of a church, for example. However it is useful for oblique interior views too. It does not work well on close-up exterior views of large buildings, especially when looking toward a corner of the building.

Visual Effects

A Panini perspective seems to combine telephoto and wide angle views in one image. Compared to a rectilinear view of the same width, the center is magnified and depth seems flattened (telephoto effects). At the same time, the field of view can be very wide, without the peripheral distortion (stretching) that is so noticeable when a rectilinear perspective is pushed too far. And somehow the view tends to look even wider than it actually is.

Applications

Distortionless Wide-Angle Photos

One of the best uses of the general Panini projection is simulating rectilinear perspective, without peripheral distortion, on fields of view typical of wide angle to super-wide angle camera lenses, say in the range of 75 to 120 degrees. A comparatively small adjustment to the rectilinear projection is enough, compression 25 to 50%, plus a hard squeeze to straighten prominent transverse lines. The appropriate squeeze strength depends on the inclination of those lines: 100% if they are horizontal, as little as 10% if inclined 45 degrees.

Perspective Views from Fish-Eye Photos

Hugin with the general Panini projection is an excellent 'de-fishing' tool. Load a fisheye image; adjust pitch and roll angles to make the true vertical vertical in the view, then adjust the g.P. parameters for a good perspective.

Tip: if vertical lines look curved in the g.P. view, changing the lens focal length may straighten them. This just means that the fisheye lens model in panotools doesn't match the projection function of your lens very well. For even better results, you could set the lens fov and a,b,c distortion parameters to values that were optimized on a well-aligned spherical panorama made with the same lens.

Ultra-Wide Views from Panoramas

With a properly aligned panorama as the source image, the g.P.p. can be used like any other projection to render views in various directions, but it is best for views where the line of sight is level, not tilted up or down. You can use hugin's cropping feature to eliminate unwanted areas at the top or bottom, however to get a perfectly framed view it is often necessary to crop the rendered image later.

It is often possible to render a convincing view 180 degrees or more wide, where the subject has a strong central perspective.