I am working on a Jetson Nano module on a custom carrier board connected to 2 x Sony IMX415 sensors.
I need to customize the camera_override.isp file to include:
-
a Color Correction Matrix
-
a Tone Curve for each RGB color channel
I discovered that it is quite simple to add the color correction matrix such as:
colorCorrection.srgbMatrix[0] = { 1.5662, -0.3302, 0.0268};
colorCorrection.srgbMatrix[1] = { -0.5544, 1.8120, -0.8347};
colorCorrection.srgbMatrix[2] = { -0.0118, -0.4818, 1.8079};
What is not clear is how to input the tone curves.
Apparently each curve is as follow:
tc.v2.user.presets[0].Gamma.Value=2.4000;
tc.v2.user.presets[0].UserCurve.Enable=FALSE;
tc.v2.user.presets[0].UserCurve.Points={ 0.0000, 0.0000, 0.2500, 0.2500, 0.5000, 0.5000, 0.7500, 0.7500, 1.0000, 1.0000 };
tc.v2.user.presets[0].CurveControl.Enable=TRUE;
tc.v2.user.presets[0].CurveControl.AdjustHighlights=0.7500;
tc.v2.user.presets[0].CurveControl.MidtoneBrightness=0.5000;
tc.v2.user.presets[0].CurveControl.MidtoneContrast=0.5000;
tc.v2.user.presets[0].CurveControl.AdjustShadows=0.2500;
tc.v2.user.presets[0].Brightness.Enable=FALSE;
tc.v2.user.presets[0].Brightness.Value=1.0000;
There are 9 element in the tc.v2.user.preset vector and I don’t know for which RGB channel are applicable.
These other parameters are undocumented:
- are such parameters mandatory ?
- or optional ?
- which is the meaning ?
tc.v2.user.UseIndices={ 0, 0, 0, 0, 0, 0, 0, 0, 0 };
tc.v2.user.FlashUseIndices= { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
tc.v2.UseAxisX={ 1068.0000, 2136.0000, 9970.0000, 14242.0000 };
tc.v2.UseAxisY={ 1.0000, 1.0000, 1.0000, 1.0000 };
tc.v2.FlashUseAxisX={ 1068.0000, 2136.0000, 9970.0000, 14242.0000 };
tc.v2.FlashUseAxisY={ 1.0000, 1.0000, 1.0000, 1.0000 };
tc.v2.initStats.brightness=3811;
tc.v2.initStats.tcdre=1.0;
Thanks
Andrea