How to Easily Remove Lens Distortion from Photos using Gimp

Typically, photographs of textures that contain grid-like patterns such as brick walls or tiled floors are most useful when all of the edges appear straight and parallel to each other. Depending on the camera equipment used and the distance from the surface photographed, a ‘fish eye’ effect can cause the appearance of edges to curve inward or in some cases outward. This can make things difficult when adjusting the texture image for seamless tiling. Luckily for us, Gimp has a quick and easy filter to tune out a photo's lens distortion.

remove lens distortion from brick wall photo
Quickly and Easily Remove Lens Distortion!.

Open up your photograph that needs lens distortion correction in Gimp. We’ll use the brick wall below as an example. Notice how the horizontal lines below bend inward? This would make it challenging for this texture to look good in a seamless tiled scenario.

brick wall with lens distortion
The Original Brick Wall Photo with Lens Distortion.

Out of the box, Gimp contains many useful filters. Navigate to Filters / Distorts / Lens Distortion... to open up the dialog to make adjustments for lens disortion.

gimp lens distortion dialog
Gimp Lens Distortion Filter Dialog

Using the 'Main' slider, begin adjusting it in the negative direction while watching the preview image. Adjust it until the lines in the image begin to look straight and parallel. You can zoom into the preview image if needed. Another very useful slider is the fourth one down, 'Brighten', which is useful for brightening up the corners of the image which can often be darker in the image.

Click ‘OK’ to perform the filter changes on your photograph and review the final image! The horizontal lines should no longer bend inward and the corners are not as dark as they were before. Note that using this filter can cause some of the areas around the edges of the image to be removed in the process.

brick wall without lens distortion
The Corrected Brick Wall Photo!