Gimp plugin - Shading equalization filter v2
I posted some pictures about a filter I implemented to reduce those annoying changes in shading when taking photos of your line drawings (http://sibaku.tumblr.com/post/105012775655/illumination-correction-filter-i-usually)
I wanted to get it running on Windows, but C based plugins for Windows are horrible, at least getting them to run is. I managed to compile them but they crash... and I didn't want to spend more time on it...
Soooo I rewrote and extended it in Python. Which should run on all systems
You can get the plugin here: https://dl.dropboxusercontent.com/u/26437043/plugin/shadingEqualization.py
You only have to copy it into your gimp plugin folder (The main folder is located probably at your user folder. For more information see google or so, shouldn't be hard to find)
It will then be available at Filter->Enhance->Shading equalization
Probably the best way is to use the default strength value of 9
BTW, your image will be converted to grayscale
Only thing to beware of is: Python is really really slow for this kind of computation. The more or less straight port from C did slow it down like 10 times. I did some optimization and trickery to boost it a bit, but it's still below the unoptimized C code. An image about the size of 1000*1000 takes about 10-20 seconds (the unoptimized code was about 50 and did less). 2-3000 pixel images can take around 1-2minutes, so keep that in mind. Not sure if I can get that much more speed out of python without any 3rd party libraries such as numpy. But it works nice, so I think its alright. You usually don't need sketches in overly high resolutions.
This is an example image
This is the image after filtering
After this step, you can easily adjust the contrast/brightness or curves or something else to achieve the desired result. I chose not to try some automatic stuff, so everyone can tweak it to their liking. Here is the final result
The images you'll see now show the original on the left. My usual approach is fiddling around with curves until it looks ok, that is displayed in the middle. On the right side, the result of the new filter with some very simple curve manipulations are shown.
For some more examples, see below the fold :)










