JP7306620B2 - Surface defect inspection device and surface defect inspection method - Google Patents

Surface defect inspection device and surface defect inspection method Download PDF

Info

Publication number
JP7306620B2
JP7306620B2 JP2019010687A JP2019010687A JP7306620B2 JP 7306620 B2 JP7306620 B2 JP 7306620B2 JP 2019010687 A JP2019010687 A JP 2019010687A JP 2019010687 A JP2019010687 A JP 2019010687A JP 7306620 B2 JP7306620 B2 JP 7306620B2
Authority
JP
Japan
Prior art keywords
defect
inspected
defect candidate
imaging
moving
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019010687A
Other languages
Japanese (ja)
Other versions
JP2020118572A (en
Inventor
昭芳 伊藤
洋一 松井
憲一 安味
卓也 明石
精 張
真基 菊田
潮 張
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Iwate University
University of Fukui
Toyota Motor East Japan Inc
Original Assignee
Iwate University
University of Fukui
Toyota Motor East Japan Inc
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 Iwate University, University of Fukui, Toyota Motor East Japan Inc filed Critical Iwate University
Priority to JP2019010687A priority Critical patent/JP7306620B2/en
Publication of JP2020118572A publication Critical patent/JP2020118572A/en
Application granted granted Critical
Publication of JP7306620B2 publication Critical patent/JP7306620B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、表面欠陥検査装置及び表面欠陥検査方法に係り、特に自動車のボディ表面の塗装などの状態を検査するのに好適な表面欠陥検査装置及び表面欠陥検査方法に関する。 TECHNICAL FIELD The present invention relates to a surface defect inspection apparatus and a surface defect inspection method, and more particularly to a surface defect inspection apparatus and a surface defect inspection method suitable for inspecting the state of coating of the surface of an automobile body.

従来より、自動車のボディを塗装する工程においては、検査員の目視により塗装表面の検査作業を行っている。しかし、検査員による外観検査は労力を要する仕事であり、個人によってばらつきがあるため、検査ミスや検査漏れが生じる恐れがある。また、検査員による外観検査では、検査に要する時間も多くなり、人件費が製品の生産コストをあげてしまう要因のひとつになっている。そのため、外観検査の自動化が望まれており、近年では、光学的に自動的に検査することが可能な表面欠陥検査装置の開発が進められている。 Conventionally, in the process of painting an automobile body, an inspector visually inspects the painted surface. However, visual inspection by an inspector is labor intensive and varies from person to person. In addition, visual inspection by an inspector takes a long time, and labor costs are one of the factors that increase the production cost of products. Therefore, automation of appearance inspection is desired, and in recent years, development of a surface defect inspection apparatus capable of optically and automatically inspecting is progressing.

例えば、特許文献1には、被検査面にストライプの明暗パターンを照射して被検査面を時間の経過と共に移動させ、任意の時刻ごとに撮像手段により画像を撮像し、撮像時刻の異なる複数枚の画像から欠陥候補を抽出し、欠陥候補が被検査面の移動量に比例して移動している場合には欠陥であると判断する欠陥検査方法及び欠陥検査装置が記載されている。これによれば、ノイズによる誤検出及び境界線の誤認識を回避することができ、欠陥を精度良く検出することができる。 For example, in Patent Document 1, a striped light-dark pattern is irradiated onto a surface to be inspected, the surface to be inspected is moved with the lapse of time, an image is captured by an imaging means at arbitrary times, and a plurality of images are captured at different times. describes a defect inspection method and a defect inspection apparatus for extracting defect candidates from an image of , and judging that a defect is a defect when the defect candidate moves in proportion to the amount of movement of the surface to be inspected. According to this, erroneous detection due to noise and erroneous recognition of boundaries can be avoided, and defects can be detected with high accuracy.

特開平8-145906号公報JP-A-8-145906

しかしながら、自動車のボディを検査する場合、車体をコンベアで搬送すると、コンベアの搬送速度のムラ、コンベアの歪み、あるいはコンベア上の車体の揺れ等のために、被検査面の移動速度が一定でない、または移動軌跡が直線とならないため、特許文献1のように被検査面の移動量のみを基準として欠陥であるか否かを判断するのでは、精度良く判断することができないという問題があった。また、ストライプの明暗パターンを照射する場合には、明暗の境界線で現れるいわゆるゆず肌を凸状欠陥と判断してしまうという問題もあった。 However, when inspecting the body of an automobile, when the body is transported by a conveyor, the moving speed of the surface to be inspected is not constant due to unevenness in the transport speed of the conveyor, distortion of the conveyor, or shaking of the body on the conveyor. Alternatively, since the movement trajectory does not form a straight line, there is a problem that it is not possible to accurately judge whether or not there is a defect based only on the amount of movement of the surface to be inspected as in Patent Document 1. Moreover, when a striped light-and-dark pattern is irradiated, there is also a problem that the so-called citrus peel appearing at the boundary line of the light-and-dark is judged as a convex defect.

本発明は、このような問題に基づきなされたものであり、被検査面の移動速度が一定でない、または移動軌跡が直線とならない場合でも、精度よく欠陥を検出することができる表面欠陥検査装置及び表面欠陥検査方法を提供することを目的とする。 The present invention has been made based on such problems. It is an object of the present invention to provide a surface defect inspection method.

本発明の表面欠陥検査装置は、被検査面に光を照射する照明手段と、この照明手段により照射された被検査面を撮像して画像を得る撮像手段と、この撮像手段に対する被検査面の位置を相対的に移動させる移動手段と、この移動手段により撮像手段と被検査面とを相対的に移動させながら任意の時間ごとに撮像手段により撮像した複数の画像から欠陥を検出する欠陥検出手段とを備え、欠陥検出手段は、撮像時刻の異なる複数の画像のそれぞれから欠陥候補を抽出する欠陥候補抽出手段と、欠陥候補抽出手段により抽出された欠陥候補において、撮像時刻の異なる少なくとも2枚以上の画像間での移動距離及び移動角度が、被検査面に欠陥が存在した時に移動すると想定される基準移動距離及び基準移動角度の範囲内にある場合に、欠陥であると判定する判定手段とを有するものである。 The surface defect inspection apparatus of the present invention comprises illumination means for irradiating a surface to be inspected with light, imaging means for obtaining an image by imaging the surface to be inspected illuminated by the illumination means, and an image of the surface to be inspected for the imaging means. A moving means for relatively moving positions, and a defect detecting means for detecting defects from a plurality of images captured by the imaging means at arbitrary time intervals while relatively moving the imaging means and the surface to be inspected by the moving means. The defect detection means includes: defect candidate extraction means for extracting defect candidates from each of a plurality of images captured at different times; and defect candidates extracted by the defect candidate extraction means, at least two or more images captured at different times. Determination means for determining that a defect is present when the movement distance and movement angle between the images are within the range of the reference movement distance and reference movement angle that are assumed to move when the defect exists on the surface to be inspected. It has

本発明の表面欠陥検査方法は、照明手段から光を照射した被検査面を撮像手段により撮像すると共に、撮像手段に対する被検査面の位置を移動手段により相対的に移動させて、撮像時刻の異なる複数の画像を取得する撮像手順と、撮像手順により得られた撮像時刻の異なる複数の画像からそれぞれ欠陥候補を抽出する欠陥候補抽出手順と、欠陥候補抽出手順において抽出された欠陥候補について、撮像時刻の異なる少なくとも2枚以上の画像間での移動距離及び移動角度が、被検査面に欠陥が存在した時に移動すると想定される基準移動距離及び基準移動角度の範囲内にある場合に、欠陥であると判定する判定手順とを含むものである。 In the surface defect inspection method of the present invention, the surface to be inspected irradiated with light from the illumination means is imaged by the imaging means, and the position of the surface to be inspected with respect to the imaging means is relatively moved by the moving means so that the imaging time is different. an imaging procedure for obtaining a plurality of images; a defect candidate extraction procedure for extracting defect candidates from the plurality of images obtained by the imaging procedure at different imaging times; If the movement distance and movement angle between at least two or more different images are within the range of the reference movement distance and reference movement angle that are assumed to move when there is a defect on the surface to be inspected, it is a defect. and a judgment procedure for judging.

本発明によれば、抽出された欠陥候補が、撮像時刻の異なる少なくとも2枚以上の画像間において、被検査面に欠陥が存在した時に移動すると想定される基準移動距離及び基準移動角度の範囲内にある場合に欠陥であると判定するようにしたので、欠陥の経時的な連続性を見ることができ、被検査面の移動速度が一定でない、または移動軌跡が直線とならない場合でも、ノイズ等の誤検出を高い精度で排除することができると共に、欠陥の検出漏れも低減することができる。よって、欠陥を高い精度で検出することができる。 According to the present invention, the extracted defect candidate is within the range of the reference moving distance and the reference moving angle that are assumed to move when the defect exists on the surface to be inspected between at least two images taken at different times. Since it is determined that there is a defect when the erroneous detection can be eliminated with high accuracy, and failure to detect defects can also be reduced. Therefore, defects can be detected with high accuracy.

特に、予め、被検査面にマークを付して移動させながら撮像時刻の異なる複数の基準画像を撮像することで得られたマーク移動軌跡に基づき、基準移動角度を設定するようにすれば、高い精度で容易に欠陥を検出することができる。 In particular, if the reference movement angle is set based on the mark movement trajectory obtained by picking up a plurality of reference images at different imaging times while marking the surface to be inspected in advance and moving it, it is possible to set the reference movement angle. Defects can be easily detected with precision.

また、マーク移動軌跡の近似直線を引き、近似直線が幅方向において所定値以上離れている場合にはそれらの間に分割線を引き、近似直線及び分割線を基準線とした各基準線の角度に基づき基準移動角度を設定するようにすれば、より容易に短時間で欠陥を検出することができる。 In addition, an approximate straight line of the mark movement trajectory is drawn, and if the approximate straight line is separated by a predetermined value or more in the width direction, a dividing line is drawn between them, and the angle of each reference line with the approximate straight line and the dividing line as the reference line Defects can be detected more easily and in a short time by setting the reference movement angle based on the above.

本発明の一実施の形態に係る表面欠陥検査装置の全体構成を表す図である。It is a figure showing the whole surface defect inspection device composition concerning one embodiment of the present invention. 図1に示した欠陥検出手段の構成を表すブロック図である。2 is a block diagram showing the configuration of a defect detection means shown in FIG. 1; FIG. 前処理手段により得られた画像の一例を表すものである。An example of an image obtained by the preprocessing means is shown. 反射鏡像内欠陥候補抽出手段により得られた画像の一例を表すものである。4 shows an example of an image obtained by the reflecting mirror image defect candidate extracting means. 反射鏡像外欠陥候補抽出手段により得られた画像の一例を表すものである。4 shows an example of an image obtained by the non-reflection mirror image defect candidate extraction means. 勾配画像生成手段により得られた勾配画像の一例を表すものである。An example of a gradient image obtained by the gradient image generating means is shown. マーク移動軌跡の一例を表すものである。An example of a mark movement trajectory is shown. マーク移動軌跡をマークの移動方向において分割した例を表すものである。10A and 10B show an example in which the mark moving trajectory is divided in the moving direction of the mark. マーク移動軌跡の近似直線の一例を表すものである。It represents an example of an approximation straight line of the mark movement trajectory. 角度基本直線の一例を表すものである。It represents an example of the angle basic straight line. 本発明の一実施の形態に係る表面欠陥検査方法の手順を表す図である。It is a figure showing the procedure of the surface defect inspection method based on one embodiment of this invention. 図11に示した判定手順を説明するための図である。FIG. 12 is a diagram for explaining the determination procedure shown in FIG. 11;

以下、本発明の実施の形態について、図面を参照して詳細に説明する。 BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明の一実施の形態に係る表面欠陥検査装置1の全体構成を表すものである。この表面欠陥検査装置1は、例えば、自動車のボディの塗装面を被検査面Mとし、被検査面Mの表面に存在する欠陥を検出するものである。 FIG. 1 shows the overall configuration of a surface defect inspection apparatus 1 according to one embodiment of the present invention. This surface defect inspection apparatus 1 detects defects existing on the surface M to be inspected, for example, the painted surface of an automobile body.

表面欠陥検査装置1は、例えば、被検査面Mに光を照射する照明手段10と、この照明手段10により照射された被検査面Mを撮像して画像を得る撮像手段20と、この撮像手段20に対する被検査面Mの位置を相対的に移動させる移動手段30と、この移動手段30により撮像手段20と被検査面Mとを相対的に移動させながら任意の時間ごとに撮像手段20により撮像した複数の画像から欠陥を検出する欠陥検出手段40と、この欠陥検出手段40による検出結果を表示する表示手段50とを備えている。 The surface defect inspection apparatus 1 includes, for example, illumination means 10 for irradiating a surface M to be inspected with light, imaging means 20 for obtaining an image by imaging the surface M to be inspected illuminated by the illumination means 10, and this imaging means. a moving means 30 for relatively moving the position of the surface M to be inspected with respect to the surface 20; A defect detecting means 40 for detecting defects from a plurality of images thus obtained and a display means 50 for displaying the results of detection by the defect detecting means 40 are provided.

照明手段10は、照射光源11を有しており、照明光源11には蛍光灯を用いることが好ましい。自動車のボディの色は多種多様であるので白色光源が好ましく、価格も安価だからである。また、被検査面Mを多方向から観察できるように、被検査面Mに対して照射光源11を複数配置することが好ましい。撮像手段20は、例えば、CCDカメラ等のカメラ21を有しており、デジタル画像を得ることができるものである。カメラ21は、例えば、照射光源11に対向するように配置され、照明光源11である蛍光灯の反射鏡像及びその周辺領域を撮像するように構成される。 The illumination means 10 has an illumination light source 11, and the illumination light source 11 is preferably a fluorescent lamp. This is because a white light source is preferable because automobile bodies come in a wide variety of colors, and the price is also low. Moreover, it is preferable to arrange a plurality of irradiation light sources 11 with respect to the surface M to be inspected so that the surface M to be inspected can be observed from multiple directions. The imaging means 20 has a camera 21 such as a CCD camera, for example, and can obtain a digital image. The camera 21 is arranged, for example, so as to face the illumination light source 11, and is configured to capture a reflecting mirror image of the fluorescent lamp, which is the illumination light source 11, and its surrounding area.

移動手段30は、撮像手段20及び被検査面Mの少なくとも一方を移動させることにより、撮像手段20に対する被検査面Mの位置を相対的に移動させるものである。例えば、コンベヤー等の搬送手段により被検査面Mを一方向に一定の速度で搬送するように構成されていることが好ましい。欠陥検出手段40は、例えば、コンピュータにより構成されており、画像処理により欠陥を検出するように構成されている。表示手段50は、例えば、ディスプレイ等により構成され、例えば、欠陥の重心に円マーク等を付して表示するように構成されている。 The moving means 30 moves at least one of the imaging means 20 and the surface M to be inspected, thereby moving the position of the surface M to be inspected relative to the imaging means 20 . For example, it is preferable that the surface to be inspected M is conveyed in one direction at a constant speed by conveying means such as a conveyor. The defect detection means 40 is composed of, for example, a computer, and is configured to detect defects by image processing. The display means 50 is composed of, for example, a display or the like, and is configured to display, for example, a circle mark or the like on the center of gravity of the defect.

(欠陥検出手段40)
図2は、図1に示した欠陥検出手段40の構成を表すものである。欠陥検出手段40は、例えば、撮像手段20と被検査面Mとを相対的に移動させながら撮像手段20により撮像した撮像時刻の異なる複数の画像を記憶するメモリ等の画像記憶手段41と、この画像記憶手段41に記憶された撮像時刻の異なる複数の画像のそれぞれから欠陥候補を抽出する欠陥候補抽出手段42と、この欠陥候補抽出手段42により抽出された欠陥候補の移動状況から欠陥であるか否かを判定する判定手段43とを有している。
(Defect detection means 40)
FIG. 2 shows the configuration of the defect detection means 40 shown in FIG. The defect detection means 40 includes, for example, an image storage means 41 such as a memory for storing a plurality of images captured at different times captured by the imaging means 20 while the imaging means 20 and the surface M to be inspected are relatively moved; Defect candidate extraction means 42 for extracting defect candidates from each of a plurality of images captured at different times and stored in image storage means 41, and defect candidate extraction means 42 extracting defect candidates based on their movements. and determination means 43 for determining whether or not.

(欠陥候補抽出手段42)
欠陥候補抽出手段42は、例えば、撮像手段20により得られた画像を前処理する前処理手段421と、この前処理手段421により得られた画像について反射鏡像領域を検出する反射鏡像領域検出手段422と、検出された反射鏡像領域内の欠陥候補を抽出する反射鏡像内欠陥候補抽出手段423と、検出された反射鏡像領域外の欠陥候補を抽出する反射鏡像外欠陥候補抽出手段424と、前処理手段421により得られた画像から勾配画像を生成する勾配画像生成手段425と、欠陥候補を決定する欠陥候補決定手段426と、欠陥候補決定手段426により決定された欠陥候補を記憶する欠陥候補記憶手段427とを有している。
(Defect candidate extraction means 42)
The defect candidate extracting means 42 includes, for example, a preprocessing means 421 for preprocessing the image obtained by the imaging means 20 and a reflecting mirror image area detecting means 422 for detecting a reflecting mirror image area in the image obtained by the preprocessing means 421. Intra-mirror image defect candidate extraction means 423 for extracting defect candidates within the detected reflection mirror image area; Out-mirror image defect candidate extraction means 424 for extracting defect candidates outside the detected reflection mirror image area; Gradient image generation means 425 for generating a gradient image from the image obtained by means 421, defect candidate determination means 426 for determining defect candidates, and defect candidate storage means for storing the defect candidates determined by the defect candidate determination means 426. 427.

前処理手段421は、例えば、撮像手段20により得らえた画像をグレースケール画像等の濃淡画像に変換して、被検査面Mの領域を切り出すと共に、ノイズの低減を行い、2値化するものである。ノイズの低減としては、例えば、ガウシアンフィルタや、メディアンフィルタがある。前処理手段421により得られた画像の一例を図3に示す。反射鏡像領域検出手段422は、前処理手段421により得られた画像について、照明光源11である蛍光灯の反射鏡像領域を検出するものである。具体的には、例えば、図3において白色の部分が蛍光灯の反射鏡像領域であり、このような白色の部分を検出する。 For example, the preprocessing means 421 converts the image obtained by the imaging means 20 into a grayscale image or the like, cuts out the area of the inspection surface M, reduces noise, and binarizes the image. is. Noise reduction includes, for example, Gaussian filters and median filters. An example of the image obtained by the preprocessing means 421 is shown in FIG. The reflected mirror image area detection means 422 detects the reflected mirror image area of the fluorescent lamp, which is the illumination light source 11 , in the image obtained by the preprocessing means 421 . Specifically, for example, the white portion in FIG. 3 is the reflected mirror image area of the fluorescent lamp, and such a white portion is detected.

反射鏡像内欠陥候補抽出手段423は、例えば、反射鏡像領域検出手段422により検出された反射鏡像領域内の画素を反転し(すなわち、黒画素を白画素、白画素を黒画素とし)、反転後の白画素を記録して、反射鏡像領域内の白画素部分を反射鏡像内欠陥候補として抽出するものである。反射鏡像内欠陥候補抽出手段423により得られた画像の一例を図4に示す。図4において、白枠で囲まれている部分が反射鏡像内であり、〇で囲んだ中の白画素部分が反射鏡像内欠陥候補である。 The reflector image defect candidate extraction unit 423, for example, inverts the pixels in the reflector image area detected by the reflector image area detection unit 422 (that is, sets black pixels to white pixels and white pixels to black pixels), and after inversion are recorded, and the white pixel portion in the reflector image area is extracted as a defect candidate in the reflector image. FIG. 4 shows an example of an image obtained by the reflector image defect candidate extraction means 423 . In FIG. 4, the portion surrounded by the white frame is within the reflector image, and the white pixel portion within the circle is the defect candidate within the reflector image.

反射鏡像外欠陥候補抽出手段424は、例えば、反射鏡像領域検出手段422により検出された反射鏡像領域から関心領域を広げて各反射鏡像領域の間の領域を含むようにし、この関心領域に微分フィルタをかけて微分画像を生成し、この微分画像について白画素の塊の面積で閾値処理を行って面積の大きい塊を除去して、残った白画素部分を反射鏡像外欠陥候補として抽出するものである。反射鏡像外欠陥候補抽出手段424により得られた画像の一例を図5に示す。図5において〇で囲んだ中の白画素部分が反射鏡像外欠陥候補である。 The non-reflective mirror image defect candidate extracting means 424 expands a region of interest from the reflecting mirror image regions detected by the reflecting mirror image region detecting means 422 to include the regions between the respective reflecting mirror image regions, and the differential filter is applied to this region of interest. is applied to generate a differential image, threshold processing is performed on this differential image based on the area of white pixel clusters to remove large-area clusters, and the remaining white pixel portions are extracted as candidates for defects outside the reflector image. be. FIG. 5 shows an example of an image obtained by the non-reflection mirror image defect candidate extraction means 424 . In FIG. 5, white pixel portions surrounded by circles are candidate defects outside the reflection mirror image.

勾配画像生成手段425は、例えば、前処理手段421により前処理された画像について、直交する2方向において、正方向及び負方向の両方向から差分演算をそれぞれ行い、演算結果より勾配画像を生成するものである。差分演算は、デジタル画像において近似的な微分処理として実行されるものであり、勾配画像生成手段425は、正方向及び負方向の両方向から差分演算をそれぞれ行い、欠陥を、正の差分方向で強調されている正強調部分と、負の差分方向で強調されている負強調部分とで表すことにより、欠陥を2次元的に扱うことができるようにするものである。 The gradient image generating means 425, for example, performs difference calculations in both positive and negative directions in two orthogonal directions on the image preprocessed by the preprocessing means 421, and generates a gradient image from the calculation results. is. Difference calculation is performed as approximate differentiation processing in a digital image, and the gradient image generation means 425 performs difference calculation from both positive and negative directions, and emphasizes defects in the positive difference direction. Defects can be treated two-dimensionally by expressing them as positively emphasized portions where the difference is positive and negatively emphasized portions that are emphasized in the direction of the negative difference.

具体的には、例えば、勾配画像生成手段425は、式1及び式2を用い、直交する2方向について正方向及び負方向の両方向から差分演算をそれぞれ行い、式3及び式4を用い、得られた直交する2方向における第1方向差分及び第2方向差分の正方向及び負方向の勾配ベクトルの絶対値から勾配画像を生成するように構成されることが好ましい。 Specifically, for example, the gradient image generating means 425 uses equations 1 and 2 to perform difference calculations from both the positive direction and the negative direction for two orthogonal directions, and uses equations 3 and 4 to obtain Preferably, the gradient image is generated from the absolute values of the positive and negative gradient vectors of the first direction difference and the second direction difference in two orthogonal directions.

Figure 0007306620000001
(式1及び式2において、(x,y)は注目画素の座標を表し、I(x,y)は画素(x,y)の輝度値である。Gxn(x,y)とGyn(x,y)はそれぞれ直交する2方向における第1方向差分及び第2方向差分である。nは差分を取る方向を制御する変数であり、0の時は正方向を表し、1の時は負方向を表す。k及びsは差分をとるマスクを制御する変数である。ωは差分を取る直交軸を制御する変数であり、ω=1の時は縦横軸での差分となり、ω=0の時は斜めの直交軸での差分となる。γとθは同時に0ではなく、(x,y)を注目画素として差分を取る2つの画素の位置関係を制御する変数である。)
Figure 0007306620000001
(In Equations 1 and 2, (x, y) represents the coordinates of the target pixel, and I(x, y) is the luminance value of the pixel (x, y). G xn (x, y) and G yn (x, y) are the first direction difference and the second direction difference in two orthogonal directions respectively, n is a variable that controls the direction in which the difference is taken, 0 indicates the positive direction, and 1 indicates the positive direction. represents the negative direction, k and s are variables for controlling the mask for taking the difference, ω is a variable for controlling the orthogonal axis for taking the difference, and when ω=1, the difference is on the vertical and horizontal axes, and ω=0 γ and θ are not 0 at the same time, but are variables that control the positional relationship between two pixels whose difference is taken with (x, y) as the pixel of interest.)

Figure 0007306620000002
Figure 0007306620000002

例えば、ω=1、γ=θ=1の時、式1及び式2は、横方向及び縦方向について差分をとる式5及び式6になる。 For example, when .omega.=1 and .gamma.=.theta.=1, the equations 1 and 2 become the equations 5 and 6 that take differences in the horizontal and vertical directions.

Figure 0007306620000003
(式5及び式6において、符号の意味は式1及び式2と同一である。)
Figure 0007306620000003
(In formulas 5 and 6, the symbols have the same meanings as in formulas 1 and 2.)

式1及び式2により計算した直交する2方向の差分結果において、正の値は輝度が「明」から「暗」に変わるところを表し、負の値は逆に「暗」から「明」への変化を表している。そこで、その計算結果から正の値のみを用いると、正方向の差分で「明」から「暗」の変化を表し、負方向の差分で「暗」から「明」の変化を表すことができる。更に、式3及び式4を用いて、勾配画像を生成すると、例えば凸状欠陥が存在する場合、凸状欠陥の半分が正の差分方向で強調され、反対半分が負の差分方向で強調されて表される。よって、例えば、正の差分方向で強調されている正強調部分と、負の差分方向で強調されている負強調部分とを異なる色で表すことにより、欠陥を容易に認識することができる。 In the two orthogonal difference results calculated by Equations 1 and 2, a positive value represents a change in brightness from "bright" to "dark", and a negative value represents a change from "dark" to "bright". represents a change in Therefore, if only positive values are used from the calculation results, the positive difference can represent the change from "bright" to "dark", and the negative difference can represent the change from "dark" to "bright". . Furthermore, using Equations 3 and 4 to generate a gradient image, for example, if a convex defect is present, half of the convex defect is enhanced in the positive differential direction and the opposite half is enhanced in the negative differential direction. is represented by Therefore, for example, a defect can be easily recognized by using different colors to represent a positively emphasized portion that is emphasized in the positive direction and a negatively emphasized portion that is emphasized in the negative direction.

図6に勾配画像の一例を示す。図6(A)は、正の差分方向で強調されている正強調部分を緑色、負の差分方向で強調されている負強調部分を赤色で表したものである。図6(A)において、左右方向に延びる2本の線が蛍光灯の反射鏡像の境界領域、挟まれた部分が蛍光灯の反射鏡像であり、白破線で囲んだ部分が凸状欠陥である。図6(B)は図6(A)の白破線で囲んだ部分を拡大し、正の差分方向で強調されている正強調部分(緑色部分)を左下斜線のハッチングで表し、負の差分方向で強調されている負強調部分(赤色部分)を右下斜線のハッチングで表したものである。なお、反射鏡像外の領域でも同様に表されるが、欠陥の場合、背景が暗く、欠陥部分が明るいので、正の差分方向で強調されている正強調部分と、負の差分方向で強調されている負強調部分の位置が逆になる。 FIG. 6 shows an example of a gradient image. FIG. 6A shows a positively emphasized portion that is emphasized in the direction of the positive difference in green, and a negatively emphasized portion that is emphasized in the direction of the negative difference in red. In FIG. 6A, the two lines extending in the left-right direction are the boundary area of the reflector image of the fluorescent lamp, the sandwiched portion is the reflector image of the fluorescent lamp, and the portion surrounded by the white dashed line is the convex defect. . FIG. 6(B) is an enlarged view of the portion surrounded by the white dashed line in FIG. 6(A). The negatively emphasized portion (red portion) highlighted in , is indicated by hatching with diagonal lines in the lower right. In the case of a defect, the background is dark and the defect portion is bright, so the area outside the reflecting mirror image is similarly represented. The position of the negatively emphasized portion is reversed.

一方、欠陥ではなく、いわゆる“ゆず肌”が存在する場合には、図6に示したような、半分が正の差分方向で強調され、反対半分が負の差分方向で強調されているような部分は現れにくい。よって、勾配画像生成手段425により生成した勾配画像を用いれば、欠陥とゆず肌とを容易に区別することができるので好ましい。 On the other hand, if there is a so-called "yuzu peel" instead of a defect, the half is emphasized in the positive direction of difference and the other half is emphasized in the direction of negative difference, as shown in FIG. parts are hard to find. Therefore, it is preferable to use the gradient image generated by the gradient image generating means 425 because the defect can be easily distinguished from the orange peel.

また、勾配画像生成手段425は、直交する2方向において、正方向及び負方向の両方向から差分演算をそれぞれ行い、演算結果より勾配画像を生成するのではなく、直交する2方向において、差分演算を行い、演算結果より正の値のみを用いて算出する勾配ベクトルの絶対値と、演算結果より負の値のみを用いて算出する勾配ベクトルの絶対値とから勾配画像を生成するように構成するようにしてもよい。 Further, the gradient image generating means 425 does not perform difference calculations in both the positive direction and the negative direction in two orthogonal directions, and generates a gradient image from the calculation results, but performs difference calculation in the two orthogonal directions. and a gradient image is generated from the absolute value of the gradient vector calculated using only the positive values from the calculation result and the absolute value of the gradient vector calculated using only the negative value from the calculation result. can be

具体的には、例えば、勾配画像生成手段425は、式7及び式8を用い、直交する2方向について差分演算を行い、式9及び式10を用い、差分演算の結果より正の値のみを用いて算出する勾配ベクトルの絶対値と負の値のみを用いて算出する勾配ベクトルの絶対値とから勾配画像を生成するように構成されることが好ましい。 Specifically, for example, the gradient image generating means 425 uses Equations 7 and 8 to perform difference calculations in two orthogonal directions, and uses Equations 9 and 10 to obtain only positive values from the result of the difference calculation. Preferably, the gradient image is generated from the absolute values of the gradient vectors calculated using only negative values and the absolute values of the gradient vectors calculated using only negative values.

Figure 0007306620000004
(式7及び式8において、(x,y)は注目画素の座標を表し、I(x,y)は画素(x,y)の輝度値である。G(x,y)とG(x,y)はそれぞれ直交する2方向における第1方向差分及び第2方向差分である。k及びsは差分をとるマスクを制御する変数である。ωは差分を取る直交軸を制御する変数であり、ω=1の時は縦横軸での差分となり、ω=0の時は斜めの直交軸での差分となる。γとθは同時に0ではなく、(x, y)を注目画素として差分を取る2つの画素の位置関係を制御する変数である。)
Figure 0007306620000004
(In equations 7 and 8, (x, y) represents the coordinates of the pixel of interest, and I(x, y) is the luminance value of pixel (x, y).G x (x, y) and G y (x, y) are the first direction difference and the second direction difference in the two orthogonal directions respectively, k and s are the variables controlling the mask for taking the difference, ω is the variable for controlling the orthogonal axis for taking the difference. When ω = 1, it is the difference on the vertical and horizontal axes, and when ω = 0, it is the difference on the oblique orthogonal axis. It is a variable that controls the positional relationship between the two pixels for which the difference is taken.)

Figure 0007306620000005
Figure 0007306620000005

例えば、ω=1、γ=θ=1の時、式7及び式8は、横方向及び縦方向について差分をとる式11及び式12になる。 For example, when .omega.=1 and .gamma.=.theta.=1, equations 7 and 8 become equations 11 and 12 that take differences in the horizontal and vertical directions.

Figure 0007306620000006
(式11及び式12において、符号の意味は式7及び式8と同一である。)
Figure 0007306620000006
(In formulas 11 and 12, the symbols have the same meanings as in formulas 7 and 8.)

式7及び式8により計算した直交する2方向の差分結果において、正の値は輝度が「明」から「暗」に変わるところを表し、負の値は逆に「暗」から「明」への変化を表しているので、その計算結果から正の値のみを用いると、「明」から「暗」の変化を表し、負の値のみを用いると「暗」から「明」の変化を表すことができる。よって、式9及び式10を用いて、勾配画像を生成すると、例えば凸状欠陥が存在する場合、凸状欠陥の半分が正の値で強調され、反対半分が負の値で強調されて表される。よって、例えば、正の値で強調されている正強調部分と、負の値で強調されている負強調部分とを異なる色で表すことにより、欠陥を容易に認識することができる。 In the two orthogonal difference results calculated by Equations 7 and 8, a positive value represents a change in brightness from "bright" to "dark", and a negative value represents a change from "dark" to "bright". Therefore, using only positive values from the calculation results indicates a change from "bright" to "dark", and using only negative values indicates a change from "dark" to "bright" be able to. Therefore, if a gradient image is generated using Equations 9 and 10, for example, if a convex defect exists, half of the convex defect is emphasized with a positive value and the opposite half is emphasized with a negative value. be done. Therefore, for example, a defect can be easily recognized by expressing a positively emphasized portion emphasized with a positive value and a negatively emphasized portion emphasized with a negative value in different colors.

欠陥候補決定手段426は、例えば、反射鏡像内欠陥候補抽出手段423により抽出した反射鏡像内欠陥候補、及び、反射鏡像外欠陥候補抽出手段424により抽出した反射鏡像外欠陥候補と、勾配画像生成手段425により生成した勾配画像とから、欠陥候補を決定するものである。具体的には、生成した勾配画像において、抽出した反射鏡像内欠陥候補の領域又は反射鏡像外欠陥候補の領域に、正強調部分と、負強調部分とが現れており、かつ、これら正強調部分及び負強調部分の画素数が所定の閾値以上である場合に、その領域を欠陥候補として決定し、それ以外の場合には欠陥でないと判別するように構成されることが好ましい。 The defect candidate determination means 426, for example, determines the reflector image defect candidate extracted by the reflector image defect candidate extraction means 423, the reflection mirror image defect candidate extracted by the reflection mirror image defect candidate extraction means 424, and the gradient image generation means Defect candidates are determined from the gradient image generated by 425 . Specifically, in the generated gradient image, a positively emphasized portion and a negatively emphasized portion appear in the extracted reflector image defect candidate region or outside the reflector image defect candidate region, and these positively emphasized portions And, when the number of pixels in the negatively emphasized portion is equal to or greater than a predetermined threshold value, the region is preferably determined as a defect candidate, and in other cases it is determined not to be a defect.

欠陥候補記憶手段427は、例えば、メモリ等により構成され、欠陥候補決定手段426により決定された欠陥候補の重心座標を記憶するように構成されている。 The defect candidate storage unit 427 is configured by, for example, a memory or the like, and is configured to store barycentric coordinates of defect candidates determined by the defect candidate determination unit 426 .

(判定手段43)
判定手段43は、例えば、欠陥候補抽出手段42により抽出された欠陥候補において、撮像時刻の異なる少なくとも2枚以上の画像間での移動距離及び移動角度が、被検査面Mに欠陥が存在した時に移動すると想定される基準移動距離及び基準移動角度の範囲内にある場合に、欠陥であると判定する連続性判断手段431と、基準移動距離及び基準移動角度を記憶する基準値記憶手段432とを有している。欠陥候補の移動距離及び移動角度は、例えば、撮像時刻の順に連続する3枚以上の画像間について見ることが好ましいが、被検査面Mに応じて、画像数は任意に決定することができる。また、被検査面Mに応じて、2枚の画像間で見るようにしてもよい。欠陥候補の移動距離は、例えば、撮像時刻の異なる画像間における欠陥候補を結ぶ直線の長さであり、欠陥候補の移動角度は、例えば、撮像時刻の異なる画像間における欠陥候補を結ぶ直線の角度である。
(Determination means 43)
For example, in the defect candidates extracted by the defect candidate extracting means 42, the determination means 43 determines that the movement distance and the movement angle between at least two or more images taken at different times are the same as when a defect exists on the surface M to be inspected. Continuity determination means 431 for determining that a defect exists when the movement is within the range of the reference movement distance and the reference movement angle, and reference value storage means 432 for storing the reference movement distance and the reference movement angle. have. The moving distance and moving angle of the defect candidate are preferably determined between three or more consecutive images in order of imaging time, but the number of images can be arbitrarily determined according to the surface M to be inspected. Also, depending on the surface M to be inspected, it may be viewed between two images. The movement distance of a defect candidate is, for example, the length of a straight line connecting defect candidates between images captured at different times, and the movement angle of a defect candidate is, for example, the angle of a straight line connecting defect candidates between images captured at different times. is.

カメラレンズには歪曲収差があるため、移動手段30による移動速度を一定としても、被検査面Mに存在する欠陥の移動軌跡は直線とならないので、被検査面Mに存在する欠陥の移動軌跡に基づいて判断することにより高い精度で判断することができる。被検査面Mに欠陥が存在した時に移動すると想定される基準移動距離及び基準移動角度は、例えば、予め、被検査面Mにマークを付して移動手段30により一定速度で移動させながら撮像手段20により一定の時間間隔で撮像することにより撮像時刻の異なる複数の基準画像を取得し、これら複数の基準画像を合わせることにより得られたマーク移動軌跡に基づいて設定されることが好ましい。図7にマーク移動軌跡の一例を示す。 Since the camera lens has distortion aberration, even if the movement speed of the moving means 30 is constant, the movement trajectory of the defect existing on the inspection surface M is not straight. It is possible to make a judgment with high accuracy by making a judgment based on the above. The reference movement distance and the reference movement angle assumed to move when a defect exists on the surface M to be inspected are, for example, previously marked on the surface M to be inspected and moved by the moving means 30 at a constant speed while the imaging means It is preferable that a plurality of reference images captured at different times are acquired by 20 at regular time intervals and set based on the mark movement trajectory obtained by combining the plurality of reference images. FIG. 7 shows an example of the mark movement trajectory.

図7に示したように、マークの移動距離は、画像における欠陥の位置により異なる。基準移動距離は、マーク移動軌跡に基づき、画像における欠陥の位置(すなわち座標)に応じて所定の範囲内に設定するようにしてもよいが、連続性判断手段431では、基準移動距離に加えて基準移動角度でも判断するので、基準移動距離の範囲は比較的広くてもよい。例えば、移動距離がマイナスのもの(移動方向が逆のもの)、及び、移動距離が所定の距離閾値よりも大きいものを排除することができればよいので、0よりも大きく所定の距離閾値以下とすることが好ましい。距離閾値は、例えば、マーク移動軌跡に基づきマークの移動時間に対応して決定することが好ましい。 As shown in FIG. 7, the moving distance of the mark varies depending on the position of the defect in the image. The reference moving distance may be set within a predetermined range according to the position (that is, coordinates) of the defect in the image based on the mark moving trajectory. Since the determination is also made based on the reference movement angle, the range of the reference movement distance may be relatively wide. For example, it suffices to exclude negative moving distances (moving in the opposite direction) and moving distances greater than a predetermined distance threshold, so that the distance is greater than 0 and less than or equal to the predetermined distance threshold. is preferred. It is preferable that the distance threshold is determined corresponding to the mark movement time based on the mark movement trajectory, for example.

また、図7に示したように、マークの移動角度も、画像における欠陥の位置により異なる。基準移動角度は、マーク移動軌跡に基づき、画像における欠陥の位置(すなわち座標)に応じて所定の範囲内に設定されることが好ましい。例えば、マーク移動軌跡の近似直線を引き、この近似直線を基準線として、各基準線の角度に基づいて基準移動角度を設定することが好ましい。なお、マーク移動軌跡は、図7に示したように曲線状であるので、誤差が大きくならないように、例えば、図8に示したように、マークの移動方向においてマーク移動軌跡を複数に分割して、それぞれにおいて近似直線を引くことが好ましい。図8ではマークの移動方向において3つに分割する場合について示したが、マーク移動軌跡に応じて、2つに分割してもよく、4つ以上に分割してもよい。図9に近似直線の一例を示す。図9において白破線はマーク移動軌跡の分割位置である。 Also, as shown in FIG. 7, the movement angle of the mark also varies depending on the position of the defect in the image. The reference movement angle is preferably set within a predetermined range according to the position (that is, the coordinates) of the defect in the image based on the mark movement trajectory. For example, it is preferable to draw an approximate straight line of the mark movement trajectory, use the approximate straight line as a reference line, and set the reference movement angle based on the angle of each reference line. Since the mark movement trajectory is curved as shown in FIG. 7, the mark movement trajectory is divided into a plurality of parts in the mark movement direction as shown in FIG. It is preferable to draw an approximation straight line in each case. FIG. 8 shows the case of dividing into three in the moving direction of the mark, but it may be divided into two or four or more according to the mark movement trajectory. FIG. 9 shows an example of the approximate straight line. In FIG. 9, white dashed lines indicate division positions of the mark movement trajectory.

更に、隣接するマークの移動軌跡の近似直線がマークの移動方向に対する幅方向において所定値以上離れている場合には、それらの間を幅方向において分割する分割線を引き、近似直線及び分割線を基準線とすることが好ましい。すなわち、隣接する近似直線の間が離れている場合には、それらの間を分割する分割直線を基準線に加えることが好ましい。
欠陥の判定精度を高くするためである。分割線は、例えば、射影変換により引くことができる。
Furthermore, when the approximate straight lines of the moving trajectories of adjacent marks are separated by a predetermined value or more in the width direction with respect to the moving direction of the marks, a dividing line is drawn to divide them in the width direction, and the approximate straight line and the dividing line are drawn. A reference line is preferred. That is, when adjacent approximate straight lines are separated from each other, it is preferable to add a dividing straight line dividing them to the reference line.
This is to improve the accuracy of defect determination. The dividing line can be drawn, for example, by projective transformation.

具体的には、基準移動角度の範囲は、欠陥の位置(すなわち座標)に応じて、隣接する2本の基準線の角度の範囲とすることが好ましい。より容易に短時間で欠陥を検出することができるからである。なお、判定手段43における移動角度、基準移動角度、基準線の角度は、マークの移動方向に対する幅方向に延長した角度基本直線に対する角度である。図10に角度基本直線の一例を示す。図10において、白太実線は角度基本直線、白破線はマーク移動軌跡の分割位置である。すなわち、連続性判断手段431は、欠陥候補抽出手段42により抽出された欠陥候補の移動角度が、その欠陥候補が隣接する2本の基準線の角度の間である場合には、基準移動角度の範囲内にあると判断するように構成されていることが好ましい。 Specifically, the range of reference movement angles is preferably the range of angles of two adjacent reference lines according to the position (that is, coordinates) of the defect. This is because defects can be detected more easily and in a short time. The moving angle, the reference moving angle, and the angle of the reference line in the determination means 43 are the angles with respect to the angle basic straight line extending in the width direction with respect to the moving direction of the mark. FIG. 10 shows an example of the angle basic straight line. In FIG. 10, the white solid line is the angle basic straight line, and the white dashed line is the dividing position of the mark movement trajectory. That is, if the moving angle of the defect candidate extracted by the defect candidate extracting means 42 is between the angles of the two reference lines adjacent to the defect candidate, the continuity determining means 431 determines the reference moving angle. It is preferably configured to determine that it is within range.

この表面欠陥検査装置1は、例えば、次のようにして用いられる。図11は、表面欠陥検査装置1を用いた表面欠陥検査方法の手順を表すものである。この表面欠陥検査方法では、まず、照明手段10から光を照射した被検査面Mを撮像手段20により撮像すると共に、撮像手段20に対する被検査面Mの位置を移動手段30により相対的に移動させて、撮像時間の異なる複数の画像を取得する(ステップS110;撮像手順)。撮像手段20により撮像された画像は、画像記憶手段41に保存する。 This surface defect inspection apparatus 1 is used, for example, as follows. FIG. 11 shows the procedure of the surface defect inspection method using the surface defect inspection apparatus 1. As shown in FIG. In this surface defect inspection method, first, the imaging means 20 captures an image of the surface M to be inspected irradiated with light from the illumination means 10, and the moving means 30 relatively moves the position of the inspection surface M with respect to the imaging means 20. to acquire a plurality of images with different imaging times (step S110; imaging procedure). The image captured by the imaging means 20 is stored in the image storage means 41 .

次いで、例えば、撮像手順(ステップS110)により得られた撮像時刻の異なる複数の画像からそれぞれ欠陥候補を抽出する(ステップS120;欠陥候補抽出手順)。欠陥候補抽出手順(ステップS120)では、例えば、まず、前処理手段421により、上述したようにして撮像手段20で得られた画像について前処理を行う(ステップS121;前処理手順)。 Next, for example, defect candidates are extracted from a plurality of images captured at different times obtained by the imaging procedure (step S110) (step S120; defect candidate extraction procedure). In the defect candidate extraction procedure (step S120), for example, first, the preprocessing means 421 preprocesses the image obtained by the imaging means 20 as described above (step S121; preprocessing procedure).

続いて、例えば、反射鏡像領域検出手段422により、前処理した画像から照明光源11である蛍光灯の反射鏡像領域を検出する(ステップS122;反射鏡像領域検出手順)。反射鏡像領域を検出できない場合には(ステップS122:N)処理を終了し、反射鏡像領域を検出した場合には(ステップS122:Y)次の手順に進む。次いで、例えば、前処理した画像から勾配画像生成手段425により上述したようにして勾配画像を生成する(ステップS123;勾配画像生成手順)。 Subsequently, for example, the reflected mirror image area detection means 422 detects the reflected mirror image area of the fluorescent lamp, which is the illumination light source 11, from the preprocessed image (step S122; reflected mirror image area detection procedure). If the reflected mirror image area cannot be detected (step S122: N), the process is terminated, and if the reflected mirror image area is detected (step S122: Y), the process proceeds to the next step. Next, for example, a gradient image is generated from the preprocessed image by the gradient image generation means 425 as described above (step S123; gradient image generation procedure).

次いで、例えば、反射鏡像内欠陥候補抽出手段423により、反射鏡像領域検出手段422により検出された反射鏡像内について、上述したようにして、反射鏡像内欠陥候補を抽出する(ステップS124;反射鏡像内欠陥候補抽出手順)。また、例えば、反射鏡像外欠陥候補抽出手段424により、反射鏡像領域検出手段422により検出された反射鏡像外について、上述したようにして、反射鏡像外欠陥候補を抽出する(ステップS125;反射鏡像外欠陥候補抽出手順)。 Next, for example, the reflector image defect candidate extracting means 423 extracts the reflector image defect candidates in the reflector image detected by the reflector image region detection means 422 as described above (step S124; defect candidate extraction procedure). Further, for example, for the outside of the reflector image detected by the reflector image area detection unit 422, the outside of the reflector image defect candidate extraction unit 424 extracts the outside of the reflector image defect candidate as described above (step S125; defect candidate extraction procedure).

次いで、例えば、欠陥候補決定手段426により、勾配画像生成手段(ステップS123)において生成した勾配画像と、反射鏡像内欠陥候補抽出手順(ステップS124)において抽出した反射鏡像内欠陥候補、及び、反射鏡像外欠陥候補抽出手順(ステップS125)において抽出した反射鏡像外欠陥候補とから、欠陥候補を決定する(ステップpS126;欠陥候補決定手順)。欠陥候補決定手段426により決定された欠陥候補は欠陥候補記憶手段427に保存する。 Next, for example, the defect candidate determining means 426 uses the gradient image generated by the gradient image generating means (step S123), the defect candidate in the reflector image extracted in the defect candidate extraction procedure in the reflector image (step S124), and the reflector image Defect candidates are determined from the defect candidates outside the reflecting mirror image extracted in the external defect candidate extraction procedure (step pS125) (step pS126; defect candidate determination procedure). The defect candidates determined by the defect candidate determination means 426 are stored in the defect candidate storage means 427 .

欠陥候補抽出手順(ステップS120)により欠陥候補を抽出した後、例えば、判定手段43において、連続性判断手段431により、上述したようにして抽出した欠陥候補が欠陥であるか否かを判定する(ステップS130;判定手順)。すなわち、抽出された欠陥候補において、撮像時刻の異なる少なくとも2枚以上の画像間での移動距離及び移動角度が、被検査面Mに欠陥が存在した時に移動すると想定される基準移動距離及び基準移動角度の範囲内にある場合に、欠陥であると判定する。 After the defect candidate is extracted by the defect candidate extraction procedure (step S120), for example, in the determination means 43, the continuity determination means 431 determines whether or not the defect candidate extracted as described above is a defect ( step S130; determination procedure). That is, in the extracted defect candidate, the movement distance and the movement angle between at least two or more images taken at different times are the reference movement distance and the reference movement that are assumed to move when the defect exists on the inspection surface M. If it is within the range of angles, it is determined to be defective.

具体的には、まず、図12に示したように、撮像時刻の順に連続する4枚の画像間において、欠陥候補の移動距離が基準移動距離の範囲内にあるものを抽出し、それらをグループ化する(ステップS131;移動距離判断手順)。具体的には、例えば、撮像時刻の最も遅い画像を本フレームとし、本フレームにおいて抽出された各欠陥候補のうちの1つを取り出し、他の画像において抽出された各欠陥候補のうち、本フレームで取り出した欠陥候補との距離が基準距離の範囲内にあるものを抽出する。図12において、〇は本フレームで取り出した1つの欠陥候補、△は本フレームよりも1つ前のフレームから抽出した欠陥候補、□は本フレームよりも2つ前のフレームから抽出した欠陥候補、▽は本フレームよりも3つ前のフレームから抽出した欠陥候補であり、△、□、▽は、〇で示した本フレームで取り出した1つの欠陥候補に対して、他のフレームにおいて基準移動距離の範囲内にある欠陥候補である。 Specifically, first, as shown in FIG. 12, among four consecutive images in order of imaging time, defect candidates whose movement distance is within the reference movement distance range are extracted, and these are grouped. (step S131; movement distance determination procedure). Specifically, for example, the image captured at the latest time is taken as the current frame, one of the defect candidates extracted in the current frame is extracted, and among the defect candidates extracted in the other images, the current frame Defect candidates whose distance from the extracted defect candidate is within the range of the reference distance are extracted. In FIG. 12, ◯ is one defect candidate extracted in this frame, Δ is a defect candidate extracted from the frame one frame before this frame, □ is a defect candidate extracted from two frames before this frame, ▽ is a defect candidate extracted from the frame three frames before this frame, and △, □, ▽ are the reference movement distances in other frames for one defect candidate extracted in this frame indicated by 〇. is a defect candidate within the range of .

基準移動距離は、例えば、上述したように、0よりも大きく所定の距離閾値以下とする。所定の距離閾値としては、例えば、全てのフレームにおいて欠陥候補の中心の移動量の最大値をとることができる。例えば、図12において×で示した本フレームよりも前のフレームにおける欠陥候補は、〇で示した本フレームで取り出した欠陥候補に対して移動方向が逆(移動距離がマイナス)であるか、又は、〇で示した本フレームの欠陥候補に対して所定の距離閾値よりも離れているので排除される。なお、本フレームで取り出した1つの欠陥候補について、他の全てのフレームにおいて基準移動距離の範囲内にある欠陥候補がなくてもよい。例えば、撮像時刻順に連続する4枚の画像間について欠陥候補を抽出する場合、第2、3フレームは検出なしでも、第1、4フレームにおいて検出された欠陥候補が基準移動距離の範囲内にあれば、第1、4フレームの画像で抽出された欠陥候補をグループ化してもよい。欠陥候補の検出漏れもあるからである。これを本フレームにおいて抽出された各欠陥候補について、順に行う。 The reference movement distance is, for example, greater than 0 and equal to or less than a predetermined distance threshold, as described above. As the predetermined distance threshold, for example, the maximum amount of movement of the center of the defect candidate in all frames can be used. For example, in FIG. 12, the defect candidate in the frame before the current frame indicated by x has a movement direction opposite to the defect candidate extracted in the current frame indicated by ◯ (the movement distance is negative), or , is removed from the defect candidate of this frame indicated by ◯ because it is farther than a predetermined distance threshold. Note that for one defect candidate extracted in this frame, there may be no defect candidate within the range of the reference movement distance in all other frames. For example, when extracting defect candidates between four consecutive images in order of imaging time, even if the second and third frames are not detected, the defect candidates detected in the first and fourth frames are within the range of the reference moving distance. For example, defect candidates extracted from the first and fourth frame images may be grouped. This is because there is also an omission in the detection of defect candidates. This is performed in order for each defect candidate extracted in this frame.

次いで、例えば、移動距離判断手順(ステップS131)においてグループ化した欠陥候補について、隣接する欠陥候補間の移動角度が基準移動角度の範囲内にある場合に、欠陥であると判定する(ステップS132;移動角度判断手順)。具体的には、例えば、上述したように、予め、被検査面Mにマークを付して一定速度で移動させながら一定の時間間隔で撮像することにより得られたマーク移動軌跡に基づいて基準線を引き、その各基準線の角度に基づいて基準移動角度を設定しておき、グループ化した欠陥候補において、隣接する欠陥候補間の移動角度が、その欠陥候補が隣接する2本の基準線の角度の間である場合に、基準移動角度の範囲内にあると判断する。なお、図12において、隣接する欠陥候補間を結ぶ直線を破線で示している。これをグループ化した欠陥候補の各グループについて、順に行う。 Next, for example, the defect candidates grouped in the moving distance determination procedure (step S131) are determined to be defective when the moving angle between adjacent defect candidates is within the range of the reference moving angle (step S132; movement angle judgment procedure). Specifically, for example, as described above, the reference line is based on the mark movement trajectory obtained by marking the surface to be inspected M in advance and moving it at a constant speed while taking images at constant time intervals. , and the reference movement angle is set based on the angle of each reference line, and in the grouped defect candidates, the movement angle between adjacent defect candidates is If it is between the angles, it is determined to be within the range of the reference movement angle. In addition, in FIG. 12, straight lines connecting adjacent defect candidates are indicated by dashed lines. This is performed in turn for each group of defect candidates.

そののち、表示手段50により、判定手順(ステップS130)で得られた判定結果を表示する(ステップS140;表示手順)。表示手段50では、例えば、ディスプレイ等に、欠陥の重心に円マーク等を付して表示する。これにより、表面欠陥の検査を行うことができる。 After that, the display means 50 displays the determination result obtained in the determination procedure (step S130) (step S140; display procedure). In the display means 50, for example, the center of gravity of the defect is displayed on a display or the like by attaching a circle mark or the like. Thereby, surface defects can be inspected.

このように本実施の形態によれば、抽出された欠陥候補が、撮像時刻の異なる少なくとも2枚以上の画像間において、被検査面Mに欠陥が存在した時に移動すると想定される基準移動距離及び基準移動角度の範囲内にある場合に欠陥であると判定するようにしたので、欠陥の経時的な連続性を見ることができ、被検査面Mの移動速度が一定でない、または移動軌跡が直線とならない場合でも、ノイズ等の誤検出を高い精度で排除することができると共に、欠陥の検出漏れも低減することができる。よって、欠陥を高い精度で検出することができる。 As described above, according to the present embodiment, the extracted defect candidate is assumed to move between at least two or more images captured at different times when the defect exists on the surface M to be inspected. Since it is determined that the defect is within the range of the reference movement angle, it is possible to see the continuity of the defect over time. Even if not, erroneous detection such as noise can be eliminated with high accuracy, and failure to detect defects can also be reduced. Therefore, defects can be detected with high accuracy.

特に、予め、被検査面Mにマークを付して移動させながら撮像時刻の異なる複数の基準画像を撮像することで得られたマーク移動軌跡に基づき、基準移動角度を設定するようにすれば、高い精度で容易に欠陥を検出することができる。 In particular, if the reference movement angle is set based on the mark movement trajectory obtained by picking up a plurality of reference images at different imaging times while marking the surface M to be inspected in advance and moving the mark, Defects can be easily detected with high accuracy.

また、マーク移動軌跡の近似直線を引き、近似直線が幅方向において所定値以上離れている場合にはそれらの間に分割線を引き、近似直線及び分割線を基準線とした各基準線の角度に基づき基準移動角度を設定するようにすれば、より容易に短時間で欠陥を検出することができる。 In addition, an approximate straight line of the mark movement trajectory is drawn, and if the approximate straight line is separated by a predetermined value or more in the width direction, a dividing line is drawn between them, and the angle of each reference line with the approximate straight line and the dividing line as the reference line Defects can be detected more easily and in a short time by setting the reference movement angle based on the above.

以上、実施の形態を挙げて本願発明を説明したが、本発明は上記実施の形態に限定されるものではなく、種々変形可能である。例えば、上記実施の形態では、各構成要素について具体的に説明したが、全ての構成要素を備えていなくてもよく、また、他の構成要素を備えていてもよい。 Although the present invention has been described above with reference to the embodiments, the present invention is not limited to the above embodiments and can be variously modified. For example, in the above embodiments, each component was specifically described, but not all components may be included, or other components may be included.

また、上記実施の形態では、自動車のボディの塗装面を検査する場合について具体的に説明したが、本願発明は、自動車のボディに限らず、他の塗装製品の表面検査をする場合についても適用することができる。更に、塗装面に限らず、反射性質を有する表面の検査をする場合にも適用することもできる。 Further, in the above embodiment, the case of inspecting the painted surface of the body of an automobile has been specifically described, but the present invention is not limited to the body of an automobile, and is also applicable to the case of inspecting the surface of other painted products. can do. Furthermore, it can be applied not only to coated surfaces but also to inspection of surfaces having reflective properties.

更に、上記実施の形態では、欠陥候補抽出手段42及び欠陥候補抽出手順(ステップS120)について具体的に説明したが、他の構成及び手順により欠陥候補を抽出するようにしてもよい。 Furthermore, although the defect candidate extraction means 42 and the defect candidate extraction procedure (step S120) have been specifically described in the above embodiment, defect candidates may be extracted by other configurations and procedures.

1…表面欠陥検査装置、10…照明手段、11…照明光源、20…撮像手段、21…カメラ、30…移動手段、40…欠陥検出手段、41画像記憶手段、42…欠陥候補抽出手段、421…前処理手段、422…反射鏡像領域検出手段、423…反射鏡像内欠陥候補抽出手段、424…反射鏡像外欠陥候補抽出手段、425…勾配画像生成手段、426…
欠陥候補決定手段、427…欠陥候補記憶手段、43…判定手段、431…連続性判断手段、432…基準値記憶手段432、50…表示手段、M…被検査面
DESCRIPTION OF SYMBOLS 1... Surface defect inspection apparatus 10... Illumination means 11... Illumination light source 20... Imaging means 21... Camera 30... Moving means 40... Defect detection means 41... Image storage means 42... Defect candidate extraction means 421 Preprocessing means 422 Reflector image region detection means 423 Intrareflector image defect candidate extraction means 424 Outside reflector image defect candidate extraction means 425 Gradient image generation means 426
Defect candidate determination means 427 Defect candidate storage means 43 Determination means 431 Continuity determination means 432 Reference value storage means 432, 50 Display means M Surface to be inspected

Claims (4)

照明手段から光を照射した被検査面を撮像手段により撮像すると共に、前記撮像手段に対する前記被検査面の位置を相対的に移動させて、撮像時刻の異なる複数の画像を取得する撮像手順と、
前記撮像手順により得られた撮像時刻の異なる複数の画像から、それぞれ、前記照明手段の反射鏡像領域を検出し、反射鏡像領域内について反射鏡像内欠陥候補を抽出すると共に、反射鏡像領域外について反射鏡像外欠陥候補を抽出することにより、欠陥候補を抽出する欠陥候補抽出手順と、
前記欠陥候補抽出手順において抽出された欠陥候補について、撮像時刻の異なる少なくとも2枚以上の画像間での移動距離及び移動角度が、前記被検査面に欠陥が存在した時に移動すると想定される予め得た移動軌跡に基づいて設定される基準移動距離及び基準移動角度の範囲内にある場合に、欠陥であると判定する判定手順と
を含むことを特徴とする表面欠陥検査方法。
an imaging procedure for capturing an image of a surface to be inspected irradiated with light from an illuminating means by an imaging means, and acquiring a plurality of images at different imaging times by relatively moving the position of the surface to be inspected with respect to the imaging means;
A reflecting mirror image area of the illumination means is detected from a plurality of images captured at different times obtained by the imaging procedure, and defect candidates within the reflecting mirror image area are extracted within the reflecting mirror image area. a defect candidate extraction procedure for extracting defect candidates by extracting non-mirror image defect candidates;
Regarding the defect candidate extracted in the defect candidate extraction procedure, the moving distance and moving angle between at least two images taken at different times are obtained in advance so that it is assumed that the defect will move when the defect exists on the surface to be inspected. and a determination procedure for determining that a defect exists when the defect is within a range of a reference movement distance and a reference movement angle set based on the movement trajectory.
被検査面に光を照射する照明手段と、
この照明手段により照射された前記被検査面を撮像して画像を得る撮像手段と、
この撮像手段に対する前記被検査面の位置を相対的に移動させる移動手段と、
この移動手段により前記撮像手段と前記被検査面とを相対的に移動させながら任意の時間ごとに前記撮像手段により撮像した複数の画像から欠陥を検出する欠陥検出手段とを備え、
前記欠陥検出手段は、
撮像時刻の異なる複数の画像のそれぞれから欠陥候補を抽出する欠陥候補抽出手段と、
前記欠陥候補抽出手段により抽出された欠陥候補が欠陥であるか否かを判定する判定手段とを有し、
前記欠陥候補抽出手段は、前記照明手段の反射鏡像領域を検出する反射鏡像領域検出手段と、検出された反射鏡像領域内の欠陥候補を抽出する反射鏡像内欠陥候補抽出手段と、検出された反射鏡像領域外の欠陥候補を抽出する反射鏡像外欠陥候補抽出手段とを有し、
前記判定手段は、前記欠陥候補抽出手段により抽出された欠陥候補において、撮像時刻の異なる少なくとも2枚以上の画像間での移動距離及び移動角度が、前記被検査面に欠陥が存在した時に移動すると想定される予め得た移動軌跡に基づいて設定される基準移動距離及び基準移動角度の範囲内にある場合に、欠陥であると判定する
ことを特徴とする表面欠陥検査装置。
illuminating means for irradiating the surface to be inspected with light;
imaging means for obtaining an image by imaging the surface to be inspected illuminated by the illumination means;
moving means for relatively moving the position of the surface to be inspected with respect to the imaging means;
Defect detection means for detecting defects from a plurality of images captured by the imaging means every arbitrary time while relatively moving the imaging means and the surface to be inspected by the moving means,
The defect detection means is
defect candidate extracting means for extracting defect candidates from each of a plurality of images captured at different times;
Determination means for determining whether or not the defect candidate extracted by the defect candidate extraction means is a defect,
The defect candidate extracting means includes: reflecting mirror image area detecting means for detecting a reflecting mirror image area of the illumination means; defect candidate in reflecting mirror image extracting means for extracting defect candidates within the detected reflecting mirror image area; a defect candidate extraction means outside the reflector image area for extracting a defect candidate outside the mirror image area;
The determining means determines that, in the defect candidate extracted by the defect candidate extracting means, the moving distance and the moving angle between at least two or more images taken at different times move when the defect exists on the surface to be inspected. A surface defect inspection apparatus that determines that a defect exists when the defect is within a range of a reference movement distance and a reference movement angle that are set based on an assumed movement trajectory obtained in advance .
前記判定手段は、予め、前記被検査面にマークを付して前記移動手段により移動させながら前記撮像手段により撮像時刻の異なる複数の基準画像を撮像することで得られたマーク移動軌跡に基づき、前記基準移動角度が設定されていることを特徴とする請求項2記載の表面欠陥検査装置。 The determination means attaches a mark to the surface to be inspected in advance, moves the mark by the moving means, and captures a plurality of reference images captured at different times by the imaging means. Based on the mark movement trajectory, 3. A surface defect inspection apparatus according to claim 2, wherein said reference movement angle is set. 前記判定手段は、前記マーク移動軌跡の近似直線を引き、前記マークの移動方向に対する幅方向において隣接する近似直線が所定値以上離れている場合には、それらの間を幅方向において分割する分割線を引き、前記近似直線及び前記分割線を基準線とした各基準線の角度に基づき前記基準移動角度が設定されており、前記欠陥候補の移動角度が、前記欠陥候補が隣接する2本の前記基準線の角度の間である場合に、前記基準移動角度の範囲内にあると判断することを特徴とする請求項3記載の表面欠陥検査装置。 The judging means draws an approximation straight line of the mark movement trajectory, and if adjacent approximation straight lines in the width direction with respect to the mark movement direction are separated by a predetermined value or more, a dividing line dividing them in the width direction. is drawn, and the reference movement angle is set based on the angle of each reference line with the approximate straight line and the dividing line as reference lines, and the movement angle of the defect candidate is the two adjacent defect candidates. 4. A surface defect inspection apparatus according to claim 3, wherein it is determined that the movement is within the range of the reference movement angle when the angle is between the angles of the reference lines.
JP2019010687A 2019-01-24 2019-01-24 Surface defect inspection device and surface defect inspection method Active JP7306620B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019010687A JP7306620B2 (en) 2019-01-24 2019-01-24 Surface defect inspection device and surface defect inspection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019010687A JP7306620B2 (en) 2019-01-24 2019-01-24 Surface defect inspection device and surface defect inspection method

Publications (2)

Publication Number Publication Date
JP2020118572A JP2020118572A (en) 2020-08-06
JP7306620B2 true JP7306620B2 (en) 2023-07-11

Family

ID=71891970

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019010687A Active JP7306620B2 (en) 2019-01-24 2019-01-24 Surface defect inspection device and surface defect inspection method

Country Status (1)

Country Link
JP (1) JP7306620B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116156328B (en) * 2023-04-23 2023-07-04 湖南省迈德威视科技有限公司 Industrial camera applied to product defect detection

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000097678A (en) 1998-09-25 2000-04-07 Matsushita Electric Works Ltd Method and equipment for measuring surface shape
JP2000214101A (en) 1999-01-20 2000-08-04 Nissan Motor Co Ltd Surface defect-inspecting device
JP2006184080A (en) 2004-12-27 2006-07-13 Daihatsu Motor Co Ltd Surface inspection method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3160838B2 (en) * 1996-06-26 2001-04-25 日産自動車株式会社 Surface defect inspection equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000097678A (en) 1998-09-25 2000-04-07 Matsushita Electric Works Ltd Method and equipment for measuring surface shape
JP2000214101A (en) 1999-01-20 2000-08-04 Nissan Motor Co Ltd Surface defect-inspecting device
JP2006184080A (en) 2004-12-27 2006-07-13 Daihatsu Motor Co Ltd Surface inspection method and device

Also Published As

Publication number Publication date
JP2020118572A (en) 2020-08-06

Similar Documents

Publication Publication Date Title
CN110596129B (en) Sheet glass edge flaw detection system based on image acquisition
KR101832081B1 (en) Surface defect detection method and surface defect detection device
EP3388781B1 (en) System and method for detecting defects in specular or semi-specular surfaces by means of photogrammetric projection
JP4150390B2 (en) Appearance inspection method and appearance inspection apparatus
CN110231352B (en) Image inspection apparatus, image inspection method, and image inspection recording medium
KR102073229B1 (en) Surface defect detection apparatus and surface defect detection method
JP4633245B2 (en) Surface inspection apparatus and surface inspection method
KR20060070580A (en) Surface defect inspecting method and device
CN114280075A (en) Online visual inspection system and method for surface defects of pipe parts
JP4906609B2 (en) Imaging apparatus and method
JP4279833B2 (en) Appearance inspection method and appearance inspection apparatus
US20220335586A1 (en) Workpiece surface defect detection device and detection method, workpiece surface inspection system, and program
JP7306620B2 (en) Surface defect inspection device and surface defect inspection method
JP2017166957A (en) Defect detection device, defect detection method and program
CN110402386A (en) Cylinder surface examining device and cylinder surface inspecting method
JP7098111B2 (en) Surface inspection equipment and surface inspection method
JP2019200775A (en) Surface defect inspection device and surface defect inspection method
JP7003669B2 (en) Surface inspection equipment and surface inspection method
JP2017194380A (en) Inspection device, recording medium and program
JPH109835A (en) Surface flaw inspection apparatus
JP2010243209A (en) Defect inspection method and defect detection device
JP2023082350A (en) Surface defect inspection device and surface defect inspection method
KR102428871B1 (en) Vision test device using sequential light technic
JP7124569B2 (en) inspection equipment
JP7151873B2 (en) inspection equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211201

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221020

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230131

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230331

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230613

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230620

R150 Certificate of patent or registration of utility model

Ref document number: 7306620

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150