Question about XYZ output color

Hi,
I had a few questions about the XYZ output color option that I can use before calling dcraw_process.

1. Is the XYZ image generated by applying inv(cam_xyz) on the RGB data sensor data (after WB etc)?

2. What is the white-point when this XYZ is generated? Is it d65?

3. How do other options such as no_auto_bright used when the output is in XYZ space? Not really sure how contrast stretching can be applied to an output in an XYZ space?

I was running an experiment where I was using dcraw_process to render an sRGB image versus rendering an XYZ image and using a tool such as MATLAB (they have an xyz2rgb function) to convert it into sRGB. The two images look different. The XYZ image when converted to sRGB using MATLAB package appears more whitish.

You can find the images in the drive location below:
https://photos.app.goo.gl/eGrCDUwMFdaB3bvY7

Any help would be appreciated.

Regards,
Dinesh

Forums: 

XYZ output is performed by

XYZ output is performed by applying color conversion matrix in convert_to_rgb() function

With default dcraw_emu settings output is scaled to saturate 1% of pixels, so result may differ for dcraw_emu -o 5 (than converted to sRGB)

-- Alex Tutubalin

Thanks!

I will look into the code and follow up if I have any questions. Also, what does the RAW colorspace mean? Does it mean the Camera's RGB space?

Dinesh