JPH05288534A - Inclination detecting method - Google Patents

Inclination detecting method

Info

Publication number
JPH05288534A
JPH05288534A JP4094520A JP9452092A JPH05288534A JP H05288534 A JPH05288534 A JP H05288534A JP 4094520 A JP4094520 A JP 4094520A JP 9452092 A JP9452092 A JP 9452092A JP H05288534 A JPH05288534 A JP H05288534A
Authority
JP
Japan
Prior art keywords
maximum
histogram
declination
electronic component
inclination
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
JP4094520A
Other languages
Japanese (ja)
Other versions
JP2766118B2 (en
Inventor
Junichi Hata
純一 秦
Keizo Izumida
圭三 泉田
Masamichi Morimoto
正通 森本
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 JP4094520A priority Critical patent/JP2766118B2/en
Publication of JPH05288534A publication Critical patent/JPH05288534A/en
Application granted granted Critical
Publication of JP2766118B2 publication Critical patent/JP2766118B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)
  • Supply And Installment Of Electrical Components (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To provide the inclination detecting method rarely affected by the noises due to a nozzle, dust, and intensity change, capable of handling various electronic parts in common, and having high flexibility. CONSTITUTION:The inclination detecting method has the first process #1 storing the variable-density image of a recognition object in a memory as a two-dimensional multi-value image, the second process #2 setting multiple sampling points on the two-dimensional multi-value image, the third process $4 determining the deflection angle added with the preset angle in the direction toward the maximum intensity gradient and the size of the intensity gradient, the fourth process #5 generating the deflection angle histogram indicating the maximum intensity gradient occurrence frequency for each deflection angle, the fifth process #7 displacing the deflection angle histogram of the fourth process #5 by the preset angle and accumulating it to generate the accumulated deflection angle histogram, and the sixth process #8, #9 determining the deflection angle having the maximum intensity gradient occurrence frequency in the deflection angle histogram of the fourth process #5 and the accumulated deflection angle histogram of the fifth process #7 as the inclination of the recognition object.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、電子部品装着機におい
て、電子部品を撮像し、電子部品の装着補正角度を求め
る、傾き検出方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a tilt detecting method in an electronic component mounting machine, in which an electronic component is imaged and a mounting correction angle of the electronic component is obtained.

【0002】[0002]

【従来の技術】以前から、電子部品を基板上にマウント
する電子部品装着機では、視覚認識技術を応用した部品
位置決め方法が行われている。これまでの電子部品装着
機における視覚認識方法では、部品に固有な閾値を用い
て、部品本体と背景とを分離する2値処理方法が主流で
あるが、最近では、濃淡画像を64階調、128階調あ
るいは256階調で表現する多値処理に移行しつつあ
る。この多値処理による傾き検出方法の従来技術として
は、1次元エッジ検出による方法がある。
2. Description of the Related Art An electronic component mounting machine for mounting electronic components on a substrate has been using a component positioning method to which visual recognition technology is applied. In the conventional visual recognition method in the electronic component mounting machine, a binary processing method for separating the component body and the background by using a threshold unique to the component is mainstream, but recently, a grayscale image has 64 gradations, A multi-valued process of expressing with 128 gradations or 256 gradations is being started. As a conventional technique of the inclination detection method by the multi-valued processing, there is a method by one-dimensional edge detection.

【0003】以下に、上記の多値処理による傾き検出方
法の従来例を図20〜図25に基づいて説明する。
A conventional example of the inclination detecting method by the above-mentioned multi-valued processing will be described below with reference to FIGS.

【0004】図20は、認識対象物の電子部品の2次元
多値画像10と、1次元エッジ検出を行う点によってな
る線分11、12と、線分11と12の1次元エッジ検
出で得られたエッジ点13と14とを示している。
FIG. 20 shows a two-dimensional multi-valued image 10 of an electronic component of a recognition object, line segments 11 and 12 consisting of points for performing one-dimensional edge detection, and one-dimensional edge detection of the line segments 11 and 12. The illustrated edge points 13 and 14 are shown.

【0005】図21は、認識対象物の電子部品の2次元
多値画像10と、1次元エッジ検出を行う点によってな
る線分11、12と、線分11、12上の輝度分布と、
線分11、12上の輝度の2次微分値と、線分11又は
12上にある電子部品の2次元多値画像10のエッジ点
13または14の位置に対応する2次微分値0の点16
(13、14)とを示している。
FIG. 21 shows a two-dimensional multi-valued image 10 of an electronic component as a recognition target, line segments 11 and 12 formed by points for performing one-dimensional edge detection, and luminance distribution on the line segments 11 and 12.
Second-order differential value of luminance on the line segments 11 and 12, and point of second-order differential value 0 corresponding to the position of the edge point 13 or 14 of the two-dimensional multi-valued image 10 of the electronic component on the line segment 11 or 12 16
(13, 14) are shown.

【0006】次に、図20、図21に基づいて、1次元
エッジ検出方法を説明する。
Next, the one-dimensional edge detection method will be described with reference to FIGS.

【0007】図20において、認識対象物の電子部品の
2次元多値画像10の1つの辺上から、2箇所のエッジ
点を検出できるように、1次元エッジ検出を行う点によ
ってなる線分11、12を設定する。線分11、12に
ついて、夫々の1次元エッジ検出により、認識対象物の
電子部品の2次元多値画像10の1つの辺上に、2次元
多値画像10のエッジ点13と14とが求められる。こ
のエッジ点13と14とを結んで得られる直線15の傾
きを電子部品の傾きとする。
In FIG. 20, a line segment 11 composed of points for which one-dimensional edge detection is performed so that two edge points can be detected on one side of a two-dimensional multi-valued image 10 of an electronic component to be recognized. , 12 are set. For the line segments 11 and 12, edge points 13 and 14 of the two-dimensional multi-valued image 10 are obtained on one side of the two-dimensional multi-valued image 10 of the electronic component of the recognition target by detecting the respective one-dimensional edges. Be done. The inclination of the straight line 15 obtained by connecting the edge points 13 and 14 is the inclination of the electronic component.

【0008】図21は、1次元エッジ検出について説明
したもので、認識対象物の電子部品の2次元多値画像1
0において、輝度が急激に変化する電子部品の2次元多
値画像10の縁を横切るような線分11または12を設
定する。次に、この線分11または12上の輝度の分布
を求めると、その分布は、図21の輝度の分布曲線のよ
うになり、電子部品の2次元多値画像10の縁を横切る
位置で、輝度は急激に変化する。更に、前記線分11ま
たは12上の輝度の分布の2次微分値を求めると、その
2次微分値は、図21の輝度の2次微分値曲線のように
なり、2次微分値が、負値から正値に大きく変化し、そ
の中間で、0になる2次微分値0の点16(13、1
4)が求められる。この点16を、認識対象物の電子部
品の2次元多値画像10の縁の位置とし、この点16を
2つ求めてその間を結ぶ直線の傾きを、認識対象物の電
子部品の傾きとするのが、1次元エッジ検出方法であ
る。
FIG. 21 illustrates the one-dimensional edge detection. The two-dimensional multi-valued image 1 of the electronic component of the recognition object is shown in FIG.
At 0, the line segment 11 or 12 is set so as to cross the edge of the two-dimensional multi-valued image 10 of the electronic component in which the brightness changes abruptly. Next, when the luminance distribution on this line segment 11 or 12 is obtained, the distribution becomes like the luminance distribution curve of FIG. 21, and at the position where it crosses the edge of the two-dimensional multi-valued image 10 of the electronic component, The brightness changes rapidly. Further, when the secondary differential value of the brightness distribution on the line segment 11 or 12 is obtained, the secondary differential value becomes like the secondary differential value curve of the brightness in FIG. 21, and the secondary differential value is A point 16 (13, 1, 1) with a secondary differential value of 0 that greatly changes from a negative value to a positive value and becomes 0 in the middle
4) is required. This point 16 is taken as the position of the edge of the two-dimensional multi-valued image 10 of the electronic component of the recognition object, and the inclination of the straight line connecting the two points 16 is defined as the inclination of the electronic component of the recognition object. Is the one-dimensional edge detection method.

【0009】[0009]

【発明が解決しようとする課題】しかし、上記の従来例
の方法では、図22に示すように、電子部品10を真空
吸着している吸着ノズル17が、1次元エッジ検出を行
う線分12上にはみだした場合、或いは、図23に示す
ように、電子部品10の一部にゴミ19が付着していた
場合、或いは、図24に示すように、電子部品10の表
面の一部に、大きな輝度変化部21があった場合等で
は、1次元エッジ検出方法で求めたエッジ点と、電子部
品の縁の位置とが一致しないことがあるという問題点が
ある。
However, in the above-described conventional method, as shown in FIG. 22, the suction nozzle 17 that vacuum-sucks the electronic component 10 is on the line segment 12 for performing one-dimensional edge detection. 23, or when dust 19 is attached to a part of the electronic component 10 as shown in FIG. 23, or when a large amount of dust is present on a part of the surface of the electronic component 10 as shown in FIG. In the case where there is the brightness changing portion 21, there is a problem that the edge point obtained by the one-dimensional edge detection method may not match the position of the edge of the electronic component.

【0010】図22の場合においては、線分11につい
て1次元エッジ検出方法で求めたエッジ点13は、電子
部品10の縁の位置と一致するが、線分12について1
次元エッジ検出方法で求めたエッジ点14′は、電子部
品10の縁の位置(エッジ点14)と一致せず、検出し
た直線18の傾きは、電子部品10の傾きとは異なる。
In the case of FIG. 22, the edge point 13 obtained by the one-dimensional edge detection method for the line segment 11 coincides with the position of the edge of the electronic component 10, but 1 for the line segment 12.
The edge point 14 ′ obtained by the dimension edge detection method does not match the position of the edge of the electronic component 10 (edge point 14), and the detected inclination of the straight line 18 is different from the inclination of the electronic component 10.

【0011】図23の場合においては、線分12につい
て1次元エッジ検出方法で求めたエッジ点14は、電子
部品10の縁の位置と一致するが、線分11について1
次元エッジ検出方法で求めたエッジ点13′は、電子部
品10の縁の位置(エッジ点13)と一致せず、検出し
た直線20の傾きは、電子部品10の傾きとは異なる。
In the case of FIG. 23, the edge point 14 obtained by the one-dimensional edge detection method for the line segment 12 coincides with the position of the edge of the electronic component 10, but 1 for the line segment 11.
The edge point 13 ′ obtained by the dimension edge detection method does not match the edge position (edge point 13) of the electronic component 10, and the detected inclination of the straight line 20 is different from the inclination of the electronic component 10.

【0012】図24の場合においては、線分12につい
て1次元エッジ検出方法で求めたエッジ点14は、電子
部品10の縁の位置と一致するが、線分11について1
次元エッジ検出方法で求めたエッジ点13′は、電子部
品10の縁の位置(エッジ点13)と一致せず、検出し
た直線22の傾きは、電子部品10の傾きとは異なる。
In the case of FIG. 24, the edge point 14 obtained by the one-dimensional edge detection method for the line segment 12 coincides with the position of the edge of the electronic component 10, but 1 for the line segment 11.
The edge point 13 ′ obtained by the dimensional edge detection method does not match the edge position (edge point 13) of the electronic component 10, and the detected inclination of the straight line 22 is different from the inclination of the electronic component 10.

【0013】又、電子部品の縁の形状が異なり、図25
に示すように、電子部品10の縁の形状が複雑な場合に
は、1次元エッジ検出を行う点で構成される線分23の
設定本数や位置や、求められたエッジ点24からの直線
25の傾きの計算方法をその都度、その形状に合わせて
検討する必要があり、処理が複雑になり、時間がかかる
という問題点がある。
In addition, the shape of the edge of the electronic component is different, as shown in FIG.
As shown in FIG. 7, when the edge shape of the electronic component 10 is complicated, the set number and position of the line segment 23 configured by the points for performing the one-dimensional edge detection, and the straight line 25 from the obtained edge point 24. It is necessary to study the calculation method of the inclination of each time according to its shape, and there is a problem that the processing becomes complicated and takes time.

【0014】本発明は、上記の問題点を解決し、ノズル
や、ゴミ、輝度変化等によるノイズの影響が少なく、多
品種の電子部品を共通に扱える汎用性が高い、傾き検出
方法を提供することを課題としている。
The present invention solves the above-mentioned problems and provides a tilt detecting method which is less affected by noise due to nozzles, dust, brightness changes, etc. and has a high versatility that can handle a wide variety of electronic components in common. That is the issue.

【0015】[0015]

【課題を解決するための手段】本願第1発明の傾き検出
方法は、上記の課題を解決するために、認識対象物の濃
淡画像を2次元多値画像としてメモリに格納する第1工
程と、前記2次元多値画像上に複数のサンプリング点を
設定する第2工程と、前記第2工程で設定された各サン
プリング点において、2次元多値画像上の全ての方向の
中で、輝度勾配が最大となる方向に所定の角度を加えた
偏角と輝度勾配の大きさとを求める第3工程と、前記第
3工程の処理結果から、前記輝度勾配の大きさを頻度の
重みとして偏角別の最大輝度勾配発生頻度を表す偏角ヒ
ストグラムを作成する第4工程と、前記第4工程の偏角
ヒストグラムにおいて最大輝度勾配発生頻度が最大とな
る偏角を求め、この最大となる偏角を認識対象物の傾き
とする第5工程とを有することを特徴とする。
In order to solve the above-mentioned problems, a tilt detecting method according to the first invention of the present application comprises a first step of storing a grayscale image of a recognition target object in a memory as a two-dimensional multi-valued image. In the second step of setting a plurality of sampling points on the two-dimensional multi-valued image, and at each sampling point set in the second step, the luminance gradient is in all directions on the two-dimensional multi-valued image. A third step of obtaining a deviation angle obtained by adding a predetermined angle to the maximum direction and a magnitude of the brightness gradient, and from the processing result of the third step, the magnitude of the brightness gradient is used as a frequency weighting for each deviation angle. A fourth step of creating a declination histogram representing the maximum luminance gradient occurrence frequency, a declination angle at which the maximum luminance gradient occurrence frequency is maximum in the declination histogram of the fourth step is obtained, and the declination angle at which this maximum is obtained is recognized. The fifth step, which is the inclination of the object Characterized in that it has.

【0016】本願第2発明の傾き検出方法は、上記の課
題を解決するために、認識対象物の濃淡画像を2次元多
値画像としてメモリに格納する第1工程と、前記2次元
多値画像上に複数のサンプリング点を設定する第2工程
と、前記第2工程で設定された各サンプリング点におい
て、2次元多値画像上の全ての方向の中で、輝度勾配が
最大となる方向に所定の角度を加えた偏角と輝度勾配の
大きさとを求める第3工程と、前記第3工程の処理結果
から、前記輝度勾配の大きさを頻度の重みとして偏角別
の最大輝度勾配発生頻度を表す偏角ヒストグラムを作成
する第4工程と、前記第4工程の偏角ヒストグラムを所
定角度分だけ変位させて累算して累算偏角ヒストグラム
を作成する第5工程と、前記第5工程の累算偏角ヒスト
グラムにおいて最大輝度勾配発生頻度が最大となる偏角
を求め、この最大となる偏角を認識対象物の傾きとする
第6工程とを有することを特徴とする。
In order to solve the above-mentioned problems, the inclination detecting method of the second invention of the present application comprises a first step of storing a grayscale image of a recognition object as a two-dimensional multivalued image in a memory, and the two-dimensional multivalued image. In the second step of setting a plurality of sampling points on the upper side, and in each of the sampling points set in the second step, a predetermined direction is set in the direction in which the brightness gradient is maximum among all directions on the two-dimensional multi-valued image. From the processing result of the third step of obtaining the deviation angle and the magnitude of the luminance gradient to which the angle is added, the maximum luminance gradient occurrence frequency for each deviation angle is determined using the magnitude of the luminance gradient as the frequency weight. A fourth step of creating a declination histogram represented, a fifth step of displacing the declination histogram of the fourth step by a predetermined angle and accumulating to create a cumulative declination histogram; and a fifth step of the fifth step. The highest in the accumulated declination histogram Seeking deflection angle luminance gradient occurrence frequency is maximum, and having a sixth step of the deflection angle becomes the maximum and the inclination of the object to be recognized.

【0017】又、本願第2発明の傾き検出方法は、上記
の課題を解決するために、第5工程の所定角度は、90
度の整数倍であることが好適である。
In the tilt detecting method of the second invention of the present application, in order to solve the above problems, the predetermined angle in the fifth step is 90.
It is preferably an integral multiple of degrees.

【0018】[0018]

【作用】本願第1発明の傾き検出方法は、第1工程で、
認識対象物の濃淡画像を2次元多値画像としてメモリに
格納し、第2工程で、前記2次元多値画像上に複数のサ
ンプリング点を設定し、第3工程で、前記第2工程で設
定された各サンプリング点において、2次元画多値像上
の全ての方向の中で、輝度勾配が最大となる方向に所定
の角度を加えた偏角と輝度勾配の大きさとを求め、第4
工程で、前記第3工程の処理結果から、前記輝度勾配の
大きさを頻度の重みとして偏角別の最大輝度勾配発生頻
度を表す偏角ヒストグラムを作成し、第5工程で、前記
第4工程の偏角ヒストグラムにおいて最大輝度勾配発生
頻度が最大となる偏角を求めると、この最大となる偏角
が認識対象物の傾きである。その理由は、次の通りであ
る。
In the tilt detecting method of the first invention of the present application, in the first step,
A grayscale image of the recognition object is stored in a memory as a two-dimensional multi-valued image, a plurality of sampling points are set on the two-dimensional multi-valued image in the second step, and set in the second step in the third step. At each of the sampled points, a deviation angle obtained by adding a predetermined angle to the direction in which the brightness gradient is maximum in all directions on the two-dimensional image multi-valued image and the magnitude of the brightness gradient are calculated.
In the step, a deviation angle histogram representing the maximum frequency of occurrence of the maximum brightness gradient for each deviation angle is created from the processing result of the third step using the magnitude of the brightness gradient as a frequency weight, and in the fifth step, the fourth step. When the argument having the maximum frequency of occurrence of the maximum luminance gradient is obtained in the argument histogram, the argument having the maximum is the inclination of the recognition object. The reason is as follows.

【0019】電子部品等の認識対象物の2次元多値画像
において、電子部品の縁に相当する点についての、2次
元多値画像の輝度勾配が最大となる方向は、通常、電子
部品の縁に対して垂直な方向なので、輝度勾配が最大と
なる方向に、90度の奇数倍を加えた方向は、電子部品
の縁の接線方向、即ち、縁が伸びている方向である。
In a two-dimensional multi-valued image of an object to be recognized such as an electronic component, the direction in which the brightness gradient of the two-dimensional multi-valued image is maximum at a point corresponding to the edge of the electronic component is usually the edge of the electronic component. Since the direction is perpendicular to, the direction obtained by adding an odd multiple of 90 degrees to the direction in which the brightness gradient is maximum is the tangential direction of the edge of the electronic component, that is, the direction in which the edge extends.

【0020】それで、第3工程での所定の角度を、90
度の奇数倍とすると(所定の角度は、輝度勾配が最大と
なる方向と電子部品の縁の接線方向とのなす角度である
が、90度の奇数倍以外のこともあり得る。)、第2工
程で設定された各サンプリング点についての、輝度勾配
が最大となる方向にこの所定の角度を加えた偏角は、夫
々のサンプリング点の近傍の電子部品の縁の接線方向を
示す。従って、偏角ヒストグラムにおいて第4工程で求
められた最大輝度勾配発生頻度が最大となる偏角方向
は、電子部品の縁の方向を示す。そして、電子部品が複
雑な形状をしていても、何処かの部分に直線的な縁があ
るので、この直線的な縁で、その方向検出が可能であ
る。
Therefore, the predetermined angle in the third step is 90
If it is an odd multiple of 90 degrees (the predetermined angle is an angle formed by the direction in which the brightness gradient is maximum and the tangential direction of the edge of the electronic component, it may be other than an odd multiple of 90 degrees). For each sampling point set in two steps, the declination obtained by adding this predetermined angle to the direction in which the brightness gradient is maximized indicates the tangential direction of the edge of the electronic component near each sampling point. Therefore, the declination direction in which the maximum luminance gradient occurrence frequency obtained in the fourth step in the declination histogram is maximum indicates the direction of the edge of the electronic component. Even if the electronic component has a complicated shape, since there is a linear edge at some portion, the direction can be detected with this linear edge.

【0021】この場合、2次元多値画像内にノズルの画
像があったり、電子部品等の認識対象物にゴミが付着し
ていたり、電子部品等の認識対象物に部分的輝度変化等
があったりしても、これらは何れも部分的なものなの
で、これらから得られるデータ数は、全体から得られる
データ数に比較して、非常に少ないので、その影響は殆
ど無く、且つ、前記の所定の角度を適切に決めるだけ
で、多品種の電子部品を共通に扱えるので、汎用性が高
い。
In this case, there is a nozzle image in the two-dimensional multi-valued image, dust adheres to a recognition target such as an electronic component, or there is a partial change in brightness of the recognition target such as an electronic component. However, since all of them are partial, the number of data obtained from them is very small compared to the number of data obtained from the whole, so there is almost no effect and the above-mentioned predetermined The versatility is high because a wide variety of electronic components can be handled in common by simply determining the appropriate angle.

【0022】本願第2発明の傾き検出方法は、上記の本
願第1発明の傾き検出方法の第4工程までの作用に加え
て、第5工程で、前記第4工程の偏角ヒストグラムを所
定角度分(2次元多値画像上の複数の直線部分間の角
度)だけ変位させて累算して累算偏角ヒストグラムを作
成し、第6工程で、第5工程の累算偏角ヒストグラムに
おいて最大輝度勾配発生頻度が最大となる偏角を求める
と、この最大となる偏角が、認識対象物の傾きとなる。
その理由は、次の通りである。
In addition to the operation up to the fourth step of the tilt detecting method of the first invention of the present application, the tilt detecting method of the second invention of the present application, in addition to the operation of the tilt angle of the fourth step of the fifth step in the fifth step, The accumulated deviation angle histogram is created by displacing by minutes (the angle between a plurality of straight line portions on the two-dimensional multi-valued image) and accumulated, and in the sixth step, the maximum is obtained in the accumulated deviation angle histogram of the fifth step. When the declination that maximizes the frequency of occurrence of the brightness gradient is calculated, this declination that is the maximum is the inclination of the recognition target.
The reason is as follows.

【0023】通常、電子部品等の認識対象物の外形は、
直方形を基準としており、一部に複雑な形状が付加して
いても、その外周各部の大部分の縁が伸びる方向は、直
方形の4辺の何れかと一致する。それで、第4工程で求
められた偏角別の最大輝度勾配発生頻度を表す偏角ヒス
トグラムには、直方形の4辺の方向に対応した、90度
の整数倍ずつ方向が異なる4つの偏角において、偏角別
の最大輝度勾配発生頻度が大きくなっている。従って、
若し、各偏角ヒストグラムにおいて、最大輝度勾配発生
頻度が最大の偏角が明確でない場合に、第5工程で、所
定角度(2次元多値画像上の複数の直線部分間の角度)
を90度の整数倍とし、偏角ヒストグラムを90度の整
数倍分だけ変位させて累算した累算偏角ヒストグラムを
作ると、この累算偏角ヒストグラムにおいて、最大輝度
勾配発生頻度が最大となる偏角が、累算前の各偏角ヒス
トグラムに比較してより明確になり、認識対象物の傾き
が明確に判定できる。
Usually, the outer shape of an object to be recognized such as an electronic component is
The rectangular parallelepiped is used as a reference, and even if a complicated shape is added to a part, the direction in which most of the edges of the outer peripheral portions extend coincides with any of the four sides of the rectangular parallelepiped. Therefore, in the deviation histogram showing the maximum luminance gradient occurrence frequency for each deviation obtained in the fourth step, there are four deviation angles corresponding to the directions of the four sides of the rectangular parallelepiped that are different by integer multiples of 90 degrees. In, the frequency of occurrence of the maximum luminance gradient for each declination is large. Therefore,
If, in each argument histogram, the argument having the maximum frequency of occurrence of the maximum brightness gradient is not clear, a predetermined angle (angle between a plurality of straight line portions on the two-dimensional multi-valued image) is determined in the fifth step.
Is an integral multiple of 90 degrees, and the deviation angle histogram is displaced by an integral multiple of 90 degrees to create an accumulated deviation angle histogram. In this accumulation deviation angle histogram, the maximum luminance gradient occurrence frequency is the maximum. The declination angle becomes clearer than each declination histogram before accumulation, and the inclination of the recognition object can be clearly determined.

【0024】[0024]

【実施例】本発明の傾き検出方法の一実施例方法を図1
〜図19に基づいて説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the inclination detecting method of the present invention is shown in FIG.
~ It demonstrates based on FIG.

【0025】図1は、本発明の傾き検出方法の一実施例
方法のフローチャートである。
FIG. 1 is a flow chart of a method of an embodiment of the inclination detecting method of the present invention.

【0026】図1のフローチャートにおいて、ステップ
#1において、認識対象物の濃淡画像を2次元多値画像
としてメモリに格納し、ステップ#2に進む。
In the flowchart of FIG. 1, in step # 1, the grayscale image of the recognition object is stored in the memory as a two-dimensional multivalued image, and the process proceeds to step # 2.

【0027】ステップ#2において、前記2次元多値画
像上に複数のサンプリング点を設定し、ステップ#3に
進む。
In step # 2, a plurality of sampling points are set on the two-dimensional multi-valued image, and the process proceeds to step # 3.

【0028】ステップ#3において、ステップ#2で設
定された全てのサンプリング点について、次のステップ
#4とステップ#5の処理が完了か否かを判断し、完了
であればステップ#6に進み、否であればステップ#4
に進む。
In step # 3, it is determined whether or not the processing of the next steps # 4 and # 5 is completed for all the sampling points set in step # 2. If completed, the process proceeds to step # 6. If not, step # 4
Proceed to.

【0029】ステップ#4において、ステップ#2で設
定された各サンプリング点において、2次元多値画像上
の全ての方向の中で、輝度勾配が最大となる方向に所定
の角度を加えた偏角と輝度勾配の大きさとを求め、ステ
ップ#5に進む。
In step # 4, at each sampling point set in step # 2, a deviation angle obtained by adding a predetermined angle to the direction in which the brightness gradient is maximum among all directions on the two-dimensional multi-valued image. And the magnitude of the brightness gradient are obtained, and the process proceeds to step # 5.

【0030】ステップ#5において、ステップ#4の処
理結果から、前記輝度勾配の大きさを頻度の重みとして
偏角別の最大輝度勾配発生頻度を表す偏角ヒストグラム
を作成し、ステップ#3に戻る。
In step # 5, from the processing result of step # 4, a deviation angle histogram representing the maximum frequency of occurrence of the brightness gradient for each argument is created using the magnitude of the brightness gradient as a frequency weight, and the process returns to step # 3. ..

【0031】ステップ#6において、ステップ#5で作
成した偏角ヒストグラムが、最大輝度勾配発生頻度が最
大となる偏角を明確に示しておれば、偏角ヒストグラム
の累算が不要と判断してステップ#8に進み、ステップ
#5で作成した偏角ヒストグラムが、最大輝度勾配発生
頻度が最大となる偏角を明確に示していなければ、偏角
ヒストグラムの累算が必要と判断してステップ#7に進
む。
In step # 6, if the deviation angle histogram created in step # 5 clearly indicates the deviation angle at which the maximum luminance gradient occurrence frequency is maximum, it is judged that accumulation of the deviation angle histogram is unnecessary. Proceeding to step # 8, if the deviation angle histogram created in step # 5 does not clearly indicate the deviation angle at which the maximum luminance gradient occurrence frequency is the maximum, it is determined that accumulation of the deviation angle histogram is necessary, and step # 8 is executed. Proceed to 7.

【0032】ステップ#7において、ステップ#5で作
成した偏角ヒストグラムを所定角度分だけ変位させて累
算し累算偏角ヒストグラムを作成し、ステップ#8に進
む。
In step # 7, the deviation angle histogram created in step # 5 is displaced by a predetermined angle and accumulated to create an accumulated deviation angle histogram, and the process proceeds to step # 8.

【0033】ステップ#8において、ステップ#5で作
成した偏角ヒストグラム、又は、ステップ#7で作成し
た累算偏角ヒストグラムから、最大輝度勾配発生頻度が
最大となる偏角を求め、ステップ#9に進む。
In step # 8, the argument that maximizes the frequency of occurrence of the maximum luminance gradient is found from the argument histogram created in step # 5 or the accumulated argument histogram created in step # 7, and step # 9 Proceed to.

【0034】ステップ#9において、ステップ#8で求
めた最大輝度勾配発生頻度が最大となる偏角から、電子
部品等の認識対象物の傾きを求める。
In step # 9, the inclination of the recognition object such as an electronic component is obtained from the declination that maximizes the maximum luminance gradient occurrence frequency obtained in step # 8.

【0035】図2〜図5は、本実施例の図1のフローチ
ャートのステップ#1における、メモリに格納した電子
部品等の濃淡画像の2次元多値画像10を示す。これら
の2次元多値画像10は、幾つかの直線部分からなる縁
で構成されている。そして、この縁において画像の輝度
が急激に変化している。又、電子部品等の認識対象物の
傾きは、電子部品の縁が伸びている方向で表せることが
多い。
2 to 5 show a two-dimensional multi-valued image 10 of a grayscale image of an electronic component or the like stored in the memory in step # 1 of the flowchart of FIG. 1 of this embodiment. These two-dimensional multi-valued images 10 are composed of edges composed of several straight line portions. Then, the luminance of the image changes rapidly at this edge. Further, the inclination of a recognition target such as an electronic component can often be represented by the direction in which the edge of the electronic component extends.

【0036】図6、図7は、本実施例の図1のフローチ
ャートのステップ#2における、2次元多値画像上に設
定した複数のサンプリング点Sを示す。この複数のサン
プリング点Sは、図6、図7に示すように、電子部品の
全体または一部に、格子点状に設定する。
6 and 7 show a plurality of sampling points S set on the two-dimensional multi-valued image in step # 2 of the flowchart of FIG. 1 of the present embodiment. As shown in FIGS. 6 and 7, the plurality of sampling points S are set in a lattice point shape in the whole or a part of the electronic component.

【0037】図8〜図10は、本実施例の図1のフロー
チャートのステップ#4で、前工程で設定された各サン
プリング点Sについて、2次元多値画像上の全ての方向
の中で、輝度勾配が最大となる方向に所定の角度を加え
た偏角と輝度勾配の大きさとを求める方法を示す。
8 to 10 show, in step # 4 of the flow chart of FIG. 1 of the present embodiment, for each sampling point S set in the previous step, in all directions on the two-dimensional multivalued image, A method of obtaining the declination obtained by adding a predetermined angle in the direction in which the brightness gradient is maximum and the magnitude of the brightness gradient will be described.

【0038】図8において、設定された各サンプリング
点Sの周囲に、x方向、y方向の、A〜Hの8点を設
け、例えば、A点における輝度をZ(A)と表現すれ
ば、サンプリング点Sのx方向の輝度勾配Zx は、 Zx=Z(C)+Z(D)+Z(E)−Z(A)−Z
(H)−Z(G) サンプリング点Sのy方向の輝度勾配Zy は、 Zy =Z(G)+Z(F)+Z(E)−Z(A)−Z
(B)−Z(C) として求めることができる。
In FIG. 8, eight points A to H in the x and y directions are provided around each set sampling point S. For example, if the brightness at the point A is expressed as Z (A), The brightness gradient Z x of the sampling point S in the x direction is Zx = Z (C) + Z (D) + Z (E) −Z (A) −Z
(H) −Z (G) The luminance gradient Z y of the sampling point S in the y direction is Z y = Z (G) + Z (F) + Z (E) −Z (A) −Z
(B) -Z (C).

【0039】そして、ZxとZy とを2次元ベクトル
(Zx、Zy )とみなすと、図9に示すようにして、輝
度勾配が最大となる方向θが求まり、所定の角度を90
度とすれば、偏角=θ+90°となり、輝度勾配の大き
さは式(1)となる。
If Zx and Z y are regarded as a two-dimensional vector (Zx, Z y ), the direction θ that maximizes the brightness gradient is obtained as shown in FIG.
In terms of degrees, the deviation angle = θ + 90 °, and the magnitude of the brightness gradient is given by equation (1).

【0040】[0040]

【数1】 [Equation 1]

【0041】図10の上部は、全てのサンプリング点S
について、輝度勾配が最大となる方向θと輝度勾配の大
きさを示したものである。各サンプリング点Sの棒の方
向が、各サンプリング点Sの輝度勾配が最大となる方向
θを示す。各サンプリング点Sの棒の長さが、各サンプ
リング点Sの輝度勾配の大きさを示す。直方形の2次元
多値画像10の辺の近傍にあるサンプリング点Sの輝度
勾配が最大となる方向θは、辺に垂直方向であり、直方
形の2次元多値画像10の頂角の近傍にあるサンプリン
グ点Sの輝度勾配が最大となる方向θは、頂角の2等分
線の方向に傾いている。
The upper part of FIG. 10 shows all sampling points S.
Is the direction θ that maximizes the brightness gradient and the magnitude of the brightness gradient. The direction of the bar of each sampling point S indicates the direction θ in which the brightness gradient of each sampling point S is maximum. The length of the bar at each sampling point S indicates the magnitude of the brightness gradient at each sampling point S. The direction θ where the brightness gradient of the sampling point S near the side of the rectangular two-dimensional multi-valued image 10 is maximum is the direction perpendicular to the side, and near the apex angle of the rectangular two-dimensional multi-valued image 10. The direction θ in which the luminance gradient of the sampling point S at 1 is maximum is inclined in the direction of the bisector of the apex angle.

【0042】図10の下部は、本実施例の図1のフロー
チャートのステップ#5で、前工程の処理結果(図10
の上部)から、サンプリング点Sの輝度勾配が最大とな
る方向θに所定の角度を加えた偏角(θ+所定の角度)
に対して、輝度勾配の大きさを頻度の重みとして累算し
て作成した偏角別の最大輝度勾配発生頻度を表す偏角ヒ
ストグラムを示す。
The lower part of FIG. 10 shows the processing result of the previous process (FIG. 10) in step # 5 of the flowchart of FIG. 1 of this embodiment.
Angle (θ + predetermined angle) obtained by adding a predetermined angle to the direction θ in which the brightness gradient of the sampling point S is maximized
On the other hand, a declination histogram representing the maximum frequency of occurrence of the luminance gradient for each declination, which is created by accumulating the magnitude of the luminance gradient as a frequency weight, is shown.

【0043】そして、図10の下部に示す偏角ヒストグ
ラムの作成方法は次の通りである。
The method of creating the deviation histogram shown in the lower part of FIG. 10 is as follows.

【0044】この偏角ヒストグラムとは、360度をn
等分(nは任意の自然数)し、n個の区間(1からnま
で)の夫々の最大輝度勾配発生頻度を求めたものであ
る。いま輝度勾配が最大になる方向θに90度を加えた
偏角をm度とし、k番目の偏角区間の輝度勾配が最大に
なる頻度をH(k)、サンプリング点Sの輝度勾配をD
とすると、その処理は、 H([mn/360]+1)←H([mn/360]+
1)+D となる(但し、[]は整数化を示し、この場合の処理
は、([mn/360]+1)番目の偏角区間にDを加
えることを示す。)。
This deviation angle histogram means that 360 degrees is n.
This is an equal division (n is an arbitrary natural number), and the maximum luminance gradient occurrence frequency of each of the n sections (1 to n) is obtained. Now, let us say that the deviation angle obtained by adding 90 degrees to the direction θ in which the brightness gradient is maximum is m degrees, the frequency at which the brightness gradient in the kth argument section is maximum is H (k), and the brightness gradient at the sampling point S is D.
Then, the processing is H ([mn / 360] +1) ← H ([mn / 360] +
1) + D (however, [] indicates integerization, and the processing in this case indicates that D is added to the ([mn / 360] +1) th declination section).

【0045】本実施例では、図10の上部の2次元多値
画像10が直方形なので、直方形の各辺の近傍にあるサ
ンプリング点Sの輝度勾配が最大となる方向θに所定の
角度を加えた偏角は、各辺毎にグループを構成し、各グ
ループ毎の偏角ヒストグラムの最大輝度勾配発生頻度が
最大となる偏角は、図10の下部に示すように、直方形
の頂角90度の倍数だけ変位している。
In this embodiment, since the two-dimensional multi-valued image 10 in the upper part of FIG. 10 is a rectangular parallelepiped, a predetermined angle is set in the direction θ where the brightness gradient of the sampling point S near each side of the rectangular parallelepiped is maximum. The added declination forms a group for each side, and the declination at which the maximum luminance gradient occurrence frequency of the declination histogram for each group is maximum is as shown in the lower part of FIG. It is displaced by a multiple of 90 degrees.

【0046】図11、図12は、本実施例の図1のフロ
ーチャートのステップ#7で、ステップ#5の偏角ヒス
トグラムを所定角度分だけ変位させて累算して累算偏角
ヒストグラムを作成する方法を示す。この所定角度は、
2次元多値画像10の直線部分間の角度差である。
11 and 12 are step # 7 in the flow chart of FIG. 1 of the present embodiment, the deviation angle histogram of step # 5 is displaced by a predetermined angle and accumulated to create an accumulated deviation angle histogram. Here's how to do it. This predetermined angle is
It is the angle difference between the straight line portions of the two-dimensional multi-valued image 10.

【0047】図11は、本実施例では、図10の上部に
示すように、2次元多値画像10が直方形なので、ステ
ップ#5の偏角ヒストグラムでは、360度を直方形の
頂角90度で4等分した範囲が、直方形の各辺に対応
し、4等分した範囲内において、頻度の分布が類似す
る。従って、図11について、0度〜90度の範囲はそ
のままにし、90度〜180度の範囲は90度を加えて
0度〜90度の範囲に加算し、180度〜270度の範
囲は180度を加えて0度〜90度の範囲に加算し、2
70度〜360度の範囲は270度を加えて0度〜90
度の範囲に加算すると、図12に示すような、累算偏角
ヒストグラムができる。
In the present embodiment, as shown in the upper part of FIG. 10, in FIG. 11, since the two-dimensional multi-valued image 10 is a rectangular parallelepiped, in the deviation angle histogram of step # 5, 360 degrees is a rectangular apex angle 90. The range divided into four equal to each side corresponds to each side of the rectangular parallelepiped, and the frequency distribution is similar within the range divided into four. Therefore, in FIG. 11, the range of 0 degrees to 90 degrees is left unchanged, the range of 90 degrees to 180 degrees is added with 90 degrees, and the range of 0 degrees to 90 degrees is added, and the range of 180 degrees to 270 degrees is 180 degrees. Add degrees and add to the range of 0 degrees to 90 degrees, 2
In the range of 70 degrees to 360 degrees, 270 degrees is added and 0 degrees to 90 degrees
When added to the range of degrees, a cumulative declination histogram as shown in FIG. 12 is created.

【0048】この場合、本実施例では、360度を90
度の範囲に4等分して累算したが、360度の範囲全体
を毎回90度ずつ加算して4回累算しても、図11に示
すものと同様の累算偏角ヒストグラムが4つできるのは
いうまでも無い。
In this case, in this embodiment, 360 degrees is 90 degrees.
However, even if the entire 360-degree range is added 90 times each time and accumulated four times, a cumulative deviation angle histogram similar to that shown in FIG. Needless to say, it can be achieved.

【0049】図13は、本実施例の図1のフローチャー
トのステップ#8、#9で、ステップ#5の偏角ヒスト
グラム、又は、ステップ#7の累算偏角ヒストグラムに
おいて最大輝度勾配発生頻度が最大となる偏角を求め、
この最大となる偏角を認識対象物の傾きとする方法を示
す。
FIG. 13 shows that in steps # 8 and # 9 of the flow chart of FIG. 1 of the present embodiment, the maximum luminance gradient occurrence frequency is found in the deviation angle histogram of step # 5 or the accumulation deviation angle histogram of step # 7. Find the maximum declination,
A method of setting the maximum deflection angle as the inclination of the recognition target will be described.

【0050】図13に示すように、連続する(2j−
1)個(jは任意の自然数)の区間の頻度の和が最大に
なるような区間の重心を最大輝度勾配発生頻度が最大と
なる偏角とする。
As shown in FIG. 13, continuous (2j-
1) The barycenter of the section where the sum of the frequencies of the number of sections (j is an arbitrary natural number) is maximized is the declination angle that maximizes the frequency of occurrence of the maximum luminance gradient.

【0051】即ち、先ず、 That is, first,

【0052】i=−j+1。I = -j + 1.

【0053】次に、このtを中心値とする(2j−1)
個の区間の頻度の重心を求めると、この重心が、部品の
傾きになる。
Next, let this t be the central value (2j-1).
When the center of gravity of the frequency of each section is obtained, this center of gravity becomes the inclination of the component.

【0054】図14、図15は、本実施例が、ノズル
や、ゴミ、輝度変化等によるノイズの影響が少ないこと
を示している。
FIGS. 14 and 15 show that the present embodiment is less affected by noise due to nozzles, dust, brightness changes, and the like.

【0055】図14は、ノズルや、ゴミ、輝度変化等の
影響が無い、理想的な2次元多値画像の場合の偏角ヒス
トグラムであり、その形状は、部品の傾き角度θを中心
とした分散の小さな山型である。
FIG. 14 is a deviation angle histogram in the case of an ideal two-dimensional multi-valued image that is not affected by nozzles, dust, brightness changes, etc., and its shape is centered on the inclination angle θ of the component. It is a mountain type with small dispersion.

【0056】図15は、ノズルや、ゴミ、輝度変化等の
影響がある場合の2次元多値画像の偏角ヒストグラムで
あり、その形状は、分散が大きな山型であるが、2次元
多値画像内にノズルの画像があったり、電子部品等の認
識対象物にゴミが付着していたり、電子部品等の認識対
象物に部分的輝度変化等があったりしても、これらは何
れも部分的なものなので、これらから得られるデータ数
は、全体から得られるデータ数に比較して、非常に少な
いので、その影響は殆ど無く、山の高さが最大になる偏
角は殆ど変化しないので、正確な傾きを安定して検出で
きる。
FIG. 15 is a deviation angle histogram of a two-dimensional multi-valued image when it is affected by nozzles, dust, brightness change, etc., and its shape is a mountain shape with a large variance, but it is a two-dimensional multi-valued image. Even if there is an image of the nozzle in the image, dust is attached to the recognition target such as an electronic component, or there is a partial change in brightness on the recognition target such as an electronic component, these are all partial. Since the number of data obtained from these is very small compared to the number of data obtained from the whole, there is almost no effect and the declination angle at which the height of the mountain is maximum hardly changes. , The accurate inclination can be detected stably.

【0057】図16〜図19に基づいて、本実施例方法
を使用した、反射板2、照明3、TVカメラ5、視覚認
識装置6の組合せの2例を説明する。
Two examples of combinations of the reflector 2, the illumination 3, the TV camera 5, and the visual recognition device 6 using the method of this embodiment will be described with reference to FIGS. 16 to 19.

【0058】図16、図17は、吸着ノズル1に吸着さ
れた電子部品4の背後から照明3の光を照射して、電子
部品4の影絵をTVカメラ5が撮像する透過型の場合を
示す。透過型の場合には、2次元多値画像は、その外形
輪郭どおりの形状になり、この外形輪郭の直線部によっ
て、電子部品の傾きが検出される。視覚認識装置6は、
A/D変換回路9と、画像メモリ8と、CPU7とを有
する。
16 and 17 show a transmission type case in which the TV camera 5 captures a shadow picture of the electronic component 4 by irradiating the light of the illumination 3 from behind the electronic component 4 sucked by the suction nozzle 1. .. In the case of the transmissive type, the two-dimensional multi-valued image has a shape according to its outer contour, and the inclination of the electronic component is detected by the straight line portion of this outer contour. The visual recognition device 6 is
It has an A / D conversion circuit 9, an image memory 8 and a CPU 7.

【0059】図18、図19は、吸着ノズル1に吸着さ
れた電子部品4の下面から照明3の光を直接照射して、
電子部品4からの反射画像をTVカメラ5が撮像する反
射型の場合を示す。反射型の場合では、2次元多値画像
は、電子部品の電極以外の部分は、その輝度が、背景と
殆ど同じで認識できる画像を形成せず、電子部品の2次
元多値画像は、その外形輪郭とは無関係に、反射係数が
大きな電極部分等のとおりの形状になり、この電極形状
の直線部によって、電子部品の傾きが検出される。視覚
認識装置6は、A/D変換回路9と、画像メモリ8と、
CPU7とを有する。
18 and 19, the light of the illumination 3 is directly emitted from the lower surface of the electronic component 4 sucked by the suction nozzle 1.
A case of a reflection type in which a reflection image from the electronic component 4 is captured by the TV camera 5 is shown. In the case of the reflection type, the two-dimensional multi-valued image of the electronic component does not form a recognizable image because the brightness is almost the same as the background in portions other than the electrodes of the electronic component, and the two-dimensional multi-valued image of the electronic component is Irrespective of the outer contour, the electrode portion has a large reflection coefficient and the like, and the inclination of the electronic component can be detected by the linear portion of the electrode shape. The visual recognition device 6 includes an A / D conversion circuit 9, an image memory 8,
It has a CPU 7.

【0060】本発明の傾き検出方法によれば、透過型で
も、反射型でも、電子部品の2次元多値画像に、直線部
分がある限り、この直線部分によって、電子部品の傾き
を検出できる。特に、反射型の場合、電子部品の形状が
複雑であっても、その外形に直線部分が無くても、電極
等の反射係数が大きな部分に直線部分があれば、検出可
能である。
According to the inclination detecting method of the present invention, the inclination of the electronic component can be detected by the linear portion as long as there is a linear portion in the two-dimensional multi-valued image of the electronic component, whether the transmission type or the reflection type. In particular, in the case of the reflection type, even if the shape of the electronic component is complicated or there is no linear portion in the outer shape, it can be detected if the linear portion is present in a portion having a large reflection coefficient such as an electrode.

【0061】そして、電子部品の2次元多値画像の幾つ
かの直線部分が、90度の整数倍等の既知の角度差を有
する場合には、電子部品の2次元多値画像の他の直線部
分が如何に複雑であっても、傾きの検出を容易に行うこ
とがきる。従って、多くの品種の電子部品に対して同一
の方法で、傾きの検出を行うことができる。
If some straight line portions of the two-dimensional multi-valued image of the electronic component have a known angle difference such as an integral multiple of 90 degrees, another straight line of the two-dimensional multi-valued image of the electronic component is obtained. No matter how complicated the part is, the inclination can be easily detected. Therefore, the inclination can be detected for many types of electronic components by the same method.

【0062】本実施例の傾きの検出方法は、上記の実施
例に限らず種々の態様が可能である。例えば、次の通り
である。
The inclination detecting method of this embodiment is not limited to the above-mentioned embodiment, and various modes are possible. For example:

【0063】サンプリング点Sの輝度勾配の大きさを頻
度の重みとして偏角別の最大輝度勾配発生頻度を表す偏
角ヒストグラムを作成し、この偏角ヒストグラムにおい
て最大輝度勾配発生頻度が最大となる偏角を求め、この
最大となる偏角を認識対象物の傾きとすることが可能で
あれば、サンプリング点Sの設定方法、輝度勾配の大き
さと方向の求め方、偏角ヒストグラムの作成方法、累算
方法、偏角ヒストグラム又は累算偏角ヒストグラムにお
いて最大輝度勾配発生頻度が最大となる偏角を求め、こ
の最大となる偏角を認識対象物の傾きとする計算方法等
の設計は自由にできる。
A bias angle histogram representing the maximum brightness gradient occurrence frequency for each argument is created using the magnitude of the brightness gradient at the sampling point S as a frequency weight, and in this deviation angle histogram, the maximum brightness gradient occurrence frequency is the maximum. If the angle can be obtained and the maximum deviation angle can be used as the inclination of the recognition object, the sampling point S setting method, the brightness gradient magnitude and direction determination method, the deviation angle histogram creation method, The calculation method, the deviation angle histogram or the accumulated deviation angle histogram is used to find the deviation angle that maximizes the frequency of occurrence of the maximum brightness gradient, and the calculation method that uses this maximum deviation angle as the inclination of the recognition target can be freely designed. ..

【0064】[0064]

【発明の効果】本発明の傾き検出方法は、電子部品等の
認識対象物の2次元多値画像上の複数のサンプリング点
の輝度勾配の大きさを頻度の重みとして偏角別の最大輝
度勾配発生頻度を表す偏角ヒストグラムを作成し、この
偏角ヒストグラム又は累算偏角ヒストグラムにおいて最
大輝度勾配発生頻度が最大となる偏角を求め、この最大
となる偏角を認識対象物の傾きとすることによって、電
子部品等の認識対象物の傾きを検出しているので、ノズ
ルや、ゴミ、輝度変化等によるノイズの影響が少なくな
り、正確な傾きを検出できるので、本発明の傾き検出方
法を使用する電子部品装着装置の信頼性を向上できると
いう効果を奏する。
According to the inclination detecting method of the present invention, the maximum luminance gradient for each declination is determined by using the magnitude of the luminance gradient at a plurality of sampling points on a two-dimensional multi-valued image of a recognition object such as an electronic component as a frequency weight. A declination histogram that represents the frequency of occurrence is created, and the declination that maximizes the frequency of occurrence of the maximum luminance gradient in this declination histogram or cumulative declination histogram is obtained, and this maximum declination is used as the inclination of the recognition target. Since the tilt of the recognition target such as the electronic component is detected, the influence of noise due to the nozzle, dust, brightness change, etc. is reduced, and the accurate tilt can be detected. It is possible to improve the reliability of the electronic component mounting device used.

【0065】又、本発明の傾き検出方法は、本発明の傾
き検出方法を使用する電子部品装着装置が、透過型の部
品認識であっても、反射型の部品認識であっても適用で
きると共に、多くの品種の電子部品に対して同一の計算
処理方法の設定で、傾きの検出を行うことができるの
で、傾き検出作業が簡単で容易になり、本発明の傾き検
出方法を使用する電子部品装着装置の作業能率を向上で
きるという効果を奏する。
Further, the tilt detecting method of the present invention can be applied regardless of whether the electronic component mounting apparatus using the tilt detecting method of the present invention is a transmissive type component recognition or a reflective type component recognition. Since the inclination can be detected by setting the same calculation processing method for many kinds of electronic components, the inclination detection work is simple and easy, and the electronic components using the inclination detection method of the present invention This has the effect of improving the work efficiency of the mounting device.

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

【図1】本発明の傾き検出方法の一実施例方法のフロー
チャートである。
FIG. 1 is a flowchart of a method of an embodiment of a tilt detecting method according to the present invention.

【図2】図1の2次元多値画像の1例である。FIG. 2 is an example of the two-dimensional multi-valued image of FIG.

【図3】図1の2次元多値画像の1例である。FIG. 3 is an example of the two-dimensional multi-valued image of FIG.

【図4】図1の2次元多値画像の1例である。4 is an example of the two-dimensional multi-valued image of FIG.

【図5】図1の2次元多値画像の1例である。5 is an example of the two-dimensional multi-valued image of FIG.

【図6】図1の2次元多値画像とサンプリング点分布図
の1例である。
6 is an example of a two-dimensional multi-valued image and sampling point distribution chart of FIG. 1. FIG.

【図7】図1の2次元多値画像とサンプリング点分布図
の1例である。
7 is an example of the two-dimensional multi-valued image and the sampling point distribution diagram of FIG. 1. FIG.

【図8】図1のサンプリング点の輝度勾配の計算図であ
る。
8 is a calculation diagram of a brightness gradient at the sampling point in FIG.

【図9】図1のサンプリング点の輝度勾配の計算図であ
る。
9 is a calculation diagram of a brightness gradient at the sampling point in FIG.

【図10】図1のサンプリング点とその輝度勾配の分布
図とその偏角ヒストグラムである。
FIG. 10 is a distribution diagram of the sampling points of FIG. 1 and their luminance gradients, and a deviation angle histogram thereof.

【図11】図1の偏角ヒストグラムである。11 is a deflection angle histogram of FIG.

【図12】図1の累算偏角ヒストグラムである。FIG. 12 is a cumulative declination histogram of FIG.

【図13】図1の最大頻度計算方法を示す偏角ヒストグ
ラムである。
13 is an argument histogram showing the maximum frequency calculation method of FIG. 1. FIG.

【図14】図1のノイズが無い偏角ヒストグラムであ
る。
FIG. 14 is a noise-free argument histogram of FIG.

【図15】図1のノイズがある偏角ヒストグラムであ
る。
15 is a declination histogram with noise of FIG.

【図16】図1の反射型の構成図である。16 is a configuration diagram of the reflection type of FIG.

【図17】図16の2次元多値画像である。17 is a two-dimensional multi-valued image of FIG.

【図18】図1の透過型の構成図である。FIG. 18 is a configuration diagram of the transmission type of FIG. 1.

【図19】図18の2次元多値画像である。19 is a two-dimensional multi-valued image of FIG.

【図20】従来例方法の構成図である。FIG. 20 is a configuration diagram of a conventional example method.

【図21】従来例方法の構成図である。FIG. 21 is a configuration diagram of a conventional method.

【図22】従来例方法の構成図である。FIG. 22 is a configuration diagram of a conventional method.

【図23】従来例方法の構成図である。FIG. 23 is a configuration diagram of a conventional method.

【図24】従来例方法の構成図である。FIG. 24 is a configuration diagram of a conventional method.

【図25】従来例方法の構成図である。FIG. 25 is a configuration diagram of a conventional method.

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

S サンプリング点 θ 輝度勾配最大方向 1 吸着ノズル 2 反射板 3 照明 4 電子部品 5 TVカメラ 6 視覚認識装置 7 CPU 8 画像メモリ 9 A/D変換回路 10 2次元多値画像 S Sampling point θ Brightness gradient maximum direction 1 Adsorption nozzle 2 Reflector 3 Lighting 4 Electronic component 5 TV camera 6 Visual recognition device 7 CPU 8 Image memory 9 A / D conversion circuit 10 Two-dimensional multi-valued image

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 認識対象物の濃淡画像を2次元多値画像
としてメモリに格納する第1工程と、前記2次元多値画
像上に複数のサンプリング点を設定する第2工程と、前
記第2工程で設定された各サンプリング点において、2
次元多値画像上の全ての方向の中で、輝度勾配が最大と
なる方向に所定の角度を加えた偏角と輝度勾配の大きさ
とを求める第3工程と、前記第3工程の処理結果から、
前記輝度勾配の大きさを頻度の重みとして偏角別の最大
輝度勾配発生頻度を表す偏角ヒストグラムを作成する第
4工程と、前記第4工程の偏角ヒストグラムにおいて最
大輝度勾配発生頻度が最大となる偏角を求め、この最大
となる偏角を認識対象物の傾きとする第5工程とを有す
ることを特徴とする傾き検出方法。
1. A first step of storing a grayscale image of a recognition object as a two-dimensional multivalued image in a memory, a second step of setting a plurality of sampling points on the two-dimensional multivalued image, and a second step of the second step. 2 at each sampling point set in the process
From all the directions on the three-dimensional multi-valued image, the third step of obtaining the magnitude of the brightness gradient and the deviation angle obtained by adding a predetermined angle to the direction in which the brightness gradient is maximum, and from the processing result of the third step ,
A fourth step of creating a declination histogram representing the maximum frequency of occurrence of the luminance gradient for each declination using the magnitude of the luminance gradient as a frequency weight, and the maximum frequency of occurrence of the maximum luminance gradient is the maximum in the declination histogram of the fourth step. And a fifth step in which the maximum deviation angle is determined as the inclination of the recognition target object.
【請求項2】 認識対象物の濃淡画像を2次元多値画像
としてメモリに格納する第1工程と、前記2次元多値画
像上に複数のサンプリング点を設定する第2工程と、前
記第2工程で設定された各サンプリング点において、2
次元多値画像上の全ての方向の中で、輝度勾配が最大と
なる方向に所定の角度を加えた偏角と輝度勾配の大きさ
とを求める第3工程と、前記第3工程の処理結果から、
前記輝度勾配の大きさを頻度の重みとして偏角別の最大
輝度勾配発生頻度を表す偏角ヒストグラムを作成する第
4工程と、前記第4工程の偏角ヒストグラムを所定角度
分だけ変位させて累算して累算偏角ヒストグラムを作成
する第5工程と、前記第5工程の累算偏角ヒストグラム
において最大輝度勾配発生頻度が最大となる偏角を求
め、この最大となる偏角を認識対象物の傾きとする第6
工程とを有することを特徴とする傾き検出方法。
2. A first step of storing a grayscale image of a recognition object as a two-dimensional multivalued image in a memory, a second step of setting a plurality of sampling points on the two-dimensional multivalued image, and a second step of the second step. 2 at each sampling point set in the process
From all the directions on the three-dimensional multi-valued image, the third step of obtaining the magnitude of the brightness gradient and the deviation angle obtained by adding a predetermined angle to the direction in which the brightness gradient is maximum, and from the processing result of the third step ,
A fourth step of creating a deviation angle histogram representing the maximum occurrence frequency of the brightness gradient for each deviation angle using the magnitude of the brightness gradient as a frequency weight, and the deviation histogram of the fourth step is displaced by a predetermined angle and accumulated. The fifth step of calculating the cumulative declination histogram and the declination that maximizes the maximum luminance gradient occurrence frequency in the cumulative declination histogram of the fifth step are obtained, and the maximum declination is recognized. Sixth to be the inclination of the object
An inclination detecting method, comprising:
【請求項3】 第5工程の所定角度は、90度の整数倍
である請求項2に記載の傾き検出方法。
3. The tilt detecting method according to claim 2, wherein the predetermined angle in the fifth step is an integral multiple of 90 degrees.
JP4094520A 1992-04-14 1992-04-14 Tilt detection method Expired - Lifetime JP2766118B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4094520A JP2766118B2 (en) 1992-04-14 1992-04-14 Tilt detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4094520A JP2766118B2 (en) 1992-04-14 1992-04-14 Tilt detection method

Publications (2)

Publication Number Publication Date
JPH05288534A true JPH05288534A (en) 1993-11-02
JP2766118B2 JP2766118B2 (en) 1998-06-18

Family

ID=14112611

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4094520A Expired - Lifetime JP2766118B2 (en) 1992-04-14 1992-04-14 Tilt detection method

Country Status (1)

Country Link
JP (1) JP2766118B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1320072A2 (en) * 2001-11-30 2003-06-18 Hitachi Ltd. Lane marker recognition method
JP2013070129A (en) * 2011-09-21 2013-04-18 Panasonic Corp Image information extraction apparatus, image transmission apparatus using the same, image receiving apparatus, and image transmission system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5355292B2 (en) 2009-08-10 2013-11-27 キヤノン株式会社 Image processing apparatus and image processing method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1320072A2 (en) * 2001-11-30 2003-06-18 Hitachi Ltd. Lane marker recognition method
EP1320072A3 (en) * 2001-11-30 2007-03-28 Hitachi Ltd. Lane marker recognition method
US7362883B2 (en) 2001-11-30 2008-04-22 Hitachi, Ltd. Lane marker recognition method
JP2013070129A (en) * 2011-09-21 2013-04-18 Panasonic Corp Image information extraction apparatus, image transmission apparatus using the same, image receiving apparatus, and image transmission system

Also Published As

Publication number Publication date
JP2766118B2 (en) 1998-06-18

Similar Documents

Publication Publication Date Title
US5943441A (en) Edge contour tracking from a first edge point
JP2773818B2 (en) Automatic image recognition apparatus and method
CN111968144B (en) Image edge point acquisition method and device
US7780084B2 (en) 2-D barcode recognition
US5081689A (en) Apparatus and method for extracting edges and lines
US5086478A (en) Finding fiducials on printed circuit boards to sub pixel accuracy
JPH11110561A (en) Image information processor
WO2012175731A1 (en) Depth measurement quality enhancement
CN104954663B (en) Image processing apparatus and image processing method
EP1730694A1 (en) Detecting hanging wires in color digital images
JP3659426B2 (en) Edge detection method and edge detection apparatus
JP2007151082A (en) Processing method, apparatus, program and computer- readable recording medium about estimation of grid orientation, magnification, parallel displacement and modulation
JPH05288534A (en) Inclination detecting method
JP2000182066A (en) Picture processor
JPH06168331A (en) Patter matching method
JPH05120428A (en) Motion parameter extraction system
JP2000097677A (en) Image recognizing method
CN116309760B (en) Cereal image alignment method and cereal detection equipment
JPH1040393A (en) Method for recognizing image and device for recognizing image using the method and device for mounting electronic part
CN110264508B (en) Vanishing point estimation method based on convex quadrilateral principle
JPH06241751A (en) Edge detecting method
JP2517570B2 (en) Pattern detection method
JPH05312543A (en) Pattern matching method
JPH03121573A (en) Parts inclination detecting method
JP3418497B2 (en) Component recognition method