I have a matrix that will convert my raw camera RGB data to sRGB space, for example when I apply the matrix to the white balance corrected raw data in MATLAB, I get a good looking output image.
I want to create a DNG file from this raw data, but I can't figure out how to generate the ForwardMatrix. For that matter, I'm not even sure whether it is the ForwardMatrix I should be generating or the ColorMatrix (or both?).
To simplify things let's assume the cam_to_sRGB matrix I have is for the A illuminant and the image was captured under that same illuminant. (I can extrapolate later for high color temperature matrix.)
What exact steps must I take to generate the ForwardMatrix1 given the cam_to_sRGB matrix that I have? What should the ColorMatrix1 be in this case? (identity?)
Specific example:
cam_to_sRGB =
1.2963 | -0.2025 | -0.0939 |
-0.4789 | 1.5728 | -0.0939 |
-0.1007 | -0.7605 | 1.8612 |
What would the ForwardMatrix1 be? What would the ColorMatrix1 be?
I found the DNG spec not helpful. It tells me how to generate an image given already existing DNG matrixes. I need to know how to generate those matrixes in the first place.
Thanks,
Ken