Bug 236304 - Add an button in the Whitebalance Settings to load Camera WB
Summary: Add an button in the Whitebalance Settings to load Camera WB
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Editor-WhiteBalance (show other bugs)
Version: 1.3.0
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2010-05-04 12:29 UTC by Arndt Braun
Modified: 2019-02-24 10:44 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arndt Braun 2010-05-04 12:29:36 UTC
Version:           1.2 (using KDE 4.4.2)
Compiler:          Precompiled Packages 
OS:                Linux
Installed from:    Ubuntu Packages

For me it´s an big wish to have the aviability to Load the Camera White balance in the white balance settings of the Image Editor.
This is important for me because Digikam uses everytime the last settings an when you have Images from different light situations it´s hard to find the right value.

In my opinion it ist the best to start with the Camera WB and adjust the own values from this point.

Thank´s

P.s. Contact me by mail for further Questions
Comment 1 caulier.gilles 2010-05-06 09:59:57 UTC
Andreas,

From Exiv2, there is a way to extract camera white balance value in °K, or a t least some numerical information which can be converted later to °K ?

Gilles Caulier
Comment 2 Andreas Huggel 2010-05-06 11:10:54 UTC
All I can say is that WB information is kept in the makernotes in whatever proprietary format each camera maker chose to store it there. Even for a given camera brand, this can be confusing, e.g., Exiv2 has more than 10 different Olympus makernote tags which contain the word "whitebalance"... 

If we know which information (tags) to use and how to convert them to a temperature, then I'll be happy to add an "easy-access" function for this task to exiv2 so that it's transparent for applications.

I imagine dcraw or ufraw would be the place to ask or check about WB info and formats, since they are also concerned about rendering the image.

Andreas
Comment 3 caulier.gilles 2010-05-06 11:13:40 UTC
Right Andreas,

Alex, what you can ask about libraw WB extraction from makernotes ? 

Gilles
Comment 4 Alex Tutubalin 2010-05-06 15:30:51 UTC
LibRaw extracts camera WB from file.

So, if you want to use camera wb, just set
params.use_camera_wb = 1;
Comment 5 Jens Mueller 2010-05-06 19:39:58 UTC
Alex,

sorry, I though you misunderstood something, the question was not how to apply camera wb, it was how to get the temerature value for display. 

As I know we can take LibRaw's imgdata.color.cam_mul[] and compute it be a iterate function. See also Adobe DNG specification, section "Translating Camera Neutral Coordinates to White Balance xy Coordinates".

Looks like http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_T.html is a implementation we want of.

Jens
Comment 6 Alex Tutubalin 2010-05-06 20:32:15 UTC
Jens,

LibRaw uses 3 (or 4 for two-different-greens cameras) scale coefficients for white balance. These coefficients are not camera independed, but includes both color balance and chanel sensitivity adjustment in one step. These coefficients are stored in Exif data (for 'as shot' balance), so it is straightforward way.

It is impossible to separate sensitivity part from 'color temperature/tint' part without experiments with *each* supported camera (300+). You need test shot of good gray card under well-controlled light (5000K or so). I have no such data.
Also, this is not good way because original data (provided by camera) are 3-4 coefficients (green one is 1.0 for many cameras).

Adobe uses another way, similar for von Kries transformation. This way is theoretically right (althought, color from 'Raw Photo Processor' which uses 4-coefficients way is way better than from Adobe's software), but in practice it leads to more noise because weak noisy channels are mixed with strong one.

Summary:
 1) LibRaw uses 3(4) coefficients way, so any calling application should provide these data to postprocessing stage.
 2) Cameras store these coefficients in Exif data, so it is easy to provide this coefficients to LibRaw (and LibRaw itself reads them).
 3) If you want to play with Von Kries/Bradford white point adjustments, it is up to you, but starting point is camera's coefficients and you should provide same (may be, modified) coefficients to LibRaw postprocessing.

Also, I see no way to deal with two-different-green cameras and von Kries/Bradford transformation.