JP2006078300A - Flaw detection method of object by color image of the object - Google Patents

Flaw detection method of object by color image of the object Download PDF

Info

Publication number
JP2006078300A
JP2006078300A JP2004261789A JP2004261789A JP2006078300A JP 2006078300 A JP2006078300 A JP 2006078300A JP 2004261789 A JP2004261789 A JP 2004261789A JP 2004261789 A JP2004261789 A JP 2004261789A JP 2006078300 A JP2006078300 A JP 2006078300A
Authority
JP
Japan
Prior art keywords
area
region
color
adjacent
mask
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
JP2004261789A
Other languages
Japanese (ja)
Other versions
JP4841819B2 (en
Inventor
Yasushi Nagata
泰史 永田
Atsushi Imamura
淳志 今村
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.)
Dainippon Screen Manufacturing Co Ltd
Original Assignee
Dainippon Screen Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dainippon Screen Manufacturing Co Ltd filed Critical Dainippon Screen Manufacturing Co Ltd
Priority to JP2004261789A priority Critical patent/JP4841819B2/en
Priority to TW094127838A priority patent/TWI275788B/en
Priority to CN200510092185A priority patent/CN100587480C/en
Priority to KR1020050082497A priority patent/KR100684186B1/en
Publication of JP2006078300A publication Critical patent/JP2006078300A/en
Application granted granted Critical
Publication of JP4841819B2 publication Critical patent/JP4841819B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To enhance the reliability of the flaw detection processing of a target of inspection. <P>SOLUTION: A color image that has been photographed as target of inspection is acquired. The specific region in the color image and the region adjacent to the periphery of the specific region are acquired. The size of a masked region, including the specific region, is altered corresponding to the color of the acquired adjacent region. Then, predetermined flaw detection processing is performed on regions other than the masked region. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

この発明は、カラー画像を用いて検査対象物の欠陥を検出する技術に関する。   The present invention relates to a technique for detecting a defect of an inspection object using a color image.

電子回路を構成するためのプリント基板には、層間の導通や部品の挿入のためのスルーホールや、プリント基板の切断や位置決めのための基板穴が設けられる。このようなプリント基板では、スルーホール周辺のレジストの厚さの変動が大きくなり、プリント基板を撮影した画像上での色が変化する場合がある。そのため、プリント基板を画像検査装置によって検査する場合、プリント基板を撮影した画像のうち穴と穴の周辺の一定幅の部分とに相当する領域が検査の対象から除外されるのが一般的である(検査の対象から除外される領域は、一般に、「マスク領域」と呼ばれる)。   A printed circuit board for constituting an electronic circuit is provided with through holes for conduction between layers and insertion of components, and board holes for cutting and positioning of the printed circuit board. In such a printed circuit board, the thickness of the resist around the through hole varies greatly, and the color on the image obtained by photographing the printed circuit board may change. Therefore, when a printed circuit board is inspected by an image inspection apparatus, a region corresponding to a hole and a portion having a constant width around the hole is generally excluded from the inspection target in an image obtained by photographing the printed circuit board. (A region excluded from the inspection target is generally called a “mask region”).

特許第2500961号公報Japanese Patent No. 2500961 特開平6−288739号公報Japanese Unexamined Patent Publication No. Hei 6-2878739 特開平11−316193号公報JP 11-316193 A 特開2002−259667号公報JP 2002-259667 A

しかしながら、穴と穴の周辺の一定幅の部分とに相当する領域を一律にマスク領域とすると、スルーホールでない基板穴の周辺に存在する欠陥が検出できない場合がある。一方、穴に相当する領域のみをマスク領域とすると、スルーホール周辺のレジスト厚さの変動により許容しうる色の変化により、欠陥のないプリント基板であっても欠陥があるものとして誤って認識されるおそれがある。すなわち、プリント基板を撮像して得られたカラー画像を解析して欠陥検出を行ったときに、欠陥の有無を誤認識してしまうという問題があった。   However, if a region corresponding to a hole and a portion having a constant width around the hole is uniformly used as a mask region, a defect existing around the substrate hole that is not a through hole may not be detected. On the other hand, if only the area corresponding to the hole is used as a mask area, even a printed circuit board without a defect is mistakenly recognized as having a defect due to a color change that can be tolerated due to variations in resist thickness around the through hole. There is a risk. That is, there is a problem that when a color image obtained by imaging a printed circuit board is analyzed to detect a defect, the presence or absence of a defect is erroneously recognized.

上述の問題は、プリント基板の画像検査装置による検査に限らず、一般に、検査対象物のカラー画像を用いた検査に共通する問題であった。   The above-described problem is not limited to the inspection by the image inspection apparatus for the printed circuit board, and is generally a problem common to the inspection using the color image of the inspection object.

本発明は、上述した従来の課題を解決するためになされたものであり、検査対象物の欠陥検出処理の信頼性を高めることを目的とする。   The present invention has been made to solve the above-described conventional problems, and it is an object of the present invention to improve the reliability of defect detection processing for an inspection object.

上記目的の少なくとも一部を達成するために、本発明の方法は、検査対象物を撮影したカラー画像を用いて、前記検査対象物の欠陥を検出する方法であって、(a)前記カラー画像の中の特定領域を取得する工程と、(b)前記特定領域の周囲の隣接領域を取得する工程と、(c)前記特定領域を含むマスク領域を設定する工程と、(d)前記カラー画像のうち前記マスク領域以外の領域について、所定の欠陥検出処理を行う工程と、を備え、前記マスク領域の大きさは、前記隣接領域の色に応じて変更されることを特徴とする。   In order to achieve at least a part of the above object, the method of the present invention is a method for detecting a defect of the inspection object using a color image obtained by photographing the inspection object, and (a) the color image Obtaining a specific area, (b) obtaining an adjacent area around the specific area, (c) setting a mask area including the specific area, and (d) the color image. And a step of performing a predetermined defect detection process for a region other than the mask region, wherein the size of the mask region is changed according to the color of the adjacent region.

この構成によれば、隣接領域の色に応じてマスク領域の大きさが変更されるので、検査対象物の欠陥検出処理の信頼性を高めることができる。   According to this configuration, since the size of the mask area is changed according to the color of the adjacent area, the reliability of the defect detection process for the inspection object can be improved.

前記マスク領域は、前記特定領域と、前記特定領域の周囲を包含する特別処理領域と、を有し、前記方法は、さらに、前記特別処理領域について、前記所定の欠陥検出処理とは異なる特別の欠陥処理を行う工程を備えるものとしてもよい。   The mask area includes the specific area and a special processing area including the periphery of the specific area, and the method further includes a special processing area different from the predetermined defect detection processing for the special processing area. It is good also as a thing provided with the process of performing defect processing.

この構成によれば、マスク領域中に現れる欠陥を検出することができる。   According to this configuration, it is possible to detect a defect that appears in the mask region.

前記工程(b)は、(b1)前記特定領域の周辺の境界領域を取得する工程と、(b2)前記境界領域の色が所定の条件を満たす場合に、前記境界領域を含み前記境界領域よりも大きい前記隣接領域を取得する工程と、(b3)前記境界領域の色が前記所定の条件を満たさない場合に、前記マスク領域の大きさを所定の大きさに設定する工程と、を含むものとしてもよい。   The step (b) includes (b1) a step of acquiring a boundary region around the specific region, and (b2) when the color of the boundary region satisfies a predetermined condition, including the boundary region, from the boundary region And (b3) setting the size of the mask region to a predetermined size when the color of the boundary region does not satisfy the predetermined condition. It is good.

この構成によれば、境界領域の色が所定の条件を満たさない場合に隣接領域の色に応じてマスク領域の大きさが変更されるので、隣接領域の画像処理量を低減することができる。   According to this configuration, since the size of the mask area is changed according to the color of the adjacent area when the color of the boundary area does not satisfy a predetermined condition, the image processing amount of the adjacent area can be reduced.

前記所定の条件は、前記境界領域中に所定の第1の色範囲の画素が存在するという条件であり、前記工程(c)は、前記隣接領域中の画素の色が所定の第2の色範囲外である場合に、前記第2の色範囲である場合よりも前記マスク領域を大きくする工程を含むものとしてもよい。   The predetermined condition is a condition that a pixel in a predetermined first color range exists in the boundary region, and the step (c) includes a second color in which the color of the pixel in the adjacent region is a predetermined color. A step of enlarging the mask area when outside the range may be included as compared with the case of being within the second color range.

この構成によれば、マスク領域の大きさをより適切に設定することができる。   According to this configuration, the size of the mask region can be set more appropriately.

前記検査対象物はプリント基板であって、前記特定領域はプリント基板に設けられた穴に相当する領域であるものとしてもよい。   The inspection object may be a printed board, and the specific area may be an area corresponding to a hole provided in the printed board.

この構成によれば、プリント基板の欠陥検出処理の信頼性を高めることができる。   According to this configuration, the reliability of the defect detection process for the printed circuit board can be improved.

なお、本発明は、種々の態様で実現することが可能であり、例えば、検査対象物の欠陥検出方法および装置、その検出結果を用いた画像検査方法および装置、それらの各種の方法または装置の機能を実現するためのコンピュータプログラム、そのコンピュータプログラムを記録した記録媒体、そのコンピュータプログラムを含み搬送波内に具現化されたデータ信号、等の態様で実現することができる。   Note that the present invention can be realized in various modes. For example, a defect detection method and apparatus for an inspection object, an image inspection method and apparatus using the detection result, and various methods or apparatuses thereof. The present invention can be realized in the form of a computer program for realizing the function, a recording medium recording the computer program, a data signal including the computer program and embodied in a carrier wave, and the like.

次に、本発明を実施するための最良の形態を実施例に基づいて以下の順序で説明する。
A.第1実施例:
B.第2実施例:
C.変形例:
Next, the best mode for carrying out the present invention will be described in the following order based on examples.
A. First embodiment:
B. Second embodiment:
C. Variations:

A.第1実施例:
図1は、本発明の一実施例としてのプリント基板検査装置100の構成を示す説明図である。このプリント基板検査装置100は、プリント基板PCBを照明するための光源20と、プリント基板PCBの画像を撮影する撮像部30と、装置全体の制御を行うコンピュータ40とを備えている。コンピュータ40には、各種のデータやコンピュータプログラムを格納する外部記憶装置50が接続されている。
A. First embodiment:
FIG. 1 is an explanatory diagram showing a configuration of a printed circuit board inspection apparatus 100 as an embodiment of the present invention. The printed circuit board inspection apparatus 100 includes a light source 20 for illuminating the printed circuit board PCB, an imaging unit 30 that captures an image of the printed circuit board PCB, and a computer 40 that controls the entire apparatus. An external storage device 50 that stores various data and computer programs is connected to the computer 40.

コンピュータ40は、画像取得部210と、穴領域取得部220と、隣接領域取得部230と、特別処理領域設定部240と、特別処理領域検査部250と、マスク外領域検査部260と、の機能を有している。これら各部の機能は、外部記憶装置50に格納されたコンピュータプログラムをコンピュータ40が実行することによって実現される。   The computer 40 has functions of an image acquisition unit 210, a hole region acquisition unit 220, an adjacent region acquisition unit 230, a special processing region setting unit 240, a special processing region inspection unit 250, and a non-mask region inspection unit 260. have. The functions of these units are realized by the computer 40 executing computer programs stored in the external storage device 50.

図2は、検査対象物であるプリント基板PCBの様子を示す説明図である。このプリント基板PCBには、5つのスルーホールTH1〜TH5と、プリント基板PCBの切断に用いられる基板穴HLと、が設けられている。プリント基板PCBの表面は、基板ベース上に白色の文字がシルク印刷されたシルク印刷領域RSGと、金メッキが施された金メッキ領域RGPと、基板ベースが露出している基板ベース領域RSBと、基板ベース上にレジストが塗布されたベースレジスト領域RBRと、銅配線のパターン上にレジストが塗布されたパターンレジスト領域RPRと、を含んでいる。また、銅配線のパターン上にレジストが塗布された領域のうち、スルーホールTH5の周囲はレジストが薄い薄レジスト領域RTRとなっている。   FIG. 2 is an explanatory diagram showing a state of the printed circuit board PCB which is an inspection object. The printed circuit board PCB is provided with five through holes TH1 to TH5 and a substrate hole HL used for cutting the printed circuit board PCB. The surface of the printed circuit board PCB includes a silk print region RSG in which white characters are silk-printed on the substrate base, a gold plated region RGP on which gold plating is applied, a substrate base region RSB in which the substrate base is exposed, and a substrate base. It includes a base resist region RBR coated with a resist and a pattern resist region RPR coated with a resist on a copper wiring pattern. Of the region where the resist is applied on the copper wiring pattern, the periphery of the through hole TH5 is a thin resist region RTR with a thin resist.

一般に、プリント基板PCBでは、レジストの塗布工程によっては、スルーホールの周辺でのレジストの厚さが不安定になり、スルーホールごとに周辺のレジストの厚さが異なる場合がある。そのため、欠陥のないプリント基板PCBであっても、図2に示すようにスルーホールの周辺にレジストが薄い領域が発生し得る。そこで、スルーホール周辺のレジストの厚みの許容範囲は、レジストが塗布された他の領域よりも広く設定され、薄レジスト領域RTRのようなレジストが薄い領域の存在も許容される。なお、薄レジスト領域RTRは、欠陥のないプリント基板であってもレジストの厚さの変動により後述するように色が異なる。すなわち、スルーホールに隣接する薄レジスト領域RTRは、色の許容範囲が他の領域よりも広い領域である。   Generally, in the printed circuit board PCB, depending on the resist coating process, the thickness of the resist around the through hole becomes unstable, and the thickness of the peripheral resist may be different for each through hole. Therefore, even in the case of a printed circuit board PCB having no defect, an area where the resist is thin may occur around the through hole as shown in FIG. Therefore, the allowable range of the resist thickness around the through hole is set wider than that of the other region where the resist is applied, and the presence of a thin resist region such as the thin resist region RTR is allowed. It should be noted that the thin resist region RTR has a different color as will be described later due to variations in the thickness of the resist even if the printed circuit board has no defect. That is, the thin resist region RTR adjacent to the through hole is a region having a wider color tolerance range than other regions.

図3は、第1実施例におけるプリント基板PCBの欠陥を検出する手順を示すフローチャートである。ステップS100では、画像取得部210(図1)が、プリント基板PCBのカラー画像を撮像部30から取得する。   FIG. 3 is a flowchart showing a procedure for detecting a defect of the printed circuit board PCB in the first embodiment. In step S100, the image acquisition unit 210 (FIG. 1) acquires a color image of the printed circuit board PCB from the imaging unit 30.

なお、ステップS100では、取得されたカラー画像に対して、画像取得部210が、必要に応じて平滑化処理(ぼかし処理)を実行する。平滑化処理では、メディアンフィルタや、ガウスフィルタ、移動平均などの種々の平滑化フィルタを用いることができる。この平滑化処理を行うことによって、画像データ内に存在する特異な画素を除去することができるので、ゴミ(雑音成分)の少ない画像データを得ることができる。また、予め取得された画像に関してステップS200以降の処理を実行する場合には、ステップS100において、外部記憶装置50(図1)から画像データが読み出される。   In step S100, the image acquisition unit 210 executes a smoothing process (blurring process) on the acquired color image as necessary. In the smoothing process, various smoothing filters such as a median filter, a Gaussian filter, and a moving average can be used. By performing this smoothing process, unique pixels existing in the image data can be removed, so that image data with less dust (noise component) can be obtained. In addition, when the processing after step S200 is executed for an image acquired in advance, image data is read from the external storage device 50 (FIG. 1) in step S100.

図4(a)は、プリント基板PCB(図2)を撮影したカラー画像IMの様子を示す説明図である。このカラー画像IMは、黒色領域BKと、白色領域WHと、金色領域GLと、茶色領域BRと、暗緑色領域GDと、明緑色領域GBと、を含んでいる。なお、本明細書においては、これらの画像領域BK,WH,GL,BR,GD,GBを総称して「色領域」とも呼ぶ。   FIG. 4A is an explanatory diagram showing a state of a color image IM obtained by photographing the printed circuit board PCB (FIG. 2). The color image IM includes a black region BK, a white region WH, a gold region GL, a brown region BR, a dark green region GD, and a light green region GB. In the present specification, these image areas BK, WH, GL, BR, GD, and GB are collectively referred to as “color areas”.

カラー画像IM上では、スルーホールTH1〜TH5と、基板穴HLとは、基板に穴が開けられているので、黒色領域BKで表される。シルク印刷領域RSGと、金メッキ領域RGPと、基板ベース領域RSBとは、それぞれ表面材質の色に応じて、白色領域WHと、金色領域GLと、茶色領域BRと、で表される。ベースレジスト領域RBRは、茶色の基板ベースに緑色のレジストが塗布されているので暗緑色領域GDで表され、パターンレジスト領域RPRは、レジストの下が銅色の銅配線パターンとなっているのでベースレジスト領域RBRよりも輝度の高い明緑色領域GBで表される。そして、パターン上のレジストが薄い薄レジスト領域RTRは、銅配線の色が現れるので金色領域GLで表される。   On the color image IM, the through holes TH1 to TH5 and the substrate hole HL are represented by a black region BK because the hole is formed in the substrate. The silk printing region RSG, the gold plating region RGP, and the substrate base region RSB are represented by a white region WH, a gold region GL, and a brown region BR, respectively, according to the color of the surface material. The base resist region RBR is represented by a dark green region GD since a green resist is applied to a brown substrate base, and the pattern resist region RPR is a base because a copper-colored copper wiring pattern is formed under the resist. It is represented by a bright green region GB having a luminance higher than that of the resist region RBR. The thin resist region RTR with a thin resist on the pattern is represented by a gold region GL because the color of the copper wiring appears.

なお、実際のプリント基板PCBを撮影したカラー画像では、薄レジスト領域RTRのに対応する金色領域GLと、その周囲のパターンレジスト領域RPRに対応する明緑色領域GBとの境界は明確には分かれていないが、図4(a)では、図示の便宜上、これらの金色領域GLと明緑色領域GBとが異なる色領域として分離されたものとして描かれている。   In the color image obtained by photographing the actual printed circuit board PCB, the boundary between the gold region GL corresponding to the thin resist region RTR and the bright green region GB corresponding to the surrounding pattern resist region RPR is clearly separated. Although not shown in FIG. 4A, for convenience of illustration, the golden region GL and the light green region GB are depicted as being separated as different color regions.

図3のステップS200では、穴領域取得部220が、カラー画像IM中の黒色領域BKを抽出することにより、プリント基板PCBに設けられた穴を表す穴領域を取得する。黒色領域BKは、カラー画像IMを構成する各画素の輝度値が所定の輝度閾値以下の領域として抽出できる。この黒色領域BKの抽出に用いる所定の輝度閾値は、例えば、輝度値についてのヒストグラム解析により設定することができる。   In step S200 of FIG. 3, the hole area acquisition unit 220 acquires a hole area representing a hole provided in the printed circuit board PCB by extracting the black area BK in the color image IM. The black area BK can be extracted as an area where the luminance value of each pixel constituting the color image IM is equal to or less than a predetermined luminance threshold. The predetermined luminance threshold value used for extraction of the black region BK can be set by, for example, histogram analysis for luminance values.

なお、本実施例では、黒色領域BKの抽出を各画素の輝度値に基づいて行っているが、黒色領域BKの抽出を他の方法によって行うことも可能である。黒色領域BKの抽出は、黒色を含む予め定められた複数の代表色の領域にカラー画像IMを領域分割し、分割された領域のうちの代表色が黒色である領域を抽出することによっても行うことができる。カラー画像IMの領域分割は、例えば、カラー画像IMの各画素の色と複数の代表色との所定の色空間における距離を表す距離指標値を求め、距離指標値が最小となる代表色の領域に各画素を分類することにより行うことができる。この距離指標値としては、例えば、RGB色空間を3次元ユークリッド空間とみたときのユークリッド距離や、L*a*b*空間における色差ΔEを利用することができる。なお、カラー画像IMの領域分割方法は、複数の代表色に各画素を分類する領域分割方法であれば良く、例えば、上述した特許文献3や特許文献4に開示された方法によっても行うことができる。   In this embodiment, the black area BK is extracted based on the luminance value of each pixel, but the black area BK can be extracted by other methods. The extraction of the black region BK is also performed by dividing the color image IM into a plurality of predetermined representative color regions including black, and extracting a region in which the representative color is black among the divided regions. be able to. The area division of the color image IM is, for example, a distance index value representing a distance in a predetermined color space between the color of each pixel of the color image IM and a plurality of representative colors, and the area of the representative color that minimizes the distance index value. This can be done by classifying each pixel. As this distance index value, for example, the Euclidean distance when the RGB color space is regarded as a three-dimensional Euclidean space, or the color difference ΔE in the L * a * b * space can be used. The area dividing method of the color image IM may be an area dividing method for classifying each pixel into a plurality of representative colors. For example, the area dividing method may be performed by the methods disclosed in Patent Document 3 and Patent Document 4 described above. it can.

また、本実施例では、穴領域をカラー画像IM中の黒色領域BKを抽出することにより取得しているが、他の方法によってプリント基板PCBに設けられた穴に対応する画像領域を取得してもよい。例えば、スルーホールや基板穴を形成するために用いられる設計データ(CADデータ)に含まれる穴の位置と大きさとから穴領域を取得することも可能である。また、撮像部30の反対の面から照明されたプリント基板PCBを撮影し、撮影された画像の輝度が高い領域を穴領域に設定することも可能である。   In this embodiment, the hole area is acquired by extracting the black area BK in the color image IM. However, the image area corresponding to the hole provided in the printed circuit board PCB is acquired by another method. Also good. For example, it is possible to acquire a hole region from the position and size of a hole included in design data (CAD data) used to form a through hole or a substrate hole. It is also possible to take an image of the printed circuit board PCB illuminated from the opposite surface of the imaging unit 30 and set a region where the brightness of the taken image is high as a hole region.

図4(b)は、ステップS200において取得された、穴領域の配置を示す説明図である。図4(b)に示すように、カラー画像IMから黒色領域BKを抽出することにより、スルーホールTH1〜TH5に対応した画像領域SR1〜SR5と、基板穴HLに対応した画像領域SR6と、が取得される。このように取得された画像領域SR1〜SR6のそれぞれが、穴領域となる。   FIG. 4B is an explanatory diagram showing the arrangement of hole regions acquired in step S200. As shown in FIG. 4B, by extracting the black region BK from the color image IM, the image regions SR1 to SR5 corresponding to the through holes TH1 to TH5 and the image region SR6 corresponding to the substrate hole HL are obtained. To be acquired. Each of the image regions SR1 to SR6 acquired in this way becomes a hole region.

図3のステップS300では、隣接領域取得部230が、穴領域SR1〜SR6に隣接する隣接領域を取得する。隣接領域取得部230は、ステップS200で取得した穴領域SR1〜SR6を所定の拡大幅(例えば、5画素)で拡大する拡大処理を行う。そして、拡大処理により拡大した領域が、隣接領域となる。この拡大幅としては、予め決められた設定値のほかに、ユーザにより入力された指定値や、CADデータに基づいて算出された設定値等を用いることができる。また、穴領域ごとに、個別に拡大幅を設定するものとしてもよい。   In step S300 of FIG. 3, the adjacent region acquisition unit 230 acquires adjacent regions adjacent to the hole regions SR1 to SR6. The adjacent area acquisition unit 230 performs an enlargement process for enlarging the hole areas SR1 to SR6 acquired in step S200 with a predetermined enlargement width (for example, 5 pixels). The area enlarged by the enlargement process becomes an adjacent area. As the enlargement width, in addition to a predetermined set value, a specified value input by the user, a set value calculated based on CAD data, or the like can be used. Moreover, it is good also as what sets an expansion width separately for every hole area | region.

なお、穴領域の拡大処理としては、拡大処理によって生成される領域が穴領域を含み、生成される領域を穴領域よりも大きくできる処理であれば、任意の処理が適用可能である。このような処理としては、例えば、各画素の8近傍のいずれかが穴領域に属する場合にその画素を穴領域に属するように設定する膨張処理や、この膨張処理をn(nは、1以上の整数)回実行するn段の膨張処理を用いることができる。また、穴領域の輪郭を取得し、その輪郭を拡大する処理を用いることも可能である。   As the hole area enlargement process, any process can be applied as long as the area generated by the enlargement process includes the hole area and the generated area can be made larger than the hole area. As such processing, for example, when any of the eight neighborhoods of each pixel belongs to the hole region, the expansion processing for setting the pixel to belong to the hole region, or this expansion processing is performed by n (n is 1 or more N-stage expansion processing can be used. It is also possible to use a process of acquiring the contour of the hole region and enlarging the contour.

図4(c)は、隣接領域の取得の様子を示す説明図である。隣接領域取得部230が穴領域SR1に拡大処理を行うことにより、領域ER1が生成される。この拡大処理による拡大した領域(領域ER1−領域SR1)が、穴領域SR1の隣接領域NR1となる。同様に、穴領域SR2〜SR6の拡大処理により生成された領域ER2〜ER6から穴領域SR2〜SR6を除いた領域NR2〜NR6、すなわち、拡大処理により拡大した領域NR2〜NR6が、穴領域SR2〜SR6の隣接領域になる。   FIG. 4C is an explanatory diagram showing a state of acquiring an adjacent region. The adjacent region acquisition unit 230 performs the enlargement process on the hole region SR1, and thereby the region ER1 is generated. The region (region ER1-region SR1) enlarged by this enlargement process becomes the adjacent region NR1 of the hole region SR1. Similarly, the areas NR2 to NR6 obtained by removing the hole areas SR2 to SR6 from the areas ER2 to ER6 generated by the enlargement process of the hole areas SR2 to SR6, that is, the areas NR2 to NR6 enlarged by the enlargement process are the hole areas SR2 to SR6. It becomes an adjacent area of SR6.

図3のステップS400では、特別処理領域設定部240が、各隣接領域に含まれる画素の色に応じて、特別な欠陥検出処理を行うための特別処理領域を設定するか否かを決定する。具体的には、ある穴領域の隣接領域に所定の色(本実施例では、金色)の画素が存在する場合、その穴領域の周囲に特別処理領域が設定される。   In step S400 of FIG. 3, the special processing area setting unit 240 determines whether or not to set a special processing area for performing a special defect detection process according to the color of the pixel included in each adjacent area. Specifically, when a pixel of a predetermined color (in this embodiment, gold) exists in a region adjacent to a certain hole region, a special processing region is set around the hole region.

図5は、特別処理領域の設定の様子を示す説明図である。図5(a)は、プリント基板PCB(図2)を撮影したカラー画像IMを示している。なお、図5(a)と図4(a)とは同一である。図5(b)は、隣接領域NR1〜NR6の配置と、これらの領域NR1〜NR6が属する色領域を示している。また、図5(c)は、ステップS400において設定された特別処理領域PR2,PR3,PR5の配置を示している。なお、図5(b)と図5(c)とに描かれた破線は、図5(a)に示す色領域の境界を表している。   FIG. 5 is an explanatory diagram showing how the special processing area is set. FIG. 5A shows a color image IM obtained by photographing the printed circuit board PCB (FIG. 2). Note that FIG. 5A and FIG. 4A are the same. FIG. 5B shows the arrangement of adjacent regions NR1 to NR6 and the color region to which these regions NR1 to NR6 belong. FIG. 5C shows the arrangement of the special processing areas PR2, PR3, PR5 set in step S400. In addition, the broken line drawn in FIG.5 (b) and FIG.5 (c) represents the boundary of the color area | region shown to Fig.5 (a).

図5(b)に示すように、穴領域SR1の隣接領域NR1は暗緑色領域GDに含まれるので、隣接領域NR1には金色の画素が存在しない。そのため、穴領域SR1には特別処理領域が設定されない。一方、穴領域SR2の隣接領域NR2は金色領域GLに含まれる。そのため、隣接領域NR2には金色の画素が存在し、穴領域SR2には特別処理領域PR2が設定される(図5(c))。同様に、隣接領域NR3,NR5には金色の画素が存在する穴領域SR3,SR5には、特別処理領域PR3,PR5が設定される。一方、隣接領域NR4,SR6には金色の画素が存在しないため、穴領域SR4,SR6には特別処理領域が設定されない。   As shown in FIG. 5B, since the adjacent region NR1 of the hole region SR1 is included in the dark green region GD, there are no gold pixels in the adjacent region NR1. Therefore, no special processing area is set in the hole area SR1. On the other hand, the adjacent region NR2 of the hole region SR2 is included in the gold region GL. Therefore, a gold pixel exists in the adjacent region NR2, and a special processing region PR2 is set in the hole region SR2 (FIG. 5C). Similarly, special processing regions PR3 and PR5 are set in the hole regions SR3 and SR5 where the gold pixels exist in the adjacent regions NR3 and NR5. On the other hand, since there are no gold pixels in the adjacent regions NR4 and SR6, no special processing region is set in the hole regions SR4 and SR6.

特別処理領域は、隣接領域と同様に、穴領域の拡大処理によって設定される。図5(c)の例では、特別処理領域設定部240が、穴領域SR2の拡大処理を行う。そして、拡大処理により拡大した領域PR2が、穴領域SR2に対応する特別処理領域に設定される。他の穴領域SR3,SR5についても同様である。   The special processing area is set by the enlargement process of the hole area in the same manner as the adjacent area. In the example of FIG. 5C, the special process area setting unit 240 performs the enlargement process of the hole area SR2. Then, the region PR2 enlarged by the enlargement process is set as a special processing region corresponding to the hole region SR2. The same applies to the other hole regions SR3 and SR5.

なお、図5(c)では、特別処理領域PR2,PR3,PR5が隣接領域NR2,NR3,NR5よりも大きく描かれているが、特別処理領域と隣接領域の大小関係は任意に設定できる。   In FIG. 5C, the special processing regions PR2, PR3, and PR5 are drawn larger than the adjacent regions NR2, NR3, and NR5, but the size relationship between the special processing regions and the adjacent regions can be arbitrarily set.

図3のステップS500では、特別処理領域検査部250が、各特別処理領域中の欠陥を検出する。具体的には、特別処理領域中の画素の色が色の許容範囲に含まれるか否かを判断する。そして、特別処理領域中のすべての画素の色が許容範囲内である場合にはその特別処理領域には欠陥がないものと判断され、特別処理領域中に許容範囲外の色の画素がある場合にはその特別処理領域に欠陥があると判断される。   In step S500 of FIG. 3, the special processing area inspection unit 250 detects a defect in each special processing area. Specifically, it is determined whether or not the color of the pixel in the special processing area is included in the allowable color range. If the color of all the pixels in the special processing area is within the allowable range, it is determined that the special processing area has no defect, and there is a pixel with a color outside the allowable range in the special processing area. Is determined to have a defect in the special processing area.

図6は、特別処理領域内に欠陥がないプリント基板PCBでの欠陥検出処理の様子を示す説明図である。図6(a)は、プリント基板PCBの特別処理領域の様子を示している。また、図6(b)は、プリント基板PCBの特別処理領域PR5中の各画素の色分布を示している。なお、図6(b)では図示の便宜上、R成分とB成分との2つの色成分で構成される2次元色空間(以下、「RB色空間」とも呼ぶ)における各画素の色を表す点が黒丸で描かれている。   FIG. 6 is an explanatory diagram showing a state of defect detection processing on the printed circuit board PCB having no defect in the special processing region. FIG. 6A shows the state of the special processing area of the printed circuit board PCB. FIG. 6B shows the color distribution of each pixel in the special processing region PR5 of the printed circuit board PCB. In FIG. 6B, for the convenience of illustration, the point representing the color of each pixel in a two-dimensional color space (hereinafter also referred to as “RB color space”) composed of two color components of an R component and a B component. Is drawn with black circles.

図6(a)に示すように、プリント基板PCBでは、2つの穴領域SR2,SR3に対応する2つの特別処理領域PR2,PR3は、いずれも金色領域GLに含まれる。一方、穴領域SR5に対応する特別処理領域PR5は、金色領域GLと明緑色領域GBの2つの色領域に跨っている。上述したように、これらの2つの色領域GL,GBの境界は、実際のプリント基板PCBを撮影したカラー画像では明確でないので、特別処理領域PR5中の画素の色は、金色から明緑色まで連続的に変化する。そのため、特別処理領域PR5中の画素の色を表す点は、図6(b)に示すように、緑色を表す範囲と金色を表す範囲とに跨ったRB色空間内の一部分の範囲XR(以下、「実在色範囲XR」とも呼ぶ)に分布する。   As shown in FIG. 6A, in the printed circuit board PCB, the two special processing regions PR2 and PR3 corresponding to the two hole regions SR2 and SR3 are both included in the gold region GL. On the other hand, the special processing region PR5 corresponding to the hole region SR5 extends over two color regions, the gold region GL and the light green region GB. As described above, the boundary between these two color regions GL and GB is not clear in the color image obtained by photographing the actual printed circuit board PCB, so the pixel color in the special processing region PR5 is continuous from gold to light green. Changes. Therefore, as shown in FIG. 6B, a point representing the color of the pixel in the special processing region PR5 is a partial range XR (hereinafter referred to as RB color space) that spans the range representing green and the range representing gold. , Also called “real color range XR”).

図6に示すように、特別処理領域PR5中のすべての画素の色が実在色範囲XRに属する場合、特別処理領域検査部250は、特別処理領域PR5には欠陥がないと判断する。他の特別処理領域PR2,PR3についても、特別処理領域中の画素の色が、特別処理領域ごとに設定された実在色範囲に含まれるか否かによって欠陥の有無が判断される。   As shown in FIG. 6, when the colors of all the pixels in the special processing region PR5 belong to the actual color range XR, the special processing region inspection unit 250 determines that the special processing region PR5 has no defect. With respect to the other special processing regions PR2 and PR3, whether or not there is a defect is determined based on whether or not the color of the pixel in the special processing region is included in the actual color range set for each special processing region.

なお、本実施例においては、特別処理領域PR5中の各画素の色が実在色範囲XRに属するか否かは、個々の基板の検査に先だって予め生成され、外部記憶装置50に保存されたルックアップテーブルLUTを参照することにより判断される。ここで、ルックアップテーブルLUTとは、RGB色空間内の個別色を表すRGB値(「入力点」とも呼ぶ)を入力したときに、個別色が実在色範囲XRに属するか否かを表す値(例えば、実在色範囲XRに属する場合は1、属さない場合は0)を出力するテーブルである。   In this embodiment, whether or not the color of each pixel in the special processing region PR5 belongs to the actual color range XR is generated in advance prior to the inspection of each substrate and stored in the external storage device 50. This is determined by referring to the uptable LUT. Here, the lookup table LUT is a value indicating whether or not an individual color belongs to the actual color range XR when an RGB value (also referred to as an “input point”) representing an individual color in the RGB color space is input. (For example, 1 if it belongs to the actual color range XR, 0 if it does not belong).

ルックアップテーブルLUTは、欠陥がないプリント基板を撮影したカラー画像であるマスター画像を用いて、マスター画像の特別処理領域中の各画素の色(以下、「実在色」とも呼ぶ)に基づいて生成される。具体的には、ルックアップテーブルLUTは、すべての入力点に対して0を出力するルックアップテーブルを生成し、そのマスター画像の特別処理領域の各画素の色に対応する出力値を1に変更することにより生成される。このように、ルックアップテーブルの出力値を書き換えることにより、出力値が1である色の範囲が実在色範囲XRとなる。なお、ルックアップテーブルLUTの生成の後、ルックアップテーブルLUTの各入力点について、入力点の8近傍の出力値のいずれかが1である場合に入力点に対応する出力値を1に変更する膨張処理を行うことが好ましい。この膨張処理を行うことにより、欠陥のないプリント基板PCBに存在し得る色であって、マスター画像の特別処理領域には出現していない色を実在色範囲XRに含めることが可能となる。   The lookup table LUT is generated based on the color of each pixel in the special processing area of the master image (hereinafter also referred to as “real color”) using a master image that is a color image obtained by photographing a printed circuit board without defects. Is done. Specifically, the lookup table LUT generates a lookup table that outputs 0 for all input points, and changes the output value corresponding to the color of each pixel in the special processing area of the master image to 1. It is generated by doing. In this way, by rewriting the output value of the lookup table, the color range where the output value is 1 becomes the actual color range XR. After generation of the lookup table LUT, for each input point of the lookup table LUT, if any of the output values near the input point is 1, the output value corresponding to the input point is changed to 1. It is preferable to perform an expansion process. By performing this expansion process, it is possible to include in the actual color range XR colors that can exist on the printed circuit board PCB having no defect and that do not appear in the special processing area of the master image.

なお、本実施例におけるルックアップテーブルLUTは、個別色が実在色範囲に属するか否かを表す値(実在色フラグ)を出力しているが、ルックアップテーブルの出力値は、個別色が実在色範囲に属するか否かが判定可能な値であればよい。例えば、個別色が色空間中のどの色を表す領域に属するかを示す値(色番号)と、実在色フラグとから生成される値をルックアップテーブルの出力値とすることも可能である。   The lookup table LUT in this embodiment outputs a value (real color flag) indicating whether or not the individual color belongs to the actual color range, but the output value of the lookup table is that the individual color is actual. Any value can be used as long as it can be determined whether or not it belongs to the color range. For example, it is also possible to use a value generated from a value (color number) indicating which color in the color space represents an area representing an individual color and an actual color flag as an output value of the lookup table.

また、本実施例では、特別処理領域中の画素の色が許容しうる色の範囲に含まれるか否かをルックアップテーブルLUTを参照することにより判断しているが、他の方法を用いることも可能である。例えば、RGB各成分ごとに上限値と下限値を設定し、特別処理領域中の画素のRGB各成分値が、それぞれ上限値と下限値の間にある場合にその画素の色が許容しうる色の範囲であると判断するものとしてもよい。   In this embodiment, it is determined by referring to the look-up table LUT whether or not the color of the pixel in the special processing area is included in the allowable color range, but other methods are used. Is also possible. For example, if an upper limit value and a lower limit value are set for each RGB component, and each RGB component value of the pixel in the special processing area is between the upper limit value and the lower limit value, the color of the pixel is acceptable. It is good also as what judges that it is the range.

図7は、特別処理領域内に欠陥があるプリント基板PCBでの欠陥検出処理の様子を示す説明図である。図6と同様に、図7(a)は、プリント基板PCBの特別処理領域の様子を示し、図7(b)は、プリント基板PCBの特別処理領域PR5中の各画素の色分布を示している。   FIG. 7 is an explanatory diagram showing a state of defect detection processing in the printed circuit board PCB having a defect in the special processing region. As in FIG. 6, FIG. 7A shows the state of the special processing region of the printed circuit board PCB, and FIG. 7B shows the color distribution of each pixel in the special processing region PR5 of the printed circuit board PCB. Yes.

図7(a)に示す例では、特別処理領域PR5中に2つの欠陥を表す2つの画像領域DF1,DF2(「欠陥画像領域」とも呼ぶ)が存在する。これらの欠陥画像領域DF1,DF2は、それぞれ図7(b)の黒三角と黒四角とで表されるように、欠陥のないプリント基板PCBの特別処理領域PR5に現れる色とは異なる色を有している。このように、特別処理領域内に欠陥があるプリント基板PCBでは、特別処理領域PR5が、黒丸で表される実在色範囲XRに属する色の画素のほかに、黒三角および黒四角で表される実在色範囲XRに属さない色の画素を有している。そのため、特別処理領域検査部250は、特別処理領域PR5に欠陥があると判断する。   In the example shown in FIG. 7A, there are two image areas DF1 and DF2 (also referred to as “defect image areas”) representing two defects in the special processing area PR5. These defect image areas DF1 and DF2 have colors different from those appearing in the special processing area PR5 of the printed circuit board PCB having no defect, as represented by the black triangle and the black square in FIG. 7B, respectively. is doing. As described above, in the printed circuit board PCB having a defect in the special processing region, the special processing region PR5 is represented by black triangles and black squares in addition to pixels of colors belonging to the actual color range XR represented by black circles. The pixel has a color that does not belong to the actual color range XR. Therefore, the special processing region inspection unit 250 determines that the special processing region PR5 is defective.

図3のステップS600では、マスク外領域検査部260が、カラー画像IMから特別処理領域と穴領域と(これらの領域を併せて、「マスク領域」と呼ぶ)を除いた画像領域(マスク外領域)中の欠陥を検出する。具体的には、例えば、マスク外領域を領域分割し、その領域分割結果上での代表色領域の位置や形状に基づいてプリント基板PCBの欠陥の有無を判断する。マスク外領域は、カラー画像IMから色の許容範囲が広い特別処理領域が除かれているので、領域分割により信頼性の高い欠陥検出を行うことができる。   In step S600 of FIG. 3, the non-mask area inspection unit 260 removes the special processing area and the hole area (these areas are collectively referred to as “mask area”) from the color image IM (the non-mask area). ) To detect the defects inside. Specifically, for example, an area outside the mask is divided into areas, and the presence / absence of a defect in the printed circuit board PCB is determined based on the position and shape of the representative color area on the area division result. In the area outside the mask, a special processing area having a wide color tolerance range is removed from the color image IM, so that it is possible to detect defects with high reliability by dividing the area.

図8は、欠陥のないプリント基板PCBについて、欠陥処理検出処理を行った結果を示す説明図である。特別処理領域を設定しない比較例では、図8(a)に示すように、領域分割により薄レジスト領域RTRの色が金色領域GLとなる。そのため、本来緑色となるレジストが塗布された領域が金色になっていると判断され、薄レジスト領域RTRが欠陥として検出される。一方、本実施例では、薄レジスト領域RTRについては特別の欠陥検出処理が行われているため、薄レジスト領域RTRは欠陥として検出されない。   FIG. 8 is an explanatory diagram showing the result of performing the defect processing detection process on the printed circuit board PCB having no defect. In the comparative example in which no special processing region is set, as shown in FIG. 8A, the color of the thin resist region RTR becomes the gold region GL by dividing the region. Therefore, it is determined that the area where the resist that is originally green is applied is gold, and the thin resist area RTR is detected as a defect. On the other hand, in this embodiment, since a special defect detection process is performed for the thin resist region RTR, the thin resist region RTR is not detected as a defect.

このように、本実施例では、穴領域の周囲に隣接領域を設け、隣接領域に特定の色が含まれている場合に穴領域を包含するマスク領域を拡大しているので、穴領域に隣接する薄レジスト領域RTRを欠陥として誤認識する可能性を低減できる。また、穴領域の周囲に特別処理領域を設け、特別処理領域の欠陥を検出しているので、穴領域の周囲に存在する欠陥の検出が可能となる。   As described above, in this embodiment, an adjacent area is provided around the hole area, and the mask area including the hole area is enlarged when the specific color is included in the adjacent area. The possibility that the thin resist region RTR to be erroneously recognized as a defect can be reduced. Further, since the special processing area is provided around the hole area and the defect in the special processing area is detected, the defect existing around the hole area can be detected.

B.第2実施例:
図9は、第2実施例におけるプリント基板PCBの欠陥を検出する手順を示すフローチャートである。図9のフローチャートは、ステップS200,S300の間に2つのステップS310,S320が追加されている点で、図3に示すフローチャートと異なっている。他は、図3と同じである。
B. Second embodiment:
FIG. 9 is a flowchart showing a procedure for detecting a defect of the printed circuit board PCB in the second embodiment. The flowchart of FIG. 9 differs from the flowchart shown in FIG. 3 in that two steps S310 and S320 are added between steps S200 and S300. Others are the same as FIG.

ステップS310では、隣接領域取得部230(図1)が、穴領域の拡大処理により境界領域を取得する。そして、ステップS320において、境界領域の色に応じて、隣接領域を用いた特別処理領域の設定判定の要否が決定される。   In step S310, the adjacent region acquisition unit 230 (FIG. 1) acquires the boundary region by the hole region enlargement process. In step S320, whether or not it is necessary to determine the setting of the special processing area using the adjacent area is determined according to the color of the boundary area.

図10は、境界領域を用いた隣接領域の設定の様子を示す説明図である。図10(a)は、2つの穴領域SR1,SR3の付近での色領域の配置を示している。隣接領域取得部230(図1)は、穴領域SR1,SR3の拡大処理により境界領域TR1,TR3を取得する。そして、境界領域TR1,TR3中に所定の色(例えば、金色)の画素が存在する場合、特別処理領域の設定が必要であると判断され、穴領域SR1,SR3の周囲に隣接領域が設定される。また、他の穴領域についても、同様の処理が行われる。   FIG. 10 is an explanatory diagram showing a state of setting an adjacent area using a boundary area. FIG. 10A shows the arrangement of the color areas in the vicinity of the two hole areas SR1 and SR3. The adjacent area acquisition unit 230 (FIG. 1) acquires the boundary areas TR1 and TR3 by the enlargement process of the hole areas SR1 and SR3. Then, when pixels of a predetermined color (for example, gold) exist in the boundary regions TR1 and TR3, it is determined that a special processing region needs to be set, and adjacent regions are set around the hole regions SR1 and SR3. The The same processing is performed for the other hole regions.

図10(b)は、境界領域TR1,TR3を用いて設定された隣接領域の配置を示している。図10の例では、境界領域TR1(暗緑色領域GDに含まれる)には金色の画素が存在しないので、穴領域SR1には隣接領域が設定されない。一方、境界領域TR3(金色領域GLに含まれる)には金色の画素が存在するので、穴領域SR3には隣接領域NR3が設定される。なお、図10(b)に示すように、隣接領域NR3は、境界領域TR3よりも大きくなるように設定される。   FIG. 10B shows an arrangement of adjacent areas set using the boundary areas TR1 and TR3. In the example of FIG. 10, since no gold pixel exists in the boundary region TR1 (included in the dark green region GD), no adjacent region is set in the hole region SR1. On the other hand, since a gold pixel exists in the boundary region TR3 (included in the gold region GL), the adjacent region NR3 is set in the hole region SR3. As shown in FIG. 10B, the adjacent region NR3 is set to be larger than the boundary region TR3.

このように、第2実施例では、特別処理領域の設定判定の要否を境界領域の色に応じて決定し、特別処理領域の設定判定が必要な穴領域についてのみ隣接領域を用いた特別処理領域の設定の有無を決定することにより、隣接領域の画像処理量が低減できる。   As described above, in the second embodiment, the necessity for determining the setting of the special processing area is determined according to the color of the boundary area, and the special processing using the adjacent area only for the hole area that needs to be determined for the special processing area. By determining the presence / absence of area setting, the image processing amount of the adjacent area can be reduced.

C.変形例:
なお、この発明は上記実施例や実施形態に限られるものではなく、その要旨を逸脱しない範囲において種々の態様において実施することが可能であり、例えば次のような変形も可能である。
C. Variations:
In addition, this invention is not restricted to the said Example and embodiment, It can implement in a various aspect in the range which does not deviate from the summary, For example, the following deformation | transformation is also possible.

C1.変形例1:
上記各実施例では、特別処理領域を穴領域の周囲に設定にしているが、穴領域以外の特定の領域を抽出し、その周囲に特別処理領域を設定することもできる。この場合、特定の領域は、カラー画像IMの領域分割により生成された特定の色の領域の抽出や、CADデータからの特定の領域の位置や形状の取得等により取得することができる。なお、特定領域としては、カラー画像中で所定の色(例えば、黒)を有する領域を選択することが好ましい。
C1. Modification 1:
In each of the above embodiments, the special processing area is set around the hole area, but a specific area other than the hole area can be extracted and the special processing area can be set around the specific area. In this case, the specific area can be acquired by extracting a specific color area generated by area division of the color image IM, acquiring the position and shape of the specific area from the CAD data, or the like. As the specific area, it is preferable to select an area having a predetermined color (for example, black) in the color image.

C2.変形例2:
上記各実施例では、隣接領域に特定の色の画素が含まれるか否かによって特別処理領域の要否を決定しているが、一般には、隣接領域の色に応じて特別処理領域の要否を決定できる。具体的には、所定の色空間内での隣接領域中の各画素の色が所定の色分布範囲外の場合に、特別処理領域を設定することも可能である。また、隣接領域が所定の複数の代表色領域のうちの2つ以上の代表色領域に跨る場合に、特別処理領域を設定するものとしても良い。ここで「代表色領域」とは、複数の代表色を用いた領域分割によってカラー画像から生成される個々の代表色に対応する画像上の領域である。この場合、隣接領域が2つ以上の代表色領域に跨るか否かは、予めカラー画像の領域分割を行い、隣接領域に含まれる代表色領域の数が2以上であるか否かで判断できる。
C2. Modification 2:
In each of the above embodiments, the necessity of the special processing area is determined depending on whether or not a pixel of a specific color is included in the adjacent area. In general, the necessity of the special processing area is determined according to the color of the adjacent area. Can be determined. Specifically, the special processing area can be set when the color of each pixel in the adjacent area in the predetermined color space is outside the predetermined color distribution range. Further, the special processing area may be set when the adjacent area extends over two or more representative color areas of a plurality of predetermined representative color areas. Here, the “representative color area” is an area on the image corresponding to each representative color generated from a color image by area division using a plurality of representative colors. In this case, whether or not the adjacent region extends over two or more representative color regions can be determined by performing region division of the color image in advance and determining whether or not the number of representative color regions included in the adjacent region is two or more. .

C3.変形例3:
上記各実施例では、図3のステップS500において、特別処理領域検査部250(図1)が、特別処理領域中の欠陥検出処理を行っているが、特別処理領域中の欠陥検出処理を省略しても良い。すなわち、特別処理領域と穴領域とを併せたマスク領域は欠陥検出処理されず、マスク領域外の領域は欠陥検出処理される。
C3. Modification 3:
In each of the above embodiments, the special processing region inspection unit 250 (FIG. 1) performs the defect detection processing in the special processing region in step S500 of FIG. 3, but the defect detection processing in the special processing region is omitted. May be. That is, the mask area including the special processing area and the hole area is not subjected to the defect detection process, and the area outside the mask area is subjected to the defect detection process.

C4.変形例4:
上記各実施例では、各穴領域ごとに決定される特別処理領域の要否に応じてマスク領域(=穴領域+特別処理領域)を設定しているが、一般には、隣接領域の色に応じてマスク領域の大きさを変えることができればよい。この場合、マスク領域は、隣接領域に特定の色の画素が含まれる場合に大きく設定され、隣接領域に特定の色の画素が含まれない場合には小さく設定されることが好ましい。
C4. Modification 4:
In each of the above embodiments, the mask area (= hole area + special processing area) is set according to the necessity of the special processing area determined for each hole area, but in general, according to the color of the adjacent area. It is sufficient if the size of the mask area can be changed. In this case, it is preferable that the mask area is set to be large when a pixel of a specific color is included in the adjacent area, and is set to be small when a pixel of a specific color is not included in the adjacent area.

C5.変形例5:
上記各実施例では、穴領域を用いて特別処理領域を設定しているが、穴領域とは無関係に、所定の条件を満たす領域を特別処理領域に設定するものとしてもよい。所定の条件を満たす領域としては、例えば、プリント基板PCBの金メッキ領域RGPのように、予め定められた位置や形状の領域や、穴領域の周囲の所定の色を有する領域とすることができる。
C5. Modification 5:
In each of the embodiments described above, the special processing area is set using the hole area, but an area that satisfies a predetermined condition may be set as the special processing area regardless of the hole area. The region that satisfies the predetermined condition can be, for example, a region having a predetermined position or shape, or a region having a predetermined color around the hole region, such as a gold plating region RGP of the printed circuit board PCB.

C6.変形例6:
本発明による特別処理領域の設定と、特別処理領域中の欠陥の検出とは、プリント基板に限らず、検査対象物を撮影したカラー画像上での色の許容範囲が互いに異なる画像領域を有する任意の物体の欠陥検出に対して適用できる。例えば、パターンの形成された半導体ウェハや、複雑な形状を有する機械部品などの検査対象物を撮影したカラー画像を用いたこれらの検査対象物の欠陥検出にも適用することができる。
C6. Modification 6:
The setting of the special processing area and the detection of the defect in the special processing area according to the present invention are not limited to the printed circuit board, but are arbitrary having image areas having different color tolerance ranges on the color image obtained by photographing the inspection object. It can be applied to defect detection of objects. For example, the present invention can be applied to defect detection of these inspection objects using color images obtained by photographing inspection objects such as semiconductor wafers with patterns and mechanical parts having complicated shapes.

本発明の一実施例としてのプリント基板検査装置100の構成を示す説明図。BRIEF DESCRIPTION OF THE DRAWINGS Explanatory drawing which shows the structure of the printed circuit board inspection apparatus 100 as one Example of this invention. プリント基板PCBの表面の状態を示す説明図。Explanatory drawing which shows the state of the surface of printed circuit board PCB. 第1実施例におけるプリント基板PCBの欠陥検出処理の手順を示すフローチャート。The flowchart which shows the procedure of the defect detection process of the printed circuit board PCB in 1st Example. 隣接領域の取得の様子を示す説明図。Explanatory drawing which shows the mode of acquisition of an adjacent area | region. 特別処理領域の設定の様子を示す説明図。Explanatory drawing which shows the mode of the setting of a special process area | region. 特別処理領域内に欠陥がないプリント基板での欠陥検出処理の様子を示す説明図。Explanatory drawing which shows the mode of the defect detection process in the printed circuit board without a defect in a special process area | region. 特別処理領域内に欠陥があるプリント基板での欠陥検出処理の様子を示す説明図。Explanatory drawing which shows the mode of the defect detection process in the printed circuit board with a defect in a special process area | region. 欠陥のないプリント基板PCBについて、欠陥処理検出処理を行った結果を示す説明図。Explanatory drawing which shows the result of having performed the defect process detection process about the printed circuit board PCB without a defect. 第2実施例におけるプリント基板PCBの欠陥検出処理の手順を示すフローチャート。The flowchart which shows the procedure of the defect detection process of the printed circuit board PCB in 2nd Example. 境界領域を用いた隣接領域の設定の様子を示す説明図。Explanatory drawing which shows the mode of the setting of the adjacent area | region using a boundary area | region.

符号の説明Explanation of symbols

20…光源
30…撮像部
40…コンピュータ
50…外部記憶装置
100…プリント基板検査装置
210…画像取得部
220…穴領域取得部
230…隣接領域取得部
240…特別処理領域設定部
250…特別処理領域検査部
260…マスク外領域検査部
PCB…プリント基板
DESCRIPTION OF SYMBOLS 20 ... Light source 30 ... Imaging part 40 ... Computer 50 ... External storage device 100 ... Printed circuit board inspection apparatus 210 ... Image acquisition part 220 ... Hole area acquisition part 230 ... Adjacent area acquisition part 240 ... Special process area setting part 250 ... Special process area Inspection part 260 ... Outside mask area inspection part PCB ... Printed circuit board

Claims (6)

検査対象物を撮影したカラー画像を用いて、前記検査対象物の欠陥を検出する方法であって、
(a)前記カラー画像の中の特定領域を取得する工程と、
(b)前記特定領域の周囲の隣接領域を取得する工程と、
(c)前記特定領域を含むマスク領域を設定する工程と、
(d)前記カラー画像のうち前記マスク領域以外の領域について、所定の欠陥検出処理を行う工程と、
を備え、
前記マスク領域の大きさは、前記隣接領域の色に応じて変更される、方法。
A method for detecting defects in the inspection object using a color image obtained by photographing the inspection object,
(A) obtaining a specific region in the color image;
(B) obtaining an adjacent region around the specific region;
(C) setting a mask region including the specific region;
(D) performing a predetermined defect detection process on an area other than the mask area in the color image;
With
The size of the mask area is changed according to the color of the adjacent area.
請求項1記載の方法であって、
前記マスク領域は、前記特定領域と、前記特定領域の周囲を包含する特別処理領域と、を有し、
前記方法は、さらに、前記特別処理領域について、前記所定の欠陥検出処理とは異なる特別の欠陥処理を行う工程を備える、方法。
The method of claim 1, comprising:
The mask area includes the specific area and a special processing area including the periphery of the specific area,
The method further includes a step of performing a special defect process different from the predetermined defect detection process for the special process region.
請求項1または2記載の方法であって、
前記工程(b)は、
(b1)前記特定領域の周辺の境界領域を取得する工程と、
(b2)前記境界領域の色が所定の条件を満たす場合に、前記境界領域を含み前記境界領域よりも大きい前記隣接領域を取得する工程と、
(b3)前記境界領域の色が前記所定の条件を満たさない場合に、前記マスク領域の大きさを所定の大きさに設定する工程と、
を含む、方法。
The method according to claim 1 or 2, comprising:
The step (b)
(B1) obtaining a boundary region around the specific region;
(B2) obtaining the adjacent region that includes the boundary region and is larger than the boundary region when the color of the boundary region satisfies a predetermined condition;
(B3) a step of setting the size of the mask region to a predetermined size when the color of the boundary region does not satisfy the predetermined condition;
Including a method.
請求項3記載の方法であって、
前記所定の条件は、前記境界領域中に所定の第1の色範囲の画素が存在するという条件であり、
前記工程(c)は、前記隣接領域中の画素の色が所定の第2の色範囲外である場合に、前記第2の色範囲である場合よりも前記マスク領域を大きくする工程を含む、方法。
The method of claim 3, comprising:
The predetermined condition is a condition that a pixel of a predetermined first color range exists in the boundary region,
The step (c) includes a step of enlarging the mask region when the color of a pixel in the adjacent region is outside a predetermined second color range than in the case of the second color range. Method.
請求項1ないし4のいずれか記載の方法であって、
前記検査対象物はプリント基板であって、前記特定領域はプリント基板に設けられた穴に相当する領域である、方法。
A method according to any one of claims 1 to 4, comprising
The method in which the inspection object is a printed circuit board, and the specific area is an area corresponding to a hole provided in the printed circuit board.
検査対象物を撮影したカラー画像を用いて、前記検査対象物の欠陥を検出する装置であって、
前記カラー画像の中の特定領域を取得する特定領域取得部と、
前記特定領域の周囲の隣接領域を取得する隣接領域取得部と、
前記特定領域を含むマスク領域を設定するマスク領域設定部と、
前記カラー画像のうち前記マスク領域以外の領域について、所定の欠陥検出処理を行うマスク領域外検査部と、
を備え、
前記マスク領域の大きさは、前記隣接領域の色に応じて変更される、装置。
An apparatus for detecting defects in the inspection object using a color image obtained by photographing the inspection object,
A specific area acquisition unit for acquiring a specific area in the color image;
An adjacent area acquisition unit for acquiring an adjacent area around the specific area;
A mask area setting unit for setting a mask area including the specific area;
An inspection area outside the mask area that performs a predetermined defect detection process for an area other than the mask area in the color image;
With
The apparatus, wherein a size of the mask area is changed according to a color of the adjacent area.
JP2004261789A 2004-09-09 2004-09-09 Defect detection by color image of an object Active JP4841819B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2004261789A JP4841819B2 (en) 2004-09-09 2004-09-09 Defect detection by color image of an object
TW094127838A TWI275788B (en) 2004-09-09 2005-08-16 Method and apparatus for detecting a defect of an object by a color image of the object
CN200510092185A CN100587480C (en) 2004-09-09 2005-08-22 Object based color image defect detection method and device
KR1020050082497A KR100684186B1 (en) 2004-09-09 2005-09-06 Detecting a defect of an object based on a color image of the object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004261789A JP4841819B2 (en) 2004-09-09 2004-09-09 Defect detection by color image of an object

Publications (2)

Publication Number Publication Date
JP2006078300A true JP2006078300A (en) 2006-03-23
JP4841819B2 JP4841819B2 (en) 2011-12-21

Family

ID=36157890

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004261789A Active JP4841819B2 (en) 2004-09-09 2004-09-09 Defect detection by color image of an object

Country Status (2)

Country Link
JP (1) JP4841819B2 (en)
CN (1) CN100587480C (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006078301A (en) * 2004-09-09 2006-03-23 Dainippon Screen Mfg Co Ltd Flaw detection method of object by means of color image of the object
WO2012164654A1 (en) * 2011-05-28 2012-12-06 株式会社メガトレード Automatic inspection device and automatic inspection method for inspecting silk backing
JPWO2020012628A1 (en) * 2018-07-13 2021-02-25 株式会社Fuji Foreign matter detection method and electronic component mounting device

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025398B (en) * 2006-02-20 2010-06-02 牧德科技股份有限公司 Hollow-bulge analyzing method for micro-pore after filled by copper
FR2991052B1 (en) * 2012-05-28 2015-05-01 Msc & Sgcc OPTICAL METHOD FOR INSPECTING TRANSPARENT OR TRANSLUCENT CONTAINERS WITH VISUAL REASONS
CN105223139A (en) * 2014-06-10 2016-01-06 何卫 Spatial multi-region color synchronous detection method and device applying same
CN104362111B (en) * 2014-11-27 2017-02-01 阳光硅峰电子科技有限公司 Silicon wafer edge breakage automatic detection method
CN104848808B (en) * 2015-06-03 2017-08-25 湖南大学 A kind of Surface Roughness Detecting Method and equipment
CN105279757B (en) * 2015-10-19 2018-10-16 广州视源电子科技股份有限公司 A kind of pad localization method and device
CN109789697B (en) * 2016-09-21 2021-04-02 小森公司 Printing quality inspection device and printing quality inspection method
CN111242896A (en) * 2019-12-31 2020-06-05 电子科技大学 Color printing label defect detection and quality rating method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0643112A (en) * 1992-07-23 1994-02-18 Matsushita Electric Ind Co Ltd Teaching method and equipment for image inspecting apparatus
JPH0658727A (en) * 1992-08-07 1994-03-04 Matsushita Electric Ind Co Ltd Method and equipment for teaching of image inspecting apparatus
JPH07325046A (en) * 1994-05-31 1995-12-12 Nec Corp Appearance inspection method and appearance inspection apparatus
JPH11337498A (en) * 1998-05-26 1999-12-10 Dainippon Screen Mfg Co Ltd Apparatus and method for inspecting printed circuit board
JP2003172711A (en) * 2001-09-26 2003-06-20 Dainippon Screen Mfg Co Ltd Surface inspection of inspected object using image processing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0643112A (en) * 1992-07-23 1994-02-18 Matsushita Electric Ind Co Ltd Teaching method and equipment for image inspecting apparatus
JPH0658727A (en) * 1992-08-07 1994-03-04 Matsushita Electric Ind Co Ltd Method and equipment for teaching of image inspecting apparatus
JPH07325046A (en) * 1994-05-31 1995-12-12 Nec Corp Appearance inspection method and appearance inspection apparatus
JPH11337498A (en) * 1998-05-26 1999-12-10 Dainippon Screen Mfg Co Ltd Apparatus and method for inspecting printed circuit board
JP2003172711A (en) * 2001-09-26 2003-06-20 Dainippon Screen Mfg Co Ltd Surface inspection of inspected object using image processing

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006078301A (en) * 2004-09-09 2006-03-23 Dainippon Screen Mfg Co Ltd Flaw detection method of object by means of color image of the object
WO2012164654A1 (en) * 2011-05-28 2012-12-06 株式会社メガトレード Automatic inspection device and automatic inspection method for inspecting silk backing
JPWO2020012628A1 (en) * 2018-07-13 2021-02-25 株式会社Fuji Foreign matter detection method and electronic component mounting device

Also Published As

Publication number Publication date
CN1746666A (en) 2006-03-15
CN100587480C (en) 2010-02-03
JP4841819B2 (en) 2011-12-21

Similar Documents

Publication Publication Date Title
KR100673423B1 (en) Technique for detecting a defect of an object by area segmentation of a color image of the object
US7480407B2 (en) Surface region identification by image area segmentation
JP4139571B2 (en) Color image segmentation
JP2007003297A (en) Inspection device of substrate, parameter setting method thereof and parameter setting device
CN100587480C (en) Object based color image defect detection method and device
JP2006220648A (en) Substrate inspection device, method and device for setting inspection logic
JP4492356B2 (en) Substrate inspection device, parameter setting method and parameter setting device
JP2006220437A (en) Substrate inspection device, method and device for setting parameter
KR101022187B1 (en) Substrate inspection device
JP4745633B2 (en) Defect detection method and apparatus using color image of object
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
TW202334900A (en) Training data generation apparatus, training data generation method, and program
KR100684186B1 (en) Detecting a defect of an object based on a color image of the object
JPH0624014B2 (en) Gray image processing method
JP2006078299A (en) Image region dividing method by means of extracting image region
JP2006078285A (en) Substrate-inspecting apparatus and parameter-setting method and parameter-setting apparatus of the same
JP3803677B2 (en) Defect classification apparatus and defect classification method
JP3581040B2 (en) Wiring pattern inspection method
JP4812482B2 (en) Printing state inspection apparatus and printing state inspection method
JP4419778B2 (en) Substrate inspection device, parameter setting method and parameter setting device
JP2008292342A (en) Edge defect detecting method, program of the same, and detector
JP2004085543A (en) System and method for visual inspection
JP4275582B2 (en) Board inspection equipment
JPH0721372A (en) Picture detector

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090615

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090707

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090901

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100302

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100430

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100907

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101027

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110301

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110401

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4841819

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

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250