JP2020118572A - 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
JP2020118572A
JP2020118572A JP2019010687A JP2019010687A JP2020118572A JP 2020118572 A JP2020118572 A JP 2020118572A JP 2019010687 A JP2019010687 A JP 2019010687A JP 2019010687 A JP2019010687 A JP 2019010687A JP 2020118572 A JP2020118572 A JP 2020118572A
Authority
JP
Japan
Prior art keywords
defect
inspected
moving
images
image
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.)
Granted
Application number
JP2019010687A
Other languages
Japanese (ja)
Other versions
JP7306620B2 (en
Inventor
昭芳 伊藤
Akiyoshi Ito
昭芳 伊藤
洋一 松井
Yoichi Matsui
洋一 松井
憲一 安味
Kenichi Yasumi
憲一 安味
卓也 明石
Takuya Akashi
卓也 明石
精 張
Chao Zhang
精 張
真基 菊田
Maki Kikuta
真基 菊田
潮 張
潮 張
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 NUC
Toyota Motor East Japan Inc
Original Assignee
Iwate University
University of Fukui NUC
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 NUC, 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

Abstract

To provide a surface defect inspection device and a surface defect inspection method that can accurately detect a defect even when a movement speed of a surface to be inspected is not constant and a movement locus is not straight.SOLUTION: A surface defect inspection device 1 includes defect detection means 40 for detecting a defect from a plurality of images imaged by imaging means 20 at given times during relative movement of the imaging means 20 and a surface to be inspected. The defect detection means 40 comprises defect candidate extraction means 42 for extracting a defect candidate from the plurality of images with different imaging times, and determination means 43 for determining that there is a defect when a movement distance and a movement angle between at least two sheets of images with different imaging times for the extracted defect candidate are within a range of a reference movement distance and a reference movement angle that are movement values estimated when there is a defect on the surface to be inspected.SELECTED DRAWING: Figure 2

Description

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

従来より、自動車のボディを塗装する工程においては、検査員の目視により塗装表面の検査作業を行っている。しかし、検査員による外観検査は労力を要する仕事であり、個人によってばらつきがあるため、検査ミスや検査漏れが生じる恐れがある。また、検査員による外観検査では、検査に要する時間も多くなり、人件費が製品の生産コストをあげてしまう要因のひとつになっている。そのため、外観検査の自動化が望まれており、近年では、光学的に自動的に検査することが可能な表面欠陥検査装置の開発が進められている。 2. Description of the Related Art Conventionally, in the process of painting an automobile body, an inspector visually inspects the painted surface. However, the visual inspection by the inspector is a labor-intensive task, and there is a possibility that an inspection error or an inspection omission may occur because it varies depending on individuals. Further, in the visual inspection by the inspector, the time required for the inspection increases, and the labor cost is one of the factors that increase the production cost of the product. 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 underway.

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

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

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

本発明は、このような問題に基づきなされたものであり、被検査面の移動速度が一定でない、または移動軌跡が直線とならない場合でも、精度よく欠陥を検出することができる表面欠陥検査装置及び表面欠陥検査方法を提供することを目的とする。 The present invention has been made based on such a problem, and even if the moving speed of the surface to be inspected is not constant or the movement locus is not a straight line, a surface defect inspection apparatus capable of accurately detecting a defect, and An object is to provide a surface defect inspection method.

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

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

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

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

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

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

以下、本発明の実施の形態について、図面を参照して詳細に説明する。 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 an embodiment of the present invention. The surface defect inspection apparatus 1 detects a defect existing on the surface of the surface M to be inspected, for example, by setting the painted surface of the body of the automobile as the surface M to be inspected.

表面欠陥検査装置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, an illumination unit 10 that irradiates a surface M to be inspected with light, an image capturing unit 20 that captures an image of the surface M to be inspected illuminated by the illumination unit 10, and an image capturing unit. 20, a moving unit 30 that relatively moves the position of the surface M to be inspected with respect to 20, and the moving unit 30 relatively moves the imaging unit 20 and the surface M to be inspected, and the imaging unit 20 takes images at arbitrary time intervals. The defect detecting means 40 for detecting a defect from the plurality of images and the display means 50 for displaying the detection result by the defect detecting means 40 are provided.

照明手段10は、照射光源11を有しており、照明光源11には蛍光灯を用いることが好ましい。自動車のボディの色は多種多様であるので白色光源が好ましく、価格も安価だからである。また、被検査面Mを多方向から観察できるように、被検査面Mに対して照射光源11を複数配置することが好ましい。撮像手段20は、例えば、CCDカメラ等のカメラ21を有しており、デジタル画像を得ることができるものである。カメラ21は、例えば、照射光源11に対向するように配置され、照明光源11である蛍光灯の反射鏡像及びその周辺領域を撮像するように構成される。 The illumination unit 10 has an irradiation light source 11, and it is preferable to use a fluorescent lamp for the illumination light source 11. This is because a white light source is preferable because the color of the body of the car is various, and the price is 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 image pickup 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 irradiation light source 11, and is configured to capture an image of the reflecting mirror of the fluorescent light, which is the illumination light source 11, and its peripheral region.

移動手段30は、撮像手段20及び被検査面Mの少なくとも一方を移動させることにより、撮像手段20に対する被検査面Mの位置を相対的に移動させるものである。例えば、コンベヤー等の搬送手段により被検査面Mを一方向に一定の速度で搬送するように構成されていることが好ましい。欠陥検出手段40は、例えば、コンピュータにより構成されており、画像処理により欠陥を検出するように構成されている。表示手段50は、例えば、ディスプレイ等により構成され、例えば、欠陥の重心に円マーク等を付して表示するように構成されている。 The moving means 30 moves at least one of the image pickup means 20 and the surface M to be inspected, thereby moving the position of the surface M to be inspected relative to the image pickup means 20. For example, it is preferable that the surface M to be inspected is conveyed in one direction at a constant speed by a conveyer such as a conveyor. The defect detecting means 40 is composed of, for example, a computer and is configured to detect a defect by image processing. The display means 50 is composed of, for example, a display or the like, and is arranged to display, for example, a circle mark or the like at 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 detecting means 40 shown in FIG. The defect detection means 40 is, for example, an image storage means 41 such as a memory that stores a plurality of images captured by the imaging means 20 at different imaging times while relatively moving the imaging means 20 and the surface M to be inspected. Defect candidate extraction means 42 for extracting a defect candidate from each of a plurality of images stored in the image storage means 41 at different imaging times, and whether the defect candidate is extracted from the movement status of the defect candidate extracted by the defect candidate extraction means 42. It has a 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 extraction means 42 is, for example, a preprocessing means 421 for preprocessing the image obtained by the image pickup means 20, and a reflection mirror image area detection means 422 for detecting the reflection mirror image area of the image obtained by the preprocessing means 421. A defect-in-reflective-mirror-defect candidate extracting unit 423 for extracting a defect candidate in the detected reflective-mirror-image region; Gradient image generation means 425 for generating a gradient image from the image obtained by the 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. And 427.

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

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

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

勾配画像生成手段425は、例えば、前処理手段421により前処理された画像について、直交する2方向において、正方向及び負方向の両方向から差分演算をそれぞれ行い、演算結果より勾配画像を生成するものである。差分演算は、デジタル画像において近似的な微分処理として実行されるものであり、勾配画像生成手段425は、正方向及び負方向の両方向から差分演算をそれぞれ行い、欠陥を、正の差分方向で強調されている正強調部分と、負の差分方向で強調されている負強調部分とで表すことにより、欠陥を2次元的に扱うことができるようにするものである。 The gradient image generation means 425, for example, performs difference calculation on the image preprocessed by the preprocessing means 421 in two directions orthogonal to each other from both positive and negative directions, and generates a gradient image from the calculation result. Is. The difference calculation is executed as an approximate differentiation process in the digital image, and the gradient image generation means 425 performs difference calculation from both the positive direction and the negative direction to emphasize the defect in the positive difference direction. The defect can be treated two-dimensionally by representing it by the positive emphasis part and the negative emphasis part emphasized in the negative difference direction.

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

(式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つの画素の位置関係を制御する変数である。) (In Expressions 1 and 2, (x, y) represents the coordinates of the pixel of interest, and I(x, y) is the luminance value of the pixel (x, y). G xn (x, y) and G yn. (X, y) are a first direction difference and a second direction difference in two orthogonal directions, n is a variable that controls the direction in which the difference is taken, and 0 indicates a positive direction and 1 indicates a positive direction. In the negative direction, k and s are variables that control the mask that takes the difference, ω is a variable that controls the orthogonal axis that takes the difference, and when ω=1, the difference is the vertical and horizontal axes, and ω=0. In the case of, the difference is on the diagonal orthogonal axis. γ and θ are not 0 at the same time, but are variables that control the positional relationship between two pixels that take the difference with (x, y) as the pixel of interest.)

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

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

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

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

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

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

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

(式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つの画素の位置関係を制御する変数である。) (In Expressions 7 and 8, (x, y) represents the coordinates of the pixel of interest, and I(x, y) is the luminance value of the pixel (x, y). G x (x, y) and G y. (X, y) are a first direction difference and a second direction difference in two orthogonal directions, k and s are variables that control the mask that takes the difference, and ω is a variable that controls the orthogonal axis that takes the difference. When ω=1, the difference is on the vertical and horizontal axes, and when ω=0, it is the difference on the diagonal orthogonal axes.γ and θ are not 0 at the same time, and (x, y) is set as the pixel of interest. It is a variable that controls the positional relationship between two pixels that take the difference.)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

次いで、例えば、欠陥候補決定手段426により、勾配画像生成手段(ステップS123)において生成した勾配画像と、反射鏡像内欠陥候補抽出手順(ステップS124)において抽出した反射鏡像内欠陥候補、及び、反射鏡像外欠陥候補抽出手順(ステップS125)において抽出した反射鏡像外欠陥候補とから、欠陥候補を決定する(ステップpS126;欠陥候補決定手順)。欠陥候補決定手段426により決定された欠陥候補は欠陥候補記憶手段427に保存する。 Then, for example, by the defect candidate determination unit 426, the gradient image generated in the gradient image generation unit (step S123), the defect candidate in the reflection mirror image extracted in the defect candidate extraction procedure in the reflection mirror image (step S124), and the reflection mirror image. Defect candidates are determined from the defect candidates outside the reflection mirror image extracted in the external defect candidate extraction procedure (step S125) (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 candidates are extracted by the defect candidate extraction procedure (step S120), for example, in the determination unit 43, the continuity determination unit 431 determines whether or not the defect candidates extracted as described above are defects ( Step S130; determination procedure). That is, in the extracted defect candidate, the moving distance and the moving angle between at least two images at different imaging times are assumed to move when the surface M to be inspected has a defect and the reference movement. If it is within the angle range, it is determined to be a defect.

具体的には、まず、図12に示したように、撮像時刻の順に連続する4枚の画像間において、欠陥候補の移動距離が基準移動距離の範囲内にあるものを抽出し、それらをグループ化する(ステップS131;移動距離判断手順)。具体的には、例えば、撮像時刻の最も遅い画像を本フレームとし、本フレームにおいて抽出された各欠陥候補のうちの1つを取り出し、他の画像において抽出された各欠陥候補のうち、本フレームで取り出した欠陥候補との距離が基準距離の範囲内にあるものを抽出する。図12において、〇は本フレームで取り出した1つの欠陥候補、△は本フレームよりも1つ前のフレームから抽出した欠陥候補、□は本フレームよりも2つ前のフレームから抽出した欠陥候補、▽は本フレームよりも3つ前のフレームから抽出した欠陥候補であり、△、□、▽は、〇で示した本フレームで取り出した1つの欠陥候補に対して、他のフレームにおいて基準移動距離の範囲内にある欠陥候補である。 Specifically, first, as shown in FIG. 12, among the four images that are consecutive in the order of the imaging time, those in which the movement distance of the defect candidate is within the range of the reference movement distance are extracted and grouped. (Step S131; moving distance determination procedure). Specifically, for example, the image with the latest imaging time is set as the main frame, one of the defect candidates extracted in this frame is extracted, and the main frame is extracted from the defect candidates extracted in other images. A defect whose distance to the defect candidate extracted in step is within the range of the reference distance is 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 a frame two frames before this frame, ▽ is the 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 ◯. It 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, as described above, larger than 0 and not larger than a predetermined distance threshold. As the predetermined distance threshold, for example, the maximum value of the movement amount of the center of the defect candidate in all frames can be taken. For example, the defect candidate in the frame before the main frame indicated by X in FIG. 12 has a movement direction opposite to that of the defect candidate extracted in the main frame indicated by ◯ (the movement distance is negative), or , O are excluded because they are farther than the predetermined distance threshold with respect to the defect candidates of this frame indicated by ◯. Note that, with respect to 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 a defect candidate is extracted between four images that are consecutive in the order of imaging time, even if the second and third frames are not detected, the defect candidates detected in the first and fourth frames should be within the range of the reference movement distance. For example, the defect candidates extracted in the first and fourth frame images may be grouped. This is because some defect candidates may not be detected. This is sequentially performed for each defect candidate extracted in this frame.

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

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

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

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

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

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

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

更に、上記実施の形態では、欠陥候補抽出手段42及び欠陥候補抽出手順(ステップS120)について具体的に説明したが、他の構成及び手順により欠陥候補を抽出するようにしてもよい。 Furthermore, although the defect candidate extraction means 42 and the defect candidate extraction procedure (step S120) are specifically described in the above embodiment, the 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... Illuminating means, 11... Illuminating light source, 20... Imaging means, 21... Camera, 30... Moving means, 40... Defect detecting means, 41 Image storing means, 42... Defect candidate extracting means, 421 ... preprocessing means, 422... reflecting mirror image area detecting means, 423... reflecting mirror image inside defect candidate extracting means, 424... outside reflecting mirror image defect candidate extracting means, 425... gradient image generating means, 426...
Defect candidate determination means, 427... Defect candidate storage means, 43... Judgment means, 431... Continuity judgment means, 432... Reference value storage means 432, 50... Display means, M... Inspected surface

Claims (4)

光を照射した被検査面を撮像手段により撮像すると共に、前記撮像手段に対する前記被検査面の位置を相対的に移動させて、撮像時刻の異なる複数の画像を取得する撮像手順と、
前記撮像手順により得られた撮像時刻の異なる複数の画像からそれぞれ欠陥候補を抽出する欠陥候補抽出手順と、
前記欠陥候補抽出手順において抽出された欠陥候補について、撮像時刻の異なる少なくとも2枚以上の画像間での移動距離及び移動角度が、前記被検査面に欠陥が存在した時に移動すると想定される基準移動距離及び基準移動角度の範囲内にある場合に、欠陥であると判定する判定手順と
を含むことを特徴とする表面欠陥検査方法。
An imaging procedure for capturing a plurality of images at different imaging times by moving the position of the surface to be inspected relative to the imaging means while imaging the surface to be inspected illuminated with light by the imaging means,
A defect candidate extraction procedure for extracting defect candidates from a plurality of images at different imaging times obtained by the imaging procedure,
With respect to the defect candidate extracted in the defect candidate extraction procedure, a reference movement in which a movement distance and a movement angle between at least two images having different imaging times are assumed to move when a defect exists on the surface to be inspected. A surface defect inspection method, comprising: a determination procedure of determining a defect if the distance and the reference movement angle are within a range.
被検査面に光を照射する照明手段と、
この照明手段により照射された前記被検査面を撮像して画像を得る撮像手段と、
この撮像手段に対する前記被検査面の位置を相対的に移動させる移動手段と、
この移動手段により前記撮像手段と前記被検査面とを相対的に移動させながら任意の時間ごとに前記撮像手段により撮像した複数の画像から欠陥を検出する欠陥検出手段とを備え、
前記欠陥検出手段は、
撮像時刻の異なる複数の画像のそれぞれから欠陥候補を抽出する欠陥候補抽出手段と、
前記欠陥候補抽出手段により抽出された欠陥候補において、撮像時刻の異なる少なくとも2枚以上の画像間での移動距離及び移動角度が、前記被検査面に欠陥が存在した時に移動すると想定される基準移動距離及び基準移動角度の範囲内にある場合に、欠陥であると判定する判定手段とを有する
ことを特徴とする表面欠陥検査装置。
Illuminating means for irradiating the surface to be inspected with light,
An image pickup means for obtaining an image by picking up the surface to be inspected illuminated by the illuminating means;
Moving means for moving the position of the surface to be inspected relative to the imaging means,
Defect detecting means for detecting a defect from a plurality of images picked up by the image pickup means at arbitrary time intervals while relatively moving the image pickup means and the surface to be inspected by the moving means,
The defect detection means,
Defect candidate extraction means for extracting defect candidates from each of a plurality of images at different imaging times,
In the defect candidates extracted by the defect candidate extraction means, the reference distance is assumed to be such that the movement distance and the movement angle between at least two images at different imaging times are supposed to move when there is a defect on the surface to be inspected. A surface defect inspection apparatus comprising: a determining unit that determines a defect if the distance and the reference movement angle are within a range.
前記判定手段は、予め、前記被検査面にマークを付して前記移動手段により移動させながら前記撮像手段により撮像時刻の異なる複数の基準画像を撮像することで得られたマーク移動軌跡に基づき、前記基準移動角度が設定されていることを特徴とする請求項2記載の表面欠陥検査装置。 The determining means preliminarily adds a mark to the surface to be inspected, and based on a mark movement locus obtained by capturing a plurality of reference images at different image capturing times by the image capturing means while moving by the moving means, The surface defect inspection apparatus according to claim 2, wherein the reference movement angle is set. 前記判定手段は、前記マーク移動軌跡の近似直線を引き、前記マークの移動方向に対する幅方向において隣接する近似直線が所定値以上離れている場合には、それらの間を幅方向において分割する分割線を引き、前記近似直線及び前記分割線を基準線とした各基準線の角度に基づき前記基準移動角度が設定されており、前記欠陥候補の移動角度が、前記欠陥候補が隣接する2本の前記基準線の角度の間である場合に、前記基準移動角度の範囲内にあると判断することを特徴とする請求項3記載の表面欠陥検査装置。 The determination means draws an approximate straight line of the mark moving locus, and when adjacent approximate straight lines in the width direction with respect to the moving direction of the mark are apart from each other by a predetermined value or more, a dividing line that divides them in the width direction. And the reference movement angle is set based on the angle of each of the reference lines with the approximation line and the dividing line as the reference line, and the movement angle of the defect candidate is two of the two adjacent to the defect candidate. The surface defect inspection apparatus according to claim 3, wherein when the angle is between the angles of the reference line, it is determined that the angle is within the range of the reference movement angle.
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 true JP2020118572A (en) 2020-08-06
JP7306620B2 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)

Cited By (1)

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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1010052A (en) * 1996-06-26 1998-01-16 Nissan Motor Co Ltd Surface defect inspecting device
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1010052A (en) * 1996-06-26 1998-01-16 Nissan Motor Co Ltd Surface defect inspecting device
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

Cited By (1)

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

Also Published As

Publication number Publication date
JP7306620B2 (en) 2023-07-11

Similar Documents

Publication Publication Date Title
CN110596129B (en) Sheet glass edge flaw detection system based on image acquisition
US20130057678A1 (en) Inspection system and method of defect detection on specular surfaces
JP6052590B2 (en) Surface inspection apparatus and surface inspection method for automobile body
JP6264132B2 (en) Inspection device and inspection method for painted surface of vehicle body
WO2017119250A1 (en) Flaw detection device and flaw detection method
KR100742003B1 (en) Surface defect inspecting method and device
JP2020008501A (en) Surface defect detection device and surface defect detection method
JP4633245B2 (en) Surface inspection apparatus and surface inspection method
JP2010223932A (en) Method of detecting defect
JP2007155405A (en) Visual inspection method and visual inspection device
JP7306620B2 (en) Surface defect inspection device and surface defect inspection method
US10410336B2 (en) Inspection device, storage medium, and program
JP2008160635A (en) Camera state detection method
JP2019200775A (en) Surface defect inspection device and surface defect inspection method
JP7098111B2 (en) Surface inspection equipment and surface inspection method
JP7003502B2 (en) Inspection equipment
JP2007248072A (en) Apparatus and method for inspecting irregular color
JP2008233107A (en) Visual examination method and visual examination device
JP2017166956A (en) Defect detection device detection method and program
JP2010243209A (en) Defect inspection method and defect detection device
JP2008233106A (en) Visual examination method and visual examination device
JP2023082350A (en) Surface defect inspection device and surface defect inspection method
JP3177945B2 (en) Surface defect inspection equipment
JP7151873B2 (en) inspection equipment
JP2018040599A (en) Inspection system

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