JP2019090643A - Inspection method, and inspection device - Google Patents

Inspection method, and inspection device Download PDF

Info

Publication number
JP2019090643A
JP2019090643A JP2017218157A JP2017218157A JP2019090643A JP 2019090643 A JP2019090643 A JP 2019090643A JP 2017218157 A JP2017218157 A JP 2017218157A JP 2017218157 A JP2017218157 A JP 2017218157A JP 2019090643 A JP2019090643 A JP 2019090643A
Authority
JP
Japan
Prior art keywords
pixel
value
captured image
defect
inspection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2017218157A
Other languages
Japanese (ja)
Inventor
優史 橋本
Yuji Hashimoto
優史 橋本
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2017218157A priority Critical patent/JP2019090643A/en
Publication of JP2019090643A publication Critical patent/JP2019090643A/en
Pending legal-status Critical Current

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

To provide an inspection method and an inspection device each of which enables a defect of an inspection object to be detected with higher degree of accuracy.SOLUTION: The inspection method for detecting a defect on the surface of an inspection object includes the steps of: acquiring a captured image of the inspection object; comparing, for each pixel of the captured image, the pixel value of each pixel adjacent to the pixel with the pixel value of the pixel, thereby calculating the gradient direction of the pixel value of the pixel; differentiating, for each pixel of the captured image, the pixel n orders or more (n=natural number 2 or greater) in the gradient direction of the pixel value of the pixel as the direction of differentiation, thereby calculating the n-order differential value of the pixel; and extracting a pixel, among the pixels of the captured image, whose absolute value of calculated n-order differential value is equal to or greater than a threshold, as the contour peripheral pixel of a defect of the inspection object.SELECTED DRAWING: Figure 2

Description

本開示は、検査対象物の表面上の欠陥を検出する検査方法、および検査装置に関する。   The present disclosure relates to an inspection method and an inspection apparatus for detecting a defect on the surface of an inspection object.

従来、量産製品の製造工程中あるいは製品完成後において、品質保証のために欠陥を外観検査する場合、人の目による目視検査またはカメラなどの画像認識による自動外観検査が行なわれている。自動外観検査は、目視検査と比較して装置価格および検査条件の設定等の初期コストが発生するが、属人性の排除、検査の再現性向上、検査時間の短縮、検査人員の教育および管理コストの削減等のメリットが大きいため、主に初期コストの採算が見込める規模の大きい製造現場へ普及している。特に、近年のコンピュータの演算処理能力と通信速度の向上、カメラの性能向上によってより高度な演算を用いた検査が現実的なタクトタイムで可能になってきている。   2. Description of the Related Art Conventionally, when a defect is inspected for quality assurance during a manufacturing process of a mass-produced product or after the product is completed, an automatic inspection is performed by visual inspection with human eyes or image recognition such as a camera. Automatic appearance inspection involves an initial cost such as equipment price and setting of inspection conditions compared to visual inspection, but elimination of personalities, improvement of inspection repeatability, shortening of inspection time, education of inspection personnel and management cost It is widely used in large-scale manufacturing sites where the initial cost can be expected to be profitable, because the merits such as the reduction of In particular, inspections using more advanced calculations have become possible with realistic tact times due to the recent improvement of the arithmetic processing capability and communication speed of computers and the improvement of camera performance.

検査対象の欠陥を画像認識によって検出する検査手法の一例として、特開2010−197176号公報(特許文献1)に係る欠陥検査方法が開示されている。欠陥検査方法では、撮像画像に対して各画素の濃度に基づく微分演算により各画素の微分絶対値が算出され、微分絶対値が規定値以上である画素がエッジ画素として抽出され、互いに隣接するエッジ画素の集合が位置検出用ランドとして抽出され、撮像画像の各画素に対して2値化を行なうことにより欠陥候補画素が抽出され、互いに隣接する欠陥候補画素の集合が欠陥候補ランドとして抽出され、欠陥候補ランドの画素数が計測され、欠陥候補ランドの画素数が画素数閾値未満である場合、検査対象物が良品であると判定される。   As an example of an inspection method for detecting a defect to be inspected by image recognition, a defect inspection method according to Japanese Unexamined Patent Publication No. 2010-197176 (Patent Document 1) is disclosed. In the defect inspection method, the differential absolute value of each pixel is calculated by differential operation based on the density of each pixel in the captured image, and the pixels whose differential absolute value is equal to or greater than a specified value are extracted as edge pixels and edges adjacent to each other A set of pixels is extracted as a position detection land, and by binarizing each pixel of the captured image, defect candidate pixels are extracted, and a set of defect candidate pixels adjacent to each other is extracted as a defect candidate land, The number of pixels of the defect candidate land is measured, and when the number of pixels of the defect candidate land is less than the pixel number threshold, it is determined that the inspection object is a non-defective item.

特開2010−197176号公報Unexamined-Japanese-Patent No. 2010-197176

特許文献1に係る技術では、微分フィルタを用いた微分演算処理によって画像内の各画素について隣接する8画素の濃度値に基づいて、X方向(横方向)の濃度変化ΔXと縦方向(Y方向)の濃度変化ΔYとを算出し、ΔXおよびΔYに基づいて微分絶対値および微分方向値を算出している。   In the technique according to Patent Document 1, the density change ΔX in the X direction (horizontal direction) and the vertical direction (Y direction) are made based on the density values of eight pixels adjacent to each pixel in the image by differential arithmetic processing using a differential filter. And the derivative absolute value and the derivative direction value are calculated based on .DELTA.X and .DELTA.Y.

しかしながら、特許文献1に係る技術によると、着目画素に対して、予め定められた方向(ここでは、X方向およびY方向)の濃度変化を用いて、微分演算が行われるため、背景の濃淡にばらつきがあり、欠陥と背景の濃淡の差が小さい場合には欠陥の輪郭を精度よく検出できない。また、背景の濃度勾配の大きさにばらつきがあり、例えば、画素の濃度値が、撮像画像の濃度最大値、欠陥の濃度、撮像画像の濃度最小値の順に高い場合、あるいは、撮像画像の濃度の微分値の最大値が、欠陥の濃度の微分値と同程度に大きい場合等には、背景と欠陥の輪郭部分との差が区別できず欠陥の輪郭を精度よく検出できない。   However, according to the technique according to Patent Document 1, the differential operation is performed on the pixel of interest using the density change in a predetermined direction (here, the X direction and the Y direction), so that If there is variation and the difference between the density of the defect and the background is small, the outline of the defect can not be detected accurately. In addition, the magnitude of the density gradient of the background varies, for example, when the density value of the pixel is higher in the order of the maximum density of the captured image, the density of the defect, and the minimum density of the captured image, or When the maximum value of the differential value of the defect is as large as the derivative value of the density of the defect, the difference between the background and the outline of the defect can not be distinguished, and the outline of the defect can not be detected with high accuracy.

本開示のある局面における目的は、各画素の画素値の勾配方向に基づく2階以上の微分演算を実行することにより、検査対象物の欠陥をより精度よく検出することが可能な検査方法、および検査装置を提供することである。   An object in one aspect of the present disclosure is an inspection method capable of detecting a defect of an inspection object more accurately by performing second or higher order differential operation based on the gradient direction of the pixel value of each pixel, and It is providing a test apparatus.

ある実施の形態に従うと、検査対象物の表面上の欠陥を検出する検査方法が提供される。検査方法は、検査対象物の撮像画像を取得するステップと、撮像画像の各画素について、当該画素の各隣接画素の画素値と当該画素の画素値とを比較することにより当該画素の画素値の勾配方向を算出するステップと、撮像画像の各画素について、当該画素の画素値の勾配方向を微分方向として当該画素をn(nは2以上の自然数)階以上微分して当該画素のn階微分値を算出するステップと、撮像画像の各画素のうち、算出されたn階微分値の絶対値が閾値以上である画素を、検査対象物の欠陥の輪郭周辺画素として抽出するステップとを含む。   According to one embodiment, an inspection method for detecting a defect on the surface of an inspection object is provided. The inspection method is a step of acquiring a captured image of the inspection object, and for each pixel of the captured image, comparing the pixel value of each adjacent pixel of the pixel with the pixel value of the pixel, In the step of calculating the gradient direction, for each pixel of the captured image, the pixel is graded n or more (n is a natural number of 2 or more) with the gradient direction of the pixel value of the pixel as the derivative direction A step of calculating a value, and a step of extracting a pixel having an absolute value of the calculated nth-order derivative value equal to or more than a threshold among pixels of the captured image as an outline peripheral pixel of a defect of the inspection object.

他の実施の形態に従うと、検査対象物の表面上の欠陥を検出する検査装置が提供される。検査装置は、検査対象物の撮像画像を取得する画像取得部と、撮像画像の各画素について、当該画素の各隣接画素の画素値と当該画素の画素値とを比較することにより当該画素の画素値の勾配方向を算出する方向算出部と、撮像画像の各画素について、当該画素の画素値の勾配方向を微分方向として当該画素をn(nは2以上の自然数)階以上微分して当該画素のn階微分値を算出する微分演算部と、撮像画像の各画素のうち、算出されたn階微分値の絶対値が閾値以上である画素を、検査対象物の欠陥の輪郭周辺画素として抽出する抽出部とを備える。   According to another embodiment, an inspection device for detecting a defect on the surface of an inspection object is provided. The inspection apparatus compares the pixel value of each pixel adjacent to the pixel with the pixel value of the pixel by comparing the pixel value of each pixel adjacent to the pixel with the image acquisition unit that acquires the imaged image of the inspection object. A direction calculation unit that calculates the gradient direction of the value, and for each pixel of the captured image, the pixel is differentiated by n (n is a natural number of 2 or more) floors with the gradient direction of the pixel value of the pixel as the differentiation direction Of the differential operation unit for calculating the nth-order differential value of the pixel, and pixels among the pixels of the captured image whose absolute value of the calculated n-order differential value is equal to or greater than the threshold are extracted as outline pixels of the defect of the inspection object And an extraction unit.

本開示によると、各画素の画素値の勾配方向に基づく2階以上の微分演算を実行することにより、検査対象物の欠陥をより精度よく検出することが可能となる。   According to the present disclosure, it is possible to detect a defect of the inspection object more accurately by executing the second or higher order differential operation based on the gradient direction of the pixel value of each pixel.

実施の形態1に従う検査システムの全体構成の一例を示す図である。FIG. 1 is a diagram showing an example of the entire configuration of an inspection system according to a first embodiment. 実施の形態1に従う検査方法の一例を示すフローチャートである。7 is a flowchart showing an example of an inspection method according to the first embodiment. 実施の形態1に従う方向算出工程を説明するための図である。FIG. 6 is a diagram for describing a direction calculation process according to the first embodiment. 実施の形態1に従う微分フィルタの一例を示す図である。FIG. 7 is a diagram showing an example of a differential filter according to the first embodiment. 実施の形態1に従う抽出工程を説明するための図である。5 is a diagram for illustrating an extraction process according to Embodiment 1. FIG. 実施の形態1に従う検査装置の機能構成の一例を示す模式図である。FIG. 5 is a schematic view showing an example of a functional configuration of the inspection apparatus according to the first embodiment. パワー半導体チップを示す概略図である。It is the schematic which shows a power semiconductor chip. パワー半導体チップの輝度勾配を説明するための概略図である。It is the schematic for demonstrating the brightness | luminance gradient of a power semiconductor chip. 主電極11の撮像画像を示す図である。It is a figure which shows the captured image of the main electrode 11. FIG. 図9の撮像画像のコントラストを強調した画像を示す図である。It is a figure which shows the image which emphasized the contrast of the captured image of FIG. 図9の線分K1K2上の画素の輝度を示す図である。It is a figure which shows the brightness | luminance of the pixel on line segment K1 K2 of FIG. 図3に示す撮像画像に対してX方向にソーベルフィルタを適用した微分処理後の値を輝度に変換した結果を示す図である。It is a figure which shows the result of having converted the value after the differential processing which applied the Sobel filter to the X direction with respect to the captured image shown in FIG. 3 to brightness | luminance. 図12の線分K1K2上の画素の微分値を示す図である。It is a figure which shows the differential value of the pixel on line segment K1 K2 of FIG. 図9に示す撮像画像に対して8方向ラプラシアンフィルタを適用した微分処理後の値を輝度に変換した結果を示す図である。It is a figure which shows the result of having converted the value after the differential processing which applied 8-direction Laplacian filter with respect to the captured image shown in FIG. 9 to brightness | luminance. 図14の線分K1K2上の画素の微分値を示す図である。It is a figure which shows the differential value of the pixel on line segment K1 K2 of FIG. 図9に示す撮像画像に平滑化処理を行なった場合の画像を示す図である。It is a figure which shows the image at the time of performing a smoothing process to the captured image shown in FIG. 図10に示す平滑化画像の各画素の1階微分値を輝度に変換した結果を示す図である。It is a figure which shows the result of having converted the 1st-order differential value of each pixel of the smooth image shown in FIG. 10 into luminance. 図17の線分K1K2上の画素の1階微分値を示す図である。It is a figure which shows the first-order differential value of the pixel on line segment K1 K2 of FIG. 図17に示す平滑化画像の各画素の2階微分値を輝度に変換した結果を示す図である。It is a figure which shows the result of having converted the 2nd-order differential value of each pixel of the smooth image shown in FIG. 17 into a brightness | luminance. 図19の線分K1K2上の画素の2階微分値を示す図である。FIG. 20 is a diagram showing second derivative values of pixels on line segment K1K2 in FIG. 19; 実施の形態1の変形例に従う複数の微分フィルタを示す図である。FIG. 7 is a diagram showing a plurality of differential filters according to a modification of the first embodiment. 図9に示す撮像画像の各画素の3階微分値を輝度に変換した結果を示す図である。It is a figure which shows the result of having converted the 3rd-order differential value of each pixel of the captured image shown in FIG. 9 into a brightness | luminance. 図22の線分K1K2上の画素の3階微分値を示す図である。It is a figure which shows the 3rd-order differential value of the pixel on line segment K1 K2 of FIG. 実施の形態2に従う輪郭周辺画素の集合体の抽出方式の一例を説明するための図である。FIG. 17 is a diagram for describing an example of an extraction method of a group of outline peripheral pixels according to the second embodiment. 実施の形態2に従う輪郭周辺画素の集合体の抽出方式の他の例を説明するための図である。FIG. 17 is a diagram for explaining another example of a method of extracting a set of contour peripheral pixels according to the second embodiment. 円状の欠陥の撮像画像、および撮像画像の微分値を示す図である。It is a figure which shows the derivative value of the captured image of a circular defect, and a captured image. 図26(c)に示す輪郭周辺画素を模式的に示す図である。It is a figure which shows typically the contour periphery pixel shown in FIG.26 (c). 輪郭周辺画素の集合体の抽出方式を説明するための図である。It is a figure for demonstrating the extraction system of the aggregate | assembly of an outline periphery pixel. 輪郭周辺画素の集合体の抽出方式を説明するための図である。It is a figure for demonstrating the extraction system of the aggregate | assembly of an outline periphery pixel.

以下、図面を参照しつつ、本発明の実施の形態について説明する。以下の説明では、同一の部品には同一の符号を付してある。それらの名称および機能も同じである。したがって、それらについての詳細な説明は繰り返さない。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following description, the same components are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed description about them will not be repeated.

実施の形態1.
<システム構成>
図1は、実施の形態1に従う検査システム1000の全体構成の一例を示す図である。図1を参照して、検査システム1000は、主要なコンポーネントとして、検査装置100と、検査装置100に接続されたカメラ8とを含む。
Embodiment 1
<System configuration>
FIG. 1 is a diagram showing an example of the entire configuration of inspection system 1000 according to the first embodiment. Referring to FIG. 1, inspection system 1000 includes, as main components, inspection apparatus 100 and camera 8 connected to inspection apparatus 100.

カメラ8は、一例として、レンズなどの光学系に加えて、CCD(Coupled Charged Device)またはCMOS(Complementary Metal Oxide Semiconductor)センサといった、複数の画素に区画された撮像素子を含んで構成される。カメラ8は、搬送機構9によって搬送される検査対象物10を順次撮像する。カメラ8による撮影によって取得された入力画像は、検査装置100へ伝送される。   As an example, the camera 8 is configured to include an imaging device divided into a plurality of pixels, such as a CCD (Coupled Charged Device) or a CMOS (Complementary Metal Oxide Semiconductor) sensor, in addition to an optical system such as a lens. The camera 8 sequentially images the inspection object 10 conveyed by the conveyance mechanism 9. An input image acquired by photographing with the camera 8 is transmitted to the inspection apparatus 100.

検査装置100は、検査プログラムを実行することで、検査対象物10の表面上に欠陥があるか否かを検査する。検査装置100においては、検査対象物10を撮像して得られた撮像画像の各画素の画素値を数値データ化し、位置座標と関連付けて演算を行なう。なお、画素値は、例えば、輝度階調、モノクローム(例えば、白黒)濃度階調に対応するものであっても、例えば、緑成分のような任意の色の階調に対応するものであってもよい。その階調数は、例えば、512または256であってもよい。以下では、説明の容易化のため、画素値は、輝度であるとして説明を行なう。   The inspection apparatus 100 inspects whether or not there is a defect on the surface of the inspection object 10 by executing an inspection program. In the inspection apparatus 100, the pixel value of each pixel of the captured image obtained by imaging the inspection object 10 is converted into numerical data, and calculation is performed in association with position coordinates. The pixel values correspond to, for example, gradations of any color such as a green component even if they correspond to, for example, luminance gradations and monochrome (for example, black and white) density gradations. It is also good. The number of gradations may be, for example, 512 or 256. In the following, for ease of explanation, it is assumed that the pixel value is luminance.

検査装置100による検査結果は、検査装置100のディスプレイ114に表示される。検査装置100は、典型的には、汎用的なコンピュータアーキテクチャに従う構造を有しており、予めインストールされたプログラムをプロセッサが実行することで、後述する各種の処理を実現する。   The inspection result by the inspection device 100 is displayed on the display 114 of the inspection device 100. The inspection apparatus 100 typically has a structure according to a general-purpose computer architecture, and the processor executes a pre-installed program to realize various processes to be described later.

具体的には、検査装置100は、プロセッサ110と、メモリ112と、ディスプレイ114と、カメラインターフェイス116と、入力インターフェイス118と、通信インターフェイス120と、メモリインターフェイス122とを含む。これらの各部は、互いにデータ通信可能に接続される。   Specifically, the inspection apparatus 100 includes a processor 110, a memory 112, a display 114, a camera interface 116, an input interface 118, a communication interface 120, and a memory interface 122. These units are communicably connected to each other.

プロセッサ110は、典型的には、CPU(Central Processing Unit)、MPU(Multi Processing Unit)等といった演算処理部である。プロセッサ110は、メモリ112に記憶されたプログラムを読み出して実行することで、検査装置100の各部の動作を制御する。より詳細にはプロセッサ110は、当該プログラムを実行することによって、後述する検査装置100の処理(ステップ)の各々を実現する。   The processor 110 is typically an arithmetic processing unit such as a central processing unit (CPU) or a multi processing unit (MPU). The processor 110 controls the operation of each part of the inspection apparatus 100 by reading and executing the program stored in the memory 112. More specifically, the processor 110 implements each of the processing (steps) of the inspection apparatus 100 described later by executing the program.

メモリ112は、RAM(Random Access Memory)、ROM(Read-Only Memory)、フラッシュメモリ、ハードディスクなどによって実現される。メモリ112は、プロセッサ110によって実行されるプログラム、カメラ8によって取得された入力画像、入力画像に対する処理結果等を記憶する。   The memory 112 is realized by a random access memory (RAM), a read-only memory (ROM), a flash memory, a hard disk, or the like. The memory 112 stores a program executed by the processor 110, an input image acquired by the camera 8, a processing result on the input image, and the like.

ディスプレイ114は、例えば、液晶ディスプレイ、有機EL(Electro Luminescence)ディスプレイ等である。ディスプレイ114は、検査装置100と一体的に構成されてもよいし、検査装置100とは別個に構成されてもよい。   The display 114 is, for example, a liquid crystal display, an organic EL (Electro Luminescence) display, or the like. The display 114 may be configured integrally with the inspection apparatus 100 or may be configured separately from the inspection apparatus 100.

カメラインターフェイス116は、検査対象物10を撮像することで生成された画像データを受け付ける入力部に相当し、プロセッサ110とカメラ8との間のデータ伝送を仲介する。より具体的には、カメラインターフェイス116は、1つ以上のカメラ8と接続が可能であり、プロセッサ110からカメラインターフェイス116を介してカメラ8に撮像指示が出力される。これにより、カメラ8は、被写体を撮像し、生成された画像をカメラインターフェイス116を介してプロセッサ110に出力する。   The camera interface 116 corresponds to an input unit that receives image data generated by imaging the inspection object 10, and mediates data transmission between the processor 110 and the camera 8. More specifically, the camera interface 116 can be connected to one or more cameras 8, and an imaging instruction is output from the processor 110 to the camera 8 via the camera interface 116. Thus, the camera 8 captures an object and outputs the generated image to the processor 110 via the camera interface 116.

入力インターフェイス118は、プロセッサ110とキーボード、マウス、タッチパネル、専用コンソールなどの入力装置との間のデータ伝送を仲介する。すなわち、入力インターフェイス118は、ユーザが入力装置を操作することで与えられる操作指令を受け付ける。   The input interface 118 mediates data transmission between the processor 110 and input devices such as a keyboard, a mouse, a touch panel, and a dedicated console. That is, the input interface 118 receives an operation command given by the user operating the input device.

通信インターフェイス120は、プロセッサ110と図示しない他のパーソナルコンピュータおよびサーバ装置などとの間のデータ伝送を仲介する。通信インターフェイス120は、典型的には、イーサネット(登録商標)、USB(Universal Serial Bus)などからなる。   The communication interface 120 mediates data transmission between the processor 110 and other personal computers and server devices (not shown). The communication interface 120 is typically made of Ethernet (registered trademark), USB (Universal Serial Bus), or the like.

メモリインターフェイス122は、プロセッサ110と外部の記録媒体との間のデータ伝送を仲介する。記録媒体には、検査装置100で実行される検査プログラムが格納された状態で流通し、メモリインターフェイス122は、この記録媒体から検査プログラムを読み出す。また、メモリインターフェイス122は、プロセッサ110の内部指令に応答して、カメラ8によって取得された入力画像、検査装置100における処理結果等を記録媒体へ書き込む。なお、記録媒体としては、SD(Secure Digital)などの汎用的な半導体記憶デバイス、フレキシブルディスク(Flexible Disk)などの磁気記録媒体、CD−ROM(Compact Disk Read Only Memory)などの光学記録媒体等が挙げられる。   The memory interface 122 mediates data transmission between the processor 110 and an external recording medium. The recording medium is distributed in a state in which the inspection program to be executed by the inspection apparatus 100 is stored, and the memory interface 122 reads the inspection program from the recording medium. Further, in response to the internal command of the processor 110, the memory interface 122 writes the input image acquired by the camera 8, the processing result in the inspection apparatus 100, and the like to the recording medium. As the recording medium, a general-purpose semiconductor storage device such as SD (Secure Digital), a magnetic recording medium such as a flexible disk (Flexible Disk), an optical recording medium such as a CD-ROM (Compact Disk Read Only Memory), etc. It can be mentioned.

<検査方法の概要>
図2は、実施の形態1に従う検査方法の一例を示すフローチャートである。典型的には、図2に示すフローチャートは、検査装置100のプロセッサ110により実行される。
<Overview of inspection method>
FIG. 2 is a flowchart showing an example of the inspection method according to the first embodiment. Typically, the flowchart shown in FIG. 2 is executed by the processor 110 of the inspection apparatus 100.

図2を参照して、検査方法は、検査対象物10の撮像画像を取得するステップS100(以下、「取得工程」とも称する。)を含む。   Referring to FIG. 2, the inspection method includes step S <b> 100 (hereinafter, also referred to as “acquisition process”) of acquiring a captured image of inspection object 10.

検査方法は、取得された撮像画像を標準化するステップS200(以下、「標準化工程」とも称する。)を含む。   The inspection method includes step S200 (hereinafter, also referred to as a “standardization step”) of standardizing the acquired captured image.

検査方法は、標準化された撮像画像の各画素について、当該画素の各隣接画素の画素値と当該画素の画素値とを比較することにより当該画素の画素値の勾配方向を算出するステップS300(以下、「方向算出工程」とも称する。)を含む。   The inspection method calculates the gradient direction of the pixel value of the pixel by comparing the pixel value of each pixel adjacent to the pixel with the pixel value of the pixel for each pixel of the standardized captured image (see below. , Also referred to as “direction calculation step”.

検査方法は、撮像画像の各画素について、当該画素の画素値の勾配方向を微分方向として当該画素を2階微分して当該画素の2階微分値を算出するステップS400(以下、「微分演算工程」とも称する。)を含む。   In the inspection method, for each pixel of the captured image, second-order differentiation of the pixel is performed with the gradient direction of the pixel value of the pixel as a differentiation direction to calculate a second-order derivative value of the pixel (hereinafter, “differentiation operation step Also referred to as

検査方法は、撮像画像の各画素のうち、算出された2階微分値が予め定められた閾値以上である画素を、検査対象物10の欠陥の輪郭周辺画素として抽出するステップS500(以下、「抽出工程」とも称する。)を含む。   In the inspection method, a pixel having a calculated second derivative value equal to or greater than a predetermined threshold value among the pixels of the captured image is extracted as an outline peripheral pixel of the defect of the inspection object 10 (hereinafter referred to as “ Also referred to as “extraction step”.

検査方法は、抽出された輪郭周辺画素に基づいて、検査対象物10に欠陥が存在するか否かを判定するステップS600(以下、「判定工程」とも称する。)を含む。   The inspection method includes step S600 (hereinafter, also referred to as “determination step”) of determining whether a defect is present in the inspection object 10 based on the extracted outline peripheral pixels.

以下、実施の形態1に従う検査方法について工程ごとに具体的に説明する。
<検査方法の各工程の詳細>
(取得工程)
ステップS100に対応する取得工程では、典型的には、まず、プロセッサ110により、カメラインターフェイス116を介して撮像指示が出力される。カメラ8は、当該撮像指示に従って検査対象物10を撮像し、検査対象物10の撮像画像を出力する。プロセッサ110は、カメラインターフェイス116を介して、当該撮像画像の入力を受け付けて(すなわち、撮像画像を取得して)、当該撮像画像をメモリ112に記憶する。
Hereinafter, the inspection method according to the first embodiment will be specifically described step by step.
<Details of each step of inspection method>
(Acquisition process)
In the acquisition step corresponding to step S100, typically, the processor 110 first outputs an imaging instruction via the camera interface 116. The camera 8 images the inspection object 10 in accordance with the imaging instruction, and outputs a captured image of the inspection object 10. The processor 110 receives an input of the captured image through the camera interface 116 (that is, acquires the captured image), and stores the captured image in the memory 112.

(標準化工程)
ステップS200に対応する標準化工程では、典型的には、プロセッサ110は、取得された撮像画像に対して平滑化処理を実行して、標準化後の撮像画像に対応する平滑化画像を生成する。平滑化処理に用いられる平滑化フィルタは、例えば、ガウシアンフィルタ、メディアンフィルタ、移動平均フィルタ等である。
(Standardization process)
In the standardization step corresponding to step S200, typically, the processor 110 executes a smoothing process on the acquired captured image to generate a smoothed image corresponding to the captured image after standardization. The smoothing filter used for the smoothing process is, for example, a Gaussian filter, a median filter, a moving average filter, or the like.

他の例として、標準化工程では、事前に用意した少なくとも1つの検査対象物10の撮像画像を用いて、取得工程で取得された撮像画像を標準化してもよい。例えば、少なくとも1つの検査対象物10の撮像画像は、メモリ112に記憶されている。   As another example, in the standardization step, the pickup image acquired in the acquisition step may be standardized using the pickup image of at least one inspection object 10 prepared in advance. For example, a captured image of at least one inspection object 10 is stored in the memory 112.

具体的には、プロセッサ110は、複数の撮像画像における各画素の画素値(例えば、輝度)の平均値を算出し、当該平均値を各画素の輝度とした標準画像ST1を生成する。詳細には、プロセッサ110は、上記少なくとも1つの撮像画像および取得工程で取得された撮像画像を重ね合わせ、これら複数の撮像画像において、同一座標位置に存在する各画素の輝度の平均値を算出する。プロセッサ110は、算出された各画素の輝度の平均値を、各画素の輝度とする標準画像ST1を生成する。標準画像ST1は、取得工程で取得された撮像画像を標準化した画像である。   Specifically, the processor 110 calculates an average value of pixel values (for example, luminance) of each pixel in a plurality of captured images, and generates a standard image ST1 with the average value as the luminance of each pixel. Specifically, the processor 110 superimposes the at least one captured image and the captured image acquired in the acquisition step, and calculates an average value of the luminance of each pixel present at the same coordinate position in the plurality of captured images. . The processor 110 generates a standard image ST1 in which the calculated average value of the luminance of each pixel is used as the luminance of each pixel. The standard image ST1 is an image obtained by standardizing the captured image acquired in the acquisition step.

また、プロセッサ110は、複数の撮像画像における各画素の輝度の中央値を算出し、当該中央値を各画素の輝度とした標準画像ST2を生成してもよい。詳細には、プロセッサ110は、上記少なくとも1つの撮像画像および取得工程で取得された撮像画像を重ね合わせ、これら複数の撮像画像において、同一座標位置に存在する各画素の輝度の中央値を算出する。プロセッサ110は、算出された各画素の輝度の中央値を、各画素の輝度とする標準画像ST2を生成する。標準画像ST2は、取得工程で取得された撮像画像を標準化した画像である。   Also, the processor 110 may calculate a median of the luminance of each pixel in a plurality of captured images, and generate a standard image ST2 in which the median is the luminance of each pixel. Specifically, the processor 110 superimposes the at least one captured image and the captured image acquired in the acquiring step, and calculates the median value of the luminance of each pixel present at the same coordinate position in the plurality of captured images. . The processor 110 generates a standard image ST2 in which the calculated median value of the luminance of each pixel is used as the luminance of each pixel. The standard image ST2 is an image obtained by standardizing the captured image acquired in the acquisition step.

上記のように、3種類の標準化工程について説明した。例えば、撮像画像が1つの場合、あるいは、個別の製品ごとに輝度勾配の傾向がなくランダムな場合には、平滑化処理を用いた標準化が好ましい。   As described above, three types of standardization steps have been described. For example, in the case where there is one captured image or in the case where there is no tendency of the brightness gradient for each individual product and it is random, standardization using a smoothing process is preferable.

あるいは、輝度のばらつきの傾向が検査対象の製品間で同一である場合には、平均値を利用した標準化、あるいは中央値を利用した標準化が好ましい。なぜなら、同一の傾向を重ね合わせて処理することにより、製品固有のばらつきに起因する影響で輝度勾配がずれてしまう事態を防ぐことができるためである。   Alternatively, in the case where the tendency of variation in luminance is the same among products to be inspected, standardization using an average value or standardization using a median value is preferable. The reason is that by processing the same tendency in an overlapping manner, it is possible to prevent a situation in which the brightness gradient is shifted due to the influence of the inherent variation of the product.

特に、撮像画像の背景と欠陥の輝度の差が小さい場合には、平均値を利用した標準化が好ましい。なぜなら、輝度勾配方向を算出するために、小数点以下の輝度の差を利用できるためである。一方、撮像画像のサンプル数が多く(例えば、数十以上)、背景と欠陥の輝度の差が予め定められた値(例えば、5cd/m^2)以上ある場合には、中央値を利用した標準化が好ましい。なぜなら、輝度の中央値を利用することにより、輝度のばらつきの影響を抑えることができるためである。   In particular, when the difference in luminance between the background of the captured image and the defect is small, standardization using an average value is preferable. This is because the difference in luminance below the decimal point can be used to calculate the luminance gradient direction. On the other hand, when the number of samples of the captured image is large (for example, several tens or more) and the difference between the luminance of the background and the defect is a predetermined value or more (for example, 5 cd / m 2), the median is used. Standardization is preferred. This is because the influence of variations in luminance can be suppressed by using the central value of luminance.

(方向算出工程)
ステップS300に対応する方向算出工程では、プロセッサ110は、標準化工程において標準化された撮像画像の各画素について、当該画素の輝度と、当該画素に隣接する8画素の各々の輝度との差分値を算出する。
(Direction calculation process)
In the direction calculation step corresponding to step S300, the processor 110 calculates, for each pixel of the captured image standardized in the standardization step, a difference value between the brightness of the pixel and the brightness of each of the eight pixels adjacent to the pixel. Do.

図3は、実施の形態1に従う方向算出工程を説明するための図である。図3を参照して、画素P5を着目画素とすると、8つの画素P1〜P4,P6〜P9が画素P5の隣接画素となる。プロセッサ110は、各隣接画素P1〜P4,P6〜P9について、当該隣接画素の輝度と画素P5の輝度との差分値を算出する。プロセッサ110は、画素P5から、8つの差分値のうちの最も大きい差分値に対応する隣接画素への方向を、画素P5の輝度勾配方向として算出する。   FIG. 3 is a diagram for explaining a direction calculation process according to the first embodiment. Referring to FIG. 3, assuming that the pixel P5 is a pixel of interest, eight pixels P1 to P4 and P6 to P9 are adjacent pixels to the pixel P5. The processor 110 calculates, for each of the adjacent pixels P1 to P4 and P6 to P9, a difference value between the luminance of the adjacent pixel and the luminance of the pixel P5. The processor 110 calculates the direction from the pixel P5 to the adjacent pixel corresponding to the largest difference value among the eight difference values as the brightness gradient direction of the pixel P5.

例えば、プロセッサ110は、画素P5の各隣接画素P1〜P4,P6〜P9のうちの隣接画素P7の輝度と画素P5の輝度との差分値が、各隣接画素P1〜P4,P6〜P9のうちの残余の隣接画素P1〜P4,P6,P8,P9の輝度と画素P5の輝度との差分値よりも大きい場合、画素P5から隣接画素P7への方向300を、画素P5の輝度勾配方向として算出する。   For example, in the processor 110, the difference value between the luminance of the adjacent pixel P7 among the adjacent pixels P1 to P4 and P6 to P9 of the pixel P5 and the luminance of the pixel P5 is the difference between the adjacent pixels P1 to P4 and P6 to P9. The direction 300 from the pixel P5 to the adjacent pixel P7 is calculated as the brightness gradient direction of the pixel P5 when the difference value between the brightness of the remaining adjacent pixels P1 to P4, P6, P8 and P9 and the brightness of the pixel P5 is larger. Do.

なお、8つの差分値のうちの複数の差分値が同一となり最も大きい差分値が一意に定まらない場合には、画素P5から、当該複数の差分値のいずれかの差分値に対応する隣接画素への方向が、画素P5の輝度勾配方向として算出される。この場合、予め定められた方向の順に優先順位を設けておいてもよい。   If the plurality of difference values among the eight difference values are the same and the largest difference value is not determined uniquely, the pixel P5 is changed to the adjacent pixel corresponding to any difference value of the plurality of difference values. Is calculated as the luminance gradient direction of the pixel P5. In this case, priorities may be provided in the order of predetermined directions.

ここで、画素P5から隣接画素P8への方向、画素P5から隣接画素P7への方向、画素P5から隣接画素P4への方向、画素P5から隣接画素P1への方向、画素P5から隣接画素P2への方向、画素P5から隣接画素P2への方向、画素P5から隣接画素P3への方向、画素P5から隣接画素P6への方向、画素P5から隣接画素P9への方向を、それぞれ(1,0)、(1,1)、(0,1)、(−1,1)、(−1,0)、(−1,−1)、(0,−1)、(1,−1)と表わす。   Here, the direction from the pixel P5 to the adjacent pixel P8, the direction from the pixel P5 to the adjacent pixel P7, the direction from the pixel P5 to the adjacent pixel P4, the direction from the pixel P5 to the adjacent pixel P1, and the direction from the pixel P5 to the adjacent pixel P2. (1,0), the direction from pixel P5 to adjacent pixel P2, the direction from pixel P5 to adjacent pixel P3, the direction from pixel P5 to adjacent pixel P6, and the direction from pixel P5 to adjacent pixel P9 (1,0) , (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, 1) .

例えば、方向(0,1)から右回り順、すなわち、方向(0,1)、方向(1,1)、方向(1,0)、方向(1,−1)、方向(0,−1)、方向(−1,−1)、方向(−1,0)、方向(−1,1)の順に優先順位が高く設定される。プロセッサ110は、最も大きい差分値が一意に定まらない場合には、上記優先順位が最も高い方向を、画素P5の輝度勾配方向として算出する。   For example, from the direction (0,1) to the clockwise order, that is, the direction (0,1), the direction (1,1), the direction (1,0), the direction (1, -1), the direction (0, -1) The priority is set to be higher in the order of (1), direction (−1, −1), direction (−1, 0), direction (−1, 1). If the largest difference value is not uniquely determined, the processor 110 calculates the direction with the highest priority as the luminance gradient direction of the pixel P5.

(微分演算工程)
ステップS400に対応する微分演算工程では、まず、プロセッサ110は、方向算出工程において算出された各画素の輝度勾配方向を微分方向として、図4に示す微分フィルタを用いて各画素の1階微分値を算出する。
(Differential operation process)
In the differentiation operation process corresponding to step S400, first, processor 110 sets the luminance gradient direction of each pixel calculated in the direction calculation process as the differentiation direction, and uses the differentiation filter shown in FIG. Calculate

図4は、実施の形態1に従う微分フィルタの一例を示す図である。図4(a)は、座標(x,y)の画素の輝度Cx,yを示す図である。図4(b)は、微分フィルタの一例を示す図である。図4(c)は、微分フィルタの他の例を示す図である。 FIG. 4 is a diagram showing an example of the differential filter according to the first embodiment. FIG. 4A shows the luminance C x, y of the pixel at coordinates (x, y). FIG. 4B is a diagram showing an example of the differential filter. FIG. 4C shows another example of the differential filter.

例えば、方向算出工程において、座標(x,y)の画素の輝度勾配方向が方向(1,1)である場合には、図4(b)の微分フィルタ401を用いて、輝度Cx,yの1階微分値Dx,yは、以下の式(1)で表される。 For example, in the direction calculation step, when the luminance gradient direction of the pixel at the coordinate (x, y) is the direction (1, 1), the luminance C x, y is calculated using the differential filter 401 of FIG. The first order differential value D x, y of is expressed by the following equation (1).

x,y=2×Cx+1,y+1+Cx+1,y+Cx,y+1−(2×Cx−1,y−1+Cx−1,y+Cx,y−1)・・・(1)
また、例えば、方向算出工程において、座標(x,y)の画素の輝度勾配方向が方向(1,0)である場合には、図4(c)の微分フィルタ402を用いて、輝度Cx,yの1階微分値Dx,yは、以下の式(2)で表される。
D x, y = 2 x C x +1, y + 1 + C x +1, y + C x, y + 1- (2 x C x -1, y -1 + C x -1, y + C x, y-1 ) (1)
Also, for example, in the direction calculation step, when the brightness gradient direction of the pixel at the coordinates (x, y) is the direction (1, 0), the brightness C x is obtained using the differential filter 402 of FIG. , first order differential value D x of y, y is expressed by the following equation (2).

x,y=2×Cx+1,y+Cx+1,y−1+Cx,y+1−(2×Cx−1,y+Cx−1,y+1+Cx,y−1)・・・(2)
なお、座標(x,y)の画素の輝度勾配方向が方向(−1,1)である場合には、微分フィルタ401を90度回転(すなわち、左回りに90度回転)させた微分フィルタを用いて微分演算が実行される。同様に、輝度勾配方向が方向(−1,−1)、方向(1,−1)である場合には、それぞれ、微分フィルタ401を180度、270度回転させた微分フィルタを用いて微分演算が実行される。
D x, y = 2 x C x +1, y + C x +1, y-1 + C x, y + 1- (2 x C x -1, y + C x -1, y + 1 + C x, y-1 ) (2)
When the luminance gradient direction of the pixel at the coordinates (x, y) is the direction (-1, 1), the differential filter 401 is rotated 90 degrees (that is, rotated 90 degrees counterclockwise). Differential operations are performed using this. Similarly, when the luminance gradient direction is the direction (-1, -1) or the direction (1, -1), the differential operation is performed using the differential filter obtained by rotating the differential filter 401 by 180 degrees and 270 degrees, respectively. Is executed.

また、輝度勾配方向が方向(0,1)である場合には、微分フィルタ402を90度回転させた微分フィルタを用いて微分演算が実行される。同様に、輝度勾配方向が方向(−1,0)、方向(0,−1)である場合には、それぞれ、微分フィルタ402を180度、270度回転させた微分フィルタを用いて微分演算が実行される。   When the luminance gradient direction is the direction (0, 1), the differential operation is performed using a differential filter obtained by rotating the differential filter 402 by 90 degrees. Similarly, when the brightness gradient direction is the direction (-1, 0) or the direction (0, -1), the differential operation is performed using the differential filter obtained by rotating the differential filter 402 by 180 degrees and 270 degrees, respectively. To be executed.

次に、プロセッサ110は、上記のように算出した各画素の1階微分値を、輝度勾配方向にさらに微分して各画素の2階微分値を算出する。   Next, the processor 110 further differentiates the first order differential value of each pixel calculated as described above in the brightness gradient direction to calculate the second order differential value of each pixel.

例えば、画素の輝度勾配方向が方向(1,1)である場合には、図4(b)の微分フィルタ401を用いて、1階微分値Dx,yを微分した2階微分値DDx,yは、以下の式(3)で表される。 For example, when the luminance gradient direction of the pixel is the direction (1, 1), the second order differential value DD x obtained by differentiating the first order differential value D x, y using the differential filter 401 of FIG. , Y is represented by the following formula (3).

DDx,y=2×Dx+1,y+1+Dx+1,y+Dx,y+1−(2×Dx−1,y−1+Dx−1,y+Dx,y−1)・・・(3)
(抽出工程)
ステップS500に対応する抽出工程では、プロセッサ110は、微分算出工程において算出された各画素の2階微分値が閾値Th以上であるか否かを判定する。プロセッサ110は、各画素のうち、2階微分値が閾値Th以上となる画素を、検査対象物10の表面上の欠陥の輪郭周辺画素として抽出する。
DD x, y = 2 x D x +1, y + 1 + D x +1, y + D x, y + 1- (2 x D x-1, y-1 + D x-1, y + D x, y-1 ) (3)
(Extraction process)
In the extraction process corresponding to step S500, the processor 110 determines whether the second-order differential value of each pixel calculated in the differential calculation process is equal to or more than the threshold value Th. The processor 110 extracts a pixel whose second derivative value is equal to or more than the threshold value Th among the pixels as a contour peripheral pixel of a defect on the surface of the inspection object 10.

図5は、実施の形態1に従う抽出工程を説明するための図である。具体的には、図5(a)は、検査対象物10の欠陥51を含む撮像画像のイメージ図である。図5(b)は、撮像画像の点Q1および点Q2を結ぶ線分Q1Q2上に存在する座標に対応する画素の輝度を示す図である。図5(c)は、線分Q1Q2上に存在する座標に対応する画素の1階微分値の絶対値(以下、「1階微分絶対値」とも称する。)を示す図である。図5(d)は、線分Q1Q2上に存在する座標に対応する画素の2階微分値の絶対値(以下、「2階微分絶対値」とも称する。)を示す図である。   FIG. 5 is a diagram for explaining an extraction process according to the first embodiment. Specifically, FIG. 5A is an image view of a captured image including the defect 51 of the inspection object 10. FIG. 5B is a diagram showing the luminance of the pixel corresponding to the coordinates present on the line segment Q1Q2 connecting the point Q1 and the point Q2 of the captured image. FIG. 5C is a diagram showing an absolute value (hereinafter, also referred to as “first-order derivative absolute value”) of the first-order derivative value of the pixel corresponding to the coordinates present on the line segment Q1Q2. FIG. 5D is a diagram showing an absolute value (hereinafter also referred to as "second-order derivative absolute value") of a second-order derivative value of a pixel corresponding to a coordinate existing on the line segment Q1Q2.

図5(a)および図5(b)を参照して、撮像画像において、全体的に点Q1から点Q2に向かって輝度が大きく(すなわち、明るく)なっているが、欠陥51が存在している部分においては、輝度がほぼ一定となっている。図5(c)を参照して、線分Q1Q2上の点Qaおよび点Qbにおいて、1階微分絶対値のピーク値が算出されている。欠陥51の輪郭画素の輝度は、背景の輝度との差が大きくなるため、輪郭画素の1階微分絶対値は大きくなる。そのため、1階微分絶対値のピーク位置に対応する点Qa,Qbは輪郭画素の座標を示している。   Referring to FIGS. 5A and 5B, in the captured image, the luminance is generally high (ie bright) from point Q1 to point Q2, but there is a defect 51. The brightness is almost constant in the part where the Referring to FIG. 5C, the peak value of the first-order differential absolute value is calculated at point Qa and point Qb on line segment Q1Q2. The difference between the luminance of the contour pixel of the defect 51 and the luminance of the background is large, so the first-order differential absolute value of the contour pixel is large. Therefore, points Qa and Qb corresponding to the peak position of the first order differential absolute value indicate the coordinates of the contour pixel.

図5(d)を参照して、線分Q1Q2上の点Qc,Qd,Qe,Qfにおいて、2階微分絶対値のピーク値が算出されている。なお、輪郭画素の座標を示す点Qa,Qbにおいては、1階微分絶対値がピーク値であるため2階微分絶対値は0となっている。このことから、閾値Th以上の2階微分絶対値を有する画素は、輪郭画素の周辺に存在する画素、すなわち、欠陥51の輪郭周辺画素として抽出される。閾値Thは、検査対象物10の欠陥の存在の有無の判定基準に応じてユーザにより任意に決定される。例えば、より厳しい判定基準を適用する場合には、閾値Thを小さくして輪郭周辺画素を抽出され易くすればよい。   Referring to FIG. 5D, at points Qc, Qd, Qe, and Qf on line segment Q1Q2, peak values of second-order differential absolute values are calculated. At points Qa and Qb indicating the coordinates of the contour pixel, the first derivative absolute value is a peak value, and the second derivative absolute value is zero. From this, a pixel having a second derivative absolute value equal to or larger than the threshold value Th is extracted as a pixel existing around the contour pixel, that is, as a contour peripheral pixel of the defect 51. The threshold Th is arbitrarily determined by the user according to the determination criterion of the presence or absence of the defect of the inspection object 10. For example, in the case of applying a stricter determination criterion, the threshold value Th may be reduced to facilitate extraction of contour peripheral pixels.

(判定工程)
ステップS600に対応する欠陥の有無の判定工程では、プロセッサ110は、抽出工程において抽出された輪郭周辺画素に基づいて、欠陥が検出されたか否かを判定する。ある局面では、プロセッサ110は、輪郭周辺画素が抽出された場合には、検査対象物10の表面上に欠陥が存在する(すなわち、欠陥が検出された)と判定してもよい。
(Judgment process)
In the process of determining the presence or absence of a defect corresponding to step S600, the processor 110 determines whether or not a defect is detected based on the contour peripheral pixels extracted in the extraction process. In one aspect, processor 110 may determine that a defect is present on the surface of inspection object 10 (ie, a defect has been detected) if contour peripheral pixels are extracted.

他の局面では、プロセッサ110は、互いに隣接する輪郭周辺画素の集合体の画素数が基準画素数以上である場合に、欠陥が存在すると判定してもよい。この場合、輪郭周辺画素の集合体が欠陥として検出される。さらに他の局面では、プロセッサ110は、互いに隣接する輪郭周辺画素の集合体によって取り囲まれる領域に含まれる画素数が基準画素数以上である場合に、欠陥が存在すると判定してもよい。この場合、輪郭周辺画素の集合体によって取り囲まれる領域が欠陥として検出される。   In another aspect, the processor 110 may determine that a defect is present if the number of pixels of a collection of contour peripheral pixels adjacent to each other is equal to or greater than the reference pixel number. In this case, a collection of outline peripheral pixels is detected as a defect. In yet another aspect, the processor 110 may determine that a defect is present if the number of pixels included in the area surrounded by the collection of neighboring contour peripheral pixels is equal to or greater than the reference number of pixels. In this case, a region surrounded by a set of contour peripheral pixels is detected as a defect.

<検査装置100の機能構成>
図6は、実施の形態1に従う検査装置100の機能構成の一例を示す模式図である。図6を参照して、検査装置100は、画像取得部202と、標準化処理部204と、方向算出部206と、微分演算部208と、抽出部210と、判定部212とを含む。これらの各機能は、例えば、プロセッサ110がメモリ112に格納されたプログラムを実行することによって実現される。なお、これらの機能の一部または全部はハードウェアで実現されるように構成されていてもよい。
<Functional Configuration of Inspection Device 100>
FIG. 6 is a schematic diagram showing an example of a functional configuration of inspection apparatus 100 according to the first embodiment. Referring to FIG. 6, inspection apparatus 100 includes an image acquisition unit 202, a standardization processing unit 204, a direction calculation unit 206, a differential operation unit 208, an extraction unit 210, and a determination unit 212. Each of these functions is implemented by, for example, the processor 110 executing a program stored in the memory 112. Note that some or all of these functions may be configured to be realized by hardware.

画像取得部202は、カメラインターフェイス116を介して、カメラ8によって撮像された検査対象物10の撮像画像を取得して、当該撮像画像をメモリ112に記憶する。画像取得部202は、上記の取得工程を実行するための機能構成である。   The image acquisition unit 202 acquires a captured image of the inspection object 10 captured by the camera 8 via the camera interface 116, and stores the captured image in the memory 112. The image acquisition unit 202 is a functional configuration for executing the above-described acquisition process.

標準化処理部204は、画像取得部202により取得された撮像画像に対して標準化処理を実行する。典型的には、標準化処理部204は、撮像画像に対して平滑化処理を実行して、標準化後の撮像画像に対応する平滑化画像を生成する。標準化処理部204は、複数の撮像画像を用いて平均値を利用した標準化処理、あるいは中央値を利用した標準化処理を実行してもよい。標準化処理部204は、上記の標準化工程を実行するための機能構成である。   The standardization processing unit 204 performs standardization processing on the captured image acquired by the image acquisition unit 202. Typically, the standardization processing unit 204 performs smoothing processing on the captured image to generate a smoothed image corresponding to the captured image after standardization. The standardization processing unit 204 may execute a standardization process using an average value using a plurality of captured images or a standardization process using a median value. The standardization processing unit 204 is a functional configuration for executing the above-described standardization process.

方向算出部206は、標準化された撮像画像の各画素について、当該画素の各隣接画素の輝度と当該画素の輝度とを比較することにより当該画素の輝度勾配方向を算出する。具体的には、方向算出部206は、標準化後の撮像画像の各画素について、当該画素(例えば、画素P5)の各隣接画素(例えば、隣接画素P1〜P4,P6〜P9)のうちの第1隣接画素(例えば、隣接画素P7)の輝度と当該画素の輝度との差分が、各隣接画素のうちの残余の隣接画素(例えば、隣接画素P1〜P4,P6,P8,P9)の輝度と当該画素の輝度との差分よりも大きい場合、当該画素から第1隣接画素への方向(例えば、方向300)を、当該画素の輝度勾配方向として算出する。方向算出部206は、上記の方向算出工程を実行するための機能構成である。   The direction calculation unit 206 calculates, for each pixel of the standardized captured image, the luminance gradient direction of the pixel by comparing the luminance of each adjacent pixel of the pixel with the luminance of the pixel. Specifically, for each pixel of the captured image after standardization, the direction calculation unit 206 selects one of the adjacent pixels (for example, adjacent pixels P1 to P4 and P6 to P9) of the pixel (for example, the pixel P5). The difference between the luminance of one adjacent pixel (for example, the adjacent pixel P7) and the luminance of the corresponding pixel is the difference between the luminance of the corresponding pixel and the luminance of the remaining adjacent pixels (for example, adjacent pixels P1 to P4, P6, P8, P9) among the adjacent pixels. If it is larger than the difference with the luminance of the pixel, the direction (for example, the direction 300) from the pixel to the first adjacent pixel is calculated as the luminance gradient direction of the pixel. The direction calculation unit 206 is a functional configuration for executing the above-described direction calculation process.

微分演算部208は、標準化後の撮像画像の各画素について、当該画素の輝度勾配方向を微分方向として当該画素を2階微分して当該画素の2階微分値を算出する。典型的には、微分演算部208は、輝度勾配方向(すなわち、微分方向)に応じた図4に示す微分フィルタを用いて微分演算を実行する。微分演算部208は、上記の微分演算工程を実行するための機能構成である。   The differential operation unit 208 calculates, for each pixel of the imaged image after standardization, second-order differentiation of the pixel by using the luminance gradient direction of the pixel as a differentiation direction to calculate a second-order differential value of the pixel. Typically, the differential operation unit 208 executes the differential operation using the differential filter shown in FIG. 4 according to the luminance gradient direction (that is, the differential direction). The differential operation unit 208 is a functional configuration for executing the above-described differential operation process.

抽出部210は、撮像画像の各画素のうち、微分演算部208により算出された2階微分絶対値が閾値Th以上である画素を、検査対象物10の欠陥の輪郭周辺画素として抽出する。抽出部210は、上記の抽出工程を実行するための機能構成である。   The extraction unit 210 extracts a pixel having a second-order differential absolute value calculated by the differential operation unit 208 greater than or equal to the threshold value Th among pixels of the captured image as a contour peripheral pixel of the defect of the inspection object 10. The extraction unit 210 is a functional configuration for executing the above-described extraction process.

判定部212は、抽出工程において抽出された輪郭周辺画素に基づいて、欠陥が検出されたか否かを判定する。例えば、判定部212は、輪郭周辺画素が抽出された場合には、検査対象物10の表面上に欠陥が存在する(すなわち、欠陥が検出された)と判定してもよい。典型的には、判定部212の判定結果は、ディスプレイ114に表示される。判定部212は、上記の判定工程を実行するための機能構成である。   The determination unit 212 determines whether a defect is detected based on the contour peripheral pixels extracted in the extraction step. For example, when a contour peripheral pixel is extracted, the determination unit 212 may determine that a defect is present on the surface of the inspection object 10 (that is, a defect is detected). Typically, the determination result of the determination unit 212 is displayed on the display 114. The determination unit 212 is a functional configuration for executing the above-described determination process.

<実施例>
ここでは、検査対象物10のモノクロ画像に基づいて、検査対象物10を検査する実施例について説明する。なお、カラー画像の場合と比較してモノクロ画像の場合はイメージセンサの数が1/4で済むため、高精細な撮像画像が得られる。
<Example>
Here, an embodiment in which the inspection object 10 is inspected based on a monochrome image of the inspection object 10 will be described. In the case of a monochrome image, the number of image sensors can be reduced to one-fourth that in the case of a color image, so that a high-definition captured image can be obtained.

図7は、パワー半導体チップを示す概略図である。パワー半導体とは、IGBT(Insulated Gate Bipolar Transistor)、MOSFET(metal-oxide-semiconductor field-effect transistor)等である。図7を参照して、検査対象物10の一例であるパワー半導体チップ10Aは、主電極11と、終端構造部12と、ゲート電極13とを含む。   FIG. 7 is a schematic view showing a power semiconductor chip. The power semiconductors are IGBTs (Insulated Gate Bipolar Transistors), MOSFETs (metal-oxide-semiconductor field-effect transistors), and the like. Referring to FIG. 7, a power semiconductor chip 10A, which is an example of the inspection object 10, includes a main electrode 11, a termination structure 12, and a gate electrode 13.

パワー半導体チップ10Aを製造する際には、品質を保証するため、製造工程中または出荷前に外観検査が行なわれることが多い。外観検査によって傷、異物、シミ、変形等の欠陥が検出された不良チップを除去することにより、不良品の後工程流出、および市場流出を抑制することができる。欠陥の形状、色はさまざまであり、背景と同様の外観をした検出し難い欠陥も存在する。   When manufacturing the power semiconductor chip 10A, visual inspection is often performed during the manufacturing process or before shipment to guarantee the quality. By removing defective chips in which defects such as scratches, foreign particles, stains, and deformations have been detected by visual inspection, it is possible to suppress the post-process outflow of defective products and the market outflow. The shapes and colors of the defects are various, and there are also undetectable defects having the same appearance as the background.

例えば、主電極11およびゲート電極13には、アルミスパッタ膜、金めっき膜等の金属が用いられる。膜の表面の微細なグレインによる凹凸形状のばらつき、あるいは、めっき時に面内の成膜速度に差があるため、良品であっても色合いにばらつきが存在する場合がある。さらに、このばらつきは面内方向に輝度勾配を持つことが多い。   For example, metals such as an aluminum sputtered film and a gold plating film are used for the main electrode 11 and the gate electrode 13. Due to the unevenness of the uneven shape due to the fine grains on the surface of the film or the difference in the in-plane deposition rate at the time of plating, even in the case of a non-defective product, there may be variations in color tone. Furthermore, this variation often has a brightness gradient in the in-plane direction.

図8は、パワー半導体チップの輝度勾配を説明するための概略図である。図8を参照すると、主電極11およびゲート電極13の端部分が濃く変色しており、ウエハの中央と外周で色合いが異なることがわかる。例えば、アルミスパッタ膜をマグネトロンスパッタでウエハに成膜する場合、同心円状に磁石を配置するため磁界の差により中心部が薄く粗な膜質になる傾向があり、表面のラフネスの差から輝度がウエハ中央と外周で異なることがある。あるいは、金めっき膜を主電極11として成膜する場合、終端構造部12などの段差形状に応じて、段差近傍と電極中心とでめっき液の撹拌度合いが異なり、ラフネスおよび膜厚などの差から輝度が異なることがある。このような場合、主電極11およびゲート電極13の色合いのばらつきは検出する必要がない背景となる。   FIG. 8 is a schematic diagram for explaining the brightness gradient of the power semiconductor chip. Referring to FIG. 8, it can be seen that the end portions of the main electrode 11 and the gate electrode 13 are deeply discolored, and the hue is different between the center and the periphery of the wafer. For example, when an aluminum sputtered film is formed on a wafer by magnetron sputtering, since the magnets are arranged concentrically, the central portion tends to be thin due to the difference in magnetic field, and the film quality tends to be rough. Center and perimeter may differ. Alternatively, when a gold plating film is formed as the main electrode 11, the degree of agitation of the plating solution differs between the vicinity of the step and the center of the electrode depending on the step shape of the termination structure 12 etc. The brightness may be different. In such a case, the variation in the color tone of the main electrode 11 and the gate electrode 13 does not have to be detected.

画像認識による欠陥検査において、この背景の色合いのばらつきは撮像画像の輝度値のばらつきとして撮像画像に反映される。また、主電極11およびゲート電極13を検査する場合、微小な輝度の差を検出するため、その他のエリア(例えば、終端構造部12等)については検査エリア対象外として同一のアルゴリズムでの検査は行なうべきではなく、主電極11、またはゲート電極13単体で検査することが望ましい。検査対象物10の例としては、ウエハ状態、チップ状態、あるいは基板回路に接合された状態のパワーチップ、例えばIGBT、FWD(free wheeling diode)などである。   In defect inspection based on image recognition, the variation in color tone of the background is reflected in the captured image as the variation in luminance value of the captured image. In addition, when the main electrode 11 and the gate electrode 13 are inspected, in order to detect a minute difference in luminance, the inspection by the same algorithm is not performed on the inspection area for the other areas (for example, the termination structure 12 etc.) It should not be performed, and it is desirable to inspect with the main electrode 11 or the gate electrode 13 alone. Examples of the inspection object 10 are a wafer state, a chip state, or a power chip in a state of being bonded to a substrate circuit, such as an IGBT or a free wheeling diode (FWD).

図9は、主電極11の撮像画像を示す図である。図10は、図9の撮像画像のコントラストを強調した画像を示す図である。   FIG. 9 is a view showing a captured image of the main electrode 11. FIG. 10 is a view showing an image in which the contrast of the captured image of FIG. 9 is emphasized.

ここで、欠陥および背景の輝度値が同程度であるだけであれば、特許文献1に係る手法であっても、検出に用いられる閾値を厳しく設定することにより欠陥の輪郭を検出できる可能性はある。しかしながら、例えば、図9のように、背景である主電極11の輝度に勾配がある撮像画像の場合には欠陥の検出が困難となる。図9に示す撮像画像のコントラストを強調した図10を参照すると、線分K1K2上に欠陥20が存在することがわかる。   Here, if the luminance values of the defect and the background are only comparable, even with the method according to Patent Document 1, there is a possibility that the contour of the defect can be detected by setting the threshold used for detection strictly. is there. However, for example, as illustrated in FIG. 9, in the case of a captured image in which the luminance of the main electrode 11 as the background has a gradient, detection of a defect becomes difficult. Referring to FIG. 10 in which the contrast of the captured image shown in FIG. 9 is emphasized, it can be seen that the defect 20 is present on the line segment K1K2.

図11は、図9の線分K1K2上の画素の輝度を示す図である。図11を参照すると、欠陥20が存在する部分の輝度が一定になっていることがわかる。   FIG. 11 is a diagram showing the luminance of the pixel on the line segment K1K2 of FIG. Referring to FIG. 11, it can be seen that the luminance of the portion where the defect 20 is present is constant.

図12は、図3に示す撮像画像に対してX方向にソーベルフィルタを適用した微分処理後の値を輝度に変換した結果を示す図である。ソーベルフィルタは、微分方向を指定した微分フィルタであり、輪郭の抽出に用いられる。   FIG. 12 is a diagram showing the result of converting the value after differential processing in which the Sobel filter is applied in the X direction to the captured image shown in FIG. 3 into luminance. The Sobel filter is a differential filter in which a differential direction is specified, and is used to extract a contour.

図13は、図12の線分K1K2上の画素の微分値を示す図である。図13を参照すると、ソーベルフィルタ処理後であっても微分値は全体的にばらついており、S/N比が1.3程度であるため、閾値設定による欠陥20の輪郭画素の検出は困難である。例えば、閾値を大きく設定した場合には欠陥20の見逃しが多発し、閾値を小さく設定した場合には誤検出が多発してしまう。   FIG. 13 is a diagram showing differential values of pixels on line segment K1K2 of FIG. Referring to FIG. 13, even after Sobel filter processing, the derivative values are generally dispersed, and the S / N ratio is about 1.3, so it is difficult to detect contour pixels of defect 20 by threshold setting. It is. For example, when the threshold is set large, missed defects 20 frequently occur, and when the threshold is set small, false detection frequently occurs.

図14は、図9に示す撮像画像に対して8方向ラプラシアンフィルタを適用した微分処理後の値を輝度に変換した結果を示す図である。ラプラシアンフィルタは、微分方向を指定しない全方向の2階微分処理を行なうための微分フィルタであり、値が0になる点(すなわち、ゼロクロス点)を輪郭として抽出できる。   FIG. 14 is a diagram showing the result of converting the value after differential processing in which the 8-directional Laplacian filter is applied to the captured image shown in FIG. 9 into luminance. The Laplacian filter is a differential filter for performing second-order differential processing in all directions that does not specify a differential direction, and can extract a point where the value is 0 (that is, a zero cross point) as an outline.

図15は、図14の線分K1K2上の画素の微分値を示す図である。図15を参照すると、ラプラシアンフィルタ処理後であっても微分値は全体的にばらついており、ゼロクロス点は画像全体に存在しているため、欠陥20の輪郭画素の検出は困難である。   FIG. 15 is a diagram showing differential values of pixels on the line segment K1K2 of FIG. Referring to FIG. 15, even after the Laplacian filter processing, the differential values are generally dispersed, and the zero cross point is present in the entire image, so detection of the outline pixel of the defect 20 is difficult.

一方、実施の形態1に従う検査装置100によると、図9のように撮像画像全体に輝度の勾配があり、欠陥20の輝度と背景の輝度との差が小さい場合でも精度よく欠陥20を検出することができる。   On the other hand, according to inspection apparatus 100 in accordance with the first embodiment, as shown in FIG. 9, there is a luminance gradient throughout the captured image, and defect 20 is accurately detected even when the difference between the luminance of defect 20 and the luminance of the background is small. be able to.

図16は、図9に示す撮像画像に平滑化処理を行なった場合の画像を示す図である。図16に示す画像は、上述した標準化工程において、図9に示す撮像画像に稼働平均フィルタを適用して平滑化処理した場合の平滑化画像である。検査装置100は、図16に示す平滑化画像の各画素について、当該画素の輝度と、各隣接画素の輝度とを比較することにより、当該画素の輝度勾配方向を算出し、当該輝度勾配方向を微分方向に設定する。   FIG. 16 is a diagram showing an image in the case where smoothing processing is performed on the captured image shown in FIG. The image shown in FIG. 16 is a smoothed image when smoothing processing is performed by applying an operating average filter to the captured image shown in FIG. 9 in the above-described standardization process. The inspection apparatus 100 calculates, for each pixel of the smoothed image shown in FIG. 16, the brightness gradient direction of the pixel by comparing the brightness of the pixel with the brightness of each adjacent pixel, and Set in the differential direction.

続いて、検査装置100は、図16に示す平滑化画像の各画素について、当該画素の輝度勾配方向を微分方向として当該画素の1階微分値を算出する。   Subsequently, the inspection apparatus 100 calculates, for each pixel of the smoothed image shown in FIG. 16, a first-order derivative value of the pixel with the luminance gradient direction of the pixel as the differentiation direction.

図17は、図10に示す平滑化画像の各画素の1階微分値を輝度に変換した結果を示す図である。図18は、図17の線分K1K2上の画素の1階微分値を示す図である。図19は、図17に示す平滑化画像の各画素の2階微分値を輝度に変換した結果を示す図である。なお、図19を参照すると、領域901,902において、縦方向に見た場合に15画素程度の周期で濃淡が大きい部分と小さい部分が交互に存在しており、濃淡の大きい部分が波線状に見えている。図20は、図19の線分K1K2上の画素の2階微分値を示す図である。   FIG. 17 is a diagram showing the result of converting the first-order differential value of each pixel of the smoothed image shown in FIG. 10 into luminance. FIG. 18 is a diagram showing a first-order differential value of the pixel on the line segment K1K2 of FIG. FIG. 19 is a diagram showing the result of converting the second-order differential value of each pixel of the smoothed image shown in FIG. 17 into luminance. Referring to FIG. 19, in the regions 901 and 902, when viewed in the vertical direction, a portion with high and low density alternately exists in a cycle of about 15 pixels, and a portion with high density is wavy in a line. I can see it. FIG. 20 is a diagram showing second derivative values of pixels on line segment K1K2 in FIG.

図18に示すように、微分方向を設定しても1階微分処理を実行しただけでは、S/N比が低く欠陥20の輪郭を検出することは困難であるが、図20に示すように2階微分処理を実行することによりS/N比が1.9まで改善する。そのため、閾値を設定することにより、2階微分値が大きい画素を欠陥20の輪郭周辺画素として抽出することができる。すなわち、欠陥20を高精度に検出することができる。   As shown in FIG. 18, even if the differential direction is set, it is difficult to detect the outline of the defect 20 because the S / N ratio is low and it is difficult to detect the outline of the defect 20 only by executing the first-order differentiation process. The S / N ratio improves to 1.9 by performing the second-order differentiation process. Therefore, by setting the threshold value, a pixel having a large second derivative value can be extracted as an edge peripheral pixel of the defect 20. That is, the defect 20 can be detected with high accuracy.

このように、1階微分処理のみでは背景の輝度の勾配がノイズとなるが、2階微分処理によりノイズを低減することが可能となる。また、微分方向を輝度の勾配方向にすることにより、欠陥20の輝度と背景の輝度との差が最大になる方向に微分できるため、欠陥20の輪郭周辺画素を抽出できる。   As described above, although the gradient of the luminance of the background is noise only by the first-order differentiation process, it is possible to reduce the noise by the second-order differentiation process. In addition, by setting the differentiation direction to the gradient direction of the luminance, it is possible to differentiate in the direction in which the difference between the luminance of the defect 20 and the luminance of the background becomes maximum.

<微分演算工程の変形例>
(微分フィルタ)
図21を参照して、上述した微分演算工程で用いた微分フィルタの変形例について説明する。図21は、実施の形態1の変形例に従う複数の微分フィルタを示す図である。
<Modification of differential operation process>
(Differential filter)
A modification of the differential filter used in the above-described differential operation process will be described with reference to FIG. FIG. 21 shows a plurality of differential filters according to the modification of the first embodiment.

図21(a)および図21(b)は、それぞれ微分フィルタ411,412を示す図である。   FIGS. 21 (a) and 21 (b) are diagrams showing differential filters 411 and 412, respectively.

座標(x,y)の画素の輝度勾配方向が方向(1,1)である場合には、図21(a)の微分フィルタ411を用いて、輝度Cx,yの1階微分値Dx,yは、以下の式(4)で表される。 When the luminance gradient direction of the pixel at the coordinate (x, y) is the direction (1, 1), the first-order differential value D x of the luminance C x, y is obtained using the differential filter 411 of FIG. , Y is represented by the following equation (4).

x,y=Cx+1,y+1+Cx+1,y+Cx,y+1−(Cx−1,y−1+Cx−1,y+Cx,y−1)・・・(4)
また、座標(x,y)の画素の輝度勾配方向が方向(1,0)である場合には、図21(b)の微分フィルタ412を用いて、輝度Cx,yの1階微分値Dx,yは、以下の式(5)で表される。
D x, y = C x + 1, y + 1 + C x + 1, y + C x, y + 1- (C x -1, y -1 + C x -1, y + C x, y -1 ) (4)
When the luminance gradient direction of the pixel at the coordinate (x, y) is the direction (1, 0), the first-order differential value of the luminance C x, y is obtained using the differential filter 412 of FIG. D x, y is expressed by the following equation (5).

x,y=Cx+1,y+Cx+1,y−1+Cx+1,y+1−(Cx−1,y+Cx−1,y+1+Cx−1,y−1)・・・(5)
なお、座標(x,y)の画素の輝度勾配方向が方向(−1,1)である場合には、微分フィルタ411を90度回転させた微分フィルタを用いて微分演算が実行される。同様に、輝度勾配方向が方向(−1,−1)、方向(1,−1)である場合には、それぞれ、微分フィルタ411を180度、270度回転させた微分フィルタを用いて微分演算が実行される。
D x, y = C x +1, y + C x +1, y-1 + C x +1, y + 1- (C x -1, y + C x -1, y + 1 + C x -1, y-1 ) (5)
When the luminance gradient direction of the pixel at the coordinates (x, y) is the direction (−1, 1), the differential operation is performed using a differential filter obtained by rotating the differential filter 411 by 90 degrees. Similarly, when the luminance gradient direction is the direction (-1, -1) or the direction (1, -1), the differential operation is performed using the differential filter obtained by rotating the differential filter 411 by 180 degrees and 270 degrees, respectively. Is executed.

また、輝度勾配方向が方向(0,1)である場合には、微分フィルタ412を90度回転させた微分フィルタを用いて微分演算が実行される。同様に、輝度勾配方向が方向(−1,0)、方向(0,−1)である場合には、それぞれ、微分フィルタ412を180度、270度回転させた微分フィルタを用いて微分演算が実行される。   Further, when the luminance gradient direction is the direction (0, 1), the differential operation is performed using a differential filter obtained by rotating the differential filter 412 by 90 degrees. Similarly, when the luminance gradient direction is the direction (-1, 0) or the direction (0, -1), the differential operation is performed using the differential filter obtained by rotating the differential filter 412 by 180 degrees and 270 degrees, respectively. To be executed.

ここで、図11に示すように、図9に示す撮像画像の線分K1K2上の画素の輝度は、点K1から点K2に向かって増大しているため、輝度の増大方向は点K1から点K2に向かう方向、すなわち、方向(1,0)に対応する。輝度の減少方向は点K2から点K1に向かう方向、すなわち、方向(−1,0)に対応する。   Here, as shown in FIG. 11, since the luminance of the pixel on line segment K1K2 of the captured image shown in FIG. 9 increases from point K1 to point K2, the increasing direction of the luminance is from point K1 to point It corresponds to the direction towards K2, ie the direction (1, 0). The decreasing direction of the luminance corresponds to the direction from the point K2 to the point K1, that is, the direction (−1, 0).

図4を参照して、実施の形態1において、輝度勾配方向が方向(1,0)である場合の微分フィルタ402では、方向(1,0)および方向(−1,0)に対応する係数が2である。そのため、図9に示す撮像画像に微分フィルタ402が適用されると、輝度勾配方向の2つの隣接画素の影響が強く出る。一方、図21(b)に示すように、輝度勾配方向が方向(1,0)である場合の微分フィルタ412では、方向(1,0)および方向(−1,0)に対応する係数が1であるため、上記影響が抑制される。   Referring to FIG. 4, in differential filter 402 in the case where the brightness gradient direction is direction (1, 0) in the first embodiment, coefficients corresponding to direction (1, 0) and direction (−1, 0) Is two. Therefore, when the differential filter 402 is applied to the captured image shown in FIG. 9, the influence of the two adjacent pixels in the brightness gradient direction is strong. On the other hand, as shown in FIG. 21B, in the differential filter 412 where the luminance gradient direction is the direction (1, 0), the coefficients corresponding to the direction (1, 0) and the direction (−1, 0) are Since it is 1, the said influence is suppressed.

図19に示すように、15画素程度の周期で濃淡が大きい部分と小さい部分が交互に存在する場合(すなわち、濃淡のうねりが存在する場合)には、隣接画素同士の微分値と微分方向が比較的大きく変化するが、例えば、30画素程度の周期で濃淡が存在している場合には、隣接画素同士の微分値と微分方向が大きく変化しない。そのため、係数が1に低減された微分フィルタ412を用いることにより、欠陥の輪郭以外に起因する微分値(例えば、背景起因のノイズ)を小さくする。例えば、図3に示す中心の画素P5の左右の6つの隣接画素P1〜P3,P7〜P9の輝度が微小に変動している場合、画素P5の上下2つの隣接画素P4,P6の微分値が変動する。この場合、微分フィルタ402とは異なり微分フィルタ412では、係数の重み付けをしていないため、平均化して微分値のノイズが小さくなりS/N比が増大する。すなわち、30画素程度の周期で濃淡のうねりが存在する場合には、図21(a),(b)に示す微分フィルタ411,412を用いることが好ましい。   As shown in FIG. 19, when there are alternately high and low density portions in a cycle of about 15 pixels (that is, in the case where density undulations exist), the differential value and differential direction between adjacent pixels are Although the change is relatively large, for example, when light and shade exist in a cycle of about 30 pixels, the differential value and the differential direction of adjacent pixels do not change significantly. Therefore, by using the differential filter 412 whose coefficient is reduced to 1, the differential value (for example, background noise) caused by something other than the defect outline is reduced. For example, when the luminances of the six adjacent pixels P1 to P3 and P7 to P9 on the left and right of the central pixel P5 shown in FIG. 3 slightly fluctuate, the differential values of the two adjacent pixels P4 and P6 above and below the pixel P5 are fluctuate. In this case, unlike the differential filter 402, since the differential filter 412 does not weight the coefficients, the noise of the differential value becomes smaller by averaging, and the S / N ratio increases. That is, in the case where undulations of light and shade exist in a cycle of about 30 pixels, it is preferable to use the differential filters 411 and 412 shown in FIGS. 21 (a) and (b).

なお、図19に示すように、15画素程度の周期で濃淡が大きい部分と小さい部分が交互に存在する場合には、隣接画素同士の微分値と微分方向が比較的大きく変化する。そのため、局所的な値をより精度よく抽出するために輝度勾配方向に対応する係数が2に設定された微分フィルタ402を用いるのが好ましい。この場合、画素P5の左右6つの隣接画素P1〜P3,P7〜P9の輝度が微小に変動していても、比較的一様な背景ではなく濃淡のうねり起因の変動の割合が大きいことから、係数を2に設定することによりS/N比が増大する。すなわち、15画素程度の周期で濃淡のうねりが存在する場合には、図4に示す微分フィルタを用いることが好ましい。   Note that, as shown in FIG. 19, when there are alternately high and low density portions in a cycle of about 15 pixels, the differential value and the differential direction of adjacent pixels change relatively large. Therefore, in order to extract local values more accurately, it is preferable to use the differential filter 402 in which the coefficient corresponding to the luminance gradient direction is set to 2. In this case, even if the brightness of the six adjacent pixels P1 to P3 and P7 to P9 on the left and right of the pixel P5 fluctuates minutely, the ratio of the fluctuation caused by the undulation of the gray level rather than the relatively uniform background is large. By setting the factor to 2, the S / N ratio is increased. That is, in the case where an undulation of light and shade exists in a cycle of about 15 pixels, it is preferable to use the differential filter shown in FIG.

図21(c)および図21(d)は、それぞれ微分フィルタ413,414を示す図である。   FIGS. 21 (c) and 21 (d) are diagrams showing the differential filters 413 and 414, respectively.

座標(x,y)の画素の輝度勾配方向が方向(1,1)である場合には、図21(c)の微分フィルタ413を用いて、輝度Cx,yの1階微分値Dx,yは、以下の式(6)で表される。 When the luminance gradient direction of the pixel at the coordinate (x, y) is the direction (1, 1), the first-order differential value D x of the luminance C x, y is obtained using the differential filter 413 of FIG. , Y is represented by the following equation (6).

x,y=Cx+1,y+1−Cx−1,y−1・・・(6)
また、座標(x,y)の画素の輝度勾配方向が方向(1,0)である場合には、図21(d)の微分フィルタ414を用いて、輝度Cx,yの1階微分値Dx,yは、以下の式(7)で表される。
D x, y = C x + 1, y + 1- C x-1, y-1 (6)
When the luminance gradient direction of the pixel at the coordinates (x, y) is the direction (1, 0), the first-order differential value of the luminance C x, y is obtained using the differential filter 414 of FIG. D x, y is expressed by the following equation (7).

x,y=Cx+1,y−Cx−1,y・・・(7)
なお、座標(x,y)の画素の輝度勾配方向が方向(−1,1)、方向(−1,−1)、方向(1,−1)である場合には、それぞれ、微分フィルタ413を90度、180度、270度回転させた微分フィルタを用いて微分演算が実行される。
D x, y = C x +1 , y -C x -1, y (7)
When the luminance gradient direction of the pixel at the coordinates (x, y) is the direction (-1, 1), the direction (-1, -1), or the direction (1, -1), the differential filter 413 is used. The differential operation is performed using a differential filter obtained by rotating 90 degrees, 180 degrees, and 270 degrees.

また、輝度勾配方向が方向(0,1)、方向(−1,0)、方向(0,−1)である場合には、それぞれ、微分フィルタ414を90度、180度、270度回転させた微分フィルタを用いて微分演算が実行される。   When the luminance gradient direction is direction (0, 1), direction (-1, 0), direction (0, -1), rotate differential filter 414 by 90 degrees, 180 degrees, 270 degrees, respectively. The differential operation is performed using the differential filter.

ここで、微分フィルタ413,414は、例えば、3画素以下の周期で濃淡のうねりが存在する場合に有用である。例えば、輝度勾配方向が方向(1,0)である場合の微分フィルタ414では、斜めの4つの方向(1,1),(1,−1),(−1,−1),(−1,1)に対応する係数が0となっている。濃淡のうねりの周期が短くなると、斜め4つの方向に対応する画素の値は、濃淡のうねり起因の変動を含むためノイズとなる。そこで、ノイズ起因になる画素の情報を除去して、方向(1,0)および方向(−1,0)に対応する2つの画素の情報のみにすることによりS/N比が向上する。   Here, the differential filters 413 and 414 are useful, for example, when there is a gradation of light and dark with a period of 3 pixels or less. For example, in the differential filter 414 where the luminance gradient direction is the direction (1, 0), four oblique directions (1, 1), (1, -1), (-1, -1), (-1) , 1) is 0. When the period of the waviness of the density becomes short, the values of the pixels corresponding to the four diagonal directions become noise because they include the fluctuation due to the waviness of the density. Therefore, the S / N ratio is improved by removing the information of the pixel caused by the noise and setting it as the information of only two pixels corresponding to the direction (1, 0) and the direction (-1, 0).

図21(e)および図21(f)は、それぞれ微分フィルタ415,416を示す図である。   21 (e) and 21 (f) are diagrams showing differential filters 415 and 416, respectively.

座標(x,y)の画素の輝度勾配方向が方向(1,1)である場合には、図21(e)の微分フィルタ415を用いて、輝度Cx,yの1階微分値Dx,yは、以下の式(8)で表される。 When the luminance gradient direction of the pixel at the coordinate (x, y) is the direction (1, 1), the first-order differential value D x of the luminance C x, y is obtained using the differential filter 415 of FIG. , Y is expressed by the following equation (8).

x,y=Cx+1,y+1−Cx,y・・・(8)
また、座標(x,y)の画素の輝度勾配方向が方向(1,0)である場合には、図21(f)の微分フィルタ416を用いると、輝度Cx,yの1階微分値Dx,yは、以下の式(9)で表される。
D x, y = C x + 1, y + 1 −C x, y (8)
When the luminance gradient direction of the pixel at the coordinate (x, y) is the direction (1, 0), the first-order differential value of the luminance C x, y can be obtained using the differential filter 416 of FIG. D x, y is expressed by the following equation (9).

x,y=Cx+1,y−Cx,y・・・(9)
なお、座標(x,y)の画素の輝度勾配方向が方向(−1,1)、方向(−1,−1)、方向(1,−1)である場合には、それぞれ、微分フィルタ415を90度、180度、270度回転させた微分フィルタを用いて微分演算が実行される。
D x, y = C x +1 , y -C x, y (9)
When the luminance gradient direction of the pixel at the coordinates (x, y) is the direction (-1, 1), the direction (-1, -1), or the direction (1, -1), the differential filter 415 is used. The differential operation is performed using a differential filter obtained by rotating 90 degrees, 180 degrees, and 270 degrees.

また、輝度勾配方向が方向(0,1)、方向(−1,0)、方向(0,−1)である場合には、それぞれ、微分フィルタ416を90度、180度、270度回転させた微分フィルタを用いて微分演算が実行される。   When the luminance gradient direction is direction (0, 1), direction (-1, 0), direction (0, -1), rotate differential filter 416 by 90 degrees, 180 degrees, 270 degrees, respectively. The differential operation is performed using the differential filter.

微分フィルタ415,416は、例えば、2画素以下の周期で濃淡のうねりが存在する場合に有効である。濃淡のうねりの周期が2画素以下の場合には、ランダムで濃淡のうねりが確認できない状態である。すなわち、画素サイズの関係で追従できず、データ上ではランダムに見えている状態である。このような場合に、微分フィルタ413のように方向(1,0)および方向(−1,0)に対応する2つの画素の情報を用いると、微分処理に用いる範囲が3画素になってしまい、ノイズを含んでしまう。そのため、微分フィルタ416のように、2画素での微分処理でS/Nを向上させる。   The differential filters 415 and 416 are effective, for example, when there is a gradation of light and dark with a period of 2 pixels or less. When the period of the waviness of the light and dark is 2 pixels or less, it is not possible to confirm the waviness of light and darkness at random. That is, it can not follow due to the relationship of the pixel size, and it is in a state of being viewed randomly on the data. In such a case, if information of two pixels corresponding to the direction (1, 0) and the direction (−1, 0) as in the differential filter 413 is used, the range used for differential processing becomes three pixels. , Including noise. Therefore, as in the differential filter 416, S / N is improved by differential processing with two pixels.

(微分の階数)
上記では、微分演算工程において、撮像画像の各画素の2階微分値を算出する構成について説明したが、これに限られず、3階微分値を算出する構成であってもよい。
(Derivative rank)
Although the configuration for calculating the second-order derivative value of each pixel of the captured image in the differentiation operation step has been described above, the present invention is not limited thereto, and the third-order derivative value may be calculated.

図22は、図9に示す撮像画像の各画素の3階微分値を輝度に変換した結果を示す図である。図23は、図22の線分K1K2上の画素の3階微分値を示す図である。   FIG. 22 is a diagram showing the result of converting the third order differential value of each pixel of the captured image shown in FIG. 9 into luminance. FIG. 23 is a diagram showing the third order differential value of the pixel on the line segment K1K2 of FIG.

図23に示すように3階微分処理を実行しても、2階微分処理を実行した場合と同様に高いS/N比が得られている。これにより、閾値を設定することにより、3階微分値が大きい画素を欠陥20の輪郭周辺画素として抽出することができる。すなわち、抽出部210は、撮像画像の各画素のうち、3階微分絶対値が閾値以上である画素を、検査対象物10の欠陥の輪郭周辺画素として抽出する。背景の輝度の輝度勾配が微小な場合には、微分階数を増やすことにより、背景起因のノイズを低減し、欠陥20の輪郭に起因する微分値がより検出しやすくなる。   As shown in FIG. 23, even when the third-order differentiation process is performed, a high S / N ratio is obtained as in the case where the second-order differentiation process is performed. Thus, by setting the threshold value, it is possible to extract a pixel having a large third-order derivative value as an edge peripheral pixel of the defect 20. That is, the extraction unit 210 extracts a pixel having a third-order derivative absolute value equal to or more than the threshold among the pixels of the captured image as the outline peripheral pixel of the defect of the inspection object 10. When the luminance gradient of the background luminance is minute, the noise caused by the background is reduced by increasing the differential rank, and the differential value caused by the outline of the defect 20 can be more easily detected.

微分演算工程では、検査対象物10に応じてS/N比が最大になるように、撮像画像の各画素をn(nは2以上の自然数)階以上微分して各画素のn階微分値を算出する構成であればよい。ただし、微分階数が増えるごとに、検出される欠陥の輪郭周辺画素は実際の欠陥の輪郭画素の位置から輝度勾配方向に増えていくため、欠陥の位置情報の精度が低下する。そのため、ユーザは、位置情報の精度および欠陥の検出精度を鑑みて、検査対象物10ごとにnの値を決定すればよい。   In the differentiation operation step, each pixel of the captured image is differentiated n or more (n is a natural number of 2 or more) so that the S / N ratio is maximized according to the inspection object 10, and the nth order differential value of each pixel Any configuration may be used as long as it calculates. However, since the peripheral pixels of the outline of the defect to be detected increase in the direction of the luminance gradient from the position of the contour pixel of the actual defect every time the differential rank increases, the accuracy of the positional information of the defect decreases. Therefore, the user may determine the value of n for each inspection object 10 in consideration of the accuracy of the position information and the detection accuracy of the defect.

<利点>
実施の形態1によると、背景に輝度勾配があり背景と欠陥の濃淡の差が小さい場合でも、精度よく欠陥の輪郭周辺画素を抽出することができるため、より精度よく欠陥を検出できる。例えば、本実施の形態に従う検査方法を製造工程中の外観検査で適用することにより、後工程への不良の流出を抑制し、ロスコストの削減することが可能である。また、本実施の形態に従う検査方法を出荷前検査の外観検査で適用することにより、市場不良を低減し、信頼性を向上させることができる。
<Advantage>
According to the first embodiment, even in the case where there is a luminance gradient in the background and the difference between the density of the background and the defect is small, pixels around the outline of the defect can be extracted with high accuracy. Therefore, the defect can be detected more accurately. For example, by applying the inspection method according to the present embodiment in the appearance inspection in the manufacturing process, it is possible to suppress the outflow of defects to the post process and reduce the loss cost. In addition, by applying the inspection method according to the present embodiment in the appearance inspection of the inspection before shipment, it is possible to reduce market defects and improve the reliability.

実施の形態2.
実施の形態2では、上述した実施の形態1に従う抽出工程のより詳細な処理について説明する。具体的には、複数の輪郭周辺画素を一体化した集合体を抽出する方式について説明する。
Second Embodiment
In the second embodiment, more detailed processing of the extraction process according to the above-described first embodiment will be described. Specifically, a method of extracting an aggregate in which a plurality of contour peripheral pixels are integrated will be described.

図24は、実施の形態2に従う輪郭周辺画素の集合体の抽出方式の一例を説明するための図である。図24を参照して、抽出部210は、撮像画像の各画素のうち、2階微分絶対値が閾値Th以上である画素を、検査対象物10の欠陥の輪郭周辺画素として抽出し、当該輪郭周辺画素を黒画素として表わし、非輪郭周辺画素を白画素として表わす2値化処理を実行する。抽出部210は、互いに隣接する輪郭周辺画素の集合を輪郭周辺集合体(以下、単に「集合体」とも称する。)として抽出する。図24の例では、集合体81,82,83が抽出されている。   FIG. 24 is a diagram for describing an example of an extraction method of a group of outline peripheral pixels according to the second embodiment. Referring to FIG. 24, the extraction unit 210 extracts a pixel having a second derivative absolute value equal to or more than the threshold value Th among pixels of the captured image as a contour peripheral pixel of a defect of the inspection object 10, and the contour A binarization process is performed in which peripheral pixels are represented as black pixels and non-contour peripheral pixels are represented as white pixels. The extraction unit 210 extracts a set of contour peripheral pixels adjacent to each other as a contour peripheral aggregate (hereinafter, also simply referred to as an “aggregate”). In the example of FIG. 24, aggregates 81, 82, 83 are extracted.

次に、抽出部210は、集合体81,82,83の長手方向の長さL1,L2,L3を取得する。例えば、集合体81に着目して、抽出部210は、集合体81と他の集合体82との間の距離DS1が閾値TD1未満であるか否かを判定する。閾値TD1は、例えば、長手方向の長さL1×r1倍以内、予め定められた画素数r2以内等に設定される。r1,r2の値は、ユーザにより任意に設定される。欠陥の輪郭周辺画素の見え方は、検査対象物の材質、表面状態、検査時の照明条件、微分パラメータ、閾値などで変動するため、ユーザが検出結果を確認しながらr1,r2を変更してフィードバックする。   Next, the extraction unit 210 acquires the lengths L1, L2, and L3 in the longitudinal direction of the aggregates 81, 82, and 83. For example, focusing on the aggregate 81, the extraction unit 210 determines whether the distance DS1 between the aggregate 81 and another aggregate 82 is less than the threshold value TD1. The threshold value TD1 is set, for example, within a length L1 × r1 times in the longitudinal direction, within a predetermined number of pixels r2, or the like. The values of r1 and r2 are arbitrarily set by the user. The appearance of pixels around the outline of the defect varies depending on the material of the inspection object, surface condition, illumination conditions at inspection, differential parameters, threshold values, etc. Therefore, the user changes r1 and r2 while checking the detection result give feedback.

抽出部210は、距離DS1が閾値TD1未満である場合には、集合体81と集合体82とを一体化して、1つの集合体AGとして抽出する。同様に、抽出部210は、集合体AGと集合体83との距離DS2が閾値TD1未満である場合には、集合体AGと集合体83とを一体化して、1つの集合体84として抽出する。   When the distance DS1 is less than the threshold value TD1, the extraction unit 210 integrates the assembly 81 and the assembly 82 and extracts it as one assembly AG. Similarly, when the distance DS2 between the aggregate AG and the aggregate 83 is less than the threshold value TD1, the extraction unit 210 integrates the aggregate AG and the aggregate 83 and extracts it as one aggregate 84. .

まとめると、抽出部210は、互いに隣接する輪郭周辺画素の集合体の長手方向の長さを取得し、当該集合体の長手方向において、当該集合体から予め定められた距離内に他の輪郭周辺画素の集合体が存在するか否かを判定する。抽出部210は、他の集合体が存在すると判定した場合に、当該集合体および他の集合体を、1つの輪郭周辺画素の集合体として抽出する。以下の説明では、当該抽出方式を「抽出方式EM1」とも称する。抽出方式EM1により、輪郭周辺画素の集合体の長手方向において、当該集合体が他の集合体と途切れている場合であっても、これらの集合体を同一の欠陥由来の輪郭近傍画素であると判断できる。そのため、欠陥のカウント数、あるいは欠陥の形状をより精度よく認識できる。   In summary, the extraction unit 210 obtains the length in the longitudinal direction of an assembly of contour peripheral pixels adjacent to each other, and in the longitudinal direction of the assembly, the periphery of another contour is within a predetermined distance from the assembly. It is determined whether a set of pixels exists. When it is determined that there is another aggregate, the extraction unit 210 extracts the aggregate and the other aggregate as an aggregate of one contour peripheral pixel. In the following description, the extraction method is also referred to as “extraction method EM1”. According to the extraction method EM1, even if the aggregate is disconnected from another aggregate in the longitudinal direction of the aggregate of peripheral pixels, it is assumed that the aggregate is a contour neighboring pixel derived from the same defect It can be judged. Therefore, the count number of defects or the shape of defects can be recognized more accurately.

図25は、実施の形態2に従う輪郭周辺画素の集合体の抽出方式の他の例を説明するための図である。図25を参照して、抽出部210は、集合体91の重心画素H1および長手方向の長さL5と、集合体92の重心画素H2および長手方向の長さL6を算出する。   FIG. 25 is a diagram for explaining another example of a method of extracting a set of contour peripheral pixels according to the second embodiment. Referring to FIG. 25, the extraction unit 210 calculates the centroid pixel H1 and the length L5 in the longitudinal direction of the aggregate 91, and the centroid pixel H2 and the length L6 in the longitudinal direction of the aggregate 92.

続いて、抽出部210は、集合体91に着目して、短手方向において重心画素H1から集合体92までの距離が閾値TD2未満であるか否かを判定する。閾値TD2は、例えば、長手方向の長さL5×r3倍以内、予め定められた画素数r4以内等に設定される。r3,r4の値は、ユーザにより任意に設定される。抽出部210は、当該距離が閾値TD2未満である場合には、集合体91および集合体92を同一の欠陥由来の輪郭周辺画素の集合体93としてラベリング(すなわち、抽出)する。   Subsequently, the extraction unit 210 determines whether or not the distance from the gravity center pixel H1 to the aggregate 92 in the lateral direction is less than the threshold value TD2 focusing on the aggregate 91. The threshold value TD2 is set, for example, within a length L5 × r3 times in the longitudinal direction and within a predetermined number of pixels r4. The values of r3 and r4 are arbitrarily set by the user. When the distance is less than the threshold value TD2, the extraction unit 210 labels (that is, extracts) the aggregate 91 and the aggregate 92 as an aggregate 93 of contour peripheral pixels derived from the same defect.

まとめると、抽出部210は、集合体の重心および短手方向を取得し、当該集合体の短手方向において、当該集合体の重心から予め定められた距離内に他の輪郭周辺画素の集合体が存在するか否かを判定する。抽出部210は、他の集合体が存在すると判定した場合に、当該集合体および他の集合体を、1つの輪郭周辺画素の集合体として抽出する。以下の説明では、当該抽出方式を「抽出方式EM2」とする。   In summary, the extraction unit 210 acquires the center of gravity and the short side direction of the aggregate, and in the short side direction of the group, an aggregate of other contour peripheral pixels within a predetermined distance from the center of gravity of the group It is determined whether or not exists. When it is determined that there is another aggregate, the extraction unit 210 extracts the aggregate and the other aggregate as an aggregate of one contour peripheral pixel. In the following description, the extraction method is referred to as “extraction method EM2”.

抽出方式EM2により、輪郭周辺画素の集合体の短手方向において、当該集合体が他の集合体と途切れている場合であっても、これらの集合体を同一の欠陥由来の輪郭近傍画素であると判断できる。そのため、欠陥のカウント数、あるいは欠陥の形状をより精度よく認識できる。   By the extraction method EM2, even if the aggregate is disconnected from another aggregate in the short direction of the aggregate of peripheral pixels, the aggregate is a contour neighboring pixel derived from the same defect It can be judged. Therefore, the count number of defects or the shape of defects can be recognized more accurately.

また、抽出部210は、短手方向において、集合体91の長手方向の一端に存在する端画素から集合体92までの距離が閾値TD3未満であるかを判定してもよい。閾値TD3は、例えば、長手方向の長さL5×r5倍以内、予め定められた画素数r6以内等に設定される。r5,r6の値は、ユーザにより任意に設定される。抽出部210は、当該距離が閾値TD3未満である場合には、集合体91および集合体92を同一の欠陥由来の輪郭周辺画素の集合体93としてラべリングする。   The extraction unit 210 may also determine whether the distance from the end pixel present at one end in the longitudinal direction of the aggregate 91 to the aggregate 92 is less than the threshold value TD3 in the short side direction. The threshold value TD3 is set, for example, within a length L5 × r5 times in the longitudinal direction and within a predetermined number of pixels r6. The values of r5 and r6 are arbitrarily set by the user. When the distance is less than the threshold value TD3, the extraction unit 210 labels the set 91 and the set 92 as a set 93 of outline peripheral pixels derived from the same defect.

まとめると、抽出部210は、集合体の短手方向において、当該集合体の長手方向の一端の画素から予め定められた距離内に他の輪郭周辺画素の集合体が存在するか否かを判定する。抽出部210は、当該他の集合体が存在すると判定した場合に、当該集合体および他の集合体を、1つの輪郭周辺画素の集合体として抽出する。以下の説明では、当該抽出方式を「抽出方式EM3」とする。   In summary, the extraction unit 210 determines whether or not there is a set of other contour peripheral pixels within a predetermined distance from the pixel at one end in the longitudinal direction of the set in the short direction of the set. Do. When it is determined that the other aggregate exists, the extraction unit 210 extracts the aggregate and the other aggregate as an aggregate of one contour peripheral pixel. In the following description, the extraction method is referred to as “extraction method EM3”.

抽出方式EM3により、輪郭周辺画素の集合体の短手方向において、当該集合体が他の集合体と途切れている場合であっても、これらの集合体を同一の欠陥由来の輪郭近傍画素であると判断できる。特に、欠陥の形状が三角形等の場合には、抽出方式EM2では欠陥の輪郭近傍画素の集合体を抽出し難いが、抽出方式EM3によると当該集合体を抽出することができる。そのため、欠陥のカウント数、あるいは欠陥の形状をより精度よく認識できる。   By the extraction method EM3, even in the case where the aggregate is disconnected from another aggregate in the short direction of the aggregate of peripheral pixels, the aggregate is a contour neighboring pixel derived from the same defect It can be judged. In particular, when the shape of the defect is a triangle or the like, although it is difficult to extract an aggregate of pixels near the outline of the defect in the extraction method EM2, the aggregate can be extracted according to the extraction method EM3. Therefore, the count number of defects or the shape of defects can be recognized more accurately.

上記の抽出方式EM1〜EM3を組み合わせることにより、例えば、円状の欠陥についても精度よく検出することができる。図26は、円状の欠陥の撮像画像、および撮像画像の微分値を示す図である。具体的には、図26(a)は、円状の欠陥の撮像画像を示している。図26(b)は、図26(a)の撮像画像をX方向に1階微分した1階微分値を示す図である。図26(c)は、図26(a)の撮像画像をX方向に2階微分した2階微分値を示している。   By combining the above extraction methods EM1 to EM3, for example, circular defects can be detected with high accuracy. FIG. 26 is a view showing a captured image of a circular defect and a differential value of the captured image. Specifically, FIG. 26 (a) shows a captured image of a circular defect. FIG. 26B is a diagram showing a first-order differential value obtained by performing first-order differentiation of the captured image of FIG. 26A in the X direction. FIG. 26C shows second derivative values obtained by differentiating the captured image of FIG. 26A in the X direction.

図26(b)を参照すると、円形の欠陥の撮像画像の各画素を1階微分した場合には、円環の輪郭画素(図中の白色部分)が抽出される。図26(c)を参照すると、円形の欠陥の撮像画像の各画素を2階微分した場合には、二重線の形状で輪郭周辺画素(図中の白色部分)が抽出される。これは、図5(d)に示すように、欠陥の輪郭の両側に2階微分値の2つのピーク値が存在することからも理解される。   Referring to FIG. 26B, when each pixel of a captured image of a circular defect is subjected to first-order differentiation, outline pixels (white portions in the drawing) of a torus are extracted. Referring to FIG. 26C, when each pixel of a captured image of a circular defect is second-order differentiated, a contour peripheral pixel (white portion in the drawing) is extracted in the shape of a double line. This is also understood from the fact that there are two peak values of second derivative values on both sides of the defect contour as shown in FIG. 5 (d).

図27は、図26(c)に示す輪郭周辺画素を模式的に示す図である。図27を参照して、円801は、輪郭画素の位置を模式的に示している。円801の周辺には、黒画素で示された輪郭周辺画素が点在しており、全体として二重線の形状を有している。   FIG. 27 is a view schematically showing the contour peripheral pixels shown in FIG. Referring to FIG. 27, circle 801 schematically indicates the position of the outline pixel. Around the circle 801, outline peripheral pixels indicated by black pixels are scattered, and have a double line shape as a whole.

図28および図29は、輪郭周辺画素の集合体の抽出方式を説明するための図である。具体的には、図28(a)は、抽出方式EM1により抽出された集合体の一例を示す図である。図28(b)は、抽出方式EM2により抽出された集合体の一例を示す図である。図29は、抽出方式EM3により抽出された集合体の一例を示す図である。   FIGS. 28 and 29 are diagrams for explaining a method of extracting a set of contour peripheral pixels. Specifically, FIG. 28 (a) is a diagram showing an example of a set extracted by the extraction method EM1. FIG. 28 (b) is a diagram showing an example of an assembly extracted by the extraction method EM 2. FIG. 29 is a diagram showing an example of a set extracted by the extraction method EM3.

図28(a)を参照すると、抽出方式EM1を適用することにより、集合体501,502,503,504が抽出されている。集合体501,503は、コの字型であり二重線の外側の線に対応する集合体を示している。集合体502,504は、矩形型であり二重線の内側の線に対応する集合体を示している。このように、抽出方式EM1を適用した時点では、欠陥の両側に対応する二重線がそれぞれ別の集合体として抽出されており、全体として4つの集合体が存在する。   Referring to FIG. 28A, by applying the extraction method EM1, aggregates 501, 502, 503, and 504 are extracted. Assemblies 501 and 503 are U-shaped, and indicate assemblies corresponding to lines outside the double line. Assemblies 502 and 504 indicate assemblies that are rectangular and correspond to lines inside the double line. As described above, when the extraction method EM1 is applied, double lines corresponding to both sides of the defect are extracted as separate aggregates, and there are four aggregates as a whole.

図28(b)を参照すると、さらに抽出方式EM2を適用することにより、集合体501および集合体502が1つの集合体510として抽出され、集合体503および集合体504が1つの集合体520として抽出されている。このように、抽出方式EM2を適用した時点では、欠陥の片側に対応する二重線が1つの集合体として抽出されており、全体として2つの集合体が存在する。   Referring to FIG. 28 (b), by further applying extraction method EM2, aggregate 501 and aggregate 502 are extracted as one aggregate 510, and aggregate 503 and aggregate 504 as one aggregate 520. It has been extracted. Thus, when the extraction method EM2 is applied, double lines corresponding to one side of the defect are extracted as one assembly, and there are two assemblies as a whole.

図29を参照すると、さらに抽出方式EM3を適用することにより、図28(b)に示す集合体510および集合体520が1つの集合体550として抽出されている。このように、抽出方式EM3の適用後においては、欠陥の両側に存在する集合体が1つの集合体として抽出されている。   Referring to FIG. 29, by further applying extraction method EM3, an aggregate 510 and an aggregate 520 shown in FIG. 28 (b) are extracted as one aggregate 550. As described above, after the application of the extraction method EM3, aggregates existing on both sides of the defect are extracted as one aggregate.

上記のように、抽出方式EM1〜EM3を適用することにより、二重線状に点在していた輪郭周辺画素を複数の欠陥として認識するのではなく、同一の欠陥として認識できるため、欠陥数のカウントおよび欠陥の形状の認識の精度が高くなる。   As described above, by applying the extraction methods EM1 to EM3, the number of defects can be recognized as the same defect instead of recognizing the outline peripheral pixels scattered in the double linear shape as a plurality of defects. The accuracy of the count and the recognition of the shape of the defect is increased

ここで、判定部212は、上記のように抽出された集合体内の領域に含まれる画素数が基準画素数以上である場合に欠陥が存在すると判定し、当該領域が欠陥として検出する。また、判定部212は、検査対象物10に存在する欠陥をカウントして、カウント数に応じて良否判定を実行してもよい。例えば、判定部212は、カウント数が規定数以上である場合には検査対象物10を不良品として判定し、カウント数が規定数未満である場合には検査対象物10を良品として判定してもよい。   Here, when the number of pixels included in the area in the aggregate extracted as described above is equal to or more than the reference pixel number, the determination unit 212 determines that a defect exists, and detects the area as a defect. Further, the determination unit 212 may count defects present in the inspection object 10 and perform the quality determination according to the count number. For example, the determination unit 212 determines the inspection object 10 as a defective product when the count number is equal to or more than the specified number, and determines the inspection object 10 as a non-defective product when the count number is less than the specified number. It is also good.

<利点>
実施の形態2によると、実施の形態1の利点に加えて、検査対象物10に存在する欠陥数および欠陥の形状をより精度よく把握することができる。
<Advantage>
According to the second embodiment, in addition to the advantages of the first embodiment, the number of defects present in the inspection object 10 and the shape of the defects can be grasped more accurately.

その他の実施の形態.
(1)上述した実施の形態において、モノクロ画像の各画素の画素値として輝度を用いて、欠陥を検出する構成について説明したが、モノクロ画像の各画素の画素値として明度を用いて、欠陥を検出する構成であってもよい。輝度は、各画素のRGB(Red、Green、Blue)値に、適当な係数を掛けて足し合わせることによって算出されるため、青色の性質が薄く緑色の性質が濃く表れる傾向にある。各画素の明度を用いて検査することにより、赤色成分を示すR値、緑色成分を示すG値、青色成分を示すB値の影響を均一にすることで、輝度では検出し難い欠陥を検出することができる。例えば、R値、B値において、背景および欠陥の差が大きく、モノクロ画像を使用する場合には、明度を用いて欠陥を検出する構成が好ましい。一方、G値において、背景および欠陥の差が大きい場合には、輝度を用いて欠陥を検出する構成が好ましい。
Other Embodiments
(1) In the embodiment described above, the configuration for detecting a defect using luminance as a pixel value of each pixel of a monochrome image has been described, but using a lightness as a pixel value of each pixel of a monochrome image It may be configured to detect. The luminance is calculated by multiplying the RGB (Red, Green, Blue) values of each pixel by an appropriate coefficient and adding them, so the blue property tends to be thin and the green property tends to appear. Inspection is performed using the lightness of each pixel to detect defects that are difficult to detect by luminance by equalizing the influence of the R value indicating the red component, the G value indicating the green component, and the B value indicating the blue component. be able to. For example, in the case of using a monochrome image with a large difference between the background and the defect in the R value and the B value, it is preferable to use a configuration in which the defect is detected using lightness. On the other hand, when the difference between the background and the defect is large in the G value, it is preferable to use a configuration to detect the defect using the luminance.

また、上述した実施の形態において、モノクロ画像の各画素を用いて欠陥を検出する構成について説明したが、カラー画像の各画素を用いて欠陥を検出する構成であってもよい。背景と欠陥との間で、輝度または明度の差異がなく、RGB値で差がある場合には、カラー画像の各画素を用いて欠陥を検出する構成が望ましい。例えば、明度の場合には、背景のRGB値が、RGB値(100,50,30)であり、欠陥のRGB値が、RGB値(30,100,50)である場合には差異がないため、カラー画像が用いられる。   Further, in the embodiment described above, the configuration for detecting a defect using each pixel of a monochrome image has been described, but the configuration may be such that a defect is detected using each pixel of a color image. If there is no difference in luminance or lightness between the background and the defect and there is a difference in RGB values, it is desirable to use a configuration in which each pixel of the color image is used to detect the defect. For example, in the case of lightness, the RGB values of the background are RGB values (100, 50, 30) and the RGB values of the defect are not different when they are RGB values (30, 100, 50). , Color images are used.

このことから、画素値は、撮像画像がグレースケール方式の場合は階調値とし、RGB方式である場合、R,G,Bの3成分から算出される値を用いてもよい。R,G,Bの3成分から算出される値の例として、3成分の平均値あるいは最大値、明度成分、輝度成分に変換した値が挙げられる。   From this, the pixel value may be a gradation value when the captured image is a gray scale method, and may be a value calculated from three components of R, G, and B when it is an RGB method. Examples of values calculated from three components of R, G, and B include an average value or maximum value of three components, a value converted into a lightness component, and a value converted into a luminance component.

(2)上述した実施の形態において、検査前に撮像した欠陥が存在しないことが既知である良品の撮像画像を用いて、検査対象物10の各画素の画素値の勾配方向を算出する構成であってもよい。具体的には、検査前の事前処理として、検査装置100のプロセッサ110は、検査対象物10の良品の撮像画像を取得して、良品の撮像画像を標準化処理する。プロセッサ110は、良品の撮像画像の各画素について、当該画素の各隣接画素の画素値と当該画素の画素値とを比較することにより当該画素の画素値の勾配方向を算出して、当該算出された各画素の画素値の勾配方向をメモリ112に記憶する。   (2) In the above-described embodiment, the gradient direction of the pixel value of each pixel of the inspection object 10 is calculated by using a non-defective imaging image known to have no defect imaged before the inspection. It may be. Specifically, as pre-processing before inspection, the processor 110 of the inspection apparatus 100 acquires a non-defective imaged image of the inspection object 10 and standardizes the non-defective imaged image. The processor 110 calculates the gradient direction of the pixel value of the pixel by comparing the pixel value of each adjacent pixel of the pixel with the pixel value of the pixel for each pixel of the non-defective captured image. The gradient direction of the pixel value of each pixel is stored in the memory 112.

続いて、検査時の処理として、プロセッサ110は、検査対象物10の撮像画像を取得し、当該撮像画像の各画素について、当該画素に対応する、当該良品の撮像画像の画素の画素値の勾配方向を微分方向として当該画素をn階以上微分して、当該画素のn階微分絶対値を算出する。すなわち、プロセッサ110は、良品の撮像画像の座標Gの画素の画素値の勾配方向を、検査対象物10の撮像画像の座標Gの画素の微分方向として当該画素をn階以上微分して、当該画素のn階微分絶対値を算出する。そして、プロセッサ110は、撮像画像の各画素のうち、算出されたn階微分絶対値が閾値以上である画素を、検査対象物の欠陥の輪郭周辺画素として抽出する。   Subsequently, as processing at the time of inspection, the processor 110 acquires a captured image of the inspection object 10, and for each pixel of the captured image, the gradient of the pixel value of the pixel of the non-defective captured image corresponding to the pixel The direction is differentiated, and the pixel is differentiated n or more times to calculate the n-th order differential absolute value of the pixel. That is, the processor 110 differentiates the gradient direction of the pixel value of the pixel at the coordinate G of the non-defective captured image as n pixels or more of the pixel as the differential direction of the pixel at the coordinate G of the captured image of the inspection object 10 Calculate the nth-order derivative absolute value of the pixel. Then, the processor 110 extracts a pixel having a calculated nth-order differential absolute value equal to or more than a threshold among the pixels of the captured image as a contour peripheral pixel of the defect of the inspection object.

これにより、検査時には各画素の微分方向が既知であるため、検査対象物10について標準化工程および方向算出工程を行なう必要がないことから、検査時間を短縮できる。   As a result, since the differentiation direction of each pixel is known at the time of inspection, it is not necessary to perform the standardization process and the direction calculation process for the inspection object 10, so the inspection time can be shortened.

(3)上記の(2)では、良品の撮像画像を用いて検査対象物10の各画素の輝度勾配方向を算出する構成について説明したが、良品か否かが既知ではない複数の検査対象物の撮像画像を用いて、検査対象物10の各画素の輝度勾配方向を算出する構成であってもよい。   (3) In the above (2), although the configuration for calculating the brightness gradient direction of each pixel of the inspection object 10 using the non-defective pickup image has been described, a plurality of inspection objects for which it is not known The brightness gradient direction of each pixel of the inspection object 10 may be calculated using the captured image of the above.

例えば、プロセッサ110は、複数の検査対象物の撮像画像における輝度の平均値を画素ごとに算出し、リファレンス画像として、当該平均値を各画素の輝度とした平均化画像を生成する。あるいは、プロセッサ110は、複数の検査対象物の撮像画像における輝度の中央値を画素ごとに算出し、リファレンス画像として、当該中央値を各画素の輝度とした中央値画像を生成する。そして、プロセッサ110は、リファレンス画像(すなわち、平均化画像、あるいは中央値画像)の各画素について、輝度勾配方向を算出し、当該算出された各画素の輝度勾配方向をメモリ112に記憶する。以降の処理は、上記(2)と同様である。これにより、検査時には各画素の微分方向が既知であるため、検査対象物10について標準化工程および方向算出工程を行なう必要がないことから、検査時間を短縮できる。   For example, the processor 110 calculates, for each pixel, an average value of luminance in captured images of a plurality of inspection objects, and generates an averaged image with the average value as the luminance of each pixel as a reference image. Alternatively, the processor 110 calculates, for each pixel, the median value of luminance in the captured images of a plurality of inspection objects, and generates a median value image in which the median value is the luminance of each pixel as a reference image. Then, the processor 110 calculates the brightness gradient direction for each pixel of the reference image (that is, the averaged image or the median image), and stores the calculated brightness gradient direction of each pixel in the memory 112. The subsequent processing is the same as the above (2). As a result, since the differentiation direction of each pixel is known at the time of inspection, it is not necessary to perform the standardization process and the direction calculation process for the inspection object 10, so the inspection time can be shortened.

特に、上述したパワー半導体チップ10Aのように、製造プロセスに起因して外周部の色味が濃くなる傾向があることが既知である場合、外周部の色味の濃さがチップごとに異なる場合(例えば、薄い色味のチップが混在している場合)等において、製品個別の勾配方向のばらつきを平均化して精度よく輝度勾配方向を算出できる。   In particular, when it is known that the color tone of the outer peripheral portion tends to be dark due to the manufacturing process as in the power semiconductor chip 10A described above, the color density of the outer peripheral portion is different for each chip (For example, in the case where chips of light color are mixed) or the like, it is possible to calculate the brightness gradient direction with high accuracy by averaging the variations in the gradient direction of individual products.

(4)上述した実施の形態において、リファレンス画像において、輝度勾配方向が画像全体または検査エリアに対して一様ではなく、隣接画素ごとに微細に変化する場合には、平滑化処理を行わずに輝度勾配方向を取得してもよい。なぜなら、このような場合には、実際には輝度勾配方向が画素単位でランダムな傾向があっても、平滑化してしまうと隣接画素の輝度勾配方向が似通った方向になることから、実在しない濃淡のうねりが発生しノイズとなるためである。したがって、平滑化処理を実行せずに実際の輝度勾配方向を反映させることでS/N比を増大させる。   (4) In the embodiment described above, in the reference image, when the brightness gradient direction is not uniform with respect to the entire image or the inspection area and minutely changes for each adjacent pixel, the smoothing process is not performed. The luminance gradient direction may be acquired. This is because, in such a case, even if the luminance gradient direction tends to be random on a pixel basis in actuality, since the luminance gradient directions of adjacent pixels will be similar if smoothed, non-existent light and shade This is because swells occur and become noise. Therefore, the S / N ratio is increased by reflecting the actual brightness gradient direction without executing the smoothing process.

欠陥サイズが画素よりも小さい場合、画素の輝度には背景由来の成分と欠陥由来の成分の両方が含まれる。この場合、欠陥サイズ以上の面積について平均化した輝度を画素が有しているため、既に平滑化後と同様の状態である。そのため、検査対象である欠陥のサイズが小さい、カメラの解像度が低い場合など画素サイズが欠陥に対して大きくなる場合にも平滑化処理をせずに、実際の輝度勾配方向を反映させることでS/N比を増大させる。   When the defect size is smaller than the pixel, the brightness of the pixel includes both the component derived from the background and the component derived from the defect. In this case, since the pixel has the luminance averaged for the area larger than the defect size, the state is the same as that after the smoothing. Therefore, even when the size of the defect to be inspected is small or the resolution of the camera is low, for example, when the pixel size is larger than the defect, the actual brightness gradient direction is reflected without smoothing processing. Increase the / N ratio.

(5)上述した実施の形態において、撮像画像の平滑化処理を、m×m(mは自然数)のマトリクス状の画素ブロックごとに実行する構成であってもよい。具体的には、プロセッサ110は、平滑化処理として、撮像画像をマトリクス状の複数の画素ブロックに区切り、各画素ブロックについて、当該画素ブロックを構成する複数の画素の画素値の平均値(あるいは、中央値)を算出し、当該平均値(あるいは、中央値)を当該画素ブロックの画素値(すなわち、複数の画素の画素値)に設定する処理を実行する。上記のmの値は、ユーザにより任意に設定される。   (5) In the above-described embodiment, the smoothing processing of the captured image may be performed for each pixel block of m × m (m is a natural number) matrix. Specifically, the processor 110 divides the captured image into a plurality of pixel blocks in a matrix as smoothing processing, and for each pixel block, an average value of pixel values of a plurality of pixels constituting the pixel block (or A median value is calculated, and the average value (or median value) is set to the pixel value of the pixel block (that is, the pixel value of a plurality of pixels). The value of m above is arbitrarily set by the user.

上記の平滑化処理は、検査対象物の欠陥のサイズが既知であり、欠陥のサイズがm個の画素数以下である場合に有用である。なぜなら、欠陥サイズが既知の場合、欠陥サイズ以上の画素ブロックを1つの擬似的な画素のように扱って平滑化することにより、微小なサイズの濃淡のうねりの影響(すなわち、ノイズ)を低減できるためである。   The above smoothing process is useful when the size of the defect of the inspection object is known and the size of the defect is equal to or less than m pixels. This is because, when the defect size is known, the influence of small-sized light and shade waves (ie, noise) can be reduced by treating pixel blocks larger than the defect size like one pseudo pixel and smoothing them. It is for.

(6)上述の実施の形態として例示した構成は、本発明の構成の一例であり、別の公知の技術と組み合わせることも可能であるし、本発明の要旨を逸脱しない範囲で、一部を省略する等、変更して構成することも可能である。   (6) The configuration exemplified as the above-described embodiment is an example of the configuration of the present invention, and can be combined with another known technique, and a part of the configuration can be made without departing from the scope of the present invention. It is also possible to change and configure, such as omitting.

また、上述した実施の形態において、他の実施の形態で説明した処理および構成を適宜採用して実施する場合であってもよい。   In the embodiment described above, the processes and configurations described in the other embodiments may be adopted appropriately and implemented.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   It should be understood that the embodiments disclosed herein are illustrative and non-restrictive in every respect. The scope of the present invention is indicated not by the above description but by the claims, and is intended to include all modifications within the meaning and scope equivalent to the claims.

8 カメラ、9 搬送機構、10 検査対象物、10A パワー半導体チップ、11 主電極、12 終端構造部、13 ゲート電極、20,51 欠陥、81〜84,91〜93,501〜504,510,520,550 集合体、100 検査装置、110 プロセッサ、112 メモリ、114 ディスプレイ、116 カメラインターフェイス、118 入力インターフェイス、120 通信インターフェイス、122 メモリインターフェイス、202 画像取得部、204 標準化処理部、206 方向算出部、208 微分演算部、210 抽出部、212 判定部、401,402,411〜416 微分フィルタ、1000 検査システム。   DESCRIPTION OF SYMBOLS 8 camera, 9 conveyance mechanism, 10 inspection object, 10A power semiconductor chip, 11 main electrode, 12 termination structure part, 13 gate electrode, 20, 51 defects, 81 to 84, 91 to 93, 501 to 504, 510, 520 , 550 assembly, 100 inspection apparatus, 110 processor, 112 memory, 114 display, 116 camera interface, 118 input interface, 120 communication interface, 122 memory interface, 202 image acquisition unit, 204 standardization processing unit, 206 direction calculation unit, 208 Differential operation unit, 210 extraction units, 212 determination units, 401, 402, 411 to 416 differential filters, 1000 inspection systems.

Claims (11)

検査対象物の表面上の欠陥を検出する検査方法であって、
前記検査対象物の撮像画像を取得するステップと、
前記撮像画像の各画素について、当該画素の各隣接画素の画素値と当該画素の画素値とを比較することにより当該画素の画素値の勾配方向を算出するステップと、
前記撮像画像の各画素について、当該画素の画素値の勾配方向を微分方向として当該画素をn(nは2以上の自然数)階以上微分して当該画素のn階微分値を算出するステップと、
前記撮像画像の各画素のうち、前記算出されたn階微分値の絶対値が閾値以上である画素を、前記検査対象物の欠陥の輪郭周辺画素として抽出するステップとを含む、検査方法。
An inspection method for detecting a defect on the surface of an inspection object, comprising:
Acquiring a captured image of the inspection object;
Calculating, for each pixel of the captured image, the gradient direction of the pixel value of the pixel by comparing the pixel value of each adjacent pixel of the pixel with the pixel value of the pixel;
Calculating, for each pixel of the captured image, an nth-order derivative value of the pixel by differentiating the pixel by n (n is a natural number of 2 or more) floor or more with the gradient direction of the pixel value of the pixel as a differentiation direction;
Extracting a pixel having an absolute value of the calculated nth-order derivative value equal to or greater than a threshold among each pixel of the captured image as an outline peripheral pixel of a defect of the inspection object.
前記撮像画像を標準化するステップをさらに含み、
前記勾配方向を算出するステップは、前記標準化された撮像画像の各画素について、当該画素の画素値の勾配方向を算出することを含む、請求項1に記載の検査方法。
Further including the step of standardizing the captured image;
The inspection method according to claim 1, wherein the step of calculating the gradient direction includes calculating, for each pixel of the standardized captured image, a gradient direction of a pixel value of the pixel.
前記標準化するステップは、複数の前記撮像画像における各画素の画素値の平均値を算出し、前記標準化された撮像画像として、当該平均値を画素値とする第1標準画像を生成することを含む、請求項1または請求項2に記載の検査方法。   The step of standardizing includes calculating an average value of pixel values of each pixel in a plurality of the captured images, and generating a first standard image having the average value as a pixel value as the standardized captured image. The inspection method according to claim 1 or claim 2. 前記標準化するステップは、複数の前記撮像画像における各画素の画素値の中央値を算出し、前記標準化された撮像画像として、当該中央値を画素値とした第2標準画像を生成することを含む、請求項1または請求項2に記載の検査方法。   The step of standardizing includes calculating a median of pixel values of each pixel in a plurality of the captured images, and generating a second standard image having the median as a pixel value as the standardized captured image. The inspection method according to claim 1 or claim 2. 前記標準化するステップは、前記撮像画像に対して平滑化処理を実行して、前記標準化された撮像画像として、平滑化画像を生成することを含む、請求項1または請求項2に記載の検査方法。   The inspection method according to claim 1 or 2, wherein the step of standardizing includes performing smoothing processing on the captured image to generate a smoothed image as the standardized captured image. . 前記平滑化処理は、前記撮像画像をマトリクス状の複数の画素ブロックに区切り、各画素ブロックについて、当該画素ブロックを構成する複数の画素の画素値の平均値を算出し、当該平均値を当該複数の画素の画素値に設定することを含む、請求項5に記載の検査方法。   The smoothing process divides the captured image into a plurality of pixel blocks in a matrix, calculates an average value of pixel values of a plurality of pixels forming the pixel block for each pixel block, and calculates the average value The inspection method according to claim 5, comprising setting to the pixel value of the pixel of. 前記勾配方向を算出するステップは、前記撮像画像の各画素について、当該画素の各隣接画素のうちの第1隣接画素の画素値と当該画素の画素値との差分値が、各隣接画素のうちの残余の隣接画素の画素値と当該画素の画素値との差分値よりも大きい場合、当該画素から前記第1隣接画素への方向を、当該画素の画素値の勾配方向として算出することを含む、請求項1〜請求項6のいずれか1項に記載の検査方法。   In the step of calculating the gradient direction, for each pixel of the captured image, the difference value between the pixel value of the first adjacent pixel among the adjacent pixels of the pixel and the pixel value of the pixel is Calculating the direction from the pixel to the first adjacent pixel as the gradient direction of the pixel value of the pixel if the difference value between the pixel value of the remaining adjacent pixel and the pixel value of the pixel is larger The inspection method according to any one of claims 1 to 6. 互いに隣接する前記輪郭周辺画素の第1集合体の長手方向を取得するステップと、
前記第1集合体の長手方向において、前記第1集合体から予め定められた距離内に他の前記輪郭周辺画素の第2集合体が存在するか否かを判定するステップと、
前記第2集合体が存在する場合に、前記第1集合体および前記第2集合体を、1つの前記輪郭周辺画素の集合体として抽出するステップとをさらに含む、請求項1〜請求項7のいずれか1項に記載の検査方法。
Obtaining the longitudinal direction of the first set of neighboring pixels of the contour periphery adjacent to each other;
Determining whether there is a second set of other contour peripheral pixels within a predetermined distance from the first set in the longitudinal direction of the first set;
8. The method according to claim 1, further comprising the step of extracting the first and second aggregates as a collection of one of the contour peripheral pixels when the second collection exists. The inspection method according to any one of the items.
前記第1集合体の重心および短手方向を取得するステップと、
前記第1集合体の短手方向において、前記第1集合体の重心から予め定められた距離内に他の前記輪郭周辺画素の第3集合体が存在するか否かを判定するステップと、
前記第3集合体が存在する場合に、前記第1集合体および前記第3集合体を、1つの前記輪郭周辺画素の集合体として抽出するステップとをさらに含む、請求項8に記載の検査方法。
Acquiring a center of gravity and a lateral direction of the first assembly;
Determining whether there is a third aggregate of other contour peripheral pixels within a predetermined distance from the center of gravity of the first aggregate in the lateral direction of the first aggregate;
9. The method according to claim 8, further comprising the step of extracting the first and third aggregates as a collection of one of the contour peripheral pixels, when the third collection is present. .
前記第1集合体の短手方向において、前記第1集合体の長手方向の一端の画素から予め定められた距離内に他の前記輪郭周辺画素の第4集合体が存在するか否かを判定するステップと、
前記第4集合体が存在する場合に、前記第1集合体および前記第4集合体を、1つの前記輪郭周辺画素の集合体として抽出するステップとをさらに含む、請求項9に記載の検査方法。
It is determined whether or not a fourth aggregate of other contour peripheral pixels is present within a predetermined distance from a pixel at one end in the longitudinal direction of the first aggregate in the lateral direction of the first aggregate. Step to
The method according to claim 9, further comprising the step of extracting the first aggregate and the fourth aggregate as an aggregate of one of the contour peripheral pixels, when the fourth aggregate is present. .
検査対象物の表面上の欠陥を検出する検査装置であって、
前記検査対象物の撮像画像を取得する画像取得部と、
前記撮像画像の各画素について、当該画素の各隣接画素の画素値と当該画素の画素値とを比較することにより当該画素の画素値の勾配方向を算出する方向算出部と、
前記撮像画像の各画素について、当該画素の画素値の勾配方向を微分方向として当該画素をn(nは2以上の自然数)階以上微分して当該画素のn階微分値を算出する微分演算部と、
前記撮像画像の各画素のうち、前記算出されたn階微分値の絶対値が閾値以上である画素を、前記検査対象物の欠陥の輪郭周辺画素として抽出する抽出部とを備える、検査装置。
An inspection apparatus for detecting a defect on the surface of an inspection object, comprising:
An image acquisition unit that acquires a captured image of the inspection object;
A direction calculation unit that calculates, for each pixel of the captured image, the gradient direction of the pixel value of the pixel by comparing the pixel value of each pixel adjacent to the pixel with the pixel value of the pixel;
A differential operation unit that differentiates the pixel by n (where n is a natural number of 2 or more) ranks or more with respect to each pixel of the captured image with the gradient direction of the pixel value of the pixel as the differentiation direction When,
An inspection unit comprising: an extraction unit which extracts, of each pixel of the captured image, a pixel whose absolute value of the calculated nth-order derivative value is equal to or greater than a threshold as an outline peripheral pixel of a defect of the inspection object.
JP2017218157A 2017-11-13 2017-11-13 Inspection method, and inspection device Pending JP2019090643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017218157A JP2019090643A (en) 2017-11-13 2017-11-13 Inspection method, and inspection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017218157A JP2019090643A (en) 2017-11-13 2017-11-13 Inspection method, and inspection device

Publications (1)

Publication Number Publication Date
JP2019090643A true JP2019090643A (en) 2019-06-13

Family

ID=66837301

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017218157A Pending JP2019090643A (en) 2017-11-13 2017-11-13 Inspection method, and inspection device

Country Status (1)

Country Link
JP (1) JP2019090643A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102625717B1 (en) * 2023-06-23 2024-01-17 (주)아이프리즘 Vision egg sorting system
JP7444439B2 (en) 2020-03-05 2024-03-06 国立大学法人 筑波大学 Defect detection classification system and defect judgment training system
WO2024080087A1 (en) * 2022-10-11 2024-04-18 株式会社日立製作所 Inspection condition determination system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7444439B2 (en) 2020-03-05 2024-03-06 国立大学法人 筑波大学 Defect detection classification system and defect judgment training system
WO2024080087A1 (en) * 2022-10-11 2024-04-18 株式会社日立製作所 Inspection condition determination system
KR102625717B1 (en) * 2023-06-23 2024-01-17 (주)아이프리즘 Vision egg sorting system

Similar Documents

Publication Publication Date Title
Zhou et al. A surface defect detection framework for glass bottle bottom using visual attention model and wavelet transform
JP4095860B2 (en) Defect inspection method and apparatus
JP6745173B2 (en) Image inspection apparatus, image inspection method, image inspection program, computer-readable recording medium, and recorded device
US9518931B2 (en) Image inspection apparatus, image inspection method, image inspection program, computer-readable recording medium and recording device
JP4160258B2 (en) A new perceptual threshold determination for gradient-based local contour detection
US11386549B2 (en) Abnormality inspection device and abnormality inspection method
US20120207379A1 (en) Image Inspection Apparatus, Image Inspection Method, And Computer Program
KR100734935B1 (en) Area segmentation of an image
JP2019090643A (en) Inspection method, and inspection device
JP2005172559A (en) Method and device for detecting line defect on panel
CN115272256A (en) Sub-pixel level sensing optical fiber path Gaussian extraction method and system
US20080249728A1 (en) Method for detecting defects on the back side of a semiconductor wafer
JP6045429B2 (en) Imaging apparatus, image processing apparatus, and image processing method
TW201510517A (en) Method and system for improving wafer surface inspection sensitivity
JP2008014842A (en) Method and apparatus for detecting stain defects
CN116958058A (en) Lens dirt detection method and device and image detection equipment
KR20140082333A (en) Method and apparatus of inspecting mura of flat display
JP2005283197A (en) Detecting method and system for streak defect of screen
CN115423756A (en) Method for obtaining information of wafer edge point and positioning wafer
JP2007285868A (en) Luminance gradient detection method, flaw detection method, luminance gradient detector and flaw detector
JP2008171142A (en) Spot defect detection method and device
TW200842339A (en) Mura detection method and system
Stellari et al. Automated contactless defect analysis technique using computer vision
JP2004163113A (en) Visual examination device of component for electronic circuit
KR100902301B1 (en) Defect inspection system