I’m trying to create a custom tonemap using libargus. I’m using the example 10_camera_recording:
https://docs.nvidia.com/jetson/l4t-multimedia/l4t_mm_camera_recording.html
I’ve then modified the program to add the following code:
// Get autocontrol settings
IAutoControlSettings * settings = interface_cast<IAutoControlSettings>(iRequest->getAutoControlSettings());
std::vector<float> curve;
float value = 0;
int points = settings->getToneMapCurveSize(RGB_CHANNEL_R);
for (int i = 0; i < points; i++)
{
curve.push_back(value);
value = std::pow(i/129.0f, 2.2);
}
settings->setToneMapCurveEnable(true);
settings->setToneMapCurve(RGB_CHANNEL_R, curve);
settings->setToneMapCurve(RGB_CHANNEL_G, curve);
settings->setToneMapCurve(RGB_CHANNEL_B, curve);
I’ve tried a linear curve, different power curves, etc. But the image starts out and the exposure drives to 0. So the image is completely black after a few seconds. Any ideas why this happens? It almost seems like the auto exposure algorithm is AFTER this curve. Which is odd. So the autoexposure system seems to see a bright image and drives it darker. Any ideas how to fix this?