CN101908126A - PDF417 barcode decoding chip - Google Patents
PDF417 barcode decoding chip Download PDFInfo
- Publication number
- CN101908126A CN101908126A CN 201010189803 CN201010189803A CN101908126A CN 101908126 A CN101908126 A CN 101908126A CN 201010189803 CN201010189803 CN 201010189803 CN 201010189803 A CN201010189803 A CN 201010189803A CN 101908126 A CN101908126 A CN 101908126A
- Authority
- CN
- China
- Prior art keywords
- barcode
- boundary
- bar
- scanning
- space
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012545 processing Methods 0.000 claims abstract description 38
- 238000000034 method Methods 0.000 claims abstract description 26
- 230000008569 process Effects 0.000 claims abstract description 10
- 238000004364 calculation method Methods 0.000 claims description 40
- 230000009466 transformation Effects 0.000 claims description 13
- 238000013507 mapping Methods 0.000 claims description 7
- 238000012937 correction Methods 0.000 claims description 6
- 230000002452 interceptive effect Effects 0.000 claims 1
- 238000004148 unit process Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 15
- 238000005516 engineering process Methods 0.000 description 9
- 238000000605 extraction Methods 0.000 description 6
- 239000011159 matrix material Substances 0.000 description 5
- 239000003086 colorant Substances 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Landscapes
- Character Discrimination (AREA)
Abstract
本发明提供一种PDF417条码解码芯片,包括:扫描模块,产生扫描坐标;边界识别模块,根据扫描坐标读取条码图像,并对所读取的图像像素点进行计算,以获取条码图像的条空边界点;方向识别模块,根据边界识别模块获取的条空边界点计算获得条码方向;条空边界处理模块,根据条码方向对条码图像进行处理,以获取条码图像中的条空边界;符号参数识别模块,根据条空边界对条码的符号参数进行识别,以获取符号参数;符号字符获取模块,根据条空边界和符号参数计算获得符号字符;以及译码模块,将符号字符转换为条码信息。本发明的PDF417条码解码芯片采用硬件流水线结构,适于对条码图像进行流水线作业和并行处理,处理速度快。
The invention provides a PDF417 barcode decoding chip, comprising: a scanning module, which generates scanning coordinates; a boundary recognition module, which reads a barcode image according to the scanning coordinates, and calculates the pixels of the read image, so as to obtain the bar space of the barcode image Boundary point; direction identification module, calculate and obtain the barcode direction according to the bar-space boundary point obtained by the boundary recognition module; bar-space boundary processing module, process the barcode image according to the barcode direction, to obtain the bar-space boundary in the barcode image; symbol parameter identification The module identifies the symbol parameters of the barcode according to the bar-space boundary to obtain the symbol parameters; the symbol character acquisition module calculates and obtains the symbol characters according to the bar-space boundary and the symbol parameters; and the decoding module converts the symbol characters into barcode information. The PDF417 barcode decoding chip of the present invention adopts a hardware pipeline structure, is suitable for pipeline operation and parallel processing of barcode images, and has fast processing speed.
Description
【技术领域】【Technical field】
本发明涉及条码识别技术领域,特别地,涉及一种PDF417条码解码芯片。The invention relates to the technical field of barcode identification, in particular to a PDF417 barcode decoding chip.
【背景技术】【Background technique】
条码技术是在计算机技术与信息技术基础上发展起来的一门集编码、印刷、识别、数据采集和处理于一身的新兴技术。条码技术由于其识别快速、准确、可靠以及成本低等优点,被广泛应用于商业、图书管理、仓储、邮电、交通和工业控制等领域,并且势必在逐渐兴起的“物联网”应用中发挥重大的作用。Bar code technology is an emerging technology developed on the basis of computer technology and information technology that integrates coding, printing, identification, data collection and processing. Barcode technology is widely used in business, library management, warehousing, post and telecommunications, transportation and industrial control due to its advantages of fast, accurate, reliable and low cost, and is bound to play an important role in the emerging "Internet of Things" applications. role.
目前被广泛使用的条码包括一维条码及二维条码。一维条码又称线形条码是由平行排列的多个“条”和“空”单元组成,条码信息依靠条和空的不同宽度和位置来表达。二维条码是由按一定规律在二维方向上分布的黑白相间的特定几何图形组成,其可以在二维方向上表达信息。二维条码可以分为行列式二维条码和矩阵式二维条码。行列式二维条码是由多行短截的一维条码堆叠而成,代表性的行列式二维条码包括PDF417、Code 49、Code 16K等。行列式二维条码信息表示方法与一维条码类似,也是依靠条和空的不同宽度和位置来表达。矩阵式二维条码是由按预定规则分布于矩阵中的黑、白模块组成,代表性的矩阵式二维条码包括QR码、Data Matrix码、Maxi码、Aztec码、汉信码等。Currently widely used barcodes include one-dimensional barcodes and two-dimensional barcodes. A one-dimensional barcode, also known as a linear barcode, is composed of multiple "bar" and "space" units arranged in parallel, and the barcode information is expressed by the different widths and positions of the bars and spaces. The two-dimensional barcode is composed of specific black and white geometric figures distributed in the two-dimensional direction according to certain rules, which can express information in the two-dimensional direction. Two-dimensional barcodes can be divided into determinant two-dimensional barcodes and matrix two-dimensional barcodes. Determinant 2D barcodes are stacked by multiple lines of short-cut 1D barcodes. Representative determinant 2D barcodes include PDF417, Code 49, Code 16K, etc. The determinant two-dimensional barcode information representation method is similar to the one-dimensional barcode, and it is also expressed by different widths and positions of bars and spaces. The matrix two-dimensional barcode is composed of black and white modules distributed in the matrix according to predetermined rules. Representative matrix two-dimensional barcodes include QR code, Data Matrix code, Maxi code, Aztec code, Hanxin code, etc.
在条码进行解码的过程中,通常是利用扫描设备对于条码进行扫描,以获取反射光信号,或者是利用摄影设备对条码进行拍摄,以获取条码图像,通过对反射光信号或条码图像进行识别处理来获取条码信息。In the process of decoding barcodes, scanning equipment is usually used to scan barcodes to obtain reflected light signals, or to use photography equipment to photograph barcodes to obtain barcode images, and to identify and process reflected light signals or barcode images to get the barcode information.
如图1所示,是三星电子株式会社提出的中国专利申请第200510126730.7号,其公开了一种读取条码的方法和装置。该装置包括:扫描单元,用于感测条码并且生成扫描信号;搜索单元,用于计算扫描信号的变化率,从扫描信号中提取斜线段,并搜索所提取的斜线段的起点和终点以检测条码的条的边缘;以及条码读取单元,用于基于所检测的边缘之间的距离而读出条码。这种读取条码的方法和装置的缺点在于,该装置必须依赖于使用者通过扫描单元正确地感测条码方向,读取条码的装置本身不能识别条码方向,不能根据条码方向调整解码方向,由此造成了使用不便和应用的局限性,在条码的条空密度较大,或者是畸变较大的情况下会造成无法识别解码。As shown in FIG. 1 , it is a Chinese patent application No. 200510126730.7 proposed by Samsung Electronics Co., Ltd., which discloses a method and device for reading barcodes. The device includes: a scanning unit for sensing a barcode and generating a scanning signal; a searching unit for calculating the rate of change of the scanning signal, extracting a slash segment from the scanning signal, and searching the starting point and end point of the extracted slash segment to detect edges of bars of the barcode; and a barcode reading unit for reading the barcode based on the detected distance between the edges. The disadvantage of this method and device for reading barcodes is that the device must rely on the user to correctly sense the direction of the barcode through the scanning unit. The device for reading the barcode itself cannot recognize the direction of the barcode and cannot adjust the decoding direction according to the direction of the barcode. This causes inconvenient use and limitations in application. In the case of high bar-space density or large distortion, the barcode cannot be recognized and decoded.
因此,针对现有技术存在的以上不足,亟需提供一种PDF417条码解码芯片,使得能保证正确识别条码的条空信息,提高解码成功率。Therefore, in view of the above deficiencies in the prior art, it is urgent to provide a PDF417 barcode decoding chip, which can ensure the correct recognition of the blank information of the barcode and improve the success rate of decoding.
【发明内容】【Content of invention】
针对现有技术存在的解码装置依赖于使用者通过扫描单元正确地感测条码方向,不能根据条码方向调整解码方向的不足,本发明提供一种PDF417条码解码芯片,可以正确识别条码的条空信息,提高解码成功率。Aiming at the deficiency that the decoding device in the prior art relies on the user to correctly sense the direction of the barcode through the scanning unit, and cannot adjust the decoding direction according to the direction of the barcode, the present invention provides a PDF417 barcode decoding chip, which can correctly identify the blank information of the barcode , to improve the decoding success rate.
本发明提供一种PDF417条码解码芯片,包括:扫描模块,产生扫描坐标,扫描坐标对应于数据存储器的地址存储空间内的地址位,用于扫描数据存储器内的条码图像;边界识别模块,根据扫描坐标读取条码图像,并对所读取的图像像素点进行计算,以获取条码图像的条空边界点;方向识别模块,根据边界识别模块获取的条空边界点计算获得条码方向;条空边界处理模块,根据条码方向对条码图像进行处理,以获取条码图像中的条空边界;符号参数识别模块,根据条空边界对条码的符号参数进行识别,以获取符号参数;符号字符获取模块,根据条空边界和符号参数计算获得符号字符;以及译码模块,将符号字符转换为条码信息。The invention provides a PDF417 barcode decoding chip, comprising: a scanning module, which generates scanning coordinates, and the scanning coordinates correspond to the address bits in the address storage space of the data storage, and is used to scan the barcode image in the data storage; a boundary identification module, according to the scanning The coordinates read the barcode image, and calculate the read image pixel points to obtain the bar-space boundary points of the barcode image; the direction recognition module calculates the barcode direction according to the bar-space boundary points obtained by the boundary recognition module; the bar-space boundary The processing module processes the barcode image according to the barcode direction to obtain the bar-space boundary in the barcode image; the symbol parameter identification module identifies the symbol parameter of the barcode according to the bar-space boundary to obtain the symbol parameter; the symbol character acquisition module according to The symbol character is obtained by calculating the bar boundary and the symbol parameter; and the decoding module converts the symbol character into barcode information.
本发明的PDF417条码解码芯片能够自动识别条码方向,无需使用者调整扫描单元的扫描方向即可实现对条码图像的识别解码,并且条码边界的识别精度高,解码成功率高。The PDF417 barcode decoding chip of the present invention can automatically identify the direction of the barcode, realize the identification and decoding of the barcode image without the user adjusting the scanning direction of the scanning unit, and has high identification accuracy of the barcode boundary and a high decoding success rate.
本发明的PDF417条码解码芯片能够根据条码方向调整解码方向,获取条码边界的精确坐标值,大大提高了解码成功率,特别适用于高密度条码或畸变条码的识别解码。The PDF417 barcode decoding chip of the present invention can adjust the decoding direction according to the direction of the barcode, obtain the precise coordinate value of the barcode boundary, greatly improve the decoding success rate, and is especially suitable for the identification and decoding of high-density barcodes or distorted barcodes.
本发明的PDF417条码解码芯片采用硬件流水线结构,通过硬件逻辑实现对条码图像的识别解码,由于硬件流水线结构适于对条码图像进行流水线作业和并行处理,因此处理速度很快。由于采用全硬件结构,无需处理器参与解码,芯片结构相对于处理器而言结构更为简化、面积更小、功耗更低、成本更低、易于集成,容易实现便携应用。可以方便地与物联网技术相结合,为条码技术的应用提供了更为广阔的发展空间。The PDF417 barcode decoding chip of the present invention adopts a hardware pipeline structure to realize recognition and decoding of barcode images through hardware logic. Since the hardware pipeline structure is suitable for pipeline operations and parallel processing of barcode images, the processing speed is very fast. Due to the use of a full hardware structure, no processor is required to participate in decoding. Compared with the processor, the chip structure is simpler in structure, smaller in area, lower in power consumption, lower in cost, easy to integrate, and easy to implement portable applications. It can be easily combined with the Internet of Things technology, providing a broader development space for the application of barcode technology.
【附图说明】【Description of drawings】
图1是现有技术的一种读取条码的方法和装置的结构示意图。FIG. 1 is a structural schematic diagram of a method and device for reading barcodes in the prior art.
图2是本发明的PDF417条码解码芯片示意图。Fig. 2 is a schematic diagram of the PDF417 barcode decoding chip of the present invention.
图3是本发明的PDF417条码解码芯片中的扫描模块的结构示意图。Fig. 3 is a structural schematic diagram of the scanning module in the PDF417 barcode decoding chip of the present invention.
图4是根据本发明的条码方向识别方法的识别原理示意图。Fig. 4 is a schematic diagram of the recognition principle of the barcode direction recognition method according to the present invention.
图5是本发明的PDF417条码解码芯片中的条空边界处理模块的结构示意图。Fig. 5 is a structural schematic diagram of the bar-space boundary processing module in the PDF417 barcode decoding chip of the present invention.
图6是本发明的条空边界处理模块对条码图像进行处理的工作原理示意图。Fig. 6 is a schematic diagram of the working principle of the barcode image processing by the bar-space boundary processing module of the present invention.
图7是图6中对条码图像进行处理的局部放大图。FIG. 7 is a partially enlarged view of processing the barcode image in FIG. 6 .
图8是本发明的PDF417条码解码芯片中的符号字符提取模块的结构示意图。Fig. 8 is a schematic structural diagram of a symbol character extraction module in the PDF417 barcode decoding chip of the present invention.
图9是本发明的PDF417条码解码芯片中的译码模块的结构示意图。Fig. 9 is a structural schematic diagram of the decoding module in the PDF417 barcode decoding chip of the present invention.
【具体实施方式】【Detailed ways】
有关本发明的特征及技术内容,请参考以下的详细说明与附图,附图仅提供参考与说明,并非用来对本发明加以限制。Regarding the features and technical content of the present invention, please refer to the following detailed description and accompanying drawings, which are provided for reference and illustration only, and are not intended to limit the present invention.
以下首先对本发明的PDF417条码解码芯片进行详细描述,图2是本发明的PDF417条码解码芯片示意图。本发明的PDF417条码解码芯片10连接数据存储器11。数据存储器11用于存储条码图像信息。条码图像信息包括图像像素坐标以及图像像素灰度值等。这些条码图像信息以一定顺序的存储方式存储在数据存储器11内。进一步地,数据存储器11还包括地址存储空间(图未示),地址存储空间用于存储图像像素坐标,一个图像像素坐标对应地址存储空间内的一个地址位,图像像素坐标在地址存储空间内的存储方式为顺序存储。First, the PDF417 barcode decoding chip of the present invention will be described in detail below, and FIG. 2 is a schematic diagram of the PDF417 barcode decoding chip of the present invention. The PDF417
PDF417条码解码芯片10包括状态控制模块100、扫描模块110、边界识别模块120、方向计算模块130、条空边界处理模块140、符号字符提取模块150、符号参数识别模块160以及译码模块170。The PDF417
状态控制模块100用于控制扫描模块110、边界识别模块120、方向计算模块130、条空边界处理模块140、符号字符提取模块150、符号参数识别模块160以及译码模块170的工作状态和处理流程。The
下面结合图2-10对本发明的PDF417条码解码芯片的各个模块逐一进行详细描述。Each module of the PDF417 barcode decoding chip of the present invention will be described in detail one by one in conjunction with Fig. 2-10.
图3是本发明的PDF417条码解码芯片中扫描模块的结构示意图。Fig. 3 is a structural schematic diagram of the scanning module in the PDF417 barcode decoding chip of the present invention.
扫描模块110用于建立扫描坐标系,并产生扫描坐标,扫描坐标对应于数据存储器11的地址存储空间内的地址位,用于扫描数据存储器11内与地址位相对应的条码图像信息。扫描模块110包括扫描坐标生成单元111和坐标映射变换单元112。扫描坐标生成单元111用于产生初始扫描坐标。坐标映射变换单元112用于将初始扫描坐标生成单元111产生的初始扫描坐标经过坐标变换后映射至数据存储器11的地址存储空间。坐标映射变换单元112的坐标变换功能至少包括坐标平移变换、坐标旋转变换或坐标轴互换变换中的一种或其组合。坐标映射变换单元112坐标变换可以实现对条码图像进行不同方向的扫描。The
边界识别模块120根据扫描模块110所产生的扫描坐标读取数据存储器11内的与地址位相对应的条码图像信息,对条码图像进行虚拟扫描,条码图像信息包括图像像素坐标以及图像像素灰度值。所谓虚拟扫描是指通过扫描电路根据一定的逻辑获取条码图像的择像素坐标和灰度值,例如是X方向沿水平方向扫完第1行,Y方向递增10个像素间距,继续X方向沿水平方向扫第2行。边界识别模块120通过计算虚拟扫描线上存在灰度落差的像素点的坐标位置来获取与虚拟扫描线相交的条空边界点。对于条码符号而言,条一般用黑色或深色表示,空一般用白色或浅色表示。更进一步的,边界识别模块120还可以根据获取的条空边界点对条码类型进行识别。在本发明的一种实施方式中,边界识别模块120将获取的条空边界点与PDF417、Micro PDF417等行列式条码的起始符或终止符的条空比例进行匹配,以识别条码图像中是否存在PDF417、Micro PDF417等行列式条码。The
方向识别模块130根据边界识别模块120所获取的条空边界点计算获得条码方向。以下对本发明的方向识别模块130获取条码方向的方法进行详细描述,图4是根据本发明的条码方向识别方法的识别原理示意图。如图4所示,条码图像为倾斜状态,无法直接沿水平方向作虚拟扫描线进行识别解码。需要获取条码方向后对虚拟扫描方向进行调整。第一扫描方向条码方向的夹角为θ2,而由于θ2与θ1与统一角度互为补角,因此θ1=θ2。所以只需知道θ1的斜率tgθ1,即可获得条码方向的斜率tgθ2。The
而由图4可知,
上式中,(x2,y2)和(x1,y1)的坐标可以由虚拟扫描线与条空相交的边界点获得,根据各条虚拟扫描线与条空相交的边界点的坐标值,通过X坐标位置比较,y坐标位置比较来判断各点的平行四边形特征,可以确定位于一个平行四边形特征内的(x2,y2)和(x1,y1)的像素点的坐标,进而计算获得tgθ1的值,即获得条码方向。上述平行四边形特征也可以采用平行线特征代替,上述平行四边形特征或平行线特征并不限定在一个条空范围内。In the above formula, the coordinates of (x2, y2) and (x1, y1) can be obtained from the boundary points where the virtual scan line intersects with the bar space, and according to the coordinate values of the boundary points where each virtual scan line intersects with the bar space, pass X Coordinate position comparison, y coordinate position comparison to judge the parallelogram feature of each point, can determine the coordinates of the pixel points (x2, y2) and (x1, y1) located in a parallelogram feature, and then calculate and obtain the value of tgθ1, That is, the direction of the barcode is obtained. The above-mentioned parallelogram feature may also be replaced by a parallel line feature, and the above-mentioned parallelogram feature or parallel line feature is not limited to a space.
在方向识别模块130计算获得条码方向之后,条空边界处理模块140根据条码方向对条码图像进行处理,以获取条码图像中准确的条空边界。After the
图5是本发明的PDF417条码解码芯片中条空边界处理模块的结构示意图。如图5所示,条空边界处理模块140进一步包括扫描边界获取单元141、直线扫描单元142、亚像素边界计算单元143、直线计算单元144以及扫描坐标计算单元145。图6是本发明的条空边界处理模块对条码图像进行处理的工作原理示意图,图7是图6中对条码图像进行处理的局部放大图。以下结合图5、图6和图7对条空边界处理模块140中各个单元的结构功能和处理流程进行描述。Fig. 5 is a structural schematic diagram of a bar-space boundary processing module in the PDF417 barcode decoding chip of the present invention. As shown in FIG. 5 , the strip
如图5所示,扫描边界获取单元141连接边界识别模块120和方向计算模块130。扫描边界获取单元141从边界识别模块120获取条码边界点,从方向计算模块130获取条码方向。As shown in FIG. 5 , the scan
如图6和图7所示,扫描边界获取单元141以两侧的条码边界点为中心,依据条码方向和与条码方向垂直的方向向外扩展,分别获取边界区域821和826。边界区域821和826内包括了条码边界点及其附近的像素点的集合。扫描边界获取单元141将边界区域821和826内的像素点的集合输入直线计算单元144中,直线计算单元144对边界区域821和826内的像素点的集合进行Hough(霍夫)运算。Hough运算的基本原理为:假设在直角坐标系中存在一条原点距离为ρ,方位角为θ的直线,则直线上每一点满足公式ρ=xcosθ+ysinθ。在条码边界搜索过程中,对于每一个像素点的图像空间坐标x、y,利用不同的θ离散值通过上述运算公式计算对应的ρ值,通过对θ离散值和ρ值的统计,求得直线所对应的像素坐标。在本发明的实施方式中,直线计算单元144例如可以采用多个串行连接的cordic迭代运算单元实现对像素点的集合内的霍夫(Hough)计算,以求得直线坐标。As shown in FIG. 6 and FIG. 7 , the scan
直线计算单元144通过Hough运算获取边界区域821内条码边界所对应的边界直线822的像素点坐标,以及边界区域826内条码边界所对应的边界直线827的像素点坐标,将运算结果返回至扫描边界获取单元141。边界直线822和827反映了边界区域821和826内的条空边界的直线特征。The straight
扫描边界获取单元141依据条码方向,将边界直线822和边界直线827的像素点坐标向条码区域外平移预定距离以获得扫描边界823和828,预定距离例如是5-10个像素点的间距。边界直线822和827反映的是条空边界的直线特征,但是由于条码印刷或条码成像的影响,条码图像中实际的条空边界并非是一条严格的直线,而是基于直线特征的带有微小波动的曲线或多个直线段的集合。为了获取更准确的条空边界,扫描边界获取单元141通过将边界直线822和边界直线827的像素点坐标向外平移,以将基于直线特征的带有微小波动的曲线或多个直线段的集合包括在扫描边界823和828的范围内。之后,扫描边界获取单元141将扫描边界823和828输入直线扫描单元142中进行下一步处理。The scanning
直线扫描单元142在一侧扫描边界823上选取点A,在另一侧的扫描边界828上获取与点A相对应的点A′。点A′的包括多种获取方法。在本发明的一种实施方式中,点A′获取方法为以点A为起点,根据条码方向(即tgθ1的值)在扫描边界828上搜索与点A位于同一条直线上的点A′,即根据已知直线、直线外的坐标点A的坐标以及经点A的另一条直线的斜率值,求出已知直线与另一条直线的交点A′的坐标。在本发明的另一种实施方式中,点A′获取方法为计算在扫描边界828上与点A距离最短的坐标点,该坐标点即为点A′。The
直线扫描单元142以A为扫描起点,A′为扫描终点,计算A-A′之间的直线824上的像素点的坐标。直线扫描单元142通过将点A和点A′的坐标值输入扫描坐标计算单元145中,扫描坐标计算单元145对A-A′之间的直线824上的像素点825的坐标进行计算。The
扫描坐标计算单元145计算像素点825的坐标的方法包括多种方式。在本发明的一种实施方式中,扫描坐标计算单元145包括Breshem运算单元,通过Breshem运算单元计算A-A′两点之间的直线824上各个像素点的坐标。Breshem算法原理如下:条码图像由像素点构成,过条码图像中各行各列的像素中心构造一组虚拟网格线。按直线从起点到终点的顺序计算直线与各垂直网格线的交点,然后确定该列像素中与此交点最近的像素。Breshem算法的巧妙之处在于采用增量计算,使得对于每一列,只要检查一个误差项的符号,就可以确定该列的所求像素点的坐标。Breshem使得在求两点之间直线上各点坐标的过程中全部以整数来运算,因而大幅度提升了计算速度。The method for calculating the coordinates of the
扫描坐标计算单元145将计算出的A-A′两点之间的直线824上的像素点825的坐标返回至直线扫描单元142,直线扫描单元142将A-A′两点之间的直线824上的像素点825的坐标输入亚像素边界计算单元143中。The scanning coordinate
亚像素边界计算单元143依据A-A′之间像素点825的坐标以及灰度值,进行亚像素边界计算,将像素点825所对应的分为更小的单位以获取条空边界的精确坐标并计算出该精确坐标所对应的灰度落差值。The sub-pixel
由此,条空边界处理模块140获取了条码图像中精确的条空边界坐标和该精确坐标所对应的灰度落差值,并将此条空边界数据输入符号字符获取模块150和符号参数识别模块160中。Thus, the bar-space
图8是本发明的PDF417条码解码芯片中的符号字符提取模块的结构示意图。如图8所示,本发明的符号字符提取模块150包括条空判定单元151和条空值计算单元152。Fig. 8 is a schematic structural diagram of a symbol character extraction module in the PDF417 barcode decoding chip of the present invention. As shown in FIG. 8 , the symbol
其中,条空判定单元151一端连接符号参数识别模块160和条空边界处理模块140,另一端连接条空值计算单元152,其存储条空边界处理模块140提供的条空边界数据并对其中的干扰边界进行判定排除,获取有效的条空边界组合。Wherein, one end of the bar-
符号参数识别模块160根据条空边界处理模块140提供的条空边界数据,对条码的符号参数进行识别,符号参数包括条码的行数、列数、行号、列号、符号字符的条空边界数、符号字符的条空宽度、校验信息等。符号参数识别模块160识别符号参数的方法包括簇号计算、码制判断等多种方法。Symbol
条空判定单元151根据符号参数识别模块160提供的符号参数,对条空边界处理模块140提供的条空边界数据进行处理,将其中的干扰边界排除。条空判定单元151的具体工作过程如下:条空判定单元151存储的条空边界数量未达到符号参数中的条空边界数时,条空判定单元151继续获取条空边界处理模块140提供的条空边界数据。当条空判定单元151存储的条空边界数量达到符号参数中的条空边界数时,条空判定单元151计算已存储的条空边界组合的条空宽度值,并将已存储的条空边界组合的条空宽度值与符号参数中的条空宽度相比较,当已存储的条空边界组合的条空宽度值小于符号参数中的条空宽度时,条空判定单元151排除所存储的灰度落差宽度最小的条空边界,并继续获取条空边界处理模块140提供的条空边界。当已存储的条空边界组合的条空宽度值达到符号参数中的条空宽度时,条空判定单元151将所存储的条空边界的组合输出至条空值计算单元152。The stripe-
条空值计算单元152获取条空边界的组合中各个条空边界的坐标和灰度落差值,通过比较计算由各个条空边界所构成的条空宽度值,进而获取符号字符,将计算出的符号字符输入译码模块170中。The bar-space
图9是本发明的PDF417条码解码芯片中的译码模块的结构示意图。如图9所示,本发明的译码模块170包括码字获取单元171、码字纠错单元172、译码单元173以及码表存储单元174。译码模块170将符号字符提取模块150提供的符号字符转换为码字并进行纠错译码,以获得条码信息,然后将条码信息输入数据存储器11的解码信息存储区。Fig. 9 is a structural schematic diagram of the decoding module in the PDF417 barcode decoding chip of the present invention. As shown in FIG. 9 , the
其中,码表存储单元174存储表示符号字符与码字对应关系的码表。码字获取单元171根据码表利用接收的符号字符获取初始码字。码字纠错单元172对初始码字进行RS纠错处理,以获取正确码字。译码单元173根据码表利用正确码字获取正确符号字符,并根据正确符号字符所对应的字符集进行译码来获得条码信息。Wherein, the code
码表存储单元174存储符号字符与码字对应关系的码表。其中,符号字符则对应于条码的不同条空值组合。码表存储单元174将码表存储于ROM(Read-Only Memory,只读内存)中。The code
本发明的PDF417条码解码芯片能够自动识别条码方向,无需使用者调整扫描单元的扫描方向即可实现对条码图像的识别解码,并且条码边界的识别精度高,解码成功率高。The PDF417 barcode decoding chip of the present invention can automatically identify the direction of the barcode, realize the identification and decoding of the barcode image without the user adjusting the scanning direction of the scanning unit, and has high identification accuracy of the barcode boundary and a high decoding success rate.
本发明的PDF417条码解码芯片能够根据条码方向调整解码方向,获取条码边界的精确坐标值,大大提高了解码成功率,特别适用于高密度条码或畸变条码的识别解码。The PDF417 barcode decoding chip of the present invention can adjust the decoding direction according to the direction of the barcode, obtain the precise coordinate value of the barcode boundary, greatly improve the decoding success rate, and is especially suitable for the identification and decoding of high-density barcodes or distorted barcodes.
本发明的PDF417条码解码芯片采用硬件流水线结构,通过硬件逻辑实现对条码图像的识别解码,由于硬件流水线结构适于对条码图像进行流水线作业和并行处理,因此处理速度很快。由于采用全硬件结构,无需处理器参与解码,芯片结构相对于处理器而言结构更为简化、面积更小、功耗更低、成本更低、易于集成,容易实现便携应用。可以方便地与物联网技术相结合,为条码技术的应用提供了更为广阔的发展空间。The PDF417 barcode decoding chip of the present invention adopts a hardware pipeline structure to realize recognition and decoding of barcode images through hardware logic. Since the hardware pipeline structure is suitable for pipeline operations and parallel processing of barcode images, the processing speed is very fast. Due to the use of a full hardware structure, no processor is required to participate in decoding. Compared with the processor, the chip structure is simpler in structure, smaller in area, lower in power consumption, lower in cost, easy to integrate, and easy to implement portable applications. It can be easily combined with the Internet of Things technology, providing a broader development space for the application of barcode technology.
以上参照附图说明了本发明的各种优选实施例,但是只要不背离本发明的实质和范围,本领域的技术人员可以对其进行各种形式上的修改和变更,都属于本发明的保护范围。Various preferred embodiments of the present invention have been described above with reference to the accompanying drawings, but as long as they do not depart from the essence and scope of the present invention, those skilled in the art can carry out various modifications and changes to it, all of which belong to the protection of the present invention scope.
Claims (16)
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010189803.8A CN101908126B (en) | 2010-06-01 | 2010-06-01 | PDF417 bar code decoding chip |
| EP11168054.2A EP2393036B1 (en) | 2010-06-01 | 2011-05-30 | Barcode decoding chip |
| US13/149,820 US8596538B2 (en) | 2010-06-01 | 2011-05-31 | Barcode decoding chip |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010189803.8A CN101908126B (en) | 2010-06-01 | 2010-06-01 | PDF417 bar code decoding chip |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN101908126A true CN101908126A (en) | 2010-12-08 |
| CN101908126B CN101908126B (en) | 2015-10-07 |
Family
ID=43263583
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201010189803.8A Active CN101908126B (en) | 2010-06-01 | 2010-06-01 | PDF417 bar code decoding chip |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN101908126B (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108701204A (en) * | 2015-12-31 | 2018-10-23 | 深圳配天智能技术研究院有限公司 | A kind of method and device of one-dimension code positioning |
| CN110765804A (en) * | 2019-10-22 | 2020-02-07 | 江苏邦融微电子有限公司 | Bar code hardware decoding IP core and decoding method |
| CN111476054A (en) * | 2020-05-07 | 2020-07-31 | 浙江华睿科技有限公司 | Decoding method and electronic equipment |
| CN113673655A (en) * | 2021-10-22 | 2021-11-19 | 北京紫光青藤微系统有限公司 | Method and device for determining decoding direction of two-dimensional code, electronic equipment and medium |
| CN115438682A (en) * | 2022-10-24 | 2022-12-06 | 北京紫光青藤微系统有限公司 | Method and device for determining decoding direction and decoding equipment |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1076798A (en) * | 1992-03-16 | 1993-09-29 | 欧林巴斯光学工业股份有限公司 | Utilize the method and apparatus of CCD/CMD gamma camera to decoding two-dimensional bar code |
| CN1670763A (en) * | 2004-03-15 | 2005-09-21 | 深圳矽感科技有限公司 | A two dimensional bar codes and coding-decoding method thereof |
| US20060175414A1 (en) * | 2004-12-21 | 2006-08-10 | Hiroshi Nakamura | Method for reading out symbol information and device for reading out symbol information |
-
2010
- 2010-06-01 CN CN201010189803.8A patent/CN101908126B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1076798A (en) * | 1992-03-16 | 1993-09-29 | 欧林巴斯光学工业股份有限公司 | Utilize the method and apparatus of CCD/CMD gamma camera to decoding two-dimensional bar code |
| CN1670763A (en) * | 2004-03-15 | 2005-09-21 | 深圳矽感科技有限公司 | A two dimensional bar codes and coding-decoding method thereof |
| US20060175414A1 (en) * | 2004-12-21 | 2006-08-10 | Hiroshi Nakamura | Method for reading out symbol information and device for reading out symbol information |
Non-Patent Citations (2)
| Title |
|---|
| 《仪器仪表学报》 20070831 张鹏等 PDF417二维条码图像信息识别方法的研究 303-306 1-16 第28卷, 第8期 2 * |
| 《重庆大学硕士学位论文》 20091215 易明 基于SOPC的二维条码PDF417识别系统的设计 全文 1-16 , 2 * |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108701204A (en) * | 2015-12-31 | 2018-10-23 | 深圳配天智能技术研究院有限公司 | A kind of method and device of one-dimension code positioning |
| CN108701204B (en) * | 2015-12-31 | 2021-01-08 | 深圳配天智能技术研究院有限公司 | One-dimensional code positioning method and device |
| CN110765804A (en) * | 2019-10-22 | 2020-02-07 | 江苏邦融微电子有限公司 | Bar code hardware decoding IP core and decoding method |
| CN110765804B (en) * | 2019-10-22 | 2023-01-20 | 江苏邦融微电子有限公司 | Bar code hardware decoding IP core and decoding method |
| CN111476054A (en) * | 2020-05-07 | 2020-07-31 | 浙江华睿科技有限公司 | Decoding method and electronic equipment |
| CN111476054B (en) * | 2020-05-07 | 2022-03-08 | 浙江华睿科技股份有限公司 | Decoding method and electronic equipment |
| CN113673655A (en) * | 2021-10-22 | 2021-11-19 | 北京紫光青藤微系统有限公司 | Method and device for determining decoding direction of two-dimensional code, electronic equipment and medium |
| CN115438682A (en) * | 2022-10-24 | 2022-12-06 | 北京紫光青藤微系统有限公司 | Method and device for determining decoding direction and decoding equipment |
| CN115438682B (en) * | 2022-10-24 | 2023-01-31 | 北京紫光青藤微系统有限公司 | Method and device for determining decoding direction and decoding equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN101908126B (en) | 2015-10-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101840496B (en) | One-dimensional barcode decoding chip | |
| CN101833641B (en) | Bar code decoding chip | |
| CN101908125B (en) | QR (Quick Response) bar code decoding chip and decoding method thereof | |
| US8215564B2 (en) | Method and system for creating and using barcodes | |
| CN101167084B (en) | Information I/O method using dot pattern | |
| US6604682B2 (en) | Method of and apparatus for reading a two-dimensional bar code symbol and data storage medium | |
| CN114005126B (en) | Table reconstruction method, device, computer equipment and readable storage medium | |
| CN100361144C (en) | Information input and output methods using dot graphics | |
| CN101882210B (en) | Matrix two-dimensional barcode decoding chip and its decoding method | |
| US9014479B2 (en) | Method and system for text-image orientation | |
| EP2393036B1 (en) | Barcode decoding chip | |
| CN101908122B (en) | Bar space margin processing module, bar code identifying device and method thereof | |
| CN101908126B (en) | PDF417 bar code decoding chip | |
| WO2017041600A1 (en) | Chinese-sensitive code feature pattern detection method and system | |
| CN103884323A (en) | Total station measurement method and system based on two-dimension code geographic information sign | |
| CN101908128A (en) | Aztec Code bar code decoding chip and decoding method thereof | |
| CN100504909C (en) | A Method for Correcting Distortion of Two-Dimensional Barcode Graphics | |
| CN101833643B (en) | Decoding chip for compound-code barcode | |
| CN101833640B (en) | The empty boundary pixel point computing module of bar and computing method thereof | |
| CN111709419A (en) | Method, system and equipment for positioning banknote serial number and readable storage medium | |
| CN101882211A (en) | Chinese-sensible code barcode decoding chip and decoding method thereof | |
| CN201927043U (en) | One-dimensional barcode decoding chip | |
| CN101833642B (en) | MicroPDF417 bar code decoding chip | |
| CN106570546A (en) | Method and device for generating coding pattern and method and device for recognizing coding pattern | |
| CN101882204A (en) | Matrix type two-dimensional bar code searching method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address |
Address after: 350015 No. 1 Rujiangxi Road, Mawei District, Fuzhou City, Fujian Province Patentee after: NEWLAND DIGITAL TECHNOLOGY Co.,Ltd. Address before: 350015 New Continental Science Park No. 1 Rujiangxi Road, Mawei District, Fuzhou City, Fujian Province Patentee before: Fujian Newland Computer Co.,Ltd. |
|
| CP03 | Change of name, title or address | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20250401 Address after: Room 510, Building 19, 1889 Huandao East Road, Hengqin New District, Zhuhai City, Guangdong Province 519000 Patentee after: New World Youmaijie (Guangdong Province) Technology Co.,Ltd. Country or region after: China Address before: 350015 No. 1 Rujiangxi Road, Mawei District, Fuzhou City, Fujian Province Patentee before: NEWLAND DIGITAL TECHNOLOGY Co.,Ltd. Country or region before: China |
|
| TR01 | Transfer of patent right |