JPH0950481A - Two-dimensional code reader - Google Patents
Two-dimensional code readerInfo
- Publication number
- JPH0950481A JPH0950481A JP7200806A JP20080695A JPH0950481A JP H0950481 A JPH0950481 A JP H0950481A JP 7200806 A JP7200806 A JP 7200806A JP 20080695 A JP20080695 A JP 20080695A JP H0950481 A JPH0950481 A JP H0950481A
- Authority
- JP
- Japan
- Prior art keywords
- symbol
- pattern
- sequence
- read
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012545 processing Methods 0.000 claims abstract description 13
- 238000010586 diagram Methods 0.000 description 7
- 238000000034 method Methods 0.000 description 7
- 238000006243 chemical reaction Methods 0.000 description 2
- 239000003550 marker Substances 0.000 description 2
- 230000008707 rearrangement Effects 0.000 description 2
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、主としてディジタ
ル複写機、ファクシミリ装置、ファイリングシステム等
のディジタル画像入出力装置のスキャナを利用してPD
F−417の二次元バーコードを解号する二次元コード
読取装置に係り、特に二次元コードの斜め読取補正に関
するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention mainly uses a scanner of a digital image input / output device such as a digital copying machine, a facsimile device, a filing system, etc.
The present invention relates to a two-dimensional code reader for decoding a two-dimensional bar code of F-417, and more particularly to a diagonal reading correction of a two-dimensional code.
【0002】[0002]
【従来の技術】従来、データを符号化された情報として
機械読取可能な図形画像で表現し、また、それを認識す
る目的で提案された先行技術例として、特開平5−29
0204号公報や特開平6−12515号公報等には、
ハンディスキャナ等のラインセンサによって記録担体上
に記録された二次元バーコードを光学的に読み取り、そ
の解号を実行する装置が開示されている。2. Description of the Related Art Conventionally, as a prior art example proposed for the purpose of expressing data as a machine-readable graphic image as encoded information and recognizing it, Japanese Patent Laid-Open No. 5-29 is known.
No. 0204 and Japanese Patent Laid-Open No. 6-12515,
An apparatus is disclosed which optically reads a two-dimensional bar code recorded on a record carrier by a line sensor such as a handy scanner and executes the decoding.
【0003】ところで、二次元バーコードはシンボル・
テクノロジーズ社の開発によるPDF−417をその代
表として挙げることができる。以下、二次元バーコード
としてPDF−417を使用したものとして説明する。
なお、PDF−417の詳細は1990年1月5日付U
SP07/461881号に記載され、そのアルゴリズ
ムも既に公開されている。By the way, a two-dimensional bar code is a symbol
A representative example is PDF-417 developed by Technologies. Hereinafter, description will be made assuming that PDF-417 is used as the two-dimensional barcode.
For details of PDF-417, refer to U on January 5, 1990.
It is described in SP07 / 461881, and its algorithm has already been published.
【0004】図7はPDF−417シンボルの種々サイ
ズの異なるパターンを例示している。図7(B)(C)に示
すように、PDF−417シンボルは、30×60mils、24
×24milsの2種類のサイズを示しているが、そのいずれ
も構成は共通している。すなわち図7に示すように、P
DF−417シンボルはバーコード化されたデータ行を
上下に積み重ねて正立しており、シンボル内の各行は左
端から順に開始パターンS、左行標識パターンRL、コー
ドワードのデータ領域D、右行標識パターンRR、停止パ
ターンTを一連に構成している。FIG. 7 illustrates different patterns of various sizes of PDF-417 symbols. As shown in FIGS. 7B and 7C, the PDF-417 symbol is 30 × 60 mils, 24
Two sizes of × 24mils are shown, but both have the same configuration. That is, as shown in FIG.
The DF-417 symbol is vertically erected by stacking bar coded data rows vertically, and each row in the symbol is a start pattern S, a left row indicator pattern RL, a code word data area D, and a right row in order from the left end. The marking pattern RR and the stop pattern T are constructed in series.
【0005】開始パターンS及び停止パターンTはシン
ボルの各行の開始点と終了点とを識別する。また、左行
と右行の標識パターンRL,RRは記号の行番号と行数、デ
ータ列数、または安全保護水準のいずれかとを含んでい
る。さらに、コードワードは数、文字、その他の記号ま
たはこれらに関連する値を符号化するための基本単位で
あって、各行内のコードワードは集合的にデータ列を形
成する。Cはコードワードを数字化して示すものであ
る。なお、シンボル中の黒色部分をバーと呼び、白色部
分をスペースと呼ぶ。The start pattern S and stop pattern T identify the start and end points of each row of symbols. The left and right line indicator patterns RL and RR include the line number and the number of symbols, the number of data columns, or the security level of the symbol. Further, codewords are the basic units for encoding numbers, letters, other symbols or their associated values, and the codewords within each row collectively form a data string. C represents the codeword in a digitized form. The black part in the symbol is called a bar and the white part is called a space.
【0006】図8にPDF−417二次元バーコードの
シンボル構成の基となるパターンを示す。この図のパタ
ーンから明らかなように、セルaはデータ列を構成する
最小単位のブロックのことである。また、各セルを黒で
塗り潰した部分をバーと呼び、白のままの部分をスペー
スと呼び、これらバーとスペースの間隔によってデータ
がコード化されている。FIG. 8 shows a basic pattern of the symbol structure of the PDF-417 two-dimensional bar code. As is clear from the pattern of this figure, the cell a is a minimum unit block that constitutes a data string. Further, a portion in which each cell is filled with black is called a bar, and a portion that remains white is called a space, and data is coded by the interval between these bars and spaces.
【0007】なお、このコードワード内で交番するバー
及びスペースの集合をコードワードのXシーケンスと定
義し、このXシーケンスはデータをエンコードする際に
生成するものである。これに対しデコードする際に、コ
ード化されたデータのバーとスペースの間隔データを求
めるシーケンスをTシーケンスと定義する。The set of alternating bars and spaces within this codeword is defined as an X-sequence of codewords, and this X-sequence is generated when data is encoded. On the other hand, when decoding, a sequence for obtaining the bar data and space interval data of coded data is defined as a T sequence.
【0008】以上のような構成のPDF−417二次元
バーコードを対象として構成された従来の読取装置で
は、ハンディスキャナ等のラインセンサによって上記P
DF−417シンボルを読み取るときは、開始パターン
Sと停止パターンTを同時に検出することが前提となっ
ており、読み取りを開始すると、開始及び停止パターン
S,Tに隣接する左行及び右行標識パターンRL,RRを解
号し、これによって初めて、コードワードのデータ領域
Dの解号を実行することができるようになっている。In the conventional reading device constructed for the PDF-417 two-dimensional bar code having the above-mentioned configuration, the P sensor is used by a line sensor such as a handy scanner.
When reading the DF-417 symbol, it is premised that the start pattern S and the stop pattern T are detected at the same time, and when the reading is started, the left and right row marking patterns adjacent to the start and stop patterns S and T Only by solving RL and RR, the decoding of the code word data area D can be executed.
【0009】[0009]
【発明が解決しようとする課題】上述のように従来装置
の場合、PDF−417シンボルは通常、ハンディスキ
ャナで読み取られ、その解号が実行されており、そのと
きの条件として開始及び停止の両パターンS,Tが見い
だせることを前提にしているため、シンボルを斜め読み
した場合、解号不能となるという問題点があった。As described above, in the case of the conventional apparatus, the PDF-417 symbol is usually read by the handy scanner and its decoding is executed, and the conditions at that time are both start and stop. Since it is premised that the patterns S and T can be found, there is a problem that the symbol cannot be decoded when the symbol is read diagonally.
【0010】すなわち、この二次元コードをラインセン
サで読み取る場合、シンボルがラインセンサの走査方向
に平行に置かれていれば、走査ラインの第1番目から開
始パターンSと停止パターンTとを同時に検出すること
ができるので、解号が不能になるという問題は生じない
が、通常はラインセンサの走査方向に対して若干の傾斜
角度をもってシンボルをセットする場合が日常的に起こ
り得るものである。That is, when reading the two-dimensional code with the line sensor, if the symbol is placed in parallel with the scanning direction of the line sensor, the start pattern S and the stop pattern T are simultaneously detected from the first scanning line. Therefore, there is no problem that the decoding is disabled, but it is usually possible to set a symbol at a slight inclination angle with respect to the scanning direction of the line sensor on a daily basis.
【0011】しかしながら、従来装置では、このように
傾いた形でシンボルをセットすると、走査ラインのいず
れかにおいて、開始パターンSのみ、あるいは停止パタ
ーンTのみしか読み取ることができない範囲が必然的に
発生する。この走査ラインの範囲においては、開始及び
停止パターンの両パターンS,Tが同時に検出されない
ため、解号エラーとなってしまい、シンボルが記録され
た記録担体、例えば原稿を正確に置き直すことが必要と
なる。However, in the conventional apparatus, when the symbols are set in such a tilted shape, a range in which only the start pattern S or only the stop pattern T can be read inevitably occurs in any of the scanning lines. . In this scan line range, both the start and stop patterns S and T are not detected at the same time, resulting in a decoding error, and it is necessary to correctly reposition the record carrier on which the symbols are recorded, for example, the document. Becomes
【0012】このようにシンボルをラインセンサの走査
方向に平行に、例えばディジタル複写機の場合、シンボ
ルがコンタクトガラス面の辺縁に平行に配置しなければ
ならないという作業条件を有する従来装置の場合、ユー
ザーのシンボル解号作業に煩雑な手間を負わせるという
不利、不具合があった。As described above, in the case of the conventional apparatus having the working condition that the symbols must be arranged parallel to the scanning direction of the line sensor, for example, in the case of a digital copying machine, the symbols must be arranged parallel to the edge of the contact glass surface. There was a disadvantage and trouble that it took a lot of trouble to the user's symbolic work.
【0013】本発明は、上記のような問題点を解決する
ためになされたもので、二次元バーコードのシンボルが
ラインセンサの走査方向に対して斜めに置かれている場
合であっても、そのシンボルが記録された原稿等の記録
担体を置き直すことなく読み取りを補正することができ
る機能を備えた二次元コードの読取装置を提供すること
を目的とするものである。The present invention has been made in order to solve the above problems, and even when a symbol of a two-dimensional bar code is placed obliquely to the scanning direction of the line sensor, It is an object of the present invention to provide a two-dimensional code reading device having a function of correcting reading without repositioning a record carrier such as a document on which the symbol is recorded.
【0014】[0014]
【課題を解決するための手段】上記目的を達成するため
に本発明では、記録担体上の二次元バーコードを光学的
に読み取るラインセンサと、このラインセンサにより読
み取られた二次元バーコードのシンボルを格納する読取
データ用のイメージメモリと、このイメージメモリに格
納された各走査ライン毎に前記シンボル左端に設けられ
ている開始パターンの有無を照合する開始パターン照合
手段と、前記イメージメモリに格納された各走査ライン
毎に前記シンボル右端に設けられている停止パターンの
有無を照合する停止パターン照合手段と、前記開始パタ
ーン照合手段及び停止パターン照合手段のいずれにおい
ても開始、停止の両パターンが無い場合にシンボルの走
査ラインに対する傾きを検出するとともに前記イメージ
メモリ上で該シンボル画像データを任意角度ずつ回転さ
せる回転処理手段と、前記開始パターン及び停止パター
ンのうち照合により先に検出された一方のパターン側か
ら読むシンボルのTシーケンスを各走査ライン毎に生成
し且つそのTシーケンスの生成中に他方のパターンが検
出された時点で該他方のパターン側から読むシンボルの
Tシーケンスを各走査ライン毎に生成するTシーケンス
生成バッファと、前記左右のTシーケンスが混在する走
査ラインのデータをデコード処理するデコード処理手段
とを具備するものとしている。In order to achieve the above object, according to the present invention, a line sensor for optically reading a two-dimensional bar code on a record carrier and a symbol of the two-dimensional bar code read by the line sensor. An image memory for read data, which stores, and start pattern collating means for collating the presence or absence of a start pattern provided at the left end of the symbol for each scanning line stored in the image memory, and stored in the image memory. When both the start pattern and the stop pattern are not present in the stop pattern matching means for checking the presence or absence of the stop pattern provided at the right end of the symbol for each scanning line and the start pattern matching means and the stop pattern matching means The inclination of the symbol with respect to the scanning line is detected, and A rotation processing means for rotating the image data by an arbitrary angle and a T sequence of symbols to be read from one of the start pattern and the stop pattern, which is detected first by the collation, is generated for each scanning line, and T A T sequence generation buffer that generates a T sequence of symbols to be read from the other pattern side at the time when the other pattern is detected during sequence generation, and a scan line in which the left and right T sequences coexist. A decoding processing means for decoding the data is provided.
【0015】上記によると、まず、ラインセンサの走査
ラインに対して斜めに置かれたシンボル全体を読み取
り、イメージメモリに格納し、各走査ライン毎に、開始
または停止パターンを照合する。この照合によって全ラ
イン中、開始パターンも停止パターンもない場合が発生
する。そのラインにおいては、事前に開始パターンまた
は停止パターンのいずれが先に検出されたかが既に認識
されており、シンボルの傾きの方向が解るので、任意角
度だけ画像回転させて、開始パターン及び停止パターン
の照合のリトライをいずれかが先に検出されるまで行う
ことで、読み取り補正することができる。According to the above, first, the entire symbol placed obliquely with respect to the scanning line of the line sensor is read and stored in the image memory, and the start or stop pattern is collated for each scanning line. Due to this matching, there is a case where there is neither a start pattern nor a stop pattern in all lines. In that line, it is already known in advance which of the start pattern or the stop pattern was detected, and the direction of the inclination of the symbol is known.Therefore, the image is rotated by an arbitrary angle and the start pattern and the stop pattern are compared. The reading and correction can be performed by performing the above retry until either one is detected first.
【0016】そして、各ライン毎に開始または停止パタ
ーンを照合することができるようになると、最初に開始
パターンが検出されたときは、まず、左からシンボルを
読んで左Tシーケンスを発生させる。各走査ライン毎の
左Tシーケンスの生成が進み、停止パターンが検出され
ると、その時点で右からシンボルを読んで、右Tシーケ
ンスを発生させる。この場合、最初に停止パターンが来
るときは、上記とは逆の順序となる。この後、前記左右
のTシーケンスが混在する走査ラインのデータのコード
ワード変換を行い、さらに左右Tシーケンスを並び替え
て斜め補正を行うステッチング処理を施して文書コード
を作成する。When the start or stop pattern can be collated for each line, when the start pattern is first detected, first, the symbol is read from the left to generate the left T sequence. When the generation of the left T sequence for each scan line progresses and a stop pattern is detected, the symbol is read from the right at that time point and the right T sequence is generated. In this case, when the stop pattern comes first, the order is reversed. After that, codeword conversion is performed on the data of the scanning line in which the left and right T sequences are mixed, and the stitching process for rearranging the left and right T sequences to perform diagonal correction is performed to create a document code.
【0017】[0017]
【発明の実施の形態】図1〜図6は本発明を実施した二
次元コードの読取装置の一形態を示している。図1に示
すように、この読取装置は、ディジタル複写機の中央制
御装置に構成された解号装置1を備え、その複写機に付
設のスキャナ2を利用してPDF−417シンボルの読
み取りを行うように構成されている。スキャナ2はCC
Dラインセンサにより構成され、記録担体としての原稿
上に記録された二次元バーコードを光学的に読み取り、
その読取データを解号装置1へ出力する。1 to 6 show an embodiment of a two-dimensional code reading apparatus embodying the present invention. As shown in FIG. 1, this reading device includes a decoding device 1 which is configured in a central control unit of a digital copying machine, and reads a PDF-417 symbol using a scanner 2 attached to the copying machine. Is configured. Scanner 2 is CC
A two-dimensional bar code, which is composed of a D line sensor and is recorded on an original as a record carrier, is optically read,
The read data is output to the decoding apparatus 1.
【0018】解号装置1は前掲の図7に示した二次元バ
ーコードのシンボルを読み込んだ後のTシーケンスを発
生させるところで、スキャナ2の走査方向に対する原稿
の傾きによるシンボルの斜め補正を行うもので、図2に
示すように、読取データ用のイメージメモリ3、開始パ
ターン照合手段4、停止パターン照合手段5、回転処理
手段6、Tシーケンス生成バッファ7、全Tシーケンス
メモリ8及び並び替え(ステッチング)手段9により構
成され、その解号(デコード)はシンボル入力→Tシーケ
ンス生成→コードワード変換→ステッチング→文書コー
ド出力の順に行われ、前記斜め補正はTシーケンス生成
時に行われる。The decoding apparatus 1 performs the skew correction of the symbol due to the inclination of the document with respect to the scanning direction of the scanner 2 when the T sequence is generated after the symbol of the two-dimensional bar code shown in FIG. 7 is read. Then, as shown in FIG. 2, an image memory 3 for read data, a start pattern matching means 4, a stop pattern matching means 5, a rotation processing means 6, a T sequence generation buffer 7, an entire T sequence memory 8 and rearrangement (stitching). Means 9), and its decoding (decoding) is performed in the order of symbol input → T sequence generation → code word conversion → stitching → document code output, and the diagonal correction is performed at the time of T sequence generation.
【0019】イメージメモリ3は、スキャナ2により読
み取られた二次元バーコードのシンボル全体を格納す
る。開始パターン照合手段4は、イメージメモリ3に格
納された各走査ライン毎にシンボル左端に設けられてい
る開始パターンSの有無を照合する。停止パターン照合
手段5は、イメージメモリ3に格納された各走査ライン
毎にシンボル右端に設けられている停止パターンTの有
無を照合する。The image memory 3 stores the entire two-dimensional bar code symbol read by the scanner 2. The start pattern matching means 4 matches the presence or absence of the start pattern S provided at the left end of the symbol for each scanning line stored in the image memory 3. The stop pattern matching means 5 matches the presence or absence of the stop pattern T provided at the right end of the symbol for each scanning line stored in the image memory 3.
【0020】回転処理手段6は、開始パターン照合手段
4及び停止パターン照合手段5のいずれにおいても開
始、停止の両パターンS,Tが無い場合にシンボルの走
査ラインに対する傾きを検出するとともに、イメージメ
モリ3上で該シンボル画像データを任意角度ずつ回転さ
せる。The rotation processing means 6 detects the inclination of the symbol with respect to the scanning line when there is no start pattern S or stop pattern S in both the start pattern matching means 4 and the stop pattern matching means 5, and also the image memory. 3, the symbol image data is rotated by an arbitrary angle.
【0021】Tシーケンス生成バッファ7は、開始パタ
ーンS及び停止パターンTのうち照合により先に検出さ
れた一方のパターン側から読むシンボルのTシーケンス
を各走査ライン毎に生成し、且つ、そのTシーケンスの
生成中に他方のパターンが検出された時点で、該他方の
パターン側から読むシンボルのTシーケンスを各走査ラ
イン毎に生成する。The T sequence generation buffer 7 generates, for each scanning line, a T sequence of symbols to be read from one of the start pattern S and the stop pattern T, which is detected first by the collation, and the T sequence is generated. When the other pattern is detected during the generation of, the T sequence of symbols read from the other pattern side is generated for each scanning line.
【0022】次に、図3のフローチャートを参照しなが
ら、読取装置によるPDF−417シンボルの読取動作
を説明すると、ステップ#5でPDF−417シンボル
の読取動作を開始する。ここで、Lはスキャナ2の走査
ライン番号を示している。全Tシーケンスメモリ8は、
生成された左右Tシーケンスを格納する。並び替え手段
9は全Tシーケンスメモリ8に格納された左右Tシーケ
ンスが混在する走査ラインのデータをデコード処理する
ために、これらを並べ替えて合成し、正しい読取データ
を作成する。Next, referring to the flowchart of FIG. 3, the reading operation of the PDF-417 symbol by the reading device will be described. In step # 5, the reading operation of the PDF-417 symbol is started. Here, L indicates the scanning line number of the scanner 2. All T sequence memory 8 is
The generated left and right T sequences are stored. The rearrangement means 9 rearranges and combines the data of the scanning lines in which the left and right T sequences stored in the entire T sequence memory 8 are mixed, and creates correct read data.
【0023】次に、図3のフローチャートを参照しなが
ら、読取装置によるPDF−417シンボルの読取動作
を説明すると、ステップ#5でPDF−417シンボル
の読取動作を開始する。このシンボルの読取を開始する
と、読取データ用イメージメモリ3は、その読み取った
シンボル全体のデータを格納する。次いで、ステップ#
10ではシンボルLラインの左先端のTシーケンスを演
算し、ステップ#15でその結果が特定データである開
始パターンデータであるか、否かを照合する。Next, referring to the flowchart of FIG. 3, the reading operation of the PDF-417 symbol by the reading device will be described. In step # 5, the reading operation of the PDF-417 symbol is started. When the reading of this symbol is started, the read data image memory 3 stores the data of the entire read symbol. Then step #
In step 10, the T sequence at the left end of the symbol L line is calculated, and in step # 15 it is checked whether or not the result is start pattern data which is specific data.
【0024】図4は、シンボルBが走査ラインに対して
斜めにセットされた場合のTシーケンスの読み取り方の
一例を示し、図5はその場合のTシーケンスの並び方の
一例を示している。図4に示すように、シンボルBが走
査ラインに対して大きく傾いて配置されているときは、
図5に示すようにシンボルBの走査を開始した1ライン
目(L=1)の時点から開始パターンSが現れる直前(L
=n−1)までの間はTシーケンスデータはなく、余白
部分として認識される。なお、この例では1つのセルの
走査は走査ライン5本分に相当する。FIG. 4 shows an example of how the T sequence is read when the symbol B is set obliquely to the scanning line, and FIG. 5 shows an example of how the T sequence is arranged in that case. As shown in FIG. 4, when the symbol B is arranged with a large inclination with respect to the scanning line,
As shown in FIG. 5, from the time of the first line (L = 1) when the scanning of the symbol B is started, immediately before the start pattern S appears (L
= N-1), there is no T sequence data, and it is recognized as a blank portion. In this example, scanning one cell corresponds to five scanning lines.
【0025】開始パターンSが現れるnライン目に達す
ると、ステップ#15でそのことが認識され、ステップ
#20で左Tシーケンスが生成される。この場合、開始
パターンSが現れないときは、シンボルBが斜めに配置
されている関係から、最初は必ず停止パターンTが現れ
ることになる。そのときはステップ#25へ進み、シン
ボルLラインの右先端のTシーケンスを演算し、ステッ
プ#30でその結果が特定データである停止パターンデ
ータであるか、否かを照合し、さらにステップ#35で
右Tシーケンスを生成する。つまり、データを逆読みし
ていく。When the nth line in which the start pattern S appears appears, this is recognized in step # 15, and the left T sequence is generated in step # 20. In this case, when the start pattern S does not appear, the stop pattern T always appears at first because of the relation that the symbols B are arranged obliquely. In that case, the process proceeds to step # 25, the T sequence at the right end of the symbol L line is calculated, and it is checked in step # 30 whether or not the result is stop pattern data which is the specific data, and then step # 35. Generates a right T sequence. That is, the data is read backward.
【0026】このときのTシーケンスデータは例えば図
5に示すように、92222247 422…となる。このTシー
ケンスデータは図7(B)のPDF−417シンボルとの
対照から明らかなように、922222が左端の開始パターン
Sであり、422…が左行標識パターンRLであり、そし
て、nライン目では、データ中に開始パターンSと左行
標識パターンRLの一部のみしか存在していないことが分
かる。At this time, the T sequence data is, for example, 92222247 422 ... As shown in FIG. As is clear from the contrast with the PDF-417 symbol of FIG. 7B, 922222 is the leftmost start pattern S, 422 ... Is the left row marking pattern RL, and the n-th line is the T sequence data. Then, it can be seen that only a part of the start pattern S and the left row marker pattern RL are present in the data.
【0027】次に(n+1)ライン目では、9222247 422
… 223…となり、ここで初めてコードワードのデータ
領域Dの一部が現れるので、ステップ#20で左Tシー
ケンスデータを、またはステップ#35で右Tシーケン
スを生成する。(n+2)ライン目以降も開始パターンS
を検出できる状態にある間は、開始パターン検出後、左
Tシーケンスデータまたは右Tシーケンスデータを生成
し、それを全Tシーケンスメモリ17に格納する。Next, in the (n + 1) th line, 9222247 422
223 ..., and a part of the data area D of the codeword appears for the first time, so the left T sequence data is generated in step # 20 or the right T sequence is generated in step # 35. Start pattern S after (n + 2) line
While the state of being able to detect is generated, after the start pattern is detected, left T sequence data or right T sequence data is generated and stored in the entire T sequence memory 17.
【0028】ところで、図4に示したように原稿セット
状態が一定限度、つまりシンボルBの対角線角度を超え
て大きく傾いていると、全ライン中、シンボルBの開始
パターンSも停止パターンTもない場合が発生する。そ
のようなラインにおいては、事前に開始パターンSまた
は停止パターンTのいずれが先に検出されたかが既に認
識されており、シンボルBの傾きの方向が解るので、ス
テップ#50で回転処理手段6により任意角度だけ画像
回転させて、開始パターンS及び停止パターンTの照合
のリトライをいずれかが先に検出されるまで行うこと
で、読み取り補正することができる。By the way, as shown in FIG. 4, when the document set state is tilted to a certain limit, that is, beyond the diagonal angle of the symbol B, the start pattern S and the stop pattern T of the symbol B are not present in all lines. There are cases. In such a line, it is already known in advance which of the start pattern S or the stop pattern T is detected, and the direction of the inclination of the symbol B is known. Therefore, in step # 50, the rotation processing means 6 arbitrarily determines. The image can be read and corrected by rotating the image by an angle and retrying the collation of the start pattern S and the stop pattern T until either one is detected first.
【0029】すなわち、開始パターンSまたは停止パタ
ーンTの出現性からシンボルBの回転方向が決まり、該
シンボルBの画像をイメージメモリ3上で任意角θだけ
CCW方向またはCW方向に回転する。イメージメモリ3上
で画像回転したシンボルBは開始パターンSまたは停止
パターンTのうち、いずれかのパターンが検出できるま
で再度、同様の回転処理を繰り返し、太実線で示す元の
傾き角度のシンボル画像Bから細実線で示すシンボル画
像B′まで回転させる。That is, the rotation direction of the symbol B is determined from the appearance of the start pattern S or the stop pattern T, and the image of the symbol B is displayed on the image memory 3 by an arbitrary angle θ.
Rotate in CCW or CW direction. For the symbol B whose image has been rotated on the image memory 3, the same rotation process is repeated again until either the start pattern S or the stop pattern T can be detected, and the symbol image B having the original inclination angle shown by the thick solid line is displayed. To the symbol image B ′ indicated by the thin solid line.
【0030】なお、図4中、a,b,c,dは元の傾き
角度、つまり最初読み取られたシンボル画像Bの状態に
おける4つのコーナー部を示す。また、a′,b′,
c′,d′は任意角θの連続回転後のシンボル画像B′
の状態における4つのコーナー部を示す。これらから明
らかなように、シンボルBの回転は1つのコーナー部a
を中心としてなされる。In FIG. 4, a, b, c, and d indicate the original tilt angles, that is, the four corners in the state of the symbol image B read first. Also, a ', b',
c ′ and d ′ are symbol images B ′ after continuous rotation at an arbitrary angle θ
4 shows four corners in the state. As is clear from these, the rotation of the symbol B is caused by one corner a.
Is made mainly.
【0031】但し、任意角θは2〜3°程度の微小角で
もって均等に割り振ってもよく、あるいは大小異なる角
度を順次組み合わせた形で割り振ってもよい。また、回
転処理手段6の回転処理はアフィン変換と、補間処理を
行うことにより、二値の濃度値は保存される。However, the arbitrary angle θ may be evenly distributed by a minute angle of about 2 to 3 °, or may be allocated by sequentially combining angles of different sizes. The rotation processing unit 6 performs affine transformation and interpolation processing to store binary density values.
【0032】開始パターンSまたは停止パターンTのい
ずれかのパターンが検出可能になったところが、図5に
示すmライン目であるとすると、ステップ#30で右T
シーケンスの基準となる停止パターンTが現れ、あるい
はステップ#15で左Tシーケンスの基準となる開始パ
ターンSが現れる。Assuming that either the start pattern S or the stop pattern T can be detected at the m-th line shown in FIG. 5, at step # 30, the right T
The stop pattern T serving as the reference of the sequence appears, or the start pattern S serving as the reference of the left T sequence appears in step # 15.
【0033】そこで、ステップ#30ではこの停止パタ
ーンTが現れた判定すると、ステップ#35で、そのラ
インからTシーケンスの生成を右Tシーケンスに、つま
り停止パターンTから逆読みしていく。図5に示す8244
22は停止パターンTのTシーケンスデータ、324…は右
行標識パターンRRのTシーケンスデータ、587…はデー
タ領域Dの右端のTシーケンスデータである。この時点
からTシーケンスデータは左Tシーケンスと右Tシーケ
ンスとが混在する形となる。Therefore, when it is determined in step # 30 that the stop pattern T appears, in step # 35, the generation of the T sequence is read backward from the line to the right T sequence, that is, from the stop pattern T. 8244 shown in FIG.
22 is T sequence data of the stop pattern T, 324 ... is T sequence data of the right row marker pattern RR, and 587 ... is T sequence data of the right end of the data area D. From this point, the T sequence data is in a form in which the left T sequence and the right T sequence are mixed.
【0034】また、mライン目において右Tシーケンス
を生成している場合は、停止パターンTとともに左Tシ
ーケンスの基準となる開始パターンSが現れるので、ス
テップ#15で開始パターンSが現れたと判定し、ステ
ップ#20で左Tシーケンスを発生させることになる。Further, when the right T sequence is generated in the m-th line, the start pattern S which is the reference of the left T sequence appears together with the stop pattern T, so it is determined in step # 15 that the start pattern S has appeared. The left T sequence is generated in step # 20.
【0035】そして、ステップ#40でシンボルの最終
ラインに到達したか、否かを判定し、到達していないと
きは次の走査ラインについて、上記したステップ#5〜
ステップ#40までのプロセスを繰り返し、以後、同様
にしてステップ#45でシンボル全体のTシーケンスの
生成が終了するまで、各走査ラインについて上記プロセ
スを繰り返す。Then, in step # 40, it is determined whether or not the final line of the symbol has been reached, and if it has not reached, the above-mentioned steps # 5 to # 5 are performed for the next scanning line.
The process up to step # 40 is repeated, and thereafter, in the same manner, the above process is repeated for each scan line until the generation of the T sequence of the entire symbol is completed in step # 45.
【0036】このようにして、最終ラインまで読み終わ
ると、全Tシーケンスメモリ17から出力された各行の
Tシーケンスの並び替え、つまりステッチングが行われ
る。図6にこの場合のステッチング処理の一例を示す。
この図において、Sは開始パターン、Rは左右行の標識
パターンRL,RR、Tは停止パターンのことである。In this way, when the reading up to the final line is completed, the T sequences of the respective rows output from the entire T sequence memory 17 are rearranged, that is, stitching is performed. FIG. 6 shows an example of the stitching process in this case.
In this figure, S is a start pattern, R is a left / right row marking pattern RL, RR, and T is a stop pattern.
【0037】並び替え手段9では、各Tシーケンスから
クラスタやコードワードを演算し、属性データから斜め
補正を行う。なお、クラスタは相互に排他的な3つの部
分集合に区切られたコードワードの集合であって、PD
F−417シンボルでは、各行は3つのクラスタの1つ
だけを使用してデータを符号化し、各クラスタは3行目
毎に順次に繰り返す。任意の2つの隣接する行は異なる
クラスタを使用するから、デコーダは同一走査ライン内
の異なる行からのクラスタを区別することができる。The rearranging means 9 calculates a cluster or a codeword from each T sequence and performs diagonal correction from the attribute data. A cluster is a set of codewords divided into three mutually exclusive subsets.
For the F-417 symbol, each row encodes data using only one of the three clusters, with each cluster repeating in sequence every third row. Since any two adjacent rows use different clusters, the decoder can distinguish clusters from different rows within the same scan line.
【0038】この斜め補正では、コードワードマトリク
スを作成するときに、図6(A)に示すような[1][2]等
の行情報からテーブルを埋めて行く形をとる。開始パタ
ーンSを示す[S]が最初に存在する場合はそのまま左か
らデータを埋めていき、停止パターンTを示す[T]が存
在する場合は右から順次データを埋めていくようにし、
これによって斜めに読み取られた行情報を基準にして、
図6(B)に示すように欠落なしに補正することができ
る。In this diagonal correction, when a codeword matrix is created, the table is filled with row information such as [1] [2] as shown in FIG. 6 (A). When [S] indicating the start pattern S first exists, the data is filled from the left as it is, and when [T] indicating the stop pattern T exists, the data is sequentially filled from the right,
Based on the line information read diagonally by this,
As shown in FIG. 6 (B), the correction can be performed without omission.
【0039】なお、上記本発明の実施の形態では、ディ
ジタル複写機のスキャナを利用して読み取る読取装置の
構成について説明したが、その他、本発明では解号装置
を複写機から独立して設置することができることは勿論
のこと、複写機以外のスキャナを有するファクシミリ等
の機器を利用した形態とすることも可能である。In the above-described embodiment of the present invention, the configuration of the reading device for reading using the scanner of the digital copying machine has been described. In addition, in the present invention, the decoding device is installed independently of the copying machine. Of course, it is also possible to use a device such as a facsimile machine having a scanner other than the copying machine.
【0040】[0040]
【発明の効果】以上説明したように本発明によるとき
は、例えばPDF−417の二次元バーコードをディジ
タル複写機等のスキャナを利用して解号する場合におい
て、シンボル全体が走査ラインに対して二次元バーコー
ドのシンボルの対角線を超えて大きく斜めに読み取られ
て、開始パターンも停止パターンも照合できない場合、
そのシンボルの傾き方向とは逆向きに任意角度だけ画像
回転させ、デコードをリトライさせ、このリトライを解
号できるまで繰り返すようにしているので、二次元バー
コードが記録された記録担体がスキャナ上に斜めに置か
れた場合にも、その記録担体を置き換えなくとも、斜め
補正することができる。また、傾き角度が大きいときに
特に有効なものとなる。As described above, according to the present invention, in the case of decoding a two-dimensional bar code of PDF-417 by using a scanner such as a digital copying machine, the entire symbol corresponds to the scanning line. If the start pattern and the stop pattern cannot be collated because they are scanned diagonally beyond the diagonal of the two-dimensional barcode symbol,
The image is rotated by an arbitrary angle in the opposite direction to the tilt direction of the symbol, the decoding is retried, and this retry is repeated until it can be resolved. Even when it is placed at an angle, it is possible to make an oblique correction without replacing the record carrier. Further, it becomes particularly effective when the tilt angle is large.
【0041】さらに、画像全体の傾きを検出しなくても
イメージメモリ上の画像データを回転させるという簡易
なプロセスでもって、傾きの大きい原稿の読み取りを実
現することができるなど、従来に見られない優れた効果
を発揮する。Further, it is possible to realize the reading of a document having a large inclination by a simple process of rotating the image data in the image memory without detecting the inclination of the entire image, which is unprecedented. Shows excellent effects.
【図1】 本発明の実施の形態に係る読取装置を示す概
略ブロック図。FIG. 1 is a schematic block diagram showing a reading device according to an embodiment of the present invention.
【図2】 解号装置の構成を示す概略ブロック図。FIG. 2 is a schematic block diagram showing a configuration of a decoding apparatus.
【図3】 その動作を示すフローチャート。FIG. 3 is a flowchart showing the operation.
【図4】 Tシーケンスの読み取り方の一例を示す模式
図。FIG. 4 is a schematic diagram showing an example of how to read a T sequence.
【図5】 Tシーケンスの並び方の一例を示す模式図。FIG. 5 is a schematic diagram showing an example of how T sequences are arranged.
【図6】 ステッチング処理の一例を示す模式図。FIG. 6 is a schematic diagram showing an example of stitching processing.
【図7】 サイズの異なる4種類のPDF−417シン
ボルのパターンを示す図。FIG. 7 is a diagram showing patterns of four types of PDF-417 symbols having different sizes.
【図8】 PDF−417二次元バーコードのシンボル
構成の基となるパターンを示す図。FIG. 8 is a diagram showing a pattern that is a basis of a symbol configuration of a PDF-417 two-dimensional barcode.
1 解号装置 2 ラインセンサ 3 読取データ用イメージメモリ 4 開始パターン照合手段 5 停止パターン照合手段 6 回転処理手段 7 Tシーケンス生成バッファ 8 全Tシーケンスメモリ 9 並び替え手段 DESCRIPTION OF SYMBOLS 1 Decoding device 2 Line sensor 3 Image memory for read data 4 Start pattern matching means 5 Stop pattern matching means 6 Rotation processing means 7 T sequence generation buffer 8 All T sequence memory 9 Sorting means
Claims (1)
に読み取るラインセンサと、このラインセンサにより読
み取られた二次元バーコードのシンボルを格納する読取
データ用のイメージメモリと、このイメージメモリに格
納された各走査ライン毎に前記シンボル左端に設けられ
ている開始パターンの有無を照合する開始パターン照合
手段と、前記イメージメモリに格納された各走査ライン
毎に前記シンボル右端に設けられている停止パターンの
有無を照合する停止パターン照合手段と、前記開始パタ
ーン照合手段及び停止パターン照合手段のいずれにおい
ても開始、停止の両パターンが無い場合にシンボルの走
査ラインに対する傾きを検出するとともに前記イメージ
メモリ上で該シンボル画像データを任意角度ずつ回転さ
せる回転処理手段と、前記開始パターン及び停止パター
ンのうち照合により先に検出された一方のパターン側か
ら読むシンボルのTシーケンスを各走査ライン毎に生成
し且つそのTシーケンスの生成中に他方のパターンが検
出された時点で該他方のパターン側から読むシンボルの
Tシーケンスを各走査ライン毎に生成するTシーケンス
生成バッファと、前記左右のTシーケンスが混在する走
査ラインのデータをデコード処理するデコード処理手段
とを具備することを特徴とする二次元コードの読取装
置。1. A line sensor for optically reading a two-dimensional bar code on a record carrier, an image memory for read data for storing a two-dimensional bar code symbol read by the line sensor, and an image memory for the image memory. Start pattern matching means for checking the presence / absence of a start pattern provided at the left end of the symbol for each stored scan line, and stop provided at the right end of the symbol for each scan line stored in the image memory The stop pattern matching means for matching the presence or absence of a pattern, and the start pattern matching means and the stop pattern matching means both detect the inclination of the symbol with respect to the scanning line when there is no start or stop pattern, and also on the image memory. And rotation processing means for rotating the symbol image data by arbitrary angles A time point at which a T sequence of symbols read from the side of one of the start pattern and the stop pattern, which is detected first by collation, is generated for each scanning line, and the other pattern is detected during the generation of the T sequence. And a T sequence generation buffer for generating a T sequence of symbols to be read from the other pattern side for each scanning line, and a decoding processing means for decoding the data of the scanning lines in which the left and right T sequences are mixed. A two-dimensional code reader characterized by.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP7200806A JPH0950481A (en) | 1995-08-07 | 1995-08-07 | Two-dimensional code reader |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP7200806A JPH0950481A (en) | 1995-08-07 | 1995-08-07 | Two-dimensional code reader |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH0950481A true JPH0950481A (en) | 1997-02-18 |
Family
ID=16430510
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP7200806A Pending JPH0950481A (en) | 1995-08-07 | 1995-08-07 | Two-dimensional code reader |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0950481A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005086120A1 (en) | 2004-03-09 | 2005-09-15 | Navitime Japan Co., Ltd. | Mobile terminal having map display function, map display system, information distribution server, and program |
JP2009104164A (en) * | 2009-01-06 | 2009-05-14 | Navitime Japan Co Ltd | Location method of two-dimensional code recording medium |
JP2017062593A (en) * | 2015-09-24 | 2017-03-30 | 東芝テック株式会社 | Medium processor |
-
1995
- 1995-08-07 JP JP7200806A patent/JPH0950481A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005086120A1 (en) | 2004-03-09 | 2005-09-15 | Navitime Japan Co., Ltd. | Mobile terminal having map display function, map display system, information distribution server, and program |
JP2005257738A (en) * | 2004-03-09 | 2005-09-22 | Navitime Japan Co Ltd | Mobile terminal having map display function, map display system, information distribution server, and program |
JP2009104164A (en) * | 2009-01-06 | 2009-05-14 | Navitime Japan Co Ltd | Location method of two-dimensional code recording medium |
JP2017062593A (en) * | 2015-09-24 | 2017-03-30 | 東芝テック株式会社 | Medium processor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6115508A (en) | Clock free two-dimensional barcode and method for printing and reading the same | |
US5324923A (en) | Apparatus for producing a dynamically variable machine readable binary code and method for reading and producing thereof | |
JP4122629B2 (en) | 2D code generation method | |
US7175088B2 (en) | Two-dimensional code having superior decoding property which is possible to control the level of error correcting codes, and method for encoding and decoding the same | |
JP4269861B2 (en) | Printed material processing system, watermarked document printing device, watermarked document reading device, printed material processing method, information reading device, and information reading method | |
US5124536A (en) | Dynamically variable machine readable binary code and method for reading and producing thereof | |
EP1158456B1 (en) | Barcode system | |
US5611575A (en) | Distributed state flags or other unordered information for embedded data blocks | |
US6742708B2 (en) | Fiducial mark patterns for graphical bar codes | |
JP2000132651A (en) | Two-dimensional bar code without non-boundary clock and its printing and reading method | |
EP0572989A2 (en) | Record with encoded data | |
JP3964390B2 (en) | Graphical barcode generation and decoding | |
AU2007254619B2 (en) | Barcode removal | |
JP2004070960A (en) | Method for converting two-dimensional bar code into signal, scanner performing the same, and decoding method | |
AU3148495A (en) | Packet bar code encoding and decoding | |
US20040062443A1 (en) | Extracting graphical bar codes from an input image | |
US6641051B1 (en) | System for embedded digital data that allows embedding of data around known obstructions | |
US20120175419A1 (en) | Data block offset encoding method for coordinates | |
JP4893643B2 (en) | Detection method and detection apparatus | |
JPH0950481A (en) | Two-dimensional code reader | |
US8005256B2 (en) | Image generation apparatus and recording medium | |
US20030026448A1 (en) | Data encoding and decoding using angular symbology | |
JPH0950480A (en) | Two-dimensional code reader | |
JP4032236B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JPH06103390A (en) | Protection of two-dimensional code from multiplex burst error pattern |