[go: up one dir, main page]

JP2008153255A - Model registration method for mounting component inspection, mounting component inspection method, and board inspection apparatus using this method - Google Patents

Model registration method for mounting component inspection, mounting component inspection method, and board inspection apparatus using this method Download PDF

Info

Publication number
JP2008153255A
JP2008153255A JP2006336689A JP2006336689A JP2008153255A JP 2008153255 A JP2008153255 A JP 2008153255A JP 2006336689 A JP2006336689 A JP 2006336689A JP 2006336689 A JP2006336689 A JP 2006336689A JP 2008153255 A JP2008153255 A JP 2008153255A
Authority
JP
Japan
Prior art keywords
model
component
similarity
defective
good
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006336689A
Other languages
Japanese (ja)
Inventor
Kiyoshi Murakami
清 村上
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP2006336689A priority Critical patent/JP2008153255A/en
Publication of JP2008153255A publication Critical patent/JP2008153255A/en
Pending legal-status Critical Current

Links

Landscapes

  • Supply And Installment Of Electrical Components (AREA)

Abstract

【課題】部品の正否を正しく見分けるのに必要な不良モデルの登録を、簡単かつ精度良く実行できるようにする。
【解決手段】部品分類処理部103は、CADデータ入力部101が入力した基板のCADデータを用いて、基板上の各部品を部品種およびサイズが同一のもの毎に分類する。モデル登録部104は、品番毎に、その品番の部品の画像の良モデルをモデル記憶部111に登録するとともに、同じグループに属する他の部品の良モデルを用いて、不良モデルを設定する。検査実行部107は、検査対象の部品について、その部品に対応する良モデルおよび不良モデルを用いて、各モデルに対する検査対象画像の類似度を求める。この結果、いずれの不良モデルに対する類似度よりも良モデルに対する類似度の方が高くなった場合には、検査対象の部品は正しい部品であると判別される。
【選択図】図5
It is possible to easily and accurately perform registration of a defective model necessary for correctly distinguishing between correct and incorrect parts.
A component classification processing unit 103 uses a CAD data of a board input by a CAD data input unit 101 to classify each component on the board into parts having the same component type and size. For each product number, the model registration unit 104 registers a good model of an image of a part with the product number in the model storage unit 111 and sets a defective model using a good model of another part belonging to the same group. The inspection execution unit 107 calculates the similarity of the inspection target image with respect to each model using the good model and the defective model corresponding to the part to be inspected. As a result, when the similarity to the good model is higher than the similarity to any defective model, it is determined that the part to be inspected is a correct part.
[Selection] Figure 5

Description

この発明は、部品の実装工程を終了した後の基板を対象に、正しい部品が実装されているか否かを判別する自動外観検査に関する。   The present invention relates to an automatic visual inspection for determining whether or not a correct component is mounted on a substrate after a component mounting process is completed.

近年の基板生産ラインでは、マウンタの導入によって、部品を自動的に実装することができるが、パーツフィーダへの部品の補充や交換は人手により行われるため、人為ミスによって誤った部品が実装されることがある。このため、従来は、部品実装後の基板の画像から部品の本体部に印刷された文字列を抽出し、これが正しい文字列であるかどうかを判別するなどの方法により、部品の実装間違いを検出するようにしている(特許文献1参照。)。また、文字列のない部品についても、部品の色彩やサイズに基づいて実装間違いを検出するようにしている。   In recent board production lines, parts can be automatically mounted by installing a mounter, but parts are replenished or replaced manually in the parts feeder, so wrong parts are mounted due to human error. Sometimes. For this reason, conventionally, it is possible to detect component mounting errors by extracting a character string printed on the main body of the component from the board image after mounting the component and determining whether this is the correct character string. (See Patent Document 1). In addition, even for a component without a character string, a mounting error is detected based on the color and size of the component.

特開2004−235582JP2004-235582

特許文献1をはじめとする従来の実装部品の検査では、検査対象の部品の画像(以下、「検査対象画像」という。)を、あらかじめ登録した正しい部品の画像(以下、「良モデル」という。)と照合することによって、部品の正否を判別している。たとえば、文字列が印刷された部品については、検査対象画像から切り出した文字列と良モデル中の文字列との類似度を求め、この類似度が所定の判定基準値を上回るときに、検査対象の部品は正しい部品であると判別する。   In conventional inspection of mounted components including Patent Document 1, an image of a component to be inspected (hereinafter referred to as “inspection target image”) is referred to as an image of a correct component registered in advance (hereinafter referred to as “good model”). ) To determine whether the part is correct or not. For example, for a part on which a character string is printed, the similarity between the character string cut out from the image to be inspected and the character string in the good model is obtained, and when this similarity exceeds a predetermined criterion value, This part is determined to be a correct part.

ところで、部品の実装間違いは、外観が似通った部品との取り違えにより生じることが多い。特に文字列が印刷された部品については、文字列の一部が異なるだけで、その他の外観がほぼ同一であるような部品が複数存在するため、部品の取り違えが起こりやすい。   By the way, a component mounting mistake often occurs due to a mistake with a component having a similar appearance. In particular, for a part printed with a character string, there are a plurality of parts whose appearances are almost the same except that only a part of the character string is different.

したがって、文字列の照合により部品の正否を見分ける場合には、文字列の一部の違いでも検出できるように、判定基準値を高く設定する必要がある。しかし、判定基準値を高くすると、正しい部品であっても、文字のかすれやにじみ等により良モデルに対する類似度が落ちた場合には、誤った部品であると判別される可能性があり、検査の精度を確保できなくなる。   Therefore, when discriminating whether a part is correct or not by collating character strings, it is necessary to set the determination reference value high so that even a part of the character strings can be detected. However, if the criterion value is increased, even if it is a correct part, if the similarity to the good model decreases due to blurring or blurring of characters, it may be determined that the part is wrong. It becomes impossible to ensure the accuracy of the.

このような問題を解決する方法として、良モデルのほかに、誤って実装される可能性がある部品の画像(以下、「不良モデル」という。)を登録しておき、これら良/不良の各モデルを検査対象の文字列と個別に照合する方法が考えられる。この場合、検査対象画像について、不良モデルに対する類似度よりも良モデルに対する類似度の方が高ければ、検査対象の部品は正しい部品であると判別し、不良モデルに対する類似度の方が高ければ、検査対象の部品は誤った部品であると判別することになる。   As a method for solving such a problem, in addition to the good model, an image of a part that may be erroneously mounted (hereinafter referred to as “defective model”) is registered, and each of these good / defective items is registered. A method of matching the model individually with the character string to be examined can be considered. In this case, for the inspection target image, if the similarity to the good model is higher than the similarity to the defective model, the part to be inspected is determined to be a correct part, and if the similarity to the defective model is higher, It is determined that the part to be inspected is an incorrect part.

しかし、上記の方法では、どのような不良モデルを登録すれば良いかをユーザが判断する必要があるため、登録に手間がかかる。また、多数のモデルを登録しても、ユーザによるモデルの選択に誤りがあると、検査の精度を確保できないという問題もある。   However, in the above method, since it is necessary for the user to determine what kind of defective model should be registered, it takes time to register. Even if a large number of models are registered, there is a problem that the accuracy of the inspection cannot be ensured if there is an error in the model selection by the user.

この発明は上記の問題に着目してなされたもので、部品の実装工程を経た基板を撮像し、生成された画像中の部品に関する特徴(たとえば文字列、または色彩)を用いて基板に正しい部品が実装されているかどうかを検査する場合に、部品の正否を正しく見分けるのに必要な不良モデルの登録を、簡単かつ精度良く実行できるようにすることを、課題とするものである。   The present invention has been made paying attention to the above-mentioned problem, and images a board that has undergone a component mounting process, and uses the characteristics (for example, character strings or colors) related to the parts in the generated image to correct the parts on the board. It is an object of the present invention to enable easy and accurate registration of a defect model necessary for correctly identifying whether a component is correct or not when inspecting whether or not a component is mounted.

上記の課題を解決するために、この発明では、検査に先立ち、基板の設計データ(たとえばCADデータ)を用いて、各実装部品を部品種およびサイズに基づきグループ分けするステップA、基板上の各部品の画像の良モデルを登録するステップB、ステップBで登録された良モデルに順に着目し、着目中の良モデルが適用される部品と同一のグループに分類された他の部品の良モデルを、着目中の良モデルに対応する不良モデルとして設定するステップC、の各ステップを実行する。そして、検査においては、検査対象の部品毎に、その部品の画像を対象に良モデルおよび不良モデルに対する当該部品の画像の類似度を求め、いずれの不良モデルに対する類似度よりも良モデルに対する類似度の方が高くなったとき、検査対象の部品は正しい部品であると判別し、良モデルに対する類似度よりもいずれか不良モデルに対する類似度の方が高くなったとき、検査対象の部品は誤った部品であると判別する。   In order to solve the above-described problems, in the present invention, prior to the inspection, the design data (for example, CAD data) of the board is used to group the mounted parts based on the component type and size, and each step on the board. Pay attention to the good model registered in Step B, Step B, where the good model of the part image is registered, and select the good model of the other parts classified into the same group as the part to which the good model under consideration is applied. Step C is set as a defective model corresponding to the good model under consideration. Then, in the inspection, for each part to be inspected, the similarity of the image of the part to the good model and the defective model is obtained for the image of the part, and the similarity to the good model is higher than the similarity to any defective model When is higher, it is determined that the part to be inspected is the correct part, and when the similarity to one of the defective models is higher than the similarity to the good model, the part to be inspected is incorrect. It is determined that it is a part.

部品の実装間違いの大半は、パーツフィーダへの部品の補充や交換時に、類似する部品を見誤ることによって生じると考えられる。よって、正しい部品と同一種、同一サイズの部品として実在する部品であって、かつ同じ基板に実装するために現場に準備されている部品が誤実装される可能性が高いと思われる。   The majority of component mounting mistakes are thought to be caused by misreading similar parts when refilling or replacing parts in the parts feeder. Therefore, it is considered that there is a high possibility that a component that exists as a component of the same type and the same size as the correct component and that is prepared in the field for mounting on the same substrate is erroneously mounted.

この発明にかかるモデル登録方法では、上記の点を考慮して、基板上の各実装部品を部品種が同一でサイズが同等の部品毎にグループ分けし、各部品について、それぞれその部品と同じグループに属する部品の良モデルを不良モデルとして設定するので、実装間違いの検出に適した不良モデルを自動的に設定することが可能になる。なお、不良モデルの設定では、各種良モデルをそのまま他の部品の不良モデルとしても良いが、これに限らず、たとえば、不良モデルとするモデルについて、他の部品の良モデルに最も類似する領域を特定し、この領域内の画像を不良モデルとしてもよい。   In the model registration method according to the present invention, in consideration of the above points, each mounted component on the board is grouped into components having the same component type and the same size, and each component has the same group as that component. Since a good model of a part belonging to the item is set as a defective model, it is possible to automatically set a defective model suitable for detecting a mounting error. In the defect model setting, various good models may be used as the defective models of other parts as they are, but not limited to this, for example, for the model to be a defective model, the region most similar to the good models of other parts is selected. The image in this area may be specified as a defective model.

また、ステップAでは、部品種およびサイズに加えて、部品に文字列が印刷されているかを、グループ分けの条件としてもよい。文字列がある部品と文字列のない部品とでは、検査のアルゴリズムが異なるためである。   In step A, in addition to the component type and size, whether a character string is printed on the component may be set as a grouping condition. This is because the inspection algorithm differs between a part with a character string and a part without a character string.

より好ましい態様においては、検査の前に、ステップCで設定された不良モデルの各画素に、それぞれ良モデルの対応画素に対する差に応じた重みを設定し、これらの重みを不良モデルに対応づけて登録するステップDを、さらに実行する。この場合の検査では、検査対象画像と各不良モデルとの間で、それぞれステップDで当該モデルにつき登録された重みにより対応画素間の差を重み付けした値を用いて、画像間の差が大きいほど値が大きくなるように設定された類似度を求める演算により、各不良モデルに対する検査対象画像の類似度を算出する。一方、良モデルについては、各不良モデルに設定したのと同じ重みを用いて前記演算を複数回実行することにより、良モデルに対する検査対象画像の類似度を複数とおり算出する。そして、良モデルに対する類似度と不良モデルに対する類似度とを、同じ重みを用いて算出されたもの毎に組み合わせて比較し、すべての組み合わせにおいて、不良モデルに対する類似度よりも良モデルに対する類似度の方が高くなったとき、前記検査対象の部品は正しい部品であると判別し、いずれかの組み合わせにおいて、不良モデルに対する類似度が良モデルに対する類似度よりも高くなったとき、前記検査対象の部品は誤った部品であると判別する。   In a more preferable aspect, prior to the inspection, weights corresponding to differences with respect to corresponding pixels of the good model are set for each pixel of the defective model set in Step C, and these weights are associated with the defective model. Step D of registration is further executed. In the inspection in this case, the larger the difference between the images, using a value obtained by weighting the difference between corresponding pixels by the weight registered for the model in Step D between the inspection target image and each defective model. The similarity of the image to be inspected with respect to each defective model is calculated by calculating the similarity that is set to increase the value. On the other hand, for the good model, the degree of similarity of the image to be inspected with respect to the good model is calculated in a plurality of ways by executing the calculation a plurality of times using the same weight set for each defective model. Then, the similarity to the good model and the similarity to the bad model are combined and compared for each of those calculated using the same weight, and in all the combinations, the similarity to the good model is higher than the similarity to the bad model. When it becomes higher, the part to be inspected is determined to be a correct part, and in any combination, when the similarity to the defective model is higher than the similarity to the good model, the part to be inspected Is determined to be an incorrect part.

上記の態様によれば、検査対象画像とモデルとの間に差がある場合には、その差を重み付けする重みの値によって、類似度の高低の度合いが変わる。各画素に対する重みは、不良モデルと良モデルとの間の差に応じて設定されるので、良、不良のモデル間で実際に大きな差が生じる画素に大きな重みが設定される。検査対象部品が正しい部品である場合の検査対象画像では、いずれの不良モデルに対しても、良モデルに対して求めたのと同様の差が同様の位置に生じると考えられるから、その差が重み付けにより強調され、算出される類似度は低くなる(値としては高くなる。)。これに対し、良モデルに対しては、いずれの画素でも大きな差は算出されないと考えられるから、算出される類似度は高くなる(値としては低くなる。)。よって、類似度のいずれの組み合わせにおいても、不良モデルに対する類似度より良モデルに対する類似度の方が高くなると考えられる。   According to the above aspect, when there is a difference between the inspection target image and the model, the degree of similarity changes depending on the weight value for weighting the difference. Since the weight for each pixel is set according to the difference between the defective model and the good model, a large weight is set for a pixel that actually has a large difference between the good and bad models. In the image to be inspected when the part to be inspected is a correct part, it is considered that the same difference as that obtained for the good model is generated at the same position for any defective model. Emphasized by weighting, the calculated similarity is low (value is high). On the other hand, for a good model, it is considered that no large difference is calculated for any pixel, so the calculated similarity is high (value is low). Therefore, in any combination of similarities, it is considered that the similarity to the good model is higher than the similarity to the defective model.

検査対象部品が誤った部品である場合には、検査対象画像とモデルとの差は、誤った部品に対応する不良モデルを対象とするときに最も小さくなるから、この不良モデルに対する類似度が最も高くなると考えられる。一方、検査対象画像と良モデルとの間では、誤った部品に対応する不良モデルと良モデルとの間で求めたのと同様の差が同様の位置に生じるから、この不良モデルに対応する重みを用いて良モデルに対する類似度を算出した場合、その類似度は、不良モデルに対する類似度より低くなると考えられる。   If the part to be inspected is the wrong part, the difference between the image to be inspected and the model is the smallest when the defective model corresponding to the wrong part is targeted. It is thought to be higher. On the other hand, between the image to be inspected and the good model, a difference similar to that obtained between the bad model corresponding to the wrong part and the good model occurs at the same position. When the similarity to the good model is calculated using, the similarity is considered to be lower than the similarity to the defective model.

したがって、良モデルおよび不良モデルについて、同じ重みを用いて算出された類似度を比較すると、検査対象の部品が正しい場合には、良モデルに対する類似度の方が不良モデルに対する類似度よりも高くなると考えられる。また検査対象の部品が誤った部品である場合には、その部品に対応する不良モデルに対する類似度が、同じ重みを用いて算出された良モデルに対する類似度よりも高くなると考えられる。よって、上記の態様によれば、実際の部品に対応するモデルに対する類似度が、他のモデルに対する類似度より大きくなるから、部品の成否の判別を高い確度で行うことができる。   Therefore, when comparing the similarity calculated using the same weight for the good model and the defective model, if the part to be inspected is correct, the similarity to the good model is higher than the similarity to the defective model. Conceivable. Further, when the part to be inspected is an incorrect part, the similarity to the defective model corresponding to the part is considered to be higher than the similarity to the good model calculated using the same weight. Therefore, according to the above aspect, since the similarity to the model corresponding to the actual part is larger than the similarity to the other model, the success or failure of the part can be determined with high accuracy.

上記の方法を用いた基板検査装置は、検査対象の基板上の各部品の画像の良モデルが登録されたメモリと、検査対象の基板の設計データの入力を受け付けて、入力された設計データを用いて、各実装部品を部品種およびサイズに基づきグループ分けする分類手段と、メモリに登録された良モデルに順に着目し、着目中の良モデルが適用される部品と同一のグループに分類された他の部品の良モデルを、着目中の良モデルに対応する不良モデルとして設定する不良モデル設定手段と、検査対象の基板が撮像されたとき、生成された画像中の検査対象の部品毎に、対応する良モデルおよび不良モデルに対する当該部品の画像の類似度を求め、これらの類似度に基づき、各部品が正しい部品であるかどうかを判別する判別手段を具備する。また判別手段は、いずれの不良モデルに対する類似度よりも良モデルに対する類似度の方が高くなったとき、検査対象の部品は正しい部品であると判別し、前記良モデルに対する類似度よりもいずれかの不良モデルに対する類似度の方が高くなったとき、前記検査対象の部品は誤った部品であると判別する。   The board inspection apparatus using the above method accepts input of design data of a memory on which a good model of an image of each component on the board to be inspected is registered and design data of the board to be inspected. Using the classification means for grouping each mounted component based on component type and size, and focusing on the good model registered in the memory in order, it was classified into the same group as the component to which the good model under consideration is applied When a defective model setting unit that sets a good model of another part as a defective model corresponding to the good model under consideration and the board to be inspected are imaged, for each part to be inspected in the generated image, A determination unit is provided for determining the similarity of the image of the part to the corresponding good model and the defective model, and determining whether each part is a correct part based on the similarity. Further, the discrimination means discriminates that the part to be inspected is a correct part when the similarity to the good model is higher than the similarity to any defective model, and any of the similarities to the good model When the similarity to the defective model becomes higher, it is determined that the part to be inspected is an incorrect part.

上記構成の基板検査装置によれば、検査対象の基板の設計データを入力することによって、部品の実装の正否を判別するのに適した不良モデルを自動的に設定し、精度の高い検査を実行することが可能になる。   According to the board inspection apparatus having the above configuration, by inputting design data of a board to be inspected, a defect model suitable for determining whether components are correctly mounted is automatically set, and high-precision inspection is executed. It becomes possible to do.

上記の方法および基板検査装置によれば、正しい部品が実装されているか否かの検査について、基板の設計データや良モデルとして登録される画像を用いて、誤って実装され得る部品に対応する不良モデルを簡単かつ精度良く設定することができる。よって、実装部品の成否を判別する検査の精度を確保することができる。   According to the above method and the board inspection apparatus, a defect corresponding to a component that can be mounted by mistake using an image registered as a board design data or a good model for checking whether a correct component is mounted. The model can be set easily and accurately. Therefore, it is possible to ensure the accuracy of the inspection for determining the success or failure of the mounted component.

図1は、この発明が適用されたプリント基板の自動外観検査装置の構成を示す。
この自動外観検査装置(以下、単に「検査装置」という。)は、基板生産ラインの部品実装工程を経た基板を対象に検査するもので、コントローラ1、カメラ2、照明装置3、基板ステージ4、入力部5、モニタ6などにより構成される。
FIG. 1 shows the configuration of an automatic visual inspection apparatus for printed circuit boards to which the present invention is applied.
This automatic visual inspection apparatus (hereinafter simply referred to as “inspection apparatus”) inspects a board that has undergone a component mounting process on a board production line, and includes a controller 1, a camera 2, an illumination apparatus 3, a board stage 4, The input unit 5 and the monitor 6 are configured.

基板ステージ4には、基板8を支持するためのテーブル部41や、X軸ステージおよびY軸ステージ(いずれも図示せず。)を含む移動機構42などが含まれる。   The substrate stage 4 includes a table unit 41 for supporting the substrate 8 and a moving mechanism 42 including an X-axis stage and a Y-axis stage (both not shown).

カメラ2および照明部3は、「カラーハイライト方式」と称される光学系を構成する。カメラ2は、カラー静止画像を生成するもので、基板ステージ41の上方に撮像面を下方に向け、かつ光軸を鉛直方向に合わせた状態で配備される。照明部3は、基板ステージ4とカメラ2との間に配置された3個の円環状光源3R,3G,3Bにより構成される。これらの光源3R,3G,3Bは、それぞれ、赤、緑、青の色彩光を発するもので、各中心部をカメラ4の光軸に位置合わせした状態で配備されている。また、各光源3R,3G,3Bは、基板8に対しそれぞれ異なる方向から光を照射できるように、互いに異なる大きさの径を有するように設定される。   The camera 2 and the illumination unit 3 constitute an optical system called “color highlight method”. The camera 2 generates a color still image, and is provided above the substrate stage 41 with the imaging surface directed downward and the optical axis aligned with the vertical direction. The illumination unit 3 includes three annular light sources 3R, 3G, and 3B disposed between the substrate stage 4 and the camera 2. These light sources 3R, 3G, and 3B emit red, green, and blue color lights, respectively, and are arranged in a state in which each central portion is aligned with the optical axis of the camera 4. The light sources 3R, 3G, and 3B are set to have different diameters so that the substrate 8 can be irradiated with light from different directions.

コントローラ1には、コンピュータによる制御部10のほか、画像入力部11、撮像制御部12、照明制御部13、XYステージ制御部14、メモリ15、CD−ROMドライブ16、通信用インターフェース17などが設けられる。画像入力部11には、カメラ2に対するインターフェース回路などが含まれる。撮像制御部12は、カメラ2に対し、撮像を指示するタイミング信号を出力するためのものである。   The controller 1 includes a computer control unit 10, an image input unit 11, an imaging control unit 12, an illumination control unit 13, an XY stage control unit 14, a memory 15, a CD-ROM drive 16, and a communication interface 17. It is done. The image input unit 11 includes an interface circuit for the camera 2 and the like. The imaging control unit 12 is for outputting a timing signal instructing imaging to the camera 2.

照明制御部13は、前記照明部3の各光源3R,3G,3Bの点灯・消灯動作の制御や光量の調整などを行う。XYステージ制御部14は、基板ステージ4の移動タイミングや移動量を制御する。   The illumination control unit 13 controls the operation of turning on / off the light sources 3R, 3G, and 3B of the illumination unit 3 and adjusts the amount of light. The XY stage control unit 14 controls the movement timing and movement amount of the substrate stage 4.

メモリ15には、検査用のプログラム(後記する部品検査システム用のプログラムを含む。)や各種検査データ(たとえば、検査対象の部品の部品情報、検査領域の設定データ、被検査部位を検出するための2値化しきい値など)が格納される。さらに、この実施例のメモリ15には、後記するモデル記憶部111、グループデータ記憶部112、重みデータ記憶部113の各記憶部に相当する領域も設けられる。   The memory 15 includes an inspection program (including a program for a component inspection system described later) and various inspection data (for example, component information of a component to be inspected, setting data for an inspection region, and a part to be inspected). Are stored as binarization thresholds. Furthermore, the memory 15 of this embodiment is also provided with areas corresponding to the storage units of the model storage unit 111, the group data storage unit 112, and the weight data storage unit 113 described later.

制御部10は、XYステージ制御部14を介して基板ステージ42の移動を制御することにより、カメラ2と基板8とを位置合わせし、撮像する。この撮像により生成されたカラー画像は画像入力部11を介して制御部10に入力され、その内部メモリ(RAM)に格納される。制御部10は、このRAMに格納されたカラー画像を用いて、各部品に対する検査を順に実行する。さらに、制御部10は、各部品に対する計測結果や判定結果、ならびに検査に使用された画像を、通信用インターフェース17を用いて図示しない外部装置に送信する。   The control unit 10 controls the movement of the substrate stage 42 via the XY stage control unit 14, thereby aligning the camera 2 and the substrate 8 and taking an image. The color image generated by this imaging is input to the control unit 10 via the image input unit 11 and stored in its internal memory (RAM). The control unit 10 sequentially executes inspections for each component using the color image stored in the RAM. Further, the control unit 10 transmits the measurement result and determination result for each component and the image used for the inspection to an external device (not shown) using the communication interface 17.

なお、上記の検査装置で実行される検査には、実装部品が正しいかどうかの検査(以下、「部品検査」という。)と、部品の位置や向きが正しいかどうかの検査とが含まれるが、以下では、部品検査のみに限定して説明する。   The inspection executed by the above-described inspection apparatus includes an inspection of whether or not the mounted component is correct (hereinafter referred to as “component inspection”) and an inspection of whether or not the position and orientation of the component are correct. In the following, the description will be limited to component inspection only.

この実施例の部品検査は、さらに2つの種類に分類される。1つは、部品本体に所定の文字列(型番、抵抗値など)が印刷されている部品を対象に、画像上の文字列が正しいかどうかによって部品の正否を判別するものである。もう1つは、文字列が印刷されていない部品を対象に、画像上の部品のサイズや色彩が正しいかどうかによって、部品の正否を判別するものである。いずれの場合にも、部品毎に、その部品の正しいサンプル画像と、誤った部品のサンプル画像とが、それぞれ良モデル、不良モデルとして登録される。   The component inspection in this embodiment is further classified into two types. One is to determine whether a part is correct or not based on whether or not the character string on the image is correct for a part on which a predetermined character string (model number, resistance value, etc.) is printed on the part main body. The other is to determine whether a part is correct or not by checking whether the size or color of the part on the image is correct for a part on which no character string is printed. In any case, for each part, a correct sample image of the part and a sample image of the wrong part are registered as a good model and a defective model, respectively.

制御部10は、部品の実際の画像について、後記する手順により良モデルおよび不良モデルに対する類似度を算出し、モデル間の類似度の大小を比較する処理により、部品が正しいものであるかどうかを判別する。   The control unit 10 calculates the degree of similarity between the good model and the defective model for the actual image of the part according to the procedure described later, and compares the degree of similarity between the models to determine whether the part is correct. Determine.

さらに、この検査装置では、基板のCADデータを用いて、部品の誤実装を検出するのに適した不良モデルを、制御部10内で自動的に設定できるようにしている。以下、文字列の検査を行う場合を例に、不良モデルの設定方法を説明する。   Further, in this inspection apparatus, a defect model suitable for detecting an erroneous mounting of a component can be automatically set in the control unit 10 using the CAD data of the board. Hereinafter, a method for setting a defect model will be described using a case where a character string is inspected as an example.

図2は、検査対象の基板の構成例を、図3は、この基板のCADデータの内容を、それぞれ示す。この例では、説明を簡単にするために、基板上の実装部品を9個に限定し、各部品に、それぞれ1〜9の部品番号が付与されているものとする。以下の説明でも、個々の部品に言及する場合には、「○番の部品」というように、部品番号を用いて示す。   FIG. 2 shows a configuration example of a substrate to be inspected, and FIG. 3 shows the contents of CAD data of the substrate. In this example, in order to simplify the explanation, it is assumed that the number of mounting parts on the board is limited to nine, and that each part is assigned a part number of 1 to 9. Also in the following description, when referring to individual parts, they are indicated by using part numbers such as “No. parts”.

図3の例のCADデータは、上記の部品番号に、品番、部品種、サイズ、部品中心のx,y座標、および搭載角度(所定の方向を向いた状態の部品を基準にして、この基準の状態に対する実際の部品の回転角度をいう。)の各データを対応づけた構成のものである。図3では、部品番号、搭載角度以外の情報を、アルファベット等の文字で示しているが、同一内容のデータを同じ文字により表現している。   The CAD data in the example of FIG. 3 includes the above part number, the part number, the part type, the size, the x and y coordinates of the part center, and the mounting angle (based on the part in a predetermined direction). (The actual rotation angle of the part with respect to the state).) In FIG. 3, information other than the part number and the mounting angle is indicated by characters such as alphabets, but data having the same content is expressed by the same characters.

上記のCADデータによれば、6番の部品を除く各部品は同じ部品種I(この例では角チップ)に属している。部品種Iに属する部品のうち、4番を除く各部品(図3中、部品番号に網点を付した部分)は同じサイズである。さらに、部品種Iの同一サイズの部品のうち、2番、5番、8番、9番の各部品は品番が同一であり、3番および7番の各部品も品番が同一である。   According to the above CAD data, each part except for the part No. 6 belongs to the same part type I (in this example, a square chip). Of the parts belonging to the part type I, each part except for No. 4 (in FIG. 3, the part with a halftone dot added to the part number) has the same size. Further, among the parts of the same size of the part type I, the parts Nos. 2, 5, 8, and 9 have the same part number, and the parts Nos. 3 and 7 have the same part number.

また、図2の基板の構成図によれば、部品種Iに属する部品には、4番の部品を除き、すべて部品本体に文字列が印刷されている。この例の文字列(101,102,103)は抵抗値を示すものであり、同一品番の部品にはすべて同一の文字列が印刷される。   Further, according to the configuration diagram of the board of FIG. 2, all the parts belonging to the part type I, except for the fourth part, are printed with character strings on the part main body. The character strings (101, 102, 103) in this example indicate resistance values, and the same character string is printed on all parts having the same product number.

ところで、部品の誤実装は、作業員のミスにより生じるが、最も起こりやすいミスは、外観が類似する部品との取り違えであると思われる。また、外観が明らかに異なる部品に取り違えた場合には、良モデルとのマッチングによって誤実装を検出することが可能であるが、正しい部品に外観がきわめて近い部品に取り違えた場合(たとえば、図2,3に示した品番Aの部品を品番BやCの部品と取り違えた場合)には、良モデルのみでは誤実装を検出できない可能性がある。また、このような誤実装の検出精度を上げるために、類似度の判定基準値を高くすると、正しい部品であるのに、文字列に欠けやかすれ等の不備がある部品までが、誤った部品であると判別されてしまう。   By the way, mis-mounting of parts is caused by a mistake of an operator, but the most likely mistake is considered to be a mistake with a part having a similar appearance. In addition, when a component with an apparently different appearance is mistaken, it is possible to detect an erroneous mounting by matching with a good model. However, when a component with a very close appearance to a correct component is mistaken (for example, FIG. 2). , 3, when the part number A is mistaken for the part number B or C part), there is a possibility that erroneous mounting cannot be detected only by the good model. In addition, in order to improve the detection accuracy of such erroneous mounting, if the similarity criterion value is increased, the wrong part will be the part that is a correct part but has a defect such as a missing or faint character string. It is determined that

このような問題に鑑み、この実施例では、CADデータを用いて、基板上の各実装部品を、部品種が同じでサイズが共通するもの毎にグループ分けする。さらに、同一種、同サイズの部品の中に、部品本体に文字列がある部品とない部品とが混じっている場合には、文字列の有無によってグループを分ける場合もある。そして各部品について、それぞれその部品の良モデルを登録するとともに、同じグループに分類された他の部品の良モデルを不良モデルとして設定し、登録する。さらに、後記する重みデータを用いたマッチング処理によって、部品の正否判別の精度を高めるようにしている。   In view of such a problem, in this embodiment, using the CAD data, each mounted component on the board is grouped into components having the same component type and the same size. Furthermore, when parts of the same type and the same size contain parts with and without a character string in the parts body, the group may be divided depending on the presence or absence of the character string. For each part, a good model of the part is registered, and a good model of another part classified into the same group is set and registered as a defective model. Furthermore, the accuracy of part correctness determination is improved by matching processing using weight data described later.

図4は、図2に示した各部品を、部品種およびサイズが同じもの毎にグループ分けした結果を示す。この例によれば、部品種Iに属する4種類の部品のうち、サイズが同一の3種類の部品(品番A,B,C)が同じグループ(グループ1)に分類され、その他の品番D,Eは、それぞれ個別のグループ2,3に分類される。よって、グループ1の品番Aの部品については、品番BおよびCの部品の良モデルが不良モデルとして設定される。同様に、品番Bの部品については、品番AおよびCの部品の良モデルが不良モデルとして設定され、品番Cの部品については、品番AおよびBの部品の良モデルが不良モデルとして設定される。   FIG. 4 shows the result of grouping the parts shown in FIG. 2 into parts having the same part type and size. According to this example, among the four types of parts belonging to the part type I, three types of parts (part numbers A, B, C) having the same size are classified into the same group (group 1), and the other part numbers D, E is classified into separate groups 2 and 3, respectively. Therefore, for the parts of part number A in group 1, the good models of parts B and C are set as defective models. Similarly, for the part number B, the good models of the part numbers A and C are set as defective models, and for the part number C, the good models of the part numbers A and B are set as defective models.

上記のモデルの登録方法によれば、検査対象の部品と明らかに外観が異なる部品が誤実装されている場合には、従来と同様に、検査対象の部品の画像を良モデルと照合することによって、誤実装を検出することができる。また、検査対象の部品と外観が類似する部品が誤実装されている場合には、その部品の良モデルから設定された不良モデルを用いた照合処理によって、誤実装を検出することができる。   According to the model registration method described above, when a component that is clearly different in appearance from the component to be inspected is erroneously mounted, the image of the component to be inspected is compared with the good model as in the past. Incorrect mounting can be detected. In addition, when a component whose appearance is similar to that of the component to be inspected is erroneously mounted, the erroneous mounting can be detected by collation processing using a failure model set from a good model of the component.

また、上記の方法では、基板のCADデータを用いて、部品種およびサイズが同一のもの毎に各部品をグループ分けするので、実際に作業者による取り違えが起こる可能性が高い部品同士を、同じグループに分類することができる。多くの場合、マウンタの近傍には、基板に実装される部品が、部品種やサイズ毎に分類されてストックされているため、外観の似た部品間での取り違えが起こりやすい。しかし、この実施例では、取り違えられる可能性の高い部品毎に、その部品を検出するための不良モデルを登録することができるから、部品検査のための判定基準値を高い値に絞り込まなくとも、検査の精度を確保することが可能になる。   In the above method, the CAD data of the board is used to group each component for each component having the same component type and size, so that the components that are likely to be mistaken by the operator are actually the same. Can be classified into groups. In many cases, components mounted on the board are classified and stocked for each component type and size in the vicinity of the mounter, so that the components having similar appearance are likely to be mixed up. However, in this embodiment, since it is possible to register a defective model for detecting each part, which is likely to be mistaken, it is possible to register the determination reference value for parts inspection to a high value. It becomes possible to ensure the accuracy of the inspection.

図5は、図1の検査装置に導入される部品検査システムの機能ブロック図である。この部品検査システム100は、上記した部品の分類処理およびモデルの登録処理を実行した上で、検査対象の基板の画像を取り込んで検査を実行するものである。システム100には、モデル記憶部111、グループデータ記憶部112、重みデータ記憶部113の各記憶部のほか、CADデータ入力部101、良品画像取得部102、部品分類処理部103、モデル登録部104、重みデータ設定部105、基板画像取得部106、検査実行部107、検査結果出力部108などが含まれる。   FIG. 5 is a functional block diagram of a component inspection system introduced into the inspection apparatus of FIG. The component inspection system 100 executes the above-described component classification processing and model registration processing, and then performs inspection by fetching an image of a substrate to be inspected. The system 100 includes a model storage unit 111, a group data storage unit 112, and a weight data storage unit 113, a CAD data input unit 101, a non-defective image acquisition unit 102, a component classification processing unit 103, and a model registration unit 104. , A weight data setting unit 105, a board image acquisition unit 106, an inspection execution unit 107, an inspection result output unit 108, and the like.

CADデータ入力部101は、CD−ROM等の記憶媒体や外部機器などから、検査対象の基板のCADデータを取り込む。良品画像取得部102は、カメラ2により基板8のモデルが撮像されたときに生成された画像を、良品基板の画像(以下、「良品画像」という。)として取り込む。取り込まれたCADデータや良品画像は、図示しない作業用メモリ内に格納される。   The CAD data input unit 101 takes in CAD data of a substrate to be inspected from a storage medium such as a CD-ROM or an external device. The non-defective product image acquisition unit 102 captures an image generated when the model of the substrate 8 is captured by the camera 2 as an image of a non-defective substrate (hereinafter referred to as “non-defective product image”). The acquired CAD data and non-defective product images are stored in a working memory (not shown).

部品分類処理部103は、CADデータ中の品番、部品種、サイズの各情報に基づき、各実装部品を、部品種およびサイズが同一の部品毎にグループ分けする。また、設定された各グループに、それぞれ固有の識別番号(以下、「グループ番号」という。)を設定して、グループデータ記憶部112に保存する。さらに、グループ毎に、そのグループに所属する部品の品番および部品番号、ならびにグループの属性情報(各所属部品に共通の部品種およびサイズ、ならびに文字列の有無)を上記のグループ番号に対応づけて、グループデータ記憶部112に保存する(以下、上記のグループデータ記憶部112にグループ番号を保存する処理を「グループを登録する処理」といい、グループ番号に対応づけてデータを保存する処理のことを「グループにデータを登録する処理」という。)。   The component classification processing unit 103 groups each mounted component for each component having the same component type and size based on the product number, component type, and size information in the CAD data. In addition, a unique identification number (hereinafter referred to as “group number”) is set for each set group, and is stored in the group data storage unit 112. In addition, for each group, the part number and part number of the part belonging to the group, and group attribute information (part type and size common to each belonging part, and presence / absence of character string) are associated with the above group number. , Saving in the group data storage unit 112 (hereinafter, the process of saving the group number in the group data storage unit 112 is referred to as “group registration process”, which is a process of saving data in association with the group number. Is referred to as “processing for registering data in a group”).

モデル登録部104は、上記のCADデータに基づき、各品番につき、それぞれ最初に着目した部品の画像を基板の良品画像から切り出し、当該品番に共通の良モデルとして、モデル記憶部111に登録する。またモデル登録部104は、部品分類処理部103のグループ分け結果に基づき、各品番について、それぞれその品番と同じグループに属する他の品番を認識し、認識した品番の良モデルを不良モデルとして設定する。   Based on the CAD data, the model registration unit 104 cuts out an image of the first focused component from the non-defective image of the board for each product number, and registers it in the model storage unit 111 as a good model common to the product number. Also, the model registration unit 104 recognizes other product numbers belonging to the same group as the product number for each product number based on the grouping result of the part classification processing unit 103, and sets a good model of the recognized product number as a defective model. .

重みデータ設定部105は、各不良モデルについて、それぞれ対応する良モデルに対する差異を反映した重みデータを設定し、これを重みデータ記憶部113に登録する。   The weight data setting unit 105 sets weight data reflecting the difference from the corresponding good model for each defective model, and registers this in the weight data storage unit 113.

基板画像取得部106は、カメラ2により検査対象の基板8が撮像されたときに、生成された画像を取り込み、検査実行部107に供給する。検査実行部107は、供給された画像に含まれる各部品に順に着目しつつ、着目部品の画像をモデル記憶部111や重みデータ記憶部113の登録データを用いて処理することにより、部品検査を実行する。検査結果出力部108は、基板上の全ての部品に対する部品検査が終了したとき、各検査結果を統合し、モニタ6や図示しない外部機器などに出力する。   The board image acquisition unit 106 captures the generated image when the board 2 to be inspected is imaged by the camera 2 and supplies it to the inspection execution unit 107. The inspection execution unit 107 performs component inspection by processing the image of the target component using registered data in the model storage unit 111 and the weight data storage unit 113 while paying attention to each component included in the supplied image in order. Execute. The inspection result output unit 108 integrates the inspection results and outputs them to the monitor 6 or an external device (not shown) when the component inspection for all the components on the board is completed.

つぎに、上記の部品検査システム100で登録される良/不良モデルおよび重みデータについて、説明する。   Next, the good / bad model and weight data registered in the component inspection system 100 will be described.

図6(1)(2)は、同じグループに属する2つの部品について、それぞれ良モデルを登録する例を示す。図6(1)は、部品本体に文字列が印刷された部品(前出の品番A,B)を拡大して示したものである。図6(2)は、部品本体には文字列がないが、色彩の一部が共通する部品の例である。   FIGS. 6A and 6B show examples in which good models are registered for two parts belonging to the same group. FIG. 6A is an enlarged view of a component (the above-described product numbers A and B) in which a character string is printed on the component main body. FIG. 6B is an example of a component that has no character string in the component main body but has a common color.

この実施例では、各部品について、良品画像中の部品本体の部分に所定大きさの矩形領域50を設定し、この領域50内の画像を良モデルとして切り出して登録するようにしている。文字列を有する部品の場合には、全ての文字列が含まれるように領域の位置および大きさを調整する必要がある。   In this embodiment, for each component, a rectangular area 50 having a predetermined size is set in the part main body in the non-defective image, and the image in this area 50 is cut out and registered as a good model. In the case of a component having a character string, it is necessary to adjust the position and size of the region so that all the character strings are included.

この実施例のように、同じグループに属する複数の部品にそれぞれ設定された良モデルを、他の部品の不良モデルとして使用する場合には、不良モデルとしての登録処理は、特段に必要ではない。ただし、この実施例では、良モデルとの実質的な差を精度良く反映した不良モデルを設定するために、着目中の良モデルを用いたマッチング処理により、他の部品の良モデル中で着目中の良モデルに最も類似する領域を特定し、その領域内の画像を不良モデルとしてモデル記憶部111に登録するようにしている。   As in this embodiment, when a good model set for each of a plurality of parts belonging to the same group is used as a defective model for other parts, registration processing as a defective model is not particularly necessary. However, in this embodiment, in order to set a defect model that accurately reflects a substantial difference from the good model, the matching process using the good model being focused is used in the good model of other parts. An area most similar to the good model is identified, and an image in the area is registered in the model storage unit 111 as a defective model.

重みデータは、設定した不良モデルと着目中の良モデルとの実質的な差に基づき設定される。具体的には、これらのモデル間の差画像を作成した後に、差画像を平滑化し、平滑化後の差画像を、不良モデルに対応する重みデータとして設定する。   The weight data is set based on a substantial difference between the set defective model and the good model under attention. Specifically, after creating a difference image between these models, the difference image is smoothed, and the smoothed difference image is set as weight data corresponding to the defective model.

図7は、重みデータの設定の一例として、差画像(上段)および平滑処理後の画像(下段)について、それぞれ各画素の濃度(階調)を示したものである。この例の平滑処理は、差画像の各構成画素に順に着目しながら、着目画素の階調を、当該画素および周囲近傍8画素の階調の平均値に置き換えるものである。平滑処理後の差画像の各構成画素の画素データは、不良モデルの対応画素(座標が同じ画素)に対する「重み」として、検査対象画像のモデルに対する相違度を算出するのに使用される。   FIG. 7 shows the density (gradation) of each pixel for a difference image (upper stage) and an image after smoothing (lower stage) as an example of setting weight data. The smoothing process of this example replaces the gradation of the pixel of interest with the average value of the gradations of the pixel and the surrounding eight pixels while paying attention to the constituent pixels of the difference image in order. The pixel data of each component pixel of the difference image after the smoothing process is used to calculate the degree of difference with respect to the model of the inspection target image as a “weight” for the corresponding pixel (pixel having the same coordinate) of the defective model.

なお、この実施例ではカラー画像を処理するので、良/不良の各モデルは、いずれもR,G,Bの3種類の画像データを組み合わせたものとなる。よって、重みデータも、R,G,B毎に設定される。   Since color images are processed in this embodiment, each of the good / bad models is a combination of three types of image data of R, G, and B. Therefore, the weight data is also set for each of R, G, and B.

具体的に、良または不良のモデルの座標(x,y)にある画素のR,G,B値を、それぞれMr(x,y)、Mg(x,y)、Mb(x,y)とし、検査対象画像の対応画素のR,G,B値をIr(x,y)、Ig(x,y)、Ib(x,y)とし、重みデータをHr(x,y)、Hg(x,y)、Hb(x,y)とすると、このモデルに対する検査対象画像の相違度Sは、以下の(1)式により求められる(式中のX,Yはx,y座標の最大値である。)。   Specifically, the R, G, and B values of the pixel at the coordinates (x, y) of the good or bad model are Mr (x, y), Mg (x, y), and Mb (x, y), respectively. The R, G, B values of the corresponding pixels of the inspection target image are Ir (x, y), Ig (x, y), Ib (x, y), and the weight data are Hr (x, y), Hg (x , Y) and Hb (x, y), the difference S between the images to be inspected with respect to this model is obtained by the following equation (1) (X and Y in the equation are the maximum values of the x and y coordinates). is there.).

上記の(1)式による相違度Sは、実質的に、モデルに対する検査対象画像の類似度を表している。すなわち、検査対象画像がモデルに近いほど値が小さくなるようなパラメータをもって、類似度を表現しているのである。また、(1)式によれば、差の値が大きな画素に大きな重みが対応づけられている場合には、その差がさらに強められて、類似度が低められる。   The degree of difference S according to the above equation (1) substantially represents the degree of similarity of the inspection target image with respect to the model. That is, the degree of similarity is expressed with a parameter whose value decreases as the inspection target image is closer to the model. Further, according to the expression (1), when a large weight is associated with a pixel having a large difference value, the difference is further strengthened and the similarity is lowered.

重みHr(x,y)、Hg(x,y)、Hb(x,y)の値は、不良モデルと良モデルとの対応画素間の差に応じて決まる(差の大きな画素には大きな重みが設定される。)。検査対象の部品が不良モデルに対応する部品であれば、この不良モデルと検査対象画像との差を求めた場合、対応画素間の差の値は、どの位置においても0に近くなると考えられる。よって、類似度は比較的高くなると考えられる。   The values of the weights Hr (x, y), Hg (x, y), and Hb (x, y) are determined according to the difference between corresponding pixels of the defective model and the good model (a large weight is applied to a pixel having a large difference). Is set.) If the part to be inspected is a part corresponding to the defective model, when the difference between the defective model and the inspection target image is obtained, the value of the difference between the corresponding pixels is considered to be close to 0 at any position. Therefore, the similarity is considered to be relatively high.

一方、良モデルと検査対象画像との差を求めた場合には、大きな重みが対応づけられている画素に対応する差の値は、良モデルと不良モデルとの間で算出される値に匹敵する大きさになり、さらにその差が重みによって強められる。よって、この場合の類似度は、不良モデルに対する類似度より小さくなると考えられる。   On the other hand, when the difference between the good model and the image to be inspected is obtained, the difference value corresponding to the pixel to which the large weight is associated is comparable to the value calculated between the good model and the defective model. The difference is strengthened by the weight. Therefore, the similarity in this case is considered to be smaller than the similarity to the defective model.

検査対象の部品が正しい場合には、不良モデルと検査対象画像との間で差を求めた場合には、大きな重みが対応づけられている画素間の差が大きくなり、この画素における差が強められるから、類似度は低くなる。これに対し、良モデルと検査対象画像との差を求める場合には、対応する画素間の差は、いずれの位置でも0に近くなる。よって、いずれの不良モデルに対しても、その不良モデルに対する類似度よりも良モデルに対する類似度の方が大きくなると考えられる。   When the part to be inspected is correct, if the difference is found between the defective model and the inspection target image, the difference between the pixels associated with a large weight becomes large, and the difference in this pixel becomes stronger. Therefore, the similarity is low. On the other hand, when the difference between the good model and the inspection target image is obtained, the difference between the corresponding pixels is close to 0 at any position. Therefore, for any defective model, it is considered that the similarity to the good model is greater than the similarity to the defective model.

この実施例の部品検査システムでは、上記の点に鑑み、不良モデル毎に、その不良モデルにつき求めた重みデータを用いた(1)式により、当該不良モデルに対する検査対象画像の相違度S(以下、相違度S(n)とする。)を算出する。さらに、良モデルについても、同じ重みデータを用いた(1)式により、検査対象画像の相違度S(以下、相違度S(o)とする。)を算出し、S(o),S(n)の値を比較する。   In the component inspection system of this embodiment, in view of the above points, for each defective model, the difference degree S (hereinafter referred to as the inspection target image with respect to the defective model) is calculated using equation (1) using the weight data obtained for the defective model. , The difference degree S (n) is calculated. Further, for the good model, the difference degree S (hereinafter referred to as difference degree S (o)) of the inspection target image is calculated by the equation (1) using the same weight data, and S (o), S ( Compare the values of n).

上記の処理によれば、各不良モデルについて、それぞれそのモデルに対応する重みデータを用いて検査対象画像との類似度を算出する一方で、良モデルについて、各不良モデルに対応する複数とおりの重みデータを用いて複数とおりの類似度を算出し、各類似度を同じ重みデータにより算出されたもの毎に組み合わせて比較していることになる。   According to the above processing, for each defective model, while calculating the similarity to the image to be inspected using the weight data corresponding to each model, for the good model, a plurality of weights corresponding to each defective model are calculated. A plurality of similarities are calculated using the data, and each similarity is combined and compared for each of those calculated by the same weight data.

ここで、いずれの重みデータについても、良モデルに対する類似度の方が不良モデルに対する類似度より大きくなった場合には、検査対象の部品を正しい部品であると判断する(ただし、各類似度が所定の基準値を上回ることを前提とする。)。   Here, for any weight data, if the similarity to the good model is greater than the similarity to the defective model, it is determined that the part to be inspected is the correct part (however, each similarity is (Assuming that it exceeds the predetermined reference value.)

上記に対し、いずれかの重みデータを用いて類似度を算出したときに、良モデルに対する類似度より不良モデルに対する類似度の方が大きくなり、かつその類似度が上記の基準値よりも大きくなった場合には、検査対象の部品は、不良モデルが示す部品である可能性が高い。よって、この場合には、検査対象の部品は正しい部品ではないと判断する。   On the other hand, when the similarity is calculated using any of the weight data, the similarity to the defective model is greater than the similarity to the good model, and the similarity is greater than the reference value. In such a case, there is a high possibility that the part to be inspected is a part indicated by the defective model. Therefore, in this case, it is determined that the part to be inspected is not a correct part.

このような処理によれば、検査対象画像中の良/不良の各モデル間の相違部分に対応する画像がいずれのモデルに近いかによって、各モデルに対する類似度の値が変動する。よって、これらの類似度を比較することにより、誤実装の有無を高い確度で判別することが可能になる。   According to such processing, the similarity value for each model varies depending on which model the image corresponding to the difference between the good and bad models in the inspection target image is close to. Therefore, by comparing these similarities, it is possible to determine the presence or absence of incorrect mounting with high accuracy.

なお、図7の例では、不良モデルの構成画素毎に、良モデルに対する差の大きさに応じた重みを設定しているが、これに限らず、たとえば、良モデルに対する差の大きさが所定値以上になる画素にのみ、一定の値の重みを設定してもよい。   In the example of FIG. 7, the weight corresponding to the magnitude of the difference with respect to the good model is set for each constituent pixel of the defective model. However, the present invention is not limited to this. For example, the magnitude of the difference with respect to the good model is predetermined. A constant value weight may be set only for pixels that are greater than or equal to the value.

以下、上記部品検査システムで実行される処理の流れを、種類毎に説明する。
まず図8は、部品の分類および良モデルの登録に関する処理手順を示す。この手順の最初のステップであるST101では、部品番号を特定するカウンタiに初期値の「1」をセットするとともに、グループ数jmaxを「0」に設定する。
Hereinafter, the flow of processing executed in the component inspection system will be described for each type.
First, FIG. 8 shows a processing procedure related to component classification and registration of a good model. In ST101, which is the first step in this procedure, the initial value “1” is set to the counter i for specifying the part number, and the group number j max is set to “0”.

ST102では、i番目の部品BiのCADデータを読み出し、そのデータ中の品番が既にいずれかのグループに分類されているかどうかをチェックする(ST103)。i=1の段階では、まだグループが設定されていないから、この判定は「NO」となってST104に進み、着目グループを示すカウンタjに初期値の0をセットする。   In ST102, the CAD data of the i-th component Bi is read, and it is checked whether the product number in the data has already been classified into any group (ST103). At the stage of i = 1, since no group has been set yet, this determination is “NO”, the process proceeds to ST104, and the initial value 0 is set to the counter j indicating the group of interest.

つぎのST105では、カウンタjを1つ大きな値(すなわち1)に更新した後、ST106において更新後のjをjmaxと比較する。処理が開始された直後は、jmax=0であるから、j>jmaxとなり、ST106の判定は「NO」となる。この場合には、ST111に進み、jの値によりjmaxを更新する(すなわちjmax=1)。 In the next ST105, the counter j is updated to one larger value (that is, 1), and then the updated j is compared with jmax in ST106. Immediately after the process is started, j max = 0, so j> j max and the determination in ST 106 is “NO”. In this case, the process proceeds to ST111, and j max is updated with the value of j (ie, j max = 1).

つぎのST112では、グループデータ記憶部112にj番目のグループGを登録する(具体的には、グループ番号jを登録することになる。)。続くST113では、部品Bの属性情報(部品種およびサイズ、ならびに文字列の有無)を、j番目のグループGjの属性情報として、グループデータ記憶部112に登録する。さらにこの後は、ST114に進み、部品Bの品番および部品番号をグループGjに登録する。 In the next ST 112, it registers the j-th group G j on a group data storage unit 112 (specifically, will register a group number j.). In subsequent ST113, the attribute information of the part B i (whether component types and sizes as well as a string), as attribute information of the j-th group Gj, is registered in the group data storage unit 112. Furthermore Then, the process proceeds to ST114, and registers the part number and part number of the component B i to the group Gj.

ST115では、基板の良品画像から部品Biの画像を切り出す。さらに、この部品Biの搭載角度が0度以外の角度である場合には、搭載角度が0度の画像になるように、切り出した画像を回転補正する。ST116は、ST115で取得した画像を部品Biに対応する品番の良モデルとして、モデル記憶部111に登録する。   In ST115, an image of the component Bi is cut out from the non-defective image on the board. Further, when the mounting angle of the component Bi is an angle other than 0 degrees, the cut-out image is rotationally corrected so that an image with a mounting angle of 0 degrees is obtained. In ST116, the image acquired in ST115 is registered in the model storage unit 111 as a good model with a part number corresponding to the component Bi.

ST117では、iの値を1つ大きな値に更新する。更新後のiが実装部品の総数imaxより大きくならない場合には、つぎのST118が「YES」となってST102に戻る。以下、同様に、iを更新することによって着目部品を変更しながら、同様の処理を実行するが、2番目移行の部品については、少なくとも1つのグループが存在することになるから、ST102〜105の処理の後、ST106が「YES」となって、ST107に進む。 In ST117, the value of i is updated to one larger value. If i after the update does not become larger than the total number i max of mounted parts, the next ST118 is “YES” and the process returns to ST102. Similarly, the same processing is executed while changing the component of interest by updating i. However, since there is at least one group for the second transition component, ST102 to ST105 After the processing, ST106 becomes “YES”, and the process proceeds to ST107.

ST107では、部品Biの属性情報(部品種およびサイズならびに文字列の有無)を、グループGjの属性情報と比較する。ここで部品種が同一であり、サイズも同一であり、文字列の有無状態も同一であると判断された場合(ST108〜110がすべて「YES」の場合)は、ST114に進み、部品Biの品番および部品番号を着目中のグループGjに登録する。以下、ST115,116を実行することにより、部品Biに対応する品番の良モデルを設定して登録する。   In ST107, the attribute information of the component Bi (component type and size and presence / absence of character string) is compared with the attribute information of the group Gj. If it is determined that the component type is the same, the size is the same, and the presence / absence state of the character string is the same (when all of ST108 to 110 are “YES”), the process proceeds to ST114 and the component Bi The product number and the part number are registered in the group Gj of interest. Thereafter, by executing ST115 and 116, a good model having a product number corresponding to the component Bi is set and registered.

一方、設定されているグループのいずれに対しても、属性情報の一致を確認できない場合には、j=jmaxになるまでST105〜110のループが繰り返された後に、ST106が「NO」となる。この場合には、ST111〜113を実行し、しかる後にST114〜116を実行することにより、新たなグループを設定し、そのグループに部品Biを登録する。 On the other hand, when the attribute information match cannot be confirmed for any of the set groups, the loop of ST105 to 110 is repeated until j = jmax , and then ST106 becomes “NO”. . In this case, ST111 to 113 are executed, and thereafter ST114 to 116 are executed to set a new group and register the component Bi in the group.

部品Biの品番が既にいずれかのグループに分類されている場合には、ST103が「YES」となってST119に進み、当該品番が分類されているグループに、部品Biの部品番号を登録することで対応する。   When the part number of the part Bi is already classified into any group, ST103 becomes “YES” and the process proceeds to ST119, and the part number of the part Bi is registered in the group in which the part number is classified. Correspond with.

以上の処理をiが実装部品の総数imaxに達するまで実行することにより、各部品は、それぞれ属性情報が同一のもの毎にグループ分けされる。また、品番毎に、良モデルが設定され、モデル記憶部111に登録される。 By executing the above processing until i reaches the total number i max of the mounted components, the components are grouped for each component having the same attribute information. A good model is set for each product number and registered in the model storage unit 111.

図9は、図8の処理により登録された1グループ内に対し、不良モデルおよび重みデータを品番単位で登録する処理の手順を示す(グループが複数ある場合には、グループ毎に図9の処理が実行される。)。   FIG. 9 shows a processing procedure for registering a defect model and weight data in units of product numbers for one group registered by the processing of FIG. 8 (when there are a plurality of groups, the processing of FIG. Is executed.)

まず最初のST201では、品番および良モデルを特定するためのカウンタmに初期値の「1」をセットする。ST202では、このmが示す良モデルOmを読み出す。   First, in ST201, an initial value “1” is set in a counter m for specifying the product number and the good model. In ST202, the good model Om indicated by m is read.

つぎのST203では、着目中の良モデル以外の良モデルの読出し回数を記憶するためのカウンタk(k≦M−1(Mはグループ内の品番の登録数))に初期値の「1」をセットする。ST204では、着目中の良モデル以外の良モデルOk(Okは、k番目に読み出された良モデルを意味する。)を読み出す。   In the next ST203, an initial value “1” is set in a counter k (k ≦ M−1 (M is the number of registered product numbers in the group)) for storing the number of readings of a good model other than the good model under consideration. set. In ST204, a good model Ok other than the good model being noticed (Ok means the good model read k-th) is read out.

ST205では、読み出した2つのモデルOm,Ok間でマッチング処理を行い、モデルOkにおいてOmに最も類似する領域を特定する。ST206では、この特定した領域内の画像をm番目の品番のk番目の不良モデルNkとして、モデル記憶部111に登録する。   In ST205, matching processing is performed between the two read models Om and Ok, and an area most similar to Om in the model Ok is specified. In ST206, the image in the specified area is registered in the model storage unit 111 as the kth defective model Nk of the mth product number.

さらに、ST207では、上記のモデルOmとNkとの差画像を生成し、ST208では、生成された差画像を平滑化する処理を実行する。さらにST209では、平滑処理後の差画像の各画素データを、不良モデルNkに対応する重みデータHkとして、重みデータ記憶部113に登録する。   Further, in ST207, a difference image between the models Om and Nk is generated. In ST208, a process of smoothing the generated difference image is executed. Further, in ST209, each pixel data of the difference image after the smoothing process is registered in the weight data storage unit 113 as the weight data Hk corresponding to the defective model Nk.

この後は、ST210において、kの値を1つ大きな値に更新する。以下、この更新後にk>(M−1)になるまで、ST203〜211のループを繰り返す。これにより、着目中の良モデルOmに対応する品番と同じグループに登録されている各品番の部品について、その部品が誤って実装された場合を検出するための不良モデルNkおよび重みデータHkが登録される。   Thereafter, in ST210, the value of k is updated to one larger value. Thereafter, the loop of ST203 to 211 is repeated until k> (M−1) after this update. As a result, for each part number registered in the same group as the part number corresponding to the good model Om of interest, the failure model Nk and weight data Hk for detecting the case where the part is mounted by mistake are registered. Is done.

以下同様に、カウンタmをm>Mとなるまで更新し、毎時のmにより特定される部品について、上記ST202〜211のループを繰り返す。これにより、グループ内のすべての品番について、同じグループに属する他の品番の部品を誤実装した場合に対応するための不良モデルが登録されることになる。   Similarly, the counter m is updated until m> M, and the loop of ST202 to ST211 is repeated for the part specified by the hourly m. As a result, for all product numbers in the group, a defective model is registered in order to cope with a case where components of other product numbers belonging to the same group are erroneously mounted.

図10は、上記の各モデルや重みデータを用いた検査の手順を示す。
まず最初のST301では、検査対象の基板の撮像により生成された画像を入力する。この後は、メモリ15に登録された部品情報に基づき、実装部品に順に着目して下記の処理を実行する。
FIG. 10 shows an inspection procedure using each model and weight data.
First, in ST301, an image generated by imaging a substrate to be inspected is input. Thereafter, based on the component information registered in the memory 15, the following processing is executed while paying attention to the mounted components in order.

部品情報には、図4のCADデータと同内容のデータが含まれている。ST302では、このデータ中の部品番号によりグループデータ記憶部112を検索して、着目中の部品が所属するグループおよびこのグループに登録されている品番の数Mを認識する。ST303では、着目中の部品の品番によりモデル記憶部111を検索して、対応する良モデルを読み出す。   The component information includes data having the same contents as the CAD data in FIG. In ST302, the group data storage unit 112 is searched with the part number in this data, and the group to which the part under consideration belongs and the number M of the part numbers registered in this group are recognized. In ST303, the model storage unit 111 is searched by the part number of the component under consideration, and the corresponding good model is read out.

ST304では、不良モデルの読出し数を示すカウンタkに「1」をセットするとともに、良モデルに対する相違度の最大値Smaxを初期値の0に設定する。つぎのST305では、k番目の不良モデルNkおよびこれに対応する重みデータHkを読み出す。ST306では、重みデータHkに含まれる各重みを用いて上記した(1)式を実行することにより、良モデルに対する処理対象画像の相違度S(o)kを算出する。 In ST304, “1” is set to the counter k indicating the number of readings of the defective model, and the maximum value S max of the dissimilarity with respect to the good model is set to 0 as an initial value. In the next ST305, the k-th defective model Nk and the corresponding weight data Hk are read out. In ST306, the degree of difference S (o) k of the processing target image with respect to the good model is calculated by executing the above-described equation (1) using each weight included in the weight data Hk.

ST307では、同様に重みデータHkを用いた(1)式によって、不良モデルNkに対する処理対象画像の相違度S(n)kを算出する。   In ST307, the dissimilarity S (n) k of the processing target image with respect to the defective model Nk is similarly calculated by the equation (1) using the weight data Hk.

ST308では、ST306で求めた相違度S(o)kを最大値Smaxと比較する。ここでS(o)k>SmaxであればST309に進み、Smaxを現在のS(o)kの値に書き換える。S(o)k≦Smaxの場合には、ST309はスキップされる。 In ST308, the dissimilarity S (o) k obtained in ST306 is compared with the maximum value Smax . If S (o) k> Smax , the process proceeds to ST309, and Smax is rewritten to the current value of S (o) k. If S (o) k ≦ Smax , ST309 is skipped.

ST310では、ST306,307でそれぞれ求めた相違度S(o)k,S(n)kを比較する。ここでS(o)k<S(n)k、すなわち良モデルに対する類似度の方が高い場合には、ST311に進んでkの値を更新した後、ST312を介してST305に戻る。   In ST310, the differences S (o) k and S (n) k obtained in ST306 and 307 are compared. If S (o) k <S (n) k, that is, if the similarity to the good model is higher, the process proceeds to ST311 to update the value of k, and then returns to ST305 via ST312.

以下、設定されているすべての不良モデルについて、ST305〜312の処理が実行され、いずれの不良モデルに対する類似度よりも良モデルに対する類似度の方が高くなった場合には、ST312が「NO」となってST313に進み、その時点での良モデルに対する相違度の最大値Smaxを所定のしきい値Sthと比較する。ここでSmax<Sthであれば(すなわち、各種重みデータを用いて求めた良モデルに対する類似度のうちの最も小さいものが、一定の基準値を上回る場合には)、ST314に進み、着目中の部品は正しい部品であると判定する。 Thereafter, the processes of ST305 to 312 are executed for all the defective models set, and when the similarity to the good model is higher than the similarity to any defective model, ST312 is “NO”. Then, the process proceeds to ST313, and the maximum value S max of the degree of difference with respect to the good model at that time is compared with a predetermined threshold value Sth. Here, if S max <Sth (that is, if the smallest of the similarities to the good model obtained using various weight data exceeds a certain reference value), the process proceeds to ST314, and the focus is on This part is determined to be a correct part.

他方、上記の比較処理において、Smax≧Sthであった場合には、ST316に進み、着目中の部品は誤った部品であると判定する。このようなケースは、正しい部品とは異なるグループの部品が誤実装されている場合に生じると可能性がある。 On the other hand, in the above comparison processing, when S max ≧ Sth, the process proceeds to ST 316 and determines that the component under attention is an incorrect component. Such a case may occur when a group of parts different from the correct part is erroneously mounted.

もし、正しい部品と同じグループに属する部品が誤って実装されているならば、その部品に対応する不良モデルを対象にST310の比較処理を行った場合の判定が「NO」となる。この場合は、ST315に進み、相違度S(n)kがしきい値Sthより小さいか否かをチェックする。S(n)k<Sthであれば、ST316に進み、着目中の部品は誤った部品であると判定する。   If a component that belongs to the same group as the correct component is erroneously mounted, the determination when the comparison process of ST310 is performed for the defective model corresponding to the component is “NO”. In this case, the process proceeds to ST315, and it is checked whether or not the difference degree S (n) k is smaller than the threshold value Sth. If S (n) k <Sth, the process proceeds to ST316, and it is determined that the component of interest is an incorrect component.

基板上のすべての実装部品に対し、ST302〜316の処理を実行することにより、部品毎に、その部品が正しい部品であるか、誤った部品であるかが判定される。全ての実装部品に対する判定処理が終了すると、ST317が「YES」となってST318に進み、基板全体にかかる検査結果を出力する。この出力先は、モニタ6のほか、図示しない外部機器に対して行うことができる。   By executing the processing of ST302 to 316 for all the mounted components on the board, it is determined for each component whether the component is a correct component or an incorrect component. When the determination process for all the mounted components is completed, ST317 is “YES”, the process proceeds to ST318, and the inspection result for the entire board is output. This output destination can be sent to an external device (not shown) in addition to the monitor 6.

なお、上記の実施例では、不良モデルについて、R,G,Bの色データ毎に重みデータを設定したが、これに限らず、良品モデルとの間で差が生じる色データに限定して重みデータを設定してもよい。たとえば、部品に赤色の文字列が印刷される場合であれば、Rには重みデータを設定するが、G,Bには重みデータを設定しないようにする。また、このように特定の色データのみに重みデータを設定した場合には、類似度の算出についても、重みデータが設定された色の画像データのみを用いて行えばよい。ただし、これに限らず、特定の色データにつき、重みデータを設定して類似度を算出するとともに、その他の色データについても、重みデータを設定せずに類似度を算出し、すべての類似度の総和を求めてもよい。   In the above-described embodiment, the weight data is set for each of the R, G, and B color data for the defective model. However, the weight data is not limited to this, and the weight data is limited to the color data that is different from the non-defective model. Data may be set. For example, when a red character string is printed on a part, weight data is set for R, but weight data is not set for G and B. When weight data is set only for specific color data in this way, the similarity may be calculated using only the image data of the color for which the weight data is set. However, the present invention is not limited to this. For specific color data, weight data is set and the similarity is calculated. For other color data, the similarity is calculated without setting the weight data, and all similarities are calculated. You may ask for the sum of.

また上記の(1)式による類似度の算出は、対応画素間の差の総和を求めるものであるが、これに代えて、正規化相関演算を実行してもよい。この場合も、類似度が高くなるほど演算結果の値が低くなるような式を設定することにより、検査対象部品がいずれかの不良モデルに対応する場合には、該当する不良モデルに対する類似度が最も高くなるような結果を得ることができるから、部品の正否を判別することができる。   The calculation of the similarity according to the above equation (1) is to obtain the sum of the differences between the corresponding pixels, but instead of this, a normalized correlation calculation may be executed. In this case as well, by setting an expression such that the higher the similarity is, the lower the value of the operation result is, and if the part to be inspected corresponds to one of the defective models, the similarity to the corresponding defective model is the highest. Since a result that is high can be obtained, it is possible to determine whether the part is correct.

上記の記載を整理すると、部品検査においては、以下の3とおりの方法により各モデルに対する類似度を求めることができる。
(1)前述の(1)式を用いて、R,G,Bの各色データ毎に、対応画素間の差を求め、その総和を類似度とする方法。
この方法により求められる類似度を、以下では、「総合差分演算による類似度」という。
(2)重みデータが設定された色データ(たとえばR)に限定して、対応画素間の差を求め、その差を類似度とする方法。
この方法により求められる類似度を、以下では、「特定色の差分演算による類似度」という。
(3)正規化相関演算により類似度を求める方法。
この方法により求められる類似度を、以下では、「正規化相関演算による類似度」という。
When the above description is arranged, in parts inspection, the similarity to each model can be obtained by the following three methods.
(1) A method of obtaining a difference between corresponding pixels for each color data of R, G, and B using the above-described equation (1) and using the sum as a similarity.
The similarity obtained by this method is hereinafter referred to as “similarity by comprehensive difference calculation”.
(2) A method of obtaining a difference between corresponding pixels only for color data (for example, R) for which weight data is set, and using the difference as a similarity.
The similarity obtained by this method is hereinafter referred to as “similarity based on a specific color difference calculation”.
(3) A method of obtaining similarity by normalized correlation calculation.
The similarity obtained by this method is hereinafter referred to as “similarity by normalized correlation calculation”.

実際の部品検査においては、上記3通りの演算処理による類似度のうち、検査対象画像に適合するモデルに対する類似度とその他のモデルに対する類似度との間の差が、できるだけ顕著になるようなものを選択するのが望ましい。基板には種々の部品が実装されており、上記3通りの類似度の中のいずれが適しているかは、部品の種類によって異なる。よって、類似度の算出方法についても、グループ毎にあらかじめ選択しておけば、検査の精度をさらに向上することができる。   In actual component inspection, among the similarities obtained by the above three arithmetic processes, the difference between the similarity to the model that matches the image to be inspected and the similarity to other models becomes as significant as possible. It is desirable to select. Various components are mounted on the substrate, and which of the above three similarities is suitable depends on the type of component. Therefore, if the similarity calculation method is selected in advance for each group, the accuracy of the inspection can be further improved.

なお、(2)の方法については、前記したように、特定の色データ以外の色データについて、重みデータを設定しない類似度を求め、これらを、特定の色データの重みデータを用いた類似度に加算する方法に、差し替えることもできる。また(3)の方法についても、差分演算による類似度と同様に、R,G,Bの各色データを用いて相関値を求める場合と、特定の色データのみを用いて相関値を求める場合とに分類してもよい。   As for the method of (2), as described above, for color data other than the specific color data, the similarity without setting the weight data is obtained, and these are used as the similarity using the weight data of the specific color data. The method of adding to can be replaced. In the method (3), as in the case of similarity by difference calculation, a correlation value is obtained using R, G, and B color data, and a correlation value is obtained using only specific color data. May be classified.

以下、この類似度の演算方法を自動的に選択する処理について、図11〜図13を用いて具体的に説明する。この例は、図8,9の処理により、良モデルおよび不良モデルならびに重みデータの登録が完了した特定の品番に着目し、上記(1)〜(3)の各方法による類似度のうちのいずれを求めるのが適切であるかを、基板の良品画像を用いて自動的に判別するものである。   Hereinafter, the process of automatically selecting the similarity calculation method will be specifically described with reference to FIGS. In this example, attention is paid to a specific product number for which registration of the good model and the defective model and the weight data is completed by the processing of FIGS. 8 and 9, and any of the similarities by the methods (1) to (3) above Is automatically determined using a non-defective image of the substrate.

図11中、OK1〜OK3は、着目中の品番の部品について、良品画像から抜き出したサンプル画像(以下、「良サンプル」という。)の名称である。またNG1〜NG5は、着目中の品番と同じグループに属する他品番の部品について、良品画像から抜き出したサンプル画像(以下、「不良サンプル」という。)の名称である。各サンプルは、それぞれ良品画像から個別に切り出されたものである。したがって、同じ品番のサンプルであっても、色合いなどが微妙に異なる。また、不良サンプルについては、着目中の部品以外の品番が複数存在する場合には、これらの品番のすべてについて、不良サンプルが設定されるのが望ましい。   In FIG. 11, OK <b> 1 to OK <b> 3 are names of sample images (hereinafter referred to as “good samples”) extracted from the non-defective images for the part of the product number under attention. Further, NG1 to NG5 are names of sample images (hereinafter referred to as “defective samples”) extracted from non-defective products for parts of other product numbers that belong to the same group as the product number of interest. Each sample is individually cut out from a non-defective image. Therefore, even the samples with the same part number have slightly different colors. As for defective samples, when there are a plurality of product numbers other than the part under consideration, it is desirable that defective samples are set for all of these product numbers.

図11は、上記3通りの演算方法により、それぞれ着目品番の部品の良品モデルに対する各サンプルの類似度を求めた結果を示す。なお、良サンプルのうちの「OK1」は、良モデルの作成に使用されたものであるため、いずれの演算結果も「0」(すなわち類似度100パーセント)となっている。   FIG. 11 shows the result of obtaining the similarity of each sample with respect to the non-defective product model of the part of the product number of interest by the above three calculation methods. Note that “OK1” of the good samples is used to create the good model, and thus all the calculation results are “0” (that is, the similarity is 100%).

図12は、これらの類似度のグラフ上で、判別処理のために使用されるパラメータを示したものである。
図中、●印は、図11に示した良品サンプルの類似度を示し、■印は、不良品サンプルの類似度を示す。また、太い一点鎖線は、良品サンプルの類似度の分布範囲の中間値(最大値と最小値との平均値)であり、太い二点差線は、不良品サンプルの類似度の分布範囲の中間値である。
FIG. 12 shows parameters used for discrimination processing on these similarity graphs.
In the figure, the mark ● indicates the similarity of the non-defective sample shown in FIG. 11, and the mark ■ indicates the similarity of the defective sample. The thick alternate long and short dash line is the intermediate value of the similarity distribution range of the non-defective samples (average value of the maximum and minimum values), and the thick two-dotted line is the intermediate value of the similarity distribution range of the defective samples. It is.

各グラフにおいて、Dは、良サンプルの中間値と不良サンプルの中間値との差である。また、Rは、良サンプルの最小の類似度の値(数値上は最大値)から不良サンプルの最大の類似度の値(数値上は最小値との差)である。   In each graph, D is the difference between the intermediate value of the good sample and the intermediate value of the defective sample. R is a minimum similarity value (a numerical value is the maximum value) of a good sample to a maximum similarity value (a difference from the minimum value is a numerical value) of a defective sample.

Dは、良サンプルと不良サンプルとの間での類似度の平均的な差の大きさを示すと考えられる。Rは、良サンプルの分布範囲と不良サンプルとの分布範囲との間の隔たりの大きさを示すと考えられる。このRが大きくなるほど、正しい部品と誤った部品との切り分けが容易になると考えられる。よって、この実施例では、(1)〜(3)の演算毎に、Dに対するRの比(R/D)を求め、その比の大きさが最大になる演算処理を選択するようにしている。   D is considered to indicate the magnitude of the average difference in similarity between the good sample and the bad sample. R is considered to indicate the size of the gap between the distribution range of good samples and the distribution range of defective samples. It is considered that the larger R is, the easier it is to distinguish between correct parts and wrong parts. Therefore, in this embodiment, for each calculation of (1) to (3), the ratio of R to D (R / D) is obtained, and the calculation process that maximizes the ratio is selected. .

図13は、上記図11に示した各演算結果について、それぞれR,D,R/Dを求めた結果を示す。この例によれば、R/Dが最も大きくなるのは、(3)の相関値による類似度を求めた場合であるから、検査の際に実行する演算としても、(3)の方法が選択される。   FIG. 13 shows the results of obtaining R, D, and R / D for each calculation result shown in FIG. According to this example, the R / D becomes the largest when the degree of similarity based on the correlation value of (3) is obtained. Therefore, the method of (3) is also selected as the operation to be performed at the time of inspection. Is done.

上記の図11〜13に示した類似度の算出方法の選択処理は、モデルの登録処理と同様に、検査対象となる基板の種類毎に行われるのが望ましい。   The selection process of the similarity calculation method shown in FIGS. 11 to 13 is preferably performed for each type of substrate to be inspected, similarly to the model registration process.

基板の外観自動検査装置の電気構成および光学的構成を示す図である。It is a figure which shows the electrical structure and optical structure of a board | substrate external appearance automatic inspection apparatus. 基板上の部品の配置例を示す説明図である。It is explanatory drawing which shows the example of arrangement | positioning of the components on a board | substrate. 図2の各部品のCADデータの内容を示す説明図である。It is explanatory drawing which shows the content of the CAD data of each component of FIG. 図2の各部品の品番をグループ分けした結果を示す説明図である。It is explanatory drawing which shows the result of having grouped the product number of each component of FIG. 部品検査システムの機能ブロック図である。It is a functional block diagram of a component inspection system. 良モデルの登録例を示す説明図である。It is explanatory drawing which shows the example of registration of a good model. 重みデータの設定例を示す説明図である。It is explanatory drawing which shows the example of a setting of weight data. 部品の分類およびOKモデルの登録に関する処理手順を示すフローチャートである。It is a flowchart which shows the process sequence regarding the classification of parts, and registration of an OK model. 不良モデルおよび重みデータの登録に関する処理手順を示すフローチャートである。It is a flowchart which shows the process sequence regarding registration of a defect model and weight data. 検査の流れを示すフローチャートである。It is a flowchart which shows the flow of a test | inspection. 3とおりの演算処理方法によりサンプル画像に対する類似度を求めた例を示すテーブルである。It is a table which shows the example which calculated | required the similarity with respect to a sample image with three kinds of arithmetic processing methods. 図11の演算結果から、類似度の演算方法の選択処理に用いるパラメータを求める方法を示すグラフである。It is a graph which shows the method of calculating | requiring the parameter used for the selection process of the calculation method of similarity from the calculation result of FIG. 図11の演算結果から求めたR,D,R/Dの値を示すテーブルである。12 is a table showing R, D, and R / D values obtained from the calculation result of FIG. 11.

符号の説明Explanation of symbols

1 コントローラ
2 カメラ
10 制御部
15 メモリ
100 部品検査システム
101 CADデータ入力部
103 部品分類処理部
104 モデル登録部
105 重みデータ設定部
107 検査実行部
111 モデル記憶部
112 グループデータ記憶部
113 重みデータ記憶部
DESCRIPTION OF SYMBOLS 1 Controller 2 Camera 10 Control part 15 Memory 100 Component inspection system 101 CAD data input part 103 Part classification process part 104 Model registration part 105 Weight data setting part 107 Inspection execution part 111 Model storage part 112 Group data storage part 113 Weight data storage part

Claims (4)

部品の実装工程を経た基板を撮像し、生成された画像中の部品に関する特徴を用いて前記基板に正しい部品が実装されているかどうかを検査するためのモデルを登録する方法であって、
前記基板の設計データを用いて、各実装部品を部品種およびサイズに基づきグループ分けするステップA、
前記基板上の各部品の画像の良モデルを登録するステップB、
ステップBで登録された良モデルに順に着目し、着目中の良モデルが適用される部品と同一のグループに分類された他の部品の良モデルを、前記着目中の良モデルに対応する不良モデルとして設定して登録するステップC、
の各ステップを実行することを特徴とする実装部品の検査のためのモデル登録方法。
A method of registering a model for inspecting whether or not a correct component is mounted on the substrate by using a feature related to the component in the generated image by imaging a substrate that has undergone a component mounting process,
Step A for grouping each mounted component based on component type and size using the board design data,
Step B for registering a good model of an image of each component on the board,
Pay attention to the good model registered in step B in order, and select a good model of another part classified into the same group as the part to which the good model being noticed is applied as a defective model corresponding to the good model being noticed. Step C to set and register as
A model registration method for inspecting a mounted component, characterized in that each of the steps is executed.
部品の実装工程を経た基板を撮像し、生成された画像中の部品に関する特徴を用いて前記基板に正しい部品が実装されているかどうかを検査する方法であって、
前記基板の設計データを用いて、各実装部品を部品種およびサイズに基づきグループ分けするステップA、
前記基板上の各部品の画像の良モデルを登録するステップB、
ステップBで登録された良モデルに順に着目し、着目中の良モデルが適用される部品と同一のグループに分類された他の部品の良モデルを、前記着目中の良モデルに対応する不良モデルとして設定して登録するステップC、
の各ステップを、検査前に実行しておき、
検査において、検査対象の部品毎に、その部品の画像を対象に良モデルおよび不良モデルに対する当該部品の画像の類似度を求め、いずれの不良モデルに対する類似度よりも良モデルに対する類似度の方が高くなったとき、検査対象の部品は正しい部品であると判別し、前記良モデルに対する類似度よりもいずれかの不良モデルに対する類似度の方が高くなったとき、前記検査対象の部品は誤った部品であると判別する、実装部品の検査方法。
A method of inspecting whether or not a correct component is mounted on the substrate by imaging a substrate that has undergone a component mounting process, and using features related to the component in the generated image,
Step A for grouping each mounted component based on component type and size using the board design data,
Step B for registering a good model of an image of each component on the board,
Pay attention to the good model registered in step B in order, and select a good model of another part classified into the same group as the part to which the good model being noticed is applied as a defective model corresponding to the good model being noticed. Step C to set and register as
Each step is performed before inspection,
In the inspection, for each part to be inspected, the similarity of the image of the part to the good model and the defective model is obtained for the image of the part, and the similarity to the good model is better than the similarity to any defective model When it becomes high, it is determined that the part to be inspected is a correct part, and when the similarity to any defective model is higher than the similarity to the good model, the part to be inspected is incorrect. A method for inspecting a mounted component that is identified as a component.
請求項2に記載された方法において、
前記検査の前に、前記ステップCで設定された不良モデルの各画素に、それぞれ良モデルの対応画素に対する差に応じた重みを設定し、これらの重みを前記不良モデルに対応づけて登録するステップDを、さらに実行し、
前記検査では、
検査対象画像と各不良モデルとの間で、それぞれ前記ステップDで当該モデルにつき登録された重みにより対応画素間の差を重み付けした値を用いて、画像間の差が大きいほど値が大きくなるように設定された類似度を求める演算により、各不良モデルに対する検査対象画像の類似度を求める一方、良モデルについて、各不良モデルに設定したのと同じ重みを用いて前記演算を複数回実行することにより、前記良モデルに対する検査対象画像の類似度を複数とおり算出し、
良モデルに対する類似度と不良モデルに対する類似度とを、同じ重みを用いて算出されたもの毎に組み合わせて比較し、すべての組み合わせにおいて、不良モデルに対する類似度よりも良モデルに対する類似度の方が高くなったとき、前記検査対象の部品は正しい部品であると判別し、いずれかの組み合わせにおいて、不良モデルに対する類似度が良モデルに対する類似度よりも高くなったとき、前記検査対象の部品は誤った部品であると判別する、実装部品の検査方法。
The method of claim 2, wherein
Before the inspection, a step of setting a weight corresponding to a difference with respect to a corresponding pixel of the good model for each pixel of the defective model set in the step C, and registering these weights in association with the defective model D is executed further,
In the inspection,
A value obtained by weighting the difference between corresponding pixels by the weight registered for the model in Step D between the inspection target image and each defective model is used so that the value increases as the difference between the images increases. By calculating the similarity set for the defect model, the similarity of the image to be inspected with respect to each defective model is obtained, and for the good model, the calculation is executed a plurality of times using the same weights set for each defective model. By calculating a plurality of similarities of the inspection target image with respect to the good model,
The similarity for the good model and the similarity for the bad model are compared and combined for each one calculated using the same weight, and in all combinations, the similarity for the good model is better than the similarity for the bad model. When it is high, it is determined that the part to be inspected is a correct part, and in any combination, when the similarity to the defective model is higher than the similarity to the good model, the part to be inspected is erroneous. A method for inspecting a mounted component that determines that the component is a damaged component.
部品の実装工程を経た基板を撮像し、生成された画像中の部品に関する特徴を用いて前記基板に正しい部品が実装されているかどうかを検査する装置であって、
検査対象の基板上の各部品の画像の良モデルが登録されたメモリと、
検査対象の基板の設計データの入力を受け付けて、入力された設計データを用いて、各実装部品を部品種およびサイズに基づきグループ分けする分類手段と、
前記メモリに登録された良モデルに順に着目し、着目中の良モデルが適用される部品と同一のグループに分類された他の部品の良モデルを、前記着目中の良モデルに対応する不良モデルとして設定する不良モデル設定手段と、
検査対象の基板が撮像されたとき、生成された画像中の検査対象の部品毎に、対応する良モデルおよび不良モデルに対する当該部品の画像の類似度を求め、これらの類似度に基づき、各部品が正しい部品であるかどうかを判別する判別手段とを、備え、
前記判別手段は、いずれの不良モデルに対する類似度よりも良モデルに対する類似度の方が高くなったとき、検査対象の部品は正しい部品であると判別し、前記良モデルに対する類似度よりもいずれかの不良モデルに対する類似度の方が高くなったとき、前記検査対象の部品は誤った部品であると判別する、基板検査装置。
An apparatus for imaging a board that has undergone a component mounting process and inspecting whether or not a correct component is mounted on the board by using a feature related to the component in the generated image,
A memory in which good models of images of each part on the board to be inspected are registered,
A classifying means that accepts input of design data of a board to be inspected, and uses the input design data to group each mounted component based on component type and size;
Pay attention to the good model registered in the memory in order, and select a good model of another part classified into the same group as the part to which the good model being noticed is applied, and a defective model corresponding to the good model being noticed Defective model setting means to set as,
When the board to be inspected is imaged, for each part to be inspected in the generated image, the similarity of the image of the part to the corresponding good model and defective model is obtained, and each part is based on these similarities And a determination means for determining whether or not is a correct part,
When the similarity to the good model is higher than the similarity to any defective model, the determination means determines that the part to be inspected is a correct part, and any of the similarities to the good model A board inspection apparatus that determines that the part to be inspected is an incorrect part when the degree of similarity with respect to the defective model is higher.
JP2006336689A 2006-12-14 2006-12-14 Model registration method for mounting component inspection, mounting component inspection method, and board inspection apparatus using this method Pending JP2008153255A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006336689A JP2008153255A (en) 2006-12-14 2006-12-14 Model registration method for mounting component inspection, mounting component inspection method, and board inspection apparatus using this method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006336689A JP2008153255A (en) 2006-12-14 2006-12-14 Model registration method for mounting component inspection, mounting component inspection method, and board inspection apparatus using this method

Publications (1)

Publication Number Publication Date
JP2008153255A true JP2008153255A (en) 2008-07-03

Family

ID=39655165

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006336689A Pending JP2008153255A (en) 2006-12-14 2006-12-14 Model registration method for mounting component inspection, mounting component inspection method, and board inspection apparatus using this method

Country Status (1)

Country Link
JP (1) JP2008153255A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8314468B2 (en) 2009-06-10 2012-11-20 Moxtek, Inc. Variable ring width SDD
JP2013236063A (en) * 2012-03-28 2013-11-21 Koh Young Technology Inc Method for generating and inspecting task data for pcb inspection device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8314468B2 (en) 2009-06-10 2012-11-20 Moxtek, Inc. Variable ring width SDD
JP2013236063A (en) * 2012-03-28 2013-11-21 Koh Young Technology Inc Method for generating and inspecting task data for pcb inspection device
US8856721B2 (en) 2012-03-28 2014-10-07 Koh Young Technology Inc. Method for generating task data of a PCB and inspecting a PCB

Similar Documents

Publication Publication Date Title
CN113111903B (en) Intelligent production line monitoring system and monitoring method
CN113221889A (en) Anti-interference recognition method and device for chip characters
US20150306634A1 (en) Delivery sorting processing system and delivery sorting processing method
KR100598381B1 (en) In-line type automatic wafer defect sorting device and control method
US20040076323A1 (en) Inspection data producing method and board inspection apparatus using the method
JP2009128345A (en) Object recognition method and board visual inspection apparatus using this method
JP2018036241A (en) Inspection method, inspection apparatus, inspection program, and recording medium
JP2010071951A (en) Visual inspection device and visual inspection method
CN115170501A (en) Defect detection method, system, electronic device and storage medium
TWI669519B (en) Board defect filtering method and device thereof and computer-readabel recording medium
CN106528665B (en) AOI equipment test file search method and system
CN114494103A (en) Defect detection method and device
US20130182948A1 (en) Method and Apparatus for Training a Probe Model Based Machine Vision System
CN119723200A (en) Defect type detection method and device, electronic device and storage medium
US20240177453A1 (en) Method and apparatus for assigning image areas from image series to result classes by means of analyte data evaluation system with processing model
US6920241B1 (en) System and method for bundled location and regional inspection
JP2008153255A (en) Model registration method for mounting component inspection, mounting component inspection method, and board inspection apparatus using this method
JP2981434B2 (en) Pattern defect detection method and apparatus
JP4513394B2 (en) Color image processing method and image processing apparatus
JP2007285880A (en) Sample image registration method and sample image creation apparatus in substrate inspection
JP4670994B2 (en) Color image processing method and image processing apparatus
JP5045211B2 (en) Character recognition device, appearance inspection device, and character recognition method
JP4872930B2 (en) Character recognition device, fuel pump module assembling device equipped with such device, and character recognition method
JP4189094B2 (en) Inspection system
CN114651290B (en) Device and method for processing value documents and value-document processing system