JP6745150B2 - Lighting device and image inspection device - Google Patents

Lighting device and image inspection device Download PDF

Info

Publication number
JP6745150B2
JP6745150B2 JP2016122154A JP2016122154A JP6745150B2 JP 6745150 B2 JP6745150 B2 JP 6745150B2 JP 2016122154 A JP2016122154 A JP 2016122154A JP 2016122154 A JP2016122154 A JP 2016122154A JP 6745150 B2 JP6745150 B2 JP 6745150B2
Authority
JP
Japan
Prior art keywords
image
dark
light
inspection
pattern
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
JP2016122154A
Other languages
Japanese (ja)
Other versions
JP2017227474A (en
Inventor
正彦 本多
正彦 本多
井澤 忠仁
忠仁 井澤
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.)
Takano Co Ltd
Original Assignee
Takano Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Takano Co Ltd filed Critical Takano Co Ltd
Priority to JP2016122154A priority Critical patent/JP6745150B2/en
Publication of JP2017227474A publication Critical patent/JP2017227474A/en
Application granted granted Critical
Publication of JP6745150B2 publication Critical patent/JP6745150B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、照明装置、及び、画像検査装置に関する。 The present invention relates to a lighting device and an image inspection device.

例えば、特許文献1には、明部と暗部とが交互に現れる明暗パターンを、被検査体の表面に照射する画像検査装置が開示されている。 For example, Patent Document 1 discloses an image inspection apparatus that irradiates a surface of an object to be inspected with a light-dark pattern in which bright parts and dark parts appear alternately.

登録実用新案第3197766号公報Registered Utility Model No. 3197766

特許文献1の画像検査装置では、検査対象の複数の領域それぞれについて異なる種類の欠陥を検出したい場合、又は、検査対象が、向いている方向が異なる複数の面を有する場合など、検査対象が何であるかによっては好適に照明を行えないことがある。 In the image inspection apparatus of Patent Document 1, when the inspection target has different types of defects for each of a plurality of inspection target regions, or when the inspection target has a plurality of faces facing different directions, Depending on whether or not there is a case, it may not be possible to perform suitable illumination.

本発明は、好適に照明を行うことができる照明装置、及び、画像検査装置を提供することを目的とする。 An object of the present invention is to provide an illumination device and an image inspection device that can perform suitable illumination.

上記目的を達成するため、本発明の第1の観点に係る照明装置は、
第1明暗パターンにより画像検査の検査対象の第1領域を照明するとともに、前記第1明暗パターンとは異なる第2明暗パターンにより前記検査対象の前記第1領域とは異なる第2領域を照明する照明手段と、
前記第1明暗パターンと前記第2明暗パターンとを前記検査対象に対して相対的に移動させる移動制御手段と、
を備え
前記移動制御手段は、前記第1明暗パターンと前記第2明暗パターンとを異なる速度で移動させる。
In order to achieve the above object, the lighting device according to the first aspect of the present invention is
Illumination for illuminating a first region of the inspection target of the image inspection with the first light-dark pattern and illuminating a second region different from the first region of the inspection target with a second light-dark pattern different from the first light-dark pattern. Means and
Movement control means for moving the first light-dark pattern and the second light-dark pattern relative to the inspection object;
Equipped with
The movement control means moves the first bright-dark pattern and the second bright-dark pattern at different speeds.

上記目的を達成するため、本発明の第2の観点に係る画像検査装置は、
前記照明装置と、
前記照明装置により照明された前記検査対象を複数回撮影することで、複数の撮影画像を得るカメラと、
前記カメラにより得られた前記複数の撮影画像に基づいて、前記第1領域と前記第2領域とについて欠陥の有無を検査する検査手段と、
を備える。
In order to achieve the above object, an image inspection apparatus according to a second aspect of the present invention is
The lighting device;
A camera that obtains a plurality of captured images by capturing a plurality of images of the inspection target illuminated by the illumination device,
An inspection unit that inspects the first area and the second area for defects based on the plurality of captured images obtained by the camera;
Equipped with.

本発明によれば、好適に照明を行うことができる。 According to the present invention, it is possible to preferably perform illumination.

本発明の一実施形態に係る画像検査装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image inspection apparatus which concerns on one Embodiment of this invention. (A)は、明暗パターン画像を表示したディスプレイの正面図である。(B)は、無地画像を表示したディスプレイの正面図である。(A) is a front view of a display that displays a bright and dark pattern image. (B) is a front view of a display displaying a plain image. コンピュータの構成例を示す図である。FIG. 13 is a diagram illustrating a configuration example of a computer. 明暗パターン画像の明部及び暗部の移動の様子を示す図である。It is a figure which shows the mode of movement of the bright part and dark part of a light-dark pattern image. 画像検査処理の一例のフローチャートである。It is a flow chart of an example of image inspection processing. 検査画像を生成するときの様子を説明する図である。It is a figure explaining a mode when generating an inspection image. 第2基準画像の各画素の輝度値と第2検査画像の各画素の輝度値との比較を説明する図である。It is a figure explaining the comparison of the brightness value of each pixel of a 2nd reference image, and the brightness value of each pixel of a 2nd inspection image. 他の明暗パターン画像を示す図である。It is a figure which shows another bright/dark pattern image. ディスプレイに表示される明暗パターン画像と、撮像画像における検査対象に映った明暗パターンとの関係の一例を説明するための概念図である。It is a conceptual diagram for demonstrating an example of the relationship between the light-and-dark pattern image displayed on a display, and the light-and-dark pattern reflected in the inspection target in a captured image. ディスプレイに表示される明暗パターン画像と、撮像画像における検査対象に映った明暗パターンとの関係の一例を説明するための概念図である。It is a conceptual diagram for demonstrating an example of the relationship between the light-and-dark pattern image displayed on a display, and the light-and-dark pattern reflected in the inspection target in a captured image.

(画像検査装置100の構成)
まず、本発明の一実施形態に係る画像検査装置100の構成を、図1等を参照して説明する。画像検査装置100は、所定の台STに置かれた検査対象Kの外観を検査し、欠陥を検出する装置である。画像検査装置100は、ディスプレイ110と、カメラ120と、コンピュータ130と、を備える。検査対象Kは、樹脂製の包装用フィルム、車のボディ、又は、車のバンパなどである。欠陥は、キズ、ゴミ、塗装剥げなどである。
(Structure of the image inspection device 100)
First, the configuration of an image inspection apparatus 100 according to an embodiment of the present invention will be described with reference to FIG. The image inspection device 100 is a device that inspects the appearance of the inspection target K placed on a predetermined table ST and detects a defect. The image inspection apparatus 100 includes a display 110, a camera 120, and a computer 130. The inspection target K is a resin packaging film, a car body, a car bumper, or the like. Defects include scratches, dust, and paint peeling.

ディスプレイ110は、自発光型であり、画像を表示することで、当該画像を表す表示光L1を検査対象Kに照射する。このようにして、検査対象Kは、ディスプレイ110により照明される。ディスプレイ110は、拡散板により光を面状に出射する液晶ディスプレイ、光を面状に出射するEL(Electro Luminescence)ディスプレイなどが好ましい。表示光L1は、検査対象Kにより反射される。以下、検査対象Kにより反射された表示光L1を、反射光L2という。ディスプレイ110は、一般的なディスプレイと同様、横方向(X軸(図2参照)が延びる方向)に長尺な画面を有する。図1のY軸方向は、ディスプレイの縦方向である。 The display 110 is a self-luminous type and displays an image to irradiate the inspection object K with the display light L1 representing the image. In this way, the inspection object K is illuminated by the display 110. The display 110 is preferably a liquid crystal display that emits light in a plane by a diffusion plate, an EL (Electro Luminescence) display that emits light in a plane, or the like. The display light L1 is reflected by the inspection object K. Hereinafter, the display light L1 reflected by the inspection object K will be referred to as reflected light L2. The display 110 has a screen that is long in the lateral direction (the direction in which the X axis (see FIG. 2) extends), similar to a general display. The Y-axis direction in FIG. 1 is the vertical direction of the display.

ディスプレイ110は、検査対象Kを照明するときに表示する画像として、明暗パターン画像11(図2(A))、又は、無地画像15(図2(B))を表示する。 The display 110 displays the light-dark pattern image 11 (FIG. 2A) or the plain image 15 (FIG. 2B) as an image displayed when the inspection target K is illuminated.

明暗パターン画像11は、縦方向に交互に並んだ複数の明部11Aと複数の暗部11Bとからなる。複数の明部11Aと複数の暗部11Bとは、明暗が繰り返し(周期的に)現れた明暗パターンを構成している。各明部11Aは、横方向(X軸方向)に長尺な長方形状の明るい領域であり、例えば白色の領域である。各暗部11Bは、横方向(X軸方向)に長尺な長方形状の暗い領域である。各暗部11Bは、明部11Aよりも暗く(輝度値が低く)、例えば、黒色の領域(表示光を出射しない領域)である。明暗パターン画像11による照明時、検査対象Kには、当該明暗パターン画像11が示す明暗パターンが映る。 The light-dark pattern image 11 includes a plurality of bright portions 11A and a plurality of dark portions 11B that are alternately arranged in the vertical direction. The plurality of bright portions 11A and the plurality of dark portions 11B form a light-dark pattern in which light and dark appear repeatedly (periodically). Each bright part 11A is a rectangular bright region that is long in the lateral direction (X-axis direction), and is, for example, a white region. Each dark portion 11B is a rectangular dark area that is long in the lateral direction (X-axis direction). Each dark portion 11B is darker (having a lower brightness value) than the bright portion 11A, and is, for example, a black region (a region that does not emit display light). At the time of illumination with the light-dark pattern image 11, the inspection target K shows the light-dark pattern shown by the light-dark pattern image 11.

無地画像15は、輝度が一様な、例えば白色の画像である。従って、無地画像15による照明時、検査対象Kは、全体的に明るく照明される。 The plain image 15 is, for example, a white image with uniform brightness. Therefore, when illuminated by the plain image 15, the inspection target K is illuminated brightly as a whole.

カメラ120は、例えば、CCD(charge coupled device)、CMOS(Complementary Metal Oxide Semiconductor)を用いたデジタルカメラである。カメラ120は、反射光L2を受光することで、ディスプレイ110により照明された検査対象Kを撮影する。 The camera 120 is, for example, a digital camera using a CCD (charge coupled device) and a CMOS (Complementary Metal Oxide Semiconductor). The camera 120 captures the inspection target K illuminated by the display 110 by receiving the reflected light L2.

コンピュータ130は、図3に示すように、ハードディスク131と、CPU(Central Processing Unit)132と、RAM(Random Access Memory)133と、入出力装置134と、I/O(Input Output)135と、を備える。 As shown in FIG. 3, the computer 130 includes a hard disk 131, a CPU (Central Processing Unit) 132, a RAM (Random Access Memory) 133, an input/output device 134, and an I/O (Input Output) 135. Prepare

ハードディスク131は、後述の画像検査処理で用いられるプログラム、データを記憶している。ハードディスク131を、フラッシュメモリなどの他の補助記憶装置に代えてもよい。 The hard disk 131 stores programs and data used in the image inspection processing described later. The hard disk 131 may be replaced with another auxiliary storage device such as a flash memory.

CPU132は、ハードディスク131に記憶されたプログラムをRAM133に読み出して実行することで、後述の画像検査処理を実行する。CPU132は、後述の画像検査処理を実行するときに、ハードディスク131に記憶されたデータ(例えば、明暗パターン画像11の画像データ、及び、無地画像15の画像データなど)を使用する。なお、コンピュータ130は、CPU132に代えて又は加えて、GPU(Graphics Processing Unit)又はDSP(Digital Signal Processor)などを備えてもよい。この場合、GPU又はDSPなどが画像検査処理の少なくとも一部を実行してもよい。画像検査処理は、例えば、一以上のプロセッサがプログラムを実行することにより行われればよい。画像検査処理の少なくとも一部は、論理回路などプログラムによらない処理回路などによって行われても良い(この場合、コンピュータ130が当該処理回路を備えるものとする)。 The CPU 132 executes the image inspection process described later by reading the program stored in the hard disk 131 into the RAM 133 and executing the program. The CPU 132 uses the data stored in the hard disk 131 (for example, the image data of the light-dark pattern image 11 and the image data of the plain image 15) when executing the image inspection processing described later. The computer 130 may include a GPU (Graphics Processing Unit) or a DSP (Digital Signal Processor) instead of or in addition to the CPU 132. In this case, the GPU or DSP may execute at least a part of the image inspection process. The image inspection process may be performed by, for example, one or more processors executing a program. At least a part of the image inspection processing may be performed by a processing circuit such as a logic circuit that does not depend on a program (in this case, the computer 130 includes the processing circuit).

RAM133には、ハードディスク131に記憶されたプログラム及びデータが読み出される。RAM133は、CPU132のメインメモリである。また、RAM133には、画像検査処理の実行中に生成されたデータ(後述の画像データ等)が保持される。RAMは、VRAM(Video RAM)などを含んでもよい。RAM133は、フラッシュメモリなどであってもよい。 Programs and data stored in the hard disk 131 are read into the RAM 133. The RAM 133 is the main memory of the CPU 132. Further, the RAM 133 holds data (image data described later and the like) generated during execution of the image inspection process. The RAM may include VRAM (Video RAM) or the like. The RAM 133 may be a flash memory or the like.

入出力装置134は、ディスプレイなどの表示装置、音声出力装置、キーボード、マウスなどを含んで構成される。表示装置は、CPU132の制御のもとで所定の画像を表示する。音声出力装置は、CPU132の制御のもとで音声を出力する。キーボード、マウスは、操作されたときに操作内容に応じた信号をCPU132に供給する。CPU132は、供給された信号に応じた処理を行う。 The input/output device 134 includes a display device such as a display, a voice output device, a keyboard, a mouse, and the like. The display device displays a predetermined image under the control of the CPU 132. The audio output device outputs audio under the control of the CPU 132. When the keyboard and the mouse are operated, they supply the CPU 132 with a signal according to the operation content. The CPU 132 performs processing according to the supplied signal.

I/O135には、ディスプレイ110及びカメラ120が接続される。CPU132は、映像信号をI/O135を介してディスプレイ110に供給する。ディスプレイ110は、供給された映像信号に基づいて画像を表示する。このように、CPU132は、映像信号の供給により、ディスプレイ110を制御する。また、CPU132は、撮影を指示する制御信号をカメラ120にディスプレイ110に供給する。カメラ120は、当該制御信号が供給されると、撮影動作を行い、ディスプレイ110により照明された検査対象Kを撮影する。カメラ120は、当該撮影により得られた撮影画像を示す画像データをコンピュータ130に供給する。コンピュータ130に供給される画像データは、I/O135に入力され、RAM133に保持される。 The display 110 and the camera 120 are connected to the I/O 135. The CPU 132 supplies the video signal to the display 110 via the I/O 135. The display 110 displays an image based on the supplied video signal. In this way, the CPU 132 controls the display 110 by supplying the video signal. Further, the CPU 132 supplies a control signal for instructing photographing to the camera 120 to the display 110. When the control signal is supplied, the camera 120 performs a shooting operation and shoots the inspection target K illuminated by the display 110. The camera 120 supplies image data indicating a captured image obtained by the capturing to the computer 130. The image data supplied to the computer 130 is input to the I/O 135 and held in the RAM 133.

(画像検査処理)
次に、CPU132が実行する画像検査処理を、図5を参照して説明する。なお、ステップS101〜S109は、明暗パターン画像11(図2(A))を用いた欠陥検出である。当該欠陥検出は、検査対象Kに付けられたキズ等の欠陥の検出に好適である。ステップS111〜S118は、無地画像15(図2(B))を用いた欠陥検出である。当該欠陥検出は、検査対象Kに付着したゴミ、検査対象Kの塗装剥がれ等の欠陥の検出に好適である。
(Image inspection processing)
Next, the image inspection process executed by the CPU 132 will be described with reference to FIG. Note that steps S101 to S109 are defect detection using the light-dark pattern image 11 (FIG. 2A). The defect detection is suitable for detecting defects such as scratches on the inspection target K. Steps S111 to S118 are defect detection using the plain image 15 (FIG. 2B). The defect detection is suitable for detecting defects such as dust adhering to the inspection target K and paint peeling off of the inspection target K.

CPU132は、まず、明暗パターン画像11を用いた照明による第1撮影処理を実行する(ステップS101)。 The CPU 132 first executes a first photographing process by illumination using the bright and dark pattern image 11 (step S101).

第1撮影処理において、CPU132は、ハードディスク131に記憶された画像データに基づいてディスプレイ110を制御し、明暗パターン画像11をディスプレイ110に表示させるとともに、明暗パターン画像11の明部11A及び暗部11B(明暗パターン画像11が示す明暗パターン)を移動させる。CPU132は、明部11A及び暗部11Bを、これらが並んだ方向(ここでは、縦方向)に一周期分移動させる。例えば、CPU132は、図4(A)の状態から、明部11A及び暗部11Bを下方にスライドさせる。これにより、最下位置の明部11A又は暗部11Bが徐々に下方に消えていき、その分、新たな明部11A又は暗部11Bが上から徐々に現れる(図4(A)→(B)→(C)→(D)→(E)参照)。そして、図4(E)のように明部11Aと暗部11Bとが図4(A)の状態と同じ状態となったときに、明部11A及び暗部11Bの移動は終了する。このように、明部11A及び暗部11B(明暗パターン)を「一周期分移動させる」とは、ある状態の明部11A及び暗部11Bの明暗パターンを初期パターンとし(図4(A))、当該明部11A及び暗部11Bの移動によって変化する当該明部11A及び暗部11Bの明暗パターンが初期パターンと同じになるまで(又は、後述のカメラ120による撮影が終了するまで)、明部11A及び暗部11B(明暗パターン)を移動させることをいう。 In the first shooting process, the CPU 132 controls the display 110 based on the image data stored in the hard disk 131 to display the bright-dark pattern image 11 on the display 110, and the bright portion 11A and the dark portion 11B of the bright-dark pattern image 11 ( The light/dark pattern indicated by the light/dark pattern image 11 is moved. The CPU 132 moves the bright portion 11A and the dark portion 11B by one cycle in the direction in which they are lined up (here, the vertical direction). For example, the CPU 132 slides the bright portion 11A and the dark portion 11B downward from the state of FIG. As a result, the bright portion 11A or the dark portion 11B at the lowest position gradually disappears downward, and a new bright portion 11A or the dark portion 11B gradually appears from the upper portion (FIG. 4(A)→(B)→ (See (C)→(D)→(E)). Then, when the bright portion 11A and the dark portion 11B are in the same state as the state of FIG. 4A as shown in FIG. 4E, the movement of the bright portion 11A and the dark portion 11B ends. As described above, “moving the bright portion 11A and the dark portion 11B (bright/dark pattern) by one cycle” means that the bright/dark pattern of the bright portion 11A and the dark portion 11B in a certain state is the initial pattern (FIG. 4(A)). Until the light-dark pattern of the light portion 11A and the dark portion 11B that changes due to the movement of the light portion 11A and the dark portion 11B becomes the same as the initial pattern (or until the photographing by the camera 120 described later ends), the light portion 11A and the dark portion 11B. To move (bright and dark pattern).

さらに、第1撮影処理において、CPU132は、明暗パターン画像11の表示中に、カメラ120も制御し、カメラ120により検査対象Kを一定間隔で所定回数撮影する。例えば、図4(A)の初期状態での照明時を1回目の撮影タイミングとし、これ以降、一定間隔で検査対象Kを撮影する。例えば、RAM133に所定期間毎にタイマ値が更新されるタイマを設け、当該タイマ値が予め定められた複数の値のいずれかになるごとにカメラ120に撮像を行わせる。このようにして、カメラ120は、検査対象Kを撮影した複数の撮影画像を得る。なお、当該複数の撮影画像それぞれは、明部11A及び暗部11Bに対応した明暗パターンが表面に映った検査対象Kを撮影した画像であり、各画像で検査対象Kに映った各明暗パターンは異なっている。特に、検査対象Kの各部分(欠陥部分を含む)は、明部11Aと暗部11Bとが通過する。なお、前記複数の撮影画像を撮影画像1〜N(Nは、2以上の自然数)とする。カメラ120は、撮影画像1〜Nそれぞれを示す画像データ1〜Nをコンピュータ130に供給する。CPU132は、画像データ1〜NをRAM133に保持する。この実施の形態では、撮影画像1〜Nはグレースケールの画像とする。例えば、カメラ120が撮影画像としグレースケールの画像を得てもよいし、カメラ120はカラー画像を得て、CPU132が画像処理によりグレースケールの画像に変換してもよい。撮像画像1〜Nは、カメラ120が撮影した画像に対してCPU132が所定の画像処理(強調処理等)を施したものであってもよい。 Further, in the first shooting process, the CPU 132 also controls the camera 120 while the bright/dark pattern image 11 is being displayed, and the camera 120 shoots the inspection target K a predetermined number of times at regular intervals. For example, the illumination time in the initial state of FIG. 4A is set as the first image capturing timing, and thereafter, the inspection target K is imaged at regular intervals. For example, the RAM 133 is provided with a timer whose timer value is updated every predetermined period, and the camera 120 is caused to take an image every time the timer value becomes one of a plurality of predetermined values. In this way, the camera 120 obtains a plurality of captured images of the inspection object K. It should be noted that each of the plurality of captured images is an image of the inspection target K in which the bright and dark patterns corresponding to the bright portion 11A and the dark portion 11B are reflected on the surface, and each light and dark pattern reflected in the inspection target K is different in each image. ing. In particular, the bright portion 11A and the dark portion 11B pass through each portion of the inspection target K (including the defective portion). Note that the plurality of captured images are captured images 1 to N (N is a natural number of 2 or more). The camera 120 supplies the image data 1 to N indicating the captured images 1 to N to the computer 130. The CPU 132 holds the image data 1 to N in the RAM 133. In this embodiment, the captured images 1 to N are grayscale images. For example, the camera 120 may obtain a grayscale image as a captured image, or the camera 120 may obtain a color image and the CPU 132 may convert it into a grayscale image by image processing. The captured images 1 to N may be images obtained by the CPU 132 subjecting the images captured by the camera 120 to predetermined image processing (e.g., emphasis processing).

ステップS101のあと、CPU132は、画像データ1〜N、つまり、撮影画像1〜Nに基づいて差分画像Sを生成する(ステップS102)。具体的には、CPU132は、撮影画像1〜Nそれぞれの同じ座標に位置する各画素の輝度値(例えば、256階調に対応した0〜255いずれかの値を取る)を比較し、各座標に位置する画素それぞれについて最大輝度値(例えば明部11Aにより照明されたときの輝度値)と最小輝度値(例えば暗部11Bにより照明されたときの輝度値)とを特定する。そして、CPU132は、各座標に位置する画素それぞれについて最大輝度値を集めた最大輝度値画像を生成するとともに、各座標に位置する画素それぞれについて最小輝度値を集めた最小輝度値画像を生成する。そして、CPU132は、最大輝度値画像と最小輝度値画像との差分を取り、差分画像Sを生成する。 After step S101, the CPU 132 generates the difference image S based on the image data 1 to N, that is, the captured images 1 to N (step S102). Specifically, the CPU 132 compares the luminance values of the pixels located at the same coordinates of the captured images 1 to N (for example, takes any value of 0 to 255 corresponding to 256 gradations), and determines the coordinates. The maximum luminance value (for example, the luminance value when illuminated by the bright portion 11A) and the minimum luminance value (for example, the luminance value when illuminated by the dark portion 11B) are specified for each of the pixels located at. Then, the CPU 132 generates a maximum brightness value image in which maximum brightness values are collected for each pixel located at each coordinate, and a minimum brightness value image in which minimum brightness values are collected for each pixel located at each coordinate. Then, the CPU 132 takes the difference between the maximum brightness value image and the minimum brightness value image to generate the difference image S.

例えば、i番目の画像の座標(x,y)の画素の輝度をPxy(i)とすると、CPU132は、最大輝度値画像Qxyを、Qxy=max(Pxy(i))、最小輝度値画像Rxyを、Rxy=min(Pxy(i))から求める(i=1,2,3・・・N)。また、CPU132は、差分画像Sxyを、Sxy=max(Pxy)−min(Pxy)で求める。例えば、最も左上の画素の輝度値が、撮影画像1で最も高く、撮影画像Nで最も低い場合、当該撮影画像1の最も左上の画素の輝度値から当該撮影画像Nの最も左上の画素の輝度値を減じた値が、差分画像Sの最も左上の画素の輝度値になる。 For example, when the brightness of the pixel at the coordinates (x, y) of the i-th image is Pxy(i), the CPU 132 determines that the maximum brightness value image Qxy is Qxy=max(Pxy(i)) and the minimum brightness value image Rxy. From Rxy=min(Pxy(i)) (i=1, 2, 3... N). Further, the CPU 132 obtains the difference image Sxy by Sxy=max(Pxy)-min(Pxy). For example, when the brightness value of the upper left pixel is highest in the captured image 1 and lowest in the captured image N, the brightness value of the upper left pixel of the captured image 1 is changed to the brightness of the upper left pixel of the captured image N. The value obtained by subtracting the value becomes the brightness value of the upper left pixel of the difference image S.

CPU132は、最大輝度値画像、最小輝度値画像を生成せずに、各画素について最大輝度値−最小輝度値の値を算出し、算出した各値を各画素の輝度値として差分画像Sを生成してもよい。 The CPU 132 calculates the value of the maximum brightness value-the minimum brightness value for each pixel without generating the maximum brightness value image and the minimum brightness value image, and generates the difference image S by using each calculated value as the brightness value of each pixel. You may.

ここで、従来の差分画像Sの使用法について説明する。一般に、撮影画像にキズ等の欠陥が写っている場合、上記最大輝度値と、上記最小輝度値との差は、欠陥のない正常の部分における明るさの差よりも小さい。つまり、差分画像Sにおいて欠陥が写った部分の輝度値は、正常部分の輝度値よりも減少する。差分画像Sの各輝度値は、最大輝度値と最小輝度値との差であるためである。従来は、このようなことを利用し、差分画像Sにおいて閾値以上である輝度値の画素を「1」(白)、閾値未満である輝度値の画素を「0」(黒)とした2値化画像を生成し、「0」の画素領域を欠陥として検出していた。しかしながら、検査対象Kに起伏があると、検査対象Kがディスプレイ110により一様に照明されない場合がある。具体的には、検査対象Kにおける、明部11A(又は暗部11B)によって照明された領域に明領域と暗領域(明領域よりも暗い領域)とが生じてしまう場合がある。このような場合、差分画像における前記暗領域に対応する部分は、前記明領域に対応する部分に比べ、その輝度値(最大輝度値と最小輝度値との差)が全体的に低くなる(正常部分であっても低くなる)。このため、従来の方法では、このような暗領域全体が欠陥として誤検出されていた。この実施の形態では、このような不都合を解消すべく、差分画像Sに基づいて以下の処理を行う。 Here, the usage of the conventional difference image S will be described. In general, when a defect such as a flaw appears in a captured image, the difference between the maximum luminance value and the minimum luminance value is smaller than the difference in brightness in a normal portion having no defect. That is, the luminance value of the portion in which the defect is shown in the difference image S is smaller than the luminance value of the normal portion. This is because each brightness value of the difference image S is the difference between the maximum brightness value and the minimum brightness value. Conventionally, by utilizing such a thing, a pixel having a luminance value that is equal to or larger than a threshold value in the difference image S is “1” (white), and a pixel having a luminance value that is less than the threshold value is “0” (black). The generated image is generated and the pixel region of "0" is detected as a defect. However, if the inspection object K has undulations, the inspection object K may not be uniformly illuminated by the display 110. Specifically, in the inspection object K, a bright region and a dark region (a region darker than the bright region) may occur in the region illuminated by the bright portion 11A (or the dark portion 11B). In such a case, the brightness value (difference between the maximum brightness value and the minimum brightness value) of the portion corresponding to the dark area in the difference image is generally lower than that of the portion corresponding to the bright area (normally). Even the part will be low). Therefore, in the conventional method, the entire dark area is erroneously detected as a defect. In this embodiment, in order to eliminate such inconvenience, the following processing is performed based on the difference image S.

CPU132は、差分画像Sの各画素の輝度値を一定範囲毎に均一化し、第1基準画像を生成する(ステップS103)。例えば、CPU132は、差分画像Sの各画素を、16×16の画素からなる画素群に分け、各画素群内の画素それぞれの輝度をその画素群の各画素の輝度値に基づいて均一化する。例えば、CPU132は、16×16の画素の各輝度値の、中央値、平均値等を当該16×16の画素それぞれの輝度値とすることで均一化を行う(図6参照)。このようにして得られた画像が第1基準画像である。なお、中央値又は平均値による均一化は、平均化ともいう。 The CPU 132 uniformizes the brightness value of each pixel of the difference image S in each fixed range to generate a first reference image (step S103). For example, the CPU 132 divides each pixel of the difference image S into a pixel group of 16×16 pixels, and uniformizes the brightness of each pixel in each pixel group based on the brightness value of each pixel of the pixel group. .. For example, the CPU 132 equalizes the brightness values of the 16×16 pixels by setting the median value, the average value, and the like as the brightness values of the 16×16 pixels (see FIG. 6). The image thus obtained is the first reference image. The homogenization based on the median or the average value is also referred to as averaging.

また、ステップS103と同様の均一化を、第1基準画像よりも狭い範囲(例えば、4×4の画素の画素群)で行って第1検査画像を生成する(ステップS104)。均一化で採用する値(中央値、平均値等)は、第1基準画像と第1検査画像とで同じであってもよいし、異なってもよい。 Further, the same homogenization as in step S103 is performed in a range narrower than the first reference image (for example, a pixel group of 4×4 pixels) to generate a first inspection image (step S104). The values (median value, average value, etc.) used for equalization may be the same or different between the first reference image and the first inspection image.

その後、CPU132は、第1基準画像における暗い領域を画像検査の処理対象外の領域として特定する(ステップS105)。例えば、CPU132は、第1基準画像を構成する各画素のうち、所定の輝度値以下の画素が所定の数以上集まった領域を特定する。このような領域の、明部11Aにより照明されたときの明るさと照明11Bにより照明されたときの明るさとの差は小さい。従って、当該領域は、元々暗い、検査対象K以外の領域(例えば、台ST)が写った領域である可能性が高い。このため、当該領域を画像検査の処理対象外の領域として扱う。当該領域は、ラベリング処理等により特定される。 After that, the CPU 132 specifies the dark area in the first reference image as an area not to be processed by the image inspection (step S105). For example, the CPU 132 specifies an area in which a predetermined number or more of pixels having a predetermined luminance value or less are gathered among the pixels forming the first reference image. In such an area, the difference between the brightness when illuminated by the bright portion 11A and the brightness when illuminated by the illumination 11B is small. Therefore, the area is highly likely to be an area that is originally dark and in which an area other than the inspection object K (for example, the stand ST) appears. Therefore, the area is treated as an area that is not the processing target of the image inspection. The area is specified by a labeling process or the like.

その後、CPU132は、当該処理対象外の領域を第1基準画像及び第1検査画像それぞれの画像から排除する(ステップS106)。例えば、CPU132は、処理対象外の領域を第1基準画像及び第1検査画像から削除する。又は、CPU132は、処理対象外の領域の画素の情報をRAM133に保持しておき、後述のステップS107において、当該保持している情報により特定される画素を処理の対象外とする。なお、ステップS106において処理対象外の領域が排除された画像を、第2基準画像及び第2検査画像と呼ぶ。第1検査画像に基づいて処理対象外の領域を排除してもよい。 After that, the CPU 132 excludes the area outside the processing target from the images of the first reference image and the first inspection image (step S106). For example, the CPU 132 deletes the area that is not the processing target from the first reference image and the first inspection image. Alternatively, the CPU 132 holds the information of the pixels in the non-processing target area in the RAM 133, and excludes the pixel specified by the held information from the processing target in step S107 described later. The images from which the areas other than the processing target are excluded in step S106 are referred to as the second reference image and the second inspection image. Areas that are not the processing target may be excluded based on the first inspection image.

その後、CPU132は、第2基準画像及び第2検査画像それぞれの同じ座標の画素の輝度値同士を比較し、比較結果に応じた2値化画像を生成する(ステップS107)。例えば、CPU132は、図7に示すように、XY座標が(50,100)の画素の輝度値同士を比較し、比較結果に応じて(50,100)の画素を「0」(黒)又は「1」(白)とする。CPU132は、このような処理を全画素について行い、2値化画像を生成する。 After that, the CPU 132 compares the brightness values of the pixels of the same coordinates in the second reference image and the second inspection image, respectively, and generates a binarized image according to the comparison result (step S107). For example, as shown in FIG. 7, the CPU 132 compares the luminance values of the pixels having the XY coordinates (50, 100) with each other, and determines the pixel (50, 100) as “0” (black) or according to the comparison result. Set to "1" (white). The CPU 132 performs such processing on all pixels and generates a binarized image.

ここで、第2基準画像は、差分画像Sの16×16の画素の輝度値(つまり、広い範囲の輝度値)を均一化したものであり(ステップS103)、欠陥が写った部分の輝度値の影響を少なくした画像である。第2基準画像は、差分画像Sにおける、16×16の画素(均一化する画素群)を単位とした、輝度(撮影画像1〜Nにおける最大輝度値−最小輝度値)の分布を示す基準となる画像とも言える。一方、第2検査画像は、差分画像Sの4×4の画素(つまり、狭い範囲(第2基準画像よりも狭い範囲))の輝度値を均一化したものであり(ステップS104)、欠陥が写った部分の輝度値の影響を受けている画像である。そして、第2基準画像及び第2検査画像それぞれの輝度値の比較により、差分画像Sにおける、ある画素の輝度値(撮影画像1〜Nにおける最大輝度値−最小輝度値)と、当該ある画素の周囲の複数の画素(厳密には、当該ある画素を含む上記16×16の画素)の輝度値(撮影画像1〜Nにおける最大輝度値−最小輝度値)の程度とが、どのような関係にあるかを局所的に把握できる。ある画素の輝度値が周囲の輝度値の程度よりも低い場合、当該ある画素は欠陥が写った部分の画素であると考えられる。このため、ステップS107では、CPU132は、第2基準画像及び第2検査画像それぞれの同じ座標の画素の輝度値同士を比較し、第2検査画像の輝度値が第2基準画像の輝度値よりも、予め定められた基準以上に低い部分の画素を「0」(黒)とし、それ以外の部分の画素を「1」(白)とする。前記の基準は、欠陥を精度良く検出できるように、例えば、実験等により予め導き出しておく。このように、この実施の形態では、差分画像Sにおいて局所的に輝度減少がある部分(欠陥と思われる部分)を捉えることができる。従って、検査対象Kに上記暗領域(照明されても比較的暗い領域)が発生してしまう場合であっても、暗領域全体でなく、当該欠陥が写った部分を精度良く2値化画像における黒の領域とすることができる。つまり、後の処理において、精度良く欠陥を検出できる。 Here, the second reference image is one in which the luminance values of the 16×16 pixels of the difference image S (that is, the luminance values in a wide range) are made uniform (step S103), and the luminance value of the portion in which the defect appears It is an image with less influence of. The second reference image is a reference indicating a distribution of luminance (maximum luminance value-minimum luminance value in the captured images 1 to N) in the difference image S in units of 16×16 pixels (pixel group to be uniformed). It can be said that the image. On the other hand, the second inspection image is one in which the luminance values of the 4×4 pixels (that is, the narrow range (the range narrower than the second reference image)) of the difference image S are made uniform (step S104), and the defect is It is an image that is affected by the brightness value of the reflected portion. Then, by comparing the brightness values of the second reference image and the second inspection image, the brightness value of a certain pixel in the difference image S (the maximum brightness value-the minimum brightness value in the captured images 1 to N) and the brightness value of the certain pixel What relationship does the degree of the brightness value (maximum brightness value-minimum brightness value in the captured images 1 to N) of a plurality of surrounding pixels (strictly speaking, the 16×16 pixels including the certain pixel) have? It can be grasped locally whether there is. When the luminance value of a certain pixel is lower than the luminance value of the surroundings, the certain pixel is considered to be the pixel in the portion where the defect appears. Therefore, in step S107, the CPU 132 compares the brightness values of the pixels of the same coordinates in the second reference image and the second inspection image, and the brightness value of the second inspection image is lower than the brightness value of the second reference image. Pixels in a portion lower than a predetermined standard are set to “0” (black), and pixels in other portions are set to “1” (white). The above criteria are derived in advance by, for example, experiments so that defects can be detected with high accuracy. As described above, in this embodiment, it is possible to capture a portion (a portion that seems to be a defect) in which the luminance is locally reduced in the difference image S. Therefore, even when the dark area (relatively dark area even when illuminated) occurs in the inspection object K, not the entire dark area but the part in which the defect appears is accurately represented in the binarized image. It can be a black area. That is, the defect can be detected with high accuracy in the subsequent processing.

例えば、CPU132は、ステップS107において、第2基準画像及び第2検査画像それぞれの同じ座標の画素の輝度値の比(第2基準画像の画素の輝度値を分母とする。)を取り、当該比が所定値以上であれば、その座標の画素の画素値を「1」(白の画素)とし、それ以外の画素(前記比が所定値未満の画素)の画素値を「0」(黒の画素)とした2値化画像を生成する。前記の所定値は、欠陥を精度良く検出できるように、例えば、実験等により予め導き出しておく。 For example, in step S107, the CPU 132 takes the ratio of the brightness values of the pixels of the same coordinates of the second reference image and the second inspection image (the brightness value of the pixels of the second reference image is the denominator), and the ratio is obtained. Is greater than or equal to a predetermined value, the pixel value of the pixel at that coordinate is set to “1” (white pixel), and the pixel values of the other pixels (pixels whose ratio is less than the predetermined value) are set to “0” (black pixel). Pixel) binarized image is generated. The predetermined value is derived in advance by, for example, an experiment so that the defect can be detected with high accuracy.

その後、CPU132は、2値化画像に基づいて、欠陥の有無を判定し(ステップS108)、判定結果をRAM133に記録する(ステップS109)。例えば、2値化画像の黒の画素についてラベリングを行い、ラベリングにより特定された黒の画素の集まりであって画素数が所定数以上の画素の集まりを欠陥として判定する。この判定により欠陥が検出された場合、当該画素の集まりを含む所定範囲の画像を2値化画像又は差分画像Sから切り取り、切り取った画像(以下、欠陥有り画像という)と欠陥有りの情報とを判定結果としてRAM133の所定領域に格納する。なお、欠陥が検出されなかったときには、その旨(欠陥無し)を判定結果としてRAM133の処理領域に格納する。 After that, the CPU 132 determines the presence or absence of a defect based on the binarized image (step S108), and records the determination result in the RAM 133 (step S109). For example, labeling is performed on black pixels of the binarized image, and a group of black pixels identified by labeling and having a predetermined number of pixels or more is determined as a defect. When a defect is detected by this determination, an image in a predetermined range including a group of the pixels is cut from the binarized image or the difference image S, and the cut image (hereinafter, referred to as a defective image) and information indicating that there is a defect. The determination result is stored in a predetermined area of the RAM 133. When no defect is detected, that effect (no defect) is stored in the processing area of the RAM 133 as a determination result.

次に、CPU132は、無地画像15を用いた照明による第2撮影処理を実行する(ステップS111)。第2撮影処理において、CPU132は、ハードディスク131に記憶された画像データに基づいてディスプレイ110を制御し、無地画像15をディスプレイ110に表示させるとともに、カメラ120も制御し、カメラ120により検査対象Kを撮影する。撮影回数は1回でよい。当該撮影で得られた撮影画像Xとする。カメラ120は、撮影画像Xを示す画像データXをコンピュータ130に供給する。CPU132は、画像データXをRAM133に保持する。RAM133に保持する撮影画像Xも上記と同様、グレースケールの画像とする。撮像画像Xは、カメラ120が撮影した画像に対してCPU132が所定の画像処理(強調処理等)を施したものであってもよい。 Next, the CPU 132 executes a second photographing process by illumination using the plain image 15 (step S111). In the second photographing process, the CPU 132 controls the display 110 based on the image data stored in the hard disk 131 to display the plain image 15 on the display 110, and also controls the camera 120 so that the camera 120 controls the inspection target K. Take a picture. The number of shots may be one. Let it be a photographed image X obtained by the photographing. The camera 120 supplies the image data X indicating the captured image X to the computer 130. The CPU 132 holds the image data X in the RAM 133. The photographed image X held in the RAM 133 is also a grayscale image as in the above. The captured image X may be an image obtained by the CPU 132 performing predetermined image processing (e.g., emphasis processing) on the image captured by the camera 120.

その後、CPU132は、撮影画像Xの各画素の輝度値を一定範囲毎に均一化し、第3基準画像を生成する(ステップS112)。また、ステップS112と同様の均一化を、第3基準画像よりも狭い範囲で行って第3検査画像を生成する(ステップS113)。ステップS112及びS113は、ステップS103及びS104と同様の処理(差分画像Sが撮像画像Xに変更される)である。均一化の範囲、及び、均一化で採用する値(中央値、平均値等)との少なくとも一方は、ステップS103とステップS104とで異なってもよい。 After that, the CPU 132 makes the luminance values of the pixels of the captured image X uniform in each fixed range and generates a third reference image (step S112). Further, the same homogenization as in step S112 is performed in a narrower range than the third reference image to generate a third inspection image (step S113). Steps S112 and S113 are the same processing as steps S103 and S104 (the difference image S is changed to the captured image X). At least one of the homogenization range and the value (median value, average value, etc.) adopted in the homogenization may be different in step S103 and step S104.

その後、CPU132は、第3基準画像における暗い領域を画像検査の処理対象外の領域として特定し(ステップS114)、特定した処理対象外の領域を第3基準画像及び第3検査画像それぞれの画像から排除する(ステップS115)。ここで、排除後の画像を第4基準画像及び第4検査画像とする。そして、CPU132は、第4基準画像及び第4検査画像それぞれの同じ座標の画素の輝度値を比較し、比較結果に応じた2値化画像を生成し(ステップS116)、欠陥候補の有無を判定し(ステップS117)、判定結果を記録する(ステップS118)。ステップS114〜S118は、ステップS105〜S109の処理を同様である。特にステップS118では、欠陥が検出された場合、欠陥として検出された画素の集まりを含む所定範囲の画像を2値化画像又は撮影画像Xから切り取り、切り取った画像(以下、欠陥有り画像という)と欠陥有りの情報とを判定結果としてRAM133の所定領域に格納する。なお、欠陥が検出されなかったときには、その旨(欠陥無し)を判定結果としてRAM133の処理領域に格納する。ステップS114〜S118により、上記と同様、検査対象Kに上記暗領域(明部11Aにより照明されても比較的暗い領域)が発生してしまう場合であっても、暗領域全体でなく、当該欠陥に対応する部分を精度良く2値化画像における黒の領域とすることができ、欠陥を精度良く検出できる。 After that, the CPU 132 identifies a dark region in the third reference image as a region outside the processing target of the image inspection (step S114), and identifies the identified region outside the processing target from the respective images of the third reference image and the third inspection image. Exclude (step S115). Here, the images after exclusion are the fourth reference image and the fourth inspection image. Then, the CPU 132 compares the luminance values of pixels at the same coordinates in the fourth reference image and the fourth inspection image, generates a binarized image according to the comparison result (step S116), and determines the presence/absence of a defect candidate. (Step S117), and the determination result is recorded (step S118). Steps S114 to S118 are similar to the processing of steps S105 to S109. In particular, in step S118, when a defect is detected, an image in a predetermined range including a collection of pixels detected as a defect is cut out from the binarized image or the captured image X, and a cut image (hereinafter, referred to as a defective image) is displayed. The defect information is stored as a determination result in a predetermined area of the RAM 133. When no defect is detected, that effect (no defect) is stored in the processing area of the RAM 133 as a determination result. Even if the dark area (relatively dark area even when illuminated by the bright portion 11A) is generated in the inspection object K by the steps S114 to S118, the defect is not the entire dark area, as described above. The portion corresponding to can be accurately set as the black area in the binarized image, and the defect can be detected with high accuracy.

その後、CPU132は、RAM133の前記所定領域に格納された判定結果を参照する(ステップS120)。参照した判定結果に欠陥有りの情報が含まれる場合(ステップS120;Yes)、CPU132は、判定結果としてRAM133に格納された欠陥有り画像を欠陥候補として入出力装置134の表示装置に表示させたり、欠陥有りの旨の音声を入出力装置134の音声出力装置から出力させたりする、欠陥有りの報知を実行する(ステップS121)。参照した判定結果に欠陥無しの情報が含まれる場合(ステップS120;No)、又は、ステップS121のあとは、CPU132は、画像検査処理を終了する。なお、ステップS120;Noのときは、CPU132は、欠陥無しの情報を入出力装置134から出力してもよい。 After that, the CPU 132 refers to the determination result stored in the predetermined area of the RAM 133 (step S120). When the referenced determination result includes information indicating that there is a defect (step S120; Yes), the CPU 132 causes the display device of the input/output device 134 to display a defective image stored in the RAM 133 as the determination result, or A notification indicating that there is a defect is executed by outputting a voice indicating that there is a defect from the voice output device of the input/output device 134 (step S121). When the referred determination result includes information indicating that there is no defect (step S120; No), or after step S121, the CPU 132 ends the image inspection process. Note that when step S120; No, the CPU 132 may output information indicating no defect from the input/output device 134.

(本実施の形態の効果の説明)
この実施の形態では、第2基準画像の各画素の輝度値と第2検査画像の各画素の輝度値とを比較することにより(ステップS107)、差分画像Sにおける、ある部分の輝度値(撮影画像1〜Nにおける最大輝度値−最初輝度値)と、その周囲の部分の輝度値の程度(平均的な輝度値など)とを、局所的に比較するので、欠陥があったときの輝度値の減少を、前記ある部分が検査対象Kにおける前記暗領域(照明されても比較的暗い領域)内に位置しているか否かにかかわらず、適切に捉えることができる。特に、上述のように、第2基準画像の各画素の輝度値と第2検査画像の各画素の輝度値との比を取ることで、当該輝度値の減少を適切に捉えることができる。このため、本実施の形態は、前記従来の方法よりも、欠陥に対応する部分を、精度良く、2値化画像における黒の画像と変換することができ、検査対象Kに前記暗領域が生じたとしても、欠陥の検出の精度が良い。
(Explanation of effects of the present embodiment)
In this embodiment, by comparing the luminance value of each pixel of the second reference image with the luminance value of each pixel of the second inspection image (step S107), the luminance value of a certain portion in the difference image S (image pickup) Since the maximum luminance value-first luminance value in images 1 to N and the degree of luminance value of the surrounding portion (average luminance value etc.) are locally compared, the luminance value when there is a defect Can be appropriately captured regardless of whether or not the certain portion is located in the dark region (a relatively dark region even when illuminated) in the inspection object K. In particular, as described above, by taking the ratio of the brightness value of each pixel of the second reference image and the brightness value of each pixel of the second inspection image, the decrease in the brightness value can be appropriately captured. Therefore, in the present embodiment, the portion corresponding to the defect can be converted into a black image in the binarized image with higher accuracy than in the conventional method, and the dark region is generated in the inspection target K. Even if it does, the accuracy of defect detection is good.

また、この実施の形態では、撮像画像Xについても、第4基準画像の各画素の輝度値と第4検査画像の各画素の輝度値とを比較し、比較結果に応じた2値化画像を生成するので、無地画像15により照明された検査対象Kに明るさの異なる部分が発生しても、上記と同様に、欠陥を精度良く検出できる。 In addition, in the present embodiment, the captured image X is also compared with the luminance value of each pixel of the fourth reference image and the luminance value of each pixel of the fourth inspection image, and a binary image corresponding to the comparison result is generated. Since the image is generated, even if a portion having different brightness occurs in the inspection object K illuminated by the plain image 15, the defect can be detected with high accuracy in the same manner as described above.

また、この実施の形態では、明暗パターン画像11を用いた欠陥検出(ステップS101〜S109)と、無地画像15を用いた欠陥検出(ステップS111〜S118)と、を行う。明暗パターン画像11を用いた欠陥検出は、その反射率が欠陥でない部分に比べて比較的大きく異なる欠陥(例えば、キズなど)等の検出に向いている。一方で、無地画像15を用いた欠陥検出(一様な明るさの面照明による欠陥検出)は、その反射率が欠陥でない部分に比べて異ならない欠陥(例えば、ホコリ等のゴミの付着、塗装剥がれなど)等の検出に向いている。従って、上記2つの欠陥検出を行うことで、多くの欠陥を精度良く検出できる。特に、この実施の形態では、上記2つの欠陥検出をディスプレイ110への画像表示により実現しているので、簡素な構成で上記2つの欠陥検出を行うことができる。 In addition, in this embodiment, defect detection using the light-dark pattern image 11 (steps S101 to S109) and defect detection using the plain image 15 (steps S111 to S118) are performed. Defect detection using the light-dark pattern image 11 is suitable for detection of defects (for example, scratches) whose reflectance is significantly different from that of a non-defect portion. On the other hand, in the defect detection using the plain image 15 (defect detection by surface illumination with uniform brightness), the defect whose reflectance is not different from that of the non-defective part (for example, adhesion of dust such as dust, coating) It is suitable for detecting such as peeling). Therefore, many defects can be accurately detected by performing the above-mentioned two defect detections. In particular, in this embodiment, since the two defects are detected by displaying the image on the display 110, the two defects can be detected with a simple configuration.

さらに、この実施の形態では、各基準画像及び各検査画像から、処理対象外の領域を排除している(ステップS106、S115)。従って、その後の欠陥検出のための処理(ステップS107、S116)の負担を軽減している。また、処理対象外の領域の一部又は全部を欠陥と誤検出することも防止できる。 Further, in this embodiment, the non-processing target area is excluded from each reference image and each inspection image (steps S106 and S115). Therefore, the burden of the subsequent processing for detecting defects (steps S107 and S116) is reduced. Further, it is possible to prevent erroneous detection of a part or all of the non-processing target area as a defect.

(明暗パターンの他の例)
第1撮影処理で使用される明暗パターン画像は、上記明暗パターン画像11でなくてもよい。以下、明暗パターン画像のバリエーションについて説明する。なお、明部と暗部の説明等、上記実施の形態の説明と重複する説明は適宜省略する。
(Other examples of light and dark patterns)
The light and dark pattern image used in the first photographing process may not be the light and dark pattern image 11 described above. Hereinafter, variations of the light and dark pattern image will be described. It should be noted that the description overlapping with the description of the above-described embodiment, such as the description of the bright part and the dark part, is appropriately omitted.

(明暗パターン画像20)
図8の明暗パターン画像20は、第1パターン画像21と、第2パターン画像22とを有する。第1パターン画像21は、一点鎖線よりも左側の領域R1に表示される。第2パターン画像22は、一点鎖線よりも右側の領域R2に表示される。第1パターン画像21と、第2パターン画像22とは、ディスプレイ110の同じ画面上の異なる領域に同時に表示される。
(Bright and dark pattern image 20)
The bright/dark pattern image 20 of FIG. 8 has a first pattern image 21 and a second pattern image 22. The first pattern image 21 is displayed in the region R1 on the left side of the alternate long and short dash line. The second pattern image 22 is displayed in the region R2 on the right side of the alternate long and short dash line. The first pattern image 21 and the second pattern image 22 are simultaneously displayed in different areas on the same screen of the display 110.

第1パターン画像21は、横方向(X軸方向)に交互に並んだ複数の明部21Aと複数の暗部21Bとからなる。複数の明部21Aと複数の暗部21Bとは、明暗が繰り返し(周期的に)現れた明暗パターンを構成している。各明部21A及び各暗部21Bは、Y軸方向を長尺方向とする帯形状(長方形)である。第1パターン画像21の明部21A及び暗部21B(明暗パターン)は、図8(A)〜(E)に示すように、右方向(X軸の正方向)に徐々に移動(スライド)する。この移動に伴って、領域R1の左辺から新たな明部21A又は暗部21Bが徐々に現れ、領域R1にすでに表示されている最も右側に位置する明部21A又は暗部21Bが領域R1の右辺(一点鎖線)を限界として徐々に消えていく。 The first pattern image 21 includes a plurality of bright portions 21A and a plurality of dark portions 21B that are alternately arranged in the lateral direction (X-axis direction). The plurality of bright portions 21A and the plurality of dark portions 21B form a light-dark pattern in which light and dark appear repeatedly (periodically). Each bright portion 21A and each dark portion 21B has a strip shape (rectangular shape) having the Y-axis direction as a long direction. The bright portion 21A and the dark portion 21B (bright/dark pattern) of the first pattern image 21 gradually move (slide) in the right direction (the positive direction of the X axis), as shown in FIGS. With this movement, a new bright part 21A or dark part 21B gradually appears from the left side of the region R1, and the rightmost bright part 21A or dark part 21B already displayed in the region R1 is located on the right side (one point) of the region R1. It gradually disappears with the chain line as the limit.

第2パターン画像22は、横方向(X軸方向)に交互に並んだ複数の明部22Aと複数の暗部22Bとからなる。複数の明部22Aと複数の暗部22Bとは、明暗が繰り返し(周期的に)現れた明暗パターンを構成している。各明部22A及び各暗部22Bは、Y軸方向を長尺方向とする帯形状(長方形)である。明部22Aは、明部21Aよりも幅(X軸方向の長さ)が狭い。暗部22Bも暗部21Bよりも幅が狭い。このように、第2パターン画像22は、第1パターン画像21とは異なるパターンとなっており、特に、第2パターン画像22の方が明暗の繰り返しの周期が小さいパターンの画像となっている。第2パターン画像22の明部22A及び暗部22B(明暗パターン)は、第1パターン画像21の明暗パターンと同様に、右方向(X軸の正方向)に徐々に移動(スライド)する(図8(A)〜(E)参照)。この移動に伴って、領域R2の左辺(一点鎖線)から新たな明部22A又は暗部22Bが徐々に現れ、領域R2にすでに表示されている最も右側に位置する明部22A又は暗部22Bが領域R2の右辺を限界として徐々に消えていく。 The second pattern image 22 includes a plurality of bright portions 22A and a plurality of dark portions 22B, which are alternately arranged in the lateral direction (X-axis direction). The plurality of bright portions 22A and the plurality of dark portions 22B form a light-dark pattern in which light and dark appear repeatedly (periodically). Each of the bright portions 22A and each of the dark portions 22B has a strip shape (rectangle) having the Y-axis direction as a long direction. The bright portion 22A has a narrower width (length in the X-axis direction) than the bright portion 21A. The dark portion 22B is also narrower than the dark portion 21B. In this way, the second pattern image 22 has a different pattern from the first pattern image 21, and in particular, the second pattern image 22 is an image of a pattern in which the repetition cycle of light and dark is smaller. Similarly to the light-dark pattern of the first pattern image 21, the light portion 22A and the dark portion 22B (light-dark pattern) of the second pattern image 22 gradually move (slide) in the right direction (the positive direction of the X axis) (FIG. 8). (See (A) to (E)). With this movement, a new bright portion 22A or dark portion 22B gradually appears from the left side (dotted line) of the area R2, and the rightmost bright portion 22A or dark portion 22B that is already displayed in the area R2 becomes the area R2. Gradually disappears with the right side of the limit.

CPU132は、ディスプレイ110を制御し、第1パターン画像21の明部21A及び暗部21B(明暗パターン)を一周期分移動させるとともに、第2パターン画像22の明部22A及び暗部22B(明暗パターン)を一周期分移動させる(図8(A)〜(E)参照)。コンピュータ130は、2つの明暗パターンそれぞれの一周期分の移動を同時に開始させ、同時に終了させる速度で、両パターンを移動させる。従って、第1パターン画像21の明部21A及び暗部21Bの移動速度の方が、第2パターン画像22の明部22A及び暗部22Bの移動速度よりも早い。 The CPU 132 controls the display 110 to move the bright portion 21A and the dark portion 21B (bright/dark pattern) of the first pattern image 21 by one cycle, and at the same time, moves the bright portion 22A and the dark portion 22B (bright/dark pattern) of the second pattern image 22. It is moved by one cycle (see FIGS. 8A to 8E). The computer 130 simultaneously starts the movements of one cycle of each of the two light and dark patterns, and moves the two patterns at the same speed. Therefore, the moving speeds of the bright portion 21A and the dark portion 21B of the first pattern image 21 are faster than the moving speeds of the bright portion 22A and the dark portion 22B of the second pattern image 22.

一般に明暗パターンは、その明部の幅及び暗部の幅が狭い(明暗の繰り返しの周期が小さい)と、小さな面積の欠陥を検出するのに好適となる(逆に大きな面積の欠陥は検出し難くなる)。逆に、その明部の幅及び暗部の幅が広い(明暗の繰り返しの周期が大きい)と、大きな面積の欠陥を検出するのに好適となる(逆に大きな面積の欠陥は検出し難くなる)。明暗パターン画像20では、第2パターン画像22の方が、第1パターン画像21よりも、その明暗の繰り返しの周期が小さいので、第2パターン画像22により細かい欠陥を検出し、第1パターン画像21により大きな欠陥を検出することができる。従って、検査対象Kの一部(第1領域)については大きな欠陥を検出し、他の一部(第2領域)については細かい欠陥を検出したいときに、第1パターン画像21を第1領域に映し、第2パターン画像22を第2領域に映すことで、好適に欠陥を検出することができる。また、検出したい欠陥が異なる2つの物をまとめて検査対象Kとすることもできる。 In general, the light-dark pattern is suitable for detecting a defect having a small area when the width of the light portion and the width of the dark portion are narrow (the cycle of light-dark repetition is small) (on the contrary, it is difficult to detect a defect having a large area). Become). On the contrary, if the width of the bright portion and the width of the dark portion are wide (the cycle of repeating the light and dark is large), it is suitable for detecting a defect having a large area (on the contrary, it becomes difficult to detect a defect having a large area). .. In the light-dark pattern image 20, the second pattern image 22 has a smaller cycle of light and dark repetition than the first pattern image 21, so that fine defects are detected in the second pattern image 22 and the first pattern image 21 is detected. Therefore, a large defect can be detected. Therefore, when it is desired to detect a large defect in a part (first region) of the inspection object K and a fine defect in another part (second region), the first pattern image 21 is set to the first region. By displaying the second pattern image 22 in the second area, the defect can be preferably detected. Further, two objects having different defects to be detected can be collectively set as the inspection target K.

また、第1パターン画像21と第2パターン画像22との各明部及び各暗部を同じ速度で移動させることも可能であるが、そのようにすると、第1パターン画像21の明部21A及び暗部21Bの一周期分の移動に時間がかかってしまう。第1パターン画像21の明部21A及び暗部21Bの移動速度を早くすることで、一周期分の移動期間を短くすることができ、1つの検査対象Kに対する画像検査の所要時間を短くすることができる。 Further, although it is possible to move each light portion and each dark portion of the first pattern image 21 and the second pattern image 22 at the same speed, in such a case, the light portion 21A and the dark portion of the first pattern image 21 are moved. It takes time to move one cycle of 21B. By increasing the moving speed of the bright portion 21A and the dark portion 21B of the first pattern image 21, the moving period for one cycle can be shortened, and the time required for the image inspection for one inspection object K can be shortened. it can.

(明暗パターン画像30)
次に、明暗パターン画像30を、図9を参照して説明する。図9の明暗パターンの複数の明部及び複数の暗部は、それぞれ、X軸が延びる方向を長尺方向とした帯形状(長方形)になっている。明暗パターン画像30の各明部及び各暗部は、Y軸方向に沿って交互に並んでいる。
(Bright and dark pattern image 30)
Next, the light and dark pattern image 30 will be described with reference to FIG. Each of the plurality of bright portions and the plurality of dark portions of the light-dark pattern in FIG. 9 has a strip shape (rectangle) in which the direction in which the X axis extends is the long direction. The bright parts and the dark parts of the light-dark pattern image 30 are arranged alternately along the Y-axis direction.

検査対象K(図9では、検査対象の表面として描かれている)は、その表面として、水平面と、傾斜面(当該傾斜面の法線方向がディスプレイ110の画面の法線方向(光軸方向)に直交する方向に傾斜した面)とを有する。このような検査対象Kを照明する際、ディスプレイ110に、同じ形状(同じ幅)の明部及び暗部からなる明暗パターン画像39を表示する場合、カメラ110で撮影された検査対象Kの画像における明暗パターン(検査対象Kに映ったパターン)の明部及び暗部の幅は、傾斜面と水平面とで異なる(図9(B)参照)。具体的には、傾斜面に映った明部及び暗部の幅が、水平面に映った明部及び暗部の幅よりも広くなる。そうすると、水平面と傾斜面とで、欠陥の検出精度が異なってしまうことがある。 The inspection object K (depicted as the surface of the inspection object in FIG. 9) has a horizontal surface and an inclined surface (the normal direction of the inclined surface is the normal direction of the screen of the display 110 (optical axis direction) as its surface. ) And a surface inclined in a direction orthogonal to the above). When illuminating such an inspection object K, when displaying the light-dark pattern image 39 having the same shape (same width) and the dark portion on the display 110, the light and darkness in the image of the inspection object K captured by the camera 110. The width of the bright portion and the dark portion of the pattern (the pattern reflected in the inspection object K) is different between the inclined surface and the horizontal surface (see FIG. 9B). Specifically, the width of the bright portion and the dark portion reflected on the inclined surface is wider than the width of the bright portion and the dark portion reflected on the horizontal plane. Then, the detection accuracy of the defect may be different between the horizontal surface and the inclined surface.

一方、明暗パターン画像30は、第1パターン画像31(傾斜面を照明するパターン)と、第2パターン画像32(水平面を照明するパターン)とを有する。第1パターン画像31の明部及び暗部それぞれの幅は、第2パターン画像32の明部及び暗部それぞれの幅よりも狭い(明暗の繰り返しの周期が小さい)。このような構成により、検査対象Kに図9のような傾斜面があったとしても、カメラで撮影された検査対象Kの表面に映った明暗パターンの明部及び暗部それぞれの幅を同じ長さとすることができる(明部と暗部との境界を等間隔にできる)(図9(A)参照)。これにより、欠陥の検出精度を一定に保つことができる。 On the other hand, the light-dark pattern image 30 has a first pattern image 31 (a pattern that illuminates an inclined surface) and a second pattern image 32 (a pattern that illuminates a horizontal plane). The width of each of the bright part and the dark part of the first pattern image 31 is narrower than the width of each of the bright part and the dark part of the second pattern image 32 (the cycle of repeating light and dark is small). With such a configuration, even if the inspection object K has an inclined surface as shown in FIG. 9, the widths of the bright and dark portions of the light-dark pattern captured by the camera on the surface of the inspection object K have the same length. (It is possible to make the boundary between the light portion and the dark portion at equal intervals) (see FIG. 9A). This makes it possible to keep the defect detection accuracy constant.

(明暗パターン画像40)
次に、明暗パターン画像40を、図10を参照して説明する。図10の明暗パターンの複数の明部及び複数の暗部等についての説明は、図9の説明に準じる。
(Bright and dark pattern image 40)
Next, the light and dark pattern image 40 will be described with reference to FIG. The description of the plurality of bright parts and the plurality of dark parts of the light-dark pattern of FIG. 10 is based on the description of FIG. 9.

検査対象Kは、その表面として、水平面と、傾斜面(当該傾斜面の法線方向がディスプレイ110の画面の法線方向(光軸方向)に直交する方向から離れる方向に傾斜した面)とを有する。このような検査対象Kを照明する際、ディスプレイ110に、同じ形状(同じ幅)の明部及び暗部からなる明暗パターン画像49を表示する場合、カメラ110で撮影された検査対象Kの画像における明暗パターン(検査対象Kに映ったパターン)の明部及び暗部の幅は、傾斜面と水平面とで異なる(図10(B)参照)。具体的には、傾斜面に映った明部及び暗部の幅が、水平面に映った明部及び暗部の幅よりも狭くなる。そうすると、水平面と傾斜面とで、欠陥の検出精度が異なってしまうことがある。また、上記各明暗パターンについて、暗部の幅と明部の幅とを異ならせてもよく、このような場合、図10(B)の場合には、明暗がつぶれて、明部のみ、又は、暗部のみが傾斜面に映り、欠陥の検出精度が悪くなってしまうこともある。 The inspection object K has, as its surface, a horizontal plane and an inclined surface (a surface inclined in a direction in which the normal direction of the inclined surface is away from the direction orthogonal to the normal direction (optical axis direction) of the screen of the display 110). Have. When illuminating such an inspection target K, when displaying the light-dark pattern image 49 having the same shape (same width) and the dark portion on the display 110, the light and dark in the image of the inspection target K captured by the camera 110. The width of the bright portion and the dark portion of the pattern (the pattern reflected on the inspection object K) is different between the inclined surface and the horizontal surface (see FIG. 10B). Specifically, the width of the bright part and the dark part reflected on the inclined surface is narrower than the width of the bright part and the dark part reflected on the horizontal plane. Then, the detection accuracy of the defect may be different between the horizontal surface and the inclined surface. In addition, the width of the dark portion may be different from the width of the bright portion in each of the light and dark patterns. In such a case, in the case of FIG. Only the dark portion may be reflected on the inclined surface, and the defect detection accuracy may be degraded.

一方、明暗パターン画像40は、第1パターン画像41(傾斜面を照明するパターン)と、第2パターン画像42(水平面を照明するパターン)とを有する。第1パターン画像41の明部及び暗部それぞれの幅は、第2パターン画像42の明部及び暗部それぞれの幅よりも広い(明暗の繰り返しの周期が大きい)。このような構成により、検査対象Kに図11のような傾斜面があったとしても、カメラで撮影された検査対象Kの表面に映った明暗パターンの明部及び暗部それぞれの幅を同じ長さとすることができる(明部と暗部との境界を等間隔にできる)。欠陥の検出精度を一定に保つことができるなど、上記不都合を解消できる。 On the other hand, the light-dark pattern image 40 has a first pattern image 41 (a pattern that illuminates an inclined surface) and a second pattern image 42 (a pattern that illuminates a horizontal plane). The width of each of the bright part and the dark part of the first pattern image 41 is wider than the width of each of the bright part and the dark part of the second pattern image 42 (the cycle of repeating the light and dark is large). With such a configuration, even if the inspection object K has an inclined surface as shown in FIG. 11, the widths of the bright and dark portions of the light-dark pattern captured by the camera on the surface of the inspection object K have the same length. Can be done (borders between light and dark areas can be evenly spaced). The above inconveniences can be solved, such as the defect detection accuracy can be kept constant.

(明暗パターン画像30及び明暗パターン画像40のまとめ)
カメラ120により得られる撮影画像内の検査対象Kに映った明暗パターンを所望のパターンにしたいときには、例えば、ディスプレイ110に、当該所望のパターンとなる明暗パターンの画像を表示して検査対象Kを照明し、当該照明された検査対象Kをカメラ120により撮影する。そして、カメラ120による撮影により得られた検査対象Kの画像に写った明暗パターンをディスプレイ110に表示される明暗パターン画像が示す明暗パターンとするとよい(適宜パターンの形状の調整は行うものとする。)。このようなことは、例えば、ディスプレイ110の光軸とカメラ120の光軸とが、水平面に対して同じ角度だけ傾斜している場合に有効である。
(Summary of the light-dark pattern image 30 and the light-dark pattern image 40)
When it is desired to set the light-dark pattern reflected on the inspection object K in the captured image obtained by the camera 120 to a desired pattern, for example, the display 110 displays an image of the light-dark pattern that is the desired pattern and illuminates the inspection object K. Then, the illuminated inspection object K is photographed by the camera 120. Then, the light-dark pattern shown in the image of the inspection object K obtained by the image pickup by the camera 120 may be the light-dark pattern shown by the light-dark pattern image displayed on the display 110 (the shape of the pattern is appropriately adjusted). ). This is effective, for example, when the optical axis of the display 110 and the optical axis of the camera 120 are inclined by the same angle with respect to the horizontal plane.

検査対象Kが、第1面と第2面とを有し、第2面(図9では傾斜面、図10では水平面)が、第1面(図9では水平面、図10では傾斜面)よりも、その法線方向(第1面が凸面のときには頂上の部分の法線方向又は凹面のときには底の法線方向)がディスプレイ110の画面の法線方向(光軸方向)に対して垂直に近いとき(両方向が成す角度が90度に近いとき)、第2面を照明する明暗パターン(第2面に照射される照明光の明暗パターン)の明暗の繰り返しの周期を、第1面を照明する明暗パターン(第1面に照射される照明光の明暗パターン)の明暗の繰り返しの周期よりも小さくするとよい(図9及び図10を参照)。これにより、撮影画像における検査対象Kに映った明暗パターンの明暗の繰り返しの周期を第1面と第2面とで大きく異なってしまうことを防止できる。 The inspection object K has a first surface and a second surface, and the second surface (the inclined surface in FIG. 9, the horizontal surface in FIG. 10) is closer to the first surface (the horizontal surface in FIG. 9, the inclined surface in FIG. 10). In addition, its normal direction (the normal direction of the top portion when the first surface is convex or the normal direction of the bottom when the first surface is concave) is perpendicular to the normal direction (optical axis direction) of the screen of the display 110. When it is close (when the angle formed by both directions is close to 90 degrees), the first surface is illuminated with a cycle of light and dark of the light-dark pattern that illuminates the second surface (the light-dark pattern of the illumination light that is irradiated on the second surface). It is preferable to make it smaller than the repetition cycle of light and dark of the bright and dark pattern (the bright and dark pattern of the illumination light with which the first surface is irradiated) (see FIGS. 9 and 10). Accordingly, it is possible to prevent the cycle of light and dark repetition of the light and dark pattern reflected on the inspection object K in the captured image from being significantly different between the first surface and the second surface.

(変形例)
本発明は、上記実施の形態に限定されるものではなく、上記実施の形態に対して種々の変形(構成要素の削除を含む。)が可能である。以下、変形例について説明するが、各変形例の少なくとも一部同士を組み合わせてもよい。
(Modification)
The present invention is not limited to the above embodiment, and various modifications (including deletion of constituent elements) can be made to the above embodiment. Hereinafter, modified examples will be described, but at least some of the modified examples may be combined.

(変形例1)
上記各検査画像を、差分画像S、撮像画像Xに変更して、画像検査処理を行ってもよい。つまり、ステップS104を省略し、ステップS105以降の処理で、第1検査画像の代わりに差分画像Sを用いてもよく、ステップS113を省略し、ステップS114以降の処理で、第3検査画像の代わりに撮像画像Xを用いてもよい。但し、この場合には、例えば少ない数の画素単位で発生するノイズ等の軽減が図れなくなってしまうおそれがある(検査画像を生成することで、ノイズ等を軽減できる)。また、上記各検査画像を生成するとき、CPU132は、輝度値を均一化した範囲に含まれる複数の画素を1画素(輝度値は、均一化したあとの値を取る)に変換して、各検査画像を生成してもよい。このときには、基準画像についても、検査画像の生成時に均一化した範囲と同じ範囲に含まれる複数の画素を1画素に変換するとよい。これにより、画素を少なくでき、処理の軽減が図れる。
(Modification 1)
The image inspection processing may be performed by changing each of the inspection images to the difference image S and the captured image X. That is, step S104 may be omitted, and the difference image S may be used instead of the first inspection image in the processing of step S105 and subsequent steps, and step S113 may be omitted and the third inspection image may be replaced in the processing of step S114 and subsequent steps. Alternatively, the captured image X may be used. However, in this case, for example, noise or the like generated in units of a small number of pixels may not be reduced (the noise and the like can be reduced by generating an inspection image). Further, when generating each of the inspection images, the CPU 132 converts a plurality of pixels included in the range in which the brightness values are uniformized into one pixel (the brightness value takes a value after the uniformization), and An inspection image may be generated. At this time, with respect to the reference image, it is preferable to convert a plurality of pixels included in the same range as the uniformized range when the inspection image is generated into one pixel. As a result, the number of pixels can be reduced and the processing can be reduced.

(変形例2)
基準画像及び検査画像の生成時(ステップS103、S104、S112、S113)における、輝度値を均一化する画素の範囲(画素数)、均一化に使用する値などは、ユーザが設定するようにしてもよい。例えば、ユーザが入出力装置134のキーボード及びマウスを操作して、輝度値を均一化する画素の範囲(画素数)、均一化する方法を指定すると、CPU132は、それ以降、指定された内容で画像検査処理を実行する。なお、均一化に使用する値とは、例えば、輝度値を均一化するときに置き換える値であり、均一化する対象の各画素の輝度値の中央値、各輝度値の平均値、各輝度値のうちの最大値、及び、各輝度値のうちの最小値などのうちのいずれかである。なお、均一化のときには、ノイズ等を考慮し、例えば、各輝度値のうちの、最大値等の第1基準以上の大きな値、及び/又は、最小値等の第2基準以下の小さな値を除外してから、前記の中央値、平均値、最大値、最小値を取ってもよい。
(Modification 2)
When the reference image and the inspection image are generated (steps S103, S104, S112, and S113), the range of pixels for uniforming the brightness value (the number of pixels), the value used for the uniforming, and the like are set by the user Good. For example, when the user operates the keyboard and the mouse of the input/output device 134 to specify the range of pixels (the number of pixels) for uniformizing the brightness value and the method for uniformizing the brightness value, the CPU 132 thereafter specifies the specified content. Perform image inspection processing. Note that the value used for equalization is, for example, a value to be replaced when equalizing the luminance values, and is the median value of the luminance values of each pixel to be equalized, the average value of each luminance value, and each luminance value. Of the luminance values and the minimum value of the luminance values. Note that, when equalizing, noise or the like is taken into consideration, and for example, among the brightness values, a large value equal to or larger than the first criterion such as the maximum value and/or a small value equal to or smaller than the second criterion such as the minimum value are set. After excluding, the median value, the average value, the maximum value, and the minimum value may be taken.

(変形例3)
上記実施の形態における欠陥検出では、CPU132は、輝度値が下がっている部分を欠陥として検出しているが、輝度値が上がっている部分を欠陥として検出してもよい。CPU132は、同じ検査画像及び基準画像を用いて、2値化の基準等を代えることで複数の2値化画像を生成し、輝度値が下がっている部分と、輝度値が上がっている部分とのそれぞれを欠陥として検出するようにしてもよい。
(Modification 3)
In the defect detection in the above-described embodiment, the CPU 132 detects a portion whose brightness value is decreasing as a defect, but may detect a portion whose brightness value is increasing as a defect. The CPU 132 uses the same inspection image and reference image to generate a plurality of binarized images by changing the binarization reference and the like, and a portion where the luminance value is lowered and a portion where the luminance value is raised are generated. Each of the above may be detected as a defect.

(変形例4)
2値化画像は、欠陥を「白」、正常部分を「黒」としてもよい。また、2値化画像を生成せずに欠陥の有無を判定してもよい。例えば、CPU132は、ステップS107において、第2基準画像及び第2検査画像それぞれの同じ座標の画素の輝度値の比を取り、当該比が前記所定値未満の画素を特定し、特定した画素の集まりが所定数以上の画素数であれば、欠陥があると判定してもよい。なお、第2基準画像及び第2検査画像それぞれの同じ座標の画素の輝度値の比が前記所定値以上又は未満であるとは、当該比に係数を乗算したり加減算したりして得られる計算値が、特定値以上又は未満であることを含む。例えば、前記計算値を算出する式に、前記比の代わりに前記所定値を入れて計算した値が前記特定値であれば、結局は、前記比が前記所定値以上又は未満であるといえる。
(Modification 4)
In the binarized image, the defect may be “white” and the normal part may be “black”. Further, the presence/absence of a defect may be determined without generating a binarized image. For example, in step S107, the CPU 132 takes the ratio of the luminance values of the pixels of the same coordinates in the second reference image and the second inspection image, specifies the pixels whose ratio is less than the predetermined value, and sets the specified pixel group. If is a predetermined number or more of pixels, it may be determined that there is a defect. It should be noted that the ratio of the luminance values of the pixels at the same coordinates in each of the second reference image and the second inspection image being equal to or greater than or less than the predetermined value is a calculation obtained by multiplying or adding a coefficient to the ratio. Including that the value is above or below a specific value. For example, if the value calculated by inserting the predetermined value instead of the ratio in the equation for calculating the calculated value is the specific value, it can be said that the ratio is equal to or higher than or lower than the predetermined value.

(変形例5)
基準画像及び検査画像から処理対象外の領域を排除しなくてもよい。つまり、ステップS105〜S106、S114〜S115を省略してもよい。
(Modification 5)
It is not necessary to exclude the area that is not the processing target from the reference image and the inspection image. That is, steps S105 to S106 and S114 to S115 may be omitted.

(変形例6)
各明暗パターンの明部及び暗部の形状は、例えば、照明光の光軸方向(照射方向)に対して垂直な面内で、明部と暗部とが交互に(周期的に)現れる形状であればよい。例えば、照射方向に対して垂直な面内で、全ての方向に対して周期的に明部と暗部とが交互に現れる明暗パターンを使用してもよい。また、明部は、暗部よりも明るいものであればよい。明部と暗部とのうちの一方の幅(明暗パターンを動かす方向に沿った長さ)と他の幅とを異ならせてもよい。各明暗パターンは、1つの明部及び1つの暗部と、1つの明部及び2つの暗部と、2つの明部及び1つの暗部と、複数の明部と複数の明部とのうちのいずれかから構成されていればよい。なお、1つの明部及び1つの暗部の場合であっても、明暗パターンの移動により、新たな明部又は暗部が表示されることがあるので、1つの明部及び1つの暗部からなる明暗パターンも、1つの明部及び1つの暗部を一周期とする周期的な明暗パターンとする。
(Modification 6)
The shape of the bright portion and the dark portion of each light-dark pattern may be, for example, a shape in which the bright portion and the dark portion alternately (periodically) appear in a plane perpendicular to the optical axis direction (illumination direction) of the illumination light. Good. For example, a light-dark pattern in which bright portions and dark portions alternately appear in all directions in a plane perpendicular to the irradiation direction may be used. The bright part may be brighter than the dark part. One of the width of the bright portion and the dark portion (the length along the direction in which the light/dark pattern is moved) may be different from the other width. Each of the light and dark patterns is one of one bright portion and one dark portion, one bright portion and two dark portions, two bright portions and one dark portion, a plurality of bright portions and a plurality of bright portions. It should be composed of. Even in the case of one bright portion and one dark portion, a new bright portion or dark portion may be displayed due to the movement of the light and dark pattern, so a bright and dark pattern including one bright portion and one dark portion. Also, the light and dark patterns are cyclical, with one bright portion and one dark portion as one cycle.

(変形例7)
上記第1パターン画像21等が示す明暗パターンと第2パターン画像22等が示す明暗パターンとは、異なる方向に移動してもよい。第1パターン画像21の明部21Aなどと第2パターン画像22の明部22Aなどとは、異なる方向にそって長尺であってもよい。
(Modification 7)
The light-dark pattern shown by the first pattern image 21 and the like and the light-dark pattern shown by the second pattern image 22 and the like may move in different directions. The bright portion 21A of the first pattern image 21 and the bright portion 22A of the second pattern image 22 may be elongated along different directions.

(変形例8)
ディスプレイの代わりに、明部を形成するスリットを有するマスクと、当該マスクの裏に配置されたランプとを使用してもよい。
(Modification 8)
Instead of the display, a mask having a slit forming a bright part and a lamp arranged on the back of the mask may be used.

(変形例8)
検査対象Kの形状等に応じて、明暗パターンは、3つ以上の異なるパターンを有してもよい。例えば、明暗パターン画像は、互いに異なる明暗パターンをそれぞれ示す3つ以上のパターン画像からなってもよい。また、明部等の明暗パターンの移動方向(明暗が繰り返されている方向)は、複数の明暗パターンそれぞれで異なってもよい。
(Modification 8)
The bright and dark patterns may have three or more different patterns depending on the shape of the inspection object K and the like. For example, the light and dark pattern image may be composed of three or more pattern images respectively showing different light and dark patterns. In addition, the moving direction of the bright and dark patterns such as the bright portion (the direction in which the bright and dark are repeated) may be different for each of the plurality of bright and dark patterns.

(変形例9)
1つの検査対象Kは、複数の製品等から構成されてもよい。例えば、第1パターン画像の照明対象を検査対象Kのうちの1つの製品とし、第2パターン画像の照明対象を検査対象Kのうちの他の1つの製品としてもよい。
(Modification 9)
One inspection object K may be composed of a plurality of products or the like. For example, the illumination target of the first pattern image may be one product of the inspection target K, and the illumination target of the second pattern image may be another product of the inspection target K.

(変形例10)
欠陥検出の方法は、上記方法に限らず、適宜の方法を採用できる。例えば、明暗パターン画像11を用いた欠陥検出と、無地画像15を用いた欠陥検出を、1つのディスプレイ110により行うが、画像処理の方法(欠陥検出のアルゴリズム)は、他の方法を用いてもよい。ディスプレイ110を照明に用いることで、異なる態様の照明を容易に行うことができ、明暗パターン画像11を用いた欠陥検出(縞パターンによる照明を用いた欠陥検出)と、無地画像15を用いた欠陥検出(一様な明るさの面照明を用いた欠陥検出)とを、容易に行える。
(Modification 10)
The defect detection method is not limited to the above method, and an appropriate method can be adopted. For example, the defect detection using the bright and dark pattern image 11 and the defect detection using the plain image 15 are performed by one display 110, but the image processing method (defect detection algorithm) may be another method. Good. By using the display 110 for illumination, different modes of illumination can be easily performed, and defect detection using the light-dark pattern image 11 (defect detection using illumination with a stripe pattern) and defect using the plain image 15 can be performed. Detection (defect detection using surface illumination with uniform brightness) can be easily performed.

(変形例11)
上記実施の形態では、明暗パターンの方を動かしているが、当該明暗パターンは、検査対象Kに対して相対的に移動すればよく、検査対象Kの方を動かしてもよい。
(Modification 11)
Although the light-dark pattern is moved in the above embodiment, the light-dark pattern may be moved relative to the inspection object K, and the inspection object K may be moved.

(変形例12)
明暗パターン画像11などの明暗パターンの画像と、無地画像15などの一様に明るい画像と、を一緒にディスプレイ110に表示し、それぞれの画像により、検査対象Kのうちの異なる領域を別々に照明してもよい。これによって、検出したい欠陥に応じた適切な照明を行える。
(Modification 12)
An image of a light-dark pattern such as the light-dark pattern image 11 and a uniformly bright image such as the plain image 15 are displayed together on the display 110, and each image separately illuminates different regions of the inspection object K. You may. As a result, appropriate illumination can be performed according to the defect to be detected.

(変形例13)
無地画像15の代わりに、多少の模様等がある画像(明暗パターン画像11等とは異なる非明暗パターンの画像であればよい。)が用いられてもよい。このような画像であっても、所定の種類の欠陥の検出には有利に働くことがある。上記画像検査処理のように、複数種類の画像を異なるタイミングで同じ表示領域に表示して、同じ領域を照明することにより、種類の異なる欠陥の検出を精度良く検出できる。
(Modification 13)
Instead of the plain image 15, an image having a certain pattern or the like (an image having a non-light and dark pattern different from the light and dark pattern image 11 and the like may be used) may be used. Even such an image may be advantageous in detecting a predetermined type of defect. By displaying a plurality of types of images in the same display area at different timings and illuminating the same area as in the image inspection process, it is possible to detect defects of different types with high accuracy.

(本明細書が開示する構成)
以下、上記実施の形態や変形例を一例とする構成を以下に記載する。以下の構成は、少なくとも一部同士を組み合わせてもよい。なお、以下で説明する各構成が行う画像処理には、任意の他の画像処理が含まれてもよい。
(Structure disclosed in this specification)
Hereinafter, a configuration taking the above-described embodiment and modified examples as an example will be described. At least some of the following configurations may be combined. It should be noted that the image processing performed by each configuration described below may include any other image processing.

(1)検査対象の欠陥の有無を、当該検査対象を画像化した検査対象画像(例えば、差分画像S又は撮影画像X)を用いて検査する画像検査を行う画像検査装置(例えば、画像検査装置100。なお、そのうちのコンピュータ130を画像検査装置として捉えてもよい。)であって、
前記検査対象画像を構成する複数の画素の輝度を第1画素群毎にその第1画素群に含まれる各画素の輝度に基づいて均一化した第1比較画像(例えば、各種基準画像)を生成する第1生成手段(例えば、少なくともステップS103又はS112を実行するCPU132)と、
前記検査対象画像を構成する前記複数の画素の輝度を前記第1画素群よりも画素数の小さい第2画素群毎にその第2画素群に含まれる各画素の輝度に基づいて均一化した第2比較画像(例えば、各種検査画像)を生成する第2生成手段(例えば、少なくともステップS104又はS113を実行するCPU132)と、
前記第1比較画像を構成する複数の画素それぞれの輝度と、前記第2比較画像を構成する複数の画素それぞれの輝度と、を同じ位置の画素同士で比較し、両輝度の関係が所定基準を満たしている画素の有無に基づいて欠陥を検出する欠陥検出手段(例えば、ステップS107〜S108又はS116〜S117を実行するCPU132)と、
を備える画像検査装置。
(1) An image inspection apparatus (for example, an image inspection apparatus) that performs an image inspection for inspecting the presence or absence of a defect in the inspection object using an inspection object image (for example, a difference image S or a captured image X) obtained by imaging the inspection object. 100. Incidentally, the computer 130 of them may be regarded as an image inspection apparatus).
Generating a first comparison image (for example, various reference images) in which the brightness of a plurality of pixels forming the inspection target image is equalized for each first pixel group based on the brightness of each pixel included in the first pixel group. First generating means (for example, the CPU 132 that executes at least step S103 or S112),
The brightness of the plurality of pixels forming the inspection target image is equalized for each second pixel group having a smaller number of pixels than the first pixel group based on the brightness of each pixel included in the second pixel group. Second generation means (for example, the CPU 132 that executes at least step S104 or S113) that generates two comparison images (for example, various inspection images);
The brightness of each of the plurality of pixels forming the first comparison image and the brightness of each of the plurality of pixels forming the second comparison image are compared between pixels at the same position, and the relationship between the two brightnesses is based on a predetermined reference. Defect detection means (for example, the CPU 132 that executes steps S107 to S108 or S116 to S117) that detects a defect based on the presence or absence of satisfying pixels,
An image inspection apparatus including.

検査対象画像は、検査対象の撮像画像の他、差分画像Sのように複数の撮像画像に基づいて得られる画像、撮像画像に対して所定の画像処理を施した画像など、検査対象を画像化した画像であればよい。検査対象画像は、上記実施の形態では、差分画像S及び撮像画像Xであるが、これら画像に対して適宜の画像処理を施した後の画像であってもよい。また、第1生成手段による第1比較画像の前記生成は、均一化以外の画像処理が含まれてもよい。このことは、第2生成手段についても同じである。前記均一化以外の画像処理に、ステップS105〜S106又はS114〜S115などの処理により、処理対象外の画像を第1〜第2比較画像から排除する処理が含まれてもよい。 The inspection target image is an image of the inspection target such as an image obtained based on a plurality of captured images like the difference image S, an image obtained by performing a predetermined image processing on the captured image, in addition to the captured image of the inspection target. Any image can be used. Although the inspection target image is the difference image S and the captured image X in the above-described embodiment, it may be an image after performing appropriate image processing on these images. Further, the generation of the first comparison image by the first generation means may include image processing other than homogenization. This also applies to the second generation means. The image processing other than the homogenization may include the processing of excluding the non-processing target images from the first and second comparison images by the processing of steps S105 to S106 or S114 to S115.

(2)前記欠陥検出手段は、前記第1比較画像を構成する前記複数の画素それぞれの輝度と、前記第2比較画像を構成する前記複数の画素それぞれの輝度と、の比を同じ位置の画素同士で取り、当該比が一定基準(例えば、前記所定値未満)を満たしている画素の有無に基づいて欠陥を検出する(例えば、ステップS107〜S108又はS116〜S117を実行するCPU132)、
ようにしてもよい。
(2) The defect detection unit is a pixel at the same position with a ratio of the brightness of each of the plurality of pixels forming the first comparison image and the brightness of each of the plurality of pixels forming the second comparison image. Taken by each other, a defect is detected based on the presence or absence of a pixel whose ratio satisfies a certain criterion (for example, less than the predetermined value) (for example, the CPU 132 that executes steps S107 to S108 or S116 to S117),
You may do it.

(3)前記第1生成手段は、前記複数の画素の輝度を前記第1画素群毎に平均化する(例えば、ステップS103又はS112を実行するCPU132)、
ようにしてもよい。
(3) The first generation unit averages the brightness of the plurality of pixels for each of the first pixel groups (for example, the CPU 132 that executes step S103 or S112),
You may do it.

(4)前記第2生成手段は、前記複数の画素の輝度を前記第2画素群毎に平均化する(例えば、ステップS104又はS113を実行するCPU132)、
ようにしてもよい。
(4) The second generation unit averages the brightness of the plurality of pixels for each of the second pixel groups (for example, the CPU 132 that executes step S104 or S113),
You may do it.

平均化は、第1画素群又は第2画素群に含まれる各画素の各輝度の中央値又は平均値を取ることであればよい。 The averaging may be performed by taking the median value or the average value of the brightness of each pixel included in the first pixel group or the second pixel group.

(5)前記検査対象が写った複数の撮影画像であって、前記検査対象の表面に映った明暗パターンの状態が異なる複数の撮影画像を取得する取得手段(例えば、ステップS101を実行するCPU132)と、
前記取得手段が取得した前記複数の撮影画像における同じ位置の各画素の輝度のうち最小の輝度と最大の輝度との差を各画素の輝度とした前記検査対象画像を生成する検査対象画像生成手段(例えば、ステップS102を実行するCPU132)と、
をさらに備えてもよい。
(5) Acquisition unit (for example, CPU 132 that executes step S101) that acquires a plurality of photographed images of the inspection target, in which the states of the light and dark patterns reflected on the surface of the inspection target are different. When,
Inspection target image generation means for generating the inspection target image in which the difference between the minimum brightness and the maximum brightness of the brightness of each pixel at the same position in the plurality of captured images acquired by the acquisition means is defined as the brightness of each pixel. (For example, the CPU 132 that executes step S102),
May be further provided.

(6)前記欠陥検出手段は、前記第1比較画像の各画素のうち、輝度が一定値未満の画素群を特定し、特定した当該画素群を前記第1比較画像及び前記第2比較画像から除外し、前記画素群が除外された前記第1比較画像を構成する前記複数の画素それぞれの輝度と、前記画素群が除外された前記第2比較画像を構成する前記複数の画素それぞれの輝度と、を同じ位置の画素同士で比較する(例えば、ステップS105〜S106又はS114〜S115を実行するCPU132)、
ようにしてもよい。
(6) The defect detection unit identifies a pixel group having a luminance less than a fixed value among the pixels of the first comparison image, and identifies the identified pixel group from the first comparison image and the second comparison image. The brightness of each of the plurality of pixels that form the first comparison image that are excluded and that exclude the pixel group, and the brightness of each of the plurality of pixels that form the second comparison image that exclude the pixel group , Are compared between pixels at the same position (for example, the CPU 132 that executes steps S105 to S106 or S114 to S115),
You may do it.

(7)移動する明暗パターンの画像(例えば、明暗パターン画像11)をディスプレイに表示させることで前記検査対象を照明する第1照明制御手段(例えば、ステップS101を実行するCPU132)と、
非明暗パターンの画像(例えば、無地画像15)を前記ディスプレイに表示させることで前記検査対象を照明する第2照明制御手段(例えば、ステップS111を実行するCPU132)と、
前記明暗パターンの画像によって照明された前記検査対象をカメラにより複数回撮影し、当該検査対象が写った複数の第1撮影画像(例えば,撮影画像1〜N)を前記カメラから得るとともに、当該複数の第1撮影画像に基づいて第1画像(例えば、差分画像S)を得る第1画像取得手段(例えば、ステップS101を実行するCPU132)と、
前記非明暗パターンの画像によって照明された前記検査対象を前記カメラにより撮影し、当該検査対象が写った第2撮影画像を第2画像(例えば、撮像画像X)として前記カメラから得る第2画像取得手段(例えば、ステップS111を実行するCPU132)と、を備え、
前記画像処理装置は、前記第1画像を前記検査対象画像として用いて検査し、かつ、前記第2画像を前記検査対象画像として用いて検査する(例えば、画像検査処理を実行するCPU132)、
ようにしてもよい。
(7) First illumination control means (for example, the CPU 132 that executes step S101) that illuminates the inspection target by displaying a moving image of the light and dark pattern (for example, the light and dark pattern image 11) on the display,
Second illumination control means (for example, CPU 132 that executes step S111) that illuminates the inspection target by displaying an image of a non-bright/dark pattern (for example, a solid image 15) on the display,
The inspection target illuminated by the image of the light-dark pattern is captured by a camera a plurality of times, and a plurality of first captured images (for example, captured images 1 to N) in which the inspection target is captured are obtained from the camera, and First image acquisition means (for example, CPU 132 that executes step S101) that obtains a first image (for example, difference image S) based on the first captured image of
A second image acquisition in which the inspection target illuminated by the image of the non-bright and dark pattern is captured by the camera, and a second captured image of the inspection target is obtained as a second image (for example, captured image X) from the camera. Means (for example, the CPU 132 that executes step S111),
The image processing apparatus inspects using the first image as the inspection target image and inspects using the second image as the inspection target image (for example, the CPU 132 that executes an image inspection process),
You may do it.

(8)上記画像処理装置の各構成要素が行う処理をコンピュータに実行させるプログラム。なお、プログラムは、CD(Compact Disc)などの各種の記憶媒体に記録されてコンピュータに提供(インストール)されてもよいし、インターネットなどのネットワークを介してコンピュータに提供(インストール)されてもよい(他のプログラムも同じ)。 (8) A program that causes a computer to execute the processing performed by each component of the image processing apparatus. The program may be provided (installed) in a computer by being recorded in various storage media such as a CD (Compact Disc), or may be provided (installed) in the computer via a network such as the Internet ( Other programs are the same).

(9)検査対象の欠陥の有無を、当該検査対象を画像化した検査対象画像(例えば、差分画像S又は撮影画像X)を用いて検査する画像検査装置(例えば、画像検査装置100。なお、そのうちのコンピュータ130を画像検査装置として捉えてもよい。)であって、
前記検査対象画像を構成する複数の画素の輝度を画素群毎にその画素群に含まれる各画素の輝度に基づいて値に均一化した比較画像を生成する生成手段(例えば、各種基準画像)を生成する生成手段(例えば、少なくともステップS103又はS112を実行するCPU132)と、
前記比較画像を構成する複数の画素それぞれの輝度と、前記検査対象画像を構成する複数の画素それぞれの輝度と、を同じ位置の画素同士で比較し、両輝度の関係が所定基準を満たしている画素の有無に基づいて欠陥を検出する欠陥検出手段(例えば、変形例1など)と、
を備える画像検査装置。
(9) An image inspection apparatus (for example, the image inspection apparatus 100. For example, the image inspection apparatus 100, which inspects the inspection object for defects by using an inspection object image (for example, the difference image S or the captured image X) obtained by imaging the inspection object. Of these, the computer 130 may be regarded as an image inspection device.)
A generation unit (for example, various reference images) that generates a comparison image in which the brightness of a plurality of pixels forming the inspection target image is made uniform for each pixel group based on the brightness of each pixel included in the pixel group. Generating means for generating (for example, the CPU 132 that executes at least step S103 or S112),
The brightness of each of the plurality of pixels forming the comparison image and the brightness of each of the plurality of pixels forming the inspection target image are compared between pixels at the same position, and the relationship between the two brightnesses satisfies a predetermined criterion. Defect detection means for detecting a defect based on the presence or absence of a pixel (for example, modified example 1),
An image inspection apparatus including.

検査対象画像、及び、生成手段による比較画像の前記生成などの説明は、上記(1)の検査対象画像、及び、第1生成手段による第1比較画像の前記生成などの説明に準じる。 The description of the inspection target image and the generation of the comparison image by the generation unit is based on the description of the inspection target image and the generation of the first comparison image by the first generation unit.

(10)上記画像処理装置の各構成要素が行う処理をコンピュータに実行させるプログラム。 (10) A program that causes a computer to execute the processing performed by each component of the image processing apparatus.

(11)第1明暗パターンにより画像検査の検査対象の第1領域(例えば、検査対象Kの一部)を照明するとともに、前記第1明暗パターンとは異なる第2明暗パターンにより前記検査対象の前記第1領域とは異なる第2領域(例えば、検査対象Kの他の一部)を照明する照明手段(例えば、明暗パターン画像20、30、又は40を表示するディスプレイ110)と、
前記第1明暗パターンと前記第2明暗パターンとを前記検査対象に対して相対的に移動させる移動制御手段(例えば、ディスプレイ110に表示された表示画像を制御する(明暗パターンを移動させる)CPU132)と、
を備える照明装置。
(11) While illuminating a first region (for example, a part of the inspection target K) of the inspection target of the image inspection with the first light-dark pattern, the second light-dark pattern different from the first light-dark pattern causes the inspection target of the inspection target to be Illumination means (for example, the display 110 that displays the light-dark pattern image 20, 30, or 40) that illuminates a second area (for example, another part of the inspection target K) different from the first area,
Movement control means for moving the first bright-dark pattern and the second bright-dark pattern relative to the inspection target (for example, CPU 132 that controls the display image displayed on the display 110 (moves the bright-dark pattern)). When,
A lighting device including.

上記照明手段は、第1明暗パターンと第2明暗パターンとをともに表示する他、3つ以上の明暗パターンを表示する構成も含む。なお、上記照明装置の機能を、ディスプレイ110を制御するコンピュータ130に実現させるプログラム(第1明暗パターン及び第2明暗パターンをディスプレイ110に表示させたり、移動させたりすることをコンピュータに実行させるプログラム)によって実現してもよい。 The illuminating means includes a configuration for displaying both the first light-dark pattern and the second light-dark pattern, and also for displaying three or more light-dark patterns. A program that causes the computer 130 that controls the display 110 to implement the function of the lighting device (a program that causes the computer to display or move the first light-dark pattern and the second light-dark pattern). May be realized by

(12)前記照明手段は、前記第1明暗パターンの画像と前記第2明暗パターンの画像とを表示するときの表示光(前記各画像を示す表示光)により前記第1領域及び前記第2領域を照明するディスプレイ(例えば、明暗パターン画像20、30、又は40を表示するディスプレイ110)である、
ようにしてもよい。
(12) The illumination unit uses the display light (display light indicating each image) when displaying the image of the first bright-dark pattern and the image of the second bright-dark pattern, and the first region and the second region. Is a display that illuminates (for example, the display 110 that displays the light-dark pattern image 20, 30, or 40),
You may do it.

(13)前記移動制御手段は、前記第1明暗パターンと前記第2明暗パターンとを異なる速度で移動させる(例えば、図8参照)、
ようにしてもよい。
(13) The movement control means moves the first bright-dark pattern and the second bright-dark pattern at different speeds (see, for example, FIG. 8),
You may do it.

(14)前記第1明暗パターンと前記第2明暗パターンとは、明暗が周期的に繰り返されたパターンであり(例えば、図8、図10参照)、
前記第1明暗パターンの明暗の繰り返しの周期は、前記第2明暗パターンの明暗の繰り返しの周期よりも大きい(例えば、図8、図10参照)、
ようにしてもよい。
(14) The first light-dark pattern and the second light-dark pattern are patterns in which light and dark are periodically repeated (see, for example, FIGS. 8 and 10),
The cycle of repeating the light and dark of the first light-dark pattern is larger than the cycle of repeating the light-dark of the second light-dark pattern (see, for example, FIGS. 8 and 10),
You may do it.

(15)前記第2領域の法線方向の方が前記第1領域の法線方向よりも前記照明手段の光軸に対して垂直に近い(例えば、図10参照)、
ようにしてもよい。
(15) The normal line direction of the second region is closer to the optical axis of the illuminating unit than the normal line direction of the first region (for example, see FIG. 10),
You may do it.

(16)上記いずれかの照明装置(例えば、ディスプレイ110及びCPU132)と、
当該照明装置により照明された前記検査対象を複数回撮影することで、複数の撮影画像を得るカメラ(例えば、カメラ120)と、
前記カメラにより得られた前記複数の撮影画像に基づいて、前記第1領域と前記第2領域とについて欠陥の有無を検査する検査手段(例えば、ステップS102〜S108を行うCPU132など)と、を備える、
画像検査装置(例えば、画像検査装置100)。
(16) One of the above lighting devices (for example, the display 110 and the CPU 132),
A camera (for example, a camera 120) that obtains a plurality of captured images by capturing a plurality of images of the inspection target illuminated by the illumination device,
An inspection unit that inspects the first region and the second region for defects based on the plurality of captured images obtained by the camera (for example, the CPU 132 that performs steps S102 to S108). ,
Image inspection device (for example, image inspection device 100).

11 明暗パターン画像
11A 明部
11B 暗部
15 無地画像
20、30、40 明暗パターン画像
21、31、41 第1パターン画像
22、32、42 第2パターン画像
100 画像検査装置
110 ディスプレイ
120 カメラ
130 コンピュータ
132 CPU
11 bright and dark pattern image 11A bright part 11B dark part 15 plain image 20, 30, 40 bright and dark pattern image 21, 31, 41 first pattern image 22, 32, 42 second pattern image 100 image inspection device 110 display 120 camera 130 computer 132 CPU

Claims (5)

第1明暗パターンにより画像検査の検査対象の第1領域を照明するとともに、前記第1明暗パターンとは異なる第2明暗パターンにより前記検査対象の前記第1領域とは異なる第2領域を照明する照明手段と、
前記第1明暗パターンと前記第2明暗パターンとを前記検査対象に対して相対的に移動させる移動制御手段と、
を備え
前記移動制御手段は、前記第1明暗パターンと前記第2明暗パターンとを異なる速度で移動させる、
照明装置。
Illumination for illuminating a first region of the inspection target of the image inspection with the first light-dark pattern and illuminating a second region different from the first region of the inspection target with a second light-dark pattern different from the first light-dark pattern. Means and
Movement control means for moving the first light-dark pattern and the second light-dark pattern relative to the inspection object;
Equipped with
The movement control means moves the first light-dark pattern and the second light-dark pattern at different speeds,
Lighting equipment.
前記照明手段は、前記第1明暗パターンの画像と前記第2明暗パターンの画像とを表示するときの表示光により前記第1領域及び前記第2領域を照明するディスプレイである、
請求項1に記載の照明装置。
The illumination unit is a display that illuminates the first region and the second region with display light when displaying the image of the first light-dark pattern and the image of the second light-dark pattern.
The lighting device according to claim 1.
前記第1明暗パターンと前記第2明暗パターンとは、明暗が周期的に繰り返されたパターンであり、
前記第1明暗パターンの明暗の繰り返しの周期は、前記第2明暗パターンの明暗の繰り返しの周期よりも大きい、
請求項1又は2に記載の照明装置。
The first light-dark pattern and the second light-dark pattern are patterns in which light and dark are periodically repeated,
A cycle of repeating light and dark of the first light and dark pattern is larger than a cycle of repeating light and dark of the second light and dark pattern,
The lighting device according to claim 1 or 2.
前記第2領域の法線方向の方が前記第1領域の法線方向よりも前記照明手段の光軸に対して垂直に近い、
請求項に記載の照明装置。
The normal direction of the second area is closer to the optical axis of the illumination means than the normal direction of the first area.
The lighting device according to claim 3 .
請求項1〜いずれか1項に記載の照明装置と、
前記照明装置により照明された前記検査対象を複数回撮影することで、複数の撮影画像を得るカメラと、
前記カメラにより得られた前記複数の撮影画像に基づいて、前記第1領域と前記第2領域とについて欠陥の有無を検査する検査手段と、
を備える画像検査装置。
A lighting device according to claim 1-4 any one,
A camera that obtains a plurality of captured images by capturing a plurality of images of the inspection target illuminated by the illumination device,
An inspection unit that inspects the first area and the second area for defects based on the plurality of captured images obtained by the camera;
An image inspection apparatus including.
JP2016122154A 2016-06-20 2016-06-20 Lighting device and image inspection device Active JP6745150B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016122154A JP6745150B2 (en) 2016-06-20 2016-06-20 Lighting device and image inspection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016122154A JP6745150B2 (en) 2016-06-20 2016-06-20 Lighting device and image inspection device

Publications (2)

Publication Number Publication Date
JP2017227474A JP2017227474A (en) 2017-12-28
JP6745150B2 true JP6745150B2 (en) 2020-08-26

Family

ID=60889223

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016122154A Active JP6745150B2 (en) 2016-06-20 2016-06-20 Lighting device and image inspection device

Country Status (1)

Country Link
JP (1) JP6745150B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020122662A (en) * 2019-01-29 2020-08-13 興和株式会社 Illumination device for surface inspection and surface inspection device
KR102292547B1 (en) 2020-04-10 2021-08-20 코그넥스코오포레이션 Optic system using dynamic diffuser
KR102268909B1 (en) * 2020-04-10 2021-06-23 코그넥스코오포레이션 Inspection method based on edge field and deep learning
JP7456272B2 (en) 2020-05-11 2024-03-27 コニカミノルタ株式会社 Image inspection device and image forming system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3185599B2 (en) * 1995-04-17 2001-07-11 日産自動車株式会社 Surface defect inspection equipment
JP2976869B2 (en) * 1995-12-28 1999-11-10 日産自動車株式会社 Surface defect inspection equipment
JP5760371B2 (en) * 2010-10-13 2015-08-12 富士通株式会社 Paint surface defect inspection method
JP6433268B2 (en) * 2014-03-31 2018-12-05 国立大学法人 東京大学 Inspection system and inspection method

Also Published As

Publication number Publication date
JP2017227474A (en) 2017-12-28

Similar Documents

Publication Publication Date Title
JP6745173B2 (en) Image inspection apparatus, image inspection method, image inspection program, computer-readable recording medium, and recorded device
JP6745150B2 (en) Lighting device and image inspection device
US20170243358A1 (en) Detection system
JP2012045610A (en) Apparatus and method for determining shape of end of bead
JP2005283577A (en) Inspection system and method for providing feedback
JP2009145285A (en) Defect detecting method and defect detecting apparatus
JP6635712B2 (en) Inspection method, inspection device, image processing device, program, and recording medium
JP2015068668A (en) Appearance inspection device
JP2021022369A (en) System and method for automated surface evaluation
WO2019244946A1 (en) Defect identifying method, defect identifying device, defect identifying program, and recording medium
JP4322230B2 (en) Surface defect inspection apparatus and surface defect inspection method
JP7135297B2 (en) Inspection device, inspection system, and inspection method
TWI607212B (en) Image generation device, defect inspection device, and defect inspection method
US20170309013A1 (en) Inspection device, storage medium, and program
JP2023521529A (en) Systems and methods for imaging reflective objects
JP6837296B2 (en) Image inspection equipment and programs
JP3871963B2 (en) Surface inspection apparatus and surface inspection method
JP2009222683A (en) Method and apparatus for surface inspection
JP2002175520A (en) Device and method for detecting defect of substrate surface, and recording medium with recorded program for defect detection
JP2004069673A (en) Visual inspection apparatus and method thereof
KR102117697B1 (en) Apparatus and method for surface inspection
JP2021173566A (en) Defect detection method and defect detection device
JP2004286708A (en) Defect detection apparatus, method, and program
JP2004037134A (en) Method and apparatus for inspecting metal mask
JP2006145228A (en) Unevenness defect detecting method and unevenness defect detector

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190308

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200107

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191226

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200309

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200803

R150 Certificate of patent or registration of utility model

Ref document number: 6745150

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150