JP2010113398A - Method of creating three-dimensional model and object recognizing device - Google Patents

Method of creating three-dimensional model and object recognizing device Download PDF

Info

Publication number
JP2010113398A
JP2010113398A JP2008283154A JP2008283154A JP2010113398A JP 2010113398 A JP2010113398 A JP 2010113398A JP 2008283154 A JP2008283154 A JP 2008283154A JP 2008283154 A JP2008283154 A JP 2008283154A JP 2010113398 A JP2010113398 A JP 2010113398A
Authority
JP
Japan
Prior art keywords
dimensional
model
measurement
dimensional information
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008283154A
Other languages
Japanese (ja)
Inventor
Kengo Ichimura
研吾 市村
Akira Ishida
晃 石田
Toyoo Iida
豊男 飯田
Junichiro Ueki
淳一郎 植木
Kazuhiro Shono
和博 醤野
Yoshizo Tokawa
吉造 東川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP2008283154A priority Critical patent/JP2010113398A/en
Priority to US12/611,568 priority patent/US8433128B2/en
Publication of JP2010113398A publication Critical patent/JP2010113398A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To create a three-dimensional model of satisfactory accuracy by reducing capacity as much as possible. <P>SOLUTION: Three-dimensional measurement by a stereo camera is performed from a plurality of directions to an actual model WM of a work to be three-dimensionally recognized. Then a temporary three-dimensional model is created by aligning and integrating a predetermined number of pieces of three-dimensional information restored by each measurement (three-dimensional information of each measurement point of [12], [3], [6], and [9]). Further recognition processing by the temporary three-dimensional model is performed to the three-dimensional information which is not integrated and after carrying out alignment of the three-dimensional information (information on a measurement point [10]) of which recognition result is determined as not correct, to the temporary three-dimensional model. Finally, registration of the three-dimensional model to which all pieces of the three-dimensional information which have not been correctly recognized are added is formally carried out. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

この発明は、所定の形状を具備する物体を対象として、複数のカメラを用いたステレオ計測により復元された3次元情報を用いて物体の位置および姿勢を認識する処理を行うために、当該物体の3次元モデルを作成する方法に関する。さらにこの発明は、上記の3次元モデルを作成して登録した後に、そのモデルを用いて物体の認識処理を行う装置に関する。   In order to perform processing for recognizing the position and orientation of an object using three-dimensional information restored by stereo measurement using a plurality of cameras for an object having a predetermined shape, The present invention relates to a method for creating a three-dimensional model. Furthermore, the present invention relates to an apparatus for performing object recognition processing using the model after creating and registering the three-dimensional model.

ステレオカメラを用いた3次元認識処理により物体の位置や姿勢を認識するには、認識対象の物体の種々の面の3次元情報を含む3次元モデルを作成する必要がある。
上記の点を課題とした発明を開示したものとして、下記の特許文献1がある。この特許文献1には、認識対象物の実物モデルに対し、複数の方向からのステレオ計測を行って、各計測により復元した3次元情報を位置合わせして統合することにより、物体全体の幾何モデルを作成することが、記載されている。
In order to recognize the position and orientation of an object by three-dimensional recognition processing using a stereo camera, it is necessary to create a three-dimensional model including three-dimensional information of various surfaces of the object to be recognized.
The following Patent Document 1 discloses an invention that addresses the above-described problems. In Patent Document 1, stereo measurement from a plurality of directions is performed on a real model of a recognition target object, and the three-dimensional information restored by each measurement is aligned and integrated to obtain a geometric model of the entire object. Is described.

また、特許文献1には、「セグメントベーストステレオ」と呼ばれる手法により、ステレオ画像に表されたエッジから実物モデルの輪郭線の3次元情報を復元することが記載されている。特許文献1によれば、「セグメントベーストステレオ」とは、ステレオ画像中のエッジを「セグメント」と呼ばれる単位に分割し、セグメント単位でステレオ対応検索を行って、輪郭線の3次元情報を復元する処理をいう。   Patent Document 1 describes that three-dimensional information of a contour line of a real model is restored from an edge represented in a stereo image by a technique called “segment-based stereo”. According to Patent Document 1, “segment-based stereo” is a method of dividing edges in a stereo image into units called “segments” and performing stereo correspondence search on a segment basis to restore the three-dimensional information of the contour line. Refers to processing.

さらに特許文献1には、3次元情報の位置合わせに関して、回転テーブルを用いて実物モデルを定められた角度まで回転させて、その回転角度に基づく座標変換を行う方法が記載されている。また、未知の観測方向からの3次元情報を位置合わせする方法として、作成中のモデルと新たに復元された3次元輪郭線とを照合して複数とおりの位置合わせの候補を求め、これらの中で一致度が最も高くなる場合の位置合わせを特定することが記載されている。   Furthermore, Patent Document 1 describes a method of performing coordinate conversion based on a rotation angle by rotating a real model to a predetermined angle using a rotation table with respect to alignment of three-dimensional information. In addition, as a method of aligning 3D information from unknown observation directions, a plurality of alignment candidates are obtained by collating the model being created with the newly restored 3D contour, It is described that the alignment is specified when the degree of coincidence is the highest.

さらに、下記の非特許文献1には、2次元のセグメントを画像間で対応づけし、3次元情報を復元する手法が詳しく記載されている。また、非特許文献2には、復元された3次元情報をあらかじめ登録された3次元モデルと照合して、物体の位置や姿勢を認識する手法が開示されている。   Further, the following Non-Patent Document 1 describes in detail a technique for associating a two-dimensional segment between images and restoring three-dimensional information. Non-Patent Document 2 discloses a method for recognizing the position and orientation of an object by collating restored three-dimensional information with a pre-registered three-dimensional model.

特許2961264号公報(段落0013,0017,0028〜0036参照。)Japanese Patent No. 2961264 (see paragraphs 0013, 0017, 0028 to 0036) 「セグメントベーストステレオにおける連結性に基づく対応評価」 情報処理学会論文誌 Vol.40,No.8,3219−3229ページ,1999年8月発行"Correspondence evaluation based on connectivity in segment-based stereo" IPSJ Journal Vol. 40, no. 8, pages 3219-3229, issued in August 1999 「ステレオビジョンによる3次元物体の認識」 電子情報通信学会論文誌 D−II,vol.J80−D−II,No.5,1105−1112ページ、1997年5月発行"Recognition of three-dimensional objects by stereo vision" IEICE Transactions D-II, vol. J80-D-II, no. 5, 1105-1112 pages, published in May 1997

特許文献1に記載された発明を利用して高精度の3次元モデルを作成するには、実物モデルに対する3次元計測を多数の方向から行って、各計測結果を統合するのが良いように思われる。しかし、このような方法では、3次元モデルの容量が増えて、実際に認識処理に用いた場合の処理時間が長くなるから、実用に適さないモデルになる可能性がある。   In order to create a highly accurate three-dimensional model using the invention described in Patent Document 1, it seems better to perform three-dimensional measurement on the real model from many directions and integrate the measurement results. It is. However, in such a method, the capacity of the three-dimensional model increases, and the processing time when actually used in the recognition processing becomes long, so that there is a possibility that the model is not suitable for practical use.

また、特許文献1には、作成された3次元モデルにより実際の認識処理物が正しく認識されるかどうかを確認する点についても、何も記載されていない。この点については、一般的には、作成した3次元モデルを用いて試験的な認識処理を行い、認識の精度が悪い場合には、3次元モデルを作成し直すものと思われるが、このような方法では、効率が悪く、ユーザに大きな負担をかける可能性がある。   Further, Patent Document 1 does not describe anything about whether or not an actual recognition processing object is correctly recognized by the created three-dimensional model. In this regard, it is generally considered that a trial recognition process is performed using the created 3D model, and if the recognition accuracy is poor, the 3D model is recreated. This method is inefficient and may place a heavy burden on the user.

この発明は、上記の問題点に着目し、容量をできるだけ少なくして精度の良い3次元モデルを作成すること、およびこの3次元モデルを短い時間で作成できるようにすることを課題とする。   This invention pays attention to said problem, and makes it a subject to make a capacity | capacitance as small as possible and to produce a highly accurate three-dimensional model, and to enable this three-dimensional model to be created in a short time.

この発明による3次元モデルの作成方法は、ステレオカメラを用いた3次元計測を認識対象物の実物モデルに対してそれぞれ異なる方向から実施することにより復元された複数の3次元情報を、位置を合わせて統合することによって、認識対象物の3次元モデルを作成する。   The method of creating a three-dimensional model according to the present invention aligns a plurality of three-dimensional information restored by performing three-dimensional measurement using a stereo camera from different directions on a real model of a recognition object. Are integrated to create a three-dimensional model of the recognition object.

この方法では、実物モデルに対する少なくとも1回の3次元計測により復元された3次元情報を用いて仮の3次元モデルを作成し、実物モデルに対し仮の3次元モデルの作成に用いられた3次元情報を復元したときとは異なる方向を計測方向として実施した3次元計測について、その計測により復元された3次元情報を仮の3次元モデルにより認識してその認識結果を判定する。さらに、仮の3次元モデルによる認識処理の結果が正しくないと判定したときに認識対象となった3次元情報、または当該認識対象の3次元情報を復元したときの計測方向に対する角度ずれが所定値以内となる方向からの計測により復元され、かつ3次元モデルによる認識処理の結果が正しいと判定された3次元情報を、仮の3次元モデルに整合するように座標変換して、変換後の3次元情報を仮の3次元モデルに追加し、この追加処理が完了した時点の3次元モデルを認識対象物の認識に用いるモデルとして確定する。   In this method, a temporary three-dimensional model is created using three-dimensional information restored by at least one three-dimensional measurement on the real model, and the three-dimensional model used to create the temporary three-dimensional model for the real model. For the three-dimensional measurement performed with the direction different from the time when the information is restored as the measurement direction, the three-dimensional information restored by the measurement is recognized by a temporary three-dimensional model, and the recognition result is determined. Furthermore, the three-dimensional information that is the recognition target when it is determined that the result of the recognition process using the provisional three-dimensional model is incorrect, or the angular deviation with respect to the measurement direction when the three-dimensional information of the recognition target is restored is a predetermined value. The three-dimensional information restored by measurement from the direction within the three-dimensional model and the result of the recognition process using the three-dimensional model determined to be correct is subjected to coordinate conversion so as to match the temporary three-dimensional model, and the converted three-dimensional information The dimensional information is added to the provisional three-dimensional model, and the three-dimensional model at the time when the addition process is completed is determined as a model used for recognition of the recognition object.

上記において、3次元計測により復元される3次元情報は、複数の3次元特徴データの集合体である。また3次元情報の「位置合わせ」とは、それぞれ異なる方向からのステレオ計測により復元された複数の3次元情報を、それぞれの間の位置ずれおよび角度ずれに基づいて座標変換する処理をいう。また実物モデルに対する計測方向は、実物モデルとステレオカメラとの相対位置関係によって定められる。   In the above, the 3D information restored by the 3D measurement is an aggregate of a plurality of 3D feature data. “Alignment” of the three-dimensional information refers to a process of converting the coordinates of a plurality of three-dimensional information restored by stereo measurement from different directions based on the positional deviation and angular deviation between them. The measurement direction with respect to the real model is determined by the relative positional relationship between the real model and the stereo camera.

上記の方法によれば、仮の3次元モデルの作成に用いられた3次元情報を復元したときとは異なる方向から実物モデルを計測して得られた3次元情報のうち、仮の3次元モデルでは正しく認識することのできなかった3次元情報を3次元モデルに追加することができる。よって、追加後の3次元モデルは、誤認識された方向からの計測による3次元情報を正しく認識できるようになり、その分、3次元モデルの精度を向上することができる。一方、仮の3次元モデルにより正しく認識することができた3次元情報は、3次元モデルには追加されないので、無駄な情報の追加により容量が増えるのを防止することができる。   According to the above method, the temporary three-dimensional model out of the three-dimensional information obtained by measuring the real model from a different direction from that when the three-dimensional information used to create the temporary three-dimensional model is restored. Then, it is possible to add three-dimensional information that could not be correctly recognized to the three-dimensional model. Therefore, the added three-dimensional model can correctly recognize the three-dimensional information measured from the misrecognized direction, and the accuracy of the three-dimensional model can be improved accordingly. On the other hand, since the three-dimensional information that can be correctly recognized by the provisional three-dimensional model is not added to the three-dimensional model, it is possible to prevent an increase in capacity due to the addition of useless information.

このように、実際の認識対象物に対して想定される種々の計測方向から実物モデルを計測し、復元された3次元情報のうち誤認識されたものを3次元モデルに追加することにより、3次元モデルの容量を抑えながら、その精度を高めることが可能になる。   In this way, by measuring a real model from various measurement directions assumed for an actual recognition target object and adding the erroneously recognized one of the restored three-dimensional information to the three-dimensional model, 3 It is possible to increase the accuracy while suppressing the capacity of the dimensional model.

ただし、誤認識された3次元情報を3次元モデルに整合させるには、この3次元情報の3次元モデルに対する位置ずれ量や回転角度に基づく座標変換を行う必要がある。この点について、たとえば回転テーブルにより実物モデルの回転角度を制御する場合には、毎回の回転角度から座標変換のためのパラメータを割り出すことができる。またステレオカメラと実物モデルとの位置関係を任意に変更する場合でも、後記するような演算によって座標変換のパラメータを求めることが可能である。   However, in order to match the misrecognized three-dimensional information with the three-dimensional model, it is necessary to perform coordinate conversion based on a positional deviation amount and a rotation angle of the three-dimensional information with respect to the three-dimensional model. With respect to this point, for example, when the rotation angle of the real model is controlled by a rotation table, a parameter for coordinate conversion can be determined from each rotation angle. Further, even when the positional relationship between the stereo camera and the real model is arbitrarily changed, it is possible to obtain the coordinate conversion parameters by the calculation described later.

上記の3次元情報を仮の3次元モデルにより認識した結果が正しいか否かの判定は、たとえば、上記の座標変換のためのパラメータを導出する場合と同様の方法により判定対象の3次元情報と仮の3次元モデルとの正しい対応関係を求め、この関係と仮の3次元モデルによる認識結果とを照合する方法により実施する。または、仮の3次元モデルによる認識結果を表示して、その正否をユーザに判定させ、判定入力を受け付けるようにしてもよい。   The determination as to whether or not the result of recognizing the above three-dimensional information by the provisional three-dimensional model is correct, for example, by the same method as in the case of deriving the parameters for coordinate conversion described above, A correct correspondence relationship with the provisional three-dimensional model is obtained, and this relationship is compared with the recognition result of the provisional three-dimensional model. Alternatively, a recognition result based on the temporary three-dimensional model may be displayed, the user may be determined whether it is correct or not, and a determination input may be accepted.

また、上記の方法では、正しく認識されなかった3次元情報そのものに限らず、この3次元情報を復元したときの計測方向に対する角度ずれが所定値以内であって、3次元モデルにより正しく認識された3次元情報を追加する場合もある。これは以下のような理由による。   In the above method, not only the three-dimensional information itself that has not been correctly recognized, but also the angular deviation with respect to the measurement direction when the three-dimensional information is restored is within a predetermined value, and is correctly recognized by the three-dimensional model. In some cases, three-dimensional information is added. This is due to the following reasons.

毎回の計測方向を適当な間隔で変更して3次元計測を実行すれば、連続する2回の計測で復元された3次元情報の間に相当量の共通する特徴を含めることができる。したがってこれらの3次元情報のうちの一方を正しく認識できなくとも、他方を正しく認識できた場合には、後者の3次元情報を3次元モデルに追加することによって、前者の情報も正しく認識できるようになる可能性がある。   If the three-dimensional measurement is executed by changing the measurement direction every time at an appropriate interval, a considerable amount of common features can be included between the three-dimensional information restored by two consecutive measurements. Therefore, even if one of these three-dimensional information cannot be correctly recognized, and the other can be correctly recognized, the latter information can be correctly recognized by adding the latter three-dimensional information to the three-dimensional model. There is a possibility.

以下、上記方法について4つの好適な実施態様を説明する。
まず第1の態様では、実物モデルに対し、毎回異なる計測方向を設定して複数回の3次元計測を実施するとともに、2回目以降の3次元計測により復元された3次元情報をそれぞれ一段階前の計測により復元された3次元情報と照合して、双方の3次元情報間の対応関係を認識する。また、複数回の3次元計測に伴い復元された複数の3次元情報のうちの一部に相当する2以上の3次元情報を選択し、選択された3次元情報の1つを基準として、他の3次元情報を、それぞれ当該3次元情報に対応する計測と基準の3次元情報に対応する計測との間の各計測に関して認識された3次元情報間の対応関係に基づき、基準の3次元情報に整合するように座標変換し、変換後の3次元情報を基準の3次元情報に統合することにより仮の3次元モデルを作成する。
Hereinafter, four preferred embodiments of the above method will be described.
First, in the first aspect, a different measurement direction is set each time for a real model, and a plurality of three-dimensional measurements are performed, and the three-dimensional information restored by the second and subsequent three-dimensional measurements is one step ahead. The corresponding relationship between the three-dimensional information is recognized by collating with the three-dimensional information restored by the measurement. Further, two or more three-dimensional information corresponding to a part of a plurality of three-dimensional information restored by a plurality of three-dimensional measurements is selected, and the other one is selected based on one of the selected three-dimensional information. Based on the correspondence relationship between the three-dimensional information recognized for each measurement between the measurement corresponding to the three-dimensional information and the measurement corresponding to the reference three-dimensional information. Are converted so as to be consistent with each other, and the converted three-dimensional information is integrated with reference three-dimensional information to create a provisional three-dimensional model.

つぎに、複数の3次元情報のうち仮の3次元モデルに統合されなかった3次元情報を順に処理対象として、仮の3次元モデルを用いた認識処理を実行してその認識結果の正否を判定するとともに、認識処理の結果が正しくないと判定したときは、その認識処理の対象となった3次元情報を、当該3次元情報に対応する計測と基準の3次元情報に対応する計測との間の各計測に関して復元された3次元情報間の認識された対応関係に基づき、基準の3次元情報に整合するように座標変換して、変換後の3次元情報を仮の3次元モデルに追加する。そして、3次元モデルに統合されなかった全ての3次元情報に対する処理が終了したとき、その時点の3次元モデルを確定する。   Next, three-dimensional information that has not been integrated into the temporary three-dimensional model among a plurality of three-dimensional information is sequentially processed, and recognition processing using the temporary three-dimensional model is executed to determine whether the recognition result is correct or not. In addition, when it is determined that the result of the recognition process is not correct, the three-dimensional information that is the object of the recognition process is measured between the measurement corresponding to the three-dimensional information and the measurement corresponding to the reference three-dimensional information. Based on the recognized correspondence between the three-dimensional information restored for each measurement, coordinate conversion is performed to match the reference three-dimensional information, and the converted three-dimensional information is added to the temporary three-dimensional model. . When the processing for all the three-dimensional information that has not been integrated into the three-dimensional model is completed, the three-dimensional model at that time is determined.

上記の態様によれば、実物モデルに対する計測方向として想定される種々の方向からの3次元計測を実行した後に、それぞれの計測方向に対応する3次元情報を適度な間隔で選択することによって、仮の3次元モデルが作成される。さらに、この仮の3次元モデルに統合されなかった3次元情報を3次元モデルにより認識する処理が順に実行され、正しい認識結果を得ることができなかった3次元情報が3次元モデルに追加される。ここで作成された3次元モデルは、選択された3次元情報や追加された3次元情報に対応する方向のほか、設定された計測方向のいずれからの計測でも、正しい認識を行うことが可能な精度を具備するものとなる。また3次元計測の実行回数が多くなっても、認識精度を確保する上で必要な3次元情報のみが統合されるので、3次元モデルの容量が多くなるのを防止することができる。   According to the above aspect, after performing three-dimensional measurement from various directions assumed as measurement directions for the real model, by selecting three-dimensional information corresponding to each measurement direction at appropriate intervals, The three-dimensional model is created. Furthermore, the process of recognizing the three-dimensional information that has not been integrated into the provisional three-dimensional model by the three-dimensional model is sequentially performed, and the three-dimensional information for which a correct recognition result could not be obtained is added to the three-dimensional model. . The three-dimensional model created here can correctly recognize the measurement from any of the set measurement directions in addition to the direction corresponding to the selected three-dimensional information and the added three-dimensional information. It has accuracy. Even if the number of executions of the three-dimensional measurement increases, only the three-dimensional information necessary for ensuring the recognition accuracy is integrated, so that the capacity of the three-dimensional model can be prevented from increasing.

さらに上記の態様では、2回目以降の3次元計測により復元された3次元情報をそれぞれ一段階前の計測により復元された3次元情報と照合して、双方の3次元情報間の位置関係を認識し、これらの認識結果を用いて、仮の3次元モデルを作成する際やこの3次元モデルに新たな3次元情報を追加する際の座標変換処理を実行するので、実物モデルとステレオカメラとの位置関係を厳密に調整する必要がない。また毎時の計測方向が前回の計測方向から極端に変わることがないようにすれば、毎回の計測においては、一段階前の計測で復元された情報を相当数重複して復元することが可能になり、3次元情報間の対応関係の認識精度を確保することができる。   Further, in the above aspect, the three-dimensional information restored by the second and subsequent three-dimensional measurements is collated with the three-dimensional information restored by the previous measurement, and the positional relationship between the three-dimensional information is recognized. Then, using these recognition results, coordinate conversion processing is performed when a temporary 3D model is created or when new 3D information is added to the 3D model. There is no need to strictly adjust the positional relationship. Also, if the hourly measurement direction is not changed significantly from the previous measurement direction, it is possible to restore a considerable amount of information restored in the previous measurement in each measurement. Thus, the recognition accuracy of the correspondence between the three-dimensional information can be ensured.

第2の態様では、実物モデルに対し毎回異なる計測方向を設定して実施した複数回の3次元計測により復元された複数の3次元情報を用いて仮の3次元モデルを作成した後に、実物モデルに対し、仮の3次元モデルの作成時に設定したいずれの計測方向とも異なるように計測方向を毎回変更して3次元計測を実行する処理を、複数回実行する。そして複数回の3次元計測の1回目の3次元計測により復元された3次元情報を対象に、仮の3次元モデルによる認識処理を実行した後に、2回目以降の計測の都度、その計測により復元された3次元情報を一段階前に復元された3次元情報と照合して双方の3次元情報間の対応関係を認識する第1ステップと、当該計測により復元された3次元情報を対象に、仮の3次元モデルを用いた認識処理を実行してその認識結果の正否を判定する第2ステップとを実行する。また、2回目以降の計測により復元された3次元情報に対する認識処理の結果が正しくないと判定したときは、1回目の3次元計測により復元された3次元情報に対する認識結果、および2回目から現時点までに実施された各3次元計測に対する第1ステップの認識結果に基づき、認識処理の結果が正しくないと判定された3次元情報を仮の3次元モデルに整合するように座標変換して、変換後の3次元情報を仮の3次元モデルに追加する。そして、複数回の3次元計測およびこれに伴う処理がすべて終了したとき、その時点の3次元モデルを確定する。   In the second aspect, after creating a temporary three-dimensional model using a plurality of three-dimensional information restored by a plurality of three-dimensional measurements performed by setting different measurement directions each time for the real model, On the other hand, a process of executing the three-dimensional measurement by changing the measurement direction every time so as to be different from any measurement direction set at the time of creating the temporary three-dimensional model is executed a plurality of times. Then, after performing recognition processing with a temporary 3D model for the 3D information restored by the first 3D measurement of the 3D measurement, the restoration is performed by the measurement every second and subsequent measurements. The first step of recognizing the correspondence between the three-dimensional information by collating the three-dimensional information that has been restored with the three-dimensional information restored one step ago, and the three-dimensional information restored by the measurement, A recognition process using a temporary three-dimensional model is executed, and a second step of determining whether the recognition result is correct or not is executed. When it is determined that the result of the recognition process for the three-dimensional information restored by the second and subsequent measurements is not correct, the recognition result for the three-dimensional information restored by the first three-dimensional measurement, and the current time from the second time Based on the recognition result of the first step for each three-dimensional measurement performed up to now, the coordinate conversion is performed so that the three-dimensional information determined as the result of the recognition process is inconsistent with the temporary three-dimensional model. The later three-dimensional information is added to the temporary three-dimensional model. When all of the three-dimensional measurements and the processes associated therewith are completed, the three-dimensional model at that time is determined.

第2の態様によれば、まず実物モデルを、実際に想定する種々の方向のうちの代表的な方向から計測して、その計測結果により仮の3次元モデルを作成した後に、他の想定される方向からの計測を順に行うと、その計測により復元された3次元情報のうち、仮の3次元モデルにより正しく認識することができなかったものが、現時点までに実行された認識処理の結果に基づき座標変換されて、仮の3次元モデルに追加される。また仮の3次元モデルを作成した後の1回目の3次元計測において、仮の3次元モデルにより正しく認識することが可能な3次元情報を復元し、その後の計測でも、一段階前とは極端に異なる計測方向が設定されることがないようにすれば、2回目以降の各計測においては、一段階前の計測で復元された特徴を相当数重複して復元することができ、毎回の第1ステップの精度を確保することができる。よって、追加対象の3次元情報に対する座標変換処理を精度良く行うことが可能になり、3次元モデルの精度を確保することができる。   According to the second aspect, first, a real model is measured from a representative direction among various directions that are actually assumed, and after creating a provisional three-dimensional model based on the measurement results, other assumptions are made. When the measurement from the direction is performed sequentially, among the three-dimensional information restored by the measurement, the information that could not be correctly recognized by the temporary three-dimensional model is the result of the recognition processing executed so far. Coordinates are converted based on this and added to the temporary three-dimensional model. Also, in the first three-dimensional measurement after creating the temporary three-dimensional model, the three-dimensional information that can be correctly recognized by the temporary three-dimensional model is restored. If a different measurement direction is not set for each measurement, it is possible to restore a number of features restored by the previous measurement in the second and subsequent measurements. One step accuracy can be ensured. Therefore, it is possible to perform the coordinate conversion process on the three-dimensional information to be added with high accuracy, and to ensure the accuracy of the three-dimensional model.

第3の態様では、実物モデルに対する計測方向を毎回変更して3次元計測を実行する処理を複数回実行する。また、1回目の3次元計測により復元された3次元情報を仮の3次元モデルに設定し、以後の3次元計測において、それぞれこの3次元計測により復元された3次元情報を一段階前に復元された3次元情報と照合して双方の3次元情報間の対応関係を認識する第1ステップと、当該3次元計測により復元された3次元情報を対象に仮の3次元モデルを用いた認識処理を実行してその認識結果の正否を判定する第2ステップとを実行する。そして、第2ステップにおいて3次元モデルを用いた認識処理の結果が正しくないと判定したときは、その認識処理の対象となった3次元情報を、2回目から現時点までの各3次元計測に対して実行された第1ステップによる認識結果に基づき、仮の3次元モデルに整合するように座標変換して、変換後の3次元情報を仮の3次元モデルに追加する。そして、複数回の3次元計測およびこれに伴う処理がすべて終了したとき、その時点の3次元モデルを確定する。   In a 3rd aspect, the process which changes the measurement direction with respect to a real model each time and performs three-dimensional measurement is performed in multiple times. In addition, the 3D information restored by the first 3D measurement is set as a temporary 3D model, and the 3D information restored by the 3D measurement is restored one step before in the subsequent 3D measurement. First step of recognizing the correspondence between the three-dimensional information by collating with the three-dimensional information, and recognition processing using a temporary three-dimensional model for the three-dimensional information restored by the three-dimensional measurement And the second step of determining whether the recognition result is correct or not is executed. When it is determined in the second step that the result of the recognition process using the three-dimensional model is not correct, the three-dimensional information that is the object of the recognition process is determined for each three-dimensional measurement from the second time to the current time. Based on the recognition result of the first step executed in this way, coordinate conversion is performed so as to match the temporary three-dimensional model, and the converted three-dimensional information is added to the temporary three-dimensional model. When all of the three-dimensional measurements and the processes associated therewith are completed, the three-dimensional model at that time is determined.

第3の態様によれば、複数回の3次元計測のうちの1回目の計測により復元された3次元情報が仮の3次元モデルとして設定された後、以後、計測が行われる都度、正しく認識されなかった3次元情報が仮の3次元モデルに整合するように座標変換されて、仮の3次元モデルに追加される。また2回目以降の3次元計測について、一段階前とは極端に異なる計測方向が設定されることがないようにすれば、いずれの計測においても、一段階前の計測で復元された情報が相当数重複して復元されて、第1ステップの精度を確保することができる。よって、追加対象の3次元情報に対する座標変換処理を精度良く行うことが可能になり、実物モデルに対して設定された全ての計測方向からの計測に対して対象物を正しく認識できる精度の3次元モデルを作成することができる。   According to the third aspect, after the three-dimensional information restored by the first measurement out of a plurality of three-dimensional measurements is set as a temporary three-dimensional model, it is correctly recognized every time measurement is performed thereafter. The coordinate information is converted so that the three-dimensional information that has not been matched with the provisional three-dimensional model is added to the provisional three-dimensional model. In addition, for the second and subsequent 3D measurements, if the measurement direction is not set to be extremely different from that of the previous stage, the information restored by the previous stage of measurement is equivalent to any measurement. It is possible to ensure the accuracy of the first step by restoring several times. Therefore, it is possible to accurately perform the coordinate conversion process on the three-dimensional information to be added, and the three-dimensional accuracy with which the target can be correctly recognized for the measurement from all measurement directions set for the real model. A model can be created.

また第2および第3の態様でも、追加対象の3次元情報を、その情報が復元されるまでに実施された認識処理の結果に基づき座標変換してから仮の3次元モデルに追加するので、回転テーブルなどにより実物モデルとステレオカメラとの位置関係を厳密に調整する必要がない。   Also in the second and third aspects, the three-dimensional information to be added is added to the temporary three-dimensional model after coordinate conversion based on the result of recognition processing performed until the information is restored. It is not necessary to strictly adjust the positional relationship between the real model and the stereo camera using a rotary table or the like.

第4の態様では、実物モデルを任意の角度で回転させて3次元計測を実行する処理を複数回実行することを条件に、1回目の3次元計測により復元された3次元情報を仮の3次元モデルに設定し、以後の3次元計測が行われる毎に、その計測により復元された3次元情報を対象に仮の3次元モデルを用いた認識処理を実行してその認識結果の正否を判定する。そして、仮の3次元モデルによる認識処理の結果が正しくないと判定したときは、実物モデルに対する計測方向が一段階前の計測方向に近づくように実物モデルを回転させて3次元計測を行うステップと、この3次元計測により復元された3次元情報を対象に仮の3次元モデルを用いた認識処理を実行してその認識結果の正否を判定するステップとを、認識結果が正しいと判定されるまで実行し、正しいと判定された認識結果に対応する3次元情報を、その認識結果に基づき座標変換して、変換後の3次元情報を仮の3次元モデルに追加した後に、認識処理の結果が正しくないと判定したときの状態に戻る方向に実物モデルを回転させる。そして、実物モデルとステレオカメラとの位置関係が所定の状態になったときの3次元計測およびこれに伴う処理がすべて終了したとき、その時点の3次元モデルを確定する。   In the fourth aspect, the three-dimensional information restored by the first three-dimensional measurement is assumed to be temporary 3 on condition that the process of rotating the real model at an arbitrary angle and executing the three-dimensional measurement is executed a plurality of times. Each time a three-dimensional measurement is performed, a recognition process using a temporary three-dimensional model is performed on the three-dimensional information restored by the measurement, and the recognition result is determined to be correct or not. To do. When it is determined that the result of the recognition process using the temporary 3D model is not correct, the 3D measurement is performed by rotating the real model so that the measurement direction with respect to the real model approaches the measurement direction one step before; The step of executing a recognition process using a temporary three-dimensional model on the three-dimensional information restored by the three-dimensional measurement and determining whether the recognition result is correct or not until the recognition result is determined to be correct. The three-dimensional information corresponding to the recognition result determined to be correct is subjected to coordinate conversion based on the recognition result, and the converted three-dimensional information is added to the temporary three-dimensional model. The real model is rotated in a direction to return to the state when it is determined to be incorrect. Then, when the three-dimensional measurement when the positional relationship between the real model and the stereo camera is in a predetermined state and the processing associated therewith are completed, the three-dimensional model at that time is determined.

第4の態様でも、第1回目の計測で復元された3次元情報が仮の3次元モデルとして設定され、以後は、仮の3次元モデルにより正しい認識ができなかった場合に、3次元モデルへの追加処理が行われる。ただしこの態様では、認識できなかった3次元情報そのものではなく、その3次元情報に共通する特徴を含み、かつ3次元モデルにより正しく認識される3次元情報を3次元モデルに追加することによって、正しく認識できなかった3次元情報を認識できる状態にすることを目的とする。よって、この3次元情報の追加処理を適宜行いながら実物モデルの回転および3次元計測を繰り返すことによって、設定された全ての計測方向からの計測に対して対象物を正しく認識することが可能な3次元モデルを作成することが可能になる。   Also in the fourth aspect, the three-dimensional information restored by the first measurement is set as a temporary three-dimensional model, and thereafter, when the correct recognition cannot be performed by the temporary three-dimensional model, the three-dimensional model is changed. Additional processing is performed. However, in this aspect, not by the 3D information itself that could not be recognized, but by adding to the 3D model 3D information that includes features common to the 3D information and that is correctly recognized by the 3D model. The object is to make the three-dimensional information that could not be recognized become recognizable. Therefore, by repeating the rotation of the real model and the three-dimensional measurement while appropriately performing the addition process of the three-dimensional information, the object can be correctly recognized for the measurement from all the set measurement directions. It becomes possible to create a dimensional model.

また、この態様では、毎回、実物モデルを回転角度を考慮せずに回転させることができる上に、3次元モデルに追加される3次元座標を、当該3次元モデルから認識した結果に基づき座標変換するので、追加される情報の3次元モデルに対する整合の精度も確保される。また、他の態様のように、3次元計測の都度、照合を行うことがないので、処理を簡単にすることができる。   Further, in this aspect, the real model can be rotated each time without considering the rotation angle, and the three-dimensional coordinate added to the three-dimensional model is coordinate-converted based on the result recognized from the three-dimensional model. Therefore, the accuracy of matching the added information with the three-dimensional model is also ensured. In addition, unlike the other aspects, since the verification is not performed every time the three-dimensional measurement is performed, the processing can be simplified.

つぎに、この発明による物体認識装置は、ステレオカメラを用いた3次元計測により認識対象物の3次元情報を復元する3次元計測手段と、復元された3次元情報をあらかじめ登録した3次元モデルと照合することにより認識対象の物体の位置および姿勢を認識する認識処理手段と、認識対象物の実物モデルに対してそれぞれ異なる方向から3次元計測を行うことにより復元された複数の3次元情報を位置を合わせて統合することによって、認識処理手段により使用される3次元モデルを作成した後に、当該3次元モデルを登録する3次元モデル登録手段とを具備する。   Next, an object recognition apparatus according to the present invention includes a three-dimensional measurement unit that restores three-dimensional information of a recognition object by three-dimensional measurement using a stereo camera, a three-dimensional model in which the restored three-dimensional information is registered in advance. The recognition processing means for recognizing the position and orientation of the object to be recognized by collation, and a plurality of three-dimensional information restored by performing three-dimensional measurement from different directions on the real model of the recognition object And a three-dimensional model registration unit for registering the three-dimensional model after the three-dimensional model used by the recognition processing unit is created.

さらに、この発明では、毎回の計測の際に、ユーザが実物モデルとステレオカメラとの位置関係を任意に変更して複数回の計測を実行する間に、認識処理に適した3次元モデルを作成する機能を有する物体認識装置として、以下の第1の構成および第2の構成を提供する。   Furthermore, in the present invention, during each measurement, a user creates a three-dimensional model suitable for recognition processing while executing a plurality of measurements by arbitrarily changing the positional relationship between the real model and the stereo camera. The following first configuration and second configuration are provided as an object recognition device having the function of:

第1の構成による物体認識装置では、3次元モデル登録手段に、以下の対応関係認識手段、仮モデル作成手段、認識結果確認手段、モデル更新手段、およびモデル確定手段が設けられる。   In the object recognition apparatus according to the first configuration, the following correspondence relationship recognition means, provisional model creation means, recognition result confirmation means, model update means, and model confirmation means are provided in the three-dimensional model registration means.

対応関係認識手段は、実物モデルに対する3次元計測手段の処理により復元された複数の3次元情報のうち、2回目以降の計測により復元された3次元情報を、それぞれ一段階前に復元された3次元情報と照合して、双方の3次元情報間の対応関係を認識する。仮モデル作成手段は、複数回の3次元計測により復元された複数の3次元情報のうちの一部に相当する2以上の3次元情報を選択し、選択された3次元情報の1つを基準として、他の3次元情報を、それぞれ当該3次元情報に対応する計測と基準の3次元情報に対応する計測との間の各計測に関して対応関係認識手段により認識された3次元情報間の対応関係に基づき、基準の3次元情報に整合するように座標変換し、変換後の3次元情報を基準の3次元情報に整合することにより仮の3次元モデルを作成する。   Correspondence recognition means 3 3D information restored by the second and subsequent measurements out of a plurality of 3D information restored by the processing of the 3D measurement means for the real model 3 The correspondence between the three-dimensional information is recognized by collating with the dimension information. The temporary model creation means selects two or more three-dimensional information corresponding to a part of a plurality of three-dimensional information restored by a plurality of three-dimensional measurements, and uses one of the selected three-dimensional information as a reference As for other three-dimensional information, the correspondence between the three-dimensional information recognized by the correspondence recognition means for each measurement between the measurement corresponding to the three-dimensional information and the measurement corresponding to the reference three-dimensional information. Based on the above, coordinate conversion is performed to match the reference three-dimensional information, and the converted three-dimensional information is matched with the reference three-dimensional information to create a provisional three-dimensional model.

認識結果確認手段は、複数の3次元情報のうち仮の3次元モデルに統合されなかった情報に順に着目して、着目した3次元情報を仮の3次元モデルにより認識し、その認識結果の正否を判定する。   The recognition result confirmation means recognizes the focused three-dimensional information with the temporary three-dimensional model by paying attention to the information that has not been integrated into the temporary three-dimensional model among the plurality of three-dimensional information, and whether the recognition result is correct or not Determine.

モデル更新手段は、認識結果確認手段が認識処理の結果が正しくないと判定したとき、その時点での着目中の3次元情報を、当該3次元情報に対応する計測と基準の3次元情報に対応する計測との間の各計測に関して対応関係認識手段により認識された3次元情報間の対応関係に基づき、基準の3次元情報に整合するように座標変換し、変換後の3次元情報を仮の3次元モデルに追加することにより仮の3次元モデルを更新する。モデル確定手段は、認識処理の結果が正しくないと判定された3次元情報のすべてが追加された3次元モデルを登録対象として確定する。   When the model update means determines that the result of the recognition process is not correct, the model update means corresponds to the measurement and reference three-dimensional information corresponding to the three-dimensional information corresponding to the current three-dimensional information. Based on the correspondence between the three-dimensional information recognized by the correspondence-recognition means for each measurement, the coordinates are converted so as to match the reference three-dimensional information, and the converted three-dimensional information is temporarily stored. The provisional three-dimensional model is updated by adding to the three-dimensional model. The model confirming means confirms, as a registration target, a three-dimensional model to which all of the three-dimensional information determined that the recognition processing result is not correct is added.

上記の構成によれば、ユーザが、毎回の3次元計測の都度、実物モデルとステレオカメラとの位置関係を任意に変更すれば、復元された3次元情報の中から選択された3次元情報により仮の3次元モデルが作成された後に、この3次元モデルでは正しい認識を行うのが困難な3次元情報が特定され、これらの情報が追加された3次元モデルを作成することができる。   According to the above configuration, if the user arbitrarily changes the positional relationship between the real model and the stereo camera each time three-dimensional measurement is performed, the three-dimensional information selected from the restored three-dimensional information is used. After the provisional three-dimensional model is created, three-dimensional information that is difficult to correctly recognize is identified in the three-dimensional model, and a three-dimensional model to which these pieces of information are added can be created.

また、2回目以降の計測を行う都度、その計測により復元された3次元情報と一段階前の3次元情報との位置関係を認識してゆき、これらの認識結果に基づいて統合対象の3次元情報に対する座標変換を行うから、毎回の計測方向が直前の計測方向と大きく異なることがないようにすれば、一段階前の3次元情報との照合の精度を確保でき、これをもって座標変換処理の精度を確保することができる。よって、毎回、実物モデルとステレオカメラとの位置関係を厳密に調整しなくとも、精度が良く、容量が抑えられた3次元モデルを作成することが可能になる。   In addition, each time the second and subsequent measurements are performed, the positional relationship between the three-dimensional information restored by the measurement and the previous three-dimensional information is recognized, and the three-dimensional integration target is based on these recognition results. Since the coordinate conversion is performed on the information, if the measurement direction of each time is not greatly different from the previous measurement direction, the accuracy of collation with the previous three-dimensional information can be ensured. Accuracy can be ensured. Therefore, it is possible to create a three-dimensional model with high accuracy and reduced capacity without strictly adjusting the positional relationship between the real model and the stereo camera each time.

第2の構成による物体認識装置では、3次元モデル登録手段に、以下の仮モデル設定手段、認識結果確認手段、モデル更新手段、およびモデル確定手段が設けられる。   In the object recognition apparatus according to the second configuration, the following three-dimensional model registration means includes the following temporary model setting means, recognition result confirmation means, model update means, and model confirmation means.

仮モデル設定手段は、3次元計測手段が実物モデルに対する最初の計測を実行したのに応じて、その計測により復元された3次元情報を仮の3次元モデルに初期設定する。認識結果確認手段は、3次元計測手段が実物モデルに対する2回目以降の計測を実行する都度、その計測により復元された3次元情報を対象に仮の3次元モデルを用いた認識処理を実行し、その認識結果の正否について判定入力を受け付ける。   The temporary model setting means initializes the three-dimensional information restored by the measurement into a temporary three-dimensional model in response to the first measurement performed by the three-dimensional measurement means on the real model. The recognition result confirmation unit executes a recognition process using a temporary three-dimensional model for the three-dimensional information restored by the measurement every time the three-dimensional measurement unit performs the second and subsequent measurements on the real model. A determination input for accepting the recognition result is accepted.

モデル更新手段は、認識結果確認手段が、実行した認識処理の結果が正しくないとする判定入力を受け付けたとき、この受付後に入力されたステレオ画像から復元された3次元情報のうち、認識結果確認手段による処理において仮の3次元モデルを用いた認識処理の結果が正しいとする判定入力を受け付けた最初の情報を、その認識結果に基づき座標変換し、変換後の3次元情報を仮の3次元モデルに追加することによって、3次元モデルを更新する。   When the recognition result confirmation unit accepts a determination input indicating that the result of the recognition processing executed is incorrect, the model update unit confirms the recognition result among the three-dimensional information restored from the stereo image input after the reception. In the processing by the means, the first information that has received the determination input that the recognition processing result using the temporary three-dimensional model is correct is subjected to coordinate conversion based on the recognition result, and the converted three-dimensional information is converted into the temporary three-dimensional information. Update the 3D model by adding to the model.

モデル確定手段は、実物モデルに対する3次元計測およびこれに伴う認識結果確認手段ならびにモデル更新手段の処理が全て終了したとき、その時点の3次元モデルを登録対象として確定する。   When all of the processing of the three-dimensional measurement for the real model and the recognition result confirmation unit and the model update unit are completed, the model determination unit determines the three-dimensional model at that time as a registration target.

上記の構成によれば、1回目の計測に応じて仮の3次元モデルが初期設定された後に、以後の計測の都度、ユーザが実物モデルを任意の角度で回転させることによって、それぞれ異なる方向からの計測により復元された3次元情報を仮の3次元モデルにより認識する処理が行われ、その認識結果の正否について、ユーザによる判定結果が入力される。ここで、ユーザが3次元情報が正しく認識されなかったと判定した場合には、その判定結果を入力し、計測方向を一段階前の計測方向に近づけるように実物モデルを回転させて計測を行う処理を所定回数実行すれば、少なくとも一段階前の計測状態に戻ったときに、3次元モデルにより正しく認識される3次元情報を得ることができる。よって、この時点での3次元情報を3次元モデルに追加することにより、正しく認識できなかった3次元情報の認識が可能になる可能性が高められる。   According to the above configuration, after the temporary three-dimensional model is initially set according to the first measurement, the user rotates the real model at an arbitrary angle each time after the measurement, so that the respective directions are different from each other. A process of recognizing the three-dimensional information restored by the measurement using the provisional three-dimensional model is performed, and a determination result by the user is input as to whether the recognition result is correct. Here, if the user determines that the three-dimensional information has not been correctly recognized, the determination result is input, and the measurement is performed by rotating the real model so that the measurement direction approaches the previous measurement direction. Is executed a predetermined number of times, it is possible to obtain three-dimensional information that is correctly recognized by the three-dimensional model when the measurement state is returned to at least one stage before. Therefore, by adding the three-dimensional information at this time to the three-dimensional model, the possibility that the three-dimensional information that could not be correctly recognized can be recognized is increased.

上記の追加により3次元モデルが更新された後に、ユーザが実物モデルの回転方向を元の方向に戻すと、この後は、先の3次元情報を正しく認識できなかった計測方向を再設定して、更新された3次元モデルにより正しい認識が可能になったか否かを確認し、認識が可能になった旨を確認してから次の計測に進むことができる。   After the 3D model is updated by the above addition, if the user returns the rotation direction of the real model to the original direction, after that, the measurement direction in which the previous 3D information could not be correctly recognized is reset. Then, it can be confirmed whether or not correct recognition is possible by the updated three-dimensional model, and after confirming that recognition is possible, the process can proceed to the next measurement.

よって、第2の構成の装置によれば、ユーザは、ステレオカメラに対する実物モデルの姿勢を種々の状態に設定して計測を行いながら、現在の3次元モデルでは認識が困難な状態を容易に判断して、その認識を可能にするための措置をとることができる。よって、認識対象物の想定できる姿勢の変化に応じて実物モデルとステレオカメラとの位置関係を変更する間に、精度が良く、容量が抑えられた3次元モデルを作成することが可能になる。   Therefore, according to the apparatus having the second configuration, the user can easily determine a state that is difficult to recognize with the current three-dimensional model while performing measurement while setting the posture of the real model with respect to the stereo camera in various states. Thus, measures can be taken to enable the recognition. Therefore, it is possible to create a three-dimensional model with high accuracy and reduced capacity while changing the positional relationship between the real model and the stereo camera in accordance with a change in posture that can be assumed by the recognition target.

この発明によれば、実物モデルに対する計測方向を毎回変更して3次元計測を行う処理を複数回実行することにより、これらの計測で設定されたすべての計測方向から対象物を認識することができ、かつ無駄な情報を含まない3次元モデルを作成することができる。また、ステレオカメラと認識対象物との実際に想定される位置関係に基づき、十分な回数の計測を行うだけで上記の3次元モデルを作成することができるから、3次元モデルの作成に要する効率を大幅に向上することができる。   According to this invention, the object can be recognized from all the measurement directions set by these measurements by executing the process of performing the three-dimensional measurement by changing the measurement direction with respect to the real model every time. In addition, a three-dimensional model that does not include useless information can be created. In addition, since the above three-dimensional model can be created by performing a sufficient number of measurements based on the actually assumed positional relationship between the stereo camera and the recognition object, the efficiency required for creating the three-dimensional model Can be greatly improved.

(1)装置構成
図1は、3次元認識処理を適用したピッキングシステムの例を示す。
このピッキングシステムは、工場内で収容ボックス6内に収容されたワークWを1つずつ取り出して所定の位置に搬送する作業を行うためのもので、実際の作業を行う多関節ロボット4や、このロボット4の動作を制御するロボット制御装置3が含まれる。さらに、このピッキングシステムには、処理対象のワークWの位置および姿勢を認識するために、ステレオカメラ1および物体認識装置2が設けられる。
(1) Device Configuration FIG. 1 shows an example of a picking system to which a three-dimensional recognition process is applied.
This picking system is for performing the work of taking out the workpieces W housed in the housing box 6 one by one and transporting them to a predetermined position in the factory. A robot control device 3 that controls the operation of the robot 4 is included. Further, this picking system is provided with a stereo camera 1 and an object recognition device 2 in order to recognize the position and orientation of the workpiece W to be processed.

ステレオカメラ1は、位置関係が固定された3台のカメラ11,12,13により構成される。物体認識装置2には、カメラ11,12,13の位置関係や光軸の向きなどを表す情報や、認識対象のワークWの3次元モデルが登録されており、各カメラ11,12,13から入力したステレオ画像を処理して、ワークWの輪郭線の3次元情報を復元した後に、復元した3次元情報を3次元モデルと照合してワークWの位置や姿勢を認識する。この認識結果を示す情報は、物体認識装置2からロボット制御装置3に出力され、ロボット制御装置3において、ロボット4のアーム40の動作を制御する処理に使用される。   The stereo camera 1 is composed of three cameras 11, 12, and 13 whose positional relationship is fixed. In the object recognition device 2, information representing the positional relationship of the cameras 11, 12, 13, the direction of the optical axis, and the three-dimensional model of the workpiece W to be recognized are registered. After the input stereo image is processed to restore the three-dimensional information of the contour line of the workpiece W, the restored three-dimensional information is collated with the three-dimensional model to recognize the position and orientation of the workpiece W. Information indicating the recognition result is output from the object recognition device 2 to the robot control device 3, and is used for processing for controlling the operation of the arm 40 of the robot 4 in the robot control device 3.

図2は、物体認識装置2のハードウェア構成を示す。
この装置には、各カメラ11,12,13に対応する画像入力部21,22,23のほか、CPU24、メモリ25、入力部26、表示部27、通信インターフェース28などが設けられる。入力部26はキーボードやマウスであり、表示部27は液晶モニタである。入力部26および表示部27は、以下に述べる3次元モデルの作成の際に、ユーザが実物モデルの撮像状態を確認したり、選択操作や設定操作を行う用途に用いられる。通信インターフェース28は、ロボット制御装置4との通信に用いられる。
FIG. 2 shows a hardware configuration of the object recognition apparatus 2.
In this apparatus, in addition to the image input units 21, 22, and 23 corresponding to the cameras 11, 12, and 13, a CPU 24, a memory 25, an input unit 26, a display unit 27, a communication interface 28, and the like are provided. The input unit 26 is a keyboard and a mouse, and the display unit 27 is a liquid crystal monitor. The input unit 26 and the display unit 27 are used for applications in which a user confirms an imaging state of a real model, or performs a selection operation or a setting operation when creating a three-dimensional model described below. The communication interface 28 is used for communication with the robot control device 4.

メモリ25は、ROM,RAM,およびハードディスクなどの大容量メモリを含む。
CPU24は、メモリ25に格納されたプログラムに基づき、3次元計測およびワークWの認識に関する一連の処理を実行し、認識結果(具体的には、ワークWの位置を表す3次元座標、および3次元モデルに対する回転角度)を通信インターフェース28より出力する。
The memory 25 includes a large-capacity memory such as a ROM, a RAM, and a hard disk.
Based on the program stored in the memory 25, the CPU 24 executes a series of processes related to the three-dimensional measurement and the recognition of the workpiece W, and the recognition result (specifically, the three-dimensional coordinates representing the position of the workpiece W, and the three-dimensional The rotation angle with respect to the model is output from the communication interface 28.

また、メモリ25には3次元モデルを作成するためのプログラムも格納される。CPU24は、認識処理に先立ち、このプログラムに基づき、各カメラ11〜13から入力された実物モデルの画像を用いてワークWの3次元モデルを作成し、これをメモリ25内に登録する。   The memory 25 also stores a program for creating a three-dimensional model. Prior to the recognition process, the CPU 24 creates a three-dimensional model of the work W using the images of the real models input from the cameras 11 to 13 based on this program, and registers the three-dimensional model in the memory 25.

さらに図2には示していないが、この実施例の物体認識装置2には、各カメラ11,12,13に駆動信号を出力する回路が設けられ、CPU24には、この回路を介して各カメラ11〜13の撮像動作を制御する機能が設定される。この実施例では、入力部26で計測開始を指示する操作が行われたときに各カメラ11〜13に撮像を行わせるようにしている。   Further, although not shown in FIG. 2, the object recognition apparatus 2 of this embodiment is provided with a circuit for outputting a drive signal to each of the cameras 11, 12, and 13, and the CPU 24 receives each camera via this circuit. A function for controlling the imaging operations 11 to 13 is set. In this embodiment, when an operation for instructing the start of measurement is performed by the input unit 26, each of the cameras 11 to 13 is caused to capture an image.

(2)3次元計測処理について
上記の物体認識装置2では、ステレオ画像からエッジを検出した後に、特許文献1に記載された発明と同様に、「セグメント」と呼ばれる単位毎に3次元情報を復元し、さらにセグメント単位で3次元モデルとの照合を行うようにしている。図3は、この方法により1つのワークを認識するために実行される処理の概略手順を示すものである。以下、この図3のステップ符号を参照しつつ、この実施例における3次元認識処理を説明する。
(2) Three-dimensional measurement processing In the object recognition device 2 described above, after detecting an edge from a stereo image, the three-dimensional information is restored for each unit called “segment” in the same manner as the invention described in Patent Document 1. Furthermore, collation with the three-dimensional model is performed on a segment basis. FIG. 3 shows a schematic procedure of processing executed for recognizing one workpiece by this method. Hereinafter, the three-dimensional recognition process in this embodiment will be described with reference to the step codes in FIG.

まず、各カメラ11〜13によるステレオ撮像を行い、生成された各画像にエッジ抽出用のフィルタを適用して、画像中のエッジを検出する(ST1,2)。つぎに、検出されたエッジを細線化し(1画素幅のデータにする。)、細線化後のエッジを連結点や分岐点を基準に直線や曲線のセグメントに分割する(ST3,4)。この2次元画像上のエッジから抽出されたセグメントを、以下では「2次元セグメント」と呼ぶ。   First, stereo imaging is performed by each of the cameras 11 to 13, and an edge extraction filter is applied to each generated image to detect an edge in the image (ST1, 2). Next, the detected edge is thinned (set to 1 pixel width data), and the thinned edge is divided into straight or curved segments based on the connection points and branch points (ST3, 4). The segment extracted from the edge on the two-dimensional image is hereinafter referred to as “two-dimensional segment”.

つぎに、画像間で対応関係にある2次元セグメントを対応づける処理を実行する(ST5)。この対応づけでは、3つの画像のうちの1つを基準に、この基準画像の各2次元セグメントに順に着目し、着目した2次元セグメント毎に、他の2つの画像の中から対応する2次元セグメントを特定する。すなわち、着目した2次元セグメントに対し、エピポーラ条件を満たし、近傍のセグメントとの連結関係が整合する2次元セグメントを、各画像から検出することになる(詳細については非特許文献1等を参照されたい。)。   Next, a process of associating two-dimensional segments that have a correspondence relationship between images is executed (ST5). In this association, one two of the three images is used as a reference, and each two-dimensional segment of the reference image is focused in turn, and the two-dimensional corresponding to each of the two-dimensional segments focused on from the other two images. Identify the segment. That is, a two-dimensional segment satisfying the epipolar condition and matching with a neighboring segment is detected from each image with respect to the focused two-dimensional segment (refer to Non-Patent Document 1 or the like for details). I want.)

つぎに、上記の処理により対応づけられた各2次元セグメントの組み合わせ毎に、その対応関係から3次元情報を復元する処理を実行する(ST6)。
簡単に説明すると、対応づけられた2次元セグメントの組み合わせ毎に、そのセグメント間で対応関係にある画素の3次元座標を算出する。また、算出された3次元座標の分布状態を直線および円弧のモデルと照合して、これらの3次元座標の集合が直線/曲線のいずれに相当するかを判別する。この処理により、2次元セグメントの組み合わせ毎に、その組み合わせに対応する直線または曲線の3次元セグメントが特定される。
Next, for each combination of the two-dimensional segments associated by the above-described process, a process for restoring the three-dimensional information from the correspondence is executed (ST6).
Briefly, for each combination of two-dimensional segments associated with each other, the three-dimensional coordinates of the pixels having a correspondence relationship between the segments are calculated. Further, the calculated distribution state of the three-dimensional coordinates is collated with a model of a straight line and an arc to determine whether the set of these three-dimensional coordinates corresponds to a straight line / curve. With this process, for each combination of two-dimensional segments, a three-dimensional segment of a straight line or a curve corresponding to the combination is specified.

さらに、ST6では、各3次元セグメントについて、それぞれそのセグメントをあらかじめ設定された間隔毎にサンプリングし、セグメントの種別(直線または曲線)と各サンプリング点の3次元座標とを対応づけた情報を作成する。これにより、2次元セグメントから算出された3次元座標の数が少なかった3次元セグメントについても、サンプリング間隔を細かくすれば、当初より多くの3次元座標を得ることが可能になる。   Further, in ST6, for each three-dimensional segment, the segment is sampled at a predetermined interval, and information in which the segment type (straight line or curve) is associated with the three-dimensional coordinates of each sampling point is created. . As a result, even for a three-dimensional segment in which the number of three-dimensional coordinates calculated from the two-dimensional segment is small, it is possible to obtain more three-dimensional coordinates from the beginning if the sampling interval is made fine.

上記の処理により復元された3次元セグメントの集合が、認識対象のワークの3次元情報に相当する。つぎの段階では、3次元座標系のあらかじめ定めた基準位置に3次元モデルを設定し、この3次元モデルにより復元された3次元情報を照合することによって、3次元モデルに対するワークの位置ずれ量および回転角度を認識する(ST7)。   The set of three-dimensional segments restored by the above processing corresponds to the three-dimensional information of the workpiece to be recognized. In the next stage, a three-dimensional model is set at a predetermined reference position in the three-dimensional coordinate system, and the amount of workpiece displacement relative to the three-dimensional model is determined by collating the three-dimensional information restored by the three-dimensional model. The rotation angle is recognized (ST7).

ST7における照合処理では、各3次元セグメントの交点を特徴点として、各特徴点を総当たり式に対応づけながら、その対応づけをした場合の各3次元セグメントの一致度を算出し、一致度が最大になったときの対応づけを正しい対応関係として特定する。   In the matching process in ST7, the intersection of each three-dimensional segment is used as a feature point, and each feature point is associated with the brute force formula, and the degree of coincidence of each three-dimensional segment when the association is performed is calculated. The correspondence when the maximum is reached is specified as the correct correspondence.

ST7について、もう少し詳しく説明する。この実施例では、3次元モデル中の特定の特徴点を照合対象の3次元情報の各特徴点に順に対応づけて、対応づけ毎に、3次元モデル側の特徴点を対応点に移動させるのに必要なシフト量および回転角度を算出する。これらはいずれも、X,Y,Zの軸毎に算出される。つぎに、算出したシフト量および回転角度に基づいて、3次元モデルに含まれる全ての座標を変換し、変換後の3次元モデルと照合対象の3次元情報との一致度を算出する。   ST7 will be described in a little more detail. In this embodiment, a specific feature point in the 3D model is sequentially associated with each feature point of the 3D information to be collated, and the feature point on the 3D model side is moved to the corresponding point for each association. The shift amount and rotation angle necessary for the calculation are calculated. All of these are calculated for each of the X, Y, and Z axes. Next, all the coordinates included in the three-dimensional model are converted based on the calculated shift amount and rotation angle, and the degree of coincidence between the converted three-dimensional model and the three-dimensional information to be collated is calculated.

上記の処理を、3次元モデル側のすべての特徴点につき実行することにより、特徴点が総当たり式に対応づけられ、対応付け毎に一致度を求めることができる。この後、最終的に最も高い一致度が得られたときの座標変換に用いたシフト量および回転角度を、認識対象のワークの3次元モデルに対する位置ずれ量および回転角度として認識する。   By executing the above processing for all feature points on the three-dimensional model side, the feature points are associated with the brute force formula, and the degree of coincidence can be obtained for each association. Thereafter, the shift amount and the rotation angle used for the coordinate conversion when the highest degree of coincidence is finally obtained are recognized as the positional deviation amount and the rotation angle of the recognition target workpiece with respect to the three-dimensional model.

この後は、認識した位置ずれ量および回転角度をロボット制御装置3に出力し(ST8)、処理を終了する。   Thereafter, the recognized positional deviation amount and rotation angle are output to the robot controller 3 (ST8), and the process is terminated.

(3)3次元モデルの作成処理
3−1)原理説明
上記した3次元認識処理を実行するには、あらかじめ、ワークWの3次元モデルをメモリ25に登録する必要がある。この実施例の物体認識装置2では、ワークWの実物モデルを種々の方向からステレオ計測し、各計測結果から復元した3次元情報を統合する方法により、3次元モデルを作成するようにしている。以下、この処理について詳細に説明する。
なお、以下の図面では、ワークWの実物モデルをWMの符号で示すとともに、明細書中では、この実物モデルWMを「ワークモデルWM」という。
(3) Three-dimensional model creation process 3-1) Principle description In order to execute the above-described three-dimensional recognition process, it is necessary to register a three-dimensional model of the workpiece W in the memory 25 in advance. In the object recognition apparatus 2 of this embodiment, a three-dimensional model is created by a method in which a real model of the work W is measured in stereo from various directions and three-dimensional information restored from each measurement result is integrated. Hereinafter, this process will be described in detail.
In the following drawings, an actual model of the workpiece W is indicated by a symbol WM, and in the specification, the actual model WM is referred to as a “work model WM”.

この実施例では、図4(1)に示すように、ステレオカメラ1の位置および光軸方向を固定して、ステレオカメラ1に対するワークモデルWMの姿勢を変更しながら複数回のステレオ計測を実行する。   In this embodiment, as shown in FIG. 4A, the position and the optical axis direction of the stereo camera 1 are fixed, and the stereo measurement is performed a plurality of times while changing the posture of the work model WM with respect to the stereo camera 1. .

図中、X,Y,Zの各軸による3次元座標系は、3次元座標の算出用の座標系(以下、「計測座標系」という。)であり、ステレオカメラ1に対して一意に定められる。一方、X1,Y1,Z1の各軸による3次元座標系は、ワークモデルWMに対して一意に定められた座標系(以下、「ワーク座標系」という。)である。図4(1)では、X1,Y1,Z1の各軸がそれぞれX,Y,Z軸に平行な状態を示すが、ワークモデルWMの姿勢が変わると、ワーク座標系の各軸の方向もこれに応じて変化する。   In the figure, a three-dimensional coordinate system based on the X, Y, and Z axes is a coordinate system for calculating three-dimensional coordinates (hereinafter referred to as “measurement coordinate system”), and is uniquely determined for the stereo camera 1. It is done. On the other hand, the three-dimensional coordinate system based on the X1, Y1, and Z1 axes is a coordinate system uniquely defined for the work model WM (hereinafter referred to as “work coordinate system”). In FIG. 4A, the X1, Y1, and Z1 axes are parallel to the X, Y, and Z axes, respectively. However, when the posture of the work model WM changes, the direction of each axis in the work coordinate system also changes. It changes according to.

ワークモデルWMの姿勢はユーザが自由に定めることができるが、この実施例では、常にX1Z1平面に沿う特定の面がワーク支持面(この例ではXZ平面)に接するものとして、XZ平面に直交するY1軸に対してワークモデルWMを1回転させ、その間に、複数回の撮像を行うものとする。なお、このワークモデルWMの回転は、回転テーブルを用いずに、ユーザの手でワークモデルWMの向きを変更する方法により行うので、回転角度のみならず、計測座標系に対するワークモデルWMの位置も、毎回位置ずれする。   Although the posture of the work model WM can be freely determined by the user, in this embodiment, a specific surface along the X1Z1 plane is always in contact with the work support surface (XZ plane in this example), and is orthogonal to the XZ plane. It is assumed that the work model WM is rotated once with respect to the Y1 axis, and imaging is performed a plurality of times during that time. Since the work model WM is rotated by a method of changing the orientation of the work model WM with the user's hand without using the rotation table, not only the rotation angle but also the position of the work model WM with respect to the measurement coordinate system is determined. Every time, the position is shifted.

図4(2)は、ワーク座標系を基準にして、ワークモデルWMに対するステレオカメラ1の位置関係の変化を表したものである。図中、1〜12の数字入りの矩形は、それぞれ、撮像時のステレオカメラ1の場所を示し、また矩形内の数字は撮像の順序を示す。
これらの位置での撮像により生成されたステレオ画像は、いずれも3次元計測の対象となる。よって以下では、各矩形が表すステレオカメラの位置を「計測ポイント」と呼ぶ。また各計測ポイントに個別に言及する場合には、「計測ポイント[1]」「計測ポイント[2]」のように、計測の順序を表す数字を引用する。
FIG. 4B shows a change in the positional relationship of the stereo camera 1 with respect to the work model WM with reference to the work coordinate system. In the figure, rectangles with numbers 1 to 12 indicate the location of the stereo camera 1 at the time of imaging, and the numbers in the rectangles indicate the order of imaging.
Any stereo image generated by imaging at these positions is subject to three-dimensional measurement. Therefore, hereinafter, the position of the stereo camera represented by each rectangle is referred to as a “measurement point”. When individually referring to each measurement point, a number representing the order of measurement is quoted, such as “measurement point [1]” and “measurement point [2]”.

この実施例では、上記12個の計測ポイント毎に、図3のST1〜6と同様の処理を実行して3次元情報を復元する。また、計測ポイント[1]を除く各計測ポイントでは、それぞれその計測ポイントで復元した3次元情報を1つ前の計測ポイントの3次元情報と照合することにより、一段階前の3次元情報に対する位置ずれ量および回転角度を認識する。これらの認識処理は、いずれも図3のST7で実施されるのと同様の方法により行われる。   In this embodiment, the same processing as ST1 to ST6 in FIG. 3 is executed for each of the 12 measurement points to restore the three-dimensional information. Further, at each measurement point excluding the measurement point [1], the three-dimensional information restored at the measurement point is collated with the three-dimensional information of the previous measurement point, so that the position relative to the previous three-dimensional information is obtained. Recognize deviation and rotation angle. These recognition processes are all performed by the same method as that performed in ST7 of FIG.

なお、最後の計測ポイント[12]については、計測ポイント[11]の3次元情報に対する位置ずれ量および回転角度に加えて、計測ポイント[1]の3次元情報に対する位置ずれ量および回転角度も求める。ただし、計測ポイント[12]から再度計測ポイント[1]に移行して、計測を再実行し、復元された3次元情報の計測ポイント[12]の3次元情報に対する位置ずれ量および回転角度を求めてもよい。   For the last measurement point [12], in addition to the displacement amount and rotation angle for the three-dimensional information of the measurement point [11], the displacement amount and rotation angle for the three-dimensional information of the measurement point [1] are also obtained. . However, the measurement point [12] is transferred to the measurement point [1] again, the measurement is re-executed, and the positional deviation amount and the rotation angle of the restored three-dimensional information with respect to the three-dimensional information of the measurement point [12] are obtained. May be.

さらにこの実施例では、計測ポイント毎に復元された3次元情報の精度を確認し、良好であることを確認した2以上の3次元情報を選択して、選択された情報を位置合わせした後に統合するようにしている。これらの処理の詳細については、後に説明する。   Furthermore, in this embodiment, the accuracy of the three-dimensional information restored for each measurement point is confirmed, two or more three-dimensional information confirmed to be good is selected, and the selected information is aligned and integrated. Like to do. Details of these processes will be described later.

つぎに、この実施例では、ワークモデルWMの表面の適所に三角形のマークMを付けて、ステレオ計測を行っている。このマークMはシールとして構成され、ワークモデルWMの平坦な面(この実施例では上面の中央部)に貼付される。各計測ポイントは、すべてのカメラ11〜13の視野にマークMが含まれる状態にすることを条件に定められる。したがって、いずれの計測ポイントでも、マークMの各辺を表す3次元セグメントを含む3次元情報が復元される。   Next, in this embodiment, stereo measurement is performed by attaching a triangular mark M to an appropriate position on the surface of the work model WM. This mark M is configured as a seal and is affixed to a flat surface of the work model WM (in this embodiment, the center of the upper surface). Each measurement point is determined on condition that the mark M is included in the visual field of all the cameras 11 to 13. Therefore, the three-dimensional information including the three-dimensional segment representing each side of the mark M is restored at any measurement point.

図5は、上記のマークMを付したワークモデルWMにつき、上記12の計測ポイントで復元された3次元情報のうちの3つ(図中、a,b,cで示す。)を用いて3次元モデルを作成する場合の処理手順を、模式的に示す。なお、図中の3次元情報aは、図4(2)の計測ポイント[12]で復元されたものである。また、3次元情報bは計測ポイント[3]で復元されたものであり、3次元情報cは計測ポイント[6]で復元されたものである。また、いずれの3次元情報にも、マークMの情報mが含まれている(ただし、情報mの実質的な内容は計測ポイントによって異なる。)。   FIG. 5 shows three of the three-dimensional information (indicated by a, b, and c in the figure) among the three-dimensional information restored at the 12 measurement points for the work model WM with the mark M. A processing procedure for creating a dimensional model is schematically shown. Note that the three-dimensional information a in the figure is restored at the measurement point [12] in FIG. The three-dimensional information b is restored at the measurement point [3], and the three-dimensional information c is restored at the measurement point [6]. In addition, the information m of the mark M is included in any three-dimensional information (however, the substantial content of the information m varies depending on the measurement point).

この例では、3次元情報aを基準に、この基準の3次元情報aに対する位置ずれおよび角度ずれが解消するように、他の3次元情報b,cを座標変換する。そして、変換後の3次元情報b´,c´を基準の3次元情報aと統合することによって、それぞれの情報の特徴を含む3次元情報dを作成する。さらに、この統合された3次元情報dから三角形のマークMに対応する情報mを消去することにより、ワークモデルWMの3次元形状のみを表す3次元情報eを作成し、この情報eを3次元モデルに設定する。   In this example, on the basis of the three-dimensional information a, the other three-dimensional information b and c are coordinate-transformed so as to eliminate the positional deviation and the angular deviation with respect to the reference three-dimensional information a. Then, by integrating the converted three-dimensional information b ′ and c ′ with the reference three-dimensional information a, three-dimensional information d including the characteristics of each information is created. Further, by deleting the information m corresponding to the triangular mark M from the integrated three-dimensional information d, three-dimensional information e representing only the three-dimensional shape of the work model WM is created. Set to model.

上記の3次元情報の座標変換処理は、先に計測ポイント毎に求めた位置ずれ量および回転角度を用いて行われる。たとえば、計測ポイント[3]で復元した3次元情報bを計測ポイント[12]で復元した3次元情報aに位置合わせするには、計測ポイント[3]と[2]、計測ポイント[2]と[1]、計測ポイント[1]と[12]の各組み合わせにつき求めた位置ずれ量および回転角度を用いて、座標変換を行う。計測ポイント[6]で復元した3次元情報cについても同様に、計測ポイント[6]から計測ポイント[12]までの範囲(この場合は時計回り・半時計回りのいずれでもよい。)で算出された位置ずれ量および回転角度を用いて、座標変換を実行することにより、3次元情報aへの位置合わせを行う。   The coordinate conversion process of the above three-dimensional information is performed using the positional deviation amount and the rotation angle previously obtained for each measurement point. For example, in order to align the 3D information b restored at the measurement point [3] with the 3D information a restored at the measurement point [12], the measurement points [3] and [2], the measurement point [2], [1] Coordinate conversion is performed using the positional deviation amount and the rotation angle obtained for each combination of the measurement points [1] and [12]. Similarly, the three-dimensional information c restored at the measurement point [6] is calculated in the range from the measurement point [6] to the measurement point [12] (in this case, either clockwise or counterclockwise may be used). By performing coordinate conversion using the amount of misalignment and the rotation angle, alignment with the three-dimensional information a is performed.

上記のように、間隔を隔てた計測ポイント間の位置ずれ量および回転角度を求める際に、これらの間にある各計測ポイントを隣り合うもの毎に組み合わせて、計測ポイントの組毎に3次元情報の位置ずれ量および回転角度を算出するのは、共通する特徴をできるだけ多く含む情報同士を照合することによって、照合の精度を確保するためである。また、後記する3次元モデルへの情報の追加処理を行う場合にも、計測ポイント間の3次元情報の位置ずれ量および回転角度を利用して、座標変換処理を行う。   As described above, when obtaining the positional deviation amount and the rotation angle between the measurement points separated from each other, the measurement points between them are combined for each adjacent one, and the three-dimensional information for each set of measurement points. The reason why the positional deviation amount and the rotation angle are calculated is to ensure the accuracy of collation by collating information including as many common features as possible. In addition, even when information is added to the three-dimensional model, which will be described later, coordinate conversion processing is performed using the amount of positional deviation and the rotation angle of the three-dimensional information between measurement points.

つぎに、三角形のマークMをワークモデルWMに貼付する理由について説明する。
先に述べたように、この実施例で3次元情報同士を照合する場合には、それぞれの情報中の特徴点を総当たり式で対応づけて一致度を求め、最も一致度の高い対応づけを正しいものとして確定する。しかし、認識対象物の形状によっては、一致度が最大になる対応づけが必ずしも正しくはならない場合がある。
Next, the reason for attaching the triangular mark M to the work model WM will be described.
As described above, when three-dimensional information is collated in this embodiment, feature points in each information are associated with a brute force formula to obtain a degree of coincidence, and the correspondence with the highest degree of coincidence is obtained. Confirm as correct. However, depending on the shape of the recognition target, the correspondence that maximizes the degree of matching may not always be correct.

たとえば、曲面や面取りされた部位のエッジを計測対象とする場合や、繰り返し構造を持つ部位が計測対象となる場合には、図6,7に示すような誤った対応づけが行われたときの一致度が最大になり、その誤った対応づけが確定してしまう可能性がある。   For example, when a measurement target is an edge of a curved surface or a chamfered part, or when a part having a repetitive structure is a measurement target, an incorrect correspondence as shown in FIGS. There is a possibility that the degree of coincidence is maximized and the incorrect association is determined.

図6は、認識対象物Sbのコーナー部に対してf1,f2の2方向からそれぞれステレオ計測を行う例を示すものである。この図は、認識対象物Sbの一断面であって、図中のR1,R2は、平坦面と曲率が大きな面との境界位置に相当する。
この例の場合、f1の方向からの計測では、図中のR1の位置に3次元のエッジが復元されるのに対し、f2の方向からの計測では、R2の位置に3次元のエッジが復元される。したがって、それぞれの方向からの計測により復元された3次元情報を対応づける際に、R1に対応するエッジとR2に対応するエッジとが誤って対応づけされ、その分、位置合わせの精度が劣化するおそれがある。
FIG. 6 shows an example in which stereo measurement is performed on the corner portion of the recognition object Sb from two directions, f1 and f2. This figure is a cross section of the recognition object Sb, and R1 and R2 in the figure correspond to the boundary position between the flat surface and the surface having a large curvature.
In this example, the measurement from the direction f1 restores the three-dimensional edge at the position R1 in the figure, while the measurement from the direction f2 restores the three-dimensional edge at the position R2. Is done. Accordingly, when associating the three-dimensional information restored by measurement from each direction, the edge corresponding to R1 and the edge corresponding to R2 are erroneously associated with each other, and the alignment accuracy is deteriorated accordingly. There is a fear.

図7は、繰り返し構造を含む部位の対応づけに誤りが生じた例を示す。繰り返し構造のエッジが不鮮明で、3次元情報の復元精度が悪くなった場合などには、このような誤った対応づけが生じるおそれがある。   FIG. 7 shows an example in which an error occurs in associating a part including a repetitive structure. Such an incorrect association may occur when the edge of the repetitive structure is unclear and the restoration accuracy of the three-dimensional information deteriorates.

このほか、計測対象物に対称形の部位が含まれる場合にも、対称形の部位の表と裏とが誤って対応づけられた状態が、正しいものとして認識される可能性がある。   In addition, even when a symmetric part is included in the measurement object, there is a possibility that a state in which the front and back of the symmetric part are associated with each other by mistake is recognized as correct.

この実施例では、毎回のステレオ計測でワークモデルWMに対する計測方向を任意の角度で変更する方法をとっているため、3次元情報を統合するには、3次元情報どうしを照合して、それぞれの間の位置ずれ量や角度ずれ量(回転角度)を求め、これらに基づく座標変換を行う必要がある。したがって、3次元情報間の照合において上記のような誤った対応づけが行われると、統合される3次元情報を正しく位置合わせできなくなり、3次元モデルの精度を確保できない。三角形のマークMは、このような誤りを防止するために付けられたものである。   In this embodiment, the method of changing the measurement direction with respect to the work model WM at an arbitrary angle in each stereo measurement is taken. Therefore, in order to integrate the three-dimensional information, the three-dimensional information is collated, It is necessary to obtain a positional deviation amount and an angular deviation amount (rotation angle) between them and perform coordinate conversion based on them. Therefore, if the above-described erroneous association is performed in the comparison between the three-dimensional information, the three-dimensional information to be integrated cannot be correctly aligned, and the accuracy of the three-dimensional model cannot be ensured. The triangular mark M is attached to prevent such an error.

この実施例で使用するマークMが表す三角形は、図8に示すように、各辺の比が6:7:8になるように設定されている。この比率によれば、マークMの各頂点A,B,Cを容易に特定することができるから、たとえば頂点Aから辺BCへの垂線の方向によって、マークMの向きを一意に特定することができる。また図9に示すように、同じ形状の三角形A´B´C´と位置合わせする場合にも、位置合わせの精度を確保することができる。   The triangle represented by the mark M used in this embodiment is set so that the ratio of each side is 6: 7: 8, as shown in FIG. According to this ratio, the vertices A, B, and C of the mark M can be easily specified. For example, the direction of the mark M can be uniquely specified by the direction of the perpendicular from the vertex A to the side BC. it can. Further, as shown in FIG. 9, the alignment accuracy can be ensured when aligning with the triangle A′B′C ′ having the same shape.

図9(1)では、上記の比率による三角形ABCとこれに合同な三角形A´B´C´から、それぞれ頂点を1個ずつ選択し、選択された頂点を基準に各三角形を位置合わせした結果を示す。この図に示すように、各三角形は、正しい対応関係にある頂点が組み合わせられたときでなければ、完全に重なり合うことはない。   In FIG. 9 (1), one vertex is selected from each of the triangle ABC by the above ratio and the congruent triangle A′B′C ′, and the respective triangles are aligned based on the selected vertex. Indicates. As shown in this figure, triangles do not completely overlap unless vertices in the correct correspondence are combined.

上記の三角形の対応づけについて、発明者らは、実際に頂点の組み合わせ毎に、三角形全体の一致度を求めてみた。図9(2)は、その結果を示すグラフである。このグラフに示すとおり、各頂点が正しく対応づけられた場合の一致度を1とすると、他の対応関係による一致度は最大でも0.4程度となる。これにより、三角形の対応関係の正否を正しく判定できることが判明した。   Regarding the correspondence of the above triangles, the inventors actually calculated the degree of coincidence of the entire triangle for each vertex combination. FIG. 9 (2) is a graph showing the results. As shown in this graph, when the degree of coincidence when the vertices are correctly associated with each other is 1, the degree of coincidence due to other correspondences is about 0.4 at the maximum. As a result, it was found that the correctness of the correspondence between triangles can be correctly determined.

上記のとおり、図8に示した形状の三角形によれば、三角形の各頂点が正しく対応づけされた場合と対応づけに誤りがある場合とで、一致度に大きな差異が生じる。この三角形の各辺を3次元セグメントとして対応づけを行っても、同様の効果を得られるはずであるから、マークMの3次元セグメントを含む3次元情報全体を照合した場合には、三角形の各辺の3次元セグメントに関する一致度が全体の一致度に大きく影響を及ぼすようになる。   As described above, according to the triangle having the shape shown in FIG. 8, there is a large difference in the degree of coincidence between the case where the vertices of the triangle are correctly associated and the case where the correspondence is incorrect. Even if each side of the triangle is associated as a three-dimensional segment, the same effect should be obtained. Therefore, when the entire three-dimensional information including the three-dimensional segment of the mark M is collated, each triangle The degree of coincidence regarding the three-dimensional segment of the side greatly affects the degree of coincidence of the whole.

すなわち、ワークモデルWMの本来の3次元セグメントの中に誤った位置合わせを生じさせるような要素があっても、誤った対応づけが行われた場合には、三角形の3次元セグメントの一致度が大きく低下することによって3次元情報全体の一致度が引き下げられる。一方、三角形の3次元セグメントを含む各3次元セグメントが正しく位置合わせされた場合には、いずれの3次元セグメントでも一致度が高くなるから、3次元情報全体の一致度も高い値になる。よって、正しく対応づけられている場合の一致度を他の場合より大きくすることができ、位置合わせの精度を確保することができる。   That is, even if there is an element in the original three-dimensional segment of the work model WM that causes erroneous alignment, if the correspondence is performed incorrectly, the matching degree of the triangular three-dimensional segment is By greatly decreasing, the degree of coincidence of the entire three-dimensional information is lowered. On the other hand, when each three-dimensional segment including a triangular three-dimensional segment is correctly aligned, the degree of coincidence increases in any three-dimensional segment, and the degree of coincidence of the entire three-dimensional information also becomes a high value. Therefore, the degree of coincidence when correctly associated can be made larger than in other cases, and the alignment accuracy can be ensured.

なお、マークMが示す三角形の形状は図8の例に限定されるものではなく、上記した効果を得ることができ、各辺の長さが異なるものであれば、辺の比率は問わない。また三角形に限らず、頂点が4点以上で向きを一意に特定できる多角形によるマークを作成してもよい。   The shape of the triangle indicated by the mark M is not limited to the example of FIG. 8, and the above-described effects can be obtained, and the ratio of the sides is not limited as long as the lengths of the sides are different. Further, the mark is not limited to a triangle, and a polygonal mark that has four or more vertices and whose direction can be uniquely specified may be created.

つぎに、上記のマークMを平坦面に貼付する理由について説明する。
マークMを曲面に貼付すると、三角形の各辺も曲線の3次元セグメントとして認識される可能性が高くなる上、曲面の曲率によってマークMの復元される形状が変動する。したがって、マークMが曲面に取り付けられた場合には、その3次元情報を正しく復元できたとしても、復元された3次元情報は、本来の三角形の形状とは異なる形状を表す可能性が高いから、以下に述べるモデル三角形との照合による3次元情報の検証処理を安定して行うのが困難になる。
Next, the reason for applying the mark M to the flat surface will be described.
When the mark M is pasted on the curved surface, each side of the triangle is more likely to be recognized as a three-dimensional segment of the curve, and the shape of the mark M to be restored varies depending on the curvature of the curved surface. Therefore, when the mark M is attached to the curved surface, even if the three-dimensional information can be correctly restored, the restored three-dimensional information is likely to represent a shape different from the original triangular shape. Therefore, it is difficult to stably perform the verification process of the three-dimensional information by collation with the model triangle described below.

この実施例では、上記のマークMを、復元された3次元情報の精度を確認する目的にも使用している。この実施例では、種々の方向からワークを計測するが、いずれの計測ポイントでも、精度良く3次元情報を復元できるとは限らない。ワークの向きによっては、計測用のパラメータの誤差が大きく反映されたり、誤認識されやすい特徴を多く含む画像が生成されるなどして、3次元情報の精度が劣化することがある。   In this embodiment, the mark M is also used for the purpose of confirming the accuracy of the restored three-dimensional information. In this embodiment, the workpiece is measured from various directions, but the three-dimensional information cannot be accurately restored at any measurement point. Depending on the orientation of the workpiece, the accuracy of the three-dimensional information may deteriorate due to a large reflection of measurement parameter errors or the generation of an image containing many features that are easily misrecognized.

また、この実施例では、毎回のステレオ計測におけるワークモデルWMの位置をユーザが定めているため、ユーザのミスにより各カメラの視野にマークMが含まれない状態で計測が行われる場合がある。マークMの情報を含まない3次元情報では、位置合わせの精度が悪くなる可能性があるから、事前に統合対象から除外する必要がある。   In this embodiment, since the user determines the position of the work model WM in each stereo measurement, measurement may be performed in a state where the mark M is not included in the field of view of each camera due to a user's mistake. In the three-dimensional information that does not include the information of the mark M, there is a possibility that the alignment accuracy may deteriorate, so it is necessary to exclude it from the integration target in advance.

上記の点から、この実施例では、計測ポイント毎にマークMの3次元情報が良好に復元されているかどうかを判定し、良好であると判定した3次元情報を統合処理に使用するようにしている。   From this point, in this embodiment, it is determined whether or not the three-dimensional information of the mark M has been successfully restored for each measurement point, and the three-dimensional information determined to be good is used for the integration process. Yes.

具体的に判定処理では、図10の(a)に示すように、実際の三角形に近い情報が復元されている場合に、この情報を含む3次元情報全体を良好であるとして統合の対象にする。他方、図10(b)のように辺が曲線化された場合や、図10(c)のように頂点が正しく復元できなかった場合など、三角形の再現性が悪い場合には、3次元情報全体も良好でないと判断して、統合の対象から除外する。   Specifically, in the determination process, as shown in FIG. 10 (a), when information close to an actual triangle is restored, the entire three-dimensional information including this information is considered to be a good integration target. . On the other hand, when the reproducibility of the triangle is poor, such as when the side is curved as shown in FIG. 10B or when the vertex cannot be correctly restored as shown in FIG. It is judged that the whole is not good and is excluded from integration.

さらに、この実施例では、3次元情報が良好でないと判定した場合には、その3次元情報を破棄して、再度の計測を行ったり、計測ポイントを変更するなどの対応をとる。また、計測を所定回数やり直しても、良好な3次元情報を得られない場合には、ステレオカメラ1の位置調整や3次元キャリブレーションの再実行など、最初の設定処理からやり直す。このような処理により、統合に用いられる3次元情報の精度を確保するとともに、統合の際の座標変換に必要な位置ずれ量や回転角度が精度の悪い3次元情報により算出されるのを防止して、3次元モデルの精度を確保することができる。   Furthermore, in this embodiment, when it is determined that the three-dimensional information is not good, the three-dimensional information is discarded, and measures such as performing another measurement or changing a measurement point are taken. Further, if good 3D information cannot be obtained even if measurement is repeated a predetermined number of times, the initial setting processing such as position adjustment of the stereo camera 1 and re-execution of 3D calibration is performed again. Such processing ensures the accuracy of the three-dimensional information used for the integration, and prevents the positional deviation amount and the rotation angle necessary for the coordinate conversion during the integration from being calculated by the inaccurate three-dimensional information. Thus, the accuracy of the three-dimensional model can be ensured.

3次元情報の精度を判定する処理は、具体的には、マークMの幾何学的情報を表す3次元モデルデータ、具体的には、三角形の三辺の好ましい3次元セグメントを表すデータの組み合わせを用いて行われる(以下、このモデルデータを「モデル三角形」という。)。すなわち、各計測ポイントの3次元情報をモデル三角形により照合して、モデル三角形に対する一致度を求める。この照合も、3次元モデルによる照合の場合と同様の方法、すなわちモデル三角形の各特徴点を3次元情報中の各特徴点に総当たり式に対応づけて、モデル三角形に対する一致度が最も高いときの対応づけを確定する方法により行われる。   Specifically, the process for determining the accuracy of the three-dimensional information is a combination of three-dimensional model data representing the geometric information of the mark M, specifically, a combination of data representing the preferred three-dimensional segments of the three sides of the triangle. (Hereinafter, this model data is referred to as “model triangle”). That is, the three-dimensional information of each measurement point is collated with the model triangle to obtain the degree of coincidence with the model triangle. This matching is also performed in the same manner as in the case of matching with the three-dimensional model, that is, when each feature point of the model triangle is associated with each feature point in the three-dimensional information with a brute force formula and the degree of coincidence with the model triangle is the highest. This is done by a method of determining the correspondence of.

上記の照合を行った後は、算出された一致度を所定のしきい値と比較し、一致度がしきい値を上回る場合には3次元情報を良好と判定し、一致度がしきい値以下であれば、該当する3次元情報を削除する。   After the above collation, the calculated degree of coincidence is compared with a predetermined threshold, and if the degree of coincidence exceeds the threshold, it is determined that the three-dimensional information is good, and the degree of coincidence is the threshold. If the following, the corresponding three-dimensional information is deleted.

このように、ワークモデルWMに三角形のマークMを付けることによって、毎時の計測により復元された3次元情報が良好であることを確認でき、また3次元情報間の照合処理の精度を確保することによって、位置合わせのための座標変換処理の精度を高めることができる。よって、これらの処理を経た3次元情報を統合することによって、精度の良い3次元情報を作成することができる。   In this way, by attaching the triangular mark M to the work model WM, it is possible to confirm that the three-dimensional information restored by the hourly measurement is good and to ensure the accuracy of the matching process between the three-dimensional information. Thus, the accuracy of coordinate conversion processing for alignment can be improved. Therefore, highly accurate three-dimensional information can be created by integrating three-dimensional information that has undergone these processes.

3−2) 3次元モデルの作成手順の具体例
図5に示した方法により、各種計測方向からの認識処理に使用可能な3次元モデルを作成するには、できるだけ多くの計測ポイントの3次元情報を選択して統合する必要があるように思われる。しかし、統合される3次元情報の数が増えると、3次元モデルの容量が増大し、この3次元モデルを用いた認識処理に支障が生じるおそれがある。
3-2) Specific example of 3D model creation procedure In order to create a 3D model that can be used for recognition processing from various measurement directions by the method shown in FIG. 5, 3D information of as many measurement points as possible is used. It seems necessary to select and integrate. However, when the number of three-dimensional information to be integrated increases, the capacity of the three-dimensional model increases, and there is a possibility that a recognition process using the three-dimensional model may be hindered.

この点に鑑み、この実施例では、計測ポイント毎に復元した複数の3次元情報のうちの一部(2以上)を統合して仮の3次元モデルを作成した後に、この仮の3次元モデルに不足する情報を追加する方法によって、3次元モデルの容量を抑えながらその精度を確保できるようにしている。   In view of this point, in this embodiment, after a part (two or more) of a plurality of three-dimensional information restored for each measurement point is integrated to create a temporary three-dimensional model, the temporary three-dimensional model is created. The method of adding information that is insufficient to ensure the accuracy while suppressing the capacity of the three-dimensional model.

図11は、モデル作成処理の具体例を示す。以下、この図を参照して説明すると、この実施例では、前出の12個の計測ポイントのうち計測ポイント[12][3][6][9]の4箇所での計測により復元された3次元情報を選択し、これらを位置合わせした後に統合して仮の3次元モデルを作成している。この場合も、先の図5の例と同様に、計測ポイント[12]の3次元情報を基準に、他の3つの3次元情報を基準の3次元情報に整合するように座標変換し、変換後の各3次元情報と基準の3次元情報とを統合し、統合後の3次元情報からマークMに対応する情報を消去したものを、仮の3次元モデルとする。   FIG. 11 shows a specific example of the model creation process. Hereinafter, with reference to this figure, in this example, it was restored by measurement at the four measurement points [12] [3] [6] [9] among the above-mentioned 12 measurement points. Three-dimensional information is selected, and these are aligned and integrated to create a temporary three-dimensional model. Also in this case, as in the example of FIG. 5, the coordinate conversion is performed on the basis of the three-dimensional information of the measurement point [12] so that the other three three-dimensional information matches the reference three-dimensional information. Each subsequent three-dimensional information and reference three-dimensional information are integrated, and information obtained by deleting information corresponding to the mark M from the integrated three-dimensional information is defined as a temporary three-dimensional model.

つぎに、統合処理に使用されなかった3次元情報、すなわち[1][2][4][5][7][8][10][11]の各計測ポイントの3次元情報を対象に、仮の3次元モデルを用いた認識処理を実行する。そして、認識された位置ずれ量および回転角度が正しいか否かを判定し、正しくないと判定された3次元情報を3次元モデルに位置合わせして追加する。図11では、計測ポイント[10]の3次元情報に対する認識処理が正しく行われなかったものとして、この3次元情報を3次元モデルに位置合わせして追加する例を示している。   Next, three-dimensional information that has not been used for the integration process, that is, three-dimensional information of each measurement point of [1] [2] [4] [5] [7] [8] [10] [11] is targeted. Then, recognition processing using a temporary three-dimensional model is executed. Then, it is determined whether or not the recognized positional deviation amount and rotation angle are correct, and the three-dimensional information determined to be incorrect is aligned and added to the three-dimensional model. FIG. 11 shows an example in which the three-dimensional information is aligned and added to the three-dimensional model, assuming that the recognition process for the three-dimensional information of the measurement point [10] has not been performed correctly.

なお、統合処理に使用されなかった3次元情報を認識する場合には、先のモデル三角形を用いた照合の結果に基づき、これらの3次元情報からマークの情報を削除する。実際の認識対象のワークWにはマークMは付けられていないので、このようにすることで、実際の認識処理の確度をチェックすることができる。また、仮の3次元モデルに3次元情報を追加する場合にも、マークMの情報は追加されない。   When recognizing three-dimensional information that has not been used for the integration process, the mark information is deleted from the three-dimensional information based on the result of matching using the previous model triangle. Since the mark M is not attached to the actual workpiece W to be recognized, the accuracy of the actual recognition processing can be checked by doing so. Also, when adding three-dimensional information to the temporary three-dimensional model, the mark M information is not added.

つぎに、上記の仮の3次元モデルを作成する際に、計測ポイント[3][6][9]の各3次元情報を基準の3次元情報に位置合わせする処理では、先に説明したように、計測ポイント毎に求めた位置ずれ量および回転角度から基準の3次元情報(計測ポイント「12」の情報)に対する位置ずれ量および回転角度を特定し、これらを用いた座標変換処理を行う。   Next, when creating the provisional three-dimensional model, the process of aligning the three-dimensional information of the measurement points [3] [6] [9] with the reference three-dimensional information as described above. In addition, the positional deviation amount and the rotation angle with respect to the reference three-dimensional information (information of the measurement point “12”) are specified from the positional deviation amount and the rotation angle obtained for each measurement point, and coordinate conversion processing using these is performed.

仮の3次元モデルを用いた認識処理の結果の正否の判定や、追加対象の3次元情報を3次元モデルに位置合わせするための座標変換も、上記と同様の方法で3次元モデルに対する処理対象の情報の位置ずれ量および回転角度(具体的には3次元モデル中の基準の3次元情報に対応するもの)を特定することによって可能になる。
計測ポイント[10]の3次元情報を例に説明すると、計測ポイント[10]と[11]との間、および計測ポイント[11]と「12」との間でそれぞれ認識された位置ずれ量および回転角度を累計することによって、この3次元情報の仮の3次元モデルに対する位置ずれ量および回転角度を特定することができる。ここで、特定された位置ずれ量および回転角度を3次元モデルとの直接照合により求めた位置ずれ量および回転角度と比較し、両者の間に許容値を超える差異があれば、3次元モデルによる認識処理の結果は正しくないと判定する。また、上記の計測ポイント毎の照合結果から特定した位置ずれ量および回転角度を用いて、計測ポイント[10]の3次元情報を座標変換することにより、3次元モデルへの位置合わせを行う。
Whether the result of recognition processing using the provisional 3D model is correct or not, and coordinate conversion for aligning the 3D information to be added to the 3D model are also processed for the 3D model in the same manner as described above. This is possible by specifying the positional deviation amount and the rotation angle of the information (specifically, the information corresponding to the reference three-dimensional information in the three-dimensional model).
The three-dimensional information of the measurement point [10] will be described as an example. The displacement amount recognized between the measurement points [10] and [11] and between the measurement points [11] and “12”, and By accumulating the rotation angles, it is possible to specify the amount of positional deviation and the rotation angle of this three-dimensional information with respect to the provisional three-dimensional model. Here, the specified positional deviation amount and rotation angle are compared with the positional deviation amount and rotation angle obtained by direct comparison with the three-dimensional model, and if there is a difference exceeding the allowable value between them, the three-dimensional model is used. It is determined that the result of the recognition process is not correct. In addition, using the positional deviation amount and the rotation angle specified from the collation result for each measurement point, the three-dimensional information of the measurement point [10] is coordinate-converted to perform alignment with the three-dimensional model.

この実施例では、毎回の計測方向を任意に設定するが、図示の各計測ポイントによれば、直前の計測方向とは極端に異なる方向が設定されることはないので、いずれの計測ポイントでも、直前の計測による3次元情報に共通する特徴が多く含まれる3次元情報が復元される可能性が高い。   In this embodiment, the measurement direction of each time is arbitrarily set, but according to each measurement point shown in the figure, since a direction extremely different from the immediately previous measurement direction is not set, any measurement point, There is a high possibility that the three-dimensional information including many features common to the three-dimensional information obtained by the immediately previous measurement is restored.

したがって、各計測ポイントでは、一段階前の計測ポイントの3次元情報に対する位置ずれ量および回転角度を精度良く求めることができるから、この精度の良い位置ずれ量や回転角度に基づいて、仮の3次元モデルによる認識結果が正しいか否かを容易に判定することが可能になる。また、仮の3次元モデルによる直接照合で位置ずれ量および回転角度を正しく認識できなかった3次元情報についても同様に、この3次元情報に対応する計測と3次元モデル中の基準の3次元情報に対応する計測との間に実施された各計測に関連する照合結果に基づき、3次元モデルに対する位置ずれ量および回転角度を特定し、これらをパラメータとして、仮の3次元モデルに位置合わせするための座標変換を精度良く行うことができる。   Accordingly, since each measurement point can accurately determine the positional deviation amount and the rotation angle with respect to the three-dimensional information of the previous measurement point, based on the accurate positional deviation amount and the rotational angle, the provisional 3 It is possible to easily determine whether or not the recognition result by the dimensional model is correct. Similarly, for the three-dimensional information in which the positional deviation amount and the rotation angle could not be correctly recognized by the direct comparison with the temporary three-dimensional model, the measurement corresponding to the three-dimensional information and the reference three-dimensional information in the three-dimensional model are similarly applied. In order to specify the positional deviation amount and the rotation angle with respect to the three-dimensional model based on the collation result related to each measurement performed between the measurement and the measurement corresponding to, and to align with the temporary three-dimensional model using these as parameters The coordinate conversion can be performed with high accuracy.

つぎに図12は、ステレオ計測を行ってから3次元モデルを登録するまでの処理の手順をフローチャートにまとめたものである。以下、このフローチャートの流れに沿って、この実施例の3次元モデルの作成手順を説明する。   Next, FIG. 12 is a flowchart summarizing a processing procedure from performing stereo measurement to registering a three-dimensional model. The procedure for creating the three-dimensional model of this embodiment will be described below along the flow of this flowchart.

この実施例では、計測時のワークモデルWMの位置決めをユーザの裁量にゆだねることから、計測処理の間は、各カメラ11〜13からのプレビュー画像を表示部27に表示するようにしている。ユーザが、この表示画面で各カメラ11〜13によりワークモデルWMやマークMが正しく撮像されているかどうかを確認して、計測指示の操作を行うと、図12中の「ステレオ計測」のステップ(ST101)が実行される。このステップST101では、具体的にはステレオ撮像から3次元情報の復元までの処理(図3のST1〜6と同様のもの)が実行される。   In this embodiment, since the positioning of the work model WM at the time of measurement is left to the discretion of the user, preview images from the respective cameras 11 to 13 are displayed on the display unit 27 during the measurement process. When the user confirms whether or not the work model WM and the mark M are correctly captured by the cameras 11 to 13 on this display screen and performs a measurement instruction operation, the step of “stereo measurement” in FIG. ST101) is executed. In step ST101, specifically, processing from stereo imaging to restoration of three-dimensional information (similar to ST1 to ST6 in FIG. 3) is executed.

つぎに、復元された3次元情報をモデル三角形により照合し、3次元情報の精度を判定する(ST102)。ここでの判定は、一致度に基づく自動判定としてもよいが、照合結果を表示して、その表示画面でユーザの判定を受け付ける方法により行ってもよい。   Next, the restored three-dimensional information is collated with a model triangle to determine the accuracy of the three-dimensional information (ST102). The determination here may be automatic determination based on the degree of coincidence, or may be performed by a method of displaying a collation result and accepting a user's determination on the display screen.

ここで、3次元情報が良好でないと判定された場合(ST103が「NO」)には、復元された3次元情報を消去し、表示部27に、エラーメッセージなどを表示する。これに応じて、ユーザは、ワークモデルWMの位置を変更するなどして、計測指示をやり直すことになる。   If it is determined that the three-dimensional information is not good (ST103 is “NO”), the restored three-dimensional information is deleted, and an error message or the like is displayed on the display unit 27. In response to this, the user repeats the measurement instruction, for example, by changing the position of the work model WM.

復元された3次元情報が良好であると判定された場合(ST103が「YES」)には、さらにこの3次元情報の一段階前の3次元情報に対する位置ずれ量および回転角度を認識する(ST105)。さらに、回転角度については、認識した値を毎回加算する方法によって、最初に復元された3次元情報に対する回転角度を算出する(ST106)。ただし、一番最初に3次元情報を復元した場合(ST104が「YES」)には、上記ST105,106の各ステップはスキップされる。   When it is determined that the restored three-dimensional information is good (“YES” in ST103), the positional deviation amount and the rotation angle with respect to the three-dimensional information one stage before this three-dimensional information are further recognized (ST105). ). Further, for the rotation angle, the rotation angle for the three-dimensional information restored first is calculated by a method of adding the recognized value every time (ST106). However, when the three-dimensional information is restored first (ST104 is “YES”), the above steps of ST105 and ST106 are skipped.

つぎに、この実施例では、最初の3次元情報に対する回転角度が360度を超えたことをもって、ステレオカメラに対してワークモデルWMが1回転したと判断する(ST107)。またワークが1回転したと判断するまでは、ST101〜107の処理を繰り返す。   Next, in this embodiment, when the rotation angle with respect to the first three-dimensional information exceeds 360 degrees, it is determined that the work model WM has made one rotation with respect to the stereo camera (ST107). Further, the processes of ST101 to ST107 are repeated until it is determined that the work has made one rotation.

最初の3次元情報に対してワークモデルWMが1回転したと判定すると、ST101〜107のループを終了し、各3次元情報を表す画像を表示するなどして、統合対象の3次元情報の選択を受け付ける(ST108)。そして、選択された3次元情報の1つを基準として、この基準の3次元情報に他の3次元情報を位置合わせし(ST109)、位置合わせ後の各3次元情報を統合する(ST110)。   When it is determined that the work model WM has made one rotation with respect to the first three-dimensional information, the loop of ST101 to 107 is terminated, and an image representing each three-dimensional information is displayed. Is accepted (ST108). Then, using one of the selected three-dimensional information as a reference, the other three-dimensional information is aligned with the reference three-dimensional information (ST109), and each three-dimensional information after the alignment is integrated (ST110).

なお、統合対象の3次元情報を選択する処理は、ユーザによらずに自動的に行うようにしてもよい。たとえば、毎回の計測に伴うST106で認識された回転角度に基づき、ワークモデルWMが一定角度以上回転したときの計測で復元された3次元情報を、統合対象として選択することができる。   Note that the process of selecting the integration target three-dimensional information may be automatically performed without depending on the user. For example, based on the rotation angle recognized in ST106 accompanying each measurement, the three-dimensional information restored by the measurement when the work model WM is rotated by a predetermined angle or more can be selected as the integration target.

統合処理が終了すると、統合された3次元情報からマークMに対応する情報を削除し(ST111)、削除後の3次元情報を3次元モデルとして仮登録する(ST112)。なお、マークMの情報を削除するのに代えて、照合対象とならないように無効化するにとどめてもよい。   When the integration process ends, information corresponding to the mark M is deleted from the integrated three-dimensional information (ST111), and the three-dimensional information after deletion is provisionally registered as a three-dimensional model (ST112). Instead of deleting the information of the mark M, it may be invalidated so as not to be a collation target.

この後は、仮登録された3次元モデルにより統合対象として選択されなかった3次元情報を順に照合して、3次元モデルに対する位置ずれ量および回転角度を算出し、これらの算出値を、先に計測ポイント毎に求めた位置ずれ量および回転角度から導出した値と比較することにより、正しい認識が行われた否かを判定する(ST113,114)。ここで、照合対象の3次元情報を正しく認識できなかったと判定した場合(ST114が「NO」)には、照合に用いられた3次元情報を3次元モデルに位置合わせして、3次元モデルに追加する(ST115)。一方、照合対象の3次元情報を正しく認識できた場合(ST114が「YES」)には、この3次元情報を3次元モデルに追加せずに、つぎに進む。   Thereafter, the three-dimensional information that has not been selected as the integration target by the temporarily registered three-dimensional model is collated in order, and the positional deviation amount and the rotation angle with respect to the three-dimensional model are calculated. It is determined whether or not correct recognition has been performed by comparing with a value derived from a positional deviation amount and a rotation angle obtained for each measurement point (ST113, 114). Here, when it is determined that the three-dimensional information to be collated has not been correctly recognized (ST114 is “NO”), the three-dimensional information used for the collation is aligned with the three-dimensional model to obtain a three-dimensional model. Add (ST115). On the other hand, when the three-dimensional information to be collated can be correctly recognized (“YES” in ST114), the process proceeds to the next without adding the three-dimensional information to the three-dimensional model.

このように、統合から除外された3次元情報を順に対象として、その3次元情報が統合された情報により正しく認識できるかどうかを判定し、認識に誤りが生じたと判定された3次元情報を3次元モデルに追加する。このような処理により、仮登録された3次元モデルにそのモデルでは認識できなかった3次元情報が追加されるので、以後の3次元モデルで同様の誤認識が生じることはなくなり、3次元モデルの精度を向上することができる。一方で、正しく認識できた3次元情報が3次元モデルに追加されることはないので、3次元モデルの容量が増えるのを防止できる。   In this way, the three-dimensional information excluded from the integration is sequentially targeted, it is determined whether the three-dimensional information can be correctly recognized by the integrated information, and the three-dimensional information that has been determined to have an error in recognition is determined as 3 Add to a dimensional model. As a result of such processing, 3D information that could not be recognized by the model is added to the temporarily registered 3D model, so that the same erroneous recognition does not occur in the subsequent 3D model. Accuracy can be improved. On the other hand, since the correctly recognized 3D information is not added to the 3D model, the capacity of the 3D model can be prevented from increasing.

この後は、さらに3次元モデルの精度を高めるために、ノイズを除去する処理を実行する(ST117)。たとえば、3次元モデルを構成する3次元セグメントの中で、長さが所定のしきい値以下のものや、3次元座標のサンプル点数が所定数以下のものを削除する。またXZ平面上の3次元座標の分布状態から影に相当するものを検出し、これを削除する。   Thereafter, in order to further improve the accuracy of the three-dimensional model, a process of removing noise is executed (ST117). For example, among the three-dimensional segments constituting the three-dimensional model, those having a length equal to or smaller than a predetermined threshold and those having a three-dimensional coordinate sample point equal to or smaller than a predetermined number are deleted. Further, a shadow corresponding to a shadow is detected from the distribution state of the three-dimensional coordinates on the XZ plane, and this is deleted.

このように、短い3次元セグメント、サンプル点数の少ない3次元セグメント、影を表す3次元セグメントなどを削除することにより、照合処理において誤った対応づけがされるのを防止できる。また3次元モデルの容量が削減されるので、照合処理の時間を短縮することができる。   In this way, by deleting a short three-dimensional segment, a three-dimensional segment with a small number of sample points, a three-dimensional segment representing a shadow, and the like, it is possible to prevent erroneous matching in the matching process. Further, since the capacity of the three-dimensional model is reduced, the time for the collation process can be shortened.

ノイズの除去が終了すると、このノイズ除去後の3次元モデルを本登録し(ST118)、処理を終了する。   When the noise removal is finished, the three-dimensional model after the noise removal is fully registered (ST118), and the process is finished.

上記のように、この実施例では、ワークモデルWMに対する計測方向を少しずつ変更しながら、毎回、三角形のマークMの情報を含む3次元情報を照合することによって、直前に得た3次元情報に対する位置ずれ量や回転角度を精度良く求めるので、統合される3次元情報間の位置合わせの精度を確保することができる。また、ユーザが3次元モデルの精度を高めようとして、毎回の計測方向を非常に細かく変更してステレオ計測の指示を出したとしても、計測により復元された3次元情報が誤認識されない限り、3次元モデルの情報が増えることはない。よって、ユーザにより設定された計測方向のすべてに対応でき、かつ容量が抑えられた3次元モデルを作成することができる。   As described above, in this embodiment, the measurement direction for the work model WM is changed little by little, and the three-dimensional information including the information of the triangular mark M is collated each time, thereby the three-dimensional information obtained immediately before is checked. Since the displacement amount and the rotation angle are obtained with high accuracy, it is possible to ensure the accuracy of alignment between the integrated three-dimensional information. Also, even if the user tries to increase the accuracy of the 3D model and gives a stereo measurement instruction by changing the measurement direction very finely every time, as long as the 3D information restored by the measurement is not erroneously recognized, 3 Dimensional model information does not increase. Therefore, it is possible to create a three-dimensional model that can cope with all the measurement directions set by the user and has a reduced capacity.

また、上記の実施例によれば、各カメラ11〜13の視野に同一のマークMが含まれる状態にしてステレオ撮像を行う必要があるが、ワークモデルWMの回転角度を厳密に調整する必要がないから、回転テーブルなどの設備が不要になる。よって、ワークモデルWMを適当な角度ずつ動かすことで精度の良い3次元モデルを作成することができるから、ユーザの負担を軽くすることができる。   Further, according to the above-described embodiment, it is necessary to perform stereo imaging with the same mark M included in the field of view of each of the cameras 11 to 13, but it is necessary to strictly adjust the rotation angle of the work model WM. There is no need for equipment such as a rotary table. Therefore, since the accurate three-dimensional model can be created by moving the work model WM by an appropriate angle, the burden on the user can be reduced.

なお、ワークモデルWMの3次元情報に、対応づけの誤りを生じさせる要素が多く含まれない場合には、マークMを付けないワークモデルWMを用いて、上記図12の処理を実行しても、3次元モデルの精度を確保することができる。   When the three-dimensional information of the work model WM does not include many elements that cause an error in association, the work model WM without the mark M may be used to execute the processing of FIG. The accuracy of the three-dimensional model can be ensured.

つぎに、上記の実施例では、3次元モデルによる認識処理の正否を自動判定したが、これに限らず、図13に示すような確認画面を表示して、ユーザの判定を受け付けるようにしてもよい。   Next, in the above embodiment, whether or not the recognition process by the three-dimensional model is correct is automatically determined. However, the present invention is not limited to this, and a confirmation screen as shown in FIG. Good.

この画面には、3次元情報を画像化して表示するためのウィンドウ30や、「モデルを追加」「次へ」の2つの選択ボタン31,32などが設けられる。ウィンドウ30内には、計測により復元された3次元情報を表す輪郭線および3次元モデルを表す輪郭線が、それぞれ異なる色彩(図では、線の太さに代えて示す。)により表示されている。なお、復元された3次元情報を表す輪郭線からは、マークMに対応するものは削除されている。   This screen is provided with a window 30 for imaging and displaying three-dimensional information, and two selection buttons 31 and 32 for “add model” and “next”. In the window 30, the contour line representing the three-dimensional information restored by the measurement and the contour line representing the three-dimensional model are displayed in different colors (in the figure, shown in place of the line thickness). . It should be noted that those corresponding to the mark M are deleted from the contour lines representing the restored three-dimensional information.

3次元モデルを表す輪郭線(太い方の線)は、現時点での仮の3次元モデルを、3次元情報との照合により認識した位置ずれ量および回転角度に応じて座標変換したイメージを表すものである。さらに、このウィンドウ30内には、上記の3次元モデルに対する3次元情報の一致度も表示されている。   A contour line (thick line) representing a three-dimensional model represents an image obtained by coordinate-transforming a temporary three-dimensional model at the present time according to a positional deviation amount and a rotation angle recognized by collation with three-dimensional information. It is. Further, in this window 30, the degree of coincidence of the three-dimensional information with respect to the three-dimensional model is also displayed.

ユーザは上記の輪郭線の関係や一致度の表示から、表示中の3次元情報が正しく認識されているかどうかを判断し、正しく認識されていないと判断した場合には、「モデルを追加」のボタン31を操作する。この操作が行われると、表示中の3次元情報を仮の3次元モデルに位置合わせするための座標変換が行われ、変換後の3次元情報を仮の3次元モデルに追加する処理が行われる。   The user determines whether or not the displayed three-dimensional information is correctly recognized from the display of the relationship between the contour lines and the degree of coincidence. If the user determines that the three-dimensional information being displayed is not correctly recognized, The button 31 is operated. When this operation is performed, coordinate conversion for aligning the displayed three-dimensional information with the temporary three-dimensional model is performed, and processing for adding the converted three-dimensional information to the temporary three-dimensional model is performed. .

一方、表示中の3次元情報が正しく認識されていると判断した場合には、ユーザは「次へ」のボタン32を操作する。この操作が行われた場合には、3次元モデルの更新処理は行われず、次の3次元情報の確認画面が表示される。   On the other hand, when it is determined that the displayed three-dimensional information is correctly recognized, the user operates the “next” button 32. When this operation is performed, the update process of the 3D model is not performed, and the next confirmation screen of 3D information is displayed.

上記のように、仮の3次元モデルによる認識結果の正否をユーザが目視で判断する方法によれば、算出された一致度が若干悪い場合でも、ロボット4の制御に支障のない認識結果が得られている場合には、正しい認識が行われていると判断するなど、柔軟な対応をとることができる。よって、3次元モデルの容量をより少なくすることができる。   As described above, according to the method in which the user visually determines whether or not the recognition result based on the temporary three-dimensional model is correct, even if the calculated degree of coincidence is slightly bad, a recognition result that does not hinder the control of the robot 4 is obtained. If so, it is possible to take a flexible measure such as determining that correct recognition is being performed. Therefore, the capacity of the three-dimensional model can be further reduced.

また上記の確認画面は、3次元モデルに追加する3次元情報を確認する用途に限らず、毎回実施されるステレオ計測で復元された3次元情報と一段階前の3次元情報との照合処理(図12のST105)の精度を確認する目的に利用することもできる。たとえば、2回目以降のステレオ計測を実行して、計測により復元された3次元情報を一段階前の3次元情報と照合する都度、その照合結果を表す確認画面を表示して、ユーザに照合結果の適否に関する判定入力を行わせる。そして、一段階前の3次元情報に対する位置ずれ量や回転角度の認識結果が正しいとする判定結果が入力されたことをもって、次のステレオ計測に進み、認識結果が正しくないとする判定結果が入力された場合には、計測結果を破棄する。また、ユーザは、認識結果が正しくないと判定した場合には、その判定結果を入力した後に、計測方向を一段階前の計測方向に近づく方に変更して、ステレオ計測をやり直す。このようにすれば、毎回のステレオ計測により復元された3次元情報間の対応関係の精度が保証されるから、仮の3次元モデルに追加対象の3次元情報を位置合わせする処理の精度も高めることができる。   In addition, the above confirmation screen is not limited to the purpose of confirming the three-dimensional information added to the three-dimensional model, but is a process of comparing the three-dimensional information restored by the stereo measurement performed each time with the three-dimensional information of the previous step ( It can also be used for the purpose of confirming the accuracy of ST105) in FIG. For example, each time the second and subsequent stereo measurements are performed and the three-dimensional information restored by the measurement is collated with the previous three-dimensional information, a confirmation screen indicating the collation result is displayed and the collation result is displayed to the user. The judgment input regarding the suitability of the is performed. Then, when the determination result indicating that the recognition result of the positional deviation amount and the rotation angle with respect to the previous three-dimensional information is correct is input, the process proceeds to the next stereo measurement, and the determination result indicating that the recognition result is incorrect is input. If it is, the measurement result is discarded. In addition, when the user determines that the recognition result is not correct, after inputting the determination result, the user changes the measurement direction to be closer to the previous measurement direction and performs stereo measurement again. In this way, the accuracy of the correspondence between the three-dimensional information restored by the stereo measurement each time is ensured, so that the accuracy of the process of aligning the three-dimensional information to be added to the temporary three-dimensional model is also increased. be able to.

3−3) 3次元モデルの作成に関する他の方法
上記の実施例では、全てのステレオ計測を実行してから3次元モデルを作成したが、これに限らず、毎回のステレオ計測と並行して3次元モデルの作成を進めることもできる。
3-3) Other methods related to creation of 3D model In the above embodiment, the 3D model is created after executing all stereo measurements. However, the present invention is not limited to this. It is also possible to proceed with the creation of a dimensional model.

以下、具体的に説明する。この場合も、毎回、ワークモデルWMをY1軸に対して任意の角度で回転させて計測を実行するが、1回目の計測により復元された3次元情報を仮の3次元モデルとして初期設定する。さらにその後の計測では、その計測により復元された3次元情報の一段階前の3次元情報に対する位置ずれ量および回転角度を求めるとともに、仮の3次元モデルによる認識処理を実行し、その認識結果が正しいか否かを判定する。ここで認識処理の結果が正しくないと判定した場合には、処理中の3次元情報を仮の3次元モデルに整合するように座標変換して、変換後の3次元情報を仮のモデルに追加する。   This will be specifically described below. Also in this case, the measurement is executed by rotating the work model WM at an arbitrary angle with respect to the Y1 axis every time, but the three-dimensional information restored by the first measurement is initially set as a temporary three-dimensional model. Further, in the subsequent measurement, the positional deviation amount and the rotation angle with respect to the three-dimensional information one step before the three-dimensional information restored by the measurement are obtained, and recognition processing by a temporary three-dimensional model is executed. Determine whether it is correct. If it is determined that the recognition processing result is not correct, coordinate conversion is performed so that the three-dimensional information being processed matches the temporary three-dimensional model, and the converted three-dimensional information is added to the temporary model. To do.

この方法でも、正しく認識できなかった3次元情報について、毎回の計測でそれぞれ求めた一段階前の3次元情報に対する位置ずれ量および回転角度に基づき座標変換処理を実行し、変換後の3次元情報を仮の3次元モデルに追加する。したがって、毎回の計測において一段階前の3次元情報に含まれていた情報が相当量重複して復元されるように、計測方向の変動幅を調整することによって、一段階前の3次元情報に対する照合の精度を確保すれば、追加対象の3次元情報を仮の3次元モデルに精度良く位置合わせすることができる。また認識結果の判定は、先の実施例と同様に、計測毎に求めた位置ずれ量および回転角度を用いて自動的に行っても良く、または図13と同様の構成の確認用画面を用いて、ユーザからの判定入力を受け付けてもよい。   Even in this method, the 3D information that could not be correctly recognized is subjected to coordinate conversion processing based on the positional deviation amount and the rotation angle with respect to the previous 3D information obtained by each measurement, and the converted 3D information. Is added to the temporary three-dimensional model. Therefore, by adjusting the variation width in the measurement direction so that a considerable amount of information included in the previous three-dimensional information is restored in each measurement, the three-dimensional information corresponding to the previous step is adjusted. If the accuracy of collation is ensured, the 3D information to be added can be accurately aligned with the temporary 3D model. In addition, the recognition result may be automatically determined using the positional deviation amount and the rotation angle obtained for each measurement as in the previous embodiment, or using a confirmation screen having the same configuration as in FIG. Thus, a determination input from the user may be received.

また、上記の実施例と先の3−2)に示した実施例とを折衷させた方法をとることもできる。たとえば、まず、適当な回数のステレオ計測を、毎時の計測方向を変更して実行し、これらにより復元された3次元情報から仮の3次元モデルを作成する。以後は、この仮の3次元モデルに対応していない計測方向を設定してステレオ計測を行う処理を、複数回繰り返すとともに、計測の都度、復元された3次元情報を仮の3次元モデルにより認識する。そして、認識処理の結果が正しくないと判定された3次元情報を、仮の3次元モデルに位置合わせして追加し、全ての計測が終了したときの3次元モデルを本登録する。   Moreover, it is also possible to take a method in which the above-described embodiment and the embodiment shown in 3-2) above are compromised. For example, first, an appropriate number of stereo measurements are executed by changing the hourly measurement direction, and a temporary three-dimensional model is created from the three-dimensional information restored by these. Thereafter, the process of setting the measurement direction not corresponding to the temporary three-dimensional model and performing the stereo measurement is repeated a plurality of times, and the restored three-dimensional information is recognized by the temporary three-dimensional model for each measurement. To do. Then, the three-dimensional information determined as the result of the recognition process is added to the provisional three-dimensional model after being registered, and the three-dimensional model when all measurements are completed is fully registered.

上記の方法をとる場合にも、計測の都度、その計測により復元された3次元情報を一段階前に復元された3次元情報と照合し、双方の位置ずれ量および回転角度を算出し、これらの算出結果を用いて、正しく認識できなかった3次元情報に対する座標変換処理を実行し、変換後の3次元情報を3次元モデルに追加する。
ただし、この方法では、仮の3次元モデルの作成後の最初の計測においては、仮の3次元モデルにより正しく認識することができる3次元情報を復元する必要がある(たとえば、仮の3次元モデルに統合された複数の3次元情報のいずれかに対応する計測方向から所定の角度範囲以内に、計測方向を設定する。または、仮の3次元モデルの作成後の最初の計測に対する認識処理の結果の正否をユーザが確認してから以後の処理をすすめる。)。最初の計測により復元された3次元情報と仮の3次元モデルとの対応関係を特定できなければ、以後の計測により復元された3次元情報と仮の3次元モデルとの対応関係を特定することも不可能だからである。また、以後の計測においては、一段階前の3次元情報に対する照合の精度を確保できるように、計測方向の変動幅を考慮する必要がある。
Even in the case of taking the above method, each time the measurement is performed, the three-dimensional information restored by the measurement is compared with the three-dimensional information restored one step before, and the positional deviation amount and the rotation angle of both are calculated. Is used to perform coordinate conversion processing on the three-dimensional information that could not be recognized correctly, and add the converted three-dimensional information to the three-dimensional model.
However, in this method, in the first measurement after the provisional three-dimensional model is created, it is necessary to restore three-dimensional information that can be correctly recognized by the provisional three-dimensional model (for example, the provisional three-dimensional model). The measurement direction is set within a predetermined angle range from the measurement direction corresponding to any of the plurality of three-dimensional information integrated into the result, or the result of the recognition process for the first measurement after the provisional three-dimensional model is created After the user confirms whether or not is correct, proceed with the subsequent processing.) If the correspondence between the three-dimensional information restored by the first measurement and the temporary three-dimensional model cannot be specified, the correspondence between the three-dimensional information restored by the subsequent measurement and the temporary three-dimensional model is specified. Because it is impossible. In the subsequent measurement, it is necessary to consider the fluctuation range of the measurement direction so as to ensure the accuracy of collation with respect to the three-dimensional information of the previous stage.

続いて、演算処理をより簡単にした実施例を説明する。
この実施例も、1回目の3次元計測により復元された3次元情報を仮の3次元モデルに初期設定した後に、以後の計測の進行と並行して、仮の3次元モデルに情報を追加するものである。ただし、この実施例では、マークMを付けないワークモデルWMを使用し、また計測ポイント毎に一段階前の3次元情報と照合して位置ずれ量および回転角度を求める処理も行わない。このため、この実施例では、仮の3次元モデルによる認識結果の正否を自動判定せずに、ユーザに目視で認識結果を判断させて、その判断結果の入力を受け付けるようにしている。
Subsequently, an embodiment in which the arithmetic processing is simplified will be described.
In this embodiment as well, after the three-dimensional information restored by the first three-dimensional measurement is initially set in the temporary three-dimensional model, information is added to the temporary three-dimensional model in parallel with the progress of the subsequent measurement. Is. However, in this embodiment, the work model WM without the mark M is used, and the processing for obtaining the positional deviation amount and the rotation angle by comparing with the three-dimensional information one step before every measurement point is not performed. For this reason, in this embodiment, instead of automatically determining whether or not the recognition result based on the temporary three-dimensional model is correct, the user visually determines the recognition result and accepts the input of the determination result.

認識結果の確認・判定は、図13に示したのと同様の確認画面により行われる。具体的には、ユーザが表示中の3次元情報が正しく認識されていないと判断して、「モデルを追加」のボタン31を操作すると、表示画面は、後記する3次元モデルの更新処理を行うためのガイダンス画面に変更される。ユーザがこの画面の指示に従って計測を進めることにより、3次元モデルは新たな情報が追加されたものに更新される。   The confirmation / determination of the recognition result is performed on a confirmation screen similar to that shown in FIG. Specifically, when the user determines that the displayed three-dimensional information is not correctly recognized and operates the “add model” button 31, the display screen performs an update process of the three-dimensional model described later. Change to the guidance screen. When the user proceeds with the measurement in accordance with the instruction on this screen, the three-dimensional model is updated to a new information added.

一方、表示中の3次元情報が正しく認識されていると判断した場合には、ユーザは「次へ」のボタン32を操作する。この操作が行われた場合には、3次元モデルの更新処理は行われず、次の計測に進むことになる。   On the other hand, when it is determined that the displayed three-dimensional information is correctly recognized, the user operates the “next” button 32. When this operation is performed, the three-dimensional model update process is not performed, and the process proceeds to the next measurement.

さらにこの場合の確認画面には、復元された3次元情報が良好でないと判断した場合に、計測のやり直しを指示する選択ボタンも設けられる。このボタンが操作された場合には、復元された3次元情報を破棄して、計測をやり直すことになる。   Further, the confirmation screen in this case is also provided with a selection button for instructing re-measurement when it is determined that the restored three-dimensional information is not good. When this button is operated, the restored three-dimensional information is discarded and measurement is performed again.

図14は、上記の方法により3次元モデルの作成・登録を行う場合のフローチャートである。以下、このフローチャートのステップ符号を参照しながら、この実施例による3次元モデルの作成方法を詳細に説明する。   FIG. 14 is a flowchart when a three-dimensional model is created and registered by the above method. Hereinafter, a method for creating a three-dimensional model according to this embodiment will be described in detail with reference to step codes in this flowchart.

このフローチャートによる処理でも、ワークモデルWMをY1軸に対して任意の角度で回転させて3次元計測を行う処理を、ワークモデルWMがほぼ一回転するまで実行することを前提とする。また3次元モデルの更新処理を実行するとき以外は、ワークモデルWMの回転方向は一定であるものとする(以下、この回転方向を「正の回転方向」という。)。   Also in the process according to this flowchart, it is assumed that the process of rotating the work model WM at an arbitrary angle with respect to the Y1 axis and performing the three-dimensional measurement is executed until the work model WM rotates almost once. In addition, the rotation direction of the work model WM is assumed to be constant except when the update process of the three-dimensional model is executed (hereinafter, this rotation direction is referred to as “positive rotation direction”).

まず最初のステレオ計測を実行する(ST201)。このステップST201も、図3のST1〜6に対応する処理を実行するものである。つぎに、この1回目の計測により復元された3次元情報を3次元モデルとして仮登録する(ST202)。   First, the first stereo measurement is performed (ST201). Step ST201 also executes processing corresponding to ST1 to ST6 in FIG. Next, the three-dimensional information restored by the first measurement is provisionally registered as a three-dimensional model (ST202).

この後は、ワークモデルWMを任意の角度回転させて次のステレオ計測を実行する(ST203)。そして、このステレオ計測により復元された3次元情報を仮の3次元モデルにより照合し、その照合による認識結果を表示する(ST204,205)。   Thereafter, the work model WM is rotated by an arbitrary angle, and the next stereo measurement is executed (ST203). Then, the three-dimensional information restored by the stereo measurement is collated with a provisional three-dimensional model, and the recognition result by the collation is displayed (ST204, 205).

ユーザは、この表示画面により、3次元情報が正しく復元されているかや、3次元モデルによる認識が正しく行われているかを確認する。ここでユーザがいずれの処理も正しく行われていると判断して、その判断結果を入力した場合には、認識された回転角度からワークモデルWMが1回転したかどうかを判定する(ST208)。ここで1回転していないと判定した場合(ST208が「YES」)には、ST203に戻る。
この場合、次のステレオ計測は、ワークモデルWMを正の回転方向にさらに回転させて実行されることになる。
The user confirms whether or not the three-dimensional information is correctly restored and whether the recognition by the three-dimensional model is correctly performed on the display screen. If the user determines that any processing is correctly performed and inputs the determination result, it is determined whether the work model WM has made one rotation from the recognized rotation angle (ST208). If it is determined that one rotation has not been made (ST208 is “YES”), the process returns to ST203.
In this case, the next stereo measurement is executed by further rotating the work model WM in the positive rotation direction.

一方、ユーザが3次元情報が正しく復元されていないと判断して、その判断結果を入力した場合(ST207が「YES」)には、1回転したかどうかの確認をせずにST203に戻る。この場合には、直前のステレオ計測により復元された3次元情報を破棄して、次のステレオ計測に入る。   On the other hand, when the user determines that the three-dimensional information has not been correctly restored and inputs the determination result (ST207 is “YES”), the process returns to ST203 without confirming whether or not the rotation has been performed once. In this case, the three-dimensional information restored by the immediately preceding stereo measurement is discarded and the next stereo measurement is started.

つぎに、ユーザが3次元情報の認識結果が正しくないと判断して、その判断結果を入力した場合(ST206が「YES」)には、モデル更新用のステレオ計測(ST211)へと移行する。このとき、表示部27の表示は、前記したガイダンス画面に変更されて、ワークモデルWMを回転方向を逆にして(負の方向にして)回転させて、1つ前の計測状態に近づけるようにする旨が指示される。   Next, when the user determines that the recognition result of the three-dimensional information is not correct and inputs the determination result (ST206 is “YES”), the process proceeds to stereo measurement for model update (ST211). At this time, the display on the display unit 27 is changed to the above-described guidance screen, and the work model WM is rotated with the rotation direction reversed (in the negative direction) so as to approach the previous measurement state. Is instructed to do so.

モデル更新用のステレオ計測が行われると、この計測により復元された3次元情報を3次元モデルと照合し、その照合による認識結果を表示する(ST212,213)。この場合の表示画面でも、先の図13の例と同様に、3次元情報と3次元モデルとの認識された関係が表示される。また選択ボタンとして、表示された3次元情報を3次元モデルに追加することを選択するボタンと、追加しないことを選択するボタンとが設けられる。   When stereo measurement for model update is performed, the three-dimensional information restored by this measurement is collated with the three-dimensional model, and the recognition result by the collation is displayed (ST212, 213). Also in the display screen in this case, the recognized relationship between the three-dimensional information and the three-dimensional model is displayed as in the example of FIG. As the selection buttons, a button for selecting to add the displayed three-dimensional information to the three-dimensional model and a button for selecting not to add are provided.

ここでユーザが「追加しない」選択をした場合(ST214が「NO」)には、再びモデル更新用のステレオ計測(ST211)を実行し、さらにこれに伴い、ST212,213のステップを実行する。なお、この場合のステレオ計測では、ワークモデルWMを負の方向に回転させる場合に限らず、正の方向に回転させる場合もある(たとえば、前回の計測でのワークモデルWMの負の方向への回転が大きすぎた場合などである。)。   Here, when the user selects “do not add” (ST214 is “NO”), stereo measurement for model update (ST211) is executed again, and accordingly, steps ST212 and 213 are executed. In the stereo measurement in this case, the work model WM is not limited to be rotated in the negative direction but may be rotated in the positive direction (for example, the work model WM in the previous measurement in the negative direction). For example, if the rotation is too large.)

ユーザが表示された3次元情報を3次元モデルに追加することを選択した場合(ST214が「YES」)には、モデル更新用のステレオ計測により復元された3次元情報を、3次元モデルとの照合により認識した位置ずれ量および回転角度に基づき座標変換する(ST215)。そして変換後の3次元情報を3次元モデルに追加する(ST216)。   When the user selects to add the displayed three-dimensional information to the three-dimensional model (ST214 is “YES”), the three-dimensional information restored by the stereo measurement for model update is updated with the three-dimensional model. Coordinate conversion is performed based on the positional deviation amount and the rotation angle recognized by the collation (ST215). Then, the converted three-dimensional information is added to the three-dimensional model (ST216).

この処理により、3次元モデルが更新されると、その更新が行われたことをユーザに報知する処理を実行する(ST217)。この段階の画面では、3次元モデルが更新されたことのほか、ワークモデルWMの回転方向を正方向に戻して、先に正しい認識がされなかったときの計測方向付近を再び設定することを促すガイダンスが表示される。   When the three-dimensional model is updated by this process, a process of notifying the user that the update has been performed is executed (ST217). In the screen at this stage, in addition to the update of the three-dimensional model, the rotation direction of the work model WM is returned to the positive direction, and it is urged to set again the vicinity of the measurement direction when the correct recognition is not performed first. Guidance is displayed.

この後は、ST203のステレオ計測に戻り、さらにこの計測処理に伴いST204,205を実行する。
ユーザが表示された指示に従ってワークWMの毎回の姿勢を変更していれば、前回認識を誤ったときの3次元情報に含まれる特徴に関する3次元情報が3次元モデルに追加されて、認識を誤った計測方向に対する認識精度が向上しているから、この段階では、正しい認識結果が得られる可能性が高いと考えられる。また、仮に、再度、認識結果が正しくないという判断がされたとしても、再びワークモデルWMを負の方向に回転させて、モデルの更新を行うことにより、認識精度をより向上することができる。
Thereafter, the process returns to the stereo measurement of ST203, and ST204 and 205 are further performed in accordance with this measurement process.
If the user changes the posture of the work WM every time according to the displayed instructions, the 3D information related to the features included in the 3D information when the previous recognition was mistaken is added to the 3D model, and the recognition is incorrect. Since the recognition accuracy for the measured direction is improved, it is highly possible that a correct recognition result is obtained at this stage. Even if it is determined again that the recognition result is incorrect, the recognition accuracy can be further improved by rotating the work model WM again in the negative direction and updating the model.

以下同様に、ワークモデルWMを任意の角度で回転させてステレオ計測を行う処理を繰り返し、毎回の計測毎に、復元された3次元情報を3次元モデルと照合し、その照合による認識結果の正否をユーザに判断させる。そして、ユーザが認識処理の結果が正しくないと判断した場合には、計測方向を1つ前の正しい認識が行われたときの方向に近づけて計測を行い、正しい認識が行われたと判断された3次元情報を当該認識結果に基づき座標変換し、3次元モデルに追加する。   Similarly, the process of performing stereo measurement by rotating the work model WM at an arbitrary angle is repeated, and for each measurement, the restored three-dimensional information is collated with the three-dimensional model, and whether the recognition result by the collation is correct or not Is determined by the user. When the user determines that the result of the recognition process is not correct, the measurement is performed with the measurement direction close to the direction in which the previous correct recognition was performed, and it was determined that the correct recognition was performed. The coordinates of the three-dimensional information are converted based on the recognition result and added to the three-dimensional model.

正しいと判断された認識結果からワークモデルWMが1回転したと判断すると(ST208が「YES」)、計測に関する一連の処理を終了する。またユーザにも、表示部27に所定のメッセージを表示するなどの方法により計測が終了した旨を報知する。
この後は、3次元モデルのノイズを除去する処理(図12のST117と同様の処理である。)を実行し(ST209)、ノイズ除去後の3次元モデルを本登録する(ST210)。
If it is determined from the recognition result determined to be correct that the work model WM has made one rotation (ST208 is “YES”), a series of processing relating to measurement is terminated. Also, the user is notified that the measurement has been completed by a method such as displaying a predetermined message on the display unit 27.
Thereafter, processing for removing noise from the three-dimensional model (same processing as ST117 in FIG. 12) is executed (ST209), and the three-dimensional model after noise removal is fully registered (ST210).

上記の方法によれば、ユーザが正しい手順に従ってワークモデルWMを回転させ、選択操作を行えば、ワークモデルWMの回転が終了するまでに、適切な3次元モデルを作成することができる。また、2回目以降の計測を行う毎に位置ずれ量や回転角度を求める必要がなくなるから、演算を簡易にすることができる。   According to the above method, if the user rotates the work model WM according to a correct procedure and performs a selection operation, an appropriate three-dimensional model can be created before the work model WM is rotated. In addition, it is not necessary to obtain the positional deviation amount and the rotation angle every time the second and subsequent measurements are performed, so that the calculation can be simplified.

3−4) 3次元モデルの作成方法に関するその他の例
上記では、ワークモデルWMに対する計測方向をユーザが任意の角度で変更する方法により3次元モデルを作成する実施例を説明したが、回転テーブルなどを用いてワークモデルWMを規則正しく回転させる場合にも、上記の各例を応用して精度が良く、容量を抑えた3次元モデルを作成することができる。
3-4) Other Examples Regarding Method for Creating 3D Model In the above, the embodiment in which the user creates the 3D model by the method in which the measurement direction with respect to the work model WM is changed at an arbitrary angle has been described. Even when the work model WM is regularly rotated by using the above, it is possible to create a three-dimensional model with high accuracy and reduced capacity by applying the above examples.

回転テーブルなどにより計測方向を一定角度ずつ変更してステレオ計測を行う場合には、計測を行う毎に一段階前の3次元情報との照合を行う方法をとらなくとも、復元された3次元情報間の位置関係を容易に特定することができる。したがって、3次元モデルの作成にかかる演算をより簡単にすることができる。   When stereo measurement is performed by changing the measurement direction by a certain angle using a rotary table or the like, the restored three-dimensional information can be obtained without taking a method of collating with the previous three-dimensional information every time measurement is performed. The positional relationship between them can be easily specified. Therefore, it is possible to simplify the calculation for creating the three-dimensional model.

つぎに、図12,14に示した処理では、ワーク座標系の一軸(Y1軸)に対してワークモデルWMが一回転する間、ステレオ計測を続けるようにしたが、これに限らず、ワークの想定される向きの変化の範囲が360度より小さい場合には、その想定される範囲でワークモデルWMが回転したときに計測を終了してもよい。
また計測の終了時期を回転角度により自動判別せずに、認識した回転角度を表示して、ユーザに終了時期を判断させてもよい。
Next, in the processing shown in FIGS. 12 and 14, the stereo measurement is continued while the work model WM makes one rotation with respect to one axis (Y1 axis) of the work coordinate system. When the assumed range of change in orientation is smaller than 360 degrees, the measurement may be terminated when the work model WM rotates within the assumed range.
Further, instead of automatically determining the end time of measurement based on the rotation angle, the recognized rotation angle may be displayed to allow the user to determine the end time.

また、ワークモデルWMの回転軸は一軸に限らず、図15に示すように、複数の軸に対してワークモデルWMを回転させてもよい。   Further, the rotation axis of the work model WM is not limited to one axis, and the work model WM may be rotated about a plurality of axes as shown in FIG.

図15は、2個のマークM1,M2が付されたワークモデルWMを用いて3次元モデルを作成する場合の計測処理の例を示す。図15(1)に示すように、一方のマークM1は、ワーク座標系のY1軸がY軸に平行になるようにワークモデルWMを配置したときに上面になる位置に取り付けられ、他方のマークM2は、ワークモデルWMの側面に取り付けられる。   FIG. 15 shows an example of measurement processing when a three-dimensional model is created using a work model WM with two marks M1 and M2. As shown in FIG. 15 (1), one mark M1 is attached at a position that becomes the upper surface when the work model WM is arranged so that the Y1 axis of the work coordinate system is parallel to the Y axis, and the other mark M2 is attached to the side surface of the work model WM.

この実施例でも、先の図4に示した例と同様に、Y1軸に対してワークモデルWMを回転させながら複数回の計測を行う(図15(1))。一連の計測が終了すると、回転軸をY1軸からX1軸に変更して、図15(2)に示すように、ワークモデルWMを90度回転させて計測を行う。さらに図15(3)に示すように、ワークモデルWMを再度90度回転させて計測を行う。   In this embodiment, as in the example shown in FIG. 4, the measurement is performed a plurality of times while rotating the work model WM with respect to the Y1 axis (FIG. 15 (1)). When a series of measurements is completed, the rotation axis is changed from the Y1 axis to the X1 axis, and the work model WM is rotated 90 degrees as shown in FIG. Further, as shown in FIG. 15 (3), the work model WM is rotated again by 90 degrees to perform measurement.

Y1軸に対してワークモデルWMを回転させて計測を行う場合には、マークM1が常に各カメラ11〜13の視野に含まれるようにし、X1軸に対してワークモデルWMを回転させて計測を行う場合には、マークM2が常に各カメラ11〜13の視野に含まれるようにする。さらに、少なくともY1軸に対する回転からX1軸に対する回転に移行する際に、2つのマークM1,M2がともにカメラ11〜13の視野に含まれる状態を設定して計測を行う。   When measurement is performed by rotating the work model WM with respect to the Y1 axis, the mark M1 is always included in the field of view of each camera 11 to 13, and measurement is performed by rotating the work model WM with respect to the X1 axis. When performing, the mark M2 is always included in the visual field of each camera 11-13. Further, at least when shifting from the rotation about the Y1 axis to the rotation about the X1 axis, measurement is performed by setting a state in which the two marks M1 and M2 are both included in the fields of view of the cameras 11-13.

なお、ワークモデルWMをX1軸に対して回転する場合にも、90度回転させる毎に、その状態下でXZ平面に直交する軸(図15(2)の場合にはZ1軸、図15(3)の場合にはY1軸)に対してワークモデルWMを回転させることにより、ワークモデルWMの姿勢を複数とおりに変更し、変更の都度計測を行ってもよい。   Even when the work model WM is rotated with respect to the X1 axis, every time the work model WM is rotated by 90 degrees, an axis orthogonal to the XZ plane under the state (in the case of FIG. 15 (2), the Z1 axis, FIG. In the case of 3), by rotating the work model WM relative to the Y1 axis), the posture of the work model WM may be changed in a plurality of ways, and measurement may be performed each time the change is made.

このように、ワークモデルWMに対する計測方向のバリエーションを多くした場合にも、図12のフローチャートに準じた処理を実行することができる。この場合、Y1軸に対してワークモデルWMを回転させて計測を行っている間は、マークM1の存在によって照合の精度を確保することができ、X1軸に対してワークモデルWMを回転させて計測を行っている間は、マークM2の存在によって照合の精度を確保することができる。よって、作成される3次元モデルの精度も確保される。   As described above, even when the variation of the measurement direction with respect to the work model WM is increased, the processing according to the flowchart of FIG. 12 can be executed. In this case, while the workpiece model WM is rotated with respect to the Y1 axis, the accuracy of collation can be ensured by the presence of the mark M1, and the workpiece model WM is rotated with respect to the X1 axis. While the measurement is being performed, the accuracy of the collation can be ensured by the presence of the mark M2. Therefore, the accuracy of the created three-dimensional model is also ensured.

また図15の例のようにワークモデルWMの軸回転の方向を管理せずに、より自由にステレオカメラ1に対するワークモデルWMの姿勢を変更する場合には、図14のフローチャートに準じた処理により、毎回の計測結果をユーザが確認しながら、仮の3次元モデルに必要な3次元情報を追加することで、精度が良く、容量が抑えられた3次元モデルを作成することができる。   Further, when the orientation of the work model WM with respect to the stereo camera 1 is changed more freely without managing the direction of the axis rotation of the work model WM as in the example of FIG. 15, the processing according to the flowchart of FIG. By adding the necessary three-dimensional information to the temporary three-dimensional model while the user confirms the measurement result every time, it is possible to create a three-dimensional model with high accuracy and reduced capacity.

3次元認識処理を適用したピッキングシステムの概略構成を示す図である。It is a figure which shows schematic structure of the picking system to which a three-dimensional recognition process is applied. 物体認識装置のブロック図である。It is a block diagram of an object recognition apparatus. 3次元認識処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a three-dimensional recognition process. ワークモデルの計測方法を示す図である。It is a figure which shows the measuring method of a work model. 3次元モデルの作成処理の概略手順を示す図である。It is a figure which shows the general | schematic procedure of the creation process of a three-dimensional model. 3次元情報の対応づけに誤りが生じる原因を説明する図である。It is a figure explaining the cause which an error produces in matching of three-dimensional information. 3次元情報の対応づけに誤りが生じる他の原因を説明する図である。It is a figure explaining the other cause which an error produces in matching of three-dimensional information. マークが表す三角形の特徴を表す図である。It is a figure showing the characteristic of the triangle which a mark represents. 三角形の各頂点の複数とおりの対応づけ状態を示す図、および一致度を表すグラフである。It is a figure showing a plurality of correspondence states of each vertex of a triangle, and a graph showing a degree of coincidence. 統合対象の3次元情報の選択に用いられるマークの3次元情報の例を示す図である。It is a figure which shows the example of the three-dimensional information of the mark used for selection of the integration target three-dimensional information. 3次元モデルの作成処理の具体的方法を模式化して示す図である。It is a figure which shows typically the specific method of the preparation process of a three-dimensional model. 3次元モデルの作成・登録に関する手順を示すフローチャートである。It is a flowchart which shows the procedure regarding preparation and registration of a three-dimensional model. 3次元モデルによる認識結果の確認画面の例を示す図である。It is a figure which shows the example of the confirmation screen of the recognition result by a three-dimensional model. 3次元モデルの作成・登録に関する手順の他の例を示すフローチャートである。It is a flowchart which shows the other example of the procedure regarding preparation and registration of a three-dimensional model. 2つのマークを付けたワークモデルによる計測方法の例を示す図である。It is a figure which shows the example of the measuring method by the work model which attached two marks.

符号の説明Explanation of symbols

1 ステレオカメラ
2 物体認識装置
11,12,13 カメラ
24 CPU
25 メモリ
W ワーク
WM ワークモデル
DESCRIPTION OF SYMBOLS 1 Stereo camera 2 Object recognition apparatus 11, 12, 13 Camera 24 CPU
25 Memory W Work WM Work Model

Claims (7)

ステレオカメラを用いた3次元計測を認識対象物の実物モデルに対してそれぞれ異なる方向から実施することにより復元された複数の3次元情報を、位置を合わせて統合することによって、前記認識対象物の3次元モデルを作成する方法であって、
前記実物モデルに対する少なくとも1回の3次元計測により復元された3次元情報を用いて仮の3次元モデルを作成し、
前記実物モデルに対し前記仮の3次元モデルの作成に用いられた3次元情報を復元したときとは異なる方向を計測方向として実施した3次元計測について、その計測により復元された3次元情報を前記仮の3次元モデルにより認識してその認識結果の正否を判定し、
前記仮の3次元モデルによる認識処理の結果が正しくないと判定したときに認識対象となった3次元情報、または当該認識対象の3次元情報を復元したときの計測方向に対する角度ずれが所定値以内となる方向からの計測により復元され、かつ前記3次元モデルによる認識処理の結果が正しいと判定された3次元情報を、仮の3次元モデルに整合するように座標変換して、変換後の3次元情報を仮の3次元モデルに追加し、この追加処理が完了した時点の3次元モデルを前記認識対象物の認識に用いるモデルとして確定する、
ことを特徴とする3次元モデルの作成方法。
By integrating a plurality of three-dimensional information restored by performing three-dimensional measurement using a stereo camera from different directions with respect to the real model of the recognition object, the position of the recognition object is integrated. A method for creating a three-dimensional model,
Creating a temporary 3D model using 3D information restored by at least one 3D measurement of the real model;
With respect to the three-dimensional measurement performed in a direction different from the direction when the three-dimensional information used to create the temporary three-dimensional model is restored for the real model, the three-dimensional information restored by the measurement is Recognize with a temporary 3D model to determine whether the recognition result is correct,
The three-dimensional information that is a recognition target when it is determined that the result of the recognition process by the temporary three-dimensional model is incorrect, or the angle deviation with respect to the measurement direction when the three-dimensional information of the recognition target is restored is within a predetermined value. The three-dimensional information restored by the measurement from the direction and the result of the recognition process by the three-dimensional model determined to be correct is subjected to coordinate conversion so as to match the temporary three-dimensional model, and the converted three-dimensional information Adding the dimensional information to the provisional three-dimensional model, and confirming the three-dimensional model at the time of completion of the addition process as a model used for recognition of the recognition object;
A method for creating a three-dimensional model.
請求項1に記載された方法において、
前記実物モデルに対し、毎回異なる計測方向を設定して複数回の3次元計測を実施するとともに、2回目以降の3次元計測により復元された3次元情報をそれぞれ一段階前の計測により復元された3次元情報と照合して、双方の3次元情報間の対応関係を認識し、
前記複数回の3次元計測に伴い復元された複数の3次元情報のうちの一部に相当する2以上の3次元情報を選択し、選択された3次元情報の1つを基準として、他の3次元情報を、それぞれ当該3次元情報に対応する計測と基準の3次元情報に対応する計測との間の各計測に関して認識された3次元情報間の対応関係に基づき、基準の3次元情報に整合するように座標変換し、変換後の3次元情報を基準の3次元情報に統合することにより前記仮の3次元モデルを作成し、
前記複数の3次元情報のうち仮の3次元モデルに統合されなかった3次元情報を順に処理対象として、仮の3次元モデルを用いた認識処理を実行してその認識結果の正否を判定するとともに、認識処理の結果が正しくないと判定したときは、その認識処理の対象となった3次元情報を、当該3次元情報に対応する計測と前記基準の3次元情報に対応する計測との間の各計測に関して復元された3次元情報間の認識された対応関係に基づき、基準の3次元情報に整合するように座標変換して、変換後の3次元情報を仮の3次元モデルに追加し、
3次元モデルに統合されなかった全ての3次元情報に対する処理が終了したとき、その時点の3次元モデルを確定する、3次元モデルの作成方法。
The method of claim 1, wherein
For the actual model, a different measurement direction is set each time and a plurality of three-dimensional measurements are performed, and the three-dimensional information restored by the second and subsequent three-dimensional measurements is restored by the previous measurement. Recognize the correspondence between the three-dimensional information by collating with the three-dimensional information,
Two or more three-dimensional information corresponding to a part of the plurality of three-dimensional information restored in accordance with the plurality of three-dimensional measurements is selected, and one of the selected three-dimensional information is used as a reference. The three-dimensional information is converted into the reference three-dimensional information based on the correspondence relationship between the three-dimensional information recognized for each measurement between the measurement corresponding to the three-dimensional information and the measurement corresponding to the reference three-dimensional information. The coordinates are transformed so as to match, and the provisional three-dimensional model is created by integrating the converted three-dimensional information into the reference three-dimensional information,
Among the plurality of three-dimensional information, three-dimensional information that has not been integrated into the temporary three-dimensional model is sequentially processed, and recognition processing using the temporary three-dimensional model is executed to determine whether the recognition result is correct or not. When it is determined that the result of the recognition process is not correct, the three-dimensional information that is the object of the recognition process is determined between the measurement corresponding to the three-dimensional information and the measurement corresponding to the reference three-dimensional information. Based on the recognized correspondence between the three-dimensional information restored for each measurement, coordinate conversion is performed to match the reference three-dimensional information, and the converted three-dimensional information is added to the temporary three-dimensional model,
A method for creating a three-dimensional model, in which, when processing for all three-dimensional information that has not been integrated into the three-dimensional model is completed, the three-dimensional model at that time is determined.
請求項1に記載された方法において、
前記実物モデルに対し毎回異なる計測方向を設定して実施した複数回の3次元計測により復元された複数の3次元情報を用いて仮の3次元モデルを作成した後に、前記実物モデルに対し、前記仮の3次元モデルの作成時に設定したいずれの計測方向とも異なるように計測方向を毎回変更して3次元計測を実行する処理を、複数回実行し、
前記複数回の3次元計測の1回目の3次元計測により復元された3次元情報を対象に、前記仮の3次元モデルによる認識処理を実行した後に、2回目以降の計測の都度、その計測により復元された3次元情報を一段階前に復元された3次元情報と照合して双方の3次元情報間の対応関係を認識する第1ステップと、当該計測により復元された3次元情報を対象に、前記仮の3次元モデルを用いた認識処理を実行してその認識結果の正否を判定する第2ステップとを実行するともに、2回目以降の計測により復元された3次元情報に対する認識処理の結果が正しくないと判定したときは、前記第1回目の3次元計測により復元された3次元情報に対する認識結果、および2回目から現時点までに実施された各3次元計測に対する第1ステップの認識結果に基づき、前記認識処理の結果が正しくないと判定された3次元情報を仮の3次元モデルに整合するように座標変換して、変換後の3次元情報を仮の3次元モデルに追加し、
前記複数回の3次元計測およびこれに伴う処理がすべて終了したとき、その時点の3次元モデルを確定する、3次元モデルの作成方法。
The method of claim 1, wherein
After creating a temporary three-dimensional model using a plurality of three-dimensional information restored by a plurality of three-dimensional measurements performed by setting different measurement directions each time for the real model, A process of executing the 3D measurement by changing the measurement direction every time so as to be different from any of the measurement directions set at the time of creating the temporary 3D model is executed a plurality of times.
After the recognition process by the temporary 3D model is performed on the 3D information restored by the first 3D measurement of the plurality of 3D measurements, the measurement is performed each time after the second measurement. A first step of recognizing the correspondence between the three-dimensional information by comparing the restored three-dimensional information with the three-dimensional information restored one step ago, and targeting the three-dimensional information restored by the measurement And a second step of executing a recognition process using the provisional three-dimensional model and determining whether the recognition result is correct or not, and a result of the recognition process for the three-dimensional information restored by the second and subsequent measurements. Is determined to be incorrect, the recognition result for the three-dimensional information restored by the first three-dimensional measurement and the first step for each three-dimensional measurement performed from the second time to the present time Based on the recognition result, coordinate conversion is performed so that the three-dimensional information determined to be incorrect is matched with the temporary three-dimensional model, and the converted three-dimensional information is added to the temporary three-dimensional model. And
A method for creating a three-dimensional model, in which, when the plurality of three-dimensional measurements and the processes associated therewith are all completed, a three-dimensional model at that time is determined.
請求項1に記載された方法において、
前記実物モデルに対する計測方向を毎回変更して3次元計測を実行する処理を複数回実行し、
1回目の3次元計測により復元された3次元情報を仮の3次元モデルに設定し、以後の3次元計測において、それぞれこの3次元計測により復元された3次元情報を一段階前に復元された3次元情報と照合して双方の3次元情報間の対応関係を認識する第1ステップと、当該3次元計測により復元された3次元情報を対象に前記仮の3次元モデルを用いた認識処理を実行してその認識結果の正否を判定する第2ステップとを実行し、
前記第2ステップにおいて前記3次元モデルを用いた認識処理の結果が正しくないと判定したときは、その認識処理の対象となった3次元情報を、2回目から現時点までの各3次元計測に対して実行された第1ステップによる認識結果に基づき、仮の3次元モデルに整合するように座標変換して、変換後の3次元情報を仮の3次元モデルに追加し、
前記複数回の3次元計測およびこれに伴うすべての処理が終了したとき、その時点の3次元モデルを確定する、3次元モデルの作成方法。
The method of claim 1, wherein
A process of performing three-dimensional measurement by changing the measurement direction with respect to the real model each time is executed a plurality of times,
The three-dimensional information restored by the first three-dimensional measurement is set as a temporary three-dimensional model, and in the subsequent three-dimensional measurement, the three-dimensional information restored by the three-dimensional measurement is restored one step before. A first step of recognizing the correspondence between the three-dimensional information by collating with the three-dimensional information, and a recognition process using the temporary three-dimensional model for the three-dimensional information restored by the three-dimensional measurement. And executing a second step of determining whether the recognition result is correct or not,
When it is determined in the second step that the result of the recognition process using the three-dimensional model is not correct, the three-dimensional information that is the object of the recognition process is determined for each three-dimensional measurement from the second time to the current time. Based on the recognition result of the first step executed in the above, coordinate conversion is performed so as to match the temporary 3D model, and the converted 3D information is added to the temporary 3D model,
A method for creating a three-dimensional model, in which, when the plurality of three-dimensional measurements and all the processes associated therewith are completed, a three-dimensional model at that time is determined.
請求項1に記載された方法において、
前記実物モデルを任意の角度で回転させて3次元計測を実行する処理を複数回実行することを条件に、1回目の3次元計測により復元された3次元情報を仮の3次元モデルに設定し、以後の3次元計測が行われる毎に、その計測により復元された3次元情報を対象に前記仮の3次元モデルを用いた認識処理を実行してその認識結果の正否を判定し、
前記仮の3次元モデルによる認識処理の結果が正しくないと判定したときは、実物モデルに対する計測方向が一段階前の計測方向に近づくように実物モデルを回転させて3次元計測を行うステップと、この3次元計測により復元された3次元情報を対象に前記仮の3次元モデルを用いた認識処理を実行してその認識結果の正否を判定するステップとを、認識結果が正しいと判定されるまで実行し、正しいと判定された認識結果に対応する3次元情報を、その認識結果に基づき座標変換して、変換後の3次元情報を仮の3次元モデルに追加した後に、前記認識処理の結果が正しくないと判定したときの状態に戻る方向に前記実物モデルを回転させ、
前記実物モデルとステレオカメラとの位置関係が所定の状態になったときの3次元計測およびこれに伴う処理がすべて終了したとき、その時点の3次元モデルを確定する、3次元モデルの作成方法。
The method of claim 1, wherein
The three-dimensional information restored by the first three-dimensional measurement is set as a temporary three-dimensional model on condition that the real model is rotated at an arbitrary angle and the process of executing the three-dimensional measurement is executed a plurality of times. Then, each time a subsequent three-dimensional measurement is performed, a recognition process using the provisional three-dimensional model is performed on the three-dimensional information restored by the measurement to determine whether the recognition result is correct or not,
When it is determined that the result of the recognition process by the temporary 3D model is not correct, the 3D measurement is performed by rotating the real model so that the measurement direction with respect to the real model approaches the measurement direction of the previous stage; Performing a recognition process using the temporary three-dimensional model on the three-dimensional information restored by the three-dimensional measurement and determining whether the recognition result is correct or not until the recognition result is determined to be correct. The three-dimensional information corresponding to the recognition result determined to be correct is subjected to coordinate conversion based on the recognition result, and the converted three-dimensional information is added to the temporary three-dimensional model. Rotate the real model in a direction to return to the state when it is determined that
A method for creating a three-dimensional model, in which, when the three-dimensional measurement when the positional relationship between the real model and the stereo camera is in a predetermined state and all the processes associated therewith are completed, the three-dimensional model at that time is determined.
ステレオカメラを用いた3次元計測により認識対象物の3次元情報を復元する3次元計測手段と、復元された3次元情報をあらかじめ登録した3次元モデルと照合することにより認識対象の物体の位置および姿勢を認識する認識処理手段と、認識対象物の実物モデルに対してそれぞれ異なる方向から3次元計測を行うことにより復元された複数の3次元情報を位置を合わせて統合することによって、前記認識処理手段により使用される3次元モデルを作成した後に、当該3次元モデルを登録する3次元モデル登録手段とを具備する装置であって、
前記3次元モデル登録手段は、
前記実物モデルに対する3次元計測手段の処理により復元された複数の3次元情報のうち、2回目以降の計測により復元された3次元情報を、それぞれ一段階前に復元された3次元情報と照合して双方の3次元情報間の対応関係を認識する対応関係認識手段と、
前記複数回の3次元計測により復元された複数の3次元情報のうちの一部に相当する2以上の3次元情報を選択し、選択された3次元情報の1つを基準として、他の3次元情報を、それぞれ当該3次元情報に対応する計測と基準の3次元情報に対応する計測との間の各計測に関して前記対応関係認識手段により認識された3次元情報間の対応関係に基づき、基準の3次元情報に整合するように座標変換し、変換後の3次元情報を基準の3次元情報に統合することにより前記仮の3次元モデルを作成する仮モデル作成手段と、
前記複数の3次元情報のうち仮の3次元モデルに統合されなかった情報に順に着目して、着目した3次元情報を前記仮の3次元モデルにより認識し、その認識結果の正否を判定する認識結果確認手段と、
前記認識結果確認手段が前記認識処理の結果が正しくないと判定したとき、その時点での着目中の3次元情報を、当該3次元情報に対応する計測と前記基準の3次元情報に対応する計測との間の各計測に関して前記対応関係認識手段により認識された3次元情報間の対応関係に基づき、基準の3次元情報に整合するように座標変換し、変換後の3次元情報を仮の3次元モデルに追加することにより前記仮の3次元モデルを更新するモデル更新手段と、
前記認識処理の結果が正しくないと判定された3次元情報の全てが追加された3次元モデルを登録対象として確定するモデル確定手段とを、
具備することを特徴とする物体認識装置。
3D measurement means for restoring 3D information of a recognition object by 3D measurement using a stereo camera, and the position of the object to be recognized by collating the restored 3D information with a previously registered 3D model A recognition processing means for recognizing the posture, and a plurality of three-dimensional information restored by performing three-dimensional measurement from different directions on the real model of the recognition target object, by combining the positions and integrating the recognition processing A three-dimensional model registration means for registering the three-dimensional model after creating the three-dimensional model used by the means,
The three-dimensional model registration means includes:
Of the plurality of three-dimensional information restored by the processing of the three-dimensional measuring means for the real model, the three-dimensional information restored by the second and subsequent measurements is collated with the three-dimensional information restored one stage before. A correspondence recognition means for recognizing the correspondence between the three-dimensional information,
Two or more three-dimensional information corresponding to a part of the plurality of three-dimensional information restored by the plurality of three-dimensional measurements is selected, and the other three are selected based on one of the selected three-dimensional information. Based on the correspondence between the three-dimensional information recognized by the correspondence recognition means for each measurement between the measurement corresponding to the three-dimensional information and the measurement corresponding to the reference three-dimensional information. A temporary model creation means for creating the provisional three-dimensional model by converting the coordinates so as to match the three-dimensional information and integrating the converted three-dimensional information with the reference three-dimensional information;
Recognizing the three-dimensional information among the plurality of three-dimensional information that are not integrated into the temporary three-dimensional model in order, recognizing the focused three-dimensional information by the temporary three-dimensional model, and determining whether the recognition result is correct or not A result confirmation means;
When the recognition result confirmation unit determines that the result of the recognition process is not correct, the three-dimensional information under attention at that time is measured corresponding to the three-dimensional information and the measurement corresponding to the reference three-dimensional information. The coordinate conversion is performed to match the reference three-dimensional information on the basis of the correspondence between the three-dimensional information recognized by the correspondence recognition means for each measurement between the measurement and the converted three-dimensional information. Model updating means for updating the provisional three-dimensional model by adding to the three-dimensional model;
Model confirmation means for confirming, as a registration target, a three-dimensional model to which all of the three-dimensional information determined that the result of the recognition process is incorrect is added;
An object recognition device comprising:
ステレオカメラを用いた3次元計測により認識対象物の3次元情報を復元する3次元計測手段と、復元された3次元情報をあらかじめ登録した3次元モデルと照合することにより認識対象の物体の位置および姿勢を認識する認識処理手段と、認識対象物の実物モデルに対してそれぞれ異なる方向から3次元計測を行うことにより復元された複数の3次元情報を、位置を合わせて統合することによって、前記認識処理手段により使用される3次元モデルを作成した後に、当該3次元モデルを登録する3次元モデル登録手段とを具備する装置であって、
前記3次元モデル登録手段は、
前記3次元計測手段が実物モデルに対する最初の計測を実行したのに応じて、その計測により復元された3次元情報を仮の3次元モデルに初期設定する仮モデル設定手段と、
前記3次元計測手段が実物モデルに対する2回目以降の計測を実行する都度、その計測により復元された3次元情報を対象に前記仮の3次元モデルを用いた認識処理を実行し、その認識結果の正否について判定入力を受け付ける認識結果確認手段と、
前記認識結果確認手段が、実行した認識処理の結果が正しくないとする判定入力を受け付けたとき、この受付後に入力されたステレオ画像から復元された3次元情報のうち、前記認識結果確認手段による処理において前記仮の3次元モデルを用いた認識処理の結果が正しいとする判定入力を受け付けた最初の情報を、その認識結果に基づき座標変換し、変換後の3次元情報を前記仮の3次元モデルに追加することによって、3次元モデルを更新するモデル更新手段と、
前記実物モデルに対する3次元計測およびこれに伴う認識結果確認手段ならびにモデル更新手段の処理がすべて終了したとき、その時点の3次元モデルを登録対象として確定するモデル確定手段とを、
具備することを特徴とする物体認識装置。
3D measurement means for restoring 3D information of a recognition object by 3D measurement using a stereo camera, and the position of the object to be recognized by collating the restored 3D information with a previously registered 3D model The recognition processing means for recognizing the posture and a plurality of three-dimensional information restored by performing three-dimensional measurement from different directions with respect to the real model of the recognition target object, by combining the positions and integrating the recognition An apparatus comprising a three-dimensional model registration means for registering the three-dimensional model after the three-dimensional model used by the processing means is created,
The three-dimensional model registration means includes:
Temporary model setting means for initially setting the three-dimensional information restored by the measurement to a temporary three-dimensional model in response to the first measurement performed by the three-dimensional measurement means on the real model;
Each time the three-dimensional measuring unit performs the second and subsequent measurements on the real model, a recognition process using the temporary three-dimensional model is performed on the three-dimensional information restored by the measurement, and the recognition result Recognition result confirmation means for accepting a determination input for correctness;
When the recognition result confirming unit accepts a determination input indicating that the result of the executed recognition process is not correct, the processing by the recognition result confirming unit among the three-dimensional information restored from the stereo image input after the acceptance The first information that has received a determination input indicating that the result of the recognition process using the temporary three-dimensional model is correct is subjected to coordinate conversion based on the recognition result, and the converted three-dimensional information is converted into the temporary three-dimensional model. A model updating means for updating the three-dimensional model by adding to
A model confirmation unit for confirming a three-dimensional model at that time as a registration target when the processing of the three-dimensional measurement for the real model and the recognition result confirmation unit and the model update unit associated therewith are completed,
An object recognition device comprising:
JP2008283154A 2008-11-04 2008-11-04 Method of creating three-dimensional model and object recognizing device Pending JP2010113398A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2008283154A JP2010113398A (en) 2008-11-04 2008-11-04 Method of creating three-dimensional model and object recognizing device
US12/611,568 US8433128B2 (en) 2008-11-04 2009-11-03 Method of creating three-dimensional model and object recognizing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008283154A JP2010113398A (en) 2008-11-04 2008-11-04 Method of creating three-dimensional model and object recognizing device

Publications (1)

Publication Number Publication Date
JP2010113398A true JP2010113398A (en) 2010-05-20

Family

ID=42301933

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008283154A Pending JP2010113398A (en) 2008-11-04 2008-11-04 Method of creating three-dimensional model and object recognizing device

Country Status (1)

Country Link
JP (1) JP2010113398A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012150796A (en) * 2010-12-28 2012-08-09 Canon Inc Information processing apparatus and method
JP2012193030A (en) * 2011-03-17 2012-10-11 Nippon Steel Corp Raw material yard management system, raw material yard management method and computer program
JP2014517272A (en) * 2011-05-07 2014-07-17 ヒエロニミ、ベネディクト System for evaluating identification marks, identification marks, and uses thereof
JP2017111019A (en) * 2015-12-17 2017-06-22 ファナック株式会社 Model generator, position/posture calculator, and handling robot device
WO2020240949A1 (en) * 2019-05-31 2020-12-03 公益財団法人かずさDna研究所 Three-dimensional measurement device, three-dimensional measurement method, and three-dimensional measurement program

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012150796A (en) * 2010-12-28 2012-08-09 Canon Inc Information processing apparatus and method
JP2012193030A (en) * 2011-03-17 2012-10-11 Nippon Steel Corp Raw material yard management system, raw material yard management method and computer program
JP2014517272A (en) * 2011-05-07 2014-07-17 ヒエロニミ、ベネディクト System for evaluating identification marks, identification marks, and uses thereof
JP2017111019A (en) * 2015-12-17 2017-06-22 ファナック株式会社 Model generator, position/posture calculator, and handling robot device
DE102016014658A1 (en) 2015-12-17 2017-06-29 Fanuc Corporation Model generating device, position and orientation calculating device and handling robot device
US10496762B2 (en) 2015-12-17 2019-12-03 Fanuc Corporation Model generating device, position and orientation calculating device, and handling robot device
WO2020240949A1 (en) * 2019-05-31 2020-12-03 公益財団法人かずさDna研究所 Three-dimensional measurement device, three-dimensional measurement method, and three-dimensional measurement program
JP2020197407A (en) * 2019-05-31 2020-12-10 公益財団法人かずさDna研究所 Three-dimensional measurement device, three-dimensional measurement method, and three-dimensional measurement program
JP7242431B2 (en) 2019-05-31 2023-03-20 公益財団法人かずさDna研究所 Three-dimensional measuring device, three-dimensional measuring method and three-dimensional measuring program
US11941852B2 (en) 2019-05-31 2024-03-26 Kazusa Dna Research Institute Three-dimensional measurement device, three-dimensional measurement method, and three-dimensional measurement program

Similar Documents

Publication Publication Date Title
JP2010121999A (en) Creation method of three-dimensional model, and object recognition device
JP5287152B2 (en) 3D model creation method and object recognition apparatus
US8433128B2 (en) Method of creating three-dimensional model and object recognizing device
JP4508283B2 (en) Recognition processing method and image processing apparatus using this method
JP6543520B2 (en) Survey data processing apparatus, survey data processing method and program for survey data processing
JP5362189B2 (en) Image processing apparatus and processing method thereof
JP4800163B2 (en) Position measuring apparatus and method
JP4042780B2 (en) Object recognition method, object recognition program and storage medium thereof, and object recognition apparatus
CN110570477B (en) Method, device and storage medium for calibrating relative attitude of camera and rotating shaft
CN108965690B (en) Image processing system, image processing apparatus, and computer-readable storage medium
US7010157B2 (en) Stereo image measuring device
JP4687518B2 (en) Image processing method, three-dimensional measurement method using the method, and image processing apparatus
JP5245937B2 (en) Method for deriving parameters of three-dimensional measurement processing and three-dimensional visual sensor
CN112161619B (en) Pose detection method, three-dimensional scanning path planning method and detection system
JP6506032B2 (en) Survey data processing apparatus, survey data processing method and program
JP2007183256A (en) Image processing device and method therefor
CN110926330B (en) Image processing apparatus, image processing method, and program
JP4709668B2 (en) 3D object recognition system
JP2010113398A (en) Method of creating three-dimensional model and object recognizing device
JP4874693B2 (en) Image processing apparatus and processing method thereof
US6810142B2 (en) Stereo image measuring device
JP2016138826A5 (en)
CN107895344B (en) Video splicing device and method
JP6506031B2 (en) Survey data processing apparatus, survey data processing method and program
JP4809134B2 (en) Image processing apparatus and processing method thereof