浏览代码

【功能修改】(黄根)增大二维码识别区域,以优化二维码识别成功率
【工作量】2h
【评审人】叶长城

huanggen 2 月之前
父节点
当前提交
e9cf1c3f5d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/main/cpp/paperPreIdentify.cpp

+ 1 - 1
app/src/main/cpp/paperPreIdentify.cpp

@@ -89,7 +89,7 @@ string getQrcode(Mat tImg, int nX, int nY)
     string strRet = "";
     if(tImg.empty())
         return strRet;
-    Mat roiMat = tImg(Rect(nX, nY, tImg.cols / 4, tImg.rows / 5));
+    Mat roiMat = tImg(Rect(nX, nY, tImg.cols / 4, tImg.rows / 4));
     Mat imgGray;
     cvtColor(roiMat, imgGray, CV_BGR2GRAY);  // 灰度化
     erode(imgGray, imgGray, Mat());     //图片腐蚀,缩小高亮(白色)区域