JP2006266780A - Flaw inspection device and flaw inspection method - Google Patents

Flaw inspection device and flaw inspection method Download PDF

Info

Publication number
JP2006266780A
JP2006266780A JP2005083246A JP2005083246A JP2006266780A JP 2006266780 A JP2006266780 A JP 2006266780A JP 2005083246 A JP2005083246 A JP 2005083246A JP 2005083246 A JP2005083246 A JP 2005083246A JP 2006266780 A JP2006266780 A JP 2006266780A
Authority
JP
Japan
Prior art keywords
image
value
pixel
luminance
threshold value
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.)
Withdrawn
Application number
JP2005083246A
Other languages
Japanese (ja)
Inventor
Katsu Hattori
克 服部
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.)
Aisin Corp
Original Assignee
Aisin Seiki 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 Aisin Seiki Co Ltd filed Critical Aisin Seiki Co Ltd
Priority to JP2005083246A priority Critical patent/JP2006266780A/en
Publication of JP2006266780A publication Critical patent/JP2006266780A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To accurately judge a flaw even in a restricted tact time. <P>SOLUTION: This flaw inspection device is constituted so that the surface of a test piece is photographed to acquire an original image (step A1), the average value of the brightness values of a noticiable pixel and its peripheral pixel is calculated on the basis of the original image and a filtered image wherein the calculated average value is replaced with the brightness value of the noticiable pixel is formed (step A2), the corresponding brightness value of the pixel of the filtered image is subtracted from the brightness value of the pixel of the original image to form a differential image (step A3), in a case that the brightness value of the pixel of the differential image is higher than a threshold value, the brightness value of the pixel is replaced with 1 and, when the brightness value of the pixel of the differential image is not higher than the threshold value, the brightness value of the pixel is replaced with zero to form a binary image (step A4) and the presence of a flaw is judged with respect to the binary image (steps A5, A6). <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、鋳物の切削加工面の欠陥を検出する欠陥検査装置および方法に関し、特に、欠陥検査装置および方法に関する。   The present invention relates to a defect inspection apparatus and method for detecting defects on a cut surface of a casting, and more particularly to a defect inspection apparatus and method.

自動車部品のようなアルミ鋳物の切削加工面に表れる欠陥として、鋳造上どこに表れるかわからない鋳巣や、切削加工機において洗浄で取りきれなかった切粉がチャックに付着したままワークをつかむことによって発生する圧痕や、ワークの剛性バラツキによって発生するビビリなどがある。これらの欠陥が切削加工面に存在すると、シール性が低下し、製品機能を満足しなくなる。そこで、製品機能を満足する鋳物を選別するために、鋳物の切削加工面の欠陥検査を行っており、現状、検査員が目視で全数チェックしている。   Defects appearing on the machined surface of aluminum castings such as automobile parts are caused by grabbing the work piece while it is stuck to the chuck with indentations that do not know where they appear on the casting, or chips that cannot be removed by washing in the cutting machine. Indentation that occurs, and chatter that occurs due to variations in the rigidity of the workpiece. If these defects exist on the machined surface, the sealing performance is lowered and the product function is not satisfied. Therefore, in order to select castings that satisfy the product function, defects are inspected on the cut surfaces of the castings. Currently, all inspectors visually check the castings.

目視による欠陥検査では、個人差や作業による疲労度によって検査精度が大きく変動してしまう。また、近年、形状が大きい鋳物や、切削加工面が多面に及ぶ鋳物が増え、検査に費やされる経費が多く製造コストを上昇させる要因となっている。そのため、欠陥検査の自動化が望まれている。   In visual defect inspection, the inspection accuracy varies greatly depending on individual differences and the degree of fatigue due to work. In recent years, castings having a large shape and castings having a large number of cutting surfaces have been increased, which causes a large amount of expenses for inspection and increases manufacturing costs. Therefore, automation of defect inspection is desired.

欠陥検査の自動化する技術として、カメラと照明を用いた欠陥検査装置がある。このような欠陥検査装置では、様々なバラツキ要因で加工痕が発生した場合の対策として、2次元フーリエ変換により加工痕の周波数成分を特定し、その周波数成分を除去することにより加工痕を除去する方法(特許文献1)、統計処理により計測データのバラツキを吸収する方法(特許文献2、3)が提案されている。   As a technique for automating defect inspection, there is a defect inspection apparatus using a camera and illumination. In such a defect inspection apparatus, as a countermeasure when a machining trace is generated due to various variation factors, the frequency component of the machining trace is specified by two-dimensional Fourier transform, and the machining trace is removed by removing the frequency component. Methods (Patent Document 1) and methods (Patent Documents 2 and 3) that absorb variations in measurement data by statistical processing have been proposed.

特開平10−103938号公報Japanese Patent Laid-Open No. 10-103938 特開2004−170374号公報JP 2004-170374 A 特開2004−264054号公報JP 2004-264054 A

しかしながら、特許文献1に記載の発明では、2次元フーリエ変換により加工痕の周波数成分を除去しているため、キズが、機器の劣化や、外乱による輝度変化により、加工痕の周波数成分を持った状態で発生した場合には、加工痕と同様に除去される可能性がある。また、フーリエ変換を用いると演算量が非常に多くなるため、限られたタクトタイムでの処理には向いていない。   However, in the invention described in Patent Document 1, since the frequency component of the machining trace is removed by two-dimensional Fourier transform, the scratch has the frequency component of the machining trace due to the deterioration of the device or the luminance change due to disturbance. If it occurs in a state, it may be removed in the same manner as the processing trace. In addition, when Fourier transform is used, the amount of calculation becomes very large, so that it is not suitable for processing with a limited tact time.

また、特許文献2、3に記載の発明では、良品のワークを複数撮像し、集められた画像の平均、標準偏差、あるいは、分散を用いて基準となる良品の画像を算出し、基準画像を作成し、この基準画像と撮像した画像を比較し、不良品の判定を行っているため、中間付近でのバラツキには対応できるものの、極端な照明の劣化、刃具交換時などに発生した加工痕がある状態での画像では、良品を不良品と誤判定する。例えば、照明としてLED素子を用いる場合、LED素子の輝度を飽和状態にし、加工痕の影響を限りなく小さくすることで、安定した判定性能を確保することができるが、LED素子が劣化し輝度が低下した場合には、加工痕が発生し、良品を不良品として誤判定する可能性がある。また、刃具を交換した場合には、刃先形状により初期は加工痕が発生しやすい状態になるため、LED素子が飽和状態の輝度を利用しても加工痕が発生し、同様に良品を不良品として誤判定する可能性がある。また、特許文献2、3に記載の発明では、N数用意した画像データに対して統計的処理を行い、2値化処理のしきい値を決定し、決定されたしきい値によってキズの特定を行っているため、加工痕の発生が多い画像では、キズが発生していないワークにおいてもキズ有と誤判定する。さらに、特許文献2、3に記載の発明では、基準画像を作成するために、多数の供試品を用意する必要があり、その供試品の選定の良否が性能に大きく左右する。   Further, in the inventions described in Patent Documents 2 and 3, a plurality of non-defective workpieces are imaged, and a non-defective non-defective image is calculated using the average, standard deviation, or variance of the collected images, Since the created image is compared with the captured image and the defective product is judged, variations in the vicinity of the middle can be dealt with. In an image in a state where there is, a non-defective product is erroneously determined as a defective product. For example, when an LED element is used as illumination, stable determination performance can be ensured by making the brightness of the LED element saturated and reducing the influence of processing traces as much as possible. When it falls, a processing trace will generate | occur | produce and a non-defective product may be misjudged as a defective product. In addition, when the cutting tool is replaced, processing traces are likely to occur at the initial stage due to the shape of the cutting edge. Therefore, processing traces are generated even when the LED element uses a saturated luminance, and the non-defective product is similarly defective. May be misjudged. Further, in the inventions described in Patent Documents 2 and 3, statistical processing is performed on the N pieces of image data prepared, a threshold value for binarization processing is determined, and scratches are identified based on the determined threshold value. Therefore, in an image having a lot of processing marks, it is erroneously determined that there is a scratch even in a workpiece that does not have a scratch. Furthermore, in the inventions described in Patent Documents 2 and 3, it is necessary to prepare a large number of specimens in order to create a reference image, and the quality of selection of the specimens greatly affects the performance.

本発明の課題は、限られたタクトタイムにおいても正確に判定できるようにすることである。   An object of the present invention is to enable accurate determination even in a limited tact time.

発明者の見解によれば、使用する機器の劣化や、外乱による輝度変化にも対応できるようにするためには、ロバストな性能や、生産性向上のための高速演算可能なアルゴリズムが必要となる。また、照明のバラツキや、刃具交換など極端に計測環境が変化した場合でも正確に判定できるようにするためには、環境が変化した状態に合ったしきい値を用いる手法が必要である。以上のような見解から、以下のような発明がなされた。   According to the inventor's view, robust performance and algorithms capable of high-speed computation are required to improve productivity in order to be able to cope with deterioration of equipment used and changes in luminance due to disturbance. . In addition, in order to be able to make an accurate determination even when the measurement environment changes extremely, such as variations in illumination or replacement of blades, a method using a threshold value that matches the state in which the environment has changed is necessary. From the above view, the following invention was made.

本発明の第1の視点においては、供試体の表面欠陥を検査するための欠陥検査装置であって、前記供試体の表面を撮像して原画像を取得するカメラと、前記原画像からノイズを除去したフィルタ処理画像を作成するフィルタ処理部と、前記原画像の画素又は前記フィルタ処理画像の画素の情報に基づいて、しきい値を決定するしきい値決定部と、前記フィルタ処理画像の画素の輝度値がしきい値以上である場合に当該画素の輝度値を1に入れ替えるとともに、前記フィルタ処理画像の画素の輝度値がしきい値以上でない場合に当該画素の輝度値を0に入れ替えた2値化処理画像を作成する2値化処理部と、前記2値化処理画像に対して欠陥の有無を判定する判定処理部と、を備えることを特徴とする。   According to a first aspect of the present invention, there is provided a defect inspection apparatus for inspecting a surface defect of a specimen, a camera that images the surface of the specimen and acquires an original image, and noise from the original image. A filter processing unit that creates a removed filtered image, a threshold value determining unit that determines a threshold value based on pixel information of the original image or pixels of the filtered image, and pixels of the filtered image When the luminance value of the pixel is greater than or equal to the threshold, the luminance value of the pixel is replaced with 1, and when the luminance value of the pixel of the filtered image is not equal to or greater than the threshold, the luminance value of the pixel is replaced with 0 The image processing apparatus includes: a binarization processing unit that creates a binarization processed image; and a determination processing unit that determines the presence / absence of a defect in the binarization processed image.

本発明の前記欠陥検査装置において、前記原画像の画素の輝度値から対応する前記フィルタ処理画像の画素の輝度値を減算した差分処理画像を作成する差分処理部を備え、前記2値化処理部は、前記差分処理画像の画素の輝度値がしきい値以上の場合に当該画素の輝度値を1に入れ替えるとともに、前記差分処理画像の画素の輝度値がしきい値以上でない場合に当該画素の輝度値を0に入れ替えた2値化処理画像を作成することが好ましい。   In the defect inspection apparatus according to the present invention, the binarization processing unit includes a difference processing unit that creates a difference processed image by subtracting a luminance value of a pixel of the corresponding filtered image from a luminance value of the pixel of the original image. Replaces the luminance value of the pixel of the difference-processed image with 1 when the luminance value of the pixel of the difference-processed image is equal to or greater than the threshold value, and It is preferable to create a binarized image in which the luminance value is replaced with 0.

本発明の前記欠陥検査装置において、前記しきい値決定部は、前記原画像の画素又は前記フィルタ処理画像の画素の輝度値から平均値を算出し、前記しきい値を決定してもよい。   In the defect inspection apparatus of the present invention, the threshold value determination unit may calculate an average value from luminance values of pixels of the original image or pixels of the filtered image and determine the threshold value.

本発明の前記欠陥検査装置において、前記しきい値決定部は、前記原画像の画素又は前記フィルタ処理画像の画素の輝度値から分散値を演算し、前記しきい値を決定してもよい。   In the defect inspection apparatus of the present invention, the threshold value determination unit may determine a threshold value by calculating a variance value from luminance values of pixels of the original image or pixels of the filtered image.

本発明の前記欠陥検査装置において、前記フィルタ処理部は、前記原画像に基づいて注目画素とその周辺画素の輝度値の平均値を算出し、算出した平均値と前記注目画素の輝度値とを入れ替えたフィルタ処理画像を作成してもよい。   In the defect inspection apparatus of the present invention, the filter processing unit calculates an average value of luminance values of the target pixel and its surrounding pixels based on the original image, and calculates the calculated average value and the luminance value of the target pixel. An exchanged filtered image may be created.

本発明の前記欠陥検査装置において、前記フィルタ処理部は、前記原画像に基づいて注目画素とその周辺画素の輝度値の最大値を抽出し、抽出した最大値と前記注目画素の輝度値とを入れ替えたフィルタ処理画像を作成してもよい。   In the defect inspection apparatus of the present invention, the filter processing unit extracts the maximum value of the luminance value of the target pixel and its surrounding pixels based on the original image, and calculates the extracted maximum value and the luminance value of the target pixel. An exchanged filtered image may be created.

本発明の前記欠陥検査装置において、前記供試体の表面を照明する照明手段を備え、前記しきい値決定部は、前記照明手段の経年劣化に基づいて前記しきい値を決定することが好ましい。   In the defect inspection apparatus of the present invention, it is preferable that the defect inspection apparatus further includes an illumination unit that illuminates the surface of the specimen, and the threshold value determination unit determines the threshold value based on aged deterioration of the illumination unit.

本発明の第2の視点においては、供試体の表面欠陥を検査するための欠陥検査方法であって、前記供試体の表面を撮像して原画像を取得するステップと、前記原画像からノイズを除去したフィルタ処理画像を作成するステップと、前記原画像の画素又は前記フィルタ処理画像の画素の情報に基づいて、しきい値を決定するステップと、前記フィルタ処理画像の画素の輝度値がしきい値以上である場合に当該画素の輝度値を1に入れ替えるとともに、前記フィルタ処理画像の画素の輝度値がしきい値以上でない場合に当該画素の輝度値を0に入れ替えた2値化処理画像を作成するステップと、前記2値化処理画像に対して欠陥の有無を判定するステップと、を含むことを特徴とする。   In a second aspect of the present invention, there is provided a defect inspection method for inspecting a surface defect of a specimen, the step of obtaining an original image by imaging the surface of the specimen, and noise from the original image. Creating a filtered filtered image; determining a threshold based on pixel information of the original image or pixel of the filtered image; and a luminance value of the pixel of the filtered image. When the luminance value of the pixel is not less than a threshold when the luminance value of the pixel of the filtered image is not equal to or greater than a threshold value, And creating and determining whether or not there is a defect in the binarized image.

本発明(請求項1−8)によれば、2次元フーリエ変換などのような複雑な処理を行わないので、限られたタクトタイムにおいても正確に良品、不良品を判定できる。また、多数の供試品を用意して基準画像を作成する必要がない。   According to the present invention (claims 1-8), since a complicated process such as a two-dimensional Fourier transform is not performed, a non-defective product and a defective product can be accurately determined even in a limited tact time. In addition, it is not necessary to prepare a large number of specimens and create a reference image.

本発明(請求項3−7)によれば、照明の劣化、刃具交換などを行った場合でも、撮像画面の統計的手法でしきい値を調整し、安定した判定性能を得る。   According to the present invention (Claim 3-7), even when the illumination is deteriorated, the blade is replaced, etc., the threshold value is adjusted by the statistical method of the imaging screen to obtain stable determination performance.

(実施形態1)
本発明の実施形態1に係る欠陥検査装置について図面を用いて説明する。図1は、本発明の実施形態1に係る欠陥検査装置の構成を模式的に示したブロック図である。
(Embodiment 1)
A defect inspection apparatus according to Embodiment 1 of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram schematically showing a configuration of a defect inspection apparatus according to Embodiment 1 of the present invention.

欠陥検査装置1は、鋳物の切削加工面の欠陥(鋳巣)を検出する装置である。欠陥検査装置1は、ターンテーブル11と、モータ12と、エンコーダ13と、カメラ14と、照明15と、画像処理部16と、表示部17と、有する。   The defect inspection apparatus 1 is an apparatus that detects a defect (cast hole) on a cut surface of a casting. The defect inspection apparatus 1 includes a turntable 11, a motor 12, an encoder 13, a camera 14, an illumination 15, an image processing unit 16, and a display unit 17.

ターンテーブル11は、鋳物である供試体2を載置するための回動可能な台である。モータ12は、ターンテーブル11を回転駆動させる。エンコーダ13は、モータ12の回転角を計測する部分である。カメラ14は、照明15によって照らされた供試体2の表面画像を撮像する部分であり、例えば、CCDカメラを用いることができる。照明15は、供試体2の表面を照らす部分であり、例えば、LED素子を用いることができる。照明15の輝度は、飽和状態(高輝度)である。画像処理部16は、カメラ14で撮像された画像に基づいて欠陥検査処理を行う。画像処理部16は、エンコーダ13からのモータ12の回転角に基づいてカメラ14により撮像された画像が、供試体2の表面のどの位置であるかを認識する。表示部17は、ユーザの指示に応じて、撮像された画像、欠陥検査処理後の画像などを表示する。画像処理部16及び表示部17には、一般的に用いられているコンピュータを用いればよい。   The turntable 11 is a turnable table for placing the specimen 2 that is a casting. The motor 12 drives the turntable 11 to rotate. The encoder 13 is a part that measures the rotation angle of the motor 12. The camera 14 is a part that captures a surface image of the specimen 2 illuminated by the illumination 15, and a CCD camera, for example, can be used. The illumination 15 is a part that illuminates the surface of the specimen 2, and for example, an LED element can be used. The brightness of the illumination 15 is in a saturated state (high brightness). The image processing unit 16 performs defect inspection processing based on the image captured by the camera 14. The image processing unit 16 recognizes the position on the surface of the specimen 2 where the image captured by the camera 14 is based on the rotation angle of the motor 12 from the encoder 13. The display unit 17 displays a captured image, an image after the defect inspection process, and the like according to a user instruction. A generally used computer may be used for the image processing unit 16 and the display unit 17.

次に、実施形態1に係る欠陥検査装置の画像処理部の処理動作について説明する。図2は、本発明の実施形態1に係る欠陥検査装置の画像処理部の処理動作を模式的に示したフローチャートである。図3は、本発明の実施形態1に係る欠陥検査装置の画像処理部の2値化処理を模式的に示したフローチャートである。図4は、本発明の実施形態1に係る欠陥検査装置によって得られる画像(照明の輝度15のときの画像)であり、(a)は原画像、(b)はフィルタ処理画像、(c)は差分処理画像、(d)は2値化処理画像である。   Next, the processing operation of the image processing unit of the defect inspection apparatus according to the first embodiment will be described. FIG. 2 is a flowchart schematically showing the processing operation of the image processing unit of the defect inspection apparatus according to the first embodiment of the present invention. FIG. 3 is a flowchart schematically showing the binarization process of the image processing unit of the defect inspection apparatus according to the first embodiment of the present invention. 4A and 4B are images (images when the illumination brightness is 15) obtained by the defect inspection apparatus according to Embodiment 1 of the present invention, where FIG. 4A is an original image, FIG. 4B is a filtered image, and FIG. Is a difference processed image, and (d) is a binarized image.

図2および図3に示される各処理は、画像処理部16内でプログラムにより実行される処理である。よって、各処理を機能ブロックで表現すれば、原画像取得処理部、フィルタ処理部、差分処理部、2値化処理部、特徴量演算処理部、判定処理部を備えていることと等価である。   Each process shown in FIG. 2 and FIG. 3 is a process executed by a program in the image processing unit 16. Therefore, if each process is expressed by a functional block, it is equivalent to including an original image acquisition processing unit, a filter processing unit, a difference processing unit, a binarization processing unit, a feature amount calculation processing unit, and a determination processing unit. .

まず、カメラ14により高輝度時(照明15が飽和状態)の供試体2の原画像を撮像し、画像処理部16は、撮像した原画像(図4(a)参照)を取得する(ステップA1)。   First, the camera 14 captures an original image of the specimen 2 at high brightness (the illumination 15 is saturated), and the image processing unit 16 acquires the captured original image (see FIG. 4A) (step A1). ).

次に、フィルタ処理部として機能する画像処理部16は、原画像に対して、欠陥(鋳巣
)以外の加工痕、キズを消去するためにフィルタ処理を行い、フィルタ処理画像(基準画像;図4(b)参照)を作成する(ステップA2)。ここで、フィルタ処理では、注目画素とその周辺画素(n*n)の輝度値の平均値を算出し、算出した平均値と注目画素の輝度値とを入れ替える。なお、フィルタ処理では、平均値を用いる代わりに、注目画素とその周辺画素(n*n)の輝度値のうち最大値を抽出し、抽出した最大値と注目画素の輝度値とを入れ替えるようにしてもよい。
Next, the image processing unit 16 functioning as a filter processing unit performs a filter process on the original image in order to remove processing marks and scratches other than defects (ingots), and provides a filtered image (reference image; FIG. 4 (b)) is created (step A2). Here, in the filtering process, an average value of the luminance values of the target pixel and its peripheral pixels (n * n) is calculated, and the calculated average value and the luminance value of the target pixel are switched. In the filtering process, instead of using the average value, the maximum value is extracted from the luminance values of the target pixel and its surrounding pixels (n * n), and the extracted maximum value and the luminance value of the target pixel are switched. May be.

次に、差分処理部として機能する画像処理部16は、原画像およびフィルタ処理画像に基づいて差分処理を行い、差分処理画像(図4(c)参照)を作成する(ステップA3)。ここで、差分処理は、原画像からフィルタ処理画像を減算(原画像の画素の輝度値から対応するフィルタ処理画像の画素の輝度値を減算)する処理である。原画像にキズがあった場合は、キズの部分が差分処理画像に差分として現れる。   Next, the image processing unit 16 functioning as a difference processing unit performs difference processing based on the original image and the filtered image, and creates a difference processed image (see FIG. 4C) (step A3). Here, the difference process is a process of subtracting the filtered image from the original image (subtracting the luminance value of the pixel of the corresponding filtered image from the luminance value of the pixel of the original image). If the original image has a scratch, the scratch portion appears as a difference in the difference processed image.

次に、2値化処理部として機能する画像処理部16は、差分処理画像について画素ごとに2値化処理を行い、2値化処理画像(図4(d)参照)を作成する(ステップA4)。ここで、2値化処理では、画像処理部16は、差分処理画像から処理対象となる画素の輝度値(data(x,y))を抽出し(ステップB1)、画素の輝度値としきい値(固定値)とを比較することによって画素の輝度値がしきい値以上か否かを判定し(ステップB2)、画素の輝度値がしきい値以上の場合(ステップB2のYES;キズありの部分)は画素の輝度値を1(白)とし(ステップB3)、画素の輝度値がしきい値以上でない場合(ステップB2のNO;キズなしの部分)は画素の輝度値を0(黒)とし(ステップB4)、差分処理画像の全ての画素について2値化処理を行ったか否か確認し(ステップB5)、全ての画素について2値化処理を行っていない場合(ステップB5のNO)にはステップB1に戻って次の画素について処理を行い、全ての画素について2値化処理を行った場合(ステップB5のYES)にはステップA5に進む。   Next, the image processing unit 16 functioning as a binarization processing unit performs binarization processing for each pixel on the difference processed image, and creates a binarized image (see FIG. 4D) (step A4). ). Here, in the binarization process, the image processing unit 16 extracts the luminance value (data (x, y)) of the pixel to be processed from the difference processed image (step B1), and the pixel luminance value and the threshold value. (Fixed value) is compared to determine whether the luminance value of the pixel is equal to or greater than a threshold value (step B2). If the luminance value of the pixel is equal to or greater than the threshold value (YES in step B2; In (part), the luminance value of the pixel is set to 1 (white) (step B3), and when the luminance value of the pixel is not equal to or higher than the threshold value (NO in step B2; a portion without scratches), the luminance value of the pixel is set to 0 (black) (Step B4), it is confirmed whether or not the binarization processing has been performed for all the pixels of the difference processed image (step B5), and when the binarization processing has not been performed for all the pixels (NO in step B5). Returns to step B1 to process the next pixel There, the process proceeds to step A5 when performing binarization processing for all the pixels (YES in step B5).

次に、画像処理部16は、2値化処理画像から各キズありの部分の長さ、面積などの特徴量を演算する(ステップA5)。   Next, the image processing unit 16 calculates feature quantities such as the length and area of each scratched portion from the binarized image (step A5).

最後に、画像処理部16は、特徴量としきい値(固定値)を比較することにより、欠陥の有無を判定する(ステップA6)。判定では、特徴量がしきい値以上の場合には欠陥ありとして不良品とし、特徴量がしきい値以上でない場合には欠陥なしとして良品とする。図4(d)の2値化処理画像では、特徴量がしきい値以上の欠陥が3個存在し、不良品と判定されることになる。   Finally, the image processing unit 16 determines the presence or absence of a defect by comparing the feature amount with a threshold value (fixed value) (step A6). In the determination, if the feature amount is equal to or greater than the threshold value, the product is defective as a defect, and if the feature value is not equal to or greater than the threshold value, the product is determined to be non-defective. In the binarized image of FIG. 4 (d), there are three defects whose feature amount is equal to or greater than the threshold value, and it is determined as a defective product.

実施形態1によれば、2次元フーリエ変換などのような複雑な処理を行わないので、限られたタクトタイムにおいても正確に良品、不良品を判定できる。   According to the first embodiment, since a complicated process such as a two-dimensional Fourier transform is not performed, it is possible to accurately determine a non-defective product and a defective product even in a limited tact time.

(実施形態2)
次に、本発明の実施形態2に係る欠陥検査装置について図面を用いて説明する。図5は、本発明の実施形態2に係る欠陥検査装置の画像処理部において用いられるマップ(分散値−しきい値)を模式的に示したグラフである。なお、実施形態2に係る欠陥検査装置の構成については、図1を参照されたい。
(Embodiment 2)
Next, a defect inspection apparatus according to Embodiment 2 of the present invention will be described with reference to the drawings. FIG. 5 is a graph schematically showing a map (dispersion value-threshold value) used in the image processing unit of the defect inspection apparatus according to the second embodiment of the present invention. For the configuration of the defect inspection apparatus according to the second embodiment, refer to FIG.

実施形態2に係る欠陥検査装置は、実施形態1に係る欠陥検査装置の画像処理部16において分散値演算処理及びしきい値補正処理を追加したものである。なお、画像処理部16以外の構成は、実施形態1と同様である。   In the defect inspection apparatus according to the second embodiment, a dispersion value calculation process and a threshold correction process are added to the image processing unit 16 of the defect inspection apparatus according to the first embodiment. The configuration other than the image processing unit 16 is the same as that of the first embodiment.

画像処理部16は、分散値演算処理において、カメラ14で撮像された供試体2の原画像に基づいて各画素の輝度値の合計値、平均値、又は分散値を演算する。ここで、合計値は、原画像の各画素の輝度値を合計した値である。また、平均値は、合計値を原画像の切削面加工面の画素数で割った値である。さらに、分散値は、下記の演算式(数1)によって演算された値である。   The image processing unit 16 calculates the total value, average value, or variance value of the luminance values of each pixel based on the original image of the specimen 2 captured by the camera 14 in the variance value calculation process. Here, the total value is a value obtained by summing the luminance values of the respective pixels of the original image. The average value is a value obtained by dividing the total value by the number of pixels of the processed surface of the original image. Furthermore, the variance value is a value calculated by the following arithmetic expression (Equation 1).

Figure 2006266780
area:切削面の面積
x,y:画素位置(切削面のみ有効)
ave:原画像切削面の平均輝度
n,m:画像サイズ
Figure 2006266780
area: cutting surface area
x, y: Pixel position (valid only on the cutting surface)
ave: Average brightness of the cut surface of the original image
n, m: Image size

画像処理部16は、しきい値補正処理において、演算した合計値、平均値、又は分散値に基づいて2値化処理で用いるしきい値を演算して、演算したしきい値に補正する。ここで、分散値が高くなるとキズの検出が多くなるため、分散値が高くなるにしたがい、しきい値を高く設定する(図5参照)。合計値又は平均値を用いる場合は、合計値又は平均値が高くなるにしたがい、しきい値を低く設定する。   In the threshold value correction process, the image processing unit 16 calculates a threshold value used in the binarization process based on the calculated total value, average value, or variance value, and corrects the calculated threshold value. Here, since the detection of scratches increases as the variance value increases, the threshold value is set higher as the variance value increases (see FIG. 5). When using the total value or the average value, the threshold value is set lower as the total value or the average value becomes higher.

次に、実施形態2に係る欠陥検査装置の照明15の輝度、合計値および分散値、しきい値(補正値)の関係について図面を用いて説明する。図6は、本発明の実施形態2に係る欠陥検査装置における照明の輝度と合計値の関係を説明するためのグラフである。図7は、本発明の実施形態2に係る欠陥検査装置における照明の輝度と分散値の関係を説明するためのグラフである。図8は、本発明の実施形態2に係る欠陥検査装置における照明の輝度としきい値(補正値)の関係を説明するためのグラフである。   Next, the relationship among the brightness, total value, variance value, and threshold value (correction value) of the illumination 15 of the defect inspection apparatus according to the second embodiment will be described with reference to the drawings. FIG. 6 is a graph for explaining the relationship between the luminance of illumination and the total value in the defect inspection apparatus according to Embodiment 2 of the present invention. FIG. 7 is a graph for explaining the relationship between the luminance of illumination and the dispersion value in the defect inspection apparatus according to Embodiment 2 of the present invention. FIG. 8 is a graph for explaining the relationship between the luminance of the illumination and the threshold value (correction value) in the defect inspection apparatus according to the second embodiment of the present invention.

供試体2を撮像する時、照明15の劣化等により照明15の輝度が低下すると、加工痕が発生しやすくなる。また、照明15の輝度が高すぎると小さなキズが消えてしまうことがある。2値化処理において、実施形態1のように固定されたしきい値を用いると、低輝度時に加工痕をキズと判定するおそれがあり、高輝度時に小さなキズを検出できないおそれがある。また、刃具交換時は加工痕が発生しやすいため、この時も加工痕をキズと誤判定するおそれがある。したがって、低輝度の画像に対しては、加工痕とキズが混在した画像データから加工痕とキズを正確に分離しなければならない。高輝度の画像では、加工痕が発生していないため容易に判定が可能である。照明15が劣化した場合は、新しい照明15に交換することによって、このような誤判定を回避することができるが、何らかの特性に基づいて2値化処理に用いるしきい値を補正すれば、誤判定を回避しつつ、照明15の交換回数を減らすことができるはずである。   When the specimen 2 is imaged, if the brightness of the illumination 15 is reduced due to deterioration of the illumination 15 or the like, processing marks are likely to occur. Further, if the brightness of the illumination 15 is too high, small scratches may disappear. In the binarization processing, if a fixed threshold value is used as in the first embodiment, there is a possibility that the processing mark is determined to be a scratch when the luminance is low, and a small scratch may not be detected when the luminance is high. Further, since processing marks are likely to occur when the cutting tool is replaced, there is a possibility that the processing marks are erroneously determined as scratches. Therefore, for low-luminance images, it is necessary to accurately separate processing marks and scratches from image data in which processing marks and scratches are mixed. A high-luminance image can be easily determined because no processing marks are generated. When the illumination 15 is deteriorated, it is possible to avoid such an erroneous determination by replacing the illumination 15 with a new one. However, if the threshold value used for the binarization process is corrected based on some characteristic, an error may occur. It should be possible to reduce the number of replacements of the illumination 15 while avoiding the determination.

ここで、加工痕が無い場合の画像と加工痕が発生した画像に対して統計的処理を実施すると、検出範囲の輝度値の平均値、分散値と加工痕の発生に関係がある。照明15が劣化して加工痕が発生する場合は、輝度の平均値が低下するとともに分散値が高くなる。また、刃具交換時にも加工痕が発生し、輝度の平均値が低下するとともに撮像面の輝度バラツキが多く、分散値が大きくなる傾向にある。照明15の輝度(例えば、15段階)を変えると、画像に係る各画素の輝度値の合計値は、図6に示すようになる。すなわち、照明15の輝度が高くなる(輝度15に近づく)にしたがい、画像に係る各画素の輝度値の合計値が高くなる。また、照明15の輝度(例えば、15段階)を変えると、画像に係る各画素の輝度値の分散値は、図7に示すようになる。すなわち、照明15の輝度が高くなる(輝度15に近づく)にしたがい、画像に係る各画素の輝度値の分散値が低下する。画像に係る各画素の輝度値の合計値又は分散値は、照明15の輝度と比例又は反比例の関係がある。   Here, if statistical processing is performed on an image in which there is no processing mark and an image in which the processing mark is generated, there is a relationship between the average value of the luminance value in the detection range, the dispersion value, and the generation of the processing mark. When the illumination 15 is deteriorated and processing marks are generated, the average value of luminance is lowered and the dispersion value is increased. In addition, processing marks are generated even when the blade is replaced, and the average value of the luminance decreases, the luminance variation of the imaging surface increases, and the dispersion value tends to increase. When the luminance (for example, 15 levels) of the illumination 15 is changed, the total value of the luminance values of the pixels related to the image is as shown in FIG. That is, as the luminance of the illumination 15 increases (approaches the luminance 15), the total luminance value of each pixel related to the image increases. Further, when the luminance of the illumination 15 (for example, 15 levels) is changed, the dispersion value of the luminance value of each pixel related to the image is as shown in FIG. That is, as the luminance of the illumination 15 increases (approaches the luminance 15), the variance value of the luminance value of each pixel related to the image decreases. The total value or the variance value of the luminance values of each pixel related to the image has a proportional or inversely proportional relationship with the luminance of the illumination 15.

以上のような特性を利用して、切削面の輝度値の平均値が低下、または、分散値が高くなった場合は、加工痕が多く発生したと想定し、2値化処理に用いるしきい値の補正を行う。なお、照明15の輝度としきい値(補正値)の関係について、低輝度時は、しきい値が低いと加工痕とキズと検出するため、しきい値を高く設定し、高輝度時は、加工痕が少ないため、しきい値を低く設定する(図8参照)。これにより、加工痕をキズと誤判定することを防止することができ、高輝度時には小さなキズも検出できる。   When the average value of the brightness value of the cutting surface is reduced or the variance value is increased by utilizing the above characteristics, it is assumed that a lot of machining marks are generated, and the threshold value used for the binarization process. Correct the value. As for the relationship between the brightness of the illumination 15 and the threshold value (correction value), when the brightness is low, the threshold value is set high to detect machining marks and scratches when the threshold value is low. Since there are few machining marks, the threshold value is set low (see FIG. 8). As a result, it is possible to prevent the processing mark from being erroneously determined as a scratch and to detect a small scratch at high luminance.

次に、実施形態2に係る欠陥検査装置の画像処理部の処理動作について説明する。図9は、本発明の実施形態2に係る欠陥検査装置の画像処理部の処理動作を模式的に示したフローチャートである。図10は、本発明の実施形態2に係る欠陥検査装置の画像処理部の2値化処理を模式的に示したフローチャートである。図11は、本発明の実施形態2に係る欠陥検査装置によって得られる画像(照明の輝度1のときの画像)であり、(a)は原画像、(b)はフィルタ処理画像、(c)は差分処理画像、(d)は2値化処理画像である。   Next, the processing operation of the image processing unit of the defect inspection apparatus according to the second embodiment will be described. FIG. 9 is a flowchart schematically showing the processing operation of the image processing unit of the defect inspection apparatus according to the second embodiment of the present invention. FIG. 10 is a flowchart schematically showing the binarization process of the image processing unit of the defect inspection apparatus according to the second embodiment of the present invention. 11A and 11B are images (images when the illumination brightness is 1) obtained by the defect inspection apparatus according to the second embodiment of the present invention, where FIG. 11A is an original image, FIG. 11B is a filtered image, and FIG. Is a difference processed image, and (d) is a binarized image.

図9および図10に示される各処理は、画像処理部16内でプログラムにより実行される処理である。よって、各処理を機能ブロックで表現すれば、原画像取得処理部、分散値演算処理部、しきい値補正処理部、フィルタ処理部、差分処理部、2値化処理部、特徴量演算処理部、判定処理部を備えていることと等価である。   Each process shown in FIGS. 9 and 10 is a process executed by a program in the image processing unit 16. Therefore, if each process is expressed by a functional block, an original image acquisition processing unit, a variance value calculation processing unit, a threshold value correction processing unit, a filter processing unit, a difference processing unit, a binarization processing unit, a feature amount calculation processing unit This is equivalent to having a determination processing unit.

まず、カメラ14により照明15で照らされた供試体2の原画像を撮像し、画像処理部16は、撮像した原画像(図11(a)参照)を取得する(ステップC1)。   First, an original image of the specimen 2 illuminated by the illumination 15 is captured by the camera 14, and the image processing unit 16 acquires the captured original image (see FIG. 11A) (step C1).

次に、画像処理部16は、取得した原画像に基づいて、分散値を演算する(ステップC2)。なお、分散値の演算は、前記演算式(数1)に基づいて行う。   Next, the image processing unit 16 calculates a variance value based on the acquired original image (step C2). The calculation of the variance value is performed based on the arithmetic expression (Equation 1).

次に、しきい値決定部として機能する画像処理部16は、演算した分散値に基づいて、しきい値補正処理を行う(ステップC3)。しきい値補正処理では、演算した分散値に基づいて、後述する2値化処理で用いるしきい値を演算して、演算したしきい値に補正する。   Next, the image processing unit 16 functioning as a threshold value determination unit performs threshold value correction processing based on the calculated variance value (step C3). In the threshold value correction process, a threshold value used in a binarization process to be described later is calculated based on the calculated variance value, and is corrected to the calculated threshold value.

次に、画像処理部16は、原画像に対して、加工痕、キズを消去するためにフィルタ処理を行い、フィルタ処理画像(基準画像;図11(b)参照)を得る(ステップC4)。ここで、フィルタ処理では、注目画素とその周辺画素(n*n)の輝度値の平均値を算出し、算出した平均値と注目画素の輝度値とを入れ替える。なお、フィルタ処理では、平均値を用いる代わりに、注目画素とその周辺画素(n*n)の輝度値のうち最大値を抽出し、抽出した最大値と注目画素の輝度値とを入れ替えるようにしてもよい。   Next, the image processing unit 16 performs filter processing on the original image in order to erase the processing marks and scratches, and obtains a filtered image (reference image; see FIG. 11B) (step C4). Here, in the filtering process, an average value of the luminance values of the target pixel and its peripheral pixels (n * n) is calculated, and the calculated average value and the luminance value of the target pixel are switched. In the filtering process, instead of using the average value, the maximum value is extracted from the luminance values of the target pixel and its surrounding pixels (n * n), and the extracted maximum value and the luminance value of the target pixel are switched. May be.

次に、画像処理部16は、原画像およびフィルタ処理画像に基づいて差分処理を行い、差分処理画像(図11(c)参照)を得る(ステップC5)。ここで、差分処理は、原画像からフィルタ処理画像を減算(原画像の画素の輝度値から対応するフィルタ処理画像の画素の輝度値を減算)する処理である。原画像にキズがあった場合は、キズの部分が差分処理画像に差分として現れる。   Next, the image processing unit 16 performs difference processing based on the original image and the filtered image, and obtains a difference processed image (see FIG. 11C) (step C5). Here, the difference process is a process of subtracting the filtered image from the original image (subtracting the luminance value of the pixel of the corresponding filtered image from the luminance value of the pixel of the original image). If the original image has a scratch, the scratch portion appears as a difference in the difference processed image.

次に、画像処理部16は、差分処理画像について画素ごとに2値化処理を行い、2値化処理画像(図11(d)参照)を得る(ステップC6)。ここで、2値化処理では、画像処理部16は、差分処理画像から処理対象となる画素の輝度値(data(x,y))を抽出し(ステップD1)、画素の輝度値としきい値(ステップC3で補正したしきい値)とを比較することによって画素の輝度値がしきい値以上か否かを判定し(ステップD2)、画素の輝度値がしきい値以上の場合(ステップD2のYES;キズありの部分)は画素の輝度値を1(白)とし(ステップD3)、画素の輝度値がしきい値以上でない場合(ステップD2のNO;キズなしの部分)は画素の輝度値を0(黒)とし(ステップD4)、差分処理画像の全ての画素について2値化処理を行ったか否か確認し(ステップD5)、全ての画素について2値化処理を行っていない場合(ステップD5のNO)にはステップD1に戻って次の画素について処理を行い、全ての画素について2値化処理を行った場合(ステップD5のYES)にはステップC7に進む。   Next, the image processing unit 16 performs a binarization process for each pixel on the difference processed image to obtain a binarized image (see FIG. 11D) (step C6). Here, in the binarization process, the image processing unit 16 extracts the luminance value (data (x, y)) of the pixel to be processed from the difference processed image (step D1), and the luminance value of the pixel and the threshold value (The threshold value corrected in step C3) is compared to determine whether the luminance value of the pixel is equal to or higher than the threshold value (step D2). If the luminance value of the pixel is equal to or higher than the threshold value (step D2) If YES, the pixel brightness value is 1 (white) (step D3). If the pixel brightness value is not greater than or equal to the threshold value (NO in step D2; no scratch area), the pixel brightness When the value is set to 0 (black) (step D4), it is confirmed whether or not the binarization processing has been performed for all the pixels of the difference processed image (step D5). When the binarization processing has not been performed for all the pixels (step D5) Return to step D1 for NO in step D5) Performs processing for the next pixel, the process proceeds to step C7 when performing binarization processing for all the pixels (YES in step D5).

次に、画像処理部16は、2値化処理画像から各キズありの部分の長さ、面積などの特徴量を演算する(ステップC7)。   Next, the image processing unit 16 calculates feature quantities such as the length and area of each flawed portion from the binarized image (step C7).

最後に、画像処理部16は、特徴量としきい値(固定値)を比較することにより、良品、不良品を判定する(ステップC8)。判定では、特徴量がしきい値以上の場合には不良品とし、特徴量がしきい値以上でない場合には良品とする。図11(d)の2値化処理画像では、特徴量がしきい値以上のものが3個存在し、不良品と判定されることになる。   Finally, the image processing unit 16 determines a non-defective product or a defective product by comparing the feature amount with a threshold value (fixed value) (step C8). In the determination, if the feature amount is equal to or greater than the threshold value, the product is determined to be defective. In the binarized image of FIG. 11 (d), there are three features whose feature amount is equal to or greater than the threshold value, and it is determined that the product is defective.

実施形態2によれば、照明の劣化、刃具交換などを行った場合でも、撮像画面の統計的手法でしきい値を調整し、安定した判定性能を得る。   According to the second embodiment, even when the illumination is deteriorated, the blade is replaced, etc., the threshold value is adjusted by the statistical method of the imaging screen to obtain stable determination performance.

(実施例1)
次に、2値化処理に用いるしきい値として、固定値を用いる場合(実施形態1の場合)と補正値を用いる場合(実施形態2の場合)の欠陥検査処理を比較しながら、図面を用いて説明する。図12は、比較例に係る欠陥検査処理によって得られる画像(照明の輝度1のときの画像)であり、(a)は原画像、(b)はフィルタ処理画像、(c)は差分処理画像、(d)は2値化処理画像である。図13は、照明の各輝度について、しきい値として、固定値を用いた場合(実施形態1の場合)と補正値を用いた場合(実施形態2の場合)の欠陥検査処理に係るキズの判定個数を比較するための表である。ここでの供試体2にはキズ3個のサンプルを用いている。
Example 1
Next, the drawings are compared while comparing the defect inspection processing when a fixed value is used as the threshold value used in the binarization processing (in the case of the first embodiment) and when correction values are used (in the case of the second embodiment). It explains using. 12A and 12B are images (images when the illumination brightness is 1) obtained by the defect inspection processing according to the comparative example, where FIG. 12A is an original image, FIG. 12B is a filtered image, and FIG. 12C is a difference processed image. , (D) are binarized images. FIG. 13 shows scratches related to defect inspection processing when a fixed value is used as a threshold value (in the case of the first embodiment) and when a correction value is used (in the case of the second embodiment) for each luminance of illumination. It is a table | surface for comparing the number of determination. The specimen 2 used here is a sample of three scratches.

照明15が低輝度(例えば、輝度1)のときに、画像処理部16において分散値演算処理及びしきい値補正処理を行わないで欠陥検査処理を行うと(すなわち、実施形態1の場合)、図12に示すような画像が得られ、加工痕をキズと判定してしまう。つまり、2値化処理で用いるしきい値が固定値の場合(実施形態1の場合)、照明15の輝度5以下において加工痕をキズと判定していたが、しきい値を補正する場合(実施形態2の場合)、図11に示すような画像が得られ、照明15が輝度1〜15までの広い範囲で正確に判定が可能となる。なお、実施形態1の場合でも、照明15の輝度6以上では加工痕をキズと判定しないので有効である。   When the defect inspection process is performed without performing the dispersion value calculation process and the threshold value correction process in the image processing unit 16 when the illumination 15 has low luminance (for example, luminance 1) (that is, in the case of the first embodiment). An image as shown in FIG. 12 is obtained, and the processing mark is determined as a scratch. That is, when the threshold value used in the binarization process is a fixed value (in the case of the first embodiment), the processing mark is determined to be scratched when the brightness of the illumination 15 is 5 or less, but when the threshold value is corrected ( In the case of the second embodiment, an image as shown in FIG. 11 is obtained, and the illumination 15 can be accurately determined in a wide range from luminance 1 to 15. Even in the case of the first embodiment, if the brightness of the illumination 15 is 6 or more, the processing mark is not judged as a scratch, which is effective.

照明の各輝度について、しきい値として固定値を用いた場合(実施形態1の場合)と補正値を用いた場合(実施形態2の場合)のキズの判定個数は、図13のようになる。固定値を用いた場合は、輝度5以下で加工痕をキズと判定する個数が多くなっているが、補正値を用いた場合はどの輝度においても3個の判定が可能である。   For each luminance of illumination, the number of scratches determined when a fixed value is used as a threshold value (in the case of the first embodiment) and when a correction value is used (in the case of the second embodiment) is as shown in FIG. . When a fixed value is used, the number of processing marks to be judged as scratches increases with a luminance of 5 or less. However, when a correction value is used, three determinations can be made at any luminance.

(実施例2)
次に、刃具交換した直後に切削された試供体を欠陥検査処理する場合について、2値化処理に用いるしきい値として、固定値を用いる場合(実施形態1の場合)と補正値を用いる場合(実施形態2の場合)を比較しながら、図面を用いて説明する。図14は、刃具交換した直後であって、キズなしのサンプルを用いたときの欠陥検査処理を比較するための画像である。図15は、刃具交換した直後であって、キズありのサンプルを用いたときの欠陥検査処理を比較するための画像である。ここでは、照明の輝度を15としている。必要のない加工痕を消すために更に輝度を上げても加工痕が消えず、図4(高輝度)では検出できた欠陥3個が照明により消えてしまうからである。
(Example 2)
Next, in the case of performing defect inspection processing on a specimen that has been cut immediately after blade replacement, a fixed value is used (in the case of the first embodiment) and a correction value are used as threshold values used in the binarization processing. Description will be made using the drawings while comparing (in the case of Embodiment 2). FIG. 14 is an image for comparing the defect inspection process when using a sample having no scratch immediately after exchanging the cutting tool. FIG. 15 is an image for comparing defect inspection processing when a sample with scratches is used immediately after blade replacement. Here, the luminance of illumination is set to 15. This is because even if the brightness is further increased in order to erase unnecessary processing marks, the processing marks do not disappear, and three defects detected in FIG. 4 (high luminance) disappear due to illumination.

加工痕のみが存在する画像(キズなしの画像)を用いた場合について説明する。刃具を交換した直後は、刃具の形状により照明の輝度を上げても加工痕が消えない場合がある。図14(a)のようなキズがない良品の画像に対して、2値化処理に用いるしきい値として固定値を用いた場合(実施形態1の場合)、高輝度時でも図14(b)のように加工痕をキズと判定してしまう。一方、2値化処理に用いるしきい値として補正値を用いた場合(実施形態2の場合)、刃具交換により加工痕が発生した場合であっても図14(c)のようにキズ無と判定することができる。   A case where an image having only a processing mark (an image without a scratch) is used will be described. Immediately after replacing the cutting tool, the processing mark may not disappear even if the brightness of the illumination is increased depending on the shape of the cutting tool. When a fixed value is used as a threshold value used in the binarization processing for a non-defective image such as that shown in FIG. 14A, the case shown in FIG. ), The processing mark is judged as a scratch. On the other hand, when a correction value is used as a threshold value used in the binarization process (in the case of the second embodiment), even when a processing mark is generated due to the blade replacement, there is no scratch as shown in FIG. Can be determined.

加工痕とキズが混在した画像を用いた場合について説明する。図15(a)のような加工痕とキズが混在した原画像に対して、2値化処理に用いるしきい値として固定値を用いた場合(実施形態1の場合)、高輝度時でも図15(b)のように加工痕と傷の判定ができなくなる。一方、2値化処理に用いるしきい値として補正値を用いた場合(実施形態2の場合)、刃具交換により加工痕が発生した場合であっても図15(c)のようにキズのみ検出することが可能である。   A case where an image in which processing marks and scratches are mixed will be described. When a fixed value is used as a threshold value used in the binarization processing for the original image in which processing marks and scratches are mixed as shown in FIG. As in 15 (b), it becomes impossible to determine the processing marks and scratches. On the other hand, when a correction value is used as the threshold value used in the binarization process (in the case of the second embodiment), only a scratch is detected as shown in FIG. Is possible.

以上のとおり、実施形態2のように切削面の分散値(あるいは平均値)によりしきい値を補正することによって、照明のバラツキや、刃具交換など極端に計測環境が変化した場合でも正確に判定でき、実施形態1では正確に判定しきれないパターンにも対応することができる。また、しきい値を決定する場合や補正する場合において、照明の経年劣化を考慮するために、照明の使用開始から時間を計測し、LEDや発熱灯の照度の減少をしきい値の決定に反映させることも有効である。   As described above, the threshold value is corrected based on the dispersion value (or average value) of the cutting surface as in the second embodiment, so that accurate determination can be made even when the measurement environment changes extremely, such as variations in illumination or replacement of cutting tools. In the first embodiment, patterns that cannot be accurately determined can be handled. Also, when determining or correcting the threshold value, in order to take into account the aging deterioration of the lighting, the time is measured from the start of use of the lighting, and the decrease in the illuminance of the LED or the heating lamp is used to determine the threshold value. It is also effective to reflect it.

本発明の実施形態1に係る欠陥検査装置の構成を模式的に示したブロック図である。It is the block diagram which showed typically the structure of the defect inspection apparatus which concerns on Embodiment 1 of this invention. 本発明の実施形態1に係る欠陥検査装置の画像処理部の処理動作を模式的に示したフローチャートである。It is the flowchart which showed typically the processing operation of the image process part of the defect inspection apparatus which concerns on Embodiment 1 of this invention. 本発明の実施形態1に係る欠陥検査装置の画像処理部の2値化処理を模式的に示したフローチャートである。It is the flowchart which showed typically the binarization process of the image processing part of the defect inspection apparatus which concerns on Embodiment 1 of this invention. 本発明の実施形態1に係る欠陥検査装置によって得られる画像(照明の輝度15のときの画像)であり、(a)は原画像、(b)はフィルタ処理画像、(c)は差分処理画像、(d)は2値化処理画像である。It is an image (image at the time of illumination brightness | luminance 15) obtained by the defect inspection apparatus which concerns on Embodiment 1 of this invention, (a) is an original image, (b) is a filter process image, (c) is a difference process image. , (D) are binarized images. 本発明の実施形態2に係る欠陥検査装置の画像処理部において用いられるマップ(分散値−しきい値)を模式的に示したグラフである。It is the graph which showed typically the map (dispersion value-threshold value) used in the image processing part of the defect inspection apparatus which concerns on Embodiment 2 of this invention. 本発明の実施形態2に係る欠陥検査装置における照明の輝度と合計値の関係を説明するためのグラフである。It is a graph for demonstrating the relationship between the brightness | luminance of illumination, and a total value in the defect inspection apparatus which concerns on Embodiment 2 of this invention. 本発明の実施形態2に係る欠陥検査装置における照明の輝度と分散値の関係を説明するためのグラフである。It is a graph for demonstrating the relationship between the brightness | luminance of illumination, and a dispersion value in the defect inspection apparatus which concerns on Embodiment 2 of this invention. 本発明の実施形態2に係る欠陥検査装置における照明の輝度としきい値(補正値)の関係を説明するためのグラフである。It is a graph for demonstrating the relationship between the brightness | luminance of illumination and a threshold value (correction value) in the defect inspection apparatus which concerns on Embodiment 2 of this invention. 本発明の実施形態2に係る欠陥検査装置の画像処理部の処理動作を模式的に示したフローチャートである。It is the flowchart which showed typically the processing operation of the image process part of the defect inspection apparatus which concerns on Embodiment 2 of this invention. 本発明の実施形態2に係る欠陥検査装置の画像処理部の2値化処理を模式的に示したフローチャートである。It is the flowchart which showed typically the binarization process of the image processing part of the defect inspection apparatus which concerns on Embodiment 2 of this invention. 本発明の実施形態2に係る欠陥検査装置によって得られる画像(照明の輝度1のときの画像)であり、(a)は原画像、(b)はフィルタ処理画像、(c)は差分処理画像、(d)は2値化処理画像である。It is an image (image at the time of illumination brightness | luminance 1) obtained by the defect inspection apparatus which concerns on Embodiment 2 of this invention, (a) is an original image, (b) is a filter process image, (c) is a difference process image. , (D) are binarized images. 比較例に係る欠陥検査装置によって得られる画像(照明の輝度1のときの画像)であり、(a)は原画像、(b)はフィルタ処理画像、(c)は差分処理画像、(d)は2値化処理画像である。It is an image (image when the luminance of illumination is 1) obtained by the defect inspection apparatus according to the comparative example, (a) is the original image, (b) is the filtered image, (c) is the difference processed image, (d) Is a binarized image. 照明の各輝度についてしきい値として固定値を用いた場合(実施形態1の場合)と補正値を用いた場合(実施形態2の場合)の欠陥検査処理に係るキズの判定個数を比較するための表である。In order to compare the determination number of scratches related to defect inspection processing when a fixed value is used as a threshold value for each luminance of illumination (in the case of Embodiment 1) and when a correction value is used (in the case of Embodiment 2) It is a table. 刃具交換した直後であってキズなしのサンプルを用いたときの欠陥検査処理を比較するための画像である。It is an image for comparing defect inspection processing when using a sample without scratch immediately after exchanging the blade. 刃具交換した直後であってキズありのサンプルを用いたときの欠陥検査処理を比較するための画像である。It is an image for comparing defect inspection processing when using a scratched sample immediately after replacing the blade.

符号の説明Explanation of symbols

1 欠陥検査装置
2 供試体
11 ターンテーブル
12 モータ
13 エンコーダ
14 カメラ
15 照明
16 画像処理部
17 表示部
DESCRIPTION OF SYMBOLS 1 Defect inspection apparatus 2 Specimen 11 Turntable 12 Motor 13 Encoder 14 Camera 15 Illumination 16 Image processing part 17 Display part

Claims (8)

供試体の表面欠陥を検査するための欠陥検査装置であって、
前記供試体の表面を撮像して原画像を取得するカメラと、
前記原画像からノイズを除去したフィルタ処理画像を作成するフィルタ処理部と、
前記原画像の画素又は前記フィルタ処理画像の画素の情報に基づいて、しきい値を決定するしきい値決定部と、
前記フィルタ処理画像の画素の輝度値がしきい値以上である場合に当該画素の輝度値を1に入れ替えるとともに、前記フィルタ処理画像の画素の輝度値がしきい値以上でない場合に当該画素の輝度値を0に入れ替えた2値化処理画像を作成する2値化処理部と、
前記2値化処理画像に対して欠陥の有無を判定する判定処理部と、
を備えることを特徴とする欠陥検査装置。
A defect inspection apparatus for inspecting a surface defect of a specimen,
A camera that images the surface of the specimen and acquires an original image;
A filter processing unit for creating a filtered image obtained by removing noise from the original image;
A threshold value determination unit for determining a threshold value based on information of pixels of the original image or pixels of the filtered image;
When the luminance value of the pixel of the filtered image is equal to or higher than the threshold value, the luminance value of the pixel is replaced with 1, and when the luminance value of the pixel of the filtered image is not equal to or higher than the threshold value, the luminance value of the pixel A binarization processing unit for creating a binarized image in which the value is replaced with 0;
A determination processing unit that determines the presence or absence of defects in the binarized image;
A defect inspection apparatus comprising:
前記原画像の画素の輝度値から対応する前記フィルタ処理画像の画素の輝度値を減算した差分処理画像を作成する差分処理部を備え、
前記2値化処理部は、前記差分処理画像の画素の輝度値がしきい値以上の場合に当該画素の輝度値を1に入れ替えるとともに、前記差分処理画像の画素の輝度値がしきい値以上でない場合に当該画素の輝度値を0に入れ替えた2値化処理画像を作成することを特徴とする請求項1記載の欠陥検査装置。
A difference processing unit that creates a difference processed image obtained by subtracting the luminance value of the corresponding pixel of the filtered image from the luminance value of the pixel of the original image;
The binarization processing unit replaces the luminance value of the pixel with 1 when the luminance value of the pixel of the difference processing image is equal to or greater than a threshold value, and the luminance value of the pixel of the difference processing image is equal to or greater than the threshold value. 2. The defect inspection apparatus according to claim 1, wherein a binary-processed image in which the luminance value of the pixel is replaced with 0 is created when the pixel is not.
前記しきい値決定部は、前記原画像の画素又は前記フィルタ処理画像の画素の輝度値から平均値を算出し、前記しきい値を決定することを特徴とする請求項1又は2記載の欠陥検査装置。   The defect according to claim 1, wherein the threshold value determination unit calculates an average value from luminance values of pixels of the original image or pixels of the filtered image, and determines the threshold value. Inspection device. 前記しきい値決定部は、前記原画像の画素又は前記フィルタ処理画像の画素の輝度値から分散値を演算し、前記しきい値を決定することを特徴とする請求項1又は2記載の欠陥検査装置。   3. The defect according to claim 1, wherein the threshold value determination unit calculates a variance value from a luminance value of a pixel of the original image or a pixel of the filtered image and determines the threshold value. Inspection device. 前記フィルタ処理部は、前記原画像に基づいて注目画素とその周辺画素の輝度値の平均値を算出し、算出した平均値と前記注目画素の輝度値とを入れ替えたフィルタ処理画像を作成することを特徴とする請求項1乃至4のいずれか一に記載の欠陥検査装置。   The filter processing unit calculates an average value of the luminance values of the target pixel and its surrounding pixels based on the original image, and creates a filtered image in which the calculated average value and the luminance value of the target pixel are switched. The defect inspection apparatus according to any one of claims 1 to 4. 前記フィルタ処理部は、前記原画像に基づいて注目画素とその周辺画素の輝度値の最大値を抽出し、抽出した最大値と前記注目画素の輝度値とを入れ替えたフィルタ処理画像を作成することを特徴とする請求項1乃至4のいずれか一に記載の欠陥検査装置。   The filter processing unit extracts a maximum value of luminance values of a target pixel and its surrounding pixels based on the original image, and creates a filtered image in which the extracted maximum value and the luminance value of the target pixel are switched. The defect inspection apparatus according to any one of claims 1 to 4. 前記供試体の表面を照明する照明手段を備え、
前記しきい値決定部は、前記照明手段の経年劣化に基づいて前記しきい値を決定することを特徴とする請求項1記載の欠陥検査装置。
Illuminating means for illuminating the surface of the specimen,
The defect inspection apparatus according to claim 1, wherein the threshold value determination unit determines the threshold value based on aged deterioration of the illumination unit.
供試体の表面欠陥を検査するための欠陥検査方法であって、
前記供試体の表面を撮像して原画像を取得するステップと、
前記原画像からノイズを除去したフィルタ処理画像を作成するステップと、
前記原画像の画素又は前記フィルタ処理画像の画素の情報に基づいて、しきい値を決定するステップと、
前記フィルタ処理画像の画素の輝度値がしきい値以上である場合に当該画素の輝度値を1に入れ替えるとともに、前記フィルタ処理画像の画素の輝度値がしきい値以上でない場合に当該画素の輝度値を0に入れ替えた2値化処理画像を作成するステップと、
前記2値化処理画像に対して欠陥の有無を判定するステップと、
を含むことを特徴とする欠陥検査方法。
A defect inspection method for inspecting a surface defect of a specimen,
Capturing the original image by imaging the surface of the specimen;
Creating a filtered image from which noise has been removed from the original image;
Determining a threshold based on information of pixels of the original image or pixels of the filtered image;
When the luminance value of the pixel of the filtered image is equal to or higher than the threshold value, the luminance value of the pixel is replaced with 1, and when the luminance value of the pixel of the filtered image is not equal to or higher than the threshold value, the luminance value of the pixel Creating a binarized image with the value replaced with 0;
Determining the presence or absence of defects in the binarized image;
A defect inspection method comprising:
JP2005083246A 2005-03-23 2005-03-23 Flaw inspection device and flaw inspection method Withdrawn JP2006266780A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005083246A JP2006266780A (en) 2005-03-23 2005-03-23 Flaw inspection device and flaw inspection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005083246A JP2006266780A (en) 2005-03-23 2005-03-23 Flaw inspection device and flaw inspection method

Publications (1)

Publication Number Publication Date
JP2006266780A true JP2006266780A (en) 2006-10-05

Family

ID=37202928

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005083246A Withdrawn JP2006266780A (en) 2005-03-23 2005-03-23 Flaw inspection device and flaw inspection method

Country Status (1)

Country Link
JP (1) JP2006266780A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014083921A1 (en) * 2012-11-29 2014-06-05 シャープ株式会社 Defect determination device, device for creating correspondence information, defect determination method, and method for creating correspondence information
US9395406B2 (en) 2013-01-31 2016-07-19 Nichia Corporation Inspection method for semiconductor light-emitting device and manufacturing method for semiconductor light-emitting device
JP2017003274A (en) * 2015-06-04 2017-01-05 リコーエレメックス株式会社 Image inspection device
US9546956B2 (en) 2013-02-18 2017-01-17 Nichia Corporation Method of inspecting semiconductor light-emitting device and method for manufacturing semiconductor light-emitting device
JP2017062178A (en) * 2015-09-25 2017-03-30 大同特殊鋼株式会社 Defect detection method for product
JP2020061608A (en) * 2018-10-05 2020-04-16 コニカミノルタ株式会社 Image inspection apparatus, image inspection method, and image inspection program
JP2020079709A (en) * 2018-11-12 2020-05-28 コニカミノルタ株式会社 Image inspection device, image inspection method and image inspection program

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014083921A1 (en) * 2012-11-29 2014-06-05 シャープ株式会社 Defect determination device, device for creating correspondence information, defect determination method, and method for creating correspondence information
US9395406B2 (en) 2013-01-31 2016-07-19 Nichia Corporation Inspection method for semiconductor light-emitting device and manufacturing method for semiconductor light-emitting device
US9546956B2 (en) 2013-02-18 2017-01-17 Nichia Corporation Method of inspecting semiconductor light-emitting device and method for manufacturing semiconductor light-emitting device
JP2017003274A (en) * 2015-06-04 2017-01-05 リコーエレメックス株式会社 Image inspection device
JP2017062178A (en) * 2015-09-25 2017-03-30 大同特殊鋼株式会社 Defect detection method for product
JP2020061608A (en) * 2018-10-05 2020-04-16 コニカミノルタ株式会社 Image inspection apparatus, image inspection method, and image inspection program
JP7167615B2 (en) 2018-10-05 2022-11-09 コニカミノルタ株式会社 IMAGE INSPECTION APPARATUS, IMAGE INSPECTION METHOD AND IMAGE INSPECTION PROGRAM
JP2020079709A (en) * 2018-11-12 2020-05-28 コニカミノルタ株式会社 Image inspection device, image inspection method and image inspection program
JP7230444B2 (en) 2018-11-12 2023-03-01 コニカミノルタ株式会社 IMAGE INSPECTION APPARATUS, IMAGE INSPECTION METHOD AND IMAGE INSPECTION PROGRAM

Similar Documents

Publication Publication Date Title
JP2006266780A (en) Flaw inspection device and flaw inspection method
JP7053366B2 (en) Inspection equipment and inspection method
US20140307941A1 (en) Analysis of the digital image of the external surface of a tyre and processing of false measurement points
CN108700531B (en) Defect inspection device
KR102027986B1 (en) Bead recognition apparatus using vision camera and method thereof
JP4760029B2 (en) Defect inspection method and defect inspection apparatus
JP2006284471A (en) Pattern inspection method, pattern inspection device and pattern inspecting program
JP2018096908A (en) Inspection device and inspection method
JP4910128B2 (en) Defect inspection method for object surface
JP2007240207A (en) Tool inspection apparatus and method
JP2010181328A (en) Device, program and method for inspecting surface of solar battery wafer
KR100827906B1 (en) Substrate inspection device
KR20160097651A (en) Apparatus and Method for Testing Pattern of Sample using Validity Image Processing Technique, and computer-readable recording medium with program therefor
CN111833350A (en) Machine vision detection method and system
JP4697328B2 (en) Inspection method for heat exchanger core
WO2015146744A1 (en) Tool inspection method and tool inspection device
JP2005283267A (en) Through hole measuring device, method, and program for through hole measurement
KR20070101669A (en) Apparatus and mathod for vision inspecting of mounting plate assembly
JP6595800B2 (en) Defect inspection apparatus and defect inspection method
CN112991251B (en) Method, device and equipment for detecting surface defects
TWI493177B (en) Method of detecting defect on optical film with periodic structure and device thereof
JP5784406B2 (en) Inspection method for processed products
JP2010091319A (en) Visual examination device and method
JP6765645B2 (en) How to inspect the brazing material pattern
Akundi et al. Automated Quality Control System for Product Dimensional and Surface Analysis–An Industry Case Study

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080213

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20090617