Barrel and Pincushion

<- Go Back to More Tutorials

Fun With Photos #3

Correcting Barrel and Pincushion Distortion using Corel Photo-Paint.

Introduction to Barrel and Pincushion Distortion

Barrel distortion is a lens effect which causes images to be spherised at their centre displaying a slightly convex curve on straight lines. Barrel distortion is associated with wide angle lenses and only occurs at the wide end of a zoom lens. It is most noticeable when you have a very straight edge near the side of the image frame. Although barrel distortion can be visible sometimes and annoying to some, it is not noticeable in most photographs.

The opposite effect, Pincushion distortion, is a lens effect which causes images to be pinched at their centre. Pincushion distortion is associated with zoom lenses or when adding telephoto adapters and only occurs at the telephoto end of a zoom lens. It is also most noticeable when you have a very straight edge near the side of the image frame.

Due to the compact, and often cheaper nature of their lens systems, most compact analog and digital cameras with zoom suffer from barrel distortion and pincushion distortion.


The Bad News and The Good News.

The BAD news is that Corel Photo-Paint does not have any tools specifically designed to correct problems such as these.

Photo-Paint has a spherize effect tool (Effects > 3D Effects > Sphere) and a Pinch Punch tool (Effects > 3D Effects > Pinch/Punch) but neither of these has the fine adjustment cababilities or the correct algorithm required for the task.



The GOOD news is that there are several excellent, FREE plugins that fix these problems and which work flawlessly with Corel Photo-Paint. Here they are:

1. PanoTools (Panorama Tools Plugin) from Helmut Dersch.
web site, download, ( )

2. Lens Distortion Corrector by Richard Roseman.
web site (see photoshop software section), download .


OK, But there is still a bit more bad news, sorry....

Unfortunately, possibly due to some problem in Corel Photo-Paint versions 9 and 10, the PanoTools plugin will not work properly with versions 9 and 10. BUT IT DOES work perfectly well with Corel Photo-Paint versions 8, 11 and 12+.

HOWEVER, Richard Roseman's Distortion Corrector Tool will work with all versions of Corel Photo-Paint from version 8 onwards. Although this tool does not have all the features and power or PanoTools, it corrects Barrel and Pincushion distortions fairly well.

So in order to correct barrel and pincushion distorion in Photo-Paint correctly, we really need to ujse a plug-in.

Select the plug-in tool you wish to use:

1. PanoTools

2. Lens Distortion Corrector 


Sample Images

Have a look through your image collection to locate an image you need to correct. For the purposes of this tutorial I have provide two images here. If you want to try the technique on my images. click the thumbnail to display the larger working version, then save it to your disk from the browser:


go to top


Helmut Dersch's Free Panorama Tools plugin

Panorama Tools, created by German software writer Helmut Dersch, is suitable for use with Corel Photo-Paint versions 8, 11 and 12+ but does not run correctly in Photo-Paint versions 9 and 10 (reason: unknown). This plugin set allows you to easily and accurately correct for barrel and pincushion distortions as well as other image corrections, panorama creation, remapping and many other tools. For the barrel and pincushion distortion exercises describerd in this tutorial, we will only be using a small fraction of the abilities of this terrific plugin

Panorama Tools for Windows, Mac and Linux, other tools, and all information can be downloaded from : Panorama Tools


Installing the Panorama Tools plugin.

The following instructions refer to installing the plugins for Corel Photo-Paint on Windows (95, 98, Me, 2000, XP...) users. Mac Photo-Paint users please read the Readme file after decompressing the archive.

NOTE: If you use more than one image editor (e.g. + Photo Shop) and want to use Pamorama Tools with all of them, then :

For use in this tutorial, the following files are the only ones you will need: adjust.8bf, correct.8bf, perspect.8bf and remap.8bf

 go to top

The Panorama Tools plugin 'Correct' Function.

For barrel and pincushion distortion compensation we need to use the Correct function in Panorama Tools ( Effects > Panorama Tools > Correct ).



Barrel Distortion Correction of the Sample Images

Here are the steps to correct the barrel distortion in the two sample images.

Open either of the images in Photo-Paint then use Effects > Panorama Tools > Correct.

Sample Image #1:
Radial Shift Settings: a=0, b=-0.016, c=0, and d=1.016. Straight horizon and building.

Sample Image #2:
Radial Shift Settings: a = 0, b = -0.015, c = 0, and d = 1.015

Image #2 also requires a Shear correction. Bring up the Correct dialogue box again, uncheck the Radial Shift checkbox and check the Shear checkbox, then press the Options button for Shear. Use Vertical = -5 Horizontal = 10. Then press OK twice.

To see a small animated version of the corrections for thes two images, click the thumbnails below to open a pop-up box.


REPAIRED SAMPLE IMAGES (rest your mouse over the low-res images below for 5-10 seconds to load and view an animation of the results.)

Click me to see the result
Click me to see the result



Pincushion Distortion Correction using Pano Tools

For our Pincushion Distortion correction example I have chosen image 852093.jps from CDGS 11 CD#4, in the Photos\Architct folder. Images of tall modern buildings photographedat the high end of a zoom lens are excellent cadidates for this type of distortion.

To download this image click on the image thumbnail of Figure 6 to display the full-sized version.

Once you open this image, display the rulers (View > Rulers). Drag a couple of vertical guidelines from the LHS ruler and line them up against vertical lines in the image on both sides. Now the pincushion distortion can be clearly seen.

As mentioned above, to correct pincushion distortion using Panorama Tools > Correct > Radial Shift, the b value must be positive. And the value for d must be such that d + b = 1.

Thus for the sample image:
Radial Shift Settings: a = 0, b = 0.012, c = 0, and d = 0.988

The image still isn't perfect and requires a small amount of cropping. Click on the thumbnail here to view an animation of the result.


REPAIRED SAMPLE IMAGE (rest your mouse over the low-res image below for 5-10 seconds to load and view an animation of the result.)

Now the walls are straight again. After the pincushion distortion correction you will need to crop the image a little to remove the black pixels in the corners and around the edges resulting from the transformation.


 go to top


Richard Roseman's Free Lens Distortion Corrector.

Installation instructions are provided in the PhotoShop section of Richard's web site and from within the downloaded zip file.

Simply place the lenscorrect.8bf file in the Plugins folder of your version of Corel Draw Graphics suite. The plugin will then appear in the menu under Effects > Richard Roseman.

The interface for this plugin is completely different from that of Pano Tools (below)

Lens Distortion Corrector Interface


Description of functions:


Barrel Distortion Correction using the RR Lens Distortion Corrector

1. Load the Barrel Distortion Sample Image #1

2. Ensure your rulers are visible (View > Rulers) then drag a guideline from the horizontal ruler to just above our young lady's head (near the grass horizon). This provides us with a guide to the amount of correction required.

3. Use Effects > Richard Roseman > Lens Distortion Corrector to start the plugin

4. For sample image #1, the 35mm preset does a fairly good barrel correction job. Choose the 35mm preset and press OK. The correction takes a moment or two to process. Use the Undo/redo icons on Photo-Paint's Standard Toolbar to see the differrence, noting the area near your guideline.

5. If you would like to experiment further with this plugin, undo, then open the plugin again and change the Vertical and Horizontal adjusters (try both locked and unlocked states) and see if you can improve the result. I found that a setting of H=10, V=50 with FIT turned on also achieves a good result for this image.

6. Load the Barrel Distortion Sample Image #2.

7. Open the RR Distortion Correction plugin once more. For this image I found that a setting of H=28, V= 7, FIT=off worked quite well. The bottom left of the image is not corrected as well as for this image using Panon Tools but still the result is much better than the original. The image needed a little further work: Clockwise rotation of 0.8 degrees (Image > Rotate > Custom, use maintain size and anti-aliasing on) and cropping to remove the plugin generated black artifact at the bottom.


Pincushion Distortion Correction using the RR Lens Distortion Corrector

1. Load the Pincushion Distortion Sample Image.

2. Ensure your rulers are visible (View > Rulers) then drag guidelines from the vertical ruler and position them about 1cm from each side of the image. This provides us with a guide to the amount of correction required.

3. Use Effects > Richard Roseman > Lens Distortion Corrector to start the plugin. Experiment with the settings. I found that settings of H=-20, V=0, FIT=on achieved a reasonable result but the overall result was not as good as that achieved using Pano Tools. The corrected image still displayed some pincushioning on the bottom left side and cropping was required to remove the introduced black artifact around some of the edges.



So now you do not need to worry too much whether the digital camera you are thinking of purchasing is susceptable to barrel or pincushion distortion, especially if it otherwise has all the features you desire. Now you know that it can be easily corrected using Photo-Paint and some terrific free plugins.

In general I found that although the Richard Roseman Distortion Corection plugin was easier to use than Pano Tools, it was Pano Tools that achieved the best results due to the additional settings not available in the former tool.

Good luck with your barrel and pincushion distortion corrections!

Please have a look at some of the other correction techniques given in this series.


April, 2005.

go to top