You are here

Automatic Retouching of User Selected Regions in Digital Images

I am trying to develop an auto-retoucher for GIMP. Like the AKVIS Retoucher Plugin for Photoshop (

The conventional retouching available is very tedious and time consuming. My goal is to develop a GIMP plugin that will automate retouching through user selected region.

I need:
1. Algorithms for Auto Retouching
2. Implementing the algorithm for GIMP

If you have any suggestions or ideas please let me know. Any posts is greatly appreciated.

Thank you.

Do you know this plugin?:
this is very similar to what you what to do. It tries to calculate or add selected areas from surrounding area. But something like this is too complex and unreliable (personal experience), simply said, the plugin doesn't have any intelligence and don't understand what it sees.
But if you want something simplier.....

You would use blurring of original image (except for areas that user selected) and replace pixels (marked by user) from blurred layer.

The blurring might be selective, or can be directional....

As for implementation – gimp gives you a lot of freedom.You can almost forget that you are writing a plugin for gimp. You can have own data structures – 2D or 3D arrays, gimp will allow you to populate them with data from a picture. And at the end of processing, you will have to populate drawable (~layer) with standard RGB values (int from 0 to 255). You can write your own algorithms from scratch....

You should have at least basic experience with C language...

Yes, I was able to browse a little on this plugin ( I was planning to study it's algorithm and source code. I know C language. Is GIMP Plugins written in C? Sorry for my ignorance.

Please suggest/ advise of what steps should I be taking in order to be successful in developing my desired plugin. Hope you could walkthrough with me.

Thank you for your reply.

There is lack of tutorials for this purpose, but there is one you should went through:, this will teach you about "interface" between your code and gimp.

Yes, plugins are written in C, if you can use other language - this is what I dont know.

Also, it would be usefull for you to read this thread:

BTW, will you develop on windows or linux?

I will be developing Plugin for GIMP in Linux. I think I will stick with C as that's the language I'm most familiar with. Thanks.

Why not develop with Python it is similar to C. Very easy to interface to Gimp and a lot of "documentation".

Python is fine language, except for low-level stuff, where its overhead shows, but for gimp plugins ... I am not sure it can be used here.
Do you have any example of such plugin?

There are a lot of examples here just look around.

But look for example at the following python plugins: and plugins with seperate GUI. Or look at a plugin with integrated GUI.

Look also at at the bottom I have put some references to documentation

Somewhere on this site there exists a overview of all possibilities with integrated GUI but I don't remember the name anymore.
Found read

Further search on python on this site you will be overwhelmed.

Yes, I looked on some of your examples, downloaded few zips, and looked at "source".
I must say, C and python are not interchangeable here. The python looked to me as a (very advanced) scripting language using features provided by gimp, while C will provide you with raw data and you are on your own.

For example here in this thread we are now, if the author decides to create own blurring algorithm, that would omit some pixels on the presumption that such pixel is not part of orignal image but it is damaged part of a photo - than I believe you need rather C than python.

So what language is better to use depends only on the type of work one needs to do...

Here are a few links to academic papers exploring different algorithms for this sort of task.

If you (or anybody else) could implement these algorithms as GIMP plugins, I'm sure the community would put you up on a pedestal!

Semantic Fill:

Facial Beautification:


Subscribe to Comments for "Automatic Retouching of User Selected Regions in Digital Images"