条形码编号表示 [英] Barcode number representation

查看:96
本文介绍了条形码编号表示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,



我正在创建条形码应用程序,当我谷歌知道条形码时,我发现了一些我不理解的东西,这是奇怪的左边,甚至左右数字,例如EAN-13条形码包括以下







Greetings,

I'm creating a barcode application and when I google to know about barcode I found something that I did not understand and it is the odd left, even left and right digits for example the EAN-13 barcode includes the following



OddLeft = new String[] { "0001101", "0011001", "0010011",    "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011" };







EvenLeft = new String[] { "0100111", "0110011", "0011011", "0100001", "0011101", "0111001", "0000101", "0010001", "0001001", "0010111" };







Right = new String[] { "1110010", "1100110", "1101100", "1000010",
                                           "1011100", "1001110", "1010000","1000100",
                                           "1001000", "1110100" };





其中字符串数组中的每个字符串代表0到9之间的数字。

十进制0如何等于奇数左边的0001101或偶数左边的0100111或右边的1110010。他们是如何计算的?

我知道十进制0的二进制表示,上面3个表示中没有一个表示十进制0的二进制表示。

我读到有关奇偶校验位的内容我也发现上面3个表示中没有一个表示十进制0的奇数或偶数奇偶校验位。



上述表示是标准的固定表示吗?或者有一种方法或计算来获得这种表示?



Where every string within the string array represents a number from 0 to 9.
How can decimal 0 equals "0001101" in odd left or "0100111" in even left or "1110010" in right. How did they calculate it?
I know the binary representation of decimal 0 and none of the 3 representations above represents a binary represetation of decimal 0.
I read about parity bits too and I found the none of the 3 representations above represents odd or even parity bits of decimal 0.

Is those representations above are standard fixed representation? or there is a way or a calcuation performed to obtain such representation?

推荐答案

这些代码不是它们各自数值的二进制表示,而是垂直的布局表示数字的条形。

您必须以白色打印像素= 0并将像素标记为暗= 1。这样,您就可以获得要打印输出的符号的正确空间光图像。

条形码由奇数编码,偶数编码或单组合组成。序列在Bruno给你的链接中有详细描述。仔细阅读它,你将得到你需要的一切。

如果你的麻烦是如何将数字从可读字符串链接到图形编码表示,只需使用数字的二进制值作为索引编码图形布局的数组(已编码),而不是用它们来打印线条。

反过来从扫描仪读取原始数据,在该数组中搜索和索引相应的亮/暗掩码是你的二进制数。

小心代码的奇/偶/单布局。

祝你好运。
These codes are not the binary representation of their respective numeric values, but the layout of the vertical bar representing the number.
You have to print in white the pixels=0 and mark dark the pixels=1. This way you'll get the correct space-light image for the symbol you want printout.
The barcode is composed by odd encoded, even encoded or single set. The sequence is well described in the link that Bruno gave you. Read it carefully and you'll get all you need to go on.
If your trouble is how to link the digit from readable string to graph encoded representation simply use the binary value of the digit as index in the arrays of encoded graph layout (that you have coded), than use them to print the lines.
On the reverse get the raw data read from scanner, make a search in that array and the index of corresponding mask of light/dark is your binary number.
Be carefull about odd/even/single layout for the code.
Good luck.


基本规则是每个数字都有一个1和0的模式,这不是二进制值。并且该模式根据最终条形码中的数字位置而变化。这有助于从两个方向扫描,因为扫描仪可以判断数字是否从其位置有效。有很多关于这个主题的论文,包括 http://en.wikipedia.org/wiki/European_Article_Number [ ^ ](不是初学者文章),http://www.computalabel.com/aboutean.htm [ ^ ]。
The basic rule is that there is a certain pattern of 1s and 0s for each digit, which is not a binary value. And that pattern varies according to the position of the digit in the final barcode. This is to help in scanning from both directions, as the scanner can tell whether a digit is valid from its position. There are many papers on the subject including http://en.wikipedia.org/wiki/European_Article_Number[^] (not a beginner article), and http://www.computalabel.com/aboutean.htm[^].


这篇关于条形码编号表示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆