After do that, sometimes the camera get only green pictures, there is no other colors.
So I decided to read the AWB mode and gains that are really in camera.
I succeed in reading AWB mode with taht piece of code
Code: Select all
MMAL_PARAMETER_AWBMODE_T awbMode;
awbMode.hdr.id = MMAL_PARAMETER_AWB_MODE;
awbMode.hdr.size = sizeof(awbMode);
status = mmal_port_parameter_get(m_cameraComponent->control, &awbMode.hdr);
if (status == MMAL_SUCCESS)
{
LOG_INFORMATION_F("AWB mode: %u", (unsigned)awbMode.value);
}
else
{
LOG_WARNING("Unable to get AWB mode parameter");
}Code: Select all
MMAL_PARAMETER_AWB_GAINS_T awbGains;
awbGains.hdr.id = MMAL_PARAMETER_CUSTOM_AWB_GAINS;
awbGains.hdr.size = sizeof(awbGains);
status = mmal_port_parameter_get(m_cameraComponent->control, &awbGains.hdr);
if (status == MMAL_SUCCESS)
{
LOG_INFORMATION_F("AWB gains: B: %d/%d R:%d/%d", awbGains.b_gain.num, awbGains.b_gain.den, awbGains.r_gain.num, awbGains.r_gain.den);
}
else
{
LOG_WARNING_F("Unable to get AWB gains parameter: %u", (unsigned)status);
}Any Idea why my picture is green ? And why I can't read gains ?
