JPS62159292A - Recognizing method for position of machine screw hole - Google Patents

Recognizing method for position of machine screw hole

Info

Publication number
JPS62159292A
JPS62159292A JP61000886A JP88686A JPS62159292A JP S62159292 A JPS62159292 A JP S62159292A JP 61000886 A JP61000886 A JP 61000886A JP 88686 A JP88686 A JP 88686A JP S62159292 A JPS62159292 A JP S62159292A
Authority
JP
Japan
Prior art keywords
screw hole
machine screw
line drawing
image
calculating
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
JP61000886A
Other languages
Japanese (ja)
Other versions
JPH0636190B2 (en
Inventor
Haruhiko Yokoyama
晴彦 横山
Daisuke Ogawara
大河原 大輔
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP61000886A priority Critical patent/JPH0636190B2/en
Publication of JPS62159292A publication Critical patent/JPS62159292A/en
Publication of JPH0636190B2 publication Critical patent/JPH0636190B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To estimate the center of a machine screw hole by using a part of the periphery, even when a difference of brightness of the machine screw hole and a background is not so large, by providing a machine screw hole position calculating process for calculating a position of the center of the machine screw hole from a line drawing data. CONSTITUTION:The titled method consists of a line thinning process for generating an image data by extracting a part where brightness is varied, from a two-dimensional variable density image data which has been inputted by an image input device, a machine screw hole existence deciding process for calculating a curvature of a curve on a line drawing data and deciding whether a machine screw hole of a given diameter exists in the original image or not, and a machine screw hole position calculating process for calculating a position of the center of the machine screw hole from the line drawing data. According to this constitution, a round pattern of the machine screw hole can be discriminated from other graphic of the same size by calculating a curve, and also in case when brightness of the background of the machine screw hole is not uniform as shown in the figure by using an image operator, and even when a difference of the brightness of the hole and the background is not so large, a contour of the machine screw hole can be detected.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、画像データからビス穴位置を計算する、ビス
穴位置認識方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to a screw hole position recognition method for calculating screw hole positions from image data.

従来の技術 近年、ビス穴位置認識方法は、画像データを固定しきい
値で二値化したものをx、y方向に投影したデータを用
いてビス穴位置を計算する方法が用いられている。
BACKGROUND OF THE INVENTION In recent years, as a screw hole position recognition method, a method has been used in which the screw hole position is calculated using data obtained by binarizing image data using a fixed threshold value and projecting it in the x and y directions.

以下、図面を参照しながら、上述した従来のビス穴位置
認識方法について説明する。
The conventional screw hole position recognition method described above will be described below with reference to the drawings.

第1図はビス穴の説明図である。第2図は第1図のビス
穴をカメラから入力して二値化したものである。第3図
は第2図の二値化データから、I。
FIG. 1 is an explanatory diagram of screw holes. Figure 2 shows the screw holes in Figure 1 inputted from a camera and binarized. Figure 3 shows I from the binarized data in Figure 2.

y方向の投影データに変換したものである。第4図はビ
ス穴の背景の明るさが均一でない場合のビス穴の画像デ
ータである。第6図は第4図の画像データを二値化した
ものである。第6図は第6図の二値化データから、” 
+ 7方向の投影データに変換したものである。
This is data converted to projection data in the y direction. FIG. 4 shows image data of a screw hole when the background brightness of the screw hole is not uniform. FIG. 6 shows the binarized image data of FIG. 4. Figure 6 is from the binarized data in Figure 6.
+ It is converted into projection data in 7 directions.

次に、上記従来のビス穴位置認識方法について図面を参
照して具体的に説明する。
Next, the conventional screw hole position recognition method described above will be specifically explained with reference to the drawings.

まずカメラなどの画像入力装置で第1図の画像データを
入力して記憶回路に格納する。記憶回路に格納されたデ
ータは多階調の画像データであり、これを適当な二値化
レベルで二値化して第2図の画像を得る。二値化データ
について、画像上で同じX座標を持つデータの和をそれ
ぞれのX座標について計算したものがX座標の投影デー
タであり、yについて同様の計算を行なったものがy座
標の投影データである。第3図は、第2図の二値化デー
タについて、X座標、y座標の投影データを作ったもの
である。画像の中にビス穴が存在する場合、投影データ
のグラフには、幅、高さが共にビス穴の径に等しい図形
が表われるはずである。そこで、投影データにおいて、
幅、高さが共にビス穴の径に等しいような図形を探し、
その中心座標を計算することによってビス穴のX座標、
y座標が得られる。
First, the image data shown in FIG. 1 is input using an image input device such as a camera and stored in a storage circuit. The data stored in the memory circuit is multi-gradation image data, which is binarized at an appropriate binarization level to obtain the image shown in FIG. Regarding binarized data, the sum of the data with the same X coordinate on the image is calculated for each X coordinate, and that is the X coordinate projection data, and the same calculation for Y is the y coordinate projection data. It is. FIG. 3 shows projection data of the X and Y coordinates of the binarized data of FIG. 2. If a screw hole exists in the image, a figure whose width and height are both equal to the diameter of the screw hole should appear on the projection data graph. Therefore, in the projection data,
Find a shape whose width and height are both equal to the diameter of the screw hole,
By calculating its center coordinate, the X coordinate of the screw hole,
The y coordinate is obtained.

発明が解決しようとする問題点 しかしながら上記のような構成では、前に述べたように
ビス穴の丸いパターンと、同じような大きさの他の図形
とを区別できず、また、第4図のようにビス穴の背景の
明るさが均一でない場合や、穴と背景の明るさの差があ
まり無いときなどは、第6図のように、二値化してもビ
ス穴の丸いパターンが現われないだめ、第6図に見られ
るように投影データにビス穴に相当するような図形が現
われず、ビス穴の位置がわからないという問題点がある
Problems to be Solved by the Invention However, with the above configuration, it is not possible to distinguish between the round pattern of screw holes and other shapes of similar size, as described above, and the problem shown in FIG. If the background brightness of the screw hole is not uniform, or if there is not much difference in brightness between the hole and the background, the round pattern of the screw hole will not appear even after binarization, as shown in Figure 6. Unfortunately, as shown in FIG. 6, no figure corresponding to the screw hole appears in the projection data, so there is a problem that the position of the screw hole cannot be determined.

本発明は上記問題点に鑑み、ビス穴の丸いパターンと、
同じような大きさの他の図形との区別を可能にし、また
、ビス穴の背景の明るさが均一でない場合や、ビス穴と
背景の明るさの差があまり無いときでも、円周の一部を
用いてビス穴中心を推定できるようなビス穴位置認識方
法を提供するものである。
In view of the above problems, the present invention has a round pattern of screw holes,
It makes it possible to distinguish shapes from other shapes of similar size, and even when the background brightness of the screw hole is not uniform or there is not much difference in brightness between the screw hole and the background, it is possible to distinguish the shape from one circumference. The present invention provides a screw hole position recognition method that allows the center of the screw hole to be estimated using the area.

問題点を解決するための手段 上記問題点を解決するために本発明のビス穴認識方法は
、画像入力装置を用いて入力した二次元濃淡画像データ
から明るさの変化する部分を抽出して線画データを生成
する細線化工程と、上記線画データ上の曲線の曲率を計
算してもとの画像の中に与えられた径のビス穴が存在す
るかどうかを判定するビス穴存在判定工程と、上記線画
データからビス穴中心の位置を計算するビス穴位置計算
工程からなるものである。
Means for Solving the Problems In order to solve the above-mentioned problems, the screw hole recognition method of the present invention extracts parts where the brightness changes from two-dimensional grayscale image data input using an image input device and generates line drawings. a thinning step of generating data; a screw hole existence determination step of determining whether a screw hole of a given diameter exists in the original image by calculating the curvature of the curve on the line drawing data; This process consists of a screw hole position calculation step of calculating the center position of the screw hole from the line drawing data.

作  用 本発明は上記の構成により、曲率を計算することによっ
てビス穴の丸いパターンと、同じようなまた、 大きさの他の図形とを区別できるように昨象オペレータ
を用いることにより、第4図のようにビス穴の背景の明
るさが均一でない場合や、穴と背景の明るさの差があま
り無いときでも、ビス穴の輪郭を検出できるようにした
Operation The present invention has the above-mentioned configuration, and uses a previous image operator to distinguish between a round pattern of screw holes and other shapes of similar size by calculating the curvature. The outline of a screw hole can now be detected even when the background brightness of the screw hole is not uniform, as shown in the figure, or when there is not much difference in brightness between the hole and the background.

実施例 以下、本発明の一実施例について、図面を参照しながら
説明する。
EXAMPLE Hereinafter, an example of the present invention will be described with reference to the drawings.

第7図は拡張ラプラシアンオペレータである。FIG. 7 shows the extended Laplacian operator.

第8図はラプラシアン画像を二値化したものである。第
9図は第8図の画像からノイズを除去した、細線化のた
めのマスク領域である。第10は尾根点抽出の説明図で
ある。第11図はベクトルの8近傍でちる。第12図は
細線化のだめの条件得点対応表である。第13図は線画
データである。第14図は方向ベクトルとビットの対応
図である。
FIG. 8 shows a binarized Laplacian image. FIG. 9 shows a mask area for thinning lines from which noise has been removed from the image shown in FIG. The tenth is an explanatory diagram of ridge point extraction. Figure 11 shows the 8-neighbourhood of the vector. FIG. 12 is a condition score correspondence table for thinning. FIG. 13 shows line drawing data. FIG. 14 is a diagram showing the correspondence between direction vectors and bits.

第15図は線画データをそのまま分岐ベクトル表現にし
たものである。第16図は線画データについてループが
発生しないような制約条件を設けて分岐ベクトル表現に
したものである。第17図は分岐点の説明図である。第
18図は分岐切断の説明図である。第19図は円周の半
径と角度変化量との関係図である。第20図は線画の曲
率計算の説明図である。第21図は円弧中心算出の説明
図である。第22図は線画データから抽出された円弧と
、円弧中心の推定位置を示した図である。
FIG. 15 shows line drawing data directly expressed as a branch vector. In FIG. 16, line drawing data is expressed as a branch vector by setting a constraint so that a loop does not occur. FIG. 17 is an explanatory diagram of branch points. FIG. 18 is an explanatory diagram of branch cutting. FIG. 19 is a diagram showing the relationship between the radius of the circumference and the amount of change in angle. FIG. 20 is an explanatory diagram of curvature calculation of a line drawing. FIG. 21 is an explanatory diagram of arc center calculation. FIG. 22 is a diagram showing arcs extracted from line drawing data and the estimated position of the center of the arc.

次に、本実施例のビス穴位置認識方法について、具体的
に説明する。
Next, the screw hole position recognition method of this embodiment will be specifically explained.

〔,1+lIl線化工程〕 まず、画像入力装置を用いて入力した二次元濃淡画像デ
ータから明るさの変化する部分を抽出して線画データを
生成する細線化工程について動作を説明する。
[,1+lIl Lineization Step] First, the operation of the thinning step of generating line drawing data by extracting a portion where the brightness changes from two-dimensional grayscale image data input using an image input device will be described.

(−)  フィルタリング 画像データの細線化の前提として、第7図のオペレータ
を用いて、明るさの変化する部分を強調するようなフィ
ルタリング処理を行なう。このオペレータは、平滑化オ
ペレータを正規化したものと、原画との差に等しい。平
滑化オペレータは低周波成分を抽出するので、平滑化オ
ペレータと原画との差をとるこのオペレータは、高周波
成分抽出オペレータである。このオペレータは、3×3
のラプラシアンオペレータを11X11のサイズにひき
のばしたものであり、ラプラシアンオペレータと同じよ
うに、輪郭強調フィルタとしての性格を持っているので
、拡張ラプラシアンオペレータと呼び、このオペレータ
を用いて変換された画像をラプラシアン画像と呼ぶこと
にする。
(-) Filtering As a premise for thinning the image data, the operator shown in FIG. 7 is used to perform filtering processing that emphasizes areas where brightness changes. This operator is equal to the difference between the normalized smoothing operator and the original image. Since the smoothing operator extracts low frequency components, this operator that takes the difference between the smoothing operator and the original image is a high frequency component extraction operator. This operator is 3x3
The Laplacian operator is expanded to a size of 11x11, and like the Laplacian operator, it has the characteristics of an edge enhancement filter, so it is called the extended Laplacian operator, and images converted using this operator. is called a Laplacian image.

(b)  細線化 ラプラシアン画像から線要素を抽出する方法は、第10
図のように明るさを高さとみなしたときの、画像の尾根
を求めてゆくことによって実現される。
(b) The method for extracting line elements from a thinned Laplacian image is described in the 10th
This is achieved by finding the ridge of the image when brightness is considered as height, as shown in the figure.

本方法では、ラプラシアン画像を固定しきい値で二値化
した画像からノズズ成分を除去して得られる二値画像を
マスクとし、そのマスク内について尾根点と判断される
点のみを線画点とした。第8図は上記ラプラシアン画像
を固定しきい値で二値化したものであるが、オペレータ
の特性から非常に多くのノイズ成分を含んだものになっ
てしまう。そこで、二値画像から面積が一定値より小さ
い連結領域を除去したものをマスク領域として、尾根点
の抽出を行なう。第9図がマスク領域となる。尾根点の
抽出は次に示す2つのステップで実現される。
In this method, a binary image obtained by removing the nozzle component from a binarized Laplacian image using a fixed threshold value is used as a mask, and only points within the mask that are determined to be ridge points are set as line drawing points. . FIG. 8 shows the above-mentioned Laplacian image binarized using a fixed threshold value, but due to the characteristics of the operator, the image contains a very large number of noise components. Therefore, ridge points are extracted using a mask region obtained by removing connected regions whose area is smaller than a certain value from a binary image. FIG. 9 becomes the mask area. Extraction of ridge points is achieved by the following two steps.

(ステップ1) ラプラシアン画像から尾根点の抽出を行なうに際し、各
点の得点を計算する。ここで水平・垂直・および2対角
方向について、中央点の明るさがほかの2点より大きく
なる場合、その線を中央極大と呼ぶ。この中央極大とな
る線は、水平・垂直方向と対角方向とではその距離が異
なるだめ重みづけが必要となる。そのため第12図に示
す得点を条件を満たす各方向に対して加算し、中央点の
得点とする。各得点の値は水平または垂直方向と対角方
向で約1.4:1になるように選んである。
(Step 1) When extracting ridge points from the Laplacian image, calculate the score of each point. Here, in the horizontal, vertical, and two diagonal directions, if the brightness of the central point is greater than the other two points, that line is called a central maximum. Since the distance of this central maximum line is different in the horizontal/vertical direction and in the diagonal direction, it is necessary to weight it. Therefore, the scores shown in FIG. 12 are added for each direction that satisfies the conditions, and the score is determined as the center point. The value of each score is selected to be approximately 1.4:1 in the horizontal or vertical direction and in the diagonal direction.

(ステップ2) ステップ1で得られた得点が3を越す画素を線画点とし
、3未満の画素を非線画点とする。得点が3に等しい場
合には、次の2つの条件を満たす画素のみを線画点とし
、それ以外の画素は非線画点とする。
(Step 2) Pixels whose scores obtained in step 1 exceed 3 are defined as line drawing points, and pixels with scores less than 3 are defined as non-line drawing points. If the score is equal to 3, only the pixels that satisfy the following two conditions are set as line drawing points, and the other pixels are set as non-line drawing points.

(但しXa=Xo) (2)  T(XO)=1or T(X2)=1 or
 T(X4)=1or T(X6)=1 但L  T(Xi)=1:P(Xi))3=o:その他 p(Xi)は第11図に示す8近傍の各点に対応する得
点。
(However, Xa=Xo) (2) T(XO)=1or T(X2)=1or
T(X4)=1or T(X6)=1 However, L T(Xi)=1:P(Xi))3=o:Other p(Xi) is the score corresponding to each point in the 8 neighborhood shown in Figure 11 .

(C)ベクトル化 以上のようにして得られた線画データ(第13図)はノ
イズを多く含んでいる。そこで、分岐ベクトルという概
念を用いて、不要なノイズの除去をおこなった。
(C) Vectorization The line drawing data obtained in the above manner (FIG. 13) contains a lot of noise. Therefore, we used the concept of branch vectors to remove unnecessary noise.

以下、分岐ベクトルについて、説明する。The branch vector will be explained below.

分岐ベクトルは第14図に示すように画像上の各点がそ
れぞれ8ビツトの値をもち、その各ビットはそれぞれそ
の画素に連結する画素の方向成分を表わす。但し、第1
4図に示しだすべての方向に対応するビットをセットす
ると、ループが多く発生するので、線画データを分岐ベ
クトル表現に変換する際に次に示すような制約条件を設
けた。
As shown in FIG. 14, in the branch vector, each point on the image has an 8-bit value, and each bit represents the direction component of the pixel connected to that pixel. However, the first
If the bits corresponding to all directions shown in Figure 4 are set, many loops will occur, so the following constraints were set when converting line drawing data into branch vector representation.

垂直(04,40)、水平(01,10)方向に連結成
分が存在する場合、その両隣の斜め方向の線画点は連結
成分としない。
When connected components exist in the vertical (04, 40) and horizontal (01, 10) directions, line drawing points in diagonal directions on both sides thereof are not considered as connected components.

この制約条件がない場合、線画データは第15図のよう
に変換され、制約条件を付加すると、第16図のように
変換される。上記の方法で線画データを分岐ベクトルに
変換すると、孤立点は近傍を持たないため値が0となる
。すなわち、分岐ベクトルへの変換によって孤立点が除
去できる。
If this constraint does not exist, the line drawing data is converted as shown in FIG. 15, and if the constraint is added, it is converted as shown in FIG. 16. When line drawing data is converted into a branch vector using the above method, the value becomes 0 because the isolated point has no neighbors. That is, isolated points can be removed by converting to a branch vector.

〔ビス穴存在判定工程〕[Screw hole presence determination process]

以下、線画データ上の曲線の曲率半径を計算してもとの
画像の中に与えられた径のビス穴が存在するかどうかを
判定するビス穴存在判定工程について説明をおこなう。
The screw hole presence determination step of determining whether a screw hole with a given diameter exists in the original image by calculating the radius of curvature of the curve on the line drawing data will be described below.

(−)  分岐切断 分岐ベクトル画像ではすべての点は、第17図に示すよ
うに、1′−4分岐点になっている。しかし円弧性の判
定をするためには、線が端点と中間点のみからなるもの
でなければならない。このため、「分岐の切断」過程で
は、3分岐点、4分岐点をすべて1分岐点、2分岐点に
変換しておく。その方法としては、 3分岐点を1分岐点と2分岐点 4分岐点を2分岐点と2つの1分岐点 に変換することすなわち切断をおこなうことで実現して
いる。この切断をおこなう際には、「対象となるビス穴
と曲率半径が近い線のみを残し、他は切断する。」とい
う基準に従った。
(-) All points in the branch/cut branch vector image are 1'-4 branch points, as shown in FIG. However, in order to determine circularity, the line must consist of only end points and midpoints. Therefore, in the "branch cutting" process, all three and four branch points are converted into one and two branch points. This method is realized by converting 3 branch points into 1 branch point and 2 branch points, and converting 4 branch points into 2 branch points and 2 1 branch points, that is, by performing cutting. When making this cut, we followed the standard: ``Only the line with a radius of curvature close to the target screw hole is left, and the others are cut.''

分岐の切断過程について、第18図を用いて説明をする
。第18図(a)は3分岐点の例であるが、点p75.
らはそれぞれP Ao A1.P Bo B1. PC
The branch cutting process will be explained using FIG. 18. FIG. 18(a) is an example of three branch points, including point p75.
and P Ao A1. P Bo B1. PC
.

C1の3方向の分岐をもつ。点Ao、Bo、C。It has branches in three directions of C1. Points Ao, Bo, C.

はそれぞれ点Pから長さLの腕を伸ばした点、点A1.
B1.C1はそれぞれ点Ao 、 Bo 、 C。
are the points where an arm of length L is extended from point P, and point A1.
B1. C1 is the point Ao, Bo, C respectively.

から長さLの腕を伸ばした点である。これらの点に対し
図に示すように仰角θik  をとる。これらの仰角を
用いて、点Pから分岐可能なすべての2方向の線の組み
合わせに対し、Lの長さづつ線をたどったときの曲線の
角度変化量 dθ1=θ、1−θi。
This is the point where an arm of length L is extended from. For these points, take the elevation angle θik as shown in the figure. Using these elevation angles, the angle change amount of the curve dθ1=θ, 1−θi when the line is traced by the length of L for all combinations of lines in two directions that can be branched from the point P.

dθ2=θko−π−θ10 dθ3″″θko−θに1 を計算する。さて、与えられたビス穴の半径をrとした
とき、第19図にみられるように、円周をLだけたどっ
たときの角度変化量はL /rとなる。
Calculate dθ2=θko−π−θ10 dθ3″″θko−θ as 1. Now, when the radius of a given screw hole is r, as shown in FIG. 19, the amount of angular change when tracing the circumference by L is L/r.

従ってdθ1.dθ2.dθ3とL/r  との差の和
1dθ1−L/r1+1dθ2  L/ r l + 
l dθ3L/ r lが最小になる点のみを残してあ
とは切断する。
Therefore, dθ1. dθ2. Sum of differences between dθ3 and L/r 1dθ1−L/r1+1dθ2 L/ r l +
Leave only the point where l dθ3L/r l becomes minimum and cut the rest.

0))円弧抽出 分岐切断された線画データは、分岐のない曲線の集合と
なっているので、ビス穴の穴径と同じ曲率半径を持つ線
を探せばよい。しかし、濃淡画像データを変換して線面
データにする場合、もとの画像ではきれいな円弧であっ
ても、画面の明るさのムラなどによシ線画データに変換
したときにでは完全な円弧にならないことが普通である
。そこで、完全な円弧でなくても曲率を計算できるよう
にするため、曲線を分割し、曲線の部分ごとに曲率を計
算して、それらの平均(以下、平均曲率とよぶことにす
る)を近似的に曲線の曲率とする。
0)) Arc extraction Since the branched and cut line drawing data is a collection of curves without branches, all you have to do is search for a line that has the same radius of curvature as the diameter of the screw hole. However, when converting grayscale image data to line data, even if the arc is beautiful in the original image, it may become a perfect arc when converted to line drawing data due to uneven brightness on the screen. It is normal not to. Therefore, in order to be able to calculate the curvature even if it is not a complete arc, the curve is divided into parts, the curvature is calculated for each part of the curve, and the average of these (hereinafter referred to as the average curvature) is approximated. curvature of the curve.

計算方法をもう少し詳しくのべる。Let me explain the calculation method in more detail.

曲線を次のように曲線上の点の集合で表わすことにする
Let us represent a curve as a set of points on the curve as follows.

(p x (i)、py(i)) + 1≦l≦L但し
、Lは曲線の長さ、点の添字は曲線上におけるものと同
じ順番 平均曲率を計算するためのパラメータp、qを与えてや
り、(p + qはそれぞれ、曲線を分割したときの線
分の長さと、角度変化を測る点の間の距離に相当する。
(p x (i), py (i)) + 1≦l≦L However, L is the length of the curve, and the subscripts of the points are the same order as on the curve. (p + q corresponds to the length of the line segment when dividing the curve and the distance between the points at which the angle change is measured, respectively.

認識がしやすいように、経験的に定めてやればよいが、
目安としては、p、q共に画面上のムラに影響されない
程度に大きく、部分曲率を計算するだめのサンプル点の
数があまり少なくならないように定める。曲線のi番目
の点と、(i +p )番目の点を結んだ線の角度をa
rg(i)とする(第20図を参照)。
It would be better to define it empirically to make it easier to recognize, but
As a guideline, both p and q are set so that they are large enough not to be affected by unevenness on the screen, and the number of sample points for calculating the partial curvature is not too small. The angle of the line connecting the i-th point of the curve and the (i + p )-th point is a
rg(i) (see Figure 20).

次にi番目の点と、(i +q )番目の点の間の角度
の差 arg (i +q ) −arg (i)から、この
位置における曲率curv (i)はcurv(i)=
(arg(i +q)−arg(i月/d(i、q)但
し、d(i 1(1)はp(i)とp(i+q)間の距
離として求められる。
Next, from the difference in angle between the i-th point and the (i + q)-th point arg (i + q) - arg (i), the curvature curv (i) at this position is calculated as curv (i) =
(arg (i + q) - arg (i month/d (i, q) where d (i 1 (1) is calculated as the distance between p (i) and p (i + q).

平均曲率は、curv (i)を、曲線上の点(但し線
の端の方は除く)にわたって平均をとったものである。
The average curvature is the average of curv (i) over points on the curve (excluding the ends of the line).

また、平均を計算するときに、分散もあわせて算出して
おく(曲率分散とよぶことにする。)。
Furthermore, when calculating the average, the variance is also calculated (hereinafter referred to as curvature variance).

曲率分散が小さいほど、線の曲がシ具合が一定なので、
完全な円弧に近い。平均曲率が、与えられたビス穴径に
近く、また曲率分散が小さいものを選ぶようにすれば、
ビス穴を見つけることができる。
The smaller the curvature variance, the more constant the curve of the line, so
Almost a perfect arc. If you choose one whose average curvature is close to the given screw hole diameter and whose curvature variance is small,
You can find the screw holes.

〔ビス穴位置計算工程〕[Screw hole position calculation process]

以下、線画データからビス穴中心位置を計算するビス穴
位置計算部についての説明をする。
The screw hole position calculation section that calculates the screw hole center position from line drawing data will be explained below.

体)円弧中心推定 すでに述べたように、抽出された円弧は、完全な円弧に
なっているとは限らないので、以下に述べるような方法
で円弧の中心を推定する。
Body) Arc center estimation As mentioned above, the extracted circular arc is not necessarily a perfect circular arc, so the center of the circular arc is estimated by the method described below.

円弧を分割し、分割された円弧の部分ごとに、線の方向
と、すでに算出されている平均曲率を用いて、部分円弧
中心を求め、その平均を円弧中心とする。具体的な算出
式は以下の通り0曲線のi番目の点と(i+1)番目の
点を結ぶ線分と、平均曲率mcから、円弧の推定中心(
estx(i)、esty(i))は第21図かられか
るようにestx(i)= px (i )+cos(
arg(i )+yr/2)/mc=px (i)−s
in(arg(i))/mCe5ty(i)=py(i
)+sin(arg(i)+yr/2 )/mC= p
y (i )+cos (arg’(i ))/mcの
ように算出される。
The arc is divided, and the center of the partial arc is determined for each part of the divided arc using the direction of the line and the average curvature that has already been calculated, and the average is set as the center of the arc. The specific calculation formula is as follows: The estimated center of the arc (
estx(i), esty(i)) are as shown in Figure 21, estx(i)=px(i)+cos(
arg(i)+yr/2)/mc=px(i)-s
in(arg(i))/mCe5ty(i)=py(i
)+sin(arg(i)+yr/2)/mC=p
It is calculated as y(i)+cos(arg'(i))/mc.

estx(i)、 esty(i)  の曲線上の点に
わたっての平均を円弧の推定中心とする。上記の方法に
より、線画から抽出された円弧が歪んでいる場合でも、
曲率計算と中心位置計算の三箇所で平均化を行なってい
るために、現実に近い中心位置が得られる。
The estimated center of the arc is the average over the points on the curve of estx(i) and esty(i). With the above method, even if the arc extracted from the line drawing is distorted,
Since averaging is performed at three points: curvature calculation and center position calculation, a center position close to reality can be obtained.

第22図に、上記の方法で抽出された円弧とそれぞれの
円弧についての推定中心位置(プラスマーク)を示した
FIG. 22 shows the circular arcs extracted by the above method and the estimated center position (plus mark) for each circular arc.

発明の効果 以上のように、本発明は、テレビカメラなどの画像入力
装置を用いて入力した二次元濃淡画像データから明るさ
の変化する部分を抽出して線画データを生成する細線化
工程と、上記線画データ上の曲線の曲率半径を計算して
もとの画像の中に与えられた径のビス穴が存在するかど
うかを判定するビス穴存在判定工程と、上記線画データ
からビス穴中心の位置を計算するビス穴位置計算部とか
らなり、従来の画像データを二値化したものをX。
Effects of the Invention As described above, the present invention includes a thinning step of generating line drawing data by extracting a portion where brightness changes from two-dimensional grayscale image data input using an image input device such as a television camera; A screw hole existence determination step in which the radius of curvature of the curve on the line drawing data is calculated to determine whether a screw hole with a given diameter exists in the original image; It consists of a screw hole position calculation section that calculates the position, and is the binary version of conventional image data.

y方向に投影したデータから重心を計算する方法に比べ
、ビス穴の判別を確実にし、また照明などが悪いために
ビス穴の背景の明るさが均一でない場合や、穴と背景の
明るさの差があま9無いときなどでも、円周の一部を用
いてビス穴位置を推定でき、その実用的効果は大きいも
のがある。
Compared to the method of calculating the center of gravity from data projected in the y-direction, it is more reliable in identifying screw holes, and can be used when the background brightness of the screw hole is not uniform due to poor lighting, or when the brightness between the hole and the background is different. Even when the difference is small, the screw hole position can be estimated using a part of the circumference, which has a great practical effect.

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

第1図はビス穴の画像データ、第2図は第1図の画像デ
ータを二値化した図、第3図は第2図の二値化データか
ら、X、7方向の投影データに変換した図、第4図はビ
ス穴の背景の明るさが均一でない場合のビス穴の画像デ
ータを示す図、第6図は第4図の画像データを二値化し
た図、第6図は第5図の二値化データから、” + 1
方向の投影データに変換した図、第7図は拡張ラプラシ
アンオペレータを示す図、第8図はラプラシアン画像を
二値化した図、第9図は第8図の画像からノイズを除去
した細線化のだめのマスク領域を示した図、第10図は
尾根点抽出の説明図、第11図はベクトルの8近傍を示
す図、第12図は細線化のだめの条件得点対応を示す図
、第13図は線画データを示す図、第14図は方向ベク
トルとビットの対応図、第15図は線画データをそのま
ま分岐ベクトル表現にしだ図、第16図は線画データに
ついてループが発生しないような制約条件を設けて分岐
ベクトル表現にした図、第17図は分岐点の説明図、第
18図は分岐切断の説明図、第19図は円周の半径と角
度変化量との関係図、第20図は線画の曲率計算の説明
図、第21図は円弧中心算出の説明図、第22図は線画
データから抽出された円弧と、円弧中心の推定位置を示
した図である。 代理人の氏名 弁理士 中 尾 敏 男 ほか1名第1
図 第2図 第4図 第6図 第7図 第8図 第9VA 第1011m 第】1図    第12図 第13図 第14図 第15図    第16図 第17図 第18図 ((L)              (b)第20図 「−二一一 第21図
Figure 1 is the image data of the screw hole, Figure 2 is the binarized image data of Figure 1, and Figure 3 is the conversion of the binary data of Figure 2 to projection data in the X and 7 directions. Fig. 4 shows the image data of the screw hole when the background brightness of the screw hole is not uniform, Fig. 6 shows the binarized image data of Fig. 4, and Fig. 6 shows the image data of the screw hole when the background brightness of the screw hole is not uniform. From the binarized data in Figure 5, “ + 1
Figure 7 shows the extended Laplacian operator, Figure 8 shows the binarized Laplacian image, and Figure 9 shows the image in Figure 8 after being thinned by removing noise. Figure 10 is an explanatory diagram of ridge point extraction, Figure 11 is a diagram showing 8 neighborhoods of a vector, Figure 12 is a diagram showing condition score correspondence for thinning, and Figure 13 is a diagram showing the condition score correspondence for line thinning. Figure 14 is a diagram showing line drawing data. Figure 14 is a diagram showing the correspondence between direction vectors and bits. Figure 15 is a diagram showing how line drawing data is expressed as a branch vector. Figure 16 is a diagram that sets constraint conditions to prevent loops from occurring for line drawing data. Figure 17 is an explanatory diagram of branching points, Figure 18 is an explanatory diagram of branch cutting, Figure 19 is a diagram of the relationship between the radius of the circumference and the amount of angular change, and Figure 20 is a line drawing. FIG. 21 is an explanatory diagram of calculation of the arc center, and FIG. 22 is a diagram showing the arc extracted from line drawing data and the estimated position of the arc center. Name of agent: Patent attorney Toshio Nakao and 1 other person No. 1
Figure 2 Figure 4 Figure 6 Figure 7 Figure 8 Figure 9 VA 1011m Figure 1 Figure 12 Figure 13 Figure 14 Figure 15 Figure 16 Figure 17 Figure 18 ((L) b) Figure 20 "-211 Figure 21

Claims (1)

【特許請求の範囲】[Claims] 画像入力装置を用いて入力した二次元濃淡画像データか
ら明るさの変化する部分を抽出して線画データを生成す
る細線化工程と、上記線画データ上の曲線の曲率を計算
してもとの画像の中に与えられた径のビス穴が存在する
かどうかを判定するビス穴存在判定工程と、上記線画デ
ータからビス穴中心の位置を計算するビス穴位置計算工
程からなるビス穴位置認識方法。
A thinning process in which line drawing data is generated by extracting parts where brightness changes from two-dimensional grayscale image data input using an image input device, and the original image is created by calculating the curvature of the curve on the line drawing data. A screw hole position recognition method comprising: a screw hole existence determination step of determining whether a screw hole of a given diameter exists in the screw hole; and a screw hole position calculation step of calculating the position of the center of the screw hole from the line drawing data.
JP61000886A 1986-01-07 1986-01-07 Screw hole position recognition method Expired - Lifetime JPH0636190B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61000886A JPH0636190B2 (en) 1986-01-07 1986-01-07 Screw hole position recognition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61000886A JPH0636190B2 (en) 1986-01-07 1986-01-07 Screw hole position recognition method

Publications (2)

Publication Number Publication Date
JPS62159292A true JPS62159292A (en) 1987-07-15
JPH0636190B2 JPH0636190B2 (en) 1994-05-11

Family

ID=11486155

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61000886A Expired - Lifetime JPH0636190B2 (en) 1986-01-07 1986-01-07 Screw hole position recognition method

Country Status (1)

Country Link
JP (1) JPH0636190B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5655030A (en) * 1993-12-27 1997-08-05 Uht Corporation Method for detecting the center of target marks by image processing
US8132835B2 (en) 2008-09-30 2012-03-13 Fanuc Ltd Workpiece gripping device
JP2014023566A (en) * 2012-07-24 2014-02-06 Olympus Corp Image processor, image processing method, and image processing program
US9881381B2 (en) 2013-12-19 2018-01-30 Olympus Corporation Image processing apparatus, image processing method, and computer-readable recording medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS50103941A (en) * 1974-01-16 1975-08-16
JPS56127268A (en) * 1980-03-10 1981-10-05 Mitsubishi Electric Corp Picture processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS50103941A (en) * 1974-01-16 1975-08-16
JPS56127268A (en) * 1980-03-10 1981-10-05 Mitsubishi Electric Corp Picture processor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5655030A (en) * 1993-12-27 1997-08-05 Uht Corporation Method for detecting the center of target marks by image processing
US8132835B2 (en) 2008-09-30 2012-03-13 Fanuc Ltd Workpiece gripping device
JP2014023566A (en) * 2012-07-24 2014-02-06 Olympus Corp Image processor, image processing method, and image processing program
US9881381B2 (en) 2013-12-19 2018-01-30 Olympus Corporation Image processing apparatus, image processing method, and computer-readable recording medium

Also Published As

Publication number Publication date
JPH0636190B2 (en) 1994-05-11

Similar Documents

Publication Publication Date Title
WO2019242178A1 (en) Method for segmenting g-banded adhered chromosomes on the basis of geometric characteristics and region merging, device, and karyotype analysis apparatus
US8126268B2 (en) Edge-guided morphological closing in segmentation of video sequences
JP2011238228A (en) Screen area detection method and system
JPH0877334A (en) Automatic feature point extracting method for face image
JP2000209430A (en) Contour extraction device and method and storage medium
CN107192716A (en) A kind of workpiece, defect quick determination method based on contour feature
CN112396050B (en) Image processing method, device and storage medium
CN115147448A (en) Image enhancement and feature extraction method for automatic welding
JPH09185676A (en) Ruled line elimination method
CN111127498A (en) Canny edge detection method based on edge self-growth
JP3438440B2 (en) Image processing device
CN114863492A (en) Method and device for repairing low-quality fingerprint image
JPS62159292A (en) Recognizing method for position of machine screw hole
JPH04198741A (en) Shape defect detecting device
CN115359249B (en) Palm image ROI region extraction method and system
CN115641615A (en) Extraction method of closed palm interested region under complex background
WO2022056875A1 (en) Method and apparatus for segmenting nameplate image, and computer-readable storage medium
JP4172236B2 (en) Facial image processing apparatus and program
JP3138933B2 (en) Modeling system
JP2006163662A (en) Device and method for recognizing number of fingers
US20070292033A1 (en) Passive and interactive real-time image recognition software method
JPH1153539A (en) Circular pattern discriminating method and storage medium
JPS6324473A (en) Graphic recognizing device
JPH07193716A (en) Edge emphasizing device
JPS6292085A (en) Recognizing system for symmetrical characteristics of graphic form