Will this title scare more people away than catch by curiosity? Who knows…..
The barrel distortion that gave me such problems last week is removed by using a built in filter for correcting (or simulating) lens distortions. You can find it in the image menu at Filters/Distorts/Lens Distortion.
As I have a lot of images with this error, I go out and write a special Python plugin to do this task. It’s not as complicated as it seems – I have a good template and the Web and Gimp give a lot of useful information. You can find the scripts used in this episode here on the Download Page
This is the finished Python program:
from gimpfu import *
def remove_barrel_distortion(img, drw):
layer_corr = drw.copy(True)
layer_corr.mode = NORMAL_MODE
layer_corr.name = “Barrel corrected”
pdb.plug_in_lens_distortion(img, layer_corr, 0.0, 0.0, -12.0, 0.0, 0.0, 0.0)
“Removes the barrel distortion of a Sanyo CA65″,
“Rolf Steinort <info @meetgimp.org>”,
“<image>/Filters/Distorts/B_arrel distortion removal CA65″,
Don’t forget the challenge! Make a monochrome image and post it in our meetthegimp.org photogroup at 23 and be sure to use the tag “mtg-monochrome”. The challenge ends March 31 1600GMT and I’ll draw a winner by random choice.
You can leave your comments on this blog or write me a mail.
00:23 Update from the last episode
01:50 Lens Distortion
06:02 Comments on the blog
08:47 Programming in Python
09:40 – Discussion on the blog
10:56 – Explaining the Python program
20:33 – Procedure browser
25:31 – Parameters
27:35 – Error messages
29:30 – Adding a new layer
32:33 – Summary
34:01 “23″ image hosting
36:09 The End
TOC made by paynekj
This work is licensed under a
Creative Commons Attribution-Share Alike 2.0 Germany License.