JPH08123902A - Character extraction device - Google Patents

Character extraction device

Info

Publication number
JPH08123902A
JPH08123902A JP6286037A JP28603794A JPH08123902A JP H08123902 A JPH08123902 A JP H08123902A JP 6286037 A JP6286037 A JP 6286037A JP 28603794 A JP28603794 A JP 28603794A JP H08123902 A JPH08123902 A JP H08123902A
Authority
JP
Japan
Prior art keywords
processing unit
black
line
black pixel
residual
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
JP6286037A
Other languages
Japanese (ja)
Other versions
JPH08123902A5 (en
JP3190794B2 (en
Inventor
Yoshitaka Hamaguchi
佳孝 濱口
Sadamasa Hirogaki
節正 広垣
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 JP28603794A priority Critical patent/JP3190794B2/en
Publication of JPH08123902A publication Critical patent/JPH08123902A/en
Publication of JPH08123902A5 publication Critical patent/JPH08123902A5/ja
Application granted granted Critical
Publication of JP3190794B2 publication Critical patent/JP3190794B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)

Abstract

(57)【要約】 【目的】 1文字ごとの外接矩形を正確に切り出す。 【構成】 外接矩形抽出処理部2では、行と垂直な方向
の走査線について黒画素を含まない座標を検出し、そこ
で行を分割する。外接矩形抽出処理部2では、分割され
た矩形内に2文字以上が含まれるか否かを判別する。黒
ラン探索処理部4では、抽出された外接矩形内の行方向
の所定の長さ以上の黒ランを探索する。そして、間隙探
索処理部5では、探索された黒ランとその他の黒画素と
の間隙を探索する。この結果、文字の黒ランがアンダー
ラインでなく、文字の一部であるときは、そのような黒
ランは残される。そして、線図形消去処理部6では、ア
ンダーラインと判定された黒ランを消去する。その後、
外接矩形再抽出処理部7で、アンダーラインを除去した
後の外接矩形について行と垂直な方向の走査線について
黒画素を含まない座標を検出し、そこで行を分割する。
(57) [Summary] [Purpose] To accurately cut out the circumscribed rectangle for each character. A circumscribed rectangle extraction processing unit 2 detects coordinates that do not include black pixels in a scanning line in a direction perpendicular to a row, and divides the row there. The circumscribing rectangle extraction processing unit 2 determines whether or not two or more characters are included in the divided rectangle. The black run search processing unit 4 searches for a black run having a predetermined length or more in the row direction within the extracted circumscribed rectangle. Then, the gap search processing unit 5 searches for a gap between the searched black run and other black pixels. As a result, when a black run of a character is not underlined but part of the character, such black run is left behind. Then, the line figure erasing processing unit 6 erases the black run determined to be an underline. afterwards,
The circumscribing rectangle re-extracting processing unit 7 detects the coordinates of the circumscribing rectangle after the underline is removed from the scanning line in the direction perpendicular to the line and does not include black pixels, and divides the line.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、アンダーラインや文字
枠等の線図形で装飾された文字列から各文字を切り出す
文字切り出し装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character slicing device for slicing out each character from a character string decorated with a line figure such as an underline or a character frame.

【0002】[0002]

【従来の技術】文字認識を行なう場合には、文字列から
各文字を切り出す必要があるが、文字列にアンダーライ
ン(縦書きではサイドライン)が引かれている場合に
は、アンダーラインにより各文字がつながってしまって
いて切り出しが困難である。このため、従来、例えば文
字内に記述された文字列から各文字を切り出す場合、横
方向及び縦方向に黒画素のヒストグラムをとり、最も黒
画素の頻度が高い部分を除去する方法があった(例え
ば、特開平3−111982号公報参照)。また、文字
枠のない文書でも、文書中の文字列の一部にアンダーラ
インが付加されている場合があるが、その場合も上述し
たヒストグラムをとる方法により、アンダーラインを除
去していた。
2. Description of the Related Art When performing character recognition, it is necessary to cut out each character from a character string. However, when an underline (sideline in vertical writing) is drawn in the character string, each character is underlined. It is difficult to cut out because the letters are connected. Therefore, conventionally, for example, when cutting out each character from a character string described in a character, there is a method of taking a histogram of black pixels in the horizontal direction and the vertical direction and removing a portion having the highest frequency of black pixels ( See, for example, Japanese Patent Laid-Open No. 3-111982). Further, even in a document having no character frame, an underline may be added to a part of the character string in the document. In that case, however, the underline is removed by the method of taking the histogram described above.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上述し
た黒画素のヒストグラムを用いた従来の技術には、次の
ような各種の課題があった。 即ち、ヒストグラムを用いて、文字枠やアンダーライ
ン等の線図形を除去しているために、図8に示すように
「左右」という文字列がにじみ・かすれなどで1つの領
域となると、アンダーラインでつながった可能性がある
ものとして処理される。この場合、実際はアンダーライ
ンのような長い黒ランは無いにもかかわらず、図示のよ
うにヒストグラムが大きくなり、ヒストグラムが極大と
なるすぐ上の部分の図8のjの位置以下の部分がアンダ
ーラインであると判定される。これにより、本来文字で
ある部分がアンダーラインであるとして除去されてしま
う。
However, the conventional technique using the above-described histogram of black pixels has the following various problems. That is, since line shapes such as character frames and underlines are removed using the histogram, when the character string "left and right" becomes one area due to bleeding or fading as shown in FIG. Will be processed as if they were connected. In this case, although there is actually no long black run such as an underline, the histogram becomes large as shown in the drawing, and the portion immediately below the position j in FIG. It is determined that As a result, the part that is originally a character is removed as an underline.

【0004】また、アンダーラインと文字とが近接
し、かつ画像が傾いている場合は、アンダーラインの端
の部分が除去できずに残ってしまった。例えば、図15
に示すように、「元旦」という文字列にアンダーライン
が付加されているものが傾いて読み込まれた場合、ヒス
トグラムの極大値のすぐ上の谷の部分のe1よりも下の
画像が消去される。その場合、図16に示すようにf1
の位置にアンダーラインの一部が残ってしまう。 更に、アンダーラインが文字と交差している場合は、
アンダーラインの除去と同時に文字の一部も除去されて
しまった。例えば、図22に示すように、「gym」と
いう文字列に重なるようにアンダーラインが付加されて
いる場合、横方向に投影したヒストグラムの極大値のす
ぐ上の極小値はc2の位置である。その場合、c2の位
置より下の部分を消去した画像は、図23に示すように
なってしまう。そして、この画像に対して文字認識を行
なうと、例えば図23の1文字目はリジェクトされ、2
文字目は誤認識されるなどの弊害が生じる。
Further, when the underline and the character are close to each other and the image is tilted, the end portion of the underline cannot be removed and remains. For example, FIG.
As shown in, when an underlined character string "New Year's Day" is read with an inclination, the image below e1 in the valley portion immediately above the maximum value of the histogram is erased. . In that case, as shown in FIG. 16, f1
Part of the underline remains at the position. Furthermore, if the underline intersects a letter,
At the same time as removing the underline, some of the characters were also removed. For example, as shown in FIG. 22, when an underline is added so as to overlap the character string “gym”, the minimum value immediately above the maximum value of the histogram projected in the horizontal direction is the position of c2. In that case, the image in which the portion below the position of c2 is erased becomes as shown in FIG. Then, when character recognition is performed on this image, for example, the first character in FIG.
There is an adverse effect such as erroneous recognition of the first character.

【0005】[0005]

【課題を解決するための手段】本発明の文字切り出し装
置は、上述した課題を解決するため、以下の点を特徴と
するものである。 (1) 文書画像から抽出された行を黒画素群の外接矩形に切
り分ける外接矩形抽出処理部を備える。 当該外接矩形抽出処理部により切り分けられた外接矩
形内で、黒画素の連続である黒ランが所定の長さ以上に
亘っている部分を探索する黒ラン探索処理部を備える。 当該黒ラン探索処理部により探索された黒ランから外
接矩形の内側にある図形と黒ランとの間の間隙を探索す
る間隙探索処理部を備える。 当該間隙探索処理部により探索された外接矩形内の画
像からその黒ランとそれ以外の図形との間隙よりも黒ラ
ン側に存在する画像を除去する線図形消去処理部を備え
る。 当該線図形消去処理部で加工された画像に対し、再度
外接矩形抽出処理を行なう外接矩形再抽出処理部を備え
る。
In order to solve the above-mentioned problems, the character slicing device of the present invention is characterized by the following points. (1) A circumscribing rectangle extraction processing unit that divides a line extracted from a document image into circumscribing rectangles of a black pixel group is provided. The circumscribing rectangle extraction processing unit includes a black run search processing unit that searches for a portion in which a black run, which is a series of black pixels, extends over a predetermined length or more within the circumscribed rectangle. The black run search processing unit is provided with a gap search processing unit that searches for a gap between a black run and a figure inside a circumscribed rectangle from the black run searched. A line figure erasing processing section is provided for removing an image existing on the black run side from the gap between the black run and other figures from the image in the circumscribed rectangle searched by the gap searching processing section. A circumscribing rectangle re-extracting processing unit that performs circumscribing rectangle extracting processing again on the image processed by the line figure erasing processing unit is provided.

【0006】(2) 文字の書かれている行方向の所定値より長く連続した
黒画素である黒ランを消去する黒ラン消去処理部を備え
る。 当該黒ラン消去処理部で消去されずに残留している線
図形の一部である黒画素を検出する残留黒画素検出処理
部を備える。 当該残留黒画素検出処理部で検出された黒画素の座標
から残留黒画素検出処理部では検出されなかった線図形
の一部である黒画素が残留していると推定される座標を
算出する残留黒画素推定処理部を備える。 当該残留黒画素推定処理部で推定された座標の黒画素
あるいは残留黒画素推定処理部で推定された座標の黒画
素及び残留黒画素検出処理部で検出された黒画素の双方
を消去する残留黒画素消去処理部を備える。
(2) A black run erasing processing unit for erasing a black run which is a continuous black pixel longer than a predetermined value in the row direction in which characters are written is provided. The black run erasing processing unit includes a residual black pixel detection processing unit that detects a black pixel that is a part of a line figure that is not erased and remains. From the coordinates of the black pixels detected by the residual black pixel detection processing unit, the coordinates that are estimated to remain black pixels that are part of the line figure not detected by the residual black pixel detection processing unit are calculated. A black pixel estimation processing unit is provided. Black pixels at the coordinates estimated by the residual black pixel estimation processing unit or residual black pixels that erase both the black pixels at the coordinates estimated by the residual black pixel estimation processing unit and the black pixels detected by the residual black pixel detection processing unit. A pixel erasing processing unit is provided.

【0007】(3)(2)において、以下を特徴とす
る。 残留黒画素検出処理部は、線図形を境界として文字の
反対側にある黒画素を線図形の一部が残留したものとし
て検出する。 残留黒画素推定処理部は、残留黒画素検出処理部で検
出された黒画素と線図形の中心点に関し点対称の位置に
ある黒画素を線図形の一部が残留したものと推定する。 残留黒画素消去処理部は、残留黒画素推定処理部で推
定された黒画素及び残留黒画素検出処理部で検出された
黒画素の双方を消去する。
(3) In (2), the following features are provided. The residual black pixel detection processing unit detects a black pixel on the opposite side of the character with the line figure as a boundary, as a part of the line figure remaining. The residual black pixel estimation processing unit estimates that the black pixel detected by the residual black pixel detection processing unit and a black pixel at a position point-symmetric with respect to the center point of the line figure are a part of the line figure remaining. The residual black pixel elimination processing unit erases both the black pixel estimated by the residual black pixel estimation processing unit and the black pixel detected by the residual black pixel detection processing unit.

【0008】(4)(2)において、以下の特徴とす
る。 残留黒画素検出処理部は、線図形を境界として文字の
反対側にある黒画素を線図形の一部が残留したものとし
て一応検出する。 残留黒画素推定処理部は、残留黒画素検出処理部で検
出された黒画素と線図形の中心点に関し点対称の位置に
黒画素がないときは、残留黒画素検出処理部で検出され
た黒画素は線図形の一部が残留したものではなかったと
推定し、その検出結果を修正する。 残留黒画素消去処理部は、残留黒画素推定処理部で線
図形の一部でないと推定された黒画素を消去しない。
(4) In (2), the following features are provided. The residual black pixel detection processing unit tentatively detects a black pixel on the opposite side of the character with the line figure as a boundary, as a part of the line figure remains. The residual black pixel estimation processing unit, when there is no black pixel at a position point-symmetric with respect to the black pixel detected by the residual black pixel detection processing unit, is detected by the residual black pixel detection processing unit. It is presumed that a part of the line figure did not remain for the pixel, and the detection result is corrected. The residual black pixel erasure processing unit does not erase the black pixels estimated by the residual black pixel estimation processing unit to be not part of the line figure.

【0009】(5) 文字の書かれている行方向の所定値より長く連続した
黒画素である黒ランを線図形として検出する線図形検出
処理部を備える。 当該線図形検出処理部で検出された線図形を除去した
画像を処理対象の文字画像から生成する線図形消去処理
部を備える。 線図形検出処理部で検出された線図形と単数又は複数
の走査方向で交差する黒ランから成る画像を生成する線
素抽出処理部を備える。 線図形消去処理部で生成された画像と、線素抽出処理
部で生成された画像とを合成する画像合成処理部を備え
る。
(5) A line figure detection processing unit is provided for detecting a black run, which is a continuous black pixel longer than a predetermined value in the row direction in which characters are written, as a line figure. A line graphic erasing processing unit is provided that generates an image from which the line graphic detected by the line graphic detecting processing unit is removed from the character image to be processed. A line element extraction processing unit that generates an image composed of a single or a plurality of black runs intersecting the line pattern detected by the line pattern detection processing unit in the scanning direction is provided. The image synthesis processing unit is configured to synthesize the image generated by the line figure erasing processing unit and the image generated by the line element extraction processing unit.

【0010】[0010]

【作用】[Action]

(1)外接矩形抽出処理部では、行と垂直な方向の走査
線について黒画素を含まない座標を検出し、そこで行を
分割する。黒ラン探索処理部では、抽出された外接矩形
内の行方向の所定の長さ以上の黒ランを探索する。そし
て、間隙探索処理部では、探索された黒ランとその他の
黒画素との間隙を探索する。この結果、文字の黒ランが
アンダーラインでなく、文字の一部であるときは、その
ような黒ランは残される。そして、線図形消去処理部で
は、アンダーラインと判定された黒ランを消去する。そ
の後、外接矩形再抽出処理部で、アンダーラインを除去
した後の外接矩形について行と垂直な方向の走査線につ
いて黒画素を含まない座標を検出し、そこで行を分割す
る。この結果、文字のにじみにより黒画素が連続してい
るような場合は消去せず、アンダーラインのみを正確に
消去して1文字ごとの外接矩形を切り出すことができ
る。
(1) The circumscribing rectangle extraction processing unit detects coordinates that do not include black pixels in the scanning line in the direction perpendicular to the row, and divides the row there. The black run search processing unit searches for a black run having a predetermined length or more in the row direction within the extracted circumscribed rectangle. Then, the gap search processing unit searches for a gap between the searched black run and other black pixels. As a result, when a black run of a character is not underlined but part of the character, such black run is left behind. Then, the line figure erasing processing unit erases the black run determined to be an underline. After that, the circumscribing rectangle re-extracting processing unit detects the coordinates of the circumscribing rectangle after the underline is removed, the coordinates not including black pixels in the scanning line in the direction perpendicular to the line, and the line is divided there. As a result, when the black pixels are continuous due to character bleeding, the circumscribing rectangle can be cut out for each character by not erasing but only underlining accurately.

【0011】(2)黒ラン消去処理部では、所定の長さ
以上の黒ランを消去することによりアンダーラインを消
去する。ここで、アンダーラインは黒画素で塗りつぶさ
れた細長い長方形であり、読取画像が斜行している場合
には、アンダーラインの角の一部が上下に残る。残留黒
画素検出処理部では、消去されたアンダーラインの付近
に残留している黒画素を検出する。残留黒画素推定処理
部では、残留黒画素検出処理部で検出された黒画素のう
ち一定のものをアンダーラインの一部であると推定す
る。そして、残留黒画素消去処理部では、アンダーライ
ンの一部として推定された残留黒画素を消去する。この
場合、残留黒画素検出処理部で検出された残留黒画素の
すべてをアンダーラインの一部であると推定して消去し
てしまってもよい。この結果、読取画像が斜行している
場合にもアンダーラインをきれいに消去することができ
る。
(2) The black run erasing processing unit erases the underline by erasing a black run having a predetermined length or more. Here, the underline is an elongated rectangle filled with black pixels, and when the read image is skewed, some of the corners of the underline remain above and below. The residual black pixel detection processing unit detects black pixels remaining near the erased underline. The residual black pixel estimation processing unit estimates that some of the black pixels detected by the residual black pixel detection processing unit are part of the underline. Then, the residual black pixel erasing processing unit erases the residual black pixel estimated as a part of the underline. In this case, all the residual black pixels detected by the residual black pixel detection processing unit may be estimated to be part of the underline and may be erased. As a result, the underline can be erased cleanly even when the read image is skewed.

【0012】(3)(1)において、残留黒画素検出処
理部では、黒ラン消去処理部で消去されたアンダーライ
ンより下側の黒画素はアンダーラインの一部が消去され
ずに残留したものであるとみなす。残留黒画素推定処理
部では、アンダーラインが斜行している場合はアンダー
ラインの消去された部分に対しその角の一部が上下に点
対称に残留することから、下側の角の残留部分に対して
点対称の位置にある黒画素をアンダーラインの一部であ
ると推定する。そして、残留黒画素消去処理部では、ア
ンダーラインの一部として検出された残留黒画素及び推
定された残留黒画素を消去する。この結果、読取画像が
斜行している場合にもアンダーラインをきれいに消去す
ることができる。
(3) In (1), in the residual black pixel detection processing unit, the black pixels below the underline erased by the black run erasing processing unit are those in which a part of the underline remains without being erased. Considered to be. In the residual black pixel estimation processing unit, when the underline is skewed, a part of the corner remains vertically symmetrical with respect to the erased part of the underline. It is estimated that a black pixel located at a point symmetrical with respect to is a part of the underline. Then, the residual black pixel erasing processing unit erases the residual black pixel detected as a part of the underline and the estimated residual black pixel. As a result, the underline can be erased cleanly even when the read image is skewed.

【0013】(4)(1)において、画像の斜行により
アンダーラインの角の一部が残留する場合には必ず点対
称の位置に残留するはずである。従って、残留黒画素検
出処理部でアンダーラインの一部として検出された残留
黒画素に対して点対称の位置に黒画素が存在しない場合
には、残留黒画素検出処理部で検出された黒画素が実は
アンダーラインの一部ではなく、アンダーラインの近く
の句読点等であると推定される。このため、その部分の
黒画素は消去せずに残す。この結果、句読点等がアンダ
ーラインの下に付加された場合にそれをアンダーライン
の一部として消去してしまうことが防止される。
(4) In (1), when a part of the corner of the underline remains due to the skew of the image, it should always remain at the position of point symmetry. Therefore, if there is no black pixel at a position symmetrical with respect to the residual black pixel detected as a part of the underline by the residual black pixel detection processing unit, the black pixel detected by the residual black pixel detection processing unit is detected. However, it is presumed that it is not a part of the underline but a punctuation mark near the underline. Therefore, the black pixel in that portion is left without being erased. As a result, when a punctuation mark or the like is added below the underline, it is prevented from being erased as a part of the underline.

【0014】(5)アンダーライン検出処理部では、例
えば、行の高さの1.5倍以上の長さで行の下1/3の
範囲の黒ランをアンダーラインとして検出する。アンダ
ーライン消去処理部では、検出された黒ランをアンダー
ラインとみなして消去する。一方、線素抽出処理部で
は、例えば、アンダーラインの太さの2倍以上の行と垂
直な方向又は所定角の斜め方向の黒ランを抽出する。そ
して、画像合成処理部では、アンダーラインを消去した
画像と、線素抽出処理部で抽出された黒ランとを論理和
により合成する。この結果、アンダーラインの消去によ
り文字の一部が削除されても、線素抽出処理部で抽出さ
れた黒ランが重ねられることにより、文字のとぎれた部
分がつなげられる。
(5) The underline detection processing unit detects, as an underline, a black run having a length of 1.5 times or more the height of the line and within the lower third of the line. The underline erasure processing unit erases the detected black run by regarding it as an underline. On the other hand, the line element extraction processing unit extracts, for example, a black run in a direction perpendicular to a line having a thickness equal to or more than twice the thickness of the underline or in an oblique direction of a predetermined angle. Then, the image synthesis processing unit synthesizes the underlined image and the black run extracted by the line element extraction processing unit by logical sum. As a result, even if a part of the character is deleted by deleting the underline, the black run extracted by the line element extraction processing unit is overlapped, so that the discontinuous part of the character is connected.

【0015】[0015]

【実施例】以下、本発明の実施例を図面を参照して詳細
に説明する。図1は、本発明の文字切り出し装置の一実
施例のブロック図である。図示の装置は、行抽出処理部
1、外接矩形抽出処理部2、外接矩形判別処理部3、黒
ラン探索処理部4、間隙探索処理部5、線図形消去処理
部6、外接矩形再抽出処理部7、文字切り出し処理部8
から成る。文書画像10は、処理対象であり、画像ファ
イルや、紙に印刷された文書を光学的に電気信号に変換
したものである。行抽出処理部1は、文書画像から文字
行を抽出する処理を行なう。この処理は、例えば、以下
のような既存の手法により行なわれる。まず、文字から
成る段落を文書画像から抽出する。そして、その抽出画
像から行方向に投射した黒画素数のヒストグラムを取
り、黒画素数が一定値以下の部分で切り出す。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a block diagram of an embodiment of a character cutting device of the present invention. The illustrated apparatus includes a line extraction processing unit 1, a circumscribed rectangle extraction processing unit 2, a circumscribed rectangle determination processing unit 3, a black run search processing unit 4, a gap search processing unit 5, a line figure erasure processing unit 6, and a circumscribed rectangle re-extraction processing. Part 7, character cut-out processing unit 8
Consists of. The document image 10 is a processing target, and is an image file or a document printed on paper, which is optically converted into an electric signal. The line extraction processing unit 1 performs a process of extracting a character line from a document image. This processing is performed by the following existing method, for example. First, a paragraph made up of characters is extracted from the document image. Then, a histogram of the number of black pixels projected in the row direction is obtained from the extracted image, and the black pixel number is cut out at a portion equal to or less than a certain value.

【0016】外接矩形抽出処理部2は、行抽出処理部1
によって切り出された行を、行方向と垂直方向の走査線
上に画素がない座標を区切りとし、黒画素塊を切り出
す。そして、各黒画素塊の外接矩形を抽出する。外接矩
形判別処理部3は、外接矩形抽出処理部2で抽出された
矩形内のうち、アンダーラインなどの除去すべき線図形
が存在する可能性があるものを判別する。例えば、強調
したい単語にアンダーラインを付加しているような場合
は外接矩形が1文字より長くなる。従って、行幅などか
ら文字の大きさを推定し、外接矩形の行方向の長さを比
較して一定の割合以上の長さであればアンダーラインな
どの線図形が付加されている可能性があると判定する。
ここで、アンダーラインなどの線図形が付加されている
可能性があると判別された外接矩形のみについて、以下
の各処理部による処理が行なわれる。
The circumscribing rectangle extraction processing unit 2 is a line extraction processing unit 1.
The black pixel block is cut out using the line cut out by using the coordinates having no pixels on the scanning line in the row direction and the vertical direction as a delimiter. Then, the circumscribed rectangle of each black pixel block is extracted. The circumscribing rectangle discrimination processing unit 3 discriminates, among the rectangles extracted by the circumscribing rectangle extraction processing unit 2, one in which a line figure to be removed such as an underline may exist. For example, when an underline is added to a word to be emphasized, the circumscribed rectangle becomes longer than one character. Therefore, the size of the character is estimated from the line width, and the lengths of the circumscribing rectangles in the line direction are compared. If the length is a certain percentage or more, line graphics such as underlines may be added. Judge that there is.
Here, the processing by each processing unit described below is performed only on the circumscribing rectangle that is determined to be possibly added with a line figure such as an underline.

【0017】黒ラン探索処理部4は、外接矩形判別処理
部3でアンダーラインなどの除去すべき線図形が存在す
る可能性があると判別された外接矩形内に含まれる画像
から、特定の方向の長い黒ランを探索して最も外接矩形
の内側の黒ランの座標を記憶する。例えば、アンダーラ
インを除去することを目的とする場合、行幅などから推
定される文字の大きさより一定値以上長い行方向の黒ラ
ンを探索する。この場合、アンダーラインが付加される
方向、即ち、横書きの文書であれば下側、縦書きの文書
であれば右側から外接矩形の中心の方向に向かって探索
する。このとき、黒ランを探索する範囲を外接矩形の端
から、行幅の一定の割合までの範囲に限定するなどして
もよい。この処理を黒画素数ではなく、黒ランの検索に
よって行なうのが本手法の特徴の1つである。一方、上
述した条件に合った黒ランが検出されなかった場合は除
去すべき線図形はないものとし、その外接矩形について
はこの後の各処理部の処理を行なわない。
The black run search processing unit 4 determines a specific direction from the image included in the circumscribed rectangle determined by the circumscribed rectangle determination processing unit 3 that there is a possibility that there is a line figure to be removed such as an underline. The long black run is searched and the coordinates of the black run inside the circumscribed rectangle are stored. For example, in order to remove the underline, a black run in the line direction that is longer than a certain size by a certain value or more than the character size estimated from the line width is searched. In this case, the search is performed from the direction in which the underline is added, that is, from the lower side in the case of a horizontally written document and from the right side in the case of a vertically written document toward the center of the circumscribed rectangle. At this time, the range in which the black run is searched may be limited to a range from the end of the circumscribed rectangle to a certain proportion of the line width. One of the features of this method is that this processing is performed by searching for black runs instead of searching for the number of black pixels. On the other hand, if a black run that meets the above conditions is not detected, it is determined that there is no line figure to be removed, and the circumscribed rectangle is not processed by the subsequent processing units.

【0018】間隙探索処理部5は、黒ラン探索処理部4
で記憶された黒ランの座標から外接矩形の内側へ一定距
離内の行方向に平行な走査線のうち、黒ランを含まない
ものを探索し、その座標を記憶する。例えば、アンダー
ラインが文字と接触していない場合、この処理におい
て、アンダーラインと文字との間の間隙が検出できる。
これにより、文字と接触していないアンダーラインを正
確に除去できることが本発明の特徴の1つである。線図
形消去処理部6は、間隙探索処理部5で間隙となる座標
が検出された場合は、その座標から外側の黒画素をアン
ダーラインとして除去する。また、間隙探索処理部5で
間隙が検出されなかった場合は、黒ラン探索処理部4で
記憶された黒ランの座標より外側の黒画素をアンダーラ
インとして除去する。この場合、外側とは、外接矩形に
対してアンダーラインが付加されている方向で、通常横
書きでは下側、縦書きでは右側である。尚、アンダーラ
インの除去は、画像上から黒画素を消去する方法の他、
外接矩形を除去対象となる座標の内側まで狭める方法も
ある。
The gap search processing unit 5 is a black run search processing unit 4.
Among the scanning lines parallel to the row direction within a fixed distance from the coordinates of the black run stored in step 1 to the inside of the circumscribing rectangle, the scanning line that does not include the black run is searched and the coordinates are stored. For example, if the underline is not in contact with the character, the gap between the underline and the character can be detected in this process.
As a result, it is one of the features of the present invention that the underline that is not in contact with the character can be accurately removed. When the gap search processing unit 5 detects the coordinates that form the gap, the line figure erasing processing unit 6 removes the black pixel outside from the coordinates as an underline. When the gap search processing unit 5 does not detect a gap, the black pixels outside the coordinates of the black run stored in the black run search processing unit 4 are removed as underlines. In this case, the outer side is the direction in which an underline is added to the circumscribed rectangle, and is usually the lower side in horizontal writing and the right side in vertical writing. In addition, removal of underlines is not only a method of erasing black pixels from the image,
There is also a method of narrowing the circumscribed rectangle to the inside of the coordinates to be removed.

【0019】外接矩形再抽出処理部7は、線図形消去処
理部6でアンダーラインを除去した文書画像に対して、
再度外接矩形の抽出をしなおす。この場合、1つの外接
矩形となった原因であるアンダーラインが除去されてい
るため、2つ以上の文字が1つの外接矩形に含まれるこ
となく、正確に外接矩形が抽出される。文字切り出し処
理部8は、外接矩形抽出処理部2及び外接矩形再抽出処
理部7で抽出された外接矩形を、必要であれば文字単位
に統合あるいは分割し、最終的な文字切り出し結果とす
る。これは、行幅あるいは外接矩形の長さの頻度分布な
どから推定される文字の大きさを基準に小さい矩形は統
合し、大きい矩形は分割するような手法や、認識して文
字らしくなる組み合わせを探すような既存の手法で実現
できる。
The circumscribing rectangle re-extraction processing unit 7 applies to the document image from which the underline has been removed by the line figure erasing processing unit 6,
Extract the circumscribed rectangle again. In this case, since the underline that causes the one circumscribing rectangle is removed, the circumscribing rectangle is accurately extracted without including two or more characters in the one circumscribing rectangle. The character cut-out processing unit 8 integrates or divides the circumscribed rectangles extracted by the circumscribed rectangle extraction processing unit 2 and the circumscribed rectangle re-extraction processing unit 7 into character units, if necessary, to obtain a final character cut-out result. This is done by combining small rectangles based on the size of characters estimated from the line width or length distribution of circumscribing rectangles, and dividing large rectangles. It can be realized by the existing method of searching.

【0020】次に、実例を用いて具体的な処理の例につ
いて説明する。図2は、文書画像から、行抽出処理部1
により切り出された文字行の例である。この例では、
「左右いっぱいに」という文字列のうち、文字のにじ
み、あるいはノイズにより「左右」が接触しており、
「いっぱい」の下にアンダーラインが付加されている。
点線の矩形は行の座標情報を示したもので、この後の説
明はこの矩形の左上の座標を原点として説明する。外接
矩形抽出処理部2では、図2の1行分の画像に対し、こ
の例は横書きであるので、縦方向の走査線について黒画
素を含まない座標を検出する。従って、その部分で行を
分割する。図2の例では、図2に示すaからbの間、及
びcからdの間において縦方向に黒画素がない。このた
め、X軸が行の左端からaまでの部分と、bからcまで
の部分と、dから右端までの部分の3つの部分に分割す
る。ここに、a、b、c、dのX座標は、それぞれ“1
08”、“115”、“330”、“336”であると
する。即ち、X=108〜115の部分と、X=330
〜336の部分が空白になっているものとする。
Next, an example of a specific process will be described using an actual example. FIG. 2 shows a line extraction processing unit 1 from a document image.
It is an example of the character line cut out by. In this example,
Of the character string "Full left and right", "left and right" are in contact due to character bleeding or noise,
Underline is added under "Full".
The dotted rectangle indicates the coordinate information of the row, and the following description will be made with the upper left coordinate of this rectangle as the origin. The circumscribing rectangle extraction processing unit 2 detects horizontal coordinates in the image of one line in FIG. 2, and thus detects coordinates that do not include black pixels in the vertical scanning line. Therefore, the line is divided at that portion. In the example of FIG. 2, there are no black pixels in the vertical direction between a and b and between c and d shown in FIG. Therefore, the X axis is divided into three parts, that is, the part from the left end of the row to a, the part from b to c, and the part from d to the right end. Here, the X coordinates of a, b, c, and d are “1”, respectively.
08 ”,“ 115 ”,“ 330 ”and“ 336. ”That is, X = 108 to 115 and X = 330.
It is assumed that the parts from to 336 are blank.

【0021】この後、分割された各部分の黒画素の外接
矩形を求める。即ち、図2の例では、X=0〜107の
部分と、X=116〜329の部分と、X=337〜3
80の部分に黒画素が分布している。そして、その各部
分についてY座標の方向での黒画素の分布の範囲を検出
する。その結果、図2の例では、X=0〜107の部分
ではY=0〜53の範囲、X=116〜329の部分で
はY=1〜61の範囲、X=337〜380の部分では
Y=8〜48の範囲に黒画素が分布していることが検出
される。以上の結果、図2に破線で示すような外接矩形
が抽出される。これらの外接矩形は、イメージとして表
現すると図2のようになるが、データとしては左上端の
座標値及び右下端の座標値の組み合わせである。それら
の座標値を図3に示す。
After that, the circumscribed rectangle of the black pixel of each divided portion is obtained. That is, in the example of FIG. 2, X = 0 to 107, X = 116 to 329, and X = 337 to 3.
Black pixels are distributed in the portion 80. Then, the range of the distribution of black pixels in the Y coordinate direction is detected for each part. As a result, in the example of FIG. 2, the range of Y = 0 to 53 at the portion of X = 0 to 107, the range of Y = 1 to 61 at the portion of X = 116 to 329, and the range of Y at the portion of X = 337 to 380. It is detected that black pixels are distributed in the range of 8 to 48. As a result of the above, a circumscribed rectangle as shown by the broken line in FIG. 2 is extracted. These circumscribed rectangles are expressed as an image as shown in FIG. 2, but the data is a combination of the coordinate values of the upper left corner and the lower right corner. The coordinate values are shown in FIG.

【0022】図3に示すように、1番目の外接矩形の左
上端の座標は(0,0)であり、右下端の座標は(10
7,53)である。また、2番目の外接矩形の左上端の
座標は(116,1)であり、右下端の座標は(32
9,61)である。そして、3番目の外接矩形の左上端
の座標は(337,8)であり、右下端の座標は(38
0,48)である。尚、座標値はドット単位で表わして
いるが、文書画像上の位置を示し得るものであれば他の
単位を用いても差し支えない。
As shown in FIG. 3, the coordinates of the upper left corner of the first circumscribed rectangle are (0, 0) and the coordinates of the lower right corner are (10
7, 53). The coordinates of the upper left corner of the second circumscribed rectangle are (116, 1) and the coordinates of the lower right corner are (32
9, 61). The coordinates of the upper left corner of the third circumscribed rectangle are (337,8), and the coordinates of the lower right corner are (38
0, 48). Although the coordinate values are expressed in dot units, other units may be used as long as they can indicate the position on the document image.

【0023】外接矩形判別処理部3では、外接矩形に2
つ以上の文字が含まれていないかどうかを判別する。よ
り具体的には、適当な文字サイズを推定し、外接矩形の
幅がその推定した文字サイズよりも1文字としては異常
に長すぎるようなことがないかを調べる。例えば、文字
はほぼ正方形の外接矩形内に分布しているとみなし、縦
横の文字サイズはだいたい行の幅に等しいと推定する。
即ち、図2の例では、行の幅は62ドットであるので、
推定文字サイズを62ドットとする。そして、外接矩形
との判別の際は、推定文字サイズに対して予め定められ
た割合、例えば1.5倍の判別値を用いる。例えば1.
5倍としたのは、1.0倍であれば1文字であり、2.
0倍であれば2文字であると推定されるので、その中点
をとったためであるが、1.0を超え、2.0未満の他
の割合を用いてもよい。
In the circumscribing rectangle discrimination processing section 3, the circumscribing rectangle is divided into 2
Determines if it contains more than one character. More specifically, an appropriate character size is estimated, and it is examined whether the width of the circumscribing rectangle is abnormally too long as one character than the estimated character size. For example, it is assumed that the characters are distributed within a circumscribing rectangle that is almost square, and it is estimated that the character size in the vertical and horizontal directions is approximately equal to the width of the line.
That is, in the example of FIG. 2, since the width of the line is 62 dots,
The estimated character size is 62 dots. When discriminating the circumscribed rectangle, a discriminant value that is a predetermined ratio, for example, 1.5 times the estimated character size is used. For example 1.
5 times means one character if 1.0 times, and 2.
This is because the number of characters is estimated to be 2 if it is 0, and the midpoint is taken. However, other ratios of more than 1.0 and less than 2.0 may be used.

【0024】1番目の「左右」を含む外接矩形は長さは
108ドットであり、推定文字サイズの1.75倍であ
る。従って、アンダーラインが付加されている可能性が
あるとして判別する。2番目の「いっぱい」を含む外接
矩形は長さが214ドットであり、推定文字サイズの
3.45倍である。従って、これもアンダーラインが付
加されている可能性があるとして判別する。3番目の
「の」を含む外接矩形は長さが44ドットであり、推定
文字サイズの0.71倍である。従って、アンダーライ
ンを除去するための処理は行なわれない。尚、上述した
手法以外でも、アンダーラインのある可能性がある矩形
を判別できれば、どのような手法でもかまわない。ま
た、この処理を行なわず、すべての外接矩形について処
理を行ない、処理の結果をもって外接矩形判別処理を兼
ねることも可能である。
The first circumscribed rectangle including "left and right" has a length of 108 dots, which is 1.75 times the estimated character size. Therefore, it is determined that the underline may be added. The second circumscribing rectangle including "full" has a length of 214 dots, which is 3.45 times the estimated character size. Therefore, it is also determined that there is a possibility that the underline is added. The circumscribing rectangle including the third "no" has a length of 44 dots, which is 0.71 times the estimated character size. Therefore, the process for removing the underline is not performed. Note that any method other than the method described above may be used as long as it can determine a rectangle that may have an underline. It is also possible to perform the processing for all circumscribing rectangles without performing this processing, and also use the result of the processing as the circumscribing rectangle determination processing.

【0025】黒ラン探索処理部4で、アンダーラインが
付加されている可能性があると判定された1個目、2個
目の外接矩形について、その外接矩形の下から推定文字
サイズ62ドットの一定の割合の範囲、例えば1/4の
16ドットの範囲から、推定文字サイズの一定値倍の長
さ、例えば、1.5倍の93ドットの長さの黒ランを検
出する。1個目の「左右」の外接矩形では、図4(a)
に示すように点線で示す下16ドットの範囲内で最も長
い黒ランは図4(a)のe(X座標が7)からf(X座
標が51)で長さは44ドットなので、93ドットより
短い。このため、除去すべきアンダーライン等の線図形
はないものとして間隙探索処理部5、線図形消去処理部
6、外接矩形再抽出処理部7の処理を行なわない。一
方、2個目の「いっぱい」の外接矩形では、矩形の左端
から右端まで214ドットであり、93ドット以上の長
さの黒ランが複数存在する。そして、その最も上にある
ものは図4(b)のg(X座標が58)の位置であるの
で、この座標を記憶する。
With respect to the first and second circumscribing rectangles which are determined by the black run search processing unit 4 as being possibly underlined, an estimated character size of 62 dots from the bottom of the circumscribing rectangle. A black run having a length equal to a fixed value times the estimated character size, for example, 1.5 times 93 dots long is detected from a range of a fixed ratio, for example, a range of 1/4 16 dots. In the first "left and right" circumscribed rectangle, FIG.
As shown in FIG. 4, the longest black run within the range of the lower 16 dots indicated by the dotted line is 93 dots because the length is 44 dots from e (X coordinate is 7) to f (X coordinate is 51) in FIG. 4A. Shorter. Therefore, it is assumed that there is no underline or other line figure to be removed, and the processes of the gap search processing section 5, line figure erasing processing section 6 and circumscribing rectangle re-extraction processing section 7 are not performed. On the other hand, in the second “full” circumscribed rectangle, there are 214 dots from the left end to the right end of the rectangle, and there are a plurality of black runs with a length of 93 dots or more. Since the uppermost one is the position of g (X coordinate is 58) in FIG. 4B, this coordinate is stored.

【0026】「いっぱい」の外接矩形に対し、間隙探索
処理部5では、黒ラン探索処理部4で記憶されたY座標
=58より上で且つ一定の距離内、例えば3ドット以内
にある黒画素を含まないX方向の走査線を探索する。画
像の傾き、あるいはにじみなどの原因でアンダーライン
である長い黒ランの上に93ドット未満の長さの黒ラン
が残っている。そして、その黒ランが3ドット以内であ
り、アンダーラインと文字が分離していればこの処理に
よりその分離している座標を検索することができる。こ
の場合、図5のようにh(X座標が57)の位置には少
々の短い黒ランが乗っているが、更に上のi(Y座標が
56)の位置のX方向の走査線上には黒画素がないた
め、この位置を文字とアンダーラインとが分離している
座標として記憶する。文字とアンダーラインが接触して
いる場合は3ドット以内ではその接触している文字の黒
画素がX方向走査線上に含まれるために間隙探索処理部
5では間隙が探索できず、記憶された座標がそのままア
ンダーラインの最上部として記憶される。
For the "full" circumscribed rectangle, the gap search processing unit 5 has black pixels above the Y coordinate = 58 stored in the black run search processing unit 4 and within a certain distance, for example within 3 dots. Search for scan lines in the X direction that do not include. A black run having a length of less than 93 dots remains on the long black run which is an underline due to the inclination of the image, the blurring or the like. Then, if the black run is within 3 dots and the underline and the character are separated, the separated coordinates can be searched by this processing. In this case, as shown in FIG. 5, a short black run is placed at the position of h (X coordinate is 57), but further on the scanning line in the X direction at the position of i (Y coordinate is 56). Since there are no black pixels, this position is stored as the coordinates where the character and the underline are separated. When the character and the underline are in contact with each other, the black pixels of the contacting character are included in the X-direction scanning line within 3 dots, so that the gap search processing unit 5 cannot search for the gap, and the stored coordinates are stored. Is stored as is as the top of the underline.

【0027】線図形消去処理部6では、「いっぱい」の
外接矩形で、間隙探索処理部5で探索されたY座標=5
6より下の部分の黒画素を白画素に置き換えることによ
りアンダーラインを消去する。図6に消去した後の画像
を示す。アンダーラインと文字が接触していて間隙探索
処理部5で間隙が探索できなかった場合は黒ラン探索処
理部で記憶された長い黒ランの座標から下の部分の黒画
素を白画素に置き換えてアンダーラインの部分を消去す
る。外接矩形再抽出処理部7では、線図形消去処理部6
でアンダーラインが消去された「いっぱい」の外接矩形
内の画像に対して再度、縦方向の走査線で黒画素を含ま
ないものを探索してその部分で分割し、分割された各部
分について外接矩形を求める。この結果、図6に示すよ
うに6つの外接矩形が抽出される。
In the line figure erasing processing section 6, the "full" circumscribing rectangle, and the Y coordinate = 5 searched by the gap searching processing section 5 is used.
The underline is erased by replacing the black pixels below 6 with white pixels. FIG. 6 shows the image after erasing. When the underline and the character are in contact with each other and the gap search processing unit 5 cannot find the gap, the black pixel in the lower portion from the coordinates of the long black run stored in the black run search processing unit is replaced with a white pixel. Erase the underlined part. In the circumscribing rectangle re-extraction processing unit 7, the line figure erasing processing unit 6
Again, for the image in the "full" circumscribed rectangle from which the underline has been deleted, search again for vertical scanning lines that do not contain black pixels, divide that portion, and circumscribe each divided portion. Find a rectangle. As a result, six circumscribing rectangles are extracted as shown in FIG.

【0028】最終的に、図2の1番目、3番目の外接矩
形は、そのままにされ、2番目の外接矩形は外接矩形再
抽出処理部7で抽出された図6の外接矩形に置き換えら
れ、図7に破線で示すように、アンダーラインが無い場
合と同様な外接矩形が文字切り出し処理部8に出力され
る。文字切り出し処理部8では、図7に破線で示すよう
な外接矩形を必要に応じて分割、統合し、最終的な文字
切り出し結果とする。文字切り出し処理部8に渡される
外接矩形は、アンダーラインが付加されない場合と同様
なものであるので、既存の手法で文字切り出し処理が行
なえる。
Finally, the first and third circumscribing rectangles of FIG. 2 are left unchanged, and the second circumscribing rectangle is replaced with the circumscribing rectangle of FIG. 6 extracted by the circumscribing rectangle re-extracting processing unit 7. As indicated by a broken line in FIG. 7, a circumscribed rectangle similar to the case where there is no underline is output to the character cutout processing unit 8. The character cut-out processing unit 8 divides and integrates a circumscribed rectangle as shown by a broken line in FIG. 7 as necessary to obtain a final character cut-out result. Since the circumscribed rectangle passed to the character cutout processing unit 8 is the same as that when no underline is added, the character cutout process can be performed by the existing method.

【0029】このようにして、黒ランの長さが長い部分
をアンダーライン等の線図形とみなして除去することに
より、文字部分を誤って除去することなく、正確に線図
形の除去を行なうことができる。また、長い黒ランのあ
るところより数ドット前から文字とアンダーラインが分
離している部分を探索することにより、アンダーライン
と文字とが接触していない場合はより正確にアンダーラ
インを除去することができる。尚、上述した実施例で
は、アンダーラインを消去した後に文字認識する場合に
ついて説明したが、本発明はこれに限らず、アンダーラ
インが付加された部分のみを取り出して要約文書を作成
する場合にも適用することができる。
In this manner, by removing the portion where the black run is long as a line figure such as an underline and removing it, the line figure can be accurately removed without erroneously removing the character portion. You can Also, by searching for the part where the character and the underline are separated from a few dots before the place where there is a long black run, the underline can be removed more accurately when the underline and the character are not in contact with each other. You can In the above-described embodiment, the case where the character is recognized after the underline is erased has been described. However, the present invention is not limited to this, and it is also possible to take out only the underlined part to create a summary document. Can be applied.

【0030】(第2実施例)図9は、本発明の文字切り
出し装置の第2実施例のブロック図である。図示の装置
は、黒ラン検出処理部11、黒ラン消去処理部12、残
留黒画素検出処理部13、残留黒画素推定処理部14、
残留黒画素消去処理部15を備えている。黒ラン検出処
理部11は、アンダーライン消去の処理対象範囲から予
め算出された閾値以上の長さの行方向の黒ランを検出
し、その座標を記憶する。アンダーライン消去の処理対
象範囲は、例えば横書きであればアンダーラインは文字
列の下部にあるので、除去処理対象となる文字列の下部
1/4の範囲に設定する。黒ランの長さの閾値は、複数
文字から成る文字列にアンダーラインが付加されている
場合はアンダーラインの長さは1文字以上になるので、
例えば横書きであれば文字列の高さの1.5倍に設定す
る。
(Second Embodiment) FIG. 9 is a block diagram of a second embodiment of the character slicing device of the present invention. The illustrated apparatus includes a black run detection processing unit 11, a black run elimination processing unit 12, a residual black pixel detection processing unit 13, a residual black pixel estimation processing unit 14,
The residual black pixel erasing processing unit 15 is provided. The black run detection processing unit 11 detects a black run in the row direction having a length equal to or longer than a threshold value calculated in advance from the processing target range of underline erasure, and stores the coordinates thereof. For example, in the case of horizontal writing, the underline erasing processing target range is at the bottom of the character string, so the range is set to the lower ¼ range of the character string to be the removal processing target. The threshold of the black run length is one character or more when the underline is added to the character string consisting of multiple characters.
For example, for horizontal writing, the height of the character string is set to 1.5 times.

【0031】黒ラン消去処理部12は、黒ラン検出処理
部11で検出された黒ランを消去する。この黒ラン消去
処理は、黒ラン検出処理と別々に行なう必要はなく、黒
ラン検出処理部11で黒ランが検出されるごとに黒ラン
を消去するようにしてもよい。残留黒画素検出処理部1
3は、画像の傾きなどの原因により黒ラン消去処理部1
2で消去されなかったアンダーラインの一部である黒画
素を、黒ラン検出処理部11で検出された黒ランより下
側の位置から検出する。例えば、横書きで右下がりに傾
いていれば、黒ラン検出処理部11で検出された黒ラン
のすぐ下の右端に黒画素が残るが、これは黒ラン検出処
理部11で検出された最も下の黒ランのすぐ下側の走査
線上の画素を走査するだけですぐに検出される。
The black run erasing processor 12 erases the black run detected by the black run detecting processor 11. The black run erasing process does not have to be performed separately from the black run detecting process, and the black run may be erased each time the black run detecting unit 11 detects a black run. Residual black pixel detection processing unit 1
3 is a black run erasing processor 1 due to factors such as image tilt.
The black pixels that are part of the underline not erased in 2 are detected from the position below the black run detected by the black run detection processing unit 11. For example, if horizontal writing is inclined to the lower right, a black pixel remains at the right end immediately below the black run detected by the black run detection processing unit 11, but this is the lowest pixel detected by the black run detection processing unit 11. Just scan the pixels on the scan line just below the black run of the above.

【0032】残留黒画素推定処理部14は、アンダーラ
インの一部でありながら、黒ラン消去処理部12で消去
されなかった黒画素を残留黒画素検出処理部13で検出
された残留黒ランの座標から推定する。例えば、右下が
りに傾いている場合は黒ラン検出処理部11で検出され
た黒ランのすぐ下の右端近傍に残留黒画素検出処理部1
3により黒画素が検出される。その場合、当該検出され
た黒画素の他に黒ラン検出処理部11で検出された黒ラ
ンの上部左端近傍にも黒ラン消去処理部12で消去され
ずに残留した黒画素があることが推定される。残留黒画
素消去処理部15は、残留黒画素検出処理部13で検出
された残留黒画素と、残留黒画素推定処理部14で推定
された座標にある黒画素とを消去する。このように、明
確にアンダーラインの一部が消去されずに残留したもの
と判定できる黒画素の座標から、他の残留黒画素の存在
する可能性のある範囲を推定して消去することにより、
より正確にアンダーラインの消去を行なう。
The residual black pixel estimation processing unit 14 determines the black pixels which are part of the underline but are not erased by the black run elimination processing unit 12 as the residual black run detected by the residual black pixel detection processing unit 13. Estimate from the coordinates. For example, when it is inclined to the lower right, the residual black pixel detection processing unit 1 is located near the right end immediately below the black run detected by the black run detection processing unit 11.
3 detects a black pixel. In that case, in addition to the detected black pixel, it is estimated that there is a black pixel remaining in the vicinity of the upper left end of the black run detected by the black run detection processing unit 11 without being erased by the black run elimination processing unit 12. To be done. The residual black pixel erasing processing unit 15 erases the residual black pixel detected by the residual black pixel detection processing unit 13 and the black pixel at the coordinates estimated by the residual black pixel estimation processing unit 14. In this way, by clearly estimating the range in which other residual black pixels may exist from the coordinates of the black pixels that can be determined to have remained without being partially erased, it is possible to remove
Underline is erased more accurately.

【0033】次に、上述した実施例の動作を説明する。
図11に示す「元旦」という文字列にアンダーラインが
付加された画像が傾いて読み込まれた場合の例について
具体的に説明する。尚、原点は画像の外接矩形の左上に
取ることとする。黒ラン検出処理部11では、例えば処
理対象となっている部分の下1/4の範囲から、処理対
象の高さの1.5倍以上の長さの横方向の黒ランを検出
する。図11の例では、アンダーラインを含む文字列の
高さは31ドットなので、下から8ドット以内、即ちY
座標が23〜30の間から47ドット以上の長さの横向
きの黒ランを検出する。その結果、座標(0,28)〜
(63,28)に条件を満たす黒ランが検出される。
Next, the operation of the above embodiment will be described.
An example in which an image in which an underline is added to the character string “New Year's Day” shown in FIG. 11 is tilted and read will be specifically described. The origin is set at the upper left of the circumscribed rectangle of the image. The black run detection processing unit 11 detects, for example, a horizontal black run having a length of 1.5 times or more the height of the processing target from the lower ¼ range of the processing target portion. In the example of FIG. 11, the height of the character string including the underline is 31 dots, so within 8 dots from the bottom, that is, Y
A horizontal black run having a length of 47 dots or more is detected from coordinates 23 to 30. As a result, coordinates (0, 28) ~
A black run that satisfies the condition (63, 28) is detected.

【0034】黒ラン消去処理部12では、黒ラン検出処
理部11で検出された図11のa1の位置の黒ランを消
去する。その結果、図12に示すような画像が得られ
る。この場合、画像が傾いているため、アンダーライン
の一部が残留している。残留黒画素検出処理部13で
は、黒ラン検出処理部11で検出された黒ランより下
で、例えば検出された黒ランと黒画素で連続している黒
画素を検出する。その結果、図12にb1の破線で囲っ
て示す黒画素が検出される。この残留黒画素検出処理部
13の処理は、黒ラン消去処理部12で消去されなかっ
たアンダーラインの一部を検出し得る手法であればその
他の手法を用いてもかまわない。
The black run erasing processor 12 erases the black run detected by the black run detecting processor 11 at the position a1 in FIG. As a result, an image as shown in FIG. 12 is obtained. In this case, since the image is tilted, part of the underline remains. The residual black pixel detection processing unit 13 detects, for example, a black pixel that is continuous with the detected black run below the black run detected by the black run detection processing unit 11. As a result, the black pixel surrounded by the broken line b1 in FIG. 12 is detected. The remaining black pixel detection processing unit 13 may use any other method as long as it can detect a part of the underline that has not been erased by the black run erasing processing unit 12.

【0035】ここで、図10を参照して残留黒画素推定
処理部14の動作を説明する。まず、中心算出処理部2
1で、アンダーラインの中心を黒ラン検出処理部11で
検出された黒ランの座標をもとに算出する。中心として
は、例えば、黒ランの重心を用いる。図11の例では、
黒ラン検出処理部11で検出された黒ランは座標(0,
28)〜(63,28)であったので、その重心の(3
1.5,28)の位置をアンダーラインの中心とする。
この処理では、アンダーラインの中心を推定できればよ
く、黒ラン検出処理部11で検出された黒ランの外接矩
形の中心を用いるなど、その他の手法を用いてもかまわ
ない。
Here, the operation of the residual black pixel estimation processing unit 14 will be described with reference to FIG. First, the center calculation processing unit 2
In step 1, the center of the underline is calculated based on the coordinates of the black run detected by the black run detection processing unit 11. For example, the center of gravity of the black run is used as the center. In the example of FIG.
The black run detected by the black run detection processing unit 11 has coordinates (0,
28) to (63, 28), the center of gravity (3
The position of (1.5, 28) is the center of the underline.
In this processing, it is sufficient to estimate the center of the underline, and other methods such as using the center of the circumscribed rectangle of the black run detected by the black run detection processing unit 11 may be used.

【0036】次に、残留範囲算出処理部22では、残留
黒画素検出処理部13で検出された残留黒画素の存在す
る範囲を算出する。ここでは、検出された残留黒画素分
布に対する外接矩形を残留黒画素の存在範囲とする。そ
の結果、図13のc1の座標(29,29)〜(62,
30)が残留範囲となる。本実施例では、説明を単純に
するために残留範囲を外接矩形としたが、他の多角形、
複数の多角形、あるいは残留黒画素検出処理部13で検
出された残留黒画素の座標そのものを残留範囲としても
かまわない。
Next, the residual range calculation processing section 22 calculates the range in which the residual black pixels detected by the residual black pixel detection processing section 13 exist. Here, the circumscribed rectangle with respect to the detected residual black pixel distribution is set as the existence range of the residual black pixels. As a result, the coordinates (29, 29) to (62, 62) of c1 in FIG.
30) is the residual range. In this embodiment, the remaining range is a circumscribed rectangle for simplicity of description, but other polygons,
A plurality of polygons or the coordinates of the residual black pixels detected by the residual black pixel detection processing unit 13 may be used as the residual range.

【0037】次に、残留範囲回転処理部23では、中心
算出処理部21で算出された中心点を軸に、残留範囲算
出処理部22で算出された残留範囲を180度回転す
る。その結果、図13のd1の座標(1,26)〜(3
4,27)が得られる。この処理は、画像の傾きにより
アンダーラインの一部が残る場合は点対象に残ることを
考慮した推定方法である。例えば、右下に画像が傾いて
いる場合はアンダーラインの右下の一部と左上の一部が
残るため、残留範囲算出処理部22で右下に残っている
黒画素が検出され、その座標から残留範囲回転処理部2
3で左上の黒画素の位置を推定できる。
Next, in the residual range rotation processing section 23, the residual range calculated by the residual range calculation processing section 22 is rotated by 180 degrees about the center point calculated by the center calculation processing section 21. As a result, the coordinates (1, 26) to (3) of d1 in FIG.
4, 27) is obtained. This processing is an estimation method that considers that a part of the underline remains due to the inclination of the image and remains under the point object. For example, when the image is tilted to the lower right, a part of the lower right and a part of the upper left of the underline remain, so the residual range calculation processing unit 22 detects the black pixel remaining in the lower right, and the coordinates thereof are detected. To residual range rotation processing unit 2
The position of the upper left black pixel can be estimated by 3.

【0038】連続黒画素検出処理部24では、残留範囲
回転処理部23により得られた範囲内から黒ラン検出処
理部11で検出された黒ランと、黒画素で連続した黒画
素を検出し、これを残留黒画素推定処理部14による処
理結果とする。本実施例の場合、図13のd1の破線の
矩形内部の黒画素はすべて黒ラン検出処理部11で検出
された図11のa1の黒ランと黒画素で連続しているの
で残留黒画素と推定される。以上のように、アンダーラ
インである長い黒ランよりも下にあるような、容易にア
ンダーラインの一部と判定できる黒画素の座標をもと
に、その他のアンダーラインの部分を推定する。
In the continuous black pixel detection processing section 24, the black run detected by the black run detection processing section 11 and the continuous black pixels in the black pixels are detected from the range obtained by the residual range rotation processing section 23. This is the processing result by the residual black pixel estimation processing unit 14. In the case of the present embodiment, all the black pixels inside the dashed rectangle of d1 of FIG. 13 are continuous with the black run of a1 of FIG. 11 detected by the black run detection processing unit 11, so that it is a residual black pixel. Presumed. As described above, the other underline portions are estimated based on the coordinates of the black pixels which are below the long black run which is the underline and which can be easily determined as a part of the underline.

【0039】その後、残留黒画素検出処理部13で得ら
れた図12のb1の破線の矩形内の黒画素及び、残留黒
画素推定処理部14で推定された図13のd1の破線の
矩形内の黒画素を、残留黒画素消去処理部15で消去す
る。その結果、図14に示すように、アンダーラインが
残らず消去され、文字を構成する黒画素の一部が消去さ
れない美しい画像が得られる。
Thereafter, the black pixels within the broken line rectangle of b1 of FIG. 12 obtained by the residual black pixel detection processing unit 13 and the broken line rectangle of d1 of FIG. 13 estimated by the residual black pixel estimation processing unit 14 are shown. The remaining black pixel erasure processing unit 15 erases the black pixel of No. As a result, as shown in FIG. 14, it is possible to obtain a beautiful image in which all underlines are erased and some black pixels forming a character are not erased.

【0040】(第3実施例)第3実施例の装置構成は、
図9に示す第2実施例と同様であるが、処理内容が若干
異なる。残留黒画素推定処理部14では、アンダーライ
ンの一部でありながら、黒ラン消去処理部12で消去さ
れなかった黒画素を、残留黒画素検出処理部13で検出
された残留黒ランの座標から推定する。そして、推定さ
れた位置に黒画素が検出された場合は残留黒画素検出処
理部13で検出された黒画素も推定された黒画素として
処理結果に加える。残留黒画素消去処理部15では、残
留黒画素推定処理部14で得られた黒画素を消去する。
(Third Embodiment) The apparatus configuration of the third embodiment is as follows.
This is the same as the second embodiment shown in FIG. 9, but the processing contents are slightly different. In the residual black pixel estimation processing unit 14, the black pixels which are part of the underline but are not erased by the black run elimination processing unit 12 are calculated from the coordinates of the residual black run detected by the residual black pixel detection processing unit 13. presume. When a black pixel is detected at the estimated position, the black pixel detected by the residual black pixel detection processing unit 13 is also added to the processing result as the estimated black pixel. The residual black pixel elimination processing unit 15 erases the black pixels obtained by the residual black pixel estimation processing unit 14.

【0041】以上の処理で第2実施例と異なる点は、残
留黒画素推定処理部14では、残留黒画素検出処理部1
3で得られた黒画素の座標から推定された座標に黒画素
が検出されない場合は、残留黒画素検出処理部13で得
られた黒画素は残留黒画素推定処理部14の処理結果と
してあげられず、残留黒画素消去処理部15は残留黒画
素推定処理部14から得られた黒画素のみを消去する。
従って、残留黒画素推定処理部14で推定した位置に黒
画素がない場合は残留黒画素検出処理部13で検出され
た黒画素も消去されないことになる。残留黒画素検出処
理部13で検出された黒画素がアンダーラインの一部で
あれば、その座標から他の位置に残っている黒画素を推
定できるが、その推定される位置に黒画素が検出されな
いのであればもともと残留黒画素検出処理部13で得ら
れた黒画素がアンダーラインの一部ではない可能性が大
きい。そのような黒画素を消去しないことにより、アン
ダーライン以外のものを誤って消去することを防止した
ものである。
The difference from the second embodiment in the above processing is that in the residual black pixel estimation processing unit 14, the residual black pixel detection processing unit 1
If no black pixel is detected at the coordinates estimated from the coordinates of the black pixel obtained in step 3, the black pixel obtained by the residual black pixel detection processing unit 13 is given as the processing result of the residual black pixel estimation processing unit 14. Instead, the residual black pixel erasing processor 15 erases only the black pixels obtained from the residual black pixel estimating processor 14.
Therefore, if there is no black pixel at the position estimated by the residual black pixel estimation processing unit 14, the black pixel detected by the residual black pixel detection processing unit 13 will not be erased. If the black pixel detected by the residual black pixel detection processing unit 13 is a part of the underline, the black pixel remaining at another position can be estimated from the coordinates, but the black pixel is detected at the estimated position. If not, there is a high possibility that the black pixel originally obtained by the residual black pixel detection processing unit 13 is not a part of the underline. By not erasing such black pixels, it is possible to prevent erroneous erasure of anything other than underlines.

【0042】次に、上述した第3実施例の動作を説明す
る。最初の黒ラン検出処理部11、黒ラン消去処理部1
2、残留黒画素検出処理部13における処理は、第2実
施例と同じである。また、残留黒画素推定処理部14の
処理例のうち、中心算出処理部21、残留範囲算出処理
部22、残留範囲回転処理部23における処理も第2実
施例と同じである。連続黒画素検出処理部24では、残
留範囲回転処理部23により得られた範囲内から、黒ラ
ン検出処理部11で検出された黒ランと黒画素で連続し
た黒画素を検出し、これを残留黒画素推定処理部14の
処理結果とする。本実施例の場合、図13のd1の破線
の矩形内部の黒画素はすべて黒ラン検出処理部11で検
出された図11のaの黒ランと黒画素で連続しているの
で、残留黒画素と推定される。そして、その推定される
位置に黒画素が存在しているので、残留黒画素検出処理
部13で検出された図12のb1の破線の矩形内の黒画
素も推定された黒画素として処理結果に加える。
Next, the operation of the above-described third embodiment will be described. First black run detection processor 11, black run erase processor 1
2. The processing in the residual black pixel detection processing unit 13 is the same as in the second embodiment. Further, among the processing examples of the residual black pixel estimation processing unit 14, the processing in the center calculation processing unit 21, the residual range calculation processing unit 22, and the residual range rotation processing unit 23 are the same as in the second embodiment. The continuous black pixel detection processing unit 24 detects a continuous black pixel by the black run and the black pixel detected by the black run detection processing unit 11 from the range obtained by the residual range rotation processing unit 23, and the remaining black pixels are detected. This is the processing result of the black pixel estimation processing unit 14. In the case of the present embodiment, all the black pixels inside the dashed rectangle of d1 of FIG. 13 are continuous with the black run of FIG. 11a detected by the black run detection processing unit 11, and therefore the residual black pixel It is estimated to be. Then, since the black pixel exists at the estimated position, the black pixel in the rectangle of the broken line b1 of FIG. 12 detected by the residual black pixel detection processing unit 13 is also regarded as the estimated black pixel in the processing result. Add.

【0043】そして、残留黒画素推定処理部14で推定
された図13のd1の破線の矩形内の黒画素及び図12
のb1の破線の矩形内の黒画素を、残留黒画素消去処理
部15で消去する。その結果、図14に示すようにアン
ダーラインが消去された画像が得られる。このように、
一度残留黒画素検出処理部13でアンダーラインの一部
として検出された黒画素を、その黒画素の座標をもとに
他にアンダーラインの一部が残っていると推定される座
標にも残留黒画素推定処理部14で黒画素が検出された
場合のみ消去する。従って、句点や読点等のアンダーラ
イン以外の画素が誤って消去されることを防止できる。
Then, the black pixels in the rectangle of the dashed line d1 of FIG. 13 estimated by the residual black pixel estimation processing unit 14 and FIG.
The residual black pixel erasure processing unit 15 erases the black pixels in the dashed rectangle of b1. As a result, an image in which the underlines are erased is obtained as shown in FIG. in this way,
A black pixel once detected as a part of an underline by the residual black pixel detection processing unit 13 also remains at a coordinate at which it is estimated that a part of the underline remains based on the coordinates of the black pixel. The black pixel estimation processing unit 14 erases only when a black pixel is detected. Therefore, it is possible to prevent pixels other than underlines such as punctuation marks and reading marks from being accidentally erased.

【0044】尚、上述した実施例では、横書きの文書に
付加されたアンダーラインについて説明したが、これに
限らず、黒ラン検出処理部11で検出する黒ランの範囲
を文字の右側として縦の黒ランを検出し、残留黒画素検
出処理部13で黒ランより右側から残留黒画素を検出す
るようにすれば、縦書きの文書にも適用することができ
る。また、黒画素と白画素、黒ランと白ランを置き換
え、消去する代わりに黒画素で塗りつぶすことにより反
転画像にも適用できる。
In the above embodiment, the underline added to the horizontally written document has been described. However, the present invention is not limited to this, and the range of the black run detected by the black run detection processing unit 11 is set as the right side of the character in the vertical direction. If a black run is detected and the residual black pixel detection processing unit 13 detects the residual black pixel from the right side of the black run, it can be applied to a vertically written document. It is also applicable to a reverse image by replacing black pixels with white pixels and black runs with white runs, and filling with black pixels instead of erasing.

【0045】(第4実施例)図17は、本発明の文字切
り出し装置の第4実施例のブロック図である。図示の装
置は、線図形検出処理部31、線図形消去処理部32、
線素抽出処理部33、画像合成処理部34を備える。線
図形検出処理部31は、画像上からアンダーラインを検
出し、その座標を記憶する。例えば、行の方向にある程
度以上の長さの黒ランを探索し、アンダーラインとして
検出する。具体的には、横書きであれば、行の高さより
一定値倍以上の長さで、行の下部1/3にある横向きの
黒ランをアンダーラインとして検出する。線図形消去処
理部32は、線図形検出処理部31で検出されたアンダ
ーラインを処理対象の画像から消去した画像を生成す
る。
(Fourth Embodiment) FIG. 17 is a block diagram of a character cutting device according to a fourth embodiment of the present invention. The illustrated apparatus includes a line figure detection processing section 31, a line figure erasing processing section 32,
The line element extraction processing unit 33 and the image synthesis processing unit 34 are provided. The line figure detection processing unit 31 detects an underline on the image and stores the coordinates thereof. For example, a black run having a certain length or more in the row direction is searched for and detected as an underline. Specifically, in the case of horizontal writing, a horizontal black run in the lower ⅓ of the line having a length equal to or more than a fixed value times the height of the line is detected as an underline. The line graphic erasing processing unit 32 generates an image in which the underline detected by the line graphic detecting processing unit 31 is deleted from the image to be processed.

【0046】線素抽出処理部33は、文字を構成する線
素のうちの所定のものを抽出する。抽出する線素は、予
め定められた長さ以上のものであり、アンダーラインと
交差するものである。また、そのような線素の方向は、
単数又は複数の方向である。即ち、アンダーラインと交
差し得るような線素はアンダーラインの一部ではなく、
文字の一部である可能性が高いので、線素抽出処理部3
3でそのような画素を抽出する。線素抽出処理部33で
は、必ずしも文字を構成する線素すべてが抽出される必
要はなく、線図形消去処理部32でアンダーラインとと
もに消去される可能性がある画素が含まれていれば十分
である。画像合成処理部34は、線図形消去処理部32
で得られたアンダーラインを消去した画像と、線素抽出
処理部33で得られた文字を構成する線素から成る画像
とを、オア演算をして合成する。この処理では、線図形
消去処理部32でアンダーラインとともに消去された文
字の一部を、線素抽出処理部33で得られた画像を用い
て補完する。
The line element extraction processing unit 33 extracts a predetermined one of the line elements forming a character. The line element to be extracted has a length equal to or longer than a predetermined length and intersects the underline. Also, the direction of such a line element is
Single or multiple directions. That is, the line element that can intersect the underline is not a part of the underline,
The line element extraction processing unit 3 is likely to be a part of the character.
In 3 such pixels are extracted. The line element extraction processing unit 33 does not necessarily have to extract all the line elements that form a character, and it suffices if the line pattern deletion processing unit 32 includes pixels that may be deleted together with underlines. is there. The image composition processing unit 34 uses the line figure deletion processing unit 32.
The image obtained by deleting the underline obtained in step 3 and the image formed by the line element extraction processing unit 33, which is composed of the line elements forming the character, are ORed and combined. In this processing, a part of the characters erased together with the underline in the line figure erasing processing unit 32 is complemented by using the image obtained in the line element extraction processing unit 33.

【0047】次に、上述した第4実施例の装置の動作を
説明する。図18に示す「gym」という文字列に、ア
ンダーラインが文字と重なるように付加された例につい
て処理過程を具体的に説明する。尚、説明中の座標の原
点は、画像の外接矩形の左上に取ることとする。線図形
検出処理部31では、行の高さの1.5倍以上の長さの
横方向の黒ランを、行の下1/3から探索する。行の高
さは17ドットなので、下から6ドット以内にある16
ドット以上の長さの黒ランを探索する。その結果、図1
8のa2の座標(0,13)〜(40,13)及び、図
18のb2の座標(0,14)〜(40,14)の2つ
の黒ランがアンダーラインとして検出される。
Next, the operation of the apparatus of the fourth embodiment described above will be described. A process will be specifically described with respect to an example in which an underline is added to the character string "gym" shown in FIG. 18 so as to overlap the character. The origin of the coordinates in the description is taken at the upper left of the circumscribed rectangle of the image. In the line figure detection processing unit 31, a horizontal black run having a length 1.5 times or more the height of the row is searched from the bottom 1/3 of the row. The line height is 17 dots, so it is within 6 dots from the bottom 16
Search for black runs longer than a dot. As a result,
Two black runs of coordinates (0, 13) to (40, 13) of a2 of FIG. 8 and coordinates (0, 14) to (40, 14) of b2 of FIG. 18 are detected as underlines.

【0048】線図形消去処理部32では、線図形検出処
理部31で検出された図18のa2の座標(0,13)
〜(40,13)及び、図18のb2の座標(0,1
4)〜(40,14)の2つの黒ランを消去する。その
結果、図19のような画像が得られる。この処理の結
果、文字の一部がアンダーラインとともに消去され、欠
落しているが、これを線素抽出処理部33及び画像合成
処理部34で補完する。
In the line figure erasing processing section 32, the coordinates (0, 13) of a2 in FIG. 18 detected by the line figure detecting processing section 31.
~ (40, 13) and the coordinates (0, 1) of b2 in FIG.
4) The two black runs of (40, 14) are erased. As a result, an image as shown in FIG. 19 is obtained. As a result of this processing, a part of the character is deleted along with the underline and is missing, but this is complemented by the line element extraction processing unit 33 and the image synthesis processing unit 34.

【0049】線素抽出処理部33では、まず、線図形検
出処理部31で得られた図18のa2の黒ランの座標
(0,13)〜(40,13)及び、図18のb2の座
標(0,14)〜(40,14)のY座標が“13〜1
4”であるので、アンダーラインの太さは2ドットとす
る。そして、例えば、図中縦方向にアンダーラインの太
さの2倍以上、即ち4ドット以上の太さの黒ランを探索
する。この場合、縦方向、及び左下から右上に向かう斜
め方向の2方向の黒ランを探索する。そして、その結果
得られた黒画素から成る画像を生成する。その結果を図
20に示す。尚、処理を簡略にするために上記のような
手法を用いたが、下端が線図形検出処理部31で得られ
たアンダーラインの座標より下で上端がアンダーライン
より上になる黒ランを抽出するなどの手法を用いてもか
まわない。
In the line element extraction processing unit 33, first, the coordinates (0, 13) to (40, 13) of the black run of a2 of FIG. 18 obtained by the line figure detection processing unit 31 and b2 of FIG. The Y coordinate of the coordinates (0,14) to (40,14) is "13 to 1".
Since it is 4 ", the thickness of the underline is 2 dots. Then, for example, a black run having a thickness of at least twice the thickness of the underline, that is, 4 dots or more is searched for in the vertical direction in the drawing. In this case, a black run is searched for in two directions, the vertical direction and the diagonal direction from the lower left to the upper right, and an image composed of black pixels obtained as a result is generated, the result of which is shown in FIG. Although the above method is used to simplify the process, a black run whose lower end is below the underline coordinates obtained by the line figure detection processing unit 31 and whose upper end is above the underline is extracted. You may use the method of.

【0050】画像合成処理部34では、線図形消去処理
部32で得られた図19に示す画像と、線素抽出処理部
33で得られた図20に示す画像とのオア演算を行なっ
た画像を合成する。その結果を図21に示す。このよう
にして、アンダーラインを消去した画像と、アンダーラ
インと交差する線素とを合成するようにしたため、アン
ダーラインの消去により欠如した文字の一部が補完され
る。そのため、アンダーラインの除去後に行なわれる文
字切り出し、文字認識などの処理を正常に行なうために
十分な画像が得られる。
In the image composition processing unit 34, an image obtained by performing an OR operation on the image shown in FIG. 19 obtained by the line figure erasing processing unit 32 and the image shown in FIG. 20 obtained by the line element extraction processing unit 33. To synthesize. The result is shown in FIG. In this way, since the image in which the underline is erased and the line element that intersects with the underline are combined, a part of the missing character is complemented by the underline elimination. Therefore, a sufficient image can be obtained for properly performing the processing such as character cutting and character recognition performed after removing the underline.

【0051】尚、本発明は上述した実施例に限定される
ものではなく、種々の変形が可能であることはもちろん
である。例えば、以上の説明は横書きの文書について行
なったが、縦書きであっても、黒ランの方向などを変え
ることにより同様の処理が可能である。
The present invention is not limited to the above-mentioned embodiments, and it goes without saying that various modifications can be made. For example, although the above description has been made on a horizontally written document, the same process can be performed even if the document is vertically written by changing the direction of the black run.

【0052】[0052]

【発明の効果】以上説明したように、本発明の文字切り
出し装置によれば、ヒストグラムを用いずに所定の長さ
以上の黒ランをアンダーラインとして検出するようにし
たので、次のような効果がある。 即ち、2文字以上の文字列がにじみ、かすれなどで1
つの領域となった場合には、アンダーラインでつながっ
たものとみなされるようなことはなく、本来文字である
部分がアンダーラインであるとして除去されることを防
止することができる。 また、アンダーラインと文字とが近接し、かつ画像が
傾いている場合も、アンダーラインを確実に検出し、そ
のアンダーラインの端の部分が除去できずに残っている
場合には、その部分を適切に処理することができる。 更に、アンダーラインが文字と交差している場合は、
アンダーラインの除去と同時に文字の一部が除去されて
も、アンダーラインと交差する方向の黒ランを検出して
アンダーラインを除去した後の文書画像と合成すること
により、文字が欠けることを防止することができる。
As described above, according to the character slicing device of the present invention, a black run having a predetermined length or more is detected as an underline without using a histogram. There is. In other words, a character string of 2 or more characters is blurred or blurred, and 1
In the case of two areas, it is not considered that they are connected by an underline, and it is possible to prevent a portion that is originally a character from being removed as an underline. Also, if the underline and the character are close to each other and the image is tilted, the underline is surely detected, and if the end of the underline cannot be removed and remains, remove that part. Can be treated appropriately. Furthermore, if the underline intersects a letter,
Even if a part of the character is removed at the same time as the removal of the underline, the black run in the direction intersecting with the underline is detected, and the text is combined with the document image after removing the underline to prevent the character from being missing. can do.

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

【図1】本発明の文字切り出し装置の第1実施例のブロ
ック図である。
FIG. 1 is a block diagram of a first embodiment of a character clipping device of the present invention.

【図2】外接矩形の抽出例の説明図である。FIG. 2 is an explanatory diagram of an extraction example of a circumscribing rectangle.

【図3】外接矩形の座標例の説明図である。FIG. 3 is an explanatory diagram of an example of coordinates of a circumscribed rectangle.

【図4】黒ラン探索処理例の説明図である。FIG. 4 is an explanatory diagram of an example of black run search processing.

【図5】間隙探索処理例の説明図である。FIG. 5 is an explanatory diagram of a gap search processing example.

【図6】外接矩形再抽出例の説明図である。FIG. 6 is an explanatory diagram of an example of circumscribing rectangle re-extraction.

【図7】外接矩形の最終処理結果の説明図である。FIG. 7 is an explanatory diagram of a final processing result of a circumscribing rectangle.

【図8】ヒストグラムによる画像処理例の説明図であ
る。
FIG. 8 is an explanatory diagram of an example of image processing using a histogram.

【図9】本発明の文字切り出し装置の第2及び第3実施
例のブロック図である。
FIG. 9 is a block diagram of second and third embodiments of the character segmentation device of the present invention.

【図10】残留黒画素推定処理部の詳細な構成のブロッ
ク図である。
FIG. 10 is a block diagram of a detailed configuration of a residual black pixel estimation processing unit.

【図11】黒ラン検出処理例の説明図である。FIG. 11 is an explanatory diagram of an example of black run detection processing.

【図12】残留黒画素検出処理例の説明図である。FIG. 12 is an explanatory diagram of an example of residual black pixel detection processing.

【図13】残留黒画素推定処理例の説明図である。FIG. 13 is an explanatory diagram of an example of residual black pixel estimation processing.

【図14】残留黒画素消去処理例の説明図である。FIG. 14 is an explanatory diagram of an example of residual black pixel erasing processing.

【図15】ヒストグラムによる斜行した線図形の検出例
の説明図である。
FIG. 15 is an explanatory diagram of an example of detecting a skewed line figure using a histogram.

【図16】ヒストグラムによる斜行した線図形の処理結
果例の説明図である。
FIG. 16 is an explanatory diagram of a processing result example of a skewed line figure by a histogram.

【図17】本発明の文字切り出し装置の第4実施例のブ
ロック図である。
FIG. 17 is a block diagram of a fourth embodiment of the character clipping device of the present invention.

【図18】アンダーライン検出処理例の説明図である。FIG. 18 is an explanatory diagram of an example of underline detection processing.

【図19】アンダーライン消去処理例の説明図である。FIG. 19 is an explanatory diagram of an example of underline erasing processing.

【図20】線素抽出処理例の説明図である。FIG. 20 is an explanatory diagram of an example of line element extraction processing.

【図21】画像合成処理例の説明図である。FIG. 21 is an explanatory diagram of an example of image synthesis processing.

【図22】ヒストグラムによる交差した線図形の検出例
の説明図である。
FIG. 22 is an explanatory diagram of an example of detection of intersecting line figures using a histogram.

【図23】ヒストグラムによる交差した線図形の処理結
果例の説明図である。
FIG. 23 is an explanatory diagram of an example of a processing result of intersecting line figures using a histogram.

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

1 行抽出処理部 2 外接矩形抽出処理部 3 外接矩形判別処理部 4 黒ラン探索処理部 5 間隙探索処理部 6 線図形消去処理部 7 外接矩形再抽出処理部 8 文字切り出し処理部 1 line extraction processing unit 2 circumscribed rectangle extraction processing unit 3 circumscribed rectangle discrimination processing unit 4 black run search processing unit 5 gap search processing unit 6 line figure erasing processing unit 7 circumscribed rectangle re-extraction processing unit 8 character cutout processing unit

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 文書画像から抽出された行を黒画素群の
外接矩形に切り分ける外接矩形抽出処理部と、 当該外接矩形抽出処理部により切り分けられた外接矩形
内で、黒画素の連続である黒ランが所定の長さ以上に亘
っている部分を探索する黒ラン探索処理部と、 当該黒ラン探索処理部により探索された黒ランから外接
矩形の内側にある図形と前記黒ランとの間の間隙を探索
する間隙探索処理部と、 当該間隙探索処理部により探索された外接矩形内の画像
から前記間隙よりも黒ラン側の画像を除去する線図形消
去処理部と、 当該線図形消去処理部で加工された画像に対し、再度外
接矩形抽出処理を行なう外接矩形再抽出処理部とを備え
たことを特徴とする文字切り出し装置。
1. A circumscribing rectangle extraction processing unit that divides a line extracted from a document image into a circumscribing rectangle of a black pixel group, and a black that is a series of black pixels in the circumscribing rectangle divided by the circumscribing rectangle extraction processing unit. A black run search processing unit that searches for a portion where the run extends over a predetermined length, and between the black run searched by the black run search processing unit and the figure inside the circumscribed rectangle and the black run. A gap search processing unit for searching for a gap, a line figure erasing processing unit for removing an image on the black run side of the gap from the image in the circumscribed rectangle searched by the gap searching processing unit, and the line figure erasing processing unit. A character slicing device, comprising: a circumscribing rectangle re-extracting processing unit that performs circumscribing rectangle extraction processing again on the image processed in (1).
【請求項2】 文字の書かれている行方向の所定値より
長く連続した黒画素である黒ランを消去する黒ラン消去
処理部と、 当該黒ラン消去処理部で消去されずに残留している線図
形の一部である黒画素を検出する残留黒画素検出処理部
と、 当該残留黒画素検出処理部で検出された黒画素の座標か
ら前記残留黒画素検出処理部では検出されなかった線図
形の一部である黒画素が残留していると推定される座標
を算出する残留黒画素推定処理部と、 当該残留黒画素推定処理部で推定された座標の黒画素あ
るいは前記残留黒画素推定処理部で推定された座標の黒
画素及び前記残留黒画素検出処理部で検出された黒画素
の双方を消去する残留黒画素消去処理部とを備えたこと
を特徴とする文字切り出し装置。
2. A black run erasing processing unit for erasing a black run, which is a continuous black pixel longer than a predetermined value in the row direction in which characters are written, and remains without being erased by the black run erasing processing unit. Lines that are not detected by the residual black pixel detection processing unit based on the coordinates of the black pixels detected by the residual black pixel detection processing unit that detects black pixels that are part of the A residual black pixel estimation processing unit that calculates coordinates that are estimated to have residual black pixels that are part of the figure, and a black pixel of the coordinates estimated by the residual black pixel estimation processing unit or the residual black pixel estimation A character clipping device, comprising: a residual black pixel erasing processing unit that erases both the black pixel at the coordinates estimated by the processing unit and the black pixel detected by the residual black pixel detection processing unit.
【請求項3】 前記残留黒画素検出処理部は、前記線図
形を境界として文字の反対側にある黒画素を前記線図形
の一部が残留したものとして検出し、 前記残留黒画素推定処理部は、前記残留黒画素検出処理
部で検出された黒画素と前記線図形の中心点に関し点対
称の位置にある黒画素を前記線図形の一部が残留したも
のと推定し、 前記残留黒画素消去処理部は、前記残留黒画素推定処理
部で推定された黒画素及び前記残留黒画素検出処理部で
検出された黒画素の双方を消去することを特徴とする請
求項2記載の文字切り出し装置。
3. The residual black pixel detection processing unit detects a black pixel on the opposite side of a character with the line graphic as a boundary, as a part of the line graphic remaining, and the residual black pixel estimation processing unit. Presumes that the black pixel detected by the residual black pixel detection processing unit and the black pixel at a position point-symmetrical with respect to the center point of the line figure are those in which a part of the line figure remains, and the residual black pixel The character slicing device according to claim 2, wherein the erasing processing unit erases both the black pixel estimated by the residual black pixel estimation processing unit and the black pixel detected by the residual black pixel detection processing unit. .
【請求項4】 前記残留黒画素検出処理部は、前記線図
形を境界として文字の反対側にある黒画素を前記線図形
の一部が残留したものとして一応検出し、 前記残留黒画素推定処理部は、前記残留黒画素検出処理
部で検出された黒画素と前記線図形の中心点に関し点対
称の位置に黒画素がないときは、前記残留黒画素検出処
理部で検出された黒画素は前記線図形の一部が残留した
ものではなかったと推定し、その検出結果を修正し、 前記残留黒画素消去処理部は、前記残留黒画素推定処理
部で前記線図形の一部でないと推定された黒画素を消去
しないことを特徴とする請求項2記載の文字切り出し装
置。
4. The residual black pixel detection processing unit tentatively detects a black pixel on the opposite side of a character with the line figure as a boundary, assuming that a part of the line figure remains, and the residual black pixel estimation processing is performed. When the black pixel detected by the residual black pixel detection processing unit and the black pixel at a position point-symmetric with respect to the center point of the line figure are not present, the black pixel detected by the residual black pixel detection processing unit is It is estimated that a part of the line figure is not remained, the detection result is corrected, and the residual black pixel elimination processing unit is estimated by the residual black pixel estimation processing unit to be not a part of the line figure. 3. The character slicing device according to claim 2, wherein the black pixels are not erased.
【請求項5】 文字の書かれている行方向の所定値より
長く連続した黒画素である黒ランを線図形として検出す
る線図形検出処理部と、 当該線図形検出処理部で検出された線図形を除去した画
像を処理対象の文字画像から生成する線図形消去処理部
と、 前記線図形検出処理部で検出された線図形と単数又は複
数の走査方向で交差する黒ランから成る画像を生成する
線素抽出処理部と、 前記線図形消去処理部で生成された画像と、前記線素抽
出処理部で生成された画像とを合成する画像合成処理部
とを備えたことを特徴とする文字切り出し装置。
5. A line figure detection processing unit for detecting a black run, which is a continuous black pixel longer than a predetermined value in the line direction in which characters are written, as a line figure, and a line detected by the line figure detection processing unit. A line figure erasure processing unit that generates an image from which a figure has been removed from a character image to be processed, and an image that includes a black run that intersects the line figure detected by the line figure detection processing unit in one or more scanning directions A character including a line element extraction processing unit, an image synthesis processing unit that synthesizes the image generated by the line pattern deletion processing unit, and the image generated by the line element extraction processing unit. Cutting device.
JP28603794A 1994-10-26 1994-10-26 Character segmentation device Expired - Fee Related JP3190794B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28603794A JP3190794B2 (en) 1994-10-26 1994-10-26 Character segmentation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28603794A JP3190794B2 (en) 1994-10-26 1994-10-26 Character segmentation device

Publications (3)

Publication Number Publication Date
JPH08123902A true JPH08123902A (en) 1996-05-17
JPH08123902A5 JPH08123902A5 (en) 1999-05-28
JP3190794B2 JP3190794B2 (en) 2001-07-23

Family

ID=17699162

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28603794A Expired - Fee Related JP3190794B2 (en) 1994-10-26 1994-10-26 Character segmentation device

Country Status (1)

Country Link
JP (1) JP3190794B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019036146A (en) * 2017-08-16 2019-03-07 富士ゼロックス株式会社 Image analysis apparatus and image analysis program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019036146A (en) * 2017-08-16 2019-03-07 富士ゼロックス株式会社 Image analysis apparatus and image analysis program

Also Published As

Publication number Publication date
JP3190794B2 (en) 2001-07-23

Similar Documents

Publication Publication Date Title
Antonacopoulos Page segmentation using the description of the background
JP3308032B2 (en) Skew correction method, skew angle detection method, skew correction device, and skew angle detection device
JPH05233873A (en) Area dividing method
JP2019016350A (en) Identification of emphasized text in electronic documents
JPH08287184A (en) Image cropping device and character recognition device
JP3615333B2 (en) Ruled line eraser
JP2010020394A (en) Image processing apparatus and method
JP2554187B2 (en) Basic line extraction method
JPH0773271A (en) Area division method
JP3190794B2 (en) Character segmentation device
JP4244692B2 (en) Character recognition device and character recognition program
JPH04352295A (en) System and device for identifing character string direction
JP4731748B2 (en) Image processing apparatus, method, program, and storage medium
JP4738645B2 (en) SHADED AREA DETECTING DEVICE, SHATTERED AREA DETECTING METHOD, PROGRAM, AND STORAGE MEDIUM
JP2827960B2 (en) Address line extraction device
JP3122476B2 (en) Automatic document copy machine
JPH11242716A (en) Image processing method and recording medium
JP4439054B2 (en) Character recognition device and character frame line detection method
JP3406942B2 (en) Image processing apparatus and method
JP2000040122A5 (en)
JP2003016385A (en) Image processing apparatus, method, program, and storage medium
JPH05135204A (en) Character recognition device
JPH0644406A (en) Method and device for processing image
JPH10507014A (en) Automatic determination of landscape scan in binary image
JP3024234B2 (en) Document image ruled line extraction device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees