JPH083828B2 - Document image understanding device - Google Patents
Document image understanding deviceInfo
- Publication number
- JPH083828B2 JPH083828B2 JP60122425A JP12242585A JPH083828B2 JP H083828 B2 JPH083828 B2 JP H083828B2 JP 60122425 A JP60122425 A JP 60122425A JP 12242585 A JP12242585 A JP 12242585A JP H083828 B2 JPH083828 B2 JP H083828B2
- Authority
- JP
- Japan
- Prior art keywords
- document image
- rectangular area
- understanding
- document
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Character Input (AREA)
- Processing Or Creating Images (AREA)
- Character Discrimination (AREA)
Description
【発明の詳細な説明】 〔発明の利用分野〕 本発明は文書画像処理方式に係り、特に電子的文書フ
アイル装置の入力部として好適な文書理解方式に関す
る。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a document image processing system, and more particularly to a document understanding system suitable as an input unit of an electronic document file device.
従来の電子的文書フアイル装置は単に文書の各ページ
を画像として格納するのみであり、検索のための二次情
報は別にキーボードなどの符号入力手段から外部から与
えてやる必要があつた。しかし、フアイル入力作業の省
力化のためには文書中に記載されている表題や著者など
を自動的に読み取つて二次情報を生成することが望まし
い。さらに検索を高度化するためには図表のキヤプシヨ
ンや章・節表題の自動入力あるいは本文自体の認識によ
る自動キーワード抽出などが必要となる。また対象文書
の画像を表題・著者・要約・本文・図・写真などの部分
に分割すること、さらに文字の部分は認識して符号化す
ることは、記憶スペースの削減や検索単位の多様化のた
めにも要請されていた。A conventional electronic document file device merely stores each page of a document as an image, and secondary information for retrieval needs to be externally provided from a code input means such as a keyboard. However, in order to save labor in file input work, it is desirable to automatically read the title, author, etc. described in the document to generate the secondary information. In order to further improve the search, it is necessary to use captions for figures and tables, automatic input of chapter / section titles, or automatic keyword extraction by recognizing the text itself. In addition, dividing the image of the target document into parts such as titles, authors, summaries, text, figures, and photos, and recognizing and encoding the character parts reduces storage space and diversifies search units. It was also requested for.
従来技術ではこのような問題点に対処するため、文書
の中の検索対象領域を外部から指定し、文字認識装置に
よつて検索用文字データに自動的に変換する方法が提案
されており、たとえば特許公開公報昭60-17565号「画像
記憶検索装置」(昭和60年1月29日公開)にこのような
方法の一例が開示されている。しかし、この方法は検索
対象領域の指定に人手がかかるという問題点がある。In order to deal with such a problem in the conventional technology, a method of externally designating a search target area in a document and automatically converting it into search character data by a character recognition device has been proposed. An example of such a method is disclosed in Japanese Patent Laid-Open Publication No. Sho 60-17565, "Image storage and retrieval apparatus" (published on January 29, 1985). However, this method has a problem that it takes a lot of labor to specify the search target area.
人手指定方式の問題点に対処するため、文書の内容を
理解しその理解結果に基づいて文書の処理を行う方式が
研究されており、たとえば情報処理学会第23回全国大会
講演論文「新聞記事の切り抜きを行うシステムに関する
基礎的研究」(論文集6C−1、昭和56年)に記載してあ
る。しかし、この文書理解技術は新聞を対象としたもの
であるため、論文誌や特許公報のようにある程度定型化
された文書に対して、検索のため必要な表題や著者など
の二次情報を効率的に抽出する目的には必ずしも適しな
い。また、二次情報抽出を失敗したとき抽出方法を改良
して行く手段は適当なものがない。In order to deal with the problem of the manual designation method, a method of understanding the content of a document and processing the document based on the understanding result is being researched. For example, the 23rd national conference of the Information Processing Society of Japan Basic research on clipping system "(Proceedings 6C-1, 1981). However, since this document understanding technology is aimed at newspapers, it is possible to efficiently use secondary information such as titles and authors necessary for searching for documents that are standardized to some extent, such as journals and patent gazettes. It is not always suitable for the purpose of extraction. Further, there is no suitable means for improving the extraction method when the secondary information extraction fails.
本発明の目的は、定型化された一般の文書を対象と
し、その構造に従つて分割を行うとともに、必要な場合
には文字部の認識を行うことを可能とする文書理解方式
を提供することにある。An object of the present invention is to provide a document comprehension method for a standardized general document, which can be divided according to its structure and can recognize a character portion when necessary. It is in.
かかる目的を達成するために、本発明においては画像
の構造を表現する文法を用い、この文法によつて表現さ
れた記述を構文解析することにより、未知入力画像の構
造を把握するものである。上記の文法では、画像を矩形
領域の集合として表現し、上記矩形領域の絶対的あるい
は相対的な大きさ及び矩形領域間の絶対的あるいは相対
的な関係を表す数量を変数として含んでいる。また、矩
形領域の探索方法を指定することができる。さらに、矩
形領域をまた矩形領域の集合として表現し、このような
階層的な表現によつて、画像の構文を細部に至るまで表
現できる。In order to achieve such an object, the present invention uses a grammar that expresses the structure of an image, and parses the description expressed by this grammar to grasp the structure of an unknown input image. In the above grammar, an image is expressed as a set of rectangular areas, and the absolute or relative size of the rectangular areas and the quantity representing the absolute or relative relationship between the rectangular areas are included as variables. Also, a search method for a rectangular area can be specified. Further, the rectangular area is also expressed as a set of rectangular areas, and by such a hierarchical expression, the syntax of the image can be expressed in detail.
各種文書に対し、上記の文法に従つて表現された文書
の書式があらかじめメモリ内に格納されている。構文解
析部では未知画像が入力されると、画像書式で指定され
た探索方法に従つて矩形領域を探索し、探索が成功した
か否かの情報と探索時に定まるパラメータ(矩形領域の
絶対的あるいは相対的な大きさ及び矩形領域間の絶対的
あるいは相対的な関係)を表す数値を抽出する。構文理
解部は、上記のパラメータの数値を画像書式の中の変数
に代入し、次の解析を行うことにより、順次画像の構文
解析を進める。For each type of document, the document formats expressed according to the above grammar are stored in advance in the memory. When an unknown image is input in the syntactic analysis unit, a rectangular area is searched according to the search method specified in the image format, information indicating whether the search is successful, and a parameter determined at the time of search (absolute or absolute value of the rectangular area). Numerical value indicating relative size and absolute or relative relationship between rectangular areas is extracted. The syntax comprehension unit substitutes the numerical values of the above parameters into variables in the image format, and performs the next analysis to sequentially perform the syntax analysis of the image.
本発明の実施例を説明する前に本発明の原理を説明す
る。第1図に入力画像として一定の書式を有する技術論
文の一頁の例を示す。以下の説明では対象として技術論
文を例にとるが、他の文書であつても文法の形式が若干
異なるのみであり文法の一部を変更すれば本発明が適用
でき、本発明は上記技術論文の一例に限定されるもので
はない。Before describing the embodiments of the present invention, the principle of the present invention will be described. FIG. 1 shows an example of one page of a technical paper having a certain format as an input image. In the following description, a technical paper is taken as an example as a target, but even in other documents, the format of the grammar is slightly different, and the present invention can be applied if a part of the grammar is changed. However, the present invention is not limited to this.
次に、文書の構造を表現する文法(以下文書文法と略
する)の一例を示す。Next, an example of a grammar expressing the structure of a document (hereinafter abbreviated as document grammar) is shown.
(defform F (form F1(10 90 10 40)) (form F2 …… ) (form F3 …… )) (defform F1 (form F11(10 90 10 50)) (form F12(10 90 60 90))) (defmac LINE−1(%1) (point?Y1(mode IN Y LESS) (point?Y2(mode OUT Y LESS) (form %1(0 ?W ?Y1 ?Y2))) 上記の文法を第1図の例を参照して説明する。(Defform F (form F1 (10 90 10 40)) (form F2 ......) (form F3 ......)) (defform F1 (form F11 (10 90 10 50)) (form F12 (10 90 60 90))) (Defmac LINE-1 (% 1) (point? Y1 (mode IN Y LESS) (point? Y2 (mode OUT Y LESS) (form% 1 (0? W? Y1? Y2)))) This will be described with reference to the example of the figure.
最初のdefform F……は、書式Fが第2図のよう
に、書式F1の下部に書式F2及びF3が横に並んだものが付
随して構成されることを示す。第1図では第2図に対応
したF,F1,F2,F3の部分は破線で囲んで示してある。書式
各F1の次の( )で挟まれた4個の数値 10 90 10 40 は書式Fに対応する全領域を100×100としたときの書式
F1の領域の位置を示す。ここで、座標系は左上を原点と
している。領域を示す数値は、X座標の最小値、X座標
の最大値、Y座標の最小値、Y座標の最大値である。こ
の例のようにパラメータの値が既知のときは、その値を
直接記述すればよい。同様に、書式F2、書式F3も矩形領
域で記述する。The first defform F ... indicates that the form F is formed by additionally forming the forms F2 and F3 laterally below the form F1 as shown in FIG. In FIG. 1, the portions F, F1, F2, and F3 corresponding to FIG. 2 are shown surrounded by broken lines. Format Four numbers 10 90 10 40 sandwiched by () next to each F1 are the format when the total area corresponding to format F is 100 × 100.
The position of the area of F1 is shown. Here, the coordinate system has the upper left as the origin. The numerical values indicating the region are the minimum value of the X coordinate, the maximum value of the X coordinate, the minimum value of the Y coordinate, and the maximum value of the Y coordinate. When the parameter value is known as in this example, the value may be directly described. Similarly, format F2 and format F3 are also described in rectangular areas.
次のdefform F1……は、書式F1が、さらに書式F11と
F12が縦に並んで構成されることを示す。すなわち、書
式F11のY方向の領域は10から50であり、書式F12のY方
向の領域は60から90である。書式F11と、書式F12の領域
の位置は、書式F1の左上を原点とした座標系で記述して
いる。従つて、書式Fからみれば相対座標系になつてい
る。In the next defform F1 ..., the format F1 is
Indicates that the F12s are arranged vertically. That is, the Y-direction area of the format F11 is 10 to 50, and the Y-direction area of the format F12 is 60 to 90. The positions of the areas of format F11 and format F12 are described in the coordinate system with the upper left of format F1 as the origin. Therefore, the format F has a relative coordinate system.
このように、書式を矩形領域で表現し、この領域の集
合として階層的に次々と表現する事によつて画像を一般
化して表現することができる。もちろん階層的ではな
く、第3図に示すように書式Fを基準として絶対座標系
で記述してもよい。この場合、第2図と同様の矩形領域
を指定するためには下記のようにすればよい。In this way, the image can be generalized by expressing the format in the rectangular area and hierarchically expressing the area as a set of the areas. Of course, it is not hierarchical and may be described in the absolute coordinate system with the format F as a reference as shown in FIG. In this case, in order to specify the same rectangular area as in FIG. 2, the following may be done.
(defform F (form F11(18 82 13 25)) (form F12(18 82 28 38)) (form F2 …… ) (form F3 …… )) 次のdefmac LINE−1(%1)以降は、マクロ定義で
ある。本マクロ定義の本体である、以下の3行の記述
は、矩形領域の上から1行目めが書式%1であることを
表現したものである。(Defform F (form F11 (18 82 13 25)) (form F12 (18 82 28 38)) (form F2 ......) (form F3 ......)) After the next defmac LINE-1 (% 1), macro It is a definition. The following three-line description, which is the main body of this macro definition, expresses that the first line from the top of the rectangular area has the format% 1.
(point?Y1(mode IN Y LESS)) (point?Y2(mode OUT Y LESS)) (form %1(0 ?W ?Y1 ?Y2))) ここで、?Wは書式の横方向の大きさ、?Hは書式の縦方
向の大きさを表す。?Y1,?Y2は以下に述べるように探索
により特定される変数である。(Point? Y1 (mode IN Y LESS)) (point? Y2 (mode OUT Y LESS)) (form% 1 (0? W? Y1? Y2))) where? W is the horizontal size of the format. ,? H represents the vertical size of the format. ? Y1 and? Y2 are variables specified by the search as described below.
pointはある条件を満足する点を探索し、変数に代入
することを示す。探索条件はmodeによつて指定する。IN
・OUTは探索点が白から黒への変化点か黒から白への変
化点かを示し、Yは探索軸(XまたはY)を示し、LESS
は探索方向を表す。areaは探索範囲の領域を示す。point means to search for a point that satisfies a certain condition and substitute it into a variable. The search condition is specified by mode. IN
・ OUT indicates whether the search point is the change point from white to black or the change point from black to white, Y indicates the search axis (X or Y), and LESS
Indicates the search direction. area indicates the area of the search range.
探索方法をマクロ定義の記述を例に第4図を用いて説
明する。(A)は書式中にTitle…、Author…なる行が
存在することを示す。これらの行のY方向の座標値、す
なわち1行目及び2行目を記述したのが(B)と(C)
であり1行目は?Y1から?Y2までに存在し、2行目が?Y3
から?Y4までに存在していることを示す。前述したよう
に(B)は1行目の書式が%1であることを定義したマ
クロ、同様に、(C)は2行目の書式が%1であること
を定義したマクロである。これらマクロの呼び出しかた
は以下のようにすればよい。The search method will be described with reference to FIG. 4 by taking the description of the macro definition as an example. (A) shows that lines such as Title ..., Author ... Are present in the format. The coordinate values of these lines in the Y direction, that is, the first and second lines are described in (B) and (C).
And the first line exists from? Y1 to? Y2, and the second line is? Y3.
To? Y4. As described above, (B) is a macro that defines that the format of the first line is% 1, and similarly (C) is a macro that defines that the format of the second line is% 1. You can call these macros as follows.
(LINE−1 F1) (LINE−2 F2) すなわち、1行目の書式がF1,2行目の書式がF2とな
る。(B)の2行目のpointで指定される座標値?Y1の探
索条件は、IN Y LESSである。従つて、白から黒への
変化点、探索軸はY、その方向はLESSすなわちY座標値
の小さいものから探索するという条件になつている。ま
たY座標値の大きいものから探索する場合はGREATERと
すればよい。これらの条件を満足するものが1行目の上
限の座標値?Y1である。(B)の3行目のpointで指定さ
れる1行目の下限の座標値?Y2は上記の探索条件におい
て、黒から白への変化点であると記述すればよい。すな
わち?Y2の探索条件は、OUT Y LESSである。(LINE-1 F1) (LINE-2 F2) That is, the format of the first line is F1, and the format of the second line is F2. The search condition for the coordinate value? Y1 designated by point in the second line in (B) is IN Y LESS. Therefore, the condition is that the change point from white to black, the search axis is Y, and the direction is LESS, that is, the search is performed from the one having a smaller Y coordinate value. When searching from the one with the largest Y coordinate value, GREATER may be used. The one satisfying these conditions is the upper limit coordinate value? Y1 on the first line. The lower limit coordinate value? Y2 on the first line designated by point on the third line in (B) may be described as a change point from black to white under the above search conditions. That is, the search condition of? Y2 is OUT Y LESS.
次に、書式中の2行目を定義した(C)について説明
する。2行目は1行目の次の行であるから、1行目の下
限?Y2を探索し、?Y3は探索範囲の領域をareaで示す。す
なわち、探索対象とする矩形領域を、 0 ?W ?Y2 ?H とすることによつて、1行目の下限から(B)と同様の
探索をすることができる。Next, (C) which defines the second line in the format will be described. Since the second line is a line next to the first line, the lower limit? Y2 of the first line is searched, and? Y3 indicates the area of the search range by area. That is, by setting the rectangular area to be searched as 0? W? Y2? H, the same search as in (B) can be performed from the lower limit of the first line.
文書の理解においては、文法に則つて書かれた表現を
参照し、その中に記述された矩形領域が文書に存在する
か否かを順次調べて行く。変数を含んで記述された矩形
領域が探索されると、その変数の数値が得られることと
なり、以後はその数値を変数に代入して用いる。In understanding a document, an expression written in accordance with a grammar is referred to, and it is sequentially checked whether or not the rectangular area described therein exists in the document. When a rectangular area including a variable is searched for, a numerical value of the variable is obtained, and thereafter, the numerical value is substituted for the variable and used.
次に、矩形領域間の演算について説明する。実際の文
書では矩形以外の形状をした領域も出現する。第5図
(A),(B)は矩形以外の形状をした領域の例であ
る。また、(C)は一つの矩形領域が二つの矩形領域に
分離した例を示す。第5図(A),(B)は、それぞれ
破線で示すように、二つの矩形領域の和あるいは差とし
て考えられる。また、(C)は二つの矩形領域がつなが
つて仮想的に一つの矩形領域に纏まつていると考えれ
ば、表現が単純になる。このような矩形領域間の演算を
可能にするため、次のように領域の仮想的な転送を定義
する。Next, the calculation between the rectangular areas will be described. In an actual document, an area having a shape other than a rectangle also appears. FIGS. 5A and 5B are examples of regions having shapes other than rectangles. Further, (C) shows an example in which one rectangular area is separated into two rectangular areas. 5 (A) and 5 (B) can be considered as the sum or difference of two rectangular areas, as indicated by broken lines. Further, in (C), if it is considered that two rectangular areas are connected and virtually combined into one rectangular area, the expression becomes simple. In order to enable calculation between such rectangular areas, virtual transfer of areas is defined as follows.
(map&form F (space ?W ?H) (position ((?X0 ?Y0) (?Xmin ?Xmax ?Ymin ?Ymax)) (… ))) 第6図はこの定義の意味を示したものである。space
は、新しく書式Fとし幅?W、高さ?Hの矩形領域を設定
し、この領域中に転送が行われることを示す。position
は転送先の矩形領域の左上の座標を表す。4個の値 (?Xmin ?Xmax ?Ymin ?Ymax) で示される転送先の矩形領域を、上記の転送先に複写す
る。(Map & form F (space? W? H) (position ((? X0? Y0) (? Xmin? Xmax? Ymin? Ymax)) (...))) Figure 6 shows the meaning of this definition. space
Indicates that a new format F is set, and a rectangular area of width? W and height? H is set, and transfer is performed in this area. position
Represents the upper left coordinates of the rectangular area of the transfer destination. The transfer destination rectangular area indicated by four values (? Xmin? Xmax? Ymin? Ymax) is copied to the above transfer destination.
この仮想的転送を第7図により具体的に説明する。解
析する対象である実際の書式が(A)のように配置され
てあつたとする。これは多段組、もしくはダブルカラム
とよばれているものである。書式F1と書式F2は、空間的
に横並びとして配置されているが、意味的には(B)の
ように縦並びになつている。このような矩形領域間の演
算は (map&form F (space 50 60) (position((10 10)(10 40 10 40)) ((10 40)(40 70 10 30)))) によつて表現できる。(B)に示す仮想的な書式はspac
eによつて、幅50、高さ60の矩形領域を設定する。そし
て(A)と(B)の関係を、 (position((10 10)(10 40 10 40)) ((10 40)(40 70 10 30))) のように表現する。(A)における矩形領域(10 40
10 40)は、(B)の(10 10)を原点とする領域に転
送される。This virtual transfer will be specifically described with reference to FIG. It is assumed that the actual format to be analyzed is arranged as shown in (A). This is called a multi-column or double column. The formats F1 and F2 are spatially arranged side by side, but semantically they are vertically aligned as shown in (B). The operation between such rectangular areas can be expressed by (map & form F (space 50 60) (position ((10 10) (10 40 10 40)) ((10 40) (40 70 10 30)))) . The virtual format shown in (B) is spac
A rectangular area having a width of 50 and a height of 60 is set by e. Then, the relationship between (A) and (B) is expressed as (position ((10 10) (10 40 10 40)) ((10 40) (40 70 10 30))). Rectangular area in (A) (10 40
10 40) is transferred to the area having the origin of (10 10) in (B).
以上に説明した仮想的転送を組み合わせれば、第5図
に示したような複雑な形状の領域は二つ以上の矩形領域
間の演算によつて表現することができる。たとえば、第
5図(A)は大きさの異なる二つの矩形領域を隣接させ
て転送したものとして表現できる。By combining the virtual transfer described above, a region having a complicated shape as shown in FIG. 5 can be expressed by an operation between two or more rectangular regions. For example, FIG. 5 (A) can be expressed as a case where two rectangular areas having different sizes are adjacently transferred.
以上の説明から分るように本発明で提案した文書文法
では、文書の構造を矩形領域の組み合わせとして把握
し、矩形領域間の関係を文法で表現しているので文書の
表現力が増し、領域内の行数が不定の場合や、矩形領域
が出現するか否かが不定の場合など、従来取り扱いが困
難であつた対象も記述できる。従つて、多種多様の文書
が解析可能となる。As can be seen from the above description, in the document grammar proposed by the present invention, the structure of a document is grasped as a combination of rectangular areas and the relationship between the rectangular areas is expressed by the grammar, so that the expressive power of the document is increased and It is possible to describe a target that has been difficult to handle in the past, such as when the number of lines in is indeterminate or when a rectangular area appears or not. Therefore, a wide variety of documents can be analyzed.
以下、本発明の実施例について図面を用いて詳細に説
明する。Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
第8図は本発明の一実施例による画像理解方式を採用
した装置の構成を示すブロツク図である。本実施例にお
いては理解する画像を文書を対象にして述べるが、一般
の画像、すなわち図形や写真など濃淡画像などが含まれ
ている場合でも応用できる。装置の各部はバス1に接続
され、全体の動作は制御部2により制御される。文書3
上の情報(文書画像情報)はスキヤナ4により光電変換
・デイジタル化されてデイジタル画像となり、バス1を
介してメモリ51に格納される。メモリ51は後述する52,5
3,54,55とともにメモリ5の一部をなす。デイジタル画
像51をスキヤナ4から得る代わりに、光デイスクなどの
デイジタル画像フアイル装置から読みこんでもよい。ま
た、以下の説明では1画素1ビツトに二値化するものと
するが、1画素を多値で表現してもよく、カラースキヤ
ナにより光電変換して色情報を付与してもよい。文書画
像に対し制御部2により公知の位置補正処理、傾き補正
処理などを行つて得られる正規化画像メモリ52に格納さ
れる。FIG. 8 is a block diagram showing the configuration of an apparatus that employs the image understanding method according to the embodiment of the present invention. In the present embodiment, an image to be understood will be described for a document, but the present invention can be applied even when a general image, that is, a grayscale image such as a figure or a photograph is included. Each unit of the device is connected to the bus 1, and the entire operation is controlled by the control unit 2. Document 3
The above information (document image information) is photoelectrically converted and digitalized by the scanner 4 to form a digital image, which is stored in the memory 51 via the bus 1. Memory 51 will be described later 52,5
It forms a part of the memory 5 together with 3,54,55. Instead of obtaining the digital image 51 from the scanner 4, the digital image 51 may be read from a digital image file device such as an optical disk. Further, in the following description, it is assumed that one pixel is binarized into one bit, but one pixel may be represented by multiple values, or color information may be provided by photoelectric conversion by a color scanner. The document image is stored in a normalized image memory 52 obtained by performing known position correction processing, inclination correction processing, and the like by the control unit 2.
前述した文法に則つて書かれた対象文書の書式データ
が、あらかじめメモリ53に格納されているものとする。
制御部2は、この書式データを用いて上記の正規化画像
の文書理解処理を行う。ここで文書理解処理とは、複数
の矩形領域に分解し、その各領域の分類を行うことをい
う。文書理解結果として得られる各領域のうち、検索対
象領域としてあらかじめ定められた領域について、その
部分の画像を文字認識部6に送つて、内部の文字パター
ンを認識させる。一般に元の文書画像は複雑な形状をし
ているが、文書理解結果として得られる領域は矩形形状
をしているので、公知の手法により文字の切り出し・認
識が容易にできる。文字認識結果として得られる文字符
号列あるいはそれを編集した文字符号列は入力文書の検
索情報である。以上のようにして得られる入力文書の検
索情報をフアイル7に、文書のデイジタル画像をフアイ
ル8に出力する。文書のデイジタル画像のフアイル8へ
の出力に際しては、分解された複数の矩形領域単位で別
々に出力してもよい。また、フアイル7とフアイル8は
同一のものとしてもよい。It is assumed that the format data of the target document written according to the grammar described above is stored in the memory 53 in advance.
The control unit 2 uses the format data to perform the document understanding process of the normalized image. Here, the document comprehension process is to decompose into a plurality of rectangular areas and classify each of the areas. Among the areas obtained as the result of document understanding, the area of a predetermined area as a search target area is sent to the character recognition unit 6 to recognize the internal character pattern. Generally, the original document image has a complicated shape, but since the area obtained as a result of the document understanding has a rectangular shape, it is possible to easily cut out and recognize the characters by a known method. A character code string obtained as a character recognition result or a character code string edited from the character code string is search information of an input document. The search information of the input document obtained as described above is output to the file 7, and the digital image of the document is output to the file 8. When outputting the digital image of the document to the file 8, it may be separately output in units of a plurality of decomposed rectangular areas. Further, the file 7 and the file 8 may be the same.
以下に文書理解処理の詳細を述べる。第9図及び第10
図は、文書理解の処理の流れを説明する図である。処理
の流れは、PAD(program Analysis Diagram)形式で書
かれている。100で文書画像の輪郭抽出を行い、メモリ5
4に格納する。輪郭抽出は公知の手法を使用すればよ
い。輪郭抽出の代わりにいわゆる連結領域抽出法を使用
してもよい。200で抽出された各輪郭iからそのX座標
及びY座標の最大値と最小値 Xmin(i) Xmax(i) Ymin(i) Ymax(i) を抽出する。この4個の数値から輪郭iの外接長方形が
求まる。300,400,500はそれぞれ構文解析処理の初期
化、本体、終了判定である。The details of the document understanding process are described below. 9 and 10
The figure is a diagram for explaining the flow of document understanding processing. The process flow is written in PAD (program Analysis Diagram) format. The document image outline is extracted with 100, and the memory 5
Store in 4. A known method may be used for the contour extraction. Instead of the contour extraction, a so-called connected region extraction method may be used. The maximum value and the minimum value Xmin (i) Xmax (i) Ymin (i) Ymax (i) of the X coordinate and the Y coordinate are extracted from each contour i extracted in 200. The circumscribed rectangle of the contour i is obtained from these four numerical values. 300, 400, and 500 are initialization, main body, and end determination of the syntax analysis process, respectively.
300ではメモリ53に格納されている書式データを作業
用メモリ55に複写し、各種テーブルやプログラム内部変
数の初期化を行う。At 300, the format data stored in the memory 53 is copied to the work memory 55, and various tables and program internal variables are initialized.
構文解析処理の本体400は、410〜460から構成され
る。410は、420〜450の処理を460で終了判定が行われる
まで繰り返し行うように制御する。420では書式データ
中のステートメントを取り出す。処理未了ステートメン
トとは、その中に含まれる変数で値の定まつていないも
のがあるが、または対応する文書領域がまだ決定されて
いないような行を指す。430は、処理未了ステートメン
トが残つていない場合は440の処理スキツプする判定で
ある。この場合には終了判定が行われることになる。42
0で取り出したステートメントが処理未了ステートメン
トの場合、440の処理が行われる。440は、ステートメン
トの種類を判定して分岐する部分で、ステートメントの
種類に応じて処理の内容が変化する。第9,10図及び以下
の説明では、formステートメント、すなわち (form F0 (?Xmin ?Xmax ?Ymin ?Ymax) (shrink ?X ?Y)) の場合についてのみ述べるが、他のステートメントでも
同様にそのステートメント特有の処理が行われる。The main body 400 of the parsing process is composed of 410 to 460. 410 controls to repeat the processes of 420 to 450 until the end determination is made in 460. At 420, the statement in the format data is retrieved. An unprocessed statement is a line in which some of the variables contained therein have undetermined values, or the corresponding document area has not yet been determined. 430 is a judgment to skip the processing of 440 when there are no unprocessed statements left. In this case, the end determination is made. 42
If the statement fetched at 0 is an unprocessed statement, 440 processing is performed. Reference numeral 440 is a part for determining the type of statement and branching, and the content of processing changes according to the type of statement. In Figures 9 and 10 and the description below, only the case of the form statement, that is, (form F0 (? Xmin? Xmax? Ymin? Ymax) (shrink? X? Y)) is described. Statement-specific processing is performed.
ここで、この式の(?Xmin ?Xmax ?Ymin ?Ymax)の
項は、取り出すステートメントの領域を表す。つまり、
領域のX座標およびY座標の最小値と最大値を表す。ま
た、(shrink ?X ?Y)の項は、X方向の大きさが?X以
下、Y方向の大きさが?Y以下の文字成分を無視して、領
域の大きさを正規化することを表す。このことを第11図
(C)を用いて説明する。本来ならば(C)では、破線
で囲まれた領域が取り出されるステートメントである
が、(shrink 5 5)があるため、左上の文字成分 が無視され、実線で囲まれた領域が取り出される。ここ
で、無視された文字成分は、第12図(B)のi=5に対
応する。したがってその大きさは、X方向が、26−22=
4であり、Y方向が、16−12=4である。Here, the term (? Xmin? Xmax? Ymin? Ymax) of this expression represents the area of the statement to be fetched. That is,
It represents the minimum and maximum values of the X and Y coordinates of the region. Also, the term (shrink? X? Y) indicates that the size of the area is normalized by ignoring the character components whose size in the X direction is? X or less and whose size in the Y direction is? Y or less. Represent This will be described with reference to FIG. 11 (C). Originally, in (C), the statement enclosed by the broken line is taken out, but since there is (shrink 5 5), the character component in the upper left is Is ignored and the area enclosed by the solid line is extracted. Here, the ignored character component corresponds to i = 5 in FIG. 12 (B). Therefore, its size is 26-22 =
4 and the Y direction is 16-12 = 4.
第10図441〜448は述語formを処理する部分である。44
1では書式名称F0が登録済みか否かを調べ、未登録なら
ば442で書式テーブルにF0を登録する。442では、変数名 ?Xmin、?Xmax、?Ymin、?Ymax、?X、?Y の位置に書かれた文字列が変数か数値か、変数なら登録
済みか否かを調べ、未登録ならこれらを変数表に登録す
る。変数が登録済みならばその値が確定しているか否か
を調べ、確定していなければform処理は終了する(この
場合このステートメントは処理未終了となる)。確定し
ていれば、ステートメント中の変数名を上記の数値で書
き換える。441 to 448 of FIG. 10 are parts for processing the predicate form. 44
In 1 it is checked whether or not the format name F0 is registered. If it is not registered, then in 442 F0 is registered in the format table. In 442, the character string written at the position of variable name? Xmin,? Xmax,? Ymin,? Ymax,? X,? Y is checked whether it is a variable or a numeric value, and if it is a variable, it is registered. Is registered in the variable table. If the variable is already registered, the value is checked to see if it is fixed. If not, the form process ends (in this case, this statement is unfinished). If confirmed, rewrite the variable name in the statement with the above numerical value.
具体例として、 ?Xmin=0、?Xmax=90、 ?Ymin、?Ymax:未登録 ?X=5、?Y=5、 のとき、前記のステートメントは (form F0 (0 90 ?Ymin ?Ymax) (shrink 5 5)) と書き換えられ、変数?Ymin、?Ymaxが変数テーブルに登
録されて、値未確定となる。As a specific example, when? Xmin = 0,? Xmax = 90,? Ymin,? Ymax: unregistered? X = 5,? Y = 5, the above statement is (form F0 (0 90? Ymin? Ymax) (Shrink 55)) is rewritten and the variables? Ymin and? Ymax are registered in the variable table, and the values are undetermined.
443で、ステートメント中の変数名が全て数値に書き
換えられているか否かにより分岐し、全て数値に書き換
えられていたとき、444のform実行処理を行う。form実
行処理の詳細は445〜448で表される。445は、200で抽出
された輪郭iについて以下の処理を繰り返すことを示
す。446では、輪郭iのX座標及びY座標の最小値と最
大値 Xmin(i) Xmax(i) Ymin(i) Ymax(i) をステートメント中の変数 ?Xmin ?Xmax ?Ymin ?Ymax ?X ?Y に対応する数値と比較し ?Xmin<Xmin(i)<Xmax(i)<?Xmax ?Ymin<Ymin(i)<Ymax(i)<?Ymax ?X <Ymax(i)−Xmin(i) ?Y <Ymax(i)−Ymin(i) が成立する輪郭か否かを判定する。447では、上記の条
件が成立したとき、その輪郭iをF0の成分テーブルに登
録する。448では、上記の条件が成立する輪郭が存在し
ないとき、解析失敗のフラグを立てる。At 443, it branches depending on whether all the variable names in the statement have been rewritten to numerical values, and when all have been rewritten to numerical values, the form execution processing of 444 is performed. Details of form execution processing are represented by 445 to 448. Reference numeral 445 indicates that the following processing is repeated for the contour i extracted in 200. In 446, the minimum value and the maximum value Xmin (i) Xmax (i) Ymin (i) Ymax (i) of the X coordinate and the Y coordinate of the contour i are set in the variable? Xmin? Xmax? Ymin? Ymax? X? Y in the statement. ? Xmin <Xmin (i) <Xmax (i) <? Xmax? Ymin <Ymin (i) <Ymax (i) <? Ymax? X <Ymax (i) -Xmin (i)? It is determined whether or not the contour satisfies Y <Ymax (i) -Ymin (i). In 447, when the above condition is satisfied, the contour i is registered in the F0 component table. In 448, when there is no contour satisfying the above conditions, an analysis failure flag is set.
以上説明したように441〜448の処理により、書式デー
タ中のステートメントformに対応する構造が入力画像に
存在することを検出できる。from以外のステートメント
についても同様である。fromの場合には出力データはな
いが、ステートメントによつては、ステートメント中の
変数に解析時に求めたパラメータを代入するものもあ
り、その結果が他のステートメントで用いられる。As described above, by the processing of 441 to 448, it can be detected that the structure corresponding to the statement form in the format data exists in the input image. The same applies to statements other than from. In the case of from, there is no output data, but depending on the statement, there are cases in which the parameters found during analysis are assigned to the variables in the statement, and the result is used in other statements.
450では、解析失敗フラグを調べ、解析が失敗したと
き後戻りして再試行する。この場合、解析済みのステー
トメントに戻つてパラメータを代入した変数をまた以前
の状態に書き直し、別の可能性を探索するように制御す
る。At 450, the parsing failure flag is checked and if the parsing fails, it goes back and tries again. In this case, the variable in which the parameter is substituted in the parsed statement is rewritten to the previous state, and control is performed to search another possibility.
460では、解析失敗フラグが立つていないか、あるい
は後戻り再試行の後解析失敗フラグがあるかを検出し、
終了判定を行う。The 460 detects if the parsing failure flag is not set, or if there is a parsing failure flag after a backtracking retry,
Determine the end.
500は解析の結果得られたデータを外部に受け渡す部
分である。外部に受け渡すデータとしては、書式名称に
対応して検出した矩形領域の文書上での座標などがあ
る。Reference numeral 500 is a part for passing the data obtained as a result of the analysis to the outside. The data to be transferred to the outside includes the coordinates on the document of the rectangular area detected corresponding to the format name.
解析失敗フラグを立てる指定のあるステートメントで
解析が失敗したとき、この文書は理解不能であり、この
ときはリジエクト処理を行う。たとえば文書理解の最終
結果あるいは中間結果をコンソール9に表示し、マンマ
シン的に修正する。If parsing fails for a statement with the parsing-failed flag set, this document is incomprehensible and will be rejected. For example, the final result or the intermediate result of the document understanding is displayed on the console 9 and is corrected man-machinely.
次に、form実行処理の内容を第11図を用いて具体的に
説明する。第11図(A)は画像中にノイズ成分 や文字1,A,2,B成分が存在している場合を示す。Next, the contents of the form execution process will be specifically described with reference to FIG. Fig. 11 (A) shows the noise component in the image. And the case where the characters 1, A, 2, B components are present.
(B)は、fromステートメントの実行時のパラメータ
が、 (form F (20 80 10 50) (shrink 0
0)) (C)は、formステートメントの実行時のパラメータ
が、 (form F (20 80 10 50) (shrink 5
5))の場合である。図に示すように書式Fの成分テー
ブルには、(B)の場合、ノイズ成分と、文字1,A成分
が登録され、(C)の場合、文字1,A成分は登録される
が、ノイズ成分はshrink指定によつて登録されず、除去
される。また、書式Fの矩形領域がformの実行後、図の
ように、領域内に含まれる文字成分によつて領域を正規
化することができ、画像の内容に応じて領域の大きさを
柔軟に特定することができる。In (B), the parameter when executing the from statement is (form F (20 80 10 50) (shrink 0
0)) In (C), the parameters at the time of execution of the form statement are (form F (20 80 10 50) (shrink 5
This is the case of 5)). As shown in the figure, in the component table of format F, in the case of (B), the noise component and the character 1 and A components are registered, and in the case of (C), the character 1 and A components are registered, but the noise component The component is not registered by the shrink specification and is removed. In addition, after executing the form for the rectangular area of the format F, the area can be normalized by the character components included in the area as shown in the figure, and the area size can be flexibly changed according to the content of the image. Can be specified.
第12図に、上記from実行時の輪郭成分の選択方法を、
具体的に説明する。第12図(A)は、第11図(A)に示
す輪郭画像を第9図200によつて処理した結果の外接長
方形を示す。すなわち、5はノイズ成分、1−8は文字
成分、さらに6−8は所謂内輪郭である。これらの成分
のXmin,Xmax,Ymin,Ymaxを(B)に示す。そして書式F
に含まれるか否かは次式 20<Xmin(i)<Xmax(i)<80 10<Ymin(i)<Ymax(i)<50 5<Xmax(i)−Xmin(i) 5<Ymax(i)−Ymin(i) 成立するかどうかをもつて判定する。この例では、輪郭
i=1と3が成立する。Fig. 12 shows how to select contour components when executing from from above.
This will be specifically described. FIG. 12 (A) shows a circumscribed rectangle as a result of processing the contour image shown in FIG. 11 (A) by using FIG. That is, 5 is a noise component, 1-8 is a character component, and 6-8 is a so-called inner contour. Xmin, Xmax, Ymin and Ymax of these components are shown in (B). And form F
Is included in the following formula 20 <Xmin (i) <Xmax (i) <80 10 <Ymin (i) <Ymax (i) <50 5 <Xmax (i) -Xmin (i) 5 <Ymax ( i) -Ymin (i) Judge by whether or not it holds. In this example, the contours i = 1 and 3 hold.
以上説明したごとく、本発明によれば格納すべき対象
文書の解析を自動的に行うことが可能であり、キーボー
ドから二次情報を入力することが不要となるかあるいは
大幅に削減されるので、入力がきわめて簡素化される。
また、対象文書の構造が変化しても書式データを変更す
れば、直ちに対応できるなどの利点がある。As described above, according to the present invention, it is possible to automatically analyze the target document to be stored, and it becomes unnecessary to input the secondary information from the keyboard, or it is significantly reduced. Input is greatly simplified.
Further, even if the structure of the target document changes, there is an advantage that it can be dealt with immediately by changing the format data.
第1図は文書の一例を示す参考図、第2,3,4,5,6,7図は
本発明の原理を説明するための説明図、第8図は本発明
の文書処理方式を実施する装置の構成を示すブロツク
図、第9図,第10図は第8図中の制御部2における処理
を説明するための流れ図、第11図,第12図は第10図の処
理内容を説明するための説明図である。 1…バス、2…制御部、3…文書、4…スキヤナ、5…
メモリ、6…文字認識部、7,8…フアイル、9…コンソ
ール。FIG. 1 is a reference diagram showing an example of a document, FIGS. 2, 3, 4, 5, 6 and 7 are explanatory diagrams for explaining the principle of the present invention, and FIG. 8 is a document processing method of the present invention. FIG. 9 and FIG. 10 are block diagrams showing the configuration of the apparatus for performing the processing, and FIG. 11 and FIG. 12 are flowcharts for explaining the processing in the control unit 2 in FIG. It is explanatory drawing for doing. 1 ... bus, 2 ... control unit, 3 ... document, 4 ... scanner, 5 ...
Memory, 6 ... Character recognition unit, 7,8 ... File, 9 ... Console.
───────────────────────────────────────────────────── フロントページの続き (72)発明者 江尻 正員 東京都国分寺市東恋ヶ窪1丁目280番地 株式会社日立製作所中央研究所内 (56)参考文献 特開 昭60−183688(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Masaji Ejiri 1-280, Higashi Koigakubo, Kokubunji City, Tokyo Metropolitan Research Laboratory, Hitachi, Ltd. (56) Reference JP-A-60-183688 (JP, A)
Claims (7)
文法を用いてほぼ定型化された文書の書式を予め記憶す
る記憶手段と、 入力文書画像を光電変換してディジタル画像に変換する
手段と、 上記ディジタル画像中から矩形領域を抽出して、上記記
憶手段に記憶された文書の書式中の各々の矩形領域が、
抽出された上記矩形領域のいずれかに対応するか否かを
探索する矩形領域探索手段と、 上記探索結果により上記入力文書画像の構文を理解する
画像構文理解手段と、 を備えたことを特徴とする文書画像理解装置。1. Storage means for storing in advance a format of a document, which is almost stylized using a grammar for expressing a document image as a set of rectangular areas, and means for photoelectrically converting an input document image into a digital image. , A rectangular area is extracted from the digital image, and each rectangular area in the document format stored in the storage means is
Rectangle area searching means for searching whether or not it corresponds to any of the extracted rectangular areas, and image syntax understanding means for understanding the syntax of the input document image based on the search result, Document image understanding device.
装置において、 上記文法は、矩形領域の絶対的なあるいは相対的な大き
さを表わす数量を変数として、及び矩形領域間の絶対的
なあるいは相対的な関係を表わす数量を変数として、表
現することを特徴とする文書画像理解装置。2. The document image understanding apparatus according to claim 1, wherein the grammar uses a variable that represents a quantity representing an absolute or relative size of a rectangular area and an absolute value between rectangular areas. An apparatus for understanding a document image, characterized in that a variable is used as a variable that expresses a relative relationship.
装置において、 上記矩形領域探索手段は、上記矩形領域の絶対的なある
いは相対的な大きさを表わす変数により矩形領域を探索
することを特徴とする文書画像理解装置。3. The document image understanding apparatus according to claim 2, wherein the rectangular area searching means searches the rectangular area with a variable representing an absolute or relative size of the rectangular area. A document image understanding device characterized by.
装置において、 上記矩形領域探索手段は、上記矩形領域の絶対的なある
いは相対的な大きさを表わす変数が存在しなくなるまで
矩形領域を探索することを特徴とする文書画像理解装
置。4. A document image understanding apparatus according to claim 3, wherein the rectangular area searching means is a rectangular area until a variable representing an absolute or relative size of the rectangular area does not exist. A document image understanding device characterized by searching for.
装置において、 上記文法の矩形領域は、空間的に隔てられた複数個の矩
形領域から演算を行って生成した仮想的な矩形領域を含
むことを特徴とする文書画像理解装置。5. The document image understanding apparatus according to claim 1, wherein the rectangular area of the grammar is a virtual rectangular area generated by performing an operation from a plurality of spatially separated rectangular areas. An apparatus for understanding a document image, including:
装置において、 上記記憶手段は、上記複数個の矩形領域に対する属性を
記憶することを特徴とする文書画像理解装置。6. The document image understanding apparatus according to claim 1, wherein the storage means stores attributes for the plurality of rectangular areas.
装置において、 上記画像構文理解手段は、上記矩形領域探索手段の探索
結果により求められる矩形領域内の画像パターンを認識
することを特徴とする文書画像理解装置。7. The document image understanding device according to claim 1, wherein the image syntax understanding means recognizes an image pattern in a rectangular area obtained by a search result of the rectangular area searching means. Document image understanding device.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60122425A JPH083828B2 (en) | 1985-06-07 | 1985-06-07 | Document image understanding device |
| US07/253,445 US4907285A (en) | 1984-08-24 | 1988-10-05 | Image understanding system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60122425A JPH083828B2 (en) | 1985-06-07 | 1985-06-07 | Document image understanding device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS61281377A JPS61281377A (en) | 1986-12-11 |
| JPH083828B2 true JPH083828B2 (en) | 1996-01-17 |
Family
ID=14835513
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP60122425A Expired - Fee Related JPH083828B2 (en) | 1984-08-24 | 1985-06-07 | Document image understanding device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH083828B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3178483B2 (en) * | 1992-06-09 | 2001-06-18 | 富士ゼロックス株式会社 | Document processing device |
| JP3067966B2 (en) * | 1993-12-06 | 2000-07-24 | 松下電器産業株式会社 | Apparatus and method for retrieving image parts |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5611573A (en) * | 1979-07-10 | 1981-02-04 | Fujitsu Ltd | Slip reading system |
| JPH0664624B2 (en) * | 1984-03-02 | 1994-08-22 | 日本電気株式会社 | Optical character reading method |
-
1985
- 1985-06-07 JP JP60122425A patent/JPH083828B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPS61281377A (en) | 1986-12-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4907285A (en) | Image understanding system | |
| DE10162156B4 (en) | The user navigation through multimedia file content supporting system and method | |
| US7046847B2 (en) | Document processing method, system and medium | |
| JPS63155386A (en) | Form data reading device | |
| JPH11306197A5 (en) | ||
| CN118799908B (en) | Automatic identification method and device for literature catalogue | |
| CN120611020A (en) | Multimodal RAG-based graphic question-and-answer method, system, device, and storage medium | |
| CN120849531A (en) | Document processing method, device, computer equipment, storage medium and program product | |
| CN113343658A (en) | PDF file information extraction method and device and computer equipment | |
| JPH083828B2 (en) | Document image understanding device | |
| JP2004272822A (en) | Character recognition device, character recognition method, and computer program | |
| JPH10162098A (en) | Document electrolyzing device and method therefor | |
| JPH07107711B2 (en) | Document image processing device | |
| JP3611061B2 (en) | Graphic creation device | |
| JP3941610B2 (en) | Information extraction method, information extraction apparatus, and information extraction program | |
| EP0175928A2 (en) | Image understanding system | |
| JP3714723B2 (en) | Document display system | |
| JPH02121058A (en) | Data file device, data associative memory retrieval method, and retrieval device | |
| JP2733057B2 (en) | String component extraction device | |
| JP2606560B2 (en) | Document image storage device | |
| JPH0743718B2 (en) | Multimedia document structuring method | |
| JPS61193276A (en) | Character string extracting system | |
| JPH10134081A (en) | Page creation support method and apparatus | |
| CN121503478A (en) | A Content Structure Aware Intelligent Word Segmentation Method for PDF Documents | |
| JPH07319879A (en) | Translation processor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |