JPH01129368A - Picture recognition device - Google Patents

Picture recognition device

Info

Publication number
JPH01129368A
JPH01129368A JP28750087A JP28750087A JPH01129368A JP H01129368 A JPH01129368 A JP H01129368A JP 28750087 A JP28750087 A JP 28750087A JP 28750087 A JP28750087 A JP 28750087A JP H01129368 A JPH01129368 A JP H01129368A
Authority
JP
Japan
Prior art keywords
line segment
tracing
point
symbol
line
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
JP28750087A
Other languages
Japanese (ja)
Inventor
Shinichi Tanaka
伸一 田中
Yukio Masuda
増田 幸男
Osamu Yoshizaki
修 吉崎
Hideyuki Tamura
秀行 田村
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP28750087A priority Critical patent/JPH01129368A/en
Publication of JPH01129368A publication Critical patent/JPH01129368A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To efficiently extract a symbol by deciding a next segment to be traced based on a feature point detected during a tracing and extracting a closed loop formed by the plural segments traced until a start point is detected again as the symbol. CONSTITUTION:The feature point is detected from a picture and this detected feature point is stored. Then, the start point tracing the segment is selected from the stored feature points and the segment to be traced and a tracing direction are decided from this start point. The, based on the feature point detected during the tracing, the segment to be traced and the tracing direction are decided and the closed loop formed by the plural segments traced until the start point is detected is extracted as the symbol. Thereby, even in the picture in which the symbol is overlapped on a connecting line, for instance, only the symbol can be effectively and efficiently extracted.

Description

【発明の詳細な説明】 [産業上の利用分野コ 本発明は画像認識装置に関し、特にブロック図、回路図
等の画像よりシンボルと接続線とを区別して認識する画
像認識装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an image recognition device, and more particularly to an image recognition device that distinguishes and recognizes symbols and connection lines from images such as block diagrams and circuit diagrams.

[従来の技術] 従来、ブロック図或いは回路図等の図面より画像を読み
取ってその図面を認識する画像認識装置は例えば次のよ
うな認識方法を採用している。
[Prior Art] Conventionally, an image recognition device that reads an image from a drawing such as a block diagram or a circuit diagram and recognizes the drawing employs, for example, the following recognition method.

まず、図面に読み取られたシンボル及び各シンボルを結
ぶ接続線は細分化した線画像としてそれぞれ記憶される
。そしてこの記憶した線画像に基づいて線分の追跡を行
ない、閉ループを抽出するとこの部分をシンボルと判定
している。
First, the symbols read on the drawing and the connecting lines connecting the symbols are each stored as segmented line images. Line segments are then traced based on this stored line image, and when a closed loop is extracted, this portion is determined to be a symbol.

また、線分の追跡途中において、分岐点或いは交差点等
の特徴点に到達した場合には、各ンの特徴点を中心とし
た時計回り或いは反時計回りの線画像の検索によって次
線分を検出している。
In addition, when a feature point such as a branch point or an intersection is reached while tracing a line segment, the next line segment is detected by searching the line image clockwise or counterclockwise around each feature point. are doing.

[発明が解決しようとする問題点] ところが、接続線とシンボルとが重なっている場合には
、シンボルの一部の線分を追跡している段階で閉ループ
を抽出してしまい、この閉ループをシンボルとして判定
している。
[Problem to be solved by the invention] However, when a connecting line and a symbol overlap, a closed loop is extracted while tracing some line segments of the symbol, and this closed loop is It is judged as.

従って、上述のシンボルの判定方法では確実にシンボル
を抽出することができないことが往々にして発生する。
Therefore, it often happens that symbols cannot be reliably extracted using the above-described symbol determination method.

この接続線とシンボルとが重なっている図面よりシンボ
ルを抽出する従来のシンボル抽出方法の一例を第6図、
第7図に基づいて説明する。
An example of the conventional symbol extraction method for extracting symbols from drawings in which these connecting lines and symbols overlap is shown in Figure 6.
This will be explained based on FIG.

第6図は結合子50から結合子51への線分の追跡を示
しており、この場合の線分の追跡は分岐点AよりT丁→
丁で−て■→丁Tの順に行なわれる。
FIG. 6 shows the tracing of the line segment from the connector 50 to the connector 51. In this case, the tracing of the line segment is from the branch point A to the T block →
The process is performed in the order of ding-te ■ → ding-T.

また、第7図は結合子52から結合子53への線分の追
跡を示しており、この場合の線分の追跡は分岐点Eより
EF−F丁→丁「→「丁−丁丁一丁に−hKL−LEの
順に行なわれる。
Furthermore, FIG. 7 shows the tracing of the line segment from the connector 52 to the connector 53, and in this case, the tracing of the line segment is from the branch point E to EF-F cho → cho "→" cho-cho cho 1-cho. - hKL - LE is performed in this order.

このように、第6図と第7図はそれぞれシンボルの一部
の線分を追跡している途中で閉ループを抽出してしまう
ため、本来、第6図のシンボルA’ B’ CD、第7
図のシンボルE’ J’ KLを正確に抽出することが
困難となっている。
In this way, in FIGS. 6 and 7, closed loops are extracted while tracing some line segments of the symbols, so originally symbols A'B' CD and 7 in FIG.
It is difficult to accurately extract the symbols E'J' KL in the figure.

このように、シンボルと接続線とを確実に区別してシン
ボルのみを抽出することができず、図面を誤って認識す
る不具合を発生しやすいなどの問題点がある。
As described above, it is not possible to reliably distinguish between symbols and connection lines and extract only the symbols, leading to problems such as the possibility of erroneously recognizing drawings.

本発明は上述の問題点に鑑みてなされたものであり、そ
の目的とするところは、例えシンボルと接続線が瓜なっ
ている画像であってもシンボルのみを確実に且つ効率良
く抽出できる画像認識装置を提供する点にある。
The present invention has been made in view of the above-mentioned problems, and its purpose is to provide image recognition that can reliably and efficiently extract only symbols, even if the symbols and connecting lines are similar to each other. The point is to provide equipment.

[問題点を解決するための手段] 上述した問題点を解決し、目的を達成するため、本発明
に係わる画像認識装置は規則性のある形状をしたシンボ
ルと該シンボルを接続する接続線とが複数の線分により
構成される画像を認識する画像認識装置において、前記
画像より特徴点を検出する検出手段と、該検出手段の検
出した特徴点を記憶する記憶手段と、該記憶手段の記憶
する特徴点の中から線分を追跡する始点を選出する選出
手段と、該選出手段の選出した始点より追跡すべき線分
と該線分の追跡方向とを決定する第1の決定手段と、該
第1の決定手段の決定した追跡方向に線分を追跡する追
跡手段と、該追跡手段の追跡中に特徴点を検出し、該特
徴点に基づいて次に追跡すべき線分と該線分の追跡方向
とを決定する第2の決定手段と、該第2の決定手段が前
記始点を検出するまで追跡した複数の線分によって形成
される閉ループをシンボルとして抽出するシンボル抽出
手段とを備えた。
[Means for Solving the Problems] In order to solve the above-mentioned problems and achieve the purpose, an image recognition device according to the present invention has symbols having regular shapes and connection lines connecting the symbols. An image recognition device that recognizes an image composed of a plurality of line segments, comprising a detection means for detecting feature points from the image, a storage means for storing the feature points detected by the detection means, and a storage means for storing the feature points detected by the detection means. a selection means for selecting a starting point for tracing a line segment from among feature points; a first determining means for determining a line segment to be traced and a tracing direction of the line segment from the starting point selected by the selection means; a tracing means for tracing a line segment in the tracing direction determined by the first determining means; a line segment for detecting a feature point during the tracing by the tracing means; and a line segment to be traced next based on the feature point; and a symbol extracting means for extracting, as a symbol, a closed loop formed by a plurality of line segments traced until the second determining means detects the starting point. .

[作用] 以上の構成によれば、始点より線分を追跡し、追跡中に
検出した特徴点に基づいて次の追跡すべき線分を決定す
る。そして再び始点を検出するまで追跡した複数の線分
により形成される閉ループをシンボルとして抽出する。
[Operation] According to the above configuration, a line segment is traced from the starting point, and the next line segment to be traced is determined based on the feature points detected during the tracing. Then, a closed loop formed by a plurality of line segments traced until the starting point is detected again is extracted as a symbol.

このように、効率的なシンボルの抽出が可能となる。In this way, efficient symbol extraction becomes possible.

[実施例] 以下添付図面を参照して本発明に係る好適な実施例を詳
細に説明する。
[Embodiments] Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

第1図は本発明に係わる画像認識装置の構成を示すブロ
ック構成図である。
FIG. 1 is a block diagram showing the configuration of an image recognition device according to the present invention.

1は装置全体を制御するCPUである。2は制御プログ
ラム、エラー処理用のプログラム、第4図のフローチャ
ートに従った処理を行なうプログラム等を格納したRO
M、3は各種プログラム実行時のワーキングエリア及び
エラー処理時の一時退避エリアとして機能するRAMで
ある。4はブロック図、回路図等が記録されている図面
を走査して画像を入力する画像入力部である。
1 is a CPU that controls the entire device. 2 is an RO that stores a control program, an error processing program, a program for processing according to the flowchart in FIG. 4, etc.
Reference numeral M3 denotes a RAM that functions as a working area when various programs are executed and a temporary save area during error processing. Reference numeral 4 denotes an image input unit that scans a drawing in which block diagrams, circuit diagrams, etc. are recorded and inputs an image.

5は画像入力部4より入力したビデオ信号を2値化及び
細線化して線画像を求め、各線画像の分岐点を統合する
統合処理、及び3X3ドツトのマスク用マトリクスによ
り端点、分岐点、交差点の抽出処理等を行なう構造解析
部である。6は細線化した線画像より屈曲点を求めるた
めにその屈曲点を折れ線で近似してベクトル化する折れ
線近似部、7は折れ線近似されたベクトルに基づいて端
点、分岐点、交差点、屈曲点(すべてを総称して特徴点
という)をすべて結び目として、これら特徴点を繋ぐ線
分を線分エツジとする構造グラフを作成する構造グラフ
作成部である。8は構造グラフ作成部7で作成した構造
グラフを記憶する構造グラフ記憶部である。
5 binarizes and thins the video signal input from the image input unit 4 to obtain a line image, integrates the branch points of each line image, and uses a 3×3 dot masking matrix to identify end points, branch points, and intersections. This is a structure analysis unit that performs extraction processing, etc. 6 is a polygonal line approximation unit that approximates the crooked point with a polygonal line and converts it into a vector in order to find the crookedness point from the thinned line image; 7 is a polygonal line approximation unit that approximates the polygonal line and converts it into a vector; This is a structural graph creation unit that creates a structural graph in which all feature points (all collectively referred to as feature points) are treated as knots, and line segments connecting these feature points are line segment edges. Reference numeral 8 denotes a structure graph storage unit that stores the structure graph created by the structure graph creation unit 7.

また、9は構造グラフ記憶部8に記憶した構造グラフに
基づいてシンボルの候補を抽出するシンボル候補抽出部
、10はシンボル候補抽出部9より抽出したシンボルを
分類し、分類されたシンボル毎の種類を決定するシンボ
ル分類部、11はシンボル分類部10で分類したシンボ
ルを分類毎に記憶するシンボル記憶部である。12は構
造グラフ記憶部8に記憶した構造グラフに基づいて接続
線を抽出する接続線抽出部、13は接続線抽出部12が
抽出した接続線を記憶する接続線記憶部である。
Further, 9 is a symbol candidate extraction unit that extracts symbol candidates based on the structure graph stored in the structure graph storage unit 8, and 10 is a symbol candidate extraction unit that classifies the symbols extracted from the symbol candidate extraction unit 9, and classifies the types of each classified symbol. A symbol classification unit 11 is a symbol storage unit that stores the symbols classified by the symbol classification unit 10 for each classification. Reference numeral 12 denotes a connection line extraction section that extracts connection lines based on the structure graph stored in the structure graph storage section 8, and reference numeral 13 denotes a connection line storage section that stores the connection lines extracted by the connection line extraction section 12.

そして、14はシンボル記憶部11に記憶されるシンボ
ルと接続線記憶部13に記憶される接続線とに基づいて
接続関係を解析する接続関係解析部、15は接続関係解
析部14よりシンボルと接続線との接続関係の認識結果
を記憶する認識結果記憶部である。この接続関係にはシ
ンボルの種類、シンボルと接続線との位置関係等を含ん
でいる。また16は認識結果記憶部15に記憶した認識
結果に基づいて入力した画像を表示する表示部、17は
制御キー等を備えたキーボードである。尚、表示部16
に代ってプリンタ部を備えても良く、また表示部16と
プリンタ部を共に備えても良い。
Reference numeral 14 denotes a connection relationship analysis unit that analyzes connection relationships based on symbols stored in the symbol storage unit 11 and connection lines stored in the connection line storage unit 13; and 15, connection between symbols and connections from the connection relationship analysis unit 14. This is a recognition result storage unit that stores recognition results of connection relationships with lines. This connection relationship includes the type of symbol, the positional relationship between the symbol and the connection line, etc. Further, 16 is a display unit that displays an input image based on the recognition result stored in the recognition result storage unit 15, and 17 is a keyboard provided with control keys and the like. Furthermore, the display section 16
Instead, a printer section may be provided, or both the display section 16 and the printer section may be provided.

以上の如く構成された画像認識装置は特に第2図(a)
〜(e)のような形状をしたシンボルが接続線によって
接続された場合を対象としている。尚、第2図(a)〜
(e)に示すシンボルはブロック図或いは論理回路図等
に用いられるシンボルであり、これらのシンボルを説明
することばは省略する。
The image recognition device configured as described above is particularly shown in FIG. 2(a).
The target is a case where symbols shaped like those shown in (e) are connected by a connecting line. In addition, Fig. 2 (a) ~
The symbols shown in (e) are symbols used in block diagrams, logic circuit diagrams, etc., and words to explain these symbols will be omitted.

また、第3図は特徴点及び折れ線近似によって求めた線
分エツジにより構成される構造グラフを示している。図
において、特徴点「a」は−木の線分のみが出ている端
点、特徴点「b」は3木の線分が出ている分岐点である
。また特徴点「c」は4木の線分が出ている交差点であ
り、特徴点「d」は折れ線近似により求めた屈曲点であ
る。
Furthermore, FIG. 3 shows a structural graph composed of feature points and line segment edges obtained by polygonal line approximation. In the figure, the feature point "a" is an end point where only - tree line segments appear, and the feature point "b" is a branch point where three tree line segments appear. Further, the feature point "c" is an intersection where four tree line segments appear, and the feature point "d" is a bending point obtained by polygonal line approximation.

次に、本実施例のシンボル候補抽出部9によるシンボル
の抽出方法を第4図のフローチャートに従って以下に説
明する。尚、複数のシンボルを有する図面を読み取った
場合の説明である。
Next, a method for extracting symbols by the symbol candidate extracting section 9 of this embodiment will be explained below according to the flowchart of FIG. Note that this is an explanation when reading a drawing having a plurality of symbols.

まず、第3図に示すような構造グラフを構造グラフ記憶
部8に記憶した後、シンボル候補抽出部9ではシンボル
を抽出するため、抽出の開始点とする屈曲点を1つ選出
しくステップS1)、この屈曲点の座標を記憶する(ス
テップS2)。この屈曲点はシンボルを構成する要素で
あり、シンボル−つに対して複数の屈曲点が含まれる。
First, after storing a structural graph as shown in FIG. 3 in the structural graph storage section 8, the symbol candidate extraction section 9 selects one inflection point to be the starting point of extraction in order to extract symbols (step S1). , the coordinates of this bending point are stored (step S2). This bending point is an element constituting a symbol, and a plurality of bending points are included for one symbol.

従って屈曲点の座標をシンボル毎にグループ単位で記憶
する。この各グループを特徴点記憶グループとしてRA
M3に記憶する。
Therefore, the coordinates of the bending points are stored in groups for each symbol. RA each group as a feature point storage group.
Store in M3.

さて、屈曲点からは−回り360° として2本の線分
が異なる方向に出ているので、次にこれらの線分の方向
をそれぞれ求める(ステップS3)。そして屈曲点を中
心に2木の線分がなす角度を2つ検出し、それぞれの角
度(一方の角度だけでも良い)がほぼ180°に等しい
場合には再びステップS1へ戻り、他の屈曲点を選出し
て基づいて上述と同様の処理を行なう。また検出した2
つの角度が明らかに異なる場合には2つの角度を比較す
る(ステップS5)。2つの角度の内、小さい方の角度
に注目し、この小さい角度を形成する2木の線分におい
て、屈曲点より左側に出ている線分の方を追跡する線分
(以下、追跡線分という)に決定する。この追跡線分の
決定方法を第5図を参照して説明する。
Now, since two line segments extend in different directions from the bending point in a negative rotation of 360 degrees, the directions of these line segments are next determined (step S3). Then, two angles formed by the two tree line segments are detected with the bending point as the center, and if each angle (only one angle is sufficient) is approximately equal to 180°, the process returns to step S1 again and another bending point is detected. The same process as described above is performed based on the selection. Also detected 2
If the two angles are clearly different, the two angles are compared (step S5). Focus on the smaller angle of the two angles, and among the two tree line segments that form this smaller angle, trace the line segment that extends to the left of the bending point (hereinafter referred to as the tracing line segment). ). The method for determining this tracing line segment will be explained with reference to FIG.

第5図において、Uは選出された屈曲点であり、この屈
曲点Uより左側に出ている線分は線分丁Tであり、右側
に出ている線分は線分下Tである。これらの線分により
作られる角度は角度αと角度βとの2つである。ここで
は角度α〈角度βとの関係が生まれ、角度の小さい角度
α側に注目すると、屈曲点Uより左側に出ている線分下
Tが追跡線分に該当する。もし角度β側の方が小さい角
度を有した場合には線分UWが追跡線分に該当する。こ
のようにして追跡線分を決定すると分岐点より特徴点を
検出するまで追跡線分を追跡する(ステップS7、ステ
ップS8)。
In FIG. 5, U is the selected inflection point, the line segment extending to the left of this inflection point U is the line segment T, and the line segment extending to the right is the line segment T. There are two angles formed by these line segments: angle α and angle β. Here, there is a relationship between angle α<angle β, and if we pay attention to the smaller angle α side, the lower line segment T extending to the left of the bending point U corresponds to the tracing line segment. If the angle β side has a smaller angle, the line segment UW corresponds to the tracing line segment. Once the tracing line segment is determined in this way, the tracing line segment is traced until a feature point is detected from the branch point (step S7, step S8).

次に、特徴点を検出すると、その特徴点の種類に応じて
以下の処理を行なう。
Next, when a feature point is detected, the following processing is performed depending on the type of feature point.

まず、“開始点”と判別した場合にはステップS1で選
出した屈曲点に再び戻ったことを意味するため、この閉
ループをシンボルと判定し、このシンボルの特徴点記憶
グループをシンボル分類部10へ送出する(ステップS
9、ステップ510)。そして他にまだ屈曲点が存在す
るか否かを検索し、新たな屈曲点を検出すると再びステ
ップS1に戻る(ステップS11、ステップ512)。
First, if it is determined to be a "starting point", it means that the inflection point selected in step S1 has been returned to, so this closed loop is determined to be a symbol, and the feature point storage group of this symbol is sent to the symbol classification unit 10. Send (step S
9, step 510). Then, a search is made to see if there are any other bending points, and when a new bending point is detected, the process returns to step S1 (step S11, step 512).

また“端点”と判定した場合には追跡線分の終点を意味
するため、これ以上の追跡は不可能であるため再びステ
ップS1へ戻る(ステップ513)。
Further, if it is determined to be an "end point", it means the end point of the tracing line segment, and further tracing is impossible, so the process returns to step S1 again (step 513).

または、“屈曲点゛と判定した場合にはこの屈曲点の座
標を抽出中のシンボルの特徴点記憶グループに記憶する
(ステップS14、ステップ515)。そしてこの屈曲
点より先に続く線分を追゛ 跡線分としてステップS7
より再び追跡を行なう。
Alternatively, if it is determined to be an "inflection point," the coordinates of this inflection point are stored in the feature point storage group of the symbol being extracted (step S14, step 515).Then, the line segment that continues beyond this inflection point is added.゛ Step S7 as trace line segment
Let's try tracking again.

さらに、“分岐点”と判定した場合には後述する規則1
に従って次の追跡線分を検出し、この分岐点の座標を抽
出中のシンボルの特徴点記憶グループに記憶して再びス
テップS7へ進むくステップS16、ステップS17、
ステップ818)。規則1によれば、「分岐点では、分
岐点を軸に直前の線分を反時計回りに回転させて最初に
重なる線分を追跡線分と決定する」となる。
Furthermore, if it is determined that it is a “branching point”, Rule 1 described below
Then, the next tracing line segment is detected, the coordinates of this branching point are stored in the feature point storage group of the symbol being extracted, and the process returns to step S7.Steps S16, S17,
step 818). According to Rule 1, ``At a branch point, rotate the immediately preceding line segment counterclockwise around the branch point, and determine the first line segment that overlaps as the tracing line segment.''

また、“交差点”と判定した場合には後述する規則2に
従って次の追跡線分を検出し、この交差点の座標を抽出
中のシンボルの特徴点記憶グループに記憶して再びステ
ップS7へ進む(ステップS19、ステップS20、ス
テップ521)。規則2によれば、「交差点では、直前
の線分の追跡方向に最も近い方向に出ている線分を追跡
線分と決定する」となる。尚、ステップS19の処理の
ときに交差点として判定できない場合には認識不可能と
して処理を停止する等のエラー処理に径行する。
If it is determined to be an "intersection", the next tracing line segment is detected according to Rule 2, which will be described later, the coordinates of this intersection are stored in the feature point storage group of the symbol being extracted, and the process returns to step S7 (step S19, step S20, step 521). According to Rule 2, ``At an intersection, the line segment that exits in the direction closest to the tracing direction of the immediately preceding line segment is determined to be the tracing line segment.'' Note that if it cannot be determined that the intersection is an intersection during the process of step S19, it is determined that the intersection cannot be recognized and the process is stopped, or an error process is performed.

以下、シンボル候補の抽出処理に続き、認識結果を出す
までの一連の処理の流れの概略を説明する。
An overview of a series of processing steps from symbol candidate extraction processing to output of recognition results will be described below.

以上のシンボル候補の抽出処理ようにシンボルは一つ一
つ抽出されていき、これと同時にシンボル分類部10は
同様の形状をしたシンボル毎に分類する。尚、シンボル
分類部10には予め所定の形状をしたシンボルを登録さ
せておき、抽出したシンボルを登録されているシンボル
の中で該当するシンボル毎に分類するものである。そし
て種類が確定したシンボル毎に種類確定のフラグをセッ
トしてシンボル記憶部11に記憶する。このようにして
抽出時にはまだシンボルの候補であったものをシンボル
と確定する。また抽出したシンボルが登録したシンボル
に該当しない場合にはその抽出したシンボルを候補から
除外する。このようにシンボルの抽出と記憶に至るまで
の処理は連続的にシンボルが抽出できなくなるまで繰り
換えし行なわれる。特にシンボルを構成する線分におい
て、屈曲点より出ている2本の線分には構造グラフ上で
該当するベクトル(線分をベクトルで記憶している)に
対してフラグ1”をセットするか、或いはその線分を消
去するかの処理を行なう。このようにして重複して開始
点となる屈曲点を運出することを防ぐ。尚、シンボルに
該当しない構造グラフ上の各ベクトルにはフラグ0”が
セットされている。
As in the above-described symbol candidate extraction processing, symbols are extracted one by one, and at the same time, the symbol classification unit 10 classifies each symbol having a similar shape. Incidentally, symbols having a predetermined shape are registered in advance in the symbol classification section 10, and the extracted symbols are classified into corresponding symbols among the registered symbols. Then, for each symbol whose type has been determined, a type determination flag is set and stored in the symbol storage unit 11. In this way, symbols that were still candidate symbols at the time of extraction are determined to be symbols. Furthermore, if the extracted symbol does not correspond to the registered symbol, the extracted symbol is excluded from the candidates. In this way, the processing up to symbol extraction and storage is repeated continuously until no symbols can be extracted anymore. In particular, for the line segments that make up the symbol, for the two line segments that come out from the bending point, set flag 1 for the corresponding vector (line segments are stored as vectors) on the structure graph. , or delete the line segment.In this way, it is possible to prevent the inflection point that becomes the starting point from being duplicated.Furthermore, a flag is set for each vector on the structure graph that does not correspond to the symbol. 0" is set.

次に、接続線の抽出方法を説明する。Next, a method for extracting connection lines will be explained.

まず、接続線抽出部12では構造グラフ記憶部8の構造
グラフ中においてベクトルにセットされているフラグを
調べ、フラグ1″にセットされていないベクトルを接続
線と判定する。このようにして接続線を抽出しつつ、接
続線を接続線記憶部13に記憶する。この接続線の抽出
処理も上述したシンボルの抽出処理と同様に抽出できな
くなるまで行なわれる。
First, the connection line extraction unit 12 checks the flags set for vectors in the structure graph in the structure graph storage unit 8, and determines vectors that are not set to flag 1'' as connection lines. While extracting the symbol, the connecting line is stored in the connecting line storage section 13. Similar to the above-described symbol extracting process, the connecting line is stored in the connecting line storage section 13. Similar to the above-described symbol extracting process, this connecting line is continued until it can no longer be extracted.

このように、シンボルと接続線がすべて抽出されると次
にシンボルに対して接続線がどのように接続されている
かを接続関係解析部14で解析する。この解析において
はシンボルを構成する特徴点の座標と接続線の両結合子
の座標との一致関係の解析等が含まれる。そして接続線
解析部14の解析結果を画像の認識結果として認識結果
記憶部15に記憶する。
When all the symbols and connection lines are extracted in this way, the connection relation analysis unit 14 analyzes how the connection lines are connected to the symbols. This analysis includes analysis of the matching relationship between the coordinates of feature points constituting the symbol and the coordinates of both connectors of the connecting line. The analysis result of the connection line analysis section 14 is then stored in the recognition result storage section 15 as an image recognition result.

以上の説明により、本実施例は例えシンボルと接続線と
が重なっているブロック図或いは論理回路図であっても
追跡線分の追跡方向を正確に把握することが可能であり
、これによって確実に閉ループを抽出することができる
。この確実な閉ループの抽出によりシンボルを効率良く
正確に抽出することができる。
As explained above, in this embodiment, even in a block diagram or a logic circuit diagram in which symbols and connection lines overlap, it is possible to accurately grasp the tracing direction of the tracing line segment. Closed loops can be extracted. This reliable closed-loop extraction allows symbols to be extracted efficiently and accurately.

また、本実施例では線分の追跡時において、特徴点での
次追跡線分の決定方法を変形することも可能である。こ
の第1の変形例を第7図に基づいて以下に説明する。
Furthermore, in this embodiment, when tracing a line segment, it is also possible to modify the method of determining the next line segment to be traced at a feature point. This first modification will be explained below based on FIG. 7.

第1の変形例では第5図で説明した追跡線分の決定方法
とは逆に、2本の線分より作られる角度の内、小さい方
の角度に注目したときにおいて屈曲点より右側に出てい
る線分を追跡線分として決定する。この場合には前述の
実施例による閉ループの追跡方向とは逆方向回りの追跡
である。また規則1には規則1°、規則2には規則2°
がそれぞえ対応する。即ち、規則1′によれば、「分岐
点では、分岐点を軸に直前の線分を時計回りに回転させ
て最初に重なる線分を追跡線分と決定する」と定義され
、また規則2゛によれば、「交差点では、直前の線分の
追跡方向に最も近い方向に出ている線分を追跡線分、と
決定する」となる。
In the first modification, contrary to the method of determining the tracing line segment explained in FIG. 5, when focusing on the smaller angle formed by the two line segments, The line segment that is located is determined as the tracing line segment. In this case, tracking is performed in the opposite direction to the closed-loop tracking direction according to the embodiment described above. Also, rule 1 has rule 1°, and rule 2 has rule 2°.
correspond to each other. That is, according to Rule 1', it is defined as ``At a branch point, rotate the previous line segment clockwise around the branch point, and determine the first line segment that overlaps as the tracing line segment.'' According to ``, at an intersection, the line segment that exits in the direction closest to the tracing direction of the immediately preceding line segment is determined to be the tracing line segment.''

本実施例及び変形例において、閉ループの追跡方向がど
ちらであっても規則性を持たせることにより同様の作用
・効果を得ることができる。
In this embodiment and the modified examples, the same operation and effect can be obtained by providing regularity regardless of the closed loop tracking direction.

また、第2の変形例として、第4図(a)のステップS
3で求める線分の方向を予じめ算出しておく方法がある
In addition, as a second modification example, step S in FIG. 4(a)
There is a method of calculating the direction of the line segment found in step 3 in advance.

その方法として、折れ線近似部6の段階で各線分の方向
、即ち、ベクトルの方向を算出すれば良い。
As a method for this, the direction of each line segment, that is, the direction of the vector may be calculated at the stage of the polygonal line approximation unit 6.

[発明の効果] 以上の説明により、本発明は例えシンボルと接続線とが
重なっている画像であってもシンボルを確実に且つ効率
の良く抽出することができる。
[Effects of the Invention] As described above, the present invention can reliably and efficiently extract symbols even from images in which symbols and connection lines overlap.

【図面の簡単な説明】 第1図は本発明に係わる画像認識装買の構成を示すブロ
ック構成図、 第2図(a)〜(e)は各種シンボルの形状を示す図、 第3図は特徴点を説明する説明図、 第4図(a)、(b)は本実施例のシンボルの抽出方法
を説明するフローチャート、 第5図は本実施例の分岐点よりの追跡線分を決定する方
法を説明する説明図、 第6図、第7図は従来のシンボル抽出方法を説明する説
明図である。 図中、1・・・CPU、2・・・ROM、3・・・RA
M。 4・・・画像人力部、5・・・構造解析部、6・・・折
れ線近似部、7・・・構造グラフ作成部、8・・・構造
グラフ記憶部、9・・・シンボル候補抽出部、10・・
・シンボル分頚部、11・・・シンボル記憶部、12・
・・接続線抽出部、13・・・接続線記憶部、14・・
・接続関係解析部、15・・・認識結果記憶部、16・
・・表示部、17・・・キーボード部、50〜53・・
・結合子である。 (a)     (b) 第 第3図 (c)    (d)   (e) 2図 第5図
[Brief Description of the Drawings] Figure 1 is a block configuration diagram showing the configuration of an image recognition device according to the present invention, Figures 2 (a) to (e) are diagrams showing the shapes of various symbols, and Figure 3 is a block diagram showing the configuration of an image recognition device according to the present invention. An explanatory diagram for explaining feature points, FIGS. 4(a) and (b) are flowcharts for explaining the symbol extraction method of this embodiment, and FIG. 5 is for determining a tracing line segment from a branch point of this embodiment. 6 and 7 are explanatory diagrams illustrating the conventional symbol extraction method. In the figure, 1...CPU, 2...ROM, 3...RA
M. 4... Image human power section, 5... Structure analysis section, 6... Polygonal line approximation section, 7... Structure graph creation section, 8... Structure graph storage section, 9... Symbol candidate extraction section , 10...
・Symbol division neck, 11...Symbol storage section, 12・
... Connection line extraction section, 13... Connection line storage section, 14...
・Connection relationship analysis section, 15... Recognition result storage section, 16.
...Display section, 17...Keyboard section, 50-53...
・It is a connector. (a) (b) Figure 3 (c) (d) (e) Figure 2 Figure 5

Claims (5)

【特許請求の範囲】[Claims] (1)規則性のある形状をしたシンボルと該シンボルを
接続する接続線とが複数の線分により構成される画像を
認識する画像認識装置において、前記画像より特徴点を
検出する検出手段と、該検出手段の検出した特徴点を記
憶する記憶手段と、該記憶手段の記憶する特徴点の中か
ら線分を追跡する始点を選出する選出手段と、該選出手
段の選出した始点より追跡すべき線分と該線分の追跡方
向とを決定する第1の決定手段と、該第1の決定手段の
決定した追跡方向に線分を追跡する追跡手段と、該追跡
手段の追跡中に特徴点を検出し、該特徴点に基づいて次
に追跡すべき線分と該線分の追跡方向とを決定する第2
の決定手段と、該第2の決定手段が前記始点を検出する
まで追跡した複数の線分によつて形成される閉ループを
シンボルとして抽出するシンボル抽出手段とを備えたこ
とを特徴とする画像認識装置。
(1) In an image recognition device that recognizes an image in which regularly shaped symbols and connection lines connecting the symbols are formed by a plurality of line segments, a detection means for detecting feature points from the image; a storage means for storing feature points detected by the detection means; a selection means for selecting a starting point for tracing a line segment from among the feature points stored in the storage means; a first determining means for determining a line segment and a tracing direction of the line segment; a tracing means for tracing the line segment in the tracing direction determined by the first determining means; , and determines the next line segment to be tracked and the tracking direction of the line segment based on the feature points.
and symbol extracting means for extracting, as a symbol, a closed loop formed by a plurality of line segments traced until the second determining means detects the starting point. Device.
(2)前記始点を屈曲点としたことを特徴とする特許請
求の範囲第1項記載の画像認識装置。
(2) The image recognition device according to claim 1, wherein the starting point is a bending point.
(3)前記第1の決定手段は、始点を中心に開く2本の
線分より規則的に一方の線分を追跡線分として選出する
第1の選出手段を含むことを特徴とする特許請求の範囲
第2項記載の画像認識装置。
(3) A patent claim characterized in that the first determining means includes a first selecting means for regularly selecting one of two line segments opening around a starting point as a tracing line segment. The image recognition device according to item 2 of the range.
(4)前記第2の決定手段は、少なくとも特徴点が分岐
点または交差点の場合には前記特徴点に到達した直前の
線分に基づいた規則性に従つて次の追跡線分を選出する
第2の選出手段を含むことを特徴とする特許請求の範囲
第1項記載の画像認識装置。
(4) At least when the feature point is a branch point or an intersection, the second determining means selects the next tracing line segment according to regularity based on the line segment immediately before reaching the feature point. 2. The image recognition device according to claim 1, further comprising two selection means.
(5)前記第2の決定手段は、特徴点が端点の場合には
前記特徴点より次の追跡を中止する追跡中止手段を含む
ことを特徴とする特許請求の範囲第1項記載の画像認識
装置。
(5) The image recognition according to claim 1, wherein the second determining means includes a tracking stop means for stopping the next tracking from the feature point when the feature point is an end point. Device.
JP28750087A 1987-11-16 1987-11-16 Picture recognition device Pending JPH01129368A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28750087A JPH01129368A (en) 1987-11-16 1987-11-16 Picture recognition device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28750087A JPH01129368A (en) 1987-11-16 1987-11-16 Picture recognition device

Publications (1)

Publication Number Publication Date
JPH01129368A true JPH01129368A (en) 1989-05-22

Family

ID=17718148

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28750087A Pending JPH01129368A (en) 1987-11-16 1987-11-16 Picture recognition device

Country Status (1)

Country Link
JP (1) JPH01129368A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0744585A (en) * 1993-07-27 1995-02-14 Nec Corp Designing method for multi-layer printed circuit board
JP2015060441A (en) * 2013-09-19 2015-03-30 コニカミノルタ株式会社 Image processing apparatus, method of controlling the same, and program for controlling the same

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62125482A (en) * 1985-11-26 1987-06-06 Nippon Telegr & Teleph Corp <Ntt> Line tracing method for thinned picture
JPS62134776A (en) * 1985-12-09 1987-06-17 Toshiba Corp Discriminating method for outer graphic and inner graphic in graphic processor
JPS62248080A (en) * 1986-04-22 1987-10-29 Fujitsu Ltd Closed graphic identifier

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62125482A (en) * 1985-11-26 1987-06-06 Nippon Telegr & Teleph Corp <Ntt> Line tracing method for thinned picture
JPS62134776A (en) * 1985-12-09 1987-06-17 Toshiba Corp Discriminating method for outer graphic and inner graphic in graphic processor
JPS62248080A (en) * 1986-04-22 1987-10-29 Fujitsu Ltd Closed graphic identifier

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0744585A (en) * 1993-07-27 1995-02-14 Nec Corp Designing method for multi-layer printed circuit board
JP2015060441A (en) * 2013-09-19 2015-03-30 コニカミノルタ株式会社 Image processing apparatus, method of controlling the same, and program for controlling the same

Similar Documents

Publication Publication Date Title
US5467411A (en) System with approximation mechanism for recognizing graphical elements in a drawing
US6654497B1 (en) Image processing apparatus, method and storage medium
EP1429281B1 (en) Method and apparatus for matching streaked pattern image
Ablameyko et al. Recognition of engineering drawing entities: review of approaches
JPH01129368A (en) Picture recognition device
Ohgushi et al. Traffic sign recognition by bags of features
JPH07193716A (en) Edge emphasizing device
Vázquez-Reina et al. Traffic sign shape classification based on correlation techniques
JP3379327B2 (en) Character recognition device
JP3329528B2 (en) Document reader
JPH04260980A (en) Device for recognizing graphic
JPS61123987A (en) Character recognizing device
JP2623559B2 (en) Optical character reader
JPS6174079A (en) Pattern recognizing device
NAGAO et al. An extraction method of partially occluded objects utilizing partial shape vectors
JPS62281082A (en) Character recognizing device
JPS61121184A (en) Character recognizer
JPH067394B2 (en) Pattern recognizer
JPH04112276A (en) Binary picture contour line chain encoding device
CN115171123A (en) Text processing method and device, storage medium and computer equipment
JPH0540827A (en) Line type recognition method for automatic drawing input device
JPH0757047A (en) Character segmentation system
JPS6232587A (en) Character recognizing system
JPH1165753A (en) Character string input method and device and storage medium storing character string input program
JPH0350691A (en) Character recognizing device