JPH04358290A - Graphic measuring device - Google Patents

Graphic measuring device

Info

Publication number
JPH04358290A
JPH04358290A JP3133028A JP13302891A JPH04358290A JP H04358290 A JPH04358290 A JP H04358290A JP 3133028 A JP3133028 A JP 3133028A JP 13302891 A JP13302891 A JP 13302891A JP H04358290 A JPH04358290 A JP H04358290A
Authority
JP
Japan
Prior art keywords
coordinates
point
coordinate
run
buffer
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
JP3133028A
Other languages
Japanese (ja)
Inventor
Akira Kasano
笠野 章
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP3133028A priority Critical patent/JPH04358290A/en
Publication of JPH04358290A publication Critical patent/JPH04358290A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To improve the graphic measuring accuracy by decreasing the number of subject points when the absolute maximum length or the enveloping length of a graphic is measured in order to increase the measuring speed and furthermore obviating the rotation of the graphic in regard of the absolute maximum length of the graphic. CONSTITUTION:A run coordinate measuring device 2 obtains the coordinates of both start and end points for each run of a graphic to be measured which is stored in an image memory 1. A feature point extracting part 41 (consisting mainly of a CPU 4) extracts the coordinates of the start and end points forming a projecting part in the subject graphic cut of the coordinates of the start and end points obtained by the device 2 as the coordinates of a feature point in accordance with the value of a (z) component of the outer product of a vector. Then the absolute maximum length or the enveloping length of the subject graphic are obtained based on the coordinates of the extracted feature point.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】この発明は、ディジタル化された
図形の絶対最大長、包絡周囲長を求めるのに好適な図形
計測装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a figure measuring device suitable for determining the absolute maximum length and envelope circumference of a digitized figure.

【0002】0002

【従来の技術】従来から、ディジタル化された図形、例
えば2値図形の絶対最大長、包絡周囲長を求めるための
図形計測装置が知られている。ここで、図形の絶対最大
長とは、図9(a)に示すように、その図形の持つベク
トルで最大のものをいう。また図形の包絡周囲長とは、
図9(b)に示すように、その図形に対する包絡線の長
さをいう。
2. Description of the Related Art Conventionally, a figure measuring device for determining the absolute maximum length and envelope circumference of a digitized figure, such as a binary figure, has been known. Here, the absolute maximum length of a figure refers to the largest vector that the figure has, as shown in FIG. 9(a). Also, the envelope perimeter of a figure is
As shown in FIG. 9(b), it refers to the length of the envelope for the figure.

【0003】従来、この種の図形計測装置で例えば図形
の絶対最大長を求めるには、まず計測対象図形(2値図
形)を一定の角度で回転させながら、回転図形とその外
接矩形との接点を求め、そのうちの2点間の距離を求め
る。そして、求めた全ての値の中で最大のものを絶対最
大長とする。
Conventionally, in order to find, for example, the absolute maximum length of a figure using this type of figure measuring device, first, while rotating the figure to be measured (binary figure) at a constant angle, the points of contact between the rotated figure and its circumscribed rectangle are measured. Find the distance between the two points. Then, the largest value among all the values found is set as the absolute maximum length.

【0004】しかし、この方式では、対象図形を回転さ
せるので図形が変形してしまい、正確な接点を求めるこ
とができないという問題があった。また、一定の角度で
回転させるので、的確な接点が求まる角度を落としてし
まうこともあった。更に、対象図形を回転させながら計
測するために処理速度が遅いという問題もあった。
However, this method has the problem that since the target figure is rotated, the figure is deformed and it is not possible to find accurate points of contact. Furthermore, since the rotation is made at a fixed angle, the angle at which an accurate contact point can be found may be lowered. Furthermore, there is a problem that the processing speed is slow because the measurement is performed while rotating the target figure.

【0005】一方、従来の図形計測装置で図形の包絡周
囲長を求めるには、計測対象図形の各点から一定の角度
で線を引き、その線が包絡線となる点(包絡点)を見つ
けていく方式がとられていたしかし、この方式では、対
象図形の各点から全ての点を対象として包絡点を求めて
いくために、測定時間がかかるという問題があった。
On the other hand, in order to find the envelope perimeter of a figure using a conventional figure measuring device, draw a line at a fixed angle from each point of the figure to be measured, and find the point where the line becomes the envelope (envelope point). However, this method had a problem in that it took a long time to measure because the envelope points were determined from each point of the target figure to all points.

【0006】[0006]

【発明が解決しようとする課題】上記したように従来の
図形計測装置は、図形の絶対最大長を求めるのに、対象
図形を一定の角度で回転させていたために、計測精度が
低く、また処理速度も遅いという問題があった。
[Problems to be Solved by the Invention] As mentioned above, conventional figure measuring devices have low measurement accuracy because they rotate the target figure at a fixed angle to determine the absolute maximum length of the figure. There was also the problem of slow speed.

【0007】また従来の図形計測装置は、図形の包絡周
囲長を求めるのに、対象図形の各点から全ての点を対象
として包絡点を求める方式をとっていたため、計測時間
がかかるという問題があった。
[0007]Furthermore, the conventional figure measuring device uses a method of calculating the envelope point from each point of the target figure to all the points in order to find the envelope perimeter of the figure, so there is a problem that measurement time is required. there were.

【0008】この発明は上記事情に鑑みてなされたもの
でその目的は、図形の絶対最大長を求めるときの対象と
なる点を図形を回転させずに得ると共に、その数を減ら
すことができ、もって正確な絶対最大長が高速に求めら
れる図形計測装置を提供することにある。
The present invention has been made in view of the above-mentioned circumstances, and its purpose is to obtain points to be targeted when determining the absolute maximum length of a figure without rotating the figure, and to reduce the number of points. The object of the present invention is to provide a graphic measuring device that can quickly determine an accurate absolute maximum length.

【0009】この発明の他の目的は、図形の包絡点を求
めるときの対象となる点(特徴点)を減らすことができ
、もって図形の包絡周囲長が高速に求められる図形計測
装置を提供することにある。
Another object of the present invention is to provide a figure measuring device that can reduce the number of points (feature points) to be targeted when determining the envelope points of a figure, thereby quickly determining the envelope perimeter of the figure. There is a particular thing.

【0010】0010

【課題を解決するための手段】この発明は、図1に示す
ように、画像メモリ1に記憶されている計測対象図形の
各ラン毎の開始点並びに終了点の座標を順に求めるラン
座標計測装置(ラン座標計測手段)2と、このラン座標
計測装置2によって求められた各ラン毎の開始点並びに
終了点の座標の中から、計測対象図形上で凸部を形成す
る開始点並びに終了点の座標を特徴点の座標として抽出
する特徴点抽出部(特徴点抽出手段)41とを設け、こ
の特徴点抽出部41によって抽出された特徴点の座標を
もとに計測対象図形の絶対最大長、或いは包絡周囲長を
求めるようにしたことを特徴とするものである。
[Means for Solving the Problems] As shown in FIG. 1, the present invention provides a run coordinate measuring device for sequentially determining the coordinates of the start point and end point of each run of a figure to be measured stored in an image memory 1. (Run coordinate measuring means) 2 and from the coordinates of the starting point and ending point for each run obtained by this run coordinate measuring device 2, the starting point and ending point that form a convex portion on the figure to be measured are determined. A feature point extraction unit (feature point extraction means) 41 is provided to extract the coordinates as the coordinates of the feature point, and based on the coordinates of the feature point extracted by the feature point extraction unit 41, the absolute maximum length of the figure to be measured, Alternatively, the method is characterized in that the envelope perimeter is determined.

【0011】また、この発明は、特徴点抽出部41によ
って抽出された開始点,終了点の座標を記憶するための
開始座標バッファ(第1のバッファ)31,終了座標バ
ッファ(第2のバッファ)32を更に備え、ラン座標計
測装置2によって1つのランの開始点並びに終了点の座
標が求められた場合に、この求められた開始点,終了点
が加わることによって凸部を形成する座標以外を上記開
始座標バッファ31,終了座標バッファ32から削除し
て、求められた開始点,終了点の座標を開始座標バッフ
ァ31,終了座標バッファ32に残されている開始点座
標列,終了点座標列の最後に記憶するようにしたことも
特徴とする。
The present invention also provides a start coordinate buffer (first buffer) 31 and an end coordinate buffer (second buffer) for storing the coordinates of the start point and end point extracted by the feature point extractor 41. 32, when the coordinates of the start point and end point of one run are determined by the run coordinate measuring device 2, the coordinates other than those forming the convex portion are calculated by adding the determined start point and end point. The coordinates of the obtained start point and end point are deleted from the start coordinate buffer 31 and end coordinate buffer 32, and the start point coordinate string and end point coordinate string remaining in the start coordinate buffer 31 and end coordinate buffer 32 are Another feature is that it is memorized at the end.

【0012】0012

【作用】上記の構成において、画像メモリ1に記憶され
ている例えば図4(a)に示すような図形の計測(絶対
最大長計測、包絡周囲長計測)を行う際には、その図形
(の画像データ)を画像メモリ1からラン座標計測装置
2に転送する。ラン座標計測装置2は、転送されてきた
図形の画像データをもとに、例えば図4(b)に示すよ
うに図形上部から下方に、各y座標毎のラン座標(図形
左端点即ち開始点の座標、および図形右端点即ち終了点
の座標)を求め、主としてCPU4によって実現される
特徴点抽出部41に送る。
[Operation] In the above configuration, when measuring a figure (absolute maximum length measurement, envelope perimeter measurement) stored in the image memory 1, for example, as shown in FIG. image data) is transferred from the image memory 1 to the run coordinate measuring device 2. Based on the transferred image data of the figure, the run coordinate measuring device 2 measures the run coordinates (the left end point of the figure, that is, the starting point) for each y-coordinate downward from the top of the figure, for example, as shown in FIG. 4(b). and the coordinates of the right end point of the figure, that is, the coordinates of the end point), and send them to the feature point extraction unit 41 mainly realized by the CPU 4.

【0013】(CPU4内の)特徴点抽出部41は、送
られた各ラン座標の開始点,終了点の座標の中から、計
測対象図形上で凸部を形成する開始点,終了点の座標だ
けを特徴点の座標として抽出する。この特徴点の座標は
、開始点については開始座標バッファ31の先頭アドレ
スから順に、終了点については終了座標バッファ32の
先頭アドレスから順に、それぞれ格納される。
The feature point extraction unit 41 (within the CPU 4) extracts the coordinates of the start point and end point forming a convex portion on the figure to be measured from among the coordinates of the start point and end point of each run coordinate sent. Extract only the coordinates of feature points. The coordinates of the feature points are stored in order from the start address of the start coordinate buffer 31 for the start point and in order from the start address of the end coordinate buffer 32 for the end point.

【0014】ここで、特徴点抽出部41による処理は、
開始点,終了点のそれぞれについてほぼ同様であるため
、ここでは開始点についての特徴点抽出処理を中心に、
詳細な作用を説明する。なお、必要であれば、開始点(
開始座標)を終了点(終了座標)に、開始座標バッファ
31を終了座標バッファ32に置換えられたい。
Here, the processing by the feature point extraction unit 41 is as follows:
Since the start point and end point are almost the same, here we will focus on the feature point extraction process for the start point.
Detailed operation will be explained. Note that if necessary, the starting point (
Please replace the start coordinate buffer 31 with the end coordinate buffer 32 and the end point (start coordinate) with the end point (end coordinate).

【0015】まず特徴点抽出部41が特徴点抽出処理状
態にあり、ラン座標計測装置2によって求められたある
ランの開始点の座標(開始座標)を入力したものとする
。この入力開始座標をPi (Xi ,Yi )とする
。また、このときの開始座標バッファ31(開始座標配
列)内には、先頭の開始点からPi の直前の開始点ま
でのうち、それまでに特徴点として抽出された開始点の
座標(特徴点座標)が、y座標の小さい順に格納されて
いる。この開始座標バッファ31の状態を、計測対象図
形に対応させて図6に示す。図6において、開始座標バ
ッファ31(配列)内の先頭からm+1番目(バッファ
アドレスmの位置)の特徴点座標Pm (Xm ,Ym
 )を、配列内の特徴点座標の中でx座標値が最小(終
了座標の特徴点抽出処理では最大)である点とする。こ
のPm の配列内の位置は、特定のポインタであるMi
nP34によって示される。
First, it is assumed that the feature point extraction section 41 is in a state of feature point extraction processing, and the coordinates (start coordinates) of the starting point of a certain run determined by the run coordinate measuring device 2 are input. Let this input start coordinate be Pi (Xi, Yi). Also, in the starting coordinate buffer 31 (starting coordinate array) at this time, the coordinates (minutiae point coordinates) of the starting points extracted as feature points from the first starting point to the starting point immediately before Pi are stored. ) are stored in order of decreasing y-coordinate. The state of this start coordinate buffer 31 is shown in FIG. 6 in correspondence with the figure to be measured. In FIG. 6, feature point coordinates Pm (Xm, Ym
) is the point whose x-coordinate value is the minimum (maximum in the feature point extraction process of the end coordinate) among the feature point coordinates in the array. This position in the array of Pm is a specific pointer Mi
Indicated by nP34.

【0016】さて特徴点抽出部41は、開始座標Pi 
(Xi ,Yi )を入力すると、Xi <Xm (終
了座標の特徴点抽出処理ではXi ≧Xm )の場合に
は、開始座標バッファ31内の2番目(バッファアドレ
ス「1」の位置)の開始座標P1 (X1 ,Y1 )
から順に、Xi ≧Xm (終了座標の特徴点抽出処理
ではXi <Xm )の場合には、開始座標バッファ3
1内のm+2番目(バッファアドレス「m+1」の位置
)の開始座標Pm+1 (Xm+1 ,Ym+1 )か
ら順に、その座標(対象座標)と入力開始座標Pi と
の位置関係に関する以下の検索を行う。
Now, the feature point extraction unit 41 extracts the starting coordinates Pi
When (Xi, Yi) is input, if Xi < Xm (Xi ≥ P1 (X1, Y1)
In order from
Starting from the m+2 start coordinates Pm+1 (Xm+1, Ym+1) in 1 (position of buffer address "m+1"), the following search regarding the positional relationship between the coordinates (target coordinates) and the input start coordinates Pi is performed.

【0017】即ち特徴点抽出部41は、図7に示すよう
に、検索の対象座標(開始座標)をPn (Xn ,Y
n )、その1つ前の配列の座標をPn−1 (Xn−
1 ,Yn−1 )とすると、nの値を1またはm+1
から順にインクリメントして対象座標を切替え、(1)
あるnの値のときのPn−1 とPn を結ぶ直線とP
n とPi を結ぶ直線とで形成される図形部分(対象
図形を含む部分)が凸でないこと、(2)Pn が配列
の最後(開始座標バッファ31内の特徴点座標列の最後
)であること(この位置は、特定のポインタであるEP
33によって示される)、のいずれかの条件を満たすこ
とを検出したとき、図8に示すように開始座標バッファ
31のデータ更新を行う。
That is, as shown in FIG. 7, the feature point extraction unit 41 sets the search target coordinates (start coordinates) to
n ), and the coordinates of the previous array are Pn-1 (Xn-
1, Yn-1), then the value of n is 1 or m+1
Switch the target coordinates by incrementing from (1)
The straight line connecting Pn-1 and Pn at a certain value of n and P
The figure portion formed by the straight line connecting n and Pi (the part containing the target figure) is not convex; (2) Pn is the last of the array (the last of the feature point coordinate string in the start coordinate buffer 31) (This position is a specific pointer
33), the data in the start coordinate buffer 31 is updated as shown in FIG.

【0018】以上の検索を、全ての入力開始座標につい
て繰返し行い、同様の検索を全ての入力終了座標につい
ても繰返し行い、その際の開始座標バッファ31および
終了座標バッファ32内の特徴点座標を合せたものが全
特徴点座標となる。そして図形の絶対最大長計測の場合
であれば、それらの全特徴点の各2点間の距離を求めて
、その中の最大長のものを絶対最大長とする。また、包
絡周囲長計測の場合であれば、各特徴点間の距離を、例
えば図形を右回りに求めて、その合計の値を包絡周囲長
とする。
The above search is repeated for all input start coordinates, and the same search is repeated for all input end coordinates, and the feature point coordinates in the start coordinate buffer 31 and end coordinate buffer 32 are combined. The coordinates of all feature points are the coordinates of all feature points. In the case of measuring the absolute maximum length of a figure, the distance between each two of all the feature points is determined, and the maximum length among them is determined as the absolute maximum length. In addition, in the case of envelope perimeter measurement, the distance between each feature point is determined, for example, clockwise around the figure, and the total value is set as the envelope perimeter.

【0019】[0019]

【実施例】図1はこの発明の一実施例に係る図形計測装
置の構成を示すブロック構成図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram showing the configuration of a graphic measuring device according to an embodiment of the present invention.

【0020】図1において、1は計測の対象となる例え
ば図形の画像データ(2値図形データ)を格納するため
の画像メモリ、2はラン座標計測装置である。ラン座標
計測装置2は、後述するCPU4の指示に従い、画像メ
モリ1に格納されている計測対象図形の画像データをも
とに、同図形の各ラン(ここでは各y座標)毎の開始点
並びに終了点の座標(開始座標、終了座標)を求めるよ
うになっている。
In FIG. 1, reference numeral 1 denotes an image memory for storing image data (binary figure data) of, for example, figures to be measured, and 2 denotes a run coordinate measuring device. The run coordinate measuring device 2 calculates the starting point and each run (each y coordinate in this case) of the same figure based on the image data of the figure to be measured stored in the image memory 1 according to instructions from the CPU 4, which will be described later. The coordinates of the ending point (starting coordinates, ending coordinates) are calculated.

【0021】3は図形の絶対最大長、包絡周囲長の計測
に必要な特徴点を抽出するためのプログラム(特徴点抽
出プログラム)を始めとする各種プログラム、データ等
の格納領域、各種作業領域を提供する主メモリである。
3 is a storage area for various programs including a program for extracting feature points necessary for measuring the absolute maximum length and envelope perimeter (feature point extraction program), data, etc., and various work areas. This is the main memory provided.

【0022】主メモリ3には、開始座標バッファ31お
よび終了座標バッファ32が置かれる。開始座標バッフ
ァ31は、ラン座標計測装置2によって求められた各ラ
ン毎の開始(スタート)座標のうちの絶対最大長または
包絡周囲長計測に必要な座標を、特徴点座標として入力
順に格納するのに用いられる。同様に終了座標バッファ
32は、ラン座標計測装置2によって求められた各ラン
毎の終了(エンド)座標のうちの絶対最大長または包絡
周囲長計測に必要な座標を、特徴点座標として入力順に
格納するのに用いられる。
In the main memory 3, a start coordinate buffer 31 and an end coordinate buffer 32 are placed. The start coordinate buffer 31 stores coordinates necessary for measuring the absolute maximum length or envelope perimeter of the start coordinates for each run obtained by the run coordinate measuring device 2 as feature point coordinates in the input order. used for. Similarly, the end coordinate buffer 32 stores the absolute maximum length or the coordinates necessary for measuring the envelope perimeter among the end coordinates for each run determined by the run coordinate measuring device 2 as feature point coordinates in the order of input. used to do.

【0023】なお、開始座標バッファ31と終了座標バ
ッファ32の2つを設けるのは、ラン座標計測装置2に
よって計測される対象図形についての各ラン毎の開始点
並びに終了点の座標の数は同数でも、特徴点として格納
される座標の数は等しいとは限らないためである。
Note that the reason why the two start coordinate buffers 31 and the end coordinate buffers 32 are provided is that the number of coordinates of the start point and end point of each run of the object figure measured by the run coordinate measuring device 2 is the same. However, this is because the number of coordinates stored as feature points is not necessarily equal.

【0024】主メモリ3にはまた、開始座標バッファ3
1に格納されている開始座標列のうちの最後尾の座標の
格納先を指定するためのポインタ(以下、EPと称する
)、同じくラン方向(ここではx方向)座標が最小の座
標の格納先を指定するためのポインタ(以下、MinP
と称する)34、および開始座標バッファ31内を検索
する際のバッファアドレスを指定するためのポインタ(
以下、CPと称する)35が置かれる。
The main memory 3 also includes a starting coordinate buffer 3.
A pointer (hereinafter referred to as EP) for specifying the storage location of the last coordinate of the start coordinate string stored in 1, and the storage location of the coordinate with the minimum run direction (here x direction) coordinate. A pointer for specifying (hereinafter referred to as MinP
) 34, and a pointer (referred to as
(hereinafter referred to as CP) 35 is placed.

【0025】なお、主メモリ3には、終了座標バッファ
32に関しても、上記のEP33、MinP34、CP
35と同様のポインタ、即ち終了座標バッファ32に格
納されている終了座標列のうちの最後尾の座標の格納先
を指定するためのポインタ(EP)、同じくラン方向(
x方向)座標が最大の座標の格納先を指定するためのポ
インタ(MaxP)、および終了座標バッファ32内を
検索する際のバッファアドレスを指定するためのポイン
タ(CP)が置かれているが、図1では省略してある。
[0025] The main memory 3 also contains the above-mentioned EP33, MinP34, CP
A pointer similar to 35, that is, a pointer (EP) for specifying the storage destination of the last coordinate of the end coordinate string stored in the end coordinate buffer 32;
A pointer (MaxP) for specifying the storage location of the coordinate with the largest coordinate (in the x direction) and a pointer (CP) for specifying the buffer address when searching within the end coordinate buffer 32 are placed. It is omitted in FIG.

【0026】4は装置の中枢をなすCPUである。CP
U4は、主メモリ3に格納されている特徴点抽出プログ
ラムを実行することにより実現される機能ブロック(以
下、特徴点抽出部と称する)41を有する。
[0026] 4 is a CPU that forms the core of the device. C.P.
U4 includes a functional block (hereinafter referred to as a feature point extraction unit) 41 that is realized by executing a feature point extraction program stored in the main memory 3.

【0027】5は画像データの転送に供される画像バス
、6はCPU4による装置内各部の制御等に供される制
御バスである。画像バス5には、画像メモリ1およびラ
ン座標計測装置2が接続されており、制御バス6には、
CPU4、画像メモリ1およびラン座標計測装置2が接
続されている。なお、図1では、画像メモリ1に記憶さ
れる画像(画像データ)を入力するための画像入力装置
などは省略されている。
Reference numeral 5 represents an image bus used for transferring image data, and 6 represents a control bus used for controlling various parts within the apparatus by the CPU 4. An image memory 1 and a run coordinate measuring device 2 are connected to the image bus 5, and a control bus 6 includes:
A CPU 4, an image memory 1, and a run coordinate measuring device 2 are connected. Note that in FIG. 1, an image input device for inputting images (image data) stored in the image memory 1 and the like are omitted.

【0028】次に、図1に示す図形計測装置の動作を、
図形の絶対最大長計測を例に、図2並びに図3のフロー
チャートを適宜参照して説明する。まず、画像メモリ1
に、図4(a)に示す計測対象2値図形の画像データが
格納されているものとする。CPU4(と特徴点抽出プ
ログラムとによって実現される特徴点抽出部41)は制
御バス6を介して画像メモリ1、ラン座標計測装置2を
制御することで、絶対最大長計測の対象とする図形の画
像データを画像メモリ1からラン座標計測装置2に画像
バス5を通して転送させる。
Next, the operation of the figure measuring device shown in FIG.
Taking the measurement of the absolute maximum length of a figure as an example, a description will be given with appropriate reference to the flowcharts of FIGS. 2 and 3. First, image memory 1
It is assumed that the image data of the binary figure to be measured shown in FIG. 4(a) is stored. The CPU 4 (and the feature point extraction unit 41 realized by the feature point extraction program) controls the image memory 1 and the run coordinate measuring device 2 via the control bus 6 to determine the shape of the figure to be measured for the absolute maximum length. Image data is transferred from an image memory 1 to a run coordinate measuring device 2 via an image bus 5.

【0029】ラン座標計測装置2は、画像メモリ1から
転送されてきた画像データをもとに、図4(b)におい
て黒丸と白丸で示すように、各スキャンライン(各y座
標毎のライン)のラン座標(そのライン上の図形左端点
、即ち開始点の座標と、図形右端点、即ち終了点の座標
との対)を、先頭スキャンライン(先頭ラン)から順に
取得する。
The run coordinate measuring device 2 calculates each scan line (line for each y-coordinate) based on the image data transferred from the image memory 1, as shown by black circles and white circles in FIG. 4(b). The run coordinates (pair of the coordinates of the left end point of the figure, ie, the start point, and the coordinates of the right end point, ie, the end point of the figure) of the line are acquired in order from the first scan line (the first run).

【0030】ラン座標計測装置2によって取得された各
スキャンラインのラン座標、即ち各ランの開始座標(開
始点座標)と終了座標(終了点座標)との対は、同計測
装置2から制御バス6を介して順次CPU4に転送され
る。
The run coordinates of each scan line acquired by the run coordinate measurement device 2, that is, the pair of start coordinates (start point coordinates) and end coordinates (end point coordinates) of each run are transmitted from the measurement device 2 to the control bus. 6, the data is sequentially transferred to the CPU 4.

【0031】CPU4は、ラン座標計測装置2から転送
された各ランの開始座標と終了座標とを、先頭ランから
順に主メモリ3上の入力バッファ(図示せず)に一時格
納する。
The CPU 4 temporarily stores the start coordinates and end coordinates of each run transferred from the run coordinate measuring device 2 in an input buffer (not shown) on the main memory 3 in order from the first run.

【0032】これによりCPU4(内の特徴点抽出部4
1)は、各ランの開始座標と終了座標から絶対最大長計
測に必要な特徴点の座標を抽出する処理を、開始座標と
終了座標のそれぞれについて別々に実行する。この処理
の手順は、開始座標と終了座標についてほぼ同様である
。そこで本実施例では、各ランの開始座標から特徴点の
座標を抽出する場合の(図2および図3のフローチャー
トで示される)処理を中心に説明し、終了座標について
の特徴点抽出の説明は省略する。
[0032] As a result, the CPU 4 (feature point extraction unit 4
In step 1), the process of extracting the coordinates of feature points required for absolute maximum length measurement from the start and end coordinates of each run is executed separately for each of the start and end coordinates. The procedure of this process is almost the same for the start coordinates and the end coordinates. Therefore, in this embodiment, we will mainly explain the process for extracting the coordinates of feature points from the start coordinates of each run (as shown in the flowcharts of FIGS. 2 and 3), and we will explain the process of extracting feature points with respect to the end coordinates. Omitted.

【0033】なお必要があれば、開始座標から特徴点の
座標を抽出する処理についての以下の説明において、開
始座標を終了座標に、開始座標バッファ31を終了座標
バッファ32に、MinPをMaxPに、それぞれ置換
えられたい。但し、開始座標と終了座標とで処理内容に
相違がある場合には、その都度、その違いを説明する。
If necessary, in the following explanation of the process of extracting the coordinates of a feature point from the start coordinates, start coordinates will be changed to end coordinates, start coordinate buffer 31 will be changed to end coordinate buffer 32, MinP will be changed to MaxP, I want each to be replaced. However, if there is a difference in processing content between the start coordinate and the end coordinate, the difference will be explained each time.

【0034】まずCPU4(内の特徴点抽出部41)は
、開始座標バッファ31の先頭アドレス(先頭バッファ
アドレス)を指す初期値「0」をEP33に設定し、こ
のEP33の指す開始座標バッファ31内領域に、先頭
のラン(1番目のラン)の開始座標を特徴点座標として
書込む(図2ステップS1,S2)。
First, the CPU 4 (feature point extracting unit 41 therein) sets an initial value "0" indicating the start address (start buffer address) of the start coordinate buffer 31 to the EP33, and stores the data in the start coordinate buffer 31 pointed to by this EP33. The start coordinates of the first run (first run) are written into the area as feature point coordinates (steps S1 and S2 in FIG. 2).

【0035】次にCPU4は、EP33の値を+1し、
この+1後のEP33の指す開始座標バッファ31内領
域(ここでは、バッファアドレス「1」)に、2番目の
ランの開始座標を特徴点座標として書込む(図2ステッ
プS3,S4)。
Next, the CPU 4 increments the value of EP33 by 1,
The start coordinates of the second run are written as feature point coordinates in the area within the start coordinate buffer 31 pointed to by the EP 33 after +1 (buffer address "1" here) (steps S3 and S4 in FIG. 2).

【0036】CPU4は、先頭ランと2番目のランの開
始座標を開始座標バッファ31に書込むと、両座標のx
座標値の大小を比較し、x座標値が小さい方(終了座標
の処理では大きい方)の開始座標が格納されている開始
座標バッファ31のバッファアドレス(バッファポイン
タ値)をMinP34に設定する(図2ステップS5,
S6)。このMinP34の指す開始座標バッファ31
に格納されている開始座標をPm (Xm ,Ym )
とする。ここで、添字のmはMinP34の値に一致し
ており、該当開始座標Pm が開始座標バッファ31の
アドレス「m」(m+1番目の領域)に格納されている
こと、即ち開始座標配列内の先頭からm+1番目の座標
であることを示す。
When the CPU 4 writes the start coordinates of the first run and the second run into the start coordinate buffer 31, the x
The magnitude of the coordinate values is compared, and the buffer address (buffer pointer value) of the start coordinate buffer 31 in which the start coordinate with the smaller x coordinate value (the larger one in the end coordinate processing) is stored is set in MinP34 (Fig. 2 steps S5,
S6). Start coordinate buffer 31 pointed to by this MinP34
The starting coordinates stored in Pm (Xm, Ym)
shall be. Here, the subscript m matches the value of MinP34, and the corresponding start coordinate Pm is stored at address "m" (m+1st area) of the start coordinate buffer 31, that is, the beginning of the start coordinate array. This indicates that it is the m+1th coordinate from .

【0037】次にCPU4は、主メモリ3上の入力バッ
ファから次のラン(ここでは3番目のラン)の開始座標
を入力する(図2ステップS7)。この入力した開始座
標をPi (Xi ,Yi )とする。
Next, the CPU 4 inputs the start coordinates of the next run (here, the third run) from the input buffer on the main memory 3 (step S7 in FIG. 2). Let these input starting coordinates be Pi (Xi, Yi).

【0038】続いてCPU4は、入力開始座標Pi (
Xi ,Yi)のx座標Xi と、MinP34の指す
開始座標バッファ31に格納されている開始座標Pm 
(Xm ,Ym )のx座標Xm 、即ちその時点にお
いて開始座標バッファ31に格納されている開始点のx
座標のうちで最も値の小さな(終了座標の処理では最も
値の大きな)座標とを比較し、Xi とXm との大小
を調べる(図2ステップS8,S9)。
Next, the CPU 4 inputs the input start coordinates Pi (
Xi, Yi) and the start coordinate Pm stored in the start coordinate buffer 31 pointed to by MinP34.
The x coordinate Xm of (Xm, Ym), that is, the x of the starting point stored in the starting coordinate buffer 31 at that point
Among the coordinates, the coordinate having the smallest value (the largest value in the end coordinate processing) is compared to check the magnitude of Xi and Xm (steps S8 and S9 in FIG. 2).

【0039】次にCPU4は、ステップS9におけるX
i とXm との大小比較の結果に従う特徴点抽出(の
ための特徴点判別)処理を行う。この処理は、(a)X
i <Xmの場合と、(b)Xi  ≧Xm の場合と
で、以下に述べるように異なる。
Next, the CPU 4 executes X in step S9.
Feature point extraction (feature point discrimination) processing is performed according to the result of comparing the magnitudes of i and Xm. This process consists of (a)
The case where i<Xm and the case where (b) Xi ≧Xm are different as described below.

【0040】(a)Xi <Xm の場合まず、Xi 
<Xm (終了座標の処理ではXi ≧Xm )の場合
には、CPU4は開始座標バッファ31の先頭位置を指
す初期値「0」をCP35に設定し、このCP35の指
す開始座標バッファ31に格納されている開始座標を読
取る(図2ステップS10,S11)。この開始座標を
Pn−1(Xn−1 ,Yn−1 )とする。
(a) When Xi <Xm First, Xi
<Xm (Xi ≧Xm in the end coordinate processing), the CPU 4 sets the initial value "0" indicating the start position of the start coordinate buffer 31 to the CP35, and stores the data in the start coordinate buffer 31 pointed to by this CP35. The starting coordinates are read (steps S10 and S11 in FIG. 2). Let this starting coordinate be Pn-1 (Xn-1, Yn-1).

【0041】続いてCPU4はCP35値を+1し、こ
の+1後のCP35の指す開始座標バッファ31に格納
されている開始座標、即ちPn−1 の次の配列の開始
座標を読取る(図2ステップS12,S13)。この開
始座標をPn (Xn ,Yn )とする。
Next, the CPU 4 increments the value of CP35 by +1 and reads the start coordinate stored in the start coordinate buffer 31 pointed to by CP35 after this +1, that is, the start coordinate of the next array of Pn-1 (step S12 in FIG. 2). , S13). Let this starting coordinate be Pn (Xn, Yn).

【0042】次にCPU4は、Pn−1 ,Pn ,P
i の3点の座標から、Pn 部(線分Pn−1Pn 
と線分Pn Pi とで形成される図形部分)が、図5
(a)に示すように凸部であるか、或いは図5(b)に
示すように凸部でない(凹部である)かを調べる(図2
ステップS14,S15)。ここで、凸部とは線分Pn
−1 Pn と線分PnPi とのなす計測対象図形部
分の角度が180°未満のものをいい、凹部とは線分P
n−1 Pn と線分Pn Pi とのなす図形部分の
角度が180°以下のものをいうものとする。
Next, the CPU 4 selects Pn-1, Pn, P
From the coordinates of the three points of i, Pn part (line segment Pn-1Pn
and the line segment Pn Pi ) is shown in FIG.
Examine whether it is a convex part as shown in (a) or not a convex part (a concave part) as shown in FIG. 5(b) (Fig.
Steps S14, S15). Here, the convex portion is the line segment Pn
-1 The angle of the measurement target figure formed by Pn and line segment PnPi is less than 180°, and a concave portion is defined by line segment P
The angle of the figure portion formed by n-1 Pn and line segment Pn Pi is 180° or less.

【0043】上記の処理は、Pn 部が凸部であれば、
Pn 点は絶対最大長を求めるときの対象となる可能性
のある点、即ち特徴点(の条件を満たしている点)であ
るものとして保存し、凸部でなければ、Pn 点は絶対
最大長を求めるときの対象となる可能性のない点、即ち
特徴点でないものとして、開始座標バッファ31(配列
)から削除するために行われるものである。
[0043] In the above process, if the Pn part is a convex part,
The Pn point is saved as a point that may be a target when calculating the absolute maximum length, that is, a feature point (a point that satisfies the conditions), and if it is not a convex part, the Pn point is the absolute maximum length. This is done in order to delete points from the start coordinate buffer 31 (array) as points that have no possibility of becoming a target when determining , that is, as points that are not feature points.

【0044】さて本実施例においては、Pn 部が凸部
か否か(Pn 点が特徴点であるか否か)の判別は、図
5に示すように、ベクトルPn−1 Pn とベクトル
Pn Pi との外積(点Pn−1 ,Pn ,Pi 
のz座標値は0とする)のz成分の値をもとに行われる
。即ち、上記した開始座標の処理のように対象図形を左
回り(終点座標の処理では右回り)にサーチして各ベク
トルの外積を求める場合には、そのz成分が負(終点座
標の処理では正)であるならば特徴点であり、正または
零(終点座標の処理では負または零)であるならば特徴
点でないものと判別される。
In this embodiment, the determination as to whether or not the Pn portion is a convex portion (whether or not the Pn point is a feature point) is made using the vector Pn-1 Pn and the vector Pn Pi, as shown in FIG. cross product (points Pn-1, Pn, Pi
The z-coordinate value of is assumed to be 0). In other words, when searching the target figure counterclockwise (clockwise in the process of end point coordinates) to find the outer product of each vector, as in the process of the start coordinates described above, the z component is negative (in the process of the end point coordinates, If it is positive), it is determined to be a feature point, and if it is positive or zero (negative or zero in the processing of end point coordinates), it is determined that it is not a feature point.

【0045】CPU4は、ステップS15においてPn
 点が特徴点(Pn 部が凸部)であると判別した場合
には、EP33とCP35とを比較し、その値が一致し
ているか否かを調べる(図2ステップS16,S17)
[0045] In step S15, the CPU 4
If it is determined that the point is a feature point (Pn part is a convex part), compare EP33 and CP35 and check whether the values match (steps S16 and S17 in FIG. 2).
.

【0046】もしEP33とCP35の値が一致してい
なければ、CPU4は、特徴点の判別を行うべき点(の
開始座標)がまだ開始座標バッファ31(配列)内にあ
るものとして、上記ステップS11以降の処理を再度実
行する。これにより、先にPn として扱われた点であ
るPn−1 と、次の配列の点である特徴点判別対象点
Pnと、Pi とから、次のPn が特徴点であるか否
かが上記と同様にして判別される。
If the values of EP33 and CP35 do not match, the CPU 4 assumes that the point (starting coordinates) for which feature point determination is to be performed is still within the starting coordinate buffer 31 (array), and executes the process in step S11 above. Execute the following process again. As a result, it is possible to determine whether or not the next Pn is a feature point from Pn-1, which is the point previously treated as Pn, the feature point discrimination target point Pn, which is the next point in the array, and Pi. It is determined in the same way.

【0047】一方、EP33とCP35の値が一致して
いるならば、CPU4は、開始座標バッファ31(配列
)内の全ての点の開始座標についての特徴点判別処理が
終了し、しかも全て特徴点であったものとして、まずE
P33を+1する(図2ステップS18)。
On the other hand, if the values of EP33 and CP35 match, the CPU 4 completes the feature point discrimination process for the start coordinates of all points in the start coordinate buffer 31 (array), and all of the points are Assuming that E
P33 is increased by +1 (step S18 in FIG. 2).

【0048】そしてCPU4は、この+1後のEP33
の値をMinP34に設定する(図2ステップS19)
。 次にCPU4は、+1後のEP33の指す開始座標バッ
ファ31内領域に、先のステップS7で入力した開始座
標Pi (Xi ,Yi )を特徴点座標として書込む
(図2ステップS20)。即ちCPU4は、それまで開
始座標バッファ31内の開始座標列の最後尾をなしてい
た開始座標の直後に、入力開始座標Pi (Xi ,Y
i )を、その時点でx座標値が最も小さい(終了座標
の処理では最も大きい)特徴点座標として書込む。
[0048] Then, the CPU 4 selects EP33 after this +1.
Set the value of MinP34 (FIG. 2 step S19)
. Next, the CPU 4 writes the start coordinates Pi (Xi, Yi) input in the previous step S7 as feature point coordinates into the area in the start coordinate buffer 31 pointed to by the EP 33 after +1 (step S20 in FIG. 2). That is, the CPU 4 inputs the input start coordinates Pi (Xi, Y
i) is written as the feature point coordinate whose x-coordinate value is the smallest (the largest in the end coordinate processing) at that point.

【0049】これに対し、ステップS15においてPn
 点が特徴点(Pn 部が凸部)でないと判別した場合
には、CPU4は、たとえ特徴点の判別を行うべき点(
の開始座標)がまだ開始座標バッファ31(配列)内に
あるとしても、それらが特徴点となることは有り得ない
ものと判断する。
On the other hand, in step S15, Pn
If the CPU 4 determines that the point is not a feature point (the Pn part is a convex part), the CPU 4 determines that the point is not a feature point (the Pn part is a convex part), even if the point is
Even if the start coordinates (start coordinates of ) are still in the start coordinate buffer 31 (array), it is determined that they are unlikely to become feature points.

【0050】この場合、CPU4はステップS11以降
の特徴点判別処理に戻らず、その際のCP35の値(即
ち、最初に特徴点でないと判別された点の開始座標の開
始座標バッファ31内格納先アドレス)をEP33に設
定する処理を行う(図2ステップS21)。
In this case, the CPU 4 does not return to the feature point determination processing from step S11 onwards, and instead stores the value of CP35 at that time (that is, the storage location in the start coordinate buffer 31 of the start coordinates of the point that is initially determined to be not a feature point). address) to the EP 33 (step S21 in FIG. 2).

【0051】そしてCPU4は、この際のEP33の値
(即ちCP35の値)をMinP34に設定し(図2ス
テップS19)、更にこの際のEP33の指す開始座標
バッファ31内領域に、先のステップS7で入力した開
始座標Pi(Xi ,Yi )を特徴点座標として書込
む(図2ステップS20)。即ちCPU4は、ステップ
S11以降の一連の特徴点判別処理で最初に特徴点でな
いと判別された点の開始座標の開始座標バッファ31内
格納先に、入力開始座標Pi (Xi ,Yi )を、
その時点でx座標値が最も小さく(終了座標の処理では
最も大きく)且つ配列の最後尾に位置する特徴点座標と
して書込む。
Then, the CPU 4 sets the value of EP33 (that is, the value of CP35) at this time to MinP34 (step S19 in FIG. 2), and furthermore sets the value of EP33 at this time (that is, the value of CP35) to MinP34 (step S19 in FIG. The start coordinates Pi (Xi, Yi) inputted in are written as feature point coordinates (step S20 in FIG. 2). That is, the CPU 4 stores the input start coordinates Pi (Xi, Yi) in the start coordinate buffer 31 of the start coordinates of the point that is first determined to be not a feature point in the series of feature point determination processes after step S11.
At that point, the x-coordinate value is written as the smallest (largest in processing end coordinates) and as the feature point coordinate located at the end of the array.

【0052】これにより、それまで開始座標バッファ3
1に特徴点座標として格納されていた開始座標列のうち
、一連の特徴点判別処理で最初に特徴点でないと判別さ
れた点から配列最後尾の点までの開始座標が、開始座標
バッファ31から削除されたことになる。
[0052] As a result, until then, the starting coordinate buffer 3
Among the start coordinate strings stored as feature point coordinates in 1, the start coordinates from the point that was first determined not to be a feature point in a series of feature point discrimination processing to the last point in the array are stored in the start coordinate buffer 31. It will be deleted.

【0053】CPU4は上記ステップS20を実行する
と、主メモリ3上の入力バッファを参照して次のラン(
ラン座標)があるか否かを調べる(図2ステップS22
)。もし、次のランがあるならば、CPU4はステップ
S7に戻ってそのランの開始座標を入力し、前記と同様
にして特徴点抽出処理を行うことにより、計測対象図形
の特徴点を絞り込む。これに対して次のランがないなら
ば、CPU4は一連の特徴点抽出処理を終了する。
After executing step S20, the CPU 4 refers to the input buffer on the main memory 3 and starts the next run (
Check whether there is a run coordinate (step S22 in FIG. 2).
). If there is a next run, the CPU 4 returns to step S7, inputs the start coordinates of that run, and narrows down the feature points of the figure to be measured by performing feature point extraction processing in the same manner as described above. On the other hand, if there is no next run, the CPU 4 ends the series of feature point extraction processing.

【0054】(b)Xi ≧Xm の場合次に、Xi 
≧Xm (終了座標の処理ではXi <Xm )の場合
の特徴点抽出処理について説明する。
(b) When Xi ≧Xm Next, Xi
The feature point extraction process in the case of ≧Xm (Xi <Xm in end coordinate processing) will be described.

【0055】この場合、CPU4はMinP34の値を
CP35に設定する(図3ステップS31)。次に、C
PU4はEP33とCP35とを比較し、その値が一致
しているか否かを調べる(図3ステップS32,S33
)。
In this case, the CPU 4 sets the value of MinP34 to CP35 (step S31 in FIG. 3). Next, C
PU4 compares EP33 and CP35 and checks whether the values match (steps S32 and S33 in FIG. 3).
).

【0056】もしEP33とCP35の値が一致してい
なければ、CPU4は、特徴点の判別を行うべき点(の
開始座標)が開始座標バッファ31(配列)内にあるも
のとして、前記したステップS11〜S15と同様の特
徴点判別処理(図3ステップS34〜S38)を実行す
る。この結果、1回目の特徴点判別処理では、開始座標
バッファ31(配列)内でx座標値が最も小さな点Pm
 をPn−1 とし、次の配列の点を特徴点判別対象点
Pn として、これらPn−1 ,Pn とPi とか
ら、Pnが特徴点であるか否かが判別される。
If the values of EP33 and CP35 do not match, the CPU 4 assumes that the (starting coordinates of) the point for which the feature point is to be determined is within the starting coordinate buffer 31 (array), and executes the step S11 described above. ~A feature point determination process similar to S15 (steps S34 to S38 in FIG. 3) is executed. As a result, in the first feature point discrimination process, the point Pm with the smallest x-coordinate value in the starting coordinate buffer 31 (array)
is set as Pn-1, and the next point in the array is set as a feature point determination target point Pn, and it is determined from these Pn-1, Pn, and Pi whether or not Pn is a feature point.

【0057】ここで、Pn が特徴点(凸部)であると
判別された場合には、ステップS32に戻り、次の配列
の点をPn とする特徴点判別処理が行われる。これに
対し、Pn が特徴点(凸部)でないと判別された場合
には、CPU4は、たとえ特徴点の判別を行うべき点(
の開始座標)がまだ開始座標バッファ31(配列)内に
あるとしても、それらが特徴点となることは有り得ない
ものと判断し、ステップS40に進む。
If it is determined that Pn is a feature point (convex portion), the process returns to step S32, and a feature point discrimination process is performed in which the next array point is set to Pn. On the other hand, if it is determined that Pn is not a feature point (convex), the CPU 4 determines that the point to be determined as a feature point (
Even if the start coordinates (start coordinates of ) are still in the start coordinate buffer 31 (array), it is determined that they are unlikely to become feature points, and the process proceeds to step S40.

【0058】CPU4は、ステップS40において、そ
の際のCP35の値をEP33に設定する処理を行う。 そしてCPU4は、このEP33の指す開始座標バッフ
ァ31内領域に、先のステップS7で入力した開始座標
Pi (Xi ,Yi )を特徴点座標として書込む(
図2ステップS20)。即ちCPU4は、(最初に)特
徴点でないと判別された点の開始座標バッファ31内格
納先に、入力開始座標Pi (Xi ,Yi )を特徴
点座標として書込む。
[0058] In step S40, the CPU 4 performs a process of setting the value of CP35 at that time to EP33. Then, the CPU 4 writes the start coordinates Pi (Xi, Yi) input in the previous step S7 as feature point coordinates into the area within the start coordinate buffer 31 pointed to by this EP33 (
FIG. 2 step S20). That is, the CPU 4 writes the input start coordinates Pi (Xi, Yi) as the feature point coordinates to the storage location in the start coordinate buffer 31 of the point that is (first) determined to be not a feature point.

【0059】これにより、それまで開始座標バッファ3
1に特徴点座標として格納されていた開始座標列のうち
、一連の特徴点判別処理で最初に特徴点でないと判別さ
れた点から配列最後尾の点までの開始座標が、開始座標
バッファ31から削除されたことになる。
[0059] As a result, until then, the starting coordinate buffer 3
Among the start coordinate strings stored as feature point coordinates in 1, the start coordinates from the point that was first determined not to be a feature point in a series of feature point discrimination processing to the last point in the array are stored in the start coordinate buffer 31. It will be deleted.

【0060】一方、上記ステップS33においてEP3
3とCP35の値が一致していることが判別された場合
には、CPU4は、開始座標バッファ31(配列)内に
は特徴点の判別を行うべき点(の開始座標)がないもの
として、或いは配列内のPmの次の点から最後尾の点ま
での各開始座標についての特徴点判別処理が終了し、し
かも全て特徴点であったものとして、まずEP33を+
1する(図3ステップS39)。
On the other hand, in step S33 above, EP3
If it is determined that the values of 3 and CP35 match, the CPU 4 assumes that there is no point (starting coordinates of) for which feature points should be determined in the starting coordinate buffer 31 (array). Alternatively, assuming that the feature point discrimination process for each starting coordinate from the next point to the last point of Pm in the array has been completed, and all of them are feature points, first select EP33 as +
1 (step S39 in FIG. 3).

【0061】そしてCPU4は、この+1後のEP33
の指す開始座標バッファ31内領域に、先のステップS
7で入力した開始座標Pi (Xi ,Yi )を特徴
点座標として書込む(図2ステップS20)。即ちCP
U4は、それまで開始座標バッファ31内の開始座標列
の最後尾をなしていた開始座標の直後に、入力開始座標
Pi(Xi ,Yi )を特徴点座標として書込む。
[0061] Then, the CPU 4 selects EP33 after this +1.
The area in the start coordinate buffer 31 pointed to by the previous step S
The start coordinates Pi (Xi, Yi) input in step 7 are written as feature point coordinates (step S20 in FIG. 2). That is, C.P.
U4 writes the input start coordinates Pi (Xi, Yi) as feature point coordinates immediately after the start coordinates that had been the tail end of the start coordinate string in the start coordinate buffer 31.

【0062】CPU4は上記ステップS20を実行する
と、主メモリ3上の入力バッファを参照して次のラン(
ラン座標)があるか否かを調べ(図2ステップS22)
、もし次のランがあるならば、ステップS7に戻る。こ
れに対し、次のランがないならば、CPU4は上記した
一連の特徴点抽出処理を終了する。
After executing step S20, the CPU 4 refers to the input buffer on the main memory 3 and starts the next run (
check whether there is a run coordinate (step S22 in FIG. 2).
, if there is a next run, the process returns to step S7. On the other hand, if there is no next run, the CPU 4 ends the series of feature point extraction processes described above.

【0063】この一連の特徴点抽出処理の終了時点では
、開始座標バッファ31には、ラン座標計測装置2によ
って計測された各ランの開始点の座標(開始座標)のう
ち、特徴点として抽出された開始点の座標だけが残され
る。以上の特徴点抽出処理は終了座標についても同様に
行われ、その処理の終了時点では、終了座標バッファ3
2には、ラン座標計測装置2によって計測された各ラン
の終了点の座標(終了座標)のうち、特徴点として抽出
された終了点の座標だけが残される。
At the end of this series of feature point extraction processing, the start coordinate buffer 31 contains the coordinates (start coordinates) of the start point of each run measured by the run coordinate measuring device 2 that are extracted as feature points. Only the coordinates of the starting point are left. The above feature point extraction process is similarly performed for the end coordinates, and at the end of the process, the end coordinate buffer 3
2, among the coordinates (end coordinates) of the end point of each run measured by the run coordinate measuring device 2, only the coordinates of the end point extracted as feature points are left.

【0064】CPU4は、開始点および終了点について
の一連の特徴点抽出処理を終了すると、開始座標バッフ
ァ31および終了座標バッファ32に残されている座標
群で示される各特徴点の任意の2点間の距離を求め、そ
の値の最大のものを対象図形の絶対最大長とする。また
、この絶対最大長となる弦に垂直な線を求めることによ
り、対象図形の幅を求めることも可能である。
When the CPU 4 finishes the series of feature point extraction processing for the start point and end point, it extracts any two of the feature points indicated by the coordinate groups left in the start coordinate buffer 31 and the end coordinate buffer 32. Find the distance between them, and take the maximum value as the absolute maximum length of the target figure. It is also possible to find the width of the target figure by finding a line perpendicular to the chord that has the absolute maximum length.

【0065】以上は、図形の絶対最大長計測について説
明したが、図形の包絡周囲長計測も同様にして行うこと
ができる。但し、各ランの開始点および終了点について
の一連の特徴点抽出処理の終了後の動作が異なる。即ち
包絡周囲長計測の場合には、開始座標バッファ31に残
されている座標群で示される各特徴点を順に直線で結ぶ
と共に、終了座標バッファ32に残されている座標群で
示される各特徴点についても順に直線で結ぶ。そして、
開始座標バッファ31および終了座標バッファ32内の
それぞれ先頭の座標で示される特徴点同士、最後尾の座
標で示される特徴点同士をいずれも直線で結び、それら
の直線の長さの総和を包絡周囲長とする。また、この包
絡周囲長の特徴点を利用して包絡面積を求めることも可
能である。
Although the measurement of the absolute maximum length of a figure has been described above, the measurement of the envelope perimeter of a figure can also be performed in the same manner. However, the operations after the series of feature point extraction processes for the start and end points of each run are different. That is, in the case of envelope perimeter measurement, each feature point indicated by the coordinate group left in the start coordinate buffer 31 is connected in turn with a straight line, and each feature point indicated by the coordinate group left in the end coordinate buffer 32 is connected in turn. Connect the points with straight lines in order. and,
The feature points indicated by the first coordinates in the start coordinate buffer 31 and the end coordinate buffer 32, respectively, and the feature points indicated by the last coordinates are connected by straight lines, and the sum of the lengths of these straight lines is calculated as the envelope circumference. be long. Furthermore, it is also possible to obtain the envelope area using the feature points of the envelope perimeter.

【0066】なお、前記実施例では、計測対象図形の全
てのラン座標がラン座標計測装置2によって求められて
から、特徴点抽出部41による特徴点抽出処理が行われ
るものとして説明したが、これに限るものではない。例
えば、ラン座標計測装置2と特徴点抽出部41とを並行
動作させ、ラン座標計測装置2によって1つのラン座標
が求められる毎に、特徴点抽出部41がそのラン座標を
入力して対応する処理を行うことも可能であり、この場
合には処理を一層高速化できる。
In the above embodiment, the description has been made assuming that the feature point extraction process is performed by the feature point extraction section 41 after all run coordinates of the figure to be measured are determined by the run coordinate measuring device 2. It is not limited to. For example, the run coordinate measuring device 2 and the feature point extracting section 41 are operated in parallel, and each time one run coordinate is determined by the run coordinate measuring device 2, the feature point extracting section 41 inputs the run coordinate and responds accordingly. It is also possible to perform processing, and in this case, the processing speed can be further increased.

【0067】また、前記実施例では、1つの画像中に計
測対象図形が1つ存在する場合について説明したが、複
数の図形が存在する場合でも、図形数分の開始座標バッ
ファ31,終了座標バッファ32の対を用意することに
より、各図形毎の計測(絶対最大長計測、包絡周囲長計
測)を同時に実行することが可能である。
Further, in the above embodiment, the case where one figure to be measured exists in one image has been explained, but even when a plurality of figures exist, the start coordinate buffer 31 and the end coordinate buffer for the number of figures are By preparing 32 pairs, it is possible to simultaneously perform measurements for each figure (absolute maximum length measurement, envelope perimeter measurement).

【0068】[0068]

【発明の効果】以上詳述したようにこの発明によれば、
計測対象図形の各ラン毎の開始点並びに終了点の座標を
順に求め、それらの座標の中から、計測対象図形上で凸
部を形成する開始点並びに終了点の座標を特徴点の座標
として抽出し、この抽出された特徴点の座標をもとに、
計測対象図形の絶対最大長または包絡周囲長を求めるよ
うにしたので、絶対最大長または包絡周囲長を求める際
の対象となる点の数を必要最小限に減らすことができ、
絶対最大長または包絡周囲長を高速に計測することがで
きる。
[Effects of the Invention] As detailed above, according to the present invention,
The coordinates of the start point and end point of each run of the figure to be measured are determined in order, and from those coordinates, the coordinates of the start point and end point that form a convex part on the figure to be measured are extracted as the coordinates of the feature point. Then, based on the coordinates of the extracted feature points,
Since the absolute maximum length or envelope perimeter of the figure to be measured is determined, the number of points to be considered when determining the absolute maximum length or envelope perimeter can be reduced to the necessary minimum.
Absolute maximum length or envelope circumference can be measured at high speed.

【0069】また、この発明によれば、絶対最大長の計
測に必要な特徴点を、図形を回転させずに求めることが
できるため、正確な特徴が求まり、したがって絶対最大
長を正確に求めることができる。これにより、幅による
製品の良品検査などに応用することが可能となる。また
、高速に包絡周囲長が求められることから、製品のへこ
み検査などに効率的に応用することもできる。
Further, according to the present invention, since the feature points necessary for measuring the absolute maximum length can be found without rotating the figure, accurate features can be found, and therefore the absolute maximum length can be found accurately. Can be done. This makes it possible to apply it to inspection of non-defective products based on width. Additionally, since the envelope perimeter can be determined at high speed, it can be efficiently applied to inspections of products for dents, etc.

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

【図1】この発明の一実施例に係る図形計測装置の構成
を示すブロック図。
FIG. 1 is a block diagram showing the configuration of a graphic measuring device according to an embodiment of the present invention.

【図2】同実施例における特徴点抽出処理の手順を説明
するためのフローチャートの一部を示す図。
FIG. 2 is a diagram showing a part of a flowchart for explaining the procedure of feature point extraction processing in the embodiment.

【図3】同特徴点抽出処理の手順を説明するためのフロ
ーチャートの残りを示す図。
FIG. 3 is a diagram showing the rest of the flowchart for explaining the procedure of the feature point extraction process.

【図4】計測対象図形のラン座標を説明するための図。FIG. 4 is a diagram for explaining run coordinates of a figure to be measured.

【図5】図形の特徴点(凸部)となる点とならない点を
説明するための図。
FIG. 5 is a diagram for explaining points that are feature points (protrusions) of a figure and points that are not.

【図6】特徴点抽出処理状態における開始座標バッファ
31の内容と計測対象図形との対応関係を示す図。
FIG. 6 is a diagram showing the correspondence between the contents of the start coordinate buffer 31 and the figure to be measured in the state of feature point extraction processing.

【図7】特徴点抽出(検索)処理を説明するための図。FIG. 7 is a diagram for explaining feature point extraction (search) processing.

【図8】特徴点抽出(検索)処理に伴う開始座標バッフ
ァ31内データ更新を説明するための図。
FIG. 8 is a diagram for explaining updating of data in the start coordinate buffer 31 accompanying feature point extraction (search) processing.

【図9】図形の絶対最大長および包絡周囲長を説明する
ための図。
FIG. 9 is a diagram for explaining the absolute maximum length and envelope perimeter of a figure.

【符号の説明】[Explanation of symbols]

1…画像メモリ、2…ラン座標計測装置、3…主メモリ
、4…CPU、5…画像バス、6…制御バス、31…開
始座標バッファ、32…終了座標バッファ、33…EP
(ポインタ)、34…MinP(ポインタ)、35…C
P(ポインタ)、41…特徴点抽出部。
DESCRIPTION OF SYMBOLS 1... Image memory, 2... Run coordinate measuring device, 3... Main memory, 4... CPU, 5... Image bus, 6... Control bus, 31... Start coordinate buffer, 32... End coordinate buffer, 33... EP
(pointer), 34...MinP (pointer), 35...C
P (pointer), 41... Feature point extraction unit.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】  図形の画像データが記憶される画像メ
モリと、この画像メモリに記憶されている画像データを
もとに計測対象とする図形の各ラン毎の開始点並びに終
了点の座標を順に求めるラン座標計測手段と、このラン
座標計測手段によって求められた各ラン毎の開始点並び
に終了点の座標の中から、上記計測対象図形上で凸部を
形成する開始点並びに終了点の座標を特徴点の座標とし
て抽出する特徴点抽出手段と、を具備し、上記特徴点抽
出手段によって抽出された特徴点の座標をもとに、任意
の2特徴点間の距離のうち最大のものを絶対最大長とし
て求めるようにしたことを特徴とする図形計測装置。
Claim 1: An image memory in which image data of a figure is stored, and coordinates of a start point and an end point for each run of a figure to be measured based on the image data stored in this image memory. From the run coordinate measuring means to be sought and the coordinates of the starting point and ending point for each run found by this run coordinate measuring means, the coordinates of the starting point and ending point forming the convex portion on the measurement target figure are determined. feature point extraction means for extracting the coordinates of the feature point, and based on the coordinates of the feature point extracted by the feature point extraction means, the maximum distance between any two feature points is determined in absolute terms. A figure measuring device characterized by determining the maximum length.
【請求項2】  図形の画像データが記憶される画像メ
モリと、この画像メモリに記憶されている画像データを
もとに計測対象とする図形の各ラン毎の開始点並びに終
了点の座標を順に求めるラン座標計測手段と、このラン
座標計測手段によって求められた各ラン毎の開始点並び
に終了点の座標の中から、上記計測対象図形上で凸部を
形成する開始点並びに終了点の座標を特徴点の座標とし
て抽出する特徴点抽出手段と、を具備し、上記特徴点抽
出手段によって抽出された特徴点の座標をもとに、上記
計測対象図形の包絡周囲長を求めるようにしたことを特
徴とする図形計測装置。
2. An image memory in which image data of a figure is stored, and coordinates of the start point and end point of each run of the figure to be measured based on the image data stored in this image memory. From the run coordinate measuring means to be sought and the coordinates of the starting point and ending point for each run found by this run coordinate measuring means, the coordinates of the starting point and ending point forming the convex portion on the measurement target figure are determined. a feature point extracting means for extracting the coordinates of the feature point, and an envelope perimeter of the figure to be measured is determined based on the coordinates of the feature point extracted by the feature point extracting means. Characteristic figure measuring device.
【請求項3】  上記特徴点抽出手段によって抽出され
た開始点の座標を記憶するための第1のバッファと、上
記特徴点抽出手段によって抽出された終了点の座標を記
憶するための第2のバッファとを更に備え、上記特徴点
抽出手段は、上記ラン座標計測手段によって1つのラン
の開始点並びに終了点の座標が求められた場合に、この
求められた開始点が加わることによって凸部を形成する
座標以外を上記第1のバッファから削除して、この求め
られた開始点の座標を同第1のバッファに残されている
開始点座標列の最後に記憶すると共に、上記求められた
終了点が加わることによって凸部を形成する座標以外を
上記第2のバッファから削除して、上記求められた終了
点の座標を同第2のバッファに残されている終了点座標
列の最後に記憶するようにしたことを特徴とする請求項
1または請求項2記載の図形計測装置。
3. A first buffer for storing the coordinates of the starting point extracted by the feature point extracting means, and a second buffer for storing the coordinates of the end point extracted by the feature point extracting means. and a buffer, and the feature point extracting means is configured to, when the coordinates of a start point and an end point of one run are determined by the run coordinate measuring means, extract a convex portion by adding the determined starting point. The coordinates other than the coordinates to be formed are deleted from the first buffer, and the coordinates of the obtained starting point are stored at the end of the starting point coordinate string left in the first buffer, and the coordinates of the obtained starting point are stored at the end of the starting point coordinate string remaining in the first buffer, and Delete coordinates other than those that form a convex part by adding points from the second buffer, and store the coordinates of the end point obtained above at the end of the end point coordinate string remaining in the second buffer. The figure measuring device according to claim 1 or 2, characterized in that the figure measuring device is configured to:
【請求項4】  上記特徴点抽出手段は、上記第1のバ
ッファに残されている開始点座標列のうちの連続する2
つの開始点座標および上記求められた開始点の座標で示
される3点から一定方向にベクトルの外積を求め、その
外積の上記計測対象図形に垂直な成分の正負によって、
上記3点のうちの中間点の存在により凸部が形成されて
いるか否かを判別すると共に、上記第2のバッファに残
されている終了点座標列のうちの連続する2つの終了点
座標および上記求められた終了点の座標で示される3点
から一定方向にベクトルの外積を求め、その外積の上記
計測対象図形に垂直な成分の正負によって、上記3点の
うちの中間点の存在により凸部が形成されているか否か
を判別するようにしたことを特徴とする請求項3記載の
図形計測装置。
4. The feature point extracting means extracts two consecutive starting point coordinates from the starting point coordinate string left in the first buffer.
Find the outer product of vectors in a certain direction from the three points indicated by the starting point coordinates and the coordinates of the starting point obtained above, and use the sign of the component perpendicular to the figure to be measured of the outer product to calculate
It is determined whether or not a convex portion is formed based on the presence of an intermediate point among the three points, and two successive end point coordinates of the end point coordinate string left in the second buffer are determined. Find the cross product of vectors in a certain direction from the three points indicated by the coordinates of the end point found above, and use the sign of the component perpendicular to the figure to be measured of the cross product to determine the convexity due to the existence of a midpoint among the three points. 4. The graphic measuring device according to claim 3, wherein the device determines whether or not a portion is formed.
【請求項5】  上記計測手段は、上記計測対象図形の
各ラン毎の開始点並びに終了点を対象とする上記特徴点
抽出手段による特徴点抽出処理が全て完了した際に、上
記第1および第2のバッファの内容をもとに計測処理を
行うことを特徴とする請求項3または請求項4記載の図
形計測装置。
5. The measuring means detects the first and second points when the feature point extraction means has completed all feature point extraction processing targeting the start point and end point of each run of the measurement target figure. 5. The graphic measuring device according to claim 3, wherein the measuring process is performed based on the contents of the second buffer.
JP3133028A 1991-06-04 1991-06-04 Graphic measuring device Pending JPH04358290A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3133028A JPH04358290A (en) 1991-06-04 1991-06-04 Graphic measuring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3133028A JPH04358290A (en) 1991-06-04 1991-06-04 Graphic measuring device

Publications (1)

Publication Number Publication Date
JPH04358290A true JPH04358290A (en) 1992-12-11

Family

ID=15095117

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3133028A Pending JPH04358290A (en) 1991-06-04 1991-06-04 Graphic measuring device

Country Status (1)

Country Link
JP (1) JPH04358290A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2489709A (en) * 2011-04-05 2012-10-10 Mirada Medical Ltd Optimising the Placement of an Image Measurement Tool

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2489709A (en) * 2011-04-05 2012-10-10 Mirada Medical Ltd Optimising the Placement of an Image Measurement Tool
GB2489709B (en) * 2011-04-05 2013-07-31 Mirada Medical Ltd Measurement system for medical images
US9563947B2 (en) 2011-04-05 2017-02-07 Mirada Medical Limited Measurement system for medical images

Similar Documents

Publication Publication Date Title
CN110766095A (en) Defect detection method based on image gray level features
US4675665A (en) Realtime tracking of a movable cursor
JPH04358290A (en) Graphic measuring device
JPS6310472B2 (en)
JP2626528B2 (en) Figure recognition device
JPH04293178A (en) Configuration match system and its method
US5457645A (en) Pattern recognition system including a circuit for detecting maximum or minimum data elements which determines the standard pattern closest to the input pattern
JPH0764696A (en) Method and device for eliminating erroneously measured data of coordinate detection device
JPS61194571A (en) Graphic recognition mode
JP2762472B2 (en) Character recognition method and character recognition device
JPH03662B2 (en)
JP3781215B2 (en) Method for detecting feature points of image data
JP2000331171A (en) Device and method for analyzing shape
KR960001753B1 (en) Directionally characteristic recognition system by binary image
JPH0432432B2 (en)
JP2589175B2 (en) Figure recognition device
JPS60142734A (en) Character string comparator
JPS61265521A (en) Apparatus for automatically measuring shape of figure
JPH10312460A (en) Image processing method and high precision image processor
JP2837243B2 (en) Graphic data compression method
JP3612396B2 (en) Interpolation method of line group
JPS62162182A (en) Extraction system for bending point of hand-written picture input device
JPH01180075A (en) Position measuring method for feature point corner for pattern recognition
JPS6218956B2 (en)
JPH0731733B2 (en) Rectangle detector