JP5844718B2 - Image processing method, image processing apparatus, surface inspection system, and program - Google Patents

Image processing method, image processing apparatus, surface inspection system, and program Download PDF

Info

Publication number
JP5844718B2
JP5844718B2 JP2012247004A JP2012247004A JP5844718B2 JP 5844718 B2 JP5844718 B2 JP 5844718B2 JP 2012247004 A JP2012247004 A JP 2012247004A JP 2012247004 A JP2012247004 A JP 2012247004A JP 5844718 B2 JP5844718 B2 JP 5844718B2
Authority
JP
Japan
Prior art keywords
image
trend
image processing
developed
wall side
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2012247004A
Other languages
Japanese (ja)
Other versions
JP2014096020A (en
Inventor
聡 及川
聡 及川
巌謙 大久保
巌謙 大久保
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honda Motor Co Ltd
Original Assignee
Honda Motor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honda Motor Co Ltd filed Critical Honda Motor Co Ltd
Priority to JP2012247004A priority Critical patent/JP5844718B2/en
Publication of JP2014096020A publication Critical patent/JP2014096020A/en
Application granted granted Critical
Publication of JP5844718B2 publication Critical patent/JP5844718B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

この発明は、ワークの内壁側面に対応する画像部位を含む広角画像に対して、所望の画像処理を施すための画像処理方法、画像処理装置、表面検査システム及びプログラムに関する。   The present invention relates to an image processing method, an image processing apparatus, a surface inspection system, and a program for performing desired image processing on a wide-angle image including an image portion corresponding to an inner wall side surface of a workpiece.

従来から、被検査物であるワークの表面を撮像装置で撮像し、得られた撮像画像を解析することで、当該ワークの表面上に傷、凹み等の欠陥部位が存在するか否かを判別する表面検査システム及び方法が開発されている。ところが、表面形状の変形度がごく微小である欠陥部位を検出する際、撮像画像によってその形態が十分に表現(可視化)されず、欠陥部位の存在を見逃すおそれがある。そこで、欠陥部位の検出性又は視認性を一層向上させるための画像処理技術が種々提案されている。   Conventionally, the surface of a workpiece, which is an object to be inspected, is imaged by an imaging device, and the obtained captured image is analyzed to determine whether or not a defective part such as a scratch or a dent exists on the surface of the workpiece Surface inspection systems and methods have been developed. However, when detecting a defective part having a very small degree of deformation of the surface shape, the form is not sufficiently expressed (visualized) by the captured image, and the presence of the defective part may be missed. Therefore, various image processing techniques for further improving the detectability or visibility of a defective part have been proposed.

特許文献1では、明度のグラデーションを有する拡散光をワークの表面に投光し、得られた撮像画像に対して微分処理及び2値化処理を順次施すことで、欠陥部位を自動的に抽出する装置が提案されている。   In Patent Document 1, diffused light having a lightness gradation is projected onto the surface of a workpiece, and a defective portion is automatically extracted by sequentially performing differentiation processing and binarization processing on the obtained captured image. A device has been proposed.

国際公開第2008/123604号パンフレットInternational Publication No. 2008/123604 Pamphlet

ところで、上記した表面検査方法は、車両のボディ等を含む比較的大きな面積を有する外表面のみならず、例えばエンジンのインジェクタ等のように、微細なノズル穴の内壁側面にも適用できる。この検査の際、細い管状の内視鏡を検査対象の位置周辺にアクセスさせ、当該内視鏡の先端部から発せられる補助光を利用した撮像が行われる。なお、補助光を利用する理由は、通常、内壁側面の周辺において外光が遮断されており、撮像のための露光量が不足しているからである。   By the way, the above-described surface inspection method can be applied not only to the outer surface having a relatively large area including the vehicle body and the like, but also to the side surface of the inner wall of the fine nozzle hole such as an injector of an engine. At the time of this inspection, a thin tubular endoscope is accessed around the position to be inspected, and imaging using auxiliary light emitted from the distal end portion of the endoscope is performed. The reason for using the auxiliary light is that the outside light is usually blocked around the side surface of the inner wall, and the exposure amount for imaging is insufficient.

この場合、光の拡散現象により、先端部から離れるにつれて補助光の光量が急激に減衰する傾向がみられる。つまり、得られた撮像画像上には、穴等の空間部の奥行き方向に沿って輝度(信号レベル)が急激に低下する輝度ムラが発生する。その結果、特に奥まった位置における欠陥部位の検出性又は視認性が低下するという問題があった。   In this case, due to the light diffusion phenomenon, the light amount of the auxiliary light tends to attenuate rapidly as the distance from the tip portion increases. That is, luminance unevenness in which the luminance (signal level) rapidly decreases along the depth direction of the space portion such as a hole occurs on the obtained captured image. As a result, there has been a problem that the detectability or visibility of a defective portion at a particularly recessed position is lowered.

しかし、特許文献1に記載された装置では、上記した検査形態を何ら考慮しておらず、奥行き方向に沿った輝度ムラに起因する問題が何ら解決されていない。   However, the apparatus described in Patent Document 1 does not consider the above-described inspection form at all, and does not solve any problems caused by luminance unevenness along the depth direction.

本発明は上記した問題を解決するためになされたもので、ワークの内壁側面を検査する場合であっても、奥まった位置における欠陥部位の検出性又は視認性を向上可能な画像処理方法、画像処理装置、表面検査システム及びプログラムを提供することを目的とする。   The present invention has been made to solve the above-described problem, and an image processing method and an image that can improve the detectability or visibility of a defective part at a recessed position even when inspecting the inner wall side surface of a workpiece. It is an object to provide a processing apparatus, a surface inspection system, and a program.

本発明に係る画像処理方法は、ワークに形成された空間部の奥行き方向に内視鏡を向けた状態下で撮像して得た、前記空間部周辺での前記ワークの内壁側面に対応する画像部位を含む広角画像を入力する入力工程と、入力された前記広角画像に対して幾何学変換を施すことで、前記内壁側面の周方向及び前記奥行き方向を座標軸とする前記内壁側面の展開画像を作成する作成工程と、作成された前記展開画像から、該展開画像に対して前記奥行き方向に沿った第1の平滑化処理及び前記周方向に沿った第2の平滑化処理を順次施して得たトレンドを除去する除去工程とを画像処理装置に実行させることを特徴とする。   The image processing method according to the present invention is an image corresponding to an inner wall side surface of the work around the space, obtained by imaging with the endoscope facing in the depth direction of the space formed in the work. An input step of inputting a wide-angle image including a part; and a developed image of the inner wall side surface with the circumferential direction and the depth direction of the inner wall side surface as coordinate axes by performing geometric transformation on the input wide angle image Obtained by sequentially performing a first smoothing process along the depth direction and a second smoothing process along the circumferential direction on the developed image from the created creation step and the created developed image. The image processing apparatus is caused to execute a removal process for removing the trend.

このように、展開画像から、該展開画像に対して奥行き方向に沿った第1の平滑化処理及び周方向に沿った第2の平滑化処理を順次施して得たトレンドを除去する除去工程では、展開画像上での輝度の遷移方向に沿って、しかも輝度ムラの発生程度が相対的に大きい順に2種類の平滑化処理を施している。換言すれば、輝度ムラの発生傾向を踏まえてトレンドを作成・除去することで、展開画像上における輝度分布を大局的に均一化可能である。これにより、ワークの内壁側面を検査する場合であっても、奥まった位置における欠陥部位の検出性又は視認性を向上できる。   In this way, in the removal step of removing the trend obtained by sequentially performing the first smoothing process along the depth direction and the second smoothing process along the circumferential direction on the developed image from the developed image. Then, two types of smoothing processing are performed in the order in which the degree of occurrence of luminance unevenness is relatively large along the luminance transition direction on the developed image. In other words, the brightness distribution on the developed image can be made uniform globally by creating / removing the trend based on the tendency of uneven brightness. Thereby, even if it is a case where the inner wall side surface of a workpiece | work is test | inspected, the detectability or visibility of the defect site | part in the deep position can be improved.

また、前記第1の平滑化処理は、前記奥行き方向に沿った画素値プロファイルの近似曲線を決定する処理を含むことが好ましい。第1の平滑化処理として近似曲線を用いることで、データの特異点に対する影響を受け難くなる。   The first smoothing process preferably includes a process of determining an approximate curve of a pixel value profile along the depth direction. By using an approximate curve as the first smoothing process, it becomes difficult to be influenced by the singular point of the data.

更に、前記近似曲線は、指数関数であることが好ましい。指数関数を適用することで、実際の画素値プロファイルに精度よく適合できる。   Furthermore, the approximate curve is preferably an exponential function. By applying an exponential function, it is possible to accurately match an actual pixel value profile.

更に、前記近似曲線は、前記画素値プロファイルとの残差絶対値の総和が最小になる前記指数関数であることが好ましい。これにより、データの特異点に対する影響を一層受け難くなり、フィッティング精度も向上する。   Furthermore, it is preferable that the approximate curve is the exponential function that minimizes the sum of residual absolute values with the pixel value profile. This makes it less susceptible to data singularities and improves fitting accuracy.

更に、前記展開画像の前記トレンドを除去して得たトレンド除去画像を前記トレンドに応じて調整する調整工程を更に実行させることが好ましい。これにより、調整後の画像における欠陥部位の検出性又は視認性を一層向上できる。   Furthermore, it is preferable to further execute an adjustment step of adjusting a trend removal image obtained by removing the trend of the developed image according to the trend. Thereby, the detectability or visibility of the defect site | part in the image after adjustment can be improved further.

更に、前記除去工程は、前記展開画像に対して前記第1の平滑化処理を施した後に、前記第2の平滑化処理を更に施すことで前記展開画像のトレンド画像を生成する工程と、前記展開画像から、生成された前記トレンド画像を差し引く工程とを含むことが好ましい。   Further, the removing step includes generating the trend image of the developed image by performing the second smoothing process after performing the first smoothing process on the developed image; It is preferable to include a step of subtracting the generated trend image from the developed image.

更に、前記除去工程は、前記展開画像から、該展開画像に対して前記第1の平滑化処理を施して得た第1平滑化画像を差し引くことで中間画像を生成する工程と、生成された前記中間画像から、該中間画像に対して前記第2の平滑化処理を施して得た第2平滑化画像を差し引く工程とを含むことが好ましい。   Further, the removing step is generated by subtracting a first smoothed image obtained by performing the first smoothing process on the developed image from the developed image, and generating an intermediate image. It is preferable to include a step of subtracting a second smoothed image obtained by performing the second smoothing process on the intermediate image from the intermediate image.

本発明に係る画像処理装置は、ワークに形成された空間部の奥行き方向に内視鏡を向けた状態下で撮像して得た、前記空間部周辺での前記ワークの内壁側面に対応する画像部位を含む広角画像を入力する広角画像入力部と、前記広角画像入力部により入力された前記広角画像に対して幾何学変換を施すことで、前記内壁側面の周方向及び前記奥行き方向を座標軸とする前記内壁側面の展開画像を作成する展開画像作成部と、前記展開画像作成部により作成された前記展開画像から、該展開画像に対して前記奥行き方向に沿った第1の平滑化処理及び前記周方向に沿った第2の平滑化処理を順次施して得たトレンドを除去するトレンド除去部とを有することを特徴とする。   The image processing apparatus according to the present invention is an image corresponding to an inner wall side surface of the work around the space part, which is obtained by capturing an image with the endoscope facing the depth direction of the space part formed in the work. A wide-angle image input unit that inputs a wide-angle image including a part; and a geometric transformation on the wide-angle image input by the wide-angle image input unit, so that the circumferential direction and the depth direction of the inner wall side surface are coordinate axes. A developed image creating unit that creates a developed image of the side surface of the inner wall, a first smoothing process along the depth direction with respect to the developed image from the developed image created by the developed image creating unit, and the And a trend removing unit that removes the trend obtained by sequentially performing the second smoothing process along the circumferential direction.

本発明に係る表面検査システムは、上記した画像処理装置と、前記内視鏡を有し、該内視鏡を介した撮像により前記広角画像を取得する撮像装置とを備えることを特徴とする。   A surface inspection system according to the present invention includes the above-described image processing device and an imaging device that includes the endoscope and acquires the wide-angle image by imaging through the endoscope.

本発明に係るプログラムは、ワークに形成された空間部の奥行き方向に内視鏡を向けた状態下で撮像して得た、前記空間部周辺での前記ワークの内壁側面に対応する画像部位を含む広角画像を入力する入力工程と、入力された前記広角画像に対して幾何学変換を施すことで、前記内壁側面の周方向及び前記奥行き方向を座標軸とする前記内壁側面の展開画像を作成する作成工程と、作成された前記展開画像から、該展開画像に対して前記奥行き方向に沿った第1の平滑化処理及び前記周方向に沿った第2の平滑化処理を順次施して得たトレンドを除去する除去工程とをコンピュータに実行させることを特徴とする。   The program according to the present invention obtains an image portion corresponding to an inner wall side surface of the workpiece around the space portion, which is obtained by imaging in a state where the endoscope is directed in the depth direction of the space portion formed in the workpiece. An input step of inputting a wide-angle image including the image, and a geometric transformation is performed on the input wide-angle image, thereby creating a developed image of the inner wall side surface with the circumferential direction and the depth direction of the inner wall side surface as coordinate axes A trend obtained by sequentially performing a first smoothing process along the depth direction and a second smoothing process along the circumferential direction on the developed image from the created process and the created developed image And a removal step of removing the image.

本発明に係る画像処理方法、画像処理装置、表面検査システム及びプログラムによれば、展開画像から、該展開画像に対して奥行き方向に沿った第1の平滑化処理及び周方向に沿った第2の平滑化処理を順次施して得たトレンドを除去する除去工程では、展開画像上での輝度の遷移方向に沿って、しかも輝度ムラの発生程度が相対的に大きい順に2種類の平滑化処理を施している。換言すれば、輝度ムラの発生傾向を踏まえてトレンドを作成・除去することで、展開画像上における輝度分布を大局的に均一化可能である。これにより、ワークの内壁側面を検査する場合であっても、奥まった位置における欠陥部位の検出性又は視認性を向上できる。   According to the image processing method, the image processing apparatus, the surface inspection system, and the program according to the present invention, the first smoothing process along the depth direction and the second along the circumferential direction are performed on the developed image from the developed image. In the removal step of removing the trend obtained by sequentially performing the smoothing processing, the two types of smoothing processing are performed in the order of the occurrence of luminance unevenness along the transition direction of the luminance on the developed image. Has been given. In other words, the brightness distribution on the developed image can be made uniform globally by creating / removing the trend based on the tendency of uneven brightness. Thereby, even if it is a case where the inner wall side surface of a workpiece | work is test | inspected, the detectability or visibility of the defect site | part in the deep position can be improved.

この実施形態に係る画像処理装置を組み込んだ表面検査システムの構成を示す概略斜視図である。It is a schematic perspective view which shows the structure of the surface inspection system incorporating the image processing apparatus which concerns on this embodiment. 図1に示す画像処理装置の電気的なブロック図である。It is an electrical block diagram of the image processing apparatus shown in FIG. 図1の検査システムの動作説明に供されるフローチャートである。It is a flowchart with which operation | movement description of the test | inspection system of FIG. 1 is provided. 図1に示す内視鏡及びワークの拡大断面図である。FIG. 2 is an enlarged cross-sectional view of the endoscope and workpiece shown in FIG. 1. 図2の広角画像入力部から入力された広角画像を示す図である。It is a figure which shows the wide angle image input from the wide angle image input part of FIG. 図5の広角画像における展開画像を示す図である。It is a figure which shows the expansion | deployment image in the wide angle image of FIG. 図2に示すトレンド除去部の詳細ブロック図である。FIG. 3 is a detailed block diagram of a trend removing unit shown in FIG. 2. 図8A及び図8Bは、図7の第1平滑化処理部の動作に関する概略説明図である。8A and 8B are schematic explanatory diagrams regarding the operation of the first smoothing processing unit in FIG. 図9A及び図9Bは、図7の第1平滑化処理部の動作に関する概略説明図である。9A and 9B are schematic explanatory diagrams regarding the operation of the first smoothing processing unit in FIG. 7. 図10A及び図10Bは、図7の第2平滑化処理部の動作に関する概略説明図である。10A and 10B are schematic explanatory diagrams regarding the operation of the second smoothing processing unit in FIG. 図11A及び図11Bは、図7の第2平滑化処理部の動作に関する概略説明図である。11A and 11B are schematic explanatory diagrams regarding the operation of the second smoothing processing unit in FIG. 図12Aは、元の展開画像における部分拡大図である。図12Bは、従来例に係るトレンド処理を施した後の画像における部分拡大図である。図12Cは、従来例に係る微分処理を施した後の画像における部分拡大図である。図12Dは、本実施形態に係るトレンド除去処理を施した後の画像における部分拡大図である。FIG. 12A is a partially enlarged view of the original developed image. FIG. 12B is a partially enlarged view of the image after the trend processing according to the conventional example is performed. FIG. 12C is a partially enlarged view of the image after performing the differentiation process according to the conventional example. FIG. 12D is a partially enlarged view of the image after the trend removal process according to the present embodiment is performed. 変形例に係るトレンド除去部の詳細ブロック図である。It is a detailed block diagram of the trend removal part which concerns on a modification.

以下、本発明に係る画像処理方法について、これを実施する画像処理装置、表面検査システム及びプログラムとの関係において好適な実施形態を挙げ、添付の図面を参照しながら説明する。   Hereinafter, an image processing method according to the present invention will be described with reference to the accompanying drawings by giving preferred embodiments in relation to an image processing apparatus, a surface inspection system, and a program for executing the image processing method.

[表面検査システム10の構成]
図1は、この実施形態に係る画像処理装置14を組み込んだ表面検査システム10の構成を示す概略斜視図である。
[Configuration of Surface Inspection System 10]
FIG. 1 is a schematic perspective view showing a configuration of a surface inspection system 10 incorporating an image processing apparatus 14 according to this embodiment.

表面検査システム10は、ワークWの表面形状を撮像する撮像装置12と、撮像装置12から出力された撮像信号(図5の広角画像72)に対して所望の画像処理を実行する画像処理装置14とを基本的に備える。   The surface inspection system 10 includes an imaging device 12 that images the surface shape of the workpiece W, and an image processing device 14 that performs desired image processing on the imaging signal (wide-angle image 72 in FIG. 5) output from the imaging device 12. Is basically provided.

画像処理装置14は、本体部16と、入力部18と、表示部20とから構成されたコンピュータである。撮像装置12は、ケーブル22を介して、画像処理装置14の本体部16と通信可能に接続されている。なお、撮像装置12及び画像処理装置14は、ケーブル22での有線通信に代替して、無線により通信可能であってもよい。   The image processing device 14 is a computer that includes a main body unit 16, an input unit 18, and a display unit 20. The imaging device 12 is communicably connected to the main body 16 of the image processing device 14 via a cable 22. Note that the imaging device 12 and the image processing device 14 may be communicable wirelessly instead of wired communication by the cable 22.

撮像装置12は、カメラ本体24、導光ユニット26、内視鏡28、及び補助光源30を備える。例えば、カメラ本体24は、図示しないロボットのアームに把持されており、前記ロボットのアームの駆動に従って撮像装置12の位置・姿勢の変更が自在である。   The imaging device 12 includes a camera body 24, a light guide unit 26, an endoscope 28, and an auxiliary light source 30. For example, the camera body 24 is held by a robot arm (not shown), and the position and posture of the imaging device 12 can be freely changed according to the driving of the robot arm.

カメラ本体24は、入力光像を電気信号に変換するイメージセンサ(撮像素子アレイ)を備える。撮像素子として、例えば、PD(PhotoDiode)、CCD(Charge Coupled Device)、CMOS(Complementary Metal Oxide Semiconductor)等で構成される。カメラ本体24から出力される撮像信号は、モノクロ画像であってもカラー画像であってもよく、解像度の高低(画素サイズの大小)は問わない。   The camera body 24 includes an image sensor (image sensor array) that converts an input light image into an electrical signal. The imaging element is composed of, for example, a PD (PhotoDiode), a CCD (Charge Coupled Device), a CMOS (Complementary Metal Oxide Semiconductor), or the like. The imaging signal output from the camera body 24 may be a monochrome image or a color image, and the resolution may be high or low (pixel size).

導光ユニット26は、補助光源30と内視鏡28との間、又は、内視鏡28とカメラ本体24との間を光学的に接続する。   The light guide unit 26 optically connects between the auxiliary light source 30 and the endoscope 28 or between the endoscope 28 and the camera body 24.

内視鏡28は、細い管形状を有しており、その内部に光学系が組み込まれた工業用ファイバースコープである。本図例では、ワークWの一面32に形成された概略円筒状の空間部34に、内視鏡28の少なくとも先端部36が挿入されている。   The endoscope 28 is an industrial fiberscope having a thin tube shape and an optical system incorporated therein. In this example, at least the distal end portion 36 of the endoscope 28 is inserted into a substantially cylindrical space 34 formed on the one surface 32 of the workpiece W.

補助光源30は、内視鏡28から光像70(図4参照)を取得する際、先端部36の周辺を照明するための補助光66(同図参照)を発する光源である。補助光66は、可視光、紫外線、赤外線のいずれでもよく、ワークWの撮像に適した波長範囲の光であることが好ましい。換言すれば、検出対象に応じて、カメラ本体24(イメージセンサの感度特性)及び補助光源30を種々組み合わせてもよい。   The auxiliary light source 30 is a light source that emits auxiliary light 66 (see FIG. 4) for illuminating the periphery of the distal end portion 36 when acquiring a light image 70 (see FIG. 4) from the endoscope 28. The auxiliary light 66 may be visible light, ultraviolet light, or infrared light, and is preferably light in a wavelength range suitable for imaging the workpiece W. In other words, the camera body 24 (sensitivity characteristics of the image sensor) and the auxiliary light source 30 may be variously combined depending on the detection target.

なお、本図例での空間部34は円筒形状の穴であるが、その形状(断面、深さ等)又はサイズは任意である。また、空間部34の形態は穴に限られず、孔、凹部のいずれであってもよい。   In addition, although the space part 34 in this example is a cylindrical hole, its shape (cross section, depth, etc.) or size is arbitrary. The form of the space 34 is not limited to a hole, and may be either a hole or a recess.

図2は、図1に示す画像処理装置14の電気的なブロック図である。本体部16は、制御部40と、通信I/F42と、表示制御部44と、メモリ46(記憶媒体)とを備える。   FIG. 2 is an electrical block diagram of the image processing apparatus 14 shown in FIG. The main unit 16 includes a control unit 40, a communication I / F 42, a display control unit 44, and a memory 46 (storage medium).

通信I/F42は、外部装置(図1例では撮像装置12)に対して電気信号を送受信するインターフェースである。入力部18は、マウス、トラックボール、キーボード等の種々の入力デバイスで構成される。   The communication I / F 42 is an interface that transmits / receives an electrical signal to / from an external device (the imaging device 12 in the example of FIG. 1). The input unit 18 includes various input devices such as a mouse, a trackball, and a keyboard.

表示制御部44は、制御部40の制御に従って、表示部20を駆動制御する制御回路である。表示制御部44が、図示しないI/Fを介して、表示制御信号を表示部20に出力することで、表示部20が駆動する。これにより、表示部20は各種画像を表示することができる。   The display control unit 44 is a control circuit that drives and controls the display unit 20 according to the control of the control unit 40. The display control unit 44 drives the display unit 20 by outputting a display control signal to the display unit 20 via an I / F (not shown). Thereby, the display unit 20 can display various images.

メモリ46は、制御部40が各構成要素を制御するのに必要なプログラム及びデータ等を記憶している。メモリ46は、不揮発性のメモリ、ハードディスク等を含む、非一過性であって且つコンピュータ読み取り可能な記憶媒体であってよい。   The memory 46 stores programs, data, and the like necessary for the control unit 40 to control each component. The memory 46 may be a non-transitory and computer-readable storage medium including a non-volatile memory, a hard disk, and the like.

制御部40は、CPU(Central Processing Unit)等のプロセッサによって構成されている。制御部40は、メモリ46に格納されたプログラムを読み出し実行することで、広角画像入力部48、展開画像作成部50、トレンド除去部52、欠陥判定部54、及び表示用データ作成部56(画像調整部58を含む)の各機能を実現可能である。   The control unit 40 is configured by a processor such as a CPU (Central Processing Unit). The control unit 40 reads out and executes the program stored in the memory 46, whereby a wide-angle image input unit 48, a developed image creation unit 50, a trend removal unit 52, a defect determination unit 54, and a display data creation unit 56 (images). (Including the adjustment unit 58) can be realized.

[表面検査システム10の動作]
続いて、図1に示す表面検査システム10の動作について、図3のフローチャートを参照しながら詳細に説明する。
[Operation of surface inspection system 10]
Next, the operation of the surface inspection system 10 shown in FIG. 1 will be described in detail with reference to the flowchart of FIG.

ステップS1において、被検査物としてのワークWを準備する。この実施形態では、ワークWの内壁側面38における表面形状を検査する。例えば、ワークWはインジェクタに相当すると共に、空間部34がインジェクタのノズル穴に相当する。   In step S1, a workpiece W as an inspection object is prepared. In this embodiment, the surface shape of the inner wall side surface 38 of the workpiece W is inspected. For example, the workpiece W corresponds to an injector, and the space 34 corresponds to a nozzle hole of the injector.

ステップS2において、内視鏡28及びワークWを相対移動させることで、所定の位置・姿勢下に内視鏡28をセットする。例えば、図示しないロボットのアームにカメラ本体24を把持させ、当該ロボットのアームを駆動させることで内視鏡28を移動させる。そして、空間部34の奥行き方向に先端部36側を向けた状態下に内視鏡28を保持させる。図1例では、少なくとも先端部36が空間部34に挿入されているが、内壁側面38の表面形状を撮像可能であれば、空間部34の外側に内視鏡28をセットしてもよい。   In step S2, the endoscope 28 and the workpiece W are relatively moved to set the endoscope 28 under a predetermined position / posture. For example, the camera body 24 is held by a robot arm (not shown), and the endoscope 28 is moved by driving the robot arm. Then, the endoscope 28 is held in a state where the distal end portion 36 side is directed in the depth direction of the space portion 34. In the example of FIG. 1, at least the distal end portion 36 is inserted into the space portion 34, but the endoscope 28 may be set outside the space portion 34 as long as the surface shape of the inner wall side surface 38 can be imaged.

ステップS3において、撮像装置12を用いて、内壁側面38の表面形状を示す広角画像72(図5参照)を撮像する。   In step S <b> 3, the imaging device 12 is used to capture a wide-angle image 72 (see FIG. 5) that shows the surface shape of the inner wall side surface 38.

図4は、図1に示す内視鏡28及びワークWの拡大断面図である。   FIG. 4 is an enlarged cross-sectional view of the endoscope 28 and the workpiece W shown in FIG.

内視鏡28は、1本の光ファイバーケーブル等からなる第1ライトガイド62と、広視野角に設計された対物レンズ63(広角光学系)と、光ファイバーケーブルの束からなる第2ライトガイド64を備える。   The endoscope 28 includes a first light guide 62 composed of one optical fiber cable or the like, an objective lens 63 (wide angle optical system) designed with a wide viewing angle, and a second light guide 64 composed of a bundle of optical fiber cables. Prepare.

補助光源30からの補助光66は、導光ユニット26及び第1ライトガイド62を介して案内され、先端部36側から外部(空間部34)に放射される。その結果、光の拡散現象により、補助光66の光量は、先端部36周辺で最大になると共に、先端部36からZ軸(奥行き方向)に離れるにつれて急激に減衰する傾向がみられる。なお、参照符号66を付した各矢印は、その幅が広いほど光量が多いことを模式的に示している。   The auxiliary light 66 from the auxiliary light source 30 is guided through the light guide unit 26 and the first light guide 62, and is radiated from the distal end portion 36 side to the outside (space portion 34). As a result, due to the light diffusion phenomenon, the amount of the auxiliary light 66 is maximized around the distal end portion 36 and tends to attenuate rapidly as it moves away from the distal end portion 36 in the Z axis (depth direction). In addition, each arrow which attached | subjected the reference code | symbol 66 has shown typically that there is so much light quantity that the width | variety is wide.

一方、内視鏡28の視野68内に含まれる光は、先端部36側から入射され、対物レンズ63により集光される。ここで、対物レンズ63は、例えば100度以上の広い視野角を有するので、視野68内には内壁側面38の一部が含まれている。なお、対物レンズ63として、視野角が180度前後である魚眼レンズを適用してもよい。   On the other hand, the light included in the field of view 68 of the endoscope 28 enters from the distal end portion 36 side and is collected by the objective lens 63. Here, since the objective lens 63 has a wide viewing angle of, for example, 100 degrees or more, a part of the inner wall side surface 38 is included in the field of view 68. As the objective lens 63, a fish-eye lens having a viewing angle of about 180 degrees may be applied.

集光された光像は、第2ライトガイド64及び導光ユニット26を介して案内され、カメラ本体24のイメージセンサにより電気信号に変換される。その後、この電気信号は、カメラ本体24から撮像信号として出力され、ケーブル22及び通信I/F42を介して、メモリ46に一時的に格納される(図2参照)。   The condensed light image is guided through the second light guide 64 and the light guide unit 26 and is converted into an electric signal by the image sensor of the camera body 24. Thereafter, the electrical signal is output as an imaging signal from the camera body 24 and temporarily stored in the memory 46 via the cable 22 and the communication I / F 42 (see FIG. 2).

例えば、ここで得られた広角画像72はモノクロ画像であり、この画素値は8ビット(256階調)でそれぞれ定義される。そして、画素値が0である場合にその画素は最低レベルの輝度(明るさ)を示すと共に、画素値が255である場合にその画素は最高レベルの輝度(明るさ)を示す。   For example, the wide-angle image 72 obtained here is a monochrome image, and this pixel value is defined by 8 bits (256 gradations). When the pixel value is 0, the pixel shows the lowest level of brightness (brightness), and when the pixel value is 255, the pixel shows the highest level of brightness (brightness).

図5は、図2の広角画像入力部48から入力された広角画像72を示す図である。本図では、輝度のレベルが高い部位(画素値が大きい部位)を白色で表現すると共に、輝度のレベルが低い部位(画素値が小さい部位)を黒色で表現する。以下、図6、図9B、図11B〜図12Dに示す各画像についても同様に定義する。   FIG. 5 is a diagram showing a wide-angle image 72 input from the wide-angle image input unit 48 of FIG. In this figure, a part with a high luminance level (part with a large pixel value) is expressed in white, and a part with a low luminance level (part with a small pixel value) is expressed in black. Hereinafter, the images shown in FIGS. 6, 9B, and 11B to 12D are similarly defined.

本図から理解されるように、広角画像72には、ワークWの内壁側面38に対応する画像部位(白色で描画された部位)が含まれている。図4において内視鏡28の光軸69が空間部34の中心軸に一致する場合、内壁側面38は環状の部位として描画される。   As can be understood from the drawing, the wide-angle image 72 includes an image part (part drawn in white) corresponding to the inner wall side surface 38 of the workpiece W. In FIG. 4, when the optical axis 69 of the endoscope 28 coincides with the central axis of the space portion 34, the inner wall side surface 38 is drawn as an annular portion.

ところで、x軸−y軸は、広角画像72の左上隅を原点とする直交座標軸である。また、z軸−θ軸は、内壁側面38上にある基準位置を原点とする座標軸である。より詳細には、z軸は空間部34の奥行き方向に沿った座標軸であり、θ軸は内壁側面38の周方向に沿った座標軸である。   By the way, the x axis-y axis is an orthogonal coordinate axis with the upper left corner of the wide-angle image 72 as the origin. The z axis-θ axis is a coordinate axis with the reference position on the inner wall side surface 38 as the origin. More specifically, the z axis is a coordinate axis along the depth direction of the space portion 34, and the θ axis is a coordinate axis along the circumferential direction of the inner wall side surface 38.

このようにして、広角画像入力部48は、広角画像72を示す撮像信号をメモリ46から読み出して入力する(ステップS3)。   In this way, the wide-angle image input unit 48 reads out and inputs the imaging signal indicating the wide-angle image 72 from the memory 46 (step S3).

ステップS4において、展開画像作成部50は、ステップS3で取得された広角画像72から内壁側面38の展開画像74を作成する。具体的には、展開画像作成部50は、所定の幾何学変換を施すことで、x軸−y軸座標系で定義された広角画像72を、z軸−θ軸座標系で定義された展開画像74に変換する。この変換を行うため、ワークWの内壁側面38の形状、撮像装置12の位置・姿勢に関する各情報(幾何学情報)を用いることで、広角画像72及び展開画像74の間で厳密にマッピングできる。なお、展開画像作成部50は、図示しない計測手段による計測結果から幾何学情報を取得してもよいし、撮像条件が既知であるとして予め準備された固定値(デフォルト値)を使用してもよい。   In step S4, the developed image creation unit 50 creates a developed image 74 of the inner wall side surface 38 from the wide-angle image 72 acquired in step S3. Specifically, the developed image creating unit 50 performs a predetermined geometric transformation to develop the wide-angle image 72 defined in the x-axis-y-axis coordinate system and the developed image defined in the z-axis-θ axis coordinate system. The image 74 is converted. In order to perform this conversion, each information (geometric information) related to the shape of the inner wall side surface 38 of the workpiece W and the position / posture of the imaging device 12 can be used to accurately map between the wide-angle image 72 and the developed image 74. The developed image creation unit 50 may acquire geometric information from a measurement result by a measurement unit (not shown), or may use a fixed value (default value) prepared in advance as the imaging condition is known. Good.

図6は、図5の広角画像72における展開画像74を示す図である。展開画像74は、空間部34の奥行き方向(z軸)を第1座標軸とし、内壁側面38の周方向(θ軸)を第2座標軸とする二次元画像である。   FIG. 6 is a diagram showing a developed image 74 in the wide-angle image 72 of FIG. The developed image 74 is a two-dimensional image in which the depth direction (z axis) of the space 34 is the first coordinate axis and the circumferential direction (θ axis) of the inner wall side surface 38 is the second coordinate axis.

本図から理解されるように、展開画像74上には、z軸に沿った輝度ムラが発生している。より詳細には、展開画像74の上方(先端部36の近方)ほど輝度が高くなると共に、展開画像74の下方(先端部36の遠方)ほど輝度が低くなる傾向にある。この輝度ムラは、上述した補助光66の減衰に起因する。   As can be understood from the figure, luminance unevenness along the z-axis occurs on the developed image 74. More specifically, the luminance is higher as it is above the developed image 74 (closer to the tip portion 36), and the luminance is lower as it is below the developed image 74 (farther from the tip portion 36). This uneven brightness is caused by the attenuation of the auxiliary light 66 described above.

また、展開画像74上には、θ方向に対して僅かに傾いた筋状の輝度ムラも発生している。これは、内視鏡28の光軸69(図4参照)が、空間部34の中心軸に対し傾いている場合に起こり得る。   In addition, streaky luminance unevenness slightly tilted with respect to the θ direction is also generated on the developed image 74. This can occur when the optical axis 69 (see FIG. 4) of the endoscope 28 is inclined with respect to the central axis of the space portion 34.

ステップS5において、トレンド除去部52は、ステップS4で作成された展開画像74からトレンドを除去する。この「トレンド」は、画像上での大局的な変化傾向を意味し、具体的には、展開画像74に対して平滑化処理を施すことで得られる。本明細書における「平滑化処理」には、展開画像74に対して画像処理を施すことで平滑化する画像処理手法のみならず、展開画像74を所定の近似曲線に適合させる最適化手法を用いてもよい。前者の画像処理手法として、例えば、移動平均、ガウシアンフィルタを含む畳み込み演算、メディアンフィルタ、最大値/最小値フィルタを含む統計的演算、モルフォロジ演算を含む公知の手法を種々適用できる。また、後者の最適化手法として、関数近似演算、フィッティング演算、補間演算、多変量解析を含む公知の手法を種々適用できる。   In step S5, the trend removing unit 52 removes the trend from the developed image 74 created in step S4. This “trend” means a global change tendency on the image, and is specifically obtained by performing a smoothing process on the developed image 74. The “smoothing process” in this specification uses not only an image processing method for smoothing the developed image 74 by performing image processing, but also an optimization method for adapting the developed image 74 to a predetermined approximate curve. May be. As the former image processing technique, for example, various known techniques including moving average, convolution calculation including a Gaussian filter, median filter, statistical calculation including maximum / minimum value filter, and morphology calculation can be applied. As the latter optimization method, various known methods including function approximation calculation, fitting calculation, interpolation calculation, and multivariate analysis can be applied.

図7は、図2に示すトレンド除去部52の詳細ブロック図である。トレンド除去部52は、第1平滑化処理部100と、第2平滑化処理部102と、減算器104とから構成される。以下、各構成要素の機能について、図8A〜図11Bを適宜参照しながら詳細に説明する。   FIG. 7 is a detailed block diagram of the trend removing unit 52 shown in FIG. The trend removing unit 52 includes a first smoothing processing unit 100, a second smoothing processing unit 102, and a subtractor 104. Hereinafter, the function of each component will be described in detail with reference to FIGS. 8A to 11B as appropriate.

図7の第1平滑化処理部100は、入力された展開画像74に対して、z軸に沿った第1の平滑化処理を実行する。図8A〜図9Bは、図7の第1平滑化処理部100の動作に関する概略説明図である。   The first smoothing processing unit 100 in FIG. 7 performs a first smoothing process along the z-axis on the input developed image 74. 8A to 9B are schematic explanatory diagrams regarding the operation of the first smoothing processing unit 100 of FIG.

図8Aに示すように、第1平滑化処理部100は、先ず、画像領域76内に存在する任意の画像列78を抽出する。ここで、図8Bは、画像列78における破線矢印方向に沿った画素値プロファイルの一例である。このグラフの横軸はz軸の位置(画素単位)であり、縦軸は輝度レベル(画素値)である。なお、破線矢印の基端側が「0」側の位置に相当し、先端側が「400」側の位置に相当する。本グラフでは、z軸に対して画素値が徐々に減少する傾向がみられ、図6に示された展開画像74の濃淡の傾向と合致する。   As shown in FIG. 8A, the first smoothing processing unit 100 first extracts an arbitrary image sequence 78 existing in the image region 76. Here, FIG. 8B is an example of the pixel value profile along the direction of the broken line arrow in the image sequence 78. The horizontal axis of this graph is the z-axis position (pixel unit), and the vertical axis is the luminance level (pixel value). The base end side of the broken-line arrow corresponds to the “0” side position, and the tip end side corresponds to the “400” side position. In this graph, there is a tendency that the pixel value gradually decreases with respect to the z-axis, which is consistent with the light and shade tendency of the developed image 74 shown in FIG.

第1平滑化処理部100は、次いで、z軸に沿った画像列78における画素値プロファイルの近似曲線を決定する。本実施形態では、近似曲線として、実際の画素値プロファイルに精度よく適合可能な指数関数を用いる。また、最小にすべき近似誤差の評価値として、SAD(Sum of Absolute Difference;残差絶対値の総和)、SSD(Sum of Squared Difference;残差2乗の総和)等を用いてもよく、評価値はこれらに限られない。特に、データの特異点に対する影響を受け難くするためには、残差の次数が小さいSADを適用することが好ましい。   Next, the first smoothing processing unit 100 determines an approximate curve of the pixel value profile in the image sequence 78 along the z axis. In this embodiment, an exponential function that can be accurately matched to an actual pixel value profile is used as the approximate curve. Further, as an evaluation value of the approximation error to be minimized, SAD (Sum of Absolute Difference), SSD (Sum of Squared Difference), or the like may be used. The value is not limited to these. In particular, in order to make it difficult to be affected by the singular point of data, it is preferable to apply SAD having a small residual order.

その結果、図9Aに示すように、画素値プロファイルとのSADが最小になる指数関数が、近似曲線として作成される。以下同様に、第1平滑化処理部100は、画像列の抽出及び近似関数の作成を遂次実行する。そうすると、図9Bに示すように、近似関数の集合体としての平滑化画像80が得られる。なお、近似関数を作成する際の演算範囲は、図8A例のように画像列毎であってもよいし、複数の画像列に及んでもよい。   As a result, as shown in FIG. 9A, an exponential function that minimizes the SAD with the pixel value profile is created as an approximate curve. In the same manner, the first smoothing processing unit 100 sequentially executes image sequence extraction and approximation function creation. Then, as shown in FIG. 9B, a smoothed image 80 as an aggregate of approximate functions is obtained. Note that the calculation range for creating the approximate function may be for each image sequence as shown in the example of FIG. 8A, or may extend to a plurality of image sequences.

図7の第2平滑化処理部102は、入力された平滑化画像80に対して、θ軸に沿った第2の平滑化処理を実行する。図10A〜図11Bは、図7の第2平滑化処理部102の動作に関する概略説明図である。   The second smoothing processing unit 102 in FIG. 7 performs a second smoothing process along the θ axis on the input smoothed image 80. 10A to 11B are schematic explanatory diagrams regarding the operation of the second smoothing processing unit 102 of FIG.

図10Aに示すように、第2平滑化処理部102は、先ず、画像領域76内に存在する任意の画像列82を抽出する。ここで、図10Bは、画像列82における破線矢印方向に沿った画素値プロファイルの一例である。このグラフの横軸はθ軸の位置(画素単位)であり、縦軸は輝度レベル(画素値)である。本グラフでは、θ軸に対して画素値が規則的(周期的)に変動する傾向がみられる。なお、このプロファイルの各値のばらつき程度は、展開画像74の画像列82におけるプロファイルと比べて大幅に低減されている。これは、輝度ムラの発生程度が相対的に大きいz軸に沿った平滑化処理を先に実行した効果による。   As illustrated in FIG. 10A, the second smoothing processing unit 102 first extracts an arbitrary image sequence 82 present in the image area 76. Here, FIG. 10B is an example of the pixel value profile along the broken line arrow direction in the image sequence 82. The horizontal axis of this graph is the θ-axis position (pixel unit), and the vertical axis is the luminance level (pixel value). In this graph, the pixel values tend to change regularly (periodically) with respect to the θ axis. Note that the degree of variation of each value of the profile is greatly reduced as compared with the profile in the image sequence 82 of the developed image 74. This is due to the effect of performing the smoothing process along the z-axis where the degree of luminance unevenness is relatively large.

第2平滑化処理部102は、次いで、θ軸に沿った画像列82における画素値プロファイルの平滑化曲線を決定する。本実施形態では、平滑化手法として3次スプラインフィッティングを用いる。その結果、図11Aに示す平滑化曲線が作成される。以下同様に、第2平滑化処理部102は、画像列の抽出及び平滑化曲線の作成を遂次実行する。そうすると、図11Bに示すように、平滑化曲線の集合体としてのトレンド画像84が生成される。なお、平滑化曲線を作成する際の演算範囲は、図10A例のように画像列毎であってもよいし、複数の画像列に及んでもよい。   Next, the second smoothing processing unit 102 determines a smoothing curve of the pixel value profile in the image sequence 82 along the θ axis. In the present embodiment, cubic spline fitting is used as a smoothing method. As a result, the smoothing curve shown in FIG. 11A is created. Similarly, the second smoothing processing unit 102 sequentially executes image sequence extraction and smoothing curve creation. Then, as shown in FIG. 11B, a trend image 84 as an aggregate of smoothing curves is generated. Note that the calculation range when creating the smoothing curve may be for each image sequence as in the example of FIG. 10A or may extend over a plurality of image sequences.

図7の減算器104は、展開画像74から、該展開画像74に対して第1及び第2の平滑化処理を順次施して得たトレンド画像84を差し引くことで、トレンド除去画像を生成・出力する。このトレンド除去画像は、z軸及びθ軸における2次元トレンドが除去された画像であり、画素値の平均が概ね0である。このようにして、トレンド除去部52は、展開画像74からトレンドを除去する(ステップS5)。   The subtracter 104 in FIG. 7 generates and outputs a trend-removed image by subtracting a trend image 84 obtained by sequentially performing the first and second smoothing processes on the developed image 74 from the developed image 74. To do. This trend-removed image is an image from which a two-dimensional trend on the z-axis and the θ-axis has been removed, and the average pixel value is approximately zero. In this way, the trend removing unit 52 removes the trend from the developed image 74 (step S5).

ステップS6において、欠陥判定部54は、ステップS5で作成されたトレンド除去画像に対して種々の画像処理を施し、内壁側面38上に欠陥が存在するか否かを判定する。具体的には、欠陥判定部54は、公知のパターン検知処理を用いて、擦り傷、巣穴を含む特定形状の存否及びその強度を判定する。判定基準として、形状、位置のみならず、面積、深さ又は輝度差の許容値を種々設定してもよい。   In step S <b> 6, the defect determination unit 54 performs various image processing on the trend-removed image created in step S <b> 5 and determines whether or not a defect exists on the inner wall side surface 38. Specifically, the defect determination unit 54 determines the presence and strength of a specific shape including an abrasion and a burrow using a known pattern detection process. As a determination criterion, not only the shape and position, but also an allowable value of area, depth, or luminance difference may be set.

ステップS7において、画像調整部58は、ステップS5で作成されたトレンド除去画像に対してブライトネス/コントラスト調整(以下、「B/C調整」という)を行う。具体的には、画像調整部58は、トレンド除去画像の画素毎に、次の(1)式に従って演算することでB/C調整を行う。
O(z,θ)=B+C・R(z,θ)/T(z,θ) ‥‥(1)
In step S7, the image adjustment unit 58 performs brightness / contrast adjustment (hereinafter referred to as “B / C adjustment”) on the trend-removed image created in step S5. Specifically, the image adjustment unit 58 performs B / C adjustment by calculating according to the following equation (1) for each pixel of the trend-removed image.
O (z, θ) = B + C · R (z, θ) / T (z, θ) (1)

ここで、O(z,θ)は、B/C調整後における可視化画像の画素値である。Bはブライトネスであり、可視化画像におけるオフセット値に相当する。Cはコントラストであり、可視化画像の強調度に相当する。R(z,θ)は、トレンド除去画像の画素値である。T(z,θ)は、トレンド画像84の画素値である。すなわち、トレンド除去画像をトレンド画像84(トレンド)に応じて調整することで、調整後の画像における欠陥部位の検出性又は視認性を一層向上できる。   Here, O (z, θ) is the pixel value of the visualized image after B / C adjustment. B is brightness and corresponds to an offset value in the visualized image. C is contrast and corresponds to the enhancement degree of the visualized image. R (z, θ) is a pixel value of the trend-removed image. T (z, θ) is a pixel value of the trend image 84. That is, by adjusting the trend-removed image according to the trend image 84 (trend), it is possible to further improve the detectability or visibility of the defective portion in the adjusted image.

ステップS8において、表示制御部44は、ステップS7で調整された可視化画像を表示部20に表示させる。表示に先立ち、表示用データ作成部56は、画像の表示に供されるデータ(以下、表示用データ)を作成する。この表示用データには、可視化画像のみならず、欠陥判定部54による判定結果(例えば、注釈情報)が含まれる。そして、表示用データ作成部56は、作成した表示用データを表示制御部44に供給する。これにより、ユーザとしての検査員は、表示部20を視認することで、ワークWの内壁側面38の表面形状又はその自動判定結果を把握できる。   In step S8, the display control unit 44 causes the display unit 20 to display the visualized image adjusted in step S7. Prior to the display, the display data creation unit 56 creates data (hereinafter referred to as display data) used for image display. This display data includes not only the visualized image but also the determination result (for example, annotation information) by the defect determination unit 54. Then, the display data creation unit 56 supplies the created display data to the display control unit 44. Thereby, the inspector as a user can grasp | ascertain the surface shape of the inner wall side surface 38 of the workpiece | work W, or its automatic determination result by visually recognizing the display part 20. FIG.

ステップS9において、ワークWの表面形状の検査が終了したか否かを判別する。まだ終了していないと判別された場合、ステップS2に戻って、以下、ステップS2〜S8を順次繰り返す。一方、終了したと判別された場合、表面検査システム10は、ワークWの表面検査を終了した上で、必要に応じてワークWの交換等を行う。   In step S9, it is determined whether or not the inspection of the surface shape of the workpiece W has been completed. If it is determined that the process has not been completed, the process returns to step S2, and steps S2 to S8 are sequentially repeated. On the other hand, when it is determined that the process has been completed, the surface inspection system 10 completes the surface inspection of the work W and then replaces the work W as necessary.

[本発明の効果]
本発明に係る画像処理方法によれば、ワークWに形成された空間部34の奥行き方向(z軸)に内視鏡28を向けた状態下で撮像して得た、空間部34周辺でのワークWの内壁側面38に対応する画像部位を含む広角画像72を入力する入力工程(ステップS3)と、広角画像72に対して幾何学変換を施すことで、内壁側面38の周方向(θ軸)及び奥行き方向(z軸)を座標軸とする内壁側面38の展開画像74を作成する作成工程(ステップS4)と、展開画像74から、該展開画像74に対して奥行き方向(z軸)に沿った第1の平滑化処理及び周方向(θ軸)に沿った第2の平滑化処理を順次施して得たトレンドを除去する除去工程(ステップS5)と、を画像処理装置14に実行させる。
[Effect of the present invention]
According to the image processing method of the present invention, in the vicinity of the space portion 34 obtained by imaging in a state where the endoscope 28 is directed in the depth direction (z axis) of the space portion 34 formed on the workpiece W. An input step (step S3) for inputting a wide-angle image 72 including an image portion corresponding to the inner wall side surface 38 of the work W, and geometrical transformation on the wide-angle image 72 make it possible to obtain a circumferential direction (θ-axis) of the inner wall side surface 38. ) And a development step (step S4) for creating the developed image 74 of the inner wall side surface 38 with the depth direction (z axis) as a coordinate axis, and the developed image 74 along the depth direction (z axis). The image processing apparatus 14 is caused to perform a removal step (step S5) for removing the trend obtained by sequentially performing the first smoothing process and the second smoothing process along the circumferential direction (θ axis).

上記した除去工程では、展開画像74上での輝度の遷移方向に沿って、しかも輝度ムラの発生程度が相対的に大きい順に2種類の平滑化処理を施している。換言すれば、輝度ムラの発生傾向を踏まえてトレンドを作成・除去することで、展開画像74上における輝度分布を大局的に均一化可能である。これにより、ワークWの内壁側面38を検査する場合であっても、奥まった位置における欠陥部位の検出性又は視認性を向上できる。   In the above-described removal process, two types of smoothing processing are performed in the order of relatively large occurrence of luminance unevenness along the luminance transition direction on the developed image 74. In other words, the brightness distribution on the developed image 74 can be globally uniformed by creating and removing the trend based on the tendency of uneven brightness. Thereby, even if it is a case where the inner-wall side surface 38 of the workpiece | work W is test | inspected, the detectability or visibility of the defect site | part in the back position can be improved.

以下、本発明の効果について、実際の可視画像を参照しながら説明する。   Hereinafter, the effect of the present invention will be described with reference to an actual visible image.

図12Aは、元の展開画像74における部分拡大図である。ここで、白色で描画された箇所は、巣穴状の欠陥部位に該当する。   FIG. 12A is a partially enlarged view of the original developed image 74. Here, the portion drawn in white corresponds to a burrow-shaped defect portion.

図12Bは、従来例に係るトレンド除去処理を施した後の画像における部分拡大図である。ここでは、展開画像74に対して2次元の移動平均マスクを施すことでトレンド画像を作成している。図12A及び図12Bを対比すると、図12Bでは、欠陥部位の周辺に白抜けのアーチファクトが多数発生している。その結果、欠陥部位のサイズを誤検出・誤認識するおそれが生じる。   FIG. 12B is a partially enlarged view of the image after the trend removal process according to the conventional example is performed. Here, a trend image is created by applying a two-dimensional moving average mask to the developed image 74. Comparing FIG. 12A and FIG. 12B, in FIG. 12B, many white-out artifacts are generated around the defective part. As a result, the size of the defective part may be erroneously detected and recognized.

図12Cは、従来例に係る微分処理を施した後の画像における部分拡大図である。図12A及び図12Cを対比すると、図12Cでは、表面形状の変形度が十分に大きい欠陥部位の輪郭のみが抽出されている。その結果、許容範囲内である巣穴の存在を画像上で確認できない。   FIG. 12C is a partially enlarged view of the image after performing the differentiation process according to the conventional example. Comparing FIG. 12A and FIG. 12C, in FIG. 12C, only the outline of the defective part having a sufficiently large degree of deformation of the surface shape is extracted. As a result, the presence of a burrow that is within the allowable range cannot be confirmed on the image.

図12Dは、本実施形態に係るトレンド除去処理を施した後の画像における部分拡大図である。図12A〜図12Dを比較すると、図12Dに示す画像の輝度ムラの発生程度が最も小さいので、欠陥部位の視認性が向上する。   FIG. 12D is a partially enlarged view of the image after the trend removal process according to the present embodiment is performed. When comparing FIG. 12A to FIG. 12D, since the degree of occurrence of luminance unevenness in the image shown in FIG. 12D is the smallest, the visibility of the defective portion is improved.

[変形例]
図13は、変形例に係るトレンド除去部106の詳細ブロック図である。トレンド除去部106は、第1平滑化処理部100、第2平滑化処理部102の他、2つの減算器108、110を備える。以下、各構成要素の機能について詳細に説明する。
[Modification]
FIG. 13 is a detailed block diagram of the trend removing unit 106 according to the modification. The trend removing unit 106 includes two subtracters 108 and 110 in addition to the first smoothing processing unit 100 and the second smoothing processing unit 102. Hereinafter, the function of each component will be described in detail.

先ず、第1平滑化処理部100は、入力された展開画像74に対してz軸に沿った第1の平滑化処理を実行することで、平滑化画像80(図9B参照;第1平滑化画像)を得る。第1の平滑化処理の具体的手法については、本実施形態と同様であるため説明を割愛する。   First, the first smoothing processing unit 100 performs a first smoothing process along the z-axis on the input developed image 74 to thereby obtain a smoothed image 80 (see FIG. 9B; first smoothing). Image). Since the specific method of the first smoothing process is the same as that of the present embodiment, the description thereof is omitted.

次いで、減算器108は、展開画像74から、該展開画像74に対して第1の平滑化処理を施して得た平滑化画像80を差し引くことで、中間画像を生成・出力する。この中間画像は、z軸における1次元トレンドが除去された画像である。   Next, the subtractor 108 generates and outputs an intermediate image by subtracting the smoothed image 80 obtained by performing the first smoothing process on the developed image 74 from the developed image 74. This intermediate image is an image from which the one-dimensional trend on the z-axis has been removed.

次いで、第2平滑化処理部102は、入力された中間画像に対してθ軸に沿った第2の平滑化処理を実行することで、第2平滑化画像を得る。第2の平滑化処理の具体的手法については、本実施形態と同様であるため説明を割愛する。   Next, the second smoothing processing unit 102 performs a second smoothing process along the θ axis on the input intermediate image to obtain a second smoothed image. Since the specific method of the second smoothing process is the same as that of the present embodiment, description thereof is omitted.

最後に、減算器110は、中間画像から、該中間画像に対して第2の平滑化処理を施して得た第2平滑化画像を差し引くことで、トレンド除去画像を生成・出力する。このトレンド除去画像は、z軸及びθ軸における2次元トレンドが除去された画像である。   Finally, the subtractor 110 generates and outputs a trend-removed image by subtracting the second smoothed image obtained by performing the second smoothing process on the intermediate image from the intermediate image. This trend-removed image is an image from which a two-dimensional trend on the z-axis and the θ-axis has been removed.

このように、展開画像74のトレンドを2回に分けて除去するようにトレンド除去部106を構成しても、図7のトレンド除去部52と同様の作用効果が得られる。   Thus, even if the trend removing unit 106 is configured to remove the trend of the developed image 74 in two steps, the same effect as the trend removing unit 52 of FIG. 7 can be obtained.

なお、この発明は、上述した実施形態に限定されるものではなく、この発明の主旨を逸脱しない範囲で自由に変更できることは勿論である。   In addition, this invention is not limited to embodiment mentioned above, Of course, it can change freely in the range which does not deviate from the main point of this invention.

10…表面検査システム 12…撮像装置
14…画像処理装置 16…本体部
18…入力部 20…表示部
24…カメラ本体 26…導光ユニット
28…内視鏡 34…空間部
36…先端部 38…内壁側面
40…制御部 46…メモリ
48…広角画像入力部 50…展開画像作成部
52、106…トレンド除去部 58…画像調整部
72…広角画像 74…展開画像
76…画像領域 78、82…画像列
80…平滑化画像 84…トレンド画像
100…第1平滑化処理部 102…第2平滑化処理部
104、108、110…減算器
DESCRIPTION OF SYMBOLS 10 ... Surface inspection system 12 ... Imaging device 14 ... Image processing device 16 ... Main part 18 ... Input part 20 ... Display part 24 ... Camera main body 26 ... Light guide unit 28 ... Endoscope 34 ... Space part 36 ... Tip part 38 ... Inner wall side surface 40 ... control unit 46 ... memory 48 ... wide angle image input unit 50 ... development image creation unit 52, 106 ... trend removal unit 58 ... image adjustment unit 72 ... wide angle image 74 ... development image 76 ... development image 76 ... 82 Column 80 ... smoothed image 84 ... trend image 100 ... first smoothing processing unit 102 ... second smoothing processing unit 104, 108, 110 ... subtractor

Claims (10)

ワークに形成された空間部の奥行き方向に内視鏡を向けた状態下で撮像して得た、前記空間部周辺での前記ワークの内壁側面に対応する画像部位を含む広角画像を入力する入力工程と、
入力された前記広角画像に対して幾何学変換を施すことで、前記内壁側面の周方向及び前記奥行き方向を座標軸とする前記内壁側面の展開画像を作成する作成工程と、
作成された前記展開画像から、該展開画像に対して前記奥行き方向に沿った第1の平滑化処理及び前記周方向に沿った第2の平滑化処理を順次施して得たトレンドを除去する除去工程と
を画像処理装置に実行させることを特徴とする画像処理方法。
Input to input a wide-angle image including an image portion corresponding to the inner wall side surface of the work around the space, obtained by imaging with the endoscope directed in the depth direction of the space formed in the work Process,
A creation step of creating a developed image of the inner wall side surface with the circumferential direction of the inner wall side surface and the depth direction as coordinate axes by performing geometric transformation on the input wide angle image;
Removal that removes a trend obtained by sequentially performing a first smoothing process along the depth direction and a second smoothing process along the circumferential direction on the developed image from the created developed image An image processing method comprising causing an image processing apparatus to execute the steps.
請求項1記載の画像処理方法において、
前記第1の平滑化処理は、前記奥行き方向に沿った画素値プロファイルの近似曲線を決定する処理を含むことを特徴とする画像処理方法。
The image processing method according to claim 1,
The first smoothing process includes a process of determining an approximate curve of a pixel value profile along the depth direction.
請求項2記載の画像処理方法において、
前記近似曲線は、指数関数であることを特徴とする画像処理方法。
The image processing method according to claim 2.
The image processing method, wherein the approximate curve is an exponential function.
請求項3記載の画像処理方法において、
前記近似曲線は、前記画素値プロファイルとの残差絶対値の総和が最小になる前記指数関数であることを特徴とする画像処理方法。
The image processing method according to claim 3.
The image processing method according to claim 1, wherein the approximate curve is the exponential function that minimizes the total sum of residual absolute values with the pixel value profile.
請求項1〜4のいずれか1項に記載の画像処理方法において、
前記展開画像の前記トレンドを除去して得たトレンド除去画像を前記トレンドに応じて調整する調整工程を更に実行させることを特徴とする画像処理方法。
In the image processing method of any one of Claims 1-4,
An image processing method, further comprising an adjustment step of adjusting a trend-removed image obtained by removing the trend of the developed image according to the trend.
請求項1〜5のいずれか1項に記載の画像処理方法において、
前記除去工程は、
前記展開画像に対して前記第1の平滑化処理を施した後に、前記第2の平滑化処理を更に施すことで前記展開画像のトレンド画像を生成する工程と、
前記展開画像から、生成された前記トレンド画像を差し引く工程と
を含むことを特徴とする画像処理方法。
In the image processing method according to any one of claims 1 to 5,
The removal step includes
Generating a trend image of the developed image by further applying the second smoothing process after the first smoothing process is performed on the developed image;
A step of subtracting the generated trend image from the developed image.
請求項1〜5のいずれか1項に記載の画像処理方法において、
前記除去工程に替えて
前記展開画像から、該展開画像に対して前記第1の平滑化処理を施して得た第1平滑化画像を差し引くことで中間画像を生成する工程と、
生成された前記中間画像から、該中間画像に対して前記第2の平滑化処理を施して得た第2平滑化画像を差し引く工程と
前記画像処理装置に実行させることを特徴とする画像処理方法。
In the image processing method according to any one of claims 1 to 5,
Instead of the removal step,
Generating an intermediate image by subtracting a first smoothed image obtained by performing the first smoothing process on the developed image from the developed image;
Subtracting a second smoothed image obtained by performing the second smoothing process on the intermediate image from the generated intermediate image, and causing the image processing apparatus to execute the image processing. Method.
ワークに形成された空間部の奥行き方向に内視鏡を向けた状態下で撮像して得た、前記空間部周辺での前記ワークの内壁側面に対応する画像部位を含む広角画像を入力する広角画像入力部と、
前記広角画像入力部により入力された前記広角画像に対して幾何学変換を施すことで、前記内壁側面の周方向及び前記奥行き方向を座標軸とする前記内壁側面の展開画像を作成する展開画像作成部と、
前記展開画像作成部により作成された前記展開画像から、該展開画像に対して前記奥行き方向に沿った第1の平滑化処理及び前記周方向に沿った第2の平滑化処理を順次施して得たトレンドを除去するトレンド除去部と
を有することを特徴とする画像処理装置。
A wide-angle image for inputting a wide-angle image including an image portion corresponding to the inner wall side surface of the work around the space, obtained by imaging with the endoscope directed in the depth direction of the space formed in the work An image input unit;
A developed image creation unit that creates a developed image of the inner wall side surface using the circumferential direction and the depth direction of the inner wall side surface as coordinate axes by performing geometric transformation on the wide angle image input by the wide angle image input unit. When,
Obtained by sequentially performing a first smoothing process along the depth direction and a second smoothing process along the circumferential direction on the developed image from the developed image created by the developed image creation unit. An image processing apparatus comprising: a trend removing unit that removes the trend.
請求項8記載の画像処理装置と、
前記内視鏡を有し、該内視鏡を介した撮像により前記広角画像を取得する撮像装置と
を備えることを特徴とする表面検査システム。
An image processing apparatus according to claim 8,
A surface inspection system comprising: an imaging device that includes the endoscope and acquires the wide-angle image by imaging through the endoscope.
ワークに形成された空間部の奥行き方向に内視鏡を向けた状態下で撮像して得た、前記空間部周辺での前記ワークの内壁側面に対応する画像部位を含む広角画像を入力する入力工程と、
入力された前記広角画像に対して幾何学変換を施すことで、前記内壁側面の周方向及び前記奥行き方向を座標軸とする前記内壁側面の展開画像を作成する作成工程と、
作成された前記展開画像から、該展開画像に対して前記奥行き方向に沿った第1の平滑化処理及び前記周方向に沿った第2の平滑化処理を順次施して得たトレンドを除去する除去工程と
をコンピュータに実行させることを特徴とするプログラム。
Input to input a wide-angle image including an image portion corresponding to the inner wall side surface of the work around the space, obtained by imaging with the endoscope directed in the depth direction of the space formed in the work Process,
A creation step of creating a developed image of the inner wall side surface with the circumferential direction of the inner wall side surface and the depth direction as coordinate axes by performing geometric transformation on the input wide angle image;
Removal that removes a trend obtained by sequentially performing a first smoothing process along the depth direction and a second smoothing process along the circumferential direction on the developed image from the created developed image A program that causes a computer to execute the process.
JP2012247004A 2012-11-09 2012-11-09 Image processing method, image processing apparatus, surface inspection system, and program Active JP5844718B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012247004A JP5844718B2 (en) 2012-11-09 2012-11-09 Image processing method, image processing apparatus, surface inspection system, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012247004A JP5844718B2 (en) 2012-11-09 2012-11-09 Image processing method, image processing apparatus, surface inspection system, and program

Publications (2)

Publication Number Publication Date
JP2014096020A JP2014096020A (en) 2014-05-22
JP5844718B2 true JP5844718B2 (en) 2016-01-20

Family

ID=50939046

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012247004A Active JP5844718B2 (en) 2012-11-09 2012-11-09 Image processing method, image processing apparatus, surface inspection system, and program

Country Status (1)

Country Link
JP (1) JP5844718B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6579739B2 (en) * 2014-09-18 2019-09-25 株式会社Screenホールディングス Inspection apparatus and substrate processing apparatus

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2905232B2 (en) * 1989-10-13 1999-06-14 九州電力株式会社 Optical inspection equipment for piping
JP3420734B2 (en) * 1999-03-12 2003-06-30 東京都下水道サービス株式会社 Processing method of inside image of sewer
CN1166916C (en) * 1999-03-16 2004-09-15 新日本制铁株式会社 Wall surface observing device
JP4272438B2 (en) * 2003-01-27 2009-06-03 新日本製鐵株式会社 Shading correction method in surface defect inspection apparatus
US9247865B2 (en) * 2006-05-31 2016-02-02 National University Corporation Chiba University Three-dimensional-image forming device, three dimensional-image forming method and program
JP5647878B2 (en) * 2010-05-31 2015-01-07 東北電力株式会社 Steel pipe internal corrosion analysis apparatus and steel pipe internal corrosion analysis method

Also Published As

Publication number Publication date
JP2014096020A (en) 2014-05-22

Similar Documents

Publication Publication Date Title
US11308343B2 (en) Method and device for automatically identifying a point of interest in a depth measurement on a viewed object
KR101604037B1 (en) method of making three dimension model and defect analysis using camera and laser scanning
KR100817656B1 (en) Image processing method, 3-dimension position measuring method, and image processing device
US9013469B2 (en) Method and device for displaying a three-dimensional view of the surface of a viewed object
US8581162B2 (en) Weighting surface fit points based on focus peak uncertainty
JP6865046B2 (en) Methods and devices for automatically identifying points of interest in depth measurement of visible objects
US9074879B2 (en) Information processing apparatus and information processing method
JP2012220496A (en) Method and device for displaying indication of quality of three-dimensional data for surface of viewed object
JP4150390B2 (en) Appearance inspection method and appearance inspection apparatus
JP6478136B1 (en) Endoscope system and operation method of endoscope system
CN109986172B (en) Welding seam positioning method, equipment and system
JP2007285754A (en) Flaw detection method and flaw detector
GB2284048A (en) Method for examining the surface of a workpiece
JP6099115B2 (en) Three-dimensional surface inspection apparatus and three-dimensional surface inspection method
KR101120049B1 (en) Method and Apparatus for Glass Sealant Inspection
JP5844718B2 (en) Image processing method, image processing apparatus, surface inspection system, and program
JP6603709B2 (en) Image processing apparatus, image processing method, and image processing program
JP2005345290A (en) Streak-like flaw detecting method and streak-like flaw detector
CN114964032B (en) Blind hole depth measurement method and device based on machine vision
US11022432B2 (en) Monitoring the scan volume of a 3D scanner
CN109661683B (en) Structured light projection method, depth detection method and structured light projection device based on image content
US11663712B2 (en) Automated turbine blade to shroud gap measurement
JP2016070683A (en) Image processing device, image measurement device, image processing method, image processing program, and method for manufacturing structure
EP3062516A1 (en) Parallax image generation system, picking system, parallax image generation method, and computer-readable recording medium
TW201809592A (en) Automated 3-D measurement

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141127

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150817

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150825

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151013

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20151111

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20151119

R150 Certificate of patent or registration of utility model

Ref document number: 5844718

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250