matlab barcode,Barcode Recognition

Example Model

The following figure shows the Barcode Recognition model:

4a21624e761afd85afb8a4ee6d1e9133.png

The GTIN-13 Barcode

GTIN is the acronym for Global Trade Item Number, a family of product identification numbers that encompasses the various versions of the EAN barcodes and provides a unified worldwide numbering system. The GTIN-13 (EAN/UCC-13) barcode encodes a 13-digit number.

Algorithm

The barcode recognition example performs a search on selected rows of the input image, called scanlines. Prior to recognition, each pixel of the scanline is preprocessed by transforming it into a feature value. The feature value of a pixel is set to a 1, if the pixel is considered black, -1 if it is considered white, and a value between -1 and 1 otherwise. Once all pixels are transformed, the scanline sequences are analyzed. The example identifies the sequence and location of the guard patterns [1] and symbols. The symbols are upsampled and compared with the codebook to determine the corresponding code.

To compensate for various barcode orientations, the example analyzes from left-to-right and from right-to-left and chooses the better match. If the checksum is correct and a matching score against the codebook is higher than a set threshold, the code is considered valid and is displayed.

You can change the number and location of the scanlines by changing the value of the "Row Positions Of Scanlines" parameter.

Results

The scanlines that have been used to detect barcodes are displayed in red. When a GTIN-13 is correctly recognized and verified, the code is displayed at the top of the image.

e8a0c7015effeb093b54a4c0d9d63eea.png

Available Example Versions

Example using stored video data: vipbarcoderecognition.slx (platform independent)

Example using live video acquisition: viplivebarcoderecognition_win.slx (Windows® only)

References

[1] T. Pavlidis, J. Swartz, and Y.P. Wang, Fundamentals of bar code information theory, Computer, pp. 74-86, vol. 23, no. 4, Apr 1990.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值