摘要
目的 QR码是目前最被广泛使用的2维条形码,是一种通过拍照或扫描,方便且快速取得内容信息的标签。QR码具备高容错特性,即使其内容遭受一定程度的扭曲或污损仍可正常运作,从而造就它的高普及率及大量商业应用。传统QR码以黑色与白色的方格模组呈现,让机器可以容易定位与辨识,但杂乱的黑白方格视觉效果单调,而QR码常常占据不可忽略的展示区域,所以对有视觉吸引力的QR码的需求日益增长。为此提出一种QR码视觉编码算法,将QR码以主题彩色图像外观呈现。方法本文算法将主题图像分割成大小相同的非重叠区块,并设计一个高斯调变函数来修改各区块的平均亮度,使区块呈现出的可感应亮度与所对应的QR码模组所代表的位元值(0或1)相同。另外,可以根据QR码的应用场景以及人眼对不同频率噪声的敏感度设置不同的参数来调整模组亮度感应区域颗粒的大小。结果设置不同的参数合成彩色QR码图像,测试它们的正确译码机率,确定最优的参数,保证译码可靠性的同时,使得QR码更容易被人眼辨识。与相关文献的实验结果相比,提出算法生成的QR码兼具高品质视觉效果和高辨识率。结论提出了一个可以自动将彩色图像融合到黑白QR码当中的算法,可以轻易得到一幅具有高识别度的图像QR码,不仅颠覆了传统QR码只有黑白两色的外观,也符合QR码标准规范,具备令人满意的辨识率,能相容于任何译码系统,提高了使用接受度,可应用于营销、广告等方面。
Objective As information tags, 2D bar codes can easily be accessed by taking a picture or scanning. They pos- sess the advantages of large data capacity, high decoding reliability, and wide range of encoding. Therefore, they are wide- ly used worldwide due to the growth of the Internet in recent years. The quick response (QR) code is a 2D bar code. Com- pared with other 2D bar codes, the QR code has more features, such as high reading speed, large data density, and small occupied space. The QR code can encode arbitrary text strings, emails, hyperlinks, phone numbers, and so on. To obtain the embedded messages, mobile devices are used to capture the QR code, and information is acquired through a QR code reader. Given the popularity of smartphones, the QR code has become the most widespread 2D bar code. A common use of the QR code is to encode URLs so that people can scan a QR code to load a website on a cell phone instead of typing in a URL. QR codes are encoded using Reed Solomon error-correcting codes. Therefore, a QR scanner does not have to view every pixel correctly to decode the content. Error correction corrupts a part of the code (less than the maximum amount that the algorithm can fix) to make an image. This high fault tolerance makes QR codes popular and widely used in many commercial applications. In the conventional QR code, the modules are designated on an image by black and white square pat- terns, which can easily be identified by machines. However, noisy black and white patterns reveal no intuitive information about the QR code when viewers look at the patterns without the aid of a scanning software ; the patterns also seriously de- grade the aesthetic appeal of the carrier. Although the aesthetics and visual significance of the code are unimportant for scanning purposes, they do matter in advertising layout and can provide valuable brand distinction. Considering that QR codes often occupy a non-negligible display area in print media, the demand for visually appealing QR codes is increasing. Visually appealing codes incorporate high-level visual features, such as colors, letters, illustrations, or logos. Researchers have attempted to endow the QR code with aesthetic elements, and QR code beautification has been formulated as an opti- mization problem that minimizes visual perception distortion subject to an acceptable decoding rate. However, the visual quality of the QR code generated by existing methods still requires improvement. The key challenge is the lack of proper un- derstanding or analytical formulations capturing the stability of QR codes under variations in lighting, camera specifications, and even perturbations to the QR codes. Patented and ill-documented algorithms employed to read QR codes cause further difficulties. Consequently, existing approaches are mostly ad hoc and often favor readability at the cost of reduced visual quality. Method This work presents an algorithm that visually encodes a QR code by synthesizing the conventional QR code with a theme image. This task is fulfilled by dividing the theme image into equal-sized non-overlapping blocks and modif- ying the average luminance of each block to its corresponding module type in the QR code by applying the well-designed Gaussian modulating function. In the Gaussian modulating function, standard deviation is dynamically determined according to the smoothness of the corresponding module block. The brightness of the central region of the modified module gradually changes along the circular and presents a smooth appearance and different sizes, which make it consistent with the human visual system. In addition, the size of the module' s brightness-sensing region can be adjusted according to application scenarios and the sensitivity of the human eye to different noises. Result In the experimental stage, visually meaningful QR codes are synthesized by setting different parameters, and their correct decoding rate is tested. The optimal parameters are determined to ensure decoding reliability and make the QR code easily recognizable for humans. Furthermore, the correct decoding rate is tested using different mobile devices and decoding applications. Experimental results show that even when the performance of a mobile device is poor, the correct decoding rate remains satisfactory. Compared with a similar method of synthesizing visual QR codes in literature, the proposed method exhibits good performance in terms of the visual quality of the generated visual QR code and the response time in accessing the QR code content. Conclusion The proposed method generates a visual QR code without referring to the encoding process of the QR code. The algorithm automatically generates a colorful QR code as long an image, data, and parameters are provided. The generated code is superior to the traditional black-and-white QR code and more attractive to users because of its satisfactory identification rate. The algorithm meets the QR code standard, is compatible with any decoding system, can be integrated into corporate identification system, and can be used in marketing, advertising, and other related areas. Applying our experimental results to advertising and industrial design would highlight the recognition of individual and corporate brands and overcome the drawbacks of QR codes with a black and white appearance. The proposed method exerts a positive advertising effect and enhances the willingness of users to scan.
出处
《中国图象图形学报》
CSCD
北大核心
2017年第6期741-753,共13页
Journal of Image and Graphics
关键词
QR码
视觉编码
高斯调变函数
彩色图像
视觉品质
quick response (QR) code
visual encoding
Gaussian modulating function
color image
visual quality