White Balance and gamma for 16 bits RAW image without to use Color Management.

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

White Balance and gamma for 16 bits RAW image without to use Color Management.

Gilles Caulier-4
Hi all,

There are several entries in bugzilla about to be able to load RAW image in 16 bits color depth without to use Color Management with a valid ICC color profile for your camera.

<a href="http://bugs.kde.org/show_bug.cgi?id=146393" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://bugs.kde.org/show_bug.cgi?id=146393
<a href="http://bugs.kde.org/show_bug.cgi?id=124814" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://bugs.kde.org/show_bug.cgi?id=124814
<a href="http://bugs.kde.org/show_bug.cgi?id=150457" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://bugs.kde.org/show_bug.cgi?id=150457
<a href="http://bugs.kde.org/show_bug.cgi?id=155074" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://bugs.kde.org/show_bug.cgi?id=155074

Like you now, dcraw provide a linear histogram image, and result image is generally a black hole... More details can be seen at this url :

<a href="http://www.guillermoluijk.com/tutorial/dcraw/index_en.htm" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.guillermoluijk.com/tutorial/dcraw/index_en.htm

There is a patch here against RAW image loader from digiKam core for KDE3 to fix this problem :

<a href="http://digikam3rdparty.free.fr/misc.tarballs/raw16bitsautogamma.patch" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://digikam3rdparty.free.fr/misc.tarballs/raw16bitsautogamma.patch

In this patch, the following operations are processed :

- An auto-exposure correction using white-balance algorithm from digiKam core.
- A gamma correction to 2.0 (BT.709 adjustment) using gamma algorithm from digiKam core.
- sRGB ICC color-space profile assignment.

In theory, the Gamma value for BT.709 adjustment must by 2.2222, but after severals tests, 2.0 sound like the most adapted...

I have compared digiKam with this patch against :

- 8 bits raw decoding from DCRAW. This one adjust automatically white-balance/gamma
- Last LightZone version for Linux (witch use dcraw internally) and do not use Color Management in Raw workflow.

... the results are similar. It's not perfect, but suitable as well. Look screenshots available here :

http://digikam3rdparty.free.fr/Screenshots/RAW16bitsAutogamma/

You can see:

- On the Left, a PNG file generated from a RAW image using dcraw with 8 bits color depth and auto-gamma
- On the middle, the RAW image decoded in digiKam in 16 bits color depth with this patch
- On the right, the RAW image open in LightZone image editor.

Feedback are welcome. Thanks in advance

Gilles Caulier


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: White Balance and gamma for 16 bits RAW image without to use Color Management.

Bugzilla from thorsten.schnebeck@gmx.net
Am Montag 10 März 2008 schrieb Gilles Caulier:

> There is a patch here against RAW image loader from digiKam core for KDE3
> to fix this problem :
>
> http://digikam3rdparty.free.fr/misc.tarballs/raw16bitsautogamma.patch
>
> In this patch, the following operations are processed :
>
> - An auto-exposure correction using white-balance algorithm from digiKam
> core.
> - A gamma correction to 2.0 (BT.709 adjustment) using gamma algorithm from
> digiKam core.
> - sRGB ICC color-space profile assignment.
>
[...]
> Feedback are welcome. Thanks in advance

Hi Gilles,

what about comparing auto-corrected 16bit raw with the embedded jpeg version
of the image? Would be interesting if the cam uses exif parameter to do its
internal raw2jpeg conversion or if a fixed parameter set is enough.

Bye

  Thorsten
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: White Balance and gamma for 16 bits RAW image without to use Color Management.

Arnd Baecker
Hi Thorsten,

On Tue, 11 Mar 2008, Thorsten Schnebeck wrote:

> Am Montag 10 März 2008 schrieb Gilles Caulier:
>> There is a patch here against RAW image loader from digiKam core for KDE3
>> to fix this problem :
>>
>> http://digikam3rdparty.free.fr/misc.tarballs/raw16bitsautogamma.patch
>>
>> In this patch, the following operations are processed :
>>
>> - An auto-exposure correction using white-balance algorithm from digiKam
>> core.
>> - A gamma correction to 2.0 (BT.709 adjustment) using gamma algorithm from
>> digiKam core.
>> - sRGB ICC color-space profile assignment.
>>
> [...]
>> Feedback are welcome. Thanks in advance
(Remark ahead: this is really good news!!!)

> Hi Gilles,
>
> what about comparing auto-corrected 16bit raw with the embedded jpeg version
> of the image? Would be interesting if the cam uses exif parameter to do its
> internal raw2jpeg conversion or if a fixed parameter set is enough.

Presumably this is a very hard task, because in the camera
one can specify various aspects, like color enhancements
(more vivid etc.) or even adjust sharpening.
Because of this, the converted raw will most likely not fully
match the jpg. ((Actually, for example for sharpening, it
should not IMO ;-))
However, getting white-balance and gamma
right will make at least the raw converted picture look "similar".
(I am not 100% sure about the auto-exposure though)

Of course, if the algorithms used by the different manufacturers
to convert their raw date to jpg inside the camera, were
publically available, together with the corresponding
exif (etc.) information stored in the jpg (or raw) file, then
it would be possible to get very close to the stored jpg.
However, I would be extremely surprised if we could get
the corresponding information.

Maybe something like this only works with the Windows/Mac
RAW decoders provided by the camera companies
(not sure about photoshop&Co),  or the recent RAW image codecs
for Windows Vista?

Best, Arnd




_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: White Balance and gamma for 16 bits RAW image without to use Color Management.

Gilles Caulier-4


2008/3/11, Arnd Baecker <[hidden email]>:
Hi Thorsten,


On Tue, 11 Mar 2008, Thorsten Schnebeck wrote:

> Am Montag 10 März 2008 schrieb Gilles Caulier:
>> There is a patch here against RAW image loader from digiKam core for KDE3
>> to fix this problem :
>>
>> http://digikam3rdparty.free.fr/misc.tarballs/raw16bitsautogamma.patch

the patch is a null file... Sorry

Code is in svn now. checkout and try...


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: White Balance and gamma for 16 bits RAW image without to use Color Management.

Gerhard Kulzer-3
On Dienstag 11 März 2008 Gilles Caulier wrote:

> 2008/3/11, Arnd Baecker <[hidden email]>:
> >
> > Hi Thorsten,
> >
> >
> > On Tue, 11 Mar 2008, Thorsten Schnebeck wrote:
> >
> > > Am Montag 10 März 2008 schrieb Gilles Caulier:
> > >> There is a patch here against RAW image loader from digiKam core for
> > KDE3
> > >> to fix this problem :
> > >>
> > >> http://digikam3rdparty.free.fr/misc.tarballs/raw16bitsautogamma.patch
>
>
> the patch is a null file... Sorry
>
> Code is in svn now. checkout and try...
>
Gilles, I observed the difference in the the rawloader Kde3 and Kde4, then I did a checkout this morning and saw that you backported to Kde3. This algo gives much better results in the dark tones:-)
But there is still a difference in the statistics (not visible in the image), see the attachment.

Gerhard

--
><((((º> ¸.·´¯`·... ><((((º> ¸.·´¯`·...¸ ><((((º>
http://www.gerhard.fr

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: White Balance and gamma for 16 bits RAW image without to use Color Management.

Gilles Caulier-4
Gerhard,

Which attachements ?

Gilles

2008/3/13, Gerhard Kulzer <[hidden email]>:
On Dienstag 11 März 2008 Gilles Caulier wrote:
> 2008/3/11, Arnd Baecker <[hidden email]>:
> >
> > Hi Thorsten,
> >
> >
> > On Tue, 11 Mar 2008, Thorsten Schnebeck wrote:
> >
> > > Am Montag 10 März 2008 schrieb Gilles Caulier:
> > >> There is a patch here against RAW image loader from digiKam core for
> > KDE3
> > >> to fix this problem :
> > >>
> > >> http://digikam3rdparty.free.fr/misc.tarballs/raw16bitsautogamma.patch
>
>
> the patch is a null file... Sorry
>
> Code is in svn now. checkout and try...
>


Gilles, I observed the difference in the the rawloader Kde3 and Kde4, then I did a checkout this morning and saw that you backported to Kde3. This algo gives much better results in the dark tones:-)
But there is still a difference in the statistics (not visible in the image), see the attachment.

Gerhard


--
><((((º> ¸.·´¯`·... ><((((º> ¸.·´¯`·...¸ ><((((º>
http://www.gerhard.fr

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel




_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel