Closed JVision closed 4 years ago
The white balance coefficients are obtained from EXIF data. For example, LibRaw's cam_mul
gives the as-shot white balance coefficients.
https://www.libraw.org/docs/API-datastruct.html#libraw_colordata_t
Thank you for the prompt response. I'd like to keep my code to be short and concise. kind of reluctant to include another library such as Libraw. Is there a lightweight way to do so? or could you please tell me which EXIF tag specifies the values? I am reading the dng sdk 1.5 specifcation and suspect that AsShotNeutral is the default camera WB. am i right? Thanks again for your kind response.
Looking at my Ricoh GR DNG files, I would venture to say that the "As Shot Neutral" is the reciprocal of the WB multipliers.
In my Canon 5D .CR2 files, it appears both in "WB RGGB Levels As Shot" and "WB RGGB Levels", but these are integers that you need to divide by the minimum of the four.
The reason to use a library for decoding raws is because all cameras do it differently...
Ok. problem solved. libraw is the way to go. appreciated!
Hi CarVac,
As you pointed early in another post, the best demosaicing result comes from white balanced data? How to achieve that using the API?
I found there is already an implementation of white balance application. However, the color (RGB) scales/coefficents needs to be known beforehand. What is the correct way to get the coeffcients?
Best JVision