JPS6029878A - Detector for circular body - Google Patents

Detector for circular body

Info

Publication number
JPS6029878A
JPS6029878A JP58138571A JP13857183A JPS6029878A JP S6029878 A JPS6029878 A JP S6029878A JP 58138571 A JP58138571 A JP 58138571A JP 13857183 A JP13857183 A JP 13857183A JP S6029878 A JPS6029878 A JP S6029878A
Authority
JP
Japan
Prior art keywords
point
circle
points
image
coordinates
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.)
Granted
Application number
JP58138571A
Other languages
Japanese (ja)
Other versions
JPH024948B2 (en
Inventor
Yasuo Hongo
本郷 保夫
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
Fuji Electric Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd, Fuji Electric Manufacturing Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP58138571A priority Critical patent/JPS6029878A/en
Publication of JPS6029878A publication Critical patent/JPS6029878A/en
Publication of JPH024948B2 publication Critical patent/JPH024948B2/ja
Granted legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To obtain data on an independent circle and an arc by picking up an image of plural bodies whose contours are arcuate or enveloped with an arc, making a raster scan and converting data into binary data, and operating a scanning segment terminal part and the overlap state of segments. CONSTITUTION:An image 12 of the plural circular bodies 11 on a background 10 is picked up while they overlap one another. The video signal obtained by making the raster scan on the image is converted 13 into a binary signal to obtain a picture as shown in a figure 24. This information is written in a picture memory in DMA mode by a picture information input circuit 14 which includes the picture memory and a picture feature extraction part. A connectivity analyzing part 15 detects 16 boundary points on the basis of line segment information (coordinates and length of segment terminal part and whether the segment overlaps an adjacent segment or not) on the binary-coded picture from the feature extraction part, and carries out the trace arithmetic 17 of inner and outer circumferential points, arithmetic 18 of arcuate parts, arithmetic 19 of estimated circles, and output 20 of detection results to constitute body circle detection data. Consequently, the positions, sizes, and number of overlapping circles are detected.

Description

【発明の詳細な説明】 〔発明の属する技術分野〕 この発明は、TVカメラなどの撮像手段を用い、重なり
などを含んで乱雑に配置されている食品容器などの円形
物体を分離して、個々の物体の直径を計測する画像処理
装置に関する。
[Detailed description of the invention] [Technical field to which the invention pertains] This invention uses an imaging means such as a TV camera to separate circular objects such as food containers that are randomly arranged, including overlapping, and to separate them into individual objects. The present invention relates to an image processing device that measures the diameter of an object.

〔従来技術とその問題点〕[Prior art and its problems]

4TVカメラなどの撮像手段を用いて個々の物体を撮像
し、その撮像信号から物体の大きさく面積、直径、外周
長)などをめて物体を識別することが、例えばコンベア
により搬送されてくる物体の良否を識別して物体の仕分
けなどを行なう場合に用いられている。このような場合
に、従来は個々の物体がそれぞれ分離独立しているもの
を対象としていたために、撮像信号から物体の大きさを
めることが簡単であったが、TVカメラによる物体の識
別が数多くの分野において適用されてくると、当然のこ
とながら、個々の物体が分離独立しているのばかりでは
なく、重なり合っているような場合にも適用できること
が要求されてくる。
For example, it is possible to image an individual object using an imaging means such as a TV camera, and identify the object by determining the object's size (area, diameter, outer circumference), etc. from the image signal. It is used to sort objects by identifying whether they are good or bad. In such cases, conventionally it was easy to determine the size of the object from the image signal because each object was separated and independent, but object identification using a TV camera As it is being applied in many fields, it naturally becomes necessary to be able to apply it not only to cases where individual objects are separate and independent, but also to cases where they overlap.

ところが重なり合っている物体をTVカメラで撮像した
場合には、撮像した画像は1つの物体として映るため、
各物体の正しい大きさをめることができなかった。
However, when images of overlapping objects are captured using a TV camera, the captured images appear as one object.
I was unable to determine the correct size of each object.

例えば、社員食堂などにおいて自動化を行なうために、
食器容器の大きさに値段を対応づけておき、第1図に示
すように盆1におかれた社員が自由に選択した料理の容
器2,3を1゛■カメラ4にて撮像し、その撮像信号か
ら容器2,3の大きさ乞求めて1直段を算出することが
考えられる。このような場合、上からみて容器2と3が
重なる場合には、撮像した画像は第2図に示すようにな
ってしまい、容器2,3のそれぞれの大きさをめること
が困難であった。このために、第1図に示すようにTV
カメラ5を盆1の下方に配置し、盆1の上方に照明8,
9を配置して盆1に容器2,3の糸尻s6,7が明確に
写るようにして第3図に示すような画像を得ることも考
えられている。この場合には糸尻部の大きさと値段を対
応ずけておくことにより値段をめることができ、また糸
尻部は絶対に1なり合うことがないために画像が第3図
に示すように必らず分離したものになるので糸尻部の大
きさをめることは簡単゛である。
For example, in order to automate the company cafeteria,
The size of the tableware container is associated with the price, and as shown in Figure 1, the container 2 and 3 of the food freely selected by the employee placed on the tray 1 are photographed using the camera 4. It is conceivable to determine the size of the containers 2 and 3 from the image signal and calculate the 1st stage. In such a case, if containers 2 and 3 overlap when viewed from above, the captured image will look like the one shown in Figure 2, making it difficult to determine the respective sizes of containers 2 and 3. Ta. For this purpose, as shown in Figure 1, the TV
The camera 5 is placed below the tray 1, and the lighting 8 is placed above the tray 1.
It is also being considered to obtain an image as shown in FIG. 3 by arranging the thread ends s6 and 7 of the containers 2 and 3 on the tray 1 by arranging the thread ends s6 and 7 of the containers 2 and 3 clearly. In this case, the price can be reduced by matching the size of the thread tail and the price, and since the thread tail will never be equal to 1, the image will look like the one shown in Figure 3. It is easy to determine the size of the end of the thread, as it is always separated.

ところが、この装置の場合には糸尻部が鮮明に出る必要
があるためK。
However, in the case of this device, the end of the thread needs to be clearly visible.

■ 離れている他の容器の影が重なる場合、■ 容器同
志が乗り合っている場合、 ■ 異物により、容器が浮いて糸尻の影が鮮明に出ない
場合、 などの要因で、独立した糸尻な撮像できないときは判別
が不可能となる。
■ When the shadows of other containers that are far apart overlap, ■ When containers are on top of each other, ■ When containers float due to foreign objects and the shadow of the end of the thread is not clearly visible. If the butt cannot be imaged, discrimination becomes impossible.

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

本発明は、前記の欠点を除き、食品容器などの円形物体
が重畳している場合でも、容器の個数、位置、大きさな
どを検知し得る画像処理装置に係るもので、これにより
、ランダムに置かれている円形物体の位置、大きさを正
確に知ることができ、従来の装置より、広範囲の応用分
野に適用できる装置を提供することを目的とするもので
ある。
The present invention is directed to an image processing device capable of detecting the number, position, size, etc. of circular objects such as food containers even when circular objects such as food containers are superimposed, and which eliminates the above-mentioned drawbacks. The purpose of this invention is to provide a device that can accurately determine the position and size of a placed circular object and can be applied to a wider range of applications than conventional devices.

〔発明の要点〕[Key points of the invention]

本発明の要点は、輪郭に円弧または円弧な包絡線とする
形状を有し、重畳したものを含む複数の物体を撮像した
画像を2スター走査したのち、2値化手段を介して2値
化画像に変換し、前記円形物体の位置と大きさを検出す
る装置に2いて、前記2値化画像にどける前記円形物体
のパターンの走査セグメント(ラインセグメント)の端
部の座標、隣接の前走iセグメントとの重なり、を検出
する画像!特徴抽出手段と、前記画像特徴抽出部段によ
る前記型なりの情報に基づき、前記2値化画像の全ての
走査セグメントに独立パターンごとのパターン番号を伺
加する遅結性解析手段と、同一のパターン番号を有する
走査セグメントの端部の座標を前記独立パターンの境界
点の座標として検出する境界点検出手段と、を設けるこ
とにより独立パターンごとの境界点データを分離したの
ち、前記独立パターンを外周に活って左回り(右回り)
に1周して前記境界点を追跡し、追跡の順に並ぶ各境界
点の座標、該境界点から隣接の境界点に向かう追跡方向
を示す方向コード、からなる外周点列データ、または独
立パターンごとの前記境界点のうち前記外周点列KJf
iする境界点を除いたものを当該のパターンの内周に沿
って前hG外周の場合と同様に追跡し、前記外周点列デ
ータと同様な内周点列データ、のいずれか一方又は両方
のデータを出力する外/内周点追跡演算手段と、前記外
/内周点列データにおける前記方向コードの値か、前記
の追跡の順に増加(減少)している区間における外/内
周点列の座標を区分抽出して凹み画像部すなわち各物体
円の接続部を除き、凸画像部すなわち各物体円に対応す
ると思われる部分ごとの外/内周・凸部点列データとし
て出力する凸画像部分離手段と、前記外/内周・凸部点
列データを構成する外/内周点を、演算時間を短縮する
ために順次隣接する複数個の外/内周点ごとに選択し外
/内周代表点として出力する外/内周・代表点選択手段
と、前記外/内周代表点における、順次隣接する3点を
通る個別円弧の複数個の各中心座標、半径を演算出力す
る個別円弧演算手段と、前記個別円弧のうち中心座標、
半径の値が共に近い値を持つものを同一円に属するもの
として分離す′る同一円・個別円弧演算手段と、これら
の個別円弧群に最小二乗法を適用して導かれる推定円す
なわち、同一円に属する前記の各個別円弧に対応する谷
データを用いて推定円の中心座標、半径を演算出力する
推定円演算手段と、を設は前記推定円演算手段は、各個
別円弧の中心座標、半径の各各の平均値をIW定円の中
心座標、半径のそれぞれの第1次近似値とし、各個別円
弧に対応する外/内周代弐点の少くとも1部からなる点
の座標と推定円の中心座標との距離から該推定円の半径
を差り巨・た残差の2乗の和を最小とするような所要次
数の通人近似を行うことにより演算の収束を早め、演算
時間を短縮するようにした点にある。
The gist of the present invention is to perform 2-star scanning on images of multiple objects, including superimposed objects, whose contours have a circular arc or an arcuate envelope, and then to binarize the images using a binarizing means. The coordinates of the end of the scanning segment (line segment) of the pattern of the circular object and the adjacent previous scan are converted into an image, and the coordinates of the end of the scanning segment (line segment) of the pattern of the circular object are transferred to the binarized image by a device that detects the position and size of the circular object. Image that detects overlap with i-segment! a feature extracting means, and a delayed analysis means for adding a pattern number for each independent pattern to all scanning segments of the binarized image based on the patterned information from the image feature extracting section; boundary point detection means for detecting the coordinates of the end of the scanning segment having the pattern number as the coordinates of the boundary point of the independent pattern; after separating the boundary point data for each independent pattern, the independent pattern is separated from the outer periphery. Turn counterclockwise (clockwise)
Outer periphery point sequence data, or each independent pattern, consisting of the coordinates of each boundary point arranged in the order of tracking, and a direction code indicating the tracking direction from the boundary point to the adjacent boundary point. The outer peripheral point sequence KJf among the boundary points of
i is tracked along the inner periphery of the pattern in the same way as in the case of the previous hG outer periphery, and one or both of the outer periphery point sequence data and the same inner periphery point sequence data are traced. Outer/inner point tracking calculation means for outputting data, and the value of the direction code in the outer/inner point string data, or the outer/inner point string in the section increasing (decreasing) in the order of the tracking. A convex image that extracts the coordinates of , excludes the concave image part, that is, the connecting part of each object circle, and outputs the convex image part, that is, the outer/inner circumference/convex part point sequence data for each part that seems to correspond to each object circle. The partial separation means sequentially selects outer/inner points constituting the outer/inner periphery/convex point sequence data for each of a plurality of adjacent outer/inner periphery points in order to shorten calculation time. outer/inner circumference/representative point selection means for outputting as an inner circumference representative point, and individual means for calculating and outputting the center coordinates and radii of a plurality of individual arcs that sequentially pass through three adjacent points at the outer/inner circumference representative points. circular arc calculating means; center coordinates of the individual circular arcs;
The same circle/individual arc calculating means separates those whose radius values are close to each other as belonging to the same circle, and the estimated circle derived by applying the least squares method to these individual arcs, that is, the same circle. Estimated circle calculation means calculates and outputs the center coordinates and radius of the estimated circle using the valley data corresponding to each individual arc belonging to the circle; The average value of each of the radii is taken as the center coordinate of the IW fixed circle and the first approximation value of each of the radii. By subtracting the radius of the estimated circle from the distance from the center coordinate of The point is that it has been shortened.

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

以下第4図〜第12図に基づい℃本発明を説明する。第
4図は本発明検出装置の実施例の構成を示すブロック図
である。同図において、10は背景、11は検出対象の
円形物体、12はテレビカメラなどの撮像手段、22は
円形物体検出装置であり、13は2値化回路、14は画
像メモリや画像特徴抽出部を含む画像情報入力回路、1
5は連結性解析部、16は境界点検出部、17は外/内
周点追跡演算部、18は凸画像部分離部、外/内周・代
表点選択部、個別円弧演算部を含む円弧演算部、19は
同一円・個別円弧演算手段、最小二乗円演算部を含む推
定円演算部、20は検出結果出力部、21は円の個数、
位置、大きさを示す物体円検出データである。
The present invention will be explained below based on FIGS. 4 to 12. FIG. 4 is a block diagram showing the configuration of an embodiment of the detection device of the present invention. In the figure, 10 is a background, 11 is a circular object to be detected, 12 is an imaging means such as a television camera, 22 is a circular object detection device, 13 is a binarization circuit, and 14 is an image memory or image feature extraction unit. An image information input circuit including: 1
5 is a connectivity analysis section, 16 is a boundary point detection section, 17 is an outer/inner circumference point tracking calculation section, and 18 is an arc including a convex image part separation section, an outer/inner circumference/representative point selection section, and an individual arc calculation section. a calculation unit; 19 is a same circle/individual arc calculation unit; an estimated circle calculation unit including a least squares circle calculation unit; 20 is a detection result output unit; 21 is the number of circles;
This is object circle detection data indicating the position and size.

まず細部の説明に先立ち、第4図の概略の動作を説明す
ると、背景10上に円形物体11が乗っていて、それら
の形状によっては、上方から撮像手段12で撮像すると
重畳していることがある。
First, before explaining the details, the general operation of FIG. 4 will be explained. A circular object 11 is placed on a background 10, and depending on their shape, when images are taken from above by the imaging means 12, they may overlap. be.

その画像をラスター走査したビデオ信号を2値化回路1
3で2値化して、第5図24のような2値画像に変換す
る。この2値画像の画像情報は、画像メモリや画像特徴
抽出部を含む画像情報入力回路14で、画像メモリ上に
、l)MAモードで書き込まれる。連結性解析部15で
は、前記画像特徴抽出部から抽出された前記画像メモリ
内の2値画像のラインセグメント情報(ラインセグメン
トの端部の座標、長さ、隣接ラインセグメントとの重な
り部の有無に基づく、属するパターンの査号などライン
セグメントの特徴抽出データ)に基づいて、一画面の走
査終了後ラインセグメントの連結性を解析し、同一の独
立パターンに属するラインセグメントに同一のパターン
番号を付し、独立パターン間の分離が行われる。境界点
検出部16では、独立パターンの境界点座標が、境界点
の属するパターン番号とともに検出される。この境界点
情報は外/内周点追跡演算部17で解析されて、左回り
(または右回り)の外周点列データ、および境界点情報
から該外周点列データを除くことにより、内周点列デー
タが得られる。
A binarization circuit 1 converts the video signal obtained by raster scanning the image.
3 to convert into a binary image as shown in FIG. 5, 24. The image information of this binary image is written onto the image memory in l) MA mode by an image information input circuit 14 including an image memory and an image feature extraction section. The connectivity analysis unit 15 extracts line segment information (coordinates of the end of the line segment, length, presence or absence of overlap with adjacent line segments) of the binary image in the image memory extracted from the image feature extraction unit. After scanning one screen, the system analyzes the connectivity of line segments and assigns the same pattern number to line segments that belong to the same independent pattern. , separation between independent patterns is performed. The boundary point detection unit 16 detects the boundary point coordinates of the independent pattern together with the pattern number to which the boundary point belongs. This boundary point information is analyzed by the outer/inner circumference point tracking calculation unit 17, and by removing the outer circumference point sequence data from the counterclockwise (or clockwise) outer circumference point sequence data and the boundary point information, the inner circumference point Column data is obtained.

なおこの内周点列データは多くの円形物体の重畳した場
合、該円形物体の外周の一部が重なったパターンの内周
に表われる場合に用いられるので、このような可能性が
無ければこのデータの抽出や以後の処理は不要となる。
Note that this inner periphery point sequence data is used when many circular objects are superimposed and a part of the outer periphery of the circular object appears on the inner periphery of the overlapping pattern, so if there is no such possibility, this No data extraction or subsequent processing is required.

内周点列データに対する以後の処理は外周点列データの
場合と全く同様であり、以下外/内周と書くときは外周
、内周のいずれか一方または両方を意味するものとする
The subsequent processing for the inner circumference point sequence data is exactly the same as for the outer circumference point sequence data, and hereinafter, when writing outer/inner circumference, it means either the outer circumference, the inner circumference, or both.

また以下の説明は主として外周を対象として説明する。Further, the following description will mainly be made regarding the outer periphery.

次に重畳円形画像の外/内周点列データから円弧演算部
18において、外/内周上の各個別円弧の半径と中心座
標をめる。これらの個別円弧データ忙より、同一円゛に
属する個別円弧データの集合(同一円・個別円弧群デー
タ)をめる。この同一円・個別円弧群データから、推定
用演算部19で推定円(最小または物体用とも呼ぶ)の
位置、大きさをめる。これにより、画像を構成する円形
物体の個数、位置、大きさの3つの正確な情報を得るこ
とができる。これらの検出結果は検出結果出力部20か
ら、物体用検出データ21として外部に出力され、CR
Tなどの110機器に出力される。
Next, the radius and center coordinates of each individual arc on the outer/inner circumference are calculated in the arc calculation unit 18 from the outer/inner circumference point sequence data of the superimposed circular image. From these individual arc data, a set of individual arc data belonging to the same circle (same circle/individual arc group data) is created. From this same circle/individual arc group data, the estimation calculation unit 19 calculates the position and size of the estimated circle (also called minimum or object circle). This makes it possible to obtain three pieces of accurate information: the number, position, and size of the circular objects that make up the image. These detection results are output from the detection result output unit 20 to the outside as object detection data 21, and are
It is output to 110 devices such as T.

円形物体は、重畳していない物体は勿論、重畳している
ものでも、完全に重なって見えないものでない限り、輪
部の一部が撮像手段12により、把えることができれば
、この検出装置22によりその全体を推定することがで
きる。
For circular objects, whether they are non-superimposed objects or objects that are superimposed, as long as they are not completely overlapped and cannot be seen, if a part of the ring part can be grasped by the imaging means 12, this detection device 22 The whole can be estimated by

以下に前記の各部の詳細な説明を行う。A detailed explanation of each of the above-mentioned parts will be given below.

第5図に2値化回路13を介し2値化した後の重畳した
円形物体の2値画像24を示す。有効画面23内に座標
系X、Yが定義され、画像情報入力回路14によって2
値画像の幾何学的情報を画像メモリに人力することがで
キル。
FIG. 5 shows a binary image 24 of the superimposed circular object after being binarized via the binarizing circuit 13. A coordinate system X, Y is defined within the effective screen 23, and the image information input circuit 14
The value of the geometric information of the image can be manually stored in the image memory.

第6図は、2個の物体の独立パターン25 、26を含
む2値画像の例を示す。「o」印はパターン内の画素と
しての物体点27を示す。独立パターン25は孔がなく
、独立パターン26には1個の孔261がある。
FIG. 6 shows an example of a binary image containing independent patterns 25 and 26 of two objects. The "o" marks indicate object points 27 as pixels within the pattern. The independent pattern 25 has no holes, and the independent pattern 26 has one hole 261.

第7図は着目画素としての着目点Aを中心とする8つの
隣接画素からなる3×3マスクMを示し、Bを4近傍点
、Cを8近傍点と呼ぶ。なお前記物体点27は次の5つ
に分類−される。
FIG. 7 shows a 3×3 mask M consisting of eight adjacent pixels centered on a point of interest A as a pixel of interest, where B is called a 4-neighboring point and C is called an 8-neighboring point. Note that the object points 27 are classified into the following five types.

0) 内点:4近傍点Bにすべて物体点27がある場合
、 (ロ) 左点:左側に物体点27がない場合、し) 衣
魚:右側に物体点27がない場合、に)上点:左点でも
衣魚でもなく、上側に物体点27がない場合、 (ホ)下点:左点でも衣魚でもな(、下側に物体点27
がない場合、 これで前記左点、衣魚、上点、下点の4つが境界点(輪
郭点)である。
0) Interior point: If all the object points 27 are in the 4 neighboring points B, (b) Left point: If there is no object point 27 on the left side, ii) Cloth fish: If there is no object point 27 on the right side, ii) Top Point: Neither the left point nor the fish, and there is no object point 27 on the upper side, (e) Bottom point: Neither the left point nor the fish (, object point 27 on the bottom
If there is no , the left point, the upper point, and the lower point are now boundary points (contour points).

1水平走査線上の物体点27の連なりを前述のようにラ
インセグメントと呼び、画像情報入力回路14によって
抽出された前記ラインセグメント情報に基づき、連結性
解析部15では、前述のように一画面の走査終了後各ラ
インセグメントの前後の連結性を解析しラインセグメン
トの属する独立パターンごとのパターン着力を各ツイン
セグメントに与える。次に境界点検出部16において、
各独立パターンの外周点および内周点を含む境界点をめ
、各境界点がどの独立パターンに属するものかを知るこ
とができる。次に外/内周点追跡演算部17で、各独立
パターンの境界点のデータから、各独立パターンごとの
外周点列データ、内周点列データすなわち外周または内
周(孔261)の境界点の座標と、該座標における後述
の方向コードを隣接の順に並べたデータ、を演算してめ
る。
As mentioned above, a series of object points 27 on one horizontal scanning line is called a line segment, and based on the line segment information extracted by the image information input circuit 14, the connectivity analysis unit 15 calculates the number of points on one screen as described above. After scanning is completed, the connectivity before and after each line segment is analyzed, and the pattern attachment force for each independent pattern to which the line segment belongs is given to each twin segment. Next, in the boundary point detection section 16,
It is possible to know which independent pattern each boundary point belongs to, based on the boundary points including the outer circumferential point and the inner circumferential point of each independent pattern. Next, in the outer/inner circumference point tracking calculation unit 17, from the boundary point data of each independent pattern, outer circumference point sequence data and inner circumference point sequence data for each independent pattern, that is, boundary points of the outer or inner circumference (hole 261). The coordinates of , and data in which direction codes, which will be described later, at the coordinates are arranged in order of adjacency are calculated.

すなわち各独立パターンごとの境界点(左点、衣魚、上
点、下点)の左回り(または右回り)追跡を行う。ここ
で左(右)回りとは、パターンの輪郭の外周、内周を間
はず、パターンを左(右)側に見て追跡する方向を言う
ものとする。
In other words, counterclockwise (or clockwise) tracking is performed of the boundary points (left point, upper point, lower point) for each independent pattern. Here, the term "counterclockwise (right) rotation" refers to the direction in which the pattern is tracked while looking at the pattern to the left (right) side, while passing between the outer and inner peripheries of the outline of the pattern.

第8図は、方向コードを示1−0これは境界点を追跡し
ていく段階で、各層目点Aと次の隣接の境界点の位置と
の関係に応じて、図のように1〜8の数字で追跡の方向
を表現するものである。
Figure 8 shows the direction code 1-0. This is the stage of tracking the boundary points, and depending on the relationship between each layer point A and the position of the next adjacent boundary point, the direction code is 1-0 as shown in the figure. The number 8 represents the tracking direction.

この追跡の手順には種々の方法が知られており、例えば
本出願人による、特願昭58−9108号「パターンの
輪郭追跡方法」に述べた方法を用いることができる。第
6図はこのよう忙各独立パターン25゜26に外/内周
点の左回り追跡を行った結果を示す。このようにして各
独立パターンごとに、まず外周の輪郭点の追跡により各
外周点の座標と当該点における方向コードからなる前記
外周点列データが得られ、次に残りの輪郭点について内
周としての追跡により前記内周点列データがめられる。
Various methods are known for this tracking procedure, and for example, the method described in Japanese Patent Application No. 58-9108 "Pattern Contour Tracking Method" by the present applicant can be used. FIG. 6 shows the results of counterclockwise tracking of the outer/inner circumferential points for each independent pattern 25°26. In this way, for each independent pattern, first, by tracing the contour points on the outer periphery, the outer periphery point sequence data consisting of the coordinates of each outer periphery point and the direction code at the point is obtained, and then for the remaining contour points, as the inner periphery. By tracking, the inner circumferential point sequence data is obtained.

次に円弧演算部18について説明する。この部には凸画
像部分離部、外/内周・代表点選択部、個別円弧演算部
が含まれる。
Next, the arc calculating section 18 will be explained. This section includes a convex image separation section, an outer/inner circumference/representative point selection section, and an individual arc calculation section.

まずこの中の凸画像部分#齢の動作を述べる。First, the operation of the convex image portion #age will be described.

前記外周点列データ内の方向コードは嬉9図の実線矢印
に示すように、凸形状の独立パターン91では、方向コ
ードは反時計方向(後述の増加方向)に回転するだけで
あるが、凹形状部921,922を持つ独立パターン9
2では、当該郡921 、922で逆戻り(後述の減少
方向への回転)を行う。
The direction code in the outer circumferential point sequence data is as shown by the solid arrow in Figure 9. In the convex independent pattern 91, the direction code only rotates counterclockwise (increasing direction, which will be described later); Independent pattern 9 with shaped parts 921 and 922
2, the groups 921 and 922 perform a reverse rotation (rotation in the decreasing direction, which will be described later).

また内周点列の方向コードの場合は第9図のパターン9
2を孔のパターン(従ってこのパターンに対する外周の
パターンは図外にあるものと仮定する)とすると、方向
コードは点線矢印のように推移し、前記の凹形状部92
1,922は、この場合には凸形状部に置換わり、残り
の−Jd己の凸形状部は凹形状部とみなされる。この時
方向コードは凸形状部921,922では外周追跡と全
(同様に反時計方向(増加方向)に回転し、残りの凹形
状部で逆戻り(減少方向への回転)を行う。
In addition, in the case of the direction code of the inner circumference point sequence, pattern 9 in Fig. 9
2 is a hole pattern (therefore, it is assumed that the outer pattern for this pattern is outside the figure), the direction code changes as shown by the dotted arrow, and the concave portion 92 described above changes.
1,922 is replaced with a convex portion in this case, and the remaining convex portions of −Jd are considered to be concave portions. At this time, the direction code rotates counterclockwise (increasing direction) in the convex portions 921 and 922 while tracking the outer periphery, and reverses (rotates in the decreasing direction) in the remaining concave portions.

第10図は3個の円形物体2B 、 29 、30の画
像を示す。独立パターンの数は、円形物体29と30が
重なっているために、101 、102の2個となる。
FIG. 10 shows images of three circular objects 2B, 29, 30. The number of independent patterns is two, 101 and 102, because the circular objects 29 and 30 overlap.

外周点の1h報ば、前述の手順で各独立パターンごとに
められている。そこで、独立パターン101の」場合は
、方向コードは連続して1→2→3→4→5→6→7→
8→1→2→・・・の方向(増加方向)に変化する。方
向コードが外周点追跡の途中で逆に、8→7→6→5→
4→3→2→1→8→7→・・・の方向(減少方向)に
変化する場所を探すと、円形物体29と30の画像の境
界点が交叉する場所として交点31と32をみつけるこ
とができる。′/工おこの関係は内周において円形物体
の交点ン児付ける場合にも全く同様にあてはまる。
The 1h of outer circumferential points are determined for each independent pattern using the procedure described above. Therefore, in the case of "independent pattern 101", the direction codes are consecutively 1 → 2 → 3 → 4 → 5 → 6 → 7 →
It changes in the direction of 8→1→2→... (increasing direction). The direction code changes from 8 → 7 → 6 → 5 → in the middle of outer circumferential point tracking.
When searching for a place where the change occurs in the direction of 4 → 3 → 2 → 1 → 8 → 7 →... (decreasing direction), we find intersection points 31 and 32 where the boundary points of images of circular objects 29 and 30 intersect. be able to. The relationship ``/work'' applies in exactly the same way to the case where the intersection point of a circular object is attached on the inner periphery.

ただし輪郭の追跡の方向を右回りとしたときは前記の増
加方向と減少方向とが入れ替わる。
However, when the contour tracking direction is clockwise, the increasing direction and decreasing direction are interchanged.

このようにして、交点31と32の近傍の境界点を削除
して、各凸画像部のデータのみからなる境界点データ は境界点(第10図では外周点でもある)の座標(xi
、yi) であり、同時に座標の原点Oから該境界点の
座標Piに向うベクトル(第10図Vi)とみなされる
。な゛お以下境界点をこの座標で呼ぶこととする。
In this way, the boundary points near the intersections 31 and 32 are deleted, and the boundary point data consisting only of the data of each convex image part is obtained by the coordinates (xi
, yi), and at the same time, it is regarded as a vector (FIG. 10 Vi) from the coordinate origin O to the coordinate Pi of the boundary point. Note that the boundary points will be called by these coordinates below.

またNiは境界点Piの属する独立ノくターン102の
番号、Fiは境界点Piから隣接の境界点に向う方向コ
ード、またiは同一の独立ノくターン上の各境界点列(
外周点列または内周点列)に順次付された番号である。
In addition, Ni is the number of the independent turn 102 to which the boundary point Pi belongs, Fi is the direction code from the boundary point Pi to the adjacent boundary point, and i is the sequence of boundary points on the same independent turn (
These numbers are sequentially assigned to the outer circumference point sequence or the inner circumference point sequence.

なおこのようなパターンの輪郭上の凸画像部を検出する
方法として、上記の方法を用いれは演算時間が短くでき
る利点があるが、他の方法として本出願人により出願さ
れている特願昭58−76771「輪郭特徴検出方式」
における輪郭曲率の符号の変化を用いることもできる。
As a method for detecting a convex image portion on the contour of such a pattern, the above method has the advantage of shortening the calculation time, but another method is described in Japanese Patent Application No. 1983 filed by the present applicant. -76771 “Contour feature detection method”
It is also possible to use a change in sign of the contour curvature at .

次に個別円弧演算部においては次のような手順で境界点
PKに対応する個別円弧の中心のデータ(座標、半径)
をめる。
Next, in the individual arc calculation section, the data (coordinates, radius) of the center of the individual arc corresponding to the boundary point PK is obtained using the following procedure.
I put it on.

ここで同一の独立パターンについて層目すると前記境界
点データとしては、(Pi、F’iJだ^えれば良い・
次に後述のように外/内周・代表、侭選択部によって選
択された3つの境界点Pi−1,Pi。
Here, if we look at the layers of the same independent pattern, the boundary point data should be (Pi, F'iJ).
Next, as will be described later, three boundary points Pi-1 and Pi are selected by the outer/inner circumference/representative/side selection section.

Pi+1(何れも第10図)を考える。各点間の線分を
ベクトルσ1.σ2と表わすと、 σl =P i −P(i −1’) C2=1’(i + D−P i となる。ここで1011=1σ21のとき、つまり前記
2つの線分の長さが等しいとぎ、前記3つの境界点を通
る円弧(個別円弧)の半径R−ま下式でめられる。
Consider Pi+1 (both shown in Figure 10). The line segment between each point is vector σ1. If expressed as σ2, σl = P i - P (i -1') C2 = 1' (i + D - P i.Here, when 1011 = 1σ21, that is, the lengths of the two line segments are equal Then, the radius R of the circular arc (individual circular arc) passing through the three boundary points is determined by the following formula.

kL?= S/ 2− sin (9’/21・−・−
・(11ま ただしここでSはベクトルσ1またはC2の絶対値(該
ベクトルを表わす線分の長さ)である。すなわち、 s=1σ11−1σ21 ・・・・・・・・・・・・・
・・・・・ (2)で表わされ、またψはベクトルσ1
また(まC2に対する前記の円弧の中心角を第10図の
ように91゜ψ2とすると、 ψ=ψ1−ψ2 ・・・・・・・・・・・・・・・・・
・・・・・・・(3)でありこれらは後述のようにめら
れる。
kL? = S/ 2- sin (9'/21・-・-
・(11) Here, S is the absolute value of the vector σ1 or C2 (the length of the line segment representing the vector). That is, s=1σ11−1σ21 ・・・・・・・・・・・・・・・
...... (2), and ψ is the vector σ1
(If the central angle of the above-mentioned arc with respect to C2 is 91° ψ2 as shown in Figure 10, then ψ=ψ1−ψ2 ・・・・・・・・・・・・・・・・・・・・・
(3), and these will be discussed later.

ここで前記外/内周・代表点選択部の1)IIIf′「
を姻Σべると、前記個別円弧をめる3点としてPi−1
1Pi、 Pi+1を外周点列(Pi)(外周点IJ 
iσ)集合)から選択する方法としては、通當&−1ベ
クトルσlとC2の長さく絶対値)が同じになるように
、または近似的に等しくなるように選択する。この場合
、外周点列(P i ’1のすべてにすし−で、このよ
う7’、C(l!j別円弧の計算をやるのではなく、あ
ら力・じめ追・号えば5点飛びなどの予備代表点を選ん
プこσ)ち、そσつ中から前記のような3点の組となる
代表外Jfd ALをそれぞれめる。このようにしてイ
寅j4−の回数従ってその時間を短編するのである。そ
してこね、らσ)代表外周点はほぼ等間隔になるように
、方111」コードを利用した周知の近似周長の算出方
法によるt’tぼ等距離の点を代表外周点として選ルく
する。−4−1ぶわち境界点Pi−1から点Piでσ〕
外)月、@1jII (P i )(境界点のつらなり
)の中で、方11」コード力′−1゜3.5.7となる
点すなわち水平まプこ(ま垂直)jll」に追跡する点
の数をno方向コード力′−2、4、6、8となる点す
なわち斜め方向に追跡する。屯σ)数をneとするとき
、点P i−1から点Pi までの周の長さく弧の長さ
)はその長さが比較的短いので、同時罠。
Here, 1) IIIf' of the outer/inner circumference/representative point selection section
When we multiply Σ, we get Pi-1 as the three points that enclose the individual arcs.
1Pi, Pi+1 as the outer periphery point sequence (Pi) (outer periphery point IJ
The selection method is such that the total length and absolute value of the &-1 vector σl and C2 are the same or approximately equal. In this case, instead of calculating the outer circumference point sequence (P i '1) for each arc like this, 7', C (l! Select preliminary representative points such as σ), and from among them, determine the non-representative Jfd AL that is a set of three points as described above.In this way, the number of times of Then, kone, raσ) So that the representative peripheral points are approximately equally spaced, the representative points are approximately equidistant using the well-known method of calculating the approximate perimeter using the "Method 111" code. Select as a peripheral point. -4-1 Buwachi σ from the boundary point Pi-1 to the point Pi]
Outside) Moon, @1jII (P i ) (P i ) (line of boundary points), trace to the point where the chord force '-1°3.5.7 is the horizontal map (or vertical) jll' The number of points corresponding to the no direction code force '-2, 4, 6, and 8 is traced in the diagonal direction. When the number σ) is ne, the length of the circumference and the length of the arc from point P i-1 to point Pi are relatively short, so it is a simultaneous trap.

この間の弦の長さ、すなわち前記ベクトルσ1の長さs
l(前記の8をさらに区分してこのように名付ける)に
ほぼ等しく、前記(2)式はS i=l a 11=i
P i −P<1−1)l;n o +JN ne−=
(2)−1となって長さSlがめられる。境界点Pi+
1は、点Piからの周の長さ、従ってベクトルσ2の長
さs2(前記と同様にSを区分する)がこの長さSlに
近い値(距離)となるように選ばれ前記(2)−1式と
同様にして長さS2がめられる。
The length of the chord between them, that is, the length s of the vector σ1
l (the above 8 is further divided and named like this), and the above formula (2) is S i = l a 11 = i
P i −P<1-1)l;no +JN ne−=
(2) becomes -1 and the length Sl is determined. Boundary point Pi+
1 is the circumference length from the point Pi, and therefore the length s2 of the vector σ2 (dividing S in the same way as above) is selected so that it has a value (distance) close to this length Sl. The length S2 can be determined in the same manner as in formula -1.

次にf)び個別円弧演算部の説明に戻り、このようにす
ると前記(2)式のベクトルの長さは長さSl。
Next, returning to f) and the explanation of the individual arc calculation section, if this is done, the length of the vector in equation (2) above will be the length Sl.

S2の平均値とみなすことができ、 S=(S1+82)/2 と置くことにより、前記(1)式は、次式(1)−1の
ように変形されて半径Rがめられる。
It can be regarded as the average value of S2, and by setting S=(S1+82)/2, the above equation (1) is transformed as shown in the following equation (1)-1 to find the radius R.

! R0= (S1+82)/4 ・5in(ψ/2)・・
・・・・(1)−1なおここで5in(ψ/2)につい
ては前記(3)式の関係かあるときは、角度ψは第10
図のベクトルσ1とC2とのなす角に等しいので、ベク
トルσ1とC2とのスカラー積(内積)σl・C2を丁
)−出することにより下式(4)からcosψをめ、c
osψ=σ1・C2/S1・S2・・・・・・・・・・
・・(4)本式(4)に次式(5)の関係を用いてめら
れろ。
! R0= (S1+82)/4 ・5in(ψ/2)...
...(1)-1 Here, for 5 inches (ψ/2), if the relationship in equation (3) above exists, then the angle ψ is the 10th
Since it is equal to the angle formed by the vectors σ1 and C2 in the figure, cosψ is obtained from the equation (4) below by calculating the scalar product (inner product) σl・C2 of the vectors σ1 and C2, and c
osψ=σ1・C2/S1・S2・・・・・・・・・・
...(4) Use the relationship of the following equation (5) in this equation (4).

5in(ψ/2)−J(1−CO5−9+)/2 ・・
−(51なお、ここで(4)式のスカラー積σJ・C2
は、σ1x+σ2x、σ1y、σ2yをそれぞれ谷ベク
トルσ1.σ2のX軸、Y軸成分とするとき、 σl x= (x i −xti −1)) 、 02
y=(xti+1l−xi )C1y=(yi −y(
i −11) 、 ”2y=(X(i+1l−yi )
で表わされるめで、次式により算出される。
5in(ψ/2)-J(1-CO5-9+)/2...
−(51 Note that here, the scalar product σJ・C2 of equation (4)
are respectively σ1x+σ2x, σ1y, and σ2y as valley vectors σ1. When the X-axis and Y-axis components of σ2 are, σl x= (x i −xti −1)), 02
y=(xti+1l-xi)C1y=(yi-y(
i −11), “2y=(X(i+1l−yi)
It is calculated by the following formula.

σIIIσ2−σ1xIIσ2x+σ1y・C2y=(
xi −x(i−D)(x++p−xi )+(yi 
−y(i−1す(yi+1M” 1他方第10図におけ
る個別円弧の中心座標C1(xoi。
σIIIσ2−σ1xIIσ2x+σ1y・C2y=(
xi −x(i−D)(x++p−xi)+(yi
−y(i−1(yi+1M”) 1On the other hand, the center coordinates C1(xoi) of the individual arcs in FIG.

yoi)(これは原点Oから座標C1に到るベクトルと
も考える。)は下式でめられろ。
yoi) (this can also be thought of as a vector from the origin O to the coordinate C1) can be calculated using the following formula.

C1=((C2−a l )/41σ2−σ11)・)
L、+Pi・・・・・・(6)この式は境界点Piから
、円一連の中心座J Ciに向う単位ベクトルUが、 u =(a 2−a 1 ) / l a 2−a l
 lで表わされるので、点P!から円弧の中心Ciに向
うベクトルは u −R?= ((a 2−a 1 )/Iσ2−σ月
s ・R?1 宣 となる関係を用いたものである。
C1=((C2-a l )/41σ2-σ11)・)
L.
Since it is represented by l, the point P! Is the vector from u to the center Ci of the arc u −R? = ((a2-a1)/Iσ2-σmonths・R?1 This is a relationship using the following equation.

以上で、代表外周点(境界点) Pi −1、Pi 、
Pi+103点から足まる個別円弧の中心座標Ciと半
径R0かまる。ここで前記の3点の中央の点Pi乞個別
円弧代表点と呼ぶ。
Above, the representative peripheral points (boundary points) Pi −1, Pi ,
The center coordinates Ci and radius R0 of the individual arcs are calculated from Pi+103 points. Here, the central point Pi of the three points mentioned above is called an individual arc representative point.

なお個別円弧の中心をめる別法として、第11図の方法
がある。これは、境界点Pi−1とPiを結ぷ線分d1
の垂直2等分線h1と、同じく境界点Pi+1とPlを
結ぶ線分d2の垂直2等分線h2の叉点を個別円弧の中
心Ciとする方法で、境界点FIと円弧の中心Ciとの
距離を半径R1とするもの! である。この方法の場合、線分d1とd2が近似的に等
しくなくても良い。このようにして前記境界点データ(
Pi、 Ni、 Fi )から、代表外周点(Fil(
代表外周点Piの集まり)に対応する各個別円弧の中心
座at Ci l半径牡几、の集まりの個別円弧群デー
次に推定用演算部19の説明に入る。この部には同一円
・個別円弧群デ一部、最小二乗円演算部が含まれ、まず
該分離部において前記の個別円りtデータを、異なる番
号iとjのもの同志で比較したとき、次式の条件を満た
すものに分ける。
Note that another method for finding the center of each individual circular arc is the method shown in FIG. This is the line segment d1 connecting the boundary points Pi-1 and Pi.
By using a method in which the center Ci of the individual arc is the intersection of the perpendicular bisector h1 of Let the distance be the radius R1! It is. In this method, the line segments d1 and d2 do not need to be approximately equal. In this way, the boundary point data (
From the representative peripheral point (Fil (Pi, Ni, Fi)
Next, the estimation calculation unit 19 will be explained. This part includes a portion of the same circle/individual arc group and a least squares circle calculation part, and first, when the above-mentioned individual circle t data with different numbers i and j are compared in the separation part, Divide into those that satisfy the following conditions.

1几、 −、a、 1 <ΔR(一定微小値)葺 」 1ci−Cjl<ΔC(一定微小値) つまり、半径がほぼ等しく、中心座標が近い円弧の集合
に分割1−る。このようにして、同一円に含まれると考
えられる同一円・個別円弧群データ(Ci、R,、Nc
iJが得られる。ここでNciは上記の手順でめられた
番号iの個別の円弧が属すると考えられる推定用(最小
二乗円、物体円)の番号を示す。
1 几, −, a, 1 <ΔR (constant minute value) 1ci−Cjl<ΔC (constant minute value) In other words, it is divided into a set of circular arcs with approximately equal radii and close center coordinates. In this way, the same circle/individual arc group data (Ci, R,, Nc
iJ is obtained. Here, Nci indicates a number for estimation (least squares circle, object circle) to which the individual arc with number i determined in the above procedure is considered to belong.

次に最小二乗円演算部は同一の推定用に属すると考えら
れる推定内押データ、((−+、i(・、、NCI。
Next, the least squares circle calculation unit calculates the estimated inner push data that is considered to belong to the same estimation, ((-+, i(·, , NCI.

Pi 、 Pi −1、Pi十t 、 Ni l (た
だし内部の各符号は前記の通りである)を用いて、最小
2乗法で推定用の座標Co、半径Roな推定1−る。
Using Pi, Pi-1, Pit, and Nil (however, each internal code is as described above), the estimation coordinate Co and radius Ro are estimated 1- by the least squares method.

すなわち第12図において代表外周点(の座標)をP1
〜P6とし、3つの点(PL、P2.P3)からまる円
弧の中心座標、半径をそれぞれ(C2JL2)とし、同
様に点(P2.P3.P4)、(P3.P4.P5 )
、(P4.i’5.P6)から定まる円弧の中心座標、
半径をそれぞれ(C3,几)、(C4,几、)としたと
きに、円弧の中心座標C2〜C4、半径R2〜R4、外
周点の座標P1〜P6から推定用の中心CO2半径几0
をめるものである。
In other words, in Fig. 12, the representative outer circumferential point (coordinates) is P1
〜P6, and the center coordinates and radius of the arc formed from the three points (PL, P2.P3) are respectively (C2JL2), and similarly the points (P2.P3.P4), (P3.P4.P5)
, (P4.i'5.P6), the center coordinates of the arc,
When the radii are (C3, 几) and (C4, 几, ), respectively, the center CO2 radius 几0 for estimation is calculated from the center coordinates C2 to C4 of the arc, the radius R2 to R4, and the coordinates P1 to P6 of the outer circumferential point.
It is something to be used for.

そこで推定用の中心COと前記の各個別円弧代表点P+
との距離Riから推定用の半径几Oを差引いた残差(誤
差)の2乗の和を最小にし得る推定用の半径および中心
座標COをめる方法(最小二乗法)を取る。すなわち2
乗誤差の和■は下式で表わされる。
Therefore, the center CO for estimation and each individual arc representative point P+
A method (least squares method) is used to find the estimated radius and center coordinate CO that can minimize the sum of the squares of the residuals (errors) obtained by subtracting the estimated radius O from the distance Ri. That is, 2
The sum of multiplicative errors is expressed by the following formula.

1 = X (Ri −Ro )・・・・・・・・・・
・・・・・・・・・・・・・・・・・(7)従って和■
を最小とする、推定用の半径1−LO,中心座標CO(
−=(x o r yo ) )については、下式を満
たす必要がある。
1 = X (Ri − Ro)・・・・・・・・・
・・・・・・・・・・・・・・・・・・(7) Therefore, the sum■
Minimize the estimation radius 1-LO, center coordinate CO (
-=(xoryo)), it is necessary to satisfy the following formula.

δ1/δxg=δ■/δyO=bI/δRO= 0 ・
・・・−+81従ってり8)式から次の3成力″−得ら
れる。
δ1/δxg=δ■/δyO=bI/δRO= 0 ・
...-+81 Therefore, the following three forces can be obtained from equation 8).

J((Ri−几o)/Ri)(xi−xo)=O・・−
(911Σ((R1−Ro)/Ri )(yi−yo)
=0・・・・・・(9)−2五 ハ(則−Ro)/Ri)=O・・・・・・・・・・・・
+9)−3上記(9)−1、(9)−2、(9)−3の
3式を解〜・て中心座標(xo、yO)、半径九003
つの値をめれ(′f。
J((Ri−几o)/Ri)(xi−xo)=O・・−
(911Σ((R1-Ro)/Ri)(yi-yo)
=0・・・・・・(9)−25ha(Rule-Ro)/Ri)=O・・・・・・・・・・・・
+9)-3 Solve the above three equations (9)-1, (9)-2, and (9)-3~・Center coordinates (xo, yO), radius 9003
Enter the value of ('f.

よい。しかしながら上記方程式は無理数を含んだ超越方
程式となり単純にj!#けな(・ので、この3式から次
のような逐次方程式を導〜・て逐次近似法によりめる。
good. However, the above equation becomes a transcendental equation that includes an irrational number, and is simply j! #Kena(・So, from these three equations, we derive the following successive equations using the successive approximation method.

即ち第1次近似でめられた解としての推定用の中心座標
、半径をそれぞれ(XS + ’/”0) +Pで表わ
したとき第(n+1)次近似の解である推n+1 n+
1 n+1 定日の中心座標、半径(xotY LR0&t、x”’
 =(J xi +R”、−x”、−X(1/1(7)
−R”、・J(xi/1(7))/ No 1 1 ・・・・・・・・・(10) −1 ・・・・・・・・・(10) −ま ただしここでPは第1次の推定用の中・し・座標(’+
y”)と、前記の各個別円弧代表点Piとの距離、0 
0 すなわち、 it↑= (xi−x” )”+ (冒7y ・・・・
・・・・・・・・(10) −4100 であり、Nは前記個別円弧の数である。
In other words, when the center coordinates and radius for estimation as a solution found in the first approximation are respectively expressed as (XS + '/'0) +P, the estimate n+1 n+ which is the solution of the (n+1)th approximation is
1 n+1 Center coordinates of fixed day, radius (xotY LR0&t, x”'
=(J xi +R", -x", -X(1/1(7)
-R”,・J(xi/1(7))/ No 1 1 ・・・・・・・・・(10) −1 ・・・・・・・・・(10) −Madashi here P is the center coordinate for the first estimation ('+
y") and the distance between each of the individual arc representative points Pi, 0
0 In other words, it↑= (xi-x")"+ (exploitation7y...
...(10) -4100 where N is the number of the individual arcs.

次に前記の逐次式(10)−1〜(10)−4の具体的
な演算に当っては解の収束を早めるために、第1次の解
を次式のように前記の各個別円弧の半径R。
Next, when calculating the above sequential equations (10)-1 to (10)-4, in order to speed up the convergence of the solution, the first-order solution is calculated for each of the individual circular arcs as shown in the following equation. radius R.

および、その中心座標C!の平均値として計算を進める
。すなわち第1次の推定円の中心座標(xo。
And its center coordinate C! Proceed with the calculation as the average value. That is, the center coordinates (xo) of the first estimated circle.

y)、半径Rは 0 x =(賓xOi)/N ・−・−・・・−(11) 
−1o。
y), radius R is 0 x = (guest xOi)/N ・−・−・・・−(11)
-1o.

Y =C:yOi〕/N ・・・・・・・・・(11)
 −20鳳 几=〔ギ几)/N ・・・・・・・・・(11) −3
11 として第2,3・・・・・・n次と計算を進めるもので
ある。このようにすれば通常nの値としては1〜5回で
収束させることができる。
Y=C:yOi]/N ・・・・・・・・・(11)
-20 鳳几=〔GI几)/N ・・・・・・・・・(11) -3
11, the calculation proceeds in the order of 2nd, 3rd, . . . nth. In this way, the value of n can normally be converged in 1 to 5 times.

このようにして推定円(最小二乗口)の大きさと位置が
、精度良くめられる。以上の結果から画像に含まれる円
の個数、大きさ、位置が分り、これが検出結果出力部2
0を介し判定結果物体内検出データ21として出力され
る。
In this way, the size and position of the estimated circle (least squares aperture) can be determined with high accuracy. From the above results, the number, size, and position of circles included in the image are known, and this is sent to the detection result output unit 2.
0 and is output as the determination result in-object detection data 21.

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

まず以上述べた本発明の主要構成部の機能を効果を含め
つつ要約すれば、 ■ 連結性解析部15により、2値画像を独立ノくター
ンごとに分離し、これらのパターンごとの処理が可能と
なり独立した円形物体については、正しく円の推定を行
うことができる。
First, to summarize the functions of the main components of the present invention as described above, including their effects: ■ The connectivity analysis unit 15 separates the binary image into independent turns and processes each of these patterns. For independent circular objects, the circle can be estimated correctly.

■ 境界点検出部16と外/内周点追跡演算部17によ
り、重畳した円形物体の2値画像の輪郭を追跡し【外/
内周点列として整理された外/内周点列データ(Pi 
、Fi 、Ni )を作成し、データを、個々の凸画像
部ごとの外/内周点列データに分離することができ、そ
れぞれの該データから代表外/内周点を選択して、対応
する各個別円弧の中心座標と半径の個別円弧群データ(
Ci。
■ The boundary point detection unit 16 and the outer/inner circumference point tracking calculation unit 17 track the outline of the binary image of the superimposed circular object, and
Outer/inner point sequence data organized as an inner point sequence (Pi
, Fi , Ni ), the data can be separated into outer/inner point sequence data for each convex image part, and the non-representative/inner points are selected from each data and the corresponding Individual arc group data of center coordinates and radius of each individual arc (
Ci.

R,)が得られる。R,) is obtained.

■ 推定円演算部では、前記個別円弧群データが、各個
別円弧の中心座標と、大きさの近い集合に分離され、こ
のようにして得られる同一円・個別円弧群データについ
て、それぞれ、最小2乗法による円としての推定円をめ
る。
■ In the estimated circle calculation unit, the individual circular arc group data is separated into sets of center coordinates and sizes of each individual arc, and for the same circle/individual circular arc group data obtained in this way, a minimum of 2 Calculate the estimated circle as a multiplicative circle.

このように画像の輪郭点に着目し、点集合から円弧集合
、同−昌一合などに多段階で分類していき、かつ速やか
に物体内の推定を行うことができる。
In this way, by focusing on the contour points of the image, it is possible to classify them in multiple stages from a point set to a circular arc set, a circle set, etc., and quickly estimate the inside of the object.

このようにして本発明によれば次のような円形物体の位
置、大きさ、個数を知ることができる。
In this way, according to the present invention, the following positions, sizes, and numbers of circular objects can be known.

(イ)輪郭が円形形状の任意物体について、孔を除外し
て、位置、大きさを知ることができる。
(b) It is possible to know the position and size of any object with a circular outline, excluding holes.

(ロ) 円形物体が重畳し、ていても、輪郭の一部が、
2値画像に表われていれば、分離して検出することがで
きる。
(b) Even if circular objects overlap, part of the outline
If it appears in a binary image, it can be detected separately.

C1外形形状に含まれる円弧部分の位置を知りたい場合
それを検出することができる。
If it is desired to know the position of the circular arc portion included in the C1 external shape, it can be detected.

に) 円形物体でないものを、除外することが可能であ
る。
) It is possible to exclude objects that are not circular.

け) 最小2乗法を用いる推定により、なめらかな円形
形状でなくても、つまり縁がギザギザして、円を包絡線
としているものでも、その形状を近似する円、を、従っ
て前記包絡線となる円も推定できる。
) By estimation using the method of least squares, even if the shape is not a smooth circular shape, that is, even if the edge is jagged and the circle is used as an envelope, a circle that approximates the shape, therefore, becomes the envelope. Yen can also be estimated.

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

第1図は従来の円形物体検出装置の構成を示すブロック
図、第2図、第3図は第1図装置の画像の例を示す図、
第4図は本発明の構成を示すブロック図、第5図は円形
物体の重畳した場合の2値画像を示す図、第6図は一般
の2値画像の境界点を示す図、第7図は3×3マスクに
より連結性の定義を説明する図、第8図は外周点の方向
コードを示す図、第9図は左回りに輪郭点を追跡して方
向コードが動くとき、凸図形では減少方向に逆戻りする
ことはないことを説明する図、第10図は重畳物体の画
像の個別円弧の大きさ、中心をめる方法を示す図、第1
1図は同じく個別円弧の中心と大きさをめる別の方法を
示す図、v、12図は推定円(最小2乗法円)をめる方
法を説明する図である。 符号説明 11・・・・・・円形物体、12・・・・・・撮像手段
、13・・・・・・2値化回路、14・・・・・・画像
情報入力回路、15・・・・・・連結性解析部、16・
・・・・・境界点検出部、17・・・・・・外/内周点
追跡演算部、18・・・・・・円弧演算部、19・・・
・・・推定円演算部、20・・・・・・検出結果出力部
、21・・・・・・物体円検出データ、22・・・・・
・円形物体検出装置。 T 牙6図 牙7図 牙9図 牙12図
FIG. 1 is a block diagram showing the configuration of a conventional circular object detection device, FIGS. 2 and 3 are diagrams showing examples of images of the device shown in FIG.
FIG. 4 is a block diagram showing the configuration of the present invention, FIG. 5 is a diagram showing a binary image when circular objects are superimposed, FIG. 6 is a diagram showing boundary points of a general binary image, and FIG. is a diagram explaining the definition of connectivity using a 3 × 3 mask, Fig. 8 is a diagram showing the direction code of the outer peripheral point, and Fig. 9 is a diagram showing the direction code of the contour point counterclockwise when the direction code moves. Figure 10 is a diagram explaining that there is no reversal in the decreasing direction.
Figure 1 is a diagram showing another method of determining the center and size of an individual arc, and Figures V and 12 are diagrams explaining a method of determining an estimated circle (least squares circle). Description of symbols 11... Circular object, 12... Imaging means, 13... Binarization circuit, 14... Image information input circuit, 15... ... Connectivity Analysis Department, 16.
... Boundary point detection section, 17 ... Outer/inner circumference point tracking calculation section, 18 ... Arc calculation section, 19 ...
...Estimated circle calculation unit, 20...Detection result output unit, 21...Object circle detection data, 22...
・Circular object detection device. T Fang 6 Fig. Fang 7 Fig. Fang 9 Fig. Fang 12 Fig.

Claims (1)

【特許請求の範囲】 1)輪郭に円弧または円弧を包絡線とする形状を有する
複数の物体を撮像した画像をラスター走査したのち、2
値化手段を介して2値化画像に変換し、前記円形物体の
位置と大きさを検出する装置において、前記2値化画像
における前記円形物体のパターンの走査セグメントの端
部の座標、隣接の前走査セグメントとの重なり、を検出
する画像特徴抽出手段と、前記画像特徴抽出手段による
前記型なりの情報に基づき、前記2値化画像の全ての走
査セグメントに独立パターンごとのパターン番号を付加
する連結性解析手段と、同一のパターン番号を有する走
査セグメントの端部の座標な前左回り(右回り)に1周
しズ前記境界点を追跡し、追跡の順に並ぶ各境界点の座
標、該境界点から隣接の境界点に向かう追跡方向を示す
方向コード、からなる外周点列データ、または独立パタ
ーンごとの前記境界点のうち前記外周点列に属する境界
点を除いたものを当該のパターンの内周に沿って前記外
周の場合と同様に追跡し、前記外周点列データと同様な
内周点列データ、のいずれか一方又は両方のデータを出
力する外/内周点追跡演算手段と、前記外/内周点列デ
ータから前記の境界点の追跡における凸画像部の外/内
周点列の座様な区分抽出して外/内周・凸部点列データ
として出力する凸画像部分離手段と、前記外/内周・凸
部点列データを構成する外/内周点を、順次隣接す記外
/内周代表点における、順次隣接する3点を通る個別円
弧の複数個の各中心座標、半径を演算出力する個別円弧
演算手段と、前記個別円弧のうち中心座標、半径の値が
共に近い値を持つものを同一円に属するものとして分離
する同一円・個別円弧演算手段と、同一円に属する前記
の各個別円弧に対応する各データを用いて推定内の中心
座標、半径を演算出力する推定円演算手段と、からなる
ことを特徴とする円形物体検出装置。 2、特許請求の範囲第1項に記載の検出装置において、
前記推定円演算手段は、各個別円弧の中心座標、半径の
各々の平均値を推定円の中心座標、半径のそれぞれの第
1次近似値とし、各個別円弧に対応する外/内周代表点
の少くとも1部からなる点の座標と推定円の中心座標と
の距離から該推定円の半径を差引いた残差の2乗の和を
最小とするような所要次数の逐次近似を行うことを特徴
とする円形物体検出装置。 3)4?許請求の範囲第1項または第2項に記載の検出
装置において、前記凸画像部分離手段は、前記外/内周
点列データにおける前記方向コードの値が、前記の追跡
の順に増加(減少)している区間における外/内周点列
の座標を区分抽出する手段であることを特徴とする円形
物体検出装置。
[Claims] 1) After raster scanning images of a plurality of objects whose contours have circular arcs or circular arcs as envelopes, 2)
In an apparatus for detecting the position and size of the circular object by converting it into a binarized image through a digitizing means, the coordinates of the end of the scanning segment of the pattern of the circular object in the binarized image, an image feature extracting means for detecting an overlap with a previous scanning segment, and adding a pattern number for each independent pattern to all scanning segments of the binarized image based on the pattern information by the image feature extracting means. The connectivity analysis means traces the boundary points one time in the front counterclockwise (clockwise) direction using the coordinates of the end of the scanning segment having the same pattern number, and calculates the coordinates of each boundary point arranged in the tracking order, Direction code indicating the tracking direction from a boundary point to an adjacent boundary point Outer/inner point tracking calculation means that tracks along the inner circumference in the same manner as the outer circumference and outputs either or both of the outer point string data and the same inner point string data; a convex image section for extracting loci-like divisions of the outer/inner circumference point sequence of the convex image section in tracking the boundary points from the outer/inner circumference point sequence data and outputting the resultant data as outer/inner circumference/convex point sequence data; The separating means and the outer/inner points constituting the outer/inner periphery/convex point sequence data are sequentially separated into a plurality of individual arcs passing through three successively adjacent points at adjacent outer/inner periphery representative points. Individual arc calculation means for calculating and outputting each center coordinate and radius; and same circle/individual arc calculation means for separating those individual arcs whose center coordinates and radius values are close to each other as belonging to the same circle. , estimated circle calculation means for calculating and outputting estimated center coordinates and radius using each data corresponding to each of the individual arcs belonging to the same circle. 2. In the detection device according to claim 1,
The estimated circle calculation means uses the average values of the center coordinates and radius of each individual arc as first approximations of the center coordinates and radius of the estimated circle, and calculates the outer/inner representative points corresponding to each individual arc. Perform successive approximation of the required order to minimize the sum of the squares of the residuals obtained by subtracting the radius of the estimated circle from the distance between the coordinates of a point consisting of at least a portion of the estimated circle and the center coordinates of the estimated circle. Characteristic circular object detection device. 3) 4? In the detection device according to claim 1 or 2, the convex image portion separation means is configured to detect a value of the direction code in the outer/inner circumferential point sequence data that increases (decreases) in the order of the tracking. ) A circular object detection device characterized in that it is a means for extracting coordinates of outer/inner circumferential points in a section.
JP58138571A 1983-07-28 1983-07-28 Detector for circular body Granted JPS6029878A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58138571A JPS6029878A (en) 1983-07-28 1983-07-28 Detector for circular body

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58138571A JPS6029878A (en) 1983-07-28 1983-07-28 Detector for circular body

Publications (2)

Publication Number Publication Date
JPS6029878A true JPS6029878A (en) 1985-02-15
JPH024948B2 JPH024948B2 (en) 1990-01-31

Family

ID=15225240

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58138571A Granted JPS6029878A (en) 1983-07-28 1983-07-28 Detector for circular body

Country Status (1)

Country Link
JP (1) JPS6029878A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6219989A (en) * 1985-07-18 1987-01-28 Fuji Electric Co Ltd Discrimination method for superposed pattern
JPS6270988A (en) * 1985-09-24 1987-04-01 Agency Of Ind Science & Technol Ellipse detecting system
JPS6319087A (en) * 1986-07-11 1988-01-26 Nissan Motor Co Ltd Central point detecting method for circle and circular arc
JPS6336380A (en) * 1986-07-30 1988-02-17 Toshiba Corp Recognizing device for drilling position
JPS63219086A (en) * 1987-03-06 1988-09-12 Ckd Corp Image area measuring instrument
JP2002267428A (en) * 2001-03-14 2002-09-18 Nec Corp Apparatus and method for inspecting outer shape of land
US6859555B1 (en) * 2000-09-19 2005-02-22 Siemens Corporate Research, Inc. Fast dominant circle detection through horizontal and vertical scanning
JP2009253197A (en) * 2008-04-10 2009-10-29 Yamatake Corp Method and apparatus for detecting center position, and method and apparatus for adjusting center position

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6219989A (en) * 1985-07-18 1987-01-28 Fuji Electric Co Ltd Discrimination method for superposed pattern
JPS6270988A (en) * 1985-09-24 1987-04-01 Agency Of Ind Science & Technol Ellipse detecting system
JPS6319087A (en) * 1986-07-11 1988-01-26 Nissan Motor Co Ltd Central point detecting method for circle and circular arc
JPS6336380A (en) * 1986-07-30 1988-02-17 Toshiba Corp Recognizing device for drilling position
JPS63219086A (en) * 1987-03-06 1988-09-12 Ckd Corp Image area measuring instrument
US6859555B1 (en) * 2000-09-19 2005-02-22 Siemens Corporate Research, Inc. Fast dominant circle detection through horizontal and vertical scanning
JP2002267428A (en) * 2001-03-14 2002-09-18 Nec Corp Apparatus and method for inspecting outer shape of land
JP4590759B2 (en) * 2001-03-14 2010-12-01 日本電気株式会社 Land appearance inspection apparatus and land appearance inspection method
JP2009253197A (en) * 2008-04-10 2009-10-29 Yamatake Corp Method and apparatus for detecting center position, and method and apparatus for adjusting center position

Also Published As

Publication number Publication date
JPH024948B2 (en) 1990-01-31

Similar Documents

Publication Publication Date Title
US5796868A (en) Object edge point filtering system for machine vision
JP2007508633A (en) Method and image processing device for analyzing object contour image, method and image processing device for detecting object, industrial visual device, smart camera, image display, security system, and computer program product
CN109409208A (en) A kind of vehicle characteristics extraction and matching process based on video
CN111832659B (en) Laser marking system and method based on feature point extraction algorithm detection
WO2002077911A1 (en) Automatic detection of alignment or registration marks
CN115439476A (en) Silk-screen defect detection method and device based on image analysis
JPS6029878A (en) Detector for circular body
CN115131363A (en) Positioning method and device based on semantic information and terminal equipment
US20030103659A1 (en) Fingerprint matching method and apparatus
US20180089507A1 (en) Pairing of images of postal articles with descriptors of singularities of the gradient field
CN114359322A (en) Image correction and splicing method, and related device, equipment, system and storage medium
JP3460356B2 (en) Method and apparatus for detecting circle or ellipse
Chiang et al. Extracting road vector data from raster maps
CN113658089B (en) Dual-data stream fusion object identification method based on depth camera
GB2272285A (en) Determining the position of edges and corners in images.
JP3580088B2 (en) Appearance inspection method
CN109740402B (en) Two-dimensional code direction and position obtaining method based on frequency spectrum information
JPH08263655A (en) Pattern recognition method
Achanccaray et al. On the Assessment of Instance Segmentation for the Automatic Detection of Specific Constructions from Very High Resolution Airborne Imagery
RU2778906C1 (en) Method for automatically recognizing scenes and objects in an image
CN113269188B (en) Mark point and pixel coordinate detection method thereof
JP3371614B2 (en) Recognition device
JP2964594B2 (en) Mark inspection method
JPH07192134A (en) Image processing method
JP3163306B2 (en) Pattern inspection method and apparatus