How to covert raw RGB to sRGB

Image icontestraw1.jpg316.65 KB

I read a raw file and got its Bayer values. If I unpack the RGB values into 3 channels (with half image size) and display it, the result looks very green. I know there is some matrix could be used to convert the raw RGB to sRGB. Can anyone tell me which matrix I should use? I find a RGB2XYZ matrix but not sure how to use it. I do not need any post-processing, and just need the color to be correct.

Thanks in advance!



You need to apply white

You need to apply white balance (usually, before demosaic stage)

-- Alex Tutubalin