JP2003035523A - Method and device for parts shape testing - Google Patents

Method and device for parts shape testing

Info

Publication number
JP2003035523A
JP2003035523A JP2001219940A JP2001219940A JP2003035523A JP 2003035523 A JP2003035523 A JP 2003035523A JP 2001219940 A JP2001219940 A JP 2001219940A JP 2001219940 A JP2001219940 A JP 2001219940A JP 2003035523 A JP2003035523 A JP 2003035523A
Authority
JP
Japan
Prior art keywords
straight line
lead
data
points
tip
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.)
Pending
Application number
JP2001219940A
Other languages
Japanese (ja)
Inventor
Takuro Honda
卓郎 本田
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.)
Juki Corp
Original Assignee
Juki Corp
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 Juki Corp filed Critical Juki Corp
Priority to JP2001219940A priority Critical patent/JP2003035523A/en
Publication of JP2003035523A publication Critical patent/JP2003035523A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a method and device for easily and high-accurately detecting defective parts even for such electronic parts as having a wide variety of shapes. SOLUTION: In an electronic part mounting device 1, an image of an electronic part 2 taken by an imaging device 14 is captured into an image processor 15 to process image data. The image processor 15 detects a lead edge from the acquired image data of the electronic part 2, obtains coordinate data of the detected lead edge, and extracts two points located on both ends out of the detected lead edges to be the lead edge reference points, calculating a straight line passing through these two points. And then it counts number of the lead edge candidate points located on this calculated straight line, and determines this straight line as a base point line L if the counted number of the lead edge candidate points is the specified number or more, to detect abnormality in the lead length based on the determined base point line L.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、部品形状検査方法
に係り、詳細には、電子回路基板上に電子部品を自動装
着する際に、画像認識により部品形状の不良を検出する
部品形状検査方法、及び部品形状検査装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a component shape inspection method, and more particularly, to a component shape inspection method for detecting a defect in a component shape by image recognition when automatically mounting an electronic component on an electronic circuit board. , And a component shape inspection device.

【0002】[0002]

【従来の技術】従来、電子部品装着装置は、電子部品を
吸着する吸着ノズルにCCDカメラ等の撮像装置を備
え、撮像装置により撮像された電子部品の画像データを
画像認識技術を用いて処理することにより、電子部品の
形状の検査を行い、不良部品を除いて電子回路基板上の
所定箇所に電子部品を自動装着している。
2. Description of the Related Art Conventionally, an electronic component mounting apparatus is equipped with an image pickup device such as a CCD camera on a suction nozzle for sucking an electronic component, and image data of the electronic component picked up by the image pickup device is processed using an image recognition technique. As a result, the shape of the electronic component is inspected, and the electronic component is automatically mounted at a predetermined position on the electronic circuit board except for the defective component.

【0003】この電子部品装着装置において、撮像装置
により撮像された電子部品の画像は、画像処理装置によ
り画像データとして取得され、形状検査処理が行われ
る。以下、図8を参照して従来の形状検査処理の一連の
流れを説明する。図8に示すように、撮影装置により撮
像された電子部品のリード端子(以下、「リード」と省
略する)の画像は、画像処理装置により画像データとし
て取得され、CCD素子のxy座標に基づいて、画像デ
ータのxy座標が決定される。図8においては、x軸方
向をリード幅方向、y軸方向をリード長方向としてxy
座標が決定されている。そして、画像データからリード
先端の座標データ(x、y)が検出される。
In this electronic component mounting apparatus, the image of the electronic component picked up by the image pickup apparatus is acquired as image data by the image processing apparatus, and the shape inspection processing is performed. Hereinafter, a series of flow of the conventional shape inspection process will be described with reference to FIG. As shown in FIG. 8, an image of a lead terminal (hereinafter, abbreviated as “lead”) of an electronic component imaged by a photographing device is acquired as image data by an image processing device and is based on xy coordinates of a CCD element. , Xy coordinates of image data are determined. In FIG. 8, the x-axis direction is the lead width direction, and the y-axis direction is the lead length direction.
The coordinates have been determined. Then, the coordinate data (x, y) of the lead tip is detected from the image data.

【0004】次いで、検出されたリード先端の座標デー
タに基づいて、リード先端が存在する領域がy軸方向を
基準として左右の領域に区分される(図8(a))。次
いで、左右に区分された領域それぞれにおいて、同一の
y座標を有するリード先端の個数がy座標毎にカウント
される(図8(b))。次いで、同一のy座標を有する
リード先端の数が、例えば、検出された全リード先端数
の1/4を超える場合、このy座標の座標データが、左
右に区分した領域からそれぞれ取得される(図8
(c))。ここで、取得されたy座標(左の領域におい
てはy1、右の領域に置いてはy2)と同一のy座標を有
するリード先端をリード先端候補点と呼ぶ。
Next, based on the detected coordinate data of the tip of the lead, the area where the tip of the lead exists is divided into left and right areas with reference to the y-axis direction (FIG. 8A). Next, in each of the left and right areas, the number of lead tips having the same y coordinate is counted for each y coordinate (FIG. 8B). Then, when the number of lead tips having the same y-coordinate exceeds, for example, 1/4 of the total number of detected lead tips, coordinate data of this y-coordinate is acquired from each of the left and right divided areas ( Figure 8
(C)). Here, (y 1 in the left area, is placed to the right of the region y 2) obtained y-coordinate was called the lead tip with the same y-coordinate as the lead tip candidate points and.

【0005】次に、取得されたy座標(y1、y2)と同
一のy座標を有するリード先端候補点のx座標がそれぞ
れ取得され、左右に区分された領域毎にx座標の平均
(x1、x2)が算出される(図8(d))。そして、左
右に区分された領域からそれぞれ取得される2点をリー
ド先端基準点とし、この2点(x1、y1)、(x2
2)を通過する直線が基準直線Lとして取得される。
さらに、取得された基準直線Lから所定の距離以上、離
れているリード先端についてはリード長異常として検出
される。
Next, the x-coordinates of the lead tip candidate points having the same y-coordinates as the acquired y-coordinates (y 1 , y 2 ) are respectively acquired, and the average of the x-coordinates for each of the left and right divided areas ( x 1 , x 2 ) is calculated (FIG. 8D). Then, the two points acquired respectively from the left and right areas are used as lead tip reference points, and these two points (x 1 , y 1 ) and (x 2 ,
A straight line passing through y 2 ) is acquired as the reference straight line L.
Further, a lead length that is more than a predetermined distance from the acquired reference straight line L is detected as an abnormal lead length.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、このよ
うな従来の部品形状検査方法にあっては、リード先端が
直線状に並ぶ電子部品がxy座標に対して傾きを持って
撮像された場合、あるいは、近年、電子部品が普及する
につれて、その形状、及び大きさも多種多様になってい
るため、例えば、リード先端が斜めに並ぶ電子部品、ま
たはリード先端が円状に並ぶ電子部品等であった場合に
関しては、不良部品の検出が困難であるという問題があ
った。
However, in such a conventional component shape inspection method, when the electronic components in which the tips of the leads are linearly arranged are imaged with an inclination with respect to the xy coordinates, or In recent years, as electronic parts have become widespread, their shapes and sizes have also become more diverse. For example, when the electronic parts are such that the lead tips are diagonally arranged or the lead tips are circularly arranged. However, there is a problem that it is difficult to detect defective parts.

【0007】例えば、図9に示すように、リード先端候
補点がxy座標に対して斜めに並ぶ電子部品のリード長
異常を従来の方法で検出した場合を説明する。まず、リ
ード先端が検出され、xy座標に基づいて座標データが
取得された画像データにおいて、リードが存在する領域
はy軸方向を基準として左右の領域に区分され、各リー
ド先端の座標データが検出される。ここで、左の領域に
おいては、y座標が同一のリード先端は存在しないの
で、全てのリード先端(2a〜2e)のxy座標の平均
が算出され、算出されたリード先端(2a〜2e)のx
y座標の平均(x 1、y1)が左の領域におけるリード先
端基準点となる。
For example, as shown in FIG.
Lead lengths of electronic components with complementary points arranged diagonally to the xy coordinates
A case where the abnormality is detected by the conventional method will be described. First,
The tip of the card is detected, and the coordinate data is based on the xy coordinates.
Area where the lead exists in the acquired image data
Is divided into left and right regions based on the y-axis direction.
The coordinate data of the leading edge of the edge is detected. Where in the left area
In addition, there is no lead tip with the same y coordinate.
Is the average of xy coordinates of all lead tips (2a to 2e)
Is calculated, and x of the calculated lead tips (2a to 2e) is calculated.
Average y coordinate (x 1, Y1) Is the lead destination in the area on the left
It becomes the end reference point.

【0008】一方、右の領域においては、リード2h、
及びリード2jのy座標が同一であるため、この2つの
リード先端(x20、y2)、(x21、y2)がリード先端
候補点として検出される。次いで、リード先端候補点と
して検出された2点(x20、y2)、(x21、y2)の平
均(x22、y2)が右の領域におけるリード先端基準点
として検出される。そして、左右の領域からそれぞれ検
出された2つのリード先端基準点(x1、y1)、
(x22、y2)を結ぶ直線が基準直線Lとして取得さ
れ、この基準直線Lから所定の距離以上、離れたリード
先端についてはリード長異常として検出される。
On the other hand, in the right area, the leads 2h,
Since the y coordinates of the lead 2j are the same, the two lead tips (x 20 , y 2 ) and (x 21 , y 2 ) are detected as lead tip candidate points. Next, the average (x 22 , y 2 ) of the two points (x 20 , y 2 ) and (x 21 , y 2 ) detected as the lead tip candidate points is detected as the lead tip reference point in the right region. Then, two lead tip reference points (x 1 , y 1 ) respectively detected from the left and right regions,
A straight line connecting (x 22 , y 2 ) is acquired as a reference straight line L, and a lead tip located a predetermined distance or more from this reference straight line L is detected as a lead length abnormality.

【0009】このように、従来の部品形状検査方法にお
いては、電子部品のリード先端がxy座標に対して水平
に並ばない場合、不適切なリード先端をリード先端候補
点として検出し、このリード先端候補点に基づいてリー
ド先端基準点を検出することにより、正確な基準直線L
を取得できずに、リード長異常の検出精度を低下させる
という問題があった。また、リード先端から取得される
基準直線Lの評価を行わずにリード長異常の検出を行う
ため、検査結果の信頼性が低いという問題があった。
As described above, in the conventional component shape inspection method, when the lead tips of the electronic components are not aligned horizontally with respect to the xy coordinates, an inappropriate lead tip is detected as a lead tip candidate point, and this lead tip is detected. By detecting the lead tip reference point based on the candidate point, an accurate reference straight line L
However, there is a problem in that the accuracy of detecting the lead length abnormality is reduced. Further, since the lead length abnormality is detected without evaluating the reference straight line L obtained from the tip of the lead, there is a problem that the reliability of the inspection result is low.

【0010】本発明の課題は、多種多様の形状を有する
電子部品についても容易、かつ高精度に不良部品を検出
することができる部品形状検査方法、及び部品形状検査
装置を提供することである。
An object of the present invention is to provide a component shape inspection method and a component shape inspection apparatus which can detect defective parts easily and with high accuracy even for electronic components having various shapes.

【0011】[0011]

【課題を解決するための手段】請求項1記載の発明は、
対象物を撮像し、撮像した対象物の画像から被検査デー
タを抽出することにより対象物の形状を認識して、当該
対象物の形状の異常を検出する部品形状検査方法におい
て、前記対象物の形状を確定するために必要な数に応じ
て前記被検査データから基準被検査データを抽出し、抽
出した基準被検査データに基づいて前記対象物の形状と
近似した図形を作成し、作成した図形上に所定の数以上
の被検査データが存在する場合に、当該作成した図形を
基準図形に決定し、決定した基準図形からの離間距離が
所定値を超える被検査データを異常データとして検出す
ることを特徴とする。
The invention according to claim 1 is
In a component shape inspection method for recognizing a shape of an object by capturing an image of the object and extracting data to be inspected from an image of the imaged object, the shape of the object is detected. Reference inspected data is extracted from the inspected data according to the number required to determine the shape, a figure approximate to the shape of the object is created based on the extracted reference inspected data, and the created figure When there is a predetermined number or more of inspected data above, the created figure is determined as the reference figure, and the inspected data whose distance from the determined reference figure exceeds the prescribed value is detected as abnormal data. Is characterized by.

【0012】請求項1記載の発明によれば、対象物が多
様な形状であっても、対象物の形状を確定する数に対応
する被検査データを基準被検査データとして抽出し、抽
出した基準被検査データに基づいて、対象物の形状に近
似した図形を作成し、作成した図形が基準図形の条件を
満たしている場合に、この図形を基準図形として、異常
データの検出を行うことができるので、多様な形状の対
象物に対応した形状検査を容易に行うことができる。ま
た、簡単な演算により対象物の形状検査を行うことがで
きるので、処理時間を短縮することができる。さらに、
基準被検査データに基づいて作成した図形に所定の数異
常の被検査データが存在する場合に、作成した図形を基
準図形に決定するため、信頼性の高い基準図形に基づい
て異常データを検出することができ、検査結果の精度を
向上させることができる。
According to the first aspect of the present invention, even if the object has various shapes, the inspected data corresponding to the number that determines the shape of the object is extracted as the reference inspected data, and the extracted reference data is extracted. A figure that approximates the shape of the object is created based on the inspected data, and if the created figure satisfies the conditions of the reference figure, this figure can be used as a reference figure to detect abnormal data. Therefore, it is possible to easily perform the shape inspection corresponding to the objects of various shapes. Moreover, since the shape of the object can be inspected by a simple calculation, the processing time can be shortened. further,
When there are a certain number of abnormal inspection data in the figure created based on the reference inspected data, the created figure is determined as the reference figure, and therefore the abnormal data is detected based on the highly reliable reference figure. Therefore, the accuracy of the inspection result can be improved.

【0013】請求項2記載の発明は、リード端子を備え
る部品を撮像し、撮像した部品の画像からリード端子の
先端の位置データを検出する部品形状検査装置(例え
ば、図1に示す電子部品装着装置1)において、検出さ
れた位置データの中から基準位置データとなる2点を抽
出する基準位置データ抽出手段(CPU151)と、前
記基準位置データ抽出手段により抽出された2点を通過
する直線を算出する直線算出手段(CPU151)と、
前記直線算出手段により算出された直線上に所定の数以
上の位置データが存在するか否かを判別する判別手段
(CPU151)と、前記判別手段により前記直線上に
所定の数以上の位置データが存在すると判別された場合
に当該直線を基準直線に決定する決定手段(CPU15
1)と、を備えることを特徴とする。
According to a second aspect of the present invention, a component shape inspection apparatus (for example, the electronic component mounting shown in FIG. 1) that images the component having the lead terminal and detects the position data of the tip of the lead terminal from the image of the captured component. In the device 1), a reference position data extracting means (CPU 151) for extracting two points serving as reference position data from the detected position data, and a straight line passing through the two points extracted by the reference position data extracting means. A straight line calculating means (CPU 151) for calculating,
A discriminating unit (CPU 151) for discriminating whether or not a predetermined number or more of position data are present on the straight line calculated by the straight line calculating unit, and the discriminating unit stores a predetermined number or more of position data on the straight line. When it is determined that the straight line is present, the straight line is determined as a reference straight line (CPU 15).
1) and are provided.

【0014】請求項2記載の発明によれば、検出された
位置データから任意の2点を抽出して、抽出した2点を
通過する直線を算出し、算出した直線上に存在する位置
データの数が所定値以上であった場合に、算出した直線
を基準直線に決定するため、信頼性の高い基準直線を得
ることができる。また、簡単な演算により基準直線を決
定することができるので、処理速度を向上させることが
できる。
According to the second aspect of the present invention, two arbitrary points are extracted from the detected position data, a straight line passing through the extracted two points is calculated, and the position data existing on the calculated straight line is calculated. When the number is equal to or larger than the predetermined value, the calculated straight line is determined as the reference straight line, so that a highly reliable reference straight line can be obtained. Moreover, since the reference straight line can be determined by a simple calculation, the processing speed can be improved.

【0015】請求項3記載の発明は、前記決定手段によ
り決定された基準直線と、前記リード端子の先端の位置
データとに基づいて、基準直線からリード端子の先端ま
での離間距離を算出して、当該離間距離が所定の値以上
であった場合に、当該リード端子の先端の位置データを
異常データとして検出する検出手段(CPU151)を
さらに備えることを特徴とする。
According to a third aspect of the present invention, the separation distance from the reference straight line to the tip of the lead terminal is calculated based on the reference straight line determined by the determining means and the position data of the tip of the lead terminal. Further, it is characterized by further comprising detection means (CPU 151) for detecting the position data of the tip of the lead terminal as abnormal data when the separation distance is a predetermined value or more.

【0016】請求項3記載の発明によれば、信頼性の高
い基準直線に基づいて、確実に異常データを検出するこ
とができ、検査結果の精度を向上させることができる。
According to the third aspect of the present invention, the abnormal data can be reliably detected based on the highly reliable reference line, and the accuracy of the inspection result can be improved.

【0017】[0017]

【発明の実施の形態】[第1の実施の形態]以下、図1〜
図4を参照して本第1の実施の形態を詳細に説明する。
BEST MODE FOR CARRYING OUT THE INVENTION [First Embodiment]
The first embodiment will be described in detail with reference to FIG.

【0018】まず、構成を説明する。図1は、本発明を
適用した電子部品装着装置1の概略構成を示す図であ
る。図1において、電子部品装着装置1は、電子部品2
を吸着する吸着ノズル11、光源12、レンズ13、撮
像装置14、表示部16を備える画像処理装置15を備
えて構成される。
First, the structure will be described. FIG. 1 is a diagram showing a schematic configuration of an electronic component mounting apparatus 1 to which the present invention is applied. In FIG. 1, the electronic component mounting apparatus 1 includes an electronic component 2
A suction nozzle 11, a light source 12, a lens 13, an image pickup device 14, and an image processing device 15 including a display unit 16 are provided.

【0019】電子部品装着装置1において、所定の供給
位置から電子部品2を吸着した吸着ノズル11は、撮像
装置14の上方へ移動する。次いで、吸着ノズル11に
吸着された電子部品2は、光源12により照射され、レ
ンズ13を介してCCDカメラを備える撮像装置14に
より撮像される。そして、撮像された電子部品2の画像
は画像処理装置15にとりこまれる。
In the electronic component mounting apparatus 1, the suction nozzle 11 that has sucked the electronic component 2 from a predetermined supply position moves above the image pickup device 14. Next, the electronic component 2 sucked by the suction nozzle 11 is illuminated by the light source 12 and is imaged through the lens 13 by the image pickup device 14 having a CCD camera. Then, the imaged image of the electronic component 2 is taken into the image processing device 15.

【0020】また、画像処理装置15は、CPU(Cent
ral Processing Unit)151、メモリ152、A/D
変換回路153、D/A変換回路154、及び表示部1
6を備えて構成される。
Further, the image processing device 15 includes a CPU (Cent).
ral Processing Unit) 151, memory 152, A / D
Conversion circuit 153, D / A conversion circuit 154, and display unit 1
6 is provided.

【0021】CPU151は、後述するメモリ152に
記憶されている各種プログラムを読み出して実行し、画
像処理装置15の各部を駆動制御する。具体的には、メ
モリ152に記憶された形状検査処理プログラム、及び
電子部品2の画像データを読みだして、後述する形状検
査処理(図2参照)を実行し、処理結果を表示部16に
表示させる。
The CPU 151 reads and executes various programs stored in the memory 152, which will be described later, to drive and control each unit of the image processing apparatus 15. Specifically, the shape inspection processing program stored in the memory 152 and the image data of the electronic component 2 are read, the shape inspection processing described later (see FIG. 2) is executed, and the processing result is displayed on the display unit 16. Let

【0022】この形状検査処理において、CPU151
は、後述するRAM152に記憶される画像データを読
み出してリード先端を検出し、検出したリード先端の座
標データを取得する。また、CPU151は、リード先
端の座標データの中から、並列しているリード先端の両
端に位置する2点の座標データを抽出して、抽出した2
点を通過する直線を算出する。さらに、CPU151
は、算出した直線上にあるリード先端候補点の数をカウ
ントして、所定数以上のリード先端候補点がある場合、
この直線を基準直線Lに決定する。そして、CPU15
1は、この基準直線Lから所定距離以上、離れているリ
ード先端をリード長異常として検出する。
In this shape inspection process, the CPU 151
Reads the image data stored in the RAM 152, which will be described later, detects the lead tip and acquires the coordinate data of the detected lead tip. Further, the CPU 151 extracts the coordinate data of two points located at both ends of the lead tips arranged in parallel from the coordinate data of the lead tips, and extracts the extracted coordinate data.
Calculate the straight line that passes through the points. Furthermore, the CPU 151
Counts the number of lead tip candidate points on the calculated straight line, and when there are a predetermined number or more of lead tip candidate points,
This straight line is determined as the reference straight line L. And the CPU 15
1 detects a lead tip that is away from the reference straight line L by a predetermined distance or more as a lead length abnormality.

【0023】また、算出した直線に所定数以上のリード
先端候補点がない場合、CPU151は、検出したリー
ド先端の座標データの中から異なる2点の組み合わせを
抽出して、抽出した2点を通過する直線を算出する。そ
して、算出した直線上にあるリード先端候補点をカウン
トして、同様に直線の評価を行う。直線が基準直線Lと
なる条件を満たした場合は、この直線に基づいてリード
長異常の検出を行い、基準直線Lとなる条件を満たさな
い場合は、さらに異なる2点の組み合わせを抽出して、
直線の算出、及び評価を行う。
If the calculated straight line does not have a predetermined number of lead tip candidate points or more, the CPU 151 extracts a combination of two different points from the detected lead tip coordinate data and passes the extracted two points. Calculate the straight line. Then, the lead tip candidate points on the calculated straight line are counted, and the straight line is similarly evaluated. If the straight line satisfies the condition of becoming the reference straight line L, the lead length abnormality is detected based on this straight line, and if the condition of becoming the reference straight line L is not satisfied, a combination of two different points is extracted,
Calculate and evaluate straight lines.

【0024】メモリ152は、プログラムメモリ(RO
M)、及びデータメモリ(RAM)等から構成され、C
PU151によって実行される各種プログラムやこれら
各種プログラムにかかるデータ等を一時的に記憶するワ
ークエリアを形成する。具体的に、メモリ152は、後
述するA/D変換回路153から入力される電子部品2
のデジタル画像データを一時的に記憶し、CPU151
の制御信号に応じて、CPU151にデジタル画像デー
タを出力する。
The memory 152 is a program memory (RO
M) and a data memory (RAM), etc., and C
A work area for temporarily storing various programs executed by the PU 151 and data relating to these various programs is formed. Specifically, the memory 152 is the electronic component 2 input from an A / D conversion circuit 153 described later.
CPU 151 temporarily stores the digital image data of
The digital image data is output to the CPU 151 in accordance with the control signal.

【0025】A/D変換回路153は、撮像装置14か
ら入力されるアナログ画像信号をデジタル画像データに
変換してメモリ152、D/A変換回路154に出力す
る。
The A / D conversion circuit 153 converts the analog image signal input from the image pickup device 14 into digital image data and outputs it to the memory 152 and the D / A conversion circuit 154.

【0026】D/A変換回路154は、A/D変換回路
153から入力されるデジタル画像データをアナログ画
像信号に変換して表示装置16に出力する。
The D / A conversion circuit 154 converts the digital image data input from the A / D conversion circuit 153 into an analog image signal and outputs it to the display device 16.

【0027】表示装置16は、CRT(Cathode Ray Tu
be)やLCD(Liquid Crystal Display)等によってな
る表示画面を備え、D/A変換回路154から入力され
るデジタル画像データを画面上に表示する。
The display device 16 is a CRT (Cathode Ray Tu).
be), an LCD (Liquid Crystal Display), and the like, and display the digital image data input from the D / A conversion circuit 154 on the screen.

【0028】次に、本第1の実施の形態の電子部品装着
装置1における画像処理装置15の動作を説明する。図
2は、画像処理装置15のCPU151により実行され
る形状検査処理を示すフローチャートである。
Next, the operation of the image processing apparatus 15 in the electronic component mounting apparatus 1 of the first embodiment will be described. FIG. 2 is a flowchart showing the shape inspection process executed by the CPU 151 of the image processing device 15.

【0029】図2に示すように、CPU151は、メモ
リ152に記憶される電子部品2の画像データを取得し
てデータの処理を行い、電子部品2のリード先端を検出
する。次いで、CPU151は、検出したリード先端の
座標データをxy座標に基づいてそれぞれ取得する(ス
テップS1)。次いで、CPU151は、取得したリー
ド先端の座標データの中から並列するリード先端の両端
に位置する2点の座標データを抽出する。次いで、CP
U151は、抽出した2点をリード先端基準点として、
この2点を通過する直線を算出する(ステップS2)。
次いで、CPU151は、算出した直線上にあるリード
先端候補点の数をカウントする(ステップS3)。
As shown in FIG. 2, the CPU 151 acquires the image data of the electronic component 2 stored in the memory 152, processes the data, and detects the tip of the lead of the electronic component 2. Next, the CPU 151 acquires the coordinate data of the detected lead tip based on the xy coordinates (step S1). Next, the CPU 151 extracts coordinate data of two points located at both ends of the lead tips arranged in parallel from the acquired coordinate data of the lead tips. Then CP
U151 uses the two extracted points as the lead tip reference point.
A straight line passing through these two points is calculated (step S2).
Next, the CPU 151 counts the number of lead tip candidate points on the calculated straight line (step S3).

【0030】さらに、CPU151は、直線上にあるリ
ード先端候補点の数が所定数以上(例えば、全リード先
端数の8割以上)であるか否かを判断する(ステップS
4)。ここで、直線上にあるリード先端候補点の数が所
定数以上あった場合(ステップS4;YES)、即ち、
算出した直線が基準直線Lとなる条件を満たしている場
合、CPU11は、この直線を基準直線Lに決定する。
そして、CPU151は、この基準直線Lから所定距離
離れたリード先端をリード長異常として検出する(ステ
ップS5)。
Further, the CPU 151 determines whether or not the number of lead tip candidate points on the straight line is a predetermined number or more (for example, 80% or more of all lead tip numbers) (step S).
4). Here, when the number of lead tip candidate points on the straight line is equal to or larger than a predetermined number (step S4; YES), that is,
When the calculated straight line satisfies the condition of becoming the reference straight line L, the CPU 11 determines this straight line as the reference straight line L.
Then, the CPU 151 detects the lead tip that is away from the reference straight line L by a predetermined distance as a lead length abnormality (step S5).

【0031】一方、算出した直線上にリード先端候補点
が所定数以上ない場合(ステップS4;NO)、即ち、
算出した直線が基準直線Lに決定されない場合、CPU
151は、リード先端の座標データの中から次の異なる
組み合わせの2点をリード先端基準点として抽出して直
線を算出し(ステップS6)、ステップS3〜ステップ
S4の処理を繰り返して実行する。なお、ステップS3
〜ステップS4の処理を繰り返して実行し、全てのとり
うる2点の組み合わせについて直線を算出して評価を行
った結果、所定数以上のリード先端候補点を有する直線
がない場合、CPU151は、認識エラーとして本形状
検査処理を終了する。
On the other hand, when there are not more than a predetermined number of lead tip candidate points on the calculated straight line (step S4; NO), that is,
If the calculated straight line is not determined as the reference straight line L, the CPU
The 151 extracts two points of the following different combinations from the lead tip coordinate data as lead tip reference points to calculate a straight line (step S6), and repeats the processing of steps S3 to S4. Note that step S3
As a result of repeatedly executing the processing of step S4 and calculating and evaluating straight lines for all possible combinations of two points, if there is no straight line having a predetermined number of lead tip candidate points or more, the CPU 151 recognizes As an error, this shape inspection process ends.

【0032】次に、図3(a)、(b)を参照して具体的
に形状検査処理を説明する。図3(a)において、画像処
理装置15により電子部品2のリード2a〜2jの先端
が検出され、それぞれの座標データが取得される。そし
て、取得したリード先端の座標データの中から並列する
リード先端の両端に位置する2点[P0(x0、y0)、P
n(xn、yn)]の座標データがリード先端基準点として
抽出され、2点(P0、Pn)を通過する直線が算出され
る。ここで、算出された直線上にあるリード先端候補点
の数をカウントすると、リード先端候補点の数は「3」
である。従って、全リード先端数「10」の8割を満た
していないので、2点(P0、Pn)を通過する直線は基
準直線Lとして決定されない。
Next, the shape inspection process will be specifically described with reference to FIGS. 3 (a) and 3 (b). In FIG. 3A, the tips of the leads 2a to 2j of the electronic component 2 are detected by the image processing device 15, and the coordinate data of each is obtained. Then, two points [P 0 (x 0 , y 0 ), P located at both ends of the lead ends arranged in parallel are obtained from the acquired coordinate data of the lead ends.
The coordinate data of n (x n , y n )] is extracted as a lead tip reference point, and a straight line passing through two points (P 0 , P n ) is calculated. Here, when the number of lead tip candidate points on the calculated straight line is counted, the number of lead tip candidate points is “3”.
Is. Therefore, the straight line passing through the two points (P 0 , P n ) is not determined as the reference straight line L because it does not satisfy 80% of the total number of lead tips “10”.

【0033】続いて、図3(b)において、2点[P
0(x0、y0)、P8(x8、y8)]がリード先端基準点
として抽出された場合を説明する。まず、2点(P0
8)を通過する直線が算出される。ここで、算出され
た直線上にあるリード先端候補点をカウントすると、リ
ード先端候補点の数は「8」である。従って、全リード
先端数「10」の8割を満たしているので、2点
(P0、P8)を通過する直線は基準直線Lに決定され、
この基準直線Lに基づいてリード長異常の検出が行われ
る。すなわち、図3(b)においては、リード2i、及
びリード2jがリード長異常として検出される。
Then, in FIG. 3B, two points [P
A case where 0 (x 0 , y 0 ), P 8 (x 8 , y 8 )] is extracted as the lead tip reference point will be described. First, two points (P 0 ,
A straight line passing through P 8 ) is calculated. Here, when the number of the lead tip candidate points on the calculated straight line is counted, the number of the lead tip candidate points is “8”. Therefore, since 80% of the total number of lead tips “10” is satisfied, the straight line passing through the two points (P 0 , P 8 ) is determined as the reference straight line L,
The lead length abnormality is detected based on the reference straight line L. That is, in FIG. 3B, the lead 2i and the lead 2j are detected as an abnormal lead length.

【0034】ここで、直線上にあるリード先端候補点と
は、リード先端の座標データが、直線に対して例えば3
画素以内にある場合、リード先端が直線上にあるとし、
このリード先端をリード先端候補点とする。また、リー
ド長異常の検出は、例えば、リード先端の座標データが
基準直線Lから10画素以上離れている場合、このリー
ドをリード長異常として検出する。なお、リード長異常
検出等において基準となる画素数は一例であり、電子部
品の用途、目的等に応じて変更可能であることは勿論で
ある。
Here, the lead tip candidate point on the straight line means that the coordinate data of the lead tip is, for example, 3 with respect to the straight line.
If it is within the pixel, it is assumed that the lead tip is on a straight line,
This lead tip is used as a lead tip candidate point. The lead length abnormality is detected by detecting the lead as a lead length abnormality, for example, when the coordinate data of the tip of the lead is more than 10 pixels away from the reference straight line L. The number of pixels serving as a reference in lead length abnormality detection and the like is an example, and it is needless to say that it can be changed according to the use and purpose of the electronic component.

【0035】次に、検出されたリード先端の中からリー
ド先端基準点となる2点を抽出する方法を図4に示す図
を参照して説明する。電子部品2から検出されたリード
先端がn個であった場合、リード先端をそれぞれP0
1、・・・、Pnとする。そして、検出されたリード先
端の中から両端に位置する2点(P0、Pn)を最初のリ
ード先端基準点として抽出する。次いで、この2点を通
過する直線が基準直線Lとなる条件を満たさなかった場
合、次のリード先端基準点として、左端の1点
(P0)、及び右端から2番目の1点(Pn-1)を抽出す
る。
Next, a method for extracting two points which are reference points of the lead tip from the detected lead tips will be described with reference to the drawing shown in FIG. When the number of lead tips detected from the electronic component 2 is n, the lead tips are respectively P 0 ,
Let P 1 , ..., P n . Then, two points (P 0 , P n ) located at both ends are extracted from the detected lead tip as the first lead tip reference point. Next, when the straight line passing through these two points does not satisfy the condition of becoming the reference straight line L, as the next lead tip reference point, one point at the left end (P 0 ) and the second point from the right end (P n). -1 ) is extracted.

【0036】さらに、この2点を通過する直線が基準直
線Lとなる条件を満たさなかった場合、図4に示す表の
順番に従ってリード先端基準点を取得して直線を算出
し、算出した直線の評価を行う。従って、例えば、検出
されたリード先端数が「10」であった場合、とりうる
2点の組み合わせは全部で45種類(102)になり、
基準直線Lとなる条件を満たす直線が算出されるまで、
リード先端基準点が抽出され、直線の評価が行われる。
なお、図4において、n、及びkは整数であり、k≦n
−1である。
Further, if the condition that the straight line passing through these two points becomes the reference straight line L is not satisfied, the lead tip reference point is acquired in accordance with the order of the table shown in FIG. 4, and the straight line is calculated. Make an evaluation. Therefore, for example, if the number of detected lead tips is “10”, there are a total of 45 possible combinations of 2 points ( 10 C 2 ),
Until a straight line satisfying the condition of the reference straight line L is calculated,
The lead tip reference point is extracted and a straight line is evaluated.
In FIG. 4, n and k are integers, and k ≦ n
-1.

【0037】なお、本第1の実施の形態においては、リ
ード先端基準点となる2点を並列するリード先端の両端
から順に抽出して直線を算出する構成として説明した
が、リード先端基準点となる2点を抽出する順番、方法
はこれに限らない。また、本第1の実施の形態において
は、所定の閾値を設定し、この閾値を超えるリード先端
候補点を有する直線を基準直線Lに決定する構成とした
が、例えば、検出されたリード先端が10本であった場
合、算出される45本全ての直線についてリード先端候
補点の数をカウントし、全ての直線の評価を行った後
に、最もリード先端候補点の多い直線を基準直線Lに決
定してリード長異常の検出を行う構成であっても良い。
Although the first embodiment has been described as a configuration in which two points, which are the lead tip reference points, are extracted sequentially from both ends of the lead tips in parallel to calculate a straight line, The order and method of extracting the two points are not limited to this. In the first embodiment, a predetermined threshold value is set, and a straight line having a lead tip candidate point exceeding this threshold value is determined as the reference straight line L. However, for example, the detected lead tip is In the case of 10 lines, the number of lead tip candidate points is counted for all 45 calculated straight lines, all straight lines are evaluated, and then the straight line with the most lead tip candidate points is determined as the reference straight line L. Alternatively, the configuration may be such that the lead length abnormality is detected.

【0038】以上のように、本第1の実施の形態によれ
ば、電子部品装着装置1において、撮像装置14により
撮像された電子部品2の画像は、画像処理装置15に取
得され、画像データの処理が行われる。画像処理装置1
5は、取得した電子部品2の画像データからリード先端
を検出し、検出したリード先端の座標データを取得し
て、検出したリード先端の中から両端に位置する2点を
抽出して、抽出した2点をリード先端基準点としてこの
2点を通過する直線を算出する。そして、算出した直線
上にあるリード先端候補点の数をカウントして、カウン
トしたリード先端候補点の数が所定数以上であった場合
に、この直線を基準直線Lに決定し、決定した基準直線
Lに基づいてリード長異常の検出を行う。
As described above, according to the first embodiment, in the electronic component mounting apparatus 1, the image of the electronic component 2 picked up by the image pickup device 14 is acquired by the image processing device 15, and the image data is acquired. Is processed. Image processing device 1
The reference numeral 5 detects the lead tip from the acquired image data of the electronic component 2, acquires the coordinate data of the detected lead tip, and extracts and extracts two points located at both ends from the detected lead tip. A straight line passing through these two points is calculated using the two points as reference points for the lead tip. Then, the number of lead tip candidate points on the calculated straight line is counted, and when the number of the counted lead tip candidate points is equal to or more than a predetermined number, this straight line is determined as the reference straight line L, and the determined reference is determined. The lead length abnormality is detected based on the straight line L.

【0039】従って、リード先端が直線状に並ぶ電子部
品がxy座標に対して傾きを持って撮像された場合、ま
たはリード先端が斜めに並ぶ電子部品であっても、検出
されたリード先端の中から2点を抽出して、抽出した2
点を通過する直線を算出して、簡単な演算により基準直
線Lを算出することができる。これにより、多様な電子
部品に対応した形状検査を容易に行うことができる。ま
た、処理時間を短縮して短時間に多くの電子部品の形状
検査を行うことができる。
Therefore, when the electronic components whose lead tips are linearly arranged are imaged with an inclination with respect to the xy coordinates, or even when the electronic components whose lead tips are diagonally aligned, among the detected lead tips. 2 points were extracted from
The reference straight line L can be calculated by a simple calculation by calculating a straight line passing through the points. As a result, it is possible to easily perform a shape inspection corresponding to various electronic components. Further, it is possible to shorten the processing time and perform shape inspection of many electronic components in a short time.

【0040】また、算出された直線上にあるリード先端
候補点の数をカウントし、所定数以上のリード先端候補
点を有する直線を基準直線Lとして決定するため、基準
直線Lの信頼性を向上させることができる。これによ
り、リード長異常の検出精度を向上させることができ、
高品質、高精度な電子部品を提供することができる。
Since the number of lead tip candidate points on the calculated straight line is counted and the straight line having a predetermined number or more of lead tip candidate points is determined as the reference straight line L, the reliability of the reference straight line L is improved. Can be made. This makes it possible to improve the detection accuracy of lead length abnormalities,
It is possible to provide high quality and high precision electronic components.

【0041】さらに、リード先端から抽出するリード先
端基準点を両端から順番に抽出する構成としたので、効
率よく基準直線Lを決定することができ、処理の高速化
を図ることができる。
Further, since the lead tip reference points extracted from the lead tips are sequentially extracted from both ends, the reference straight line L can be efficiently determined, and the processing speed can be increased.

【0042】[第2の実施の形態]次に、図5〜図7を参
照して本発明における第2の実施の形態について説明す
る。なお、本第2の実施の形態においては、上記第1の
実施の形態における電子部品装着装置1を用いて、CP
U151が形状検査処理プログラム(2)に基づいて、
形状検査処理(2)(図5参照)を実行することにより
本発明を実現する。従って、本第2の実施の形態におけ
る電子部品装着装置1は、上記第1の実施の形態におけ
るものと同様の構成によってなるものであり、図示及び
構成説明を省略し、同一部分には同一符号を付して説明
する。以下、本第2の実施の形態における特徴的な発明
であるリード先端が円状に並ぶ電子部品2の形状検査処
理(2)について詳細に説明する。
[Second Embodiment] Next, a second embodiment of the present invention will be described with reference to FIGS. In addition, in the second embodiment, by using the electronic component mounting apparatus 1 in the first embodiment, the CP
Based on the shape inspection processing program (2), U151
The present invention is realized by executing the shape inspection process (2) (see FIG. 5). Therefore, the electronic component mounting apparatus 1 according to the second embodiment has the same configuration as that of the first embodiment, and illustration and configuration description thereof are omitted, and the same reference numerals are given to the same portions. Will be described. The shape inspection process (2) for the electronic component 2 having the lead tips arranged in a circle, which is a characteristic invention of the second embodiment, will be described in detail below.

【0043】図5は、CPU151により実行される形
状検査処理(2)を示すフローチャートである。図5に
示すように、CPU151は、メモリ152に記憶され
る電子部品2の画像データを取得してデータの処理を行
い、電子部品2のリード先端を検出する。次いで、CP
U151は、検出したリード先端の座標データをxy座
標に基づいてそれぞれ取得する(ステップS11)。次
いで、CPU151は、取得したリード先端の座標デー
タからリードが存在する領域の重心Gを算出して、算出
した重心Gからリードが存在する領域を3つに等分する
(ステップS12)。次いで、CPU151は、等分し
た3つの領域に属するリード先端の中からリード先端基
準点を1点づつ、合計3点を抽出する(ステップS1
3)。
FIG. 5 is a flow chart showing the shape inspection process (2) executed by the CPU 151. As shown in FIG. 5, the CPU 151 acquires the image data of the electronic component 2 stored in the memory 152, processes the data, and detects the lead tip of the electronic component 2. Then CP
The U 151 respectively acquires the coordinate data of the detected lead tip based on the xy coordinates (step S11). Next, the CPU 151 calculates the center of gravity G of the area where the lead exists from the acquired coordinate data of the tip of the lead, and equally divides the area where the lead exists into three areas from the calculated center of gravity G (step S12). Next, the CPU 151 extracts one lead tip reference point from the lead tips belonging to the three equally divided areas, for a total of three points (step S1).
3).

【0044】次いで、CPU151は、抽出した3点を
リード先端基準点として、この3点を通過する円を算出
する(ステップS14)。次いで、CPU151は、算
出した円上にあるリード先端候補点の数をカウントする
(ステップS15)。次いで、CPU151は、円上に
あるリード先端候補点の数が所定数以上(例えば、全リ
ード先端数の8割以上)であるか否かを判断する(ステ
ップS16)。ここで、円上にあるリード先端候補点の
数が所定数以上あった場合(ステップS16;YE
S)、即ち、算出した円が基準円Cとなる条件を満たし
ている場合、CPU151は、この円を基準円Cに決定
する。そして、CPU151は、この基準円Cから所定
距離以上、離れたリード先端をリード長異常として検出
する(ステップS17)。
Next, the CPU 151 calculates a circle passing through these extracted three points as a lead tip reference point (step S14). Next, the CPU 151 counts the number of lead tip candidate points on the calculated circle (step S15). Next, the CPU 151 determines whether or not the number of lead tip candidate points on the circle is a predetermined number or more (for example, 80% or more of all lead tip numbers) (step S16). Here, when the number of lead tip candidate points on the circle is equal to or larger than the predetermined number (step S16; YE).
S), that is, when the calculated circle satisfies the condition of becoming the reference circle C, the CPU 151 determines this circle as the reference circle C. Then, the CPU 151 detects the lead tip that is separated from the reference circle C by a predetermined distance or more as a lead length abnormality (step S17).

【0045】一方、算出した円上にリード先端候補点が
所定数以上ない場合(ステップS17;NO)、即ち、
算出した円が基準円Cに決定されない場合、CPU15
1は、リード先端の座標データの中から次の異なる組み
合わせの3点を等分した3つの領域からリード先端基準
点として抽出する(ステップS18)。次いで、CPU
151は、ステップS14に移行して、ステップS14
〜ステップS16の処理を繰り返して実行する。なお、
ステップS14〜ステップS16の処理を繰り返して実
行し、全てのとりうる3点の組み合わせについて円を算
出して評価を行った結果、所定数以上のリード先端候補
点を有する円がない場合、CPU151は、認識エラー
として本形状検査処理を終了する。
On the other hand, when there are not more than a predetermined number of lead tip candidate points on the calculated circle (step S17; NO), that is,
If the calculated circle is not determined as the reference circle C, the CPU 15
1 is extracted as the lead tip reference point from three areas obtained by equally dividing three points of the following different combinations from the lead tip coordinate data (step S18). Then the CPU
151 moves to step S14, and step S14
~ The process of step S16 is repeatedly executed. In addition,
As a result of repeatedly performing the processing of steps S14 to S16 and calculating and evaluating circles for all possible combinations of three points, when there is no circle having a predetermined number or more of lead tip candidate points, the CPU 151 determines that The shape inspection process ends as a recognition error.

【0046】次に、図6(a)、(b)を参照して具体的
に形状検査処理を説明する。なお、図6(a)、(b)に
おいて、簡易のためリード先端を丸印で示す。図6(a)
に示すように、画像処理装置15により電子部品2のリ
ード先端(P00〜P23)が検出され、それぞれの座標デ
ータが取得される。次いで、取得された座標データに基
づいてリード先端の存在する領域の重心Gが算出され
る。さらに、算出された重心Gに基づいてリード先端の
存在する領域が破線で区切られた3つの領域に等分され
る。そして、3つに等分された各領域からリード先端の
座標データを1点づつ合計3点、例えば、(P02、P1
0、P21)がリード先端基準点として抽出される。
Next, the shape inspection process will be specifically described with reference to FIGS. 6 (a) and 6 (b). In FIGS. 6A and 6B, the tip of the lead is indicated by a circle for simplification. Figure 6 (a)
As shown in FIG. 5, the image processing device 15 detects the lead tips (P00 to P23) of the electronic component 2 and acquires the coordinate data of each. Next, the center of gravity G of the area where the lead tip exists is calculated based on the acquired coordinate data. Further, based on the calculated center of gravity G, the area where the lead tip exists is equally divided into three areas separated by broken lines. Then, coordinate data of the tip of the lead from each of the three equally divided areas, one point at a total of three points, for example, (P02, P1
0, P21) is extracted as the lead tip reference point.

【0047】続いて、図6(b)は、図6(a)において
抽出した3点(P02、P10、P21)を通過する円を示し
た図である。3点を通過する円が算出されると、この円
上にあるリード先端がリード先端候補点として取得さ
れ、円上のリード先端候補点数がカウントされる。図6
(b)においては、円上にあるリード先端候補点の数は
「9」であり、検出された全リード先端数「11」の8
割を満たしているので、3点(P02、P10、P21)を通
過する円は、基準円Cに決定される。そして、この基準
円Cから所定距離以上離れた位置にあるリード先端をリ
ード長異常として検出する。すなわち、図6(b)にお
いては、P00、及びP01がリード長異常として検出され
る。
6 (b) is a diagram showing a circle passing through the three points (P02, P10, P21) extracted in FIG. 6 (a). When a circle passing through three points is calculated, the lead tips on this circle are acquired as lead tip candidate points, and the number of lead tip candidate points on the circle is counted. Figure 6
In (b), the number of lead tip candidate points on the circle is "9", and the detected total number of lead tips is "11", which is eight.
Since the circle is satisfied, the circle passing through the three points (P02, P10, P21) is determined as the reference circle C. Then, the leading end of the lead located at a predetermined distance or more from the reference circle C is detected as an abnormal lead length. That is, in FIG. 6B, P00 and P01 are detected as lead length abnormalities.

【0048】ここで、基準円C上にあるリード先端候補
点とは、リード先端の座標データが、基準円Cに対して
例えば3画素以内にある場合、リード先端が基準円C上
にあるとし、このリード先端をリード先端候補点とす
る。また、リード長異常の検出は、例えば、リード先端
の座標データが基準円Cから10画素以上離れている場
合、このリードをリード長異常として検出する。なお、
リード長異常検出等において基準となる画素数は一例で
あり、電子部品の用途、目的等に応じて変更可能である
ことは勿論である。
Here, the lead tip candidate point on the reference circle C means that the lead tip is on the reference circle C when the coordinate data of the lead tip is within, for example, 3 pixels with respect to the reference circle C. This lead tip is used as a lead tip candidate point. The lead length abnormality is detected by detecting the lead as a lead length abnormality, for example, when the coordinate data of the lead tip is separated from the reference circle C by 10 pixels or more. In addition,
The number of pixels serving as a reference in lead length abnormality detection and the like is an example, and it is needless to say that the number can be changed according to the use and purpose of the electronic component.

【0049】次に、検出されたリード先端の中からリー
ド先端基準点となる3点を、区分された各領域から抽出
する方法を図7に示す図を参照して説明する。3つの等
分された各領域を領域0、領域1、領域2として、領域
0に位置するリード先端をP00、P01、・・・、Pi、
領域1に位置するリード先端をP10、P11、・・・、P
j、領域2に位置するリード先端をP20、P21、・・
・、Pkとする。そして、各領域から1点づつ、例え
ば、領域0からP00、領域1からP10、領域2からP20
の3点を抽出する。次いで、抽出した3点(P00、P1
0、P20)の座標データから3点を通過する円を算出す
る。ここで、この3点を通過する円が基準円Cとなる条
件を満たさなかった場合、次のリード先端基準点とし
て、図7に示す表の順番に従って領域0〜領域3から異
なる3点の組み合わせを抽出する。
Next, a method for extracting three points, which are the lead tip reference points, from the detected lead tips from the respective divided areas will be described with reference to the diagram shown in FIG. The three equally divided areas are referred to as area 0, area 1, and area 2, and the lead tips located in area 0 are P00, P01, ..., Pi,
Set the lead tips located in area 1 to P10, P11, ..., P
j, the tip of the lead located in area 2 is P20, P21, ...
., Pk. Then, one point from each area, for example, area 0 to P00, area 1 to P10, area 2 to P20
3 points are extracted. Then, the extracted three points (P00, P1
A circle passing through three points is calculated from the coordinate data (0, P20). Here, if the condition that the circle passing through these three points becomes the reference circle C is not satisfied, a combination of three points different from area 0 to area 3 is set as the next lead tip reference point in the order of the table shown in FIG. To extract.

【0050】以上のように、図7に示す表の順番に従っ
てリード先端基準点を取得して円を算出し、算出した円
の評価を行う。従って、例えば、検出されたリード先端
数が「11」であった場合、とりうる3点の組み合わせ
は全部で16種類(4*4*3/3)になり、基準円C
となる条件を満たす円が算出されるまでリード先端基準
点が抽出され、円の評価が行われる。なお、リード先端
基準点となる3点を抽出する順番は一例であり、図7の
表に示す順番に限らない。
As described above, the lead tip reference point is acquired according to the order of the table shown in FIG. 7, the circle is calculated, and the calculated circle is evaluated. Therefore, for example, when the number of detected lead tips is “11”, there are a total of 16 possible combinations of 3 points (4 * 4 * 3/3), and the reference circle C
The lead tip reference point is extracted and the circle is evaluated until the circle satisfying the following condition is calculated. Note that the order of extracting the three points serving as the lead tip reference points is an example, and the order is not limited to the order shown in the table of FIG. 7.

【0051】また、本第2の実施の形態において、リー
ド先端が直線上に並ばない電子部品2として、リード先
端が円状に並ぶ電子部品2を用いて説明を行ったが、本
第2の実施の形態はこれに限らず、円以外の異なる図形
を有する電子部品2についても同様の形状検査方法によ
り実現可能である。
In the second embodiment, the electronic component 2 having the lead tips arranged in a circle is used as the electronic component 2 having the lead tips not arranged in a straight line. The embodiment is not limited to this, and the electronic component 2 having different figures other than the circle can be realized by the same shape inspection method.

【0052】例えば、電子部品2が四角形である場合、
画像処理装置によりリード先端の座標データを検出し、
この座標データに基づいて重心Gを取得した後に、リー
ド先端の存在する領域を4等分する。次いで、4等分し
た各領域からそれぞれリード先端基準点を抽出し、ただ
し1つの領域のみ2点を抽出する。そして、抽出した5
点を通過する四角形を算出する。次いで、算出した四角
形上にあるリード先端候補点の数をカウントし、所定数
以上のリード先端候補点を有する四角形を基準四角形に
決定して、リード長異常の検出を行うことができる。
For example, when the electronic component 2 is a quadrangle,
The image processing device detects the coordinate data of the tip of the lead,
After the center of gravity G is obtained based on this coordinate data, the area where the lead tip exists is divided into four equal parts. Then, the lead tip reference point is extracted from each of the four divided regions, but two points are extracted from only one region. And extracted 5
Calculate the quadrangle that passes through the points. Then, the number of lead tip candidate points on the calculated quadrangle is counted, and a quadrangle having a predetermined number or more of lead tip candidate points is determined as a reference quadrangle, whereby the lead length abnormality can be detected.

【0053】以上のように本第2の実施の形態によれ
ば、電子部品装着装置1において、撮像装置14により
撮像された電子部品2の画像は、画像処理装置15に取
得され、画像データの処理が行われる。画像処理装置1
5は、取得した電子部品2の画像データからリード先端
を検出し、検出したリード先端の座標データを取得す
る。次いで、リード先端の座標データからリード先端の
存在する領域の重心Gを求めるとともに、重心Gからリ
ード先端の存在する領域を3つに等分して、等分した各
領域から1点づつ、合計3点をリード先端基準点として
抽出する。次いで、抽出した3点を通過する円を算出し
て、算出した円上にあるリード先端候補点の数をカウン
トする。そして、カウントしたリード先端候補点の数が
所定数以上であった場合に、この円を基準円Cに決定
し、決定した基準円Cに基づいてリード長異常の検出を
行う。
As described above, according to the second embodiment, the image of the electronic component 2 picked up by the image pickup device 14 in the electronic component mounting device 1 is acquired by the image processing device 15, and the image data of the image data is acquired. Processing is performed. Image processing device 1
Reference numeral 5 detects the lead tip from the acquired image data of the electronic component 2, and acquires the coordinate data of the detected lead tip. Next, the center of gravity G of the area where the lead tip exists is calculated from the coordinate data of the lead tip, and the area where the lead tip exists is equally divided into three areas from the center of gravity G, and one point is obtained from each of the equally divided areas. Three points are extracted as lead tip reference points. Next, a circle passing through the three extracted points is calculated, and the number of lead tip candidate points on the calculated circle is counted. Then, when the number of counted lead tip candidate points is equal to or larger than a predetermined number, this circle is determined as the reference circle C, and the lead length abnormality is detected based on the determined reference circle C.

【0054】従って、リード先端が直線状に並ばない電
子部品であっても、簡単な演算処理により基準円を算出
して、リード長異常の検出を行うことができる。また、
算出された基準円の評価を行い、精度の高い基準円を選
択して、リード長異常の検出を行うため、検査結果の信
頼性を向上させることができる。さらに、リード先端の
存在する領域の重心Gを求め、重心Gからリード先端の
存在する領域を3つに等分して、等分した各領域からリ
ード先端基準点を抽出する構成としたので、効率よく基
準円Cを決定することができ、検査に係る処理速度を向
上させることができる。
Therefore, even for an electronic component in which the tip ends of the leads are not aligned in a straight line, the reference circle can be calculated by a simple calculation process to detect the lead length abnormality. Also,
Since the calculated reference circle is evaluated and a highly accurate reference circle is selected to detect the lead length abnormality, the reliability of the inspection result can be improved. Further, the center of gravity G of the area where the lead tip exists is obtained, the area where the lead tip exists is equally divided into three from the center of gravity G, and the lead tip reference point is extracted from each of the equally divided areas. The reference circle C can be efficiently determined, and the processing speed related to the inspection can be improved.

【0055】なお、上述の第1、または第2の実施の形
態における記述は、本発明に係る好適な部品形状検査方
法の一例であり、これに限定されるものではない。例え
ば、本実施の形態においては、被試験電子部品がリード
端子である場合を例として説明を行ったが、BGA(Ba
ll Grid Array)等のボール端子であってもよい。その
他、本実施の形態における電子部品装着装置1、画像処
理装置15等の細部構成、及び詳細動作に関しても、本
発明の趣旨を逸脱しない範囲で適宜変更可能であること
はもちろんである。
The above description in the first or second embodiment is an example of a preferred component shape inspection method according to the present invention, and the present invention is not limited to this. For example, although the case where the electronic device under test is a lead terminal has been described as an example in the present embodiment, the BGA (Ba
ll Grid Array) or the like. In addition, it is needless to say that the detailed configurations and detailed operations of the electronic component mounting apparatus 1, the image processing apparatus 15 and the like according to the present embodiment can be appropriately changed without departing from the spirit of the present invention.

【0056】[0056]

【発明の効果】請求項1記載の発明によれば、対象物が
多様な形状であっても、対象物の形状を確定する数に対
応する被検査データを基準被検査データとして抽出し、
抽出した基準被検査データに基づいて、対象物の形状に
近似した図形を作成して、作成した図形が基準図形の条
件を満たしている場合に、この図形を基準図形として、
異常データの検出を行うことができるので、多様な形状
の対象物に対応した形状検査を容易に行うことができ
る。また、簡単な演算により対象物の形状検査を行うこ
とができるので、処理時間を短縮することができる。さ
らに、基準被検査データに基づいて作成した図形に所定
の数異常の被検査データが存在する場合に、作成した図
形を基準図形に決定するため、信頼性の高い基準図形に
基づいて異常データを検出することができ、検査結果の
精度を向上させることができる。
According to the first aspect of the present invention, even if the object has various shapes, the inspected data corresponding to the number that determines the shape of the object is extracted as the reference inspected data,
Based on the extracted reference inspection data, create a figure that approximates the shape of the object, and if the created figure satisfies the conditions of the reference figure, use this figure as the reference figure,
Since abnormal data can be detected, it is possible to easily perform a shape inspection corresponding to objects of various shapes. Moreover, since the shape of the object can be inspected by a simple calculation, the processing time can be shortened. Furthermore, if a predetermined number of inspected data exist in the figure created based on the reference inspected data, the created figure is determined as the reference figure. Therefore, the abnormal data is determined based on the highly reliable reference figure. It can be detected, and the accuracy of the inspection result can be improved.

【0057】請求項2記載の発明によれば、検出された
位置データから任意の2点を抽出して、抽出した2点を
通過する直線を算出し、算出した直線上に存在する位置
データの数が所定値以上であった場合に、算出した直線
を基準直線に決定するため、基準直線の信頼性を向上さ
せることができる。また、簡単な演算により基準直線を
決定することができるので、処理速度を向上させること
ができる。
According to the second aspect of the invention, two arbitrary points are extracted from the detected position data, a straight line passing through the two extracted points is calculated, and the position data existing on the calculated straight line is calculated. When the number is equal to or larger than the predetermined value, the calculated straight line is determined as the reference straight line, so that the reliability of the reference straight line can be improved. Moreover, since the reference straight line can be determined by a simple calculation, the processing speed can be improved.

【0058】請求項3記載の発明によれば、信頼性の高
い基準直線に基づいて、確実に異常データを検出するこ
とができ、検査結果の精度を向上させることができる。
According to the third aspect of the present invention, the abnormal data can be reliably detected based on the highly reliable reference line, and the accuracy of the inspection result can be improved.

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

【図1】本発明を適用した実施の形態における電子部品
装着装置1の概略構成を示す図である。
FIG. 1 is a diagram showing a schematic configuration of an electronic component mounting apparatus 1 according to an embodiment of the present invention.

【図2】図1の画像処理装置15の備えるCPU151
により実行される形状検査処理を示すフローチャートで
ある。
2 is a CPU 151 included in the image processing apparatus 15 of FIG.
It is a flowchart which shows the shape inspection process performed by.

【図3】CPU151により実行される形状検査処理に
おいて決定される基準直線Lを例示した図である。
FIG. 3 is a diagram exemplifying a reference straight line L determined in a shape inspection process executed by a CPU 151.

【図4】第1の実施の形態におけるリード先端基準点を
抽出するための組み合わせ順の一例を示す図表である。
FIG. 4 is a chart showing an example of a combination order for extracting a lead tip reference point in the first embodiment.

【図5】第2の実施の形態においてCPU151により
実行さえる形状検査処理(2)を示すフローチャートで
ある。
FIG. 5 is a flow chart showing a shape inspection process (2) executed by a CPU 151 in the second embodiment.

【図6】形状検査処理において基準円Cが決定される流
れを示す図である。
FIG. 6 is a diagram showing a flow of determining a reference circle C in the shape inspection process.

【図7】第2の実施の形態におけるリード先端基準点を
抽出するための組み合わせ順の一例を示す図表である。
FIG. 7 is a chart showing an example of a combination order for extracting a lead tip reference point in the second embodiment.

【図8】リードが直線状にならぶ電子部品における従来
の形状検査方法を示す図である。
FIG. 8 is a diagram showing a conventional shape inspection method for an electronic component in which leads are linearly arranged.

【図9】リードが傾いて並ぶ電子部品における従来の形
状検査方法により求められる基準直線Lを示す図であ
る。
FIG. 9 is a diagram showing a reference straight line L obtained by a conventional shape inspection method for electronic components in which leads are inclined and arranged.

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

1 電子部品装着装置 11 吸着ノズル 12 光源 13 レンズ 14 撮像装置 15 画像処理装置 151 CPU 152 メモリ 153 A/D変換回路 154 D/A変換回路 16 表示部 2 電子部品 1 Electronic component mounting device 11 Suction nozzle 12 light sources 13 lenses 14 Imaging device 15 Image processing device 151 CPU 152 memory 153 A / D conversion circuit 154 D / A conversion circuit 16 Display 2 electronic components

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI テーマコート゛(参考) G06T 7/60 180 G01B 11/24 K Fターム(参考) 2F065 AA03 AA16 AA17 AA20 CC01 CC25 DD06 FF04 JJ03 JJ26 QQ03 QQ21 QQ24 QQ25 QQ28 QQ31 QQ51 RR06 2G051 AA61 AA65 AB02 CA03 CB01 DA01 EA11 EA12 EB01 5B057 AA03 CA16 CB16 CC01 DA03 DA07 DB02 DC05 DC06 DC09 5L096 BA03 BA18 CA02 DA02 FA09 FA66 FA69 ─────────────────────────────────────────────────── ─── Continuation of front page (51) Int.Cl. 7 Identification code FI theme code (reference) G06T 7/60 180 G01B 11/24 K F term (reference) 2F065 AA03 AA16 AA17 AA20 CC01 CC25 DD06 FF04 JJ03 JJ26 QQ03 QQ21 QQ24 QQ25 QQ28 QQ31 QQ51 RR06 2G051 AA61 AA65 AB02 CA03 CB01 DA01 EA11 EA12 EB01 5B057 AA03 CA16 CB16 CC01 DA03 DA07 DB02 DC05 DC06 DC09 5L096 BA03 BA18 CA02 DA02 FA09 FA66 FA69

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】対象物を撮像し、撮像した対象物の画像か
ら被検査データを抽出することにより対象物の形状を認
識して、当該対象物の形状の異常を検出する部品形状検
査方法において、 前記対象物の形状を確定するために必要な数に応じて前
記被検査データから基準被検査データを抽出し、 抽出した基準被検査データに基づいて前記対象物の形状
と近似した図形を作成し、 作成した図形上に所定の数以上の被検査データが存在す
る場合に、当該作成した図形を基準図形に決定し、 決定した基準図形からの離間距離が所定値を超える被検
査データを異常データとして検出する、 ことを特徴とする部品形状検査方法。
1. A component shape inspection method for recognizing a shape of an object by detecting an image of the object and extracting data to be inspected from an image of the imaged object to detect an abnormality in the shape of the object. , The reference inspection data is extracted from the inspection data according to the number necessary to determine the shape of the object, and the figure approximate to the shape of the object is created based on the extracted reference inspection data. However, when there are more than a specified number of data to be inspected on the created figure, the created figure is determined as the reference figure, and the inspected data whose distance from the determined reference figure exceeds the specified value is abnormal. A part shape inspection method characterized by detecting as data.
【請求項2】リード端子を備える部品を撮像し、撮像し
た部品の画像からリード端子の先端の位置データを検出
する部品形状検査装置において、 検出された位置データの中から基準位置データとなる2
点を抽出する基準位置データ抽出手段と、 前記基準位置データ抽出手段により抽出された2点を通
過する直線を算出する直線算出手段と、 前記直線算出手段により算出された直線上に所定の数以
上の位置データが存在するか否かを判別する判別手段
と、 前記判別手段により前記直線上に所定の数以上の位置デ
ータが存在すると判別された場合に、当該直線を基準直
線に決定する決定手段と、 を備えることを特徴とする部品形状検査装置。
2. A component shape inspection device for imaging a component having lead terminals, and detecting the position data of the tip of the lead terminal from the image of the captured component, which becomes reference position data from the detected position data.
Reference position data extracting means for extracting points, straight line calculating means for calculating a straight line passing through the two points extracted by the reference position data extracting means, and a predetermined number or more on the straight line calculated by the straight line calculating means Discriminating means for discriminating whether or not the position data exists, and determining means for deciding the straight line as a reference straight line when it is discriminated by the discriminating means that a predetermined number or more of the position data exist on the straight line. And a component shape inspection device comprising:
【請求項3】前記決定手段により決定された基準直線
と、前記リード端子の先端の位置データとに基づいて、
基準直線からリード端子の先端までの離間距離を算出し
て、当該離間距離が所定の値以上であった場合に、当該
リード端子の先端の位置データを異常データとして検出
する検出手段をさらに備えることを特徴とする請求項2
記載の部品形状検査装置。
3. Based on the reference straight line determined by the determining means and the position data of the tip of the lead terminal,
The method further includes a detection unit that calculates a distance from the reference straight line to the tip of the lead terminal and detects position data of the tip of the lead terminal as abnormal data when the distance is equal to or more than a predetermined value. 3. The method according to claim 2,
The described device shape inspection device.
JP2001219940A 2001-07-19 2001-07-19 Method and device for parts shape testing Pending JP2003035523A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001219940A JP2003035523A (en) 2001-07-19 2001-07-19 Method and device for parts shape testing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001219940A JP2003035523A (en) 2001-07-19 2001-07-19 Method and device for parts shape testing

Publications (1)

Publication Number Publication Date
JP2003035523A true JP2003035523A (en) 2003-02-07

Family

ID=19053844

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001219940A Pending JP2003035523A (en) 2001-07-19 2001-07-19 Method and device for parts shape testing

Country Status (1)

Country Link
JP (1) JP2003035523A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100786893B1 (en) * 2003-12-22 2007-12-17 지멘스 악티엔게젤샤프트 Method, telecommunications system and telecommunications handset for wireless communication and telecommunication in a ?smart home? environment
JP2009145208A (en) * 2007-12-14 2009-07-02 National Institute Of Advanced Industrial & Technology Method and device for measuring height

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0429007A (en) * 1990-05-25 1992-01-31 Juki Corp Optical inspection device
JPH07320060A (en) * 1994-05-27 1995-12-08 Meidensha Corp Method for approximation to circle and arc
JPH08228096A (en) * 1995-02-21 1996-09-03 Juki Corp Detecting method for ic position
JPH0914931A (en) * 1995-06-27 1997-01-17 Matsushita Electric Works Ltd Optical displacement measuring device
JPH1097620A (en) * 1996-09-20 1998-04-14 Meidensha Corp Method for approximating circle or circular arc

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0429007A (en) * 1990-05-25 1992-01-31 Juki Corp Optical inspection device
JPH07320060A (en) * 1994-05-27 1995-12-08 Meidensha Corp Method for approximation to circle and arc
JPH08228096A (en) * 1995-02-21 1996-09-03 Juki Corp Detecting method for ic position
JPH0914931A (en) * 1995-06-27 1997-01-17 Matsushita Electric Works Ltd Optical displacement measuring device
JPH1097620A (en) * 1996-09-20 1998-04-14 Meidensha Corp Method for approximating circle or circular arc

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100786893B1 (en) * 2003-12-22 2007-12-17 지멘스 악티엔게젤샤프트 Method, telecommunications system and telecommunications handset for wireless communication and telecommunication in a ?smart home? environment
JP2009145208A (en) * 2007-12-14 2009-07-02 National Institute Of Advanced Industrial & Technology Method and device for measuring height

Similar Documents

Publication Publication Date Title
JP5061543B2 (en) Printed matter inspection device, printed matter inspection method
JP2004340832A (en) Method and system for visual inspection of circuit board
JP5045591B2 (en) Method for creating area setting data for inspection area and board appearance inspection apparatus
US20020051570A1 (en) Apparatus and method of determining image processing parameter, and recording medium recording a program for the same
JPH08136235A (en) Method for detecting pattern
JP2003035523A (en) Method and device for parts shape testing
KR101126759B1 (en) Method of teaching for electronic parts information in chip mounter
JP3123275B2 (en) Inspection data creation method for electronic parts shortage inspection
JP2002190021A (en) Device and method for detecting position
JP4744234B2 (en) Component positioning method and apparatus
CN114441554B (en) Detection method
JPH09178427A (en) Image position measuring method
CN117571721B (en) Method and device for detecting surface defects of circuit board bonding pad and storage medium
JPH07213491A (en) Cornea endothelial cell density measuring device
JP3342171B2 (en) Component position recognition method and position recognition device
JP3111434B2 (en) Image processing device
JP4150262B2 (en) Component recognition method and apparatus
JP2006112930A (en) Object-shape discriminating method and apparatus
CN111539933B (en) Direct-insert element detection method and system
JP3041056B2 (en) Semiconductor pellet detection method
JP4317402B2 (en) Mounting component inspection method
JP2506673B2 (en) Electronic component lead recognition device
KR19990087848A (en) Inspection Region Preparing Method and Visual Inspection Method
JPH11120355A (en) Image processing method
JP2545570B2 (en) Inclination inspection method for connecting lines by image processing

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080715

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101014

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110104

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110426