Hacker News new | ask | show | jobs
by vortico 2533 days ago
White-balancing is a function

    f(R, G, B, T_from, T_to) -> (R, G, B)
which relies on the model of blackbody radiation and a model of the wavelength distribution definitions behind the (R, G, B) values, i.e. the particular color space you're working in. When working with a manufacturer's RAW format,

Auto white-balancing is finding `T_to` so that the color values are "most balanced". It is up to the manufacturer how this is decided (and might be proprietary secret sauce). Custom white-balancing is taking a known white or grayscale object and finding `T_to` which would yield something close to (1, 1, 1) for pixels of that object.

1 comments

I think I accidentally erased a sentence in an edit...

When working with a manufacturer's RAW format, there is a defined way to get the values (R, G, B, T_from) as a result of demosaicing. For example, in the author's photo post-demosaicing, the manufacturer calibrates the final data to obtain (I'm completely making this up) T_from = 2700K. Then using that information, you can correctly adjust the temperature to any other temperature using `f` above.