JP5605010B2 - Surface inspection method - Google Patents

Surface inspection method Download PDF

Info

Publication number
JP5605010B2
JP5605010B2 JP2010144522A JP2010144522A JP5605010B2 JP 5605010 B2 JP5605010 B2 JP 5605010B2 JP 2010144522 A JP2010144522 A JP 2010144522A JP 2010144522 A JP2010144522 A JP 2010144522A JP 5605010 B2 JP5605010 B2 JP 5605010B2
Authority
JP
Japan
Prior art keywords
image data
pixel
value
inspection
unevenness
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
JP2010144522A
Other languages
Japanese (ja)
Other versions
JP2012008018A (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.)
Daido Steel Co Ltd
Original Assignee
Daido Steel Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Daido Steel Co Ltd filed Critical Daido Steel Co Ltd
Priority to JP2010144522A priority Critical patent/JP5605010B2/en
Publication of JP2012008018A publication Critical patent/JP2012008018A/en
Application granted granted Critical
Publication of JP5605010B2 publication Critical patent/JP5605010B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、表面検査方法に関するものであり、詳しくは、画像処理によって検査対象物の表面に存在するキズなどを検出する(=キズなどが存在するか否かを検査する)ことができる表面検査方法に関するものである。   The present invention relates to a surface inspection method, and more specifically, a surface inspection capable of detecting a scratch or the like existing on the surface of an inspection object by image processing (= inspecting whether a scratch or the like exists). It is about the method.

鋼材、鉄材、アルミ材などといった製品は、製造後において、その表面にキズなどが存在するか否かを検査する表面検査が実施されることがある。このような製品の表面検査方法には、たとえば、検査者が目視によりキズなどを検出する方法のほか、画像処理を適用して自動的にキズなどを検出する方法などが用いられている。   A product such as a steel material, an iron material, an aluminum material, or the like may be subjected to surface inspection for inspecting whether or not there is a scratch or the like on the surface after manufacturing. As such a product surface inspection method, for example, a method in which an inspector visually detects a scratch or the like, and a method in which image processing is applied to automatically detect a scratch or the like are used.

画像処理を適用する一般的な表面検査方法は、たとえば、次のような手順で実施される。まず、製品(=検査対象物)の表面を撮像し、画像データを作成する。次いで、作成した画像データに含まれる画素から、所定の閾値よりも高い輝度値(または所定の閾値よりも低い輝度値)を有する画素を抽出する。そして、所定の閾値よりも高い輝度値(または低い輝度値)を有する画素が存在した場合には、当該画素をキズとみなして検出する。または、所定の閾値よりも高い輝度値(または低い輝度値)を有する画素からなる「画素の集合」を検出し、当該「画素の集合」の大きさや、当該「画素の集合」に含まれる画素数が所定の値を超える場合には、当該「画素の集合」をキズとみなして検出する。このように、一般的には、画像データの画素の輝度に基づいて、「キズ」が存在するか否か判定する。そして、最終的には、このように検出した「キズ」に基づいて、製品の良否などを判定する。   A general surface inspection method to which image processing is applied is performed by the following procedure, for example. First, the surface of a product (= inspection object) is imaged to create image data. Next, a pixel having a luminance value higher than a predetermined threshold (or a luminance value lower than the predetermined threshold) is extracted from the pixels included in the created image data. When a pixel having a luminance value (or a luminance value lower than the predetermined threshold value) exists, the pixel is detected as a scratch. Alternatively, a “pixel set” composed of pixels having a luminance value (or lower luminance value) higher than a predetermined threshold is detected, and the size of the “pixel set” or the pixels included in the “pixel set” When the number exceeds a predetermined value, the “pixel set” is detected as a scratch. Thus, generally, it is determined whether or not “scratches” exist based on the luminance of the pixels of the image data. Finally, the quality of the product is determined based on the “scratches” detected in this way.

ところで、製品の表面には、「キズと見なさなくてもよい凹凸や模様」が存在することがある。たとえば、研削や切削などが施された製品は、その表面に、研削痕や切削痕などといった加工痕が存在することがある。このような加工痕は、キズと見なさなくてもよいことがある。このような製品に対して、前記のような表面検査方法を適用すると、「キズ」と「キズと見なさなくてもよい凹凸や模様」とを区別することが困難なことがある。すなわち、画像データの画素の輝度に基づいて「キズ」か否かを判断する方法では、「キズ」と「キズと見なさなくてもよい凹凸や模様」に対応する画素が、同レベル帯域の輝度値を有していると、これらを区別できない。このため、「キズ」の検査の精度が低下することがある。   By the way, “the unevenness and the pattern which do not need to be regarded as a scratch” may exist on the surface of the product. For example, a product subjected to grinding or cutting may have processing marks such as grinding marks or cutting marks on the surface thereof. Such processing marks may not be regarded as scratches. When the surface inspection method as described above is applied to such a product, it may be difficult to distinguish between “scratches” and “unevenness or pattern that may not be regarded as scratches”. In other words, in the method for determining whether or not the pixel is “scratched” based on the luminance of the pixel of the image data, the pixel corresponding to “scratch” and “unevenness or pattern that does not need to be regarded as a scratch” has the luminance in the same level band. If they have a value, they cannot be distinguished. For this reason, the accuracy of the inspection for “scratches” may be reduced.

なお、キズの検査の精度の向上を図るために、画像データに含まれるノイズを除去する構成が用いられることがある。たとえば、所定の閾値よりも高い輝度値を有する画素の集合であっても、所定のサイズよりも小さいサイズの画素の集合は、ノイズとして除去する方法が用いられることがある。このほか、画像データの各画素の輝度値を、所定の領域ごとに平均化することによりノイズを除去する方法が用いられることがある。   In some cases, a configuration for removing noise included in image data is used in order to improve the accuracy of the inspection of scratches. For example, even in a set of pixels having a luminance value higher than a predetermined threshold, a method of removing a set of pixels having a size smaller than a predetermined size as noise may be used. In addition, a method of removing noise by averaging the luminance value of each pixel of image data for each predetermined region may be used.

しかしながら、これらのような方法は、前記のような製品に対しては、効果が得られない。すなわち、所定のサイズよりも小さいサイズの画素の集合を、加工痕とみなして除去すると、所定のサイズよりも小さいサイズのキズも除去されて検出できなくなる。そして、キズの検出漏れがないようにするため、小さいサイズの画素の集合をキズとして検出すると、加工痕もキズとして検出される。また、画素の輝度値を平均化する構成では、加工痕に対応する画素を除去すると、キズに対応する画素までもが除去される。そして、キズの検出漏れを防止するため、平均化の程度を低くすると、加工痕が除去されずに残り、キズとして検出される。   However, these methods are not effective for the products as described above. That is, if a set of pixels having a size smaller than the predetermined size is regarded as a processing mark and removed, scratches having a size smaller than the predetermined size are also removed and cannot be detected. Then, in order to prevent the detection of a flaw from being detected, if a set of pixels having a small size is detected as a flaw, a processing mark is also detected as a flaw. Further, in the configuration in which the luminance values of the pixels are averaged, when the pixels corresponding to the processing marks are removed, even the pixels corresponding to the scratch are removed. And in order to prevent the detection omission of a crack, if the degree of averaging is made low, a processing trace will not be removed but it will be detected as a crack.

このような問題を解決する構成としては、たとえば、特許文献1のような構成が提案されている。特許文献1に記載の構成は、所定の方向に研削処理が施された製品に光を照射し、製品の表面からの反射光のうち、研削方向に直角の方向に散乱した成分を選択的に検出し、この検出結果に基づいて製品の表面性状を検査する、というものである。そして、研削方向に対し直角の方向に大きく広がった分布を持つ散乱成分の情報量の多さを利用して、明確に弁別することが難しい凹凸性の表面欠陥を確実に検出できるというものである。特許文献1の記載によれば、製品の表面からの反射光は、研削方向に対して直角な方向への散乱成分の拡がりが、他の方向への拡がりよりも大きいという知見に基づくものである。   As a configuration for solving such a problem, for example, a configuration as in Patent Document 1 has been proposed. The configuration described in Patent Literature 1 irradiates a product that has been ground in a predetermined direction with light, and selectively reflects components scattered in a direction perpendicular to the grinding direction from the reflected light from the surface of the product. It is detected and the surface property of the product is inspected based on the detection result. And, by utilizing the amount of information of the scattering component having a distribution that spreads widely in the direction perpendicular to the grinding direction, it is possible to reliably detect uneven surface defects that are difficult to distinguish clearly. . According to the description in Patent Document 1, the reflected light from the surface of the product is based on the knowledge that the spread of the scattered component in the direction perpendicular to the grinding direction is larger than the spread in the other direction. .

しかしながら、特許文献1に記載の構成は、研削方向が未知または不明であると、適用できないという問題を有する。すなわち、前記のとおり、製品の表面からの反射光のうち、研削方向に対して直角な方向に散乱した成分を選択的に検出する構成であるから、研削方向が既知である必要がある。さらに、特許文献1に記載の構成は、研削方向が一定でない製品や、研削方向が互いに相違する複数の製品に対しては、適用が困難であるという問題点も有する。   However, the configuration described in Patent Document 1 has a problem that it cannot be applied if the grinding direction is unknown or unknown. That is, as described above, since the component scattered in the direction perpendicular to the grinding direction is selectively detected from the reflected light from the surface of the product, the grinding direction needs to be known. Furthermore, the configuration described in Patent Document 1 has a problem that it is difficult to apply to a product whose grinding direction is not constant or a plurality of products whose grinding directions are different from each other.

特開平9−196862号公報Japanese Patent Laid-Open No. 9-196862

前記実情に鑑み、本発明が解決しようとする課題は、検査対象物の表面に所定の方向に延伸するキズではない凹凸や模様などが存在する場合において、当該凹凸や模様などの延伸方向を検出することができる表面検査方法を提供すること、または、検査対象物の表面に所定の方向に延伸するキズではない凹凸や模様が存在する場合であっても、当該凹凸や模様の影響を抑制もしくは除去できる表面検査方法を提供すること、または、検査対象物の表面にキズではない凹凸や模様が存在し、当該凹凸や模様の延伸方向が一定ではない場合であっても、当該凹凸や模様の影響を抑制もしくは除去できる表面検査方法を提供すること、また、キズではない凹凸や模様の延伸方向が互いに異なる複数の検査対象物についても、当該凹凸や模様の影響を抑制もしくは除去できる表面検査方法を提供すること、である。   In view of the above situation, the problem to be solved by the present invention is to detect the extending direction of the unevenness or pattern when the surface of the inspection object has unevenness or pattern that is not a scratch extending in a predetermined direction. To provide a surface inspection method that can be performed, or even if there are irregularities and patterns that are not scratches extending in a predetermined direction on the surface of the inspection object, Providing a surface inspection method that can be removed, or even if there are irregularities or patterns that are not scratches on the surface of the object to be inspected and the stretching direction of the irregularities or pattern is not constant, Providing a surface inspection method that can suppress or remove the influence, and also the influence of the irregularities and patterns on a plurality of inspection objects with different uneven directions and pattern extending directions. Providing a surface inspection method capable braking or removed, it is.

前記課題を解決するため、本発明は、検査対象領域に所定の方向に延伸する凹凸や模様が存在する検査対象物の表面検査方法であって、検査対象物の検査対象領域を撮像して画像データを作成する段階と、前記画像データの各画素の輝度値に、互いに直交する二方向に沿って微分処理を施す段階と、前記画像データの画素ごとに、互いに直交する二方向の微分値を成分とするベクトルを算出する段階と、算出した前記ベクトルの所定の基準方向からの角度の分布を算出する段階と、
算出した前記ベクトルの所定の基準方向からの角度の分布に基づいて前記凹凸や模様の延伸方向を特定する段階と、を含むことを要旨とするものである。
In order to solve the above problems, the present invention is a method for inspecting a surface of an inspection object in which unevenness or a pattern extending in a predetermined direction is present in the inspection object area, and images the inspection object area of the inspection object A step of generating data, a step of performing a differentiation process on the luminance value of each pixel of the image data along two directions orthogonal to each other, and a value of the two directions orthogonal to each other of the pixels of the image data. Calculating a vector as a component; calculating a distribution of angles from a predetermined reference direction of the calculated vector;
And a step of specifying the extending direction of the unevenness or pattern based on the distribution of the calculated angle of the vector from a predetermined reference direction.

なお、「所定の方向」とは、既知の特定の方向(=特定の単一の方向または特定の複数の方向)に限定されるものではない。また、単一の方向であってもよく、複数の方向であってもよい。そして、「所定の方向」は、本発明にかかる表面検査方法においては、既知であるか未知であるかは問題とはならない。すなわち、本発明の実施形態にかかる表面検査方法を実施するにあたり、凹凸や模様の延伸方向は既知である必要はなく、未知であってもよい。   The “predetermined direction” is not limited to a known specific direction (= a specific single direction or a specific plurality of directions). Further, it may be a single direction or a plurality of directions. And it does not matter whether the “predetermined direction” is known or unknown in the surface inspection method according to the present invention. That is, in carrying out the surface inspection method according to the embodiment of the present invention, the extending direction of the unevenness and pattern need not be known, and may be unknown.

そして、「所定の方向に延伸する凹凸や模様」は、「形状に方向性を有する凹凸や模様」であると換言できる凹凸や模様である。具体的にはたとえば、線状(直線状であってもよく曲線状であってもよい)の凹凸や模様などが含まれる。また、平面的な広がりを有する凹凸や模様であっても、「長手方向」を有する(=「長手方向」を認識できる)凹凸や模様などが含まれる。たとえば、長方形や楕円のような形状などである。   The “unevenness or pattern extending in a predetermined direction” is an unevenness or pattern that can be rephrased as “unevenness or pattern having directionality in shape”. Specifically, for example, linear (which may be linear or curved) irregularities and patterns are included. In addition, even an unevenness or pattern having a planar spread includes an unevenness or pattern having a “longitudinal direction” (= “longitudinal direction” can be recognized). For example, the shape is a rectangle or an ellipse.

前記算出した前記ベクトルの所定の基準方向からの角度の分布を算出する段階においては、前記所定の基準方向からの角度ごとに前記ベクトルの大きさの合計値を算出し、前記算出した前記ベクトルの方向の分布に基づいて前記凹凸や模様の延伸方向を特定する段階においては、算出した前記合計値のピークが現れる角度と90°の位相差を有する角度を前記凹凸や模様の延伸方向であると特定する構成が適用できる。なお、前記「ピークが現れる角度」や「凹凸や模様の延伸方向」は、ある程度の幅を有する値であってもよい。   In the step of calculating the distribution of angles of the calculated vector from a predetermined reference direction, a total value of the vector sizes is calculated for each angle from the predetermined reference direction, and the calculated vector In the stage of specifying the extending direction of the unevenness or pattern based on the direction distribution, the angle at which the calculated peak of the total value appears and the angle having a phase difference of 90 ° is the extending direction of the unevenness or pattern. A specific configuration can be applied. The “angle at which the peak appears” and “stretching direction of unevenness and pattern” may be values having a certain width.

本発明は、さらに、前記ピーク値が現れる角度とは異なる角度を有するベクトルの画素の輝度値を高くする補正を行う段階と、前記補正された画像データに基づいて検査対象物の検査対象領域のキズを検査する段階とを含むことを要旨とするものである。   The present invention further includes a step of performing correction to increase a luminance value of a pixel of a vector having an angle different from an angle at which the peak value appears, and an inspection target region of the inspection target based on the corrected image data. And a stage for inspecting scratches.

前記補正を行う段階においては、画像データの各画素の輝度値に(式1)で示されるフィルタを適用する構成であることが好ましい。   In the step of performing the correction, it is preferable that the filter represented by (Equation 1) is applied to the luminance value of each pixel of the image data.

Figure 0005605010
Figure 0005605010

前記微分処理には、ソーベルの微分法またはプレヴィットの微分法が適用される。   The Sobel differential method or Previt's differential method is applied to the differential processing.

本発明によれば、検査対象物の表面に、所定の方向に延伸する多数の凹凸や模様が存在する場合には、当該凹凸や模様の延伸方向を特定することができる。たとえば、グラインダの研削痕、各種切削工具による切削痕、各種砥石や砥粒による研磨痕や研削痕、圧延ローラによるローラ痕、押出加工や引抜加工におけるダイの摩擦痕などといった、所定の方向に延伸する加工痕の延伸方向を特定することができる。また、加工痕に限らず、所定の方向に延伸する平面的な模様も検出できる。このため、キズを検査するための画像処理において、所定の方向に延伸する多数の凹凸や模様の影響を除去すること、または影響を小さくすることができる。したがって、所定の方向に延伸する多数の凹凸や模様を、キズとして認識されないようにすることができる。この結果、キズの検査の精度(=キズの検出の精度)の向上を図ることができる。   According to the present invention, when there are many irregularities and patterns extending in a predetermined direction on the surface of the inspection object, the extending direction of the irregularities and patterns can be specified. For example, grinding traces of grinders, cutting traces by various cutting tools, polishing traces or grinding traces by various grindstones or abrasive grains, roller traces by rolling rollers, die friction traces in extrusion or drawing, etc. The extending direction of the processing trace to be performed can be specified. Further, not only the processing trace but also a planar pattern extending in a predetermined direction can be detected. For this reason, in image processing for inspecting scratches, it is possible to remove or reduce the influence of a large number of irregularities and patterns extending in a predetermined direction. Therefore, it is possible to prevent a large number of irregularities and patterns extending in a predetermined direction from being recognized as scratches. As a result, it is possible to improve the accuracy of flaw inspection (= accuracy of flaw detection).

すなわち、従来のように、輝度値にのみ基づいて検出する構成では、「キズ」と「キズと見なさなくてもよい凹凸や模様」とが同程度の輝度を有すると、これらを区別できない。このため、「キズと見なさなくてもよい凹凸や模様」を「キズ」として検出することや、「キズ」が「キズと見なさなくてもよい凹凸」に埋もれて検出できなくなることがある。これに対して本発明の実施形態にかかる表面検査方法によれば、「キズ」と「キズと見なさなくてもよい凹凸や模様」とを区別できる。このため、「キズ」のみを検出することができ、キズの検査の精度の向上を図ることができる。   In other words, in the configuration in which detection is performed based only on the luminance value as in the prior art, if “scratches” and “unevenness or pattern that does not have to be regarded as scratches” have similar brightness, they cannot be distinguished. For this reason, “unevenness or pattern that does not need to be regarded as a scratch” may be detected as “scratch”, or “scratch” may be buried in “unevenness that may not be regarded as a scratch” and cannot be detected. On the other hand, according to the surface inspection method according to the embodiment of the present invention, it is possible to distinguish between “scratches” and “unevenness or pattern that does not have to be regarded as scratches”. Therefore, only “scratches” can be detected, and the accuracy of the inspection of the scratches can be improved.

また、本発明においては、「キズと見なさなくてもよい凹凸や模様」の延伸方向が未知または不明であってもよい。また、検査対象物の表面を撮像する段階においては、「キズと見なさなくてもよい凹凸や模様」の延伸方向は問題とならない。すなわち、撮像手段や照明と、「キズと見なさなくてもよい凹凸や模様」とを特定の方向に調整する必要がない。このため、検査内容が複雑になることや、検査における手間が増加することはない。また、簡単な構成の装置で実施することができる。   In the present invention, the extending direction of “unevenness or pattern that may not be regarded as a scratch” may be unknown or unknown. Further, in the stage of imaging the surface of the inspection object, the extending direction of “unevenness or pattern that does not have to be regarded as a scratch” does not matter. That is, there is no need to adjust the imaging means and illumination and “unevenness or pattern that does not have to be regarded as a scratch” in a specific direction. For this reason, the contents of the inspection are not complicated, and the labor for the inspection does not increase. Moreover, it can implement with the apparatus of a simple structure.

また、特許文献1に記載の構成においては、複数の検査対象物について検査を行う場合には、検査対象物の向き(=「キズと見なさなくてもよい凹凸や模様」の延伸方向)を揃える必要がある。これに対して、本発明においては、複数の検査対象物について検査を行う場合であっても、検査対象物の向きを揃える必要がない。このため、検査における作業内容が複雑になることや、手間が増加することがない。   Further, in the configuration described in Patent Document 1, when inspecting a plurality of inspection objects, the directions of the inspection objects (= extending direction of “unevenness or pattern that does not have to be regarded as a scratch”) are aligned. There is a need. On the other hand, in the present invention, even when a plurality of inspection objects are inspected, it is not necessary to align the directions of the inspection objects. For this reason, the work contents in the inspection are not complicated and labor is not increased.

また、特許文献1の構成では、「キズと見なさなくてもよい凹凸や模様」の延伸方向が一定ではない場合には、検査を行うことができないか、または、光源を「キズと見なさなくてもよい凹凸や模様」の延伸方向に追従させる機構が必要となる。これに対して本発明では、「キズと見なさなくてもよい凹凸や模様」の延伸方向が一定ではない場合には、一定と見なすことができる程度のサイズに画像を分割することで、検出が可能となる。さらに、光源や撮像手段を、「キズと見なさなくてもよい凹凸」の延伸方向に応じて変更する必要がない。このため、簡単な構成で検査を行うことができる。したがって、装置のコストの上昇の抑制または防止を図ることができる。   Further, in the configuration of Patent Document 1, if the extending direction of “unevenness or pattern that does not have to be regarded as a scratch” is not constant, the inspection cannot be performed, or the light source must be regarded as “a scratch. A mechanism is required to follow the extending direction of “good irregularities and patterns”. On the other hand, in the present invention, when the extending direction of “irregularities and patterns that do not have to be regarded as scratches” is not constant, detection is performed by dividing the image into sizes that can be regarded as constant. It becomes possible. Furthermore, it is not necessary to change the light source and the imaging means according to the extending direction of “unevenness that does not have to be regarded as a scratch”. Therefore, the inspection can be performed with a simple configuration. Therefore, it is possible to suppress or prevent an increase in the cost of the device.

本発明の実施形態にかかる表面検査方法において用いられる装置の構成の概略を、模式的に示した図である。It is the figure which showed typically the outline of the structure of the apparatus used in the surface inspection method concerning embodiment of this invention. 画像データの微分処理を、模式的に示した図である。It is the figure which showed the differential process of image data typically. 算出されたベクトルの角度の分布傾向を示すグラフである。It is a graph which shows the distribution tendency of the angle of the calculated vector. 画像データの二値化の結果を模式的に示した図であり、(a)は本発明の実施形態にかかる表面検査方法が適用された図、(b)は従来の方法が適用された図である。It is the figure which showed typically the result of the binarization of image data, (a) is the figure to which the surface inspection method concerning embodiment of this invention was applied, (b) is the figure to which the conventional method was applied. It is.

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

本発明の実施形態にかかる表面検査方法は、検査対象物の検査対象領域(=検査対象物の表面の全体または所定の一部)を撮像して画像データを作成し、作成した画像データに所定の画像処理を施すことにより、検査対象物の検査対象領域に存在するキズを検査することができる(=キズを検出することができる)。画像処理においては、検査対象物の検査対象領域に存在する「キズと見なさなくても良い凹凸や模様」を検出し、画像データから、「キズと見なさなくてもよい凹凸や模様」の影響を除去する。このため、検査対象物の検査対象領域に存在するキズを検査(=キズを検出)する際に、「キズと見なさなくてもよい凹凸や模様」の影響を受けないようにできる。したがって、検査対象物の検査対象領域に存在するキズの検査の精度(=キズの検出の精度)を高めることができる。なお、本発明の実施形態にかかる表面検査方法において、「キズ」とは、「異常な凹凸や模様」をいうものとする。   The surface inspection method according to the embodiment of the present invention creates an image data by imaging an inspection target region (= the entire surface of the inspection target or a predetermined part) of the inspection target, and sets the predetermined image data to the predetermined image data. By performing the image processing, it is possible to inspect a flaw existing in the inspection target area of the inspection target (= detect a flaw). In image processing, “indentations and patterns that do not have to be regarded as scratches” that exist in the inspection target area of the inspection object are detected, and the effects of “unevenness and patterns that do not have to be regarded as scratches” are detected from the image data. Remove. For this reason, when inspecting scratches (= detecting scratches) existing in the inspection target region of the inspection target object, it is possible to avoid the influence of “unevenness or pattern that may not be regarded as scratches”. Therefore, it is possible to increase the accuracy of inspection of scratches existing in the inspection target region of the inspection target (= accuracy of detection of scratches). In the surface inspection method according to the embodiment of the present invention, “scratches” refer to “abnormal irregularities and patterns”.

本発明の実施形態にかかる表面検査方法の検査対象物は、グラインダなどにより研削処理が施された材料や製品(たとえば、鉄材、鋼材、アルミ材などといった各種金属材料)とする。このため、検査対象物の検査対象領域には、多数の研削痕が存在する。研削痕は、所定の方向に延伸する線状の凹部である。本発明の実施形態にかかる表面検査方向においては、研削痕を「キズと見なさなくてもよい凹凸や模様や模様」として扱う。そして、キズの検査において、研削痕をキズとして検出しないようにし、研削痕以外の凹凸や模様を、キズとして検査する(キズとして検出する)。たとえば、研削痕の延伸方向とは異なる方向に延伸する線状の凹凸や模様や、斑点状の凹凸や模様を、キズとして検査する。   The inspection object of the surface inspection method according to the embodiment of the present invention is a material or product (for example, various metal materials such as iron material, steel material, aluminum material, etc.) that has been subjected to grinding processing by a grinder or the like. For this reason, many grinding marks exist in the inspection object area of the inspection object. The grinding mark is a linear recess extending in a predetermined direction. In the surface inspection direction according to the embodiment of the present invention, the grinding trace is handled as “unevenness, pattern or pattern that does not have to be regarded as a scratch”. Then, in the scratch inspection, the grinding trace is not detected as a scratch, and irregularities and patterns other than the grinding trace are inspected as a scratch (detected as a scratch). For example, a linear unevenness or pattern extending in a direction different from the extending direction of the grinding mark, or a spotted unevenness or pattern is inspected as a scratch.

なお、本発明の実施形態にかかる表面検査方法においては、研削痕の延伸方向が具体的に明確である必要はない。   In the surface inspection method according to the embodiment of the present invention, the extending direction of the grinding traces does not have to be specifically clear.

図1は、本発明の実施形態にかかる表面検査方法において使用される装置1の構成を、模式的に示した図である。図1に示すように、本発明の実施形態にかかる表面検査方法において使用される装置1は、撮像手段11と、照明12と、記憶手段13と、演算手段14と、出力手段15とを備える。   FIG. 1 is a diagram schematically showing a configuration of an apparatus 1 used in a surface inspection method according to an embodiment of the present invention. As shown in FIG. 1, an apparatus 1 used in a surface inspection method according to an embodiment of the present invention includes an imaging unit 11, an illumination 12, a storage unit 13, a calculation unit 14, and an output unit 15. .

撮像手段11は、検査対象物9の検査対象領域を撮像して、画像データを作成することができる。撮像手段11には、CCDカメラなど、公知の各種ディジタルカメラが適用できる。   The imaging unit 11 can image the inspection target area of the inspection target 9 and create image data. Various known digital cameras such as a CCD camera can be applied to the imaging means 11.

記憶手段13は、撮像手段11が作成した画像データや、後述する演算手段14が作成したデータなど、各種のデータを記憶することができる。演算手段14は、撮像手段11が作成した画像データに対して所定の画像処理を施すことができる。さらに、画像処理結果に基づいて、検査対象物9の検査対象領域のキズを検査することができる。出力手段15は、演算手段14による画像処理やキズの検査の結果を出力することができる(たとえば表示することができる)。記憶手段13と、演算手段14と、出力手段15とは、たとえば、公知の各種パーソナルコンピュータやワークステーションなどにより実現される。   The storage unit 13 can store various data such as image data created by the imaging unit 11 and data created by the calculation unit 14 described later. The computing unit 14 can perform predetermined image processing on the image data created by the imaging unit 11. Furthermore, based on the image processing result, it is possible to inspect the inspection target area for the inspection target 9 for scratches. The output unit 15 can output (for example, display) the results of the image processing and the flaw inspection by the calculation unit 14. The memory | storage means 13, the calculating means 14, and the output means 15 are implement | achieved by various well-known personal computers, workstations, etc., for example.

照明12は、撮像手段11により検査対象物9の検査対象領域を撮像する際に、検査対象物9の検査対象領域に光を照射することができる。照明12は、その種類や構成が限定されるものではなく、公知の各種照明機器が適用できる。ただし、照明12は、検査対象物9の検査対象領域に対して均一な強さの光を照射できるものであることが好ましい。たとえば、同軸落射照明が好適に適用できる。同軸落射照明は、図1に示すように、光源121とハーフミラー122とを備え、光源121が発した光をハーフミラー122に反射させ、その反射光を検査対象物9の検査対象領域に照射することができる。そして、ハーフミラー122での反射光の光軸と、撮像手段11の光軸とが一致するように配設される。なお、本発明の実施形態にかかる表面検査方法において使用される装置1においては、光源12は必須ではない。たとえば、検査対象物9の検査対象領域に均一な光が照射される環境であれば、本発明の実施形態にかかる表面検査方法において使用される装置1が光源12を備えなくてもよい。   The illumination 12 can irradiate the inspection target area of the inspection target 9 with light when the imaging unit 11 images the inspection target area of the inspection target 9. The type and configuration of the illumination 12 are not limited, and various known illumination devices can be applied. However, it is preferable that the illumination 12 is capable of irradiating light with uniform intensity to the inspection target region of the inspection target 9. For example, coaxial epi-illumination can be suitably applied. As shown in FIG. 1, the coaxial epi-illumination includes a light source 121 and a half mirror 122, reflects light emitted from the light source 121 to the half mirror 122, and irradiates the inspection target region of the inspection target 9 with the reflected light. can do. And it arrange | positions so that the optical axis of the reflected light in the half mirror 122 and the optical axis of the imaging means 11 may correspond. In the apparatus 1 used in the surface inspection method according to the embodiment of the present invention, the light source 12 is not essential. For example, in an environment where uniform light is irradiated onto the inspection target region of the inspection target 9, the apparatus 1 used in the surface inspection method according to the embodiment of the present invention may not include the light source 12.

本発明の実施形態にかかる表面検査方法は、(1)検査対象物の検査対象領域を撮像して画像データを作成する段階、(2)画像データに所定の画像処理を施して「キズと見なさなくてもよい凹凸や模様」の延伸方向を特定する段階、(3)画像データを補正して「キズと見なさなくてもよい凹凸や模様」の影響を除去する段階、(4)補正した画像データに基づいてキズを検査する段階、とを含む。   The surface inspection method according to the embodiment of the present invention includes (1) a step of creating an image data by imaging an inspection target area of an inspection target, and (2) performing a predetermined image processing on the image data to be regarded as “a scratch. (3) a step of specifying the stretching direction of “unevenness or pattern that does not need to be”, (3) a step of correcting the image data to remove the influence of “unevenness or pattern that does not need to be regarded as a scratch”, (4) corrected image Inspecting for scratches based on the data.

各段階の詳細は、次のとおりである。   Details of each stage are as follows.

(1)検査対象物の検査対象領域を撮像して画像データを作成する段階
この段階では、まず、照明12により検査対象物9の検査対象領域に光を照射し、撮像手段11により検査対象物9の検査対象領域を撮像する。撮像手段11は、検査対象物の検査対象領域を所定の数の画素に分解し、各画素の輝度(=検査対象物9の検査対象領域からの反射光の強さ)を数字符号に変換した画像データを作成する。そして、記憶手段13は、作成した画像データを記憶する。なお、撮像の際には、研削痕の延伸方向がどの方向を向いていてもよく、検査対象物9の向きを限定する(=調整する)必要はない。また、検査対象物9の検査対象領域の全体を一時に撮像し、検査対象物9の検査対象領域の全体で一つの画像データを作成してもよく、分割して複数回に分けて撮像し、複数の画像データを作成してもよい。
(1) Stage in which image data is created by imaging the inspection target area of the inspection target In this stage, first, light is irradiated to the inspection target area of the inspection target 9 by the illumination 12, and the inspection target is detected by the imaging means 11. 9 areas to be inspected are imaged. The imaging means 11 decomposes the inspection object area of the inspection object into a predetermined number of pixels, and converts the luminance of each pixel (= intensity of reflected light from the inspection object area of the inspection object 9) into a numeric code. Create image data. The storage unit 13 stores the created image data. It should be noted that the direction in which the grinding mark extends may be in any direction during imaging, and there is no need to limit (= adjust) the direction of the inspection object 9. Alternatively, the entire inspection target area of the inspection target 9 may be imaged at a time, and one image data may be created for the entire inspection target area of the inspection target 9, or the divided and captured multiple times. A plurality of image data may be created.

検査対象物9の表面には、凹部である研削痕が存在する。そして、研削痕において、照明12の光が乱反射する。このため、研削痕からの反射光は、それ以外の部分(=凹部ではない部分)からの反射光よりも強くなる。また、検査対象物9の表面にキズが存在すると、キズからの反射光は、研削痕と同様の理由により、それ以外の部分からの反射光よりも強くなる。したがって、画像データに含まれる画素のうち、研削痕やキズが写った画素(=研削痕やキズの位置に対応する画素)は、それ以外の部分が写った画素(=凹凸や模様ではない部分に対応する画素)に比較して、輝度値が高くなる。   On the surface of the inspection object 9, there are grinding marks that are concave portions. And the light of the illumination 12 is irregularly reflected in the grinding mark. For this reason, the reflected light from the grinding mark is stronger than the reflected light from the other part (= the part that is not the recess). Further, if there is a scratch on the surface of the inspection object 9, the reflected light from the scratch becomes stronger than the reflected light from other portions for the same reason as the grinding mark. Therefore, among the pixels included in the image data, the pixels that show grinding marks and scratches (= the pixels corresponding to the positions of the grinding marks and scratches) are the pixels that show other parts (= the parts that are not uneven or patterned) The luminance value is higher than that of the pixel corresponding to (1).

(2)画像データに所定の画像処理を施して「キズと見なさなくてもよい凹凸や模様」の延伸方向を特定する段階
この段階は、さらに、(2−1)画像データの各画素の輝度値に微分処理を施す段階、(2−2)微分処理の結果に基づいてベクトルを算出する段階、(2−3)算出したベクトルに基づいて検査対象物の検査対象領域に存在する「キズと見なさなくてもよい凹凸や模様」の方向を特定する段階、とを含む。
(2) A step of performing predetermined image processing on the image data to specify the extending direction of “unevenness or pattern that may not be regarded as a scratch”. This step further includes (2-1) the luminance of each pixel of the image data (2-2) a step of calculating a vector based on the result of the differential processing, (2-3) a “flaw and a defect existing in the inspection target area of the inspection target based on the calculated vector; Identifying the direction of “unevenness or pattern that may not be considered”.

(2−1)画像データの各画素の輝度値に微分処理を施す段階
この段階では、演算手段14により、記憶手段13に記憶される画像データに、X軸方向とY軸方向の二方向について微分処理を施す(=互いに直交する二方向について微分処理を施す)。すなわち、画像データの画素どうしの間の輝度値の差分を、X軸方向とY軸方向の二方向について算出する。この微分処理には、たとえば、ソーベルの微分法や、プレヴィット(プレウィット)の微分法など、公知の各種ディジタル画像の微分法が適用できる。
(2-1) Stage of performing a differentiation process on the luminance value of each pixel of the image data At this stage, the calculation means 14 adds the image data stored in the storage means 13 to the X-axis direction and the Y-axis direction. A differential process is performed (= differential processes are performed in two directions orthogonal to each other). That is, the difference in luminance value between pixels of the image data is calculated in two directions, the X-axis direction and the Y-axis direction. For this differentiation processing, for example, various known digital image differentiation methods such as Sobel's differentiation method and Previt's (Prewit) differentiation method can be applied.

たとえば、ソーベルの微分法であれば、画像データの各画素の輝度値に対して、(式1−a)と(式1−b)に示すソーベルフィルタ(「ソーベルオペレータ」とも称する)を適用する。(式1−a)に示すフィルタは、X軸方向に微分処理を施すためのソーベルフィルタでの一例ある。(式1−b)に示すフィルタは、Y軸方向に微分処理を施すためのソーベルフィルタの一例である。   For example, in the Sobel differential method, a Sobel filter (also referred to as “Sobel operator”) shown in (Expression 1-a) and (Expression 1-b) is used for the luminance value of each pixel of image data. Apply. The filter shown in (Formula 1-a) is an example of a Sobel filter for performing a differentiation process in the X-axis direction. The filter shown in (Formula 1-b) is an example of a Sobel filter for performing differentiation processing in the Y-axis direction.

Figure 0005605010
Figure 0005605010

また、プレヴィットの微分法であれば、画像データの各画素の輝度値に対して、(式2−a)と(式2−b)に示すプレヴィットフィルタ(「プレヴィットオペレータ」とも称する)を適用する。(式2−a)に示すフィルタは、X軸方向に沿って微分処理を施すためのプレヴィットフィルタの一例である。(式2−b)に示すフィルタは、Y軸方向に沿って微分処理を施すためのプレヴィットフィルタの一例である。   Further, in the case of the Previt's differential method, the Previt filter shown in (Expression 2-a) and (Expression 2-b) (also referred to as “Previt operator”) with respect to the luminance value of each pixel of the image data. Apply. The filter represented by (Expression 2-a) is an example of a Previt filter for performing differentiation processing along the X-axis direction. The filter shown in (Equation 2-b) is an example of a Previt filter for performing differentiation processing along the Y-axis direction.

Figure 0005605010
Figure 0005605010

なお、式(1−a)、式(1−b)、式(2−a)、式(2−b)では、3×3の要素を有するフィルタを示したが、適用するフィルタの要素の数は特に限定されるものではない。また、適用するフィルタは、正方行列上のフィルタであってもよく、行方向と列方向とで要素の数が異なるフィルタであってもよい。さらに、微分方法も、ソーベルの微分法やプレヴィットの微分法に限定されるものではなく、他の各種のディジタル画像の微分法や、ディジタルデータの微分法が適用できる。   In addition, in Formula (1-a), Formula (1-b), Formula (2-a), and Formula (2-b), a filter having a 3 × 3 element is shown. The number is not particularly limited. Further, the applied filter may be a filter on a square matrix, or may be a filter having a different number of elements in the row direction and the column direction. Further, the differentiation method is not limited to Sobel's differentiation method or Previt's differentiation method, and other various digital image differentiation methods and digital data differentiation methods can be applied.

そして、このような微分処理を、すべての画素について行う。この微分処理が行われると、画像データに含まれるすべての画素について、輝度値のX軸方向の微分値と、Y軸方向の微分値とが算出される。   Such differentiation processing is performed for all pixels. When this differentiation process is performed, the differential value in the X-axis direction and the differential value in the Y-axis direction of the luminance value are calculated for all pixels included in the image data.

図2は、画像データの微分処理を、模式的に示した図である。図2中の「対象画像データ」は、微分処理を施す対象となる画像データの例を示す。ここでは、例として、三種類の対象画像データを示す。対象画像データNo.1は、基準方向(本発明の実施形態においては、X軸方向を基準方向とする)に平行に延伸する輝線を含む画像データである。対象画像データNo.2は、基準方向に直角な方向(=Y軸方向)に延伸する輝線を含む画像データである。対象画像データNo.3は、基準方向に対して45°の方向に延伸する輝線と、135°の方向に延伸する輝線とを含む画像データである。なお、「基準方向」とは、研削痕の方向を示すために便宜上設定する方向である。本発明の実施形態においては、X軸方向を基準方向とするが、特に限定されるものではない。また、「輝線」とは、「周囲よりも輝度値が高い画素が線状に集合したもの」とする。「X軸方向微分結果」と「Y軸方向微分結果」は、それぞれ、「対象画像データ」のX軸方向に沿った輝度値の微分処理結果(=微分値)と、Y軸方向に沿った輝度値の微分処理結果を示す。そして、微分値が小さい画素を暗く(=黒く)、微分値が大きい画素を明るく(=白く)して示してある。   FIG. 2 is a diagram schematically showing differentiation processing of image data. “Target image data” in FIG. 2 shows an example of image data to be subjected to differentiation processing. Here, three types of target image data are shown as examples. Target image data No. Reference numeral 1 denotes image data including bright lines extending parallel to the reference direction (in the embodiment of the present invention, the X-axis direction is the reference direction). Target image data No. Reference numeral 2 denotes image data including bright lines extending in a direction perpendicular to the reference direction (= Y-axis direction). Target image data No. Reference numeral 3 denotes image data including a bright line extending in the direction of 45 ° with respect to the reference direction and a bright line extending in the direction of 135 °. The “reference direction” is a direction set for convenience in order to indicate the direction of the grinding mark. In the embodiment of the present invention, the X-axis direction is the reference direction, but is not particularly limited. Further, the “bright line” is assumed to be “a collection of pixels having a higher luminance value than the surroundings in a linear form”. The “X-axis direction differential result” and the “Y-axis direction differential result” are the luminance value differential processing result (= differential value) along the X-axis direction of the “target image data” and the Y-axis direction, respectively. The result of the luminance value differentiation process is shown. The pixels having a small differential value are shown dark (= black), and the pixels having a large differential value are shown bright (= white).

図2に示すように、対象画像データNo.1は、X軸方向に沿って微分処理を施すと、輝線の端点において輝度値が急激に変化する。このため、輝線の端点において、微分値が0ではない所定の値(=輝線とそれ以外の部分の輝度値の差に応じた値)となる。それ以外の位置においては、X軸方向に隣り合う画素どうしの間では輝度値が変化しない。このため、微分値は0となる。一方、Y軸方向に沿って微分処理を施すと、微分方向と輝線の延伸方向とが直交するため、輝線の位置において輝度値が急激に変化する。このため、輝線の位置における微分値は、0ではない所定の値となる。それ以外の位置においては、微分値は0となる。   As shown in FIG. When a differential process is performed along the X-axis direction, the luminance value changes rapidly at the end points of the bright lines. For this reason, at the end point of the bright line, the differential value is a predetermined value that is not 0 (= a value corresponding to the difference in luminance value between the bright line and the other part). At other positions, the luminance value does not change between pixels adjacent in the X-axis direction. For this reason, the differential value is 0. On the other hand, when differential processing is performed along the Y-axis direction, the differential value and the extending direction of the bright line are orthogonal to each other, so that the luminance value changes abruptly at the position of the bright line. For this reason, the differential value at the position of the bright line is a predetermined value that is not zero. At other positions, the differential value is zero.

したがって、対象画像データNo.1に微分処理を施すと、輝線に対応する画素は、端点に対応する画素を除き、X軸方向の微分値は0(ゼロ)となり、Y軸方向の微分値は、0ではない所定の値となる。一方、輝線に対応する画素以外の画素においては、X軸方向の微分値とY軸方向の微分値が、いずれも0となる。   Therefore, the target image data No. When the differential processing is performed on 1, the pixel corresponding to the bright line has a differential value in the X-axis direction of 0 (zero) except for the pixel corresponding to the end point, and the differential value in the Y-axis direction is a predetermined value that is not 0. It becomes. On the other hand, in the pixels other than the pixel corresponding to the bright line, the differential value in the X-axis direction and the differential value in the Y-axis direction are both 0.

対象画像データNo.2にX軸方向に微分処理を施すと、微分方向と輝線の延伸方向とが直交するため、輝線の位置において輝度値が急激に変化する。このため、輝線の位置において、X軸方向の微分値は、0ではない所定の値となる。それ以外の位置においては、X軸方向の微分値は0となる。一方、Y軸方向に微分処理を施すと、輝線の端点において輝度値が急激に変化するため、輝線の端点では、Y軸方向の微分値は0ではない所定の値(=輝線とそれ以外の部分の輝度値の差に応じた値)となる。それ以外の位置においては、Y軸方向に隣り合う画素どうしの間では輝度値が変化しないため、Y軸方向の微分値は0となる。   Target image data No. When differential processing is performed on the X-axis direction 2, the differential direction and the bright line extending direction are orthogonal to each other, so that the luminance value changes abruptly at the position of the bright line. For this reason, at the position of the bright line, the differential value in the X-axis direction is a predetermined value that is not zero. At other positions, the differential value in the X-axis direction is zero. On the other hand, when the differentiation process is performed in the Y-axis direction, the luminance value abruptly changes at the end point of the bright line. Therefore, at the end point of the bright line, the differential value in the Y-axis direction is not a predetermined value (= the bright line and other values). Value corresponding to the difference in luminance value of the portion). At other positions, the luminance value does not change between pixels adjacent in the Y-axis direction, so the differential value in the Y-axis direction is zero.

したがって、対象画像データNo.2に微分処理を施すと、輝線に対応する画素は、端点に対応する画素を除き、X軸方向の微分値は0ではない所定の値となり、Y軸方向の微分値は0となる。一方、輝線に対応する画素以外の画素は、X軸方向の微分値とY軸方向の微分値がいずれも0となる。   Therefore, the target image data No. When the differential processing is applied to 2, the pixel corresponding to the bright line is a non-zero differential value in the X-axis direction and the differential value in the Y-axis direction is 0 except for the pixel corresponding to the end point. On the other hand, for the pixels other than the pixel corresponding to the bright line, the differential value in the X-axis direction and the differential value in the Y-axis direction are both zero.

対象画像データNo.3は、X軸方向に沿って微分処理を施すと、微分方向と輝線の延伸方向とが所定の角度(=45°,135°)をもって交差するため、輝線の位置において輝度値が急激に変化する。このため、輝線に対応する画素のX軸方向の微分値は、0ではない所定の値となる。輝線に対応する画素以外の画素のX軸方向の微分値は0となる。Y軸方向に微分処理を施した場合も同様である。   Target image data No. 3 shows that when a differential process is performed along the X-axis direction, the differential value and the extending direction of the bright line intersect at a predetermined angle (= 45 °, 135 °), so that the luminance value changes abruptly at the position of the bright line. To do. For this reason, the differential value in the X-axis direction of the pixel corresponding to the bright line is a predetermined value that is not zero. The differential value in the X-axis direction of pixels other than the pixel corresponding to the bright line is zero. The same applies when the differential processing is performed in the Y-axis direction.

したがって、対象画像データNo.3に微分処理を施すと、輝線に対応する画素の微分値は、X軸方向とY軸方向のいずれも、0ではない所定の値となる。なお、微分値の具体的な大きさは、輝線と微分方向の交差角度に応じて変化する。たとえば、輝線と微分方向の交差角度が小さくなると、微分値は小さくなり、90°に近付くにしたがって大きくなる。なお、対象画像データNo.3においては、微分方向に対する輝線の角度は、X軸方向とY軸方向とで等しいから、輝線に対応する画素のX軸方向の微分値とY軸方向の微分値は、等しい値となる。   Therefore, the target image data No. When the differential process is applied to 3, the differential value of the pixel corresponding to the bright line becomes a predetermined value that is not 0 in both the X-axis direction and the Y-axis direction. In addition, the specific magnitude | size of a differential value changes according to the intersection angle of a bright line and a differential direction. For example, when the crossing angle between the bright line and the differential direction becomes smaller, the differential value becomes smaller and becomes larger as it approaches 90 °. The target image data No. 3, since the angle of the bright line with respect to the differential direction is the same in the X-axis direction and the Y-axis direction, the differential value in the X-axis direction and the differential value in the Y-axis direction of the pixel corresponding to the bright line are equal.

(2−2)微分処理の結果に基づいてベクトルを算出する段階
この段階では、画像データに含まれる各画素について、X軸方向の微分値とY軸方向の微分値とを成分とするベクトルVを算出する。さらに、算出した各画素のベクトルVの大きさ|V|と、基準方向(ここでは、X軸方向)に対する角度θとを算出する。各画素のベクトルVの大きさ|V|と、基準方向に対する角度θは、

|V|=((X軸方向の微分値)+(Y軸方向の微分値)1/2
θ=tan−1((Y軸方向の微分値)/(X軸方向の微分値))

で算出される。
(2-2) Stage of calculating a vector based on the result of the differentiation process In this stage, for each pixel included in the image data, a vector V having a differential value in the X-axis direction and a differential value in the Y-axis direction as components. Is calculated. Furthermore, the magnitude | V | of the calculated vector V of each pixel and the angle θ with respect to the reference direction (here, the X-axis direction) are calculated. The magnitude | V | of the vector V of each pixel and the angle θ with respect to the reference direction are

| V | = ((differential value in the X-axis direction) 2 + (differential value in the Y-axis direction) 2 ) 1/2
θ = tan −1 ((differential value in the Y-axis direction) / (differential value in the X-axis direction))

Is calculated by

算出された各画素のベクトルVの角度θは、当該画素とその周囲の画素との間の輝度値の変化が最も大きい方向を示す。このため、ベクトルVの角度θに対して直角な方向(=90°の位相差を有する方向)が、各画素とその周囲の画素との間の輝度の変化が最も小さい方向となる。また、ベクトルVの大きさ|V|は、当該画素とその周囲の画素との間の輝度の変化率を示す。このため、微分値が大きい画素は、周囲との輝度値の差が大きい。   The calculated angle θ of the vector V of each pixel indicates the direction in which the change in the luminance value between the pixel and the surrounding pixels is the largest. For this reason, the direction perpendicular to the angle θ of the vector V (= the direction having a phase difference of 90 °) is the direction in which the change in luminance between each pixel and the surrounding pixels is the smallest. Also, the magnitude | V | of the vector V indicates the rate of change in luminance between the pixel and the surrounding pixels. For this reason, a pixel with a large differential value has a large difference in luminance value from the surroundings.

(2−3)算出したベクトルに基づいて検査対象物の検査対象領域に存在する「キズと見なさなくてもよい凹凸や模様」の方向を特定する段階
この段階においては、まず、図3に示すようなグラフを作成する。図3に示すグラフは、算出されたベクトルVが有する角度の分布を、ベクトルVの大きさにより重み付けして示したグラフである。そして、ベクトルVが有する角度の分布の傾向を示す。図3に示すグラフの横軸は、各画素のベクトルVの基準方向に対する角度θである。また、縦軸は、各角度におけるベクトルVの大きさの合計値である。具体的には、画像データに、X軸に対してある所定の角度θを有するベクトルVの画素がN個含まれる場合には、当該ある所定の角度θに、当該N個の画素のベクトルVの大きさ|V|の合計値をプロットする。
(2-3) Step of identifying the direction of “unevenness or pattern that does not need to be regarded as a scratch” existing in the inspection target region of the inspection target based on the calculated vector. Create a graph like this: The graph shown in FIG. 3 is a graph showing the distribution of angles of the calculated vector V weighted by the magnitude of the vector V. And the tendency of the distribution of the angle which the vector V has is shown. The horizontal axis of the graph shown in FIG. 3 is the angle θ with respect to the reference direction of the vector V of each pixel. The vertical axis represents the total value of the vectors V at each angle. More specifically, the image data, when the pixel of the vector V with a predetermined angle theta a with respect to the X axis is included the N is the is at a predetermined angle theta a, of the N pixels The total value of the magnitudes | V | of the vector V is plotted.

対象画像データNo.1においては、輝線に対応する画素のX軸方向の微分値は0(ゼロ)であり、Y軸方向の微分値は0ではない所定の値である。このため、輝線に対応する画素のベクトルVの方向は、X軸に対して90°(=270°)の位相差を有する。一方、輝線に対応する画素以外の画素のX軸方向の微分値とY軸方向の微分値は、いずれも0である。すなわち、輝線に対応する画素以外の画素のベクトルVは、いわゆるゼロベクトルである。したがって、対象画像データNo.1のグラフでは、ベクトルVの大きさの合計値は、90°と、270°の位置において突出し(=ピークが現れ)、それ以外の角度においては0となる。   Target image data No. In 1, the differential value in the X-axis direction of the pixel corresponding to the bright line is 0 (zero), and the differential value in the Y-axis direction is a predetermined value that is not 0. For this reason, the direction of the vector V of the pixel corresponding to the bright line has a phase difference of 90 ° (= 270 °) with respect to the X axis. On the other hand, the differential value in the X-axis direction and the differential value in the Y-axis direction of pixels other than the pixel corresponding to the bright line are both zero. That is, the vector V of pixels other than the pixel corresponding to the bright line is a so-called zero vector. Therefore, the target image data No. In the graph of 1, the total value of the magnitudes of the vectors V protrudes at the positions of 90 ° and 270 ° (= peak appears), and becomes 0 at other angles.

対象画像データNo.2においては、輝線に対応する画素のX軸方向の微分値は0ではない所定の値であり、Y軸方向の微分値は0である。このため、輝線に対応する画素のベクトルVの方向は、X軸に平行な方向となる(X軸との位相差が0°(=180°)となる)。一方、輝線に対応する画素以外の画素は、X軸方向の微分値とY軸方向の微分値がいずれも0となる。このため、輝線に対応する画素以外の画素のベクトルVは、いわゆるゼロベクトルとなる。したがって、対象画像データNo.2のグラフでは、ベクトルVの大きさの合計値は、0°と180°の位置において突出し、それ以外の角度においては0となる。   Target image data No. In 2, the differential value in the X-axis direction of the pixel corresponding to the bright line is a predetermined value that is not 0, and the differential value in the Y-axis direction is 0. For this reason, the direction of the vector V of the pixel corresponding to the bright line is a direction parallel to the X axis (the phase difference from the X axis is 0 ° (= 180 °)). On the other hand, for the pixels other than the pixel corresponding to the bright line, the differential value in the X-axis direction and the differential value in the Y-axis direction are both zero. For this reason, the vector V of pixels other than the pixel corresponding to the bright line is a so-called zero vector. Therefore, the target image data No. In the graph of 2, the total value of the magnitudes of the vectors V protrudes at the positions of 0 ° and 180 °, and becomes 0 at other angles.

対象画像データNo.3においては、基準方向に対して45°の角度を有する輝線に対応する画素の輝度の微分値は、X軸方向とY軸方向ともに、0ではない所定の値となる。そして、この輝線とX軸およびY軸の交差角度はいずれも45°(=225°)であるから、微分値は、X軸方向とY軸方向とで同じ値となる。したがって、この輝線に対応する画素のベクトルVは、X軸方向成分とY軸方向成分が同じ絶対値を有するから、その方向は、基準方向に対して135°(=315°)の位相差を有する。これに対して、この輝線以外の部分に対応する画素のベクトルVは、いわゆるゼロベクトルである。基準方向に対して45°の角度を有する輝線に対応する画素も同様である。   Target image data No. 3, the differential value of the luminance of the pixel corresponding to the bright line having an angle of 45 ° with respect to the reference direction is a predetermined value that is not 0 in both the X-axis direction and the Y-axis direction. Since the intersection angle between the bright line and the X and Y axes is 45 ° (= 225 °), the differential value is the same in the X axis direction and the Y axis direction. Therefore, since the vector V of the pixel corresponding to this bright line has the same absolute value in the X-axis direction component and the Y-axis direction component, the direction has a phase difference of 135 ° (= 315 °) with respect to the reference direction. Have. On the other hand, the pixel vector V corresponding to the portion other than the bright line is a so-called zero vector. The same applies to pixels corresponding to bright lines having an angle of 45 ° with respect to the reference direction.

したがって、対象画像データNo.3のグラフでは、ベクトルVの大きさの合計値は、45°、135°、225°、315°の角度において突出し、それ以外の角度においては0となる。   Therefore, the target image data No. In the graph of 3, the total value of the magnitudes of the vector V protrudes at angles of 45 °, 135 °, 225 °, and 315 °, and becomes 0 at other angles.

このように、基準方向に対する角度が同じであるベクトルVを有する画素が、画像データの中にある程度まとまった数が含まれると、当該角度におけるベクトルVの大きさの合計値は、他の角度における合計値よりも大きい値となる。すなわち、当該角度に、ベクトルVの大きさの合計値のピークが現れる。また、基準方向に対する角度が互いに異なるベクトルVを有する画素が、画像データの中にそれぞれまとまった数ずつ含まれる場合には、それぞれの角度におけるベクトルVの大きさの合計値は、他の角度における合計値よりも大きくなる。すなわち、それぞれの角度において、ベクトルVの大きさのピークが現れる(=図3のグラフ中に、複数のピークが現れる)。   As described above, when the pixel having the vector V having the same angle with respect to the reference direction includes a certain number of pixels in the image data, the total value of the sizes of the vector V at the angle is obtained at other angles. The value is larger than the total value. That is, the peak of the total value of the vector V appears at the angle. Further, when pixels having vectors V having different angles with respect to the reference direction are included in the image data, the total value of the sizes of the vectors V at the respective angles is obtained at other angles. It becomes larger than the total value. That is, at each angle, a peak having the magnitude of the vector V appears (= a plurality of peaks appear in the graph of FIG. 3).

そして、各ベクトルVの角度は、輝線の延伸方向に対して90°の位相差を有する。このため、合計値のピークが現れる角度に対して90°の位相差を有する角度が、輝線の延伸方向となる。このように、輝線が含まれる画像データに対して、前記(2−1)、(2−2)、(2−3)の各段階の処理を施すと、輝線の延伸方向を特定することができる。   The angle of each vector V has a phase difference of 90 ° with respect to the extending direction of the bright line. For this reason, the angle having a phase difference of 90 ° with respect to the angle at which the peak of the total value appears is the bright line drawing direction. As described above, when the image data including the bright line is subjected to the processes of the steps (2-1), (2-2), and (2-3), the extending direction of the bright line can be specified. it can.

研削痕は互いに略平行であり、特定の方向に延伸する。このため、画像データに含まれる画素のうち、研削痕に対応する画素(=研削痕が写った画素)のベクトルVは、基準方向に対する角度がほぼ一定となる。また、研削痕は、照明の光が乱反射するから、その他の部分よりも明るくなる。このため、研削痕に対応する画素は、それ以外の画素よりも輝度が高くなる。したがって、研削痕は、画像データの中に、輝線として含まれる。そして、研削痕は、キズやその他の凹凸や模様に比較して数が多いから、研削痕に対応する画素の数は、他の部分(キズやその他の凹凸や模様)に対応する画素の数よりも多い。   The grinding marks are substantially parallel to each other and extend in a specific direction. For this reason, among the pixels included in the image data, the vector V of the pixel corresponding to the grinding mark (= the pixel in which the grinding mark appears) has a substantially constant angle with respect to the reference direction. Further, the grinding mark is brighter than the other parts because the illumination light is irregularly reflected. For this reason, the brightness | luminance of the pixel corresponding to a grinding mark becomes higher than a pixel other than that. Therefore, the grinding marks are included as bright lines in the image data. And since the number of grinding marks is larger than that of scratches and other irregularities and patterns, the number of pixels corresponding to the grinding marks is the number of pixels corresponding to other parts (scratches and other irregularities and patterns). More than.

このため、検査対象物の検査対象領域を撮像した画像データについて、図3に示すグラフを作成すると、研削痕の延伸方向に対して90°の位相差を有する角度に、合計値のピークが表れる。したがって、合計値のピークが現れる角度に90°の位相差を有する角度が、研削痕の延伸方向であると特定することができる。   For this reason, when the graph shown in FIG. 3 is created for the image data obtained by imaging the inspection target region of the inspection target, a peak of the total value appears at an angle having a phase difference of 90 ° with respect to the extending direction of the grinding mark. . Therefore, an angle having a phase difference of 90 ° at an angle at which the peak of the total value appears can be specified as the extending direction of the grinding mark.

このように、検査対象物の検査対象領域を撮像した画像データに対して、(2−1)、(2−2)、(2−3)の各段階の処理を施すと、研削痕の延伸方向を特定することができる。なお、実際の処理においては、図3に示すグラフを作成できるようなデータの集合があればよく、実際に図3に示すグラフそのものを作成しなくともよい。要は、演算手段14により、算出したベクトルVの大きさの合計値が、どの角度にピークを有するかを判断することができればよい。   As described above, when the image data obtained by imaging the inspection target area of the inspection target is subjected to the processes of the steps (2-1), (2-2), and (2-3), the grinding marks are stretched. The direction can be specified. In actual processing, it is only necessary to have a data set that can create the graph shown in FIG. 3, and it is not necessary to actually create the graph shown in FIG. In short, it suffices if the calculation means 14 can determine at which angle the calculated total value of the vector V has a peak.

(3)画像データを補正して「キズと見なさなくてもよい凹凸や模様」の影響を除去する段階
この段階においては、画像データに所定の画像処理を施して、画像データに含まれる画素の輝度値を補正する。そして、研削痕に対応する画素の影響を除去する(または、研削痕に対応する画素の影響を小さくする)。具体的には、研削痕の延伸方向とは直角な方向に沿った輝度値を強調するフィルタを、画像データに適用する。
(3) A step of correcting the image data to remove the influence of “unevenness or pattern that does not have to be regarded as scratches” In this step, the image data is subjected to predetermined image processing, and pixels included in the image data are corrected. Correct the brightness value. Then, the influence of the pixel corresponding to the grinding mark is removed (or the influence of the pixel corresponding to the grinding mark is reduced). Specifically, a filter that emphasizes the luminance value along the direction perpendicular to the extending direction of the grinding mark is applied to the image data.

Figure 0005605010
Figure 0005605010

このフィルタは、円を三角関数でモデル化したフィルタである。すなわち、3行3列のマトリックスのうち、中心の(要素b−2)を除く8個の要素が、円周上の各位置を示す。具体的には、(要素b−3)がX軸に対して0°の位置を示し、(要素a−3)がX軸に対して45°の位置を示し、(要素a−2)がX軸に対して90°の位置を示し、(要素a−1)がX軸に対して135°の位置を示し、(要素b−1)がX軸に対して180°の位置を示し、(要素c−1)がX軸に対して225°の位置を示し、(要素c−2)がX軸に対して270°の位置を示し、(要素c−3)がX軸に対して315°の位置を示す。   This filter is a filter in which a circle is modeled by a trigonometric function. That is, in the 3 × 3 matrix, 8 elements excluding the center (element b-2) indicate the respective positions on the circumference. Specifically, (element b-3) indicates a position of 0 ° with respect to the X axis, (element a-3) indicates a position of 45 ° with respect to the X axis, and (element a-2) indicates A 90 ° position with respect to the X axis, (element a-1) indicating a position of 135 ° with respect to the X axis, (element b-1) indicating a position of 180 ° with respect to the X axis, (Element c-1) indicates a position of 225 ° with respect to the X axis, (Element c-2) indicates a position of 270 ° with respect to the X axis, and (Element c-3) indicates a position with respect to the X axis. A position of 315 ° is shown.

画像データの各画素の輝度値にこのフィルタを適用すると、このフィルタの各要素の「ξ」に代入した角度(=方向)の輝度が強調される。すなわち、このフィルタの(要素b−2)を、適用対象となる画素(=着目画素)に重ねる。そして、着目画素およびこれに隣接する8個の画素のそれぞれと、これらの画素のそれぞれに重なる要素の値との積の和を、着目画素の輝度値と置き換える(=新たな輝度値とする)。すなわち、   When this filter is applied to the luminance value of each pixel of the image data, the luminance at the angle (= direction) assigned to “ξ” of each element of this filter is enhanced. That is, the (element b-2) of this filter is overlaid on the pixel to be applied (= target pixel). Then, the sum of the product of the pixel of interest and each of the eight pixels adjacent to the pixel of interest and the value of the element overlapping each of these pixels is replaced with the luminance value of the pixel of interest (= new luminance value) . That is,

{(要素a−1)×(着目画素の左上の画素の輝度値)+(要素a−2)×(着目画素の上の画素の輝度値)+(要素a−3)×(着目画素の右上の画素の輝度値)+(要素b−1)×(着目画素の左の画素の輝度値)+(要素b−2)×(着目画素の輝度値)+(要素b−3)×(着目画素の右の画素の輝度値)+(要素c−1)×(着目画素の左下の画素の輝度値)+(要素c−2)×(着目画素の下の画素の輝度値)+(要素c−3)×(着目画素の右下の画素の輝度値)}/9   {(Element a-1) × (Luminance value of upper left pixel of target pixel) + (Element a-2) × (Luminance value of pixel above target pixel) + (Element a-3) × (Target pixel (Brightness value of upper right pixel) + (element b-1) × (brightness value of pixel to the left of the target pixel) + (element b-2) × (brightness value of the target pixel) + (element b-3) × ( The luminance value of the pixel to the right of the pixel of interest) + (element c-1) × (the luminance value of the pixel at the lower left of the pixel of interest) + (element c-2) × (the luminance value of the pixel below the pixel of interest) + ( Element c-3) × (luminance value of lower right pixel of target pixel)} / 9

の計算を行い、その結果を着目画素の新たな輝度値とする。なお、上の計算式の「右」はX軸の正の方向、「左」はX軸の負の方向、「上」はY軸の正の方向、「下」はY軸の負の方向である。   And the result is set as a new luminance value of the pixel of interest. In the above formula, “right” is the positive direction of the X axis, “left” is the negative direction of the X axis, “up” is the positive direction of the Y axis, and “down” is the negative direction of the Y axis. It is.

このような計算を行うと、着目画素の輝度値は、着目画素に隣接する画素の輝度値のうち、要素の「ξ」に代入した角度(=基準方向からの角度)に隣接する画素の輝度が強調された輝度値に置き換わる。着目画素が輝線に対応する画素であった場合、当該画素の輝線の延伸方向に直角な方向に隣接する画素は、輝度値が低い画素である。このため、フィルタの要素の「ξ」に、輝線の延伸方向に直角な角度を代入すると、着目画素の輝度値は、これらの画素の輝度値が強調されて低くなる(=低い値に補正される)。なお、輝線の延伸方向に隣接する画素の輝度値は高いから、フィルタの要素の「ξ」に、輝線の延伸方向に平行な角度を代入すると、着目画素の輝度値は強調されて高い値に置き換えられる。   When such a calculation is performed, the luminance value of the pixel of interest is the luminance of the pixel adjacent to the angle (= angle from the reference direction) assigned to the element “ξ” among the luminance values of the pixels adjacent to the pixel of interest. Is replaced with the emphasized luminance value. When the pixel of interest is a pixel corresponding to the bright line, a pixel adjacent in a direction perpendicular to the extending direction of the bright line of the pixel is a pixel having a low luminance value. For this reason, if an angle perpendicular to the extending direction of the bright line is substituted for “ξ” of the filter element, the luminance value of the pixel of interest is reduced by enhancing the luminance value of these pixels (= corrected to a low value). ) Since the luminance value of the pixel adjacent in the bright line extending direction is high, if the angle parallel to the bright line extending direction is substituted for “ξ” of the filter element, the luminance value of the pixel of interest is emphasized to a high value. Replaced.

したがって、研削痕の延伸方向が基準方向に対して125°の位相差を有している場合には、フィルタの要素の「ξ」に、125°に直角な角度である215°または35°を代入する。そうすると、輝線に対応する画素の輝度値は、低い値に補正される。   Therefore, when the extending direction of the grinding mark has a phase difference of 125 ° with respect to the reference direction, 215 ° or 35 ° which is an angle perpendicular to 125 ° is set to “ξ” of the filter element. substitute. Then, the luminance value of the pixel corresponding to the bright line is corrected to a low value.

なお、この段階では、研削痕に対応する画素の輝度値を低い値に補正する構成であるか、または、研削痕に対応する画素以外の画素の輝度値を高い値に補正する構成であればよい。このため、前記フィルタを適用する構成に限定されない。たとえば、研削痕の延伸方向に平行な方向のベクトルVを有する画素の輝度値を低くする構成や、研削痕の延伸方向とは異なる方向のベクトルVを有する画素の輝度値を高くする構成などが適用できる。また、画像データの各画素の輝度値を、研削痕の延伸方向とベクトルVとの位相差に応じて補正する構成であってもよい。   At this stage, the luminance value of the pixel corresponding to the grinding mark is corrected to a low value, or the luminance value of the pixel other than the pixel corresponding to the grinding mark is corrected to a high value. Good. For this reason, it is not limited to the structure which applies the said filter. For example, a configuration in which the luminance value of a pixel having a vector V in a direction parallel to the extending direction of the grinding trace is reduced, or a configuration in which the luminance value of a pixel having a vector V in a direction different from the extending direction of the grinding trace is increased is used. Applicable. Moreover, the structure which correct | amends the luminance value of each pixel of image data according to the phase difference of the extending | stretching direction of a grinding trace and the vector V may be sufficient.

(4)補正した画像データに基づいてキズを検査する段階
この段階では、まず、演算手段14により、前記段階(3)において補正した画像データの各画素の輝度値を二値化する。すなわち、輝度値が所定の閾値以上の画素(または所定の閾値を越える画素)を「白画素」とし、所定の閾値未満の画素(または所定の閾値以下の画素)を「黒画素」とする。前記段階(3)での補正により、研削痕に対応する画素の輝度値は、キズに対応する画素の輝度値よりも低くなっている。そして、研削痕に対応する画素の輝度値と、キズに対応する画素の輝度値との間に、二値化の閾値を設定する。そうすると、二値化された画像データにおいては、キズに対応する画素が「白画素」となり、それ以外の画素(研削痕に対応する画素を含む)が「黒画素」となる。
(4) Stage of Inspecting Scratches Based on Corrected Image Data In this stage, first, the calculation means 14 binarizes the luminance value of each pixel of the image data corrected in the stage (3). That is, a pixel having a luminance value equal to or higher than a predetermined threshold (or a pixel exceeding the predetermined threshold) is set as a “white pixel”, and a pixel having a luminance value lower than the predetermined threshold (or a pixel equal to or lower than the predetermined threshold) is set as a “black pixel”. By the correction in the step (3), the luminance value of the pixel corresponding to the grinding mark is lower than the luminance value of the pixel corresponding to the scratch. Then, a binarization threshold value is set between the luminance value of the pixel corresponding to the grinding mark and the luminance value of the pixel corresponding to the scratch. Then, in the binarized image data, the pixel corresponding to the scratch is a “white pixel”, and the other pixels (including the pixel corresponding to the grinding mark) are “black pixels”.

なお、二値化の閾値は、前記段階(3)における補正の程度などに応じて適宜設定される。   Note that the binarization threshold is appropriately set according to the degree of correction in the step (3).

そして、二値化した画像データに基づいて、検査対象物の検査対象領域のキズを検査する。キズの検査方法には、従来公知の方法が適用できる。たとえば、二値化した画像データから「白画素の集合」を検出し、一個の「白画素の集合」に含まれる白画素の数が所定の数より多い場合には、当該検出した「白画素の集合」を「キズ」とみなす方法が適用できる。また、検出した「白画素の集合」の寸法(X軸方向寸法やY軸方向寸法)を算出し、所定の寸法を超える場合には、当該検出した「白画素の集合」を「キズ」とみなす方法が適用できる。このように、二値化した画像データに基づくキズの検査方法は、特に限定されるものではない。   Then, based on the binarized image data, the inspection object area is inspected for scratches. A conventionally known method can be applied to the scratch inspection method. For example, when “a set of white pixels” is detected from binarized image data and the number of white pixels included in one “set of white pixels” is greater than a predetermined number, the detected “white pixels” A method of regarding “a set of” as “scratches” can be applied. Also, the size of the detected “collection of white pixels” (X-axis direction dimension or Y-axis direction dimension) is calculated, and if the size exceeds a predetermined dimension, the detected “white pixel set” is defined as “scratch”. Applicable methods are applicable. Thus, the method for inspecting scratches based on the binarized image data is not particularly limited.

図4は、二値化された画像データを模式的に示した図である。そして、(a)は、本発明の実施形態にかかる表面検査方法が適用されたものであり、(b)は、従来の方法(=前記段階(3)の補正を行わない方法)が適用されたものである。従来の方法は、キズに対応する画素と、研削痕に対応する画素とが、同レベルの輝度値を有していると、これらを区別することが困難である。たとえば、キズの検出漏れを防止するために、二値化の閾値を低くすると、研削痕に対応する画素が「白画素」となる。そうすると、研削痕が「キズ」として検出されることになる。一方、研削痕がキズとして検出されないようにするために、二値化の閾値を高くすると、検出すべき「キズ」に対応する画素が「黒画素」となる。そうすると、検出すべきキズが検出できなくなる。このように、従来の方法では、検査対象物の検査対象領域に研削痕が存在すると、キズを精度良く検査することができない。   FIG. 4 is a diagram schematically showing binarized image data. Then, (a) shows a case where the surface inspection method according to the embodiment of the present invention is applied, and (b) shows a case where a conventional method (= method without performing the correction in the step (3)) is applied. It is a thing. In the conventional method, if the pixel corresponding to the scratch and the pixel corresponding to the grinding mark have the same level of luminance value, it is difficult to distinguish them. For example, when the threshold value for binarization is lowered in order to prevent detection of scratches from being detected, the pixel corresponding to the grinding mark becomes a “white pixel”. Then, grinding marks are detected as “scratches”. On the other hand, if the binarization threshold is increased in order to prevent the grinding trace from being detected as a scratch, the pixel corresponding to the “scratch” to be detected becomes the “black pixel”. As a result, scratches to be detected cannot be detected. Thus, in the conventional method, if there is a grinding mark in the inspection target region of the inspection target, it is impossible to accurately inspect the scratch.

これに対して、本発明の実施形態にかかる表面検査方法においては、撮像された直後の画像データにおいては、キズに対応する画素と、研削痕(すなわち、「キズと見なさなくてもよい凹凸や模様」)に対応する画素とが、同程度の輝度値を有していたとしても、その後の画像処理によって、これらの画素の輝度値に差をつけることができる。すなわち、研削痕に対応する画素以外の画素の輝度値を、研削痕に対応する画素の輝度値に影響を与えることなく、高い値に補正することができる。または、研削痕に対応する画素の輝度値を、キズに対応する画素の輝度値に影響を与えることなく、低い値に補正することができる。   On the other hand, in the surface inspection method according to the embodiment of the present invention, in the image data immediately after being imaged, the pixel corresponding to the scratch and the grinding mark (that is, “irregularity that does not have to be regarded as a scratch or Even if the pixels corresponding to the “pattern”) have similar luminance values, the luminance values of these pixels can be differentiated by subsequent image processing. That is, the luminance value of the pixels other than the pixel corresponding to the grinding mark can be corrected to a high value without affecting the luminance value of the pixel corresponding to the grinding mark. Alternatively, the luminance value of the pixel corresponding to the grinding mark can be corrected to a low value without affecting the luminance value of the pixel corresponding to the scratch.

そして、補正した画像データを二値化する際に、研削痕に対応する画素の輝度値と、キズに対応する画素の輝度値との間に、二値化の閾値を設定すると、キズに対応する画素のみを「白画素」にすることができる(=研削痕に対応する画素が「白画素」にならないようにできる)。このため、研削痕に対応する画素をキズとして検出しないようにすることができる。このように、キズに対応する画素と、研削痕に対応する画素(=「キズとみなさなくてもよい凹凸や模様」に対応する画素)とを区別することができる。すなわち、画像データから、研削痕の影響を除去することができる。したがって、キズの検査の精度の向上(キズの検出の精度の向上)を図ることができる。   Then, when binarizing the corrected image data, setting a binarization threshold value between the luminance value of the pixel corresponding to the grinding mark and the luminance value of the pixel corresponding to the scratch corresponds to the scratch. Only the pixels to be processed can be made “white pixels” (= the pixels corresponding to the grinding marks can be made not to be “white pixels”). For this reason, it is possible not to detect pixels corresponding to the grinding marks as scratches. In this way, it is possible to distinguish between a pixel corresponding to a scratch and a pixel corresponding to a grinding mark (= a pixel corresponding to “an unevenness or pattern that does not need to be regarded as a scratch”). That is, the influence of grinding marks can be removed from the image data. Therefore, it is possible to improve the accuracy of inspection of scratches (improving the accuracy of detection of scratches).

なお、前記「ピークが現れる角度」や「研削痕の延伸方向」は、ある程度の幅を有する値であってもよい。すなわち、図3に示すグラフの「山のある一点(たとえば、グラフの山の頂点)」に相当する角度に基づいて研削痕の延伸方向を特定する構成であってもよく、図3に示すグラフの「山の頂点」の前後のある範囲の角度に基づいて研削痕の延伸方向を特定する構成であってもよい。したがって、前記段階(3)において、画像データの各画素の輝度値にフィルタを適用するに際し、フィルタの「ξ」にある一つの角度を代入し、フィルタを一回のみ適用する構成であってもよく、ある範囲の角度を代入し、複数回にわたってフィルタを適用する構成であってもよい。   The “angle at which the peak appears” and “the extending direction of the grinding mark” may be values having a certain width. That is, the configuration may be such that the extending direction of the grinding mark is specified based on an angle corresponding to “one point with a mountain (for example, the peak of the mountain of the graph)” in the graph shown in FIG. The configuration may be such that the extending direction of the grinding mark is specified based on a certain range of angles before and after the “mountain apex”. Therefore, in the step (3), when applying the filter to the luminance value of each pixel of the image data, one angle in the “ξ” of the filter is substituted and the filter is applied only once. It is also possible to employ a configuration in which a certain range of angles is substituted and the filter is applied a plurality of times.

なお、検査対象物の検査対象領域に、延伸方向が互いに異なる(=基準方向に対する角度が互いに異なる)複数種類の研削痕が混在する場合であっても、これらの複数種類の研削痕のすべての影響を除去することができる。すなわち、このような場合には、図3の対象画像データNo.3のグラフに示すように、研削痕の延伸方向に対応する複数の角度のそれぞれに、ベクトルVの大きさの合計値のピークが現れる。そして、ベクトルVの大きさの合計値のピークが現れる角度のそれぞれについて、前記段階(3)を適用する。そうすると、延伸方向が互いに異なる研削痕の影響を、すべて除去することができる。   In addition, even when a plurality of types of grinding traces having different stretching directions (= different angles with respect to the reference direction) are mixed in the inspection target region of the inspection target, all of the plurality of types of grinding traces are mixed. The influence can be removed. That is, in such a case, the target image data No. 1 in FIG. As shown in the graph 3, a peak of the total value of the vector V appears at each of a plurality of angles corresponding to the extending direction of the grinding mark. Then, the step (3) is applied to each angle at which the peak of the total value of the vector V appears. If it does so, all the influences of the grinding trace from which a extending | stretching direction mutually differs can be removed.

たとえば、対象画像データNo.3のように、45°と135°と225°と315°において合計値のピークが現れる場合には、基準方向に対して45°(=225°)の角度を有する研削痕と、135°(=315°)の角度を有する二種類の研削痕が存在すると判断できる。このような場合には、前記段階(3)において、式(3)に示すフィルタのξに0°(または180°)を代入して画像データに適用する。さらに、ξに90°(または270°)を代入して画像データに適用する。すなわち、研削痕の延伸方向が複数存在する場合には、それらの角度のいずれにも該当しない角度の値を、式(3)に示すフィルタに代入して適用する。たとえば、前記のように、互いに異なる方向に延伸する研削痕の角度の中間の角度を代入する。このような構成とすると、研削痕に対応する画素以外の画素の輝度値を高くすることができる。換言すると、研削痕に対応する画素の輝度値を低くすることができる。   For example, the target image data No. 3, when a peak of the total value appears at 45 °, 135 °, 225 °, and 315 °, a grinding mark having an angle of 45 ° (= 225 °) with respect to the reference direction, and 135 ° ( = 315 °), it can be determined that there are two types of grinding marks having an angle. In such a case, in the step (3), 0 ° (or 180 °) is substituted for ξ of the filter shown in the equation (3) and applied to the image data. Further, 90 ° (or 270 °) is substituted for ξ and applied to the image data. That is, when there are a plurality of extending directions of the grinding mark, an angle value that does not correspond to any of these angles is substituted into the filter shown in Expression (3) and applied. For example, as described above, an intermediate angle between grinding traces extending in different directions is substituted. With such a configuration, it is possible to increase the luminance value of pixels other than the pixel corresponding to the grinding mark. In other words, the luminance value of the pixel corresponding to the grinding mark can be lowered.

グラインダによる研削処理の方向が、検査対象物9の検査対象領域の全体にわたって一定である場合には、研削痕の延伸方向も、検査対象物9の検査対象領域の全体にわたって一定となる。このため、この場合には、検査対象物9の検査対象領域の全体を撮像して一個の画像データを作成し、当該一個の画像データの全体を一括して処理することができる。ただし、演算手段14などとしてのパーソナルコンピュータの性能などに応じて、検査対象物9の検査対象領域を複数に分割し、分割した領域ごとに処理を行ってもよい。この場合には、処理の対象となる画像データのサイズを小さくできるから、演算手段14に過負荷が掛かることが防止できる。   When the direction of the grinding process by the grinder is constant over the entire inspection target area of the inspection object 9, the extending direction of the grinding trace is also constant over the entire inspection target area of the inspection object 9. For this reason, in this case, the entire inspection target region of the inspection target 9 can be imaged to create one piece of image data, and the entire piece of the one piece of image data can be processed collectively. However, the inspection target area of the inspection target 9 may be divided into a plurality of parts depending on the performance of the personal computer as the computing means 14 and the like, and processing may be performed for each of the divided areas. In this case, since the size of the image data to be processed can be reduced, it is possible to prevent the calculation means 14 from being overloaded.

これに対して、グラインダによる研削処理の方向が、一定でない場合(=場所によって異なる場合)には、研削痕の延伸方向も、一定でなくなる(=場所によって相違する)。この場合には、次のような方法が適用できる。   On the other hand, when the direction of the grinding process by the grinder is not constant (= different depending on the location), the extending direction of the grinding mark is also not constant (= different depending on the location). In this case, the following method can be applied.

まず、検査対象物の検査対象領域を撮像して作成された画像データを分割し、複数の画像データを作成する。または、検査対象物の検査対象領域を分割し、分割した領域ごとに撮像して、複数の画像データを作成する。そして、複数の画像データのそれぞれに対して、前記各段階の処理を施す。グラインダによる研削処理の方向が一定でないと、研削痕の延伸方向は、全体としては一定でなくなる。しかしながら、このような場合であっても、研削痕の延伸方向は、局所的にはほぼ一定であるとみなせる。したがって、研削処理が施された領域から、研削痕の延伸方向が均一とみなせる程度のサイズの複数の画像データを作成する。そして、作成した画像データごとに処理を施す。これにより、複数の画像データのそれぞれにおいて、研削痕の延伸方向を特定することができる。そして、複数の画像データのそれぞれを用いて、研削痕の影響を除去してキズを検査することができる。このため、キズの検査精度の向上を図ることができる。   First, image data created by imaging an inspection target area of an inspection target is divided to generate a plurality of image data. Alternatively, the inspection target area of the inspection target is divided and images are taken for each of the divided areas to create a plurality of image data. Then, each of the plurality of image data is subjected to the processing of each stage. If the direction of the grinding process by the grinder is not constant, the extending direction of the grinding mark is not constant as a whole. However, even in such a case, it can be considered that the extending direction of the grinding mark is substantially constant locally. Accordingly, a plurality of pieces of image data having a size such that the extending direction of the grinding mark can be regarded as uniform is created from the region subjected to the grinding process. Then, processing is performed for each created image data. Thereby, the extending direction of the grinding mark can be specified in each of the plurality of image data. Then, using each of the plurality of image data, it is possible to remove the influence of the grinding mark and inspect the scratch. For this reason, the inspection precision of a crack can be aimed at.

なお、分割された画像データのサイズや、撮像する範囲は、前記のとおり、研削痕の延伸方向を一定とみなすことができるサイズとなる。したがって、分割された画像データのサイズや、撮像する範囲は、研削痕の形状や寸法(たとえば、曲率半径など)に応じて適宜設定される。   Note that, as described above, the size of the divided image data and the range to be imaged are sizes that allow the extending direction of the grinding marks to be considered constant. Therefore, the size of the divided image data and the range to be imaged are appropriately set according to the shape and dimensions of the grinding mark (for example, the radius of curvature).

なお、研削痕の方向が一定であるか否かが不明な場合や、研削痕の形状などが不明な場合や、研削痕の寸法や形状が一定でない場合(たとえば、曲率半径が場所によって異なる場合)などには、たとえば、次のような方法が適用できる。   In addition, when it is unknown whether the direction of the grinding mark is constant, when the shape of the grinding mark is unknown, or when the size and shape of the grinding mark are not constant (for example, when the radius of curvature varies depending on the location) For example, the following method can be applied.

まず、検査対象物9の検査対象領域の全体を撮像し、一枚の画像データを作成する。そして、作成した画像データについて、前記段階(2)、(3)の処理を施す。前記段階(2)、(3)の処理を施しても研削痕の方向が特定できなかった場合には、最初に作成した画像データを、複数の小さいサイズの画像データに分割する。そして、分割した画像データについて、前記段階(2)、(3)の処理を施す。または、最初に作成した画像データから、一部の範囲を抽出し、抽出した範囲について、前記段階(2)、(3)の処理を施す。   First, the entire inspection target area of the inspection target 9 is imaged to create one piece of image data. Then, the processes of steps (2) and (3) are performed on the created image data. If the direction of the grinding mark cannot be specified even after performing the steps (2) and (3), the image data created first is divided into a plurality of small-size image data. Then, the processes of the steps (2) and (3) are performed on the divided image data. Alternatively, a part of the range is extracted from the first created image data, and the processing in the steps (2) and (3) is performed on the extracted range.

画像データを分割しても研削痕の延伸方向が特定できなかった場合には、画像データをさらに分割して、さらに小さいサイズの画像データを作成する。画像データから一部の範囲を抽出しても研削痕の延伸方向が特定できなかった場合には、抽出する範囲をさらに小さくした画像データを作成する。そして、このようにして作成した画像データに、前記段階(2)、(3)の処理を施す。   If the extending direction of the grinding mark cannot be specified even after dividing the image data, the image data is further divided to create image data of a smaller size. If the extending direction of the grinding mark cannot be specified even if a part of the range is extracted from the image data, image data in which the extracted range is further reduced is created. The image data created in this way is subjected to the processes of steps (2) and (3).

このような作業を、研削痕の延伸方向が特定できるまで繰り返す。このように、前記段階(2)、(3)において、処理の対象となる画像データのサイズ(すなわち、一回の処理でキズの検査を行う範囲)を、徐々に小さくしていく方法が適用できる。このような方法であれば、研削痕の延伸方向が不明である場合や、研削痕の形状が不明である場合であっても、研削痕の延伸方向を特定することができる。   Such an operation is repeated until the extending direction of the grinding mark can be specified. As described above, in the steps (2) and (3), the method of gradually reducing the size of the image data to be processed (that is, the range in which scratches are inspected in one process) is applied. it can. If it is such a method, even if it is a case where the extending direction of a grinding trace is unknown, or the shape of a grinding trace is unknown, the extending direction of a grinding trace can be specified.

なお、「研削痕の延伸方向が特定できない」とは、図3に示すグラフを作成した場合において、特定の角度にベクトルVの大きさの合計値のピークが現れない場合(換言すると、有位差を認められるほどに突出した合計値を有する角度が存在しない場合)などである。たとえば、合計値が、すべての角度においてほぼ等しい値をとるような場合などである。   Note that “the extending direction of the grinding mark cannot be specified” means that when the graph shown in FIG. 3 is created, the peak of the total value of the vector V does not appear at a specific angle (in other words, it is dominant. In the case where there is no angle having a total value protruding so as to allow a difference). For example, this is the case when the total value is substantially equal at all angles.

なお、分割のサイズまたは抽出のサイズは、研削痕の形状(たとえば曲率半径)などによって相違する。このため、段階的にサイズを小さくすることによって、適切なサイズで検査を行うことができる。換言すると、分割された画像データのサイズや、抽出された領域のサイズが、研削痕の延伸方向が略一定であるとみなすことができるサイズとなると、画像データから研削痕の影響を除去できるようになる。   Note that the size of division or the size of extraction differs depending on the shape of the grinding mark (for example, the radius of curvature). For this reason, it can test | inspect by appropriate size by reducing size in steps. In other words, if the size of the divided image data or the size of the extracted region is a size that allows the extending direction of the grinding marks to be considered to be substantially constant, the influence of the grinding marks can be removed from the image data. become.

本発明の実施形態にかかる表面検査方法の作用効果をまとめると、次のとおりである。   The effects of the surface inspection method according to the embodiment of the present invention are summarized as follows.

検査対象物の検査対象領域に、所定の方向に延伸する多数の凹凸や模様が存在する場合において、当該凹凸や模様の延伸方向を特定することができる。たとえば、グラインダの研削痕など、所定の方向に延伸する加工痕の延伸方向を特定することができる。このため、キズを検査するための画像処理において、所定の方向に延伸する多数の凹凸や模様の影響を除去すること、または影響を小さくすることができる。したがって、このような所定の方向に延伸する多数の凹凸や模様を、キズとして認識されないようにすることができる。この結果、キズの検査の精度(=キズの検出の精度)の向上を図ることができる。   When there are a large number of irregularities and patterns extending in a predetermined direction in the inspection target area of the inspection object, the extending direction of the irregularities and patterns can be specified. For example, the extending direction of a processing mark extending in a predetermined direction such as a grinding mark of a grinder can be specified. For this reason, in image processing for inspecting scratches, it is possible to remove or reduce the influence of a large number of irregularities and patterns extending in a predetermined direction. Therefore, it is possible to prevent a large number of irregularities and patterns extending in such a predetermined direction from being recognized as scratches. As a result, it is possible to improve the accuracy of flaw inspection (= accuracy of flaw detection).

すなわち、従来のように、輝度にのみ基づいて検出する構成では、「キズ」と「キズと見なさなくてもよい凹凸や模様」とが同程度の輝度を有する場合には、これらを区別することができない。このため、「キズと見なさなくてもよい凹凸や模様」を「キズ」として検出されることや、「キズ」が「キズと見なさなくてもよい凹凸」に埋もれて検出できなくなることがある。これに対して本発明の実施形態にかかる表面検査方法によれば、「キズ」と「キズと見なさなくてもよい凹凸や模様」とを区別できる。このため、「キズ」を「キズとみなさなくてもよい凹凸や模様」から浮かび上がらせることができる。また、「キズと見なさなくてもよい凹凸や模様」を除去することができる。この結果、「キズ」のみを検出することができる。   In other words, in the conventional configuration in which the detection is based only on the brightness, if “scratches” and “unevenness or pattern that does not have to be regarded as scratches” have the same brightness, they should be distinguished. I can't. For this reason, “unevenness or pattern that does not need to be regarded as a scratch” may be detected as “scratch”, or “scratch” may be buried in “unevenness that may not be regarded as a scratch” and cannot be detected. On the other hand, according to the surface inspection method according to the embodiment of the present invention, it is possible to distinguish between “scratches” and “unevenness or pattern that does not have to be regarded as scratches”. For this reason, “scratches” can emerge from “unevenness or pattern that does not have to be regarded as scratches”. Further, “irregularities and patterns that do not have to be regarded as scratches” can be removed. As a result, only “scratches” can be detected.

また、本発明の実施形態にかかる表面検査方法においては、「キズと見なさなくてもよい凹凸や模様」の延伸方向が不明であってもよい。そして、検査対象物の検査対象領域を撮像して画像データを作成する段階においては、「キズと見なさなくてもよい凹凸や模様」の延伸方向は問題とならない。このため、検査内容が複雑になることや手間が増加することない。また、本発明の実施形態にかかる表面検査方法において使用する装置も、複雑化する必要がない。   Further, in the surface inspection method according to the embodiment of the present invention, the extending direction of “unevenness or pattern that may not be regarded as a scratch” may be unknown. In the stage where the inspection target area of the inspection target is imaged and image data is created, the extending direction of the “unevenness or pattern that does not have to be regarded as a scratch” is not a problem. For this reason, the content of inspection does not become complicated and labor is not increased. Moreover, the apparatus used in the surface inspection method according to the embodiment of the present invention does not need to be complicated.

たとえば、本発明の実施形態にかかる表面検査方法においては、検査の画像処理の段階において「キズと見なさなくてもよい凹凸や模様」の延伸方向が特定される。このため、「キズと見なさなくてもよい凹凸や模様」延伸方向は、それよりも前の段階において明らかである必要はない。また、照明や撮像手段と「キズと見なさなくてもよい凹凸や模様」の方向とが、特定の関係を有している必要はない。また、本発明の実施形態にかかる表面検査方法においては、複数の検査対象物について検査を行う場合であっても、検査対象物の向きを揃える必要がない。このため、検査における作業内容が複雑になることや、作業の手間が増加することがない。   For example, in the surface inspection method according to the embodiment of the present invention, the extending direction of “unevenness or pattern that does not have to be regarded as a scratch” is specified in the image processing stage of the inspection. For this reason, the “unevenness or pattern that does not have to be regarded as scratches” stretching direction need not be apparent in the previous stage. Further, there is no need to have a specific relationship between the illumination or the imaging means and the direction of “unevenness or pattern that may not be regarded as a scratch”. Further, in the surface inspection method according to the embodiment of the present invention, even when a plurality of inspection objects are inspected, it is not necessary to align the directions of the inspection objects. For this reason, the work contents in the inspection are not complicated, and the labor of the work does not increase.

また、本発明の実施形態にかかる表面検査方法では、「キズと見なさなくてもよい凹凸」の延伸方向が一定ではない場合には、一定と見なすことができる程度にまで画像を分割することにより、検出が可能となる。さらに、光源や撮像手段を、「キズと見なさなくてもよい凹凸」の延伸方向に応じて変更させる必要がない。このため、簡単な構成で検査を行うことができる。したがって、装置のコストの上昇の抑制または防止を図ることができる。   Further, in the surface inspection method according to the embodiment of the present invention, when the extending direction of “unevenness that may not be regarded as scratches” is not constant, the image is divided to such an extent that it can be regarded as constant. , Detection becomes possible. Furthermore, it is not necessary to change the light source and the imaging means according to the extending direction of “unevenness that does not have to be regarded as a scratch”. Therefore, the inspection can be performed with a simple configuration. Therefore, it is possible to suppress or prevent an increase in the cost of the device.

以上、本発明の実施形態について、図面を参照して詳細に説明したが、本発明は、前記実施形態に何ら限定されるものではなく、本発明の趣旨を逸脱しない範囲において、種々の改変が可能である。   The embodiments of the present invention have been described in detail with reference to the drawings. However, the present invention is not limited to the embodiments, and various modifications can be made without departing from the spirit of the present invention. Is possible.

たとえば、前記実施形態においては、「キズと見なさなくてもよい凹凸や模様」として、グラインダによる研削痕を示したが、これに限定されるものではない。各種切削工具による切削痕、各種砥石や砥粒による研磨痕や研削痕、圧延ローラによるローラ痕、押出加工や引抜加工におけるダイの摩擦痕などといった、各種の加工痕に対しても適用できる。さらに、加工痕に限らず、製品(=検査対象物)の表面に形成された所定の凹凸や模様などに対しても適用できる。   For example, in the above-described embodiment, grinding marks by a grinder are shown as “unevenness or pattern that does not have to be regarded as scratches”, but the present invention is not limited to this. The present invention can also be applied to various types of processing marks such as cutting marks by various cutting tools, polishing marks and grinding marks by various grinding stones and abrasive grains, roller marks by rolling rollers, and die friction marks in extrusion and drawing processes. Furthermore, the present invention can be applied not only to processing traces but also to predetermined irregularities and patterns formed on the surface of a product (= inspection object).

すなわち、本発明の実施形態にかかる表面検査方法において、「キズと見なさなくてもよい凹凸や模様」は、「形状に方向性を有する凹凸や模様」であればよい。そして、線状(直線状であってもよく曲線状であってもよい)の凹凸や模様などが含まれる。また、平面的な広がりを有する凹凸や模様であっても、「長手方向」を有する(=「長手方向」を認識できる)凹凸や模様などが含まれる。たとえば、長方形や楕円のような形状などである。   That is, in the surface inspection method according to the embodiment of the present invention, the “unevenness or pattern that does not need to be regarded as a scratch” may be “unevenness or pattern having directionality in shape”. In addition, a line-shaped (which may be a straight line shape or a curved line shape) unevenness or pattern is included. In addition, even an unevenness or pattern having a planar spread includes an unevenness or pattern having a “longitudinal direction” (= “longitudinal direction” can be recognized). For example, the shape is a rectangle or an ellipse.

また、前記のように、「キズと見なさなくてもよい凹凸や模様」の「所定の方向」は、既知の特定の方向(=特定の単一の方向または特定の複数の方向)に限定されるものではない。そして、「所定の方向」は、本発明にかかる表面検査方法においては、既知であるか未知であるかは問題とはならない。すなわち、本発明の実施形態にかかる表面検査方法を実施するにあたり、凹凸や模様の延伸方向は既知である必要はなく、未知であってもよい。さらに、単一の方向であってもよく、複数の方向であってもよい。   In addition, as described above, the “predetermined direction” of the “unevenness or pattern that may not be regarded as a scratch” is limited to a known specific direction (= a specific single direction or specific directions). It is not something. And it does not matter whether the “predetermined direction” is known or unknown in the surface inspection method according to the present invention. That is, in carrying out the surface inspection method according to the embodiment of the present invention, the extending direction of the unevenness and pattern need not be known, and may be unknown. Furthermore, it may be a single direction or a plurality of directions.

また、本発明の実施形態にかかる表面検査方法においては、ある一つの「キズと見なさなくてもよい凹凸や模様」が、所定の単一の方向を向いているものでなくてもよい。たとえば、ある一つの「キズと見なさなくてもよい凹凸や模様」が、直線状であってもよく、曲線状であってもよい。要は、検査対象領域の一部を抜き出した場合に、当該抜き出した領域内において、それぞれの「キズと見なさなくてもよい凹凸や模様」が、ある所定の一方向を向くものであればよい(=抜き出した領域内において方向性を有するものであればよい)。そして、当該抜き出した領域内に存在する複数の「キズと見なさなくてもよい凹凸や模様」が、ある所定の一方向を向くものであればよい(=抜き出した領域内において方向性を有するものであればよい)。   Further, in the surface inspection method according to the embodiment of the present invention, one “unevenness or pattern that may not be regarded as a scratch” does not have to be in a predetermined single direction. For example, one “unevenness or pattern that does not have to be regarded as a scratch” may be linear or curved. In short, when a part of the inspection target area is extracted, each “unevenness or pattern that does not have to be regarded as a scratch” in the extracted area may be in a certain predetermined direction. (As long as it has directionality in the extracted region). In addition, a plurality of “unevenness and patterns that do not have to be regarded as scratches” existing in the extracted area may be oriented in a certain predetermined direction (= with directionality in the extracted area) If any).

さらに、前記実施形態においては、所定の閾値よりも高い輝度を有する画素を、「キズ」や「キズと見なさなくてもよい凹部(凹凸や模様)」に対応する画素と見なしたが、この構成に限定されるものではない。たとえば、所定の閾値よりも低い輝度を有する画素を、「キズ」や「キズと見なさなくてもよい凹部(凹凸や模様)」に対応する画素と見なす構成であってもよい。要は、「キズ」や「キズと見なさなくてもよい凹部(凹凸や模様)」に対応する画素が、それ以外の部分の画素に対して輝度が高いか低いかに応じて、適宜設定すればよい。   Furthermore, in the above-described embodiment, a pixel having a luminance higher than the predetermined threshold is regarded as a pixel corresponding to “scratch” or “a concave portion (unevenness or pattern) that may not be regarded as a scratch”. The configuration is not limited. For example, a configuration may be adopted in which a pixel having a luminance lower than a predetermined threshold is regarded as a pixel corresponding to a “scratch” or “a concave portion (unevenness or pattern) that may not be regarded as a scratch”. The point is that the pixels corresponding to “scratches” and “recesses (irregularities and patterns) that do not have to be regarded as scratches” are appropriately set according to whether the luminance is higher or lower than the other pixels. Good.

なお、撮像手段11は、いわゆるエリアスキャンカメラであってもよく、ラインスキャンカメラであってもよい。撮像手段11にエリアスキャンカメラが適用される場合には、検査対象物の検査対象領域の全部または所定の一部であって二次元の広がりを有する領域を、一時に撮像できる。撮像手段11にラインスキャンカメラが適用される場合には、撮像手段と検査対象物とを相対的に移動させながら撮像することにより、二次元の広がりを有する画像データを作成することができる。   The imaging unit 11 may be a so-called area scan camera or a line scan camera. When an area scan camera is applied to the image pickup means 11, it is possible to pick up an image of the entire inspection target area of the inspection object or a predetermined part and having a two-dimensional extent at a time. When a line scan camera is applied to the imaging unit 11, image data having a two-dimensional spread can be created by capturing an image while relatively moving the imaging unit and the inspection target.

さらに、前記実施形態においては、「キズと見なさなくてもよい凹凸や模様」として、研削痕(すなわち凹部)を示したが、平面的な模様であっても適用できる。要は、画像解析において、認識可能なものであれば(たとえば、輝度値や色彩が他の部分と相違するものであれば)適用可能である。   Furthermore, in the said embodiment, although the grinding trace (namely, recessed part) was shown as "an unevenness | corrugation and a pattern which do not need to be regarded as a crack", it is applicable even if it is a planar pattern. In short, any image recognition can be applied as long as it is recognizable (for example, if the brightness value and the color are different from other parts).

1 本発明の実施形態にかかる表面検査方法において使用される装置
11 撮像手段
12 照明
121 光源
122 ハーフミラー
13 記憶手段
14 演算手段
15 出力手段
9 検査対象物
DESCRIPTION OF SYMBOLS 1 Apparatus used in the surface inspection method concerning embodiment of this invention 11 Imaging means 12 Illumination 121 Light source 122 Half mirror 13 Storage means 14 Calculation means 15 Output means 9 Inspection object

Claims (5)

検査対象領域に所定の方向に延伸する凹凸や模様が存在する検査対象物の表面検査方法であって、
前記検査対象物の前記検査対象領域を撮像して画像データを作成する段階と、
前記画像データの各画素の輝度値に、互いに直交する二方向に沿って微分処理を施す段階と、
前記画像データの画素ごとに、互いに直交する二方向の微分値を成分とするベクトルを算出する段階と、
所定の基準方向からの角度ごとに前記ベクトルの大きさの合計値を算出し、算出した前記ベクトルの前記所定の基準方向からの角度の分布を算出する段階と、
算出した前記ベクトルの前記所定の基準方向からの角度の分布に基づいて前記凹凸や模様の延伸方向を特定する段階と、
前記合計値のピーク値が現れる角度とは異なる角度を有するベクトルの画素の輝度値を高くする補正を行って、前記画像データから前記凹凸や模様の影響を除去または低減する段階と、
前記補正された画像データに基づいて前記検査対象物の前記検査対象領域のキズを検査する段階と、
を、含むことを特徴とする表面検査方法。
A method for inspecting the surface of an inspection object having unevenness and patterns extending in a predetermined direction in the inspection object region,
Imaging the inspection target area of the inspection target and creating image data;
Performing a differentiation process on the luminance value of each pixel of the image data along two directions orthogonal to each other;
Calculating a vector whose component is a differential value in two directions orthogonal to each other for each pixel of the image data;
A step of calculating the angle size of the sum of the vector for each of the predetermined reference direction, to calculate the angular distribution from the predetermined reference direction of the calculated said vector,
Identifying the extending direction of the unevenness or pattern based on the distribution of angles from the predetermined reference direction of the calculated vector;
Performing correction to increase the luminance value of a vector pixel having an angle different from the angle at which the peak value of the total value appears, and removing or reducing the influence of the unevenness and pattern from the image data;
Inspecting the inspection object for scratches on the inspection object based on the corrected image data;
A surface inspection method comprising:
記算出した前記ベクトルの方向の分布に基づいて前記凹凸や模様の延伸方向を特定する段階においては、算出した前記合計値のピークが現れる角度と90°の位相差を有する角度を前記凹凸や模様の延伸方向であると特定することを特徴とする請求項1に記載の表面検査方法。 In the step of identifying the extending direction of the convex-concave or pattern based on the direction of the distribution of the vector pre SL calculated, the angle having a phase difference of angle and 90 ° for peak appears the calculated the sum the uneven Ya surface inspection method according to claim 1, wherein the benzalkonium be identified as the extending direction of the pattern. 前記補正を行う段階においては、前記画像データの各画素の輝度値に(式1)で示されるフィルタを適用することを特徴とする請求項1または2に記載の表面検査方法。
Figure 0005605010
The correction in the step of performing is a surface inspection method according to claim 1 or 2, characterized by applying the filter shown in the luminance value of each pixel of the image data (Equation 1).
Figure 0005605010
前記式(1)中の「ξ」には、前記凹凸や模様の延伸方向と直角な角度を代入することを特徴とする請求項3に記載の表面検査方法。The surface inspection method according to claim 3, wherein an angle perpendicular to the extending direction of the unevenness or pattern is substituted for “ξ” in the formula (1). 前記微分処理は、ソーベルの微分法またはプレヴィットの微分法が適用されることを特徴とする請求項1から請求項4のいずれか一項に記載の表面検査方法。 5. The surface inspection method according to claim 1, wherein a Sobel differential method or a Previtt differential method is applied to the differential processing. 6.
JP2010144522A 2010-06-25 2010-06-25 Surface inspection method Active JP5605010B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010144522A JP5605010B2 (en) 2010-06-25 2010-06-25 Surface inspection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010144522A JP5605010B2 (en) 2010-06-25 2010-06-25 Surface inspection method

Publications (2)

Publication Number Publication Date
JP2012008018A JP2012008018A (en) 2012-01-12
JP5605010B2 true JP5605010B2 (en) 2014-10-15

Family

ID=45538729

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010144522A Active JP5605010B2 (en) 2010-06-25 2010-06-25 Surface inspection method

Country Status (1)

Country Link
JP (1) JP5605010B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109030384B (en) * 2018-07-04 2020-12-29 中国航空制造技术研究院 Method for monitoring polishing quality on line
JP2021006853A (en) * 2019-06-28 2021-01-21 京セラドキュメントソリューションズ株式会社 Belt inspection system and belt inspection program
JP2021006854A (en) * 2019-06-28 2021-01-21 京セラドキュメントソリューションズ株式会社 Belt inspection system and belt inspection program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08145907A (en) * 1994-11-15 1996-06-07 Toshiba Eng Co Ltd Inspection equipment of defect
JPH1196372A (en) * 1997-09-16 1999-04-09 Omron Corp Method and device for processing image and recording medium of control program for image processing
JP4981433B2 (en) * 2006-12-18 2012-07-18 三菱重工業株式会社 Inspection device, inspection method, inspection program, and inspection system

Also Published As

Publication number Publication date
JP2012008018A (en) 2012-01-12

Similar Documents

Publication Publication Date Title
WO2017141611A1 (en) Defect detection apparatus, defect detection method, and program
JP4150390B2 (en) Appearance inspection method and appearance inspection apparatus
JP5174540B2 (en) Wood defect detection device
JP4739044B2 (en) Appearance inspection device
WO2017119250A1 (en) Flaw detection device and flaw detection method
WO2020110667A1 (en) Surface defect detecting method, surface defect detecting device, method for manufacturing steel material, steel material quality control method, steel material manufacturing equipment, method for creating surface defect determination model, and surface defect determination model
JP2017120232A (en) Inspection device
KR20180115646A (en) Bead recognition apparatus using vision camera and method thereof
KR20180019734A (en) Surface defect detection apparatus and surface defect detection method
JP5605010B2 (en) Surface inspection method
JP2002148195A (en) Surface inspection apparatus and surface inspection method
JP2007155405A (en) Visual inspection method and visual inspection device
JP5435904B2 (en) How to detect fatal wounds
JP2009109243A (en) Device for inspecting resin sealing material
JP2017166957A (en) Defect detection device, defect detection method and program
WO2021118838A1 (en) Laser based inclusion detection system and methods
CN111833350A (en) Machine vision detection method and system
JP6605772B1 (en) Defect inspection apparatus and defect inspection method
JP7098111B2 (en) Surface inspection equipment and surface inspection method
JP7003669B2 (en) Surface inspection equipment and surface inspection method
WO2012042583A1 (en) Glass bottle inspection device
JP7003502B2 (en) Inspection equipment
JP2006145415A (en) Surface inspection method and device
JP7469740B2 (en) Belt inspection system and belt inspection program
JP6597469B2 (en) Defect inspection equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130426

A977 Report on retrieval

Effective date: 20131210

Free format text: JAPANESE INTERMEDIATE CODE: A971007

A131 Notification of reasons for refusal

Effective date: 20131217

Free format text: JAPANESE INTERMEDIATE CODE: A131

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140212

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

Effective date: 20140729

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Effective date: 20140811

Free format text: JAPANESE INTERMEDIATE CODE: A61

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Country of ref document: JP

Ref document number: 5605010