JP7383349B2 - Teaching program for image measurement equipment - Google Patents

Teaching program for image measurement equipment Download PDF

Info

Publication number
JP7383349B2
JP7383349B2 JP2020029848A JP2020029848A JP7383349B2 JP 7383349 B2 JP7383349 B2 JP 7383349B2 JP 2020029848 A JP2020029848 A JP 2020029848A JP 2020029848 A JP2020029848 A JP 2020029848A JP 7383349 B2 JP7383349 B2 JP 7383349B2
Authority
JP
Japan
Prior art keywords
image
dimensional model
workpiece
measuring device
measurement
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
JP2020029848A
Other languages
Japanese (ja)
Other versions
JP2021135108A (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.)
Mitutoyo Corp
Original Assignee
Mitutoyo 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 Mitutoyo Corp filed Critical Mitutoyo Corp
Priority to JP2020029848A priority Critical patent/JP7383349B2/en
Publication of JP2021135108A publication Critical patent/JP2021135108A/en
Application granted granted Critical
Publication of JP7383349B2 publication Critical patent/JP7383349B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像測定装置のティーチングプログラムに関する。 The present invention relates to a teaching program for an image measuring device.

ワークが載置される試料台と、ワークを撮像する撮像ユニットと、試料台と撮像ユニットの少なくとも一部との位置関係を調整する位置調整機構と、を備える画像測定装置が知られている。この様な画像測定装置を用いて複数のワークを測定する場合、例えば、パートプログラムを利用した自動測定を行う場合がある。この様なパートプログラムは、例えば、測定箇所及び測定方法に関する情報を含んでいる。この様なパートプログラムを生成することを、ティーチングと呼ぶ場合がある。 2. Description of the Related Art Image measurement apparatuses are known that include a sample stage on which a workpiece is placed, an imaging unit that images the workpiece, and a position adjustment mechanism that adjusts the positional relationship between the sample stage and at least a portion of the imaging unit. When measuring a plurality of workpieces using such an image measuring device, automatic measurement using a part program may be performed, for example. Such a part program includes, for example, information regarding measurement points and measurement methods. Generating such a part program is sometimes called teaching.

ティーチングには、画像測定装置を使用して実際にワークを測定し、これによってパートプログラムを生成するオンラインティーチングと、画像測定装置及びワークが存在しない環境でパートプログラムを生成するオフラインティーチングと、が存在する。 There are two types of teaching: online teaching, in which a part program is generated by actually measuring a workpiece using an image measuring device, and offline teaching, in which a part program is generated in an environment where neither an image measuring device nor a workpiece is present. do.

オフラインティーチングでは、例えば、ワークのCADデータに基づいて仮想空間にワークのCADモデルを配置し、このCADモデルの画像をディスプレイ等に表示させる場合がある。この様な場合、ユーザは、このCADモデルの画像に基づいて測定箇所を指定する場合がある。この様な方法によれば、測定箇所を容易に指定することが出来る。 In offline teaching, for example, a CAD model of a workpiece may be placed in a virtual space based on CAD data of the workpiece, and an image of this CAD model may be displayed on a display or the like. In such a case, the user may specify a measurement location based on the image of this CAD model. According to such a method, the measurement location can be easily specified.

特開2001-319219号公報Japanese Patent Application Publication No. 2001-319219

従来のオフラインティーチングでは、例えば、ワークのCADデータに基づいて仮想空間にワークのCADモデルを配置し、このCADモデルの画像をディスプレイ等に表示させる場合がある。この様な場合、ユーザは、このCADモデルの画像に基づいて測定箇所を指定する場合がある。この様な方法によれば、測定箇所を容易に指定することが出来る。 In conventional offline teaching, for example, a CAD model of a workpiece is placed in a virtual space based on CAD data of the workpiece, and an image of this CAD model is sometimes displayed on a display or the like. In such a case, the user may specify a measurement location based on the image of this CAD model. According to such a method, the measurement location can be easily specified.

しかしながら、この様なオフラインティーチングプログラムでは、生成されたパートプログラムの適否を十分に判断することが難しい場合があった。例えば、測定に際してカメラとワークとが干渉しないかどうか等を直感的に判断することが難しい場合があった。 However, in such an offline teaching program, it is sometimes difficult to sufficiently judge the suitability of the generated part program. For example, it may be difficult to intuitively determine whether or not there will be interference between the camera and the work during measurement.

本発明は、この様な課題に鑑みなされたものであり、生成されたパートプログラムの適否を直感的に判断することが可能なティーチングプログラムの提供を目的としている。 The present invention has been made in view of such problems, and aims to provide a teaching program that can intuitively judge the suitability of a generated part program.

本発明の一の実施形態に係るティーチングプログラムは、ワークが載置される試料台と、ワークを撮像する撮像ユニットと、試料台と撮像ユニットの少なくとも一部との位置関係を調整する位置調整機構と、を備える画像測定装置のパートプログラムを生成する。また、このティーチングプログラムは、三次元モデル生成手段と、三次元モデル画像表示手段と、シミュレーション実行部と、を備える。三次元モデル生成手段は、画像測定装置の三次元モデルと、画像測定装置の試料台に載置されたワークの三次元モデルと、撮像ユニットに装着された対物レンズの合焦位置を示す円錐形状の三次元モデルと、を仮想空間に生成する。三次元モデル画像表示手段は、画像測定装置の三次元モデル及びワークの三次元モデルに対応する第1画像と、ワークの三次元モデルに対応する画像であって撮像ユニットによって撮像されるワークの画像に対応する第2画像と、を生成し、表示装置に表示させる。シミュレーション実行部は、生成されたパートプログラムに基づいて測定のシミュレーションを実行する。また、測定のシミュレーションにおいては、画像測定装置の三次元モデルの試料台を示す部分と撮像ユニットの少なくとも一部を示す部分との位置関係が順次調整され、調整された位置関係に応じて第1画像及び第2画像が順次生成され、生成された第1画像及び第2画像が表示装置に順次表示される。 A teaching program according to one embodiment of the present invention includes a sample stage on which a workpiece is placed, an imaging unit that images the workpiece, and a position adjustment mechanism that adjusts the positional relationship between the sample stage and at least a portion of the imaging unit. A part program for an image measuring device is generated. Further, this teaching program includes a three-dimensional model generation means, a three-dimensional model image display means, and a simulation execution section. The three-dimensional model generation means includes a three-dimensional model of the image measuring device, a three-dimensional model of the workpiece placed on the sample stage of the image measuring device, and a conical shape indicating the focal position of the objective lens attached to the imaging unit. A three-dimensional model of is generated in virtual space. The three-dimensional model image display means displays a first image corresponding to the three-dimensional model of the image measuring device and the three-dimensional model of the workpiece, and an image of the workpiece that is an image corresponding to the three-dimensional model of the workpiece and is captured by the imaging unit. A second image corresponding to the second image is generated and displayed on the display device. The simulation execution unit executes a measurement simulation based on the generated part program. In addition, in the measurement simulation, the positional relationship between a portion of the three-dimensional model of the image measuring device indicating the sample stage and a portion indicating at least a portion of the imaging unit is adjusted sequentially, and the first The image and the second image are sequentially generated, and the generated first image and second image are sequentially displayed on the display device.

この様なティーチングプログラムによれば、上記第1画像によって撮像ユニットとワークとの位置関係を把握することが出来る。また、上記第2画像によって撮像ユニットから出力されるワークの画像を把握することが出来る。従って、ユーザは、実際のワーク及び画像測定装置を視認することが出来ない環境においても、生成されたパートプログラムの適否を好適に判断することが出来る。例えば、生成されたパートプログラムに基づいて自動測定を行った場合に、画像測定装置とワークとの干渉を避けつつ、好適な測定が実行されるか否かを、直感的に判断することが出来る。 According to such a teaching program, the positional relationship between the imaging unit and the workpiece can be grasped from the first image. Furthermore, the image of the work output from the imaging unit can be grasped by the second image. Therefore, the user can suitably judge the suitability of the generated part program even in an environment where the actual workpiece and image measuring device cannot be visually recognized. For example, when automatic measurement is performed based on a generated part program, it is possible to intuitively judge whether or not a suitable measurement will be performed while avoiding interference between the image measurement device and the workpiece. .

また、この様なティーチングプログラムによれば、画像測定装置の三次元モデルが、撮像ユニットに装着された対物レンズの合焦位置を示す円錐状の三次元モデルを含んでいる。この様な構成によれば、ユーザは、ワークの三次元モデルと円錐状の三次元モデルとの関係を上記第1画像等において視認することにより、ワーク及び撮像ユニットの適切な位置関係を直感的に判断することが出来る。 Further, according to such a teaching program, the three-dimensional model of the image measuring device includes a conical three-dimensional model that indicates the focal position of the objective lens attached to the imaging unit. According to such a configuration, the user can intuitively determine the appropriate positional relationship between the workpiece and the imaging unit by visually recognizing the relationship between the three-dimensional model of the workpiece and the conical three-dimensional model in the first image, etc. can be judged.

第1実施形態に係る画像測定装置の全体図である。FIG. 1 is an overall diagram of an image measuring device according to a first embodiment. 同画像測定装置の演算装置22の構成を示すブロック図である。FIG. 2 is a block diagram showing the configuration of a calculation device 22 of the image measuring device. 同画像測定装置による自動測定処理のフローチャートである。It is a flowchart of automatic measurement processing by the same image measurement device. 同画像測定装置によるエッジ検出処理について説明するための模式的な図である。FIG. 3 is a schematic diagram for explaining edge detection processing by the image measuring device. オフラインティーチングに使用されるコンピュータシステム2´の全体図である。It is an overall view of a computer system 2' used for offline teaching. オフラインティーチングに使用される演算装置22´の構成を示すブロック図である。It is a block diagram showing the composition of arithmetic device 22' used for offline teaching. 第1実施形態に係るオフラインティーチングプログラムのGUI画面の一例である。It is an example of the GUI screen of the offline teaching program according to the first embodiment. 図7Aの一部の拡大図である。7A is an enlarged view of a portion of FIG. 7A. FIG. 図7Bの一部の拡大図である。FIG. 7B is an enlarged view of a portion of FIG. 7B. ワーク10の三次元モデル10Aの斜視図である。FIG. 2 is a perspective view of a three-dimensional model 10A of the work 10. 図7Bの一部の拡大図である。FIG. 7B is an enlarged view of a portion of FIG. 7B. 第1実施形態に係るオフラインティーチングプログラムの機能ブロック図である。FIG. 2 is a functional block diagram of an offline teaching program according to the first embodiment. オフラインティーチングの手順の一例を示すフローチャートである。It is a flowchart which shows an example of the procedure of offline teaching. 第1実施形態に係るパートプログラム自動生成プログラムのフローチャートである。It is a flowchart of a part program automatic generation program concerning a 1st embodiment. 第1実施形態に係るシミュレーション動画生成プログラムのフローチャートである。3 is a flowchart of a simulation video generation program according to the first embodiment.

次に、実施形態に係る画像測定装置を、図面を参照して詳細に説明する。尚、以下の実施形態はあくまでも一例であり、本発明を限定する意図で示されるものではない。また、以下の図面は模式的なものであり、説明の都合上、一部の構成を省略することがある。 Next, an image measuring device according to an embodiment will be described in detail with reference to the drawings. Note that the following embodiments are merely examples, and are not intended to limit the present invention. Further, the following drawings are schematic, and some structures may be omitted for convenience of explanation.

[第1実施形態]
[画像測定装置]
図1は、第1実施形態に係る画像測定装置の全体図である。図1に示す通り、本実施形態に係る画像測定装置は、画像測定機1と、この画像測定機1に接続されたコンピュータシステム2と、を備える。
[First embodiment]
[Image measuring device]
FIG. 1 is an overall diagram of an image measuring device according to a first embodiment. As shown in FIG. 1, the image measuring device according to this embodiment includes an image measuring device 1 and a computer system 2 connected to the image measuring device 1.

画像測定機1は、ワーク10が載置される試料台11と、試料台11のY方向位置を調整するY軸駆動機構12と、試料台11に載置されたワーク10を撮像するカメラ13と、カメラ13の周辺に設けられたリングライト14と、カメラ13及びリングライト14のZ方向位置を調整するZ軸駆動機構15と、カメラ13、リングライト14及びZ軸駆動機構15のX方向位置を調整するX軸駆動機構16と、X軸駆動機構16を支持するアーム支持体17と、これらの構成を支持する除振台18と、を備える。試料台11の上面は、水平面(XY平面)と一致する。カメラ13は、例えば、CCDイメージセンサ、CMOSイメージセンサ等のイメージセンサを含む。Y軸駆動機構12、Z軸駆動機構15及びX軸駆動機構16は、例えば、駆動用のモータ、位置調整用のボールねじ、及び、位置検出用のリニアエンコーダ等を備える。カメラ13から出力された画像データは、カメラ画像データとしてコンピュータシステム2に送信される。また、Y軸駆動機構12、Z軸駆動機構15及びX軸駆動機構16に含まれるリニアエンコーダから出力された座標データは、試料台11に対するカメラ13の位置を示すカメラ位置データとしてコンピュータシステム2に送信される。尚、以下の説明において、カメラ13、リングライト14及びZ軸駆動機構15を含む構成を、「撮像ユニット」と呼ぶ場合がある。また、Y軸駆動機構12、Z軸駆動機構15及びX軸駆動機構16を含む構成を、「位置調整機構」と呼ぶ場合がある。 The image measuring machine 1 includes a sample stage 11 on which a workpiece 10 is placed, a Y-axis drive mechanism 12 that adjusts the Y-direction position of the sample stage 11, and a camera 13 that images the workpiece 10 placed on the sample stage 11. , a ring light 14 provided around the camera 13, a Z-axis drive mechanism 15 that adjusts the Z-direction positions of the camera 13 and the ring light 14, and a Z-axis drive mechanism 15 that adjusts the X-direction positions of the camera 13, the ring light 14, and the Z-axis drive mechanism 15. The X-axis drive mechanism 16 includes an X-axis drive mechanism 16, an arm support 17 that supports the X-axis drive mechanism 16, and a vibration isolation table 18 that supports these structures. The upper surface of the sample stage 11 coincides with a horizontal plane (XY plane). The camera 13 includes, for example, an image sensor such as a CCD image sensor or a CMOS image sensor. The Y-axis drive mechanism 12, the Z-axis drive mechanism 15, and the X-axis drive mechanism 16 include, for example, a drive motor, a ball screw for position adjustment, a linear encoder for position detection, and the like. The image data output from the camera 13 is transmitted to the computer system 2 as camera image data. Further, the coordinate data output from the linear encoders included in the Y-axis drive mechanism 12, Z-axis drive mechanism 15, and X-axis drive mechanism 16 is sent to the computer system 2 as camera position data indicating the position of the camera 13 with respect to the sample stage 11. Sent. In the following description, the configuration including the camera 13, ring light 14, and Z-axis drive mechanism 15 may be referred to as an "imaging unit." Further, a configuration including the Y-axis drive mechanism 12, the Z-axis drive mechanism 15, and the X-axis drive mechanism 16 may be referred to as a "position adjustment mechanism."

コンピュータシステム2は、表示装置21と、演算装置22と、入力装置23と、を備える。表示装置21は、例えば、ディスプレイやプロジェクタ等である。演算装置22は、内部にCPUやハードディスク等の記憶装置を備える。入力装置23は、ユーザの操作を入力する操作入力装置であり、例えばマウスやキーボード、ジョイスティック(J/S)、タッチパネル等である。 The computer system 2 includes a display device 21, a calculation device 22, and an input device 23. The display device 21 is, for example, a display, a projector, or the like. The arithmetic unit 22 includes an internal CPU and a storage device such as a hard disk. The input device 23 is an operation input device for inputting user operations, and is, for example, a mouse, a keyboard, a joystick (J/S), a touch panel, or the like.

図2は、本実施形態に係る演算装置22の構成を示すブロック図である。 FIG. 2 is a block diagram showing the configuration of the arithmetic device 22 according to this embodiment.

カメラ13から入力されるカメラ画像データは、インタフェース(以下、I/Fと呼ぶ)31を介して、画像メモリ32に格納される。表示制御部36は、例えば、画像メモリ32に格納されたカメラ画像データに基づいて表示装置21によって表示される表示画像データを生成し、表示装置21に送信する。 Camera image data input from the camera 13 is stored in an image memory 32 via an interface (hereinafter referred to as I/F) 31. For example, the display control unit 36 generates display image data to be displayed by the display device 21 based on the camera image data stored in the image memory 32, and transmits it to the display device 21.

ワーク10及び画像測定機1のCADデータは、I/F33を介して、CPU35で画像データ(以下、「CAD画像データ」と呼ぶ。)に展開された後、画像メモリ32に格納される。表示制御部36は、例えば、画像メモリ32に格納されたCAD画像データに基づいて表示画像データを生成し、表示装置21に送信する。 The CAD data of the workpiece 10 and the image measuring device 1 are developed into image data (hereinafter referred to as "CAD image data") by the CPU 35 via the I/F 33, and then stored in the image memory 32. For example, the display control unit 36 generates display image data based on the CAD image data stored in the image memory 32 and transmits it to the display device 21.

キーボード、J/S、及びマウス等の入力装置23から入力される情報は、I/F34を介して、CPU35に入力される。CPU35は、例えば、マウスポインタの表示装置21に表示される画像における位置座標(以下、「ポインタ座標」と呼ぶ。)を、表示制御部36に送信する。表示制御部36は、例えば、入力されたポインタ座標に基づき、表示画像データを生成する。 Information input from input devices 23 such as a keyboard, J/S, and mouse is input to the CPU 35 via the I/F 34. The CPU 35 transmits, for example, the position coordinates of the mouse pointer in the image displayed on the display device 21 (hereinafter referred to as "pointer coordinates") to the display control unit 36. The display control unit 36 generates display image data, for example, based on the input pointer coordinates.

ROM37は、例えば、パートプログラムを用いた自動測定処理のためのプログラム等を格納する。尚、パートプログラムは、画像測定機1による自動測定処理に用いるものであり、ワーク10の測定箇所に対応するカメラ位置データ(以下、「撮像位置データ」と呼ぶ。)等の情報を含む。記憶装置38は、例えば、測定結果の評価等に使用するCADデータ及びパートプログラム等を格納する。記憶装置38内のデータは、I/F39を介してCPU35に入力される。RAM40は、各種プログラムを格納する他、各種処理のワーク領域を提供する。 The ROM 37 stores, for example, a program for automatic measurement processing using a part program. The part program is used for automatic measurement processing by the image measuring device 1, and includes information such as camera position data (hereinafter referred to as "imaging position data") corresponding to measurement points on the workpiece 10. The storage device 38 stores, for example, CAD data and part programs used for evaluation of measurement results. Data in the storage device 38 is input to the CPU 35 via the I/F 39. The RAM 40 stores various programs and also provides a work area for various processes.

CPU35は、例えば、ROM37、記憶装置38、及び、RAM40、並びに、ROM37等に格納された種々のプログラムによりI/F41を介して画像測定機1を制御し、画像測定機1から上記カメラ画像データ及び上記カメラ位置データを取得し、種々の演算処理及び測定処理を実行する。 The CPU 35 controls the image measuring device 1 via the I/F 41 using various programs stored in the ROM 37, the storage device 38, the RAM 40, and the ROM 37, etc., and receives the camera image data from the image measuring device 1. and acquires the camera position data, and executes various calculation processes and measurement processes.

[パートプログラムを用いた自動測定処理]
次に、図1~図4を参照して、パートプログラムによる自動測定処理の一例について説明する。
[Automatic measurement processing using part program]
Next, an example of automatic measurement processing using a part program will be described with reference to FIGS. 1 to 4.

まずユーザは、自動測定処理の準備として、図1に示す様に、ワーク10を試料台11に載置する。次に、試料台11に対するワーク10の位置及び角度(以下、「ワーク位置」及び「ワーク角度」と呼ぶ。)を調整する。これにより、試料台11を基準とする座標系(以下、「機械座標系」と呼ぶ。)と、ワーク10を基準とする座標系(以下、「ワーク座標系」と呼ぶ。)との位置関係が調整される。次にユーザは、機械座標系とワーク座標系との位置関係を取得し、画像測定装置に入力する。次にユーザは、画像測定装置を操作して、パートプログラムを用いた自動測定処理を開始させる。 First, in preparation for automatic measurement processing, the user places the workpiece 10 on the sample stage 11, as shown in FIG. Next, the position and angle of the workpiece 10 with respect to the sample stage 11 (hereinafter referred to as "workpiece position" and "workpiece angle") are adjusted. This establishes the positional relationship between the coordinate system based on the sample stage 11 (hereinafter referred to as the "mechanical coordinate system") and the coordinate system based on the workpiece 10 (hereinafter referred to as the "workpiece coordinate system"). is adjusted. Next, the user obtains the positional relationship between the machine coordinate system and the workpiece coordinate system and inputs it into the image measuring device. Next, the user operates the image measurement device to start automatic measurement processing using the part program.

図3は、自動測定プログラムの一例を示すフローチャートである。 FIG. 3 is a flowchart showing an example of an automatic measurement program.

ステップS101においては、カメラ位置を撮像位置まで調整する。例えば、パートプログラムにはワーク座標系における撮像位置データが含まれている。演算装置22は、例えば、上記機械座標系とワーク座標系との相対的な位置関係に基づき、パートプログラム中のワーク座標系における撮像位置データを、機械座標系における撮像位置データに変換し、画像測定機1に送信する。画像測定機1は、受信した撮像位置データに従い、Y軸駆動機構12、Z軸駆動機構15及びX軸駆動機構16を駆動して、カメラ位置を撮像位置まで調整する。 In step S101, the camera position is adjusted to the imaging position. For example, the part program includes imaging position data in the workpiece coordinate system. For example, the calculation device 22 converts the imaging position data in the workpiece coordinate system in the part program into the imaging position data in the machine coordinate system based on the relative positional relationship between the machine coordinate system and the workpiece coordinate system, and Send to measuring device 1. The image measuring device 1 drives the Y-axis drive mechanism 12, the Z-axis drive mechanism 15, and the X-axis drive mechanism 16 in accordance with the received imaging position data to adjust the camera position to the imaging position.

ステップS102においては、カメラ13により、ワーク10に含まれる測定箇所の撮像を行う。例えば、撮像を実行する旨の信号を画像測定機1に送信し、撮像によって取得されたカメラ画像データを受信する。取得されたカメラ画像データは、表示装置21に表示することも出来る。 In step S102, the camera 13 captures an image of the measurement location included in the workpiece 10. For example, a signal indicating that imaging is to be performed is transmitted to the image measuring device 1, and camera image data acquired by imaging is received. The acquired camera image data can also be displayed on the display device 21.

ステップS103においては、取得したカメラ画像データに対し、エッジ検出ツールtを配置する。エッジ検出ツールtの配置は、パートプログラムに含まれる情報に従って実行される。例えば、パートプログラムは、エッジ検出ツールtの種類、並びに、カメラ画像における大きさ、位置及び角度等の情報を含む。エッジ検出ツールtの種類としては、例えば図4に示す様な矩形状のエッジ検出ツールt、円環状のエッジ検出ツール又は円弧状のエッジ検出ツール等が挙げられる。例えば図4に示す矩形状のエッジ検出ツールtは、測定箇所の輪郭線に沿って延伸するボックスbと、このボックスbに含まれる複数の線分lと、を備える。図示の例において、複数の線分lは、ボックスbの延伸方向に沿って複数配設され、延伸方向と垂直な方向に延伸する。例えば円環状のエッジ検出ツールにおいては、複数の線分lを放射状に配置することも出来る。 In step S103, an edge detection tool t is placed on the acquired camera image data. The placement of the edge detection tool t is performed according to the information contained in the part program. For example, the part program includes information such as the type of edge detection tool t, and its size, position, and angle in the camera image. Examples of the types of edge detection tools t include a rectangular edge detection tool t as shown in FIG. 4, an annular edge detection tool, an arcuate edge detection tool, and the like. For example, the rectangular edge detection tool t shown in FIG. 4 includes a box b extending along the contour of the measurement location and a plurality of line segments l included in the box b. In the illustrated example, a plurality of line segments l are arranged along the stretching direction of the box b, and extend in a direction perpendicular to the stretching direction. For example, in an annular edge detection tool, a plurality of line segments l can be arranged radially.

ステップS104においては、エッジ検出処理を実行する。例えば、ステップS103において設定されたエッジ検出ツールt(図4)に含まれる線分lに沿って画像データの各画素における濃度(照度)を抽出し、濃度(照度)の変化が最も大きい点等をエッジ点eとして検出する。ステップS104においては、エッジ検出ツールtに含まれる複数の線分lに対応して、複数のエッジ点eが検出される。この様な複数のエッジ点eに基づいて、測定箇所の輪郭線、幅、重心等を測定することが出来る。 In step S104, edge detection processing is performed. For example, the density (illuminance) at each pixel of the image data is extracted along the line segment l included in the edge detection tool t (FIG. 4) set in step S103, and the point where the change in density (illuminance) is the largest is extracted. is detected as the edge point e. In step S104, a plurality of edge points e are detected corresponding to a plurality of line segments l included in the edge detection tool t. Based on such a plurality of edge points e, the outline, width, center of gravity, etc. of the measurement location can be measured.

ステップS105においては、パートプログラムを確認し、全ての撮像位置で撮像が実行されたか否か判断する。全ての撮像位置で測定が実行されていなかった場合には、ステップS101に進む。全ての撮像位置で測定が実行されていた場合には、自動測定処理を終了する。 In step S105, the part program is checked and it is determined whether imaging has been performed at all imaging positions. If measurements have not been performed at all imaging positions, the process advances to step S101. If measurements have been performed at all imaging positions, the automatic measurement process ends.

[オフラインティーチング]
次に、上述の様なパートプログラムを生成するためのオフラインティーチングについて説明する。
[Offline teaching]
Next, offline teaching for generating a part program as described above will be explained.

図5は、オフラインティーチングに使用されるコンピュータシステム2´の図である。コンピュータシステム2´、並びに、コンピュータシステム2´に含まれる表示装置21´、演算装置22´、入力装置23´は、基本的には、コンピュータシステム2、並びに、コンピュータシステム2に含まれる表示装置21、演算装置22、入力装置23と同様に構成されている。ただし、コンピュータシステム2´は、画像測定機1には接続されていない。 FIG. 5 is a diagram of a computer system 2' used for offline teaching. The computer system 2' and the display device 21', the arithmetic device 22', and the input device 23' included in the computer system 2' are basically the same as the computer system 2' and the display device 21' included in the computer system 2. , the arithmetic device 22, and the input device 23. However, the computer system 2' is not connected to the image measuring device 1.

図6は、オフラインティーチングに使用される演算装置22´の構成を示すブロック図である。 FIG. 6 is a block diagram showing the configuration of the arithmetic unit 22' used for offline teaching.

ワーク10及び画像測定機1のCADデータは、I/F33´を介して、CPU35´でCAD画像データに展開された後、画像メモリ32´に格納される。表示制御部36´は、例えば、画像メモリ32に格納されたCAD画像データに基づいて表示装置21´によって表示される表示画像データを生成し、表示装置21´に送信する。 The CAD data of the workpiece 10 and the image measuring device 1 are developed into CAD image data by the CPU 35' via the I/F 33', and then stored in the image memory 32'. The display control unit 36', for example, generates display image data to be displayed by the display device 21' based on the CAD image data stored in the image memory 32, and transmits it to the display device 21'.

キーボード、J/S、及びマウス等の入力装置23´から入力される情報は、I/F34´を介して、CPU35´に入力される。CPU35´は、例えば、マウスポインタのポインタ座標を、表示制御部36´に送信する。表示制御部36´は、例えば、入力されたポインタ座標に基づき、表示画像データを生成する。 Information input from input devices 23' such as a keyboard, J/S, and mouse is input to CPU 35' via I/F 34'. For example, the CPU 35' transmits the pointer coordinates of the mouse pointer to the display control unit 36'. The display control unit 36' generates display image data, for example, based on the input pointer coordinates.

ROM37´は、例えば、パートプログラムを生成するためのオフラインティーチングプログラム等を格納する。記憶装置38´は、例えば、オフラインティーチングに使用するCADデータや、パートプログラム等を格納する。記憶装置38´内のデータは、I/F39´を介してCPU35´に入力される。RAM40´は、各種プログラムを格納する他、各種処理のワーク領域を提供する。 The ROM 37' stores, for example, an offline teaching program for generating a part program. The storage device 38' stores, for example, CAD data used for offline teaching, part programs, and the like. Data in the storage device 38' is input to the CPU 35' via the I/F 39'. The RAM 40' not only stores various programs but also provides a work area for various processes.

CPU35´は、例えば、ROM37´、記憶装置38´、及び、RAM40´、並びに、ROM37´等に格納された種々のプログラムにより、種々の演算処理及び測定処理を実行する。 The CPU 35' executes various calculation processes and measurement processes using various programs stored in, for example, the ROM 37', the storage device 38', the RAM 40', and the ROM 37'.

[オフラインティーチングプログラム]
次に、図7A~図10を参照して、オフラインティーチングプログラムを用いたパートプログラムの生成方法について説明する。
[Offline teaching program]
Next, a method for generating a part program using an offline teaching program will be described with reference to FIGS. 7A to 10.

本実施形態に係るオフラインティーチングにおいては、演算装置22´(図5)が、例えば、ワーク10及び画像測定機1(図1)のCADデータを取り込み、このCADデータに基づいてワーク10及び画像測定機1の三次元モデルの画像を生成し、生成した画像をディスプレイ等の表示装置21´(図5)に表示させる。ユーザは、例えば、表示装置21´に表示された三次元モデルの画像を参照し、この画像に表示されたワーク10の測定箇所をクリック等の操作によって選択することにより、測定箇所のリストを作成する。演算装置22´は、例えば、この測定箇所のリストに基づいて、各測定箇所に応じた適切な撮像位置、及び、エッジ検出ツールtの種類、大きさ、位置及び角度等を演算し、パートプログラムとして出力する。出力されたパートプログラムは、図1等を参照して説明した画像測定装置に送信される。 In offline teaching according to the present embodiment, the calculation device 22' (FIG. 5), for example, takes in CAD data of the workpiece 10 and the image measuring device 1 (FIG. 1), and measures the workpiece 10 and the image based on this CAD data. An image of a three-dimensional model of the aircraft 1 is generated, and the generated image is displayed on a display device 21' (FIG. 5) such as a display. For example, the user creates a list of measurement points by referring to the image of the three-dimensional model displayed on the display device 21' and selecting the measurement points of the workpiece 10 displayed in this image by clicking or the like. do. The calculation device 22' calculates, for example, the appropriate imaging position for each measurement point, the type, size, position, angle, etc. of the edge detection tool t based on this list of measurement points, and calculates the part program. Output as . The output part program is sent to the image measuring device described with reference to FIG. 1 and the like.

図7Aは、オフラインティーチングプログラムのGUI(Graphical User Interface)画面の一例である。図7Bは、図7Aの一部の拡大図である。図8は、図7Bの一部の拡大図である。図9は、ワーク10の三次元モデル10Aの斜視図である。図10は、図7Bの一部の拡大図である。 FIG. 7A is an example of a GUI (Graphical User Interface) screen of the offline teaching program. FIG. 7B is an enlarged view of a portion of FIG. 7A. FIG. 8 is an enlarged view of a portion of FIG. 7B. FIG. 9 is a perspective view of a three-dimensional model 10A of the work 10. FIG. 10 is an enlarged view of a portion of FIG. 7B.

図7Aに示す様に、本実施形態に係るオフラインティーチングプログラムのGUIは、例えば、仮想空間に配置された三次元モデルの画像(以下、「仮想空間画像I1」と呼ぶ。)を表示するウィンドウW1と、カメラ13から出力されるワーク10の画像に対応する三次元モデル10Aの画像(以下、「仮想カメラ画像I2」と呼ぶ。)を表示するウィンドウW2と、測定箇所のリストを表示するウィンドウW3と、を備える。また、このGUIは、測定箇所の選択に用いられるパレットP1と、照明コントロールに用いられるパレットP2と、パートプログラムの生成に用いられる測定実行ボタンB1と、仮想空間において測定のシミュレーションを実行するシミュレーションボタンB2と、を備える。尚、GUIに含まれる各構成(ウィンドウW1,W2,W3、パレットP1,P2、測定実行ボタンB1及びシミュレーションボタンB2)は、必要に応じて適宜非表示とすることも出来る。 As shown in FIG. 7A, the GUI of the offline teaching program according to the present embodiment includes, for example, a window W1 that displays an image of a three-dimensional model placed in a virtual space (hereinafter referred to as "virtual space image I1"). , a window W2 that displays an image of the three-dimensional model 10A (hereinafter referred to as "virtual camera image I2") corresponding to the image of the workpiece 10 output from the camera 13, and a window W3 that displays a list of measurement points. and. Additionally, this GUI includes a palette P1 used for selecting a measurement location, a palette P2 used for lighting control, a measurement execution button B1 used for generating a part program, and a simulation button for executing measurement simulation in virtual space. B2. Note that each component included in the GUI (windows W1, W2, W3, palettes P1, P2, measurement execution button B1, and simulation button B2) can be hidden as appropriate.

ウィンドウW1には、例えば図7Bに示す様に、仮想空間画像I1と、仮想空間におけるワーク座標系の座標軸I11と、仮想空間における機械座標系の座標軸I12と、ワーク10の三次元モデル10Aの位置又は角度を調整する際に使用されるマニュピレータI13と、が表示される。 For example, as shown in FIG. 7B, the window W1 displays a virtual space image I1, a coordinate axis I11 of the workpiece coordinate system in the virtual space, a coordinate axis I12 of the machine coordinate system in the virtual space, and the position of the three-dimensional model 10A of the workpiece 10. Alternatively, a manipulator I13 used when adjusting the angle is displayed.

仮想空間画像I1は、例えば、仮想空間に配置されたワーク10の三次元モデル10Aと、画像測定機1の三次元モデル1Aと、の画像である。 The virtual space image I1 is, for example, an image of a three-dimensional model 10A of the workpiece 10 and a three-dimensional model 1A of the image measuring device 1 placed in the virtual space.

画像測定機1の三次元モデル1Aは、例えば、試料台11の三次元モデル11Aと、Y軸駆動機構12の三次元モデル12Aと、カメラ13の三次元モデル13Aと、リングライト14の三次元モデル14Aと、Z軸駆動機構15の三次元モデル15Aと、X軸駆動機構16の三次元モデル16Aと、アーム支持体17の三次元モデル17Aと、除振台18の三次元モデル18Aと、を備える。これら複数の三次元モデル11A,12A,13A,14A,15A,16A,17A,18Aは、それぞれ、三次元モデルを構成する複数の幾何要素を含む。三次元モデル11Aの、三次元モデル18Aに対するY方向における位置は、三次元モデル11Aに対する三次元モデル13Aの位置(以下、「第1仮想カメラ位置」と呼ぶ。)のY座標の成分に応じて、適宜調整される。同様に、三次元モデル13A,14Aの三次元モデル18Aに対するZ方向における位置、及び、三次元モデル13A,14A,15Aの三次元モデル18Aに対するX方向における位置は、第1仮想カメラ位置のZ座標及びX座標の成分に応じて、適宜調整される。 The three-dimensional model 1A of the image measuring device 1 includes, for example, a three-dimensional model 11A of the sample stage 11, a three-dimensional model 12A of the Y-axis drive mechanism 12, a three-dimensional model 13A of the camera 13, and a three-dimensional model of the ring light 14. 14A, a three-dimensional model 15A of the Z-axis drive mechanism 15, a three-dimensional model 16A of the X-axis drive mechanism 16, a three-dimensional model 17A of the arm support 17, and a three-dimensional model 18A of the vibration isolation table 18. Be prepared. These three-dimensional models 11A, 12A, 13A, 14A, 15A, 16A, 17A, and 18A each include a plurality of geometric elements that constitute the three-dimensional model. The position of the three-dimensional model 11A in the Y direction with respect to the three-dimensional model 18A is determined according to the Y-coordinate component of the position of the three-dimensional model 13A with respect to the three-dimensional model 11A (hereinafter referred to as the "first virtual camera position"). , will be adjusted accordingly. Similarly, the positions of the three-dimensional models 13A, 14A in the Z direction with respect to the three-dimensional model 18A, and the positions of the three-dimensional models 13A, 14A, 15A with respect to the three-dimensional model 18A in the X direction are the Z coordinate of the first virtual camera position. and the X-coordinate component.

また、画像測定機1の三次元モデル1Aは、例えば図8に示す様に、撮像ユニットに装着される対物レンズの合焦位置を示す三次元モデル19Aを備える。三次元モデル19Aは、例えば、円錐状の形状を備える。円錐の高さは対物レンズの表面から対物レンズの合焦位置までの距離(作動距離)に対応している。円錐の角度は対物レンズの集光角に対応している。円錐の頂点は対物レンズの合焦位置、及び、カメラ13によって取得される画像の中心位置に対応している。尚、本実施形態に係るオフラインティーチングプログラムにおいては、対物レンズの種類を設定することも出来る。三次元モデル19Aの形状は、対物レンズの合焦位置等に応じて調整される。また、三次元モデル19Aは、半透明の画像としても良い。例えば、第1仮想カメラ位置から見て、三次元モデル19Aと重なる位置に設けられた他の三次元モデルが視認出来る態様で、三次元モデル19Aを表示しても良い。これにより、対物レンズの合焦位置とワーク10との位置関係をより容易に視認出来る場合がある。 Further, the three-dimensional model 1A of the image measuring device 1 includes a three-dimensional model 19A that indicates the focal position of the objective lens attached to the imaging unit, as shown in FIG. 8, for example. The three-dimensional model 19A has, for example, a conical shape. The height of the cone corresponds to the distance from the surface of the objective lens to the focal point of the objective lens (working distance). The angle of the cone corresponds to the condensing angle of the objective lens. The apex of the cone corresponds to the focal position of the objective lens and the center position of the image captured by the camera 13. Note that in the offline teaching program according to this embodiment, the type of objective lens can also be set. The shape of the three-dimensional model 19A is adjusted depending on the focal position of the objective lens and the like. Furthermore, the three-dimensional model 19A may be a semi-transparent image. For example, the three-dimensional model 19A may be displayed in such a manner that another three-dimensional model provided at a position overlapping with the three-dimensional model 19A can be visually recognized when viewed from the first virtual camera position. Thereby, the positional relationship between the focal position of the objective lens and the workpiece 10 may be more easily recognized.

また、仮想空間画像I1は、撮像ユニットに装着される対物レンズの合焦位置が移動する軌跡を示す表示20Aを含む。軌跡を示す表示20Aは、例えば、パートプログラムによって測定を行った際に、上記円錐の頂点が移動する軌跡を表示する。軌跡を示す表示20Aは、例えば、点列、三次元自由曲線又はその他の手段で表現することが出来る。 Further, the virtual space image I1 includes a display 20A that shows a locus of movement of the focal position of the objective lens attached to the imaging unit. The display 20A showing the locus displays, for example, the locus along which the apex of the cone moves when measurement is performed using a part program. The display 20A showing the locus can be expressed by, for example, a sequence of points, a three-dimensional free curve, or other means.

ワーク10の三次元モデル10Aは、複数の幾何要素を含む。例えば図9の例では、下面を示す平面要素10aと、側面を示す複数の平面要素10bと、上面を示す平面要素10cと、これら平面要素10a,10b,10cの輪郭線を示す複数の直線要素10dと、を含む。また、三次元モデル10Aは、例えば図9の例では、円筒状の貫通孔を示す円筒要素10eと、この貫通孔と下面又は上面との境界線を示す2つの円要素10fと、四角柱状の貫通孔を示す複数の平面要素10gと、この貫通孔の輪郭線、及び、この貫通孔と下面又は上面との境界線を示す複数の直線要素10hと、切り欠きを示す2つの平面要素10i及び円筒要素10jと、この切り欠きと他の要素との境界線を示す複数の直線要素10k及び2つの円要素10lと、を含む。尚、仮想空間の機械座標系における三次元モデル10Aの位置は、適宜調整することが出来る。 The three-dimensional model 10A of the work 10 includes a plurality of geometric elements. For example, in the example of FIG. 9, a plane element 10a indicating the bottom surface, a plurality of plane elements 10b indicating the side surfaces, a plane element 10c indicating the top surface, and a plurality of linear elements indicating the outlines of these plane elements 10a, 10b, 10c. 10d. Furthermore, in the example of FIG. 9, the three-dimensional model 10A includes a cylindrical element 10e indicating a cylindrical through hole, two circular elements 10f indicating a boundary line between the through hole and the lower surface or the upper surface, and a quadrangular prism-shaped cylindrical element 10e. A plurality of planar elements 10g indicating a through hole, a plurality of linear elements 10h indicating the outline of the through hole and a boundary line between the through hole and the lower surface or the upper surface, two planar elements 10i indicating a notch, and It includes a cylindrical element 10j, and a plurality of linear elements 10k and two circular elements 10l that indicate boundaries between this notch and other elements. Note that the position of the three-dimensional model 10A in the mechanical coordinate system of the virtual space can be adjusted as appropriate.

座標軸I11(図7B)は、例えば、仮想空間におけるワーク座標系のX軸、Y軸及びZ軸に沿って延伸する矢印の画像を含む。座標軸I12は、例えば、仮想空間における機械座標系のX軸、Y軸及びZ軸に沿って延伸する矢印の画像を含む。 The coordinate axis I11 (FIG. 7B) includes, for example, an image of an arrow extending along the X-axis, Y-axis, and Z-axis of the workpiece coordinate system in the virtual space. The coordinate axis I12 includes, for example, an image of an arrow extending along the X-axis, Y-axis, and Z-axis of the mechanical coordinate system in the virtual space.

マニュピレータI13は、例えば図10に示す様に、仮想空間の機械座標系におけるX軸、Y軸又はZ軸に対応する3つの第1画像I13aと、仮想空間の機械座標系におけるYZ平面、ZX平面又はXY平面に対応する3つの第2画像I13bと、仮想空間の機械座標系におけるX軸、Y軸又はZ軸に対応する3つの第3画像I13cと、を含む。第1画像I13aは、例えば、仮想空間における機械座標系のX軸、Y軸又はZ軸に沿って延伸する矢印の画像として表現することが出来る。第2画像I13bは、例えば、仮想空間における機械座標系のX軸、Y軸又はZ軸に沿って延伸しお互いに垂直な2つの矢印の組み合わせの画像として表現することが出来る。第3画像I13cは、例えば、仮想空間における機械座標系のX軸、Y軸又はZ軸を中心とする曲線矢印の画像として表現することが出来る。尚、図示の例においては、第1画像I13a、第2画像I13b及び第3画像I13cが仮想空間の機械座標系に対応しているものの、これら画像の少なくとも一つを仮想空間のワーク座標に対応させることも出来る。 For example, as shown in FIG. 10, the manipulator I13 generates three first images I13a corresponding to the X-axis, Y-axis, or Z-axis in the mechanical coordinate system of the virtual space, and the YZ plane and the ZX plane in the mechanical coordinate system of the virtual space. Alternatively, it includes three second images I13b corresponding to the XY plane and three third images I13c corresponding to the X-axis, Y-axis, or Z-axis in the mechanical coordinate system of the virtual space. The first image I13a can be expressed, for example, as an image of an arrow extending along the X-axis, Y-axis, or Z-axis of the mechanical coordinate system in virtual space. The second image I13b can be expressed, for example, as an image of a combination of two mutually perpendicular arrows extending along the X-axis, Y-axis, or Z-axis of the mechanical coordinate system in the virtual space. The third image I13c can be expressed, for example, as an image of a curved arrow centered on the X-axis, Y-axis, or Z-axis of the mechanical coordinate system in virtual space. In the illustrated example, although the first image I13a, the second image I13b, and the third image I13c correspond to the machine coordinate system of the virtual space, at least one of these images corresponds to the workpiece coordinates of the virtual space. You can also do it.

ウィンドウW2(図7A)には、仮想カメラ画像I2が表示される。例えば、指定された対物レンズの種類に応じてカメラ13の視野範囲を算出し、算出された視野範囲、第1仮想カメラ位置、並びに、仮想空間の機械座標系におけるワーク10の三次元モデル10Aの位置及び角度(以下、「仮想ワーク位置」及び「仮想ワーク角度」と呼ぶ。)等に応じて仮想カメラ画像I2を生成する。 A virtual camera image I2 is displayed in the window W2 (FIG. 7A). For example, the field of view range of the camera 13 is calculated according to the specified type of objective lens, and the calculated field of view range, the first virtual camera position, and the three-dimensional model 10A of the workpiece 10 in the machine coordinate system of the virtual space are calculated. A virtual camera image I2 is generated according to the position and angle (hereinafter referred to as "virtual work position" and "virtual work angle").

尚、ウィンドウW2には、図4を参照して説明した様なエッジ検出ツールtを配置することも出来る。また、この様なエッジ検出ツールtの種類、位置、角度、大きさ等は、ウィンドウW2にて調整することも可能である。 Note that an edge detection tool t as described with reference to FIG. 4 can also be placed in the window W2. Further, the type, position, angle, size, etc. of such an edge detection tool t can also be adjusted in the window W2.

ウィンドウW3には、ワーク10の測定箇所のリストが表示される。測定箇所のリストには、例えば、ワーク10の三次元モデル10Aに含まれる複数の幾何要素(上記平面要素10a,10b,10c,10g,10i、直線要素10d,10h,10k、円筒要素10e,10j、円要素10f,10l等)のうち、ワーク10の測定箇所に対応するものを示す名称等の情報が表示される。 A list of measurement points on the workpiece 10 is displayed in the window W3. The list of measurement points includes, for example, a plurality of geometric elements included in the three-dimensional model 10A of the workpiece 10 (the above-mentioned plane elements 10a, 10b, 10c, 10g, 10i, linear elements 10d, 10h, 10k, cylindrical elements 10e, 10j). , circle elements 10f, 10l, etc.), information such as a name indicating the one corresponding to the measurement location on the workpiece 10 is displayed.

パレットP1は、複数の幾何要素選択ボタンp1を備える。これら複数の幾何要素選択ボタンp1は、それぞれ、幾何要素の種類に対応している。例えば図示の例では、複数の幾何要素選択ボタンp1が、それぞれ、点要素、直線要素、円要素、平面要素、球要素、段付円筒要素、円筒要素、円錐要素等に対応している。 The palette P1 includes a plurality of geometric element selection buttons p1. These plurality of geometric element selection buttons p1 each correspond to a type of geometric element. For example, in the illustrated example, the plurality of geometric element selection buttons p1 correspond to point elements, linear elements, circular elements, plane elements, spherical elements, stepped cylindrical elements, cylindrical elements, conical elements, etc., respectively.

パレットP2(図7A)は、複数のコントロールバーp2を備える。これら複数のコントロールバーp2は、それぞれ、画像測定機1に設けられた複数の照明に対応している。また、これら複数のコントロールバーp2は、それぞれ、対応する各照明の照度の調整等に使用することが出来る。例えば図示の例では、複数のコントロールバーp2が、上方(カメラ13の撮像方向)から対物レンズを介してワーク10を照射する落射照明、下方から試料台11を介してワーク10を照射する透過照明、並びに、リングライト14に設けられた複数の照明のうち、Y方向の一方側からワーク10を照射するもの、Y方向の他方側からワーク10を照射するもの、X方向の一方側からワーク10を照射するもの、及び、X方向の他方からワーク10を照射するものに対応している。 Palette P2 (FIG. 7A) includes a plurality of control bars p2. These plurality of control bars p2 correspond to a plurality of lights provided in the image measuring device 1, respectively. Further, each of these plurality of control bars p2 can be used to adjust the illuminance of each corresponding lighting. For example, in the illustrated example, the plurality of control bars p2 are epi-illumination that illuminates the workpiece 10 from above (in the imaging direction of the camera 13) through the objective lens, and transmitted illumination that illuminates the workpiece 10 from below through the sample stage 11. , and among the plurality of illuminations provided in the ring light 14, one that illuminates the work 10 from one side in the Y direction, one that illuminates the work 10 from the other side in the Y direction, and one that illuminates the work 10 from one side in the X direction. This corresponds to the one that irradiates the workpiece 10 and the one that irradiates the workpiece 10 from the other side in the X direction.

測定実行ボタンB1は、パートプログラム自動生成プログラムの出力に用いられる。パートプログラム自動生成プログラムについては後述する。 The measurement execution button B1 is used to output the part program automatic generation program. The part program automatic generation program will be described later.

シミュレーションボタンB2は、シミュレーション動画生成プログラムの実行に用いられる。シミュレーション動画生成プログラムについては後述する。 The simulation button B2 is used to execute a simulation video generation program. The simulation video generation program will be described later.

図11は、オフラインティーチングプログラムの機能ブロック図である。図11に示す各構成は、例えば、オフラインティーチングプログラム、並びに、図6を参照して説明したCPU35´、ROM37´、記憶装置38´、RAM40´等によって実現される。 FIG. 11 is a functional block diagram of the offline teaching program. Each configuration shown in FIG. 11 is realized by, for example, an offline teaching program, and the CPU 35', ROM 37', storage device 38', RAM 40', etc. described with reference to FIG.

本実施形態に係るオフラインティーチングプログラムは、三次元モデル生成部G1と、仮想カメラ位置保持部G2と、画像生成部G3と、照明条件調整部G4と、ポインタ座標保持部G5と、ポインタ座標変換部G6と、ワーク位置調整部G7と、測定箇所指定部G8と、測定箇所保持部G9と、パートプログラム生成部G10と、パートプログラム保持部G11と、シミュレーション実行部G12と、を備える。 The offline teaching program according to the present embodiment includes a three-dimensional model generation section G1, a virtual camera position holding section G2, an image generation section G3, an illumination condition adjustment section G4, a pointer coordinate holding section G5, and a pointer coordinate conversion section. G6, a work position adjustment section G7, a measurement point specifying section G8, a measurement point holding section G9, a part program generation section G10, a part program holding section G11, and a simulation execution section G12.

三次元モデル生成部G1は、画像測定機1の三次元モデル1A、及び、ワーク10の三次元モデル10Aを生成する。三次元モデル生成部G1は、例えば、ワーク10及び画像測定機1のCADデータ、第1仮想カメラ位置、並びに、仮想ワーク位置及び仮想ワーク角度が格納された記憶装置38´、及び、このCADデータを保持するRAM40´の少なくとも一方を含む。 The three-dimensional model generation unit G1 generates a three-dimensional model 1A of the image measuring device 1 and a three-dimensional model 10A of the work 10. The three-dimensional model generation unit G1 includes, for example, a storage device 38' in which CAD data of the work 10 and the image measuring device 1, the first virtual camera position, the virtual work position and the virtual work angle are stored, and this CAD data. at least one of the RAMs 40' holding .

仮想カメラ位置保持部G2は、仮想空間に配置された仮想的なカメラの仮想空間における位置及び角度(以下、「第2仮想カメラ位置」及び「第2仮想カメラ角度」と呼ぶ。)を保持する。この仮想的なカメラは、画像測定機1に含まれるカメラ13と対応するものとは異なり、画像測定機1の三次元モデル1Aから離間して仮想空間に配置される。この仮想的なカメラから出力される画像は、図7AのウィンドウW1に表示される仮想空間画像I1に対応する。従って、例えばこの仮想的なカメラが三次元モデル10Aに近づけば、仮想空間画像I1において三次元モデル10Aの画像が拡大される。 The virtual camera position holding unit G2 holds the position and angle in the virtual space of a virtual camera placed in the virtual space (hereinafter referred to as "second virtual camera position" and "second virtual camera angle"). . This virtual camera is different from the one corresponding to the camera 13 included in the vision measuring device 1, and is placed in the virtual space apart from the three-dimensional model 1A of the vision measuring device 1. The image output from this virtual camera corresponds to the virtual space image I1 displayed in the window W1 of FIG. 7A. Therefore, for example, when this virtual camera approaches the three-dimensional model 10A, the image of the three-dimensional model 10A is enlarged in the virtual space image I1.

画像生成部G3(図11)は、図7Aの仮想空間画像I1及び仮想カメラ画像I2を生成し、画像メモリ32´(図6)に出力する。 The image generation unit G3 (FIG. 11) generates the virtual space image I1 and the virtual camera image I2 of FIG. 7A, and outputs them to the image memory 32' (FIG. 6).

照明条件調整部G4(図11)は、上記パレットP2(図7A)の操作に応じて、ワーク10の三次元モデル10A、及び、試料台11の三次元モデル11Aの仮想空間画像I1、仮想カメラ画像I2における表示色(照度、濃度)を調整する。例えば、落射照明に対応するコントロールバーp2が操作された場合、ワーク10の上面を示す平面要素10c(図9)、及び、試料台11の三次元モデル11A(図7A)の上面に対応する平面要素の表示色が、仮想空間画像I1及び仮想カメラ画像I2において調整される。表示色の調整は、例えば、三次元モデル生成部G1又は画像生成部G3において、三次元モデル又は幾何要素の表示色に関する情報を調整することによって行われる。 The illumination condition adjustment unit G4 (FIG. 11) adjusts the virtual space image I1 of the three-dimensional model 10A of the workpiece 10 and the three-dimensional model 11A of the sample stage 11, and the virtual camera according to the operation of the palette P2 (FIG. 7A). The display color (illuminance, density) in image I2 is adjusted. For example, when the control bar p2 corresponding to epi-illumination is operated, the plane element 10c (FIG. 9) indicating the top surface of the workpiece 10 and the plane corresponding to the top surface of the three-dimensional model 11A (FIG. 7A) of the sample stage 11 The display color of the element is adjusted in the virtual space image I1 and the virtual camera image I2. Adjustment of the display color is performed, for example, by adjusting information regarding the display color of the three-dimensional model or geometric element in the three-dimensional model generating section G1 or the image generating section G3.

ポインタ座標保持部G5は、ポインタ座標を保持する。ポインタ座標保持部G5に保持されたポインタ座標は、マウス等の入力装置23´から入力された情報に応じて適宜更新される。 The pointer coordinate holding unit G5 holds pointer coordinates. The pointer coordinates held in the pointer coordinate holding unit G5 are updated as appropriate according to information input from the input device 23' such as a mouse.

ポインタ座標変換部G6は、例えば、ポインタ座標保持部G5に保持されたポインタ座標、並びに、仮想カメラ位置保持部G2に保持された第2仮想カメラ位置及び第2仮想カメラ角度に基づき、ポインタ座標を仮想空間における三次元座標(以下、「三次元ポインタ座標」と呼ぶ。)に変換する。この三次元ポインタ座標は、例えば、ポインタ座標に対応して仮想空間に設けられる直線と、ワーク10の三次元モデル10A又は画像測定機1の三次元モデル1Aを構成する幾何要素と、の交点とすることが出来る。また、ポインタ座標に対応して仮想空間に設けられる直線は、第2仮想カメラ位置及びポインタ座標によって特定される点を通り、第2仮想カメラ角度(例えば、上記仮想的なカメラの撮像方向)に延伸する直線とすることが出来る。 The pointer coordinate conversion unit G6 converts the pointer coordinates based on, for example, the pointer coordinates held in the pointer coordinate holding unit G5 and the second virtual camera position and second virtual camera angle held in the virtual camera position holding unit G2. Convert to three-dimensional coordinates (hereinafter referred to as "three-dimensional pointer coordinates") in virtual space. The three-dimensional pointer coordinates are, for example, the intersection of a straight line provided in the virtual space corresponding to the pointer coordinates and a geometric element constituting the three-dimensional model 10A of the workpiece 10 or the three-dimensional model 1A of the image measuring device 1. You can. Further, a straight line provided in the virtual space corresponding to the pointer coordinates passes through the point specified by the second virtual camera position and the pointer coordinates, and points at the second virtual camera angle (for example, the imaging direction of the virtual camera). It can be a straight line that stretches.

ワーク位置調整部G7は、上記三次元ポインタ座標等に基づき、仮想空間におけるワーク10の三次元モデル10Aの位置及び角度(「仮想ワーク位置」及び「仮想ワーク角度」)を調整する。 The workpiece position adjustment unit G7 adjusts the position and angle ("virtual workpiece position" and "virtual workpiece angle") of the three-dimensional model 10A of the workpiece 10 in the virtual space based on the three-dimensional pointer coordinates and the like.

ワーク位置調整部G7は、例えば、上記マニュピレータI13(図10)のX軸、Y軸又はZ軸に対応する第1画像I13aがクリック等の操作によって選択された場合、ワーク10の三次元モデル10Aを仮想空間においてX方向、Y方向又はZ方向に移動可能な状態とする。同様に、ワーク位置調整部G7は、例えば、上記マニュピレータI13の第2画像I13bのいずれかがクリック等の操作によって選択された場合、三次元モデル10Aを仮想空間においてX方向及びY方向、Y方向及びZ方向、又は、Z方向及びX方向に移動可能な状態とする。同様に、ワーク位置調整部G7は、上記マニュピレータI13の第3画像I13cのいずれかがクリック等の操作によって選択された場合、三次元モデル10Aを仮想空間においてX軸、Y軸又はZ軸を回転軸として回転可能な状態とする。 For example, when the first image I13a corresponding to the X-axis, Y-axis, or Z-axis of the manipulator I13 (FIG. 10) is selected by an operation such as a click, the workpiece position adjustment unit G7 adjusts the three-dimensional model 10A of the workpiece 10. is movable in the X direction, Y direction, or Z direction in virtual space. Similarly, when one of the second images I13b of the manipulator I13 is selected by an operation such as a click, the workpiece position adjustment unit G7 moves the three-dimensional model 10A in the X direction, the Y direction, and the Y direction in the virtual space. and the Z direction, or the Z direction and the X direction. Similarly, when one of the third images I13c of the manipulator I13 is selected by an operation such as a click, the workpiece position adjustment unit G7 rotates the three-dimensional model 10A around the X-axis, Y-axis, or Z-axis in the virtual space. Make it rotatable as a shaft.

尚、ワーク位置調整部G7(図11)は、例えば、ワーク10の三次元モデル10Aを構成する複数の幾何要素から、底面(試料台11の上面に対応する平面要素との接触面)を指定する機能を有することが出来る。この様な場合、例えば、三次元モデル10Aを構成する複数の平面要素10a,10b,10c(図9)の中から、一の平面要素を底面として選択することが出来る。また、この様な場合、例えば、試料台11の上面を示す平面要素と平行な方向への移動、及び、試料台11の上面を示す平面要素の法線方向に延伸する直線を軸とする回転のみを有効とし、その他の移動及び回転を無効とすることが出来る。例えば、マニュピレータI13(図10)を構成する複数の画像のうち、X軸及びY軸に対応する2つの第1画像I13a、XY平面に対応する1つの第2画像I13b及びZ軸に対応する1つの第3画像I13cに対応する機能を有効な状態とし、Z軸に対応する1つの第1画像I13a、YZ平面及びZX平面に対応する2つの第2画像I13b、及び、X軸及びY軸に対応する2つの第3画像I13cを無効な状態とすることが出来る。 Note that the workpiece position adjustment unit G7 (FIG. 11), for example, specifies the bottom surface (the contact surface with the planar element corresponding to the top surface of the sample stage 11) from a plurality of geometric elements constituting the three-dimensional model 10A of the workpiece 10. It is possible to have the function of In such a case, for example, one plane element can be selected as the bottom surface from among the plurality of plane elements 10a, 10b, 10c (FIG. 9) constituting the three-dimensional model 10A. In addition, in such a case, for example, movement in a direction parallel to the plane element indicating the top surface of the sample stage 11, and rotation around a straight line extending in the normal direction of the plane element indicating the top surface of the sample stage 11. It is possible to enable only one movement and disable other movements and rotations. For example, among the plurality of images forming the manipulator I13 (FIG. 10), two first images I13a corresponding to the X-axis and Y-axis, one second image I13b corresponding to the XY plane, and one second image I13b corresponding to the Z-axis. One first image I13a corresponding to the Z axis, two second images I13b corresponding to the YZ plane and the ZX plane, and The two corresponding third images I13c can be rendered invalid.

測定箇所指定部G8(図11)は、例えば、ワーク10の三次元モデル10Aに含まれる複数の幾何要素から、測定箇所に対応する幾何要素を選択する。例えば、測定箇所指定部G8は、上記パレットP1(図7A)に含まれる複数の幾何要素選択ボタンp1の指定により、測定箇所に対応する幾何要素の種類を取得する。また、測定箇所指定部G8は、測定箇所に対応する種類の複数の幾何要素のうち、上記三次元ポインタ座標との距離が最も近いもの、又は、上記三次元ポインタ座標との距離が最も近く且つ上記三次元ポインタ座標との距離が所定の大きさ以下であるものを、ハイライト等によって強調表示する。強調表示は、例えば、三次元モデル生成部G1又は画像生成部G3(図11)において、三次元モデル又は幾何要素の表示色に関する情報を調整することによって行われる。ある幾何要素が強調表示されている状態でユーザがクリック等の操作を行うと、この幾何要素が測定箇所に対応する幾何要素として選択される。 The measurement point designation unit G8 (FIG. 11) selects, for example, a geometric element corresponding to the measurement point from a plurality of geometric elements included in the three-dimensional model 10A of the workpiece 10. For example, the measurement point designation unit G8 acquires the type of geometric element corresponding to the measurement point by specifying a plurality of geometric element selection buttons p1 included in the palette P1 (FIG. 7A). In addition, the measurement point designation section G8 selects one of the plurality of geometric elements of the type corresponding to the measurement point that is the closest to the three-dimensional pointer coordinates, or one that is the closest to the three-dimensional pointer coordinates and Those whose distance from the three-dimensional pointer coordinates is less than or equal to a predetermined size are highlighted and displayed. The highlighted display is performed, for example, by adjusting information regarding the display color of the three-dimensional model or the geometric element in the three-dimensional model generating section G1 or the image generating section G3 (FIG. 11). When a user performs an operation such as clicking while a certain geometric element is highlighted, this geometric element is selected as the geometric element corresponding to the measurement location.

測定箇所保持部G9は、測定箇所指定部G8によって選択された幾何要素のリストを保持する。このリストは、上記ウィンドウW3に表示される。 The measurement point holding section G9 holds a list of geometric elements selected by the measurement point specifying section G8. This list is displayed in the window W3.

パートプログラム生成部G10は、上記測定実行ボタンB1のクリック等に応じて、パートプログラム自動生成プログラムを実行する。パートプログラム自動生成プログラムが実行されると、測定箇所保持部G9に保持されている幾何要素のリストに基づいて、パートプログラムが生成される。 The part program generation unit G10 executes the part program automatic generation program in response to a click on the measurement execution button B1. When the part program automatic generation program is executed, a part program is generated based on the list of geometric elements held in the measurement point holding unit G9.

パートプログラム保持部G11は、生成されたパートプログラムを保持する。 The part program holding unit G11 holds the generated part program.

シミュレーション実行部G12は、上記シミュレーションボタンB2のクリック等に応じて、シミュレーション動画生成プログラムを実行する。シミュレーション動画生成プログラムが実行されると、パートプログラム保持部G11に保持されているパートプログラムに基づいて、仮想空間における測定のシミュレーションが実行される。また、このパートプログラムを実行した際の画像測定機1の動作を示す複数の仮想空間画像I1及び複数の仮想カメラ画像I2がシミュレーション動画として生成される。生成されたシミュレーション動画は、それぞれ、ウィンドウW1,W2において再生される。 The simulation execution unit G12 executes a simulation video generation program in response to a click on the simulation button B2. When the simulation video generation program is executed, a measurement simulation in the virtual space is executed based on the part program held in the part program holding unit G11. Furthermore, a plurality of virtual space images I1 and a plurality of virtual camera images I2 showing the operation of the image measuring device 1 when this part program is executed are generated as a simulation video. The generated simulation videos are played in windows W1 and W2, respectively.

[オフラインティーチングの手順]
次に、図12を参照して、ユーザによるオフラインティーチングの手順の一例について説明する。図12は、オフラインティーチングの手順の一例を示すフローチャートである。
[Offline teaching procedure]
Next, an example of a procedure for offline teaching by a user will be described with reference to FIG. 12. FIG. 12 is a flowchart illustrating an example of an offline teaching procedure.

まず、ステップS201において、ユーザは、画像測定機1の機種、対物レンズの種類等を選択する。演算装置22´は、選択された画像測定機1及び対物レンズに対応する画像測定機1の三次元モデル1Aを生成する。また、演算装置22´は、上記ウィンドウW1に、生成された三次元モデル1Aの画像を表示させる。 First, in step S201, the user selects the model of the image measuring device 1, the type of objective lens, etc. The arithmetic device 22' generates a three-dimensional model 1A of the image measuring device 1 corresponding to the selected image measuring device 1 and objective lens. Further, the arithmetic device 22' causes the window W1 to display the generated image of the three-dimensional model 1A.

次に、ステップS202において、ユーザは、ワーク10のCADデータを選択する。演算装置22´は、選択されたCADデータに対応するワーク10の三次元モデル10Aを生成する。また、演算装置22´は、上記ウィンドウW1に、生成された三次元モデル10Aの画像を表示させる。 Next, in step S202, the user selects CAD data of the work 10. The arithmetic device 22' generates a three-dimensional model 10A of the workpiece 10 corresponding to the selected CAD data. Further, the arithmetic device 22' causes the window W1 to display the generated image of the three-dimensional model 10A.

次に、ステップS203において、ユーザは、ワーク10の下面、側面又は上面のいずれかを、底面(試料台11の上面との接触面)として指定する。ワーク10の底面が指定されると、演算装置22´は、この底面に対応する平面要素10a,10b,10c(図9)のいずれかが試料台11の上面を示す平面要素と接する様に、仮想ワーク位置及び仮想ワーク角度を調整する。 Next, in step S203, the user designates either the lower surface, the side surface, or the upper surface of the workpiece 10 as the bottom surface (the surface in contact with the upper surface of the sample stage 11). When the bottom surface of the workpiece 10 is specified, the calculation device 22' calculates the shape so that one of the planar elements 10a, 10b, 10c (FIG. 9) corresponding to this bottom surface contacts the planar element indicating the top surface of the sample stage 11. Adjust the virtual work position and virtual work angle.

次に、ステップS204において、ユーザは、仮想ワーク位置及び仮想ワーク角度を調整する。例えばユーザは、ワーク10の三次元モデル10Aの移動方向又は回転方向に応じて、マニュピレータI13に含まれる第1画像I13a、第2画像I13b又は第3画像I13cをクリック等の操作によって選択する。次にユーザは、仮想空間画像I1上において三次元モデル10Aに対してドラッグ等の操作を行い、これによって仮想ワーク位置及び仮想ワーク角度を調整する。 Next, in step S204, the user adjusts the virtual work position and virtual work angle. For example, the user selects the image by clicking on the first image I13a, the second image I13b, or the third image I13c included in the manipulator I13, depending on the movement direction or rotation direction of the three-dimensional model 10A of the workpiece 10. Next, the user performs an operation such as dragging on the three-dimensional model 10A on the virtual space image I1, thereby adjusting the virtual work position and virtual work angle.

次に、ステップS205において、ユーザは、測定箇所の選択を行う。例えばユーザは、図7AのパレットP1に含まれる複数の幾何要素選択ボタンp1のうち、測定箇所に対応する1つの幾何要素選択ボタンp1をクリック等の操作によって選択する。次にユーザは、マウス等の入力装置23´を操作して、仮想空間画像I1上においてマウスポインタを測定箇所の近傍まで移動させる。これに伴い、仮想空間画像I1において、測定箇所に対応する幾何要素がハイライト等によって強調表示される。ユーザは、この状態でクリック等の操作を行うことにより、この幾何要素を測定箇所に対応する幾何要素として選択する。選択された幾何要素は、例えば、上述のウィンドウW3の測定箇所のリストに追加される。ユーザは、図7AのウィンドウW3を確認して、必要な測定箇所が全て選択されたか否かを確認し、同様の手段によって順次測定箇所の選択を行い、測定箇所に対応する幾何要素のリストを生成する。 Next, in step S205, the user selects a measurement location. For example, the user selects one geometric element selection button p1 corresponding to the measurement location from among the plurality of geometric element selection buttons p1 included in the palette P1 in FIG. 7A. Next, the user operates the input device 23' such as a mouse to move the mouse pointer on the virtual space image I1 to the vicinity of the measurement location. Accordingly, in the virtual space image I1, the geometric element corresponding to the measurement location is highlighted or otherwise highlighted. The user selects this geometric element as the geometric element corresponding to the measurement location by performing an operation such as clicking in this state. The selected geometric element is, for example, added to the list of measurement points in the above-mentioned window W3. The user checks the window W3 in FIG. 7A to check whether all the necessary measurement points have been selected, and then sequentially selects the measurement points using the same method and displays the list of geometric elements corresponding to the measurement points. generate.

次に、ステップS206において、ユーザは、照明等の測定条件を設定する。照明条件の設定に際しては、例えば、上述のパレットP2等が使用される。ユーザによって照明条件の設定が行われると、上記ウィンドウW1,W2に表示される仮想空間画像I1及び仮想カメラ画像I2において、ワーク10の三次元モデル10Aに含まれる複数の幾何要素の表示色が変化する。従って、ユーザは、仮想空間画像I1及び仮想カメラ画像I2を参照しつつ照明条件を調整することが出来る。 Next, in step S206, the user sets measurement conditions such as illumination. When setting the illumination conditions, for example, the above-mentioned palette P2 is used. When the lighting conditions are set by the user, the display colors of the plurality of geometric elements included in the three-dimensional model 10A of the workpiece 10 change in the virtual space image I1 and virtual camera image I2 displayed in the windows W1 and W2. do. Therefore, the user can adjust the lighting conditions while referring to the virtual space image I1 and the virtual camera image I2.

次に、ステップS207において、ユーザは、自動測定のシミュレーションを実行する。例えば、上記シミュレーションボタンB2のクリック等を行う。これに伴い、演算装置22´は、シミュレーション動画生成プログラムを実行する。 Next, in step S207, the user executes a simulation of automatic measurement. For example, the above-mentioned simulation button B2 is clicked. Along with this, the arithmetic device 22' executes the simulation video generation program.

次に、ステップS208において、ユーザは、生成されたパートプログラムが適切か否か判断する。例えば、シミュレーション動画を参照して、十分な数の測定点(例えば、図4のエッジ点e)が取得出来るかどうか、測定箇所が適切かどうか、測定に際して十分な光量が得られるかどうか、及び、画像測定機1の三次元モデル1Aの一部(例えばリングライト14の三次元モデル14A)等がワーク10の三次元モデル10Aと干渉していないか、等を判断する。生成したパートプログラムが適切でない場合には、例えばステップS209に進む。生成したパートプログラムが適切であった場合には、ステップS210に進む。 Next, in step S208, the user determines whether the generated part program is appropriate. For example, by referring to the simulation video, you can check whether a sufficient number of measurement points (for example, edge point e in Figure 4) can be obtained, whether the measurement points are appropriate, whether a sufficient amount of light can be obtained during measurement, and so on. , it is determined whether a part of the three-dimensional model 1A of the image measuring device 1 (for example, the three-dimensional model 14A of the ring light 14), etc. is interfering with the three-dimensional model 10A of the workpiece 10. If the generated part program is not appropriate, the process advances to step S209, for example. If the generated part program is appropriate, the process advances to step S210.

次に、ステップS209において、ユーザは、生成されたパートプログラムの編集を行う。例えばユーザは、十分な数の測定点が取得出来ないと判断した場合、上記ウィンドウW2(図7A)上等において、エッジ検出ツールtの種類、位置、角度、大きさ等を調整することが出来る。また、例えばユーザは、測定箇所が適切でないと判断した場合、上記ウィンドウW1,W2(図7A)上等において、測定箇所を修正することが出来る。また、例えばユーザは、測定に際して十分な光量が得られないと判断した場合、上記パレットP2(図7A)等を利用して、照明条件を調整することが出来る。また、例えばユーザは、画像測定機1の三次元モデル1Aの一部等がワーク10の三次元モデル10Aと干渉していると判断した場合には、上記ウィンドウW1上等において、カメラ13等の移動経路を編集することが出来る。尚、移動経路の編集等には、例えば、対物レンズの合焦位置が移動する軌跡を示す表示20Aを利用することが出来る。 Next, in step S209, the user edits the generated part program. For example, if the user determines that a sufficient number of measurement points cannot be acquired, the user can adjust the type, position, angle, size, etc. of the edge detection tool t on the top of the window W2 (FIG. 7A). . For example, if the user determines that the measurement location is not appropriate, he or she can modify the measurement location on the windows W1, W2 (FIG. 7A), etc. Further, for example, if the user determines that a sufficient amount of light cannot be obtained during measurement, the user can adjust the illumination conditions using the palette P2 (FIG. 7A) or the like. For example, if the user determines that a part of the three-dimensional model 1A of the image measuring instrument 1 is interfering with the three-dimensional model 10A of the workpiece 10, the user may You can edit your travel route. In addition, for example, the display 20A showing the locus of movement of the focal position of the objective lens can be used to edit the movement path.

次に、ステップS210において、ユーザは、生成されたパートプログラムを出力する。例えば、上記測定実行ボタンB1のクリック等を行う。これに伴い、演算装置22´は、生成されたパートプログラムを出力する。出力されたパートプログラムは、例えば、図3を参照して説明した自動測定処理に使用することが出来る。 Next, in step S210, the user outputs the generated part program. For example, the user clicks the measurement execution button B1. Along with this, the arithmetic device 22' outputs the generated part program. The output part program can be used, for example, in the automatic measurement process described with reference to FIG.

尚、図12のフローチャートは説明のための模式的なものであり、具体的な態様等は適宜調整することが出来る。例えば、ステップS208において生成したパートプログラムが適切でない場合には、画像測定機1に使用する対物レンズを交換することも出来る。 Note that the flowchart in FIG. 12 is a schematic diagram for explanation, and specific aspects can be adjusted as appropriate. For example, if the part program generated in step S208 is not appropriate, the objective lens used in the image measuring device 1 can be replaced.

[パートプログラム自動生成プログラム]
次に、図13を参照して、パートプログラム自動生成プログラムの一例について説明する。図13は、パートプログラム自動生成プログラムの一例を示すフローチャートである。
[Part program automatic generation program]
Next, an example of a part program automatic generation program will be described with reference to FIG. FIG. 13 is a flowchart showing an example of a part program automatic generation program.

ステップS301では、ウィンドウW3の測定箇所のリストから、一の幾何要素が選択される。 In step S301, one geometric element is selected from the list of measurement locations in window W3.

ステップS302では、選択された幾何要素の種類、位置及び大きさ等に基づいて、撮像位置、並びに、エッジ検出ツールの種類、大きさ、位置及び角度等が設定される。この工程においては、例えば、カメラ13によって取得される画像に複数の測定箇所が収まる様に、撮像位置を設定することも出来る。また、例えば、測定箇所がカメラ13によって取得される画像に収まりきらない大きさである場合には、この様な測定箇所に対応して撮像位置を複数設定することも出来る。撮像位置、並びに、エッジ検出ツールの種類、大きさ、位置及び角度等は、パートプログラムの一部として、パートプログラム保持部G11(図11)に保持される。 In step S302, the imaging position and the type, size, position, angle, etc. of the edge detection tool are set based on the type, position, size, etc. of the selected geometric element. In this step, for example, the imaging position can be set so that a plurality of measurement points are included in the image acquired by the camera 13. Furthermore, for example, if the measurement location is too large to fit in the image captured by the camera 13, a plurality of imaging positions can be set corresponding to such measurement locations. The imaging position and the type, size, position, angle, etc. of the edge detection tool are held in the part program holding unit G11 (FIG. 11) as part of the part program.

ステップS303では、ウィンドウW3に対応する測定箇所のリストに含まれる全ての幾何要素が選択されたか否かを判定する。この工程においては、例えば、ステップS301において選択されていない幾何要素であっても、ステップS302において設定された撮像範囲に含まれている幾何要素であれば、選択済の幾何要素として判断することが出来る。全ての幾何要素が選択されていなかった場合には、ステップS301に戻る。全ての幾何要素が選択されていた場合には、パートプログラム自動生成プログラムを終了する。 In step S303, it is determined whether all the geometric elements included in the list of measurement points corresponding to window W3 have been selected. In this step, for example, even if a geometric element is not selected in step S301, if it is included in the imaging range set in step S302, it may be determined as a selected geometric element. I can do it. If all geometric elements have not been selected, the process returns to step S301. If all geometric elements have been selected, the part program automatic generation program is ended.

[シミュレーション動画生成プログラム]
次に、図14を参照して、シミュレーション動画生成プログラムの一例について説明する。図14は、シミュレーション動画生成プログラムの一例を示すフローチャートである。
[Simulation video generation program]
Next, an example of a simulation video generation program will be described with reference to FIG. 14. FIG. 14 is a flowchart illustrating an example of a simulation video generation program.

ステップS401では、パートプログラム自動生成プログラムが実行され、パートプログラムが生成される。 In step S401, a part program automatic generation program is executed to generate a part program.

ステップS402では、変数Kが1に設定される。 In step S402, variable K is set to 1.

ステップS403では、パートプログラムに含まれる複数の撮像位置のうちのK番目の撮像位置及びK+1番目の撮像位置が取得される。 In step S403, the K-th imaging position and the K+1-th imaging position among the plurality of imaging positions included in the part program are acquired.

ステップS404では、変数Lが0に設定される。 In step S404, variable L is set to 0.

ステップS405では、第1仮想カメラ位置がK番目の撮像位置に到達してから単位時間×L経過後の第1仮想カメラ位置が取得される。 In step S405, the first virtual camera position is acquired after a unit time x L has elapsed since the first virtual camera position reached the K-th imaging position.

ステップS406では、ステップS405において取得された第1仮想カメラ位置に対応する画像測定機1の三次元モデル1A及びワーク10の三次元モデル10Aが生成される。即ち、第1仮想カメラ位置のY座標の成分に応じて、ワーク10及び試料台11の三次元モデル10A,11Aの仮想空間におけるY座標の位置が調整される。また、第1仮想カメラ位置のZ座標の成分に応じて、カメラ13及びリングライト14の三次元モデル13A,14A、並びに、対物レンズの合焦位置を示す三次元モデル19Aの仮想空間におけるZ座標の位置が調整される。また、第1仮想カメラ位置のX座標の成分に応じて、カメラ13、リングライト14及びZ軸駆動機構15のX座標、並びに、対物レンズの合焦位置を示す三次元モデル19Aの仮想空間におけるX座標の位置が調整される。 In step S406, the three-dimensional model 1A of the image measuring device 1 and the three-dimensional model 10A of the workpiece 10 corresponding to the first virtual camera position acquired in step S405 are generated. That is, the Y-coordinate positions of the three-dimensional models 10A and 11A of the workpiece 10 and sample stage 11 in the virtual space are adjusted according to the Y-coordinate component of the first virtual camera position. Also, depending on the component of the Z coordinate of the first virtual camera position, the Z coordinate in the virtual space of the three-dimensional models 13A, 14A of the camera 13 and the ring light 14, and the three-dimensional model 19A indicating the focused position of the objective lens is determined. The position is adjusted. Also, depending on the X coordinate component of the first virtual camera position, the X coordinate of the camera 13, the ring light 14, and the Z-axis drive mechanism 15, and the X coordinate in the virtual space of the three-dimensional model 19A indicating the focal position of the objective lens are The coordinate position is adjusted.

ステップS407では、生成された三次元モデル1A,10Aに対応して、仮想空間画像I1及び仮想カメラ画像I2が生成される。仮想空間画像I1は、例えば、ステップS406において生成された三次元モデル、並びに、第2仮想カメラ位置及び第2仮想カメラ角度に基づいて生成される。また、仮想空間画像I1には、対物レンズの合焦位置が移動する軌跡を示す表示20Aが表示される。仮想カメラ画像I2は、例えば、ステップS406において生成された三次元モデルに基づいて生成される。尚、仮想カメラ画像I2には、自動測定に際して使用されるエッジ検出ツールを表示することが出来る。 In step S407, a virtual space image I1 and a virtual camera image I2 are generated corresponding to the generated three-dimensional models 1A and 10A. The virtual space image I1 is generated, for example, based on the three-dimensional model generated in step S406, the second virtual camera position, and the second virtual camera angle. Furthermore, a display 20A indicating a locus of movement of the focal position of the objective lens is displayed in the virtual space image I1. The virtual camera image I2 is generated, for example, based on the three-dimensional model generated in step S406. Note that an edge detection tool used for automatic measurement can be displayed on the virtual camera image I2.

ステップS408では、撮像位置がK+1番目の撮像位置に到達したか否かが判定される。撮像位置がK+1番目の撮像位置に到達していなかった場合には、ステップS409に進む。撮像位置がK+1番目の撮像位置に到達していた場合には、ステップS410に進む。 In step S408, it is determined whether the imaging position has reached the K+1st imaging position. If the imaging position has not reached the K+1st imaging position, the process advances to step S409. If the imaging position has reached the K+1st imaging position, the process advances to step S410.

ステップS409では、変数Lに1が加算され、処理はステップS405に戻る。 In step S409, 1 is added to variable L, and the process returns to step S405.

ステップS410では、全ての撮像位置が選択されたか否かが判定される。全ての撮像位置が選択されていなかった場合にはステップS411に進む。全ての撮像位置が選択されていた場合にはステップS412に進む。 In step S410, it is determined whether all imaging positions have been selected. If all imaging positions have not been selected, the process advances to step S411. If all imaging positions have been selected, the process advances to step S412.

ステップS411では、変数Kに1が加算され、処理はステップS403に戻る。 In step S411, 1 is added to variable K, and the process returns to step S403.

ステップS412では、出力された複数の仮想空間画像I1及び仮想カメラ画像I2が、ウィンドウW1,W2において動画として再生される。 In step S412, the plurality of output virtual space images I1 and virtual camera images I2 are played back as moving images in windows W1 and W2.

[効果]
従来のオフラインティーチングでは、例えば、ワークのCADデータに基づいて仮想空間にワークのCADモデルを配置し、このCADモデルの画像をディスプレイ等に表示させる場合がある。この様な場合、ユーザは、このCADモデルの画像に基づいて測定箇所を指定する場合がある。この様な方法によれば、測定箇所を容易に指定することが出来る。
[effect]
In conventional offline teaching, for example, a CAD model of a workpiece is placed in a virtual space based on CAD data of the workpiece, and an image of this CAD model is sometimes displayed on a display or the like. In such a case, the user may specify a measurement location based on the image of this CAD model. According to such a method, the measurement location can be easily specified.

しかしながら、この様なオフラインティーチングプログラムでは、生成されたパートプログラムの適否を十分に判断することが難しい場合があった。例えば、測定に際してカメラとワークとが干渉しないかどうか等を直感的に判断することが難しい場合があった。 However, in such an offline teaching program, it is sometimes difficult to sufficiently judge the suitability of the generated part program. For example, it may be difficult to intuitively determine whether or not there will be interference between the camera and the work during measurement.

そこで、本実施形態に係るオフラインティーチングプログラムでは、生成したパートプログラムに基づく自動測定のシミュレーションを実行する。また、自動測定のシミュレーションに際しては、上記ウィンドウW1において、画像測定機1の三次元モデル1A及びワーク10の三次元モデル10Aを示す仮想空間画像I1の動画を再生し、上記ウィンドウW2において、カメラ13によって撮像されるワーク10のカメラ画像に対応する仮想カメラ画像I2の動画を再生する。 Therefore, in the offline teaching program according to the present embodiment, a simulation of automatic measurement is executed based on the generated part program. Further, when simulating automatic measurement, a video of the virtual space image I1 showing the three-dimensional model 1A of the vision measuring machine 1 and the three-dimensional model 10A of the work 10 is played in the window W1, and the camera 13 is played in the window W2. A moving image of the virtual camera image I2 corresponding to the camera image of the workpiece 10 captured by is played back.

この様な構成によれば、上記ウィンドウW1において再生される仮想空間画像I1の動画によって画像測定機1の各構成(例えばリングライト14等)及びワーク10の位置関係を把握することが出来、上記ウィンドウW2において再生される仮想カメラ画像I2の動画によってカメラ13から出力される画像データを把握することが出来る。従って、ユーザは、実際のワーク10及び画像測定機1を視認することが出来ない環境においても、生成されたパートプログラムの適否を好適に判断することが出来る。例えば、生成されたパートプログラムに基づいて自動測定を行った場合に、画像測定機1とワーク10との干渉を避けつつ、好適な測定が実行されるか否かを、直感的に判断することが出来る。 According to such a configuration, it is possible to grasp the positional relationship between each component of the image measuring device 1 (for example, the ring light 14, etc.) and the workpiece 10 by the moving image of the virtual space image I1 played in the window W1, and The image data output from the camera 13 can be grasped by the moving image of the virtual camera image I2 reproduced in W2. Therefore, even in an environment where the user cannot visually confirm the actual workpiece 10 and the image measuring device 1, the user can suitably judge the suitability of the generated part program. For example, when automatic measurement is performed based on a generated part program, it is possible to intuitively judge whether or not a suitable measurement can be performed while avoiding interference between the vision measuring device 1 and the workpiece 10. I can do it.

また、本実施形態に係るオフラインティーチングプログラムでは、画像測定機1の三次元モデル1Aが、対物レンズの合焦位置を示す円錐状の三次元モデル19Aを含んでいる。この様な構成によれば、ユーザは、ワーク10の三次元モデル10Aと円錐状の三次元モデル19Aとの関係をウィンドウW1等において視認することにより、適切な第1仮想カメラ位置を直感的に判断することが出来る。また、適切な対物レンズが選択されているか否かを、直感的に判断することが出来る。また、例えば深い穴の底面等を測定する場合に、十分な光量が得られるかどうかを直感的に判断することが出来る。 Furthermore, in the offline teaching program according to the present embodiment, the three-dimensional model 1A of the image measuring device 1 includes a conical three-dimensional model 19A that indicates the focal position of the objective lens. According to such a configuration, the user can intuitively determine the appropriate first virtual camera position by visually checking the relationship between the three-dimensional model 10A of the workpiece 10 and the conical three-dimensional model 19A in the window W1, etc. I can judge. Furthermore, it is possible to intuitively judge whether or not an appropriate objective lens has been selected. Furthermore, when measuring the bottom of a deep hole, for example, it is possible to intuitively judge whether or not a sufficient amount of light can be obtained.

また、本実施形態に係るオフラインティーチングプログラムにおいては、上記シミュレーションの動画を構成する仮想空間画像I1が、対物レンズの合焦位置が移動する軌跡を示す表示20Aを含む。この様な構成によれば、ユーザは、ワーク10と画像測定機1の一部(例えば、カメラ13及びリングライト14等)との位置関係が自動測定に際してどの様に推移するかを一見して把握することが出来、画像測定機1の三次元モデル1Aの一部がワーク10の三次元モデル10Aと干渉しないか、等を容易に判断することが出来る。 Further, in the offline teaching program according to the present embodiment, the virtual space image I1 that constitutes the moving image of the simulation includes a display 20A showing a trajectory along which the focal position of the objective lens moves. According to such a configuration, the user can grasp at a glance how the positional relationship between the work 10 and a part of the image measuring device 1 (for example, the camera 13 and the ring light 14, etc.) changes during automatic measurement. Therefore, it is possible to easily determine whether or not a part of the three-dimensional model 1A of the image measuring device 1 will interfere with the three-dimensional model 10A of the workpiece 10.

また、従来のオフラインティーチングでは、仮想空間におけるワークのCADモデルの位置及び角度の調整に際して、ワークのCADモデルの座標データをキーボード等の入力手段によって直接入力しており、調整に手間がかかっていた。マウス等の入力手段によって調整を行うことも考えられるが、例えばワークのCADモデルを一方向にのみ動かしたい場合等に、その様な操作が難しい場合があった。 In addition, in conventional offline teaching, when adjusting the position and angle of the CAD model of the workpiece in virtual space, the coordinate data of the CAD model of the workpiece is directly input using input means such as a keyboard, which takes time and effort. . Although it is conceivable to make adjustments using an input means such as a mouse, such an operation may be difficult, for example, when it is desired to move a CAD model of a workpiece in only one direction.

そこで、本実施形態に係るオフラインティーチングプログラムは、ワーク10の三次元モデル10A(図7A)の仮想空間における移動方向又は回転軸を指定し、入力装置23´(図5)による操作に基づいて、ワーク10の三次元モデル10Aの仮想空間における位置を指定された移動方向に沿って調整し、又は、ワーク10の三次元モデル10Aの仮想空間における角度を指定された回転軸に沿って調整するワーク位置調整部G7(図11)を備える。 Therefore, the offline teaching program according to the present embodiment specifies the movement direction or rotation axis of the three-dimensional model 10A (FIG. 7A) of the workpiece 10 in the virtual space, and based on the operation using the input device 23' (FIG. 5), A workpiece in which the position of the three-dimensional model 10A of the workpiece 10 in the virtual space is adjusted along a specified movement direction, or the angle of the three-dimensional model 10A of the workpiece 10 in the virtual space is adjusted along a specified rotation axis. A position adjustment section G7 (FIG. 11) is provided.

この様な構成によれば、マウス等の入力装置によっても、三次元モデル10Aの仮想空間における位置及び角度を、容易且つ直感的に調整することが出来る。また、例えば、マウス等の二次元の入力操作によって三次元モデル10Aの三次元座標を調整する場合には、二次元の入力操作を仮想空間における三次元の入力操作に変換して、三次元モデル10Aの位置及び角度を容易に調整することが出来る。 According to such a configuration, the position and angle of the three-dimensional model 10A in the virtual space can be adjusted easily and intuitively using an input device such as a mouse. For example, when adjusting the three-dimensional coordinates of the three-dimensional model 10A using a two-dimensional input operation such as a mouse, the two-dimensional input operation is converted into a three-dimensional input operation in virtual space, and the three-dimensional model 10A is The position and angle of 10A can be easily adjusted.

また、例えば本実施形態の様に、ワーク10の三次元モデル10Aの位置及び角度を三次元の仮想空間において調整する場合、ワーク10の三次元モデル10Aの高さ位置や試料台11の三次元モデル11Aとの接触面の角度などを正確に設定しないと、測定精度に影響を及ぼしてしまう可能性がある。しかしながら、ユーザがこの様な調整を実行する場合、調整に時間がかかってしまう場合がある。 For example, when adjusting the position and angle of the three-dimensional model 10A of the work 10 in a three-dimensional virtual space as in the present embodiment, the height position of the three-dimensional model 10A of the work 10 and the three-dimensional If the angle of the contact surface with the model 11A is not set accurately, measurement accuracy may be affected. However, when a user performs such an adjustment, the adjustment may take time.

そこで、本実施形態に係るオフラインティーチングプログラムは、ワーク10の三次元モデル10A(図7A)の試料台11(図1)との接触部を示す部分(例えば、上記底面)を指定し、この指定された部分が画像測定機1の三次元モデル1A(図7A)の試料台11の上面を示す面要素と接触する様に、ワーク10の三次元モデル10Aの仮想空間における位置及び角度を調整するワーク位置調整部G7(図11)を備える。 Therefore, the offline teaching program according to the present embodiment specifies the part (for example, the bottom surface) that indicates the contact part with the sample stage 11 (FIG. 1) of the three-dimensional model 10A (FIG. 7A) of the workpiece 10, and The position and angle in the virtual space of the three-dimensional model 10A of the workpiece 10 are adjusted so that the portion that has been A workpiece position adjustment section G7 (FIG. 11) is provided.

この様な構成によれば、ユーザによる厳密な位置合わせの手間を省略して、ワーク10の三次元モデル10Aの位置及び角度を容易に調整することが出来る。 According to such a configuration, the position and angle of the three-dimensional model 10A of the workpiece 10 can be easily adjusted without requiring the user to perform precise positioning.

[その他の実施形態]
以上、第1実施形態に係るオフラインティーチングプログラム等について説明した。しかしながら、以上の説明はあくまでも例示に過ぎず、具体的な構成は適宜変更することが出来る。
[Other embodiments]
The offline teaching program and the like according to the first embodiment have been described above. However, the above description is merely an example, and the specific configuration can be changed as appropriate.

[画像測定機1]
上述の例では、画像測定機1(図1)として、試料台11が撮像位置に応じてY方向に移動する様に構成されたものを例示した。しかしながら、上記オフラインティーチングプログラムでは、種々の画像測定装置を取り扱うことが出来る。例えば、試料台11のかわりに、カメラ13、リングライト14、Z軸駆動機構15、X軸駆動機構16及びアーム支持体17がY方向に移動する様に構成された画像想定装置を取り扱うことも出来る。また、ロボットアーム等を備える画像測定装置を取り扱うことも出来る。尚、ロボットアーム等を備える画像測定装置は、例えば、複数のアーム部と、これら複数のアーム部のうちの少なくとも2つを連結する複数の関節部と、複数のアーム部のうちの一つに接続されたカメラと、を備える。また、各関節部は、例えば、駆動用のモータ、及び、位置検出用のロータリエンコーダ等を備える。
[Image measuring device 1]
In the above example, the image measuring device 1 (FIG. 1) is configured such that the sample stage 11 moves in the Y direction depending on the imaging position. However, the offline teaching program described above can handle various image measurement devices. For example, instead of the sample stage 11, it is also possible to handle an image imagining device in which a camera 13, a ring light 14, a Z-axis drive mechanism 15, an X-axis drive mechanism 16, and an arm support 17 are configured to move in the Y direction. . Furthermore, it is also possible to handle image measuring devices equipped with robot arms and the like. Note that an image measuring device including a robot arm or the like includes, for example, a plurality of arm sections, a plurality of joint sections connecting at least two of the plurality of arm sections, and one of the plurality of arm sections. and a connected camera. Furthermore, each joint includes, for example, a driving motor, a rotary encoder for position detection, and the like.

[表示装置21及び入力装置23]
上述の例では、表示装置21としてディスプレイを例示し、入力装置23としてマウス等の二次元操作を行う装置を例示した。しかしながら、この様な構成は適宜変更することが出来る。例えば、表示装置21として三次元画像を表示可能なヘッドマウントディスプレイ等の構成を使用し、入力装置23として三次元操作を行う構成を使用することが出来る。
[Display device 21 and input device 23]
In the above example, a display is used as the display device 21, and a device that performs two-dimensional operations such as a mouse is used as the input device 23. However, such a configuration can be modified as appropriate. For example, a configuration such as a head mounted display capable of displaying a three-dimensional image can be used as the display device 21, and a configuration that performs three-dimensional operations can be used as the input device 23.

[対物レンズの合焦位置を示す三次元モデル19A]
上述の例では、対物レンズの合焦位置を示す三次元モデル19Aが、円錐状の形状を有していた。しかしながら、三次元モデル19Aの形状は適宜調整可能である。例えば三次元モデル19Aには、対物レンズの光軸を示す直線を含ませることも出来る。また、例えば三次元モデル19Aには、カメラ13の視野範囲に対応する矩形状の平面要素を含ませることも出来る。この様な平面要素は、例えば、円錐状の三次元モデル19Aの頂点と接する平面とすることも出来るし、円錐状の三次元モデル19Aの中心軸と垂直な平面とすることも出来る。また、三次元モデル19Aには、円錐要素に変えて、三角錐の幾何要素、四角錐の幾何要素又はその他多角錐の幾何要素を含ませることも出来る。
[Three-dimensional model 19A showing the focus position of the objective lens]
In the above example, the three-dimensional model 19A indicating the focal position of the objective lens had a conical shape. However, the shape of the three-dimensional model 19A can be adjusted as appropriate. For example, the three-dimensional model 19A may include a straight line indicating the optical axis of the objective lens. Further, for example, the three-dimensional model 19A may include a rectangular planar element corresponding to the viewing range of the camera 13. Such a plane element can be, for example, a plane that is in contact with the vertex of the conical three-dimensional model 19A, or a plane that is perpendicular to the central axis of the conical three-dimensional model 19A. Further, the three-dimensional model 19A may include a triangular pyramidal geometric element, a quadrangular pyramidal geometrical element, or another polygonal pyramidal geometrical element instead of the conical element.

[ワーク10及び試料台11の関係]
上述の例では、ワーク10を直接試料台11上に載置していた。しかしながら、例えば、試料台11上に治具を載置し、この治具によってワーク10を支持し、治具によって保持されたワーク10を測定することも出来る。
[Relationship between workpiece 10 and sample stage 11]
In the above example, the workpiece 10 was placed directly on the sample stage 11. However, for example, it is also possible to place a jig on the sample stage 11, support the workpiece 10 with this jig, and measure the workpiece 10 held by the jig.

この様な測定を想定してパートプログラムを生成するためには、例えば、治具の大きさ及び形状を考慮してワーク10の三次元モデル10Aを宙に浮かせた状態でパートプログラムを生成することも出来る。また、例えば、治具のCADデータを取り込んで治具の三次元モデルを生成し、この治具の三次元モデルを使用してワーク10の三次元モデル10Aの位置を調整し、この状態でパートプログラムを生成することも出来る。また、例えば、治具及びこの治具によって支持されたワークの三次元モデルを生成し、この三次元モデルをワークの三次元モデルとしてパートプログラムを生成することも出来る。 In order to generate a part program assuming such a measurement, for example, it is necessary to generate the part program with the three-dimensional model 10A of the workpiece 10 suspended in the air, taking into account the size and shape of the jig. You can also do it. Also, for example, the 3D model of the jig is generated by importing the CAD data of the jig, the position of the 3D model 10A of the workpiece 10 is adjusted using the 3D model of the jig, and the part is placed in this state. You can also generate programs. Furthermore, for example, it is also possible to generate a three-dimensional model of a jig and a workpiece supported by the jig, and to generate a part program using this three-dimensional model as the three-dimensional model of the workpiece.

ワーク10の三次元モデル10Aを宙に浮かせた状態でパートプログラムを生成する場合、例えば、ワーク位置調整部G7の底面を指定する機能を無効とすることも出来る。この様な方法によれば、治具のCADデータ等を使用することなく、パートプログラムを生成することが出来る。 When a part program is generated with the three-dimensional model 10A of the workpiece 10 floating in the air, for example, the function of specifying the bottom surface of the workpiece position adjustment section G7 can be disabled. According to such a method, a part program can be generated without using CAD data of a jig or the like.

治具のCADデータを取り込んで治具の三次元モデルを生成する場合、例えば、ワーク位置調整部G7により、治具の三次元モデルを構成する複数の幾何要素から、底面、及び、ワーク10の三次元モデル10Aとの接触部を指定することが出来る。また、ワーク10の三次元モデル10Aを構成する複数の幾何要素から、治具の三次元モデルとの接触部を指定することも出来る。尚、治具の三次元モデルの位置調整は、上述のワーク10の三次元モデル10Aと同様の態様で、マニュピレータI13等を使用して行うことも出来る。 When generating a three-dimensional model of the jig by importing CAD data of the jig, for example, the workpiece position adjustment unit G7 calculates the bottom surface and the shape of the workpiece 10 from a plurality of geometric elements that constitute the three-dimensional model of the jig. It is possible to specify the contact portion with the three-dimensional model 10A. Furthermore, it is also possible to specify the contact portion of the jig with the three-dimensional model from a plurality of geometric elements constituting the three-dimensional model 10A of the workpiece 10. Note that the position adjustment of the three-dimensional model of the jig can also be performed using the manipulator I13 or the like in the same manner as the three-dimensional model 10A of the work 10 described above.

また、上述の例では、ワーク10又は治具が試料台11上に載置された際、ワーク10又は治具に含まれる平面が試料台11の上面に接する例について説明した。しかしながら、ワーク10又は治具の試料台11との接触部は、平面要素以外の部分とすることも出来る。例えば、ワーク10又は治具が、曲面状又は球面状の複数の脚部を備える場合、ワーク位置調整部G7は、例えば、ワーク10又は治具に含まれる複数の脚部と接する平面を仮定し、この平面を底面として指定することが出来る。 Furthermore, in the above example, when the workpiece 10 or the jig is placed on the sample stage 11, a plane included in the workpiece 10 or the jig comes into contact with the upper surface of the sample stage 11. However, the contact portion of the workpiece 10 or the jig with the sample stage 11 may be a portion other than the planar element. For example, when the workpiece 10 or the jig includes a plurality of curved or spherical legs, the workpiece position adjustment section G7 assumes a plane that is in contact with the plurality of legs included in the workpiece 10 or the jig. , this plane can be designated as the bottom surface.

[パートプログラム自動生成プログラム]
上述の例では、図7AのウィンドウW3に表示された測定箇所のリストに表示された幾何要素が、ユーザによって選択された順に順次選択され、この順番で撮像位置が移動するように、パートプログラムが生成されていた。しかしながら、例えば上述のパートプログラム自動生成プログラムは、最も効率的な測定が可能となる様に、撮像位置の順番を入れ替えることも出来る。例えば、全ての撮像位置を通り且つ移動距離の合計が最小となる様な、又は、自動測定に要する時間が最小となるような撮像位置の順番を算出し、この順番に従って撮像位置の順番を入れ替えることも出来る。
[Part program automatic generation program]
In the above example, the part program is configured such that the geometric elements displayed in the list of measurement points displayed in window W3 in FIG. 7A are sequentially selected in the order in which they were selected by the user, and the imaging positions are moved in this order. It was being generated. However, for example, the part program automatic generation program described above can also change the order of the imaging positions so that the most efficient measurement can be performed. For example, calculate the order of imaging positions that passes through all imaging positions and minimizes the total movement distance, or minimizes the time required for automatic measurement, and then rearranges the imaging positions according to this order. You can also do that.

[シミュレーション]
上述の例では、図14のステップS401~S411が全て終了した後で、ステップS412において動画の再生を行っていた。しかしながら、この様な方法は例示に過ぎず、具体的な方法は適宜調整することが出来る。例えば、ステップS401~S411の動作(仮想空間画像I1及び仮想カメラ画像I2の生成)とステップS412の動作(動画の再生)とは並行して実行することも出来る。
[simulation]
In the above example, after steps S401 to S411 in FIG. 14 are all completed, the moving image is played back in step S412. However, such a method is merely an example, and the specific method can be adjusted as appropriate. For example, the operations in steps S401 to S411 (generation of virtual space image I1 and virtual camera image I2) and the operation in step S412 (playback of moving image) can be executed in parallel.

また、シミュレーション動画の生成に際しては、例えば、生成されたパートプログラムに基づいて自動測定を行う場合に必要な時間を算出することも出来る。また、シミュレーション動画の再生は、早送り、スローモーション、一時停止等の操作が可能な態様で実行することも出来る。また、シミュレーション動画を一時停止した場合には、この状態で第2仮想カメラ位置を調整出来るようにすることも出来る。また、第1仮想カメラ位置が撮像位置に到達する前後のタイミングで、シミュレーション動画をスローモーションにすることも出来る。また、第1仮想カメラ位置が撮像位置に到達したタイミングで、シミュレーション動画を一時停止することも出来る。これにより、ウィンドウW2においてエッジ検出ツールtをより容易に確認することが出来る。 Furthermore, when generating a simulation video, it is also possible to calculate the time required to perform automatic measurements based on the generated part program, for example. Furthermore, the simulation video can be played back in a manner that allows operations such as fast forwarding, slow motion, and pausing. Furthermore, when the simulation video is paused, the second virtual camera position can be adjusted in this state. Furthermore, the simulation video can be made into slow motion at the timing before and after the first virtual camera position reaches the imaging position. Furthermore, the simulation video can be paused at the timing when the first virtual camera position reaches the imaging position. Thereby, the edge detection tool t can be more easily confirmed in the window W2.

[その他]
本発明のいくつかの実施形態を説明したが、これらの実施形態は例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことが出来る。これら実施形態やその変形は、発明の範囲や要旨に含まれると共に、特許請求の範囲に記載された発明とその均等の範囲に含まれる。
[others]
Although several embodiments of the invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, substitutions, and changes can be made without departing from the gist of the invention. These embodiments and their modifications are included within the scope and gist of the invention, as well as within the scope of the invention described in the claims and its equivalents.

1…画像測定機、2…コンピュータシステム、10…ワーク、11…試料台、13…カメラ、I1…仮想空間画像、I2…仮想カメラ画像、I13…マニュピレータ、W1,W2…ウィンドウ。 DESCRIPTION OF SYMBOLS 1... Image measuring machine, 2... Computer system, 10... Work, 11... Sample stand, 13... Camera, I1... Virtual space image, I2... Virtual camera image, I13... Manipulator, W1, W2... Window.

Claims (4)

ワークが載置される試料台と、
前記ワークを撮像する撮像ユニットと、
前記試料台と前記撮像ユニットの少なくとも一部との位置関係を調整する位置調整機構と
を備える画像測定装置のパートプログラムを生成するティーチングプログラムであって、
コンピュータを、
前記画像測定装置の三次元モデルと、前記画像測定装置の前記試料台に載置されたワークの三次元モデルと、前記撮像ユニットに装着された対物レンズの合焦位置を示す円錐形状の三次元モデルと、を仮想空間に生成する三次元モデル生成手段と、
前記画像測定装置の三次元モデル及び前記ワークの三次元モデルに対応する第1画像と、前記ワークの三次元モデルに対応する画像であって前記撮像ユニットによって撮像される前記ワークの画像に対応する第2画像と、を生成し、表示装置に表示させる三次元モデル画像表示手段と、
生成された前記パートプログラムに基づいて測定のシミュレーションを実行するシミュレーション実行部と
として機能させ、
前記測定のシミュレーションにおいては、前記画像測定装置の三次元モデルの前記試料台を示す部分と前記撮像ユニットの少なくとも一部を示す部分との位置関係順次調整さ、調整された位置関係に応じて前記第1画像及び前記第2画像順次生成さ、生成された前記第1画像及び前記第2画像が前記表示装置に順次表示さ
画像測定装置のティーチングプログラム。
A sample stage on which the workpiece is placed;
an imaging unit that images the work;
A teaching program that generates a part program for an image measuring device comprising: a position adjustment mechanism that adjusts a positional relationship between the sample stage and at least a portion of the imaging unit;
computer,
A three-dimensional model of the image measuring device, a three-dimensional model of the workpiece placed on the sample stage of the image measuring device, and a three-dimensional conical shape indicating the focal position of the objective lens attached to the imaging unit. a three-dimensional model generation means for generating the model in virtual space;
a first image corresponding to a three-dimensional model of the image measuring device and a three-dimensional model of the work; and an image corresponding to the three-dimensional model of the work, which corresponds to an image of the work captured by the imaging unit. a three-dimensional model image display means for generating a second image and displaying the second image on a display device;
a simulation execution unit that executes a measurement simulation based on the generated part program;
function as
In the measurement simulation, the positional relationship between a portion of the three-dimensional model of the image measuring device indicating the sample stage and a portion indicating at least a portion of the imaging unit is sequentially adjusted , and the positional relationship is adjusted according to the adjusted positional relationship. A teaching program for an image measuring device, wherein the first image and the second image are sequentially generated using the image measuring device, and the generated first image and the second image are sequentially displayed on the display device.
前記三次元モデル生成手段は、前記パートプログラムを用いて測定を行った場合に前記対物レンズの合焦位置が移動する軌跡を算出し、この軌跡を示す点列又は三次元自由曲線を前記仮想空間に生成する
請求項1記載の画像測定装置のティーチングプログラム。
The three-dimensional model generation means calculates a locus of movement of the focal position of the objective lens when measurement is performed using the part program, and converts a sequence of points or a three-dimensional free curve indicating this locus into the virtual space. A teaching program for an image measuring device according to claim 1, wherein the teaching program is generated to: .
前記コンピュータを、
前記ワークの三次元モデルに含まれる複数の幾何要素の少なくとも一つを入力装置によって選択することにより、前記幾何要素に対応する前記ワークの測定箇所を指定可能な測定箇所指定手段と、
指定された前記測定箇所に基づいてパートプログラムを生成するパートプログラム生成手段と
として機能させる請求項1又は2記載の画像測定装置のティーチングプログラム。
The computer,
Measurement point specifying means capable of specifying a measurement point of the workpiece corresponding to the geometrical element by selecting at least one of a plurality of geometrical elements included in the three-dimensional model of the workpiece using an input device;
part program generation means for generating a part program based on the specified measurement location;
A teaching program for an image measuring device according to claim 1 or 2, which is made to function as a teaching program for an image measuring device.
前記円錐形状の三次元モデル、半透明な画像として表示さ
請求項1~3のいずれか1項記載の画像測定装置のティーチングプログラム。
The teaching program for an image measuring device according to any one of claims 1 to 3, wherein the three-dimensional conical model is displayed as a translucent image.
JP2020029848A 2020-02-25 2020-02-25 Teaching program for image measurement equipment Active JP7383349B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020029848A JP7383349B2 (en) 2020-02-25 2020-02-25 Teaching program for image measurement equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020029848A JP7383349B2 (en) 2020-02-25 2020-02-25 Teaching program for image measurement equipment

Publications (2)

Publication Number Publication Date
JP2021135108A JP2021135108A (en) 2021-09-13
JP7383349B2 true JP7383349B2 (en) 2023-11-20

Family

ID=77660951

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020029848A Active JP7383349B2 (en) 2020-02-25 2020-02-25 Teaching program for image measurement equipment

Country Status (1)

Country Link
JP (1) JP7383349B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001319219A (en) 2000-05-10 2001-11-16 Mitsutoyo Corp Device and method for generating part program for image measuring apparatus, image measuring apparatus and measure result display method therefor
JP2008209194A (en) 2007-02-26 2008-09-11 Hitachi Kokusai Electric Inc Method of measuring three-dimensional shape

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001319219A (en) 2000-05-10 2001-11-16 Mitsutoyo Corp Device and method for generating part program for image measuring apparatus, image measuring apparatus and measure result display method therefor
JP2008209194A (en) 2007-02-26 2008-09-11 Hitachi Kokusai Electric Inc Method of measuring three-dimensional shape

Also Published As

Publication number Publication date
JP2021135108A (en) 2021-09-13

Similar Documents

Publication Publication Date Title
US10107618B2 (en) Coordinate measuring machine
US8406923B2 (en) Apparatus for determining pickup pose of robot arm with camera
EP2788714B2 (en) Coordinate measuring machine having a camera
US20180304467A1 (en) Control device and robot system
JP4933785B2 (en) Video tool control method for image inspection system
JP5664629B2 (en) Robot system and method of manufacturing processed product
EP1435280B1 (en) A method and a system for programming an industrial robot
US8902307B2 (en) Machine vision system editing environment for a part program in which a continuous stream of image acquisition operations are performed during a run mode
US20130278725A1 (en) Integrated Structured Light 3D Scanner
JP5525953B2 (en) Dimension measuring apparatus, dimension measuring method and program for dimension measuring apparatus
EP3875230A1 (en) External input device, robot system, control method for robot system, control program, and recording medium
JP6071452B2 (en) System and method for using editing initialization block in part program editing environment of machine vision system
JP2009175954A (en) Generating device of processing robot program
CN109648568B (en) Robot control method, system and storage medium
JP7383349B2 (en) Teaching program for image measurement equipment
JP7383350B2 (en) Teaching program for image measurement equipment
JP7120894B2 (en) 3D model creation device, machining simulation device, automatic tool path generation device
JP2004294311A (en) Picture image measuring instrument
JP3853658B2 (en) Image measuring apparatus and image measuring program
JP2937918B2 (en) Image measuring device
JP2007101229A (en) Method and system for 3-dimensional measurement and control method and device of manipulator
JP6219030B2 (en) Processing data generation device and machine tool
JP2014215153A (en) Image measuring apparatus and program for controlling the same
JP6915182B1 (en) Machine tools, machine tool control methods, and machine tool control programs
US11780080B2 (en) Robot teaching with scans and geometries

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230117

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230830

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230905

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20231030

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: 20231107

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231107

R150 Certificate of patent or registration of utility model

Ref document number: 7383349

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150