rawpy icon indicating copy to clipboard operation
rawpy copied to clipboard

Incorrect 'camera_whitebalance' matrix

Open StudioPetrikas opened this issue 1 year ago • 2 comments

Hello and thank you once again for your excellent work.

Issue:

camera_whitebalance returns [0, 1, 0], when As Shot White XY is used in the EXIF (instead of a more common As Shot Neutral)

Usually, when the WB is presented in a different manner, camera_whitebalance returns [0, 0, 0]

However, when processing is done with use_camera_wb = True the output image is balanced to "As Shot" properly, which mean that libraw or rawpy does calculate it OK somewhere, somehow.

Extra info:

I am trying to implement a different highlight-recovery method than the ones provided by libraw. Which means I need to work on un-scaled, un-balanced, un-matrix'ed values, which, after recovery, I have to re-scale, re-balance and re-matrix.

rawpy provides enough information from 90% of the files I've tested. Except for the ones that have White Balance provided as 'As Shot White XY'.

In the end it means that I'm not able to 'camera-balance' the files myself, since I only get access to daylight_whitebalance and color_matrix which can only get me to D65.

If you need a test-file, please let me know, I'll ask for permission to share it.

Thank you very much in advance. If you need any additional information please let me know.

StudioPetrikas avatar Dec 09 '24 15:12 StudioPetrikas

Feel free to propose an enhancement via a pull request!

letmaik avatar Jan 19 '25 16:01 letmaik

I do beginner-level Python coding. Understanding C libraries and how they "connect" to Python is... let's say unrealistic.

Just bringing an issue to light. Anyway, thanks.

StudioPetrikas avatar Jan 19 '25 16:01 StudioPetrikas