|
|
@ -1254,16 +1254,33 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat)
|
|
|
|
photoInfo.autoExposure = 0;
|
|
|
|
photoInfo.autoExposure = 0;
|
|
|
|
if (captureResult.avgY == 0)
|
|
|
|
if (captureResult.avgY == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
photoInfo.exposureTime = 400;
|
|
|
|
photoInfo.exposureTime = 600;
|
|
|
|
photoInfo.sensitivity = 2000;
|
|
|
|
photoInfo.sensitivity = 2500;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (captureResult.avgY <= 6)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
photoInfo.exposureTime = captureResult.exposureTime / 1000000 * 150 / captureResult.avgY;
|
|
|
|
|
|
|
|
photoInfo.sensitivity = photoInfo.sensitivity * 80 / captureResult.avgY;
|
|
|
|
|
|
|
|
if (photoInfo.sensitivity < captureResult.sensitivity)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
photoInfo.sensitivity = captureResult.sensitivity;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (photoInfo.sensitivity > 3000)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
photoInfo.sensitivity = 3000;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
photoInfo.exposureTime = captureResult.exposureTime / 1000000 * 120 / captureResult.avgY;
|
|
|
|
photoInfo.exposureTime = captureResult.exposureTime / 1000000 * 120 / captureResult.avgY;
|
|
|
|
photoInfo.sensitivity = photoInfo.sensitivity * 60 / captureResult.avgY;
|
|
|
|
photoInfo.sensitivity = photoInfo.sensitivity * 60 / captureResult.avgY;
|
|
|
|
if (photoInfo.sensitivity > 2000)
|
|
|
|
if (photoInfo.sensitivity < captureResult.sensitivity)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
photoInfo.sensitivity = captureResult.sensitivity;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (photoInfo.sensitivity > 3000)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
photoInfo.sensitivity = 2000;
|
|
|
|
photoInfo.sensitivity = 3000;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1282,7 +1299,7 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat)
|
|
|
|
char str[128] = { 0 };
|
|
|
|
char str[128] = { 0 };
|
|
|
|
snprintf(str, sizeof(str), "AE=%u EXPS=%u%s(%d) ISO=%d AF=%u LDR=%d(%u) AFS=%u AES=%u SCENE=%d AWB=%u %0.1fx", captureResult.autoExposure,
|
|
|
|
snprintf(str, sizeof(str), "AE=%u EXPS=%u%s(%d) ISO=%d AF=%u LDR=%d(%u) AFS=%u AES=%u SCENE=%d AWB=%u %0.1fx", captureResult.autoExposure,
|
|
|
|
extime, extimeunit, captureResult.compensation,
|
|
|
|
extime, extimeunit, captureResult.compensation,
|
|
|
|
captureResult.sensitibity,
|
|
|
|
captureResult.sensitivity,
|
|
|
|
captureResult.autoFocus,
|
|
|
|
captureResult.autoFocus,
|
|
|
|
// isnan(captureResult.FocusDistance) ? 0 : captureResult.FocusDistance,
|
|
|
|
// isnan(captureResult.FocusDistance) ? 0 : captureResult.FocusDistance,
|
|
|
|
GpioControl::getLightAdc(), (unsigned int)captureResult.avgY,
|
|
|
|
GpioControl::getLightAdc(), (unsigned int)captureResult.avgY,
|
|
|
|