JP2000057250A - Reading method for two-dimensional code - Google Patents

Reading method for two-dimensional code

Info

Publication number
JP2000057250A
JP2000057250A JP10227326A JP22732698A JP2000057250A JP 2000057250 A JP2000057250 A JP 2000057250A JP 10227326 A JP10227326 A JP 10227326A JP 22732698 A JP22732698 A JP 22732698A JP 2000057250 A JP2000057250 A JP 2000057250A
Authority
JP
Japan
Prior art keywords
reference line
cells
black
dimensional code
predetermined number
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.)
Withdrawn
Application number
JP10227326A
Other languages
Japanese (ja)
Inventor
Teruo Yamada
輝夫 山田
Kiyoshi Morimoto
清 森本
Satoru Hiruta
了 昼田
Hiroichi Yoshida
博一 吉田
Susumu Okura
晋 大倉
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.)
NIPPON ID TEC KK
KH Neochem Co Ltd
Original Assignee
NIPPON ID TEC KK
Kyowa Hakko Kogyo 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 NIPPON ID TEC KK, Kyowa Hakko Kogyo Co Ltd filed Critical NIPPON ID TEC KK
Priority to JP10227326A priority Critical patent/JP2000057250A/en
Publication of JP2000057250A publication Critical patent/JP2000057250A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a reading method for a two-dimensional code which prevents the two-dimensional code from being misread owing to a stain nearby the two-dimensional code. SOLUTION: A reference line decision means 8 which has cells arranged in matrix is placed over image information IP expanded in an image memory and then rotated to estimate a row ny where more than a specific number of black cells are successive on the reference line decision means 8 as an X- axial reference line. Lines ny-1 to ny-4 and ny+1 to ny+4 above and below the estimated X-axial reference line ny are scanned respectively and the estimated X-axial reference line ny is determined as an X-axial reference line Lx on condition that while more than a specific number of black cells are present on the rows ny+1 to ny+4 on one side of the scanning, more than a specific number of black cells are not present on the rows ny-1 to ny-4 on the other side.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、2次元コードの読
取方法に関し、特に、読取対象となる2次元コードの近
傍に存在する汚れに起因する、2次元コードの読取エラ
ーを防止するようにした、2次元コードの読取方法に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for reading a two-dimensional code, and more particularly to a method for preventing a two-dimensional code reading error caused by dirt near a two-dimensional code to be read. And a method for reading a two-dimensional code.

【0002】[0002]

【従来の技術】近時、自動認識コードの技術分野では、
2次元コードに対する関心が急速に高まっており、これ
によれば、従来は自動認識コードの主流であったバーコ
ード(1次元コード)に比べて、数十倍から数百倍以上
のデータ密度を持つことができる。例えば、この2次元
コードを商品などに直接印刷したり、2次元コードを印
刷したラベルを貼り付ければ、工程管理、在庫管理、品
質管理等の様々な用途に利用できる。
2. Description of the Related Art Recently, in the technical field of automatic recognition codes,
Interest in two-dimensional codes is rapidly increasing, and according to this, a data density several tens to hundreds of times higher than that of bar codes (one-dimensional codes), which has conventionally been the mainstream of automatic recognition codes, has been found. Can have. For example, if the two-dimensional code is printed directly on a product or the like, or a label on which the two-dimensional code is printed is attached, it can be used for various purposes such as process management, inventory management, and quality management.

【0003】図19は、2次元コードの1例として、マ
トリックス型のコード(2次元マトリックスコード)の
構成を概略的に示す説明図である。この2次元コードc
pは、マトリックス型のうち、CPコード(Computer P
urpose Code)(日本IDテック株式会社の登録商標)
の構成を示している。このCPコードcpは、セルと呼
ばれるマス目が、12行×12列の144個ある構成に
なっている。また、このコードcpには、X軸リファレ
ンスラインLxとY軸リファレンスラインLyとが設け
られている。
FIG. 19 is an explanatory diagram schematically showing a configuration of a matrix type code (two-dimensional matrix code) as an example of a two-dimensional code. This two-dimensional code c
p is a matrix type CP code (Computer P
urpose Code) (registered trademark of Japan ID Tech Co., Ltd.)
Is shown. The CP code cp has a configuration in which there are 144 cells of 12 rows × 12 columns, which are called cells. Further, the code cp is provided with an X-axis reference line Lx and a Y-axis reference line Ly.

【0004】更に、X軸リファレンスラインLxには、
一定間隔で付加されたタイミングマーク(ティックマー
クとも称される)Tx、・・・、Txが設けられ、ま
た、Y軸リファレンスラインLyにも、一定間隔で付加
されたタイミングマークTy、・・・、Tyが設けられ
ている。X軸リファレンスラインLx及びY軸リファレ
ンスラインLyとにより挟まれる側の領域の所定の位置
には、補助マーク(コーナマークとも称される)Mcが
設けられている。
Further, the X-axis reference line Lx includes:
Tx,..., Tx are provided at regular intervals. Also, timing marks Ty,. , Ty. An auxiliary mark (also called a corner mark) Mc is provided at a predetermined position in a region sandwiched between the X-axis reference line Lx and the Y-axis reference line Ly.

【0005】そして、2次元コード化された種々の情報
は、X軸リファレンスラインLxとY軸リファレンスラ
インLyとにより挟まれる、補助マークMcが設けられ
た側の領域に書き込むようになっている。更に、このC
Pコードcpは、X軸リファレンスラインLxに沿っ
て、一定間隔(ここでは1セルおき)に付加された設け
られたタイミングマークTx、・・・、Txと、Y軸リ
ファレンスラインLyに沿って、一定間隔(ここでは1
セルおき)に付加された設けられたタイミングマークT
y、・・・、Tyとによって、各行と各列とにより構成
される各セル(補助マークMcを除く)の座標位置を、
特定しているので、例え、2次元コードcpが歪んだり
しても、座標位置を正確に特定することができるように
なっている。
[0005] Various information that has been two-dimensionally coded is written in an area between the X-axis reference line Lx and the Y-axis reference line Ly on the side where the auxiliary mark Mc is provided. Furthermore, this C
The P code cp is provided along timing marks Tx,..., Tx provided at regular intervals (here, every other cell) along the X-axis reference line Lx, and along the Y-axis reference line Ly. At regular intervals (here 1
Timing mark T added to every other cell)
By using y,..., and Ty, the coordinate position of each cell (excluding the auxiliary mark Mc) formed by each row and each column is expressed by:
Since it is specified, even if the two-dimensional code cp is distorted, the coordinate position can be specified accurately.

【0006】そして、このCPコードcpでは、補助マ
ークMcを設けているので、仮に、2次元コードcpが
上下逆さまに貼られていたり、左右が逆転している関係
に貼られていたり、表裏反対に貼られていても、CPコ
ードcpに記された情報の読み取りが可能になってい
る。尚、この例では、各セルは、複数の画素(例えば4
画素)で構成されており、黒画素が、所定数以上である
と黒セル、所定数未満であると白セルであると判断さ
れ、各セルがビット情報(2進データ)を構成するよう
にされている。
In the CP code cp, the auxiliary mark Mc is provided, so that the two-dimensional code cp is supposed to be pasted upside down, left or right reversed, or upside down. Can read the information described in the CP code cp. In this example, each cell includes a plurality of pixels (for example, 4 pixels).
If the number of black pixels is equal to or more than a predetermined number, it is determined to be a black cell, and if the number of black pixels is less than a predetermined number, it is determined to be a white cell, and each cell forms bit information (binary data). Have been.

【0007】そして、このビット情報によって、英数
字、漢字、カナに限られず、世界中の様々な言語をも表
現することができるようにされている。例えば、4つの
セルで16進数を表現し、16セルでJIS漢字コード
を表現する場合であれば、コード「306C」で漢字
「一」を、コード「4673」で漢字「二」を、コード
「3B30」で漢字「三」を示すことになる。
[0007] The bit information can be used to represent not only alphanumeric characters, kanji, and kana, but also various languages around the world. For example, when a hexadecimal number is represented by four cells and a JIS kanji code is represented by 16 cells, the kanji character “1” is represented by the code “306C”, the kanji character “2” is represented by the code “4673”, and the code “ "3B30" indicates the kanji character "3".

【0008】なお、ビット情報には、ユーザデータ以外
に、所定の割合でエラー訂正用のデータを含ませること
もできるようになっており、これにより、例え、2次元
コードcpが汚れていたり、破損していたりしても、自
動的にデータ(ユーザデータ)を復元することができる
ようになっている。また、ユーザデータ量が変化して
も、エラー訂正用のデータの割合を変化させればよいの
で、2次元コードcpの大きさを一定に保つこともでき
るという優れた長所がある(以上については、例えば、
特開昭64−86289号公報、特公平8−21054
号公報を参照)。
In addition, the bit information can include error correction data at a predetermined rate in addition to the user data, so that, for example, the two-dimensional code cp becomes dirty, Even if it is damaged, data (user data) can be automatically restored. Further, even if the amount of user data changes, the ratio of the data for error correction only has to be changed, so that there is an excellent advantage that the size of the two-dimensional code cp can be kept constant. For example,
JP-A-64-86289, JP-B-8-21054
Reference).

【0009】[0009]

【発明が解決しようとする課題】しかしながら、CPコ
ードcpでは、少なくとも、X軸リファレンスラインL
x又はY軸リファレンスラインLyが特定できなけれ
ば、2次元コードの解読ができず、X軸リファレンスラ
インLx又はY軸リファレンスラインLyが特定できな
かった場合には、読み取りエラーとして処理されてしま
うこととなり、この場合には、たとえ、製品等には、全
く問題が無いにもかかわらず、2次元コードの読取エラ
ーにより、製品等が、不良品扱いになってしまうという
問題がある。
However, in the CP code cp, at least the X-axis reference line L
If the x- or Y-axis reference line Ly cannot be specified, the two-dimensional code cannot be decoded. If the X-axis reference line Lx or the Y-axis reference line Ly cannot be specified, it is processed as a reading error. In this case, there is a problem that the product or the like is treated as a defective product due to a two-dimensional code reading error even though the product or the like has no problem at all.

【0010】図20は、そのような読取エラーとして処
理される汚れが付着した2次元コードの一例を模式的に
示す説明図である。CPコードcpでは、X軸リファレ
ンスラインLx又はY軸リファレンスラインLyが特定
し易いように、X軸リファレンスラインLxの、タイミ
ングマークTx、・・・、Txが設けられた側と反対側
には、X軸リファレンスラインLxに沿うように、いわ
ゆる全白ライン領域Rxwを設けている。
FIG. 20 is an explanatory diagram schematically showing an example of a two-dimensional code to which dirt is treated as such a reading error. In the CP code cp, on the side of the X-axis reference line Lx opposite to the side where the timing marks Tx,..., Tx are provided, so that the X-axis reference line Lx or the Y-axis reference line Ly is easily specified. A so-called all-white line region Rxw is provided along the X-axis reference line Lx.

【0011】同様に、Y軸リファレンスラインLyの、
タイミングマークTy、・・・、Tyが設けられた側と
反対側には、Y軸リファレンスラインLyに沿うよう
に、いわゆる全白ライン領域Rywを設けている。とこ
ろが、図20に示すように、全白ライン領域Rxwに重
なるように汚れSpが付着しているような場合に、この
汚れSpが、CCDカメラ等の固体撮像手段により、黒
画素として撮像されてしまうと、X軸リファレンスライ
ンLxを特定することができなくなり、この場合には、
読み取りエラーとして処理されてしまうこととなる。
Similarly, for the Y-axis reference line Ly,
On the side opposite to the side where the timing marks Ty,..., Ty are provided, a so-called all-white line area Ryw is provided along the Y-axis reference line Ly. However, as shown in FIG. 20, when the dirt Sp is attached so as to overlap the all white line region Rxw, the dirt Sp is imaged as a black pixel by solid-state imaging means such as a CCD camera. Then, the X-axis reference line Lx cannot be specified. In this case,
It will be processed as a reading error.

【0012】同様に、全白ライン領域Rywに重なるよ
うに汚れSpが付着しているような場合に、この汚れS
pが、CCDカメラ等の固体撮像手段により、黒画素と
して撮像されてしまうと、Y軸リファレンスラインLy
を特定することができなくなり、この場合にも、読み取
りエラーとして処理されてしまうこととなる。また、従
来、CPコードcpの解読は、CCDカメラ等の固体撮
像手段が撮像した画像情報全体について解析している。
このように、CCDカメラ等の固体撮像手段が撮像した
場合には、2次元コードcpが撮像されている場所以外
についても、固体撮像手段が撮像した画像について解析
しなければならないため、画像情報データ量が多くな
り、2次元コードcpの解読に時間がかかるという問題
がある。
Similarly, when the stain Sp is attached so as to overlap the all white line area Ryw, this stain S
If p is imaged as a black pixel by solid-state imaging means such as a CCD camera, the Y-axis reference line Ly
Cannot be specified, and in this case, it is also processed as a reading error. Conventionally, the decoding of the CP code cp is performed by analyzing the entire image information captured by a solid-state imaging unit such as a CCD camera.
As described above, when an image is captured by a solid-state imaging device such as a CCD camera, the image captured by the solid-state imaging device must be analyzed at a location other than the location where the two-dimensional code cp is captured. There is a problem that the amount is large and it takes time to decode the two-dimensional code cp.

【0013】本発明は、以上のような問題を解決するた
めになされたものであって、読取対象となる2次元コー
ドの近傍に存在する汚れに起因する、2次元コードの読
取エラーを防止するようにした、2次元コードの読取方
法を提供すること、並びに、読取対象となる2次元コー
ドの近傍に存在する汚れに起因する、2次元コードの読
取エラーを防止でき、且つ、2次元コードの読取を高速
に行えるようにした、2次元コードの読取方法を提供す
ることにある。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problem, and prevents a reading error of a two-dimensional code caused by a stain existing near a two-dimensional code to be read. The present invention provides a method for reading a two-dimensional code as described above, and can prevent a two-dimensional code reading error caused by dirt existing near a two-dimensional code to be read, and can prevent the two-dimensional code from being read. An object of the present invention is to provide a method of reading a two-dimensional code, which can read at a high speed.

【0014】[0014]

【課題を解決するための手段】請求項1に記載の2次元
コードの読取方法は、X軸リファレンスラインとY軸リ
ファレンスラインとが、L字形状に設けられ、前記X軸
リファレンスラインと前記Y軸リファレンスラインとに
より挟まれる領域に、所定の情報が、2次元コード化さ
れて記録された2次元コードの読取方法であって、2次
元コードを含む所定の領域を、固体撮像手段により撮像
する撮像ステップと、固体撮像手段により撮像した画像
情報を、画像メモリに展開する展開ステップと、記画像
メモリに展開された画像情報に、複数のセルが行列に配
置された、リファレンスライン判別スケール手段を重ね
合わせた後、これを回転させ、リファレンスライン判別
スケール手段のいずれかのラインに、予め定められた所
定のセル数が連続して黒セルとして現れた時点で、リフ
ァレンスライン判別スケール手段の回転を停止し、リフ
ァレンスライン判別スケール手段のいずれかのラインに
現れた黒セルが連続する行をX軸リファレンスライン又
はY軸リファレンスラインのいずれかであると推定する
リファレンスライン推定ステップと、X軸リファレンス
ライン又はY軸リファレンスラインのいずれかであると
推定された推定リファレンスラインを中心にして、その
周辺の一方側の所定数のラインと他方側の所定数のライ
ンの各々について走査して、一方側の複数ラインと他方
側の複数ラインの各々について黒セル数又は白セル数
を、リファレンスライン判別スケール手段に設けられた
セル単位で合計し、推定リファレンスラインの周辺の一
方側の所定数のライン及び推定リファレンスラインの周
辺の他方側の所定数のラインのいずれか一方側に、黒セ
ル数又は白セル数が所定数以上存在し、他方側に、黒セ
ル数又は白セル数が所定数以上存在しない場合に、推定
リファレンスラインをX軸リファレンスライン又はY軸
リファレンスラインと決定するリファレンスライン決定
ステップとを備える。
According to a first aspect of the present invention, there is provided a method of reading a two-dimensional code, wherein an X-axis reference line and a Y-axis reference line are provided in an L-shape, and wherein the X-axis reference line and the Y-axis reference line are provided. This is a method of reading a two-dimensional code in which predetermined information is converted into a two-dimensional code and recorded in an area sandwiched between the axis reference lines, and a predetermined area including the two-dimensional code is imaged by solid-state imaging means. An imaging step, an expansion step of expanding image information captured by the solid-state imaging means in an image memory, and a reference line determination scale means in which a plurality of cells are arranged in a matrix in the image information expanded in the image memory. After overlapping, this is rotated so that a predetermined predetermined number of cells continuously When the black line appears as a black cell, the rotation of the reference line discrimination scale means is stopped, and a row in which black cells appearing on any line of the reference line discrimination scale means are connected to the X axis reference line or the Y axis reference line. A reference line estimating step of estimating one of the X-axis reference line and a predetermined number of lines on one side around the estimated reference line estimated to be one of the X-axis reference line and the Y-axis reference line A predetermined number of lines on the other side are scanned, and the number of black cells or the number of white cells for each of the plurality of lines on one side and each of the plurality of lines on the other side are summed up in cell units provided in the reference line determination scale means. A predetermined number of lines on one side around the estimated reference line and the estimated reference When the number of black cells or white cells is equal to or greater than a predetermined number on one of the predetermined number of lines on the other side around the sense line, and the number of black cells or white cells is not equal to or greater than a predetermined number on the other side. And a reference line determining step of determining the estimated reference line as the X-axis reference line or the Y-axis reference line.

【0015】尚、本明細書で用いる用語、「黒」又は
「白」は、2値化した後に、「黒」又は「白」ろ判定さ
れる場合を規定しており、実際の色は、「黒」又は
「白」に限定されることは無い。例えば、2次元コード
が、白地に青色で表されている場合には、青色は、
「黒」として規定される。
The term “black” or “white” used in the present specification defines a case where “black” or “white” is determined after binarization. It is not limited to “black” or “white”. For example, if the two-dimensional code is represented by blue on a white background,
Defined as "black".

【0016】2次元コードが、白地に黒で表されている
場合には、黒色の汚れが問題となるので、黒黒セル及び
黒画素で、2次元コードを読み取る。これとは逆に、2
次元コードが、黒地に白で表されている場合には、白色
の汚れが問題となるので、白セル及び白画素で、2次元
コードを読み取る。2次元コードが、白地に黒で表され
ている場合には、この2次元コードの読取方法では、リ
ファレンスライン推定ステップにより、リファレンスラ
インを推定し、更に、このステップにより推定された推
定リファレンスラインを中心にして、その一方側の所定
数のラインとその他方側の所定数のラインの各々につい
て走査し、そのようにして走査した、一方側の所定数の
ラインと他方側の所定数のラインの各々について黒セル
数を、リファレンスライン判別手段に設けられたセル単
位で合計し、推定リファレンスラインのいずれか一方側
の所定数のラインに、黒セル数が所定数以上存在し、他
方側の所定数のラインに、黒セル数が所定数以上存在し
ない場合に、推定リファレンスラインをX軸リファレン
スライン又はY軸リファレンスラインと決定するリファ
レンスライン決定ステップを設けている。
If the two-dimensional code is represented by black on a white background, black stains become a problem, so the two-dimensional code is read with black and black cells and black pixels. Conversely, 2
When the dimensional code is represented by white on a black background, white stains become a problem, so the two-dimensional code is read with white cells and white pixels. When the two-dimensional code is represented by black on a white background, in the two-dimensional code reading method, the reference line is estimated by the reference line estimation step, and the estimated reference line estimated by this step is further estimated. With respect to the center, scanning is performed for each of a predetermined number of lines on one side and a predetermined number of lines on the other side, and thus a predetermined number of lines on one side and a predetermined number of lines on the other side are scanned. The number of black cells is summed for each of the cells provided in the reference line discriminating means, and the number of black cells is equal to or more than a predetermined number in a predetermined number of lines on one side of the estimated reference line, and When the number of black cells does not exceed a predetermined number in the number of lines, the estimated reference line is set to the X-axis reference line or the Y-axis reference line. It is provided a reference line determination step of determining.

【0017】これにより、たとえ、X軸リファレンスラ
インの、タイミングマークが設けられる側の反対側に沿
って設けられる全白ラインの領域に汚れが重なるように
付着しても、X軸リファレンスラインを特定することが
できる。また、同様に、たとえ、Y軸リファレンスライ
ンの、タイミングマークが設けられる側の反対側に沿っ
て設けられる全白ラインの領域に汚れが重なるように付
着しても、Y軸リファレンスラインを特定することがで
きる。
Accordingly, even if the dirt is superimposed on the area of the all white line provided along the opposite side of the X-axis reference line on which the timing mark is provided, the X-axis reference line is specified. can do. Similarly, the Y-axis reference line is specified even if the stain adheres to the area of the all white line provided along the side opposite to the side on which the timing mark is provided of the Y-axis reference line. be able to.

【0018】これにより、読取対象となる2次元コード
の近傍に汚れが存在していても、2次元コードの読取エ
ラーが生じない。また、2次元コードが、黒地に白で表
されている場合には、この2次元コードの読取方法で
は、リファレンスライン推定ステップにより、リファレ
ンスラインを推定し、更に、このステップにより推定さ
れた推定リファレンスラインを中心にして、その一方側
の所定数のラインとその他方側の所定数のラインの各々
について走査し、そのようにして走査した、一方側の所
定数のラインと他方側の所定数のラインの各々について
白セル数を、リファレンスライン判別手段に設けられた
セル単位で合計し、推定リファレンスラインのいずれか
一方側の所定数のラインに、白セル数が所定数以上存在
し、他方側の所定数のラインに、白セル数が所定数以上
存在しない場合に、推定リファレンスラインをX軸リフ
ァレンスライン又はY軸リファレンスラインと決定する
リファレンスライン決定ステップを設けている。
As a result, even if dirt exists near the two-dimensional code to be read, no two-dimensional code reading error occurs. In the case where the two-dimensional code is represented by white on a black background, in the two-dimensional code reading method, a reference line is estimated by a reference line estimation step. With the line as a center, each of a predetermined number of lines on one side and a predetermined number of lines on the other side is scanned, and a predetermined number of lines on one side and a predetermined number of lines on the other side are scanned as described above. The number of white cells for each of the lines is summed up in cell units provided in the reference line discriminating means, and a predetermined number of lines on one side of the estimated reference line has a predetermined number of white cells or more, and the other side has When the number of white cells does not exist in the predetermined number of lines, the estimated reference line is set to the X-axis reference line or the Y-axis reference line. Is provided with a reference line determining step of determining the in-.

【0019】これにより、たとえ、X軸リファレンスラ
インの、タイミングマークが設けられる側の反対側に沿
って設けられる全黒ラインの領域に汚れが重なるように
付着しても、X軸リファレンスラインを特定することが
できる。また、同様に、たとえ、Y軸リファレンスライ
ンの、タイミングマークが設けられる側の反対側に沿っ
て設けられる全黒ラインの領域に汚れが重なるように付
着しても、Y軸リファレンスラインを特定することがで
きる。
Thus, even if dirt adheres to the area of the all black lines provided along the opposite side of the X-axis reference line on which the timing mark is provided, the X-axis reference line is specified. can do. Similarly, the Y-axis reference line is specified even if the stain adheres to the area of the all black line provided along the side opposite to the side where the timing mark is provided on the Y-axis reference line. be able to.

【0020】これにより、読取対象となる2次元コード
の近傍に汚れが存在していても、2次元コードの読取エ
ラーが生じない。請求項2に記載の2次元コードの読取
方法は、X軸リファレンスラインとY軸リファレンスラ
インとが、L字形状に設けられ、X軸リファレンスライ
ンとY軸リファレンスラインとにより挟まれる領域に、
所定の情報が、2次元コード化されて記録された2次元
コードの読取方法であって、2次元コードを含む所定の
領域を、複数の光電変換素子が行列に配列された固体撮
像手段により撮像する撮像ステップと、固体撮像手段に
より撮像した画像情報を、画像メモリに展開する展開ス
テップと、画像メモリに展開された画像情報を固体撮像
手段の行列に配列された光電変換素子単位で、行単位毎
に、黒画素数又は白画素数を合計し、黒画素数又は白画
素数が所定の数以上含まれる行の最初の行と、最後の行
とから、黒画素情報又は白画素情報を所定数以上含む領
域の中心線となる行を決定し、画像メモリに展開された
画像情報を固体撮像手段の行列に配列された光電変換素
子単位で、列単位毎に、黒画素数又は白画素数を合計
し、黒画素数又は白画素数が所定の数以上含まれる列の
最初の列と、最後の列とから、黒画素情報を所定数以上
含む領域の中心線となる列を決定し、中心線となる行
と、中心線となる列の交点を中心にして、前記画像メモ
リに展開されている画像情報から、予め読み取るべき2
次元コードの領域よりやや大きい領域を切り出す画像情
報切出ステップと、画像情報切出ステップにより切り出
された画像情報に、複数のセルが行列に配置された、リ
ファレンスライン判別スケール手段を重ね合わせた後、
これを回転させ、リファレンスライン判別スケール手段
のいずれかのラインに、予め定められた所定のセル数が
連続して黒セルとして現れた時点で、リファレンスライ
ン判別スケール手段の回転を停止し、リファレンスライ
ン判別スケール手段のいずれかのラインに現れた黒セル
又は白セルが連続するラインをX軸リファレンスライン
又はY軸リファレンスラインのいずれかであると推定す
るリファレンスライン推定ステップと、X軸リファレン
スライン又はY軸リファレンスラインのいずれかである
と推定された推定リファレンスラインを中心にして、そ
の周辺の一方側の所定数のラインと他方側の所定数のラ
インの各々について走査して、一方側の複数ラインと他
方側の複数ラインの各々について黒セル数又は白セル数
を、リファレンスライン判別スケール手段に設けられた
セル単位で合計し、推定リファレンスラインの周辺の一
方側の所定数のライン及び推定リファレンスラインの周
辺の他方側の所定数のラインのいずれか一方側に、黒セ
ル数が所定数以上存在し、他方側に、黒セル数又は白セ
ル数が所定数以上存在しない場合に、推定リファレンス
ラインをX軸リファレンスライン又はY軸リファレンス
ラインと決定するリファレンスライン決定ステップとを
備える。
Thus, even if dirt exists near the two-dimensional code to be read, no two-dimensional code reading error occurs. In the method for reading a two-dimensional code according to claim 2, the X-axis reference line and the Y-axis reference line are provided in an L-shape, and are arranged in a region sandwiched between the X-axis reference line and the Y-axis reference line.
A method of reading a two-dimensional code in which predetermined information is converted into a two-dimensional code and recorded, wherein a predetermined area including the two-dimensional code is imaged by solid-state imaging means in which a plurality of photoelectric conversion elements are arranged in a matrix. An image capturing step, and an expanding step of expanding the image information captured by the solid-state image capturing means into an image memory; and a row unit in units of photoelectric conversion elements arranged in a matrix of the solid-state image capturing means. In each case, the number of black pixels or white pixels is summed, and black pixel information or white pixel information is determined from the first row and the last row of the row including the predetermined number of black pixels or white pixels. The number of black pixels or the number of white pixels is determined for each column, in units of photoelectric conversion elements arranged in a matrix of solid-state imaging means, by determining a row serving as a center line of an area including the number of pixels or more. The number of black pixels or white From the first column and the last column of the column in which the prime number is equal to or more than a predetermined number, a column serving as the center line of the region including the black pixel information is equal to or more than the predetermined number is determined. 2 to be read in advance from the image information developed in the image memory, centering on the intersection of the columns
After superimposing a reference line discrimination scale means in which a plurality of cells are arranged in a matrix on the image information extraction step of extracting an area slightly larger than the area of the dimensional code and the image information extracted by the image information extraction step ,
When the predetermined number of cells continuously appear as black cells on one of the lines of the reference line discrimination scale means, the rotation of the reference line discrimination scale means is stopped. A reference line estimating step of estimating a continuous line of black cells or white cells appearing on any line of the discrimination scale means as an X-axis reference line or a Y-axis reference line; Scanning each of a predetermined number of lines on one side and a predetermined number of lines on the other side around the estimated reference line estimated to be one of the axis reference lines, and a plurality of lines on one side And the number of black or white cells for each of the multiple lines on the other side The sum is calculated in units of cells provided in the in-determination scale means, and a black cell is placed on one of a predetermined number of lines on one side around the estimated reference line and a predetermined number of lines on the other side around the estimated reference line. A reference line determining step of determining the estimated reference line as an X-axis reference line or a Y-axis reference line when the number is equal to or more than a predetermined number and the other side does not have the predetermined number of black cells or white cells. Prepare.

【0021】請求項2に記載の2次元コードの読取方法
では、リファレンスライン推定ステップの前処理ステッ
プとして、固体撮像手段が撮像した画像情報から、2次
元コードを含むであろうと推定される領域を切り出し
て、この切り出された少ない情報から、2次元コードを
読み取るようにしているので、解読に使用するデータ量
を小さくした分だけ、2次元コードの解読が高速に行え
る。
According to the two-dimensional code reading method of the present invention, as a pre-processing step of the reference line estimating step, an area estimated to include the two-dimensional code from image information taken by the solid-state imaging means is provided. Since the two-dimensional code is read from the extracted small information, the two-dimensional code can be decoded at a high speed by the amount of data used for decoding.

【0022】また、画像情報切出ステップにおいて、2
次元コードを含むであろうと推定される領域を、画像メ
モリに展開された画像情報を固体撮像手段の行列に配列
された光電変換素子単位で、行単位毎に、黒画素数又は
白画素数を合計し、黒画素数又は白画素が所定の数以上
含まれる行の最初の行と、最後の行とから、黒画素情報
又は白画素情報を所定数以上含む領域の中心線となる行
を決定し、画像メモリに展開された画像情報を固体撮像
手段の行列に配列された光電変換素子単位で、列単位毎
に、黒画素数又は白画素数を合計し、黒画素数又は白画
素数が所定の数以上含まれる列の最初の列と、最後の列
とから、黒画素情報又は白画素情報を所定数以上含む領
域の中心線となる列を決定し、中心線となる行と、中心
線となる列の交点を中心にして、画像メモリに展開され
ている画像情報から、予め読み取るべき2次元コードの
領域よりやや大きい領域を切り出すようにしている。
In the image information extracting step, 2
The area estimated to contain the dimensional code is obtained by converting the image information expanded in the image memory into photoelectric conversion elements arranged in a matrix of the solid-state imaging means, and for each row, the number of black pixels or white pixels. From the first row and the last row of the row in which the number of black pixels or white pixels is equal to or more than a predetermined number, a row serving as a center line of an area including a predetermined number or more of black pixel information or white pixel information is determined. Then, the image information developed in the image memory is summed up for the number of black pixels or white pixels for each column unit for each photoelectric conversion element arranged in a matrix of the solid-state imaging means, and the number of black pixels or white pixels is calculated. From the first column and the last column of the columns included in the predetermined number or more, a column serving as a center line of an area including black pixel information or white pixel information in a predetermined number or more is determined. Is the image information developed in the image memory centered on the intersection of the line columns , So that cut out slightly larger area than the area of the two-dimensional code to be read in advance.

【0023】これにより、切り出された領域内に、2次
元コードが高い確率で含まれるため、切り出された領域
内に、2次元コードが含まれていなかったり、また、そ
の一部のみが含まれているといったような不都合が生じ
難い。
As a result, the two-dimensional code is included in the cut-out area with a high probability, so that the two-dimensional code is not included in the cut-out area, or only a part thereof is included. It is unlikely that such inconveniences occur.

【0024】[0024]

【発明の実施の形態】以下、本発明に係る2次元コード
の読取方法について、図面を参照しながら、更に詳しく
説明する。尚、以下の説明では、白地に黒色で2次元コ
ードが付されている場合を例に取り説明する。 (発明の実施の形態1)図1は、本発明に係る2次元コ
ードの読取方法を実施する2次元コード読取装置を概略
的に説明する全体構成図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a method for reading a two-dimensional code according to the present invention will be described in more detail with reference to the drawings. In the following description, a case where a two-dimensional code is attached in black on a white background will be described as an example. (First Embodiment of the Invention) FIG. 1 is an overall configuration diagram schematically illustrating a two-dimensional code reading apparatus for implementing a two-dimensional code reading method according to the present invention.

【0025】尚、以下の説明では、説明を容易とするた
め、2次元コード読取装置1を、医薬品等の製品が入っ
た容器に、2次元コードを付したラベルを貼付け、ラベ
ルに付された2次元コードの情報に基づいて、容器を仕
分けする場合に適用した例について説明する。より詳し
く説明すると、例えば、薬剤等の製品が入れられた容器
に付されたラベルに付された2次元コード中に、製造年
月日、有効期限等の時間情報を含ませておき、製造年月
日から所定時間が経過した製品を廃棄したり、有効期限
が既に途過した製品を廃棄したりするような仕分けや、
薬剤等の製品が入れられた容器に付されたラベルに付さ
れた2次元コード中に、製品番号、ロット番号の製造情
報を含ませておき、不良品と判断された製品を、製造情
報に基づいて廃棄したりするような仕分けをする場合に
適用した例について説明する。
In the following description, in order to facilitate the explanation, the two-dimensional code reader 1 is attached to a container containing a product such as a medicine by attaching a label with a two-dimensional code to the container. An example in which containers are sorted based on information of a two-dimensional code will be described. More specifically, for example, time information such as a manufacturing date, an expiration date, etc. is included in a two-dimensional code attached to a label attached to a container containing a product such as a drug, and Sorting such as discarding products that have passed a predetermined time from the date or discarding products that have already expired,
Product information such as product number and lot number is included in a two-dimensional code attached to a label attached to a container containing a product such as a drug, and a product determined to be defective is included in the manufacturing information. An example will be described in which the present invention is applied to a case where sorting based on discarding is performed.

【0026】この2次元コード読取装置1は、演算処理
手段2と、演算処理手段2に信号線を介して接続された
CCDカメラ等の固体撮像手段3と、演算処理手段2に
信号線を介して接続されたデコーダ4とを備える。尚、
この例では、演算処理手段2として、いわゆるパソコン
と称される、画面表示手段(CRT)2aや外部入力手
段(キーボードやマウス)2b等を備える、汎用型の演
算処理手段を用いており、また、演算処理手段2には、
プリンタ5を接続している。
The two-dimensional code reader 1 includes an arithmetic processing unit 2, a solid-state imaging unit 3 such as a CCD camera connected to the arithmetic processing unit 2 via a signal line, and a signal line to the arithmetic processing unit 2 via a signal line. And a decoder 4 connected thereto. still,
In this example, as the arithmetic processing means 2, a general-purpose arithmetic processing means having a screen display means (CRT) 2a, an external input means (keyboard or mouse) 2b, etc., which is called a personal computer, is used. , The arithmetic processing means 2 includes:
The printer 5 is connected.

【0027】演算処理手段2の記憶部には、容器を仕分
けする所定の運転プログラムが予め格納されており、こ
の2次元コード読取装置1は、運転プログラムに従っ
て、容器の仕分けをするようになっている。また、演算
処理手段2に、基本プログラムソフトウェアFaを組み
入れると、演算処理手段2を、この2次元コード読取装
置1の全体を制御統括する制御部として用いることがで
きるようにされており、更に、演算処理手段2に、辞書
ソフトウェアFbを組み入れると、演算処理手段2の外
部入力手段2bより入力した文字や記号を2次元コード
に変換して、プリンタ5より記録しに印刷出力できるよ
うになっている。
A predetermined operation program for sorting containers is stored in advance in the storage section of the arithmetic processing means 2. The two-dimensional code reader 1 sorts containers according to the operation program. I have. When the basic program software Fa is incorporated in the arithmetic processing means 2, the arithmetic processing means 2 can be used as a control unit for controlling the whole of the two-dimensional code reader 1. When the dictionary software Fb is incorporated in the arithmetic processing means 2, characters and symbols input from the external input means 2b of the arithmetic processing means 2 can be converted into two-dimensional codes, which can be recorded by the printer 5 and printed out. I have.

【0028】図2は、仕分けされる容器の一つを拡大し
て概略的に示す斜視図であり、容器Vには、所定の位置
に、2次元コードcpが付されたラベルPが貼着けられ
ている。この例では、2次元コードcpが付されたラベ
ルPの各々が貼着された複数の容器V、・・・、Vの各
々は、ベルトコンベア等の搬送手段6上に載せられ、撮
像ポイントRpに搬送され、撮像ポイントRpにおい
て、容器V、・・・、Vの各々に付された2次元コード
cpの各々が、固体撮像手段3により撮像されるように
なっている。
FIG. 2 is an enlarged perspective view schematically showing one of the containers to be sorted. A label P having a two-dimensional code cp is attached to a predetermined position on the container V. Have been. In this example, each of the plurality of containers V,..., V to which each of the labels P to which the two-dimensional code cp is attached is placed on a conveying means 6 such as a belt conveyor, and the imaging point Rp , And the two-dimensional code cp attached to each of the containers V,..., V is imaged by the solid-state imaging means 3 at the imaging point Rp.

【0029】より詳しく説明すると、撮像ポイントRp
の上流側の位置には、赤外線発光素子7aと、赤外線受
光素子7bとを備える容器検知手段7が設けられてい
る。そして、赤外線発光素子7aは、2次元コード読取
装置1に電源を投入すると、赤外線受光素子7bに向け
て、赤外線を照射するようになっている。赤外線受光素
子7bは、演算処理装置2に接続されており、赤外線発
光素子7aから照射される赤外線を受光している間は、
受光信号を演算処理装置2に送信し続けるようになって
おり、また、赤外線発光素子7aから照射される赤外線
を受光しなくなると、受光信号の演算処理装置2への送
信を停止するようになっている。
More specifically, the imaging point Rp
A container detecting means 7 including an infrared light emitting element 7a and an infrared light receiving element 7b is provided at a position on the upstream side of. When the power of the two-dimensional code reader 1 is turned on, the infrared light emitting element 7a emits infrared light toward the infrared light receiving element 7b. The infrared light receiving element 7b is connected to the arithmetic processing unit 2, and while receiving infrared light emitted from the infrared light emitting element 7a,
The transmission of the received light signal to the processing unit 2 is stopped when the infrared light emitted from the infrared light emitting element 7a is no longer received. ing.

【0030】固体撮像手段3は、フラッシュ手段3aを
備え、演算処理装置2から、シャッタを切る命令信号を
受信すると、フラッシュ手段3aが点灯し、これと同時
にシャッタが切られるようになっている。固体撮像手段
3が撮像した画像情報は、演算処理装置2に送られ、演
算処理装置2の記憶部に一時記憶されるようになってお
り、演算処理装置2に送られた画像情報は、更に、デコ
ーダ4に送られ、ここで、2次元コードが、例えば、J
ISコード等に変換され、デコーダ4によりJISコー
ド等に変換された情報が演算処理手段2に送信されるよ
うになっている。
The solid-state image pickup means 3 includes a flash means 3a. When a command signal to release a shutter is received from the arithmetic processing unit 2, the flash means 3a is turned on and, at the same time, the shutter is released. Image information captured by the solid-state imaging means 3 is sent to the arithmetic processing device 2 and temporarily stored in a storage unit of the arithmetic processing device 2. The image information sent to the arithmetic processing device 2 further includes , To the decoder 4, where the two-dimensional code is, for example, J
Information converted into an IS code or the like and converted into a JIS code or the like by the decoder 4 is transmitted to the arithmetic processing unit 2.

【0031】以下、この2次元コード読取装置1の動作
について説明する。まず、この2次元コード読取装置1
に電源を投入すると、搬送手段6が動きだし、搬送手段
6上に載置された容器V、・・・、Vが、撮像ポイント
Rp側へと搬送される。また、赤外線発光素子7aが、
赤外線受光素子7bへ赤外線の照射を開始する。
Hereinafter, the operation of the two-dimensional code reader 1 will be described. First, the two-dimensional code reader 1
When the power is turned on, the transport means 6 starts to move, and the containers V,..., V placed on the transport means 6 are transported to the imaging point Rp side. Also, the infrared light emitting element 7a
Irradiation of infrared light to the infrared light receiving element 7b is started.

【0032】赤外線受光素子7bは、赤外線発光素子7
aから照射される赤外線を受光している間は、常時、演
算処理手段2に受光信号を送出し続ける。演算処理手段
2は、赤外線受光素子7bより受光信号を受信している
間は、搬送手段6上に、固体撮像手段3が撮像すべき対
象物(この例では、容器V)が無いと判断する一方、赤
外線受光素子7bからの受光信号が停止すると、撮像ポ
イントRp側へ、固体撮像手段3が撮像すべき対象物
(この例では、容器V)が搬送されてきたと判断し、受
光信号の停止時から所定時間経過後、丁度、搬送手段6
上を搬送されてきた容器Vが、撮像ポイントRpにきた
時点で、固体撮像手段3のシャッタを切る命令信号を、
固体撮像手段3へ送信する。
The infrared light receiving element 7b is
While receiving the infrared rays emitted from a, the light receiving signal is continuously transmitted to the arithmetic processing means 2 at all times. The arithmetic processing unit 2 determines that there is no object (the container V in this example) to be imaged by the solid-state imaging unit 3 on the transporting unit 6 while receiving the light receiving signal from the infrared light receiving element 7b. On the other hand, when the light receiving signal from the infrared light receiving element 7b stops, it is determined that the object (in this example, the container V) to be imaged by the solid-state imaging means 3 has been conveyed to the imaging point Rp side, and the light receiving signal stops. After a lapse of a predetermined time from the time, the conveying means 6
When the container V conveyed above reaches the imaging point Rp, a command signal for releasing the shutter of the solid-state imaging means 3 is given by:
The data is transmitted to the solid-state imaging means 3.

【0033】固体撮像手段3は、演算処理手段2から、
シャッタを切る命令信号を受信すると、フラッシュをた
くと同時に、シャッタを切ることで、撮像ポイントRp
に位置している容器VのラベルPを撮像する。図3及び
図4は、この2次元コード読取装置1の演算処理手段2
及びデコーダ4で行われる2次元コードの読取操作の一
例を模式的に示す処理手順図である。
The solid-state image pickup means 3 is provided from the arithmetic processing means 2
Upon receiving a command signal to release the shutter, the flash is fired and the shutter is released, so that the imaging point Rp
The image of the label P of the container V located at the position. FIGS. 3 and 4 show the operation processing means 2 of the two-dimensional code reader 1.
FIG. 7 is a processing procedure diagram schematically illustrating an example of a two-dimensional code reading operation performed by the decoder 4.

【0034】まず、図3(a)に示すステップにおい
て、固体撮像手段3が撮像した画像情報IPが、演算処
理手段2の記憶部(図示せず)の画像メモリに展開され
る。ここでは、説明を容易とするため、固体撮像手段3
が、図5に示したような画像情報IPを撮像した場合を
例にとって説明する。この例では、固体撮像手段3が撮
像した画像情報IPは、黒画素が、高電位として、ま
た、白画素が、低電位として、電気信号に変換されて、
固体撮像手段3の行列に配置された複数の光電変換素子
の座標とともに、演算処理手段2の記憶部の画像メモリ
に一時記憶されるようになっている。
First, in the step shown in FIG. 3A, image information IP picked up by the solid-state image pickup means 3 is developed in an image memory of a storage unit (not shown) of the arithmetic processing means 2. Here, in order to facilitate the explanation, the solid-state imaging means 3
However, a case where the image information IP as shown in FIG. 5 is imaged will be described as an example. In this example, the image information IP captured by the solid-state imaging unit 3 is converted into an electric signal by setting a black pixel as a high potential and a white pixel as a low potential,
The coordinates of a plurality of photoelectric conversion elements arranged in a matrix of the solid-state imaging means 3 are temporarily stored in an image memory of a storage unit of the arithmetic processing means 2.

【0035】演算処理手段2の記憶部の画像メモリに展
開された画像情報IPは、更に、デコーダ4に送信され
る。デコーダ4に送信された画像情報IPは、デコーダ
4の記憶部の画像メモリに一時記憶される。デコーダ4
は、図3(b)に示すステップにおいて、その記憶部に
一時記憶された画像情報IPに、図6に示すような、電
気的に作成された、複数のセルが行列に配置された、リ
ファレンスライン判別スケール手段8を重ね合わせる
(図7を参照)。
The image information IP developed in the image memory of the storage unit of the arithmetic processing means 2 is further transmitted to the decoder 4. The image information IP transmitted to the decoder 4 is temporarily stored in an image memory of a storage unit of the decoder 4. Decoder 4
In the step shown in FIG. 3B, reference is made to a reference in which a plurality of electrically created cells are arranged in a matrix as shown in FIG. 6 in the image information IP temporarily stored in the storage unit. The line discrimination scale means 8 is overlaid (see FIG. 7).

【0036】この例では、リファレンスライン判別スケ
ール手段8の行列に配置された複数のセルce、・・
・、ceの解像度は、固体撮像手段3の解像度より粗い
ものを用いている。より特定的に説明すると、この例で
は、固体撮像手段3が撮像した、X軸リファレンスライ
ンLxを、概ね、2行程度で、また、Y軸リファレンス
ラインLyを、概ね、2列程度で、また、情報を示す黒
画素(高電位の領域)を4個のセルで判定するようにな
っている。
In this example, a plurality of cells ce,...
The resolution of ce is lower than that of the solid-state imaging means 3. More specifically, in this example, the X-axis reference line Lx captured by the solid-state imaging unit 3 is approximately two rows, and the Y-axis reference line Ly is approximately two columns. , A black pixel (high-potential region) indicating information is determined by four cells.

【0037】尚、リファレンスライン判別スケール手段
8の解像度は、固体撮像手段3が撮像した2次元コード
の大きさに基づいて、適宜、選択される。次いで、デコ
ーダ4は、図3(c)に示すステップにおいて、リファ
レンスライン判別スケール手段8を、リファレンスライ
ン判別スケール手段8の行列に配置されたセルce、・
・・、ceにより形成されるラインに、予め定められた
所定のセル数が連続して黒セルとして現れるまで回転さ
せる。
The resolution of the reference line discrimination scale means 8 is appropriately selected based on the size of the two-dimensional code imaged by the solid-state imaging means 3. Next, in the step shown in FIG. 3C, the decoder 4 replaces the reference line discrimination scale means 8 with the cells ce,.
Rotate until a predetermined number of predetermined cells continuously appear as black cells on the line formed by ce.

【0038】この例では、リファレンスライン判別スケ
ール手段8のセルce、・・・、ceにより形成される
1ラインの約28個のセルで、X軸リファレンスライン
Lxが特定できるようにしているので、リファレンスラ
イン判別スケール手段8のセルce単位で、約28個の
黒セルが1ライン上に並ぶまで、リファレンスライン判
別スケール手段8を回転させる。
In this example, the X-axis reference line Lx can be specified by approximately 28 cells of one line formed by the cells ce,..., Ce of the reference line discrimination scale means 8. The reference line determination scale unit 8 is rotated until about 28 black cells are arranged on one line in units of cell ce of the reference line determination scale unit 8.

【0039】尚、図8は、リファレンスライン判別スケ
ール手段8のセルce単位で、約28個の黒セルが1ラ
イン上に並んだ状態を模式的に示している。尚、この例
では、リファレンスライン判別スケール手段8のセルc
e単位で、約28個の黒セルが1ライン上に並んだ状態
で、リファレンスライン判別スケール手段8の回転動作
を停止するようにした例を示しているが、リファレンス
ライン判別スケール手段8の回転動作を停止する判断と
なる、リファレンスライン判別スケール手段8のセルc
e単位で、1ライン中に黒セルが並ぶ所定数のセル数
は、固体撮像手段3が撮像した2次元コードの大きさに
基づいて、適宜、選択される。
FIG. 8 schematically shows a state where about 28 black cells are arranged on one line in units of cells ce of the reference line discrimination scale means 8. In this example, the cell c of the reference line discrimination scale means 8 is used.
In this example, the rotation operation of the reference line determination scale means 8 is stopped in a state where about 28 black cells are arranged on one line in units of e. Cell c of reference line discrimination scale means 8, which is used to determine that the operation is to be stopped
The predetermined number of cells in which black cells are arranged in one line in e units is appropriately selected based on the size of the two-dimensional code imaged by the solid-state imaging means 3.

【0040】デコーダ4は、リファレンスライン判別ス
ケール手段8のセルce単位で、所定数の黒セルが1ラ
イン上に並ぶと、リファレンスライン判別スケール手段
8の回転を停止し、リファレンスライン判別スケール手
段8のセルce単位で、所定数の黒セルが1ライン上に
並んだライン(図9に示すラインny)を、X軸リファ
レンスラインLxと推定する。
When a predetermined number of black cells are arranged on one line in units of cell ce of the reference line discrimination scale means 8, the decoder 4 stops the rotation of the reference line discrimination scale means 8, and turns off the reference line discrimination scale means 8. For each cell ce, a line in which a predetermined number of black cells are arranged on one line (line ny shown in FIG. 9) is estimated as an X-axis reference line Lx.

【0041】次に、デコーダ4は、このようにしてX軸
リファレンスラインLxを推定した後、図4(a)に示
すステップにおいて、推定したX軸リファレンスライン
Lxに対して、所定の角度を有する線を有する複数のデ
ータ9、・・・、9を順次重ね合わせる操作をし、所定
の角度を有する線に沿って所定数の黒セルが連続して現
れる線をY軸リファレンスラインLyと特定する。
Next, after estimating the X-axis reference line Lx in this way, in the step shown in FIG. 4A, the decoder 4 has a predetermined angle with respect to the estimated X-axis reference line Lx. .., 9 are sequentially superimposed, and a line in which a predetermined number of black cells continuously appear along a line having a predetermined angle is specified as a Y-axis reference line Ly. .

【0042】そして、デコーダ4の記憶部に一時記憶し
た画像情報の、推定したX軸リファレンスラインLx
と、特定したY軸リファレンスラインLyとの交点を原
点として、推定したX軸リファレンスラインLxと、特
定したY軸リファレンスラインLyとのなす角度θが、
tanθ=∞の関係になるように補正する。次に、デコ
ーダ4は、推定したX軸リファレンスラインLx(この
例では、図9に示す、ラインny)を中心にして上下に
各々数行について、行単位で、黒セルの数を合計する。
The estimated X-axis reference line Lx of the image information temporarily stored in the storage unit of the decoder 4
The angle θ between the estimated X-axis reference line Lx and the specified Y-axis reference line Ly, with the intersection of the specified Y-axis reference line Ly as the origin,
The correction is made so that tan θ = ∞. Next, the decoder 4 sums up the number of black cells for each of several rows above and below the estimated X-axis reference line Lx (in this example, the line ny shown in FIG. 9).

【0043】ここでは、説明を容易とするため、ライン
nyを中心にして上下に各々4行について、行単位で、
黒セルの数を合計した例について説明する。この例で
は、図9に示すように、ny行目には黒セルが合計で2
8個あり、ny−1行目には黒セルが合計で1個あり、
ny−2行目には黒セルが合計で1個あり、ny−3行
目には黒セルが合計で0個あり、また、ny−4行目に
は黒セルが合計で0個になっている。また、ny+1行
目には、黒セルが合計で28個(X軸リファレンスライ
ンLxのセル数に相当する)あり、ny+2行目には黒
セルが合計で14個(Y軸リファレンスラインLyのセ
ル数とタイミングマークTxのセル数との合計に相当す
る)あり、ny+3行目には黒セルが合計で14個(Y
軸リファレンスラインLyのセル数とタイミングマーク
Txのセル数との合計に相当する)あり、また、ny+
4行目には黒セルが14個(Y軸リファレンスラインL
yのセル数と情報を示すのセル数との合計に相当する)
ある例を示している。
Here, in order to facilitate the description, four lines are arranged in a row by four lines above and below the line ny.
An example in which the number of black cells is totaled will be described. In this example, as shown in FIG.
There are eight, and there is a total of one black cell in the ny-1 row,
The ny-2 row has a total of one black cell, the ny-3 row has a total of 0 black cells, and the ny-4 row has a total of 0 black cells. ing. In the ny + 1 row, there are a total of 28 black cells (corresponding to the number of cells of the X-axis reference line Lx), and in the ny + 2 row, there are a total of 14 black cells (cells of the Y-axis reference line Ly). Number and the number of cells of the timing mark Tx), and a total of 14 black cells (Y
(Corresponding to the sum of the number of cells of the axis reference line Ly and the number of cells of the timing mark Tx), and ny +
In the fourth row, 14 black cells (Y-axis reference line L
(equivalent to the sum of the number of cells of y and the number of cells indicating information)
An example is shown.

【0044】ここで、2次元コードcpは、X軸リファ
レンスラインLx、Y軸リファレンスラインLy、タイ
ミングマークTx、・・・、Tx、タイミングマークT
y、・・・、Ty、情報となる黒画素、並びに、補助マ
ークMcを有するので、X軸リファレンスラインLxと
Y軸リファレンスラインLyとにより挟まれ、且つ、補
助マークMcが設けられた側の領域には、必ず、所定数
以上の黒セルが存在する。
Here, the two-dimensional code cp is composed of an X-axis reference line Lx, a Y-axis reference line Ly, timing marks Tx,.
, Ty, black pixels serving as information, and auxiliary marks Mc, are sandwiched between the X-axis reference line Lx and the Y-axis reference line Ly, and on the side where the auxiliary marks Mc are provided. There is always a predetermined number or more of black cells in the area.

【0045】したがって、コードcpの領域内を通過す
る行毎に、最低存在する黒セル数を閾値Ythとすれ
ば、X軸リファレンスラインLxであると推定された推
定リファレンスラインnyを中心にして、その周辺の一
方側の所定数のラインと他方側の所定数のラインの各々
について走査して、一方側の複数ラインと他方側の複数
ラインの各々について黒セル数を、リファレンスライン
判別スケール手段に設けられたセル単位で合計し、推定
リファレンスラインnyの周辺の一方側の所定数のライ
ン及び推定リファレンスラインnyの周辺の他方側の所
定数のラインのいずれか一方側に、黒セル数が所定数以
上(黒セル数/行≧閾値Yth)存在し、他方側に、黒
セル数が所定数未満(黒セル数/行<閾値Yth)が存
在する場合には、推定リファレンスラインnyをX軸リ
ファレンスラインLxと決定することができる。
Therefore, if the minimum number of black cells existing for each row passing through the area of the code cp is set as the threshold value Yth, the estimated reference line ny estimated to be the X-axis reference line Lx will be A predetermined number of lines on one side of the periphery and a predetermined number of lines on the other side are scanned, and the number of black cells for each of the plurality of lines on one side and the plurality of lines on the other side is sent to the reference line determination scale means. The total number of black cells is determined in one of a predetermined number of lines on one side around the estimated reference line ny and a predetermined number of lines on the other side around the estimated reference line ny. If the number of black cells is equal to or greater than (the number of black cells / row ≧ threshold Yth) and the number of black cells is less than the predetermined number (the number of black cells / row <threshold Yth) on the other side, the estimation is performed. The reference line ny may determine the X-axis reference line Lx.

【0046】このことを理解容易のために、図9に示す
例に基づいて具体的に説明する。図9に示す例では、Y
軸リファレンスラインLyを2列で識別しているので、
2次元コードcpの領域内には、必ず、2セル以上の黒
セルが存在する。したがって、コードcpの領域内を通
過する行毎に、最低存在する黒セル数の閾値Ythを2
(Yth=2)とすれば、X軸リファレンスラインLx
であると推定された推定リファレンスラインnyを中心
にして、その周辺の他方側の所定数のライン(この例で
は、ny−1行、ny−2行、ny−3行及びny−4
行)と他方側の所定数のライン(この例では、ny+1
行、ny+2行、ny+3行及びny+4行)の各々に
ついて走査すると、この例では、他方側の複数ライン
(ny−1行、ny−2行、ny−3行及びny−4行
の合計4行)の各々のラインの黒セル数が、いずれも、
閾値Yth未満(この例では、Yth<2)となってい
る。
For easy understanding, this will be specifically described based on an example shown in FIG. In the example shown in FIG.
Since the axis reference line Ly is identified in two columns,
There are always two or more black cells in the area of the two-dimensional code cp. Therefore, the threshold value Yth of the minimum number of black cells that is
(Yth = 2), the X-axis reference line Lx
, A predetermined number of lines on the other side around the estimated reference line ny (in this example, ny-1, row ny-2, ny-3, and ny-4)
Row) and a predetermined number of lines on the other side (ny + 1 in this example)
When scanning is performed for each of the rows, ny + 2 rows, ny + 3 rows, and ny + 4 rows, in this example, a total of 4 rows of a plurality of rows on the other side (ny-1, row ny-2, ny-3, and ny-4 rows) ), The number of black cells in each line is
It is smaller than the threshold Yth (in this example, Yth <2).

【0047】且つ、一方側の複数のライン(ny+1
行、ny+2行、ny+3行及びny+4行の合計4
行)の各々について走査すると、一方側の複数ライン
(ny+1行、ny+2行、ny+3行及びny+4行
の合計4行)の各々のラインの黒セル数が、いずれも、
閾値Yth以上(この例では、Yth≧2)となってい
るので、X軸リファレンスラインLxであると推定され
た推定リファレンスラインnyを、X軸リファレンスラ
インLxであると決定することができる。
Further, a plurality of lines (ny + 1) on one side
Row, ny + 2 row, ny + 3 row and ny + 4 row, total 4
When scanning is performed for each of the rows, the number of black cells in each of the multiple lines on one side (ny + 1 row, ny + 2 row, ny + 3 row, and ny + 4 row in total of 4 rows) is as follows.
Since the threshold value is equal to or more than the threshold value Yth (Yth ≧ 2 in this example), the estimated reference line ny estimated to be the X-axis reference line Lx can be determined to be the X-axis reference line Lx.

【0048】次に、デコーダ4は、図4(b)に示すス
テップにおいて、黒セル数が所定数未満存在する他方側
(この例では、ny−1行及びny−2行の各々に存在
する黒セルcb、cbの各々)を汚れと判断し、図4
(c)に示すステップにおいて、汚れと判断した黒セル
cb、cbの各々を白セルに変換する、デコーダ4の画
像メモリに展開された画像情報を修正する画像情報修正
ステップを経てから、この画像情報修正ステップにより
修正された画像情報に基づいて、X軸リファレンスライ
ンLxとY軸リファレンスラインLyとにより挟まれる
領域に記録された2次元コード情報を、例えば、JIS
コードに解読する。
Next, in the step shown in FIG. 4B, the decoder 4 exists on the other side where the number of black cells is less than the predetermined number (in this example, each of the ny-1 row and the ny-2 row). Each of the black cells cb and cb) is determined to be dirty, and FIG.
In the step shown in (c), each of the black cells cb, cb determined to be dirty is converted into a white cell, and an image information correction step of correcting image information developed in the image memory of the decoder 4 is performed. Based on the image information corrected by the information correction step, the two-dimensional code information recorded in the area sandwiched between the X-axis reference line Lx and the Y-axis reference line Ly is converted into, for example, JIS.
Decode into code.

【0049】以上のようにして、デコーダ4により、2
次元コード情報から解読された情報は、演算処理手段2
に送られ、演算処理手段2は、演算処理手段2の記憶部
に予め格納された運転プログラムにより、2次元コード
情報から解読された情報に基づいて、容器V、・・・、
Vの仕分けを行う。この2次元コードの読取方法では、
リファレンスライン推定ステップにより、リファレンス
ラインnyを推定し、更に、このステップにより推定さ
れた推定リファレンスラインnyを中心にして、その一
方側の所定数のライン(この例では、ny+1行、ny
+2行、ny+3行、ny+4行の合計4行)とその他
方側の所定数のライン(この例では、ny−1行、ny
−2行、ny−3行、ny−4行の合計4行)の各々に
ついて走査し、そのようにして走査した、一方側の所定
数のライン(この例では、ny+1行、ny+2行、n
y+3行、ny+4行の合計4行)と他方側の所定数の
ライン(この例では、ny−1行、ny−2行、ny−
3行、ny−4行の合計4行)の各々について黒セル数
を、リファレンスライン判別手段に設けられたセル単位
で合計し、推定リファレンスラインnyの一方側の所定
数のライン(この例では、ny+1行、ny+2行、n
y+3行、ny+4行の合計4行)に、黒セル数が所定
数以上(黒セル数/行≧閾値Yth(この例では、黒セ
ル数/行≧2))存在し、他方側の所定数のライン(こ
の例では、ny−1行、ny−2行、ny−3行、ny
−4行の合計4行)に、黒セル数が所定数未満(黒セル
数/行<閾値Yth(この例では、黒セル数/行<2)
存在する場合に、推定リファレンスラインnyをX軸リ
ファレンスラインLxと決定するようにしている。
As described above, the decoder 4
The information decoded from the dimensional code information is sent to the arithmetic processing means 2
, And based on information decoded from the two-dimensional code information by the operation program stored in advance in the storage unit of the arithmetic processing means 2, the containers V,.
V is sorted. In this two-dimensional code reading method,
A reference line ny is estimated by a reference line estimation step, and a predetermined number of lines (ny + 1 rows, ny + 1 rows, ny + 1 rows in this example) on one side of the estimated reference line ny estimated in this step are centered on the estimated reference line ny.
+2 rows, ny + 3 rows, and ny + 4 rows, for a total of 4 rows) and a predetermined number of lines on the other side (in this example, ny−1 rows, ny
And a predetermined number of lines on one side (in this example, ny + 1 rows, ny + 2 rows, n
y + 3 rows, ny + 4 rows, a total of 4 rows) and a predetermined number of lines on the other side (in this example, ny-1 rows, ny-2 rows, ny- rows)
The number of black cells for each of the three rows and the ny-4 rows (total of four rows) is summed for each cell provided in the reference line discriminating means, and a predetermined number of lines on one side of the estimated reference line ny (in this example, in this example) , Ny + 1 row, ny + 2 row, n
The number of black cells is equal to or more than a predetermined number (the number of black cells / row ≧ threshold Yth (in this example, the number of black cells / row ≧ 2)) in y + 3 rows and ny + 4 rows (total of 4 rows), and the predetermined number on the other side is (In this example, ny-1 row, ny-2 row, ny-3 row, ny
-4 rows, the total number of black cells is less than a predetermined number (the number of black cells / row <threshold Yth (in this example, the number of black cells / row <2))
If there is, the estimated reference line ny is determined as the X-axis reference line Lx.

【0050】これにより、たとえ、X軸リファレンスラ
インLxの、タイミングマークTx、・・・、Txが設
けられる側の反対側に沿って設けられる全白ラインの領
域Rxwに汚れSpが重なるように付着しても、X軸リ
ファレンスラインLxを特定することができる。尚、上
記では、X軸リファレンスラインLxの決定方法につい
て説明したが、Y軸リファレンスラインLy決定方法
も、行を列の関係に、且つ、列を行の関係に置き換えれ
ば、X軸リファレンスラインLxの決定方法と同様の方
法により決定できる。
Thus, for example, the dirt Sp adheres to the region Rxw of the all-white line provided along the X-axis reference line Lx along the side opposite to the side where the timing marks Tx,..., Tx are provided. Even so, the X-axis reference line Lx can be specified. Although the method of determining the X-axis reference line Lx has been described above, the method of determining the Y-axis reference line Ly can also be determined by replacing the rows with the columns and the columns with the rows. Can be determined by a method similar to the method of determining

【0051】従って、Y軸リファレンスラインLyの、
タイミングマークTy、・・・、Tyが設けられる側の
反対側に沿って設けられる全白ラインの領域Rywに汚
れSpが重なるように付着しても、Y軸リファレンスラ
インLyを特定することができる。これにより、読取対
象となる2次元コードcpの近傍に汚れが存在していて
も、2次元コードの読取エラーが生じない。 (発明の実施の形態2)図10及び図11は、図1に示
す2次元コード読取装置1の演算処理手段2及びデコー
ダ4で行われる2次元コードの読取操作の他の一例を模
式的に示す処理手順図である。
Accordingly, of the Y-axis reference line Ly,
The Y-axis reference line Ly can be specified even when the stain Sp is attached so as to overlap the region Ryw of the all white line provided along the side opposite to the side where the timing marks Ty,. . As a result, even if dirt exists near the two-dimensional code cp to be read, no two-dimensional code reading error occurs. (Embodiment 2) FIGS. 10 and 11 schematically show another example of a two-dimensional code reading operation performed by the arithmetic processing means 2 and the decoder 4 of the two-dimensional code reader 1 shown in FIG. It is a processing procedure figure shown.

【0052】まず、図10(a)に示すステップにおい
て、固体撮像手段3が撮像した画像情報が、演算処理手
段2の記憶部(図示せず)の画像メモリに展開される。
ここでは、説明を容易とするため、固体撮像手段3が、
図12に示したような画像情報を撮像した場合を例にと
って説明する。この例では、固体撮像手段3が撮像した
画像情報は、黒画素が、高電位として、また、白画素
が、低電位として、電気信号に変換されて、固体撮像手
段3の行列に配置された複数の光電変換素子の座標とと
もに、演算処理手段2の記憶部の画像メモリに一時記憶
されるようになっている。
First, in the step shown in FIG. 10A, image information picked up by the solid-state imaging means 3 is developed in an image memory of a storage unit (not shown) of the arithmetic processing means 2.
Here, for ease of explanation, the solid-state imaging means 3
An example in which image information as shown in FIG. 12 is captured will be described. In this example, the image information captured by the solid-state imaging unit 3 is converted into an electric signal with the black pixel as a high potential and the white pixel as a low potential and arranged in a matrix of the solid-state imaging unit 3. The coordinates of the plurality of photoelectric conversion elements are temporarily stored in the image memory of the storage unit of the arithmetic processing unit 2.

【0053】演算処理手段2の記憶部の画像メモリに展
開された画像情報は、更に、デコーダ4に送信される。
デコーダ4に送信された画像情報は、デコーダ4の記憶
部の画像メモリに一時記憶される。以上に説明したステ
ップ迄の工程は、発明の実施の形態1に示す、図3
(a)に示すステップ迄の工程と同様であるが、発明の
実施の形態2では、以下に示すステップが、発明の実施
の形態1に示したステップと異なっている。
The image information developed in the image memory of the storage unit of the arithmetic processing means 2 is further transmitted to the decoder 4.
The image information transmitted to the decoder 4 is temporarily stored in an image memory of a storage unit of the decoder 4. The steps up to the steps described above are the same as those shown in FIG.
The process is the same as the process up to the step shown in (a), but in the second embodiment of the invention, the following steps are different from the steps shown in the first embodiment of the invention.

【0054】即ち、デコーダ4は、図10(b)に示す
ステップにおいて、その記憶部に一時記憶された画像情
報IPから、2次元コードcpを含むであろう領域Ra
の切り出しを行うようにされている。この画像情報切出
ステップについて、図12を用いて更に詳しく説明す
る。まず、固体撮像手段3により撮像され、デコーダ4
の画像メモリに展開された画像情報を、固体撮像手段3
の行列に配列された光電変換素子単位で、行単位毎に、
黒画素数を合計する。
That is, in the step shown in FIG. 10B, the decoder 4 uses the image information IP temporarily stored in the storage unit to store the area Ra that will contain the two-dimensional code cp.
Is to be cut out. This image information extracting step will be described in more detail with reference to FIG. First, an image is taken by the solid-state imaging means 3 and the
The image information developed in the image memory of
For each photoelectric conversion element arranged in a matrix of
Sum the number of black pixels.

【0055】次に、黒画素数が所定の数以上含まれる行
の最初の行nysと、最後の行nyeとの算術平均
((nys+nye)/2)から、黒画素情報を所定数
以上含む領域の中心線となる行nycを決定する。ま
た、黒画素数が所定の数以上含まれる行の最初の列nx
sと、最後の列nxeとの算術平均((nxs+nx
e)/2)から、黒画素情報を所定数以上含む領域の中
心線となる列nxcを決定する。
Next, based on the arithmetic mean ((nys + nye) / 2) of the first row nys and the last row nye of the row containing the black pixel number of a predetermined number or more, the area containing the predetermined number of black pixel information is obtained. Is determined. Also, the first column nx of a row in which the number of black pixels is equal to or more than a predetermined number
s and the arithmetic mean of the last column nxe ((nxs + nx
e) / 2), a column nxc which is a center line of an area including a predetermined number or more of black pixel information is determined.

【0056】次に、中心線となる行nycと、中心線と
なる列nxcの交点cg1を求める。次に、交点cg1
を中心にして、予め設定された2次元コードの領域を切
り出す手段として、図13に示すような、電気的な手段
で構成された、2次元コードの領域よりやや大きい領域
を切り出す画像切り出し手段10を、その重心cg2
が、交点cg1に一致するように重ね合わせ、画像切り
出し手段10により、2次元コードcpを含むであろう
領域Raの切り出しを行う(図14を参照)。
Next, an intersection cg1 of the row nyc serving as the center line and the column nxc serving as the center line is obtained. Next, the intersection cg1
As a means for cutting out a predetermined two-dimensional code area centered on the image, an image cut-out means 10 for cutting out an area slightly larger than the two-dimensional code area formed by electrical means as shown in FIG. Is the center of gravity cg2
Are superimposed so as to coincide with the intersection cg1, and the image cutout unit 10 cuts out a region Ra that will contain the two-dimensional code cp (see FIG. 14).

【0057】次に、図15に示すような、2次元コード
cpを含むであろう領域Raを解析するのに十分な大き
さを有する、電気的に作成された、複数のセルが行列に
配置された、リファレンスライン判別スケール手段8A
を、切り出された、2次元コードcpを含むであろう領
域Raに、領域Raの中心cg1に、リファレンスライ
ン判別スケール手段8Aの中心cg3が一致するように
重ね合わせる(図16を参照)。
Next, as shown in FIG. 15, a plurality of electrically created cells arranged in a matrix having a size large enough to analyze a region Ra that will contain the two-dimensional code cp are arranged. Reference line discrimination scale means 8A
Is superimposed on the cut-out region Ra that will contain the two-dimensional code cp such that the center cg3 of the reference line discrimination scale means 8A coincides with the center cg1 of the region Ra (see FIG. 16).

【0058】この例でも、リファレンスライン判別スケ
ール手段8Aの行列に配置された複数のセルce、・・
・、ceの解像度は、固体撮像手段3の解像度より粗い
ものを用いている。より特定的に説明すると、この例で
も、固体撮像手段3が撮像した、X軸リファレンスライ
ンLxを、概ね、2行程度で、また、Y軸リファレンス
ラインLyを、概ね、2列程度で、また、情報を示す黒
画素(高電位の領域)を4個のセルで判定するようにな
っている。
Also in this example, a plurality of cells ce,... Arranged in a matrix of the reference line determination scale means 8A.
The resolution of ce is lower than that of the solid-state imaging means 3. More specifically, also in this example, the X-axis reference line Lx captured by the solid-state imaging unit 3 is approximately two rows, and the Y-axis reference line Ly is approximately two columns. , A black pixel (high-potential region) indicating information is determined by four cells.

【0059】尚、リファレンスライン判別スケール手段
8Aの解像度は、固体撮像手段3が撮像した2次元コー
ドの大きさに基づいて、適宜、選択される。次いで、デ
コーダ4は、図11(a)に示すステップにおいて、リ
ファレンスライン判別スケール手段8Aを、リファレン
スライン判別スケール手段8Aの行列に配置されたセル
ce、・・・、ceにより形成されるラインに、予め定
められた所定のセル数が連続して黒セルとして現れるま
で回転させる。
The resolution of the reference line discrimination scale means 8A is appropriately selected based on the size of the two-dimensional code imaged by the solid-state imaging means 3. Then, in the step shown in FIG. 11A, the decoder 4 converts the reference line discrimination scale means 8A into a line formed by the cells ce,..., Ce arranged in the matrix of the reference line discrimination scale means 8A. , Until a predetermined number of predetermined cells continuously appear as black cells.

【0060】この例でも、リファレンスライン判別スケ
ール手段8Aのセルce、・・・、ceにより形成され
る1ラインの約28個のセルで、X軸リファレンスライ
ンLxが特定できるようにしているので、リファレンス
ライン判別スケール手段8Aのセルce単位で、約28
個の黒セルが1ライン上に並ぶまで、リファレンスライ
ン判別スケール手段8Aを回転させる。
Also in this example, the X-axis reference line Lx can be specified by about 28 cells in one line formed by the cells ce,..., Ce of the reference line discrimination scale means 8A. About 28 units per cell ce of the reference line determination scale means 8A.
The reference line discrimination scale means 8A is rotated until the black cells are aligned on one line.

【0061】尚、図17は、リファレンスライン判別ス
ケール手段8Aのセルce単位で、約28個の黒セルが
1ライン上に並んだ状態を模式的に示している。尚、こ
の例でも、リファレンスライン判別スケール手段8Aの
セルce単位で、約28個の黒セルが1ライン上に並ん
だ状態で、リファレンスライン判別スケール手段8Aの
回転動作を停止するようにした例を示しているが、リフ
ァレンスライン判別スケール手段8Aの回転動作を停止
する判断となる、リファレンスライン判別スケール手段
8Aのセルce単位で、1ライン中に黒セルが並ぶ所定
数のセル数は、固体撮像手段3が撮像した2次元コード
の大きさに基づいて、適宜、選択される。
FIG. 17 schematically shows a state in which about 28 black cells are arranged on one line for each cell ce of the reference line determination scale means 8A. In this example, the rotation operation of the reference line determination scale means 8A is stopped in a state where about 28 black cells are arranged on one line in units of cell ce of the reference line determination scale means 8A. However, the predetermined number of cells in which black cells are arranged in one line per cell ce of the reference line determination scale means 8A, which is a determination to stop the rotation operation of the reference line determination scale means 8A, is solid. The selection is appropriately made based on the size of the two-dimensional code captured by the imaging unit 3.

【0062】デコーダ4は、リファレンスライン判別ス
ケール手段8Aのセルce単位で、所定数の黒セルが1
ライン上に並ぶと、リファレンスライン判別スケール手
段8Aの回転を停止し、リファレンスライン判別スケー
ル手段8Aのセルce単位で、所定数の黒セルが1ライ
ン上に並んだラインnyを、X軸リファレンスラインL
xと推定する。
The decoder 4 has a predetermined number of black cells of 1 per cell ce of the reference line discrimination scale means 8A.
When aligned on the line, the rotation of the reference line discrimination scale means 8A is stopped, and a line ny in which a predetermined number of black cells are arranged on one line per cell ce of the reference line discrimination scale means 8A is converted to an X-axis reference line. L
x.

【0063】次に、デコーダ4は、このようにしてX軸
リファレンスラインLxを推定した後、図11(b)に
示すステップにおいて、推定したX軸リファレンスライ
ンLxに対して、所定の角度を有する線を複数重ね合わ
せる操作をし、所定の角度を有する線に沿って所定数の
黒セルが連続して現れる線をY軸リファレンスラインL
yと特定する。
Next, after estimating the X-axis reference line Lx in this way, in the step shown in FIG. 11B, the decoder 4 has a predetermined angle with respect to the estimated X-axis reference line Lx. An operation of superposing a plurality of lines is performed, and a line in which a predetermined number of black cells continuously appear along a line having a predetermined angle is referred to as a Y-axis reference line L.
Specify y.

【0064】そして、デコーダ4の記憶部の画像メモリ
に一時記憶した画像情報の、推定したX軸リファレンス
ラインLxと、特定したY軸リファレンスラインLyと
の交点を原点として、推定したX軸リファレンスライン
Lxと、特定したY軸リファレンスラインLyとのなす
角度θが、tanθ=∞の関係になるように補正する。
Then, the estimated X-axis reference line Lx of the image information temporarily stored in the image memory of the storage unit of the decoder 4 is set at the intersection between the estimated X-axis reference line Lx and the specified Y-axis reference line Ly. The angle θ between Lx and the specified Y-axis reference line Ly is corrected such that tan θ = ∞.

【0065】次に、デコーダ4は、推定したX軸リファ
レンスラインLx(この例では、ラインny)を中心に
して上下に各々数行について、行単位で、黒セルの数を
合計する。ここでも、説明を容易とするため、ラインn
yを中心にして上下に各々4行について、行単位で、黒
セルの数を合計した例について説明する。
Next, the decoder 4 sums the number of black cells for each of several rows above and below the estimated X-axis reference line Lx (line ny in this example) in units of rows. Again, for ease of explanation, line n
An example in which the number of black cells is summed for each of four rows above and below y with respect to y will be described.

【0066】この例でも、図18に示すように、ny行
目には黒セルが合計で28個あり、ny−1行目には黒
セルが合計で1個あり、ny−2行目には黒セルが合計
で1個あり、ny−3行目には黒セルが合計で0個あ
り、また、ny−4行目には黒セルが合計で0個になっ
ている。また、ny+1行目には、黒セルが合計で28
個(X軸リファレンスラインLxのセル数に相当する)
あり、ny+2行目には黒セルが合計で14個(Y軸リ
ファレンスラインLyのセル数とタイミングマークTx
のセル数との合計に相当する)あり、ny+3行目には
黒セルが合計で14個(Y軸リファレンスラインLyの
セル数とタイミングマークTxのセル数との合計に相当
する)あり、また、ny+4行目には黒セルが14個
(Y軸リファレンスラインLyのセル数と情報を示すの
セル数との合計に相当する)ある例を示している。
Also in this example, as shown in FIG. 18, there are a total of 28 black cells in the ny-th row, one black cell in the ny-l row, and a ny-2 row. Has a total of one black cell, a total of 0 black cells in the ny-3th row, and a total of 0 black cells in the ny-4th row. In the ny + 1th row, the total number of black cells is 28.
(Corresponding to the number of cells of the X-axis reference line Lx)
In the ny + 2th row, a total of 14 black cells (the number of cells of the Y-axis reference line Ly and the timing mark Tx
And the ny + 3 line has a total of 14 black cells (corresponding to the sum of the number of cells of the Y-axis reference line Ly and the number of cells of the timing mark Tx). , Ny + 4th row shows an example in which there are 14 black cells (corresponding to the sum of the number of cells of the Y-axis reference line Ly and the number of cells indicating information).

【0067】ここで、2次元コードcpは、X軸リファ
レンスラインLx、Y軸リファレンスラインLy、タイ
ミングマークTx、・・・、Tx、タイミングマークT
y、・・・、Ty、情報となる黒画素、並びに、補助マ
ークMcを有するので、X軸リファレンスラインLxと
Y軸リファレンスラインLyとにより挟まれ、且つ、補
助マークMcが設けられた側の領域には、必ず、所定数
以上の黒セルが存在する。
Here, the two-dimensional code cp is composed of an X-axis reference line Lx, a Y-axis reference line Ly, timing marks Tx,.
, Ty, black pixels serving as information, and auxiliary marks Mc, are sandwiched between the X-axis reference line Lx and the Y-axis reference line Ly, and on the side where the auxiliary marks Mc are provided. There is always a predetermined number or more of black cells in the area.

【0068】したがって、コードcpの領域内を通過す
る行毎に、最低存在する黒セル数を閾値Ythとすれ
ば、X軸リファレンスラインLxであると推定された推
定リファレンスラインnyを中心にして、その周辺の一
方側の所定数のラインと他方側の所定数のラインの各々
について走査して、一方側の複数ラインと他方側の複数
ラインの各々について黒セル数を、リファレンスライン
判別スケール手段に設けられたセル単位で合計し、推定
リファレンスラインnyの周辺の一方側の所定数のライ
ン及び推定リファレンスラインnyの周辺の他方側の所
定数のラインのいずれか一方側に、黒セル数が所定数以
上(黒セル数/行≧閾値Yth)存在し、他方側に、黒
セル数が所定数未満(黒セル数/行<閾値Yth)が存
在する場合には、推定リファレンスラインnyをX軸リ
ファレンスラインLxと決定することができる。
Therefore, if the minimum number of black cells existing for each row passing through the area of the code cp is set as the threshold value Yth, the estimated reference line ny estimated to be the X-axis reference line Lx is set at the center. A predetermined number of lines on one side of the periphery and a predetermined number of lines on the other side are scanned, and the number of black cells for each of the plurality of lines on one side and the plurality of lines on the other side is sent to the reference line determination scale means. The total number of black cells is determined in one of a predetermined number of lines on one side around the estimated reference line ny and a predetermined number of lines on the other side around the estimated reference line ny. If the number of black cells is equal to or greater than (the number of black cells / row ≧ threshold Yth) and the number of black cells is less than the predetermined number (the number of black cells / row <threshold Yth) on the other side, the estimation is performed. The reference line ny may determine the X-axis reference line Lx.

【0069】このことを理解容易のために、図18に示
す例に基づいて具体的に説明する。図18に示す例で
も、Y軸リファレンスラインLyを2列で識別している
ので、2次元コードcpの領域内には、必ず、2セル以
上の黒セルが存在する。したがって、コードcpの領域
内を通過する行毎に、最低存在する黒セル数の閾値Yt
hを2(Yth=2)とすれば、X軸リファレンスライ
ンLxであると推定された推定リファレンスラインny
を中心にして、その周辺の他方側の所定数のライン(こ
の例では、ny−1行、ny−2行、ny−3行及びn
y−4行)と一方側の所定数のライン(この例では、n
y+1行、ny+2行、ny+3行及びny+4行)の
各々について走査すると、この例では、他方側の複数ラ
イン(ny−1行、ny−2行、ny−3行及びny−
4行)の各々のラインの黒セル数が、いずれも、閾値Y
th未満(この例では、Yth<2)となっている。
For easy understanding, this will be specifically described based on an example shown in FIG. Also in the example shown in FIG. 18, since the Y-axis reference line Ly is identified by two columns, two or more black cells always exist in the area of the two-dimensional code cp. Therefore, for each row passing through the area of the code cp, the threshold value Yt
If h is 2 (Yth = 2), the estimated reference line ny estimated to be the X-axis reference line Lx
, And a predetermined number of lines on the other side (in this example, ny-1 row, ny-2 row, ny-3 row, and n
y-4 rows) and a predetermined number of lines on one side (in this example, n
When scanning is performed for each of the y + 1 row, the ny + 2 row, the ny + 3 row, and the ny + 4 row, in this example, a plurality of lines (ny-1, row ny-2, ny-3, and ny−) on the other side are obtained.
4), the number of black cells in each line is equal to the threshold Y
less than th (in this example, Yth <2).

【0070】且つ、一方側の複数のライン(ny+1
行、ny+2行、ny+3行及びny+4行)の各々に
ついて走査すると、一方側の複数ライン(ny+1行、
ny+2行、ny+3行及びny+4行)の各々のライ
ンの黒セル数が、いずれも、閾値Yth以上(この例で
は、黒セル/行≧2)となっているので、X軸リファレ
ンスラインLxであると推定された推定リファレンスラ
インnyを、X軸リファレンスラインLxであると決定
することができる。
Further, a plurality of lines (ny + 1) on one side
Row, ny + 2 row, ny + 3 row, and ny + 4 row), a plurality of lines (ny + 1 row,
Since the number of black cells in each of the ny + 2 rows, the ny + 3 rows, and the ny + 4 rows) is equal to or greater than the threshold Yth (in this example, black cells / row ≧ 2), the number of black cells is the X-axis reference line Lx. Can be determined as the X-axis reference line Lx.

【0071】次に、デコーダ4は、図11(c)に示す
ステップにおいて、黒セル数が所定数未満存在する他方
側(この例では、ny−1行及びny−2行の各々に存
在する黒セルcb、cbの各々)を汚れと判断し、図1
1(d)に示すステップにおいて、汚れと判断した黒セ
ルcb、cbの各々を白セルに変換する、デコーダ4の
画像メモリに展開された画像情報を修正する画像情報修
正ステップを経てから、この画像情報修正ステップによ
り修正された画像情報に基づいて、X軸リファレンスラ
インLxとY軸リファレンスラインLyとにより挟まれ
る領域に記録された2次元コード情報を、例えば、JI
Sコードに解読する。
Next, in the step shown in FIG. 11 (c), the decoder 4 has the other side where the number of black cells is less than the predetermined number (in this example, it exists on each of the ny-1 and ny-2 rows). Each of the black cells cb and cb) is determined to be dirty, and FIG.
In the step shown in FIG. 1 (d), each of the black cells cb, cb determined to be dirty is converted into a white cell, and an image information correcting step of correcting image information developed in the image memory of the decoder 4 is performed. Based on the image information corrected in the image information correction step, the two-dimensional code information recorded in the area sandwiched between the X-axis reference line Lx and the Y-axis reference line Ly is, for example, JI
Decode to S code.

【0072】以上のようにして、デコーダ4により、2
次元コード情報から解読された情報は、演算処理手段2
に送られ、演算処理手段2は、演算処理手段2の記憶部
に予め格納された運転プログラムにより、2次元コード
情報から解読された情報に基づいて、容器V、・・・、
Vの仕分けを行う。この2次元コードの読取方法では、
図9と図18との対比より明らかなように、リファレン
スライン推定ステップの前処理ステップとして、固体撮
像手段3が撮像した画像情報から、2次元コードcpを
含むであろうと推定される領域Raを切り出して、この
切り出された少ない情報から、リファレンスライン推定
ステップと、画像情報修正ステップと、解読ステップと
により、2次元コードcpを読み取るようにしているの
で、解読に使用するデータ量を小さくした分だけ、高速
に、2次元コードcpを解読できる。
As described above, the decoder 4 outputs 2
The information decoded from the dimensional code information is sent to the arithmetic processing means 2
, And based on information decoded from the two-dimensional code information by the operation program stored in advance in the storage unit of the arithmetic processing means 2, the containers V,.
V is sorted. In this two-dimensional code reading method,
As is clear from the comparison between FIG. 9 and FIG. 18, as a pre-processing step of the reference line estimation step, an area Ra estimated to contain the two-dimensional code cp from image information captured by the solid-state imaging unit 3 is obtained. The two-dimensional code cp is read out from the cut out small information by a reference line estimation step, an image information correction step, and a decoding step, so that the amount of data used for decoding is reduced. Therefore, the two-dimensional code cp can be decoded at high speed.

【0073】また、画像情報切出ステップにおいて、2
次元コードcpドを含むであろうと推定される領域Ra
を、デコーダ4の記憶部の画像メモリに展開された画像
情報を、固体撮像手段3の行列に配列された光電変換素
子単位で、行単位毎に、黒画素数を合計し、黒画素数が
所定の数以上含まれる行の最初の行nysと、最後の行
nyeとから、黒画素情報を所定数以上含む領域の中心
線となる行nycを決定し、且つ、デコーダ4の記憶部
の画像メモリに展開された画像情報を、固体撮像手段3
の行列に配列された光電変換素子単位で、列単位毎に、
黒画素数を合計し、黒画素数が所定の数以上含まれる列
の最初の列nxsと、最後の列nxeとから、黒画素情
報を所定数以上含む領域の中心線となる列nxcを決定
し、中心線となる行nycと、中心線となる列nxcの
交点cg1を中心にして、画像メモリに展開されている
画像情報から、予め読み取るべき2次元コードcpの領
域よりやや大きい領域Raを切り出すようにしているの
で、切り出された領域Ra内に、2次元コードcpが高
い確率で含まれる。これにより、切り出された領域Ra
内に、2次元コードcpが含まれていなかったり、ま
た、その一部のみが含まれているといったような不都合
が生じ難い。
In the image information extracting step, 2
Region Ra estimated to contain dimensional code cp
Is obtained by summing the number of black pixels for each row of the image information developed in the image memory of the storage unit of the decoder 4 for each photoelectric conversion element arranged in a matrix of the solid-state imaging means 3. From the first row nys and the last row nye of the rows including the predetermined number or more, a row nyc which is the center line of the area including the predetermined number or more of the black pixel information is determined, and The image information developed in the memory is transferred to the solid-state imaging unit 3.
For each photoelectric conversion element arranged in a matrix of
The number of black pixels is totaled, and a column nxc which is a center line of a region including a predetermined number or more of black pixel information is determined from a first column nxs and a last column nxe of columns including a predetermined number or more of black pixels. An area Ra slightly larger than the area of the two-dimensional code cp to be read in advance is determined from the image information developed in the image memory around the intersection cg1 of the row nyc serving as the center line and the column nxc serving as the center line. Since the clipping is performed, the two-dimensional code cp is included in the clipped region Ra with a high probability. Thereby, the cut-out region Ra
Inconveniences such as not including the two-dimensional code cp or only a part thereof are unlikely to occur.

【0074】以上の説明では、白地に黒色の2次元コー
ドが設けられている例に付いて説明したが、黒地に白色
の2次元コードが設けられている場合には、黒セル、黒
画素の関係を白セル、白画素の関係に白黒反転させるこ
とで、2次元コードの近傍に汚れが付いていた場合に
も、その読み取りが可能になる。
In the above description, an example in which a black two-dimensional code is provided on a white background has been described. However, when a white two-dimensional code is provided on a black background, black cells and black pixels are provided. By inverting the relationship between the white cell and the white pixel in black and white, even if there is a stain near the two-dimensional code, it becomes possible to read it.

【0075】[0075]

【発明の効果】以上、詳細に説明したように、請求項1
に記載の2次元コードの読取方法では、例えば、白地に
黒色で2次元コードが表されている場合には、リファレ
ンスライン推定ステップにより、リファレンスラインを
推定し、更に、このステップにより推定された推定リフ
ァレンスラインを中心にして、その一方側の所定数のラ
インとその他方側の所定数のラインの各々について走査
し、そのようにして走査した、一方側の所定数のライン
と他方側の所定数のラインの各々について黒セル数を、
リファレンスライン判別手段に設けられたセル単位で合
計し、推定リファレンスラインのいずれか一方側の所定
数のラインに、黒セル数が所定数以上存在し、他方側の
所定数のラインに、黒セル数が所定数以上存在しない場
合に、推定リファレンスラインをX軸リファレンスライ
ン又はY軸リファレンスラインと決定するリファレンス
ライン決定ステップを設けている。
As described in detail above, claim 1 is as follows.
According to the two-dimensional code reading method described in the above, for example, when a two-dimensional code is represented in black on a white background, a reference line is estimated in a reference line estimation step, and further the estimation estimated in this step is performed. Each of a predetermined number of lines on one side and a predetermined number of lines on the other side is scanned with the reference line as a center, and the predetermined number of lines on one side and the predetermined number on the other side are scanned as described above. The number of black cells for each of the lines
A predetermined number of lines on one side of the estimated reference line are equal to or more than a predetermined number, and the black cells are included in a predetermined number of lines on the other side. A reference line determining step is provided for determining the estimated reference line as the X-axis reference line or the Y-axis reference line when the number does not exceed the predetermined number.

【0076】これにより、たとえ、X軸リファレンスラ
インの、タイミングマークが設けられる側の反対側に沿
って設けられる全白ラインの領域に汚れが重なるように
付着しても、X軸リファレンスラインを特定することが
できる。また、同様に、たとえ、Y軸リファレンスライ
ンの、タイミングマークが設けられる側の反対側に沿っ
て設けられる全白ラインの領域に汚れが重なるように付
着しても、Y軸リファレンスラインを特定することがで
きる。
Thus, even if the stain adheres to the area of the all white line provided along the opposite side of the X-axis reference line from the side where the timing mark is provided, the X-axis reference line is specified. can do. Similarly, the Y-axis reference line is specified even if the stain adheres to the area of the all white line provided along the side opposite to the side on which the timing mark is provided of the Y-axis reference line. be able to.

【0077】これにより、読取対象となる2次元コード
の近傍に汚れが存在していても、2次元コードの読取エ
ラーが生じない。これとは逆に、黒地に白色で2次元コ
ードが表されている場合には、リファレンスライン推定
ステップにより、リファレンスラインを推定し、更に、
このステップにより推定された推定リファレンスライン
を中心にして、その一方側の所定数のラインとその他方
側の所定数のラインの各々について走査し、そのように
して走査した、一方側の所定数のラインと他方側の所定
数のラインの各々について白セル数を、リファレンスラ
イン判別手段に設けられたセル単位で合計し、推定リフ
ァレンスラインのいずれか一方側の所定数のラインに、
白セル数が所定数以上存在し、他方側の所定数のライン
に、白セル数が所定数以上存在しない場合に、推定リフ
ァレンスラインをX軸リファレンスライン又はY軸リフ
ァレンスラインと決定するリファレンスライン決定ステ
ップを設けている。
Thus, even if dirt exists near the two-dimensional code to be read, no two-dimensional code reading error occurs. Conversely, when a two-dimensional code is represented in white on a black background, a reference line is estimated in a reference line estimation step.
With the estimated reference line estimated in this step as a center, each of a predetermined number of lines on one side and a predetermined number of lines on the other side is scanned, and a predetermined number of lines on one side are scanned as described above. For each of the line and the predetermined number of lines on the other side, the number of white cells is totaled for each cell provided in the reference line determination means, and a predetermined number of lines on either side of the estimated reference line is calculated.
A reference line determination for determining an estimated reference line as an X-axis reference line or a Y-axis reference line when the number of white cells is equal to or more than a predetermined number and the number of white cells is not equal to or more than the predetermined number of lines on the other side. Steps are provided.

【0078】これにより、たとえ、X軸リファレンスラ
インの、タイミングマークが設けられる側の反対側に沿
って設けられる全黒ラインの領域に汚れが重なるように
付着しても、X軸リファレンスラインを特定することが
できる。また、同様に、たとえ、Y軸リファレンスライ
ンの、タイミングマークが設けられる側の反対側に沿っ
て設けられる全黒ラインの領域に汚れが重なるように付
着しても、Y軸リファレンスラインを特定することがで
きる。
Thus, even if dirt adheres to the area of the black line provided along the opposite side of the X-axis reference line on which the timing mark is provided, the X-axis reference line is specified. can do. Similarly, the Y-axis reference line is specified even if the stain adheres to the area of the all black line provided along the side opposite to the side where the timing mark is provided on the Y-axis reference line. be able to.

【0079】これにより、読取対象となる2次元コード
の近傍に汚れが存在していても、2次元コードの読取エ
ラーが生じない。請求項2に記載の2次元コードの読取
方法では、請求項1に記載の2次元コードの読取方法と
同様の方法により、X軸リフェレンスライン又はY軸リ
フェレンスラインを特定しているので、請求項1に記載
の2次元コードの読取方法と同様、白地に黒色で2次元
コードが表されている場合に、たとえ、X軸リフェレン
スラインのタイミングマークが設けられる側と反対側
の、本来、全白ラインとなっていなければいけない領域
に、汚れ等が原因した、黒画素情報が含まれていても、
2次元コードの読み取りができ、同様に、Y軸リフェレ
ンスラインのタイミングマークが設けられる側と反対側
の、本来、全白ラインとなっていなければいけない領域
に、汚れ等が原因した、黒画素情報が含まれていても、
2次元コードの読み取りができる。
Thus, even if dirt exists near the two-dimensional code to be read, no two-dimensional code reading error occurs. In the two-dimensional code reading method according to the second aspect, the X-axis reference line or the Y-axis reference line is specified by the same method as the two-dimensional code reading method according to the first aspect. Similar to the method of reading a two-dimensional code according to claim 1, when the two-dimensional code is represented in black on a white background, the two-dimensional code is normally located on the side opposite to the side where the timing mark of the X-axis reference line is provided. , Even if the area that must be an all-white line contains black pixel information due to dirt or the like,
A two-dimensional code can be read, and similarly, a black pixel caused by dirt or the like is located in an area on the opposite side to the side where the timing mark of the Y-axis reference line is provided, which should be an all white line. Even if the information is included,
Two-dimensional codes can be read.

【0080】また、黒地に白色で2次元コードが表され
ている場合に、たとえ、X軸リフェレンスラインのタイ
ミングマークが設けられる側と反対側の、本来、全黒ラ
インとなっていなければいけない領域に、汚れ等が原因
した、白画素情報が含まれていても、2次元コードの読
み取りができ、同様に、Y軸リフェレンスラインのタイ
ミングマークが設けられる側と反対側の、本来、全黒ラ
インとなっていなければいけない領域に、汚れ等が原因
した、白画素情報が含まれていても、2次元コードの読
み取りができる。
When a two-dimensional code is represented in white on a black background, it must be an all black line on the opposite side of the X-axis reference line on which the timing mark is provided, for example. Even if the area includes white pixel information due to dirt or the like, the two-dimensional code can be read, and similarly, the entire area on the side opposite to the side on which the timing mark of the Y-axis reference line is provided, The two-dimensional code can be read even if the area that must be a black line contains white pixel information due to dirt or the like.

【0081】更に、この2次元コードの読取方法では、
リファレンスライン推定ステップの前処理ステップとし
て、固体撮像手段が撮像した画像情報から、2次元コー
ドを含むであろうと推定される領域を切り出し、この切
り出された少ない情報から、2次元コードを読み取るよ
うにしているので、解読に使用するデータ量を小さくし
た分だけ、2次元コードの解読を高速に行える。
Further, in this two-dimensional code reading method,
As a preprocessing step of the reference line estimation step, a region estimated to contain a two-dimensional code is cut out from image information taken by the solid-state imaging means, and a two-dimensional code is read from this cut-out little information. Therefore, the two-dimensional code can be decoded at high speed by the amount of data used for decoding is reduced.

【0082】また、画像情報切出ステップにおいて、2
次元コードを含むであろうと推定される領域を、画像メ
モリに展開された画像情報を固体撮像手段の行列に配列
された光電変換素子単位で、行単位毎に、黒画素数又は
白画素数を合計し、黒画素数又は白画素数が所定の数以
上含まれる行の最初の行と、最後の行とから、黒画素情
報又は白画素情報を所定数以上含む領域の中心線となる
行を決定し、画像メモリに展開された画像情報を固体撮
像手段の行列に配列された光電変換素子単位で、列単位
毎に、黒画素数又は白画素数を合計し、黒画素数又は白
画素数が所定の数以上含まれる列の最初の列と、最後の
列とから、黒画素情報又は白画素情報を所定数以上含む
領域の中心線となる列を決定し、中心線となる行と、中
心線となる列の交点を中心にして、画像メモリに展開さ
れている画像情報から、予め読み取るべき2次元コード
の領域よりやや大きい領域を切り出すようにしている。
In the image information extracting step, 2
The area estimated to contain the dimensional code is obtained by converting the image information expanded in the image memory into photoelectric conversion elements arranged in a matrix of the solid-state imaging means, and for each row, the number of black pixels or white pixels. In total, the first row of the row in which the number of black pixels or white pixels is equal to or more than a predetermined number, and the last row, the row serving as the center line of the area including the predetermined number of black pixel information or white pixel information is determined. The image information expanded and stored in the image memory is determined for each photoelectric conversion element arranged in a matrix of solid-state imaging means, and for each column, the number of black pixels or white pixels is summed, and the number of black pixels or white pixels is calculated. The first column of the column that contains a predetermined number or more, and from the last column, determine the column that is the center line of the region that includes the predetermined number or more of black pixel information or white pixel information, and a row that becomes the center line, Image information developed in the image memory, centered on the intersection of the column serving as the center line Et al, so that cut out slightly larger area than the area of the two-dimensional code to be read in advance.

【0083】これにより、切り出された領域内に、2次
元コードが高い確率で含まれるため、切り出された領域
内に、2次元コードが含まれていなかったり、また、そ
の一部のみが含まれているといったような不都合が生じ
難い。
As a result, since the two-dimensional code is included in the cut-out area with a high probability, the two-dimensional code is not included in the cut-out area, or only a part thereof is included. It is unlikely that such inconveniences occur.

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

【図1】本発明に係る2次元コードの読取方法を実施す
る2次元コード読取装置を概略的に説明する全体構成図
である。
FIG. 1 is an overall configuration diagram schematically illustrating a two-dimensional code reader that implements a two-dimensional code reading method according to the present invention.

【図2】図1に示す2次元コード読取装置により、仕分
けされる容器の一つを拡大して概略的に示す斜視図であ
る。
FIG. 2 is an enlarged perspective view schematically showing one of containers sorted by the two-dimensional code reader shown in FIG. 1;

【図3】図1に示す2次元コード読取装置の演算処理手
段及びデコーダで行われる2次元コードの読取操作の一
例を模式的に示す処理手順図である。
FIG. 3 is a processing procedure diagram schematically illustrating an example of a two-dimensional code reading operation performed by an arithmetic processing unit and a decoder of the two-dimensional code reading device illustrated in FIG. 1;

【図4】図1に示す2次元コード読取装置の演算処理手
段及びデコーダで行われる2次元コードの読取操作の一
例を模式的に示す処理手順図である。
FIG. 4 is a processing procedure diagram schematically showing an example of a two-dimensional code reading operation performed by the arithmetic processing means and the decoder of the two-dimensional code reading device shown in FIG. 1;

【図5】固体撮像手段が撮像した画像情報を模式的に示
す図である。
FIG. 5 is a diagram schematically illustrating image information captured by a solid-state imaging unit.

【図6】本発明に係る2次元コード読取装置のデコーダ
で用いる、電気的に作成された、複数のセルが行列に配
置された、リファレンスライン判別スケール手段を模式
的に示す図である。
FIG. 6 is a diagram schematically showing reference line discrimination scale means, which is used in the decoder of the two-dimensional code reader according to the present invention and is electrically created, in which a plurality of cells are arranged in a matrix.

【図7】本発明に係る2次元コード読取装置で用いるデ
コーダの記憶部に一時記憶された画像情報に、電気的に
作成された、複数のセルが行列に配置された、リファレ
ンスライン判別スケール手段を重ね合わせた状態を模式
的に示す図である。
FIG. 7 is a reference line discrimination scale means in which a plurality of cells are arranged in a matrix and electrically created in image information temporarily stored in a storage unit of a decoder used in the two-dimensional code reader according to the present invention. It is a figure which shows typically the state which superimposed.

【図8】リファレンスライン判別スケール手段のセル単
位で、黒セルが1ライン上に並んだ状態を模式的に示す
図である。
FIG. 8 is a diagram schematically showing a state in which black cells are arranged on one line in cell units of the reference line discrimination scale means.

【図9】推定したリファレンスラインをX軸リファレン
スライン又はY軸リファレンスラインであると決定する
ステップを模式的に説明する説明図である。
FIG. 9 is an explanatory diagram schematically illustrating a step of determining an estimated reference line as an X-axis reference line or a Y-axis reference line.

【図10】図1に示す2次元コード読取装置の演算処理
手段及びデコーダで行われる2次元コードの読取操作の
他の一例を模式的に示す処理手順図である。
FIG. 10 is a processing procedure diagram schematically showing another example of the two-dimensional code reading operation performed by the arithmetic processing means and the decoder of the two-dimensional code reading device shown in FIG. 1;

【図11】図1に示す2次元コード読取装置の演算処理
手段及びデコーダで行われる2次元コードの読取操作の
他の一例を模式的に示す処理手順図である。
11 is a processing procedure diagram schematically showing another example of the two-dimensional code reading operation performed by the arithmetic processing means and the decoder of the two-dimensional code reading device shown in FIG. 1;

【図12】画像情報切出ステップを模式的に説明する図
である。
FIG. 12 is a diagram schematically illustrating an image information extracting step.

【図13】電気的な手段で構成された、2次元コードの
領域よりやや大きい領域を切り出す画像切り出し手段を
模式的に説明する図である。
FIG. 13 is a diagram schematically illustrating an image clipping unit configured to cut out a region slightly larger than a region of a two-dimensional code, configured by an electrical unit.

【図14】画像切り出し手段により、2次元コードを含
むであろう領域の切り出しを行った状態を模式的に示す
図である。
FIG. 14 is a diagram schematically showing a state in which an area that will include a two-dimensional code is cut out by an image cutting unit.

【図15】2次元コードを含むであろう領域を解析する
のに十分な大きさを有する、電気的に作成された、複数
のセルが行列に配置された、リファレンスライン判別ス
ケール手段を模式的に示す図である。
FIG. 15 schematically illustrates an electrically created reference line discrimination scale means having a plurality of cells arranged in a matrix having a size sufficient to analyze a region that will contain a two-dimensional code. FIG.

【図16】2次元コードを含むであろう領域に、リファ
レンスライン判別スケール手段が重ね合わされた状態を
模式的に示す図である。
FIG. 16 is a diagram schematically illustrating a state in which a reference line discrimination scale unit is superimposed on an area that will include a two-dimensional code.

【図17】リファレンスライン判別スケール手段のセル
単位で、黒セルが1ライン上に並んだ状態を模式的に示
す図である。
FIG. 17 is a diagram schematically showing a state in which black cells are arranged on one line for each cell of the reference line determination scale means.

【図18】推定したリファレンスラインをX軸リファレ
ンスライン又はY軸リファレンスラインであると決定す
るステップを模式的に説明する説明図である。
FIG. 18 is an explanatory diagram schematically illustrating a step of determining an estimated reference line as an X-axis reference line or a Y-axis reference line.

【図19】2次元コードの1例として、マトリックス型
のコード(2次元マトリックスコード)の構成を概略的
に示す説明図である。
FIG. 19 is an explanatory diagram schematically showing a configuration of a matrix type code (two-dimensional matrix code) as an example of a two-dimensional code.

【図20】読取エラーとして処理される汚れが付着した
2次元コードの一例を模式的に示す説明図である。
FIG. 20 is an explanatory diagram schematically showing an example of a two-dimensional code to which dirt to be treated as a reading error is attached.

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

1 2次元コード読取装置 2 演算処理手段 3 固体撮像手段 4 デコーダ 6 搬送手段 7 容器検知手段 7a 赤外線発光素子 7b 赤外線受光素子 8、8A リファレンスライン判別スケール手段 9、9A 所定の角度を有する線を有するデータ cp 2次元コード Lx X軸リファレンスライン Ly Y軸リファレンスライン Mc 補助マーク Tx、Ty タイミングマーク cb 汚れによる黒セル Sp 汚れ DESCRIPTION OF SYMBOLS 1 2D code reader 2 Arithmetic processing means 3 Solid-state imaging means 4 Decoder 6 Transport means 7 Container detection means 7a Infrared light emitting element 7b Infrared light receiving element 8, 8A Reference line discrimination scale means 9, 9A It has a line which has a predetermined angle. Data cp Two-dimensional code Lx X-axis reference line Ly Y-axis reference line Mc Auxiliary mark Tx, Ty Timing mark cb Black cell due to dirt Sp Dirt

───────────────────────────────────────────────────── フロントページの続き (72)発明者 昼田 了 静岡県駿東郡長泉町竹原43−1 ダイヤパ レス竹原402号 (72)発明者 吉田 博一 大阪市吹田市千里山西4丁目36−32 (72)発明者 大倉 晋 大阪府守口市八雲東町2丁目82−21−107 Fターム(参考) 5B072 AA01 AA02 BB04 BB06 BB10 CC13 CC17 CC21 DD15 DD22 EE12  ──────────────────────────────────────────────────続 き Continued on the front page (72) Inventor Ryo Dayta 43-1 Takehara, Nagaizumi-cho, Sunto-gun, Shizuoka Prefecture 402 Diamond Palace Takehara 402 (72) Inventor Hirokazu Yoshida 4-36-32, Senriyamanishi, Suita-shi, Osaka-shi (72 ) Inventor Susumu Okura 2-82-21-107 Fuku term (reference) 2-chome Yakumo Higashicho, Moriguchi City, Osaka 5B072 AA01 AA02 BB04 BB06 BB10 CC13 CC17 CC21 DD15 DD22 EE12

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】X軸リファレンスラインとY軸リファレン
スラインとが、L字形状に設けられ、前記X軸リファレ
ンスラインと前記Y軸リファレンスラインとにより挟ま
れる領域に、所定の情報が、2次元コード化されて記録
された2次元コードの読取方法であって、 前記2次元コードを含む所定の領域を、固体撮像手段に
より撮像する撮像ステップと、 前記固体撮像手段により撮像した画像情報を、画像メモ
リに展開する展開ステップと、 前記画像メモリに展開された画像情報に、複数のセルが
行列に配置された、リファレンスライン判別スケール手
段を重ね合わせた後、これを回転させ、前記リファレン
スライン判別スケール手段のいずれかのラインに、予め
定められた所定のセル数が連続して黒セルとして現れた
時点で、リファレンスライン判別スケール手段の回転を
停止し、前記リファレンスライン判別スケール手段のい
ずれかのラインに現れた黒セル又は白セルが連続するラ
インをX軸リファレンスライン又はY軸リファレンスラ
インのいずれかであると推定するリファレンスライン推
定ステップと、 前記X軸リファレンスライン又はY軸リファレンスライ
ンのいずれかであると推定された推定リファレンスライ
ンを中心にして、その周辺の一方側の所定数のラインと
他方側の所定数のラインの各々について走査して、前記
一方側の複数ラインと他方側の複数ラインの各々につい
て黒セル数又は白セル数を、リファレンスライン判別ス
ケール手段に設けられたセル単位で合計し、前記推定リ
ファレンスラインの周辺の一方側の所定数のライン及び
前記推定リファレンスラインの周辺の他方側の所定数の
ラインのいずれか一方側に、黒セル数又は白セル数が所
定数以上存在し、他方側に、黒セル又は白セル数が所定
数以上存在しない場合に、前記推定リファレンスライン
をX軸リファレンスライン又はY軸リファレンスライン
と決定するリファレンスライン決定ステップとを備え
る、2次元コードの読取方法。
An X-axis reference line and a Y-axis reference line are provided in an L-shape, and predetermined information is stored in a region sandwiched between the X-axis reference line and the Y-axis reference line by a two-dimensional code. A method of reading a two-dimensional code recorded in an encrypted form, comprising: an image capturing step of capturing an image of a predetermined area including the two-dimensional code by a solid-state image capturing means; And a reference line discriminating scale means in which a plurality of cells are arranged in a matrix on the image information developed in the image memory. When a predetermined number of predetermined cells continuously appear as black cells on any of the lines, the reference The rotation of the in-determination scale means is stopped, and a line in which black cells or white cells appearing in any one of the lines of the reference line determination scale means are estimated to be either the X-axis reference line or the Y-axis reference line. A reference line estimating step, and a predetermined number of lines on one side and a predetermined number on the other side around the estimated reference line estimated to be either the X-axis reference line or the Y-axis reference line Scanning for each of the lines, the number of black cells or the number of white cells for each of the plurality of lines on the one side and the plurality of lines on the other side are summed for each cell provided in the reference line determination scale means, and the estimation is performed. A predetermined number of lines on one side around the reference line and the estimated reference line; If the number of black cells or white cells is greater than or equal to a predetermined number on one side of a predetermined number of lines on the other side around the other side, and the number of black or white cells is not greater than or equal to a predetermined number on the other side. A reference line determining step of determining the estimated reference line as an X-axis reference line or a Y-axis reference line.
【請求項2】X軸リファレンスラインとY軸リファレン
スラインとが、L字形状に設けられ、前記X軸リファレ
ンスラインと前記Y軸リファレンスラインとにより挟ま
れる領域に、所定の情報が、2次元コード化されて記録
された2次元コードの読取方法であって、 前記2次元コードを含む所定の領域を、複数の光電変換
素子が行列に配列された固体撮像手段により撮像する撮
像ステップと、 前記固体撮像手段により撮像した画像情報を、画像メモ
リに展開する展開ステップと、 前記画像メモリに展開された画像情報を固体撮像手段の
行列に配列された光電変換素子単位で、行単位毎に、黒
画素数又は白画素数を合計し、黒画素数又は白画素数が
所定の数以上含まれる行の最初の行と、最後の行とか
ら、黒画素情報を所定数以上含む領域の中心線となる行
を決定し、 前記画像メモリに展開された画像情報を固体撮像手段の
行列に配列された光電変換素子単位で、列単位毎に、黒
画素数又は白画素数を合計し、黒画素数又は白画素数が
所定の数以上含まれる列の最初の列と、最後の列とか
ら、黒画素情報又は白画素情報を所定数以上含む領域の
中心線となる列を決定し、 中心線となる行と、中心線となる列の交点を中心にし
て、前記画像メモリに展開されている画像情報から、予
め読み取るべき2次元コードの領域よりやや大きい領域
を切り出す画像情報切出ステップと、 前記画像情報切出ステップにより切り出された画像情報
に、複数のセルが行列に配置された、リファレンスライ
ン判別スケール手段を重ね合わせた後、これを回転さ
せ、前記リファレンスライン判別スケール手段のいずれ
かのラインに、予め定められた所定のセル数が連続して
黒セル又は白セルとして現れた時点で、リファレンスラ
イン判別スケール手段の回転を停止し、前記リファレン
スライン判別スケール手段のいずれかのラインに現れた
黒セル又は白セルが連続するラインをX軸リファレンス
ライン又はY軸リファレンスラインのいずれかであると
推定するリファレンスライン推定ステップと、 前記X軸リファレンスライン又はY軸リファレンスライ
ンのいずれかであると推定された推定リファレンスライ
ンを中心にして、その周辺の一方側の所定数のラインと
他方側の所定数のラインの各々について走査して、前記
一方側の複数ラインと他方側の複数ラインの各々につい
て黒セル数又は白セル数を、リファレンスライン判別ス
ケール手段に設けられたセル単位で合計し、前記推定リ
ファレンスラインの周辺の一方側の所定数のライン及び
前記推定リファレンスラインの周辺の他方側の所定数の
ラインのいずれか一方側に、黒セル数又は白セル数が所
定数以上存在し、他方側に、黒セル数又は白セル数が所
定数以上存在しない場合に、前記推定リファレンスライ
ンをX軸リファレンスライン又はY軸リファレンスライ
ンと決定するリファレンスライン決定ステップとを備え
る、2次元コードの読取方法。
2. An X-axis reference line and a Y-axis reference line are provided in an L-shape, and predetermined information is stored in a region sandwiched between the X-axis reference line and the Y-axis reference line by a two-dimensional code. A method for reading a two-dimensional code that has been converted and recorded, wherein: an imaging step of imaging a predetermined area including the two-dimensional code by solid-state imaging means in which a plurality of photoelectric conversion elements are arranged in a matrix; A developing step of developing image information captured by the image capturing means into an image memory; and a black pixel for each row unit for each photoelectric conversion element arranged in a matrix of the solid-state image capturing means for the image information developed for the image memory. The number of black pixels or the number of white pixels is summed, and from the first row and the last row of the row in which the number of black pixels or white pixels is equal to or more than a predetermined number, an area including a predetermined number or more of black pixel information is determined. Determine the row that will be the core wire, the image information developed in the image memory in photoelectric conversion element units arranged in a matrix of solid-state imaging means, for each column unit, the total number of black pixels or white pixels, From the first column and the last column of the column in which the number of black pixels or the number of white pixels are included in a predetermined number or more, determine a column to be the center line of an area including the predetermined number or more of black pixel information or white pixel information, An image information extracting step of extracting an area slightly larger than an area of a two-dimensional code to be read in advance from the image information developed in the image memory around an intersection of a row serving as a center line and a column serving as a center line. And, after superimposing reference line discrimination scale means in which a plurality of cells are arranged in a matrix on the image information cut out in the image information cutting step, rotate the reference line discrimination scale. At a point where a predetermined number of predetermined cells continuously appear as black cells or white cells on any of the lines of the row, the rotation of the reference line determination scale means is stopped, and any of the reference line determination scale means is stopped. A reference line estimating step of estimating that a line in which black cells or white cells appearing in the line are continuous is either the X-axis reference line or the Y-axis reference line; Scanning each of a predetermined number of lines on one side and a predetermined number of lines on the other side around the estimated reference line estimated to be any one of the plurality of lines on the one side and the other side The number of black cells or the number of white cells for each of the The number of black cells or the number of white cells are added to one of a predetermined number of lines on one side around the estimated reference line and a predetermined number of lines on the other side around the estimated reference line. A reference line determining step of determining the estimated reference line as an X-axis reference line or a Y-axis reference line when the number of cells is equal to or more than a predetermined number and the number of black cells or white cells is not equal to or more than the predetermined number on the other side; A method for reading a two-dimensional code, comprising:
JP10227326A 1998-08-11 1998-08-11 Reading method for two-dimensional code Withdrawn JP2000057250A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10227326A JP2000057250A (en) 1998-08-11 1998-08-11 Reading method for two-dimensional code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10227326A JP2000057250A (en) 1998-08-11 1998-08-11 Reading method for two-dimensional code

Publications (1)

Publication Number Publication Date
JP2000057250A true JP2000057250A (en) 2000-02-25

Family

ID=16859066

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10227326A Withdrawn JP2000057250A (en) 1998-08-11 1998-08-11 Reading method for two-dimensional code

Country Status (1)

Country Link
JP (1) JP2000057250A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008544336A (en) * 2005-04-13 2008-12-04 スキャンバイ,インク. Visual code system for camera-equipped mobile devices and its applications
US7636483B2 (en) 2003-12-05 2009-12-22 Fujitsu Limited Code type determining method and code boundary detecting method
US7946492B2 (en) 2004-04-20 2011-05-24 Michael Rohs Methods, media, and mobile devices for providing information associated with a visual code
JP2012053587A (en) * 2010-08-31 2012-03-15 Toshiba Tec Corp Information reader, program and sticker
US8150163B2 (en) 2006-04-12 2012-04-03 Scanbuy, Inc. System and method for recovering image detail from multiple image frames in real-time
CN114330404A (en) * 2021-12-28 2022-04-12 易唯思智能自动化装备无锡有限公司 Two-dimensional code engraving effect verification method, system and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7636483B2 (en) 2003-12-05 2009-12-22 Fujitsu Limited Code type determining method and code boundary detecting method
US7946492B2 (en) 2004-04-20 2011-05-24 Michael Rohs Methods, media, and mobile devices for providing information associated with a visual code
JP2008544336A (en) * 2005-04-13 2008-12-04 スキャンバイ,インク. Visual code system for camera-equipped mobile devices and its applications
JP4764920B2 (en) * 2005-04-13 2011-09-07 スキャンバイ,インク. Visual code system for camera-equipped mobile devices and its applications
US8150163B2 (en) 2006-04-12 2012-04-03 Scanbuy, Inc. System and method for recovering image detail from multiple image frames in real-time
JP2012053587A (en) * 2010-08-31 2012-03-15 Toshiba Tec Corp Information reader, program and sticker
CN114330404A (en) * 2021-12-28 2022-04-12 易唯思智能自动化装备无锡有限公司 Two-dimensional code engraving effect verification method, system and storage medium

Similar Documents

Publication Publication Date Title
CA2231450C (en) System and method for reading package information
CA2282764C (en) System and method for ocr assisted bar code decoding
US8794522B2 (en) Image capture apparatus and method
US6942151B2 (en) Optical reader having decoding and image capturing functionality
US5304787A (en) Locating 2-D bar codes
JP2021119465A (en) Enhanced matrix symbol error correction method
JP2000057250A (en) Reading method for two-dimensional code
JP2004504139A (en) A method for processing large mail pieces with a sorting device.
JP4874706B2 (en) QR code reader
JPH05233867A (en) Bar code reader
JP5329510B2 (en) Reading device, voting ticket refund device, voting ticket issuing device, and reading method
JP2001167225A (en) Bar code recognizing device using ccd camera
JPH11184965A (en) Slip identification register device
JP3412441B2 (en) Image processing device
US20170200383A1 (en) Automated review of forms through augmented reality
JP4403063B2 (en) Symbol information reading method and symbol information reading apparatus
JP2722434B2 (en) Optical character reader
JPH10154191A (en) Business form identification method and device, and medium recording business form identification program
JPH08329185A (en) Symbol information reader
JP2004013188A (en) Business form reading device, business form reading method and program therefor
JP3251089B2 (en) 2D symbol information reader
CN112560535A (en) Decoding output method for panoramic sequencing
JP2004280530A (en) System and method for processing form
JPS63251874A (en) Segmenting method for contact character
JPH07271902A (en) Optical character reader

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20051101