|
|
@ -2254,6 +2254,12 @@ bool CPhoneDevice::onOneCapture(std::shared_ptr<ACameraMetadata> characteristics
|
|
|
|
closeThread.detach();
|
|
|
|
closeThread.detach();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (rgb.empty())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
TakePhotoCb(0, photoInfo, "", takingTime);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CPhoneDevice* pThis = this;
|
|
|
|
CPhoneDevice* pThis = this;
|
|
|
|
std::thread th([pThis, characteristics, result, photoInfo, osds, path, rgb, facing, sensorOrientation, ldr, duration, takingTime]()
|
|
|
|
std::thread th([pThis, characteristics, result, photoInfo, osds, path, rgb, facing, sensorOrientation, ldr, duration, takingTime]()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2697,11 +2703,20 @@ bool CPhoneDevice::onBurstCapture(std::shared_ptr<ACameraMetadata> characteristi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cv::cvtColor(rgb, rgb, cv::COLOR_RGB2BGR);
|
|
|
|
cv::cvtColor(rgb, rgb, cv::COLOR_RGB2BGR);
|
|
|
|
#endif // USING_EXEC_HDRP
|
|
|
|
#endif // USING_EXEC_HDRP
|
|
|
|
bool res = pThis->PostProcessPhoto(photoInfo, osds, path, cameraInfo, rgb);
|
|
|
|
|
|
|
|
if (res)
|
|
|
|
if (rgb.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// TakePhotoCb(2, photoInfo, path, takingTime);
|
|
|
|
pThis->TakePhotoCb(0, photoInfo, path, takingTime);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bool res = pThis->PostProcessPhoto(photoInfo, osds, path, cameraInfo, rgb);
|
|
|
|
|
|
|
|
if (res)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// TakePhotoCb(2, photoInfo, path, takingTime);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
th.detach();
|
|
|
|
th.detach();
|
|
|
@ -3011,11 +3026,19 @@ bool CPhoneDevice::onBurstCapture(std::shared_ptr<ACameraMetadata> characteristi
|
|
|
|
cv::cvtColor(rgb, rgb, cv::COLOR_RGB2BGR);
|
|
|
|
cv::cvtColor(rgb, rgb, cv::COLOR_RGB2BGR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool res = pThis->PostProcessPhoto(photoInfo, osds, path, cameraInfo, rgb);
|
|
|
|
if (rgb.empty())
|
|
|
|
if (res)
|
|
|
|
{
|
|
|
|
|
|
|
|
pThis->TakePhotoCb(0, photoInfo, path, takingTime);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// TakePhotoCb(2, photoInfo, path, takingTime);
|
|
|
|
bool res = pThis->PostProcessPhoto(photoInfo, osds, path, cameraInfo, rgb);
|
|
|
|
|
|
|
|
if (res)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// TakePhotoCb(2, photoInfo, path, takingTime);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
th.detach();
|
|
|
|
th.detach();
|
|
|
|