|
|
|
@ -2017,7 +2017,7 @@ void CPhoneDevice::UpdateSimcard(const std::string& simcard)
|
|
|
|
|
m_simcard = simcard;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CPhoneDevice::ProcessRawCapture(bool result, int numberOfCaptures, const std::string& pathsJoinedByTab, long photoId)
|
|
|
|
|
bool CPhoneDevice::ProcessRawCapture(bool result, int numberOfCaptures, const std::string& pathsJoinedByTab, bool frontCamera, int rotation, long photoId)
|
|
|
|
|
{
|
|
|
|
|
std::vector<std::string> paths = split(pathsJoinedByTab, "\t");
|
|
|
|
|
|
|
|
|
@ -2033,8 +2033,39 @@ bool CPhoneDevice::ProcessRawCapture(bool result, int numberOfCaptures, const st
|
|
|
|
|
hdrplus::hdrplus_pipeline pipeline;
|
|
|
|
|
cv::Mat mat;
|
|
|
|
|
pipeline.run_pipeline(paths, 0, mat);
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_ERROR, "Finish HDR CH=%u IMGID=%u", (uint32_t)mPhotoInfo.channel, (uint32_t)mPhotoInfo.photoId);
|
|
|
|
|
|
|
|
|
|
mat = convert16bit2_8bit_(mat.clone());
|
|
|
|
|
|
|
|
|
|
if (rotation >= 0)
|
|
|
|
|
{
|
|
|
|
|
if (rotation == 90)
|
|
|
|
|
{
|
|
|
|
|
cv::Mat tempPic;
|
|
|
|
|
cv::transpose(mat, tempPic);
|
|
|
|
|
cv::flip(tempPic, mat, 1);
|
|
|
|
|
}
|
|
|
|
|
else if (rotation == 180)
|
|
|
|
|
{
|
|
|
|
|
if (frontCamera)
|
|
|
|
|
{
|
|
|
|
|
flip(mat, mat, 0);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
cv::flip(mat, mat, -1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (rotation == 270)
|
|
|
|
|
{
|
|
|
|
|
cv::Mat tempPic;
|
|
|
|
|
cv::transpose(mat, tempPic);
|
|
|
|
|
cv::flip(tempPic, mat, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_ERROR, "Finish rotation CH=%u IMGID=%u", (uint32_t)mPhotoInfo.channel, (uint32_t)mPhotoInfo.photoId);
|
|
|
|
|
}
|
|
|
|
|
cv::cvtColor(mat, mat, cv::COLOR_RGB2BGR);
|
|
|
|
|
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_ERROR, "Finish Processing Raw Capture CH=%u IMGID=%u", (uint32_t)mPhotoInfo.channel, (uint32_t)mPhotoInfo.photoId);
|
|
|
|
|