Bug 139681 - function for semi-automatic whitebalance
Summary: function for semi-automatic whitebalance
Status: RESOLVED DUPLICATE of bug 266026
Alias: None
Product: digikam
Classification: Unclassified
Component: Plugin-Editor-WhiteBalance (show other bugs)
Version: 0.8.2
Platform: Ubuntu Packages Linux
: NOR normal with 1 vote (vote)
Target Milestone: ---
Assignee: Digikam Developers
Depends on:
Reported: 2007-01-06 16:08 UTC by Alexander Neundorf
Modified: 2016-06-30 11:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:

Whithe Balance Tool in action (328.19 KB, image/png)
2007-01-19 14:37 UTC, caulier.gilles

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Neundorf 2007-01-06 16:08:47 UTC
Version:           0.8.2 (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages
Compiler:          gcc 4.1.2 
OS:                Linux


until now I didn't find a function for semi-automatic whitebalance correction neither in digikam, krita nor gimp.
Depending on the lightning conditions, different whitebalance correction factors have to be applied to the red/green/blue channels.
Digital cameras don't always get it right.
Digikam (or a plugin) should have a function to fix this:
-ask the user to select a small white/neutral grey area in the image, e.g. click somewhere and then use the average of a 3x3 area around that point
-make sure that the color channel values in this area are somewhere between maybe 5 and 95 percent (otherwise you can get errors if the colors are to dark or overexposed)
-use these pixel values to calculate the color channel correction factors so that the pixels in the selected areas become white/neutral grey: take the biggest color channel and calculate the factors for the other two channels so that they get the same value
result: a really good whitebalanced image :-)

Comment 1 caulier.gilles 2007-01-19 14:27:56 UTC

Thanks for the tips.

Look in current White Balance plugin. There is a way to pick up the color from an area of original image and setup automaticly the white balance correction.

It's fine for you ?

Gilles Caulier
Comment 2 caulier.gilles 2007-01-19 14:37:21 UTC
Created attachment 19334 [details]
Whithe Balance Tool in action
Comment 3 Arnd Baecker 2007-06-12 21:08:08 UTC
Hi Alexander,

does the White Balance Tool do what you proposed?

If so, this bug could be closed.

Thanks in advance for your feedback,

Comment 4 Alexander Neundorf 2007-06-12 23:27:50 UTC
I think so, but it didn't work as good as I expected.
I didn't have a look at the code. Is just one pixel used or a small area around the point where I click ? This would be better because then you get an average over the pixels in this area (maybe 5x5 or something like this).
It is also a problem that I have to select the white point in the small preview area in the dialog, it's not really possible to select a small area exactly. So being able to zoom or showing the area below the mouse pointer magnified would be nice.

Comment 5 Arnd Baecker 2007-06-13 07:33:40 UTC
Hi Alexander,

I see!

Marcel, Gilles, this raises the general question, if it is possible
to use the new  fast preview scaling also for such tools
of the image-editor?

If so, one could make the number of pixels included
depend on the current magnification.

Comment 6 Andi Clemens 2008-07-23 16:55:02 UTC
I also think we should have the possibility to zoom in all the imageplugin dialogs. Right now this is only possible for filters derived from CtrlPanelDlg class.
Comment 7 caulier.gilles 2008-07-23 22:52:46 UTC

In theory, yes, but we have another problem reevant of image filter algorithm whoch work on color components as white balance : it work perfectly on whole image  (or a reduced version), but not on a small part.

The current widget used to zoom/pan over the image in image plugins use a part of image to render preview. It will not work as well with level, WB, curves, etc...

This is why i have designed a separate preview widget for this tool...

Gilles Caulier  
Comment 8 caulier.gilles 2011-12-17 19:10:31 UTC

Zomming is implemented in WB tool. This file still valid ?

Gilles Caulier
Comment 9 caulier.gilles 2011-12-17 19:52:54 UTC
Following comment #4, this file is a duplicate of bug #266026

Gilles Caulier

*** This bug has been marked as a duplicate of bug 266026 ***