Bug 204466 - local contrast tool issues
Summary: local contrast tool issues
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Editor-LocalContrast (show other bugs)
Version: 1.0.0
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-19 23:25 UTC by Mikolaj Machowski
Modified: 2018-02-04 13:02 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikolaj Machowski 2009-08-19 23:25:10 UTC
Version:            (using Devel)
Compiler:          gcc4.3.2 
OS:                Linux
Installed from:    Compiled sources

Sorry for delay but better late then never. Also I knew about answers for my post on mail on list only through Gilles post. Below is fragment of discussion from list with my additional comments.

---------------------------------------
>> MM
> Julien Narboux
 Julien Pontabry

> > But I have two problems with it:
> >
> > 1. Name: when you google for "local contrast" you will come with many
> > sites describing one of unsharp mask techniques while this tool is much
> > more similar in spirit to Highlighs/Shadows tools from other programs.
> > Even "Pseudo HDR" nick would be better description. From WhatsThis I
> > understand is sophisticated implementation of Contrast Mask technique
> > (BTW - I wonder if it would be possible to build smart sharpening based
> > on this plugin)
>
> It seems to me that this plugin does Highlights/Shadows recovery but
> taking into account the whole picture to preserve contrast.
> Maybe it could be called :
> "Local Highlights/Shadow recovery"
> "Local Tone Mapping"
> "Spatially Varying Tone Mapping"
>
> Look wikipedia for the definition of tone mapping :
>  http://en.wikipedia.org/wiki/Tone_mapping
>
> > 2. It is really hard to use. Only after I discovered connection with
> > Contrast Mask I was able to grok something but still struggle with
> > understanding what is what (eg. Stages?). Please, user documentation :)
>
> I guess stages are just several applications of the filter.
> You can find documentation on the web page of Nasca Octavian PAUL
> (http://zynaddsubfx.sourceforge.net/other/tonemapping/) upon which this
> plugin is based.
>
> I think before writing proper documentation, it would be nice to wonder
> if there is no better gui one can think of.
> I tested using only one stage and it was fine. Does anyone has examples
> which needs several "stages" to get a good result ?
>
> Julien Narboux
>
> ps: The plugin has still to be polished because 16bits and the progress
> bar do not work.
> Maybe preview could be faster using a downscaled image ? Julien, what do
> you think about that ?

I think we should first improve the plugin code to get it faster. I'm not sure using downscale is a good idea. See the real effect on a little part of the original image may be better, isn't it ?

Julien
---------------------------------

Ad. 1: "Local Tone Mapping" is the best. Why not even shorter - "Tone Mapping"?

Ad. 2: About GUI - I wonder if it would be technically possible to split functionality in profiles: Highlights/Shadows - with resctricting (or translating somehow) sliders to effects giving "recovering" effects
Pseudo HDR - for well liked and unrealistic HDR look.
Comment 1 caulier.gilles 2009-09-09 15:50:31 UTC
To Julien Pontabry,

Do you see this entry from Mik in Bugzilla ?

Gilles Caulier
Comment 2 Julien Pontabry 2009-09-10 08:56:20 UTC
To Gilles,

Yes I do.
"Tone Mapping" is a good name (as "Pseudo-HDR" does) because it is exactly what the algorithm does.

Julien
Comment 3 caulier.gilles 2009-10-07 13:41:15 UTC
SVN commit 1032246 by cgilles:

rename plugin action from "Local Contrast" to "Tone Mapping"
CCBUGS: 204466


 M  +3 -3      imageplugin_localcontrast.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1032246
Comment 4 caulier.gilles 2009-10-07 13:43:24 UTC
SVN commit 1032249 by cgilles:

set internal tool name as "Tone Mapping"
CCBUGS: 204466


 M  +3 -3      localcontrasttool.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1032249
Comment 5 caulier.gilles 2009-10-07 13:49:27 UTC
Julien,

Instead to use "Stage" 1/2/3/4, why not to use "Tone Map" 1/2/3/4 or something like that ?

Gilles Caulier
Comment 6 Julien Pontabry 2009-10-07 17:37:33 UTC
Gilles,

This are author's words. Sure it may be better. To me, using different stages are not very usefull : I get best results with only one stage... This comes maybe from my pictures ?

Julien
Comment 7 Andi Clemens 2009-10-07 17:40:59 UTC
I find this stages stuff very confusing, and I guess the average user might do so, too.
What does it do? For me the results are all the same, so what is the difference?
I have always turned on all 4 stages, since this was the default setting.
Comment 8 caulier.gilles 2009-10-07 20:05:48 UTC
I'm agree. I cannot see a difference with more than one Stage to use

Look code, there is a loop to apply Stage on image :

http://lxr.kde.org/source/extragear/graphics/digikam/imageplugins/localcontrast/ToneMappingFloat.cpp#63

Gilles
Comment 9 Julien Narboux 2009-10-07 20:46:43 UTC
I agree as well. I don't understand how the stages are supposed to be used. I think this feature could be removed. Anyway an expert user could simulate the stages by applying the filter several times.
I don't see why there is a "function" option either. The "power function" option gives better results for me than linear. If everybody has the same opinion maybe this option could be deleted as well.
The "low saturation" and "high saturation" could be renamed into 
"shadow saturation" and "highlights saturation".

Julien
Comment 10 Mikolaj Machowski 2009-10-07 21:49:18 UTC
Please, leave at least 2 stages. I was never able to get decent results from 
this plugin with one stage. With two it is much easier.
Comment 11 Julien Narboux 2009-10-07 21:53:39 UTC
Mikolaj, 

Interesting ! could you please provide an example picture and the settings you are using for the two stages ?

Julien
Comment 12 Johannes Wienke 2009-10-07 21:57:21 UTC
What about making the number of stages editable and defaulting to one stage? This would be a reasonable default for beginners with a clean gui. Via a drop down we could provide more stage bloating up the gui...
Comment 13 caulier.gilles 2009-10-08 09:39:29 UTC
After reflection, i think to change "Local Contrast" to "Tone Mapping" is a wrong idea.

Look in internet, "Tone Mapping" is a method using more than one image to make HDR. This is not the case here. This can confuse end user.

http://en.wikipedia.org/wiki/Tone_mapping

A lots of internet page are in French (if you enter Tone Mapping). All speak about more than one image to use and to fuse.

I think that we cannot use Tone Mapping ask plugin name there.

Local Contrast is more adapted. 

Gilles
Comment 14 caulier.gilles 2009-10-08 09:44:45 UTC
SVN commit 1032563 by cgilles:

fix High/Low Saturation to Highlight/Shadow Saturation
CCBUGS: 204466


 M  +4 -4      localcontrasttool.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1032563
Comment 15 Julien Narboux 2009-10-08 10:07:57 UTC
It difficult to find the best name for this plugin.

I think "ToneMapping" describe only the process to compress the dynamic range of a picture.
It is usually applied to high dynamic range (HDR) pictures generated from several low dynamic range pictures but it can be applied to a single picture as well.
People often call this "single raw hdr", where is in fact it is more "Tone mapping from a single raw" in my opinion.

It seems to me that this plugin implements some kind of ToneMapping applied to a single picture (either a raw file with a moderate dynamic range or a 8bit file with low dynamic range).

The "local constrast" name is short and quite intuitive and does not confuse the user with multiple picture hdr tonemapping.
We could also use the following names :
"Dynamic range compression" 
"LDR Tone Mapping"

Julien
Comment 16 Johannes Wienke 2009-10-08 10:24:24 UTC
What about "contrast improvement"?
Comment 17 caulier.gilles 2009-10-08 13:05:02 UTC
SVN commit 1032737 by cgilles:

revert Tone Mapping name to Local Contrast. Can be confuse for end user
CCBUGS: 204466


 M  +1 -1      imageplugin_localcontrast.cpp  
 M  +10 -10    localcontrasttool.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1032737
Comment 18 caulier.gilles 2009-10-08 13:17:35 UTC
"contrast improvement" : too simple, and we have already Brightness/Contrast/gamma action in editor. Can be confuse...

Gilles Caulier
Comment 19 caulier.gilles 2009-10-08 13:19:29 UTC
And whats about Unsharp Mask settings which is disabled currently in code ?

Gilles
Comment 20 caulier.gilles 2011-12-17 19:26:01 UTC
Mik,

This file still valid using digiKam 2.x serie ?

Gilles Caulier
Comment 21 caulier.gilles 2012-08-22 16:52:17 UTC
Git commit c7bf359c7e563be57417f302b5846dde01f0169b by Gilles Caulier.
Committed on 22/08/2012 at 18:51.
Pushed by cgilles into branch 'master'.

don't use downscaled image to render preview, it will differs than final rendering
Related: bug 235601

M  +4    -3    imageplugins/enhance/localcontrasttool.cpp

http://commits.kde.org/digikam/c7bf359c7e563be57417f302b5846dde01f0169b