JP7415215B1 - Visual inspection equipment - Google Patents

Visual inspection equipment Download PDF

Info

Publication number
JP7415215B1
JP7415215B1 JP2023143725A JP2023143725A JP7415215B1 JP 7415215 B1 JP7415215 B1 JP 7415215B1 JP 2023143725 A JP2023143725 A JP 2023143725A JP 2023143725 A JP2023143725 A JP 2023143725A JP 7415215 B1 JP7415215 B1 JP 7415215B1
Authority
JP
Japan
Prior art keywords
image
workpiece
captured
reference image
focus
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.)
Active
Application number
JP2023143725A
Other languages
Japanese (ja)
Inventor
啓順 北田
達也 山口
Original Assignee
ダイトロン株式会社
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 ダイトロン株式会社 filed Critical ダイトロン株式会社
Priority to JP2023143725A priority Critical patent/JP7415215B1/en
Application granted granted Critical
Publication of JP7415215B1 publication Critical patent/JP7415215B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

【課題】ワークの破損を抑えつつ、分解能の高いワークの側面の画像を取得することができる外観検査装置を提供する。【解決手段】本発明の外観検査装置1は、複数の異なる位置においてワークWの側面Ws1,Ws2を撮像して複数の撮像画像Pを取得する撮像装置31,32と、撮像画像Pから第1特徴部Wc1を検出する第1特徴検出処理と、第1特徴部Wc1の合焦度を評価する第1合焦度評価処理と、複数の撮像画像Pにおける第1特徴部Wc1の合焦度を比較することで、複数の撮像画像Pの一つを第1基準画像Ps1に選定する第1基準画像選定処理と、第1基準画像Ps1における第1特徴部Wc1を含む領域である特徴領域Rcと、第1基準画像Ps1以外の撮像画像Pにおける特徴領域Rcに対応する領域である被検査領域Riに基づいて、ワークWを評価する評価処理と、を実行する。【選択図】図8An object of the present invention is to provide an appearance inspection device that can obtain a high-resolution image of a side surface of a workpiece while suppressing damage to the workpiece. An appearance inspection apparatus 1 of the present invention includes imaging devices 31 and 32 that capture images of side surfaces Ws1 and Ws2 of a workpiece W at a plurality of different positions to obtain a plurality of captured images P, and a first A first feature detection process that detects the feature part Wc1, a first focus degree evaluation process that evaluates the degree of focus of the first feature part Wc1, and a first feature evaluation process that evaluates the degree of focus of the first feature part Wc1 in a plurality of captured images P. A first reference image selection process in which one of the plurality of captured images P is selected as the first reference image Ps1 by comparing, and a characteristic region Rc that is an area including the first characteristic portion Wc1 in the first reference image Ps1. , an evaluation process for evaluating the workpiece W based on the region to be inspected Ri, which is a region corresponding to the characteristic region Rc in the captured image P other than the first reference image Ps1. [Selection diagram] Figure 8

Description

本発明は、検査対象物(ワーク)の外観を撮像する外観検査装置に関する。 The present invention relates to an appearance inspection device that images the appearance of an object to be inspected (work).

ワークの外観をカメラ等の撮像装置で撮像して画像を取得し、取得した画像からワーク形状の異常や異物の付着等がないか確認する外観検査が行われている。このような外観検査をワークの側面について行う場合、通常、ワークの側面が撮像装置と対向するようにワークを搬送してワークの側面を撮像したり、被写界深度の深いレンズを使用してワークの側面を斜め方向から撮像したりすることがある。 An external appearance inspection is performed in which an image of the external appearance of a workpiece is captured using an imaging device such as a camera, and the acquired image is used to check whether there is any abnormality in the shape of the workpiece, adhesion of foreign matter, or the like. When performing this kind of visual inspection on the side of a workpiece, the workpiece is usually transported so that the side of the workpiece faces the imaging device, and the side of the workpiece is imaged, or a lens with a deep depth of field is used. The side of the workpiece may be imaged from an oblique direction.

特開2007-303853号公報Japanese Patent Application Publication No. 2007-303853

しかし、ワークを搬送してその側面を撮像する方法では、搬送時にワークにキズや異物が付着してワークを破損するおそれがある。また、被写界深度の深いレンズを使用する方法では、レンズの開口数が小さいため、分解能の高い画像を取得できないおそれがある。 However, in the method of transporting the workpiece and photographing its side surface, there is a risk that scratches or foreign matter may adhere to the workpiece during transport and damage the workpiece. Furthermore, in the method of using a lens with a deep depth of field, since the numerical aperture of the lens is small, there is a possibility that a high-resolution image cannot be obtained.

本発明は、上記の点に鑑みてなされたものであり、ワークの破損を抑えつつ、分解能の高いワークの側面の画像を取得することができる外観検査装置を提供することを目的とする。 The present invention has been made in view of the above-mentioned points, and an object of the present invention is to provide an appearance inspection device that can obtain a high-resolution image of the side surface of a workpiece while suppressing damage to the workpiece.

本発明は以下に示される実施形態を含む。 The present invention includes the embodiments shown below.

[1] ワークの側面を撮像して撮像画像を生成する撮像装置と、前記撮像装置を前記ワークの側面に沿って移動させる移動機構と、前記撮像画像に対する画像処理を実行する画像処理部と、を備えた外観検査装置であって、前記撮像装置は、前記移動機構によって移動させられる複数の異なる位置において前記ワークの側面を撮像して複数の前記撮像画像を取得し、前記画像処理部は、前記撮像画像から第1特徴部を検出する第1特徴検出処理と、前記第1特徴部の合焦度を評価する第1合焦度評価処理と、複数の前記撮像画像における前記第1特徴部の合焦度を比較することで、複数の前記撮像画像の一つを第1基準画像に選定する第1基準画像選定処理と、前記第1基準画像における前記第1特徴部を含む領域である特徴領域と、前記第1基準画像以外の前記撮像画像における領域であって前記第1基準画像の中で前記特徴領域が占める位置に対応する位置に設けられた前記特徴領域に対応する領域である被検査領域に基づいて、前記ワークを評価する評価処理と、を実行する外観検査装置。 [1] An imaging device that captures a side surface of a workpiece to generate a captured image, a movement mechanism that moves the imaging device along the side surface of the workpiece, and an image processing unit that performs image processing on the captured image; An appearance inspection apparatus comprising: the imaging device capturing images of a side surface of the workpiece at a plurality of different positions moved by the moving mechanism to obtain a plurality of captured images; and the image processing unit: a first feature detection process that detects a first feature from the captured image; a first focus evaluation process that evaluates the degree of focus of the first feature; and the first feature in the plurality of captured images. a first reference image selection process of selecting one of the plurality of captured images as a first reference image by comparing the degree of focus of the first reference image; and a region including the first characteristic part in the first reference image. a characteristic region; and an area in the captured image other than the first reference image that corresponds to the characteristic region and is provided at a position corresponding to the position occupied by the characteristic region in the first reference image. An appearance inspection device that performs an evaluation process of evaluating the workpiece based on an area to be inspected.

[2] 前記画像処理部は、前記第1基準画像選定処理において複数の前記撮像画像の一部の前記撮像画像について前記第1特徴部の合焦度を比較することで前記第1基準画像に選定する、上記[1]に記載の外観検査装置。 [2] In the first reference image selection process, the image processing unit selects the first reference image by comparing the degrees of focus of the first characteristic portions of some of the plurality of captured images. The external appearance inspection device according to [1] above.

[3] 前記画像処理部は、前記特徴領域と前記被検査領域とを繋ぎ合わせて前記ワークの側面を表す合成画像を生成する合成処理を実行する、上記[1]又は[2]に記載の外観検査装置。 [3] The image processing unit according to [1] or [2] above executes a compositing process that connects the characteristic region and the inspected region to generate a composite image representing a side surface of the workpiece. Appearance inspection equipment.

[4] 複数の前記撮像装置を備え、複数の前記撮像装置が、前記移動機構によって前記側面に沿って一体に移動させられ、同期して前記側面を撮像して複数の前記撮像画像をそれぞれ取得する、上記[1]~[3]のいずれか1つに記載の外観検査装置。 [4] A plurality of the imaging devices are provided, and the plurality of imaging devices are moved together by the moving mechanism along the side surface, and synchronously image the side surface to obtain a plurality of captured images, respectively. The visual inspection device according to any one of [1] to [3] above.

[5] 前記画像処理部は、前記撮像画像から前記第1特徴部と異なる第2特徴部を検出する第2特徴検出処理と、前記第2特徴部の合焦度を評価する第2合焦度評価処理と、複数の前記撮像画像における前記第2特徴部の合焦度を比較することで、複数の前記撮像画像の一つを第2基準画像に選定する第2基準画像選定処理と、前記第1基準画像における前記第1特徴部の位置と、前記第2基準画像における前記2特徴部の位置とに基づいて、前記被検査領域を補正する補正処理を実行する、上記[1]~[4]いずれか1つに記載の外観検査装置。 [5] The image processing unit performs a second feature detection process that detects a second feature that is different from the first feature from the captured image, and a second focus that evaluates the degree of focus of the second feature. a second reference image selection process of selecting one of the plurality of captured images as a second reference image by comparing the degree of focus of the second characteristic portion in the plurality of captured images; [1] above, wherein a correction process is executed to correct the inspection area based on the position of the first characteristic part in the first reference image and the position of the two characteristic parts in the second reference image. [4] The visual inspection device according to any one of the above.

本発明によれば、ワークの破損を抑えつつ、分解能の高いワークの側面の画像を取得することができる。 According to the present invention, it is possible to obtain a high-resolution image of the side surface of a workpiece while suppressing damage to the workpiece.

本発明の一実施形態にかかる外観検査装置の概略構成を示す図A diagram showing a schematic configuration of an appearance inspection device according to an embodiment of the present invention 外観検査装置の構成を示すブロック図Block diagram showing the configuration of the visual inspection device 外観検査装置の側面撮像装置が撮像した画像を例示する図A diagram illustrating an image captured by the side imaging device of the appearance inspection device. 領域設定部が特徴領域を設定する方法を説明する図Diagram illustrating how the region setting unit sets feature regions 領域設定部が被検査領域を設定する方法を説明する図Diagram explaining how the area setting unit sets the inspection area 領域設定部が設定した特徴領域及び被検査領域を例示する図A diagram illustrating the characteristic region and the inspected region set by the region setting unit 外観検査装置で作成される合成画像の一例を示す図Diagram showing an example of a composite image created by a visual inspection device 外観検査装置の検査処理を示すフローチャートFlowchart showing the inspection process of the visual inspection device 本発明の変更例1にかかる外観検査装置の構成を示すブロック図A block diagram showing the configuration of a visual inspection device according to modification example 1 of the present invention. 本発明の変更例1において補正部が第1特徴部の位置を特定する方法を説明する図A diagram illustrating a method for the correction unit to specify the position of the first characteristic portion in Modification Example 1 of the present invention 本発明の変更例1において補正部が第2特徴部の位置を特定する方法を説明する図A diagram illustrating a method for the correction unit to specify the position of the second characteristic portion in Modification Example 1 of the present invention 本発明の変更例1において補正部が被検査領域Riを補正する方法を説明する図A diagram illustrating a method by which the correction unit corrects the inspection area Ri in Modification Example 1 of the present invention

以下、本発明の一実施形態について図面を参照して説明する。 Hereinafter, one embodiment of the present invention will be described with reference to the drawings.

(1)外観検査装置1の構成
まず、本実施形態の外観検査装置1の構成について、図1及び図2に基づいて説明する。外観検査装置1は、図1及び図2に示すように、ステージ2と、撮像部3と、移動機構4と、制御装置5とを備え、ステージ2に載置されたワークWの側面Ws1、Ws2を撮像して検査する装置である。
(1) Configuration of visual inspection device 1 First, the configuration of visual inspection device 1 of this embodiment will be described based on FIGS. 1 and 2. As shown in FIGS. 1 and 2, the appearance inspection apparatus 1 includes a stage 2, an imaging section 3, a moving mechanism 4, and a control device 5, and includes a side surface Ws1 of a workpiece W placed on the stage 2, This is a device that images and inspects Ws2.

以下の説明において、側面Ws1,Ws2が対向する方向(図1において矢符Xで示す方向)を左右方向Xとし、図1の紙面に対して垂直な方向を前後方向Yとし、図1において矢印Zで示す方向を上下方向とする。また、撮像部3で撮像されたワークWの側面Ws1,Ws2の撮像画像においても、ステージ2に載置されたときに前後方向Yに相当する側面Ws1,Ws2の長手方向を矢印Yで示し、上下方向を矢印Zで示す。 In the following explanation, the direction in which the side surfaces Ws1 and Ws2 face each other (the direction indicated by the arrow X in FIG. 1) is referred to as the left-right direction X, the direction perpendicular to the paper surface of FIG. 1 is referred to as the front-back direction Y, and The direction indicated by Z is the up-down direction. Also, in the captured images of the side surfaces Ws1 and Ws2 of the workpiece W captured by the imaging unit 3, the longitudinal direction of the side surfaces Ws1 and Ws2, which corresponds to the front-rear direction Y when placed on the stage 2, is indicated by an arrow Y. The vertical direction is indicated by an arrow Z.

ステージ2は、検査対象のワークWが載置される。なお、テージ2の上に載置されたワークWは、その側面Ws1、Ws2が後述する側面撮像装置31,32と斜め方向に対向する。 On the stage 2, a workpiece W to be inspected is placed. Note that the workpiece W placed on the stage 2 has side surfaces Ws1 and Ws2 obliquely facing side imaging devices 31 and 32, which will be described later.

撮像部3は、対物レンズが取り付けられたCCD(Charge CoupledDevice)カメラやCMOS(Complementary Metal Oxide Semiconductor)カメラを備える側面撮像装置31,32を備える。側面撮像装置31,32は、ステージ2に載置されたワークWの側面Ws1、Ws2を斜め上方から撮影する。 The imaging unit 3 includes side imaging devices 31 and 32 that include a CCD (Charge Coupled Device) camera or a CMOS (Complementary Metal Oxide Semiconductor) camera to which an objective lens is attached. The side imaging devices 31 and 32 photograph side surfaces Ws1 and Ws2 of the workpiece W placed on the stage 2 from diagonally above.

より具体的には、側面撮像装置31は、ワークWの一方の側面Ws1の法線方向H1に対して光軸L1が角度θだけ斜め上方に傾斜するように配置され、ワークWの側面Ws1の上下方向Zの一部分のみが撮像範囲(視野)に含まれ、ワークWの側面Ws1の前後方向Yの全体が撮像範囲に入るように設定されている。 More specifically, the side imaging device 31 is arranged such that the optical axis L1 is inclined obliquely upward by an angle θ with respect to the normal direction H1 of one side surface Ws1 of the workpiece W, and It is set so that only a part of the vertical direction Z is included in the imaging range (field of view), and the entire front-back direction Y of the side surface Ws1 of the workpiece W is included in the imaging range.

側面撮像装置32は、側面撮像装置31と左右対称に配置された同一構造の装置から構成されている。つまり、側面撮像装置32は、ワークWの側面Ws2の法線方向H2に対して光軸L2が角度θだけ斜め上方に傾斜するように配置され、ワークWの側面Ws2の上下方向Zの一部分のみが撮像範囲に含まれ、ワークWの側面Ws2の前後方向Yの全体が撮像範囲に入るように設定されている。 The side imaging device 32 is configured from a device having the same structure and arranged laterally symmetrically with the side imaging device 31. That is, the side imaging device 32 is arranged such that the optical axis L2 is inclined obliquely upward by an angle θ with respect to the normal direction H2 of the side surface Ws2 of the workpiece W, and only a portion of the side surface Ws2 of the workpiece W in the vertical direction Z is disposed. is included in the imaging range, and the entire side surface Ws2 of the workpiece W in the front-rear direction Y is set to fall within the imaging range.

側面撮像装置31,32は、ワークWを撮像して生成した撮像画像を制御装置5へ出力する。なお、撮像部3と制御装置5とは、無線接続であってもよいし有線接続であってもよい。 The side imaging devices 31 and 32 capture images of the workpiece W and output the generated captured images to the control device 5. Note that the imaging unit 3 and the control device 5 may be connected wirelessly or by wire.

移動機構4は、側面撮像装置31、32が固定された保持ベース41と、保持ベース41を上下方向へ摺動可能に保持するガイドレール42と、保持ベース41をガイドレール42に沿って上下動させる不図示の駆動部と、を備える。移動機構4は、左右前後方向への移動を制限しつつ上下方向のみへ側面撮像装置31、32を一体に移動させる。 The moving mechanism 4 includes a holding base 41 to which the side imaging devices 31 and 32 are fixed, a guide rail 42 that holds the holding base 41 slidably in the vertical direction, and a holding base 41 that moves the holding base 41 up and down along the guide rail 42. and a drive unit (not shown) that causes the drive unit to move. The moving mechanism 4 moves the side imaging devices 31 and 32 together only in the vertical direction while restricting movement in the left-right, front-back, and front-back directions.

制御装置5は、コンピュータなどの処理装置51と、メモリーなどの記憶装置52とを有しており、記憶装置52に記憶されているプログラムを処理装置51が読み込んで実行することにより、装置制御部53、データ取得部54、及び画像処理部60として機能する。 The control device 5 includes a processing device 51 such as a computer, and a storage device 52 such as a memory, and when the processing device 51 reads and executes a program stored in the storage device 52, the device control unit 53, a data acquisition section 54, and an image processing section 60.

装置制御部53は、側面撮像装置31,32と移動機構4とを制御して、側面撮像装置31,32を上下方向Zへ移動させつつ、側面撮像装置31,32によってワークWの側面Ws1、Ws2を同期して撮像する。 The device control unit 53 controls the side image pickup devices 31 and 32 and the moving mechanism 4 to move the side image pickup devices 31 and 32 in the vertical direction Z, while using the side image pickup devices 31 and 32 to capture the side surfaces Ws1 and 1 of the workpiece W. Ws2 is imaged in synchronization.

具体的には、装置制御部53は、撮像開始位置から撮像終了位置までワークWの側面Ws1、Ws2に沿って側面撮像装置31,32が上下方向Zへ移動するように、移動機構4を制御する。撮像開始位置は、側面撮像装置31,32の撮像範囲にワークWの側面Ws1,Ws2の上端E1が含まれる位置に設定される。撮像終了位置は、側面撮像装置31,32の撮像範囲にワークWの側面Ws1,Ws2の下端E2が含まれる位置に設定される。 Specifically, the device control unit 53 controls the moving mechanism 4 so that the side imaging devices 31 and 32 move in the vertical direction Z along the side surfaces Ws1 and Ws2 of the workpiece W from the imaging start position to the imaging end position. do. The imaging start position is set to a position where the upper end E1 of the side surfaces Ws1, Ws2 of the workpiece W is included in the imaging range of the side imaging devices 31, 32. The imaging end position is set to a position where the lower ends E2 of the side surfaces Ws1 and Ws2 of the workpiece W are included in the imaging range of the side imaging devices 31 and 32.

また、装置制御部53は、移動機構4によって側面撮像装置31,32が撮像開始位置から撮像終了位置まで移動する間、側面撮像装置31,32が上下方向Zに所定距離(以下の、この距離を「撮像ピッチ」ということもある)Dだけ移動する毎に、ワークWの側面Ws1、Ws2の上下方向Zの一部を撮像する。 In addition, while the side imaging devices 31 and 32 are moved by the moving mechanism 4 from the imaging start position to the imaging end position, the device control unit 53 causes the side imaging devices 31 and 32 to move a predetermined distance in the vertical direction Z (hereinafter referred to as this distance). is sometimes referred to as an "imaging pitch"), a portion of the side surfaces Ws1 and Ws2 of the workpiece W in the vertical direction Z is imaged every time the workpiece W moves by D.

ここで、撮像ピッチDは、次の式(1)を満たすように設定され、好ましくは、式(2)を満たすように設定される。 Here, the imaging pitch D is set to satisfy the following equation (1), and preferably, to satisfy the equation (2).

Figure 0007415215000002
Figure 0007415215000002

Figure 0007415215000003
式(1)及び式(2)において、Aは側面撮像装置31,32に設けられた対物レンズ等のレンズの被写界深度、θはワークWの側面Ws1,Ws2の法線方向H1,H2に対する側面撮像装置31、32の光軸L1,L2の角度θである。つまり、撮像ピッチDは、レンズの被写界深度に入る上下方向の最大長さ(A/sinθ)以下に設定され、上記の最大長さの半分以下に設定されることが好ましい。
Figure 0007415215000003
In formulas (1) and (2), A is the depth of field of lenses such as objective lenses provided in the side imaging devices 31 and 32, and θ is the normal direction H1 and H2 of the side surfaces Ws1 and Ws2 of the workpiece W. This is the angle θ of the optical axes L1 and L2 of the side imaging devices 31 and 32 with respect to the angle θ. In other words, the imaging pitch D is set to be less than or equal to the maximum vertical length (A/sin θ) within the depth of field of the lens, and is preferably set to less than half of the above-mentioned maximum length.

図3に示すように、側面撮像装置31,32は、撮像開始位置において撮像したワークWの側面Ws1、Ws2の上端E1が写った撮像画像P1から、撮像終了位置において撮像したワークWの側面Ws1、Ws2の下端E2が写った撮像画像Pnまで、撮像範囲が上下方向Zに撮像ピッチDずつ異なる複数n個(nは2以上の整数)の撮像画像Pのデータを生成する。 As shown in FIG. 3, the side imaging devices 31 and 32 change the side surface Ws1 of the work W captured at the imaging end position from the captured image P1 in which the upper end E1 of the work Ws1 and Ws2 of the work W captured at the imaging start position are captured. , Ws2, up to the captured image Pn in which the lower end E2 of Ws2 is captured, data is generated for a plurality of n captured images P whose imaging ranges differ by the imaging pitch D in the vertical direction Z (n is an integer of 2 or more).

得られた複数n個の撮像画像Pは、側面撮像装置31,32の光軸L1,L2をワークWの側面Ws1、Ws2に対して傾斜させて撮像した画像であるため、上下方向Zの一部分のみが合焦した画像となっている。 The obtained plurality of captured images P are images taken with the optical axes L1, L2 of the side image capturing devices 31, 32 tilted with respect to the side surfaces Ws1, Ws2 of the workpiece W, so that a portion of the captured images P in the vertical direction Z is The image is in focus.

なお、以下の説明において、撮像開始位置において撮像した画像を1番目の撮像画像P1といい、撮像開始位置で撮像してからm枚目に撮像した画像をm番目の撮像画像Pmといい、撮像終了位置において撮像した画像をn番目の撮像画像Pnといい、1~n番目の撮像画像P1~Pnを総称して撮像画像Pという。 In the following description, the image captured at the imaging start position is referred to as the first captured image P1, and the m-th image captured after imaging at the imaging start position is referred to as the m-th captured image Pm. The image captured at the end position is referred to as the nth captured image Pn, and the 1st to nth captured images P1 to Pn are collectively referred to as the captured image P.

データ取得部54は、側面撮像装置31,32でそれぞれ生成された複数n個の撮像画像Pのデータを取得する。データ取得部54では、取得した撮像画像Pのデータと、その撮像画像Pが何番目の撮像画像であるのか(つまり、撮像画像Pの順序数)とが紐付けられる。データ取得部54において紐付けられたデータは記憶装置52に記憶される。 The data acquisition unit 54 acquires data of a plurality of n captured images P generated by the side imaging devices 31 and 32, respectively. The data acquisition unit 54 associates the data of the acquired captured image P with the number of the captured image P (that is, the ordinal number of the captured image P). The data linked in the data acquisition unit 54 is stored in the storage device 52.

画像処理部60は、記憶装置52に記憶された複数n個の撮像画像Pに特徴領域Rs及び被検査領域Rmを設定し、設定した特徴領域Rs及び被検査領域Rmに基づいてワークWの側面Ws1,Ws2を評価する。 The image processing unit 60 sets a characteristic region Rs and a region to be inspected Rm in the plurality of n captured images P stored in the storage device 52, and determines the side surface of the workpiece W based on the set characteristic region Rs and the region to be inspected Rm. Evaluate Ws1 and Ws2.

(2)画像処理部60
画像処理部60は、図2に示すように、第1特徴検出部61、第1合焦度評価部62、第1基準画像選定部63、領域設定部64、合成部65、及び評価部66を有している。
(2) Image processing section 60
As shown in FIG. 2, the image processing section 60 includes a first feature detection section 61, a first focus degree evaluation section 62, a first reference image selection section 63, an area setting section 64, a composition section 65, and an evaluation section 66. have.

なお、側面撮像装置31が撮像した撮像画像Pと、側面撮像装置32が撮像した撮像画像Pとで、画像処理部60において実行する処理が同一であるため、ここでは、一方の側面撮像装置31が撮像した撮像画像Pに対する処理について説明し、他方の側面撮像装置32が撮像した撮像画像に対する処理について詳細な説明を省略する。 Note that since the image processing unit 60 executes the same process for the captured image P captured by the side imaging device 31 and the captured image P captured by the side imaging device 32, here, only one side imaging device 31 is executed. The processing for the captured image P captured by the other side imaging device 32 will be described, and the detailed description of the processing for the captured image captured by the other side imaging device 32 will be omitted.

第1特徴検出部61は、記憶装置52に記憶された撮像画像Pから第1特徴部Wc1を検出する。本実施形態では、第1特徴検出部61は、第1特徴部Wc1としてワークWの側面Ws1の上端E1を検出する。 The first feature detection unit 61 detects the first feature Wc1 from the captured image P stored in the storage device 52. In this embodiment, the first feature detection unit 61 detects the upper end E1 of the side surface Ws1 of the workpiece W as the first feature Wc1.

また、第1特徴検出部61が検出する第1特徴部Wc1としては、ワークWの側面Ws1の上端E1などのワークWのエッジ部分が挙げられる。ワークWのエッジ部分以外にも、ワークWの側面Ws1に設けられている模様やマークなど、第1合焦度評価部62において合焦度を評価することができるものであれば、ワークWの側面Ws1の任意の箇所を第1特徴部Wc1とすることができる。 Further, as the first characteristic portion Wc1 detected by the first characteristic detection unit 61, an edge portion of the workpiece W such as the upper end E1 of the side surface Ws1 of the workpiece W can be mentioned. In addition to the edge portion of the workpiece W, if there is a pattern or mark provided on the side surface Ws1 of the workpiece W that allows the first focus evaluation unit 62 to evaluate the focus degree, the workpiece W may be Any location on the side surface Ws1 can be the first feature Wc1.

第1合焦度評価部62は、第1特徴検出部61が検出した第1特徴部Wc1の合焦度を評価する。第1特徴部Wc1の合焦度を評価する方法として、種々の方法を採用することができ、例えば、第1特徴検出部61が第1特徴部Wc1を検出した撮像画像P毎に第1特徴部Wc1のシャープネス値を算出し、シャープネス値が大きい撮像画像ほど合焦度が高い画像と評価する。 The first focus evaluation section 62 evaluates the focus degree of the first feature portion Wc1 detected by the first feature detection section 61. Various methods can be adopted as a method for evaluating the degree of focus of the first feature Wc1. For example, for each captured image P in which the first feature detection unit 61 detects the first feature Wc1, The sharpness value of the portion Wc1 is calculated, and a captured image with a larger sharpness value is evaluated as an image with a higher degree of focus.

第1基準画像選定部63は、第1合焦度評価部62が評価した撮像画像から、合焦度の最も高い一つの画像を第1基準画像Ps1に選定する。また、第1基準画像選定部63は、記憶装置52に記憶された複数n個の撮像画像Pから第1基準画像Ps1を除いた撮像画像Pを検査画像Ptとする。 The first reference image selection unit 63 selects one image with the highest degree of focus from the captured images evaluated by the first focus degree evaluation unit 62 as the first reference image Ps1. Further, the first reference image selection unit 63 sets the captured image P obtained by removing the first reference image Ps1 from the plurality of n captured images P stored in the storage device 52 as the inspection image Pt.

例えば、第1合焦度評価部62において評価したn個の撮像画像Pのうち最も合焦度の高い撮像画像が2番目の撮像画像P2であると、第1基準画像選定部63は、撮像画像P2を第1基準画像Ps1に選定し、他の撮像画像P1,P3、P4・・・Pn-1、Pnを検査画像Ptに設定する(図3参照)。 For example, if the captured image with the highest degree of focus among the n captured images P evaluated by the first focus degree evaluation unit 62 is the second captured image P2, the first reference image selection unit 63 The image P2 is selected as the first reference image Ps1, and the other captured images P1, P3, P4...Pn-1, Pn are set as the inspection images Pt (see FIG. 3).

領域設定部64は、第1基準画像Ps1の中から第1特徴部Wc1を含む領域Rcを設定する。また、領域設定部64は、検査画像Ptにおいて第1基準画像Psに設定した特徴領域Rcに対応する領域を被検査領域Riに設定する。 The region setting unit 64 sets a region Rc including the first characteristic portion Wc1 from the first reference image Ps1. Further, the area setting unit 64 sets an area corresponding to the characteristic area Rc set in the first reference image Ps in the inspection image Pt as the area to be inspected Ri.

具体的には、図4に示すように、領域設定部64は、第1基準画像Ps1の第1特徴部Wc1から側面撮像装置31の移動方向(つまり、上下方向Z)へ所定画素数Δeだけ離れた箇所を境界B1、B2とすると、この境界B1、B2で挟まれた領域を特徴領域Rcに設定する。なお、特徴領域Rcの上下方向の幅F(ピクセル数)が次の式(3)を満たすように境界B1,B2は設定され、好ましくは幅Fが式(4)を満たすように境界B1,B2は設定される。 Specifically, as shown in FIG. 4, the area setting unit 64 moves a predetermined number of pixels Δe from the first characteristic portion Wc1 of the first reference image Ps1 in the moving direction of the side imaging device 31 (that is, in the vertical direction Z). Assuming that the distant points are boundaries B1 and B2, the area sandwiched between these boundaries B1 and B2 is set as the characteristic area Rc. Note that the boundaries B1 and B2 are set so that the vertical width F (number of pixels) of the feature region Rc satisfies the following formula (3), and preferably the boundaries B1 and B2 are set so that the width F satisfies formula (4). B2 is set.

Figure 0007415215000004
Figure 0007415215000004

Figure 0007415215000005
式(3)及び式(4)において、Aは側面撮像装置31,32に設けられた対物レンズ等のレンズの被写界深度、Mはレンズの倍率、Spは側面撮像装置31,32に搭載されているイメージセンサの1ピクセルの大きさ、θはワークWの側面Ws1,Ws2の法線方向H1,H2に対する側面撮像装置31、32の光軸L1,L2の角度θである。
Figure 0007415215000005
In equations (3) and (4), A is the depth of field of a lens such as an objective lens provided in the side imaging devices 31, 32, M is the magnification of the lens, and Sp is the depth of field installed in the side imaging devices 31, 32. The size of one pixel of the image sensor θ is the angle θ of the optical axes L1 and L2 of the side imaging devices 31 and 32 with respect to the normal directions H1 and H2 of the side surfaces Ws1 and Ws2 of the workpiece W.

領域設定部64は、第1基準画像Ps1に特徴領域Rcを設定すると、第1基準画像Ps1における特徴領域Rcの位置を特定する。例えば、領域設定部64は、第1基準画像Ps1の上端から境界B1、B2までの上下方向の画素数Np1、Np2を特定することで、第1基準画像Ps1の中で特徴領域Rcが設定された位置(画素)を特定する。 After setting the characteristic region Rc in the first reference image Ps1, the region setting unit 64 specifies the position of the characteristic region Rc in the first reference image Ps1. For example, the region setting unit 64 sets the characteristic region Rc in the first reference image Ps1 by specifying the number of pixels Np1 and Np2 in the vertical direction from the upper end of the first reference image Ps1 to the boundaries B1 and B2. Specify the position (pixel)

そして、領域設定部64は、図5に示すように、検査画像Ptの上端から下方に画素数Np1離れた位置と画素数Np2離れた位置にそれぞれ境界Bt1,Bt2を設定し、両境界Bt1,Bt2で挟まれた領域を被検査領域Riに設定する。領域設定部64は、このような被検査領域Riの設定を全ての検査画像Ptについて行う(図6参照)。 Then, as shown in FIG. 5, the area setting unit 64 sets boundaries Bt1 and Bt2 at a position downwardly away from the upper end of the inspection image Pt by the number of pixels Np1 and a position away from the number Np2 by the number of pixels, respectively, and sets boundaries Bt1, The region sandwiched by Bt2 is set as the region to be inspected Ri. The region setting unit 64 performs such setting of the region to be inspected Ri for all inspection images Pt (see FIG. 6).

合成部65は、図6に示すように、第1基準画像Ps1の中で特徴領域Rcに存在する画像データ(画素値)を抽出するとともに、検査画像Ptの中で被検査領域Riに存在する画像データ(画素値)を抽出する。なお、第1基準画像Ps1や検査画像Ptから抽出する領域を分かりやすくするため、図6において当該領域にハッチングを付けている。 As shown in FIG. 6, the synthesis unit 65 extracts image data (pixel values) existing in the characteristic region Rc in the first reference image Ps1, and extracts image data (pixel values) existing in the inspected region Ri in the inspection image Pt. Extract image data (pixel values). Note that in order to make it easier to understand the regions extracted from the first reference image Ps1 and the inspection image Pt, the regions are hatched in FIG.

これにより、1番目からn番目までの全ての撮像画像Pについて、第1基準画像Ps1又は検査画像Ptから抽出した画像データpが生成される。 Thereby, image data p extracted from the first reference image Ps1 or the inspection image Pt is generated for all the captured images P from the first to the nth.

1番目の撮像画像P1から抽出した画像データを1番目の抽出画像データp1、n番目の撮像画像Pnから抽出した画像データをn番目の抽出画像データpnとすると、合成部65は、図7に示すように、1番目の抽出画像データp1からn番目の抽出画像データpnまで上から順番に抽出画像データpを繋ぎ合わせてワークWの側面Ws1の合成画像CPを作成する。 Assuming that the image data extracted from the first captured image P1 is the first extracted image data p1, and the image data extracted from the n-th captured image Pn is the n-th extracted image data pn, the combining unit 65 performs the following process as shown in FIG. As shown, a composite image CP of the side surface Ws1 of the workpiece W is created by connecting the extracted image data p from the first extracted image data p1 to the nth extracted image data pn in order from the top.

そして、評価部66は、合成部65において生成した合成画像CPに基づいて、ワークWの側面Ws1の外観検査を行う。 Then, the evaluation section 66 performs an external appearance inspection of the side surface Ws1 of the workpiece W based on the composite image CP generated by the composition section 65.

(3)本実施形態の外観検査方法
上記した外観検査装置1によるワークWの側面Ws1、Ws2の外観検査方法について、図8を参照して説明する。
(3) Appearance inspection method of the present embodiment A method of inspecting the appearance of the side surfaces Ws1 and Ws2 of the workpiece W using the above-mentioned appearance inspection apparatus 1 will be described with reference to FIG. 8.

まず、外観検査装置1のステージ2に外観検査を行うワークWを載置する(ステップS1)。 First, a workpiece W to be visually inspected is placed on the stage 2 of the visual inspection apparatus 1 (step S1).

そして、移動機構4がステージ2に載置されたワークWの側面Ws1、Ws2に沿って撮像開始位置から撮像終了位置まで側面撮像装置31,32を下方へ移動させながら、側面撮像装置31,32が撮像ピッチDだけ移動する毎にワークWの側面Ws1,Ws2を撮像する。これにより、側面Ws1及び側面Ws2のそれぞれについて、複数n個の撮像画像Pを取得する(ステップS2)。 Then, while the moving mechanism 4 moves the side imaging devices 31, 32 downward from the imaging start position to the imaging end position along the side surfaces Ws1, Ws2 of the work W placed on the stage 2, the side imaging devices 31, 32 The side surfaces Ws1 and Ws2 of the workpiece W are imaged every time the side surface Ws1 and Ws2 move by the imaging pitch D. Thereby, a plurality of n captured images P are acquired for each of the side surface Ws1 and the side surface Ws2 (step S2).

そして、画像処理部60は、第1特徴検出部61において、ワークWの側面Ws1を撮像した複数の撮像画像Pから第1特徴部Wc1を検出する。また、他方の側面Ws2を撮像した複数の撮像画像Pについても側面Ws1と同様に第1特徴部Wc1を検出する(ステップS3)。 Then, in the image processing unit 60, the first feature detecting unit 61 detects the first feature portion Wc1 from the plurality of captured images P capturing the side surface Ws1 of the workpiece W. Furthermore, the first characteristic portion Wc1 is detected in the plurality of captured images P of the other side surface Ws2 in the same manner as the side surface Ws1 (step S3).

そして、画像処理部60は、第1合焦度評価部62において、検出した第1特徴部Wc1のシャープネス値を算出して、撮像画像Pごとに第1特徴部Wc1の合焦度を評価する(ステップS4)。 Then, the image processing unit 60 calculates the sharpness value of the detected first characteristic portion Wc1 in the first focus degree evaluation unit 62, and evaluates the degree of focus of the first characteristic portion Wc1 for each captured image P. (Step S4).

そして、画像処理部60は、第1基準画像選定部63において、複数の撮像画像Pから第1特徴部Wc1の合焦度が最も高い撮像画像Pを第1基準画像Ps1に選定する。また、第1基準画像Ps1に選定した撮像画像P以外の撮像画像Pを検査画像Ptとする(ステップS5)。 Then, the image processing unit 60 causes the first reference image selection unit 63 to select, from the plurality of captured images P, the captured image P with the highest degree of focus of the first characteristic portion Wc1 as the first reference image Ps1. Furthermore, a captured image P other than the captured image P selected as the first reference image Ps1 is set as a test image Pt (step S5).

そして、画像処理部60は、領域設定部64において、第1特徴部Wc1を含むように第1基準画像Ps1に特徴領域Rcを設定するとともに、検査画像Ptに被検査領域Riを設定する(ステップS6)。 Then, the image processing unit 60 sets a characteristic region Rc in the first standard image Ps1 so as to include the first characteristic portion Wc1, and sets a region to be inspected Ri in the inspection image Pt in the region setting unit 64 (step S6).

そして、画像処理部60は、合成部65において、第1基準画像Ps1に設定した特徴領域Rcの画像データpと検査画像Ptに設定した被検査領域Riの画像データpを抽出する(ステップS7)。また、合成部65は、第1基準画像Ps1及び検査画像Ptから抽出した特徴領域Rc及び被検査領域Riの画像データpを繋ぎ合わせてワークWの側面Ws1、Ws2の合成画像CPを作成する(ステップS8)。 Then, the image processing section 60 extracts the image data p of the characteristic region Rc set in the first reference image Ps1 and the image data p of the inspected region Ri set as the inspection image Pt in the synthesis section 65 (step S7). . Furthermore, the synthesizing unit 65 creates a composite image CP of the side surfaces Ws1 and Ws2 of the workpiece W by connecting the image data p of the characteristic region Rc and the inspected region Ri extracted from the first reference image Ps1 and the inspection image Pt ( Step S8).

なお、ステップS2において側面撮像装置32が他方の側面Ws2を撮像して生成した複数の撮像画像Pについても、側面Ws1の撮像画像Pと同様の処理を側面Ws1と別々に実行して合成画像CPを作成する。つまり、側面Ws2の撮像画像Pについて、第1特徴部Wc1の検出(ステップS3)と、第1特徴部Wc1の合焦度を評価(ステップS4)と、第1基準画像Ps1及び検査画像Ptの選定(ステップS5)と、特徴領域Rc及び被検査領域Riの設定(ステップS6)と、特徴領域Rc及び被検査領域Riの画像データpの抽出(ステップS7)と、合成画像CPの作成(ステップS8)とを実行する。 In addition, regarding the plurality of captured images P generated by capturing the other side surface Ws2 by the side surface imaging device 32 in step S2, the same processing as that for the captured image P of the side surface Ws1 is performed separately for the captured image P of the side surface Ws1 to create a composite image CP. Create. In other words, for the captured image P of the side surface Ws2, the detection of the first feature Wc1 (step S3), the evaluation of the degree of focus of the first feature Wc1 (step S4), and the detection of the first reference image Ps1 and the inspection image Pt are performed. selection (step S5), setting of the characteristic region Rc and the region to be inspected Ri (step S6), extraction of image data p of the characteristic region Rc and the region to be inspected Ri (step S7), and creation of a composite image CP (step S8) is executed.

そして、画像処理部60は、評価部66において、合成部65において生成した合成画像CPに基づいて、傷や汚れの有無等を調べるワークWの側面Ws1、Ws2の外観検査を実行する(ステップS9)。 Then, the image processing unit 60, in the evaluation unit 66, performs an external appearance inspection of the side surfaces Ws1 and Ws2 of the workpiece W to check for scratches, dirt, etc., based on the composite image CP generated in the composition unit 65 (step S9). ).

(4)効果
側面撮像装置31,32の光軸L1,L2をワークWの側面Ws1、Ws2に対して傾斜させて撮像すると上下方向Zの一部分しか合焦していない画像が得られることがある。本実施形態の外観検査装置1では、撮像画像Pが上下方向Zの一部分しか合焦していない画像であっても、各撮像画像Pから合焦した領域のみを抽出して分解能の高いワークの側面の画像を取得することができる。そのため、ワークWの搬送に伴うワークの破損を抑えつつ、分解能の高いワークWの側面Ws1,Ws2の画像を取得することができる。
(4) Effects If the optical axes L1, L2 of the side imaging devices 31, 32 are tilted with respect to the side surfaces Ws1, Ws2 of the work W, an image may be obtained in which only a portion of the vertical direction Z is focused. . In the appearance inspection apparatus 1 of this embodiment, even if the captured image P is an image in which only a portion of the vertical direction Z is focused, only the focused area is extracted from each captured image P, and the workpiece is inspected with high resolution. A side image can be obtained. Therefore, it is possible to obtain high-resolution images of the side surfaces Ws1 and Ws2 of the workpiece W while suppressing damage to the workpiece W during transport.

また、本実施形態の外観検査装置1では、合焦度を評価しやすい第1特徴部に基づいて、複数の撮像画像Pから第1基準画像Ps1を選定するとともに第1基準画像Ps1の中から合焦している領域である特徴領域Rcを抽出する。また、第1基準画像Ps1における特徴領域Rcの位置に基づいて、第1基準画像Ps1以外の各検査画像Ptから合焦している領域である被検査領域Riを抽出し、抽出した特徴領域Rc及び被検査領域Riの画像データpに基づいてワークWの側面Ws1,Ws2を評価する。 In addition, in the appearance inspection apparatus 1 of the present embodiment, the first reference image Ps1 is selected from the plurality of captured images P based on the first characteristic part that makes it easy to evaluate the degree of focus, and the first reference image Ps1 is selected from among the first reference images Ps1. A feature region Rc, which is an in-focus region, is extracted. Furthermore, based on the position of the feature region Rc in the first reference image Ps1, an in-focus region Ri is extracted from each inspection image Pt other than the first reference image Ps1, and the extracted feature region Rc Then, the side surfaces Ws1 and Ws2 of the workpiece W are evaluated based on the image data p of the region Ri to be inspected.

このため、外観検査装置1では、複数の撮像画像Pの中に輝度値の変化に乏しく合焦度を評価しにくい画像があっても、第1基準画像Ps1の特徴領域Rcに基づいて、合焦度を評価しにくい撮像画像の中から合焦している領域を特定することができ、分解能の高いワークWの側面Ws1,Ws2の画像を取得することができる。 Therefore, in the appearance inspection device 1, even if there is an image among the plurality of captured images P that has little change in brightness value and makes it difficult to evaluate the degree of focus, it is possible to It is possible to specify an in-focus area from among the captured images whose focus is difficult to evaluate, and it is possible to obtain images of the side surfaces Ws1 and Ws2 of the workpiece W with high resolution.

本実施形態の外観検査装置1では、ワークWの一方の側面Ws1を撮像する側面撮像装置31と、他方の側面Ws2を撮像する側面撮像装置32とが、上下方向へ一体に移動しながら、ワークWの側面Ws1、Ws2を同期して撮像するため、簡便な構成によってワークWの2つの側面Ws1,Ws2から撮像範囲が撮像ピッチDずつ異なる複数の画像を撮像することができる。 In the appearance inspection apparatus 1 of the present embodiment, a side imaging device 31 that images one side surface Ws1 of the workpiece W and a side imaging device 32 that images the other side surface Ws2 move vertically integrally while Since the side surfaces Ws1 and Ws2 of the workpiece W are imaged synchronously, a plurality of images whose imaging ranges differ by the imaging pitch D can be imaged from the two side surfaces Ws1 and Ws2 of the workpiece W with a simple configuration.

しかも、本実施形態の外観検査装置1では、ワークWの一方の側面Ws1の撮像画像Pと、他方の側面Ws2の撮像画像Pとを、画像処理部60において別個に処理して合成画像CPを作成するため、ワークWの側面Ws1、Ws2を同期して撮像しても、ワークWの寸法公差を補正して合成画像CPを作成することができる。 Moreover, in the appearance inspection apparatus 1 of the present embodiment, the image processing unit 60 separately processes the captured image P of one side surface Ws1 and the captured image P of the other side surface Ws2 of the workpiece W to generate a composite image CP. Even if side surfaces Ws1 and Ws2 of the workpiece W are imaged synchronously, the dimensional tolerance of the workpiece W can be corrected and the composite image CP can be created.

(5)変更例
以上、本発明の実施形態を説明したが、これらの実施形態は例として提示したものであり、発明の範囲を限定することを意図していない。これらの実施形態は、その他の様々な形態で実施されることが可能であり、発明の趣旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これらの実施形態やその変形は、発明の範囲や要旨に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。以下に変更例を説明する。なお、上記の実施形態に対して、以下に説明する複数の変更例のうちいずれか1つを適用しても良いし、以下に説明する変更例のうちいずれか2つ以上を組み合わせて適用しても良い。なお、以下の変更例の他にも様々な変更が可能である。
(5) Modification Examples The embodiments of the present invention have been described above, but these embodiments are presented as examples and are not intended to limit the scope of the invention. These embodiments can be implemented in various other forms, and various omissions, substitutions, and changes can be made without departing from the spirit of the invention. These embodiments and their modifications are included within the scope and gist of the invention as well as within the scope of the invention described in the claims and its equivalents. An example of the change will be explained below. Note that any one of the plurality of modification examples described below may be applied to the above embodiment, or any two or more of the modification examples described below may be applied in combination. It's okay. Note that various changes are possible in addition to the following example of change.

(5-1)変更例1
次に、上記した実施形態の変更例1について、図9~図12を参照して説明する。なお、上記した実施形態と同一の構成のものについては同一の符号を付し、その構成の説明を省略する。
(5-1) Change example 1
Next, a first modification of the above embodiment will be described with reference to FIGS. 9 to 12. Note that components having the same configuration as those of the above-described embodiment are given the same reference numerals, and explanations of the configurations will be omitted.

ステージ2に載置されたワークWの側面Ws1,Ws2が上下方向Zに対して傾斜している場合、側面撮像装置31,32によるワークWの側面Ws1,Ws2の撮像範囲が上下方向Zで異なる撮像画像Pを比較すると、撮像画像Pの中で合焦する領域が変化する。つまり、ワークWの側面Ws1,Ws2が上下方向Zに対して傾斜しており側面撮像装置31,32の移動方向と平行ではない場合、検査画像Ptにおける被検査領域Riの位置が、第1基準画像Ps1における特徴領域Rcの位置からズレる。 When the side surfaces Ws1 and Ws2 of the workpiece W placed on the stage 2 are inclined with respect to the vertical direction Z, the imaging ranges of the side surfaces Ws1 and Ws2 of the workpiece W by the side imaging devices 31 and 32 differ in the vertical direction Z. When the captured images P are compared, the area in focus in the captured images P changes. In other words, when the side surfaces Ws1 and Ws2 of the workpiece W are inclined with respect to the vertical direction Z and are not parallel to the moving direction of the side imaging devices 31 and 32, the position of the inspected region Ri in the inspection image Pt is It deviates from the position of the characteristic region Rc in the image Ps1.

本変更例では、第1特徴部Wc1に加え第2特徴部Wc2を撮像画像Pから検出し、ワークWの側面Ws1,Ws2が上下方向Zに対して傾斜している場合に生じる被検査領域Riの位置ズレを、第1特徴部Wc1及び第2特徴部Wc2に基づいて補正する。 In this modified example, a second characteristic portion Wc2 is detected in addition to the first characteristic portion Wc1 from the captured image P, and an area to be inspected Ri that occurs when the side surfaces Ws1 and Ws2 of the workpiece W are inclined with respect to the vertical direction Z The positional deviation of is corrected based on the first characteristic portion Wc1 and the second characteristic portion Wc2.

具体的には、図9に示すように、画像処理部60は、第2特徴検出部67、第2合焦度評価部68、第2基準画像選定部69、補正部70とを有している。 Specifically, as shown in FIG. 9, the image processing section 60 includes a second feature detection section 67, a second focus evaluation section 68, a second reference image selection section 69, and a correction section 70. There is.

第2特徴検出部67は、記憶装置52に記憶された複数n個の撮像画像Pの全部又は一部の撮像画像Pから第1特徴部Wc1と異なる第2特徴部Wc2を検出する。 The second feature detection unit 67 detects a second feature Wc2 different from the first feature Wc1 from all or some of the plurality of n captured images P stored in the storage device 52.

なお、第2特徴検出部67は、記憶装置52に記憶された複数n個の撮像画像Pの全てに対して第2特徴部Wc2を検出してもよく、また、複数n個の撮像画像Pの一部の撮像画像Pに対して第2特徴部Wc2を検出してもよい。 Note that the second feature detection unit 67 may detect the second characteristic portion Wc2 for all of the plurality of n captured images P stored in the storage device 52, or may detect the second feature Wc2 for all of the plurality of n captured images P. The second characteristic portion Wc2 may be detected for a portion of the captured image P.

第2特徴部Wc2としては、ワークWの側面Ws1、Ws2の下端E2や、ワークWの側面Ws1、Ws2に設けられている模様やマークなど、第1特徴部Wc1と上下方向Zに異なる位置にあり、第2合焦度評価部68において合焦度を評価することができるものであれば、ワークWの側面Ws1、Ws2の任意の箇所を第2特徴部Wc2とすることができる。本変更例では、第2特徴検出部67は、第2特徴部Wc2としてワークWの側面Ws1、Ws2の下端E2を検出する。 The second characteristic portion Wc2 may be a pattern or a mark provided on the side surfaces Ws1, Ws2 of the workpiece W, a pattern or a mark provided on the side surfaces Ws1, Ws2 of the workpiece W, etc. at a different position in the vertical direction Z from the first characteristic portion Wc1. Any part of the side surfaces Ws1 and Ws2 of the workpiece W can be used as the second characteristic part Wc2, as long as the second characteristic part 68 can evaluate the degree of focus. In this modified example, the second feature detection unit 67 detects the lower end E2 of the side surface Ws1 and Ws2 of the workpiece W as the second feature Wc2.

第2合焦度評価部68は、第2特徴検出部67が検出した第2特徴部Wc2の合焦度を評価する。第2特徴部Wc2の合焦度を評価する方法は、第1特徴部Wc1の合焦度の評価と同様、種々の方法を採用することができ、例えば、第2特徴検出部67が第2特徴部Wc2を検出した撮像画像P毎に第2特徴部Wc2のシャープネス値を算出し、シャープネス値が大きい撮像画像ほど合焦度が高い画像と評価する。 The second focus evaluation section 68 evaluates the focus degree of the second feature portion Wc2 detected by the second feature detection section 67. As with the method for evaluating the degree of focus of the second characteristic portion Wc2, various methods can be adopted, similar to the evaluation of the degree of focus of the first characteristic portion Wc1. For example, the second characteristic detection unit 67 The sharpness value of the second feature Wc2 is calculated for each captured image P in which the feature Wc2 is detected, and the captured image with a larger sharpness value is evaluated as an image with a higher degree of focus.

第2基準画像選定部69は、第2合焦度評価部68が評価した撮像画像Pから、合焦度の最も高い一つの画像を第2基準画像Ps2に選定する。 The second reference image selection section 69 selects one image with the highest degree of focus from the captured images P evaluated by the second degree of focus evaluation section 68 as the second reference image Ps2.

補正部70は、第1基準画像Ps1における第1特徴部Wc1の位置と、第2基準画像Ps2における第2特徴部Wc2の位置とを特定する。 The correction unit 70 specifies the position of the first characteristic portion Wc1 in the first reference image Ps1 and the position of the second characteristic portion Wc2 in the second reference image Ps2.

例えば、図10に示すように、補正部70は、第1基準画像Ps1の上端から第1特徴部Wc1までの上下方向Zの画素数Nc1を特定することで第1特徴部Wc1の位置を特定する。また、補正部70は、図11に示すように、第2基準画像Ps2の上端から第2特徴部Wc2までの上下方向Zの画素数Nc2を特定することで第2特徴部Wc2の位置を特定する。 For example, as shown in FIG. 10, the correction unit 70 specifies the position of the first characteristic portion Wc1 by specifying the number of pixels Nc1 in the vertical direction Z from the upper end of the first reference image Ps1 to the first characteristic portion Wc1. do. Further, as shown in FIG. 11, the correction unit 70 specifies the position of the second characteristic portion Wc2 by specifying the number of pixels Nc2 in the vertical direction Z from the upper end of the second reference image Ps2 to the second characteristic portion Wc2. do.

補正部70は、領域設定部64がm番目の撮像画像Pmに設定した被検査領域Riに生じる位置ズレ量ΔQを式(5)によって算出し、算出した位置ズレ量ΔQだけ被検査領域Riを上下方向Zへ移動させて、m番目の撮像画像Pmの被検査領域Riを補正した補正被検査領域Ri’を設定する。 The correction unit 70 calculates the amount of positional deviation ΔQ that occurs in the area to be inspected Ri set in the m-th captured image Pm by the area setting unit 64 using equation (5), and adjusts the area to be inspected Ri by the calculated amount of positional deviation ΔQ. By moving in the vertical direction Z, a corrected region to be inspected Ri′ is set by correcting the region to be inspected Ri of the m-th captured image Pm.

Figure 0007415215000006
式(5)において、Nc1は第1基準画像Ps1の上端から第1特徴部Wc1までの上下方向Zの画素数、Nc2は第2基準画像Ps2の上端から第2特徴部Wc2までの上下方向Zの画素数、ns1は第1基準画像Ps1の順序数、ns2は第2基準画像Ps2の順序数、mは被検査領域Riを補正する検査画像Ptの順序数である。
Figure 0007415215000006
In equation (5), Nc1 is the number of pixels in the vertical direction Z from the top of the first reference image Ps1 to the first feature Wc1, and Nc2 is the number of pixels in the vertical direction Z from the top of the second reference image Ps2 to the second feature Wc2. , ns1 is the ordinal number of the first reference image Ps1, ns2 is the ordinal number of the second reference image Ps2, and m is the ordinal number of the inspection image Pt for correcting the area to be inspected Ri.

補正部70は、このような補正被検査領域Ri’の設定を、全ての検査画像Pt(つまり、第1基準画像Ps1及び第2基準画像Ps2以外の撮像画像P)について実行する。 The correction unit 70 performs such setting of the corrected inspection area Ri' for all inspection images Pt (that is, captured images P other than the first reference image Ps1 and the second reference image Ps2).

本変更例では、ワークWの側面Ws1,Ws2が上下方向Zに対して傾斜している場合に生じる被検査領域Riの位置ズレを補正することができ、分解能の高い画像を取得することができる。 In this modification example, it is possible to correct the positional deviation of the inspection area Ri that occurs when the side surfaces Ws1 and Ws2 of the workpiece W are inclined with respect to the vertical direction Z, and it is possible to obtain a high-resolution image. .

なお、本変更例のような被検査領域Riの補正は、外観検査装置1を最初に動作させる時に実行したり、ワークWの品種を変更した時に実行したり、ワークWを検査する毎に実行したり、任意のタイミングで実行することができる。 Note that the correction of the inspection area Ri as in this modification example may be executed when the visual inspection device 1 is operated for the first time, when the type of workpiece W is changed, or every time the workpiece W is inspected. or can be executed at any time.

(5-2)変更例2
上記の実施形態では、第1特徴検出部61が、記憶装置52に記憶された複数n個の撮像画像Pの全てに対して第1特徴部Wc1を検出する場合について説明したが、複数n個の撮像画像Pの一部の撮像画像Pに対して第1特徴部Wc1の検出、合焦度の評価、及び第1基準画像Ps1の選択を行ってもよい。
(5-2) Change example 2
In the above embodiment, a case has been described in which the first feature detection section 61 detects the first feature Wc1 for all of the plurality of n captured images P stored in the storage device 52. Detection of the first characteristic portion Wc1, evaluation of the degree of focus, and selection of the first reference image Ps1 may be performed for a portion of the captured image P of the captured image P.

例えば、画像処理部60が、複数n個の撮像画像Pのうち、第1特徴部Wc1が写っている撮像画像、あるいは、第1特徴部Wc1が写っていることが予想される一部の撮像画像P(例えば、1~10番目の撮像画像P1~P10)について、第1特徴部Wc1の検出、合焦度の評価、及び第1基準画像Ps1の選択を行ってもよい。 For example, the image processing unit 60 selects a captured image in which the first characteristic portion Wc1 is captured, or a portion of the captured image in which the first characteristic portion Wc1 is expected to be captured, among the plurality of n captured images P. For the images P (for example, the first to tenth captured images P1 to P10), detection of the first characteristic portion Wc1, evaluation of the degree of focus, and selection of the first reference image Ps1 may be performed.

また、画像処理部60が、複数n個の撮像画像Pのうち所定個数(例えば10個)おきに第1特徴部Wc1の検出及び合焦度の評価を行い、合焦度を評価した撮像画像Pのうち合焦度が最も大きい撮像画像P(例えば11番目の撮像画像P11)と2番目に大きい撮像画像P(例えば、21番目の撮像画像P21)とを決定する。そして、決定した2つの撮像画像の間で撮像された撮像画像P(例えば、12番目~20番目の撮像画像P12~P20)の全部又は一部の撮像画像Pに対して第1特徴部Wc1の検出、合焦度の評価、第1基準画像Ps1の選択を行ってもよい。 Further, the image processing unit 60 detects the first characteristic portion Wc1 and evaluates the degree of focus every predetermined number (for example, 10) of the plurality of n captured images P, and the captured image in which the degree of focus has been evaluated. The captured image P with the highest degree of focus (eg, the 11th captured image P11) and the captured image P with the second largest degree of focus (eg, the 21st captured image P21) are determined. Then, the first characteristic portion Wc1 is applied to all or some of the captured images P captured between the determined two captured images (for example, the 12th to 20th captured images P12 to P20). Detection, evaluation of the degree of focus, and selection of the first reference image Ps1 may be performed.

本変更例のように、複数n個の撮像画像Pの一部の撮像画像Pに対して第1特徴部Wc1の検出、合焦度の評価、及び第1基準画像Ps1の選択をすることで、処理負荷を低減することができる。 As in this modification example, by detecting the first characteristic portion Wc1, evaluating the degree of focus, and selecting the first reference image Ps1 for a portion of the captured image P of the plurality of n captured images P, , processing load can be reduced.

(5-3)変更例3
上記の実施形態では、特徴領域Rc及び被検査領域Riの画像データpを繋ぎ合わせた合成画像CPに基づいて、ワークWの側面Ws1,Ws2の外観検査を行ったが、合成画像CPを作成せず、特徴領域Rc及び被検査領域Riの画像データpに基づいてワークWの側面Ws1,Ws2の外観検査を行ってもよい。
(5-3) Change example 3
In the embodiment described above, the appearance inspection of the side surfaces Ws1 and Ws2 of the workpiece W was performed based on the composite image CP obtained by joining the image data p of the characteristic region Rc and the region to be inspected Ri. First, the appearance inspection of the side surfaces Ws1 and Ws2 of the workpiece W may be performed based on the image data p of the characteristic region Rc and the region to be inspected Ri.

1…外観検査装置
2…ステージ
3…撮像部
4…移動機構
5…制御装置
31…側面撮像装置
32…側面撮像装置
33…上面撮像装置
41…保持ベース
51…処理装置
52…記憶装置
53…装置制御部
54…データ取得部
60…画像処理部
61…第1特徴検出部
62…第1合焦度評価部
63…第1基準画像選定部
64…領域設定部
65…合成部
66…評価部
1... Appearance inspection device 2... Stage 3... Imaging section 4... Moving mechanism 5... Control device 31... Side imaging device 32... Side imaging device 33... Top imaging device 41... Holding base 51... Processing device 52... Storage device 53... Device Control section 54...Data acquisition section 60...Image processing section 61...First feature detection section 62...First focus evaluation section 63...First reference image selection section 64...Region setting section 65...Composition section 66...Evaluation section

Claims (5)

ワークの側面を撮像して撮像画像を生成する撮像装置と、
前記撮像装置を前記ワークの側面に沿って移動させる移動機構と、
前記撮像画像に対する画像処理を実行する画像処理部と、を備えた外観検査装置であって、
前記撮像装置は、前記移動機構によって移動させられる複数の異なる位置において前記ワークの側面を撮像して複数の前記撮像画像を取得し、
前記画像処理部は、
前記撮像画像から第1特徴部を検出する第1特徴検出処理と、
前記第1特徴部の合焦度を評価する第1合焦度評価処理と、
複数の前記撮像画像における前記第1特徴部の合焦度を比較することで、複数の前記撮像画像の一つを第1基準画像に選定する第1基準画像選定処理と、
前記第1基準画像における前記第1特徴部を含む領域である特徴領域と、前記第1基準画像以外の前記撮像画像における領域であって前記第1基準画像の中で前記特徴領域が占める位置に対応する位置に設けられた被検査領域に基づいて、前記ワークを評価する評価処理と、を実行する外観検査装置。
an imaging device that captures a side view of the workpiece to generate a captured image;
a moving mechanism that moves the imaging device along a side surface of the workpiece;
An appearance inspection device comprising: an image processing unit that performs image processing on the captured image;
The imaging device captures images of side surfaces of the workpiece at a plurality of different positions moved by the moving mechanism to obtain a plurality of captured images,
The image processing unit includes:
a first feature detection process that detects a first feature from the captured image;
a first focus degree evaluation process that evaluates the focus degree of the first characteristic portion;
a first reference image selection process of selecting one of the plurality of captured images as a first reference image by comparing the degree of focus of the first characteristic portion in the plurality of captured images;
A characteristic region that is an area including the first characteristic part in the first reference image, and an area in the captured image other than the first reference image that is located at a position occupied by the characteristic region in the first reference image. An appearance inspection device that performs an evaluation process of evaluating the workpiece based on inspection areas provided at corresponding positions .
前記画像処理部は、前記第1基準画像選定処理において複数の前記撮像画像の一部の前記撮像画像について前記第1特徴部の合焦度を比較することで前記第1基準画像に選定する、請求項1に記載の外観検査装置。 The image processing unit selects some of the plurality of captured images as the first reference image by comparing the degree of focus of the first characteristic portion in the first reference image selection process. The appearance inspection device according to claim 1. 前記画像処理部は、前記特徴領域と前記被検査領域とを繋ぎ合わせて前記ワークの側面を表す合成画像を生成する合成処理を実行する、請求項1に記載の外観検査装置。 The external appearance inspection apparatus according to claim 1, wherein the image processing unit executes a synthesis process that connects the feature area and the inspection area to generate a composite image representing a side surface of the workpiece. 複数の前記撮像装置を備え、
複数の前記撮像装置が、前記移動機構によって前記側面に沿って一体に移動させられ、同期して前記側面を撮像して複数の前記撮像画像をそれぞれ取得する、請求項1に記載の外観検査装置。
comprising a plurality of the imaging devices,
The external appearance inspection apparatus according to claim 1, wherein a plurality of said imaging devices are moved together by said moving mechanism along said side surface, and image said side surface in synchronization to obtain a plurality of said captured images, respectively. .
前記画像処理部は、
前記撮像画像から前記第1特徴部と異なる第2特徴部を検出する第2特徴検出処理と、
前記第2特徴部の合焦度を評価する第2合焦度評価処理と、
複数の前記撮像画像における前記第2特徴部の合焦度を比較することで、複数の前記撮像画像の一つを第2基準画像に選定する第2基準画像選定処理と、
前記第1基準画像における前記第1特徴部の位置と、前記第2基準画像における前記2特徴部の位置とに基づいて、前記被検査領域を補正する補正処理を実行する、請求項1に記載の外観検査装置。
The image processing unit includes:
a second feature detection process that detects a second feature that is different from the first feature from the captured image;
a second focus degree evaluation process that evaluates the focus degree of the second characteristic portion;
a second reference image selection process of selecting one of the plurality of captured images as a second reference image by comparing the degree of focus of the second characteristic portion in the plurality of captured images;
2. A correction process for correcting the inspection area based on the position of the first characteristic part in the first reference image and the position of the second characteristic part in the second reference image. The appearance inspection device described.
JP2023143725A 2023-09-05 2023-09-05 Visual inspection equipment Active JP7415215B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023143725A JP7415215B1 (en) 2023-09-05 2023-09-05 Visual inspection equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2023143725A JP7415215B1 (en) 2023-09-05 2023-09-05 Visual inspection equipment

Publications (1)

Publication Number Publication Date
JP7415215B1 true JP7415215B1 (en) 2024-01-17

Family

ID=89534284

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023143725A Active JP7415215B1 (en) 2023-09-05 2023-09-05 Visual inspection equipment

Country Status (1)

Country Link
JP (1) JP7415215B1 (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004187220A (en) 2002-12-06 2004-07-02 Keisoku Kensa Kk Camera angle-of-view adjustment method for crack inspection apparatus
WO2014083737A1 (en) 2012-11-30 2014-06-05 パナソニック株式会社 Image processing device and image processing method
WO2016072103A1 (en) 2014-11-04 2016-05-12 オリンパス株式会社 Imaging device, imaging method and processing program
JP2016183865A (en) 2015-03-25 2016-10-20 ダイヤモンド電機株式会社 Image processing program, image processing method, and image processing apparatus, and image inspection program, image inspection method, and image inspection apparatus
CN106248684A (en) 2015-06-03 2016-12-21 法国圣戈班玻璃公司 For detecting Optical devices and the method for the internal flaw of transparent substrates
JP2017053775A (en) 2015-09-10 2017-03-16 東レエンジニアリング株式会社 Apparatus for imaging inside of light-transmissive object, and inspection apparatus
JP2018535442A (en) 2015-09-24 2018-11-29 クアルコム,インコーポレイテッド Phase detection autofocus noise reduction
JP2021086121A (en) 2019-11-29 2021-06-03 富士フイルム株式会社 Image capture device and surface inspection device
JP2021157600A (en) 2020-03-27 2021-10-07 キヤノン株式会社 Image processing device and image processing method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004187220A (en) 2002-12-06 2004-07-02 Keisoku Kensa Kk Camera angle-of-view adjustment method for crack inspection apparatus
WO2014083737A1 (en) 2012-11-30 2014-06-05 パナソニック株式会社 Image processing device and image processing method
WO2016072103A1 (en) 2014-11-04 2016-05-12 オリンパス株式会社 Imaging device, imaging method and processing program
JP2016183865A (en) 2015-03-25 2016-10-20 ダイヤモンド電機株式会社 Image processing program, image processing method, and image processing apparatus, and image inspection program, image inspection method, and image inspection apparatus
CN106248684A (en) 2015-06-03 2016-12-21 法国圣戈班玻璃公司 For detecting Optical devices and the method for the internal flaw of transparent substrates
JP2017053775A (en) 2015-09-10 2017-03-16 東レエンジニアリング株式会社 Apparatus for imaging inside of light-transmissive object, and inspection apparatus
JP2018535442A (en) 2015-09-24 2018-11-29 クアルコム,インコーポレイテッド Phase detection autofocus noise reduction
JP2021086121A (en) 2019-11-29 2021-06-03 富士フイルム株式会社 Image capture device and surface inspection device
JP2021157600A (en) 2020-03-27 2021-10-07 キヤノン株式会社 Image processing device and image processing method

Similar Documents

Publication Publication Date Title
CN107316047B (en) Image processing apparatus, image processing method, and storage medium
JP4166585B2 (en) Appearance inspection apparatus and appearance inspection method
JP4193895B2 (en) Defect inspection equipment
JP5399205B2 (en) Inspection device for inspection object and position correction device for electronic substrate
DE102010000467B4 (en) measuring device
JP2006200972A (en) Image defect inspection method, image defect inspection device, and external appearance inspection device
JP2005265661A (en) Image processing method and image processing device
KR20160040467A (en) Focus adjustment method and device therefor
JP4680640B2 (en) Image input apparatus and image input method
JP5417197B2 (en) Inspection apparatus and inspection method
KR20160118722A (en) 3D vision inpection system
JP5668227B2 (en) Image measuring device
JP7415215B1 (en) Visual inspection equipment
WO2014208193A1 (en) Wafer appearance inspection device
JP6777604B2 (en) Inspection system and inspection method
JPH0996513A (en) Image acquisition apparatus
JP7336294B2 (en) BONDING WIRE INSPECTION DEVICE, BONDING WIRE INSPECTION METHOD, AND BONDING WIRE INSPECTION PROGRAM
KR101403860B1 (en) Wafer surface inspection device and wafer surface inspection method using thereof
JP4415285B1 (en) Wire inspection apparatus, wire inspection method, and wire inspection program
JP2007057505A (en) Method and device for inspecting printed board, and manufacturing method of printed board
JP2016070683A (en) Image processing device, image measurement device, image processing method, image processing program, and method for manufacturing structure
JP2008232976A (en) Image inspection method and image inspection device
JP2009157701A (en) Method and unit for image processing
JP2009192371A (en) Visual examination device and visual examination method
JP5604967B2 (en) Defect detection method and defect detection apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230919

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20230919

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20231003

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20231121

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20231128

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231211

R150 Certificate of patent or registration of utility model

Ref document number: 7415215

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150