|
@@ -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()); //图片腐蚀,缩小高亮(白色)区域
|