JP2000251010A - Document readout method - Google Patents

Document readout method

Info

Publication number
JP2000251010A
JP2000251010A JP11052248A JP5224899A JP2000251010A JP 2000251010 A JP2000251010 A JP 2000251010A JP 11052248 A JP11052248 A JP 11052248A JP 5224899 A JP5224899 A JP 5224899A JP 2000251010 A JP2000251010 A JP 2000251010A
Authority
JP
Japan
Prior art keywords
bar code
barcode
image
reading
line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP11052248A
Other languages
Japanese (ja)
Inventor
Yoshihiro Shima
好博 嶋
Katsumi Marukawa
勝美 丸川
Hiroshi Shinjo
広 新庄
Kazuki Nakajima
和樹 中島
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP11052248A priority Critical patent/JP2000251010A/en
Publication of JP2000251010A publication Critical patent/JP2000251010A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To obtain the method for reading out a bar code printed at an arbitrary position as to various readout objects on a document by searching the entire document image of a surface image on the document and detecting the position of a bar code line in the form of the vertex coordinates of the quadrangle surrounding the bar code line. SOLUTION: An image input part 102 binarizes the image on the document surface into black-and-white data to generate an original binary image and reduces the original binary image to generate images which differ in resolution. Then the original binary image or the images of different resolution are sent out as document images to be processed to a bar code position detection part 103 and a character extraction and character recognition part 105. The bar code position detection part 103 searches the entire surface of the inputted document image to detect the position of the bar code line. Namely, black runs in a process area are used for the inputted binary image data to extract the circumscribed rectangle surrounding connecting components as a group of black and the vertex coordinates of the four corners of the bar code line are extracted.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は多様な書式を有する
帳票、特に、バーコードが任意の位置に印刷された帳票
から文字データ若しくはバーコードデータを読み取る帳
票読み取り方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a form having various formats, and more particularly to a form reading method for reading character data or bar code data from a form having a bar code printed at an arbitrary position.

【0002】[0002]

【従来の技術】定形的な文書に対して文書の種類を自動
的に識別し、すでに格納された文書と同一の分類コード
を与えるファイリング方式が、特開昭61―75477
号公報に述べられている。しかしながら、この従来方式
では、任意位置に印刷されたバーコードを読み取り、バ
ーコードの読み取り結果を利用して格納することが述べ
られていない。
2. Description of the Related Art Japanese Patent Laid-Open No. 61-75477 discloses a filing method for automatically identifying the type of a document with respect to a fixed document and providing the same classification code as that of a document already stored.
No. pp. 147-64. However, this conventional method does not describe reading a barcode printed at an arbitrary position and storing the barcode by using the barcode reading result.

【0003】また、バーコードを伝票に印字し、当該バ
ーコードを読み取ることにより、指定の伝票を探索する
方式が、特開平7―114616号公報に述べられてい
る。しかしながら、この従来方式では、対象とするバー
コードは伝票の固定の位置に印字されたものに限定され
ており、帳票の任意位置に印刷されたバーコードを読み
取ることに関して、この従来方式では記述されていな
い。
Japanese Patent Application Laid-Open No. Hei 7-114616 discloses a method of printing a barcode on a slip and reading the barcode to search for a specified slip. However, in this conventional method, the target barcode is limited to the one printed at a fixed position on the voucher, and with respect to reading the barcode printed at an arbitrary position on the form, it is described in this conventional method. Not.

【0004】また、文書がスキャナの設定方向に対して
任意の角度で回転されて入力された場合、文字行の認識
をおこない、認識結果に基き回転角を検出して、正しい
方向に入力画像を修正する方式が、特開平6―1034
11号公報に述べられている。しかしながら、この従来
方式では、文字認識を利用して回転角を検出しており、
印刷されたバーコードの方向を利用して回転角を検出す
ることは考慮されていない。
When a document is input after being rotated at an arbitrary angle with respect to the direction set by the scanner, the character line is recognized, the rotation angle is detected based on the recognition result, and the input image is displayed in the correct direction. The correction method is disclosed in Japanese Patent Laid-Open No. 6-1034.
No. 11 discloses this. However, in this conventional method, the rotation angle is detected using character recognition,
No consideration is given to detecting the rotation angle using the direction of the printed barcode.

【0005】また、帳票の特定部分に帳票識別番号を記
入もしくは印刷しておき、当該帳票識別番号を読み取る
ことにより、帳票識別をおこない、この帳票識別番号に
対応するフォーマット情報(書式情報)に基いて帳票デ
ータの文字認識をおこなうことが、例えば、特開昭59
―117366号公報、特開平11―008746に記
載されている。しかしながら、この従来方式では、任意
の位置に印刷されたバーコードを読み取り、帳票識別番
号に該当するバーコード読み取り結果に対応する書式情
報に基いて帳票の文字認識をおこなうことは考慮されて
いない。
Also, a form identification number is written or printed in a specific portion of the form, and the form identification is performed by reading the form identification number, and based on the format information (format information) corresponding to the form identification number. For example, Japanese Patent Application Laid-Open No.
-117366, and JP-A-11-008746. However, this conventional method does not consider reading a barcode printed at an arbitrary position and performing character recognition of a form based on format information corresponding to a barcode read result corresponding to a form identification number.

【0006】[0006]

【発明が解決しようとする課題】スキャナにおいて採取
された帳票の表面画像から帳票に記入された文字やバー
コードを読み取る方法において、本発明の課題は多様な
書式の帳票の任意位置に印刷されたバーコードを読み取
ることである。従来、バーコードが固定位置に印刷され
た帳票を対象に帳票読み取りが行われていたが、バーコ
ードの印刷位置が任意である帳票からバーコードを読み
取ることは困難であった。帳票の固定位置にバーコード
を印刷する必要があるため、従来、帳票の書式を自由に
設計することが困難であった。本発明の第一の目的は、
帳票の種類が多様な読み取り対象において、任意位置に
印刷されたバーコードを読み取る方法を提案することで
ある。
SUMMARY OF THE INVENTION In a method for reading characters and barcodes written on a form from a surface image of the form collected by a scanner, an object of the present invention is to print at an arbitrary position on a form in various formats. Reading a barcode. Conventionally, a form is read on a form on which a barcode is printed at a fixed position. However, it has been difficult to read a barcode from a form in which the barcode printing position is arbitrary. Since it is necessary to print a barcode at a fixed position on a form, it has conventionally been difficult to freely design the form of the form. The first object of the present invention is to
An object of the present invention is to propose a method of reading a barcode printed at an arbitrary position in a reading target having various forms.

【0007】また、従来、多種類の帳票を対象とする場
合、それらの帳票に共通に固定位置を設定し、当該固定
位置に帳票識別番号を記入若しくは印刷しておき、文字
読み取り時、固定位置にある帳票識別番号を読み取り、
対応する書式情報を選択して、当該書式情報に従い文字
読み取りを行っていた。このため、従来、固定位置に帳
票識別番号が記入されている帳票に読み取り対象が限定
されているという問題があった。本発明の第二の目的
は、帳票の種類が多様な読み取り対象において、任意位
置に印刷されたバーコードを読み取り、当該バーコード
の読み取り結果に対応して帳票の書式を選択し、文字を
読み取る方法を提案することである。
Conventionally, when a variety of forms are to be processed, a fixed position is set in common for these forms, and a form identification number is written or printed in the fixed position. Read the form identification number in
The corresponding format information is selected, and characters are read according to the format information. For this reason, conventionally, there was a problem that a reading target is limited to a form in which a form identification number is written in a fixed position. A second object of the present invention is to read a barcode printed at an arbitrary position in a reading target having various types of forms, select a format of the form according to the reading result of the barcode, and read characters. Is to propose a method.

【0008】また、従来、多様な種類の帳票に対して、
帳票画像を保管し、所望の帳票を検索をするためには、
固定位置に印刷された帳票識別番号を読み取り、検索の
為のインデックスとする方法が知られている。この従来
方法では、固定位置に帳票識別番号が記入されている帳
票にのみ読み取り対象が限定されているという問題があ
った。さらに、帳票の枠線を抽出して帳票の種類を自動
識別する方法が考えられるが、類似した枠線を有する帳
票では、帳票の種類を自動的に識別することが困難であ
る。本発明の第三の目的は、帳票の種類が多様な読み取
り対象において、帳票の種類を表わすバーコードであっ
て、かつ、任意位置に印刷されたバーコードを読み取
り、当該バーコードの読み取り結果を基に検索のための
インデックスを当該帳票に付与する方法を提案すること
である。
Conventionally, for various types of forms,
To store the form image and search for the desired form,
A method is known in which a form identification number printed at a fixed position is read and used as an index for search. In this conventional method, there is a problem that a reading target is limited only to a form in which a form identification number is written in a fixed position. Further, a method of automatically identifying the type of a form by extracting a frame line of the form can be considered. However, it is difficult to automatically identify the type of the form in a form having a similar frame line. A third object of the present invention is to read a barcode representing a type of a form, and a barcode printed at an arbitrary position in a reading target having various forms, and read a result of reading the barcode. It is to propose a method of adding an index for search to the form based on the search.

【0009】また、帳票画像からバーコードと文字の両
方を読み取る場合、例えば、解像度が200dpiのス
キャナで採取した帳票画像でバーコードを読み取ると、
バーコードの印刷精度によっては、パターンの太り等が
発生しバーパターンが劣化し、当該解像度ではバーコー
ドを読み取れない場合がある。このため、単純には、ス
キャナの解像度を上げ、例えば、400dpiの解像度
で採取した帳票画像でバーコードを読み取る方法が考え
られるが、そのまま当該400dpiの解像度で文字を
読み取ると、画像データが多くなり、文字読み取りの処
理時間が長大になるという問題がある。本発明の第四の
目的は、帳票画像に対して、バーコード読み取り処理と
文字読み取りの両方を実行する場合、各処理に適切な画
像の解像度を選択、入力し、読み取りに要する処理時間
を短縮することである。
When reading both a barcode and a character from a form image, for example, when reading a barcode with a form image collected by a scanner having a resolution of 200 dpi,
Depending on the printing accuracy of the barcode, the bar pattern may be deteriorated due to thickening of the pattern or the like, and the barcode may not be read at the resolution. For this reason, it is conceivable to simply increase the resolution of the scanner and, for example, read a barcode from a form image collected at a resolution of 400 dpi. However, if characters are read at the resolution of 400 dpi, image data increases. However, there is a problem that the processing time for character reading becomes long. A fourth object of the present invention is to reduce the processing time required for scanning by selecting and inputting an image resolution appropriate for each processing when performing both barcode reading processing and character reading on a form image. It is to be.

【0010】また、バーコードの読み取りにおいて、帳
票表面の画像は多数の画素(ドット)から構成されている
が、これら多数の画素データを順次探索しながらバーコ
ードを検出する単純な方法では、画素データの個数が膨
大であり、バーコードの位置検出に長大な処理時間がか
かるという問題がある。本発明の第五の目的は、帳票画
像からバーコード位置を検出するのに要する処理時間を
短縮することである。
In reading a barcode, an image on the form surface is composed of a large number of pixels (dots). In a simple method of detecting a barcode while sequentially searching for such a large number of pixel data, a pixel There is a problem that the number of data is enormous, and it takes a long processing time to detect the position of the barcode. A fifth object of the present invention is to reduce a processing time required for detecting a barcode position from a form image.

【0011】また、従来読み取り対象であった帳票で表
が印刷された帳票では、バーコードが予め設定された固
定位置に印刷されている限定された帳票であり、さら
に、帳票に印刷された表の枠とその枠内にあるバーコー
ドとの対応は既知の固定的な帳票であり、自由に帳票を
設計することができなかった。これは、表を含む多様な
種類の帳票であり、かつ、任意位置にバーコードが印刷
された帳票では、読み取った枠情報ごとにバーコード読
み取り結果を対応つけて出力することが従来、困難であ
った為である。本発明の第六の目的は、表を含む多様な
種類の帳票から抽出した表の構造と、表の枠内に印刷さ
れたバーコードとを対応付けする方法を提案することで
ある。
[0011] Further, in a form in which a table is printed on a form to be read conventionally, the form is a limited form in which a barcode is printed at a predetermined fixed position. The correspondence between the frame and the barcode in the frame is a known fixed form, and the form cannot be freely designed. This is a variety of forms including tables, and it is conventionally difficult to output the barcode reading result in association with the read frame information in the form where the barcode is printed at an arbitrary position. Because there was. A sixth object of the present invention is to propose a method for associating a table structure extracted from various types of forms including a table with a barcode printed in a table frame.

【0012】また、帳票がスキャナの設定方向に対して
任意の角度で回転されて入力された場合、文字行の認識
をおこない、認識結果に基き回転角を検出して、正しい
方向に入力画像を修正する方式が知られているが、文字
行の認識精度によっては、正しい帳票方向を検出できな
いという問題があった。本発明の第七の目的は、読み取
ったバーコード行の方向を利用して正しい帳票の方向を
検出する方法を提案することである。
When a form is input after being rotated at an arbitrary angle with respect to the setting direction of the scanner, the character line is recognized, the rotation angle is detected based on the recognition result, and the input image is converted in the correct direction. Although a correction method is known, there is a problem that a correct form direction cannot be detected depending on the recognition accuracy of a character line. A seventh object of the present invention is to propose a method for detecting a correct form direction by using a direction of a read barcode line.

【0013】[0013]

【課題を解決するための手段】上記第一の目的を達成す
るため、バーコードが任意位置に印刷された帳票の表面
画像に対して、帳票画像の全面を探索し、バーコード行
の位置をバーコード行を取り囲む四角形の頂点座標とし
て検出する。
Means for Solving the Problems In order to achieve the first object, the entire surface of the form image is searched for the surface image of the form on which the barcode is printed at an arbitrary position, and the position of the barcode line is determined. Detected as the coordinates of the vertices of the rectangle surrounding the barcode line.

【0014】上記第二の目的を達成するため、バーコー
ドの読み取り結果に従って文字読み取り用の書式情報を
切換え、帳票の表面画像内の文字読み取りを行う。
In order to achieve the second object, the format information for character reading is switched according to the result of reading the barcode, and the characters in the front image of the form are read.

【0015】上記第三の目的を達成するため、バーコー
ドの読み取り結果をインデックスとして帳票を種類別に
蓄積する。
In order to achieve the third object, the form is stored for each type using the bar code reading result as an index.

【0016】上記第四の目的を達成するため、解像度の
異なる複数個の画像を生成し、バーコード読み取り処理
と文字読み取り処理で異なる解像度の画像を読み取り処
理対象とするよう画像の解像度を切換え、読み取り用に
入力する。
In order to achieve the fourth object, a plurality of images having different resolutions are generated, and the resolutions of the images are switched so that images having different resolutions are subjected to bar code reading processing and character reading processing. Enter for reading.

【0017】上記第五の目的を達成するため、入力画像
の連結成分を抽出し、連結成分の外接矩形を抽出し、外
接矩形の寸法によりバーの候補矩形を選択し、候補矩形
を周囲の候補矩形と融合してバーコード行の候補を抽出
し、当該バーコード行候補の寸法、行内の矩形数をもと
にバーコード行を決定する。
In order to achieve the fifth object, a connected component of an input image is extracted, a circumscribed rectangle of the connected component is extracted, a candidate rectangle of a bar is selected according to the size of the circumscribed rectangle, and the candidate rectangle is replaced with surrounding candidates. A barcode line candidate is extracted by fusing with the rectangle, and the barcode line is determined based on the size of the barcode line candidate and the number of rectangles in the line.

【0018】上記第六の目的を達成するため、表の枠情
報を抽出し、表の枠内に印刷されたバーコード行に対し
て、表の枠情報と当該枠内のバーコードとを対応付け、
予め論理的な配置が指定された枠内のバーコードを選択
して出力する。
In order to achieve the sixth object, the table frame information is extracted, and the bar code lines printed in the table frame correspond to the table frame information and the barcodes in the frame. Attached
A barcode in a frame whose logical arrangement is designated in advance is selected and output.

【0019】上記第七の目的を達成するため、バーコー
ド行が横方向に印刷されていると仮定してバーコード行
を抽出し、次いで、バーコード行が縦方向に印刷されて
いると仮定してバーコード行を抽出し、これら両方の抽
出結果を融合してバーコード行位置として出力するとと
もに、抽出したバーコード行の方向から帳票方向を推定
し、当該帳票の表面画像を帳票方向に従って回転する。
In order to achieve the seventh object, the bar code lines are extracted assuming that the bar code lines are printed in the horizontal direction, and then the bar code lines are assumed to be printed in the vertical direction. A bar code line is extracted, and both of these extraction results are merged and output as a bar code line position, a form direction is estimated from the direction of the extracted bar code line, and a surface image of the form is determined according to the form direction. Rotate.

【0020】[0020]

【発明の実施の形態】図1は本発明の一実施例である帳
票読み取りシステムの構成図である。本発明で読み取り
対象とする帳票は図11の1100に示すように単数ま
たは複数のバーコード1113、1114が任意の位置
に印刷されている。図1に示すように、任意の位置にバ
ーコードが印刷された帳票の読み取りを行う帳票認識部
100と帳票表面の画像を蓄積する画像蓄積部110と
帳票画像を表示して読み取りデータの確認・修正を行う
画像表示・データ入力部120がネットワーク130に
より接続されている。スキャナ部101では帳票表面の
画像を採取する。スキャナ部は一次元センサで構成され
ており、文字読み取り用およびバーコード読み取り用と
に共通に使用する。画像入力部102は帳票表面の画像
を白黒2値化し原2値化画像を生成するとともに、当該
原2値化画像を縮小して、複数個の解像度の異なる画像
を生成する。そして、バーコード位置検出部103およ
び文字抽出・文字認識部105に当該原2値化画像若し
くは解像度の異なる画像を処理対象の帳票画像として送
出する。バーコード位置検出部103では、入力された
帳票画像に対して全面を探索しバーコード行の位置を検
出する。バーコード認識部104では入力されたバーコ
ード行の位置座標を基に画素データを切出しバーコード
を復号する。復号されたバーコード読み取り結果は、制
御部106や文字抽出・文字認識部105に送出され
る。文字抽出・文字認識部105では、入力されたバー
コード読み取り結果を基に文字位置や文字種等を示す書
式情報を選択し、選択した書式情報に従って、帳票に記
入された文字を読み取る。制御部106は帳票認識部の
全体を制御するとともに、画像蓄積部110に対して帳
票画像や文字読み取り結果、バーコード読み取り結果を
送出する。印刷部107は帳票読み取り結果に従って帳
票表面に文字若しくはバーコードを印刷する。画像蓄積
部110は、大容量記憶装置で構成されており帳票画像
や文字読み取り結果、バーコード読み取り結果を蓄積、
保管する。
FIG. 1 is a block diagram of a form reading system according to an embodiment of the present invention. A form to be read in the present invention has one or a plurality of barcodes 1113 and 1114 printed at arbitrary positions as indicated by reference numeral 1100 in FIG. As shown in FIG. 1, a form recognition unit 100 for reading a form on which a barcode is printed at an arbitrary position, an image storage unit 110 for storing an image of the form surface, and a form image are displayed to confirm read data. An image display / data input unit 120 for correction is connected by a network 130. The scanner unit 101 collects an image of a form surface. The scanner unit is formed of a one-dimensional sensor, and is commonly used for character reading and barcode reading. The image input unit 102 generates an original binarized image by binarizing the image on the form surface into black and white, and generates a plurality of images having different resolutions by reducing the original binarized image. Then, the original binary image or an image having a different resolution is sent to the barcode position detecting unit 103 and the character extracting / character recognizing unit 105 as a form image to be processed. The barcode position detecting unit 103 searches the entire surface of the input form image to detect the position of the barcode line. The barcode recognition unit 104 cuts out pixel data based on the input position coordinates of the barcode row and decodes the barcode. The decoded barcode reading result is sent to the control unit 106 and the character extraction / character recognition unit 105. The character extracting / character recognizing unit 105 selects format information indicating a character position, a character type, and the like based on the input barcode reading result, and reads characters written on a form according to the selected format information. The control unit 106 controls the entire form recognition unit, and sends out the form image, the character reading result, and the barcode reading result to the image storage unit 110. The printing unit 107 prints a character or a barcode on the surface of the form according to the result of reading the form. The image storage unit 110 is configured by a large-capacity storage device, and stores form images, character reading results, and barcode reading results.
store.

【0021】図2は帳票読み取りの処理過程を示す流れ
図である。ステップ200で帳票画像を入力し、ステッ
プ201で入力された帳票画像を探索しバーコード位置
を検出する。ステップ202はバーコード認識過程であ
り、検出したバーコード位置座標を基に帳票画像の画素
データを切出しバーコードを復号する。ステップ203
ではバーコード認識結果がアクセプトかリジェクトかを
判定し、もし、アクセプトであれば、ステップ204で
バーコード読み取り結果に対応する文書(帳票)識別情報
を設定する。一方、もし、バーコード認識結果がリジェ
クトの場合は、ステップ205で帳票画像から文書(帳
票)の種類を識別し、文書(帳票)識別情報を設定する。
ステップ205は例えば、特開昭61―75477号公
報に記載のように枠線を利用して帳票の種類を識別して
もよい。ステップ207は画像蓄積部110に帳票画像
を保管、検索するため、バーコード読み取り結果をもと
に検索用のキーとなるインデックスを、入力した帳票画
像に対して付与する。次いで、文字読み取り処理に移
り、ステップ208で文書(帳票)識別情報に従って、書
式情報(フォーマットパラメータ)を設定する。そし
て、ステップ209で当該書式情報を用いて文字抽出・
文字識別を行う。なお、書式情報を用いず、帳票画像か
ら任意位置にある文字行を抽出し、当該文字行から文字
を切出して文字認識を行ってもよい。
FIG. 2 is a flowchart showing the process of reading a form. In step 200, a form image is input. In step 201, the input form image is searched to detect a barcode position. Step 202 is a barcode recognition process, in which pixel data of a form image is cut out based on the detected barcode position coordinates and the barcode is decoded. Step 203
Then, it is determined whether the barcode recognition result is an accept or a reject. If the barcode recognition result is an accept, the document (form) identification information corresponding to the barcode reading result is set in step 204. On the other hand, if the barcode recognition result is reject, the type of document (form) is identified from the form image in step 205, and document (form) identification information is set.
In step 205, for example, the type of the form may be identified using a frame line as described in JP-A-61-75477. In step 207, an index serving as a search key is added to the input form image based on the barcode reading result in order to store and search the form image in the image storage unit 110. Next, the process proceeds to a character reading process, and in step 208, format information (format parameters) is set according to the document (form) identification information. Then, in step 209, character extraction and
Perform character identification. Instead of using the format information, a character line at an arbitrary position may be extracted from the form image, and characters may be cut out from the character line to perform character recognition.

【0022】図3は帳票読み取りの他の一実施例を説明
する処理過程の流れ図であり、解像度を切換えて帳票読
み取りを行う処理過程を示す。ステップ300でスキャ
ナ部101で採取した解像度を有する画像である原2値
化画像を入力する。そして、ステップ301で当該原2
値化画像から縮小画像を生成する。ステップ301の縮
小画像の生成は、例えば、特開昭63―131274号
公報(特願昭61―276553号、昭和61(198
6)年11月21日出願、発明者:嶋好博、柏岡誠治、
東野純一、出願人:日立製作所)に述べられている。ス
テップ302で予め与えられている認識制御フラグを設
定する。認識制御フラグにより3つの制御方法の内の一
つの制御方法を選択する。3つの制御方法は、バーコー
ド認識と文字認識の両方の実行、バーコード認識のみの
実行、文字認識のみの実行、の制御方法である。ステッ
プ304では認識制御フラグを判定する。条件320で
示すように、バーコード認識と文字認識の両方の実行の
場合、先ず、ステップ305で原2値化画像を選択し、
ステップ306で選択した原2値化画像を探索してバー
コード位置を検出する。そして、ステップ307でバー
コード認識を行う。その後、ステップ308で先にステ
ップ301で生成した縮小画像を選択し、ステップ30
9で文字を抽出し、ステップ310で文字認識を行う。
一方、条件321で示すように、バーコード認識のみの
実行の場合、ステップ311で原2値化画像を選択し、
ステップ312でバーコード位置を検出し、ステップ3
13でバーコードを認識する。他方、条件322で示す
ように、文字認識のみの実行の場合、ステップ314で
縮小画像を選択し、ステップ315で文字抽出をおこな
い、ステップ316で文字認識を行う。
FIG. 3 is a flowchart of a process for explaining another embodiment of the form reading, and shows a process of reading the form by switching the resolution. In step 300, an original binarized image which is an image having a resolution collected by the scanner unit 101 is input. Then, in step 301, the original 2
A reduced image is generated from the binarized image. The generation of the reduced image in step 301 is described in, for example, JP-A-63-131274 (Japanese Patent Application Nos. 61-276553 and 1986).
6) Filed on November 21, 2011, inventor: Yoshihiro Shima, Seiji Kashioka,
Junichi Higashino, Applicant: Hitachi, Ltd.) At step 302, a previously set recognition control flag is set. One of the three control methods is selected by the recognition control flag. The three control methods are control methods of executing both barcode recognition and character recognition, executing only barcode recognition, and executing only character recognition. In step 304, a recognition control flag is determined. As shown by the condition 320, in the case of performing both barcode recognition and character recognition, first, in step 305, an original binary image is selected,
The original binary image selected in step 306 is searched to detect the barcode position. Then, in step 307, barcode recognition is performed. Thereafter, in step 308, the reduced image generated in step 301 is selected, and in step 30
In step 9, characters are extracted, and in step 310, character recognition is performed.
On the other hand, as shown by the condition 321, in the case of executing only barcode recognition, an original binary image is selected in step 311;
In step 312, the position of the bar code is detected.
At 13 the barcode is recognized. On the other hand, as shown by the condition 322, when only character recognition is executed, a reduced image is selected in step 314, characters are extracted in step 315, and character recognition is performed in step 316.

【0023】図4はバーコード位置検出部103の処理
過程を示すブロック図である。画像入力部400では2
値画像データを受け取り、処理領域設定部401でバー
コード行を探索する領域を設定する。そして、ドットラ
ン変換部402で入力された2値画像データに対して処
理領域内部を画素(ドット)から黒ラン(走査線方向の黒
色の線分の集合)に変換する。そして、汚れ接触分離部
403でバーコード近辺の汚れを除去したりバーに接触
している文字を分離したりする。ここでは、長さが短い
ランの除去とランの90度回転を繰り返して、汚れ接触
の分離を行う。なお、ランの90度回転に関しては、特
開昭63―131274号公報にランの走査方向の変換
として述べられている。外接矩形抽出部404では黒ラ
ンを用いて画像上の黒色の塊である連結成分を抽出し、
さらに、その連結成分を取り囲む外接矩形を抽出する。
次いで、バーコード行抽出部405において、当該矩形
データからバーコード行の4隅の頂点座標を抽出する。
バーコード行抽出部405の内部処理としては、先ず、
バー矩形選択部405でバーに該当する矩形を矩形の高
さと幅を基準にして選択する。図5はバー矩形の選択基
準を説明する図である。黒画素の塊500に対して、そ
れを取り囲む外接矩形501が求まっている。選択基準
の条件は、当該外接矩形501の高さh510が、所定
範囲即ち、最大値hmax511と最小値hmin51
0の間にあること、並びに、外接矩形501の幅w50
3が、所定範囲即ち、最大値wmax513と最小値w
min512の間にあること、の2つの条件とも満たす
ことである。上記条件を満たす外接矩形は、バーを取り
囲む外接矩形の可能性があるとして、抽出する。そし
て、バーコード行候補の抽出部412ではバーに該当す
る矩形を距離の近いもの同士を融合していき細長い大き
な矩形を生成し、バーコード行の候補として当該融合矩
形を抽出する。次いで、行の左右端検出部413では、
抽出したバーコード行の候補(融合矩形)の左端と右端
の座標を検出する。図7は融合矩形の説明図である。バ
ーの外接矩形720、721、722、723、724
はバーコード行候補の抽出部412で融合され細長い融
合矩形700が生成される。融合矩形の四隅の頂点の
内、左上頂点701の座標(xmin,ymin)と右
下頂点702の座標(xmax,ymax)が、バーコ
ード行候補の抽出部412から出力される。行の左右端
検出部413では左端の矩形720を選択し、当該左端
矩形720の左上頂点710の座標(xlt,ylt)
と左下頂点711の座標(xlb,ylb)を検出す
る。また、右端の矩形724を選択し、当該右端矩形7
24の右上頂点712の座標(xrt,yrt)と右下
頂点713の座標(xrb,yrb)を検出する。次い
で、バーコード行選択部414において、複数個抽出さ
れたバーコード行候補から高さと幅及びバーコード行候
補の内部に含まれるバー矩形の個数を基準にしてバーコ
ード行を選択する。図6はバーコード行の選択基準を説
明する図である。バーコード行を選択する条件は、バー
コード行候補600の高さhl601が所定範囲、即
ち、最大値hlmax611と最小値hlmin610
の間にあること、幅wl602が所定範囲、即ち、最大
値wlmax613と最小値wlmin612にあるこ
と、バーコード行候補600の内部に含まれる矩形の個
数が所定値より多いことである。次いで、バーコード行
と枠との対応付け部406では、帳票の枠情報が既に抽
出されている場合、枠と当該枠内にあるバーコード行と
を対応付ける。なお、枠情報との対応付けに関しては、
後出の図8、図10、図11で詳細に説明する。リトラ
イ判定部410では、バーコード行が正常に抽出された
かどうかを判定し、もし正常に抽出されていない場合
は、汚れや文字接触が発生しているとして、再度、汚れ
接触分離部403でバーコード近辺の汚れを除去したり
バーに接触している文字を分離したりする。リトライ
時、短いランを除去するパラメータを変更し、多くのラ
ンを除去する。縦長方向のバーコード行の検出の為に
は、矩形回転部407を設けており、連結成分の外接矩
形の座標を90度回転し、縦長方向のバーコード行を横
長方向のバーコード行に変換する。そして、先に述べた
バーコード行抽出部405と同じく、バーコード行抽出
部408で、バーコード行を抽出する。さらに、行矩形
回転部409においてバーコード行を90度回転し、縦
長方向のバーコードに変換する。以上述べたように、バ
ーコード行の方向が縦長方向でも横長方向であっても、
バーコード行が抽出できるよう、バーコード行が横方向
に印刷されていると仮定してバーコード行を抽出し、次
いで、バーコード行が縦方向に印刷されていると仮定し
てバーコード行を抽出し、これら両方の抽出結果を融合
してバーコード行位置として出力する図9はバーコード
認識部104の処理過程を説明する流れ図である。ステ
ップ900で入力されたバーコード行の四隅710、7
11、712、713の頂点座標を設定し、ステップ9
01で当該頂点座標を基にバーコード行内に相当する画
像を切出す。さらに、ステップ902で切出した画像の
傾きを補正する。補正する傾き角はバーコード行の四隅
710、711、712、713の頂点座標を基に算出
する。画像の傾き補正方法は、例えば、特開昭63―1
31274号公報に述べられている。次いで、ステップ
903でバーコード行内の中心線を求め、当該中心線上
の画素(ドット)データから白黒長さを検出する。図12
はバーコード行内の画素データから白黒長さを検出する
方法を説明する図である。傾き補正したバーコード行内
の画像1200に対して、所定位置に中心線1201を
設定し、当該線上の画素データにアクセスする。当該線
上の画素データは1204に示すように黒レベル120
2と白レベル1203の値を有し、線がバーを横切る間
は黒レベル、バーとバーとの間の空白部分を横切る間は
白レベルとなる。画素データ1204から白黒の長さを
検出し、ステップ904で白黒長さによりバーコードを
復号する。
FIG. 4 is a block diagram showing a processing procedure of the bar code position detecting section 103. In the image input unit 400, 2
Upon receiving the value image data, the processing area setting unit 401 sets an area where a barcode row is searched. Then, for the binary image data input by the dot run conversion unit 402, the inside of the processing area is converted from pixels (dots) to black runs (a set of black line segments in the scanning line direction). Then, the dirt contact separation unit 403 removes dirt near the bar code or separates characters in contact with the bar. Here, the removal of the short run and the 90-degree rotation of the run are repeated to separate the dirt contact. The rotation of the run by 90 degrees is described in JP-A-63-131274 as conversion of the scan direction of the run. The circumscribed rectangle extracting unit 404 extracts connected components, which are black blocks on the image, using a black run,
Further, a circumscribed rectangle surrounding the connected component is extracted.
Next, the barcode line extraction unit 405 extracts the vertex coordinates of the four corners of the barcode line from the rectangular data.
First, as internal processing of the barcode line extraction unit 405,
A bar rectangle selection unit 405 selects a rectangle corresponding to a bar based on the height and width of the rectangle. FIG. 5 is a view for explaining the selection criteria of the bar rectangle. A circumscribed rectangle 501 surrounding the black pixel block 500 is determined. The condition of the selection criterion is that the height h510 of the circumscribed rectangle 501 is within a predetermined range, that is, the maximum value hmax511 and the minimum value hmin51.
0 and the width w50 of the circumscribed rectangle 501
3 is within a predetermined range, that is, the maximum value wmax 513 and the minimum value w
min512. A circumscribed rectangle that satisfies the above condition is extracted as a possibility of a circumscribed rectangle surrounding the bar. Then, the barcode line candidate extraction unit 412 fuses rectangles corresponding to the bars with those having a short distance to generate an elongated large rectangle, and extracts the fusion rectangle as a barcode line candidate. Next, in the left and right end detection units 413,
The coordinates of the left end and the right end of the extracted barcode line candidate (fusion rectangle) are detected. FIG. 7 is an explanatory diagram of the fusion rectangle. Bar circumscribed rectangles 720, 721, 722, 723, 724
Are fused by the barcode line candidate extraction unit 412 to generate an elongated fused rectangle 700. The coordinates (xmin, ymin) of the upper left vertex 701 and the coordinates (xmax, ymax) of the lower right vertex 702 among the four corner vertices of the fusion rectangle are output from the barcode line candidate extraction unit 412. The left and right end detection unit 413 of the row selects the left end rectangle 720, and the coordinates (xlt, ylt) of the upper left vertex 710 of the left end rectangle 720
And the coordinates (xlb, ylb) of the lower left vertex 711 are detected. Further, the rightmost rectangle 724 is selected, and the rightmost rectangle 724 is selected.
24, the coordinates (xrt, yrt) of the upper right vertex 712 and the coordinates (xrb, yrb) of the lower right vertex 713 are detected. Next, the barcode line selection unit 414 selects a barcode line from the plurality of extracted barcode line candidates based on the height and width and the number of bar rectangles included in the barcode line candidates. FIG. 6 is a view for explaining the selection criteria of the barcode row. The condition for selecting a barcode line is that the height hl601 of the barcode line candidate 600 is within a predetermined range, that is, the maximum value hlmax611 and the minimum value hlmin610.
, The width wl602 is within a predetermined range, that is, the maximum value wlmax 613 and the minimum value wlmin 612, and the number of rectangles included in the barcode line candidate 600 is larger than the predetermined value. Next, in a case where the frame information of the form has already been extracted, the associating unit 406 for associating the barcode row with the frame associates the frame with the barcode line in the frame. In addition, regarding the association with the frame information,
This will be described in detail with reference to FIGS. 8, 10 and 11 described later. The retry determination unit 410 determines whether or not the bar code line has been extracted normally. If the bar code line has not been extracted normally, it is determined that dirt or character contact has occurred, and the dirt contact separation unit 403 re-determines the bar code line. Removes dirt near the code and separates characters in contact with the bar. At retry, change the parameter to remove short runs and remove many runs. In order to detect a vertically long barcode line, a rectangular rotation unit 407 is provided, which rotates the coordinates of the circumscribed rectangle of the connected component by 90 degrees, and converts the vertically long barcode line into a horizontally long barcode line. I do. Then, similarly to the bar code line extraction unit 405 described above, a bar code line extraction unit 408 extracts a bar code line. Furthermore, the bar code row is rotated by 90 degrees in the row rectangle rotation unit 409, and is converted into a vertically long bar code. As described above, whether the direction of the barcode row is the portrait direction or the landscape direction,
The bar code lines are extracted assuming that the bar code lines are printed horizontally so that the bar code lines can be extracted, and then the bar code lines are assumed to be printed vertically. Is extracted, and these two extraction results are combined and output as a barcode line position. FIG. 9 is a flowchart for explaining the processing process of the barcode recognition unit 104. Four corners 710, 7 of the bar code line input in step 900
The vertex coordinates of 11, 712, and 713 are set, and step 9
At 01, an image corresponding to the bar code line is cut out based on the vertex coordinates. Further, the inclination of the image extracted in step 902 is corrected. The inclination angle to be corrected is calculated based on the vertex coordinates of the four corners 710, 711, 712, 713 of the barcode row. For example, Japanese Patent Application Laid-Open No. 63-1
No. 31,274. Next, in step 903, the center line in the bar code row is obtained, and the black and white length is detected from the pixel (dot) data on the center line. FIG.
FIG. 4 is a diagram for explaining a method of detecting a black and white length from pixel data in a barcode row. A center line 1201 is set at a predetermined position with respect to the image 1200 in the barcode row whose inclination has been corrected, and pixel data on the line is accessed. The pixel data on the line has a black level 120 as shown by 1204.
It has a value of 2 and a white level 1203, and is a black level while the line crosses the bar, and a white level while it crosses a blank portion between the bars. The length of black and white is detected from the pixel data 1204, and in step 904, a barcode is decoded based on the length of black and white.

【0024】図10は表形式でありかつ多様な様式を有
する帳票から、表の枠を検出するとともに任意の位置に
印刷されたバーコードを検出して、枠と枠内のバーコー
ドとを対応付ける処理過程を示す流れ図である。処理過
程は先ず、ステップ1000で帳票画像を入力する。そ
して、ステツプ1001で表の横線を抽出し、ステップ
1002で表の縦線を抽出する。そして、ステップ10
03で上記横線と縦線とを用いて枠を抽出する。図11
は枠を抽出する処理を説明する図である。帳票画像11
00は、1110に示すような表が印刷されており、表
の各枠には文字行1111、1112やバーコード11
13、1114が印刷されている。帳票画像1100か
ら横線を抽出した結果を1123に示す。1120、1
121、1122で示す横線H1、H2、H3が抽出さ
れる。次いで、縦線を抽出した結果を1133にしま
す。1130、1131、1132で示す縦線V1、V
2,V3が抽出される。1144は枠を抽出した結果で
あり、1140、1141、1142、1143で示す
枠F1、F2、F3、F4が抽出される。当該枠は左か
ら右方向へ、上から下方向へ順次相対的な配置関係を示
すように番号を付けている。図8はバーコード行のデー
タと枠データの形式を説明する図である。バーコード行
のデータは800に示すように、帳票に印刷されている
バーコード行の個数801を具備している。そして、1
個目のバーコードデータは802に、第n個目のバーコ
ードデータは820に設定されている。第1個のバーコ
ード行のデータとしては、バーコードの方向を示す縦横
識別フラグ803、当該バーコードが存在する枠番号8
04、バーコード行の左上頂点座標805、806、左
下頂点座標807、808、右上頂点座標809、81
0、右下頂点座標811、812が設定される。一方、
枠データは840に示すように、帳票に存在する枠の個
数841を具備し、1個目の枠情報850、第m1個目
の枠情報852、第m2個目の枠情報853が設定され
る。この説明図では第1個目のバーコード行802が第
m1個目の枠情報852と対応付けられており、第n個
目のバーコード行820が第m2個目の枠情報854と
対応付けられている。図10のステップ1004の枠抽
出の結果は枠データ840として保存される。次いで、
ステツプ1004でバーコード位置を検出し、ステップ
1005でバーコードを認識する。抽出したバーコード
行は800に示す形式のバーコードデータとして保存さ
れる。そして、ステップ1006で枠情報とバーコード
の対応付けを行う。この時、バーコード行の位置座標と
枠情報の内の枠の四隅の位置座標とを順次比較し、当該
バーコード行を内部にもつ枠を検出し、860、861
で示すような対応付けを行う。具体的には、804、8
22で示す枠対応番号の形式で各バーコード行に対応付
けを具備させる。ステップ1007では、論理的な配置
関係を有する枠の内、特定の枠を論理構造として指定す
ると、当該枠内にあるバーコード行を選択して出力す
る。
FIG. 10 shows the detection of a table frame and a barcode printed at an arbitrary position from a form having a table format and various forms, and associates the frame with the barcode in the frame. It is a flowchart which shows a process. In the process, first, at step 1000, a form image is input. Then, in step 1001, the horizontal line of the table is extracted, and in step 1002, the vertical line of the table is extracted. And step 10
At 03, a frame is extracted using the horizontal and vertical lines. FIG.
FIG. 9 is a diagram for explaining a process of extracting a frame. Form image 11
In the table 00, a table as shown in 1110 is printed, and character lines 1111 and 1112 and a barcode 11 are printed in each frame of the table.
13, 1114 are printed. The result of extracting the horizontal line from the form image 1100 is shown in 1123. 1120, 1
Horizontal lines H1, H2, and H3 indicated by 121 and 1222 are extracted. Next, the result of extracting the vertical line is set to 1133. Vertical lines V1, V indicated by 1130, 1311, 1132
2, V3 are extracted. Reference numeral 1144 denotes a result of extracting frames, and frames F1, F2, F3, and F4 indicated by 1140, 1141, 1142, and 1143 are extracted. The frames are numbered so as to indicate a relative positional relationship from left to right and from top to bottom. FIG. 8 is a diagram for explaining the format of the barcode row data and the frame data. As shown by 800, the data of the bar code line has the number 801 of the bar code lines printed on the form. And 1
The 802th barcode data is set to 820, and the 820th barcode data is set to 820. As the data of the first barcode row, a vertical / horizontal identification flag 803 indicating the direction of the barcode, a frame number 8 in which the barcode exists,
04, upper left vertex coordinates 805 and 806, lower left vertex coordinates 807 and 808, upper right vertex coordinates 809 and 81 of the barcode line
0, lower right vertex coordinates 811 and 812 are set. on the other hand,
The frame data includes the number 841 of frames present in the form as shown by 840, and the first frame information 850, the m1th frame information 852, and the m2th frame information 853 are set. . In this explanatory diagram, the first barcode row 802 is associated with the m1th frame information 852, and the nth barcode row 820 is associated with the m2th frame information 854. Have been. The result of the frame extraction in step 1004 of FIG. 10 is stored as frame data 840. Then
At step 1004, the barcode position is detected, and at step 1005, the barcode is recognized. The extracted barcode row is stored as barcode data in the format shown in 800. Then, in step 1006, the frame information is associated with the barcode. At this time, the position coordinates of the barcode line are sequentially compared with the position coordinates of the four corners of the frame in the frame information, and a frame having the barcode line inside is detected.
Is performed as shown in FIG. Specifically, 804, 8
Each barcode row is provided with a correspondence in the form of a frame correspondence number indicated by 22. In step 1007, when a specific frame is designated as a logical structure among the frames having a logical arrangement relationship, a barcode line in the frame is selected and output.

【0025】図13は本発明の他の一実施例であり、バ
ーコード行の方向を利用して帳票の方向を推定し、帳票
の方向を補正して文字読み取りを行う処理過程を示す流
れ図である。ステップ1300で画像を入力し、ステッ
プ1301で連結成分の外接矩形を抽出する。そして、
ステップ1302で横方向のバーコード行を抽出し、ス
テップ1303で当該バーコードを復号する。また、ス
テップ1304で連結成分の外接矩形を90度回転し、
ステップ1305で縦方向のバーコード行を抽出し、ス
テップ1306で当該バーコードを復号する。次いで、
バーコードの有無判定1307を行う。ここでは、バー
コードが無い場合1308では、ステップ1312に示
すように回転角は不明とする。また、バーコードが両方
向ある場合1311では、同じく、ステップ1315に
示すように回転角は不明とする。一方、横方向バーコー
ドのみある場合1309では、ステップ1313に示す
ように帳票の方向は横方向と推定し回転角を設定する。
また、縦方向バーコードのみある場合1310では、ス
テップ1314に示すように帳票の方向は縦方向と推定
し回転角を設定する。ステップ1316では設定した回
転角に従って入力画像の回転を補正する。そして、ステ
ップ1317で文字を抽出し、ステップ1318で文字
認識をおこない、文字読み取り結果を出力する。
FIG. 13 is a flow chart showing another embodiment of the present invention, in which the direction of a form is estimated by using the direction of a bar code line, the direction of the form is corrected, and character reading is performed. is there. In step 1300, an image is input, and in step 1301, a circumscribed rectangle of the connected component is extracted. And
At step 1302, a horizontal bar code line is extracted, and at step 1303, the bar code is decoded. Also, in step 1304, the circumscribed rectangle of the connected component is rotated by 90 degrees,
In step 1305, a vertical barcode row is extracted, and in step 1306, the barcode is decoded. Then
A barcode presence / absence determination 1307 is performed. Here, in the case where there is no barcode 1308, the rotation angle is unknown as shown in step 1312. In the case where the barcode is present in both directions 1311, similarly, the rotation angle is unknown as shown in step 1315. On the other hand, if there is only a horizontal barcode 1309, the direction of the form is estimated to be horizontal and the rotation angle is set as shown in step 1313.
In the case where there is only a vertical barcode 1310, the direction of the form is estimated to be the vertical direction and the rotation angle is set as shown in step 1314. In step 1316, the rotation of the input image is corrected according to the set rotation angle. In step 1317, characters are extracted. In step 1318, characters are recognized, and the result of reading characters is output.

【0026】[0026]

【発明の効果】本発明によれば、バーコードの位置を自
動的に検出ことができるため、バーコードが任意の位置
に印刷された帳票を読み取ることができる。また、多様
な様式の帳票にバーコードを印刷出来るため、帳票設計
が容易である。
According to the present invention, since the position of a barcode can be automatically detected, a form on which a barcode is printed at an arbitrary position can be read. In addition, since barcodes can be printed on forms in various forms, form designing is easy.

【0027】また、本発明によれば、任意の位置にある
バーコードの読み取り結果を利用して帳票の書式(フォ
ーマットパラメータ)を設定できるため、帳票種類の識
別情報を固定位置に印刷する必要がなく、帳票設定の自
由度が増す。
Further, according to the present invention, since the form (format parameter) of the form can be set by using the reading result of the barcode at an arbitrary position, it is necessary to print the form type identification information at a fixed position. And the degree of freedom in form setting increases.

【0028】さらに、本発明によれば、バーコードの読
み取り結果をインデックスとして用いて、帳票画像を蓄
積、検索できるため、検索用のキーワードを特別に付与
する手間が省略できる。
Further, according to the present invention, the form image can be stored and searched using the bar code reading result as an index, so that the trouble of specially assigning a search keyword can be omitted.

【0029】本発明によれば、帳票画像の解像度を切換
えて、読み取り処理を行うことができるため、読み取り
処理に要する時間を短縮することができる。
According to the present invention, since the reading process can be performed by switching the resolution of the form image, the time required for the reading process can be reduced.

【0030】また、本発明によれば、バーコード行位置
を矩形データを用い検出し、バーコードの復号を当該行
内の画像データを切出して行うため、単純に画像データ
のみでバーコードを読み取る場合と比して、処理量が少
なく、バーコード読み取りに要する処理時間を短縮する
ことができる。
According to the present invention, the bar code line position is detected using rectangular data, and the bar code is decoded by cutting out the image data in the line. As compared with the above, the processing amount is small, and the processing time required for reading the barcode can be reduced.

【0031】さらに、本発明によれば、バーコードと帳
票内の表の枠とを対応付けることができるため、論理的
な配置関係を指定された枠に属するバーコードのみを選
択して出力するという利点がある。
Further, according to the present invention, since a barcode can be associated with a table frame in a form, only barcodes belonging to a frame whose logical arrangement relation is specified are selected and output. There are advantages.

【0032】また、本発明によれば、任意の位置にある
バーコード行の方向を利用して帳票の方向を修正するこ
とができるため、帳票の向きを基準方向にスキャナ設定
時、整頓しなくとも、正常な帳票読み取りが実行でき
る。
Further, according to the present invention, the direction of a form can be corrected by using the direction of a bar code line at an arbitrary position. In both cases, normal form reading can be executed.

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

【図1】本発明の一実施例である帳票読み取りシステム
の構成図である。
FIG. 1 is a configuration diagram of a form reading system according to an embodiment of the present invention.

【図2】帳票読み取りの処理過程を示す流れ図である。FIG. 2 is a flowchart showing a process of reading a form.

【図3】帳票読み取りの他の一実施例を説明する処理過
程の流れ図であり、解像度を切換えて帳票読み取りを行
う処理過程を示す。
FIG. 3 is a flowchart of a process for explaining another embodiment of form reading, showing a process of reading a form by switching resolutions.

【図4】バーコード位置検出部103の処理過程を示す
ブロック図である。
FIG. 4 is a block diagram illustrating a process performed by a barcode position detection unit 103;

【図5】バー矩形の選択基準を説明する図である。FIG. 5 is a diagram illustrating a selection criterion of a bar rectangle.

【図6】バーコード行の選択基準を説明する図である。FIG. 6 is a diagram illustrating a selection criterion of a barcode row.

【図7】融合矩形の説明図である。FIG. 7 is an explanatory diagram of a fusion rectangle.

【図8】バーコード行のデータと枠データの形式を説明
する図である。
FIG. 8 is a diagram illustrating the format of bar code line data and frame data.

【図9】バーコード認識部104の処理過程を説明する
流れ図である。
FIG. 9 is a flowchart illustrating a process performed by a barcode recognition unit 104;

【図10】表形式でありかつ多様な様式を有する帳票か
ら、表の枠を検出するとともに任意の位置に印刷された
バーコードを検出して、枠と枠内のバーコードとを対応
付ける処理過程を示す流れ図である。
FIG. 10 is a process of detecting a table frame, detecting a barcode printed at an arbitrary position, and associating the frame with a barcode in the frame, from a form having a table format and various forms. FIG.

【図11】枠を抽出する処理を説明する図である。FIG. 11 is a diagram illustrating a process of extracting a frame.

【図12】バーコード行内の画素データから白黒長さを
検出する方法を説明する図である。
FIG. 12 is a diagram illustrating a method of detecting a black-and-white length from pixel data in a barcode row.

【図13】本発明の他の一実施例であり、バーコード行
の方向を利用して帳票の方向を推定し、帳票の方向を補
正して文字読み取りを行う処理過程を示す流れ図であ
る。
FIG. 13 is a flowchart showing a process of estimating the direction of a form by using the direction of a bar code line, correcting the form direction, and reading characters according to another embodiment of the present invention.

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

103…バーコード位置検出部、204…バーコード読
み取り結果に対応する帳票識別情報を設定するステッ
プ、412…バーコード行候補の抽出部、407…矩形
回転部、700…融合矩形、860…バーコード行と枠
との対応付け、1100…対象とする帳票であり、単数
または複数のバーコードが任意の位置に印刷されている
帳票。
103: bar code position detection unit, 204: step of setting form identification information corresponding to the bar code reading result, 412: bar code line candidate extraction unit, 407: rectangle rotation unit, 700: fusion rectangle, 860: bar code Correspondence between rows and frames, 1100... A target form, in which one or more barcodes are printed at an arbitrary position.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 新庄 広 東京都国分寺市東恋ケ窪一丁目280番地 株式会社日立製作所中央研究所内 (72)発明者 中島 和樹 東京都国分寺市東恋ケ窪一丁目280番地 株式会社日立製作所中央研究所内 Fターム(参考) 5B072 CC04 CC24 CC38 DD16 DD21 FF00  ──────────────────────────────────────────────────の Continuing on the front page (72) Inventor Hiroshi Shinjo 1-280 Higashi-Koikekubo, Kokubunji-shi, Tokyo Inside the Hitachi, Ltd. Central Research Laboratory (72) Inventor Kazuki Nakajima 1-280 Higashi-Koikekubo, Kokubunji-shi, Tokyo Hitachi, Ltd. Central Research Laboratory F-term (reference) 5B072 CC04 CC24 CC38 DD16 DD21 FF00

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】バーコードが任意位置に印刷された帳票の
表面画像に対する帳票読み取り方法において、その位置
が未知であるバーコード行の位置を四角形の頂点座標と
して検出して、当該四角形内のバーコードを読み取り、
当該バーコードの読み取り結果に従って文字読み取り用
の書式情報を切換え、帳票の表面画像内の文字読み取り
を行うことを特徴とする帳票読み取り方法。
1. A method for reading a form on a surface image of a form on which a bar code is printed at an arbitrary position, wherein a position of a bar code line whose position is unknown is detected as coordinates of a vertex of a rectangle, and a bar within the rectangle is detected. Read the code,
A form reading method characterized by switching the format information for character reading according to the bar code reading result and reading characters in the front surface image of the form.
【請求項2】バーコードが任意位置に印刷された帳票の
表面画像に対する帳票読み取り方法において、その位置
が未知であるバーコード行の位置を四角形の頂点座標と
して検出して、当該四角形内のバーコードを読み取り、
当該バーコードの読み取り結果をインデックスとして帳
票画像を種類別に蓄積することを特徴とする帳票読み取
り方法。
2. A method for reading a form on a surface image of a form on which a bar code is printed at an arbitrary position, wherein a position of a bar code line whose position is unknown is detected as vertex coordinates of a rectangle, and a bar within the rectangle is detected. Read the code,
A form reading method, wherein a form image is stored for each type using the read result of the barcode as an index.
【請求項3】バーコードが任意位置に印刷された帳票の
表面画像から印刷されたバーコードと記入文字を読み取
る帳票読み取り方法において、解像度の異なる複数個の
画像を生成し、バーコード読み取り処理と文字読み取り
処理で異なる解像度の画像を読み取り処理対象とするよ
う画像の解像度を切換え、読み取り用に入力することを
特徴とする帳票読み取り方法。
3. A form reading method for reading a bar code and an entry character from a surface image of a form on which a bar code is printed at an arbitrary position, wherein a plurality of images having different resolutions are generated, and a bar code reading process is performed. A form reading method characterized by switching the resolution of an image so that images of different resolutions are to be processed in a character reading process and inputting the read image.
【請求項4】帳票内の任意位置にあるバーコードの読み
取り方法は、入力画像の連結成分を抽出し、連結成分の
外接矩形を抽出し、外接矩形の寸法によりバーの候補矩
形を選択し、候補矩形を周囲の候補矩形と融合してバー
コード行の候補を抽出し、当該バーコード行候補の寸
法、行内の矩形数をもとにバーコード行を決定し、当該
バーコード行の4隅の頂点座標を基にバーコード行内の
白黒のドット画像を切出してバーコードを復号すること
を特徴とするバーコード読み取り方法。
4. A method of reading a barcode at an arbitrary position in a form includes extracting a connected component of an input image, extracting a circumscribed rectangle of the connected component, selecting a candidate rectangle of a bar according to the size of the circumscribed rectangle, The candidate rectangle is fused with the surrounding candidate rectangles to extract bar code line candidates, the bar code line is determined based on the size of the bar code line candidate, and the number of rectangles in the line, and the four corners of the bar code line are determined. A bar code reading method comprising: extracting a black and white dot image in a bar code line based on the vertex coordinates of the bar code and decoding the bar code.
【請求項5】枠を有する表が印刷された帳票であって、
その枠の幾何学的な座標位置が未知であるが、枠同士の
論理的な配置関係が既知である帳票で、かつ、複数個ま
たは単数個のバーコードが任意位置に印刷された帳票の
表面画像に対する帳票読み取り方法において、表の枠情
報を抽出し、表の枠内に印刷されたバーコード行に対し
て、表の枠情報と当該枠内のバーコードとを対応付け、
予め論理的な配置が指定された枠内のバーコードを選択
して出力することを特徴とする帳票内バーコード読み取
り方法。
5. A form on which a table having a frame is printed,
The surface of a form where the geometric coordinate position of the frame is unknown, but the logical arrangement relationship between the frames is known, and a plurality or a single barcode is printed at an arbitrary position In the form reading method for the image, the table frame information is extracted, and the bar code line printed in the table frame is associated with the table frame information and the barcode in the frame,
A barcode reading method in a form, wherein a barcode in a frame whose logical arrangement is designated in advance is selected and output.
【請求項6】バーコード行が横方向に印刷されていると
仮定してバーコード行を抽出し、次いで、バーコード行
が縦方向に印刷されていると仮定してバーコード行を抽
出し、これら両方の抽出結果を融合してバーコード行位
置として出力するとともに、抽出したバーコード行の方
向から帳票方向を推定し、当該帳票の表面画像を帳票方
向に従って回転することを特徴とする帳票読み取り方
法。
6. Extracting a bar code line assuming that the bar code line is printed in a horizontal direction, and then extracting a bar code line assuming that the bar code line is printed in a vertical direction. Combining the two extraction results and outputting the barcode line position, estimating the form direction from the direction of the extracted barcode line, and rotating the surface image of the form according to the form direction. Read method.
JP11052248A 1999-03-01 1999-03-01 Document readout method Pending JP2000251010A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11052248A JP2000251010A (en) 1999-03-01 1999-03-01 Document readout method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11052248A JP2000251010A (en) 1999-03-01 1999-03-01 Document readout method

Publications (1)

Publication Number Publication Date
JP2000251010A true JP2000251010A (en) 2000-09-14

Family

ID=12909443

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11052248A Pending JP2000251010A (en) 1999-03-01 1999-03-01 Document readout method

Country Status (1)

Country Link
JP (1) JP2000251010A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002279196A (en) * 2001-03-16 2002-09-27 Daiwa Securities Group Inc Business form storage system and tag for indicating business form storage period
WO2005002202A1 (en) * 2003-06-27 2005-01-06 Oki Electric Industry Co., Ltd. Fill-in document creation device and fill-in document
JP2008171354A (en) * 2007-01-15 2008-07-24 Oki Electric Ind Co Ltd Automatic transaction device
US7431214B2 (en) 2003-02-21 2008-10-07 Fujitsu Limited Bar-code reader and method of reading bar code
JP2013040895A (en) * 2011-08-19 2013-02-28 Dainippon Printing Co Ltd Bar code visual inspection system, and bar code visual inspection method
JP7459730B2 (en) 2020-09-04 2024-04-02 カシオ計算機株式会社 Reading device, program, and reading method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002279196A (en) * 2001-03-16 2002-09-27 Daiwa Securities Group Inc Business form storage system and tag for indicating business form storage period
US7431214B2 (en) 2003-02-21 2008-10-07 Fujitsu Limited Bar-code reader and method of reading bar code
WO2005002202A1 (en) * 2003-06-27 2005-01-06 Oki Electric Industry Co., Ltd. Fill-in document creation device and fill-in document
JP2008171354A (en) * 2007-01-15 2008-07-24 Oki Electric Ind Co Ltd Automatic transaction device
JP2013040895A (en) * 2011-08-19 2013-02-28 Dainippon Printing Co Ltd Bar code visual inspection system, and bar code visual inspection method
JP7459730B2 (en) 2020-09-04 2024-04-02 カシオ計算機株式会社 Reading device, program, and reading method

Similar Documents

Publication Publication Date Title
JP2930612B2 (en) Image forming device
JP2835274B2 (en) Image recognition device
CN101923644B (en) Image processing method, image processing apparatus and image forming apparatus
US20020015525A1 (en) Image processor for character recognition
US7123768B2 (en) Apparatus and method for detecting a pattern
US20020051573A1 (en) Two-dimensional code extracting method
JP2007122500A (en) Character recognition device, character recognition method and character data
JP2000251010A (en) Document readout method
JPH0418351B2 (en)
JPH0147828B2 (en)
JP2006019893A (en) Image distortion correcting device, image reader, image forming apparatus, program, and storage medium
JP3268552B2 (en) Area extraction method, destination area extraction method, destination area extraction apparatus, and image processing apparatus
JP3276555B2 (en) Format recognition device and character reader
JP3316326B2 (en) Image processing device
US6330360B1 (en) Image processing apparatus and method
EP0975146A1 (en) Locating the position and orientation of multiple objects with a smart platen
JP4242962B2 (en) Character extractor
JPH08305791A (en) Image recognizing device and control sheet
JP4093970B2 (en) Image distortion correction apparatus, program, and storage medium
JP2683711B2 (en) How to recognize / correct character / symbol data
JP4580520B2 (en) Character recognition method and character recognition apparatus
JPH0728934A (en) Document image processor
JPH11161739A (en) Character recognizing device
JPH08321942A (en) Image processing unit and method for linking image of split pattern
JPH0676108A (en) Tilt detecting method for document image

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040524

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040615

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20041130