APP下载

畸变Data Matrix码图像的倾斜校正算法研究

2018-12-21关博熠董静薇马晓峰徐博

哈尔滨理工大学学报 2018年5期
关键词:检测

关博熠 董静薇 马晓峰 徐博

摘要:针对Data Matrix码倾斜校正中需要多次旋转的问题,本文提出了一种畸变二维码倾斜校正方法。首先使用LoG算子对二值化后的图像进行边缘检测,再基于Data Matrix码的结构特征,通过Hough变换有效快速地确定定位符“L”所在的位置,并将“L”型交点用两条向量表示。然后通过向量叉乘计算出Data Matrix码的旋转角度、确定旋转方向,只需一次旋转即可实现倾斜校正。本文算法节省了Data Matrix码在图像恢复过程中所需的时间和工作量。

关键词:

Data Matrix码;倾斜校正;LoG算子;Hough变换;向量叉乘

DOI:10.15938/j.jhust.2018.05.017

中图分类号: TP751.1

文献标志码: A

文章编号: 1007-2683(2018)05-0100-06

Research on Tilt Correction Algorithms of Destorted Data Matrix Code Image

GUAN Boyi,DONG Jingwei,MA Xiaofeng,XU Bo

(School of Measurement and Control Technology and Communications Engineering, Harbin University of Science and Technology,

The Higher Educational Key Laboratory for Measuring and Control Technology and Instrumentations of Heilongjiang Province, Harbin University of Science and Technology Harbin 150080, China)

Abstract:Aiming at the problem of multiple rotations in the tilting correction of Data Matrix code, a tilt correction method for distorted 2D code is proposed in this paper. First, the LoG operator is used to detect the edge of the binary image, and then based on the structural features of the Data Matrix code, the location of the locator “L” is quickly determined by the Hough transform, and the “L” intersection point is expressed with two vectors. By vector cross product the rotation angle of Data Matrix code is calculated and the direction of rotation is determined then. So, only one rotation is needed to achieve tilt correction. This algorithm saves the time and workload of Data Matrix code in the process of image restoration.

Keywords:data matrix code; tilt Correction; LoG operator; hough transform; vector crossproduct

0引言

二維条码技术,近年来已成为计算机领域的热门研究方向,广泛流通于商品流通领域,电子商务领域以及公共信息领域[1]。国际上常用的二维条码有PDF417,QR code,Data Matrix码等[2]。相比于一维码,二维码技术更为先进和科学,不仅多了纠错功能,而且信息的密度有了大幅度的提高,并且能够进行双向信息的承载[3-4]。Data Matrix码的尺寸可任意调整,大多数条码的大小与编入的资料量有着绝对关系,但Data Matrix码的尺寸与其编入的资料量却相互独立,因此它的尺寸较有弹性[5],目前它的最小尺寸是所有条码中最小的,尤其适用于小零件标识,并且可以直接印在实体上;因而被广泛应用于标识集成电路、药品等小件物品以及制造业的流水线生产过程,因此,对Data Matrix码的研究有着极为重要的现实意义[6]。

二维条码的识读过程是整个二维码识别系统的重要组成部分[7-8],二维条码的倾斜会导致二维条码在符号字符提取时被错误分割,从而影响符号字符提取的效果,因此,需要对拍摄过程中产生畸变的二维条码进行倾斜校正,以便于之后二维条码的正确分割。……

登录APP查看全文

猜你喜欢

检测
QC 检测
小波变换在PCB缺陷检测中的应用