[go: up one dir, main page]

JPH096869A - Method and device for format information generation - Google Patents

Method and device for format information generation

Info

Publication number
JPH096869A
JPH096869A JP7150343A JP15034395A JPH096869A JP H096869 A JPH096869 A JP H096869A JP 7150343 A JP7150343 A JP 7150343A JP 15034395 A JP15034395 A JP 15034395A JP H096869 A JPH096869 A JP H096869A
Authority
JP
Japan
Prior art keywords
format information
new
margin
format
field
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
JP7150343A
Other languages
Japanese (ja)
Inventor
Junichi Otsuki
純一 大槻
Toshiyuki Ono
利幸 小野
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP7150343A priority Critical patent/JPH096869A/en
Publication of JPH096869A publication Critical patent/JPH096869A/en
Pending legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)

Abstract

PURPOSE: To decrease the capacity of a memory which stores reference format information for document reading. CONSTITUTION: Image data on a document 20 which is given a new document ID are stored in an image memory 22 through a photoelectric converting means 21. A new format information generating means 31 generates format information on the document 20. A margin setting means 32 sets margin ranges by read fields according to a format generation rule. A retrieval and registration means 33 uses the margin ranges to retrieve the same format information as the format information on the document 20 among pieces of format information stored in a format information memory 40. The document ID of the document 20 is stored and registered in the format information memory 40 together with the group name given to the format information extracted by the retrieval.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、帳票に記載された必要
事項を光学式文字読取装置(以下、OCRという)で読
取るために、帳票標識(以下、帳票IDという)に対応
させて読取り用のフォーマット情報を生成するフォーマ
ット情報生成方法とフォーマット情報生成装置とに関す
るものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a form mark (hereinafter referred to as a form ID) for reading necessary items described in a form by an optical character reader (hereinafter referred to as OCR). The present invention relates to a format information generation method and a format information generation device for generating the above format information.

【0002】[0002]

【従来の技術】帳票に記載された必要事項を読取るため
に、OCRが用いられている。従来のOCRでは、イメ
ージスキャナ等によって帳票のイメージを取り込み、そ
の帳票イメージのイメージデータをイメージメモリに記
憶させる。そして、帳票の読取フィールドを指定したフ
ォーマット情報を用い、イメージメモリに記憶されたイ
メージデータから文字切出手段によって読取フィールド
を切り出し、その切り出された読取フィールド内の文字
の特徴を文字認識手段によって抽出することにより、帳
票上の文字を認識する。即ち、帳票には、そのフォーマ
ットを識別するために、数字等で表された帳票IDが所
定位置(例えば、右上等)に記入又は印字されている。
そこで、OCRでは、まず、帳票IDを認識し、その帳
票IDに対応させて予め用意されたフォーマット情報を
参照し、帳票イメージから読取フィールドを切り出し、
その切り出された読取フィールド内の文字を認識辞書を
用いて認識するようになっている。
2. Description of the Related Art OCR is used to read necessary items described in a form. In the conventional OCR, an image of a form is captured by an image scanner or the like, and the image data of the form image is stored in an image memory. Then, using the format information designating the reading field of the form, the reading field is cut out from the image data stored in the image memory by the character cutting means, and the character feature in the cut reading field is extracted by the character recognition means. By doing so, the characters on the form are recognized. That is, in order to identify the format of the form, the form ID represented by numbers or the like is written or printed at a predetermined position (for example, the upper right).
Therefore, in the OCR, first, the form ID is recognized, the format information prepared in advance corresponding to the form ID is referred to, and the reading field is cut out from the form image,
The characters in the cut-out read field are recognized using a recognition dictionary.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、従来の
OCRを用いて帳票中の必要事項を読取る方法では、次
のような課題があった。フォーマット情報は、各帳票I
D単位毎に登録する必要がある。帳票IDの種類が多い
場合或いは帳票IDの種類が増加すると情報量が増加す
るので、フォーマット情報メモリの容量を大きくしなく
てはならない。また、フォーマット情報メモリの容量が
大きいと、OCRで帳票中の必要箇所の読取りを行う
際、必要なフォーマット情報の検索に時間がかかること
にもなる。
However, the conventional method of reading necessary items in the form using the OCR has the following problems. Format information is for each form I
It is necessary to register every D unit. If there are many types of form IDs or the number of types of form IDs increases, the amount of information increases, so the capacity of the format information memory must be increased. In addition, if the capacity of the format information memory is large, it will take time to retrieve the necessary format information when the necessary portion of the form is read by the OCR.

【0004】[0004]

【課題を解決するための手段】第1の発明は、前記課題
を解決するために、帳票ID毎に書式の定まった帳票に
対してOCRで必要事項の読取りを行うために、該各帳
票IDに対応する帳票に対し、読取り参照用の固有のフ
ォーマット情報をそれぞれ生成して登録するフォーマッ
ト情報生成方法において、次のような処理を行うように
している。即ち、第1の発明のフォーマット情報生成方
法では、前記フォーマット情報が登録されていない未登
録帳票に対して新規の前記フォーマット情報を生成する
新規フォーマット情報生成処理と、予め作成されたフォ
ーマット生成規則に基づき前記新規フォーマット情報に
対してマージン範囲を設定するマージン設定処理とを行
う。そして、前記マージン範囲内にあって前記新規フォ
ーマット情報と同一と見なせるものを登録済の前記フォ
ーマット情報から抽出し、該抽出された登録済のフォー
マット情報と同じグループ名を前記未登録帳票の前記帳
票IDに付して登録し、該同一と見なせる登録済のフォ
ーマット情報が存在しない場合、該新規フォーマット情
報とその帳票IDと新たなグループ名とを対応させて登
録する検索登録処理を行うようにしている。第2の発明
は、第1の発明における新規フォーマット情報生成処理
は、前記フォーマット情報が登録されていない未登録帳
票のイメージデータを取り込み、予め作成されたフォー
マット生成規則に基づいて該イメーシデータを処理して
前記新規フォーマット情報を生成するようにしている。
In order to solve the above-mentioned problems, the first invention is to read necessary items by OCR for a form whose format is fixed for each form ID. In the format information generating method for generating and registering the unique format information for reading and referring to the form corresponding to, the following processing is performed. That is, in the format information generating method of the first invention, the new format information generating process for generating the new format information for the unregistered form in which the format information is not registered, and the previously generated format generating rule are used. A margin setting process for setting a margin range is performed on the new format information based on the above. Then, what is considered to be the same as the new format information within the margin range is extracted from the registered format information, and the same group name as the extracted registered format information is used as the form of the unregistered form. If the registered format information that can be regarded as being the same is not registered, the search registration processing is performed in which the new format information, the form ID thereof, and the new group name are registered in association with each other. There is. According to a second aspect of the present invention, the new format information generation process according to the first aspect takes in image data of an unregistered form in which the format information is not registered and processes the image data based on a format generation rule created in advance. Then, the new format information is generated.

【0005】第3の発明は、帳票IDで区別された帳票
毎に書式の定まった帳票に対してOCRで必要事項の読
取りを行うために、該各帳票IDに対応する帳票に対
し、読取り参照用の固有のフォーマット情報をそれぞれ
生成して登録するフォーマット情報生成装置において、
次のような光電変換手段と、イメージメモリと、新規フ
ォーマット情報生成手段と、マージン設定手段と、フォ
ーマット情報メモリと、検索登録手段とを、備えてい
る。光電変換手段は、対象帳票のイメージを取得してイ
メージデータに変換するものである。イメージメモリ
は、前記イメージデータを格納するものである。新規フ
ォーマット情報生成手段は、前記イメージメモリに格納
されたイメージデータに基づき、前記帳票IDを認識す
ると共に新規の前記フォーマット情報を生成する機能を
有している。マージン設定手段は、予め作成されたフォ
ーマット生成規則に基づき前記新規フォーマット情報に
対してマージン範囲を設定する機能を有している。フォ
ーマット情報メモリは、複数の前記フォーマット情報
と、それらの各フォーマット情報にそれぞれ付されたグ
ループ名と、該フォーマット情報が適用される帳票ID
群とを関連させて格納するものである。そして、検索登
録手段は、前記フォーマット情報メモリに格納されてい
る前記フォーマット情報のうち、前記マージン範囲内に
あって前記新規フォーマット情報と同一と見なせるフォ
ーマット情報を抽出し、該抽出したフォーマット情報に
付されたグループ名と前記未登録帳票の前記帳票IDと
を該フォーマット情報メモリに格納して登録し、該同一
と見なせるフォーマット情報が存在しない場合、該新規
フォーマット情報とその帳票IDと新たなグループ名と
を対応させて該フォーマット情報メモリに格納して登録
する機能を有している。
In the third invention, in order to read necessary items by OCR for a form whose format is defined for each form distinguished by the form ID, read reference is made to the form corresponding to each form ID. In the format information generation device that respectively generates and registers the unique format information for
The following photoelectric conversion means, image memory, new format information generation means, margin setting means, format information memory, and search / registration means are provided. The photoelectric conversion means acquires an image of the target form and converts it into image data. The image memory stores the image data. The new format information generating means has a function of recognizing the form ID and generating new format information based on the image data stored in the image memory. The margin setting means has a function of setting a margin range for the new format information based on a format generation rule created in advance. The format information memory includes a plurality of the format information, a group name attached to each of the format information, and a form ID to which the format information is applied.
The group is stored in association with the group. Then, the search / registration means extracts, from the format information stored in the format information memory, format information that is within the margin range and can be regarded as the same as the new format information, and attaches it to the extracted format information. When the registered group name and the form ID of the unregistered form are stored and registered in the format information memory and the format information that can be regarded as the same does not exist, the new format information, the form ID, and a new group name And has the function of storing and registering in the format information memory in association with each other.

【0006】第4の発明は、第3の発明における前記マ
ージン設定手段は、前記フォーマット情報における各読
取フィールドにそれぞれ対応付けて記憶されたマージン
値を用い、該各読取フィールドに対する前記マージン範
囲をそれぞれ設定する構成にしている。第5の発明は、
第3または第4の発明におけるフォーマット情報の各読
取フィールドは、対象帳票の端部を原点とした位置関係
で表される第1種読取フィールドと、該対象帳票に描画
された線分上の任意の点を原点とした位置関係で表され
る第2種読取フィールドとで構成している。そして、前
記マージン設定手段は、前記第1種読取フィールドに対
応する第1のマージン値と、前記第2種読取フィールド
に対応し前記第1のマージン値とは異なる第2のマージ
ン値とを用い、前記各読取フィールドに対するマージン
範囲をそれぞれ設定する構成にしている。
In a fourth invention, the margin setting means in the third invention uses a margin value stored in association with each read field in the format information, and respectively sets the margin range for each read field. The configuration is set. The fifth invention is
Each read field of the format information in the third or fourth invention is a type 1 read field represented by a positional relationship in which the end of the target form is the origin, and an arbitrary line segment drawn on the target form. And the second type reading field represented by the positional relationship with the point as the origin. The margin setting means uses a first margin value corresponding to the first type reading field and a second margin value corresponding to the second type reading field and different from the first margin value. The margin range for each read field is set.

【0007】[0007]

【作用】第1の発明によれば、以上のようにフォーマッ
ト情報生成方法を構成したので、未登録帳票に対する新
規フォーマット情報が、新規フォーマット情報生成処理
で生成される。その新規フォーマット情報に対し、マー
ジン範囲がマージン設定処理で設定される。そして、検
索登録処理により、マージン範囲内にあって新規フォー
マット情報と同一と見なせるフォーマット情報が、登録
済のフォーマット情報から抽出され、未登録帳票の帳票
IDに、その抽出された登録済のフォーマット情報と同
じグループ名が付されて登録される。同一と見なせる登
録済のフォーマット情報が存在しない場合、新規フォー
マット情報とその帳票IDと新たなグループ名が対応し
て登録される。即ち、新規フォーマット情報と同一と見
なせる登録済フォーマット情報が存在する場合には、そ
の新規フォーマット情報をフォーマット情報メモリに格
納しない。第2の発明によれば、第1の発明における新
規フォーマット情報生成処理において、前記フォーマッ
ト情報が登録されていない未登録帳票のイメージデータ
が取り込まれ、フォーマット生成規則に基づいて該イメ
ーシデータが処理されて、新規フォーマット情報が生成
される。即ち、予めフォーマット生成規則を用意するこ
とにより、自動的にフォーマット情報を生成することが
できる。
According to the first aspect of the invention, since the format information generating method is configured as described above, the new format information for the unregistered form is generated by the new format information generating process. A margin range is set in the margin setting process for the new format information. Then, by the search registration process, the format information that is within the margin range and can be regarded as the same as the new format information is extracted from the registered format information, and the extracted registered format information is added to the form ID of the unregistered form. The same group name is added and registered. If there is no registered format information that can be regarded as the same, the new format information, the form ID thereof, and the new group name are registered in association with each other. That is, if there is registered format information that can be regarded as the same as the new format information, the new format information is not stored in the format information memory. According to the second invention, in the new format information generation processing in the first invention, the image data of the unregistered form in which the format information is not registered is fetched and the image data is processed based on the format generation rule. New format information is generated. That is, the format information can be automatically generated by preparing the format generation rule in advance.

【0008】第3の発明によれば、光電変換手段によっ
て、対象帳票のイメージが取得されてイメージデータに
変換される。イメージメモリは、イメージデータを格納
する。新規フォーマット情報生成手段によって、イメー
ジメモリに格納されたイメージデータに基づき、新規の
フォーマット情報が生成され、マージン設定手段によっ
てマージン範囲が設定される。一方、フォーマット情報
メモリには、複数のフォーマット情報と、その各フォー
マット情報にそれぞれ付されたグループ名と、該フォー
マット情報が適用される帳票ID群とが、関連させて格
納されている。そして、検索登録手段によって、フォー
マット情報メモリに格納されているフォーマット情報の
うち、マージン範囲内にあって新規フォーマット情報と
同一と見なせるフォーマット情報が抽出され、抽出した
フォーマット情報に付されたグループ名と未登録帳票の
帳票IDとが、フォーマット情報メモリに格納して登録
される。ここで、同一と見なせるフォーマット情報が存
在しない場合、新規フォーマット情報とその帳票IDと
新たなグループ名とがフォーマット情報メモリに格納さ
れて登録される。
According to the third invention, the image of the target form is acquired and converted into image data by the photoelectric conversion means. The image memory stores image data. The new format information generation means generates new format information based on the image data stored in the image memory, and the margin setting means sets the margin range. On the other hand, the format information memory stores a plurality of format information, a group name assigned to each format information, and a form ID group to which the format information is applied, in association with each other. Then, by the search / registration means, the format information stored in the format information memory is extracted as format information that is within the margin range and can be regarded as the same as the new format information. The form ID of an unregistered form is stored in the format information memory and registered. If there is no format information that can be regarded as the same, the new format information, its form ID, and the new group name are stored and registered in the format information memory.

【0009】第4の発明によれば、第3の発明における
新規フォーマット情報生成手段によって生成されたフォ
ーマット情報に対し、マージン設定手段により、各読取
フィールドに対応付けて記憶されたマージン値でマージ
ン範囲がそれぞれ設定される。即ち、各読取フィールド
に対応したマージン範囲が設定される。第5の発明によ
れば、第3または第4の発明における前記新規フォーマ
ット情報生成手段によって生成されるフォーマット情報
は、対象帳票の端部を原点とした位置関係で表される第
1種読取フィールドと、該対象帳票に描画された線分上
の任意の点を原点とした位置関係で表される第2種読取
フィールドとで構成される。そして、マージン設定手段
によって、第1種読取フィールドに対応する第1のマー
ジン値と、前記第2種読取フィールドに対応し第1のマ
ージン値とは異なる第2のマージン値とが用いられ、各
読取フィールドに対するマージン範囲がそれぞれ設定さ
れる。即ち、第1種読取フィールドと第2種読取フィー
ルドとに対するマージン範囲が、互いに独立して設定さ
れる。従って、前記課題を解決できるのである。
According to the fourth aspect of the present invention, the margin range is stored by the margin setting means in association with each read field with respect to the format information generated by the new format information generating means in the third aspect. Are set respectively. That is, the margin range corresponding to each reading field is set. According to the fifth invention, the format information generated by the new format information generating means in the third or fourth invention is the first type reading field represented by a positional relationship with the end of the target form as the origin. And a second-type reading field represented by a positional relationship with an arbitrary point on a line segment drawn on the target form as an origin. Then, the margin setting means uses the first margin value corresponding to the first type reading field and the second margin value corresponding to the second type reading field and different from the first margin value. The margin range for the read field is set respectively. That is, the margin ranges for the first type read field and the second type read field are set independently of each other. Therefore, the above problem can be solved.

【0010】[0010]

【実施例】図2(1),(2)は、図1の帳票のフォー
マット情報を説明する図であり、同図(1)はフォーマ
ット情報の例、同図(2)はフォーマット情報中のフィ
ールド位置を示している。また、図3(1),(2)
は、帳票の書式を説明する図である。これらの図2
(1),(2)及び図3(1),(2)を用いて本発明
の実施例の主旨を説明する。文字読取りのためのフォー
マット情報は、各帳票IDに対応してそれぞれ登録され
るものであり、図2(1)のように、読取るために切出
す読取フィールド数と、それらの読取フィールドのフィ
ールド位置情報と、読取る文字或いは文字群の属性情報
等とで、構成されている。フォーマット情報におけるフ
ィールド位置情報では、各読取フィールドの左上の位置
の座標P(x1 ,y1 )が、指定されている。座標P
(x1 ,y1 )は、図2(2)のように、例えば座標の
原点Oを帳票10の左上端部として指定されている。ま
た、各読取フィールドの大きさ示すために、読取フィー
ルドのx方向の幅wとy方向の高さhが指定されてい
る。各属性には、読取フィールド内の読取る文字或いは
文字群の文字種と文字数と文字間隔Pt等があり、フィ
ールド位置情報と共にフォーマット情報メモリに格納さ
れる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIGS. 2 (1) and 2 (2) are diagrams for explaining the format information of the form shown in FIG. 1. FIG. 2 (1) shows an example of the format information, and FIG. Indicates the field position. Moreover, FIG. 3 (1), (2)
FIG. 6 is a diagram illustrating a form of a form. These Figure 2
The gist of the embodiment of the present invention will be described with reference to (1), (2) and FIGS. 3 (1), (2). The format information for reading characters is registered in correspondence with each form ID. As shown in FIG. 2A, the number of read fields to be cut out for reading and the field positions of those read fields. It is composed of information and attribute information of a character or a group of characters to be read. In the field position information in the format information, the coordinates P (x 1 , y 1 ) of the upper left position of each read field are designated. Coordinate P
2 (2), the origin O of the coordinates is designated as the upper left end portion of the form 10, for example (x 1 , y 1 ). Further, in order to indicate the size of each reading field, a width w in the x direction and a height h in the y direction of the reading field are designated. Each attribute has a character type of a character or a character group to be read in the reading field, the number of characters, a character interval Pt, and the like, and is stored in the format information memory together with field position information.

【0011】図3(1),(2)には、例として2つの
異なる書式の帳票15,16が示されている。各帳票1
5,16の帳票ID151 ,161 は、帳票の右上の決
まった位置にそれぞれ記入されている。各帳票15,1
6には、書式に従って各フィールドに顧客番号と商品番
号と単価と数量と合計金額と総計金額と物流経路と発送
日等をそれぞれ記載するようになっている。2つの帳票
15,16の書式は異なるが、例えば各顧客番号1
2 ,162 と物流経路153 ,163 と発送日1
4 ,164 とは、帳票のほぼ同じ位置にそれぞれ記載
される。OCRで顧客番号152 ,162 と、物流経路
153 ,163 と、発送日154 ,164 を読取る場
合、切取る読取フィールドは同じであり、各帳票15,
16のフォーマット情報は同じものとなる。本実施例
は、このように帳票IDが異なっていても、フォーマッ
ト情報が同じ帳票がある場合、登録するフォーマット情
報の数を減じるものである。
FIGS. 3A and 3B show two different forms 15 and 16 as examples. Each form 1
The form IDs 15 1 and 16 1 of 5 and 16 are respectively written in predetermined positions in the upper right of the form. Each form 15,1
6, the customer number, the product number, the unit price, the quantity, the total amount, the total amount, the distribution route, the shipping date, etc. are described in each field according to the format. Although the formats of the two forms 15 and 16 are different, for example, each customer number 1
5 2 , 16 2 and distribution route 15 3 , 16 3 and shipping date 1
5 4 and 16 4 are written at almost the same positions on the form. When the customer numbers 15 2 and 16 2 , the distribution routes 15 3 and 16 3 and the shipping dates 15 4 and 16 4 are read by the OCR, the read fields to be cut out are the same, and each form 15,
The 16 pieces of format information are the same. In this embodiment, even if the form IDs are different as described above, if there are forms with the same format information, the number of format information to be registered is reduced.

【0012】図1は、本発明の実施例を示すフォーマッ
ト情報生成装置の機能ブロック図である。このフォーマ
ット情報生成装置は、帳票20のイメージを取込むイメ
ージスキャナ等の光電変換手段21と、光電変換手段2
1の出力側に接続されたイメージメモリ22を備えてい
る。これら光電変換手段21とイメージメモリ22はO
CRと兼用されてもよい。イメージメモリ22の出力側
が、パーソナルコンピュータ等で構成された制御手段3
0に接続されている。制御手段30の出力側に、フォー
マット情報メモリ40が接続されている。フォーマット
情報メモリ40は、制御手段30で生成されたフォーマ
ット情報を複数格納するものであり、該各フォーマット
情報にそれぞれ付されたグループ名A,B,C…と、該
各グループ名A,B,C…の付されたフォーマット情報
が適用される帳票ID群とを、関連させて格納してい
る。制御手段30は、新規フォーマット情報生成手段3
1と、マージン設定手段32と、検索登録手段33と、
表示制御手段34とを備えている。新規フォーマット情
報生成手段31は、イメージデータから対象帳票のフォ
ーマット情報を生成するものであり、イメージメモリ2
2に接続されている。
FIG. 1 is a functional block diagram of a format information generating apparatus showing an embodiment of the present invention. This format information generating apparatus includes a photoelectric conversion unit 21 such as an image scanner that captures an image of a form 20, and a photoelectric conversion unit 2.
The image memory 22 is connected to the output side of 1. The photoelectric conversion means 21 and the image memory 22 are O
It may be combined with CR. The output side of the image memory 22 is a control means 3 composed of a personal computer or the like.
Connected to 0. A format information memory 40 is connected to the output side of the control means 30. The format information memory 40 stores a plurality of format information generated by the control means 30, and has group names A, B, C ... Assigned to each format information and each group name A, B ,. The form ID group to which the format information with C ... is applied is stored in association with each other. The control means 30 uses the new format information generation means 3
1, margin setting means 32, search registration means 33,
The display control means 34 is provided. The new format information generating means 31 generates format information of the target form from the image data, and the image memory 2
Connected to 2.

【0013】図4は、図1中の新規フォーマット情報生
成手段の構成ブロック図である。新規フォーマット情報
生成手段31は、イメージメモリ22に接続されたイメ
ージ解析手段31aを備えている。イメージ解析手段3
1aの出力側には、照合検索手段31bが接続されてい
る。照合検索手段31bには、フォーマット生成規則を
記憶しているフォーマット生成規則記憶手段31c接続
されている。照合検索手段31bの出力側が、マージン
設定手段32に接続されている。そのマージン設定手段
32の出力側に検索登録手段33が接続されている。検
索登録手段33はフォーマット情報メモリ40に接続さ
れている。マージン設定手段32は、新規フォーマット
情報生成手段31の生成したフォーマット情報の各読取
フィールドの位置情報に対して、マージン範囲を設定す
る機能を有している。検索登録手段33は、フォーマッ
ト情報メモリ40に格納されているフォーマット情報の
検索を行い、対象帳票20のフォーマット情報を、フォ
ーマット情報メモリ40に格納して登録する機能を有し
ている。表示制御手段34は、該表示制御手段34に接
続されたディスプレイ35に対する表示の制御を行うも
のであり、イメージメモリ22とフォーマット情報メモ
リ40に接続されている。
FIG. 4 is a block diagram showing the configuration of the new format information generating means shown in FIG. The new format information generation means 31 includes an image analysis means 31a connected to the image memory 22. Image analysis means 3
Collation search means 31b is connected to the output side of 1a. The collation search means 31b is connected to the format generation rule storage means 31c which stores the format generation rules. The output side of the collation search means 31b is connected to the margin setting means 32. The search registration means 33 is connected to the output side of the margin setting means 32. The search / registration means 33 is connected to the format information memory 40. The margin setting means 32 has a function of setting a margin range for position information of each read field of the format information generated by the new format information generating means 31. The search / registration unit 33 has a function of searching the format information stored in the format information memory 40 and storing the format information of the target form 20 in the format information memory 40 to register it. The display control means 34 controls display on the display 35 connected to the display control means 34, and is connected to the image memory 22 and the format information memory 40.

【0014】次に、図1のフォーマット情報生成装置を
用いた本実施例のフォーマット情報生成方法を説明す
る。図5は、図1の帳票20を示す図である。この帳票
20には、帳票ID201 が記載されている。帳票ID
201 は、規則に従って帳票の右上に記載されている。
この帳票20のフォーマット情報は、未登録帳票であ
り、そのフォーマット情報が、帳票ID201 に対応し
てフォーマット情報メモリ40に登録されていないもの
である。ここでは、OCRで読取るべき情報を顧客番号
202 のフィールドに記載された情報と、物流経路20
3のフィールド中に記載された情報と、発送日のフィー
ルド204 に記載された情報とする。
Next, the format information generating method of this embodiment using the format information generating apparatus of FIG. 1 will be described. FIG. 5 is a diagram showing the form 20 of FIG. The form ID 20 1 is described in the form 20. Form ID
The number 20 1 is written in the upper right of the form according to the rules.
Formatting information for this form 20 is not yet registered form, the format information is one that is not registered in the format information memory 40 in correspondence with the form ID 20 1. Here, the information to be read by the OCR is recorded in the field of the customer number 20 2 and the distribution route 20.
The information described in the field of 3 and the information described in the field of the shipping date 20 4 .

【0015】図6は、図1のフォーマット情報生成装置
を用いたフォーマット情報生成処理を示すフローチャー
トであり、図7は図6中の新規フォーマット情報生成処
理を示す図である。図6中のステップST10のイメー
ジ取込み処理において、新規の帳票IDの付された帳票
20の記載面を、光学系によってイメージスキャナ等の
光電変換手段21に結像させる。光電変換手段21は帳
票20のイメージを取得し、それを光電変換してイメー
ジデータを生成する。イメージデータはイメージメモリ
22に格納される。ステップST20の新規フォーマッ
ト情報生成処理において、新規フォーマット情報生成手
段31は、帳票20の帳票IDを認識すると共に、該帳
票20に対する新たなフォーマット情報を生成する。例
えば、本願出願人が先に出願した特願平7−14212
2号明細書及び図面に記載されるように、フォーマット
生成規則を適用する。ステップST20の新規フォーマ
ット情報生成処理は、図7のステップST21〜ST2
5で構成され、それらステップST21〜ST25で次
の(1)イメージ解析と(2)照合検索を行う。
FIG. 6 is a flow chart showing a format information generation process using the format information generation device of FIG. 1, and FIG. 7 is a diagram showing a new format information generation process in FIG. In the image capture process of step ST10 in FIG. 6, the surface of the form 20 to which the new form ID is attached is imaged on the photoelectric conversion means 21 such as an image scanner by an optical system. The photoelectric conversion unit 21 acquires an image of the form 20 and photoelectrically converts it to generate image data. The image data is stored in the image memory 22. In the new format information generation process of step ST20, the new format information generation means 31 recognizes the form ID of the form 20 and generates new format information for the form 20. For example, Japanese Patent Application No. 7-14212 filed earlier by the applicant of the present application.
The format production rules are applied as described in No. 2 specification and drawings. The new format information generation process of step ST20 is performed by steps ST21 to ST2 of FIG.
In step ST21 to ST25, the following (1) image analysis and (2) collation search are performed.

【0016】(1)イメージ解析 ステップST21では、イメージメモリ22に記憶され
たイメージデータに基づき、イメージ解析手段31aに
よって帳票イメージ中に含まれる全ての線分の位置及び
文字の位置を検出(解析)し、そのイメージ解析結果を
照合検索手段31bへ送る。図8は、線分の位置及び文
字の位置の座標の算出方法を説明するための帳票イメー
ジの投影図である。図8のHX,HYは、帳票イメージ
のそれぞれX軸方向、Y軸方向の投影(黒点数の総和)
であり、該帳票イメージの外側(背景)は黒点だけで形
成される。そして、X軸方向の投影処理によってX軸方
向の投影HXが得られ、該投影HXをX軸方向枠検出ス
ライスSXと比較することにより、X軸に平行な線分を
検出することができる。各線分のY軸の座標値は、6、
8、9、…になる。同様に、Y軸方向の投影処理によっ
てY軸方向の投影HYが得られ、該投影HYをY軸方向
枠検出スライスSYと比較することにより、Y軸に平行
な線分を検出することができる。各線分のX軸の座標値
は1、7、9、…になる。なお、X軸方向枠検出スライ
スSX及びY軸方向枠検出スライスSYは、値を変更す
ることができる。
(1) Image analysis In step ST21, based on the image data stored in the image memory 22, the image analysis means 31a detects (analyzes) the positions of all the line segments and the characters included in the form image. Then, the image analysis result is sent to the matching search means 31b. FIG. 8 is a projection view of a form image for explaining the method of calculating the coordinates of the position of the line segment and the position of the character. In FIG. 8, HX and HY are projections of the form image in the X-axis direction and the Y-axis direction (sum of black points).
And the outside (background) of the form image is formed by only black dots. Then, the projection process in the X-axis direction obtains the projection HX in the X-axis direction, and by comparing the projection HX with the X-axis direction frame detection slice SX, the line segment parallel to the X-axis can be detected. The Y-axis coordinate value of each line segment is 6,
It becomes 8, 9, ... Similarly, a projection process HY in the Y-axis direction is obtained by the projection process in the Y-axis direction, and a line segment parallel to the Y-axis can be detected by comparing the projection HY with the Y-axis direction frame detection slice SY. . The X-axis coordinate values of each line segment are 1, 7, 9, .... The values of the X-axis direction frame detection slice SX and the Y-axis direction frame detection slice SY can be changed.

【0017】検出されたX軸に平行な線分とY軸に平行
な線分とから、それらの交点の座標を求めることができ
る。例えば、物流経路フィールド203 は、x=1のY
軸方向の線分と、x=13のY軸方向の線分と、y=2
7のX軸方向の線分と、y=32のX軸方向の線分とに
よって囲まれた矩形領域となる。この物流経路フィール
ド203 のフィールド位置情報は、帳票20の端部の原
点に対して左上の始点の座標位置がp(1,27)、及
び右下の終点の座標位置がp(13,32)であるの
で、始点の座標位置p(1,27)、X方向の幅w=1
2、及びY方向の高さh=5の座標値によって表され
る。請求月フィールド205 のような矩形の枠で囲まれ
ていない文字ブロック中の文字の位置を検出するには、
例えば次のような方法で行えばよい。即ち、X軸方向の
投影HXにおいて高さが低く幅の広い箇所と、Y軸方向
の投影HYにおいて高さが低く幅の広い箇所とを比較す
ることにより、文字ブロックからなる請求月フィールド
205 内の各文字を囲む枠の位置、つまり各文字の位置
を検出できる。そのため、文字ブロックからなる請求月
フィールド205 を切り出し、認識辞書等を用いてその
文字ブロック内の各文字の認識を行えば、文字認識結果
が得られる。
From the detected line segment parallel to the X-axis and the line segment parallel to the Y-axis, the coordinates of their intersections can be obtained. For example, the physical distribution route field 20 3 is Y for x = 1.
A line segment in the axial direction, a line segment in the Y-axis direction at x = 13, and y = 2
This is a rectangular area surrounded by a line segment in the X-axis direction of 7 and a line segment in the X-axis direction of y = 32. In the field position information of the physical distribution route field 20 3 , the coordinate position of the starting point at the upper left with respect to the origin of the end of the form 20 is p (1,27), and the coordinate position of the ending point at the lower right is p (13,32). ), The coordinate position p (1,27) of the starting point and the width w = 1 in the X direction
2 and the coordinate value of the height h = 5 in the Y direction. To detect the position of a character in a character block that is not enclosed in a rectangular frame like the billing month field 20 5 ,
For example, the following method may be used. That is, the billing month field 20 5 consisting of a character block is obtained by comparing a portion having a low height and a wide width in the projection HX in the X-axis direction with a portion having a low height and a wide width in the projection HY in the Y-axis direction. It is possible to detect the position of the frame surrounding each character inside, that is, the position of each character. Therefore, cut out billing month field 20 5 consisting of a text block, by performing the recognition of each character of the character block using the recognition dictionaries, a character recognition result is obtained.

【0018】イメージ解析手段31aは、イメージ解析
結果から必要に応じて、文字位置における文字ブロック
の検出(切り出し)を行い、その検出された文字ブロッ
クに対し、図示しない認識辞書等を用いて文字の認識を
行う。物流経路フィールド203 の下側には、発送日を
記入する発送日フィールド204 が設けられている。発
送日フィールド204 は、文字ブロックで構成されてい
る。イメージ解析手段31aは、発送日フィールド20
4 中の文字ブロックの各文字の認識を行う。この文字認
識識結果も、照合検索手段31bへ送られる。また、こ
れと同時に帳票ID201 も認識される。イメージ解析
手段31aで得られたイメージ解析結果の例を、図9に
示す。
The image analysis means 31a detects (cuts out) a character block at a character position from the image analysis result as needed, and detects the character block from the detected character block using a recognition dictionary (not shown). To recognize. Below the physical distribution route field 20 3 , a shipping date field 20 4 for writing the shipping date is provided. Shipping date field 20 4 is composed of a character block. The image analysis means 31a uses the shipping date field 20.
Each character in the character block in 4 is recognized. This character recognition recognition result is also sent to the collation search means 31b. It also to be form ID 20 1 also simultaneously recognized. An example of the image analysis result obtained by the image analysis means 31a is shown in FIG.

【0019】(2) 照合検索 ステップST22において、照合検索手段31bは、イ
メージ解析手段31aで検出された線分及び文字と、フ
ォーマット生成規則記憶手段31cから読み出した帳票
ID20に対応するフォーマット生成規則とをマッチン
グし、該フォーマット生成規則にマッチする線分及び文
字を検索する。そして、照合検索手段31bは、フィー
ルド番号i=1の読取フィールド(例えば、顧客番号フ
ィールド202 )のXY座標軸上の位置を決定し、その
位置の情報であるフィールド位置情報を、ステップST
23において図示しない記憶手段に記憶する。
(2) Collation search In step ST22, the collation search means 31b detects the line segment and the character detected by the image analysis means 31a and the format generation rule corresponding to the form ID 20 read from the format generation rule storage means 31c. To search for line segments and characters that match the format generation rule. Then, the collation search means 31b determines the position on the XY coordinate axis of the read field (for example, the customer number field 20 2 ) of the field number i = 1, and the field position information which is the information of the position is determined in step ST.
At 23, it is stored in a storage means (not shown).

【0020】図10は、フォーマット生成規則の例を示
す図である。フォーマット生成規則では、読取対象とな
る帳票20の帳票ID201 に対応した読取フィールド
数n、読取フィールド名、及び各読取フィールドの特徴
等が規定されている。各読取フィールドの特徴として
は、記載事項の属性情報やフィールド枠や文字ブロック
の大きさ(寸法)、存在位置、及び検索方法等といった
各読取フィールドに適合する内容が規定されている。例
えば、顧客番号フィールド202 については、そのフィ
ールド枠の大きさ(幅w=8、高さh=2)と、おおよ
その存在位置(最大枠の上方で、文字ブロック顧客番号
の右側)が規定されている。このようなフォーマット生
成規則と、イメージ解析手段31aで得られたイメージ
解析結果とを、照合検索手段31bでマッチングして該
フォーマット生成規則にマッチするイメージ解析結果を
検索し、顧客番号フィールド202のフィールド情報を
作成する。
FIG. 10 is a diagram showing an example of the format generation rule. The format productions, form ID20 number reading field corresponding to 1 n of the form 20 as a reading target, reading the field names, and characteristics of each read field is defined. As characteristics of each reading field, contents suitable for each reading field such as attribute information of described items, size (dimension) of the field frame or character block, existing position, and search method are defined. For example, for a customer number field 20 2, the size of the field frame (width w = 8, the height h = 2), the location of the approximately (above the maximum frame, the character block customer number right) provisions Has been done. Such a format generation rule and the image analysis result obtained by the image analysis means 31a are matched by the matching search means 31b to search for an image analysis result that matches the format generation rule, and the customer number field 20 2 Create field information.

【0021】ステップST24では、読取フィールド数
n=3の全ての読取フィールド202 〜204 における
位置の決定が終了したか否かを判定し、終了していない
ときには、フィールド番号iを+1増分(インクリメン
ト)し、次の読取フィールド(例えば、物流経路フィー
ルド203 )に対し、上記と同様にステップST22及
びST23の処理を行う。発送日フィールド204 に対
する処理が終了し、ステップST24で、フィールド数
n=3の全ての読取フィールドに対する検索処理が終了
したと判定されると、次のステップST25へ移る。ス
テップST25において、すべての読取フィールドの位
置情報が例えばディスプレイに表示され、オペレータは
帳票20に対するフォーマット情報が適正に作成された
かどうかを確認する。もし、適正でない場合には、それ
を修正することで、新規フォーマット情報が完成する。
At step ST24, it is determined whether or not the positions of all the read fields 20 2 to 20 4 with the read field number n = 3 have been determined. If not, the field number i is incremented by +1 ( Increment), and the processing of steps ST22 and ST23 is performed on the next reading field (for example, the physical distribution route field 20 3 ) in the same manner as above. Process is completed for the shipping date field 20 4, in step ST24, the retrieval processing for all the read field number of fields n = 3 is determined to have ended, and proceeds to the next step ST25. In step ST25, the position information of all the read fields is displayed on the display, for example, and the operator confirms whether the format information for the form 20 is properly created. If it is not correct, the new format information is completed by correcting it.

【0022】図11は、図1の新規フォーマット情報生
成手段で生成された帳票20のフォーマット情報を示す
図である。フォーマット生成規則に基づき、図11のよ
うな、帳票20に対するフォーマット情報が生成され
る。ここで、フォーマット情報における各読取フィール
ドは、位置の指定のされ方で、第1種読取フィールドと
第2種読取フィールドに分けられる。第一種読取フィー
ルドである顧客番号フィールド202 及び物流経路フィ
ールド203 では、帳票20の左上端部を原点Oとし
て、各フィールド枠の左上位置P(x1 ,y1 )が指定
される。第2種フィールドである発送日フィールド20
4 は、帳票20に描画された線分上の点を原点O* とし
て位置が指定されている。この場合の原点O* は、物流
経路フィールド203 を囲む枠上の点(1,27)で表
されている。原点O* からの位置関係で、発送日フィー
ルド204の位置情報が構成される。例えば、発送日フ
ィールド204 のように、記載部分が小さい枠には、第
2種読取フィールドが採用される。帳票には裁断誤差と
印刷誤差等が考えられる。一般的に、印刷誤差は裁断誤
差に対して十分小さい。従って、本実施例のように、第
1種読取フィールドと第2種読取フィールドと分けて管
理することは、文字認識精度を高めることになる。
FIG. 11 is a diagram showing the format information of the form 20 generated by the new format information generating means of FIG. Based on the format generation rule, format information for the form 20 as shown in FIG. 11 is generated. Here, each read field in the format information is divided into a first type read field and a second type read field, depending on how the position is designated. In the customer number field 20 2 and the physical distribution route field 20 3 which are first type reading fields, the upper left position P (x 1 , y 1 ) of each field frame is designated with the upper left end of the form 20 as the origin O. Shipping date field 20 which is the second type field
The position of 4 is designated with the point on the line segment drawn on the form 20 as the origin O * . The origin O * in this case is represented by a point (1, 27) on the frame surrounding the physical distribution route field 20 3 . The positional information from the origin O * constitutes the positional information of the shipping date field 20 4 . For example, as the shipping date field 20 4, the frame described portions is small, the two reading fields are employed. Cutting errors and printing errors may be considered in the form. Generally, the printing error is sufficiently smaller than the cutting error. Therefore, as in the present embodiment, the first-type read field and the second-type read field are managed separately, which improves the character recognition accuracy.

【0023】図12は、発送日フィールドの原点を示す
図である。発送日フィールド204 の位置情報を、帳票
20の左上端部の原点Oから指定すると、実際には裁断
誤差があり、発送日フィールド204 に記載された事項
を文字認識する際、OCRは物流経路フィールド203
に跨がって文字認識をする可能性がある。発送日フィー
ルド204 に記入される文字は小さいので、文字認識の
精度が低下することになる。そこで、物流経路フィール
ド203 の左上端部を内枠原点O* (xo * ,yo *
として、発送日フィールド204 の位置情報を指定す
る。即ち、内枠原点O* (xo * ,yo * )から見た発
送日フィールド204 の左上段部の点P(x1 * ,y1
* )と、発送日フィールド204 の高さh* と幅w*
指定される。これにより、発送日フィールド204 の位
置が明確になり、OCRによる文字認識精度が高まる。
フォーマット情報が生成された後、処理は図6のステッ
プST30に進む。ステップST30のマージン設定処
理において、マージン設定手段32はフォーマット生成
規則を参照し、フォーマット情報のフィールド毎にマー
ジン範囲を設定する。例えば、第1種読取フィールドの
顧客番号フィールド202 と物流経路フィールド203
に対しては、帳票上の±1.0mmのマージン範囲を設
定する。第2種読取フィールドの発送日フィールド20
4 に対しては、±0.5mmのマージン範囲を設定す
る。
FIG. 12 is a diagram showing the origin of the shipping date field. If the position information of the shipping date field 20 4 is specified from the origin O at the upper left end of the form 20, there is a cutting error in reality, and when the items described in the shipping date field 20 4 are recognized as characters, the OCR is the physical distribution. Route field 20 3
There is a possibility that character recognition will be performed across. Since characters are entered in the dispatch date field 20 4 is small, so that the accuracy of character recognition is lowered. Therefore, the upper left end of the physical distribution route field 20 3 is the inner frame origin O * (x o * , y o * ).
The position information of the shipping date field 20 4 is designated as. That is, the point P (x 1 * , y 1) in the upper left part of the shipping date field 20 4 viewed from the inner frame origin O * (x o * , y o * )
*), And the date of shipment field 20 4 of height h * and the width w * is specified. As a result, the position of the shipping date field 20 4 becomes clear, it increases the character recognition accuracy by OCR.
After the format information is generated, the process proceeds to step ST30 in FIG. In the margin setting process of step ST30, the margin setting means 32 refers to the format generation rule and sets the margin range for each field of the format information. For example, the customer number field 20 2 and the distribution route field 20 3 of the first type reading field
For, the margin range of ± 1.0 mm on the form is set. Shipment date field 20 of type 2 reading field
For 4 , set a margin range of ± 0.5 mm.

【0024】次に、ステップST40の検索登録処理が
行われる。ステップST40の検索登録処理は、ステッ
プST41〜ST45で構成されている。ステップST
41で、検索登録手段33は、フォーマット情報メモリ
40に格納されている1番目のフォーマット情報を、そ
のフォーマット情報に付されたグループ名Aと共に読出
す。ステップST42において、検索登録手段33は、
ステップST30で生成された帳票20のフォーマット
情報とフォーマット情報メモリ40から読出されたフォ
ーマット情報のフィールド位置情報を比較する。図13
は、図6のステップST30で設定されたマージン範囲
とフィールド位置の関係を示す図である。例えば、斜線
で示された顧客番号フィールド202 の読取フィールド
Fに対して、外側に設定されたマージンM1 と内側に設
定されたマージンM2 とで、マージン範囲が設定され
る。読取フィールドFの高さhと幅wに対して、帳票2
0におけるマージンM1 の高さと幅はそれぞれh+1,
w+1となる。帳票20におけるマージンM2 の高さと
幅はそれぞれh−1,w−1となる。ステップST42
の比較で、マージンM1 とマージンM2 の間に、フィー
ルド位置が収まるものは、同一のフィールド位置情報と
して判定される。検索登録手段33はフィールド毎に比
較を行い、すべてのフィールド位置情報間の差がステッ
プST30で設定されたマージン範囲以内であれば、両
者フォーマット情報は同一のものと見なす。そして、ス
テップST43において、帳票20の帳票IDには、読
出されたフォーマット情報のグループ名Aが付され、フ
ォーマット情報メモリ40に格納される。
Next, the search registration process of step ST40 is performed. The search registration process of step ST40 is composed of steps ST41 to ST45. Step ST
At 41, the search and registration means 33 reads the first format information stored in the format information memory 40 together with the group name A attached to the format information. In step ST42, the search registration means 33
The format information of the form 20 generated in step ST30 is compared with the field position information of the format information read from the format information memory 40. FIG.
FIG. 7 is a diagram showing a relationship between a margin range set in step ST30 of FIG. 6 and a field position. For example, with respect to the reading field F of the customer number field 20 2 indicated by diagonal lines, the margin range is set by the margin M 1 set outside and the margin M 2 set inside. Form 2 for height h and width w of reading field F
The height and width of the margin M 1 at 0 are h + 1,
w + 1. The height and width of the margin M 2 in the form 20 are h−1 and w−1, respectively. Step ST42
In the comparison, if the field position is between the margin M 1 and the margin M 2 , it is determined as the same field position information. The search / registration means 33 performs comparison for each field, and if the difference between all the field position information is within the margin range set in step ST30, the format information is considered to be the same. Then, in step ST43, the form ID of the form 20 is added with the group name A of the read format information and stored in the format information memory 40.

【0025】ステップST42の比較結果で、フォーマ
ット情報メモリ40から読出されたグループ名Aのフォ
ーマット情報が、帳票20のフォーマット情報と同一と
見なせないと判断された場合、ステップST43でフォ
ーマット情報メモリ40の格納しているフォーマット情
報のすべてが、比較されたかどうか確認される。比較を
終了したフォーマット情報数がフォーマット情報メモリ
40の格納しているフォーマット情報数kに至っていな
い場合は、処理は再びステップST41に戻る。即ち、
比較がグループ名B,C,…のフォーマット情報の順に
繰り返し行われて、帳票20のフォーマット情報に対し
て同一と見なせるフォーマット情報が検索される。前記
比較の繰り返しで、目的とするフォーマット情報が抽出
されなかった場合、ステップST45で、帳票20の作
成されたフォーマット情報と帳票IDとに対して新たな
グループ名が付与され、それらがフォーマット情報メモ
リ40に格納されて登録される。
When it is determined that the format information of the group name A read from the format information memory 40 cannot be regarded as the same as the format information of the form 20 as a result of the comparison at step ST42, the format information memory 40 at step ST43. It is checked whether all the format information stored in the has been compared. When the number of format information for which comparison has been completed has not reached the number k of format information stored in the format information memory 40, the process returns to step ST41. That is,
The comparison is repeated in the order of the format information of the group names B, C, ... And the format information which can be regarded as the same as the format information of the form 20 is searched. If the target format information is not extracted by repeating the comparison, a new group name is added to the created format information and the form ID of the form 20 in step ST45, and these are added to the format information memory. 40 and registered.

【0026】図14は、図1中のフォーマット情報メモ
リへの登録を説明する図である。フォーマット情報メモ
リ40には、各フォーマット情報とグループ名A,B,
C,…がそれぞれ対応して登録される。そして、OCR
で読取を行うときに参照するフォーマット情報を共通と
する帳票IDは、同じグループ名でそれぞれ登録され
る。ステップST40の検索登録処理の後、ステップS
T50において、確認が行われる。表示制御手段34
は、帳票20の帳票IDに対応するフォーマット情報を
読出し、イメージメモリ22に格納されているイメージ
データに重ねて、ディスプレイ35に画像表示する。オ
ペレータは、帳票20に読出しフォーマット情報が適合
することを確認して処理を終了する。
FIG. 14 is a diagram for explaining registration in the format information memory shown in FIG. In the format information memory 40, each format information and group name A, B,
C, ... Are registered correspondingly. And OCR
The form IDs having the same format information that is referred to when they are read are registered under the same group name. After the search registration process of step ST40, step S
At T50, confirmation is done. Display control means 34
Reads out the format information corresponding to the form ID of the form 20, superimposes it on the image data stored in the image memory 22, and displays the image on the display 35. The operator confirms that the read format information matches the form 20 and ends the processing.

【0027】以上のように、本実施例では、光電変換手
段21と、イメージメモリ22と、新規フォーマット情
報生成手段31と、マージン設定手段32と、検索登録
手段33と、フォーマット情報メモリ40とを備えてい
る。そして、新規の帳票IDの帳票20のフォーマット
情報を新規フォーマット情報生成手段31で生成し、マ
ージン設定手段32と検索登録手段33で、登録済のフ
ォーマット情報から帳票20のフォーマット情報と同一
と見なせるフォーマット情報を抽出し、その帳票ID2
1 を、その同一と見なせるフォーマット情報と同じグ
ループ名を付してフォーマット情報メモリ40に登録す
るようにしている。よって、同一と見なせるフォーマッ
ト情報が存在する場合に、新たにフォーマット情報を登
録する必要がなくなり、フォーマット情報メモリ40の
容量を小さくできる。これにより、OCRで読取を行う
際の、検索時間も短縮される。また、各読取フィールド
を第1種読取フィールドと第2種読取フィールドと分け
て、位置情報の指定及びマージン範囲の設定を行うよう
にしているので、OCRによる文字認識精度が十分確保
される。
As described above, in this embodiment, the photoelectric conversion means 21, the image memory 22, the new format information generation means 31, the margin setting means 32, the search registration means 33, and the format information memory 40 are provided. I have it. Then, the format information of the form 20 having the new form ID is generated by the new format information generation means 31, and the margin setting means 32 and the search registration means 33 can identify the format information of the form 20 from the registered format information. Information is extracted and its form ID2
0 1 is registered in the format information memory 40 with the same group name as the format information that can be regarded as the same. Therefore, when there is format information that can be regarded as the same, it is not necessary to newly register the format information, and the capacity of the format information memory 40 can be reduced. This also shortens the search time when reading by OCR. Further, since each reading field is divided into the first type reading field and the second type reading field to specify the position information and set the margin range, the character recognition accuracy by OCR is sufficiently ensured.

【0028】なお、本発明は、上記実施例に限定されず
種々の変形が可能である。その変形例としては、例えば
次のようなものがある。 (1) 新規フォーマット情報生成手段31では、フォ
ーマット生成規則を参照して、メージデータから帳票2
0のフォーマット情報を生成してるが、帳票20を定規
で測定してフィールド位置情報を求め、キーボード等で
属性情報を定義することも、可能である。 (2) 帳票20の書式、或いはOCRで読取るフィー
ルド等は、図4に限定されない。 (3) 上記実施例ではOCRで文字を読取る例を示し
ているが、文字ばかりでなく、記号、或いは丸印で特定
の記号を選択するような記載に対しても、有効である。
The present invention is not limited to the above embodiment, and various modifications can be made. For example, there are the following modifications. (1) The new format information generation means 31 refers to the format generation rule to convert the form 2 from the image data.
Although the format information of 0 is generated, it is also possible to measure the form 20 with a ruler to obtain the field position information and define the attribute information with a keyboard or the like. (2) The form of the form 20 or the fields read by OCR are not limited to those shown in FIG. (3) In the above embodiment, an example of reading a character by OCR is shown, but it is effective not only for a character but also for a description that a specific symbol is selected by a symbol or a circle.

【0029】[0029]

【発明の効果】以上詳細に説明したように、第1の本発
明によれば、未登録帳票に対する新規フォーマット情報
を新規フォーマット情報生成処理で生成し、マージン設
定処理で設定されたマージン範囲を用いて、検索登録処
理で新規フォーマット情報と同一と見なせるフォーマッ
ト情報を、登録済のフォーマット情報から抽出してい
る。そして、その同一と見なせるフォーマット情報に付
されたグループ名を対象帳票の帳票IDに付して登録す
る。そのため、未登録帳票の帳票ID毎に、フォーマッ
ト情報メモリにフォーマット情報を登録する必要がなく
なり、フォーマット情報メモリの容量を小さくできる。
また、これにより、OCRで帳票の記載事項を読取る際
の、フォーマット情報の検索時間を短縮することができ
る。第2の発明によれば、第1の発明における新規フォ
ーマット情報生成処理は、フォーマット情報が登録され
ていない未登録帳票のイメージデータを取り込み、予め
作成されたフォーマット生成規則に基づいて該イメーシ
データを処理して新規フォーマット情報を生成するの
で、自動的に新規フォーマット情報が生成できる。その
ため、例えば、定規等で帳票の各読取りフィールドを測
定する等の、煩わしさが軽減される。
As described in detail above, according to the first aspect of the present invention, new format information for an unregistered form is generated by the new format information generation process, and the margin range set by the margin setting process is used. Then, the format information that can be regarded as the same as the new format information in the search registration processing is extracted from the registered format information. Then, the group name attached to the format information that can be regarded as the same is attached to the form ID of the target form and registered. Therefore, it is not necessary to register the format information in the format information memory for each form ID of the unregistered form, and the capacity of the format information memory can be reduced.
Further, this makes it possible to shorten the search time for the format information when reading the description items on the form by the OCR. According to the second invention, the new format information generation process in the first invention takes in the image data of the unregistered form in which the format information is not registered, and the image data is generated based on the format generation rule created in advance. Since the new format information is generated by processing, the new format information can be automatically generated. Therefore, for example, the troublesomeness of measuring each reading field of the form with a ruler or the like is reduced.

【0030】第3の発明によれば、新規フォーマット情
報生成手段と、マージンを設定するマージン設定手段
と、グループ名でフォーマット情報を格納するフォーマ
ット情報メモリと、未登録帳票のフォーマット情報と同
一のフォーマット情報を検索する検索登録手段とを、フ
ォーマット情報生成装置に備えている。そのため、未登
録帳票の帳票ID毎に、フォーマット情報メモリにフォ
ーマット情報を登録する必要がなくなり、そのフォーマ
ット情報メモリの容量を小さくできる。また、これによ
り、OCRで帳票の記載事項を読取る際の、フォーマッ
ト情報の検索時間を短縮することができる。第4の発明
によれば、第3の発明におけるマージン設定手段は、フ
ォーマット情報における各読取フィールドにそれぞれ対
応付けて記憶されたマージン値を用い、各読取フィール
ドに対するマージン範囲をそれぞれ設定する構成にして
いるので、各読取フィールドに適したマージン範囲が設
定され、文字認識の精度が向上できる。第5の発明によ
れば、第3または第4の発明における各読取フィールド
を、第1種読取フィールドと第2種読取フィールドとで
構成し、マージン設定手段は、その第1種読取フィール
ドに対応する第1のマージン値と、前記第2種読取フィ
ールドに対応し前記第1のマージン値とは異なる第2の
マージン値とを用いて各読取フィールドに対するマージ
ン範囲をそれぞれ設定する。そのため、例えば、帳票に
裁断誤差があっても、OCRによる文字認識精度が低下
しない。
According to the third invention, a new format information generating means, a margin setting means for setting a margin, a format information memory for storing format information by a group name, and the same format as the format information of an unregistered form. The format information generating device is provided with a search / registration means for searching information. Therefore, it is not necessary to register the format information in the format information memory for each form ID of the unregistered form, and the capacity of the format information memory can be reduced. Further, this makes it possible to shorten the search time for the format information when reading the description items on the form by the OCR. According to the fourth invention, the margin setting means in the third invention is configured to set the margin range for each reading field by using the margin value stored in association with each reading field in the format information. Therefore, the margin range suitable for each reading field is set, and the accuracy of character recognition can be improved. According to the fifth invention, each reading field in the third or fourth invention is composed of a first type reading field and a second type reading field, and the margin setting means corresponds to the first type reading field. The margin range for each reading field is set using the first margin value and the second margin value corresponding to the second type reading field and different from the first margin value. Therefore, for example, even if there is a cutting error in the form, the character recognition accuracy by OCR does not decrease.

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

【図1】本発明の実施例を示すフォーマット情報生成装
置の機能ブロック図である。
FIG. 1 is a functional block diagram of a format information generation device showing an embodiment of the present invention.

【図2】図1の帳票のフォーマット情報を説明する図で
ある。
FIG. 2 is a diagram illustrating format information of the form in FIG.

【図3】帳票の書式を説明する図である。FIG. 3 is a diagram illustrating a form of a form.

【図4】図1中の新規フォーマット情報生成手段の構成
ブロック図である。
4 is a configuration block diagram of a new format information generating unit in FIG.

【図5】図1中の帳票20を示す図である。5 is a diagram showing a form 20 in FIG. 1. FIG.

【図6】図1のフォーマット情報生成装置を用いたフォ
ーマット情報生成処理を示すフローチャートである。
6 is a flowchart showing a format information generation process using the format information generation device of FIG.

【図7】図6中の新規フォーマット情報生成処理を示す
図である。
7 is a diagram showing a new format information generation process in FIG.

【図8】線分の位置及び文字の位置の座標の算出方法を
説明するための帳票イメージの投影図である。
FIG. 8 is a projection diagram of a form image for explaining a method of calculating coordinates of a position of a line segment and a position of a character.

【図9】イメージ解析手段31aで得られたイメージ解
析結果の例を示す図である。
FIG. 9 is a diagram showing an example of an image analysis result obtained by the image analysis means 31a.

【図10】フォーマット生成規則の例を示す図である。FIG. 10 is a diagram showing an example of a format generation rule.

【図11】図1の新規フォーマット情報生成手段で生成
された帳票20のフォーマット情報を示す図である。
11 is a diagram showing format information of the form 20 generated by the new format information generating means of FIG.

【図12】発送日フィールドの原点を示す図である。FIG. 12 is a diagram showing the origin of a shipping date field.

【図13】図6のステップST30で設定されたマージ
ン範囲とフィールド位置の関係を示す図である。
13 is a diagram showing a relationship between a margin range set in step ST30 of FIG. 6 and a field position.

【図14】図1中のフォーマット情報メモリへの登録を
説明する図である。
FIG. 14 is a diagram illustrating registration in the format information memory in FIG. 1.

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

20 帳票 21 光電変換手段 22 イメージメモリ 31 新規フォーマット情報生成手段 32 マージン設定手段 33 検索登録手段 34 表示制御手段 40 フォーマット情報メモリ ST10 イメージ取込み処理 ST20 新規フォーマット情報生成処理 ST30 マージン設定処理 ST40 検索登録処理 20 forms 21 photoelectric conversion means 22 image memory 31 new format information generation means 32 margin setting means 33 search registration means 34 display control means 40 format information memory ST10 image import processing ST20 new format information generation processing ST30 margin setting processing ST40 search registration processing

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 帳票ID毎に書式の定まった帳票に対し
て光学式文字読取装置で必要事項の読取りを行うため
に、該各帳票IDに対応する帳票に対し、読取り参照用
の固有のフォーマット情報をそれぞれ生成して登録する
フォーマット情報生成方法において、 前記フォーマット情報が登録されていない未登録帳票に
対して新規の前記フォーマット情報を生成する新規フォ
ーマット情報生成処理と、 予め作成されたフォーマット生成規則に基づき前記新規
フォーマット情報に対してマージン範囲を設定するマー
ジン設定処理と、 前記マージン範囲内にあって前記新規フォーマット情報
と同一と見なせるものを登録済の前記フォーマット情報
から抽出し、該抽出された登録済のフォーマット情報と
同じグループ名を前記未登録帳票の前記帳票IDに付し
て登録し、該同一と見なせる登録済のフォーマット情報
が存在しない場合、該新規フォーマット情報とその帳票
IDと新たなグループ名とを対応させて登録する検索登
録処理とを、 行うことを特徴とするフォーマット情報生成方法。
1. A unique format for reading reference to a form corresponding to each form ID in order to read necessary items with an optical character reading device for the form having a fixed format for each form ID. In a format information generation method for generating and registering information, new format information generation processing for generating the new format information for an unregistered form in which the format information is not registered, and a format generation rule created in advance Margin setting processing for setting a margin range for the new format information based on the above, and what is considered to be the same as the new format information within the margin range is extracted from the registered format information, and the extracted The same group name as the registered format information has the form ID of the unregistered form. When there is no registered format information that can be regarded as the same, the search registration processing for registering the new format information, the form ID thereof, and the new group name in association with each other is performed. Characteristic format information generation method.
【請求項2】 前記新規フォーマット情報生成処理は、
前記フォーマット情報が登録されていない未登録帳票の
イメージデータを取り込み、予め作成されたフォーマッ
ト生成規則に基づいて該イメーシデータを処理して前記
新規フォーマット情報を生成することを特徴とする請求
項1記載のフォーマット情報生成方法。
2. The new format information generation process,
2. The image data of an unregistered form in which the format information is not registered is fetched, the image data is processed based on a format generation rule created in advance, and the new format information is generated. Format information generation method.
【請求項3】 帳票IDで区別された帳票毎に書式の定
まった帳票に対して光学式文字読取装置で必要事項の読
取りを行うために、該各帳票IDに対応する帳票に対
し、読取り参照用の固有のフォーマット情報をそれぞれ
生成して登録するフォーマット情報生成装置において、 対象帳票のイメージを取得してイメージデータに変換す
る光電変換手段と、 前記イメージデータを格納するイメージメモリと、 前記イメージメモリに格納されたイメージデータに基づ
き、前記帳票IDを認識すると共に新規の前記フォーマ
ット情報を生成する新規フォーマット情報生成手段と、 予め作成されたフォーマット生成規則に基づき前記新規
フォーマット情報に対してマージン範囲を設定するマー
ジン設定手段と、 複数の前記フォーマット情報と、それらの各フォーマッ
ト情報にそれぞれ付されたグループ名と、該フォーマッ
ト情報が適用される帳票ID群とを関連させて格納する
フォーマット情報メモリと、 前記フォーマット情報メモリに格納されている前記フォ
ーマット情報のうち、前記マージン範囲内にあって前記
新規フォーマット情報と同一と見なせるフォーマット情
報を抽出し、該抽出したフォーマット情報に付されたグ
ループ名と前記未登録帳票の前記帳票IDとを該フォー
マット情報メモリに格納して登録し、該同一と見なせる
フォーマット情報が存在しない場合、該新規フォーマッ
ト情報とその帳票IDと新たなグループ名とを対応させ
て該フォーマット情報メモリに格納して登録する検索登
録手段とを、 備えたことを特徴とするフォーマット情報生成装置。
3. A read reference is made to a form corresponding to each form ID in order for the optical character reader to read necessary items for the form having a fixed format for each form distinguished by the form ID. In a format information generation device for respectively generating and registering unique format information for use in a device, photoelectric conversion means for acquiring an image of a target form and converting it into image data, an image memory for storing the image data, the image memory A new format information generating means for recognizing the form ID and generating new format information based on the image data stored in, and a margin range for the new format information based on a format generation rule created in advance. Margin setting means to set, a plurality of the format information, and Among the format information stored in the format information memory, a group name assigned to each format information, a format information memory that stores a form ID group to which the format information is applied in association with each other, Format information that is considered to be the same as the new format information within the margin range is extracted, and the group name attached to the extracted format information and the form ID of the unregistered form are stored in the format information memory. If there is no format information that is registered and can be regarded as the same, a search / registration unit that stores the new format information, the form ID thereof, and the new group name in the format information memory in association with each other is registered. A format information generation device characterized by the above.
【請求項4】 前記マージン設定手段は、前記フォーマ
ット情報における各読取フィールドにそれぞれ対応付け
て記憶されたマージン値を用い、該各読取フィールドに
対する前記マージン範囲をそれぞれ設定する構成にした
ことを特徴とする請求項3記載のフォーマット情報生成
装置。
4. The margin setting means is configured to set the margin range for each reading field by using a margin value stored in association with each reading field in the format information. The format information generation device according to claim 3.
【請求項5】 前記フォーマット情報における各読取フ
ィールドは、対象帳票の端部を原点とした位置関係で表
される第1種読取フィールドと、該対象帳票に描画され
た線分上の任意の点を原点とした位置関係で表される第
2種読取フィールドとで構成し、 前記マージン設定手段は、前記第1種読取フィールドに
対応する第1のマージン値と、前記第2種読取フィール
ドに対応し前記第1のマージン値とは異なる第2のマー
ジン値とを用い、前記各読取フィールドに対するマージ
ン範囲をそれぞれ設定する構成にしたことを特徴とする
請求項3または4記載のフォーマット情報生成装置。
5. Each reading field in the format information includes a first-type reading field represented by a positional relationship with an end of the target form as an origin, and an arbitrary point on a line segment drawn on the target form. And a second type reading field represented by a positional relationship with the origin as the origin. The margin setting means corresponds to the first type margin value corresponding to the first type reading field and the second type reading field. 5. The format information generating apparatus according to claim 3, wherein a margin range for each of the read fields is set by using a second margin value different from the first margin value.
JP7150343A 1995-06-16 1995-06-16 Method and device for format information generation Pending JPH096869A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7150343A JPH096869A (en) 1995-06-16 1995-06-16 Method and device for format information generation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7150343A JPH096869A (en) 1995-06-16 1995-06-16 Method and device for format information generation

Publications (1)

Publication Number Publication Date
JPH096869A true JPH096869A (en) 1997-01-10

Family

ID=15494926

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7150343A Pending JPH096869A (en) 1995-06-16 1995-06-16 Method and device for format information generation

Country Status (1)

Country Link
JP (1) JPH096869A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0863658A2 (en) * 1997-03-05 1998-09-09 Matsushita Electric Industrial Co., Ltd. Digital integrated apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0863658A2 (en) * 1997-03-05 1998-09-09 Matsushita Electric Industrial Co., Ltd. Digital integrated apparatus
EP0863658A3 (en) * 1997-03-05 1998-11-04 Matsushita Electric Industrial Co., Ltd. Digital integrated apparatus

Similar Documents

Publication Publication Date Title
US11182604B1 (en) Computerized recognition and extraction of tables in digitized documents
KR100292098B1 (en) Character recognition device and method
JP3842006B2 (en) Form classification device, form classification method, and computer-readable recording medium storing a program for causing a computer to execute these methods
US6400845B1 (en) System and method for data extraction from digital images
JP3469345B2 (en) Image filing apparatus and filing method
US7149347B1 (en) Machine learning of document templates for data extraction
US6778703B1 (en) Form recognition using reference areas
JP3425408B2 (en) Document reading device
US7561734B1 (en) Machine learning of document templates for data extraction
JP3602596B2 (en) Document filing apparatus and method
JPH08305731A (en) Method for document storage or the like and document server
JP2004139484A (en) Form processing apparatus, program for executing the apparatus, and form format creation program
JPH07107694B2 (en) Document processor
US20080131000A1 (en) Method for generating typographical line
WO2021140682A1 (en) Information processing device, information processing method, and information processing program
JPH09231291A (en) Slip reading method and device
JPH09319824A (en) Form recognition method
JPH096869A (en) Method and device for format information generation
JP2000003403A (en) Form input support method
JP3732254B2 (en) Format information generation method and format information generation apparatus
JPH10207981A (en) Document recognition method
JP2001320571A (en) System and method for processing handwritten slip data
JP4517822B2 (en) Image processing apparatus and program
JPH07249099A (en) Form identification device
JPH11282956A (en) Slip identification method, its device and storage medium

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20021203