JP2013065809A - Inspection device, inspection method, and inspection program - Google Patents

Inspection device, inspection method, and inspection program Download PDF

Info

Publication number
JP2013065809A
JP2013065809A JP2012044623A JP2012044623A JP2013065809A JP 2013065809 A JP2013065809 A JP 2013065809A JP 2012044623 A JP2012044623 A JP 2012044623A JP 2012044623 A JP2012044623 A JP 2012044623A JP 2013065809 A JP2013065809 A JP 2013065809A
Authority
JP
Japan
Prior art keywords
image
unit
images
inspection
partial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012044623A
Other languages
Japanese (ja)
Other versions
JP6115012B2 (en
Inventor
Hiroaki Okamoto
浩明 岡本
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2012044623A priority Critical patent/JP6115012B2/en
Publication of JP2013065809A publication Critical patent/JP2013065809A/en
Application granted granted Critical
Publication of JP6115012B2 publication Critical patent/JP6115012B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To properly determine the quality of solder mounting without setting an inspection parameter for each insection object.SOLUTION: An inspection device includes: an extraction part which extracts multiple partial images including solder joining parts from an image including the multiple solder joining parts; a creation part which creates a reference image serving as reference for determining the quality of the mounting of the solder joining part using the multiple partial images extracted by the extraction part; a comparison part for comparing each partial image with the reference image created by the creation part; and a determination part for determining the quality of the mounting of each solder joining part on the basis of the comparison result of the comparison part.

Description

本発明は、半田付けの実装の良否を検査する検査装置、検査方法及び検査プログラムに関する。   The present invention relates to an inspection apparatus, an inspection method, and an inspection program for inspecting the quality of soldering mounting.

プリント基板の実装検査において、現在、自動検査を行った後に、NG候補については人が目視検査を行っている。総合的な正確さや信頼性の点で、人の目の性能がまだ自動検査を上回っているからである。   In mounting inspection of a printed circuit board, currently, after performing an automatic inspection, a person is visually inspecting an NG candidate. This is because, in terms of overall accuracy and reliability, the performance of the human eye still exceeds automatic inspection.

しかし、人による目視検査では、見逃しが生じる、検査基準にばらつきが出る、人件費がかかる、といった問題があり、より一層の自動化が求められている。   However, in the visual inspection by humans, there are problems such as oversight, variations in inspection standards, and labor costs, and further automation is required.

プリント基板の実装検査においては、部品の取り付け位置や姿勢だけではなく、半田付けの状態が正常か不良かの検査が必要である。半田の接合状態が悪い場合、後になって製品の不具合となって現れる恐れがある。半田の接合状態は、半田フィレットの形状や濡れの具合により、外観で判断することができる。   In the mounting inspection of the printed circuit board, it is necessary to inspect whether the soldering state is normal or defective as well as the mounting position and orientation of the components. If the solder joint state is poor, it may appear as a product defect later. The solder bonding state can be determined by the appearance based on the shape and wetness of the solder fillet.

プリント基板の実装部品の中でも、多ピンのコネクタ類は目視検査への依存度が高い。狭ピッチでリードの数が多く、検査すべきポイントが多数集中しているためである。また、リードの形状などが様々で、特定の検査基準を適用し難く、個別のティーチングが必要になる。   Among printed circuit board components, multi-pin connectors are highly dependent on visual inspection. This is because the number of leads is narrow and the number of points to be inspected is concentrated. In addition, the shape of the lead is various, it is difficult to apply a specific inspection standard, and individual teaching is required.

そのため、ティーチングの手間を増やすことなく、このようなコネクタ類の自動検査の精度を高めて、目視検査の作業量を減らすことが特に要求されている。   Therefore, it is particularly required to increase the accuracy of such automatic inspection of connectors and reduce the amount of visual inspection work without increasing the teaching effort.

半田接合部の外観検査は、複雑な立体形状の半田フィレット表面が金属反射をして画像に映るため、プリント基板の実装検査の中でも特に難しい検査である。構造照明を用いることで光沢の問題を避ける方式も用いられているが、構造パターンが照射されている部分の立体形状しか分からない上、装置が複雑になってコスト増となり易い。   The appearance inspection of the solder joint portion is a particularly difficult inspection among the mounting inspections of the printed circuit board because the surface of the solder fillet having a complicated three-dimensional shape reflects the metal and appears on the image. A method of avoiding the problem of gloss by using structured illumination is also used, but only the three-dimensional shape of the portion irradiated with the structure pattern is known, and the apparatus becomes complicated and the cost is likely to increase.

ここで、従来の半田付けの状態を検査する技術としては、カラーハイライト方式がある。このカラーハイライト方式に関し、例えば、部品の実装位置が正常な良品画像及び実装位置が正常でない不良品画像を用いて検査用のパラメータの1つである色条件を自動生成する技術がある。   Here, as a conventional technique for inspecting the soldering state, there is a color highlight method. Regarding this color highlight method, for example, there is a technique of automatically generating a color condition, which is one of inspection parameters, using a non-defective product image with a normal component mounting position and a defective product image with a non-normal mounting position.

また、他の検査技術としては、複数の同一パターンの半田付け部のうち、ある半田付け部形状を示す情報と、他の半田付け部の形状を示す情報とを比較することで半田付け状態の良否を判定する技術がある。   Further, as another inspection technique, among a plurality of soldering portions having the same pattern, information indicating the shape of a certain soldering portion is compared with information indicating the shape of another soldering portion. There is a technique for judging pass / fail.

特開2006−86451号公報JP 2006-86451 A 特開2008−191106号公報JP 2008-191106 A

しかしながら、従来のカラーライト方式では、良品と不良品との実装部品の画像をそれぞれ記憶するDB(Data Base)を用意する必要がある。そのため、新規の部品が増えれば、その部品用のDBを用意する必要があり、検査対象の部品毎に検査パラメータを変えなければならなかった。また、他の検査技術では、良否判定が、比較の基となる所定の半田付け部形状に大きく依存するため、適切に半田付けの実装の良否を判定することができているとは言えない。   However, in the conventional color light system, it is necessary to prepare a DB (Data Base) for storing images of mounted parts of non-defective products and defective products. Therefore, if new parts increase, it is necessary to prepare a DB for the parts, and the inspection parameters must be changed for each part to be inspected. In other inspection techniques, it can not be said that the quality of soldering mounting can be properly judged because the quality judgment largely depends on the shape of a predetermined soldering portion as a basis for comparison.

よって、検査対象毎に検査パラメータを設定する必要がなく、半田付けの実装の良否を適切に判定することができる技術が求められている。   Therefore, there is a need for a technique that can appropriately determine the quality of soldering mounting without setting inspection parameters for each inspection target.

そこで、開示の技術では、検査対象毎に検査パラメータを設定する必要がなく、半田付けの実装の良否を適切に判定することができる検査装置、検査方法及び検査プログラムを提供することを目的とする。   Accordingly, the disclosed technique has an object to provide an inspection apparatus, an inspection method, and an inspection program that can appropriately determine whether soldering is mounted or not without setting inspection parameters for each inspection object. .

開示の一態様における検査装置は、複数の半田接合部を含む画像から、前記半田接合部を含む部分画像を複数抽出する抽出部と、前記抽出部により抽出された複数の部分画像を用いて、前記半田接合部の実装の良否を判定する基準となる基準画像を作成する作成部と、前記作成部により作成された基準画像と各部分画像とを比較する比較部と、前記比較部による比較結果に基づき、各半田接合部の実装の良否を判定する判定部と、を備える。   The inspection apparatus according to an aspect of the disclosure uses an extraction unit that extracts a plurality of partial images including the solder joints from an image including a plurality of solder joints, and a plurality of partial images extracted by the extraction unit, A creation unit that creates a reference image that serves as a reference for determining whether or not the solder joint is mounted, a comparison unit that compares the reference image created by the creation unit with each partial image, and a comparison result by the comparison unit And a determination unit that determines whether each solder joint is mounted or not.

開示の技術によれば、検査対象毎に検査パラメータを設定する必要がなく、半田付けの実装の良否を適切に判定することができる。   According to the disclosed technique, it is not necessary to set an inspection parameter for each inspection target, and it is possible to appropriately determine whether soldering is mounted or not.

実施例1における検査装置のハードウェアの一例を示すブロック図。FIG. 2 is a block diagram illustrating an example of hardware of the inspection apparatus according to the first embodiment. 実施例1における検査装置の機能の一例を示すブロック図。FIG. 2 is a block diagram illustrating an example of functions of the inspection apparatus according to the first embodiment. 検査対象の一例を示す図。The figure which shows an example of a test object. 良否判定の処理概要を説明するための図。The figure for demonstrating the process outline | summary of a quality determination. リード間隔の検出を説明するための図。The figure for demonstrating the detection of a lead space | interval. 輝度差のヒストグラムを示す図。The figure which shows the histogram of a brightness | luminance difference. 部分画像の抽出を説明するための図。The figure for demonstrating extraction of a partial image. 基準画像の作成方法を説明するための図。The figure for demonstrating the production method of a reference | standard image. 基準画像と各部分画像との相関値を示す図。The figure which shows the correlation value of a reference | standard image and each partial image. 実施例1における検査処理の一例を示すフローチャート。3 is a flowchart illustrating an example of inspection processing according to the first embodiment. 実施例1における部分画像の抽出処理の一例を示すフローチャート。5 is a flowchart illustrating an example of partial image extraction processing according to the first exemplary embodiment. 実施例1における基準画像の作成処理(方法1)の一例を示すフローチャート。5 is a flowchart illustrating an example of a reference image creation process (method 1) according to the first exemplary embodiment. 実施例1における基準画像の作成処理(方法2)の一例を示すフローチャート。6 is a flowchart illustrating an example of a reference image creation process (method 2) according to the first exemplary embodiment. 実施例1における基準画像の作成処理(方法3)の一例を示すフローチャート。9 is a flowchart illustrating an example of a reference image creation process (method 3) according to the first exemplary embodiment. 実施例2における検査装置のハードウェアの一例を示すブロック図。FIG. 9 is a block diagram illustrating an example of hardware of an inspection apparatus according to a second embodiment. 実施例2における検査装置の機能の一例を示すブロック図。FIG. 9 is a block diagram illustrating an example of functions of an inspection apparatus according to a second embodiment. 撮像部と照明機器との位置関係の一例を示す図。The figure which shows an example of the positional relationship of an imaging part and lighting equipment. 各検査画像から生成される各基準画像の一例を示す図。The figure which shows an example of each reference | standard image produced | generated from each test | inspection image. 実施例2における検査処理の一例を示すフローチャート。10 is a flowchart illustrating an example of inspection processing according to the second embodiment. 実施例3における検査装置の機能の一例を示すブロック図。FIG. 9 is a block diagram illustrating an example of functions of an inspection apparatus according to a third embodiment. ステレオマッチングに基づき視差検出を説明するための図。The figure for demonstrating parallax detection based on a stereo matching. 視差に基づくリード高さの計測を説明するための図。The figure for demonstrating the measurement of the lead height based on parallax. 半田の良否判定を説明するための図。The figure for demonstrating the quality determination of solder. リードの高さに基づく良否判定を説明するための図。The figure for demonstrating the quality determination based on the height of a lead. 実施例3における検査処理の一例を示すフローチャート。10 is a flowchart illustrating an example of inspection processing according to the third embodiment. 部分画像領域共通化(その1)の場合の処理概要を説明するための図。The figure for demonstrating the process outline | summary in the case of partial image area sharing (the 1). 部分画像領域共通化(その2)の場合の処理概要を説明するための図。The figure for demonstrating the process outline | summary in the case of partial image area sharing (the 2). 実施例4における抽出部の機能の一例を示すブロック図。FIG. 10 is a block diagram illustrating an example of functions of an extraction unit according to a fourth embodiment. 共通リード間隔の検出を説明するための図。The figure for demonstrating the detection of a common lead space | interval. リード間隔の処理効率化を説明するための図。The figure for demonstrating the processing efficiency improvement of a read space | interval. 金具部分を含む検査画像の一例を示す図。The figure which shows an example of the test | inspection image containing a metal fitting part. 共通部分画像領域の垂直範囲を検出するための図。The figure for detecting the perpendicular range of a common partial image area. 実施例4における検査処理の一例を示すフローチャート。10 is a flowchart illustrating an example of inspection processing according to the fourth embodiment. 実施例4における共通部分画像領域の検出処理の一例を示すフローチャート。10 is a flowchart illustrating an example of common partial image region detection processing according to the fourth embodiment.

以下、各実施例について、添付図面を参照しながら説明する。   Each embodiment will be described below with reference to the accompanying drawings.

[実施例1]
<ハードウェア>
図1は、実施例1における検査装置10のハードウェアの一例を示すブロック図である。図1に示す例では、検査装置10は、照明機器11、撮像部12、表示部13と接続される。
[Example 1]
<Hardware>
FIG. 1 is a block diagram illustrating an example of hardware of the inspection apparatus 10 according to the first embodiment. In the example illustrated in FIG. 1, the inspection apparatus 10 is connected to the illumination device 11, the imaging unit 12, and the display unit 13.

照明機器11は、例えば発行素子を有し、検査対象を照明する機器である。撮像部12は、例えばカメラなどの撮像素子を有する装置である。撮像部12は、検査対象を撮像し、例えばモノクロ画像を生成する。表示部12は、例えばCRT(Cathode Ray Tube)やLCD(Liquid Crystal Display)等であり、検査装置10から取得した検査結果を表示する。   The illumination device 11 is a device that has, for example, an issuing element and illuminates the inspection target. The imaging unit 12 is a device having an imaging element such as a camera. The imaging unit 12 captures an inspection target and generates, for example, a monochrome image. The display unit 12 is, for example, a CRT (Cathode Ray Tube), an LCD (Liquid Crystal Display), or the like, and displays the inspection result acquired from the inspection apparatus 10.

図1に示す検査装置10は、制御部101、主記憶部102、補助記憶部103、通信部104、ドライブ装置105を有する。各部は、バスを介して相互にデータ送受信可能に接続されている。   An inspection apparatus 10 illustrated in FIG. 1 includes a control unit 101, a main storage unit 102, an auxiliary storage unit 103, a communication unit 104, and a drive device 105. Each unit is connected via a bus so that data can be transmitted / received to / from each other.

制御部101は、コンピュータの中で、各装置の制御やデータの演算、加工を行うCPU(Central Processing Unit)である。また、制御部101は、主記憶部102や補助記憶部103に記憶されたプログラムを実行する演算装置であり、入力装置や記憶装置からデータを受け取り、演算、加工した上で、出力装置や記憶装置に出力する。   The control unit 101 is a CPU (Central Processing Unit) that performs control of each device, calculation of data, and processing in a computer. The control unit 101 is an arithmetic device that executes a program stored in the main storage unit 102 or the auxiliary storage unit 103. The control unit 101 receives data from the input device or the storage device, calculates, processes the output device, the storage device, and the like. Output to the device.

主記憶部102は、例えば、ROM(Read Only Memory)やRAM(Random Access Memory)などである。主記憶部102は、制御部101が実行する基本ソフトウェアであるOSやアプリケーションソフトウェアなどのプログラムやデータを記憶又は一時保存する記憶装置である。   The main storage unit 102 is, for example, a ROM (Read Only Memory) or a RAM (Random Access Memory). The main storage unit 102 is a storage device that stores or temporarily stores programs and data such as an OS and application software that are basic software executed by the control unit 101.

補助記憶部103は、例えばHDD(Hard Disk Drive)などであり、アプリケーションソフトウェアなどに関連するデータを記憶する記憶装置である。補助記憶部103は、例えば撮像部12から取得した画像を記憶する。   The auxiliary storage unit 103 is, for example, an HDD (Hard Disk Drive) or the like, and is a storage device that stores data related to application software. For example, the auxiliary storage unit 103 stores an image acquired from the imaging unit 12.

通信部104は、有線又は無線で周辺機器とデータ通信を行う。通信部104は、例えばネットワークを介して、文字を含む画像を取得し、補助記憶部103に記憶する。   The communication unit 104 performs data communication with peripheral devices by wire or wireless. The communication unit 104 acquires an image including characters via a network, for example, and stores it in the auxiliary storage unit 103.

ドライブ装置105は、記録媒体106、例えばフレキシブルディスクやCD(Compact Disc)から所定のプログラムを読み出し、記憶装置にインストールする。   The drive device 105 reads a predetermined program from the recording medium 106, for example, a flexible disk or a CD (Compact Disc), and installs it in the storage device.

また、記録媒体106に、所定のプログラムを格納し、この記録媒体106に格納されたプログラムは、ドライブ装置105を介して検査装置10にインストールされる。インストールされた所定のプログラムは、検査装置10により実行可能となる。   A predetermined program is stored in the recording medium 106, and the program stored in the recording medium 106 is installed in the inspection apparatus 10 via the drive device 105. The installed predetermined program can be executed by the inspection apparatus 10.

なお、図1に示す検査装置10は、照明機器11、撮像部12及び表示部13を別構成としたが、いずれか一つ、又は複数を含む構成としてもよい。   In addition, although the inspection apparatus 10 illustrated in FIG. 1 has the illumination device 11, the imaging unit 12, and the display unit 13 as separate configurations, the inspection device 10 may include any one or a plurality of configurations.

<機能>
図2は、実施例1における検査装置10の機能の一例を示すブロック図である。図2に示す例では、検査装置10は、取得部201、画像処理部202、判定部203を有する。取得部201、画像処理部202及び判定部203は、例えば制御部101及びワークメモリとしての主記憶部102などにより実現されうる。
<Function>
FIG. 2 is a block diagram illustrating an example of functions of the inspection apparatus 10 according to the first embodiment. In the example illustrated in FIG. 2, the inspection apparatus 10 includes an acquisition unit 201, an image processing unit 202, and a determination unit 203. The acquisition unit 201, the image processing unit 202, and the determination unit 203 can be realized by, for example, the control unit 101 and the main storage unit 102 as a work memory.

取得部201は、撮像部12から、検査対象の半田接合部を複数含む画像を取得する。以下、この画像を検査画像と呼ぶ。半田接合部とは、リードに半田付けを行って形成された半田フィレットを含む部分をいう。取得部201は、取得した検査画像を画像処理部202に出力する。   The acquisition unit 201 acquires an image including a plurality of solder joints to be inspected from the imaging unit 12. Hereinafter, this image is referred to as an inspection image. The solder joint portion is a portion including a solder fillet formed by soldering a lead. The acquisition unit 201 outputs the acquired inspection image to the image processing unit 202.

画像処理部202は、取得部201から入力された検査画像に対し、画像処理を行って、各半田接合部の半田付けの状態又は形状の良否を判定するのに用いる画像を生成し、生成した画像から判定パラメータを算出する。以下、半田付けの状態又は形状の良否を、半田付けの実装の良否とも言う。判定パラメータは、半田接合部の実装の良否を判定するのに用いるパラメータをいい、例えば画像間の相関値である。   The image processing unit 202 performs image processing on the inspection image input from the acquisition unit 201 to generate and generate an image used to determine whether the soldering state or shape of each solder joint is good or not A determination parameter is calculated from the image. Hereinafter, the quality of the soldering state or shape is also referred to as the quality of soldering mounting. The determination parameter is a parameter used to determine whether the solder joint is mounted or not, and is, for example, a correlation value between images.

画像処理部202は、判定パラメータを算出するため、抽出部211、作成部212、記憶部213、比較部214を有する。   The image processing unit 202 includes an extraction unit 211, a creation unit 212, a storage unit 213, and a comparison unit 214 in order to calculate determination parameters.

抽出部211は、検査画像内に含まれるリードの間隔を検出し、リード間隔に基づいて、半田接合部を含む部分画像を抽出する。1つの部分画像は、1つの半田接合部を含む画像である。抽出部211は、抽出した複数の部分画像を作成部212に出力する。また、抽出部211は、記憶部213に対し、部分画像を抽出するためのデータをやり取りする。部分画像の具体的な抽出処理については後述する。   The extraction unit 211 detects the interval between the leads included in the inspection image, and extracts a partial image including the solder joint based on the lead interval. One partial image is an image including one solder joint. The extraction unit 211 outputs the extracted partial images to the creation unit 212. Further, the extraction unit 211 exchanges data for extracting partial images with the storage unit 213. Specific extraction processing of the partial image will be described later.

作成部212は、抽出部211から取得した複数の部分画像を用いて、半田付けの実装の良否判定に用いる基準画像を作成する。基準画像は、例えば、複数の部分画像の平均画像である。作成部212は、作成した基準画像を記憶部213に記憶し、比較部214に作成完了を通知する。基準画像の具体的な作成処理については後述する。   The creation unit 212 creates a reference image to be used for soldering mounting quality determination using a plurality of partial images acquired from the extraction unit 211. The reference image is, for example, an average image of a plurality of partial images. The creation unit 212 stores the created reference image in the storage unit 213 and notifies the comparison unit 214 of creation completion. Specific processing for creating the reference image will be described later.

記憶部213は、作成部212により作成された基準画像を記憶する。基準画像は作成部212により書き込まれ、比較部214により読み出される。   The storage unit 213 stores the reference image created by the creation unit 212. The reference image is written by the creation unit 212 and read by the comparison unit 214.

比較部214は、作成部212から基準画像の作成完了通知を受けると、記憶部213から基準画像を読み出す。比較部214は、取得した基準画像と、検査画像に含まれる各部分画像とを比較する。   Upon receiving the reference image creation completion notification from the creation unit 212, the comparison unit 214 reads the reference image from the storage unit 213. The comparison unit 214 compares the acquired reference image with each partial image included in the inspection image.

比較部214は、算出部221を有する。算出部221は、基準画像と検査画像の部分画像との相関値を算出する。算出部214は、この相関値を比較結果として判定部203に出力する。算出部221は、画像間の類似度を算出し、この類似度を比較結果としてもよい。   The comparison unit 214 includes a calculation unit 221. The calculation unit 221 calculates a correlation value between the reference image and the partial image of the inspection image. The calculation unit 214 outputs this correlation value to the determination unit 203 as a comparison result. The calculation unit 221 may calculate the similarity between images and use the similarity as a comparison result.

判定部203は、画像処理部202から基準画像と、検査画像内の部分画像との比較結果を取得すると、部分画像内の半田接合部の実装の良否を判定する。判定部203は、検査画像内の各部分画像に対し良否判定を行い、1つでも不良だと判定した場合には実装不良と判定する。   When the determination unit 203 obtains a comparison result between the reference image and the partial image in the inspection image from the image processing unit 202, the determination unit 203 determines whether the solder joint portion in the partial image is mounted. The determination unit 203 determines pass / fail for each partial image in the inspection image, and determines that the mounting is defective when it is determined that even one is defective.

判定部203は、例えば、取得した判定結果である相関値が閾値よりも小さい場合は不良であると判定する。閾値は、例えば0.85とし、この閾値は実験などにより適切な値が設定されればよい。判定部203は、判定結果を、表示部13に出力する。表示部13は、判定結果を表示する。   For example, when the correlation value that is the acquired determination result is smaller than the threshold value, the determination unit 203 determines that it is defective. The threshold value is set to 0.85, for example, and an appropriate value may be set as the threshold value through experiments or the like. The determination unit 203 outputs the determination result to the display unit 13. The display unit 13 displays the determination result.

<検査対象>
図3は、検査対象の一例を示す図である。図3に示す例では、基板23の表面に半導体集積回路20が実装される。実装された半導体集積回路20は例えば樹脂に覆われており、複数のリード21を備える。各リードは、基板23の表面に形成されるランドに半田付けされる。これにより、半田でリードとランドとが接合された部分を示す半田接合部22が形成される。半田接合部22は、例えば半田フィレットを有する。
<Inspection target>
FIG. 3 is a diagram illustrating an example of an inspection target. In the example shown in FIG. 3, the semiconductor integrated circuit 20 is mounted on the surface of the substrate 23. The mounted semiconductor integrated circuit 20 is covered with a resin, for example, and includes a plurality of leads 21. Each lead is soldered to a land formed on the surface of the substrate 23. As a result, a solder joint portion 22 is formed that indicates a portion where the lead and the land are joined by solder. The solder joint portion 22 has, for example, a solder fillet.

撮像部12は、図3に示すような複数のリードと半田接合部とを上方から撮像し、検査画像を生成する。   The imaging unit 12 images a plurality of leads and solder joints as shown in FIG. 3 from above, and generates an inspection image.

なお、図3に示す検査対象は一例であり、本実施例は、複数の半田接合部を有する検査対象物に適用可能であり、例えば、基板に表面実装された多ピン型コネクタの外観検査に適用可能である。   Note that the inspection object shown in FIG. 3 is an example, and the present embodiment is applicable to an inspection object having a plurality of solder joints, for example, for appearance inspection of a multi-pin connector surface-mounted on a substrate. Applicable.

<処理概要>
図4は、良否判定の処理概要を説明するための図である。図4に示す例では、検査画像30は、撮像部12により撮像された検査対象物を含む画像である。部分画像31は、リード21と半田接合部22とを含む矩形領域の画像である。基準画像32は、複数の部分画像を用いて作成された、半田付けの実装の良否判定を行う基準となる画像である。
<Process overview>
FIG. 4 is a diagram for explaining the outline of the pass / fail judgment process. In the example illustrated in FIG. 4, the inspection image 30 is an image including an inspection object imaged by the imaging unit 12. The partial image 31 is an image of a rectangular area including the lead 21 and the solder joint portion 22. The reference image 32 is an image that is created using a plurality of partial images and serves as a reference for determining whether soldering is mounted or not.

図4に示すように、半田付けの実装の良否判定が以下の手順で行われる。
(1)リード間隔検出
(2)部分画像抽出
(3)基準画像作成
(4)基準画像と部分画像との比較結果により良否判定
以下、(1)〜(4)の各処理について具体的に説明する。
As shown in FIG. 4, the quality determination of the soldering mounting is performed according to the following procedure.
(1) Lead interval detection (2) Partial image extraction (3) Reference image creation (4) Pass / fail judgment based on the comparison result between the reference image and the partial image Hereinafter, each process (1) to (4) will be specifically described. To do.

(1)リード間隔検出
半田フィレット部分及び半田が乗ったリード表面は、微妙に表面形状が異なる上に金属反射を起こすため、明るさの分布がそれぞれ少しずつ異なって映る。従って、抽出部211は、安定して求めることのできるリードの間隔を検出する。なお、以下の説明では、リードが水平方向に並んでいるとするが、垂直方向にリードが並んでいても水平と垂直とを逆にして同様の処理を行えばよい。
(1) Lead interval detection Since the solder fillet portion and the lead surface on which the solder is placed have slightly different surface shapes and cause metal reflection, the brightness distribution appears slightly different from each other. Therefore, the extraction unit 211 detects a lead interval that can be obtained stably. In the following description, it is assumed that the leads are arranged in the horizontal direction, but even if the leads are arranged in the vertical direction, the same processing may be performed by reversing the horizontal and vertical directions.

リード部分は明るく、それ以外の部分は暗く映るため、抽出部211は、明るい領域が水平に等間隔で並んでいる部分を探索してリード領域として抽出し、その明るい領域の繰返し周期をリード間隔として求める。   Since the lead portion is bright and the other portions appear dark, the extraction unit 211 searches for a portion where bright regions are arranged horizontally at equal intervals, extracts the lead region, and determines the repetition cycle of the bright region as the lead interval. Asking.

画素レベルで考えると、明るい画素同士の間隔、あるいは、暗い画素同士の間隔がリード間隔に相当するため、同じ輝度の画素がどれだけ離れているかによりリード間隔が求められる。但し、半田部分の輝度にはばらつきが大きく、個々の画素で見るとノイズが多いため、抽出部211は、様々な位置で様々な間隔の画素同士の輝度差を見ることにより、総合して正確なリード間隔を求める。   Considering at the pixel level, the interval between bright pixels or the interval between dark pixels corresponds to the read interval, and therefore the read interval is determined depending on how far the pixels having the same luminance are separated. However, since the brightness of the solder portion varies widely and there is a lot of noise when viewed from each pixel, the extraction unit 211 can accurately detect the brightness difference between pixels at various intervals at various positions. Find the correct lead interval.

図5は、リード間隔の検出を説明するための図である。図5に示すように、抽出部211は、水平ライン上で2つの画素を取り、その間隔(画素数)d、および、輝度の差ΔVを求める。例えば、水平方向の位置iの輝度値をVi、位置jの輝度値をVjとする。このとき、輝度差ΔVは、次の式(1)により求められる。
ΔV=|Vi−Vj| ・・・式(1)
画素の位置に関係なく、間隔dがリード間隔に近ければ輝度差ΔVはほぼゼロになり、dがリード間隔より半周期ずれている場合は輝度差が最も大きくなる。これを利用して、抽出部211は、画素のペアを色々と変えて、つまり、iとjとを変更して間隔d毎の輝度差ΔVを累積する。
FIG. 5 is a diagram for explaining the detection of the lead interval. As illustrated in FIG. 5, the extraction unit 211 takes two pixels on a horizontal line, and obtains an interval (number of pixels) d and a luminance difference ΔV. For example, the luminance value at the position i in the horizontal direction is Vi, and the luminance value at the position j is Vj. At this time, the luminance difference ΔV is obtained by the following equation (1).
ΔV = | Vi−Vj | Equation (1)
Regardless of the position of the pixel, if the distance d is close to the lead interval, the luminance difference ΔV becomes almost zero, and if d is shifted by a half cycle from the lead interval, the luminance difference becomes the largest. Using this, the extraction unit 211 changes the pixel pairs in various ways, that is, changes i and j, and accumulates the luminance difference ΔV for each interval d.

図6は、輝度差のヒストグラムを示す図である。図6に示すグラフは、抽出部211が輝度差ΔVを間隔d毎に累積した場合の輝度ヒストグラムの一例を示す。この輝度ヒストグラムの最初に現れる極小値がリードの間隔に対応する。   FIG. 6 is a diagram showing a histogram of luminance differences. The graph shown in FIG. 6 shows an example of a luminance histogram when the extraction unit 211 accumulates the luminance difference ΔV for each interval d. The minimum value appearing first in the luminance histogram corresponds to the lead interval.

間隔dの範囲を広げれば、リードの周期となるリード間隔の2倍、3倍に相当する極小値(d=m2,m3)が現れる。例えば、2倍のリード間隔に当たるm2を2で割ることにより、抽出部211は、サブピクセル精度で正確なリード間隔を得ることができる。例えば、m2が31画素の場合、m2/2=15.5となり、小数単位の画素でリード間隔を表すことができる。   If the range of the interval d is widened, a minimum value (d = m2, m3) corresponding to twice or three times the lead interval as the lead period appears. For example, by dividing m2 corresponding to a double read interval by 2, the extraction unit 211 can obtain an accurate read interval with subpixel accuracy. For example, when m2 is 31 pixels, m2 / 2 = 15.5, and the read interval can be expressed by a pixel in decimal units.

なお、図6に示すようなヒストグラムにこのような極大値と極小値が現れないような水平ライン上には、抽出部211は、コネクタのリードが存在していないものと判定する。リードの存在位置が不明の場合、抽出部211は、このような水平ラインを何箇所か設定し、リード間隔が正しく算出できる位置を見つける。   Note that the extraction unit 211 determines that there is no connector lead on a horizontal line where such a maximum value and minimum value do not appear in the histogram as shown in FIG. When the position of the lead is unknown, the extraction unit 211 sets several such horizontal lines and finds a position where the lead interval can be calculated correctly.

(2)部分画像抽出
抽出部211は、(1)の処理で求められたリード間隔を取得し、このリード間隔を用いて、リードの明るい領域を包含する矩形領域を部分画像として抽出する。矩形領域には、リードの一部と半田接合部とが含まれる。
(2) Partial Image Extraction The extraction unit 211 acquires the lead interval obtained in the process (1), and uses this lead interval to extract a rectangular region including a bright lead region as a partial image. The rectangular area includes a part of the lead and a solder joint.

図7は、部分画像の抽出を説明するための図である。図7(A)は、検査画像の一例を示す。図7に示す例では、抽出部211は、リード間隔が得られた水平ラインとそのリード間隔に基づいて、水平方向・垂直方向に検査画像を輝度積分する。これにより、リードが存在する部分で積分値が大きくなる。   FIG. 7 is a diagram for explaining extraction of partial images. FIG. 7A shows an example of an inspection image. In the example illustrated in FIG. 7, the extraction unit 211 performs luminance integration on the inspection image in the horizontal direction and the vertical direction based on the horizontal line from which the lead interval is obtained and the lead interval. As a result, the integral value increases in the portion where the lead exists.

ただし、垂直方向の積分結果にはノイズによる凸凹が含まれており、平滑化しても必ずしもピークが均等な間隔で並ぶとは限らない。しかし、一つ一つのピーク位置はばらついても、全てのリードを足し合わせれば、リードの中心部分でピークとなることが期待できる。   However, the integration result in the vertical direction includes irregularities due to noise, and even if smoothing is performed, the peaks are not necessarily arranged at equal intervals. However, even if the peak positions vary, it can be expected that if all the leads are added together, the peak will be at the center of the lead.

図7(B)は、検査画像の輝度を垂直方向に積分した積分値を示す。抽出部211は、図7(B)に示す所定の始点X0からリード間隔mの距離ずつ水平方向にシフトした積分値をそれぞれ加算する。抽出部211は、この加算をX0からmまで1画素ずつずらして行う。図7(C)は、間隔m毎の累積積分値を示すグラフである。図7(C)は、始点X0から間隔m毎に切り取った積分値を重ね合わせたグラフでもある。図7(C)に示すグラフのピーク値(極大値)を取る位置をX0maxとする。   FIG. 7B shows an integrated value obtained by integrating the luminance of the inspection image in the vertical direction. The extraction unit 211 adds the integral values shifted in the horizontal direction by the distance of the lead interval m from the predetermined start point X0 shown in FIG. The extraction unit 211 performs this addition by shifting one pixel at a time from X0 to m. FIG. 7C is a graph showing the cumulative integral value for each interval m. FIG. 7C is also a graph in which integrated values cut out from the starting point X0 at intervals m are superimposed. A position where the peak value (maximum value) in the graph shown in FIG.

抽出部211は、X0maxの位置を、リードの中心位置に決定する。抽出部211は、リードの中心位置が決まれば、その左右両側の所定範囲tを部分画像の横幅とする。図7(D)は、水平方向の部分画像の所定範囲tを示す。所定範囲tは、例えば、ピークの位置から左右に所定の長さ分と設定しておけばよい。また、所定範囲tは、垂直方向の輝度積分値のピーク値と極小値との間の長さに基づいて設定されてもよい。   The extraction unit 211 determines the position of X0max as the center position of the lead. When the center position of the lead is determined, the extraction unit 211 sets the predetermined range t on the left and right sides as the horizontal width of the partial image. FIG. 7D shows a predetermined range t of the partial image in the horizontal direction. For example, the predetermined range t may be set to a predetermined length from the peak position to the left and right. The predetermined range t may be set based on the length between the peak value and minimum value of the luminance integrated value in the vertical direction.

図7(E)は、検査画像の輝度を水平方向に積分した積分値を示す。抽出部211は、例えば、積分値が閾値を超える部分を、半田接合部がある画像の下方向に所定値だけずらして垂直方向の所定範囲sを決定する。   FIG. 7E shows an integrated value obtained by integrating the luminance of the inspection image in the horizontal direction. For example, the extraction unit 211 determines a predetermined range s in the vertical direction by shifting a portion where the integral value exceeds a threshold value by a predetermined value in the downward direction of the image with the solder joint.

抽出部211は、水平方向の所定範囲tと垂直方向の所定範囲sとに基づき矩形領域の部分画像を複数抽出する。抽出部211は、例えば、リードの中心位置からリード間隔mずつ離れた部分画像を複数抽出する。   The extraction unit 211 extracts a plurality of partial images of the rectangular area based on the predetermined range t in the horizontal direction and the predetermined range s in the vertical direction. For example, the extraction unit 211 extracts a plurality of partial images that are separated from the center position of the lead by a lead interval m.

(3)基準画像作成
作成部212は、抽出部211から取得した複数の部分画像を用いて、半田付けの実装の良否を判定する基準となる基準画像を作成する。ここでは、3通りの作成方法について説明する。
(3) Creation of Reference Image The creation unit 212 creates a reference image that serves as a reference for determining whether soldering is mounted or not using a plurality of partial images acquired from the extraction unit 211. Here, three creation methods will be described.

なお、作成部212は、基準画像の作成時に、不良の疑いのある部分画像を含めると基準画像の質が低下する。従って、作成部212は、不良の疑いがある部分画像は除外して基準画像を作成する。不良の疑いがある部分画像は、部分画像同士の相関値などを用いて検出すればよい。作成部212は、例えば、テンプレートマッチング又はパターンマッチングした位置の部分画像同士を加算平均することによって、基準画像を作成する。基準画像は、後述する良否判定のテンプレートマッチングにおいて、基準のテンプレートとなる。   Note that, when the creation unit 212 includes a partial image that is suspected of being defective when creating the reference image, the quality of the reference image is degraded. Accordingly, the creation unit 212 creates a reference image by excluding partial images that are suspected of being defective. A partial image suspected of being defective may be detected using a correlation value between the partial images. The creation unit 212 creates a reference image by, for example, averaging the partial images at the positions where template matching or pattern matching is performed. The reference image becomes a reference template in the template matching for quality determination described later.

(方法1)
作成部212は、部分画像の特定の1つ(ここでは左端)を基準として、他の部分画像とのテンプレートマッチング処理を行い、その位置と相関値を求める。処理時間は3つの方法の中では一番少ない。作成部212は、基準とした部分画像のみが不良だった場合、他の部分画像との相関値は全て低くなるため、基準とした部分画像が不良と判定することができる。
(Method 1)
The creation unit 212 performs template matching processing with another partial image on the basis of a specific one of the partial images (here, the left end), and obtains the position and the correlation value. Processing time is the shortest of the three methods. If only the reference partial image is defective, the creation unit 212 can determine that the reference partial image is defective because the correlation values with other partial images are all low.

具体的な処理としては、作成部212は、各部分画像について、左端の部分画像との相関値を調べ、所定の閾値以上であれば、基準画像として平均をとる。この時、作成部212は、相関値が所定の閾値以下のものは基準画像には加算しない。所定の閾値は、例えば0.85とするが、実験などにより適切な値が設定されればよい。   As a specific process, the creation unit 212 examines the correlation value of each partial image with the leftmost partial image, and if it is equal to or greater than a predetermined threshold, takes an average as the reference image. At this time, the creation unit 212 does not add a correlation value equal to or lower than a predetermined threshold to the reference image. The predetermined threshold is, for example, 0.85, but an appropriate value may be set by experiment or the like.

これは、不良あるいは不良の疑いのある部分画像を基準画像に混ぜないためである。また、作成部212は、基準画像として平均した部分画像の数もカウントし、所定の数以下であれば、不良あるいは不良に近い部分画像が幾つか含まれているとみなし、良否判定をNGとする。所定の数は、例えば部分画像の半分の値とするが、その他の値でもよい。   This is because a partial image that is defective or suspected of being defective is not mixed with the reference image. The creation unit 212 also counts the number of partial images averaged as a reference image. If the number is equal to or less than a predetermined number, the creation unit 212 considers that there are some partial images that are defective or close to defective, and determines that the quality is NG To do. The predetermined number is, for example, half the value of the partial image, but may be other values.

左端のリードだけが不良である場合も、カウント数が1となりNGと判定される。作成部212は、良否判定をNGと判定した場合は、別の部分画像を基準として前述した処理を行ってもよい。   Even when only the lead at the left end is defective, the count number is 1 and it is determined as NG. The creation unit 212 may perform the above-described processing with another partial image as a reference when the pass / fail determination is NG.

(方法2)
作成部212は、全ての部分画像に関して、その両隣の部分画像とそれぞれテンプレートマッチング処理を行う。作成部212は、両端の部分画像については両端同士でのテンプレートマッチング処理を行う。これにより、全てのリードについて2つずつの相関値が得られる。
(Method 2)
The creation unit 212 performs template matching processing on all partial images with the adjacent partial images. The creation unit 212 performs template matching processing at both ends of the partial images at both ends. As a result, two correlation values are obtained for all the leads.

作成部212は、両方の相関値が所定の閾値より低い部分画像について不良に近いと判定して基準画像の作成からは除外することができる。これにより、方法2は、方法1よりも基準画像の正確さを高めることができる。   The creation unit 212 can determine that a partial image whose both correlation values are lower than a predetermined threshold is close to a defect, and can exclude the partial image from creation of the reference image. Thereby, Method 2 can improve the accuracy of the reference image more than Method 1.

(方法3)
作成部212は、方法2を最大限に拡張したものとして、全ての部分画像間で総当りでテンプレートマッチング処理を行う。これにより、作成部212は、相関値が所定の閾値より低い部分画像を不良と判断して除外し、残りの部分画像で平均をとって基準画像を作成する。方法3は、処理時間が増えるものの、より正確な基準画像を作成することができる。
(Method 3)
The creation unit 212 performs template matching processing for all the partial images as a round robin, assuming that the method 2 is expanded to the maximum. As a result, the creation unit 212 determines that a partial image having a correlation value lower than a predetermined threshold is defective and excludes it, and creates a reference image by taking the average of the remaining partial images. Method 3 can create a more accurate reference image although the processing time increases.

図8は、基準画像の作成方法を説明するための図である。図8(A)は、方法1を説明するための図である。方法1は、図8(A)に示すように、作成部212は、左端の部分画像とのテンプレートマッチング処理を行って、6番目の部分画像との相関値が低いと判断できる。よって、作成部212は、1〜5番目、7〜8番目の部分画像をテンプレートマッチングでマッチングした位置で平均化した平均画像を基準画像として作成する。   FIG. 8 is a diagram for explaining a method of creating a reference image. FIG. 8A is a diagram for explaining the method 1. In Method 1, as shown in FIG. 8A, the creation unit 212 can determine that the correlation value with the sixth partial image is low by performing template matching processing with the leftmost partial image. Therefore, the creation unit 212 creates, as a reference image, an average image obtained by averaging the first to fifth and seventh to eighth partial images at the positions matched by template matching.

図8(B)は、方法2を説明するための図である。図8(B)に示すように、作成部212は、両隣の部分画像にテンプレートマッチング処理を行い、2つの相関値が所定の閾値より低い6番目の部分画像を除外する。よって、作成部212は、1〜5番目、7〜8番目の部分画像をテンプレートマッチングでマッチングした位置で平均化した平均画像を基準画像として作成する。   FIG. 8B is a diagram for explaining the method 2. As shown in FIG. 8B, the creation unit 212 performs template matching processing on the adjacent partial images, and excludes the sixth partial image whose two correlation values are lower than a predetermined threshold. Therefore, the creation unit 212 creates, as a reference image, an average image obtained by averaging the first to fifth and seventh to eighth partial images at the positions matched by template matching.

図8(C)は、方法3を説明するための図である。図8(C)に示すように、作成部212は、全ての部分画像間でテンプレートマッチング処理を行い、相関値の行列を作成する。このとき、相関値の平均が所定の閾値より低い6番目の部分画像を、作成部212は、除外する。よって、作成部212は、1〜5番目、7〜8番目の部分画像をテンプレートマッチングでマッチングした位置で平均化した平均画像を基準画像として作成する。   FIG. 8C is a diagram for explaining the method 3. As shown in FIG. 8C, the creation unit 212 performs a template matching process between all the partial images, and creates a matrix of correlation values. At this time, the creation unit 212 excludes the sixth partial image whose average correlation value is lower than a predetermined threshold. Therefore, the creation unit 212 creates, as a reference image, an average image obtained by averaging the first to fifth and seventh to eighth partial images at the positions matched by template matching.

作成部212は、方法1〜3のいずれか1つを用いて基準画像を作成すればよい。方法1〜3のいずれかの方法が予め設定されていてもよいし、作成の都度、利用者に選択させるようにしてもよい。   The creation unit 212 may create a reference image using any one of methods 1 to 3. Any one of the methods 1 to 3 may be set in advance, or may be made to be selected by the user every time of creation.

なお、作成部212は、基準画像を作成する際、相関値の差異に基づいた重み付けを行って部分画像を加算し、平均画像を生成してもよい。   Note that when creating the reference image, the creating unit 212 may perform weighting based on the difference in the correlation value and add the partial images to generate an average image.

(4)基準画像と部分画像との比較結果により良否判定
比較部214は、作成部212により作成した基準画像を用いて各部分画像とのテンプレートマッチング処理を行い、それぞれの部分画像との相関値を求める。比較部214は、算出した相関値を判定部203に出力する。
(4) Pass / Fail Judgment Based on Comparison Result between Reference Image and Partial Image The comparison unit 214 performs template matching processing with each partial image using the reference image created by the creation unit 212, and a correlation value with each partial image. Ask for. The comparison unit 214 outputs the calculated correlation value to the determination unit 203.

判定部203は、相関値が低い部分画像は、半田接合部が、基準画像の半田接合部との差異が大きく、不良であることを示すと判断する。   The determination unit 203 determines that the partial image having a low correlation value indicates that the solder joint portion is defective due to a large difference from the solder joint portion of the reference image.

図9は、基準画像と各部分画像との相関値を示す図である。図9に示すように、6番目の部分画像の相関値が閾値よりも小さい。よって、判定部203は、6番目の部分画像に含まれる半田接合部が不良であると判定する。この閾値は、例えば0.9とするが、実験などにより適切な値が設定されればよい。   FIG. 9 is a diagram illustrating a correlation value between the reference image and each partial image. As shown in FIG. 9, the correlation value of the sixth partial image is smaller than the threshold value. Therefore, the determination unit 203 determines that the solder joint included in the sixth partial image is defective. This threshold value is set to 0.9, for example, but an appropriate value may be set by an experiment or the like.

ここで、平均画像を基準にして良否判定を行う理由は、次の通りである。個々のリードを含む部分画像にはばらつきがあるため、例え良品同士であっても、個々のペアの相関値は必ずしも高くなく、そのばらつきも大きい。そのため、良品と不良品の相関値による切り分けが難しい。   Here, the reason for performing the pass / fail judgment based on the average image is as follows. Since partial images including individual leads vary, the correlation values of individual pairs are not necessarily high even if they are non-defective products, and the variation is also large. For this reason, it is difficult to separate the non-defective product from the non-defective product.

しかし、複数の部分画像の平均画像を作成することにより、ばらつきが相殺されて、真の良品画像(理想的な良品画像)に近い部分画像が得られる。従って、この平均画像を基準画像として個々の部分画像との相関値を算出すれば、それぞれの半田付けの実装の良否を適切に判定することが可能になる。   However, by creating an average image of a plurality of partial images, variations are offset and a partial image close to a true good image (ideal good image) is obtained. Therefore, if the correlation value with each partial image is calculated using the average image as a reference image, it is possible to appropriately determine whether each soldering is mounted.

これにより、予め閾値さえ設定しておけばよいので、検査対象毎のパラメータ設定が不要となり、ティーチング処理を大幅に簡略化し、半田付けの実装の良否判定を適切に行うことができる。   Accordingly, it is only necessary to set a threshold value in advance, so that parameter setting for each inspection object is not required, the teaching process is greatly simplified, and the quality determination of soldering mounting can be appropriately performed.

<動作>
次に、実施例1における検査装置10の動作について説明する。図10は、実施例1における検査処理の一例を示すフローチャートである。図10に示すステップS101で、撮像部12は、検査対象物を撮像し、例えばモノクロの撮像画像を生成する。この撮像画像は検査画像として取得部201に取得され、抽出部211に入力される。
<Operation>
Next, the operation of the inspection apparatus 10 in the first embodiment will be described. FIG. 10 is a flowchart illustrating an example of the inspection process according to the first embodiment. In step S101 illustrated in FIG. 10, the imaging unit 12 captures an inspection target and generates, for example, a monochrome captured image. This captured image is acquired as an inspection image by the acquisition unit 201 and input to the extraction unit 211.

ステップS102で、抽出部211は、検査画像から、半田接合部を含む部分画像の抽出に成功したか否かを判定する。抽出処理の詳細は、図11を用いて説明する。抽出に成功すれば(ステップS102−YES)ステップS103に進み、抽出に失敗すれば(ステップS102−NO)検査処理を終了する。   In step S102, the extraction unit 211 determines whether or not the partial image including the solder joint portion has been successfully extracted from the inspection image. Details of the extraction process will be described with reference to FIG. If the extraction is successful (step S102—YES), the process proceeds to step S103. If the extraction fails (step S102—NO), the inspection process is terminated.

ステップS103で、作成部212は、基準画像の作成に成功したか否かを判定する。基準画像の作成処理は、図12〜14を用いて説明する。基準画像の作成に成功すれば(ステップS103−YES)ステップ104に進み、基準画像の作成に失敗すれば(ステップS103−NO)検査処理を終了する。   In step S103, the creation unit 212 determines whether the reference image has been successfully created. The reference image creation process will be described with reference to FIGS. If the creation of the reference image is successful (step S103—YES), the process proceeds to step 104. If the creation of the reference image fails (step S103—NO), the inspection process is terminated.

ステップS104で、比較部214は、基準画像と、各部分画像とを比較する。例えば、比較部214は、基準画像のリード及び半田接合部と、部分画像のリード及び半田接合部とのテンプレートマッチングを行い、相関値を算出する。相関値は、画像間の画素の類似度でもよい。   In step S104, the comparison unit 214 compares the reference image with each partial image. For example, the comparison unit 214 performs template matching between the lead and solder joint of the reference image and the lead and solder joint of the partial image, and calculates a correlation value. The correlation value may be a pixel similarity between images.

ステップS105で、判定部203は、比較部214の比較結果に基づいて、各部分画像に含まれる半田接合部の半田付けの実装の良否を判定する。これにより、適切な基準画像を作成して、良否判定を適切に行うことができる。   In step S <b> 105, the determination unit 203 determines the quality of the soldering mounting of the solder joint included in each partial image based on the comparison result of the comparison unit 214. As a result, it is possible to create an appropriate reference image and appropriately perform the pass / fail determination.

なお、部分画像の抽出失敗、又は基準画像の作成失敗の場合は、実装異常の程度が大きすぎることを示唆しているため、判定部203は、実装不良と判定する。   In the case of partial image extraction failure or reference image creation failure, it is suggested that the degree of mounting abnormality is too large, so the determination unit 203 determines that the mounting is defective.

図11は、実施例1における部分画像の抽出処理の一例を示すフローチャートである。図11に示すステップS201で、抽出部211は、検査画像の中の水平ラインを選択する。抽出部211は、予め所定ライン(例えば中心から数ライン下のラインなど)を選択するようにしておく。   FIG. 11 is a flowchart illustrating an example of partial image extraction processing according to the first embodiment. In step S201 illustrated in FIG. 11, the extraction unit 211 selects a horizontal line in the inspection image. The extraction unit 211 selects a predetermined line (for example, a line several lines below the center) in advance.

ステップS202で、抽出部211は、選択した水平ライン上の2つの画素の輝度差を累積して、図6に示すような輝度差ヒストグラムを作成する。   In step S202, the extraction unit 211 accumulates the luminance differences between the two pixels on the selected horizontal line, and creates a luminance difference histogram as illustrated in FIG.

ステップS203で、抽出部211は、輝度差ヒストグラムの極小位置を検出できるかを判定する。輝度差ヒストグラムに極小位置がない場合は、その水平ラインにリードがない可能性が高い。よって、極小位置がなければ(ステップS203−NO)ステップS201に戻り、抽出部211は、他の水平ラインを選択する。極小位置があれば(ステップS203−YES)ステップS204に進む。   In step S203, the extraction unit 211 determines whether the minimum position of the luminance difference histogram can be detected. When there is no minimum position in the luminance difference histogram, there is a high possibility that there is no lead on the horizontal line. Therefore, if there is no minimum position (step S203—NO), the process returns to step S201, and the extraction unit 211 selects another horizontal line. If there is a minimum position (step S203—YES), the process proceeds to step S204.

ステップS204で、抽出部211は、輝度ヒストグラムの極小位置に基づき、リード間隔を検出できるか否かを判定する。リード間隔が検出できれば(ステップS204−YES)ステップS205、S209に進み、リード間隔が検出できなければ(ステップS204−NO)抽出処理を終了する。   In step S204, the extraction unit 211 determines whether or not the lead interval can be detected based on the minimum position of the luminance histogram. If the read interval can be detected (step S204-YES), the process proceeds to steps S205 and S209. If the read interval cannot be detected (step S204-NO), the extraction process ends.

ステップS205で、抽出部211は、検査画像の垂直方向の輝度積分を行う(図7(B)参照)。   In step S205, the extraction unit 211 performs luminance integration in the vertical direction of the inspection image (see FIG. 7B).

ステップS206で、抽出部211は、垂直方向の輝度積分値をリード間隔毎に累積する(図7(C)参照)。   In step S206, the extraction unit 211 accumulates the luminance integration value in the vertical direction at each read interval (see FIG. 7C).

ステップS207で、抽出部211は、リード間隔内での、輝度積分値の累積値のピークを、リード内の中心位置として検出する。   In step S207, the extraction unit 211 detects the peak of the accumulated value of the integrated luminance value within the lead interval as the center position in the lead.

ステップS208で、抽出部211は、検査画像の左端のリードの水平範囲として、リードの中心位置に基づく所定範囲tを検出する。   In step S208, the extraction unit 211 detects a predetermined range t based on the center position of the lead as the horizontal range of the lead at the left end of the inspection image.

ステップS209で、抽出部211は、検査画像の水平方向の輝度積分を行う(図7(E)参照)。   In step S209, the extraction unit 211 performs luminance integration in the horizontal direction of the inspection image (see FIG. 7E).

ステップS210で、抽出部211は、水平方向の輝度積分値を用いて、リードの垂直範囲として、所定範囲sを検出する。   In step S210, the extraction unit 211 detects the predetermined range s as the vertical range of the lead using the luminance integrated value in the horizontal direction.

なお、ステップS205〜S208とステップS209〜S210とは、順不同であり、平行して処理が行われてもよいし、どちらかが先に行われてもよい。   Note that steps S205 to S208 and steps S209 to S210 are out of order, and the processes may be performed in parallel, or one of them may be performed first.

ステップS211で、抽出部211は、検出された左端の水平範囲の所定範囲tと、垂直範囲の所定範囲sとによる矩形領域の画像を部分画像に決定する。この部分画像には、リードや半田接合部が含まれる。   In step S211, the extraction unit 211 determines, as a partial image, an image of a rectangular area based on the detected predetermined range t of the leftmost horizontal range and the predetermined range s of the vertical range. This partial image includes a lead and a solder joint.

ステップS212で、抽出部211は、左端の部分画像が決定したら、例えば部分画像の中心位置をリード間隔分水平方向にずらしていくことで、全ての部分画像を決定することができる。これにより、検査画像から、リード及び半田接合部を含む部分画像を全て抽出することができる。   When the leftmost partial image is determined in step S212, the extraction unit 211 can determine all partial images by shifting the center position of the partial image in the horizontal direction by the lead interval, for example. Thereby, all the partial images including the lead and the solder joint portion can be extracted from the inspection image.

図12は、実施例1における基準画像の作成処理(方法1)の一例を示すフローチャートである。図12に示すステップS301で、作成部212は、左端の部分画像をテンプレートマッチング対象に設定する。左端をn=1とする。   FIG. 12 is a flowchart illustrating an example of a reference image creation process (method 1) according to the first embodiment. In step S301 illustrated in FIG. 12, the creation unit 212 sets the leftmost partial image as a template matching target. Let the left end be n = 1.

ステップS302で、作成部212は、パラメータcountを0に初期化する。ステップS303で、作成部212は、nに1を加算する。   In step S302, the creation unit 212 initializes the parameter count to 0. In step S303, the creation unit 212 adds 1 to n.

ステップS304で、作成部212は、テンプレートマッチング対象の部分画像に基づき、n番目の部分画像周辺をマッチング探索する。テンプレートマッチング処理では、相関値とマッチングした位置を算出することにする。   In step S304, the creation unit 212 searches for the vicinity of the n-th partial image based on the template matching target partial image. In the template matching process, a position matching the correlation value is calculated.

ステップS305で、作成部212は、2つの部分画像間の相関値とマッチングした位置とを取得する。   In step S305, the creation unit 212 acquires a correlation value between two partial images and a matched position.

ステップS306で、作成部212は、取得した相関値が閾値以上であるか否かを判定する。閾値は例えば0.85である。相関値が閾値以上であれば(ステップS306−YES)ステップS307に進み、相関値が閾値未満であれば(ステップS306−NO)ステップS303に戻る。   In step S306, the creation unit 212 determines whether the acquired correlation value is greater than or equal to a threshold value. The threshold is 0.85, for example. If the correlation value is greater than or equal to the threshold value (step S306-YES), the process proceeds to step S307, and if the correlation value is less than the threshold value (step S306-NO), the process returns to step S303.

ステップS307で、作成部212は、マッチングした部分画像をマッチングした位置で平均画像に加算する。平均画像は、相関値が閾値以上の部分画像を平均化した画像である。   In step S307, the creation unit 212 adds the matched partial image to the average image at the matched position. The average image is an image obtained by averaging partial images having a correlation value equal to or greater than a threshold value.

ステップS308で、作成部212は、countに1を加算する。   In step S308, the creation unit 212 adds 1 to count.

ステップS309で、作成部212は、nがNであるかを判定する。Nは、抽出部211により抽出された部分画像の総数である。n=Nであれば(ステップS309−YES)ステップS310に進み、n=Nでなければ(ステップS309−NO)ステップS303に戻る。   In step S309, the creation unit 212 determines whether n is N. N is the total number of partial images extracted by the extraction unit 211. If n = N (step S309—YES), the process proceeds to step S310, and if not n = N (step S309—NO), the process returns to step S303.

ステップS310で、作成部212は、countが閾値以上であるか否かを判定する。この閾値は、例えばN/2とする。なお、閾値は実験などにより適切な値が設定されればよい。countが閾値以上であれば(ステップS310−YES)ステップS311に進み、countが閾値未満であれば(ステップS310−NO)ステップS312に進む。   In step S310, the creation unit 212 determines whether count is equal to or greater than a threshold value. This threshold is, for example, N / 2. It should be noted that an appropriate value may be set for the threshold value through experiments or the like. If count is greater than or equal to the threshold (step S310—YES), the process proceeds to step S311. If count is less than the threshold (step S310—NO), the process proceeds to step S312.

ステップS311で、作成部212は、相関値が閾値以上の部分画像が平均化された平均画像を基準画像に設定する。作成された基準画像は、記憶部213に記憶される。   In step S311, the creation unit 212 sets an average image obtained by averaging partial images having a correlation value equal to or greater than a threshold value as a reference image. The created reference image is stored in the storage unit 213.

ステップS312で、作成部212は、半田付けにそもそも実装不良が多いということで、判定NGと判断する。作成部212は、判定NGと判定した場合、判定部203にその旨を通知する。   In step S312, the creation unit 212 determines that the determination is NG because there are many mounting defects in the soldering. If the creation unit 212 determines that the determination is NG, the generation unit 212 notifies the determination unit 203 of the determination.

図13は、実施例1における基準画像の作成処理(方法2)の一例を示すフローチャートである。図13に示すステップS401で、作成部212は、n=1に設定する。   FIG. 13 is a flowchart illustrating an example of a reference image creation process (method 2) according to the first embodiment. In step S401 illustrated in FIG. 13, the creation unit 212 sets n = 1.

ステップS402で、作成部212は、基準画像の左端からn番目の部分画像をマッチング対象の部分画像に設定する。   In step S402, the creation unit 212 sets the nth partial image from the left end of the reference image as a partial image to be matched.

ステップS403で、作成部212は、テンプレートマッチング対象の部分画像に基づき、n+1番目の部分画像周辺をマッチング探索する。テンプレートマッチング処理では、相関値とマッチングした位置とを算出することにする。nがNの場合は、1番目の部分画像とのマッチングを行う。   In step S403, the creation unit 212 performs a matching search around the (n + 1) th partial image based on the partial image to be template matched. In the template matching process, the correlation value and the matched position are calculated. When n is N, matching with the first partial image is performed.

ステップS404で、作成部212は、2つの部分画像間の相関値とマッチングした位置とを取得する。ステップS405で、作成部212は、nに1を加算する。   In step S404, the creation unit 212 acquires the correlation value between the two partial images and the matched position. In step S405, the creation unit 212 adds 1 to n.

ステップS406で、作成部212は、n>Nであるかを判定する。Nは、抽出部211により抽出された部分画像の総数である。n>Nであれば(ステップS406−YES)ステップS407に進み、n≦Nであれば(ステップS406−NO)ステップS402に戻る。   In step S406, the creation unit 212 determines whether n> N. N is the total number of partial images extracted by the extraction unit 211. If n> N (step S406—YES), the process proceeds to step S407, and if n ≦ N (step S406—NO), the process returns to step S402.

ステップS407で、作成部212は、count、nを0に初期化する。ステップS408で、作成部212は、nに1を加算する。   In step S407, the creation unit 212 initializes count, n to 0. In step S408, the creation unit 212 adds 1 to n.

ステップS409で、作成部212は、作成部212は、n−1番目及びn番目の相関値2個の平均を算出する。この平均を平均相関値と呼ぶ。   In step S409, the creation unit 212 calculates the average of the two (n−1) th and nth correlation values. This average is called an average correlation value.

ステップS410で、作成部212は、平均相関値が閾値以上か否かを判定する。この閾値は例えば0.85である。平均相関値が閾値以上であれば(ステップS410−YES)ステップS411に進み、平均相関値が閾値未満であれば(ステップS410−NO)S408に戻る。この閾値は、例えば0.85とするが、実験などにより適切な値が設定されればよい。   In step S410, the creation unit 212 determines whether the average correlation value is greater than or equal to a threshold value. This threshold is, for example, 0.85. If the average correlation value is greater than or equal to the threshold (step S410—YES), the process proceeds to step S411, and if the average correlation value is less than the threshold (step S410—NO), the process returns to S408. The threshold is set to 0.85, for example, but an appropriate value may be set by experiment or the like.

ステップS411で、作成部212は、n番目の部分画像をマッチングした位置で平均画像に加算する。ステップS412で、作成部212は、countに1を加算する。   In step S411, the creation unit 212 adds the nth partial image to the average image at the matched position. In step S412, the creation unit 212 adds 1 to count.

ステップS413で、作成部212は、n=Nであるかを判定する。n=Nであれば(ステップS413−YES)ステップS414に進み、n=Nでなければ(ステップS413−NO)ステップS408に戻る。   In step S413, the creation unit 212 determines whether n = N. If n = N (step S413-YES), the process proceeds to step S414, and if not n = N (step S413-NO), the process returns to step S408.

ステップS414以降の処理は、図12に示すステップS310以降の処理と同様であるため、その説明を省略する。   Since the process after step S414 is the same as the process after step S310 shown in FIG. 12, the description is abbreviate | omitted.

図14は、実施例1における基準画像の作成処理(方法3)の一例を示すフローチャートである。図14に示すステップS501〜S502の処理は、図13に示すステップS401〜S402の処理と同様であるため、その説明を省略する。   FIG. 14 is a flowchart illustrating an example of a reference image creation process (method 3) according to the first embodiment. The processes in steps S501 to S502 shown in FIG. 14 are the same as the processes in steps S401 to S402 shown in FIG.

ステップS503で、作成部212は、テンプレートマッチング対象の部分画像に基づき、n+1番目からN番目の部分画像周辺をそれぞれマッチング探索する。   In step S503, the creation unit 212 searches for the vicinity of the (n + 1) th to Nth partial images based on the template matching target partial images.

ステップS504で、作成部212は、テンプレートマッチング対象の部分画像と、n+1番目からN番目の部分画像それぞれとの相関値及びマッチング位置を全て取得する。   In step S504, the creation unit 212 acquires all the correlation values and the matching positions between the template matching target partial image and each of the (n + 1) th to Nth partial images.

ステップS505〜S508の処理は、図13に示すステップS405〜S408の処理と同様であるため、その説明を省略する。   The processing in steps S505 to S508 is the same as the processing in steps S405 to S408 shown in FIG.

ステップS509で、作成部212は、n番目以外の相関値N−1個の平均を算出し、この平均を平均相関値とする。   In step S509, the creation unit 212 calculates the average of N-1 correlation values other than the nth, and sets this average as the average correlation value.

ステップS510以降の処理は、図13に示すステップS410以降の処理と同様であるため、その説明を省略する。   Since the process after step S510 is the same as the process after step S410 shown in FIG. 13, the description thereof is omitted.

以上、実施例1によれば、検査対象毎にパラメータを設定する必要がなく、適切に半田付けの実装の良否を判定することができる。また、実施例1によれば、照明の具合が変化しても、ティーチングをやり直すことなく、良否判定処理を適用することができる。また、実施例1によれば、コネクタの種類ごとに個別にティーチングを行う必要がない。また、実施例1によれば、新規の同種部品にも、ティーチングをやり直すことなくそのまま適用することができる。   As described above, according to the first embodiment, it is not necessary to set a parameter for each inspection target, and it is possible to appropriately determine whether soldering is mounted or not. Moreover, according to Example 1, even if the lighting condition changes, the quality determination process can be applied without performing teaching again. Further, according to the first embodiment, it is not necessary to perform teaching individually for each type of connector. In addition, according to the first embodiment, it can be applied to a new similar component as it is without performing teaching again.

[実施例2]
次に、実施例2における検査装置について説明する。実施例2では、照明機器の位置を変えたり、複数の視点から検査対象物を撮像したりして取得した検査画像に基づいて良否判定を行うことで、判定の精度を上げる。
[Example 2]
Next, the inspection apparatus in Example 2 will be described. In the second embodiment, the accuracy of the determination is improved by performing the pass / fail determination based on the inspection image acquired by changing the position of the lighting device or imaging the inspection object from a plurality of viewpoints.

<ハードウェア>
図15は、実施例2における検査装置10のハードウェアの一例を示すブロック図である。図15に示す例では、検査装置10のハードウェアは実施例1と変わらないが、撮像部が複数ある。図15に示す例では、2つの撮像部が検査装置10に接続される。第1撮像部12−1は、例えば左視点から検査対象物を撮像する装置であり、第2撮像部12−2は、例えば右視点から検査対象物を撮像する装置である。これにより、検査対象物をいろいろな角度から撮像することができる。
<Hardware>
FIG. 15 is a block diagram illustrating an example of hardware of the inspection apparatus 10 according to the second embodiment. In the example illustrated in FIG. 15, the hardware of the inspection apparatus 10 is the same as that in the first embodiment, but there are a plurality of imaging units. In the example illustrated in FIG. 15, two imaging units are connected to the inspection apparatus 10. The first imaging unit 12-1 is an apparatus that images an inspection object from the left viewpoint, for example, and the second imaging unit 12-2 is an apparatus that images the inspection object from the right viewpoint, for example. Thereby, the inspection object can be imaged from various angles.

その他の構成は、実施例1と同様であるため、図1に示す符号と同じ符号を付し、その説明を省略する。   Since the other configuration is the same as that of the first embodiment, the same reference numerals as those shown in FIG.

<機能>
図16は、実施例2における検査装置10の機能の一例を示すブロック図である。図16に示す検査装置10は、取得部300、設定部301、画像処理部302、判定部303を有する。取得部300、設定部301、画像処理部302及び判定部303は、例えば制御部101及びワークメモリとしての主記憶部102により実現されうる。
<Function>
FIG. 16 is a block diagram illustrating an example of functions of the inspection apparatus 10 according to the second embodiment. The inspection apparatus 10 illustrated in FIG. 16 includes an acquisition unit 300, a setting unit 301, an image processing unit 302, and a determination unit 303. The acquisition unit 300, the setting unit 301, the image processing unit 302, and the determination unit 303 can be realized by the control unit 101 and the main storage unit 102 as a work memory, for example.

取得部300は、第1撮像部12−1、第2撮像部12−2から取得した撮像画像を抽出部311に出力する。この撮像画像は検査画像として扱われる。   The acquisition unit 300 outputs the captured images acquired from the first imaging unit 12-1 and the second imaging unit 12-2 to the extraction unit 311. This captured image is treated as an inspection image.

設定部301は、照明機器11の位置を設定する。例えば、検査対象物の左上方、真上、右上方に照明機器11が来るよう照明機器11の位置を調節する。照明機器11は、設定部301により可動制御される。   The setting unit 301 sets the position of the lighting device 11. For example, the position of the illumination device 11 is adjusted so that the illumination device 11 comes to the upper left, right above, and upper right of the inspection object. The lighting device 11 is movably controlled by the setting unit 301.

なお、実施例2では、照明機器11の位置を調節するのではなく、照明機器11を複数備えて、各照明機器を順に照明することで、各方向から検査対象物を照明するにようにしてもよい。また、設定部301は、照明機器11の照明位置を変更するのではなく、照明方向を変更するようにしてもよい。   In Example 2, the position of the illumination device 11 is not adjusted, but a plurality of illumination devices 11 are provided, and each illumination device is illuminated in order to illuminate the inspection object from each direction. Also good. Further, the setting unit 301 may change the illumination direction instead of changing the illumination position of the illumination device 11.

画像処理部302は、1つの検査対象物に対して各照明方向、各視点からの検査画像を用いて、各半田接合部の実装の良否を判定する。   The image processing unit 302 determines whether each solder joint is mounted or not by using inspection images from each illumination direction and each viewpoint for one inspection object.

画像処理部302の抽出部311、作成部312、記憶部313、比較部314の各機能は、実施例1と基本的には同様である。実施例1と異なることは、複数の検査画像に対して、処理を行うことである。   The functions of the extraction unit 311, the creation unit 312, the storage unit 313, and the comparison unit 314 of the image processing unit 302 are basically the same as those in the first embodiment. The difference from the first embodiment is that processing is performed on a plurality of inspection images.

判定部303は、複数の検査画像それぞれに対し、比較結果を取得する。この比較結果に基づいて、いずれの検査画像にも不良がない場合に、判定部303は、その検査対象物の半田接合部の実装に不良はないと判定する。   The determination unit 303 acquires a comparison result for each of the plurality of inspection images. Based on the comparison result, when there is no defect in any of the inspection images, the determination unit 303 determines that there is no defect in the mounting of the solder joint of the inspection object.

これは、半田フィレットは、立体形状の上に金属反射を起こすため、見え方によっては不良部分がはっきりと分からないことがある。そこで、例えば左右の2個の撮像部から視点を変えて撮像し、また、照明の位置、方向を変化させて撮像部が撮像することで、複数の検査画像を得ることができる。この複数の検査画像に対して、実施例1と同様の判定処理を行い、いずれの検査画像にも不良がない場合は、判定部303は、半田フィレットの形状に不良はないと判定する。   This is because the solder fillet causes metal reflection on the three-dimensional shape, so that the defective portion may not be clearly recognized depending on how it is seen. Thus, for example, imaging is performed by changing the viewpoint from the two imaging units on the left and right, and the imaging unit captures images by changing the position and direction of illumination, whereby a plurality of inspection images can be obtained. A determination process similar to that in the first embodiment is performed on the plurality of inspection images, and if any inspection image is not defective, the determination unit 303 determines that the shape of the solder fillet is not defective.

図17は、撮像部と照明機器との位置関係の一例を示す図である。図17に示す例では、第1撮像部12−1は、左方向から検査対象物を撮像し、第2撮像部12−2は、右方向から検査対象物を撮像する。また、照明機器11は、例えば左上方、真上、右上方と照明位置を変更する。図17に示す例では、撮像部の視点が2通り、照明位置が3通りあるため、検査装置10は、6通りの検査画像を得ることができる。   FIG. 17 is a diagram illustrating an example of a positional relationship between the imaging unit and the lighting device. In the example illustrated in FIG. 17, the first imaging unit 12-1 images the inspection target from the left direction, and the second imaging unit 12-2 images the inspection target from the right direction. In addition, the illumination device 11 changes the illumination position to, for example, upper left, directly above, and upper right. In the example illustrated in FIG. 17, since there are two viewpoints and three illumination positions of the imaging unit, the inspection apparatus 10 can obtain six inspection images.

なお、第1撮像部12−1、第2撮像部12−2は、例えば、集積回路20から複数出ているリード及び半田接合部を含む点線枠を撮像するように調整されている。   Note that the first imaging unit 12-1 and the second imaging unit 12-2 are adjusted so as to image a dotted frame including a plurality of leads and solder joints extending from the integrated circuit 20, for example.

図18は、各検査画像から生成される各基準画像の一例を示す図である。図18に示す例は、図17に示す視点位置、照明位置で撮像された検査画像を示す。また、各検査画像から作成された基準画像を示す。基準画像の半田フィレット部分は、照明の方向によって、その輝度の濃淡が異なる。   FIG. 18 is a diagram illustrating an example of each reference image generated from each inspection image. The example illustrated in FIG. 18 illustrates an inspection image captured at the viewpoint position and the illumination position illustrated in FIG. In addition, a reference image created from each inspection image is shown. The solder fillet portion of the reference image varies in brightness depending on the direction of illumination.

これにより、視点位置、照明位置が異なる複数の検査画像で良否判定を行うことで、半田接合部の実装の良否判定の精度を向上させることができる。   Thereby, the accuracy of the quality determination of the solder joint mounting can be improved by performing the quality determination with a plurality of inspection images having different viewpoint positions and illumination positions.

<動作>
次に、実施例2における検査装置10の動作について説明する。図19は、実施例2における検査処理の一例を示すフローチャートである。
<Operation>
Next, the operation of the inspection apparatus 10 in the second embodiment will be described. FIG. 19 is a flowchart illustrating an example of inspection processing according to the second embodiment.

図19に示すステップS601で、設定部301は、照明機器11の位置を所定位置に設定する。   In step S601 illustrated in FIG. 19, the setting unit 301 sets the position of the lighting device 11 to a predetermined position.

ステップS602で、第1撮像部12−1、第2撮像部12−2は、検査対象物を撮像し、検査画像を検査装置10に出力する。例えば、左右の方向から撮像した左右の検査画像が検査装置10に出力される。   In step S <b> 602, the first imaging unit 12-1 and the second imaging unit 12-2 image an inspection target and output an inspection image to the inspection apparatus 10. For example, left and right inspection images captured from the left and right directions are output to the inspection apparatus 10.

ステップS603で、抽出部311は、左右の検査画像から、半田接合部を含む部分画像の抽出に成功したか否かを判定する。抽出処理は、図11に示す処理と同様である。抽出に成功すれば(ステップS603−YES)ステップS604に進み、抽出に失敗すれば(ステップS603−NO)検査処理を終了する。   In step S603, the extraction unit 311 determines whether the partial image including the solder joint portion has been successfully extracted from the left and right inspection images. The extraction process is the same as the process shown in FIG. If the extraction is successful (step S603—YES), the process proceeds to step S604. If the extraction fails (step S603—NO), the inspection process is terminated.

ステップS604で、作成部312は、右の検査画像から基準画像の作成に成功したか否かを判定する。基準画像の作成処理は、図12〜14の処理の何れかを用いる。右の基準画像の作成に成功すれば(ステップ604−YES)ステップ605に進み、右の基準画像の作成に失敗すれば(ステップS604−NO)検査処理を終了する。   In step S604, the creation unit 312 determines whether the reference image has been successfully created from the right inspection image. The reference image creation process uses one of the processes shown in FIGS. If the creation of the right reference image is successful (step 604-YES), the process proceeds to step 605, and if the creation of the right reference image fails (step S604-NO), the inspection process is terminated.

ステップS605で、作成部312は、左の検査画像から基準画像の作成に成功したか否かを判定する。基準画像の作成処理は、図12〜14の処理の何れかを用いる。左の基準画像の作成に成功すれば(ステップ605−YES)ステップ606に進み、左の基準画像の作成に失敗すれば(ステップS605−NO)検査処理を終了する。なお、ステップS604、S605の順序は問わない。   In step S605, the creation unit 312 determines whether the reference image has been successfully created from the left inspection image. The reference image creation process uses one of the processes shown in FIGS. If the creation of the left reference image is successful (step 605-YES), the process proceeds to step 606. If the creation of the left reference image fails (step S605-NO), the inspection process is terminated. The order of steps S604 and S605 does not matter.

ステップS606で、設定部301は、全ての照明条件で撮像を行ったかを判定する。例えば、設定部301は、右、中央、左の順で照明位置を変更する場合、左に照明機器11がある場合は、全ての照明条件で撮像したと判定する。   In step S606, the setting unit 301 determines whether imaging has been performed under all illumination conditions. For example, when changing the illumination position in the order of right, center, and left, the setting unit 301 determines that imaging has been performed under all illumination conditions when the illumination device 11 is on the left.

全ての照明条件で撮像していれば(ステップS606−YES)ステップS607に進み、全ての照明条件で撮像していなければ(ステップS606−NO)照明条件を変更するためステップS601に戻る。   If the image is captured under all illumination conditions (step S606: YES), the process proceeds to step S607. If the image is not captured under all illumination conditions (step S606: NO), the process returns to step S601 to change the illumination condition.

ステップS607で、比較部314は、複数の検査画像それぞれに対して、基準画像と、各部分画像とを比較する。例えば、比較部214は、基準画像のリード及び半田接合部と、部分画像のリード及び半田接合部とのテンプレートマッチングを行い、相関値を算出する。   In step S607, the comparison unit 314 compares the reference image and each partial image for each of the plurality of inspection images. For example, the comparison unit 214 performs template matching between the lead and solder joint of the reference image and the lead and solder joint of the partial image, and calculates a correlation value.

ステップS608で、判定部303は、比較部314の比較結果に基づいて、複数の検査画像の1つでも不良が見つかった場合には、その検査対象物の半田付けの実装を不良と判定する。判定部303は、複数の検査画像に対して1つも不良がなかった場合に、その検査対象物の半田付けの実装は良品であると判定する。   In step S <b> 608, based on the comparison result of the comparison unit 314, the determination unit 303 determines that the soldering mounting of the inspection object is defective when one of the plurality of inspection images is defective. When there is no defect in the plurality of inspection images, the determination unit 303 determines that the inspection object is mounted by soldering as a non-defective product.

なお、実施例2では、視点位置と、照明位置の両方を変更する例について説明したが、いずれか一方の位置を変更するだけでもよい。   In the second embodiment, the example in which both the viewpoint position and the illumination position are changed has been described. However, only one of the positions may be changed.

以上、実施例2によれば、異なる視点、異なる照明位置により複雑な半田形状を撮像するため、異常状態を撮像する可能性が高くなり、異常の検査漏れを少なくし、ロバストに半田形状の異常を検出することができる。   As described above, according to the second embodiment, since a complicated solder shape is imaged from different viewpoints and different illumination positions, there is a high possibility that an abnormal state will be imaged, an abnormality inspection failure is reduced, and the solder shape abnormality is robust. Can be detected.

[実施例3]
次に、実施例3における検査装置について説明する。実施例3では、左右の撮像部により撮像されたステレオ画像を用いて、各リードの高さ計測を行う。これにより、リードの高さの異常を検出することができ、半田付けにおける実装の良否判定の精度を上げることができる。
[Example 3]
Next, the inspection apparatus in Example 3 will be described. In Example 3, the height of each lead is measured using a stereo image captured by the left and right imaging units. As a result, an abnormality in the height of the lead can be detected, and the accuracy of the quality determination of mounting in soldering can be increased.

<ハードウェア>
実施例3における検査装置のハードウェアや検査装置に接続される機器は、実施例2と同様であるため、その説明を省略する。
<Hardware>
Since the hardware of the inspection apparatus and the equipment connected to the inspection apparatus in the third embodiment are the same as those in the second embodiment, description thereof is omitted.

<機能>
図20は、実施例3における検査装置10の機能の一例を示すブロック図である。図20に示す検査装置10は、取得部300、設定部301、画像処理部401、判定部402を有する。取得部300、設定部301、画像処理部401及び判定部402は、例えば制御部101及びワークメモリとしての主記憶部102により実現されうる。なお、図20に示す構成で、図16に示す構成と同様の機能のものは同じ符号を付し、その説明を省略する。抽出部311は、抽出した部分画像を記憶部313に記憶する。
<Function>
FIG. 20 is a block diagram illustrating an example of functions of the inspection apparatus 10 according to the third embodiment. The inspection apparatus 10 illustrated in FIG. 20 includes an acquisition unit 300, a setting unit 301, an image processing unit 401, and a determination unit 402. The acquisition unit 300, the setting unit 301, the image processing unit 401, and the determination unit 402 can be realized by the control unit 101 and the main storage unit 102 as a work memory, for example. In the configuration shown in FIG. 20, the same functions as those in the configuration shown in FIG. 16 are denoted by the same reference numerals, and the description thereof is omitted. The extraction unit 311 stores the extracted partial image in the storage unit 313.

画像処理部401は、計測部411を有する。計測部411は、左右の検査画像からそれぞれリードの位置を検出し、三角測量の原理で左右の対応点の3次元位置を求める。この方法により、基準面からみた3次元位置として、リードの高さが得られる。   The image processing unit 401 includes a measurement unit 411. The measuring unit 411 detects the positions of the leads from the left and right inspection images, and obtains the three-dimensional positions of the left and right corresponding points based on the principle of triangulation. By this method, the lead height is obtained as a three-dimensional position as viewed from the reference plane.

図21は、ステレオマッチングに基づき視差検出を説明するための図である。ステレオマッチングとは、左右に配置された2台のカメラで撮影された2枚1組の画像を用いる。また、左のカメラで撮影された画像が、右のカメラで撮影された画像のどの部分に対応するかを面積相関の計算により求める。次に、その対応関係を使った三角測量により、各点の3次元的位置を推測する。この方法がステレオマッチングである。   FIG. 21 is a diagram for explaining parallax detection based on stereo matching. Stereo matching uses a set of two images taken by two cameras arranged on the left and right. In addition, it is determined by area correlation calculation which part of the image captured by the left camera corresponds to which part of the image captured by the right camera. Next, the three-dimensional position of each point is estimated by triangulation using the correspondence. This method is stereo matching.

計測部411は、まず、左検査画像50のリード部分の画像51を切り出す。リード部分の画像をリード画像と呼ぶ。   First, the measurement unit 411 cuts out the image 51 of the lead portion of the left inspection image 50. The image of the lead portion is called a lead image.

計測部411は、リード画像51の中心座標を左画像の検出位置として求める。このリード画像51を用いて、右検査画像52の所定の探索範囲54をテンプレートマッチングにより探索する。   The measurement unit 411 obtains the center coordinates of the lead image 51 as the detection position of the left image. Using this lead image 51, a predetermined search range 54 of the right inspection image 52 is searched by template matching.

計測部411は、最もマッチング度の高い位置で、右検査画像52上でのリード画像53を検出する。左右の検査画像において検出したこれらの水平方向の位置の差が視差Dである。例えば、視差Dは、リード画像51の中心と、リード画像53の中心との差である。   The measurement unit 411 detects the lead image 53 on the right inspection image 52 at the position with the highest matching degree. The difference between these horizontal positions detected in the left and right inspection images is the parallax D. For example, the parallax D is a difference between the center of the lead image 51 and the center of the lead image 53.

左右のカメラ座標におけるリードの検出位置から、左右の対応点までの距離が三角測量の原理により求まる。   The distance from the lead detection position in the left and right camera coordinates to the corresponding point on the left and right is determined by the principle of triangulation.

図22は、視差に基づくリード高さの計測を説明するための図である。図22に示す例では、左右の撮像部の光軸が交差している場合、視差が負に大きいほど距離が近く、視差が正に大きくなるほど距離が遠いということになる。   FIG. 22 is a diagram for explaining the measurement of the lead height based on the parallax. In the example illustrated in FIG. 22, when the optical axes of the left and right imaging units intersect, the distance is closer as the parallax is negatively increased, and the distance is longer as the parallax is positively increased.

計測部411は、撮像部の中心軸の交差点を基準面とすると、対応点までの距離に基づいて、基準面からのリードの高さが求められる。計測部411は、計測したリードの高さを判定部402に出力する。   The measurement unit 411 obtains the height of the lead from the reference plane based on the distance to the corresponding point when the intersection of the central axes of the imaging units is the reference plane. The measurement unit 411 outputs the measured lead height to the determination unit 402.

判定部402は、半田良否判定部421、高さ良否判定部422を有する。半田良否判定部421は、実施例2で説明した判定部303と同様である。   The determination unit 402 includes a solder quality determination unit 421 and a height quality determination unit 422. The solder quality determination unit 421 is the same as the determination unit 303 described in the second embodiment.

図23は、半田の良否判定を説明するための図である。図23に示すように、半田良否判定部421は、例えば6通りの撮像条件による相関値を6次元の特徴ベクトルとみなすと、それぞれの半田接合部の相関値は、6次元特徴空間内の1点で表される。半田良否判定部421は、各リードについて、予め設定した良否判定面を下回るリードがあれば不良と判定する。良否判定面は、各次元において例えば0.9の面を表す。   FIG. 23 is a diagram for explaining determination of acceptability of solder. As illustrated in FIG. 23, when the solder quality determination unit 421 regards, for example, the correlation values based on six imaging conditions as a six-dimensional feature vector, the correlation value of each solder joint portion is 1 in the six-dimensional feature space. Represented by dots. The solder pass / fail judgment unit 421 judges that each lead is defective if there is a lead that falls below a preset pass / fail judgment plane. The pass / fail judgment surface represents, for example, a 0.9 surface in each dimension.

また、半田良否判定部421は、6次元特徴空間内のデータの分散により、良否判定面を適応的に調節してもよい。また、半田良否判定部421は、相関値は、左右の撮像部、照明位置によってサブグループ化することができるため、このサブグループ毎に良否判定面を設定することにより、判定精度を高めることもできる。なお、これらの方法は、実施例2においても適用できる。   Further, the solder quality determination unit 421 may adaptively adjust the quality determination surface based on the distribution of data in the 6-dimensional feature space. Moreover, since the correlation value can be sub-grouped by the left and right imaging units and the illumination position, the solder pass / fail judgment unit 421 can improve the judgment accuracy by setting a pass / fail judgment surface for each sub group. it can. These methods can also be applied in the second embodiment.

高さ良否判定部422は、計測部411から、各リードの高さを取得する。高さ良否判定部422は、次の2つの相対的な基準に基づいて判定を行う。高さ良否判定部422は、1つ目の基準として、リード高さのばらつきが閾値を超えていれば、浮いたリードがあるとして不良と判定する。   The height acceptance / rejection determination unit 422 acquires the height of each lead from the measurement unit 411. The height acceptance / rejection determination unit 422 performs determination based on the following two relative criteria. As a first criterion, the height acceptance / rejection determination unit 422 determines that there is a floating lead if the variation in the lead height exceeds the threshold value.

高さ良否判定部422は、2つ目の基準として、リードの高さの分布の傾きが閾値を超えていれば、コネクタの取り付けが傾いているとして不良と判定する。   As a second criterion, the height acceptance / rejection determination unit 422 determines that the attachment of the connector is inclined as defective if the inclination of the distribution of the lead heights exceeds the threshold value.

図24は、リードの高さに基づく良否判定を説明するための図である。図24に示すように、高さ良否判定部422は、抽出された部分画像に含まれるリード毎に、リードの高さを計測し、ばらつき幅が閾値を超えた場合、又は高さの近似直線の傾きが閾値を超えた場合、不良があると判定する。なお、高さ良否判定部422は、計測された高さが所定範囲内にないリードがある場合に不良であると判定してもよい。   FIG. 24 is a diagram for explaining pass / fail determination based on the height of a lead. As shown in FIG. 24, the quality determination unit 422 measures the height of each lead included in the extracted partial image, and when the variation width exceeds the threshold, or an approximate straight line of the height If the slope of the curve exceeds the threshold, it is determined that there is a defect. In addition, the quality determination unit 422 may determine that the height is defective when there is a lead whose measured height is not within a predetermined range.

判定部402は、半田良否判定部421、高さ良否判定部422のいずれかで不良と判定された場合には、半田付けにおける実装の不良があると判定する。これにより、半田付けとリードの高さとを含むコネクタの実装の良否判定の精度を向上させることができる。   The determination unit 402 determines that there is a mounting defect in soldering when any one of the solder quality determination unit 421 and the height quality determination unit 422 determines a failure. Thereby, the precision of the quality determination of the connector mounting including soldering and lead height can be improved.

<動作>
次に、実施例3における検査装置10の動作について説明する。図25は、実施例3における検査処理の一例を示すフローチャートである。図25に示すステップS701〜S705の処理は、図19に示すステップS601〜S605の処理と同様であるため、その説明を省略する。
<Operation>
Next, the operation of the inspection apparatus 10 in the third embodiment will be described. FIG. 25 is a flowchart illustrating an example of inspection processing according to the third embodiment. The processes in steps S701 to S705 shown in FIG. 25 are the same as the processes in steps S601 to S605 shown in FIG.

ステップS706で、計測部411は、左右の検査画像からステレオマッチングにより各リードの高さを計測する。   In step S706, the measurement unit 411 measures the height of each lead from the left and right inspection images by stereo matching.

ステップS707〜S708の処理は、図19に示すステップS606〜S607の処理と同様であるため、その説明を省略する。   The processing in steps S707 to S708 is the same as the processing in steps S606 to S607 shown in FIG.

ステップS709は、半田良否判定部421は、半田接合部の実装の良否判定を判定する。判定方法は、実施例2と同様である。   In step S709, the solder quality determination unit 421 determines whether the solder joint is mounted. The determination method is the same as in the second embodiment.

ステップS710で、高さ良否判定部422は、リードの高さで、浮いているリードが無いか、コネクタが傾いていないかを判定する。   In step S710, the quality determination unit 422 determines whether there is no floating lead or the connector is tilted based on the height of the lead.

判定部402は、ステップS709、S710で、1つでも不良と判定されていれば、コネクタの実装は不良と判定する。   The determination unit 402 determines that the connector is not properly mounted if at least one is determined to be defective in steps S709 and S710.

以上、実施例3によれば、左右の視点から撮像されたステレオ画像を用いて、各リードの高さを計測することにより、リードの高さ不良を適切に検出することができるため、コネクタの実装不良を精度良く検出することができる。   As described above, according to the third embodiment, since the height of each lead can be appropriately detected by measuring the height of each lead using a stereo image captured from the left and right viewpoints, Mounting defects can be detected with high accuracy.

[実施例4]
次に、実施例4における検査装置について説明する。実施例4では、照明位置や視点位置を変えて撮像された複数の検査画像に対して、部分画像の位置やサイズを共通化する。これにより、共通の位置やサイズの部分画像を用いて良否判定をすることができ、効率よく実装不良を検出することができる。
[Example 4]
Next, an inspection apparatus according to Example 4 will be described. In the fourth embodiment, the positions and sizes of the partial images are made common to a plurality of inspection images captured by changing the illumination position and the viewpoint position. As a result, it is possible to make a pass / fail determination using partial images having a common position and size, and to efficiently detect mounting defects.

また、実施例4では、部分画像のサイズが同じになるため、同じ閾値を用いて良否判定を行うこができる。なお、共通化については、同一視点の検査画像に対して部分画像の位置やサイズを共通化したり、全ての検査画像に対して部分画像の位置やサイズを共通化したりすることができる。   In Example 4, since the partial images have the same size, it is possible to perform pass / fail determination using the same threshold value. As for sharing, it is possible to share the position and size of the partial image with respect to the inspection image of the same viewpoint, or to share the position and size of the partial image with respect to all the inspection images.

まず、実施例4における処理の概要について説明する。図26は、部分画像領域共通化(その1)の場合の処理概要を説明するための図である。図26に示す例では、左右のカメラで照明条件1,2において撮像し、4枚の検査画像を取得する。   First, an outline of processing in the fourth embodiment will be described. FIG. 26 is a diagram for explaining an outline of processing in the case of sharing a partial image area (part 1). In the example shown in FIG. 26, images are taken with the left and right cameras under illumination conditions 1 and 2, and four inspection images are acquired.

図26に示す例では、同一視点の検査画像に対し、部分画像の領域を共通化する。これにより、同一視点では、同じ領域の部分画像を抽出し、同じ閾値を用いて良否判定を行うことができる。よって、全ての検査画像で独立して部分領域を抽出したり、閾値を設定したりする必要がない。   In the example shown in FIG. 26, the partial image area is shared for the inspection image of the same viewpoint. Thereby, at the same viewpoint, partial images in the same region can be extracted, and pass / fail judgment can be performed using the same threshold value. Therefore, it is not necessary to extract partial areas independently from all inspection images or set a threshold value.

同一視点において、照明条件が異なるだけで同じ対象物を撮像しているため、マッチング処理を行う部分画像の領域の位置やサイズは統一されていた方が望ましい。   Since the same object is imaged only at different illumination conditions at the same viewpoint, it is desirable that the positions and sizes of the partial image areas to be matched are unified.

図27は、部分画像領域共通化(その2)の場合の処理概要を説明するための図である。図27に示す例では、左右のカメラで照明条件1,2において撮像し、4枚の検査画像を取得する。   FIG. 27 is a diagram for explaining an outline of processing in the case of partial image area sharing (part 2). In the example shown in FIG. 27, the left and right cameras are imaged under illumination conditions 1 and 2, and four inspection images are acquired.

図27に示す例では、全ての検査画像に対し、部分画像の領域を共通化する。これにより、全ての検査画像から同じ領域の部分画像を抽出し、統一的な閾値を用いて良否判定を行うことができる。よって、良否判定の閾値の設定は1つでよく、効率よく良否判定を行うことができる。   In the example shown in FIG. 27, the partial image area is shared by all the inspection images. Thereby, the partial image of the same area | region can be extracted from all the test | inspection images, and a quality determination can be performed using a unified threshold value. Therefore, it is sufficient to set one threshold value for pass / fail judgment, and the pass / fail judgment can be performed efficiently.

複数の視点、又は複数の照明条件で検査画像が撮像されていた場合でも、同じ対象物を撮像しているため、マッチング処理を行う部分画像の領域の位置やサイズは統一されていた方が望ましい。複数の視点又は照明条件の検査画像を総合的に利用して、共通した最適な部分画像領域を検出すれば、どの視点又はどの照明条件の検査画像についても均一なマッチングスコアが得られるため、良否判定の精度向上が期待できる。以下では、図27に示す例を用いて実施例4を説明する。   Even when inspection images are captured at multiple viewpoints or multiple illumination conditions, the same object is captured, so it is desirable that the position and size of the partial image areas to be matched are unified. . If a common optimal partial image area is detected by comprehensively using inspection images of multiple viewpoints or lighting conditions, a uniform matching score can be obtained for inspection images of any viewpoint or lighting conditions. An improvement in judgment accuracy can be expected. Below, Example 4 is described using the example shown in FIG.

<ハードウェア>
実施例4における検査装置のハードウェアや検査装置に接続される機器は、実施例2と同様であるため、その説明を省略する。
<Hardware>
Since the hardware of the inspection apparatus and the equipment connected to the inspection apparatus in the fourth embodiment are the same as those in the second embodiment, the description thereof is omitted.

<機能>
実施例4における機能的な構成については、実施例2や実施例3の機能的な構成に対して抽出部以外の機能は同様である。よって、以下では、実施例4における抽出部の機能について説明する。なお、実施例4における抽出部は、実施例2でも実施例3でも適用可能であるが、以下では、実施例3に適用する場合について説明する。
<Function>
Regarding the functional configuration in the fourth embodiment, the functions other than the extraction unit are the same as the functional configurations in the second and third embodiments. Therefore, the function of the extraction unit in the fourth embodiment will be described below. In addition, although the extraction part in Example 4 is applicable also in Example 2 or Example 3, the case where it applies to Example 3 is demonstrated below.

図28は、実施例4における抽出部501の機能の一例を示すブロック図である。図28に示す例では、抽出部501は、領域検出部510、部分画像抽出部520を有する。   FIG. 28 is a block diagram illustrating an example of the function of the extraction unit 501 according to the fourth embodiment. In the example illustrated in FIG. 28, the extraction unit 501 includes a region detection unit 510 and a partial image extraction unit 520.

領域検出部510は、取得部300から入力された照明位置及び視点位置が異なる複数の検査画像に対し、共通の部分画像領域を検出する。なお、領域検出部510は、照明位置又は視点位置が異なる複数の画像に対し、共通の部分画像領域を検出してもよい。   The region detection unit 510 detects a common partial image region for a plurality of inspection images having different illumination positions and viewpoint positions input from the acquisition unit 300. Note that the area detection unit 510 may detect a common partial image area for a plurality of images having different illumination positions or viewpoint positions.

領域検出部510は、共通間隔検出部511、部分画像領域検出部512を有する。共通間隔検出部511は、複数の検査画像それぞれにおける水平方向の画素間の輝度差の総和に基づき、共通の部分画像領域に対する共通の間隔を検出する。共通間隔の検出処理の詳細は後述する。   The region detection unit 510 includes a common interval detection unit 511 and a partial image region detection unit 512. The common interval detection unit 511 detects a common interval for a common partial image region based on the sum of luminance differences between pixels in the horizontal direction in each of the plurality of inspection images. Details of the common interval detection process will be described later.

部分画像領域検出部512は、複数の検査画像それぞれの水平又は垂直方向の輝度積分の総和に基づき、共通の部分画像領域の位置及びサイズを検出する。共通領域の検出処理の詳細は後述する。   The partial image region detection unit 512 detects the position and size of the common partial image region based on the sum of the luminance integrals in the horizontal or vertical direction of each of the plurality of inspection images. Details of the common area detection processing will be described later.

部分画像抽出部520は、複数の検査画像それぞれから、共通の部分画像領域内の部分画像を複数抽出する。部分画像抽出部520は、抽出した複数の部分画像を作成部312及び記憶部313に出力する。   The partial image extraction unit 520 extracts a plurality of partial images in a common partial image region from each of the plurality of inspection images. The partial image extraction unit 520 outputs the extracted plurality of partial images to the creation unit 312 and the storage unit 313.

<共通化処理>
次に、部分画像領域の共通化処理について説明する。まず、共通のリード間隔が検出される。
<Common processing>
Next, the sharing process of partial image areas will be described. First, a common lead interval is detected.

図29は、共通リード間隔の検出を説明するための図である。まず、視点や照明条件が異なっても、リード間隔は一定であるため、図29に示すように複数の検査画像を総合的に処理することにより、共通リード間隔を求める。図29では、説明を簡単にするため、左右のカメラで撮像された検査画像に対して、共通リード間隔を求める例を示す。   FIG. 29 is a diagram for explaining the detection of the common lead interval. First, since the lead interval is constant even when the viewpoint and illumination conditions are different, the common lead interval is obtained by comprehensively processing a plurality of inspection images as shown in FIG. FIG. 29 shows an example in which the common lead interval is obtained for the inspection images captured by the left and right cameras for the sake of simplicity.

図29(A)は、左カメラで撮像された検査画像を示し、図29(B)は、右カメラで撮像された検査画像を示す。共通間隔検出部511は、左右の検査画像それぞれに対して、図29(C)、(D)に示すような輝度差のヒストグラムを作成する。共通間隔検出部511は、図5や6で説明した処理と同様の処理を行って、輝度差のヒストグラムを作成する。   FIG. 29A shows an inspection image captured by the left camera, and FIG. 29B shows an inspection image captured by the right camera. The common interval detection unit 511 creates a luminance difference histogram as shown in FIGS. 29C and 29D for the left and right inspection images. The common interval detection unit 511 performs processing similar to the processing described with reference to FIGS. 5 and 6 to create a luminance difference histogram.

図29(C)、(D)に示すヒストグラムは、図6と同様に、極小となる横軸の画素間隔がコネクタのリード間隔に相当する。図29(C)、(D)に示すように、左右のヒストグラムは、各リードの見え方の違いやノイズなどのために幾らか歪んでいるが、左右のヒストグラムを加算して平均化すればそのようなノイズが相殺される。   In the histograms shown in FIGS. 29C and 29D, as in FIG. 6, the minimum horizontal pixel interval corresponds to the connector lead interval. As shown in FIGS. 29C and 29D, the left and right histograms are somewhat distorted due to differences in the appearance of each lead, noise, etc., but if the left and right histograms are added and averaged, Such noise is canceled out.

よって、共通間隔検出部511は、図29(E)に示すように、左右のヒストグラムを加算して平均化したヒストグラムを作成する。共通間隔検出部511は、図29(E)に示すヒストグラムの極小位置を検出することで、適切な共通リード間隔を求めることができる。   Therefore, as shown in FIG. 29E, the common interval detection unit 511 creates a histogram by averaging the left and right histograms. The common interval detection unit 511 can obtain an appropriate common lead interval by detecting the minimum position of the histogram shown in FIG.

検査装置は、検出された共通のリード間隔を利用することで、左右それぞれの画像におけるリードの矩形領域の検出精度を向上させることができる。   The inspection apparatus can improve the detection accuracy of the rectangular region of the lead in each of the left and right images by using the detected common lead interval.

なお、照明条件が異なる条件が追加されても、共通間隔検出部511は、照明条件及び視点位置が異なる複数の検査画像から作成された輝度差のヒストグラムを加算して平均化すればよい。   Even if conditions with different illumination conditions are added, the common interval detection unit 511 may add and average luminance difference histograms created from a plurality of inspection images with different illumination conditions and viewpoint positions.

なお、左右のカメラでスケールが異なる場合には、共通間隔検出部511は、カメラキャリブレーションで得られたスケール差に合わせて、左右間の画面内の距離(画素数)を変換すればよい。   When the left and right cameras have different scales, the common interval detection unit 511 may convert the distance (number of pixels) in the screen between the left and right according to the scale difference obtained by camera calibration.

次に、リード間隔の検出について処理を効率化する例を説明する。図30は、リード間隔の処理効率化を説明するための図である。ここで、コネクタ部品のリード間隔は、それぞれの製品分野における規格により概ね決まっている。   Next, an example of improving the efficiency of processing for detecting the read interval will be described. FIG. 30 is a diagram for explaining the processing efficiency of the read interval. Here, the lead intervals of the connector parts are generally determined by the standards in each product field.

例えば、リード間隔が、0.4mmおよび0.5mmのいずれかであるということが予め分かっていれば、抽出部は、図30に示すように、リード間隔に応じた画素間隔の部分に絞ってヒストグラム作成を行えばよい。これにより、リード間隔における処理量を削減できる。なお、この処理効率化は、実施例1〜3についても適用することができる。   For example, if it is known in advance that the lead interval is either 0.4 mm or 0.5 mm, the extraction unit narrows down to a pixel interval portion corresponding to the lead interval as shown in FIG. What is necessary is just to create a histogram. Thereby, the processing amount in the read interval can be reduced. In addition, this process efficiency improvement is applicable also about Examples 1-3.

また、検査画像中には、リードの半田接合部以外にも、コネクタのハウジングの金具などが周期的に映る場合がある。図31は、金具部分を含む検査画像の一例を示す図である。ここで、抽出したリードや半田接合部以外の輝度値が高い部分をノイズ部分と呼ぶ。ノイズ部分は、例えば図31に示すような金具部分である。   In addition, in addition to the solder joints of the leads, the connector housing fittings and the like may periodically appear in the inspection image. FIG. 31 is a diagram illustrating an example of an inspection image including a metal part. Here, a portion having a high luminance value other than the extracted lead and solder joint portion is referred to as a noise portion. The noise part is a metal part as shown in FIG. 31, for example.

抽出部は、リード間隔を検出する際に、ノイズ部分を除去するためには、以下の判定基準を用いることができる。
・明るい部分の大きさが所定の範囲であればノイズ部分と見なす。
特に、垂直方向のサイズが小さければリードではなく金具と考えられる。
・明るい部分の広がりが所定の形状であればノイズ部分と見なす。
特に、横長の形状であればリードではなく金具と考えられる。
・抽出した領域の相関値が所定の値以上であれば金具部分と見なす。
リードや半田フィレットの画像は個々にばらつきがあるが、金具の部分はほとんど同じ画像であるため、相関値が非常に高い値に集中する。
When the extraction unit detects the lead interval, the following criterion can be used to remove the noise portion.
・ If the size of the bright part is within the specified range, it is considered as a noise part.
In particular, if the size in the vertical direction is small, it is considered as a metal fitting instead of a lead.
・ If the bright part has a predetermined shape, it is considered a noise part.
In particular, a horizontally long shape is considered to be a metal fitting instead of a lead.
-If the correlation value of the extracted area is greater than or equal to a predetermined value, it is considered as a bracket part.
The images of leads and solder fillets vary individually, but the metal parts are almost the same image, so the correlation values are concentrated on very high values.

よって、抽出部は、上記のいずれかの条件を満たす部分をノイズ部分として除去し、他の位置でリード間隔を検出する。これにより、検査画像中の様々な部分でリード間隔の検出を行う時に、適切なリード間隔を検出することが可能となる。   Therefore, the extraction unit removes a portion that satisfies any of the above conditions as a noise portion, and detects the lead interval at another position. This makes it possible to detect an appropriate lead interval when detecting the lead interval at various parts in the inspection image.

次に、共通の部分画像領域の検出について説明する。複数の検査画像それぞれの部分画像領域の検出の仕方は、図7で説明した通りである。よって、部分画像領域検出部512は、それぞれの検査画像に対し、水平、垂直方向の輝度積分を行い、所定の輝度積分値以上の範囲を部分画像領域として検出する。   Next, detection of a common partial image area will be described. The method of detecting the partial image area of each of the plurality of inspection images is as described with reference to FIG. Therefore, the partial image region detection unit 512 performs luminance integration in the horizontal and vertical directions for each inspection image, and detects a range equal to or greater than a predetermined luminance integration value as the partial image region.

部分画像領域検出部512は、それぞれの検査画像で求められた水平、垂直方向の輝度積分値の加算し、加算された積分値に基づいて、共通の部分画像領域を検出する。   The partial image region detection unit 512 adds the horizontal and vertical luminance integral values obtained from the respective inspection images, and detects a common partial image region based on the added integral value.

図32は、共通部分画像領域の垂直範囲を検出するための図である。図32では、説明を簡単にするため、左右のカメラで撮像された検査画像に対して、共通部分画像領域の垂直範囲を求める例を示す。共通部分画像領域とは、複数の検査画像で共通して用いられる、部分画像の領域をいう。   FIG. 32 is a diagram for detecting the vertical range of the common partial image area. FIG. 32 shows an example in which the vertical range of the common partial image region is obtained with respect to the inspection images captured by the left and right cameras for the sake of simplicity. The common partial image region refers to a partial image region that is used in common by a plurality of inspection images.

図32(A)は、左カメラの検査画像を示し、図32(B)は、左カメラの検査画像に対して水平方向に積分を行った積分値を示す。図32(C)は、右カメラの検査画像を示し、図32(D)は、右カメラの検査画像に対して水平方向に積分を行った積分値を示す。   FIG. 32A shows an inspection image of the left camera, and FIG. 32B shows an integration value obtained by integrating the inspection image of the left camera in the horizontal direction. FIG. 32C shows an inspection image of the right camera, and FIG. 32D shows an integration value obtained by integrating the inspection image of the right camera in the horizontal direction.

部分画像領域検出部512は、図32(B)に示す輝度積分値と図32(D)に示す輝度積分値の和を求め(図32(E))、この左右の積分値の和に基づいて垂直方向の範囲を定める。垂直方向の所定範囲sについては、図7に示す処理と同様にして求められる。   The partial image area detection unit 512 obtains the sum of the luminance integral value shown in FIG. 32B and the luminance integral value shown in FIG. 32D (FIG. 32E), and based on the sum of the left and right integral values. To define the vertical range. The predetermined range s in the vertical direction is obtained in the same manner as the processing shown in FIG.

また、図32(F)は、左カメラの検査画像に対して垂直方向に積分を行った積分値を示し、図32(G)は、右カメラの検査画像に対して垂直方向に積分を行った積分値を示す。   FIG. 32 (F) shows an integration value obtained by integrating the inspection image of the left camera in the vertical direction, and FIG. 32 (G) shows the integration value in the vertical direction of the inspection image of the right camera. The integrated value is shown.

部分画像領域検出部512は、垂直方向と同様にして、図32(F)に示す積分値と図32(G)に示す積分値との和を求め、この左右の積分値の和に基づいて水平方向の範囲を定める。この水平方向の所定範囲tについては、図7に示す処理と同様にして求められる。   Similar to the vertical direction, partial image region detection section 512 obtains the sum of the integral value shown in FIG. 32 (F) and the integral value shown in FIG. 32 (G), and based on the sum of the left and right integral values. Define the horizontal range. The predetermined range t in the horizontal direction is obtained in the same manner as the processing shown in FIG.

なお、リードや半田接合部は複雑な立体形状であるため、視点や照明位置が変われば明るく映る部分も変化し、半田接合部であっても暗く映ってしまう場合がある。この場合には、部分画像領域検出部512は、左右の検査画像のどちらか一方でも明るい部分をリード部分とみなして部分画像領域を設定してもよい。部分領域検出部512は、例えば、左右の対応する垂直、水平位置の輝度積分の論理和を取ったり、単純な加算平均も行ったりすることも可能である。   Since the lead and the solder joint have a complicated three-dimensional shape, if the viewpoint or illumination position changes, the portion that appears bright changes, and even the solder joint may appear dark. In this case, the partial image region detection unit 512 may set a partial image region by regarding a bright portion of either one of the left and right inspection images as a lead portion. For example, the partial area detection unit 512 can perform a logical sum of luminance integration at corresponding vertical and horizontal positions on the left and right sides, or can perform a simple addition average.

これにより、検査すべき部分を含んだ部分画像領域を検出することができる。左右で共通の垂直、水平範囲の部分画像を用いることにより、共通部分画像領域が得られる。   Thereby, a partial image area including a portion to be inspected can be detected. By using partial images in the vertical and horizontal ranges that are common to the left and right, a common partial image region can be obtained.

<動作>
次に、実施例4における検査装置の動作について説明する。図33は、実施例4における検査処理の一例を示すフローチャートである。図33に示すステップS801〜S802の処理は、図19に示すステップS601〜S602の処理と同様であるため、その説明を省略する。
<Operation>
Next, the operation of the inspection apparatus in Example 4 will be described. FIG. 33 is a flowchart illustrating an example of inspection processing according to the fourth embodiment. The processes in steps S801 to S802 shown in FIG. 33 are the same as the processes in steps S601 to S602 shown in FIG.

ステップS803で、設定部301は、全ての照明条件で撮像を行ったかを判定する。例えば、設定部301は、右、中央、左の順で照明位置を変更する場合、左に照明機器11がある場合は、全ての照明条件で撮像したと判定する。   In step S803, the setting unit 301 determines whether imaging has been performed under all illumination conditions. For example, when changing the illumination position in the order of right, center, and left, the setting unit 301 determines that imaging has been performed under all illumination conditions when the illumination device 11 is on the left.

全ての照明条件で撮像していれば(ステップS803−YES)ステップS804に進み、全ての照明条件で撮像していなければ(ステップS803−NO)照明条件を変更しステップS801に戻る。   If the image is captured under all illumination conditions (step S803-YES), the process proceeds to step S804. If the image is not captured under all illumination conditions (step S803-NO), the illumination condition is changed and the process returns to step S801.

ステップS804で、抽出部501は、全ての検査画像に対して共通部分画像領域の抽出に成功したかを判定する。共通部分領域画像の検出処理については図34を用いて説明する。抽出に成功すれば(ステップS804−YES)ステップS805に進み、抽出に失敗すれば(ステップS804−NO)検査処理を終了する。   In step S804, the extraction unit 501 determines whether the common partial image region has been successfully extracted for all inspection images. The common partial area image detection process will be described with reference to FIG. If the extraction is successful (step S804-YES), the process proceeds to step S805, and if the extraction fails (step S804-NO), the inspection process is terminated.

ステップS805〜S807では、図25に示すステップS704〜S706の処理を照明条件毎に行う。   In steps S805 to S807, the processing of steps S704 to S706 shown in FIG. 25 is performed for each illumination condition.

ステップS808〜S810は、図25に示すステップS708〜S710と同様であるため、その説明を省略する。   Steps S808 to S810 are the same as steps S708 to S710 shown in FIG.

図34は、実施例4における共通部分画像領域の検出処理の一例を示すフローチャートである。図34に示すステップS901で、抽出部501は、検査画像の画面全体での水平方向の輝度積分を行う。   FIG. 34 is a flowchart illustrating an example of the common partial image region detection process according to the fourth embodiment. In step S901 illustrated in FIG. 34, the extraction unit 501 performs luminance integration in the horizontal direction over the entire screen of the inspection image.

ステップS902で、抽出部501は、全検査画像に対して、水平方向の輝度積分を累積したかを判定する。全検査画像に対して累積していれば(ステップS902−YES)ステップS903に進み、全検査画像に対して累積していなければ(ステップS90−NO)未処理の検査画像に対して処理を行うためステップS901に戻る。   In step S902, the extraction unit 501 determines whether the luminance integration in the horizontal direction has been accumulated for all inspection images. If all the inspection images have been accumulated (step S902-YES), the process proceeds to step S903. If all the inspection images have not been accumulated (step S90-NO), the unprocessed inspection image is processed. Therefore, the process returns to step S901.

ステップS903〜S904の処理は、図11に示すステップS201〜S202の処理と同様であるため、その説明を省略する。   The processing in steps S903 to S904 is the same as the processing in steps S201 to S202 shown in FIG.

ステップS905で、抽出部501は、全検査画像に対して、輝度差ヒストグラムの作成が完了したかを判定する。全検査画像に対して作成が完了していれば(ステップS905−YES)ステップS906に進み、全検査画像に対して作成が完了していなければ(ステップS905−NO)全検査画像に対して輝度差ヒストグラムを作成するためステップS904に戻る。   In step S905, the extraction unit 501 determines whether the creation of the luminance difference histogram has been completed for all inspection images. If creation has been completed for all inspection images (YES in step S905), the process proceeds to step S906. If creation has not been completed for all inspection images (NO in step S905), brightness for all inspection images is determined. The process returns to step S904 to create a difference histogram.

ステップS906〜S907の処理は、図11に示すステップS203〜S204の処理と同様であるため、その説明を省略する。   The processing in steps S906 to S907 is the same as the processing in steps S203 to S204 shown in FIG.

ステップS908で、抽出部501は、リード間隔が検出された水平位置の上下近傍に対して、水平方向の輝度積分値を取得する。   In step S908, the extraction unit 501 acquires a luminance integration value in the horizontal direction for the upper and lower vicinity of the horizontal position where the lead interval is detected.

ステップS909で、抽出部501は、輝度積分値が所定値以上を表す高輝度が、所定の長さ連続しているかを判定する。所定の長さとは、リード部分の長さに相当し、実験などにより適切な値が設定される。高輝度が所定の長さ連続していれば(ステップS909−YES)、全検査画像から共通のリード間隔を検出できたとしてステップS910、S914に進み、高輝度が所定の長さ連続していなければ(ステップS909−NO)別の水平ラインを選択するためステップS903に戻る。この処理により、例えば金具などのノイズ部分を除去することができる。   In step S909, the extraction unit 501 determines whether or not high luminance representing a luminance integral value equal to or greater than a predetermined value is continuous for a predetermined length. The predetermined length corresponds to the length of the lead portion, and an appropriate value is set by experiment or the like. If the high brightness continues for a predetermined length (step S909-YES), it is determined that a common lead interval can be detected from all inspection images, and the process proceeds to steps S910 and S914, and the high brightness must continue for a predetermined length. (Step S909—NO), the process returns to Step S903 to select another horizontal line. By this processing, for example, a noise part such as a metal fitting can be removed.

ステップS910で、抽出部501は、全検査画像に対して、垂直方向の輝度積分を行う。   In step S910, the extraction unit 501 performs luminance integration in the vertical direction for all inspection images.

ステップS911で、抽出部501は、全検査画像の垂直方向の輝度積分値をリード間隔毎に累積する。   In step S911, the extraction unit 501 accumulates the luminance integration values in the vertical direction of all inspection images at each read interval.

ステップS912で、抽出部501は、リード間隔内での、輝度積分値の累積値のピークを、リード内の中心位置として検出する。   In step S912, the extraction unit 501 detects the peak of the accumulated value of the integrated luminance value within the lead interval as the center position in the lead.

ステップS913で、抽出部501は、全検査画像の左端のリードの水平範囲として、リードの中心位置に基づく所定範囲tを検出する。   In step S913, the extraction unit 501 detects a predetermined range t based on the center position of the lead as the horizontal range of the lead at the left end of all inspection images.

ステップS914で、抽出部501は、全検査画像の水平方向の輝度積分値を用いて、リードの垂直範囲として、所定範囲sを検出する。   In step S914, the extraction unit 501 detects the predetermined range s as the vertical range of the lead by using the luminance integrated value in the horizontal direction of all inspection images.

なお、ステップS910〜S913とステップS914とは、順不同であり、平行して処理が行われてもよいし、どちらかが先に行われてもよい。   Note that steps S910 to S913 and step S914 are out of order, and the processes may be performed in parallel, or one of them may be performed first.

ステップS915で、抽出部501は、検出された左端の水平範囲の所定範囲tと、垂直範囲の所定範囲sとによる矩形領域の画像を共通部分画像領域として検出する。   In step S915, the extraction unit 501 detects, as a common partial image area, an image of a rectangular area that includes the detected predetermined range t of the leftmost horizontal range and the predetermined range s of the vertical range.

ステップS916で、抽出部501は、左端の共通部分画像領域が決定したら、例えば共通部分画像領域の中心位置を共通リード間隔だけ水平方向にずらしていくことで、全ての共通部分画像領域を検出することができる。   In step S916, when the leftmost common partial image area is determined, the extraction unit 501 detects all the common partial image areas by, for example, shifting the center position of the common partial image area in the horizontal direction by the common lead interval. be able to.

これにより、全検査画像から、リード及び半田接合部を含む共通部分画像領域を検出することができる。この後、抽出部501は、全検査画像に対して、共通部分画像領域に含まれる画像を部分画像として抽出する。   Thereby, the common partial image area including the lead and the solder joint can be detected from all the inspection images. Thereafter, the extraction unit 501 extracts an image included in the common partial image region as a partial image for all inspection images.

以上、実施例4によれば、照明位置や視点位置を変えて撮像された複数の検査画像に対して、部分画像の位置やサイズを共通化することで、共通の位置やサイズの部分画像を用いて良否判定をすることができ、効率よく実装不良を検出することができる。   As described above, according to the fourth embodiment, by sharing the position and size of the partial image with respect to the plurality of inspection images captured by changing the illumination position and the viewpoint position, the partial image having the common position and size can be obtained. It can be used to make a pass / fail judgment, and a mounting defect can be detected efficiently.

[変形例]
なお、前述した各実施例で説明した検査処理を実現するためのプログラムを記録媒体に記録することで、各実施例での検査処理をコンピュータに実施させることができる。例えば、このプログラムを記録媒体に記録し、このプログラムが記録された記録媒体をコンピュータに読み取らせて、前述した検査処理を実現させることも可能である。
[Modification]
In addition, by recording a program for realizing the inspection process described in each of the above-described embodiments on a recording medium, the computer can execute the inspection process in each of the embodiments. For example, it is possible to record the program on a recording medium and cause the computer to read the recording medium on which the program is recorded, thereby realizing the above-described inspection processing.

なお、記録媒体は、CD−ROM、フレキシブルディスク、光磁気ディスク等の様に情報を光学的、電気的或いは磁気的に記録する記録媒体、ROM、フラッシュメモリ等の様に情報を電気的に記録する半導体メモリ等、様々なタイプの記録媒体を用いることができる。この記録媒体には、搬送波は含まれない。   The recording medium is a recording medium that records information optically, electrically, or magnetically, such as a CD-ROM, flexible disk, magneto-optical disk, etc., and information is electrically recorded such as ROM, flash memory, etc. Various types of recording media such as a semiconductor memory can be used. This recording medium does not include a carrier wave.

以上、各実施例について詳述したが、特定の実施例に限定されるものではなく、特許請求の範囲に記載された範囲内において、種々の変形及び変更が可能である。また、前述した各実施例の構成要素を全部又は複数を組み合わせることも可能である。   Although each embodiment has been described in detail above, it is not limited to a specific embodiment, and various modifications and changes can be made within the scope described in the claims. It is also possible to combine all or a plurality of the constituent elements of the above-described embodiments.

なお、以上の各実施例に関し、さらに以下の付記を開示する。
(付記1)
複数の半田接合部を含む画像から、前記半田接合部を含む部分画像を複数抽出する抽出部と、
前記抽出部により抽出された複数の部分画像を用いて、前記半田接合部の実装の良否を判定する基準となる基準画像を作成する作成部と、
前記作成部により作成された基準画像と各部分画像とを比較する比較部と、
前記比較部による比較結果に基づき、各半田接合部の実装の良否を判定する判定部と、
を備える検査装置。
(付記2)
前記抽出部は、
照明位置が異なる複数の前記画像それぞれに対して前記部分画像を複数抽出し、
前記作成部は、
複数の前記画像それぞれに対して前記基準画像を作成し、
前記比較部は、
前記画像毎に、該画像の基準画像と、該画像の各部分画像とを比較する付記1記載の検査装置。
(付記3)
前記抽出部は、
撮像部の視点位置が異なる複数の前記画像それぞれに対して前記部分画像を複数抽出し、
前記作成部は、
複数の前記画像それぞれに対して前記基準画像を作成し、
前記比較部は、
前記画像毎に、該画像の基準画像と、該画像の各部分画像とを比較する付記1又は2記載の検査装置。
(付記4)
複数の前記画像は、左右の2視点から撮像された画像であり、
前記左右の画像を用いて3次元計測を行って、前記部分画像内の検査対象部品の3次元位置を計測する計測部をさらに備え、
前記判定部は、
前記3次元位置及び前記比較結果に基づき、各半田接合部の実装の良否を判定する付記3記載の検査装置。
(付記5)
前記判定部は、
前記複数の画像毎に異なる実装の良否判定を行う付記4記載の検査装置。
(付記6)
前記判定部は、
各部分画像の前記3次元位置のばらつき幅、又は各部分画像の前記3次元位置から求められる近似直線の傾きに基づき良否判定を行う付記4記載の検査装置。
(付記7)
前記作成部は、
前記複数の部分画像に対し、部分画像同士で相関値を算出し、該相関値が閾値より高い部分画像を平均化することで前記基準画像を作成する付記1乃至6いずれか一項に記載の検査装置。
(付記8)
前記抽出部は、
前記照明位置及び/又は前記視点位置が異なる前記複数の画像に対し、共通の部分画像領域を検出する領域検出部と、
前記複数の画像それぞれから、前記共通の部分画像領域内の部分画像を複数抽出する部分画像抽出部とを備える付記3記載の検査装置。
(付記9)
前記領域検出部は、
前記複数の画像それぞれの水平又は垂直方向の輝度積分の総和に基づき、前記共通の部分画像領域の位置及びサイズを検出する付記8記載の検査装置。
(付記10)
前記領域検出部は、
前記複数の画像それぞれにおける水平方向の画素間の輝度差の総和に基づき、前記共通の部分画像領域に対する共通の間隔を検出する付記9記載の検査装置。
(付記11)
複数の半田接合部を含む画像から、前記半田接合部を含む部分画像を複数抽出し、
抽出された複数の前記部分画像を用いて、前記半田接合部の実装の良否を判定する基準となる基準画像を作成し、
作成された前記基準画像と各部分画像とを比較し、
比較結果に基づき、各半田接合部の実装の良否を判定する処理をコンピュータが実行する検査方法。
(付記12)
複数の半田接合部を含む画像から、前記半田接合部を含む部分画像を複数抽出し、
抽出された複数の前記部分画像を用いて、前記半田接合部の実装の良否を判定する基準となる基準画像を作成し、
作成された前記基準画像と各部分画像とを比較し、
比較結果に基づき、各半田接合部の実装の良否を判定する処理をコンピュータに実行させるための検査プログラム。
In addition, the following additional notes are disclosed regarding each of the above embodiments.
(Appendix 1)
An extraction unit for extracting a plurality of partial images including the solder joints from an image including a plurality of solder joints;
Using a plurality of partial images extracted by the extraction unit, a creation unit that creates a reference image serving as a reference for determining whether the solder joint is mounted or not,
A comparison unit that compares the reference image created by the creation unit with each partial image;
Based on the comparison result by the comparison unit, a determination unit that determines the quality of the mounting of each solder joint,
An inspection apparatus comprising:
(Appendix 2)
The extraction unit includes:
Extracting a plurality of the partial images for each of the plurality of images having different illumination positions;
The creating unit
Creating the reference image for each of the plurality of images,
The comparison unit includes:
The inspection apparatus according to appendix 1, wherein for each image, a reference image of the image is compared with each partial image of the image.
(Appendix 3)
The extraction unit includes:
Extracting a plurality of partial images for each of the plurality of images having different viewpoint positions of the imaging unit;
The creating unit
Creating the reference image for each of the plurality of images,
The comparison unit includes:
The inspection apparatus according to appendix 1 or 2, wherein for each image, a reference image of the image is compared with each partial image of the image.
(Appendix 4)
The plurality of images are images taken from two left and right viewpoints,
It further includes a measurement unit that performs three-dimensional measurement using the left and right images and measures a three-dimensional position of the inspection target component in the partial image,
The determination unit
The inspection apparatus according to supplementary note 3, wherein the quality of mounting of each solder joint portion is determined based on the three-dimensional position and the comparison result.
(Appendix 5)
The determination unit
The inspection apparatus according to appendix 4, which performs pass / fail determination of different mounting for each of the plurality of images.
(Appendix 6)
The determination unit
The inspection apparatus according to appendix 4, wherein quality determination is performed based on a variation width of the three-dimensional position of each partial image or an inclination of an approximate line obtained from the three-dimensional position of each partial image.
(Appendix 7)
The creating unit
The correlation image is calculated between the partial images for the plurality of partial images, and the reference image is created by averaging the partial images having a correlation value higher than a threshold value. Inspection device.
(Appendix 8)
The extraction unit includes:
An area detection unit for detecting a common partial image area for the plurality of images having different illumination positions and / or viewpoint positions;
The inspection apparatus according to appendix 3, further comprising: a partial image extraction unit that extracts a plurality of partial images in the common partial image region from each of the plurality of images.
(Appendix 9)
The region detection unit
The inspection apparatus according to appendix 8, wherein the position and size of the common partial image area are detected based on a sum of luminance integrals in the horizontal or vertical direction of each of the plurality of images.
(Appendix 10)
The region detection unit
The inspection apparatus according to appendix 9, wherein a common interval with respect to the common partial image region is detected based on a sum of luminance differences between horizontal pixels in each of the plurality of images.
(Appendix 11)
Extracting a plurality of partial images including the solder joints from an image including a plurality of solder joints,
Using a plurality of the extracted partial images, create a reference image that serves as a reference for determining the quality of the solder joint mounting,
Compare the created reference image with each partial image,
An inspection method in which a computer executes a process for determining whether or not each solder joint is mounted based on a comparison result.
(Appendix 12)
Extracting a plurality of partial images including the solder joints from an image including a plurality of solder joints,
Using a plurality of the extracted partial images, create a reference image that serves as a reference for determining the quality of the solder joint mounting,
Compare the created reference image with each partial image,
An inspection program for causing a computer to execute processing for determining whether or not each solder joint is mounted based on the comparison result.

10 検査装置
11 照明機器
12 撮像部
12−1 第1撮像部
12−2 第2撮像部
13 表示部
20 集積回路
21 リード
22 半田接合部
101 制御部
102 主記憶部
103 補助記憶部
104 通信部
105 ドライブ装置
201、300 取得部
202、302、401 画像処理部
203、303 判定部
211、311、501 抽出部
212、312 作成部
213、313 記憶部
214、314 比較部
221、321 算出部
301 設定部
411 計測部
421 半田良否判定部
422 高さ良否判定部
510 領域検出部
511 共通間隔検出部
512 部分画像領域検出部
520 部分画像抽出部
DESCRIPTION OF SYMBOLS 10 Inspection apparatus 11 Illumination equipment 12 Image pick-up part 12-1 1st image pick-up part 12-2 2nd image pick-up part 13 Display part 20 Integrated circuit 21 Lead 22 Solder joint part 101 Control part 102 Main memory part 103 Auxiliary memory part 104 Communication part 105 Drive device 201, 300 Acquisition unit 202, 302, 401 Image processing unit 203, 303 Judgment unit 211, 311, 501 Extraction unit 212, 312 Creation unit 213, 313 Storage unit 214, 314 Comparison unit 221, 321 Calculation unit 301 Setting unit 411 Measuring unit 421 Solder quality determination unit 422 Height quality determination unit 510 Area detection unit 511 Common interval detection unit 512 Partial image area detection unit 520 Partial image extraction unit

Claims (10)

複数の半田接合部を含む画像から、前記半田接合部を含む部分画像を複数抽出する抽出部と、
前記抽出部により抽出された複数の部分画像を用いて、前記半田接合部の実装の良否を判定する基準となる基準画像を作成する作成部と、
前記作成部により作成された基準画像と各部分画像とを比較する比較部と、
前記比較部による比較結果に基づき、各半田接合部の実装の良否を判定する判定部と、
を備える検査装置。
An extraction unit for extracting a plurality of partial images including the solder joints from an image including a plurality of solder joints;
Using a plurality of partial images extracted by the extraction unit, a creation unit that creates a reference image serving as a reference for determining whether the solder joint is mounted or not,
A comparison unit that compares the reference image created by the creation unit with each partial image;
Based on the comparison result by the comparison unit, a determination unit that determines the quality of the mounting of each solder joint,
An inspection apparatus comprising:
前記抽出部は、
照明位置が異なる複数の前記画像それぞれに対して前記部分画像を複数抽出し、
前記作成部は、
複数の前記画像それぞれに対して前記基準画像を作成し、
前記比較部は、
前記画像毎に、該画像の基準画像と、該画像の各部分画像とを比較する請求項1記載の検査装置。
The extraction unit includes:
Extracting a plurality of the partial images for each of the plurality of images having different illumination positions;
The creating unit
Creating the reference image for each of the plurality of images,
The comparison unit includes:
The inspection apparatus according to claim 1, wherein a reference image of the image is compared with each partial image of the image for each image.
前記抽出部は、
撮像部の視点位置が異なる複数の前記画像それぞれに対して前記部分画像を複数抽出し、
前記作成部は、
複数の前記画像それぞれに対して前記基準画像を作成し、
前記比較部は、
前記画像毎に、該画像の基準画像と、該画像の各部分画像とを比較する請求項1又は2記載の検査装置。
The extraction unit includes:
Extracting a plurality of partial images for each of the plurality of images having different viewpoint positions of the imaging unit;
The creating unit
Creating the reference image for each of the plurality of images,
The comparison unit includes:
The inspection apparatus according to claim 1 or 2, wherein a reference image of the image is compared with each partial image of the image for each image.
複数の前記画像は、左右の2視点から撮像された画像であり、
前記左右の画像を用いて3次元計測を行って、前記部分画像内の検査対象部品の3次元位置を計測する計測部をさらに備え、
前記判定部は、
前記3次元位置及び前記比較結果に基づき、各半田接合部の実装の良否を判定する請求項3記載の検査装置。
The plurality of images are images taken from two left and right viewpoints,
It further includes a measurement unit that performs three-dimensional measurement using the left and right images and measures a three-dimensional position of the inspection target component in the partial image,
The determination unit
The inspection apparatus according to claim 3, wherein whether or not each solder joint is mounted is determined based on the three-dimensional position and the comparison result.
前記作成部は、
前記複数の部分画像に対し、部分画像同士で相関値を算出し、該相関値が閾値より高い部分画像を平均化することで前記基準画像を作成する請求項1乃至4いずれか一項に記載の検査装置。
The creating unit
5. The reference image is created by calculating a correlation value between the partial images for the plurality of partial images, and averaging the partial images having a correlation value higher than a threshold value. Inspection equipment.
前記抽出部は、
前記照明位置及び/又は前記視点位置が異なる前記複数の画像に対し、共通の部分画像領域を検出する領域検出部と、
前記複数の画像それぞれから、前記共通の部分画像領域内の部分画像を複数抽出する部分画像抽出部とを備える請求項3記載の検査装置。
The extraction unit includes:
An area detection unit for detecting a common partial image area for the plurality of images having different illumination positions and / or viewpoint positions;
The inspection apparatus according to claim 3, further comprising: a partial image extraction unit that extracts a plurality of partial images in the common partial image region from each of the plurality of images.
前記領域検出部は、
前記複数の画像それぞれの水平又は垂直方向の輝度積分の総和に基づき、前記共通の部分画像領域の位置及びサイズを検出する請求項6記載の検査装置。
The region detection unit
The inspection apparatus according to claim 6, wherein the position and size of the common partial image area are detected based on a sum of luminance integrals in the horizontal or vertical direction of each of the plurality of images.
前記領域検出部は、
前記複数の画像それぞれにおける水平方向の画素間の輝度差の総和に基づき、前記共通の部分画像領域に対する共通の間隔を検出する請求項7記載の検査装置。
The region detection unit
The inspection apparatus according to claim 7, wherein a common interval with respect to the common partial image region is detected based on a sum of luminance differences between horizontal pixels in each of the plurality of images.
複数の半田接合部を含む画像から、前記半田接合部を含む部分画像を複数抽出し、
抽出された複数の前記部分画像を用いて、前記半田接合部の実装の良否を判定する基準となる基準画像を作成し、
作成された前記基準画像と各部分画像とを比較し、
比較結果に基づき、各半田接合部の実装の良否を判定する処理をコンピュータが実行する検査方法。
Extracting a plurality of partial images including the solder joints from an image including a plurality of solder joints,
Using a plurality of the extracted partial images, create a reference image that serves as a reference for determining the quality of the solder joint mounting,
Compare the created reference image with each partial image,
An inspection method in which a computer executes a process for determining whether or not each solder joint is mounted based on a comparison result.
複数の半田接合部を含む画像から、前記半田接合部を含む部分画像を複数抽出し、
抽出された複数の前記部分画像を用いて、前記半田接合部の実装の良否を判定する基準となる基準画像を作成し、
作成された前記基準画像と各部分画像とを比較し、
比較結果に基づき、各半田接合部の実装の良否を判定する処理をコンピュータに実行させるための検査プログラム。
Extracting a plurality of partial images including the solder joints from an image including a plurality of solder joints,
Using a plurality of the extracted partial images, create a reference image that serves as a reference for determining the quality of the solder joint mounting,
Compare the created reference image with each partial image,
An inspection program for causing a computer to execute processing for determining whether or not each solder joint is mounted based on the comparison result.
JP2012044623A 2011-08-30 2012-02-29 Inspection device, inspection method, and inspection program Active JP6115012B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012044623A JP6115012B2 (en) 2011-08-30 2012-02-29 Inspection device, inspection method, and inspection program

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2011187652 2011-08-30
JP2011187652 2011-08-30
JP2012044623A JP6115012B2 (en) 2011-08-30 2012-02-29 Inspection device, inspection method, and inspection program

Publications (2)

Publication Number Publication Date
JP2013065809A true JP2013065809A (en) 2013-04-11
JP6115012B2 JP6115012B2 (en) 2017-04-19

Family

ID=48189023

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012044623A Active JP6115012B2 (en) 2011-08-30 2012-02-29 Inspection device, inspection method, and inspection program

Country Status (1)

Country Link
JP (1) JP6115012B2 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013172062A (en) * 2012-02-22 2013-09-02 Sony Corp Mounting device, electronic component quality determination method, program and board manufacturing method
KR101508593B1 (en) 2013-12-03 2015-04-07 주식회사 고영테크놀러지 Solder rework method, solder rework apparatus using the same and board inspection method employing the same
JP2015133406A (en) * 2014-01-14 2015-07-23 オムロン株式会社 Quality management device, quality management method, and program
JP2016095160A (en) * 2014-11-12 2016-05-26 Jfeスチール株式会社 Surface defect detection method and surface defect detection device
JP2018005500A (en) * 2016-06-30 2018-01-11 オムロン株式会社 Image processing system, image processing method, and image processing program
JP2019028610A (en) * 2017-07-27 2019-02-21 富士通株式会社 Computer program for image determination, image determination device and image determination method
JP2020072981A (en) * 2015-11-19 2020-05-14 エンゼルプレイングカード株式会社 Measurement system of chip
US10957156B2 (en) 2016-09-12 2021-03-23 Angel Playing Cards Co., Ltd. Chip measurement system
US11798362B2 (en) 2016-02-01 2023-10-24 Angel Group Co., Ltd. Chip measurement system
JP7443022B2 (en) 2019-10-28 2024-03-05 キヤノン株式会社 Image forming device, image forming method, and program

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02216408A (en) * 1989-02-17 1990-08-29 Omron Tateisi Electron Co Substrate inspection device
JPH02231510A (en) * 1989-03-02 1990-09-13 Omron Tateisi Electron Co Substrate inspection device
JPH1173513A (en) * 1997-06-25 1999-03-16 Matsushita Electric Works Ltd Device and method for pattern inspection
JP2006242873A (en) * 2005-03-07 2006-09-14 Shigeki Kobayashi Inspection device
JP2007078533A (en) * 2005-09-14 2007-03-29 Omron Corp Method of inspecting substrate
JP2008051694A (en) * 2006-08-25 2008-03-06 Matsushita Electric Works Ltd Visual inspection method and system of mounting substrate
JP2009145072A (en) * 2007-12-11 2009-07-02 Omron Corp Measuring method and inspecting method, and measuring device and inspecting device
JP2011158367A (en) * 2010-02-02 2011-08-18 Hitachi Metals Ltd Method, program and apparatus for inspection of object to be inspected

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02216408A (en) * 1989-02-17 1990-08-29 Omron Tateisi Electron Co Substrate inspection device
JPH02231510A (en) * 1989-03-02 1990-09-13 Omron Tateisi Electron Co Substrate inspection device
JPH1173513A (en) * 1997-06-25 1999-03-16 Matsushita Electric Works Ltd Device and method for pattern inspection
JP2006242873A (en) * 2005-03-07 2006-09-14 Shigeki Kobayashi Inspection device
JP2007078533A (en) * 2005-09-14 2007-03-29 Omron Corp Method of inspecting substrate
JP2008051694A (en) * 2006-08-25 2008-03-06 Matsushita Electric Works Ltd Visual inspection method and system of mounting substrate
JP2009145072A (en) * 2007-12-11 2009-07-02 Omron Corp Measuring method and inspecting method, and measuring device and inspecting device
JP2011158367A (en) * 2010-02-02 2011-08-18 Hitachi Metals Ltd Method, program and apparatus for inspection of object to be inspected

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013172062A (en) * 2012-02-22 2013-09-02 Sony Corp Mounting device, electronic component quality determination method, program and board manufacturing method
KR101508593B1 (en) 2013-12-03 2015-04-07 주식회사 고영테크놀러지 Solder rework method, solder rework apparatus using the same and board inspection method employing the same
JP2015133406A (en) * 2014-01-14 2015-07-23 オムロン株式会社 Quality management device, quality management method, and program
JP2016095160A (en) * 2014-11-12 2016-05-26 Jfeスチール株式会社 Surface defect detection method and surface defect detection device
JP2020072981A (en) * 2015-11-19 2020-05-14 エンゼルプレイングカード株式会社 Measurement system of chip
US11798362B2 (en) 2016-02-01 2023-10-24 Angel Group Co., Ltd. Chip measurement system
JP2018005500A (en) * 2016-06-30 2018-01-11 オムロン株式会社 Image processing system, image processing method, and image processing program
US10957156B2 (en) 2016-09-12 2021-03-23 Angel Playing Cards Co., Ltd. Chip measurement system
US11475733B2 (en) 2016-09-12 2022-10-18 Angel Group Co., Ltd. Chip measurement system
JP2019028610A (en) * 2017-07-27 2019-02-21 富士通株式会社 Computer program for image determination, image determination device and image determination method
JP7035357B2 (en) 2017-07-27 2022-03-15 富士通株式会社 Computer program for image judgment, image judgment device and image judgment method
JP7443022B2 (en) 2019-10-28 2024-03-05 キヤノン株式会社 Image forming device, image forming method, and program

Also Published As

Publication number Publication date
JP6115012B2 (en) 2017-04-19

Similar Documents

Publication Publication Date Title
JP6115012B2 (en) Inspection device, inspection method, and inspection program
US10006762B2 (en) Information processing apparatus, information processing method, and storage medium
CN109472271B (en) Printed circuit board image contour extraction method and device
WO2017020829A1 (en) Resolution testing method and resolution testing device
US8345951B2 (en) Image binarizing method, image processing device, and computer program
JP2012145483A (en) Solder inspection method, board inspection system, and solder inspection machine
JP2004340832A (en) Method and system for visual inspection of circuit board
EP3690800A2 (en) Information processing apparatus, information processing method, and program
US6519358B1 (en) Parallax calculating apparatus, distance calculating apparatus, methods of the same, and information providing media
CN108871185B (en) Method, device and equipment for detecting parts and computer readable storage medium
JP2010091361A (en) Method and device for inspecting image
TWI527455B (en) Color correction devices and methods
CN115375679B (en) Edge-finding and point-searching positioning method and device for defective chip
JP4131804B2 (en) Mounting component inspection method
Di Leo et al. Online visual inspection of defects in the assembly of electromechanical parts
KR20130008750A (en) Inspection method
JP2010091360A (en) Method and device for inspecting image
KR101692159B1 (en) Edge position detecting apparatus and edge position detecting method
JP4821647B2 (en) Electronic component terminal position detection method
JP6114559B2 (en) Automatic unevenness detector for flat panel display
JP6115338B2 (en) Inspection device, inspection method, and inspection program
JP3123275B2 (en) Inspection data creation method for electronic parts shortage inspection
US10969428B2 (en) Method of inspecting pattern defect
KR102129970B1 (en) Method And Apparatus for Matching inspection Data Electronic Component
JP2010276481A (en) Image processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141112

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150828

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151006

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151202

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160705

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160902

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170221

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170306

R150 Certificate of patent or registration of utility model

Ref document number: 6115012

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150