Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0312347B2 - - Google Patents
[go: Go Back, main page]

JPH0312347B2 - - Google Patents

Info

Publication number
JPH0312347B2
JPH0312347B2 JP59194620A JP19462084A JPH0312347B2 JP H0312347 B2 JPH0312347 B2 JP H0312347B2 JP 59194620 A JP59194620 A JP 59194620A JP 19462084 A JP19462084 A JP 19462084A JP H0312347 B2 JPH0312347 B2 JP H0312347B2
Authority
JP
Japan
Prior art keywords
line segment
point
pattern
line
contour
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP59194620A
Other languages
Japanese (ja)
Other versions
JPS6174076A (en
Inventor
Kenji Suzuki
Seiji Hata
Yukiro Tsuji
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP59194620A priority Critical patent/JPS6174076A/en
Publication of JPS6174076A publication Critical patent/JPS6174076A/en
Publication of JPH0312347B2 publication Critical patent/JPH0312347B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、画像処理による部品認識装置に用い
られる線分パターン作成方式に係り、特にデイジ
タル画像上において所定の接続関係を有する輪郭
画素列(輪郭点列)を線分で近似する処理を高速
で実行するのに好適な線分パターン作成方式に関
するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a line segment pattern creation method used in a component recognition device using image processing. The present invention relates to a line segment pattern creation method suitable for performing a process of approximating a sequence of points) with line segments at high speed.

〔発明の背景〕[Background of the invention]

従来、画像処理の高速性,柔軟性のために部品
パターンを多角形近似して部品認識を行うことが
提案されている。この際に、すべての線分パター
ンを記憶しておき、部品の輪郭点列をこれと照合
することにより多角形の辺を高速に抽出すること
が行われている。これについては、例えば、昭和
58年3月10日発行の昭和58年電気学会全国大会講
演論文集〔13〕、論文番号1340に「線分化パター
ンマツチングによる部品認識技術」と題して発表
されている。また、本出願人が先に出願した特願
昭58−27519号(特開昭59−154578号公報)に詳
述されている。
Conventionally, it has been proposed to perform component recognition by approximating a component pattern into a polygon for the purpose of high-speed and flexible image processing. At this time, all line segment patterns are stored and the sides of the polygon are extracted at high speed by comparing the contour point sequence of the part with this. Regarding this, for example, the Showa period
It was published on March 10, 1988 in the Proceedings of the National Conference of the Institute of Electrical Engineers of Japan, Volume 13, Paper No. 1340, entitled ``Part recognition technology using line segmentation pattern matching.'' Further, it is detailed in Japanese Patent Application No. 58-27519 (Japanese Unexamined Patent Publication No. 59-154578) previously filed by the present applicant.

しかし、このような従来の方法では、線分化処
理で用いる線分パターンデータは、ある長さ以内
の直線パターンをすべて含むため、メモリサイズ
が大きくなり、装置の小型化並びに経済化の点で
問題であつた。
However, in such conventional methods, the line segment pattern data used in line segmentation processing includes all straight line patterns within a certain length, resulting in a large memory size, which poses a problem in terms of downsizing and economical equipment. It was hot.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、上記した従来の問題点を解決
し、高速多角形近似において必要となる線分パタ
ーンデータを圧縮し、小規模な画像処理装置でも
実行を可能とする線分パターン作成方式を提供す
ることにある。
The purpose of the present invention is to solve the above-mentioned conventional problems, compress line segment pattern data necessary for high-speed polygon approximation, and provide a line segment pattern creation method that can be executed even by a small-scale image processing device. It is about providing.

〔発明の概要〕[Summary of the invention]

線分パターンは2本1組で軸対称となつてい
る。これを進行方向系列として見ると、対応する
各点において左右を逆転したものになつている。
そこで、本発明では、いずれか片方のみを保持
し、最初の折れ点での進行方向に従つて、必要な
時は以後の進行方向を左右逆転することで、2つ
の線分パターンの形状を1つ分のデータで表現す
るようにしたものである。
The line segment patterns are arranged in sets of two and are axially symmetrical. When viewed as a traveling direction series, the left and right sides are reversed at each corresponding point.
Therefore, in the present invention, the shapes of the two line segment patterns are made into one by holding only one of them and reversing the subsequent direction of movement from side to side according to the direction of movement at the first bending point when necessary. It is designed to be expressed using two pieces of data.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の実施例を図に従つて詳細に説明
する。
Embodiments of the present invention will be described in detail below with reference to the drawings.

第1図は、本発明に係る画像処理装置の一実施
例を示すブロツク図である。
FIG. 1 is a block diagram showing an embodiment of an image processing apparatus according to the present invention.

ここで、100は、以下に述べる各部に対し
て、所要の処理の流れを制御する制御部である。
101〜104は、前処理に係るもので、101
は、入力制御部、102は、画像メモリ、103
は、前処理部、104は、領域情報メモリであ
る。105と106は、輪郭抽出処理に係るもの
で、105は、輪郭抽出部、106は、輪郭メモ
リである。107〜109は、線分化処理に係る
もので、107は、線分化処理部、115は線分
パターンメモリ、108は、線分化情報メモリ、
109は、辞書パターンメモリである。110と
111は、領域特徴抽出処理に係るもので、11
0は、領域特徴抽出部、111は、領域特徴メモ
リである。112〜114は、パターンマツチン
グ処理に係るもので112は共通領域抽出部、1
13は、共通領域メモリ、114は、認識処理部
である。
Here, 100 is a control unit that controls the flow of required processing for each unit described below.
101 to 104 are related to preprocessing, and 101
is an input control unit; 102 is an image memory; 103
is a preprocessing unit, and 104 is an area information memory. 105 and 106 are related to contour extraction processing; 105 is a contour extraction unit; and 106 is a contour memory. 107 to 109 are related to line segmentation processing, 107 is a line segmentation processing unit, 115 is a line segment pattern memory, 108 is a line segmentation information memory,
109 is a dictionary pattern memory. 110 and 111 are related to region feature extraction processing;
0 is a region feature extraction unit, and 111 is a region feature memory. 112 to 114 are related to pattern matching processing; 112 is a common area extraction unit;
13 is a common area memory, and 114 is a recognition processing unit.

まず、入力された画像データは、入力制御部1
01でデイジタル化および所定の閾値で2値化さ
れた後、濃淡画像データ,2値画像データとして
画像メモリ102に入力・記憶される。
First, the input image data is input to the input control unit 1.
After being digitized with 01 and binarized with a predetermined threshold, the data is input and stored in the image memory 102 as grayscale image data and binary image data.

画像メモリ102に記憶された画像データは、
はじめに前処理部103によつて画像上のどの領
域を対象物体領域とするかが決定された後、その
領域の代表点の位置情報が領域情報メモリ104
に記憶される。
The image data stored in the image memory 102 is
First, the preprocessing unit 103 determines which area on the image is to be the target object area, and then the position information of the representative point of that area is stored in the area information memory 104.
is memorized.

次に、輪郭抽出部105は、上記の代表点の位
置情報に基づいて探索始点を決定し、画像上の指
定領域の輪郭画素を順次に探索し、例えばその中
心座標値を輪郭メモリ106に記憶させる。
Next, the contour extraction unit 105 determines a search start point based on the position information of the representative point, sequentially searches for contour pixels in the specified area on the image, and stores, for example, the center coordinate value in the contour memory 106. let

その中心座標値により、線分化処理部107は
輪郭画素の中心を表わす点列を1点ずつたどりな
がら、線分パターンメモリ115にあらかじめ設
定されている線分パターンデータと照合して線分
に近似し、その線分の端点、すなわち、その領域
を多角形近似した当該各頂点座標を順次に線分化
情報メモリ108に記憶させる。その線分化情報
は、辞書パターンの登録時には、辞書パターンメ
モリ109へ移される。
Based on the center coordinate values, the line segmentation processing unit 107 approximates the line segment by tracing the point sequence representing the center of the contour pixel one by one and comparing it with the line segment pattern data preset in the line segment pattern memory 115. Then, the end points of the line segment, that is, the coordinates of each vertex obtained by approximating the area to a polygon, are sequentially stored in the line segmentation information memory 108. The line division information is transferred to the dictionary pattern memory 109 when registering the dictionary pattern.

また、領域特徴抽出部110は、指定領域の特
徴(例えば面積,重心,慣性主軸,最大長,周囲
長等)を線分化情報メモリ108の内容から求
め、領域特徴メモリ111に記憶させる。辞書パ
ターン登録時には、その特徴情報は辞書パターン
メモリ109に記憶される。
Further, the region feature extraction unit 110 obtains features of the specified region (for example, area, center of gravity, principal axis of inertia, maximum length, perimeter, etc.) from the contents of the line segmentation information memory 108 and stores them in the region feature memory 111. When registering a dictionary pattern, its characteristic information is stored in the dictionary pattern memory 109.

更に、共通領域抽出部112は、現時点で入力
されたパターン(線分化情報メモリ108に格納
されているもの)と辞書パターン(辞書パターン
メモリ109に格納されているもの)とを、両方
の特徴が一致するように(例えば、重心座標が一
致するように、または慣性主軸方向が一致するよ
うに等)、入力パターン側の座標変換をした後、
両パターンの共通領域(積図形)を同様に頂点列
として求め、共通領域メモリ113に記録する。
Furthermore, the common area extracting unit 112 extracts the currently input pattern (stored in the line segmentation information memory 108) and the dictionary pattern (stored in the dictionary pattern memory 109) so that the characteristics of both After performing coordinate transformation on the input pattern side so that they match (for example, so that the center of gravity coordinates match, or the principal axis of inertia directions match, etc.),
The common area (product figure) of both patterns is similarly determined as a vertex sequence and recorded in the common area memory 113.

最後に、認識処理部114は、共通領域(積図
形)の面積を算出し、これと辞書パターンまたは
入力パターンの面積との比率を求め、その値が所
定値以上になつた場合、両パターンは一致してい
るものと判定して、認識結果を出力する。もし、
両パターンが一致せず、しかも辞書パターンが複
数あるときは、第2,第3の辞書パターンとのマ
ツチング処理を同様に繰り返す。なお、認識処理
部114では、一致した両パターンの変換前の相
対位置から入力パターンの位置,姿勢情報も出力
する。
Finally, the recognition processing unit 114 calculates the area of the common area (product figure), calculates the ratio of this to the area of the dictionary pattern or the input pattern, and if the value exceeds a predetermined value, both patterns are It is determined that there is a match and the recognition result is output. if,
If the two patterns do not match and there are a plurality of dictionary patterns, the matching process with the second and third dictionary patterns is repeated in the same way. Note that the recognition processing unit 114 also outputs position and orientation information of the input pattern from the relative positions of both matching patterns before conversion.

上記の一連の画像処理において、本発明の要部
となる、線分パターンメモリ115で用いられる
線分パターンの作成方法とそれを用いた処理につ
いて、次に説明する。
In the above series of image processing, a method for creating a line segment pattern used in the line segment pattern memory 115 and processing using the same, which are essential parts of the present invention, will be described next.

線分化処理部107で実行される多角形近似は
対象とする画像領域の輪郭を追跡し、連続する輪
郭点列を直線と見なせる時、その両端点を多角形
の頂点とする処理である。
The polygonal approximation performed by the line segmentation processing unit 107 is a process in which the outline of the target image area is traced, and when a series of continuous outline points can be regarded as a straight line, both end points thereof are set as the vertices of the polygon.

輪郭線の考え方には、第2図に示すように輪郭
画素の中心を輪郭線とする考え方(A),(B)と領域画
素と背景画素の境界線を輪郭線とする考え方(C),
(D)の2通りがあり、更に、連続する輪郭点の隣接
状態には、縦横の隣接だけを考える4連結(B),(D)
と、斜めの隣接も考慮にいれる8連結(A),(C)の2
通りがある。従つて、輪郭線の追跡には(A)〜(D)の
計4通りの方法がある。但しこのうち境界8連結
(C)は、画素の値と一意に対応しないため意味が無
い。
As shown in Figure 2, there are two ways to think about contour lines: (A) and (B), where the center of the contour pixel is the contour line; and (C), where the boundary line between area pixels and background pixels is the contour line.
There are two ways (D), and in addition, there are 4 connections (B) and (D) that consider only vertical and horizontal adjacency for the adjacency state of continuous contour points.
and 2 of 8 connections (A) and (C), which also take diagonal adjacency into account.
There is a street. Therefore, there are a total of four methods (A) to (D) for contour tracing. However, of these, 8 boundaries are connected
(C) is meaningless because it does not uniquely correspond to the pixel value.

各々の場合、追跡の方向には、第2図a,a′、
b,dに示すような可能性がある。以後は境界4
連結(D)で輪郭線を追跡する場合について説明す
る。
In each case, the direction of tracking is a, a',
There are possibilities as shown in b and d. From now on, boundary 4
The case of tracing contour lines using connection (D) will be explained.

輪郭点列の例を第3図に示す。各輪郭点は図中
矢印で示すように固有の進行方向を持つており、
輪郭線の形状は、この進行方向の列で表わされ
る。長さに制限を加えると、ある条件のもとで線
分と見なされる点列は、有限個数の進行方向列と
なる。線分と見なす条件は、例えば、中心線から
の距離の許容最大値を定め、すべての点がこれを
満足する点列を線分とする、などが用いられる。
線分パターンの個数,長さが有限なので、すべて
の線分パターンを、人工的に作ることができる。
An example of a contour point sequence is shown in FIG. Each contour point has a unique direction of travel, as shown by the arrow in the figure.
The shape of the contour line is represented by the columns in the traveling direction. If a restriction is placed on the length, the sequence of points that are considered to be line segments under certain conditions becomes a finite number of sequences in the advancing direction. The condition for considering a line segment is, for example, that a maximum permissible distance from the center line is determined, and a line segment is a point sequence in which all points satisfy this value.
Since the number and length of line segment patterns are finite, all line segment patterns can be created artificially.

線分パターンの表現形式、およびこれを用いた
多角形近似の例を第4図に示す。
FIG. 4 shows an example of a representation format of a line segment pattern and polygon approximation using the same.

線分パターンは、第4図aに示すように、3×
nの2次元配列で表わされ、これがパターンデー
タとしてメモリ115に記憶される。配列の第2
添字値は、点列で表わされる線分パターン上のn
個の点に対応し、第1添字値は各点における3つ
の進行方向、すなわち、左折、直進、右折に対応
する。配列要素の内容は、ある点において進行方
向が決まつた時、その方向に進んだ時の次の点の
番号、即ちポインタである。例えば始点“0”に
おいて進行方向が右折と決まつたとき、その方向
に進んだときの次の点の番号が“187”として示
される。但し、点列は直線とみなし得るものであ
るという制約があるために、各点において3つの
進行方向がすべて許されるとは限らない。禁止方
向に対応する要素にはエンドマークENDが記入
されており、輪郭線の追跡中にこれを検出した時
は、検出した点を線分の終了点と見なし、これを
多角形の頂点として登録する。第4図bにおいて
は、線分の始点Sにおいて線分パターンの始点
“0”から追跡を始め、点EでエンドマークEND
を検出してこの点“333”を多角形の頂点とし、
線分パターンのポインタを始点“0”にもどして
新しい線分の追跡を始める。図中、各点の番号は
線分パターンの点番号である。
The line segment pattern is 3× as shown in Figure 4a.
It is represented by a two-dimensional array of n, and this is stored in the memory 115 as pattern data. second of array
The subscript value is n on the line segment pattern represented by a series of points.
points, and the first index value corresponds to the three directions of travel at each point, namely, turn left, go straight, and turn right. The contents of the array element are the number, ie, the pointer, of the next point when the direction of movement is determined at a certain point. For example, when the direction of travel is determined to be a right turn at the starting point "0", the number of the next point when traveling in that direction is indicated as "187". However, since there is a restriction that the point sequence can be regarded as a straight line, all three traveling directions are not always allowed at each point. An end mark END is written in the element corresponding to the prohibited direction, and when this is detected while tracing the contour line, the detected point is regarded as the end point of the line segment, and this is registered as the vertex of the polygon. do. In Fig. 4b, tracing starts from the starting point "0" of the line segment pattern at the starting point S of the line segment, and the end mark END is reached at point E.
Detect and set this point “333” as the vertex of the polygon,
Return the line segment pattern pointer to the starting point "0" and start tracing a new line segment. In the figure, the number of each point is the point number of the line segment pattern.

次に、この線分パターンを用いた多角形近似の
手順を第5図を用いて第4図を例にとり説明す
る。多角形近似は、輪郭点を1点ずつ追跡しなが
ら、同時に線分パターンを各点での進行方向に従
つてポインタを選択して追跡する。まず、追跡開
始点、例えば、第4図bのS点を多角形の第1頂
点として登録し、線分パターンのポインタを
“0”にして初期設定する(ステツプ501)。以後、
ステツプ501〜507の処理をくり返す。まず、追跡
開始点Sにおける進行方向を決定する(ステツプ
502)。ここで、進行方向の決定方法について第3
図を用いて説明する。第3図において、画素Aが
部品領域に含まれているとする。まず、画素Bが
部品領域に含まれているかどうか調べ、含まれて
いない時は、進行方向は右折とする。次に、画素
Bが部品領域に含まれているかどうか調べ、含ま
れていない時進行方向を前進、含まれている時は
左折とする。画素が部品領域に含まれているか否
かの判定は、様々な方法があり、例えば2値画像
ならば輪郭メモリ106から読み出した値が
“1”か“0”かで判定できる。
Next, the procedure of polygon approximation using this line segment pattern will be explained using FIG. 5 and taking FIG. 4 as an example. In polygonal approximation, contour points are traced one by one, and at the same time, a line segment pattern is traced by selecting a pointer according to the direction of movement at each point. First, the tracing start point, for example, point S in FIG. 4b, is registered as the first vertex of the polygon, and the line segment pattern pointer is initialized by setting it to "0" (step 501). From then on,
Repeat steps 501 to 507. First, determine the traveling direction at the tracking starting point S (step
502). Here, we will explain the third method of determining the direction of travel.
This will be explained using figures. In FIG. 3, it is assumed that pixel A is included in the component area. First, it is checked whether pixel B is included in the component area, and if it is not included, the traveling direction is set to be a right turn. Next, it is checked whether pixel B is included in the component area, and if it is not included, the moving direction is set to move forward, and if it is included, the moving direction is set to be a left turn. There are various methods for determining whether a pixel is included in a component area. For example, in the case of a binary image, determination can be made based on whether the value read from the contour memory 106 is "1" or "0".

次に、線分パターンのポインタの指すスロツト
を参照し、進行方向に従つて、次のポインタを選
択する(ステツプ503)。例えば、第4図の場合、
ポインタ“0”のエリアを参照し、この場合、進
行方向が第4図bに示すように右折であるので、
次のポインタ“187”を選択する。そして、もし
次のポインタがエンドマークENDならば(ステ
ツプ504)、その時点の輪郭点を多角形の頂点とし
て新たに線分化情報メモリ108に登録し、ポイ
ンタを“0”にもどす(ステツプ505)。
Next, referring to the slot pointed by the line segment pattern pointer, the next pointer is selected according to the direction of travel (step 503). For example, in the case of Figure 4,
Referring to the area of pointer "0", in this case, since the direction of travel is a right turn as shown in Figure 4b,
Select the next pointer “187”. If the next pointer is the end mark END (step 504), the contour point at that point is newly registered in the line division information memory 108 as the vertex of the polygon, and the pointer is returned to "0" (step 505). .

次に、進行方向に従つて、次の輪郭点に進み
(ステツプ506)、終了条件、例えば輪郭線を1周
して追跡開始点Sにもどつたかどうかをチエツク
し(ステツプ507)、終了条件が満たされるまでス
テツプ502からステツプ507までをくり返す。
Next, proceed to the next contour point according to the direction of travel (step 506), check the end condition, for example, whether or not the contour has been completed once and returned to the tracing start point S (step 507), and check the end condition. Steps 502 to 507 are repeated until the condition is satisfied.

例えば、第4図bの輪郭線を第4図aの線分パ
ターンデータに従つて追跡する場合、ポインタ
“0”からスタートし、進行方向(右折)に従つ
て、次のポインタ“187”に進む。しかる後、次
の輪郭追跡に移り、進行方向(直進)を決定し、
ポインタ“315”を選択する。以後、同様に追跡
を行ない、エンドマークENDを示すポインタを
検出すると、そのときのポインタ“333”を頂点
として登録する。そして、このときの座標位置を
始点の座標をもとに算出してメモリ108に記憶
する。
For example, when tracing the contour line in Figure 4b according to the line segment pattern data in Figure 4a, start from pointer "0" and move to the next pointer "187" according to the direction of travel (right turn). move on. After that, move on to the next contour tracking, determine the direction of travel (straight ahead),
Select pointer “315”. Thereafter, tracking is performed in the same way, and when a pointer indicating the end mark END is detected, the pointer "333" at that time is registered as the vertex. Then, the coordinate position at this time is calculated based on the coordinate of the starting point and stored in the memory 108.

但し、第4図aに示すように、線分パターンは
軸対称の2本1対のうち、最初の折点が右折(ま
たは左折)に限られた片方しか無いため、このル
ープの中でフラグを保持し、輪郭点列上で最初の
折点が出現した以後、その折点が左折(右折)だ
つた時には、線分パターンの左右を逆転して使用
する。第4図aに示すような線分パターンは定数
データであるため、オフラインで作成しておき、
後でプログラムとともにロードすることができ
る。従つて、作成の際は高速処理を行なう必要が
ない。また、線分パターンの内容は、多角形近似
の処理手順に関係無いため、様々な直線判定基準
により作つた線分パターンを入れかえることによ
り、多角形近似の粗さの調節などの操作を、プラ
グラムやハードウエアを変更すること無く、容易
に行なうことができる。
However, as shown in Figure 4a, out of a pair of axially symmetric line segment patterns, there is only one whose first turning point is a right turn (or left turn). is maintained, and after the first break point appears on the contour point sequence, when that break point is a left turn (right turn), the left and right of the line segment pattern is reversed and used. Since the line segment pattern shown in Figure 4a is constant data, it must be created offline.
It can be loaded later with the program. Therefore, there is no need to perform high-speed processing during creation. In addition, since the contents of line segment patterns are not related to the processing procedure of polygon approximation, operations such as adjusting the roughness of polygon approximation can be programmed by replacing line segment patterns created using various straight line criteria. This can be easily done without changing the hardware or hardware.

次に、第4図aに示すような線分パターンの作
成手順を説明する。線分パターンは3xnの配列で
表わされる。第2添字は線分パターン上の各点に
対応し、第1添字は各点における進行方向に対応
する。内容は、各点において進行方向が決まつた
時に、次の点を示すポインタ、またはエンドマー
クENDである。従つて線分パターンは、直線で
あるという条件のもとに各点において許される進
行方向を記入したスロツトの集合である。
Next, a procedure for creating a line segment pattern as shown in FIG. 4a will be explained. The line segment pattern is represented by a 3xn array. The second subscript corresponds to each point on the line segment pattern, and the first subscript corresponds to the direction of movement at each point. The content is a pointer or end mark END that indicates the next point when the direction of travel is determined at each point. Therefore, a line segment pattern is a set of slots in which the permissible traveling directions at each point are written on the condition that the line is a straight line.

線分パターンを作成するには、線分パターン上
の各点において、3つの進行方向に従つて、新し
い点を追加し、これを加えた点列が直線か否かを
判定する。直線でなければエンドマークを、直線
であれば追加した新しい点に相当する新しいスロ
ツトを作り、その番号をポインタとして書込み、
新しい点について同様の処理を繰り返す。以上を
線分の長さが許容値に達するまで続ける。
To create a line segment pattern, new points are added at each point on the line segment pattern according to the three directions of movement, and it is determined whether the added point sequence is a straight line. If it is not a straight line, create an end mark, if it is a straight line, create a new slot corresponding to the new point added, write that number as a pointer,
Repeat the same process for the new point. Continue the above steps until the line segment length reaches the allowable value.

この基本的手順は、状態−空間探索法における
縦形法として知られている方法を用いることがで
きる(この方法については、例えば、昭和48年4
月15日コロナ社発行の「人工知能」の53〜56頁に
記述されている。)以上が線分パターン作成の基
本的な考え方である。以下第6図を用いて、処理
の流れを追つて説明する。
For this basic procedure, a method known as the vertical method in the state-space search method can be used.
It is described on pages 53-56 of ``Artificial Intelligence'' published by Corona Publishing on May 15th. ) The above is the basic idea of creating line segment patterns. The flow of processing will be explained below with reference to FIG.

線分パターンを配列Tで表わす。線分パターン
がどこまで使用されているかを示すカウンタをC
とする。また、軸対称パターンの圧縮のために、
点列がすでに右か左に折れたか、直進のみを続け
ているかをオン/オフで示すフラグを設け、最初
に折れる方向を片方に制限することにより、軸対
称パターンを片方だけしか作らず、データを半分
に圧縮する。
The line segment pattern is represented by an array T. C is the counter that shows how far the line segment pattern is used.
shall be. Also, for compression of axisymmetric patterns,
By setting an on/off flag to indicate whether the point sequence has already bent to the right or left, or whether it continues to move straight, and by restricting the direction of the initial bend to one direction, an axially symmetrical pattern is created only in one direction, and the data compress in half.

まず、第6図aに示すように、点列とカウンタ
の初期設定をする。点列は、最初の2点を例えば
(0,0)と(1,0)に固定する。これにより、
線分パターンは4つの回転対称パターンのうち1
通りに限定され、データが圧縮される。フラグは
オフにしておく。またカウンタは0クリヤしてお
く。
First, as shown in FIG. 6a, the point sequence and counter are initialized. In the point sequence, the first two points are fixed to, for example, (0,0) and (1,0). This results in
The line segment pattern is one of the four rotationally symmetric patterns.
data is compressed. Leave the flag turned off. Also, clear the counter to 0.

次に、点(1,0)、線分パターン第0スロツ
トルに対し、3つの進行方向(左折,直進,右
折)に点列を延長して直線判定を行なう点列延長
処理(ステツプ602)を行なう。点列延長処理の
中には更に次の点列延長処理が含まれており、許
容長さに達するまで次々に延長が繰り返される。
点列延長処理の詳細を第6図bに従つて説明す
る。なお、この第6図bは第6図aのステツプ
602のサブルーチンを示す図である。
Next, a point sequence extension process (step 602) is performed for the point (1, 0) and the 0th throttle of the line segment pattern to extend the point sequence in three directions of travel (left turn, straight ahead, right turn) to determine a straight line. Let's do it. The point sequence extension process further includes the next point sequence extension process, and the extension is repeated one after another until the permissible length is reached.
Details of the point sequence extension process will be explained with reference to FIG. 6b. Note that this Fig. 6b is a step of Fig. 6a.
602 is a diagram showing a subroutine.

まず、第6図bの如く、処理対称となる点をP
で指定する。このポインタPは点列延長処理内部
のローカルな変数で、点列延長処理先頭でのCの
値に固定する(ステツプ611)。Cの値自身は処理
中に変化してしまう。次に、カウンタと点列長を
インクリメントし(ステツプ612,613)進行方向
を左折と仮定して新しい点を追加する。すなわ
ち、ポインタ記入処理(ステツプ614)を行なう。
このポインタ記入処理は第6図cに示すように、
フラグがオンの場合のみポインタ記入処理を行な
い(ステツプ621〜625)、オフならばエンドマー
クENDを記入する(ステツプ627)。これにより、
最初の折点方向を右に限定している。次に進行方
向を直進として、今度はフラグに関係無くポイン
タ記入処理を行なう(ステツプ615)。次に進行方
向を右折とし、新しい点を加え、フラグをオンに
してポインタ記入処理を行なう(ステツプ616)。
即ち、一度でも右折した後はフラグはオンとな
る。
First, as shown in Figure 6b, the point to be processed is set to P
Specify with. This pointer P is a local variable within the point sequence extension process, and is fixed to the value of C at the beginning of the point sequence extension process (step 611). The value of C itself changes during processing. Next, the counter and point sequence length are incremented (steps 612 and 613), and a new point is added assuming that the direction of travel is a left turn. That is, pointer entry processing (step 614) is performed.
This pointer entry process is as shown in Figure 6c.
Pointer entry processing is performed only if the flag is on (steps 621 to 625), and if it is off, an end mark END is entered (step 627). This results in
The first bending point direction is limited to the right. Next, the direction of travel is set to be straight ahead, and pointer entry processing is performed this time, regardless of the flag (step 615). Next, the direction of travel is set to right, a new point is added, the flag is turned on, and pointer entry processing is performed (step 616).
That is, after turning right even once, the flag is turned on.

次に第6図bの各ポインタ記入処理について第
6図cに従つて詳細に説明する。この第6図cは
第6図bのステツプ614,615,616夫々のサブル
ーチンを示す図である。まず、点列延長を行ない
(ステツプ622)、その点列の長さが許容値をこえ
たかを判定する(ステツプ623)。この結果、こえ
ていればエンドマークの記入を行ない(ステツプ
627)、こえていなければ、新しい点を加えた点列
が直線か否かを判定する(ステツプ623)、直線で
なければエンドマークを書込む(ステツプ627)。
判定基準は必要に応じて何でも良い。例えば最小
2乗法により点列の中心線を引き、これから各点
までの距離に最大許容値を設けるなどの方法が用
いられる。直線であつた場合は、カウンタCをイ
ンクリメントして新しいスロツトを作り、このカ
ウンタ値をポインタとして記入し、(ステツプ
625)この新しい点について、第6図bに示した
点列延長処理を行ない、点列の長さをインクリメ
ントする(ステツプ626)。このようにして、第4
図aに示されるような線分パターンが作成され
る。すなわち、ポインタ“0”からカウンタをイ
ンクリメントしてポインタ記入処理を行ない、最
初の折点が左の場合にはエンドマークを記入し、
直進の場合のポインタ記入処理を許容値まで続け
る。
Next, each pointer entry process shown in FIG. 6b will be explained in detail with reference to FIG. 6c. FIG. 6c is a diagram showing the subroutines of steps 614, 615, and 616 in FIG. 6b. First, a point sequence is extended (step 622), and it is determined whether the length of the point sequence exceeds an allowable value (step 623). As a result, if the end mark is exceeded, an end mark is entered (step
627), if not, it is determined whether the point sequence to which the new point has been added is a straight line (step 623), and if it is not a straight line, an end mark is written (step 627).
Any judgment criteria may be used as necessary. For example, a method is used in which the center line of a series of points is drawn using the least squares method and a maximum allowable value is set for the distance from this to each point. If it is a straight line, increment counter C to create a new slot, write this counter value as a pointer, and press (step
625) For this new point, perform the point sequence extension process shown in FIG. 6b, and increment the length of the point sequence (step 626). In this way, the fourth
A line segment pattern as shown in Figure a is created. That is, the counter is incremented from pointer "0" to perform pointer entry processing, and if the first break point is on the left, an end mark is entered,
Continue the pointer entry process for straight-ahead travel up to the allowable value.

その後、その許容値内で右折、さらに左折のポ
インタ記入処理を行なう。
Thereafter, pointer entry processing for a right turn and then a left turn is performed within the allowable value.

こうしてできた線分パターンは、一定の基準の
もとで直線と見なされる点列をすべて含み、なお
かつ同一形状の点列を2重に含むことは無いが、
部分的に見ると第7図a,bに示すように同一形
状の部分CとDがある。この同一形状の部分が線
分の終点を含む時、その部分に相当する点列デー
タは、等価なデータが2重に存在する事になり、
どれか1つで代表して他を消す事によりデータを
圧縮できる。
The line segment pattern created in this way includes all point sequences that are considered to be straight lines under certain standards, and does not include double point sequences of the same shape.
When viewed partially, there are portions C and D of the same shape as shown in FIGS. 7a and 7b. When this same-shaped part includes the end point of the line segment, the point sequence data corresponding to that part will have double equivalent data,
Data can be compressed by using one as a representative and erasing the others.

第8図を用いてその手順を説明する。消去され
るべき部分は必ず線分終点、即ち、3方向ともエ
ンドマークの入つたスロツトを含むから、ここか
ら遡つて不要部分を消して行く。
The procedure will be explained using FIG. Since the portion to be erased always includes the end point of the line segment, that is, the slot containing the end mark in all three directions, the unnecessary portions are erased going backwards from this point.

まず、第8図aに示すように、線分パターン配
列上をスキヤンして、終点を探し、最初の1点I
を残して他のすべてに消去マークを書込む(ステ
ツプ801)。次に、線分パターン配列上をスキヤン
して、Iを含む点は1個を残してすべて消去する
点列統合処理を行なう(ステツプ802)。
First, as shown in Figure 8a, scan the line segment pattern array to find the end point, and select the first point I
, and write erasure marks on all others (step 801). Next, the line segment pattern array is scanned and a point sequence integration process is performed in which all but one point containing I is deleted (step 802).

点列統合処理について第8図bを用いて詳細に
説明する。まず探策対象とするポインタJを指定
する。そして次の探策対象Iをクリヤする(ステ
ツプ811)。次に、線分パターン上を走査し、Jを
含む点を探し、最初の点Iを除きすべて消去マー
クを書込む点列消去処理を行なう(ステツプ
812)。次に、点Iがもし存在したならば(ステツ
プ813)、点Iについて同様の点列統合処理を行な
う(ステツプ814)。
The point sequence integration process will be explained in detail using FIG. 8b. First, pointer J to be explored is specified. Then, the next exploration target I is cleared (step 811). Next, the line segment pattern is scanned, a point including J is searched for, and an erase mark is written on all points except the first point I (step
812). Next, if point I exists (step 813), a similar point sequence integration process is performed for point I (step 814).

最後に、消去マークの記入されたスロツトをす
べて消して、データをパツクして、終了する(ス
テツプ803)。
Finally, all slots marked with erasure marks are erased, the data is packed, and the process ends (step 803).

以上の処理を施すことで、線分パターンの最初
の折れ点の方向を右に限定し、実際の点列と照合
する際は、その点列の最初の折点が左の場合は、
以後の進行方向を逆転することにより、線分パタ
ーンメモリ115を半分に圧縮することができ
る。
By performing the above processing, the direction of the first breaking point of the line segment pattern is limited to the right, and when comparing with the actual point sequence, if the first breaking point of the point sequence is on the left,
By reversing the subsequent direction of movement, the line segment pattern memory 115 can be compressed in half.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明によれば、画像処理
装置における多角形近似処理の利点をいかしつ
つ、要求されるメモリサイズを大幅に縮小し、小
型、経済化をはかることができる。
As described above, according to the present invention, while taking advantage of polygon approximation processing in an image processing device, the required memory size can be significantly reduced, and the image processing device can be made smaller and more economical.

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

第1図は本発明で使用する画像処理装置の1実
施例を示すブロツク図、第2図は多角形近似処理
における輪郭線の追跡方法を説明するための図、
第3図は領域輪郭線の例を示す図、第4図は線分
パターンの表現形式と多角形近似の例を示す図、
第5図は多角形近似の手順を示すフローチヤー
ト、第6図は線分パターン作成処理のフローチヤ
ート、第7図は共通部分を持つ線分パターンの例
を示す図、第8図は線分パターンの共通部分を取
り除くデータ圧縮処理のフローチヤートである。 101……入力制御部、102……画像メモ
リ、103……前処理部、104……領域情報メ
モリ、105……輪郭抽出部、106……輪郭メ
モリ、107……線分化処理部、108……線分
化情報メモリ、109……辞書パターンメモリ、
110……領域特徴抽出部、111……領域特徴
メモリ、112……共通領域抽出部、113……
共通領域メモリ、114……認識処理部、100
……制御部、115……線分パターンメモリ。
FIG. 1 is a block diagram showing one embodiment of an image processing device used in the present invention, and FIG. 2 is a diagram for explaining a contour tracing method in polygon approximation processing.
FIG. 3 is a diagram showing an example of a region outline, FIG. 4 is a diagram showing an example of the representation format of a line segment pattern and polygon approximation,
Figure 5 is a flowchart showing the procedure of polygon approximation, Figure 6 is a flowchart of line segment pattern creation processing, Figure 7 is a diagram showing an example of line segment patterns with common parts, and Figure 8 is a line segment diagram. It is a flowchart of data compression processing for removing common parts of patterns. 101...Input control unit, 102...Image memory, 103...Preprocessing unit, 104...Region information memory, 105...Contour extraction unit, 106...Contour memory, 107...Line differentiation processing unit, 108... ...Line differentiation information memory, 109...Dictionary pattern memory,
110...Region feature extraction unit, 111...Region feature memory, 112...Common area extraction unit, 113...
Common area memory, 114... Recognition processing unit, 100
...Control unit, 115...Line segment pattern memory.

Claims (1)

【特許請求の範囲】[Claims] 1 予め作成しておいた線分パターンを利用して
入力画像の多角形近似を行なう線分化処理に用い
られる各種の線分パターンを記憶しておく線分化
パターン辞書において、前記記憶しておく線分パ
ターンは、軸対称な線分パターンについては、い
ずれか一方に限定して線分パターンを格納してあ
り、画像の輪郭点列と線分パターンとを照合する
際、その点列の最初の折れ点の方向が逆の場合に
は、以後の進行方向を逆転して前記格納された線
分パターンと照合できることを特徴とする線分化
パターン辞書。
1. In a line segmentation pattern dictionary that stores various line segment patterns used in line segmentation processing that performs polygonal approximation of an input image using line segment patterns that have been created in advance, For axially symmetrical line segment patterns, the line segment pattern is stored only in one of the line segment patterns, and when matching the contour point sequence of the image with the line segment pattern, the first point sequence of the A line segmentation pattern dictionary characterized in that when the direction of a bending point is reversed, the subsequent direction of movement can be reversed and compared with the stored line segment pattern.
JP59194620A 1984-09-19 1984-09-19 Line differentiation pattern dictionary Granted JPS6174076A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59194620A JPS6174076A (en) 1984-09-19 1984-09-19 Line differentiation pattern dictionary

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59194620A JPS6174076A (en) 1984-09-19 1984-09-19 Line differentiation pattern dictionary

Publications (2)

Publication Number Publication Date
JPS6174076A JPS6174076A (en) 1986-04-16
JPH0312347B2 true JPH0312347B2 (en) 1991-02-20

Family

ID=16327556

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59194620A Granted JPS6174076A (en) 1984-09-19 1984-09-19 Line differentiation pattern dictionary

Country Status (1)

Country Link
JP (1) JPS6174076A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3207022B2 (en) * 1992-11-24 2001-09-10 株式会社日立製作所 Light source, illumination device, and liquid crystal projection display device for projection display device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS4926637U (en) * 1972-06-11 1974-03-07
JPS59155192U (en) * 1983-04-05 1984-10-18 塚仲織物有限会社 Ruler for character alignment

Also Published As

Publication number Publication date
JPS6174076A (en) 1986-04-16

Similar Documents

Publication Publication Date Title
KR900008555B1 (en) Method and apparatus for for on-line recognizing handwritten patterns
US20020006224A1 (en) Computer automated process for vectorization of raster images
Eikvil et al. Tools for interactive map conversion and vectorization
JPH0312347B2 (en)
JPH0312348B2 (en)
JP3149221B2 (en) Image processing device
JPH0410668B2 (en)
JPH04141783A (en) Device and method for preparing electron beam graphic data
JPH0713835B2 (en) Similar data detection method and apparatus
JP2878194B2 (en) Partial erasure and partial detection method of image data
JPH0613213B2 (en) Block setting method for character image data compression
JP2512800B2 (en) Linear approximation method of line figure input device
JPH0512442A (en) Line image tracking method
KR20030005211A (en) A method for efficient coding of shape descriptor parameters
JP2937098B2 (en) Area detection method and device
US7379571B2 (en) Method of encoding lines
JPH04255080A (en) image input device
JPH04579A (en) Method for extracting feature point of graphic
JPH0418685A (en) Picture processing system
JPH0421911B2 (en)
JP2722962B2 (en) Drawing recognition device
JP2802132B2 (en) Image forming device
JPS59128662A (en) Raster vector converter
JP3037504B2 (en) Image processing method and apparatus
JPH05250469A (en) Image data linearization method

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees