JP2006220437A - Substrate inspection device, method and device for setting parameter - Google Patents

Substrate inspection device, method and device for setting parameter Download PDF

Info

Publication number
JP2006220437A
JP2006220437A JP2005031716A JP2005031716A JP2006220437A JP 2006220437 A JP2006220437 A JP 2006220437A JP 2005031716 A JP2005031716 A JP 2005031716A JP 2005031716 A JP2005031716 A JP 2005031716A JP 2006220437 A JP2006220437 A JP 2006220437A
Authority
JP
Japan
Prior art keywords
inspection
area
color
image
lead
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
JP2005031716A
Other languages
Japanese (ja)
Other versions
JP4539355B2 (en
Inventor
Toshihiro Moriya
俊洋 森谷
Hirotaka Wada
洋貴 和田
Takako Onishi
貴子 大西
Atsushi Shimizu
敦 清水
Akira Nakajima
晶 仲島
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 JP2005031716A priority Critical patent/JP4539355B2/en
Publication of JP2006220437A publication Critical patent/JP2006220437A/en
Application granted granted Critical
Publication of JP4539355B2 publication Critical patent/JP4539355B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/956Inspecting patterns on the surface of objects
    • G01N21/95684Patterns showing highly reflecting parts, e.g. metallic elements

Landscapes

  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Electric Connection Of Electric Components To Printed Circuits (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technique capable of automatically forming a parameter used in a substrate inspection device, especially, a parameter suitable for inspecting the substrate of a component having a gull-wing lead. <P>SOLUTION: A soldered land region is specified from the image obtained, by photographing the component by a data processor and a region, where a lead region where the effect of the lead appears is removed from the land region, is set to an inspection region used in the inspection of the substrate. At this time, the data processor acquires the height data of the lead from the CAD data of the component and increases the size of the lead region that is removed from the land region, corresponding to the height of the lead. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、基板検査装置で用いられるパラメータを自動生成するための技術に関する。   The present invention relates to a technique for automatically generating parameters used in a substrate inspection apparatus.

従来より、多数の電子部品が実装されたプリント基板の半田実装品質を検査するための基板検査装置が提案されている。この種のプリント基板において「電子部品の電極部とランドを半田付けした際の半田盛りの形状」を半田フィレットと呼ぶが、電子部品の電極部の濡れ上がりによっては、半田フィレットが形成されているように見えて、実は電子部品と半田フィレットが未接触な場合もある。よって、半田付けの良否を検査するには、自由曲線からなる半田フィレットの形状を正確に捉える必要がある。   Conventionally, a board inspection apparatus for inspecting the solder mounting quality of a printed board on which a large number of electronic components are mounted has been proposed. In this type of printed circuit board, “the shape of the solder pile when the electrode part of the electronic component and the land are soldered” is called a solder fillet. However, depending on the wetting of the electrode part of the electronic component, a solder fillet is formed. In some cases, the electronic component and the solder fillet are not in contact with each other. Therefore, in order to inspect the soldering quality, it is necessary to accurately grasp the shape of the solder fillet made of a free curve.

しかしながら、従前の基板検査装置では、モノクロ(単色)単一照明を光源に用いていたために、半田フィレットの3次元形状を画像解析するのが困難であった。それゆえ、半田付けの良否を判定することができず、基板検査装置として実用に耐えるものではなかった。   However, in the conventional board inspection apparatus, since monochrome (single color) single illumination is used as a light source, it is difficult to perform image analysis of the three-dimensional shape of the solder fillet. Therefore, the quality of soldering cannot be determined, and the board inspection apparatus cannot be used practically.

このような課題を解決するため、本出願人は、図16に示す方式の基板検査装置を提案した(特許文献1参照)。この方式は3色光源カラーハイライト方式(もしくは単にカラーハイライト方式)とよばれるもので、複数の色の光源で検査対象を照らすことによって半田フィレットの3次元形状を疑似カラー画像として得る技術である。   In order to solve such a problem, the present applicant has proposed a substrate inspection apparatus of the system shown in FIG. 16 (see Patent Document 1). This method is called the three-color light source color highlight method (or simply the color highlight method), and is a technology that obtains the three-dimensional shape of the solder fillet as a pseudo-color image by illuminating the inspection object with light sources of multiple colors. is there.

プリント基板の自動検査の実用化は、実質、このカラーハイライト方式技術の登場以降であると言われている。特に、電子部品が小型化する現在では、半田フィレット形状を目視で判別することも困難であり、カラーハイライト方式の基板検査装置なしでは基板検査が成り立たないと言うこともできる。   It is said that the practical use of automatic inspection of printed circuit boards is practically after the advent of this color highlighting technology. In particular, at the present time when electronic components are miniaturized, it is difficult to visually determine the solder fillet shape, and it can be said that board inspection cannot be realized without a color highlight type substrate inspection apparatus.

図16に示すように、カラーハイライト方式の基板検査装置は、基板110上の検査対象107に異なる入射角で三原色光を照射する投光部105と、検査対象107からの反射光を撮像する撮像部106と、を備える。この投光部105は、異なる径を有し、かつ制御処理部からの制御信号に基づき赤色光、緑色光、青色光を同時に照射する3個の円環状光源111,112,113により構成されている。各光源111,112,113は、検査対象107の真上位置に中心を合わせ、かつ検査対象107から見て異なる仰角に対応する方向に配置されている。   As shown in FIG. 16, the color highlight type substrate inspection apparatus images the light projection unit 105 that irradiates the inspection target 107 on the substrate 110 with the three primary color lights at different incident angles and the reflected light from the inspection target 107. An imaging unit 106. The light projecting unit 105 includes three annular light sources 111, 112, and 113 that have different diameters and that simultaneously emit red light, green light, and blue light based on a control signal from the control processing unit. Yes. The light sources 111, 112, and 113 are arranged in directions corresponding to different elevation angles when viewed from the inspection target 107 while being centered on the position directly above the inspection target 107.

かかる構成の投光部105で検査対象(半田フィレット)107を照射すると、撮像部106には、検査対象107の表面の傾斜に応じた色の光が入射する。よって、図17に示すように、電子部品の半田付けが良好であるとき/部品が欠落しているとき/半田不足の状態であるときなど、半田フィレットの形状に応じて、撮像画像の色彩パターンに明確な差異が現れる。これにより、半田フィレットの3次元形状を画像解析するのが容易になり、電子部品の有無や半田付けの良否を正確に判定することができるようになる。   When the inspection target (solder fillet) 107 is irradiated by the light projecting unit 105 having such a configuration, light of a color corresponding to the inclination of the surface of the inspection target 107 enters the imaging unit 106. Therefore, as shown in FIG. 17, when the soldering of the electronic component is good / when the component is missing / when the solder is insufficient, the color pattern of the captured image depends on the shape of the solder fillet. A clear difference appears. This facilitates image analysis of the three-dimensional shape of the solder fillet, and makes it possible to accurately determine the presence / absence of electronic components and the quality of soldering.

カラーハイライト方式の基板検査装置では、「あるべき良品の色」や「あるべき不良品の色」を表す色パラメータ(色条件)を予め設定しておき、検査画像の中から色パラメータに該当する色領域を抽出し、その抽出された領域のもつ種々の特徴量(たとえば、面積や長さ)に基づいて良否の判定を行う。したがって、実際の検査に先立ち、検査に用いる色パラメータ、特徴量の種類、良品と不良品とを切り分けるための判定条件(たとえば、しきい値)などを設定しておく必要がある。この色パラメータ、特徴量および判定条件を
合わせて検査ロジックもしくは検査パラメータと呼び、また検査ロジックを設定・調整することを一般にティーチングと呼ぶ。
In the color highlight type substrate inspection system, color parameters (color conditions) representing “the color of a good product that should be” and “the color of a defective product that should be” are set in advance, and the corresponding color parameter is selected from the inspection image. A color area to be extracted is extracted, and quality is determined based on various feature amounts (for example, area and length) of the extracted area. Therefore, prior to the actual inspection, it is necessary to set the color parameters used for the inspection, the types of feature amounts, the determination conditions (for example, threshold values) for separating good products from defective products, and the like. The color parameters, feature amounts, and determination conditions are collectively referred to as inspection logic or inspection parameters, and setting and adjusting the inspection logic is generally referred to as teaching.

検査精度を向上するためには、良品の示す特徴量と不良品の示す特徴量との間に有意かつ明確な差異が現れるように色パラメータを設定することが肝要である。すなわち、色パラメータのティーチングの善し悪しが検査精度を直接左右すると言える。   In order to improve the inspection accuracy, it is important to set the color parameter so that a significant and clear difference appears between the feature quantity indicated by the non-defective product and the feature quantity indicated by the defective product. That is, it can be said that the quality of teaching of color parameters directly affects the inspection accuracy.

そこで本出願人は、図18に示すように、カラーハイライト方式における色パラメータの設定を支援するためのツールを提案している(特許文献2参照)。このツールでは、色パラメータとして、赤、緑、青の各色相比ROP、GOP、BOPおよび明度データBRTのそれぞれの上限値および下限値の設定が可能である。図18の入力画面には、色パラメータの設定値を入力するための色パラメータ設定部127とともに、設定された各色パラメータにより抽出される色彩の範囲を表示するための設定範囲表示部128が設けられている。この設定範囲表示部128には、所定の明度の下で得られるすべての色彩を示した色合い図134が表示されており、オペレータが各色パラメータの上限値、下限値を設定すると、色合い図134上には、設定された色パラメータにより抽出される色彩を囲むような確認領域135が表示される。また、2値化表示ボタン129を押すと、現在の色パラメータによる抽出結果が二値画像で表示される。このツールによれば、オペレータは、確認領域135や二値画像を見ながら、適切な抽出結果が得られるまで色パラメータの追い込みを行うことができる。
特開平2−78937号公報 特開平9−145633号公報
Therefore, as shown in FIG. 18, the present applicant has proposed a tool for supporting the setting of color parameters in the color highlight method (see Patent Document 2). In this tool, it is possible to set the upper limit value and the lower limit value of each of the hue ratios ROP, GOP, BOP and lightness data BRT of red, green, and blue as color parameters. The input screen of FIG. 18 is provided with a color parameter setting unit 127 for inputting color parameter setting values and a setting range display unit 128 for displaying a color range extracted by each set color parameter. ing. The setting range display section 128 displays a hue diagram 134 showing all colors obtained under a predetermined brightness. When the operator sets the upper limit value and lower limit value of each color parameter, Displays a confirmation area 135 surrounding the color extracted by the set color parameter. When the binarization display button 129 is pressed, the extraction result based on the current color parameter is displayed as a binary image. According to this tool, the operator can track the color parameters until an appropriate extraction result is obtained while viewing the confirmation area 135 and the binary image.
Japanese Patent Laid-Open No. 2-78937 JP 9-145633 A

基板検査装置は、プリント基板の実装品質について一度に複数の検査項目を高速かつ正確に検査することが出来るという利点がある。ただし、基板検査装置の実稼動にあたっては、個別の検査対象に合わせて検査ロジック各々のティーチングを行い、不良品の見逃しがなく、かつ、良品を不良品と判定してしまう過検出が許容値(あらかじめ想定する値)以下に抑え込めるまで、判定精度を十分に高めなければならない。   The board inspection apparatus has an advantage that a plurality of inspection items can be inspected at high speed and accurately at once for the mounting quality of the printed board. However, in actual operation of the board inspection device, the over logic that teaches each inspection logic according to the individual inspection object, does not miss the defective product, and determines that the non-defective product is a defective product is an allowable value ( Judgment accuracy must be sufficiently increased until the value can be kept below the value assumed in advance.

不良品の見逃しと過検出について補足すれば、どのような検査であっても不良品の流出は絶対に許されない。不良品と良品の判定が難しい場合は、良品を不良品と判定する方を良しとするが、過検出が多くなると良品を不良品として廃棄するロスコストが増えるか、不良品の再検査が必要となり、検査を自動化するメリットがなくなってしまう。   Complementing the oversight and overdetection of defective products, the outflow of defective products is never allowed in any inspection. If it is difficult to judge defective products and non-defective products, it is better to judge non-defective products as defective products. However, excessive detection increases the loss cost of discarding non-defective products as defective products or requires re-inspection of defective products. The merit of automating the inspection is lost.

ところが、カラーハイライト方式の基板検査装置では、実用に耐え得る高度な基板検査が可能な反面、不良品の見逃しと過検出を目標値まで抑え込むためのティーチングが難しい。上述した色パラメータ設定支援ツールを利用したとしても、結局、色パラメータの追い込みはオペレータの経験と勘に頼る部分が大きいため、設定ミスの発生は避けられない。しかも、どれだけ優れたオペレータでも試行錯誤的に調整を繰り返さなければならず、非効率的であり、多大な労力と調整時間を要してしまうという問題がある。   However, in the color highlight type substrate inspection apparatus, although advanced substrate inspection that can withstand practical use is possible, teaching to suppress oversight and overdetection of defective products to a target value is difficult. Even if the color parameter setting support tool described above is used, it is inevitable that the setting of a color parameter will depend on the experience and intuition of the operator. In addition, no matter how good the operator is, the adjustment must be repeated on a trial and error basis, which is inefficient and requires a lot of labor and adjustment time.

また、QFP(Quad Flat Package)やSOP(Small Out-line Package)などのガル
ウィング型リードをもつ部品の検査に関しては、次のような特有の問題がある。図3に示すように、ガルウィング型リード90は高さ方向の段差をもち、リードの肩91から先端92にかけて傾斜している。それゆえ、半田93の量やリード90とランドの相対位置などが少し変化するだけで、半田形状やリードの露出範囲などがばらつき、その結果として撮像画像の色彩パターンも大きくばらつくことになる。たとえば、図3の左と真ん中に示す部品はともに良品(良好な半田付けがなされている部品)であるが、半田93がリード
の肩91を覆った場合には、半田93が山型になり、全体的に傾斜が大きく(急に)なるため、良品の特徴色である青系色が多く現れるのに対し、リードの肩91が露出した場合には、リード周辺の半田の傾斜が緩やかになるため、その部分に不良品の特徴色である赤系色が多く現れる。このように、ガルウィング型リードでは良品のバラツキが大きいために、不良品の見逃しが無く、且つ、過検出がなるべく少なくなるような最適な判定条件を設定することが難しいのである。
In addition, there are the following specific problems regarding inspection of parts having a gull wing type lead such as QFP (Quad Flat Package) and SOP (Small Out-line Package). As shown in FIG. 3, the gull wing type lead 90 has a step in the height direction and is inclined from the shoulder 91 to the tip 92 of the lead. Therefore, only a slight change in the amount of solder 93 and the relative position between the lead 90 and the land causes variations in the solder shape, lead exposure range, and the like, resulting in large variations in the color pattern of the captured image. For example, the parts shown in the left and middle of FIG. 3 are both non-defective products (parts that are well soldered), but when the solder 93 covers the shoulders 91 of the leads, the solder 93 has a mountain shape. On the whole, the slope becomes large (suddenly), so many blue-colored colors that are characteristic of good products appear. On the other hand, when the lead shoulder 91 is exposed, the slope of the solder around the lead becomes gentle. Therefore, many reddish colors, which are characteristic colors of defective products, appear in that portion. As described above, since the variation of non-defective products is large in the gull wing type lead, it is difficult to set an optimum determination condition so that a defective product is not overlooked and overdetection is minimized.

商品ライフサイクルの短命化が進む変化の激しい製造環境では、ティーチング作業の軽減、さらにはティーチングの自動化が強く望まれている。   In a manufacturing environment where the product life cycle is shortening and the manufacturing environment is changing rapidly, it is strongly desired to reduce teaching work and to further automate teaching.

本発明は上記実情に鑑みてなされたものであって、その目的とするところは、基板検査装置に用いられるパラメータを自動生成可能な技術を提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a technique capable of automatically generating parameters used in a substrate inspection apparatus.

本発明のさらなる目的は、ガルウィング型リードをもつ部品の基板検査に好適なパラメータを自動生成可能な技術を提供することにある。   A further object of the present invention is to provide a technique capable of automatically generating parameters suitable for board inspection of a component having a gull wing type lead.

本発明は、基板上に実装されたガルウィング型リードをもつ部品に異なる入射角で複数の色の光を照射し、その反射光を撮像して得られた画像から検査領域を抽出し、その検査領域から所定の色条件を満たす領域を抽出し、抽出された領域のもつ特徴量が所定の判定条件を満たすか否かで前記部品の実装状態を検査する基板検査装置において用いられるパラメータを自動生成する方法及び装置を提供するものである。パラメータには、検査領域、色条件、判定条件などが含まれる。   The present invention irradiates a component having a gull-wing type lead mounted on a substrate with light of a plurality of colors at different incident angles, extracts an inspection region from an image obtained by imaging the reflected light, and inspects the inspection region. An area that satisfies a predetermined color condition is extracted from the area, and parameters used in the board inspection apparatus that automatically inspects the mounting state of the component depending on whether or not the feature value of the extracted area satisfies the predetermined determination condition are automatically generated. A method and apparatus are provided. The parameters include an inspection area, a color condition, a determination condition, and the like.

検査領域の生成にあたっては、情報処理装置(パラメータ設定装置)が、部品を撮像して得られた画像から、半田が付与されるランド領域を特定し、そのランド領域から、リードの影響が現れるリード領域を除外した領域を、基板検査で用いる検査領域に設定する。ランド領域の特定には、テンプレートマッチングなどの画像認識手法を利用することができる。リード領域とは、リードの存在が、ランド領域の撮像画像に現れる色彩パターンに影響(バラツキ)を与える可能性のある領域をいう。   In generating the inspection area, the information processing apparatus (parameter setting apparatus) specifies a land area to which solder is applied from an image obtained by imaging the component, and leads from which the influence of the lead appears. An area excluding the area is set as an inspection area used for substrate inspection. An image recognition technique such as template matching can be used to specify the land area. The lead area refers to an area where the presence of the lead may affect (variate) the color pattern appearing in the captured image of the land area.

ここで、リード領域の大きさを全種類の部品で共通にするのは好ましくない。部品種によってバラツキの大きさが異なるからである。バラツキの最も大きい部品種に合わせてリード領域を十分大きく確保することも可能ではあるが、検査精度の観点から、検査領域を過剰に小さくするのは避けるべきであり、バラツキの大きさに見合った検査領域(リード領域)に設定するほうが好ましいといえる。   Here, it is not preferable to make the size of the lead region common to all types of components. This is because the size of variation varies depending on the part type. Although it is possible to secure a sufficiently large lead area according to the type of component with the largest variation, from the viewpoint of inspection accuracy, it should be avoided to make the inspection region too small, and it is commensurate with the size of the variation. It can be said that it is preferable to set the inspection area (lead area).

本発明者らは、リードに起因する色彩パターンのバラツキが、リードの肩を半田が覆うかどうかという点に依存していることを見出した。そこで、本発明では、情報処理装置が、部品のCAD情報からリード高さの情報を取得し、そのリード高さに応じてランド領域から除外するリード領域を大きくする。リード高さとは、リードの先端(ランドに接触する部分)からリードの肩までの寸法である。リード高さが小さいほどリードの肩が半田で覆われる可能性が増し、結果として、色彩パターンのバラツキが小さくなる。逆に、リード高さが大きいほどリードの肩が露出し、結果として、色彩パターンのバラツキが大きくなる。それゆえ、本発明のようにリード高さに応じてリード領域の大きさを調整することにより、バラツキの大きさに見合った適切な検査領域を設定することができる。そして、このように設定された検査領域を基板検査に用いれば、ガルウィング型リードに特有の問題である、リードに起因する色彩パターンのバラツキを予め除去できるため、基板検査の精度および信頼性の向上が可能となる。   The present inventors have found that the variation in the color pattern caused by the lead depends on whether the solder covers the shoulder of the lead. Therefore, in the present invention, the information processing apparatus acquires information on the lead height from the CAD information of the component, and enlarges the lead area excluded from the land area according to the lead height. The lead height is the dimension from the tip of the lead (the portion that contacts the land) to the shoulder of the lead. The smaller the lead height, the more likely the shoulder of the lead is covered with solder. As a result, the variation in the color pattern is reduced. Conversely, as the lead height increases, the shoulder of the lead is exposed, and as a result, the variation in the color pattern increases. Therefore, by adjusting the size of the lead area according to the lead height as in the present invention, an appropriate inspection area corresponding to the size of the variation can be set. And if the inspection area set in this way is used for substrate inspection, it is possible to remove in advance the variation in the color pattern caused by the lead, which is a problem peculiar to the gull wing type lead, so that the accuracy and reliability of the substrate inspection is improved. Is possible.

検査領域が決定した後は、情報処理装置が、その検査領域を用いて色条件および判定条件の算出処理を実行するとよい。具体的には、情報処理装置が、まず、検査により検出されるべき部品を撮像して得られた複数の画像から前記検査領域の部分を対象画像として抽出し、検査により除外されるべき部品を撮像して得られた複数の画像から前記検査領域の部分を除外画像として抽出する。たとえば、良品を検出する良品検査の場合には、実装状態の良好な部品の画像から対象画像が抽出され、実装状態の不良な部品の画像から除外画像が抽出される。逆に、不良を検出する不良検査の場合には、その不良をもつ部品の画像から対象画像が抽出され、それ以外の画像から除外画像が抽出される。そして、対象画像の各画素の色を対象点として、除外画像の各画素の色を除外点として、それぞれ色空間にマッピングする。そして、前記色空間を分割する色範囲であって、そこに含まれる対象点の数と除外点の数の差が最大となるような色範囲を求める。この色範囲は、基板検査で用いる色条件として設定される。   After the inspection area is determined, the information processing apparatus may execute a color condition and determination condition calculation process using the inspection area. Specifically, the information processing apparatus first extracts a part of the inspection area as a target image from a plurality of images obtained by imaging a part to be detected by inspection, and selects a part to be excluded by inspection. The inspection area portion is extracted as an excluded image from a plurality of images obtained by imaging. For example, in the case of a non-defective product inspection for detecting a non-defective product, a target image is extracted from an image of a component with a good mounting state, and an excluded image is extracted from an image of a component with a poor mounting state. On the contrary, in the case of defect inspection for detecting a defect, a target image is extracted from an image of a part having the defect, and an excluded image is extracted from other images. Then, the color of each pixel of the target image is mapped to the color space, with the color of each pixel of the excluded image as the target point. Then, a color range that divides the color space and that maximizes the difference between the number of target points and the number of excluded points included therein is obtained. This color range is set as a color condition used in substrate inspection.

ここで色空間は、明度、色相、彩度の3軸から少なくともなる多次元色空間であってもよいが、たとえば、対象画像に多く含まれ、かつ、除外画像にほとんど含まれない傾向にある色相についての彩度軸と明度軸からなる2次元色空間を用いることも好ましい。2次元色空間を採用することにより、色範囲の探索処理が簡単になる。また、2次元色空間において、色条件を彩度の下限と上限、および、明度の下限と上限から構成すれば、色範囲が矩形領域となり、色範囲の探索処理が一層簡単になる。なお、上記色距離の計算で用いる色空間と、色範囲の探索処理で用いる色空間とは、同一のものであることが好ましい。   Here, the color space may be a multi-dimensional color space consisting of at least three axes of brightness, hue, and saturation. For example, the color space tends to be included in the target image and hardly included in the excluded image. It is also preferable to use a two-dimensional color space composed of a saturation axis and a brightness axis for hue. Employing the two-dimensional color space simplifies the color range search process. In the two-dimensional color space, if the color condition is composed of a lower limit and an upper limit of saturation and a lower limit and an upper limit of lightness, the color range becomes a rectangular area, and the color range search process is further simplified. It should be noted that the color space used in the color distance calculation and the color space used in the color range search process are preferably the same.

続いて、情報処理装置が、前記対象画像および前記除外画像のそれぞれから前記色範囲に含まれる画素領域を抽出して、その画素領域のもつ特徴量についての特徴量ヒストグラムを作成する。そして、前記特徴量ヒストグラムの度数分布に基づいて前記対象画像の特徴量と前記除外画像の特徴量とを分離するためのしきい値を算出する。このしきい値は基板検査で用いる判定条件として設定される。   Subsequently, the information processing apparatus extracts a pixel region included in the color range from each of the target image and the excluded image, and creates a feature amount histogram for the feature amount of the pixel region. Then, a threshold value for separating the feature amount of the target image from the feature amount of the excluded image is calculated based on the frequency distribution of the feature amount histogram. This threshold value is set as a determination condition used in substrate inspection.

ここで特徴量としては、画素領域の面積、面積比、長さ、最大幅、重心、形状など種々のものが想定される。検査により検出すべき対象に応じて好ましい特徴量を1つまたは2つ以上採用すればよい。   Here, various features such as the area, area ratio, length, maximum width, center of gravity, and shape of the pixel region are assumed as the feature amount. What is necessary is just to employ | adopt one or two or more preferable feature-values according to the object which should be detected by test | inspection.

以上の処理により、検査パラメータである検査領域、色条件および判定条件が自動生成される。しかも、良品と不良品との差異が最もよく現れるように検査領域並びに色条件が設定されるので、検査精度を向上することができる。   Through the above processing, the inspection area, color condition, and determination condition, which are inspection parameters, are automatically generated. In addition, since the inspection region and the color condition are set so that the difference between the non-defective product and the defective product appears most, the inspection accuracy can be improved.

上記パラメータ設定処理に際し、情報処理装置が、リード領域の大きさを色々に変更しながら、最適または好適な検査領域、色条件、判定条件を探索する処理を行うことも好ましい。   In the parameter setting process, it is also preferable that the information processing apparatus performs a process of searching for an optimal or suitable inspection area, color condition, and determination condition while changing the size of the lead area in various ways.

たとえば、情報処理装置が、前記リード領域の大きさを変更することにより検査領域を変更し、変更後の検査領域を用いて色範囲およびしきい値を再算出する、という処理を繰り返し、前記特徴量ヒストグラムにおける対象画像の度数分布と除外画像の度数分布の間の分離度が最大となったとき、または、所定の基準値を超えたときの検査領域、色範囲およびしきい値をそれぞれ基板検査で用いる検査領域、色条件および判定条件に再設定するとよい。この処理によれば、特徴量ヒストグラムにおける分離度により検査領域の善し悪しが評価されることにより、設計データであるリード高さだけでなく実際の撮像画像から得られる情報も考慮されるため、検査領域、色条件、判定条件がより適切な値に設定され、基板検査の精度および信頼性を向上させることができる。   For example, the information processing apparatus repeats the process of changing the inspection area by changing the size of the lead area, and recalculating the color range and the threshold value using the inspection area after the change, Substrate inspection for the inspection area, color range, and threshold value when the degree of separation between the frequency distribution of the target image and the frequency distribution of the excluded image in the quantity histogram is maximized or exceeds a predetermined reference value It may be reset to the inspection area, color condition, and determination condition used in the above. According to this process, since the quality of the inspection area is evaluated based on the degree of separation in the feature amount histogram, not only the lead height as design data but also information obtained from the actual captured image is considered. Further, the color condition and the determination condition are set to more appropriate values, and the accuracy and reliability of the substrate inspection can be improved.

情報処理装置が、前記リード領域の大きさを変更することにより検査領域を変更し、変
更後の検査領域および前記色範囲を用いてしきい値を再算出する、という処理を繰り返し、前記特徴量ヒストグラムにおける対象画像の度数分布と除外画像の度数分布の間の分離度が最大となったとき、または、所定の基準値を超えたときの検査領域およびしきい値をそれぞれ基板検査で用いる検査領域および判定条件に再設定することも好ましい。この処理では、色条件の再計算を行わない分、パラメータ生成の処理コストを小さくすることができるという利点がある。
The information processing apparatus repeats the process of changing the inspection area by changing the size of the lead area, and recalculating the threshold value using the inspection area and the color range after the change, and the feature amount Inspection area that uses the inspection area and threshold value when the separation between the frequency distribution of the target image and the frequency distribution of the excluded image in the histogram is maximized or exceeds a predetermined reference value, respectively, in the substrate inspection It is also preferable to reset the determination conditions. This processing has the advantage that the processing cost for parameter generation can be reduced by the amount that the color condition is not recalculated.

上記各処理は、情報処理装置のプログラムによって実行されるものである。このように自動生成されたパラメータ(検査領域、色条件、判定条件)は基板検査装置の記憶部に格納され、基板検査処理に供される。   Each of the above processes is executed by a program of the information processing apparatus. The automatically generated parameters (inspection area, color condition, determination condition) are stored in the storage unit of the substrate inspection apparatus and used for substrate inspection processing.

なお、本発明は、上記処理の少なくとも一部を含む基板検査装置のパラメータ設定方法、または、かかる方法を実現するためのプログラムとして捉えることができる。また、本発明は、上記処理を実行する手段の少なくとも一部を有する基板検査装置のパラメータ設定装置、または、かかる装置を備えた基板検査装置として捉えることもできる。上記手段および処理の各々は可能な限り互いに組み合わせて本発明を構成することができる。   Note that the present invention can be understood as a parameter setting method for a substrate inspection apparatus including at least a part of the above processing, or a program for realizing the method. The present invention can also be understood as a parameter setting device of a substrate inspection apparatus having at least a part of the means for executing the above processing, or a substrate inspection apparatus equipped with such a device. Each of the above means and processes can be combined with each other as much as possible to constitute the present invention.

本発明によれば、基板検査装置に用いられるパラメータ、特にガルウィング型リードをもつ部品の基板検査に好適なパラメータ、を自動生成することができ、ティーチング作業の軽減、さらにはティーチングの自動化を図ることが可能となる。   According to the present invention, parameters used in a board inspection apparatus, in particular, parameters suitable for board inspection of a component having a gull wing type lead can be automatically generated, teaching work can be reduced, and teaching can be automated. Is possible.

以下に図面を参照して、この発明の好適な実施の形態を例示的に詳しく説明する。   Exemplary embodiments of the present invention will be described in detail below with reference to the drawings.

<第1実施形態>
(基板検査システムの構成)
図1は、本発明の実施形態に係る基板検査システムのハードウェア構成を示している。
<First Embodiment>
(Configuration of board inspection system)
FIG. 1 shows a hardware configuration of a board inspection system according to an embodiment of the present invention.

基板検査システムは、基板検査処理を実行する基板検査装置1と、この基板検査装置1の基板検査処理において用いられるパラメータを自動生成するパラメータ設定装置2とから構成される。基板検査装置1とパラメータ設定装置2は、有線もしくは無線のネットワーク、または、MOやDVDなどの記録媒体を介して、画像やパラメータなどの電子データの受け渡しを行うことができる。なお、本実施形態では基板検査装置1とパラメータ設定装置2が別体構成となっているが、基板検査装置本体にパラメータ設定装置の機能を組み込んで一体構成とすることも可能である。   The substrate inspection system includes a substrate inspection device 1 that executes substrate inspection processing and a parameter setting device 2 that automatically generates parameters used in the substrate inspection processing of the substrate inspection device 1. The board inspection apparatus 1 and the parameter setting apparatus 2 can exchange electronic data such as images and parameters via a wired or wireless network, or a recording medium such as an MO or a DVD. In the present embodiment, the board inspection apparatus 1 and the parameter setting apparatus 2 are configured separately, but it is also possible to integrate the function of the parameter setting apparatus into the board inspection apparatus main body.

(基板検査装置の構成)
基板検査装置1は、カラーハイライト方式により基板20上の実装部品21の実装品質(半田付け状態など)を自動検査する装置である。基板検査装置1は、概略、Xステージ22、Yステージ23、投光部24、撮像部25、制御処理部26を備えている。
(Configuration of board inspection equipment)
The board inspection apparatus 1 is an apparatus for automatically inspecting the mounting quality (soldering state, etc.) of the mounting component 21 on the board 20 by a color highlight method. The substrate inspection apparatus 1 generally includes an X stage 22, a Y stage 23, a light projecting unit 24, an imaging unit 25, and a control processing unit 26.

Xステージ22およびYステージ23は、それぞれ制御処理部26からの制御信号に基づいて動作するモータ(図示せず)を備える。これらモータの駆動によりXステージ22が投光部24および撮像部25をX軸方向へ移動させ、またYステージ23が基板20を支持するコンベヤ27をY軸方向へ移動させる。   Each of the X stage 22 and the Y stage 23 includes a motor (not shown) that operates based on a control signal from the control processing unit 26. By driving these motors, the X stage 22 moves the light projecting unit 24 and the imaging unit 25 in the X axis direction, and the Y stage 23 moves the conveyor 27 that supports the substrate 20 in the Y axis direction.

投光部24は、異なる径を有しかつ制御処理部26からの制御信号に基づき赤色光,緑色光,青色光を同時に照射する3個の円環状光源28,29,30により構成されている。各光源28,29,30は、観測位置の真上位置に中心を合わせかつ観測位置から見て
異なる仰角に対応する方向に配置されている。かかる配置により、投光部24は基板20上の実装部品21に異なる入射角で複数の色の光(本実施形態では、R,G,Bの3色)を照射する。
The light projecting unit 24 includes three annular light sources 28, 29, and 30 that have different diameters and that simultaneously emit red light, green light, and blue light based on a control signal from the control processing unit 26. . The light sources 28, 29, and 30 are arranged in directions corresponding to different elevation angles when centered on the position directly above the observation position and viewed from the observation position. With this arrangement, the light projecting unit 24 irradiates the mounting component 21 on the substrate 20 with light of a plurality of colors (in this embodiment, three colors of R, G, and B) at different incident angles.

撮像部25はカラーカメラであって、観測位置の真上位置に下方に向けて位置決めしてある。これにより基板表面の反射光が撮像部25により撮像され、三原色のカラー信号R,G,Bに変換されて制御処理部26へ供給される。   The imaging unit 25 is a color camera, and is positioned downward at a position directly above the observation position. As a result, the reflected light on the substrate surface is imaged by the imaging unit 25, converted into color signals R, G, and B of the three primary colors and supplied to the control processing unit 26.

制御処理部26は、A/D変換部33、画像処理部34、検査ロジック記憶部35、判定部36、撮像コントローラ31、XYステージコントローラ37、メモリ38、制御部(CPU)39、記憶部32、入力部40、表示部41、プリンタ42、通信I/F43などで構成される。   The control processing unit 26 includes an A / D conversion unit 33, an image processing unit 34, an inspection logic storage unit 35, a determination unit 36, an imaging controller 31, an XY stage controller 37, a memory 38, a control unit (CPU) 39, and a storage unit 32. , An input unit 40, a display unit 41, a printer 42, a communication I / F 43, and the like.

A/D変換部33は、撮像部25からのカラー信号R,G,Bを入力してディジタル信号に変換する回路である。各色相毎のディジタル量の濃淡画像データは、メモリ38内の画像データ格納エリアへと転送される。   The A / D conversion unit 33 is a circuit that receives the color signals R, G, and B from the imaging unit 25 and converts them into digital signals. The digital grayscale image data for each hue is transferred to the image data storage area in the memory 38.

撮像コントローラ31は、制御部39と投光部24および撮像部25とを接続するインターフェイスなどを備える回路であり、制御部39の出力に基づき投光部24の各光源28,29,30の光量を調整したり、撮像部25の各色相光出力の相互バランスを保つなどの制御を行う。   The imaging controller 31 is a circuit including an interface for connecting the control unit 39 to the light projecting unit 24 and the image capturing unit 25, and the light amount of each light source 28, 29, 30 of the light projecting unit 24 based on the output of the control unit 39. And control such as maintaining the mutual balance of the hue light outputs of the imaging unit 25 is performed.

XYステージコントローラ37は制御部39とXステージ22およびYステージ23とを接続するインターフェイスなどを備える回路であり、制御部39の出力に基づきXステージ22およびYステージ23の駆動を制御する。   The XY stage controller 37 is a circuit including an interface for connecting the control unit 39 to the X stage 22 and the Y stage 23, and controls driving of the X stage 22 and the Y stage 23 based on the output of the control unit 39.

検査ロジック記憶部35は、基板検査処理に用いられる検査ロジックを記憶する記憶部である。基板検査装置1では、半田形状を検査するフィレット検査や部品の欠落を検査する欠落検査など、複数種類の検査処理を行うことができる。検査ロジックは、検査の種類ごとに用意されるものであって、画像中の検査対象範囲を規定するための検査領域、検査領域内の画像から所定の色彩パターン(画素領域)を抽出するための色パラメータ(色条件)、その色彩パターンから抽出する特徴量の種類、その特徴量に関する良否の判定条件などから構成される。   The inspection logic storage unit 35 is a storage unit that stores inspection logic used for substrate inspection processing. The board inspection apparatus 1 can perform a plurality of types of inspection processes such as a fillet inspection for inspecting a solder shape and a lack inspection for inspecting a missing part. The inspection logic is prepared for each type of inspection, and is used to extract a predetermined color pattern (pixel region) from an inspection area for defining an inspection target range in an image and an image in the inspection area. It is composed of color parameters (color conditions), types of feature amounts extracted from the color patterns, and pass / fail judgment conditions for the feature amounts.

画像処理部34は、基板20上の部品21を撮像して得られた画像から検査領域を抽出する処理、検査領域の画像(検査画像)から色パラメータを満たす領域を抽出する処理、および、抽出された領域から所定の特徴量を算出する処理を実行する回路である。判定部36は、画像処理部34で算出された特徴量を受け取り、その特徴量が所定の判定条件を満たすか否かで部品の実装状態の良否を判定する処理を実行する回路である。   The image processing unit 34 extracts an inspection area from an image obtained by imaging the component 21 on the substrate 20, extracts an area satisfying a color parameter from the inspection area image (inspection image), and extracts This is a circuit for executing a process for calculating a predetermined feature amount from the obtained area. The determination unit 36 is a circuit that receives the feature amount calculated by the image processing unit 34 and executes processing for determining whether the component mounting state is good or not based on whether or not the feature amount satisfies a predetermined determination condition.

入力部40は、操作情報や基板20に関するデータなどを入力するのに必要なキーボードやマウスなどから構成されている。入力されたデータは制御部39へ供給される。通信I/F43は、パラメータ設定装置2や他の外部装置などとの間でデータの送受信を行うためのものである。   The input unit 40 includes a keyboard, a mouse, and the like necessary for inputting operation information and data related to the substrate 20. The input data is supplied to the control unit 39. The communication I / F 43 is for transmitting and receiving data to and from the parameter setting device 2 and other external devices.

制御部(CPU)39は、各種演算処理や制御処理を実行する回路である。記憶部32は、ハードディスクやメモリから構成される記憶装置であって、制御部39にて実行されるプログラムの他、基板のCAD情報、基板検査処理の判定結果などが格納される。   The control unit (CPU) 39 is a circuit that executes various arithmetic processes and control processes. The storage unit 32 is a storage device composed of a hard disk and a memory, and stores the CAD information of the substrate, the determination result of the substrate inspection process, and the like in addition to the program executed by the control unit 39.

図2に基板検査装置1の機能構成を示す。基板検査装置1は、指示情報受付機能10、
基板搬入機能11、CAD情報読込機能12、ステージ操作機能13、撮像機能14、検査ロジック読込機能15、検査機能16、判定結果書込機能17、基板搬出機能18を有する。これらの機能は、制御部39が記憶部32に格納されたプログラムに従って上記ハードウェアを制御することによって実現されるものである。また、記憶部32の内部には、CAD情報を記憶するCAD情報記憶部32aと判定結果を記憶する判定結果記憶部32bが設けられている。
FIG. 2 shows a functional configuration of the substrate inspection apparatus 1. The substrate inspection apparatus 1 includes an instruction information receiving function 10,
A board carry-in function 11, a CAD information read function 12, a stage operation function 13, an imaging function 14, an inspection logic read function 15, an inspection function 16, a determination result writing function 17, and a board carry-out function 18 are provided. These functions are realized by the control unit 39 controlling the hardware according to a program stored in the storage unit 32. In addition, a CAD information storage unit 32 a that stores CAD information and a determination result storage unit 32 b that stores determination results are provided inside the storage unit 32.

(基板検査処理)
次に、上記基板検査装置1における基板検査処理について述べる。ここでは、基板検査処理の一例として、ガルウィング型リードをもつトランジスタ部品の半田フィレット検査を説明する。
(Board inspection processing)
Next, substrate inspection processing in the substrate inspection apparatus 1 will be described. Here, solder fillet inspection of a transistor component having a gull wing type lead will be described as an example of substrate inspection processing.

図3は、2つの良品A,Bと1つの不良品Cの例を示している。図3の上段に示すように、良品Aでは、リード90の肩91が半田93によって覆われており、良品Bでは、リード90の肩91が露出している。良品Aの半田フィレットは比較的傾斜の急な山型形状を呈するが、良品Bの半田フィレットはリード90の周辺が平坦となる。ただし、良品A、Bともに、半田実装状態は良好である。不良品Cでは、半田量が不足しており、半田フィレットが全体的に平坦になっている。   FIG. 3 shows an example of two non-defective products A and B and one defective product C. As shown in the upper part of FIG. 3, the shoulder 91 of the lead 90 is covered with the solder 93 in the non-defective product A, and the shoulder 91 of the lead 90 is exposed in the non-defective product B. The solder fillet of the non-defective product A exhibits a relatively steep mountain shape, whereas the solder fillet of the non-defective product B has a flat periphery around the lead 90. However, both the non-defective products A and B are in a good solder mounting state. In the defective product C, the amount of solder is insufficient, and the solder fillet is flat overall.

これらの半田フィレットを基板検査装置1で撮像すると、それぞれ図3の下段に示すような画像が得られる。赤色,緑色,青色の照射光はそれぞれ異なる角度で半田フィレットに入射するため、半田フィレットの傾斜に応じて撮像部25に入射する反射光の色相が変化する。つまり、傾斜の急な部分では入射角度の最も浅い青色光の反射光が支配的となるのに対し、傾斜がほとんどない部分では赤色光の反射光が支配的となる。したがって、良品の半田フィレットでは青色の色相の領域が大きくなり、不良品の半田フィレットでは青色以外の色相の領域が大きくなるのである。ただし、良品Bのように、半田フィレットがリード90の肩91まで達していない場合には、リード90の周辺部分に不良品の特徴色である赤や緑の色が現れることがある。   When these solder fillets are imaged by the board inspection apparatus 1, images as shown in the lower part of FIG. 3 are obtained. Since the red, green, and blue irradiation lights are incident on the solder fillet at different angles, the hue of the reflected light that is incident on the imaging unit 25 changes according to the inclination of the solder fillet. That is, the reflected light of the blue light having the shallowest incident angle is dominant in the steep portion, whereas the reflected light of the red light is dominant in the portion having almost no inclination. Therefore, the region of the blue hue is large in the non-defective solder fillet, and the region of the hue other than blue is large in the defective solder fillet. However, when the solder fillet does not reach the shoulder 91 of the lead 90 as in the non-defective product B, red and green colors that are characteristic colors of defective products may appear in the peripheral portion of the lead 90.

本実施形態の半田フィレット検査では、このような色彩パターンの傾向を利用し、青色領域の大きさ(面積)に基づいて半田フィレットの良否判定を行う。以下、図4のフローチャートに沿って、検査処理の流れを具体的に説明する。   In the solder fillet inspection according to the present embodiment, the quality of the solder fillet is determined based on the size (area) of the blue region using such a tendency of the color pattern. Hereinafter, the flow of the inspection process will be specifically described with reference to the flowchart of FIG.

指示情報受付機能10は、基板検査の実行を指示する指示情報が入力されるまで待ち状態にある(ステップS100;NO、ステップS101)。入力部40の操作により、もしくは、通信I/F43を介して外部機器から指示情報が入力されると、指示情報受付機能10が指示情報を、基板搬入機能11、CAD情報読込機能12および検査ロジック読込機能15に送る(ステップS100;YES)。この指示情報には検査対象となる基板の情報(型番など)が含まれている。   The instruction information receiving function 10 is in a waiting state until instruction information for instructing execution of substrate inspection is input (step S100; NO, step S101). When instruction information is input from an external device by operating the input unit 40 or via the communication I / F 43, the instruction information receiving function 10 receives the instruction information, the board carry-in function 11, the CAD information reading function 12, and the inspection logic. The data is sent to the reading function 15 (step S100; YES). The instruction information includes information (model number, etc.) of the board to be inspected.

検査ロジック読込機能15は、基板の型番に対応する検査ロジックを検査ロジック記憶部35から読み込む(ステップS102)。ここでは検査対象部品の半田フィレット検査用の検査ロジックが読み込まれる。検査ロジックには、検査領域(検査の対象となる領域を規定する情報)、色パラメータ(色条件)およびしきい値(判定条件)が含まれる。   The inspection logic reading function 15 reads the inspection logic corresponding to the model number of the board from the inspection logic storage unit 35 (step S102). Here, the inspection logic for inspecting the solder fillet of the component to be inspected is read. The inspection logic includes an inspection area (information defining an area to be inspected), a color parameter (color condition), and a threshold value (determination condition).

また、基板搬入機能11は、指示情報に基づいてプリント基板搬入部から検査対象となる基板20をコンベヤ27上に搬入し(ステップS103)、CAD情報読込機能12は、基板の型番に対応するCAD情報をCAD情報記憶部32aから読み込む(ステップS104)。   The board carry-in function 11 carries the board 20 to be inspected from the printed board carry-in section onto the conveyor 27 based on the instruction information (step S103), and the CAD information reading function 12 loads the CAD corresponding to the board model number. Information is read from the CAD information storage unit 32a (step S104).

次に、ステージ操作機能13は、読み込まれたCAD情報から基板20の寸法、形状、部品の配置などの情報を得て、基板20上に実装された複数の部品21が順に観測位置(撮像位置)に位置合わせされるように、XYステージコントローラ37を介してXステージ22およびYステージ23を操作する(ステップS105)。   Next, the stage operation function 13 obtains information such as the dimensions, shape, and component arrangement of the substrate 20 from the read CAD information, and the plurality of components 21 mounted on the substrate 20 are sequentially observed positions (imaging positions). The X stage 22 and the Y stage 23 are operated via the XY stage controller 37 (step S105).

一方、撮像機能14は、撮像コントローラ31を介して投光部24の3個の光源28,29,30を発光させ、赤色、緑色、青色の光を同時に基板20上に照射する。また、撮像機能14は、撮像コントローラ31を介して撮像部25を制御し、ステージ22,23の操作に同期して基板20上の部品21を撮像する(ステップS106)。撮像された画像はメモリ38に取り込まれる。   On the other hand, the imaging function 14 causes the three light sources 28, 29, and 30 of the light projecting unit 24 to emit light via the imaging controller 31, and simultaneously irradiates red, green, and blue light onto the substrate 20. In addition, the imaging function 14 controls the imaging unit 25 via the imaging controller 31, and images the component 21 on the substrate 20 in synchronization with the operation of the stages 22 and 23 (step S106). The captured image is taken into the memory 38.

次に、検査機能16が、画像処理部34によって撮像画像から半田領域を抽出する(ステップS107)。ここで抽出される半田領域は、検査ロジックの検査領域によって規定された領域である。検査領域は、たとえば、撮像画像に対する相対座標や、撮像画像中のランド領域あるいは部品領域に対する相対座標などで規定される。本実施形態では、図5の上段に示すように、ランド領域に対する相対座標により規定される検査領域73を用いる。本実施形態の検査領域73は、リード周辺の領域を除外した凹字形状のものが用いられる。ただし検査領域の形状は図5のものに限らず、リード周辺の領域が除外されていれば、円形、長円形、多角形、自由形状などどのような形状でもよい。なお、撮像画像中のランド領域または部品領域の特定はたとえばテンプレートマッチングにより自動で行うことができる。   Next, the inspection function 16 extracts a solder region from the captured image by the image processing unit 34 (step S107). The solder area extracted here is an area defined by the inspection area of the inspection logic. The inspection area is defined by, for example, relative coordinates with respect to the captured image, relative coordinates with respect to a land area or a component area in the captured image, and the like. In the present embodiment, as shown in the upper part of FIG. 5, an inspection area 73 defined by relative coordinates with respect to the land area is used. The inspection area 73 of the present embodiment is a concave shape excluding the area around the lead. However, the shape of the inspection region is not limited to that shown in FIG. 5 and may be any shape such as a circle, an oval, a polygon, and a free shape as long as the region around the lead is excluded. The land area or component area in the captured image can be automatically specified by template matching, for example.

続いて、検査機能16は、抽出された半田領域(検査領域)を色パラメータを用いて二値化する(ステップS108)。ここで用いられる色パラメータは、青色の彩度の下限と上限、および、明度の下限と上限の4つの値で構成されている。二値化処理では、色パラメータで定義された色範囲内に含まれる画素が白画素に、それ以外の画素が黒画素に変換される。   Subsequently, the inspection function 16 binarizes the extracted solder area (inspection area) using color parameters (step S108). The color parameters used here are composed of four values: a lower limit and an upper limit of blue saturation, and a lower limit and an upper limit of lightness. In the binarization process, pixels included in the color range defined by the color parameter are converted to white pixels, and other pixels are converted to black pixels.

図5の下段は、二値化後の半田領域を示している。色パラメータで二値化することにより、半田領域中の青系色の領域が白画素として抽出され、良品画像と不良品画像の間の差異(特徴)が明確化していることがわかる。しかも、図5から明らかなように、ランド領域の全体を比較する場合に比べて、検査領域73の部分を比較した方が、良品A、Bと不良品Cとの差異が極めて顕著に現れることがわかる。特に、良品Bでは、リード周辺に現れる赤系色の部分が除外され、検査領域73に占める良品の特徴色(青系色)の割合が格段に増加していることがわかる。   The lower part of FIG. 5 shows the solder area after binarization. By binarizing with the color parameter, it can be seen that the blue color region in the solder region is extracted as a white pixel, and the difference (feature) between the non-defective product image and the defective product image is clarified. Moreover, as is clear from FIG. 5, the difference between the non-defective products A and B and the defective product C appears significantly more markedly when the portion of the inspection region 73 is compared than when the entire land region is compared. I understand. In particular, in the non-defective product B, the red color portion appearing around the lead is excluded, and it can be seen that the ratio of the non-defective product characteristic color (blue color) in the inspection region 73 is remarkably increased.

続いて、検査機能16は、画像処理部34にて、白画素領域の特徴量を抽出する。ここでは特徴量として白画素領域の面積(画素数)が計算される。そして、検査機能16は、白画素領域の面積値を判定部36に引き渡し、判定部36にて白画素領域の面積値としきい値とを比較する(ステップS109)。面積値がしきい値を超えた場合には(ステップS109;YES)、当該部品21の半田実装品質が良と判定され(ステップS110)、面積値がしきい値以下の場合には(ステップS109;NO)、当該部品21の半田実装品質が不良と判定される(ステップS111)。   Subsequently, the inspection function 16 uses the image processing unit 34 to extract the feature amount of the white pixel region. Here, the area (number of pixels) of the white pixel region is calculated as the feature amount. Then, the inspection function 16 passes the area value of the white pixel region to the determination unit 36, and the determination unit 36 compares the area value of the white pixel region with a threshold value (step S109). When the area value exceeds the threshold value (step S109; YES), it is determined that the solder mounting quality of the component 21 is good (step S110), and when the area value is less than the threshold value (step S109). NO), it is determined that the solder mounting quality of the component 21 is poor (step S111).

判定結果書込機能17は、上記判定結果をロケーションID(部品を特定するための情報)とともに判定結果記憶部32bに書き込む(ステップS112)。   The determination result writing function 17 writes the determination result together with the location ID (information for specifying a part) in the determination result storage unit 32b (step S112).

基板20上のすべての部品について検査を行ったら、基板搬出機能18がプリント基板搬送部によって基板20を搬出し、基板検査処理を終了する(ステップS113)。   When all the components on the board 20 have been inspected, the board carry-out function 18 carries out the board 20 by the printed board carrying section, and the board inspection process is finished (step S113).

以上述べた基板検査処理によれば、2次元画像に現れる色彩パターンによって半田フィレットの3次元形状を的確に把握できるため、半田実装品質の良否を正確に判定可能となる。さらに、撮像画像から、良品と不良品の差異が明確に現れる箇所(検査領域)を抽出し、その検査領域を用いて検査を行っているため、良好な判定精度を得ることができる。   According to the board inspection processing described above, since the three-dimensional shape of the solder fillet can be accurately grasped by the color pattern appearing in the two-dimensional image, it is possible to accurately determine the quality of the solder mounting quality. Furthermore, since a portion (inspection region) where a difference between a non-defective product and a defective product clearly appears is extracted from the captured image, and the inspection is performed using the inspection region, good determination accuracy can be obtained.

ところで、不良品の見逃しがなく、かつ、過検出が許容値以下になるような高い判定精度を実現するためには、予め検査ロジックの色パラメータ(色条件)およびしきい値(判定条件)を検査対象に合わせて最適な値に設定しておく必要がある。特に、ガルウィング型リードをもつ部品の検査の場合は、リードの影響が現れるリード周辺部分を避けて適切に検査領域を設定することが重要である。本実施形態では、これらのパラメータの生成(ティーチング)は、パラメータ設定装置2によって自動的に行われる。以下、詳しく説明する。   By the way, in order to achieve high determination accuracy so that defective products are not overlooked and overdetection is less than an allowable value, the color parameters (color conditions) and threshold values (determination conditions) of the inspection logic are set in advance. It is necessary to set the optimum value according to the inspection object. In particular, when inspecting a part having a gull wing type lead, it is important to appropriately set an inspection region by avoiding the lead peripheral portion where the influence of the lead appears. In the present embodiment, the generation (teaching) of these parameters is automatically performed by the parameter setting device 2. This will be described in detail below.

(パラメータ設定装置の構成)
パラメータ設定装置2は、図1に示すように、CPU、メモリ、ハードディスク、I/O制御部、通信I/F、表示部、情報入力部(キーボードやマウス)などを基本ハードウェアとして備える汎用のコンピュータ(情報処理装置)によって構成される。
(Configuration of parameter setting device)
As shown in FIG. 1, the parameter setting device 2 is a general-purpose device including a CPU, a memory, a hard disk, an I / O control unit, a communication I / F, a display unit, an information input unit (keyboard and mouse), etc. as basic hardware. It is composed of a computer (information processing device).

図6に第1実施形態に係るパラメータ設定装置2の機能構成を示す。パラメータ設定装置2は、指示情報受付機能50、教師画像情報読込機能51、画像取得機能52、振分機能53、マッピング機能54、色範囲探索機能55、二値化機能56、特徴量ヒストグラム生成機能57、しきい値算出機能58、検査ロジック生成機能59、検査ロジック書込機能60、検査領域決定機能80を有する。これらの機能は、メモリもしくはハードディスクに格納されたプログラムがCPUに読み込まれ実行されることによって実現されるものである。   FIG. 6 shows a functional configuration of the parameter setting device 2 according to the first embodiment. The parameter setting device 2 includes an instruction information reception function 50, a teacher image information reading function 51, an image acquisition function 52, a distribution function 53, a mapping function 54, a color range search function 55, a binarization function 56, and a feature amount histogram generation function. 57, a threshold value calculation function 58, an inspection logic generation function 59, an inspection logic writing function 60, and an inspection area determination function 80. These functions are realized by a program stored in a memory or a hard disk being read and executed by a CPU.

また、ハードディスク内には、ティーチングに用いる教師画像情報を記憶する教師画像情報DB61が設けられている。教師画像情報は、基板検査装置1によって撮像された実装部品の画像と、その画像が検出すべきもの(良品)か除外すべきもの(不良品)かを示す教師情報(ティーチングデータ)とからなる。ティーチングの信頼性を高めるために、良品と不良品それぞれについて数十〜数千の教師画像情報を準備することが好ましい。   In addition, a teacher image information DB 61 for storing teacher image information used for teaching is provided in the hard disk. The teacher image information includes an image of the mounted component imaged by the board inspection apparatus 1 and teacher information (teaching data) indicating whether the image should be detected (non-defective product) or excluded (defective product). In order to increase the reliability of teaching, it is preferable to prepare dozens to thousands of teacher image information for each of the non-defective product and the defective product.

(パラメータ設定処理)
図7のフローチャートに沿って、パラメータ設定処理の流れを説明する。なお、本実施形態では、上述したガルウィング型リードをもつトランジスタ部品の半田フィレット検査で用いられる検査パラメータを生成する例を挙げる。
(Parameter setting process)
The flow of parameter setting processing will be described along the flowchart of FIG. In the present embodiment, an example of generating inspection parameters used in the solder fillet inspection of the transistor component having the above-described gull-wing type lead will be described.

指示情報受付機能50は、検査ロジックの自動生成を指示する指示情報が入力されるまで待ち状態にある(ステップS200;NO、ステップS201)。情報入力部から指示情報が入力されると、指示情報受付機能50は教師画像情報読込機能51に指示情報を伝える(ステップS200;YES)。この指示情報には検査ロジック生成の対象となる教師画像情報を特定する情報、および、検査ロジックの種類などが含まれている。   The instruction information receiving function 50 is in a waiting state until instruction information for instructing automatic generation of inspection logic is input (step S200; NO, step S201). When the instruction information is input from the information input unit, the instruction information receiving function 50 transmits the instruction information to the teacher image information reading function 51 (step S200; YES). This instruction information includes information for specifying teacher image information to be subjected to inspection logic generation, the type of inspection logic, and the like.

教師画像情報読込機能51は、指示情報に従って、作成すべき検査ロジックに対応する教師画像情報を教師画像情報DB61から読み込む(ステップS202)。教師画像情報には、良品画像(良好な形状の半田フィレットが写っている画像)と不良品画像(不良の生じた半田フィレットが写っている画像)とが含まれる。これらの画像には教師情報が付与されている。   The teacher image information reading function 51 reads teacher image information corresponding to the examination logic to be created from the teacher image information DB 61 in accordance with the instruction information (step S202). The teacher image information includes a non-defective image (an image in which a solder fillet having a good shape is shown) and a defective product image (an image in which a defective solder fillet is shown). Teacher information is given to these images.

図8に良品画像と不良品画像の例を示す。良品画像では、部品62の3本のリード90
がそれぞれランド領域63に良好に半田付けされている。各ランド領域63には教師情報「良」が付与されている。一方、不良品画像では、部品ずれのため、3本のリード90のうち右側の2本に不良が生じている。不良が生じているランド領域64には教師情報「不良」が付与されている。なお、反対側のランド領域65には教師情報「無視」が付与されている。
FIG. 8 shows an example of a good product image and a defective product image. In the non-defective image, the three leads 90 of the part 62
Are soldered to the land regions 63, respectively. Each land area 63 is assigned teacher information “good”. On the other hand, in the defective product image, the right two of the three leads 90 are defective due to component displacement. Teacher information “defect” is given to the land area 64 where the defect occurs. Note that teacher information “ignore” is assigned to the land area 65 on the opposite side.

教師画像情報が読み込まれたら、画像取得機能52が、教師画像情報から教師情報の付与されたランド領域を抽出する(ステップS203)。ランド領域とは表面実装において半田が付与される部分のことである。画像取得機能52は、図9に示すように、部品本体ウィンドウ70とランドウィンドウ71から構成されるテンプレートを有しており、テンプレートを拡大/縮小したり、ランドウィンドウ71と部品本体ウィンドウ70の相対位置をずらしたりしながら、各ウィンドウ70,71を画像中のランド領域63,64,65および部品62に合わせ込む。ウィンドウの合わせ込みには、たとえば、テンプレートマッチングなどの手法を利用すればよい。これにより、良品画像と不良品画像それぞれについてランド領域63,64,65が特定される。   When the teacher image information is read, the image acquisition function 52 extracts the land area to which the teacher information is added from the teacher image information (step S203). The land region is a portion to which solder is applied in surface mounting. As shown in FIG. 9, the image acquisition function 52 has a template composed of a component main body window 70 and a land window 71, and enlarges / reduces the template, or relative to the land window 71 and the component main body window 70. The windows 70 and 71 are aligned with the land areas 63, 64, and 65 and the part 62 in the image while shifting the position. For example, a method such as template matching may be used for matching the windows. Thereby, the land areas 63, 64, and 65 are specified for the non-defective product image and the defective product image.

ランドウィンドウ71内には、リードウィンドウ72が設けられている。リードウィンドウ72は、リードの影響が現れるリード領域を示すものである。本実施形態では、リードウィンドウ72の位置はランドウィンドウ71に対する相対座標で定義されており、ランドウィンドウ71を画像に合わせ込むことで、リードウィンドウ72も画像中のリード部分に合わせ込まれる。なお、リードウィンドウ72のデフォルトサイズは予め定められている。   A lead window 72 is provided in the land window 71. The lead window 72 indicates a lead area where the influence of the lead appears. In this embodiment, the position of the lead window 72 is defined by the relative coordinates with respect to the land window 71. By aligning the land window 71 with the image, the lead window 72 is also aligned with the lead portion in the image. The default size of the lead window 72 is determined in advance.

次に、検査領域決定機能80が、この部品のCAD情報を読み込んでリード高さの情報を取得し(ステップS204)、リード高さに応じてリードウィンドウ72の大きさを調整する(ステップS205)。ここでは、リード高さとリードウィンドウ72の幅(リードの延伸方向の長さ)とが比例関係にあるとみなし、図10および下記式で示すように、リードウィンドウ72の調整幅dをリード高さhの1次式で近似する。   Next, the inspection area determination function 80 reads the CAD information of this part to acquire the lead height information (step S204), and adjusts the size of the lead window 72 according to the lead height (step S205). . Here, the lead height and the width of the lead window 72 (the length of the lead in the extending direction) are considered to have a proportional relationship, and the adjustment width d of the lead window 72 is set to the lead height as shown in FIG. It is approximated by a linear expression of h.

d=a×h+b
※a,bは定数であり、その値は経験的に求められる。ただし、a>0である。
d = a × h + b
* A and b are constants, and their values are obtained empirically. However, a> 0.

なお、1次式で近似したのは、印刷される半田ペーストの量が略一定であると仮定した場合(近年の半田印刷機の精度であれば、この仮定は可能である。)、リード高さhが大きくなるほどリードの肩が露出する可能性が高くなる(つまり、リード周辺に赤系色が現れる可能性が高くなる)からである。もちろん、上記式に限らず、他の近似式を用いてもよい。たとえば、リード高さhの2次式で近似したり、リード高さhに加えて他のCAD情報(リード幅、リード長さ、リード位置など)を用いて近似したりしてもよい。   Note that the approximation by the linear equation is based on the assumption that the amount of solder paste to be printed is substantially constant (this assumption is possible if the accuracy of a recent solder printer). This is because the possibility of exposing the shoulder of the lead increases as the height h increases (that is, the possibility that a red color appears around the lead increases). Of course, not only the above formula but also other approximate formulas may be used. For example, it may be approximated by a quadratic expression of the lead height h, or may be approximated using other CAD information (lead width, lead length, lead position, etc.) in addition to the lead height h.

そして、検査領域決定機能80は、ランド領域から、調整後のリードウィンドウを除外した領域を求め、その領域を検査領域73に設定する(ステップS206)。この検査領域73は、リード周辺部分を避けるような凹形状を呈している。   Then, the inspection area determination function 80 obtains an area excluding the adjusted lead window from the land area, and sets the area as the inspection area 73 (step S206). The inspection region 73 has a concave shape that avoids the peripheral portion of the lead.

検査領域が設定されたら、それぞれの教師画像から検査領域内の部分画像(検査領域画像)が抽出され、良品の検査領域画像と不良品の検査領域画像とに振り分けられる(ステップS207)。以下、教師情報「良」が付与された教師画像から抽出された検査領域画像を「対象画像」とよび、教師情報「不良」が付与された教師画像から抽出された検査領域画像を「除外画像」とよぶ。なお、教師情報「無視」が付与された教師画像からは検査領域画像が抽出されない。   When the inspection area is set, a partial image (inspection area image) in the inspection area is extracted from each teacher image, and is divided into a non-defective inspection area image and a defective inspection area image (step S207). Hereinafter, the examination area image extracted from the teacher image to which the teacher information “good” is given is called “target image”, and the examination area image extracted from the teacher image to which the teacher information “bad” is given is referred to as “excluded image”. " Note that the examination region image is not extracted from the teacher image to which the teacher information “ignore” is assigned.

ここで抽出された対象画像は検査により検出されるべき良好な半田フィレットの色彩パターンを表しており、除外画像は検査により除外されるべき不良な半田フィレットの色彩パターンを表している。よって、フィレット検査用の最適な色パラメータを作成することは、対象画像の画素の色をなるべく多く包含し、かつ、除外画像の画素の色をほとんど排除できるような色範囲の最適解を求めることと等価である。   The target image extracted here represents a good solder fillet color pattern to be detected by inspection, and the excluded image represents a bad solder fillet color pattern to be excluded by inspection. Therefore, creating optimal color parameters for fillet inspection involves finding an optimal solution in a color range that includes as much of the pixel color of the target image as possible and can almost eliminate the color of the pixel of the excluded image. Is equivalent to

そこでまず、マッピング機能54が、対象画像と除外画像の全画素の色を色ヒストグラムにマッピングする(ステップS208)。このとき、対象画像の画素は「対象点」として、除外画像の画素は「除外点」として、互いに区別可能な形式でマッピングが行われる。ここで色ヒストグラムとは、色空間内の各点に画素の度数(個数)を記録したものである。色ヒストグラムにより、対象画像、除外画像それぞれの画素の色分布を把握することができる。なお、ここで言うところの画素とは、画像の最小解像度のことである。複数の画素でまとめてマッピング処理を実行すると混色が発生するため、画素ごとの処理が好ましい。   First, the mapping function 54 maps the colors of all pixels of the target image and the excluded image to the color histogram (step S208). At this time, the pixel of the target image is “target point”, and the pixel of the excluded image is “excluded point”, and the mapping is performed in a mutually distinguishable format. Here, the color histogram is obtained by recording the frequency (number) of pixels at each point in the color space. From the color histogram, the color distribution of each pixel of the target image and the excluded image can be grasped. Note that the pixel referred to here is the minimum resolution of an image. When the mapping process is executed collectively for a plurality of pixels, color mixing occurs, and therefore the process for each pixel is preferable.

一般に、色空間は、少なくとも色相、彩度、明度の多次元空間からなる。よって、画素の色分布を正確に把握するには、多次元色空間に画素の色をマッピングした多次元色ヒストグラムを用いることが好ましい。   In general, the color space is composed of a multidimensional space of at least hue, saturation, and brightness. Therefore, in order to accurately grasp the color distribution of the pixel, it is preferable to use a multidimensional color histogram in which the color of the pixel is mapped in the multidimensional color space.

ただし、カラーハイライト方式では、光源に赤・青を使用していることから、半田領域には赤または青の色が強く現れる傾向にある(これは、半田表面において鏡面反射に近い反射が生じるためである。)。また、上述のように、良好な半田領域ではほとんどの画素が青系色となり、不良な半田領域ではほとんどの画素が赤系色になることもわかっている。   However, in the color highlight method, since red and blue are used for the light source, a red or blue color tends to appear strongly in the solder area (this causes reflection close to specular reflection on the solder surface). Because.) Further, as described above, it is also known that most pixels have a blue color in a good solder region, and most pixels have a red color in a defective solder region.

したがって、良品の色(対象点)と不良品の色(除外点)を分離するための色パラメータを決定する目的であれば、1色(たとえば青色)または2色(たとえば青色と赤色)を考慮すれば十分といえる。そこで、本実施形態では、対象画像に多く含まれ、かつ、除外画像にほとんど含まれない傾向にある色相として青色を選択し、青色の彩度軸と明度軸からなる2次元色空間に画素の色をマッピングした2次元色ヒストグラムを用いる。これにより、色パラメータの最適解を求めるアルゴリズムが極めて簡単化される。   Therefore, if the purpose is to determine the color parameters for separating the non-defective product color (target point) and the defective product color (exclusion point), one color (for example, blue) or two colors (for example, blue and red) are considered. This is enough. Therefore, in the present embodiment, blue is selected as a hue that is included in the target image and tends to be hardly included in the excluded image, and the pixel is placed in a two-dimensional color space including a blue saturation axis and a brightness axis. A two-dimensional color histogram in which colors are mapped is used. This greatly simplifies the algorithm for finding the optimal color parameter solution.

図11は、2次元色ヒストグラムの一例を示している。横軸が青の彩度を表しており、プラスの値が大きくなるほど青成分が強くなり、マイナスの値が大きくなるほど青の補色である黄成分が強くなる。縦軸は明度を表しており、値が大きくなるほど明るさが強くなる。ヒストグラム中の白丸(○)が対象点を表し、黒三角(▲)が除外点を表している。対象点と除外点では色分布に違いがあることがわかる。   FIG. 11 shows an example of a two-dimensional color histogram. The horizontal axis represents blue saturation. The larger the positive value, the stronger the blue component, and the larger the negative value, the stronger the yellow component, which is the complementary color of blue. The vertical axis represents the brightness, and the brightness increases as the value increases. White circles (◯) in the histogram represent target points, and black triangles (▲) represent exclusion points. It can be seen that there is a difference in color distribution between the target point and the excluded point.

次に、色範囲探索機能55が、2次元色ヒストグラムに基づいて、対象点の色分布と除外点の色分布とを最適に切り分ける色範囲を探索する(ステップS209)。本実施形態では、アルゴリズムの簡単化のため、図12(a)に示すように、彩度の下限(BInf)と上限(BSup)、および、明度の下限(LInf)と上限(LSup)からなる矩形の色範囲を考える。ここで求めるべき最適解は、対象点(○)をなるべく多く包含し、かつ、除外点(▲)をほとんど含まないような色範囲である。   Next, the color range search function 55 searches for a color range that optimally divides the color distribution of the target point and the color distribution of the exclusion point based on the two-dimensional color histogram (step S209). In this embodiment, for simplification of the algorithm, as shown in FIG. 12A, the lower limit (BInf) and upper limit (BSup) of saturation, and the lower limit (LInf) and upper limit (LSup) of lightness are included. Consider a rectangular color range. The optimum solution to be obtained here is a color range that includes as many target points (◯) as possible and hardly includes exclusion points (().

具体的には、色範囲探索機能55は、BInf、BSup、LInf、LSupそれぞれの値を変えながら、各色範囲について度数合計値Eを算出し(数式1参照)、度数合計値Eが最大となる色範囲を求める。度数合計値Eは、色範囲に含まれる対象点の数(度数)と除外点の数(度数)の差を表す指標である。図12(b)は、度数合計値Eが最大となる色範囲を示している。

Figure 2006220437
Specifically, the color range search function 55 calculates the frequency total value E for each color range while changing the values of BInf, BSup, LInf, and LSup (see Formula 1), and the frequency total value E is maximized. Find the color range. The frequency total value E is an index representing the difference between the number of target points (frequency) included in the color range and the number of excluded points (frequency). FIG. 12B shows a color range in which the frequency total value E is maximum.
Figure 2006220437

そして、色範囲探索機能55は、度数合計値Eが最大となる色範囲を検査用の色パラメータ(色条件)として設定する。このように、本実施形態によれば、対象画像(対象点)と除外画像(除外点)とを適切に切り分ける色パラメータを自動的に生成することができる。   Then, the color range search function 55 sets a color range in which the frequency total value E is maximized as an inspection color parameter (color condition). As described above, according to the present embodiment, it is possible to automatically generate color parameters for appropriately separating the target image (target point) and the excluded image (excluded point).

次に、上記色パラメータを用いて、検査用のしきい値(判定条件)を自動生成する処理が実行される。   Next, processing for automatically generating an inspection threshold value (determination condition) is executed using the color parameter.

まず、二値化機能56が、上記色パラメータを用いて、良品画像および不良品画像のすべての検査領域を二値化する(ステップS210)。この二値化処理では、色パラメータで定義された色範囲内に含まれる画素が白画素に、それ以外の画素が黒画素に変換される。   First, the binarization function 56 binarizes all the inspection areas of the non-defective image and the defective image using the color parameter (step S210). In this binarization processing, pixels included in the color range defined by the color parameter are converted to white pixels, and other pixels are converted to black pixels.

検査領域を二値化すると、良品画像では白画素の領域が非常に大きく、不良品画像では白画素の領域がきわめて小さくなる(図5参照)。よって、このような二値化画像を利用すると、良品・不良品を識別するための特徴量を定量的に計算するのが容易になる。特徴量としては、白画素領域の面積、面積比、重心、長さ、最大幅、形状などが挙げられるが、ここでは面積を特徴量として選ぶ。   When the inspection area is binarized, the white pixel area is very large in the non-defective image, and the white pixel area is extremely small in the defective image (see FIG. 5). Therefore, when such a binarized image is used, it becomes easy to quantitatively calculate a feature amount for identifying a non-defective product or a defective product. Examples of the feature amount include the area, area ratio, center of gravity, length, maximum width, and shape of the white pixel region. Here, the area is selected as the feature amount.

特徴量ヒストグラム生成機能57は、良品画像の特徴量の分布傾向と不良品画像の特徴量の分布傾向との違いを把握するため、良品画像、不良品画像のそれぞれについて、白画素領域の面積値に関する面積ヒストグラムを作成する(ステップS211)。図13は、良品画像と不良品画像の面積ヒストグラム(以下、単に「良品ヒストグラム」「不良品ヒストグラム」とよぶ。)の一例を示している。良品画像の特徴量分布と不良品画像の特徴量分布に明確な違いが現れていることがわかる。   The feature amount histogram generation function 57 grasps the difference between the distribution trend of the feature amount of the non-defective image and the distribution trend of the feature amount of the non-defective image, and thus the area value of the white pixel region for each of the non-defective image and the defective product image. An area histogram is created (step S211). FIG. 13 shows an example of an area histogram of a non-defective product image and a defective product image (hereinafter simply referred to as “good product histogram” or “defective product histogram”). It can be seen that a clear difference appears between the feature quantity distribution of the non-defective image and the feature quantity distribution of the defective product image.

次に、しきい値算出機能58が、良品ヒストグラムおよび不良品ヒストグラムの度数分布に基づいて、良品画像の特徴量と不良品画像の特徴量を最適に分離するためのしきい値を算出する(ステップS212)。特徴量ヒストグラムに現れた2つの山を最適に分離する手法は種々提案されており、ここではどの方法を採用してもよい。たとえば、大津の判別分析法を利用してもよいし、あるいは、経験に基づき良品画像の山の端から3σだけ離れた点をしきい値に決めてもよい。このようにして、良品と不良品を判別するためのしきい値が生成される。   Next, the threshold value calculation function 58 calculates a threshold value for optimally separating the feature amount of the non-defective product image and the feature amount of the defective product image based on the frequency distribution of the non-defective product histogram and the defective product histogram ( Step S212). Various methods for optimally separating the two peaks appearing in the feature amount histogram have been proposed, and any method may be adopted here. For example, Otsu's discriminant analysis method may be used, or a point separated by 3σ from the edge of a non-defective image peak may be determined as a threshold based on experience. In this way, a threshold value for discriminating between non-defective products and defective products is generated.

続いて、検査ロジック生成機能59が、上記検査領域、色パラメータ、特徴量の種類(本例では面積)およびしきい値から検査ロジックを生成する(ステップS213)。そして、検査ロジック書込機能60が、その検査ロジックを基板検査装置1の検査ロジック記
憶部35に書き込んで、パラメータ設定処理を終了する(ステップS214)。
Subsequently, the inspection logic generation function 59 generates inspection logic from the inspection region, color parameters, feature type (area in this example), and threshold value (step S213). Then, the inspection logic writing function 60 writes the inspection logic in the inspection logic storage unit 35 of the substrate inspection apparatus 1 and ends the parameter setting process (step S214).

以上述べた本実施形態によれば、基板検査処理で用いられる検査ロジック(パラメータ)が自動で生成されるので、ティーチングに要する時間と負荷を大幅に削減することができる。   According to the present embodiment described above, the inspection logic (parameter) used in the substrate inspection process is automatically generated, so that the time and load required for teaching can be greatly reduced.

しかも、上述したアルゴリズムによって最適な検査領域、色パラメータおよびしきい値が算出されるので、カラーハイライト方式による良否判定を高精度に行うことが可能となる。特に、ガルウィング型リードに特有の問題である、リードに起因する色彩パターンのバラツキを予め除去できるような検査領域が自動で設定されるため、基板検査の精度および信頼性が向上する。なお、色パラメータとしきい値の信頼性は、最初に与える教師画像情報の数が多くなるほど向上する。   In addition, since the optimal inspection area, color parameter, and threshold value are calculated by the above-described algorithm, it is possible to perform the pass / fail judgment by the color highlight method with high accuracy. In particular, since the inspection area that can remove the color pattern variation caused by the lead, which is a problem peculiar to the gull-wing type lead, is automatically set, the accuracy and reliability of the substrate inspection is improved. Note that the reliability of the color parameter and the threshold value is improved as the number of teacher image information to be given first increases.

<第2実施形態>
上記第1実施形態では、設計データであるリード高さに基づきリードウィンドウ(リード領域)の大きさを決定した。しかしながら、ガルウィング型リードをもつ部品では半田形状のバラツキが特に大きく、リード高さから求めた検査領域では良品と不良品の差異が小さくなることがある。そこで、第2実施形態では、設計データであるリード高さだけでなく、実際の撮像画像(教師画像)から得られる情報をも考慮して、検査領域、色パラメータ(色条件)、しきい値(判定条件)などのパラメータを設定する。
Second Embodiment
In the first embodiment, the size of the lead window (lead area) is determined based on the lead height as design data. However, in a part having a gull wing type lead, the variation in solder shape is particularly large, and the difference between a non-defective product and a defective product may be small in the inspection area obtained from the lead height. Therefore, in the second embodiment, not only the lead height, which is design data, but also information obtained from the actual captured image (teacher image) is taken into consideration, the inspection area, the color parameter (color condition), and the threshold value. Set parameters such as (judgment condition).

(パラメータ設定処理)
図14のフローチャートに沿って、本実施形態のパラメータ設定処理の流れを説明する。なお、第1実施形態の処理(図7参照)と同様の処理については、同一のステップ番号を付して詳しい説明を省略する。
(Parameter setting process)
The flow of parameter setting processing according to this embodiment will be described with reference to the flowchart of FIG. In addition, about the process similar to the process (refer FIG. 7) of 1st Embodiment, the same step number is attached | subjected and detailed description is abbreviate | omitted.

まず、入力された指示情報に従って教師画像情報が読み込まれ、ランド領域の特定が行われる(ステップS200〜S203)。そして、第1実施形態と同様、CAD情報からリード高さが読み込まれ、リード高さに基づいて検査領域が設定される(ステップS204〜S206)。その後、設定された検査領域を用いて、色パラメータおよびしきい値が算出される(ステップS207〜S212)。   First, teacher image information is read according to the input instruction information, and a land area is specified (steps S200 to S203). As in the first embodiment, the lead height is read from the CAD information, and the inspection area is set based on the lead height (steps S204 to S206). Thereafter, color parameters and threshold values are calculated using the set inspection region (steps S207 to S212).

(検査領域の追い込み処理)
続いて、リード高さから求められた検査領域を基準として、検査領域の追い込み処理を行う。本実施形態では、検査領域の良否を評価するための指標として、特徴量ヒストグラムにおける良品ヒストグラムと不良品ヒストグラムの分離度に着目する。つまり、両ヒストグラムの間の分離度が大きいほど検査領域が良好であるとし、分離度が小さいほど検査領域が良好でないと評価するのである。
(Inspection area tracking process)
Subsequently, an inspection area tracking process is performed using the inspection area obtained from the lead height as a reference. In the present embodiment, attention is focused on the degree of separation between the non-defective product histogram and the defective product histogram in the feature amount histogram as an index for evaluating the quality of the inspection region. That is, the larger the degree of separation between the two histograms, the better the inspection area, and the smaller the degree of separation, the less the inspection area is evaluated.

具体的には、ステップS211で作成された特徴量ヒストグラムを参照して、良品ヒストグラムと不良品ヒストグラムの間の分離度を算出する(ステップS300)。分離度の求め方は種々考えられるが、たとえば、(1)不良品ヒストグラムの最大面積値と良品ヒストグラムの最小面積値の間のユークリッド距離を分離度と定義するもの、(2)不良品ヒストグラムの平均面積値と良品ヒストグラムの平均面積値の間のユークリッド距離を分離度と定義するもの、(3)不良品ヒストグラムに対する良品ヒストグラム内の所定点(最小面積値、平均面積値など)のマハラノビス距離、または、良品ヒストグラムに対する不良品ヒストグラム内の所定点のマハラノビス距離を分離度と定義するもの、(4)大津の判別分析法で用いられる評価基準(クラス間分散をクラス内分散で除した値)の最大値を分離度と定義するもの、などを採用できる。図15は、(1)の距離を分離度として採用した例を示している。   Specifically, the degree of separation between the non-defective product histogram and the defective product histogram is calculated with reference to the feature amount histogram created in step S211 (step S300). There are various ways of obtaining the degree of separation. For example, (1) the Euclidean distance between the maximum area value of the defective product histogram and the minimum area value of the non-defective histogram is defined as the degree of separation; What defines the Euclidean distance between the average area value and the average area value of the non-defective histogram as the degree of separation, (3) Mahalanobis distance of a predetermined point (minimum area value, average area value, etc.) in the non-defective histogram relative to the defective histogram Or, defining the Mahalanobis distance of a predetermined point in the defective product histogram relative to the non-defective product histogram as the degree of separation, (4) of the evaluation criteria (value obtained by dividing the interclass variance by the intraclass variance) used in Otsu's discriminant analysis method What defines the maximum value as the degree of separation can be adopted. FIG. 15 shows an example in which the distance (1) is adopted as the degree of separation.

続いて、算出された分離度が所定の基準値を超えているか否かによって、良品ヒストグラムと不良品ヒストグラムとを分離可能かどうか(つまり、両ヒストグラムの分離性が十分かどうか)判定する(ステップS301)。   Subsequently, it is determined whether or not the non-defective product histogram and the defective product histogram can be separated (that is, whether the separation between the two histograms is sufficient) based on whether or not the calculated separation degree exceeds a predetermined reference value (step). S301).

ここで、分離可能でない(分離性が不十分である)と判定された場合(ステップS301;NO)、所定の変更ルールに従ってリードウィンドウ(リード領域)を拡大または縮小して、検査領域を変更する(ステップS302)。図15の例では、リードウィンドウの調整幅dを所定幅(画素数または拡大/縮小率で定められる)ずつ拡大・縮小している。   If it is determined that separation is not possible (separability is insufficient) (step S301; NO), the inspection window is changed by enlarging or reducing the lead window (lead area) according to a predetermined change rule. (Step S302). In the example of FIG. 15, the adjustment width d of the lead window is enlarged / reduced by a predetermined width (determined by the number of pixels or the enlargement / reduction ratio).

検査領域が変更されたら、その新たな検査領域を用いて、上記同様、色パラメータおよびしきい値が再度算出されるとともに(ステップS207〜S212)、分離度の算出および評価が行われる(ステップS300、S301)。図15に示すように、検査領域を変更すると、特徴量ヒストグラムの分離度が変化することがわかる。   When the inspection area is changed, the color parameter and the threshold value are calculated again using the new inspection area (steps S207 to S212), and the degree of separation is calculated and evaluated (step S300). , S301). As shown in FIG. 15, it can be seen that the separation degree of the feature amount histogram changes when the inspection region is changed.

以上のようにして、検査領域を徐々に変更しながら上記処理を繰り返して、各々の検査領域について色パラメータ、しきい値および分離度を算出していき、分離度が所定の基準値を超えた時点でループを終了する(ステップS301;YES)。   As described above, the above process is repeated while gradually changing the inspection area, and the color parameter, threshold value, and separation degree are calculated for each inspection area, and the separation degree exceeds a predetermined reference value. The loop is terminated at the time (step S301; YES).

検査ロジック生成機能59は、算出された中で分離度が最大となった(つまり、分離度が初めて基準値を超えた)検査領域、並びに、その検査領域についての色パラメータ、特徴量の種類(本例では面積)、しきい値から検査ロジックを生成する(ステップS213)。そして、検査ロジック書込機能60が、その検査ロジックを基板検査装置1の検査ロジック記憶部35に書き込んで、パラメータ設定処理を終了する(ステップS214)。   The inspection logic generation function 59 has the highest separation degree among the calculated values (that is, the separation area exceeds the reference value for the first time), the color parameter and the type of feature amount for the inspection area ( The inspection logic is generated from the threshold value in this example (area) (step S213). Then, the inspection logic writing function 60 writes the inspection logic in the inspection logic storage unit 35 of the substrate inspection apparatus 1 and ends the parameter setting process (step S214).

以上述べた本実施形態によれば、特徴量ヒストグラムにおける分離度により検査領域の善し悪しが評価されることにより、設計データであるリード高さだけでなく実際の撮像画像から得られる情報も考慮されるため、検査領域、色条件、判定条件がより適切な値に設定され、基板検査の精度および信頼性を向上させることができる。   According to the embodiment described above, the quality of the inspection area is evaluated based on the degree of separation in the feature amount histogram, so that not only the lead height as design data but also information obtained from an actual captured image is considered. Therefore, the inspection area, the color condition, and the determination condition are set to more appropriate values, and the accuracy and reliability of the substrate inspection can be improved.

<変形例>
上記実施形態は本発明の一具体例を例示したものにすぎない。本発明の範囲は上記実施形態に限られるものではなく、その技術思想の範囲内で種々の変形が可能である。
<Modification>
The above embodiment is merely an example of the present invention. The scope of the present invention is not limited to the above embodiment, and various modifications can be made within the scope of the technical idea.

上記第2実施形態では、検査領域を更新するたびに色パラメータおよびしきい値を算出し、分離度を評価したが、色パラメータの再計算を省略し、しきい値算出と分離度評価だけを繰り返すようにしてもよい。すなわち、リード領域の大きさを変更することにより検査領域を変更し、変更後の検査領域と当初の色範囲を用いてしきい値を再算出する、という処理を繰り返し、特徴量ヒストグラムにおける対象画像の度数分布と除外画像の度数分布の間の分離度が最大となったとき、または、所定の基準値を超えたときの検査領域およびしきい値をそれぞれ基板検査で用いる検査領域および判定条件に再設定するのである。この処理では、処理負荷の高い色条件の再計算を行わない分、パラメータ生成の処理コストを小さくすることができるという利点がある。   In the second embodiment, the color parameter and the threshold value are calculated and the degree of separation is evaluated every time the inspection region is updated. However, the recalculation of the color parameter is omitted, and only the threshold value calculation and the degree of separation evaluation are performed. It may be repeated. In other words, the process of changing the inspection area by changing the size of the lead area and recalculating the threshold value using the changed inspection area and the original color range is repeated, and the target image in the feature amount histogram When the degree of separation between the frequency distribution and the frequency distribution of the excluded image is maximized, or when a predetermined reference value is exceeded, the inspection area and the threshold value are used as the inspection area and the determination condition used in the substrate inspection, respectively. It is reset. This processing has the advantage that the processing cost for parameter generation can be reduced by not recalculating color conditions with a high processing load.

また、上記第2実施形態では、分離度が所定の基準値を超えた時点で検査領域の追い込み処理を終了したが、他の終了判定方法を採用してもよい。最も単純なアルゴリズムは、想定される全ての態様の検査領域(たとえば、調整幅dが、0≦d≦d_maxの範囲。ただし、d_maxは、リードウィンドウとランドウィンドウの幅が同じになる値。)について処理を行ったら終了するというものである。このような総当たり処理の場合には、
分離度が最大となる検査領域を漏れなく発見できるという利点がある。
In the second embodiment, the inspection area tracking process is terminated when the degree of separation exceeds a predetermined reference value. However, other termination determination methods may be employed. The simplest algorithm is an inspection region of all possible modes (for example, the adjustment width d is in the range of 0 ≦ d ≦ d_max. However, d_max is a value in which the widths of the lead window and land window are the same). When the process is completed, the process ends. In the case of such brute force processing,
There is an advantage that the inspection region where the degree of separation is maximized can be found without omission.

また、分離度の変化傾向を監視し、分離度のピークを検知した時点(つまり、増加傾向にあった分離度が減少傾向に転じた時点)で上記処理の繰り返しを終了するという方法も好ましい。この方法や第2実施形態の方法では、分離度の最大値を発見できない可能性もあるが、分離度の好適値もしくは極大値を少ない繰り返し回数で発見できるという利点がある。なお、追い込み処理の終了判定に関しては、他の一般的な最適値問題のアルゴリズムを採用してもよい。   It is also preferable to monitor the change tendency of the degree of separation and end the repetition of the above process at the time when the peak of the degree of separation is detected (that is, when the degree of separation that has been on the increase tends to decrease). Although there is a possibility that the maximum value of the degree of separation cannot be found by this method or the method of the second embodiment, there is an advantage that a suitable value or a maximum value of the degree of separation can be found with a small number of repetitions. Note that other general optimal value problem algorithms may be employed for determining whether to finish the chasing process.

また、上記実施形態では2次元の色ヒストグラム(色空間)を用いたが、多次元(色相、彩度、明度)の色ヒストグラムを用いてもよい。また、2次元色ヒストグラムについても、青の彩度軸ではなく、赤、緑、黄など他の色相の彩度軸を用いたり、彩度軸ではなく色相軸を用いたりしてもよい。色ヒストグラムの軸の選択は、基板検査装置で撮像された部品画像がもつ色彩パターンの傾向に合わせて決定すればよい。   In the above embodiment, a two-dimensional color histogram (color space) is used, but a multi-dimensional (hue, saturation, brightness) color histogram may be used. Also for the two-dimensional color histogram, the saturation axis of other hues such as red, green, and yellow may be used instead of the blue saturation axis, or the hue axis may be used instead of the saturation axis. The selection of the axis of the color histogram may be determined according to the tendency of the color pattern of the component image captured by the board inspection apparatus.

また、色範囲は矩形に限らず、円形、多角形、自由曲線図形などを用いてもよい。さらに、色ヒストグラムが多次元の場合には、色範囲も多次元形状にするとよい。   Further, the color range is not limited to a rectangle, and a circle, a polygon, a free curve figure, or the like may be used. Furthermore, when the color histogram is multidimensional, the color range may be multidimensional.

また、上記実施形態では半田フィレット検査を例に挙げて説明したが、本発明は、撮像画像から検査領域を特定し、色パラメータ(色条件)によって領域抽出を行い、その抽出された領域のもつ何らかの特徴量を判定条件によって判定するものであれば、他の基板検査処理にも適用可能である。   In the above embodiment, solder fillet inspection has been described as an example. However, the present invention specifies an inspection area from a captured image, performs area extraction based on a color parameter (color condition), and has the extracted area. Any feature can be applied to other board inspection processes as long as some feature value is determined based on a determination condition.

また、上記実施形態では特徴量として面積を用いたが、良否判定に用いる特徴量としては他にも、面積比、長さ、最大幅、重心などを好ましく採用できる。面積比とは、ランドウィンドウ内で二値化された面積の占有率である。たとえばランド領域に対して部品がずれて半田付けされていると、半田領域の面積が大小するため、面積比が変化する。これを特徴量として捉えれば、部品ずれの検査に有効である。また、長さとは、白画素領域の縦方向や横方向の長さであり、最大長は、白画素領域の長さの中で最大の値である。また、重心とは、白画素領域の重心のランドウィンドウに対する相対位置である。   In the above embodiment, the area is used as the feature amount. However, as the feature amount used for the pass / fail judgment, an area ratio, a length, a maximum width, a center of gravity, and the like can be preferably used. The area ratio is the occupation ratio of the binarized area in the land window. For example, if a component is soldered with a deviation from the land area, the area of the solder area increases and the area ratio changes. If this is regarded as a feature amount, it is effective for inspection of component displacement. The length is the length in the vertical direction or the horizontal direction of the white pixel region, and the maximum length is the maximum value among the lengths of the white pixel region. The center of gravity is a relative position of the center of gravity of the white pixel region with respect to the land window.

良否を精度良く判定できるものであればどの特徴量を用いてもよく、精度向上のために複数種類の特徴量を組み合わせることも好ましい。また、パラメータ設定処理において複数種類の特徴量を抽出し、その中で良品と不良品とが最もよく分離されるものを特徴量として採用するといったことも可能である。なお、上記実施形態では判定条件(しきい値)の決定に面積ヒストグラム(面積値ヒストグラム)を用いたが、特徴量の種類が異なればそれに合わせた特徴量ヒストグラム(面積比ヒストグラム、長さヒストグラム、最大幅ヒストグラム、重心ヒストグラムなど)を用いることになる。たとえば、面積値ヒストグラムの替わりに面積比ヒストグラムを用いれば、ランドウィンドウにおける色パラメータで二値化された画素の占有率によって良否判定を実行するので、部品がズレたり傾いたりしてランドウィンドウの大きさが小さくなったり大きくなったりした場合でも、ランドウィンドウの大きさに影響されない判定処理が可能となる。   Any feature amount may be used as long as it can accurately determine pass / fail, and it is also preferable to combine a plurality of types of feature amounts to improve accuracy. It is also possible to extract a plurality of types of feature amounts in the parameter setting process, and to adopt a feature amount that best separates non-defective products and defective products among them. In the above embodiment, an area histogram (area value histogram) is used to determine the determination condition (threshold value). However, if the type of feature amount is different, a feature amount histogram (area ratio histogram, length histogram, Maximum width histogram, centroid histogram, etc.). For example, if an area ratio histogram is used instead of an area value histogram, the pass / fail judgment is executed based on the pixel occupancy ratio binarized by the color parameter in the land window. Even when the size becomes smaller or larger, a determination process that is not affected by the size of the land window is possible.

本発明の実施形態に係る基板検査システムのハードウェア構成を示す図。The figure which shows the hardware constitutions of the board | substrate inspection system which concerns on embodiment of this invention. 基板検査装置の機能構成を示す図。The figure which shows the function structure of a board | substrate inspection apparatus. 半田フィレットの形状と撮像パターンの関係を示す図。The figure which shows the relationship between the shape of a solder fillet, and an imaging pattern. 基板検査処理の流れを示すフローチャート。The flowchart which shows the flow of a board | substrate inspection process. 良品画像と不良品画像における検査領域の二値化結果の一例を示す図。The figure which shows an example of the binarization result of the test | inspection area | region in a non-defective product image and a defective product image. 第1実施形態のパラメータ設定装置の機能構成を示す図。The figure which shows the function structure of the parameter setting apparatus of 1st Embodiment. 第1実施形態のパラメータ設定処理の流れを示すフローチャート。The flowchart which shows the flow of the parameter setting process of 1st Embodiment. 良品画像と不良品画像の一例を示す図。The figure which shows an example of a quality product image and a defective product image. 半田領域の抽出処理を示す図。The figure which shows the extraction process of a solder area | region. リードウィンドウの調整処理を示す図。The figure which shows the adjustment process of a lead window. 2次元色ヒストグラムの一例を示す図。The figure which shows an example of a two-dimensional color histogram. 色範囲の探索処理を示す図。The figure which shows the search process of a color range. 良品および不良品の面積ヒストグラムとしきい値算出処理を示す図。The figure which shows the area histogram and threshold value calculation process of a good article and inferior goods. 第2実施形態のパラメータ設定処理の流れを示すフローチャート。The flowchart which shows the flow of the parameter setting process of 2nd Embodiment. 検査領域の追い込み処理を示す図。The figure which shows the tracking process of an inspection area | region. カラーハイライト方式の基板検査装置の構成を示す図。The figure which shows the structure of the board | substrate inspection apparatus of a color highlight system. 撮像画像に現れる色彩パターンの一例を示す図。The figure which shows an example of the color pattern which appears in a captured image. 色パラメータの設定支援ツールを示す図。The figure which shows the setting support tool of a color parameter.

符号の説明Explanation of symbols

1 基板検査装置
2 パラメータ設定装置
10 指示情報受付機能
11 基板搬入機能
12 CAD情報読込機能
13 ステージ操作機能
14 撮像機能
15 検査ロジック読込機能
16 検査機能
17 判定結果書込機能
18 基板搬出機能
20 基板
21 実装部品
22 Xステージ
23 Yステージ
24 投光部
25 撮像部
26 制御処理部
27 コンベヤ
28 赤色光源
29 緑色光源
30 青色光源
31 撮像コントローラ
32 記憶部
32a CAD情報記憶部
32b 判定結果記憶部
33 A/D変換部
34 画像処理部
35 検査ロジック記憶部
36 判定部
37 XYステージコントローラ
38 メモリ
39 制御部
40 入力部
41 表示部
42 プリンタ
50 指示情報受付機能
51 教師画像情報読込機能
52 画像取得機能
53 振分機能
54 マッピング機能
55 色範囲探索機能
56 二値化機能
57 特徴量ヒストグラム生成機能
58 しきい値算出機能
59 検査ロジック生成機能
60 検査ロジック書込機能
62 部品
63,64,65 ランド領域
70 部品本体ウィンドウ
71 ランドウィンドウ
72 リードウィンドウ
73 検査領域
80 検査領域決定機能
90 ガルウィング型リード
91 リードの肩
92 リードの先端
93 半田
DESCRIPTION OF SYMBOLS 1 Board | substrate inspection apparatus 2 Parameter setting apparatus 10 Instruction information reception function 11 Board | substrate carrying-in function 12 CAD information reading function 13 Stage operation function 14 Imaging function 15 Inspection logic reading function 16 Inspection function 17 Judgment result writing function 18 Board | substrate unloading function 20 Board | substrate 21 Mounted parts 22 X stage 23 Y stage 24 Projection unit 25 Imaging unit 26 Control processing unit 27 Conveyor 28 Red light source 29 Green light source 30 Blue light source 31 Imaging controller 32 Storage unit 32a CAD information storage unit 32b Judgment result storage unit 33 A / D Conversion unit 34 Image processing unit 35 Inspection logic storage unit 36 Determination unit 37 XY stage controller 38 Memory 39 Control unit 40 Input unit 41 Display unit 42 Printer 50 Instruction information reception function 51 Teacher image information reading function 52 Image acquisition function 53 Distribution function 4 Mapping Function 55 Color Range Search Function 56 Binarization Function 57 Feature Quantity Histogram Generation Function 58 Threshold Calculation Function 59 Inspection Logic Generation Function 60 Inspection Logic Write Function 62 Parts 63, 64, 65 Land Area 70 Parts Body Window 71 Land window 72 Lead window 73 Inspection area 80 Inspection area determination function 90 Gull wing type lead 91 Lead shoulder 92 Lead tip 93 Solder

Claims (9)

基板上に実装されたガルウィング型リードをもつ部品に異なる入射角で複数の色の光を照射し、その反射光を撮像して得られた画像から検査領域を抽出し、その検査領域から所定の色条件を満たす領域を抽出し、抽出された領域のもつ特徴量が所定の判定条件を満たすか否かで前記部品の実装状態を検査する基板検査装置において用いられるパラメータを自動生成する方法であって、
情報処理装置が、
部品を撮像して得られた画像から、半田が付与されるランド領域を特定し、
前記ランド領域から、リードの影響が現れるリード領域を除外した領域を、基板検査で用いる検査領域に設定する方法において、
前記情報処理装置は、
前記部品のCAD情報からリード高さの情報を取得し、
前記リード高さに応じて前記ランド領域から除外するリード領域を大きくする
基板検査装置のパラメータ設定方法。
A part having a gull-wing lead mounted on a substrate is irradiated with light of a plurality of colors at different incident angles, and an inspection area is extracted from an image obtained by imaging the reflected light, and a predetermined area is extracted from the inspection area. This is a method of extracting a region that satisfies a color condition and automatically generating parameters used in a board inspection apparatus that inspects the mounting state of the component depending on whether or not the feature amount of the extracted region satisfies a predetermined determination condition. And
Information processing device
From the image obtained by imaging the part, specify the land area to which the solder is applied,
In the method of setting the area excluding the lead area where the influence of the lead appears from the land area as the inspection area used in the substrate inspection,
The information processing apparatus includes:
Obtain the lead height information from the CAD information of the part,
A parameter setting method for a substrate inspection apparatus for enlarging a lead area excluded from the land area in accordance with the lead height.
情報処理装置が、
検査により検出されるべき部品を撮像して得られた複数の画像から前記検査領域の部分を対象画像として抽出し、
検査により除外されるべき部品を撮像して得られた複数の画像から前記検査領域の部分を除外画像として抽出し、
対象画像の各画素の色を対象点として、除外画像の各画素の色を除外点として、それぞれ色空間にマッピングし、
前記色空間を分割する色範囲であって、そこに含まれる対象点の数と除外点の数の差が最大となるような色範囲を求め、
前記対象画像および前記除外画像のそれぞれから前記色範囲に含まれる画素領域を抽出して、その画素領域のもつ特徴量についての特徴量ヒストグラムを作成し、
前記特徴量ヒストグラムの度数分布に基づいて前記対象画像の特徴量と前記除外画像の特徴量とを分離するためのしきい値を算出し、
前記色範囲およびしきい値をそれぞれ基板検査で用いる色条件および判定条件に設定する
請求項1記載の基板検査装置のパラメータ設定方法。
Information processing device
Extracting a portion of the inspection area as a target image from a plurality of images obtained by imaging a component to be detected by inspection,
Extracting a part of the inspection area as an excluded image from a plurality of images obtained by imaging the parts to be excluded by inspection,
Map the color of each pixel of the target image as the target point, and map the color of each pixel of the excluded image as the excluded point, respectively, to the color space,
A color range that divides the color space, and obtaining a color range that maximizes the difference between the number of target points included therein and the number of excluded points;
Extracting a pixel region included in the color range from each of the target image and the excluded image, and creating a feature amount histogram for the feature amount of the pixel region,
Calculating a threshold for separating the feature amount of the target image and the feature amount of the excluded image based on the frequency distribution of the feature amount histogram;
2. The parameter setting method for a substrate inspection apparatus according to claim 1, wherein the color range and the threshold value are respectively set to a color condition and a determination condition used in the substrate inspection.
情報処理装置が、
前記リード領域の大きさを変更することにより検査領域を変更し、変更後の検査領域を用いて色範囲およびしきい値を再算出する、という処理を繰り返し、
前記特徴量ヒストグラムにおける対象画像の度数分布と除外画像の度数分布の間の分離度が最大となったとき、または、所定の基準値を超えたときの検査領域、色範囲およびしきい値をそれぞれ基板検査で用いる検査領域、色条件および判定条件に再設定する
請求項2に記載の基板検査装置のパラメータ設定方法。
Information processing device
Changing the inspection area by changing the size of the lead area, re-calculating the color range and threshold using the inspection area after the change,
When the degree of separation between the frequency distribution of the target image and the frequency distribution of the excluded image in the feature amount histogram is maximized, or when a predetermined reference value is exceeded, an inspection area, a color range, and a threshold value, respectively The parameter setting method of the board | substrate inspection apparatus of Claim 2 reset to the test | inspection area | region used by board | substrate inspection, a color condition, and determination conditions.
情報処理装置が、
前記リード領域の大きさを変更することにより検査領域を変更し、変更後の検査領域および前記色範囲を用いてしきい値を再算出する、という処理を繰り返し、
前記特徴量ヒストグラムにおける対象画像の度数分布と除外画像の度数分布の間の分離度が最大となったとき、または、所定の基準値を超えたときの検査領域およびしきい値をそれぞれ基板検査で用いる検査領域および判定条件に再設定する
請求項2に記載の基板検査装置のパラメータ設定方法。
Information processing device
Changing the inspection area by changing the size of the lead area, re-calculating the threshold value using the changed inspection area and the color range, and repeating the process,
When the degree of separation between the frequency distribution of the target image and the frequency distribution of the excluded image in the feature amount histogram is maximized, or when a predetermined reference value is exceeded, an inspection region and a threshold value are respectively determined by board inspection. The parameter setting method of the board | substrate inspection apparatus of Claim 2 reset to the test | inspection area | region and determination condition to be used.
基板上に実装されたガルウィング型リードをもつ部品に異なる入射角で複数の色の光を
照射し、その反射光を撮像して得られた画像から検査領域を抽出し、その検査領域から所定の色条件を満たす領域を抽出し、抽出された領域のもつ特徴量が所定の判定条件を満たすか否かで前記部品の実装状態を検査する基板検査装置において用いられるパラメータを自動生成するための装置であって、
部品を撮像して得られた画像から、半田が付与されるランド領域を特定するランド領域特定手段と、
前記ランド領域から、リードの影響が現れるリード領域を除外した領域を、基板検査で用いる検査領域に設定する検査領域設定手段と、を備え、
前記検査領域設定手段は、
前記部品のCAD情報からリード高さの情報を取得し、
前記リード高さに応じて前記ランド領域から除外するリード領域を大きくする
基板検査装置のパラメータ設定装置。
A part having a gull-wing lead mounted on a substrate is irradiated with light of a plurality of colors at different incident angles, and an inspection area is extracted from an image obtained by imaging the reflected light, and a predetermined area is extracted from the inspection area. An apparatus for automatically generating parameters used in a board inspection apparatus for extracting a region that satisfies a color condition and inspecting a mounting state of the component depending on whether or not a feature amount of the extracted region satisfies a predetermined determination condition Because
Land area specifying means for specifying a land area to which solder is applied, from an image obtained by imaging a component;
An inspection area setting means for setting an area excluding the lead area where the influence of the lead appears from the land area as an inspection area used in the substrate inspection, and
The inspection area setting means includes:
Obtain the lead height information from the CAD information of the part,
A parameter setting device for a substrate inspection apparatus that enlarges a lead region excluded from the land region in accordance with the lead height.
検査により検出されるべき部品を撮像して得られた複数の画像から前記検査領域の部分を対象画像として抽出するとともに、検査により除外されるべき部品を撮像して得られた複数の画像から前記検査領域の部分を除外画像として抽出する検査領域抽出手段と、
対象画像の各画素の色を対象点として、除外画像の各画素の色を除外点として、それぞれ色空間にマッピングするマッピング手段と、
前記色空間を分割する色範囲であって、そこに含まれる対象点の数と除外点の数の差が最大となるような色範囲を求める色範囲探索手段と、
前記対象画像および前記除外画像のそれぞれから前記色範囲に含まれる画素領域を抽出して、その画素領域のもつ特徴量についての特徴量ヒストグラムを作成する特徴量ヒストグラム生成手段と、
前記特徴量ヒストグラムの度数分布に基づいて前記対象画像の特徴量と前記除外画像の特徴量とを分離するためのしきい値を算出するしきい値算出手段と、
前記色範囲およびしきい値をそれぞれ基板検査で用いる色条件および判定条件に設定するパラメータ設定手段と、
を備える請求項5記載の基板検査装置のパラメータ設定装置。
The portion of the inspection area is extracted as a target image from a plurality of images obtained by imaging the parts to be detected by inspection, and the plurality of images obtained by imaging the parts to be excluded by inspection Inspection region extraction means for extracting a portion of the inspection region as an excluded image;
Mapping means for mapping the color of each pixel of the target image as a target point and the color of each pixel of the excluded image as an exclusion point, respectively, in a color space;
Color range search means for obtaining a color range that divides the color space and that maximizes the difference between the number of target points included therein and the number of excluded points;
A feature amount histogram generating means for extracting a pixel region included in the color range from each of the target image and the excluded image and creating a feature amount histogram for a feature amount of the pixel region;
Threshold calculating means for calculating a threshold for separating the feature amount of the target image and the feature amount of the excluded image based on the frequency distribution of the feature amount histogram;
Parameter setting means for setting the color range and the threshold value to a color condition and a determination condition used for substrate inspection, respectively.
A parameter setting device for a substrate inspection apparatus according to claim 5.
前記リード領域の大きさを変更することにより検査領域を変更し、変更後の検査領域を用いて色範囲およびしきい値を再算出する、という処理を繰り返し、
前記特徴量ヒストグラムにおける対象画像の度数分布と除外画像の度数分布の間の分離度が最大となったとき、または、所定の基準値を超えたときの検査領域、色範囲およびしきい値をそれぞれ基板検査で用いる検査領域、色条件および判定条件に再設定する
請求項6記載の基板検査装置のパラメータ設定装置。
Changing the inspection area by changing the size of the lead area, re-calculating the color range and threshold using the inspection area after the change,
When the degree of separation between the frequency distribution of the target image and the frequency distribution of the excluded image in the feature amount histogram is maximized, or when a predetermined reference value is exceeded, an inspection area, a color range, and a threshold value, respectively The parameter setting device for a substrate inspection apparatus according to claim 6, wherein the parameter setting device is reset to an inspection region, a color condition, and a determination condition used in substrate inspection.
前記リード領域の大きさを変更することにより検査領域を変更し、変更後の検査領域および前記色範囲を用いてしきい値を再算出する、という処理を繰り返し、
前記特徴量ヒストグラムにおける対象画像の度数分布と除外画像の度数分布の間の分離度が最大となったとき、または、所定の基準値を超えたときの検査領域およびしきい値をそれぞれ基板検査で用いる検査領域および判定条件に再設定する
請求項6記載の基板検査装置のパラメータ設定装置。
Changing the inspection area by changing the size of the lead area, re-calculating the threshold value using the changed inspection area and the color range, and repeating the process,
When the degree of separation between the frequency distribution of the target image and the frequency distribution of the excluded image in the feature amount histogram is maximized, or when a predetermined reference value is exceeded, an inspection region and a threshold value are respectively determined by board inspection. 7. The parameter setting device for a substrate inspection apparatus according to claim 6, wherein the parameter setting device is reset to an inspection region to be used and a determination condition.
請求項5〜8のいずれかに記載のパラメータ設定装置により設定された検査領域、色条件および判定条件を記憶する記憶部と、
基板上の実装部品に異なる入射角で複数の色の光を照射する投光手段と、
その反射光を撮像して得られた画像から検査領域を抽出し、その検査領域から前記色条件を満たす領域を抽出する領域抽出手段と、
抽出された領域のもつ特徴量が、前記判定条件を満たすか否かで前記部品の実装状態を検査する検査手段と、
を備える基板検査装置。
A storage unit for storing the inspection region, the color condition, and the determination condition set by the parameter setting device according to claim 5;
A light projecting means for irradiating light of a plurality of colors at different incident angles on a mounting component on the substrate;
An area extracting means for extracting an inspection area from an image obtained by imaging the reflected light, and extracting an area satisfying the color condition from the inspection area;
An inspection means for inspecting the mounting state of the component based on whether or not the feature value of the extracted region satisfies the determination condition;
A board inspection apparatus comprising:
JP2005031716A 2005-02-08 2005-02-08 Substrate inspection device, parameter setting method and parameter setting device Active JP4539355B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005031716A JP4539355B2 (en) 2005-02-08 2005-02-08 Substrate inspection device, parameter setting method and parameter setting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005031716A JP4539355B2 (en) 2005-02-08 2005-02-08 Substrate inspection device, parameter setting method and parameter setting device

Publications (2)

Publication Number Publication Date
JP2006220437A true JP2006220437A (en) 2006-08-24
JP4539355B2 JP4539355B2 (en) 2010-09-08

Family

ID=36982871

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005031716A Active JP4539355B2 (en) 2005-02-08 2005-02-08 Substrate inspection device, parameter setting method and parameter setting device

Country Status (1)

Country Link
JP (1) JP4539355B2 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006250609A (en) * 2005-03-09 2006-09-21 Matsushita Electric Ind Co Ltd Visual inspection method of circuit mounting board
WO2012098697A1 (en) * 2011-01-17 2012-07-26 オムロン株式会社 Substrate inspecting apparatus, substrate inspecting system, and method for displaying image for checking substrate inspection results
CN103115589A (en) * 2013-02-01 2013-05-22 厦门思泰克光电科技有限公司 RGB LED (red green blue LED) light measurement device
EP2618135A1 (en) * 2012-01-17 2013-07-24 Omron Corporation Method for registering inspection standard for soldering inspection and board inspection apparatus thereby
CN103499296A (en) * 2013-10-21 2014-01-08 东华大学 Batch part automatic detection system and method based on machine vision
JP2014095707A (en) * 2012-11-12 2014-05-22 Koh Young Technology Inc Substrate inspection method
JP2014132392A (en) * 2013-01-04 2014-07-17 Fujitsu Ltd Image processing apparatus, image processing method, and program
KR101622628B1 (en) 2014-12-16 2016-05-20 주식회사 고영테크놀러지 Method and apparatus of inspecting a substrate with electronic devices mounted thereon
JP2017527905A (en) * 2014-08-26 2017-09-21 ノースロップ グラマン システムズ コーポレイションNorthrop Grumman Systems Corporation Foreign matter detection system based on color
JP2019100917A (en) * 2017-12-05 2019-06-24 パナソニックIpマネジメント株式会社 Inspection program generation system, generation method of inspection program and generation program of inspection program

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0278937A (en) * 1988-09-14 1990-03-19 Omron Tateisi Electron Co Display method for substrate inspection device
JPH0372203A (en) * 1989-08-12 1991-03-27 Matsushita Electric Works Ltd Checking method of outer appearance of soldering part
JPH0535849A (en) * 1991-07-30 1993-02-12 Omron Corp Teaching data preparation method
JPH09145633A (en) * 1995-11-24 1997-06-06 Omron Corp Parameter setting supporting method, method and device for parameter setting using the former method and mounted-part inspecting device using parameter setting device thereof
JP2000275028A (en) * 1999-03-26 2000-10-06 Matsushita Electric Works Ltd Method for inspecting soldered state
JP2002163650A (en) * 2000-11-27 2002-06-07 Matsushita Electric Works Ltd Color extracting image processing device and color extracting method
JP2003207461A (en) * 2002-01-11 2003-07-25 Omron Corp Solder inspection method and board inspection apparatus using the same
JP2004071781A (en) * 2002-08-06 2004-03-04 Omron Corp Method for preparing inspection data, and board inspection device using the same
JP2004151057A (en) * 2002-11-01 2004-05-27 Omron Corp Registration method of component code conversion table, conversion table registration device, registration program for component code conversion table, and storage medium
JP2006194607A (en) * 2005-01-11 2006-07-27 Omron Corp Substrate inspection device, its parameter setting method and parameter setting device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0278937A (en) * 1988-09-14 1990-03-19 Omron Tateisi Electron Co Display method for substrate inspection device
JPH0372203A (en) * 1989-08-12 1991-03-27 Matsushita Electric Works Ltd Checking method of outer appearance of soldering part
JPH0535849A (en) * 1991-07-30 1993-02-12 Omron Corp Teaching data preparation method
JPH09145633A (en) * 1995-11-24 1997-06-06 Omron Corp Parameter setting supporting method, method and device for parameter setting using the former method and mounted-part inspecting device using parameter setting device thereof
JP2000275028A (en) * 1999-03-26 2000-10-06 Matsushita Electric Works Ltd Method for inspecting soldered state
JP2002163650A (en) * 2000-11-27 2002-06-07 Matsushita Electric Works Ltd Color extracting image processing device and color extracting method
JP2003207461A (en) * 2002-01-11 2003-07-25 Omron Corp Solder inspection method and board inspection apparatus using the same
JP2004071781A (en) * 2002-08-06 2004-03-04 Omron Corp Method for preparing inspection data, and board inspection device using the same
JP2004151057A (en) * 2002-11-01 2004-05-27 Omron Corp Registration method of component code conversion table, conversion table registration device, registration program for component code conversion table, and storage medium
JP2006194607A (en) * 2005-01-11 2006-07-27 Omron Corp Substrate inspection device, its parameter setting method and parameter setting device

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006250609A (en) * 2005-03-09 2006-09-21 Matsushita Electric Ind Co Ltd Visual inspection method of circuit mounting board
JP4613644B2 (en) * 2005-03-09 2011-01-19 パナソニック株式会社 Circuit board inspection method
CN103328959A (en) * 2011-01-17 2013-09-25 欧姆龙株式会社 Substrate inspecting apparatus, substrate inspecting system, and method for displaying image for checking substrate inspection results
JP2012149905A (en) * 2011-01-17 2012-08-09 Omron Corp Substrate inspection device, substrate inspection system, and screen display method for confirming substrate inspection results
WO2012098697A1 (en) * 2011-01-17 2012-07-26 オムロン株式会社 Substrate inspecting apparatus, substrate inspecting system, and method for displaying image for checking substrate inspection results
EP2618135A1 (en) * 2012-01-17 2013-07-24 Omron Corporation Method for registering inspection standard for soldering inspection and board inspection apparatus thereby
JP2014095707A (en) * 2012-11-12 2014-05-22 Koh Young Technology Inc Substrate inspection method
JP2014132392A (en) * 2013-01-04 2014-07-17 Fujitsu Ltd Image processing apparatus, image processing method, and program
CN103115589A (en) * 2013-02-01 2013-05-22 厦门思泰克光电科技有限公司 RGB LED (red green blue LED) light measurement device
CN103499296A (en) * 2013-10-21 2014-01-08 东华大学 Batch part automatic detection system and method based on machine vision
JP2017527905A (en) * 2014-08-26 2017-09-21 ノースロップ グラマン システムズ コーポレイションNorthrop Grumman Systems Corporation Foreign matter detection system based on color
KR101622628B1 (en) 2014-12-16 2016-05-20 주식회사 고영테크놀러지 Method and apparatus of inspecting a substrate with electronic devices mounted thereon
JP2019100917A (en) * 2017-12-05 2019-06-24 パナソニックIpマネジメント株式会社 Inspection program generation system, generation method of inspection program and generation program of inspection program
JP7122524B2 (en) 2017-12-05 2022-08-22 パナソニックIpマネジメント株式会社 Inspection program generation system, inspection program generation method, and inspection program generation program

Also Published As

Publication number Publication date
JP4539355B2 (en) 2010-09-08

Similar Documents

Publication Publication Date Title
JP4595705B2 (en) Substrate inspection device, parameter setting method and parameter setting device
JP4539355B2 (en) Substrate inspection device, parameter setting method and parameter setting device
JP4830501B2 (en) Substrate inspection method and apparatus, and inspection logic setting method and apparatus thereof
JP4935109B2 (en) Substrate inspection device, inspection logic setting method and inspection logic setting device
JP4736764B2 (en) Substrate inspection device, inspection logic setting method and inspection logic setting device
JP4492356B2 (en) Substrate inspection device, parameter setting method and parameter setting device
JP3867724B2 (en) Surface condition inspection method, surface condition inspection apparatus and substrate inspection apparatus using the method
US6947151B2 (en) Surface state inspecting method and substrate inspecting apparatus
US20060271226A1 (en) Inspection standard setting device, inspection standard setting method and process inspection device
JP5417197B2 (en) Inspection apparatus and inspection method
JP4506395B2 (en) Substrate inspection device, parameter setting method and parameter setting device
JP2007033126A (en) Substrate inspection device, parameter adjusting method thereof and parameter adjusting device
JP4453503B2 (en) Substrate inspection device, substrate inspection method, inspection logic generation device and inspection logic generation method for substrate inspection device
JP4507785B2 (en) Substrate inspection device, parameter setting method and parameter setting device
JP2006078285A (en) Substrate-inspecting apparatus and parameter-setting method and parameter-setting apparatus of the same
JP2006322951A (en) Method and device for surface condition inspection, and device for inspecting substrate
JP4419778B2 (en) Substrate inspection device, parameter setting method and parameter setting device
JP4858227B2 (en) Inspection parameter setting support device, control program and control method thereof
JP6150325B2 (en) Substrate inspection apparatus, image analysis apparatus, substrate inspection method, and substrate manufacturing method
JP2006078301A (en) Flaw detection method of object by means of color image of the object
JP2004163115A (en) Visual examination method of component for electronic circuit, and method for manufacturing the component

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071106

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100303

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100316

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100419

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: 20100601

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100614

R150 Certificate of patent or registration of utility model

Ref document number: 4539355

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130702

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250