JPH096917A - Isolation point removing method for document image - Google Patents
Isolation point removing method for document imageInfo
- Publication number
- JPH096917A JPH096917A JP7156362A JP15636295A JPH096917A JP H096917 A JPH096917 A JP H096917A JP 7156362 A JP7156362 A JP 7156362A JP 15636295 A JP15636295 A JP 15636295A JP H096917 A JPH096917 A JP H096917A
- Authority
- JP
- Japan
- Prior art keywords
- black
- pixel
- pixel section
- threshold value
- isolated point
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 73
- 238000002955 isolation Methods 0.000 title abstract 4
- 238000003491 array Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 1
- 208000002173 dizziness Diseases 0.000 description 1
- 238000005562 fading Methods 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
Landscapes
- Character Input (AREA)
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】この発明は、例えば画像読取り装
置によって読み込まれた文書画像に設定された文字領域
枠中に正規の文書画像以外の孤立点が含まれる場合に、
この孤立点を識別して除去する方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is applicable, for example, when an isolated point other than a regular document image is included in a character area frame set in a document image read by an image reading device.
The present invention relates to a method of identifying and removing this isolated point.
【0002】[0002]
【従来の技術】従来の文書画像の孤立点の除去方法の一
例が、文献:「特開平5−233879号公報」に記載
されている。この文献に記載の方法によれば、読み込ん
だ画像データ中の画素集団が除去すべき孤立点か否かを
識別するために、その画素集団の輪郭長を利用する。そ
して、画素集団の輪郭長が、設定された孤立画素輪郭長
よりも短い場合に、その画素集団を孤立点として除去す
る。2. Description of the Related Art An example of a conventional method for removing isolated points in a document image is described in the document: Japanese Patent Laid-Open No. 233879/1993. According to the method described in this document, the contour length of the pixel group is used to identify whether or not the pixel group in the read image data is an isolated point to be removed. Then, when the contour length of the pixel group is shorter than the set isolated pixel contour length, the pixel group is removed as an isolated point.
【0003】[0003]
【発明が解決しようとする課題】しかしながら、上述し
た文献に記載の方法では、画素集団の輪郭長を求めるた
めに、画素集団中の着目画素からいずれに向って輪郭が
繋がっているかを判定しなければならない。このため、
着目画素に隣接する周囲8方向の全ての画素について画
素の白黒の調査を行なうことが必要である。更に、孤立
画素の輪郭を順次に追跡して、輪郭が繋がっている全て
の画素について逐一同様の調査を行なう必要がある。However, in the method described in the above-mentioned document, in order to obtain the contour length of the pixel group, it is necessary to determine in which direction the contour is connected from the pixel of interest in the pixel group. I have to. For this reason,
It is necessary to perform a black-and-white examination of all pixels in the eight surrounding directions adjacent to the pixel of interest. Further, it is necessary to sequentially trace the contours of the isolated pixels and perform the same investigation for all the pixels having the contours connected to each other.
【0004】また、文字画像のかすれ等により、本来文
字の一部分を構成する画素集団がその文字の本体から離
れた個別の画素集団として読み込まれた場合に、輪郭長
で孤立点の判定を行なうと、この画素集団が孤立点とし
て除去されてしまう可能性がある。Further, when a pixel group that originally forms a part of a character is read as an individual pixel group apart from the main body of the character due to blurring of the character image, etc., the isolated point is determined by the contour length. , This pixel group may be removed as an isolated point.
【0005】このため、孤立点を効率的に識別して除去
できる方法の実現が望まれていた。Therefore, it has been desired to realize a method capable of efficiently identifying and removing isolated points.
【0006】[0006]
【課題を解決するための手段】この出願に係る文書画像
の孤立点除去方法によれば、文書画像中に、文字画像を
囲む文字領域枠を設定し、この文字領域枠中の画素列毎
に、当該画素列中の黒画素の数を度数としたヒストグラ
ムを作成し、このヒストグラムの度数が0である画素列
が1つ以上連続する白画素区間の画素列の数(以下、ラ
ンレングスとも称する)と、この度数が1以上である画
素列が1つ以上連続する黒画素区間の画素列の数(ラン
レングス)とを各白画素区間毎および各黒画素区間毎に
それぞれ計数し、文字領域枠の一辺の画素列を基準端と
し、黒画素区間の画素列の数についての閾値1、白画素
区間の画素列の数についての閾値2、および、基準端か
らの画素列数についての閾値3をそれぞれ設定し、黒画
素区間の画素列数が閾値1以下で、基準端から見て当該
黒画素区間の向こう側で当該黒画素区間に隣接する白画
素区間の画素列数が閾値2以上で、かつ、当該黒画素区
間の画素列数と基準端から当該黒画素区間までの間の画
素列数との和が閾値3以下である場合に、当該黒画素区
間および基準端から当該黒画素区間までの間の黒画素区
間を除去すべき孤立点として判定し、この孤立点と判定
された黒画素区間を文字領域枠中から除く位置に基準端
を変更することにより、当該孤立点を除去することを特
徴とする。尚、この発明において、文書画像の文字に
は、記号も含まれる。According to the method for removing isolated points of a document image according to this application, a character area frame surrounding a character image is set in the document image, and each pixel column in the character area frame is set. , A histogram in which the number of black pixels in the pixel row is used as a frequency, and the number of pixel rows in a white pixel section in which one or more pixel rows having a frequency of 0 in this histogram are continuous (hereinafter, also referred to as run length) ) And the number of pixel rows (run length) in a black pixel section in which one or more pixel rows having a frequency of 1 or more are consecutively counted for each white pixel section and each black pixel section, and With the pixel row on one side of the frame as the reference end, the threshold value 1 for the number of pixel rows in the black pixel section, the threshold value 2 for the number of pixel rows in the white pixel section, and the threshold value 3 for the number of pixel rows from the reference end. , And the number of pixel columns in the black pixel section The number of pixel columns in the white pixel section that is equal to or less than the threshold value 1 and is adjacent to the black pixel section on the other side of the black pixel section from the reference end is the threshold value 2 or more, and the number of pixel rows in the black pixel section and the reference value If the sum of the number of pixel columns from the edge to the black pixel section is less than or equal to the threshold value 3, an isolated point from which the black pixel section and the black pixel section from the reference edge to the black pixel section should be removed It is characterized in that the isolated point is removed by changing the reference end to a position where the black pixel section determined to be the isolated point is excluded from the character area frame. Incidentally, in the present invention, the characters of the document image include symbols.
【0007】[0007]
【作用】この出願に係る文書画像の孤立点除去方法によ
れば、設定された文字領域中の黒画素のヒストグラムを
作成し、このヒストグラムに基づいて、白画素区間のラ
ンレングスと黒画素区間のランレングスとを各白画素区
間毎および各黒画素区間毎にそれぞれ計数する。そし
て、これらランレングスと閾値1〜閾値3を比較するこ
とにより除去すべき孤立点を識別する。According to the method for removing isolated points of a document image according to this application, a histogram of black pixels in a set character region is created, and the run length of the white pixel section and the black pixel section are created based on this histogram. The run length is counted for each white pixel section and each black pixel section. Then, an isolated point to be removed is identified by comparing these run lengths with threshold values 1 to 3.
【0008】閾値1は、一般に、孤立点は画素集団が小
さく、正規の文字のランレングスに比べて孤立点のラン
レングスが短いことを利用するために設定する。この閾
値1のランレングスは、例えば文字幅の最小値を基準と
するとよい。そして、黒画素区間のランレングスが閾値
1よりも短いことを、当該黒画素を孤立点として識別す
るための要件とする。The threshold value 1 is generally set to utilize the fact that the isolated point has a small pixel group and the run length of the isolated point is shorter than the run length of the regular character. The run length of this threshold value 1 may be based on, for example, the minimum value of the character width. The run length of the black pixel section being shorter than the threshold value 1 is a requirement for identifying the black pixel as an isolated point.
【0009】ところで、ランレングスが短いものを孤立
点として一律に除去すると、本来文書画像の一部分であ
りながら、かすれ等のために、文字の本体から離れてし
まった孤立点、あるいは、ひらがなの「か」のように文
字を構成する画でありながら当該文字の他の画から離れ
ている孤立点(1画)を除去すべき孤立点として除去し
てしまうおそれがある。By the way, if a short run length is uniformly removed as an isolated point, an isolated point or a hiragana character which is originally a part of the document image but has been separated from the body of the character due to faintness etc. There is a risk that an isolated point (one image) which is an image forming a character such as “ka” but distant from the other image of the character may be removed as an isolated point to be removed.
【0010】そこで、この発明では、除去すべきでない
孤立点を残すために、白画素区間のランレングスの長さ
に関する閾値2を設定する。閾値2は、一般に、正規の
文書画像の直近の孤立点は、文字本体の一部である可能
性が高いことを利用する。このため、閾値2のランレン
グスは、例えば、正規の文字同士の間の間隔の最大値を
基準にするとよい。そして、基準端から見て孤立点の向
こう側で孤立点に隣接する白画素区間のランレングスが
閾値2よりも長いことを、その孤立点を除去すべき孤立
点として識別するための1つの要件とする。Therefore, in the present invention, in order to leave an isolated point that should not be removed, a threshold value 2 relating to the run length length of the white pixel section is set. The threshold 2 generally utilizes that the nearest isolated point of the regular document image is likely to be a part of the character body. Therefore, the run length of the threshold 2 may be based on, for example, the maximum value of the intervals between the regular characters. Then, one requirement for identifying that the run length of the white pixel section adjacent to the isolated point on the far side of the isolated point from the reference end is longer than the threshold value 2 is an isolated point to be removed. And
【0011】ところで、例えば「い」や「ハ」のよう
に、1文字でありながら文字を構成する各画が互いに離
間して存在する文字がある。以下、このような文字を離
間文字と称する。離間文字の各画のランレングスは、通
常、閾値1よりも短い。その上、離間文字と次の文字と
の間の白画素区間のランレングスは、通常、閾値2より
も長い。このため、閾値1と閾値2のみを用いて孤立点
を判定すると、このような離間文字は、除去すべき孤立
点が複数個互いに近接したものとして識別されるおそれ
が高い。By the way, there are some characters such as "i" and "c" in which each image constituting a character is present apart from each other. Hereinafter, such a character is referred to as a space character. The run length of each stroke of the separated characters is usually shorter than the threshold value 1. Moreover, the run length of the white pixel section between the spaced character and the next character is typically longer than the threshold of 2. Therefore, if the isolated point is determined using only the threshold 1 and the threshold 2, such a separated character is likely to be identified as a plurality of isolated points that are to be removed being close to each other.
【0012】そこで、この発明では、離間文字を残すた
めに、基準端からの画素列数(合計のランレングス)に
関する閾値3を設定する。閾値3は、離間文字も、離間
した各黒画素区間を合わせたランレングスと離間文字の
黒画素区間の間の白画素区間のランレングスとの合計の
ランレングスは、一定以上(通常1文字程度以上)の長
さになることを利用する。このため、閾値3のランレン
グスは、例えば、文字幅の最小値を基準として設定する
とよい。また、閾値3のランレングスは、閾値1のラン
レングスよりも長いことが必要である。そして、この合
計のランレングスを、着目する黒画素区間のランレング
スと基準端から着目する黒画素区間までの間に含まれる
黒画素区間および白画素区間のランレングスとの合計ラ
ンレングスとして表す。そして、この合計のランレング
スが閾値3よりも短いことを、基準端から当該黒画素区
間までの間の全黒画素区間を除去すべき孤立点として識
別するための1つの要件とする。Therefore, according to the present invention, the threshold value 3 relating to the number of pixel columns from the reference end (total run length) is set in order to leave the separated characters. The threshold value 3 is such that the total run length of the separated characters is also a certain value or more (usually about one character, the run length of the combined black pixel sections of the separated characters and the run length of the white pixel section between the black pixel sections of the separated characters). (Above) is used. Therefore, the run length of the threshold value 3 may be set, for example, based on the minimum value of the character width. Further, the run length of the threshold value 3 needs to be longer than the run length of the threshold value 1. Then, this total run length is represented as a total run length of the run length of the black pixel section of interest and the run lengths of the black pixel section and the white pixel section included between the reference end and the black pixel section of interest. Then, the fact that the total run length is shorter than the threshold value 3 is one requirement for identifying all black pixel sections from the reference end to the black pixel section as isolated points to be removed.
【0013】従って、この発明の孤立点除去方法によれ
ば、閾値1〜3の3つの閾値とランレングスとを比較し
て除去すべき孤立点を容易に識別を図ることができる。
また、閾値2を設定することにより、かすれ等によって
生じた除去すべきでない孤立点を残すことができる。ま
た、閾値3を設定することにより、「ハ」といった離間
文字を誤って除去する恐れを少なくすることができる。
従って、除去すべき孤立点の効率よい識別、除去を図る
ことができ、特に、文字領域枠で囲まれた文字領域の周
辺部にある孤立点の除去に用いて好適である。Therefore, according to the isolated point removing method of the present invention, it is possible to easily identify the isolated point to be removed by comparing the three thresholds of the threshold values 1 to 3 with the run length.
Further, by setting the threshold value 2, it is possible to leave an isolated point which should not be removed and which is caused by blurring or the like. Further, by setting the threshold value 3, it is possible to reduce the risk of accidentally removing a separated character such as “C”.
Therefore, it is possible to efficiently identify and remove the isolated points to be removed, and it is particularly suitable for removing the isolated points in the peripheral portion of the character area surrounded by the character area frame.
【0014】[0014]
【実施例】以下、図面を参照して、この出願に係る発明
の文書画像の孤立点除去方法の実施例について説明す
る。尚、参照する図面は、これらの発明が理解できる程
度に、各手順を概略的に示したものにすぎない。従っ
て、この発明は図示例にのみ限定されるものではない。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a document image isolated point removing method according to the present invention will be described below with reference to the drawings. It should be noted that the drawings to be referred to are merely schematic illustrations of respective procedures to the extent that these inventions can be understood. Therefore, the present invention is not limited to the illustrated examples.
【0015】(実施例1)実施例1では、横書きの文書
画像の孤立点除去方法の一例について説明する。図1
に、実施例1における、孤立点除去方法の概略的な手順
のフローチャートを示す。(Embodiment 1) In Embodiment 1, an example of a method for removing isolated points in a horizontally written document image will be described. FIG.
FIG. 9 shows a flowchart of a schematic procedure of the isolated point removing method in the first embodiment.
【0016】先ず、図1の(a)に示す文字領域枠設定
の手順について説明する。この実施例では、例えばイメ
ージリーダを用いて2値化した文書画像を読み込む。そ
して、従来周知の方法を用いて、文書画像中に、文字画
像を囲む文字領域枠を設定する。First, the procedure for setting the character area frame shown in FIG. 1A will be described. In this embodiment, a binarized document image is read using an image reader, for example. Then, using a conventionally known method, a character area frame surrounding the character image is set in the document image.
【0017】そして、従来周知の表解析の手法を用いて
文字領域枠を設定する。このため、先ず、文書画像を複
数の表状の長方形部分に分割し、各画素の座標をx、y
軸直交座標系で表す。尚、長方形部分の各辺は、xまた
はy座標と平行になっている。そして、各長方形部分内
の白画素同士の連結成分を求める。次に、その白画素の
連結成分の内部に存在する黒画素を文字領域(セル)と
判定する。次に、セルと判定した黒画素の、xおよびy
がそれぞれ最大値の組および最小値の組の(x、y)座
標をそれぞれ求め、xおよびyの最小値の組の座標と最
大値の組の座標とを対角点とする長方形の文字領域枠1
0を設定する。この文字領域枠10に囲まれた領域が文
字領域12となる。Then, the character area frame is set by using a conventionally known table analysis method. Therefore, first, the document image is divided into a plurality of tabular rectangular portions, and the coordinates of each pixel are x, y.
Expressed in an axis-orthogonal coordinate system. Note that each side of the rectangular portion is parallel to the x or y coordinate. Then, the connected component of the white pixels in each rectangular portion is obtained. Next, the black pixel existing inside the connected component of the white pixel is determined as a character area (cell). Next, x and y of the black pixel determined to be a cell
Is a rectangular character area in which the (x, y) coordinates of the maximum value set and the minimum value set are respectively obtained, and the coordinates of the minimum value set of x and y and the maximum value set are diagonal points. Frame 1
Set to 0. The area surrounded by the character area frame 10 becomes a character area 12.
【0018】このようにして文書画像中に文字領域枠1
0を設定した様子を図2の(A)に示す。この実施例で
は、「車両費」という横書きの文字画像14を囲む文字
領域枠10を設定しているが、文字領域枠中の左端に不
要な孤立点16が誤って含まれている。In this way, the character area frame 1 is included in the document image.
A state in which 0 is set is shown in FIG. In this embodiment, the character area frame 10 that encloses the horizontally written character image 14 of "vehicle cost" is set, but an unnecessary isolated point 16 is erroneously included at the left end in the character area frame.
【0019】次に、図1の(b)に示すヒストグラム作
成の手順について説明する。文字領域枠が設定された
後、この文字領域枠中の画素列毎に、当該画素列中の黒
画素の数を度数としたヒストグラムを作成する。この実
施例では、横書きの行に対して垂直な縦方向に並んだ画
素を1つの画素列とする。従って、1つの画素列中の画
素の数は、行の高さの画素の数となる。Next, the procedure for creating the histogram shown in FIG. 1B will be described. After the character area frame is set, for each pixel row in this character area frame, a histogram is created with the number of black pixels in the pixel row as the frequency. In this embodiment, the pixels arranged in the vertical direction perpendicular to the horizontally written row are set as one pixel column. Therefore, the number of pixels in one pixel column is the number of pixels at the row height.
【0020】図2の(B)に、実施例1で作成した黒画
素のヒストグラムを示す。各文字画像に対応するヒスト
グラムの他に、文字画像領域12の左端の孤立点16に
対応するヒストグラムが作成される。FIG. 2B shows a histogram of black pixels created in the first embodiment. In addition to the histogram corresponding to each character image, a histogram corresponding to the isolated point 16 at the left end of the character image area 12 is created.
【0021】次に、図1の(c)に示すランレングス作
成の手順および(d)に示す基準端の設定について説明
する。Next, the procedure for creating the run length shown in FIG. 1C and the setting of the reference end shown in FIG. 1D will be described.
【0022】ランレングスの作成にあたっては、ヒスト
グラムの度数が0である画素列が1つ以上連続する白画
素区間の画素列の数(ランレングス)と、この度数が1
以上である画素列が1つ以上連続する黒画素区間の画素
列の数(ランレングス)とを各白画素区間毎および各黒
画素区間毎にそれぞれ計数する。In creating the run length, the number of pixel rows (run length) in the white pixel section in which one or more pixel rows whose histogram frequency is 0 is continuous, and this frequency is 1
The number of pixel rows (run length) in the black pixel section in which one or more pixel rows are continuous is counted for each white pixel section and each black pixel section.
【0023】この実施例で用いた文字領域枠の設定方法
では、文字領域枠の両端は黒画素区間となる。そして、
黒画素区間と白画素区間とは原則交互に並ぶ。但し、文
書画像が1文字のみ又は1つの孤立点のみの場合は、1
つの黒画素区間だけになることもある。In the character area frame setting method used in this embodiment, both ends of the character area frame are black pixel sections. And
In principle, black pixel sections and white pixel sections are alternately arranged. However, if the document image has only one character or one isolated point, 1
It may be only one black pixel section.
【0024】また、この実施例では、文字領域枠10の
左端の一辺の画素列を基準端18とする。尚、基準端1
8を決めるのはランレングスを設定した後である必要は
なく、文字領域枠を設定後に決めることもできる。従っ
て、図1のフローチャートにおいては、(d)の基準端
設定の処理は、(b)の後から(f)の前のどの段階で
あってもよい。そして、この実施例では、この基準端1
8に近い側から、各黒画素区間および白画素区間毎にそ
れぞれ順次に番号をつける。Further, in this embodiment, the pixel row on the left side of the character area frame 10 is used as the reference edge 18. The reference end 1
It is not necessary to determine 8 after setting the run length, but it is also possible to determine 8 after setting the character area frame. Therefore, in the flowchart of FIG. 1, the process of setting the reference end in (d) may be performed at any stage after (b) and before (f). In this embodiment, the reference end 1
Numbers are sequentially assigned to each black pixel section and each white pixel section from the side closer to 8.
【0025】ここでは、便宜上、黒画素区間を「black
n」または「black n(m)」と表記する。ここで、n
は、その黒画素区間が基準端18側からn番目であるこ
とを示す自然数であり、mは、その黒画素区間のランレ
ングス、即ち、その黒画素区間中に含まれる画素列の数
を示す自然数である。例えば、black 1(8)は、基準
端に1番近い黒画素区間のランレングスが8画素列分で
あることを表す。同様にして、white 1は172、blac
k 2は49、white 2は155、black 3は47、whit
e 3は154、black 4は48画素列分である。Here, for convenience, the black pixel section is designated as "black".
Notated as "n" or "black n (m)". Where n
Is a natural number indicating that the black pixel section is the nth from the reference end 18 side, and m indicates the run length of the black pixel section, that is, the number of pixel columns included in the black pixel section. It is a natural number. For example, black 1 (8) indicates that the run length of the black pixel section closest to the reference end is 8 pixel columns. Similarly, white 1 is 172, blac
k 2 is 49, white 2 is 155, black 3 is 47, whit
e 3 is 154, and black 4 is 48 pixel columns.
【0026】次に、図1の(e)に示す閾値設定につい
て説明する。孤立点の判定の基準となる閾値として、黒
画素区間の画素列の数についての閾値1、白画素区間の
画素列の数についての閾値2、および、基準端からの画
素列数についての閾値3をそれぞれ設定する。この実施
例では、閾値1を文字の幅を基準にして、18(画素)
と設定する。また、閾値2を文字間隔を基準にして、1
2(画素)と設定する。また、閾値3を、文字の幅を基
準にしかつ閾値1よりも大きな値である24(画素)と
設定する。Next, the threshold setting shown in FIG. 1E will be described. As a threshold value used as a reference for determining an isolated point, a threshold value 1 for the number of pixel rows in the black pixel section, a threshold value 2 for the number of pixel rows in the white pixel section, and a threshold value 3 for the number of pixel rows from the reference end. Are set respectively. In this embodiment, the threshold value 1 is 18 (pixels) based on the width of the character.
And set. In addition, the threshold value 2 is 1 based on the character spacing.
Set to 2 (pixels). Further, the threshold value 3 is set to 24 (pixels) which is a value larger than the threshold value 1 on the basis of the width of the character.
【0027】次に、図1の(f)に示す孤立点判定およ
び(g)に示す孤立点除去について、図3を参照して、
説明する。図3は、実施例1における、孤立点の判定お
よび除去のフローチャートを示す。Next, with respect to the isolated point determination shown in FIG. 1F and the isolated point removal shown in FIG.
explain. FIG. 3 shows a flowchart of the determination and removal of isolated points in the first embodiment.
【0028】この発明では、文字領域枠中の基準端18
とこの基準端18に直近の文字画像との間にある孤立点
を識別する。従って、文字画像が識別されれば、孤立点
の判定は終了し、文字画像が検出されなければ、孤立点
の判定・除去を原則続ける。このため、この実施例で
は、孤立点の判定・除去の処理の終了を判断するため
に、次の〜のいずれかの条件に該当した段階で処理
を終了する。先ず、文字領域枠中の全ての黒画素につ
いて判定を行なった場合(例えば、文字領域枠中に孤立
点しか含まれない場合に該当する。)は終了する。ま
た、孤立点か否か判定しようとする黒画素区間中に、
黒画素の度数が、行の1/2以上のものが含まれている
場合は終了する。この場合、その黒画素区間のランレン
グスの長さにかかわらず、その黒画素区間を文字画像と
識別する。また、判定しようとする黒画素区間のラン
レングスが閾値1の値よりも大きい場合もその黒画素区
間を文字画像と識別して処理を終了する。In the present invention, the reference end 18 in the character area frame is
An isolated point between the character image and the character image closest to the reference end 18 is identified. Therefore, if the character image is identified, the determination of the isolated point is completed, and if the character image is not detected, the determination / removal of the isolated point is continued in principle. Therefore, in this embodiment, in order to determine the end of the process of determining / removing an isolated point, the process is terminated when any one of the following conditions (1) to (4) is satisfied. First, when the determination is made for all the black pixels in the character area frame (for example, this corresponds to the case where the character area frame includes only isolated points), the process ends. In addition, during the black pixel section to determine whether it is an isolated point,
If the frequency of the black pixels is equal to or greater than ½ of the row, the process ends. In this case, the black pixel section is identified as a character image regardless of the run length of the black pixel section. Also, if the run length of the black pixel section to be determined is larger than the threshold value 1, the black pixel section is identified as a character image, and the process ends.
【0029】次に、図3のフローチャートに沿って、判
定・除去の手順について説明する。尚、図3のフローチ
ャート中においては、基準端側からi番目の黒画素区間
のおよびそのランレングスを「black [i] 」と表記し、
また、基準端からi番目の白画素区間のランレングスを
「white [i] 」と表記する。Next, the procedure of determination / removal will be described with reference to the flowchart of FIG. In the flowchart of FIG. 3, the run length of the i-th black pixel section from the reference end side and its run length are expressed as “black [i]”,
Further, the run length of the i-th white pixel section from the reference end is expressed as “white [i]”.
【0030】この実施例では、先ず、(イ)において引
数i等の初期設定を行なう。この初期設定においては、
「first=1」,「end=black[i]の個数」,
「i=1」を設定する。例えば、図2の(c)に示すよ
うに、黒画素区間がblack 1〜black 4までの4区間あ
る場合は、end=black[i]の個数=4となる。In this embodiment, first, the initial setting of the argument i and the like is performed in (a). In this initial setting,
"First = 1", "end = number of black [i]",
Set “i = 1”. For example, as shown in (c) of FIG. 2, when there are four black pixel sections from black 1 to black 4, the number of end = black [i] = 4.
【0031】次に、(ロ)において、上記の終了条件
に該当するか否かを判定する。即ち「i=end?」で
i=4の場合に処理を終了する。一方、i≠4(実際に
はi=1〜3)の場合は、次の(ハ)の手順へ進む。Next, in (b), it is determined whether or not the above termination condition is met. That is, the process ends when “i = end?” And i = 4. On the other hand, when i ≠ 4 (actually i = 1 to 3), the procedure proceeds to the next step (c).
【0032】(ハ)においては、上記の終了条件に該
当するか否かを判定する。即ち、判定しようとする黒画
素区間black[i]に含まれる画素列(単に列とも称する)
で黒画素の度数が行の高さの1/2以上の列が存在する
場合は処理を終了する。一方存在しない場合は、次に
(ニ)の手順へ進む。In (c), it is determined whether or not the above termination condition is met. That is, a pixel column included in the black pixel section black [i] to be determined (also simply referred to as a column)
If there is a column in which the frequency of black pixels is ½ or more of the row height, the process ends. On the other hand, if it does not exist, proceed to step (d).
【0033】(ニ)においては、上記の終了条件に該
当するか否かを判定する。即ち、判定しようとする黒画
素区間が、文字画像なのか孤立点であるのかを判定す
る。In (d), it is determined whether or not the above termination condition is met. That is, it is determined whether the black pixel section to be determined is a character image or an isolated point.
【0034】図2に示すblack 1(8)について判定を
行なうと、閾値1=18であるので、8<18である。
従って、black 1は、終了条件には該当せず、ランレ
ングスが閾値1以下で孤立点であるとして(但し、除去
すべき孤立点とは限らない)、次の(ホ)の手順へ進
む。When a determination is made for black 1 (8) shown in FIG. 2, the threshold value 1 = 18, and thus 8 <18.
Therefore, black 1 does not correspond to the end condition, and if the run length is equal to or less than the threshold value 1 and is an isolated point (however, it is not necessarily an isolated point to be removed), the process proceeds to the next step (e).
【0035】(ホ)においては、閾値2および閾値3を
用いて、この孤立点が除去すべき孤立点か否かを判定す
る。In (e), threshold 2 and threshold 3 are used to determine whether or not this isolated point is an isolated point to be removed.
【0036】先ず、基準端から見て当該黒画素区間の向
こう側で当該黒画素区間に隣接する白画素区間のランレ
ングスが閾値2以上であるか否かを判定する。First, it is determined whether or not the run length of the white pixel section adjacent to the black pixel section on the other side of the black pixel section from the reference end is equal to or greater than the threshold value 2.
【0037】図2に示すblack 1(8)について判定を
行なうと、black 1の次のwhite 1(172)のランレ
ングスが閾値2以上であるかを判断することになる。こ
の場合、white 18172)閾値2=12であるので、
172>12である。When black 1 (8) shown in FIG. 2 is judged, it is judged whether the run length of white 1 (172) next to black 1 is equal to or greater than the threshold value 2. In this case, white 18172) threshold 2 = 12, so
172> 12.
【0038】そして、当該黒画素区間の画素列数と基準
端18から当該黒画素区間までの間の画素列数との和が
閾値3以下であるか否かの判定をする。Then, it is determined whether or not the sum of the number of pixel columns in the black pixel section and the number of pixel rows from the reference end 18 to the black pixel section is less than or equal to the threshold value 3.
【0039】図2に示すblack 1(8)について判定を
行なうと、black 1(8)<閾値3(=24)である。When black 1 (8) shown in FIG. 2 is judged, black 1 (8) <threshold value 3 (= 24).
【0040】従って、判定しようとする黒画素区間およ
び基準端18から当該黒画素区間までの間の黒画素区間
を除去すべき孤立点として判定する。この場合は、blac
k 1と基準端18との間に他の黒画素が存在しないので
black 1(8)のみが除去すべき孤立点と判定され、次
の(ヘ)の手順へ進む。Therefore, the black pixel section to be judged and the black pixel section between the reference end 18 and the black pixel section are judged as isolated points to be removed. In this case, blac
Since there are no other black pixels between k 1 and the reference edge 18,
Only black 1 (8) is determined to be an isolated point to be removed, and the procedure proceeds to the next step (f).
【0041】尚、white 1<閾値2、または、black 1
>閾値3の場合は、black 1は単独で除去すべき孤立点
ではないと判定して、次のblack 2について判定を行な
うために、(ト)において引数iを1増じてから(ロ)
の手順へ戻る。It should be noted that white 1 <threshold value 2 or black 1
> If the threshold value is 3, it is determined that black 1 is not an isolated point that should be removed independently, and the argument i is incremented by 1 in (g) to determine the next black 2 (b).
Return to step.
【0042】(ヘ)の手順において、この孤立点と判定
された黒画素区間を文字領域枠中から除く位置に基準端
18を変更することにより、当該孤立点を除去する。こ
こでは、black 2のうちの初めの基準端18に最も近い
画素列に、新しい基準端18aを設定する。その結果、
初めの基準端18からwhite 1のうちの初めの基準端1
8から最も遠い画素列まで即ち、black 1およびwhite
1が除去される。孤立点を除去して設定した文字領域枠
10aを図2の(D)に示す。In the procedure (f), the isolated point is removed by changing the reference end 18 to a position where the black pixel section determined to be the isolated point is excluded from the character area frame. Here, a new reference end 18a is set to the pixel row closest to the first reference end 18 of black 2. as a result,
From the first reference end 18 to the first reference end 1 of white 1
From 8 to the furthest pixel row, ie black 1 and white
1 is removed. The character area frame 10a set by removing the isolated points is shown in FIG.
【0043】以下、黒画素区間または白画素区間中の画
素列のうち、基準端に最も近い画素列を「頭端」と称
し、基準端から最も遠い画素列を「尾端」と称す。Hereinafter, among the pixel rows in the black pixel section or the white pixel section, the pixel row closest to the reference end is referred to as "head edge", and the pixel row farthest from the reference end is referred to as "tail edge".
【0044】次に、black 2以降の黒画素列の判定を行
なうため、(チ)においてfirstを1増じ、更に
(ト)において引数iを1増じてから(ロ)の手順へ戻
る。Next, in order to determine the black pixel rows after black 2, the first is incremented by 1 in (h), the argument i is incremented by 1 in (t), and the procedure returns to (b).
【0045】このようにして、最初に設定された文字領
域枠10の基準端18と、文字領域枠10中であって基
準端18に直近の正規の文字画像(ここでは「車」)と
の間に存在する除去すべき孤立点16を除去することが
できる。尚、例えば、実施例1において「費」の文字画
像の右側に孤立点が存在する場合は、文字領域枠10の
右側の一辺の画素列を基準端として、実施例1と同様の
手順により孤立点を除去することができる。従って、横
書きの文字画像の場合、基準端を文字領域枠の左右両側
にそれぞれ設定して、それぞれ孤立点を除去することが
望ましい。In this way, the reference end 18 of the character area frame 10 initially set and the regular character image (here, “car”) in the character area frame 10 and closest to the reference end 18 are formed. It is possible to remove the isolated points 16 existing between and to be removed. Note that, for example, in the first embodiment, when there is an isolated point on the right side of the character image “Cost”, the pixel row on the right side of the character area frame 10 is used as a reference end, and the procedure is the same as that of the first embodiment. Points can be removed. Therefore, in the case of a horizontally written character image, it is desirable to set the reference end on each of the left and right sides of the character area frame and remove the isolated points.
【0046】(実施例2)実施例2では、横書きの文書
画像の孤立点除去方法の一例について説明する。実施例
2においても実施例1と同様にして文字領域枠20を設
定する。ここでは、図4の(A)に示すように「合計」
という横書きの文字画像24を囲む文字領域枠20を設
定しているが、「計」の文字の第8画目の横棒の右端
が、かすれのために文字の本体から離間して孤立点26
となっている。(Embodiment 2) In Embodiment 2, an example of a method for removing isolated points from a horizontally written document image will be described. In the second embodiment, the character area frame 20 is set as in the first embodiment. Here, as shown in FIG. 4A, “total”
Although the character area frame 20 surrounding the horizontally written character image 24 is set, the right end of the horizontal bar of the 8th stroke of the character “total” is separated from the main body of the character due to fading and the isolated point 26
It has become.
【0047】次に、実施例1の場合と同様にして、図4
の(B)に示すヒストグラムを作成する。Next, as in the case of the first embodiment, as shown in FIG.
The histogram shown in (B) is created.
【0048】そして、このヒストグラムに基づいて図4
の(C)に示すランレングスを作成する。実施例2で
は、文字領域枠の右端の画素列を基準端28とする。そ
して、この基準端28に近い側から、各黒画素区間およ
び白画素区間毎にそれぞれ順次に番号をつける。ここで
は、black 1(6)、white 1(3)、black 2
(7)、white 2(11)、black 3(19)、white
3(356)およびblack 4(45)のランレングスを
作成する。Then, based on this histogram, FIG.
The run length shown in (C) is created. In the second embodiment, the pixel row at the right end of the character area frame is the reference end 28. Then, from the side close to the reference end 28, numbers are sequentially assigned to each black pixel section and each white pixel section. Here, black 1 (6), white 1 (3), black 2
(7), white 2 (11), black 3 (19), white
Create run lengths of 3 (356) and black 4 (45).
【0049】次に、実施例1で参照した図3のフローチ
ャートに従って、孤立点の判定・除去の処理を行なう。
実施例2においても、実施例1と同一の閾値1〜閾値3
を使用する。Next, according to the flowchart of FIG. 3 referred to in the first embodiment, the process of determining and removing isolated points is performed.
Also in the second embodiment, the same threshold values 1 to 3 as those in the first embodiment are used.
To use.
【0050】図3の「開始」から(イ)、(ロ)および
(ハ)における手順は図1と同様であるので説明を省略
する。The procedures from (start) to (a), (b) and (c) in FIG. 3 are the same as in FIG.
【0051】(ニ)においては、black 1(6)につい
て判定すると、black 1(6)<閾値1(=18)であ
る。従って、black 1(6)は、孤立点(但し、除去す
べき孤立点とは限らない)と判断される。そして、次の
(ホ)の手順へ進む。In (d), when black 1 (6) is determined, black 1 (6) <threshold 1 (= 18). Therefore, black 1 (6) is determined as an isolated point (however, it is not limited to an isolated point to be removed). Then, the procedure proceeds to the next step (e).
【0052】(ホ)においては、閾値2および閾値3を
用いて、この孤立点が除去すべき孤立点か否かを判定す
る。In (e), it is determined whether the isolated point is an isolated point to be removed by using the threshold 2 and the threshold 3.
【0053】先ず、基準端28から見てblack 1(6)
の向こう側で当該黒画素区間に隣接するwhite 1のラン
レングスが閾値2以上であるか否かを判定する。white
1(3)<閾値2(=12)であるので、black 1
(6)は、除去すべき孤立点ではないと判定される。First, black 1 (6) as seen from the reference end 28.
It is determined whether the run length of white 1 adjacent to the black pixel section on the other side is equal to or greater than the threshold value 2. white
Since 1 (3) <threshold value 2 (= 12), black 1
It is determined that (6) is not an isolated point to be removed.
【0054】次のblack 2について判定を行なうため
に、(ト)において引数iを1増じてから(ロ)の手順
へ戻る。そして、この段階ではi=2≠4=endであ
るので、(ロ)の判定で終了とはならずに次の(ハ)の
手順へ進む。In order to make a determination for the next black 2, the argument i is incremented by 1 in (g), and the procedure returns to (b). Since i = 2 ≠ 4 = end at this stage, the process does not end with the determination of (b) and proceeds to the next procedure of (c).
【0055】black 2に含まれる画素列には、黒画素の
度数が行の高さの1/2以上の列が存在する。従って、
(ハ)において、black 2は、文字画像と判定される。
そして、black 2以降の黒画素区間も文字画像として、
処理を終了する。従って、実施例2では、文字領域枠2
0は変更されず、かすれによって生じた孤立点を残すこ
とができる。In the pixel columns included in black 2, there are columns in which the frequency of black pixels is ½ or more of the row height. Therefore,
In (c), black 2 is determined to be a character image.
And the black pixel section after black 2 is also a character image,
The process ends. Therefore, in the second embodiment, the character area frame 2
0 is unchanged and can leave an isolated point caused by a blur.
【0056】(実施例3)実施例3では、横書きの文書
画像の孤立点除去方法の一例について説明する。実施例
3においても実施例1と同様にして文字領域枠30を設
定する。ここでは、図5の(A)に示すように「31
0,465」という横書きの文字画像34を囲む文字領
域枠30を設定しているが、文字領域枠30の左端付近
に、互いに近接した第1孤立点36aおよび第2孤立点
36bが存在している。(Third Embodiment) In a third embodiment, an example of a method for removing isolated points in a horizontally written document image will be described. In the third embodiment as well, the character area frame 30 is set as in the first embodiment. Here, as shown in FIG.
Although the character area frame 30 surrounding the horizontally written character image 34 of "0,465" is set, the first isolated point 36a and the second isolated point 36b that are close to each other exist near the left end of the character area frame 30. There is.
【0057】次に、実施例1の場合と同様にして、図5
の(B)に示すヒストグラムを作成する。Next, as in the case of Embodiment 1, FIG.
The histogram shown in (B) is created.
【0058】そして、このヒストグラムに基づいて図5
の(C)に示すランレングスを作成する。実施例3で
は、文字領域枠30の左端の画素列を(初めの)基準端
38とする。そして、この基準端38に近い側から、各
黒画素区間および白画素区間毎にそれぞれ順次に番号を
つける。ここでは、black 1(8)、white 1(5)、
black 2(9)、white 2(125)、black 3(2
1)などのランレングスを作成する。Then, based on this histogram, FIG.
The run length shown in (C) is created. In the third embodiment, the pixel row at the left end of the character area frame 30 is the (first) reference end 38. Then, from the side close to the reference end 38, numbers are sequentially assigned to each black pixel section and each white pixel section. Here, black 1 (8), white 1 (5),
black 2 (9), white 2 (125), black 3 (2
Create run lengths such as 1).
【0059】次に、実施例1で参照した図3のフローチ
ャートに従って、孤立点の判定・除去の処理を行なう。
実施例3においても、実施例1と同一の閾値1〜閾値3
を使用する。Next, according to the flowchart of FIG. 3 referred to in the first embodiment, the process of determining and removing isolated points is performed.
Also in the third embodiment, the same threshold values 1 to 3 as those in the first embodiment
To use.
【0060】図3の「開始」から(イ)、(ロ)および
(ハ)における手順は図1と同様であるので説明を省略
する。The procedure from (start) to (a), (b) and (c) in FIG. 3 is the same as that in FIG.
【0061】次に、(ニ)において、第1孤立点16a
のblack 1(8)について判定すると、black 1(8)
<閾値1(=18)である。従って、black 1(6)
は、孤立点(但し、除去すべき孤立点とは限らない)と
判断される。そして、次の(ホ)の手順へ進む。Next, in (d), the first isolated point 16a
Judgment about black 1 (8) of black 1 (8)
<Threshold 1 (= 18). Therefore, black 1 (6)
Is determined to be an isolated point (but not necessarily an isolated point to be removed). Then, the procedure proceeds to the next step (e).
【0062】(ホ)においては、閾値2および閾値3を
用いて、この孤立点が除去すべき孤立点か否かを判定す
る。In (e), threshold 2 and threshold 3 are used to determine whether or not this isolated point is an isolated point to be removed.
【0063】先ず、基準端38から見てblack 1(6)
の向こう側で当該黒画素区間に隣接するwhite 1のラン
レングスが閾値2以上であるか否かを判定する。white
1(5)<閾値2(=12)であるので、black 1
(6)は、除去すべき孤立点ではないと判定される。First, black 1 (6) viewed from the reference end 38
It is determined whether the run length of white 1 adjacent to the black pixel section on the other side is equal to or greater than the threshold value 2. white
1 (5) <threshold value 2 (= 12), so black 1
It is determined that (6) is not an isolated point to be removed.
【0064】次のblack 2について判定を行なうため
に、(ト)において引数iを1増じてから(ロ)の手順
へ戻る。そして、この段階ではi=2≠9=endであ
るので、(ロ)の判定で終了とはならずに次の(ハ)の
手順へ進む。In order to make a determination for the next black 2, the argument i is incremented by 1 in (g), and the procedure returns to (b). Since i = 2 ≠ 9 = end at this stage, the process does not end with the determination of (b) and proceeds to the next step of (c).
【0065】(ハ)において、第2孤立点16bのblac
k 2の度数は行の高さの1/2以下であるので、次の
(ニ)の手順に進む。In (c), the blac of the second isolated point 16b
Since the frequency of k 2 is ½ or less of the row height, the procedure proceeds to the next step (d).
【0066】(ニ)においては、第2孤立点16bにつ
いて判定すると、black 2(9)<閾値1(=18)で
ある。従って、black 2(9)は、孤立点(但し、除去
すべき孤立点とは限らない)と判断される。そして、次
の(ホ)の手順へ進む。In (d), when the second isolated point 16b is judged, black 2 (9) <threshold value 1 (= 18). Therefore, black 2 (9) is determined to be an isolated point (however, it is not limited to the isolated point to be removed). Then, the procedure proceeds to the next step (e).
【0067】(ホ)においては、閾値2および閾値3を
用いて、この孤立点が除去すべき孤立点か否かを判定す
る。In (e), it is determined whether or not this isolated point is an isolated point to be removed using the threshold values 2 and 3.
【0068】先ず、基準端38から見てblack 2(9)
の向こう側で当該黒画素区間に隣接するwhite 2のラン
レングスが閾値2以上であるか否かを判定する。white
2(125)>閾値2(=12)であるので、black 2
(9)は、除去すべき孤立点であるための要件の1を満
たす。First, as seen from the reference end 38, black 2 (9)
It is determined whether or not the run length of white 2 adjacent to the black pixel section on the other side is equal to or greater than the threshold value 2. white
2 (125)> threshold value 2 (= 12), so black 2
(9) satisfies requirement 1, which is an isolated point to be removed.
【0069】更に、基準点38からblack 2の尾端まで
のランレングスが、閾値3以下であるか否かを判定す
る。black 1、white 1およびblack 2のそれぞれのラ
ンレングスの和である8+5+9=22<閾値3(=2
4)である。従って、従って、閾値1〜閾値3について
の判定結果から、判定しようとする黒画素区間(bla
ck2)および基準端38から当該黒画素区間(bla
ck 2)までの間の黒画素区間(black 1)を除去す
べき孤立点として判定する。そして、次の(ヘ)の手順
へ進む。Further, it is determined whether or not the run length from the reference point 38 to the tail end of black 2 is less than or equal to the threshold value 3. 8 + 5 + 9 = 22, which is the sum of the run lengths of black 1, white 1 and black 2, <threshold 3 (= 2
4). Therefore, therefore, the black pixel section (bla) to be determined is determined from the determination results for the threshold values 1 to 3.
ck2) and the black pixel section (bla) from the reference end 38.
The black pixel section (black 1) up to ck 2) is determined as an isolated point to be removed. Then, the procedure proceeds to the next step (f).
【0070】(ヘ)の手順において、この孤立点と判定
された黒画素区間を文字領域枠30中から除く位置に基
準端38を変更することにより、当該孤立点を除去す
る。ここでは、新しい基準端38aをblack 3の頭端の
位置に設定する。その結果、初めの基準端38からwhit
e 2の尾端まで、即ち、black 1、white 1、black 2
およびwhite 2が除去される。第1および第2孤立点3
6aおよび36bを除去して設定した新しい文字領域枠
30aを図5の(D)に示す。In step (f), the isolated point is removed by changing the reference end 38 to a position where the black pixel section determined to be the isolated point is excluded from the character area frame 30. Here, the new reference end 38a is set at the position of the head end of black 3. As a result, whit from the first reference end 38
To the tail of e 2, ie black 1, white 1, black 2
And white 2 are removed. First and second isolated points 3
A new character area frame 30a set by removing 6a and 36b is shown in FIG.
【0071】次に、black 3以降の黒画素列の判定を行
なうために、(チ)においてfirstを1増じ、更に
(ト)において引数iを1増じてから(ロ)の手順へ戻
る。Next, in order to determine the black pixel row after black 3, the first is incremented by 1 in (h), the argument i is incremented by 1 in (g), and the procedure returns to (b). .
【0072】この段階でi=3となる。従って(ロ)の
判定で終了とはならずに次の(ハ)の手順へ進む。At this stage, i = 3. Therefore, the determination in (b) does not end the process, and the process proceeds to the next (c).
【0073】(ハ)において、black 3の度数はいずれ
も行の高さの1/2以下であるので、次の(ニ)の手順
に進む。In (c), since the frequency of black 3 is less than 1/2 of the row height, the process proceeds to the next step (d).
【0074】(ニ)において、black 3(21)につい
て判定すると、black 3(21)>閾値1(=18)で
ある。従って、black 3(18)は、文字画像と判定さ
れるので、処理を終了する。In (d), when black 3 (21) is determined, black 3 (21)> threshold 1 (= 18). Therefore, black 3 (18) is determined to be a character image, and the process ends.
【0075】(実施例4)実施例4では、縦書きの文書
画像の孤立点除去方法の一例について説明する。実施例
4においても実施例1と同様にして文字領域枠40を設
定する。ここでは、図6の(A)に示すように「はじめ
に」という縦書きの文字画像44を囲む文字領域枠40
を設定しているが、文字領域枠40の上端付近に、孤立
点46が存在している。(Embodiment 4) In Embodiment 4, an example of a method for removing isolated points in a vertically written document image will be described. Also in the fourth embodiment, the character area frame 40 is set in the same manner as in the first embodiment. Here, as shown in FIG. 6A, a character area frame 40 that surrounds a vertically written character image 44 called "Introduction".
However, the isolated point 46 exists near the upper end of the character area frame 40.
【0076】次に、実施例1と同様にして、図6の
(B)に示す黒画素のヒストグラムを作成する。Next, as in the first embodiment, the histogram of black pixels shown in FIG. 6B is created.
【0077】そして、このヒストグラムに基づいて図6
の(C)に示すランレングスを作成する。実施例4で
は、文字領域枠40の上端の画素列を基準端48とす
る。そして、この基準端48に近い側から、各黒画素区
間および白画素区間毎にそれぞれ順次に番号をつける。
ここでは、black 1(9)、white 1(36)、black
2(40)、white 2(8)、black 3(42)、whit
e 3(7)、black 4(41)、white 4(8)および
black 5(38)のランレングスを作成する。Then, based on this histogram, FIG.
The run length shown in (C) is created. In the fourth embodiment, the pixel row at the upper end of the character area frame 40 is the reference end 48. Then, from the side close to the reference end 48, a number is sequentially assigned to each black pixel section and each white pixel section.
Here, black 1 (9), white 1 (36), black
2 (40), white 2 (8), black 3 (42), whit
e 3 (7), black 4 (41), white 4 (8) and
Create a run length of black 5 (38).
【0078】次に、実施例1で参照した図3のフローチ
ャートに従って、孤立点の判定・除去の処理を行なう。
実施例4においても、実施例1と同一の閾値1、閾値2
および閾値3を使用する。Next, according to the flowchart of FIG. 3 referred to in the first embodiment, the process of determining and removing isolated points is performed.
Also in Example 4, the same threshold value 1 and threshold value 2 as in Example 1
And threshold 3 is used.
【0079】図3の「開始」から(イ)、(ロ)および
(ハ)における手順は図1と同様であるので説明を省略
する。Since the procedure from (start) to (a), (b) and (c) in FIG. 3 is the same as that in FIG. 1, its explanation is omitted.
【0080】次に、(ニ)において、孤立点46のblac
k 1(8)について判定すると、black 1(8)<閾値
1(=18)である。従って、black 1(6)は、孤立
点(但し、除去すべき孤立点とは限らない)と判断され
る。そして、次の(ホ)の手順へ進む。Next, in (d), the blac of the isolated point 46 is
When determination is made for k 1 (8), black 1 (8) <threshold value 1 (= 18). Therefore, black 1 (6) is determined as an isolated point (however, it is not limited to an isolated point to be removed). Then, the procedure proceeds to the next step (e).
【0081】(ホ)においては、閾値2および閾値3を
用いて、この孤立点46が除去すべき孤立点か否かを判
定する。In (e), it is determined whether the isolated point 46 is an isolated point to be removed by using the threshold 2 and the threshold 3.
【0082】先ず、基準端48から見てblack 1(9)
の向こう側で当該black 1に隣接するwhite 2のランレ
ングスが閾値2以上であるか否かを判定する。white 2
(36)>閾値2(=12)であるので、black 1
(9)は、閾値2に関して除去すべき孤立点であるため
の要件の1つを満たす。First, as seen from the reference end 48, black 1 (9)
It is determined whether the run length of white 2 adjacent to black 1 on the other side of is equal to or greater than the threshold value 2. white 2
Since (36)> threshold value 2 (= 12), black 1
(9) satisfies one of the requirements for the threshold value 2 to be an isolated point to be removed.
【0083】更に、基準点48からblack 1の尾端まで
のランレングスが、閾値3以下であるか否かを判定す
る。black 1(9)<閾値3(=24)であるので、bl
ack 1は、閾値3に関して除去すべき孤立点であるため
の要件の1つを満たす。従って、閾値1〜閾値3につい
ての判定結果から、判定しようとする黒画素区間(blac
k 1)および基準端48から当該黒画素区間(black
1)までの間の黒画素区間(この場合はなし)を除去す
べき孤立点として判定する。そして、次の(ヘ)の手順
へ進む。Furthermore, it is determined whether or not the run length from the reference point 48 to the tail of black 1 is less than or equal to the threshold value 3. black 1 (9) <threshold value 3 (= 24), so bl
ack 1 meets one of the requirements for threshold 3 to be an isolated point to remove. Therefore, the black pixel section (blac
k 1) and the reference pixel 48 to the black pixel section (black
The black pixel section up to 1) (none in this case) is determined as an isolated point to be removed. Then, the procedure proceeds to the next step (f).
【0084】(ヘ)の手順において、この孤立点と判定
された黒画素区間を文字領域枠40中から除く位置に新
しい基準端48aを設定することにより、当該孤立点4
6を除去する。ここでは、基準端48aをblack 2の頭
端に移動する。その結果、初めの基準端48からwhite
1の尾端まで、即ち、black 1およびwhite 1が除去さ
れる。孤立点を除去して設定した文字領域枠40aを図
6の(D)に示す。In the procedure (f), the new reference edge 48a is set at a position where the black pixel section determined to be the isolated point is excluded from the character area frame 40.
Remove 6. Here, the reference end 48a is moved to the head end of black 2. As a result, from the first reference edge 48 white
Up to the tail of 1, i.e. black 1 and white 1 are removed. The character area frame 40a set by removing the isolated points is shown in FIG.
【0085】次に、black 2以降の黒画素列の判定を行
なうため、(チ)においてfirstを1増じ、更に
(ト)において引数iを1増じてから(ロ)の手順へ戻
る。Next, in order to determine the black pixel rows after black 2, the first is incremented by 1 in (h), the argument i is incremented by 1 in (t), and the procedure returns to (b).
【0086】この段階でi=2となる。従って(ロ)の
判定で終了とはならずに次の(ハ)の手順へ進む。At this stage, i = 2. Therefore, the determination in (b) does not end the process, and the process proceeds to the next (c).
【0087】(ハ)において、black 2の度数はいずれ
も行の高さの1/2以下であるので、次の(ニ)の手順
に進む。In (c), since the frequency of black 2 is less than 1/2 of the row height, the process proceeds to the next step (d).
【0088】(ニ)において、black 2(40)につい
て判定すると、black 3(40)>閾値1(=18)で
ある。従って、black 2(40)は、文字画像と判定さ
れるので、処理を終了する。In (d), when black 2 (40) is determined, black 3 (40)> threshold 1 (= 18). Therefore, black 2 (40) is determined to be a character image, and the process ends.
【0089】上述した実施例では、この発明は特定の条
件で構成した例について説明したが、この発明は多くの
変更および変形を行なうことができる。例えば、上述し
た実施例1では、横書きの文書画像の孤立点を除去する
にあたり、正規文書画像の左右両側の孤立点を除去した
が、この発明では、横書き文書画像の正規の文書画像の
上下の孤立点を除去することも可能である。その場合
は、縦書きの場合のように、横方向に延在した列を設定
して、この列毎にヒストグラムを作成して、以下実施例
1と同様に孤立点を識別するとよい。In the above-described embodiments, the present invention has been described with respect to an example in which the present invention is configured under specific conditions, but the present invention can be modified and modified in many ways. For example, in the above-described first embodiment, the isolated points on the left and right sides of the regular document image are removed when the isolated points of the horizontally written document image are removed. It is also possible to remove isolated points. In that case, as in the case of vertical writing, columns extending in the horizontal direction may be set, a histogram may be created for each column, and isolated points may be identified as in the first embodiment.
【0090】また、実施例4の縦書きの文書画像におい
て、正規の文書画像の左右の孤立点を除去することも可
能である。Further, in the vertically written document image of the fourth embodiment, it is possible to remove the left and right isolated points of the regular document image.
【0091】また、上述した実施例では、閾値1〜3の
ランレングスをそれぞれ一定の値に固定した例について
説明したが、この発明では、各閾値は、任意に変更する
ことも可能である。Further, in the above-mentioned embodiment, an example in which the run lengths of the threshold values 1 to 3 are fixed to fixed values has been described, but in the present invention, each threshold value can be arbitrarily changed.
【0092】また、上述した実施例では、文字領域枠を
設定するのに表解析の手法を用いたが、この発明では、
文字領域枠を設定する方法はこれに限定する必要はな
く、周知の任意の手法を用いることができる。In the above-described embodiment, the table analysis method is used to set the character area frame.
The method of setting the character area frame is not limited to this, and any known method can be used.
【0093】また、上述した実施例では、文字画像の行
に垂直方向に並んだ画素からなる画素列についてヒスト
グラムを作成して孤立点を除去したが、この発明では、
例えば行方向に並んだ画素からなる画素列についてヒス
トグラムを作成して孤立点を除去してもよい。この場
合、横書きの場合は行の上下であって文字領域枠中にあ
るにある孤立点を除去することができる。また、縦書き
の場合は行の左右であって文字領域中にあるにある孤立
点を除去することができる。Further, in the above-mentioned embodiment, the histogram is created for the pixel row composed of the pixels arranged in the row of the character image in the vertical direction to remove the isolated points.
For example, a histogram may be created for a pixel row composed of pixels arranged in the row direction to remove isolated points. In this case, in the case of horizontal writing, it is possible to remove the isolated points at the upper and lower sides of the line and in the character area frame. In the case of vertical writing, isolated points on the left and right of the line in the character area can be removed.
【0094】また、上述した実施例では、文字領域枠の
両端の区間が黒画素区間となるように文字領域枠を設定
したが、この両端の区間は白画素区間であってもよい。Further, in the above-described embodiment, the character area frame is set so that the sections at both ends of the character area frame are black pixel sections, but the sections at both ends may be white pixel sections.
【0095】また、上述した実施例では、孤立点の削除
を行なうにあたって、処理を終了させる判定の下になっ
た黒画素区間の頭端の位置に新しい基準端を設定した
が、この発明では、例えば、除去前の基準点から見て除
去すべき孤立点の向こう側であって、当該孤立点に隣接
する白画素区間中に新しい基準点を設定してもよい。In addition, in the above-described embodiment, when the isolated point is deleted, a new reference end is set at the position of the head end of the black pixel section which is determined to end the process. For example, a new reference point may be set on the other side of the isolated point to be removed from the reference point before removal and in the white pixel section adjacent to the isolated point.
【0096】[0096]
【発明の効果】この発明の孤立点除去方法によれば、閾
値1〜3の3つの閾値とランレングスとを比較して除去
すべき孤立点を容易に識別を図ることができる。また、
閾値2を設定することにより、かすれ等によって生じた
除去すべきでない孤立点を残すことができる。また、閾
値3を設定することにより、「ハ」といった離間文字を
誤って除去する恐れが少ない。このように、この発明の
孤立点除去方法によれば、除去すべき孤立点の効率よい
識別、除去を図ることができ、特に、文字領域枠で囲ま
れた文字領域の周辺部にある孤立点の除去に用いて好適
である。According to the isolated point removing method of the present invention, it is possible to easily identify the isolated point to be removed by comparing the three thresholds of the thresholds 1 to 3 with the run length. Also,
By setting the threshold value 2, it is possible to leave an isolated point that is caused by blurring or the like and should not be removed. Further, by setting the threshold value 3, it is less likely that a separated character such as “C” is erroneously removed. As described above, according to the isolated point removing method of the present invention, it is possible to efficiently identify and remove an isolated point to be removed. In particular, the isolated point in the peripheral portion of the character area surrounded by the character area frame is removed. It is suitable for the removal of
【図1】実施例1のフローチャートである。FIG. 1 is a flowchart of a first embodiment.
【図2】実施例1の説明に供する図である。FIG. 2 is a diagram for explaining the first embodiment.
【図3】実施例1における孤立点の判定および除去のフ
ローチャートである。FIG. 3 is a flowchart of isolated point determination and removal according to the first exemplary embodiment.
【図4】実施例2の説明に供する図である。FIG. 4 is a diagram for explaining the second embodiment.
【図5】実施例3の説明に供する図である。FIG. 5 is a diagram for explaining the third embodiment.
【図6】実施例4の説明に供する図である。FIG. 6 is a diagram for explaining Example 4;
10、20、30、40:(初めの)文字領域枠 10a、30a、40a:(新しい)文字領域枠 12、22、32、42:文字領域 14、24、34、44:文字画像 16、26、46:孤立点 18、28、38、48:(初めの)基準端 18a、38a、48a:(新しい)基準端 36a:第1孤立点 36b:第2孤立点 10, 20, 30, 40: (initial) character area frame 10a, 30a, 40a: (new) character area frame 12, 22, 32, 42: character area 14, 24, 34, 44: character image 16, 26 , 46: isolated point 18, 28, 38, 48: (initial) reference end 18a, 38a, 48a: (new) reference end 36a: first isolated point 36b: second isolated point
───────────────────────────────────────────────────── フロントページの続き (72)発明者 鳥越 真 東京都港区虎ノ門1丁目7番12号 沖電気 工業株式会社内 ─────────────────────────────────────────────────── ─── Continuation of front page (72) Inventor Makoto Torikoshi 1-7-12 Toranomon, Minato-ku, Tokyo Oki Electric Industry Co., Ltd.
Claims (1)
枠を設定し、 該文字領域枠中の画素列毎に、当該画素列中の黒画素の
数を度数としたヒストグラムを作成し、 該ヒストグラムの度数が0である画素列が1つ以上連続
する白画素区間の画素列の数(ランレングス)と、該度
数が1以上である画素列が1つ以上連続する黒画素区間
の画素列の数(ランレングス)とを各白画素区間毎およ
び各黒画素区間毎にそれぞれ計数し、 前記文字領域枠の一辺の画素列を基準端とし、 黒画素区間の画素列の数についての閾値1、白画素区間
の画素列の数についての閾値2、および、前記基準端か
らの画素列数についての閾値3をそれぞれ設定し、 黒画素区間の画素列数が前記閾値1以下で、基準端から
見て当該黒画素区間の向こう側で当該黒画素区間に隣接
する白画素区間の画素列数が前記閾値2以上で、かつ、
当該黒画素区間の画素列数と前記基準端から当該黒画素
区間までの間の画素列数との和が前記閾値3以下である
場合に、当該黒画素区間および前記基準端から当該黒画
素区間までの間の黒画素区間を除去すべき孤立点として
判定し、 該孤立点と判定された黒画素区間を前記文字領域枠中か
ら除く位置に前記基準端を変更することにより、当該孤
立点を除去することを特徴とする文書画像の孤立点除去
方法。1. A text area frame surrounding a text image is set in a document image, and a histogram is created for each pixel row in the text area frame with the number of black pixels in the pixel row as a frequency. The number of pixel rows (run length) in a white pixel section in which one or more pixel rows having a frequency of 0 in the histogram are continuous, and the pixels in a black pixel section in which one or more pixel rows having a frequency of 1 or more are continuous The number of columns (run length) is counted for each white pixel section and each black pixel section, and the pixel row on one side of the character area frame is used as a reference end, and the threshold value for the number of pixel rows in the black pixel section is set. 1, a threshold value 2 for the number of pixel rows in the white pixel section and a threshold value 3 for the number of pixel rows from the reference end are set, and the number of pixel rows in the black pixel section is less than or equal to the threshold value 1 and the reference end is set. Seen from the black pixel section on the other side of the black pixel section In the pixel column number of the adjacent white pixel interval the threshold 2 or more,
When the sum of the number of pixel columns in the black pixel section and the number of pixel rows from the reference end to the black pixel section is equal to or less than the threshold value 3, the black pixel section and the black pixel section from the reference end Is determined as an isolated point to be removed, and the reference point is changed to a position where the black pixel section determined to be the isolated point is excluded from the character area frame. A method for removing an isolated point in a document image, which is characterized by removing it.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP15636295A JP3165004B2 (en) | 1995-06-22 | 1995-06-22 | Document image isolated point removal method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP15636295A JP3165004B2 (en) | 1995-06-22 | 1995-06-22 | Document image isolated point removal method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH096917A true JPH096917A (en) | 1997-01-10 |
| JP3165004B2 JP3165004B2 (en) | 2001-05-14 |
Family
ID=15626102
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP15636295A Expired - Fee Related JP3165004B2 (en) | 1995-06-22 | 1995-06-22 | Document image isolated point removal method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3165004B2 (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6847469B1 (en) | 1998-12-24 | 2005-01-25 | Ricoh Company, Ltd. | Image processing apparatus for removing an isolated point |
| JP2006072839A (en) * | 2004-09-03 | 2006-03-16 | Ricoh Co Ltd | Image processing method, image processing apparatus, image processing program, and recording medium |
| US8274668B2 (en) | 2007-02-07 | 2012-09-25 | Seiko Epson Corporation | Image processing apparatus, copier, and image processing method and program |
| CN109945955A (en) * | 2019-04-10 | 2019-06-28 | 郑州楷源仪表有限公司 | A kind of water meter vision online test method and its system |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101764908B (en) * | 2008-12-08 | 2012-02-01 | 新奥特(北京)视频技术有限公司 | Method for effectively eliminating noise point in grayscale images |
-
1995
- 1995-06-22 JP JP15636295A patent/JP3165004B2/en not_active Expired - Fee Related
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6847469B1 (en) | 1998-12-24 | 2005-01-25 | Ricoh Company, Ltd. | Image processing apparatus for removing an isolated point |
| JP2006072839A (en) * | 2004-09-03 | 2006-03-16 | Ricoh Co Ltd | Image processing method, image processing apparatus, image processing program, and recording medium |
| US8274668B2 (en) | 2007-02-07 | 2012-09-25 | Seiko Epson Corporation | Image processing apparatus, copier, and image processing method and program |
| CN109945955A (en) * | 2019-04-10 | 2019-06-28 | 郑州楷源仪表有限公司 | A kind of water meter vision online test method and its system |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3165004B2 (en) | 2001-05-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4903312A (en) | Character recognition with variable subdivisions of a character region | |
| EP0621554B1 (en) | Method and apparatus for automatic determination of text line, word and character cell spatial features | |
| JP3294883B2 (en) | Color separation method in ink jet color graphic printing | |
| JP2822189B2 (en) | Character recognition apparatus and method | |
| EP0753833B1 (en) | Apparatus and method for extracting articles from a document | |
| JP3319834B2 (en) | Color separation method in color figure printing | |
| JP4164489B2 (en) | Document image enhancement method, apparatus, and storage medium therefor | |
| US5033098A (en) | Method of processing character blocks with optical character reader | |
| JP3965983B2 (en) | Image processing method and apparatus | |
| JP3837193B2 (en) | Character line extraction method and apparatus | |
| US7257253B2 (en) | Apparatus and method of analyzing layout of document, and computer product | |
| JPH096917A (en) | Isolation point removing method for document image | |
| KR20030017304A (en) | Half-tone dot elimination method and system thereof | |
| US7680329B2 (en) | Character recognition apparatus and character recognition method | |
| JP7458600B2 (en) | Information processing device and program | |
| JP3852218B2 (en) | Image processing method and image processing apparatus | |
| JP4244692B2 (en) | Character recognition device and character recognition program | |
| JPH04352295A (en) | System and device for identifing character string direction | |
| JP4847378B2 (en) | Image processing apparatus, image processing method, program, and computer-readable recording medium | |
| JP3177138B2 (en) | Extraction method of drawing closed area | |
| JP4098870B2 (en) | Character enlargement method | |
| JP4390723B2 (en) | Information embedding device, information extracting device, information embedding method, information extracting method, information embedding program, information extracting program, and recording medium | |
| JP2003317107A (en) | Ruled line extraction method and apparatus | |
| JP3033501B2 (en) | Dot printer | |
| JPH10257342A (en) | Color printing 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: 20010220 |
|
| LAPS | Cancellation because of no payment of annual fees |