VTI_aux/latex/sem1/hanxin_barcode.tex
2019-11-24 00:44:36 +01:00

151 lines
9.4 KiB
TeX

\documentclass[10pt]{article}
\usepackage[sfdefault]{noto}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage[paperwidth=21cm, paperheight=29.7cm]{geometry}
\geometry{paperwidth=21cm, paperheight=29.7cm, tmargin=2.5cm, bmargin=2.5cm,
lmargin=2.5cm, rmargin=2.5cm}
%\usepackage{tabularx}
%\usepackage{tabulary}
\usepackage{tabu}
\usepackage{array}
\usepackage{wrapfig}
\usepackage{mathtools}
\usepackage{multicol}
\usepackage{vwcol}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{filecontents}
\usepackage{csvsimple}
\usepackage{textcomp}
\usepackage{makecell}
\usepackage{enumitem}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usepackage[colorlinks=true]{hyperref}
\usepackage{siunitx}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{units}
\sisetup{
round-mode =places,
round-precision =2,
}
%\captionsetup{singlelinecheck = false, justification=justified}
\begin{document}
\begin{minipage}[c]{.5\textwidth}
\vspace{0pt}
\hspace{-17pt}
\raggedright
NAME
\\
\hspace{-17pt}
GROUP
\end{minipage}
\begin{minipage}[c]{.46\textwidth}
\vspace{0pt}
\raggedleft
TIK 2019, VTI, S1
\\\today
\end{minipage}
\\
\rule{\textwidth}{1pt}
\\[5pt]
\LARGE{\textbf{Han Xin code}}
\normalsize
\section{Bar codes}
\indent The bar code technology has been around for a long time. It was invented after the second world war and patented in the 50s. The original idea was an extension of morse code to thick and thin lines. There was an attempt to apply this technology to an automated rail car identification system but it did not succeed in the end. The commercial success and widespread adoption we see today did not come until some twenty years later when the first bar codes were utilized to automate the check out of goods in supermarket stores. Several standards began to take shape, most notably Universal Product Code or UPC, utilized in the aforementioned supermarkets and some time later Code39, which the US Army used to mark all commissioned equipment. This is thought to have started the wave of widespread industrial adoption of barcoding.
Nowadays bar codes are present in most everyday objects around us where they are still utilized for the purpose of identification. Be it clearly visible on packaging or hidden inside a piece of electronic equipment where they served this purpose during manufacture. The main idea of a bar code is the simplification of data transfer between the physical world and a computer. Physical representation of bytes as a specially crafted image allows for easy and information dense data transfer, especially with move to two-dimensional or matrix bar codes. Purpose built encoding and decoding algorithms provide the simplicity and ease compared to for example an older method utilizing OCR. Introduction of such technology helped advance modern economy, for better or worse, via the simplification and acceleration of identification for the entire supply chain. Easy identification and tracking, from raw material, through intermediate stages, manufacture and testing to shipping and handling, has been made possible. What's more, the symbols hold their information long after it served its purpose in the supply chain. Even if they are hidden to the casual observer, this information proved useful great many times, mostly when identifying and hunting for spare parts.
Though I have never come in contact with the bar code described here before, I am sure it has played no small role in the manufacture or logistics of the many devices and appliances of Chinese origin that I use daily.
\vspace{-1em}
\section{Background and development of the Han Xin code}
The 2D bar code technology was introduced to China in 1990s. Two national 2D bar code standards corresponding to the AIM symbology specifications, ”PDF417” and “QR Code” were issued in 1997 and 2000 respectively. Acceleration of the process of global economic integration made Chinese economy more and more important part of the global economy. Chinese became an important language in global commerce but the available bar code symbology in the industry could not satisfy the requirement of encoding Chinese characters efficiently. In order to solve the problem, Article numbering center of China (GS1 China) invented the Chinese Sensible Code (now known also as Han Xin code) and developed the encoding and decoding systems in cooperation with Chinese AIDC (Automatic Identification and Data Capture) companies "Visiontech", “Inspiry” and “WangLuChangXiang”. Chinese Sensible Code can encode over twenty thousand different Chinese, Japanese and Korean characters. It can encode one commonly used Chinese character in 12 bits, and besides that it can also encode extended ASCII, Unicode and supports ECI (Extended Channel Interpretation). Development and application of the Chinese Sensible Code in global trade raised the level of automatic identification and data capture techniques for Chinese and other Asian industries. After Han Xin code development project completed, GS1 China put it to the public domain and promoted its application in enterprises and to manufactures of AIDC industry both domestic and foreign. At present, Han Xin code is strongly supported by the industrial chain in China and applied in many areas, such as logistics, healthcare, mobile-business etc. In 2007, Han Xin code was officially issued as China State Standard (GB/T 21049-2007), and became the first 2D bar code standard with independent intellectual property rights. In September of the same year, Han Xin code has been standardized by ISO under ISO/IEC JTC1 SC31 as ISO/IEC DIS 20830. It is the first and only Chinese 2D code standardized by ISO.
\newpage
\subsection{Applied patents}
GS1 China applied for six Chinese patents in 2006 in connection to the Han Xin symbology.
\\These include:
\begin{itemize}
\item Method of Error Correcting Coding
\item Coding Method of Multi-Information
\item Method of 2D Barcode Transforming into Digital Information
\item Method of Chinese Information Encoding technique of 2D Barcode
\item Method of Creating 2D Barcode
\item Method of Image Distortion Correction of 2D Barcode
\end{itemize}
Most of these patents were granted. GS1 China however decided to make the symbology available in the public domain, not requiring any licensing or fees.
\subsection{Symbology}
Han Xin Code has 84 possible sizes, referred to as version 1, version 2, and so on through version 84. Version 1 (the smallest) is 23 x 23 modules, and version 84 (the largest) is 189 x 189 modules.
With minimum error correction levels, Han Xin code can encode up to 2,174 common Chinese characters, 3,261 binary bytes, 4,350 ASCII characters, or 7,827 numeric characters. Multiple data types can be encoded in the same symbol. Han Xin Code uses the Reed-Solomon algorithm for error correction. Four selectable levels of error correction are available, the highest of which enables the barcode to be read even if up to 30 percent of the code is damaged at the expense of information capacity.
\begin{minipage}[t]{.48\textwidth}
\vspace{0pt}
\hspace{-17pt}
\includegraphics[scale=.28]{hx_anatomy.png}
\captionof{figure}{Example of Han Xin bar code structure}
\end{minipage}
\begin{minipage}[t]{.48\textwidth}
\vspace{0pt}
The symbol is comprised of the following basic elements:
\begin{itemize}
\item Square modules in a regular square array that contain data
\item Finder pattern
\item Alignment pattern
\item Quiet zone border
\end{itemize}
\end{minipage}
\\[10pt]
The finder pattern consists of four chevron-shaped position detection patterns, one in each corner of the symbol.
The alignment pattern, which is present only in version 4 and larger symbols, helps the decoding software re-synchronize in case of slight distortion of the code. The pattern consists of a set of zigzag lines that traverse the symbol. The quiet zone that surrounds the symbol must be at least three modules wide.
\\
\begin{minipage}[c]{.32\textwidth}
\vspace{0pt}
\centering
\includegraphics[scale=.32]{smolbarcode.png}
\captionof{figure}{Version 1, level 1 EC}
\end{minipage}
\begin{minipage}[c]{.32\textwidth}
\vspace{0pt}
\centering
\includegraphics[scale=.32]{barcode.png}
\captionof{figure}{Version 4, level 1 EC}
\end{minipage}
\begin{minipage}[c]{.33\textwidth}
\vspace{0pt}
\centering
\vspace{0pt}
\includegraphics[scale=.32]{bigbarcode.png}
\captionof{figure}{Version 18, level 3 EC}
\end{minipage}
\newpage
\section{Sources and links}
\begin{itemize}
\item \href{https://barcode.tec-it.com/en/HanXin}{TEC-IT online bar code generator}
\item \href{http://www.ancc.org.cn/GS1ChinaEN/GS1ChinaENTest/hanxincode.aspx}{GS1 China English website}
\item \href{http://www.ancc.org.cn/Knowledge/BarcodeArticle.aspx?codeId=7&id=260}{GS1 China Chinese website}
\item \href{https://blog.csdn.net/marshou/article/details/79623752}{Chinese blog comparing QR and Han Xin bar code technology}
\item \href{https://ieeexplore.ieee.org/document/5209234}{IEEE paper on Han Xin decoding algorithms}
\item \href{https://barcodeguide.seagullscientific.com/Content/Symbologies/Han_Xin.htm}{Seagull Scientific:} basic symbology info
\item \href{https://github.com/bwipp/postscriptbarcode/blob/master/src/hanxin.ps}{BWIPP (Barcode Writer In Pure PostScript):} PostScript implementation of the Han Xin bar code algorithm
\item \href{https://git.dotya.ml/2EEEB/VTI_aux/src/branch/master/code/pyhanxingen.py}{My crude Tk GUI generator} utilizing an excellent BWIPP wrapper python-treepoem
\end{itemize}
\end{document}