I have a camera which has a four color sensor. I have debayered some raw images and stored as four channel tiff files using libraw (yes, I know it can convert to a 3 channel tiff if a color space is specified but I have reasons for wanting to do this manually. The reasons why are not important here).
I have been trying to use gmic to take this 4 channel tif and multiply it by the Camera2RGB matrix
[1.6374,-0.2528,-0.0035,-0.3811;
0.0672,0.8224,-0.5306,0.6410;
-0.0009,-0.3551,1.4153,-0.0593]
This matrix as the name implies takes the four color channel raw data and consolidates it into three channel raw RGB format. However I cannot seem to get the expected result using the mmul command, and mix_rgb only allows 3x3 matrices it seems. Is what I am wanting to do possible with gmic?