Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7789310B2 - Surface defect inspection device and surface defect inspection method - Google Patents
[go: Go Back, main page]

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

Surface defect inspection device and surface defect inspection method

Info

Publication number
JP7789310B2
JP7789310B2 JP2021196063A JP2021196063A JP7789310B2 JP 7789310 B2 JP7789310 B2 JP 7789310B2 JP 2021196063 A JP2021196063 A JP 2021196063A JP 2021196063 A JP2021196063 A JP 2021196063A JP 7789310 B2 JP7789310 B2 JP 7789310B2
Authority
JP
Japan
Prior art keywords
defect
inspected
section
image
defect candidate
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
JP2021196063A
Other languages
Japanese (ja)
Other versions
JP2023082350A (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
Toyota Motor East Japan Inc
Original Assignee
Iwate University
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, Toyota Motor East Japan Inc filed Critical Iwate University
Priority to JP2021196063A priority Critical patent/JP7789310B2/en
Publication of JP2023082350A publication Critical patent/JP2023082350A/en
Application granted granted Critical
Publication of JP7789310B2 publication Critical patent/JP7789310B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Description

本発明は、例えば、自動車のボディ表面の塗装などの状態を検査するのに好適な表面欠陥検査装置及び表面欠陥検査方法に関する。 The present invention relates to a surface defect inspection device and method suitable for inspecting the condition of, for example, the paint on the surface of an automobile body.

従来より、自動車のボディを塗装する工程においては、検査員の目視により塗装表面の検査作業を行っている。しかし、検査員による外観検査は労力を要する仕事であり、個人によってばらつきがあるため、検査ミスや検査漏れが生じる恐れがある。また、検査員による外観検査では、検査に要する時間も多くなり、人件費が製品の生産コストをあげてしまう要因のひとつになっている。そのため、外観検査の自動化が望まれており、近年では、光学的に自動的に検査することが可能な表面欠陥検査装置の開発が進められている。 Traditionally, the painted surface of automobile bodies has been visually inspected by inspectors during the painting process. However, visual inspection by inspectors is labor-intensive, and there is variation between individuals, which can lead to inspection errors or oversights. Furthermore, visual inspection by inspectors takes a lot of time, and labor costs are one factor that increase product production costs. Therefore, there is a demand for the automation of visual inspection, and in recent years, progress has been made in developing surface defect inspection equipment that can perform optical, automated inspections.

例えば、特許文献1には、撮影手段と被検査面とを相対的に移動させながら撮影手段により被検査面を撮影し、撮影した複数の画像から欠陥候補を抽出して、撮影時刻の異なる少なくとも2枚以上の画像間における欠陥候補の移動距離及び移動角度が所定の範囲内にある場合に欠陥であると判定する表面欠陥検査装置が記載されている。 For example, Patent Document 1 describes a surface defect inspection device that photographs the surface to be inspected using the imaging means while moving the imaging means and the surface to be inspected relative to each other, extracts defect candidates from the multiple images captured, and determines that a defect exists if the movement distance and movement angle of the defect candidate between at least two or more images captured at different times are within a predetermined range.

特開2020-118572号公報Japanese Patent Application Laid-Open No. 2020-118572

しかしながら、特許文献1に記載の表面欠陥検査装置では、欠陥候補の移動軌跡が直線状である場合には判定可能であるが、欠陥候補の移動軌跡が曲線状となる場合には判定することが難しいという問題があった。例えば、欠陥候補を抽出しやすい高い輝度に保つように、カメラの角度を被検査面の移動に応じて変化させると、欠陥候補の移動軌跡は曲線状となる。そのため、欠陥候補の移動軌跡が曲線状であっても、高い精度で欠陥を判定できることが望まれていた。 However, the surface defect inspection device described in Patent Document 1 can make a judgment when the movement trajectory of a defect candidate is linear, but has difficulty making a judgment when the movement trajectory of the defect candidate is curved. For example, if the camera angle is changed in accordance with the movement of the surface to be inspected in order to maintain a high brightness that makes it easier to extract defect candidates, the movement trajectory of the defect candidate will become curved. Therefore, there has been a demand for the ability to make defect judgments with high accuracy even when the movement trajectory of the defect candidate is curved.

本発明は、このような問題に基づきなされたものであり、欠陥候補の移動軌跡が曲線状であっても、さらにはカメラ角度を被検査面の移動に応じて変化させても高い精度で欠陥を判定することができる表面欠陥検査装置及び表面欠陥検査方法を提供することを目的とする。 The present invention was developed in response to these problems, and aims to provide a surface defect inspection device and method that can determine defects with high accuracy even when the movement trajectory of the defect candidate is curved, and even when the camera angle changes in accordance with the movement of the surface being inspected.

本発明の表面欠陥検査装置は、被検査面に光を照射する光源と、光源により照射された被検査面を撮影して画像を得る撮影手段と、撮影手段に対する被検査面の位置を相対的に移動させる移動手段と、移動手段により撮影手段と被検査面とを相対的に移動させながら任意の時間ごとに撮影手段により撮影した複数の画像から欠陥候補を抽出する欠陥候補抽出手段と、欠陥候補抽出手段により抽出した欠陥候補に基づき欠陥を検出する欠陥検出手段とを備え、欠陥検出手段は、被検査面を複数の区画に区切り、撮影手段により撮影された撮影時刻の異なる基準判定数以上の画像について、被検査面の同一の区画に対応する各区画画像領域に、欠陥候補抽出手段により抽出された欠陥候補がそれぞれ存在する場合に、欠陥であると判定するものである。 The surface defect inspection device of the present invention comprises a light source that irradiates the surface to be inspected with light, an imaging means that captures the surface to be inspected illuminated by the light source to obtain an image, a moving means that moves the position of the surface to be inspected relative to the imaging means, a defect candidate extraction means that extracts defect candidates from multiple images captured by the imaging means at any given time while the moving means moves the imaging means and the surface to be inspected relatively, and a defect detection means that detects defects based on the defect candidates extracted by the defect candidate extraction means. The defect detection means divides the surface to be inspected into multiple sections, and determines that a defect exists if a defect candidate extracted by the defect candidate extraction means exists in each section image area corresponding to the same section of the surface to be inspected for a reference determination number or more of images captured by the imaging means at different capture times.

本発明の表面欠陥検査方法は、光源から光を照射した被検査面を撮影して画像を得る撮影手順と、撮影手順により撮影した画像から欠陥候補を抽出する欠陥候補抽出手順と、欠陥候補抽出手順により抽出した欠陥候補に基づき欠陥を検出する欠陥検出手順とを含み、欠陥検出手順では、被検査面を複数の区画に区切り、撮影手段により撮影された撮影時刻の異なる基準判定数以上の画像について、被検査面の同一の区画に対応する各区画画像領域に、欠陥候補抽出手段により抽出された欠陥候補がそれぞれ存在する場合に、欠陥であると判定するものである。 The surface defect inspection method of the present invention includes an imaging step of obtaining an image by imaging the surface to be inspected illuminated with light from a light source, a defect candidate extraction step of extracting defect candidates from the image captured by the imaging step, and a defect detection step of detecting defects based on the defect candidates extracted by the defect candidate extraction step. In the defect detection step, the surface to be inspected is divided into a plurality of sections, and for a number of images captured by the imaging means at different imaging times or greater than a reference determination number, a defect is determined to exist if a defect candidate extracted by the defect candidate extraction means exists in each section image area corresponding to the same section of the surface to be inspected.

本発明によれば、被検査面を複数の区画に区切り、撮影手段により撮影された撮影時刻の異なる基準判定数以上の画像について、被検査面の同一の区画に対応する各区画画像領域に、欠陥候補抽出手段により抽出された欠陥候補がそれぞれ存在する場合に、欠陥であると判定するようにしたので、欠陥候補の移動軌跡と、被検査面の区画の移動軌跡との関係から、欠陥候補が欠陥であるか否かを判定することができる。よって、欠陥候補の移動軌跡が曲線状となる場合、例えば、欠陥候補の輝度を高くするために、カメラに対する被検査面の相対的な位置の移動に応じて、カメラの角度を変化させる場合であっても、高い精度で欠陥を判定することができる。 According to this invention, the surface to be inspected is divided into multiple sections, and for images captured by the imaging means at different capture times equal to or greater than the reference determination number, if a defect candidate extracted by the defect candidate extraction means is present in each section image area corresponding to the same section of the surface to be inspected, it is determined that the defect candidate is a defect. Therefore, it is possible to determine whether a defect candidate is a defect based on the relationship between the movement trajectory of the defect candidate and the movement trajectory of the section of the surface to be inspected. Therefore, even if the movement trajectory of the defect candidate is curved, for example, if the camera angle is changed in accordance with the movement of the surface to be inspected relative to the camera in order to increase the brightness of the defect candidate, it is possible to determine whether the defect is a defect with high accuracy.

また、欠陥候補が被検査面の区画に対応する区画画像領域の境界線から所定の範囲内に存在する場合に、欠陥区画画像領域と隣接区画画像領域とを、被検査面の1つの区画に対応する1つの区画画像領域とみなして判定するようにしたので、欠陥の判定精度をより向上させることができる。 In addition, if a defect candidate exists within a specified range from the boundary line of a partition image area corresponding to a partition on the inspected surface, the defective partition image area and the adjacent partition image area are considered to be a single partition image area corresponding to a single partition on the inspected surface, thereby further improving the accuracy of defect determination.

本発明の一実施の形態に係る表面欠陥検査装置の全体構成を表す図である。1 is a diagram illustrating the overall configuration of a surface defect inspection device according to an embodiment of the present invention. 図1に示した欠陥検出手段の構成を表すブロック図である。FIG. 2 is a block diagram showing a configuration of a defect detection unit shown in FIG. 1 . 前処理手段により得られた画像の一例を表す図である。FIG. 10 is a diagram illustrating an example of an image obtained by a preprocessing unit. 画像分割手段により得られた画像の一例を表す図である。FIG. 10 is a diagram illustrating an example of an image obtained by an image dividing unit. 2値化閾値を変えて2値化した2値化画像の一例を表す図である。10A and 10B are diagrams illustrating examples of binarized images binarized by changing the binarization threshold value. 2次抽出手段により抽出した欠陥候補の一例を表す図である。FIG. 10 is a diagram illustrating an example of a defect candidate extracted by a secondary extraction unit. 光源の反射鏡像の周囲の領域を光源の反射鏡像からの距離に応じて分割した概念図である。FIG. 10 is a conceptual diagram in which the area around the reflected mirror image of the light source is divided according to the distance from the reflected mirror image of the light source. 被検査面を複数の区画に区切った状態を表す図である。FIG. 1 is a diagram showing a state in which a surface to be inspected is divided into a plurality of sections. 回数集計手段において、欠陥候補が境界線から所定の範囲内に存在する場合に、隣接する区画画像領域まで広げて判定することを説明する図である。10 is a diagram illustrating how, in the counting means, when a defect candidate exists within a predetermined range from the boundary line, the determination is made by expanding the range to include adjacent section image areas. FIG. 判定手段において、区画番号毎における欠陥候補の検出回数から欠陥を判定することを説明するための図である。10 is a diagram for explaining how a determination unit determines a defect based on the number of times a defect candidate is detected for each block number. FIG. 本発明の一実施の形態に係る表面欠陥検査方法の手順を表す図である。1 is a diagram illustrating a procedure of a surface defect inspection method according to an embodiment of the present invention.

以下、本発明の実施の形態について、図面を参照して詳細に説明する。 Embodiments of the present invention will be described in detail below with reference to the drawings.

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

表面欠陥検査装置1は、例えば、被検査面Mに光を照射する光源10と、光源10により照射された被検査面Mを撮影して画像を得る撮影手段20と、撮影手段20に対する被検査面Mの位置を相対的に移動させる移動手段30と、移動手段30により撮影手段20と被検査面Mとを相対的に移動させながら任意の時間ごとに撮影手段20により撮影した複数の画像から欠陥候補を抽出する欠陥候補抽出手段40と、欠陥候補抽出手段により抽出した欠陥候補に基づき欠陥を検出する欠陥検出手段50と、欠陥検出手段50による検出結果を表示する表示手段60とを備えている。 The surface defect inspection device 1 includes, for example, a light source 10 that irradiates light onto the surface M to be inspected, an imaging means 20 that captures the surface M illuminated by the light source 10 to obtain an image, a moving means 30 that moves the position of the surface M to be inspected relative to the imaging means 20, a defect candidate extraction means 40 that extracts defect candidates from multiple images captured by the imaging means 20 at any given time while moving the imaging means 20 and the surface M to be inspected relative to each other using the moving means 30, a defect detection means 50 that detects defects based on the defect candidates extracted by the defect candidate extraction means, and a display means 60 that displays the detection results from the defect detection means 50.

光源10には、直管型の照明器具、例えば、直管型の蛍光灯又はLED照明若しくはレーザー光を用いることが好ましいが、これら照明の種類に限定されることはなく、また、自動車のボディの色は多種多様であるので白色光源を用いることが好ましい。光源10は、例えば、被検査面Mを多方向から観察できるように、被検査面Mに対して複数配置することが好ましい。 The light source 10 is preferably a straight-tube lighting fixture, such as a straight-tube fluorescent lamp, LED light, or laser light, but is not limited to these types of lighting. Furthermore, since automobile bodies come in a wide variety of colors, it is preferable to use a white light source. It is preferable to arrange multiple light sources 10 relative to the surface M to be inspected, for example, so that the surface M can be observed from multiple directions.

撮影手段20は、例えば、CCDカメラ等のカメラ21を有しており、デジタル画像を得ることができるものである。カメラ21は、例えば、光源10に対向するように配置され、光源10の反射鏡像及びその周辺領域を撮影するように構成される。また、カメラ21の角度(アングル)は、カメラ21に対する被検査面Mの相対的な位置の移動に応じて、変化させることができるように構成されていることが好ましい。カメラ21の角度を固定すると、被検査面Mの部位によっては、欠陥候補の輝度が低くなり欠陥候補の抽出が難しい場合があるからである。 The photographing means 20 has a camera 21, such as a CCD camera, that can capture digital images. The camera 21 is, for example, positioned facing the light source 10 and configured to photograph the reflected mirror image of the light source 10 and its surrounding area. It is also preferable that the angle of the camera 21 be configured so that it can be changed in accordance with the movement of the position of the surface M to be inspected relative to the camera 21. This is because if the angle of the camera 21 is fixed, the brightness of defect candidates may be low depending on the location of the surface M to be inspected, making it difficult to extract the defect candidates.

移動手段30は、撮影手段20及び被検査面Mの少なくとも一方を移動させることにより、撮影手段20に対する被検査面Mの位置を相対的に移動させるものである。例えば、コンベヤー等の搬送手段により被検査面Mを一方向に一定の速度で搬送するように構成してもよく、また、撮影手段20のカメラ21を一方向に一定の速度で移動させるように構成してもよい。なお、図1では、コンベヤー等により被検査面Mを移動させる場合を示している。欠陥候補抽出手段40及び欠陥検出手段50は、例えば、コンピュータにより構成されており、画像処理により欠陥候補を抽出し、又は、欠陥を検出するように構成されている。表示手段60は、例えば、ディスプレイ等により構成され、例えば、欠陥の重心に円マーク等を付して表示するように構成されている。 The moving means 30 moves the position of the surface M to be inspected relative to the imaging means 20 by moving at least one of the imaging means 20 and the surface M to be inspected. For example, the surface M to be inspected may be transported in one direction at a constant speed by a transport means such as a conveyor, or the camera 21 of the imaging means 20 may be moved in one direction at a constant speed. Note that Figure 1 shows a case in which the surface M to be inspected is moved by a conveyor or the like. The defect candidate extraction means 40 and defect detection means 50 are, for example, configured by a computer, and are configured to extract defect candidates or detect defects through image processing. The display means 60 is, for example, configured by a display, and is configured to display the center of gravity of the defect with a circle or the like.

(欠陥候補抽出手段40)
図2は、図1に示した欠陥候補抽出手段40及び欠陥検出手段50の構成を表すものである。欠陥候補抽出手段40は、例えば、撮影手段20と被検査面Mとを相対的に移動させながら撮影手段20により撮影した撮影時刻の異なる複数の画像を記憶するメモリ等の画像記憶手段41と、撮影手段20により撮影された画像を前処理する前処理手段42と、撮影手段20により得られた画像に基づく抽出対象画像について、光源10の反射鏡像を含む領域を長さ方向において複数に分割し、複数の分割画像とする画像分割手段43と、撮影手段20により得られた画像に基づく抽出対象画像について2値化処理を行い、欠陥候補を抽出するための1次欠陥候補を抽出する1次抽出手段44と、1次欠陥候補を記憶する1次欠陥候補記憶手段45と、1次欠陥候補から欠陥候補を抽出する2次抽出手段46と、欠陥候補を記憶する欠陥候補記憶手段47とを有していることが好ましい。
(Defect candidate extraction means 40)
Fig. 2 shows the configuration of the defect candidate extraction means 40 and the defect detection means 50 shown in Fig. 1. The defect candidate extraction means 40 preferably includes an image storage means 41 such as a memory for storing a plurality of images captured by the photographing means 20 at different photographing times while moving the photographing means 20 and the surface M to be inspected relatively, a preprocessing means 42 for preprocessing the images captured by the photographing means 20, an image division means 43 for dividing an area including the reflected mirror image of the light source 10 into a plurality of divided images in the longitudinal direction of an extraction target image based on the image obtained by the photographing means 20, a primary extraction means 44 for binarizing the extraction target image based on the image obtained by the photographing means 20 and extracting primary defect candidates for extracting defect candidates, a primary defect candidate storage means 45 for storing the primary defect candidates, a secondary extraction means 46 for extracting defect candidates from the primary defect candidates, and a defect candidate storage means 47 for storing the defect candidates.

前処理手段42は、例えば、撮影手段20により得らえた画像をグレースケール画像等の濃淡画像に変換して、被検査面Mの領域を切り出すと共に、ノイズの低減を行うものである。ノイズの低減としては、例えば、ガウシアンフィルタや、メディアンフィルタがある。図3に前処理手段42により得られた画像の一例を示す。図3において、白色の部分が光源10の反射鏡像である。 The pre-processing means 42 converts the image obtained by the imaging means 20 into a density image such as a grayscale image to extract the area of the surface M to be inspected and reduce noise. Examples of noise reduction methods include a Gaussian filter and a median filter. Figure 3 shows an example of an image obtained by the pre-processing means 42. In Figure 3, the white portion is the reflected mirror image of the light source 10.

画像分割手段43は、例えば、抽出対象画像である前処理手段42により得られた画像について、光源10の1つの反射鏡像及びその周辺領域を含む領域を切り取り、反射鏡像の長さ方向において複数に分割するように構成されていることが好ましい。反射鏡像の長さ方向における中央部と端部とで輝度が異なるので、画像を分けることにより、1次抽出手段44において2値化処理を高い精度で行うことができるからである。図4に画像分割手段43により分割した画像の一例を示す。図4において、白色の部分が光源10の反射鏡像である。なお、図4では、分割したことを分かりやすく示すために、各画像の間に隙間を開けて示している。また、図4では、画像分割手段43により、反射鏡像の長さ方向に6個に分割する場合について示したが、分割数は任意に設定することができる。分割数は、例えば、2個から12個の範囲とすることが好ましい。 The image segmentation means 43 is preferably configured to, for example, cut out an area including one reflected mirror image of the light source 10 and its surrounding area from the image obtained by the preprocessing means 42, which is the image to be extracted, and segment the reflected mirror image into multiple segments along its length. Because the luminance differs between the center and ends of the reflected mirror image along its length, segmenting the image allows the primary extraction means 44 to perform binarization processing with high accuracy. Figure 4 shows an example of an image segmented by the image segmentation means 43. In Figure 4, the white areas represent the reflected mirror image of the light source 10. Note that Figure 4 shows gaps between each image to clearly show the segmentation. Also, Figure 4 shows the case where the reflected mirror image is segmented into six segments along its length by the image segmentation means 43, but the number of segments can be set as desired. The number of segments is preferably in the range of 2 to 12, for example.

1次抽出手段44は、例えば、抽出対象画像である前処理手段42により処理された画像について、それぞれ、2値化閾値を2値化基準値から一方向に順に変化させながら2値化処理を順に行い、処理の順に得られた複数の2値化画像を比較し、欠陥候補点の出現数が所定の基準出現数よりも少ない状態から所定の基準出現数以上となった時の2値化画像、又は、欠陥候補点の出現数が所定の基準出現数よりも多い状態から所定の基準出現数以下となった時の2値化画像を閾値画像とし、この閾値画像から、1次欠陥候補を抽出するように構成されている。すなわち、1次抽出手段44は、2値化閾値の変化に伴う欠陥候補点の出現数の変化に基づき2値化閾値を自動的に決定し、2値化するものである。 The primary extraction means 44 is configured to, for example, sequentially perform binarization processing on images processed by the preprocessing means 42 (images to be extracted) while sequentially changing the binarization threshold in one direction from the binarization reference value, compare the multiple binarized images obtained in the order of processing, and determine as a threshold image the binarized image when the number of defect candidate points changes from less than the predetermined reference number to equal to or greater than the predetermined reference number, or the binarized image when the number of defect candidate points changes from greater than the predetermined reference number to equal to or less than the predetermined reference number, and extract primary defect candidates from this threshold image. In other words, the primary extraction means 44 automatically determines the binarization threshold based on the change in the number of defect candidate points that occurs as the binarization threshold changes, and performs binarization.

2値化画像において、欠陥候補点は、例えば、光源10の反射鏡像の周辺領域に出現する。例えば、図4に示したように、光源10の反射鏡像が白色で表れている場合には、光源10の反射鏡像の周辺領域に白色の点として出現する。2値化基準値は、例えば、0から255の間で、最大値の255としてもよく、最小値の0としてもよく、最大値と最小値の間の任意の値としてもよい。被検査面Mにより、予め2値化閾値の好ましい範囲が分かっている時は、その近傍の値を2値化基準値として設定することにより、迅速に2値化閾値を決めることができ、2値化閾値の好ましい範囲が分からない時には、最大値又は最小値を2値化基準値とすることにより、2値化閾値を決めることができるからである。 In the binarized image, defect candidate points appear, for example, in the peripheral region of the reflected mirror image of the light source 10. For example, as shown in Figure 4, if the reflected mirror image of the light source 10 appears white, defect candidate points appear as white points in the peripheral region of the reflected mirror image of the light source 10. The binarization reference value may be, for example, between 0 and 255, and may be the maximum value of 255, the minimum value of 0, or any value between the maximum and minimum values. When the preferred range of the binarization threshold is known in advance for the surface M to be inspected, the binarization threshold can be quickly determined by setting a value close to that range as the binarization reference value. When the preferred range of the binarization threshold is unknown, the binarization threshold can be determined by setting the maximum or minimum value as the binarization reference value.

2値化閾値を変化させる方向は、2値化基準値が最大値の255の場合には小さくなる方向であり、2値化基準値が最小値の0の場合には大きくなる方向であり、2値化基準値が最大値と最小値の間の値である場合には、小さくなる方向又は大きくなる方向のどちらでもよい。 The direction in which the binarization threshold is changed is toward a decrease when the binarization reference value is the maximum value of 255, toward an increase when the binarization reference value is the minimum value of 0, and can be either toward a decrease or an increase when the binarization reference value is a value between the maximum and minimum values.

例えば、図4に示したように光源10の反射鏡像及び欠陥候補点が白色で現れる場合には、2値化閾値を大きな値から小さな値に変化させることにより2値化画像における欠陥候補点の出現数は増加し、2値化閾値がある値において、2値化画像における欠陥候補点の出現数が所定の基準出現数よりも少ない状態から所定の基準出現数以上となる。参考として、図5(A)に2値化閾値を最大値の255として2値化した2値化画像の一例を示し、図5(B)に2値化閾値を255よりも小さい値で2値化し、欠陥候補点の出現数が所定の基準出現数よりも多くなった2値化画像の一例を示す。なお、例えば、図4に示したように光源10の反射鏡像及び欠陥候補点が白色で現れる場合には、逆に、2値化閾値を小さな値から大きな値に変化させることにより2値化画像における欠陥候補点の出現数は減少し、2値化閾値がある値において、2値化画像における欠陥候補点の出現数が所定の基準出現数よりも多い状態から所定の基準出現数以下となる。また、例えば、光源10の反射鏡像及び欠陥候補点が黒色で現れる図4の反転画像の場合には、上述した白色で現れる場合とは変化の方向が逆となる。 For example, if the reflected mirror image of light source 10 and the defect candidate points appear in white as shown in Figure 4, changing the binarization threshold from a large value to a small value increases the number of defect candidate points in the binarized image, and at a certain binarization threshold value, the number of defect candidate points in the binarized image increases from less than a predetermined reference number to equal to or greater than the predetermined reference number. For reference, Figure 5(A) shows an example of a binarized image binarized with a binarization threshold of 255, the maximum value, and Figure 5(B) shows an example of a binarized image binarized with a binarization threshold smaller than 255, resulting in a number of defect candidate points greater than the predetermined reference number. For example, in the case where the reflected mirror image of the light source 10 and the defect candidate points appear in white as shown in Figure 4, conversely, changing the binarization threshold from a small value to a large value will decrease the number of defect candidate points that appear in the binarized image, and at a certain binarization threshold value, the number of defect candidate points that appear in the binarized image will go from being greater than a predetermined reference number to being equal to or less than the predetermined reference number. Also, in the case of the inverted image of Figure 4, where the reflected mirror image of the light source 10 and the defect candidate points appear in black, the direction of change will be opposite to the case where they appear in white as described above.

2値化閾値は、1ずつ変化させるようにすることが好ましいが、2又は3等の任意の値ずつ変化させてもよい。欠陥候補点の出現数を比較する基準出現数は、被検査面Mに応じて任意に設定することができる。基準出現数の一例を挙げれば、例えば、3から10の範囲とすることが好ましい。 The binarization threshold is preferably changed in increments of 1, but may also be changed in increments of any other value, such as 2 or 3. The reference number of occurrences for comparing the number of occurrences of defect candidate points can be set arbitrarily depending on the surface M to be inspected. As an example, it is preferable to set the reference number of occurrences in the range of 3 to 10.

1次抽出手段44は、また、画像分割手段43により分割した複数の分割画像毎に2値化処理を行い、1次欠陥候補を抽出することが好ましい。光源10の反射鏡像の長さ方向における中央部と端部とで輝度が異なるのに合わせて、2値化処理を行うことができ、より高い精度で欠陥候補を抽出することができるからである。 The primary extraction means 44 also preferably performs binarization processing on each of the multiple divided images divided by the image division means 43 to extract primary defect candidates. This is because binarization processing can be performed in accordance with the difference in brightness between the center and ends in the longitudinal direction of the reflected mirror image of the light source 10, allowing defect candidates to be extracted with greater accuracy.

1次欠陥候補記憶手段45は、例えば、メモリ等により構成され、1次抽出手段44により抽出された1次欠陥候補の重心座標を記憶するように構成されている。 The primary defect candidate storage means 45 is configured, for example, by a memory, and is configured to store the centroid coordinates of the primary defect candidates extracted by the primary extraction means 44.

2次抽出手段46は、例えば、撮影手段20により得られた抽出対象画像である前処理手段42により処理された画像について、1次抽出手段44により抽出された1次欠陥候補のうち、1次欠陥候補の輝度値と、その1次欠陥候補の周辺の平均輝度値との輝度差が所定の輝度差基準値以上であるものを欠陥候補として抽出するように構成されている。具体的には、例えば、抽出対象画像である分割手段43により処理された画像について、1次欠陥候補記憶手段45に記憶された1次欠陥候補の座標の輝度値と、その1次欠陥候補の周辺の座標の平均輝度値との輝度差を算出し、その輝度差が所定の輝度差基準値以上である場合に、欠陥候補として抽出するように構成されている。 The secondary extraction means 46 is configured to extract, for example, from the primary defect candidates extracted by the primary extraction means 44, those for which the difference in brightness between the brightness value of the primary defect candidate and the average brightness value of the surrounding area of the primary defect candidate is equal to or greater than a predetermined brightness difference reference value, for an image processed by the preprocessing means 42, which is the extraction target image obtained by the imaging means 20. Specifically, for example, for the image processed by the division means 43, which is the extraction target image, the secondary extraction means 46 is configured to calculate the difference in brightness between the brightness value of the coordinates of the primary defect candidate stored in the primary defect candidate storage means 45 and the average brightness value of the coordinates of the surrounding area of the primary defect candidate, and to extract the defect candidate if the difference in brightness is equal to or greater than a predetermined brightness difference reference value.

すなわち、欠陥候補を1次抽出手段44と2次抽出手段46の2段階で抽出することにより、より高い精度で抽出することができるようになっている。また、2次抽出手段46では、1次欠陥候補の輝度値と、その周辺の平均輝度値との輝度差により判断するので、輝度値を用いる場合と異なり、塗色が異なっても同一の輝度差基準値を用いることができ、簡便に欠陥候補を抽出することができる。図6に、2次抽出手段46により抽出した欠陥候補の一例を示す。図6において、○で囲んだ中の白色の点が欠陥候補である。 In other words, by extracting defect candidates in two stages, using the primary extraction means 44 and the secondary extraction means 46, it is possible to extract them with higher accuracy. Furthermore, the secondary extraction means 46 makes a judgment based on the difference in brightness between the brightness value of the primary defect candidate and the average brightness value of its surroundings. Therefore, unlike when brightness values are used, the same brightness difference reference value can be used even if the paint color is different, making it possible to easily extract defect candidates. Figure 6 shows an example of a defect candidate extracted by the secondary extraction means 46. In Figure 6, the white dots within the circles are defect candidates.

2次抽出手段46は、また、例えば、抽出対象画像である分割手段43により処理された画像について、光源10の反射鏡像の周囲の領域を光源10の反射鏡像からの距離に応じて複数に分割し、分割した複数の距離領域毎に輝度差基準値を設定するように構成されていることが好ましい。光源10の反射鏡像からの距離により、1次欠陥候補の輝度値と、その1次欠陥候補の周辺の平均輝度値との輝度差が変化するので、距離領域毎に輝度差基準値を設定することにより、より高い精度で欠陥候補を抽出することができるからである。 The secondary extraction means 46 is preferably configured to, for example, divide the area around the reflected mirror image of the light source 10, which is the image to be extracted and processed by the division means 43, into multiple areas according to the distance from the reflected mirror image of the light source 10, and set a brightness difference reference value for each of the multiple distance areas. Since the brightness difference between the brightness value of a primary defect candidate and the average brightness value around that primary defect candidate changes depending on the distance from the reflected mirror image of the light source 10, setting a brightness difference reference value for each distance area enables defect candidates to be extracted with greater accuracy.

図7に、光源10の反射鏡像の周囲の領域を光源10の反射鏡像からの距離に応じて分割した概念図を示す。図7では、光源10の反射鏡像の周囲の領域について、反射鏡像の領域R1から所定のピクセル毎に複数の領域R2,R3,R4,R5,R6に分割した状態を表している。なお、図7では、各領域R1,R2,R3,R4,R5,R6を分かりやすく示すために、それぞれにハッチングを付して示している。 Figure 7 shows a conceptual diagram in which the area around the reflected mirror image of light source 10 is divided according to the distance from the reflected mirror image of light source 10. Figure 7 shows the area around the reflected mirror image of light source 10 divided into multiple regions R2, R3, R4, R5, and R6 at predetermined pixel intervals from region R1 of the reflected mirror image. Note that in Figure 7, each of regions R1, R2, R3, R4, R5, and R6 is shown with hatching to make it easier to understand.

隣接する各領域R2,R3,R4,R5,R6の反射鏡像の領域R1からの距離の差、例えば、各領域R2,R3,R4,R5の幅は、被検査面Mに応じて任意に設定することができる。隣接する各領域R2,R3,R4,R5,R6の反射鏡像の領域R1からの距離の差は、例えば、1ピクセルから10ピクセルの範囲とすることが好ましい。また、図7では、光源10の反射鏡像の周囲の領域を5個の領域に分割する場合について示したが、分割数についても被検査面Mに応じて任意に設定することができる。分割数は、例えば、6から10とすることが好ましい。 The difference in distance between the reflected mirror image of adjacent regions R2, R3, R4, R5, and R6 and region R1, for example, the width of each region R2, R3, R4, and R5, can be set arbitrarily depending on the surface M to be inspected. It is preferable that the difference in distance between the reflected mirror image of adjacent regions R2, R3, R4, R5, and R6 and region R1 be in the range of 1 to 10 pixels, for example. Also, while Figure 7 shows a case where the region around the reflected mirror image of light source 10 is divided into five regions, the number of divisions can also be set arbitrarily depending on the surface M to be inspected. It is preferable that the number of divisions be, for example, 6 to 10.

欠陥候補記憶手段47は、例えば、メモリ等により構成され、2次抽出手段46により抽出された欠陥候補の重心座標を記憶するように構成されている。 The defect candidate storage means 47 is configured, for example, by a memory, and is configured to store the centroid coordinates of the defect candidates extracted by the secondary extraction means 46.

(欠陥検出手段50)
欠陥検出手段50は、例えば、被検査面Mを複数の区画に区切り、撮影手段20により撮影された撮影時刻の異なる基準判定数以上の複数の画像について、被検査面Mの同一の区画に対応する各区画画像領域に、欠陥候補抽出手段40により抽出された欠陥候補がそれぞれ存在する場合に、欠陥であると判定するように構成されている。欠陥であると判定する基準判定数、すなわち被検査面Mの同一の区画に対応する区画画像領域に欠陥候補が存在する画像数は、2以上において任意に設定することができ、例えば、3以上であればより好ましい。
(Defect detection means 50)
The defect detection means 50 is configured, for example, to divide the surface M to be inspected into a plurality of sections, and to judge a defect to exist when a defect candidate extracted by the defect candidate extraction means 40 exists in each section image area corresponding to the same section of the surface M to be inspected, for a number of images equal to or greater than the reference judgment number and captured at different times by the imaging means 20. The reference judgment number for judging a defect, i.e., the number of images in which a defect candidate exists in a section image area corresponding to the same section of the surface M to be inspected, can be set arbitrarily to 2 or more, and, for example, 3 or more is more preferable.

欠陥検出手段50は、具体的には、例えば、被検査面Mを複数の区画に区切り、撮影手段20により撮影された画像について被検査面Mの区画に対応する区画画像領域を特定し、欠陥候補が存在する区画画像領域から欠陥候補が存在する被検査面Mの区画を判別する区画判別手段51と、区画判別手段51による判別結果に基づき、撮影手段20により撮影された撮影時刻の異なる各画像について、被検査面Mの区画毎に欠陥候補の検出回数を集計する回数集計手段52と、回数集計手段52により集計された欠陥候補の検出回数が基準判定数以上の区画があった場合に、その区画に欠陥が存在すると判定する判定手段53とを備えていることが好ましい。 Specifically, the defect detection means 50 preferably includes a section discrimination means 51 that divides the surface M to be inspected into a plurality of sections, identifies section image areas corresponding to the sections of the surface M to be inspected in the images captured by the imaging means 20, and discriminates the sections of the surface M to be inspected in which defect candidates exist from the section image areas in which defect candidates exist; a counting means 52 that, based on the discrimination results of the section discrimination means 51, tallys up the number of times defect candidates have been detected for each section of the surface M to be inspected for each image captured by the imaging means 20 at different times; and a judgment means 53 that, if there is a section in which the number of times defect candidates have been detected tallied by the counting means 52 is equal to or exceeds a reference judgment number, judges that a defect exists in that section.

区画判別手段51は、例えば、図8に示したように、被検査面Mを予め白黒の格子等で複数の区画に区切り、この区画した被検査面Mを移動させた撮影動画から2値化処理等を行い、区画線のみの移動軌跡を抽出し、この区画線のみの動画に撮影手段20により撮影した動画を同期させることにより、撮影手段20により撮影された画像について、被検査面Mの区画に対応する区画画像領域を特定するように構成することができる。さらには、予め知得している過去の最大欠陥箇所の大きさを参考値とし、当該区画の大きさが欠陥候補箇所の大きさよりも大きすぎる場合は、区画面積を等分割して、より小さな区画を当該区画画像領域とすることで欠陥候補の検出精度を向上させることができる。また、撮影手段20のブレなどによる検出誤差を防ぐために、当該区画の大きさは当該最大欠陥箇所の大きさの2倍程度にすることが好ましい。一方、欠陥よりも当該区画サイズが欠陥候補箇所の大きさに比べて大きすぎる場合、同一区画内で複数のノイズが同時に発生する可能性が高くなり、検出精度低下の原因となる。これらのことから、当該区画の大きさは任意に設定することができるが、普通自動車サイズの塗装面の検査においては、例えば、一辺の長さは10mmから100mm程度とすることが好ましい。また、区画判別手段51は、例えば、区画線により区切った各区画に区画番号を設定して、欠陥候補が存在する区画を区画番号により特定するようにすることが好ましい。 As shown in Figure 8, the section discrimination means 51 can be configured to divide the inspection surface M into multiple sections using a black-and-white grid or similar, perform binarization processing on a moving video of the inspection surface M, extract the movement trajectory of only the section lines, and synchronize the video captured by the imaging means 20 with the video of only the section lines to identify section image areas corresponding to the sections of the inspection surface M in the image captured by the imaging means 20. Furthermore, the size of the largest defect spot known in advance can be used as a reference value. If the size of the section is larger than the size of the candidate defect spot, the section area can be divided equally and smaller sections can be used as the section image area, thereby improving the detection accuracy of candidate defects. To prevent detection errors due to camera shake or other factors, it is preferable to set the size of the section approximately twice the size of the largest defect spot. On the other hand, if the size of the section is larger than the size of the candidate defect spot, there is a high possibility that multiple noises will occur simultaneously within the same section, resulting in reduced detection accuracy. For these reasons, the size of the compartments can be set arbitrarily, but when inspecting painted surfaces the size of a standard automobile, it is preferable that the length of one side be approximately 10 mm to 100 mm. Furthermore, it is preferable that the compartment discrimination means 51 assigns a compartment number to each compartment separated by compartment lines, and identifies compartments in which defect candidates exist by the compartment number.

回数集計手段52は、例えば、区画判別手段51により特定された欠陥候補が存在する区画番号を撮影時刻の異なる各画像について集計し、区画番号毎に欠陥候補の検出回数を求めるように構成することが好ましい。また、回数集計手段52は、例えば、撮影手段20により撮影された画像において、欠陥候補抽出手段40により抽出された欠陥候補が、被検査面Mの区画に対応する区画画像領域の境界線から所定の範囲内に存在する場合に、その欠陥候補が存在する欠陥区画画像領域と、その欠陥候補の近傍に位置する隣接区画画像領域とを、被検査面Mの1つの区画に対応する1つの区画画像領域とみなして判定することが好ましい。区画画像領域の近傍、すなわち区画線の近傍に欠陥候補が存在する場合には、欠陥候補が存在する区画画像領域、すなわち区画を特定することが難しく、隣接する区画画像領域まで広げて判定することにより、欠陥の検出率を向上させることができるからである。 The counting means 52 is preferably configured to, for example, count the block numbers in which defect candidates identified by the block discrimination means 51 exist for each image captured at different times, and determine the number of times the defect candidate is detected for each block number. Furthermore, for example, when a defect candidate extracted by the defect candidate extraction means 40 exists within a predetermined range from the boundary line of a block image area corresponding to a block on the inspected surface M in an image captured by the imaging means 20, the counting means 52 preferably determines that the defect block image area in which the defect candidate exists and the adjacent block image area located near the defect candidate are one block image area corresponding to one block on the inspected surface M. This is because, when a defect candidate exists near a block image area, i.e., near a block line, it is difficult to identify the block image area in which the defect candidate exists, i.e., the block, and the defect detection rate can be improved by expanding the determination to include adjacent block image areas.

例えば、欠陥候補が所定の範囲内に存在する境界線が1つの場合には、図9(A)に示したように、その欠陥候補が存在する欠陥区画画像領域52aと、その欠陥候補が所定の範囲内に位置する境界線を介して隣接する1つの隣接区画画像領域52bとを、被検査面Mの1つの区画に対応する1つの区画画像領域とみなして判定するようにすることが好ましい。また、例えば、欠陥候補が所定の範囲内に存在する境界線が2つの場合には、図9(B)に示したように、その欠陥候補が存在する欠陥区画画像領域52aと、その欠陥候補が所定の範囲内に位置する境界線を介して隣接する2つの隣接区画画像領域52bと、その欠陥候補が所定の範囲内に位置する2つの境界線の角部において隣接する1つの隣接区画画像領域52bとを、被検査面の1つの区画に対応する1つの区画画像領域とみなして判定することが好ましい。なお、図9において、欠陥候補は黒丸で示し、欠陥区画画像領域52aには右下斜線のハッチングを付し、隣接区画画像領域52bには左下斜線のハンチングを付して示している。 For example, if there is one boundary line on which a defect candidate exists within a predetermined range, as shown in FIG. 9(A), it is preferable to consider the defective partition image area 52a where the defect candidate exists and the adjacent partition image area 52b adjacent to the defect candidate across the boundary line within the predetermined range as one partition image area corresponding to one partition on the inspected surface M. Furthermore, if there are two boundary lines on which a defect candidate exists within a predetermined range, as shown in FIG. 9(B), it is preferable to consider the defective partition image area 52a where the defect candidate exists, the two adjacent partition image areas 52b adjacent to the defect candidate across the boundary line within the predetermined range as one partition image area corresponding to one partition on the inspected surface. Note that in FIG. 9, defect candidates are indicated by black circles, the defective partition image area 52a is indicated by hatching with a lower right diagonal line, and the adjacent partition image area 52b is indicated by hatching with a lower left diagonal line.

欠陥候補が境界線から所定の範囲内に存在するかどうか、例えば、式1に基づいて判断することが好ましい。式1において、dは欠陥候補と境界線との距離、Aは1つの区画における境界線の長さである。
d<(1/8)A (式1)
すなわち、欠陥候補と境界線との距離dが、その境界線の長さAの1/8よりも短い場合に、所定の範囲内に存在すると判断することが好ましい。
It is preferable to determine whether a defect candidate exists within a predetermined range from the boundary line based on, for example, Equation 1. In Equation 1, d is the distance between the defect candidate and the boundary line, and A is the length of the boundary line in one section.
d<(1/8)A (Formula 1)
That is, if the distance d between the defect candidate and the boundary line is shorter than 1/8 of the length A of the boundary line, it is preferable to determine that the defect candidate is within the predetermined range.

判定手段53は、例えば、回数集計手段52により集計された区画番号毎における欠陥候補の検出回数が基準判定数以上の区画番号があった場合に、その区画番号の区画に欠陥が存在すると判定することが好ましい。例えば、図10に示したように、撮影手段20により撮影された任意の撮影時刻の画像を(A)、撮影手段20により(A)から所定時間後に撮影された画像を(B)、被検査面Mの移動方向をXとし、欠陥候補を黒丸で示すと、(A)は32番区画と33番区画に対応する区画画像領域に欠陥候補が存在し、(B)は32番区画と34番区画に対応する区画画像領域に欠陥候補が存在しているので、欠陥候補の検出回数の基準判定数を2以上とした場合、32番区画存在する欠陥候補は欠陥であり、33番区画に存在する欠陥候補は偽欠陥であると判定することができる。 Preferably, the determination means 53 determines that a defect exists in a section corresponding to a section number when the number of times a defect candidate has been detected for that section number, as tallied by the counting means 52, is equal to or exceeds the reference determination number. For example, as shown in FIG. 10, (A) is an image captured by the imaging means 20 at an arbitrary imaging time, (B) is an image captured by the imaging means 20 a predetermined time after (A), the direction of movement of the inspected surface M is X, and defect candidates are indicated by black circles. In (A), defect candidates exist in the section image areas corresponding to sections 32 and 33, and in (B), defect candidates exist in the section image areas corresponding to sections 32 and 34. Therefore, if the reference determination number for the number of times a defect candidate has been detected is set to 2 or more, it can be determined that the defect candidate in section 32 is a defect and the defect candidate in section 33 is a false defect.

この表面欠陥検査装置1は、例えば、次のようにして用いられる。図11は、表面欠陥検査装置1を用いた表面欠陥検査方法の手順を表すものである。この表面欠陥検査方法では、まず、例えば、光源10から光を照射した被検査面Mを撮影手段20により撮影すると共に、撮影手段20に対する被検査面Mの位置を移動手段30により相対的に移動させて、撮影時間の異なる複数の画像を取得する(ステップS110;撮影手順)。その際、被検査面Mの部位により、カメラ21に対する被検査面Mの相対的な位置の移動に応じて、欠陥候補の輝度が高くなるようにカメラ21の角度を変化させることが好ましい。撮影手段20により撮影された画像は、画像記憶手段41に保存する。 This surface defect inspection device 1 is used, for example, as follows. Figure 11 shows the procedure for a surface defect inspection method using the surface defect inspection device 1. In this surface defect inspection method, for example, the inspection surface M illuminated with light from the light source 10 is first photographed by the imaging means 20, and the position of the inspection surface M relative to the imaging means 20 is moved by the moving means 30 to obtain multiple images photographed at different times (step S110; imaging procedure). In this case, it is preferable to change the angle of the camera 21 depending on the location of the inspection surface M, in accordance with the movement of the position of the inspection surface M relative to the camera 21, so that the brightness of defect candidates is increased. The images photographed by the imaging means 20 are stored in the image storage means 41.

次いで、例えば、撮影手順(ステップS110)により撮影した撮影時刻の異なる複数の画像からそれぞれ欠陥候補を抽出する(ステップS120;欠陥候補抽出手順)。欠陥候補抽出手順(ステップS120)では、例えば、まず、前処理手段42により、上述したようにして撮影手段20で得られた画像について前処理を行う(ステップS121;前処理手順)。続いて、例えば、画像分割手段43により、上述したようにして前処理した画像から光源10の1つの反射鏡像及びその周辺領域を含む領域を切り取り、反射鏡像の長さ方向において複数に分割する(ステップS122;画像分割手順)。 Next, defect candidates are extracted from each of the multiple images captured at different times using the imaging procedure (step S110) (step S120; defect candidate extraction procedure). In the defect candidate extraction procedure (step S120), for example, the preprocessing means 42 first preprocesses the image obtained by the imaging means 20 as described above (step S121; preprocessing procedure). Next, for example, the image segmentation means 43 cuts out an area including one reflector image of the light source 10 and its surrounding area from the image preprocessed as described above, and segments the image into multiple parts along the length of the reflector image (step S122; image segmentation procedure).

次に、例えば、1次抽出手段44により、画像分割手順(ステップS122)により分割した複数の分割画像毎に、上述したようにして2値化処理を行い、1次欠陥候補を抽出する(ステップS123;1次抽出手順)。具体的には、例えば、撮影手順(ステップS110)により得られた画像に基づく抽出対象画像である前処理した画像について、画像分割手順により分割した分割画像毎に、それぞれ、2値化閾値を2値化基準値から一方向に順に変化させながら2値化処理を順に行い、処理の順に得られた複数の2値化画像を比較して、欠陥候補点の出現数が所定の基準出現数よりも少ない状態から所定の基準出現数以上となった時の2値化画像、又は、欠陥候補点の出現数が所定の基準出現数よりも多い状態から所定の基準出現数以下となった時の2値化画像を閾値画像とし、この閾値画像から、1次欠陥候補を抽出する。すなわち、例えば、1つの抽出対象画像について、2値化閾値を2値化基準値から一方向に順に変化させて2値化処理を繰り返し行い、得られた2値化画像を比較して、欠陥候補点の出現数の変化から閾値画像を見つけ、1次欠陥候補を抽出する。1次抽出手順(ステップS123)により抽出した1次欠陥候補は1次欠陥候補記憶手段45に保存する。 Next, for example, the primary extraction means 44 performs binarization processing as described above for each of the multiple divided images obtained by the image division procedure (step S122) to extract primary defect candidates (step S123; primary extraction procedure). Specifically, for example, for a preprocessed image, which is the extraction target image based on the image obtained by the photographing procedure (step S110), binarization processing is performed for each of the divided images obtained by the image division procedure, while sequentially changing the binarization threshold value in one direction from the binarization reference value. The multiple binarized images obtained in the order of processing are compared, and the binarized image when the number of defect candidate points changes from less than the predetermined reference number to equal to or greater than the predetermined reference number, or when the number of defect candidate points changes from greater than the predetermined reference number to equal to or less than the predetermined reference number, is designated as a threshold image, and primary defect candidates are extracted from this threshold image. That is, for example, for one extraction target image, the binarization threshold is changed in one direction from the binarization reference value in order to repeatedly perform the binarization process, and the resulting binarized images are compared to find a threshold image based on the change in the number of defect candidate points that appear, thereby extracting primary defect candidates. The primary defect candidates extracted by the primary extraction procedure (step S123) are stored in the primary defect candidate storage means 45.

その後、例えば、2次抽出手段46により、撮影手順(ステップS110)により得られた画像に基づく抽出対象画像である分割した画像について、上述したようにして1次抽出手順(ステップS123)により抽出された1次欠陥候補から欠陥候補を抽出する(ステップS124;2次抽出手順)。具体的には、例えば、抽出対象画像である分割した画像について、1次欠陥候補の輝度値と、その1次欠陥候補の周辺の平均輝度値との輝度差を算出し、その輝度差が所定の輝度差基準値以上である場合に欠陥候補として抽出する。2次抽出手順(ステップS124)により抽出した欠陥候補は欠陥候補記憶手段47に保存する。 Then, for example, the secondary extraction means 46 extracts defect candidates from the primary defect candidates extracted in the primary extraction procedure (step S123) as described above for the segmented images that are the extraction target images based on the image obtained in the photography procedure (step S110) (step S124; secondary extraction procedure). Specifically, for example, for the segmented images that are the extraction target images, the luminance difference between the luminance value of the primary defect candidate and the average luminance value around that primary defect candidate is calculated, and if the luminance difference is equal to or greater than a predetermined luminance difference reference value, the defect candidate is extracted. The defect candidates extracted in the secondary extraction procedure (step S124) are stored in the defect candidate storage means 47.

欠陥候補抽出手順(ステップS120)により欠陥候補を抽出した後、欠陥候補抽出手順(ステップS120)により抽出した欠陥候補に基づき欠陥を検出する(ステップS130;欠陥検出手順)。欠陥検出手順(ステップS130)では、例えば、被検査面Mを複数の区画に区切り、撮影手段(ステップS110)により撮影された撮影時刻の異なる基準判定数以上の複数の画像について、被検査面Mの同一の区画に対応する各区画画像領域に、欠陥候補抽出手順(ステップS120)により抽出された欠陥候補がそれぞれ存在する場合に、欠陥であると判定することが好ましい。 After defect candidates are extracted using the defect candidate extraction procedure (step S120), defects are detected based on the defect candidates extracted using the defect candidate extraction procedure (step S120) (step S130; defect detection procedure). In the defect detection procedure (step S130), for example, it is preferable to divide the inspected surface M into multiple sections, and for multiple images captured by the imaging means (step S110) at different capture times (a reference determination number or more), determine that a defect exists if the defect candidates extracted using the defect candidate extraction procedure (step S120) exist in each section image area corresponding to the same section of the inspected surface M.

具体的には、まず、例えば、区画判別手段51により、上述したようにして、被検査面Mを複数の区画に区切り、撮影手順(ステップS110)により撮影された画像について被検査面Mの区画に対応する区画画像領域を特定し、欠陥候補が存在する区画画像領域から欠陥候補が存在する被検査面Mの区画を判別する(ステップS131;区画判別手順)。次いで、例えば、回数集計手段52により、上述したようにして、区画判別手順手段51による判別結果に基づき、撮影手順(ステップS110)により撮影された撮影時刻の異なる各画像について、被検査面Mの区画毎に欠陥候補の検出回数を集計する(ステップS132;回数集計手順)。続いて、例えば、判定手段53により、上述したようにして、回数集計手順により集計された欠陥候補の検出回数が基準判定数以上の区画があった場合に、その区画に欠陥が存在すると判定する(ステップS133;判定手順)。 Specifically, for example, the partition discrimination means 51 first divides the surface M to be inspected into multiple partitions as described above, identifies partition image areas corresponding to the partitions of the surface M in the images captured by the photographing procedure (step S110), and discriminates the partitions of the surface M in which defect candidates exist from the partition image areas in which defect candidates exist (step S131; partition discrimination procedure). Next, for example, the count tallying means 52 tally the number of times defect candidates have been detected for each partition of the surface M to be inspected for each image captured at different times by the photographing procedure (step S110) based on the discrimination results by the partition discrimination procedure means 51 as described above (step S132; count tallying procedure). Next, for example, the judgment means 53 determines that a defect exists in a partition if the number of times defect candidates have been detected as counted by the count tallying procedure is equal to or exceeds the reference judgment number as described above (step S133; judgment procedure).

そののち、例えば、表示手段60により、欠陥検出手順(ステップS130)で得られた検出結果を表示する(ステップS140;表示手順)。表示手段60では、例えば、ディスプレイ等に、欠陥の重心に円マーク等を付して表示する。これにより、表面欠陥の検査を行うことができる。 Then, for example, the display means 60 displays the detection results obtained in the defect detection procedure (step S130) (step S140; display procedure). The display means 60, for example, displays the defect's center of gravity on a display or the like by adding a circle mark or the like. This allows surface defect inspection to be performed.

このように本実施の形態によれば、被検査面Mを複数の区画に区切り、撮影手段20により撮影された撮影時刻の異なる基準判定数以上の画像について、被検査面Mの同一の区画に対応する各区画画像領域に、欠陥候補抽出手段40により抽出された欠陥候補がそれぞれ存在する場合に、欠陥であると判定するようにしたので、欠陥候補の移動軌跡と、被検査面Mの区画の移動軌跡との関係から、欠陥候補が欠陥であるか否かを判定することができる。よって、欠陥候補の移動軌跡が曲線状となる場合、例えば、欠陥候補の輝度を高くするために、カメラ21に対する被検査面Mの相対的な位置の移動に応じて、カメラ21の角度を変化させる場合であっても、高い精度で欠陥を判定することができる。 As described above, according to this embodiment, the surface M to be inspected is divided into multiple sections, and for images captured by the imaging means 20 at different capture times equal to or greater than the reference determination number, if a defect candidate extracted by the defect candidate extraction means 40 is present in each section image area corresponding to the same section of the surface M to be inspected, it is determined that the defect candidate is a defect. Therefore, it is possible to determine whether a defect candidate is a defect based on the relationship between the movement trajectory of the defect candidate and the movement trajectory of the section of the surface M to be inspected. Therefore, even if the movement trajectory of the defect candidate is curved, for example, if the angle of the camera 21 is changed in accordance with the movement of the surface M to be inspected relative to the camera 21 in order to increase the brightness of the defect candidate, it is possible to determine the defect with high accuracy.

また、欠陥候補が被検査面Mの区画に対応する区画画像領域の境界線から所定の範囲内に存在する場合に、欠陥区画画像領域52aと隣接区画画像領域52bとを、被検査面Mの1つの区画に対応する1つの区画画像領域とみなして判定するようにしたので、欠陥の判定精度をより向上させることができる。 Furthermore, when a defect candidate exists within a predetermined range from the boundary line of a partition image area corresponding to a partition on the inspected surface M, the defective partition image area 52a and the adjacent partition image area 52b are deemed to be one partition image area corresponding to one partition on the inspected surface M, thereby further improving the accuracy of defect determination.

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

また、上記実施の形態では、欠陥候補抽出手段40及び欠陥候補抽出手順(ステップS120)について具体的に説明したが、他の構成及び手順により欠陥候補を抽出するようにしてもよい。例えば、欠陥候補抽出手段40及び欠陥候補抽出手順(ステップS120)では、グローバル2値化、及び、局所2値化等の従来から知られている方法により、欠陥候補を抽出するようにしてもよい。更に、撮影手段20により得られた画像について、例えば、直交する2方向において差分演算を行い生成した勾配画像に基づき、欠陥候補を抽出するようにしてもよい。その際、直交する2方向において、正方向及び負方向の両方向から差分演算をそれぞれ行い、演算結果より勾配画像を生成するようにしてもよく、また、直交する2方向において、差分演算を行い、演算結果より正の値のみを用いて算出する勾配ベクトルの絶対値と、演算結果より負の値のみを用いて算出する勾配ベクトルの絶対値とから勾配画像を生成するようにしてもよい。 In the above embodiment, the defect candidate extraction means 40 and the defect candidate extraction procedure (step S120) were specifically described, but defect candidates may be extracted using other configurations and procedures. For example, the defect candidate extraction means 40 and the defect candidate extraction procedure (step S120) may extract defect candidates using conventional methods such as global binarization and local binarization. Furthermore, defect candidates may be extracted based on gradient images generated by, for example, performing difference calculations in two orthogonal directions on images obtained by the imaging means 20. In this case, difference calculations may be performed in both the positive and negative directions in the two orthogonal directions, and gradient images may be generated from the calculation results. Alternatively, difference calculations may be performed in the two orthogonal directions, and gradient images may be generated from the absolute values of gradient vectors calculated using only positive values from the calculation results, and the absolute values of gradient vectors calculated using only negative values from the calculation results.

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

1…表面欠陥検査装置、10…光源、20…撮影手段、21…カメラ、30…移動手段、40…欠陥候補抽出手段、41…画像記憶手段、42…前処理手段、43…画像分割手段、44…1次抽出手段、45…1次欠陥候補記憶手段、46…2次抽出手段、47…欠陥候補記憶手段、50…欠陥検出手段、51…区画判別手段、52…回数集計手段、52a…欠陥区画画像領域、52b…隣接区画画像領域、53…判定手段、60…表示手段、M…被検査面 1...Surface defect inspection device, 10...Light source, 20...Photographing means, 21...Camera, 30...Moving means, 40...Defect candidate extraction means, 41...Image storage means, 42...Preprocessing means, 43...Image segmentation means, 44...Primary extraction means, 45...Primary defect candidate storage means, 46...Secondary extraction means, 47...Defect candidate storage means, 50...Defect detection means, 51...Division discrimination means, 52...Counting means, 52a...Defective division image area, 52b...Adjacent division image area, 53...Determination means, 60...Display means, M...Inspected surface

Claims (3)

被検査面に光を照射する光源と、
前記光源により照射された前記被検査面を撮影して画像を得る撮影手段と、
前記撮影手段に対する前記被検査面の位置を相対的に移動させる移動手段と、
前記移動手段により前記撮影手段と前記被検査面とを相対的に移動させながら任意の時間ごとに前記撮影手段により撮影した複数の画像から欠陥候補を抽出する欠陥候補抽出手段と、
前記欠陥候補抽出手段により抽出した欠陥候補に基づき欠陥を検出する欠陥検出手段とを備え、
前記欠陥検出手段は、前記被検査面を複数の区画に区切り、前記撮影手段により撮影された撮影時刻の異なる基準判定数以上の画像について、前記被検査面の同一の区画に対応する各区画画像領域に、前記欠陥候補抽出手段により抽出された欠陥候補がそれぞれ存在する場合に、前記同一の区画に欠陥が存在すると判定すると共に、
前記欠陥検出手段は、
前記被検査面を予め複数の区画に区切り、この区画した前記被検査面を移動させた撮影動画から区画線のみの移動軌跡を抽出し、この区画線のみの動画に前記撮影手段により撮影された画像を同期させることにより、前記被検査面の区画に対応する区画画像領域を特定し、欠陥候補が存在する区画画像領域から欠陥候補が存在する前記被検査面の区画を判別する区画判別手段と、
前記区画判別手段による判別結果に基づき、前記撮影手段により撮影された撮影時刻の異なる各画像について、前記被検査面の区画毎に欠陥候補の検出回数を集計する回数集計手段と、
前記回数集計手段により集計された欠陥候補の検出回数が基準判定数以上の区画があった場合に、その区画に欠陥が存在すると判定する判定手段とを備える
ことを特徴とする表面欠陥検査装置。
a light source that irradiates light onto the surface to be inspected;
an imaging means for capturing an image of the surface to be inspected illuminated by the light source;
a moving means for moving the position of the inspection surface relative to the imaging means;
a defect candidate extracting means for extracting defect candidates from a plurality of images taken by the photographing means at arbitrary time intervals while the photographing means and the inspection surface are moved relatively by the moving means;
a defect detection means for detecting defects based on the defect candidates extracted by the defect candidate extraction means,
The defect detection means divides the surface to be inspected into a plurality of sections, and when a defect candidate extracted by the defect candidate extraction means exists in each section image area corresponding to the same section of the surface to be inspected for a reference determination number or more of images photographed by the photographing means at different photographing times, the defect detection means determines that a defect exists in the same section, and
The defect detection means
a section discrimination means for dividing the surface to be inspected into a plurality of sections in advance, extracting a moving trajectory of only the section lines from a moving image of the divided surface to be inspected, and synchronizing an image photographed by the photographing means with the moving image of only the section lines to identify a section image area corresponding to the section of the surface to be inspected, and discriminating a section of the surface to be inspected in which a defect candidate exists from the section image area in which a defect candidate exists;
a counting means for counting the number of times defect candidates are detected for each section of the inspection surface for each image taken by the photographing means at different photographing times based on the discrimination result by the section discriminating means;
a determination means for determining that a defect exists in a section when the number of times the defect candidate has been detected, as counted by the counting means, is equal to or exceeds a reference determination number.
A surface defect inspection device characterized by:
前記欠陥検出手段は、前記撮影手段により撮影された画像において、前記欠陥候補抽出手段により抽出された欠陥候補が、前記被検査面の区画に対応する区画画像領域の境界線から所定の範囲内に存在する場合に、所定の範囲内に存在する境界線が1つであるときには、欠陥候補が存在する欠陥区画画像領域と、欠陥候補が所定の範囲内に位置する境界線を介して隣接する1つの隣接区画画像領域とを、被検査面の1つの区画に対応する1つの区画画像領域とみなして判定し、所定の範囲内に存在する境界線が2つであるときには、欠陥候補が存在する欠陥区画画像領域と、欠陥候補が所定の範囲内に位置する境界線を介して隣接する2つの隣接区画画像領域と、欠陥候補が所定の範囲内に位置する2つの境界線の角部において隣接する1つの隣接区画画像領域とを、被検査面の1つの区画に対応する1つの区画画像領域とみなして判定し、
前記区画画像領域は、辺が直線または曲線である多角形であり、かつ、1つの辺が1つの境界線である
ことを特徴とする請求項1記載の表面欠陥検査装置。
When a defect candidate extracted by the defect candidate extraction means exists within a predetermined range from a boundary line of a partition image area corresponding to a partition of the inspected surface in the image photographed by the photographing means, and there is only one boundary line within the predetermined range, the defect detection means determines that the defective partition image area in which the defect candidate exists and one adjacent partition image area adjacent to the defect candidate located within the predetermined range via the boundary line are one partition image area corresponding to the partition of the inspected surface; and when there are two boundary lines within the predetermined range, the defect detection means determines that the defective partition image area in which the defect candidate exists, two adjacent partition image areas adjacent to the defect candidate located within the predetermined range via the boundary lines, and one adjacent partition image area adjacent to the defect candidate at a corner of the two boundary lines located within the predetermined range are one partition image area corresponding to the partition of the inspected surface .
The partition image area is a polygon with straight or curved sides, and each side is a boundary line.
2. The surface defect inspection device according to claim 1.
光源から光を照射した被検査面を撮影手段により撮影すると共に、前記撮影手段に対する前記被検査面の位置を移動手段により相対的に移動させて、撮影時間の異なる複数の画像を取得する撮影手順と、
前記撮影手順により撮影した画像から欠陥候補を抽出する欠陥候補抽出手順と、
前記欠陥候補抽出手順により抽出した欠陥候補に基づき欠陥を検出する欠陥検出手順とを含み、
前記欠陥検出手順では、前記被検査面を複数の区画に区切り、前記撮影手順により撮影された撮影時刻の異なる基準判定数以上の画像について、前記被検査面の同一の区画に対応する各区画画像領域に、前記欠陥候補抽出手順により抽出された欠陥候補がそれぞれ存在する場合に、前記同一の区画に欠陥が存在すると判定すると共に、
前記欠陥検出手順は、
前記被検査面を予め複数の区画に区切り、この区画した前記被検査面を移動させた撮影動画から区画線のみの移動軌跡を抽出し、この区画線のみの動画に前記撮影手順により撮影された画像を同期させることにより、前記被検査面の区画に対応する区画画像領域を特定し、欠陥候補が存在する区画画像領域から欠陥候補が存在する前記被検査面の区画を判別する区画判別手順と、
前記区画判別手順による判別結果に基づき、前記撮影手順により撮影された撮影時刻の異なる各画像について、前記被検査面の区画毎に欠陥候補の検出回数を集計する回数集計手順と、
前記回数集計手順により集計された欠陥候補の検出回数が基準判定数以上の区画があった場合に、その区画に欠陥が存在すると判定する判定手順とを含む
ことを特徴とする表面欠陥検査方法。
an imaging procedure in which an image of the inspection surface illuminated with light from a light source is captured by an imaging means, and a position of the inspection surface relative to the imaging means is moved by a moving means to obtain a plurality of images captured at different times ;
a defect candidate extraction step of extracting defect candidates from the images captured by the photographing step;
a defect detection step for detecting defects based on the defect candidates extracted by the defect candidate extraction step,
In the defect detection procedure, the surface to be inspected is divided into a plurality of sections, and for images photographed in the photographing procedure at different photographing times equal to or greater than a reference determination number, if a defect candidate extracted in the defect candidate extraction procedure exists in each section image area corresponding to the same section of the surface to be inspected, it is determined that a defect exists in the same section;
The defect detection procedure includes:
a section discrimination procedure for dividing the surface to be inspected into a plurality of sections in advance, extracting a movement trajectory of only the section lines from a captured video of the sectioned surface to be inspected being moved, and synchronizing the video of only the section lines with the image captured by the photographing procedure to identify section image areas corresponding to the sections of the surface to be inspected, and discriminating the sections of the surface to be inspected in which defect candidates exist from the section image areas in which defect candidates exist;
a counting step of counting the number of times defect candidates are detected for each section of the inspection surface for each image taken at a different photographing time in the photographing step, based on a discrimination result in the section discrimination step;
and a determination step of determining that a defect exists in a section when the number of times the defect candidate is detected, which is counted by the counting step, is equal to or exceeds a reference determination number.
A surface defect inspection method characterized by:
JP2021196063A 2021-12-02 2021-12-02 Surface defect inspection device and surface defect inspection method Active JP7789310B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021196063A JP7789310B2 (en) 2021-12-02 2021-12-02 Surface defect inspection device and surface defect inspection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021196063A JP7789310B2 (en) 2021-12-02 2021-12-02 Surface defect inspection device and surface defect inspection method

Publications (2)

Publication Number Publication Date
JP2023082350A JP2023082350A (en) 2023-06-14
JP7789310B2 true JP7789310B2 (en) 2025-12-22

Family

ID=86728521

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021196063A Active JP7789310B2 (en) 2021-12-02 2021-12-02 Surface defect inspection device and surface defect inspection method

Country Status (1)

Country Link
JP (1) JP7789310B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008107311A (en) 2006-09-29 2008-05-08 Hitachi Chem Co Ltd Defect inspection method and device
CN109991233A (en) 2019-04-30 2019-07-09 博众精工科技股份有限公司 A kind of optical detection apparatus and method
US20200150052A1 (en) 2018-11-12 2020-05-14 Samsung Display Co., Ltd. Apparatus and method for inspecting glass substrate
JP2021056182A (en) 2019-10-02 2021-04-08 コニカミノルタ株式会社 Apparatus and method for detecting surface defect of workpiece, surface inspection system for workpiece, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008107311A (en) 2006-09-29 2008-05-08 Hitachi Chem Co Ltd Defect inspection method and device
US20200150052A1 (en) 2018-11-12 2020-05-14 Samsung Display Co., Ltd. Apparatus and method for inspecting glass substrate
CN109991233A (en) 2019-04-30 2019-07-09 博众精工科技股份有限公司 A kind of optical detection apparatus and method
JP2021056182A (en) 2019-10-02 2021-04-08 コニカミノルタ株式会社 Apparatus and method for detecting surface defect of workpiece, surface inspection system for workpiece, and program

Also Published As

Publication number Publication date
JP2023082350A (en) 2023-06-14

Similar Documents

Publication Publication Date Title
TWI626440B (en) Defect detection apparatus, defect detection method and program product
JP5086970B2 (en) Wood appearance inspection device, wood appearance inspection method
KR101679650B1 (en) Method for detecting defect of hole inside
CN111602047B (en) Tablet inspection method and tablet inspection device
EP3315951B1 (en) Surface defect detection apparatus and surface defect detection method
CN107735674A (en) Surface defect detection device, surface defect detection method, and steel manufacturing method
TW201640101A (en) Device for examining surface defect in hot-dipped steel plate, and method for examining surface defect
US20240420314A1 (en) Foreign material inspection system
JP2019200775A (en) Surface defect inspection device and surface defect inspection method
JP4910800B2 (en) Screw parts inspection device and inspection method
JP6566903B2 (en) Surface defect detection method and surface defect detection apparatus
JP2002243655A (en) Electronic component appearance inspection method and appearance inspection device
JP2007078540A (en) Appearance inspection method and appearance inspection apparatus
JP7789310B2 (en) Surface defect inspection device and surface defect inspection method
JP2019124518A (en) Tablet inspection method and tablet inspection device
JP2015200544A (en) Surface irregularity inspection device and surface irregularity inspection method
JP2019124519A (en) Tablet inspection method and tablet inspection device
JP7716065B2 (en) Surface defect inspection device and surface defect inspection method
CN111833350A (en) Machine vision detection method and system
JP7750375B2 (en) Image processing device, image processing method, and program
JP7306620B2 (en) Surface defect inspection device and surface defect inspection method
JP2001317927A (en) Slit-shaped groove inspection apparatus and method
JPH0718811B2 (en) Defect inspection method
JP2024155236A (en) Focus setting selection device, surface defect inspection device, focus setting selection method, and surface defect inspection method
TWI883644B (en) Inspection system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20241028

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20250625

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20250702

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20250828

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20251202

R150 Certificate of patent or registration of utility model

Ref document number: 7789310

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150