[Bug 279255] New: white balance method "camera" does not use the camera's values

classic Classic list List threaded Threaded
31 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] New: white balance method "camera" does not use the camera's values

S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255

           Summary: white balance method "camera" does not use the
                    camera's values
           Product: digikam
           Version: 2.0.0
          Platform: openSUSE RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: RAW files management
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]


Version:           2.0.0 (using KDE 4.7.0)
OS:                Linux

If one issues dcaw on a RW2 picture with the "-w" option it shows the values
for white balance the camera set.

If digikam is set to "camera" for the "white balance method" it should use
those exact values.

However digikam's output shows that it uses different values.

dcraw:
Scaling with darkness 15, saturation 4095, and
multipliers 1.901141 1.000000 1.745247 1.000000

digikam:
Scaling with darkness 0, saturation 4080, and
multipliers 1,000000 0,526000 0,918000 0,526000

dcraw_emu from libkdcraw:
Scaling with darkness 0, saturation 4080, and
multipliers 1.901141 1.000000 1.745247 1.000000

As you can see digikam as well as dcraw_emu use the wrong values for darkness
and saturation.

dcraw_emu uses the correct values for the multipliers while digikam does not
use those absolute values, i.e. strictly speaking does not use the camera's
white balance but only its ratio. Since this does make a difference it should
only be used if the user enabled it!

In case the absolute white balance values blow a channel it might make sense to
have a darker image but no blown channels – but only as option, e.g. "use value
ratio".

Reproducible: Didn't try

Steps to Reproduce:
Isse dcaw -w, digikam and dcraw_emu on a RAW picture (RW2 in this case) and
compare the values.

Actual Results:  
different values

Expected Results:  
same values.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

Gilles Caulier-4
https://bugs.kde.org/show_bug.cgi?id=279255


Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email],
                   |                            |[hidden email]
          Component|RAW files management        |libkdcraw




--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

S. Burmeister
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255





--- Comment #1 from S. Burmeister <sven burmeister gmx net>  2011-08-04 07:15:24 ---
digiKam version 2.1.0
Exiv2 can write to Jp2: Yes
Exiv2 can write to Jpeg: Yes
Exiv2 can write to Pgf: Yes
Exiv2 can write to Png: Yes
Exiv2 can write to Tiff: Yes
Exiv2 supports XMP metadata: Yes
LibCImg: 130
LibClapack: internal library
LibExiv2: 0.20
LibJPEG: 62
LibJasper: 1.900.1
LibKDE: 4.7.00 (4.7.0)
LibKExiv2: 2.0.0
LibKGeoMap: 2.0.0
LibKdcraw: 2.0.0
LibLCMS: 119
LibPGF: 6.11.24 - internal library
LibPNG: 1.2.44
LibQt: 4.7.3
LibRaw: 0.13.7
LibTIFF: LIBTIFF, Version 3.9.4 Copyright (c) 1988-1996 Sam Leffler Copyright
(c) 1991-1996 Silicon Graphics, Inc.
Marble Widget: 0.11.95 (0.12 RC 2)
Parallelized demosaicing: Yes
Database backend: QSQLITE
LibGphoto2: 2.4.10
LibKface: 2.0.0
LibKipi: 1.2.0
LibOpenCV: 2.2.0
Libface: 0.2

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

Alex Tutubalin
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255





--- Comment #2 from Alex Tutubalin <lexa lexa ru>  2011-08-06 06:32:22 ---
The difference is because dark value has been (shoul be :) subtracted at the
earlier stages.

Also, white balance settings should not affect the black/max values.

Anyway, if you see real problems with your images (the 15-unit difference
should affect shadows and dark tones), please provide your  RW2 sample for
download (use Mediafire or Dropbox or other file sharing service if needed).

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

S. Burmeister
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255





--- Comment #3 from S. Burmeister <sven burmeister gmx net>  2011-08-06 07:31:41 ---
I can send you the RW2 I used for the screenshot by email.

The PPM on the left was done as mentioned above, i.e. only dcraw -w, not sure
if it does anything else by default digikam does not.

The PGF on the right was created via digikam, no post-processing, no highlight
rebuilding (set to solid white), just demosaicing and exporting as lossless
PGF. Applying rebuilding for highlights makes it even darker.

As you can see the pictures do differ quite a bit.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

Alex Tutubalin
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255





--- Comment #4 from Alex Tutubalin <lexa lexa ru>  2011-08-06 07:34:13 ---
My email is [hidden email]

Generally, dcraw -w and dcraw_emu -c 0 -w should provide the same results
bitwise.
The -c 0 is to turn off auto-maximum feature missing in dcraw.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

S. Burmeister
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255





--- Comment #5 from S. Burmeister <sven burmeister gmx net>  2011-08-06 07:39:05 ---
Created an attachment (id=62603)
 --> (http://bugs.kde.org/attachment.cgi?id=62603)
comparison digikam with libraw against dcraw

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

S. Burmeister
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255





--- Comment #6 from S. Burmeister <sven burmeister gmx net>  2011-08-06 07:42:05 ---
Created an attachment (id=62604)
 --> (http://bugs.kde.org/attachment.cgi?id=62604)
comparison dcraw against darktable

On the left dcraw with only -w and on the right darktable with white balance
set to camera, no colour management or base curve applied.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

S. Burmeister
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255





--- Comment #7 from S. Burmeister <sven burmeister gmx net>  2011-08-06 08:00:41 ---
Created an attachment (id=62607)
 --> (http://bugs.kde.org/attachment.cgi?id=62607)
comparison dcraw against libdcraw_emu

On the left dcraw -w -v on the right dcraw_emu -w -c 0 -v

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

Alex Tutubalin
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255





--- Comment #8 from Alex Tutubalin <lexa lexa ru>  2011-08-09 11:42:13 ---
With (latest) stable LibRaw 0.13.7, the dcraw -w and dcraw_emu -c 0 -w produces
bitwise same result from sample image you sent to me.

Checked with md5sum against .ppm files produced.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

S. Burmeister
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255

--- Comment #9 from S. Burmeister <[hidden email]> ---
I'm at this issue again with today's git checkout.

digiKam version 2.8.0
Exiv2 can write to Jp2: Yes
Exiv2 can write to Jpeg: Yes
Exiv2 can write to Pgf: Yes
Exiv2 can write to Png: Yes
Exiv2 can write to Tiff: Yes
Exiv2 supports XMP metadata: Yes
LibCImg: 130
LibClapack: internal library
LibExiv2: 0.22
LibJPEG: 62
LibJasper: 1.900.1
LibKDE: 4.8.4 (4.8.4) "release 513"
LibKExiv2: 2.1.1
LibKGeoMap: 2.0.0
LibKdcraw: 2.0.1
LibLCMS: 119
LibLensFun: 0.2.6-0 - internal library
LibLqr: internal library
LibPGF: 6.12.27 - internal library
LibPNG: 1.2.49
LibQt: 4.8.2
LibRaw: 0.14.4
LibTIFF: LIBTIFF, Version 3.9.5 Copyright (c) 1988-1996 Sam Leffler Copyright
(c) 1991-1996 Silicon Graphics, Inc.
Marble Widget: 0.13.3 (stable release)
Parallelized PGF codec: No
Parallelized demosaicing: Yes
Database backend: QSQLITE
LibGphoto2: 2.4.11
LibKface: 2.0.0
LibKipi: 1.4.0
LibOpenCV: 2.3.1
Libface: 0.2

digikam uses:
Scaling with darkness 0, saturation 4095, and
multipliers 1,897338 1,000000 1,726236 1,000000

dcraw uses:
Scaling with darkness 15, saturation 4095, and
multipliers 1.897338 1.000000 1.726236 1.000000

As you can see in the earlier posts digikam used to subtract the darkness from
the saturation, i.e. 4095 in dcraw became 4080 and the darkness was set to 0.

However, now it still sets the darkness to 0 but does not subtract it from the
saturation.

Further:
Digikam (the RAW tool within the editor) is set to use amaze to decode yet
digikam's output shows:
AHD interpolation...

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

S. Burmeister
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255

S. Burmeister <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|openSUSE RPMs               |Compiled Sources
            Version|2.0.0                       |2.8.0

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

S. Burmeister
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255

--- Comment #10 from S. Burmeister <[hidden email]> ---
Created attachment 72711
  --> https://bugs.kde.org/attachment.cgi?id=72711&action=edit
Comparison: jpg, digikam, dcraw -w

The picture shows a comparison of the same picture:

from left to right:
1. JPG
2. RAW from digikam, WB set to camera, no post-processing
3. RAW from dcraw -w (use camera's WB)

2 and 3 should look the same – yet they do not.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

S. Burmeister
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255

--- Comment #11 from S. Burmeister <[hidden email]> ---
I compiled the current git libkdcraw to use dcraw_emu and it shows:
Scaling with darkness 0, saturation 4080, and
multipliers 1.897338 1.000000 1.726236 1.000000

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

S. Burmeister
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255

--- Comment #12 from S. Burmeister <[hidden email]> ---
Created attachment 72718
  --> https://bugs.kde.org/attachment.cgi?id=72718&action=edit
comparison: dcraw, digikam, dcraw_emu

a comparison of the same image:

from left to right:

1. dcraw -w
2. digikam with "use camera's WB"
3. dcraw_emu -w -c 0

As you can see 1 and 2 look the same while digikam fails to use the correct
settings.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

S. Burmeister
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255

--- Comment #13 from S. Burmeister <[hidden email]> ---
Installed libkdcraw from current git, i.e. the one that I used for the
dcraw_emu test (which works as expected), but digikam does still use darkness 0
and saturation 4095.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

Marcel Wiesweg
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255

--- Comment #14 from Marcel Wiesweg <[hidden email]> ---
I get it that for correct camera white balance, with dcraw_emu, "-w" is not
enough, but "-c 0" is also required.
Alex: In the libraw_output_params_t struct, we set use_camera_wb which is
equivalent to the "-w" option. What is to be set to achieve "-c 0"?

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

Alex Tutubalin
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255

--- Comment #15 from Alex Tutubalin <[hidden email]> ---
-c in dcraw_emu sets params.adjust_maximum_thr value.
0 - disables automated maximum adjustment.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

Alex Tutubalin
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255

--- Comment #16 from Alex Tutubalin <[hidden email]> ---
From Libraw docs:

float adjust_maximum_thr;

This parameters controls auto-adjusting of maximum value based on
channel_maximum[] data, calculated from real frame data. If calculated maximum
is greater than adjust_maximum_thr*maximum, than maximum is set to
calculated_maximum.

Default: 0.75. If you set this value above 0.99999, than default value will be
used. If you set this value below 0.00001, than no maximum adjustment will be
performed.

Adjusting maximum should not damage any picture (esp. if you use default value)
and is very useful for correcting channel overflow problems (magenta clouds on
landscape shots, green-blue highlights for indoor shots).

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 279255] white balance method "camera" does not use the camera's values

Marcel Wiesweg
In reply to this post by S. Burmeister
https://bugs.kde.org/show_bug.cgi?id=279255

--- Comment #17 from Marcel Wiesweg <[hidden email]> ---
Sven: In the UI, the relevant option is called "Correct false colors in
highlights". Please check that unchecking this option, and using camera wb
gives the desired results.

For me, these two options seem to be independent and their relation in this bug
report is coincidental, so assuming you get the bit-identical results, we can
close.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
12