[go: up one dir, main page]

JP2010071875A - Defect inspecting method and defect inspecting device - Google Patents

Defect inspecting method and defect inspecting device Download PDF

Info

Publication number
JP2010071875A
JP2010071875A JP2008241290A JP2008241290A JP2010071875A JP 2010071875 A JP2010071875 A JP 2010071875A JP 2008241290 A JP2008241290 A JP 2008241290A JP 2008241290 A JP2008241290 A JP 2008241290A JP 2010071875 A JP2010071875 A JP 2010071875A
Authority
JP
Japan
Prior art keywords
defect
density
block
image
target block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008241290A
Other languages
Japanese (ja)
Inventor
Shuichi Saito
秀一 斎藤
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.)
Kyodo Printing Co Ltd
Original Assignee
Kyodo Printing 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 Kyodo Printing Co Ltd filed Critical Kyodo Printing Co Ltd
Priority to JP2008241290A priority Critical patent/JP2010071875A/en
Publication of JP2010071875A publication Critical patent/JP2010071875A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technology that does not cause incorrect recognition even when an image is mechanically divided into a plurality of regions and inspected, when an end region of an inspecting object is included in the image. <P>SOLUTION: The image of the inspecting object is divided into a plurality of blocks, and an optional attention block B(m, n) is set in them. The concentration of the attention block B(m, n) is compared with that of an adjacent peripheral block of each of directions A1-A4. At this time, the total value of variation values is handled as a defective degree only when the concentration variation amount from one peripheral block B(m-1, n) to the attention block B(m, n) becomes a negative value in the view of the lateral directions, for example, and the concentration variation amount from the attention block B(m, n) to the other peripheral block B(m+1, n) becomes a positive value. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、被検査物を撮像して得た画像を用いて表面の欠陥を検査することができる欠陥検査方法及び欠陥検査装置に関するものである。   The present invention relates to a defect inspection method and a defect inspection apparatus capable of inspecting a surface defect using an image obtained by imaging an inspection object.

従来、この種の欠陥検査方法又は欠陥検査装置に関して、被検査物を撮像して得た画像データを任意の領域に分割し、領域内に含まれる画素の濃度値を積算して積算値を求め、この積算値を閾値と比較して欠陥を検出する先行技術が知られている(特許文献1参照)。またその他の先行技術として、任意に分割された領域内で画素濃度を積算し、その積算値から領域間隔ごとに差分演算を行って微分値を求め、その値を所定値と比較して欠陥を検出する検査装置が知られている(特許文献2参照)。   Conventionally, regarding this type of defect inspection method or defect inspection apparatus, image data obtained by imaging an inspection object is divided into arbitrary regions, and the integrated value is obtained by integrating the density values of pixels included in the region. A prior art for detecting a defect by comparing this integrated value with a threshold value is known (see Patent Document 1). As another prior art, the pixel density is integrated in an arbitrarily divided region, a differential operation is performed for each region interval from the integrated value, a differential value is obtained, and the value is compared with a predetermined value to detect a defect. An inspection device for detection is known (see Patent Document 2).

上述した先行技術によれば、撮像して得た画像データ中の全ての画素について1つずつ検査を行うのではなく、領域内に含まれる画素の濃度を積分により平均化した値を求めて検査を行うことができるため、それだけ演算処理の高速化を図ることができると考えられる。
特開2005−265467号公報 特開2000−36048号公報
According to the above-described prior art, instead of checking one pixel at a time for every pixel in the image data obtained by imaging, the value obtained by averaging the density of the pixels included in the region is obtained by integration. Therefore, it is considered that the calculation process can be speeded up accordingly.
JP 2005-265467 A JP 2000-36048 A

しかしながら、例えば撮像した画像内に被検査物の端部領域が含まれている場合、上述した先行技術のように画像全体を任意の領域に分割してしまうと、端部の外側にある背景画像の濃度が領域全体の平均濃度に多大な影響を及ぼすことがある。この場合、たとえ被検査物の端部領域に欠陥が存在しなかったとしても、領域全体が欠陥として誤認識(いわゆる過検出)されてしまうという問題がある。   However, for example, when the edge region of the object to be inspected is included in the captured image, if the entire image is divided into arbitrary regions as in the above-described prior art, the background image outside the edge portion May have a significant effect on the average density of the entire region. In this case, even if there is no defect in the end region of the inspection object, there is a problem that the entire region is erroneously recognized as a defect (so-called overdetection).

そこで本発明は、画像内に被検査物の端部領域が含まれている場合において、たとえ機械的に画像を複数の領域に分割して検査を行ったとしても、誤認識を招くことがない技術の提供を課題としたものである。   Therefore, the present invention does not cause misrecognition even when the image includes the edge region of the object to be inspected, even if the image is mechanically divided into a plurality of regions for inspection. The issue is the provision of technology.

第1に本発明は、以下の(1)〜(4)の工程から構成される欠陥検査方法である。
(1)取得工程
この工程では、被検査物を撮像した画像を取得する。なお取得する画像は、予め保存されている画像データを用いて再現したものであってもよい。
1stly this invention is a defect inspection method comprised from the process of the following (1)-(4).
(1) Acquisition process In this process, the image which imaged the to-be-inspected object is acquired. Note that the acquired image may be reproduced using image data stored in advance.

(2)分割工程
この工程では、取得した画像を所定の配列で複数のブロックに分割する。これにより、分割後の個々のブロック内には画像を構成する複数の画素が含まれた状態となる。
(2) Division Step In this step, the acquired image is divided into a plurality of blocks in a predetermined arrangement. As a result, each divided block includes a plurality of pixels constituting the image.

(3)比較工程
この工程は、分割した複数のブロックの中で検査対象とするべき注目ブロックを設定し、この注目ブロック内でみた画像の濃度と注目ブロックに隣接する周辺ブロック内でみた画像の濃度とを、配列内で一方向に隣接する2つの周辺ブロックについてそれぞれ比較するものである。
(3) Comparison process In this process, a target block to be inspected is set among a plurality of divided blocks, and the density of the image viewed in the target block and the image of the image viewed in the neighboring blocks adjacent to the target block are set. The density is compared for each of two neighboring blocks adjacent in one direction in the array.

(4)算出工程
この工程では、上記(3)の比較工程で濃度を比較した結果、注目ブロック内での濃度が2つの周辺ブロック内での濃度に対してともに低かった場合にのみ、注目ブロック内での濃度と各周辺ブロック内での濃度との間で求めた2つの変化量を合算することで注目ブロックの欠陥度を求める。
(4) Calculation step In this step, as a result of comparing the densities in the comparison step (3) above, only when the density in the target block is lower than the density in the two neighboring blocks, the target block The defect degree of the block of interest is obtained by adding the two variations obtained between the density in the block and the density in each peripheral block.

(5)判断工程
この工程では、求めた欠陥度に基づき注目ブロック内での欠陥の有無を判断する。例えば、予め定めた閾値と欠陥度とを比較し、欠陥度が閾値を上回っていれば欠陥有りと判断し、逆に欠陥度が閾値に達していなければ欠陥無しと判断することができる。
(5) Determination process In this process, the presence or absence of a defect in the block of interest is determined based on the obtained defect degree. For example, a predetermined threshold value is compared with the defect degree, and if the defect degree exceeds the threshold value, it is determined that there is a defect, and conversely, if the defect degree does not reach the threshold value, it can be determined that there is no defect.

上記のように本発明の欠陥検査方法は、もとの画像を複数のブロックに分割した中から任意の注目ブロックを設定し、これと隣接する2つの周辺ブロックとの間でそれぞれ濃度を比較したとき、注目ブロックの濃度が2つの周辺ブロックの濃度よりもともに低かった場合にのみ、検査を行うものとしている。このため、注目ブロックの濃度がいずれか一方の周辺ブロックの濃度よりも高かったり、あるいは両方の周辺ブロックよりも高かったりした場合は、その注目ブロックについて欠陥の有無を判断しない。   As described above, according to the defect inspection method of the present invention, an arbitrary target block is set from among the original image divided into a plurality of blocks, and the density is compared between each of the neighboring blocks and the adjacent two neighboring blocks. In some cases, the inspection is performed only when the density of the target block is lower than the density of the two neighboring blocks. For this reason, when the density of the target block is higher than the density of one of the peripheral blocks or higher than both of the peripheral blocks, the presence / absence of a defect in the target block is not determined.

このため本発明の欠陥検査方法によれば、被検査物の範囲外で撮像された画素を多く含むブロックが注目ブロックとして設定された場合、これに隣接する2つの周辺ブロックのうち一方は、その方向によって必ず注目ブロックと同じく被検査物の範囲外で撮像された画素を多く含むことになる。したがって、この場合は注目ブロックの濃度が両方の周辺ブロックの濃度に対してともに低くなることはないので、たとえ注目ブロックの濃度が極端に低かったとしても、そこに欠陥があるものとして誤認識してしまうことはない。   Therefore, according to the defect inspection method of the present invention, when a block including many pixels imaged outside the range of the inspection object is set as a target block, one of the two neighboring blocks adjacent to the block is Depending on the direction, the image always includes many pixels imaged outside the range of the object to be inspected, like the target block. Therefore, in this case, the density of the block of interest will not be lower than the density of both peripheral blocks, so even if the density of the block of interest is extremely low, it will be mistakenly recognized as being defective. There is no end to it.

第2に本発明の欠陥検査方法は、上記(2)の分割工程で分割した複数のブロックを順に注目ブロックとして設定することで、個々のブロックについて(3)の比較工程、(4)の算出工程及び(5)の判断工程を実行するものである。   Secondly, the defect inspection method of the present invention sets the plurality of blocks divided in the division step (2) as the target block in order, thereby comparing each block with the comparison step (3) and the calculation (4). The process and the determination process of (5) are executed.

この場合、例えば全てのブロックについて一通り各工程が実行されるため、画像全体にわたって検査を行うことができる。   In this case, for example, since each process is executed for all the blocks, the inspection can be performed over the entire image.

第3に本発明の欠陥検査方法において、上記(3)の比較工程では、2つの周辺ブロックのうち、一方の周辺ブロック内での濃度に対する注目ブロック内での濃度の差を第1の変化量とし、注目ブロック内での濃度に対する他方の周辺ブロック内での濃度の差を第2の変化量としてそれぞれ求めることができる。   Thirdly, in the defect inspection method of the present invention, in the comparison step (3), the difference in density in the target block with respect to the density in one peripheral block of the two peripheral blocks is determined as the first change amount. The difference in density in the other peripheral block with respect to the density in the target block can be obtained as the second change amount.

この場合、上記(4)の算出工程では、第1の変化量が負の値をとり、かつ、第2の変化量が正の値をとる場合にのみ、第1の変化量と第2の変化量との差分を欠陥度とすることができる。   In this case, in the calculation step (4) above, the first change amount and the second change amount are obtained only when the first change amount takes a negative value and the second change amount takes a positive value. The difference from the change amount can be used as the defect degree.

上記の手法を採用すれば、機械的に求めた第1及び第2の変化量から欠陥度を算出したり、あるいは欠陥度を算出するかどうかを決定したりすることができるので、シンプルかつ容易に演算処理を進行させることができる。   By adopting the above method, it is possible to calculate the degree of defect from the first and second amount of change obtained mechanically, or to determine whether or not to calculate the degree of defect, so it is simple and easy The arithmetic processing can be advanced.

第4に本発明の欠陥検査方法において、上記(3)の比較工程では、1つの注目ブロックについて、これと隣接する2つの周辺ブロックの組を配列内で複数方向に規定することにより各方向別で複数通りに濃度の比較を行ってもよい。   Fourthly, in the defect inspection method of the present invention, in the comparison step (3) above, for one target block, a set of two neighboring blocks adjacent to the target block is defined in a plurality of directions within the array. The concentration may be compared in multiple ways.

この場合、上記(4)の算出工程では、比較が行われた方向ごとに注目ブロック内での濃度と各周辺ブロック内での濃度との間で求めた2つの変化量を合算し、その中で最大値となる変化量を注目ブロックの欠陥度とすることができる。   In this case, in the calculation step (4) above, the two change amounts obtained between the density in the block of interest and the density in each peripheral block are added together for each direction in which the comparison is performed, The maximum amount of change can be set as the defect degree of the block of interest.

このような手法を採用すれば、最も濃度変化が顕著となる方向について得られた結果を注目ブロックの欠陥度(代表値)として使用することができるので、注目ブロックの周辺ブロックにおけるコントラストの低下や、欠陥以外のノイズの影響を排除した上でより正確な検査を行うことができる。   If such a method is adopted, the result obtained in the direction in which the density change is most noticeable can be used as the defect degree (representative value) of the block of interest. More accurate inspection can be performed after eliminating the influence of noise other than defects.

第5に本発明の欠陥検査方法において、上記(2)の分割工程では、検出する欠陥の種類に応じて画像を分割するブロックの形状を変化させることが好ましい。   Fifth, in the defect inspection method of the present invention, in the division step (2), it is preferable to change the shape of the block into which the image is divided according to the type of defect to be detected.

この場合、画像内で各方向に特徴を有する複数種類の欠陥についても、それぞれの特徴に合わせた形態のブロックに分割することで、なるべく的を絞った上で適切な検査を行うことができる。   In this case, even with respect to a plurality of types of defects having features in each direction in the image, it is possible to perform an appropriate inspection while narrowing down as much as possible.

第6に本発明は、欠陥検査装置を提供する。この欠陥検査装置は、第1〜第5に挙げた欠陥検査方法を実行することができる。   Sixth, the present invention provides a defect inspection apparatus. This defect inspection apparatus can execute the first to fifth defect inspection methods.

すなわち欠陥検査装置は、被検査物を撮像して画像を生成する画像生成手段と、画像生成手段により生成された画像を所定の配列で複数のブロックに分割し、その中で検査対象として設定した注目ブロック内でみた画像の濃度と注目ブロックに隣接する周辺ブロック内でみた画像の濃度とを、配列内で一方向に隣接する2つの周辺ブロックについてそれぞれ比較する比較手段と、比較手段による比較の結果、注目ブロック内での濃度が2つの周辺ブロック内での濃度に対してともに低かった場合にのみ、注目ブロック内での濃度と各周辺ブロック内での濃度との間で求めた2つの変化量を合算することで注目ブロックの欠陥度を求める算出手段と、算出手段により求めた欠陥度に基づき注目ブロック内での欠陥の有無を判断する判断手段とを備えるものである。   That is, the defect inspection apparatus divides an image generated by the image generation unit by capturing an object to be inspected, and an image generated by the image generation unit into a plurality of blocks in a predetermined arrangement, and set the inspection target therein Comparison means for comparing the image density seen in the target block and the image density seen in the peripheral block adjacent to the target block for each of two peripheral blocks adjacent in one direction in the array, and comparison by the comparison means As a result, only when the density in the target block is lower than the density in the two neighboring blocks, the two changes found between the density in the target block and the density in each peripheral block Calculating means for calculating the defect degree of the block of interest by adding the amounts; and determining means for determining the presence or absence of a defect in the block of interest based on the defect degree obtained by the calculation means It is obtain things.

このため本発明の欠陥検査装置は、例えば多数の被検査物を順に撮像して画像を生成しつつ、この生成した画像を用いて順にブロック分割や濃度の比較、欠陥度の算出、そして欠陥有無の判断といった手順を流れ作業で実行することができる。したがって、例えば製造ライン上で大量生産される被検査物を効率よく検査し、その品質管理に寄与するといった有用性を得ることができる。   For this reason, the defect inspection apparatus according to the present invention, for example, sequentially captures a large number of objects to be inspected to generate images, and sequentially uses this generated image to perform block division, density comparison, defect degree calculation, and presence / absence of defects. It is possible to execute a procedure such as determination in a flow work. Therefore, for example, it is possible to obtain usefulness such as efficiently inspecting an object to be mass-produced on a production line and contributing to quality control thereof.

以上のように本発明の欠陥検査方法及び欠陥検査装置によれば、画像内に被検査物の範囲外で撮像された画素が含まれていても、これを欠陥部分として誤認識することがない。したがって、事前に画像から被検査物の範囲外の画素を除外しておく必要がなく、機械的に画像を用いて検査を進めることができるので、それだけ検査の効率を高めることができる。   As described above, according to the defect inspection method and the defect inspection apparatus of the present invention, even if a pixel captured outside the range of the inspection object is included in the image, this is not erroneously recognized as a defective portion. . Therefore, it is not necessary to exclude pixels outside the range of the object to be inspected from the image in advance, and the inspection can be advanced mechanically using the image, so that the inspection efficiency can be increased accordingly.

以下、本発明の実施形態について図面を参照しながら説明する。
図1は、欠陥検査装置10の構成例を概略的に示した図である。欠陥検査方法は、この欠陥検査装置10を用いて実現することができる。ここでは先ず、欠陥検査装置10の構成列について説明する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram schematically illustrating a configuration example of the defect inspection apparatus 10. The defect inspection method can be realized by using this defect inspection apparatus 10. Here, first, a configuration row of the defect inspection apparatus 10 will be described.

欠陥検査装置10は、例えば搬送機構としてベルトコンベア12を備えている。このベルトコンベア12は、無端状の搬送ベルト12aをローラ12bの回転に伴って一定方向に周回走行させながら、その搬送面上に載置した被検査物(以下、「ワーク」と称する。)Wを搬送ベルト12aの走行方向に搬送する。なおベルトコンベア12は、その動力として図示しないモータを備えている。   The defect inspection apparatus 10 includes a belt conveyor 12 as a transport mechanism, for example. This belt conveyor 12 is an object to be inspected (hereinafter referred to as “work”) W placed on its conveying surface while causing the endless conveying belt 12a to circulate in a certain direction as the roller 12b rotates. Is conveyed in the traveling direction of the conveyor belt 12a. The belt conveyor 12 includes a motor (not shown) as its power.

ベルトコンベア12には、例えば一方のローラ12bにロータリエンコーダ14が連結されている。ロータリエンコーダ14は、例えば伝動ベルト16を介してローラ12bの回転に伴って駆動され、一定の回転角度ごとにパルス信号を発生させる。   In the belt conveyor 12, for example, a rotary encoder 14 is connected to one roller 12b. The rotary encoder 14 is driven by the rotation of the roller 12b via the transmission belt 16, for example, and generates a pulse signal at every fixed rotation angle.

欠陥検査装置10は撮像機器としてのラインセンサ18を備えており、このラインセンサ18は、ベルトコンベア12の上方に設置されている。ラインセンサ18には、一定の幅で直線状に配列された多数の撮像素子が内蔵されている。なお、ラインセンサ18に用いるイメージセンシングデバイスには、例えばCCDイメージセンサ、CMOSイメージセンサ等の半導体方式の他に、電子管方式の撮像管等も使用可能である。また、ラインセンサ18の前面(受光面の前方)には、ワークWからの反射光を撮像素子に結像させるレンズ20が設置されている。   The defect inspection apparatus 10 includes a line sensor 18 as an imaging device, and the line sensor 18 is installed above the belt conveyor 12. The line sensor 18 incorporates a large number of imaging elements arranged in a straight line with a certain width. For the image sensing device used for the line sensor 18, an electron tube type imaging tube or the like can be used in addition to a semiconductor type such as a CCD image sensor or a CMOS image sensor. In addition, a lens 20 is installed on the front surface of the line sensor 18 (in front of the light receiving surface) so that the reflected light from the work W is imaged on the image sensor.

また欠陥検査装置10は、ワークWを照らす光源として照明器具22を備えている。この照明器具22もまたベルトコンベア12の上方に設置されており、照明器具22とラインセンサ18及びレンズ20とは、図1中の撮像位置にあるワークWを挟んで互いに対極に位置している。照明器具22には、例えば冷陰極管、放電管、白熱ランプ等の各種の照明灯を用いることができる。   In addition, the defect inspection apparatus 10 includes a lighting fixture 22 as a light source that illuminates the workpiece W. The lighting fixture 22 is also installed above the belt conveyor 12, and the lighting fixture 22, the line sensor 18, and the lens 20 are positioned opposite to each other across the workpiece W at the imaging position in FIG. . Various kinds of illumination lamps such as a cold cathode tube, a discharge tube, and an incandescent lamp can be used for the illumination fixture 22.

また、照明器具22の光照射方向にはスリット(遮光板)50が配置されており、このスリット50は、主走査方向と平行なエッジを有している。スリット50は、その一端におけるエッジまでの部分で照明器具22から照射される光を部分的(約50%)に遮る位置に設けられている。このようなスリット50は、ワークWの欠陥部分(凹凸欠陥)を撮像したときの画像のコントラストを強調する働きを有するものである。なお、スリット50を用いた欠陥の検査手法については後述する。   In addition, a slit (light-shielding plate) 50 is disposed in the light irradiation direction of the luminaire 22, and the slit 50 has an edge parallel to the main scanning direction. The slit 50 is provided at a position where the light emitted from the luminaire 22 is partially blocked (about 50%) up to the edge at one end thereof. Such a slit 50 has a function of enhancing the contrast of an image when a defective portion (uneven defect) of the workpiece W is imaged. A defect inspection method using the slit 50 will be described later.

ベルトコンベア12の各ローラ12bは、図示されていないモータ等の駆動源から動力を受け、一定速度で同じ方向(図1でみて時計回り方向)に回転する。またベルトコンベア12には、例えば図示されていないオートフィーダからワークWが1個ずつ供給される。ここで被検査物(検査対象)となるワークWには、例えば樹脂製や金属製、木製の板状片、紙片、印刷物、箱状体等の各種のものを適用可能であり、特定の種類のみに制約されることはない。なお、ベルトコンベア12の終端から排出されたワークWは、例えば図示されていないスタッカにより回収されるか、あるいは別のコンベアに引き継がれる。   Each roller 12b of the belt conveyor 12 receives power from a drive source such as a motor (not shown) and rotates in the same direction (clockwise as viewed in FIG. 1) at a constant speed. Further, the work W is supplied to the belt conveyor 12 one by one from an auto feeder (not shown), for example. Here, for the workpiece W to be inspected (inspected), various types such as resin, metal, wooden plate-like piece, paper piece, printed matter, box-like body, etc. can be applied. It is not restricted to only. In addition, the workpiece | work W discharged | emitted from the terminal end of the belt conveyor 12 is collect | recovered by the stacker which is not illustrated, for example, or it is taken over by another conveyor.

欠陥検査装置10は、これら機械的要素の他に演算処理部24を備えている。演算処理部24は、中央演算処理装置(CPU)や記憶装置(ROM,RAM)、入出力インタフェース(I/O)等を有した電子計算機を用いて構成されている。電子計算機の例としては、汎用のパーソナルコンピュータ、ワークステーション等を挙げることができる。演算処理部24には、上記のロータリエンコーダ14からパルス信号が入力されるとともに、ラインセンサ18から画像信号が入力されるものとなっている。演算処理部24は、これら入力信号に基づいて画像データの各種処理を行う。なお、演算処理部24で行われる処理についてはさらに後述する。   The defect inspection apparatus 10 includes an arithmetic processing unit 24 in addition to these mechanical elements. The arithmetic processing unit 24 is configured using an electronic computer having a central processing unit (CPU), a storage device (ROM, RAM), an input / output interface (I / O), and the like. Examples of electronic computers include general-purpose personal computers and workstations. The arithmetic processing unit 24 receives a pulse signal from the rotary encoder 14 and an image signal from the line sensor 18. The arithmetic processing unit 24 performs various processes on the image data based on these input signals. The processing performed by the arithmetic processing unit 24 will be further described later.

図2は、ラインセンサ18によりワークWが撮像される過程を示した斜視図である。ラインセンサ18は、その主走査線Lが搬送ベルト12aの幅方向(横断方向)に位置付けられており、照明器具22は、この主走査線L上を中心として照明光を発している。ワークWは、搬送される過程で主走査線Lを通過し、この主走査線Lの位置でワークWの表面から反射された光はレンズ20を経てラインセンサ18の撮像素子に結像される。なお、このとき主走査線L上には、ワークWの表面領域だけでなく、その両外側の搬送ベルト12aの上面領域が含まれている。   FIG. 2 is a perspective view illustrating a process in which the workpiece W is imaged by the line sensor 18. The line sensor 18 has its main scanning line L positioned in the width direction (transverse direction) of the transport belt 12a, and the illuminating device 22 emits illumination light centering on the main scanning line L. The work W passes through the main scanning line L in the process of being conveyed, and the light reflected from the surface of the work W at the position of the main scanning line L passes through the lens 20 and forms an image on the image sensor of the line sensor 18. . At this time, the main scanning line L includes not only the surface area of the workpiece W but also the upper surface area of the conveying belt 12a on both outer sides thereof.

図3は、演算処理部24の構成をより詳細に示すブロック図である。演算処理部24は、その構成要素として入力部30、データ処理部32、データ記憶部34、欠陥検出部36及び出力部38を備えるほか、これらの動作を制御するCPU40を備えている。以下、それぞれの構成要素について説明する。なお、ここではCPU40とは別にデータ処理部32及び欠陥検出部36を設けた例を挙げているが、これらデータ処理部32や欠陥検出部36の機能はCPU40のリソースを用いて実現してもよい。また、ここで図示とともに挙げた構成はあくまで好ましい一例であり、演算処理部24には他の構成を採用することもできる。   FIG. 3 is a block diagram showing the configuration of the arithmetic processing unit 24 in more detail. The arithmetic processing unit 24 includes an input unit 30, a data processing unit 32, a data storage unit 34, a defect detection unit 36, and an output unit 38 as its constituent elements, and a CPU 40 that controls these operations. Hereinafter, each component will be described. In this example, the data processing unit 32 and the defect detection unit 36 are provided separately from the CPU 40. However, the functions of the data processing unit 32 and the defect detection unit 36 may be realized using the resources of the CPU 40. Good. In addition, the configuration described here with reference to the drawing is merely a preferable example, and another configuration may be adopted for the arithmetic processing unit 24.

入力部30には、入力インタフェースを介してラインセンサ18からの画像信号及びロータリエンコーダ14からのパルス信号が入力される。入力部30は、入力されるパルス信号を参照しながら画像信号(アナログ信号)を必要に応じて減衰調整し、A/D変換してデータ処理部32に伝送する機能を有する。   An image signal from the line sensor 18 and a pulse signal from the rotary encoder 14 are input to the input unit 30 via the input interface. The input unit 30 has a function of performing attenuation adjustment on an image signal (analog signal) as necessary while referring to an input pulse signal, A / D converting, and transmitting it to the data processing unit 32.

データ処理部32は、伝送された画像信号を1ライン分の画像データ(ラスタデータ)の形式で処理する。このとき1ライン中の各画素には、例えばグレースケールの濃度値(0〜255階調)が割り当てられる。またデータ処理部32は、1ライン中に含まれる各画素に対して、例えば0〜mまでのカラムアドレスを付与するとともに、1ラインごとに例えば1〜nまでのローアドレスを付与する。   The data processing unit 32 processes the transmitted image signal in the form of image data (raster data) for one line. At this time, for example, gray scale density values (0 to 255 gradations) are assigned to each pixel in one line. The data processing unit 32 assigns, for example, a column address from 0 to m to each pixel included in one line, and assigns a row address from 1 to n, for example, for each line.

データ処理部32で処理された1ラインごとの画像データは、データバス42を介してデータ記憶部34に転送される。データ記憶部34には一定の記憶領域が確保されており、この記憶領域には、画像データに付与されるローアドレス及びカラムアドレスにそれぞれ対応したメモリアドレスが割り当てられている。転送された画像データ(0〜255の濃度値)は、それぞれ対応するメモリアドレスのメモリセル(1バイト分)に書き込まれる。   The image data for each line processed by the data processing unit 32 is transferred to the data storage unit 34 via the data bus 42. A fixed storage area is secured in the data storage unit 34, and memory addresses respectively corresponding to the row address and the column address assigned to the image data are allocated to this storage area. The transferred image data (density value of 0 to 255) is written in the memory cell (for 1 byte) at the corresponding memory address.

欠陥検出部36は、データバス42を介してデータ記憶部34にアクセスし、記憶領域から画像データを読み出して欠陥の検査処理を行う。また欠陥検出部36は、欠陥の検査結果データをデータ記憶部34に書き込むとともに、必要に応じて検査結果データを出力部38に転送する。なお、欠陥検出部36が行う検査処理の具体的な態様についてはさらに後述する。   The defect detection unit 36 accesses the data storage unit 34 via the data bus 42, reads image data from the storage area, and performs defect inspection processing. The defect detection unit 36 writes defect inspection result data in the data storage unit 34 and transfers the inspection result data to the output unit 38 as necessary. A specific aspect of the inspection process performed by the defect detection unit 36 will be further described later.

出力部38は、上記のように検査結果データを出力するほか、必要に応じて撮像された画像データ(ワークWの画像)を出力する。データの出力先は、例えば図示しない画像表示装置や、他の汎用コンピュータ、記録媒体等である。これにより、画像表示装置に検査結果を表示してオペレータが画面上で欠陥を視認したり、あるいは、画面上にワークWの表面画像を表示し、その画像をオペレータが視認したりすることができる。   In addition to outputting the inspection result data as described above, the output unit 38 outputs imaged image data (image of the workpiece W) as necessary. The data output destination is, for example, an image display device (not shown), another general-purpose computer, a recording medium, or the like. Accordingly, the inspection result can be displayed on the image display device so that the operator can visually recognize the defect on the screen, or the surface image of the workpiece W can be displayed on the screen and the operator can visually recognize the image. .

その他、特に図示していないが、演算処理部24はデータ補正部を備えていてもよい。データ補正部は、データ記憶部34に記憶された画像データを読み出し、その補正処理を行う。補正処理は、例えばベルトコンベア12による搬送速度の周期的な変化による濃淡むらの補正や、室内照明のフリッカ等による濃度差の変化を補正する目的で行われる。またこのようなデータ補正部の機能は、CPU40のリソースを用いて実現してもよい。   In addition, although not particularly illustrated, the arithmetic processing unit 24 may include a data correction unit. The data correction unit reads the image data stored in the data storage unit 34 and performs the correction process. The correction process is performed, for example, for the purpose of correcting unevenness in density due to a periodic change in the conveyance speed by the belt conveyor 12, or correcting changes in density difference due to flickering in room lighting. Such a function of the data correction unit may be realized using resources of the CPU 40.

〔画像データの生成〕
演算処理部24において、画像データの生成は例えば以下のプロセスを通じて行われる。すなわち演算処理部24は、ロータリエンコーダ14からパルス信号の入力(エッジターンオン)があると、ラインセンサ18を用いて1ライン分の撮画(撮像)を実行する。これにより、ラインセンサ18では各撮像素子がアクティブ(露光状態)となり、主走査線Lからの反射光強度に基づいて画像信号が生成される。次にパルス信号の入力(エッジターンオフ)があると、演算処理部24は1ライン分の撮画を終了する。ここまでの処理を経ると、1ライン分の画像データが生成される。
[Generation of image data]
In the arithmetic processing unit 24, image data is generated through the following process, for example. In other words, when a pulse signal is input (edge turn-on) from the rotary encoder 14, the arithmetic processing unit 24 performs imaging (imaging) for one line using the line sensor 18. Thereby, in the line sensor 18, each image sensor is activated (exposure state), and an image signal is generated based on the intensity of reflected light from the main scanning line L. Next, when a pulse signal is input (edge turn-off), the arithmetic processing unit 24 ends the imaging for one line. Through the processing so far, image data for one line is generated.

演算処理部24は、1ライン分の画像データ生成プロセスを1回終了すると、また改めて次回の画像データ生成プロセスを繰り返し、これらを複数ライン分だけ蓄積して1つの画像データを生成する。なお画像データ生成プロセスは、ワークWが主走査線Lを通過する直前のタイミングから、ワークWが主走査線Lを通過した直後のタイミングまでの時間内で繰り返し実行される。このため欠陥検査装置10は、図1,2に示されていないワーク検出センサを備えており、このワーク検出センサにより主走査線Lの直前(搬送方向でみて上流位置)に1つのワークWが到達したことを検出すると、演算処理部24では上記の画像データプロセスが開始される。そして欠陥検査装置10は、ワーク検出センサにより同じワークWが主走査線Lの直前を通り過ぎたことを検出すると、その一定時間後に演算処理部24では画像データ生成プロセスの繰り返しが終了する。   When the image data generation process for one line is completed once, the arithmetic processing unit 24 repeats the next image data generation process again and accumulates them for a plurality of lines to generate one image data. The image data generation process is repeatedly executed within a period from a timing immediately before the workpiece W passes the main scanning line L to a timing immediately after the workpiece W passes the main scanning line L. For this reason, the defect inspection apparatus 10 is provided with a workpiece detection sensor not shown in FIGS. 1 and 2, and one workpiece W is placed immediately before the main scanning line L (upstream position in the transport direction) by the workpiece detection sensor. When the arrival is detected, the arithmetic processing unit 24 starts the image data process. When the defect inspection apparatus 10 detects that the same workpiece W has passed immediately before the main scanning line L by the workpiece detection sensor, the arithmetic processing unit 24 ends the repetition of the image data generation process after a certain period of time.

〔欠陥検査方法〕
以上の画像データ生成プロセスを通じて得た画像を用いて、本実施形態では演算処理部24においてワークWの表面欠陥を検査することができる。以下、本実施形態の欠陥検査装置10を用いて実施することができる欠陥検査方法について説明する。
[Defect inspection method]
In the present embodiment, a surface defect of the workpiece W can be inspected by the arithmetic processing unit 24 using the image obtained through the above image data generation process. Hereinafter, a defect inspection method that can be performed using the defect inspection apparatus 10 of the present embodiment will be described.

図4は、演算処理部24において実行される欠陥検査プロセスの手順例を示したフローチャートである。以下、各手順を追って欠陥検査プロセスの概要を説明する。   FIG. 4 is a flowchart showing a procedure example of a defect inspection process executed in the arithmetic processing unit 24. Hereinafter, the outline of the defect inspection process will be described step by step.

ステップS10:先ず欠陥検出部36は、データ記憶部34から画像データを取得(データ取り込み)する。このとき取得する画像データは、例えばワークWの表面全体を撮像した2次元の全画素についてである。   Step S10: First, the defect detection unit 36 acquires image data from the data storage unit 34 (data capture). The image data acquired at this time is, for example, for all two-dimensional pixels obtained by imaging the entire surface of the workpiece W.

ステップS12:次に欠陥検出部36は、今回のプロセスで取り扱う欠陥種を設定する。なお欠陥種は、例えば欠陥の大きさや形状等によって予め欠陥種1〜nまで規定されている。例えば欠陥には、画像の縦方向に長い縦縞状のものもあれば、横方向に長い横縞状のものもあるし、縦横均等に拡がった形態のものもある。あるいは、画像内で比較的広い範囲を占める欠陥もあれば、極狭い範囲しか占めない欠陥もある。このため本実施形態では、大まかな欠陥の形態種別に応じて予め欠陥種1〜nを設定し、欠陥の種別に応じた処理を行っている。なお、欠陥種ごとの処理の違いについては後述する。   Step S12: Next, the defect detection unit 36 sets a defect type to be handled in the current process. The defect types are defined in advance from defect types 1 to n depending on, for example, the size and shape of the defect. For example, some of the defects have vertical stripes that are long in the vertical direction of the image, horizontal stripes that are long in the horizontal direction, and other types of defects that are spread evenly in the vertical and horizontal directions. Alternatively, there are defects that occupy a relatively wide area in the image and defects that occupy only a very narrow area. For this reason, in the present embodiment, defect types 1 to n are set in advance according to the rough defect type, and processing according to the type of defect is performed. The difference in processing for each defect type will be described later.

ステップS14:先のステップS12で今回の欠陥種(1〜nのいずれか)を設定すると、次に欠陥検出部36は、欠陥検出処理を実行する。この処理において、欠陥検出部36はさらに詳細なプロセスを実行し、欠陥の有無を判定する。なお、具体的な処理の手順については別のフローチャートを用いて後述する。   Step S14: Once the current defect type (any one of 1 to n) is set in the previous step S12, the defect detection unit 36 next executes a defect detection process. In this process, the defect detection unit 36 performs a more detailed process to determine whether there is a defect. A specific processing procedure will be described later using another flowchart.

ステップS16:欠陥検出処理から復帰すると、次に欠陥検出部36は欠陥種nまでの検査が完了したか否かを確認する。その結果、未だ欠陥種nまでの検査が完了していなければ(No)、欠陥検出部36はステップS12に戻って次の欠陥種(前回+1)を設定し、改めて欠陥検出処理(ステップS14)を実行する。   Step S16: After returning from the defect detection process, the defect detection unit 36 confirms whether or not the inspection up to the defect type n has been completed. As a result, if the inspection up to the defect type n has not been completed yet (No), the defect detection unit 36 returns to step S12 to set the next defect type (previous + 1), and a defect detection process (step S14) again. Execute.

以上の手順を経て、1つの画像データについて欠陥種1〜nまでの検査が完了したことを確認すると(ステップS16:Yes)、欠陥検出部36は次のステップS18を実行する。   When it is confirmed through the above procedure that inspection of defect types 1 to n has been completed for one image data (step S16: Yes), the defect detection unit 36 executes the next step S18.

ステップS18:欠陥検出部36は、これまでの処理を通じて上記のデータ記憶部34に蓄積しておいた検査結果を収集し、これを例えば一覧形式にして出力する。検査結果の一覧は、例えば欠陥種ごとに画像内での欠陥の位置(座標)を特定したものや、欠陥の画像を部分的に切り取ってサムネイル化したものとして表することができる。   Step S18: The defect detection unit 36 collects the inspection results accumulated in the data storage unit 34 through the processes so far, and outputs them in a list format, for example. The list of inspection results can be represented, for example, by specifying the position (coordinates) of the defect in the image for each defect type, or by partially cutting out the defect image and making it a thumbnail.

そして以上の手順を実行すると、欠陥検出部36は1つの画像データについて欠陥検査プロセスを終了する。なお欠陥検出部36は、別のワークWについて検査を行う場合、図4のプロセスを改めて実行する。   When the above procedure is executed, the defect detection unit 36 ends the defect inspection process for one image data. The defect detection unit 36 executes the process of FIG. 4 again when inspecting another workpiece W.

〔欠陥検出処理〕
次に図5は、上記の欠陥検査プロセスにおいて実行される欠陥検出処理(図4中のステップS14)の手順例を示すフローチャートである。以下、欠陥検出処理について、手順を追って説明する。
[Defect detection processing]
Next, FIG. 5 is a flowchart showing a procedure example of the defect detection process (step S14 in FIG. 4) executed in the defect inspection process. Hereinafter, the defect detection process will be described step by step.

ステップS140:欠陥検出部36は、今回の取り扱い対象となる欠陥種(1〜n)に応じて画像データを複数のブロックに分割する。例えば、画像データが1ラインでX画素分あり、副走査方向にY行で構成される場合、これらX×Y画素を大きく分けてx×y配列(行列)のブロックに分割する。ここでx,yは、それぞれX,Yよりも小さい値(例えば4分の1〜10分の1程度)である。   Step S140: The defect detection unit 36 divides the image data into a plurality of blocks according to the defect type (1 to n) to be handled this time. For example, when the image data includes X pixels in one line and is composed of Y rows in the sub-scanning direction, these X × Y pixels are roughly divided into blocks of an x × y array (matrix). Here, x and y are values smaller than X and Y, respectively (for example, about 1/4 to 1/10).

〔ブロック分割例〕
ここで図6は、1つの画像データを複数(x×y)のブロックに分割した場合の例を示す概略図である。図6中、全体の外枠が画像データの境界に相当し、その中に格子状に形成される枠線が各ブロックの境界に相当する。また図5中、画像データ全体の右上隅に位置するブロックについては、その中に含まれる個々の画素を区切って示している。
[Block division example]
Here, FIG. 6 is a schematic diagram illustrating an example in which one image data is divided into a plurality of (x × y) blocks. In FIG. 6, the entire outer frame corresponds to the boundary of the image data, and the frame lines formed in a lattice shape therein correspond to the boundary of each block. Further, in FIG. 5, the block located at the upper right corner of the entire image data is shown by dividing individual pixels included therein.

上記のように画像データを分割することで、例えば最上段の位置では横方向にブロックB(1,1),B(2,1),B(3,1),・・・,B(x,1)が生成され、また左端位置では最上段のブロックB(1,1)に続き、縦方向にブロックB(1,2),B(1,3),・・・,B(1,y)が生成される。したがって、この中の任意のブロックB(m,n)は、例えば横方向で左からm番目、縦方向で上からn番目に位置するものとなる。   By dividing the image data as described above, for example, at the uppermost position, the blocks B (1,1), B (2,1), B (3,1),..., B (x , 1) is generated, and at the left end position, the uppermost block B (1, 1) is followed by blocks B (1, 2), B (1, 3),. y) is generated. Therefore, an arbitrary block B (m, n) among them is positioned, for example, in the horizontal direction mth from the left and in the vertical direction nth from the top.

図6に示される分割例では、各ブロックの縦方向と横方向とで画素数が異なっている。このときのアスペクト比(a:b)は、上記のように取り扱う欠陥種に応じて任意に設定することができる。例えば縦方向に長く現れる欠陥を取り扱う場合、図6に示されるように比較的縦長のアスペクト比(a<b)を採用することができる。   In the division example shown in FIG. 6, the number of pixels is different between the vertical direction and the horizontal direction of each block. The aspect ratio (a: b) at this time can be arbitrarily set according to the defect type to be handled as described above. For example, when dealing with a defect that appears long in the vertical direction, a relatively long aspect ratio (a <b) can be employed as shown in FIG.

〔図5:欠陥検出処理を参照〕
ステップS142:ブロック分割を行うと、次に欠陥検出部36は隣接するブロック間で濃度を比較する。例えば、任意の注目ブロックB(m,n)を設定すると、配列内でこれと隣接する周辺の2つのブロックB(m−1,n),B(m+1,n)について濃度変化量を算出する。また、各ブロック内でみた画像の濃度は、例えばその中に含まれる全画素の平均濃度値で表すことができる。
[See Figure 5: Defect Detection Processing]
Step S142: After the block division, the defect detection unit 36 compares the densities between adjacent blocks. For example, when an arbitrary target block B (m, n) is set, the density change amount is calculated for two neighboring blocks B (m−1, n) and B (m + 1, n) adjacent to this in the array. . Further, the density of an image viewed in each block can be expressed by, for example, an average density value of all pixels included in the block.

〔濃度変化量の算出手法〕
ここで図7は、濃度変化量の算出手法について説明するための説明図である。図解するように、ブロック間での濃度の比較は、1つの注目ブロックB(m,n)について4つの方向で行われる。具体的には、以下の4通りである。
[Method for calculating concentration change]
Here, FIG. 7 is an explanatory diagram for explaining a calculation method of the density change amount. As illustrated, density comparison between blocks is performed in four directions for one target block B (m, n). Specifically, there are the following four types.

(1)左右方向での比較
任意の注目ブロックB(m,n)に対し、配列内で左右方向A1に隣接する2つのブロックB(m−1,n),B(m+1,n)を特定する。そして、第1の変化量として左隣に位置する周辺ブロックB(m−1,n)から注目ブロックB(m,n)への濃度値の変化量を算出する。また第2の変化量として、注目ブロックB(m,n)から右隣に位置する周辺ブロックB(m+1,n)への濃度値の変化量を算出する。
(1) Comparison in the horizontal direction For any target block B (m, n), specify two blocks B (m-1, n) and B (m + 1, n) adjacent to the horizontal direction A1 in the array. To do. Then, as the first change amount, the change amount of the density value from the neighboring block B (m−1, n) located on the left side to the target block B (m, n) is calculated. As the second change amount, the change amount of the density value from the target block B (m, n) to the neighboring block B (m + 1, n) located on the right side is calculated.

(2)斜め方向での比較1
任意の注目ブロックB(m,n)に対し、配列内で斜め方向A2に隣接する2つのブロックB(m−1,n+1),B(m+1,n−1)を特定する。そして、第1の変化量として左斜め下に位置する周辺ブロックB(m−1,n+1)から注目ブロックB(m,n)への濃度値の変化量を算出する。また第2の変化量として、注目ブロックB(m,n)から右斜め上に位置する周辺ブロックB(m+1,n−1)への濃度値の変化量を算出する。
(2) Comparison 1 in an oblique direction
For an arbitrary block of interest B (m, n), two blocks B (m−1, n + 1) and B (m + 1, n−1) adjacent in the diagonal direction A2 in the array are specified. Then, as the first change amount, the change amount of the density value from the peripheral block B (m−1, n + 1) located diagonally lower left to the target block B (m, n) is calculated. Further, as the second change amount, the change amount of the density value from the target block B (m, n) to the peripheral block B (m + 1, n−1) located diagonally upward to the right is calculated.

(3)斜め方向での比較2
任意の注目ブロックB(m,n)に対し、上記とは別の配列内で斜め方向A3に隣接する2つのブロックB(m−1,n−1),B(m+1,n+1)を特定する。そして、第1の変化量として左斜め上に位置する周辺ブロックB(m−1,n−1)から注目ブロックB(m,n)への濃度値の変化量を算出する。また第2の変化量として、注目ブロックB(m,n)から右斜め下に位置する周辺ブロックB(m+1,n+1)への濃度値の変化量を算出する。
(3) Comparison in diagonal direction 2
For an arbitrary block of interest B (m, n), two blocks B (m−1, n−1) and B (m + 1, n + 1) adjacent to the diagonal direction A3 in an array different from the above are specified. . Then, as the first change amount, the change amount of the density value from the peripheral block B (m−1, n−1) located on the upper left to the target block B (m, n) is calculated. Further, as the second change amount, the change amount of the density value from the target block B (m, n) to the peripheral block B (m + 1, n + 1) located diagonally lower right is calculated.

(4)上下方向での比較
任意の注目ブロックB(m,n)に対し、配列内で上下方向A4に隣接する2つのブロックB(m,n−1),B(m,n+1)を特定する。そして、第1の変化量として上段に位置する周辺ブロックB(m,n−1)から注目ブロックB(m,n)への濃度値の変化量を算出する。また第2の変化量として、注目ブロックB(m,n)から下段に位置する周辺ブロックB(m,n+1)への濃度値の変化量を算出する。
(4) Comparison in the vertical direction For any target block B (m, n), specify two blocks B (m, n-1) and B (m, n + 1) adjacent in the vertical direction A4 in the array To do. Then, the amount of change in the density value from the peripheral block B (m, n−1) located in the upper stage to the target block B (m, n) is calculated as the first amount of change. Further, as the second change amount, the change amount of the density value from the target block B (m, n) to the peripheral block B (m, n + 1) located at the lower stage is calculated.

以上の4通りについて濃度を比較し、各方向別にそれぞれ第1の変化量及び段2の変化量を算出すると、欠陥検出部36はひとまずこれらの算出結果を保存する。   When the densities are compared for the above four patterns and the first change amount and the change amount of stage 2 are calculated for each direction, the defect detection unit 36 temporarily stores these calculation results.

〔図5:欠陥検出処理を参照〕
ステップS144:次に欠陥検出部36は、各方向別の第1の変化量及び段2の変化量について、欠陥条件を判断する。ここでいう欠陥条件とは、各方向別に求めた濃度値の変化量が欠陥の有無を判断するための要素に適合するかどうかを定めたものである。具体的には、第1の変化量が負の値(<0)であり、かつ、第2の変化量が正の値(>0)であることを欠陥条件としている。欠陥検出部36は、各方向別に求めた第1,第2変化量のうち、上記の欠陥条件を満たされないものについては算出結果を破棄する。したがってこれ以降は、欠陥条件に適合する算出結果のみが使用されることになる。
[See Figure 5: Defect Detection Processing]
Step S144: Next, the defect detection unit 36 determines the defect condition for the first change amount and the change amount of the stage 2 for each direction. The defect condition here defines whether or not the amount of change in the density value obtained for each direction is compatible with an element for determining the presence or absence of a defect. Specifically, the defect condition is that the first change amount is a negative value (<0) and the second change amount is a positive value (> 0). The defect detection unit 36 discards the calculation result for the first and second change amounts obtained for each direction that do not satisfy the defect condition. Therefore, after this, only the calculation result that matches the defect condition is used.

ステップS146:算出結果を絞り込むと、欠陥検出部36は残った変化量から欠陥度を算出する。具体的には、各方向別(条件に適合する場合のみ)に求めた第1変化量と第2変化量との差分を求め、その結果を各方向別の欠陥度とする。なお、上記のように第1変化量は負の値であり、第2変化量は正の値であるため、欠陥度は各変化量の絶対値を合算した値として表すことができる。そして欠陥検出部36は、各方向別に求めた欠陥度のうち、最大のものを最終的に注目ブロックの欠陥度(代表値)として決定する。   Step S146: After narrowing down the calculation result, the defect detection unit 36 calculates the defect degree from the remaining change amount. Specifically, the difference between the first change amount and the second change amount obtained for each direction (only when the conditions are met) is obtained, and the result is set as the defect degree for each direction. Since the first change amount is a negative value and the second change amount is a positive value as described above, the degree of defect can be expressed as a sum of absolute values of the change amounts. The defect detection unit 36 finally determines the maximum defect degree obtained for each direction as the defect degree (representative value) of the block of interest.

ステップS148:次に欠陥検出部36は、例えば上記の欠陥度(代表値)を所定の閾値と比較し、その結果に基づいて欠陥の有無を判断する。なお閾値には、予め欠陥種ごとに実験で求めた値を設定しておけばよい。   Step S148: Next, the defect detection unit 36 compares the above-described defect degree (representative value) with a predetermined threshold value, for example, and determines the presence or absence of a defect based on the result. In addition, what is necessary is just to set the value calculated | required by experiment beforehand for every defect kind as a threshold value.

ステップS150:このとき欠陥が検出された場合(Yes)、欠陥検出部36は次にステップS152を実行する。これに対し、欠陥が検出されなければ(No)、欠陥検出部36はステップS154に移行する。   Step S150: If a defect is detected at this time (Yes), the defect detector 36 next executes Step S152. On the other hand, if no defect is detected (No), the defect detection unit 36 proceeds to step S154.

ステップS152:欠陥を検出した場合、欠陥検出部36は欠陥の凹凸(深さ又は高さ)を算出する。なお、具体的な算出例についてはさらに後述する。   Step S152: When a defect is detected, the defect detector 36 calculates the unevenness (depth or height) of the defect. A specific calculation example will be described later.

ステップS154:そして欠陥検出部36は、分割した全てのブロックについて検査を行ったか否かを確認する。このとき未だ全ブロックについて検査が完了していなければ(No)、欠陥検出部36はステップS156に進む。   Step S154: Then, the defect detection unit 36 confirms whether or not all the divided blocks have been inspected. At this time, if the inspection has not been completed for all the blocks (No), the defect detection unit 36 proceeds to step S156.

ステップS156:欠陥検出部36は、注目ブロックを変更する。例えば、今回の検査で設定した注目ブロックの位置を変更し、新たな位置にあるブロックを次の注目ブロックに設定する。このとき欠陥検出部36は、例えば配列の順番にブロックの位置をずらしていくこともできるし、ランダムな順番でブロックの位置をずらすこともできる。ただし、一度注目ブロックに設定したものは、重複して注目ブロックに設定されることはない。   Step S156: The defect detection unit 36 changes the target block. For example, the position of the target block set in the current examination is changed, and the block at the new position is set as the next target block. At this time, the defect detection unit 36 can shift the positions of the blocks in the order of arrangement, for example, or can shift the positions of the blocks in a random order. However, what is once set as the block of interest is not set as the block of interest twice.

注目ブロックを変更すると、欠陥検出部36はステップS142に戻り、これ以降の手順(ステップS142〜ステップS154)を繰り返す。そして、全てのブロックについて検査が完了したことを確認すると(ステップS154:Yes)、欠陥検出部36は上記の欠陥検査プロセスに復帰し、そこで次の手順(図4中のステップS16)を実行する。   When the block of interest is changed, the defect detection unit 36 returns to step S142 and repeats the subsequent steps (steps S142 to S154). When it is confirmed that the inspection has been completed for all the blocks (step S154: Yes), the defect detection unit 36 returns to the defect inspection process and executes the next procedure (step S16 in FIG. 4). .

以上のように、欠陥検査装置10を用いて行われる欠陥検査方法によれば、ワークWの表面を撮像した画素を1つ1つ検査するのではなく、これらをブロック単位に区分けした平均濃度値を用いて検査することで、擬似的に画素数を減らすことができる。このため、平滑ではなく粗い表面状態のワークWの画像についても、そこに含まれる欠陥以外のノイズの影響を抑え、より正確な欠陥検査を行うことができる。   As described above, according to the defect inspection method performed using the defect inspection apparatus 10, instead of inspecting the pixels obtained by imaging the surface of the workpiece W one by one, the average density value obtained by dividing these into blocks. The number of pixels can be reduced in a pseudo manner by using the inspection. For this reason, it is possible to suppress the influence of noise other than the defects included in the image of the workpiece W having a rough surface state rather than a smooth surface and perform a more accurate defect inspection.

また、欠陥種に応じてブロックのアスペクト比を細かく設定することができるので、例えばコントラストの低い欠陥や、画像上で各方向に特徴を有する欠陥に的を絞って検査を行うことができる。   Further, since the aspect ratio of the block can be set finely according to the defect type, for example, inspection can be performed focusing on defects having low contrast and defects having features in each direction on the image.

〔欠陥条件による誤認識の防止〕
また本実施形態では、上記のように欠陥検出処理の中で欠陥条件を判断しているため(図5中のステップS144)、欠陥の誤認識を防止することができる。以下、この点について具体的に説明する。
[Preventing misrecognition due to defect conditions]
In the present embodiment, since the defect condition is determined in the defect detection process as described above (step S144 in FIG. 5), it is possible to prevent erroneous recognition of the defect. Hereinafter, this point will be specifically described.

図8は、画像データ全体のイメージと、これをブロックに分割した場合に現れる濃度差の例を簡略化して示した図である。   FIG. 8 is a diagram showing a simplified example of an image of the entire image data and a density difference that appears when the image data is divided into blocks.

図8中(A):例えば1つの画像データ内に、ワークWの表面に相当する表面領域A1と、それ以外の周辺領域A0が含まれている場合を想定する。このような画像データは、四隅が円弧状に仕上げられたカード形状のワークWを撮像した場合に顕著に現れる。   In FIG. 8, (A): For example, it is assumed that one image data includes a surface area A1 corresponding to the surface of the workpiece W and other peripheral areas A0. Such image data appears prominently when a card-shaped workpiece W with four corners finished in an arc shape is imaged.

図8中(B):このとき、ワークWの左端よりも外側に位置する周辺領域A0に注目ブロックBL2を設定すると、例えばその左右方向で濃度を比較した場合、左隣に位置する周辺ブロックBL1から注目ブロックBL2への濃度変化量はほとんどない。なぜなら、これら両ブロックBL1,BL2はいずれも周辺領域A0内の画素を多く含むため、ともに濃度値が低い(画像が黒い)からである。つまり、ここでの第1の変化量は0となる。   In FIG. 8, (B): At this time, if the block of interest BL2 is set in the peripheral area A0 located outside the left end of the workpiece W, for example, when the density is compared in the left-right direction, the peripheral block BL1 located adjacent to the left There is almost no change in density from to the target block BL2. This is because these blocks BL1 and BL2 both contain many pixels in the peripheral area A0, and therefore both have a low density value (the image is black). That is, the first change amount here is zero.

一方、注目ブロックBL2の右隣に位置する周辺ブロックBL3については、表面領域A1内の画素を多く含むため、その濃度値は比較的高い。この場合、注目ブロックBL2から周辺ブロックBL3への濃度変化量(第2の変化量)は正の値となるが、上記のように第1の変化量が0であるため、欠陥条件を満たしていないことがわかる。したがって、この注目ブロックについては欠陥度を算出することなく、第1,第2の変化量は破棄されるので、たとえ注目ブロックBL2の平均濃度値が低かったとしても、これを欠陥として誤認識してしまうことはない。   On the other hand, the peripheral block BL3 located to the right of the target block BL2 includes a large number of pixels in the surface area A1, and therefore has a relatively high density value. In this case, the density change amount (second change amount) from the target block BL2 to the peripheral block BL3 is a positive value. However, since the first change amount is 0 as described above, the defect condition is satisfied. I understand that there is no. Therefore, since the first and second change amounts are discarded without calculating the degree of defect for this target block, even if the average density value of the target block BL2 is low, this is erroneously recognized as a defect. There is no end to it.

図8中(C):同様に、ワークWの右端よりも外側に位置する周辺領域A0に注目ブロックBR2を設定すると、例えばその左右方向で濃度を比較した場合、この注目ブロックBR2から右隣に位置する周辺ブロックBR3への濃度変化量はほとんどなく、第1の変化量は0となる。   In FIG. 8, (C): Similarly, when the target block BR2 is set in the peripheral area A0 located outside the right end of the work W, for example, when comparing the density in the left-right direction, the target block BR2 is adjacent to the right. There is almost no density change amount to the peripheral block BR3 located, and the first change amount is zero.

一方、注目ブロックBR2の左隣に位置する周辺ブロックBR1については、表面領域A1内の画素を多く含むため、その濃度値は比較的高い。この場合、周辺ブロックBR1から注目ブロックBR2への濃度変化量(第2の変化量)は正の値となるが、第1の変化量が0であるため、同じく欠陥条件を満たさない。したがって、この注目ブロックについても欠陥度を算出することなく、第1,第2の変化量は破棄されるので、たとえ注目ブロックBR2の平均濃度値が低かったとしても、これを欠陥として誤認識してしまうことはない。   On the other hand, the peripheral block BR1 located to the left of the target block BR2 includes a large number of pixels in the surface area A1, and therefore has a relatively high density value. In this case, the density change amount (second change amount) from the peripheral block BR1 to the target block BR2 is a positive value, but since the first change amount is 0, the defect condition is not satisfied. Therefore, since the first and second change amounts are discarded without calculating the degree of defect for this target block, even if the average density value of the target block BR2 is low, this is erroneously recognized as a defect. There is no end to it.

したがって、通常であれば四隅の範囲を除いて欠陥検査を行う必要があるが、本実施形態では単純に周辺領域A0を含む全体を機械的にブロック分割して検査を行うことができる。このため本実施形態では、画像データからエッジを検出し、その中からワークWの表面領域A1だけを抽出するような前処理を必要とせず、早期に欠陥検出処理を進行させることができる。   Therefore, although it is usually necessary to perform defect inspection except for the range of the four corners, in the present embodiment, the whole including the peripheral area A0 can be mechanically divided into blocks for inspection. For this reason, in this embodiment, it is possible to advance the defect detection process at an early stage without detecting the edge from the image data and extracting only the surface area A1 of the workpiece W from the edge.

なお、例えば実際にワークWの左端近傍に欠陥が存在しており、その欠陥部分に注目ブロックが設定されていた場合、左右方向への比較においては変化量が破棄されるため、そこで欠陥度は算出されないが、上下方向への比較においては欠陥条件に合致するため、そこで欠陥度を算出することができる。したがって、ワークWの端部近傍の欠陥が検出から漏れてしまうことはない。   For example, when a defect actually exists near the left end of the workpiece W and a target block is set in the defective portion, the amount of change is discarded in the comparison in the left-right direction. Although not calculated, since the defect condition is met in the comparison in the vertical direction, the defect degree can be calculated there. Therefore, the defect near the end of the workpiece W does not leak from the detection.

〔凹凸算出方法〕
次に、上記の欠陥検出処理において欠陥を検出した場合に行われる凹凸の算出手法について説明する。
[Unevenness calculation method]
Next, an unevenness calculation method performed when a defect is detected in the defect detection process will be described.

〔凹欠陥の場合〕
図9は、凹欠陥に関する深さの算出原理を示す概念図である。上記のように、ここでは照明器具22の光照射方向にスリット50が配置されており、このスリット50は照明器具22から照射される光を部分的(約50%)に遮る位置に設けられているものとする。
[For concave defects]
FIG. 9 is a conceptual diagram illustrating the depth calculation principle regarding the concave defect. As described above, here, the slit 50 is arranged in the light irradiation direction of the lighting fixture 22, and the slit 50 is provided at a position where the light irradiated from the lighting fixture 22 is partially blocked (about 50%). It shall be.

一方、ラインセンサ18については、その主走査線L(撮像ライン)に対し、副走査方向でみて50%の範囲内に照明器具22からの光が照射される位置に調整されている。具体的には、照明器具22からの正反射光を用いてワークWの表面を撮像したときの濃度値が最大となる位置から、その50%の値をとる位置までラインセンサ18を副走査方向に平行移動させて調整を行う。したがって、ここではワークWの表面に凹凸欠陥が存在しない場合、ラインセンサ18による撮像時の濃度値はその最大値の50%となる(暗視野)。   On the other hand, the line sensor 18 is adjusted to a position where the light from the luminaire 22 is irradiated within 50% of the main scanning line L (imaging line) in the sub-scanning direction. Specifically, the line sensor 18 is moved in the sub-scanning direction from the position where the density value when the surface of the workpiece W is imaged using the specularly reflected light from the lighting fixture 22 to the position where the density value is 50%. Move it in parallel to adjust. Therefore, here, when there is no uneven defect on the surface of the workpiece W, the density value at the time of imaging by the line sensor 18 is 50% of the maximum value (dark field).

以上の調整を行うことにより、図中の「光源領域」が副走査方向でみた照明器具22からの全照射範囲に相当し、そして、この中で50%分の「暗領域」がスリット50により遮光される範囲に相当し、それ以外の「明領域」が実際にワークWに対して光が照射される範囲に相当することになる。   By performing the above adjustment, the “light source region” in the figure corresponds to the entire irradiation range from the luminaire 22 as viewed in the sub-scanning direction, and 50% of the “dark region” in the figure is formed by the slit 50. This corresponds to a range where light is shielded, and the other “bright area” corresponds to a range where light is actually irradiated onto the workpiece W.

そして、ラインセンサ18の主走査線L上では、副走査方向でみた全受光範囲長(図中参照符号X)の中に50%分の初期暗領域(図中参照符号S)が形成される。この初期暗領域Sの長さは、ワークWの表面位置でスリット50により遮光される暗領域を投影した長さに相当する。したがって、通常、ワークWの表面に凹凸欠陥が存在していなければ、主走査線Lには反射光がない領域と反射光がある領域とが50%ずつ形成されることになる。   Then, on the main scanning line L of the line sensor 18, an initial dark region (reference symbol S in the figure) corresponding to 50% is formed in the total light receiving range length (reference symbol X in the figure) seen in the sub-scanning direction. . The length of the initial dark area S corresponds to the length of the dark area that is shielded by the slit 50 at the surface position of the workpiece W. Therefore, normally, if there are no irregularities on the surface of the workpiece W, the main scanning line L is formed with 50% each of a region without reflected light and a region with reflected light.

ところが、実際にワークWが搬送される過程で、例えばその表面にある凹欠陥(図中参照符号C)が主走査線L上に位置した場合、本来であればワークWの表面で反射されていた光(50%分)に変化が生じることになる。具体的には、図9に示される位置では凹欠陥Cの底に光が照射されるため、その深さDの分だけ反射面の位置に段差が生じることが分かる。このような段差は、ラインセンサ18の主走査線Lに対して初期暗領域Sの位置を副走査方向(図中白抜き矢印方向)にシフトさせ、それだけ暗領域を全体的に副走査方向へ拡大する。   However, in the process of actually transporting the workpiece W, for example, when a concave defect (reference symbol C in the figure) on the surface thereof is positioned on the main scanning line L, it is normally reflected on the surface of the workpiece W. A change occurs in the light (50%). Specifically, it can be seen that, at the position shown in FIG. 9, the bottom of the concave defect C is irradiated with light, so that a step is generated at the position of the reflecting surface by the depth D. Such a step shifts the position of the initial dark region S with respect to the main scanning line L of the line sensor 18 in the sub-scanning direction (in the direction of the white arrow in the figure), and the dark region as a whole in the sub-scanning direction. Expanding.

この結果、ラインセンサ18の全受光領域内では、反射光がある領域に比較して反射光がない領域の方が大きくなり、その分、撮像される画像の濃度値が低下することになる。したがって上記の欠陥検出部36では、1ライン中で画像の濃度値が低下している箇所を凹欠陥として判断することができる。   As a result, in the entire light receiving region of the line sensor 18, the region where there is no reflected light is larger than the region where the reflected light is present, and the density value of the image to be captured is correspondingly reduced. Therefore, the defect detection unit 36 can determine a portion where the density value of the image is reduced in one line as a concave defect.

〔凸欠陥の場合〕
図10は、凸欠陥に関する高さの算出原理を示す概念図である。図9との対比からも明らかなように、凸欠陥(図中符号P)については、反射光がない領域よりも反射光がある領域の方が小さくなり、その分、撮像される画像の濃度値が高くなることから、1ライン中の画像の濃度値が高くなっている箇所を凸欠陥として判断することができる。
[For convex defects]
FIG. 10 is a conceptual diagram showing the calculation principle of the height related to the convex defect. As is clear from the comparison with FIG. 9, for the convex defect (symbol P in the figure), the region with the reflected light is smaller than the region without the reflected light, and the density of the image to be captured is correspondingly reduced. Since the value becomes high, a portion where the density value of the image in one line is high can be determined as a convex defect.

本発明の発明者は、上記のように凹凸欠陥の存在によって画像の濃度値が変化する点に着目し、以下の手法により凹欠陥の深さ又は凸欠陥の高さを算出する方法を見出した。   The inventor of the present invention pays attention to the fact that the density value of the image changes due to the presence of the concavo-convex defect as described above, and found a method for calculating the depth of the concave defect or the height of the convex defect by the following method. .

演算に用いる各種変数を以下に示す。
(1)光源入射角:α
(2)反射角(ラインセンサ18への入射角)α
(3)凹欠陥の深さ:D
凸欠陥の高さ:H
(4)スリット50を用いない場合(光源領域内の反射光を全てラインセンサ18で受光する場合)の画像の濃度値:Imax
(5)ラインセンサ18の副走査方向での全受光範囲長:X
(6)スリット50による初期暗領域長さ:S
Various variables used in the calculation are shown below.
(1) Light source incident angle: α
(2) Reflection angle (incident angle to the line sensor 18) α
(3) Concave defect depth: D
Convex defect height: H
(4) Image density value when the slit 50 is not used (when all the reflected light in the light source region is received by the line sensor 18): Imax
(5) Total light receiving range length in the sub-scanning direction of the line sensor 18: X
(6) Initial dark region length by slit 50: S

先ず、欠陥のないワークWの表面を撮像したときの濃度値Iaは以下の式(A)で表される。
Ia=(1−S/X)・Imax ・・・(A)
上式(A)より、ワークWの表面に欠陥がなく、初期暗領域長さSが全受光範囲長Xの50%である場合、濃度値IaはImaxの50%になることが理解される。
First, the density value Ia when the surface of the workpiece W having no defect is imaged is expressed by the following formula (A).
Ia = (1-S / X) · Imax (A)
From the above formula (A), it is understood that when there is no defect on the surface of the workpiece W and the initial dark region length S is 50% of the total light receiving range length X, the density value Ia is 50% of Imax. .

また、深さDを有する凹欠陥を撮像したときの濃度値Ibは以下の式(B1)で表される。
Ib=(1−(2D・tanα+S)/X)・Imax ・・・(B1)
Further, the density value Ib when imaging the concave defect having the depth D is expressed by the following formula (B1).
Ib = (1− (2D · tan α + S) / X) · Imax (B1)

上式(A),(B1)より、凹欠陥の深さDは、以下の式(C1)を用いて算出することができる。
D=(1−Ia/Ib)・(X−S)・(1/2tanα) ・・・(C1)
From the above equations (A) and (B1), the depth D of the concave defect can be calculated using the following equation (C1).
D = (1-Ia / Ib). (X-S). (1/2 tan.alpha.) (C1)

一方、高さHを有する凸欠陥を撮像したときの濃度値Ibは以下の式(B2)で表される。
Ib=(1−(S−2H・tanα)/X)・Imax ・・・(B2)
On the other hand, the density value Ib when a convex defect having a height H is imaged is expressed by the following equation (B2).
Ib = (1− (S−2H · tan α) / X) · Imax (B2)

上式(A),(B2)より、凸欠陥の高さHは、以下の式(C2)を用いて算出することができる。
H=−(1−Ib/Ia)・(X−S)・(1/2tanα) ・・・(C2)
From the above formulas (A) and (B2), the height H of the convex defect can be calculated using the following formula (C2).
H =-(1-Ib / Ia). (X-S). (1/2 tan.alpha.) (C2)

以上のように、本実施形態に適用した欠陥検出方法では、凹欠陥又は凸欠陥が主走査線L上を通過する過程で、ラインセンサ18による暗視野中での陰影部分に歪が生じることを利用し、ワークWの表面に存在する凹凸欠陥を検出するとともに、その深さ又は高さを容易に算出することができる。   As described above, in the defect detection method applied to the present embodiment, distortion occurs in the shadow portion in the dark field by the line sensor 18 in the process in which the concave defect or the convex defect passes on the main scanning line L. By utilizing this, it is possible to detect the uneven defect present on the surface of the workpiece W and to easily calculate the depth or height thereof.

また、照明器具22を用いた一種類の照明方法で凹欠陥と凸欠陥の両方を同時に検出することができるため、ワークWの表面に凹欠陥と凸欠陥とが混在していたとしても、これらを同時に検出し、かつ両者を明確に区別して認識することができる。   Moreover, since both a concave defect and a convex defect can be detected simultaneously by one type of illumination method using the lighting fixture 22, even if the concave defect and the convex defect are mixed on the surface of the workpiece W, these Can be detected simultaneously, and the two can be clearly distinguished and recognized.

〔その他の実施形態〕
本発明は、上述した一実施形態に制約されることなく、種々に変形して実施可能である。一実施形態ではワークWを副走査方向に搬送して撮像しているが、ワークWを固定しておき、逆に主走査線LをワークWに対して副走査方向に移動させながら撮像してもよい。
[Other Embodiments]
The present invention can be implemented with various modifications without being limited to the above-described embodiment. In one embodiment, the workpiece W is conveyed and imaged in the sub-scanning direction. However, the workpiece W is fixed, and on the contrary, the main scanning line L is imaged while moving in the sub-scanning direction with respect to the workpiece W. Also good.

また一実施形態ではグレースケールの画像データを扱っているが、画像データをカラーとして処理してもよい。   In one embodiment, grayscale image data is handled, but the image data may be processed as color.

その他、一実施形態で挙げた各種機器の配置はいずれも好ましい例示であり、本発明の実施に際して機器の配置を適宜に変更可能であることはいうまでもない。   In addition, the arrangement of various devices described in the embodiment is a preferable example, and it is needless to say that the arrangement of the devices can be appropriately changed when the present invention is implemented.

欠陥検査装置の構成例を概略的に示した図である。It is the figure which showed schematically the example of a structure of the defect inspection apparatus. ラインセンサによりワークが撮像される過程を示した斜視図である。It is the perspective view which showed the process in which a workpiece | work is imaged with a line sensor. 演算処理部の構成をより詳細に示すブロック図である。It is a block diagram which shows the structure of an arithmetic processing part in detail. 欠陥検査プロセスの手順例を示したフローチャートである。It is the flowchart which showed the example of the procedure of the defect inspection process. 欠陥検査プロセスにおいて実行される欠陥検出処理の手順例を示すフローチャートである。It is a flowchart which shows the example of a procedure of the defect detection process performed in a defect inspection process. 1つの画像データを複数のブロックに分割した場合の例を示す概略図である。It is the schematic which shows the example at the time of dividing | segmenting one image data into a some block. 濃度変化量の算出手法について説明するための説明図である。It is explanatory drawing for demonstrating the calculation method of density variation. 画像データ全体のイメージと、これをブロックに分割した場合に現れる濃度差の例を簡略化して示した図である。It is the figure which simplified and showed the example of the density difference which appears when the image of the whole image data and this are divided | segmented into a block. 凹欠陥に関する深さの算出原理を示す概念図である。It is a conceptual diagram which shows the calculation principle of the depth regarding a concave defect. 凸欠陥に関する高さの算出原理を示す概念図である。It is a conceptual diagram which shows the calculation principle of the height regarding a convex defect.

符号の説明Explanation of symbols

10 欠陥検査装置
12 ベルトコンベア
14 ロータリエンコーダ
18 ラインセンサ
20 レンズ
22 照明器具
24 演算処理部
30 入力部
32 データ処理部
34 データ記憶部
36 欠陥検出部
38 出力部
40 CPU
DESCRIPTION OF SYMBOLS 10 Defect inspection apparatus 12 Belt conveyor 14 Rotary encoder 18 Line sensor 20 Lens 22 Lighting fixture 24 Arithmetic processing part 30 Input part 32 Data processing part 34 Data storage part 36 Defect detection part 38 Output part 40 CPU

Claims (6)

被検査物を撮像した画像を取得する取得工程と、
前記取得した画像を所定の配列で複数のブロックに分割する分割工程と、
前記分割した複数のブロックの中で検査対象とするべき注目ブロックを設定し、この注目ブロック内でみた画像の濃度と前記注目ブロックに隣接する周辺ブロック内でみた画像の濃度とを、前記配列内で一方向に隣接する2つの前記周辺ブロックについてそれぞれ比較する比較工程と、
前記比較した結果、前記注目ブロック内での濃度が2つの前記周辺ブロック内での濃度に対してともに低かった場合にのみ、前記注目ブロック内での濃度と前記各周辺ブロック内での濃度との間で求めた2つの変化量を合算することで前記注目ブロックの欠陥度を求める算出工程と、
前記求めた欠陥度に基づき前記注目ブロック内での欠陥の有無を判断する判断工程と
を含む欠陥検査方法。
An acquisition step of acquiring an image of the inspected object;
A dividing step of dividing the acquired image into a plurality of blocks in a predetermined arrangement;
A target block to be inspected among the plurality of divided blocks is set, and the density of the image viewed in the target block and the density of the image viewed in a peripheral block adjacent to the target block are set in the array. A comparison step of comparing each of the two neighboring blocks adjacent to each other in one direction,
As a result of the comparison, only when the density in the target block is lower than the density in the two neighboring blocks, the density in the target block and the density in each peripheral block are A calculation step for obtaining the degree of defect of the block of interest by adding together the two amounts of change obtained between,
And a determination step of determining whether or not there is a defect in the block of interest based on the obtained defect degree.
請求項1に記載の欠陥検査方法において、
前記分割した複数のブロックを順に前記注目ブロックとして設定することで、個々のブロックについて前記比較工程、前記算出工程及び前記判断工程を実行することを特徴とする欠陥検査方法。
The defect inspection method according to claim 1,
A defect inspection method characterized by executing the comparison step, the calculation step, and the determination step for each block by sequentially setting the plurality of divided blocks as the block of interest.
請求項1又は2に記載の欠陥検査方法において、
前記比較工程では、
2つの前記周辺ブロックのうち、一方の前記周辺ブロック内での濃度に対する前記注目ブロック内での濃度の差を第1の変化量とし、前記注目ブロック内での濃度に対する他方の前記周辺ブロック内での濃度の差を第2の変化量としてそれぞれ求め、
前記算出工程では、
前記第1の変化量が負の値をとり、かつ、前記第2の変化量が正の値をとる場合にのみ、前記第1の変化量と前記第2の変化量との差分を前記欠陥度とすることを特徴とする欠陥検査方法。
In the defect inspection method according to claim 1 or 2,
In the comparison step,
Of the two peripheral blocks, a difference in density in the target block with respect to density in one of the peripheral blocks is set as a first change amount, and in the other peripheral block with respect to the density in the target block. The difference in density of each is determined as the second change amount,
In the calculation step,
Only when the first change amount has a negative value and the second change amount has a positive value, the difference between the first change amount and the second change amount is determined as the defect. Defect inspection method characterized in that it is a degree.
請求項1から3のいずれかに記載の欠陥検査方法において、
前記比較工程では、
1つの前記注目ブロックについて、これと隣接する2つの前記周辺ブロックの組を前記配列内で複数方向に規定することにより各方向別で複数通りに濃度の比較を行い、
前記算出工程では、
前記比較が行われた方向ごとに前記注目ブロック内での濃度と前記各周辺ブロック内での濃度との間で求めた2つの変化量を合算し、その中で最大値となる変化量を前記注目ブロックの欠陥度とすることを特徴とする欠陥検査方法。
In the defect inspection method in any one of Claim 1 to 3,
In the comparison step,
For one target block, a set of two neighboring blocks adjacent to the target block is defined in a plurality of directions within the array to compare the density in a plurality of ways for each direction,
In the calculation step,
For each direction in which the comparison is performed, two change amounts obtained between the density in the block of interest and the density in each of the peripheral blocks are added together, and the change amount that is the maximum value among them is calculated as A defect inspection method characterized by setting a defect degree of a block of interest.
請求項1から4のいずれかに記載の欠陥検査方法において、
前記分割工程では、
検出する欠陥の種類に応じて画像を分割するブロックの形状を変化させることを特徴とする欠陥検査方法。
The defect inspection method according to any one of claims 1 to 4,
In the dividing step,
A defect inspection method characterized by changing the shape of a block into which an image is divided according to the type of defect to be detected.
被検査物を撮像して画像を生成する画像生成手段と、
前記画像生成手段により生成された画像を所定の配列で複数のブロックに分割し、その中で検査対象として設定した注目ブロック内でみた画像の濃度と前記注目ブロックに隣接する周辺ブロック内でみた画像の濃度とを、前記配列内で一方向に隣接する2つの前記周辺ブロックについてそれぞれ比較する比較手段と、
前記比較手段による比較の結果、前記注目ブロック内での濃度が2つの前記周辺ブロック内での濃度に対してともに低かった場合にのみ、前記注目ブロック内での濃度と前記各周辺ブロック内での濃度との間で求めた2つの変化量を合算することで前記注目ブロックの欠陥度を求める算出手段と、
前記算出手段により求めた欠陥度に基づき前記注目ブロック内での欠陥の有無を判断する判断手段と
を備えた欠陥検査装置。
Image generating means for capturing an image of the inspection object and generating an image;
The image generated by the image generation unit is divided into a plurality of blocks in a predetermined arrangement, and the image density viewed in the target block set as the inspection target and the image viewed in the peripheral block adjacent to the target block A comparison means for comparing each of the peripheral blocks adjacent to each other in one direction in the array,
As a result of comparison by the comparison means, only when the density in the target block is lower than the density in the two peripheral blocks, the density in the target block and A calculating means for calculating the degree of defect of the block of interest by adding together the two amounts of change calculated with respect to the density;
A defect inspection apparatus comprising: a determination unit that determines the presence / absence of a defect in the target block based on the defect degree obtained by the calculation unit.
JP2008241290A 2008-09-19 2008-09-19 Defect inspecting method and defect inspecting device Pending JP2010071875A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008241290A JP2010071875A (en) 2008-09-19 2008-09-19 Defect inspecting method and defect inspecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008241290A JP2010071875A (en) 2008-09-19 2008-09-19 Defect inspecting method and defect inspecting device

Publications (1)

Publication Number Publication Date
JP2010071875A true JP2010071875A (en) 2010-04-02

Family

ID=42203793

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008241290A Pending JP2010071875A (en) 2008-09-19 2008-09-19 Defect inspecting method and defect inspecting device

Country Status (1)

Country Link
JP (1) JP2010071875A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012107937A (en) * 2010-11-16 2012-06-07 Toyo Kohan Co Ltd Inspection method and apparatus for plate

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012107937A (en) * 2010-11-16 2012-06-07 Toyo Kohan Co Ltd Inspection method and apparatus for plate

Similar Documents

Publication Publication Date Title
CN101464418B (en) Flaw detection method and apparatus
JP2004109047A (en) Inspection method and inspection device of printed matter
JPH04220551A (en) Method and apparatus for inspecting flaw of transparent body
JP2005283577A (en) Inspection system and method for providing feedback
JP2006303491A (en) Method of inspecting wafer
JP2008025990A (en) Method and apparatus for detecting surface flaw of steel strip
JP4230880B2 (en) Defect inspection method
CN112666175B (en) Foreign matter inspection device and foreign matter inspection method
JP6628185B2 (en) Inspection method for transparent objects
JP2002310937A (en) Method and apparatus for inspection of defect
JP2009097959A (en) Defect detecting device and defect detection method
JP2005265467A (en) Defect detection device
JP2010071875A (en) Defect inspecting method and defect inspecting device
JP2005083906A (en) Defect detector
US6335982B1 (en) Method and apparatus for inspecting streak
JP2010071876A (en) Defect inspecting method and defect inspecting device
JP4364773B2 (en) Inspection method of printed matter
JP4613090B2 (en) Inspection device
JP3015325B2 (en) Streak inspection method and device
JP2009288015A (en) Defect inspection device and defect inspection method
JP2010044010A (en) Method for detecting defect of mesh- or wire-embedded glass
JP2006155579A (en) Image processing method and image processing apparatus
JP2006189294A (en) Inspection method and device of irregular defect
JP4792314B2 (en) Substrate inspection apparatus and substrate inspection method
JP5328196B2 (en) X-ray inspection system