首页 | 本学科首页   官方微博 | 高级检索  
     检索      

改进Niblack算法的光照不均匀QR码识别研究
引用本文:李健,申利未,胡雅婷,李瑞钊,任虹宾,丁小奇.改进Niblack算法的光照不均匀QR码识别研究[J].农业工程学报,2019,35(13):191-196.
作者姓名:李健  申利未  胡雅婷  李瑞钊  任虹宾  丁小奇
作者单位:1. 吉林农业大学信息技术学院,长春 130118;2. 吉林省生物信息学研究中心,长春 130118,1. 吉林农业大学信息技术学院,长春 130118,1. 吉林农业大学信息技术学院,长春 130118;2. 吉林省生物信息学研究中心,长春 130118,1. 吉林农业大学信息技术学院,长春 130118,1. 吉林农业大学信息技术学院,长春 130118,1. 吉林农业大学信息技术学院,长春 130118
基金项目:国家自然科学基金项目(41601454)
摘    要:QR码作为农产品可追溯体系的信息载体,一直是农业领域的科研热点。在实际应用中,溯源环境的复杂多变易使设备采集到光照不均匀的QR码图像而增加解码流程中二值化的难度,影响后续解码。该文针对原始Niblack算法自适应性不足的缺陷,提出一种自适应邻域窗口和修正系数的Niblack算法,该算法依据QR码图像的分辨率和灰度值,动态调整修正系数和邻域窗口,进行自适应二值化处理。分别用改进Niblack算法,原始Niblack算法和Otsu算法处理设备无法识别的不同光照环境下、不同程度的光照不均匀QR码图像,试验数据表明经改进算法处理后的识别成功率为74.2%,高出原始Niblack算法18.4%,高出Otsu算法71.7%,具有较高的鲁棒性。这一结果对农产品在各种光照不均匀环境中的溯源提供了参考。

关 键 词:图像处理  光照  识别  农产品可追溯体系  QR码  二值化  Niblack算法
收稿时间:2019/3/22 0:00:00
修稿时间:2019/6/28 0:00:00

Research on illumination uneven QR code recognition based on improved Niblack algorithm
Li Jian,Shen Liwei,Hu Yating,Li Ruizhao,Ren Hongbin and Ding Xiaoqi.Research on illumination uneven QR code recognition based on improved Niblack algorithm[J].Transactions of the Chinese Society of Agricultural Engineering,2019,35(13):191-196.
Authors:Li Jian  Shen Liwei  Hu Yating  Li Ruizhao  Ren Hongbin and Ding Xiaoqi
Institution:1. College of Information Technology, Jilin Agricultural University, Changchun 130118, China; 2. Jilin Province Bioinformatics Research Center, Changchun 130118, China,1. College of Information Technology, Jilin Agricultural University, Changchun 130118, China,1. College of Information Technology, Jilin Agricultural University, Changchun 130118, China; 2. Jilin Province Bioinformatics Research Center, Changchun 130118, China,1. College of Information Technology, Jilin Agricultural University, Changchun 130118, China,1. College of Information Technology, Jilin Agricultural University, Changchun 130118, China and 1. College of Information Technology, Jilin Agricultural University, Changchun 130118, China
Abstract:Abstract: As the information carrier of agricultural product traceability system, QR code has always been a research hotspot in the agricultural field. In practical applications, the complexity of the traceability environment makes it easy for the QR code scanner to acquire locally highlighted or shaded QR code images. In the process of binarization, the target pixels of these uneven illumination QR code images are easily misjudged as background pixels or background pixels are misjudged as target pixels which cause the image information lost, resulting in lower recognition rate, this limits the inquirer to some extent. According to the selection of the threshold, the image binarization algorithms can be divided into global threshold methods and local threshold methods. By setting the segmentation threshold on the grayscale image, all the pixels in the grayscale image are divided into two categories: The target pixel and the background pixel. The gray value of the target pixel is set to 0, and the visual representation is black; the gray value of the background pixel is set to 255, and the visual representation is white. When the gray value of the pixel is greater or equal to the set segmentation threshold, it will be divided into the background pixel class; when it is smaller the set segmentation threshold, it will be divided into the target pixel class. The global threshold method represented by the Otsu algorithm is suitable for an image with a clear bimodal and uniform illumination in a gray histogram, but since the threshold is a fixed value, the fidelity is low when processing an image with uneven illumination. As a local threshold method, the Niblack algorithm can dynamically calculate the neighborhood center threshold in combination with the gray mean and variance in the neighborhood window. That is, for each pixel, the Niblack algorithm can calculate the corresponding threshold. Therefore, there is a good effect in splitting an image with uneven illumination, but the segmentation effect depends on the preset of the local window and the correction coefficient value. Since the correction coefficient and neighborhood window are fixed values selected according to experience, it is easy to cause the correction coefficient or neighborhood window used in some scenes to be unsuitable for another scene, so the original Niblack algorithm is less versatile. This paper proposes a Niblack algorithm that adaptive neighborhood window and correction coefficient. The algorithm dynamically adjusts the size of the neighborhood window according to the resolution of the QR code image, according to the gray mean and variance of the pixel points in the neighborhood window. The gray value information of the whole image is dynamically adjusted and corrected to realize adaptive binarization processing. Experiments show that compared with the original Niblack algorithm, the algorithm can more effectively segment the uneven light QR code image that the device cannot recognize. After the algorithm is processed, the recognition success rate of the unrecognizable QR code image reaches 74.2%, which is 18.4% higher than the original Niblack algorithm and is 71.7% higher than Otsu algorithm. The study has certain reference significance for the traceability of agricultural products in the uneven illumination environment.
Keywords:image processing  illumination  recognition  agricultural products traceability system  QR code  binarization  Niblack algorithm
本文献已被 CNKI 等数据库收录!
点击此处可从《农业工程学报》浏览原始摘要信息
点击此处可从《农业工程学报》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号