JP2514663B2 - Optical character reader - Google Patents

Optical character reader

Info

Publication number
JP2514663B2
JP2514663B2 JP62147340A JP14734087A JP2514663B2 JP 2514663 B2 JP2514663 B2 JP 2514663B2 JP 62147340 A JP62147340 A JP 62147340A JP 14734087 A JP14734087 A JP 14734087A JP 2514663 B2 JP2514663 B2 JP 2514663B2
Authority
JP
Japan
Prior art keywords
line
character
recognition
characters
optical character
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.)
Expired - Lifetime
Application number
JP62147340A
Other languages
Japanese (ja)
Other versions
JPS63311491A (en
Inventor
幹雄 山口
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.)
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Electric Industries 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 Sumitomo Electric Industries Ltd filed Critical Sumitomo Electric Industries Ltd
Priority to JP62147340A priority Critical patent/JP2514663B2/en
Publication of JPS63311491A publication Critical patent/JPS63311491A/en
Application granted granted Critical
Publication of JP2514663B2 publication Critical patent/JP2514663B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、手持ち式のスキャナで原稿上を走査するこ
とにより文字・記号等(以下代表して文字のみに関して
述べるが記号に関しても全く同様である)を読み取る光
学文字読取装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Industrial field of application] The present invention is designed to scan characters on a manuscript with a hand-held scanner (hereinafter, only characters will be described as a representative, but the same applies to symbols). A) optical character reader.

〔従来の技術〕[Conventional technology]

スーパーマーケットや百貨店等で、単品毎の売上げ情
報を収集して在庫管理を行うPOS(Point of Sales)シ
ステムが普及している。このPOSシステムでは手持ち式
の光学文字読取装置がよく使用されている。
POS (Point of Sales) systems, which collect sales information for individual items and manage inventory, have become widespread in supermarkets and department stores. Handheld optical character readers are often used in this POS system.

このような装置として、本出願人は特願昭62-11083号
や特願昭62-56293号を特許出願している。手持ち式の光
学文字読取装置の代表的な構成を第2図に示す。
As such a device, the present applicant has applied for a patent for Japanese Patent Application No. 62-11083 and Japanese Patent Application No. 62-56293. A typical structure of a handheld optical character reader is shown in FIG.

第2図において、1はスキャナであり、手2で、原稿
3に当てがうだけで原稿に記憶された文字を読み取るも
のである。原稿3はたとえば、POSシステムで用いる値
札の用紙である。4は光源であり、5はレンズ系、6は
イメージセンサであり、少なくとも用紙3に記載された
文字の一行分の視野が必要であり、第2図では横に一行
分、縦は一文字の3倍くらいとしている。7は制御・二
値化回路であり、イメージセンサ6の出力信号であるア
ナログ信号を文字領域及び背景領域のおのおの対応する
二値化信号に変換し、画面メモリ8に送る。
In FIG. 2, reference numeral 1 denotes a scanner, which is used to read characters stored in a manuscript simply by applying it to the manuscript 3. The manuscript 3 is, for example, a price tag sheet used in the POS system. Reference numeral 4 is a light source, 5 is a lens system, and 6 is an image sensor, which requires a field of view of at least one line written on the paper 3, and in FIG. I'm doubling it. Reference numeral 7 denotes a control / binarization circuit which converts an analog signal, which is an output signal of the image sensor 6, into a corresponding binarized signal for each of a character area and a background area, and sends it to the screen memory 8.

9から13は、画面メモリ8の中の各文字を認識し、そ
の文字の視野内の位置(x座標)を求める手段である。
9 to 13 are means for recognizing each character in the screen memory 8 and obtaining the position (x coordinate) of the character in the visual field.

画面メモリ8はイメージセンサ6の視野のほぼ全体の
二値化データを格納する。第3図(a)にイメージセン
サ6の二値化データの説明を示している。横(X)×縦
(Y)の大きさがp×q画素のイメージセンサであり、
視野のなかの文字を写し込んでいる。
The screen memory 8 stores binarized data of almost the entire visual field of the image sensor 6. FIG. 3A shows an explanation of the binarized data of the image sensor 6. An image sensor having a size of horizontal (X) × vertical (Y) of p × q pixels,
The characters in the field of view are captured.

文字、記号は文字識別回路13で認識されるが、文字識
別回路13は1文字ずつ認識するものであるので、画面メ
モリ8からは1文字分のデータを取り出す必要がある。
一桁切り出し回路9は画面メモリ8から一文字切り出し
回路11の処理能力であるm×q画素相当分のデータを取
り出し一桁メモリ10に格納する。一文字切り出し回路11
は一桁メモリから文字識別回路13の処理能力であるm×
n画素相当分のデータを取り出し、一文字メモリ12に格
納するものである。
Characters and symbols are recognized by the character identifying circuit 13, but since the character identifying circuit 13 recognizes character by character, it is necessary to retrieve data for one character from the screen memory 8.
The one-digit cutout circuit 9 takes out from the screen memory 8 data corresponding to m × q pixels, which is the processing capacity of the one-character cutout circuit 11, and stores it in the one-digit memory 10. Single character extraction circuit 11
Is the processing capacity of the character identification circuit 13 from the one-digit memory m ×
Data corresponding to n pixels is taken out and stored in the one-character memory 12.

第3図(a)において、まず一桁切り出し回路9はX
=1からX=m、Y=1からY=q迄のデータを画面メ
モリ8から取出し、一桁メモリ10に転送する(第3図
(b1))。一桁切り出し回路9は一桁メモリ10の内容を
見て文字像を含む範囲(この例ではY=11からY=11+
n−1)のn行分を一文字メモリ12に転送する。(第3
図(c1))。一文字メモリ12に文字が入っているときは
文字識別回路13により文字が認識される。次にX=2か
らX=m+1、Y=1からY=q迄のデータを画面メモ
リ8から取り出し、一桁メモリ10に転送する(第3図
(b2))。そして文字像を含む範囲の画像を一文字メモ
リ12に転送する。以下、同様にして画面メモリ8から取
り出す位置を順にずらして一桁メモリ10に転送し、文字
像を含む画像を一文字メモリ12に転送し、文字識別回路
13で処理を行うことで一行分の文字の認識を行う。
In FIG. 3 (a), first, the single digit cutout circuit 9 is X.
The data from = 1 to X = m and from Y = 1 to Y = q are taken out from the screen memory 8 and transferred to the one-digit memory 10 (FIG. 3 (b 1 )). The one-digit cutting circuit 9 looks at the contents of the one-digit memory 10 and includes a character image in the range (Y = 11 to Y = 11 + in this example).
n-1) n lines are transferred to the one-character memory 12. (Third
Figure (c 1 )). When a character is stored in the one-character memory 12, the character is recognized by the character identification circuit 13. Next, the data from X = 2 to X = m + 1 and Y = 1 to Y = q are taken out from the screen memory 8 and transferred to the one-digit memory 10 (FIG. 3 (b 2 )). Then, the image in the range including the character image is transferred to the one-character memory 12. Thereafter, similarly, the positions taken out from the screen memory 8 are sequentially shifted and transferred to the one-digit memory 10, the image including the character image is transferred to the one-character memory 12, and the character identification circuit
By performing the process in 13, the character of one line is recognized.

一桁メモリ10から一文字メモリ12に転送する範囲の求
め方を第4図に示す。先ず一桁メモリ10の各行に対して
横ORを求める。
FIG. 4 shows how to obtain the range to be transferred from the single digit memory 10 to the single character memory 12. First, the horizontal OR is calculated for each row of the one-digit memory 10.

横ORとは横方向の一行に注目してその行に黒画素があ
れば1とし、黒画素がなければ0とする演算である。い
まセンサの黒出力を1とし、白出力を0として表現する
と、横ORの結果とはすなわち一行の各画素の論理和を取
った結果にほかならない。そこでこの演算を横ORと呼ん
でいる。そして文字がある部分では第4図(b)に示す
ように、その範囲だけ横ORの結果は黒となる。一行メモ
リから一文字メモリに転送する範囲は、たとえばY=13
から横ORが黒になったとすると、文字の上方の白を含め
てY=11からn画素とする。
The horizontal OR is an operation in which one row in the horizontal direction is focused and 1 is set if there is a black pixel in the row, and 0 is set if there is no black pixel. Now, if the black output of the sensor is expressed as 1 and the white output is expressed as 0, the result of the lateral OR is nothing but the result of the logical sum of the pixels in one row. Therefore, this operation is called horizontal OR. Then, as shown in FIG. 4 (b), the result of the horizontal OR in that part of the character is black as shown in FIG. The range for transferring from one-line memory to one-character memory is, for example, Y = 13.
Therefore, if the horizontal OR becomes black, Y = 11 to n pixels including white above the character.

以上の処理によって、センサ6の視野の中に含まれ
る、文字、記号を読み取ることができる。イメージセン
サ6を走査して用紙3の画像を画面メモリ8に蓄え、画
面メモリ8の中の各文字を認識する処理は3回行われ、
文字の認識結果とその文字の視野内の位置(文字が認識
されたときに一桁切り出し回路9が一桁メモリ10に画面
を切り出したときのx座標)が14、15、16の識別結果バ
ッファ#1、#2、#3に蓄えられる。
Through the above processing, the characters and symbols included in the field of view of the sensor 6 can be read. The process of scanning the image sensor 6 to store the image of the paper 3 in the screen memory 8 and recognizing each character in the screen memory 8 is performed three times,
Identification result buffers of 14, 15 and 16 showing the character recognition result and the position of the character in the visual field (x-coordinate when the one-digit cutting circuit 9 cuts the screen into the one-digit memory 10 when the character is recognized). It is stored in # 1, # 2, and # 3.

第2図の文字認識装置においては、一つの文字に対し
て繰り返し認識した結果の多数決を取ることで、認識率
向上を図っている。14から18は、3回画面を取り込んで
認識したときの文字の認識結果の多数決を取る手段であ
る。まず、認識結果バッファ#1から#3に記憶されて
いる文字のx座標の値と認識結果が桁合わせ処理部17に
送られる。桁合わせ処理部17は文字のx座標の値に基づ
いて、同一桁と判断できる文字認識結果を対応づける。
多数決処理部18は対応づけられた文字認識結果同士の多
数決をとり、その桁に対する最終的な認識結果を得る。
多数決の例を第5図に示す。(a)は原稿に記載されて
いる行である。(b1)(b2)(b3)はそれぞれ、1度
目、2度目、3度目の認識における認識結果を表してい
る。(b1)では「1」の文字が欠け、(b2)では「2」
の文字が欠け、(b3)では「3」の文字が欠けている
が、文字の視野内におけるx座標を基にして各桁におけ
る認識結果の対応を取ってから多数決を取ることで
(b4)のように正解が得られている。なお、文字のx座
標を用いずに、単純に認識した文字の先頭から対応づけ
て多数決を取ると、(c)のように正解が得られない。
In the character recognition device of FIG. 2, the recognition rate is improved by taking a majority decision of the result of repeatedly recognizing one character. 14 to 18 are means for obtaining a majority of the recognition results of characters when the screen is captured and recognized three times. First, the x-coordinate value of the character and the recognition result stored in the recognition result buffers # 1 to # 3 are sent to the digit alignment processing unit 17. The digit alignment processing unit 17 associates character recognition results that can be determined to be the same digit based on the value of the x coordinate of the character.
The majority decision processing unit 18 obtains a final recognition result for the digit by taking a majority decision between the associated character recognition results.
An example of majority decision is shown in FIG. (A) is a line described in the manuscript. (B 1 ) (b 2 ) (b 3 ) represent the recognition results in the first, second, and third recognitions, respectively. (B 1) the lack of character of "1", (b 2) In the "2"
The character “3” is missing in (b 3 ) and the character “3” is missing in (b 3 ). The correct answer is obtained as in 4 ). If a majority decision is made by simply associating from the beginning of the recognized character without using the x coordinate of the character, the correct answer cannot be obtained as in (c).

第2図の19から23は原稿上の一つの行に対して正しく
読み取れた認識結果を1回だけ出力するための手段であ
る。行が視野の中に在るかぎり、文字が繰り返されて認
識され、18から多数決結果が繰り返し出力される。スキ
ャナ1を「C1234567890」の行に当てがいながら上から
下に動かしたときの、視野の動きと、多数決結果の変化
を第6図に示す。(a1)の位置では、認識結果(b1)は
すべてリジェクト(認識不能:?で表している)になって
いる。(a2)の位置の認識結果(b2)も同様にすべてリ
ジェクトである。(a3)位置では、「0」の文字だけ視
野の中に入って認識されている。(b1)から(b3)まで
の多数決結果は(c1)のようになる。ここで、「0」の
文字に付いては(b3)の文字認識結果を(b1)(b2)の
リジェクトよりも優先している。すなわち、リジェクト
よりも文字認識結果に重みを設定している。スキャナを
更に視野に動かし、(a4)(a5)(a6)の位置における
認識結果(b4)(b5)(b6)の多数決結果は(c2)の通
りである。同様に、(a7)(a8)(a9)の位置における
認識結果(b7)(b8)(b9)の多数決結果は(c3)の通
りである。
Reference numerals 19 to 23 in FIG. 2 are means for outputting the recognition result which is correctly read for one line on the original document only once. As long as the line is in the field of view, the letters are repeated and recognized, and the majority decision result is repeatedly output from 18. FIG. 6 shows the movement of the visual field and the change in the majority result when the scanner 1 is moved from top to bottom while being applied to the line “C1234567890”. At the position of (a 1 ), all recognition results (b 1 ) are rejected (indicated by unrecognizable :?). (A 2) the position of the recognition result of (b 2) also are all rejected as well. In (a 3) position, it has been recognized entered in the field of view only the characters of "0". The majority result from (b 1 ) to (b 3 ) is like (c 1 ). Here, with the character "0" is in preference to reject the character recognition result of the (b 3) (b 1) (b 2). That is, the character recognition result is weighted rather than rejected. Further moving the field of view scanner is as (a 4) (a 5) (a 6) the recognition result at the position of (b 4) (b 5) (b 6) the majority result of (c 2). Similarly, as (a 7) (a 8) (a 9) the recognition result at the position of (b 7) (b 8) (b 9) majority result of (c 3).

18からは(c1)(c2)(c3)が逐次出力されるが、19
はフォーマットチェック部で、18から得られる多数決結
果が予め定めてある所定のフォーマット(たとえば、C
で始まる行はCの後に数字が10文字続かなければならな
い)を満たしているかどうかを判定する。タイマー20は
18から多数決結果が得られてからの経過時間を測定す
る。所定のフォーマットを満たす多数決結果Riが得られ
たなら、前回レジスタ21、比較器22、出力制御部23は、
次のように動作する。まず、比較器22において、Riと前
回レジスタ21に記憶されている内容Ri-1とが比較され
る。RiとRi-1の内容が一致しなければ比較器22からはNE
Wの信号が出て出力制御部23はRiをその行の認識結果R
LINEとして出力する。RiとRi-1の内容が一致すれば、比
較器22からはNEWの信号が出ず、出力制御部23はRiを出
力しない(読み捨てる)。一方、前回レジスタ21はRi-1
を比較器22に送った後は、Riを記憶する。タイマー20は
18から多数決結果が得られてからの時間を測定し、あら
かじめ定めた一定時間TCLR経過後に前回レジスタ21の内
容を消去する。電源を入れた直後の前回レジスタの状態
は消去状態である。TCLRは値札を持ち換えるのに必要な
時間(たとえば1秒)よりも短く、たとえば0.6秒程度
に設定しておく。なお、行が視野の中にあって18から繰
り返し多数決結果が得られるときの繰り返しの周期はた
とえば0.2秒程度である。
From (18), (c 1 ) (c 2 ) (c 3 ) is sequentially output.
Is a format check unit, and a majority format result obtained from 18 has a predetermined format (for example, C
The line beginning with must satisfy C) followed by 10 digits). Timer 20
Measure the elapsed time since the majority result was obtained from 18. If the majority result R i satisfying the predetermined format is obtained, the previous register 21, the comparator 22, the output control unit 23,
It works as follows. First, in the comparator 22, R i is compared with the content R i−1 previously stored in the register 21. If the contents of R i and R i-1 do not match, the comparator 22
The signal W is output and the output control unit 23 determines R i to be the recognition result R
Output as LINE . If the contents of R i and R i-1 match, the NEW signal is not output from the comparator 22 and the output control unit 23 does not output R i (discard it). On the other hand, the previous register 21 is R i-1
After sending to the comparator 22, R i is stored. Timer 20
The time after the majority result is obtained from 18 is measured, and the content of the previous register 21 is erased after the elapse of a predetermined fixed time T CLR . The state of the previous register immediately after the power is turned on is the erased state. T CLR is shorter than the time required to change the price tag (for example, 1 second), and is set to about 0.6 seconds, for example. The repetition cycle when the row is in the field of view and the majority result is repeatedly obtained from 18 is, for example, about 0.2 seconds.

第6図、第7図を用いて、値札を読み取るときの19か
ら23の動作を説明する。(c1)の多数決結果「????????
??0」は所定のフォーマットを満たしていないので、フ
ォーマットチェック部9からは何も出力されない。スキ
ャナを上から下に動かして(c2)の多数決結果「C12345
67890」が得られると、これは所定のフォーマットを満
たすのでフォーマットチェック部19からはこの多数決結
果が出力Riされる。比較器22ではRiと前回レジスタの内
容Ri-1が比較されるが、電源を入れた直後は前回レジス
タの内容は消去されているので、RiとRi-1の内容は必ず
一致しない。そのため比較器22からはNEWの信号が出力
制御部23に出て、出力制御部23からは「C1234567890」
が、行認識結果RLINEとして出力される。一方、前回レ
ジスタ21には「C1234567890」が記憶される。次に
(c3)の多数決結果「C1234567890」が得られるが、(c
2)の時と同様にフォーマットチェック部を経て、比較
器22に送られる。しかし、前回レジスタ21の内容Ri-1
「C1234567890」になっておりRiと一致するので、比較
器からはもはやNEWの信号が出ず、出力制御部23からR
LINEとして出力されない。以上の様にして、視野に入っ
た一つの行に対しては一回だけ行認識結果RLINEを出力
する。
The operations 19 to 23 when reading the price tag will be described with reference to FIGS. 6 and 7. (C 1 ) Majority result "????????
Since "? 0" does not satisfy the predetermined format, nothing is output from the format check unit 9. Move the scanner from top to bottom (c 2 ) majority result “C12345
67890 ”is obtained, the format check unit 19 outputs the majority decision result R i because it satisfies a predetermined format. The comparator 22 compares R i with the contents of the previous register R i-1, but the contents of the previous register are erased immediately after the power is turned on, so the contents of R i and R i-1 always match. do not do. Therefore, the NEW signal is output from the comparator 22 to the output control unit 23, and "C1234567890" is output from the output control unit 23.
Is output as the line recognition result R LINE . On the other hand, “C1234567890” is stored in the previous register 21. Next, the majority result of (c 3 ) "C1234567890" is obtained, but (c
As in the case of 2 ), it is sent to the comparator 22 through the format check unit. However, since the content R i-1 of the register 21 last time is “C1234567890” and matches R i , the NEW signal is no longer output from the comparator, and the output control unit 23 outputs R
Not output as LINE . As described above, the line recognition result R LINE is output only once for each line in the field of view.

スキャナを動かして複数行を読み取るときの動作を第
7図を用いて説明する。フォーマットチェック部19には
C、N、¥で始まる各行のフォーマットが登録されてい
るとする。まず(a)の値札で「C1234567890」の行に
スキャナを当てがったときは先程説明した通り、一回だ
け行認識結果RLINEとして出力される。次にスキャナを
下に動かして「N1234567890」の行にスキャナを当てが
ったとき、視野に「N1234567890」の行が入って、多数
決処理部18から初めて「N1234567890」の認識結果が得
られたときは、前回レジスタの内容Ri-1は「C123456789
0」になっているので、比較器22からはNEWの信号が出
て、「N1234567890」が行認識結果RLINEとして出力され
る。それ以降は繰り返して「N1234567890」が多数決処
理部18から出力されても前回レジスタの内容と一致する
ため、RLINEとして出力されない。すなわち、「N123456
7890」は一回だけ出力される。同様にして、「¥123,45
6.」の行が視野に入ったときは、行認識結果RLINEとし
て「¥123,456.」が出力される。なお、JIS B9551によ
るPOS用値札では、一つの値札の中の各行は、異なる内
容になっている。このため、比較器22で前回認識した結
果Ri-1と今回認識した結果Riを比較することで、同じ行
を読んだか否かが判別できるのである。
The operation of moving the scanner to read a plurality of lines will be described with reference to FIG. It is assumed that the format check unit 19 has registered the format of each line starting with C, N, and \. First, when the scanner is applied to the line of "C1234567890" with the price tag of (a), as described above, the line recognition result R LINE is output only once. Next, when the scanner is moved down and the scanner is applied to the line of "N1234567890", when the line of "N1234567890" enters the field of view and the recognition result of "N1234567890" is obtained from the majority processing unit 18 for the first time. Is the previous register contents R i-1 is “C123456789
Since it is "0", the NEW signal is output from the comparator 22, and "N1234567890" is output as the line recognition result R LINE . After that, even if "N1234567890" is repeatedly output from the majority processing unit 18, it is not output as R LINE because it matches the previous register contents. That is, "N123456
7890 ”is output only once. Similarly, "¥ 123,45
When the line "6." enters the field of view, "\ 123,456." Is output as the line recognition result R LINE . In the price tag for POS according to JIS B9551, each line in one price tag has different contents. Therefore, as a result of the recognition time and the result R i-1 recognized last time comparator 22 to compare the R i, it can be determined whether or not reading the same line.

値札を(a)から(b)に持ち換える間は、視野には
文字が入っていない。このときは、多数決処理部18から
は何も出力が得られない。タイマー20は多数決処理部18
が認識結果を出力してからの経過時間を測定しており、
値札を持ち換えたために、TCLR以上各文字認識手段から
出力が得られない状態が続くと、前回レジスタ21の内容
を消去する。したがって、値札を(b)に持ち換えて
「¥123,456.」の行にスキャナを当てがうと「¥123,45
6.」は出力される。すなわち、同じ内容の行であっても
異なる値札ならば続けて読み取ることができる。以上の
説明から判るように、タイマー20は原稿(値札)の交換
を検出する機能を持っている。
There are no characters in the field of view while the price tag is changed from (a) to (b). At this time, no output is obtained from the majority decision processing unit 18. Timer 20 is majority processing unit 18
Is measuring the elapsed time after outputting the recognition result,
If the state in which no output is obtained from each character recognition means for T CLR or more continues because the price tag is changed, the contents of the register 21 are erased last time. Therefore, if you change the price tag to (b) and apply the scanner to the line "¥ 123,456."
6. ”is output. That is, even if the lines have the same content, different price tags can be continuously read. As can be seen from the above description, the timer 20 has a function of detecting the exchange of the manuscript (price tag).

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

スキャナ1を行に対して傾けて(スキューをかけて)
行に当てがったときの様子を第8図に示す。スキュー角
θが小さく、(a2)のように行全体が視野の中に入るタ
イミングのあるとき、(a1)(a2)(a3)の認識結果
(b1)(b2)(b3)の多数決結果(c)には行の認識結
果が正しく得られている。
Tilt scanner 1 to the row (with skew)
FIG. 8 shows the state when the line is applied. The skew angle θ is small, when the entire line as (a 2) is a timing falling within the field of view, (a 1) (a 2 ) (a 3) of the recognition result (b 1) (b 2) ( In the majority result (c) of b 3 ), the recognition result of the line is correctly obtained.

スキュー角θを大きくしたときの様子を第9図に示
す。スキュー角θの大きさは視野に完全に入った一つの
文字が認識出来なくなる程大きくはないとする。スキュ
ー角が大きくなることで、行全体が視野に入るタイミン
グはないが、(a1)で行の右端が視野に入り、(a3)で
行の左端が視野に入ることで多数決結果(c)には行の
認識結果が正しく得られている。
FIG. 9 shows how the skew angle θ is increased. It is assumed that the skew angle θ is not so large that one character completely entering the visual field cannot be recognized. Although there is no timing for the entire row to enter the field of view due to the increased skew angle, the majority of the results (c 1 ) appear when the right edge of the row is in the field of view and (a 3 ) is the left edge of the line is in the field of view. The line recognition result is correctly obtained in).

スキュー角θを大きくしたまま、ゆっくりとスキャナ
を上から下に動かした時の、視野の動きと認識結果を第
10図に示す。スキュー角θが大きいことで、行全体が視
野の中に入るタイミングはない。また、スキャナがゆっ
くりと動いているため、どの隣接している認識結果
(bi)(bi+1)(bi+2)(iは1から8までの整数)の
多数決結果をとっても行全体の認識結果を正しく得るこ
とができない。
Show the movement of the visual field and the recognition result when slowly moving the scanner from top to bottom with the skew angle θ increased.
Shown in Figure 10. Due to the large skew angle θ, there is no time for the entire row to enter the field of view. Also, since the scanner is moving slowly, it is possible to obtain the majority decision result of any adjacent recognition results (b i ) (b i + 1 ) (b i + 2 ) (i is an integer from 1 to 8). The whole recognition result cannot be obtained correctly.

第10図の説明から判るように、従来技術による光学文
字読取装置では、視野に行全体が一度に入らないような
大きなスキュー角で、ゆっくりとスキャナを動かして行
を捉えたときはその行全体の認識結果を得ることができ
ない。本発明はこの欠点を解消するために案出されたも
ので、視野に行全体が一度に入らないようなスキュー角
でも光学文字読取装置の行全体の認識を可能にすること
を目的としている。
As can be seen from the explanation of FIG. 10, in the conventional optical character reading device, when the line is captured by slowly moving the scanner with a large skew angle so that the entire line does not fit in the field of view at one time, the entire line is read. Can not get the recognition result of. The present invention has been devised to solve this drawback, and it is an object of the present invention to enable the entire line of an optical character reader to be recognized even at a skew angle such that the entire line of view does not fit at once.

〔発明の構成〕[Structure of Invention]

第1図に本発明を用いた光学文字読取装置の構成例を
示す。図中1から23までの符号をつけた部分は第2図の
従来技術の光学文字読取装置で同符号を付けた部分と同
じ機能・構成を持つ。ただし、桁合わせ処理部17′は第
2図の桁合わせ処理部17の機能に付け加えて、桁合わせ
後の文字のx座標の値も出力する。桁合わせ後の文字の
x座標はたとえば、同一桁と見なせる文字のx座標の値
の平均値を用いる。8から18までが、イメージセンサの
捉えた画面の中の各文字を認識し、その位置を出力する
文字認識手段である。文字認識手段から得られた、視野
に入った各文字の認識結果とその位置情報を以下の説明
では認識行と呼ぶことにする。
FIG. 1 shows a configuration example of an optical character reading device using the present invention. In the figure, the parts denoted by the reference numerals 1 to 23 have the same functions and configurations as the parts denoted by the same reference numerals in the conventional optical character reader of FIG. However, the digit alignment processing unit 17 'outputs the value of the x coordinate of the character after digit alignment in addition to the function of the digit alignment processing unit 17 in FIG. For the x-coordinate of the character after digit alignment, for example, the average value of the x-coordinate values of the characters that can be regarded as the same digit is used. Characters 8 to 18 are character recognition means for recognizing each character on the screen captured by the image sensor and outputting the position. The recognition result of each character in the field of view obtained from the character recognition means and its position information will be referred to as a recognition line in the following description.

31、32、33は視野に複数の領域を設定したときに、そ
れぞれの領域に行の一部分が存在するか否かを検出する
行検出手段である。第1図では行検出手段が3つ存在す
る場合を例示しているが、複数ならば3以外の数の場合
の構成も可能である。34、35、36は、それぞれ対応する
行存在検出手段が行を検出したときに認識行を記憶する
行記憶手段である。37は、行記憶手段のそれぞれに記憶
された認識行において、位置情報に基づいて文字同士を
対応づける桁合わせ処理手段である。39は、桁合わせ処
理手段によって、各文字同士の対応が付けられた認識行
を総合して一つの行を得る行総合処理手段である。以下
の説明では、行総合処理手段によって得られた行を総合
行と呼ぶことにする。39は、行入れ換わり検出手段であ
り、イメージセンサ6の捉える行が入れ換わった事を検
出する手段である。
Reference numerals 31, 32, and 33 are row detection means for detecting whether or not a part of the row exists in each area when a plurality of areas are set in the field of view. Although FIG. 1 exemplifies a case in which there are three row detecting means, if there are a plurality of row detecting means, a configuration with a number other than 3 is also possible. Reference numerals 34, 35 and 36 are row storage means for storing the recognized row when the corresponding row existence detecting means detects the row. 37 is a digit alignment processing means for associating characters with each other in the recognition line stored in each of the line storage means based on the position information. Reference numeral 39 is a line comprehensive processing means for obtaining one line by synthesizing the recognized lines to which the respective characters are associated by the digit alignment processing means. In the following description, the line obtained by the line total processing means will be referred to as a total line. Reference numeral 39 is a line interchange detecting means, and is a means for detecting that the lines captured by the image sensor 6 have been interchanged.

〔作用〕[Action]

スキャナ1を新たな行に当てがったときは、行入れ換
わり検出手段39の働きにより、行記憶手段34、35、36の
内容は消去されている。以下に、行検出手段、行記憶手
段、桁合わせ処理手段、行総合処理手段の動作を第11図
の例を用いて説明する。
When the scanner 1 is applied to a new row, the contents of the row storage means 34, 35 and 36 are erased by the function of the row interchange detection means 39. Below, the operations of the line detection means, the row storage means, the digit alignment processing means, and the line integration processing means will be explained using the example of FIG.

いま、視野30が(a)で示すように、S1、S2、S3の3
つの領域に分割されており、それぞれの領域において行
が入っているか否かを行検出手段#1、#2、#3がそ
れぞれ判定するとする。第11図(b)に示す行をスキャ
ナを傾けながら読みとると、視野と行の位置関係ならび
に認識行はそれぞれ(c1)(c2)(c3)と(d1)(d2
(d3)のように逐次変化する。(d1)(d2)(d3)の認
識行が逐次得られるときの行記憶手段の記憶内容と行総
合処理結果を(e)に示す。
Now, as shown in (a), the field of view 30 is 3 of S 1 , S 2 , and S 3 .
It is divided into two areas, and the row detecting means # 1, # 2, and # 3 respectively determine whether or not there is a row in each area. When the line shown in FIG. 11 (b) is read while tilting the scanner, the positional relationship between the field of view and the line and the recognized line are (c 1 ) (c 2 ) (c 3 ) and (d 1 ) (d 2 ), respectively.
It changes sequentially like (d 3 ). The stored contents of the row storage means and the row total processing result when the recognized rows of (d 1 ) (d 2 ) (d 3 ) are sequentially obtained are shown in (e).

スキャナを行に当てがう前は、行入れ換わり検出手段
39によって、行記憶手段#1、#2、#3の内容は消去
状態にある。まず、(c1)のように視野のS3の領域に行
が入って、(d1)の認識行が得られたときの様子を第
段階に示す。行がS3の領域に入ったことを行検出手段#
3が検出し、認識行は行記憶手段#3に記憶される。各
行記憶手段に記憶されている内容101、102、103は桁合
わせ処理手段37によって、桁合わせ処理が行われる(10
4)。第段階は101、102は消去状態にあるので、行総
合処理によって得られる総合行105は103と同じになる。
そして、105で得られた総合行の文字はフォーマットチ
ェック部19に送られる。今、フォーマットチェック部は
第11図(b)に対応して「V」の文字の後には12個の数
字が続く、と登録されているとする。105は所定のフォ
ーマットに合致しないので、フォーマットチェック部か
らは何も出力されない。
Before the scanner is applied to the line, the line replacement detection means
39, the contents of the row storage means # 1, # 2, # 3 are in the erased state. First, the state when a line enters the area S 3 of the visual field as in (c 1 ) and the recognition line in (d 1 ) is obtained is shown in the second stage. Row detection means that a row has entered the area of S 3 #
3 is detected and the recognized line is stored in the line storage means # 3. The contents 101, 102, 103 stored in each row storage means are subjected to digit alignment processing by the digit alignment processing means 37 (10
Four). In the first stage, since 101 and 102 are in the erased state, the total row 105 obtained by the row total processing is the same as 103.
Then, the characters of the comprehensive line obtained at 105 are sent to the format check unit 19. Now, it is assumed that the format check unit is registered as corresponding to FIG. 11B, that the character "V" is followed by twelve numbers. Since 105 does not match the predetermined format, nothing is output from the format check unit.

次に、第11図(c2)のように視野のS2の領域が入っ
て、(d2)の認識行が得られたときの様子を第段階に
示す。行がS2の領域に入ったことを行検出手段#2が検
出し、認識行は行記憶手段#2に記憶される。このと
き、行記憶手段#1、#3の内容は第段階の時と同じ
ままである。各行記憶手段に記憶されている内容106、1
07、108は桁合わせ処理手段37によって、桁合わせ処理
が行われる(109)。行総合処理においては、各桁にお
いて認識された文字を選び出して総合行110を得る。そ
して、110の総合行の文字はフォーマットチェック部19
に送られる。110は所定のフォーマットに合致しないの
で、フォーマットチェック部からは何も出力されない。
Next, as shown in FIG. 11 (c 2 ), the state when the S 2 region of the visual field is entered and the recognition line of (d 2 ) is obtained is shown in the first stage. The row detection means # 2 detects that the row has entered the area S 2 , and the recognized row is stored in the row storage means # 2. At this time, the contents of the row storage means # 1 and # 3 remain the same as in the first stage. Contents 106, 1 stored in each row storage means
Digit alignment processing means 37 performs digit alignment processing for 07 and 108 (109). In the line total processing, the character recognized in each digit is selected to obtain the total line 110. Then, the characters in the 110 total lines are the format check section 19
Sent to Since 110 does not match the predetermined format, nothing is output from the format check unit.

次に、第11図(c3)のように視野のS1の領域に行が入
って、(d3)の認識行が得られたときの様子を第段階
に示す。行がS1の領域に入ったことを行検出手段#1が
検出し、認識行は行記憶手段#1に記憶される。第、
段階のときと同様にして、111、112、113は桁合わせ
処理手段37によって、桁合わせ処理が行われる(11
4)。行総合処理においては、各桁において認識された
文字を選び出して総合行115を得る。行全体は第段階
の総合行で得られ、このときフォーマットチェック部1
9、出力制御部23を経て出力される(第1図RLINE)。
Next, as shown in FIG. 11 (c 3 ), a line enters the area S 1 of the visual field, and the state when the recognition line (d 3 ) is obtained is shown in the first stage. The row detecting means # 1 detects that the row has entered the area of S 1 , and the recognized row is stored in the row storing means # 1. First,
In the same manner as in the step, the digit alignment processing means 37 performs digit alignment processing on the reference numerals 111, 112, and 113 (11
Four). In the line total processing, the character recognized in each digit is selected to obtain the total line 115. The entire line is obtained in the stage 1 general line, at this time the format check section 1
9, output through the output control unit 23 (Fig. 1, R LINE ).

以上の処理により、スキャナを原稿上の行に当てがっ
て動かしたとき行全体が視野に一度に入らなくても、行
全体の認識結果を得ることができる。スキャナをさらに
動かして次の行の読み取りに移るときは、行入れ換わり
検出手段39が行の入れ換わりを検出して、行記憶手段#
1、#2、#3の内容を消去する。
By the above processing, when the scanner is applied to a line on the document and moved, the recognition result of the entire line can be obtained even if the entire line does not enter the visual field at once. When the scanner is further moved to read the next line, the line exchange detecting means 39 detects the line exchange and the line storing means #
The contents of 1, # 2 and # 3 are erased.

なお、行全体が(f)のように一度に視野に入って認
識行(g)が得られた場合の動作は(h)のようにな
る。S1、S2、S3の各領域において、行が視野に入ったこ
とが行検出手段#1、#2、#3で検出されるので、
(g)の認識行は行記憶手段#1、#2、#3のそれぞ
れに記憶される(116、117、118)。そして、桁合わせ
処理・行総合処理の結果120で、行全体が得られる。
The operation when the entire row enters the field of view at once and the recognition row (g) is obtained as in (f) is as shown in (h). In each of the areas S 1 , S 2 , and S 3 , the row detection means # 1, # 2, and # 3 detect that a row has entered the field of view.
The recognized line (g) is stored in each of the line storage means # 1, # 2, and # 3 (116, 117, 118). Then, the whole line is obtained as the result 120 of the digit alignment process / line integrated process.

〔実施例〕〔Example〕

行検出手段#1、#2、#3と行入れ換わり検出手段
の実施例を第12図に示す。(a)はイメージセンサの視
野30を表しており、S1、S2、S3の領域に分割する。そし
てそれぞれの領域においてR1、R2、R3で例示されている
ように行を検出する範囲を設定する。行検出手段はこの
範囲の中に行があることを検出する。(b)は行検出手
段と行入れ換わり検出手段を実施する回路である。12
1、122、123は、それぞれR1、R2、R3の範囲で横OR演算
を行う回路である。124、125、126は横ORの結果におい
て連続する黒画素の長さが所定範囲であるか否かを判定
する黒長さ判定部である。文字行が範囲Ri(i=1、
2、3)の中にあるときは、横OR結果はその文字に対応
して黒画素が文字の高さ分だけ連続するので、黒長さ判
定部によって文字がその領域にあるか否かが判定され、
その結果がEXISTiの信号線に出力される。EXISTiの信号
は対応する行記憶手段に送られ、各行記憶手段が認識行
を記憶するタイミングを与える。127はEXIST1、EXIS
T2、EXIST3の論理和をとるオアゲートである。127の出
力EXISTはR1、R2、R3の何れかに文字があれば真にな
る。行の入れ換わりを検出するには、行が視野から出て
いくこと、すなわち、EXISTが偽になることを検出すれ
ばよい。128はEXISTの論理を反転して、行の入れ換わり
信号ALLCLRを作成するインバータゲートである。ALLCLR
の信号はすべての行記憶手段に送られ、行記憶手段の内
容を消去するタイミングを与える。
FIG. 12 shows an embodiment of the line-swapping means # 1, # 2, and # 3 and the row-swapping detection means. (A) shows the field of view 30 of the image sensor, which is divided into regions S 1 , S 2 , and S 3 . Then, in each area, the range for detecting rows is set as exemplified by R 1 , R 2 , and R 3 . The row detecting means detects that there is a row in this range. (B) is a circuit that implements the row detecting means and the row interchange detecting means. 12
Reference numerals 1 , 122 and 123 are circuits for performing a horizontal OR operation in the range of R 1 , R 2 and R 3 , respectively. Reference numerals 124, 125, and 126 are black length determination units that determine whether or not the length of consecutive black pixels in the horizontal OR result is within a predetermined range. Character lines are in the range R i (i = 1,
2), the horizontal OR result indicates that the black pixels corresponding to the character are continuous for the height of the character, so the black length determination unit determines whether the character is in that area. Judged,
The result is output to the EXIST i signal line. The EXIST i signal is sent to the corresponding row storage means, and each row storage means gives the timing for storing the recognition row. 127 is EXIST 1 , EXIS
This is an OR gate that takes the logical sum of T 2 and EXIST 3 . The output EXIST at 127 is true if there is a character in any of R 1 , R 2 and R 3 . To detect the interchange of rows, it is sufficient to detect that the rows come out of the visual field, that is, EXIST becomes false. Reference numeral 128 is an inverter gate which inverts the logic of EXIST and creates a row interchange signal ALLCLR. ALLCLR
Signal is sent to all the row storage means to give a timing to erase the contents of the row storage means.

行が視野の中に入っていないときは、多数決処理部18
からは認識行が得られない。そこで、認識行が得られな
いことを検出して行の入れ換わりと判定する実施例も可
能である。認識行が得られない時間を測定してそれが所
定時間(TLとする)を越えることで、行の入れ換わりと
判定する実施例を第13図に示す。第13図では、タイマー
130は認識行が得られない時間がTL以上続くとTLUPの信
号を出す。TLは、行が視野の中にあるときに繰り返し認
識行が得られる周期(たとえば0.2秒)よりもやや大き
く(たとえば0.25秒)設定しておく。
If the line is not in the field of view, the majority processing unit 18
Can not get the recognition line. Therefore, an embodiment is possible in which it is determined that the recognition line is not obtained and the line is replaced. FIG. 13 shows an embodiment in which the time when no recognition line is obtained is measured, and when it exceeds a predetermined time (T L ), it is judged that the line is replaced. In Figure 13, the timer
130 outputs a signal of T LUP when the time when no recognition line is obtained continues for T L or more. TL is set to be slightly larger (for example, 0.25 seconds) than the cycle (for example, 0.2 seconds) at which the repeated recognition row is obtained when the row is in the visual field.

第13図においては、1から23までの符号をつけた部分
は第1図の同符号の部分と同じ機能・構成である。6は
イメージセンサであり、第2図の場合と同様に、少なく
とも用紙3に記載された文字の一行分の視野が必要であ
り、第13図では横は一行分、縦は一文字の3倍くらいと
している。また、複数行が原稿に記載されている場合
は、一度に複数行が視野に入ると複雑な処理が必要にな
るので、処理系を単純にするには、イメージセンサの視
野高さを原稿上の行間隔よりも小さくした方がよい。
In FIG. 13, the parts denoted by the reference numerals 1 to 23 have the same functions and configurations as the parts having the same reference numerals in FIG. Reference numeral 6 denotes an image sensor, which requires a field of view of at least one line of the characters written on the paper 3 as in the case of FIG. 2. In FIG. 13, the horizontal line is one line, and the vertical line is about three times as large as one character. I am trying. Also, if multiple lines are written on the original, complicated processing is required if multiple lines are in the field of view at one time. Therefore, to simplify the processing system, set the height of the image sensor field of view to the original. It is better to make it smaller than the line spacing of.

第13図では、行検出手段#1から#3と行記憶手段と
桁合わせ処理手段と行総合処理手段は、マイクロプロセ
ッサ131とROM132とRAM133を用いて実施されている。ROM
132には行検出手段と桁合わせ処理手段と行総合処理手
段を実施するためのマイクロプロセッサ131のプログラ
ムが格納されている。行記憶手段34はRAM133上に設定さ
れた変数領域で実施されている。
In FIG. 13, the line detection means # 1 to # 3, the row storage means, the digit alignment processing means, and the line total processing means are implemented using the microprocessor 131, the ROM 132, and the RAM 133. ROM
A program of the microprocessor 131 for implementing the line detection means, the digit alignment processing means, and the line integrated processing means is stored in 132. The row storage means 34 is implemented in the variable area set on the RAM 133.

マイクロプロセッサ131の処理の概略フローチャート
を第14図に示す。光学文字読取装置の電源を投入したと
きは、から処理が始まる。はRAMに設けた行記憶域
の内容を消去する処理である。はタイマー130がTLUP
信号を出しているか否かを判定する処理で、TLUP信号が
出ているとき、すなわち行の入れ換わりがあったときは
の処理に進む。は認識行が得られているか否かの判
定である。は認識行を読み込む処理である。から
が行検出手段を実施しており、視野を複数の領域に分け
たときに各領域において行が入ったことを検出して、そ
れぞれの領域に対応する行記憶域に認識行を記憶する処
理である。第14図のフローチャートは、視野を3つの領
域S1、S2、S3(第15図(a))に分けた場合の処理過程
である。S1の領域に対応する行記憶域#1に認識行を記
憶する処理はである。は認識行のS1の領域において
認識された(リジェクトでない)文字の数が、行記憶域
#1に記憶されている内容のS1の領域において認識され
ている文字の数よりも多いか否かを判定する処理であ
る。、はそれぞれS2、S3の領域に関してと
同様の処理を行うことを示している。は行記憶域#1
から#3に記憶されている内容を認識された文字の位置
情報に基づいて相対応する文字同士を求める桁合わせ処
理である。はで行われた桁合わせ結果に基づいて総
合処理を行い、総合行を求める処理である。は総合行
をフォーマットチェック部19に送り出す処理である。
FIG. 14 shows a schematic flowchart of the processing of the microprocessor 131. When the power of the optical character reader is turned on, the process starts from. Is a process for deleting the contents of the row storage area provided in the RAM. Timer 130 is T LUP
In the process of determining whether or not a signal is being output, when the T LUP signal is output, that is, when there is a row exchange, the process proceeds to. Is a determination as to whether a recognition line has been obtained. Is the process of reading the recognition line. Processing for detecting a line in each area when the field of view is divided into a plurality of areas and storing the recognized row in the row storage area corresponding to each area. Is. The flowchart of FIG. 14 shows the processing steps when the field of view is divided into three regions S 1 , S 2 , and S 3 (FIG. 15 (a)). The process of storing the recognized row in the row storage area # 1 corresponding to the area of S 1 is as follows. Whether the number of characters recognized (not rejected) in the area S 1 of the recognition line is larger than the number of characters recognized in the area S 1 of the contents stored in the line storage area # 1. This is a process for determining whether or not. , Indicate that the same processing as in the areas of S 2 and S 3 is performed, respectively. Is row storage # 1
Is a digit alignment process for finding the corresponding characters based on the position information of the recognized characters stored in contents # 3 to # 3. Is a process of performing an overall process based on the result of digit alignment performed in step S3 to obtain an overall line. Is a process for sending the total line to the format check unit 19.

第16図から第18図に、第14図の処理の詳細フローチャ
ートを示す。以降の説明では、第15図のように変数、定
数を用いるとする。すなわち、第15図(a)のように、
S1、S2、S3の各領域のx座標の範囲は、X1からX2まで、
X2からX3まで、X3からX4までとする。また、(b)の表
のように、認識行はN文字であり、その文字と位置を▲
a(0) n▼、▲x(0) n▼と表し、行記憶域#1に記憶されて
いる内容はI文字あり、その文字と位置を▲a(1) i▼、
▲x(1) i▼と表し(i=1、2、……、I)、また、S1
の領域にはいる認識された(リジェクトでない)文字数
をP1と表す。行記憶域#2、#3についても同様に、
J、▲a(2) j▼、▲x(2) j▼、P2とK、▲a(3) K▼、▲x
(3) K▼、P3の記号を使うこととする。桁合わせ後の桁数
はLで表し、各桁の位置はylで、文字の組合わせは▲b
(1) l▼、▲b(2) l▼、▲b(3) l▼で表すとする。総合行の
文字数はMで、文字はcmで表すとする。
16 to 18 show detailed flowcharts of the processing in FIG. In the following description, it is assumed that variables and constants are used as shown in FIG. That is, as shown in FIG. 15 (a),
The range of the x coordinate of each area of S 1 , S 2 , and S 3 is from X 1 to X 2 ,
X 2 to X 3 , X 3 to X 4 . Also, as shown in the table of (b), the recognition line is N characters, and the character and position are
Represented by a (0) n ▼, ▲ x (0) n ▼, the content stored in the line storage area # 1 has an I character, and the character and position are ▲ a (1) i ▼,
It is expressed as ▲ x (1) i ▼ (i = 1, 2, ..., I), and S 1
The number of recognized (non-rejected) characters in the area of is denoted by P 1 . Similarly for row storage areas # 2 and # 3,
J, ▲ a (2) j ▼, ▲ x (2) j ▼, P 2 and K, ▲ a (3) K ▼, ▲ x
(3) Use the symbols K ▼ and P 3 . The number of digits after digit alignment is represented by L, the position of each digit is y l , and the combination of characters is ▲ b.
(1) l ▼, ▲ b (2) l ▼, ▲ b (3) l ▼. The total number of characters is M and the characters are c m .

第16図に、第14図の処理の詳細フローチャートを
示す。はS1の領域に入る認識行の認識された文字数を
数える変数pを初期化する処理である。は
の処理を繰り返すための繰り返し処理である。は、
で処理対象とする▲a(0) n▼がS1の領域に入るか否かの
判定処理である。は▲a(0) n▼がリジェクト(?の
記号で表わす)でないときにpの数を1増やす処理であ
る。はpがP1よりも多いか否かを判定する処理であ
る。からまでの処理が第14図のの処理の詳細な処
理である。はpを新たなP1として登録し、Nを行記憶
域#1に記憶する文字数Iとして登録する処理である。
は認識行を行記憶域#1に記憶する処理であ
る。
FIG. 16 shows a detailed flowchart of the processing of FIG. Is a process for initializing a variable p that counts the number of recognized characters in the recognized line that enters the area of S 1 . Is an iterative process for repeating the process of. Is
This is a process for determining whether or not ▲ a (0) n ▼ to be processed falls within the area of S 1 . Is a process of increasing the number of p by 1 when ▲ a (0) n ▼ is not a reject (denoted by the? Symbol). Is a process for determining whether p is larger than P 1 . The processing from to is the detailed processing of the processing in FIG. Is a process of registering p as a new P 1 and N as the number of characters I to be stored in the row storage area # 1.
Is a process of storing the recognized line in the line storage area # 1.

第17図に、第14図の桁合わせ処理の詳細フローチャ
ートを示す。第17図のフローチャートにおいては、
で初期化を行っている。は行記憶域に記憶した内容の
最後を予め特別の大きな値XMによって示しておく処理で
ある。XMは第15図(a)のX4に、後述するWの値を加え
たものよりも大きな値にしておく。は注目している、
行記憶域#1のi番目の文字の座標▲x(1) i▼と、行記
憶域#2のj番目の文字の座標▲x(2) j▼と、行記憶域
#3のk番目の文字の座標▲x(3) K▼の最小値Xminを求
める処理である。ではXminがの処理で用いたXMと同
じになっていれば、すべての文字の桁合わせ処理が終わ
ったと判断している。において用いているWは同じ桁
であると判断できるx座標の幅を示している。いま、 が成り立てば、▲x(1) i▼は現在処理を進めている桁に
入る場合の処理、すなわち、、の処理を行う。は
行記憶域#1のi番目の文字▲a(1) i▼を桁合わせ後の
文字▲b(1) l▼として登録する処理である。はi番目
の処理が終わったのでiの値を増やす処理である。一
方、▲x(1) i▼が現在処理を進めている桁に入らない場
合はの処理を行う。の処理は該当する桁に行記憶域
#1が得られていない(文字欠け)という記号#を▲b
(1) l▼に登録する処理である(#は第5図(b)におけ
る文字と文字の間の空白と同じ意味である)。〜と
同様にして、行記憶域#2、行記憶域#3に対する処理
〜、〜を行う。は桁合わせ後の位置としてXm
inをylに登録する処理である。は桁合わせ後の文字数
lを1増やす処理である。は最終的に得られた文字数
l−1を変数Lとして登録しておく処理である。
FIG. 17 shows a detailed flowchart of the digit alignment process of FIG. In the flowchart of FIG. 17,
It is initializing with. Is a process in which the end of the contents stored in the row storage area is indicated in advance by a special large value X M. X M is set to a value larger than the value obtained by adding the value of W described later to X 4 in FIG. 15 (a). Is paying attention,
The coordinates of the i-th character in row storage area # 1 ▲ x (1) i ▼, the coordinates of the j-th character in row storage area # 2 ▲ x (2) j ▼, and the k-th position in row storage area # 3 This is a process for obtaining the minimum value Xmin of the coordinates ▲ x (3) K ▼ of the character. In as long as the same as the X M used in the processing of Xmin, it has been determined that the digit registration process of all of the characters is finished. W used in the above indicates the width of the x-coordinate that can be determined to be in the same digit. Now If is satisfied, ▲ x (1) i ▼ performs the processing when it enters the digit currently being processed, that is, the processing of. Is a process for registering the i-th character ▲ a (1) i ▼ in the line storage area # 1 as the character ▲ b (1) l ▼ after digit alignment. Is a process for increasing the value of i since the i-th process is completed. On the other hand, if ▲ x (1) i ▼ does not enter the digit currently being processed, the process is performed. The line # indicates that the line storage area # 1 has not been obtained (missing character) at the corresponding digit.
(1) It is a process of registering in l ▼ (# has the same meaning as a space between characters in FIG. 5B). In the same manner as, the processes for row storage area # 2 and row storage area # 3 are performed. Is Xm as the position after digit alignment
This is the process of registering in to y l . Is a process of increasing the number of characters l after digit alignment by 1. Is a process of registering the finally obtained number of characters l-1 as a variable L.

第18図(a)は、第14図の総合処理の詳細フローチ
ャート(その1)である。は総合行の文字を数える変
数mを初期化する処理である。はからの処理
を、桁合わせ後の桁数Lだけ繰り返して行うための繰り
返し処理である。によって、注目しているl番目の桁
の座標ylがS1の領域に入るか否かが判定され、S1の領域
に入るときはに進む。においては、行記憶域#1
の、桁合わせ後の文字▲b(1) l▼が#でないならば(文
字欠けでないならば)、それを総合行の文字cmとして登
録する処理を行っている。では、ylがS2の領域に入る
か否かが判定され、S2の領域に入るときはに進む。
においては、行記憶域#2の、桁合わせ後の文字▲b
(2) l▼が#でないならば(文字欠けでないならば)、そ
れを総合行の文字cmとして登録する処理を行っている。
に達する場合はylがS3の領域に入る場合であり、
においては、行記憶域#3の、桁合わせ後の文字▲b(3)
l▼が#でないならば(文字欠けでないならば)、それ
を総合行の文字cmとして登録する処理を行っている。
は、総合行の文字数m−1を変数Mに登録する処理であ
る。
FIG. 18 (a) is a detailed flowchart (1) of the comprehensive process of FIG. Is a process of initializing a variable m for counting the characters in the total line. This is a repetitive process for repetitively performing the process from (a) to (d) for the number of digits L after digit alignment. The coordinate y l a l-th digit of interest is determined whether or not to enter the area of S 1, the process proceeds to when entering the area of S 1. In row storage # 1
If the character ▲ b (1) l ▼ after the digit alignment is not # (if there is no character missing), it is registered as the character c m of the general line. In, y l is determined whether or not to enter the area of S 2, the process proceeds to when entering the area of S 2.
In line storage area # 2, the character ▲ b after column alignment
(2) If l ▼ is not # (if there is no character missing), it is registered as the character c m of the comprehensive line.
If y l is in the region of S 3 , then
In line storage area # 3, characters after column alignment ▲ b (3)
If l ▼ is not # (if there is no missing character), it is registered as the character cm of the general line.
Is a process of registering the number of characters m−1 of the total line in the variable M.

第18図(a)は各領域S1、S2、S3毎に用いる行記憶域
#1、#2、#3を分けた場合の処理であるが、領域毎
に用いる行記憶域を限定しない処理例も可能であり、第
18図(b)に示す。第18図(b)において、は桁合わ
せ後の桁数Lを総合行の文字数Mとして登録する処理で
ある。はからの処理をLだけ繰り返して行う
ための繰り返し処理である。
FIG. 18 (a) the row storage # 1 used for each of the regions S 1, S 2, S 3, # 2, is a process in the case of dividing the # 3, only the line storage used for each region A processing example that does not
It is shown in Fig. 18 (b). In FIG. 18 (b), a process of registering the digit number L after digit alignment as the character number M of the comprehensive line. Is a repetitive process for repetitively performing the process starting with.

第18図(b)のにおいては、▲b(1) l▼が文字
欠け(桁合わせ処理において#の記号を設定したとき)
でもリジェクト(?記号で示される)でもないときは、
▲b(1) l▼をclにする。▲b(1) l▼が文字欠けかリジェク
トのときはに進む。においては▲b(2) l▼が文
字欠けでもリジェクトでもないときは▲b(2) l▼をcl
している。▲b(2) l▼が文字欠けかリジェクトのときは
に進む。においては▲b(3) l▼が文字欠けでも
リジェクトでもないときは▲b(3) l▼をclにしている。
▲b(3) l▼が文字欠けかリジェクトのときはに進む。
に進むのは結局▲b(1) l▼と▲b(2) l▼と▲b(3) l▼の
いずれもがリジェクトか文字欠けのときであり、このと
きは、リジェクトをclにしている。
In Fig. 18 (b), ▲ b (1) l ▼ is missing characters (when the # symbol is set in the digit alignment process).
But if it's not rejected (indicated by a? Sign),
Set ▲ b (1) l ▼ to c l . ▲ b (1) l If ▼ is missing or rejected, go to. In ▲ b (2) When l ▼ is neither rejected in character missing are with ▲ b (2) l ▼ a c l. ▲ b (2) l If ▼ is missing or rejected, go to. In ▲ b (3) When l ▼ is neither rejected in character missing are with ▲ b (3) l ▼ a c l.
▲ b (3) l If ▼ is missing or rejected, proceed to.
After all, ▲ b (1) l ▼ and ▲ b (2) l ▼ and ▲ b (3) l ▼ are rejected or missing characters.In this case, set the reject to c l . ing.

なお、第14図のの初期化の処理は、実際にはI、
J、K、P1、P2、P3の変数を0にすればよい。
It should be noted that the initialization process of FIG.
The variables of J, K, P 1 , P 2 and P 3 may be set to 0.

以上の実施例においては、視野に設定する領域の数が
3である場合を示したが、複数ならば3以外の領域を設
定する実施例も可能である。また、視野に複数の領域を
設定したとき、互いに排地的に(重なり合わないよう
に)設定する必要はなく、たとえば第19図のように、一
部分を重なり合わせながら5つの領域を設定する実施例
も可能である。
In the above embodiments, the case where the number of regions set in the field of view is 3 has been shown, but an example in which regions other than 3 are set is also possible if there are multiple regions. Also, when multiple areas are set in the field of view, it is not necessary to set them so that they do not overlap each other (so that they do not overlap). For example, as shown in FIG. 19, five areas are set while partially overlapping each other. Examples are possible.

〔発明の効果〕〔The invention's effect〕

本発明を用いることで、行全体が一度に視野に入らな
いようなスキュー角でも行全体を読み取ることのできる
光学文字読取装置が実現できる。このことは、逆に言え
ば、従来技術による光学文字読取装置(第20図(a))
に比べて視野の高さを小さくできることを意味する(第
20図(b))。第20図(b)の視野高さを持つスキャナ
でも、本発明を用いることで、行にスキャナを当てがっ
て上下に動かせば行全体を読み取ることができる。視野
の高さを小さくできると次の様な効果がある。
By using the present invention, it is possible to realize an optical character reader capable of reading an entire line even at a skew angle such that the entire line does not enter the field of view at once. To put it the other way around, this is an optical character reader according to the prior art (Fig. 20 (a)).
This means that the height of the field of view can be reduced compared to.
Figure 20 (b)). Even in a scanner having a visual field height shown in FIG. 20 (b), by using the present invention, the entire row can be read by applying the scanner to the row and moving the row up and down. If the height of the field of view can be reduced, the following effects can be obtained.

・イメージセンサに必要な画素数が少なくなるので、よ
り安価なイメージセンサを用いることができ、装置の低
廉化ができる。
-Since the number of pixels required for the image sensor is reduced, a cheaper image sensor can be used and the cost of the device can be reduced.

・視野高さが小さくなることで、スキャナのサイズが小
さくなり、スキャナの操作性が増す。
-Since the field of view height is reduced, the size of the scanner is reduced and the operability of the scanner is increased.

・視野高さが小さくなるので、スキャナ内の照明光源が
原稿を照明するときのむらを少なくしやすい。このた
め、従来技術による光学文字読取装置の照明系に比べ
て、設計・開発が容易になる。
-Since the visual field height is small, it is easy to reduce unevenness when the illumination light source in the scanner illuminates the document. Therefore, the design and development are easier than the illumination system of the optical character reader according to the related art.

このように、本発明のもたらす波及効果は大きい。Thus, the ripple effect of the present invention is great.

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

第1図は本発明を使用した光学文字読取装置の構成例、
第2図は従来技術による光学文字読取装置、第3図は一
文字切り出し処理までの説明図、第4図は一文字切り出
し方法の説明図、第5図は桁合わせ・多数決結果処理の
説明図、第6図、第8図、第9図は視野内の行の動きと
多数決結果の説明図、第7図は値札の読み取り説明図、
第10図は従来技術の問題点の説明図、第11図は本発明の
動作の説明図、第12図は行検出手段と行入れ換わり検出
手段の実施例図、第13図は本発明の実施例図、第14図は
マイクロプロセッサの処理の概略フローチャート、第15
図は定数・変数の説明図、第16図から第18図はそれぞ
れ、行検出処理、桁合わせ処理、行総合処理の詳細フロ
ーチャート、第19図は領域の設定の仕方の説明図、第20
図は本発明を用いた光学文字読取装置の視野の説明図で
ある。 1……スキャナ、2……手 3……原稿、4……光源 5……レンズ系、6……イメージセンサ 7……制御二値化回路、8……画面メモリ 9……一桁切り出し回路、10……一桁メモリ 11……一文字切り出し回路 12……一文字メモリ、13……文字認識回路 14、15、16……認識結果バッファ 17、17′……桁合わせ処理部 18……多数決処理部 19……フォーマットチェック部 20、130……タイマー 21……前回レジスタ、22……比較器 23……出力制御部 30……イメージセンサの視野 31、32、33……行検出手段 34、35、36……行記憶手段 37……桁合わせ手段 38……行総合処理手段 39……行入れ換わり検出手段 101、106、111、116……行記憶手段#1の内容 102、107、112、117……行記憶手段#2の内容 103、108、113、118……行記憶手段#3の内容 104、109、114、119……桁合わせ結果 105、110、115、120……行総合結果 121、122、123……横OR回路 124、125、126……黒長さ判定部 127……オアゲート 128……インバータゲート 131……マイクロプロセッサ 132……ROM、133……RAM。
FIG. 1 is a structural example of an optical character reader using the present invention,
FIG. 2 is an optical character reading device according to the prior art, FIG. 3 is an explanatory view up to a single character cutout process, FIG. 4 is an explanatory view of a single character cutout method, FIG. 5 is an explanatory view of digit alignment / majority result processing, Figures 6, 8 and 9 are illustrations of row movements in the field of view and the results of majority voting, and Figure 7 is an illustration of reading price tags,
FIG. 10 is an explanatory view of the problems of the prior art, FIG. 11 is an explanatory view of the operation of the present invention, FIG. 12 is an embodiment diagram of the row detecting means and the row interchange detecting means, and FIG. FIG. 14 is a schematic flowchart of the processing of the microprocessor, FIG.
Figures are explanatory diagrams of constants / variables, Figures 16 to 18 are detailed flow charts of line detection processing, digit alignment processing, and line total processing, respectively. Figure 19 is an explanatory diagram of how to set areas, and Figure 20.
The figure is an explanatory view of the field of view of an optical character reading apparatus using the present invention. 1 ... Scanner, 2 ... Hand, 3 ... Original, 4 ... Light source, 5 ... Lens system, 6 ... Image sensor, 7 ... Control binarization circuit, 8 ... Screen memory, 9 ... Single digit cutting circuit , 10 …… Single digit memory 11 …… Single character cutout circuit 12 …… Single character memory, 13 …… Character recognition circuit 14, 15, 16 …… Recognition result buffer 17, 17 ′ …… Digit matching processing unit 18 …… Majority processing Section 19 …… Format check section 20,130 …… Timer 21 …… Previous register, 22 …… Comparator 23 …… Output control section 30 …… Image sensor field of view 31,32,33 …… Line detection means 34,35 , 36 ... Line storage means 37 ... Digit alignment means 38 ... Line total processing means 39 ... Line exchange detection means 101, 106, 111, 116 ... Contents of line storage means # 1 102, 107, 112, 117 ... Contents of line storage means # 2 103, 108, 113, 118 ... Contents of line storage means # 3 104, 109, 114, 119 ... Digit alignment Result 105, 110, 115, 120 …… Total row result 121, 122, 123 …… Horizontal OR circuit 124, 125, 126 …… Black length determination unit 127 …… OR gate 128 …… Inverter gate 131 …… Microprocessor 132 ... ROM, 133 ... RAM.

Claims (7)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】イメージセンサ筐体(スキャナ)を手で持
って原稿に当てがうことでその原稿上の文字を読み取る
光学文字読取装置において、 複数の文字・記号等(以下、単に文字という。)からな
る行を認識対象とし、少なくとも文字の一行分を視野内
に納めるイメージセンサと、 イメージセンサのとらえた画面の中の各文字を認識しそ
の位置を出力する文字認識手段と、 視野に設定された複数の領域それぞれにおいて、その領
域に行の一部分が存在するか否かを検出する複数の行検
出手段と、 対応する行検出手段が行を検出したときに文字認識手段
から得られた認識行を記憶する複数の行記憶手段と、 行記憶手段のそれぞれに記憶された認識行を、文字の位
置情報に基づいて文字同士を対応づける桁合わせ処理手
段と、 桁合わせ処理手段の結果を基にして、行記憶手段に記憶
された認識行を総合した総合行を得る行総合手段と、 視野に入る行の入れ換わりを検出する行入れ換わり検出
手段と を有し、 行検出手段が行の存在を検出すると、その行検出手段に
対応する行記憶手段が文字認識手段から得られた認識行
を記憶し、桁合わせ処理手段は行記憶手段に記憶されて
いる認識行の文字同士を桁合わせ手段によって対応づ
け、行総合手段によって総合行を得、 一方、行入れ換わり検出手段が行の入れ換わりを検出し
たときは、行記憶手段の内容を消去すること を特徴とする光学文字読取装置。
1. An optical character reading apparatus for reading a character on an original by holding an image sensor housing (scanner) with a hand and applying it to the original, and a plurality of characters / symbols (hereinafter, simply referred to as characters). ) Is the target of recognition, an image sensor that fits at least one line of characters within the field of view, character recognition means that recognizes each character on the screen captured by the image sensor and outputs its position, and sets it in the field of view. A plurality of line detection means for detecting whether or not a part of the line exists in each of the plurality of displayed areas, and the recognition obtained from the character recognition means when the corresponding line detection means detects the line. A plurality of line storage means for storing lines; a digit alignment processing means for associating the recognized lines stored in each of the line storage means with each other based on the positional information of the characters; Based on the result of, the line detection means has a line totaling means for obtaining a totalized line in which the recognized lines stored in the line storage means are integrated, and a line replacement detecting means for detecting the replacement of the lines in the visual field. When the means detects the presence of a line, the line storage means corresponding to the line detection means stores the recognition line obtained from the character recognition means, and the digit alignment processing means stores the characters of the recognition line stored in the line storage means. An optical system characterized in that the lines are associated with each other by the line aligning means, the total line is obtained by the line totalizing means, and when the line exchange detecting means detects the line exchange, the contents of the line storing means are erased. Character reader.
【請求項2】特許請求の範囲第1項記載の光学文字読取
装置において、 行入れ換わり検出手段が、 全ての行検出手段が行を検出しないときに、 行の入れ換わりと判定すること を特徴とする光学文字読取装置。
2. The optical character reading device according to claim 1, wherein the line interchange detecting means determines that the line is interchanged when all the line detecting means detect no line. And an optical character reader.
【請求項3】特許請求の範囲第1項または第2項のいず
れかに記載の光学文字読取装置において、 行検出手段が イメージセンサの視野に設けた所定の範囲において、横
方向に黒画素の論理和を求める横OR回路と、 横OR回路の演算結果が縦方向に所定範囲の長さ連続する
ことを判定する黒長さ判定部からなり、 黒長さ判定部が所定範囲の長さ連続する横OR回路の演算
結果を検出したときに行が存在すると判定すること を特徴とする光学文字読取装置。
3. The optical character reading device according to claim 1 or 2, wherein a black pixel is laterally arranged in a predetermined range provided in the visual field of the image sensor by the line detection means. It consists of a horizontal OR circuit that calculates the logical sum, and a black length determination unit that determines that the operation result of the horizontal OR circuit continues for a predetermined range in the vertical direction. An optical character reading device characterized by determining that a row exists when the calculation result of the horizontal OR circuit is detected.
【請求項4】特許請求の範囲第1項または第2項のいず
れかに記載の光学文字読取装置において、 行検出手段が、 文字認識結果から得られる認識行の各文字の位置情報を
調べ、所定の範囲の位置情報を持つ認識不能でない文字
があることにより、行が存在すると判定する手段であ
り、 既に行記憶手段に記憶されている認識行において前記範
囲の位置情報を持つ認識不能でない文字よりも、多くの
認識不能でない文字が前記範囲で得られているときに、
新たに得られた認識行を行記憶手段に記憶すること を特徴とする光学文字読取装置。
4. The optical character reader according to claim 1 or 2, wherein the line detection means checks the position information of each character of the recognition line obtained from the character recognition result, It is a means to determine that a line exists by having a non-unrecognizable character having position information in a predetermined range, and a non-unrecognizable character having position information in the range in a recognition line already stored in the line storage means. Than, when many non-recognizable characters are obtained in the range,
An optical character reader characterized in that a newly obtained recognition line is stored in a line storage means.
【請求項5】特許請求の範囲第1項または第4項のいず
れかに記載の光学文字読取装置において、 行入れ換わり検出手段が、 文字認識手段が繰り返し認識処理を行うときに、認識行
が得られない時間を測定する計時手段からなり、 認識行が得られない時間が所定以上になることで、行の
入れ換わりを判定すること を特徴とする光学文字読取装置。
5. The optical character reading device according to claim 1 or 4, wherein the line replacement detecting means determines that the recognized line is recognized when the character recognizing means repeatedly performs recognition processing. An optical character reading device comprising a time measuring means for measuring the time when the recognition line is not obtained, and determining the replacement of the line when the time when the recognition line is not obtained exceeds a predetermined time.
【請求項6】特許請求の範囲第1項から第5項のいずれ
かに記載の光学文字読取装置において、 イメージセンサの視野の高さが文字の高さの1倍から3
倍程度の範囲であり、桁合わせで用いる文字の位置情報
が、その文字の視野内における横方向の位置情報である
こと を特徴とする光学文字読取装置。
6. The optical character reader according to any one of claims 1 to 5, wherein the height of the visual field of the image sensor is 1 to 3 times the height of the character.
An optical character reading device characterized in that the position information of a character used for digit alignment is a position information in the horizontal direction within the visual field of the character within a range of about double.
【請求項7】特許請求の範囲第1項から第5項のいずれ
かに記載の光学文字読取装置において、 イメージセンサの視野の高さが原稿上に記載された文字
行の行間隔よりも小さく、桁合わせで用いる位置情報
が、その文字の視野内における横方向に位置情報である
こと を特徴とする光学文字読取装置。
7. The optical character reader according to any one of claims 1 to 5, wherein the height of the field of view of the image sensor is smaller than the line spacing of the character lines written on the document. An optical character reading device characterized in that position information used for digit alignment is position information in the lateral direction within the visual field of the character.
JP62147340A 1987-06-13 1987-06-13 Optical character reader Expired - Lifetime JP2514663B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62147340A JP2514663B2 (en) 1987-06-13 1987-06-13 Optical character reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62147340A JP2514663B2 (en) 1987-06-13 1987-06-13 Optical character reader

Publications (2)

Publication Number Publication Date
JPS63311491A JPS63311491A (en) 1988-12-20
JP2514663B2 true JP2514663B2 (en) 1996-07-10

Family

ID=15427966

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62147340A Expired - Lifetime JP2514663B2 (en) 1987-06-13 1987-06-13 Optical character reader

Country Status (1)

Country Link
JP (1) JP2514663B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5440037A (en) * 1977-09-06 1979-03-28 Toshiba Corp Optical character reader

Also Published As

Publication number Publication date
JPS63311491A (en) 1988-12-20

Similar Documents

Publication Publication Date Title
JP2835274B2 (en) Image recognition device
JPH0420226B2 (en)
US4817185A (en) Optical character reader
US11881043B2 (en) Image processing system, image processing method, and program
WO2020008628A1 (en) Image processing system, image processing method, and program
GB2188465A (en) Optical character reader
JP2514663B2 (en) Optical character reader
JP2845370B2 (en) Character recognition method
JPS5841542B2 (en) optical character reader
JP4853313B2 (en) Character recognition device
JP2514660B2 (en) Optical character reader
JP2722434B2 (en) Optical character reader
JPH05242224A (en) Fingerprint collating device
JP2567852B2 (en) Optical character reader
JPH0877293A (en) Character recognition device and generating method for dictionary for character recognition
JPS6319090A (en) Optical character reader
JP2573665B2 (en) Optical character reader
JPH0731716B2 (en) Optical character reader
JPH087775B2 (en) Optical character reader
JP2881762B2 (en) Optical character reading device
JP2925300B2 (en) Optical character reader
JP2953162B2 (en) Character recognition device
JPH0221384A (en) Optical character reader
JPH01278354A (en) Image data recorder
JPH01177177A (en) Optical character reader

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080430

Year of fee payment: 12