# WB - from Kelvin to RGB

Discussion in 'Digital Photography' started by Radek D, Jul 27, 2006.

Hello !
Anybody know function how can translate
WB Color Temperature in Kelvin to RGB pixels values
for exemple 3000 K = (+4 R) & (-5 G) & (0 B)

2. ### kctanGuest

you confuse WB with RGB

"Radek D" <> wrote in message
news:eaam2k\$4et\$...
> Hello !
> Anybody know function how can translate WB Color Temperature in Kelvin to
> RGB pixels values for exemple 3000 K = (+4 R) & (-5 G) & (0 B)

kctan, Jul 27, 2006

3. ### aclGuest

kctan wrote:
> you confuse WB with RGB
>

How is white balancing achieved? By multiplying the each of the R, G
and B channels by a different multiplier.

acl, Jul 27, 2006
4. ### aclGuest

> Hello !
> Anybody know function how can translate
> WB Color Temperature in Kelvin to RGB pixels values
> for exemple 3000 K = (+4 R) & (-5 G) & (0 B)

1) It is a multiplier, ie each channel gets multiplied by a number
2) Even if the raw converter assumed a black body spectral distribution
for the source (ie only the temperature must be specified), we would
also need to know the exact spectral response of the R, G and B filters
for the specific camera under discussion. This may or may not be
standardised between different cameras/sensors; I don't know.

You can find all the answers you ever wanted by reading the source code
of David Coffin's dcraw at
http://www.cybercom.net/~dcoffin/dcraw/

Sorry, but reading C code (even my own) gives me headaches, so I never
read dcraw.c and therefore don't know.

acl, Jul 27, 2006
5. ### Bart van der WolfGuest

"acl" <> wrote in message
news:...
SNIP
> How is white balancing achieved? By multiplying the each of the R, G
> and B channels by a different multiplier.

In linear gamma space, yes.

Bart

Bart van der Wolf, Jul 28, 2006
6. ### Bart van der WolfGuest

"Radek D" <> wrote in message
news:eaam2k\$4et\$...
> Hello !
> Anybody know function how can translate WB Color Temperature in
> Kelvin to RGB pixels values for exemple 3000 K = (+4 R) & (-5 G) &
> (0 B)

Possibly more than you catered for, but nevertheless:
<http://www.brucelindbloom.com/Eqn_XYZ_to_T.html>

Bart

Bart van der Wolf, Jul 28, 2006