Guide to panoramic photography
Généralités sur la panoramic photography Stitching a panorama Create a virtual tour Reviews equipment and software Links, books, DVD, VOD

Updated on December 17, 2016

Correction of optical distortions

There are two reasons why your pictures might not get stitched correctly: a wrong setting of the entrance pupil and maybe even more optical distortions of your lens or zoom lens. This is due to the shape of your lens, the aspheric lens. Here is how to know and correct it...

Comparaison entre deux photos avec et sans distorsions optiquesAfter the nadir and the correction of over-exposed windows seen in the previous page - edits before stitching - the most important edit to make, always before stitching the photos, is the correction of optical distortions, at least for most stitching software. Indeed, images optical distortions are often such that stitching software really has a hard time stitching together two consecutive photos, even the best like Autopano Giga until its version 2.5 (problem now solved since version 2.6) and PTGui and that, even if the camera was correctly set at the entrance pupil.

The key points if you're a beginner...

Here are the key points to remember about optical distortions. The rest of this page is aimed at those who want to learn more.


A stitching problem because of a distortion problem really looks like a problem of entrance pupil setting. Some horizontal elements don't stitch perfectly.

Lens Correction in Camera Raw or Lightroom is often very efficient to correct a good number of optical distortions complicated to stitch.

Autopano Giga 4.2 and PTGui 10.0 are really very good nowadays to get rid of distortions problems. If you use this software, this problem won't bother you so often. So if you're using them, do look into the setting of the entrance pupil if you're experiencing stitching problems (or use the ramsac Homography model in Autopano).

Next key points: Panorama stitching suivre




Why you should choose a recent version of your favorite stitching software

Two striking evolutions in Autopano 2.6 and 3.5!

Nikkor 10,5 mm DXSince Autopano Giga version 2.6 and maybe even more with the very last version 3.7, one of the new features, which is a major one according to me, is the introduction in stitching algorithms of a correction of complex lens distortions like short focals often suffer from. IT IS FINALLY POSSIBLE TO STITCH SHORT FOCALS (ALMOST) PERFECTLY FOR THE MOST PART OF THEM.

Some lenses that didn't stitch at all like 14 mm now stitch more than correctly. There are still a few Photoshop edits but it is nothing compared to the previous versions and other stitching software. Some other lenses, zoom lenses, short focals that just stitched correctly now stitch perfectly. Almost a miracle!

My recommendation! when a panorama isn't well-stitched, so horizontal or vertical lines don't match perfectly, it is impossible to know whether it comes from a problem of complex distortions that the stitching software can't correct or if it's a parallax problem hence a wrong position of the camera at the entrance pupil. You can only know it if you're absolutely certain to have set your panoramic head at the entrance pupil of your lens perfectly.

Even if certain pieces of software can very well correct a classic distortion, simple from a mathematical point of view, a barrel distortion most of the time and even quite pronounced, numerous lenses are unfortunately cursed with distortions called "moustache distortion" or even "cop hat" which are really hard to correct and put numerous pieces of stitching software on their knees. And it really gets complicated when you add the naturally deformed shape of photos shot with a fisheye lens, full format or circular. Indeed, in this situation, you might say that a fisheye lens has two characteristics:

  • Photo prise au fish-eye circulaireOn the one hand a deformation of the image in fisheye, representing the most visible deformation, whether the lens is a full-format or circular fisheye, as in the image over here.
    The fisheye deformation doesn't need to be corrected to be stitched with most good stitching pieces of software nowadays. Camera Raw of Photoshop knows how to transform these images in orthoscopic ones, however.
  • On the other hand, "hidden" hidden behind the fisheye aspect and more vicious, a residual distortion, still in barrel, pin-cushion or moustache, hence invisible to the naked eye and that can be a real headache for stitching software if it's a moustache distortion. As for classic lenses.


Important remarks

Nikkor 10,5 mm DXWhether your virtual tour is stitched from photos shot with a fisheye or not, if your stitching software can't stitch them correctly AND you've checked the entrance pupil of your lens, it is sure that your lens has pronounced moustache distortions - most likely because of aspheric lenses -.
In certain cases, it reaches such a level that it's better to change lens to shoot the photos of the virtual tour. You'd spend too much time editing them in Photoshop... or change stitching software.

Some pairs camera / fisheye lens really proved themselves now and stitch very well directly, almost without Photoshop edits after the final stitching. It is the case of the pairs Nikon D5300, D7200, D300 + Nikkor 10.5 mm DX fisheye or, with Canon and noticeably more expensive, of the pair 5D Mark III / IV + 8-15 mm fisheye. The Samyang 8mm fisheye is also a good surprise.

Old belief... fisheye lenses, despite what you could believe, stitch very well and always better than very short focals like 14 mm. A word to the wise is enough!

So here are a few leads but before, let's see more precisely what an optical distortion is...



Optical distortions?

Certain wide-angle lenses distort the edges of the image in a shape of "pincushion", "barrel" or even "moustache". So the edges of the images are either curved outwards in barrel (1), either inwards in pincushion (2), or a bit of each in moustache (3) as shown in the pictures below.


Distorsions optiques en barillet, coussinet et moustache


In two consecutive pictures, the optical error will be opposite. It's impossible for a photo stitching software to combine these two photos without a previous correction of this distortion because only two spots - at the junctions - are superimposed. The whole overlap zone should theoretically be completely blurred but it's not the case most of the time.


Barel distortion


In the best case, some stitching pieces of software take it into account and this is why they come with a database on every digital camera on the market - including of course regular updates to take newcomers into account! -. Before stitching the images, the software will thus ask you with what camera the pictures were taken, unless it detects it automatically by reading the Exif data of the files.
In the case of numerous lenses, the distortions are really very important and it's essential to take them into account during the stitching process. With these lenses, when the photos stitch poorly and unlike one could think, it won't necessarily be a parallax problem hence of entrance pupil or nodal point but really of distortions. In most other cases, these distortions must absolutely be corrected before opening the pictures in the stitching software... whenever possible! There are few cases when, even a bit distorted, the images are stitched correctly because their distortion is "sane" hence simple.



Objectif Olympus 11-22 mmAs an example, I'll take a case I've experienced with the lenses of the Olympus E1, E5, 500 or 330 and Autopano Pro 1.42. That's when I became aware of the problem and found solutions. Let's take the two wide-angle lenses I had: the 14-54mm and the 11-22 mm at 14 mm (thus equivalent to 28 mm).

With the 14-54 mm zoom lens at 14mm, the moustache distortion were so important that Autopano Pro alone was unable to correct them. The stitching was of poor quality.
With the 11-22 mm zoom lens at 14 mm, the barrel distortions were still there, but they were simple (without moustache) and Autopano Pro could correct them very well and realize a very good stitching.





Correction of optical distortions

For several years I tried any tool allowing to correct optical distortions before stitching. I was never satisfied: DXO, PTLens,... and when Photoshop CS5 was released I had a nice surprise: Lens Correction. However, even if it's a nice surprise when you shoot your photos with a classic lens, it's different wwwith a fisheye lens. Here's why...

Lens correction from Camera Raw 6.1 and next...

Onglet Lens COrrection de Camera Raw de CS5Since the CS5 version of Photoshop and 3 of Lightroom, Camera Raw or the module of development come with a new correction tool of the main lenses defects: vignetting, chromaticism and above all distortions. (called Deformation). All of this is part of the workflow in Raw which is a godsend! The sixth tab "Lens corrections" (1) is thus now doubled: the former tab of manual correction and this new tab "Profile" (2) gathering the registered profiles in a database. This base doesn't have all the lenses on the market yet, even though it already has lots but when it's the case, it's very efficient... To know it, you only have to click the button "Activate profile corrections of the lens" (3). If the lens is in the database, the data will appear automatically in the Lens profile (4). And if it's a fisheye lens, you see the image deform right away and become not a fisheye image but an orthoscopic one! The deformation cursor (5) reaches 100 then.
Tip! To create virtual tours, you need all the raw material of the photo not to need to shoot two ranges of photos and you should absolutely not correct the fisheye deformation of the photo. EVEN if this tool were to correct both deformations and residual distortions, since you can't select one or the other, I turn the deformation correction off by placing the deformation cursor (5) on 0. So that's why having a fisheye lens that stitches very well is important, because you can still benefit from the automatic correction of vignetting, essential, and of chromaticism, as essential.

Tip! Camera Raw can also develop JPEG files; this distortions, vignetting and chromaticism correction can thus be applied to all your photos!

Fun facts!

Objectif Canon 17-40mmI worked for a long time with this Canon 17-40mm lens. There were many advantages and one big drawback. This lens was one of the first Canon lenses to benefit from the new anti-reflective coating from the last lens (towards the sensor), so important in digital photography because digital sensors are way more reflective than films and thus subjects to flare. Secondly, it allowed me to work with two focals I like: the 17 mm and above all, when I'm trying to realize panoramas by stitching, the 35mm. Yet this lens has a big disadvantage: it comes with aspheric lenses creating moustache image distortions! For a long time, I tried different kinds of software such as DXO or PTLens to correct the distortions BEFORE stitching but that was of no use. With Lens Correction, it works! I changed lens ever since but when I'm trying to stitch old photos, I don't have the issues I was facing some time ago.

New! Finally, and paradoxically, at the time when there are finally distortions correction solutions that work, my favorite stitching software Autopano Giga just added in its new version 2.6, an automatic correction of complex distortions that works almost by magic WITHOUT correcting the distortions previously! We really live in a woderful time...!

About efficiency of distortions correction software!

It's impossible to know beforehand if PTLens, Lens Correction or another distortions correction software will or will not be efficient to edit your lens' distortions before stitching in your stitching software. If you get the impression - though real! - to the naked eye that the software is straightening out fine all straight lines from one photo, you notice that the efficiency of this correction, once the photo stitched, is often close to non-existent. This remark is even more accurate if you shot a geometric subject or an interior.
Most of the time indeed, the straightening is only performed to line up the items on one single line or to straighten slightly curved lines. But homothety of the distances on this now corrected straight line isn't respected. The stitching is of poor quality because too complicated to edit in Photoshop hence useless.
There are cases when correction is formidable - even essential - and works perfectly and others when nothing ever comes out of it. To make a high-def, quality stitching, you're thus only left with the option to change lens... unless you're using
Autopano Giga / Pro 4.2 which features new stitching algorithms correcting strong distortions, even in cop hat or moustache. It is a major evolution, believe me!

A few examples...

Here are a few examples of pairs digital camera / lens / correction software and what I could note BEFORE the release of Autopano Giga 2.6 (if you use this last version, all pairs can now be stitched, and often perfectly):

Hasselblad H3D 31 / 28 mm / Phocus: Corrections possible in the dedicated Phocus software but uninteresting when it comes to the quality of the panoramic stitching. A friend bought the 35 mm which stitches better than the 50 mm.
Nikon D7100/D7200 or D300 / 16-85mm DX Nikkor at 16 mm / DXO: possible corrections but uninteresting. Similar poor stitching quality.
Nikon D7100/D7200 or D300 / 10.5 mm DX Nikkor FE: stitching almost perfect without distortions correction. One of the ideal pairs!
Canon 70 D / 8.5 mm Sigma FE: poor quality of stitching without correction.
Canon 5D Mark III / 8-15 mm Canon FE : very good - maybe even perfect - stitching without distortions correction. Other ideal pair, though expensive!
Nikon D7100 /D7200 / D300 / 17-55mm F2.8 DX at 17 mm: poor quality of stitching without correction.
Samyang 8 mm fisheye lens (multiclips): especially good stitching. It is really surprising for a lens under 300 €. There's just a slight lack of sharpness that can be fixed by over-accentuating the files though.

Objectifs Canon 8-15 mm Fish eye et Nikkor 10,5 mm DX

Clearly, these remarks are especially valid with the old versions of Autopano Giga (2.5 and previous) and the most part of other stitching pieces of software, often free because with APG 4.2 or PTGui, stitching problems are really more and more unusual.


In the next page, we'll see the basic principles of spherical stitching as well as a list of stitching software - 360 panorama stitching Suivre

Next page 12/14 : 360 panorama stitching suivre

  VR-Drive II

New PanoBook Kolor


  Learn more about this book

New !
Autopano 4.4 Beta 1



Home > Create a virtual tour > Optical distorstion > Next...



This website is almost entirely free and yet almost free of ads. Why? Because they look so bad! It is lucrative though, and enables many websites to keep on living. So I asked myself: what can I do? To keep on developing this website, I'm going to need a regular income just like everyone else. How can I keep on giving access to free information like I've been doing since April 2002?

And I finally found the answer: affiliation. Every time you click on a link from this site to one of my partners' shops, they know you've been referred by me and give me a small percentage on your purchase, be it something I recommend on my website or anything else. Remember to use my links when you shop on these sites! It doesn't cost you anything and it's a win-win deal – for me, them, and you!

  Thanks for your visit and your support!  




Homepage   |   Contents   |   What'new   !   Legal notices   |   Contact me

My FaceBook Page     |   Version française

General information
Virtual tour
Tutorials & reviews