JP6973233B2 - Image processing system, image processing device and image processing program - Google Patents

Image processing system, image processing device and image processing program Download PDF

Info

Publication number
JP6973233B2
JP6973233B2 JP2018061951A JP2018061951A JP6973233B2 JP 6973233 B2 JP6973233 B2 JP 6973233B2 JP 2018061951 A JP2018061951 A JP 2018061951A JP 2018061951 A JP2018061951 A JP 2018061951A JP 6973233 B2 JP6973233 B2 JP 6973233B2
Authority
JP
Japan
Prior art keywords
work
image
measurement point
image processing
pickup unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018061951A
Other languages
Japanese (ja)
Other versions
JP2018194542A (en
Inventor
豊男 飯田
勇樹 谷保
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Omron Corp filed Critical Omron Corp
Priority to CN201810357326.8A priority Critical patent/CN108965690B/en
Priority to DE102018109774.3A priority patent/DE102018109774B4/en
Priority to US15/964,033 priority patent/US10805546B2/en
Publication of JP2018194542A publication Critical patent/JP2018194542A/en
Application granted granted Critical
Publication of JP6973233B2 publication Critical patent/JP6973233B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

FA(Factory Automation)分野において、ワークに対して、部品の組み付けが正しく行われているか、または傷がついていないかどうかなどの視覚検査をするロボットが普及している。このようなロボットにおいて、検査時のロボットの位置および姿勢を示す計測点の位置データは、予め教示され記憶されている。 In the FA (Factory Automation) field, robots that visually inspect the workpiece to see if the parts are assembled correctly or if they are scratched are widespread. In such a robot, the position data of the measurement points indicating the position and posture of the robot at the time of inspection are taught and stored in advance.

計測点の位置データをロボットに教示し記憶させる方法として、例えば、特開2005−052926号公報(特許文献1)は、「3次元CADシステム上で仮想ワークに対し、仮想カメラの位置を求める」技術を開示している(段落[0009]参照)。 As a method of teaching and storing the position data of the measurement point to the robot, for example, Japanese Patent Application Laid-Open No. 2005-052926 (Patent Document 1) states that "the position of the virtual camera is obtained from the virtual work on the three-dimensional CAD system". The technology is disclosed (see paragraph [0009]).

また、正確な視覚検査を行う技術に関し、例えば、特開平8−313225号公報(特許文献2)は、「カメラを検査箇所を中心として移動させ、画像の明るさや形状などの特徴量の変化を計測することにより、画像処理に適したカメラ位置を決定」する視覚検査装置を開示している(段落[0014]参照)。 Further, regarding a technique for performing an accurate visual inspection, for example, Japanese Patent Application Laid-Open No. 8-313225 (Patent Document 2) states that "the camera is moved around the inspection location to change the feature amount such as the brightness and shape of the image. A visual inspection device that "determines a camera position suitable for image processing by measuring" is disclosed (see paragraph [0014]).

特開2005−052926号公報Japanese Unexamined Patent Publication No. 2005-0522926 特開平8−313225号公報Japanese Unexamined Patent Publication No. 8-313225

しかし、特許文献1および特許文献2のいずれの装置においても、ワークを設置する際の位置ずれ、またはロボットの制御誤差が生じることは考慮されていない。 However, in both the devices of Patent Document 1 and Patent Document 2, it is not taken into consideration that the position shift when installing the work or the control error of the robot occurs.

ワークを設置する際の位置ずれ、またはロボットを制御する際の誤差が生じることにより、実際にロボットを計測点に動かしたときのロボットとワークとの相対的な位置関係が、ロボットに記憶されているロボットとワークとの相対的な位置関係と異なってしまうおそれがある。その結果、検査箇所に撮像部であるカメラのピントが合わないことがある。検査箇所に撮像部のピントが合っていない場合、検査の精度が落ちてしまうおそれがある。 The relative positional relationship between the robot and the work when the robot is actually moved to the measurement point is stored in the robot due to a positional shift when installing the work or an error when controlling the robot. There is a risk that the relative positional relationship between the robot and the work will be different. As a result, the camera, which is the imaging unit, may not be in focus at the inspection site. If the image pickup unit is out of focus at the inspection site, the accuracy of the inspection may drop.

検査箇所毎にピントが合うように、ユーザがティーチングペンダントを使用してロボットの位置を調整する方法があるものの、検査箇所が増えるほど、ユーザの調整工数が増大するという課題がある。 Although there is a method in which the user adjusts the position of the robot by using the teaching pendant so that each inspection point is in focus, there is a problem that the user's adjustment man-hours increase as the number of inspection points increases.

また、オートフォーカス機能により撮像部のピントを合わせる方法があるものの、オートフォーカス機能を用いた場合には、撮像部の焦点距離が変わることで光学的なサイズが変わってしまうという課題がある。 Further, although there is a method of focusing on the image pickup unit by the autofocus function, there is a problem that when the autofocus function is used, the optical size changes due to the change of the focal length of the image pickup unit.

したがって、ワークに設定された計測点に対して撮像部を適切な位置に配置して適切な撮像を行うための技術が望まれている。 Therefore, there is a demand for a technique for arranging an imaging unit at an appropriate position with respect to a measurement point set on the work to perform appropriate imaging.

ある局面に従うと、ワークの外観画像を用いて、ワークに予め設定された1または複数の計測点についての画像計測を行う画像処理システムは、外観画像を撮像する第1の撮像部と、第1の撮像部とワークとの相対的な位置関係を変化させるロボットと、ワークを撮像して得られる情報に基づいて、ワークの配置状況を特定するとともに、特定したワークの配置状況に応じて、ワークに設定された各計測点についての基準線を特定する基準線特定手段と、特定した基準線上に第1の撮像部を位置決めするとともに、第1の撮像部の光軸を特定した基準線方向と一致させた状態で、第1の撮像部とワークとの間の距離を変化させるように、ロボットへ指令を与える距離調整手段と、第1の撮像部により撮像される外観画像に基づいて、第1の撮像部の合焦度に関する第1の特徴量を算出する第1の特徴量算出手段と、第1の撮像部とワークとの間の距離の変化に応じた第1の特徴量の変化に基づいて、計測点についての画像計測を行うための第1の撮像部とワークとの間の距離を決定する距離決定手段とを含む。 According to a certain aspect, an image processing system that uses an external image of a work to measure an image of one or a plurality of measurement points preset on the work includes a first image pickup unit that captures an external image and a first image processing unit. Based on the robot that changes the relative positional relationship between the image pickup unit and the work, and the information obtained by imaging the work, the work placement status is specified, and the work placement status is determined according to the specified work placement status. A reference line specifying means for specifying a reference line for each measurement point set in, and a reference line direction in which the first image pickup unit is positioned on the specified reference line and the optical axis of the first image pickup unit is specified. Based on the distance adjusting means that gives a command to the robot to change the distance between the first image pickup unit and the work in the matched state, and the appearance image captured by the first image pickup unit, the first image is obtained. A change in the first feature amount according to a change in the distance between the first image pickup unit and the work and the first feature amount calculation means for calculating the first feature amount regarding the degree of focus of the image pickup unit 1. A distance determining means for determining the distance between the first imaging unit and the work for performing image measurement on the measurement point is included.

好ましくは、画像処理システムは、ワークおよびロボットの少なくとも一部を視野範囲に含むように配置され、視野範囲内に存在する被写体の3次元画像を撮像する第2の撮像部と、1または複数の計測点の各々に関連付けられた基準線方向を規定する情報を格納する記憶手段とをさらに含む。基準線特定手段は、3次元画像内でワークの形状情報に合致する部分を探索する第1の探索手段と、第1の探索手段により探索された部分の情報と、記憶手段に格納された基準線方向を規定する情報とに基づいて、各計測点についての基準線を決定する基準線決定手段とを含む。 Preferably, the image processing system is arranged so as to include at least a part of the work and the robot in the visual field range, and one or a plurality of image pickup units for capturing a three-dimensional image of a subject existing in the visual field range. It further includes a storage means for storing information defining the reference line direction associated with each of the measurement points. The reference line specifying means includes a first search means for searching a portion of the three-dimensional image that matches the shape information of the work, information on the portion searched by the first search means, and a reference stored in the storage means. It includes a reference line determining means for determining a reference line for each measurement point based on the information defining the line direction.

好ましくは、基準線特定手段は、基準線決定手段により決定された基準線上に第1の撮像部を位置決めした状態で第1の撮像部により撮像される画像に対して、対応する計測点の基準画像に合致する部分を探索する第2の探索手段と、第2の探索手段により探索された部分の情報に基づいて、基準線決定手段により決定された基準線を補正する補正手段とをさらに含む。 Preferably, the reference line specifying means is a reference of a measurement point corresponding to an image captured by the first image pickup unit in a state where the first image pickup unit is positioned on the reference line determined by the reference line determination means. It further includes a second search means for searching for a portion matching the image, and a correction means for correcting the reference line determined by the reference line determining means based on the information of the portion searched by the second search means. ..

好ましくは、画像処理システムは、第1の撮像部とワークとの間の距離を保った状態で、特定した基準線と第1の撮像部の光軸とのなす角度を0から予め定められた値まで変化させるように、ロボットへ指令を与える位置調整手段と、角度の変化に応じた第1の特徴量の変化に基づいて、計測点についての画像計測を行うための第1の撮像部とワークとの相対的な位置関係を決定する位置決定手段とを含む。 Preferably, the image processing system predetermines the angle formed by the specified reference line and the optical axis of the first image pickup unit from 0 while maintaining the distance between the first image pickup unit and the work. A position adjusting means that gives a command to the robot so as to change the value, and a first image pickup unit for performing image measurement on the measurement point based on the change of the first feature amount according to the change of the angle. Includes a positioning means for determining the relative positional relationship with the work.

好ましくは、画像処理システムは、第1の撮像部により撮像される外観画像に基づいて、予め設定された検出対象部位に関する第2の特徴量を算出する第2の特徴量算出手段と、第1の撮像部とワークとの間を距離決定手段により決定された距離に位置決めした状態で算出される第2の特徴量に基づいて、対象となる計測点または計測点の近傍における検出対象部位の有無を判断する画像計測手段とをさらに含む。 Preferably, the image processing system has a second feature amount calculation means for calculating a second feature amount for a preset detection target portion based on an external image imaged by the first image pickup unit, and a first. Presence or absence of a target measurement point or a detection target site in the vicinity of the target measurement point based on the second feature amount calculated in a state where the distance between the image pickup unit and the work is positioned at a distance determined by the distance determination means. Further includes an image measuring means for determining.

好ましくは、基準線特定手段は、画像計測手段による検出対象部位の有無の判断が完了すると、次の計測点に第1の撮像部を位置決めするための指令をロボットへ与える。 Preferably, the reference line specifying means gives a command to the robot to position the first image pickup unit at the next measurement point when the determination of the presence / absence of the detection target portion by the image measuring means is completed.

好ましくは、画像処理システムは、ワークの設計情報を表示するとともに、表示された設計情報に対するユーザ操作に応じて、1または複数の計測点を設定する計測点設定受付手段をさらに含む。 Preferably, the image processing system further includes a measurement point setting receiving means for displaying the design information of the work and setting one or a plurality of measurement points according to the user operation for the displayed design information.

好ましくは、画像処理システムは、計測点設定受付手段により設定された計測点の各々について、ワークの設計情報に基づいて各計測点の表面形状を算出するとともに、算出された表面形状に基づいて各計測点の基準線を算出する基準線算出手段をさらに含む。 Preferably, the image processing system calculates the surface shape of each measurement point based on the design information of the work for each of the measurement points set by the measurement point setting receiving means, and each of them is based on the calculated surface shape. It further includes a reference line calculation means for calculating the reference line of the measurement point.

他の局面に従うと、ワークの外観画像を用いて、当該ワークに予め設定された1または複数の計測点についての画像計測を行うための画像処理装置は、外観画像を撮像する第1の撮像部から外観画像に関する情報を受け取るインターフェースと、ワークと第1の撮像部との相対的な位置関係を変化させるロボットと通信するためのインターフェースと、ワークを撮像させて得られる情報に基づいて、ワークの配置状況を特定するとともに、特定したワークの配置状況に応じて、ワークに設定された各計測点についての基準線を特定する基準線特定手段と、特定した基準線上に第1の撮像部を位置決めするとともに、第1の撮像部の光軸を特定した基準線方向と一致させた状態で、第1の撮像部とワークとの間の距離を変化させるように、ロボットへ指令を与える距離調整手段と、第1の撮像部により撮像される外観画像に基づいて、第1の撮像部の合焦度に関する第1の特徴量を算出する第1の特徴量算出手段と、第1の撮像部とワークとの間の距離の変化に応じた第1の特徴量の変化に基づいて、計測点についての画像計測を行うための第1の撮像部とワークとの間の距離を決定する距離決定手段とを含む。 According to another aspect, the image processing device for performing image measurement on one or a plurality of measurement points preset in the work by using the appearance image of the work is a first image pickup unit that captures the appearance image. An interface for receiving information about an external image from the work, an interface for communicating with a robot that changes the relative positional relationship between the work and the first image pickup unit, and an interface for communicating with a robot that changes the relative positional relationship between the work and the first image pickup unit. A reference line specifying means for specifying the placement status and specifying a reference line for each measurement point set on the work according to the placement status of the specified work, and positioning the first image pickup unit on the specified reference line. At the same time, the distance adjusting means for giving a command to the robot to change the distance between the first image pickup unit and the work while the optical axis of the first image pickup unit is aligned with the specified reference line direction. A first feature amount calculating means for calculating a first feature amount regarding the degree of focus of the first image pickup unit based on an external image imaged by the first image pickup unit, and a first image pickup unit. A distance determining means for determining the distance between the first imaging unit and the work for performing image measurement on the measurement point based on the change in the first feature amount according to the change in the distance between the work and the work. And include.

他の局面に従うと、ワークの外観画像を用いて、当該ワークに予め設定された1または複数の計測点についての画像計測を行うための画像処理プログラムは、コンピュータに、第1の撮像部を用いてワークを撮像するステップと、ワークを撮像して得られる情報に基づいて、ワークの配置状況を特定するステップと、特定したワークの配置状況に応じて、ワークに設定された各計測点についての基準線を特定するステップと、特定した基準線上に第1の撮像部を位置決めするステップと、第1の撮像部の光軸を特定した基準線方向と一致させた状態で、第1の撮像部とワークとの間の距離を変化させるように、第1の撮像部とワークとの相対的な位置関係を変化させるロボットへ指令を与えるステップと、第1の撮像部により撮像される外観画像に基づいて、第1の撮像部の合焦度に関する第1の特徴量を算出するステップと、第1の撮像部とワークとの間の距離の変化に応じた第1の特徴量の変化に基づいて、計測点についての画像計測を行うための第1の撮像部とワークとの間の距離を決定するステップとを実行させる。 According to another aspect, the image processing program for performing image measurement on one or a plurality of measurement points preset in the work by using the appearance image of the work uses the first image pickup unit in the computer. About the step of imaging the work, the step of specifying the arrangement status of the work based on the information obtained by imaging the work, and each measurement point set in the work according to the arrangement status of the specified work. The first image pickup unit with the step of specifying the reference line, the step of positioning the first image pickup unit on the specified reference line, and the optical axis of the first image pickup unit aligned with the specified reference line direction. The step of giving a command to the robot that changes the relative positional relationship between the first image pickup unit and the work so as to change the distance between the image and the work, and the appearance image captured by the first image pickup unit. Based on the step of calculating the first feature amount regarding the degree of focus of the first image pickup unit and the change of the first feature amount according to the change of the distance between the first image pickup unit and the work. Then, the step of determining the distance between the first image pickup unit and the work for performing image measurement on the measurement point is executed.

ある局面において、ワークに設定された計測点に対して撮像部を適切な位置に配置して適切な撮像を行うことができる。 In a certain aspect, the imaging unit can be arranged at an appropriate position with respect to the measurement point set on the work to perform appropriate imaging.

本開示の上記および他の目的、特徴、局面および利点は、添付の図面と関連して理解される本発明に関する次の詳細な説明から明らかとなるであろう。 The above and other objects, features, aspects and advantages of the present disclosure will become apparent from the following detailed description of the invention as understood in connection with the accompanying drawings.

第1の実施の形態に係る画像処理システムの基本構成を示す模式図である。It is a schematic diagram which shows the basic structure of the image processing system which concerns on 1st Embodiment. 画像処理システムのハードウェア構成について示す模式図である。It is a schematic diagram which shows the hardware configuration of an image processing system. 2次元カメラのピントをワークの計測点に合わせる処理が実行されたときのロボットの動きの一例を示す図である。It is a figure which shows an example of the movement of a robot at the time of performing the process of adjusting the focus of a 2D camera to the measurement point of a work. 検査処理のフローチャートである。It is a flowchart of an inspection process. 画像処理装置の機能構成の一例を示す図である。It is a figure which shows an example of the functional structure of an image processing apparatus. 検査経路生成処理のフローチャートである。It is a flowchart of inspection route generation processing. 検査経路生成処理の実行において機能する画像処理装置の機能構成の一例を示す図である。It is a figure which shows an example of the functional structure of the image processing apparatus which functions in the execution of an inspection path generation process. 法線補正処理のフローチャートである。It is a flowchart of a normal correction process. 法線決定システムの機能構成を示す模式図である。It is a schematic diagram which shows the functional structure of a normal determination system. ピント調整処理のフローチャートである。It is a flowchart of a focus adjustment process. ピント調整システムの機能構成を示す模式図である。It is a schematic diagram which shows the functional structure of a focus adjustment system. 検査実行処理のフローチャートである。It is a flowchart of an inspection execution process. 検査実行システムの機能構成を示す模式図である。It is a schematic diagram which shows the functional structure of an inspection execution system. カメラの円弧軌道の一例を示す図である。It is a figure which shows an example of the arc trajectory of a camera. ユーザが入力装置を用いて検査経路を入力したときの処理の一例を示す図である。It is a figure which shows an example of the processing when a user inputs an inspection path using an input device. 第2の実施の形態に係る法線決定処理のフローチャートである。It is a flowchart of the normal determination process which concerns on 2nd Embodiment. 第3の実施の形態に係る画像処理システムの構成を示す模式図である。It is a schematic diagram which shows the structure of the image processing system which concerns on 3rd Embodiment. 基準線の変形例を示す模式図である。It is a schematic diagram which shows the deformation example of a reference line.

以下、図面を参照しつつ、本発明に従う各実施の形態について説明する。以下の説明では、同一の部品および構成要素には同一の符号を付してある。それらの名称および機能も同じである。したがって、これらについての詳細な説明は繰り返さない。なお、以下で説明される各実施の形態および各変形例は、適宜選択的に組み合わせてもよい。 Hereinafter, embodiments according to the present invention will be described with reference to the drawings. In the following description, the same parts and components are designated by the same reference numerals. Their names and functions are the same. Therefore, the detailed description of these will not be repeated. In addition, each embodiment and each modification described below may be selectively combined as appropriate.

<第1の実施の形態>
[A.画像処理システム構成]
図1は、第1の実施の形態に係る画像処理システムSYSの基本構成を示す模式図である。図1に示す画像処理システムSYSは、ラインLによって提供されるワークWの外観画像を用いて、ワークWの外観を検査するためのシステムである。画像処理システムSYSにおいては、予め定められたワークWに1または複数設定された計測点ごとに外観検査が行われる。
<First Embodiment>
[A. Image processing system configuration]
FIG. 1 is a schematic diagram showing a basic configuration of an image processing system SYS according to the first embodiment. The image processing system SYS shown in FIG. 1 is a system for inspecting the appearance of the work W by using the appearance image of the work W provided by the line L. In the image processing system SYS, a visual inspection is performed for each measurement point set to one or a plurality of predetermined work Ws.

画像処理システムSYSは、画像処理装置2と、ロボット210と、2次元カメラ310と、3次元カメラ410とを含む。典型的には、ロボット210は多関節ロボットであって、SCARA型ロボットなどであってもよい。2次元カメラ310はロボット210の先端に取り付けられている。ロボット210が動くことにより、2次元カメラ310の位置および姿勢が変更される。そのため、ロボット210は、2次元カメラ310とワークWとの相対的な位置関係を変化させることができる。 The image processing system SYS includes an image processing device 2, a robot 210, a two-dimensional camera 310, and a three-dimensional camera 410. Typically, the robot 210 is an articulated robot and may be a SCARA type robot or the like. The two-dimensional camera 310 is attached to the tip of the robot 210. As the robot 210 moves, the position and posture of the two-dimensional camera 310 are changed. Therefore, the robot 210 can change the relative positional relationship between the two-dimensional camera 310 and the work W.

3次元カメラ410は、ラインL上の所定位置に設けられており、その撮像視野にラインLの少なくとも一部が含まれるように配置されている。ラインLによってワークWが3次元カメラ410の撮像視野内に位置するように提供されたときに、3次元カメラ410は、当該ワークWを撮像することができる。 The three-dimensional camera 410 is provided at a predetermined position on the line L, and is arranged so that the imaging field of view includes at least a part of the line L. When the work W is provided by the line L so as to be located within the imaging field of view of the 3D camera 410, the 3D camera 410 can image the work W.

画像処理装置2は、管理装置100と、ロボット制御部200と、2次元画像処理装置300と、3次元画像処理装置400とから構成される。なお、第1の実施の形態において、画像処理装置2は、4つの装置から構成されるとしたが、一の装置から構成されてもよく、2以上あるいは5以上の装置から構成されてもよい。 The image processing device 2 includes a management device 100, a robot control unit 200, a two-dimensional image processing device 300, and a three-dimensional image processing device 400. In the first embodiment, the image processing device 2 is composed of four devices, but it may be composed of one device, or may be composed of two or more devices or five or more devices. ..

管理装置100は、ロボット制御部200、2次元画像処理装置300および3次元画像処理装置400のそれぞれとネットワークNWを介して接続されている。ネットワークNWは、たとえば、フィールドネットワークである。一例としては、ネットワークNWには、EtherCAT(登録商標)やEtherNet/IP(登録商標)などが採用される。 The management device 100 is connected to each of the robot control unit 200, the two-dimensional image processing device 300, and the three-dimensional image processing device 400 via the network NW. The network NW is, for example, a field network. As an example, EtherCAT (registered trademark), EtherNet / IP (registered trademark), and the like are adopted for the network NW.

また、管理装置100は、表示装置110および入力装置120と電気的に接続されている。ロボット制御部200は、ロボット210と電気的に接続されている。2次元画像処理装置300は、2次元カメラ310と電気的に接続されている。3次元画像処理装置400は3次元カメラ410と電気的に接続されている。なお、電気的に接続された各装置は、一体で構成されてもよい。つまり、ロボット210とロボット制御部200とは、一体で構成されていてもよい。2次元画像処理装置300と2次元カメラ310とは、一体で構成されていてもよい。3次元画像処理装置400と3次元カメラ410とは、一体で構成されていてもよい。 Further, the management device 100 is electrically connected to the display device 110 and the input device 120. The robot control unit 200 is electrically connected to the robot 210. The two-dimensional image processing device 300 is electrically connected to the two-dimensional camera 310. The 3D image processing device 400 is electrically connected to the 3D camera 410. It should be noted that each electrically connected device may be integrally configured. That is, the robot 210 and the robot control unit 200 may be integrally configured. The two-dimensional image processing device 300 and the two-dimensional camera 310 may be integrally configured. The three-dimensional image processing device 400 and the three-dimensional camera 410 may be integrally configured.

[B.画像処理システムSYSのハードウェア構成]
図2は、画像処理システムSYSのハードウェア構成について示す模式図である。管理装置100は、演算処理部であるCPU(Central Processing Unit)130と、記憶部としてのメインメモリ140およびハードディスク150と、表示コントローラ160と、データリーダ/ライタ170と、入力インターフェース(I/F)181と、ロボットインターフェイス(I/F)182と、2次元カメラインターフェイス(I/F)183と、3次元カメラインターフェイス(I/F)184とを含む。これらの各部は、バス185を介して、互いにデータ通信可能に接続される。
[B. Image processing system SYS hardware configuration]
FIG. 2 is a schematic diagram showing a hardware configuration of the image processing system SYS. The management device 100 includes a CPU (Central Processing Unit) 130 which is an arithmetic processing unit, a main memory 140 and a hard disk 150 as a storage unit, a display controller 160, a data reader / writer 170, and an input interface (I / F). 181 includes a robot interface (I / F) 182, a two-dimensional camera interface (I / F) 183, and a three-dimensional camera interface (I / F) 184. Each of these parts is connected to each other via a bus 185 so as to be capable of data communication.

CPU130は、ハードディスク150にインストールされた画像処理プログラム151を含むプログラム(コード)をメインメモリ140に展開して、これらを所定順序で実行することで、各種の演算を実施する。 The CPU 130 expands a program (code) including an image processing program 151 installed in the hard disk 150 into the main memory 140, and executes these in a predetermined order to perform various calculations.

メインメモリ140は、典型的には、DRAM(Dynamic Random Access Memory)などの揮発性の記憶装置である。メインメモリ140は、ハードディスク150から読み出されたプログラムに加えて、ワークWの外観を検査するための検査用情報1411、2次元画像処理装置300または3次元画像処理装置400から送られた画像処理結果、CPU130の処理結果、ならびにロボット210、2次元カメラ310および3次元カメラ410の位置姿勢(3次元座標上の座標値(X,Y,Z)および角度(θx、θy、θz))に関する情報などを保持する。 The main memory 140 is typically a volatile storage device such as a DRAM (Dynamic Random Access Memory). In addition to the program read from the hard disk 150, the main memory 140 is used for inspection information 1411 for inspecting the appearance of the work W, and image processing sent from the two-dimensional image processing device 300 or the three-dimensional image processing device 400. As a result, information on the processing result of the CPU 130, and the position and orientation of the robot 210, the two-dimensional camera 310, and the three-dimensional camera 410 (coordinate values (X, Y, Z) and angles (θx, θy, θz) on the three-dimensional coordinates). And so on.

検査用情報1411は、たとえば、ワークWの3次元CAD情報、ワークWの計測点の座標位置、計測点についての基準線の方向を示す法線ベクトル、計測点において検査する検査内容、計測点が複数ある場合には検査順序、検査する際の2次元カメラ310の移動経路などを含む。また、検査用情報1411はワークWの種類ごとに設けられている。ワークWの種類としては、たとえば、エンジンブロックやペットボトルなどがある。 The inspection information 1411 includes, for example, three-dimensional CAD information of the work W, the coordinate position of the measurement point of the work W, a normal vector indicating the direction of the reference line for the measurement point, the inspection content to be inspected at the measurement point, and the measurement point. When there are a plurality of them, the inspection order, the movement path of the two-dimensional camera 310 at the time of inspection, and the like are included. Further, the inspection information 1411 is provided for each type of work W. Examples of the type of work W include an engine block and a PET bottle.

ハードディスク150には、各種設定値などが格納されてもよい。なお、ハードディスク150に加えて、あるいは、ハードディスク150に代えて、フラッシュメモリなどの半導体記憶装置を採用してもよい。 Various setting values and the like may be stored in the hard disk 150. In addition to the hard disk 150, or instead of the hard disk 150, a semiconductor storage device such as a flash memory may be adopted.

表示コントローラ160は、表示装置110であるディスプレイと接続され、CPU130における処理結果などをユーザに通知する。すなわち、表示コントローラ160は、表示装置110に接続され、当該表示装置110での表示を制御する。 The display controller 160 is connected to a display, which is a display device 110, and notifies the user of the processing result of the CPU 130 and the like. That is, the display controller 160 is connected to the display device 110 and controls the display on the display device 110.

データリーダ/ライタ170は、CPU130と記録媒体であるメモリカード171との間のデータ伝送を仲介する。すなわち、メモリカード171には、管理装置100で実行されるプログラムなどが格納された状態で流通し、データリーダ/ライタ170は、このメモリカード171からプログラムを読出す。また、データリーダ/ライタ170は、CPU130の内部指令に応答して、2次元画像処理装置300または3次元画像処理装置400から送られた画像処理結果、CPU130の処理結果などをメモリカード171へ書き込む。なお、メモリカード171は、CF(Compact Flash(登録商標))、SD(Secure Digital)などの汎用的な半導体記憶デバイスや、フレキシブルディスク(Flexible Disk)などの磁気記憶媒体や、CD−ROM(Compact Disk Read Only Memory)などの光学記憶媒体などからなる。 The data reader / writer 170 mediates data transmission between the CPU 130 and the memory card 171 which is a recording medium. That is, the memory card 171 is distributed in a state in which a program or the like executed by the management device 100 is stored, and the data reader / writer 170 reads the program from the memory card 171. Further, the data reader / writer 170 writes the image processing result sent from the two-dimensional image processing device 300 or the three-dimensional image processing device 400, the processing result of the CPU 130, and the like to the memory card 171 in response to the internal command of the CPU 130. .. The memory card 171 is a general-purpose semiconductor storage device such as CF (Compact Flash (registered trademark)) or SD (Secure Digital), a magnetic storage medium such as a flexible disk, or a CD-ROM (Compact). It consists of an optical storage medium such as Disk Read Only Memory).

入力I/F181は、CPU130とマウス、キーボード、タッチパネルなどの入力装置120との間のデータ伝送を仲介する。すなわち、入力I/F181は、ユーザが入力装置120を操作することで与えられる操作指令を受付ける。操作指令は、たとえば、ワークWの計測点を指定する指令、ワークWを指定する指令、検査を開始する指令が含まれる。 The input I / F181 mediates data transmission between the CPU 130 and an input device 120 such as a mouse, keyboard, and touch panel. That is, the input I / F181 receives an operation command given by the user operating the input device 120. The operation command includes, for example, a command for designating a measurement point of the work W, a command for designating the work W, and a command for starting an inspection.

ロボットI/F182は、CPU130とロボット制御部200との間のデータ伝送を仲介する。すなわち、ロボットI/F182は、ロボット制御部200と接続される。また、ロボットI/F182は、CPU130からの内部コマンドに従って、ロボット制御部200に移動を指示するコマンドを与える。 The robot I / F182 mediates data transmission between the CPU 130 and the robot control unit 200. That is, the robot I / F182 is connected to the robot control unit 200. Further, the robot I / F182 gives a command to instruct the robot control unit 200 to move according to an internal command from the CPU 130.

2次元カメラI/F183は、CPU130と2次元画像処理装置300との間のデータ伝送を仲介する。すなわち、2次元カメラI/F183は、ワークWを撮像して得られた2次元画像を処理するための2次元画像処理装置300と接続される。また、2次元カメラI/F183は、CPU130からの内部コマンドに従って、2次元画像処理装置300に対して各種画像処理の実行を指示するコマンドを与える。 The two-dimensional camera I / F183 mediates data transmission between the CPU 130 and the two-dimensional image processing device 300. That is, the two-dimensional camera I / F183 is connected to the two-dimensional image processing device 300 for processing the two-dimensional image obtained by imaging the work W. Further, the two-dimensional camera I / F183 gives a command to instruct the two-dimensional image processing device 300 to execute various image processing according to an internal command from the CPU 130.

3次元カメラI/F184は、CPU130と3次元画像処理装置400との間のデータ伝送を仲介する。また、3次元カメラI/F184は、CPU130からの内部コマンドに従って、3次元画像処理装置400に対して各種画像処理の実行を指示するコマンドを与える。 The 3D camera I / F 184 mediates data transmission between the CPU 130 and the 3D image processing device 400. Further, the 3D camera I / F 184 gives a command to instruct the 3D image processing device 400 to execute various image processing according to an internal command from the CPU 130.

ロボット制御部200は、ロボットI/F182から与えられるコマンドに従って、ロボット210の動作を制御する。ロボット210の動作とは、ロボット210に取り付けられた2次元カメラ310の位置および姿勢を変える動作である。すなわち、ロボット制御部200は、2次元カメラ310の位置および姿勢を制御しているともいえる。 The robot control unit 200 controls the operation of the robot 210 according to a command given from the robot I / F 182. The operation of the robot 210 is an operation of changing the position and posture of the two-dimensional camera 310 attached to the robot 210. That is, it can be said that the robot control unit 200 controls the position and posture of the two-dimensional camera 310.

2次元画像処理装置300は、撮像制御部320と画像処理エンジン330と、入出力I/F340とを含む。これらの各部は、バス350を介して、互いにデータ通信可能に接続される。撮像制御部320は、画像処理エンジン330からの指示に従って、接続されている2次元カメラ310における撮像動作を制御する。画像処理エンジン330は、入出力I/F340を介してCPU130から指示された各種画像処理を実行する。入出力I/F340は、画像処理エンジン330が実行した各種画像処理の結果を2次元カメラI/F183を介して管理装置100に送信する。また、入出力I/F340は、2次元カメラI/F183を介して送られるCPU130からの各種指示を受け取る。 The two-dimensional image processing device 300 includes an image pickup control unit 320, an image processing engine 330, and an input / output I / F 340. Each of these parts is connected to each other via a bus 350 so as to be capable of data communication. The image pickup control unit 320 controls the image pickup operation in the connected two-dimensional camera 310 according to the instruction from the image processing engine 330. The image processing engine 330 executes various image processing instructed by the CPU 130 via the input / output I / F 340. The input / output I / F 340 transmits the results of various image processing executed by the image processing engine 330 to the management device 100 via the two-dimensional camera I / F 183. Further, the input / output I / F 340 receives various instructions from the CPU 130 sent via the two-dimensional camera I / F 183.

3次元画像処理装置400は、撮像制御部420と画像処理エンジン430と、入出力I/F440とを含む。これらの各部は、バス450を介して、互いにデータ通信可能に接続される。なお、3次元画像処理装置400が備えるハードウェアのうち、2次元画像処理装置300が備えるハードウェアと同じ名称のハードウェアは、当該同じ名称のハードウェアと同じ機能を有するものとし、説明を省略する。 The three-dimensional image processing apparatus 400 includes an image pickup control unit 420, an image processing engine 430, and input / output I / F 440. Each of these parts is connected to each other via a bus 450 so as to be capable of data communication. Of the hardware included in the three-dimensional image processing apparatus 400, the hardware having the same name as the hardware included in the two-dimensional image processing apparatus 300 shall have the same function as the hardware having the same name, and the description thereof is omitted. do.

2次元カメラ310および3次元カメラ410は、各々、撮像視野に存在する被写体を撮像する撮像部である。2次元カメラ310は、主たる構成要素として、レンズや絞りなどの光学系と、CCD(Charge Coupled Device)イメージセンサやCMOS(Complementary Metal Oxide Semiconductor)イメージセンサなどの受光素子とを含む。3次元カメラ410は、典型的には、アクティブ方式の3次元カメラであって、計測用のパターンを投光するプロジェクタと、カメラとで構成され、カメラの主たる構成要素として、レンズや絞りなどの光学系と、CCDイメージセンサやCMOSイメージセンサなどの受光素子とを含む。なお、パッシブ方式のステレオカメラであってもよい。 Each of the two-dimensional camera 310 and the three-dimensional camera 410 is an imaging unit that images a subject existing in the imaging field of view. The two-dimensional camera 310 includes an optical system such as a lens and an aperture, and a light receiving element such as a CCD (Charge Coupled Device) image sensor and a CMOS (Complementary Metal Oxide Semiconductor) image sensor as main components. The 3D camera 410 is typically an active 3D camera, which is composed of a projector that projects a pattern for measurement and a camera, and the main components of the camera are a lens, an aperture, and the like. It includes an optical system and a light receiving element such as a CCD image sensor or a CMOS image sensor. It may be a passive stereo camera.

2次元カメラ310は、2次元画像処理装置300からの指令に従って撮像するとともに、その撮像によって得られた2次元画像データを2次元画像処理装置300へ出力する。 The two-dimensional camera 310 takes an image according to a command from the two-dimensional image processing device 300, and outputs the two-dimensional image data obtained by the imaging to the two-dimensional image processing device 300.

3次元カメラ410は、3次元画像処理装置400からの指令に従って撮像するとともに、その撮像によって得られた3次元画像データを3次元画像処理装置400へ出力する。 The three-dimensional camera 410 takes an image according to a command from the three-dimensional image processing device 400, and outputs the three-dimensional image data obtained by the imaging to the three-dimensional image processing device 400.

[C.画像処理システムの概要]
次に、画像処理システムSYSの概要について説明する。画像処理システムSYSは、ワークWに設定された1または複数の計測点WpごとにワークWの外観を検査するためのシステムである。画像処理システムSYSにおいて実行されるワークWの外観検査に関する処理は、2次元カメラ310のピントをワークWの計測点Wpに合わせる処理と、2次元カメラ310のピントを計測点Wpに合わせた状態で検査を実行する処理とを含む。計測点WpごとにワークWの外観検査をするとは、ワークW上に設定された計測点Wpごとに、計測点Wpを含む計測領域に対する外観検査を行なうことを意味する。計測点Wpは、計測領域を代表する点であって、2次元カメラ310の光軸を合わせるための基準点に相当する。
[C. Image processing system overview]
Next, the outline of the image processing system SYS will be described. The image processing system SYS is a system for inspecting the appearance of the work W for each one or a plurality of measurement points Wp set in the work W. The processing related to the appearance inspection of the work W executed in the image processing system SYS is the processing of focusing the 2D camera 310 on the measurement point Wp of the work W and the processing of focusing the 2D camera 310 on the measurement point Wp. Includes processing to perform the inspection. The appearance inspection of the work W for each measurement point Wp means that the appearance inspection for the measurement area including the measurement point Wp is performed for each measurement point Wp set on the work W. The measurement point Wp is a point representing the measurement area and corresponds to a reference point for aligning the optical axis of the two-dimensional camera 310.

画像処理システムSYSにおいては、2次元カメラ310のピントをワークWの計測点Wpに合わせる処理と、2次元カメラ310のピントを計測点Wpに合わせた状態で検査を実行する処理とを繰り返すことでワークW全体の外観検査が行われる。 In the image processing system SYS, the process of adjusting the focus of the 2D camera 310 to the measurement point Wp of the work W and the process of executing the inspection while the focus of the 2D camera 310 is adjusted to the measurement point Wp are repeated. A visual inspection of the entire work W is performed.

2次元カメラ310のピントをワークWの計測点Wpに合わせる処理は、計測点Wpについての基準線を特定する処理と、特定した基準線上で2次元カメラ310のピントを計測点Wpに合わせる処理とを含む。画像処理システムSYSにおいては、特定した法線V上に2次元カメラ310を位置決めすることができる。ここで、「基準線」とは、2次元カメラ310の向きを設定する際の基準になる線であって、計測点Wpが位置するワークWの微小平面に対して略垂直な垂線である法線や、ユーザによって任意に設定される線を含む。本実施の形態においては、基準線を法線Vとして説明する。 The process of adjusting the focus of the 2D camera 310 to the measurement point Wp of the work W includes the process of specifying the reference line for the measurement point Wp and the process of adjusting the focus of the 2D camera 310 to the measurement point Wp on the specified reference line. including. In the image processing system SYS, the two-dimensional camera 310 can be positioned on the specified normal V. Here, the "reference line" is a reference line for setting the orientation of the two-dimensional camera 310, and is a normal line substantially perpendicular to the minute plane of the work W where the measurement point Wp is located. Includes lines and lines arbitrarily set by the user. In the present embodiment, the reference line will be described as the normal line V.

図3を参照して、2次元カメラ310のピントをワークWの計測点Wpに合わせる処理が実行されたときのロボット210の具体的な動きについて説明する。図3は、2次元カメラ310のピントをワークWの計測点Wpに合わせる処理が実行されたときのロボット210の動きの一例を示す図である。 With reference to FIG. 3, a specific movement of the robot 210 when the process of adjusting the focus of the two-dimensional camera 310 to the measurement point Wp of the work W is executed will be described. FIG. 3 is a diagram showing an example of the movement of the robot 210 when the process of adjusting the focus of the two-dimensional camera 310 to the measurement point Wp of the work W is executed.

図3には、法線V上に2次元カメラ310を位置決めする処理(ステップS1)が実行されたときのロボット210の動きと、法線V上で2次元カメラ310のピントを合わせる処理(ステップS1)が実行されたときのロボット210の動きとが示されている。 In FIG. 3, the movement of the robot 210 when the process of positioning the two-dimensional camera 310 on the normal V (step S1) is executed and the process of focusing the two-dimensional camera 310 on the normal V (step). The movement of the robot 210 when S1) is executed is shown.

ステップS1において、管理装置100は、ワークWを撮像して得られる情報に基づいてワークWの配置状況を特定する。ここで、配置状況は、ワークWの位置だけでなく、ワークWの向きを含む概念である。管理装置100は、特定したワークWの配置状況に応じてワークWに設定された各計測点Wpについての法線Vを特定する。ここで、計測点Wpが図3に示すように複数設定されている場合にあっては、法線Vが特定されることで、検査経路WLが生成されることとなる。つまり、検査経路WLを生成するためには、管理装置100はワークWの配置状況を特定するとともに、特定したワークWの配置状況に応じてワークWに設定された各計測点Wpについての法線Vを特定する必要がある。 In step S1, the management device 100 identifies the arrangement status of the work W based on the information obtained by imaging the work W. Here, the arrangement state is a concept including not only the position of the work W but also the direction of the work W. The management device 100 specifies the normal V for each measurement point Wp set in the work W according to the arrangement status of the specified work W. Here, when a plurality of measurement points Wp are set as shown in FIG. 3, the inspection path WL is generated by specifying the normal V. That is, in order to generate the inspection path WL, the management device 100 specifies the arrangement status of the work W, and the normal line for each measurement point Wp set in the work W according to the arrangement status of the specified work W. It is necessary to specify V.

管理装置100は、特定した法線Vと2次元カメラ310の光軸Oとが一致するように2次元カメラ310の位置姿勢を決定し、決定した2次元カメラ310の位置姿勢に関する情報をロボット制御部200に送信する。ロボット制御部200は、受信した2次元カメラ310の位置姿勢に関する情報に基づいてロボット210に動作指令を送る。これにより、ロボット210の姿勢が、図3(S1)中の破線で示されたロボット210’の姿勢に変わることで、2次元カメラ310の位置姿勢を図3(S1)中の破線で示された2次元カメラ310’の位置姿勢に変える。 The management device 100 determines the position and orientation of the two-dimensional camera 310 so that the specified normal V and the optical axis O of the two-dimensional camera 310 coincide with each other, and robot controls the information regarding the determined position and orientation of the two-dimensional camera 310. It is transmitted to the unit 200. The robot control unit 200 sends an operation command to the robot 210 based on the received information regarding the position and orientation of the two-dimensional camera 310. As a result, the posture of the robot 210 changes to the posture of the robot 210'shown by the broken line in FIG. 3 (S1), so that the position and posture of the two-dimensional camera 310 is shown by the broken line in FIG. 3 (S1). Change to the position and orientation of the 2D camera 310'.

ステップS2において、管理装置100は、決定した法線Vと2次元カメラ310の光軸Oとが一致する状態で2次元カメラ310を動かすための法線軌道を生成する。管理装置100は、生成した法線軌道に関する情報および動作を指示するコマンドをロボット制御部200に送信する。これにより、ロボット210は2次元カメラ310を図3(S2)中の両向き矢印の方向に沿って動かし、2次元カメラ310と計測点Wpとの距離を変化させる。 In step S2, the management device 100 generates a normal trajectory for moving the two-dimensional camera 310 in a state where the determined normal V and the optical axis O of the two-dimensional camera 310 coincide with each other. The management device 100 transmits information regarding the generated normal trajectory and a command instructing an operation to the robot control unit 200. As a result, the robot 210 moves the two-dimensional camera 310 along the direction of the double-headed arrow in FIG. 3 (S2) to change the distance between the two-dimensional camera 310 and the measurement point Wp.

また、ステップS2において、管理装置100は、2次元カメラ310により撮像される2次元画像に基づいて2次元カメラ310の合焦度aに関する特徴量を算出することを2次元画像処理装置300に指示する。ここで、「合焦度a」とは、2次元カメラ310のピントがどの程度合っているかを示す指標である。なお、以下においては、合焦度aに関する特徴量を単に合焦度aともいう。管理装置100は、計測点Wpと2次元カメラ310との距離が異なる各位置における2次元カメラ310の合焦度aを得る。管理装置100は、2次元カメラ310と計測点Wpとの間の距離の変化に応じた合焦度aの変化に基づいて、2次元カメラ310のピントが計測点Wpに合っている2次元カメラ310と計測点Wpとの間の距離を決定する。 Further, in step S2, the management device 100 instructs the two-dimensional image processing device 300 to calculate the feature amount related to the in-focus degree a of the two-dimensional camera 310 based on the two-dimensional image captured by the two-dimensional camera 310. do. Here, the "focus degree a" is an index indicating how much the two-dimensional camera 310 is in focus. In the following, the feature amount relating to the in-focus degree a is also simply referred to as the in-focus degree a. The management device 100 obtains the in-focus degree a of the two-dimensional camera 310 at each position where the distance between the measurement point Wp and the two-dimensional camera 310 is different. The management device 100 is a two-dimensional camera in which the focus of the two-dimensional camera 310 is aligned with the measurement point Wp based on the change in the in-focus degree a according to the change in the distance between the two-dimensional camera 310 and the measurement point Wp. The distance between the 310 and the measurement point Wp is determined.

このように、画像処理システムSYSは、ラインLによって提供されたワークWの配置状況に応じて、設定されたワークWの計測点Wpについての法線Vを特定することができる。また、画像処理システムSYSは、2次元カメラ310と計測点Wpとの距離を変化させることで、2次元カメラ310のピントを計測点Wpに合わせることができる。その結果、2次元カメラ310の光学系を変えることなく、2次元カメラ310のピントを計測点Wpに合わせることができる。よって、画像処理システムSYSにおいては、正確な外観検査を実行することができる。また、画像処理システムSYSにおいては、管理装置100が外観画像に基づいて計測点Wpの法線Vを決定し、2次元カメラ310を法線V上に沿って動かしたときの2次元カメラ310の合焦度aに基づいて、2次元カメラ310のピントが計測点Wpに合う位置を決定する。そのため、画像処理システムSYSにおいては、ラインLによって提供されたワークWの位置と、2次元カメラ310との位置関係を調整することができる。 In this way, the image processing system SYS can specify the normal V for the set measurement point Wp of the work W according to the arrangement state of the work W provided by the line L. Further, the image processing system SYS can adjust the focus of the two-dimensional camera 310 to the measurement point Wp by changing the distance between the two-dimensional camera 310 and the measurement point Wp. As a result, the focus of the two-dimensional camera 310 can be adjusted to the measurement point Wp without changing the optical system of the two-dimensional camera 310. Therefore, in the image processing system SYS, accurate visual inspection can be performed. Further, in the image processing system SYS, the management device 100 determines the normal V of the measurement point Wp based on the external image, and the two-dimensional camera 310 is moved along the normal V. Based on the degree of focus a, the position where the focus of the two-dimensional camera 310 matches the measurement point Wp is determined. Therefore, in the image processing system SYS, the positional relationship between the position of the work W provided by the line L and the two-dimensional camera 310 can be adjusted.

[D.検査処理]
画像処理システムSYSにおいて実行されるワークWの外観検査に関する処理は、2次元カメラ310のピントをワークWの計測点Wpに合わせる処理と、2次元カメラ310のピントを計測点Wpに合わせた状態で検査を実行する処理とを含む。2次元カメラ310のピントをワークWの計測点Wpに合わせる処理は、計測点についての法線Vを特定する処理と、特定した法線V上で2次元カメラ310のピントを計測点Wpに合わせる処理とを含む。
[D. Inspection process]
The processing related to the appearance inspection of the work W executed in the image processing system SYS is the processing of focusing the 2D camera 310 on the measurement point Wp of the work W and the processing of focusing the 2D camera 310 on the measurement point Wp. Includes processing to perform the inspection. The process of adjusting the focus of the 2D camera 310 to the measurement point Wp of the work W is the process of specifying the normal V of the measurement point and the process of adjusting the focus of the 2D camera 310 to the measurement point Wp on the specified normal V. Including processing.

計測点Wpについての法線Vを特定する処理は、より具体的には、ワークWを撮像して得られる情報に基づいてワークWの配置状況を特定する処理と、特定した配置状況に応じてワークWに設定された各計測点Wpについての法線Vを特定する処理とを含む。 More specifically, the process of specifying the normal V for the measurement point Wp is a process of specifying the arrangement state of the work W based on the information obtained by imaging the work W, and a process of specifying the arrangement state of the work W according to the specified arrangement state. It includes a process of specifying a normal V for each measurement point Wp set in the work W.

第1の実施の形態において、計測点Wpについての法線Vを特定する処理は、3次元カメラ410および2次元カメラ310を用いて行われる。具体的には、計測点Wpについての法線Vを特定する処理は、3次元カメラ410が撮像した3次元画像に基づいてワークWに設定された各計測点Wpについての法線Vを決定する処理と、決定された法線V上に2次元カメラ310を位置決めした状態で決定された法線Vを当該2次元カメラ310が撮像した2次元画像に基づいて補正する処理とを含む。 In the first embodiment, the process of specifying the normal V for the measurement point Wp is performed by using the three-dimensional camera 410 and the two-dimensional camera 310. Specifically, the process of specifying the normal V for the measurement point Wp determines the normal V for each measurement point Wp set in the work W based on the three-dimensional image captured by the three-dimensional camera 410. The process includes a process and a process of correcting the determined normal V in a state where the two-dimensional camera 310 is positioned on the determined normal V based on the two-dimensional image captured by the two-dimensional camera 310.

つまり、第1の実施の形態において、計測点Wpについての法線Vを特定する処理は、(1)3次元画像に基づいてワークWの配置状況を特定する処理と、(2)3次元画像に基づいて特定した配置状況に応じてワークWに設定された各計測点Wpについての法線Vを決定する処理と、(3)決定された法線V上に2次元カメラ310を位置決めした状態で当該2次元カメラ310が撮像した2次元画像に基づいてワークWの配置状況を特定する処理と、(4)決定された法線Vを2次元画像に基づいて特定した配置状況に応じて補正する処理とから成る。 That is, in the first embodiment, the processes for specifying the normal V for the measurement point Wp are (1) a process for specifying the arrangement status of the work W based on the three-dimensional image, and (2) a three-dimensional image. The process of determining the normal V for each measurement point Wp set in the work W according to the arrangement situation specified based on (3) the state in which the two-dimensional camera 310 is positioned on the determined normal V. The process of specifying the arrangement status of the work W based on the two-dimensional image captured by the two-dimensional camera 310, and (4) correcting the determined normal V according to the arrangement status specified based on the two-dimensional image. It consists of processing to be done.

図4を参照して、画像処理システムSYSにおいて実行されるワークWの外観検査に関する処理を実現するために、管理装置100のCPU130が実行する検査処理について説明する。図4は、検査処理のフローチャートである。CPU130は、ワークWの検査を実行する指令を受け付けたことに基づいて検査処理を実行する。なお、ワークWの検査を実行する指令は、たとえば、入力装置120からユーザによって入力される。また、ワークWの検査を実行する指令は、ワークWが3次元カメラ410の撮像視野範囲内に提供されたことに応じて3次元画像処理装置400またはラインLを管理する装置(図示せず)から入力されてもよい。第1の実施の形態において、CPU130は、ワークWの検査を実行する指令とともに、ワークWの種類を特定可能なワークナンバーを受け付けるものとする。 With reference to FIG. 4, the inspection process executed by the CPU 130 of the management device 100 will be described in order to realize the process related to the appearance inspection of the work W executed in the image processing system SYS. FIG. 4 is a flowchart of the inspection process. The CPU 130 executes the inspection process based on the reception of the command for executing the inspection of the work W. The command for executing the inspection of the work W is input by the user from, for example, the input device 120. Further, the command for executing the inspection of the work W is a device for managing the 3D image processing device 400 or the line L according to the work W being provided within the imaging field of view of the 3D camera 410 (not shown). It may be input from. In the first embodiment, the CPU 130 receives a work number that can specify the type of the work W together with a command to execute the inspection of the work W.

ステップS100において、CPU130は、メインメモリ140に記憶されている複数の検査用情報1411の中から、ワークナンバーに対応する検査用情報1411を特定する。 In step S100, the CPU 130 identifies the inspection information 1411 corresponding to the work number from the plurality of inspection information 1411 stored in the main memory 140.

ステップS200において、CPU130は、3次元カメラ410が撮像したワークWの3次元画像に基づいてワークWの配置状況を特定し、検査経路WLを生成する検査経路生成処理を実行する。CPU130が検査経路生成処理を実行することで、(1)3次元画像に基づいてワークWの配置状況を特定する処理と、(2)3次元画像に基づいて特定した配置状況に応じてワークWに設定された各計測点Wpについての法線Vを決定する処理とが行われることとなる。 In step S200, the CPU 130 identifies the arrangement status of the work W based on the three-dimensional image of the work W captured by the three-dimensional camera 410, and executes the inspection route generation process for generating the inspection route WL. By executing the inspection route generation process by the CPU 130, (1) the process of specifying the arrangement status of the work W based on the three-dimensional image, and (2) the work W according to the arrangement status specified based on the three-dimensional image. The process of determining the normal V for each measurement point Wp set in is performed.

ステップS300において、CPU130は、検査箇所があるか否かを判断する。具体的には、CPU130は、検査が済んでいない計測点Wpがあるか否かを判断する。全ての計測点Wpについて検査が済んでいる場合には(ステップS300においてNO)、CPU130は、検査処理を終了する。検査が済んでいない計測点Wpがある場合には(ステップS300においてYES)、CPU130は、制御をステップS310に切り替える。 In step S300, the CPU 130 determines whether or not there is an inspection point. Specifically, the CPU 130 determines whether or not there is a measurement point Wp that has not been inspected. If all the measurement points Wp have been inspected (NO in step S300), the CPU 130 ends the inspection process. If there is a measurement point Wp that has not been inspected (YES in step S300), the CPU 130 switches the control to step S310.

ステップS310において、CPU130は、検査が済んでいない一の計測点Wpを決める。 In step S310, the CPU 130 determines one measurement point Wp that has not been inspected.

ステップS400において、CPU130は、法線補正処理を実行する。法線補正処理は、検査が済んでいない一の計測点Wpについての法線Vを補正する処理である。CPU130が法線補正処理を実行することで、(3)決定された法線V上に2次元カメラ310を位置決めした状態で当該2次元カメラ310が撮像した2次元画像に基づいてワークWの配置状況を特定する処理と、(4)決定された法線Vを2次元画像に基づいて特定したワークWの配置状況に応じて補正する処理とが行われることとなる。 In step S400, the CPU 130 executes the normal correction process. The normal correction process is a process for correcting the normal V of one measurement point Wp that has not been inspected. By executing the normal correction process by the CPU 130, (3) the work W is arranged based on the two-dimensional image captured by the two-dimensional camera 310 in a state where the two-dimensional camera 310 is positioned on the determined normal V. The process of specifying the situation and (4) the process of correcting the determined normal V according to the arrangement status of the specified work W based on the two-dimensional image are performed.

ステップS500において、CPU130は、ピント調整処理を実行する。ピント調整処理は、2次元カメラ310のピントを計測点Wpに合わせる処理である。CPU130がピント調整処理を実行することで、決定した法線V上で2次元カメラ310のピントを計測点Wpに合わせる処理が行われることとなる。 In step S500, the CPU 130 executes the focus adjustment process. The focus adjustment process is a process of adjusting the focus of the two-dimensional camera 310 to the measurement point Wp. When the CPU 130 executes the focus adjustment process, the process of adjusting the focus of the two-dimensional camera 310 to the measurement point Wp on the determined normal V is performed.

ステップS600において、CPU130は、検査実行処理を実行する。検査実行処理は、計測点Wpにおける検査を実行する処理である。CPU130が検査実行処理を実行することで、2次元カメラ310のピントを計測点Wpに合わせた状態で検査を実行する処理が行なわれることとなる。 In step S600, the CPU 130 executes the inspection execution process. The inspection execution process is a process of executing an inspection at the measurement point Wp. When the CPU 130 executes the inspection execution process, the process of executing the inspection in a state where the focus of the two-dimensional camera 310 is adjusted to the measurement point Wp is performed.

[E.画像処理装置の機能構成]
図5を参照して、画像処理装置2の機能全体について説明する。図5は、画像処理装置2の機能構成の一例を示す図である。上述のように、画像処理装置2は、管理装置100、ロボット制御部200、2次元画像処理装置300、および3次元画像処理装置400を含む。
[E. Functional configuration of image processing device]
The entire function of the image processing apparatus 2 will be described with reference to FIG. FIG. 5 is a diagram showing an example of the functional configuration of the image processing device 2. As described above, the image processing device 2 includes a management device 100, a robot control unit 200, a two-dimensional image processing device 300, and a three-dimensional image processing device 400.

管理装置100は、記憶部であるメインメモリ140を含む。メインメモリ140は、検査用情報1411を格納する機能構成として格納部141を含む。また、管理装置100は、他の機能構成として、位置決定部131、経路生成部132、法線補正部133、法線軌道生成部134、ピント位置決定部135、円弧軌道生成部136、検査結果判定部137、および検査結果登録部138を含む。位置決定部131、経路生成部132、法線補正部133、法線軌道生成部134、ピント位置決定部135、円弧軌道生成部136、検査結果判定部137、および検査結果登録部138は、典型的には、管理装置100のCPUがプログラムを実行することで実現される。 The management device 100 includes a main memory 140 which is a storage unit. The main memory 140 includes a storage unit 141 as a functional configuration for storing inspection information 1411. Further, the management device 100 has other functional configurations such as a position determination unit 131, a route generation unit 132, a normal correction unit 133, a normal trajectory generation unit 134, a focus position determination unit 135, an arc trajectory generation unit 136, and an inspection result. It includes a determination unit 137 and an inspection result registration unit 138. The position determination unit 131, the route generation unit 132, the normal correction unit 133, the normal trajectory generation unit 134, the focus position determination unit 135, the arc trajectory generation unit 136, the inspection result determination unit 137, and the inspection result registration unit 138 are typical. Specifically, it is realized by the CPU of the management device 100 executing the program.

ロボット制御部200は、機能構成として、ワールド座標系における2次元カメラ310の位置姿勢の情報を、ロボット座標系における2次元カメラ310の位置姿勢の情報に変換する変換部220を備える。具体的に、変換部は、ワールド座標系の位置座標(Xw,Yw,Zw)からロボット座標系の位置座標(Xr,Yr,Zr)に変換するとともに、ワールド座標系の向きに関する情報(Nw)をロボット座標系の向きに関する情報(Nr)に変換する。ここで、向きに関する情報は、たとえばベクトルによって示される。なお、角度によって示されてもよい。 As a functional configuration, the robot control unit 200 includes a conversion unit 220 that converts information on the position and orientation of the two-dimensional camera 310 in the world coordinate system into information on the position and orientation of the two-dimensional camera 310 in the robot coordinate system. Specifically, the conversion unit converts the position coordinates of the world coordinate system (Xw, Yw, Zw) into the position coordinates of the robot coordinate system (Xr, Yr, Zr), and also information on the orientation of the world coordinate system (Nw). Is converted into information (Nr) regarding the orientation of the robot coordinate system. Here, the information about the orientation is shown, for example, by a vector. It may be indicated by an angle.

2次元画像処理装置300は、画像処理エンジン330を含む。画像処理エンジン330は、機能構成として、特定部331、合焦度算出部332、および特徴量算出部333を含む。 The two-dimensional image processing apparatus 300 includes an image processing engine 330. The image processing engine 330 includes a specific unit 331, a focus degree calculation unit 332, and a feature amount calculation unit 333 as functional configurations.

3次元画像処理装置400は、画像処理エンジン430を含む。画像処理エンジン430は、機能構成として、特定部431を含む。 The three-dimensional image processing apparatus 400 includes an image processing engine 430. The image processing engine 430 includes a specific unit 431 as a functional configuration.

なお、図5に示す画像処理装置2の機能構成のうち、一部または全部の機能をASL(Application Sub-Layer)やFPGA(Field Programmable Gate Array)などのハードワイヤード回路を用いて実現してもよい。なお、管理装置100、ロボット制御部200、2次元画像処理装置300および3次元画像処理装置400の各装置の機能の一部または全部の機能は他の装置に実装されてもよい。 Even if some or all of the functional configurations of the image processing apparatus 2 shown in FIG. 5 are realized by using a hard-wired circuit such as ASL (Application Sub-Layer) or FPGA (Field Programmable Gate Array). good. Note that some or all of the functions of the management device 100, the robot control unit 200, the two-dimensional image processing device 300, and the three-dimensional image processing device 400 may be mounted on another device.

格納部141は、入力装置120から入力された検査経路WLに関する情報を格納する。CPU130は、入力装置120から検査経路WLに関する情報が入力されたときに、格納部141に情報を記録する。なお、格納部141に記憶されている情報は、入力装置120から入力された情報に限られず、メモリカード171または/およびハードディスク150から読み出された情報を含む。検査経路WLに関する情報としては、たとえば、各計測点Wpの3DCAD上の座標位置(Xm,Ym,Zm)および各計測点Wpについての法線ベクトル(Nm)が含まれる。 The storage unit 141 stores information about the inspection path WL input from the input device 120. When the information about the inspection path WL is input from the input device 120, the CPU 130 records the information in the storage unit 141. The information stored in the storage unit 141 is not limited to the information input from the input device 120, but includes the information read from the memory card 171 and / and the hard disk 150. The information regarding the inspection path WL includes, for example, the coordinate positions (Xm, Ym, Zm) on the 3D CAD of each measurement point Wp and the normal vector (Nm) for each measurement point Wp.

位置決定部131は、経路生成部132、法線補正部133、法線軌道生成部134、ピント位置決定部135および円弧軌道生成部136のそれぞれから送られる2次元カメラ310の位置および向きに関する情報から、2次元カメラ310のワールド座標系における位置および向きを決定する。位置決定部131は、2次元カメラ310のワールド座標系での位置および向きに関する情報をロボット制御部200に送信する。 The position determination unit 131 is information on the position and orientation of the two-dimensional camera 310 sent from each of the route generation unit 132, the normal correction unit 133, the normal trajectory generation unit 134, the focus position determination unit 135, and the arc trajectory generation unit 136. To determine the position and orientation of the 2D camera 310 in the world coordinate system. The position determination unit 131 transmits information regarding the position and orientation of the two-dimensional camera 310 in the world coordinate system to the robot control unit 200.

3次元画像処理装置400の特定部431は、ラインL上によって提供されたワークWの配置状況を3次元画像から特定する。一例として、特定部431は、3次元パータンマッチングやICP(Iterative Closest Point)などの3次元画像処理によりワークWの配置状況を算出する。特定部431によって計測されたワークWの位置は、典型的には、3次元カメラ410におけるカメラ座標系の座標値(Xc3,Yc3,Zc3)[pixcel]で表される。また、特定部431によって計測されたワークWの向きは、典型的には、3次元カメラ410におけるカメラ座標系のx軸、y軸、z軸周りの回転角(θxc3,θyc3,θzc3)[ラジアン]で表される。特定部431によって計測されたワークWの位置および傾きは管理装置100に送られる。 The specifying unit 431 of the three-dimensional image processing apparatus 400 specifies the arrangement state of the work W provided by the line L from the three-dimensional image. As an example, the specific unit 431 calculates the arrangement status of the work W by three-dimensional image processing such as three-dimensional pattern matching and ICP (Iterative Closest Point). The position of the work W measured by the specific unit 431 is typically represented by the coordinate values (Xc3, Yc3, Zc3) [pixcel] of the camera coordinate system in the three-dimensional camera 410. Further, the orientation of the work W measured by the specific unit 431 is typically the rotation angle (θxc3, θyc3, θzc3) around the x-axis, y-axis, and z-axis of the camera coordinate system in the three-dimensional camera 410 [radian. ] Is represented by. The position and inclination of the work W measured by the specific unit 431 are sent to the management device 100.

経路生成部132は、特定部431から送られた3次元カメラ410のカメラ座標系におけるワークWの位置および向き、ならびに、格納部141に格納されたワークWの検査用情報1411などに基づいて検査経路WLを生成する。検査経路WLは、典型的には、ワールド座標系の座標位置(Xw,Yw,Zw)[mm]および法線ベクトル(Nw)によって表現される。つまり、経路生成部132は、3次元画像に基づいて特定された配置状況に応じてワークWに設定された各計測点Wpについての法線Vを決定する。 The route generation unit 132 inspects based on the position and orientation of the work W in the camera coordinate system of the three-dimensional camera 410 sent from the specific unit 431, the inspection information 1411 of the work W stored in the storage unit 141, and the like. Generate a path WL. The inspection path WL is typically represented by a coordinate position (Xw, Yw, Zw) [mm] and a normal vector (Nw) in the world coordinate system. That is, the path generation unit 132 determines the normal V for each measurement point Wp set in the work W according to the arrangement state specified based on the three-dimensional image.

また、経路生成部132は、検査の開始および終了を管理する。具体的には、検査の開始指示を受けたことに基づいて、検査経路WLを生成する。経路生成部132は、生成した検査経路WLに基づいて2次元カメラ310の位置および向き(Xw,Yw,Zw,Nw)を決定し、位置決定部131に指示を出す。また、経路生成部132は、一の計測点について検査が終了したことを示す終了信号を受けて、次の計測点Wpに2次元カメラ310を位置決めするために2次元カメラ310の位置および向き(Xw,Yw,Zw)を決定し、位置決定部131に指示を出す。経路生成部132は、全ての計測点Wpについて終了信号を受け付けたことに基づいて、検査を終了する。 In addition, the route generation unit 132 manages the start and end of the inspection. Specifically, the inspection path WL is generated based on the instruction to start the inspection. The route generation unit 132 determines the position and orientation (Xw, Yw, Zw, Nw) of the two-dimensional camera 310 based on the generated inspection path WL, and issues an instruction to the position determination unit 131. Further, the path generation unit 132 receives the end signal indicating that the inspection is completed for one measurement point, and the position and orientation of the two-dimensional camera 310 in order to position the two-dimensional camera 310 at the next measurement point Wp ( Xw, Yw, Zw) is determined, and an instruction is given to the position determination unit 131. The route generation unit 132 ends the inspection based on the fact that the end signals are received for all the measurement points Wp.

このように、第1の実施の形態においては、経路生成部132が、検査の終了を示す終了信号を受けて、順次、2次元カメラ310を動かすようにロボット制御部200に指示を出す。そのため、ユーザが計測点における検査が完了したことを確認し、確認した上で次の計測点Wpにおける検査を開始することを管理装置100に指示する必要がない。つまり、第1の実施の形態にかかる画像処理システムSYSは、経路生成部132を備えることによって、ユーザの操作性が向上する。 As described above, in the first embodiment, the route generation unit 132 receives the end signal indicating the end of the inspection and sequentially instructs the robot control unit 200 to move the two-dimensional camera 310. Therefore, it is not necessary for the user to confirm that the inspection at the measurement point is completed and instruct the management device 100 to start the inspection at the next measurement point Wp after confirming. That is, the image processing system SYS according to the first embodiment is provided with the route generation unit 132, so that the user's operability is improved.

2次元画像処理装置300の特定部331は、経路生成部132によって決定された計測点Wpの法線Vを補正するための情報を2次元画像から特定する。一例として、特定部331は、パターンマッチングなどの画像処理により計測点Wpの法線Vを補正するための情報を算出する。ここで、計測点Wpの法線Vを補正するための情報とは、計測点Wpの位置に関する情報である。特定部431によって算出された計測点Wpの位置は、典型的には、2次元カメラ310におけるカメラ座標系の座標値(Xc2,Yc2)[pixcel]と、法線を軸とした場合の軸回りの回転角θc2[ラジアン]とで表される。特定部331によって計測された計測点Wpの位置に関する情報は管理装置100に送られる。 The identification unit 331 of the two-dimensional image processing device 300 specifies information for correcting the normal V of the measurement point Wp determined by the path generation unit 132 from the two-dimensional image. As an example, the specific unit 331 calculates information for correcting the normal V of the measurement point Wp by image processing such as pattern matching. Here, the information for correcting the normal V of the measurement point Wp is the information regarding the position of the measurement point Wp. The position of the measurement point Wp calculated by the specific unit 431 is typically the coordinate value (Xc2, Yc2) [pixcel] of the camera coordinate system in the two-dimensional camera 310 and the axis rotation when the normal is the axis. It is represented by the rotation angle θc2 [radian] of. Information regarding the position of the measurement point Wp measured by the specific unit 331 is sent to the management device 100.

法線補正部133は、経路生成部132によって決定された計測点Wpの法線Vを補正する。具体的には、法線補正部133は、特定部331によって計測された計測点Wpの位置に関する情報に基づいて、計測点Wpの法線Vを特定する。つまり、法線補正部133は、間接的には、2次元画像に基づいて計測点Wpの法線Vを特定する。以下、2次元画像に基づいて特定された計測点Wpの法線Vを「計測された計測点Wpの法線V」(実測値)ともいう。一方、2次元カメラ310の位置決めをするにあたって参照された計測点Wpの法線Vを「決定された計測点Wpの法線V」(指定値)ともいう。 The normal correction unit 133 corrects the normal V of the measurement point Wp determined by the route generation unit 132. Specifically, the normal correction unit 133 specifies the normal V of the measurement point Wp based on the information regarding the position of the measurement point Wp measured by the specific unit 331. That is, the normal correction unit 133 indirectly specifies the normal V of the measurement point Wp based on the two-dimensional image. Hereinafter, the normal V of the measurement point Wp specified based on the two-dimensional image is also referred to as “the normal V of the measured measurement point Wp” (actual measurement value). On the other hand, the normal V of the measurement point Wp referred to when positioning the two-dimensional camera 310 is also referred to as "the normal V of the determined measurement point Wp" (designated value).

法線補正部133は、計測された計測点Wpの法線Vと決定された計測点Wpの法線Vとの乖離値を算出し、その乖離値に基づいて決定された計測点Wpの位置を補正し、計測点Wpの位置を再度決定する。法線補正部133は、決定した計測点Wpの位置に基づいて2次元カメラ310の位置および向き(Xw,Yw,Zw,Nw)を決定し、位置決定部131に送信する。法線補正部133は、乖離値が予め定められた値以下になったことに基づいて、計測点Wpの位置および法線ベクトルを決定する。法線補正部133は、決定した計測点Wpの位置および法線ベクトル(Xw,Yw,Zw,Nw)を法線軌道生成部134に送信する。 The normal correction unit 133 calculates the deviation value between the normal V of the measured measurement point Wp and the normal V of the determined measurement point Wp, and the position of the measurement point Wp determined based on the deviation value. Is corrected, and the position of the measurement point Wp is determined again. The normal correction unit 133 determines the position and orientation (Xw, Yw, Zw, Nw) of the two-dimensional camera 310 based on the position of the determined measurement point Wp, and transmits the position and orientation (Xw, Yw, Zw, Nw) to the position determination unit 131. The normal correction unit 133 determines the position of the measurement point Wp and the normal vector based on the fact that the deviation value becomes equal to or less than a predetermined value. The normal correction unit 133 transmits the position of the determined measurement point Wp and the normal vector (Xw, Yw, Zw, Nw) to the normal trajectory generation unit 134.

法線軌道生成部134は、受信した計測点Wpの位置および法線ベクトルに基づいて、2次元カメラ310の光軸Oと計測点Wpについての法線Vとを一致させた状態で、2次元カメラ310と計測点Wpとの間の距離を変化させる2次元カメラ310の法線軌道(Xw(t),Yw(t),Zw(t))を生成する。法線軌道生成部134は、生成した法線軌道、移動させる範囲などを位置決定部131およびピント位置決定部135に送信する。 The normal trajectory generation unit 134 is two-dimensional in a state where the optical axis O of the two-dimensional camera 310 and the normal V for the measurement point Wp are matched based on the position of the received measurement point Wp and the normal vector. A normal trajectory (Xw (t), Yw (t), Zw (t)) of the two-dimensional camera 310 that changes the distance between the camera 310 and the measurement point Wp is generated. The normal trajectory generation unit 134 transmits the generated normal trajectory, the range to be moved, and the like to the position determination unit 131 and the focus position determination unit 135.

合焦度算出部332は、2次元画像から合焦度aを算出するとともに、当該2次元画像を2次元カメラ310が撮像した時間tとの関係a(t)をピント位置決定部135に送信する。 The in-focus degree calculation unit 332 calculates the in-focus degree a from the two-dimensional image, and transmits the relationship a (t) with the time t when the two-dimensional image is captured by the two-dimensional camera 310 to the focus position determination unit 135. do.

ピント位置決定部135は、合焦度算出部332から送信された2次元画像の合焦度a(t)および法線軌道生成部134から送信された法線軌道などの情報から、合焦度aが最も高くなる位置を特定する。ピント位置決定部135は特定した位置から必要に応じて法線軌道生成部134に移動範囲を指定して法線軌道を生成するための指示を出す。ピント位置決定部135は、ピント位置を決定するための十分な情報を合焦度算出部332から得られたことに基づいて、ピント位置(Xw,Yw,Zw)を決定し、円弧軌道生成部136に送信する。 The focus position determination unit 135 is based on information such as the in-focus degree a (t) of the two-dimensional image transmitted from the in-focus degree calculation unit 332 and the normal orbit transmitted from the normal orbit generation unit 134, and the in-focus degree. Specify the position where a is the highest. The focus position determination unit 135 gives an instruction to generate a normal trajectory by designating a movement range from the specified position to the normal trajectory generation unit 134 as needed. The focus position determination unit 135 determines the focus position (Xw, Yw, Zw) based on the fact that sufficient information for determining the focus position is obtained from the focus degree calculation unit 332, and the arc trajectory generation unit. Send to 136.

円弧軌道生成部136は、ピント位置決定部135から送られたピント位置における2次元カメラ310と計測点Wpとの距離を保った状態で計測点についての法線Vと2次元カメラ310の光軸Oとのなす角度が変わるように円弧軌道を生成する。円弧軌道生成部136は2次元カメラ310の光軸Oと計測点Wpとが交わるように2次元カメラ310の位置および向きについて円弧軌道(Xw(t),Yw(t),Zw(t)、Nw(t))を生成する。円弧軌道生成部136は、生成した円弧軌道と、移動させる範囲などを位置決定部131および検査結果判定部137に送信する。 The arc orbit generation unit 136 has a normal V for the measurement point and an optical axis of the two-dimensional camera 310 while maintaining the distance between the two-dimensional camera 310 and the measurement point Wp at the focus position sent from the focus position determination unit 135. An arc orbit is generated so that the angle formed with O changes. The arc orbit generation unit 136 describes the arc orbit (Xw (t), Yw (t), Zw (t), with respect to the position and orientation of the two-dimensional camera 310 so that the optical axis O of the two-dimensional camera 310 and the measurement point Wp intersect. Nw (t)) is generated. The arc orbit generation unit 136 transmits the generated arc orbit, the range to be moved, and the like to the position determination unit 131 and the inspection result determination unit 137.

特徴量算出部333は、計測点ごとに定められた検査を実行するための特徴量bを算出する。特徴量算出部333は、検査内容に対応する特徴量bを2次元画像から算出する。特徴量bの算出方法は、たとえば、ワークWの種類と検査内容とから決定されてもよい。特徴量算出部333は、算出した特徴量bと当該2次元画像を2次元カメラ310が撮像した時間tとの関係b(t)を検査結果判定部137に送信する。 The feature amount calculation unit 333 calculates the feature amount b for executing the inspection determined for each measurement point. The feature amount calculation unit 333 calculates the feature amount b corresponding to the inspection content from the two-dimensional image. The method for calculating the feature amount b may be determined from, for example, the type of the work W and the inspection content. The feature amount calculation unit 333 transmits the relationship b (t) between the calculated feature amount b and the time t when the two-dimensional image is captured by the two-dimensional camera 310 to the inspection result determination unit 137.

検査結果判定部137は、2次元画像の特徴量b(t)および円弧軌道生成部136から送信された円弧軌道などの情報から、特徴量bが増加する方向を特定する。特徴量bが増加する方向を円弧軌道生成部136に送信する。円弧軌道生成部136は、2次元カメラ310を動かすことができる範囲内で、特徴量bが増加する方向に2次元カメラ310を動かすことができる場合は、円弧軌道などを生成する。検査結果判定部137は、2次元カメラ310を動かすことができる範囲内における特徴量bを得た場合に、特徴量bの最大値を特定し、最大値が予め定められた規定値以上であるか否かに基づいて、検査結果を判断する。検査結果判定部137は、得られた検査結果を検査結果登録部138に送信する。 The inspection result determination unit 137 specifies a direction in which the feature amount b increases from information such as the feature amount b (t) of the two-dimensional image and the arc trajectory transmitted from the arc trajectory generation unit 136. The direction in which the feature amount b increases is transmitted to the arc orbit generation unit 136. The arc orbit generation unit 136 generates an arc orbit or the like when the two-dimensional camera 310 can be moved in the direction in which the feature amount b increases within the range in which the two-dimensional camera 310 can be moved. When the inspection result determination unit 137 obtains the feature amount b within the range in which the two-dimensional camera 310 can be moved, the inspection result determination unit 137 specifies the maximum value of the feature amount b, and the maximum value is equal to or higher than a predetermined predetermined value. The test result is judged based on whether or not it is. The inspection result determination unit 137 transmits the obtained inspection result to the inspection result registration unit 138.

検査結果登録部138は、検査結果判定部137から送られた検査結果を出力するとともに、終了信号を経路生成部132に送信する。出力された検査結果はメインメモリ140の所定領域に記憶される。検査結果登録部138は、検査結果をメインメモリ140に記憶するとともに、表示装置110に検査結果を表示させてもよい。 The inspection result registration unit 138 outputs the inspection result sent from the inspection result determination unit 137 and also transmits the end signal to the route generation unit 132. The output inspection result is stored in a predetermined area of the main memory 140. The inspection result registration unit 138 may store the inspection result in the main memory 140 and display the inspection result on the display device 110.

[F.検査経路生成処理]
図6および図7を参照して、管理装置100のCPU130が実行する検査経路生成処理(ステップS200、図4参照)について詳細に説明する。図6は、検査経路生成処理のフローチャートである。図7は、検査経路生成処理の実行において機能する画像処理装置2の機能構成の一例を示す図である。なお、図7においては、ワークWの形状を図1および図3に比べて簡略化して記載している。
[F. Inspection route generation process]
The inspection route generation process (step S200, see FIG. 4) executed by the CPU 130 of the management device 100 will be described in detail with reference to FIGS. 6 and 7. FIG. 6 is a flowchart of the inspection route generation process. FIG. 7 is a diagram showing an example of the functional configuration of the image processing apparatus 2 that functions in the execution of the inspection route generation process. In FIG. 7, the shape of the work W is shown in a simplified manner as compared with FIGS. 1 and 3.

CPU130が検査経路生成処理を実行することで、ワークWの配置状況が特定されるとともに、特定されたワークWの配置状況に応じて、ワークWに設定された各計測点Wpについての法線Vが特定される。 When the CPU 130 executes the inspection route generation process, the arrangement status of the work W is specified, and the normal V for each measurement point Wp set in the work W according to the arrangement status of the specified work W. Is identified.

図4に示すように、検査経路生成処理(ステップS200)は、ワークナンバーに対応する検査用情報1411がステップS100において特定された後、実行される。検査用情報1411はたとえば、メインメモリ140に設けられた格納部141にワークナンバーごとに記憶されている。たとえば、検査用情報1411としては、認識用CADモデルならびに、計測点ナンバー(No.i)ごとに計測点Wpの3DCAD上での座標値(Xmi,Ymi,Zmi)、大きさを所定値とした法線ベクトル(Nmi)、検査項目、およびレファレンスモデル画像(Ii)が格納部141に記憶されている(図7参照)。計測点No.i(i=1,2,・・・)は、計測順序を示しており、経路生成部132は、No.iの計測点の次にNo.(i+1)の計測点Wpについて検査を実行するように制御する。 As shown in FIG. 4, the inspection route generation process (step S200) is executed after the inspection information 1411 corresponding to the work number is specified in step S100. The inspection information 1411 is stored, for example, in the storage unit 141 provided in the main memory 140 for each work number. For example, as the inspection information 1411, the recognition CAD model, the coordinate values (Xmi, Ymi, Zmi) and the size of the measurement points Wp on the 3D CAD for each measurement point number (No. i) are set as predetermined values. The normal vector (Nmi), the inspection item, and the reference model image (Ii) are stored in the storage unit 141 (see FIG. 7). Measurement point No. i (i = 1, 2, ...) Indicates the measurement order, and the route generation unit 132 is No. Next to the measurement point of i, No. The measurement point Wp at (i + 1) is controlled to be inspected.

ここで、レファレンスモデル画像(Ii)とは、計測点の基準画像であって、2次元カメラ310の光軸Oと、No.iの計測点Wpについての法線Vとが一致している場合に2次元カメラ310の撮像領域内に含まれる基準となる画像であればよい。また、レファレンスモデル画像(Ii)は、典型的には、認識用CADモデルからCG(Computer Graphics)レンダリングによって生成される。なお、レファレンスモデル画像(Ii)は、ワークWを実際に撮像した画像から生成してもよい。 Here, the reference model image (Ii) is a reference image of the measurement point, and the optical axis O of the two-dimensional camera 310 and No. Any image may be used as a reference image included in the imaging region of the two-dimensional camera 310 when the normal V for the measurement point Wp of i coincides with the normal line V. Further, the reference model image (Ii) is typically generated from a recognition CAD model by CG (Computer Graphics) rendering. The reference model image (Ii) may be generated from an image actually captured by the work W.

ワークWの検査用情報1411が特定された後、ステップS201において、CPU130は、3次元画像処理装置400に、特定された検査用情報1411の認識用CADモデルを送る。3次元画像処理装置400は、画像処理エンジン430の記憶部432に認識用CADモデルを一時的に記憶する。なお、3次元画像処理装置400は、ワークナンバーごとに認識用CADモデルを予め記憶していてもよい。この場合、ステップS201において、CPU130は、ワークナンバーだけを3次元画像処理装置400に送信する。 After the inspection information 1411 of the work W is specified, in step S201, the CPU 130 sends a recognition CAD model of the specified inspection information 1411 to the three-dimensional image processing device 400. The three-dimensional image processing device 400 temporarily stores the recognition CAD model in the storage unit 432 of the image processing engine 430. The three-dimensional image processing apparatus 400 may store the recognition CAD model for each work number in advance. In this case, in step S201, the CPU 130 transmits only the work number to the three-dimensional image processing device 400.

ステップS202において、CPU130は、3次元画像処理装置400にワークWの配置状況を特定することを指示する。 In step S202, the CPU 130 instructs the three-dimensional image processing device 400 to specify the arrangement status of the work W.

図7を参照して、3次元画像処理装置400が実行するワークWの配置状況の特定方法を説明する。3次元画像処理装置400の特定部431は、ワークWの配置状況を特定することの指示を受け、撮像制御部420に3次元画像を取得することを指示する。撮像制御部420は、取得した3次元画像を画像処理エンジン430の格納部433に格納する。特定部431は、格納部433に記憶された3次元画像内において、記憶部432に記憶された認識用CADモデルと類似する画像領域を探索する。特定部431は、探索した画像領域から、3次元画像内におけるワークWの位置(Xc3,Yc3,Zc3)と3次元画像内におけるワークWの向き(θxc3,θyc3,θzc3)とを算出する。特定部431は、算出した3次元画像内におけるワークWの位置および向きを管理装置100に送信する。 A method of specifying the arrangement status of the work W executed by the three-dimensional image processing apparatus 400 will be described with reference to FIG. 7. The specifying unit 431 of the three-dimensional image processing device 400 receives an instruction to specify the arrangement status of the work W, and instructs the imaging control unit 420 to acquire a three-dimensional image. The image pickup control unit 420 stores the acquired three-dimensional image in the storage unit 433 of the image processing engine 430. The specific unit 431 searches for an image area similar to the recognition CAD model stored in the storage unit 432 in the three-dimensional image stored in the storage unit 433. The specific unit 431 calculates the position of the work W in the three-dimensional image (Xc3, Yc3, Zc3) and the orientation of the work W in the three-dimensional image (θxc3, θyc3, θzc3) from the searched image area. The identification unit 431 transmits the position and orientation of the work W in the calculated three-dimensional image to the management device 100.

図6に戻って検査経路生成処理について説明する。3次元画像処理装置400からワークWの位置およびワークWの向きに関する情報を受け、ステップS203において、CPU130は、グローバル座標系におけるワークWの配置状況を特定する。具体的には、CPU130の機能構成に含まれる変換部139(図7参照)が、カメラ座標系の値(Xc3,Yc3,Zc3,θxc3,θyc3,θzc3)を3次元カメラ410の座標値(Xw0,Yw0,Zw0)および予め定められた座標変換式に基づいてグローバル座標系の値(Xw,Yw,Zw,θxw,θyw,θzw)に変換する。これにより、図7に示すように、ラインLによって提供されたワークWについての検査経路WLが生成される。 Returning to FIG. 6, the inspection route generation process will be described. Upon receiving information regarding the position of the work W and the orientation of the work W from the three-dimensional image processing device 400, in step S203, the CPU 130 specifies the arrangement state of the work W in the global coordinate system. Specifically, the conversion unit 139 (see FIG. 7) included in the functional configuration of the CPU 130 changes the values of the camera coordinate system (Xc3, Yc3, Zc3, θxc3, θyc3, θzc3) to the coordinate values (Xw0) of the three-dimensional camera 410. , Yw0, Zw0) and the values of the global coordinate system (Xw, Yw, Zw, θxw, θyw, θzw) based on the predetermined coordinate conversion formula. As a result, as shown in FIG. 7, the inspection path WL for the work W provided by the line L is generated.

ステップS204において、CPU130は、法線Vを決定することで検査経路WLを生成して、検査処理に戻る。具体的には、経路生成部132(図7参照)が、格納部141に格納された検査用情報1411のうち、計測点Wpiごとの座標(Xmi,Ymi,Zmi)および法線ベクトル(Nmi)をグローバル座標系におけるワークWの位置(Xw,Yw,Zw)および向き(θxw,θyw,θzw)ならびに予め定められた変換式に基づいてグローバルワーク座標系の座標値(Xwi,Ywi,Zwi)および法線ベクトル(Nwi)に変換する。グローバル座標系における計測点Wpの座標値および法線ベクトルが算出されることで法線Vが決定する。また、グローバル座標系における計測点Wpの座標値および法線ベクトルが算出されることで検査経路WLも生成されることとなる。経路生成部132は、格納部141の検査用情報1411を生成した検査経路の情報に更新する。経路生成部132は、更新した情報をメインメモリ140の第1記憶部142(図9参照)に記憶する。 In step S204, the CPU 130 generates the inspection path WL by determining the normal V, and returns to the inspection process. Specifically, the route generation unit 132 (see FIG. 7) has coordinates (Xmi, Ymi, Zmi) and normal vectors (Nmi) for each measurement point Wpi among the inspection information 1411 stored in the storage unit 141. The position (Xw, Yw, Zw) and orientation (θxw, θyw, θzw) of the work W in the global coordinate system, and the coordinate values (Xwi, Ywi, Zwi) of the global work coordinate system based on a predetermined conversion formula. Convert to normal vector (Nwi). The normal V is determined by calculating the coordinate value of the measurement point Wp and the normal vector in the global coordinate system. Further, the inspection path WL is also generated by calculating the coordinate value and the normal vector of the measurement point Wp in the global coordinate system. The route generation unit 132 updates the inspection information 1411 of the storage unit 141 with the information of the generated inspection route. The route generation unit 132 stores the updated information in the first storage unit 142 (see FIG. 9) of the main memory 140.

このように、CPU130が検査経路生成処理を実行することで、3次元画像処理装置400が3次元画像に基づいてワークWの配置状況を特定する。また、CPU130が検査経路生成処理を実行することで、ワークWに設定された各計測点Wpについて、ワールド座標系における各計測点Wpの位置および法線ベクトルが算出される。つまり、CPU130が検査経路生成処理を実行することで、特定したワークWの配置状況に応じてワークWに設定された各計測点Wpについての法線Vが決まる。 In this way, the CPU 130 executes the inspection route generation process, and the three-dimensional image processing device 400 specifies the arrangement status of the work W based on the three-dimensional image. Further, when the CPU 130 executes the inspection route generation process, the position and normal vector of each measurement point Wp in the world coordinate system are calculated for each measurement point Wp set in the work W. That is, when the CPU 130 executes the inspection route generation process, the normal V for each measurement point Wp set in the work W is determined according to the arrangement status of the specified work W.

[G.法線補正処理]
図8および図9を参照して、管理装置100のCPU130が実行する法線補正処理(ステップS400、図4参照)について詳細に説明する。図8は、法線補正処理のフローチャートである。図9は、法線補正処理の実行において機能する画像処理装置2の機能構成の一例を示す図である。なお、図9においては、ワークWの形状を図1および図3に比べて簡略化して記載している。
[G. Normal correction processing]
The normal correction process (step S400, see FIG. 4) executed by the CPU 130 of the management device 100 will be described in detail with reference to FIGS. 8 and 9. FIG. 8 is a flowchart of the normal correction process. FIG. 9 is a diagram showing an example of the functional configuration of the image processing apparatus 2 that functions in the execution of the normal correction process. In FIG. 9, the shape of the work W is shown in a simplified manner as compared with FIGS. 1 and 3.

ステップS401において、CPU130は、2次元画像処理装置300にレファレンスモデル画像を送る。具体的には、経路生成部132がステップS310において決めた計測点Wpについてのレファレンスモデル画像を第1記憶部142から特定し、2次元カメラI/F183を介して2次元画像処理装置300に送信する。2次元画像処理装置300は、画像処理エンジン330の記憶部334にレファレンスモデル画像を一時的に記憶する。なお、2次元画像処理装置300は、計測点ごとにレファレンスモデル画像を予め記憶していてもよい。この場合、ステップS401において、CPU130は、計測点ナンバーだけを2次元画像処理装置300に送信する。 In step S401, the CPU 130 sends a reference model image to the two-dimensional image processing device 300. Specifically, the route generation unit 132 identifies the reference model image for the measurement point Wp determined in step S310 from the first storage unit 142 and transmits it to the two-dimensional image processing device 300 via the two-dimensional camera I / F183. do. The two-dimensional image processing device 300 temporarily stores the reference model image in the storage unit 334 of the image processing engine 330. The two-dimensional image processing device 300 may store the reference model image for each measurement point in advance. In this case, in step S401, the CPU 130 transmits only the measurement point number to the two-dimensional image processing device 300.

ステップS402において、CPU130は、第1記憶部142に記憶された計測点Wpの位置および法線ベクトルから2次元カメラ310の位置および向きを決定する。具体的には、経路生成部132は、ステップS310において決めた計測点Wpについてのワールド座標系の座標位置および法線ベクトルを第1記憶部142から特定する。経路生成部132は、特定した法線ベクトルと2次元カメラ310の光軸Oとが一致するように2次元カメラ310の向きを決定する。また、経路生成部132は、計測点Wpについての法線V上に2次元カメラ310が位置し、かつ、2次元カメラ310と計測点Wpとの距離が予め定められた距離となるように2次元カメラ310の位置を決定する。ここで、予め定められた距離とは、2次元カメラ310の焦点距離から算出される距離であって、理論上、計測点に2次元カメラ310のピントが合う距離である。 In step S402, the CPU 130 determines the position and orientation of the two-dimensional camera 310 from the position and normal vector of the measurement point Wp stored in the first storage unit 142. Specifically, the route generation unit 132 specifies the coordinate position and the normal vector of the world coordinate system for the measurement point Wp determined in step S310 from the first storage unit 142. The path generation unit 132 determines the orientation of the two-dimensional camera 310 so that the specified normal vector and the optical axis O of the two-dimensional camera 310 coincide with each other. Further, in the path generation unit 132, the two-dimensional camera 310 is located on the normal V with respect to the measurement point Wp, and the distance between the two-dimensional camera 310 and the measurement point Wp is a predetermined distance. The position of the dimensional camera 310 is determined. Here, the predetermined distance is a distance calculated from the focal length of the two-dimensional camera 310, and is theoretically a distance at which the measurement point is in focus of the two-dimensional camera 310.

ステップS403において、CPU130は、ロボット制御部200に動作を指示する。具体的には、経路生成部132は、決定した2次元カメラ310の位置(Xw,Yw,Zw)および向き(Nw)を位置決定部131に送信する。位置決定部131は、ロボットI/F182を介してロボット制御部200に2次元カメラ310の位置および向きを送信する(図9参照)。 In step S403, the CPU 130 instructs the robot control unit 200 to operate. Specifically, the route generation unit 132 transmits the determined position (Xw, Yw, Zw) and orientation (Nw) of the two-dimensional camera 310 to the position determination unit 131. The position determination unit 131 transmits the position and orientation of the two-dimensional camera 310 to the robot control unit 200 via the robot I / F 182 (see FIG. 9).

ステップS404において、CPU130は、2次元画像処理装置300に、計測点Wpの法線を特定することを指示する。 In step S404, the CPU 130 instructs the two-dimensional image processing device 300 to specify the normal of the measurement point Wp.

図9を参照して、2次元画像処理装置300が実行する計測点Wpの法線の特定方法を説明する。2次元画像処理装置300の特定部331は、計測点Wpの法線を特定することの指示を受け、撮像制御部320に2次元画像を取得することを指示する。撮像制御部320は、取得した2次元画像を画像処理エンジン330の格納部335に格納する。 A method of specifying the normal of the measurement point Wp executed by the two-dimensional image processing apparatus 300 will be described with reference to FIG. 9. The specifying unit 331 of the two-dimensional image processing device 300 receives an instruction to specify the normal of the measurement point Wp, and instructs the imaging control unit 320 to acquire a two-dimensional image. The image pickup control unit 320 stores the acquired two-dimensional image in the storage unit 335 of the image processing engine 330.

特定部331は、格納部335に記憶された2次元画像内において、記憶部334に記憶されたレファレンスモデル画像と類似する画像領域を探索する。特定部331は、探索した画像領域から、2次元画像内における計測点Wpの位置(Xc2,Yc2)と2次元画像内における計測点Wpの向き(θc2)とを算出する。特定部331は、算出した2次元画像内における計測点Wpの位置および向きを管理装置100に送信する。 The specific unit 331 searches for an image area similar to the reference model image stored in the storage unit 334 in the two-dimensional image stored in the storage unit 335. The specific unit 331 calculates the position of the measurement point Wp (Xc2, Yc2) in the two-dimensional image and the direction (θc2) of the measurement point Wp in the two-dimensional image from the searched image area. The identification unit 331 transmits the position and orientation of the measurement point Wp in the calculated two-dimensional image to the management device 100.

図8に戻って法線補正処理について説明する。2次元画像処理装置300から計測点Wpの位置および計測点Wpの向きに関する情報を受け、ステップS405において、CPU130は、グローバル座標系における計測点Wpの位置および計測点Wpの法線ベクトルを特定する。具体的には、CPU130の機能構成に含まれる変換部139(図9参照)が、カメラ座標系の値(Xc2,Yc2,θc2)を位置決定部131がロボット制御部200に送った2次元カメラ310の位置(Xw,Yw,Zw)および向き(Nw)、並びに、予め定められた座標変換式に基づいてグローバル座標系の値(Xw,Yw,Zw,Nw)に変換する。これにより、計測された計測点Wpの法線V(実測値)が特定される。 Returning to FIG. 8, the normal correction process will be described. Upon receiving information regarding the position of the measurement point Wp and the orientation of the measurement point Wp from the two-dimensional image processing apparatus 300, in step S405, the CPU 130 specifies the position of the measurement point Wp and the normal vector of the measurement point Wp in the global coordinate system. .. Specifically, the conversion unit 139 (see FIG. 9) included in the functional configuration of the CPU 130 is a two-dimensional camera in which the position determination unit 131 sends the values (Xc2, Yc2, θc2) of the camera coordinate system to the robot control unit 200. The position (Xw, Yw, Zw) and orientation (Nw) of 310, and the value of the global coordinate system (Xw, Yw, Zw, Nw) are converted based on a predetermined coordinate conversion formula. As a result, the normal V (measured value) of the measured measurement point Wp is specified.

ステップS406において、CPU130は乖離値を決定する。乖離値とは、計測された計測点Wpの法線V(実測値)と決定された計測点の法線(指定値)とのズレを示す値である。ここで、2次元カメラ310の位置および向きは、決定された計測点Wpの法線V(指定値)と2次元カメラ310の光軸Oとが一致するように決定される。よって、乖離値とは、計測された計測点Wpの法線Vと2次元カメラ310の光軸Oとのズレを示す値でもある。乖離値は、たとえば、ベクトル(ΔN)などで示される。具体的には、法線補正部133の機能構成に含まれる乖離値算出部1330(図9参照)が、2次元カメラ310の位置および向きと、計測された計測点Wpの法線Wpの法線V(実測値)とから、乖離値(ΔN)を算出する。ここで、第1の実施の形態においては、2次元画像内における計測点Wpの向き(θc2)とは、法線を軸とした軸周りの回転角である。そのため、変換部139によって変換されたグローバル座標系における計測点Wpの法線ベクトルと、決定された計測点の法線ベクトルとは一致する。つまり、計測点Wpの法線V(実測値)と決定された計測点の法線(指定値)とのズレとは、法線ベクトルが一致しないことに起因するズレではなく、計測点Wpの位置座標が一致しないことに起因するズレである。 In step S406, the CPU 130 determines the deviation value. The deviation value is a value indicating a deviation between the normal V (measured value) of the measured measurement point Wp and the normal line (designated value) of the determined measurement point. Here, the position and orientation of the two-dimensional camera 310 are determined so that the normal V (designated value) of the determined measurement point Wp and the optical axis O of the two-dimensional camera 310 coincide with each other. Therefore, the deviation value is also a value indicating the deviation between the normal V of the measured measurement point Wp and the optical axis O of the two-dimensional camera 310. The deviation value is represented by, for example, a vector (ΔN). Specifically, the deviation value calculation unit 1330 (see FIG. 9) included in the functional configuration of the normal correction unit 133 controls the position and orientation of the two-dimensional camera 310 and the normal Wp of the measured measurement point Wp. The deviation value (ΔN) is calculated from the line V (actual measurement value). Here, in the first embodiment, the direction (θc2) of the measurement point Wp in the two-dimensional image is the rotation angle around the axis about the normal line. Therefore, the normal vector of the measurement point Wp in the global coordinate system converted by the conversion unit 139 and the normal vector of the determined measurement point match. That is, the deviation between the normal V (measured value) of the measurement point Wp and the normal (specified value) of the determined measurement point is not the deviation caused by the non-matching of the normal vectors, but the deviation of the measurement point Wp. This is a deviation caused by the position coordinates not matching.

ステップS407において、CPU130は、乖離値が予め定められた第1閾値以下であるかを判断する。乖離値が第1閾値以下ではない場合には(ステップS407においてNO)、CPU130は、制御をステップS408に切り替える。 In step S407, the CPU 130 determines whether the deviation value is equal to or less than a predetermined first threshold value. When the deviation value is not equal to or less than the first threshold value (NO in step S407), the CPU 130 switches the control to step S408.

ステップS408において、CPU130は、乖離値から補正量を算出する。具体的には、法線補正部133の機能構成に含まれる補正量算出部1332(図9参照)が、乖離値(ΔN)に基づいて2次元カメラ310を移動させる補正量(ΔX,ΔY,ΔZ,Δθx,Δθy,Δθz)を決定する。これにより、2次元カメラ310の光軸Oと、計測された計測点Wpの法線V(実測値)とを一致させるために必要な補正量が算出されることになる。 In step S408, the CPU 130 calculates the correction amount from the deviation value. Specifically, the correction amount calculation unit 1332 (see FIG. 9) included in the functional configuration of the normal correction unit 133 moves the two-dimensional camera 310 based on the deviation value (ΔN) (ΔX, ΔY, ΔZ, Δθx, Δθy, Δθz) is determined. As a result, the correction amount required to match the optical axis O of the two-dimensional camera 310 with the normal V (measured value) of the measured measurement point Wp is calculated.

ステップS409において、CPU130は、補正量から2次元カメラ310の位置および向きを決定する。具体的には、補正量算出部1332は、算出した補正量と、ステップS403において位置決定部131が指示した2次元カメラ310の位置および向きとから、2次元カメラ310の位置および向き(Xw,Yw,Zw,Nw)を決定する。このとき、法線補正部133の機能構成に含まれる更新部1331は、補正量に基づいて第1記憶部142に記憶された計測点Wpの位置を補正し、補正した計測点Wpの位置に第1記憶部142の情報を更新する。これにより、計測された計測点Wpの法線V(実測値)が決定された計測点Wpの法線V(指示値)として、第1記憶部142に記憶される。 In step S409, the CPU 130 determines the position and orientation of the two-dimensional camera 310 from the correction amount. Specifically, the correction amount calculation unit 1332 determines the position and orientation (Xw,) of the two-dimensional camera 310 from the calculated correction amount and the position and orientation of the two-dimensional camera 310 instructed by the position determination unit 131 in step S403. Yw, Zw, Nw) is determined. At this time, the update unit 1331 included in the functional configuration of the normal correction unit 133 corrects the position of the measurement point Wp stored in the first storage unit 142 based on the correction amount, and sets the corrected measurement point Wp to the corrected position. The information in the first storage unit 142 is updated. As a result, the measured normal line V (measured value) of the measured measurement point Wp is stored in the first storage unit 142 as the determined normal line V (indicated value) of the measured point Wp.

CPU130は、乖離値が第1閾値以下になるまで(ステップS407においてYES)、ステップS403からステップS409を繰り返す。乖離値が第1閾値以下である場合には(ステップS407においてYES)、CPU130は、制御をステップS410に切り替える。 The CPU 130 repeats steps S403 to S409 until the deviation value becomes equal to or less than the first threshold value (YES in step S407). When the deviation value is equal to or less than the first threshold value (YES in step S407), the CPU 130 switches the control to step S410.

CPU130は、ステップS410において、補正後の計測点Wpの法線Vを決定する。具体的には、ステップS409において更新部1331が更新した第1記憶部142の情報を補正後の計測点Wpの位置および法線ベクトルとして決定する。 In step S410, the CPU 130 determines the normal V of the corrected measurement point Wp. Specifically, the information of the first storage unit 142 updated by the update unit 1331 in step S409 is determined as the position and normal vector of the corrected measurement point Wp.

このように、画像処理システムSYSの画像処理装置2に含まれる特定部431は、3次元カメラ410によって撮像された3次元画像内において、記憶部432に記憶された認識用CADモデルと類似する画像領域を探索する。画像処理システムSYSの画像処理装置2に含まれる経路生成部132は、特定部431によって探索された画像領域から得られる情報と、格納部141に格納された3DCAD上での計測点Wpごとの座標(Xmi,Ymi,Zmi)および法線ベクトル(Nmi)をグローバルワーク座標系の座標値(Xwi,Ywi,Zwi)および法線ベクトル(Nwi)に変換する。これにより、特定部431はワークWに設定された各計測点Wpについての法線Vを決定する。 As described above, the specific unit 431 included in the image processing device 2 of the image processing system SYS is an image similar to the recognition CAD model stored in the storage unit 432 in the three-dimensional image captured by the three-dimensional camera 410. Explore the area. The route generation unit 132 included in the image processing device 2 of the image processing system SYS has the information obtained from the image area searched by the specific unit 431 and the coordinates for each measurement point Wp on the 3D CAD stored in the storage unit 141. (Xmi, Ymi, Zmi) and the normal vector (Nmi) are converted into the coordinate values (Xwi, Ywi, Zwi) and the normal vector (Nwi) of the global work coordinate system. As a result, the specific unit 431 determines the normal V for each measurement point Wp set in the work W.

さらに、画像処理システムSYSにおいては、特定部431が決定した法線V上に2次元カメラ310を位置決めした状態で2次元カメラ310によって撮像された2次元画像内において、特定部331は、記憶部334に記憶されたレファレンスモデル画像と類似する画像領域を探索する。画像処理システムSYSの画像処理装置2に含まれる法線補正部133は、特定部331によって探索された画像領域から得られる情報に基づいて、特定部431が決定した法線Vを補正して法線Vを決定する。 Further, in the image processing system SYS, in the two-dimensional image captured by the two-dimensional camera 310 in a state where the two-dimensional camera 310 is positioned on the normal line V determined by the specific unit 431, the specific unit 331 is a storage unit. An image area similar to the reference model image stored in 334 is searched. The normal correction unit 133 included in the image processing device 2 of the image processing system SYS corrects the normal V determined by the specific unit 431 based on the information obtained from the image area searched by the specific unit 331. Determine the line V.

つまり、第1の実施の形態に係る画像処理システムSYSにおいては、ワークWに設定された各計測点Wpについての法線Vを3次元画像から得られる情報に基づいて決定した上で、さらに、2次元画像から得られる情報に基づいて補正する。つまり、ロボット210の制御誤差によって生じる、2次元カメラ310の光軸Oと、計測点Wpについての法線Vとのズレを2次元画像から得られる情報に基づいて補正することができる。また、ワークWのCADモデルとラインLによって提供されたワークWとの誤差によって生じる、2次元カメラ310の光軸Oと計測点Wpについての法線Vとのズレを、2次元画像から得られる情報に基づいて補正することができる。そのため、第1の実施の形態に係る画像処理システムSYSを用いることで、より正確に2次元カメラ310とワークWとの位置関係を調整することができる。 That is, in the image processing system SYS according to the first embodiment, the normal V for each measurement point Wp set in the work W is determined based on the information obtained from the three-dimensional image, and then further. Correction is made based on the information obtained from the two-dimensional image. That is, the deviation between the optical axis O of the two-dimensional camera 310 and the normal V about the measurement point Wp caused by the control error of the robot 210 can be corrected based on the information obtained from the two-dimensional image. Further, the deviation between the optical axis O of the two-dimensional camera 310 and the normal V about the measurement point Wp caused by the error between the CAD model of the work W and the work W provided by the line L can be obtained from the two-dimensional image. It can be corrected based on the information. Therefore, by using the image processing system SYS according to the first embodiment, the positional relationship between the two-dimensional camera 310 and the work W can be adjusted more accurately.

なお、第1の実施の形態においては、2次元画像内における計測点Wpの向き(θc2)とは、法線を軸とした軸周りの回転角であるとした。しかし、2次元画像処理装置300は、レファレンスモデル画像と類似する画像領域を探索し、探索した結果得られた画像領域内の画像の歪みから、計測点Wpが位置する平面とワークWが設置された面との角度を求めてもよい。このような場合にあっては、CPU130は、法線ベクトルのズレも検出することができる。 In the first embodiment, the direction (θc2) of the measurement point Wp in the two-dimensional image is the rotation angle around the axis with the normal as the axis. However, the two-dimensional image processing device 300 searches for an image area similar to the reference model image, and from the distortion of the image in the image area obtained as a result of the search, the plane on which the measurement point Wp is located and the work W are installed. You may find the angle with the surface. In such a case, the CPU 130 can also detect the deviation of the normal vector.

[H.ピント調整処理]
図10および図11を参照して、管理装置100のCPU130が実行するピント位置調整処理(ステップS500、図4参照)について詳細に説明する。図10は、ピント位置調整処理のフローチャートである。図11は、ピント位置調整処理の実行において機能する画像処理装置2の機能構成の一例を示す図である。なお、図11においては、ワークWの形状を図1および図3に比べて簡略化して記載している。
[H. Focus adjustment process]
The focus position adjustment process (step S500, see FIG. 4) executed by the CPU 130 of the management device 100 will be described in detail with reference to FIGS. 10 and 11. FIG. 10 is a flowchart of the focus position adjustment process. FIG. 11 is a diagram showing an example of the functional configuration of the image processing apparatus 2 that functions in the execution of the focus position adjustment process. In FIG. 11, the shape of the work W is shown in a simplified manner as compared with FIGS. 1 and 3.

ステップS501において、CPU130は、2次元カメラ310を移動させる軌道を生成する。具体的には、法線軌道生成部134は、法線補正処理(ステップS400)において決定された補正後の法線Vと2次元カメラ310の光軸Oとを一致させた状態で、2次元カメラ310と計測点Wpとの距離を変化させる2次元カメラ310の法線軌道(Xw(t),Yw(t),Zw(t),Nw)を生成する。 In step S501, the CPU 130 generates a trajectory for moving the two-dimensional camera 310. Specifically, the normal orbit generation unit 134 is two-dimensional in a state where the corrected normal V determined in the normal correction process (step S400) and the optical axis O of the two-dimensional camera 310 are matched with each other. A normal trajectory (Xw (t), Yw (t), Zw (t), Nw) of the two-dimensional camera 310 that changes the distance between the camera 310 and the measurement point Wp is generated.

ステップS502において、CPU130は、2次元カメラ310の移動範囲を決定する。移動範囲は、初期値が決定されており、ステップS502〜ステップS506を繰り返すことで徐々に変化する。具体的には、ステップS505において得られた合焦度aと2次元カメラ310の位置との関係から、合焦度aが増加する方向に2次元カメラ310が動くように移動範囲を決定する。 In step S502, the CPU 130 determines the moving range of the two-dimensional camera 310. The initial value of the movement range is determined, and the movement range gradually changes by repeating steps S502 to S506. Specifically, from the relationship between the in-focus degree a obtained in step S505 and the position of the two-dimensional camera 310, the moving range is determined so that the two-dimensional camera 310 moves in the direction in which the in-focus degree a increases.

ステップS503において、CPU130は、ロボット制御部200に2次元カメラ310を動かすことを指示する。具体的には、CPU130は、ステップS502で決定した移動範囲内であって、ステップS501の軌道上を2次元カメラ310が一定の速度で動くようにロボット制御部200に指示する。ここで2次元カメラ310を動かす速度は、1回撮像するために要する時間で動く距離が2次元カメラ310の焦点深度以下となる速度である。 In step S503, the CPU 130 instructs the robot control unit 200 to move the two-dimensional camera 310. Specifically, the CPU 130 instructs the robot control unit 200 to move the two-dimensional camera 310 at a constant speed within the movement range determined in step S502 and on the orbit of step S501. Here, the speed at which the two-dimensional camera 310 is moved is such that the moving distance in the time required for one image capture is equal to or less than the depth of focus of the two-dimensional camera 310.

ステップS504において、CPU130は、2次元画像処理装置300に合焦度aを算出することを指示する。具体的には、CPU130は、ステップS503においてCPU130がロボット制御部200に指示した移動範囲内を2次元カメラ310が動いている第1期間中に2次元カメラ310が撮像した2次元画像から2次元カメラ310の合焦度aを算出することを2次元画像処理装置300に指示する。 In step S504, the CPU 130 instructs the two-dimensional image processing device 300 to calculate the focus degree a. Specifically, the CPU 130 is two-dimensional from the two-dimensional image captured by the two-dimensional camera 310 during the first period in which the two-dimensional camera 310 is moving within the movement range instructed by the CPU 130 to the robot control unit 200 in step S503. The two-dimensional image processing apparatus 300 is instructed to calculate the in-focus degree a of the camera 310.

図11を参照して、2次元画像処理装置300が実行する合焦度aの算出方法を説明する。2次元画像処理装置300の合焦度算出部332は、合焦度aを算出することの指示を受け、撮像制御部320に第1期間中に撮像された2次元画像を取得することを指示する。撮像制御部320は、取得した2次元画像を画像処理エンジン330の格納部335に格納する。合焦度算出部332は、格納部335に記憶された2次元画像の合焦度aを算出するための所定の画像処理を2次元画像に対して実行する。たとえば、2次元画像の濃度偏差を合焦度aに関する特徴量とし、算出した濃度偏差を合焦度aとしてもよい。合焦度算出部332は、算出した合焦度aと当該2次元画像を2次元カメラ310が撮像した時間tとの関係a(t)をピント位置決定部135に送信する。 A method of calculating the degree of focus a executed by the two-dimensional image processing apparatus 300 will be described with reference to FIG. The in-focus degree calculation unit 332 of the two-dimensional image processing device 300 receives an instruction to calculate the in-focus degree a, and instructs the image pickup control unit 320 to acquire the two-dimensional image captured during the first period. do. The image pickup control unit 320 stores the acquired two-dimensional image in the storage unit 335 of the image processing engine 330. The in-focus degree calculation unit 332 executes predetermined image processing for calculating the in-focus degree a of the two-dimensional image stored in the storage unit 335 on the two-dimensional image. For example, the density deviation of the two-dimensional image may be used as the feature amount related to the focusing degree a, and the calculated density deviation may be used as the focusing degree a. The in-focus degree calculation unit 332 transmits to the focus position determination unit 135 the relationship a (t) between the calculated in-focus degree a and the time t in which the two-dimensional image is captured by the two-dimensional camera 310.

図10に戻ってピント調整処理について説明する。2次元画像処理装置300から合焦度aと当該2次元画像を2次元カメラ310が撮像した時間tとの関係a(t)を受け、ステップS505において、CPU130は、合焦度aと2次元カメラ310の位置との関係を記憶する。具体的には、CPU130は、ステップS503において指示した2次元カメラ310の移動範囲などから、撮像した時間tにおける2次元カメラ310の位置を特定する。特定した2次元カメラ310の位置(Xw(t)、Yw(t),Zw(t))と合焦度a(t)との関係を第2記憶部143に記憶する。 Returning to FIG. 10, the focus adjustment process will be described. Upon receiving the relationship a (t) between the in-focus degree a and the time t in which the two-dimensional image is captured by the two-dimensional camera 310 from the two-dimensional image processing apparatus 300, in step S505, the CPU 130 has the in-focus degree a and two-dimensional. The relationship with the position of the camera 310 is stored. Specifically, the CPU 130 specifies the position of the two-dimensional camera 310 at the time t of imaging from the movement range of the two-dimensional camera 310 instructed in step S503. The relationship between the position (Xw (t), Yw (t), Zw (t)) of the specified two-dimensional camera 310 and the in-focus degree a (t) is stored in the second storage unit 143.

ステップS506において、CPU130は、合焦度aが移動範囲内で極値をとるか否かを判断する。合焦度aが移動範囲内で極値を取らない場合には(ステップS506においてNO)、CPU130は、合焦度aが移動範囲内で極値をとるまでステップS502〜ステップS506を繰り返す。ここで、CPU130は、ステップS502において移動範囲を決定する際に、2次元カメラ310の始点位置をワークWから離れた位置にする、あるいは、近くにすることで、合焦度aが極値を取る位置を探す。なお、2次元カメラ310の始点位置をワークWに近い位置に設定する場合には、ワークWと2次元カメラ310およびロボット210とが接触しないような位置に設定する。 In step S506, the CPU 130 determines whether or not the in-focus degree a takes an extreme value within the movement range. If the in-focus degree a does not take an extreme value within the moving range (NO in step S506), the CPU 130 repeats steps S502 to S506 until the in-focus degree a takes an extreme value within the moving range. Here, the CPU 130 sets the start point position of the two-dimensional camera 310 to a position away from or near the work W when determining the movement range in step S502, so that the in-focus degree a becomes an extreme value. Find a position to take. When the starting point position of the two-dimensional camera 310 is set to a position close to the work W, the position is set so that the work W does not come into contact with the two-dimensional camera 310 and the robot 210.

合焦度aが移動範囲内で極値をとる場合には(ステップS506においてYES)、CPU130は、ステップS507に制御を切り換える。 When the degree of focus a takes an extreme value within the movement range (YES in step S506), the CPU 130 switches the control to step S507.

ステップS507において、合焦度aが極値をとる位置をピント位置に決定し、検査処理に戻る。具体的には、ピント位置決定部135は、記憶部に記憶された合焦度aのうちの最も高い合焦度amaxとなる2次元画像を撮像したときの2次元カメラ310の位置をピント位置(Xw,Yw,Zw)に決定する(図11参照)。 In step S507, the position where the in-focus degree a takes an extreme value is determined as the focus position, and the process returns to the inspection process. Specifically, the focus position determining unit 135 focuses on the position of the two-dimensional camera 310 when an image having the highest focusing degree amax among the focusing degrees a stored in the storage unit is captured. (Xw, Yw, Zw) is determined (see FIG. 11).

このように、CPU130がピント調整処理を実行することで、決定した法線V上で2次元カメラ310のピントを計測点Wpに合わせる処理が行われることとなる。 In this way, when the CPU 130 executes the focus adjustment process, the process of adjusting the focus of the two-dimensional camera 310 to the measurement point Wp on the determined normal V is performed.

[I.検査実行処理]
図12〜図14を参照して、管理装置100のCPU130が実行する検査実行処理(ステップS600、図4参照)について詳細に説明する。図12は、検査実行処理のフローチャートである。図13は、検査実行処理の実行において機能する画像処理装置2の機能構成の一例を示す図である。図14は、2次元カメラ310の円弧軌道の一例を示す図である。なお、図13においては、ワークWの形状を図1および図3に比べて簡略化して記載している。
[I. Inspection execution process]
The inspection execution process (step S600, see FIG. 4) executed by the CPU 130 of the management device 100 will be described in detail with reference to FIGS. 12 to 14. FIG. 12 is a flowchart of the inspection execution process. FIG. 13 is a diagram showing an example of the functional configuration of the image processing apparatus 2 that functions in the execution of the inspection execution process. FIG. 14 is a diagram showing an example of an arc trajectory of the two-dimensional camera 310. In FIG. 13, the shape of the work W is shown in a simplified manner as compared with FIGS. 1 and 3.

ステップS601において、CPU130は、計測点の検査項目を特定する。具体的には、第1記憶部142に記憶されている計測点Wpと検査項目との対応関係に基づいて、検査項目を特定する。 In step S601, the CPU 130 specifies the inspection item of the measurement point. Specifically, the inspection item is specified based on the correspondence between the measurement point Wp stored in the first storage unit 142 and the inspection item.

ステップS602において、CPU130は、検査項目が検査Aであるか否かを判断する。ここで、検査Aとは、ワークWの表面に正確に印字がされているかなどの2次元カメラ310が撮像した方向によって検査結果が変わるおそれのある検査をいう。検査Aである場合(ステップS602においてYES)、CPU130は、ステップS615に制御を切り換える。 In step S602, the CPU 130 determines whether or not the inspection item is inspection A. Here, the inspection A refers to an inspection in which the inspection result may change depending on the direction in which the two-dimensional camera 310 takes an image, such as whether or not the surface of the work W is accurately printed. In the case of inspection A (YES in step S602), the CPU 130 switches control to step S615.

ステップS615において、CPU130は、ピント位置で検査を実行する。具体的には、検査結果判定部137は、ピント位置調整処理(ステップS500)において決定したピント位置で検査Aを実行する。 In step S615, the CPU 130 executes the inspection at the focus position. Specifically, the inspection result determination unit 137 executes the inspection A at the focus position determined in the focus position adjustment process (step S500).

検査Aではない場合(ステップS602においてNO)、CPU130は、ステップS603において、ピント位置を中心とする円弧軌道を生成する。具体的には、円弧軌道生成部136が、ピント位置決定部135が決定した2次元カメラ310の位置と計測点Wpとの距離を保った状態で計測点Wpについての法線Vと2次元カメラ310の光軸Oとのなす角度が0から予め定められた値まで変化するように円弧軌道(Xw(t),Yw(t),Zw(t),Nw(t))を生成する。ここで、円弧軌道について、図14を用いて説明する。円弧軌道生成部136は、図14(a)に示すように、ピント位置決定部135において決定した2次元カメラ310の位置Cと計測点Wpとの距離を半径rとした球の表面上を2次元カメラ310が位置するように円弧軌道を生成する。円弧軌道は図14(b)に示すように、2次元カメラ310の光軸Oと法線Vとの角度を一定にして計測点Wpの周りを一周させた後に、角度を変えて再度一周させることを繰り返す軌道であってもよい。また、図14(c)に示すように、2次元カメラ310の光軸Oと法線Vとの角度を徐々に変えながら計測点Wpの周囲をらせん状に移動する軌道であってもよい。 If it is not the inspection A (NO in step S602), the CPU 130 generates an arc trajectory centered on the focus position in step S603. Specifically, the arc orbit generation unit 136 maintains the distance between the position of the two-dimensional camera 310 determined by the focus position determination unit 135 and the measurement point Wp, and the normal V and the two-dimensional camera for the measurement point Wp. An arc orbit (Xw (t), Yw (t), Zw (t), Nw (t)) is generated so that the angle formed by the optical axis O of 310 changes from 0 to a predetermined value. Here, the arc orbit will be described with reference to FIG. As shown in FIG. 14A, the arc orbit generation unit 136 is located on the surface of a sphere having a radius r of the distance between the position C of the two-dimensional camera 310 determined by the focus position determination unit 135 and the measurement point Wp. Generate an arc trajectory so that the dimensional camera 310 is located. As shown in FIG. 14 (b), the arc orbit is made to go around the measurement point Wp with the angle between the optical axis O and the normal V of the two-dimensional camera 310 constant, and then to go around again by changing the angle. It may be an orbit that repeats the above. Further, as shown in FIG. 14 (c), the trajectory may be a spiral moving around the measurement point Wp while gradually changing the angle between the optical axis O and the normal line V of the two-dimensional camera 310.

図12に戻って検査実行処理について説明する。ステップS604において、CPU130は、2次元カメラ310の移動範囲を決定する。移動範囲は、たとえば、計測点Wpの周囲を少なくとも一周する範囲である。 Returning to FIG. 12, the inspection execution process will be described. In step S604, the CPU 130 determines the moving range of the two-dimensional camera 310. The movement range is, for example, a range that goes around at least around the measurement point Wp.

ステップS605において、CPU130は、ロボット制御部200に2次元カメラ310を動かすことを指示する。具体的には、CPU130は、ステップS604で決定した移動範囲内であって、ステップS601の軌道上を2次元カメラ310が一定の速度で動くようにロボット制御部200に指示する。 In step S605, the CPU 130 instructs the robot control unit 200 to move the two-dimensional camera 310. Specifically, the CPU 130 instructs the robot control unit 200 to move the two-dimensional camera 310 at a constant speed within the movement range determined in step S604 and on the orbit of step S601.

ステップS606において、CPU130は、2次元画像処理装置300に検査内容に対応する特徴量bを算出することを指示する。具体的には、CPU130は、ステップS605においてCPU130がロボット制御部200に指示した移動範囲内を2次元カメラ310が動いている第2期間中に2次元カメラ310が撮像した2次元画像から検査内容ごとに予め定められている特徴量bを算出することを2次元画像処理装置300に指示する。 In step S606, the CPU 130 instructs the two-dimensional image processing apparatus 300 to calculate the feature amount b corresponding to the inspection content. Specifically, the CPU 130 inspects the inspection contents from the two-dimensional image captured by the two-dimensional camera 310 during the second period in which the two-dimensional camera 310 is moving within the movement range instructed by the CPU 130 to the robot control unit 200 in step S605. The two-dimensional image processing apparatus 300 is instructed to calculate a predetermined feature amount b for each.

図13を参照して、2次元画像処理装置300が実行する特徴量bの算出方法を説明する。2次元画像処理装置300の特徴量算出部333は、特徴量bを算出することの指示を受け、撮像制御部320に第2期間中に撮像された2次元画像を取得することを指示する。撮像制御部320は、取得した2次元画像を画像処理エンジン330の格納部335に格納する。特徴量算出部333は、格納部335に記憶された2次元画像の特徴量bを算出するための所定の画像処理を2次元画像に対して実行する。特徴量算出部333は、算出した特徴量bと当該2次元画像を2次元カメラ310が撮像した時間tとの関係b(t)を検査結果判定部137に送信する。 A method of calculating the feature amount b executed by the two-dimensional image processing apparatus 300 will be described with reference to FIG. The feature amount calculation unit 333 of the two-dimensional image processing device 300 receives an instruction to calculate the feature amount b, and instructs the image pickup control unit 320 to acquire the two-dimensional image captured during the second period. The image pickup control unit 320 stores the acquired two-dimensional image in the storage unit 335 of the image processing engine 330. The feature amount calculation unit 333 executes predetermined image processing for calculating the feature amount b of the two-dimensional image stored in the storage unit 335 on the two-dimensional image. The feature amount calculation unit 333 transmits the relationship b (t) between the calculated feature amount b and the time t when the two-dimensional image is captured by the two-dimensional camera 310 to the inspection result determination unit 137.

特徴量bは、外観検査において外観に異常があるか否かを判断する指標となる量である。たとえば、外観に縞模様などの特定パターンが施されているワークWに対してキズ検査を実行するような場合、特徴量算出部333は、2次元画像に対して特定パターンを除去するための処理を実行した後、欠陥を示す領域を特定するためのラベリング処理を実行する。これにより、特徴量算出部333は、欠陥面積または欠陥長さを特徴量bとして算出する。なお、他の方法で特徴量bを算出してもよい。 The feature amount b is an amount that serves as an index for determining whether or not there is an abnormality in the appearance in the appearance inspection. For example, when a scratch inspection is performed on a work W having a specific pattern such as a striped pattern on the appearance, the feature amount calculation unit 333 is a process for removing the specific pattern on a two-dimensional image. After executing, the labeling process for identifying the area showing the defect is executed. As a result, the feature amount calculation unit 333 calculates the defect area or the defect length as the feature amount b. The feature amount b may be calculated by another method.

たとえば、特徴量算出部333は、2次元画像を複数領域に分割し、隣接した領域間の色差から欠陥度を算出し、ラベリング処理を実行することで欠陥度が規定値以上となる領域を特定し、当該領域から欠陥面積または欠陥長さを特徴量bとして算出してもよい。この方法は、典型的には、細かなキズを検出することを目的とした場合に用いられる方法である。 For example, the feature amount calculation unit 333 divides the two-dimensional image into a plurality of areas, calculates the degree of defect from the color difference between adjacent areas, and executes the labeling process to specify the area where the degree of defect is equal to or higher than the specified value. Then, the defect area or the defect length may be calculated from the region as the feature amount b. This method is typically used for the purpose of detecting fine scratches.

なお、特徴量算出部333は次の方法を用いて特徴量bを算出してもよい。特徴量算出部333は、2次元画像に対して公知のエッジ抽出処理を行った後、公知の膨張処理を行う。特徴量算出部333は、膨張処理後に欠陥を示す領域を特定するためのラベリング処理を実行することで、欠陥面積または欠陥長さを特徴量bとして算出する。この方法は、典型的には、打痕、凹みなどを検出することを目的とした場合に用いられる方法である。 The feature amount calculation unit 333 may calculate the feature amount b by using the following method. The feature amount calculation unit 333 performs a known edge extraction process on the two-dimensional image, and then performs a known expansion process. The feature amount calculation unit 333 calculates the defect area or the defect length as the feature amount b by executing the labeling process for specifying the region showing the defect after the expansion process. This method is typically used for the purpose of detecting dents, dents, and the like.

なお、特徴量bを算出する方法は、外観検査において外観に異常があるか否かを判断する指標となる量を抽出するための方法であればよく、開示した方法に限られるものではない。 The method for calculating the feature amount b may be any method as long as it is a method for extracting an amount that is an index for determining whether or not there is an abnormality in the appearance in the appearance inspection, and is not limited to the disclosed method.

図12に戻って検査実行処理について説明する。2次元画像処理装置300から特徴量bと当該2次元画像を2次元カメラ310が撮像した時間tとの関係b(t)を受け、ステップS607において、CPU130は、特徴量bと2次元カメラ310の位置との関係を記憶する。具体的には、CPU130は、ステップS505において指示した2次元カメラ310の移動範囲などから、撮像した時間tにおける2次元カメラ310の位置および向きを特定する。特定した2次元カメラ310の位置および向き(Xw(t)、Yw(t),Zw(t),Nw(t))と合焦度a(t)との関係を第3記憶部144に記憶する。 Returning to FIG. 12, the inspection execution process will be described. Upon receiving the relationship b (t) between the feature amount b and the time t when the two-dimensional image is captured by the two-dimensional camera 310 from the two-dimensional image processing device 300, in step S607, the CPU 130 receives the feature amount b and the two-dimensional camera 310. Memorize the relationship with the position of. Specifically, the CPU 130 specifies the position and orientation of the two-dimensional camera 310 at the time t of imaging from the movement range of the two-dimensional camera 310 instructed in step S505. The relationship between the position and orientation (Xw (t), Yw (t), Zw (t), Nw (t)) of the specified two-dimensional camera 310 and the in-focus degree a (t) is stored in the third storage unit 144. do.

ステップS608において、CPU130は、特徴量bが増加する方向があるか否かを判断する。具体的には、CPU130は、移動範囲内における特徴量bの最大値と最小値を特定し、最大値と最小値との差が第3閾値以上であるか否かに基づいて判断する。CPU130は、最大値と最小値との差が第3閾値以上である場合、最小値となる位置から最大値となる位置に向かう方向を増加する方向として、特徴量bが増加する方向があると判断する。 In step S608, the CPU 130 determines whether or not there is a direction in which the feature amount b increases. Specifically, the CPU 130 specifies the maximum value and the minimum value of the feature amount b in the movement range, and determines based on whether or not the difference between the maximum value and the minimum value is equal to or greater than the third threshold value. When the difference between the maximum value and the minimum value is equal to or greater than the third threshold value, the CPU 130 states that there is a direction in which the feature amount b increases as a direction for increasing the direction from the position where the minimum value becomes to the position where the maximum value becomes. to decide.

特徴量bが増加する方向がない場合には(ステップS608においてNO)、CPU130は、ステップS616に制御を切り換える。 If there is no direction in which the feature amount b increases (NO in step S608), the CPU 130 switches control to step S616.

特徴量bが増加する方向がある場合には(ステップS609においてYES)、CPU130は、ステップS609において、特徴量bが増加する方向に向かう軌道を生成する。具体的には、CPU130は、第3記憶部144に記憶された2次元カメラ310の位置および向きの情報と、特徴量bとから、特徴量bが増加する方向を決定し、当該方向に向かう軌道を生成する。 If there is a direction in which the feature amount b increases (YES in step S609), the CPU 130 generates a trajectory in the direction in which the feature amount b increases in step S609. Specifically, the CPU 130 determines the direction in which the feature amount b increases from the position and orientation information of the two-dimensional camera 310 stored in the third storage unit 144 and the feature amount b, and heads in that direction. Generate an orbit.

ステップS610において、CPU130は、2次元カメラ310の移動範囲を決定する。具体的には、CPU130は、特徴量bが増加する方向に移動範囲を決定する。 In step S610, the CPU 130 determines the moving range of the two-dimensional camera 310. Specifically, the CPU 130 determines the movement range in the direction in which the feature amount b increases.

ステップS611において、CPU130は、ロボット制御部200に2次元カメラ310を動かすことを指示する。具体的には、CPU130は、ステップS610で決定した移動範囲内であって、ステップS609の軌道上を2次元カメラ310が一定の速度で動くようにロボット制御部200に指示する。 In step S611, the CPU 130 instructs the robot control unit 200 to move the two-dimensional camera 310. Specifically, the CPU 130 instructs the robot control unit 200 to move the two-dimensional camera 310 at a constant speed in the orbit of step S609 within the movement range determined in step S610.

ステップS612において、CPU130は、2次元画像処理装置300に検査内容に対応する特徴量bを算出することを指示する。 In step S612, the CPU 130 instructs the two-dimensional image processing apparatus 300 to calculate the feature amount b corresponding to the inspection content.

ステップS613において、CPU130は、特徴量bと2次元カメラ310の位置との関係を記憶する。 In step S613, the CPU 130 stores the relationship between the feature amount b and the position of the two-dimensional camera 310.

ステップS614において、CPU130は、移動範囲が限界値であるか否かを判定する。具体的には、CPU130は、増加方向に2次元カメラ310を移動させることが可能であるか否かを判定する。増加方向に2次元カメラ310を移動させることが可能であるかは、2次元カメラ310または/およびロボット210とワークWとが当たらないかどうか、または、ロボット210の稼働限界かどうかによって、位置決定部131が決定する。移動範囲が限界値ではない場合には(ステップS614においてNO)、CPU130は、移動範囲が限界値になるまでステップS609〜ステップS614を繰り返す。 In step S614, the CPU 130 determines whether or not the movement range is the limit value. Specifically, the CPU 130 determines whether or not the two-dimensional camera 310 can be moved in the increasing direction. Whether it is possible to move the 2D camera 310 in the increasing direction is determined by whether the 2D camera 310 and / and the robot 210 and the work W do not hit each other, or whether the robot 210 has an operating limit. The unit 131 is determined. If the movement range is not the limit value (NO in step S614), the CPU 130 repeats steps S609 to S614 until the movement range reaches the limit value.

移動範囲が限界値である場合(ステップS614においてYES)、特徴量bが増加する方向がない場合(ステップS608においてNO)、ピント位置で検査を実行した後(ステップS615の実行後)、CPU130は、ステップS616において、検査データを送信する。具体的には、CPU130は、検査結果登録部138に検査結果を送信し、登録する。CPU130は、特徴量bが増加する方向がない場合(ステップS608においてNO)、第3記憶部144に記憶された特徴量bの最大値を算出し、算出した最大値が規定値以下であるか否かを判断する。規定値以下である場合、CPU130は異常なしと判定し、検査結果として異常なし(図13中の丸印)を登録する。規定値より高い場合、CPU130は異常ありと判定し、検査結果として異常ある((図13中のバツ印)を登録する。CPU130は、移動範囲が限界値である場合(ステップS614においてYES)、第3記憶部144に記憶された特徴量bのうちの最も高い特徴量bmaxを特定し(図13参照)、特徴量bmaxが規定値以下であるか否かを判断する。規定値以下である場合、CPU130は異常なしと判定し、検査結果を登録する。規定値より高い場合、CPU130は異常ありと判定し、検査結果を登録する。ピント位置で検査を実行した後(ステップS615の実行後)である場合、CPU130は、ピント位置での検査結果を登録する。たとえば、検査結果判定部137は、2次元画像処理装置300に、ピント位置で得られた2次元画像と基準となる2次元画像とのマッチング度合いを算出するように指示し、得られたマッチング度合に応じて、異常があるか否かを判定する。 When the movement range is the limit value (YES in step S614), when there is no direction in which the feature amount b increases (NO in step S608), after executing the inspection at the focus position (after executing step S615), the CPU 130 , In step S616, the inspection data is transmitted. Specifically, the CPU 130 transmits the inspection result to the inspection result registration unit 138 and registers the inspection result. When there is no direction in which the feature amount b increases (NO in step S608), the CPU 130 calculates the maximum value of the feature amount b stored in the third storage unit 144, and whether the calculated maximum value is equal to or less than the specified value. Judge whether or not. If it is equal to or less than the specified value, the CPU 130 determines that there is no abnormality, and registers no abnormality (circle in FIG. 13) as an inspection result. If it is higher than the specified value, the CPU 130 determines that there is an abnormality and registers an abnormality as an inspection result ((cross mark in FIG. 13). When the moving range is the limit value (YES in step S614), the CPU 130 registers. The highest feature amount bmax among the feature amounts b stored in the third storage unit 144 is specified (see FIG. 13), and it is determined whether or not the feature amount bmax is equal to or less than the specified value. In this case, the CPU 130 determines that there is no abnormality and registers the inspection result. If the value is higher than the specified value, the CPU 130 determines that there is an abnormality and registers the inspection result. After executing the inspection at the focus position (after executing step S615). ), The CPU 130 registers the inspection result at the focus position. For example, the inspection result determination unit 137 registers the inspection result determination unit 137 in the two-dimensional image processing device 300 with the two-dimensional image obtained at the focus position and the reference two-dimensional image. It is instructed to calculate the matching degree with the image, and it is determined whether or not there is an abnormality according to the obtained matching degree.

このように、第1の実施の形態に係る画像処理システムSYSにおいては、円弧軌道生成部136は、2次元カメラ310と計測点Wpとの間の距離を保った状態で計測点Wpについての法線Vと2次元カメラ310の光軸Oとのなす角度が0から予め定められた値まで変化するような円弧軌道上を生成する。CPU130は、円弧軌道生成部136が生成した円弧軌道上を2次元カメラ310が動くようにロボット制御部200に指示する。また、検査結果判定部137は、法線Vと光軸Oとのなす角度の変化に応じた特徴量bの変化に基づいて、2次元カメラ310の移動範囲を決定する。つまり、検査結果判定部137は、法線Vと光軸Oとのなす角度の変化に応じた特徴量bの変化に基づいて、2次元カメラ310とワークWとの相対的な位置関係を決定する。 As described above, in the image processing system SYS according to the first embodiment, the arc orbit generation unit 136 is a method for measuring a measurement point Wp while maintaining a distance between the two-dimensional camera 310 and the measuring point Wp. It generates an arc orbit in which the angle formed by the line V and the optical axis O of the two-dimensional camera 310 changes from 0 to a predetermined value. The CPU 130 instructs the robot control unit 200 to move the two-dimensional camera 310 on the arc orbit generated by the arc orbit generation unit 136. Further, the inspection result determination unit 137 determines the moving range of the two-dimensional camera 310 based on the change of the feature amount b according to the change of the angle formed by the normal line V and the optical axis O. That is, the inspection result determination unit 137 determines the relative positional relationship between the two-dimensional camera 310 and the work W based on the change in the feature amount b according to the change in the angle formed by the normal V and the optical axis O. do.

検査結果判定部137が、2次元カメラ310とワークWとの位置関係を特徴量bに基づいて決定するため、特徴量bを算出する上で最適な位置で検査を実行することができる。つまり、本実施の形態に係る画像処理システムSYSを用いることで、ワークWへの光の当り具合によるハレーションが起きにくい位置で検査を実行することができる。なお、本実施の形態における特徴量bは、合焦度算出部332が合焦度aとして算出する濃度偏差であってもよい。つまり、特徴量算出部33と合焦度算出部332とを一体としてもよい。 Since the inspection result determination unit 137 determines the positional relationship between the two-dimensional camera 310 and the work W based on the feature amount b, the inspection can be executed at the optimum position for calculating the feature amount b. That is, by using the image processing system SYS according to the present embodiment, it is possible to execute the inspection at a position where halation is unlikely to occur due to the degree of light hitting the work W. The feature amount b in the present embodiment may be a concentration deviation calculated by the focusing degree calculation unit 332 as the focusing degree a. That is, the feature amount calculation unit 33 3 and the focusing calculation unit 332 may be integrated.

[J.入力装置を用いた検査経路の登録方法]
図15を参照して、入力装置を用いた検査経路WLの登録方法について説明する。図15は、ユーザが入力装置120を用いて検査経路WLを入力したときの処理の一例を示す図である。図15(a)は入力装置120を用いてユーザが経路を入力した場合に、表示装置110に表示される画面の一例である。図15(b)は、法線ベクトルの作成方法を説明するための図である。
[J. How to register an inspection route using an input device]
A method of registering the inspection path WL using the input device will be described with reference to FIG. FIG. 15 is a diagram showing an example of processing when the user inputs the inspection path WL using the input device 120. FIG. 15A is an example of a screen displayed on the display device 110 when the user inputs a route using the input device 120. FIG. 15B is a diagram for explaining a method of creating a normal vector.

図15(a)に示すように、ユーザは表示装置110に表示されたワークの3DCADモデル上にカーソルをおき、計測点と当該検査箇所において検査したい項目を選択する。計測点を選択すると、図15(b)に示す方法で、計測点についての法線が作成される。管理装置100のCPU130は、ワークの3DCADデータに基づいて法線ベクトルを作成する。具体的には、CPU130は、計測点Wp2が位置するP1(x1、y1、z1),P2(x2、y2、z2)およびP3(x3、y3、z3)に囲まれる微小平面を特定する。CPU130は、特定した微小平面に基づいて、当該微小平面に対して垂直なベクトルを法線ベクトルNm2として算出する。 As shown in FIG. 15A, the user places the cursor on the 3D CAD model of the work displayed on the display device 110, and selects the measurement point and the item to be inspected at the inspection point. When a measurement point is selected, a normal for the measurement point is created by the method shown in FIG. 15 (b). The CPU 130 of the management device 100 creates a normal vector based on the 3D CAD data of the work. Specifically, the CPU 130 specifies a microplane surrounded by P1 (x1, y1, z1), P2 (x2, y2, z2) and P3 (x3, y3, z3) where the measurement point Wp2 is located. Based on the specified microplane, the CPU 130 calculates a vector perpendicular to the microplane as a normal vector Nm2.

CPU130は、入力装置120によってユーザが登録した情報を格納部141に登録する。これにより、検査用情報1411が格納部141に記憶される。 The CPU 130 registers the information registered by the user by the input device 120 in the storage unit 141. As a result, the inspection information 1411 is stored in the storage unit 141.

このように、第1の実施の形態における画像処理システムSYSの画像処理装置2は、ワークWの設計情報であるワークの3DCADモデルを表示装置110に表示するとともに、ユーザ操作に応じて計測点Wpを設定する。そのため、第1の実施の形態における画像処理システムSYSにおいては、計測点Wpを設定する上での自由度が高い。 As described above, the image processing device 2 of the image processing system SYS in the first embodiment displays the 3D CAD model of the work, which is the design information of the work W, on the display device 110, and the measurement point Wp according to the user operation. To set. Therefore, in the image processing system SYS in the first embodiment, there is a high degree of freedom in setting the measurement point Wp.

また、第1の実施の形態における画像処理システムSYSの画像処理装置2は、ユーザ操作に応じて設定された計測点Wpの各々について法線Vを算出することができる。そのため、ユーザは計測点Wpを設定し、検査の開始を指示するだけで、正確な検査を実行することができ、画像処理システムSYSを利用するユーザの利便性が向上する。
<第2の実施の形態>
第1の実施の形態において、ワークWの計測点Wpごとの法線を決定する場合、管理装置100は、3次元画像に基づいて経路を生成する際に決定した後、さらに2次元画像に基づいて計測点Wpごとに決定した法線Vを補正した。しかし、2次元カメラ310を用いなくてもよい。具体的には、図6および図7を参照して説明した経路生成処理によって、各計測点の3DCAD上の各計測点Wpの座標位置および各計測点Wpについての法線ベクトルがグローバル座標系に変換されて、グローバル座標系における計測点Wpの座標位置および各計測点Wpについての法線ベクトルが算出されたことをもって、計測点Wpの法線Vが決定されたとしてもよい。この場合、管理装置100は、図8に示す法線補正処理(ステップS400)を実行することなく、ピント位置調整処理(ステップS500)を実行する。
Further, the image processing device 2 of the image processing system SYS in the first embodiment can calculate the normal V for each of the measurement points Wp set according to the user operation. Therefore, the user can execute an accurate inspection only by setting the measurement point Wp and instructing the start of the inspection, and the convenience of the user who uses the image processing system SYS is improved.
<Second embodiment>
In the first embodiment, when the normal for each measurement point Wp of the work W is determined, the management device 100 determines when generating a path based on the three-dimensional image, and then is further based on the two-dimensional image. The normal V determined for each measurement point Wp was corrected. However, it is not necessary to use the two-dimensional camera 310. Specifically, by the route generation process described with reference to FIGS. 6 and 7, the coordinate position of each measurement point Wp on the 3D CAD of each measurement point and the normal vector for each measurement point Wp are converted into the global coordinate system. The normal V of the measurement point Wp may be determined by the conversion and the calculation of the coordinate position of the measurement point Wp and the normal vector for each measurement point Wp in the global coordinate system. In this case, the management device 100 executes the focus position adjustment process (step S500) without executing the normal correction process (step S400) shown in FIG.

たとえば、第1の実施の形態における経路生成処理(ステップS200)および法線補正処理(ステップS400)のかわりに、図16に示す、法線決定処理(ステップS400A)を実行してもよい。図16は、第2の実施の形態に係る法線決定処理のフローチャートである。 For example, instead of the route generation process (step S200) and the normal correction process (step S400) in the first embodiment, the normal determination process (step S400A) shown in FIG. 16 may be executed. FIG. 16 is a flowchart of the normal determination process according to the second embodiment.

ステップS401Aにおいて、CPU130は、3次元画像処理装置400に特定された検査用情報1411の認識用CADモデルを送る。 In step S401A, the CPU 130 sends the recognition CAD model of the inspection information 1411 specified to the three-dimensional image processing device 400.

ステップS402Aにおいて、CPU130は、3次元画像処理装置400にワークWの配置状況を特定することを指示する。 In step S402A, the CPU 130 instructs the three-dimensional image processing device 400 to specify the arrangement status of the work W.

ステップS403Aにおいて、CPU130は、グローバル座標系におけるワークWの配置状況を特定する。 In step S403A, the CPU 130 specifies the arrangement status of the work W in the global coordinate system.

ステップS404Aにおいて、CPU130は、各計測点Wpの法線Vを決定する。具体的には、格納部141に格納された検査情報のうち、計測点Wpごとの座標(Xmi,Ymi,Zmi)および法線ベクトル(Nmi)をグローバル座標系におけるワークWの位置(Xw,Yw,Zw)および向き(θxw,θyw,θzw)ならびに予め定められた変換式に基づいてグローバルワーク座標系の座標値(Xwi,Ywi,Zwi)および法線ベクトル(Nwi)に変換して、各計測点Wpの法線Vを決定する。経路生成部132は、格納部141の検査用情報1411をグローバル座標系における座標値および法線ベクトルに更新し、第1記憶部142(図9参照)に記憶する。 In step S404A, the CPU 130 determines the normal V of each measurement point Wp. Specifically, among the inspection information stored in the storage unit 141, the coordinates (Xmi, Ymi, Zmi) and the normal vector (Nmi) for each measurement point Wp are set to the position (Xw, Yw) of the work W in the global coordinate system. , Zw) and orientation (θxw, θyw, θzw) and converted to the coordinate values (Xwi, Ywi, Zwi) and normal vector (Nwi) of the global work coordinate system based on the predetermined conversion formula, and each measurement. The normal V of the point Wp is determined. The route generation unit 132 updates the inspection information 1411 of the storage unit 141 to the coordinate values and normal vectors in the global coordinate system, and stores them in the first storage unit 142 (see FIG. 9).

ここで、第2の実施の形態におけるピント調整処理のステップS501においては、ステップS404Aにより決定した法線Vに基づいて2次元カメラ310の軌道を生成する。 Here, in step S501 of the focus adjustment process in the second embodiment, the trajectory of the two-dimensional camera 310 is generated based on the normal V determined by step S404A.

このように、第2の実施の形態に係る画像処理システムSYSの画像処理装置2に含まれる特定部431は、3次元カメラ410によって撮像された3次元画像内において、記憶部432に記憶された認識用CADモデルと類似する画像領域を探索する。画像処理システムSYSの画像処理装置2に含まれる経路生成部132は、特定部431によって探索された画像領域から得られる情報と、格納部141に格納された3DCAD上での計測点ごとの座標(Xmi,Ymi,Zmi)および法線ベクトル(Nmi)をグローバルワーク座標系の座標値(Xwi,Ywi,Zwi)および法線ベクトル(Nwi)に変換する。これにより、ワークWに設定された各計測点Wpについての法線Vが決まる。つまり、画像処理システムSYSにおいては、ワークWに設定された各計測点Wpについての法線Vを一度の撮像で決定することができ、早くに法線Vを決定することができる。
<第3の実施の形態>
第1および第2の実施の形態において、ロボット210は、2次元カメラ310の位置を移動させることで2次元カメラ310とワークWとの距離を変化させるものとした。しかし、図17に示すように、ロボット210は、ワークWの位置を移動させることで2次元カメラ310とワークWとの距離を変更させてもよい。図17は、第3の実施の形態に係る画像処理システムの構成を示す模式図である。ロボット210は、典型的には、SCARA型ロボットであって、ワールド座標系におけるX,Y,Z方向(図17に示す座標軸)にワークWを動かすことができる。これにより、2次元カメラ310とワークWの計測点についての法線とを一致させたうえで、2次元カメラ310のピントを合わせることができる。
As described above, the specific unit 431 included in the image processing device 2 of the image processing system SYS according to the second embodiment is stored in the storage unit 432 in the three-dimensional image captured by the three-dimensional camera 410. Search for an image area similar to the recognition CAD model. The route generation unit 132 included in the image processing device 2 of the image processing system SYS has the information obtained from the image area searched by the specific unit 431 and the coordinates for each measurement point on the 3D CAD stored in the storage unit 141. Xmi, Ymi, Zmi) and normal vector (Nmi) are converted into coordinate values (Xwi, Ywi, Zwi) and normal vector (Nwi) of the global work coordinate system. As a result, the normal V for each measurement point Wp set in the work W is determined. That is, in the image processing system SYS, the normal V for each measurement point Wp set in the work W can be determined by one imaging, and the normal V can be determined quickly.
<Third embodiment>
In the first and second embodiments, the robot 210 changes the distance between the two-dimensional camera 310 and the work W by moving the position of the two-dimensional camera 310. However, as shown in FIG. 17, the robot 210 may change the distance between the two-dimensional camera 310 and the work W by moving the position of the work W. FIG. 17 is a schematic diagram showing the configuration of the image processing system according to the third embodiment. The robot 210 is typically a SCARA type robot, and can move the work W in the X, Y, and Z directions (coordinate axes shown in FIG. 17) in the world coordinate system. As a result, the two-dimensional camera 310 and the normal of the measurement point of the work W can be aligned with each other, and then the two-dimensional camera 310 can be focused.

なお、図17においては、SCARA型ロボットを例に挙げたが、ワークWが十分に小さい場合は、アーム型ロボットによって、ワークWの位置だけでなく、姿勢を変えることができる構成にしてもよい。また、ワークWが十分に小さい場合は、2次元カメラ310を移動させる場合に比べて、ロボット210の動作範囲が小さくなるため、早くに移動させることができる。 Although the SCARA type robot is taken as an example in FIG. 17, if the work W is sufficiently small, the arm type robot may be configured to change not only the position of the work W but also the posture. .. Further, when the work W is sufficiently small, the operating range of the robot 210 is smaller than that in the case of moving the two-dimensional camera 310, so that the robot 210 can be moved faster.

<変形例>
[検査用のカメラ]
第1〜第3の実施の形態において、外観検査に使用されるカメラを2次元カメラ310とした。なお、変位センサを2次元カメラ310の代わりに用いてもよい。変位センサには、光切断センサ、超音波変位センサなどを含む。変位センサを用いることで、2次元カメラを用いる場合と比較して、微細な欠陥の検出が可能になる。
<Modification example>
[Camera for inspection]
In the first to third embodiments, the camera used for the visual inspection is a two-dimensional camera 310. The displacement sensor may be used instead of the two-dimensional camera 310. Displacement sensors include optical disconnection sensors, ultrasonic displacement sensors and the like. By using the displacement sensor, it is possible to detect minute defects as compared with the case of using a two-dimensional camera.

[照明装置]
第1〜第3の実施の形態において、画像処理システムSYSは2次元カメラ310を円弧軌道に沿って動かすことで、ハレーションが起きにくい位置で検査を実行するとした。なお、2次元カメラ310ではなく、ワークWに光を照射する照明(図示せず)の位置または/および向きを変えることで、ハレーションの起きにくい状況で検査を実行できるようにしてもよい。つまり、円弧軌道生成部136は、2次元カメラ310の位置および向きを変化させる軌道を生成するのではなく、照明の位置または/および向きを変えるための軌道を生成してもよい。
[Lighting device]
In the first to third embodiments, the image processing system SYS is supposed to perform the inspection at a position where halation is unlikely to occur by moving the two-dimensional camera 310 along an arc trajectory. By changing the position or / or direction of the illumination (not shown) that irradiates the work W with light instead of the two-dimensional camera 310, the inspection may be performed in a situation where halation is unlikely to occur. That is, the arc orbit generation unit 136 may generate an orbit for changing the position and / or direction of the illumination, instead of generating an orbit for changing the position and direction of the two-dimensional camera 310.

[2次元カメラの位置決め方法]
第1〜第3の実施の形態において、検査を実行する際の2次元カメラ310の位置を決定する方法として、ピントを合わせた後に、検査内容に応じて法線Vと光軸Oとのなす角度を変化させることで、検査を実行する際に2次元カメラ310の位置として最適な位置を決定することとした。しかし、ピントを合わせながら、検査内容に応じて法線Vと光軸Oとのなす角度を変化させることで、2次元カメラ310の位置として最適な位置を決定してもよい。具体的には、2次元カメラ310を法線軌道上に沿ってわずかに動かし、動かした位置において、法線Vと光軸Oとのなす角度を変化させるようにしてもよい。画像処理装置2は、2次元画像とレファレンスモデル画像とのマッチング度合いを示す特徴量を算出し、法線Vと光軸Oとのなす角度のうち、当該特徴量に基づいて2次元カメラ310の向きである角度を決定してもよい。その後、画像処理装置2は、決定した2次元カメラ310の向きを保った状態で、ワークWと2次元カメラ310との間の距離を変化させ、2次元画像とレファレンスモデル画像とのマッチング度合いを示す特徴量から、距離を決定してもよい。
[Positioning method for 2D camera]
In the first to third embodiments, as a method of determining the position of the two-dimensional camera 310 when performing the inspection, after focusing, the normal V and the optical axis O are formed according to the inspection contents. By changing the angle, it was decided to determine the optimum position as the position of the two-dimensional camera 310 when performing the inspection. However, the optimum position as the position of the two-dimensional camera 310 may be determined by changing the angle formed by the normal V and the optical axis O according to the inspection content while focusing. Specifically, the two-dimensional camera 310 may be slightly moved along the normal orbit, and the angle formed by the normal V and the optical axis O may be changed at the moved position. The image processing device 2 calculates a feature amount indicating the degree of matching between the two-dimensional image and the reference model image, and of the angle formed by the normal V and the optical axis O, the feature amount of the two-dimensional camera 310 is based on the feature amount. The angle of orientation may be determined. After that, the image processing device 2 changes the distance between the work W and the two-dimensional camera 310 while maintaining the determined orientation of the two-dimensional camera 310, and determines the degree of matching between the two-dimensional image and the reference model image. The distance may be determined from the indicated feature amount.

また、第1の実施の形態において、2次元カメラと3次元カメラを用いて、2次元カメラの位置決めを行うとした。また、第2の実施の形態において、3次元カメラのみを用いて検査に用いる2次元カメラの位置決めを行うとして。2次元カメラのみを用いて、ワークWに設定された各計測点Wpについての各法線Vを決定してもよい。 Further, in the first embodiment, the positioning of the two-dimensional camera is performed by using the two-dimensional camera and the three-dimensional camera. Further, in the second embodiment, the positioning of the two-dimensional camera used for the inspection is performed using only the three-dimensional camera. Only the two-dimensional camera may be used to determine each normal V for each measurement point Wp set in the work W.

[基準線について]
本実施の形態において、基準線とは、計測点Wpが位置する微小平面に対して垂直な垂線である垂線とした。しかし、基準線は、ユーザによって設定可能なものであってもよい。たとえば、基準線は、撮像領域内に位置するワークが可能な限り2次元カメラ310の被写界深度内に位置するように、2次元カメラ310の向きを設定する際の基準になる線であってもよい。
[About the reference line]
In the present embodiment, the reference line is a perpendicular line perpendicular to the microplane in which the measurement point Wp is located. However, the reference line may be user-configurable. For example, the reference line is a reference line for setting the orientation of the two-dimensional camera 310 so that the workpiece located in the imaging region is located within the depth of field of the two-dimensional camera 310 as much as possible. You may.

図18は、基準線の変形例を示す模式図である。基準線は、たとえば、ワークWの材質と、照射光が入射する方向とに基づいて設定されてもよい。たとえば、図18(a)の基準線Vは、照明の光が2次元カメラ310の光軸に沿って照射され、かつ、ワークWの表面の材質が正反射をする材質である場合に、正反射光を入射させない位置にカメラを配置するために設定される。具体的に、基準線Vは、計測点Wpを通るような線であって、垂線を傾斜させたように設定されている。このようにすることで、計測点Wpを含む計測領域に入射して、その計測領域から反射する光の方向を考慮して2次元カメラ310を配置することができる。 FIG. 18 is a schematic diagram showing a modified example of the reference line. The reference line may be set based on, for example, the material of the work W and the direction in which the irradiation light is incident. For example, when the reference line V 1 of the FIG. 18 (a), the light of the illumination is irradiated along the optical axis of the two-dimensional camera 310, and a material made of the surface of the workpiece W is a specular reflection, It is set to place the camera in a position where specularly reflected light is not incident. Specifically, the reference line V 1 is a line that passes through the measurement point Wp 1 and is set so that the perpendicular line is inclined. By doing so, the two-dimensional camera 310 can be arranged in consideration of the direction of the light incident on the measurement region including the measurement point Wp 1 and reflected from the measurement region.

また、基準線は、計測点Wpを含む計測領域におけるワークWの表面の形状に基づいて設定されてもよい。たとえば、図18(a)の基準線V、基準線V、図18(b)の基準線V、および図18(c)の基準線Vは、各々、計測点Wp(すなわち計測点Wp,計測点Wp,計測点Wp,計測点Wp)付近が複数の面から構成されている場合に、複数の面の各々が2次元カメラ310の撮像視野に含まれるように設定される。このようにすることで、ワークWの表面形状が複雑である場合も、その形状を考慮して2次元カメラ310を配置することができる。 Further, the reference line may be set based on the shape of the surface of the work W in the measurement region including the measurement point Wp. For example, the reference line V 2 in FIG. 18 (a), the reference line V 3 , the reference line V 5 in FIG. 18 (b), and the reference line V 6 in FIG. 18 (c) are each measured points Wp (that is, measured). When the vicinity of the point Wp 2 , the measurement point Wp 3 , the measurement point Wp 5 , and the measurement point Wp 6 ) is composed of a plurality of surfaces, each of the plurality of surfaces is included in the imaging field of view of the two-dimensional camera 310. Set. By doing so, even if the surface shape of the work W is complicated, the two-dimensional camera 310 can be arranged in consideration of the shape.

また、図18(b)の基準線Vは、計測点Wpが設定されている領域を撮像視野に含めるために設定される。具体的には、基準線Vは、障害物であるワークWの表面上の凹凸を避けるように設定される。このようにすることで、ワークWの表面に凹凸があったとしても、その凹凸により視界が遮られることを予め防止することができる。 Further, the reference line V 4 in FIG. 18 (b) is set to include the region in which the measurement point Wp 4 is set in the imaging field of view. Specifically, reference line V 5 is set to avoid irregularities on the surface of the workpiece W which is an obstacle. By doing so, even if the surface of the work W has irregularities, it is possible to prevent the view from being obstructed by the irregularities in advance.

これらの基準線は、図15を用いて説明した、検査経路WLを登録する際の一連の処理において、画像処理装置2が算出してもよく、また、ユーザが計測点Wpを基準に設定してもよい。また、画像処理装置2が算出したうえで、ユーザが微調整をできるような構成であってもよい。 These reference lines may be calculated by the image processing apparatus 2 in a series of processes for registering the inspection path WL described with reference to FIG. 15, and may be set by the user with reference to the measurement point Wp. You may. Further, the configuration may be such that the user can make fine adjustments after the image processing device 2 calculates.

今回開示された実施の形態は全ての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内での全ての変更が含まれることが意図される。 It should be considered that the embodiments disclosed this time are exemplary in all respects and not restrictive. The scope of the present invention is shown by the scope of claims rather than the above description, and is intended to include all modifications within the meaning and scope equivalent to the scope of claims.

SYS 画像処理システム、2 画像処理装置、100 管理装置、110 表示装置、120 入力装置、131 位置決定部、132 経路生成部、133 法線補正部、1330 乖離値算出部、1331 更新部、1332 補正量算出部、134 法線軌道生成部、135 ピント位置決定部、136 円弧軌道生成部、137 検査結果判定部、138 検査結果登録部、139,220 変換部、140 メインメモリ、141,335,433 格納部、142 第1記憶部、143 第2記憶部、144 第3記憶部、150 ハードディスク、160 表示コントローラ、170 データリーダ/ライタ、171 メモリカード、181 入力I/F、182 ロボットI/F、183 2次元カメラI/F、184 3次元カメラI/F、185,350,450 バス、200 ロボット制御部、210 ロボット、300 2二次元画像処理装置、310 2次元カメラ、320,420 撮像制御部、330,430 画像処理エンジン、331,431 特定部、332 合焦度算出部、333 特徴量算出部、334,432 記憶部、340,440 入出力I/F、400 3次元画像処理装置、410 3次元カメラ、NW ネットワーク、Wp 計測点、O 光軸、V 法線、W ワーク、WL 検査経路、a 合焦度、b 特徴量。 SYS image processing system, 2 image processing device, 100 management device, 110 display device, 120 input device, 131 position determination unit, 132 route generation unit, 133 normal correction unit, 1330 deviation value calculation unit, 1331 update unit, 1332 correction unit. Quantity calculation unit, 134 normal trajectory generation unit, 135 focus position determination unit, 136 arc trajectory generation unit, 137 inspection result determination unit, 138 inspection result registration unit, 139,220 conversion unit, 140 main memory, 141,335,433 Storage unit, 142 1st storage unit, 143 2nd storage unit, 144 3rd storage unit, 150 hard disk, 160 display controller, 170 data reader / writer, 171 memory card, 181 input I / F, 182 robot I / F, 183 2D camera I / F, 184 3D camera I / F, 185,350,450 Bus, 200 Robot control unit, 210 robot, 300 2 2D image processing device, 310 2D camera, 320,420 Imaging control unit , 330,430 Image processing engine, 331,431 Specific unit, 332 Focus calculation unit, 333 Feature amount calculation unit, 334,432 Storage unit, 340,440 Input / output I / F, 400 3D image processing device, 410 3D camera, NW network, Wp measurement point, O optical axis, V normal, W work, WL inspection path, a focus degree, b feature quantity.

Claims (10)

ワークの外観画像を用いて、当該ワークに予め設定された1または複数の計測点についての画像計測を行う画像処理システムであって、
前記外観画像を撮像する第1の撮像部と、
前記第1の撮像部と前記ワークとの相対的な位置関係を変化させるロボットと、
前記ワークを撮像して得られる情報に基づいて、前記ワークの配置状況を特定するとともに、当該特定したワークの配置状況に応じて、前記ワークに設定された各計測点についての基準線を特定する基準線特定手段と、
前記特定した基準線上に前記第1の撮像部を位置決めするとともに、前記第1の撮像部の光軸を前記特定した基準線と一致させた状態で、前記第1の撮像部と前記ワークとの間の距離を変化させるように、前記ロボットへ指令を与える距離調整手段と、
前記第1の撮像部により撮像される外観画像に基づいて、前記第1の撮像部の合焦度に関する第1の特徴量を算出する第1の特徴量算出手段と、
前記第1の撮像部と前記ワークとの間の距離の変化に応じた前記第1の特徴量の変化に基づいて、前記計測点についての画像計測を行うための前記第1の撮像部と前記ワークとの間の距離を決定する距離決定手段とを備える、画像処理システム。
An image processing system that measures an image of one or more measurement points preset for the work using an external image of the work.
The first image pickup unit that captures the appearance image and
A robot that changes the relative positional relationship between the first image pickup unit and the work,
Based on the information obtained by imaging the work, the arrangement status of the work is specified, and the reference line for each measurement point set on the work is specified according to the arrangement status of the specified work. Reference line identification means and
The first image pickup unit and the work are placed in a state where the first image pickup unit is positioned on the specified reference line and the optical axis of the first image pickup unit is aligned with the specified reference line. A distance adjusting means that gives a command to the robot to change the distance between them,
A first feature amount calculating means for calculating a first feature amount regarding the degree of focus of the first image pickup unit based on an appearance image captured by the first image pickup unit.
The first image pickup unit and the first image pickup unit for performing image measurement at the measurement point based on the change in the first feature amount according to the change in the distance between the first image pickup unit and the work. An image processing system including a distance determining means for determining a distance to a work.
前記ワークおよび前記ロボットの少なくとも一部を視野範囲に含むように配置され、前記視野範囲内に存在する被写体の3次元画像を撮像する第2の撮像部と、
前記1または複数の計測点の各々に関連付けられた基準線方向を規定する情報を格納する記憶手段とをさらに備え、
前記基準線特定手段は、
前記3次元画像内で前記ワークの形状情報に合致する部分を探索する第1の探索手段と、
前記第1の探索手段により探索された部分の情報と、前記記憶手段に格納された基準線方向を規定する情報とに基づいて、各計測点についての基準線を決定する基準線決定手段とを含む、請求項1に記載の画像処理システム。
A second imaging unit that is arranged so as to include at least a part of the work and the robot in the visual field range and captures a three-dimensional image of a subject existing in the visual field range.
Further comprising a storage means for storing information defining a reference line direction associated with each of the one or more measurement points.
The reference line specifying means is
A first search means for searching a portion of the three-dimensional image that matches the shape information of the work,
A reference line determining means for determining a reference line for each measurement point based on the information of the portion searched by the first search means and the information for defining the reference line direction stored in the storage means. The image processing system according to claim 1, which includes.
前記基準線特定手段は、
前記基準線決定手段により決定された基準線上に前記第1の撮像部を位置決めした状態で前記第1の撮像部により撮像される画像に対して、対応する計測点の基準画像に合致する部分を探索する第2の探索手段と、
前記第2の探索手段により探索された部分の情報に基づいて、前記基準線決定手段により決定された基準線を補正する補正手段とをさらに含む、請求項2に記載の画像処理システム。
The reference line specifying means is
A portion matching the reference image of the corresponding measurement point with respect to the image captured by the first imaging unit in a state where the first imaging unit is positioned on the reference line determined by the reference line determining means. A second search method to search,
The image processing system according to claim 2, further comprising a correction means for correcting a reference line determined by the reference line determining means based on the information of the portion searched by the second search means.
前記第1の撮像部と前記ワークとの間の距離を保った状態で、前記特定した基準線と前記第1の撮像部の光軸とのなす角度を0から予め定められた値まで変化させるように、前記ロボットへ指令を与える位置調整手段と、
前記角度の変化に応じた前記第1の特徴量の変化に基づいて、前記計測点についての画像計測を行うための前記第1の撮像部と前記ワークとの相対的な位置関係を決定する位置決定手段とをさらに備える、請求項1〜3のいずれか1項に記載の画像処理システム。
While maintaining the distance between the first image pickup unit and the work, the angle between the specified reference line and the optical axis of the first image pickup unit is changed from 0 to a predetermined value. As described above, the position adjusting means for giving a command to the robot and
A position that determines the relative positional relationship between the first imaging unit and the work for performing image measurement on the measurement point based on the change in the first feature amount in response to the change in the angle. The image processing system according to any one of claims 1 to 3, further comprising a determination means.
前記第1の撮像部により撮像される外観画像に基づいて、予め設定された検出対象部位に関する第2の特徴量を算出する第2の特徴量算出手段と、
前記第1の撮像部と前記ワークとの間を前記距離決定手段により決定された距離に位置決めした状態で算出される前記第2の特徴量に基づいて、対象となる計測点または当該計測点の近傍における前記検出対象部位の有無を判断する画像計測手段とをさらに備える、請求項1〜4のいずれか1項に記載の画像処理システム。
A second feature amount calculation means for calculating a second feature amount for a preset detection target portion based on an external appearance image captured by the first image pickup unit, and a second feature amount calculation means.
A target measurement point or a measurement point based on the second feature amount calculated in a state where the distance between the first image pickup unit and the work is positioned at a distance determined by the distance determining means. The image processing system according to any one of claims 1 to 4, further comprising an image measuring means for determining the presence or absence of the detection target portion in the vicinity.
前記基準線特定手段は、前記画像計測手段による前記検出対象部位の有無の判断が完了すると、次の計測点に前記第1の撮像部を位置決めするための指令を前記ロボットへ与える、請求項5に記載の画像処理システム。 5. The reference line specifying means gives a command to the robot to position the first image pickup unit at the next measurement point when the determination of the presence / absence of the detection target portion by the image measurement means is completed. The image processing system described in. 前記ワークの設計情報を表示するとともに、当該表示された設計情報に対するユーザ操作に応じて、前記1または複数の計測点を設定する計測点設定受付手段をさらに備える、請求項1〜6のいずれか1項に記載の画像処理システム。 One of claims 1 to 6, further comprising a measurement point setting receiving means for displaying the design information of the work and setting the one or a plurality of measurement points according to a user operation for the displayed design information. The image processing system according to item 1. 前記計測点設定受付手段により設定された計測点の各々について、前記ワークの設計情報に基づいて各計測点の表面形状を算出するとともに、算出された表面形状に基づいて各計測点の基準線を算出する基準線算出手段をさらに備える、請求項7に記載の画像処理システム。 For each of the measurement points set by the measurement point setting receiving means, the surface shape of each measurement point is calculated based on the design information of the work, and the reference line of each measurement point is calculated based on the calculated surface shape. The image processing system according to claim 7, further comprising a reference line calculation means for calculation. ワークの外観画像を用いて、当該ワークに予め設定された1または複数の計測点についての画像計測を行うための画像処理装置であって、
前記外観画像を撮像する第1の撮像部から外観画像に関する情報を受け取るインターフェースと、
前記ワークと前記第1の撮像部との相対的な位置関係を変化させるロボットと通信するためのインターフェースと、
前記ワークを撮像させて得られる情報に基づいて、前記ワークの配置状況を特定するとともに、当該特定したワークの配置状況に応じて、前記ワークに設定された各計測点についての基準線を特定する基準線特定手段と、
前記特定した基準線上に前記第1の撮像部を位置決めするとともに、前記第1の撮像部の光軸を前記特定した基準線と一致させた状態で、前記第1の撮像部と前記ワークとの間の距離を変化させるように、前記ロボットへ指令を与える距離調整手段と、
前記第1の撮像部により撮像される外観画像に基づいて、前記第1の撮像部の合焦度に関する第1の特徴量を算出する第1の特徴量算出手段と、
前記第1の撮像部と前記ワークとの間の距離の変化に応じた前記第1の特徴量の変化に基づいて、前記計測点についての画像計測を行うための前記第1の撮像部と前記ワークとの間の距離を決定する距離決定手段とを備える、画像処理装置。
An image processing device for measuring an image of one or a plurality of measurement points preset in the work by using an external image of the work.
An interface that receives information about the appearance image from the first image pickup unit that captures the appearance image, and
An interface for communicating with a robot that changes the relative positional relationship between the work and the first image pickup unit, and
Based on the information obtained by imaging the work, the arrangement status of the work is specified, and the reference line for each measurement point set on the work is specified according to the arrangement status of the specified work. Reference line identification means and
The first image pickup unit and the work are placed in a state where the first image pickup unit is positioned on the specified reference line and the optical axis of the first image pickup unit is aligned with the specified reference line. A distance adjusting means that gives a command to the robot to change the distance between them,
A first feature amount calculating means for calculating a first feature amount regarding the degree of focus of the first image pickup unit based on an appearance image captured by the first image pickup unit.
The first image pickup unit and the first image pickup unit for performing image measurement at the measurement point based on the change in the first feature amount according to the change in the distance between the first image pickup unit and the work. An image processing device including a distance determining means for determining a distance to a work.
ワークの外観画像を用いて、当該ワークに予め設定された1または複数の計測点についての画像計測を行うための画像処理プログラムであって、
前記画像処理プログラムは、コンピュータに、
第1の撮像部を用いて前記ワークを撮像するステップと、
前記ワークを撮像して得られる情報に基づいて、前記ワークの配置状況を特定するステップと、
前記特定したワークの配置状況に応じて、前記ワークに設定された各計測点についての基準線を特定するステップと、
前記特定した基準線上に前記第1の撮像部を位置決めするステップと、
前記第1の撮像部の光軸を前記特定した基準線と一致させた状態で、前記第1の撮像部と前記ワークとの間の距離を変化させるように、前記第1の撮像部と前記ワークとの相対的な位置関係を変化させるロボットへ指令を与えるステップと、
前記第1の撮像部により撮像される外観画像に基づいて、前記第1の撮像部の合焦度に関する第1の特徴量を算出するステップと、
前記第1の撮像部と前記ワークとの間の距離の変化に応じた前記第1の特徴量の変化に基づいて、前記計測点についての画像計測を行うための前記第1の撮像部と前記ワークとの間の距離を決定するステップとを実行させる、画像処理プログラム。
An image processing program for performing image measurement on one or a plurality of measurement points preset in the work using an external image of the work.
The image processing program is applied to a computer.
A step of imaging the work using the first imaging unit, and
A step of specifying the arrangement status of the work based on the information obtained by imaging the work, and
A step of specifying a reference line for each measurement point set on the work according to the arrangement status of the specified work, and a step of specifying the reference line.
The step of positioning the first image pickup unit on the specified reference line and
The first image pickup unit and the work so as to change the distance between the first image pickup unit and the work while the optical axis of the first image pickup unit is aligned with the specified reference line. The step of giving a command to the robot that changes the relative positional relationship with the work,
A step of calculating a first feature amount relating to the degree of focus of the first image pickup unit based on an appearance image captured by the first image pickup unit, and a step of calculating the first feature amount.
The first image pickup unit and the first image pickup unit for performing image measurement at the measurement point based on the change in the first feature amount according to the change in the distance between the first image pickup unit and the work. An image processing program that executes steps to determine the distance to the work.
JP2018061951A 2017-05-17 2018-03-28 Image processing system, image processing device and image processing program Active JP6973233B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201810357326.8A CN108965690B (en) 2017-05-17 2018-04-19 Image processing system, image processing apparatus, and computer-readable storage medium
DE102018109774.3A DE102018109774B4 (en) 2017-05-17 2018-04-24 Image processing system, image processing device and image processing program
US15/964,033 US10805546B2 (en) 2017-05-17 2018-04-26 Image processing system, image processing device, and image processing program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017098361 2017-05-17
JP2017098361 2017-05-17

Publications (2)

Publication Number Publication Date
JP2018194542A JP2018194542A (en) 2018-12-06
JP6973233B2 true JP6973233B2 (en) 2021-11-24

Family

ID=64571497

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018061951A Active JP6973233B2 (en) 2017-05-17 2018-03-28 Image processing system, image processing device and image processing program

Country Status (1)

Country Link
JP (1) JP6973233B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2021010181A1 (en) * 2019-07-17 2021-01-21
CN111238374B (en) * 2020-03-16 2021-03-12 天目爱视(北京)科技有限公司 Three-dimensional model construction and measurement method based on coordinate measurement
TW202239546A (en) 2020-12-10 2022-10-16 日商發那科股份有限公司 Image processing system and image processing method
CN114422644A (en) * 2022-01-25 2022-04-29 Oppo广东移动通信有限公司 Device control method, device, user equipment and computer readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3666108B2 (en) * 1995-03-16 2005-06-29 株式会社デンソー Appearance inspection device
JP4508252B2 (en) * 2008-03-12 2010-07-21 株式会社デンソーウェーブ Robot teaching device
CN103153553B (en) * 2010-08-27 2016-04-06 Abb研究有限公司 Vision guide alignment system and method
US20150262346A1 (en) * 2012-10-18 2015-09-17 Konica Minolta, Inc. Image processing apparatus, image processing method, and image processing program

Also Published As

Publication number Publication date
JP2018194542A (en) 2018-12-06

Similar Documents

Publication Publication Date Title
CN108965690B (en) Image processing system, image processing apparatus, and computer-readable storage medium
JP6973233B2 (en) Image processing system, image processing device and image processing program
JP5746477B2 (en) Model generation device, three-dimensional measurement device, control method thereof, and program
JP5949242B2 (en) Robot system, robot, robot control apparatus, robot control method, and robot control program
JP3859574B2 (en) 3D visual sensor
JP2016061687A (en) Contour line measurement device and robot system
JP4492654B2 (en) 3D measuring method and 3D measuring apparatus
JP6444027B2 (en) Information processing apparatus, information processing apparatus control method, information processing system, and program
EP2682710B1 (en) Apparatus and method for three-dimensional measurement and robot system comprising said apparatus
JP6892286B2 (en) Image processing equipment, image processing methods, and computer programs
EP3421930B1 (en) Three-dimensional shape data and texture information generation system, photographing control program, and three-dimensional shape data and texture information generation method
JP2002172575A (en) Teaching device
JP2008254150A (en) Teaching method and teaching device of robot
JP2002090113A (en) Position and attiude recognizing device
JP5030953B2 (en) Method and system for determining the relative position of a first object with respect to a second object, a corresponding computer program and a corresponding computer-readable recording medium
JP2019052983A (en) Calibration method and calibrator
JP2021193400A (en) Method for measuring artefact
JPWO2018043524A1 (en) Robot system, robot system control apparatus, and robot system control method
JP5198078B2 (en) Measuring device and measuring method
EP3786633A1 (en) Display control system, inspection control system, display control method, and storage medium
JP2000205821A (en) Instrument and method for three-dimensional shape measurement
US20230070281A1 (en) Methods and systems of generating camera models for camera calibration
US10656097B2 (en) Apparatus and method for generating operation program of inspection system
WO2021145304A1 (en) Image processing system
JP2009264898A (en) Workpiece position/attitude measurement method and measuring device

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180427

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200309

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210204

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210224

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20211005

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211018

R150 Certificate of patent or registration of utility model

Ref document number: 6973233

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150