JPH07334604A - Two-dimensional code reading device - Google Patents

Two-dimensional code reading device

Info

Publication number
JPH07334604A
JPH07334604A JP6129076A JP12907694A JPH07334604A JP H07334604 A JPH07334604 A JP H07334604A JP 6129076 A JP6129076 A JP 6129076A JP 12907694 A JP12907694 A JP 12907694A JP H07334604 A JPH07334604 A JP H07334604A
Authority
JP
Japan
Prior art keywords
data
sampling position
sampling
dimensional code
unit
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
Application number
JP6129076A
Other languages
Japanese (ja)
Inventor
Kazushi Ono
一志 小野
Yasushi Ayaki
靖 綾木
Tsutomu Mikami
勉 三上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP6129076A priority Critical patent/JPH07334604A/en
Publication of JPH07334604A publication Critical patent/JPH07334604A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide a two-dimensional code reading device which can read the data even when a single two-dimensional code is divided into two images. CONSTITUTION:The two-dimensional code reading device is provided with an image reading means 1 which reads a single two-dimensional code after dividing it into two images, a synchronizing pattern extracting means 2 which extracts a synchronizing pattern out of the images, a sampling position calculator means 3 which calculates a sampling positions based on the synchronizing pattern and gives the array numbers to these sampling positions, a sampling position deciding means 4 which decides whether the sampling positions calculated by the means 3 are already sampled and validates only the unsampled positions, a data sampling means 5 which samples the data on the sampling positions and outputs the data and the array numbers, and a data aligning means 6 which aligns the data according to the array numbers.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、2次元コードの読み取
り装置、特に1つの2次元コードを2つの画像に分割し
て読み取る2次元コード読み取り装置に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a two-dimensional code reading device, and more particularly to a two-dimensional code reading device for reading one two-dimensional code by dividing it into two images.

【0002】[0002]

【従来の技術】近年、バーコードの利用が広がるにつれ
てデータ容量の拡大やバーコードの高密度化などの要望
が増加し、これに対応するために2次元コードと呼ばれ
る2次元の広がりを持つ種々のコードが提案されてきて
いる。
2. Description of the Related Art In recent years, as the use of bar codes has expanded, there has been an increasing demand for expanding the data capacity and increasing the density of bar codes, and in order to meet this demand, there are various kinds of two-dimensional codes called two-dimensional codes. Code has been proposed.

【0003】以下に、従来の2次元コード読み取り装置
について説明する。図10は、従来の2次元コード読み
取り装置の構成を示すブロック図である。図10におい
て、21は原稿などに印刷された2次元コードを光学的
に読み取る画像読み取り部、22は画像から2次元コー
ドに含まれる同期パターンの画像中での座標を抽出する
同期パターン抽出部、23は同期パターンの座標からサ
ンプリング位置を算出するサンプリング位置算出部、2
4はサンプリング位置算出部で算出されたサンプリング
位置に記録されたデータをサンプリングするデータサン
プリング部である。また、図11は従来の2次元コード
読み取り装置で読み取る2次元コードの具体例を示す図
である。図11において、25は画像読み取り部21で
読み取った画像、26は水平方向同期パターン、27は
垂直方向同期パターン、28はデータ部である。
A conventional two-dimensional code reading device will be described below. FIG. 10 is a block diagram showing the configuration of a conventional two-dimensional code reading device. In FIG. 10, 21 is an image reading unit that optically reads a two-dimensional code printed on a document or the like, 22 is a synchronization pattern extraction unit that extracts the coordinates in the image of the synchronization pattern included in the two-dimensional code from the image, Reference numeral 23 denotes a sampling position calculation unit that calculates a sampling position from the coordinates of the synchronization pattern, and 2
A data sampling unit 4 samples the data recorded at the sampling position calculated by the sampling position calculating unit. FIG. 11 is a diagram showing a specific example of a two-dimensional code read by a conventional two-dimensional code reading device. In FIG. 11, 25 is an image read by the image reading unit 21, 26 is a horizontal synchronization pattern, 27 is a vertical synchronization pattern, and 28 is a data unit.

【0004】以上のように構成された2次元コード読み
取り装置について、以下にその動作を説明する。
The operation of the two-dimensional code reading device constructed as described above will be described below.

【0005】まず、画像読み取り部21で原稿上の2次
元コードを読み取り、画像25を得る。次に、同期パタ
ーン抽出部22で画像25に含まれる水平方向同期パタ
ーン26と垂直方向同期パターン27を抽出し、各々の
座標を算出する。その後、サンプリング位置算出部23
で各水平方向同期パターンの中心座標を通り垂直方向同
期パターン列に平行な直線と、各垂直方向同期パターン
の中心座標を通り水平方向同期パターン列に平行な直線
との交点の座標をサンプリング位置として、まず、C1
を通る直線とR1からR8を通る各直線との交点の座
標、次にC2を通る直線とR1からR8を通る各直線と
の交点の座標と順次C12まで算出し、データサンプリ
ング部24はサンプリング位置算出部23でサンプリン
グ位置を算出した順にサンプリング位置の画素が白か黒
かを判定しこれに対応する1、0のビットデータを得る
(例えば、特開平2ー50282号公報)。
First, the image reading unit 21 reads a two-dimensional code on a document to obtain an image 25. Next, the sync pattern extraction unit 22 extracts the horizontal sync pattern 26 and the vertical sync pattern 27 included in the image 25, and calculates the coordinates of each. After that, the sampling position calculation unit 23
The sampling position is the intersection of a straight line that passes through the center coordinates of each horizontal sync pattern and is parallel to the vertical sync pattern sequence, and a straight line that passes through the center coordinates of each vertical sync pattern and is parallel to the horizontal sync pattern sequence. First, C1
The coordinates of the intersections of the straight line passing through and the straight lines passing through R1 to R8, the coordinates of the intersections of the straight line passing through C2 and the straight lines passing through R1 to R8, and C12 are sequentially calculated, and the data sampling unit 24 sets the sampling position The calculation unit 23 determines whether the pixel at the sampling position is white or black in the order in which the sampling position is calculated, and obtains bit data 1 and 0 corresponding to the pixel (for example, Japanese Patent Laid-Open No. 2-50282).

【0006】[0006]

【発明が解決しようとする課題】しかしながら、上記の
ような従来の構成では、1つの画像データに1つの2次
元コード全体が含まれているという前提でデータのサン
プリング処理が行なわれているので、2つの画像に分割
しなければ読み取れないような大きな2次元コードや傾
いて画像読み取り部の読み取り範囲から外れてしまった
2次元コードには対応できないという課題がある。
However, in the conventional configuration as described above, the data sampling process is performed on the assumption that one image data includes one entire two-dimensional code. There is a problem that a large two-dimensional code that cannot be read unless divided into two images or a two-dimensional code that is tilted and is out of the reading range of the image reading unit cannot be handled.

【0007】本発明は、従来の2次元コード読み取り装
置のこのような課題を考慮し、2つの画像に分割された
2次元コードからデータを読み取ることができる2次元
コード読み取り装置を提供することを目的とするもので
ある。
In view of the above problems of the conventional two-dimensional code reading device, the present invention provides a two-dimensional code reading device capable of reading data from a two-dimensional code divided into two images. It is intended.

【0008】[0008]

【課題を解決するための手段】本発明は、サンプリング
位置とその配列番号を算出するサンプリング位置算出手
段と、算出されたサンプリング位置が既にサンプリング
されているサンプリング位置であるかを判定し、サンプ
リング位置判定手段と、未サンプリング位置のデータを
サンプリングするデータサンプリング手段と、サンプリ
ングしたデータを配列番号にしたがって配列する整列手
段とを備えた2次元コード読み取り装置である。
According to the present invention, a sampling position calculating means for calculating a sampling position and its array element number, and determining whether the calculated sampling position is a sampling position already sampled, The two-dimensional code reading device includes a judging means, a data sampling means for sampling data at unsampling positions, and an aligning means for arranging the sampled data according to an array number.

【0009】[0009]

【作用】本発明は、サンプリング位置算出手段がサンプ
リング位置とそれに対応する配列番号を算出し、サンプ
リング位置判定手段は算出されたサンプリング位置が既
にサンプリングされているサンプリング位置であるかを
判定し、データサンプリング手段は未サンプリング位置
のデータをサンプリングし、整列手段は配列番号にした
がってサンプリングしたデータを整列させることによ
り、1つの2次元コードが2つに分割されて読み取られ
ても、個々の画像からサンプリングしたデータから元の
データを再構成できる。
According to the present invention, the sampling position calculating means calculates the sampling position and the array element number corresponding to the sampling position, and the sampling position judging means judges whether the calculated sampling position is a sampling position which has already been sampled. The sampling means samples the data at the non-sampling position, and the aligning means aligns the sampled data according to the array number, so that even if one two-dimensional code is divided into two and read, sampling is performed from each image. The original data can be reconstructed from the created data.

【0010】[0010]

【実施例】以下に、本発明をその実施例を示す図面に基
づいて説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to the drawings showing its embodiments.

【0011】図1は、本発明にかかる第1の実施例の2
次元コード読み取り装置の構成を示すブロック図であ
る。図1において、1は2次元コードを2つの画像に分
割して読み取る画像読み取り部、2は画像から2次元コ
ードに含まれる同期パターンの画像中での座標を抽出す
る同期パターン抽出部、3は同期パターンの座標からコ
ードパターンからデータをサンプリングするためのサン
プリング位置を算出し、配列番号を付与するサンプリン
グ位置算出部、4は算出されたサンプリング位置がすで
にサンプリングされているか否かを判定し、サンプリン
グされていないサンプリング位置だけを有効とするサン
プリング位置判定部、5はサンプリング位置判定部で有
効と判定されたサンプリング位置に記録されたデータを
サンプリングするデータサンプリング部、6はデータを
配列番号に対応させて整列させる整列部である。
FIG. 1 shows a second embodiment of the present invention.
It is a block diagram which shows the structure of a dimension code reader. In FIG. 1, 1 is an image reading unit that reads a two-dimensional code by dividing it into two images, 2 is a sync pattern extraction unit that extracts the coordinates of the sync pattern included in the two-dimensional code in the image, and 3 is a sync pattern extraction unit. A sampling position calculation unit that calculates a sampling position for sampling data from the code pattern from the coordinates of the synchronization pattern and gives an array number determines whether the calculated sampling position has already been sampled, Sampling position determination unit that validates only the sampling positions that are not registered, 5 is a data sampling unit that samples the data recorded at the sampling positions that are determined to be valid by the sampling position determination unit, and 6 associates the data with the array element number. It is an aligning part for aligning.

【0012】次に、上記第1の実施例の2次元コード読
み取り装置の動作について、図1、図2、図3、及び図
4を参照しながら説明する。
Next, the operation of the two-dimensional code reading apparatus of the first embodiment will be described with reference to FIGS. 1, 2, 3, and 4.

【0013】まず、画像読み取り部1で2次元コード8
を重複部分が存在するように2回に分けて読み取り、画
像9と10を得る。2次元コード8はサンプリング位置
を決めるための水平方向同期パターン11と垂直方向同
期パターン12とデータ部13とで構成され、水平方向
同期パターン11はデータ部13の上下に、垂直方向同
期パターン12はデータ部13の左右に配置されてい
る。また、データ部13は垂直方向に8列、水平方向に
12列のマトリックスの交点にデータパターンとして白
または黒の領域がデータの1ビットに対応して配置され
ている。
First, the two-dimensional code 8 is read by the image reading section 1.
Are read twice so that there is an overlapping portion, and images 9 and 10 are obtained. The two-dimensional code 8 is composed of a horizontal synchronizing pattern 11 for determining a sampling position, a vertical synchronizing pattern 12 and a data portion 13. The horizontal synchronizing pattern 11 is above and below the data portion 13, and the vertical synchronizing pattern 12 is It is arranged on the left and right of the data section 13. Further, in the data portion 13, a white or black area as a data pattern is arranged at the intersection of a matrix of 8 columns in the vertical direction and 12 columns in the horizontal direction in association with 1 bit of data.

【0014】次に、画像9と画像10各々に対して以下
に説明するデータのサンプリング処理を行なう。
Next, a sampling process of data described below is performed on each of the images 9 and 10.

【0015】まず、画像9に対して、同期パターン抽出
部2で画像9に含まれている全ての水平方向同期パター
ン11と垂直方向同期パターン12を切り出し、各同期
パターンの中心座標を得る。サンプリング位置算出部3
では、図3に示すように同期パターン抽出部2で得たC
1からC12の各水平方向同期パターンの中心座標を通
り垂直方向同期パターン列に平行な直線と、R1からR
6の各垂直方向同期パターンの中心座標を通り水平方向
同期パターン列に平行な直線との交点の座標をサンプリ
ング位置とし、各サンプリング位置に各々のサンプリン
グ位置を求めるために使用した水平方向同期パターンと
垂直方向同期パターンの番号を配列番号としてサンプリ
ング位置に付与する。すなわち、サンプリング位置算出
部3はN番目の水平方向同期パターンとM番目の垂直方
向同期パターンから得られる交点座標を(XN、YM)
とすると、(N、M、XN、YM)を一つのサンプリン
グ位置データとして、全ての可能なNとMの組合せに対
応するサンプリング位置データを算出する。サンプリン
グ位置判定部4はサンプリング位置算出部3で算出した
サンプリング位置が既にサンプリングされたサンプリン
グ位置かどうかをサンプリング位置判定部4が有するサ
ンプリング済み配列番号に関するデータを参照して判定
し、未サンプリングと判定されたサンプリング位置のみ
を有効とする。データサンプリング部5はサンプリング
位置判定部4で未サンプリングと判定されたサンプリン
グ位置にある画素が黒か白かを判定し、これに対応する
1、0のビットデータと配列番号を整列部6に渡し、整
列部6は与えられたビットデータを配列番号と共に記憶
する。また、サンプリング位置判定部4はサンプリング
済み配列番号からサンプリング位置判定部4が有するサ
ンプリング済み配列番号に関するデータを更新する。
First, with respect to the image 9, all the horizontal synchronization patterns 11 and the vertical synchronization patterns 12 included in the image 9 are cut out by the synchronization pattern extraction unit 2 to obtain the center coordinates of each synchronization pattern. Sampling position calculator 3
Then, as shown in FIG. 3, C obtained by the synchronization pattern extraction unit 2
A straight line passing through the center coordinates of each horizontal sync pattern 1 to C12 and parallel to the vertical sync pattern row, and R1 to R
The horizontal sync pattern used to obtain each sampling position at each sampling position is defined by the coordinates of the intersection of a straight line passing through the center coordinates of each vertical sync pattern of 6 and parallel to the horizontal sync pattern sequence. The number of the vertical synchronization pattern is given to the sampling position as an array number. That is, the sampling position calculation unit 3 calculates the intersection coordinates (XN, YM) obtained from the Nth horizontal synchronization pattern and the Mth vertical synchronization pattern.
Then, using (N, M, XN, YM) as one sampling position data, the sampling position data corresponding to all possible combinations of N and M are calculated. The sampling position determination unit 4 determines whether the sampling position calculated by the sampling position calculation unit 3 is a sampled sampling position by referring to the data regarding the sampled array number of the sampling position determination unit 4, and determines that the sampling position is not sampled. Only the sampling positions that have been set are valid. The data sampling unit 5 determines whether the pixel at the sampling position determined to be unsampled by the sampling position determination unit 4 is black or white, and passes the corresponding bit data of 1 and 0 and the array number to the alignment unit 6. The alignment unit 6 stores the given bit data together with the array element number. Further, the sampling position determination unit 4 updates the data regarding the sampled array number included in the sampling position determination unit 4 from the sampled array number.

【0016】同様に、画像10に対しても同期パターン
の抽出とサンプリング位置の算出を行なう。サンプリン
グ位置判定部4には画像9からサンプリングしたビット
データに対応するサンプリング済み配列番号に関するデ
ータが記憶されているので、サンプリング位置判定部4
は画像10から算出したサンプリング位置データから画
像9から既にサンプリングしたビットデータに対応する
サンプリング位置データを除いてデータサンプリング部
5に渡す。画像9に対して行なった処理と同様にデータ
サンプリング部5は与えられたサンプリング位置のデー
タをサンプリングし、ビットデータと配列番号を整列部
6に渡す。整列部6は画像9からサンプリングしたビッ
トデータと画像10からサンプリングしたビットデータ
とを合わせて配列番号にしたがって整列することによっ
て、意味のあるデータを得ることができる。
Similarly, the sync pattern is extracted and the sampling position is calculated for the image 10. Since the sampling position determination unit 4 stores data relating to the sampled array numbers corresponding to the bit data sampled from the image 9, the sampling position determination unit 4
Removes the sampling position data corresponding to the bit data already sampled from the image 9 from the sampling position data calculated from the image 10 and passes it to the data sampling unit 5. Similar to the processing performed on the image 9, the data sampling unit 5 samples the data at the given sampling position and passes the bit data and the array number to the alignment unit 6. The alignment unit 6 can obtain meaningful data by aligning the bit data sampled from the image 9 and the bit data sampled from the image 10 according to the array element number.

【0017】以上の動作を流れ図で表すと図5になる。
以上のように本実施例によれば、画像読み取り部1と同
期パターン抽出部2とサンプリング位置算出部3とサン
プリング位置判定部4とデータサンプリング部5と整列
部6とを設け、画像読み取り部1で2次元コードを分割
して読み取った2つの画像9、10各々に同期パターン
抽出部2とサンプリング位置算出部3とで得たサンプリ
ング位置データがサンプリング済みかどうかを判定する
サンプリング位置判定部4で、既にサンプリングしたサ
ンプリング位置データを取り除いてデータサンプリング
部5にサンプリング位置データを渡し、データサンプリ
ング部5はサンプリングしたビットデータと配列番号を
整列部6に渡し、整列部6で配列番号にしたがってビッ
トデータを整列することにより、データ部が同期パター
ンで囲まれた構造を持つ2次元コードを1つの画像とし
て読みれず、2つの画像に分割されても、データをサン
プリングし、意味のあるデータに再構成することができ
る。
FIG. 5 is a flow chart showing the above operation.
As described above, according to the present embodiment, the image reading unit 1, the synchronization pattern extracting unit 2, the sampling position calculating unit 3, the sampling position determining unit 4, the data sampling unit 5, and the aligning unit 6 are provided, and the image reading unit 1 is provided. In the sampling position determination unit 4 which determines whether the sampling position data obtained by the synchronization pattern extraction unit 2 and the sampling position calculation unit 3 has been sampled in each of the two images 9 and 10 obtained by dividing the two-dimensional code , The sampling position data that has already been sampled is removed, and the sampling position data is passed to the data sampling unit 5. The data sampling unit 5 passes the sampled bit data and the array number to the alignment unit 6, and the alignment unit 6 sets the bit data according to the array number. The structure in which the data part is surrounded by the synchronization pattern by aligning The 2-dimensional code is not read as a single image with, be divided into two images, and sampled data may be reconstructed into meaningful data.

【0018】なお、本実施例では、2次元コードとして
図2で示した構造の2次元コードを用いたが、データ部
の周囲を同期パターンが囲む構造の2次元コードであれ
ばこれ以外の構造でも良い。
In this embodiment, the two-dimensional code having the structure shown in FIG. 2 is used as the two-dimensional code. However, if the two-dimensional code has a structure in which the synchronization pattern surrounds the data part, other structures are used. But good.

【0019】また、本実施例では、データサンプリング
部5は指示された交点座標にある画素が黒か白かを判定
し、これに対応する1、0のビットデータと配列番号を
出力するとしたが、黒か白かを判定するのは指示された
交点座標にある画素に限定するものではなく、交点座標
の周囲の画素を含めて判定しても良く、さらに、判定に
利用される画素は白か黒に限定されるものではなく、白
黒以外の色や中間調を含んでも良く、また複数の色の画
素の並び方で一つのデータパターンを構成しても良く、
対応するデータもビットデータだけではなく、複数のビ
ットで構成される多値データとしても良い。
Further, in the present embodiment, the data sampling section 5 judges whether the pixel at the designated intersection coordinate is black or white, and outputs the bit data of 1 and 0 and the array number corresponding thereto. The determination of black or white is not limited to the pixel at the designated intersection coordinates, but it may be determined by including the pixels around the intersection coordinates, and the pixels used for the determination are white. The color is not limited to black or may include colors other than black and white and halftones, and one data pattern may be configured by the arrangement of pixels of a plurality of colors.
The corresponding data is not limited to bit data, and may be multi-valued data composed of a plurality of bits.

【0020】図6は本発明にかかる第2の実施例の2次
元コード読み取り装置のブロック図である。図6におい
て、1は2次元コードを2つの画像に分割して読み取る
画像読み取り部、2は画像から2次元コードに含まれる
同期パターンの画像中での座標を抽出する同期パターン
抽出部、3は同期パターンの座標からサンプリング位置
を算出し、配列番号を付与するサンプリング位置算出
部、31はサンプリング位置算出部3の一部を構成し、
サンプリング位置を中心とする一定範囲内に画像データ
境界の有無を判定し、一定範囲内に画像データ境界がな
い場合にサンプリング位置と配列番号を有効と判定する
境界判定部、4は境界判定部31で有効と判定されたサ
ンプリング位置がすでにサンプリングされているか否か
を判定し、サンプリングされていないサンプリング位置
だけを有効と判定するサンプリング位置判定部、5はサ
ンプリング位置判定部で有効と判定されたサンプリング
位置に記録されたデータをサンプリングするデータサン
プリング部、6はデータを配列番号に対応させて整列さ
せる整列部である。画像読み取り部1、同期パターン抽
出部2、サンプリング位置判定部4、整列部6は実施例
1と同様のものである。
FIG. 6 is a block diagram of a two-dimensional code reading apparatus according to the second embodiment of the present invention. In FIG. 6, 1 is an image reading unit that divides a two-dimensional code into two images and reads the image, 2 is a sync pattern extraction unit that extracts the coordinates of the sync pattern included in the two-dimensional code in the image, and 3 is a sync pattern extraction unit. A sampling position calculation unit that calculates a sampling position from the coordinates of the synchronization pattern and gives an array number, 31 constitutes a part of the sampling position calculation unit 3,
A boundary determining unit that determines the presence or absence of an image data boundary within a fixed range centered on the sampling position, and determines that the sampling position and the array number are valid when there is no image data boundary within the constant range, 4 is a boundary determining unit 31. Sampling position determining unit that determines whether the sampling positions determined to be valid in Sampling are already sampled, and determines only sampling positions that are not sampled to be valid are the sampling positions that are determined to be valid in the sampling position determining unit. A data sampling unit for sampling the data recorded at the position, and 6 is an alignment unit for aligning the data corresponding to the array element number. The image reading unit 1, the synchronization pattern extraction unit 2, the sampling position determination unit 4, and the alignment unit 6 are the same as those in the first embodiment.

【0021】次に、上記第2の実施例の2次元コード読
み取り装置の動作について、図6、図7を参照しながら
説明する。
Next, the operation of the two-dimensional code reader according to the second embodiment will be described with reference to FIGS. 6 and 7.

【0022】まず、画像読み取り部1は図8の読み取り
画像で示すように、2つの画像の重複部分の幅が予め与
えられた隣合うサンプリング位置の間隔lの2の平方根
倍以上となるように読み取る。同期パターン抽出部2で
の同期パターンの抽出は、第1の実施例同様である。
First, as shown in the read image in FIG. 8, the image reading unit 1 sets the width of the overlapping portion of the two images to be equal to or more than the square root of 2 of the interval l between the adjacent sampling positions which is given in advance. read. The extraction of the synchronization pattern by the synchronization pattern extraction unit 2 is the same as in the first embodiment.

【0023】次に、サンプリング位置算出部3では、第
1の実施例と同様に、同期パターン抽出部2で得た水平
方向同期パターンと垂直方向同期パターンから引いた直
線の交点座標をサンプリング位置として求めた後、境界
判定部31で各サンプリング位置についてサンプリング
位置を中心とし1辺の長さが隣合うサンプリング位置の
間隔lに等しい四角形の内部に、画像9の画像データ境
界を含むかどうかを判定し、画像データ境界を含まない
と判定されたサンプリング位置を有効とする。例えば、
サンプリング位置14を中心として四角形15を置いて
みると、四角形15の内部に画像データ境界を含むの
で、サンプリング位置14に関するデータは無効とされ
る。サンプリング位置判定部4、整列部6は第1の実施
例と同様である。データサンプリング部5はサンプリン
グ位置判定部4が出力したサンプリング位置にある画素
とその周囲を囲む画素について黒及び白の数を求め、多
い方をそのサンプリング位置のデータとして、これに対
応する1、0のビットデータと配列番号を整列部6に渡
す。
Next, in the sampling position calculation unit 3, as in the first embodiment, the intersection point coordinates of the straight lines drawn from the horizontal direction synchronization pattern and the vertical direction synchronization pattern obtained by the synchronization pattern extraction unit 2 are used as the sampling position. After the determination, the boundary determining unit 31 determines whether or not each sampling position includes the image data boundary of the image 9 inside a quadrangle centered on the sampling position and having the length of one side equal to the interval l between adjacent sampling positions. However, the sampling position determined not to include the image data boundary is validated. For example,
When the quadrangle 15 is placed around the sampling position 14, the image data boundary is included inside the quadrangle 15, so that the data regarding the sampling position 14 is invalid. The sampling position determination unit 4 and the alignment unit 6 are the same as those in the first embodiment. The data sampling unit 5 obtains the numbers of black and white for the pixels at the sampling positions output by the sampling position determination unit 4 and the pixels surrounding the pixels, and the larger one is taken as the data at the sampling positions, and the corresponding 1, 0 The bit data of and the array element number are passed to the alignment unit 6.

【0024】以上のように、サンプリング位置を中心と
する一定範囲内に画像データ境界を含むかどうかを判定
する境界判定部31を設けることにより、画像データ境
界でのデータパターンの欠けによるサンプリングしたデ
ータの信頼性の低下を防ぐことができる。特に、サンプ
リング位置の画素だけでなく、サンプリング位置の周辺
画素の値も参照してサンプリングを行なう場合は、サン
プリング位置は画像データ内にあっても、参照すべき周
辺画素が画像データ内に存在しないことも有り得るの
で、有効である。また、2つの画像の重複部分の幅が隣
合うサンプリング位置の間隔lの2の平方根倍以上ある
ことにより、図8に示すように読み取った画像と2次元
コードがなす角が何度であっても2つの画像の内一方の
画像で境界判定部31で無効とされたサンプリング位置
は必ず他方の画像では境界判定手段31で無効とされな
いことが保証される。なぜなら、一つのサンプリング位
置を中心とする1辺の長さがlの正方形に2つの画像デ
ータ境界が掛からないためには2つ画像データ境界の間
隔が正方形の対角線の長さであるlの2の平方根倍ある
ことが必要十分な条件であるからである。
As described above, by providing the boundary judgment unit 31 for judging whether or not the image data boundary is included within a certain range centered on the sampling position, the sampled data due to the lack of the data pattern at the image data boundary is provided. It is possible to prevent a decrease in reliability. In particular, when performing sampling by referring to not only the pixel at the sampling position but also the values of the peripheral pixels at the sampling position, the peripheral pixel to be referred to does not exist in the image data even if the sampling position is in the image data. It is effective because it can happen. Further, since the width of the overlapping portion of the two images is equal to or more than the square root of 2 of the interval l between the adjacent sampling positions, the angle formed by the read image and the two-dimensional code can be set as shown in FIG. Also, it is guaranteed that the sampling position invalidated by the boundary determination unit 31 in one of the two images is not always invalidated by the boundary determination unit 31 in the other image. This is because, in order to prevent two image data boundaries from being applied to a square whose one side length is l centered on one sampling position, the interval between the two image data boundaries is 2 which is the length of the diagonal of the square. This is because it is a necessary and sufficient condition to be square root times.

【0025】なお、上記実施例では、境界判定部31が
画像データ境界の有無を判定する範囲を、サンプリング
位置を中心として1辺の長さが隣合うサンプリング位置
の間隔に等しい四角形としたが、1辺の長さはサンプリ
ング位置の間隔lに限定されるものではなく、また、四
角形に限定されるものでもなく、データサンプリング部
がデータのサンプリングに必要とする領域を含むもので
あれば良く、さらに、注目しているサンプリング位置と
その周囲にある8個のサンプリング位置との中点を互い
に結ぶ多角形でも良い。また、上記実施例ではサンプリ
ング位置の間隔lを予め与えられているとしたが、サン
プリング位置算出時に求めても良い。
In the above embodiment, the range in which the boundary determining section 31 determines the presence / absence of the image data boundary is a quadrangle whose length is one side with the length of one side being equal to the interval between adjacent sampling positions. The length of one side is not limited to the interval l of the sampling positions, and is not limited to the quadrangle, as long as the data sampling unit includes a region necessary for sampling data, Further, it may be a polygon that connects the midpoints of the sampling position of interest and the eight sampling positions around it. Further, in the above-described embodiment, the sampling position interval 1 is given in advance, but it may be obtained when the sampling position is calculated.

【0026】図9は本発明にかかる第3の実施例の2次
元コード読み取り装置のブロック図である。図9におい
て、1は2次元コードを2つの画像に分割して読み取る
画像読み取り部、2は画像から2次元コードに含まれる
同期パターンの画像中での座標を抽出する同期パターン
抽出部、3は同期パターンの座標からサンプリング位置
を算出し、配列番号を付与するサンプリング位置算出
部、41は2つの画像の内の一方のデータサンプリング
が終了しているか否かを判定し、判定結果に応じて次の
動作を切替える切替え部、4は算出されたサンプリング
位置がすでにサンプリングされているか否かを判定し、
サンプリングされていないサンプリング位置だけを有効
とするサンプリング位置判定部、5はサンプリング位置
判定部で有効とされたサンプリング位置に記録されたデ
ータをサンプリングするデータサンプリング部、6はデ
ータを配列番号に対応させて整列させる整列部である。
画像読み取り部1、同期パターン抽出部2、サンプリン
グ位置算出部3、サンプリング位置判定部4、データサ
ンプリング部5、整列部6は実施例2と同様のものであ
る。
FIG. 9 is a block diagram of a two-dimensional code reading apparatus according to the third embodiment of the present invention. In FIG. 9, 1 is an image reading unit that reads a two-dimensional code by dividing it into two images, 2 is a sync pattern extraction unit that extracts the coordinates of the sync pattern included in the two-dimensional code in the image, and 3 is a sync pattern extraction unit. A sampling position calculation unit that calculates a sampling position from the coordinates of the synchronization pattern and assigns an array number, 41 determines whether or not data sampling of one of the two images is completed, and the next sampling position is determined according to the determination result. The switching unit for switching the operation of 4 determines whether or not the calculated sampling position is already sampled,
A sampling position determination unit that validates only the sampling positions that have not been sampled, 5 is a data sampling unit that samples the data recorded at the sampling positions that are validated by the sampling position determination unit, and 6 associates the data with the array element number. It is an aligning part for aligning.
The image reading unit 1, the synchronization pattern extraction unit 2, the sampling position calculation unit 3, the sampling position determination unit 4, the data sampling unit 5, and the alignment unit 6 are the same as those in the second embodiment.

【0027】次に、上記第3の実施例の2次元コード読
み取り装置の動作について、図9を参照しながら説明す
る。
Next, the operation of the two-dimensional code reader of the third embodiment will be described with reference to FIG.

【0028】まず、画像読み取り部1での画像読み取り
からサンプリング位置算出部3でのサンプリング位置の
算出までは、第2の実施例と同様である。
First, the process from image reading by the image reading unit 1 to calculation of the sampling position by the sampling position calculating unit 3 is the same as in the second embodiment.

【0029】次に、切替え部41で、2つの画像の内の
1つのサンプリングが終了しているかを判定し、終了し
ていない場合はデータサンプリング部5に処理を渡し、
終了している場合はサンプリング位置判定部4に渡す。
サンプリング位置判定部4または、データサンプリング
部5以降の動作は第2の実施例と同様である。
Next, the switching unit 41 determines whether or not one of the two images has been sampled. If not, the process is passed to the data sampling unit 5,
If it has been completed, it is passed to the sampling position determination unit 4.
The operation after the sampling position determination unit 4 or the data sampling unit 5 is the same as in the second embodiment.

【0030】以上のように、サンプリング済み配列番号
の有無に応じて、サンプリング位置判定部4をスキップ
する切替え部41を設けることにより、2つの画像のど
ちらも未サンプリングである場合にはサンプリング位置
判定部4を省くことにより処理時間を短縮することがで
きる。
As described above, by providing the switching unit 41 that skips the sampling position determining unit 4 depending on the presence or absence of the sampled array element number, the sampling position determination is performed when neither of the two images is unsampled. By omitting the section 4, the processing time can be shortened.

【0031】[0031]

【発明の効果】以上述べたところから明らかなように本
発明は、サンプリング位置を算出し、これに対応する配
列番号を付与するサンプリング位置算出手段とサンプリ
ング位置算出部が付与したサンプリング位置が既にサン
プリングされているか否かを判定するサンプリング位置
判定手段とその判定結果に基づきサンプリングするデー
タサンプリング手段と配列番号にしたがってデータを整
列させる整列手段を備えているので、2つの画像に分割
されて読み取られた2次元コードからデータを読みとる
ことが可能となる。
As is apparent from the above description, according to the present invention, the sampling position is calculated by calculating the sampling position and assigning the array element number corresponding thereto and the sampling position assigned by the sampling position calculating unit. Since it is provided with a sampling position determining means for determining whether or not the data is sampled, a data sampling means for sampling based on the determination result, and an aligning means for aligning data according to the array number, the image is divided into two images and read. Data can be read from the two-dimensional code.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明にかかる第1の実施例の2次元コード読
み取り装置のブロック図
FIG. 1 is a block diagram of a two-dimensional code reading device according to a first embodiment of the present invention.

【図2】同第1の実施例における動作説明のための処理
画像の概略を示す図
FIG. 2 is a diagram showing an outline of a processed image for explaining the operation in the first embodiment.

【図3】同第1の実施例における動作説明のための処理
画像の概略を示す図
FIG. 3 is a diagram showing an outline of a processed image for explaining the operation in the first embodiment.

【図4】同第1の実施例における動作説明のための処理
画像の概略を示す図
FIG. 4 is a diagram showing an outline of a processed image for explaining the operation in the first embodiment.

【図5】同第1の実施例における動作説明のための処理
の概略を示す流れ図
FIG. 5 is a flowchart showing an outline of processing for explaining the operation in the first embodiment.

【図6】本発明にかかる第2の実施例の2次元コード読
み取り装置のブロック図
FIG. 6 is a block diagram of a two-dimensional code reading device according to a second embodiment of the present invention.

【図7】同第2の実施例における動作説明のための処理
画像の概略を示す図
FIG. 7 is a diagram showing an outline of a processed image for explaining the operation in the second embodiment.

【図8】同第2の実施例における動作説明のための処理
画像の概略を示す図
FIG. 8 is a diagram showing an outline of a processed image for explaining the operation in the second embodiment.

【図9】本発明にかかる第3の実施例の2次元コード読
み取り装置のブロック図
FIG. 9 is a block diagram of a two-dimensional code reading device according to a third embodiment of the present invention.

【図10】従来の2次元コード読み取り装置のブロック
FIG. 10 is a block diagram of a conventional two-dimensional code reading device.

【図11】従来の2次元コード読み取り装置における動
作説明のための処理画像の概略を示す図
FIG. 11 is a diagram showing an outline of a processed image for explaining an operation in a conventional two-dimensional code reading device.

【符号の説明】[Explanation of symbols]

1 画像読み取り部 2 同期パターン抽出部 3 サンプリング位置算出部 4 サンプリング位置判定部 5 データサンプリング部 6 整列部 31 境界判定部 41 切替部 DESCRIPTION OF SYMBOLS 1 Image reading unit 2 Synchronization pattern extraction unit 3 Sampling position calculation unit 4 Sampling position determination unit 5 Data sampling unit 6 Alignment unit 31 Boundary determination unit 41 Switching unit

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】サンプリング位置を規定する同期パターン
で囲まれた矩形領域にデータパターンを格子状に記録し
た2次元コードからデータを読み取る2次元コード読み
取り装置であって、2回の読み取り動作で互いに重複部
分を持つ2つの画像に分割して2次元コードを読み取る
画像読み取り手段と、前記画像から同期パターンを抽出
する同期パターン抽出手段と、前記同期パターンを基準
としてサンプリング位置を算出し、前記サンプリング位
置に対応する配列番号を付与するサンプリング位置算出
手段と、前記配列番号がサンプリング済み配列番号であ
るかを判定するするサンプリング位置判定手段と、前記
サンプリング位置判定手段で未サンプリングと判定され
たサンプリング位置のデータをサンプリングするデータ
サンプリング手段と、前記データサンプリング手段で読
み取ったデータを配列番号にしたがって整列させる整列
手段とを有することを特徴とする2次元コード読み取り
装置。
1. A two-dimensional code reading device for reading data from a two-dimensional code in which a data pattern is recorded in a grid pattern in a rectangular area surrounded by a synchronization pattern defining a sampling position, the two-dimensional code reading apparatus performing the reading operation twice. An image reading means for reading a two-dimensional code by dividing it into two images having an overlapping portion, a sync pattern extracting means for extracting a sync pattern from the image, a sampling position based on the sync pattern, and the sampling position A sampling position calculation unit that assigns an array number corresponding to the sampling position, a sampling position determination unit that determines whether the array number is a sampled array number, and a sampling position that is determined to be unsampled by the sampling position determination unit. Data sampling means for sampling data , 2-dimensional code reading apparatus characterized by having an alignment means for aligning the data read by the data sampling unit according to SEQ ID NO.
【請求項2】サンプリング位置算出手段が同期パターン
を基準として得たサンプリング位置を中心とする一定範
囲内での画像データ境界の有無を判定し、前記一定範囲
内に画像データ境界がある場合には前記サンプリング位
置を無効とする境界判定手段を有することを特徴とする
請求項1記載の2次元コード読み取り装置。
2. A sampling position calculation means determines whether or not there is an image data boundary within a fixed range centered on a sampling position obtained with reference to a synchronization pattern, and when there is an image data boundary within the fixed range. The two-dimensional code reading device according to claim 1, further comprising a boundary determining unit that invalidates the sampling position.
【請求項3】2つの画像のどちらか一方のデータサンプ
リングが終了している場合にのみ、サンプリング位置算
出手段で算出されたサンプリング位置に付与された配列
番号がサンプリング済み配列番号であるかを判定するサ
ンプリング位置判定手段を有することを特徴とする請求
項1または2記載の2次元コード読み取り装置。
3. Only when the data sampling of one of the two images is completed, it is determined whether the array element number assigned to the sampling position calculated by the sampling position calculating means is the sampled array element number. The two-dimensional code reading device according to claim 1 or 2, further comprising: sampling position determining means.
【請求項4】画像読み取り手段で読み取った2つの画像
の重複部分の幅が隣合うサンプリング位置の間隔の少な
くとも2の平方根倍であることを特徴とする請求項1、
2、3のいずれかに記載の2次元コード読み取り装置。
4. The width of the overlapping portion of the two images read by the image reading means is at least a square root of 2 times the interval between adjacent sampling positions.
The two-dimensional code reader according to any one of 2 and 3.
JP6129076A 1994-06-10 1994-06-10 Two-dimensional code reading device Pending JPH07334604A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6129076A JPH07334604A (en) 1994-06-10 1994-06-10 Two-dimensional code reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6129076A JPH07334604A (en) 1994-06-10 1994-06-10 Two-dimensional code reading device

Publications (1)

Publication Number Publication Date
JPH07334604A true JPH07334604A (en) 1995-12-22

Family

ID=15000488

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6129076A Pending JPH07334604A (en) 1994-06-10 1994-06-10 Two-dimensional code reading device

Country Status (1)

Country Link
JP (1) JPH07334604A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008146347A (en) * 2006-12-08 2008-06-26 Oki Joho Systems:Kk Remittance processing system
WO2024014217A1 (en) * 2022-07-11 2024-01-18 テルモ株式会社 Two-dimensional code display object, two-dimensional code display object group, medical tool, program, information processing method, and information processing device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008146347A (en) * 2006-12-08 2008-06-26 Oki Joho Systems:Kk Remittance processing system
WO2024014217A1 (en) * 2022-07-11 2024-01-18 テルモ株式会社 Two-dimensional code display object, two-dimensional code display object group, medical tool, program, information processing method, and information processing device

Similar Documents

Publication Publication Date Title
US5680486A (en) Image processing apparatus
KR0167616B1 (en) Image processing apparatus and method of the same
JP3514050B2 (en) Image processing device
JPH07334604A (en) Two-dimensional code reading device
JP2890306B2 (en) Table space separation apparatus and table space separation method
JPS62121589A (en) Character segmenting system
JPS615383A (en) Character pattern separating device
JPS6337487A (en) Character recognizing device
JP2784059B2 (en) Method and apparatus for removing noise from binary image
JPS62114077A (en) Picture element feature extracting device
JPH06150059A (en) Image area separator
JPH06195460A (en) Image extraction system
JP2954218B2 (en) Image processing method and apparatus
JP2933947B2 (en) Image processing method and apparatus
JPH05165955A (en) Image processing method
JPH0394393A (en) Character recognizing device
JPS62281084A (en) Character for inclination detecting system
JP3923104B2 (en) Table processing method and table processing apparatus
JP2890307B2 (en) Table space separation device
JPH04309071A (en) Picture processor
JPH02311975A (en) Optical character reader
JP2001307097A (en) Device and method for detecting pattern
JPS62171380A (en) Image processing system
JPH05266250A (en) Character string detector
JPS60218182A (en) Area sorting circuit