# Difference between revisions of "Projections"

m (Added transverse mercator image) |
Erik Krause (talk | contribs) m (→Pannini projection) |
||

(42 intermediate revisions by 7 users not shown) | |||

Line 1: | Line 1: | ||

− | Representing a spherical view of the world on a flat computer monitor or print requires some manner of mapping from the 3D spherical scene in which the camera and viewer are embedded to the 2D medium on which they are rendered. The techniques used for mapping are of exactly the same type long used by map makers to project the entire globe, or portions of it, onto two dimensional maps. There is no single, unique projection for representing sections of the sphere on the globe. Instead, all projections have various attributes and limitations. There are many classes of projections used for various purposes (e.g. [http://mathworld.wolfram.com/MapProjection.html | + | {{Glossary|Different possibilities to get a two-dimensional image of the three-dimensional world around us.}} |

+ | Representing a spherical view of the world on a flat computer monitor or print requires some manner of mapping from the 3D spherical scene in which the camera and viewer are embedded to the 2D medium on which they are rendered. The techniques used for mapping are of exactly the same type long used by map makers to project the entire globe, or portions of it, onto two dimensional maps. There is no single, unique projection for representing sections of the sphere on the globe. Instead, all projections have various attributes and limitations. There are many classes of projections used for various purposes (e.g. [http://mathworld.wolfram.com/MapProjection.html Mathworld's Projection Page]), but only a few are traditionally used for panoramic imaging. | ||

− | '''First - a word of warning: If you are looking for a projection, that will map a ( | + | '''First - a word of warning: If you are looking for a single projection, that will map a spherical (even partial) panorama on a flat surface without bending lines: This won't work!''' |

This link explains well why it is impossible: http://www.progonos.com/furuti/MapProj/Normal/CartDef/MapDef/mapDef.html | This link explains well why it is impossible: http://www.progonos.com/furuti/MapProj/Normal/CartDef/MapDef/mapDef.html | ||

+ | Some of the most common projections when working with Panoramic imaging are: | ||

+ | |||

+ | = Cylindrical projections = | ||

+ | |||

+ | Cylindrical projections resemble classic rectangular world maps. The horizontal [[Field of View]] is anything up to 360 degrees, horizontal distance is proportional to pan or [[yaw]] angle, vertical distance is related to the angle above or below the horizon. | ||

+ | |||

+ | == Cylindrical projection == | ||

+ | [[image:big_ben_cylindrical.jpg|thumb|200px|right|[[Cylindrical Projection]] h360° v120°]]This is the projection most commonly used for printed panoramas with a large range of longitude (>120 degrees). It can be envisioned by imagining wrapping a flat piece of paper around the sphere tangent to the equator, and projecting a light out from the center of the sphere. A full range of longitude, up to 360 degrees, can be represented with a cylindrical projection, but near the poles, the images become very distorted, so a full range of latitude cannot be used. See [[Cylindrical Projection]] for more. | ||

+ | {{clr}} | ||

+ | |||

+ | == Mercator projection == | ||

+ | [[image:big_ben_mercator.jpg|thumb|200px|right|[[Mercator Projection]] h360° v140°]] | ||

+ | [[Mercator Projection]] is a ''conformal'' projection. This shows less pronounced distortion than either ''cylindrical'' or [[Equirectangular Projection]] which otherwise look very similar. See [http://mathworld.wolfram.com/MercatorProjection.html mathworld's page] for details | ||

+ | {{clr}} | ||

+ | == Miller projection== | ||

− | + | [[image:Ben_Miller_cylindrical.jpg|thumb|200px|right| h360° v147°]] | |

+ | Miller is similar to [[#Mercator projection|Mercator projection]] but with slightly more compression at the top and bottom of the image, this distortion is less pronounced than [[Equirectangular Projection]] making it a good format for printing. | ||

+ | {{clr}} | ||

== Equirectangular projection == | == Equirectangular projection == | ||

− | [[image:big_ben_equirectangular.jpg|thumb|200px|right|[[Equirectangular Projection]]]] | + | [[image:big_ben_equirectangular.jpg|thumb|200px|right|[[Equirectangular Projection]] h360° v180°]] |

Also called the "non-projection", this is a representation of the sphere which maps longitude directly to the horizontal coordinate, and latitude to the vertical coordinate. This projection is often used for the source images in panoramic viewers like [[PTViewer]]. See definition for [[Equirectangular Projection]] for more. | Also called the "non-projection", this is a representation of the sphere which maps longitude directly to the horizontal coordinate, and latitude to the vertical coordinate. This projection is often used for the source images in panoramic viewers like [[PTViewer]]. See definition for [[Equirectangular Projection]] for more. | ||

{{clr}} | {{clr}} | ||

− | == | + | == Lambert cylindrical equal area == |

− | [[image: | + | |

+ | [[image:Ben_Lambert_cylindrical_equal_area.jpg|thumb|200px|right|h360° v180°]] | ||

+ | This projection is 'equal area', making it very compact and suitable for purposes where distortion isn't important, similar to [[#Sinusoidal projection|Sinusoidal projection]]. | ||

{{clr}} | {{clr}} | ||

+ | |||

+ | = Azimuthal projections = | ||

+ | |||

+ | Azimuthal projections have rotational symmetry around the centre of the image, these are the kind of images that are produced by the various kinds of camera lens. | ||

== Rectilinear projection == | == Rectilinear projection == | ||

− | [[image:big_ben_rectilinear.jpg|thumb|150px|right|[[Rectilinear Projection]]]] | + | [[image:big_ben_rectilinear.jpg|thumb|150px|right|[[Rectilinear Projection]] h110° v110°]] |

− | This is a fundamental projection which can be envisioned by imagining placing a flat piece of paper tangent to a sphere and projecting a light out from its center. Obviously, only | + | This is a fundamental projection which can be envisioned by imagining placing a flat piece of paper tangent to a sphere and projecting a light out from its center. Obviously, only less than 180 degrees of longitude can be represented with this projection (exactly 180 degrees would require an image of infinite width), and in practice, far less. |

+ | |||

+ | Most non-fisheye cameras produce a nearly rectilinear image over their field of view (albeit with varying amounts of unavoidable [[Lens_distortion|distortion]]). The Rectilinear projection is often used for prints of panoramas which cover less than ~120 degrees of longitude, since straight lines are preserved. See [[Rectilinear Projection]] for more. | ||

{{clr}} | {{clr}} | ||

− | == | + | == Stereographic projection == |

− | [[image: | + | [[image:big_ben_stereographic.jpg|thumb|150px|right|[[Stereographic Projection]] h180° v180°]] |

− | + | [[Stereographic Projection]] is a ''conformal'' form of [[Fisheye Projection]] where the distance from the centre is ''not'' equivalent to the spatial angle. This is much easier on the eye for printing and display purposes. | |

+ | |||

+ | Stereographic is limited to a maximum horizontal (and vertical) angle of 360 degrees, images over 330 degrees are pretty, but not very usable. | ||

{{clr}} | {{clr}} | ||

== Fisheye projection == | == Fisheye projection == | ||

− | [[image:big_ben_fisheye.jpg|thumb|150px|right|[[Fisheye Projection]]]] | + | [[image:big_ben_fisheye.jpg|thumb|150px|right|[[Fisheye Projection]] h180° v180°]] |

In a [[Fisheye Projection]], the distance from the centre of the image to a point is proportional to the equivalent spatial angle. | In a [[Fisheye Projection]], the distance from the centre of the image to a point is proportional to the equivalent spatial angle. | ||

{{clr}} | {{clr}} | ||

− | == | + | == Equisolid projection == |

− | [[image: | + | [[image:Ben_Equisolid.jpg|thumb|150px|right|h360° v360°]] |

− | [[ | + | This closely resembles a photograph of a mirrorball. Features are 'equal area' making it suitable for applications where distortion isn't critical. Equisolid is apparently the same as 'Lambert equal area azimuthal' cartographic projection. |

− | + | {{clr}} | |

+ | |||

+ | == Orthographic projection == | ||

+ | [[image:Ben_Orthographic.jpg|thumb|150px|right|h180° v180°]] | ||

+ | This is the view of a sphere, with a panorama mapped to the outside, seen from a far distance. | ||

+ | {{clr}} | ||

+ | |||

+ | = Other projections = | ||

+ | |||

+ | == Cubic projection == | ||

+ | [[image:big_ben_cubic.jpg|thumb|200px|right|[[Cubic Projection]] h90° v90° per cubeface]] | ||

+ | Technically a sub-case of the [[Rectilinear Projection]], the cubic projection is used as the source projection for fully spherical [[Quicktime]] VR panoramas. See [[Cubic Projection]] for more. | ||

+ | {{clr}} | ||

− | == | + | == Sinusoidal projection == |

− | [[image: | + | [[image:bin_ben_sinusoidal.jpg|thumb|200px|right|[[Sinusoidal Projection]] h360° v180°]] |

− | [[ | + | [[Sinusoidal Projection]] is an ''equal area'' projection which makes it suitable for transmission of spherical images, as supported by the [[DevalVR]] viewer. |

− | + | {{clr}} | |

== Transverse mercator projection == | == Transverse mercator projection == | ||

− | [[image:big_ben_transverse_mercator.jpg|thumb|100px|right|[[Mercator Projection|Transverse Mercator Projection]]]] | + | [[image:big_ben_transverse_mercator.jpg|thumb|100px|right|[[Mercator Projection|Transverse Mercator Projection]] h147° v360°]] |

− | This is a [[Mercator | + | This is a [[#Mercator projection|Mercator projection]] rotated 90 degrees, suitable for a long vertical image. |

− | + | ||

+ | Transverse mercator is limited to a maximum horizontal angle of 180 degrees, though in practice images over 150 degrees are not very usable. | ||

+ | {{clr}} | ||

+ | |||

+ | == Pannini projection == | ||

+ | [[image:Ben_Equirectangular_panini.jpg|thumb|220px|right|h180° v110°]] | ||

+ | The Pannini projection, also known as 'Recti-Perspective', 'Panini' or 'Vedutismo', keeps verticals vertical and radial lines straight. This can impart a strong sense of correct perspective to wide angle views that have a single central vanishing point. However this projection renders horizontal straight lines as curves. So-called "squeezed" variants reduce or eliminate that curvature, at the expense of bending the ends of long radial lines. | ||

− | == | + | [[The General Panini Projection]] is an adjustable version that can zoom continuously from rectilinear, through the standard Pannini projection, to the even more compressed orthographic cylindrical projection. It was introduced in early 2009 in the Panini panorama viewer. The version implemented in the PanoTools library in early 2010 also offers two generally useful flavors of squeeze. |

+ | |||

+ | There were two earlier implementations in the PanoTools library, 'panini', which is actually not the Pannini projection but a very similar compressed cylindrical projection, and 'equirectangular panini', which is the standard Pannini, or stereographic cylindrical, projection. | ||

+ | |||

+ | {{clr}} | ||

+ | |||

+ | == Architectural projection == | ||

+ | [[image:Ben_Architectural.jpg|thumb|200px|right|h360° v152°]] | ||

+ | This is [[#Miller projection|Miller projection]] above the horizon and [[#Lambert_cylindrical_equal_area|Lambert Equal Area projection]] below. Suitable for scenes where the the ground isn't very interesting. | ||

+ | {{clr}} | ||

− | + | = External links = | |

+ | * Description of panoramic image projections - http://www.cambridgeincolour.com/tutorials/image-projections.htm | ||

+ | * Two talks from the 2009 [[Panotools Meeting]] by the ''panotwins'' with a comparison of projection types: | ||

+ | :Introduction http://pt2009.panobotics.de/index.php?id=163 | ||

+ | :Talk #1 by Markus http://pt2009.panobotics.de/index.php?id=164 | ||

+ | :Talk #2 by Jürgen http://pt2009.panobotics.de/index.php?id=165 | ||

[[Category:Glossary]] | [[Category:Glossary]] |

## Revision as of 12:16, 22 June 2010

Representing a spherical view of the world on a flat computer monitor or print requires some manner of mapping from the 3D spherical scene in which the camera and viewer are embedded to the 2D medium on which they are rendered. The techniques used for mapping are of exactly the same type long used by map makers to project the entire globe, or portions of it, onto two dimensional maps. There is no single, unique projection for representing sections of the sphere on the globe. Instead, all projections have various attributes and limitations. There are many classes of projections used for various purposes (e.g. Mathworld's Projection Page), but only a few are traditionally used for panoramic imaging.

**First - a word of warning: If you are looking for a single projection, that will map a spherical (even partial) panorama on a flat surface without bending lines: This won't work!**

This link explains well why it is impossible: http://www.progonos.com/furuti/MapProj/Normal/CartDef/MapDef/mapDef.html

Some of the most common projections when working with Panoramic imaging are:

# Cylindrical projections

Cylindrical projections resemble classic rectangular world maps. The horizontal Field of View is anything up to 360 degrees, horizontal distance is proportional to pan or yaw angle, vertical distance is related to the angle above or below the horizon.

## Cylindrical projection

This is the projection most commonly used for printed panoramas with a large range of longitude (>120 degrees). It can be envisioned by imagining wrapping a flat piece of paper around the sphere tangent to the equator, and projecting a light out from the center of the sphere. A full range of longitude, up to 360 degrees, can be represented with a cylindrical projection, but near the poles, the images become very distorted, so a full range of latitude cannot be used. See Cylindrical Projection for more.

## Mercator projection

Mercator Projection is a *conformal* projection. This shows less pronounced distortion than either *cylindrical* or Equirectangular Projection which otherwise look very similar. See mathworld's page for details

## Miller projection

Miller is similar to Mercator projection but with slightly more compression at the top and bottom of the image, this distortion is less pronounced than Equirectangular Projection making it a good format for printing.

## Equirectangular projection

Also called the "non-projection", this is a representation of the sphere which maps longitude directly to the horizontal coordinate, and latitude to the vertical coordinate. This projection is often used for the source images in panoramic viewers like PTViewer. See definition for Equirectangular Projection for more.

## Lambert cylindrical equal area

This projection is 'equal area', making it very compact and suitable for purposes where distortion isn't important, similar to Sinusoidal projection.

# Azimuthal projections

Azimuthal projections have rotational symmetry around the centre of the image, these are the kind of images that are produced by the various kinds of camera lens.

## Rectilinear projection

This is a fundamental projection which can be envisioned by imagining placing a flat piece of paper tangent to a sphere and projecting a light out from its center. Obviously, only less than 180 degrees of longitude can be represented with this projection (exactly 180 degrees would require an image of infinite width), and in practice, far less.

Most non-fisheye cameras produce a nearly rectilinear image over their field of view (albeit with varying amounts of unavoidable distortion). The Rectilinear projection is often used for prints of panoramas which cover less than ~120 degrees of longitude, since straight lines are preserved. See Rectilinear Projection for more.

## Stereographic projection

Stereographic Projection is a *conformal* form of Fisheye Projection where the distance from the centre is *not* equivalent to the spatial angle. This is much easier on the eye for printing and display purposes.

Stereographic is limited to a maximum horizontal (and vertical) angle of 360 degrees, images over 330 degrees are pretty, but not very usable.

## Fisheye projection

In a Fisheye Projection, the distance from the centre of the image to a point is proportional to the equivalent spatial angle.

## Equisolid projection

This closely resembles a photograph of a mirrorball. Features are 'equal area' making it suitable for applications where distortion isn't critical. Equisolid is apparently the same as 'Lambert equal area azimuthal' cartographic projection.

## Orthographic projection

This is the view of a sphere, with a panorama mapped to the outside, seen from a far distance.

# Other projections

## Cubic projection

Technically a sub-case of the Rectilinear Projection, the cubic projection is used as the source projection for fully spherical Quicktime VR panoramas. See Cubic Projection for more.

## Sinusoidal projection

Sinusoidal Projection is an *equal area* projection which makes it suitable for transmission of spherical images, as supported by the DevalVR viewer.

## Transverse mercator projection

This is a Mercator projection rotated 90 degrees, suitable for a long vertical image.

Transverse mercator is limited to a maximum horizontal angle of 180 degrees, though in practice images over 150 degrees are not very usable.

## Pannini projection

The Pannini projection, also known as 'Recti-Perspective', 'Panini' or 'Vedutismo', keeps verticals vertical and radial lines straight. This can impart a strong sense of correct perspective to wide angle views that have a single central vanishing point. However this projection renders horizontal straight lines as curves. So-called "squeezed" variants reduce or eliminate that curvature, at the expense of bending the ends of long radial lines.

The General Panini Projection is an adjustable version that can zoom continuously from rectilinear, through the standard Pannini projection, to the even more compressed orthographic cylindrical projection. It was introduced in early 2009 in the Panini panorama viewer. The version implemented in the PanoTools library in early 2010 also offers two generally useful flavors of squeeze.

There were two earlier implementations in the PanoTools library, 'panini', which is actually not the Pannini projection but a very similar compressed cylindrical projection, and 'equirectangular panini', which is the standard Pannini, or stereographic cylindrical, projection.

## Architectural projection

This is Miller projection above the horizon and Lambert Equal Area projection below. Suitable for scenes where the the ground isn't very interesting.

# External links

- Description of panoramic image projections - http://www.cambridgeincolour.com/tutorials/image-projections.htm
- Two talks from the 2009 Panotools Meeting by the
*panotwins*with a comparison of projection types:

- Introduction http://pt2009.panobotics.de/index.php?id=163
- Talk #1 by Markus http://pt2009.panobotics.de/index.php?id=164
- Talk #2 by Jürgen http://pt2009.panobotics.de/index.php?id=165