采集到的QR码图像首先需要转换为二值图像然后译码识别,但是在使用摄像头采集QR码图像中存在光照不均和反光等现象,经过全局二值化处理后会有全白或全黑的区域,而经过局部二值化处理会有"伪边界",并且计算量大导致耗时长。本文提出一种联合阈值二值化方法,首先对QR码图像采用全局二值化方法,然后利用QR码图像特征找到光照不均或反光的区域,并对该区域采用一种嵌套式的局部二值化方法,这种方法提高了准确率,减少了计算时间并且防止"伪边界"的产生。将最后结果和几种常用的二值化算法比较,实验结果表明:使用该方法可以明显提高QR码识别的效率和准确率。
A QR code picture was converted to the binary image which was used to identify. Nonuniform illumination and reflection would inevitablly effect the picture, and the image would present the error area which is white or black in the processing of global binarization. Pseudo-boundary would appeare in the processing of local binarization, and the calculation would take a long time. A joint binarization method is proposed. Firstly, the picture was converted with the global bianarization, and evaluated the error area which was not fit the QR code characteristics. Secondly, a new local bianarization method was used to convert the error area and avoid to generate the pseudo-boundary. The experiments show that the new bianarization processing is efficiency and accuracy.