JP2881080B2 - Feature extraction method - Google Patents

Feature extraction method

Info

Publication number
JP2881080B2
JP2881080B2 JP4288906A JP28890692A JP2881080B2 JP 2881080 B2 JP2881080 B2 JP 2881080B2 JP 4288906 A JP4288906 A JP 4288906A JP 28890692 A JP28890692 A JP 28890692A JP 2881080 B2 JP2881080 B2 JP 2881080B2
Authority
JP
Japan
Prior art keywords
straight line
character
line portion
point
points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP4288906A
Other languages
Japanese (ja)
Other versions
JPH06139408A (en
Inventor
徹 宮前
晃治 伊東
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP4288906A priority Critical patent/JP2881080B2/en
Publication of JPH06139408A publication Critical patent/JPH06139408A/en
Application granted granted Critical
Publication of JP2881080B2 publication Critical patent/JP2881080B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Character Discrimination (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】この発明は、文書等を光学的に読
み取る光学式文字読み取り装置(OCR)等に於いて、
文字図形パタンを抹消する際に用いられる抹消線等のよ
うに、文字図形パタンを水平方向に横断又は垂直方向に
縦断するような直線部分の情報を高精度に抽出する特徴
抽出方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an optical character reader (OCR) for optically reading a document or the like.
The present invention relates to a feature extraction method for extracting information of a straight line portion that crosses a character graphic pattern horizontally or traverses vertically, such as a strike-through line used when deleting a character graphic pattern, with high accuracy. .

【0002】[0002]

【従来の技術】従来、文字図形パタンを抹消する際に用
いられる抹消線等のように、文字図形パタンを水平方向
に横断又は垂直方向に縦断する直線部分を抽出する為
に、図6の流れ図に示される方法が適用されていた。図
6の方法は、文字図形パタンの全てのストローク情報を
抽出するものであり、当然、ストロークの一種である抹
消線等のような直線部分も抽出できる。
2. Description of the Related Art Conventionally, a flow chart shown in FIG. 6 is used to extract a straight line portion which traverses a character / graphic pattern horizontally or vertically, such as an erasing line used for deleting a character / graphic pattern. Was applied. The method of FIG. 6 extracts all stroke information of a character / graphic pattern, and can naturally also extract a straight line portion such as a strike-through line which is a type of stroke.

【0003】図6に示されたステップS60において、
先ず文字図形パタンを光電変換装置により2値画像60
に変換し、次のステップS61で2値画像の特徴点61
を抽出する。この特徴点61とは、細線化された2値画
像に3×3メッシュのマスク走査を行い、そのパターン
から求められた端点、分岐点、交点、孤立点等、及びそ
れらの点を結ぶ文字線の追跡によって求められた屈折点
である。これらの特徴点は2値画像60の各ストローク
近似点とみなされる。
In step S60 shown in FIG.
First, a character / graphic pattern is converted into a binary image 60 by a photoelectric conversion device.
, And in the next step S61, feature points 61 of the binary image
Is extracted. The feature points 61 are obtained by performing a 3 × 3 mesh mask scan on the thinned binary image, and finding end points, branch points, intersections, isolated points, and the like obtained from the pattern, and character lines connecting those points. Is the refraction point obtained by the tracking. These feature points are regarded as approximate stroke points of the binary image 60.

【0004】次のステップS62では、予め用意された
筆順情報を持った標準パタン(オンライン文字標準パタ
ン62)と前記ステップS61で求められた2値画像の
特徴点61との特徴点マッチングを行う。この特徴点マ
ッチングで、オンライン文字標準パターン62の各スト
ローク近似点と2値画像の特徴点61との間の全てのユ
ークリッド距離が求められる。
In the next step S62, feature point matching is performed between a standard pattern (online character standard pattern 62) having stroke order information prepared in advance and the feature point 61 of the binary image obtained in step S61. In this feature point matching, all Euclidean distances between each stroke approximation point of the online character standard pattern 62 and the feature point 61 of the binary image are obtained.

【0005】次のステップS63では、前記ステップS
62で求められたユークリッド距離で測って最も距離の
近い2値画像の特徴点61を対応付ける。この時、オン
ライン文字標準パタン62の各ストローク近似点に対応
付けられた2値画像の特徴点63をメモリに格納してお
く。
[0005] In the next step S63, the step S
The feature point 61 of the binary image closest to the distance measured by the Euclidean distance obtained in 62 is associated. At this time, the feature points 63 of the binary image associated with each stroke approximation point of the online character standard pattern 62 are stored in the memory.

【0006】最後のステップS64では、オンライン文
字標準パタン62に保持された筆順情報に基づいて標準
パタン62の各ストローク近似点と対応のとれた2値画
像の特徴点63を結ぶことによって、ストローク情報6
4を抽出する。
In the last step S64, based on the stroke order information held in the online character standard pattern 62, each stroke approximation point of the standard pattern 62 is connected to the corresponding feature point 63 of the binary image to obtain stroke information. 6
4 is extracted.

【0007】[0007]

【発明が解決しようとする課題】しかし、以上述べたス
トローク情報抽出方法を、文字図形パタンを水平方向に
横断或いは垂直方向に縦断するような直線部分の抽出に
適用しようとすると、下記の問題点が生じる。 (1)筆順情報をもったオンライン文字情報パタンを用
意しなければならないため、労力及びメモリの容量が増
加する。 (2)特徴点マッチングによって演算量が増加する。 (3)特に、抹消線等の場合、その中心線の位置座標は
一定ではなく、しかもその本数は必ずしも一本とは限ら
ない。そのような不確定要素を持つ直線部分に対して、
標準パタンとのマッチング結果を利用した抽出方法を適
用することは非常に困難である。
However, if the above-described stroke information extraction method is applied to the extraction of a straight line portion which traverses a character / graphic pattern horizontally or vertically, it has the following problems. Occurs. (1) Since an online character information pattern having stroke order information must be prepared, labor and memory capacity increase. (2) The amount of calculation increases due to feature point matching. (3) In particular, in the case of an erasing line or the like, the position coordinates of the center line are not constant, and the number of lines is not always one. For straight lines with such uncertainties,
It is very difficult to apply the extraction method using the matching result with the standard pattern.

【0008】この発明は、以上述べた筆順情報を持った
オンライン文字標準パタンと特徴点マッチングを用いる
ことによる労力、メモリ、演算量の増大という問題及び
抹消線等のように不確定要素をもつ直線部分の抽出の困
難さといった問題を除去するために、抹消線等のような
直線部分の位置や本数に関係しない普遍的な特徴を見い
だすことによって、直線部分に関する情報をより効率よ
く抽出する方法を提供することを目的とする。
According to the present invention, the use of the above-described on-line character standard pattern having stroke order information and feature point matching, the problem of labor, an increase in memory and the amount of computation, and a straight line having an uncertain element such as an erasure line In order to eliminate problems such as difficulty in extracting parts, a method to extract information about linear parts more efficiently by finding universal features that are not related to the position or number of linear parts such as strike-through lines etc. The purpose is to provide.

【0009】[0009]

【課題を解決するための手段】この発明は、前記課題を
解決するために、文字図形パタンに外接する外接矩形に
関する情報を抽出する工程と、前記文字図形パタンの周
辺分布を抽出する工程と、前記文字図形パタンの端点を
抽出する工程と、前記外接矩形に関する情報と周辺分布
と端点とに基づいて前記文字図形パタンの直線部分を抽
出する工程とを設けたものである。
In order to solve the above-mentioned problems, the present invention provides a step of extracting information on a circumscribed rectangle circumscribing a character graphic pattern, and a step of extracting a peripheral distribution of the character graphic pattern. A step of extracting an end point of the character / graphic pattern; and a step of extracting a straight line portion of the character / graphic pattern based on information on the circumscribed rectangle, a peripheral distribution, and an end point.

【0010】[0010]

【作用】本発明によれば、外接矩形情報と周辺分布とに
基づき仮の直線部分が抽出され、真の直線部分の両端点
によって決まる矩形の形状は偏平な形状になるという原
理に基づき、前記外接矩形に関する情報と仮の直線部分
の位置情報と端点の位置情報とを用いた簡単な評価式の
値により真の直線部分か否かが判定されるため、メモ
リ、演算量の増大という問題及び抹消線等のように不確
定要素をもつ直線部分の抽出の困難さといった課題が解
決され、抹消線等のような直線部分の位置や本数に関係
しない普遍的な特徴の抽出が可能となり、直線部分に関
する情報をより効率よく抽出することができる。
According to the present invention, a provisional straight line portion is extracted based on the circumscribed rectangle information and the peripheral distribution, and based on the principle that the shape of the rectangle determined by both ends of the true straight line portion is a flat shape. Since the value of a simple evaluation formula using the information on the circumscribed rectangle, the position information of the provisional straight line portion, and the position information of the end point is used to determine whether or not the line portion is a true straight line portion, the memory and the amount of calculation increase. Problems such as the difficulty of extracting straight lines with uncertain elements such as strike-throughs have been solved, and universal features independent of the position and number of straight-lines such as strike-throughs can be extracted. Information about a portion can be extracted more efficiently.

【0011】[0011]

【実施例】図1はこの発明の実施例を示す流れ図であ
り、以下各処理ステップを順に説明する。先ず、ステッ
プS1では文書や帳票に書かれた文字図形パタンを光電
変換装置により2値画像10に変換する。
FIG. 1 is a flowchart showing an embodiment of the present invention. Each processing step will be described below in order. First, in step S1, a character / graphic pattern written on a document or a form is converted into a binary image 10 by a photoelectric conversion device.

【0012】次のステップS2では2値画像10に対し
て文字切り出しを行い、文字部分に外接する矩形枠のX
座標とY座標の最小最大値11を導出する。図2(A)
は切り出された2値画像の一例を示したものであり、図
2(A)の文字部分は数字2に対して縦に1本の抹消線
が記入された例であり、外接枠20によって切り出され
ている。ここで、外接枠20の左上隅の頂点を原点とす
ると、そのX座標とY座標の最小最大値はそれぞれ次の
ようになる。 X座標の最小値(MinX)=0 (1) X座標の最大値(MaxX)=Xe (2) Y座標の最小値(MinY)=0 (3) Y座標の最大値(MaxY)=Ye (4) また、外接枠の幅(ΔX)及び高さ(ΔY)は、次のよ
うになる。 ΔX=MaxX−MinX+1=Xe+1 (5) ΔY=MaxY−MinY+1=Ye+1 (6)
In the next step S2, characters are cut out from the binary image 10, and the X of the rectangular frame circumscribing the character portion is extracted.
The minimum and maximum values 11 of the coordinates and the Y coordinates are derived. FIG. 2 (A)
2A shows an example of a cut-out binary image. The character portion in FIG. 2A is an example in which one strike-through line is vertically written for the numeral 2, and is cut out by the circumscribed frame 20. Have been. Here, assuming that the vertex at the upper left corner of the circumscribed frame 20 is the origin, the minimum and maximum values of the X coordinate and the Y coordinate are as follows. Minimum value of X coordinate (MinX) = 0 (1) Maximum value of X coordinate (MaxX) = Xe (2) Minimum value of Y coordinate (MinY) = 0 (3) Maximum value of Y coordinate (MaxY) = Ye ( 4) The width (ΔX) and height (ΔY) of the circumscribed frame are as follows. ΔX = MaxX−MinX + 1 = Xe + 1 (5) ΔY = MaxY−MinY + 1 = Ye + 1 (6)

【0013】ステップS3では、2値画像10から周辺
分布12、即ち2値画像をX軸又はY軸に投影したとき
の黒点数の分布を表すヒストグラムを抽出する。図2
(B)は図2(A)の2値画像をX軸に投影した周辺分
布を示し、図2(C)はY軸上に投影した周辺分布を示
す。
In step S3, a peripheral distribution 12, that is, a histogram representing the distribution of the number of black spots when the binary image is projected on the X axis or the Y axis, is extracted from the binary image 10. FIG.
2B shows a peripheral distribution of the binary image shown in FIG. 2A projected on the X axis, and FIG. 2C shows a peripheral distribution projected on the Y axis.

【0014】ステップS4では、2値画像の端点を抽出
する。端点とは例えば図2(A)の点21、22、2
3、24のように文字線の先端部の点のことであり、図
4にその抽出方法の一例を示す。
In step S4, the end points of the binary image are extracted. The end points are, for example, points 21, 22, 2 in FIG.
Points at the leading end of the character line, such as 3 and 24, are shown in FIG.

【0015】図4のステップS40では先ず2値画像1
0の輪郭追跡を行い輪郭点座標系列40をメモリに格納
し、また、ステップS41で線幅の計算を行う。
In step S40 of FIG.
The contour tracking of 0 is performed, the contour point coordinate series 40 is stored in the memory, and the line width is calculated in step S41.

【0016】次のステップS42では、輪郭点座標系列
40を順方向(反時計方向)に参照しながら、X座標又
はY座標の変化の仕方が変化する点を求める。この点を
変曲点と称し、2値画像の全ての変曲点42をメモリに
格納する。例えば図5(A)の例では点50、51が変
曲点として抽出される。但し、この場合の変曲点の定義
は数学上の通常の定義とは異なっている。
In the next step S42, a point at which the manner of change of the X coordinate or the Y coordinate changes is determined with reference to the contour point coordinate series 40 in the forward direction (counterclockwise). This point is called an inflection point, and all the inflection points 42 of the binary image are stored in the memory. For example, in the example of FIG. 5A, points 50 and 51 are extracted as inflection points. However, the definition of the inflection point in this case is different from the usual mathematical definition.

【0017】次にステップS43では順方向サーチによ
る変曲点42(例えば図5(A)の変曲点50)を起点
として、逆方向に線幅×α(αは定数で、α〜1.5)
以内の局所的なサーチを行い、前記起点となった変曲点
と同様な変化を示す変曲点を抽出する。この変曲点(図
5(A)の例では変曲点51)が存在するとき、ステッ
プS44において、順方向サーチによる変曲点と逆方向
サーチによる変曲点との中点を仮端点44とする。図5
(A)の例では点52が仮端点となる。
Next, in step S43, starting from the inflection point 42 (for example, the inflection point 50 in FIG. 5A) by the forward search, the line width × α (α is a constant, α to 1.. 5)
And an inflection point showing a change similar to the inflection point that is the starting point is extracted. When the inflection point (inflection point 51 in the example of FIG. 5A) exists, in step S44, the middle point between the inflection point by the forward search and the inflection point by the reverse search is set to the temporary end point 44. And FIG.
In the example of (A), the point 52 is a temporary end point.

【0018】ステップS45では、仮端点に対して真の
端点であるか否かの判定を次のようにして行う。即ち、
仮端点より輪郭点座標系列40上で順方向及び逆方向に
線幅×β(βは定数で、β〜1.5)離れた2点を求
め、その2点間の距離dが線幅×γ(γは定数で、γ<
2β、γ〜2)以下であったとき、前記仮端点を端点と
みなす。図5(B)の例では、仮端点52に対して、順
方向及び逆方向に線幅×β離れた点53、54が検出さ
れこの2点間の距離dが線幅×γ以下の時仮端点52が
端点として抽出される。以上のようにして、図1におけ
る端点13が抽出される。
In step S45, it is determined whether or not the temporary endpoint is a true endpoint as follows. That is,
Two points separated by a line width × β (β is a constant, β−1.5) in the forward and reverse directions on the contour point coordinate series 40 from the temporary end point are obtained, and the distance d between the two points is determined by the line width × γ (γ is a constant, γ <
When it is 2β, γ to 2) or less, the temporary end point is regarded as an end point. In the example of FIG. 5B, points 53 and 54 which are separated from the temporary end point 52 by a line width × β in the forward and reverse directions are detected, and the distance d between these two points is equal to or less than the line width × γ. The temporary endpoint 52 is extracted as an endpoint. As described above, the end point 13 in FIG. 1 is extracted.

【0019】図1のステップS5においては、外接枠の
幅(ΔX)と高さ(ΔY)及び周辺分布12により、仮
の直線部分14を抽出する。以下、この抽出方法を述べ
る。先ず、ΔX及びΔYを用いて、X軸に投影された周
辺分布及びY軸に投影された周辺分布のそれぞれに適用
される閾値Thy及びThxを、例えば次式により求める。 Thy=(ΔX+ΔY)/2(但しThy<2/3(ΔY)の時Thy=2/3(ΔY)) (7) Thx=(ΔX+ΔY)/2(但しThx<2/3(ΔX)の時Thx=2/3(ΔX)) (8) これらの閾値をそれぞれの周辺分布に適用し、黒点数が
その閾値以上となる領域を仮の直線部分とする。例え
ば、図2(B)のX軸に投影された周辺分布において、
黒点数が閾値Thy以上となる領域は、 x1 ≦x ≦x2 (9) となり、この部分が仮の直線部分14として抽出され
る。また、図2(C)において、Y軸に投影された周辺
分布において、黒点数が閾値Thx以上となる領域は、 y1 ≦y ≦y2 (10) となる。つまり、図2(A)の2値画像において、水平
方向に横断する直線部分及び垂直方向に縦断する直線部
分がそれぞれ1つずつある可能性があるということにな
る。
In step S5 of FIG. 1, a temporary straight line portion 14 is extracted from the width (ΔX) and height (ΔY) of the circumscribed frame and the peripheral distribution 12. Hereinafter, this extraction method will be described. First, using ΔX and ΔY, thresholds Thy and Thx applied to the peripheral distribution projected on the X-axis and the peripheral distribution projected on the Y-axis are obtained by, for example, the following equation. Thy = (ΔX + ΔY) / 2 (however, when Thy <2/3 (ΔY), Thy = 2/3 (ΔY)) (7) Thx = (ΔX + ΔY) / 2 (where Thx <2/3 (ΔX) Thx = 2/3 (ΔX)) (8) These thresholds are applied to the respective peripheral distributions, and a region where the number of black spots is equal to or larger than the threshold is defined as a temporary straight line portion. For example, in the marginal distribution projected on the X axis in FIG.
A region where the number of black points is equal to or larger than the threshold Thy is x 1 ≦ x ≦ x 2 (9), and this portion is extracted as the temporary straight line portion 14. In FIG. 2C, in the marginal distribution projected on the Y axis, the area where the number of black points is equal to or larger than the threshold Thx is represented by y 1 ≦ y ≦ y 2 (10). That is, in the binary image of FIG. 2A, there is a possibility that there is one straight line portion that crosses in the horizontal direction and one straight line portion that crosses in the vertical direction.

【0020】しかしながら、文字によっては周辺分布1
2の全領域において、黒点数が閾値以下ということも有
り得る。そのような場合は、ステップS8において直線
部分がないものと判定され入力待ちの状態に戻る。
However, depending on the character, the marginal distribution 1
It is possible that the number of black points is less than or equal to the threshold value in the entire region of No. 2. In such a case, it is determined in step S8 that there is no linear portion, and the process returns to a state of waiting for input.

【0021】仮の直線部分14が存在する場合は、理想
的な直線とのずれを示す距離Dを計算する必要がある
が、その計算の前処理として、距離Dの計算が可能であ
るか否かの判定(ステップS9)を行う。距離Dの計算
では、仮の直線部分14の両先端にそれぞれ1個ずつの
端点Bをもっていると仮定している。従って、端点Bの
数をnとすると、前記距離Dの計算可能な条件として例
えば、 n ≧ 2 (11) とすることができる。図2(A)の例ではn=4となる
ため、距離Dは計算可能と判定される。
When the provisional straight line portion 14 exists, it is necessary to calculate a distance D indicating a deviation from an ideal straight line. As a preprocessing for the calculation, it is determined whether or not the distance D can be calculated. Is determined (step S9). In the calculation of the distance D, it is assumed that the provisional straight line portion 14 has one end point B at each of both ends. Therefore, assuming that the number of the end points B is n, the condition for calculating the distance D can be, for example, n ≧ 2 (11). In the example of FIG. 2A, since n = 4, it is determined that the distance D can be calculated.

【0022】前記式(11)が成立すると、次にステッ
プS6で距離Dの計算を行う。図2(A)を例として、
この計算方法を説明する。先ず、垂直に縦断する仮の直
線部分(図2(B)参照)において、その中心を通る直
線とX軸との交点のX座標xmを求める。座標値xmは最
大黒点数を与えるX座標或いは前式(9)で示される領
域の中点として、 xm = (x1+x2)/2 (12) 等のように定義される。
When the equation (11) is satisfied, the distance D is calculated in step S6. 2 (A) as an example.
This calculation method will be described. First, the X coordinate xm of the intersection of the straight line passing through the center and the X-axis in the temporary straight line portion (see FIG. 2B) that vertically crosses is determined. The coordinate value x m is defined as x m = (x 1 + x 2 ) / 2 (12) as the X coordinate which gives the maximum number of black points or the middle point of the area shown by the above equation (9).

【0023】次に、垂直に縦断する仮の直線と理想的な
垂直線分とのずれを表す距離DVについて説明する。理
想的な直線とは、両端の座標をそれぞれ端点a(xa
a)、端点b(xb,yb)としたとき(但し、ya≦y
bとする)、それらのX座標ができるだけxmに近い直線
と言うことができる。従って|xa−xm|及び|xb
m|が距離DVの要素となり得る。また、文字部分を縦
断するので、一方の端点aのY座標値yaはMinYに等し
く、他方の端点bのY座標値ybはMaxYに等しくなるは
ずである。従ってya−MinY及びMaxY−ybも距離DV
の要素となり得る。
Next, a description will be given distance D V representing the displacement between the straight line and the ideal vertical line of temporary traversing vertically. An ideal straight line is defined by the coordinates of both ends at an end point a (x a ,
y a), the end point b (x b, when the y b) (however, y a ≦ y
and b), it is possible say linearly as close to x m can their X coordinate. Therefore, | x a −x m | and | x b
x m | can be a component of the distance D V. Further, since the vertical character portion, Y-coordinate value y a of one of the end points a is equal to MinY, the Y-coordinate value y b of the other end point b should be equal to MaxY. Therefore y a -MinY and MaxY-y b even if the distance D V
Element.

【0024】以上のことから、前記4つの要素を全て加
算した量を距離DVとみなすことができるが、このまま
だと文字図形パタンの大きさによる変動を吸収できない
ために、文字図形パタンの大きさを表す尺度をΔX+Δ
Yとし、この量を用いて正規化を行うことにより、距離
Vを表す式としてたとえば、 DV=100×(|xa-xm|+|xb-xm|+ya-MinY+MaxY-yb)/(ΔX+ΔY)(13) とすることができる。
[0024] From the foregoing, wherein at four elements can be regarded as a distance D V all added amounts of, because it can not absorb the variation due to the size of the graphic character pattern that it anyway, of the graphic character pattern size ΔX + Δ
And Y, by performing normalization using the amounts, such as an expression representing the distance D V, D V = 100 × (| x a -x m | + | x b -x m | + y a -MinY + MaxY−y b ) / (ΔX + ΔY) (13)

【0025】同様にして、水平に横断する仮の直線につ
いての距離DHを求めることができる。図2(C)に示
されるように、水平方向の仮の直線部分の中心線とY軸
との交点ymを、前記xmと同様に式(10)で表される
領域の中心として、 ym=(y1+y2)/2 (14) 等のように表す。また、仮の直線部分の両端の端点候補
として選出された端点をc(xc,yc)及びd(xd
d)としてxc≦xdとすると、距離DHを表す式の一例
として、 DH=100×(|yc-ym|+|yd-ym|+xc-MinX+MaxX-xd)/(ΔX+ΔY) (15) とすることができる。
In the same manner, the distance D H with respect to a tentative straight line crossing horizontally can be obtained. As shown in FIG. 2C, an intersection point y m between the center line of the temporary temporary straight line portion in the horizontal direction and the Y axis is defined as the center of the region represented by the equation (10), similarly to the above x m . y m = (y 1 + y 2 ) / 2 (14) Also, the end points selected as end point candidates at both ends of the provisional straight line portion are c (x c , y c ) and d (x d ,
Assuming that x c ≦ x d as y d ), as an example of an expression representing the distance D H , D H = 100 × (| y c −y m | + | y d −y m | + x c −Min X + Max X −x d ) / (ΔX + ΔY) (15)

【0026】図2(A)の2値画像について、式(1
3)、(15)に基づき距離Dを計算した例を以下に示
す。距離Dの計算の前までの処理で図2(A)の2値画
像からは4つの端点21、22、23、24が抽出され
ているものとする。先ず、垂直方向の仮の直線部分の両
端点候補としてxmに最も近いX座標を持つ端点21
(x21,y21)及び端点23(x23,y23)を選出す
る。これらの座標値と式(3)、(4)と式(13)と
から前記DVとして、 DV=100×(|x21-xm|+|x23-xm|+y21+ye-y23)/(ΔX+ΔY) (16) が得られる。
With respect to the binary image shown in FIG.
An example of calculating the distance D based on 3) and (15) is shown below. It is assumed that four end points 21, 22, 23, and 24 have been extracted from the binary image of FIG. 2A in the processing before the calculation of the distance D. First, the end point 21 having the closest X-coordinate in x m as the end points candidates of the linear portion of the vertical provisional
(X 21 , y 21 ) and end point 23 (x 23 , y 23 ) are selected. From these coordinate values and the expressions (3), (4) and (13), the above DV is given as DV = 100 × (| x 21 -x m | + | x 23 -x m | + y 21 + y e -y 23 ) / (ΔX + ΔY) (16) is obtained.

【0027】また、水平方向の仮の直線部分の両端点候
補として端点21及び端点23を除いたものの中からy
mに最も近いY座標値を持つ端点22(x22、y22)及
び端点24(x24、y24)を選出する。これらの座標値
と式(1)、(2)及び式(15)から前記DHとし
て、 DH=100×(|y22-ym|+|y24-ym|+x22+xe-x24)/(ΔX+ΔY) (17) が得られる。以上で、図1のステップS6の処理が終了
する。
Also, as a candidate for both end points of the temporary temporary straight line portion in the horizontal direction, y is selected from those excluding the end points 21 and 23.
The end point 22 (x 22 , y 22 ) and the end point 24 (x 24 , y 24 ) having the Y coordinate value closest to m are selected. These coordinate values and the formula (1), (2) and as the D H from equation (15), D H = 100 × (| y 22 -y m | + | y 24 -y m | + x 22 + x e− x 24 ) / (ΔX + ΔY) (17) is obtained. Thus, the process of step S6 in FIG. 1 ends.

【0028】ステップS7ではステップS6で計算され
た距離Dに基づき、仮の直線部分が真の直線部分である
か否かの判定を行う。この判定方法として例えば、 D < Th (Thは定数でTh〜10) (18) を満足したときに真の直線部分とする方法がある。
In step S7, based on the distance D calculated in step S6, it is determined whether or not the provisional straight line portion is a true straight line portion. As a method of this determination, for example, there is a method of determining a true straight line portion when D <Th (Th is a constant Th-10) (18).

【0029】式(18)による判定を前記式(16)及
び(17)に当てはめてみると、式(16)で図2
(A)、(B)より明らかに |x21−xm|《ΔX、|x23−xm|《ΔX、y21=0、
e−y23=0 となるため、DVは極めて小さい値になり式(18)が
成立することがわかる。従って、垂直方向の仮の直線部
分は真の直線部分と判定できる。しかしながら、式(1
7)では図2(A)、(C)より明らかに |y22−ym|>ΔY/2、|y24−ym|《ΔY、x22〜Δ
X/4、xe−x24=0 となるため、DHが比較的大きな値となり、式(18)
は成立しない。従って図2(A)の水平方向の仮の直線
部分は、単に文字を構成するストロークの一部分であ
り、抹消線等のように文字を横断するような直線部分で
はないと判断できる。以上のように、距離Dが閾値Th
より小さい仮の直線部分だけが真の直線部分として抽出
され、すべてのステップが終了する。
When applying the determination based on equation (18) to the above equations (16) and (17),
(A) and (B) clearly show that | x 21 −x m | << ΔX, | x 23 −x m | << ΔX, y 21 = 0,
Since the y e -y 23 = 0, D V it can be seen that equation becomes extremely small value (18) is satisfied. Therefore, the temporary linear portion in the vertical direction can be determined as a true linear portion. However, equation (1)
In FIG. 7), it is apparent from FIGS. 2A and 2C that | y 22 −y m |> ΔY / 2, | y 24 −y m | << ΔY, x 22 to Δ
Since X / 4 and x e −x 24 = 0, DH takes a relatively large value, and the equation (18)
Does not hold. Therefore, it can be determined that the temporary linear portion in the horizontal direction in FIG. 2A is only a part of the stroke constituting the character and not a linear portion that crosses the character like a strike-through line. As described above, the distance D is equal to the threshold Th.
Only the smaller temporary straight line portion is extracted as a true straight line portion, and all the steps are completed.

【0030】図3(A)のような文字図形パタンの2値
画像では、X軸に投影された周辺分布(図3(B))及
びY軸に投影された周辺分布(図3(C))が共に2つ
の極大値を持ち仮の直線部分が、水平方向、垂直方向に
それぞれ2つずつ抽出される。このように2つ或いはそ
れ以上の仮の直線部分がある場合に於いてもそれぞれに
於いて式(13)、(15)の適用が可能であることは
いうまでもない。
In the binary image of the character graphic pattern as shown in FIG. 3A, the peripheral distribution projected on the X axis (FIG. 3B) and the peripheral distribution projected on the Y axis (FIG. 3C) ) Have two local maxima, and two tentative straight line portions are extracted in the horizontal and vertical directions, respectively. It goes without saying that even when there are two or more temporary straight line portions, the expressions (13) and (15) can be applied to each of them.

【0031】また、式(13)、(15)は一例であっ
て、周辺分布より抽出された仮の直線の位置に関する情
報と、適当な方法により選び出された端点の位置座標と
外接枠のX座標とY座標の最小最大値を組み合わせるこ
とによって、仮の直線部分14が理想的な直線部分とど
れだけ離れているかを示す距離が表現可能であれば、本
実施例と同様の結果が得られる。
Equations (13) and (15) are merely examples, and include information on the position of the tentative straight line extracted from the peripheral distribution, the position coordinates of the end point selected by an appropriate method, and the circumscribed frame. If the distance indicating how far the provisional straight line portion 14 is away from the ideal straight line portion can be expressed by combining the minimum and maximum values of the X coordinate and the Y coordinate, the same result as in the present embodiment can be obtained. Can be

【0032】尚、前述の実施例では仮の直線として抽出
された部分が2以上存在する場合、その両端点候補とし
て距離Dの計算に用いられる端点は重複して使用するこ
とを禁止していたが、重複を許すようにも変更可能であ
る。その際、図2(A)の水平方向の仮の直線部分の両
端点候補としては、端点23及び端点24が選出される
が、この場合においても距離DH は真の直線部分と比較
して大きくなり前述した例と同様の判断結果を得ること
ができる。
In the above-described embodiment, when there are two or more portions extracted as temporary straight lines, the end points used for calculating the distance D as both end point candidates are prohibited from being used repeatedly. However, it can be changed to allow duplication. At this time, end points 23 and 24 are selected as both end point candidates of the temporary horizontal straight line portion in FIG. 2A. In this case as well, the distance DH is compared with the true straight line portion. It becomes larger and the same judgment result as in the above-described example can be obtained.

【0033】また、前述の実施例に於いては、X軸及び
Y軸に投影された周辺分布を用い、X軸及びY軸に平行
な直線部分を抽出したが、回転変換によるX’軸及び
Y’軸に投影された周辺分布を用いることにより、X’
軸及びY’軸に平行な直線部分即ち、文字図形パタンを
斜めに横切る直線部分を抽出するように本実施例を拡張
することも可能である。
In the above-described embodiment, the linear distribution parallel to the X-axis and the Y-axis is extracted using the marginal distribution projected on the X-axis and the Y-axis. By using the marginal distribution projected on the Y 'axis, X'
This embodiment can be extended to extract a straight line portion parallel to the axis and the Y 'axis, that is, a straight line portion obliquely crossing the character / graphic pattern.

【0034】[0034]

【発明の効果】以上詳細に説明したように、この発明に
よれば、抹消線等のような直線部分の本数やその位置を
予め仮定することなく、先ず、周辺分布によって仮の直
線部分を抽出しておき、仮の直線部分の位置に関する情
報と端点と外接枠座標とによって、理想的な直線部分と
の距離を表現し、その距離に基づいて、仮の直線部分が
真の直線部分であるか否かを決定するようにしたので、
その直線部分の位置や数に依存しない柔軟な特徴抽出が
可能となる。また、大量の演算を必要とせず、しかも標
準パターン等を用いないため、処理時間やメモリを節約
できる。更には自動抽出可能という利点もある。
As described above in detail, according to the present invention, a temporary straight line portion is first extracted by the peripheral distribution without assuming in advance the number and the position of the straight line portion such as an erasure line. In addition, the distance to the ideal straight line portion is expressed by the information on the position of the temporary straight line portion, the end point, and the circumscribed frame coordinates. Based on the distance, the temporary straight line portion is a true straight line portion. Or not.
Flexible feature extraction that does not depend on the position or number of the straight line portions can be performed. Further, since a large amount of calculation is not required and a standard pattern or the like is not used, processing time and memory can be saved. There is also an advantage that automatic extraction is possible.

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

【図1】本発明の実施例の処理手順を示す流れ図であ
る。
FIG. 1 is a flowchart showing a processing procedure according to an embodiment of the present invention.

【図2】特徴抽出方法の説明図である。FIG. 2 is an explanatory diagram of a feature extraction method.

【図3】特徴抽出方法の説明図である。FIG. 3 is an explanatory diagram of a feature extraction method.

【図4】端点抽出の処理手順を示す流れ図である。FIG. 4 is a flowchart showing a procedure for extracting an end point;

【図5】端点抽出方法の説明図である。FIG. 5 is an explanatory diagram of an end point extraction method.

【図6】従来のストローク抽出方法の処理手順を示す流
れ図である。
FIG. 6 is a flowchart showing a processing procedure of a conventional stroke extraction method.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 文字図形パタンに外接する外接矩形に関
する情報を抽出する工程と、 前記文字図形パタンの周辺分布を抽出する工程と、 前記文字図形パタンの端点を抽出する工程と、 前記外接矩形に関する情報と周辺分布と端点とに基づい
て前記文字図形パタンの直線部分を抽出する工程とを有
することを特徴とする特徴抽出方法。
A step of extracting information about a circumscribed rectangle circumscribing the character / graphic pattern; a step of extracting a peripheral distribution of the character / graphic pattern; a step of extracting an end point of the character / graphic pattern; Extracting a straight line portion of the character / graphic pattern based on information, a peripheral distribution, and an end point.
JP4288906A 1992-10-27 1992-10-27 Feature extraction method Expired - Fee Related JP2881080B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4288906A JP2881080B2 (en) 1992-10-27 1992-10-27 Feature extraction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4288906A JP2881080B2 (en) 1992-10-27 1992-10-27 Feature extraction method

Publications (2)

Publication Number Publication Date
JPH06139408A JPH06139408A (en) 1994-05-20
JP2881080B2 true JP2881080B2 (en) 1999-04-12

Family

ID=17736324

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4288906A Expired - Fee Related JP2881080B2 (en) 1992-10-27 1992-10-27 Feature extraction method

Country Status (1)

Country Link
JP (1) JP2881080B2 (en)

Also Published As

Publication number Publication date
JPH06139408A (en) 1994-05-20

Similar Documents

Publication Publication Date Title
Wenyin et al. From raster to vectors: extracting visual information from line drawings
US7437001B2 (en) Method and device for recognition of a handwritten pattern
US5515455A (en) System for recognizing handwritten words of cursive script
JP2002133426A (en) Ruled line extracting device for extracting ruled line from multiple image
US6947596B2 (en) Character recognition method, program and recording medium
JPH07220090A (en) Object recognition method
US7095891B1 (en) Pattern segmentation apparatus and pattern recognition apparatus
JP2881080B2 (en) Feature extraction method
JP3586949B2 (en) Form recognition device
JPH09237339A (en) Circle/circular arc recognizing method
JP3947173B2 (en) Table image processing apparatus, program recording medium, and table image processing method
JP3083609B2 (en) Information processing apparatus and character recognition apparatus using the same
JP2785438B2 (en) Character recognition method
JP3329528B2 (en) Document reader
JPH03126188A (en) Character recognizing device
JP3365941B2 (en) Character pattern recognition method and apparatus
JPS622382A (en) Feature extracting devie for pattern
JP3084833B2 (en) Feature extraction device
JPH0217586A (en) Inclination extracting device
JPH1021332A (en) Non-linear normalizing method
JPH01231189A (en) Character recognizing system
JPH0346080A (en) Feature extraction device
JPH0757047A (en) Character segmentation system
Gao et al. Segmentation of stick text based on sub connected area analysis
JPH06195406A (en) Picture processing method

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: 19990112

LAPS Cancellation because of no payment of annual fees