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