为满足工业流水线对条码识别实时性的要求,提出了一种Data Matrix条码快速识别方法。采用形状参数、圆形性作为矩形特征,初步确定Data Matrix条码位置;采用距离为角度的函数对Data Matrix条码边界进行标记,将Data Matrix的2D条码边界转换为1D波形函数进行分析,进行一次求导获取条码边界的位置及角度;利用边界角度作为仿射变换的角度,将条码旋转到规格化位置,采用网格法进行数据提取并进行条码解码。对像素大小为640×480的400幅含Data Matrix条码图片在PC机上进行测试,单个条码识别平均时间为12.06 ms,识别率为99.22%,快速识别方法准确、迅速,达到工业现场实时性和可靠性要求。
In response to the real-time requirement of barcode identification from industrial assembly line,this paper put forward a quick recognition method of Data Matrix barcode.With shape parameter and circular shape as a rectangular feature,determined the location of Data Matrix barcode primarily.Using the function of distance angle for Data Matrix to mark the border of Data Matrix barcode,made an analysis by transfering the border of 2D barcode of Data Matrix to 1D waveform function.The first derivative was found for obtaining the boundary location as well as rotation angle.Employing boundary angle as the affine transformation angle,rotated the barcode to a standard location,data being extracted by grid method,and then decoded the barcode.After checking 400 pictures whose pixels in size were 640×480 containing Data Matrix barcode on PC,it came out that the time for average single barcode recognition was 12.06 ms,and the recognition rate was 99.22%.The quick recognition method is proved to be fast and accurate,able to meet the real-time and reliable requirement for industrial field.