|
|
@ -1569,6 +1569,14 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat)
|
|
|
|
cv::Point lt2(0, lt.y - 2 * ratio);
|
|
|
|
cv::Point lt2(0, lt.y - 2 * ratio);
|
|
|
|
cv::Point rb(0 + textSize.width, lt2.y + textSize.height + 8 * ratio);
|
|
|
|
cv::Point rb(0 + textSize.width, lt2.y + textSize.height + 8 * ratio);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (rb.x > (int)width - 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
rb.x = (int)width - 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (rb.y > (int)height - 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
rb.y = (int)height - 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
cv::Mat roi = mat(cv::Rect(lt2, rb));
|
|
|
|
cv::Mat roi = mat(cv::Rect(lt2, rb));
|
|
|
|
cv::Mat clrMat(roi.size(), CV_8UC3, scalarWhite);
|
|
|
|
cv::Mat clrMat(roi.size(), CV_8UC3, scalarWhite);
|
|
|
|
double alpha = 0.2;
|
|
|
|
double alpha = 0.2;
|
|
|
|