Difference between revisions of "Barrel distortion"

From PanoTools.org Wiki
Jump to navigation Jump to search
m (categorised)
m (Prepared for new glossary template)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{Glossary|A distortion produced by the lens itself which causes straight lines to be bent outwards.}}
 
'''Barrel distortion''' is the opposite of [[pincushion distortion]], it is a radial image distortion
 
'''Barrel distortion''' is the opposite of [[pincushion distortion]], it is a radial image distortion
 
introduced by the lens itself.
 
introduced by the lens itself.
 +
 +
It is a common [[Lens distortion]] that can be corrected by the [[lens correction model]] of panotools.
  
 
[[Image:Barrel-distortion.jpg|frame|none|A photograph showing exaggerated barrel distortion]]
 
[[Image:Barrel-distortion.jpg|frame|none|A photograph showing exaggerated barrel distortion]]
 
== Panorama Tools a, b & c parameters ==
 
 
The [[Panorama Tools]] a, b & c parameters correspond to a third-order
 
radial polynomial describing radial lens distortion. It is never exact,
 
but can give a pretty good approximation to the real behaviour of a
 
given lens.  The parameters are used by various tools to correct both
 
'''barrel distortion''' and [[pincushion distortion]].
 
 
There are a number of ways to determine the a, b, c and [[field of view|fov]]
 
parameters for a particular lens/camera combination:
 
 
* Taking a single photograph of a rectangular object, selecting lots of horizontal and vertical control points, then optimising [[roll]], [[pitch]], [[yaw]], [[field of view|fov]], a, b & c. You need to set the output format to [[Rectilinear Projection]] for this technique to work.  The process is similar to this [http://hugin.sourceforge.net/tutorials/architectural/ hugin architectural tutorial]:
 
 
* Taking two or more overlapping photographs and selecting lots of normal control points, then optimising [[roll]], [[pitch]], [[yaw]], [[field of view|fov]], a, b & c. This technique works with any output [[Projections|projection format]]  (note that to get a really accurate measure of the [[field of view]], you have to take a full 360 degree panorama).
 
 
* Using a tool such as [[PTLens]] or [[clens]] to read the [[JPEG]] [[EXIF]] data and correct the image automatically by looking up the lens in an existing database.
 
 
The fov, a, b & c parameters are fairly consistent between shots
 
with the same camera/lens combination so you can use them again and
 
again.  Though they ''can'' vary slightly depending on the
 
focus distance, so many panographers tend to recalculate
 
them for every stitch as part of their normal workflow.
 
 
The a & c parameters control distortion at the centre and edges of
 
the picture so are not very important, you can normally just zero
 
them and use the b parameter by itself.
 
 
See also [http://www.path.unimelb.edu.au/~dersch/barrel/barrel.html Helmut Dersch's barrel distortion page].
 
 
== Tools to correct barrel distortion ==
 
 
* The original [[PTStitcher]] can be scripted to batch process images with known a, b & c parameters.  It can also be operated with one of the [[GUI front-ends]].
 
 
* [[nona]] or [[nona_gui]] (both part of the [[hugin]] distribution) can be used identically to [[PTStitcher]].
 
 
* The Correct filter in the [[Panorama Tools Plugins]] for the [[gimp]] or [[photoshop]] uses the same a, b & c parameters as [[PTStitcher]].  Note that it doesn't know about d & e parameters and uses 'd' as an overall scaling factor instead.
 
 
* [[PTLens]] is a [[Photoshop]] plugin and a stand-alone Windows tool that uses the same a, b & c parameters and comes with a database of popular lenses.
 
 
* [[Clens]] is a command line version of [[PTLens]].
 
 
* [[Gimp wideangle plugin]] uses a different formula altogether to correct distortion.
 
 
* [[Gimp phfluuh plugin]] is another tool that corrects lens distortion using yet another formula.
 
 
* [[CamChecker]] is a tool for automatically determining lens distortion and generates a different set of parameters from everything else.
 
 
* [[zhang_undistort]] is a tool distributed with [[hugin]] that uses [[CamChecker]] parameters to actually correct distortion.
 
 
[[Category:Glossary]]
 
[[Category:Glossary]]

Latest revision as of 00:07, 18 November 2007


Barrel distortion is the opposite of pincushion distortion, it is a radial image distortion introduced by the lens itself.

It is a common Lens distortion that can be corrected by the lens correction model of panotools.

A photograph showing exaggerated barrel distortion