Q Request for assistance with LibRaw code

Hi there folks, I am having some issues with processing of colour balance in the code of DeepSkyStacker that reads raw files using LibRaw. Given the knowledge level necessary to write darktable, I suspect that there some here who may be able to help me.

The problem I have is that if I try to apply “daylight colour balance” I end up with an image which is somewhat too red as compared to how e.g. IrfanView or the Windows file explorer icon view shows the file.

If you are up for reviewing a few hundred lines of C++ code please contact me at david.partridge@perdrix.co.uk

Many thanks, David

You are sure that the color difference is due to your code, and not to differences in colour management (e.g. a display profile being applied by darktable and not by the other two)?

Also, Irfanview and file explorer use the embedded pjeg preview, which isn’t the same as an image produced by LibRaw.

1 Like

No, I’m not 100% sure that my code is in error, but I have distinct suspicions it may be. Which is why I’m looking for review by someone who knows thist stuff better than I

In Filmulator I found that the “daylight” reference color balance simply is not usable as a fixed reference. LibRaw calculates it as a derivative of whatever color matrix was used.

All I do is use that as a vague starting point to calculate temperature and tint for the user interface, which isn’t portable between different applications anyway so any errors there are not problematic.

I found the problem! It wasn’t my code at all. It relates to the choice of the correct White Balance to use for a Canon EOS 60Da (the same is likely true of the Canon EOS Ra and the Nikon D810A).

If I process the data using “Daylight White Balance”, the Daylight White Balance values used are those that are appropriate for the EOS 60D (not the 60Da) because the camera model reported in the Raw files is set to EOS 60D (oops – that’s a firmware bug).

In this case all images acquire a very distinct red cast which is really not what you want at all!

If you set the camera to use Daylight White Balance and process that data using the Camera White Balance values then the correct white balance for an EOS60Da is applied.

David

1 Like