JPH1069520A - Character recognition method and recording medium recording program - Google Patents
Character recognition method and recording medium recording programInfo
- Publication number
- JPH1069520A JPH1069520A JP9159539A JP15953997A JPH1069520A JP H1069520 A JPH1069520 A JP H1069520A JP 9159539 A JP9159539 A JP 9159539A JP 15953997 A JP15953997 A JP 15953997A JP H1069520 A JPH1069520 A JP H1069520A
- Authority
- JP
- Japan
- Prior art keywords
- character
- character string
- rectangular frame
- inclination angle
- recognition
- 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.)
- Withdrawn
Links
Landscapes
- Character Input (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、たとえば地図等の
図面を読み取り、図面に記入された文字又は文字列を認
識する文字認識方法に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character recognition method for reading a drawing such as a map and recognizing a character or a character string entered in the drawing.
【0002】[0002]
【従来の技術】CADシステム等は、たとえば地図等の
図面を読み取り、図面に記入された文字又は文字列を認
識する文字認識機能を有する。かかる文字認識を行うに
は、まず、オペレータが、画面上で文字又は文字列を長
方形の枠で囲んで認識範囲を指定する。ここで、長方形
の枠は、水平な辺と垂直な辺とを有するものであり、そ
の四つの頂点のうち対角に位置する二点を指定すること
により設定される。こうして認識範囲を指定すると、そ
の認識範囲に含まれる文字の二値画像データから複数の
特徴量を抽出し、特徴パターンを得る。そして、その特
徴パターンと、既に登録されている基準パターンとを比
較することにより、文字認識を行っている。2. Description of the Related Art A CAD system or the like has a character recognition function for reading a drawing such as a map and recognizing a character or a character string entered in the drawing. To perform such character recognition, first, an operator designates a recognition range by surrounding a character or a character string with a rectangular frame on the screen. Here, the rectangular frame has a horizontal side and a vertical side, and is set by designating two diagonally located points among the four vertices. When the recognition range is specified in this way, a plurality of feature amounts are extracted from the binary image data of the characters included in the recognition range, and a feature pattern is obtained. Then, character recognition is performed by comparing the characteristic pattern with a reference pattern that has already been registered.
【0003】[0003]
【発明が解決しようとする課題】ところで、一般に、図
面に記入された文字又は文字列は傾いていることがあ
る。このような傾いた文字又は文字列を認識する場合、
従来のCADシステムでは、オペレータが、上記のよう
に文字又は文字列を長方形の枠で囲んで指定すると共
に、キーボードから文字又は文字列の傾き角度を入力す
る。そして、文字又は文字列の傾き角度を考慮して、文
字の認識を行う。しかしながら、オペレータが画面上で
文字を見ながら文字又は文字列の傾き角度を求めている
ので、正確な文字又は文字列の傾き角度を得ることは困
難である。このため、傾いた文字又は文字列について
は、認識できないことがあり、認識率が悪いという問題
があった。In general, characters or character strings written in drawings may be inclined. When recognizing such inclined characters or character strings,
In the conventional CAD system, an operator designates a character or a character string by enclosing it in a rectangular frame as described above, and inputs an inclination angle of the character or the character string from a keyboard. Then, character recognition is performed in consideration of the inclination angle of the character or character string. However, since the operator obtains the inclination angle of the character or the character string while watching the character on the screen, it is difficult to obtain an accurate inclination angle of the character or the character string. For this reason, there is a problem that a tilted character or a character string cannot be recognized in some cases, and the recognition rate is poor.
【0004】本発明は上記事情に基づいてなされたもの
であり、傾いた文字又は文字列について認識率の向上を
図ることができる文字認識方法を提供することを目的と
するものである。[0004] The present invention has been made based on the above circumstances, and has as its object to provide a character recognition method capable of improving the recognition rate of a tilted character or character string.
【0005】[0005]
【課題を解決するための手段】上記の目的を達成するた
めの請求項1記載の発明は、認識画面上で、前記画面上
の所定の座標軸に対して傾きを有する文字又は文字列を
認識するための文字認識方法において、前記傾きを有す
る文字又は文字列を前記文字又は文字列の傾きとほぼ平
行な傾きを有する長方形の枠で囲んで前記文字又は文字
列の認識範囲を指定し、指定された前記長方形の枠の前
記所定の座標軸に対する傾き角度を算出し、その算出さ
れた前記長方形の枠の傾き角度に基づいて前記文字又は
文字列の傾き角度を決定し、前記文字又は文字列の傾き
角度に基づいて、前記文字又は文字列を認識することを
特徴とするものである。According to the first aspect of the present invention, a character or a character string having an inclination with respect to a predetermined coordinate axis on the screen is recognized on the recognition screen. In the character recognition method, the character or the character string having the inclination is surrounded by a rectangular frame having an inclination substantially parallel to the inclination of the character or the character string, and the recognition range of the character or the character string is designated. Calculating the tilt angle of the rectangular frame with respect to the predetermined coordinate axis, determining the tilt angle of the character or character string based on the calculated tilt angle of the rectangular frame, and determining the tilt of the character or character string. The character or character string is recognized based on an angle.
【0006】請求項2記載の発明に係る文字認識方法
は、請求項1記載の発明において、前記長方形の枠を、
その四つの頂点のうち三点を指定して設定することを特
徴とするものである。請求項3記載の発明に係る文字認
識方法は、請求項2記載の発明において、前記三点のう
ち第一番目に指定した点と第二番目に指定した点とを結
ぶ直線と水平方向とのなす角度を求めることにより前記
長方形の枠の傾き角度を算出することを特徴とするもの
である。According to a second aspect of the present invention, in the character recognition method according to the first aspect, the rectangular frame is
It is characterized in that three of the four vertices are designated and set. A character recognition method according to a third aspect of the present invention is the character recognition method according to the second aspect, wherein a straight line connecting a first designated point and a second designated point among the three points is defined by a horizontal direction. The tilt angle of the rectangular frame is calculated by obtaining an angle to be formed.
【0007】請求項4記載の発明に係る文字認識方法
は、請求項3記載の発明において、前記長方形の枠の傾
き角度から90°ずつ異なる合計四つの角度の中から一
の角度を選択することにより、前記文字又は文字列の傾
き角度を決定することを特徴とするものである。本発明
では、画面上で傾いた文字又は文字列をその文字又は文
字列と同じように傾けた長方形の枠で囲んで認識範囲を
指定し、その長方形の枠の傾き角度を算出することによ
り、正確な長方形の枠の傾き角度を得ることができる。
このため、長方形の枠の傾き角度に基づいて文字又は文
字列の傾き角度を決定すれば、文字又は文字列の傾き角
度も正確に求めることができる。したがって、文字又は
文字列が傾いている場合でも、長方形の枠の傾き角度を
考慮して、文字又は文字列を認識することによって、認
識率の向上を図ることができる。According to a fourth aspect of the present invention, in the character recognition method according to the third aspect, one angle is selected from a total of four angles that differ by 90 ° from the inclination angle of the rectangular frame. Thus, the inclination angle of the character or character string is determined. In the present invention, by specifying a recognition range by surrounding a character or character string inclined on the screen with a rectangular frame inclined in the same manner as the character or character string, by calculating the inclination angle of the rectangular frame, An accurate angle of inclination of the rectangular frame can be obtained.
For this reason, if the inclination angle of the character or the character string is determined based on the inclination angle of the rectangular frame, the inclination angle of the character or the character string can be accurately obtained. Therefore, even when the character or the character string is inclined, the recognition rate can be improved by recognizing the character or the character string in consideration of the inclination angle of the rectangular frame.
【0008】[0008]
【発明の実施の形態】以下に本発明の一実施形態につい
て図面を参照して説明する。図1は本発明の一実施形態
である文字認識方法を用いたCADシステムの概略構成
図、図2はその文字認識方法において認識範囲を指定す
る長方形の枠を示す図である。図1に示すCADシステ
ムは、画像入力装置としてのスキャナ12と、CRT表
示装置14と、位置入力装置(pointing device )16
と、中央処理装置18と、要素ファイル22と、輪郭線
ファイル24と、領域ファイル26と、認識辞書部28
と、認識結果記憶部32とを備えるものである。本実施
形態では、図面を読み取り、図面に記入された文字又は
文字列を認識する場合を考える。特に、ここでは、文字
として大文字の英字及び数字のみを認識するものとす
る。また、図面に記入された文字としては、印字された
文字であっても手書きで書かれた文字であってもよい。DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a schematic configuration diagram of a CAD system using a character recognition method according to an embodiment of the present invention, and FIG. 2 is a diagram illustrating a rectangular frame for specifying a recognition range in the character recognition method. The CAD system shown in FIG. 1 includes a scanner 12 as an image input device, a CRT display device 14, and a position input device (pointing device) 16.
, A central processing unit 18, an element file 22, an outline file 24, an area file 26, a recognition dictionary 28
And a recognition result storage unit 32. In the present embodiment, a case is considered in which a drawing is read and characters or character strings written in the drawing are recognized. In particular, here, it is assumed that only uppercase letters and numbers are recognized as characters. The characters written in the drawing may be printed characters or handwritten characters.
【0009】スキャナ12は、図面を光学的に走査し、
二値画像データとして入力するものである。CRT表示
装置14は、入力した結果を表示するものである。位置
入力装置16は、CRT表示装置14の画面上でたとえ
ばクロスヘアーカーソルを移動し、認識範囲を指定する
ためにその認識範囲の位置座標を指示するものであり、
マウスやトラックボール等が用いられる。本実施形態で
は、図2に示すように、傾いた長方形の枠Wで認識対象
の文字又は文字列を囲んで認識範囲を指定する。実際
に、認識対象の文字又は文字列が傾いている場合には、
その文字又は文字列の傾き角度(以下、単に文字の傾き
角度とも称する。)と同じ角度だけ傾けた長方形の枠W
で認識対象の文字又は文字列を囲むようにする。かかる
長方形の枠Wは、その四つの頂点のうち三点を指定する
ことにより設定される。The scanner 12 optically scans the drawing,
This is input as binary image data. The CRT display device 14 displays the input result. The position input device 16 moves, for example, a crosshair cursor on the screen of the CRT display device 14 and indicates the position coordinates of the recognition range to specify the recognition range.
A mouse, trackball, or the like is used. In the present embodiment, as shown in FIG. 2, a recognition range is specified by surrounding a character or a character string to be recognized with a slanted rectangular frame W. In fact, if the character or character string to be recognized is tilted,
A rectangular frame W tilted by the same angle as the tilt angle of the character or character string (hereinafter also simply referred to as the tilt angle of the character)
To surround the character or character string to be recognized. The rectangular frame W is set by designating three points among the four vertices.
【0010】ここで、スキャナ12から入力された二値
画像データとしては、ファクシミリ等で使用されている
ランレングス形式を基本としたラスターデータを採用し
ている。このラスターデータは、たとえば走査線上で画
素値が「0」(白)から「1」(黒)に変化した始めの
座標を始点、画素値が「1」から「0」に変化する最後
の座標を終点とするデータである。Here, as the binary image data input from the scanner 12, raster data based on a run length format used in facsimile and the like is adopted. This raster data has, for example, a starting point at which the pixel value changes from “0” (white) to “1” (black) on the scanning line, and a last coordinate at which the pixel value changes from “1” to “0”. Is the end point.
【0011】要素ファイル22には、ラスターデータを
ラベリング処理した後、各図形要素毎に抽出した特徴量
(要素データ)が記憶される。ここでは、要素データと
して、重心、面積、外接長方形、モーメント等を用い
る。輪郭線ファイル24には、各図形要素毎にそのラス
ターデータのエッジを取り出した輪郭線のデータが記憶
される。輪郭線は多角形近似され、多数の線分から構成
されており、また、一の輪郭線は閉じた折れ線になって
いる。このため、輪郭線データは、各輪郭線毎にそれを
構成する線分をベクトル化したデータとして持ってい
る。尚、要素データは、輪郭線のデータとファイルポイ
ンタ、又はメモリ上のアドレスポインタによりリンクが
取られている。The element file 22 stores feature amounts (element data) extracted for each graphic element after raster data is subjected to labeling processing. Here, the center of gravity, area, circumscribed rectangle, moment, and the like are used as element data. The contour file 24 stores contour data obtained by extracting the edges of the raster data for each graphic element. The outline is approximated by a polygon and is composed of many line segments, and one outline is a closed polygonal line. For this reason, the contour line data has, as vectorized data, the line segments constituting each contour line. The element data is linked by the contour data and the file pointer or the address pointer on the memory.
【0012】領域ファイル26には、輪郭線を構成する
各線分が画面に読み込んだ図面全体のどの領域に含まれ
るのかを示す領域データが記憶される。領域データは木
構造(根、分岐節点、葉)で管理される。かかる木構造
によるデータ管理では、各分岐節点が図面上の分割途中
の領域を表し、葉が最小分割単位の領域を表す。葉とそ
の葉が表す領域に含まれる輪郭線データとはポインタに
より関連付けられ、かかるポインタは中央処理装置18
の主メモリ19に記憶される。したがって、ある領域を
指定すると、その指定された領域に対応する葉を探索
し、その葉と関連付けられたポインタに基づいて、その
指定された領域に含まれる輪郭線の線分を決定すること
ができる。The area file 26 stores area data indicating which area of the entire drawing read on the screen contains each line segment forming the contour line. The area data is managed in a tree structure (root, branch node, leaf). In data management using such a tree structure, each branch node represents an area in the middle of division on the drawing, and a leaf represents an area of the minimum division unit. The leaves and the contour data included in the region represented by the leaves are associated with each other by a pointer.
Is stored in the main memory 19. Therefore, when a certain region is specified, a leaf corresponding to the specified region is searched, and a line segment of a contour line included in the specified region can be determined based on a pointer associated with the leaf. it can.
【0013】中央処理装置18は、入力されたラスター
データに基づいて前処理的にラベリング処理、特徴量抽
出処理や輪郭線抽出処理等を施し、要素データ、輪郭線
データ、領域データを作成したり、また、文字認識処理
を実行したりするものである。認識辞書部28には、予
めサンプル文字から得た基準パターンが登録されてい
る。また、認識結果記憶部32は、中央処理装置18が
認識した結果を記憶するものである。The central processing unit 18 performs pre-labeling processing, feature quantity extraction processing, contour line extraction processing, etc., based on the input raster data in order to create element data, contour line data, and area data. And executes character recognition processing. In the recognition dictionary unit 28, reference patterns obtained from sample characters are registered in advance. The recognition result storage unit 32 stores the result recognized by the central processing unit 18.
【0014】次に、本実施形態のCADシステムにおい
て、認識対象の文字又は文字列を長方形の枠で囲む操作
手順について説明する。図3はその長方形の枠を指定す
る手順の一例を示す図である。ここでは、図2に示すよ
うに傾いた文字列「ABCDEFG」を認識する場合に
ついて考える。オペレータは、まず、マウスを用いて、
図3(a)に示すように、文字列の左下の位置において
第一番目の点P1 を指定する。これにより、第一番目の
点P1を原点として、xy座標系が設定される。このx
y座標系は、図4(a)に示すように、x軸を水平方向
に、y軸を上下方向にとった直交座標系であり、x軸の
正の向きを右側に、y軸の正の向きを上側にしている。
次に、図3(b)に示すように、第一番目の点P1 から
文字の配列方向に沿った直線上で、文字列の右下の位置
において第二番目の点P2 を指定する。第一番目の点P
1 と第二番目の点P2 とを結ぶ直線は、枠Wの一辺とな
る。その後、図3(c)に示すように、第二番目の点P
2 を通り、第一番目の点P1 と第二番目の点P2 とを結
ぶ直線に直交する直線上で、文字列の右上の位置におい
て第三番目の点P3 を指定する。第三番目の点P3 によ
って上記枠Wの一辺からの高さが定まり、これにより、
傾いた長方形の枠Wが決定する。Next, an operation procedure for enclosing a character or a character string to be recognized in a rectangular frame in the CAD system of the present embodiment will be described. FIG. 3 is a diagram showing an example of a procedure for designating the rectangular frame. Here, a case will be considered where a character string “ABCDEFG” inclined as shown in FIG. 2 is recognized. The operator first uses the mouse to
As shown in FIG. 3 (a), specifying the first-th point P 1 at the lower left position in the string. Thus, as the first-th origin P 1 point, xy coordinate system is set. This x
As shown in FIG. 4A, the y-coordinate system is a rectangular coordinate system in which the x-axis is in a horizontal direction and the y-axis is in an up-down direction. Is facing upwards.
Next, as shown in FIG. 3 (b), on a straight line along the arrangement direction of the first-th point character from P 1, specifies the second th point P 2 at the lower right position of the string . 1st point P
Straight line connecting the first and and the second point P 2 is a side of the frame W. Thereafter, as shown in FIG. 3C, the second point P
Through 2, on a line perpendicular to a line connecting the first-th point P 1 and a second th point P 2, which specifies a third-th point P 3 at the upper right position in the string. By the third point P 3 Sadamari height from one side of the frame W, thereby,
An inclined rectangular frame W is determined.
【0015】尚、上記のような三点の指定の仕方以外で
も、同じ枠Wを得ることができる。図4に同じ枠Wを得
るための三点の指定の仕方のいくつかを示す。ここで、
図4(a)は図3に示した三点の指定の仕方を表してい
る。枠Wの第一番目の点P1をその四つの頂点のうちの
いずれにするかで四通りあり、第二番目の点P2 を第一
番目の点P1 と隣り合う二つの頂点のうちのいずれにす
るかで二通りあるので、三点の指定の仕方としては合計
八通りある。オペレータは指定しやすい仕方で三点を指
定して、枠Wを設定することができる。It is to be noted that the same frame W can be obtained by a method other than the method of specifying the three points as described above. FIG. 4 shows some ways of specifying three points to obtain the same frame W. here,
FIG. 4A shows how to specify the three points shown in FIG. There quadruplicate on whether to any of FIRST its four vertices P 1 point in the frame W, of the two vertices the second th point P 2 adjacent to the first-th point P 1 Because there are two ways, there are a total of eight ways to specify three points. The operator can set the frame W by specifying three points in a manner that is easy to specify.
【0016】こうして枠Wが指定されると、中央処理装
置18は、長方形の枠Wの一辺、ここでは原点(第一番
目の点P1 )と第二番目の点P2 とを結ぶ直線と、x軸
の正方向とのなす角度θ(0°≦θ<360°)を、枠
Wの傾き角度として算出する。ところで、図4に示すよ
うに、三点の指定の仕方に応じて、算出される枠Wの傾
き角度θが異なる。いま、図4(a)に示す三点の指定
の仕方をしたときに算出される枠Wの傾き角度θをθ0
(0°≦θ0 <90°)とすると、上記八通りの指定の
仕方をしたときに算出される枠Wの傾き角度θは、
θ0 、θ0 +90°、θ0 +180°、θ0 +270°
のいずれかである。たとえば、オペレータが図4(b)
に示す仕方で三点を指定した場合、中央処理装置18は
枠Wの傾き角度θをθ0 +90°と算出する。本実施形
態では、この枠Wの傾き角度θに基づいて文字の傾き角
度を決定する。枠Wは文字と同じように傾けて設定され
ているので、文字の傾き角度(0°から360°までの
範囲で考える。)は、算出される枠の傾き角度θから9
0°ずつ異なる上記四つの角度のうちの一つである。そ
こで、本実施形態では、コマンドラインをCRT表示装
置14の画面上に表示することにし、どんな三点の指定
の仕方をした場合でも、オペレータが上記四つの角度の
うち文字の傾き角度と認めるものを選択できるようにし
ている。When the frame W is designated in this way, the central processing unit 18 determines that one side of the rectangular frame W, here a straight line connecting the origin (first point P 1 ) and the second point P 2 , An angle θ (0 ° ≦ θ <360 °) with the positive direction of the x-axis is calculated as the inclination angle of the frame W. By the way, as shown in FIG. 4, the calculated inclination angle θ of the frame W differs depending on how the three points are specified. Now, 0 the inclination angle theta of the frame W theta calculated when the specified manner three points shown in FIG. 4 (a)
(0 ° ≦ θ 0 <90 °), the inclination angle θ of the frame W calculated when the above eight ways are specified is
θ 0 , θ 0 + 90 °, θ 0 + 180 °, θ 0 + 270 °
Is one of For example, if the operator selects FIG.
When the three points are designated in the manner shown in (1), the central processing unit 18 calculates the inclination angle θ of the frame W as θ 0 + 90 °. In the present embodiment, the inclination angle of the character is determined based on the inclination angle θ of the frame W. Since the frame W is set to be tilted in the same manner as the character, the tilt angle of the character (considered in the range of 0 ° to 360 °) is 9 from the calculated tilt angle θ of the frame.
One of the above four angles that differ by 0 °. Therefore, in the present embodiment, the command line is displayed on the screen of the CRT display device 14, and the operator recognizes the inclination angle of the character among the above four angles regardless of the designation method of any three points. You can choose.
【0017】図5はこのコマンドラインの例を示す図で
ある。図5では、θ0 を30°とし、図4(b)に示す
三点の指定の仕方をした場合を示している。コマンドラ
インには、中央処理装置18が算出した枠Wの傾き角度
「120°」以外に、それと±90°、+180°だけ
異なる角度「30°」、「210°」、「300°」が
表示される。枠Wの傾き角度「120°」を選択する場
合には、マウスの右ボタンを押すか、あるいは「W」キ
ーを押す。他の角度を選択する場合には、コマンドライ
ンで指示されたキーを押す。図2に示す文字列「ABC
DEFG」では、「30°」が正しい文字の傾き角度で
あるので、「Q」キーを押す。こうして、対話的処理に
より枠Wの傾き角度θから文字の傾き角度が決定され
る。FIG. 5 is a diagram showing an example of this command line. FIG. 5 shows a case where θ 0 is set to 30 ° and the three points shown in FIG. 4B are designated. On the command line, in addition to the inclination angle “120 °” of the frame W calculated by the central processing unit 18, angles “30 °”, “210 °”, and “300 °” different from the inclination angle by ± 90 ° and + 180 ° are displayed. Is done. To select the inclination angle “120 °” of the frame W, the right button of the mouse is pressed or the “W” key is pressed. To select another angle, press the key indicated on the command line. The character string "ABC shown in FIG.
In "DEFG", "30" is the correct inclination angle of the character, so the "Q" key is pressed. Thus, the inclination angle of the character is determined from the inclination angle θ of the frame W by the interactive processing.
【0018】次に、本実施形態の文字認識方法におい
て、文字認識する際の処理手順を説明する。図6は文字
認識する際の処理手順を説明するための図である。ここ
でも、図2に示すように傾いた文字列「ABCDEF
G」を認識する場合について考える。まず、図面をスキ
ャナ12により読み取り、ラスターデータを得る(step
12)。中央処理装置18は、このラスターデータに基づ
いてラベリング処理を行った後、ラベリングした各図形
要素毎に外接長方形等の特徴量を抽出し、これを要素フ
ァイル22に記憶する。また、各図形要素毎にそのラス
ターデータのエッジを取り出して輪郭線のデータを得
て、これを輪郭線ファイル24に記憶する。次に、輪郭
線データに基づいて、輪郭線を構成する各線分が含まれ
る領域に関する情報を木構造で管理するために領域デー
タを作成する。そして、この領域データを領域ファイル
26に記憶する。尚、ここまでの動作は、図面をスキャ
ナ12で読み取った後、中央処理装置18により自動的
に実行される。Next, a processing procedure for character recognition in the character recognition method of the present embodiment will be described. FIG. 6 is a diagram for explaining a processing procedure for character recognition. Here, the character string “ABCDEF” which is inclined as shown in FIG.
Consider the case of recognizing "G". First, the drawing is read by the scanner 12 to obtain raster data (step
12). After performing a labeling process based on the raster data, the central processing unit 18 extracts a feature amount such as a circumscribed rectangle for each of the labeled graphic elements, and stores this in the element file 22. In addition, the edge of the raster data is extracted for each graphic element to obtain contour data, which is stored in the contour file 24. Next, area data is created based on the outline data in order to manage information on an area including each line segment constituting the outline in a tree structure. Then, the area data is stored in the area file 26. The above operation is automatically executed by the central processing unit 18 after the drawing is read by the scanner 12.
【0019】次に、オペレータは、マウスを用いて、認
識対象の文字列を長方形の枠Wで囲んで認識範囲を指定
する(step14)。すると、画面上に図5に示すコマンド
ラインが表示され、オペレータは、画面上で文字列「A
BCDEFG」を見て、文字の傾き角度θ0 =30°を
選択する。次に、中央処理装置18は、領域管理ツリー
内を探索し、枠Wで囲まれた領域に対応する葉を見つけ
出す。その葉に関連して主メモリ19に記憶されたポイ
ンタに基づいて、枠W内に含まれる輪郭線データを知る
ことができ、これにより、枠W内に含まれる図形要素が
分かる。ここで、本実施形態では、文字として大文字の
英字及び数字のみを取り扱っており、文字はすべて一の
構成要素からなるので、各図形要素は一の文字を表して
いる。次に、その輪郭線データとリンクが取られている
要素データのうち、その図形要素の外接長方形について
の情報を要素ファイル22から抽出する。その後、かか
る外接長方形についての情報を用いて、ラスターデータ
を切り出す(step16)。尚、この外接長方形は、画面に
対して水平な辺と垂直な辺とを有するものである。Next, the operator designates a recognition range by surrounding the character string to be recognized with a rectangular frame W using a mouse (step 14). Then, the command line shown in FIG. 5 is displayed on the screen, and the operator displays the character string “A” on the screen.
With reference to “BCDEFG”, a character inclination angle θ 0 = 30 ° is selected. Next, the central processing unit 18 searches the area management tree to find a leaf corresponding to the area surrounded by the frame W. Based on the pointer stored in the main memory 19 in relation to the leaf, the outline data included in the frame W can be known, whereby the graphic element included in the frame W can be known. Here, in the present embodiment, only uppercase letters and numerals are handled as characters, and all the characters are composed of one component, so each graphic element represents one character. Next, information on the circumscribed rectangle of the graphic element is extracted from the element file 22 among the element data linked with the outline data. Thereafter, raster data is cut out using the information on the circumscribed rectangle (step 16). The circumscribed rectangle has a horizontal side and a vertical side with respect to the screen.
【0020】ところで、文字が傾いており、隣合う文字
同士が接近している場合には、かかる外接長方形で切り
出した範囲には、隣の文字の一部が含まれる可能性があ
る。このような文字の一部はノイズとなり、認識精度が
低下する原因となる。そこで、かかる文字の一部を取り
除くため、切り出した各範囲において、ラベリング処理
を行い、その範囲で一番大きなラスターデータを求め、
そのラスターデータのみを再度切り出す(step18)。
尚、一般に、シンボルマークや漢字等の文字を取り扱う
場合には、各構成要素間の相対的な位置関係をも考慮し
て一の文字を表すラスターデータを切り出す必要があ
る。When characters are inclined and adjacent characters are close to each other, a part of the adjacent characters may be included in the range cut out by the circumscribed rectangle. Some of such characters become noise and cause a reduction in recognition accuracy. Therefore, in order to remove a part of such characters, labeling processing is performed in each of the cut-out ranges, and the largest raster data in the range is obtained.
Only the raster data is cut out again (step 18).
In general, when handling characters such as symbol marks and kanji, it is necessary to cut out raster data representing one character in consideration of the relative positional relationship between components.
【0021】次に、文字の傾き角度θ0 を考慮しつつ、
step18で再度切り出したラスターデータについて文字認
識処理を行う(step22)。すなわち、各ラスターデータ
を、step14で得られた文字の傾き角度θ0 だけ時計回り
に回転させることにより、文字の傾き角度をゼロにした
後、各ラスターデータについて新たに特徴量を抽出す
る。そして、これらの特徴量に基づいて特徴パターンを
得た後、その特徴パターンと認識辞書部28に登録され
た基準パターンとを比較することにより文字認識する。Next, considering the inclination angle θ 0 of the character,
Character recognition processing is performed on the raster data cut out again in step 18 (step 22). That is, each raster data, by rotating the tilt angle theta 0 only clockwise obtained characters step 14, after the inclination angle of the character to zero, newly extracts a feature quantity for each raster data. After obtaining a characteristic pattern based on these characteristic amounts, character recognition is performed by comparing the characteristic pattern with a reference pattern registered in the recognition dictionary unit 28.
【0022】その後、認識処理された各文字を配列する
文字列化の処理を行う(step24)。この処理では、xy
座標系における各文字の重心位置を比較することによ
り、文字の配列順序を決定する。このとき、文字の傾き
角度θ0 に応じて順序決定の仕方が異なる。これは次の
四つの場合に分けられる。 Case(1) 0°≦θ<90° Case(2) 90°≦θ<180° Case(3) 180°≦θ<270° Case(4) 270°≦θ<360° Case(1) では、一の文字の重心のx座標、y座標がそれ
ぞれともに他の文字の重心のx座標、y座標よりも大き
いときに、一の文字を他の文字の右側に挿入し、また、
一の文字の重心のx座標、y座標がそれぞれともに他の
文字の重心のx座標、y座標よりも小さいときに、一の
文字を他の文字の左側に挿入する。Case(2) では、一の
文字の重心のx座標が他の文字の重心のx座標よりも小
さく、一の文字の重心のy座標が他の文字の重心のy座
標よりも大きいときに、一の文字を他の文字の右側に挿
入し、また、一の文字の重心のx座標が他の文字の重心
のx座標よりも大きく、一の文字の重心のy座標が他の
文字の重心のy座標よりも小さいときに、一の文字を他
の文字の左側に挿入する。Case(3) では、一の文字の重
心のx座標、y座標がそれぞれともに他の文字の重心の
x座標、y座標よりも小さいときに、一の文字を他の文
字の右側に挿入し、また、一の文字の重心のx座標、y
座標がそれぞれともに他の文字の重心のx座標、y座標
よりも大きいときに、一の文字を他の文字の左側に挿入
する。そして、Case(4) では、一の文字の重心のx座標
が他の文字の重心のx座標よりも大きく、一の文字の重
心のy座標が他の文字の重心のy座標よりも小さいとき
に、一の文字を他の文字の右側に挿入し、また、一の文
字の重心のx座標が他の文字の重心のx座標よりも小さ
く、一の文字の重心のy座標が他の文字の重心のy座標
よりも大きいときに、一の文字を他の文字の左側に挿入
する。こうして、個々に認識された各文字が配列され、
最終的な認識結果はCRT表示装置18の画面上にダイ
アログボックスで表示される。Thereafter, a character string conversion process for arranging the recognized characters is performed (step 24). In this processing, xy
The arrangement order of the characters is determined by comparing the positions of the centers of gravity of the characters in the coordinate system. At this time, the way of determining the order differs depending on the inclination angle θ 0 of the character. This is divided into the following four cases. Case (1) 0 ° ≦ θ <90 ° Case (2) 90 ° ≦ θ <180 ° Case (3) 180 ° ≦ θ <270 ° Case (4) 270 ° ≦ θ <360 ° In Case (1), When the x-coordinate and y-coordinate of the center of gravity of one character are both larger than the x-coordinate and y-coordinate of the center of gravity of the other character, insert one character to the right of the other character;
When the x-coordinate and y-coordinate of the center of gravity of one character are both smaller than the x-coordinate and y-coordinate of the center of gravity of another character, one character is inserted to the left of the other character. In Case (2), when the x coordinate of the center of gravity of one character is smaller than the x coordinate of the center of gravity of another character, and the y coordinate of the center of gravity of one character is larger than the y coordinate of the center of gravity of another character, One character is inserted to the right of the other character, and the x coordinate of the center of gravity of one character is larger than the x coordinate of the center of gravity of another character, and the y coordinate of the center of gravity of one character is the center of gravity of the other character. Inserts one character to the left of another when it is less than the y coordinate of. In Case (3), when the x-coordinate and y-coordinate of the center of gravity of one character are both smaller than the x-coordinate and y-coordinate of the center of gravity of another character, one character is inserted to the right of the other character, Also, the x coordinate of the center of gravity of one character, y
When each of the coordinates is larger than the x and y coordinates of the center of gravity of the other character, one character is inserted to the left of the other character. In Case (4), when the x coordinate of the center of gravity of one character is larger than the x coordinate of the center of gravity of another character, and the y coordinate of the center of gravity of one character is smaller than the y coordinate of the center of gravity of another character , One character is inserted to the right of the other characters, the x coordinate of the center of gravity of one character is smaller than the x coordinate of the center of gravity of another character, and the y coordinate of the center of gravity of one character is Inserts one character to the left of another character when it is greater than the y coordinate of the center of gravity of. In this way, each recognized character is arranged,
The final recognition result is displayed in a dialog box on the screen of the CRT display device 18.
【0023】本実施形態の文字認識方法では、画面上で
傾いた文字又は文字列をその文字又は文字列と同じよう
に傾けた長方形の枠で囲んで認識範囲を指定し、その長
方形の枠の傾き角度を自動的に算出することにより、長
方形の枠の傾き角度を正確に求めることができる。そし
て、オペレータは画面上の文字又は文字列を見ながら、
長方形の枠の傾き角度から90°ずつ異なる四つの角度
の中から文字又は文字列の傾き角度を選択すればよいの
で、簡単な操作で、正確な文字又は文字列の傾き角度を
容易に決定することができる。したがって、文字又は文
字列が傾いている場合、かかる文字又は文字列の傾き角
度を考慮して、文字又は文字列を認識することによっ
て、認識率の向上を図ることができる。なお、以上説明
した動作を実行するプログラムは、フロッピーディス
ク、CD−ROM等の可搬媒体や、ハードディスク等の
記憶装置等に、その全体あるいは一部が記録され、ある
いは記憶されている。そのプログラムがコンピュータに
より読み取られて、動作の全部あるいは一部が実行され
る。In the character recognition method of the present embodiment, a recognition range is specified by surrounding a character or character string inclined on the screen with a rectangular frame inclined in the same manner as the character or character string, and specifying the recognition range. By automatically calculating the tilt angle, the tilt angle of the rectangular frame can be accurately obtained. Then, the operator looks at the characters or character strings on the screen,
Since the inclination angle of the character or the character string can be selected from four angles that differ by 90 ° from the inclination angle of the rectangular frame, the accurate inclination angle of the character or the character string can be easily determined by a simple operation. be able to. Therefore, when the character or the character string is inclined, the recognition rate can be improved by recognizing the character or the character string in consideration of the inclination angle of the character or the character string. Note that the program for executing the above-described operation is entirely or partially recorded or stored in a portable medium such as a floppy disk, a CD-ROM, or a storage device such as a hard disk. The program is read by the computer, and all or part of the operation is executed.
【0024】尚、本発明は上記の実施形態に限定される
ものではなく、その要旨の範囲内において種々の変形が
可能である。特に、本実施形態においては、認識範囲の
指定の際、長方形の枠を用いたが、これに限定されるこ
とはなく、たとえば楕円形の枠を用いて、楕円形の対角
線等により文字又は文字列の傾き角度を算出してもよ
い。It should be noted that the present invention is not limited to the above embodiment, and various modifications can be made within the scope of the invention. In particular, in the present embodiment, a rectangular frame was used to specify the recognition range. However, the present invention is not limited to this. The column inclination angle may be calculated.
【0025】[0025]
【発明の効果】以上説明したように本発明によれば、画
面上で傾いた文字又は文字列をその文字又は文字列と同
じように傾けた長方形の枠で囲んで認識範囲を指定し、
その長方形の枠の傾き角度を算出することにより、長方
形の枠の正確な傾き角度を得ることができ、したがっ
て、その長方形の枠の傾き角度に基づいて文字又は文字
列の傾き角度を決定すれば、文字又は文字列の傾き角度
も正確に求めることができるので、傾いた文字又は文字
列についての認識率の向上を図ることができる文字認識
方法を提供することができる。As described above, according to the present invention, a recognition range is specified by surrounding a character or character string inclined on the screen with a rectangular frame inclined in the same manner as the character or character string,
By calculating the inclination angle of the rectangular frame, an accurate inclination angle of the rectangular frame can be obtained. Therefore, if the inclination angle of the character or character string is determined based on the inclination angle of the rectangular frame, Since the inclination angle of a character or a character string can also be accurately obtained, it is possible to provide a character recognition method capable of improving the recognition rate of a tilted character or a character string.
【図1】本発明の一実施形態である文字認識方法を用い
たCADシステムの概略構成図である。FIG. 1 is a schematic configuration diagram of a CAD system using a character recognition method according to an embodiment of the present invention.
【図2】その文字認識方法において認識範囲を指定する
長方形の枠を示す図である。FIG. 2 is a diagram showing a rectangular frame for specifying a recognition range in the character recognition method.
【図3】その長方形の枠を指定する手順の一例を示す図
である。FIG. 3 is a diagram showing an example of a procedure for specifying the rectangular frame.
【図4】同じ長方形の枠を得るための三点の指定の仕方
の例を示す図である。FIG. 4 is a diagram showing an example of how to specify three points to obtain the same rectangular frame.
【図5】文字の傾き角度を選択するためのコマンドライ
ンの例を示す図である。FIG. 5 is a diagram illustrating an example of a command line for selecting a tilt angle of a character.
【図6】本実施形態の文字認識方法において文字認識す
る際の処理手順を説明するための図である。FIG. 6 is a diagram for explaining a processing procedure when character recognition is performed in the character recognition method according to the embodiment.
12 スキャナ 14 CRT表示装置 16 位置入力装置 18 中央処理装置 19 主メモリ 22 要素ファイル 24 輪郭線ファイル 26 領域ファイル 28 認識辞書部 32 認識結果記憶部 Reference Signs List 12 scanner 14 CRT display device 16 position input device 18 central processing unit 19 main memory 22 element file 24 contour file 26 area file 28 recognition dictionary unit 32 recognition result storage unit
Claims (6)
軸に対して傾きを有する文字又は文字列を認識するため
の文字認識方法において、 前記傾きを有する文字又は文字列を前記文字又は文字列
の傾きとほぼ平行な傾きを有する長方形の枠で囲んで前
記文字又は文字列の認識範囲を指定し、 指定された前記長方形の枠の前記所定の座標軸に対する
傾き角度を算出し、 その算出された前記長方形の枠の傾き角度に基づいて前
記文字又は文字列の傾き角度を決定し、 前記文字又は文字列の傾き角度に基づいて、前記文字又
は文字列を認識することを特徴とする文字認識方法。1. A character recognition method for recognizing a character or a character string having a tilt with respect to a predetermined coordinate axis on the screen on a recognition screen, wherein the character or the character string having the tilt is converted to the character or the character. The recognition range of the character or the character string is designated by enclosing it in a rectangular frame having a tilt substantially parallel to the column tilt, and the tilt angle of the specified rectangular frame with respect to the predetermined coordinate axis is calculated. Determining the inclination angle of the character or the character string based on the inclination angle of the rectangular frame, and recognizing the character or the character string based on the inclination angle of the character or the character string. Method.
ち三点を指定して設定することを特徴とする請求項1記
載の文字認識方法。2. The character recognition method according to claim 1, wherein the rectangular frame is set by designating three of the four vertices.
第二番目に指定した点とを結ぶ直線と水平方向とのなす
角度を求めることにより前記長方形の枠の傾き角度を算
出することを特徴とする請求項2記載の文字認識方法。3. An inclination angle of the rectangular frame is calculated by obtaining an angle between a horizontal line and a straight line connecting a first designated point and a second designated point among the three points. 3. The character recognition method according to claim 2, wherein:
つ異なる合計四つの角度の中から一の角度を選択するこ
とにより、前記文字又は文字列の傾き角度を決定するこ
とを特徴とする請求項3記載の文字認識方法。4. The tilt angle of the character or character string is determined by selecting one angle from a total of four angles that differ by 90 ° from the tilt angle of the rectangular frame. Item 3. The character recognition method according to Item 3.
軸に対して傾きを有する文字又は文字列を認識するため
のプログラムを記録した記録媒体において、 前記傾きを有する文字又は文字列を前記文字又は文字列
の傾きとほぼ平行な傾きを有する長方形の枠で囲んで前
記文字又は文字列の認識範囲を指定する手順と、 指定された前記長方形の枠の前記所定の座標軸に対する
傾き角度を算出する手順と、 その算出された前記長方形の枠の傾き角度に基づいて前
記文字又は文字列の傾き角度を決定する手順と、 前記文字又は文字列の傾き角度にも基づいて、前記文字
又は文字列を認識する手順と、 を実行させるためのプログラムを記録した記録媒体。5. A recording medium on which a program for recognizing a character or a character string having a tilt with respect to a predetermined coordinate axis on the screen on a recognition screen is recorded. A procedure of specifying the recognition range of the character or the character string by enclosing it in a rectangular frame having an inclination substantially parallel to the inclination of the character or the character string, and calculating an inclination angle of the specified rectangular frame with respect to the predetermined coordinate axis And determining the inclination angle of the character or character string based on the calculated inclination angle of the rectangular frame. The character or character string based on the inclination angle of the character or character string. A recording medium storing a procedure for recognizing and a program for executing the procedure.
ち三点を指定して設定する手順をさらに含む請求項1記
載の記録媒体。6. The recording medium according to claim 1, further comprising a step of setting the rectangular frame by designating three of the four vertices.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP9159539A JPH1069520A (en) | 1996-06-18 | 1997-06-17 | Character recognition method and recording medium recording program |
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP15660096 | 1996-06-18 | ||
| JP8-156600 | 1996-06-18 | ||
| JP9159539A JPH1069520A (en) | 1996-06-18 | 1997-06-17 | Character recognition method and recording medium recording program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH1069520A true JPH1069520A (en) | 1998-03-10 |
Family
ID=26484298
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP9159539A Withdrawn JPH1069520A (en) | 1996-06-18 | 1997-06-17 | Character recognition method and recording medium recording program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH1069520A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6523105B1 (en) | 1997-04-16 | 2003-02-18 | Sony Corporation | Recording medium control device and method |
| CN102760233A (en) * | 2011-04-25 | 2012-10-31 | 夏普株式会社 | Image processing apparatus |
| CN112016341A (en) * | 2019-05-28 | 2020-12-01 | 珠海金山办公软件有限公司 | A kind of text picture correction method and device |
-
1997
- 1997-06-17 JP JP9159539A patent/JPH1069520A/en not_active Withdrawn
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6523105B1 (en) | 1997-04-16 | 2003-02-18 | Sony Corporation | Recording medium control device and method |
| CN102760233A (en) * | 2011-04-25 | 2012-10-31 | 夏普株式会社 | Image processing apparatus |
| JP2012230480A (en) * | 2011-04-25 | 2012-11-22 | Sharp Corp | Image processor |
| US8705862B2 (en) | 2011-04-25 | 2014-04-22 | Sharp Kabushiki Kaisha | Image processing apparatus |
| CN112016341A (en) * | 2019-05-28 | 2020-12-01 | 珠海金山办公软件有限公司 | A kind of text picture correction method and device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3469345B2 (en) | Image filing apparatus and filing method | |
| EP0434930B1 (en) | Editing text in an image | |
| JP4973063B2 (en) | Table data processing method and apparatus | |
| JP3805005B2 (en) | Image processing apparatus, optical character recognition apparatus, and methods thereof | |
| US5509092A (en) | Method and apparatus for generating information on recognized characters | |
| JP2001175807A (en) | Method for selecting text area | |
| JP2000090195A (en) | Table recognition method and device | |
| JP2012203458A (en) | Image processor and program | |
| JP4757001B2 (en) | Image processing apparatus and image processing method | |
| JP4704601B2 (en) | Character recognition method, program, and recording medium | |
| US6810147B2 (en) | Document image processing apparatus for processing line portions manually input to document image, method therefor, and computer readable recording medium recorded with document image processing program therefor | |
| JP5906788B2 (en) | Character cutout method, and character recognition apparatus and program using this method | |
| JPH06301781A (en) | Method and equipment for image transformation for pattern recognition by computer | |
| JP3733310B2 (en) | Document format identification device and identification method | |
| JPH08166865A (en) | Screen generation method and apparatus thereof | |
| JPH1069520A (en) | Character recognition method and recording medium recording program | |
| JP3172498B2 (en) | Image recognition feature value extraction method and apparatus, storage medium for storing image analysis program | |
| JP2006227824A (en) | Drawing recognition method and apparatus | |
| JP4878057B2 (en) | Character recognition method, program, and recording medium | |
| JPH07220081A (en) | Segmenting method for graphic of image recognizing device | |
| JPH07230526A (en) | Character reader | |
| JP4263089B2 (en) | Information processing apparatus, information processing method, program, and recording medium | |
| JP5361315B2 (en) | Information processing apparatus and information processing method | |
| JP2006277149A (en) | Character and image segmentation device, character and image segmentation method, and program | |
| JP2755299B2 (en) | Image processing method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20040907 |