JP2017187348A - Surface defect inspection system, method and program - Google Patents

Surface defect inspection system, method and program Download PDF

Info

Publication number
JP2017187348A
JP2017187348A JP2016075404A JP2016075404A JP2017187348A JP 2017187348 A JP2017187348 A JP 2017187348A JP 2016075404 A JP2016075404 A JP 2016075404A JP 2016075404 A JP2016075404 A JP 2016075404A JP 2017187348 A JP2017187348 A JP 2017187348A
Authority
JP
Japan
Prior art keywords
image
shape
measurement target
target portion
marking
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.)
Pending
Application number
JP2016075404A
Other languages
Japanese (ja)
Inventor
昇平 橋口
Shohei Hashiguchi
昇平 橋口
山地 宏尚
Hironao Yamaji
宏尚 山地
里香 田中
Rika Tanaka
里香 田中
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.)
Nippon Steel Corp
Original Assignee
Nippon Steel and Sumitomo Metal Corp
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 Nippon Steel and Sumitomo Metal Corp filed Critical Nippon Steel and Sumitomo Metal Corp
Priority to JP2016075404A priority Critical patent/JP2017187348A/en
Publication of JP2017187348A publication Critical patent/JP2017187348A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent wrong detection of an engraved mark as a surface defect when detecting the surface defect of a measurement object part where the engraved mark may be provided, and enable detection of the surface defect without missing it.SOLUTION: Linear light is radiated along a height direction of a pillar part, and reflection light is photographed with a TDI camera to obtain a light cut-off image. An image processing device is configured to: prepare a shape image expressing a surface shape of the pillar part on the basis of the light cut-off image; implement shape correction processing of converting a curved-surface of the pillar part into a plane face with respect to the shape image; implement concavity binarization and convexity binarization with respect to an image subjected to the shape correction processing, and further implement expansion and contraction processing and then labelling processing, thereby detect an engraved mark to be provided in the pillar part, and prepare an engraved mark mask image; and implement mask processing of the image subjected to the shape correction processing, using the engraved mark mask image, and detect a surface defect of the pillar part.SELECTED DRAWING: Figure 9

Description

本発明は、刻印が施されることのある測定対象部の表面欠陥を検出するのに利用して好適な表面欠陥検査システム、方法及びプログラムに関する。   The present invention relates to a surface defect inspection system, method, and program suitable for use in detecting a surface defect of a measurement target portion that may be marked.

近年、光切断方式の光学的形状測定方法が様々な分野で利用されている。鋼板の生産ラインにおいても、鋼板の表面に線状レーザ光を照射し、遅延積分型カメラによって鋼板の表面を撮像して光切断画像を出力することにより、鋼板の表面の凹みや疵等の表面欠陥を検出することが提案されている(特許文献1等を参照)。
ここで、例えばレール、形鋼、鋼管等の長尺材の所定の部位を測定対象部とする場合、その短手方向(幅方向や高さ方向)の端部は平坦でなく湾曲面となっているため、表面欠陥の検出精度が低くなってしまうことがある。
この点に鑑みて、特許文献2には、レールの頭部を測定対象部として、輝度画像に基づいて頭部のエッジ位置を検出することが開示されている。そして、光切断画像に基づいて、測定対象部の表面形状を表す形状画像を作成し、形状画像からフィッティング曲線を求め、そのフィッティング曲線と形状画像との差分演算を行うことにより、測定対象部の曲面形状を平面に焼き直す形状補正処理を行う構成が開示されている。
In recent years, a light-cutting optical shape measuring method has been used in various fields. Even in a steel plate production line, the surface of a steel plate surface, such as dents and wrinkles, is emitted by irradiating the surface of the steel plate with linear laser light, imaging the surface of the steel plate with a delay integration camera, and outputting a light cut image. It has been proposed to detect defects (see Patent Document 1).
Here, for example, when a predetermined portion of a long material such as a rail, a shaped steel, a steel pipe, or the like is a measurement target portion, an end portion in a short direction (width direction or height direction) is not flat but a curved surface. Therefore, the surface defect detection accuracy may be lowered.
In view of this point, Patent Document 2 discloses that the edge position of the head is detected based on a luminance image with the head of the rail as a measurement target unit. Then, based on the light section image, a shape image representing the surface shape of the measurement target portion is created, a fitting curve is obtained from the shape image, and a difference calculation between the fitting curve and the shape image is performed, whereby the measurement target portion A configuration is disclosed in which shape correction processing is performed to re-bake a curved surface shape into a flat surface.

特開2004−3930号公報JP 2004-3930 A 特開2010−91514号公報JP 2010-91514 A

特許文献2の表面欠陥検査手法は、レールの頭部だけでなく、例えばレールの柱部の表面欠陥の検出にも適用することができる。
ここで、レール1において柱部1aにはレール番号等が刻印されることがある。図2に点線で示すように、柱部1aの所定の高さ位置に一定幅の刻印領域(刻印帯)11が設定され、この刻印帯11に刻印が施される。なお、刻印帯11は柱部1aにおいて可視的に現れるものではないが、図2ではわかりやすいように点線で示す。このように刻印が施されることのある柱部1aの表面欠陥を検出する場合、刻印を表面欠陥として過検出してしまうことになる。
The surface defect inspection method of Patent Document 2 can be applied not only to the detection of the surface defect of the rail pillar but also the rail head.
Here, in the rail 1, a rail number or the like may be stamped on the pillar portion 1a. As shown by a dotted line in FIG. 2, a stamped region (a stamped band) 11 having a certain width is set at a predetermined height position of the pillar portion 1 a, and the stamped band 11 is stamped. In addition, although the marking belt | band | zone 11 does not appear visually in the pillar part 1a, it shows with a dotted line for easy understanding in FIG. Thus, when detecting the surface defect of the pillar part 1a which may be marked, the marking is overdetected as a surface defect.

刻印の過検出を抑制する対策として、刻印に相当する大きさや高さ或いは深さの範囲を予め定めておき、その範囲の凹凸は刻印であると判別して、表面欠陥として取り扱わないことが考えられる。しかしながら、刻印に相当する大きさや高さ或いは深さの表面欠陥を見逃すおそれがある。
また、画像上で刻印帯11を定め、刻印帯11で検出される凹凸を無視することも考えられる。しかしながら、刻印帯11に現れる表面欠陥を見逃すおそれがある。また、レールの曲がりや蛇行によって刻印帯11そのものを適切に定められず、定めた刻印帯11の位置が実際の刻印帯に対して大きくずれた場合には、刻印を表面欠陥として検出してしまうおそれがある。
As a measure to suppress over-detection of engraving, it is considered that a range of size, height, or depth corresponding to the engraving is determined in advance, and the unevenness in that range is determined as engraving and is not handled as a surface defect. It is done. However, there is a possibility that a surface defect having a size, height, or depth corresponding to the stamp may be missed.
It is also conceivable that the marking band 11 is defined on the image and the unevenness detected by the marking band 11 is ignored. However, there is a risk of missing a surface defect appearing on the stamped band 11. In addition, when the marking band 11 itself cannot be appropriately determined due to bending or meandering of the rail, and the position of the determined marking band 11 deviates greatly from the actual marking band, the marking is detected as a surface defect. There is a fear.

ここで、一般的な刻印の検出手法として、刻印で影ができるように、刻印を囲むように刻印周辺から収束光を照射し、画像の輝度の明暗から刻印を検出する手法が知られているが、測定対象部の表面が清浄であることが望ましく、レールのようにスケール付着や模様等による輝度変化がある場合には適用できないという課題がある。
また、刻印の段差そのものを測定し、刻印を検出する手法として、焦点距離による画像の鮮明さを用いる焦点法や、段差の距離による干渉縞の間隔から段差を検出する干渉法があるが、これらは実時間測定に向かないという課題がある。
Here, as a general marking detection method, a method is known in which convergent light is irradiated from the periphery of the marking so as to surround the marking so as to make a shadow by the marking, and the marking is detected from the brightness of the image. However, it is desirable that the surface of the measurement target portion is clean, and there is a problem that it cannot be applied when there is a change in luminance due to scale adhesion, a pattern, or the like like a rail.
In addition, as a method of measuring the step of the marking itself and detecting the marking, there are a focus method using the sharpness of the image by the focal length and an interference method of detecting the step from the interval of the interference fringes by the distance of the step. Has a problem that it is not suitable for real-time measurement.

本発明は上記のような点に鑑みてなされたものであり、刻印が施されることのある測定対象部の表面欠陥を検出する場合に、刻印を表面欠陥として過検出しないとともに、表面欠陥を見逃すことなく検出できるようにすることを目的とする。   The present invention has been made in view of the above points, and when detecting a surface defect of a measurement target portion that may be engraved, the surface defect is not overdetected as a surface defect. The purpose is to enable detection without missing.

上記の課題を解決するための本発明の要旨は、以下のとおりである。
[1] 長尺材のうち、短手方向の端部に湾曲面を有する所定の部位を測定対象部として、
周期的に変調された線状レーザ光を前記長尺材の短手方向に沿って前記測定対象部に照射する照射手段と、
前記測定対象部からの反射光を撮像する遅延積分型の撮像手段とを用いて、
前記線状レーザ光の照射位置を前記長尺材の長手方向に連続的にずらしながら、前記撮像手段により前記測定対象部からの反射光を撮像して光切断画像を得て、前記測定対象部の表面欠陥を検出する表面欠陥検査システムであって、
前記撮像手段から出力される光切断画像に基づいて、前記測定対象部の表面形状を表す形状画像を作成する形状画像作成手段と、
前記形状画像作成手段で作成された形状画像に対して、前記測定対象部の曲面形状を平面に変換する形状補正処理を行う形状補正処理手段と、
前記形状補正処理手段で得られた画像に対して、凹部二値化及び凸部二値化のうち少なくともいずれか一方を行い、ラベリング処理を行うことにより、大きさが既知の刻印を検出して、刻印マスク画像を作成する刻印マスク画像作成手段と、
前記刻印マスク画像作成手段で作成された刻印マスク画像を用いて、前記形状補正処理手段で得られた画像をマスク処理して、前記測定対象部の表面欠陥を検出する欠陥検出処理手段とを備えたことを特徴とする表面欠陥検査システム。
[2] 前記形状画像作成手段で作成された形状画像において前記測定対象部の表面形状の湾曲度の変化を評価して、前記測定対象部の境界を検出する境界検出手段を備えたことを特徴とする[1]に記載の表面欠陥検査システム。
[3] 前記境界検出手段は、前記形状画像作成手段で作成された形状画像に対して2階差分処理又はラプラシアン演算処理を行い、ピークとなる位置を前記測定対象部の境界として検出することを特徴とする[2]に記載の表面欠陥検査システム。
[4] 前記刻印マスク画像作成手段は、前記境界検出手段で検出された境界を基準にして定められる所定の領域で前記刻印を検出することを特徴とする[2]又は[3]に記載の表面欠陥検査システム。
[5] 前記刻印マスク画像作成手段は、前記形状補正処理手段で得られた画像に対して、凹部二値化及び凸部二値化を行い、更に膨張及び収縮処理を行った上でラベリング処理を行うことにより、前記刻印を検出することを特徴とする[1]乃至[4]のいずれか一つに記載の表面欠陥検査システム。
[6] 前記長尺材はレールであり、
前記測定対象部は前記レールにおける柱部であって、前記柱部は一端で顎下部に繋がり、他端で脚部に繋がることを特徴とする[1]乃至[5]のいずれか一つに記載の表面欠陥検査システム。
[7] 前記形状画像作成手段は、
前記撮像手段で得られた光切断画像を順に配列することにより得られる縞画像の各位置における位相のずれを算出する位相算出手段と、
前記位相算出手段で得られた位相のずれに基づいて位相のずれが不連続になっている位置を検出し、その検出した位置における位相のずれを繋ぐことにより位相のずれを連続化して、前記測定対象部の表面形状を表す形状画像を作成する位相連続化処理手段とを備えることを特徴とする[1]乃至[6]のいずれか一つに記載の表面欠陥検査システム。
[8] 前記形状補正処理手段は、前記形状画像作成手段で作成された形状画像、或いは前記形状画像作成手段で作成された形状画像に所定の処理を施した形状画像に対してフィッティング曲線を求めるフィッティング処理を施し、そのフィッティング曲線と、前記形状画像作成手段で作成された形状画像との差分演算を行い、当該差分演算で得られたデータを、前記長尺材の長手方向について所定の長さだけ平均して、当該平均した値にローパスフィルタ処理を施した値と、前記差分演算で得られたデータとの差分演算を再度行うことを特徴とする[1]乃至[7]のいずれか一つに記載の表面欠陥検査システム。
[9] 長尺材のうち、短手方向の端部に湾曲面を有する所定の部位を測定対象部として、
周期的に変調された線状レーザ光を前記長尺材の短手方向に沿って前記測定対象部に照射する照射手段と、
前記測定対象部からの反射光を撮像する遅延積分型の撮像手段とを用いて、
前記線状レーザ光の照射位置を前記長尺材の長手方向に連続的にずらしながら、前記撮像手段により前記測定対象部からの反射光を撮像して光切断画像を得て、前記測定対象部の表面欠陥を検出する表面欠陥検査方法であって、
前記撮像手段から出力される光切断画像に基づいて、前記測定対象部の表面形状を表す形状画像を作成する形状画像作成ステップと、
前記形状画像作成ステップで作成された形状画像に対して、前記測定対象部の曲面形状を平面に変換する形状補正処理を行う形状補正処理ステップと、
前記形状補正処理ステップで得られた画像に対して、凹部二値化及び凸部二値化のうち少なくともいずれか一方を行い、ラベリング処理を行うことにより、大きさが既知の刻印を検出して、刻印マスク画像を作成する刻印マスク画像作成ステップと、
前記刻印マスク画像作成ステップで作成された刻印マスク画像を用いて、前記形状補正処理ステップで得られた画像をマスク処理して、前記測定対象部の表面欠陥を検出する欠陥検出処理ステップとを有することを特徴とする表面欠陥検査方法。
[10] 長尺材のうち、短手方向の端部に湾曲面を有する所定の部位を測定対象部として、
周期的に変調された線状レーザ光を前記長尺材の短手方向に沿って前記測定対象部に照射する照射手段と、
前記測定対象部からの反射光を撮像する遅延積分型の撮像手段とを用いて、
前記線状レーザ光の照射位置を前記長尺材の長手方向に連続的にずらしながら、前記撮像手段により前記測定対象部からの反射光を撮像して光切断画像を得て、前記測定対象部の表面欠陥を検出するためのプログラムであって、
前記撮像手段から出力される光切断画像に基づいて、前記測定対象部の表面形状を表す形状画像を作成する形状画像作成手段と、
前記形状画像作成手段で作成された形状画像に対して、前記測定対象部の曲面形状を平面に変換する形状補正処理を行う形状補正処理手段と、
前記形状補正処理手段で得られた画像に対して、凹部二値化及び凸部二値化のうち少なくともいずれか一方を行い、ラベリング処理を行うことにより、大きさが既知の刻印を検出して、刻印マスク画像を作成する刻印マスク画像作成手段と、
前記刻印マスク画像作成手段で作成された刻印マスク画像を用いて、前記形状補正処理手段で得られた画像をマスク処理して、前記測定対象部の表面欠陥を検出する欠陥検出処理手段としてコンピュータを機能させるためのプログラム。
The gist of the present invention for solving the above problems is as follows.
[1] Among long materials, a predetermined part having a curved surface at an end in a short direction is used as a measurement target part.
Irradiation means for irradiating the measurement target portion with periodically modulated linear laser light along the short direction of the long material;
With a delay integration type imaging means for imaging reflected light from the measurement target part,
While continuously shifting the irradiation position of the linear laser light in the longitudinal direction of the long material, the reflected light from the measurement target portion is picked up by the imaging means to obtain a light cut image, and the measurement target portion A surface defect inspection system for detecting surface defects of
A shape image creating means for creating a shape image representing the surface shape of the measurement target part based on the light section image output from the imaging means;
Shape correction processing means for performing shape correction processing for converting the curved surface shape of the measurement target portion into a plane with respect to the shape image created by the shape image creation means;
By performing at least one of concave binarization and convex binarization on the image obtained by the shape correction processing means, and performing a labeling process, a mark having a known size is detected. A marking mask image creating means for creating a marking mask image;
Defect detection processing means for detecting a surface defect of the measurement target portion by masking the image obtained by the shape correction processing means using the marking mask image created by the marking mask image creating means. Surface defect inspection system characterized by that.
[2] The apparatus includes a boundary detection unit that evaluates a change in the degree of curvature of the surface shape of the measurement target portion in the shape image generated by the shape image generation unit and detects a boundary of the measurement target portion. The surface defect inspection system according to [1].
[3] The boundary detection unit performs second-order difference processing or Laplacian calculation processing on the shape image created by the shape image creation unit, and detects a peak position as a boundary of the measurement target unit. The surface defect inspection system according to [2], which is characterized.
[4] The marking mask image creating means detects the marking in a predetermined area defined on the basis of the boundary detected by the boundary detecting means. [2] or [3] Surface defect inspection system.
[5] The marking mask image creating means performs a concave binarization and a convex binarization on the image obtained by the shape correction processing means, and further performs an expansion and contraction process, followed by a labeling process The surface defect inspection system according to any one of [1] to [4], wherein the marking is detected by performing
[6] The long material is a rail,
In any one of [1] to [5], the measurement target part is a pillar part in the rail, and the pillar part is connected to the lower jaw at one end and to the leg part at the other end. The surface defect inspection system described.
[7] The shape image creating means includes:
Phase calculating means for calculating a phase shift at each position of the fringe image obtained by sequentially arranging the light sectioned images obtained by the imaging means;
Detecting the position where the phase shift is discontinuous based on the phase shift obtained by the phase calculation means, and connecting the phase shift at the detected position to make the phase shift continuous, The surface defect inspection system according to any one of [1] to [6], further comprising: a phase continuation processing unit that creates a shape image representing the surface shape of the measurement target portion.
[8] The shape correction processing unit obtains a fitting curve for the shape image created by the shape image creating unit or the shape image obtained by performing predetermined processing on the shape image created by the shape image creating unit. A fitting process is performed, a difference calculation between the fitting curve and the shape image created by the shape image creation means is performed, and the data obtained by the difference calculation has a predetermined length in the longitudinal direction of the long material. Any one of [1] to [7], wherein the difference calculation is performed again with respect to the value obtained by performing low-pass filter processing on the average value and the data obtained by the difference calculation. Surface defect inspection system described in 1.
[9] Of the long material, a predetermined part having a curved surface at the end in the short direction is used as a measurement target part.
Irradiation means for irradiating the measurement target portion with periodically modulated linear laser light along the short direction of the long material;
With a delay integration type imaging means for imaging reflected light from the measurement target part,
While continuously shifting the irradiation position of the linear laser light in the longitudinal direction of the long material, the reflected light from the measurement target portion is picked up by the imaging means to obtain a light cut image, and the measurement target portion A surface defect inspection method for detecting surface defects of
A shape image creating step for creating a shape image representing the surface shape of the measurement target part based on the light section image output from the imaging means;
A shape correction processing step for performing shape correction processing for converting the curved surface shape of the measurement target portion to a plane with respect to the shape image created in the shape image creation step;
By performing at least one of concave binarization and convex binarization on the image obtained in the shape correction processing step, and performing a labeling process, a mark with a known size is detected. A stamp mask image creating step for creating a stamp mask image;
Using a marking mask image created in the marking mask image creating step, masking the image obtained in the shape correction processing step, and detecting a surface defect in the measurement target portion. A method for inspecting a surface defect.
[10] Among long materials, a predetermined part having a curved surface at the end in the short direction is used as a measurement target part.
Irradiation means for irradiating the measurement target portion with periodically modulated linear laser light along the short direction of the long material;
With a delay integration type imaging means for imaging reflected light from the measurement target part,
While continuously shifting the irradiation position of the linear laser light in the longitudinal direction of the long material, the reflected light from the measurement target portion is picked up by the imaging means to obtain a light cut image, and the measurement target portion A program for detecting surface defects of
A shape image creating means for creating a shape image representing the surface shape of the measurement target part based on the light section image output from the imaging means;
Shape correction processing means for performing shape correction processing for converting the curved surface shape of the measurement target portion into a plane with respect to the shape image created by the shape image creation means;
By performing at least one of concave binarization and convex binarization on the image obtained by the shape correction processing means, and performing a labeling process, a mark having a known size is detected. A marking mask image creating means for creating a marking mask image;
Using a marking mask image created by the marking mask image creating means, masking the image obtained by the shape correction processing means, and a computer as a defect detection processing means for detecting a surface defect of the measurement target portion A program to make it work.

本発明によれば、刻印が施されることのある測定対象部の表面欠陥を検出する場合に、刻印を検出して刻印マスク画像を作成するようにしたので、刻印を表面欠陥として過検出しないとともに、表面欠陥を見逃すことなく検出することができる。   According to the present invention, when detecting a surface defect of a measurement target portion that may be engraved, a marking mask image is created by detecting the imprint, so that the imprint is not overdetected as a surface defect. At the same time, it can be detected without missing a surface defect.

実施形態に係る表面欠陥検査システムの概略構成図である。It is a schematic block diagram of the surface defect inspection system which concerns on embodiment. 遅延積分型カメラと長尺材との位置関係を説明するための図である。It is a figure for demonstrating the positional relationship of a delay integration type camera and a elongate material. 遅延積分型カメラの構造と動作を説明するための図である。It is a figure for demonstrating the structure and operation | movement of a delay integration type camera. 縞画像の一例を示す図である。It is a figure which shows an example of a fringe image. 縞画像における縞のずれを説明するための図である。It is a figure for demonstrating the shift | offset | difference of the stripe in a fringe image. 縞画像の一例を示す図である。It is a figure which shows an example of a fringe image. スライス縞画像データにおける位相のずれと測定対象部の深さとの関係を説明するための図である。It is a figure for demonstrating the relationship between the phase shift in slice fringe image data, and the depth of a measurement object part. 画像処理装置の概略ブロック図である。It is a schematic block diagram of an image processing apparatus. 実施形態に係る画像処理装置の処理動作を説明するためのフローチャートである。6 is a flowchart for explaining a processing operation of the image processing apparatus according to the embodiment. 各段階での画像の一例の写真を示す図である。It is a figure which shows the photograph of an example of the image in each step. 各段階での位相特性の一例を表わす特性図である。It is a characteristic view showing an example of the phase characteristic in each step. センタリング処理の概要を説明するための図である。It is a figure for demonstrating the outline | summary of a centering process. 表面欠陥判別に用いる二値化画像の一例の写真を示す図である。It is a figure which shows the photograph of an example of the binarized image used for surface defect discrimination | determination. レールの横断面形状の一例を示す図である。It is a figure which shows an example of the cross-sectional shape of a rail. 境界検出処理を示すフローチャートである。It is a flowchart which shows a boundary detection process. 境界検出処理における2階差分処理の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the 2nd floor difference process in a boundary detection process. 寸法図断面形状と、2階差分データとの一例を示す特性図である。It is a characteristic view which shows an example of dimension drawing cross-sectional shape and 2nd floor difference data. 断面プロフィールに対して移動平均処理及び2階差分処理を行った結果の一例を示す特性図である。It is a characteristic view which shows an example of the result of having performed the moving average process and the 2nd floor difference process with respect to the cross-sectional profile. 刻印検出・マスク処理を示すフローチャートである。It is a flowchart which shows a marking detection and mask process. 刻印検出・マスク処理の各段階での画像の一例の写真を示す図である。It is a figure which shows the photograph of an example of the image in each step of engraving detection and a mask process. 深さ画像の一例の写真を示す図である。It is a figure which shows the photograph of an example of a depth image.

以下、添付図面を参照して、本発明の好適な実施形態について説明する。
図1は、実施形態に係る表面欠陥検査システムの概略構成図である。表面欠陥検査システムは、レーザ装置10と、ロッドレンズ20と、遅延積分型カメラ(TDIカメラ)30と、タイミング信号発生部40と、画像処理装置50と、表示装置60とを備える。
Preferred embodiments of the present invention will be described below with reference to the accompanying drawings.
FIG. 1 is a schematic configuration diagram of a surface defect inspection system according to an embodiment. The surface defect inspection system includes a laser device 10, a rod lens 20, a delay integration camera (TDI camera) 30, a timing signal generator 40, an image processing device 50, and a display device 60.

表面欠陥検査システムは、長尺材のうち、短手方向の端部に湾曲面を有する所定の部位を測定対象部として、測定対象部の表面形状を光学的に測定する。本実施形態では、図2に示すように、長尺材であるレール1の柱部1aを測定対象部とする。レール1は長手方向(図2中の矢印X)に一定の速さで搬送され、表面欠陥検査システムは、搬送中のレール1の柱部1aの表面形状を測定し、凹凸や疵等の表面欠陥を検出する。   The surface defect inspection system optically measures the surface shape of the measurement target part using a predetermined part having a curved surface at the end in the short direction of the long material as the measurement target part. In this embodiment, as shown in FIG. 2, the column part 1a of the rail 1 which is a long material is used as a measurement target part. The rail 1 is transported at a constant speed in the longitudinal direction (arrow X in FIG. 2), and the surface defect inspection system measures the surface shape of the pillar portion 1a of the rail 1 being transported, and the surface such as unevenness and wrinkles Detect defects.

レーザ装置10は、連続発振のレーザ光を発生する。ロッドレンズ20は、レーザ装置10から発せられたレーザ光を、レール1の短手方向、具体的には柱部1aの高さ方向に沿って扇状に広げる。これにより、レーザ装置10が発したレーザ光は、線状レーザ光として柱部1aの高さ方向に沿って照射される、すなわちレール1を横切るように照射される。このとき、線状レーザ光が柱部1aの表面に対して斜めに入射するようにレーザ装置10が設置される。このようして線状レーザ光が照射された柱部1aの表面には、その高さ方向に沿って線状の明るい部位が形成される。また、レール1は長手方向に移動しているので、線状の明るい部位もレール1の長手方向に沿って移動する。この線状の明るい部分からの反射光(線状反射像)は、TDIカメラ30により撮像される。   The laser device 10 generates a continuous wave laser beam. The rod lens 20 spreads the laser light emitted from the laser device 10 in a fan shape along the short side direction of the rail 1, specifically, the height direction of the pillar portion 1a. Thereby, the laser beam emitted from the laser device 10 is irradiated as a linear laser beam along the height direction of the column portion 1 a, that is, irradiated so as to cross the rail 1. At this time, the laser device 10 is installed so that the linear laser light is incident obliquely on the surface of the column portion 1a. Thus, on the surface of the column part 1a irradiated with the linear laser beam, a linear bright part is formed along the height direction. Further, since the rail 1 moves in the longitudinal direction, the linear bright part also moves along the longitudinal direction of the rail 1. The reflected light (linear reflected image) from this linear bright part is picked up by the TDI camera 30.

タイミング信号発生部40は、所定の周波数ωをもつ正弦波形の信号を発生し、その正弦波形の信号をレーザ装置10に送出する。レーザ装置10は、外部信号によりその発振強度を連続的に変化させられ、タイミング信号発生部40から送出される正弦波形の信号を受けると、正弦波形で出力が変化するレーザ光を発生する。すなわち、レーザ装置10が発するレーザ光を周期的に変調させている。また、タイミング信号発生部40は、上記周波数ωのM倍の周波数をもつカメラシフトパルス信号を発生し、そのカメラシフトパルス信号をTDIカメラ30に送出する。   The timing signal generator 40 generates a sine waveform signal having a predetermined frequency ω, and sends the sine waveform signal to the laser device 10. When the laser device 10 has its oscillation intensity continuously changed by an external signal and receives a sine waveform signal sent from the timing signal generator 40, the laser device 10 generates laser light whose output changes in a sine waveform. That is, the laser beam emitted from the laser device 10 is periodically modulated. The timing signal generator 40 generates a camera shift pulse signal having a frequency M times the frequency ω, and sends the camera shift pulse signal to the TDI camera 30.

TDIカメラ30は、図2に示すように、レール1の側方であって、柱部1aに正対するように配置され、柱部1aを含む領域の線状反射像を撮像する。図3は、TDIカメラの構造と動作を説明するための図である。TDIカメラでは、図3(a)に示すように、多数の光電変換素子35がマトリクス状に配置されている。ここでは、例えばこれらの光電変換素子35を、行方向にn個、列方向にN個配置したものとする。そして、各行については、最上行を第1行として、上から順に番号付けをし、各列については、最左列を第1列として、左から順に番号付けをしている。ここで、光電変換素子35の行方向が、長尺材の短手方向(レール1の柱部1aの高さ方向)に対応する。   As shown in FIG. 2, the TDI camera 30 is arranged on the side of the rail 1 so as to face the pillar portion 1 a and captures a linear reflection image of a region including the pillar portion 1 a. FIG. 3 is a diagram for explaining the structure and operation of the TDI camera. In the TDI camera, as shown in FIG. 3A, a large number of photoelectric conversion elements 35 are arranged in a matrix. Here, for example, it is assumed that n photoelectric conversion elements 35 are arranged in the row direction and N in the column direction. Each row is numbered sequentially from the top with the top row as the first row, and each column is numbered sequentially from the left with the leftmost column as the first column. Here, the row direction of the photoelectric conversion elements 35 corresponds to the short direction of the long material (the height direction of the column portion 1a of the rail 1).

光電変換素子35は、受光した光の強度に対応する電荷を蓄積する。測定対象部の線状反射像が、レンズ31を介して、1列分の幅で光電変換素子35に入射するものとする。TDIカメラ30では、各光電変換素子35は、その蓄積した電荷を、当該光電変換素子35と同じ行に位置し且つ一つ後の列に位置する光電変換素子に転送する。この転送のタイミングは、すべての光電変換素子35で同一であり、タイミング信号発生部40から送出されるカメラシフトパルス信号によって制御される。すなわち、カメラシフトパルス信号が入力する度に、各光電変換素子35は電荷を転送する。このカメラシフトパルス信号の周波数(カメラシフト周波数)はMωである。そして、第N列(最終列)に位置する光電変換素子35は、カメラシフトパルス信号が入力すると、その蓄積している電荷を読出しレジスタに送る。これにより、線状反射像に対応する光切断画像が出力される。   The photoelectric conversion element 35 accumulates charges corresponding to the intensity of the received light. It is assumed that the linear reflection image of the measurement target portion enters the photoelectric conversion element 35 with a width corresponding to one row through the lens 31. In the TDI camera 30, each photoelectric conversion element 35 transfers the accumulated charge to the photoelectric conversion element located in the same row as the photoelectric conversion element 35 and located in the next column. The timing of this transfer is the same for all the photoelectric conversion elements 35, and is controlled by a camera shift pulse signal sent from the timing signal generator 40. That is, each time a camera shift pulse signal is input, each photoelectric conversion element 35 transfers charges. The frequency of this camera shift pulse signal (camera shift frequency) is Mω. Then, when the camera shift pulse signal is input, the photoelectric conversion element 35 located in the Nth column (final column) sends the accumulated charge to the read register. Thereby, the light section image corresponding to the linear reflection image is output.

なお、一般に、TDIカメラ30では、図3(b)に示すように、電荷が転送される途中で、各光電変換素子35に光が入射すると、その入射した光の強度に対応する電荷が上乗せされる。しかし、上述したように、光電変換素子35に1列分の幅の線状反射像が入射するように構成している。このため、電荷の転送途中で、各光電変換素子35において電荷が上乗せされることはほとんどない。特に、背景光が問題となる場合でも、レンズ前面にレーザ波長のみを透過する光学フィルタを設置することで、これを抑制することができる。   In general, in the TDI camera 30, as shown in FIG. 3B, when light is incident on each photoelectric conversion element 35 while the charge is being transferred, a charge corresponding to the intensity of the incident light is added. Is done. However, as described above, a linear reflection image having a width corresponding to one column is incident on the photoelectric conversion element 35. For this reason, the charge is hardly added in each photoelectric conversion element 35 during the transfer of the charge. In particular, even when background light becomes a problem, this can be suppressed by installing an optical filter that transmits only the laser wavelength in front of the lens.

レール1は長手方向に沿って移動しているので、レーザ装置10からレーザ光を柱部1aに照射し、TDIカメラ30を用いて柱部1aを含む領域の線状反射像を一定時間撮像すると、レール1の長手方向の各位置における光切断画像を順次得ることができる。したがって、こうして得られた各光切断画像を順に配列することにより、レール1全体を表す画像が得られる。   Since the rail 1 is moving along the longitudinal direction, when a laser beam is irradiated from the laser device 10 onto the pillar portion 1a and a linear reflection image of a region including the pillar portion 1a is captured using the TDI camera 30 for a certain period of time. The light cut images at the respective positions in the longitudinal direction of the rail 1 can be obtained sequentially. Therefore, an image representing the entire rail 1 can be obtained by sequentially arranging the respective light cut images thus obtained.

また、線状レーザ光を周期的に変調させており、その線状レーザ光の強度が時間的に変化するので、各行において列方向の各光電変換素子に蓄積される電荷量(受光強度)の分布も周期的に変化する。したがって、TDIカメラ30から出力される各光切断画像を順に配列することにより得られる画像は、その配列方向に沿って、各光切断画像の濃度(強度)が周期的に変化する縞画像となる。図4に縞画像の一例を示す。ここで、濃度変化の一周期分に相当する光切断画像のことを「縞」と称することにする。この縞画像では、縞に平行な方向が長尺材の短手方向に対応し、縞に直交する方向が長尺材の長手方向に対応する。TDIカメラ30のカメラシフト周波数とレーザ光の変調周波数との比をM:1とすると、M個の光切断画像、すなわち配列方向のM画素分が、一本の縞を構成する。   Further, the linear laser light is periodically modulated, and the intensity of the linear laser light changes with time, so that the amount of charge (received light intensity) accumulated in each photoelectric conversion element in the column direction in each row. The distribution also changes periodically. Therefore, an image obtained by sequentially arranging the light section images output from the TDI camera 30 becomes a fringe image in which the density (intensity) of each light section image periodically changes along the array direction. . FIG. 4 shows an example of a stripe image. Here, the light section image corresponding to one period of density change is referred to as “stripe”. In this striped image, the direction parallel to the strip corresponds to the short direction of the long material, and the direction orthogonal to the strip corresponds to the long direction of the long material. When the ratio between the camera shift frequency of the TDI camera 30 and the modulation frequency of the laser beam is M: 1, M light-cut images, that is, M pixels in the arrangement direction form one stripe.

ところで、レーザ光は測定対象部の表面に斜めから入射するので、例えば測定対象部に凹んでいる部分があると、図1においてレーザ光の反射点は右側にずれる。したがって、光電変換素子35上での光切断画像の位置も右側、すなわち図3(a)において列方向にずれることになる。このため、縞画像において、凹んでいる部分で反射したレーザ光に対応する光切断画像は、凹んでいない部分で反射したレーザ光に対応する光切断画像よりも時間的に早く出力されることになる。したがって、TDIカメラ30から出力される画像を順に配列することにより得られる画像において、凹んでいる部分は縞のずれとして明白に認識することができる。   By the way, since the laser light is incident on the surface of the measurement target portion at an angle, for example, if there is a recessed portion in the measurement target portion, the reflection point of the laser light is shifted to the right in FIG. Therefore, the position of the light section image on the photoelectric conversion element 35 is also shifted in the column direction in the right side, that is, in FIG. For this reason, in the fringe image, the light cut image corresponding to the laser light reflected by the recessed portion is output earlier in time than the light cut image corresponding to the laser light reflected by the non-dented portion. Become. Therefore, in the image obtained by arranging the images output from the TDI camera 30 in order, the recessed portion can be clearly recognized as a stripe shift.

この縞のずれについてもう少し詳しく説明する。図5(a)はある縞画像の概略拡大図である。図5(a)では、縞毎に最大濃度を与える位置を実線で結んで示している。例えば、この縞画像では、短手方向の位置Aにおいて最大濃度位置を配列方向に沿って調べると、最大濃度位置は等間隔に位置しており、縞のずれは生じていない。すなわち、測定対象部は、短手方向の位置Aでは配列方向に沿って平坦な形状をしている。この場合、短手方向の位置Aにおいて配列方向に沿っての縞画像の濃度分布(スライス縞画像データ)は、図5(b)に示すように、きれいな正弦波形状をしている。   This fringe shift will be described in more detail. FIG. 5A is a schematic enlarged view of a certain fringe image. In FIG. 5A, the position where the maximum density is given for each stripe is shown by a solid line. For example, in this fringe image, when the maximum density position is examined along the arrangement direction at the position A in the short direction, the maximum density positions are located at equal intervals, and no stripe deviation occurs. That is, the measurement target part has a flat shape along the arrangement direction at the position A in the short direction. In this case, the density distribution (slice fringe image data) of the stripe image along the arrangement direction at the position A in the short direction has a clean sine wave shape as shown in FIG.

一方、図5(a)に示す短手方向の位置Bにおいて最大濃度位置を配列方向に沿って調べると、最大濃度位置の間隔は左から右に向かって徐々に広がっており、縞のずれが生じている。すなわち、測定対象部には、短手向の位置Bで配列方向に沿って凹みが生じている。この場合、短手方向の位置Bにおいて配列方向に沿っての縞画像の濃度分布(スライス縞画像データ)は、図5(c)に示すように、図5(b)に示す正弦波と比べて位相がずれている。このように、測定対象部の凹みによる縞のずれは、スライス縞画像データにおける位相のずれとして現れてくる。実際、この位相のずれと測定対象部の凹み(深さ)とは比例関係にある。深さが深くなるほど、スライス縞画像データにおける位相のずれが大きくなる。表面欠陥検査システムでは、縞画像に基づいて位相のずれに関する情報を算出し、その位相のずれに関する情報に基づいて測定対象部の表面形状を測定することにしている。この位相のずれを計算する方法を用いると、例えばカメラシフト周波数とレーザ光の変調周波数との比を4:1としたとき、縞が明確に一画素以上ずれなくても凹凸をして検出できる感度がある。   On the other hand, when the maximum density position is examined along the arrangement direction at the position B in the short direction shown in FIG. 5A, the interval between the maximum density positions gradually increases from the left to the right, and the deviation of the stripes is increased. Has occurred. That is, the measurement target portion has a dent along the arrangement direction at the short-side position B. In this case, the density distribution (slice fringe image data) of the fringe image along the arrangement direction at the position B in the short direction is compared with the sine wave shown in FIG. 5B as shown in FIG. Is out of phase. As described above, the fringe shift due to the dent of the measurement target portion appears as a phase shift in the slice fringe image data. In fact, this phase shift and the dent (depth) of the measurement target portion are in a proportional relationship. The greater the depth, the greater the phase shift in the slice fringe image data. In the surface defect inspection system, information related to the phase shift is calculated based on the fringe image, and the surface shape of the measurement target portion is measured based on the information related to the phase shift. If this method of calculating the phase shift is used, for example, when the ratio of the camera shift frequency to the modulation frequency of the laser beam is set to 4: 1, the fringes can be detected with unevenness even if the fringes are not clearly shifted by one pixel or more. There is sensitivity.

ここで、図4に示す縞画像は、表面が平坦な測定対象部のものである。それに対して、短手方向の端部に湾曲面を有する長尺材の所定の部位を測定対象部とする場合、図6に示すように、各縞の両端部が湾曲する縞画像となる。なお、図6に示す縞画像はレール1の柱部1aのものではないが、柱部1aの縞画像でも同様に各縞の両端部が湾曲する縞画像となる。   Here, the fringe image shown in FIG. 4 is that of the measurement target portion having a flat surface. On the other hand, when a predetermined part of a long material having a curved surface at the end in the short direction is used as a measurement target part, a fringe image in which both ends of each stripe are curved as shown in FIG. The striped image shown in FIG. 6 is not that of the pillar portion 1a of the rail 1, but the striped image of the pillar portion 1a is similarly a striped image in which both ends of each stripe are curved.

次に、スライス縞画像データにおける位相のずれと測定対象部の深さとの関係について説明する。図7はスライス縞画像データにおける位相のずれと測定対象部の深さとの関係を説明するための図である。
いま、図7に示すように、線状レーザ光が測定対象部の表面に入射する入射角度をθとする。また、測定対象部に凹部があり、線状レーザ光はその凹部に入ったときに測定対象部の表面から深さdのところで反射して、TDIカメラ30に入射したとする。このとき、深さdで反射した線状レーザ光は、測定対象部の平坦な表面で反射した線状レーザ光に比べて、長尺材の長手方向(右方向)に距離hだけ反射点がずれる。ここで、h=d・tanθである。この線状レーザ光の反射点が長手方向に距離hだけずれた結果として、スライス縞画像データにおいて位相のずれが生ずるが、この位相のずれをφとする。
Next, the relationship between the phase shift in the slice fringe image data and the depth of the measurement target portion will be described. FIG. 7 is a diagram for explaining the relationship between the phase shift in the slice fringe image data and the depth of the measurement target portion.
Now, as shown in FIG. 7, the incident angle at which the linear laser light is incident on the surface of the measurement target portion is denoted by θ. Further, it is assumed that the measurement target portion has a recess, and the linear laser light is reflected at a depth d from the surface of the measurement target portion and enters the TDI camera 30 when entering the recess. At this time, the linear laser beam reflected at the depth d has a reflection point by a distance h in the longitudinal direction (right direction) of the long material, compared to the linear laser beam reflected by the flat surface of the measurement target portion. Shift. Here, h = d · tan θ. As a result of the deviation of the reflection point of the linear laser beam by the distance h in the longitudinal direction, a phase shift occurs in the slice fringe image data. This phase shift is denoted by φ.

TDIカメラ30における光電変換素子35の列方向の撮影分解能をs(mm/画素)とすると、線状レーザ光の反射点が長手方向にずれた距離hは、縞画像においてh/s画素に相当する。また、TDIカメラ30のカメラシフト周波数とレーザ光の変調周波数との比がM:1のとき、縞画像において配列方向のM画素分が一本の縞を構成する。すなわち、縞がM画素分だけずれたときに、位相のずれは2πとなる。したがって、線状レーザ光の反射点が長手方向に距離hずれたときのスライス縞画像データにおける位相のずれφは、
M/2π=(h/s)/φ
より、
d={M・s/(2π・tanθ)}φ
となる。これより、スライス縞画像データにおける位相のずれφと測定対象部の深さdとは比例関係にあることが分かる。
Assuming that the imaging resolution in the column direction of the photoelectric conversion element 35 in the TDI camera 30 is s (mm / pixel), the distance h that the reflection point of the linear laser beam is displaced in the longitudinal direction corresponds to the h / s pixel in the striped image. To do. When the ratio between the camera shift frequency of the TDI camera 30 and the modulation frequency of the laser beam is M: 1, M pixels in the arrangement direction form one stripe in the stripe image. That is, when the fringes are shifted by M pixels, the phase shift is 2π. Therefore, the phase shift φ in the slice fringe image data when the reflection point of the linear laser beam is shifted by the distance h in the longitudinal direction is
M / 2π = (h / s) / φ
Than,
d = {M · s / (2π · tan θ)} φ
It becomes. From this, it can be seen that the phase shift φ in the slice fringe image data is proportional to the depth d of the measurement target portion.

厳密には、通常のレンズを用いた場合、撮影分解能sは深さdに応じて変化するため、補正する必要があるが、鋼板の凹みを測定する場合のように、レンズ作動距離に対して深さ変化が微小な場合は、この撮影分解能sの変化を実用上無視することができる。また、テレセントリックレンズを使えば、撮影分解能sを深さdによらず、一定とすることができる。   Strictly speaking, when a normal lens is used, the imaging resolution s changes according to the depth d and needs to be corrected. However, as in the case of measuring a dent in a steel plate, the lens working distance is not affected. When the change in depth is small, this change in imaging resolution s can be ignored in practice. If a telecentric lens is used, the imaging resolution s can be made constant regardless of the depth d.

画像処理装置50は、TDIカメラ30から出力された各光切断画像に基づいてレール1の柱部1aの表面形状を表す画像を作成し、その画像に基づいて欠陥を検出する。図8に、画像処理装置50の概略ブロック図を示す。画像処理装置50は、A/D変換部501と、プレフィルタ部502と、直交正弦波発生部503と、ローパスフィルタ部504a、504bと、位相算出部505と、位相連続化処理部506と、境界検出部507と、センタリング処理部508と、形状補正処理部509と、刻印マスク画像作成部510と、欠陥検出処理部511とを有する。画像処理装置50の各部で処理された結果は、表示装置60の画面上に表示される。   The image processing device 50 creates an image representing the surface shape of the pillar portion 1a of the rail 1 based on each light cut image output from the TDI camera 30, and detects a defect based on the image. FIG. 8 shows a schematic block diagram of the image processing apparatus 50. The image processing apparatus 50 includes an A / D conversion unit 501, a pre-filter unit 502, an orthogonal sine wave generation unit 503, low-pass filter units 504a and 504b, a phase calculation unit 505, a phase continuation processing unit 506, It includes a boundary detection unit 507, a centering processing unit 508, a shape correction processing unit 509, a marking mask image creation unit 510, and a defect detection processing unit 511. The results processed by each part of the image processing device 50 are displayed on the screen of the display device 60.

以下、図9も参照しつつ、画像処理装置50の各部の処理動作について説明する。図9は、画像処理装置50の処理動作を説明するためのフローチャートである。
まずは、TDIカメラ30がレール1の柱部1aを含む領域を撮像して光切断画像を出力する(ステップS1)。A/D変換部501は、TDIカメラ30から出力された各光切断画像をA/D変換し、ディジタル多値画像データとして出力する。このディジタル多値画像データは、図示しない画像メモリに記憶される。これらのディジタル多値画像データを順に配置することにより、縞画像が形成される。
Hereinafter, the processing operation of each unit of the image processing apparatus 50 will be described with reference to FIG. FIG. 9 is a flowchart for explaining the processing operation of the image processing apparatus 50.
First, the TDI camera 30 images a region including the pillar portion 1a of the rail 1 and outputs a light cut image (step S1). The A / D conversion unit 501 performs A / D conversion on each light-cut image output from the TDI camera 30 and outputs it as digital multilevel image data. This digital multilevel image data is stored in an image memory (not shown). By arranging these digital multivalued image data in order, a fringe image is formed.

縞画像(又はディジタル多値画像データ)からは、短手方向の各位置において配列方向に沿っての縞画像の濃度分布を表すデータが生成される。この配列方向に沿っての縞画像の濃度分布を表すデータが「スライス縞画像データ」である。短手方向の各位置におけるスライス縞画像データは画像メモリから順次出力される。   From the striped image (or digital multi-valued image data), data representing the density distribution of the striped image along the arrangement direction is generated at each position in the short direction. Data representing the density distribution of the stripe image along this arrangement direction is “slice stripe image data”. Slice stripe image data at each position in the short direction is sequentially output from the image memory.

プレフィルタ部502は、各スライス縞画像データに所定のフィルタ処理を施すことにより、ノイズを除去し、縞の状態を鮮明にする。なお、プレフィルタ部502によるフィルタ処理は必ずしも行う必要はない。例えば縞画像に細かいノイズが多数生じているような場合にのみ行うようにすればよい。   The pre-filter unit 502 removes noise and sharpens the stripe state by applying a predetermined filter process to each slice stripe image data. Note that the filtering process by the prefilter unit 502 is not necessarily performed. For example, it may be performed only when many fine noises are generated in the striped image.

プレフィルタ部502からは、短手方向の各位置j(j=0、1、2、・・・)におけるスライス縞画像データIj(k)が二つ出力される。k(k=0、1、2、・・・)は配列方向の位置である。このとき、短手方向の位置jにおけるスライス縞画像データIj(k)は正弦波的に変化すると仮定する。すなわち、
j(k)=A(j,k){cos((2πk/M)+φ(j,k))+1}
である。ここで、A(j,k)は画素位置(j,k)におけるスライス縞画像データの振幅、φ(j,k)は画素位置(j,k)におけるスライス縞画像データの位相のずれである。測定対象部の凹みによって縞画像に発生する縞のずれの影響は、位相のずれφとして現れる。また、線状レーザ光の振幅は一定であるので、通常、上記振幅Aは一定である。しかし、測定対象部の表面が汚れているような場合には、この汚れ位置に対応する画素位置において振幅Aは急激に減少することがある。このため、上式では、振幅Aを画素位置(j,k)に依存する形で書いている。
The pre-filter unit 502 outputs two pieces of slice stripe image data I j (k) at each position j (j = 0, 1, 2,...) In the short direction. k (k = 0, 1, 2,...) is a position in the arrangement direction. At this time, it is assumed that the slice fringe image data I j (k) at the position j in the short direction changes sinusoidally. That is,
I j (k) = A (j, k) {cos ((2πk / M) + φ (j, k)) + 1}
It is. Here, A (j, k) is the amplitude of the slice fringe image data at the pixel position (j, k), and φ (j, k) is the phase shift of the slice fringe image data at the pixel position (j, k). . The influence of the fringe shift generated in the fringe image due to the dent of the measurement target portion appears as a phase shift φ. Since the amplitude of the linear laser beam is constant, the amplitude A is usually constant. However, when the surface of the measurement target part is dirty, the amplitude A may decrease rapidly at the pixel position corresponding to the dirty position. Therefore, in the above equation, the amplitude A is written in a form depending on the pixel position (j, k).

なお、cosの項の次に「1」を加えているのは、スライス縞画像データ(濃度値)Ij(k)はマイナスにならないので、このことを保証するためである。したがって、スライス縞画像データIj(k)は0から2Aの間で変化する。 The reason why “1” is added after the term of cos is to guarantee this because slice stripe image data (density value) I j (k) does not become negative. Therefore, the slice fringe image data I j (k) varies between 0 and 2A.

直交正弦波発生部503は、ROM等のメモリ上に予め作成しておいた、直交する二つの基準正弦波データsin(2πk/M)、cos(2πk/M)を発生する。特に、前者を基準sinデータ、後者を基準cosデータとも称する。これらの二つの基準正弦波データはそれぞれ、プレフィルタ部502から出力されたスライス縞画像データIj(k)と乗算される。この乗算処理により、下記の二つの出力Iaj(k)、Ibj(k)が得られる。 The orthogonal sine wave generation unit 503 generates two orthogonal reference sine wave data sin (2πk / M) and cos (2πk / M), which are created in advance on a memory such as a ROM. In particular, the former is also referred to as reference sin data, and the latter is also referred to as reference cos data. These two reference sine wave data are respectively multiplied by the slice fringe image data I j (k) output from the prefilter unit 502. By this multiplication processing, the following two outputs Ia j (k) and Ib j (k) are obtained.

Figure 2017187348
Figure 2017187348

ローパスフィルタ部504a、504bはそれぞれ、上記の乗算処理で得られた出力Iaj(k)、Ibj(k)について、所定のフィルタ処理を施すことにより、縞周波数成分及びその高調波成分を除去する、すなわち、位相のずれφのみを含む成分を抽出する。ローパスフィルタ部504aからの出力をLPF(Iaj(k))、ローパスフィルタ部504bからの出力をLPF(Ibj(k))とすると、
LPF(Iaj(k))=(A cosφ)/2
LPF(Ibj(k))=−(A sinφ)/2
である。
Each of the low-pass filter units 504a and 504b performs predetermined filter processing on the outputs Ia j (k) and Ib j (k) obtained by the above multiplication processing, thereby removing the fringe frequency component and its harmonic components. That is, a component including only the phase shift φ is extracted. If the output from the low-pass filter unit 504a is LPF (Ia j (k)) and the output from the low-pass filter unit 504b is LPF (Ib j (k)),
LPF (Ia j (k)) = (A cos φ) / 2
LPF (Ib j (k)) = − (A sin φ) / 2
It is.

位相算出部505は、二つのローパスフィルタ部504a、504bから出力された結果に基づいて、各画素位置(j,k)における位相のずれφ(j,k)を算出する(ステップS2)。位相のずれφ(j,k)は、下式より求めることができる。   The phase calculation unit 505 calculates a phase shift φ (j, k) at each pixel position (j, k) based on the results output from the two low-pass filter units 504a and 504b (step S2). The phase shift φ (j, k) can be obtained from the following equation.

Figure 2017187348
Figure 2017187348

上式では、arctanの値域を−π/2〜+π/2とすると共に、LPF(Iaj(k)),LPF(Ibj(k))の符号についての情報を利用して、位相のずれφを−π〜+πの範囲で求めている。ここで、この範囲で求めた位相のずれを改めてφ′と記すことにする。この場合、上式で求めた位相のずれφ′は、測定対象部の深さと周期的な関係があり、位相のずれφ′のある値をとるような深さは複数ある。したがって、この位相のずれφ′を用いたのでは、測定対象部の表面形状について正確な情報は得られない。このため、この位相のずれφ′から、測定対象部の深さと比例関係にあるような位相のずれφを求める必要がある。深さと比例関係にある位相のずれφを得る処理は、位相連続化処理部506によって行われる。図10(a)には、位相算出部505で作成された位相画像の一例を示す。また、図11(a)には、位相画像における位相特性を表わす特性図の一例を示す。なお、図10、図11はレール1の柱部1aのものではないが、柱部1aの縞画像でも同様である。 In the above equation, the arctan value range is set to −π / 2 to + π / 2, and information about the codes of LPF (Ia j (k)) and LPF (Ib j (k)) is used to shift the phase. φ is determined in the range of −π to + π. Here, the phase shift obtained in this range will be described again as φ ′. In this case, the phase shift φ ′ obtained by the above formula has a periodic relationship with the depth of the measurement target portion, and there are a plurality of depths that take a certain value of the phase shift φ ′. Therefore, accurate information on the surface shape of the measurement target portion cannot be obtained by using this phase shift φ ′. For this reason, it is necessary to obtain a phase shift φ that is proportional to the depth of the measurement target portion from the phase shift φ ′. The process of obtaining a phase shift φ proportional to the depth is performed by the phase continuation processing unit 506. FIG. 10A shows an example of a phase image created by the phase calculation unit 505. FIG. 11A shows an example of a characteristic diagram representing the phase characteristic in the phase image. 10 and 11 are not for the pillar portion 1a of the rail 1, but the same applies to the stripe image of the pillar portion 1a.

位相連続化処理部506は、位相算出部505で作成された位相画像に基づいて、位相のずれφ′の不連続点を検出し、位相のずれφ′が滑らかに繋がるように位相のずれφ′を補正する(ステップS3)。上述したように、位相算出部505で算出した位相のずれφ′の値域は−π〜+πであるので、位相のずれφ′は−π及び+πで不連続となる。例えば図10(a)に示す位相画像において、白(又は黒)から黒(又は白)に変化している部分が位相のずれφ′の不連続点に対応する。この位相画像をそのまま用いたのでは、測定対象部の表面形状を認識することは困難である。したがって、位相のずれφ′の不連続点において位相のずれφ′が滑らかに繋がるように位相のずれφ′を補正する必要がある。この補正(位相飛び補正)は、2πの範囲で定義された位相のずれφ′から測定対象部の深さに比例する一義的な位相のずれφを求める処理である。   The phase continuation processing unit 506 detects discontinuous points of the phase shift φ ′ based on the phase image created by the phase calculation unit 505, and the phase shift φ ′ so that the phase shift φ ′ is smoothly connected. 'Is corrected (step S3). As described above, since the value range of the phase shift φ ′ calculated by the phase calculation unit 505 is −π to + π, the phase shift φ ′ is discontinuous at −π and + π. For example, in the phase image shown in FIG. 10A, a portion where white (or black) changes to black (or white) corresponds to a discontinuous point of the phase shift φ ′. If this phase image is used as it is, it is difficult to recognize the surface shape of the measurement target portion. Therefore, it is necessary to correct the phase shift φ ′ so that the phase shift φ ′ is smoothly connected at the discontinuous points of the phase shift φ ′. This correction (phase jump correction) is a process for obtaining a unique phase shift φ proportional to the depth of the measurement target portion from the phase shift φ ′ defined in the range of 2π.

具体的には、位相連続化処理部506は、位相のずれφ′の不連続点を検出すると共に、その不連続点において位相のずれφ′を補正する。位相のずれφ′が不連続であるかどうかは、一つの画素だけを見ても分からない。隣り合う画素同士を見て判断する必要がある。まず、位相連続化処理部506は、位相画像の短手方向の各位置において位相画像を配列方向に沿って調べ、隣り合う画素での位相のずれφ′を比較する。その隣り合う画素において位相のずれφ′が大きく異なる場合には、当該画素間で位相のずれφ′が不連続であると判断し、これらの位相のずれφ′を補正する。実際、測定対象部の表面における深さは、急激に変化しない。このため、位相のずれφ′が大きく異なるのは、位相のずれφ′が±2πだけ変化しているために生じたと考えられる。したがって、位相のずれφ′がその隣接する画素での位相のずれφ′と大きく異なっている画素を調べて、それらの位相のずれφ′を滑らかに繋げていくようにすればよい(図11(a)の矢印を参照)。   Specifically, the phase continuation processing unit 506 detects a discontinuous point of the phase shift φ ′ and corrects the phase shift φ ′ at the discontinuous point. Whether or not the phase shift φ ′ is discontinuous is not known by looking at only one pixel. It is necessary to judge by looking at adjacent pixels. First, the phase continuation processing unit 506 examines the phase image along the arrangement direction at each position in the short direction of the phase image, and compares the phase shift φ ′ between adjacent pixels. If the phase shift φ ′ differs greatly between the adjacent pixels, it is determined that the phase shift φ ′ is discontinuous between the pixels, and the phase shift φ ′ is corrected. Actually, the depth at the surface of the measurement target portion does not change abruptly. For this reason, it is considered that the phase shift φ ′ is largely different because the phase shift φ ′ is changed by ± 2π. Therefore, a pixel whose phase shift φ ′ is significantly different from the phase shift φ ′ of the adjacent pixels is examined, and the phase shift φ ′ may be smoothly connected (FIG. 11). (See arrow in (a)).

例えば、ある画素位置では、位相のずれφ′が+πに近い値であり、その右隣りの画素位置では、位相のずれφ′が−πに近い値である場合には、当該右隣りの画素位置では位相のずれφ′が+2πだけ変化していると認識する。そして、当該右隣りの画素位置における位相のずれφ′に+2πを加算することにより、位相のずれφ′を補正する。また、ある画素位置では、位相のずれφ′が−πに近い値であり、その右隣りの画素位置では、位相のずれφ′が+πに近い値である場合には、当該右隣りの画素位置では位相のずれφ′が−2πだけ変化していると認識する。そして、当該右隣りの画素位置における位相のずれφ′に−2πを加算することにより、位相のずれφ′を補正する。   For example, when a phase shift φ ′ is close to + π at a certain pixel position and the phase shift φ ′ is close to −π at a pixel position on the right side, the right adjacent pixel At the position, it is recognized that the phase shift φ ′ changes by + 2π. Then, the phase shift φ ′ is corrected by adding + 2π to the phase shift φ ′ at the right adjacent pixel position. Further, when the phase shift φ ′ is a value close to −π at a certain pixel position, and the phase shift φ ′ is a value close to + π at the pixel position on the right side, the pixel on the right side At the position, it is recognized that the phase shift φ ′ changes by −2π. The phase shift φ ′ is corrected by adding −2π to the phase shift φ ′ at the right pixel position.

こうして、短手方向の各位置において配列方向に沿って隣り合う画素を調べて、位相のずれφ′を補正した後、位相連続化処理部506は、今度は、配列方向の各位置において短手方向に沿って隣り合う画素を調べ、同様にして、位相のずれφ′を補正する。この補正後の各画素位置における位相のずれは、測定対象部の深さに比例する一義的な位相のずれφである。   In this way, after examining pixels adjacent in the arrangement direction at each position in the short direction and correcting the phase shift φ ′, the phase continuation processing unit 506 next reduces the short position at each position in the arrangement direction. The adjacent pixels along the direction are examined, and similarly, the phase shift φ ′ is corrected. The phase shift at each pixel position after correction is a unique phase shift φ proportional to the depth of the measurement target portion.

次に、位相連続化処理部506は、この補正後の位相のずれφに基づいて新たに位相画像を作成する。この新たな位相画像は、測定対象部の表面形状(断面プロフィール)を正確に表している。この新たな位相画像のことを形状画像と称することにする。図10(b)には、位相連続化処理部506で作成された形状画像の一例を示す。また、図11(b)には、形状画像における位相特性を表わす特性図の一例を示す。
ステップS2、S3の処理が、本発明の形状画像作成手段による処理の例である。
Next, the phase continuation processing unit 506 creates a new phase image based on the corrected phase shift φ. This new phase image accurately represents the surface shape (cross-sectional profile) of the measurement target portion. This new phase image is referred to as a shape image. FIG. 10B shows an example of a shape image created by the phase continuation processing unit 506. FIG. 11B shows an example of a characteristic diagram showing the phase characteristic in the shape image.
The processing of steps S2 and S3 is an example of processing by the shape image creating means of the present invention.

一方、境界検出部507は、位相連続化処理部506で作成された形状画像に対して移動平均処理及び2階差分処理を行ってピークを探し、ピークとなる位置を柱部1aの高さ方向の境界として検出して、柱部領域を抽出する(ステップS4)。
この境界検出処理の詳細は、図14〜図18を用いて後述する。ステップS4の処理が、本発明の境界検出手段による処理の例である。
On the other hand, the boundary detection unit 507 performs a moving average process and a second-order difference process on the shape image created by the phase continuation processing unit 506 to search for a peak, and determines the peak position in the height direction of the column part 1a. As a boundary, a column part region is extracted (step S4).
Details of this boundary detection processing will be described later with reference to FIGS. The process of step S4 is an example of the process by the boundary detection means of the present invention.

センタリング処理部508は、境界検出部507で検出された柱部1aの境界に基づいて、位相連続化処理部506で作成された形状画像にセンタリング処理を行う(ステップS5)。長手方向に搬送される長尺材を撮影する場合、長尺材が左右上下に蛇行したり、振動したりすると、図12(a)、図12(b)に示すように短手方向にずれた画像として撮影される。図12(a)は長尺材が蛇行した場合の様子を示す模式図、図12(b)は長尺材が振動した場合の様子を示す模式図であり、実線が測定対象部の境界を示し、点線がセンタ位置を示す。   The centering processing unit 508 performs centering processing on the shape image created by the phase continuation processing unit 506 based on the boundary of the column part 1a detected by the boundary detection unit 507 (step S5). When photographing a long material conveyed in the longitudinal direction, if the long material meanders left and right and up and down, or vibrates, it shifts in the short direction as shown in FIGS. 12 (a) and 12 (b). Taken as an image. FIG. 12A is a schematic diagram showing a state when the long material is meandering, and FIG. 12B is a schematic diagram showing a state when the long material vibrates, and the solid line indicates the boundary of the measurement target portion. The dotted line indicates the center position.

このような画像に対し、センタリング処理では、ライン毎に測定対象部の境界を検出し、それらの中心を算出してセンタ位置とする。この位置を画像センタに垂直方向に揃えるようにする。図12(c)はセンタリング処理後の画像を示す模式図である。このセンタリング処理により、短手方向の端部に湾曲面を有する長尺材の所定の部位を測定対象部とする場合に、長尺材が蛇行したり、振動したりしたときにも、表面欠陥の検出精度を高めることができる。   For such an image, in the centering process, the boundary of the measurement target part is detected for each line, and the center thereof is calculated as the center position. This position is aligned with the image center in the vertical direction. FIG. 12C is a schematic diagram showing an image after the centering process. With this centering process, when a predetermined part of a long material having a curved surface at the end in the short direction is used as a measurement target part, even when the long material meanders or vibrates, surface defects Detection accuracy can be increased.

形状補正処理部509は、センタリング処理後の形状画像に形状補正処理を行う。図10(b)、図11(b)に示す形状画像では、測定対象部の表面形状そのものが平坦でないので、表面欠陥判別を行うための二値化処理を施しても、測定対象部の表面の凹みや疵等の表面欠陥を検出することができない。そこで、測定対象部の曲面形状を平面に焼き直す、すなわち平面に変換する形状補正処理を行うものである。   The shape correction processing unit 509 performs shape correction processing on the shape image after the centering processing. In the shape images shown in FIG. 10B and FIG. 11B, the surface shape of the measurement target portion itself is not flat. Therefore, even if the binarization process for performing surface defect determination is performed, the surface of the measurement target portion Surface defects such as dents and wrinkles cannot be detected. Therefore, a shape correction process is performed in which the curved surface shape of the measurement target portion is rebaked into a flat surface, that is, converted into a flat surface.

具体的には、センタリング処理後の形状画像に事前処理を行った後(ステップS6〜S10)、1ライン毎に高次関数(例えば4次以上の多項式関数)によるフィッティング処理を施す(ステップS11)。
事前処理では、フィッティング処理に先立って、一次形状補正(ステップS6)、二値化(ステップS7)、凹凸検出(ステップS8)、膨張処理(ステップS9)及びマスク処理(ステップS10)を行うことにより、センタリング処理後の形状画像からマスク情報に基づいて凹凸部を取り除いた形状画像を作成する。なお、事前処理の詳細は特許文献2に詳しいので、ここではその詳細な説明を省略する。
Specifically, after pre-processing the shape image after the centering process (steps S6 to S10), a fitting process using a high-order function (for example, a fourth or higher order polynomial function) is performed for each line (step S11). .
In the pre-processing, prior to the fitting processing, primary shape correction (step S6), binarization (step S7), unevenness detection (step S8), expansion processing (step S9), and mask processing (step S10) are performed. Then, a shape image is created by removing the uneven portion from the shape image after the centering process based on the mask information. Since details of the pre-processing are detailed in Patent Document 2, detailed description thereof is omitted here.

フィッティング処理は、与えられたデータ列に対して残差二乗和が最も小さくなる曲線(フィッティング曲線)を求める処理であり、一般的な最小二乗法やチェビシェフ法等を用いることができる。最小二乗法は、変数のべき乗を基底関数として、残差二乗和の係数による偏微分係数をゼロとおき、係数を演算する処理である。このとき、基底関数に直交多項式であるチェビシェフ多項式を用いると、高次関数でも、より正確に且つ安定してフィッティングさせることができる。チェビシェフ多項式によるフィッティング関数は、以下の式で表され、フィッティング処理により係数ai(i=0、1、・・・、n+1)を求める。 The fitting process is a process for obtaining a curve (fitting curve) having the smallest residual square sum for a given data string, and a general least square method, a Chebyshev method, or the like can be used. The least square method is a process of calculating a coefficient by setting a partial differential coefficient based on a residual sum of squares coefficient to zero using a power of a variable as a basis function. At this time, if a Chebyshev polynomial, which is an orthogonal polynomial, is used as the basis function, a higher-order function can be fitted more accurately and stably. A fitting function based on a Chebyshev polynomial is expressed by the following equation, and coefficients a i (i = 0, 1,..., N + 1) are obtained by fitting processing.

Figure 2017187348
Figure 2017187348

続いて、1ライン毎に、フィッティング処理(ステップS11)で生成されたフィッティング曲線と、元データ(センタリング処理後の形状画像)との差分演算を行う(ステップS12)。図11(b)において、点線がフィッティング曲線、実線が元データである。このフィッティング処理により、測定対象部の両端部が急峻な形状となっている場合でも、両端部の急峻な信号変化が緩和されることになる。   Subsequently, a difference between the fitting curve generated in the fitting process (step S11) and the original data (the shape image after the centering process) is calculated for each line (step S12). In FIG. 11B, the dotted line is the fitting curve, and the solid line is the original data. By this fitting process, even when both ends of the measurement target portion have a steep shape, a sharp signal change at both ends is alleviated.

更に、差分演算(ステップS12)で得られたデータを長尺材の走行方向(長手方向)に所定の長さだけ平均(積算)し(ステップS13)、ローパスフィルタ処理を施して(ステップS14)、元データ(ステップS12の差分演算で得られたデータ)との差分演算(或いは除算演算)を行う(ステップS15)。このシェーディング補正により、表面欠陥候補となる凹凸情報を保持したまま平坦化されることになる。   Further, the data obtained by the difference calculation (step S12) is averaged (integrated) by a predetermined length in the running direction (longitudinal direction) of the long material (step S13), and subjected to low-pass filter processing (step S14). Then, a difference calculation (or division calculation) with the original data (data obtained by the difference calculation in step S12) is performed (step S15). By this shading correction, flattening is performed while retaining unevenness information that is a surface defect candidate.

以上のように、形状補正処理として、高次関数(例えば4次以上の多項式関数)によるフィッティング処理、更にはシェーディング補正といった二段階の処理を行う。形状補正処理後の画像のことを深さ画像と称することにする。図10(c)には、形状補正処理部509で作成された深さ画像の一例を示す。また、図11(c)には、深さ画像における位相特性を表わす特性図の一例を示す。
ステップS6〜S15の処理が、本発明の形状画像作成手段による処理の例である。
As described above, as the shape correction process, a two-stage process such as a fitting process using a high-order function (for example, a polynomial function of a fourth order or higher) and further a shading correction is performed. The image after the shape correction process is referred to as a depth image. FIG. 10C shows an example of a depth image created by the shape correction processing unit 509. FIG. 11C shows an example of a characteristic diagram representing the phase characteristic in the depth image.
The process of steps S6 to S15 is an example of the process by the shape image creating means of the present invention.

刻印マスク画像作成部510は、形状補正処理部509で作成された深さ画像に対して、凹部二値化及び凸部二値化を行い、更に膨張及び収縮処理を行った上でラベリング処理を行うことにより、大きさが既知の刻印11を検出して、刻印マスク画像を作成する(ステップS16)。
この刻印検出・マスク処理の詳細は、図19〜図21を用いて後述する。なお、ステップS16の処理が、本発明の刻印マスク画像作成手段による処理の例である。
The engraving mask image creation unit 510 performs concave portion binarization and convex portion binarization on the depth image created by the shape correction processing unit 509, and further performs labeling processing after performing expansion and contraction processing. By doing so, a stamp 11 having a known size is detected and a stamp mask image is created (step S16).
Details of this marking detection / mask processing will be described later with reference to FIGS. The process of step S16 is an example of the process performed by the marking mask image creating unit of the present invention.

欠陥検出処理部511は、刻印マスク画像作成部510で作成された刻印マスク画像を用いて、形状補正処理部509で作成された深さ画像をマスク処理して、二値化処理する(ステップS17)。二値化処理では、閾値を設定し、閾値内部分には「0」を、閾値を超える部分に「1」を与えて画像化する。
そして、欠陥検出処理部511は、二値化画像を用いて表面欠陥判別を行い(ステップS18)、表面欠陥を検出する(ステップS19)。図13は二値化画像の写真を示す図である。図13に示すように、二値化画像の「1」部分の画素数を算出し、撮影分解能と掛け合わせることで、欠陥の面積、長さ、幅、縦横比等を算出し、表面欠陥判別を行えばよい。なお、二値化画像だけでなく、例えば深さ画像を用いてもよい。
ステップS17〜S19の処理が、本発明の欠陥検出処理手段による処理の例である。
The defect detection processing unit 511 performs a binarization process by masking the depth image created by the shape correction processing unit 509 using the marking mask image created by the marking mask image creation unit 510 (step S17). ). In the binarization processing, a threshold value is set, and “0” is given to the portion within the threshold value, and “1” is given to the portion exceeding the threshold value, and imaged.
And the defect detection process part 511 performs surface defect discrimination | determination using a binarized image (step S18), and detects a surface defect (step S19). FIG. 13 shows a photograph of the binarized image. As shown in FIG. 13, the number of pixels of the “1” portion of the binarized image is calculated and multiplied by the imaging resolution to calculate the defect area, length, width, aspect ratio, etc., and surface defect discrimination Can be done. In addition to the binarized image, for example, a depth image may be used.
The processing of steps S17 to S19 is an example of processing by the defect detection processing means of the present invention.

(境界検出処理の詳細)
ここで、ステップS4の境界検出処理の詳細を説明する。
図14に、レール1の横断面形状の一例を示す。図14に示すように、レール1は、上部から頭部1b、頭側部1c、顎下部1d、柱部1a、脚部1eを有し、柱部1aは高さ方向の上端が湾曲しながら顎下部1dに、下端が湾曲しながら脚部1eに繋がる。
特許文献2では、レール1の頭部1bのエッジ位置(頭部1bと頭側部1cの境界)を輝度画像に基づいて検出する。頭部1bから頭側部1cにかけての湾曲は比較的急であり、頭側部1cからの拡散反射光が戻らないため、輝度画像によって頭部1bのエッジ位置を検出することができる。
しかしながら、柱部1aを測定対象部とする場合、柱部1aから顎下部1dや脚部1eにかけての湾曲が緩やかで、顎下部1dや脚部1eに照射された線状レーザ光の拡散反射光も撮像されるため、輝度画像によって柱部1aの境界を正確に検出することは難しくなる。
(Details of boundary detection processing)
Here, the details of the boundary detection process in step S4 will be described.
In FIG. 14, an example of the cross-sectional shape of the rail 1 is shown. As shown in FIG. 14, the rail 1 has a head portion 1b, a head side portion 1c, a chin lower portion 1d, a column portion 1a, and a leg portion 1e from above, and the column portion 1a has a curved upper end in the height direction. The lower end of the chin is connected to the leg 1e while the lower end is curved.
In Patent Document 2, the edge position of the head 1b of the rail 1 (the boundary between the head 1b and the head side 1c) is detected based on the luminance image. The curve from the head 1b to the head side 1c is relatively steep, and the diffuse reflected light from the head side 1c does not return. Therefore, the edge position of the head 1b can be detected from the luminance image.
However, when the column part 1a is the measurement target part, the curve from the column part 1a to the lower jaw part 1d and the leg part 1e is gentle, and the diffuse reflected light of the linear laser light irradiated to the lower jaw part 1d and the leg part 1e. Therefore, it is difficult to accurately detect the boundary of the pillar portion 1a from the luminance image.

そこで、上述したように、位相連続化処理部506で作成された形状画像に対して移動平均処理及び2階差分処理を行ってピークを探し、ピークとなる位置を柱部1aの高さ方向の境界として検出して、柱部領域を抽出する。
図15は、境界検出処理を示すフローチャートである。
ステップS401で、境界検出部507は、位相連続化処理部506で作成された断面プロフィールを表す形状画像に対して移動平均処理を行い、平滑化断面プロフィールを得る。移動平均処理を行うのは、次の2階差分処理後のデータが滑らかなピークを有するように、局所的なノイズを除去するためである。
Therefore, as described above, the moving average process and the second-order difference process are performed on the shape image created by the phase continuation processing unit 506 to search for a peak, and the peak position is determined in the height direction of the column part 1a. It detects as a boundary and extracts a column part area | region.
FIG. 15 is a flowchart showing the boundary detection process.
In step S401, the boundary detection unit 507 performs a moving average process on the shape image representing the cross-sectional profile created by the phase continuation processing unit 506 to obtain a smoothed cross-sectional profile. The moving average process is performed in order to remove local noise so that the data after the next second-order difference process has a smooth peak.

ステップS402で、境界検出部507は、ステップS401で得られた平滑化断面プロフィールに対して2階差分処理を行う。具体的には、図16に示すように、平滑化断面プロフィール上でx座標間の距離が所定の距離Dだけ離れた点A(x1,y1),B(x2,y2)に対して、線分ABの中点M(xm,ym)(xm=(x1+x2)/2,ym=(y1+y2)/2)を求める。そして、x座標xmに対応する平滑化断面プロフィール上の点をC(xm,yc)とし、線分MCの長さ、すなわちMC=Δy=ym−ycを2階差分値として求める。移動平均のようにx座標間の所定の距離D=|x2−x1|を一定に保ちつつ点A,Bを移動させながら、平滑化断面プロフィール全体に対して2階差分処理を行い、2階差分データを得る。 In step S402, the boundary detection unit 507 performs second-order difference processing on the smoothed cross-sectional profile obtained in step S401. Specifically, as shown in FIG. 16, points A (x 1 , y 1 ), B (x 2 , y 2 ) where the distance between the x coordinates is separated by a predetermined distance D on the smoothed cross-sectional profile. against it, determine the midpoint of the line segment AB M (x m, y m ) (xm = (x 1 + x 2) / 2, ym = (y 1 + y 2) / 2). The point on the smoothed cross-sectional profile corresponding to the x coordinate x m is C (x m , y c ), and the length of the line segment MC, that is, MC = Δy = y m −y c is used as the second-order difference value. Ask. While moving the points A and B while keeping a predetermined distance D = | x 2 −x 1 | between the x coordinates constant like a moving average, the second-order difference processing is performed on the entire smoothed cross-sectional profile, Obtain second-order difference data.

ステップS403で、境界検出部507は、ステップS402で得られた2階差分データの上に凸のピークを探し、ピークの位置に対応するx座標を境界として検出する。
図17に、実製品のレールの断面寸法図に含まれる直線の開始・終了座標、及び、円弧の中心座標や半径を基に、レールの断面プロフィールを直線と円弧で区分的に関数化して得られた寸法図断面形状(実製品のレールの形状)と、寸法図断面形状に対して移動平均処理後に2階差分処理を行って得られた2階差分データとの関係を表わしたグラフを示す。図17において矢印で指し示すように、柱部1aと顎下部1dの境界、及び、柱部1aと脚部1eの境界で上に凸のピークが現れている。このように柱部1aの両端部の境界では表面形状の湾曲度の変化が大きくなることから、2階差分値を用いて表面形状の湾曲度の変化を評価して、柱部1aの境界を検出することができる。
ステップS404で、境界検出部507は、ステップS403で検出された境界の内側の領域を柱部領域として抽出する。
In step S403, the boundary detection unit 507 searches for a convex peak on the second-order difference data obtained in step S402, and detects the x coordinate corresponding to the peak position as a boundary.
Fig. 17 shows the cross-sectional profile of the rail obtained by piecewise functioning with straight lines and arcs based on the start and end coordinates of the straight lines and the center coordinates and radius of the arcs included in the cross-sectional dimensions of the rails of the actual product. The graph showing the relationship between the obtained dimensional drawing cross-sectional shape (the shape of the rail of the actual product) and the second-order differential data obtained by performing the second-order differential processing after the moving average processing on the dimensional drawing cross-sectional shape is shown. . As indicated by the arrows in FIG. 17, convex peaks appear at the boundary between the column part 1a and the lower chin part 1d and at the boundary between the column part 1a and the leg part 1e. Thus, since the change in the curvature of the surface shape becomes large at the boundary between both ends of the pillar portion 1a, the change in the curvature of the surface shape is evaluated using the second-order difference value, and the boundary of the pillar portion 1a is determined. Can be detected.
In step S404, the boundary detection unit 507 extracts a region inside the boundary detected in step S403 as a columnar region.

なお、レール1の各種寸法は予め定められているので、柱部1aの一端の境界だけを検出し、既知の柱部1aの長さを用いて他端の境界を検出するようにしてもよい。例えば柱部1aと顎下部1dの境界が視野に入っていないか、検出できない場合、柱部1aと脚部1eの境界を検出した後、既知の柱部1aの長さを用いて柱部1aと顎下部1dの境界を検出する。   In addition, since the various dimensions of the rail 1 are determined in advance, only the boundary of one end of the pillar portion 1a may be detected, and the boundary of the other end may be detected using the known length of the pillar portion 1a. . For example, when the boundary between the column part 1a and the lower jaw 1d is not in the field of view or cannot be detected, after detecting the boundary between the column part 1a and the leg part 1e, the column part 1a is used using the known length of the column part 1a. And the boundary of the lower jaw 1d is detected.

図18に、実際のレールに対して測定によって得られた断面プロフィールに対して移動平均処理及び2階差分処理を行った結果の一例を示す。移動平均及び2階差分処理を行う基準となる長さ(移動平均については、対象とする点のうちのx座標に関する最大値と最小値との間隔。2階差分処理については、上記距離D。)の決め方としては、図16にMCとして示す湾曲部の深さが、検出対象とする表面欠陥の深さよりも十分大きく、かつ、柱部1aから顎下部1dに繋がる湾曲部分と、柱部1aから脚部1eに繋がる湾曲部分とを当該基準となる長さが同時に含まないように、10mm程度に設定し、この処理を行う長さに対応した点数を奇数とするのがよい。2階差分処理の結果、柱部1aと脚部1eの境界に相当する、上に凸のピークが明瞭に現れた。図18の横軸において、左側が顎下部1d側、右側が脚部1e側となるので、右側からピークを探し、ピークの位置を柱部1aと脚部1eの境界として検出した。そして、柱部1aと脚部1eの境界を検出した後、既知の柱部1aの長さを用いて柱部1aと顎下部1dの境界を検出した。   FIG. 18 shows an example of a result obtained by performing the moving average process and the second-order difference process on the cross-sectional profile obtained by the measurement on the actual rail. Length as a reference for performing moving average and second-order difference processing (for moving average, the interval between the maximum value and the minimum value regarding the x-coordinate of the target points. The distance D for second-order difference processing. 16), the depth of the curved portion shown as MC in FIG. 16 is sufficiently larger than the depth of the surface defect to be detected, and the curved portion that connects the column portion 1a to the lower jaw 1d, and the column portion 1a. It is preferable that the curved portion connected to the leg portion 1e is set to about 10 mm so that the reference length is not included at the same time, and the number of points corresponding to the length to be processed is an odd number. As a result of the second floor difference process, an upwardly convex peak corresponding to the boundary between the pillar portion 1a and the leg portion 1e appeared clearly. In the horizontal axis of FIG. 18, since the left side is the lower chin 1d side and the right side is the leg 1e side, the peak is searched from the right side, and the peak position is detected as the boundary between the column part 1a and the leg 1e. And after detecting the boundary of the column part 1a and the leg part 1e, the boundary of the column part 1a and the chin lower part 1d was detected using the length of the known column part 1a.

なお、本実施形態では、2階差分処理に、重みが均一な移動平均処理を組み合わせたが、例えば平滑化する注目点からの距離が遠いほど重みを軽くするような、重みが不均一な移動平均処理を組み合わせてもよい。
なお、図18の例では移動平均処理の点数は2階差分処理の点数と同じとしたが、図15のステップS401、S402で、ひげ等の局所的なノイズが発生せず、滑らかなピークをもつならば、移動平均処理の点数は2階差分処理の点数よりも少なくしてもよい。
また、測定対象部の表面形状の湾曲度の変化を評価して、測定対象部の境界を検出するものであれば2階差分処理に限られるものではない。
ステップS401、S402で、ひげ等の局所的なノイズが発生せず、滑らかなピークが現れるような、平滑化演算とラプラシアン演算の両方の効果が期待される処理を用いてもよい。そのような例として、ラプラシアン・ガウシアンフィルタやサビツキー・ゴーレイフィルタ等が挙げられる。また、フィルタ長さについても、処理結果としてノイズが抑制され、滑らかなピークが得られるように決めればよい。
In this embodiment, the moving average processing with uniform weight is combined with the second-order difference processing. However, for example, the movement with non-uniform weight is such that the weight is reduced as the distance from the target point to be smoothed increases. You may combine an average process.
In the example of FIG. 18, the score of the moving average process is the same as the score of the second-order difference process. However, in steps S401 and S402 of FIG. If so, the moving average processing score may be less than the second-order difference processing score.
The second-order difference process is not limited as long as the change in the degree of curvature of the surface shape of the measurement target part is evaluated and the boundary of the measurement target part is detected.
In steps S401 and S402, a process in which the effects of both the smoothing calculation and the Laplacian calculation are expected such that a local peak such as a beard does not occur and a smooth peak appears may be used. Examples thereof include Laplacian / Gaussian filters, Savitzky / Golay filters, and the like. Further, the filter length may be determined so that a noise is suppressed as a processing result and a smooth peak is obtained.

(刻印検出・マスク処理の詳細)
次に、ステップS16の刻印検出・マスク処理の詳細を説明する。
上述したように、形状補正処理部509で作成された深さ画像に対して、凹部二値化及び凸部二値化を行い、更に膨張及び収縮処理を行った上でラベリング処理を行うことにより、大きさの範囲が既知の刻印11を検出して、刻印マスク画像を作成する。
図19は、刻印検出・マスク処理を示すフローチャートである。また、図20に、刻印検出・マスク処理の各段階での画像の一例を示す。
ステップS1601で、刻印マスク画像作成部510は、境界検出部507で検出された柱部1aの境界を基準にして、形状補正処理部509で作成された深さ画像上で刻印帯11を定める。柱部1aにおける刻印帯11の高さ位置及び幅は既知であるので、柱部1aの境界がわかれば、そこから既知の距離だけ離れた一定幅の領域を刻印帯11として定めることができる。
(Details of engraving detection and mask processing)
Next, details of the marking detection / mask processing in step S16 will be described.
As described above, the depth image created by the shape correction processing unit 509 is subjected to concave portion binarization and convex portion binarization, and further subjected to expansion and contraction processing and then labeling processing. Then, a stamp 11 having a known size range is detected to create a stamp mask image.
FIG. 19 is a flowchart showing stamp detection / mask processing. FIG. 20 shows an example of an image at each stage of engraving detection / mask processing.
In step S <b> 1601, the marking mask image creation unit 510 determines the marking band 11 on the depth image created by the shape correction processing unit 509 with reference to the boundary of the column part 1 a detected by the boundary detection unit 507. Since the height position and width of the marking strip 11 in the pillar portion 1a are known, if a boundary of the pillar portion 1a is known, a region having a constant width away from the border portion 1a can be defined as the marking strip 11.

図20(a)は、形状補正処理部509で作成された深さ画像のうち、刻印帯11付近を拡大して示す。図20(a)に示すように、刻印帯11には「ALE」という文字が刻印されている。
なお、図20(a)に示す深さ画像は、視覚的にわかりやすくするために、元々の深さ画像に対して128のオフセットを足して明るさ補正した符号なし8ビットのグレースケールで表示しており、凹部は暗く、凸部は明るく表示される。
また、刻印は凹部となるので「ALE」という刻印全体が暗く表示されるはずであるが、明るくなっている部分も見られる。これは、刻印が非常に急峻な傾斜の形状を有するため、線状レーザ光が届かない、或いは拡散反射光が撮像されない影の部分が生じ、位相検出処理や位相連続化処理に誤りが生じるためと考えられる。また、刻印自体は凹状であるが、その周囲に肉の盛り上がりができて凸状となることがあるためと考えられする。また、刻印帯11の幅が広いため、関数フィッティングでの近似誤差による跳ね返りが生じ、凸部と検出されてしまうことも理由の一つと考えられる。
FIG. 20A shows an enlarged view of the vicinity of the stamped band 11 in the depth image created by the shape correction processing unit 509. As shown in FIG. 20 (a), the letter “ALE” is stamped on the stamped band 11.
Note that the depth image shown in FIG. 20A is displayed in an unsigned 8-bit gray scale in which brightness is corrected by adding an offset of 128 to the original depth image for easy visual understanding. The concave portion is dark and the convex portion is brightly displayed.
Further, since the marking becomes a concave portion, the whole marking “ALE” should be displayed darkly, but a bright portion can also be seen. This is because the engraving has a very steeply inclined shape, so that there is a shadow portion where the linear laser beam does not reach or the diffuse reflected light is not imaged, and an error occurs in the phase detection processing or phase continuation processing. it is conceivable that. In addition, although the inscription itself is concave, it is considered that the bulge of the meat around it may become convex. In addition, since the width of the stamped band 11 is wide, a bounce caused by an approximation error in function fitting occurs and it is detected as a convex part.

ステップS1602で、刻印マスク画像作成部510は、形状補正処理部509で作成された深さ画像のうちステップS1601で定められた刻印帯11で、予め設定された深さで閾値処理を行い、凹部二値化を行う。同様に、刻印マスク画像作成部510は、形状補正処理部509で作成された深さ画像のうちステップS1601で定めた刻印帯11で、予め設定された高さで閾値処理を行い、凸部二値化を行う。
図20(a)に示す深さ画像に対して、ある閾値以下の凹部の画素を白く、それ以外の画素を黒くする凹部二値化を行うと、図20(b)に示すように、凹部二値化画像が得られる。この凹部二値化画像では、上述したように凸部と検出される部分が生じることから、刻印の一部に欠損が生じている。
また、図20(a)に示す深さ画像に対して、ある閾値以上の凸部の画素を白く、それ以外の画素を黒くする凸部二値化を行うと、図20(c)に示すように、凸部二値化画像が得られる。凸部二値化画像では、凹部二値化画像で欠損していた刻印の一部が検出されている。
このように刻印は凹部となるので、原理上は凹部二値化だけでもよいが、凸部二値化も併せて行うことにより、刻印を高精度に顕在化させることができる。
In step S1602, the marking mask image creation unit 510 performs threshold processing at a preset depth on the marking band 11 determined in step S1601 out of the depth image created by the shape correction processing unit 509, and the concave portion Perform binarization. Similarly, the marking mask image creation unit 510 performs threshold processing at a preset height on the marking band 11 determined in step S1601 out of the depth image created by the shape correction processing unit 509, so that the convex portion 2 Perform valuation.
When the binarization binarization is performed on the depth image shown in FIG. 20A by whitening the concave pixels below a certain threshold and blackening the other pixels, as shown in FIG. A binarized image is obtained. In this concave portion binarized image, a portion detected as a convex portion is generated as described above, and hence a part of the marking is missing.
Moreover, when the convex part binarization which makes the pixel of the convex part more than a certain threshold value white with respect to the depth image shown to Fig.20 (a) and makes other pixels black is shown in FIG.20 (c). In this way, a convex binarized image is obtained. In the convex binarized image, a part of the mark missing from the concave binarized image is detected.
Since the marking becomes a concave portion in this way, in principle, only the concave portion binarization may be used. However, by performing the convex portion binarization together, the marking can be made to appear with high accuracy.

ステップS1603で、刻印マスク画像作成部510は、ステップS1602で得られた凹部二値化画像と凸部二値化画像の画素ビットの論理和演算(OR演算)を行って、凹凸部を二値化、合成した凹凸部二値化画像を得る。
図20(d)に、論理和演算により白の部分を合成した凹凸部二値化画像を示す。
In step S1603, the marking mask image creation unit 510 performs a logical OR operation (OR operation) of the pixel bits of the concave portion binarized image and the convex portion binarized image obtained in step S1602 to binarize the uneven portion. A binarized image obtained by combining and synthesizing is obtained.
FIG. 20D shows an uneven portion binarized image in which white portions are synthesized by a logical sum operation.

ステップS1604で、刻印マスク画像作成部510は、ステップS1603で得られた凹凸部二値化画像に対して膨張及び収縮処理を行う。
図20(d)に示す凹凸部二値化画像においても刻印の一部に欠損が見られる。そのため、凹凸部二値化画像で検出されている白の部分の狭い範囲で刻印マスク画像を作成すると、刻印周辺の凹凸部を表面欠陥と過検出してしまうおそれがある。そこで、二値化された凹凸部のうち大きい凹凸部をまとめて一つのブロブとし、小さい凹凸部を除去する膨張及び収縮処理を施す。
図20(e)に、膨張及び収縮処理を施した凹凸部二値化画像を示す。凹凸部二値化画像において刻印を構成する画素を連結するため、5回の膨張処理を行った。その後に細かいノイズを抑制するために、4回の収縮処理を行い、図20(e)に示すように、膨張及び収縮処理を施した凹凸部二値化画像が得られた。膨張処理及び収縮処理の回数は、対象画像に応じて適宜決定すればよい。
なお、膨張処理とは、二値化画像の注目画素に対し、隣接画素に一つでも白の画素があれば、注目画素を白とする処理を画像全体に施して出力するものであり、近接しているが分離している白の部分をまとめる効果のある、画像処理分野でよく知られた処理である。また、収縮処理とは、二値化画像の注目画素に対し、隣接画素に一つでも黒の画素があれば、注目画素を黒とする処理を画像全体に施して出力するものであり、孤立した白のノイズの画素を除去する効果のある、画像処理分野でよく知られた処理である。
In step S1604, the marking mask image creation unit 510 performs expansion and contraction processing on the uneven portion binarized image obtained in step S1603.
In the uneven portion binarized image shown in FIG. 20D, a defect is seen in a part of the inscription. Therefore, if a marking mask image is created in a narrow range of the white portion detected in the uneven portion binarized image, the uneven portion around the marking may be overdetected as a surface defect. Therefore, the large uneven portions among the binarized uneven portions are combined into one blob, and an expansion and contraction process for removing the small uneven portions is performed.
FIG. 20 (e) shows an uneven portion binarized image subjected to expansion and contraction processing. In order to connect the pixels constituting the inscription in the uneven portion binarized image, expansion processing was performed five times. Thereafter, in order to suppress fine noise, the shrinkage process was performed four times, and as shown in FIG. 20E, an uneven portion binarized image subjected to the expansion and contraction process was obtained. What is necessary is just to determine suitably the frequency | count of an expansion process and a contraction process according to a target image.
Note that the dilation processing is to perform processing for making the target pixel white if the adjacent pixel has at least one white pixel for the target pixel of the binarized image and output it. However, it is a well-known process in the image processing field that has the effect of grouping white parts that are separated. In addition, the contraction process is a process in which if the pixel of interest in the binarized image has at least one black pixel adjacent to the pixel of interest, the process is performed on the entire image and output as black. This processing is well known in the image processing field and has the effect of removing white noise pixels.

ステップS1605で、刻印マスク画像作成部510は、ステップS1604で得られた膨張及び収縮処理が施された凹凸部二値化画像に対して、画素連結している部分を一つのブロブ(blob)とするラベリング処理を行う。例えば画素連結している部分の外接矩形を一つのブロブとする。   In step S <b> 1605, the marking mask image creation unit 510 converts a pixel-connected portion into one blob for the concavo-convex portion binarized image subjected to the expansion and contraction processing obtained in step S <b> 1604. Perform the labeling process. For example, a circumscribed rectangle of a portion where pixels are connected is defined as one blob.

ステップS1606で、刻印マスク画像作成部510は、ステップS1605でラベリングされたブロブのうち、その大きさ(外接矩形の面積等)が、刻印に相当する大きさのブロブを刻印と判別し、選別する。刻印の大きさの範囲は既知であるので、ブロブの大きさが刻印に相当する大きさであれば、そのブロブを刻印として選別することができる。
図20(f)に、刻印として選別されたブロブの外接矩形を、図20(a)の深さ画像に重ねて描画したラベリング画像を示す。
なお、ここではブロブを外接矩形としたが、他の形状(楕円等)としてもよい。また、刻印を十分被覆できるように、外接矩形を包含する大き目の矩形としてもよい。
In step S1606, the marking mask image creation unit 510 determines, from among the blobs labeled in step S1605, a blob whose size (area of a circumscribed rectangle, etc.) corresponds to the marking, and selects it. . Since the size range of the marking is known, if the size of the blob is a size corresponding to the marking, the blob can be selected as the marking.
FIG. 20 (f) shows a labeling image in which the circumscribed rectangle of the blob selected as the marking is superimposed on the depth image of FIG. 20 (a).
Although the blob is a circumscribed rectangle here, other shapes (such as an ellipse) may be used. Moreover, it is good also as a large rectangle which encloses a circumscribed rectangle so that engraving can fully be covered.

ステップS1607で、刻印マスク画像作成部510は、刻印として選別されたブロブに対して、その外接矩形内のすべての画素ビットを0、外接矩形外のすべての画素ビットを1とする刻印マスク画像を作成する。
なお、本実施形態では刻印として選別されたブロブの外接矩形の内外で画素ビットを0、1とすることで刻印マスク画像を作成するようにしたが、膨張及び収縮処理を施した凹凸部二値化画像の白の部分が、刻印を被覆できるならば、白の部分そのものの内外で画素ビットを0、1とする刻印マスク画像を作成するようにしてもよい。
In step S 1607, the marking mask image creation unit 510 creates a marking mask image with all pixel bits in the circumscribed rectangle being 0 and all pixel bits outside the circumscribed rectangle being 1 for the blob selected as the marking. create.
In this embodiment, the marking mask image is created by setting the pixel bits to 0 and 1 inside and outside the circumscribed rectangle of the blob selected as the marking. If the white portion of the digitized image can cover the marking, a marking mask image with pixel bits 0 and 1 inside and outside the white portion itself may be created.

以上のようにして作成された刻印マスク画像を用いて、欠陥検出処理部511は、形状補正処理部509で作成された深さ画像と、刻印マスク画像の画素ビットの論理積演算(AND演算)を行い、深さ画像に出現する刻印をマスクする。これにより、深さ画像上で刻印に相当する凹凸がなくなるので、刻印を表面欠陥として過検出しないとともに、表面欠陥を見逃すことなく検出することができる。
図21(a)に、刻印帯11に付着物が出現している深さ画像を示す。なお、図21(a)で示す位置では現れないが、刻印帯11には刻印が施されている。図21(b)に、付着物を囲む外接矩形を深さ画像に重ねて描画した画像を示す。このように刻印マスク画像により刻印をマスクすることにより、刻印を表面欠陥として過検出しないとともに、刻印帯11に出現する表面欠陥を見逃すことなく検出することができた。
Using the marking mask image created as described above, the defect detection processing unit 511 performs an AND operation (AND operation) of the depth image created by the shape correction processing unit 509 and the pixel bits of the marking mask image. To mask the markings appearing in the depth image. Thereby, since the unevenness corresponding to the marking is eliminated on the depth image, the marking can be detected without overdetecting the surface defect and without overlooking the surface defect.
FIG. 21 (a) shows a depth image in which deposits appear on the stamp band 11. In addition, although it does not appear in the position shown in FIG. 21 (a), the stamp band 11 is stamped. FIG. 21B shows an image drawn by superposing a circumscribed rectangle surrounding the deposit on the depth image. By masking the marking with the marking mask image in this way, the marking was not overdetected as a surface defect, and the surface defect appearing on the marking band 11 could be detected without missing it.

以上、本発明を実施形態と共に説明したが、上記実施形態は本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。
本実施形態では、凹部となる熱間刻印を例に挙げたが、例えば柱部1aには、ロールマークと称される凸部を有する情報が付されることもあり、このようなロールマークについても本発明を同様に適用できる。この場合、原理上は凸部二値化だけでもよいが、凹部二値化も併せて行うことにより、ロールマークを高精度に顕在化させることができる。本願の特許請求の範囲でいう「刻印」とは、大きさの範囲が既知であることを前提として、広く、凹凸で表わされる文字やマーク等の情報のことを意味するものとする。
Although the present invention has been described together with the embodiments, the above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention is interpreted in a limited manner by these. It must not be. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.
In this embodiment, the hot stamping which becomes a concave portion is taken as an example. For example, the column portion 1a may be provided with information having a convex portion called a roll mark. The present invention can be similarly applied. In this case, in principle, only the convex portion binarization may be used, but the roll mark can be made to appear with high accuracy by performing the concave portion binarization together. The term “engraved” as used in the claims of the present application means information such as characters and marks that are broadly represented by unevenness on the premise that the size range is known.

本発明を適用した画像処理装置50は、CPU、ROM、RAM等を備えたコンピュータシステムにより実現され、CPUがコンピュータプログラムを実行することによって画像処理装置50の機能又は処理を実現する。なお、画像処理装置50は、一つの装置である必要はなく、複数の機器から構成されてもよい。
また、本発明は、本発明の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータがプログラムを読み出して実行することによっても実現可能である。
The image processing apparatus 50 to which the present invention is applied is realized by a computer system including a CPU, a ROM, a RAM, and the like, and the functions or processing of the image processing apparatus 50 are realized by the CPU executing a computer program. Note that the image processing apparatus 50 does not have to be a single apparatus, and may include a plurality of devices.
The present invention also provides software (program) that implements the functions of the present invention to a system or apparatus via a network or various storage media, and the system or apparatus computer reads out and executes the program. It is feasible.

10:レーザ装置、20:ロッドレンズ、30:遅延積分型カメラ、40:タイミング信号発生部、50:画像処理装置、60:表示装置、501:A/D変換部、502:プレフィルタ部、503:直交正弦波発生部、504a、504b:ローパスフィルタ部、505:位相算出部、506:位相連続化処理部、507:境界検出部、508:センタリング処理部、509:形状補正処理部、510:刻印マスク画像作成部、511:欠陥検出処理部   DESCRIPTION OF SYMBOLS 10: Laser apparatus, 20: Rod lens, 30: Delay integration type camera, 40: Timing signal generation part, 50: Image processing apparatus, 60: Display apparatus, 501: A / D conversion part, 502: Pre filter part, 503 : Orthogonal sine wave generation unit, 504a, 504b: low-pass filter unit, 505: phase calculation unit, 506: phase continuation processing unit, 507: boundary detection unit, 508: centering processing unit, 509: shape correction processing unit, 510: Imprint mask image creation unit, 511: Defect detection processing unit

Claims (10)

長尺材のうち、短手方向の端部に湾曲面を有する所定の部位を測定対象部として、
周期的に変調された線状レーザ光を前記長尺材の短手方向に沿って前記測定対象部に照射する照射手段と、
前記測定対象部からの反射光を撮像する遅延積分型の撮像手段とを用いて、
前記線状レーザ光の照射位置を前記長尺材の長手方向に連続的にずらしながら、前記撮像手段により前記測定対象部からの反射光を撮像して光切断画像を得て、前記測定対象部の表面欠陥を検出する表面欠陥検査システムであって、
前記撮像手段から出力される光切断画像に基づいて、前記測定対象部の表面形状を表す形状画像を作成する形状画像作成手段と、
前記形状画像作成手段で作成された形状画像に対して、前記測定対象部の曲面形状を平面に変換する形状補正処理を行う形状補正処理手段と、
前記形状補正処理手段で得られた画像に対して、凹部二値化及び凸部二値化のうち少なくともいずれか一方を行い、ラベリング処理を行うことにより、大きさが既知の刻印を検出して、刻印マスク画像を作成する刻印マスク画像作成手段と、
前記刻印マスク画像作成手段で作成された刻印マスク画像を用いて、前記形状補正処理手段で得られた画像をマスク処理して、前記測定対象部の表面欠陥を検出する欠陥検出処理手段とを備えたことを特徴とする表面欠陥検査システム。
Among long materials, a predetermined part having a curved surface at the end in the short direction is used as a measurement target part.
Irradiation means for irradiating the measurement target portion with periodically modulated linear laser light along the short direction of the long material;
With a delay integration type imaging means for imaging reflected light from the measurement target part,
While continuously shifting the irradiation position of the linear laser light in the longitudinal direction of the long material, the reflected light from the measurement target portion is picked up by the imaging means to obtain a light cut image, and the measurement target portion A surface defect inspection system for detecting surface defects of
A shape image creating means for creating a shape image representing the surface shape of the measurement target part based on the light section image output from the imaging means;
Shape correction processing means for performing shape correction processing for converting the curved surface shape of the measurement target portion into a plane with respect to the shape image created by the shape image creation means;
By performing at least one of concave binarization and convex binarization on the image obtained by the shape correction processing means, and performing a labeling process, a mark having a known size is detected. A marking mask image creating means for creating a marking mask image;
Defect detection processing means for detecting a surface defect of the measurement target portion by masking the image obtained by the shape correction processing means using the marking mask image created by the marking mask image creating means. Surface defect inspection system characterized by that.
前記形状画像作成手段で作成された形状画像において前記測定対象部の表面形状の湾曲度の変化を評価して、前記測定対象部の境界を検出する境界検出手段を備えたことを特徴とする請求項1に記載の表面欠陥検査システム。   2. A boundary detection unit that detects a boundary of the measurement target part by evaluating a change in curvature of the surface shape of the measurement target part in the shape image generated by the shape image generation unit. Item 10. The surface defect inspection system according to Item 1. 前記境界検出手段は、前記形状画像作成手段で作成された形状画像に対して2階差分処理又はラプラシアン演算処理を行い、ピークとなる位置を前記測定対象部の境界として検出することを特徴とする請求項2に記載の表面欠陥検査システム。   The boundary detection unit performs second-order difference processing or Laplacian calculation processing on the shape image created by the shape image creation unit, and detects a peak position as a boundary of the measurement target unit. The surface defect inspection system according to claim 2. 前記刻印マスク画像作成手段は、前記境界検出手段で検出された境界を基準にして定められる所定の領域で前記刻印を検出することを特徴とする請求項2又は3に記載の表面欠陥検査システム。   4. The surface defect inspection system according to claim 2, wherein the marking mask image creating unit detects the marking in a predetermined region determined based on a boundary detected by the boundary detection unit. 5. 前記刻印マスク画像作成手段は、前記形状補正処理手段で得られた画像に対して、凹部二値化及び凸部二値化を行い、更に膨張及び収縮処理を行った上でラベリング処理を行うことにより、前記刻印を検出することを特徴とする請求項1乃至4のいずれか1項に記載の表面欠陥検査システム。   The engraving mask image creating means performs a concave portion binarization and a convex portion binarization on the image obtained by the shape correction processing means, and further performs a labeling process after performing expansion and contraction processing. 5. The surface defect inspection system according to claim 1, wherein the marking is detected by: 前記長尺材はレールであり、
前記測定対象部は前記レールにおける柱部であって、前記柱部は一端で顎下部に繋がり、他端で脚部に繋がることを特徴とする請求項1乃至5のいずれか1項に記載の表面欠陥検査システム。
The long material is a rail,
The said measurement object part is a pillar part in the said rail, Comprising: The said pillar part is connected to a chin lower part at one end, and is connected to a leg part at the other end. Surface defect inspection system.
前記形状画像作成手段は、
前記撮像手段で得られた光切断画像を順に配列することにより得られる縞画像の各位置における位相のずれを算出する位相算出手段と、
前記位相算出手段で得られた位相のずれに基づいて位相のずれが不連続になっている位置を検出し、その検出した位置における位相のずれを繋ぐことにより位相のずれを連続化して、前記測定対象部の表面形状を表す形状画像を作成する位相連続化処理手段とを備えることを特徴とする請求項1乃至6のいずれか1項に記載の表面欠陥検査システム。
The shape image creating means includes:
Phase calculating means for calculating a phase shift at each position of the fringe image obtained by sequentially arranging the light sectioned images obtained by the imaging means;
Detecting the position where the phase shift is discontinuous based on the phase shift obtained by the phase calculation means, and connecting the phase shift at the detected position to make the phase shift continuous, The surface defect inspection system according to claim 1, further comprising a phase continuation processing unit that creates a shape image representing a surface shape of a measurement target portion.
前記形状補正処理手段は、前記形状画像作成手段で作成された形状画像、或いは前記形状画像作成手段で作成された形状画像に所定の処理を施した形状画像に対してフィッティング曲線を求めるフィッティング処理を施し、そのフィッティング曲線と、前記形状画像作成手段で作成された形状画像との差分演算を行い、当該差分演算で得られたデータを、前記長尺材の長手方向について所定の長さだけ平均して、当該平均した値にローパスフィルタ処理を施した値と、前記差分演算で得られたデータとの差分演算を再度行うことを特徴とする請求項1乃至7のいずれか1項に記載の表面欠陥検査システム。   The shape correction processing unit performs a fitting process for obtaining a fitting curve for a shape image created by the shape image creating unit or a shape image obtained by performing a predetermined process on the shape image created by the shape image creating unit. And performing a difference calculation between the fitting curve and the shape image created by the shape image creating means, and averaging the data obtained by the difference calculation by a predetermined length in the longitudinal direction of the long material. The surface according to any one of claims 1 to 7, wherein a difference calculation between a value obtained by performing a low-pass filter process on the averaged value and the data obtained by the difference calculation is performed again. Defect inspection system. 長尺材のうち、短手方向の端部に湾曲面を有する所定の部位を測定対象部として、
周期的に変調された線状レーザ光を前記長尺材の短手方向に沿って前記測定対象部に照射する照射手段と、
前記測定対象部からの反射光を撮像する遅延積分型の撮像手段とを用いて、
前記線状レーザ光の照射位置を前記長尺材の長手方向に連続的にずらしながら、前記撮像手段により前記測定対象部からの反射光を撮像して光切断画像を得て、前記測定対象部の表面欠陥を検出する表面欠陥検査方法であって、
前記撮像手段から出力される光切断画像に基づいて、前記測定対象部の表面形状を表す形状画像を作成する形状画像作成ステップと、
前記形状画像作成ステップで作成された形状画像に対して、前記測定対象部の曲面形状を平面に変換する形状補正処理を行う形状補正処理ステップと、
前記形状補正処理ステップで得られた画像に対して、凹部二値化及び凸部二値化のうち少なくともいずれか一方を行い、ラベリング処理を行うことにより、大きさが既知の刻印を検出して、刻印マスク画像を作成する刻印マスク画像作成ステップと、
前記刻印マスク画像作成ステップで作成された刻印マスク画像を用いて、前記形状補正処理ステップで得られた画像をマスク処理して、前記測定対象部の表面欠陥を検出する欠陥検出処理ステップとを有することを特徴とする表面欠陥検査方法。
Among long materials, a predetermined part having a curved surface at the end in the short direction is used as a measurement target part.
Irradiation means for irradiating the measurement target portion with periodically modulated linear laser light along the short direction of the long material;
With a delay integration type imaging means for imaging reflected light from the measurement target part,
While continuously shifting the irradiation position of the linear laser light in the longitudinal direction of the long material, the reflected light from the measurement target portion is picked up by the imaging means to obtain a light cut image, and the measurement target portion A surface defect inspection method for detecting surface defects of
A shape image creating step for creating a shape image representing the surface shape of the measurement target part based on the light section image output from the imaging means;
A shape correction processing step for performing shape correction processing for converting the curved surface shape of the measurement target portion to a plane with respect to the shape image created in the shape image creation step;
By performing at least one of concave binarization and convex binarization on the image obtained in the shape correction processing step, and performing a labeling process, a mark with a known size is detected. A stamp mask image creating step for creating a stamp mask image;
Using a marking mask image created in the marking mask image creating step, masking the image obtained in the shape correction processing step, and detecting a surface defect in the measurement target portion. A method for inspecting a surface defect.
長尺材のうち、短手方向の端部に湾曲面を有する所定の部位を測定対象部として、
周期的に変調された線状レーザ光を前記長尺材の短手方向に沿って前記測定対象部に照射する照射手段と、
前記測定対象部からの反射光を撮像する遅延積分型の撮像手段とを用いて、
前記線状レーザ光の照射位置を前記長尺材の長手方向に連続的にずらしながら、前記撮像手段により前記測定対象部からの反射光を撮像して光切断画像を得て、前記測定対象部の表面欠陥を検出するためのプログラムであって、
前記撮像手段から出力される光切断画像に基づいて、前記測定対象部の表面形状を表す形状画像を作成する形状画像作成手段と、
前記形状画像作成手段で作成された形状画像に対して、前記測定対象部の曲面形状を平面に変換する形状補正処理を行う形状補正処理手段と、
前記形状補正処理手段で得られた画像に対して、凹部二値化及び凸部二値化のうち少なくともいずれか一方を行い、ラベリング処理を行うことにより、大きさが既知の刻印を検出して、刻印マスク画像を作成する刻印マスク画像作成手段と、
前記刻印マスク画像作成手段で作成された刻印マスク画像を用いて、前記形状補正処理手段で得られた画像をマスク処理して、前記測定対象部の表面欠陥を検出する欠陥検出処理手段としてコンピュータを機能させるためのプログラム。
Among long materials, a predetermined part having a curved surface at the end in the short direction is used as a measurement target part.
Irradiation means for irradiating the measurement target portion with periodically modulated linear laser light along the short direction of the long material;
With a delay integration type imaging means for imaging reflected light from the measurement target part,
While continuously shifting the irradiation position of the linear laser light in the longitudinal direction of the long material, the reflected light from the measurement target portion is picked up by the imaging means to obtain a light cut image, and the measurement target portion A program for detecting surface defects of
A shape image creating means for creating a shape image representing the surface shape of the measurement target part based on the light section image output from the imaging means;
Shape correction processing means for performing shape correction processing for converting the curved surface shape of the measurement target portion into a plane with respect to the shape image created by the shape image creation means;
By performing at least one of concave binarization and convex binarization on the image obtained by the shape correction processing means, and performing a labeling process, a mark having a known size is detected. A marking mask image creating means for creating a marking mask image;
Using a marking mask image created by the marking mask image creating means, masking the image obtained by the shape correction processing means, and a computer as a defect detection processing means for detecting a surface defect of the measurement target portion A program to make it work.
JP2016075404A 2016-04-04 2016-04-04 Surface defect inspection system, method and program Pending JP2017187348A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016075404A JP2017187348A (en) 2016-04-04 2016-04-04 Surface defect inspection system, method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016075404A JP2017187348A (en) 2016-04-04 2016-04-04 Surface defect inspection system, method and program

Publications (1)

Publication Number Publication Date
JP2017187348A true JP2017187348A (en) 2017-10-12

Family

ID=60045524

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016075404A Pending JP2017187348A (en) 2016-04-04 2016-04-04 Surface defect inspection system, method and program

Country Status (1)

Country Link
JP (1) JP2017187348A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019128294A (en) * 2018-01-25 2019-08-01 日本製鉄株式会社 Shape measuring device and shape measuring method
CN111415365A (en) * 2019-01-04 2020-07-14 宁波舜宇光电信息有限公司 Image detection method and device
JP2021032618A (en) * 2019-08-20 2021-03-01 公益財団法人鉄道総合技術研究所 Rail joint gap measurement method
JP2021068451A (en) * 2019-10-25 2021-04-30 ジック アーゲー Camera for detecting object stream and method of measuring height of objects
CN114113107A (en) * 2021-11-18 2022-03-01 万岩铁路装备(成都)有限责任公司 360-degree rail damage identification system and method based on laser scanning
CN114450584A (en) * 2019-09-20 2022-05-06 芝浦机械株式会社 Stack molding system
WO2022103587A3 (en) * 2020-11-09 2022-07-14 Arizona Board Of Regents On Behalf Of The University Of Arizona Determination of a true shape of an object based on transformation of its optical image
CN114789884A (en) * 2022-04-01 2022-07-26 中石化石油机械股份有限公司沙市钢管分公司 Anti-corrosion automatic pipe following device and method based on laser technology
WO2023047866A1 (en) 2021-09-27 2023-03-30 東レ株式会社 Sheet-like material unevenness measuring device, and sheet-like material unevenness measuring method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07103716A (en) * 1993-10-04 1995-04-18 Nkk Corp End position detection method and center position measuring method for end face part
JP2008267836A (en) * 2007-04-16 2008-11-06 Nippon Steel Corp Surface flaw shape detection method for welded part, and computer program
JP2010091514A (en) * 2008-10-10 2010-04-22 Nippon Steel Corp Surface defect inspection system, method and program
JP2011141260A (en) * 2009-12-07 2011-07-21 Kobe Steel Ltd Device and method for inspecting tyre shape

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07103716A (en) * 1993-10-04 1995-04-18 Nkk Corp End position detection method and center position measuring method for end face part
JP2008267836A (en) * 2007-04-16 2008-11-06 Nippon Steel Corp Surface flaw shape detection method for welded part, and computer program
JP2010091514A (en) * 2008-10-10 2010-04-22 Nippon Steel Corp Surface defect inspection system, method and program
JP2011141260A (en) * 2009-12-07 2011-07-21 Kobe Steel Ltd Device and method for inspecting tyre shape

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019128294A (en) * 2018-01-25 2019-08-01 日本製鉄株式会社 Shape measuring device and shape measuring method
CN111415365A (en) * 2019-01-04 2020-07-14 宁波舜宇光电信息有限公司 Image detection method and device
JP2021032618A (en) * 2019-08-20 2021-03-01 公益財団法人鉄道総合技術研究所 Rail joint gap measurement method
JP7101151B2 (en) 2019-08-20 2022-07-14 公益財団法人鉄道総合技術研究所 Rail clearance measurement method
CN114450584A (en) * 2019-09-20 2022-05-06 芝浦机械株式会社 Stack molding system
JP7124030B2 (en) 2019-10-25 2022-08-23 ジック アーゲー Camera for detecting object flow and method for measuring object height
JP2021068451A (en) * 2019-10-25 2021-04-30 ジック アーゲー Camera for detecting object stream and method of measuring height of objects
US11527007B2 (en) 2019-10-25 2022-12-13 Sick Ag Camera for detecting an object stream and method of determining the height of objects
WO2022103587A3 (en) * 2020-11-09 2022-07-14 Arizona Board Of Regents On Behalf Of The University Of Arizona Determination of a true shape of an object based on transformation of its optical image
WO2023047866A1 (en) 2021-09-27 2023-03-30 東レ株式会社 Sheet-like material unevenness measuring device, and sheet-like material unevenness measuring method
CN114113107A (en) * 2021-11-18 2022-03-01 万岩铁路装备(成都)有限责任公司 360-degree rail damage identification system and method based on laser scanning
CN114113107B (en) * 2021-11-18 2024-01-23 万岩铁路装备(成都)有限责任公司 360-degree rail damage identification system and method based on laser scanning
CN114789884A (en) * 2022-04-01 2022-07-26 中石化石油机械股份有限公司沙市钢管分公司 Anti-corrosion automatic pipe following device and method based on laser technology
CN114789884B (en) * 2022-04-01 2023-12-05 中石化石油机械股份有限公司沙市钢管分公司 Corrosion-resistant automatic pipe-tracing device and pipe-tracing method based on laser technology

Similar Documents

Publication Publication Date Title
JP2017187348A (en) Surface defect inspection system, method and program
JP5347418B2 (en) Surface defect inspection system, method and program
JP5194529B2 (en) Surface defect inspection system, method and program
JP5561178B2 (en) Surface defect inspection apparatus, surface defect inspection method, and program
US8452072B2 (en) Method and apparatus for inspecting tire shape
JP5418378B2 (en) Surface defect inspection apparatus, surface defect inspection method, and program
JP7028091B2 (en) Surface defect detection device and surface defect detection method
JP2012002531A (en) Crack detection method
JP5549502B2 (en) Pattern image measuring method and pattern image measuring apparatus
CN113196040A (en) Surface defect detection method, surface defect detection device, steel product manufacturing method, steel product quality management method, steel product manufacturing facility, surface defect determination model generation method, and surface defect determination model
JP3845354B2 (en) Optical shape measuring apparatus and optical shape measuring method
JP4235046B2 (en) Steel plate surface inspection method, system, image processing apparatus, and computer program
JP2016095160A (en) Surface defect detection method and surface defect detection device
JP5347661B2 (en) Belt surface inspection apparatus, surface inspection method, and program
JP7404747B2 (en) Workpiece surface defect detection device and detection method, workpiece surface inspection system and program
JP2002148195A (en) Surface inspection apparatus and surface inspection method
WO2021064893A1 (en) Workpiece surface defect detection device and detection method, workpiece surface inspection system, and program
JP2021056182A (en) Apparatus and method for detecting surface defect of workpiece, surface inspection system for workpiece, and program
JP7010213B2 (en) Cylindrical surface inspection device and cylindrical surface inspection method
Xia et al. High resolution image fusion algorithm based on multi-focused region extraction
JP2016205963A (en) Tire analysis device and tire analysis method
JP2008281493A (en) Surface defect inspection system, method, and program
JP2010085165A (en) Surface inspection device and surface inspection method
KR20030018183A (en) The Apparatus and Method for measuring Width of Steel Sheet with Laser and High Resolution Area Scan CCD Camera
Che et al. 3D measurement of discontinuous objects with optimized dual-frequency grating profilometry

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181206

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191112

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20200526