JPH0758173B2 - Part shape recognition method and part quality judgment method - Google Patents
Part shape recognition method and part quality judgment methodInfo
- Publication number
- JPH0758173B2 JPH0758173B2 JP1339144A JP33914489A JPH0758173B2 JP H0758173 B2 JPH0758173 B2 JP H0758173B2 JP 1339144 A JP1339144 A JP 1339144A JP 33914489 A JP33914489 A JP 33914489A JP H0758173 B2 JPH0758173 B2 JP H0758173B2
- Authority
- JP
- Japan
- Prior art keywords
- silhouette
- component
- reference position
- ccd camera
- distance
- 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
Links
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、所定位置に供給された部品のシルエットをCC
Dカメラにより認識してそのシルエットの形状を基準位
置からのXY座標上のY方向の距離として検出するように
構成した部品の形状認識方法および部品の良否判別方法
に関する。DETAILED DESCRIPTION OF THE INVENTION [Industrial field of application] The present invention provides a CC for silhouettes of parts supplied at predetermined positions.
The present invention relates to a part shape recognition method and a part quality determination method configured to be recognized by a D camera and to detect the shape of the silhouette as a distance in the Y direction on the XY coordinates from a reference position.
〔従来の技術〕および〔発明が解決しようとする課題〕 最近、CCDカメラを使用して部品の形状を認識し、部品
の不良検出を厳格に行うようにした部品の良否判別装置
が各種開発されている。この種の良否判別装置では、部
品を認識する場合、部品のシルエットをCCDカメラの画
像上に作り、CCDカメラの画像を構成する画素によりそ
のシルエットを二値化データとして検出しているが、こ
の部品が良品であるか否かは前期画素の二値化データの
変化によりシルエットの外周の長さおよびシルエットの
面積を検出してこれらを基準となる部品のものと比較す
ることにより判別されている。そのため、部品の形状を
認識するに際して、シルエットの外周および面積を検出
しなければならず、これに長時間を要すばかりか、部品
が隣接のものと接触して流れる場合には部品1個のシル
エットの外周および面積が検出できないため、部品の良
否判別が行えず、部品が隣接のものと接触しないように
部品供給速度を調整しなければならず、高速で連続して
流れる部品の良否判別には適さない等の欠点が生じてい
る。[Prior Art] and [Problems to be Solved by the Invention] Recently, various good / bad determination devices for a component have been developed, which use a CCD camera to recognize the shape of the component and strictly detect the defect of the component. ing. In this type of quality determination device, when recognizing a part, the silhouette of the part is created on the image of the CCD camera, and the silhouette is detected as binarized data by the pixels forming the image of the CCD camera. Whether or not the part is non-defective is determined by detecting the length of the outer circumference of the silhouette and the area of the silhouette by the change of the binarized data of the pixel in the previous period and comparing these with those of the reference part. . Therefore, when recognizing the shape of a part, it is necessary to detect the outer circumference and the area of the silhouette, which not only takes a long time, but also when the part flows in contact with an adjacent part, Since the outer circumference and area of the silhouette cannot be detected, the quality of the parts cannot be determined, and the component supply speed must be adjusted so that the parts do not come into contact with adjacent objects. There are drawbacks such as not being suitable.
本発明は、上記欠点の除去を目的とするもので、CCDカ
メラにより認識される部品のシルエットの形状をXY座標
上のY方向の距離として検出し、部品の形状を短時間で
認識するとともに、高速で連続して供給される部品の良
否判別を短時間で正確に行うことを可能にした部品の形
状認識方法および部品の良否判別方法を提供しようとす
るものである。The present invention is intended to eliminate the above-mentioned drawbacks, and detects the shape of the silhouette of the component recognized by the CCD camera as the distance in the Y direction on the XY coordinates, and recognizes the shape of the component in a short time. An object of the present invention is to provide a method for recognizing the shape of a component and a method for determining the quality of a component, which are capable of accurately determining the quality of a component that is continuously supplied at high speed in a short time.
上記課題を解決するため、円形部を持つ所望部品を挟む
位置にCCDカメラとこれに光線を照射する光源とを配置
し、部品の円形状のシルエットをCCDカメラの画像を構
成する画素ごとに二値化データに変換してその二値化デ
ータを画素に対応する画像メモリ内のアドレスに記憶す
る一方、 XY座標上の基準位置を記憶し、この基準位置から、XY座
標上のY方向のシルエットの縁部までの距離を検出して
部品の形状を認識する部品の形状認識方法において、 部品の供給方向をXY座標上のX方向として、部品のシル
エットの中心を算出する一方、 シルエットの中心から基準となる部品のシルエットの半
径だけ離れた位置にX方向と平行に延びる直線上の各位
置を順次基準位置として呼出し、この各基準位置からシ
ルエットの輪郭までのY方向の距離をシルエットの輪郭
として認識するように構成している。In order to solve the above problems, a CCD camera and a light source for irradiating light rays are arranged at positions sandwiching a desired part having a circular portion, and a circular silhouette of the part is provided for each pixel forming an image of the CCD camera. While converting to binarized data and storing the binarized data at the address in the image memory corresponding to the pixel, it also stores the reference position on the XY coordinates, and from this reference position, the silhouette in the Y direction on the XY coordinates. In the part shape recognition method that recognizes the shape of the part by detecting the distance to the edge of the part, the center of the silhouette of the part is calculated from the center of the silhouette while the part supply direction is the X direction on the XY coordinate. Each position on a straight line extending parallel to the X direction at a position separated by the radius of the silhouette of the reference part is sequentially called as a reference position, and the distance in the Y direction from each of these reference positions to the silhouette contour is called as a reference position. It is configured to recognize a jet contour.
また、各基準位置からシルエットの輪郭までのY方向の
距離をシルエットの輪郭として検出する度に、基準とな
る部品のシルエット上の対応するシルエット縁部までの
Y方向の距離を呼出してこれらを比較判別し、各基準位
置からのY方向の距離が連続して不良と判定されると
き、部品の不良と判定するように構成してもよい。Whenever the distance in the Y direction from each reference position to the silhouette contour is detected as the silhouette contour, the distance in the Y direction to the corresponding silhouette edge on the silhouette of the reference component is called and compared. It may be configured to determine that the component is defective when the distances in the Y direction from the respective reference positions are continuously determined to be defective.
この方法によれば、所望部品がCCDカメラの前方に位置
すると、光源から照射される光線を受けて部品のシルエ
ットがCCDカメラの画像を構成する画素ごとに二値化デ
ータに変換され、この二値化データが画像メモリ内のア
ドレスに記憶される。これら二値化データから部品の形
状を検出する際には、部品の供給方向をXY座標上のX方
向として円形状のシルエットの中心が算出される。さら
に、この中心から基準となる部品のシルエットの半径だ
け離れた位置にX方向に延びる直線上の各位置を基準位
置として順次呼出して、各基準位置からシルエット縁部
までのY方向の距離が算出され、シルエットの輪郭とし
て記憶される。そのため、部品が隣接する部品と接触し
てCCDカメラの前方を通過しても、各部品のシルエット
の外周をその接触部を除いて大部分検出でき、どのよう
な条件で部品が通過しても所定の形状の認識およびその
良否判定を確実に行うことができる。According to this method, when the desired component is located in front of the CCD camera, the silhouette of the component is converted into binarized data for each pixel forming the image of the CCD camera by receiving the light beam emitted from the light source. The binarized data is stored at an address in the image memory. When detecting the shape of the component from these binarized data, the center of the circular silhouette is calculated with the supply direction of the component as the X direction on the XY coordinates. Further, each position on a straight line extending in the X direction is sequentially called as a reference position at a position away from the center by the radius of the silhouette of the reference component, and the distance in the Y direction from each reference position to the silhouette edge is calculated. And stored as the silhouette outline. Therefore, even if a part comes into contact with an adjacent part and passes in front of the CCD camera, most of the outer periphery of the silhouette of each part can be detected except for the contact part, and no matter what condition the part passes through. It is possible to surely recognize a predetermined shape and determine whether the shape is good or bad.
また、部品の良否判別を行う際には、基準位置からシル
エットの縁部までのXY座標上のY方向の距離を基準位置
のX座標からX方向に向かって順に検出する一方、基準
となる部品のシルエット上のY方向の距離を基準位置の
X座標の位置からX方向に順に呼出すだけでよく、部品
の通過位置の偏りを考慮せずに、部品の形状の良否判別
を行うことができる。この場合、前記差が所定誤差内に
ないと、直ちに部品が不良と判断され、不良表示がなさ
れる。また、前記不良検出が連続して行われる場合にの
み、部品の不良検出と判別してもよく、切り粉、塵埃等
の影響を排除して誤判定なく部品の良否判定が可能とな
る。When determining the quality of a component, the distance in the Y direction on the XY coordinates from the reference position to the edge of the silhouette is sequentially detected from the X coordinate of the reference position in the X direction, while the reference component is detected. It is only necessary to call the distance in the Y direction on the silhouette in the X direction from the position of the X coordinate of the reference position in order, and it is possible to determine whether the shape of the component is good or bad without considering the deviation of the passing position of the component. In this case, if the difference is not within the predetermined error, it is immediately determined that the component is defective, and the defect is displayed. Further, it is possible to determine that the defect detection of the component is performed only when the defect detection is continuously performed, and it becomes possible to determine the quality of the component without erroneous determination by eliminating the influence of cutting chips, dust and the like.
以下、実施例を図面に基づいて説明する。第1図におい
て、1は所望部品2の形状の良否を判別する良否判別装
置であり、取付プレート3に案内されて部品を水平に連
続して供給する透明な材料でなる搬送ベルト4、搬送ベ
ルト4の下方から前記取付プレート3の空隙を通って上
方に光線を照射する光源の一例をなすストロボ5および
搬送ベルト4の上方で受光面を下方にしてストロボ5か
らの光線を受けるように配置されたCCDカメラ6からな
っている。前記CCDカメラ6の画像は縦横に整列配置さ
れた多数個の画素で構成され、それぞれの画素がストロ
ボ5からの光線を受光すると、アナログ画像信号を出力
するように構成されている。Embodiments will be described below with reference to the drawings. In FIG. 1, reference numeral 1 denotes a pass / fail determination device for determining the pass / fail of the shape of the desired component 2. The transfer belt 4 and the transfer belt are made of a transparent material, which is guided by the mounting plate 3 and continuously supplies the components horizontally. 4, which is an example of a light source that emits light rays upward from below 4 through the gap of the mounting plate 3, and above the conveyor belt 4 is arranged so that the light receiving surface is below and the light rays from the strobe 5 are received. It consists of a CCD camera 6. The image of the CCD camera 6 is composed of a large number of pixels arranged vertically and horizontally, and when each pixel receives a light beam from the strobe 5, it is configured to output an analog image signal.
また、7は部品2の良否判別装置1の制御装置であり、
マイクロプロセッサでなる制御部8を有している。この
制御部8にはインタフェースバス9を介して基準となる
部品2の基準半径および基準となる部品2に関して後記
する直線上の各基準位置から縁部までのXY座標上のY方
向の距離でなる基準値1xを含む各種情報を記憶する記憶
部10、所定位置に部品2があるか否かを検出して部品検
出信号を出力する部品検出部11、ストロボ駆動指令信号
を受けてストロボ5から光を照射させるストロボ駆動部
12、CCDカメラインタフェース13並びに画像メモリをな
すフレームRAM14が接続されている。Further, 7 is a control device of the quality determination device 1 for the component 2,
It has a control unit 8 which is a microprocessor. The control unit 8 includes the reference radius of the reference component 2 via the interface bus 9 and the distance in the Y direction on the XY coordinates from each reference position on a straight line described below with respect to the reference component 2 to the edge. A storage unit 10 that stores various information including a reference value 1x, a component detection unit 11 that detects whether or not there is a component 2 at a predetermined position and outputs a component detection signal, and a strobe drive command signal Strobe drive unit to irradiate
12, a CCD camera interface 13 and a frame RAM 14 forming an image memory are connected.
前記CCDカメラインタフェース13は、前記画像上の画素
に対応するアナログ画像信号をA/D変換するA/D変換部13
a、A/D変換タイミングを指令するタイミングパルス発生
部13b、A/D変換部13aから出力されるデイジタル画像信
号を二値化する信号二値化部13cおよびタイミングパル
スが発生されるごとに順にアドレスを発生するアドレス
発生部13dでなっており、タイミングパルスが発生され
るごとに信号二値化部13cの二値化データがフレームRAM
14内の前記アドレスに出力され、記憶されるように構成
されている。また、前記フレームRAM14は各画素に対応
したアドレスを有しており、各画素の持つ二値化データ
をそれぞれ対応するアドレスに記憶するとともに、各ア
ドレスに対応するXY座標上の座標データが、またXY座標
上の座標データに対応するアドレスが相互に得られるよ
うに構成されている。The CCD camera interface 13 is an A / D converter 13 for A / D converting an analog image signal corresponding to a pixel on the image.
a, a timing pulse generation unit 13b for instructing A / D conversion timing, a signal binarization unit 13c for binarizing the digital image signal output from the A / D conversion unit 13a, and a timing pulse in order every time the pulse is generated. An address generator 13d that generates an address is provided, and the binarized data of the signal binarizer 13c is a frame RAM every time a timing pulse is generated.
It is configured to be output to and stored in the address within 14. The frame RAM 14 has an address corresponding to each pixel, stores the binarized data of each pixel at the corresponding address, and the coordinate data on the XY coordinates corresponding to each address is also stored. The addresses corresponding to the coordinate data on the XY coordinates are mutually obtained.
前記制御部8は、第2図a,b,cに示すように、 1)部品検出部11からの部品検出信号を待つ。The controller 8 waits for a component detection signal from the component detector 11 as shown in FIGS.
2)ストロボ駆動指令信号を出力するとともにCCDカメ
ラインタフェース13に駆動指令信号を出力してタイミン
グパルス発生部13bを駆動し、タイミングパルスをA/D変
換部13a、信号二値化部13cおよびアドレス発生部13dに
それぞれ出力し、部品2のシルエットをCCDカメラ6の
画面を構成する各画素の二値化データに変換してこれを
各画素に対応するフレームRAM14内のアドレスに記憶す
る。(シルエットを「1」、シルエット以外を「0」と
して記憶) 3)部品が供給される方向をXY座標上のX方向として、
対象となるシルエットの直交する2方向の縁部を検出
し、縁部となる画素に対応するフレームRAM14内のアド
レスからシルエットの中心C0のXY座標上の座標データを
算出する。2) The strobe drive command signal is output and the drive command signal is output to the CCD camera interface 13 to drive the timing pulse generation unit 13b, and the timing pulse is A / D conversion unit 13a, signal binarization unit 13c and address generation. The data is output to the section 13d, the silhouette of the component 2 is converted into binarized data of each pixel forming the screen of the CCD camera 6, and this is stored in an address in the frame RAM 14 corresponding to each pixel. (Silhouette is stored as "1" and other than silhouette is stored as "0") 3) Let the direction in which parts are supplied be the X direction on the XY coordinates,
The edges of the target silhouette in two orthogonal directions are detected, and the coordinate data on the XY coordinates of the center C0 of the silhouette is calculated from the addresses in the frame RAM 14 corresponding to the pixels serving as the edges.
4)算出された中心のC0のY方向の座標データにあらか
じめ記憶された基準半径を加算し、シルエットの中心C0
から基準半径離れた位置でX方向に延びる直線上の最初
の基準位置Y0の座標データを算出し、これを記憶する。4) Add the reference radius stored in advance to the Y coordinate data of the calculated center C0, and calculate the silhouette center C0.
The coordinate data of the first reference position Y0 on the straight line extending in the X direction at a position away from the reference radius by is calculated and stored.
5)基準位置(X0,Y0)を二値化データ呼出し用の座標
データにセットする。5) Set the reference position (X0, Y0) to the coordinate data for calling the binarized data.
6)座標データに対応するフレームRAM14内のアドレス
の二値化データが呼出され、これが「1」である時、1
7)にジャンプする。6) When the binarized data of the address in the frame RAM 14 corresponding to the coordinate data is called and this is "1", 1
Jump to 7).
(以上、1)〜6)をステップIとする。) 7)Y方向の座標データから(−1)減算する。The above (1) to 6) are referred to as step I. ) 7) Subtract (−1) from the coordinate data in the Y direction.
8)Y方向の座標データがシルエット中心C0のY方向の
座標データと等しいかを判断し、両者が等しい時、20)
にジャンプする。8) It is judged whether the coordinate data in the Y direction is equal to the coordinate data in the Y direction of the silhouette center C0, and when both are the same, 20)
Jump to.
9)座標データに対応するアドレスの二値化データを呼
出し、これが「1」か、「0」かを判別し、「1」でな
い時、7)に戻る。9) Call the binarized data of the address corresponding to the coordinate data, determine whether this is "1" or "0", and if not "1", return to 7).
10)シルエットの縁部の座標として前記座標データを記
憶するとともに、基準位置から縁部までのY方向の距離
aを算出する。10) The coordinate data is stored as the coordinates of the edge of the silhouette, and the distance a in the Y direction from the reference position to the edge is calculated.
11)基準となる部品のX方向の座標データに対応するY
方向の距離でなる基準値1xを呼出してこれと前記距離a
とを比較し、その差が所定誤差e内である時、15)にジ
ャンプする。11) Y corresponding to the coordinate data of the reference part in the X direction
Call the reference value 1x consisting of the distance in the direction and this and the distance a
And are compared, and when the difference is within a predetermined error e, jump to 15).
12)前記距離aと基準値1xとの差が所定値M(Mは前記
誤差eよりも充分大きな値)より小さいかを判別し、こ
れが小さくない時、20)にジャンプする。12) It is determined whether the difference between the distance a and the reference value 1x is smaller than a predetermined value M (M is a value sufficiently larger than the error e), and if it is not small, the process jumps to 20).
13)不良検出カウンタをインクリメントし、カウント値
がNかを判別し、N(Nは2より大きな整数)でない
時、16)にジャンプする。13) The defect detection counter is incremented, it is determined whether the count value is N, and when it is not N (N is an integer greater than 2), the process jumps to 16).
14)部品不良表示指令信号を出力するとともに、部品排
除指令信号を出力し、1)に戻る。14) The component defect display command signal is output, and at the same time, the component rejection command signal is output and the process returns to 1).
15)不良検出カウンタをリセットする。15) Reset the defect detection counter.
16)X方向の座標データに(+1)加算し、X方向に延
びる直線上の次の基準位置呼出して、その座標データに
対応するアドレスの二値化データを呼出し、6)に戻
る。16) Add (+1) to the coordinate data in the X direction, call the next reference position on the straight line extending in the X direction, call the binarized data of the address corresponding to the coordinate data, and return to 6).
(以上、7)〜16)をステップIIとする。) 17)Y方向の座標データに(+1)加算する。The above (7) to 16) is referred to as Step II. ) 17) Add (+1) to the coordinate data in the Y direction.
18)座標データに対応する二値化データを呼出し、その
値が「1」か、「0」かを判別し、「1」の時、17)に
戻る。18) Call the binarized data corresponding to the coordinate data, determine whether the value is "1" or "0", and when it is "1", return to 17).
19)シルエットの縁部の座標として前記座標データを記
憶するとともに、基準位置から縁部までのY方向の距離
aを算出し、11)に戻る。19) The coordinate data is stored as the coordinates of the edge of the silhouette, the distance a in the Y direction from the reference position to the edge is calculated, and the process returns to 11).
(以上、17)〜19)をステップIIIとする。) 20)前記ステップI、II、IIIを繰返す。(ただし、ス
テップIIの8)中「20)にジャンプする。」を「21)に
ジャンプする。」、12)中「20)にジャンプする。」を
「21)にジャンプする。」、 16)中の「X方向の座標データに(+1)加算し、」を
「X方向の座標データに(−1)減算し、」と読替え
る。) (以上、20)をステップIVとする。) 21)Y方向の−側の基準位置の座標データを−Y0とし
て、前記ステップI、II、III、IVを繰返す。(ただ
し、ステップIIの7)中「Y方向の座標データから(−
1)減算する。」を「Y方向の座標データから(+1)
加算する。」、17)中の「Y方向の座標データに(+
1)加算する。」を「Y方向の座標データから(−1)
減算する。」、ステップIVの7)中「Y方向の座標デー
タから(−1)減算する。」を「Y方向の座標データか
ら(+1)加算する。」、8)中の「20)にジャンプす
る。」を「1)に戻る。」、12)中の「20)にジャンプ
する。」を「1)に戻る。」、17)中の「Y方向の座標
データに(+1)加算する。」を「Y方向の座標データ
から(−1)減算する。」と読替える。) ように構成されている。The above (17) to 19) are referred to as Step III. ) 20) Repeat steps I, II and III. (However, in step II 8), “Jump to 20)” is jumped to “21).”, 12) “Jump to 20)” is jumped to “21).”, 16) In the above description, "(+1) is added to the coordinate data in the X direction" is read as "(-1) is subtracted from the coordinate data in the X direction." ) (20 above) is referred to as Step IV. 21) With the coordinate data of the reference position on the − side in the Y direction as −Y0, the above steps I, II, III and IV are repeated. (However, in step II, step 7) "From the coordinate data in the Y direction (-
1) Subtract. From the coordinate data in the Y direction (+1)
to add. , 17) in the coordinate data in the Y direction (+
1) Add. From the Y coordinate data (-1)
Subtract. In step 7) of step IV, "(-1) is subtracted from the coordinate data in the Y direction." Is added to the coordinate data in the Y direction (+1). "Return to 1).", Jump to 20) in 12). Return to "1.", 17) "Add (+1) to the coordinate data in the Y direction." Read as "(-1) is subtracted from the coordinate data in the Y direction." ) Is configured as follows.
上記部品の良否判別装置1では、CCDカメラ6の下方の
所定の位置に部品2が達すると部品検出部11から部品検
出信号が出力され、制御部8からストロボ駆動指令信号
が出力される。そのため、ストロボ駆動部12が作動し、
ストロボ5からCCDカメラ6に向けて光が照射され、部
品2の円形状のシルエットがCCDカメラ6の画像を構成
する画素の持つアナログ画像信号として認識される。同
時に、制御部8からCCDカメラインタフェース13に駆動
指令信号が出力され、タイミングパルス発生部13bから
タイミングパルスが発信される。このタイミングパルス
ごとに前記アナログ画像信号が順次A/D変換部13aを介し
てディジタル画像信号に変換され、これが信号二値化部
13cでシルエットを「1」信号として、またそれ以外を
「0」信号とした二値化データに変換される。同時に、
前記画素に対応するアドレスがアドレス発生部13dで算
出され、前記二値化データが順次フレームRAM14のアド
レスに出力され、記憶される。In the component quality determination device 1, when the component 2 reaches a predetermined position below the CCD camera 6, the component detection unit 11 outputs a component detection signal and the control unit 8 outputs a strobe drive command signal. Therefore, the strobe drive unit 12 operates,
Light is emitted from the strobe 5 toward the CCD camera 6, and the circular silhouette of the component 2 is recognized as an analog image signal of a pixel forming an image of the CCD camera 6. At the same time, a drive command signal is output from the controller 8 to the CCD camera interface 13, and a timing pulse is emitted from the timing pulse generator 13b. The analog image signal is sequentially converted into a digital image signal through the A / D conversion unit 13a for each timing pulse, and this is converted into a signal binarization unit.
At 13c, the silhouette is converted into binary data with the "1" signal and the other signals with the "0" signal. at the same time,
The address corresponding to the pixel is calculated by the address generator 13d, and the binarized data is sequentially output to the address of the frame RAM 14 and stored.
前記CCDカメラ6の画像を構成する画素の持つ二値化デ
ータすべてがフレームRAM14内に記憶されると、第3図
に示すようにただちに部品の供給される方向をXY座標上
のX方向としてシルエットの直交する2方向の縁部の中
点が算出され、シルエットの中心C0の座標データが算出
される。When all the binarized data possessed by the pixels forming the image of the CCD camera 6 are stored in the frame RAM 14, the direction in which the parts are immediately supplied is set to the X direction on the XY coordinates as shown in FIG. Is calculated, and the coordinate data of the center C0 of the silhouette is calculated.
さらに、シルエットの中心C0の座標データとあらかじめ
記憶部10に記憶された基準半径とから、前記中心C0を通
り、これから基準半径離れた位置でX方向に延びる直線
上の最初の基準位置Y0の座標データが算出され、これが
記憶部10で記憶される。Further, from the coordinate data of the center C0 of the silhouette and the reference radius stored in the storage unit 10 in advance, the coordinates of the first reference position Y0 on a straight line passing through the center C0 and extending in the X direction at a position away from the center C0 by the reference radius. Data is calculated and stored in the storage unit 10.
前記基準位置(X0,Y0)が二値化データ呼出し用の座標
データにセットされ、この座標データに対応するフレー
ムRAM14内のアドレスの二値化データが呼出され、これ
が「1」でシルエットか、「0」でシルエット以外かが
判別される。この二値化データが「0」で、基準位置上
にシルエットがない場合には、基準位置のY方向の座標
データから(−1)減算し、この座標データに対応する
フレームRAM14内のアドレスの二値化データが呼出され
て前記判別が繰返される。前記二値化データが「1」に
変化して、シルエットの縁部が検出されると、この時の
Y方向の座標データと基準位置のY方向の座標データと
から基準位置とシルエットの縁部との間のY方向の距離
aが算出される。この距離aが前記基準半径からX方向
の位置にある座標データごとに算出されて記憶部10で記
憶された基準値1xと比較され、その差が所定誤差e内の
値であるか否かにより、部品2の良否判別が行われる。
前記判別の結果、部品2の形状が良と判別されると、前
記座標データのX方向の座標データが呼出されて、これ
に(+1)加算され、X方向に延びる直線上の次の基準
位置が呼出される。この基準位置の座標データに対応し
たフレームRAM14内のアドレスの二値化データが呼出さ
れ、前回同様に良否判別が行われ、これが繰返される。
そのため、部品が隣接する部品と接触してCCDカメラの
前方を通過しても、各部品のシルエットの外周をその接
触部を除いて大部分検出でき、どのような条件で部品が
通過しても所定の形状の認識およびその良否判定を確実
に行うことができる。The reference position (X0, Y0) is set in the coordinate data for calling the binarized data, and the binarized data of the address in the frame RAM 14 corresponding to this coordinate data is called. A value other than the silhouette is determined by "0". When the binarized data is "0" and there is no silhouette on the reference position, (-1) is subtracted from the coordinate data of the reference position in the Y direction, and the address of the frame RAM 14 corresponding to this coordinate data is calculated. The binarized data is called and the above determination is repeated. When the binarized data is changed to "1" and the edge of the silhouette is detected, the edge of the reference position and the edge of the silhouette are calculated from the coordinate data in the Y direction and the coordinate data in the Y direction of the reference position at this time. The distance a in the Y-direction between and is calculated. This distance a is calculated for each coordinate data at the position in the X direction from the reference radius and compared with the reference value 1x stored in the storage unit 10, and it is determined whether the difference is within a predetermined error e. The quality of the component 2 is determined.
When it is determined that the shape of the component 2 is good as a result of the determination, the coordinate data in the X direction of the coordinate data is called and (+1) is added to this, and the next reference position on the straight line extending in the X direction is called. Is called. The binarized data of the address in the frame RAM 14 corresponding to the coordinate data of the reference position is called, the pass / fail judgment is performed as in the previous time, and this is repeated.
Therefore, even if a part comes into contact with an adjacent part and passes in front of the CCD camera, most of the outer periphery of the silhouette of each part can be detected except for the contact part, and no matter what condition the part passes through. It is possible to surely recognize a predetermined shape and determine whether the shape is good or bad.
前記判別の結果、部品2の形状が不良と判別されると、
部品2に付着した切り粉、塵埃等の影響を排除するた
め、部品2の不良が検出される度に不良検出カウンタを
インクリメントして不良検出が記憶され、この不良検出
がN回連続して起こった場合にのみ、部品2の不良と判
断され、部品2の不良表示指令信号が出力されるととも
に、部品2の排除指令信号が出力されて、次回の検査に
備える。If the shape of the component 2 is determined to be defective as a result of the determination,
In order to eliminate the influence of chips, dust, and the like attached to the component 2, the defect detection counter is incremented every time a defect of the component 2 is detected, and the defect detection is stored. This defect detection occurs N times in succession. Only when it is determined that the component 2 is defective, the defect display command signal of the component 2 is output, and the rejection command signal of the component 2 is output to prepare for the next inspection.
一方、基準位置の座標データに対応するフレームRAM14
内のアドレスの二値化データが「1」で基準位置上に部
品2のシルエットがある場合には、基準位置のY方向の
座標データに(+1)加算して行き、その座標データに
対応するフレームRAM14内のアドレスの二値化データの
判別が同様に行われる。前記判定が繰返されてY方向の
座標データが(−1)ごと減算される間に零になると、
前記基準位置が呼出されて、X座標の+方向と同様に−
方向のシルエットの円周形状の良否判別が行われる。続
いて、Y座標上の−方向の基準位置(X0,−Y0)が呼出
され、Y座標上の+方向のシルエットの縁部の良否判別
と同様に−方向のシルエットの縁部の良否判別が行わ
れ、シルエット全周の形状の良否判別が完了し、次回の
良否判別に備えることができる。On the other hand, the frame RAM14 corresponding to the coordinate data of the reference position
If the binarized data of the address is "1" and the silhouette of the part 2 is on the reference position, (+1) is added to the coordinate data of the reference position in the Y direction to correspond to the coordinate data. The determination of the binary data of the address in the frame RAM 14 is similarly performed. If the determination is repeated and the coordinate data in the Y direction becomes zero while subtracting (−1),
The reference position is called, and the same as the + direction of the X coordinate-
Whether the circumferential shape of the silhouette in the direction is good or bad is determined. Next, the reference position (X0, -Y0) in the-direction on the Y coordinate is called, and the quality of the edge of the silhouette in the + direction on the Y coordinate is determined in the same manner. After the completion of the determination of the shape of the entire circumference of the silhouette, it is possible to prepare for the next determination of quality.
以上説明したように、本発明は円形部を持つ部品のシル
エットをCCDカメラにより取り込み、部品の移動方向をX
Y座標上のX方向として部品のシルエットの中心を算出
し、部品のシルエットの中心から基準となる部品のシル
エットの半径だけ離れた位置でX方向に延びる直線上の
各位置を順次基準位置として呼出し、各基準位置からシ
ルエット縁部までのY方向の距離を順次算出してこれら
をシルエットの輪郭として認識するように構成している
ため、部品が隣接の部品と接触してCCDカメラの前方を
通過しても、各部品のシルエットの外周をその接触部を
除いて大部分検出でき、どのような条件で部品が通過し
ても所定の形状の良否判定を確実に行うことができる。
また、本発明は基準となる部品のシルエットと比較する
際に、基準となる直線からシルエット縁部までの距離の
測定のみでよいため、Y方向の縁部間距離を測定する場
合と比べて測定時間をほぼ半減できるばかりか、部品に
切り粉、塵埃等が付着したことによる部品の良否の誤判
定を排除することができる。さらに、本発明は部品のシ
ルエットの縁部の不良検出が連続して発生する時のみ部
品の不良としているため、部品に切り粉、塵埃等が付着
したことによる部品の良否の誤判定を排除することがで
き、正確な良否判定が可能となる等の利点がある。As described above, according to the present invention, the silhouette of a part having a circular portion is captured by the CCD camera, and the moving direction of the part is determined by the X direction.
The center of the silhouette of the part is calculated as the X direction on the Y coordinate, and each position on the straight line extending in the X direction at a position separated from the center of the silhouette of the part by the radius of the silhouette of the reference part is sequentially called as the reference position. , The distance in the Y direction from each reference position to the silhouette edge is sequentially calculated and these are recognized as the outline of the silhouette, so that the parts come into contact with adjacent parts and pass in front of the CCD camera. However, most of the outer periphery of the silhouette of each component can be detected except for its contact portion, and the quality of the predetermined shape can be reliably determined regardless of the condition under which the component passes.
Further, according to the present invention, when comparing with the silhouette of the reference part, it is only necessary to measure the distance from the reference straight line to the silhouette edge, so that the distance between the edges in the Y direction is measured. Not only can the time be halved, but erroneous determination of the quality of the component due to the adherence of cutting chips, dust, etc. to the component can be eliminated. Furthermore, the present invention eliminates the erroneous determination of the quality of the component due to the adherence of cutting chips, dust, etc. to the component because the defect is detected only when the defect detection of the edge of the silhouette of the component occurs continuously. Therefore, there is an advantage that the quality can be accurately determined.
第1図は本発明に係る部品の良否判別装置の概略説明
図、第2図a,b,cは本発明に係る部品の良否判別装置の
動作を示すフローチャート、第3図は本発明に係る部品
の良否判別装置の要部の動作を示す説明図である。 1……良否判別装置、2……部品、 3……取付プレート、4……搬送ベルト、 5……ストロボ、6……CCDカメラ、 7……制御装置、8……制御部、 9……インタフェースバス、10……記憶部、 11……部品検出部、12……ストロボ駆動部、 13……CCDカメラインタフェース、 13a……A/D変換部、13b……タイミングパルス発生部、 13c……信号二値化部、13d……アドレス発生部、 14……フレームRAM、FIG. 1 is a schematic explanatory view of a component quality determination device according to the present invention, FIGS. 2a, 2b and 2c are flowcharts showing the operation of the component quality determination device according to the present invention, and FIG. 3 is related to the present invention. It is explanatory drawing which shows operation | movement of the principal part of the quality determination apparatus of components. 1 ... Pass / fail judgment device, 2 ... Parts, 3 ... Mounting plate, 4 ... Conveyor belt, 5 ... Strobe, 6 ... CCD camera, 7 ... Control device, 8 ... Control unit, 9 ... Interface bus, 10 ... storage section, 11 ... component detection section, 12 ... strobe drive section, 13 ... CCD camera interface, 13a ... A / D conversion section, 13b ... timing pulse generation section, 13c ... Signal binarization unit, 13d ... Address generation unit, 14 ... Frame RAM,
Claims (2)
メラとこれに光線を照射する光源とを配置し、部品の円
形状のシルエットをCCDカメラの画像を構成する画素ご
とに二値化データに変換してその二値化データを画素に
対応する画像メモリ内のアドレスに記憶する一方、 XY座標上の基準位置を記憶し、この基準位置から、XY座
標上のY方向のシルエットの縁部までの距離を検出して
部品の形状を認識する部品の形状認識方法において、 部品の供給方法をXY座標上のX方向として、部品のシル
エットの中心を算出する一方、 シルエットの中心から基準となる部品のシルエットの半
径だけ離れた位置にX方向に延びる直線上の各位置を順
次基準位置として呼出し、この各基準位置からシルエッ
トの輪郭までのY方向の距離をシルエットの輪郭として
認識することを特徴とする部品の形状認識方法。1. A CCD camera and a light source for irradiating light rays are arranged at positions sandwiching a desired component having a circular portion, and a circular silhouette of the component is binarized for each pixel constituting an image of the CCD camera. The data is converted and the binarized data is stored at the address in the image memory corresponding to the pixel, while the reference position on the XY coordinates is stored, and the edge of the silhouette in the Y direction on the XY coordinates is stored from this reference position. In the method of recognizing the shape of a part by detecting the distance to the part, the center of the silhouette of the part is calculated while the center of the silhouette of the part is calculated by setting the method of supplying the part as the X direction on the XY coordinates. Each position on a straight line extending in the X direction at a position separated by the radius of the silhouette of the component is called as a reference position in sequence, and the distance in the Y direction from each reference position to the silhouette contour is defined as the silhouette contour. Shape recognition method of the component, characterized in that to recognize.
メラとこれに光線を照射する光源とを配置し、部品の円
形状のシルエットをCCDカメラの画像を構成する画素ご
とに二値化データに変換してその二値化データを画素に
対応する画像メモリ内のアドレスに記憶する一方、 部品の供給方向をXY座標上のX方向として、部品のシル
エットの中心を算出し、 さらに、シルエットの中心から基準となる部品のシルエ
ットの半径だけ離れた位置にX方向に延びる直線上の各
位置を順次基準位置として呼出し、この各基準位置から
シルエットの輪郭までのY方向の距離をシルエットの輪
郭として検出する度に、基準となる部品のシルエット上
の対応するシルエット縁部までのY方向の距離を呼出し
てこれらを比較判別し、 各基準位置からのY方向の距離が連続して不良と判定さ
れるとき、部品の不良と判定することを特徴とする部品
の良否判別方法。2. A CCD camera and a light source for irradiating light rays are arranged at positions sandwiching a desired component having a circular portion, and a circular silhouette of the component is binarized for each pixel constituting an image of the CCD camera. The data is converted and the binarized data is stored at the address in the image memory corresponding to the pixel, while the component supply direction is set to the X direction on the XY coordinates, and the center of the silhouette of the component is calculated. Each position on a straight line extending in the X direction is called as a reference position at a position away from the center of the object by the radius of the silhouette of the reference part, and the distance in the Y direction from each of these reference positions to the silhouette outline is defined as the silhouette outline. Each time it is detected as, the distance in the Y direction to the corresponding silhouette edge on the silhouette of the reference part is called to compare and determine these, and the distance in the Y direction from each reference position. When it is determined continuously as defective, quality decision method of parts and determining that defective parts.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1339144A JPH0758173B2 (en) | 1989-12-26 | 1989-12-26 | Part shape recognition method and part quality judgment method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1339144A JPH0758173B2 (en) | 1989-12-26 | 1989-12-26 | Part shape recognition method and part quality judgment method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH03197803A JPH03197803A (en) | 1991-08-29 |
| JPH0758173B2 true JPH0758173B2 (en) | 1995-06-21 |
Family
ID=18324652
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1339144A Expired - Lifetime JPH0758173B2 (en) | 1989-12-26 | 1989-12-26 | Part shape recognition method and part quality judgment method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0758173B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101304137B1 (en) * | 2012-06-14 | 2013-09-05 | 한국기술교육대학교 산학협력단 | Method for estimating curvature of part using vision and apparatus for thereof |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS57192813A (en) * | 1981-05-22 | 1982-11-27 | Nhk Spring Co Ltd | Screw checking device |
| JPH061169B2 (en) * | 1987-03-10 | 1994-01-05 | 新日本製鐵株式会社 | Method for detecting running state of strip in furnace |
| JPH0171607U (en) * | 1987-10-31 | 1989-05-12 | ||
| JPH0174512U (en) * | 1987-11-06 | 1989-05-19 |
-
1989
- 1989-12-26 JP JP1339144A patent/JPH0758173B2/en not_active Expired - Lifetime
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101304137B1 (en) * | 2012-06-14 | 2013-09-05 | 한국기술교육대학교 산학협력단 | Method for estimating curvature of part using vision and apparatus for thereof |
Also Published As
| Publication number | Publication date |
|---|---|
| JPH03197803A (en) | 1991-08-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CA1128164A (en) | Scanning of workpieces such as lumber cants | |
| US4079416A (en) | Electronic image analyzing method and apparatus | |
| EP0483966B1 (en) | Method of and apparatus for inspecting a transparent or translucent article such as a bottle | |
| JPH0572961B2 (en) | ||
| US4775889A (en) | Bottle mouth defect inspection apparatus | |
| JP4434417B2 (en) | Inspection equipment for printed wiring boards | |
| JPH07286970A (en) | Opening top panel defect inspection method for bottle neck | |
| JPH0758173B2 (en) | Part shape recognition method and part quality judgment method | |
| JP2591687B2 (en) | How to judge the quality of parts | |
| JP2536127B2 (en) | Board inspection equipment | |
| JP2987309B2 (en) | Inspection method of top surface defect of bottle opening | |
| JPH01297503A (en) | Automatic inspecting device for coating surface | |
| JPH01227910A (en) | Optical inspection device | |
| JPH05240738A (en) | Method and device for inspecting screw | |
| JPH0823530B2 (en) | Object observation apparatus and method for inspecting inner wall surface of cylindrical object using the apparatus | |
| JPS6326510A (en) | Inspection device for packaging component | |
| JP2001050716A (en) | Apparatus and method for sorting cans | |
| JP2768368B2 (en) | Pattern inspection equipment | |
| JP2514944B2 (en) | Optical inspection method and apparatus for bottles | |
| JPH0333000Y2 (en) | ||
| JPH01206242A (en) | Method and apparatus of checking curved surface | |
| JPH0378607A (en) | Inspecting apparatus of soldering | |
| JPH09219600A (en) | How to create inspection area information | |
| JPS62299704A (en) | Inspecting instrument for package parts | |
| JP3004843U (en) | Top surface defect bottle sorter |