GithubHelp home page GithubHelp logo

t0biascze / super_eawb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from doyousketch2/eawb

0.0 1.0 0.0 69 KB

Super Enhanced Auto White Balance for GIMP

License: GNU General Public License v3.0

Python 100.00%

super_eawb's Introduction

This fork enhances the processing time of the script compared to the original Enhanced Auto White Balance
In my testing, i saw up to 5x enhancement of speed
Changes: In the original, when finding the percentage, it slowly incremented by 1, which took a lot of time especially on high res images. I changed it so it increments by 10, and then when it overshoots it decreases by 1 until it reaches the percentage
TODO:
Add option for changing the step size from dialog instead of it being permanently set to 10

Original Readme:
eawb.py
Enhanced Auto White Balance for GIMP
Filters >> Enhance >> Enhanced Auto White Balance


Enhanced, because you can specify the amount you wish to clip.

somewhere around 5 seems to be a good amount,
but you can set it higher or lower,
if you prefer more, or less, filtering.

image

Some images may need more aggressive filtering than others.

If the color appears off: Undo, then try Highlight Clip 10, and/or uncheck Soft tint.

Eyes are more sensitive to light regions than shadows, so
I would venture a guess highlights may need tweaking to get good results.
You decide the direction you wanna take it.

When you open your histogram and look at where the ranges are,
you may notice an image has highlights, but no shadows.

In this case, you can specify that you prefer clipping more from the shadows,
and leave the highlights alone. Or vice-versa. Your choice, it's enhanced.

This will, of course, depend upon your camera, and the lighting,
So you may have better results with some pix than others.

It might not cure images that have color bleeding in from another light source.
Can't promise any miracles with this plugin, but it may help.

I've had good results with the test images I've thrown at it.
YMMV, but lemme know if you like it; find me on Twitter @Doyousketch2.

It's possible to crank it all the way up to 50 if you like,
which will boost the contrast, but discard pixels
that may have otherwise contributed to the dynamic range.

If you wanna do that, I'd suggest sliding shadows up to 50
and leaving the highlights at 7 or so. This gives a bold look,
but keeps enough detail in the scene to be pleasing to the eye.

Turning off the blown highlight and burnt shadow protection is allowed.
The results are more drastic, and if that's what you're going for,
by all means, try it. But for everyday use, I'd recommend you keep 'em on.

Some photos have a huge difference between channels.
Perhaps a photo was shot with the wrong light balance to begin with.

Soft tint attempts to resolve this issue, by averaging the difference
between the channels, then splitting the amount applied by half that value.

Hopefully it helps. I've seen good results with it.
But then again, how many million cameras are there in the world?

It'll 'prolly serve you well with 99.9% of the photos you throw at it.
But yeah, there's always gonna be that one pic that sux for whatever reason.

eAWB won't remedy everything, but it's default values are pretty good.
And scriptable, so you can send an entire directory of photos at it.
which is a huge advantage over the awb that was built in.

from a Python plug-in, aka python-fu:
pdb.python_fu_awb(1, image, layer, hi, blow, lo, burn, soft)

from a Scheme script, aka script-fu:
(python-fu-awb 1 image layer hi blow lo burn soft)


Place script in directory that suits your OS:

/home/yourname/.gimp-2.8/plug-ins  
/usr/share/gimp/2.0/plug-ins  
~/Library/Application/Support/GIMP/2.8/plug-ins  

C:\Users\yourname\.gimp-2.8\plug-ins  
C:\Program Files\GIMP 2\share\gimp\2.0\plug-ins  
C:\Documents and Settings\yourname\.gimp-2.8\plug-ins  

If needed, set file permissions to allow script execution:
chmod +x eawb.py

If you have any previous versions of the script, awb.py
discard it, and replace with this updated eawb.py

I mean, you can keep 'em both in there if you really want,
but you'll have 2 menu entries, and the other doesn't have the primo toggle buttons.


I was asking about this in r/Gimp
https://www.reddit.com/r/GIMP/comments/7qw7eb/how_do_you_call_automatic_white_balance_from_a/
and was informed someone else was, nearly simultaneously, asking about it on StackOverflow
https://stackoverflow.com/questions/48268068/how-do-i-do-the-equivalent-of-gimps-colors-auto-white-balance-in-python-fu

Fortuitous event, for it led to a suitable answer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.