JP3027680B2 - Component recognition method - Google Patents

Component recognition method

Info

Publication number
JP3027680B2
JP3027680B2 JP6025689A JP2568994A JP3027680B2 JP 3027680 B2 JP3027680 B2 JP 3027680B2 JP 6025689 A JP6025689 A JP 6025689A JP 2568994 A JP2568994 A JP 2568994A JP 3027680 B2 JP3027680 B2 JP 3027680B2
Authority
JP
Japan
Prior art keywords
template
value
hough transform
angle
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP6025689A
Other languages
Japanese (ja)
Other versions
JPH07234939A (en
Inventor
長生 ▲濱▼田
朋広 安田
一成 吉村
▲祐▼治 佐久間
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 Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP6025689A priority Critical patent/JP3027680B2/en
Publication of JPH07234939A publication Critical patent/JPH07234939A/en
Application granted granted Critical
Publication of JP3027680B2 publication Critical patent/JP3027680B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は画像によって部品認識を
行う部品認識方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a component recognition method for recognizing components using images.

【0002】[0002]

【従来の技術】この種の部品認識方法としては、二値化
処理を用いた方法やパターンマッチングを用いた方法が
知られている。前者は撮像した濃淡画像をしきい値によ
って一旦二値画像とし、面積、重心、慣性主軸などを求
めて部品の認識を行うものであり、後者は撮像した濃淡
画像をそのまま用いて正規化相関によりテンプレートと
対象画像との間で対応する画素間の濃淡値のマッチング
度を調べて部品の認識を行う。
2. Description of the Related Art As this kind of component recognition method, a method using a binarization process and a method using a pattern matching are known. In the former, the captured grayscale image is once converted into a binary image by using a threshold value, and the area, the center of gravity, the principal axis of inertia, etc. are determined to recognize the component, and in the latter, the captured grayscale image is used as it is by normalization correlation. A part is recognized by checking the degree of matching of the gray value between corresponding pixels between the template and the target image.

【0003】[0003]

【発明が解決しようとする課題】しかし、二値化処理を
用いた方法では、部品の明るさが表面状態や照明変動に
よって変化するために二値画像が安定せず、このために
対象部品を正確に認識できないという問題を有してお
り、またパターンマッチングによる方法では対象部品が
回転している時、テンプレートを回転させて角度毎にマ
ッチング度を調べなければならないために、時間がかか
るという問題を有している。
However, in the method using the binarization processing, since the brightness of the component changes due to the surface condition or the fluctuation of the illumination, the binary image is not stabilized, and therefore, the target component is not changed. It has a problem that it cannot be recognized accurately, and the method using pattern matching takes time because when the target part is rotating, it is necessary to rotate the template and check the matching degree for each angle, which takes time. have.

【0004】本発明はこのような点に鑑み為されたもの
であり、その目的とするところは対象部品が回転してい
ても高速に且つ確実に部品認識を行うことができる部品
認識方法を提供するにある。
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and has as its object to provide a component recognition method capable of performing high-speed and reliable component recognition even when a target component is rotating. To be.

【0005】[0005]

【課題を解決するための手段】しかして本発明に係る部
品認識方法は、部品画像中に基準点と基準線とを任意に
設定して、輪郭線と、輪郭線上の各点の明るさの方向値
φjと、上記各点の上記基準点及び基準線に対する距離
r(φj)及び角度α(φj)とを求めて、明るさの方
向値φjに対する座標(r(φj),α(φj))の対
応表をテンプレートとして作成し、対象画像に対して輪
郭線を求めて輪郭線上の各点の座標(xj,yj)と明
るさの方向値φjとを求めて、一般化ハフ変換式 x=xj+r(φj−θ)cos[α(φj−θ)+θ] y=yj+r(φj−θ)sin[α(φj−θ)+θ] において角度θを変化させつつ座標(x,y)の値を求
め、この値と上記角度θとからアキュムレータ配列A
(x,y,θ)を作成し、このアキュムレータ配列A
(x,y,θ)の値としきい値との比較により、部品の
位置(x,y)及び角度θを認識するものであって、上
記テンプレート作成時に、部品画像の撮像を複数回行う
ことで明るさの方向値の分散を求め、この分散に応じて
一般化ハフ変換における角度φの値の範囲を設定した
り、隣接する2点の明るさの方向値の差を求めて、この
差の最大値に応じて一般化ハフ変換における角度φの値
の範囲を設定したり、注目点の両隣の明るさの方向値の
差のばらつきを求めて、このばらつきに応じて一般化ハ
フ変換における角度φの値の範囲を設定したりすること
に特徴を有している。
In the component recognition method according to the present invention, a reference point and a reference line are arbitrarily set in a component image, and the contour and the brightness of each point on the contour are determined. A direction value φj, a distance r (φj) and an angle α (φj) of each point with respect to the reference point and the reference line are obtained, and coordinates (r (φj), α (φj) with respect to the direction value φj of the brightness. ) Is created as a template, an outline is obtained for the target image, coordinates (xj, yj) of each point on the outline and a direction value φj of brightness are obtained, and a generalized Hough transform equation x = Xj + r (φj−θ) cos [α (φj−θ) + θ] y = yj + r (φj−θ) sin [α (φj−θ) + θ] and the value of the coordinates (x, y) while changing the angle θ Is obtained, and the accumulator array A is obtained from this value and the angle θ.
(X, y, θ) is created and this accumulator array A
(X, y, theta) by comparing the value of the threshold, the position of the component (x, y) be those that recognize and angle theta, the upper
Captures component images multiple times when creating a template
The variance of the direction value of brightness is obtained by
Set the value range of angle φ in generalized Hough transform
The difference between the brightness direction values of two adjacent points
Value of angle φ in generalized Hough transform according to maximum value of difference
Of the brightness direction values of both sides of the point of interest
The variation of the difference is determined, and generalized
It is characterized in that the range of the value of the angle φ in the transformation is set .

【0006】[0006]

【作用】本発明によれば、明るさ方向値を基にする一般
化ハフ変換によるアドレス変換を用いるために、対象部
品が傾いていても高速に認識を行うことができるもので
あり、特にテンプレート作成時に、部品画像の撮像を複
数回行うことで明るさの方向値の分散を求め、この分散
に応じて一般化ハフ変換における角度φの値の範囲を設
定したり、隣接する2点の明るさの方向値の差を求め
て、この差の最大値に応じて一般化ハフ変換における角
度φの値の範囲を設定したり、注目点の両隣 の明るさの
方向値の差のばらつきを求めて、このばらつきに応じて
一般化ハフ変換における角度φの値の範囲を設定するた
めに、認識精度を落とすことなく最適な認識時間を得る
ことができる。
According to the present invention, in order to use the address translation by the generalized Hough transform to the basis of the brightness direction value, be inclined the target component as it is possible to perform the recognition at high speed
Yes, especially when creating a template.
By performing several times, the variance of the brightness direction value is obtained, and this variance is calculated.
Range of the angle φ in the generalized Hough transform
Or the difference between the brightness direction values of two adjacent points
The angle in the generalized Hough transform according to the maximum value of this difference
You can set the range of the value of degree φ ,
Find the variation of the direction value difference, and according to this variation,
Set the value range of the angle φ in the generalized Hough transform.
Therefore, an optimum recognition time can be obtained without reducing the recognition accuracy.

【0007】そして、一般化ハフ変換に際しての角度θ
の変化分を、上記のようにして設定した角度φの値の範
囲以上としたり、テンプレート画像と、回転させたテン
プレート画像とを比較して、両者の差の点数が所定値以
上となる時の回転角度を、一般化ハフ変換に際しての角
度θの変化分とすれば、認識精度を低下させることな
く、演算回数の削減を行うことができる。
The angle θ at the time of the generalized Hough transform is
The amount of change is set to be equal to or more than the range of the value of the angle φ set as described above, or the template image is compared with the rotated template image . If the rotation angle is a change in the angle θ at the time of the generalized Hough transform, the number of calculations can be reduced without lowering the recognition accuracy.

【0008】更に、対象画像中に設定したテンプレート
画像の大きさに応じたハフ変換候補領域内の明るさの方
向値の最大度数と、テンプレートにおける明るさの方向
値の最大度数とがほぼ等しい時、または対象画像中に設
定したテンプレート画像の大きさに応じたハフ変換候補
領域内の明るさの方向値の正規化された最大度数と、テ
ンプレートにおける明るさの方向値の正規化された最大
度数とがほぼ等しい時、または対象画像中に設定したテ
ンプレート画像の大きさに応じたハフ変換候補領域内の
明るさの方向値の度数分布をフーリエ変換して得たフー
リエスペクトルと、テンプレートにおける明るさの方向
値の度数分布をフーリエ変換して得たフーリエスペクト
ルとがほぼ等しい時、または対象画像中に設定したテン
プレート画像の大きさに応じたハフ変換候補領域内の角
度αの分布と、テンプレートにおける角度αの分布とが
ほぼ等しい時、あるいは対象画像中に設定したテンプレ
ート画像の大きさに応じたハフ変換候補領域内の距離r
の最大値と、テンプレートにおける距離rの最大値とが
ほぼ等しい時、上記ハフ変換候補領域をハフ変換対象領
域として一般化ハフ変換処理を行うならば、一般化ハフ
変換を行う領域を限定することができるために、処理の
高速化を更に図ることができる。
Further, a template set in the target image
When the maximum frequency of the brightness direction value in the Hough transform candidate area according to the image size is substantially equal to the maximum frequency of the brightness direction value in the template, or the size of the template image set in the target image When the normalized maximum frequency of the brightness direction value in the Hough transform candidate area according to the size is substantially equal to the normalized maximum frequency of the brightness direction value in the template, or set in the target image Fourier transform of the frequency distribution of the brightness direction values in the Huff transform candidate area according to the size of the template image obtained, and Fourier transform of the frequency distribution of the brightness direction values in the template and when, or distribution of the angle α of the Hough transform candidate region corresponding to the size of the set template image in the target image and the Fourier spectrum are approximately equal and, te When nearly equal to the distribution of the angle α in the plate, or the distance r of the Hough transform candidate region corresponding to the size of the template image is set in the target image
When the generalized Hough transform process is performed when the maximum value of is approximately equal to the maximum value of the distance r in the template, the Huff transform candidate region is set as the Hough transform target region, the region for performing the generalized Hough transform is limited. Therefore, the processing can be further speeded up.

【0009】対象画像中に設定したテンプレート画像
大きさに応じたハフ変換候補領域内の二次モーメント
と、テンプレートにおける二次モーメントとがほぼ等し
い時、上記ハフ変換候補領域をハフ変換対象領域とし、
ハフ変換候補領域内の慣性主軸とテンプレートにおける
慣性主軸とから角度θの範囲を限定して一般化ハフ変換
処理を行うならば、ハフ変換の領域だけでなく、角度θ
の範囲も限定することができるために、更に高速な処理
が可能となり、また、円形状部を有する部品の認識に適
用する場合には、まず円形状部の円を一般化ハフ変換で
検出し、次にこの円の位置を基準に一般化ハフ変換領域
を設定して、この領域内だけで一般化ハフ変換を行うよ
うにしても、やはり高速化が可能である。
When the second moment in the Hough transform candidate area corresponding to the size of the template image set in the target image is substantially equal to the second moment in the template, the Hough transform candidate area is set as the Hough transform target area. ,
If the generalized Hough transform processing is performed by limiting the range of the angle θ from the principal axis of inertia in the Hough transform candidate area and the principal axis of inertia in the template, not only the Hough transform area but also the angle θ
Can be limited, so that higher-speed processing is possible.In addition, when the method is applied to recognition of a part having a circular part, the circle of the circular part is first detected by the generalized Hough transform. Then, even if a generalized Hough transform area is set based on the position of the circle and the generalized Hough transform is performed only within this area, the speed can still be increased.

【0010】[0010]

【実施例】以下本発明を実施例に基づいて詳述すると、
本発明においては、テンプレート作成回路と、認識回路
とからなる部品認識装置を用いる。テンプレートを作成
するためのテンプレート作成回路は、図3に示すよう
に、カメラ1と、画像入力メモリである画像取り込み部
2と、明るさ方向値演算部3と、基準点・基準線設定部
4と、テンプレートの作成及び作成したテンプレートを
記憶するテンプレートテーブル部5とからなり、認識回
路はテンプレート作成回路におけるカメラ1等を共有す
るとともに、回転角作成部6、一般化ハフ変換を行うア
ドレス演算部8、累積メモリ部9、そして比較部10を
備えたものとなっている。
EXAMPLES The present invention will be described below in detail based on examples.
In the present invention, a component recognition device including a template creation circuit and a recognition circuit is used. As shown in FIG. 3, a template creating circuit for creating a template includes a camera 1, an image capturing unit 2 serving as an image input memory, a brightness direction value calculating unit 3, and a reference point / reference line setting unit 4. And a template table section 5 for creating a template and storing the created template. The recognition circuit shares the camera 1 and the like in the template creation circuit, a rotation angle creating section 6, an address calculating section for performing a generalized Hough transform. 8, a cumulative memory unit 9, and a comparing unit 10.

【0011】まず、図3に示したテンプレート作成回路
の動作について図2に基づき説明すると、このテンプレ
ート作成回路は、カメラ1にて撮像するとともに画像取
り込み部2に取り込んだ濃淡画像である部品画像中に図
4に示すように、基準点・基準線設定部4が基準点Oと
基準線Lとを任意に設定した後、明るさ方向値演算部3
が部品画像の明るさの変化値を例えばソーベルのオぺレ
ータにより求めてある値以上の値をもつ点を輪郭点とす
るとともに、ある輪郭点(xj,yj)でのx,y方向
のそれぞれの明るさの変化値のアークタンジェントより
その輪郭点(xj,yj)での明るさの方向値φjを求
める。また、テンプレートテーブル部5は基準点Oから
上記輪郭点(xj,yj)までの距離r(φj)並びに
基準点Oと上記輪郭点(xj,yj)とを結ぶ線分と基
準線Lとがなす角度α(φj)を求めて、明るさの方向
値φjに対する距離r(φj)と角度α(φj)とを対
応させる。この処理を全輪郭点に対して行うことで、テ
ンプレートテーブル部5は明るさの方向値φjに対する
距離r(φj)と角度α(φj)の対応表、すなわちテ
ンプレートを作成してテーブル部に格納する。なお、テ
ンプレートは部品画像全体からではなく、一部から求め
てもよい。
First, the operation of the template creation circuit shown in FIG. 3 will be described with reference to FIG. 2. This template creation circuit captures an image with the camera 1 and captures a part image which is a grayscale image captured by the image capture unit 2. As shown in FIG. 4, after the reference point / reference line setting unit 4 arbitrarily sets the reference point O and the reference line L, the brightness direction value calculation unit 3
Is a point having a value greater than or equal to a certain value obtained by, for example, a Sobel operator for a change value of the brightness of the component image, as a contour point, and in each of x and y directions at a certain contour point (xj, yj). The brightness direction value φj at the contour point (xj, yj) is obtained from the arc tangent of the brightness change value. Further, the template table unit 5 stores a distance r (φj) from the reference point O to the contour point (xj, yj), a line segment connecting the reference point O and the contour point (xj, yj), and a reference line L. The angle α (φj) to be formed is obtained, and the distance r (φj) with respect to the direction value φj of the brightness is associated with the angle α (φj). By performing this process for all the contour points, the template table unit 5 creates a correspondence table of the distance r (φj) and the angle α (φj) with respect to the brightness direction value φj, that is, a template, and stores it in the table unit. I do. Note that the template may be obtained not from the entire part image but from a part.

【0012】一方、認識回路は、図1に示すように、カ
メラ1によって画像取り込み部2に取り込まれた対象画
像に対して上記テンプレート作成の場合と同様に輪郭点
(xj,yj)を求めてその輪郭点(xj,yj)での
明るさの方向値φjを求める。また、回転角作成部6に
よって与えられるテンプレートの回転角θを0°とした
後、上記明るさの方向値φjに対応する距離r(φj−
θ)と角度α(φj−θ)をテンプレートより求める。
こうして得られた座標(x,y)と距離r(φj−θ)
と角度α(φj−θ)を、アドレス演算部8が一般化ハ
フ変換式である x=xj+r(φj−θ)cos[α(φj−θ)+θ] y=yj+r(φj−θ)sin[α(φj−θ)+θ] に代入してアドレス変換を行い、こうして求めた(x,
y)の値と上記回転角θとを蓄積メモリ部9の該当アド
レスに書き込んでアキュムレータ配列A(x,y,θ)
を構成するとともに、アキュムレータ配列A(x,y,
θ)の値を1インクリメントする。
On the other hand, as shown in FIG. 1, the recognition circuit obtains an outline point (xj, yj) for the target image captured by the camera 1 in the image capturing section 2 in the same manner as in the case of the template creation. A brightness direction value φj at the contour point (xj, yj) is obtained. After the rotation angle θ of the template given by the rotation angle creation unit 6 is set to 0 °, the distance r (φj−
θ) and the angle α (φj−θ) are obtained from the template.
The coordinates (x, y) thus obtained and the distance r (φj−θ)
And the angle α (φj−θ) are calculated by the address calculation unit 8 as a generalized Hough transform equation x = xj + r (φj−θ) cos [α (φj−θ) + θ] y = yj + r (φj−θ) sin [ α (φj−θ) + θ] to perform address conversion, and thus obtained (x,
The value of y) and the rotation angle θ are written into the corresponding addresses of the storage memory unit 9 to store the accumulator array A (x, y, θ).
And an accumulator array A (x, y,
θ) is incremented by one.

【0013】そして、回転角θをθ=θ+aとしてθの
値がNとなるまで、明るさの方向値φjを求めるステッ
プから累積メモリ部9をインクリメントするまでのステ
ップを繰り返し、更に新たな輪郭点があれば同様の処理
を繰り返すことで、全輪郭点について上記処理を行っ
て、アキュムレータ配列A(x,y,θ)を完成する。
そして、アキュムレータ配列A(x,y,θ)の度数値
を比較部10においてしきい値と比較し、しきい値より
大きい度数値の時の(x,y)を対象部品の座標とし
て、θをテンプレートに対する対象部品の角度として出
力する。
Then, the rotation angle θ is set to θ = θ + a, and the steps from the step of obtaining the brightness direction value φj to the step of incrementing the accumulation memory section 9 are repeated until the value of θ becomes N. If there is, the same processing is repeated to perform the above processing for all the contour points to complete the accumulator array A (x, y, θ).
Then, the frequency value of the accumulator array A (x, y, θ) is compared with the threshold value in the comparing unit 10, and (x, y) when the frequency value is larger than the threshold value is defined as the coordinate of the target component. Is output as the angle of the target part with respect to the template.

【0014】最終出力として、テンプレートに対する対
象部品の角度θが必要でないのであれば、蓄積メモリ部
9に格納する値を(x,y)のみとすることで、つまり
アキュムレータ配列をA(x,y)とすることで、使用
メモリの削減を行うことができる。図5はこの場合の部
品認識の際のフローチャートである。ここにおいて、照
明の変動や対象部品の表面状態の違いなどで、明るさの
方向値φが微妙に変化するために、方向値φについては
ばらつきを含んだ計算を行わなくては認識精度が低くな
るが、ばらつきを大きく設定すると、計算に要する時間
が長くなってしまう。このために、上記ばらつきの範囲
を適切に設定することが認識精度を落とすことなく認識
時間を長くなってしまうことを防ぐのに必要となるが、
これは次のようにして求めることができる。
If the angle θ of the target component with respect to the template is not required as the final output, the value stored in the storage memory unit 9 is set to only (x, y), that is, the accumulator array is changed to A (x, y). ) Can reduce the memory used. FIG. 5 is a flowchart for component recognition in this case. Here, since the direction value φ of the brightness slightly changes due to a change in illumination or a difference in the surface state of the target component, the recognition accuracy is low unless the calculation including the dispersion is performed for the direction value φ. However, if the variation is set to be large, the time required for the calculation becomes long. For this reason, it is necessary to appropriately set the range of the variation in order to prevent the recognition time from being lengthened without lowering the recognition accuracy.
This can be determined as follows.

【0015】図6に示すフローチャートはその一例を示
すものであり、ここではテンプレートの作成時に、部品
画像の撮像を複数回行うとともに、撮像の都度、輪郭点
pjの明るさの方向値φjを求め、こうして得たある輪
郭点pjにおける複数個の明るさの方向値φjの分散d
を求めて、この分散dを基に明るさの方向値φjについ
てのばらつきの範囲(図示例では±3d)を設定してい
る。
The flowchart shown in FIG. 6 shows an example of this. In this case, when a template is created, a component image is picked up a plurality of times, and a brightness direction value φj of a contour point pj is obtained every time an image is picked up. , The variance d of a plurality of brightness direction values φj at a certain contour point pj thus obtained
Is calculated, and a range of variation (± 3d in the illustrated example) for the direction value φj of brightness is set based on the variance d.

【0016】図7に示すように、テンプレートの作成の
ために全ての輪郭点での明るさの方向値φjを求めた
後、隣接する2点pj,pj−1の明るさの方向値φp
j,φpj−1の差Δφを調べて、その最大値MAX
(Δφ)を求め、この最大値MAX(Δφ)を明るさの
方向値φjについてのばらつきの範囲(たとえば±MA
X(Δφ))として設定してもよい。
As shown in FIG. 7, after the brightness direction values φj at all the contour points are obtained for creating a template, the brightness direction values φp of two adjacent points pj and pj−1 are obtained.
j, φpj−1 and the maximum value MAX
(Δφ) is obtained, and the maximum value MAX (Δφ) is set to the range of variation (for example, ± MA
X (Δφ)).

【0017】また、図8に示すように、テンプレートの
作成時に輪郭点上に注目点pjを設定して、この注目点
pjの両サイドpj+1,pj−1の明るさの方向値φ
pj−1,φpj+1の差を求めることを、全輪郭点に
対してなされるまで注目点pjを隣接点に移す毎に行っ
て、得られた明るさの方向値φjのばらつきbを求め、
このばらつきbをばらつきの範囲(たとえば±b)と設
定するようにしてもよい。
As shown in FIG. 8, a point of interest pj is set on a contour point when a template is created, and the brightness direction value φ of both sides pj + 1 and pj-1 of the point of interest pj is set.
The difference between pj−1 and φpj + 1 is obtained every time the point of interest pj is moved to an adjacent point until the difference is obtained for all contour points, and the variation b of the obtained brightness direction value φj is obtained.
The variation b may be set as a variation range (for example, ± b).

【0018】そして、回転角作成部6において設定する
角度θの増分(ピッチ)aの値は、一般化ハフ変換の演
算回数に大きな影響を及ぼすことから、認識精度を低下
させることがない範囲において、ピッチaの値はできる
だけ大きいことが好ましい。また、上記の明るさの方向
値のばらつきの範囲内でピッチaの値を変化させても認
識精度は変わらないことから、図9に示すように、明る
さの方向値のばらつきの範囲(単位は角度)よりも大き
い値をピッチaとして設定して演算する。ばらつきの範
囲の値以下の精度で対象部品の角度を認識することはで
きないのであるから、認識精度を低下させることなく演
算回数の削減を図ることができるわけである。
The value of the increment (pitch) a of the angle θ set in the rotation angle creating unit 6 has a great effect on the number of times of the generalized Hough transform, so that the recognition accuracy is not reduced. , Pitch a is preferably as large as possible. Further, since the recognition accuracy does not change even if the value of the pitch a is changed within the range of the variation in the direction value of brightness, as shown in FIG. Is calculated by setting a value larger than angle as the pitch a. Since the angle of the target component cannot be recognized with an accuracy equal to or less than the value of the variation range, the number of calculations can be reduced without lowering the recognition accuracy.

【0019】また、テンプレート作成に使用した画像で
あるテンプレート画像と、このテンプレート画像を所定
角度θ’だけ回転させたものとを重ね合わせて、両テン
プレート画像における重なり合わない部分の画素数eが
しきい値より多ければ、上記角度θ’の値を上記ピッチ
aと設定するようにしてもよい。図10に示すフローチ
ャートは、重なり合わない部分の画素数eがしきい値を
越えるまで角度θ’の値を増加させて、ピッチaを求め
る操作を示している。
Also, the image used to create the template
When a certain template image and an image obtained by rotating the template image by a predetermined angle θ ′ are overlapped with each other, if the number of pixels e of the non-overlapping portions in both template images is larger than a threshold value, the value of the angle θ ′ is obtained. May be set as the pitch a. The flowchart shown in FIG. 10 shows an operation of obtaining the pitch a by increasing the value of the angle θ ′ until the number e of non-overlapping pixels exceeds the threshold value.

【0020】次に、対象画像中からハフ変換対象領域を
抽出した後、このハフ変換対象領域に対してのみ一般化
ハフ変換を行うことで、ハフ変換の演算回数を削減する
ようにしたものについて説明すると、図11及び図12
はこの場合の一例を示しており、図11に示すように、
認識する部品のテンプレート領域(テンプレート画像の
領域)を設定し、このテンプレート領域についてのテン
プレートの作成時に明るさの方向値の方向別度数を調べ
て最大度数を記憶しておく。この時のテンプレート領域
は、部品全体を含むものである必要はなく、特徴点を含
む所要領域であればよい。
Next, after extracting the Hough transform target area from the target image, the generalized Hough transform is performed only on the Hough transform target area, so that the number of Hough transform operations can be reduced. 11 and 12 will be described.
Shows an example of this case. As shown in FIG.
Recognize parts of the template region (of the template image
Area), and when creating a template for this template area, the direction-specific frequency of the brightness direction value is checked and the maximum frequency is stored. The template region at this time does not need to include the entire part, but may be a required region including the feature points.

【0021】そして部品認識にあたっては、図12に示
すように、対象部品を撮像した対象画像中の一部(図示
例では左上)に上記テンプレート領域と同じ大きさのハ
フ変換候補領域を設定し、このハフ変換候補領域内にお
ける明るさの方向値の方向別度数を調べて最大度数を求
め、上記テンプレート領域における最大度数と、ハフ変
換候補領域における最大度数とを比較し、両者がほぼ等
しければ、そのハフ変換候補領域をハフ変換対象領域と
して、一般化ハフ変換を行うものの、大きく異なってい
る時には、ハフ変換対象領域とすることなく、つまり
般化ハフ変換を行わず、そして対象画像中の別の部分に
ハフ変換候補領域を設定して上記最大度数を比較する操
作を、対象画像全域にハフ変換候補領域が設定されるま
で繰り返すのである。対象部品が回転していても、テン
プレートにおける明るさの方向値の最大度数と対象画像
中における明るさの方向値の最大度数とがほぼ一致する
ことを利用して、一般化ハフ変換を行う領域を絞って演
算回数を削減しているわけである。
For component recognition, as shown in FIG. 12, a Huff transform candidate region having the same size as the template region is set in a part (upper left in the illustrated example) of the target image obtained by capturing the target component. The maximum frequency in the template region is compared with the maximum frequency in the Hough conversion candidate region by examining the frequency of each direction of the brightness direction value in this Hough conversion candidate region, and if the two are almost equal, the Hough transform candidate area as a Hough transformation target area, although performing generalized Hough transform, when very different, without the Hough transformation target area, that is one
The operation of setting the Hough transform candidate area in another part of the target image without performing the generalized Hough transform and comparing the maximum frequency is repeated until the Hough transform candidate area is set in the entire target image. . Area where generalized Hough transform is performed using the fact that the maximum frequency of the brightness direction value in the template and the maximum frequency of the brightness direction value in the target image almost match even if the target component is rotating. Is reduced to reduce the number of calculations.

【0022】ハフ変換対象領域の抽出に際しては、図1
3及ぶ図14に示すように、正規化された最大度数を用
いてもよい。すなわちテンプレート領域における明るさ
の方向値の全度数によって明るさの方向値の最大度数を
除算することで得た正規化された最大度数値と、同じく
ハフ変換候補領域内の明るさの方向値の正規化された最
大度数値とを比較して、両者がほぼ一致しておればその
ハフ変換候補領域をハフ変換対象領域として一般化ハフ
変換を行う。
When extracting the Hough transform target area, FIG.
As shown in FIG. 14, the normalized maximum frequency may be used. That is, the normalized maximum frequency value obtained by dividing the maximum frequency of the brightness direction value by the total frequency of the brightness direction value in the template region, and the brightness direction value of the brightness The Hough transform candidate area is compared with the normalized maximum frequency value, and if they substantially match, the generalized Hough transform is performed using the Hough transform candidate area as the Hough transform target area.

【0023】最大度数に代えて、図15及び図16に示
すように、明るさの方向値の度数分布をフーリエ変換し
て得られるフーリエスペクトル同士の比較によって、ハ
フ変換対象領域を絞るようにしてもよい。更に、前述の
ように最大度数値で比較してハフ変換対象領域を絞る場
合、図17及び図18に示すように、最大度数値だけで
なく、2番目の大きさの度数でも比較すると、ハフ変換
対象領域を更に有効に絞ることができる。つまり、直線
形状を持ったものと曲線形状を持ったものとにおいて、
明るさの方向値の最大度数がほぼ一致することがあって
も、2番目の大きさの度数は、曲線形状の場合よりも直
線形状の場合の方が著しく小さくなることから、この両
者を明るさの方向値の度数によって区別することができ
るために、ハフ変換対象領域とするエリアを更に絞るこ
とができるものである。
Instead of the maximum frequency, as shown in FIGS. 15 and 16, by comparing Fourier spectra obtained by Fourier-transforming the frequency distribution of brightness direction values, the Hough transform target area is narrowed. Is also good. Further, when narrowing down the Hough transform target area by comparing with the maximum frequency value as described above, when comparing not only the maximum frequency value but also the frequency of the second magnitude as shown in FIGS. The conversion target area can be narrowed down more effectively. In other words, in the one with a linear shape and the one with a curved shape,
Even if the maximum frequencies of the brightness direction values are almost the same, the frequency of the second magnitude is significantly smaller in the case of the linear shape than in the case of the curved shape. Since the discrimination can be made by the frequency of the direction value, the area to be the Hough transformation target area can be further narrowed down.

【0024】ハフ変換対象領域を絞ることは、上記のよ
うな明るさの方向値の度数に基づく方法の他に、前記角
度αや距離r、すなわち基準点Oと輪郭点とを結ぶ線分
と基準線Lとがなす角度αや、基準点Oから輪郭点まで
の距離rに基づいて行うことができる。図19及び図2
0は角度αに基づく場合を示しており、テンプレートの
作成に際して、上記角度αの分布を調べてこれを記憶し
ておく。同じく、対象画像に設定したハフ変換候補領域
内においても、角度αの分布を調べて、テンプレートに
おける角度αの分布と、ハフ変換候補領域内における角
度αの分布とを比較し、両者がほぼ等しければ、このハ
フ変換候補領域をハフ変換対象領域として一般化ハフ変
換を行うのである。つまり、円のような閉じた輪郭線を
持つものでは、角度αは360°全域においてほぼ一様
に分布するが、角張った輪郭線を持つものでは、角度α
の分布は一部に偏ったものとなるために、両者を区別し
て、ハフ変換対象領域から外すことができるものであ
る。
The narrowing of the Hough transformation target area can be achieved by the method based on the frequency of the brightness direction value as described above, or by the angle α and the distance r, that is, the line segment connecting the reference point O and the contour point. This can be performed based on the angle α between the reference line L and the distance r from the reference point O to the contour point. FIG. 19 and FIG.
0 indicates a case based on the angle α. When creating a template, the distribution of the angle α is checked and stored. Similarly, the distribution of the angle α is also examined in the Hough transformation candidate area set in the target image, and the distribution of the angle α in the template is compared with the distribution of the angle α in the Hough transformation candidate area. In this case, a generalized Hough transform is performed using the Hough transform candidate area as a Hough transform target area. That is, in the case of a circle having a closed contour, the angle α is almost uniformly distributed over the entire 360 °, while in the case of having a sharp outline, the angle α is
Is partially biased, so that the two can be distinguished and excluded from the Hough transform target area.

【0025】図21及び図22は上記距離rに基づく場
合を示しており、テンプレートの作成に際して、距離r
の最大値を記憶しておき、同じく、対象画像に設定した
ハフ変換候補領域内においても、距離rの最大値を調べ
て、テンプレートにおける距離rの最大値と、ハフ変換
候補領域内における距離rの最大値とを比較し、両者が
ほぼ等しければ、このハフ変換候補領域をハフ変換対象
領域として一般化ハフ変換を行う。この場合、大きさの
異なるものを区別してハフ変換対象領域から外すことが
できるものである。
FIGS. 21 and 22 show a case based on the above distance r.
The maximum value of the distance r is also checked in the Hough transformation candidate area set in the target image, and the maximum value of the distance r in the template and the distance r in the Hough transformation candidate area are similarly stored. Is compared with the maximum value, and if the two are almost equal, the generalized Hough transform is performed using the Hough transform candidate area as the Hough transform target area. In this case, objects having different sizes can be distinguished and excluded from the Hough transform target area.

【0026】この他、2次モーメントや慣性主軸を利用
して ハフ変換対象領域を絞ることもできる。すなわ
ち、図23に示すように、認識する部品のテンプレート
領域を設定し、このテンプレート領域内についてのテン
プレートの作成時に、テンプレート領域内の画像の2次
モーメント及び慣性主軸を求めて、これを記憶してお
く。
In addition, the Hough transform target area can be narrowed using the second moment and the principal axis of inertia. That is, as shown in FIG. 23, a template area of a component to be recognized is set, and when a template is created in the template area, a second moment and a principal axis of inertia of an image in the template area are obtained and stored. Keep it.

【0027】部品認識にあたっては、図24に示すよう
に、対象部品を撮像した対象画像中に設定したハフ変換
候補領域内における2次モーメントを調べて、テンプレ
ートにおける2次モーメントと比較し、両者がほぼ等し
ければ、このハフ変換候補領域をハフ変換対象領域とす
るとともに、ハフ変換対象領域内の慣性主軸を求めて、
この慣性主軸と前記テンプレートの慣性主軸とのなす角
度θ”を求めるのである。そして角度θ”を中心とする
所定角度範囲内において微小幅で変化させつつ上記ハフ
変換対象領域内についての一般化ハフ変換を行うのであ
る。この場合、ハフ変換対象領域を絞ることができるだ
けでなく、角度θの範囲を限定することができるため
に、更に演算回数を削減することができ、高速な処理が
可能となる。
In the component recognition, as shown in FIG. 24, the second moment in the Hough transform candidate area set in the target image obtained by capturing the target component is checked and compared with the second moment in the template. If they are almost equal, this Hough transformation candidate area is set as a Hough transformation target area, and a principal axis of inertia in the Hough transformation target area is obtained.
The angle θ ″ formed between the principal axis of inertia and the principal axis of inertia of the template is determined. The generalized Hough in the Hough transformation target area is changed while changing the angle within a predetermined angle range centered on the angle θ ″ with a small width. It does the conversion. In this case, not only can the Hough transformation target area be narrowed down, but also the range of the angle θ can be limited, so that the number of calculations can be further reduced and high-speed processing can be performed.

【0028】なお、以上のようなハフ変換対象領域の設
定処理は、複数処理を組み合わせることで行ってもよい
のはもちろんである。円形状部分を持つ部品について
は、次のような処理を行ってもよい。つまり、図25に
示すように、テンプレート作成に際し、円形状部分の半
径と中心位置とを入力して記憶する。そして、その部品
の特徴形状部を含む領域を一般化ハフ変換のテンプレー
ト領域として設定して、円形状の中心位置と特徴形状部
との位置関係を求めてこれを記憶するとともに、上記の
一般化ハフ変換のテンプレート領域に基準点と基準線と
を設定して、円形状部分の中心位置から一般化ハフ変換
のテンプレート領域内の基準点までの線分の距離を記憶
し、更に一般化ハフ変換のテンプレートを作成する。
It is needless to say that the processing for setting the Hough transform target area as described above may be performed by combining a plurality of processings. The following processing may be performed on a component having a circular portion. That is, as shown in FIG. 25, when creating the template, the radius and the center position of the circular portion are input and stored. Then, an area including the characteristic shape part of the part is set as a template area of the generalized Hough transform, the positional relationship between the center position of the circular shape and the characteristic shape part is obtained and stored, and the generalization is performed. A reference point and a reference line are set in the template area of the Hough transform, and the distance from the center position of the circular portion to the reference point in the template area of the generalized Hough transform is stored. Create a template for

【0029】部品認識に際しては、図26に示すよう
に、対象部品の濃淡値画像を明るさの方向値画像に変換
して、円の一般化ハフ変換で求まる円の中心を求め、テ
ンプレート作成時に設定した円形状の中心位置と特徴形
状部との位置関係から一般化ハフ変換対象領域を設定し
て、この一般化ハフ変換対象領域内だけで一般化ハフ変
換を行うことで基準点を求め、この基準点と上記円の中
心とを結ぶ線分の角度と、テンプレート作成時に設定し
た円形状の中心位置と特徴形状部との位置関係から求め
たテンプレートでの角度との差から、部品のずれ角度を
求める。この処理をすべての輪郭点について行うこと
で、部品形状や位置、姿勢を認識することができる。
At the time of component recognition, as shown in FIG. 26, the gray value image of the target component is converted into a brightness direction value image, the center of the circle obtained by the generalized Hough transform of the circle is obtained, A generalized Hough transform target area is set from the positional relationship between the set center position of the circular shape and the characteristic shape portion, and a reference point is obtained by performing a generalized Hough transform only within the generalized Hough transform target area, The difference between the angle of the line segment connecting this reference point and the center of the circle and the angle of the template determined from the positional relationship between the center position of the circular shape and the characteristic shape portion set at the time of template creation and the displacement of the part Find the angle. By performing this processing for all the contour points, it is possible to recognize the component shape, the position, and the posture.

【0030】[0030]

【発明の効果】以上のように本発明においては、明るさ
方向値を基にする一般化ハフ変換によるアドレス変換を
用いるために、対象部品が回転で傾いていても高速に認
識を行うことができ、また認識精度も高いものであり、
殊にテンプレート作成時に、部品画像の撮像を複数回行
うことで明るさの方向値の分散を求め、この分散に応じ
て一般化ハフ変換における角度φの値の範囲を設定した
り、隣接する2点の明るさの方向値の差を求めて、この
差の最大値に応じて一般化ハフ変換における角度φの値
の範囲を設定したり、注目点の両隣の明るさの方向値の
差のばらつきを求めて、このばらつきに応じて一般化ハ
フ変換における角度φの値の範囲を設定するために、
般化ハフ変換による認識を行うにあたり、認識精度を落
とすことがない最適な認識処理を行うことができる。
As described above, in the present invention, since the address conversion based on the generalized Hough transform based on the brightness direction value is used, it is possible to perform high-speed recognition even if the target component is tilted by rotation. And high recognition accuracy .
In particular, when creating a template, take part images several times.
To obtain the variance of the brightness direction value,
Set the value range of the angle φ in the generalized Hough transform
The difference between the brightness direction values of two adjacent points
Value of angle φ in generalized Hough transform according to maximum value of difference
Of the brightness direction values of both sides of the point of interest
The variation of the difference is determined, and generalized
In order to set the range of the value of the angle φ in the Hough transform, in performing the recognition by the generalized Hough transform, it is possible to perform an optimum recognition process without reducing the recognition accuracy.

【0031】そして、一般化ハフ変換に際しての角度θ
の変化分を、上記のようにして設定した角度φの値の範
囲以上としたり、テンプレート画像と、回転させたテン
プレート画像とを比較して、両者の差の点数が所定値以
上となる時の回転角度を、一般化ハフ変換に際しての角
度θの変化分とすれば、認識精度の低下を招くことなく
演算回数の削減を行うことができるために、高速化を容
易に図ることができる。
Then, the angle θ at the time of the generalized Hough transform
The amount of change is set to be equal to or more than the range of the value of the angle φ set as described above, or the template image is compared with the rotated template image . If the rotation angle is a change in the angle θ at the time of the generalized Hough transform, the number of calculations can be reduced without lowering the recognition accuracy, so that the speed can be easily increased.

【0032】更に、対象画像中に設定したテンプレート
画像の大きさに応じたハフ変換候補領域内の明るさの方
向値の最大度数と、テンプレートにおける明るさの方向
値の最大度数とがほぼ等しい時、または対象画像中に設
定したテンプレート画像の大きさに応じたハフ変換候補
領域内の明るさの方向値の正規化された最大度数と、テ
ンプレートにおける明るさの方向値の正規化された最大
度数とがほぼ等しい時、または対象画像中に設定したテ
ンプレート画像の大きさに応じたハフ変換候補領域内の
明るさの方向値の度数分布をフーリエ変換して得たフー
リエスペクトルと、テンプレートにおける明るさの方向
値の度数分布をフーリエ変換して得たフーリエスペクト
ルとがほぼ等しい時、または対象画像中に設定したテン
プレート画像の大きさに応じたハフ変換候補領域内の角
度αの分布と、テンプレートにおける角度αの分布とが
ほぼ等しい時、あるいは対象画像中に設定したテンプレ
ート画像の大きさに応じたハフ変換候補領域内の距離r
の最大値と、テンプレートにおける距離rの最大値とが
ほぼ等しい時、上記ハフ変換候補領域をハフ変換対象領
域として一般化ハフ変換処理を行うならば、一般化ハフ
変換を行う領域を限定することができるために、演算回
数を大きく削減することができて処理を高速化すること
ができる。
Further, the template set in the target image
When the maximum frequency of the brightness direction value in the Hough transform candidate area according to the image size is substantially equal to the maximum frequency of the brightness direction value in the template, or the size of the template image set in the target image When the normalized maximum frequency of the brightness direction value in the Hough transform candidate area according to the size is substantially equal to the normalized maximum frequency of the brightness direction value in the template, or set in the target image Fourier transform of the frequency distribution of the brightness direction values in the Huff transform candidate area according to the size of the template image obtained, and Fourier transform of the frequency distribution of the brightness direction values in the template and when, or distribution of the angle α of the Hough transform candidate region corresponding to the size of the set template image in the target image and the Fourier spectrum are approximately equal and, te When nearly equal to the distribution of the angle α in the plate, or the distance r of the Hough transform candidate region corresponding to the size of the template image is set in the target image
When the generalized Hough transform process is performed when the maximum value of is approximately equal to the maximum value of the distance r in the template, the Huff transform candidate region is set as the Hough transform target region, the region for performing the generalized Hough transform is limited. Therefore, the number of operations can be greatly reduced, and the processing can be speeded up.

【0033】また、対象画像中に設定したテンプレート
画像の大きさに応じたハフ変換候補領域内の二次モーメ
ントと、テンプレートにおける二次モーメントとがほぼ
等しい時、上記ハフ変換候補領域をハフ変換対象領域と
し、ハフ変換候補領域内の慣性主軸とテンプレートにお
ける慣性主軸とから角度θの範囲を限定して一般化ハフ
変換処理を行うならば、ハフ変換の領域だけでなく、角
度θの範囲も限定することができるために、演算回数を
更に削減することができて、更なる高速化が可能なもの
である。また、円形状部を有する部品の認識に適用する
場合には、まず円形状部の円を一般化ハフ変換で検出
し、次にこの円の位置を基準に一般化ハフ変換領域を設
定して、この領域内だけで一般化ハフ変換を行うように
しても、上記の円の利用によって、やはり高速化が可能
である。
The template set in the target image
When the second moment in the Hough transformation candidate area according to the size of the image and the second moment in the template are substantially equal, the Hough transformation candidate area is used as the Hough transformation target area, and the principal axis of inertia in the Hough transformation candidate area is If the generalized Hough transform process is performed by limiting the range of the angle θ from the principal axis of inertia in the template, not only the Hough transform area but also the range of the angle θ can be limited, so the number of calculations is further reduced. It is possible to further increase the speed. When applying to recognition of a part having a circular part, first, the circle of the circular part is detected by generalized Hough transform, and then a generalized Hough transform area is set based on the position of this circle. Even if the generalized Hough transform is performed only within this region, the speed can still be increased by using the above-described circle.

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

【図1】一実施例における部品認識のフローチャートで
ある。
FIG. 1 is a flowchart of component recognition in one embodiment.

【図2】同上のテンプレート作成のフローチャートであ
る。
FIG. 2 is a flowchart of template creation according to the first embodiment.

【図3】同上のブロック回路図である。FIG. 3 is a block circuit diagram of the same.

【図4】同上の基準点と基準線と距離及び角度の説明図
である。
FIG. 4 is an explanatory diagram of a reference point, a reference line, a distance, and an angle in the above.

【図5】同上の他例における部品認識のフローチャート
である。
FIG. 5 is a flowchart of component recognition in another example of the embodiment.

【図6】ばらつきを求める時の一例のフローチャートで
ある。
FIG. 6 is a flowchart of an example when obtaining a variation.

【図7】ばらつきを求める時の他例のフローチャートで
ある。
FIG. 7 is a flowchart of another example when obtaining a variation.

【図8】ばらつきを求める時の別の例のフローチャート
である。
FIG. 8 is a flowchart of another example when obtaining a variation.

【図9】回転角ピッチの設定の一例を示すフローチャー
トである。
FIG. 9 is a flowchart illustrating an example of setting a rotation angle pitch.

【図10】回転角ピッチの設定の他例を示すフローチャ
ートである。
FIG. 10 is a flowchart illustrating another example of setting a rotation angle pitch.

【図11】他の実施例のテンプレート作成のフローチャ
ートである。
FIG. 11 is a flowchart of template creation according to another embodiment.

【図12】同上の部品認識のフローチャートである。FIG. 12 is a flowchart of component recognition according to the embodiment.

【図13】他例のテンプレート作成のフローチャートで
ある。
FIG. 13 is a flowchart of another example of template creation.

【図14】同上の部品認識のフローチャートである。FIG. 14 is a flowchart of component recognition according to the third embodiment.

【図15】更に他例のテンプレート作成のフローチャー
トである。
FIG. 15 is a flowchart of still another example template creation.

【図16】同上の部品認識のフローチャートである。FIG. 16 is a flowchart of component recognition according to the embodiment.

【図17】別の例のテンプレート作成のフローチャート
である。
FIG. 17 is a flowchart of another example of template creation.

【図18】同上の部品認識のフローチャートである。FIG. 18 is a flowchart of component recognition according to the embodiment.

【図19】更に別の例のテンプレート作成のフローチャ
ートである。
FIG. 19 is a flowchart of template creation of still another example.

【図20】同上の部品認識のフローチャートである。FIG. 20 is a flowchart of component recognition according to the embodiment.

【図21】異なる例のテンプレート作成のフローチャー
トである。
FIG. 21 is a flowchart of template creation in a different example.

【図22】同上の部品認識のフローチャートである。FIG. 22 is a flowchart of component recognition according to the embodiment.

【図23】別の実施例のテンプレート作成のフローチャ
ートである。
FIG. 23 is a flowchart of template creation according to another embodiment.

【図24】同上の部品認識のフローチャートである。FIG. 24 is a flowchart of component recognition according to the third embodiment.

【図25】他の実施例のテンプレート作成のフローチャ
ートである。
FIG. 25 is a flowchart of template creation according to another embodiment.

【図26】同上の部品認識のフローチャートである。FIG. 26 is a flowchart of component recognition according to the embodiment.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 佐久間 ▲祐▼治 大阪府門真市大字門真1048番地松下電工 株式会社内 (56)参考文献 特開 平4−349583(JP,A) 特開 平2−96287(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06T 1/00 G06T 7/00 - 7/60 ────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Sakuma ▲ Yuji ▼ Osamu Kazuma, Kadoma-shi, Osaka 1048 Matsushita Electric Works, Ltd. (56) References JP-A-4-349583 (JP, A) JP-A-2 -96287 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06T 1/00 G06T 7 /00-7/60

Claims (13)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 部品画像中に基準点と基準線とを任意に
設定して、輪郭線と、輪郭線上の各点の明るさの方向値
φjと、上記各点の上記基準点及び基準線に対する距離
r(φj)及び角度α(φj)とを求めて、明るさの方
向値φjに対する座標(r(φj),α(φj))の対
応表をテンプレートとして作成し、対象画像に対して輪
郭線を求めて輪郭線上の各点の座標(xj,yj)と明
るさの方向値φjとを求めて、一般化ハフ変換式 x=xj+r(φj−θ)cos[α(φj−θ)+θ] y=yj+r(φj−θ)sin[α(φj−θ)+θ] において角度θを変化させつつ座標(x,y)の値を求
め、この値と上記角度θとからアキュムレータ配列A
(x,y,θ)を作成し、このアキュムレータ配列A
(x,y,θ)の値としきい値との比較により、部品の
位置(x,y)及び角度θを認識する部品認識方法であ
って、 上記のテンプレート作成時に、部品画像の撮像を複数回
行うことで明るさの方向値の分散を求め、この分散に応
じて一般化ハフ変換における角度φの値の範囲を設定す
ことを特徴とする部品認識方法。
1. A reference point and a reference line are arbitrarily set in a part image, and a contour, a direction value φj of brightness of each point on the contour, the reference point and the reference line of each point are set. , A correspondence table of coordinates (r (φj), α (φj)) with respect to the brightness direction value φj is created as a template, and the target image is An outline is obtained, and coordinates (xj, yj) of each point on the outline and a brightness direction value φj are obtained, and a generalized Hough transform equation x = xj + r (φj−θ) cos [α (φj−θ) + Θ] y = yj + r (φj−θ) sin [α (φj−θ) + θ] The value of the coordinates (x, y) is obtained while changing the angle θ, and the accumulator array A is obtained from this value and the angle θ.
(X, y, θ) is created and this accumulator array A
This is a component recognition method for recognizing a component position (x, y) and an angle θ by comparing the value of (x, y, θ) with a threshold value.
Therefore, during the above template creation, the imaging of the part image is performed several times.
To obtain the variance of the brightness direction value, and
Set the value range of the angle φ in the generalized Hough transform
Parts recognition wherein the that.
【請求項2】 部品画像中に基準点と基準線とを任意に
設定して、輪郭線と、輪郭線上の各点の明るさの方向値
φjと、上記各点の上記基準点及び基準線に対する距離
r(φj)及び角度α(φj)とを求めて、明るさの方
向値φjに対する座標(r(φj),α(φj))の対
応表をテンプレートとして作成し、 対象画像に対して輪郭線を求めて輪郭線上の各点の座標
(xj,yj)と明るさの方向値φjとを求めて、一般
化ハフ変換式 x=xj+r(φj−θ)cos[α(φj−θ)+θ] y=yj+r(φj−θ)sin[α(φj−θ)+θ] において角度θを変化させつつ座標(x,y)の値を求
め、この値と上記角度θとからアキュムレータ配列A
(x,y,θ)を作成し、このアキュムレータ配列A
(x,y,θ)の値としきい値との比較により、部品の
位置(x,y)及び角 度θを認識する部品認識方法であ
って、 上記のテンプレート作成時に、隣接する2点の明るさの
方向値の差を求めて、この差の最大値に応じて一般化ハ
フ変換における角度φの値の範囲を設定することを特徴
とする 部品認識方法。
2. A reference point and a reference line are arbitrarily set in a part image.
Set the direction value of the outline and the brightness of each point on the outline
φj and the distance of each point from the reference point and reference line
r (φj) and angle α (φj)
A pair of coordinates (r (φj), α (φj)) for the direction value φj
Create a table as a template, find the contour line for the target image, and coordinate each point on the contour line.
(Xj, yj) and the brightness direction value φj
In the generalized Hough transform equation x = xj + r (φj−θ) cos [α (φj−θ) + θ] y = yj + r (φj−θ) sin [α (φj−θ) + θ] while changing the angle θ, the coordinates (x , Y)
From this value and the angle θ, the accumulator array A
(X, y, θ) is created and this accumulator array A
By comparing the value of (x, y, θ) with the threshold value,
Position (x, y) and recognizing component recognition method der the angles θ
Therefore, when creating the above template, the brightness of two adjacent points
The difference between the direction values is determined, and the generalized
The feature is to set the value range of the angle φ in the
Parts recognition method to be.
【請求項3】 部品画像中に基準点と基準線とを任意に
設定して、輪郭線と、輪郭線上の各点の明るさの方向値
φjと、上記各点の上記基準点及び基準線に対する距離
r(φj)及び角度α(φj)とを求めて、明るさの方
向値φjに対する座標(r(φj),α(φj))の対
応表をテンプレートとして作成し、 対象画像に対して輪郭線を求めて輪郭線上の各点の座標
(xj,yj)と明るさの方向値φjとを求めて、一般
化ハフ変換式 x=xj+r(φj−θ)cos[α(φj−θ)+θ] y=yj+r(φj−θ)sin[α(φj−θ)+θ] において角度θを変化させつつ座標(x,y)の値を求
め、この値と上記角度θとからアキュムレータ配列A
(x,y,θ)を作成し、このアキュムレータ配列A
(x,y,θ)の値としきい値との比較により、部品の
位置(x,y)及び角度θを認識する部品認識方法であ
って、 上記のテンプレート作成時に、注目点の両隣の明るさの
方向値の差のばらつきを求めて、このばらつきに応じて
一般化ハフ変換における角度φの値の範囲を設定するこ
とを特徴とする 部品認識方法。
3. A reference point and a reference line are arbitrarily set in a part image.
Set the direction value of the outline and the brightness of each point on the outline
φj and the distance of each point from the reference point and reference line
r (φj) and angle α (φj)
A pair of coordinates (r (φj), α (φj)) for the direction value φj
Create a table as a template, find the contour line for the target image, and coordinate each point on the contour line.
(Xj, yj) and the brightness direction value φj
In the generalized Hough transform equation x = xj + r (φj−θ) cos [α (φj−θ) + θ] y = yj + r (φj−θ) sin [α (φj−θ) + θ] while changing the angle θ, the coordinates (x , Y)
From this value and the angle θ, the accumulator array A
(X, y, θ) is created and this accumulator array A
By comparing the value of (x, y, θ) with the threshold value,
This is a component recognition method for recognizing a position (x, y) and an angle θ.
Therefore, when creating the above template, the brightness of both sides of the point of interest
Find the variation of the direction value difference, and according to this variation,
Set the value range of the angle φ in the generalized Hough transform.
And a component recognition method.
【請求項4】 一般化ハフ変換に際しての角度θの変化
分を、請求項1または請求項2または請求項3において
設定した角度φの値の範囲以上とすることを特徴とする
部品認識方法。
4. The change of the angle θ during the generalized Hough transform
In claim 1 or claim 2 or claim 3,
A component recognition method characterized in that the angle is set to be equal to or larger than a range of a set angle φ .
【請求項5】 テンプレート画像と、回転させたテンプ
レート画像とを比較して、両者の差の点数が所定値以上
となる時の回転角度を、一般化ハフ変換に際しての角度
θの変化分とすることを特徴とする請求項1または請求
項2または請求項3記載の部品認識方法。
5. A template image and a rotated balance
Compared to the rate image, the difference score between the two is greater than or equal to a predetermined value.
Is the angle at which the generalized Hough transform is performed.
2. The method according to claim 1, wherein the change is θ.
The component recognition method according to claim 2 or 3 .
【請求項6】 対象画像中に設定したテンプレート画像
の大きさに応じたハフ変換候補領域内の明るさの方向値
の最大度数と、テンプレートにおける明るさの方向値の
最大度数とがほぼ等しい時、上記ハフ変換候補領域をハ
フ変換対象領域 として一般化ハフ変換処理を行うことを
特徴とする請求項1から5までのいずれかの項に記載の
部品認識方法。
6. A template image set in a target image
Direction value of brightness in the Hough transform candidate area according to the size of
Of the maximum frequency of the
When the maximum frequency is almost equal to the Hough transform candidate area,
To perform a generalized Hough transform processing as full transformation target area
The component recognition method according to any one of claims 1 to 5, wherein:
【請求項7】 対象画像中に設定したテンプレート画像
の大きさに応じたハフ変換候補領域内の明るさの方向値
の正規化された最大度数と、テンプレートにおける明る
さの方向値の正規化された最大度数とがほぼ等しい時、
上記ハフ変換候補領域をハフ変換対象領域として一般化
ハフ変換処理を行うことを特徴とする請求項1から5ま
でのいずれかの項に記載の部品認識方法。
7. A template image set in a target image
Direction value of brightness in the Hough transform candidate area according to the size of
And the brightness in the template
When the normalized maximum frequency of the direction value is approximately equal,
Generalize the above Hough transform candidate areas as Huff transform target areas
The Hough transform processing is performed.
The component recognition method according to any of the above items .
【請求項8】 対象画像中に設定したテンプレート画像
の大きさに応じたハフ変換候補領域内の明るさの方向値
の度数分布をフーリエ変換して得たフーリエスペクトル
と、テンプレートにおける明るさの方向値の度数分布を
フーリエ変換して得たフーリエスペクトルとがほぼ等し
い時、上記ハフ変換候補領域をハフ変換対象領域として
一般化ハフ変換処理を行うことを特徴とする請求項1か
ら5までのいずれかの項に記載の部品認識方法。
8. A template image set in a target image
Direction value of brightness in the Hough transform candidate area according to the size of
Spectrum obtained by Fourier transform of the frequency distribution of
And the frequency distribution of the brightness direction values in the template
Fourier spectrum obtained by Fourier transform is almost equal
When the Huff transform candidate area is used as the Hough transform target area
2. The method according to claim 1, wherein a generalized Hough transform process is performed.
The component recognition method according to any one of the above-mentioned items .
【請求項9】 明るさの方向値の2番目の度数において
も比較することを特徴とする請求項6記載の部品認識方
法。
9. In the second frequency of the direction value of brightness,
7. The component recognition method according to claim 6, further comprising comparing
【請求項10】 対象画像中に設定したテンプレート画
像の大きさに応じたハフ変換候補領域内の角度αの分布
と、テンプレートにおける角度αの分布とがほぼ等しい
時、上記ハフ変換候補領域をハフ変換対象領域として一
般化ハフ変換処理を行うことを特徴とする請求項1から
5までのいずれかの項に記載の部品認識方法。
10. A template image set in a target image
Distribution of angle α in Hough transform candidate area according to image size
And the distribution of the angle α in the template are almost equal
At this time, the Huff conversion candidate area is regarded as a Hough conversion target area.
2. The method according to claim 1, wherein a generalized Hough transform process is performed.
5. The component recognition method according to any one of the items up to 5 .
【請求項11】 対象画像中に設定したテンプレート画
像の大きさに応じたハフ変換候補領域内の距離rの最大
値と、テンプレートにおける距離rの最大値とがほぼ等
しい時、上記ハフ変換候補領域をハフ変換対象領域とし
て一般化ハフ変換処理を行うことを特徴とする請求項1
から5までのいずれかの項に記載の部品認識方法。
11. A template image set in a target image
The maximum distance r in the Hough transform candidate area according to the size of the image
Value is almost equal to the maximum value of the distance r in the template
When the Huff conversion candidate area is a
2. A generalized Hough transform process is performed by using
6. The component recognition method according to any one of items 1 to 5 .
【請求項12】 対象画像中に設定したテンプレート画
像の大きさに応じたハフ変換候補領域内の二次モーメン
トと、テンプレートにおける二次モーメントとがほぼ等
しい時、上記ハフ変換候補領域をハフ変換対象領域と
し、ハフ変換候補領域内の慣性主軸とテンプレートにお
ける慣性主軸とから角度θの範囲を限定し て一般化ハフ
変換処理を行うことを特徴とする請求項1から5までの
いずれかの項に記載の部品認識方法。
12. A template image set in a target image
Secondary moment in the Hough transform candidate area according to the size of the image
And the second moment in the template are approximately equal
When the Huff transformation candidate area is
Then, the principal axis of inertia and the template in the Hough transform candidate area are
Generalized Hough by limiting the range of the angle θ from the inertia principal axis
6. The method according to claim 1, wherein a conversion process is performed.
The component recognition method according to any one of the above items .
【請求項13】 円形状部を有する部品の認識に適用す
る部品認識方法であって、まず円形状部の円を一般化ハ
フ変換で検出し、次にこの円の位置を基準に一般化ハフ
変換領域を設定して、この領域内だけで一般化ハフ変換
を行うことを特徴とする請求項1から5までのいずれか
の項に記載の部品認識方法。
13. The present invention is applied to recognition of a component having a circular portion.
First, the circle of the circular part is generalized.
And then generalized Huff based on the position of this circle.
Set the conversion area and generalized Hough transform only within this area
6. The method according to any one of claims 1 to 5, wherein
The component recognition method described in the section .
JP6025689A 1994-02-23 1994-02-23 Component recognition method Expired - Lifetime JP3027680B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6025689A JP3027680B2 (en) 1994-02-23 1994-02-23 Component recognition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6025689A JP3027680B2 (en) 1994-02-23 1994-02-23 Component recognition method

Publications (2)

Publication Number Publication Date
JPH07234939A JPH07234939A (en) 1995-09-05
JP3027680B2 true JP3027680B2 (en) 2000-04-04

Family

ID=12172765

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6025689A Expired - Lifetime JP3027680B2 (en) 1994-02-23 1994-02-23 Component recognition method

Country Status (1)

Country Link
JP (1) JP3027680B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3543442B2 (en) * 1995-09-26 2004-07-14 松下電工株式会社 Article interference detection method
JP4375212B2 (en) 2004-11-18 2009-12-02 ソニー株式会社 Collation apparatus, collation method, collation system, and program
CN103292734B (en) * 2013-05-27 2015-10-28 华中科技大学 Gamma value scaling method in phase measuring system
CN104574434B (en) * 2013-10-24 2017-09-29 株式会社理光 Object detecting method and device
JP5685665B1 (en) * 2014-04-28 2015-03-18 ヴィスコ・テクノロジーズ株式会社 Image recognition device
CN111914680A (en) * 2020-07-13 2020-11-10 苏州亚朴智能科技有限公司 Component identification and positioning method based on frequency domain characteristics

Also Published As

Publication number Publication date
JPH07234939A (en) 1995-09-05

Similar Documents

Publication Publication Date Title
Ullah et al. Orientation code matching for robust object search
US8705876B2 (en) Improving performance of image recognition algorithms by pruning features, image scaling, and spatially constrained feature matching
WO2018219054A1 (en) Method, device, and system for license plate recognition
JP5503018B2 (en) Scale space normalization technique to improve feature detection in uniform and non-uniform illumination changes
US8031948B2 (en) Shape comparison apparatus on contour decomposition and correspondence
US7848576B2 (en) Image matching method, image matching apparatus, and program
Li et al. Fast and reliable image enhancement using fuzzy relaxation technique
CN106981077B (en) Infrared image and visible light image registration method based on DCE and LSS
US6185343B1 (en) Position detection system and method
US20070009159A1 (en) Image recognition system and method using holistic Harr-like feature matching
JP5950441B2 (en) Image recognition apparatus, image recognition method, and image recognition program
WO2021179485A1 (en) Image rectification processing method and apparatus, storage medium, and computer device
US7983453B2 (en) Verification apparatus, verification method and program
JP3027680B2 (en) Component recognition method
Garagad et al. A novel technique of iris identification for biometric systems
US7149357B2 (en) Fast invariant pattern search
US7110603B2 (en) Fast invariant matching using template decomposition and synthesis
Zhang et al. A rotation invariant template matching algorithm based on Sub-NCC
Tsai et al. Real-time textureless object detection and recognition based on an edge-based hierarchical template matching algorithm
JP2992446B2 (en) Image recognition method and apparatus
Amayeh et al. Improvement of Zernike moment descriptors on affine transformed shapes
CN114926659B (en) Deformation target positioning algorithm based on SIFT and CM
JP2775404B2 (en) Automatic target identification device
Suryadana et al. An Improved Iris Tracking Algorithm for Eye Identification under Visible Light
Foolad et al. Graph-based visual saliency model using background color

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20000118

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080128

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090128

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090128

Year of fee payment: 9

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090128

Year of fee payment: 9

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100128

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100128

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110128

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120128

Year of fee payment: 12

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120128

Year of fee payment: 12

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130128

Year of fee payment: 13

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130128

Year of fee payment: 13

EXPY Cancellation because of completion of term