【目的】提出一种基于移动互联的农产品二维码(QR码)溯源系统。【方法】研究该系统的逻辑和物理结构，分析里德-索洛蒙(RS码)纠错编码原理及二维码编码算法。采用压缩感知（Compressed sensing，CS）算法预处理受污图像，对比传统的Gaussian、Disk和Log去噪方法，研究二维码数据容量与纠错的关系，研究扫描像素、受污位置和可识别图像的联系，确定手机摄像头参数。【结果】手机扫描最低像素为200万。RS编码信噪比为10.7 dBm时，CS误码率为0.040 1，低于Log法的0.042 5； RS编码信噪比为11.7 dBm时，CS误码率为0.011 3,低于Gaussian法的0.014 7。CS在多种噪声处理中的最大编码信噪比均大于10 dBm。噪声掩盖区域对位置区影响最大，噪声在位置区和编码区的解码平均正确率分别为87.68%和91.24%。【结论】该系统实现了对象信息的完整性、可追溯性，解决了农产品种植、加工、流通、销售各个环节信息的滞后问题。
【Objective】 To establish a farm product traceability system using two-dimension code (QR code) based on mobile internet.【Method】The logical and physical structure of the farm product traceability system was studied. The principles of error collection code(ECC) based on Reed-Solomon(RS) code and the encoding algorithm of QR code were analyzed. The stained QR code was preprocessed by compressed sensing (CS) algorithm, and the result was compared with those from traditional denoising methods such as Gaussian, Disk, and Log algorithms. The relationship between QR code capacity and error correction, and the relationship between scanning pixels, staining position and image identifiablility have been studied. The parameters of mobile phone were identified.【Result】The lowest pixel of mobile phone scanning was two million, and CS was able to solve the staining problem of QR code effectively. The error bit rate (EBR) of CS was 0.040 1 when signal noise rate (SNR) was 10.7 dBm, which was lower than the result of Log method (0.042 5). The EBR of CS was 0.011 3 when SNR was 11.7 dBm, which was lower than the result of Gaussian method (0.014 7). The peak signal to noise ratio (PSNR) of QR code images processed by CS were all higher than 10 dBm. The mask area had a major impact on position region, and the average accuracy rates of recognition at position region and encoding region were 87.68% and 91.24% respectively. 【Conclusion】 The farm product traceability system enables integrity and traceability of the target information, solves the problem of information delay in planting, processing,circulation and sale of agricultural products.