Information technology -- Automatic identification and data capture techniques -- Han Xin Code bar code symbology specification

Technologies de l'information -- Techniques d'identification et de capture de données automatiques -- Spécification des symboles du code à barres de Han Xin

General Information

Status
Published
Current Stage
4099 - Full report circulated: DIS approved for registration as FDIS
Start Date
11-May-2020
Ref Project

Buy Standard

Draft
ISO/IEC DIS 20830 - Information technology -- Automatic identification and data capture techniques -- Han Xin Code bar code symbology specification
English language
280 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (sample)

DRAFT INTERNATIONAL STANDARD
ISO/IEC DIS 20830
ISO/IEC JTC 1/SC 31 Secretariat: ANSI
Voting begins on: Voting terminates on:
2019-10-07 2019-12-30
Information technology — Automatic identification
and data capture techniques — Han Xin Code bar code
symbology specification

Technologies de l'information — Techniques d'identification et de capture de données automatiques —

Spécification des symboles du code à barres de Han Xin
ICS: 35.040.50
THIS DOCUMENT IS A DRAFT CIRCULATED
FOR COMMENT AND APPROVAL. IT IS
THEREFORE SUBJECT TO CHANGE AND MAY
NOT BE REFERRED TO AS AN INTERNATIONAL
STANDARD UNTIL PUBLISHED AS SUCH.
IN ADDITION TO THEIR EVALUATION AS
BEING ACCEPTABLE FOR INDUSTRIAL,
This document is circulated as received from the committee secretariat.
TECHNOLOGICAL, COMMERCIAL AND
USER PURPOSES, DRAFT INTERNATIONAL
STANDARDS MAY ON OCCASION HAVE TO
BE CONSIDERED IN THE LIGHT OF THEIR
POTENTIAL TO BECOME STANDARDS TO
WHICH REFERENCE MAY BE MADE IN
Reference number
NATIONAL REGULATIONS.
ISO/IEC DIS 20830:2019(E)
RECIPIENTS OF THIS DRAFT ARE INVITED
TO SUBMIT, WITH THEIR COMMENTS,
NOTIFICATION OF ANY RELEVANT PATENT
RIGHTS OF WHICH THEY ARE AWARE AND TO
PROVIDE SUPPORTING DOCUMENTATION. ISO/IEC 2019
---------------------- Page: 1 ----------------------
ISO/IEC DIS 20830:2019(E)
COPYRIGHT PROTECTED DOCUMENT
© ISO/IEC 2019

All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may

be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting

on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address

below or ISO’s member body in the country of the requester.
ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Fax: +41 22 749 09 47
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii © ISO/IEC 2019 – All rights reserved
---------------------- Page: 2 ----------------------
ISO/IEC DIS 20830:2019(E)
Contents

Contents ................................................................................................................................. 2

Introduction ............................................................................................................................ 6

1 Scope .............................................................................................................................. 1

2 Normative References ........................................................................................................ 1

3 Terms and definitions, mathematical and logical symbols, abbreviations................................... 2

3.1 Terms and Definitions ................................................................................................. 2

3.2 Mathematical and logical symbols ................................................................................. 4

3.3 Abbreviations ............................................................................................................. 5

4 Symbology Description ...................................................................................................... 5

4.1 Symbology Characteristics ........................................................................................... 5

4.2 Symbol Structure ....................................................................................................... 8

5 Requirements ..................................................................................................................18

5.1 Encode Procedure Overview ........................................................................................18

5.2 Data analysis ............................................................................................................20

5.3 Mode .......................................................................................................................21

5.4 Data Encoding...........................................................................................................25

5.5 Error Detection and Correction ....................................................................................55

5.6 User Considerations for Encoding Data in a Han Xin Code Symbol ...................................58

5.7 Construction of final data bit stream ............................................................................59

5.8 Symbol Construction ..................................................................................................60

6 Symbol dimensions ..........................................................................................................65

6.1 Dimensions ...............................................................................................................65

6.2 Quiet zone ................................................................................................................66

7 User Guidelines ................................................................................................................66

7.1 Human Readable Interpretation ...................................................................................66

ISO 2019 - All rights reserved ii
---------------------- Page: 3 ----------------------
ISO/IEC DIS 20830:2019(E)

7.2 Autodiscrimination capability.......................................................................................66

7.3 Principle of Han Xin Code symbol printing and scanning .................................................66

8 Symbol quality .................................................................................................................66

8.1 Symbol quality parameters .........................................................................................66

8.2 Process control measurements ....................................................................................67

9 Decoding procedure overview ............................................................................................67

10 Reference decode algorithm for Han Xin Code ..................................................................69

10.1 Image preprocessing .................................................................................................69

10.2 Locate Finder Pattern And Determine The Orientation ....................................................69

10.3 Structural Information decoding ..................................................................................71

10.4 Establish the sampling grid .........................................................................................73

10.5 Sampling ..................................................................................................................80

10.6 Masking releasing ......................................................................................................80

10.7 Restore data codewords .............................................................................................81

10.8 Error correction decoding ...........................................................................................81

10.9 Data codeword decoding ............................................................................................81

11 Transmitted Data ..........................................................................................................81

11.1 Basic interpretation ...................................................................................................81

11.2 Protocol for Extended Channel Interpretation ................................................................81

Annex A (Normative) Alignment Pattern parameters of symbol of different versions ....................83

Annex B (Normative) Data Capacity and Error Correction Characterics of Han Xin Code ...............87

Annex C (Normative) Information capacity of Han Xin Code ................................................... 103

Annex D (Normative) Error correction codeword generator polynomials ................................... 113

Annex E (Normative) Structural Information ........................................................................ 115

E.1 Error correction encoding of Structural Information ..................................................... 115

E.2 Error correction decoding of Structural Information...................................................... 116

3 ISO 2019 - All rights reserved
---------------------- Page: 4 ----------------------
ISO/IEC DIS 20830:2019(E)

Annex F (Normative) Autodiscrimination compatibility ........................................................... 118

Annex G (Normative) Error correction decoding algorithm ...................................................... 119

Annex H (Informative) User guidance for Han Xin Code printing and scanning .......................... 121

H.1 General principles .................................................................................................... 121

H.2 Selection of Error Correction Level ............................................................................. 121

Annex I (Normative) Print quality of Han Xin Code -- symbology-specific aspects..................... 123

I.1 Fixed Pattern damage .............................................................................................. 123

I.2 Grading of Structural Information Region ........................................................................ 125

I.3 Scan grade ............................................................................................................. 127

Annex J (Informative) Useful process control techniques ....................................................... 128

J.1 Symbol contrast ........................................................................................................... 128

J.2 Assessing Axial Nonuniformity ....................................................................................... 128

J.3 Visual inspection for symbol distortion and defects ........................................................... 128

Annex K (Informative) Han Xin Code encoding examples ....................................................... 129

K.1 Example 1 .................................................................................................................. 129

K.2 Example 2 .................................................................................................................. 135

K.3 Example 3 .................................................................................................................. 144

Annex L (Informative) Symbology Identifier ........................................................................ 157

Annex M (Normative) Charsets of URI Mode ......................................................................... 159

Annex N (Normative) Source codes for Unicode mode in C programming ................................. 171

N.1. Source codes of encoding process ................................................................................ 171

N.2. Source codes of decoding process ................................................................................ 204

Annex O (Normative) Implement Source code for URI Mode in C programming ......................... 215

O.1. Source codes of encoding process ................................................................................ 215

O.2. Source codes of decoding process ................................................................................ 267

ISO 2019 - All rights reserved iv
---------------------- Page: 5 ----------------------
ISO/IEC DIS 20830:2019(E)
Foreword

ISO (the International Organization for Standardization) is a worldwide federation of national standards bodies (ISO

member bodies). The work of preparing International Standards is normally carried out through ISO technical

committees. Each member body interested in a subject for which a technical committee has been established has the

right to be represented on that committee. International organizations, governmental and non-governmental, in liaison

with ISO, also take part in the work. ISO collaborates closely with the International Electrotechnical Commission (IEC)

on all matters of electrotechnical standardization.

International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2.

The main task of technical committees is to prepare International Standards. Draft International Standards adopted

by the technical committees are circulated to the member bodies for voting. Publication as an International Standard

requires approval by at least 75 % of the member bodies casting a vote.

Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights.

ISO shall not be held responsible for identifying any or all such patent rights.

ISO/IEC XXXXX was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology, Subcommittee

SC 31, Automatic identification and data capture techniques.
5 ISO 2019 - All rights reserved
---------------------- Page: 6 ----------------------
ISO/IEC DIS 20830:2019(E)
Introduction

Han Xin Code is a two-dimensional matrix symbology which is made up of an array of nominally

square modules arranged in an overall square pattern, including a Finder Pattern located at four

corners of the symbol that are intended to assist in easy locating of its position, size and inclination.

Alignment Patterns and Assistant Alignment Patterns are also used in Versions 4 to 84 symbols. A wide

range of size of symbols is provided together with four error correction levels. Module dimension is

user-specified to produce symbols by a wide variety of techniques.

Manufacturers of bar code equipment and users of the technology require publicly available standard

symbology specifications to which they can refer when developing equipment and application

standards. The publication of symbology specifications is designed to achieve this.

ISO 2019 - All rights reserved vi
---------------------- Page: 7 ----------------------
ISO/IEC DIS 20830:2019(E)
Information technology — Automatic identification and data
capture techniques — Han Xin Code bar code symbology
specification
1 Scope

This International Standard defines the requirements for the symbology known as Han Xin Code. It

specifies the Han Xin Code symbology characteristics, data encoding process, symbol structure,

dimensions and print quality requirements, error correction rules, reference decoding algorithm, and

user-selectable application parameters.
2 Normative References

The following referenced documents are indispensable for the application of this document. For dated

references, only the edition cited applies. For undated references, the latest edition of the referenced

document (including any amendments) applies.

ISO/IEC 646, Information technology — ISO 7-bit coded character set for information interchange

ISO/IEC 19762, Information technology, Automatic identification and data capture (AIDC) techniques

— Harmonized vocabulary

ISO/IEC 15415, Information Technology — Automatic identification and data capture technique — Bar

code print quality test specification — Two-dimensional symbols

ISO/IEC 15416, Information technology, Automatic identification and data capture techniques - Bar

code print quality test specification - Linear symbols

ISO/IEC 15424, Information technology, Automatic identification and data capture techniques -- Data

Carrier Identifiers (including Symbology Identifiers)
GS1 General Specifications
1 ISO 2019 - All rights reserved
---------------------- Page: 8 ----------------------
ISO/IEC DIS 20830:2019(E)
3 Terms and definitions, mathematical and logical
symbols, abbreviations
3.1 Terms and Definitions

For the purposes of this document, the terms and definitions given in ISO/IEC 19762 and the following

apply.
3.1.1
Assistant Alignment Pattern

A non-data pattern located in the perimeter of the Han Xin Code symbol and intended to provide

additional reference points to synchronize modules for reading.
3.1.2
data bit stream

A binary sequence comprised by the information bit stream and the error correction bit stream.

3.1.3
data codeword

Codewords that are used to encode information codewords and error correction codewords.

3.1.4
error correction bit stream

A binary sequence used to correct errors, made by error correction encoding from the information bit

stream.
3.1.5
GS1 mode
Encoding mode used to representing GS1 data in Han Xin Code.
3.1.6
URI mode

Encoding mode used to representing Uniform Resource Identifier (URI) described in RFC 3986 in Han

Xin Code.
ISO 2019 - All rights reserved 2
---------------------- Page: 9 ----------------------
ISO/IEC DIS 20830:2019(E)
3.1.7
Unicode mode

Encoding mode used to representing text data in Unicode (UTF8) encoding/charset in Han Xin Code.

3.1.8
information bit stream
A binary sequence made up of mode encodings from the original input data.
3.1.9
masking

XOR processing of the bit pattern in the information encoding region of the symbol with an

algorithmically determined pattern to provide a symbol with more evenly balanced numbers of dark

and light modules and reduced the occurrence of patterns which would interfere with fast processing

of the image.
3.1.10
mode
Method of representing a specific character set as a binary bit stream.
3.1.11
mode indicator

The bit sequence indicating in which mode the following data sequence is encoded.

3.1.12
mode terminator
A bit sequence used to terminate the bit sequence representing an encoding mode.
3.1.13
padding bit

Bit ”0”, appended to the information bit stream to meet the requirements of the error correction

algorithm.
3 ISO 2019 - All rights reserved
---------------------- Page: 10 ----------------------
ISO/IEC DIS 20830:2019(E)
3.1.14
Position Detection Pattern

One of the four pattern components of the Finder Pattern in Han Xin Code symbols.

3.1.15
Position Detection Center
The center of the 3×3 dark modules in the Position Detection Pattern.
3.1.16
Position Detection Pattern Separator

A one module wide non-data pattern, made up of all light modules, used to separate the Position

Detection Pattern from the Structural Information region.
3.1.17
Structural Information

A bit stream of data used to record version, error correction level and masking solution.

3.1.18
symbol padding bit

Bit ”0”, not representing data, used to fill the empty positions of the symbol when the information

encoding region cannot be fully filled with 8-bit codewords.
3.1.19
version

Size of the symbol represented in terms of its position in the sequence of permissible sizes for Han Xin

Code symbols, from 23 × 23 modules (Version 1) to 189 × 189 modules (Version 84).

3.2 Mathematical and logical symbols

For the purposes of this specification, the mathematical symbols which follow shall apply globally

unless defined locally:
d number of error correction codewords
e number of erasures
ISO 2019 - All rights reserved 4
---------------------- Page: 11 ----------------------
ISO/IEC DIS 20830:2019(E)
k total number of information codewords
n total number of data codewords
t number of errors
X horizontal width of a module

Y vertical distance from the center line of modules in one row to the center line of modules

in an adjacent row
(…) data in ( ) is figured in binary system.
bin
…HEX data is figured in hexadecimal.
(…) data in ( ) is figured in hexadecimal.
hex

Without any specific statement, a byte is usually comprised of 8 binary bits and the byte’s contents

are represented in hexadecimal.

For the purposes of this specification, the mathematical operations which follow shall apply:

div is the integer division operator.
mod is the integer remainder after division.
XOR is the exclusive-or logic function whose output is one only when its two
inputs are not equivalent.
3.3 Abbreviations
ECI Extended Channel Interpretation
4 Symbology Description
4.1 Symbology Characteristics
4.1.1 Basic Characteristics

Han Xin Code is a two-dimensional matrix symbology with the following basic characteristics:

5 ISO 2019 - All rights reserved
---------------------- Page: 12 ----------------------
ISO/IEC DIS 20830:2019(E)
4.1.1.1 Encodable characters:
(1) Numeric characters (digits 0~9)
(2) ASCII characters (reference to ISO/IEC 646)
(3) Chinese characters (reference to GB18030)
(4) Octet bytes such as graphic and audio information, etc.
(5) GS1 data used in GS1 system
(6) Uniform Resource Identifier (URI)
(7) Any text data reference to a encoding/charset (such as Unicode, JIS, …)
4.1.1.2 Representation of data:

A dark module is a binary one and a light module is a zero, Howerver, dark module is zero and

a light module is one for the reflectance reversal symbols. See 4.1.2 for details of reflectance

reversal.
4.1.1.3 Symbol size in modules:

23 modules × 23 modules to 189 modules × 189 modules (Version 1 to 84, increasing in steps

of two modules per side)
4.1.1.4 Maximum data capacity:
(1) Numeric data: 7827 characters
(2) ASCII characters: 4350 characters

(3) Common Chinese Characters in Regions One and Two of GB18030: 2174 characters

(4) 2-byte Chinese characters data: 1739 characters
(5) 4-byte Chinese characters data: 1044 characters
(6) Binary byte data: 3261 bytes
ISO 2019 - All rights reserved 6
---------------------- Page: 13 ----------------------
ISO/IEC DIS 20830:2019(E)
4.1.1.5 Selectable error correction:

Four levels of Reed-Solomon error correction and their error correction abilities of symbol codewords

are shown as follows:
L1 8%
L2 15%
L3 23%
L4 30%
4.1.2 Summary of Additional Features

The following summarize additional inherent and optional features of Han Xin Code:

a. Masking: (Inherent) Masking pattern is used to the proportions of dark modules and light modules

in the symbols and decrease the occurrences of images preventing fast processing.

b. Reflectance reversal: (Inherent) Symbols are intended to be read when marked so that the image

is either dark on light or light on dark (see Figure 1).

c. Extended Channel Interpretations: (Optional) This mechanism enables characters from other

character sets (e.g. Arabic, Cyrillic, Greek, Hebrew) and other data interpretations or industry-

specific requirements to be represented.
a. Dark on light b. Light on dark
Figure 1: Examples of Hanxin Code symbol encoding the text ”Han Xin Code Symbol”
7 ISO 2019 - All rights reserved
---------------------- Page: 14 ----------------------
ISO/IEC DIS 20830:2019(E)
4.2 Symbol Structure

Each Han Xin Code symbol shall be constructed of n × n nominally square modules set out in a regular

square array and shall consist of an information encoding region, Structural Information regions and

Fixed Pattern region. Fixed Pattern region include Finder Pattern, Position Detection Pattern

separators, Alignment Pattern and Assistant Alignment Patterns. The symbol shall be surrounded by a

quiet zone. Figure 2 illustrates a Version 24 Han Xin Code symbol. Figure 3 illustrates the structure of

a Version 24 symbol.
Figure 2: Han Xin Code symbol (Version 24)
Figure 3: Structure of a Version 24 Han Xin Code symbol
4.2.1 Symbol Versions and Sizes

There are eighty-four sizes of Han Xin Code symbol referred to as Version 1, Version 2 … Version 84

respectively. Version 1 measures 23 modules × 23 modules, Version 2 measures 25 modules × 25

ISO 2019 - All rights reserved 8
---------------------- Page: 15 ----------------------
ISO/IEC DIS 20830:2019(E)

modules and so on, increasing in steps of 2 modules per side up to Version 84 which measures 189

modules × 189 modules. Figure 4 to Figure 9 illustrate the symbols of Versions 1, 4, 24, 40, 62 and

84.
Figure 4: Version 1 symbol
Figure 5: Version 4 symbol
Figure 6: Version 24 symbol
9 ISO 2019 - All rights reserved
---------------------- Page: 16 ----------------------
ISO/IEC DIS 20830:2019(E)
Figure 7: Version 40 symbol
Figure 8: Version 62 symbol
ISO 2019 - All rights reserved 10
---------------------- Page: 17 ----------------------
ISO/IEC DIS 20830:2019(E)
Figure 9: Version 84 symbol
4.2.2 Finder Pattern

The Finder Pattern is made up of four Position Detection Patterns located at the four corners of the

symbol respectively, which is illustrated in Figure 10.

The size of Position Detection Pattern is 7×7 modules. The Position Detection Pattern at the upper left

corner is constructed by five aligned squares, whose lower right corners are superposed. The squares

are constructed of dark 7 × 7 modules, light 6 × 6 modules, dark 5 × 5 modules, light 4 × 4 modules,

dark 3 × 3 modules respectively. The other Position Detection Patterns are obtained by rotating the

upper left one, as illustrated in Figure 10. The scanning ratio of each Position Detection Pattern is

1:1:1:1:3 or 3:1:1:1:1 (scanning along different directions) as illustrated in Figure 11. The center of

dark 3 × 3 modules in Position Detection Pattern is called the Position Detection Center. Similar

patterns have a low probability of being encountered elsewhere in the symbol, so that identification of

the four Position Detection Patterns can define unambiguously the location and rotational orientation

of the symbol in the field of view.
11 ISO 2019 - All rights reserved
---------------------- Page: 18 ----------------------
ISO/IEC DIS 20830:2019(E)

The shapes of all Position Detection Patterns are the same except their placement directions. Figure 11

is the Position Detection Pattern of the upper left corner. The lower left corner Position Detection

Pattern for the upper left corner Position Detection Pattern by clockwise rotation of 90 degrees, the

lower right corner Position Detection Pattern for the lower left corner Position Detection Pattern by

clockwise rotation of 90 degrees, the upper right corner Position Detection Pattern for the lower right

corner Position Detection Pattern by counterclockwise rotation of 90 degrees.
Figure 10: Finder Pattern of Han Xin Code symbol
ISO 2019 - All rights reserved 12
---------------------- Page: 19 ----------------------
ISO/IEC DIS 20830:2019(E)
Figure 11: Structure of Position Detection Pattern
4.2.3 Position Detection Pattern Separator

A one-module wide separator, constructed of all light modules, is placed between each Position

Detection Pattern and the Structural Information region, as illustrated in Figure 10.

4.2.4 Alignment Pattern

The Alignment Pattern is a set of step-wise alignment lines in the Han Xin Code symbol, as illustrated

in Figure 12. There is no Alignment Pattern in the symbols of Version 1, Version 2, and Version 3.

The alignment line is made up of a dark line and an adjacent light line which are one module wide and

follow the rule that the dark line is on the upside or right of the light line. On the left borderline and

the bottom borderline of the symbol, the alignment line is a dark line in one module width.

There are two alignment lines in the Version 4 to 10 symbols with the length of k modules. When the

version is bigger than 10, there are two kinds of Alignment Pattern layouts, the length of the two

alignment lines on the lower left corner in the symbol is a special value r modules, the length of the

rest regions is k modules except the alignment line on the upper left corner and the alignment line on

the lower right corner is a special value (k-9) modules.. The relation of r, k and m in different versions

is given by the following formula:
n = r + m × k
where
n: the total of modules in each side of the symbol
13 ISO 2019 - All rights reserved
---------------------- Page: 20 ----------------------
ISO/IEC DIS 20830:2019(E)

r: the selected length of the two specific alignment lines which locate near by the lower

left corner of the Version 4 to 84 Han Xin code in module. r is the length of the dark

line(including the turning module)

k: the selected length of the normal alignment lines in module, which equals to the

length of the light line(not including one of the turning modules)and the length of the

dark line(not including one of the turning modules).
m: a number obtained by dividing n minus r by k.
The relationship of r and k grids is shown as follow:
Figure 12: Alignment Pattern of Version 24 Han Xin Code symbol

The parameters n, k, m, r in different versions of Han Xin Code listed in Annex A.

ISO 2019 - All rights reserved 14
---------------------- Page: 21 ----------------------
ISO/IEC DIS 20830:2019(E)
Figure 13: Alignment Pattern and Assistant Alignment Pattern of Version 24
Han Xin Code symbol
4.2.5 Assistant Alignment Pattern

Assistant Alignment Pattern is made up of patterns comprised by 6 modules, including 5 light modules

and a dark module, on the four sides of the symbol, as illustrated in Figure 14.
15 ISO 2019 - All rights reserved
---------------------- Page: 22 ----------------------
ISO/IEC DIS 20830:2019(E)
Assistant Alignment Pattern
Assistant Alignment Pattern on the top borderline
on the left borderline
Assistant Alignment Pattern
on the bottom borderline
Assistant Alignment Pattern
on the right borderline
Figure 14: Assistant Alignment Patterns

Every dark Alignment Pattern segment that points through data to a margin, without hitting another

Fixed Pattern, aligns with the dark element of an Assistant Ali
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.