JPH0822507A - Document recognition device - Google Patents
Document recognition deviceInfo
- Publication number
- JPH0822507A JPH0822507A JP6157209A JP15720994A JPH0822507A JP H0822507 A JPH0822507 A JP H0822507A JP 6157209 A JP6157209 A JP 6157209A JP 15720994 A JP15720994 A JP 15720994A JP H0822507 A JPH0822507 A JP H0822507A
- Authority
- JP
- Japan
- Prior art keywords
- rectangle
- black pixel
- attribute
- information
- connected black
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Character Input (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、文字・表・図形・罫線
が混在する印刷文書を、スキャナ等の光学的手段を用い
て文書画像を取り込み、取り込んだ画像データを基に文
字ブロック・図形ブロック等に領域を分割し、各々のブ
ロックの属性に応じた認識を行う文書認識装置に関する
ものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention captures a document image of a printed document in which characters, tables, figures, and ruled lines are mixed by using an optical means such as a scanner, and character blocks and figures based on the captured image data. The present invention relates to a document recognition device that divides an area into blocks and the like and performs recognition according to the attribute of each block.
【0002】[0002]
【従来の技術】従来の文書認識の処理過程について以下
説明する。2. Description of the Related Art A conventional document recognition process will be described below.
【0003】<ステップ1>スキャナによって取り込ま
れた二値データを解像度が100DPI程度となるよう
に縮小する。<Step 1> The binary data read by the scanner is reduced so that the resolution becomes about 100 DPI.
【0004】<ステップ2>縮小された画像データに対
して、連結黒画素矩形の座標と連結黒画素数をメモリに
格納する。<Step 2> With respect to the reduced image data, the coordinates of the connected black pixel rectangle and the number of connected black pixels are stored in the memory.
【0005】<ステップ3>ステップ2で抽出した連結
黒画素矩形の中から、文字を構成する矩形を抽出する。
連結黒画素矩形の幅あるいは高さのうち短い方の長さが
あらかじめ定められた閾値より小さければ、その連結黒
画素矩形に文字の属性が付与する。<Step 3> From the connected black pixel rectangles extracted in step 2, rectangles forming a character are extracted.
If the shorter one of the width or height of the connected black pixel rectangle is smaller than a predetermined threshold value, the attribute of the character is given to the connected black pixel rectangle.
【0006】<ステップ4>ステップ3で文字属性とな
らなかった連結黒画素矩形が写真属性をもつ矩形である
か否かの判定を行う。連結黒画素矩形に対して、矩形内
に微小な矩形があらかじめ定められた閾値以上存在する
か、あるいは、矩形内に占める黒画素の割合があらかじ
め定められた閾値以上あれば、その連結黒画素矩形には
写真属性を付与する。<Step 4> It is judged whether or not the connected black pixel rectangle which has not become a character attribute in step 3 is a rectangle having a photograph attribute. With respect to the connected black pixel rectangle, if a minute rectangle exists in the rectangle with a predetermined threshold value or more, or if the ratio of black pixels in the rectangle is more than the predetermined threshold value, the connected black pixel rectangle Is assigned a photo attribute.
【0007】<ステップ5>ステップ3,4で文字・写
真にならなかった残りの連結黒画素矩形に対しては、表
矩形であるか否か、チェックする。矩形内に水平線およ
び垂直線を構成する部分があるか調べ、矩形内に存在す
る水平線あるいは垂直線の数と水平線と垂直線の交点
数、および、矩形内の黒画素の情報から表属性をもつ矩
形と判断する。<Step 5> It is checked whether the remaining connected black pixel rectangles that have not become characters / photographs in steps 3 and 4 are table rectangles. Check whether there is a horizontal line or a vertical line in the rectangle, and have a table attribute from the number of horizontal or vertical lines existing in the rectangle, the number of intersections of the horizontal line and the vertical line, and the black pixel information in the rectangle. Judge as a rectangle.
【0008】<ステップ6>属性が付与されなかった連
結黒画素矩形に対して図形属性を付与する。<Step 6> A graphic attribute is given to the connected black pixel rectangles to which no attribute has been given.
【0009】<ステップ7>以上の処理により、各矩形
に対して、文字、写真、表、図形の属性が付与される。
文字以外の写真、表、図形の属性をもつ矩形について
は、1矩形が1領域を形成するとみなされ、写真、表、
図形の属性をもつ領域が抽出される。<Step 7> By the above processing, attributes of characters, photographs, tables and figures are given to each rectangle.
For rectangles having attributes of photographs, tables, and figures other than characters, one rectangle is considered to form one area, and photographs, tables,
A region having a graphic attribute is extracted.
【0010】<ステップ8>写真、表、図形内に包含さ
れる文字属性をもつ矩形については、その矩形は図形の
一部である可能性が高いため、写真、表、図形内に包含
される文字属性をもつ矩形は黒画素矩形リストから削除
する。<Step 8> Regarding a rectangle having a character attribute included in a photograph, a table or a figure, since the rectangle is likely to be a part of the figure, it is included in the photograph, the table or the figure. The rectangle with the character attribute is deleted from the black pixel rectangle list.
【0011】<ステップ9>ステップ8で残った文字属
性をもつ矩形に対して、文字列の統合を行い、文字領域
の抽出を行う。<Step 9> Character strings are integrated with respect to the rectangle having the character attribute remaining in step 8, and the character area is extracted.
【0012】<ステップ10>文字領域は文字認識、画
像領域は画像圧縮、表領域は表認識、図形領域はベクト
ル化を行い、それぞれの属性に応じた認識結果を得る。<Step 10> The character area is subjected to character recognition, the image area is subjected to image compression, the table area is subjected to table recognition, and the graphic area is subjected to vectorization to obtain a recognition result corresponding to each attribute.
【0013】[0013]
【発明が解決しようとする課題】しかしながら従来技術
では、複数の罫線で構成される領域やスキャナ読み取り
ノイズは、図形領域となってしまうために、内部の文字
も図形の一部となってしまい、ベクトル化してしまうと
いう問題点があった。However, in the prior art, since the area formed by a plurality of ruled lines and the scanner reading noise become a graphic area, the internal characters also become a part of the graphic. There was a problem of vectorization.
【0014】そこでノイズにより認識精度が影響されに
くい文書認識装置を提供することを目的とする。Therefore, an object of the present invention is to provide a document recognition device in which the recognition accuracy is less likely to be affected by noise.
【0015】[0015]
【課題を解決するための手段】本発明の文書認識装置
は、二値化された文字認識対象文書に対して画像データ
を縮小して縮小画像データとする手段と、縮小画像デー
タから黒画素が連結している箇所を検出し、連結黒画素
に外接する連結黒画素矩形を求め、縮小画像データに対
応した連結黒画素矩形の座標と連結黒画素数を連結黒画
素矩形情報リストとして格納する連結情報格納手段と、
連結黒画素矩形の縦横比が予め定められた閾値以上であ
るものを罫線と判断し、連結黒画素矩形情報の1つとし
て罫線属性を付与する手段と、連結黒画素矩形の辺の長
さが予め定められた閾値以下のものを文字矩形と判断し
連結黒画素矩形情報に文字属性を付与する手段と、連結
黒画素矩形内の黒画素の特徴から写真属性を付与する手
段と、連結黒画素矩形内に水平線および垂直線を構成す
る部分があるか調べ、連結黒画素矩形内に存在する水平
線あるいは垂直線の数と水平線と垂直線の交点数、およ
び、連結黒画素矩形内の黒画素の情報から表と判断し、
連結黒画素矩形情報に表の属性を付与する手段と、水平
線/垂直線情報と連結黒画素矩形内の全黒画素数と連結
黒画素矩形情報格納手段で検出した連結黒画素数を基に
対象矩形が複数の罫線から構成される矩形であるか調
べ、そうであれば矩形情報に罫線の属性を付与する手段
と、さらに、連結黒画素矩形位置情報と矩形内部の黒画
素情報よりその矩形が画像読み取りノイズであるか調
べ、読み取りノイズであった場合にその連結黒画素矩形
の情報を矩形リストより削除する手段と、属性が付与さ
れない残りの矩形に対して図形属性を付与する手段とを
備える。A document recognition apparatus according to the present invention comprises means for reducing image data of a binarized character recognition target document to obtain reduced image data, and black pixels from the reduced image data. The connected black pixel rectangle circumscribing the connected black pixel is detected, the coordinates of the connected black pixel rectangle corresponding to the reduced image data and the number of connected black pixels are stored as a connected black pixel rectangle information list. Information storage means,
A ruled line is one in which the aspect ratio of the connected black pixel rectangle is greater than or equal to a predetermined threshold, and a ruled line attribute is added as one of the connected black pixel rectangle information. A unit that determines a character rectangle that is less than or equal to a predetermined threshold value to give a character attribute to the connected black pixel rectangle information, a unit that gives a photograph attribute from the characteristics of the black pixels in the connected black pixel rectangle, and a connected black pixel Check whether there are parts that make up horizontal lines and vertical lines in the rectangle, and check the number of horizontal lines or vertical lines existing in the connected black pixel rectangle and the number of intersections of the horizontal line and vertical line, and the black pixels in the connected black pixel rectangle. Judging from the information as a table,
Target based on means for giving a table attribute to the connected black pixel rectangle information, horizontal line / vertical line information, the total number of black pixels in the connected black pixel rectangle, and the number of connected black pixels detected by the connected black pixel rectangle information storage means It is checked whether the rectangle is a rectangle composed of a plurality of ruled lines, and if so, means for giving the attribute of the ruled line to the rectangle information, and further, the rectangle is determined from the connected black pixel rectangle position information and the black pixel information inside the rectangle. It is provided with a means for checking whether there is image reading noise, and for deleting the information of the connected black pixel rectangle from the rectangle list when there is reading noise, and a means for giving a graphic attribute to the remaining rectangles to which no attribute is given. .
【0016】[0016]
【作用】本発明は上記の構成により、従来技術において
図形と判定されていた複数の罫線が結合している領域や
画像読み取りノイズが、罫線領域は罫線領域と判定で
き、スキャナ読み取りノイズはノイズと判定して領域情
報から削除することができる。With the above structure, the present invention can determine a ruled line area as a ruled line area, and an area where a plurality of ruled lines that are determined as a figure in the prior art are connected, and image reading noise. It can be determined and deleted from the area information.
【0017】[0017]
【実施例】本発明の一実施例について図面を参照して説
明する。図1は本発明の一実施例における文書認識装置
のブロック図である。図1において、1は文書認識を行
う中央処理装置(以下、CPUと略す)であって図2
(本発明の一実施例における文書認識装置の機能ブロッ
ク図)の画像入力部7、画像縮小部8、連結黒画素矩形
リスト作成部9、罫線属性付与部10、文字属性付与部
11、写真属性付与部12、表属性付与部13、罫線属
性付与部14、読取ノイズ検出部15、図形属性付与部
16、認識処理部17を有する。2は領域抽出プログラ
ムが格納されているリードオンリーメモリ(以下、RO
Mと略す)であり、ランダムアクセスメモリ3(以下、
RAMと略す)には、スキャナ4で読み取った画像デー
タが格納される。5は外部からCPU1に対して指令を
与えるためのキーボードであり、6はCPU1によって
認識された認識結果を表示する表示装置である。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram of a document recognition apparatus according to an embodiment of the present invention. In FIG. 1, reference numeral 1 denotes a central processing unit (hereinafter abbreviated as CPU) for recognizing a document, which is shown in FIG.
An image input unit 7, an image reduction unit 8, a connected black pixel rectangle list creation unit 9, a ruled line attribute assignment unit 10, a character attribute assignment unit 11, and a photograph attribute of (a functional block diagram of a document recognition apparatus according to an embodiment of the present invention). It includes an assigning unit 12, a table attribute assigning unit 13, a ruled line attribute assigning unit 14, a reading noise detecting unit 15, a graphic attribute assigning unit 16, and a recognition processing unit 17. 2 is a read-only memory (hereinafter, RO
M), and the random access memory 3 (hereinafter,
Image data read by the scanner 4 is stored in a RAM (abbreviated as RAM). Reference numeral 5 is a keyboard for giving a command to the CPU 1 from the outside, and 6 is a display device for displaying the recognition result recognized by the CPU 1.
【0018】以下、領域分割について、図2、図3(本
発明の一実施例における画像データ例示図)と図7(本
発明の一実施例における文書認識装置のフローチャー
ト)を参照しながら説明する。画像入力部7ではスキャ
ナ4より取り込んだ画像データをRAM3に格納する
(s1)。画像データの座標は左上が原点で、水平方向
の座標をx、垂直方向の座標をyで表わす。画像縮小部
8では、取り込んだ二値画像データを属性判定の高速化
のために100DPIの解像度となるように縮小し、R
AM3に格納する(s2)。The area division will be described below with reference to FIGS. 2 and 3 (image data exemplification diagram in one embodiment of the present invention) and FIG. 7 (flow chart of the document recognition apparatus in one embodiment of the present invention). . The image input unit 7 stores the image data captured by the scanner 4 in the RAM 3 (s1). The upper left corner of the image data is the origin, the horizontal coordinate is x, and the vertical coordinate is y. The image reduction unit 8 reduces the captured binary image data so as to have a resolution of 100 DPI in order to speed up attribute determination, and R
It is stored in AM3 (s2).
【0019】連結黒画素矩形リスト作成部9では、RA
M3の縮小二値画像データから、8近傍で連結している
黒画素の連結黒画素矩形を検出し連結黒画素リストを作
成する(s3)。連結黒画素リストに登録される連結黒
画素矩形のデータは、左上の座標(x1,y1)と右下
の座標(x2,y2)と黒画素の数である。本実施例で
は、図3に示す画像データに対して処理を行った結果、
図4(本発明の一実施例における連結黒画素抽出結果の
例示図)に示した連結黒画素矩形を得たものとする。In the connected black pixel rectangle list creation unit 9, RA
From the reduced binary image data of M3, connected black pixel rectangles of black pixels connected in the vicinity of 8 are detected to create a connected black pixel list (s3). The data of the connected black pixel rectangle registered in the connected black pixel list is the upper left coordinates (x1, y1), the lower right coordinates (x2, y2), and the number of black pixels. In this embodiment, as a result of processing the image data shown in FIG.
It is assumed that the connected black pixel rectangle shown in FIG. 4 (an exemplary view of the connected black pixel extraction result in the embodiment of the present invention) is obtained.
【0020】罫線属性付与部10では、連結黒画素矩形
の縦横比があらかじめ定められた閾値Th_RTO_L
INE以上か否かチェックする(s4)。矩形の縦横比
が閾値Th_RTO_LINE以上あれば、その矩形は
罫線属性をもつものとして、s12へ移行する。In the ruled line attribute assigning section 10, the aspect ratio of the connected black pixel rectangle is set to a predetermined threshold value Th_RTO_L.
It is checked whether it is INE or more (s4). If the aspect ratio of the rectangle is greater than or equal to the threshold value Th_RTO_LINE, the rectangle is determined to have the ruled line attribute, and the process proceeds to s12.
【0021】文字属性付与部11では、s4で罫線とな
らなかった連結黒画素矩形に対して、矩形の短辺の長さ
があらかじめ定められた閾値Th_MAX_CHAR以
下で、かつ、領域に占める黒画素の割合が閾値Th_R
TO_CHAR以上あるかチェックする(s5)。矩形
の短辺の長さがあらかじめ定められた閾値Th_MAX
_CHAR以下で、かつ、領域に占める黒画素の割合が
閾値Th_RTO_CHAR以上の場合は文字の属性を
もつ矩形となり、s13へ移行する。図4の矩形22,
23は文字属性をもつ矩形となりs13へすすみ、その
他の矩形の文字以外矩形としてs5へすすむ。With respect to the connected black pixel rectangle that has not become a ruled line in s4, the character attribute assigning unit 11 sets the length of the short side of the rectangle to a predetermined threshold value Th_MAX_CHAR or less, and the black pixel occupies the area. The ratio is the threshold Th_R
It is checked whether there is more than TO_CHAR (s5). Threshold Th_MAX in which the length of the short side of the rectangle is predetermined
If it is less than or equal to _CHAR and the ratio of black pixels in the area is greater than or equal to the threshold Th_RTO_CHAR, the rectangle has a character attribute, and the process proceeds to s13. Rectangle 22 of FIG.
23 becomes a rectangle having a character attribute and advances to s13, and advances to s5 as a rectangle other than the other rectangular characters.
【0022】ここで、黒画素密度は以下の計算で算出で
きる。 黒画素密度(d1)=連結黒画素矩形の黒画素数/(矩
形の幅×矩形の高さ)×100(%) 写真属性付与部12では、罫線、文字以外の矩形として
残った矩形に対して、写真の属性をもつ矩形であるか否
かのチェックを行う(s6)。矩形内に占める微小矩形
の割合があらかじめ定められた閾値Th_RTO_IM
G以上で、かつ、微小矩形の個数があらかじめ定められ
た閾値Th_CNT_IMG以上の場合にその矩形は写
真属性をもつ矩形であると判定され、s14へ移行す
る。図4の矩形26が写真属性をもつ矩形となる。Here, the black pixel density can be calculated by the following calculation. Black pixel density (d1) = black pixel number of connected black pixel rectangle / (rectangle width × rectangle height) × 100 (%) In the photo attribute assigning unit 12, for the rectangles remaining as rectangles other than ruled lines and characters Then, it is checked whether or not it is a rectangle having a photo attribute (s6). A threshold value Th_RTO_IM in which a ratio of a minute rectangle to a rectangle is predetermined
When it is G or more and the number of minute rectangles is equal to or more than a predetermined threshold value Th_CNT_IMG, it is determined that the rectangle has a photograph attribute, and the process proceeds to s14. The rectangle 26 in FIG. 4 is a rectangle having a photo attribute.
【0023】表属性付与部13では、表の属性をもつ矩
形であるか否かのチェックを行う。まず、その矩形内に
線の成分があるか線成分の検出処理を行う。線成分抽出
の方法は水平方向/垂直方向それぞれに、黒画素の長さ
が閾値Th_LEN_LINE以上あるかチェックし、
検出された線成分を基に表の判定を行う(s7)。検出
された水平線の線の長さが矩形の幅の閾値Th_LEN
_TABLE倍のものが閾値Th_CNT_TABLE
(=3)個以上で、かつ、垂直線の長さが矩形の高さの
閾値Th_LEN_TABLE倍以上のものが閾値Th
_CNT_TABLE個以上あり、さらに、上記のいず
れかの線に対して横切る線が閾値Th_CRS_TAB
LE以上あればその矩形は表となる。図3の画像データ
例では、図4の矩形24が表と決定される。表と決定さ
れた矩形はs15へすすみ、表とならなかったものは第
2の罫線判定処理s8へすすむ。なお図4の矩形20
は、線成分が水平線1、垂直線1であるため表の条件を
満たさない。The table attribute assigning section 13 checks whether the rectangle has the table attribute. First, a line component detection process is performed to determine whether there is a line component in the rectangle. The method of line component extraction is to check whether the length of the black pixel is equal to or greater than the threshold value Th_LEN_LINE in the horizontal direction / vertical direction,
The table is judged based on the detected line component (s7). The threshold value Th_LEN in which the length of the detected horizontal line is the width of the rectangle
_TABLE times the threshold Th_CNT_TABLE
The number of (= 3) or more, and the length of the vertical line is equal to or more than the threshold value Th_LEN_TABLE of the height of the rectangle, the threshold value Th
There are more than _CNT_TABLEs, and a line crossing any of the above lines is a threshold Th_CRS_TAB.
If it is LE or more, the rectangle becomes a table. In the image data example of FIG. 3, the rectangle 24 of FIG. 4 is determined as the table. The rectangles determined to be the table proceed to s15, and the rectangles not determined to the table proceed to the second ruled line determination processing s8. The rectangle 20 in FIG.
Does not satisfy the conditions in the table because the line components are horizontal line 1 and vertical line 1.
【0024】罫線属性付与部14では、表とならなかっ
た矩形に対して以下に示す罫線判定を行う(s8)。s
3で検出した連結黒画素矩形黒画素密度と対象矩形内全
黒画素密度の関係から罫線領域であるか判定する。全黒
画素密度は矩形内のすべての黒画素を計数してその数を
矩形の面積で割ったものに100を掛けることにより算
出することができる。The ruled line attribute assigning unit 14 performs ruled line determination as described below for rectangles that have not become a table (s8). s
It is determined from the relationship between the connected black pixel rectangle black pixel density detected in 3 and the total black pixel density in the target rectangle whether it is a ruled line area. The total black pixel density can be calculated by counting all the black pixels in the rectangle, dividing the number by the area of the rectangle, and multiplying by 100.
【0025】全黒画素密度(d2)=矩形内のすべての
黒画素数/(矩形の幅×矩形の高さ)×100(%) 検出した全黒画素密度d2が黒画素密度d1の2倍以上
あり、表属性付与部13で検出した水平線が矩形の幅の
閾値Th_LEN_TABLE倍のものがあるか、また
は、垂直線が矩形の高さの閾値Th_LEN_TABL
E倍以上のものがあればその矩形は罫線領域矩形とな
る。罫線矩形と判定されたものはs16へすすみ、罫線
とならなかったものはs9のスキャナ読み取りノイズ検
出処理へ移行する。図4の矩形20は前記条件を満たす
ため罫線属性が付与され、図4の矩形21は罫線とはな
らない。Total black pixel density (d2) = total number of black pixels in rectangle / (rectangle width × rectangle height) × 100 (%) The detected total black pixel density d2 is twice the black pixel density d1. As described above, there is a horizontal line detected by the table attribute assigning unit 13 that is Th_LEN_TABLE times the width of the rectangle, or a vertical line Th_LEN_TABL that is the height of the rectangle.
If there is E times or more, the rectangle becomes a ruled area rectangle. If the ruled line rectangle is determined, the process proceeds to s16, and if the ruled line is not determined, the process proceeds to the scanner reading noise detection process of s9. Since the rectangle 20 in FIG. 4 satisfies the above condition, a ruled line attribute is added, and the rectangle 21 in FIG. 4 does not become a ruled line.
【0026】読取ノイズ検出部15では、今までに属性
が設定されなかった矩形に対してスキャナ読み取りノイ
ズであるか否か判定を行う(s9)。図4の矩形21は
スキャナ読み取りノイズと判定され、s17へ移行す
る。s17では、スキャナ読み取りノイズと判定された
矩形を、連結黒画素矩形リストから矩形情報を削除す
る。The reading noise detecting section 15 determines whether or not the rectangle for which an attribute has not been set up to now is scanner reading noise (s9). The rectangle 21 in FIG. 4 is determined to be scanner reading noise, and the process proceeds to s17. In s17, the rectangle information determined as the scanner reading noise is deleted from the linked black pixel rectangle list.
【0027】図形属性付与部16では、以上の判定基準
により、属性が決定されていない矩形について図形属性
を付与する(s10)。付与されると、属性毎に認識し
(s11)、処理を終了する。The graphic attribute assigning section 16 assigns a graphic attribute to a rectangle whose attribute has not been determined based on the above determination criteria (s10). When it is given, it is recognized for each attribute (s11), and the process is ended.
【0028】以上の処理により、すべての連結黒画素矩
形に対して、罫線、文字、図形、写真、表のうちのいず
れかの属性が付与されたことになる。罫線あるいは図形
あるいは表あるいは写真の属性が付与された矩形はその
まま1つの領域となる。図形領域に包含された文字属性
をもつ矩形は図形の一部であると判断し連結黒画素矩形
リストから削除する。例えば、図5(本発明の一実施例
における画像データ例示図)の画像データ例に対して、
図6(本発明の一実施例における連結黒画素抽出結果の
例示図)の矩形k12以外の矩形は文字属性が与えられ
ているが、実際には矩形k6〜k9は図形の一部となっ
ている写真領域も図形領域同様の処理を行う。残った文
字矩形に対して、文字列を抽出して、文字列情報を基に
文字領域を抽出する。Through the above processing, any attribute of ruled lines, characters, figures, photographs, and tables is added to all connected black pixel rectangles. A rectangle to which a ruled line, a figure, a table, or a photograph attribute is added becomes one area as it is. A rectangle having a character attribute included in the figure area is determined to be a part of the figure and deleted from the linked black pixel rectangle list. For example, for the image data example of FIG. 5 (image data exemplary diagram in one embodiment of the present invention),
Character attributes are given to rectangles other than the rectangle k12 in FIG. 6 (exemplary diagram of the connected black pixel extraction result in the embodiment of the present invention), but actually, the rectangles k6 to k9 are part of the figure. The same processing is performed on the existing photograph area as the figure area. A character string is extracted from the remaining character rectangle, and a character area is extracted based on the character string information.
【0029】以上のようにして得たそれぞれの領域に対
して認識処理部17では、文字領域の場合は文字切り出
し処理を施した後、文字認識処理を行う。図形領域の場
合は図形をベクトル化し、表領域の場合は、表の構造認
識を行い、各セルに対して文字認識処理を行う。写真領
域に対しては画像圧縮を行って、情報量の軽減を行う。In the recognition processing section 17, for each area obtained as described above, in the case of a character area, character cutting processing is performed and then character recognition processing is performed. In the case of the graphic area, the graphic is vectorized, and in the case of the table area, the structure of the table is recognized, and the character recognition processing is performed on each cell. Image compression is applied to the photo area to reduce the amount of information.
【0030】尚、本実施例では、閾値Th_MAX_C
HAR〜Th_CNT_TABLEの値は以下の値とし
た。In this embodiment, the threshold value Th_MAX_C is set.
The values of HAR to Th_CNT_TABLE are as follows.
【0031】 Th_RTO_LINE=25 Th_MAX_CHAR=100 Th_RTO_CHAR=15 Th_RTO_IMG=0.5 Th_CNT_IMG=80 Th_LEN_LINE=25 Th_LEN_TABLE=4/5 Th_CNT_TABLE=3 Th_CRS_TABLE=2Th_RTO_LINE = 25 Th_MAX_CHAR = 100 Th_RTO_CHAR = 15 Th_RTO_IMG = 0.5 Th_CNT_IMG = 80 Th_LEN_LINE = 25 Th_LEN_TABLE = 4/5 Th_CNT_BBLE = S3
【0032】[0032]
【発明の効果】本発明は、二値化された文字認識対象文
書に対して画像データを縮小して縮小画像データとする
手段と、縮小画像データから黒画素が連結している箇所
を検出し、連結黒画素に外接する連結黒画素矩形を求
め、縮小画像データに対応した連結黒画素矩形の座標と
連結黒画素数を連結黒画素矩形情報リストとして格納す
る連結情報格納手段と、連結黒画素矩形の縦横比が予め
定められた閾値以上であるものを罫線と判断し、連結黒
画素矩形情報の1つとして罫線属性を付与する手段と、
連結黒画素矩形の辺の長さが予め定められた閾値以下の
ものを文字矩形と判断し連結黒画素矩形情報に文字属性
を付与する手段と、連結黒画素矩形内の黒画素の特徴か
ら写真属性を付与する手段と、連結黒画素矩形内に水平
線および垂直線を構成する部分があるか調べ、連結黒画
素矩形内に存在する水平線あるいは垂直線の数と水平線
と垂直線の交点数、および、連結黒画素矩形内の黒画素
の情報から表と判断し、連結黒画素矩形情報に表の属性
を付与する手段と、水平線/垂直線情報と連結黒画素矩
形内の全黒画素数と連結黒画素矩形情報格納手段で検出
した連結黒画素数を基に対象矩形が複数の罫線から構成
される矩形であるか調べ、そうであれば矩形情報に罫線
の属性を付与する手段と、さらに、連結黒画素矩形位置
情報と矩形内部の黒画素情報よりその矩形が画像読み取
りノイズであるか調べ、読み取りノイズであった場合に
その連結黒画素矩形の情報を矩形リストより削除する手
段と、属性が付与されない残りの矩形に対して図形属性
を付与する手段とを備えるので、従来では図形と判定さ
れていた複数の罫線が結合している領域や画像読み取り
ノイズが、罫線領域は罫線領域と判定でき、スキャナ読
み取りノイズはノイズと判定して領域情報から削除する
ため、従来では不可能であった罫線で囲まれている文字
領域も罫線領域に統合されることなく、文字領域として
正確に抽出することが可能となり、精度の高い文書認識
が行える。According to the present invention, means for reducing image data of a binarized character recognition target document to obtain reduced image data, and detecting a portion where black pixels are connected from the reduced image data are detected. A connected black pixel rectangle that circumscribes the connected black pixel, and stores the connected black pixel rectangle coordinates corresponding to the reduced image data and the connected black pixel number as a connected black pixel rectangle information list; Means for determining a ruled line when the aspect ratio of the rectangle is equal to or greater than a predetermined threshold value, and assigning a ruled line attribute as one of the connected black pixel rectangle information;
Photographs based on the means for determining the character rectangle when the length of the side of the connected black pixel rectangle is less than or equal to a predetermined threshold and giving the character attribute to the connected black pixel rectangle information, and the characteristics of the black pixels in the connected black pixel rectangle. A means for giving an attribute and a part of the connected black pixel rectangle forming a horizontal line and a vertical line are checked, and the number of horizontal lines or vertical lines existing in the connected black pixel rectangle and the number of intersections of the horizontal line and the vertical line, and , Means for determining a table from the information of the black pixels in the connected black pixel rectangle and giving the table attribute to the connected black pixel rectangle information, horizontal line / vertical line information, and the total number of black pixels in the connected black pixel rectangle Based on the number of connected black pixels detected by the black pixel rectangle information storage means, it is checked whether the target rectangle is a rectangle composed of a plurality of ruled lines, and if so, means for giving a ruled line attribute to the rectangle information, The connected black pixel rectangle position information and the inside of the rectangle Check if the rectangle is image reading noise from the pixel information, and if there is reading noise, delete the information of the connected black pixel rectangle from the rectangle list, and set the graphic attribute for the remaining rectangles to which no attribute is given. Since it is provided with a means for providing, a region where a plurality of ruled lines that are conventionally determined to be a figure and image reading noise can be determined to be a ruled line region and a scanner reading noise is determined to be noise. Since it is deleted from the information, a character area surrounded by ruled lines, which was impossible in the past, can be accurately extracted as a character area without being integrated into the ruled line area, and highly accurate document recognition can be performed. .
【0033】スキャナ読み取りノイズの検出を、データ
の取り込み時にではなく、文字等の属性を判定する際に
行うため、認識させたい文書自体にコピーノイズがある
文書についてもコピーノイズを削除することが可能であ
る。Since the scanner reading noise is detected not when the data is read but when the attribute of the character or the like is determined, the copy noise can be deleted even for the document having the copy noise in the document to be recognized. Is.
【図1】本発明の一実施例における文書認識装置のブロ
ック図FIG. 1 is a block diagram of a document recognition device according to an embodiment of the present invention.
【図2】本発明の一実施例における文書認識装置の機能
ブロック図FIG. 2 is a functional block diagram of a document recognition device according to an embodiment of the present invention.
【図3】本発明の一実施例における画像データ例示図FIG. 3 is an exemplary diagram of image data according to an embodiment of the present invention.
【図4】本発明の一実施例における連結黒画素抽出結果
の例示図FIG. 4 is a view showing an example of a result of extraction of connected black pixels according to an embodiment of the present invention.
【図5】本発明の一実施例における画像データ例示図FIG. 5 is a view showing an example of image data according to an embodiment of the present invention.
【図6】本発明の一実施例における連結黒画素抽出結果
の例示図FIG. 6 is a view showing an example of a result of extraction of connected black pixels according to an embodiment of the present invention.
【図7】本発明の一実施例における文書認識装置のフロ
ーチャートFIG. 7 is a flowchart of a document recognition device according to an embodiment of the present invention.
1 CPU 2 ROM 3 RAM 4 スキャナ 5 キーボード 6 表示装置 7 画像入力部 8 画像縮小部 9 連結黒画素矩形リスト作成部 10 罫線属性付与部 11 文字属性付与部 12 写真属性付与部 13 表属性付与部 14 罫線属性付与部 15 読取ノイズ検出部 16 図形属性付与部 17 認識処理部 1 CPU 2 ROM 3 RAM 4 scanner 5 keyboard 6 display device 7 image input unit 8 image reduction unit 9 linked black pixel rectangle list creation unit 10 ruled line attribute addition unit 11 character attribute addition unit 12 photo attribute addition unit 13 table attribute addition unit 14 Ruled line attribute assigning unit 15 Reading noise detecting unit 16 Graphic attribute assigning unit 17 Recognition processing unit
Claims (1)
像データを縮小して縮小画像データとする手段と、前記
縮小画像データから黒画素が連結している箇所を検出
し、連結黒画素に外接する連結黒画素矩形を求め、縮小
画像データに対応した連結黒画素矩形の座標と連結黒画
素数を連結黒画素矩形情報リストとして格納する連結情
報格納手段と、連結黒画素矩形の縦横比が予め定められ
た閾値以上であるものを罫線と判断し、連結黒画素矩形
情報の1つとして罫線属性を付与する手段と、連結黒画
素矩形の辺の長さが予め定められた閾値以下のものを文
字矩形と判断し連結黒画素矩形情報に文字属性を付与す
る手段と、連結黒画素矩形内の黒画素の特徴から写真属
性を付与する手段と、連結黒画素矩形内に水平線および
垂直線を構成する部分があるか調べ、連結黒画素矩形内
に存在する水平線あるいは垂直線の数と水平線と垂直線
の交点数、および、連結黒画素矩形内の黒画素の情報か
ら表と判断し、連結黒画素矩形情報に表の属性を付与す
る手段と、前記水平線/垂直線情報と連結黒画素矩形内
の全黒画素数と前記連結黒画素矩形情報格納手段で検出
した連結黒画素数を基に対象矩形が複数の罫線から構成
される矩形であるか調べ、そうであれば矩形情報に罫線
の属性を付与する手段と、さらに、連結黒画素矩形位置
情報と矩形内部の黒画素情報よりその矩形が画像読み取
りノイズであるか調べ、読み取りノイズであった場合に
その連結黒画素矩形の情報を矩形リストより削除する手
段と、属性が付与されない残りの矩形に対して図形属性
を付与する手段とを備えることを特徴とする文書認識装
置。1. A means for reducing image data of a binarized character recognition target document to obtain reduced image data, and a portion where black pixels are connected from the reduced image data is detected to detect a connected black. A connection information storage unit that obtains a connection black pixel rectangle circumscribing a pixel and stores the coordinates of the connection black pixel rectangle corresponding to the reduced image data and the number of connection black pixels as a connection black pixel rectangle information list, and a vertical and horizontal direction of the connection black pixel rectangle. Means for determining a ruled line having a ratio equal to or greater than a predetermined threshold value and giving a ruled line attribute as one of the connected black pixel rectangle information, and a side length of the connected black pixel rectangle is equal to or less than a predetermined threshold value. To determine a character rectangle as a character rectangle and to add a character attribute to the connected black pixel rectangle information, a means to add a photo attribute from the characteristics of the black pixels in the connected black pixel rectangle, and a horizontal line and a vertical line in the connected black pixel rectangle. Parts that make up a line Whether there is a horizontal line or a vertical line in the connected black pixel rectangle, the number of intersections of the horizontal line and the vertical line, and the black pixel information in the connected black pixel rectangle. A means for adding a table attribute to the information, the horizontal line / vertical line information, the total number of black pixels in the connected black pixel rectangle, and the number of connected black pixels detected by the connected black pixel rectangle information storage means A method for checking whether the rectangle is composed of a plurality of ruled lines, and if so, adding a ruled line attribute to the rectangle information, and further reading the image from the rectangle based on the connected black pixel rectangle position information and the black pixel information inside the rectangle It is provided with means for checking whether it is noise, deleting the information of the connected black pixel rectangle from the rectangle list when it is read noise, and means for giving a graphic attribute to the remaining rectangles to which no attribute is given. Characteristic Document recognition device that.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP6157209A JPH0822507A (en) | 1994-07-08 | 1994-07-08 | Document recognition device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP6157209A JPH0822507A (en) | 1994-07-08 | 1994-07-08 | Document recognition device |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH0822507A true JPH0822507A (en) | 1996-01-23 |
Family
ID=15644602
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP6157209A Pending JPH0822507A (en) | 1994-07-08 | 1994-07-08 | Document recognition device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0822507A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003216944A (en) * | 2002-01-23 | 2003-07-31 | Fujitsu Ltd | Device for combining image |
JP2009070242A (en) * | 2007-09-14 | 2009-04-02 | Ricoh Co Ltd | Area division method and device, and program |
JP2009246930A (en) * | 2008-03-31 | 2009-10-22 | Sharp Corp | Image determination apparatus, image search apparatus, image search program and recording medium |
CN104469071A (en) * | 2013-09-19 | 2015-03-25 | 株式会社Pfu | Image processing device and image processing method |
-
1994
- 1994-07-08 JP JP6157209A patent/JPH0822507A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003216944A (en) * | 2002-01-23 | 2003-07-31 | Fujitsu Ltd | Device for combining image |
JP2009070242A (en) * | 2007-09-14 | 2009-04-02 | Ricoh Co Ltd | Area division method and device, and program |
JP2009246930A (en) * | 2008-03-31 | 2009-10-22 | Sharp Corp | Image determination apparatus, image search apparatus, image search program and recording medium |
US8385643B2 (en) | 2008-03-31 | 2013-02-26 | Sharp Kabushiki Kaisha | Determination of inputted image to be document or non-document |
CN104469071A (en) * | 2013-09-19 | 2015-03-25 | 株式会社Pfu | Image processing device and image processing method |
CN104469071B (en) * | 2013-09-19 | 2017-12-15 | 株式会社Pfu | Image processing apparatus and image processing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3308032B2 (en) | Skew correction method, skew angle detection method, skew correction device, and skew angle detection device | |
JP3338537B2 (en) | Image tilt detector | |
JP3278471B2 (en) | Area division method | |
US6798906B1 (en) | Image processing apparatus and method including line segment data extraction | |
CN111460355B (en) | Page analysis method and device | |
US5502777A (en) | Method and apparatus for recognizing table and figure having many lateral and longitudinal lines | |
JPH0822507A (en) | Document recognition device | |
JP3215163B2 (en) | Ruled line identification method and area identification method | |
JP3090342B2 (en) | Character string direction discriminator | |
JPH03126181A (en) | Area dividing method for document image | |
JPH07230525A (en) | Method for recognizing ruled line and method for processing table | |
JP3406942B2 (en) | Image processing apparatus and method | |
JP3095470B2 (en) | Character recognition device | |
JP2902097B2 (en) | Information processing device and character recognition device | |
JP2000222577A (en) | Method and device for ruled line processing, and recording medium | |
JPH07141465A (en) | Method for detecting inclination of document image | |
JPH0822510A (en) | Document recognition device | |
JP3220226B2 (en) | Character string direction determination method | |
JP3100825B2 (en) | Line recognition method | |
JP2882056B2 (en) | How to identify specific patterns | |
JP3145264B2 (en) | Character extraction device | |
JPH0721309A (en) | Document recognizing device | |
JP3190794B2 (en) | Character segmentation device | |
JPH0575850A (en) | Picture area discriminating device | |
JP3000480B2 (en) | Character area break detection method |