Attachment | Size |
---|---|
roys-max-local-contrast.scm | 6.28 KB |
roys-max-local-contrast.scm New version! | 6.6 KB |
FX-Foundry/Photo/Enhancement/Maximize Local Contrast...
Like Stretch Contrast, but instead of using the minimum and maximum pixel values from the entire image, uses the minimum and maximum in the vicinity of a pixel to compute its new value. Takes a while to run, but really brings out textures. Result is a Grain Merge layer that adjusts values of the original image.
This filter operates on the visible image, not on a layer or selection.
Radius indicates how wide a pixel's influence is. If you choose too small a value, adjustment will be too localized and the image will look patchy. Larger values take a bit longer to run.
Threshold indicates how many neighboring gray values above and below a value can be treated as the same, in finding minimum and maximum values. Purely a speed trade-off. Using very low values will make it very slow. Too high values will cause visible "steps" in color values. The latest version does not include threshold, but the older version is still available.
"Feather Haloes" helps smooth out haloes around high-contrast areas.
"Keep Min and Max Layers" leaves the intermediate layers in the stack so you can look at them if you're interested.
Update (21 Jul 2009):
Updates (13 Jul 2009):
Updates (9 Jul 2009):
Comments
Local Contrast Stretch
Do you mean you set the value of the pixel is locality set by newVal = pixelVal / (localMax - localMin) ?
Interesting script
; MinMax, a Gimp script by Roy Johnson ; ; CAUTION : for small image, because takes a lot of time (probably less then a 1000x1000 px, dependent of computer) ;============================================================================== ; History of change : ; Original version 0.1, enhance local contrast in black & white. ; Version 0.2, add enhance contrast in color. ; Version 0.3, add a beginning of error control, test with gimp 2.6.6 ubuntu 9.04. ;------------------------------------------------------------------------- ; Description : ; Create New From Visible ; Desaturate using Luminance ; Create two new copies, one called Min and one Max ; For each gray value, 0 to 255: ; color-select from the desaturated image ; grow selection by Radius parameter (Feather?) ; paste selection in Darken-Only mode on Min ; paste selection in Lighten-Only mode on Max ; Instructions for incolor : ; Take the Base layer and put it above the Contrast Enhanced layer ; Change the Base layer mode to Grain Extract ; Merge down ; Change the Contrast Enhanced layer mode to Grain Merge ; Now it will be an adjustment layer that you can use with your original color image. ; ; There is a thread about this script at http://www.flickr.com/groups/gimpusers/discuss/72157620819124120/ ;========================================================================== ...
Updated july 14 2009. Sorry for the lengthly mess I made before, made worse by the fact that there was a mixture of end of line (the 'cr' and 'lf' of Windows with 'lf' of Linux). Now for the new version I consider the above CAUTION, for small image , false. It is a useful tool for photo retouching in GIMP, thank you.