JPH05128306A - Attribute discriminating method for sentence picture - Google Patents

Attribute discriminating method for sentence picture

Info

Publication number
JPH05128306A
JPH05128306A JP3293104A JP29310491A JPH05128306A JP H05128306 A JPH05128306 A JP H05128306A JP 3293104 A JP3293104 A JP 3293104A JP 29310491 A JP29310491 A JP 29310491A JP H05128306 A JPH05128306 A JP H05128306A
Authority
JP
Japan
Prior art keywords
area
image
black
threshold value
processing
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.)
Granted
Application number
JP3293104A
Other languages
Japanese (ja)
Other versions
JP2786355B2 (en
Inventor
Naohiro Amamoto
直弘 天本
Sadamasa Hirogaki
節正 広垣
Akitoshi Tsukamoto
明利 塚本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP3293104A priority Critical patent/JP2786355B2/en
Publication of JPH05128306A publication Critical patent/JPH05128306A/en
Application granted granted Critical
Publication of JP2786355B2 publication Critical patent/JP2786355B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To classify simply binarized constituting elements into 5 classifications (character (string), graphic, photograph, table, and field separator) regardless of the complication of layout. CONSTITUTION:When a binarized document picture is inputted, the document picture is reduced, and an inclination correction processing S19 is used also for constituting elements in this picture to obtain the number of intra-area black picture element, the aspect ratio and the thickness of the circumscribing rectangle, and rectangularity and the thickness of the area in steps S10, S12, nd S16 respectively, and they are compared with prescribed thresholds to classify constituting elements into 5 classifications, namely, character (string), graphic, photograph, table, and field separator. The contact area between a character (string) and a field separator at the time of reduction of the document picture is subjected to area division and is discriminated after restoration to the original picture by a contact area separating and attribute discrimination processing S18.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ファクシミリ等の通信
機器や文書画像データベース入力装置、光学的文字読取
り装置(OCR)等において、文書画像中の文字領域、
図形領域、写真領域、表領域及びフィールドセパレータ
領域といった構成要素の属性を判別する文書画像の属性
判別方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character area in a document image in a communication device such as a facsimile, a document image database input device, an optical character reader (OCR), and the like.
The present invention relates to a document image attribute discriminating method for discriminating the attributes of constituent elements such as a graphic area, a photograph area, a table area, and a field separator area.

【0002】[0002]

【従来の技術】従来、この種の属性判別方法としては、
例えば特開平03ー126181号公報に記載されるも
のがあった。
2. Description of the Related Art Conventionally, as this kind of attribute discrimination method,
For example, there is one described in Japanese Patent Laid-Open No. 03-126181.

【0003】この文書画像の属性判別方法では、イメー
ジセンサにより、入力文書画像を走査して多値画像デー
タを読取る。読取られた多値画像データは、最適2値化
処理により、該多値画像データをその特徴及び性質を損
なうことなく2値画像データに変換される。即ち、この
最適2値化処理では、多値画像データを入力し、文字・
フィールドセパレータ領域は領域分離、図表・写真領域
はディザ処理(網点処理)を施し、それら両者の画像を
合成する。
In this document image attribute discrimination method, an image sensor scans an input document image to read multivalued image data. The read multi-valued image data is converted into the binary image data by the optimum binarization process without impairing the characteristics and properties of the multi-valued image data. That is, in this optimal binarization process, multi-valued image data is input and characters
The field separator area is subjected to area separation, and the chart / photo area is subjected to dither processing (halftone dot processing) to synthesize the images of both.

【0004】この最適2値化処理により2値化された画
像は、領域分割によって複数のブロックに分割された
後、属性判別処理が行われる。属性判別処理では、領域
分割によって得られた各ブロックに対し、その特徴量と
して縦横比、面積、及び黒白反転密度(ブロック中での
黒白反転回数/面積)を算出し、これに基づいて領域を
フィールドセパレータ、写真、図形、及びその他の文字
の各領域に分類する。
The image binarized by this optimal binarization processing is divided into a plurality of blocks by area division, and then attribute discrimination processing is performed. In the attribute discrimination processing, the aspect ratio, the area, and the black / white inversion density (the number of black / white inversions in the block / area) are calculated as the feature amount for each block obtained by the area division, and the area is determined based on this. Classify into field separators, pictures, graphics, and other areas of text.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、従来の
属性判別方法では、次のような課題があった。
However, the conventional attribute discrimination method has the following problems.

【0006】(a)従来の属性判別方法では、最適2値
化処理画像を属性判別の処理対象としているため、前処
理として複雑な最適2値化処理を行うことが必要であ
る。しかも、図と表の判別を行っていないため、文書画
像中の図と表を分離することができないという問題点が
あった。
(A) In the conventional attribute discriminating method, since the optimum binarized image is the object of attribute discriminating processing, it is necessary to perform complicated optimal binarizing processing as preprocessing. Moreover, since the figure and the table are not discriminated, there is a problem that the figure and the table in the document image cannot be separated.

【0007】(b)前記(a)の問題点を解決するた
め、本願出願人は、先に特願平03ー082704号明
細書において属性判別方法を提案した。この提案では、
文書画像を単純2値化して2値化画像(原画像)を作成
し、さらに該2値化画像全体を縮小した後、該縮小画像
を構成要素に領域分割し、該分割された領域に対して、
該縮小画像領域内の黒画素数、領域外接矩形の縦横比、
領域の厚さ、及び領域の矩形度をそれぞれ求めてそれら
に対する閾値と比較する処理と、傾き補正処理により、
前記縮小画像領域の外接矩形の大きさに対する前記縮小
画像領域内での最長黒ランの長さの比率を求め、それに
対応する閾値と比較する処理と、前記縮小画像領域内の
黒白反転密度を求め、それに対応する閾値と比較する処
理とを実行して前記縮小画像領域を文字(列)、図形、
写真、表、及びフィールドセパレータの各領域に判別し
ている。
(B) In order to solve the problem of (a), the applicant of the present application previously proposed an attribute discrimination method in Japanese Patent Application No. 03-082704. In this proposal,
The document image is simply binarized to create a binarized image (original image), the entire binarized image is further reduced, the reduced image is divided into regions, and the divided region is divided into regions. hand,
The number of black pixels in the reduced image area, the aspect ratio of a rectangle circumscribing the area,
By the process of obtaining the thickness of the region and the rectangularity of the region and comparing them with the thresholds for them, and the inclination correction process,
Obtaining the ratio of the length of the longest black run in the reduced image area to the size of the circumscribed rectangle of the reduced image area, and comparing it with a corresponding threshold value, and obtaining the black and white inversion density in the reduced image area. , A process of comparing with a threshold value corresponding to the reduced image area for a character (column), a figure,
The areas of the photograph, table, and field separator are identified.

【0008】ところが、この属性判別方法では、縮小画
像について領域分割及び属性判別を行っているため、文
書画像の縮小時に、図4に示した例のように黒丸で表わ
された文字と線で表されたフィールドセパレータが接触
してしまった場合、正しく領域分割が出来ないため、属
性判別を誤ってしまうという問題点があった。
However, in this attribute determination method, since the reduced image is divided into areas and the attribute is determined, when the document image is reduced, characters and lines represented by black circles are used as in the example shown in FIG. When the displayed field separators come into contact with each other, the regions cannot be correctly divided, and the attribute determination is erroneous.

【0009】本発明は、前記従来技術が持っていた課題
として、文書画像の縮小時に文字(列)とフィールドセ
パレータが接触した際、精度よく属性を判別することが
困難な点について解決した文書画像の属性判別方法を提
供するものである。
The present invention solves the problem that the above-mentioned conventional art has with respect to the difficulty of accurately determining the attribute when a character (column) and a field separator come into contact with each other when the document image is reduced. It provides a method of discriminating the attributes of.

【0010】[0010]

【課題を解決するための手段】本発明では前記課題を解
決するために、文書画像を単純2値化して2値化画像
(原画像)を作成し、さらに該2値化画像全体を縮小し
た後、該縮小画像を構成要素に領域分割し、該縮小画像
領域内の黒画素数、領域外接矩形の縦横比、領域の厚
さ、及び領域の矩形度をそれぞれ求めてそれらに対する
閾値と比較する処理と、前記縮小画像領域内で所定の閾
値より長い黒ランが存在するか否か判定する処理と、前
記縮小画像領域に該当する原画像の領域を求め、該原画
像の領域内における黒画素が存在しないライン及び黒画
素が少なくとも1つ存在するラインを求めることにより
原画像の領域を分割した後、該分割した原画像の領域に
該当する前記縮小画像の領域を求める処理と、該縮小画
像領域内の最長黒ランの長さ及び領域の厚さを求め、そ
れに対応する閾値と比較する処理と、傾き補正処理によ
り、前記縮小画像領域の外接矩形の大きさに対する前記
縮小画像領域内での最長黒ランの長さの比率を求め、そ
れに対応する閾値と比較する処理と、前記縮小画像領域
内の黒白反転密度を求め、それに対応する閾値と比較す
る処理とを実行して前記縮小画像領域を文字(列)、図
形、写真、表、及びフィールドセパレータの各領域に判
別するようにしている。
In order to solve the above-mentioned problems, the present invention simply binarizes a document image to create a binarized image (original image), and further reduces the entire binarized image. After that, the reduced image is divided into components, and the number of black pixels in the reduced image region, the aspect ratio of the rectangle circumscribing the region, the thickness of the region, and the rectangularity of the region are obtained and compared with the thresholds for them. Processing, determining whether or not there is a black run longer than a predetermined threshold value in the reduced image area, obtaining an area of the original image corresponding to the reduced image area, and determining black pixels in the area of the original image. A region in which the original image is divided by obtaining a line in which no pixel exists and a line in which at least one black pixel exists, and a process for obtaining the reduced image region corresponding to the divided original image region; Longest black run in the area The length and the thickness of the area are obtained, and by the processing of comparing with the threshold value corresponding thereto and the inclination correction processing, the length of the longest black run in the reduced image area with respect to the size of the circumscribed rectangle of the reduced image area is calculated. A process of obtaining a ratio and comparing it with a threshold value corresponding thereto and a process of obtaining a black-white inversion density in the reduced image region and comparing it with a threshold value corresponding thereto are performed to perform the reduction image region with a character (string) and a figure. , Photo, table, and field separator areas are discriminated.

【0011】[0011]

【作用】本発明によれば、以上のように文書画像の属性
判別方法を構成したので、縮小画像領域内に所定の閾値
より長い黒ランが存在するか否か判定する処理により、
前記画像の縮小時に、文字(列)とフィールドセパレー
タが接触し同一の領域となっているか否かを判定する。
該処理で文字(列)とフィールドセパレータが接触し同
一領域となっていると判定した場合、該領域に該当する
原画像の領域を求め、該原画像の領域内における黒画素
が存在しないライン及び黒画素が少なくとも1つ存在す
るラインを求めることにより原画像の領域を分割し、さ
らに該分割した原画像の領域に該当する縮小画像の領域
を求める。その後、該縮小画像領域内の最長黒ランの長
さ及び領域の厚さを求め、それに対応する閾値と比較す
る処理を実行することにより、接触領域の文字(列)と
フィールドセパレータ領域を判別することができる。従
って、前記課題を解決できるのである。
According to the present invention, since the method of discriminating the attribute of a document image is configured as described above, by the process of determining whether or not there is a black run longer than a predetermined threshold value in the reduced image area,
When the image is reduced, it is determined whether or not the character (row) and the field separator are in contact with each other to form the same area.
When it is determined in the processing that the character (string) and the field separator are in contact with each other and are in the same area, an area of the original image corresponding to the area is obtained, and a line in which no black pixel exists in the area of the original image and The area of the original image is divided by obtaining the line in which at least one black pixel exists, and the area of the reduced image corresponding to the divided area of the original image is obtained. After that, the length of the longest black run and the thickness of the area in the reduced image area are obtained, and a process of comparing with the corresponding threshold value is executed to determine the character (row) of the contact area and the field separator area. be able to. Therefore, the above problem can be solved.

【0012】[0012]

【実施例】図5は、本発明の実施例を示すもので、画像
処理の全体の処理内容を示す図である。まず、前処理と
して、単純2値化処理1では、イメージセンサ等によっ
て入力文書画像が走査され、適当な閾値で単純2値化さ
れて2値化画像が生成される。該2値化画像は原画像メ
モリ2に格納されるとともに画像縮小処理3へ送られ
る。画像縮小処理3では、該原画像を縮小し縮小画像を
生成し、領域分割処理5にするとともに、縮小画像メモ
リ4に格納する。
FIG. 5 shows an embodiment of the present invention and is a diagram showing the overall processing contents of image processing. First, as preprocessing, in simple binarization processing 1, an input document image is scanned by an image sensor or the like and binarized by a simple threshold value to generate a binarized image. The binarized image is stored in the original image memory 2 and is sent to the image reduction processing 3. In the image reduction processing 3, the original image is reduced to generate a reduced image, and the area division processing 5 is performed, and the image is stored in the reduced image memory 4.

【0013】領域分割処理5では、縮小画像を入力し、
それを文字(列)、図、表、写真、及びフィールドセパ
レータ等の構成要素に分割して分割領域6を生成する。
この構成要素に領域分割された分割領域6のデータは、
本実施例の特徴である属性判別処理7に送られる。
In the area division processing 5, a reduced image is input,
The divided area 6 is generated by dividing it into constituent elements such as characters (rows), figures, tables, photographs, and field separators.
The data of the divided area 6 divided into these constituent elements is
It is sent to the attribute discrimination processing 7, which is a feature of this embodiment.

【0014】前処理の領域分割処理5では、本願出願人
による前記特開平03ー126181号公報記載した分
割方法などを用いることができる。該分割方法は、横方
向及び縦方向の走査を2回繰り返して行い、黒画素の存
在しない行及び列で画像を分割し、文字領域のものに対
してはそれらを統合することによって構成要素の分割領
域6を得るようにしている。
In the area division processing 5 of the pre-processing, the division method described in the above-mentioned JP-A-03-126181 by the applicant of the present application can be used. The division method repeats scanning in the horizontal and vertical directions twice, divides an image into rows and columns in which black pixels do not exist, and integrates those in the character area by combining them. The divided area 6 is obtained.

【0015】このような分割処理が終わると、属性判別
処理7が行われる。この属性判別処理7では、前処理で
得られた分割領域6に対し、属性の判別を行い、各領域
の属性情報8を出力する。この属性判別処理7の処理内
容を図1に示す。
When such division processing is completed, attribute determination processing 7 is performed. In the attribute discrimination processing 7, the attribute discrimination is performed for the divided area 6 obtained in the pre-processing, and the attribute information 8 of each area is output. The processing content of this attribute discrimination processing 7 is shown in FIG.

【0016】図1〜図3は、本発明の実施例の属性判別
方法を用いた属性判別処理のフローチャートである。な
お、図中のS10〜S26,S30〜S40,S50〜
S58は、各処理のステップを示す。
1 to 3 are flow charts of the attribute discriminating process using the attribute discriminating method of the embodiment of the present invention. In addition, S10-S26, S30-S40, S50- in the figure
S58 indicates a step of each process.

【0017】この属性判別処理では、分割領域6のデー
タを入力すると、領域内の黒画素数を数え、この黒画素
数が閾値T1以下であるか否かを判定する(S10)。
黒画素数が閾値T1以下であれば、この領域を「ゴミ」
領域と判定する(S11)。ここでいう「ゴミ」とは、
実際の文書に付着した汚れや、文書画像入力時にスキャ
ナ面に付着していた汚れによる影等の、文書内容ではな
い黒画素塊である。このような黒画素塊が存在すると、
誤判定を引き起こすおそれがあるので、この「ゴミ」領
域を判別しておく。
In this attribute discrimination process, when the data of the divided area 6 is input, the number of black pixels in the area is counted and it is determined whether or not the number of black pixels is less than or equal to the threshold T1 (S10).
If the number of black pixels is less than or equal to the threshold T1, this area is "dust".
The area is determined (S11). "Trash" here means
It is a black pixel block that is not the content of the document, such as a stain attached to an actual document or a shadow caused by a stain attached to the scanner surface when a document image is input. When such a black pixel block exists,
This “dust” area is identified because it may cause an erroneous determination.

【0018】ステップS10において、黒画素数が閾値
T1よりも大きければ、ステップS12において、領域
外接矩形の縦横比を求め、この縦横比が閾値T2よりも
大きいか否か、さらに該領域外接矩形の厚さ(即ち、領
域の高さと幅の内の小さい方をいう)が閾値T3以下で
あるか否かを判定する。縦横比が閾値T2以上で、かつ
厚さが閾値T3以下であれば、この領域をフィールドセ
パレータ領域と判定する(S13)。
If the number of black pixels is larger than the threshold value T1 in step S10, the aspect ratio of the area circumscribed rectangle is obtained in step S12, and whether the aspect ratio is larger than the threshold value T2 or not is further determined. It is determined whether or not the thickness (that is, the smaller one of the height and the width of the region) is equal to or smaller than the threshold value T3. If the aspect ratio is greater than or equal to the threshold value T2 and the thickness is less than or equal to the threshold value T3, this area is determined to be the field separator area (S13).

【0019】ステップS12において判定結果がノーの
場合、領域の厚さが閾値T4以下であるか否かを判定
し、閾値T4以下であれば、文字領域(文字列)と判定
する(S15)。ステップS14でノーの場合、領域の
矩形度を次式より求め、その矩形度が閾値T5以上か否
か、さらに該領域の厚さが閾値T6以上か否かを判定す
る(S16)。
If the determination result in step S12 is NO, it is determined whether or not the thickness of the area is less than or equal to the threshold value T4. If the thickness is less than or equal to the threshold value T4, it is determined as a character area (character string) (S15). In the case of NO in step S14, the rectangularity of the area is obtained from the following equation, and it is determined whether the rectangularity is equal to or greater than the threshold value T5, and whether the thickness of the area is equal to or greater than the threshold value T6 (S16).

【0020】矩形度=領域内の黒画素数/領域の外接矩
形の面積(縦画素数×横画素数)ステップS16におい
て、領域の矩形度が閾値T5以上で、かつ厚さが閾値T
6以上であれば、この領域を写真領域と判定し(S1
7)、ノーの時にはステップS18へ進む。
Squareness = number of black pixels in area / area of circumscribed rectangle of area (number of vertical pixels × number of horizontal pixels) In step S16, the rectangularity of the area is equal to or greater than threshold value T5 and the thickness is equal to threshold value T.
If it is 6 or more, this area is determined to be a photograph area (S1
7) If NO, proceed to step S18.

【0021】ステップS18における接触領域分離及び
属性判別処理の詳細なフローチャートを図2に示す。図
2において、まず領域内に閾値T11よりも黒画素が長
く連続する黒ランが存在するか否かを判定する(S30
〜S32)。黒ランが縦横どちらの方向にも存在しな
い、あるいは縦横両方向に存在するときは、図1のステ
ップS19の傾き補正処理以降を行う。黒ランが横方向
にのみ存在する場合は、領域の外接矩形に該当する原画
像の矩形領域を求め(S33)、原画像の矩形領域の縦
方向の両端の値をそれぞれys,yeとする。ステップ
S34で、該原画像の矩形領域について横分割処理を行
い、実行後分割があった場合、分割された全ての領域に
該当する縮小画像の矩形領域を求める(S35,S3
6)。横分割処理において、領域分割されなかった場
合、横分割処理前の矩形領域に該当する縮小画像の矩形
領域をもとめ、図1のステップS19以降の処理を行
う。
FIG. 2 shows a detailed flowchart of the contact area separation and attribute discrimination processing in step S18. In FIG. 2, first, it is determined whether or not there is a continuous black run in which a black pixel is longer than the threshold value T11 in the area (S30).
~ S32). When the black run does not exist in both the vertical and horizontal directions or exists in both the vertical and horizontal directions, the inclination correction process of step S19 of FIG. 1 and subsequent steps are performed. When the black run exists only in the horizontal direction, the rectangular area of the original image corresponding to the circumscribed rectangle of the area is obtained (S33), and the values at both ends in the vertical direction of the rectangular area of the original image are set to ys and ye, respectively. In step S34, the horizontal division processing is performed on the rectangular area of the original image, and if there is post-execution division, the rectangular area of the reduced image corresponding to all the divided areas is obtained (S35, S3).
6). If the area is not divided in the horizontal division processing, the rectangular area of the reduced image corresponding to the rectangular area before the horizontal division processing is obtained, and the processing from step S19 onward in FIG. 1 is performed.

【0022】横分割処理において、領域分割された場合
は各領域についてその領域内の最長黒ランの長さを求
め、最長黒ランの長さが閾値T12以上で且つ領域の厚
さが閾値T3以下であれば(S37)、この領域をフィ
ールドセパレータと判定し(S38)、それ以外のとき
は文字領域と判定する(S39)。
In the horizontal division processing, when the area is divided, the length of the longest black run in each area is obtained, and the length of the longest black run is equal to or larger than the threshold value T12 and the thickness of the area is equal to or smaller than the threshold value T3. If so (S37), this area is determined to be a field separator (S38), and otherwise it is determined to be a character area (S39).

【0023】図1のステップS32で黒ランが縦方向に
のみ存在する場合は、領域の外接矩形に該当する原画像
の矩形領域を求め(S40)、原画像の矩形領域の横方
向の両端の値をそれぞれxs,xeとする。ステップS
41で、該原画像の矩形領域について縦分割処理を行
い、実行後分割があった場合、分割された全ての領域に
該当する縮小画像の矩形領域を求める(S36)。縦分
割処理において、領域分割されなかった場合、縦分割処
理前の矩形領域に該当する縮小画像の矩形領域をもと
め、図1のステップS19以降の処理を行う。以後は黒
ランが横方向にのみ存在する場合と同様な処理を行う。
When the black run exists only in the vertical direction in step S32 of FIG. 1, the rectangular area of the original image corresponding to the circumscribed rectangle of the area is obtained (S40), and the rectangular areas of the rectangular area of the original image are aligned in the horizontal direction. Let the values be xs and xe, respectively. Step S
In step 41, vertical division processing is performed on the rectangular area of the original image, and if there is post-execution division, the rectangular area of the reduced image corresponding to all the divided areas is obtained (S36). If the area is not divided in the vertical division processing, the rectangular area of the reduced image corresponding to the rectangular area before the vertical division processing is obtained, and the processing from step S19 onward in FIG. 1 is performed. After that, the same processing as when the black run exists only in the horizontal direction is performed.

【0024】図3は横分割処理を詳細に示すフローチャ
ートである。まずステップS50で分割数を0に初期化
し、原画像を外接矩形内部について横方向に走査する。
走査ラインはy値のysからyeまで行う(S51)。
ステップS53で走査中のラインに黒画素が1つも存在
しなければ、1つ前のラインに黒画素が存在するか否か
を判定し(S54)、存在すれば走査中のラインを新し
くyeと設定して分割数を1つ増やす(S55,S5
6)。次に、ステップS53で走査中のラインに黒画素
が1つでも存在する場合は、1つ前のラインに黒画素が
存在するか否かを判定し(S57)、黒画素が1つも存
在しなければ走査中のラインを新しくysと設定する
(S58)。以上の走査を外接矩形の最終ラインまで行
う。なお、縦分割の処理も横分割の処理と同様であり、
ye,ysをそれぞれxe,xsに、横方向の走査を縦
方向の走査に変更すれば同様の処理となる。
FIG. 3 is a flow chart showing the horizontal division processing in detail. First, in step S50, the number of divisions is initialized to 0, and the original image is horizontally scanned inside the circumscribed rectangle.
The scanning line is performed from y values ys to ye (S51).
If there is no black pixel in the scanning line in step S53, it is determined whether or not there is a black pixel in the previous line (S54), and if it exists, the scanning line is newly set to yes. Set and increase the number of divisions by one (S55, S5
6). Next, if there is at least one black pixel in the scanning line in step S53, it is determined whether or not there is a black pixel in the previous line (S57), and there is even one black pixel. If not, the scanning line is newly set to ys (S58). The above scanning is performed up to the final line of the circumscribed rectangle. Note that the vertical division processing is similar to the horizontal division processing,
The same processing is performed by changing ye and ys to xe and xs and changing the horizontal scanning to the vertical scanning.

【0025】図1のステップS19の傾き補正処理で
は、行方向最長黒ランの長さと列方向最長黒ランの長さ
を求め、得られた行方向最長黒ランの長さと外接矩形の
幅との比が閾値T7以上か否かを判定する(S20)。
閾値T7以上の時には、列方向最長黒ランの長さと外接
矩形の高さとの比が閾値T8以上であるか否かを判定し
(S21)、閾値T8以上であれば、この領域を表領域
と判定する(S22)。ステップS20及びS21でノ
ーの場合、ステップS23に進む。
In the inclination correction process of step S19 of FIG. 1, the length of the longest black run in the row direction and the length of the longest black run in the column direction are obtained, and the obtained length of the longest black run in the row direction and the width of the circumscribed rectangle are obtained. It is determined whether the ratio is greater than or equal to the threshold value T7 (S20).
When the ratio is equal to or greater than the threshold T7, it is determined whether or not the ratio of the length of the longest black run in the column direction to the height of the circumscribed rectangle is equal to or greater than the threshold T8 (S21). A determination is made (S22). In the case of NO in steps S20 and S21, the process proceeds to step S23.

【0026】ステップS23では、領域内での黒白反転
回数(縦方向及び横方向の黒白反転回数の和)の外接矩
形面積に対する比を求め、その面積比が閾値T9よりも
小さいか否かを判定し、閾値T9未満であれば図形領域
と判定する(S24)。また、ステップS23がノーの
場合、ステップS25において、領域の矩形度が閾値T
10未満か否かを判定し、閾値T10以上であれば、ス
テップS26において、その他の文字領域(独立文字)
と判定する。
In step S23, the ratio of the number of black / white inversions in the area (the sum of the number of black / white inversions in the vertical and horizontal directions) to the circumscribed rectangular area is obtained, and it is determined whether or not the area ratio is smaller than the threshold value T9. If it is less than the threshold value T9, it is determined to be a graphic area (S24). If step S23 is NO, the rectangularity of the area is equal to the threshold value T in step S25.
It is determined whether it is less than 10, and if it is the threshold value T10 or more, in step S26, another character area (independent character)
To determine.

【0027】図1及び図2の属性判別処理における閾値
T1〜T13は、次のようにして設定される。例えば、
400dpiの原文書画像の8×8画素の論理和演算の
結果を1画素に縮小した50dpiの文書画像を領域分
割して得られた各領域について、属性を判別する際の閾
値T1〜T13としては、「ゴミ」の大きさを4画素以
下(T1=4)、フィールドセパレータの縦横比を40
以上(T2=40)、厚さ4mm以下(T3=4)と定
義する。さらに、文字列の厚さは、一般的な文書の本文
で用いられている文字の大きさを考えて5mm以下(T
4=5)とするのが適当である。
Thresholds T1 to T13 in the attribute discrimination processing of FIGS. 1 and 2 are set as follows. For example,
For each region obtained by dividing the 50 dpi document image obtained by reducing the result of the OR operation of 8 × 8 pixels of the 400 dpi original document image into one pixel, , The size of “dust” is 4 pixels or less (T1 = 4), and the aspect ratio of the field separator is 40.
The above is defined (T2 = 40) and the thickness is 4 mm or less (T3 = 4). Further, the thickness of the character string is 5 mm or less (T in consideration of the size of characters used in the body of a general document).
4 = 5) is suitable.

【0028】また、その他の閾値を求めるため、実際の
前記縮小文書画像において独立文字、図形、写真、及び
表の領域における矩形度、縦横最長黒ランの外接矩形の
高さ、幅に対する比、及び黒白反転密度の分布を調査し
た結果を図6〜図8に示す。
Further, in order to obtain other threshold values, the degree of rectangularity in the area of independent characters, figures, photographs, and tables in the actual reduced document image, the height of the circumscribing rectangle of the longest vertical black and horizontal run, the ratio to the width, and The results of investigating the distribution of black and white inversion density are shown in FIGS.

【0029】図6は、領域の矩形度の分布を各属性毎に
表した図であるが、写真はほとんど矩形度0.6以上で
あるため、T5=0.6とするのが適当である。また、
T6は1cm程度とするのが適当である。
FIG. 6 is a diagram showing the distribution of the rectangularity of the area for each attribute. Since most photographs have a rectangularity of 0.6 or more, it is appropriate to set T5 = 0.6. .. Also,
It is suitable that T6 is about 1 cm.

【0030】図7は、各領域において、後述する傾き補
正処理によって得られたx方向(横方向)、及びy方向
(縦方向)に最も長い黒ランの長さの、その領域の外接
矩形の大きさに対する比の分布を各属性毎に表した図で
ある。X座標は行方向最長黒ランの長さの外接矩形の幅
に対する比、Y座標は列方向最長黒ランの長さの外接矩
形の高さに対する比である。図中、tは表領域、cは文
字領域、fは図形領域である。この図7より、表領域に
おいては行方向及び列方向共に大きな値になっており、
閾値T7=0.95、T8=0.95とするのが適当で
ある。
FIG. 7 shows a rectangle circumscribing a region having the longest black run length in the x-direction (horizontal direction) and the y-direction (longitudinal direction) obtained by the inclination correction process described later in each region. It is the figure which represented distribution of the ratio with respect to a size for every attribute. The X coordinate is the ratio of the length of the longest black run in the row direction to the width of the circumscribed rectangle, and the Y coordinate is the ratio of the length of the longest black run in the column direction to the height of the circumscribed rectangle. In the figure, t is a table area, c is a character area, and f is a graphic area. From FIG. 7, in the table area, both the row direction and the column direction have large values,
It is appropriate to set the threshold values T7 = 0.95 and T8 = 0.95.

【0031】図8は、独立文字領域と図形領域における
矩形度と黒白反転密度の値の分布図である。X座標は領
域の矩形度、Y座標は黒白反転密度である。図中、fは
図形領域、cは文字領域である。この図8より、閾値T
9=0.2、T10=0.3とするのが適当である。
FIG. 8 is a distribution diagram of the values of the rectangularity and the black and white inversion density in the independent character area and the graphic area. The X coordinate is the rectangularity of the area, and the Y coordinate is the black and white inversion density. In the figure, f is a graphic area and c is a character area. From this FIG.
It is appropriate that 9 = 0.2 and T10 = 0.3.

【0032】図2における黒ランの長さの閾値及び最長
黒ランの長さの閾値T11,T12については、文字の
大きさを考慮し、それぞれ32画素,40画素程度とす
るのが適当である。また、領域の厚さの閾値T13につ
いてはT3と同様に厚さ4mm以下(T13=4)と定
義する。
The black run length threshold value and the longest black run length threshold value T11, T12 in FIG. 2 are appropriately 32 pixels and 40 pixels, respectively, in consideration of the character size. .. Further, the threshold value T13 of the thickness of the region is defined as a thickness of 4 mm or less (T13 = 4) as in T3.

【0033】図9の(a)、(b)は、図1における傾
き補正処理(S19)の概念を説明する図である。水平
な状態で読込んだ文書画像では、文書中の水平線を表す
黒画素数は同一行上に並ぶが、傾いた状態で読込んだ文
書画像では、傾き具合に応じて水平線の黒画素数が隣接
する行へ移行してゆく。そこで、傾き補正処理では、こ
のように移行している黒画素数を同一行上に並べるた
め、画像の領域内部分における幾つかの連続する行を、
列毎に論理和を取ることにより得られる1行に置き換え
る縮小操作を行う。この処理では1行に置き換えられる
行数は、補正を行う傾き角と領域の大きさによって異な
るが、例えば傾き許容角を1度程度とすると、次式で算
出されるものとするのが適当である。 1行に置き換える行数=(領域外接矩形の幅)×sin
1° この処理によって得られる画像において、最も長い行方
向の黒ランの長さを、この領域における行方向の最長黒
ランの長さとする。
9A and 9B are views for explaining the concept of the inclination correction process (S19) in FIG. In a document image read in a horizontal state, the number of black pixels representing a horizontal line in the document is lined up on the same line, but in a document image read in a tilted state, the number of black pixels in the horizontal line depends on the degree of inclination. It moves to the adjacent line. Therefore, in the inclination correction process, since the numbers of black pixels thus shifted are arranged on the same line, several consecutive lines in the image area are
A reduction operation is performed to replace each row with one row obtained by taking the logical sum. In this process, the number of lines that can be replaced with one line differs depending on the tilt angle to be corrected and the size of the area. For example, assuming that the tilt allowable angle is about 1 degree, it is appropriate to be calculated by the following formula. is there. Number of lines to be replaced with one line = (width of area circumscribed rectangle) × sin
1 ° In the image obtained by this processing, the length of the longest black run in the row direction is the length of the longest black run in the row direction in this region.

【0034】列方向にも同様の処理を行う。この時の1
列に置き換えられる列数は、前記同様、次式で算出され
るものとするのが適当である。 1列に置き換える行数=(領域外接矩形の高さ)×si
n1° この処理によって得られる画像において、最も長い列方
向の黒ランの長さを、この領域における列方向の最長黒
ランの長さとする。これらの行方向及び列方向の縮小操
作は、同時に行うこともできる。
Similar processing is performed in the column direction. 1 at this time
It is appropriate that the number of columns to be replaced with columns is calculated by the following equation, as described above. Number of rows replaced in one column = (height of rectangle circumscribing area) × si
n1 ° In the image obtained by this processing, the length of the longest black run in the column direction is the length of the longest black run in the column direction in this region. These row-direction and column-direction reduction operations can be performed simultaneously.

【0035】なお、本発明は上記実施例に限定されず、
例えば図1の属性判別処理において、ステップS10,
S11を省略したり、或は接触領域分離及び属性判別処
理S18を傾き補正処理S19の後で実行するなど、種
々の変形が可能である。
The present invention is not limited to the above embodiment,
For example, in the attribute determination process of FIG.
Various modifications are possible, such as omitting S11 or executing contact area separation and attribute determination processing S18 after inclination correction processing S19.

【0036】[0036]

【発明の効果】以上詳細に説明したように、本発明によ
れば、文書画像の縮小時に生じる文字(列)とフィール
ドセパレータが接触した領域について、原画像に戻して
領域の再分割、属性判別を行うため容易にしかも精度よ
く判別することができる。
As described above in detail, according to the present invention, an area in which a character (column) generated when a document image is reduced and a field separator are in contact with each other is returned to the original image and the area is redivided and the attribute is discriminated. Therefore, it can be easily and accurately determined.

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

【図1】本発明の実施例の属性判別方法を示す属性判別
処理の内容図である。
FIG. 1 is a content diagram of attribute discrimination processing showing an attribute discrimination method according to an embodiment of the present invention.

【図2】図1中のステップS18の処理内容を示す図で
ある。
FIG. 2 is a diagram showing the processing content of step S18 in FIG.

【図3】図2中のステップS34の処理内容を示す図で
ある。
FIG. 3 is a diagram showing the processing contents of step S34 in FIG.

【図4】縮小画像の一例を示す図である。FIG. 4 is a diagram showing an example of a reduced image.

【図5】本発明の実施例を示す画像処理の全体の処理内
容図である。
FIG. 5 is an overall processing content diagram of image processing showing an embodiment of the present invention.

【図6】矩形度分布図である。FIG. 6 is a rectangularity distribution diagram.

【図7】外接矩形比分布図である。FIG. 7 is a circumscribed rectangle ratio distribution diagram.

【図8】矩形度、黒白反転密度分布図である。FIG. 8 is a distribution diagram of rectangularity and black / white inversion density.

【図9】図1中の傾き補正処理の説明図である。9 is an explanatory diagram of a tilt correction process in FIG.

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

1 単純2値化処理 2 原画像メモリ 3 画像縮小処理 4 縮小画像メモリ 5 領域分割処理 6 領域分割データ 7 属性判別処理 8 属性情報 1 simple binarization processing 2 original image memory 3 image reduction processing 4 reduced image memory 5 area division processing 6 area division data 7 attribute discrimination processing 8 attribute information

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 文書画像を単純2値化して2値化画像
(原画像)を作成し、さらに該2値化画像全体を縮小し
た後、該縮小画像を構成要素に領域分割し、該分割され
た領域に対して属性の判別を行う文書画像の属性判別方
法において、 前記縮小画像領域内の黒画素数、領域外接矩形の縦横
比、領域の厚さ、及び領域の矩形度をそれぞれ求めてそ
れらに対する閾値と比較する処理と、 前記縮小画像領域内で所定の閾値より長い黒ランが存在
するか否か判定する処理と、 前記縮小画像領域に該当する原画像の領域を求め、該原
画像の領域内における黒画素が存在しないライン及び黒
画素が少なくとも1つ存在するラインを求めることによ
り原画像の領域を分割した後、該分割した原画像の領域
に該当する前記縮小画像の領域を求める処理と、 該縮小画像領域内の最長黒ランの長さ及び領域の厚さを
求め、それに対応する閾値と比較する処理と、 傾き補正処理により、前記縮小画像領域の外接矩形の大
きさに対する前記縮小画像領域内での最長黒ランの長さ
の比率を求め、それに対応する閾値と比較する処理と、 前記縮小画像領域内の黒白反転密度を求め、それに対応
する閾値と比較するの処理とを、 実行して前記縮小画像領域を文字(列)、図形、写真、
表、及びフィールドセパレータの各領域に判別すること
を特徴とする文書画像の属性判別方法。
1. A document image is simply binarized to create a binarized image (original image), the entire binarized image is further reduced, and then the reduced image is segmented into constituent elements, and the segmentation is performed. In the method of discriminating the attribute of the document image for discriminating the attribute of the region, the number of black pixels in the reduced image region, the aspect ratio of the rectangle circumscribing the region, the thickness of the region, and the rectangularity of the region are respectively obtained. A process of comparing with a threshold value for them, a process of determining whether or not there is a black run longer than a predetermined threshold value in the reduced image area, an area of the original image corresponding to the reduced image area, and the original image After dividing the area of the original image by obtaining a line in which no black pixel exists and a line in which at least one black pixel exists, the area of the reduced image corresponding to the divided original image area is obtained. Processing and the By calculating the length of the longest black run in the small image area and the thickness of the area and comparing it with the corresponding threshold value, and the inclination correction processing, the inside of the reduced image area with respect to the size of the circumscribed rectangle of the reduced image area The process of obtaining the ratio of the length of the longest black run in step S1, and comparing it with the corresponding threshold value, and the process of obtaining the black-white inversion density in the reduced image area and comparing it with the corresponding threshold value are performed. Characters (rows), figures, photographs,
A method of discriminating an attribute of a document image, characterized by discriminating each area of a table and a field separator.
JP3293104A 1991-11-08 1991-11-08 How to determine the attributes of text images Expired - Lifetime JP2786355B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3293104A JP2786355B2 (en) 1991-11-08 1991-11-08 How to determine the attributes of text images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3293104A JP2786355B2 (en) 1991-11-08 1991-11-08 How to determine the attributes of text images

Publications (2)

Publication Number Publication Date
JPH05128306A true JPH05128306A (en) 1993-05-25
JP2786355B2 JP2786355B2 (en) 1998-08-13

Family

ID=17790481

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3293104A Expired - Lifetime JP2786355B2 (en) 1991-11-08 1991-11-08 How to determine the attributes of text images

Country Status (1)

Country Link
JP (1) JP2786355B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07105310A (en) * 1993-10-05 1995-04-21 Ricoh Co Ltd Method for detecting tilt of picture and method for processing table
JPH07192086A (en) * 1993-12-27 1995-07-28 Ricoh Co Ltd Picture inclination detection method
JPH10154191A (en) * 1996-11-26 1998-06-09 Nec Corp Business form identification method and device, and medium recording business form identification program
KR101522842B1 (en) * 2008-07-10 2015-06-25 인텔렉추얼디스커버리 주식회사 Augmented reality system having simple frame marker for recognizing image and character, and apparatus thereof, and method of implementing augmented reality using the said system or the said apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07105310A (en) * 1993-10-05 1995-04-21 Ricoh Co Ltd Method for detecting tilt of picture and method for processing table
JPH07192086A (en) * 1993-12-27 1995-07-28 Ricoh Co Ltd Picture inclination detection method
JPH10154191A (en) * 1996-11-26 1998-06-09 Nec Corp Business form identification method and device, and medium recording business form identification program
KR101522842B1 (en) * 2008-07-10 2015-06-25 인텔렉추얼디스커버리 주식회사 Augmented reality system having simple frame marker for recognizing image and character, and apparatus thereof, and method of implementing augmented reality using the said system or the said apparatus

Also Published As

Publication number Publication date
JP2786355B2 (en) 1998-08-13

Similar Documents

Publication Publication Date Title
JP3686439B2 (en) Digital image photo area detection system and method
JP2001297303A (en) Method and device for recognizing document image and computer readable recording medium
KR20010053109A (en) Image processor, image processing method, and medium on which image processing program is recorded
US7151859B2 (en) Method and system for correcting direction or orientation of document image
JP2786355B2 (en) How to determine the attributes of text images
JP2881066B2 (en) How to determine the attributes of text images
EP0870276B1 (en) A method for transforming a gray-level image into a black-and-white image
JP2003115031A (en) Image processor and its method
JP3073837B2 (en) Image region separation device and image region separation method
JPH03126181A (en) Area dividing method for document image
JP2877548B2 (en) Document image attribute discrimination method
JP3187895B2 (en) Character area extraction method
JP3754721B2 (en) Image processing apparatus and method
US7079699B2 (en) Multi-valued image conversion device, multi-valued image conversion program, and multi-valued image conversion method
JPH09120443A (en) Image processing method and image processor
JP2800205B2 (en) Image processing device
JP3020293B2 (en) Attribute determination method
JPH10336441A (en) Image area attribute discrimination method
JPH0535914A (en) Picture inclination detection method
JP2789647B2 (en) Line image recognition method
JP2771045B2 (en) Document image segmentation method
JPH0660220A (en) Area extracting method for document image
JPH0530349A (en) Binary picture generating method for document picture
JPH0676108A (en) Tilt detecting method for document image
JP2853141B2 (en) Image area identification device

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980512