cam_xyz array differs from exiv2 output on Sony A7C
I found that the cam_xyz array returned by libraw doesn't match the one I got in exiv2 after going through Adobe DNG converter. I don't know which one is right. (The two match on my older D3300 camera).
I've uploaded a sample image on https://drive.google.com/drive/folders/1tBty_PqV_3LzDBytnj7d5dbH_C66Vu3d...
The cam_xyz array can be obtained from libraw as follow:
import rawpy import numpy as np fpath = DSC01526.ARW # or .dng rawpy_img = rawpy.imread(fpath) rawpy_img.rgb_xyz_matrix
-> [[ 0.5271, -0.0712, -0.0347], [-0.6153, 1.3653, 0.2763],[-0.1601, 0.2366, 0.7242]]
Whereas I can get it with exiv2 using
exiv2 -pt '/orb/Pictures/ITookAPicture/2022/03/19_16dAlleeDesCharmes/DSC01526.dng' 2>/dev/null| grep ColorMatrix2 and I obtain
Exif.Image.ColorMatrix2 SRational 9 7374/10000 -2389/10000 -551/10000 -5435/10000 13162/10000 2519/10000 -1006/10000 1795/10000 6552/10000 (or simply
[[0.737399995, -0.238900006, -0.0551000014], [-0.543500006, 1.31620002, 0.251899987], [-0.100599997, 0.179499999, 0.655200005]])
I don't know which is right and how either of these are acquired.