跳转到内容

用户:Karoke Cirno/sandbox 3

维基百科,自由的百科全书
交叉二五码的例子。Decoding of first two digits: Alternating bar/space nnnn (start code), bars WnnnW (1), spaces nWnnW (2)
Decoding Interleaved 2 of 5. Every pair of digits is color-coded, showing the code and the value for each digit.
File:Interleaved 2 of 5 135 film barcode.png
I2/5 on a 135 film can; part of DX encoding

交叉二五码(英语:Interleaved 2 of 5),又称ITF码交错式二五码,是一种连续二宽度条形码数字符号加密方法。在135胶卷ITF-14码和部分产品的动画片(但商品本身则使用UPCEAN)里进行了商业使用。

交叉二五码一次编码两个数字;第一个数字用五根条(或黑线)编码,而第二个数字则使用五个空格(或白线)交叉其中。每五个竖条或空格中都有两个较宽(也就是都是五取二)。数字的编码方式可见下表:

数字 竖条或空格宽度 助忆方式(借助权重)
0 n n W W n 4+7=11,用以指代0
1 W n n n W 1+0=1
2 n W n n W 2+0=2
3 W W n n n 1+2=3
4 n n W n W 4+0=4
5 W n W n n 1+4=5
6 n W W n n 2+4=6
7 n n n W W 7+0=7
8 W n n W n 1+7=8
9 n W n W n 2+7=9
权重 1 2 4 7 0 9.5

其中的“n”则代表窄线(竖条或空格),“W”则是宽线(是窄线的两到三倍)。

宽线按照1-2-4-7-0的权值组成了五取二码,而数字0则借用数值11的表示。这与POSTNET条码十分相似。

Before the actual pairs there is a start code consisting of nnnn (narrow bar – narrow space – narrow bar – narrow space), and after all symbols there is the stop code consisting of Wnn (Wide bar – narrow space – narrow bar).

Because digits are encoded by pairs, only an even number of digits can be encoded. Typically an odd number of digits is encoded by adding a "0" as first digit, but sometimes an odd number of digits is encoded by using five narrow spaces in the last digit.[1]

A checksum can be added as last digit, which is calculated in the same way as UPC checksums.

There are specific constraints on the height and width of the bars and the width of the "quiet zones", the blank areas before the start and after the stop symbol.[2][3]

An ITF-14 bar code. The thick rectangular border is the Bearer Bar.

ITF is often used for marking product ID numbers or other codes, of various lengths, on item cartons and multi-unit cases. One specific instance of this, standardized by GS1, is the ITF-14 bar code used to mark packages with Global Trade Item Numbers. In these uses, the ITF bar code symbol is usually printed surrounded with a thick black rectangular border called the Bearer Bar. The Bearer Bar surrounds the entire symbol and the quiet zones, abutting the ends of the bars. The purpose of a Bearer Bar is to equalize the pressure exerted by the printing plate over the entire surface of the symbol, and to enhance reading reliability by helping to reduce the probability of misreads occurring when the bar code is scanned at too large an angle so that the scanning beam crosses the top and/or bottom edge of the bar code rather than scanning across all bars, entering through the leftmost bar and exiting through the rightmost bar (or vice versa for a reverse scan). Such a "short scan" which does not extend through all of the bars obviously cannot result in a correct read of the complete bar code, but by the nature of the interleaved 2 of 5 code, it is possible for a short scan that begins in the middle of the bar code to begin with a pattern that corresponds to the required start pattern, or for a short scan that ends in the middle of the bar code to end with a pattern that corresponds to the required stop pattern. In this way the short scan, though incorrect, may appear to be a correct full scan. The Bearer Bar prevents this error, as a short scan will pass through the Bearer Bar as it passes across the top or bottom edge of the bar code. Since the Bearer Bar is much wider than any legitimate black bar, it will ensure that the short scan cannot appear to begin with the correct start pattern and end with the correct end pattern, forcing an invalid scan. The bar code can then be re-scanned, either automatically or manually. (If the short scan was not recognized as invalid, the misread data would be accepted and used as if it was good data, and there would be no chance to automatically rescan the bar code to correct the bad data.)

On 135 film (35 mm) canisters, interleaved 2 of 5 is used to identify the manufacturer, the film type, number of exposures and proprietary information in 6 digits. The barcode is located between the electrically read silver and black DX Camera Auto-Sensing Code and the film can exit lip. It is optically scanned by many film-processing machines when the cartridge is inserted for developing.[4]

Identcode and Leitcode are variants of interleaved 2 of 5 with check digits used by Deutsche Post.

参见

参考资料

  1. ^ Note however that the latter strategy causes the last special pair of symbols to be narrower than other pairs.
  2. ^ Adams, Russ. All About Interleaved 2 of 5 Barcode. BarCode 1. 20 June 2013 [5 January 2017]. 
  3. ^ Johnson, Nick. Interleaved 2 of 5. Everything you Never Wanted to Know About Barcodes. 18 August 2005 [August 21, 2007]. (原始内容存档于July 16, 2007). 
  4. ^ US 5761558,Patton, David Lynn; Lawrence Joseph Travis & Douglas Andrew McPherson,“Expanded film cartidge bar code”,发表于5 June 1995,发行于2 June 1998,指定于Eastman Kodak Company 

Template:条形码