JP2948840B2 - Rectangle extraction method - Google Patents
Rectangle extraction methodInfo
- Publication number
- JP2948840B2 JP2948840B2 JP1284284A JP28428489A JP2948840B2 JP 2948840 B2 JP2948840 B2 JP 2948840B2 JP 1284284 A JP1284284 A JP 1284284A JP 28428489 A JP28428489 A JP 28428489A JP 2948840 B2 JP2948840 B2 JP 2948840B2
- Authority
- JP
- Japan
- Prior art keywords
- rectangle
- run
- extracted
- character
- existing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Landscapes
- Character Input (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、文書画像の文字切出し等のための矩形抽出
方法に関する。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a rectangle extracting method for extracting characters from a document image.
文字切出し方法として、行画像の垂直射影を利用する
方法がある。しかし、この方法においては、第8図に示
す例のように、文字にアンダーラインが付加されている
場合、垂直射影の切れ目が不明確になって文字の切出し
位置の検出が困難になる。As a method of extracting characters, there is a method of using vertical projection of a line image. However, in this method, when an underline is added to the character as in the example shown in FIG. 8, the break of the vertical projection becomes unclear, and it becomes difficult to detect the cutout position of the character.
また連結したランの外接矩形を抽出することによっ
て、文字切出しを行う方法がある。しかし、アンダーラ
インと文字が接触した場合、第9図に示す例のように、
アンダーラインの矩形と文字部分の矩形とが結合されて
しまうので、文字の切出しが困難になる。There is also a method of extracting characters by extracting a circumscribed rectangle of a connected run. However, when the character touches the underline, as in the example shown in FIG.
Since the rectangle of the underline is combined with the rectangle of the character portion, it is difficult to extract characters.
このような矩形抽出による文字切出しに関し、一群の
線素(連結したラン)の長さが一定以上であれば、これ
を除去し、残った線素についての矩形抽出を行う方法が
特開昭60−97483号公報に述べられている。しかし、ア
ンダーラインに対応する線素は除去されてしまうため、
アンダーラインの認識は不可能であり、また、認識結果
からアンダーラインも含めた文書を再生することは不可
能である。With respect to such character extraction by rectangle extraction, a method of removing a group of linear elements (connected runs) if the length is equal to or greater than a predetermined length and extracting a rectangle from the remaining linear elements is disclosed in Japanese Patent Application Laid-Open No. 60-160630. -97483. However, since the line element corresponding to the underline is removed,
It is impossible to recognize underlines, and it is impossible to reproduce a document including underlines from the recognition result.
よって、本発明の目的は、アンダーライン等が付加さ
れた文字の切出しの場合等において、文字とそれに接合
されている長い線のアンダーライン等を分離して抽出す
ることができる矩形抽出方法を提供することである。Therefore, an object of the present invention is to provide a rectangle extraction method that can separate and extract a character and a long line underline joined to the character in the case of cutting out a character to which an underline or the like is added. It is to be.
本発明は、画像上のランを抽出し、該抽出したランに
連結する既存のランの有無を調べ、無ければ、該抽出し
たランを囲む矩形を新規に生成し、有れば、該抽出した
ランと既存のランを囲む矩形をあらためて生成する処理
を繰り返して、画像上の連結したランを囲む矩形を抽出
する矩形抽出方法において、前記抽出したランと既存の
ランを囲む矩形を生成する際に、当該生成される矩形の
幅が所定の閾値を越えるか否か調べ、越えなければ、該
抽出したランと既存のランを囲む矩形の生成を実行し、
越えていれば、該抽出したランと既存のランを囲む矩形
の生成を行わずに、該抽出したラン囲む矩形を生成する
ことを特徴とする。The present invention extracts a run on an image, checks whether there is an existing run connected to the extracted run, and if not, generates a new rectangle surrounding the extracted run, and if so, extracts the extracted rectangle. In a rectangle extraction method of repeating a process of generating a rectangle surrounding a run and an existing run again to extract a rectangle surrounding a connected run on an image, when generating a rectangle surrounding the extracted run and an existing run, Checking whether the width of the generated rectangle exceeds a predetermined threshold value, and if not, executing the generation of a rectangle surrounding the extracted run and the existing run,
If it exceeds, a rectangle surrounding the extracted run is generated without generating a rectangle surrounding the extracted run and the existing run.
それに加えて、本発明は、上記抽出したランと既存の
ランを囲む矩形を生成する際に、当該生成される矩形の
幅が所定の閾値を越えるか否かを調べるに先立って、当
該生成される矩形の高さが所定の閾値を越えるか否かを
調べ、越えない場合、生成される矩形の幅に関係なく、
該抽出したランと既存のランを囲む矩形の生成を実行す
ることを特徴とする。In addition, the present invention, when generating a rectangle surrounding the extracted run and the existing run, prior to checking whether the width of the generated rectangle exceeds a predetermined threshold, Check if the height of the rectangle exceeds a predetermined threshold, and if not, regardless of the width of the generated rectangle,
A rectangle that surrounds the extracted run and an existing run is generated.
矩形抽出においては、他のランと連結しない新しいラ
ンを抽出した場合には、そのランの矩形を新規に生成し
登録するが、処理済みの他のランと連結しているときに
は、その矩形に新しいランを追加して矩形を拡張する。
また、ある矩形と他の矩形とが重なったときには、これ
らを結合して矩形を拡張する。In the rectangle extraction, if a new run that is not connected to another run is extracted, a rectangle for that run is newly generated and registered. However, if it is connected to another processed run, a new rectangle is Extend the rectangle by adding runs.
When a certain rectangle overlaps another rectangle, the rectangles are expanded by combining them.
このような矩形の拡張または結合を無条件に実行した
場合、文字と接触したアンダーラインの矩形の一つ以上
の文字の部分の矩形とが統合されてしまう。If such expansion or combination of rectangles is executed unconditionally, the rectangles of one or more character portions of the underlined rectangles in contact with the characters will be integrated.
しかし、本発明によれば、拡張または統合処理後の矩
形の幅(行方向の大きさ)の閾値を適切に選ぶことによ
り、そのような不都合なアンダーラインの矩形と文字部
の矩形との統合を防止し、文字とアンダーラインの矩形
とを分離して抽出できるので、アンダーラインが付加さ
れた文字の切出し及びアンダーラインの切出しがそれぞ
れ可能となる。However, according to the present invention, by appropriately selecting the threshold value of the width (size in the line direction) of the rectangle after the expansion or integration processing, the integration of such an inconvenient underline rectangle and the character part rectangle is performed. Can be extracted and the character and the underlined rectangle can be separated and extracted, so that the extraction of the character to which the underline is added and the extraction of the underline can be respectively performed.
また、アンダーラインに対応する矩形については、矩
形の高さの閾値を適当に選び、矩形の高さが閾値以下の
場合、矩形の幅の比較判定結果に関係なく、矩形の拡張
または統合処理を行うことで、アンダーラインの矩形が
ラン毎に分かれてしまうことを防止できる。For the rectangle corresponding to the underline, a threshold value for the height of the rectangle is appropriately selected. If the height of the rectangle is equal to or smaller than the threshold value, the rectangle expansion or integration process is performed regardless of the result of the comparison of the width of the rectangle. By doing so, it is possible to prevent the rectangle of the underline from being divided for each run.
第1図は本発明の一実施例に係る文字認識システムの
ブロック図である。FIG. 1 is a block diagram of a character recognition system according to one embodiment of the present invention.
スキャナ1は原稿を読み取り、2値の画像データとし
て画像メモリ2に格納する。ラン抽出部3は画像メモリ
2より1ラインずつの画像データを読み出して黒画素の
連結であるランを抽出し、その始点と終点の座標をラン
データとして矩形抽出部4にセットする。矩形抽出部4
はランデータに基づいて連結したランの矩形の登録、拡
張または統合を行い、矩形の始点及び終点(対角頂点)
の座標を矩形データとして矩形メモリ5に格納する。こ
の矩形の拡張または統合の処理を行おうとする場合に
は、矩形抽出部4より拡張または統合の処理後の矩形の
幅のデータを矩形拡張/統合判定部6に送り、拡張また
は統合の処理を行うべきか否かの判断を求め、肯定の判
断結果がえられたときにのみ、拡張または統合の処理の
結果によって矩形メモリ5内の矩形データを更新する。The scanner 1 reads a document and stores it in the image memory 2 as binary image data. The run extracting unit 3 reads out image data of each line from the image memory 2 to extract a run which is a connection of black pixels, and sets the coordinates of the start point and the end point as run data in the rectangle extracting unit 4. Rectangle extraction unit 4
Performs registration, expansion or integration of connected run rectangles based on run data, and starts and ends (diagonal vertices) of the rectangles
Are stored in the rectangular memory 5 as rectangular data. When the process of expanding or integrating the rectangle is to be performed, the data of the width of the rectangle after the processing of expansion or integration is sent from the rectangle extracting unit 4 to the rectangular expansion / integration determining unit 6, and the processing of expansion or integration is performed. A determination is made as to whether or not to perform it, and only when a positive determination result is obtained, the rectangular data in the rectangular memory 5 is updated with the result of the expansion or integration processing.
行切出し部7は矩形メモリ5に得られた矩形データに
基づき行切出し位置を決定して文字切出し部8に通知す
る。文字切出し部8は、矩形メモリ5に得られた矩形デ
ータに基づき文字切出しの位置を決定し、この文字切出
し位置及び行切出し位置に従って、画像メモリ2より文
字またはアンダーラインの画像データを切出し、認識部
9へ送り認識させる。The line cutout unit 7 determines a line cutout position based on the rectangular data obtained in the rectangular memory 5 and notifies the character cutout unit 8. The character cutout unit 8 determines a character cutout position based on the rectangular data obtained in the rectangular memory 5, and cuts out character or underlined image data from the image memory 2 in accordance with the character cutout position and the line cutout position. Send it to the unit 9 for recognition.
制御部10は上記各部の動作シーケンスを制御する。 The control unit 10 controls the operation sequence of each unit.
ここで矩形抽出部4及び矩形拡張/統合判定部6の処
理について説明する。第2図は処理のフローチャートで
あり、第3図から第5図は処理内容の説明図である。Here, the processing of the rectangle extraction unit 4 and the rectangle extension / integration determination unit 6 will be described. FIG. 2 is a flowchart of the processing, and FIGS. 3 to 5 are explanatory diagrams of the processing contents.
ラン抽出部3より一つのランのデータを(始終点座
標)がセットされると、矩形抽出部4は、そのランデー
タと前ラインのランデータとを比較することによりラン
の連結を調べ、その結果に応じて矩形の登録、拡張(追
加)または結合のいずれを行うべきかを決定する。When the data of one run (start and end point coordinates) is set by the run extraction unit 3, the rectangle extraction unit 4 checks the connection of the runs by comparing the run data with the run data of the previous line. According to the result, it is determined whether to register, expand (add) or combine the rectangles.
第3図は新規の矩形の登録の説明図で、(a)に示す
ラン21に連結したランが前ラインにない場合、このラン
21に外接する(b)に示すような矩形22を生成し、この
始点及び終点の座標を矩形データとして矩形メモリ5に
登録する。FIG. 3 is an explanatory diagram of registration of a new rectangle. When a run connected to the run 21 shown in FIG.
A rectangle 22 circumscribing 21 is generated as shown in (b), and the coordinates of the start point and the end point are registered in the rectangle memory 5 as rectangle data.
第4図は矩形の拡張の説明図である。(a)に示すラ
ン25は前ラインのラン23と連結しているので、ラン25を
前ラインのラン23の矩形24に追加する。すなわち、矩形
24を(b)に示すような矩形26に拡張し、矩形データを
更新する。FIG. 4 is an explanatory diagram of the extension of the rectangle. Since the run 25 shown in (a) is connected to the run 23 of the previous line, the run 25 is added to the rectangle 24 of the run 23 of the previous line. That is, a rectangle
24 is expanded to a rectangle 26 as shown in (b), and the rectangle data is updated.
ただし、この拡張処理を実際に行うに先立って矩形抽
出部4は拡張後の矩形26の幅W(行方向のサイズ)を求
めて矩形拡張/統合判定部6に渡し、矩形拡張/統合半
定部6でWと閾値WTHとの比較を行わせる。そして、矩
形抽出部4は、W<WTHの比較結果(拡張可)が返った
場合には、拡張を行って矩形データを更新する。しか
し、W≧上WTHの比較結果(拡張不可)が返った場合に
は、拡張処理は行わず、現在対象となっているラン25の
矩形を新規に生成し、そのランデータを矩形メモリ5に
登録する。However, prior to actually performing the expansion processing, the rectangle extracting unit 4 obtains the width W (size in the row direction) of the expanded rectangle 26 and passes it to the rectangular expansion / integration determination unit 6 to perform the rectangular expansion / integration semi-fixing. The unit 6 makes a comparison between W and the threshold value WTH. Then, when the comparison result of W <WTH (extendable) is returned, the rectangle extracting unit 4 extends the rectangle data to update the rectangle data. However, if the comparison result of W ≧ upper WTH (unexpandable) is returned, the expansion process is not performed, a new rectangle of the current run 25 is newly generated, and the run data is stored in the rectangular memory 5. sign up.
第5図は矩形の統合の説明図である。(a)に示す矩
形27,28のような関係の矩形は一つに統合する。すなわ
ち、矩形27,28を(b)に示す矩形29に統合する。FIG. 5 is an explanatory diagram of integration of rectangles. Rectangle such as rectangles 27 and 28 shown in (a) are integrated into one. That is, the rectangles 27 and 28 are integrated into the rectangle 29 shown in FIG.
ただし、統合後の矩形29の幅Wを求めて閾値WTHとの
比較を矩形拡張/統合判定部6に行わせる。そして、W
<WTHならば矩形統合を行い、統合後の矩形データによ
り矩形メモリ5の内容を更新するが、W≧WTHであると
きには矩形統合を行わない。However, the width W of the rectangle 29 after integration is obtained, and the rectangle expansion / integration determination unit 6 is compared with the threshold value WTH. And W
If <WTH, rectangle integration is performed, and the contents of the rectangular memory 5 are updated with the integrated rectangular data. However, when W ≧ WTH, rectangular integration is not performed.
以上説明した矩形抽出処理によれば、文字にアンダー
ラインを付加した行においては、例えば第6図に示すよ
うに、文字の部分の矩形(白無地の矩形)とアンダーラ
インの矩形(ハッチングを施した矩形)とを分離して抽
出できる。According to the rectangle extraction processing described above, in a line in which an underline is added to a character, for example, as shown in FIG. 6, a rectangle of a character portion (a solid white rectangle) and a rectangle of an underline (hatched). Can be extracted separately.
ただし、矩形の幅の判定条件はアンダーラインの矩形
にも適用されるため、アンダーラインの矩形がライン毎
に分かれてしまう。このようなライン毎の分割は、第7
図に示すように処理内容を一部変更することによって防
止できる。第7図において、*印を付けたステップは印
加された処理ステップである。However, since the determination condition of the width of the rectangle is also applied to the underline rectangle, the underline rectangle is divided for each line. Such division for each line is performed in the seventh line.
This can be prevented by partially changing the processing contents as shown in the figure. In FIG. 7, the steps marked with * are applied processing steps.
すなわち、拡張または統合の処理後の矩形の高さH
(行と垂直な方向のサイズ)を求め、これを高さの閾値
HTHと比較する。そして、H≦HTHの場合には、幅Wの比
較判定結果と無関係に拡張または統合を行って矩形デー
タを更新する。That is, the height H of the rectangle after expansion or integration processing
(Size in the direction perpendicular to the row) and calculate this as the height threshold
Compare with HTH. If H ≦ HTH, the rectangle data is updated by performing expansion or integration regardless of the comparison result of the width W.
以上説明したように、本発明によれば、文字とアンダ
ーラインが接触している場合においても、それぞれの矩
形を分離して抽出することができるため、アンダーライ
ンが付加された文字を確実に切出して認識することが可
能となり、またアンダーラインも別に抽出し認識するこ
とができるので、認識結果から元の原稿をアンダーライ
ンも含め復元することも可能となる。As described above, according to the present invention, even when a character and an underline are in contact with each other, each rectangle can be separated and extracted, so that a character with an underline added can be reliably cut out. In addition, since the underline can be separately extracted and recognized, the original document including the underline can be restored from the recognition result.
第1図は本発明の一実施例に係る文字認識システムのブ
ロック図、第2図は矩形抽出処理のフローチャート、第
3図は新規矩形の登録の説明図、第4図は矩形の拡張の
説明図、第5図は矩形の統合の説明図、第6図はアンダ
ーラインと文字が接触した場合の矩形抽出の例を示す
図、第7図は矩形抽出処理の変形例を示すフローチャー
ト、第8図は垂直射影による文字切出しの問題点の説明
図、第9図は矩形抽出による文字切出しの問題点の説明
図である。 1……スキャナ、2……画像メモリ、3……ラン抽出
部、4……矩形抽出部、5……矩形メモリ、6……矩形
拡張/統合判定部、7……行切出し部、8……文字切出
し部、9……認識部。FIG. 1 is a block diagram of a character recognition system according to an embodiment of the present invention, FIG. 2 is a flowchart of a rectangle extracting process, FIG. 3 is an explanatory diagram of registration of a new rectangle, and FIG. FIG. 5, FIG. 5 is an explanatory diagram of rectangle integration, FIG. 6 is a diagram showing an example of rectangle extraction when an underline and a character touch, FIG. 7 is a flowchart showing a modification of the rectangle extraction process, FIG. FIG. 9 is an explanatory diagram of a problem of character extraction by vertical projection, and FIG. 9 is an explanatory diagram of a problem of character extraction by rectangle extraction. 1 scanner 2 image memory 3 run extraction unit 4 rectangle extraction unit 5 rectangle memory 6 rectangle expansion / integration determination unit 7 line segmentation unit 8 ... character cutout part, 9 ... recognition part.
Claims (1)
に連結する既存のランの有無を調べ、無ければ、該抽出
したランを囲む矩形を新規に生成し、有れば、該抽出し
たランと既存のランを囲む矩形をあらためて生成する処
理を繰り返して、画像上の連結したランを囲む矩形を抽
出する矩形抽出方法において、 抽出したランに連結する既存のランがあって、当該抽出
したランと既存のランを囲む矩形を生成する際に、当該
生成される矩形の幅が所定の閾値を越えるか否か調べ、
越えなければ、該抽出したランと既存のランを囲む矩形
の生成を実行し、越えていれば、該抽出したランと既存
のランを囲む矩形の生成を行わずに、該抽出したランを
囲む矩形を生成する処理と、 前記抽出したランと既存のランを囲む矩形を生成する際
に、前記生成される矩形の幅が所定の閾値を越えるか否
かを調べるに先立って、当該生成される矩形の高さが所
定の閾値を越えるか否かを調べ、越えない場合、生成さ
れる矩形の幅に関係なく、該抽出したランと既存のラン
を囲む矩形の生成を実行する処理と、 を有することを特徴とする矩形抽出方法。1. A line on an image is extracted, and the presence or absence of an existing run connected to the extracted run is checked. If there is no line, a rectangle surrounding the extracted run is newly generated. In the rectangle extraction method of extracting a rectangle that surrounds a connected run on an image by repeating the process of generating a new rectangle and a rectangle that surrounds the existing run, there is an existing run that is connected to the extracted run. When generating a rectangle surrounding the run and the existing run, determine whether the width of the generated rectangle exceeds a predetermined threshold,
If it does not exceed, execute the generation of a rectangle surrounding the extracted run and the existing run, and if it does, generate the rectangle surrounding the extracted run and the existing run without enclosing the extracted run. Processing for generating a rectangle, and generating a rectangle surrounding the extracted run and the existing run, prior to checking whether the width of the generated rectangle exceeds a predetermined threshold, Checking whether the height of the rectangle exceeds a predetermined threshold, and if not, performing a process of generating a rectangle surrounding the extracted run and an existing run, regardless of the width of the generated rectangle; A rectangle extraction method characterized by comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1284284A JP2948840B2 (en) | 1989-10-31 | 1989-10-31 | Rectangle extraction method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1284284A JP2948840B2 (en) | 1989-10-31 | 1989-10-31 | Rectangle extraction method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH03144873A JPH03144873A (en) | 1991-06-20 |
| JP2948840B2 true JP2948840B2 (en) | 1999-09-13 |
Family
ID=17676539
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1284284A Expired - Lifetime JP2948840B2 (en) | 1989-10-31 | 1989-10-31 | Rectangle extraction method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2948840B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8089553B2 (en) | 2007-11-14 | 2012-01-03 | Ricoh Company, Ltd. | Lens drive device, image pickup device and lens drive method |
-
1989
- 1989-10-31 JP JP1284284A patent/JP2948840B2/en not_active Expired - Lifetime
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8089553B2 (en) | 2007-11-14 | 2012-01-03 | Ricoh Company, Ltd. | Lens drive device, image pickup device and lens drive method |
Also Published As
| Publication number | Publication date |
|---|---|
| JPH03144873A (en) | 1991-06-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2667435B2 (en) | Region extraction method | |
| JP2812982B2 (en) | Table recognition method | |
| KR970017047A (en) | Apparatus and method for extracting a title from a document image | |
| JP2001358925A (en) | Unit and method for image processing and recording medium | |
| JPH1139469A (en) | Face image processing device | |
| JP2013033416A (en) | Character recognition device, character recognition method, and program | |
| JP2948840B2 (en) | Rectangle extraction method | |
| JP2002015280A (en) | IMAGE RECOGNITION DEVICE, IMAGE RECOGNITION METHOD, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING IMAGE RECOGNITION PROGRAM | |
| US20040081371A1 (en) | Image processing method, device and system | |
| JP2851089B2 (en) | Table processing method | |
| JP3140079B2 (en) | Ruled line recognition method and table processing method | |
| KR100235327B1 (en) | Document Recognition Method with English Contact Character Separation Using "i" Point | |
| JPH10307888A (en) | Table processing method, apparatus and recording medium | |
| JP4129902B2 (en) | Ruled line erasing method, ruled line erasing apparatus, and recording medium | |
| JP2851087B2 (en) | Table processing method | |
| JP4004189B2 (en) | How to cut out characters | |
| JP3052438B2 (en) | Table recognition device | |
| JP3566738B2 (en) | Shaded area processing method and shaded area processing apparatus | |
| JP2023034823A (en) | Image processing apparatus, and control method, and program for image processing apparatus | |
| JP2991761B2 (en) | Line segmentation method | |
| JPH09106437A (en) | Device and method for segmenting character | |
| JP2940419B2 (en) | Image processing device | |
| JPH0728934A (en) | Document image processor | |
| JP3167551B2 (en) | Character recognition device | |
| JPH05108880A (en) | English character recognition device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20070702 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080702 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090702 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100702 Year of fee payment: 11 |
|
| EXPY | Cancellation because of completion of term | ||
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100702 Year of fee payment: 11 |