The GMIC tool referred to as “Details>Local Contrast Enhancement” looks like it does a pretty good job when using the default settings and adjustments are pretty easy to make. Insofar as there is no other Local Contrast tool available in normal GIMP this adds to its’ desirability. However, as best I can tell it insists on the preview view being a 100% resolution or higher which means that previewing the entire image is pretty much impossible.
While I can understand why there may be times when zooming in is helpful and desired I pretty much always want to assess the affect on the image as a whole. In that, I always want to preview that entire image and I would like to use as much of the resolution available on my display screen as possible to do it. Absent that the tool becomes pretty much useless.
Hello David (lovely name! )
The accuracy of the preview in G’MIC has always been the subject of much debate, so let me giving a few facts about why things work the way they do:
The preview can never be 100% accurate. That’s because the preview image is computed on incomplete image data (i.e. often a crop or resize of the input image). And as is often the case, it’s these missing information that means that a filter applied to the whole image won’t give the same result as on the preview (for a typical example: because the range of color values isn’t the same on the whole image as on the small part of the image used for the preview).
The only filters that don’t have this problem and can give a correct preview are those that work “pixel by pixel”, i.e. the processing of a pixel is done independently of other pixels in the image. Suffice to say that this is very rare in practice (a few filters in the “Colors” category, such as “Color Presets”, have this property, but it’s very rare indeed).
When implementing a filter in G’MIC, the developer can decide how the preview is calculated. Basically, there are these choices:
The portion of the image used for the preview is extracted so that the resolution displayed is 1:1 (one pixel displayed on the preview is the size of one pixel in the original image). This is what is done for filters that have a mainly local action (where the calculation of a pixel depends on the value of its neighbors). For such filters, providing something else than the real neighboring pixels will lead to a 100% incorrect preview.
Or, the portion of the image used for the preview is extracted in such a way that the entire image is displayed (in practice, a thumbnail of the image). This is the case for filters that add a “global” effect to the image (typically filters in the “Frames” category).
The only way for a filter to display an accurate preview for all preview zoom levels would be to calculate the preview on the entire image each time. But for a large image and a filter that’s a bit greedy in terms of calculation time, this is something that would be catastrophic for the user experience (displaying the preview after a parameter change could take several minutes).
So here we are, we face with technical limitations, and we have to make choices in favor of a preview that’s as accurate as possible to the final result, even if the image area displayed in the preview looks too “zoomed in”.
Thank you for such a thorough reply. However, it does not explain how other widely used image processing software packages (such as Rawtherapee & Darktable) do allow preview of entire image when performing Local Contrast adjustments. In those cases, it is my understanding that Local Contrast applies pretty much the same kind of algorithms as the Unsharp Mask for sharpening but with parameter values that are quite different. When sharpening I find it more important to use previews that are what I’d call close-up (i.e., 100% or more). However, the affect on the whole image still matters and, as with Local Contrast, I’ll always check.
Based on how the Local Contrast Enhancement tool works in GMIC it also looks, to me, like it is very much the same as Unsharp Mask but with quite different values for parameters.
While changing subject, another curious point is that I cannot find anything among the GMIC tools that I would compare with what is commonly called Contrast adjustment in other packages. Might this be a case of GMIC terminology differing from what others use?
Sorry to butt in but on the topic of the second part of your post:
The filter ‘basic adjustments’ has ‘contrast’ [fx_adjust_colors]
and afre’s ‘Contrast’ filter does an ‘enhance luminance contrast’ [afre_contrast]
and there is a ‘simple local contrast’ [simplelocalcontrast_p]
and there is a ‘contrast Swiss mask’ filter [fx_contrast_swm]
and Reptorian’s ‘Dynamic Contrast’ [rep_dynamic_contrast]
But perhaps I don’t understand what you mean with “commonly called Contrast adjustment”? If so perhaps you can explain?
I guess they are computing it on the whole image?
Depending on the implementation, this particular filter could be relatively fast to achieve (e.g. if it uses a gaussian filter implementation using GPU). I can’t say as I don’t use these software, and I don’t know what algorithm they used for local contrast adjustment.
Not sure if your use of the term “computing” means something special but I’m of the mind that we’re talking about something that is applied to the whole image, which is why I’m thinking previewing the whole image is desirable.
I’m no expert but based on other discussions/topics pertaining to “Local Contrast” I’m advised that it is common to use the same algorithm that is used for Unsharp Mask but with a high value such as 80-100 instead of 3 (GIMP default) for Radius and a low value such as .2 or less instead of .5 (GIMP default) or higher for amount.
Thanks for responding to my inquiry about Contrast.
Let me start by clarifying my use of “commonly called Contrast”. I mean they only use the term “Contrast” rather than terms like “enhance luminance contrast [afre_contrast]”. Based on your reply I did find some menu items under “Color>Basic Adjustments”, “Color>Apply External CLUT”, and “Color>Apply from CLUT set” that display windows with operational controls that as I said simply use the term “Contrast”. I suspect that this term may mean something different within different windows.
I must admit that most of the terms you reference I am still having difficulty finding.
In the case of the software that I’ve been using (like Rawtherapee, Darktable, GIMP) they were designed and intended to be enacted using a GUI designed for that purpose. This has the affect of making a term like “Contrast” show up on the screen without having to hunt through menus to find it. As I understand it GMIC can be used (and maybe was initially designed to be used) via commands entered via command line prompt on computers. Maybe that explains the idea of needing to hunt through what looks to me like and overwhelmingly long list of text string on subordinate windows to find basic tools.
Do you HAVE to use G’MIC when there are many other methods that adjust [local contrast] while allowing your criterion of ‘fit to screen’ viewing? Just asking, no criticism intended.
Local Contrast is a tool that GIMP does not provide but it does support the GMIC Plugin. I have tried using the GMIC Plugin and it seemed to provide the kind of enhancement I’m expecting from Local Contrast. However, I don’t find it easy to use. At the same time I have now started trying to use GIMP’s Unsharp Mask filter with the different parameter values that I mentioned and the results have been pretty good so far. I’d say it is still a work in progress.
Understood - not every method is actually named ‘Local Contrast’.
You might like Filters>Enhance>Wavelet-decompose
or, in RawTherapee, Contrast By Detail Levels under the second Tab.
In the GIMP, USM can be applied again and again. I sometimes set around 15px and go by maybe four steps down to say 2px. Starting at a low amount, increasing on the way down.
Gaussian Edge Detection in a separate layer and merged with the original might please you …
Truth is there are lots of tools in all of these image processing programs that I don’t know how to use or for that matter appreciate the stated purpose but I’ll definitely investigate the ones you referenced.