JP2023152778A - Dimension measuring device, dimension measurement method, dimension measurement program, and pass/fail determining device of welded place - Google Patents

Dimension measuring device, dimension measurement method, dimension measurement program, and pass/fail determining device of welded place Download PDF

Info

Publication number
JP2023152778A
JP2023152778A JP2023033634A JP2023033634A JP2023152778A JP 2023152778 A JP2023152778 A JP 2023152778A JP 2023033634 A JP2023033634 A JP 2023033634A JP 2023033634 A JP2023033634 A JP 2023033634A JP 2023152778 A JP2023152778 A JP 2023152778A
Authority
JP
Japan
Prior art keywords
virtual point
reference line
weld bead
data
point
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
JP2023033634A
Other languages
Japanese (ja)
Inventor
晴輝 江口
Haruki Eguchi
成志 吉田
Shigeji Yoshida
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.)
Panasonic Intellectual Property Management Co Ltd
Original Assignee
Panasonic Intellectual Property Management 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 Panasonic Intellectual Property Management Co Ltd filed Critical Panasonic Intellectual Property Management Co Ltd
Publication of JP2023152778A publication Critical patent/JP2023152778A/en
Pending legal-status Critical Current

Links

Abstract

To provide a dimension measuring device capable of automatically and easily measuring dimensions of a welding bead when a body material and the welding bead are in an optional shape.SOLUTION: A dimension measuring device 20 includes a data acquisition part 1, a bead region extraction part 2, a contour extraction part 3, an end point acquisition part 5, a reference line imparting part 6, and a dimension calculation part 7. The data acquisition part 1 acquires shape data of a body material 100 in which a welding bead 110 is formed. The bead region extraction part 2 and the contour extraction part 3 extract a formation region and contours of the welding bead 110, respectively, and the end point acquisition part 5 acquires an end point of the welding bead 110. The reference line imparting part 6 imparts reference lines to contour data such that a first reference line crosses middle point positions of a plurality of second reference lines within a predetermined angle range with the end point as a starting point. The dimension calculation part 7 calculates a length of the welding bead 110 on the basis of the first reference line, and calculates a width of the welding bead 110 on the basis of the plurality of second reference lines in a plurality of places along the first reference line.SELECTED DRAWING: Figure 1

Description

本開示は、溶接ビードの寸法測定装置及び寸法測定方法並びに寸法測定用プログラム、溶接箇所の良否判定装置に関する。 The present disclosure relates to a weld bead dimension measuring device, a dimension measuring method, a dimension measuring program, and a welding location quality determination device.

溶接箇所(例えば、溶接ビードと当該溶接ビードを含む所定の範囲の母材)に関する外観検査を行うことは、溶接品質を担保するために重要である。外観検査には、穴あきやピット等の形状不良の有無や形状不良の種類等を検査する形状不良検査以外に、溶接ビードの寸法が所望の範囲内にあるか否かを検査する寸法検査がある。 It is important to conduct a visual inspection of a welding location (for example, a weld bead and a predetermined range of base metal including the weld bead) in order to ensure weld quality. In addition to the shape defect inspection, which checks for the presence or absence of shape defects such as holes and pits, and the type of shape defects, the appearance inspection also includes a dimensional inspection to check whether the dimensions of the weld bead are within the desired range. be.

溶接箇所の外観検査について、検査を行う作業者の技量に依存せず、一定の水準で検査を行いたいという要望がある。また、近年、熟練作業者の数が不足しているという問題もある。 Regarding the visual inspection of welded parts, there is a desire to perform the inspection at a certain level without depending on the skill of the worker conducting the inspection. Another problem in recent years is that there is a shortage of skilled workers.

これらの理由から、近年、外観検査の自動化が進められてきている。このうち、寸法検査の自動化、具体的には、溶接ビードの寸法測定の自動化について、種々の技術が提案されている。 For these reasons, automation of visual inspection has been progressing in recent years. Among these, various techniques have been proposed for automating dimensional inspection, specifically automating dimensional measurement of weld beads.

例えば、特許文献1には、レーザ変位計で取得した母材及び溶接ビードの断面形状に対して近似曲線あるいは直線をあてはめ、微分等の数値解析を行うことで、母材における溶接ビードの存在部分を特定したり、溶接ビードの寸法を特定したりする方法が開示されている。 For example, in Patent Document 1, by fitting an approximate curve or a straight line to the cross-sectional shapes of the base metal and weld bead obtained by a laser displacement meter, and performing numerical analysis such as differentiation, the area where the weld bead exists in the base metal is A method is disclosed for specifying the dimensions of a weld bead.

特許文献2には、溶接前の母材の情報を用いて比較形状を作成し、これとの比較により接合部形状を特定する方法が開示されている。 Patent Document 2 discloses a method of creating a comparative shape using information on the base material before welding and identifying the joint shape by comparing with this.

特許文献1,2に開示される従来の方法は、予め、検査手法の開発者が検査ルールや検査条件を定め、しきい値等の各パラメータを準備、設定する。これらの準備されたルールやパラメータ等に基づいて溶接ビードが形成された母材の外観検査を行い、溶接ビードの形成領域や寸法等を特定する方法を、ルールベースによるアプローチと呼ぶことがある。 In the conventional methods disclosed in Patent Documents 1 and 2, a developer of an inspection method determines inspection rules and inspection conditions in advance, and prepares and sets parameters such as threshold values. A method of performing an appearance inspection of a base material on which a weld bead is formed based on these prepared rules and parameters, and identifying the weld bead formation area, dimensions, etc., is sometimes called a rule-based approach.

特開2019-124560号公報Japanese Patent Application Publication No. 2019-124560 特開2010-256326号公報Japanese Patent Application Publication No. 2010-256326

しかし、前述したルールベースによるアプローチでは、予め設定されていないルールでデータを取り扱いたい場合、再度、検査ルールやパラメータの検討と最終的な設定が必要であり、非常に拡張性が低いという欠点がある。例えば、従来、直線状の溶接ビードの検査のみを対象としていたが、曲線状の溶接ビードを検査する必要が生じた場合、検査ルールやパラメータの再検討、再設定が必要となる。また、従来、溶接ビードの検査において、母材として平板のみを対象としていたが、曲面を有する母材に形成された溶接ビードを検査する場合も同様の問題が生じる。また、検査ルールの数が増加するにつれて、検査パラメータ数も増加することが多い。その場合、検査ルールや検査パラメータの設定が煩雑で時間がかかるという問題もある。 However, with the rule-based approach described above, if you want to handle data with rules that have not been set in advance, you need to consider and finalize inspection rules and parameters again, which has the disadvantage of very low scalability. be. For example, in the past, only straight weld beads were inspected, but if it became necessary to inspect curved weld beads, inspection rules and parameters would need to be reconsidered and reset. Further, conventionally, when inspecting weld beads, only a flat plate was inspected as a base material, but similar problems occur when inspecting a weld bead formed on a base material having a curved surface. Furthermore, as the number of inspection rules increases, the number of inspection parameters often also increases. In that case, there is also the problem that setting of inspection rules and inspection parameters is complicated and time-consuming.

本開示はかかる点に鑑みてなされたもので、その目的は、母材や溶接ビードがそれぞれ任意の形状である場合にも、溶接ビードの寸法を自動でかつ簡便に測定できる寸法測定装置及び寸法測定方法並びに寸法測定用プログラム、さらに溶接箇所の良否判定装置を提供することにある。 The present disclosure has been made in view of the above, and an object of the present disclosure is to provide a dimension measuring device and dimension that can automatically and easily measure the dimensions of a weld bead even when the base material and the weld bead have arbitrary shapes. The object of the present invention is to provide a measuring method, a program for measuring dimensions, and a device for determining the quality of welded parts.

本開示に係る寸法測定装置は、母材に形成された溶接ビードの寸法を測定する寸法測定装置であって、前記溶接ビードが形成された前記母材の形状データを取得するデータ取得部と、前記形状データから前記溶接ビードの形成領域をビード領域データとして抽出するビード領域抽出部と、前記ビード領域データに基づいて、前記溶接ビードの輪郭を輪郭データとして抽出する輪郭抽出部と、前記輪郭データに対してスムージング処理を行うスムージング処理部と、スムージング処理された前記輪郭データに基づいて、前記溶接ビードの端点を取得する端点取得部と、前記端点を起点として、前記溶接ビードの長さを測定するための第1基準線と、前記溶接ビードの幅を測定するための複数の第2基準線とを、前記輪郭データに付与する基準線付与部と、前記第1基準線に基づいて前記溶接ビードの長さを算出し、かつ複数の前記第2基準線に基づいて、前記溶接ビードの幅を前記第1基準線に沿った複数個所で算出する寸法算出部と、を少なくとも備え、前記基準線付与部は、前記第1基準線と複数の前記第2基準線の中点位置とが、所定の角度範囲内でそれぞれ交差するように、前記第1基準線と複数の前記第2基準線とを前記輪郭データに付与することを特徴とする。 A dimension measuring device according to the present disclosure is a dimension measuring device that measures the dimensions of a weld bead formed on a base material, and includes a data acquisition unit that acquires shape data of the base material on which the weld bead is formed; a bead area extraction unit that extracts the formation area of the weld bead as bead area data from the shape data; a contour extraction unit that extracts the outline of the weld bead as outline data based on the bead area data; and the outline data. a smoothing processing unit that performs a smoothing process on the contour data; an end point acquisition unit that obtains an end point of the weld bead based on the smoothed contour data; and a length measurement unit that measures the length of the weld bead using the end point as a starting point. a reference line providing unit that provides the contour data with a first reference line for measuring the width of the weld bead and a plurality of second reference lines for measuring the width of the weld bead; at least a dimension calculation unit that calculates the length of the bead and calculates the width of the weld bead at a plurality of locations along the first reference line based on the plurality of second reference lines, The line providing unit connects the first reference line and the plurality of second reference lines so that the first reference line and the plurality of second reference lines intersect each other within a predetermined angular range. is added to the contour data.

本開示に係る寸法測定方法は、母材に形成された溶接ビードの寸法測定方法であって、前記溶接ビードが形成された前記母材の形状データを取得する第1ステップと、前記形状データから前記溶接ビードの形成領域をビード領域データとして抽出する第2ステップと、前記ビード領域データに基づいて、前記溶接ビードの輪郭を輪郭データとして抽出する第3ステップと、前記輪郭データに対してスムージング処理を行う第4ステップと、スムージング処理された前記輪郭データに基づいて、前記溶接ビードの端点を取得する第5ステップと、前記端点を起点として、前記溶接ビードの長さを測定するための第1基準線と、前記溶接ビードの幅を測定するための複数の第2基準線とを、前記輪郭データに付与する第6ステップと、前記第1基準線に基づいて前記溶接ビードの長さを算出し、かつ複数の前記第2基準線に基づいて、前記溶接ビードの幅を前記第1基準線に沿った複数個所で算出する第7ステップと、を少なくとも備え、前記第6ステップでは、前記第1基準線と複数の前記第2基準線の中点位置とが、所定の角度範囲内でそれぞれ交差するように、前記第1基準線と複数の前記第2基準線とを前記輪郭データに付与することを特徴とする。 A dimension measuring method according to the present disclosure is a dimension measuring method of a weld bead formed on a base material, and includes a first step of acquiring shape data of the base material on which the weld bead is formed, and a first step of acquiring shape data of the base material on which the weld bead is formed; a second step of extracting the weld bead formation area as bead area data; a third step of extracting the outline of the weld bead as outline data based on the bead area data; and a smoothing process for the outline data. a fifth step of obtaining an end point of the weld bead based on the smoothed contour data; and a first step of measuring the length of the weld bead starting from the end point. a sixth step of adding a reference line and a plurality of second reference lines for measuring the width of the weld bead to the contour data; and calculating the length of the weld bead based on the first reference line. and a seventh step of calculating the width of the weld bead at a plurality of locations along the first reference line based on the plurality of second reference lines, and in the sixth step, the width of the weld bead is calculated at a plurality of locations along the first reference line. The first reference line and the plurality of second reference lines are added to the contour data so that the first reference line and the plurality of second reference lines intersect each other within a predetermined angular range. It is characterized by

本開示に係る寸法測定用プログラムは、1または複数のプロセッサに、前記寸法測定方法を実行させるための寸法測定用プログラムである。 A dimension measurement program according to the present disclosure is a dimension measurement program for causing one or more processors to execute the dimension measurement method.

本開示に係る溶接箇所の良否判定装置は、前記寸法測定装置と、前記溶接ビードを含む溶接箇所の不良の有無を判定する形状不良判定装置と、を少なくとも備え、前記寸法測定装置の測定結果と、前記形状不良判定装置の判定結果とに基づいて、前記溶接箇所の外観が所定の基準を満足するか否かを判定することを特徴とする。 A welding location quality determination device according to the present disclosure includes at least the dimension measurement device and a shape defect determination device that determines whether or not there is a defect in the welding location including the weld bead, and includes a measurement result of the dimension measurement device. , it is characterized in that it is determined whether the appearance of the welded area satisfies a predetermined standard based on the determination result of the shape defect determination device.

本開示によれば、母材や溶接ビードがそれぞれ任意の形状である場合にも、溶接ビードの寸法を自動でかつ簡便に測定することができる。 According to the present disclosure, even when the base material and the weld bead have arbitrary shapes, the dimensions of the weld bead can be automatically and easily measured.

実施形態1に係る寸法測定装置の機能ブロック図である。1 is a functional block diagram of a dimension measuring device according to Embodiment 1. FIG. 寸法測定装置のハードウェア構成の模式図である。FIG. 2 is a schematic diagram of the hardware configuration of the dimension measuring device. 外観検査装置による溶接ビードの形状データ取得の様子を示す模式図である。FIG. 3 is a schematic diagram showing how shape data of a weld bead is acquired by the appearance inspection device. 溶接ビードの寸法測定手順を示すフローチャートである。It is a flowchart which shows the dimension measurement procedure of a weld bead. スムージング処理時及び端点取得時の溶接ビードの輪郭を示す模式図である。FIG. 6 is a schematic diagram showing the outline of a weld bead during smoothing processing and end point acquisition. 溶接ビードの形成領域抽出手順を示すフローチャートである。3 is a flowchart showing a procedure for extracting a weld bead formation area. 形状データの画像及び形状データにおける溶接ビードの形成領域とそれ以外の領域とを示す図である。FIG. 3 is a diagram showing an image of shape data and a weld bead formation region and other regions in the shape data. 学習データ生成用のアノテーション付与手順を示すフローチャートである。It is a flowchart which shows the annotation addition procedure for learning data generation. 形状データにアノテーションを付与する様子を示す一例である。This is an example showing how annotations are added to shape data. アノテーション付与後の形状データの画像を示す一例である。This is an example showing an image of shape data after being annotated. 第1基準線及び第2基準線の付与手順を示すフローチャートである。It is a flowchart which shows the provision procedure of a 1st reference line and a 2nd reference line. 第1基準線及び第2基準線を付与する際の第1ループ処理の様子を示す模式図である。FIG. 6 is a schematic diagram showing a state of first loop processing when providing a first reference line and a second reference line. 図11Aに示す処理に続く処理の様子を示す模式図である。FIG. 11A is a schematic diagram showing a process subsequent to the process shown in FIG. 11A. 図11Bに示す処理に続く処理の様子を示す模式図である。FIG. 11B is a schematic diagram showing a process subsequent to the process shown in FIG. 11B. 第1基準線及び第2基準線を付与する際の第2ループ処理の様子を示す模式図である。FIG. 7 is a schematic diagram showing a second loop process when providing a first reference line and a second reference line. 第1基準線の補正手順を示すフローチャートである。7 is a flowchart showing a procedure for correcting the first reference line. 補正を行わない場合の第1基準線が付与された輪郭データの一例である。This is an example of contour data provided with a first reference line when no correction is performed. 補正を行わない場合の第1基準線が付与された別の輪郭データの一例である。This is an example of another contour data provided with a first reference line when no correction is performed. 第1基準線を仮基準線に変形した場合の輪郭データの一例である。This is an example of contour data when the first reference line is transformed into a temporary reference line. 第1基準線を仮基準線に変形した場合の別の輪郭データの一例である。This is another example of contour data when the first reference line is transformed into a temporary reference line. 補正が完了した後の第1基準線が付与された輪郭データの一例である。This is an example of contour data to which a first reference line has been added after correction has been completed. 補正が完了した後の第1基準線が付与された別の輪郭データの一例である。This is an example of another contour data to which the first reference line has been added after the correction has been completed. 実施形態2に係る溶接箇所の良否判定装置の機能ブロック図である。FIG. 3 is a functional block diagram of a welding location quality determination device according to a second embodiment.

以下、本開示の実施形態を図面に基づいて説明する。なお、以下の好ましい実施形態の説明は、本質的に例示に過ぎず、本開示、その適用物或いはその用途を制限することを意図するものではない。 Embodiments of the present disclosure will be described below based on the drawings. Note that the following description of preferred embodiments is essentially just an example, and is not intended to limit the present disclosure, its applications, or its uses.

(実施形態1)
[1:溶接ビードの寸法測定装置の構成]
図1は、本実施形態に係る寸法測定装置の機能ブロック図を示し、図2は、寸法測定装置のハードウェア構成の模式図を示す。
(Embodiment 1)
[1: Configuration of weld bead dimension measuring device]
FIG. 1 shows a functional block diagram of a dimension measuring device according to this embodiment, and FIG. 2 shows a schematic diagram of the hardware configuration of the dimension measuring device.

図1に示すように、寸法測定装置20は、データ取得部1とビード領域抽出部2と輪郭抽出部3とスムージング処理部4とを少なくとも備えている。また、寸法測定装置20は、端点取得部5と基準線付与部6と寸法算出部7とを備えている。また、寸法測定装置20は、記憶部8と表示部9とを備えている。 As shown in FIG. 1, the dimension measuring device 20 includes at least a data acquisition section 1, a bead area extraction section 2, a contour extraction section 3, and a smoothing processing section 4. The dimension measurement device 20 also includes an end point acquisition section 5, a reference line provision section 6, and a dimension calculation section 7. The dimension measuring device 20 also includes a storage section 8 and a display section 9.

データ取得部1は、外観検査装置30(図3参照)から溶接ビード110(図3参照)が形成された母材100(図3参照)の形状データ(以下、単に形状データという)を取得する。なお、図1では、外観検査装置30からデータ取得部1に形状データが直接入力される例を示したが、特にこれに限定されない。例えば、寸法測定装置20の外部に設けられた、図示しない記憶部に形状データが保存されており、データ取得部1が当該記憶部から形状データを取得するようにしてもよい。 The data acquisition unit 1 acquires shape data (hereinafter simply referred to as shape data) of the base material 100 (see FIG. 3) on which the weld bead 110 (see FIG. 3) is formed from the appearance inspection device 30 (see FIG. 3). . Although FIG. 1 shows an example in which shape data is directly input from the visual inspection device 30 to the data acquisition unit 1, the present invention is not particularly limited to this. For example, the shape data may be stored in a storage section (not shown) provided outside the dimension measuring device 20, and the data acquisition section 1 may acquire the shape data from the storage section.

ビード領域抽出部2は、形状データから溶接ビード110の形成領域をビード領域データとして抽出する。言い換えると、ビード領域抽出部2は、形状データから溶接ビード110の形成領域をビード領域データとして、高さ情報を含まない二次元データ形式で抽出する。これにより、シンプルな二次元データ形式で、溶接ビードの長さ、溶接ビードの幅を抽出するためのビード領域データ抽出することができる。ビード領域データ抽出に機械学習(深層学習)を用いて行うため、従来方式のような溶接ビード長さや溶接ビード幅を計測するための、溶接方式(アーク溶接、レーザ溶接、など)、溶接継ぎ手(重ね、突き合わせ、など)、溶接ビード形状(直線、曲線など)等に応じて、種々の設定(各種基準値の微妙なパラメータ設定)が不要である。このため、溶接ビード領域を容易に抽出可能で、新規のユーザであっても操作に対する親和性を非常に高くすることができる。なお、ビード領域データの抽出方法については後で述べる。 The bead region extraction unit 2 extracts the formation region of the weld bead 110 from the shape data as bead region data. In other words, the bead region extraction unit 2 extracts the formation region of the weld bead 110 from the shape data as bead region data in a two-dimensional data format that does not include height information. As a result, bead area data for extracting the weld bead length and weld bead width can be extracted in a simple two-dimensional data format. Machine learning (deep learning) is used to extract bead area data, so welding methods (arc welding, laser welding, etc.), welding joints ( There is no need for various settings (delicate parameter settings for various reference values) depending on the weld bead shape (straight line, curve, etc.), etc. Therefore, the weld bead region can be easily extracted, and even a new user can have a very high affinity for operation. Note that a method for extracting bead area data will be described later.

輪郭抽出部3は、ビード領域データに基づいて、溶接ビード110の輪郭を輪郭データとして抽出する。輪郭データの抽出方法については後で述べる。 The contour extraction unit 3 extracts the contour of the weld bead 110 as contour data based on the bead area data. A method for extracting contour data will be described later.

スムージング処理部4は、輪郭データに対してスムージング処理を行う。 The smoothing processing unit 4 performs smoothing processing on the contour data.

端点取得部5は、スムージング処理された輪郭データに基づいて、溶接ビード110の端点(以下、単に端点と呼ぶことがある。)を取得する。なお、後で述べるように、端点は、溶接ビード110の輪郭上において、複数取得されてもよい。 The end point obtaining unit 5 obtains end points (hereinafter sometimes simply referred to as end points) of the weld bead 110 based on the smoothed contour data. Note that, as described later, a plurality of end points may be obtained on the outline of the weld bead 110.

基準線付与部6は、端点を起点として、溶接ビード110の長さを測定するための第1基準線と、溶接ビード110の幅を測定するための複数の第2基準線とを、輪郭データに付与する。第1基準線と、複数の第2基準線のそれぞれの中点位置とは、所定の角度範囲内でそれぞれ交差するものとする。なお、後で述べるように、第2基準線は、溶接ビード110の輪郭に沿って第1距離(等距離)毎に、第1基準線と所定の角度範囲内で交差するように複数本、付与される。ここで、第2基準線は、溶接ビード110の少なくともいずれか片側の輪郭に沿ってかつ第1距離で、第1基準線と複数の第2基準線の中点位置とが、所定の角度範囲内でそれぞれ交差するように、第2基準線が交差する溶接ビード110の両側の輪郭上の2点が順次移動しながら、付与される。このようにすることで、任意のビード領域データの複雑なビード領域データ、例えば異なる複数の曲線の連続を含む溶接ビード110の形成領域であるビード領域データに対し、第1基準線と、第1基準線にそれぞれ交差する複数の第2基準線とを容易に付与することができる。なお、第1距離は、複数種類の等間隔の距離で構成されてもよい。また、具体的な第1基準線や第2基準線の付与方法については、後で述べる。 The reference line providing unit 6 creates a first reference line for measuring the length of the weld bead 110 and a plurality of second reference lines for measuring the width of the weld bead 110, starting from the end point, based on contour data. granted to. It is assumed that the first reference line and the midpoint position of each of the plurality of second reference lines intersect within a predetermined angular range. Note that, as described later, a plurality of second reference lines are arranged along the outline of the weld bead 110 at every first distance (equidistant) so as to intersect the first reference line within a predetermined angle range. Granted. Here, the second reference line is located along the contour of at least one side of the weld bead 110 at a first distance, and the midpoint position of the first reference line and the plurality of second reference lines is within a predetermined angular range. The two points on the contour on both sides of the weld bead 110 where the second reference line intersects are sequentially moved so as to intersect within the two points. By doing so, the first reference line and the first A plurality of second reference lines that intersect each reference line can be easily provided. Note that the first distance may be composed of a plurality of types of equally spaced distances. Further, a specific method of providing the first reference line and the second reference line will be described later.

なお、本願明細書において、「所定の角度範囲」とは、90°±δ(°)であり、δは予め設定された固定値である。δは、例えば、5(°)に設定される。 Note that in this specification, the "predetermined angular range" is 90°±δ (°), where δ is a preset fixed value. For example, δ is set to 5 (°).

寸法算出部7は、第1基準線に基づいて溶接ビード110の長さを算出する。さらに、寸法測定部は、複数の第2基準線に基づいて、溶接ビード110の幅を第1基準線に沿った複数個所で算出する。なお、算出された溶接ビード110の複数個所の幅に関する統計量も寸法算出部7で算出される。統計量として、例えば、最大値、最小値、平均値、分散等が挙げられる。 The dimension calculation unit 7 calculates the length of the weld bead 110 based on the first reference line. Furthermore, the dimension measurement unit calculates the width of the weld bead 110 at multiple locations along the first reference line based on the plurality of second reference lines. Note that the dimension calculation unit 7 also calculates statistics regarding the calculated widths of the weld bead 110 at multiple locations. Examples of statistics include maximum value, minimum value, average value, variance, and the like.

記憶部8は、溶接ビード110の寸法測定方法を記述した寸法測定用プログラムを保存する。また、記憶部8は、溶接ビード110の寸法測定結果を保存する。記憶部8は、データ取得部1で取得された形状データを一時的に保存してもよい。また、後で述べるように、ビード領域抽出部2は、形状データから溶接ビードの形成領域を示すビード領域データを抽出するにあたって、学習データを用いて機械学習(深層学習)を行う。 The storage unit 8 stores a dimension measurement program that describes a method for measuring the dimensions of the weld bead 110. Furthermore, the storage unit 8 stores the dimensional measurement results of the weld bead 110. The storage unit 8 may temporarily store the shape data acquired by the data acquisition unit 1. Furthermore, as will be described later, the bead region extraction unit 2 performs machine learning (deep learning) using learning data when extracting bead region data indicating a weld bead formation region from the shape data.

表示部9は、形状データやビード領域データを二次元または三次元の画像データとして表示する。また、表示部9は、第1基準線や第2基準線が付与される前後の輪郭データを表示する。表示部9は、寸法測定結果を数値または表形式で表示してもよい。あるいは、表示部9は、寸法測定結果を第1基準線や第2基準線が付与された後の輪郭データに付与する形で表示してもよい。また、複数の溶接ビード110に関し、寸法測定結果を表示する場合、表示部9は、グラフ形式で当該結果を表示してもよい。 The display unit 9 displays shape data and bead area data as two-dimensional or three-dimensional image data. Furthermore, the display unit 9 displays contour data before and after the first reference line and the second reference line are provided. The display unit 9 may display the dimensional measurement results in numerical values or tabular form. Alternatively, the display unit 9 may display the dimension measurement results in a form that is added to the contour data after the first reference line and the second reference line have been added. Further, when displaying the dimensional measurement results regarding the plurality of weld beads 110, the display unit 9 may display the results in a graph format.

学習データ生成部10は、ビード領域データを抽出するのに用いられる学習データを生成する。記憶部8は、この場合の学習データを保存するようにしてもよい。なお、記憶部8と表示部9と学習データ生成部10とは、寸法測定装置20の外部に設けられてもよい。 The learning data generation unit 10 generates learning data used to extract bead area data. The storage unit 8 may store learning data in this case. Note that the storage section 8, the display section 9, and the learning data generation section 10 may be provided outside the dimension measuring device 20.

図2に示す寸法測定装置20のハードウェア構成は、公知のパーソナルコンピュータ(PC)の構成と同様である。つまり、寸法測定装置20は、ハードウェアとして、入力ポート21とCPU(Central Processing Unit)22とGPU(Graphics Processing Unit)23とRAM(Random Access Memory)/ROM(Read Only Memory)24と出力ポート25とデータバス26とを少なくとも備えている。 The hardware configuration of the dimension measuring device 20 shown in FIG. 2 is similar to that of a known personal computer (PC). In other words, the dimension measuring device 20 includes, as hardware, an input port 21, a CPU (Central Processing Unit) 22, a GPU (Graphics Processing Unit) 23, a RAM (Random Access Memory)/ROM (Read Only Memory) 24, and an output port 25. and a data bus 26.

図1に示す寸法測定装置20内の複数の機能ブロックは、図2に示す各種デバイスに対応している。例えば、RAM/ROM24は、図1に示す記憶部8に対応している。入力ポート21は、図1に示すデータ取得部1に対応している。また、寸法測定装置20は、図1に示す表示部9としてディスプレイ27を備えている。 A plurality of functional blocks in the dimension measuring device 20 shown in FIG. 1 correspond to various devices shown in FIG. 2. For example, the RAM/ROM 24 corresponds to the storage section 8 shown in FIG. The input port 21 corresponds to the data acquisition section 1 shown in FIG. The dimension measuring device 20 also includes a display 27 as the display section 9 shown in FIG.

なお、寸法測定装置20は、入力デバイスとしてキーボードやタッチパネル(いずれも図示せず)を備えていてもよい。また、ディスプレイ27をタッチパネルとし、入力デバイスとして利用してもよい。また、寸法測定装置20は、図1に示す記憶部8として、RAM/ROM24以外にHDD(Hard Disk Drive)やSSD(Solid State Drive)を備えていてもよい。 Note that the dimension measuring device 20 may include a keyboard or a touch panel (both not shown) as an input device. Further, the display 27 may be a touch panel and may be used as an input device. Further, the dimension measuring device 20 may include an HDD (Hard Disk Drive) or an SSD (Solid State Drive) in addition to the RAM/ROM 24 as the storage unit 8 shown in FIG.

なお、図1に示すビード領域抽出部2と輪郭抽出部3と端点取得部5と基準線付与部6と寸法算出部7のそれぞれの機能は、GPU23またはCPU22において、記憶部8に保存された寸法測定用プログラムを実行することで実現される。なお、ビード領域抽出部2の機能、つまり、形状データから溶接ビード110の形成領域を抽出する機能は、GPU23において寸法測定用プログラムの一部を実行することで実現される。それ以外の機能に関しては、GPU23において寸法測定用プログラムを実行して実現してもよいし、あるいはCPU22において寸法測定用プログラムを実行して実現してもよい。また、学習データ生成部10の機能は、GPU23またはCPU22において、寸法測定用プログラムとは別のプログラムを実行することで実現される。 Note that the respective functions of the bead area extraction section 2, contour extraction section 3, end point acquisition section 5, reference line provision section 6, and dimension calculation section 7 shown in FIG. This is achieved by running a dimension measurement program. Note that the function of the bead area extraction unit 2, that is, the function of extracting the formation area of the weld bead 110 from the shape data, is realized by executing a part of the dimension measurement program in the GPU 23. Other functions may be realized by executing a dimension measurement program in the GPU 23 or by executing a dimension measurement program in the CPU 22. Further, the functions of the learning data generation unit 10 are realized by executing a program different from the dimension measurement program in the GPU 23 or the CPU 22.

なお、GPU23とCPU22を総称して、プロセッサと呼ぶことがある。寸法測定装置20は1個のプロセッサ(GPU23またはCPU22)を有していてもよい。ただし、寸法測定装置20は、複数個のプロセッサ(GPU23とCPU22、また、それぞれが複数個あってもよい。)を有するのが、データの処理速度向上の観点から好ましい。 Note that the GPU 23 and the CPU 22 may be collectively referred to as a processor. The dimension measuring device 20 may have one processor (GPU 23 or CPU 22). However, it is preferable that the dimension measuring device 20 has a plurality of processors (GPU 23 and CPU 22, each of which may have a plurality of processors) from the viewpoint of improving data processing speed.

なお、図2では、1本のデータバス26に各種デバイスが接続された例を示しているが、通常のPCと同様に、複数のデータバス26が用途に応じて設けられていてもよい。 Although FIG. 2 shows an example in which various devices are connected to one data bus 26, a plurality of data buses 26 may be provided depending on the purpose, as in a normal PC.

[2:溶接ビードの寸法測定手順]
図3は、外観検査装置による溶接ビードの形状データ取得の様子を示す模式図であり、図4は、溶接ビードの寸法測定手順を示すフローチャートである。図5は、スムージング処理時及び端点取得時の溶接ビードの輪郭を示す模式図である。
[2: Weld bead dimension measurement procedure]
FIG. 3 is a schematic diagram showing how the appearance inspection device acquires shape data of a weld bead, and FIG. 4 is a flowchart showing a procedure for measuring dimensions of a weld bead. FIG. 5 is a schematic diagram showing the outline of a weld bead during smoothing processing and end point acquisition.

図3に示すように、外観検査装置30は、三次元形状計測センサ31がロボット32に取り付けられて構成され、母材100に形成された溶接ビード110の形状を計測する。なお、三次元形状計測センサ31は、ロボット32に保持された溶接ヘッド(図示せず)に取り付けられてもよい。なお、溶接ヘッドとは、母材100に溶接のためのエネルギーを供給するエネルギー供給部にあたり、例えば、溶接トーチやレーザヘッドをいう。 As shown in FIG. 3, the appearance inspection device 30 is configured by a three-dimensional shape measurement sensor 31 attached to a robot 32, and measures the shape of a weld bead 110 formed on a base material 100. Note that the three-dimensional shape measurement sensor 31 may be attached to a welding head (not shown) held by the robot 32. Note that the welding head corresponds to an energy supply unit that supplies energy for welding to the base material 100, and refers to, for example, a welding torch or a laser head.

三次元形状計測センサ31は、母材100の表面を走査可能に構成されたレーザ光源(図示せず)と、母材100の表面に投影されたレーザ光線の反射軌跡を撮像するカメラまたは受光センサ(いずれも図示せず)とで構成されている。なお、カメラは撮像素子としてCCDまたはCMOSイメージセンサを有している。また、三次元形状計測センサ31の構成は特に上記に限定されず、他の構成を採りうる。例えば、カメラや受光センサの代わりに光干渉計を用いてもよい。 The three-dimensional shape measurement sensor 31 includes a laser light source (not shown) that is configured to scan the surface of the base material 100 and a camera or a light receiving sensor that images the reflection locus of the laser beam projected onto the surface of the base material 100. (none of which are shown). Note that the camera has a CCD or CMOS image sensor as an image sensor. Further, the configuration of the three-dimensional shape measurement sensor 31 is not particularly limited to the above, and other configurations may be adopted. For example, an optical interferometer may be used instead of a camera or a light receiving sensor.

三次元形状計測センサ31によって、溶接ビード110及びその周囲の母材100をレーザ光線で走査し、溶接ビード110や母材100で反射されたレーザ光線をカメラまたは受光センサで撮像することにより、溶接ビード110及びその周囲の母材100の三次元形状、つまり、形状データが取得される。 The three-dimensional shape measurement sensor 31 scans the weld bead 110 and the surrounding base material 100 with a laser beam, and the laser beam reflected by the weld bead 110 and the base material 100 is imaged by a camera or a light receiving sensor, thereby performing welding. The three-dimensional shape of the bead 110 and the surrounding base material 100, that is, the shape data is acquired.

なお、三次元形状計測センサ31で取得される形状データには、位置情報だけでなく色情報も含まれていてもよい。また、三次元形状計測センサ31の撮像素子または受光センサがカラー画像または白黒画像を取得する場合、各画素には、位置情報と色情報または距離情報とが含まれる。つまり、形状データを構成する各画素のデータ、つまり、画素データには、位置情報と色情報、または位置情報と距離情報、あるいは位置情報と色情報と距離情報とが含まれる。 Note that the shape data acquired by the three-dimensional shape measurement sensor 31 may include not only position information but also color information. Further, when the image sensor or the light receiving sensor of the three-dimensional shape measurement sensor 31 acquires a color image or a monochrome image, each pixel includes position information and color information or distance information. That is, the data of each pixel constituting the shape data, that is, the pixel data, includes position information and color information, or position information and distance information, or position information, color information, and distance information.

ここで、「位置情報」とは、母材100の表面における所定の位置を原点とする二次元の座標情報である。例えば、母材100の表面と平行な任意の方向をX方向とし、母材100の表面と平行であって、X方向と直交する方向をY方向とし、X方向及びY方向とそれぞれ直交する方向をZ方向とすると、位置情報は、(X,Y)=(a,b)(a,bは任意の値)で表現される。位置情報は、具体的には、各画素の母材100の表面における位置または各画素の溶接ビード110の表面における位置を座標(X,Y)で表現したものである。 Here, the "position information" is two-dimensional coordinate information having a predetermined position on the surface of the base material 100 as the origin. For example, an arbitrary direction parallel to the surface of the base material 100 is the X direction, a direction parallel to the surface of the base material 100 and perpendicular to the X direction is the Y direction, and a direction perpendicular to the X direction and the Y direction, respectively. When is the Z direction, the position information is expressed as (X, Y)=(a, b) (a, b are arbitrary values). Specifically, the position information is the position of each pixel on the surface of the base material 100 or the position of each pixel on the surface of the weld bead 110 expressed in coordinates (X, Y).

また、形状データにおいて、位置情報に距離情報がさらに結合される場合がある。本願明細書において、「距離情報」とは、三次元形状計測センサ31と、座標(X,Y)で表される母材100の表面位置または溶接ビード110の表面位置との間の距離を言う。 Furthermore, in the shape data, distance information may be further combined with position information. In the present specification, "distance information" refers to the distance between the three-dimensional shape measurement sensor 31 and the surface position of the base material 100 or the surface position of the weld bead 110 expressed by coordinates (X, Y). .

この場合、距離情報を含めた座標情報は、(X,Y,Z)=(a,b,c)(cは任意の値)で表現され、座標(X,Y)と三次元形状計測センサ31との距離が、距離情報Z(=c)で表現される。 In this case, coordinate information including distance information is expressed as (X, Y, Z) = (a, b, c) (c is an arbitrary value), and the coordinates (X, Y) and the three-dimensional shape measurement sensor 31 is expressed as distance information Z (=c).

また、「色情報」とは、カメラの撮像素子または受光センサから出力される信号に含まれる色成分の情報である。撮像素子がカラー画像を取得する場合、画素データに含まれる色情報は、例えば、R成分(赤色成分)とG成分(緑色成分)とB成分(青色成分)のそれぞれの輝度情報であってもよい。撮像素子が白黒画像を取得する場合、画素データに含まれる色情報は、輝度情報である。また、色情報には、透明度を表す成分(A成分)の輝度に相当する情報が含まれていてもよい。輝度の大きさは、例えば、正規化されていてもよい。 Moreover, "color information" is information on color components included in a signal output from an image sensor or a light receiving sensor of a camera. When the image sensor acquires a color image, the color information included in the pixel data may be, for example, luminance information of each of the R component (red component), G component (green component), and B component (blue component). good. When the image sensor acquires a monochrome image, the color information included in the pixel data is brightness information. Further, the color information may include information corresponding to the brightness of a component (A component) representing transparency. For example, the magnitude of brightness may be normalized.

また、「色情報」は、色の種類に関する情報であってもよい。例えば、色の種類毎に番号を付与されたテーブル等が準備される場合、色情報は、色の種類に対応した番号に相当する。 Further, the "color information" may be information regarding the type of color. For example, if a table or the like is prepared in which a number is assigned for each type of color, the color information corresponds to the number corresponding to the type of color.

いずれの場合も、位置情報に当該位置における色情報が結合された状態で形状データが構築されている。また、撮像素子で溶接ビード110を含む母材100を撮像する場合、形状データは、撮像素子の各画素における画素データの集合体であるとも言える。ただし、形状データは、一般的な画像データのように二次元または三次元のデータに区分されない。 In either case, shape data is constructed by combining position information with color information at the position. Furthermore, when capturing an image of the base material 100 including the weld bead 110 with an image sensor, the shape data can also be said to be a collection of pixel data for each pixel of the image sensor. However, shape data is not classified into two-dimensional or three-dimensional data like general image data.

このように外観検査装置30で取得された形状データは、図4に示すように、寸法測定装置20のデータ取得部1に入力される(ステップS1)。 The shape data thus obtained by the appearance inspection device 30 is input to the data acquisition unit 1 of the dimension measuring device 20, as shown in FIG. 4 (step S1).

次に、ビード領域抽出部2で、形状データからビード領域データが抽出される(ステップS2)。ステップS2は複数のステップを含み、これらの詳細は後で説明する。 Next, the bead area extraction unit 2 extracts bead area data from the shape data (step S2). Step S2 includes a plurality of steps, the details of which will be explained later.

次に、輪郭抽出部3は、ビード領域データから輪郭データを抽出する(ステップS3)。具体的には、画像処理機能を有するライブラリ、例えば、OpenCV(Open Source Computer Vision Library)を用いて、ビード領域データから輪郭データが抽出される。 Next, the contour extraction unit 3 extracts contour data from the bead area data (step S3). Specifically, contour data is extracted from the bead region data using a library having an image processing function, for example, OpenCV (Open Source Computer Vision Library).

さらに、スムージング処理部4は、輪郭データに対してスムージング処理を行う(ステップS4)。具体的には、図5に示すように、輪郭データに移動平均フィルタを適用して、輪郭データに含まれるジャギーが除去される。なお、ジャギーとは、デジタル画像等に発生するノイズの一種で、線や輪郭に現れる階段状のギザギザのことを言う。 Further, the smoothing processing unit 4 performs smoothing processing on the contour data (step S4). Specifically, as shown in FIG. 5, a moving average filter is applied to the contour data to remove jaggies included in the contour data. Note that jaggies are a type of noise that occurs in digital images, etc., and refer to step-like jaggedness that appears in lines and contours.

なお、スムージング処理は、移動平均フィルタを用いたフィルタリング処理以外の方法で行ってもよい。 Note that the smoothing process may be performed by a method other than the filtering process using a moving average filter.

次に、端点取得部5は、ステップS4が実行された後の輪郭データに対し1点または複数点の端点(図5参照)を取得する(ステップS5)。端点は、例えば、輪郭が変曲する点、言い換えると、輪郭の傾きの方向が反対方向に変化する点が選択される。なお、スムージング処理を行っていない場合、ジャギーの角部が、端点と認識される場合がある。ステップS4のスムージング処理を行うことで、端点の誤認識が発生するのを抑制できる。 Next, the end point acquisition unit 5 acquires one or more end points (see FIG. 5) for the contour data after step S4 has been executed (step S5). For example, a point where the contour is inflected, or in other words, a point where the direction of the slope of the contour changes in the opposite direction, is selected as the end point. Note that if smoothing processing is not performed, the corners of the jaggies may be recognized as end points. By performing the smoothing process in step S4, it is possible to suppress the occurrence of erroneous recognition of end points.

さらに、基準線付与部6は、ステップS5の端点取得が実行された後の輪郭データに対して、端点を起点として、前述の第1基準線と第2基準線を付与する(ステップS6)。言い替えると、基準線付与部6は、端点を起点として、溶接ビード110の長さを測定するための第1基準線と、溶接ビード110の幅を測定するための複数の第2基準線と、を輪郭データに付与する。また、第1基準線と複数の第2基準線とを輪郭データに付与するにあたって、複数の第2基準線のそれぞれが、第1基準線と第2基準線の交点で、所定の角度範囲内で第1基準線と交差するようする。なお、ステップS6は複数のステップを含む。ステップS5とステップS6の詳細については後で説明する。 Further, the reference line providing unit 6 provides the aforementioned first reference line and second reference line, starting from the end points, to the contour data after the end point acquisition in step S5 has been performed (step S6). In other words, the reference line providing unit 6 includes a first reference line for measuring the length of the weld bead 110 and a plurality of second reference lines for measuring the width of the weld bead 110, starting from the end point. is added to the contour data. In addition, when adding the first reference line and the plurality of second reference lines to the contour data, each of the plurality of second reference lines is within a predetermined angular range at the intersection of the first reference line and the second reference line. so that it intersects the first reference line. Note that step S6 includes a plurality of steps. Details of step S5 and step S6 will be explained later.

次に、寸法算出部7は、第1基準線に基づいて溶接ビード110の長さを算出する。また、寸法算出部7は、複数の第2基準線に基づいて、溶接ビード110の幅を第1基準線に沿った複数個所で算出する。さらに、寸法算出部7は、寸法算出された溶接ビード110の複数個所の幅に関し、前述の統計量を算出する(ステップS7)。 Next, the dimension calculation unit 7 calculates the length of the weld bead 110 based on the first reference line. Further, the dimension calculation unit 7 calculates the width of the weld bead 110 at a plurality of locations along the first reference line based on the plurality of second reference lines. Further, the dimension calculation unit 7 calculates the above-mentioned statistical amount regarding the widths of the plurality of locations of the weld bead 110 whose dimensions have been calculated (step S7).

なお、ステップS5の端点取得において、複数の端点が取得された場合、ステップS6において、第1基準線と複数の第2基準線との組が複数組生成される。この場合、ステップS7の寸法算出では、それぞれの組に関し、溶接ビード110の長さと幅を算出し、溶接ビード110の長さが最も長くなる組の値を選択し、最終的な算出結果とする。具体的には、算出された複数の溶接ビード110の長さのうち、最大値を溶接ビード110の確定長さとし、これに対応する第1基準線のみを選択する。また、選択された第1基準線に対応した複数の第2基準線のみを選択する。選択された複数の第2基準線に基づいて、溶接ビード110の幅を選択された第1基準線に沿った複数個所で算出する。残りの算出結果、つまり、確定長さを有していない第1基準線とこれに対応した第2基準線とに基づいた算出結果に関しては、記憶部8に保存せず削除する。 Note that when a plurality of end points are acquired in the end point acquisition in step S5, a plurality of sets of the first reference line and the plurality of second reference lines are generated in step S6. In this case, in the dimension calculation in step S7, the length and width of the weld bead 110 are calculated for each group, and the value of the group in which the length of the weld bead 110 is the longest is selected and used as the final calculation result. . Specifically, among the calculated lengths of the plurality of weld beads 110, the maximum value is set as the determined length of the weld bead 110, and only the first reference line corresponding to this is selected. Further, only the plurality of second reference lines corresponding to the selected first reference line are selected. Based on the selected plurality of second reference lines, the width of the weld bead 110 is calculated at a plurality of locations along the selected first reference line. The remaining calculation results, that is, the calculation results based on the first reference line that does not have a fixed length and the corresponding second reference line, are not stored in the storage unit 8 but are deleted.

ステップS7の寸法算出で算出された溶接ビード110の寸法を出力する(ステップS8の算出結果の出力)。算出結果の出力先は、記憶部8、または、寸法測定装置20の外部に設けられた機器または記憶部(いずれも図示せず)である。後者の場合は、出力ポート25を介して、算出結果が送信される。あるいは、算出結果を直接、表示部9に出力してもよい。その場合の算出結果は、数値または表形式あるいはグラフ形式で表示部9に表示される。また、算出結果は、第1基準線と第2基準線とが付与された輪郭データとともに、表示部9に表示されてもよい。 The dimensions of the weld bead 110 calculated in the dimension calculation in step S7 are output (output of the calculation results in step S8). The calculation result is output to the storage unit 8 or a device or storage unit (none of which is shown) provided outside the dimension measuring device 20. In the latter case, the calculation result is transmitted via the output port 25. Alternatively, the calculation results may be directly output to the display section 9. The calculation results in that case are displayed on the display section 9 in numerical values, table format, or graph format. Further, the calculation result may be displayed on the display unit 9 together with the contour data to which the first reference line and the second reference line are attached.

[2-1:溶接ビードの形成領域抽出手順]
図6は、溶接ビードの形成領域の抽出手順を示すフローチャートであり、図4のステップS2のビード領域データ抽出の処理に対応している。
[2-1: Weld bead formation area extraction procedure]
FIG. 6 is a flowchart showing a procedure for extracting a weld bead formation area, and corresponds to the process of extracting bead area data in step S2 of FIG.

図7は、形状データの画像及び形状データにおける溶接ビードの形成領域とそれ以外の領域とを示す図である。図8は、学習データ生成用のアノテーション付与手順を示すフローチャートである。図9Aは、形状データにアノテーションを付与する様子を示す一例であり、図9Bは、アノテーション付与後の形状データの画像を示す一例である。 FIG. 7 is a diagram showing an image of shape data and a weld bead formation region and other regions in the shape data. FIG. 8 is a flowchart showing an annotation adding procedure for generating learning data. FIG. 9A is an example showing how annotations are added to shape data, and FIG. 9B is an example showing an image of the shape data after the annotations are added.

溶接ビード110の形成領域をビード領域データとして形状データから抽出するにあたって、図6に示すように、抽出元となる形状データが準備される。また、ステップS12の機械学習(深層学習)を実行するにあたって、必要な数と種類の学習データが準備される(ステップS11)。前述したように、学習データは、記憶部8に保存されたデータを利用してもよいし、寸法測定装置20の外部から入力されたデータを利用してもよい。 When extracting the formation region of the weld bead 110 from the shape data as bead region data, the shape data to be extracted is prepared as shown in FIG. Further, in executing machine learning (deep learning) in step S12, a necessary number and type of learning data are prepared (step S11). As described above, the learning data may be data stored in the storage unit 8 or may be data input from outside the dimension measuring device 20.

次に、ビード領域抽出部2は、学習データを用いて、ビード領域データを抽出するためのアルゴリズムに対して機械学習(深層学習)を行う(ステップS12)。学習強化されたアルゴリズムを用いて、形状データを、ビード領域データとそれ以外の領域に関するデータとに二分化された状態に加工する(ステップS13)。ステップS12,S13を実行するにあたって、セマンティック・セグメンテーションと呼ばれるアルゴリズムが使用される。セマンティック・セグメンテーションは、画像データにおける全画素のデータにラベルやカテゴリーを関連付けるアルゴリズムであり、物体検出等に用いられる。本実施形態では、DeepLab v3+と呼ばれるアルゴリズムが使用されるが、特にこれに限定されない。また、当該アルゴリズムは、GPU23で実行される。 Next, the bead region extraction unit 2 uses the learning data to perform machine learning (deep learning) on an algorithm for extracting bead region data (step S12). Using the learning-enhanced algorithm, the shape data is processed into two parts: bead area data and data regarding other areas (step S13). An algorithm called semantic segmentation is used to execute steps S12 and S13. Semantic segmentation is an algorithm that associates labels and categories with all pixel data in image data, and is used for object detection and the like. In this embodiment, an algorithm called DeepLab v3+ is used, but the algorithm is not particularly limited to this. Further, the algorithm is executed by the GPU 23.

形状データを撮像素子で取得される画像データとして見た場合、形状データにおける各画素のデータに対し、分類が行われる。本実施形態では、形状データにおける各画素のデータにおいて、前述の色情報や三次元形状計測センサ31との距離を表す距離情報が結合されている。ステップS12,S13では、この色情報に着目したクラス分けが行われる。さらに言うと、形状データは、固定サイズに拡張、縮小または分割加工された後、GPU23に実装されたCNN(Convolutional Neural Network;畳み込みニューラルネットワーク)、具体的には、DeepLab v3+に入力される。さらに、CNNの各層で形状データに対して演算処理がなされる。この際、色情報または距離情報に基づいて、溶接ビード110の形成領域に対応するクラスと、それ以外の領域に対応するクラスとに二分化されたクラス分けが行われる。ビード領域抽出部2は、前述のクラスが付与されて、ビード領域データとそれ以外の領域のデータとが識別可能な形式となった形状データを生成する。具体的には、図7に示すように、形状データの画像に対し、溶接ビード110の形成領域とそれ以外の領域とが色分けされた画像が生成される。 When shape data is viewed as image data acquired by an image sensor, classification is performed on data of each pixel in the shape data. In this embodiment, the aforementioned color information and distance information representing the distance to the three-dimensional shape measurement sensor 31 are combined in the data of each pixel in the shape data. In steps S12 and S13, classification is performed focusing on this color information. More specifically, the shape data is expanded, reduced, or divided to a fixed size, and then input to a CNN (Convolutional Neural Network) implemented in the GPU 23, specifically, DeepLab v3+. Furthermore, calculation processing is performed on the shape data in each layer of the CNN. At this time, based on color information or distance information, classification is performed into two classes: a class corresponding to the formation area of weld bead 110 and a class corresponding to other areas. The bead area extraction unit 2 generates shape data that is given the above-mentioned class and has a format in which bead area data and data in other areas can be distinguished. Specifically, as shown in FIG. 7, an image is generated in which the weld bead 110 formation region and other regions are color-coded with respect to the shape data image.

ステップS13の実行後、加工結果は、記憶部8に保存される(ステップS14の加工結果の保存)。 After execution of step S13, the machining result is stored in the storage unit 8 (saving of the machining result in step S14).

このように、機械学習(深層学習)で学習強化されたアルゴリズムを使用することで、形状データから溶接ビード110の形成領域であるビード領域データを精度良く、また確実に抽出することができる。また、深層学習を用いてビード領域データを特定するため、例えば、ローパスフィルタ等によるノイズ除去によって溶接部の外観形状の特徴量を特定する場合に比べて、微妙なパラメータ設定によりビード領域データの抽出精度が不安定になる等の問題が生じない。 In this way, by using an algorithm enhanced by machine learning (deep learning), it is possible to accurately and reliably extract bead region data, which is the formation region of weld bead 110, from shape data. In addition, since the bead area data is specified using deep learning, the bead area data is extracted using delicate parameter settings, compared to, for example, identifying the feature amount of the external shape of the welded part by removing noise using a low-pass filter. Problems such as unstable accuracy do not occur.

なお、学習データは、別途、準備された実際の溶接ビード110を外観検査して得られた形状データをもとに生成している。ここでは、寸法測定装置20の内部に設けられた学習データ生成部10で学習データを生成する場合を例に取って説明する。ただし、前述したように、学習データを寸法測定装置20の外部で生成してもよい。 Note that the learning data is generated based on shape data obtained by visually inspecting an actual weld bead 110 prepared separately. Here, a case where learning data is generated by the learning data generating section 10 provided inside the dimension measuring device 20 will be described as an example. However, as described above, the learning data may be generated outside the dimension measuring device 20.

まず、図8に示すように、アノテーション付与時の図形指定モードを選択する(ステップS21)。本実施形態では、溶接ビート110の形状を多角形で近似してアノテーションを付与する。 First, as shown in FIG. 8, a figure designation mode for annotation is selected (step S21). In this embodiment, the shape of the weld bead 110 is approximated by a polygon and annotation is provided.

次に、学習データ生成部10は、学習データを生成するための形状データを呼び出して、当該形状データのデータファイルを開き(ステップS22)、さらに、開いたデータファイルを表示部9に表示して、可視化する。この場合の表示部9は、タッチパネルであり、入力機能も備えている。なお、入力機能は、タッチペンやマウス等の別のデバイスで実現されてもよい。 Next, the learning data generation unit 10 calls the shape data for generating learning data, opens the data file of the shape data (step S22), and further displays the opened data file on the display unit 9. , visualize. The display section 9 in this case is a touch panel and also has an input function. Note that the input function may be realized by another device such as a touch pen or a mouse.

形状データの画像を表示部9に表示させた後、形状データの画像を見ながら、作業者が溶接ビード110の輪郭をトレースする。本実施形態では、図形指定モードとして、前述した多角形指定モードを選択している。この場合は、図9Aに示すように、輪郭に沿って、順次タッチペン等でクリックすることにより、多角形の頂点が決定される。最終的に、図9Bに示すように、溶接ビード110が多角形で囲まれて、溶接ビード110の形成領域が指定され、アノテーション付与が終了する(ステップS23)。 After displaying the image of the shape data on the display unit 9, the operator traces the outline of the weld bead 110 while viewing the image of the shape data. In this embodiment, the aforementioned polygon specification mode is selected as the figure specification mode. In this case, as shown in FIG. 9A, the vertices of the polygon are determined by sequentially clicking along the outline with a touch pen or the like. Finally, as shown in FIG. 9B, the weld bead 110 is surrounded by a polygon, the formation area of the weld bead 110 is designated, and the annotation ends (step S23).

アノテーションが付与された形状データは、学習データとして記憶部8に保存される(ステップS24)。 The annotated shape data is stored in the storage unit 8 as learning data (step S24).

次に、アノテーションを付与すべき形状データのデータファイルが残っているか否かを、学習データ生成部10が判断する(ステップS25)。ステップS25の判断結果が否定的、つまり、アノテーションを付与すべき形状データのデータファイルが残っていなければ、アノテーション付与作業を終了する。ステップS25の判断結果が肯定的、つまり、アノテーションを付与すべき形状データのデータファイルが残っていれば、ステップS25の判断結果が否定的になるまで、ステップS22~S24の一連の処理を繰り返し実行する。なお、ステップS25の処理は、作業者が実行してもよい。 Next, the learning data generation unit 10 determines whether or not there remains a data file of shape data to which annotation should be added (step S25). If the determination result in step S25 is negative, that is, if there remains no data file of shape data to which annotation should be added, the annotation work is ended. If the judgment result in step S25 is positive, that is, if there remains a data file of shape data to which annotation should be added, the series of processes from steps S22 to S24 is repeatedly executed until the judgment result in step S25 is negative. do. Note that the process in step S25 may be performed by an operator.

[2-2:第1基準線及び第2基準線の付与手順]
図10は、第1基準線及び第2基準線の付与手順を示すフローチャートであり、図4に示すステップS6の処理(第1基準線及び第2基準線を生成し、輪郭データに付与)に対応している。
[2-2: Procedure for assigning first reference line and second reference line]
FIG. 10 is a flowchart showing the procedure for adding the first reference line and the second reference line. Compatible.

図11Aは、第1基準線及び第2基準線を付与する際の第1ループ処理の様子を示す模式図である。図11Bは、図11Aに示す処理に続く処理の様子を示す模式図である。図11Cは、図11Bに示す処理に続く処理の様子を示す模式図である。図12は、第1基準線及び第2基準線を付与する際の第2ループ処理の様子を示す模式図である。 FIG. 11A is a schematic diagram showing the state of the first loop processing when providing the first reference line and the second reference line. FIG. 11B is a schematic diagram showing a process subsequent to the process shown in FIG. 11A. FIG. 11C is a schematic diagram showing a state of processing subsequent to the processing shown in FIG. 11B. FIG. 12 is a schematic diagram showing the state of the second loop processing when providing the first reference line and the second reference line.

まず、端点取得部5で取得した端点を輪郭データ上で端点Aと設定する。図10及び図11Aに示すように、端点A上に仮想点B,Cをそれぞれ付与する(ステップS31)。iは0または1以上の整数であるが、ステップS31では、i=0とする。仮想点B,Cは、それぞれ、端点Aに重なって設定された仮想点(A0(B0、C0))である。ステップS31の処理を初期設定処理と呼ぶことがある。また、ステップS31以降の処理は、基準線付与部6で実行される。 First, the end point acquired by the end point acquisition section 5 is set as the end point A0 on the contour data. As shown in FIGS. 10 and 11A, virtual points B i and C i are respectively provided on the end point A 0 (step S31). Although i is an integer greater than or equal to 0, in step S31, i=0. The virtual points B i and C i are virtual points (A0 (B0, C0)) set to overlap the end point A 0 , respectively. The process of step S31 may be called initial setting process. Further, the processes after step S31 are executed by the reference line providing section 6.

次に、図11Bに示すように、仮想点Bを、溶接ビード110の輪郭に沿って、端点Aから遠ざかる方向である第1方向に所定の距離(以下、第1距離と言う)だけ進める。移動後の点を仮想点B(i+1)とする。同時に、仮想点Cを、溶接ビード110の輪郭に沿って、端点Aから遠ざかる方向であって、第1方向と異なる方向である第2方向に第1距離だけ進める。移動後の点を仮想点C(i+1)とする(ステップS32)。仮想点B(i+1)と仮想点C(i+1)との中点を中点A(i+1)に設定する(ステップS33)。ステップS32及びステップS33の処理を、第1ループ処理と呼ぶことがある。図11B、および次に図11Bに続く図11Cに示すように、第1ループ処理を順次進めることで、端点A及び仮想点B,B,C,Cが溶接ビード110の輪郭上に、中点A,Aが溶接ビード110の領域内にそれぞれ配置される。図11Cに示す経路A-A-Aは、第1基準線の一部をなす。また、線分B-C及び線分B-Cは、それぞれ第2基準線に相当する。 Next, as shown in FIG. 11B, the virtual point B i is moved along the contour of the weld bead 110 by a predetermined distance (hereinafter referred to as the first distance) in a first direction that is a direction away from the end point A0 . Proceed. The point after movement is assumed to be virtual point B (i+1) . At the same time, the virtual point C i is advanced along the contour of the weld bead 110 by a first distance in a second direction that is away from the end point A 0 and is different from the first direction. The point after the movement is defined as virtual point C (i+1) (step S32). The midpoint between virtual point B (i+1) and virtual point C (i+1) is set as midpoint A (i+1) (step S33). The processing in steps S32 and S33 may be referred to as first loop processing. As shown in FIG. 11B and then FIG. 11C following FIG. 11B, by sequentially proceeding with the first loop process, the end point A 0 and the virtual points B 1 , B 2 , C 1 , C 2 are the outline of the weld bead 110. Above, the midpoints A 1 , A 2 are respectively located in the area of the weld bead 110 . The path A 0 -A 1 -A 2 shown in FIG. 11C forms part of the first reference line. Further, the line segment B 1 -C 1 and the line segment B 2 -C 2 each correspond to a second reference line.

次に、第1基準線における、線分B(i+1)-C(i+1)と第2基準線における、線分A-A(i+1)とが、前述した所定の角度範囲内で交差するか否かを判断する(ステップS34)。つまり、線分B(i+1)-C(i+1)と線分A-A(i+1)とが、90(°)±δ(°)の範囲内で交差するか否かを判断する。 Next, determine whether the line segment B (i+1) - C (i+1) on the first reference line and the line segment A i -A (i+1) on the second reference line intersect within the predetermined angle range mentioned above. It is determined whether or not (step S34). That is, it is determined whether the line segment B (i+1) - C (i+1) and the line segment A i -A (i+1) intersect within the range of 90 (°) ± δ (°).

ステップS34の判断結果が否定的な場合、つまり、線分B(i+1)-C(i+1)と線分A-A(i+1)とが、所定の角度範囲を超えて交差する場合、ステップS36に進む。 If the determination result in step S34 is negative, that is, if the line segment B (i+1) -C (i+1) and the line segment A i -A (i+1) intersect beyond the predetermined angular range, step S36 Proceed to.

ステップS36では、仮想点B(i+1)及び仮想点C(i+1)のいずれか一方を溶接ビード110の輪郭に沿って、かつ端点Aから遠ざかる方向に第1距離だけ移動させる。移動後の点を仮想点B(i+2)または仮想点C(i+2)と設定し、ステップS37に進む。 In step S36, either virtual point B (i+1) or virtual point C (i+1) is moved along the outline of weld bead 110 by a first distance in a direction away from end point A0 . The point after the movement is set as virtual point B (i+2) or virtual point C (i+2) , and the process advances to step S37.

ステップS37では、線分B(i+2)-C(i+1)と線分A-A(i+1)との交差角度と線分B(i+1)-C(i+2)と線分A-A(i+1)との交差角度とを比較し、所定の角度範囲内かそれに近い交差角度となる仮想点B(i+2)または仮想点C(i+2)を選択する。 In step S37, the intersection angle between the line segment B (i+2) -C (i+1) and the line segment A i -A (i+1) and the intersection angle between the line segment B (i+1) -C (i+2) and the line segment A i -A (i+1) are determined. ) , and select virtual point B (i+2) or virtual point C (i+2) whose intersection angle is within or close to a predetermined angle range.

選択された仮想点が仮想点B(i+2)の場合、中点A(i+1)を仮想点B(i+2)と仮想点C(i+1)との中点に修正する。また、もとの仮想点B(i+1)をスキップし、仮想点B(i+2)を新たに仮想点B(i+1)と設定する。 If the selected virtual point is virtual point B (i+2) , the midpoint A (i+1) is corrected to the midpoint between virtual point B (i+2) and virtual point C (i+1) . Furthermore, the original virtual point B (i+1) is skipped and virtual point B (i+2) is newly set as virtual point B (i+1) .

一方、選択された仮想点が移動仮想点C(i+2)の場合、中点A(i+1)を移動点B(i+1)と移動点C(i+2)との中点に修正する。また、もとの移動点C(i+1)をスキップし、仮想点C(i+2)を新たに仮想点C(i+1)と設定する。ステップS37の終了後は、ステップS34に戻って、ステップS34の判断結果が肯定的になるまで、ステップS36とステップS37の一連の処理を繰り返し実行する。なお、ステップS36とステップS37の処理を合わせて、第2ループ処理と呼ぶことがある。図12に示すように、第2ループ処理を順次進めることで、端点A及び仮想点B,B,C,Cが溶接ビード110の輪郭上に、中点A,Aが溶接ビード110の領域内にそれぞれ配置される。図12に示す経路A-A-A-・・・-Aは、第1基準線の一部をなす。また、線分B-C、B-C、・・・、B-Cそれぞれ第2基準線に相当する。なお、図12には、例えば、ステップS34の判断結果が否定的な場合にスキップされた仮想点Bの痕を丸破線で示している。 On the other hand, if the selected virtual point is the moving virtual point C (i+2) , the midpoint A (i+1) is corrected to the midpoint between the moving point B (i+1) and the moving point C (i+2) . Furthermore, the original moving point C (i+1) is skipped and the virtual point C (i+2) is newly set as the virtual point C (i+1) . After step S37 ends, the process returns to step S34, and the series of processes of step S36 and step S37 are repeatedly executed until the determination result of step S34 becomes affirmative. Note that the processing in step S36 and step S37 may be collectively referred to as second loop processing. As shown in FIG. 12, by sequentially proceeding with the second loop process, the end point A 0 and the virtual points B 1 , B 2 , C 1 , C 2 are located on the outline of the weld bead 110, and the midpoints A 1 , A 2 are respectively arranged within the area of the weld bead 110. The path A 0 -A 1 -A 2 -...-A i shown in FIG. 12 forms part of the first reference line. Furthermore, the line segments B 1 -C 1 , B 2 -C 2 , . . . , B i -C i each correspond to the second reference line. Note that, in FIG. 12, for example, the mark of the virtual point B i that is skipped when the determination result in step S34 is negative is shown by a broken circle line.

一方、ステップS34の判断結果が肯定的な場合、つまり、線分B(i+1)-C(i+1)と線分A-A(i+1)とが、所定の角度範囲内で交差する場合、経路A-Bの長さと経路A-Cの長さとの和が、溶接ビード110の輪郭の長さを超えたか否かを判断する(ステップS35)。 On the other hand, if the determination result in step S34 is affirmative, that is, if the line segment B (i+1) - C (i+1) and the line segment A i -A (i+1) intersect within a predetermined angle range, the route It is determined whether the sum of the length of A 0 -B i and the length of path A 0 -C i exceeds the length of the outline of weld bead 110 (step S35).

ステップS35の判断結果が否定的な場合、つまり、経路A-Bの長さと経路A-Cの長さとの和が、溶接ビード110の輪郭の長さを超えていない場合、変数iを(i+1)にカウントアップし、ステップS32に戻って、ステップS35の判断結果が肯定的になるまでステップS32~S34の一連の処理を繰り返し実行する。ここで、経路A-Bの長さとは、端点Aから仮想点B(kは整数で、1≦k<i)を経由して仮想点Bに至るまでの経路の距離を言う。経路A-Cの長さとは、端点Aから仮想点Cを経由して仮想点Cに至るまでの経路の距離を言う。 If the judgment result in step S35 is negative, that is, if the sum of the length of the path A 0 -B i and the length of the path A 0 -C i does not exceed the length of the outline of the weld bead 110, the variable i is counted up to (i+1), the process returns to step S32, and a series of processes from steps S32 to S34 are repeatedly executed until the determination result in step S35 becomes affirmative. Here, the length of the path A 0 - B i is the distance of the path from the end point A 0 to the virtual point B i via the virtual point B k (k is an integer, 1≦k<i). To tell. The length of the path A 0 -C i refers to the distance of the path from the end point A 0 to the virtual point C i via the virtual point C k .

一方、ステップS35の判断結果が肯定的な場合、つまり、経路A-Bの長さと経路A-Cの長さとの和が、溶接ビード110の輪郭の長さを超えた場合、第1基準線と第2基準線とが仮確定される(ステップS38)。第1基準線は、端点Aを起点として、ステップS35の終了時点で設定された複数の中点A,・・・,Aiをそれぞれ通る経路に相当する。なお、ステップS35の終了時点で、第1基準線の終点は、溶接ビード110の輪郭に到達するか当該輪郭と交差している。また、線分B-C,・・・,B-Cのそれぞれが、前述の第2基準線である。第2基準線の数は、溶接ビード110の長さと前述の第1距離(溶接ビード110の輪郭に沿って、端点Aから遠ざかる方向である第1方向に所定の距離)とに応じて決定される。 On the other hand, if the determination result in step S35 is affirmative, that is, if the sum of the length of the path A 0 -B i and the length of the path A 0 -C i exceeds the length of the outline of the weld bead 110, The first reference line and the second reference line are provisionally determined (step S38). The first reference line corresponds to a route starting from the end point A 0 and passing through each of the plurality of midpoints A 1 , . . . , Ai set at the end of step S35. Note that at the end of step S35, the end point of the first reference line has reached or intersected the contour of the weld bead 110. Furthermore, each of the line segments B 1 -C 1 , . . . , B i -C i is the second reference line described above. The number of second reference lines is determined according to the length of the weld bead 110 and the above-mentioned first distance (a predetermined distance in the first direction, which is the direction away from the end point A0 along the contour of the weld bead 110). be done.

しかし、ステップS38までの処理では、第1基準線が適切に設定されていない場合がある。したがって、本実施形態では、以降に述べる第1基準線の補正処理(ステップS39)をステップS38の実行後に一律に行って、第1基準線と複数の第2基準線を確定させている。ステップS39の処理についてさらに説明する。 However, in the processing up to step S38, the first reference line may not be appropriately set. Therefore, in this embodiment, the first reference line correction process (step S39), which will be described later, is uniformly performed after execution of step S38 to determine the first reference line and the plurality of second reference lines. The process of step S39 will be further explained.

[2-3:第1基準線の補正手順]
図13は、第1基準線の補正手順を示すフローチャートであり、図10に示すステップS39の処理に対応している。
[2-3: First reference line correction procedure]
FIG. 13 is a flowchart showing the procedure for correcting the first reference line, and corresponds to the process of step S39 shown in FIG. 10.

図14Aは、補正を行わない場合の第1基準線が付与された輪郭データの一例であり、図14Bは、補正を行わない場合の第1基準線が付与された別の輪郭データの一例である。 FIG. 14A is an example of contour data with a first reference line added when no correction is performed, and FIG. 14B is an example of another contour data with a first reference line added when no correction is performed. be.

図15Aは、第1基準線を仮基準線に変形した場合の輪郭データの一例であり、図15Bは、第1基準線を仮基準線に変形した場合の別の輪郭データの一例である。 FIG. 15A is an example of contour data when the first reference line is transformed into a temporary reference line, and FIG. 15B is an example of another contour data when the first reference line is transformed into a temporary reference line.

図16Aは、補正が完了した後の第1基準線が付与された輪郭データの一例であり、図16Bは、補正が完了した後の第1基準線が付与された別の輪郭データの一例である。 FIG. 16A is an example of contour data to which a first reference line has been added after correction has been completed, and FIG. 16B is an example of another contour data to which a first reference line has been added after correction has been completed. be.

なお、図14A,15A及び図16Aは、それぞれ同じ輪郭データを示している。同様に、図14B,15B及び図16Bは、それぞれ同じ輪郭データを示している。 Note that FIGS. 14A, 15A, and 16A each show the same contour data. Similarly, FIGS. 14B, 15B, and 16B each show the same contour data.

図4に示すステップS2のビード領域データ抽出の処理によって、具体的には、図6に示す手順で、形状データからビード領域データが抽出される場合(ステップS13)、抽出後のビード領域データにノイズが含まれる場合がある(図14A参照)。このような場合、図4に示すステップS3の輪郭データ取得の以降の手順に則って、溶接ビード110の長さを算出すると、実際の長さと異なる値が出力される場合がある。あるいは、図4に示すステップS5の端点取得において、端点が適切に取得できていない場合、第1基準線自体も適切に生成できない場合がある(図14B参照)。 Specifically, when bead area data is extracted from the shape data in the procedure shown in FIG. 6 by the bead area data extraction process in step S2 shown in FIG. 4 (step S13), the bead area data after extraction is Noise may be included (see FIG. 14A). In such a case, when the length of the welding bead 110 is calculated in accordance with the subsequent steps of contour data acquisition in step S3 shown in FIG. 4, a value different from the actual length may be output. Alternatively, in acquiring the end points in step S5 shown in FIG. 4, if the end points are not properly acquired, the first reference line itself may not be appropriately generated (see FIG. 14B).

これらが発生した場合も、以下に示す手順を実行することで、輪郭データに対し、第1基準線を適切に付与することができる。このことにより、輪郭データに対し、複数の第2基準線も適切に付与することができる。さらに、溶接ビード110の長さや幅を正確に算出することができる。以下、実際の補正手順について詳しく説明する。 Even when these occur, the first reference line can be appropriately assigned to the contour data by executing the procedure described below. With this, it is possible to appropriately add a plurality of second reference lines to the contour data. Furthermore, the length and width of weld bead 110 can be calculated accurately. The actual correction procedure will be explained in detail below.

まず、第1基準線の両端のそれぞれを予め設定された所定の長さ分だけ除去し、仮基準線を設定する(図13のステップS41。また、図15A,15B参照)。この場合、第1基準線の両端のそれぞれから、所定の長さ分だけ正しく除去されているか否かの判定は行わない。 First, both ends of the first reference line are removed by a predetermined length to set a temporary reference line (step S41 in FIG. 13; see also FIGS. 15A and 15B). In this case, it is not determined whether a predetermined length has been correctly removed from each end of the first reference line.

次に、仮基準線の両端近傍のそれぞれの傾きに応じた直線(以下、延長線と呼ぶことがある。)を、仮基準線の両端のそれぞれから輪郭に交差するまで延長する(図13のステップS42。また、図16A,16B参照)。 Next, straight lines (hereinafter sometimes referred to as extension lines) according to the respective inclinations near both ends of the temporary reference line are extended from each end of the temporary reference line until they intersect the contour (see FIG. 13). Step S42 (see also FIGS. 16A and 16B).

さらに、仮基準線と、仮基準線の両端からそれぞれ延長した延長線とを合成した線を新たに第1基準線とする。当該第1基準線を輪郭データに付与する(図13のステップS43。また、図16A,16B参照)。 Furthermore, a line that is a composite of the temporary reference line and extension lines extended from both ends of the temporary reference line is newly set as a first reference line. The first reference line is added to the contour data (step S43 in FIG. 13; see also FIGS. 16A and 16B).

図4に示すステップS7の寸法算出では、図16Aや図16Bに示す第1基準線の長さが溶接ビード110の長さとして算出される。 In the dimension calculation in step S7 shown in FIG. 4, the length of the first reference line shown in FIGS. 16A and 16B is calculated as the length of the weld bead 110.

なお、図4に示すステップS5の端点取得で複数の端点が取得された場合、それぞれの端点を起点として、図10に示す手順で第1基準線及び第2基準線が輪郭データに付与されるとともに、図13に示す手順で第1基準線が補正されることは言うまでもない。また、確定長さを有する第1基準線及びこれに対応する複数の第2基準線に基づいて、溶接ビード110の長さや幅が算出されることは前述した通りである。 Note that if a plurality of endpoints are acquired in the endpoint acquisition in step S5 shown in FIG. 4, a first reference line and a second reference line are added to the contour data using each endpoint as a starting point in the procedure shown in FIG. It goes without saying that the first reference line is also corrected by the procedure shown in FIG. Further, as described above, the length and width of the weld bead 110 are calculated based on the first reference line having a determined length and the plurality of second reference lines corresponding thereto.

[3:効果等]
以上説明したように、本実施形態に係る寸法測定装置20は、データ取得部1とビード領域抽出部2と輪郭抽出部3とスムージング処理部4と端点取得部5と基準線付与部6と寸法算出部7とを少なくとも備えている。
[3: Effects, etc.]
As explained above, the dimension measuring device 20 according to the present embodiment includes the data acquisition unit 1, the bead area extraction unit 2, the contour extraction unit 3, the smoothing processing unit 4, the end point acquisition unit 5, the reference line provision unit 6, and the dimension measurement unit 20. The calculation section 7 is provided at least.

データ取得部1は、溶接ビード110が形成された母材100の形状データを取得する。ビード領域抽出部2は、形状データから溶接ビード110の形成領域をビード領域データとして抽出する。輪郭抽出部3は、ビード領域データに基づいて、溶接ビード110の輪郭を輪郭データとして抽出する。スムージング処理部4は、輪郭データに対してスムージング処理を行う。 The data acquisition unit 1 acquires shape data of the base material 100 on which the weld bead 110 is formed. The bead region extraction unit 2 extracts the formation region of the weld bead 110 from the shape data as bead region data. The contour extraction unit 3 extracts the contour of the weld bead 110 as contour data based on the bead area data. The smoothing processing unit 4 performs smoothing processing on the contour data.

端点取得部5は、スムージング処理された輪郭データに基づいて、溶接ビード110の端点を取得する。基準線付与部6は、溶接ビード110の端点を起点として、溶接ビード110の長さを測定するための第1基準線と、溶接ビード110の幅を測定するための複数の第2基準線とを、輪郭データに付与する。寸法算出部7は、第1基準線に基づいて溶接ビード110の長さを算出し、かつ複数の第2基準線に基づいて、溶接ビード110の幅を第1基準線に沿った複数個所で算出する。さらに、基準線付与部6は、第1基準線と複数の第2基準線の中点位置とが、所定の角度範囲内でそれぞれ交差するように、第1基準線と複数の第2基準線とを輪郭データに付与する。 The end point acquisition unit 5 acquires the end points of the weld bead 110 based on the smoothed contour data. The reference line providing unit 6 has a first reference line for measuring the length of the weld bead 110 and a plurality of second reference lines for measuring the width of the weld bead 110, starting from the end point of the weld bead 110. is added to the contour data. The dimension calculation unit 7 calculates the length of the weld bead 110 based on the first reference line, and calculates the width of the weld bead 110 at a plurality of locations along the first reference line based on the plurality of second reference lines. calculate. Furthermore, the reference line providing unit 6 is configured to arrange the first reference line and the plurality of second reference lines so that the first reference line and the plurality of second reference lines intersect each other within a predetermined angular range. is added to the contour data.

寸法測定装置20をこのように構成することで、母材100や溶接ビード110がそれぞれ任意の形状である場合にも、複雑な測定条件等の設定を行うこと無く、溶接ビード110の寸法を自動でかつ簡便に測定することができる。また、このことにより、溶接ビード110の寸法が所定の規格範囲から外れた不良品を簡便かつ確実に検出できるため、検査費用を低減できる。なお、前述の任意の形状の溶接ビード110には、直線状や円弧状の溶接ビード110以外にも、S字形状、ジグザグ形状の溶接ビード110や、平坦に盛り上がった台形状や扁平形状の溶接ビード110も含まれる。 By configuring the dimension measuring device 20 in this way, even if the base material 100 and the weld bead 110 have arbitrary shapes, the dimensions of the weld bead 110 can be automatically determined without setting complicated measurement conditions. It can be measured easily and easily. Furthermore, this makes it possible to easily and reliably detect defective products in which the dimensions of the weld bead 110 deviate from a predetermined standard range, thereby reducing inspection costs. In addition to the linear or arcuate weld bead 110, the weld bead 110 having an arbitrary shape mentioned above may include an S-shaped weld bead 110, a zigzag weld bead 110, a flat raised trapezoidal shape, or a flat weld bead 110. Beads 110 are also included.

端点取得部5が複数の端点を取得した場合、基準線付与部6は、複数の端点のそれぞれを起点として、第1基準線を輪郭データに付与する。さらに、付与された複数の第1基準線のそれぞれに対応して複数の第2基準線を輪郭データに付与する。 When the end point obtaining unit 5 obtains a plurality of end points, the reference line providing unit 6 provides a first reference line to the contour data using each of the plurality of end points as a starting point. Furthermore, a plurality of second reference lines are provided to the contour data corresponding to each of the provided plurality of first reference lines.

寸法算出部7は、複数の第1基準線のそれぞれに基づいて、溶接ビード110の長さを算出し、算出された複数の溶接ビード110の長さのうち、最大値を溶接ビード110の確定長さとする。さらに、確定長さを有する第1基準線に対応した複数の第2基準線に基づいて、溶接ビード110の幅を第1基準線に沿った複数個所で算出する。 The dimension calculation unit 7 calculates the length of the weld bead 110 based on each of the plurality of first reference lines, and determines the maximum value of the weld bead 110 among the plurality of calculated lengths of the weld bead 110. length. Further, based on a plurality of second reference lines corresponding to the first reference line having a determined length, the width of the weld bead 110 is calculated at a plurality of locations along the first reference line.

基準線付与部6と寸法算出部7とをこのように構成することで、例えば、端点取得部5で適切な端点を選択し切れず、複数の端点が取得された場合にも、溶接ビード110の寸法を自動でかつ簡便に、さらに正確に測定することができる。 By configuring the reference line providing section 6 and the dimension calculation section 7 in this way, for example, even if the end point obtaining section 5 cannot select an appropriate end point and a plurality of end points are obtained, the weld bead 110 The dimensions of can be measured automatically, easily, and more accurately.

基準線付与部6は、端点を端点Aとし、端点A上に仮想点B及び仮想点C(iは0または1以上の整数)それぞれ付与する初期設定処理を実行する。また、基準線付与部6は、仮想点Bから、溶接ビード110の輪郭に沿って、端点Aから遠ざかる方向である第1方向に第1距離だけ進んだ点を仮想点B(i+1)とし、仮想点Cから、輪郭に沿って、端点Aから遠ざかる方向であって、第1方向と異なる方向である第2方向に第1距離だけ進んだ点を仮想点C(i+1)とし、さらに仮想点B(i+1)と仮想点C(i+1)との中点を中点A(i+1)に設定する第1ループ処理を少なくとも実行する。 The reference line providing unit 6 sets the end point to the end point A 0 and executes an initial setting process to add a virtual point B i and a virtual point C i (i is an integer of 0 or 1 or more) on the end point A 0 . Further, the reference line providing unit 6 sets a point that is a first distance from the virtual point B i in a first direction that is a direction away from the end point A 0 along the contour of the weld bead 110 to a virtual point B (i+1). Then, the virtual point C (i+1) is a point that advances from the virtual point C i along the contour by a first distance in a second direction that is away from the end point A 0 and is a direction different from the first direction. , and further executes at least a first loop process of setting the midpoint between the virtual point B (i+1) and the virtual point C (i+1) to the midpoint A (i+1) .

仮想点B(i+1)と仮想点C(i+1)とを結ぶ線分が、所定の角度範囲(90(°)±δ(°))内で中点Aと中点A(i+1)とを結ぶ線分と交差する場合は、基準線付与部6は、端点Aから仮想点B(kは整数で、1≦k<i)を経由して仮想点Bに至るまでの経路の距離と、端点Aから仮想点Cを経由して仮想点Cに至るまでの経路の距離との和が、溶接ビード110の輪郭の長さを超えるまで、第1ループ処理を1回または複数回実行し、第1基準線と複数の第2基準線とを輪郭データに付与する。 A line segment connecting virtual point B (i+1) and virtual point C (i+1) connects midpoint A i and midpoint A (i+1) within a predetermined angular range (90 (°) ± δ (°)). When intersecting the connecting line segment, the reference line providing unit 6 creates a path from the end point A 0 to the virtual point B i via the virtual point B k (k is an integer, 1≦k<i). The first loop process is performed once until the sum of the distance and the distance of the path from the end point A0 to the virtual point Ci via the virtual point Ck exceeds the length of the outline of the weld bead 110. Alternatively, the first reference line and a plurality of second reference lines are added to the contour data by executing the process multiple times.

基準線付与部6をこのように構成することで、溶接ビード110の長さを決定する第1基準線を自動でかつ簡便に、さらに正確に設定することができる。このことに応じて、複数の第2基準線のそれぞれを自動でかつ簡便に、さらに正確に設定することができる。これらにより、溶接ビード110の寸法を自動でかつ簡便に、さらに正確に測定することができる。 By configuring the reference line providing section 6 in this way, the first reference line for determining the length of the weld bead 110 can be automatically, simply, and more accurately set. Accordingly, each of the plurality of second reference lines can be automatically, simply, and more accurately set. These allow the dimensions of the weld bead 110 to be measured automatically, easily, and more accurately.

仮想点B(i+1)と仮想点C(i+1)とを結ぶ線分が、所定の角度範囲を超えて中点Aと中点A(i+1)とを結ぶ線分と交差する場合は、基準線付与部6は、以下の(i)~(iv)の処理を含む第2ループ処理を実行する。 If a line segment connecting virtual point B (i+1) and virtual point C (i+1) intersects a line segment connecting midpoint A i and midpoint A (i+1) beyond a predetermined angular range, the standard The line adding section 6 executes a second loop process including the following processes (i) to (iv).

第2ループ処理では、基準線付与部6は、
(i)仮想点B(i+1)及び仮想点C(i+1)のいずれか一方を溶接ビード110の輪郭に沿って、かつ端点Aから遠ざかる方向に第1距離だけ進めて、移動後の点を仮想点B(i+2)または仮想点C(i+2)と設定する。
In the second loop process, the reference line providing unit 6
(i) Move either virtual point B (i+1) or virtual point C (i+1) along the outline of weld bead 110 by a first distance in a direction away from end point A0 , and move the point after the movement. The virtual point B (i+2) or the virtual point C (i+2) is set.

(ii)仮想点B(i+2)と仮想点C(i+1)とを結ぶ線分と中点Aと中点A(i+1)とを結ぶ線分の交差角度と、仮想点B(i+1)と仮想点C(i+2)とを結ぶ線分と中点Aと中点A(i+1)とを結ぶ線分の交差角度とを比較し、かつ所定の角度範囲内かそれに近い交差角度となる仮想点B(i+2)または仮想点C(i+2)を選択する。 (ii) The intersection angle between the line segment connecting virtual point B (i+2) and virtual point C (i+1) and the line segment connecting midpoint A i and midpoint A (i+1) , and the virtual point B (i+1). The intersection angle of the line segment connecting the virtual point C (i+2) and the line segment connecting the midpoint A i and the midpoint A (i+1) is compared, and the virtual intersection angle is within or close to a predetermined angle range. Select point B (i+2) or virtual point C (i+2) .

(iii)選択された仮想点が仮想点B(i+2)の場合、中点A(i+1)を仮想点B(i+2)と仮想点C(i+1)との中点に修正するとともに、仮想点B(i+2)を新たに仮想点B(i+1)に設定する。 (iii) If the selected virtual point is virtual point B (i+2) , modify the midpoint A (i+1) to the midpoint between virtual point B (i+2) and virtual point C (i+1) , and (i+2) is newly set as virtual point B (i+1) .

(iv)選択された仮想点が仮想点C(i+2)の場合、中点A(i+1)を仮想点B(i+1)と仮想点C(i+2)との中点に修正するとともに、仮想点C(i+2)を新たに仮想点C(i+1)に設定する。 (iv) If the selected virtual point is virtual point C (i+2) , modify the midpoint A (i+1) to the midpoint between virtual point B (i+1) and virtual point C (i+2) , and (i+2) is newly set as the virtual point C (i+1) .

基準線付与部6は、仮想点B(i+1)と仮想点C(i+1)とを結ぶ線分が、所定の角度範囲内で中点Aと中点A(i+1)とを結ぶ線分と交差するまで、第2ループ処理を繰り返し実行する。 The reference line providing unit 6 determines whether a line segment connecting virtual point B (i+1) and virtual point C (i+1) is a line segment connecting midpoint A i and midpoint A (i+1) within a predetermined angular range. The second loop process is repeatedly executed until the intersection occurs.

基準線付与部6をこのように構成することで、溶接ビード110の長さを決定する第1基準線をより正確に設定することができる。このことに応じて、複数の第2基準線のそれぞれをより正確に設定することができる。 By configuring the reference line providing section 6 in this way, the first reference line that determines the length of the weld bead 110 can be set more accurately. According to this, each of the plurality of second reference lines can be set more accurately.

溶接ビード110の形状や曲率によっては、仮想点B(i+1)と仮想点C(i+1)とを結ぶ線分が、所定の角度範囲を超えて中点Aと中点A(i+1)とを結ぶ線分と交差する場合がある。この場合、中点A(i+1)を、仮想点B(i+1)及び仮想点C(i+1)のそれぞれから略等距離の位置に設定できないことがある。つまり、端点Aから中点A(i+1)を経由して溶接ビード110の終点に至る経路の距離が、溶接ビード110の長さを正しく反映しないことがある。 Depending on the shape and curvature of weld bead 110, the line segment connecting virtual point B (i+1) and virtual point C (i+1) may exceed a predetermined angular range and connect midpoint A i and midpoint A (i+1). It may intersect with the connecting line segments. In this case, the midpoint A (i+1) may not be set at a position approximately equidistant from each of the virtual point B (i+1) and the virtual point C (i+1) . That is, the distance of the path from the end point A 0 to the end point of the weld bead 110 via the middle point A (i+1) may not accurately reflect the length of the weld bead 110 .

本実施形態によれば、仮想点B(i+1)と仮想点C(i+1)とを結ぶ線分と、中点Aと中点A(i+1)とを結ぶ線分との交差角度に着目して、仮想点B(i+1)及び仮想点C(i+1)のいずれか一方、さらに、中点A(i+1)を再設定することにより、端点Aから中点A(i+1)を経由して溶接ビード110の終点に至る経路の距離が、溶接ビード110の長さを正しく反映できるようにする。これらにより、溶接ビード110の寸法を自動でかつ簡便に、さらに正確に測定することができる。 According to this embodiment, attention is paid to the intersection angle between the line segment connecting the virtual point B (i+1) and the virtual point C (i+1) and the line segment connecting the midpoint A i and the midpoint A (i+1). By resetting either virtual point B (i+1) or virtual point C (i+1) and also midpoint A (i+1) , welding can be performed from end point A 0 via midpoint A (i+1). The distance of the path to the end point of the bead 110 can accurately reflect the length of the weld bead 110. These allow the dimensions of the weld bead 110 to be measured automatically, easily, and more accurately.

基準線付与部6は、第1基準線に対し、両端のそれぞれから所定の長さ分を削除して仮基準線とする。さらに、仮基準線の両端近傍のそれぞれの傾きに応じた直線(延長線)を仮基準線の両端のそれぞれから溶接ビード110の輪郭に交差するまで延長する。 The reference line providing unit 6 removes a predetermined length from both ends of the first reference line to obtain a temporary reference line. Further, straight lines (extension lines) corresponding to the respective inclinations near both ends of the temporary reference line are extended from both ends of the temporary reference line until they intersect the outline of the weld bead 110.

さらに、基準線付与部6は、仮基準線と、仮基準線の両端からそれぞれ延長した直線(延長線)とを合成した線を新たに第1基準線として輪郭データに付与する。 Further, the reference line providing unit 6 adds a new first reference line to the outline data, which is a line that is a composite of the temporary reference line and straight lines (extension lines) each extending from both ends of the temporary reference line.

寸法算出部7は、新たに設定された第1基準線の長さを溶接ビード110の長さとして算出し、かつ仮想点B(i+1)と仮想点C(i+1)とを結ぶ線分の長さを溶接ビード110の幅として算出する。 The dimension calculation unit 7 calculates the length of the newly set first reference line as the length of the weld bead 110, and calculates the length of the line segment connecting virtual point B (i+1) and virtual point C (i+1). The width is calculated as the width of the weld bead 110.

前述したように、抽出後のビード領域データにノイズが含まれる場合があり、溶接ビード110の長さを算出すると、実際の長さと異なる値が出力されることがある。あるいは、端点取得部5で、端点が適切に取得できていない場合、第1基準線自体が適切に生成されず、ひいては、溶接ビード110の長さの算出値が、実際の長さと異なって出力されることがある。 As described above, the extracted bead area data may contain noise, and when the length of the weld bead 110 is calculated, a value different from the actual length may be output. Alternatively, if the end points are not properly acquired by the end point acquisition unit 5, the first reference line itself is not properly generated, and the calculated value of the length of the weld bead 110 is output different from the actual length. may be done.

一方、本実施形態によれば、最初に設定した第1基準線の両端を削除して、適切な傾きの延長線を溶接ビード110の輪郭に達するように追加することで、輪郭データに対し、適切な形で第1基準線を適付与することができる。また、このことにより、輪郭データに対し、複数の第2基準線も適切に付与することができる。以上のことから、溶接ビード110の長さや幅を正確に算出することができる。 On the other hand, according to the present embodiment, by deleting both ends of the first reference line initially set and adding an extension line with an appropriate slope so as to reach the outline of the weld bead 110, The first reference line can be applied in an appropriate manner. Moreover, thereby, a plurality of second reference lines can also be appropriately added to the contour data. From the above, the length and width of weld bead 110 can be calculated accurately.

データ取得部1で取得される形状データは複数の画素データからなり、かつ複数の画素データのそれぞれは、少なくとも色情報または距離情報、具体的には、三次元形状計測センサ31と母材100の表面の所定の位置または溶接ビード110の表面の所定の位置との距離である距離情報を含んでいるのが好ましい。 The shape data acquired by the data acquisition unit 1 consists of a plurality of pixel data, and each of the plurality of pixel data includes at least color information or distance information, specifically, information about the three-dimensional shape measurement sensor 31 and the base material 100. Preferably, it includes distance information that is a distance from a predetermined position on the surface or a predetermined position on the surface of weld bead 110.

この場合、ビード領域抽出部2は、当該色情報または当該距離情報に基づいて、かつ予めアノテーションが付与された学習データを用いて学習強化された所定のアルゴリズムを用いて、形状データからビード領域データを抽出するのが好ましい。 In this case, the bead area extraction unit 2 extracts bead area data from the shape data using a predetermined algorithm that is trained based on the color information or the distance information and is trained using learning data annotated in advance. It is preferable to extract.

このようにすることで、形状データからビード領域データを精度良く抽出することができる。溶接ビード110の形状は多岐にわたり数式で一般化しづらい。このため、変化点を抽出する方法等の、従来のルールベースでの数式によるアプローチで、溶接ビード110が形成された母材100の形状データから溶接ビード110の形成領域としてビード領域データを安定して抽出することは困難である。 By doing so, bead area data can be extracted from the shape data with high accuracy. The shape of the weld bead 110 is diverse and difficult to generalize using a mathematical formula. For this reason, bead area data can be stabilized as the formation area of the weld bead 110 from the shape data of the base material 100 in which the weld bead 110 is formed, using a conventional rule-based mathematical approach such as a method of extracting changing points. It is difficult to extract the

一方、本実施形態によれば、形状データにおける画素データに含まれる色情報に着目し、さらに、学習強化されたアルゴリズムを用いて、形状データに対して、いわゆるAI(Artificial Intelligence)処理を行っている。このことにより、溶接ビード110や母材100の形状によらず、形状データからビード領域データを精度良く抽出することができる。 On the other hand, according to the present embodiment, attention is paid to color information included in pixel data in the shape data, and further, so-called AI (Artificial Intelligence) processing is performed on the shape data using a learning-enhanced algorithm. There is. This makes it possible to accurately extract bead area data from the shape data, regardless of the shape of the weld bead 110 or the base material 100.

本実施形態に係る溶接ビード110の寸法測定方法は、以下の第1~第7ステップを少なくとも備えている。 The method for measuring dimensions of weld bead 110 according to the present embodiment includes at least the following first to seventh steps.

第1ステップ(図4のステップS1の形状データの取得)では、溶接ビード110が形成された母材100の形状データを取得し、第2ステップ(図4のステップS2のビード領域データ抽出)では、形状データから溶接ビード110の形成領域をビード領域データとして抽出する。 In the first step (obtaining shape data in step S1 in FIG. 4), shape data of the base material 100 on which the weld bead 110 is formed is obtained, and in the second step (bead area data extraction in step S2 in FIG. 4), , the formation area of the weld bead 110 is extracted from the shape data as bead area data.

第3ステップ(図4のステップS3の輪郭データの取得)では、ビード領域データに基づいて、溶接ビード110の輪郭を輪郭データとして抽出し、第4ステップ(図4のステップS4のスムージング処理)では、輪郭データに対してスムージング処理を行い、第5ステップ(図4のステップS5の端点取得)では、スムージング処理された輪郭データに基づいて、溶接ビード110の端点を取得する。 In the third step (obtaining contour data in step S3 in FIG. 4), the contour of the weld bead 110 is extracted as contour data based on the bead area data, and in the fourth step (smoothing process in step S4 in FIG. 4), , smoothing processing is performed on the contour data, and in a fifth step (endpoint acquisition in step S5 in FIG. 4), endpoints of the weld bead 110 are acquired based on the smoothed contour data.

第6ステップ(図4のステップS6)では、取得された端点を起点として、溶接ビード110の長さを測定するための第1基準線と、溶接ビード110の幅を測定するための複数の第2基準線とを、輪郭データに付与する。具体的には、前記第6ステップでは、前記第1基準線と複数の前記第2基準線の中点位置とが、所定の角度範囲内でそれぞれ交差するように、前記第1基準線と複数の前記第2基準線とを前記輪郭データに付与する。第7ステップ(図4のステップS7の寸法算出)では、第1基準線に基づいて溶接ビード110の長さを算出し、かつ複数の第2基準線に基づいて、溶接ビード110の幅を第1基準線に沿った複数個所で算出する。ここで、第2基準線は、溶接ビード110の少なくともいずれか片側の輪郭に沿ってかつ第1距離で、第1基準線と複数の第2基準線の中点位置とが、所定の角度範囲内でそれぞれ交差するように、第2基準線が交差する溶接ビード110の両側の輪郭上の2点が順次移動しながら、付与される。このようにすることで、任意のビード領域データの複雑なビード領域データ、例えば異なる複数の曲線の連続を含む溶接ビード110の形成領域であるビード領域データに対し、第1基準線と、第1基準線にそれぞれ交差する複数の第2基準線とを容易に付与することができる。なお、第1距離は、複数種類の等間隔の距離で構成されてもよい。 In the sixth step (step S6 in FIG. 4), a first reference line for measuring the length of the weld bead 110 and a plurality of reference lines for measuring the width of the weld bead 110 are established starting from the acquired end point. 2 reference lines are added to the contour data. Specifically, in the sixth step, the first reference line and the plurality of second reference lines are arranged such that the first reference line and the plurality of second reference lines intersect each other within a predetermined angular range. and the second reference line is added to the contour data. In the seventh step (dimension calculation in step S7 in FIG. 4), the length of the weld bead 110 is calculated based on the first reference line, and the width of the weld bead 110 is calculated based on the plurality of second reference lines. Calculate at multiple locations along one reference line. Here, the second reference line is located along the contour of at least one side of the weld bead 110 at a first distance, and the midpoint position of the first reference line and the plurality of second reference lines is within a predetermined angular range. The two points on the contour on both sides of the weld bead 110 where the second reference line intersects are sequentially moved so as to intersect within the two points. By doing so, the first reference line and the first A plurality of second reference lines that intersect each reference line can be easily provided. Note that the first distance may be composed of a plurality of types of equally spaced distances.

本実施形態によれば、母材100や溶接ビード110がそれぞれ任意の形状である場合にも、複雑な測定条件等の設定を行うこと無く、溶接ビード110の寸法を自動でかつ簡便に測定することができる。また、このことにより、溶接ビード110の寸法が所定の規格範囲から外れた不良品を簡便かつ確実に検出できるため、検査費用を低減できる。 According to this embodiment, even if the base material 100 and the weld bead 110 have arbitrary shapes, the dimensions of the weld bead 110 can be automatically and easily measured without setting complicated measurement conditions. be able to. Furthermore, this makes it possible to easily and reliably detect defective products in which the dimensions of the weld bead 110 deviate from a predetermined standard range, thereby reducing inspection costs.

第5ステップの端点取得で、端点が複数取得された場合、第6ステップでは、複数の端点のそれぞれを起点として、第1基準線を輪郭データに付与する。さらに、付与された複数の第1基準線のそれぞれに対応して複数の第2基準線を輪郭データに付与する。 If a plurality of endpoints are acquired in the endpoint acquisition in the fifth step, in the sixth step, a first reference line is attached to the contour data using each of the plurality of endpoints as a starting point. Furthermore, a plurality of second reference lines are provided to the contour data corresponding to each of the provided plurality of first reference lines.

第7ステップの寸法算出では、複数の第1基準線のそれぞれに基づいて、溶接ビード110の長さを算出し、算出された複数の溶接ビード110の長さのうち、最大値を溶接ビード110の確定長さとする。さらに、確定長さを有する第1基準線に対応した複数の第2基準線に基づいて、溶接ビード110の幅を第1基準線に沿った複数個所で算出する。 In the dimension calculation in the seventh step, the length of the weld bead 110 is calculated based on each of the plurality of first reference lines, and the maximum value of the plurality of calculated lengths of the weld bead 110 is set as the weld bead 110. Let the fixed length be . Further, based on a plurality of second reference lines corresponding to the first reference line having a determined length, the width of the weld bead 110 is calculated at a plurality of locations along the first reference line.

このようにすることで、例えば、端点取得部5で適切な端点を選択し切れず、複数の端点が取得された場合にも、溶接ビード110の寸法を自動でかつ簡便に、さらに正確に測定することができる。 By doing this, for example, even if the end point acquisition unit 5 cannot select an appropriate end point and a plurality of end points are acquired, the dimensions of the weld bead 110 can be automatically, easily, and more accurately measured. can do.

第6ステップは、溶接ビード110の端点を端点Aとし、端点A上に仮想点B及び仮想点C(iは0または1以上の整数)それぞれ付与するステップ(図10のステップS31)と、第1ループ処理(図10のステップS32,S33)と、を少なくとも含んでいる。 The sixth step is to define the end point of the weld bead 110 as the end point A0 , and to add a virtual point B i and a virtual point C i (i is an integer of 0 or 1 or more) to the end point A 0 (step S31 in FIG. 10). ) and a first loop process (steps S32 and S33 in FIG. 10).

第1ループ処理は、仮想点Bから、溶接ビード110の輪郭に沿って、端点Aから遠ざかる方向である第1方向に第1距離だけ進んだ点を仮想点B(i+1)とするステップ(図10のステップS32)を少なくとも含んでいる。第1ループ処理は、仮想点Cから、溶接ビード110の輪郭に沿って、端点Aから遠ざかる方向であって、第1方向と異なる方向である第2方向に第1距離だけ進んだ点を仮想点C(i+1)とするステップ(図10のステップS32)をさらに含んでいる。第1ループ処理は、仮想点B(i+1)と仮想点C(i+1)との中点を中点A(i+1)に設定するステップ(図10のステップS33)をさらに含んでいる。 The first loop process is a step of setting a virtual point B (i+1) as a point that has proceeded from the virtual point B i by a first distance in a first direction, which is a direction away from the end point A 0 , along the outline of the weld bead 110. (Step S32 in FIG. 10). The first loop process starts from a virtual point Ci along the outline of the welding bead 110, and proceeds by a first distance in a second direction that is a direction away from an end point A0 and that is different from the first direction. The process further includes a step of setting C (i+1) as a virtual point (step S32 in FIG. 10). The first loop process further includes a step (step S33 in FIG. 10) of setting the midpoint between virtual point B (i+1) and virtual point C (i+1) to midpoint A (i+1) .

第6ステップにおいて、仮想点B(i+1)と仮想点C(i+1)とを結ぶ線分が、所定の角度範囲(90(°)±δ(°))内で中点Aと中点A(i+1)とを結ぶ線分と交差する場合は、端点Aから仮想点B(kは整数で、1≦k<i)を経由して仮想点Bに至るまでの経路の距離と、端点Aから仮想点Cを経由して仮想点Cに至るまでの経路の距離との和が、溶接ビード110の輪郭の長さを超えるまで、第1ループ処理を1回または複数回実行し、第1基準線と複数の第2基準線とを輪郭データに付与する。 In the sixth step, a line segment connecting virtual point B (i+1) and virtual point C (i+1) is set between midpoint A i and midpoint A within a predetermined angular range (90 (°) ± δ (°)). (i+1) , the distance of the path from the end point A 0 to the virtual point B i via the virtual point B k (k is an integer, 1≦k<i) , the first loop process is performed one or more times until the sum of the distance of the path from the end point A 0 to the virtual point C i via the virtual point C k exceeds the length of the outline of the weld bead 110. The first reference line and the plurality of second reference lines are added to the contour data.

このようにすることで、溶接ビード110の長さを決定する第1基準線を自動でかつ簡便に、さらに正確に設定することができる。このことに応じて、複数の第2基準線のそれぞれを自動でかつ簡便に、さらに正確に設定することができる。これらにより、溶接ビード110の寸法を自動でかつ簡便に、さらに正確に測定することができる。 By doing so, the first reference line for determining the length of the weld bead 110 can be automatically, simply, and more accurately set. Accordingly, each of the plurality of second reference lines can be automatically, simply, and more accurately set. These allow the dimensions of the weld bead 110 to be measured automatically, easily, and more accurately.

仮想点B(i+1)と仮想点C(i+1)とを結ぶ線分が、所定の角度範囲を超えて中点Aと中点A(i+1)とを結ぶ線分と交差する場合は、第6ステップは、第2ループ処理(図10のステップS36,S37)をさらに含む。 If the line segment connecting virtual point B (i+1) and virtual point C (i+1) intersects the line segment connecting midpoint A i and midpoint A (i+1) beyond a predetermined angular range, Step 6 further includes second loop processing (steps S36 and S37 in FIG. 10).

第2ループ処理は、仮想点B(i+1)及び仮想点C(i+1)のいずれか一方を溶接ビード110の輪郭に沿って、かつ端点Aから遠ざかる方向に第1距離だけ進めて、移動後の点を仮想点B(i+2)または仮想点C(i+2)と設定するステップ(図10のステップS36)を少なくとも含んでいる。 In the second loop process, one of the virtual points B (i+1) and C (i+1) is advanced along the outline of the weld bead 110 by a first distance in a direction away from the end point A0 , and after the movement, The process includes at least the step of setting the point as virtual point B (i+2) or virtual point C (i+2) (step S36 in FIG. 10).

また、第2ループ処理は、仮想点B(i+2)と仮想点C(i+1)とを結ぶ線分と、中点Aと中点A(i+1)とを結ぶ線分との交差角度に対して、仮想点B(i+1)と仮想点C(i+2)とを結ぶ線分と、中点Aと中点A(i+1)とを結ぶ線分との交差角度を比較し、かつ所定の角度範囲内かそれに近い交差角度となる仮想点B(i+2)または仮想点C(i+2)を選択するステップ(図10のステップS37)を含んでいる。 In addition, the second loop process calculates the intersection angle between the line segment connecting virtual point B (i+2) and virtual point C (i+1) and the line segment connecting midpoint A i and midpoint A (i+1). Then, compare the intersection angles of the line segment connecting virtual point B (i+1) and virtual point C (i+2) with the line segment connecting midpoint A i and midpoint A (i+1) , and find a predetermined angle. This includes a step (step S37 in FIG. 10) of selecting virtual point B (i+2) or virtual point C (i+2) whose intersection angle is within or close to the range.

選択された仮想点が仮想点B(i+2)の場合、第2ループ処理は、中点A(i+1)を仮想点B(i+2)と仮想点C(i+1)との中点に修正するとともに、仮想点B(i+2)を新たに仮想点B(i+1)に設定するステップ(図10のステップS37)をさらに含んでいる。 If the selected virtual point is virtual point B (i+2) , the second loop process corrects the midpoint A (i+1) to the midpoint between virtual point B (i+2) and virtual point C (i+1) , and The process further includes a step of newly setting virtual point B (i+2) to virtual point B (i+1) (step S37 in FIG. 10).

選択された仮想点が仮想点C(i+2)の場合、第2ループ処理は、中点A(i+1)を仮想点B(i+1)と仮想点C(i+2)との中点に修正するとともに、仮想点C(i+2)を新たに仮想点C(i+1)に設定するステップ(図10のステップS37)をさらに含んでいる。 When the selected virtual point is virtual point C (i+2) , the second loop process corrects the midpoint A (i+1) to the midpoint between virtual point B (i+1) and virtual point C (i+2) , and The process further includes a step (step S37 in FIG. 10) of newly setting the virtual point C (i+2) to the virtual point C (i+1) .

第6ステップでは、仮想点B(i+1)と仮想点C(i+1)とを結ぶ線分が、所定の角度範囲内で中点Aと中点A(i+1)とを結ぶ線分と交差するまで、第2ループ処理を繰り返し実行する。 In the sixth step, a line segment connecting virtual point B (i+1) and virtual point C (i+1) intersects a line segment connecting midpoint A i and midpoint A (i+1) within a predetermined angular range. The second loop process is repeatedly executed until.

本実施形態によれば、溶接ビード110の長さを決定する第1基準線をより正確に設定することができる。このことに応じて、溶接ビードの複数個所でのそれぞれの幅を決定する複数の第2基準線のそれぞれをより正確に設定することができる。 According to this embodiment, the first reference line that determines the length of the weld bead 110 can be set more accurately. Accordingly, it is possible to more accurately set each of the plurality of second reference lines that determine the respective widths of the weld bead at a plurality of locations.

また、仮想点B(i+1)と仮想点C(i+1)とを結ぶ線分と、中点Aと中点A(i+1)とを結ぶ線分との交差角度に着目して、仮想点B(i+1)及び仮想点C(i+1)のいずれか一方、さらに、中点A(i+1)を再設定することにより、端点Aから中点A(i+1)を経由して溶接ビード110の終点に至る経路の距離が、溶接ビード110の長さを正しく反映できるようにする。これらにより、溶接ビード110の寸法を自動でかつ簡便に、さらに正確に測定することができる。 Also, focusing on the intersection angle between the line segment connecting virtual point B (i+1) and virtual point C (i+1) and the line segment connecting midpoint A i and midpoint A (i+1) , (i+1) and the virtual point C (i+1) , and by resetting the midpoint A (i+1) , the end point of the weld bead 110 is reached from the end point A 0 via the midpoint A (i+1). The length of the weld bead 110 can be accurately reflected by the distance of the path leading to the weld bead 110. These allow the dimensions of the weld bead 110 to be measured automatically, easily, and more accurately.

第6ステップは、第1基準線に対し、両端のそれぞれから所定の長さ分を削除して仮基準線とするステップ(図13のステップS41)をさらに含んでいる。また、第6ステップは、仮基準線の両端近傍のそれぞれの傾きに応じた直線(延長線)を仮基準線の両端のそれぞれから溶接ビード110の輪郭に交差するまで延長するステップ(図13のステップS42)を含んでいる。 The sixth step further includes a step of deleting a predetermined length from both ends of the first reference line to obtain a temporary reference line (step S41 in FIG. 13). Further, the sixth step is a step of extending straight lines (extension lines) according to the respective inclinations near both ends of the temporary reference line from each end of the temporary reference line until they intersect the outline of the weld bead 110 (see FIG. 13). Step S42) is included.

第6ステップは、さらに、仮基準線と仮基準線の両端からそれぞれ延長した直線(延長線)とを合成した線を新たに第1基準線として前記輪郭データに付与するステップ(図13のステップS43)を含んでいる。 The sixth step is a step of adding a new first reference line to the contour data by combining the temporary reference line and straight lines (extension lines) each extending from both ends of the temporary reference line (step of FIG. 13). S43).

第7ステップの寸法算出では、新たに設定された第1基準線の長さを溶接ビード110の長さとして算出し、かつ仮想点B(i+1)と仮想点C(i+1)とを結ぶ線分の長さを溶接ビード110の幅として算出する。 In the dimension calculation in the seventh step, the length of the newly set first reference line is calculated as the length of the weld bead 110, and the line segment connecting virtual point B (i+1) and virtual point C (i+1) is The length of is calculated as the width of the weld bead 110.

本実施形態によれば、最初に設定した第1基準線の両端を削除して、適切な傾きの延長線を溶接ビード110の輪郭に達するように追加することで、輪郭データに対し、適切な形で第1基準線を適付与することができる。また、このことにより、輪郭データに対し、複数の第2基準線も適切に付与することができる。以上のことから、溶接ビード110の長さや幅を正確に算出することができる。 According to this embodiment, by deleting both ends of the first reference line that is initially set and adding an extension line with an appropriate inclination to reach the outline of the weld bead 110, an appropriate The first reference line can be appropriately provided in the shape of the image. Moreover, thereby, a plurality of second reference lines can also be appropriately added to the contour data. From the above, the length and width of weld bead 110 can be calculated accurately.

データ取得部1で取得される形状データは複数の画素データからなり、かつ複数の画素データのそれぞれは、少なくとも色情報または距離情報を含んでいるのが好ましい。 It is preferable that the shape data acquired by the data acquisition unit 1 consist of a plurality of pixel data, and each of the plurality of pixel data includes at least color information or distance information.

第2ステップでは、当該色情報に基づいて、かつ予めアノテーションが付与された学習データを用いて学習強化された所定のアルゴリズムを用いて、形状データからビード領域データを抽出するのが好ましい。 In the second step, it is preferable to extract bead area data from the shape data based on the color information and using a predetermined algorithm whose learning has been reinforced using learning data annotated in advance.

本実施形態によれば、形状データにおける画素データに含まれる色情報または距離情報に着目し、さらに、学習強化されたアルゴリズムを用いて、形状データに対して、AI処理を行っている。このことにより、溶接ビード110や母材100の形状によらず、形状データからビード領域データを精度良く抽出することができる。 According to this embodiment, AI processing is performed on the shape data by focusing on color information or distance information included in pixel data in the shape data, and using a learning-enhanced algorithm. This makes it possible to accurately extract bead area data from the shape data, regardless of the shape of the weld bead 110 or the base material 100.

本実施形態に係る寸法測定用プログラムは、1または複数のプロセッサに、前述した溶接ビード110の寸法測定方法を実行させる。 The dimension measurement program according to this embodiment causes one or more processors to execute the method for measuring the dimensions of weld bead 110 described above.

このようにすることで、母材100や溶接ビード110がそれぞれ任意の形状である場合にも、複雑な測定条件等の設定を行うこと無く、溶接ビード110の寸法を自動でかつ簡便に測定することができる。また、このことにより、溶接ビード110の寸法が所定の規格範囲から外れた不良品を簡便かつ確実に検出できるため、検査費用を低減できる。 In this way, even if the base metal 100 and the weld bead 110 have arbitrary shapes, the dimensions of the weld bead 110 can be automatically and easily measured without setting complicated measurement conditions. be able to. Furthermore, this makes it possible to easily and reliably detect defective products in which the dimensions of the weld bead 110 deviate from a predetermined standard range, thereby reducing inspection costs.

(実施形態2)
図17は、本実施形態に係る溶接箇所の良否判定装置の機能ブロックを示す。なお、図17において、実施形態1と同様の箇所については同一の符号を付して詳細な説明を省略する。また、寸法測定装置20の機能ブロックの構成及び各機能ブロックの機能は、図1に示したものと同様であるので、図示及び詳細な説明を省略する。
(Embodiment 2)
FIG. 17 shows functional blocks of the welding location quality determination device according to this embodiment. Note that in FIG. 17, the same parts as in Embodiment 1 are denoted by the same reference numerals, and detailed explanations are omitted. Further, since the configuration of the functional blocks of the dimension measuring device 20 and the functions of each functional block are the same as those shown in FIG. 1, illustration and detailed explanation will be omitted.

図17に示すように、溶接箇所の良否判定装置50は、寸法測定装置20と形状不良判定装置40と良否判定部51と表示/出力部52と、を少なくとも備えている。 As shown in FIG. 17, the welding location quality determining device 50 includes at least a dimension measuring device 20, a shape defect determining device 40, a quality determining section 51, and a display/output section 52.

形状不良判定装置40は、形状データ処理部41と不良判定部42と記憶部43とを少なくとも備えており、そのハードウェア構成は、図2に示すものと同様である。なお、ディスプレイ27は省略されうる。 The shape defect determination device 40 includes at least a shape data processing section 41, a defect determination section 42, and a storage section 43, and its hardware configuration is the same as that shown in FIG. 2. Note that the display 27 may be omitted.

形状データ処理部41は、外観検査装置30で取得された形状データのノイズ除去機能を有している。母材100の材質によって三次元形状計測センサ31から出射されたレーザ光線の反射率が異なるため、反射率が高すぎるとハレーション等が起こってノイズとなり、形状データに影響を与える場合がある。このため、例えば、CPU上で所定のソフトウェアを実行して、形状データ処理部41によるノイズのフィルタリング処理を実現している。 The shape data processing unit 41 has a function of removing noise from the shape data acquired by the visual inspection device 30. Since the reflectance of the laser beam emitted from the three-dimensional shape measurement sensor 31 differs depending on the material of the base material 100, if the reflectance is too high, halation or the like will occur, resulting in noise, which may affect the shape data. For this reason, for example, predetermined software is executed on the CPU to realize noise filtering processing by the shape data processing section 41.

なお、外観検査装置30に光学フィルタ(図示せず)を設けることによっても、同様にノイズを除去できる。光学フィルタとソフトウェア上のフィルタリング処理とを併用することで、高品質の形状データを得ることができる。 Note that noise can be similarly removed by providing an optical filter (not shown) in the visual inspection device 30. High-quality shape data can be obtained by using an optical filter and filtering processing on software.

不良判定部42は、形状データ処理部41でノイズ除去が行われた後の形状データを用いて、溶接ビード110を含む溶接箇所における形状不良の有無を判定する。また、不良判定部42は、形状不良の種類を推定する。さらに、不良判定部42は、溶接箇所における形状不良の位置やサイズを判定する。不良判定部42は、溶接不良の個数を判定するようにしてもよい。不良判定にあたっては、例えば、予め準備された不良判定用の学習データを用いて、機械学習を行うことで、形状データにおける不良の有無や種類等を推論するようにしてもよい。この場合は、CPU22またはGPU23上で、形状データに対して推論用のアルゴリズム処理が実行される。 The defect determining unit 42 uses the shape data after noise removal by the shape data processing unit 41 to determine whether there is a shape defect in the welding location including the weld bead 110. Furthermore, the defect determination unit 42 estimates the type of shape defect. Further, the defect determination unit 42 determines the position and size of the shape defect at the welding location. The defect determination unit 42 may determine the number of weld defects. For defect determination, for example, the presence or absence and type of defects in the shape data may be inferred by performing machine learning using learning data for defect determination prepared in advance. In this case, algorithm processing for inference is executed on the shape data on the CPU 22 or GPU 23.

記憶部43は、溶接箇所の形状不良判定結果を保存する。また、ノイズ除去が行われた後の形状データを一時的に保存するようにしてもよい。また、不良判定部42での判定に用いられるデータやソフトウェア、例えば、不良判定用の学習データや推論用のアルゴリズムを保存していてもよい。記憶部43は、RAM/ROM(図2参照)やHDDあるいはSSDで構成される。 The storage unit 43 stores the shape defect determination result of the welding location. Further, the shape data after noise removal may be temporarily stored. Further, data and software used for determination by the defect determination section 42, such as learning data for defect determination and algorithms for inference, may be stored. The storage unit 43 includes a RAM/ROM (see FIG. 2), an HDD, or an SSD.

良否判定部51は、寸法測定装置20の測定結果と、形状不良判定装置40の判定結果とに基づいて、溶接箇所の外観が所定の基準を満足するか否かを判定する。良否判定部51の機能は、例えば、CPU上で所定のソフトウェアを実行して、実現される。 The quality determining unit 51 determines whether the appearance of the welded area satisfies a predetermined standard based on the measurement results of the dimension measuring device 20 and the determination results of the shape defect determining device 40. The function of the quality determination unit 51 is realized, for example, by executing predetermined software on the CPU.

表示/出力部52は、良否判定部51の判定結果を表示するか、または図示しない外部の機器に出力する。表示/出力部52は、ディスプレイ(図2参照)や出力ポート(図2参照)あるいはその両方で構成される。 The display/output unit 52 displays the determination result of the quality determination unit 51 or outputs it to an external device (not shown). The display/output section 52 includes a display (see FIG. 2), an output port (see FIG. 2), or both.

本実施形態によれば、溶接ビード110の寸法と溶接箇所の形状不良の有無とを同じ形状データに基づいて同時に評価できる。このことにより、溶接箇所の外観が所定の基準を満たすか否かを自動でかつ簡便に、さらに精度良く評価できる。 According to this embodiment, the dimensions of the weld bead 110 and the presence or absence of a shape defect at the welding location can be evaluated simultaneously based on the same shape data. Thereby, it is possible to automatically and easily evaluate whether the appearance of the welded area satisfies a predetermined standard with higher precision.

なお、良否判定部51や表示/出力部52は、寸法測定装置20か形状不良判定装置40のいずれかに組み込まれていてもよい。また、寸法測定装置20と形状不良判定装置40とは、共通のハードウェアを利用していてもよい。 Note that the quality determining section 51 and the display/output section 52 may be incorporated in either the dimension measuring device 20 or the shape defect determining device 40. Further, the dimension measuring device 20 and the shape defect determining device 40 may use common hardware.

ただし、寸法測定用プログラムを実行するプロセッサと形状不良の有無等を判定するプログラムを実行するプロセッサとは、別個に設けられているのが好ましい。さらに、寸法測定用プログラムと形状不良の有無等を判定するプログラムとは、互いに独立して実行できることが好ましい。このようにすることで、溶接ビード110の寸法測定と溶接箇所の形状不良の有無等の判例を並列して同時に行え、溶接箇所の外観を判定するための時間を短縮できる。 However, it is preferable that the processor that executes the dimension measurement program and the processor that executes the program that determines the presence or absence of shape defects are provided separately. Furthermore, it is preferable that the dimension measurement program and the program for determining the presence or absence of shape defects, etc., can be executed independently of each other. By doing so, the dimension measurement of the weld bead 110 and the determination of the presence or absence of a shape defect in the welded part can be performed simultaneously in parallel, and the time required to judge the appearance of the welded part can be shortened.

(その他の実施形態)
本願明細書では、溶接ビード110の寸法測定を例に取って説明したが、測定対象は特にこれに限定されない。図1,2に示す寸法測定装置20を使用して、実施形態1に示す寸法測定手順を実行することで、輪郭が閉じた形状の領域や物品等の寸法を測定することができる。
(Other embodiments)
In this specification, the dimension measurement of the weld bead 110 has been described as an example, but the measurement target is not particularly limited to this. By using the dimension measuring device 20 shown in FIGS. 1 and 2 and executing the dimension measuring procedure shown in Embodiment 1, it is possible to measure the dimensions of a region with a closed outline, an article, or the like.

また、外観検査装置30が、作業者がハンドリング可能な治具(図示せず)と、当該治具に保持された三次元形状計測センサ31とで構成されていてもよい。この場合、作業者が治具を持ち、溶接ビード110に沿って三次元形状計測センサ31を手動で移動させて形状データを取得する。この場合も、図1,2に示す寸法測定装置20を使用して、実施形態1に示す寸法測定手順を実行することで、溶接ビード110の寸法を自動でかつ簡便に、さらに精度良く測定することができる。なお、この場合は、三次元形状計測センサ31と母材100や溶接ビード110との距離にばらつきが生じることがある。よって、前述した形状データの二分化状態への加工(図6のステップS12,S13)は、画素データに含まれる色情報に基づいて行う方がよい。 Moreover, the visual inspection device 30 may be configured with a jig (not shown) that can be handled by an operator and a three-dimensional shape measurement sensor 31 held by the jig. In this case, the operator holds a jig and manually moves the three-dimensional shape measurement sensor 31 along the weld bead 110 to obtain shape data. In this case as well, by using the dimension measuring device 20 shown in FIGS. 1 and 2 and executing the dimension measuring procedure shown in Embodiment 1, the dimensions of the weld bead 110 can be automatically, simply, and more precisely measured. be able to. In this case, the distance between the three-dimensional shape measurement sensor 31 and the base material 100 or weld bead 110 may vary. Therefore, it is better to perform the above-described processing of the shape data into a bisected state (steps S12 and S13 in FIG. 6) based on the color information included in the pixel data.

なお、形状データに含まれる位置情報は、三次元座標の情報に限られず、二次元座標の情報であってもよい。当該位置情報が三次元座標の情報の場合、溶接ビード110の形成領域を特定し、母材100の表面との高さの差を取ることにより、溶接ビード110の高さや脚長を得ることも可能である。 Note that the position information included in the shape data is not limited to three-dimensional coordinate information, but may be two-dimensional coordinate information. If the position information is three-dimensional coordinate information, it is also possible to obtain the height and leg length of the weld bead 110 by specifying the formation area of the weld bead 110 and taking the difference in height from the surface of the base material 100. It is.

また、寸法測定装置20に、図17に示す、取得された形状データのノイズ除去機能を有する形状データ処理部41が組み込まれていてもよい。あるいは、データ取得部1に形状データ処理部41の機能が組み込まれていてもよい。 Further, the dimension measuring device 20 may include a shape data processing section 41 shown in FIG. 17 that has a function of removing noise from acquired shape data. Alternatively, the function of the shape data processing section 41 may be incorporated into the data acquisition section 1.

本開示の溶接ビードの寸法測定装置は、母材や溶接ビードがそれぞれ任意の形状である場合にも、溶接ビードの寸法を自動でかつ簡便に測定できるため、工業上、非常に有用である。 The weld bead size measuring device of the present disclosure is industrially very useful because it can automatically and easily measure the weld bead size even when the base material and the weld bead have arbitrary shapes.

1 データ取得部
2 ビード領域抽出部
3 輪郭抽出部
4 スムージング処理部
5 端点取得部
6 基準線付与部
7 寸法算出部
8 記憶部
9 表示部
10 学習データ生成部
20 寸法測定装置
21 入力ポート
22 CPU
23 GPU
24 RAM/ROM
25 出力ポート
26 データバス
27 ディスプレイ
30 外観検査装置
31 三次元形状計測センサ
32 ロボット
40 形状不良判定装置
41 形状データ処理部
42 不良判定部
43 記憶部
50 良否判定装置
51 良否判定部
52 表示/出力部
100 母材
110 溶接ビード
1 Data acquisition unit 2 Bead area extraction unit 3 Contour extraction unit 4 Smoothing processing unit 5 End point acquisition unit 6 Reference line provision unit 7 Dimension calculation unit 8 Storage unit 9 Display unit 10 Learning data generation unit 20 Dimension measurement device 21 Input port 22 CPU
23 GPU
24 RAM/ROM
25 Output port 26 Data bus 27 Display 30 Visual inspection device 31 Three-dimensional shape measurement sensor 32 Robot 40 Shape defect determination device 41 Shape data processing section 42 Defect determination section 43 Storage section 50 Acceptability determination device 51 Acceptability determination section 52 Display/output section 100 Base metal 110 Weld bead

Claims (16)

母材に形成された溶接ビードの寸法を測定する寸法測定装置であって、
前記溶接ビードが形成された前記母材の形状データを取得するデータ取得部と、
前記形状データから前記溶接ビードの形成領域をビード領域データとして抽出するビード領域抽出部と、
前記ビード領域データに基づいて、前記溶接ビードの輪郭を輪郭データとして抽出する輪郭抽出部と、
前記輪郭データに対してスムージング処理を行うスムージング処理部と、
スムージング処理された前記輪郭データに基づいて、前記溶接ビードの端点を取得する端点取得部と、
前記端点を起点として、前記溶接ビードの長さを測定するための第1基準線と、前記溶接ビードの幅を測定するための複数の第2基準線とを、前記輪郭データに付与する基準線付与部と、
前記第1基準線に基づいて前記溶接ビードの長さを算出し、かつ複数の前記第2基準線に基づいて、前記溶接ビードの幅を前記第1基準線に沿った複数個所で算出する寸法算出部と、を少なくとも備え、
前記基準線付与部は、前記第1基準線と複数の前記第2基準線の中点位置とが、所定の角度範囲内でそれぞれ交差するように、前記第1基準線と複数の前記第2基準線とを前記輪郭データに付与することを特徴とする寸法測定装置。
A dimension measuring device for measuring the dimensions of a weld bead formed on a base material,
a data acquisition unit that acquires shape data of the base material on which the weld bead is formed;
a bead area extraction unit that extracts the weld bead formation area from the shape data as bead area data;
a contour extraction unit that extracts the contour of the weld bead as contour data based on the bead area data;
a smoothing processing unit that performs smoothing processing on the contour data;
an end point obtaining unit that obtains end points of the weld bead based on the smoothed contour data;
A first reference line for measuring the length of the weld bead and a plurality of second reference lines for measuring the width of the weld bead, starting from the end point, are added to the contour data. A granting section;
A dimension in which the length of the weld bead is calculated based on the first reference line, and the width of the weld bead is calculated at a plurality of locations along the first reference line based on a plurality of second reference lines. comprising at least a calculation unit;
The reference line providing unit is configured to arrange the first reference line and the plurality of second reference lines so that the first reference line and the plurality of second reference lines intersect each other within a predetermined angular range. A dimension measuring device characterized in that a reference line is added to the contour data.
請求項1に記載の寸法測定装置において、
前記基準線付与部では、前記第2基準線は、前記溶接ビードの少なくともいずれか片側の輪郭に沿って、かつ第1距離で、前記第1基準線と複数の前記第2基準線の中点位置とが、所定の角度範囲内でそれぞれ交差するように、前記第2基準線が交差する前記溶接ビードの両側の輪郭上の2点が順次移動しながら、付与されることを特徴とする寸法測定装置。
The dimension measuring device according to claim 1,
In the reference line providing section, the second reference line is located at a midpoint between the first reference line and the plurality of second reference lines along the contour of at least one side of the weld bead and at a first distance. The dimension is given by sequentially moving two points on the contour on both sides of the weld bead where the second reference line intersects so that the positions intersect within a predetermined angular range. measuring device.
請求項1に記載の寸法測定装置において、
前記端点取得部が複数の前記端点を取得した場合、
前記基準線付与部は、複数の前記端点のそれぞれを起点として、前記第1基準線を前記輪郭データに付与するとともに、付与された複数の前記第1基準線のそれぞれに対応して複数の前記第2基準線を前記輪郭データに付与し、
前記寸法算出部は、複数の前記第1基準線のそれぞれに基づいて、前記溶接ビードの長さを算出し、算出された複数の前記溶接ビードの長さのうち、最大値を前記溶接ビードの確定長さとするとともに、前記確定長さを有する前記第1基準線に対応した複数の前記第2基準線に基づいて、前記溶接ビードの幅を前記第1基準線に沿った複数個所で算出することを特徴とする寸法測定装置。
The dimension measuring device according to claim 1,
When the end point acquisition unit acquires a plurality of end points,
The reference line providing unit applies the first reference line to the contour data using each of the plurality of end points as a starting point, and the plurality of reference lines corresponding to each of the provided plurality of first reference lines. adding a second reference line to the contour data;
The dimension calculation unit calculates the length of the weld bead based on each of the plurality of first reference lines, and calculates the maximum value of the plurality of calculated weld bead lengths. The width of the weld bead is calculated at a plurality of locations along the first reference line based on the plurality of second reference lines corresponding to the first reference line having the fixed length. A dimension measuring device characterized by:
請求項1に記載の寸法測定装置において、
前記基準線付与部は、
前記端点を端点Aとし、前記端点A上に仮想点B及び仮想点Cをそれぞれ付与する初期設定処理と、
仮想点B(iは0または1以上の整数)から、前記輪郭に沿って、前記端点Aから遠ざかる方向である第1方向に第1距離だけ進んだ点を仮想点B(i+1)とし、
仮想点Cから、前記輪郭に沿って、前記端点Aから遠ざかる方向であって、前記第1方向と異なる方向である第2方向に前記第1距離だけ進んだ点を仮想点C(i+1)とし、
さらに前記仮想点B(i+1)と前記仮想点C(i+1)との中点を中点A(i+1)に設定する第1ループ処理と、を少なくとも実行し、
前記仮想点B(i+1)と前記仮想点C(i+1)とを結ぶ線分が、所定の角度範囲内で前記中点Aと前記中点A(i+1)とを結ぶ線分と交差する場合は、
前記基準線付与部は、前記端点Aから仮想点B(kは整数で、1≦k<i)を経由して前記仮想点Bに至るまでの経路の距離と、前記端点Aから仮想点Cを経由して前記仮想点Cに至るまでの経路の距離との和が、前記輪郭の長さを超えるまで、前記第1ループ処理を1回または複数回実行し、前記第1基準線と複数の前記第2基準線とを前記輪郭データに付与することを特徴とする寸法測定装置。
The dimension measuring device according to claim 1,
The reference line providing section is
Initial setting processing for setting the end point as an end point A 0 and adding a virtual point B 0 and a virtual point C 0 on the end point A 0 , respectively;
A virtual point B (i +1) is a point that advances from the virtual point B i (i is an integer of 0 or 1 or more) along the contour by a first distance in a first direction that is a direction away from the end point A 0 . ,
A virtual point C (i+1 ) and
further performing at least a first loop process of setting the midpoint between the virtual point B (i+1) and the virtual point C (i+1) to the midpoint A (i+1) ;
When a line segment connecting the virtual point B (i+1) and the virtual point C (i+1) intersects a line segment connecting the midpoint A i and the midpoint A (i+1) within a predetermined angular range. teeth,
The reference line providing unit determines the distance of a route from the end point A 0 to the virtual point B i via the virtual point B k (k is an integer, 1≦k<i), and the end point A 0 . The first loop process is executed one or more times until the sum of the distance from the path from the virtual point C k to the virtual point C i exceeds the length of the contour, and A dimension measuring device characterized in that a first reference line and a plurality of the second reference lines are added to the contour data.
請求項4に記載の寸法測定装置において、
前記仮想点B(i+1)と前記仮想点C(i+1)とを結ぶ線分が、前記所定の角度範囲を超えて前記中点Aと前記中点A(i+1)とを結ぶ線分と交差する場合は、
前記基準線付与部は、
前記仮想点B(i+1)及び前記仮想点C(i+1)のいずれか一方を前記輪郭に沿って、かつ前記端点Aから遠ざかる方向に前記第1距離だけ進めて、移動後の点を仮想点B(i+2)または仮想点C(i+2)と設定し、
前記仮想点B(i+2)と前記仮想点C(i+1)とを結ぶ線分と前記中点Aと前記中点A(i+1)とを結ぶ線分の交差角度と、前記仮想点B(i+1)と前記仮想点C(i+2)とを結ぶ線分と前記中点Aと前記中点A(i+1)とを結ぶ線分の交差角度とを比較し、かつ前記所定の角度範囲内かそれに近い交差角度となる前記仮想点B(i+2)または前記仮想点C(i+2)を選択し、
選択された仮想点が前記仮想点B(i+2)の場合、前記中点A(i+1)を前記仮想点B(i+2)と前記仮想点C(i+1)との中点に修正するとともに、前記仮想点B(i+2)を新たに前記仮想点B(i+1)に設定し、
選択された仮想点が前記仮想点C(i+2)の場合、前記中点A(i+1)を前記仮想点B(i+1)と前記仮想点C(i+2)との中点に修正するとともに、前記仮想点C(i+2)を新たに前記仮想点C(i+1)に設定する第2ループ処理を実行し、
前記仮想点B(i+1)と前記仮想点C(i+1)とを結ぶ線分が、前記所定の角度範囲内で前記中点Aと前記中点A(i+1)とを結ぶ線分と交差するまで、前記第2ループ処理を繰り返し実行することを特徴とする寸法測定装置。
The dimension measuring device according to claim 4,
A line segment connecting the virtual point B (i+1) and the virtual point C (i+1) intersects a line segment connecting the midpoint A i and the midpoint A (i+1) beyond the predetermined angular range. If you do,
The reference line providing section is
One of the virtual point B (i+1) and the virtual point C (i+1) is advanced by the first distance along the contour and in a direction away from the end point A0 , and the point after the movement is set as a virtual point. Set B (i+2) or virtual point C (i+2) ,
The intersection angle of the line segment connecting the virtual point B (i+2) and the virtual point C (i+1) , the line segment connecting the midpoint A i and the midpoint A (i+1) , and the virtual point B (i+1) ) and the virtual point C (i+2) and the intersection angle of the line segment connecting the midpoint A i and the midpoint A (i+1) are compared, and whether or not it is within the predetermined angle range. Select the virtual point B (i+2) or the virtual point C (i+2) that has a close intersection angle,
When the selected virtual point is the virtual point B (i+2) , the midpoint A (i+1) is corrected to the midpoint between the virtual point B (i+2) and the virtual point C (i+1) , and the virtual point Point B (i+2) is newly set as the virtual point B (i+1) ,
If the selected virtual point is the virtual point C (i+2) , the midpoint A (i+1) is corrected to the midpoint between the virtual point B (i+1) and the virtual point C (i+2) , and the virtual point Execute a second loop process to newly set point C (i+2) to the virtual point C (i+1) ,
A line segment connecting the virtual point B (i+1) and the virtual point C (i+1) intersects a line segment connecting the midpoint A i and the midpoint A (i+1) within the predetermined angular range. A dimension measuring device characterized in that the second loop process is repeatedly executed until the end of the process.
請求項4に記載の寸法測定装置において、
前記基準線付与部は、前記第1基準線に対し、両端のそれぞれから所定の長さ分を削除して仮基準線とするとともに、前記仮基準線の両端近傍のそれぞれの傾きに応じた直線を前記仮基準線の両端のそれぞれから前記輪郭に交差するまで延長し、
さらに、前記基準線付与部は、前記仮基準線と、前記仮基準線の両端からそれぞれ延長した直線とを合成した線を新たに前記第1基準線として前記輪郭データに付与し、
前記寸法算出部は、新たに設定された前記第1基準線の長さを前記溶接ビードの長さとして算出し、かつ前記仮想点B(i+1)と前記仮想点C(i+1)とを結ぶ線分の長さを前記溶接ビードの幅として算出することを特徴とする寸法測定装置。
The dimension measuring device according to claim 4,
The reference line providing section removes a predetermined length from each of both ends of the first reference line to obtain a temporary reference line, and creates a straight line according to the slope of each of the vicinity of both ends of the temporary reference line. extends from each end of the temporary reference line until it intersects the contour,
Furthermore, the reference line providing unit adds a new line to the outline data as the first reference line, which is a combination of the temporary reference line and straight lines each extending from both ends of the temporary reference line,
The dimension calculation unit calculates the length of the newly set first reference line as the length of the weld bead, and calculates a line connecting the virtual point B (i+1) and the virtual point C (i+1). A dimension measuring device characterized in that the length of the weld bead is calculated as the width of the weld bead.
請求項1ないし6のいずれか1項に記載の寸法測定装置において、
前記形状データは複数の画素データからなり、かつ複数の前記画素データのそれぞれは、少なくとも色情報または距離情報を含んでおり、
前記色情報は、前記画素データに含まれる色成分の情報であり、
前記距離情報は、前記画素データに含まれる前記母材または前記溶接ビードの表面位置と前記形状データを取得する三次元形状計測センサとの間の距離であり、
前記ビード領域抽出部は、前記色情報または前記距離情報に基づいて、かつ予めアノテーションが付与された学習データにより学習強化された所定のアルゴリズムを用いて、前記形状データから前記ビード領域データを抽出することを特徴とする寸法測定装置。
The dimension measuring device according to any one of claims 1 to 6,
The shape data consists of a plurality of pixel data, and each of the plurality of pixel data includes at least color information or distance information,
The color information is information on color components included in the pixel data,
The distance information is a distance between the surface position of the base material or the weld bead included in the pixel data and a three-dimensional shape measurement sensor that acquires the shape data,
The bead area extraction unit extracts the bead area data from the shape data based on the color information or the distance information and using a predetermined algorithm whose learning is reinforced by learning data annotated in advance. A dimension measuring device characterized by:
母材に形成された溶接ビードの寸法測定方法であって、
前記溶接ビードが形成された前記母材の形状データを取得する第1ステップと、
前記形状データから前記溶接ビードの形成領域をビード領域データとして抽出する第2ステップと、
前記ビード領域データに基づいて、前記溶接ビードの輪郭を輪郭データとして抽出する第3ステップと、
前記輪郭データに対してスムージング処理を行う第4ステップと、
スムージング処理された前記輪郭データに基づいて、前記溶接ビードの端点を取得する第5ステップと、
前記端点を起点として、前記溶接ビードの長さを測定するための第1基準線と、前記溶接ビードの幅を測定するための複数の第2基準線とを、前記輪郭データに付与する第6ステップと、
前記第1基準線に基づいて前記溶接ビードの長さを算出し、かつ複数の前記第2基準線に基づいて、前記溶接ビードの幅を前記第1基準線に沿った複数個所で算出する第7ステップと、を少なくとも備え、
前記第6ステップでは、前記第1基準線と複数の前記第2基準線の中点位置とが、所定の角度範囲内でそれぞれ交差するように、前記第1基準線と複数の前記第2基準線とを前記輪郭データに付与することを特徴とする寸法測定方法。
A method for measuring dimensions of a weld bead formed in a base material, the method comprising:
a first step of acquiring shape data of the base material on which the weld bead is formed;
a second step of extracting the weld bead formation area from the shape data as bead area data;
a third step of extracting the outline of the weld bead as outline data based on the bead area data;
a fourth step of performing smoothing processing on the contour data;
a fifth step of obtaining end points of the weld bead based on the smoothed contour data;
a sixth reference line for measuring the length of the weld bead and a plurality of second reference lines for measuring the width of the weld bead, starting from the end point, to the contour data; step and
A length of the weld bead is calculated based on the first reference line, and a width of the weld bead is calculated at a plurality of locations along the first reference line based on a plurality of second reference lines. comprising at least 7 steps,
In the sixth step, the first reference line and the plurality of second reference lines are arranged such that the first reference line and the plurality of second reference lines intersect each other within a predetermined angular range. A dimension measuring method characterized in that a line is added to the contour data.
請求項8に記載の寸法測定方法において、
前記第6ステップでは、前記第2基準線は、前記溶接ビードの少なくともいずれか片側の輪郭に沿って、かつ第1距離で、前記第1基準線と複数の前記第2基準線の中点位置とが、所定の角度範囲内でそれぞれ交差するように、前記第2基準線が交差する前記溶接ビードの両側の輪郭上の2点が順次移動しながら、付与されることを特徴とする寸法測定方法。
In the dimension measuring method according to claim 8,
In the sixth step, the second reference line is located at a midpoint between the first reference line and the plurality of second reference lines along the contour of at least one side of the weld bead and at a first distance. The dimension measurement is performed by sequentially moving two points on the contour on both sides of the weld bead where the second reference line intersects so that the two points intersect within a predetermined angular range. Method.
請求項8に記載の寸法測定方法において、
前記第5ステップで、前記端点が複数取得された場合、
前記第6ステップでは、複数の前記端点のそれぞれを起点として、前記第1基準線を前記輪郭データに付与するとともに、付与された複数の前記第1基準線のそれぞれに対応して複数の前記第2基準線を前記輪郭データに付与し、
前記第7ステップでは、複数の前記第1基準線のそれぞれに基づいて、前記溶接ビードの長さを算出し、算出された複数の前記溶接ビードの長さのうち、最大値を前記溶接ビードの確定長さとするとともに、前記確定長さを有する前記第1基準線に対応した複数の前記第2基準線に基づいて、前記溶接ビードの幅を前記第1基準線に沿った複数個所で算出することを特徴とする寸法測定方法。
In the dimension measuring method according to claim 8,
If a plurality of the end points are obtained in the fifth step,
In the sixth step, the first reference line is added to the contour data using each of the plurality of end points as a starting point, and the plurality of first reference lines are added to the outline data in correspondence with each of the plurality of added first reference lines. 2. Adding two reference lines to the contour data,
In the seventh step, the length of the weld bead is calculated based on each of the plurality of first reference lines, and the maximum value among the plurality of calculated lengths of the weld bead is set as the length of the weld bead. The width of the weld bead is calculated at a plurality of locations along the first reference line based on the plurality of second reference lines corresponding to the first reference line having the fixed length. A dimension measurement method characterized by:
請求項9に記載の寸法測定方法において、
前記第6ステップは、
前記端点を端点Aとし、前記端点A上に仮想点B及び仮想点Cをそれぞれ付与するステップと、
第1ループ処理と、を少なくとも含み、
前記第1ループ処理は、
仮想点B(iは0または1以上の整数)から、前記輪郭に沿って、前記端点Aから遠ざかる方向である第1方向に第1距離だけ進んだ点を仮想点B(i+1)とするステップと、
仮想点Cから、前記輪郭に沿って、前記端点Aから遠ざかる方向であって、前記第1方向と異なる方向である第2方向に前記第1距離だけ進んだ点を仮想点C(i+1)とするステップと、
前記仮想点B(i+1)と前記仮想点C(i+1)との中点を中点A(i+1)に設定するステップと、を少なくとも含み、
前記第6ステップにおいて、
前記仮想点B(i+1)と前記仮想点C(i+1)とを結ぶ線分が、所定の角度範囲内で前記中点Aと前記中点A(i+1)とを結ぶ線分と交差する場合は、
前記端点Aから仮想点B(kは整数で、1≦k<i)を経由して前記仮想点Bに至るまでの経路の距離と、前記端点Aから仮想点Cを経由して前記仮想点Cに至るまでの経路の距離との和が、前記輪郭の長さを超えるまで、前記第1ループ処理を1回または複数回実行し、前記第1基準線と複数の前記第2基準線とを前記輪郭データに付与することを特徴とする寸法測定方法。
In the dimension measuring method according to claim 9,
The sixth step is
setting the end point as an end point A 0 , and providing a virtual point B 0 and a virtual point C 0 on the end point A 0 , respectively;
At least including a first loop process,
The first loop processing is
A point that advances from the virtual point B i (i is an integer of 0 or 1 or more) along the contour by a first distance in a first direction that is a direction away from the end point A 0 is defined as a virtual point B (i+1) . the step of
A virtual point C (i+1 ) , and
at least the step of setting a midpoint between the virtual point B (i+1) and the virtual point C (i+1) to a midpoint A (i+1) ,
In the sixth step,
When a line segment connecting the virtual point B (i+1) and the virtual point C (i+1) intersects a line segment connecting the midpoint A i and the midpoint A (i+1) within a predetermined angular range. teeth,
The distance of the path from the end point A 0 to the virtual point B i via the virtual point B k (k is an integer, 1≦k<i), and from the end point A 0 to the virtual point C k The first loop process is performed once or multiple times until the sum of the distance of the path to the virtual point C i exceeds the length of the contour, and the first reference line and the plurality of A dimension measuring method characterized in that the second reference line is added to the contour data.
請求項11に記載の寸法測定方法において、
前記仮想点B(i+1)と前記仮想点C(i+1)とを結ぶ線分が、前記所定の角度範囲を超えて前記中点Aと前記中点A(i+1)とを結ぶ線分と交差する場合は、
前記第6ステップは、第2ループ処理をさらに含み、
前記第2ループ処理は、
前記仮想点B(i+1)及び前記仮想点C(i+1)のいずれか一方を前記輪郭に沿って、かつ前記端点Aから遠ざかる方向に前記第1距離だけ進めて、移動後の点を仮想点B(i+2)または仮想点C(i+2)と設定するステップと、
前記仮想点B(i+2)と前記仮想点C(i+1)とを結ぶ線分と前記中点Aと前記中点A(i+1)とを結ぶ線分の交差角度と、前記仮想点B(i+1)と前記仮想点C(i+2)とを結ぶ線分と前記中点Aと前記中点A(i+1)とを結ぶ線分の交差角度とを比較し、かつ前記所定の角度範囲内かそれに近い交差角度となる前記仮想点B(i+2)または前記仮想点C(i+2)を選択するステップと、
選択された仮想点が前記仮想点B(i+2)の場合、前記中点A(i+1)を前記仮想点B(i+2)と前記仮想点C(i+1)との中点に修正するとともに、前記仮想点B(i+2)を新たに前記仮想点B(i+1)に設定するステップと、
選択された仮想点が前記仮想点C(i+2)の場合、前記中点A(i+1)を前記仮想点B(i+1)と前記仮想点C(i+2)との中点に修正するとともに、前記仮想点C(i+2)を新たに前記仮想点C(i+1)に設定するステップと、を少なくとも含み、
前記仮想点B(i+1)と前記仮想点C(i+1)とを結ぶ線分が、前記所定の角度範囲内で前記中点Aと前記中点A(i+1)とを結ぶ線分と交差するまで、前記第2ループ処理を繰り返し実行することを特徴とする寸法測定方法。
In the dimension measuring method according to claim 11,
A line segment connecting the virtual point B (i+1) and the virtual point C (i+1) intersects a line segment connecting the midpoint A i and the midpoint A (i+1) beyond the predetermined angular range. If you do,
The sixth step further includes a second loop process,
The second loop processing is
One of the virtual point B (i+1) and the virtual point C (i+1) is advanced by the first distance along the contour and in a direction away from the end point A0 , and the point after the movement is set as a virtual point. a step of setting B (i+2) or virtual point C (i+2) ;
The intersection angle of the line segment connecting the virtual point B (i+2) and the virtual point C (i+1) , the line segment connecting the midpoint A i and the midpoint A (i+1) , and the virtual point B (i+1) ) and the virtual point C (i+2) and the intersection angle of the line segment connecting the midpoint A i and the midpoint A (i+1) are compared, and whether or not it is within the predetermined angle range. selecting the virtual point B (i+2) or the virtual point C (i+2) that has a close intersection angle;
When the selected virtual point is the virtual point B (i+2) , the midpoint A (i+1) is corrected to the midpoint between the virtual point B (i+2) and the virtual point C (i+1) , and the virtual point a step of newly setting point B (i+2) as the virtual point B (i+1) ;
If the selected virtual point is the virtual point C (i+2) , the midpoint A (i+1) is corrected to the midpoint between the virtual point B (i+1) and the virtual point C (i+2) , and the virtual point at least the step of newly setting point C (i+2) as the virtual point C (i+1) ,
A line segment connecting the virtual point B (i+1) and the virtual point C (i+1) intersects a line segment connecting the midpoint A i and the midpoint A (i+1) within the predetermined angular range. A method for measuring dimensions, characterized in that the second loop process is repeatedly executed until the end of the process.
請求項10に記載の寸法測定方法において、
前記第6ステップは、さらに、
前記第1基準線に対し、両端のそれぞれから所定の長さ分を削除して仮基準線とするとともに、前記仮基準線の両端近傍のそれぞれの傾きに応じた直線を前記仮基準線の両端のそれぞれから前記輪郭に交差するまで延長するステップと、
前記仮基準線と、前記仮基準線の両端からそれぞれ延長した直線とを合成した線を新たに前記第1基準線として前記輪郭データに付与するステップと、を含み、
前記第7ステップでは、新たに設定された前記第1基準線の長さを前記溶接ビードの長さとして算出し、かつ前記仮想点B(i+1)と前記仮想点C(i+1)とを結ぶ線分の長さを前記溶接ビードの幅として算出することを特徴とする寸法測定方法。
In the dimension measuring method according to claim 10,
The sixth step further includes:
A predetermined length is removed from each end of the first reference line to obtain a temporary reference line, and a straight line corresponding to the respective slopes near both ends of the temporary reference line is created at both ends of the temporary reference line. extending from each of the contours until intersecting the contour;
the step of adding a new line to the contour data as the first reference line, a line that is a composite of the temporary reference line and straight lines extended from both ends of the temporary reference line,
In the seventh step, the length of the newly set first reference line is calculated as the length of the weld bead, and a line connecting the virtual point B (i+1) and the virtual point C (i+1) is calculated. A method for measuring dimensions, characterized in that the length of the weld bead is calculated as the width of the weld bead.
請求項8ないし13のいずれか1項に記載の寸法測定方法において、
前記形状データは複数の画素データからなり、かつ複数の前記画素データのそれぞれは、少なくとも色情報または距離情報を含んでおり、
前記色情報は、前記画素データに含まれる色成分の情報であり、
前記距離情報は、前記画素データに含まれる前記母材または前記溶接ビードの表面位置と前記形状データを取得する三次元形状計測センサとの間の距離であり、
前記第2ステップでは、前記色情報または前記距離情報に基づいて、かつ予めアノテーションが付与された学習データにより学習強化された所定のアルゴリズムを用いて、前記形状データから前記ビード領域データを抽出することを特徴とする寸法測定方法。
In the dimension measuring method according to any one of claims 8 to 13,
The shape data consists of a plurality of pixel data, and each of the plurality of pixel data includes at least color information or distance information,
The color information is information on color components included in the pixel data,
The distance information is a distance between the surface position of the base material or the weld bead included in the pixel data and a three-dimensional shape measurement sensor that acquires the shape data,
In the second step, the bead area data is extracted from the shape data based on the color information or the distance information and using a predetermined algorithm whose learning is reinforced by learning data annotated in advance. A dimension measurement method characterized by:
1または複数のプロセッサに、請求項8に記載の寸法測定方法を実行させるための寸法測定用プログラム。 A dimension measurement program for causing one or more processors to execute the dimension measurement method according to claim 8. 請求項1に記載の寸法測定装置と、
前記溶接ビードを含む溶接箇所の不良の有無を判定する形状不良判定装置と、を少なくとも備え、
前記寸法測定装置の測定結果と、前記形状不良判定装置の判定結果とに基づいて、前記溶接箇所の外観が所定の基準を満足するか否かを判定することを特徴とする溶接箇所の良否判定装置。
A dimension measuring device according to claim 1;
At least a shape defect determination device for determining the presence or absence of a defect in a welding location including the weld bead,
Judgment of quality of a welded part, characterized in that it is determined whether the appearance of the welded part satisfies a predetermined standard based on the measurement result of the dimension measuring device and the judgment result of the shape defect determination device. Device.
JP2023033634A 2022-03-30 2023-03-06 Dimension measuring device, dimension measurement method, dimension measurement program, and pass/fail determining device of welded place Pending JP2023152778A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022056272 2022-03-30
JP2022056272 2022-03-30

Publications (1)

Publication Number Publication Date
JP2023152778A true JP2023152778A (en) 2023-10-17

Family

ID=88349328

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023033634A Pending JP2023152778A (en) 2022-03-30 2023-03-06 Dimension measuring device, dimension measurement method, dimension measurement program, and pass/fail determining device of welded place

Country Status (1)

Country Link
JP (1) JP2023152778A (en)

Similar Documents

Publication Publication Date Title
JP5953842B2 (en) Image inspection method and inspection area setting method
JP5217221B2 (en) Method for detecting surface defect shape of welded portion and computer program
US10586341B2 (en) Method and device for measuring features on or near an object
JP4068596B2 (en) Graphic processing method, graphic processing apparatus, and computer-readable graphic processing program
JP7167453B2 (en) APPEARANCE INSPECTION SYSTEM, SETTING DEVICE, IMAGE PROCESSING DEVICE, SETTING METHOD AND PROGRAM
JP2003016463A (en) Extracting method for outline of figure, method and device for pattern inspection, program, and computer- readable recording medium with the same stored therein
JP2011017705A (en) Pattern inspection device, pattern inspection method, and recording medium
JP2001338304A (en) Device and method for pattern inspection, and recording medium
US6665066B2 (en) Machine vision system and method for analyzing illumination lines in an image to determine characteristics of an object being inspected
JP2001319219A (en) Device and method for generating part program for image measuring apparatus, image measuring apparatus and measure result display method therefor
JP4112812B2 (en) Pattern evaluation method, pattern evaluation apparatus, and computer-readable recording medium
JP7128933B2 (en) Image processing device
CN110793431A (en) Workpiece measuring apparatus, workpiece measuring method, and computer readable medium
CN108027233B (en) Method and apparatus for measuring features on or near an object
US10095811B2 (en) Three-dimensional model generating method, three-dimensional model generating system, and a three-dimensional model generating program
JP7397415B2 (en) Image processing device, image processing method, and image processing program
JP2023152778A (en) Dimension measuring device, dimension measurement method, dimension measurement program, and pass/fail determining device of welded place
JP2008116206A (en) Apparatus, method, and program for pattern size measurement
CN113182701A (en) Laser processing method, apparatus, device and storage medium
JP2004219154A (en) Surface shape measuring method of object and automatic welding device
JP4100056B2 (en) Photomask appearance inspection method
JP2004185019A (en) Pattern inspection apparatus, pattern inspection method, and recording medium
Gospodnetic et al. Surface inspection planning using 3d visualization
WO2004109268A1 (en) Weld quality evaluation
CN114066752A (en) Line-structured light skeleton extraction and burr removal method for weld tracking