Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP2803735B2 - Character recognition device including ruled lines - Google Patents
[go: Go Back, main page]

JP2803735B2 - Character recognition device including ruled lines - Google Patents

Character recognition device including ruled lines

Info

Publication number
JP2803735B2
JP2803735B2 JP2228422A JP22842290A JP2803735B2 JP 2803735 B2 JP2803735 B2 JP 2803735B2 JP 2228422 A JP2228422 A JP 2228422A JP 22842290 A JP22842290 A JP 22842290A JP 2803735 B2 JP2803735 B2 JP 2803735B2
Authority
JP
Japan
Prior art keywords
ruled line
vertical
area
character
detecting means
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2228422A
Other languages
Japanese (ja)
Other versions
JPH04111188A (en
Inventor
裕 勝山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2228422A priority Critical patent/JP2803735B2/en
Priority to US07/668,541 priority patent/US5191612A/en
Publication of JPH04111188A publication Critical patent/JPH04111188A/en
Application granted granted Critical
Publication of JP2803735B2 publication Critical patent/JP2803735B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Character Discrimination (AREA)
  • Character Input (AREA)

Description

【発明の詳細な説明】 〔概要〕 文字認識装置に係り、更に詳しくは、罫線と文字とが
混在する画像の文字認識装置に関し、 罫線領域と文字領域を同一の手段により同時に抽出す
ることを可能にすることにより認識速度の向上を実現
し、罫線を文字コードとして表現し、認識結果を全て文
字コード化してから罫線の整形を行なうことにより認識
装置の簡素化を実現することを目的とし、 認識対象画像に対し、縦方向に短冊状の処理区分を複
数作成する短冊形成手段と、該各処理区分に対し、罫線
領域もしくは文字領域の上端、下端を検出して1行分の
領域を検出する領域検出手段と、該領域検出手段によ
り、各処理区分に対し検出された1行分の領域が、横罫
線か文字列かを判別する横罫線検出手段と、各処理区分
に対し、縦罫線と存在を検出する縦罫線検出手段と、横
罫線検出手段において、文字列であると判別された1行
分の領域の文字列を認識する文字認識手段と、を有する
ように構成する。
DETAILED DESCRIPTION OF THE INVENTION [Summary] The present invention relates to a character recognition device, and more particularly, to a character recognition device for an image in which ruled lines and characters are mixed, in which a ruled line region and a character region can be simultaneously extracted by the same means. The purpose of the present invention is to achieve an improvement in recognition speed by realizing recognition rules by expressing ruled lines as character codes, converting all recognition results into character codes, and then shaping the ruled lines. A strip forming means for creating a plurality of strip-shaped processing sections in the vertical direction for the target image, and detecting an upper end and a lower end of a ruled line area or a character area for each processing section to detect an area for one line. Area detecting means, horizontal ruled line detecting means for determining whether the area for one row detected for each processing section by the area detecting means is a horizontal ruled line or a character string, and a vertical ruled line for each processing section. Detect presence The vertical ruled line detecting means and the horizontal ruled line detecting means are provided with a character recognizing means for recognizing a character string in an area of one line determined to be a character string.

〔産業上の利用分野〕[Industrial applications]

本発明は、文字認識装置に係り、更に詳しくは、罫線
と文字とが混在する画像の文字認識装置に関する。
The present invention relates to a character recognition device, and more particularly, to a character recognition device for an image in which ruled lines and characters are mixed.

〔従来の技術〕[Conventional technology]

罫線と文字とが混在する画像に対し、罫線と文字を認
識し、認識結果を表示する装置としては、まず、罫線だ
けを抽出し、その後、罫線の存在領域を避けながら文字
を抽出する装置が提案されている。
As an apparatus for recognizing ruled lines and characters and displaying the recognition result for an image in which ruled lines and characters are mixed, a device that first extracts only ruled lines and then extracts characters while avoiding the ruled line existing area is used. Proposed.

この際、罫線を抽出する方式としては、対象画像全体
に対し、罫線の一部分であると考えられる要素(プリミ
ティブ)を可能な限り抽出し、そのプリミティブを繋ぎ
合わせることにより全体の罫線を構成する方式と、画像
を縦、横それぞれ端冊状に区分化し、区分化された縦方
向、横方向の短冊に対し、それぞれ、ヒストグラムを取
ることにより縦罫線、横罫線の候補線を抽出し、その候
補線の接続関係を決めることで全体の罫線を構成する方
式が提案されている。
At this time, as a method of extracting ruled lines, a method of extracting elements (primitives) considered as being a part of the ruled lines as much as possible from the entire target image and connecting the primitives to form the entire ruled line And, the image is divided into vertical and horizontal strips, and the vertical and horizontal ruled lines are extracted by taking histograms for the divided vertical and horizontal strips, and the candidate lines are extracted. A method has been proposed in which the entire ruled line is formed by determining the connection relation of the lines.

また、文字領域の認識方式としては、抽出された罫線
領域をもとに、罫線で囲まれた矩形領域毎に文字の切り
出しと認識を行い、認識された文字の対象矩形内に埋め
ていく方式などが提案されている。
In addition, as a method of recognizing a character area, a method of extracting and recognizing a character in each rectangular area surrounded by a ruled line based on the extracted ruled line area and embedding the recognized character in a target rectangle. And so on.

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

しかし、このような従来例によると、罫線を抽出する
ために、文字領域抽出手段とは別な罫線抽出手段を必要
とし、抽出された罫線に関する情報を原画像上での座標
値として蓄積しておく必要があるので、認識装置が複雑
化するという問題点を有している。
However, according to such a conventional example, in order to extract a ruled line, a ruled line extracting unit different from the character area extracting unit is required, and information on the extracted ruled line is stored as coordinate values on the original image. Therefore, there is a problem that the recognition device is complicated.

その上に、罫線抽出手段により罫線を抽出した後に文
字認識を行なうために全体の認識速度が遅くなるという
問題点を有している。
In addition, since the character recognition is performed after the ruled line is extracted by the ruled line extracting means, there is a problem that the overall recognition speed is reduced.

本発明は、罫線領域と文字領域を同一の手段により同
時に抽出することを可能とすることにより認識速度の向
上を実現し、罫線を文字コードとして表現し、認識結果
を全て文字コード化してから罫線の整形を行なうことに
より認識装置の簡素化を実現することを目的とする。
The present invention realizes an improvement in recognition speed by enabling a ruled line area and a character area to be simultaneously extracted by the same means, expresses the ruled line as a character code, converts all the recognition results into a character code, and then executes the ruled line. It is an object of the present invention to realize a simplification of a recognition device by shaping an image.

〔課題を解決するための手段〕[Means for solving the problem]

第1図は、本発明のブロック図である。 FIG. 1 is a block diagram of the present invention.

まず、例えばイメージスキャナ等から入力され蓄積さ
れた認識対象画像101に対し、縦方向に短冊状の処理区
分を複数、作成する短冊形成手段102を有する。
First, there is provided a strip forming means 102 for creating a plurality of strip-shaped processing sections in the vertical direction with respect to the recognition target image 101 input and accumulated from, for example, an image scanner or the like.

次に、該各処理区分に対し、罫線領域もしくは文字領
域の上端、下端を検出して1行分の領域を検出する領域
検出手段103を有する。
Next, for each of the processing sections, there is provided an area detecting means 103 for detecting an upper end and a lower end of a ruled line area or a character area to detect an area for one line.

続いて、該領域検出手段により、各処理区分に対し検
出された1行分の領域が、横罫線か文字列かを判別する
横罫線検出手段104を有する。
Subsequently, there is provided a horizontal ruled line detecting means 104 for determining whether the area for one row detected for each processing section by the area detecting means is a horizontal ruled line or a character string.

また、各処理区分に対し、縦罫線の存在を検出する縦
罫線検出手段105を有する。同手段は、例えば各処理区
分において、黒画素が縦方向に連続して存在する領域を
検出し、該各領域について縦ヒストグラムを計算し、更
に、該各領域を縦方向に適応的に拡大して新たな縦ヒス
トグラムを計算し、これら縦ヒストグラム間の変化量を
判別することにより、各領域が縦罫線の領域であるか否
かを識別する。また、縦罫線検出手段105は、例えば各
領域について、該各領域の端点から更に縦方向に探索す
るとにより、罫線のかすれの影響を除去するように構成
される。この場合、縦罫線検出手段105は、例えば各領
域が縦罫線の領域であるか否かによって、各領域の端点
から更に縦方向に探索する範囲を適応的に変化させる。
加えて、縦罫線検出手段105は、各領域が縦罫線の領域
でないと識別した場合においても、前行の縦罫線位置と
近い位置に各領域について計算される縦ヒストグラムの
ピークが存在する場合は、該各領域を縦罫線の領域と識
別する。
Further, for each processing section, there is provided a vertical ruled line detecting means 105 for detecting the presence of a vertical ruled line. For example, in each processing section, a region where black pixels are continuously present in the vertical direction is detected, a vertical histogram is calculated for each region, and each region is adaptively enlarged in the vertical direction. By calculating a new vertical histogram and determining the amount of change between these vertical histograms, it is identified whether or not each area is a vertical ruled line area. Further, the vertical ruled line detection means 105 is configured to remove the influence of blurred ruled lines by, for example, searching each region in the vertical direction from the end point of each region. In this case, the vertical ruled line detection means 105 adaptively changes the range to be searched further in the vertical direction from the end point of each region depending on, for example, whether each region is a region of a vertical ruled line.
In addition, even when the vertical ruled line detection means 105 determines that each region is not a vertical ruled line region, if the peak of the vertical histogram calculated for each region exists near the position of the vertical ruled line in the previous row, , Each area is identified as a vertical ruled line area.

そして、横罫線検出手段において、文字列であると判
別された1行分の領域の文字列を認識する文字認識手段
106を有する。
Then, in the horizontal ruled line detecting means, a character recognizing means for recognizing a character string in an area of one line determined as a character string
Has 106.

以上の構成に加えて、本発明では、文字認識手段106
で認識された各文字を文字コードに変換すると共に、縦
罫線検出手段105及び横罫線検出手段104で検出された縦
罫線、横罫線を罫線コードに変換し、該文字コード及び
罫線コードを混在させて認識結果108として出力するコ
ード化手段107を、更に有するように構成することもで
きる。
In addition to the above configuration, in the present invention, the character recognition unit 106
Is converted into character codes, the vertical ruled lines and horizontal ruled lines detected by the vertical ruled line detecting means 105 and the horizontal ruled line detecting means 104 are converted into ruled line codes, and the character codes and ruled line codes are mixed. And a coding means 107 for outputting the result as a recognition result 108.

〔作用〕[Action]

本発明では、罫線と文字とが混在する画像(文書)に
対して、罫線領域と文字領域を横罫線検出手段により同
時に抽出することができる。これにより、認識速度の向
上が実現できる。
According to the present invention, a ruled line region and a character region can be simultaneously extracted from an image (document) in which ruled lines and characters are mixed by horizontal ruled line detection means. As a result, the recognition speed can be improved.

また、認識された文字と罫線を文字コードとして表現
し、認識結果を全て文字コード化することにより、認識
装置の簡素化を実現できる。
In addition, by expressing the recognized characters and ruled lines as character codes and converting all the recognition results into character codes, the recognition device can be simplified.

〔実施例〕〔Example〕

以下、図面を参照しながら本発明の実施例につき詳細
に説明する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

第2図は、本発明の実施例の全体構成図であり、第3
図は本発明の全体動作を示す動作フローチャート、第4
図は、第3図の1行単位認識処理の詳細を示す動作フロ
ーチャトーである。
FIG. 2 is an overall configuration diagram of an embodiment of the present invention.
FIG. 4 is an operation flowchart showing the overall operation of the present invention, and FIG.
The figure is an operation flowchart showing details of the line-by-line recognition processing in FIG.

本実施例は、ヒューマンインターフェース部200と、
該ヒューマンインターフェース部200とデータ転送が可
能である認識処理部300と、該認識処理部へディジタル
画像データを転送することが可能な画像入力部400とに
よって構成されている。
The present embodiment includes a human interface unit 200,
It comprises a recognition processing unit 300 capable of transferring data with the human interface unit 200, and an image input unit 400 capable of transferring digital image data to the recognition processing unit.

まず、ヒューマンインターフェース部200と画像入力
部400について詳しく説明する。ヒューマンインターフ
ェース部200は、オペレータが本実施例を操作するのに
必要なコマンド入力部201と、オペレータに文字または
画像情報を呈示する表示部202と、オペレータが該表示
部202に呈示された画像情報に対して画像範囲指定を行
なう画像情報入力部203とによって構成されている。同
ヒューマンインターフェース部は、例えば、最も一般的
な情報入手力手段であるパーソナルコンピュータにより
構成する事が可能であり、その場合、コマンド入力部20
1は、キーボードで、表示部202はCRTで、画像情報入力
部203はマウス等のポインティングディバイスで構成さ
れる。
First, the human interface unit 200 and the image input unit 400 will be described in detail. The human interface unit 200 includes a command input unit 201 required for the operator to operate the present embodiment, a display unit 202 for presenting characters or image information to the operator, and image information presented to the display unit 202 by the operator. And an image information input unit 203 for designating an image range. The human interface unit can be constituted by, for example, a personal computer which is the most common information acquisition means.
Reference numeral 1 denotes a keyboard, a display unit 202 is a CRT, and an image information input unit 203 is configured by a pointing device such as a mouse.

まず、オペレータはコマンド入力部201により、本実
施例の動作を開始するコマンドを入力する(第3図S
1)。
First, the operator inputs a command to start the operation of the present embodiment through the command input unit 201 (FIG. 3S
1).

次に、前記画像入力部400へ画像の取り込みを開始す
るコマンドが転送され、画像入力部400が、オペレータ
によって予めセットされている罫線と文字が混在する書
類の読み取りを開始する(第3図S2)。画像入力部400
は、例えばスキャナー等により構成される。画像入力部
400で読み込まれたディジタル画像データは認識処理部3
00に転送される。
Next, a command to start capturing an image is transferred to the image input unit 400, and the image input unit 400 starts reading a document in which ruled lines and characters set in advance by the operator are mixed (FIG. 3, S2). ). Image input unit 400
Is composed of, for example, a scanner or the like. Image input section
The digital image data read by 400 is recognized by the recognition processing unit 3.
Transferred to 00.

認識処理部300では、以下のようにして認識処理が行
なわれる。
In the recognition processing section 300, recognition processing is performed as follows.

まず、画像入力部400より転送されたディジタル画像
データが、画像蓄積部301に蓄積される。同蓄積部に蓄
積された画像の座標系は画像の左上を原点とし、右横方
向がx軸の正方向、下方向がy軸の正方向である。次
に、画像蓄積部301に蓄積された画像データを用いて、
画像縮小部302は、画像データを1/8に縮小したレイアウ
トイメージデータを作成し、レイアウト蓄積部303に蓄
積する(第3図S3)。
First, the digital image data transferred from the image input unit 400 is stored in the image storage unit 301. The coordinate system of the image stored in the storage unit has the origin at the upper left of the image, the right lateral direction is the positive direction of the x-axis, and the downward direction is the positive direction of the y-axis. Next, using the image data stored in the image storage unit 301,
The image reduction unit 302 creates layout image data in which the image data is reduced to 1/8 and stores the layout image data in the layout storage unit 303 (FIG. 3, S3).

レイアウト蓄積部303に蓄積されたレイアウトイメー
ジデータは、表示部202に転送され、表示される。オペ
レータは表示部202に表示されたレイアウトイメージを
見ながら、画像情報入力部203を用いて認識処理範囲を
指定する(第3図S4)。例えば第5図に示される破線で
範囲指定が行われる。指定された範囲は座標情報に変換
され、認識領域座標として認識情報蓄積部304に蓄積さ
れる。
The layout image data stored in the layout storage unit 303 is transferred to the display unit 202 and displayed. The operator specifies the recognition processing range using the image information input unit 203 while viewing the layout image displayed on the display unit 202 (S4 in FIG. 3). For example, the range is specified by a broken line shown in FIG. The specified range is converted into coordinate information and stored in the recognition information storage unit 304 as recognition area coordinates.

次に、短冊形成部305が、認識情報蓄積部304に蓄積さ
れている認識領域座標の左上の座標から順に、縦方向に
一定幅(本実施例では48ドット幅)の短冊を形成してい
き(第6図参照)、左端の短冊から順に短冊番号i(i
=0,1,2,3,4…)をつける(第3図S5)。
Next, the strip forming section 305 forms strips having a constant width (48 dot width in the present embodiment) in the vertical direction in order from the upper left coordinates of the recognition area coordinates stored in the recognition information storage section 304. (See FIG. 6), strip numbers i (i
= 0, 1, 2, 3, 4,...) (FIG. 3, S5).

これ以後、第3図S6の1行単位認識処理が実行され
る。この処理は、第4図の動作フローチャートで示され
る。
Thereafter, the line-by-line recognition processing of FIG. 3 S6 is executed. This process is shown in the operation flowchart of FIG.

始めに、各短冊毎に、黒画素領域検出部306が、特に
は図示しない黒画素センサを用いて黒画素(文字または
罫線)の探索を行なう(第4図S7)。黒画素センサ(yp
nt[i],iは短冊番号)は、第6図に示すように2短冊
分(短冊番号iと短冊番号i+1の短冊)の幅を持ち、
短冊の上端から黒画素の探索を行なうもので、該黒画素
センサ上の画素に黒画素が含まれているか否かを検出す
る。もし検出結果が白から黒になった場合、検出結果が
黒となった時のy座標(ypnt[i])を黒画素開始点
(ypos1[i])として認識情報蓄積部304に蓄積する。
黒画素センサは、ypos1[i]を決定した後、さらに検
出を行って、検出結果が黒から白になるまで、検出を行
なう。検出結果が黒から白になった場合に、最後の黒画
素を含むy座標を仮黒画素終了点(ypos2′[i])と
して認識情報蓄積手段304に蓄積する。
First, for each strip, the black pixel area detection unit 306 searches for black pixels (characters or ruled lines) using a black pixel sensor (not shown) (FIG. 4, S7). Black pixel sensor (yp
nt [i], i is a strip number), as shown in FIG. 6, has a width of two strips (a strip number i and a strip number i + 1),
The search for the black pixel is performed from the upper end of the strip, and it is detected whether or not the pixel on the black pixel sensor includes the black pixel. If the detection result changes from white to black, the y coordinate (ypnt [i]) when the detection result turns black is stored in the recognition information storage unit 304 as a black pixel start point (ypos1 [i]).
After determining ypos1 [i], the black pixel sensor performs further detection until the detection result changes from black to white. When the detection result changes from black to white, the y coordinate including the last black pixel is stored in the recognition information storage unit 304 as the temporary black pixel end point (ypos2 '[i]).

この仮黒画素終了点は、文字、罫線のかすれに対応す
ることができず、かすれ、即ち黒画素の分断が1画素幅
であっても、検出されてしまう。そこで、かすれによる
黒画素の分断がある場合でも、黒画素領域検出部306が
続けて黒画素を検出できるように、下方探索幅決定部30
7が、かすれによる黒画素分断の許容幅を決定する(第
4図S10)。同決定部307は、前述の黒画素開始点(ypos
1[i])と、前述の仮黒画素終了点(ypns2′[i])
の区間で縦ヒストグラムをとり(hist1[x])、該縦
ヒストグラム(hist1[x])の最大値と、最大値を示
すx座標(peak[i])を求める(第7図参照)。次
に、該peak[i]の周辺の縦ヒストグラムの値を検査
し、ヒストグラムの値が0になる箇所をpeak[i]の両
側で探索し、ヒストグラムのピークの開始座標(x_star
t[i])と終了座標(x_end[i])を決定する(第7
図参照)。該開始座標と終了座標で決定されるヒストグ
ラムの領域が、縦罫線であるかを推定するために、以下
の処理を行なう。縦ヒストグラムでは、ヒストグラムを
取る範囲がypos2′[i]とypos1[i]の間であった
が、その範囲d=ypos2′[i]−ypos1[i]+1を2
倍に拡大し、ypos1[i]−0.5dからypos2′[i]+0.
5dで定まる範囲にする(第8図参照)、該範囲におい
て、前記x_start[i]、x_end[i]間の縦ヒストグラ
ム(hist2[i])を求め、その値が前述のhist1[i]
の値よりも増加し、定められたしきい値を越えた場合に
は、現在、探索している短冊は、縦罫線を含むと推定す
る。縦罫線を含むと推定された短冊に対しては、下方探
索幅を4画素とし、それ以外の短冊に対しては下方探索
幅を1画素とする。
This temporary black pixel end point cannot correspond to blurring of characters and ruled lines, and is detected even if blurring, that is, the division of a black pixel has a width of one pixel. Therefore, even when there is a division of black pixels due to blurring, the lower search width determination unit 30 is set so that the black pixel area detection unit 306 can continue to detect black pixels.
7 determines the allowable width of black pixel division due to blurring (FIG. 4, S10). The determination unit 307 determines the black pixel start point (ypos
1 [i]) and the above-mentioned provisional black pixel end point (ypns2 ′ [i])
, A vertical histogram is obtained (hist1 [x]), and the maximum value of the vertical histogram (hist1 [x]) and the x coordinate (peak [i]) indicating the maximum value are obtained (see FIG. 7). Next, the values of the vertical histogram around the peak [i] are inspected, a portion where the value of the histogram becomes 0 is searched on both sides of the peak [i], and the starting coordinates (x_star) of the peak of the histogram are obtained.
t [i]) and the ending coordinate (x_end [i]) are determined (7th
See figure). The following processing is performed to estimate whether the area of the histogram determined by the start coordinates and the end coordinates is a vertical ruled line. In the vertical histogram, the range for taking the histogram is between ypos2 '[i] and ypos1 [i], but the range d = ypos2' [i] -ypos1 [i] +1 is set to 2
The magnification is doubled, and ypos1 [i] −0.5d to ypos2 ′ [i] +0.
In the range defined by 5d (see FIG. 8), a vertical histogram (hist2 [i]) between the x_start [i] and x_end [i] is obtained in the range, and the value is set to the aforementioned hist1 [i].
, And exceeds a predetermined threshold, it is estimated that the strip currently being searched for includes a vertical ruled line. The lower search width is set to 4 pixels for a strip estimated to include a vertical ruled line, and the lower search width is set to 1 pixel for other strips.

次に、該下方探索幅を用いて、黒画素終了点決定部30
8が黒画素の終了点を検出する(第4図S13)。黒画素終
了点決定部308は、黒画素センサ(ypnt[i])を用
い、仮黒画素終了点(ypos2′[i])より下方探索幅
分だけ下方探索を行なう。探索の結果、黒画素を検出し
た場合には、黒画素の分断がかすれによるものと判断
し、黒画素領域検出部306の仮黒画素終了点の検出、下
方探索幅決定部307の処理を繰り返す(第4図S14)。探
索の結果、黒画素が検出されなくなった場合に、黒画素
の終了点を検出した事とし、最後に黒画素の検出された
y座標を黒画素終了点ypos2[i]とするとともに、そ
の短冊に検出状態フラグ=3をつけ、その情報を認識情
報蓄積部304に蓄積する。
Next, using the downward search width, the black pixel end point determination unit 30
8 detects the end point of the black pixel (S13 in FIG. 4). Using the black pixel sensor (ypnt [i]), the black pixel end point determination unit 308 performs a downward search from the provisional black pixel end point (ypos2 '[i]) by the downward search width. As a result of the search, when a black pixel is detected, it is determined that the black pixel is separated due to blurring, and the detection of the temporary black pixel end point of the black pixel area detection unit 306 and the processing of the downward search width determination unit 307 are repeated. (FIG. 4, S14). As a result of the search, when the black pixel is no longer detected, it is determined that the end point of the black pixel has been detected. Finally, the detected y-coordinate of the black pixel is set as the black pixel end point ypos2 [i]. Is attached to the recognition information storage unit 304.

一方、黒画素開始点(ypos1[i])は決定された
が、黒画素が縦方向に連続して存在し、白画素が検出さ
れない場合には、予め定められた範囲まで検出が行なわ
れた時点で、そのy座標を黒画素終了点(ypos2
[i])とし、この短冊が縦罫線を含む候補であるとし
て、検出状態フラグ=6に付け、その情報を認識情報蓄
積部304に蓄積する(第4図S8→S9→S11)。
On the other hand, although the black pixel start point (ypos1 [i]) is determined, if black pixels are continuously present in the vertical direction and white pixels are not detected, detection is performed to a predetermined range. At this point, the y coordinate is set to the black pixel end point (ypos2
[I]), it is determined that this strip is a candidate including a vertical ruled line, the detection status flag is set to 6, and the information is stored in the recognition information storage unit 304 (FIG. 4, S8 → S9 → S11).

また、黒画素センサの探索により、予め定められた範
囲に於て黒画素が全く検出されない場合には検出を中止
し、検出を開始した点、終了した点のy座標をそれぞ
れ、黒画素開始点(ypos1[i])、黒画素終了点(ypo
s2[i])とし、その短冊に検出状態フラグ=1を付
け、その情報を認識情報蓄積部304に蓄積する(第4図S
8→S12)。
If no black pixel is detected in a predetermined range by the search for the black pixel sensor, the detection is stopped, and the y-coordinates of the point at which the detection is started and the point at which the detection is completed are respectively defined as the black pixel start point. (Ypos1 [i]), black pixel end point (ypo
s2 [i]), the detection state flag = 1 is attached to the strip, and the information is stored in the recognition information storage unit 304 (FIG. 4S
8 → S12).

以上述べた、黒画素領域検出部306、下方探索幅決定
部307、黒画素終了点決定部308の処理を、各短冊に対し
て繰り返し行い(第4図S14→S7)、全ての短冊に対し
て、ypos1[i],ypos2[i]を求める。この処理によ
って1行分の黒画素領域が求まり、次に、各短冊に対し
て縦罫線候補の抽出を行なう。
The above-described processing of the black pixel region detection unit 306, the lower search width determination unit 307, and the black pixel end point determination unit 308 is repeated for each strip (S14 → S7 in FIG. 4), and for all the strips. Then, ypos1 [i] and ypos2 [i] are obtained. With this process, a black pixel area for one row is obtained, and then vertical ruled line candidates are extracted for each strip.

縦罫線候補検出部309は、前述の黒画素開始点(ypos1
[i])と黒画素終了点(ypos2[i])の区間で縦ヒ
ストグラム(hist3[x])をとり、ヒストグラムの値
がypos2[i]−ypos1[i]の値の80%を越える箇所を
探索する。80%を越えるヒストグラム値を含む場合、縦
罫線が存在すると判断し、第9図の如く、80%を越える
箇所から両側にヒストグラムを探索しヒストグラム値が
50%の高さになった点を縦罫線の開始点(vkei[mv].s
t)、終了点(vkei[mv].en)(但し、mvは縦罫線候補
の数)とし、認識情報蓄積部304に蓄積する(第4図S1
5)。
The vertical ruled line candidate detection unit 309 calculates the black pixel start point (ypos1
[I]) and the end point of black pixel (ypos2 [i]), take a vertical histogram (hist3 [x]), where the histogram value exceeds 80% of the value of ypos2 [i] -ypos1 [i] To explore. When a histogram value exceeding 80% is included, it is determined that a vertical ruled line exists, and as shown in FIG.
The point at which the height reaches 50% is defined as the starting point of the vertical ruled line (vkei [mv] .s
t) and an end point (vkei [mv] .en) (where mv is the number of vertical ruled line candidates), and are stored in the recognition information storage unit 304 (FIG. 4, S1).
Five).

さらに、縦罫線座標決定部310は、縦罫線候補抽出部3
09で抽出された縦罫線候補の開始点、終了点を用いて縦
罫線座標の決定を行なう(第4図S16)。縦罫線候補を
含む短冊の内、前述の検出状態フラグが6の所では、第
10図のように、ypos1[i]、ypos2[i]を上下に黒画
素開始点、黒画素終了点で求まる幅(ypos2[i]−ypo
s1[i])の1/2づつ拡大して縦ヒストグラムを求め
(縦ヒストグラム4)、縦ヒストグラム4の、vkei[m
v].st,vkei[mv].en間が縦ヒストグラム3と比べて、
指定した比率以上増加していたら、縦罫線とみなす。縦
罫線とみなされなかった場合には、縦罫線候補vkeiから
削除する。また、検出状態フラグが3の場合は、前行の
縦罫線位置とほぼ同じ位置に縦罫線候補が存在する場合
には、縦罫線として残し、他の場合は除去する。
Further, the vertical ruled line coordinate determination unit 310 includes a vertical ruled line candidate extraction unit 3.
The vertical ruled line coordinates are determined using the start and end points of the vertical ruled line candidates extracted in 09 (S16 in FIG. 4). In the strip including the vertical ruled line candidate, if the above-mentioned detection state flag is 6, the
As shown in FIG. 10, ypos1 [i] and ypos2 [i] are vertically determined by the black pixel start point and the black pixel end point (ypos2 [i] −ypo).
s1 [i]) is enlarged by 1/2 and a vertical histogram is obtained (vertical histogram 4).
v] .st, vkei [mv] .en compared to the vertical histogram 3
If it has increased by more than the specified ratio, it is regarded as a vertical ruled line. If it is not regarded as a vertical ruled line, it is deleted from the vertical ruled line candidate vkei. When the detection state flag is 3, if there is a vertical ruled line candidate at substantially the same position as the vertical ruled line position of the previous row, it is left as a vertical ruled line, and otherwise removed.

次に、横罫線検出部311が横罫線を含む行の決定を行
なう(第4図S17)。まず、第11図のように、各短冊の
内、検出状態フラグが3の所だけypos1[i],ypos2
[i]間の縦ヒストグラムをとる(縦ヒストグラム
5)。縦ヒストグラム5でヒストグラムの幅を求め、予
め定めたしきい値よりも大きければ、罫線または文字が
含まれると判断する。さらに、罫線または文字を含むと
判断された場合には、ypos2[i]−ypos1[i]の値を
求め、この値があるしきい値よりも大きい場合には、文
字列を含む短冊であるとし、その情報を前記認識情報蓄
積部304に蓄積する。また、ypos2[i]−ypos1[i]
の値がしきい値よりも小さい場合には横罫線を含む短冊
であるとし、その情報を前記認識情報蓄積部304に蓄積
する。
Next, the horizontal ruled line detection unit 311 determines a row including the horizontal ruled line (FIG. 4, S17). First, as shown in FIG. 11, in each of the strips, the detection state flag is ypos1 [i], ypos2 only at three places.
A vertical histogram during [i] is obtained (vertical histogram 5). The width of the histogram is determined by the vertical histogram 5, and if it is larger than a predetermined threshold value, it is determined that a ruled line or a character is included. Further, when it is determined that the line includes a ruled line or a character, the value of ypos2 [i] −ypos1 [i] is obtained. The information is stored in the recognition information storage unit 304. Also, ypos2 [i] -ypos1 [i]
Is smaller than the threshold value, it is determined that the strip is a strip including a horizontal ruled line, and the information is stored in the recognition information storage unit 304.

横罫線検出部311によって、横罫線が含まれると判断
された場合には、1行整形処理部312が、横罫線座標を
決定するための前処理として1行単位の整形を行なう
(第5図S18)。横罫線検出部311で横罫線が存在すると
決定された短冊のみを対象に、1行整形処理を行なう。
文字列を含む短冊が混在する場合には、検出状態フラグ
が3である短冊全てを対象にして1行整形処理を行な
う。その結果を第12図に示す。
When the horizontal ruled line detection unit 311 determines that a horizontal ruled line is included, the one-line shaping processing unit 312 performs one-line-by-line shaping as preprocessing for determining horizontal ruled line coordinates (FIG. 5). S18). The horizontal ruled line detection unit 311 performs a one-line shaping process only on strips determined to have horizontal ruled lines.
When strips including a character string are mixed, one-line shaping processing is performed on all strips whose detection state flag is 3. The results are shown in FIG.

そして、横罫線が有るか否かが判別され(第4図S1
9)、有る場合には、1行整形処理部312での処理結果を
用いて、横罫線座標決定部313が横罫線の座標を決定す
る(第4図S20)。整形後のypos1[i],ypos2[i]間
の縦ヒストグラムを取り、ヒストグラムの値が予め定め
たしきい値よりも小さい区間の座標を求め、その長さが
予め定めたしきい値よりも長ければ、横罫線として開始
位置(hkeir[mh].st)と終了位置(hkei[mh].en)
を認識情報蓄積部304に蓄積する。
Then, it is determined whether or not there is a horizontal ruled line (S1 in FIG. 4).
9) If there is, the horizontal ruled line coordinate determining unit 313 determines the coordinates of the horizontal ruled line using the processing result of the one-line shaping processing unit 312 (S20 in FIG. 4). Take a vertical histogram between ypos1 [i] and ypos2 [i] after shaping, find the coordinates of a section where the value of the histogram is smaller than a predetermined threshold, and set the length to be greater than the predetermined threshold. If it is long, start position (hkeir [mh] .st) and end position (hkei [mh] .en) as horizontal ruled lines
Is stored in the recognition information storage unit 304.

一方、横罫線検出部311によって、横罫線はなく文字
が含まれると判断された場合には(第4図S19)、認識
部314が前記横罫線検出部311で求められた文字領域に対
して文字認識を行なう。まず、1行整形処理部312によ
り、1行単位の整形を行なった後、整形後の1行分の縦
ヒストグラム(縦ヒストグラム6)を用いて縦罫線部分
を除去した後に、縦ヒストグラム6を用いて文字切り出
し処理を行い(第4図S21)、文字領域の開始座標と終
了座標を求めて、縦罫線座標(vkei)と比較し、座標値
の小さいものから出力を行なう事とする。
On the other hand, when the horizontal ruled line detecting unit 311 determines that there is no horizontal ruled line and the character is included (S19 in FIG. 4), the recognizing unit 314 determines the character area calculated by the horizontal ruled line detecting unit 311. Perform character recognition. First, the one-line shaping processing unit 312 performs shaping in units of one line, and removes a vertical ruled line portion using the vertical histogram (vertical histogram 6) for one line after the shaping, and then uses the vertical histogram 6 Then, a character cutout process is performed (S21 in FIG. 4), the start coordinates and the end coordinates of the character area are obtained, compared with the vertical ruled line coordinates (vkei), and output is started from the one with the smaller coordinate value.

上述の横罫線座標の決定(第4図S20)により、罫線
を出力する場合には、まず罫線コード変換部315が罫線
をJIS罫線コードに変換する(第4図S22)。一方、文字
切り出し(第4図S21)により、文字を出力する場合に
は、文字認識部316が文字認識を行ない文字コードに変
換する(第4図S23)。
When a ruled line is output by the determination of the horizontal ruled line coordinates (S20 in FIG. 4), the ruled line code conversion unit 315 first converts the ruled line into a JIS ruled line code (S22 in FIG. 4). On the other hand, when characters are output by character segmentation (S21 in FIG. 4), the character recognition unit 316 performs character recognition and converts the characters into character codes (S23 in FIG. 4).

罫線または文字がコードに変換された後、対応する罫
線または文字座標に従い、第3図に概念的に示されるよ
うに、文字コードを認識情報蓄積部304に蓄積する(第
4図S24)。
After the ruled lines or characters are converted into codes, the character codes are stored in the recognition information storage unit 304 according to the corresponding ruled lines or character coordinates, as conceptually shown in FIG. 3 (S24 in FIG. 4).

以上の処理で、1行分の罫線または文字が認識されコ
ードで表現された。第4図の動作フローチャートで示さ
れる第3図S6の処理が、第3図S26の如く、繰り返され
ることにより、1行毎の認識が行なわれていくが、この
場合、次行の開始位置は前述の整形処理後のypos2
[i]の直後とされる(第4図S25)。
By the above processing, one line of the ruled line or the character was recognized and represented by the code. The process of FIG. 3 S6 shown in the operation flowchart of FIG. 4 is repeated as in FIG. 3 S26, so that recognition is performed for each line. In this case, the start position of the next line is Ypos2 after the shaping process described above
Immediately after [i] (FIG. 4, S25).

そして、画像情報入力部203によって指定された処理
範囲に対して全ての認識が完了した後に、罫線整形部31
7が罫線の不連続性を除去するために、縦罫線の前後
で、空白コード、横罫線コードの挿入、又は除去を行な
い(第3図S27)、その結果が第14図に概念的に示され
るように、表示部202に表示される(第3図S28)。
Then, after all the recognition is completed for the processing range designated by the image information input unit 203, the ruled line shaping unit 31
7 inserts or removes a blank code and a horizontal ruled code before and after the vertical ruled line in order to remove the discontinuity of the ruled line (S27 in FIG. 3), and the result is conceptually shown in FIG. Is displayed on the display unit 202 (S28 in FIG. 3).

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

本発明によれば、罫線と文字とが混在する画像(文
書)に対して、罫線領域と文字領域を横罫線検出手段に
より同時に抽出することができ、これにより、認識速度
を向上させることが可能となる。
According to the present invention, a ruled line region and a character region can be simultaneously extracted by a horizontal ruled line detection unit from an image (document) in which ruled lines and characters are mixed, thereby improving the recognition speed. Becomes

また、認識された文字と罫線を文字コードとして表現
し、認識結果を全て文字コード化することにより、認識
装置を簡素化することが可能となる。
In addition, the recognized character and the ruled line are expressed as character codes, and all the recognition results are converted into character codes, so that the recognition device can be simplified.

また、罫線を文字コード化することにより、出力結果
を一般のソフトウエアで扱うことが容易となる。
Also, by converting the ruled lines into character codes, the output result can be easily handled by general software.

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

第1図は、本発明のブロック図、 第2図は、本発明の実施例の構成図、 第3図は、本実施例の全体の処理の流れを示す動作フロ
ーチャート、 第4図は、1行単位認識処理の動作フローチャート、 第5図は、レイアウトイメージ範囲指定の説明図、 第6図は、短冊と、ypos1,ypos2′の説明図、 第7図は、縦ヒストグラム1の説明図、 第8図は、下方探索幅決定部の説明図、 第9図は、縦罫線候補検出部の説明図、 第10図は、縦罫線座標決定部の説明図、 第11図は、横罫線検出部の説明図、 第12図は、1行整形処理部の処理結果の例を示す図、 第13図は、認識処理結果の出力例を示す図、 第14図は、罫線整形部の出力結果の例を示す図である。 101……認識対象画像、 102……短冊形成手段、 103……領域検出手段、 104……横罫線検出手段、 105……縦罫線検出手段、 106……文字認識手段、 107……コード化手段、 108……認識結果.
FIG. 1 is a block diagram of the present invention, FIG. 2 is a block diagram of an embodiment of the present invention, FIG. 3 is an operation flowchart showing an overall processing flow of the present embodiment, FIG. FIG. 5 is an explanatory diagram of layout image range designation, FIG. 6 is an explanatory diagram of strips, ypos1, ypos2 ′, FIG. 7 is an explanatory diagram of vertical histogram 1, FIG. 8 is an explanatory diagram of a downward search width determining unit, FIG. 9 is an explanatory diagram of a vertical ruled line candidate detecting unit, FIG. 10 is an explanatory diagram of a vertical ruled line coordinate determining unit, and FIG. 11 is a horizontal ruled line detecting unit , FIG. 12 is a diagram showing an example of the processing result of the one-line shaping processing unit, FIG. 13 is a diagram showing an output example of the recognition processing result, and FIG. It is a figure showing an example. 101: recognition target image, 102: strip forming means, 103: area detecting means, 104: horizontal ruled line detecting means, 105: vertical ruled line detecting means, 106: character recognition means, 107: coding means , 108 ... Recognition result.

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】認識対象画像に対し、縦方向に短冊状の処
理区分を複数作成する短冊形成手段と、 該短冊形成手段により作成された前記各処理区分に対
し、罫線領域もしくは文字領域の上端、下端を検出して
1行分の領域を検出する領域検出手段と、 該領域検出手段により、検出された1行分の領域が、横
罫線か文字列かを判別する横罫線検出手段と、 前記短冊形成手段により作成された前記各処理区分に対
し、縦罫線の存在を検出する縦罫線検出手段と、 前記横罫線検出手段において、文字列であると判別され
た前記1行分の領域の文字列を認識する文字認識手段
と、 前記横罫線検出手段で検出された前記横罫線、前記縦罫
線検出手段で検出された前記縦罫線、及び前記文字認識
手段で認識された前記文字列をコード化するコード化手
段 を有することを特徴とする罫線を含んだ文字認識装置
1. A strip forming means for creating a plurality of strip-shaped processing sections in a vertical direction for an image to be recognized, and an upper end of a ruled line area or a character area for each of the processing sections created by the strip forming means. An area detecting means for detecting a lower end to detect an area for one line; a horizontal ruled line detecting means for determining whether the detected area for one line is a horizontal ruled line or a character string; For each of the processing sections created by the strip forming means, a vertical ruled line detecting means for detecting the presence of a vertical ruled line, and in the horizontal ruled line detecting means, the area of the one line area determined to be a character string Character recognition means for recognizing a character string; code for the horizontal ruled line detected by the horizontal ruled line detection means, the vertical ruled line detected by the vertical ruled line detection means, and the character string recognized by the character recognition means Coding means Character recognition apparatus including a ruled line, characterized in that it comprises
【請求項2】前記縦罫線検出手段は、前記各処理区分に
おいて、黒画素が縦方向に連続して存在する領域を検出
し、該各領域について縦ヒストグラムを計算し、更に、
上下方向に拡大して新たな縦ヒストグラムを計算し、こ
れら縦ヒストグラム間の変化量を判別することにより、
前記各領域が縦罫線の領域であるか否かを識別すること
を特徴とする請求項1記載の罫線を含んだ文字認識装
置。
2. The vertical ruled line detecting means detects an area where black pixels are continuously present in the vertical direction in each of the processing sections, calculates a vertical histogram for each of the areas,
By calculating a new vertical histogram by expanding in the vertical direction and determining the amount of change between these vertical histograms,
2. The character recognition device including a ruled line according to claim 1, wherein whether or not each of the regions is a vertical ruled line is identified.
【請求項3】前記縦罫線検出手段は、前記各処理区分に
おいて、前記各領域について、該各領域の端点から更に
縦方向に探索するとにより、罫線のかすれの影響を除去
することを特徴とする請求項2記載の罫線を含んだ文字
認識装置。
3. The vertical ruled line detecting means removes the influence of blurred ruled lines by searching in a vertical direction from an end point of each region in each of the processing sections. A character recognition device including the ruled line according to claim 2.
【請求項4】前記縦罫線検出手段は、前記各領域が縦罫
線の領域であるか否か識別した結果に応じて、該各領域
の端点から探索する範囲を変えて下方向に探索し、黒画
素が検出された場合は黒画素が継続中として更に探索を
続け、黒画素が検出されない場合は黒画素終了点とする
ことを特徴とする請求項2記載の罫線を含んだ文字認識
装置。
4. The vertical ruled line detecting means performs a downward search by changing a search range from an end point of each area according to a result of identifying whether each area is an area of a vertical ruled line, 3. The character recognition device including a ruled line according to claim 2, wherein if a black pixel is detected, the search is further continued assuming that the black pixel is continuing, and if no black pixel is detected, the black pixel end point is set.
【請求項5】前記縦罫線検出手段は、前記各領域が縦罫
線の領域でないと識別した場合においても、前行の縦罫
線位置と近い位置に前記各領域について計算される縦ヒ
ストグラムのピークが存在する場合は、該各領域を縦罫
線の領域と識別することを特徴とする請求項2記載の罫
線を含んだ文字認識装置。
5. The vertical ruled line detecting means according to claim 1, wherein said vertical ruled line detecting means detects a peak of a vertical histogram calculated for each region at a position close to a position of a vertical ruled line in a preceding row even when the region is identified as not a vertical ruled line region. 3. The character recognition apparatus including a ruled line according to claim 2, wherein, when present, each of the regions is identified as a region of a vertical ruled line.
JP2228422A 1990-03-13 1990-08-31 Character recognition device including ruled lines Expired - Lifetime JP2803735B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2228422A JP2803735B2 (en) 1990-08-31 1990-08-31 Character recognition device including ruled lines
US07/668,541 US5191612A (en) 1990-03-13 1991-03-13 Character recognition system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2228422A JP2803735B2 (en) 1990-08-31 1990-08-31 Character recognition device including ruled lines

Publications (2)

Publication Number Publication Date
JPH04111188A JPH04111188A (en) 1992-04-13
JP2803735B2 true JP2803735B2 (en) 1998-09-24

Family

ID=16876230

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2228422A Expired - Lifetime JP2803735B2 (en) 1990-03-13 1990-08-31 Character recognition device including ruled lines

Country Status (1)

Country Link
JP (1) JP2803735B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5859929A (en) * 1995-12-01 1999-01-12 United Parcel Service Of America, Inc. System for character preserving guidelines removal in optically scanned text

Also Published As

Publication number Publication date
JPH04111188A (en) 1992-04-13

Similar Documents

Publication Publication Date Title
JP2940936B2 (en) Tablespace identification method
JP3338537B2 (en) Image tilt detector
US5335290A (en) Segmentation of text, picture and lines of a document image
EP0381773B1 (en) Character recognition apparatus
JPH0877334A (en) Automatic feature extraction method for face images
GB2230633A (en) Optical character recognition
JP3830998B2 (en) Ruled line removal method and character recognition apparatus using the same
KR930002349B1 (en) String Separation Method of Compressed Video
JP2803735B2 (en) Character recognition device including ruled lines
JP3095470B2 (en) Character recognition device
JPS615383A (en) Character pattern separating device
JP2968284B2 (en) Character recognition apparatus and character area separation method
JPH07160810A (en) Character recognition device
JP3162414B2 (en) Ruled line recognition method and table processing method
JPS6361382A (en) Character component removing method for linear image
JP3666903B2 (en) Image processing method and apparatus
JPH05274472A (en) Image recognizing device
JP3566738B2 (en) Shaded area processing method and shaded area processing apparatus
JP2003030585A (en) Image processing apparatus, method, program, and storage medium
JP2721415B2 (en) Character image extraction method
JPH05242297A (en) Character cutting method
JPH02187883A (en) Document reader
JPH04291479A (en) Ruled line recognition method and table processing method
JPS63131287A (en) Character recognition method
JPH0264781A (en) Tablespace extraction method