JPH0334081A - Drawing reader - Google Patents

Drawing reader

Info

Publication number
JPH0334081A
JPH0334081A JP1169179A JP16917989A JPH0334081A JP H0334081 A JPH0334081 A JP H0334081A JP 1169179 A JP1169179 A JP 1169179A JP 16917989 A JP16917989 A JP 16917989A JP H0334081 A JPH0334081 A JP H0334081A
Authority
JP
Japan
Prior art keywords
character
contour
characters
character string
data
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.)
Pending
Application number
JP1169179A
Other languages
Japanese (ja)
Inventor
Tetsuya Yasuda
哲也 安田
Tomoyuki Kurita
栗田 知幸
Keisuke Goto
啓介 後藤
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing 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 Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP1169179A priority Critical patent/JPH0334081A/en
Publication of JPH0334081A publication Critical patent/JPH0334081A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To easily and accurately read the characters regardless of the sizes and formats of these characters when the characters are read out of a document or a drawing including the characters, the segments and symbols and recognized by preparing a contour vectorization processing part, a histogram preparing part, a character string extracting part, and a character segmenting part. CONSTITUTION:A contour vectorization processing part 1 which applies a contour vector process to the binarized picture element data and obtains the square data circumscribed to the contour vector as the character candidates, a histogram preparing part 2 which obtains a one-dimensional histogram for the circumscribed square serving as the character candidates, a character string extracting part 3 which extracts a character string based on the one-dimensional histogram data, a character segmenting part 4 having a function to integrate plural character candidates included in the extracted character string are provided. In such a constitution, the characters can be easily and accurately read regardless of the sizes and formats of these characters when the characters are read out of a document or a drawing including the characters, the segments and the symbols.

Description

【発明の詳細な説明】 A、産業上の利用分身 本発明は文字、線分、シンボル等が混在する書類や図面
から、文字データを検出してその文字の認識を行う図面
読取装置に関する。
DETAILED DESCRIPTION OF THE INVENTION A. Industrial Applications The present invention relates to a drawing reading device that detects character data from documents and drawings containing a mixture of characters, line segments, symbols, etc. and recognizes the characters.

B1発明の概要 本発明は文字、線分、シンボルが混在する書類や図面等
の被写体をラスタスキャンして得られた黒白に対応する
2値化画素データから文字データを抽出し、その文字の
認識を行う図面読取装置において、 前記2値化画素データについて輪郭ベクトル化処理を施
し、該輪郭ベクトルに外接する外接四角形データを文字
候補として求める輪郭ベクトル化処理部と、該文字候補
の外接四角形についての1次元ヒストグラムを求めるヒ
ストグラム作成部と、該1次元ヒストグラムデータに基
づいて文字列を抽出する文字列抽出部と、該抽出された
文字列内の複数の文字候補を統合する機能を有した文字
切り出し部とを設けたことにより、 文字、線分、シンボルが混在する書類や図面から文字を
読み取って認識する場合、大きさや書式に限定条件を付
けることなくいかなる大きさ、書式の文字であっても容
易に且つ正確に読み取ることができるようにしたもので
ある。
B1 Summary of the Invention The present invention extracts character data from binary pixel data corresponding to black and white obtained by raster scanning an object such as a document or drawing containing a mixture of characters, line segments, and symbols, and recognizes the character. A drawing reading device that performs contour vectorization processing for the binarized pixel data, and a contour vectorization processing unit that calculates circumscribed rectangle data circumscribing the contour vector as a character candidate; A histogram creation unit that creates a one-dimensional histogram, a character string extraction unit that extracts a character string based on the one-dimensional histogram data, and a character extraction unit that has a function of integrating multiple character candidates within the extracted character string. By establishing this section, when reading and recognizing characters from documents or drawings that contain a mixture of characters, line segments, and symbols, it is possible to read and recognize characters of any size or format without imposing any restrictions on size or format. This allows for easy and accurate reading.

C8従来の技術 文字や図形等を読み取る場合、例えば、書類や図面等の
被写体をイメージスキャナ等の入力装置でラスタスキャ
ンして黒と白の2値画像データ(人カバターン)に変換
し、この2値画像データから対象物の文字データを抽出
し、対象物の認識処理を行っている。文字、図形等が混
在する図面等に含まれる文字を認識するには、まず文字
の部分と図形の部分を分け、さらに1文字分の情報ごと
に切り出して認識を行う必要がある。
C8 Conventional technology When reading characters, figures, etc., for example, an object such as a document or drawing is raster-scanned using an input device such as an image scanner, and converted into black and white binary image data (human cover pattern). The character data of the object is extracted from the value image data, and object recognition processing is performed. In order to recognize characters included in a drawing or the like in which characters, figures, etc. are mixed, it is necessary to first separate the text part and the figure part, and then cut out each character's worth of information for recognition.

D1発明が解決しようとする課題 ここで図面に含まれる文字は、文書のものとは異なり文
字の大きさが一定ではなく、またその書式も定まってい
ない。このため文字、線分、シンボル等が混在する書類
や図面に含まれる文字を、その書式や大きさにとられれ
ることなく抽出して認識することは極めて困難であった
D1 Problems to be Solved by the Invention Unlike those in documents, the characters included in the drawings do not have a constant size, and their format is also not fixed. For this reason, it has been extremely difficult to extract and recognize characters contained in documents or drawings that contain a mixture of characters, line segments, symbols, etc., regardless of their format or size.

本発明は上記の点に鑑みてなされたものでその目的は、
書類や図面に含まれる文字がいかなる大きさ、書式であ
っても容易に且つ正確に読み取ることができる図面読取
装置を提供することにある。
The present invention has been made in view of the above points, and its purpose is to:
To provide a drawing reading device that can easily and accurately read characters included in documents and drawings, regardless of their size and format.

E9課題を解決するための手段 本発明は、文字、線分、シンボルが混在する被写体をラ
スタスキャンして得られた黒白に対応する2値化画素デ
ータから文字データを抽出し、該抽出された文字データ
と文字辞書を参照、比較して文字を認識する図面読取装
置において、前記被写体をラスタスキャンして得られた
黒白に対応する2値化画素データに基づいて、互いに隣
接した2個の黒画素を結ぶベクトルを結合して成る輪郭
ベクトルのデータを求めるとともに、該輪郭ベクトルに
外接する外接四角形データを文字候補として求める輪郭
ベクトル化処理部と、前記輪郭ベクトル化処理部で求め
られた文字候補の外接四角形を対象に、水平、垂直、斜
めの各方向に関する1次元ヒストグラムを求めるヒスト
グラム作成部と、 前記ヒストグラム作成部で求められたデータのうち所定
のしきい値以上のデータを文字列候補として抽出すると
ともに、該抽出データの中から、文字列候補の高さhと
文字列候補内の互いに隣接する文字候補間の距fsdが
d<h×α(αは定数)なる関係にあるデータを文字列
として抽出する文字列抽出部と、 前記文字列抽出部で抽出された文字列内の近接する複数
の文字候補を統合する機能を有し、文字列から文字を切
り出す文字切り出し部とを備え、前記文字切り出し部で
切り出された文字データに基づいて文字認識を行うこと
を特徴としている。
E9 Means for Solving Problems The present invention extracts character data from binarized pixel data corresponding to black and white obtained by raster scanning an object in which characters, line segments, and symbols are mixed, and extracts character data from the extracted pixel data. In a drawing reading device that recognizes characters by referring to and comparing character data and a character dictionary, two adjacent black pixels are detected based on binarized pixel data corresponding to black and white obtained by raster scanning the subject. a contour vectorization processing section that obtains contour vector data formed by combining vectors connecting pixels, and obtains circumscribed rectangular data circumscribed to the contour vector as a character candidate; and a character candidate obtained by the contour vectorization processing section. a histogram creation unit that calculates a one-dimensional histogram in each of the horizontal, vertical, and diagonal directions for a circumscribed rectangle; and a histogram creation unit that uses data that is equal to or higher than a predetermined threshold value as character string candidates among the data obtained by the histogram creation unit. At the same time, from among the extracted data, data in which the height h of a character string candidate and the distance fsd between mutually adjacent character candidates in the character string candidate are in a relationship such that d<h×α (α is a constant) are extracted. A character string extraction unit that extracts characters as a character string; and a character extraction unit that has a function of integrating a plurality of adjacent character candidates in the character string extracted by the character string extraction unit and that cuts out characters from the character string. , character recognition is performed based on the character data extracted by the character extraction section.

171作用 前記ベクトル化処理部によって外接四角形を求めると文
字、線分、シンボルが混在する被写体(書類や図面)の
中から文字候補のデータが得られる。この文字候補の外
接四角形を対象としてヒストグラム作成部によって求め
たヒストグラムのうち、所定値以上のデータが文字列候
補となる。
171 Effect When a circumscribed rectangle is determined by the vectorization processing unit, character candidate data is obtained from an object (document or drawing) in which characters, line segments, and symbols are mixed. Among the histograms obtained by the histogram creation unit for the circumscribed rectangle of this character candidate, data having a predetermined value or more becomes a character string candidate.

この文字列候補の中で、d<h×α(dは隣接する文字
候補間距離、hは文字列候補の高さ、αは定数)の関係
が成立するデータが文字列抽出部によって文字列として
抽出される。すなわち被写体の中に混在する線分やシン
ボルは除外され文字列のデータのみが抽出される。次に
文字切り出し部は前記文字列から文字を切り出す。この
とき文字列内の近接する複数の文字候補の大きさや文字
候補間距離が所定値である場合には、それら複数の文字
候補を統合し、統合された文字候補を1個の文字として
切り出す。これによって文字の大きさや書式がいかむる
ものであっても文字として読み取ることができる。
Among these character string candidates, data for which the relationship d<h×α (d is the distance between adjacent character candidates, h is the height of the character string candidate, and α is a constant) is extracted into a character string by the character string extraction unit. is extracted as That is, line segments and symbols mixed in the subject are excluded, and only character string data is extracted. Next, the character cutting section cuts out characters from the character string. At this time, if the size of a plurality of adjacent character candidates in the character string or the distance between character candidates is a predetermined value, the plurality of character candidates are integrated, and the integrated character candidate is cut out as one character. This allows characters to be read even if the size and format of the characters are questionable.

G、実施例 以下、図面を参照しながら本発明の一実施例を説明する
。まず本発明による図面読取装置は第1図のように輪郭
ベクトル化処理部11ヒストグラム作成部2、文字列抽
出部3、文字切り出し部4および文字認識部5を備えて
おり、全体の処理の流れは第2図のように示される。す
なわちまずステップS1において輪郭ベクトル化処理部
1が前処理を行い、ステツプS1においてヒストグラム
作成部23文字列抽出部3および文字切り出し部4が文
字切り出し処理を行い、ステップS、において文字認識
部5が文字認識処理を行う。前記輪郭ベクトル比処理部
lが行う前処理は第3図のようなフローチャートで表さ
れる。すなわちステップS、において画像入力処理を行
い、ステップS。
G. Embodiment Hereinafter, an embodiment of the present invention will be described with reference to the drawings. First, as shown in FIG. 1, the drawing reading device according to the present invention is equipped with a contour vectorization processing section 11, a histogram creation section 2, a character string extraction section 3, a character cutting section 4, and a character recognition section 5, and the overall processing flow. is shown as in FIG. That is, first, in step S1, the contour vectorization processing unit 1 performs preprocessing, in step S1, the histogram creation unit 23, character string extraction unit 3, and character extraction unit 4 perform character extraction processing, and in step S, the character recognition unit 5 performs preprocessing. Performs character recognition processing. The preprocessing performed by the contour vector ratio processing section 1 is represented by a flowchart as shown in FIG. That is, in step S, image input processing is performed;

において輪郭ベクトル化処理を行い、ステップS。Contour vectorization processing is performed in step S.

において要素分離処理を行う。このうち前記画像入力処
理および輪郭ベクトル化処理は例えば特頼昭61−78
684の特許明細書に記載された輪郭検出装置によって
、次のようにして行う。
Element separation processing is performed at . Among these, the image input processing and contour vectorization processing are performed, for example, in
The contour detection device described in the '684 patent specification is used as follows.

第4図は輪郭検出装置の構成を示す図であり、11は輪
郭抽出部である。この輪郭抽出部11は、第5図に示す
ように書類や図面等の被写体をラスタスキャンして得ら
れた黒白に対応する2値化画素データを取り込んで、縦
横2i!ii素×2画素の画素データをスキャンライン
に沿って順次に取り出し、この画素データに基づいて輪
郭検出用のコマンド列を作成して後段の輪郭解析部I2
に出力jる。輪郭解析部+2i上前記コマンド列に基づ
いてテーブル格納部13内の輪郭要素テーブル、輪郭管
理テーブル及び輪郭接続テーブルの記載を更新する。ま
た、輪郭解析部12(よ輪郭要素テーブルと輪郭管理テ
ーブルを使用して1輪郭画素系列を構成する各点のうち
始点からみて極大となる点を抽出する(巨視的処理部3
1)とともに、この処理で抽出された連続する2点の間
にある最大距離と収る点を設定したしきい値との関係か
らいくつか抽出しく微視的処理部32)、この処理によ
り抽出された点の輪郭ベクトルを輪郭ベクトル系列テー
ブル33に記載し、この輪郭ベクトルのうち短い(ショ
ート)ベクトルをショートベクトル除央部34で除夫し
、その記載を更新する。
FIG. 4 is a diagram showing the configuration of the contour detection device, and 11 is a contour extraction section. As shown in FIG. 5, this contour extraction unit 11 imports binary pixel data corresponding to black and white obtained by raster scanning a subject such as a document or drawing, and extracts 2i horizontally and vertically! Pixel data of ii pixels x 2 pixels is sequentially extracted along the scan line, a command string for contour detection is created based on this pixel data, and the subsequent contour analysis section I2
Output to. The contour analysis section +2i updates the descriptions of the contour element table, contour management table, and contour connection table in the table storage section 13 based on the above command sequence. Additionally, the contour analysis unit 12 (macroscopic processing unit 3
In addition to 1), the microscopic processing unit 32) extracts several points based on the relationship between the maximum distance between two consecutive points extracted in this process and the threshold value that sets the points that fit together. The contour vector of the point thus determined is written in the contour vector series table 33, and the short vector among these contour vectors is removed by the short vector decentering section 34, and the description thereof is updated.

ここで輪郭要素とは互いに隣接した2個の黒画素を結ぶ
ベクトルに相当するものであり、これを結合することに
よって輪郭が構成される。そして輪郭要素テーブルとは
、第6図に示すように輪郭要素とこれら輪郭要素群より
なる輪郭とに対して各々固有の符号を付すと共に、輪郭
要素毎に、その座標及び方向と輪郭要素が所属する輪郭
の符号と輪郭要素の前後に夫々接続されている他の輪郭
要素の符号とを記載するためのものである。また輪郭管
理テーブルとは第7図に示すように輪郭毎に先端及び終
端に位置する輪郭要素の符号を記載するためのものであ
り、輪郭接続テーブルとは、第8図に示すようにラスタ
スキャン方向に並ぶ座標とその座標に前端または後端が
存在する未接続の輪郭要素の符号とその輪郭要素の未接
続端の前後端の区別とを対応させて記載するためのもの
である。また、輪郭ベクトル系列テーブルとは第9図に
示すように輪郭ベクトル系列毎に始点座標の符号を記載
するためのものである。
Here, the contour element corresponds to a vector connecting two adjacent black pixels, and the contour is constructed by connecting these. As shown in FIG. 6, the contour element table is a table in which a unique code is attached to each contour element and a contour made up of a group of these contour elements, and for each contour element, its coordinates and direction, and the contour element to which it belongs are assigned. This is to describe the code of the contour element and the code of other contour elements connected before and after the contour element, respectively. The contour management table is for recording the codes of the contour elements located at the tip and end of each contour as shown in FIG. This is to describe the coordinates arranged in the direction, the code of an unconnected contour element whose front end or rear end exists at the coordinate, and the distinction between the front and rear ends of the unconnected end of the contour element in correspondence with each other. The contour vector series table is used to record the code of the starting point coordinates for each contour vector series, as shown in FIG.

輪郭抽出部11より出力されるコマンド列は、そのとき
に取り出された2画素×2画素の画素データに係る画素
と輪郭画素との接続関係の情報、及び当該画素データの
黒白の配列パターンの情報を含む接続・パターンコード
と、当該画素データのX座標を示す座標コードとを組み
合わせてなる。
The command string output from the contour extraction unit 11 includes information on the connection relationship between pixels and contour pixels related to the 2 pixel x 2 pixel pixel data extracted at that time, and information on the black and white arrangement pattern of the pixel data. This is a combination of a connection/pattern code including the above pixel data and a coordinate code indicating the X coordinate of the pixel data.

前記接続関係の一列を第1O図に示すと、同図(イ)の
大枠で囲まれた2画素×2画素の画素データを取り込ん
だときには、この画素データのX座標Xnに位置する輪
郭要素の前端が接続されているという情報になる。この
例では、画素データの座標としては、紙面に向かって右
下に位置する匝素Pの座標をとっている。また同図(ロ
)の大枠で囲まれた画素データを取り込んだときには、
この画素データのX座標より一つ前の座標X n−+に
位置する輪郭要素の後端が接続されているという情報に
なる。なお第1O図中○印を有する枠は黒画素を示し、
○印を有しない枠は白画素を示している。
One row of the above connection relationships is shown in Figure 1O. When the pixel data of 2 pixels x 2 pixels surrounded by the large frame in Figure 1(A) is imported, the outline element located at the X coordinate Xn of this pixel data is This information indicates that the front end is connected. In this example, the coordinates of the pixel data are the coordinates of the pixel P located at the lower right when facing the page. Also, when you import the pixel data surrounded by the large frame in the same figure (b),
This is information that the rear end of the contour element located at the coordinate Xn-+ one position before the X coordinate of this pixel data is connected. In addition, the frame with a circle mark in Figure 1O indicates a black pixel,
A frame without a circle mark indicates a white pixel.

そして例えば第10図(イ)の大枠に着目すると、この
場合の接続・パターンコードは、上述の接続情報と太枠
内の黒白の配列パターンの情報とを含み、コマンド列は
、この接続・パターンコードと画素P、のX座標を示す
座標コードとの組み合わせとムる。ムおこの座標コード
については輪郭解析部12側にて、コマンド列の取り込
みのタイミングに同期して発生させることもできる。
For example, if we focus on the broad frame in Figure 10 (a), the connection/pattern code in this case includes the above-mentioned connection information and the information on the black and white array pattern inside the thick frame, and the command string is based on this connection/pattern code. It is a combination of the code and the coordinate code indicating the X coordinate of the pixel P. The coordinate code of the mouse can also be generated on the contour analysis section 12 side in synchronization with the timing of fetching the command sequence.

このようにして得たコマンド列が輪郭解析?B12に取
り込まれると次のような処理が行われる。
Is the command sequence obtained in this way contour analysis? When imported into B12, the following processing is performed.

奇策11図の大枠の画素データに関するコマンド列が取
り込まれたとすると、点線で示す輪郭要素Cjを輪郭要
素テーブルに登録し、その方向及び座標を記入すると共
に、当該輪郭要素Cjの前後に夫々接続されている他の
輪郭要素の番号を接続要素番号欄に記入する。この場合
輪郭要素Cjは輪郭要素C1の前方に位置するので、輪
郭要素Cjの欄に係る後方接続欄にCiを記入し、輪郭
要素Cjの欄に係る前方接続棚にCiを記入する。更に
輪郭要素Cjの所属する輪郭の番号をこの例で巳よSi
を輪郭番ぢ欄に記入する。輪郭要素の方向については例
えば8連結の場合、第12図に示すように上下、左右、
斜めの方向に対応してa1〜a、が規定され、また4連
結の場合、上下、左右の4方向が規定される。そして輪
郭管理テーブルの輪郭番号Siについて、先端の輪郭要
素番号欄をCiからCjに更新すると共に、輪郭接続テ
ーブルにおける当該画素データのX座標について、未接
続の輪郭要素番号の前方接続の欄をCiからCjに更新
する。ところで実際の処理においては、輪郭要素Ciに
接続されるべき輪郭要素は輪郭接続テーブルにより明ら
かにされているため、輪郭要素テーブルの輪郭要素番号
c3−に係る前方接続棚のCjの記載は、輪郭接続テー
ブルを参照して行われる。以上において所属輪郭番号は
、ラスタスキャンの進行に伴って別々に発生した二つの
輪郭が接続されて一つの輪郭になった場合には一方が他
方に統合されて同一になる。
Assuming that a command string related to the pixel data of the large frame in Figure 11 has been imported, the contour element Cj shown by the dotted line is registered in the contour element table, its direction and coordinates are entered, and the lines connected before and after the contour element Cj are respectively entered. Enter the number of the other contour element in the connected element number column. In this case, the contour element Cj is located in front of the contour element C1, so Ci is written in the rear connection column related to the column of the contour element Cj, and Ci is written in the front connection shelf related to the column of the contour element Cj. Furthermore, in this example, the number of the contour to which the contour element Cj belongs is
Enter in the contour number field. For example, in the case of 8-connected contour elements, the directions of the contour elements are up and down, left and right, as shown in Figure 12.
a1 to a are defined corresponding to the diagonal directions, and in the case of four connections, four directions, up, down, left and right, are defined. Then, regarding the contour number Si in the contour management table, the tip contour element number column is updated from Ci to Cj, and regarding the X coordinate of the pixel data in the contour connection table, the forward connection column of the unconnected contour element number is updated to Ci. Update from Cj to Cj. By the way, in actual processing, the contour element to be connected to the contour element Ci is clarified by the contour connection table, so the description of Cj of the front connection shelf related to contour element number c3- in the contour element table is This is done by referring to the connection table. In the above, when two contours generated separately as the raster scan progresses are connected to form one contour, one contour is integrated with the other and the associated contour numbers become the same.

上記のような処理において、1輪郭画素系列を構成する
各点のうち始点からみて極大となる点を抽出し、次に抽
出された連続する2点の間にある最大距離となる点を抽
出する。このように抽出された輪郭ベクトルをテーブル
に格納する。
In the above process, the point that is the maximum from the starting point is extracted from each point that makes up one contour pixel series, and then the point that is the maximum distance between the two consecutive extracted points is extracted. . The contour vectors extracted in this way are stored in a table.

上記のような画像人力処理および輪郭ベクトル化処理に
よって、被写体の例えばrAJという文字の入力画像は
第13図のような輪郭ベクトルで表される。
Through the above-described manual image processing and contour vectorization processing, an input image of the character rAJ of the subject, for example, is represented by a contour vector as shown in FIG.

次に文字候補の抽出を行う要素分離処理(第3図のステ
ツプS4)について説明する。まず前述した第9図の輪
郭ベクトル系列テーブルを使用してショートベクトルを
除去する。第14図はショートベクトル除去手段を説明
するフローチャートであり、ステツプS4で第9図に示
す輪郭ベクトル系列テーブルから輪郭ベクトルの外接四
角形(第15図に示す) (X +mln、 y+mt
n)、(X va a x +y−−x)の算出を行う
。次にステップS、でdX=X+++an  X+sl
n+ dV=Vu+ax  5’sinとしきい値D 
X th、 D Y thとを比較する。ステップS3
はステップS、の比較判断部で、このステップS、で(
dx>DXth)U (dy>DYth)を判断し、Y
ESならステップS4で輪郭ベクトルとして外接四角形
という情報を作成する。この情報の1例を第16図に外
接四角形情報テーブルとして示す。
Next, the element separation process (step S4 in FIG. 3) for extracting character candidates will be explained. First, short vectors are removed using the contour vector series table shown in FIG. 9 mentioned above. FIG. 14 is a flowchart illustrating the short vector removal means. In step S4, the circumscribed rectangle of the contour vector (shown in FIG. 15) (X + mln, y + mt) is extracted from the contour vector series table shown in FIG. 9.
n), (X va a x +y--x) is calculated. Next, in step S, dX=X+++an X+sl
n+ dV=Vu+ax 5'sin and threshold D
Compare X th and D Y th. Step S3
is the comparison judgment part of step S, and in this step S, (
dx>DXth)U (dy>DYth) and Y
If it is ES, information on a circumscribed rectangle is created as a contour vector in step S4. An example of this information is shown in FIG. 16 as a circumscribed rectangle information table.

前記ステップS、でNoなら第9図に示す輪郭ベクトル
系列テーブルからステップS5で同一系列のベクトルを
削除して雑音(ノイズ)を除去する。
If No in step S, then in step S5 vectors of the same series are deleted from the contour vector series table shown in FIG. 9 to remove noise.

第15図は輪郭ベクトルの外接四角形を示す説明図であ
り、この図において、XmallXIllム0y□x、
ymlnは次のようになる。
FIG. 15 is an explanatory diagram showing a circumscribed rectangle of a contour vector, and in this figure, XmallXIllm0y□x,
ymln looks like this:

Xo+ax=Tn a X (”’+  X ++ ”
’)X n1n= rn l n (”’ + X 1
+・・・)3/ max−rn a X (・・・、部
8.・・・)y□□−m I n (・・コ yt+ 
 ・・・)d  X  −X、wax    X  m
s。
Xo+ax=Tn a X (”'+ X ++ ”
')X n1n= rn l n (''' + X 1
+...)3/ max-rn a
...) d X −X, wax X m
s.

dy=y+++□−5’aln (dx<DXth)n (dy<+)yth)但し、D
 X th、 D Y Ih : Lきい値である。
dy=y+++□-5'aln (dx<DXth)n (dy<+)yth) However, D
X th, D Y Ih: L threshold.

上記のようにして求められた外接四角形情報(第13図
)に基づいて次のような条件で文字候補を抽出する。
Based on the circumscribed rectangle information (FIG. 13) obtained as described above, character candidates are extracted under the following conditions.

条件■ 部3<シきい値且つwyくしきい値(wxは外
接四角形のX方向長さ、Wyは外接四角形のX方向長さ
) 条件■ 外周輪郭ベクトル そして文字候補の外接四角形に完全包含される外周及び
内周の輪郭ベクトルは文字候補となった輪郭ベクトルに
リンク付けされる。
Condition ■ Part 3 < threshold and wy threshold (wx is the length of the circumscribed rectangle in the X direction, Wy is the length of the circumscribed rectangle in the X direction) Condition ■ Completely included in the outer contour vector and the circumscribed rectangle of the character candidate The outer and inner contour vectors are linked to contour vectors that are character candidates.

以上、第3図〜第16図のようにして前処理を行うが、
次に文字切り出し処理(第2図のステップS、)につい
て説明する。
As mentioned above, preprocessing is performed as shown in FIGS. 3 to 16, but
Next, the character extraction process (step S in FIG. 2) will be explained.

まずこの文字切り出し処理は、前記輪郭ベクトル処理部
1で求められた文字候補を対象に第17図のように水平
方向(ステップS、)、垂直方向(ステップS、)およ
び斜め方向(ステップS3)に行われる。各方向の処理
は各々同一の内容であり、第18図に示すように文字列
候補抽出処理(ステップS、)を行った後、文字列抽出
処理(ステップS、)を行った後、文字切り出し処理(
ステップS3)を行う。前記各ステップの処理は次のよ
うに行われる。すなわちヒストグラム作成部2は、ハフ
(Hough)変換を応用して文字候補の外接四角形(
第13図)を対象にR(各方向)に関する1次元ヒスト
グラムをとる。このとき文字候補の全弧立文字に対する
ヒストグラムの状況は第19図のように示される。第1
9図はY方向に関する(R=Y)ヒストグラムであり、
図示heは文字列候補の高さを示している。またX方向
に関するヒストグラムをとった場合、heは文字列候補
の幅を示すことになる。そして文字列抽出部3は前記ヒ
ストグラムの山が所定のしきい値以上であるものを文字
列候補として抽出する。尚、これら処理のフローチャー
トは第20図で示される。
First, this character cutting process is performed on the character candidates obtained by the contour vector processing section 1 in the horizontal direction (step S, ), vertical direction (step S, ), and diagonal direction (step S3) as shown in FIG. It will be held in The processing in each direction is the same, and as shown in Fig. 18, after performing character string candidate extraction processing (step S,), character string extraction processing (step S,), character extraction process(
Step S3) is performed. The processing of each step is performed as follows. That is, the histogram creation unit 2 applies Hough transformation to create a circumscribed rectangle (
A one-dimensional histogram regarding R (in each direction) is taken for (Fig. 13). At this time, the state of the histogram for all the stand-up characters of the character candidates is shown as shown in FIG. 1st
Figure 9 is a (R=Y) histogram in the Y direction,
He in the figure indicates the height of the character string candidate. Furthermore, when a histogram in the X direction is taken, he indicates the width of the character string candidate. Then, the character string extracting unit 3 extracts characters whose peaks in the histogram are equal to or higher than a predetermined threshold value as character string candidates. Incidentally, a flowchart of these processes is shown in FIG.

さらに文字列抽出部3は文字列候補の中から次の条件に
合うものを文字列として抽出する。すなわち第21図に
示すように文字列候補の高さheと文字候補単位Mdか d (i、j)<hcX定敢  ・・・・・・(1)な
る関係にあるとき、図示文字列候補内のi、jが文字列
となる。次に文字切り出し部4は前記抽出された文字列
から文字候補単位で文字の切り出しを行う。このとき次
の第(2)式に示す条件に合致する場合には第22図の
ステツプS3のように高さ方向分離文字統合を行い、第
(3)式、第(4)式に示す条件に合致する場合には第
22図のステップS、のように幅方向分離文字統合を行
う。例えば第23図のように高さ方向に文字松浦i、j
が分離しているときに下記第(2)式の条件が成立すれ
ば、該文字候補i、jは図示の如く統合される。
Furthermore, the character string extraction unit 3 extracts a character string that meets the following conditions from among the character string candidates. In other words, as shown in FIG. 21, when the height he of the character string candidate and the character candidate unit Md (i, j) < hc i and j are character strings. Next, the character cutting section 4 cuts out characters from the extracted character string in units of character candidates. At this time, if the conditions shown in the following equation (2) are met, the separated characters in the height direction are integrated as in step S3 in FIG. 22, and the conditions shown in equations (3) and (4) are If it matches, width direction separated character integration is performed as in step S of FIG. For example, as shown in Figure 23, the characters Matsuura i, j are printed in the height direction.
If the following condition (2) is satisfied when the character candidates i and j are separated, the character candidates i and j are integrated as shown.

l1ax (x +wtn(i)、 x −+n(j)
≦(X c、n(+) Or X cen(j)≦ma
n (x +max(1)、 x 5ax(j)   
+++ +++ (2)(Xm1n:外接四角形のX方
向最小座標Xwma*:外接四角形のX方向最大座標X
c*n:外接四角形のX方向中心座標)また例えば第2
4図のように幅方向に文字候補j。
l1ax (x + wtn(i), x −+n(j)
≦(X c, n(+) Or X cen(j)≦ma
n (x + max (1), x 5ax (j)
+++ +++ (2) (Xm1n: Minimum coordinate in the X direction of the circumscribed rectangle Xwma*: Maximum coordinate in the X direction of the circumscribed rectangle
c*n: X-direction center coordinate of circumscribed rectangle) Also, for example, the second
4 Character candidates j in the width direction as shown in Figure 4.

kが分離しているときに下記第(3)式、m(4)式の
条件が成立すれば、該文字候補j、には図示の如く統合
される。
If the conditions of equations (3) and m(4) below are satisfied when k is separated, the character candidates j are integrated as shown in the figure.

d(j、k)<(文字列内平均)×定数・・・・・・(
3)且つw(j)4w(k)+d(j、k)≦h×定数
・・・・・(4) (d:文字候補間距離 W:文字候補幅 h:文字列高さ) 上述した文字切り出し処理(第17図、第18図)の過
程では、文字候補が文字列として確定する毎に処理済マ
ークがつき処理対象数が少なくなる。また第18図の各
処理では水平方向について説明したが、垂直方向につい
てはx、y方向が逆になる。斜め方向については所定の
傾き角度を仮定し、その角度での座標変換処理が、文字
列抽出処理、文字切り出し処理(第18図のステップS
d(j,k)<(average within string)×constant・・・(
3) And w(j)4w(k)+d(j,k)≦h×constant...(4) (d: Distance between character candidates W: Character candidate width h: Character string height) As mentioned above In the process of character extraction processing (FIGS. 17 and 18), each time a character candidate is determined as a character string, a processed mark is attached and the number of objects to be processed decreases. Further, each process in FIG. 18 has been described in the horizontal direction, but in the vertical direction, the x and y directions are reversed. For the diagonal direction, a predetermined inclination angle is assumed, and the coordinate conversion processing at that angle is the character string extraction processing and character cutting processing (step S in Fig. 18).
.

部3)に含まれる。Included in Part 3).

文字認識処理(第2図のステップS、)は次のようにし
て行われる。文字認識部5は前記文字切り出し部4で切
り出された文字と、予め文字が登録された辞書と参照、
比較し、−文字ずつ認識する。
The character recognition process (step S in FIG. 2) is performed as follows. The character recognition unit 5 references the characters extracted by the character extraction unit 4 and a dictionary in which characters are registered in advance,
Compare and recognize -characters one by one.

H1発明の効果 以上のように本発明によれば輪郭ベクトル化処理部と、
ヒストグラム作成部と、文字列抽出部と、文字切り出し
部とを設けたので、文字、線分、シンボルが混在する書
類や図面から文字を読み取って認識する場合、大きさや
書式に限定条件を付けることむくいかなる大きさ、書式
の文字であっても容易に且つ正確に読み取ることができ
る。
H1 Effects of the Invention As described above, according to the present invention, the contour vectorization processing section,
Since we have provided a histogram creation section, a character string extraction section, and a character extraction section, when reading and recognizing characters from documents or drawings that contain a mixture of characters, line segments, and symbols, it is possible to set limitations on size and format. Characters of any size or format can be read easily and accurately.

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

第1図〜第24図は本発明の一実施例を示し、第1図は
全体構成のブロック図、第2図は全体のフローチャート
、第3図は輪郭ベクトル化処理部のフローチャート、第
4図は輪郭検出装置のブロック図、第5図はラスタスキ
ャンの様子を示す説明図、第6図は輪郭要素テーブルを
示す説明図、第7図は輪郭管理テーブルを示す説明図、
第8図は輪郭接続テーブルを示す説明図、第9図は輪郭
ベクトル系列テーブルを示す説明図、第1O図(イ)、
(ロ)は、各々匝素データと輪郭要素との関係を示す説
明図、第11図は輪郭要素間の接続状態を示す説明図、
第12図は輪郭要素の方向を示す説明図、第13図は輪
郭ベクトル化処理の説明図、第14図はシゴートベクト
ル除去手段のフローチャート、第15図は外接四角形の
説明図、第16図は外接四角形情報テーブルを示す説明
図、第17図および第18図はともに文字切り出し処理
のフローチャート、第19図はヒストグラム作成部の説
明図、第20図は文字列候補抽出処理のフローチャート
、第21図は文字列抽出処理の説明図、第22図は文字
切り出し処理のフローチャート、第23図は高さ方向分
離文字統合処理の説明図、第24図は幅方向分離文字統
合処理の説明図である。 l・・・輪郭ベクトル化処理部、2・・・ヒストグラム
作成部、3・・・文字1列抽出部、4・・・文字切り出
し部、5・・・文字認識部、11・・・輪郭抽出部、1
2・・・輪郭解析部、13・・・テーブル格納部、31
・・・巨視的処理部、32・・・微視的処理部、33・
・・輪郭ベクトル系列テーブル、34・・・ショートベ
クトル除去部。 外2名 第1図 実施例のブロック図 第2図 全体のフローチャート 第3図 輪郭ベクトル亀処理部(前処理〉のフローチャート第5
図 ラスタスキャンの説明図 第7図 輪郭管理テーブルの説明図 第8図 輪郭接続テーブル 第9図 輪郭ベクトル系列テーブル 第10図 画素データと輪郭I!!素との閾保図 (イ) Xn−+  Xn (ロ) Xn−1Xn 輪郭ベクトル化処理の説明図 2W7ヤ 第14図 シテートベクトル除去手段のフローチャート第15図 第17図 文字切り出し処理のフローチャート 文字切り出し処理のフローチャート 第2〕図 文字列抽出処理の説明図 第・22図 文字切り出し処理のフローチャート 第23図 高さ方向分離文字統合処理の説明図 統合処理 第24図 幅方向分数字統合処理の説明図 統合処理
1 to 24 show an embodiment of the present invention, in which FIG. 1 is a block diagram of the overall configuration, FIG. 2 is an overall flowchart, FIG. 3 is a flowchart of the contour vectorization processing section, and FIG. 4 is a block diagram of a contour detection device, FIG. 5 is an explanatory diagram showing the state of raster scanning, FIG. 6 is an explanatory diagram showing a contour element table, FIG. 7 is an explanatory diagram showing a contour management table,
Fig. 8 is an explanatory diagram showing the contour connection table, Fig. 9 is an explanatory diagram showing the contour vector series table, Fig. 1O (a),
(B) is an explanatory diagram showing the relationship between the square element data and the contour elements, and FIG. 11 is an explanatory diagram showing the connection state between the contour elements.
FIG. 12 is an explanatory diagram showing the direction of contour elements, FIG. 13 is an explanatory diagram of the contour vectorization process, FIG. 14 is a flowchart of the contour vector removal means, FIG. 15 is an explanatory diagram of the circumscribed rectangle, and FIG. 16 is an explanatory diagram of the contour vectorization process. is an explanatory diagram showing a circumscribed rectangle information table, FIGS. 17 and 18 are both flowcharts of character extraction processing, FIG. 19 is an explanatory diagram of the histogram creation section, FIG. 20 is a flowchart of character string candidate extraction processing, and FIG. Figure 22 is an explanatory diagram of character string extraction processing, Figure 22 is a flowchart of character extraction processing, Figure 23 is an explanatory diagram of height direction separated character integration processing, and Figure 24 is an explanatory diagram of width direction separated character integration processing. . l...Contour vectorization processing unit, 2...Histogram creation unit, 3...Character single string extraction unit, 4...Character cutting unit, 5...Character recognition unit, 11...Contour extraction Part 1
2... Contour analysis section, 13... Table storage section, 31
... Macroscopic processing section, 32... Microscopic processing section, 33.
. . . Contour vector series table, 34 . . . Short vector removal unit. Figure 1 Block diagram of the embodiment Figure 2 Flowchart of the entire system Figure 3 Flowchart of the contour vector turtle processing section (pre-processing) Figure 5
Figure 7: Illustration of raster scan Figure 7: Illustration of contour management table Figure 8: Contour connection table Figure 9: Contour vector series table Figure 10: Pixel data and contour I! ! Figure 14 Flowchart of sit vector removal means Figure 15 Figure 17 Flowchart of character extraction processing Character Figure 22: Flowchart of character extraction processing Figure 23: Explanation of height separation character integration processing Figure 24: Explanation of widthwise fractional numeric integration processing Figure integration process

Claims (1)

【特許請求の範囲】[Claims] (1)文字、線分、シンボルが混在する被写体をラスタ
スキャンして得られた黒白に対応する2値化画素データ
から文字データを抽出し、該抽出された文字データと文
字辞書を参照、比較して文字を認識する図面読取装置に
おいて、 前記被写体をラスタスキャンして得られた黒白に対応す
る2値化画素データに基づいて、互いに隣接した2個の
黒画素を結ぶベクトルを結合して成る輪郭ベクトルのデ
ータを求めるとともに、該輪郭ベクトルに外接する外接
四角形データを文字候補として求める輪郭ベクトル化処
理部と、前記輪郭ベクトル化処理部で求められた文字候
補の外接四角形を対象に、水平、垂直、斜めの各方向に
関する1次元ヒストグラムを求めるヒストグラム作成部
と、 前記ヒストグラム作成部で求められたデータのうち所定
のしきい値以上のデータを文字列候補として抽出すると
ともに、該抽出データの中から、文字列候補の高さhと
文字列候補内の互いに隣接する文字候補間の距離dがd
<h×α(αは定数)なる関係にあるデータを文字列と
して抽出する文字列抽出部と、 前記文字列抽出部で抽出された文字列内の近接する複数
の文字候補を統合する機能を有し、文字列から文字を切
り出す文字切り出し部とを備え、前記文字切り出し部で
切り出された文字データに基づいて文字認識を行うこと
を特徴とする図面読取装置。
(1) Extract character data from binary pixel data corresponding to black and white obtained by raster scanning an object containing a mixture of characters, line segments, and symbols, and refer to and compare the extracted character data with a character dictionary. In a drawing reading device that recognizes characters by scanning, a vector connecting two adjacent black pixels is combined based on binary pixel data corresponding to black and white obtained by raster scanning the subject. A contour vectorization processing unit that obtains contour vector data and obtains circumscribed rectangular data circumscribing the contour vector as a character candidate, and a horizontal, a histogram creation unit that calculates one-dimensional histograms in each of the vertical and diagonal directions; and a histogram creation unit that extracts as character string candidates data that is equal to or higher than a predetermined threshold value from among the data found in the histogram creation unit; Therefore, the height h of a character string candidate and the distance d between adjacent character candidates in the character string candidate are d
A character string extraction unit that extracts data with the relationship <h×α (α is a constant) as a character string, and a function that integrates multiple adjacent character candidates in the character string extracted by the character string extraction unit. What is claimed is: 1. A drawing reading device comprising: a character cutting section for cutting out characters from a character string; and character recognition is performed based on character data cut out by the character cutting section.
JP1169179A 1989-06-30 1989-06-30 Drawing reader Pending JPH0334081A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1169179A JPH0334081A (en) 1989-06-30 1989-06-30 Drawing reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1169179A JPH0334081A (en) 1989-06-30 1989-06-30 Drawing reader

Publications (1)

Publication Number Publication Date
JPH0334081A true JPH0334081A (en) 1991-02-14

Family

ID=15881712

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1169179A Pending JPH0334081A (en) 1989-06-30 1989-06-30 Drawing reader

Country Status (1)

Country Link
JP (1) JPH0334081A (en)

Similar Documents

Publication Publication Date Title
US5774580A (en) Document image processing method and system having function of determining body text region reading order
JP2940936B2 (en) Tablespace identification method
KR970017047A (en) Apparatus and method for extracting a title from a document image
JP2926066B2 (en) Table recognition device
JP2890306B2 (en) Table space separation apparatus and table space separation method
JP2917427B2 (en) Drawing reader
JPH0334081A (en) Drawing reader
JP3276555B2 (en) Format recognition device and character reader
JPH06187489A (en) Character recognizing device
JP2797523B2 (en) Drawing follower
JPH0728935A (en) Document image processor
JP2788506B2 (en) Character recognition device
JPH03142691A (en) Table format document recognizing system
JP2789622B2 (en) Character / graphic area determination device
JP2537973B2 (en) Character recognition device
JPH03189888A (en) Kind decision device for character string in drawing reader
JP2918363B2 (en) Character classification method and character recognition device
JPH09134404A (en) Bar graph recognizing device
JPH03163683A (en) Drawing reader
JPS63157287A (en) Character pattern extracting method
JPH03268181A (en) Document reader
JPH04130979A (en) Character picture segmenting method
JPH11120291A (en) Pattern recognition system
JPH01201789A (en) Character reader
JP2509992B2 (en) Separation character integration method