|
|
@ -1587,8 +1587,12 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat)
|
|
|
|
"hair drier", "toothbrush"
|
|
|
|
"hair drier", "toothbrush"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
cv::Scalar borderColor(m_pRecognizationCfg->borderColor & 0xFF, (m_pRecognizationCfg->borderColor & 0xFF00) >> 8, (m_pRecognizationCfg->borderColor & 0xFF0000) >> 16);
|
|
|
|
cv::Scalar borderColor(m_pRecognizationCfg->borderColor & 0xFF, (m_pRecognizationCfg->borderColor & 0xFF00) >> 8, (m_pRecognizationCfg->borderColor & 0xFF0000) >> 16);
|
|
|
|
cv::Scalar textColor(m_pRecognizationCfg->textColor & 0xFF, (m_pRecognizationCfg->textColor & 0xFF00) >> 8, (m_pRecognizationCfg->textColor & 0xFF0000) >> 16);
|
|
|
|
cv::Scalar textColor(m_pRecognizationCfg->textColor & 0xFF, (m_pRecognizationCfg->textColor & 0xFF00) >> 8, (m_pRecognizationCfg->textColor & 0xFF0000) >> 16);
|
|
|
|
|
|
|
|
float minSizeW = m_pRecognizationCfg->minSize > 0 ? (mPhotoInfo.width * m_pRecognizationCfg->minSize / 100) : 0;
|
|
|
|
|
|
|
|
float minSizeH = m_pRecognizationCfg->minSize > 0 ? (mPhotoInfo.height * m_pRecognizationCfg->minSize / 100) : 0;
|
|
|
|
|
|
|
|
|
|
|
|
for (std::vector<IDevice::RECOG_OBJECT>::const_iterator it = objs.cbegin(); it != objs.cend();)
|
|
|
|
for (std::vector<IDevice::RECOG_OBJECT>::const_iterator it = objs.cbegin(); it != objs.cend();)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (it->label >= m_pRecognizationCfg->items.size())
|
|
|
|
if (it->label >= m_pRecognizationCfg->items.size())
|
|
|
@ -1604,6 +1608,15 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat)
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (m_pRecognizationCfg->minSize > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (it->w < minSizeW || it->h < minSizeH)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
it = objs.erase(it);
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ((mPhotoInfo.recognization & 0x2) != 0)
|
|
|
|
if ((mPhotoInfo.recognization & 0x2) != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cv::Rect rc(it->x, it->y, it->w, it->h);
|
|
|
|
cv::Rect rc(it->x, it->y, it->w, it->h);
|
|
|
|