JP2019070898A - Estimation program, estimation device and estimation method - Google Patents

Estimation program, estimation device and estimation method Download PDF

Info

Publication number
JP2019070898A
JP2019070898A JP2017195787A JP2017195787A JP2019070898A JP 2019070898 A JP2019070898 A JP 2019070898A JP 2017195787 A JP2017195787 A JP 2017195787A JP 2017195787 A JP2017195787 A JP 2017195787A JP 2019070898 A JP2019070898 A JP 2019070898A
Authority
JP
Japan
Prior art keywords
posture
image
information
feature
viewpoint
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.)
Granted
Application number
JP2017195787A
Other languages
Japanese (ja)
Other versions
JP6946912B2 (en
Inventor
厚憲 茂木
Atsunori Mogi
厚憲 茂木
吉武 敏幸
Toshiyuki Yoshitake
敏幸 吉武
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2017195787A priority Critical patent/JP6946912B2/en
Publication of JP2019070898A publication Critical patent/JP2019070898A/en
Application granted granted Critical
Publication of JP6946912B2 publication Critical patent/JP6946912B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Analysis (AREA)

Abstract

To provide a technique which reduces calculation amount needed in association processing for an image of an object and shape information on a body.SOLUTION: A computer is configured to: acquire a captured image of an object; acquire, from a storage unit, a plurality of pieces of initial attitude candidate information which associates attitude information showing attitude and the feature amount of a viewpoint image with each other, for each attitude of a body observed from any of a plurality of viewpoints; collate the feature amount of the captured image with the feature amount of the plurality of pieces of initial attitude candidate information to extract, from the plurality of pieces of initial attitude candidate information, the initial attitude candidate information including attitude information on attitude similar to the attitude of the object projected in the captured image; narrow down a segment obtained from shape information on the body based on the position of a viewpoint in which the body set in the attitude corresponding to the extracted initial attitude candidate information is observed; and estimate the position and the direction of the viewpoint to the object in three dimensional space from the image of the object by associating the segment with a feature line of the captured image.SELECTED DRAWING: Figure 6

Description

本発明は、推定プログラム、推定装置、及び推定方法に関する。   The present invention relates to an estimation program, an estimation device, and an estimation method.

近年、拡張現実(Augmented Reality,AR)技術を用いて画像を表示するシステムが普及してきている。AR技術の一例では、パーソナルコンピュータ(PC)、携帯端末装置等に搭載したカメラを用いて物体が撮影され、物体の画像から3次元空間内におけるカメラの位置及び姿勢が推定される。そして、決定されたカメラの位置及び姿勢を基準にして、画像中の任意の位置にコンテンツ情報が重畳表示される。   In recent years, systems that display images using Augmented Reality (AR) technology have become widespread. In an example of the AR technology, an object is photographed using a camera mounted on a personal computer (PC), a portable terminal device or the like, and the position and orientation of the camera in a three-dimensional space are estimated from an image of the object. Then, content information is superimposed and displayed at an arbitrary position in the image based on the determined position and orientation of the camera.

重畳表示するコンテンツ情報としては、物体の3次元形状を表すComputer-Aided Design(CAD)データが使用される。カメラの位置・姿勢を決定するためには、CADデータの三次元線分と、撮影された画像中の対象物において対応する線分とのペアが、少なくとも4ペア用いられる。   Computer-Aided Design (CAD) data representing a three-dimensional shape of an object is used as the content information to be superimposed and displayed. In order to determine the position and orientation of the camera, at least four pairs of three-dimensional line segments of CAD data and corresponding line segments of an object in a captured image are used.

第1の技術として、立体構造物とモデル情報が表すモデルとを比較する技術がある(例えば、特許文献1)。第1の技術では、コンピュータは、撮像装置により立体構造物を撮像した撮像画像から抽出されたエッジ線と、その立体構造物のモデル情報が表すモデル画像に含まれる稜線とを、選択可能な状態で表示する。次に、コンピュータは、重ね合わせる対象のエッジ線と稜線とを示す選択指示を受け付ける。そして、コンピュータは、受け付けた選択指示に応じて、重ね合わせる対象のエッジ線と稜線とが重なるようにモデル画像を撮像画像に重畳した重畳画像を表示する。   As a first technique, there is a technique for comparing a three-dimensional structure with a model represented by model information (for example, Patent Document 1). In the first technique, the computer can select an edge line extracted from a captured image obtained by capturing an image of a three-dimensional structure by an imaging device and a ridgeline included in a model image represented by model information of the three-dimensional structure. Display with. Next, the computer receives a selection instruction indicating an edge line and a ridge line to be superimposed. Then, in response to the received selection instruction, the computer displays a superimposed image in which the model image is superimposed on the captured image such that the edge line to be superimposed and the ridge line overlap.

また、第2の技術として、3次元物体画像をPCに取り入れ、コンピュータグラフィックスに用いるとき、その幾何学的な形状と表面の色や模様とを含むテクスチャを貼り付けるテクスチャマッピング技術がある(例えば、特許文献2)。   Also, as a second technology, there is a texture mapping technology in which a texture including a geometric shape and a surface color or pattern is pasted when a three-dimensional object image is incorporated into a PC and used for computer graphics (for example, , Patent Document 2).

また、第3の技術として、単一の光源を用いて物体の撮影を行うことにより得られた画像から、撮影時の光源の方向と物体の3次元形状とを推定する技術がある(例えば、特許文献3)。   As a third technique, there is a technique for estimating the direction of the light source at the time of shooting and the three-dimensional shape of the object from an image obtained by shooting the object using a single light source (for example, Patent Document 3).

また、第4の技術として、撮像されたデジタル画像の特徴点から計算された特徴量と、データベース中に登録された文書・画像の特徴点から求められた特徴量とを比較して、撮像されたデジタル画像に対応する文書・画像をデータベースから検索する技術がある(例えば、特許文献4)。特許文献4では、検索装置は、撮像されたデジタル画像から複数の特徴点を抽出する。検索装置は、抽出された各特徴点に対して局所的な特徴点の集合を決定する。検索装置は、決定された各集合から特徴点の部分集合を選択する。検索装置は、選択された各部分集合を特徴付ける量として、部分集合中の特徴点の複数の組合せに基づいて、幾何学的変換に対する不変量をそれぞれ求める。検索装置は、求めた各不変量を組み合わせて特徴量を計算する。検索装置は、対応する特徴量が予め求められたデータベース中の文書・画像に対して投票を行う。これにより、検索装置は、撮像されたデジタル画像に対応するデータベース中の文書・画像を検索する。   Further, as a fourth technique, imaging is performed by comparing the feature amount calculated from the feature points of the captured digital image with the feature amount obtained from the feature points of the document / image registered in the database. Patent Document 4 discloses a technique for searching a database for documents and images corresponding to digital images. In Patent Document 4, a search device extracts a plurality of feature points from a captured digital image. The search device determines a set of feature points local to each of the extracted feature points. The search device selects a subset of feature points from each determined set. The search device obtains invariants to the geometric transformation based on a plurality of combinations of feature points in the subset as a feature characterizing each selected subset. The search device combines the determined invariants to calculate the feature quantity. The search device casts a vote on the document / image in the database in which the corresponding feature amount is obtained in advance. Thereby, the search device searches the document / image in the database corresponding to the captured digital image.

さらに、例えば、非特許文献1〜非特許文献9の技術もある。   Furthermore, there are, for example, the techniques of Non-Patent Document 1 to Non-Patent Document 9.

特開2017−91078号公報JP 2017-91078 A 特開2003−67775号公報Unexamined-Japanese-Patent No. 2003-67775 特開2001−84362号公報Unexamined-Japanese-Patent No. 2001-84362 WO2006/092957号WO 2006/092957 特開2015−118641号公報JP, 2015-118641, A

H. Uchiyama and H. Saito, “Random dot markers,” 2011 IEEE Virtual Reality Conference, pp.35-38.H. Uchiyama and H. Saito, “Random dot markers,” 2011 IEEE Virtual Reality Conference, pp. 35-38. R. G. Gioi et al., LSD: a Line Segment Detector, Image Processing On Line, 2 (2012), pp. 35-55.R. G. Gioi et al., LSD: a Line Segment Detector, Image Processing On Line, 2 (2012), pp. 35-55. H. Uchiyama et al., “Toward augmenting everything: Detecting and tracking geometrical features on planar objects,” 10th IEEE International Symposium on Mixed and Augmented Reality(ISMAR), pp.17-25, Oct. 2011.H. Uchiyama et al., “Toward augmenting everything: Detecting and tracking geometric features on planar objects,” 10th IEEE International Symposium on Mixed and Augmented Reality (ISMAR), pp. 17-25, Oct. 2011. L. G. Robert et al., “Machine perception of three-dimensional solids,” MIT Lincoln Lab. Rep. TR3315, pp. 1-82, May 1963.L. G. Robert et al., “Machine perception of three-dimensional solids,” MIT Lincoln Lab. Rep. TR3315, pp. 1-82, May 1963. B. G. Baumgart, “A polyhedron representation for computer vision,” Proceedings of the May 19-22, 1975, national computer conference and exposition, pp.589-596.B. G. Baumgart, “A polyhedron representation for computer vision,” Proceedings of the May 19-22, 1975, National Computer Conference and Exposition, pp. 589-596. C. Xu et al., “Pose Estimation from Line Correspondences: A Complete Analysis and a Series of Solutions,” IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol.39, No.6, pp.1209-1222, June 2017.C. Xu et al., “Pose Estimation from Line Correspondence: A Complete Analysis and a Series of Solutions,” IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 39, No. 6, pp. 1209-1222, June 2017. Z. Zhang, “A Flexible New Technique for Camera Calibration,” IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol.22, No.11, pp.1330-1334, Nov. 2000.Z. Zhang, "A Flexible New Technique for Camera Calibration," IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 22, No. 11, pp. 1330-1334, Nov. 2000. Bruce G. Baumgart,“A polyhedron representation for computer vision”, Proceedings of the May 19-22, 1975, national computer conference and exposition, pp.589-596, 1975Bruce G. Baumgart, "A polyhedron representation for computer vision", Proceedings of the May 19-22, 1975, National computer conference and exposition, pp. 589-596, 1975 E. Rublee et al., “ORB: an efficient alternative to SIFT or SURF,” In Proc. of IEEE International Conference on Computer Vision, pp.2564-2571, 2011.E. Rublee et al., “ORB: an efficient alternative to SIFT or SURF,” In Proc. Of IEEE International Conference on Computer Vision, pp. 2564-2571, 2011.

カメラの位置及び姿勢を推定する場合において、カメラにより撮影した物体の画像と、その物体のCADデータとを対応付ける場合、例えば、第1の技術では次の処理が行われている。撮像画像から抽出されたエッジ線と、その物体のモデル情報(CADモデル)が表すモデル画像に含まれる稜線とを重ね合わせるために、撮像画像内の物体の姿勢に合わせて、ユーザが初期のCADモデルの姿勢(初期モデル姿勢)を調整する。   In the case of estimating the position and orientation of a camera, when the image of an object captured by a camera is associated with CAD data of the object, for example, the following process is performed in the first technique. In order to overlap an edge line extracted from a captured image with a ridgeline included in a model image represented by model information (CAD model) of the object, the user can use an initial CAD according to the posture of the object in the captured image. Adjust the model's attitude (initial model attitude).

しかしながら、撮像されている対象物の姿勢が変わる度に、その対象物のCADデータからその姿勢に対応する線分を算出して対応する線分ペアを探索する場合、探索対象となる線分ペアの候補に際限がなく、演算処理の負担が大きくなる。   However, every time the posture of the object being imaged changes, when the line segment corresponding to the posture is calculated from the CAD data of the object and the corresponding line pair is searched, the line pair pair to be searched is There is no limit to the candidates of, and the load of arithmetic processing increases.

本発明の一側面として、対象物の画像と物体の形状情報との対応付け処理にかかる計算量を削減する技術を提供する。   According to one aspect of the present invention, there is provided a technique for reducing the amount of calculation involved in the process of associating an image of an object with shape information of an object.

一態様によれば、推定プログラムは、コンピュータに、対象物を撮影した撮像画像を取得し、記憶部から、複数の視点のいずれかから観察される物体の姿勢毎に、該姿勢を表す姿勢情報と、該姿勢情報に対応する視点から観察された該物体の画像を示す視点画像と、該視点画像から抽出された複数の特徴点を用いて算出される該視点画像の特徴量とを関連付けた情報である複数の初期姿勢候補情報を取得し、前記撮像画像の特徴量と前記複数の初期姿勢候補情報の特徴量とを照合し、照合結果に基づいて該複数の初期姿勢候補情報から、前記撮像画像に写っている前記対象物の姿勢に類似する姿勢の姿勢情報を含む初期姿勢候補情報を抽出し、抽出した前記初期姿勢候補情報に対応する姿勢の物体が観察される視点の位置に基づいて、前記物体の形状情報から得られる線分を絞り込み、絞り込んだ前記線分と前記撮像画像から検出される特徴線とを対応付け、対応付け結果に基づいて、前記対象物の画像から3次元空間内における該対象物に対する視点の位置及び方向を推定する、処理を実行させる。   According to one aspect, the estimation program causes a computer to acquire a captured image obtained by capturing an object, and from the storage unit, posture information representing the posture for each posture of an object observed from any of a plurality of viewpoints And a viewpoint image representing an image of the object observed from a viewpoint corresponding to the posture information and a feature amount of the viewpoint image calculated using a plurality of feature points extracted from the viewpoint image. A plurality of initial posture candidate information which is information is acquired, the feature amount of the captured image and the feature amounts of the plurality of initial posture candidate information are collated, and the plurality of initial posture candidate information is compared based on the collation result. Initial posture candidate information including posture information of a posture similar to the posture of the target object shown in the captured image is extracted, and based on the position of the viewpoint where the object of the posture corresponding to the extracted initial posture candidate information is observed The said thing The line segment obtained from the shape information of the object is narrowed down, the narrowed line segment and the feature line detected from the captured image are associated, and based on the association result, the image in the three-dimensional space A process is performed to estimate the position and direction of the viewpoint with respect to the object.

本発明の一側面として、対象物の画像と物体の形状情報との対応付け処理にかかる計算量を削減することができる。   As one aspect of the present invention, it is possible to reduce the amount of calculation involved in the process of associating the image of the object with the shape information of the object.

物体の画像の例を示している。An example of an image of an object is shown. 図1の物体の形状を表すCADデータのモデルの初期の姿勢(初期モデル姿勢)の例を示す図である。It is a figure which shows the example of the initial stage attitude | position (initial model attitude | position) of the model of CAD data showing the shape of the object of FIG. 図1の画像から検出されたエッジ線と、図2の初期モデル姿勢の輪郭線との対応付けの例を示す図である。FIG. 7 is a diagram showing an example of correspondence between edge lines detected from the image of FIG. 1 and outlines of the initial model posture of FIG. 2; 画像中の物体の姿勢と初期モデル姿勢との関係を示す図である。It is a figure which shows the relationship between the attitude | position of the object in an image, and an initial model attitude | position. 本実施形態における推定装置の一例を示す図である。It is a figure which shows an example of the estimation apparatus in this embodiment. 本実施形態の全体の処理フローを示す図である。It is a figure which shows the processing flow of the whole of this embodiment. 本実施形態における初期モデルの推定処理を説明するための図である。It is a figure for demonstrating the estimation process of the initial stage model in this embodiment. 本実施形態(実施例1)における推定装置のブロック図である。It is a block diagram of an estimation device in this embodiment (example 1). 本実施形態(実施例1)におけるCADデータのデータ構造例を示す図である。It is a figure which shows the example of a data structure of CAD data in this embodiment (Example 1). 本実施形態(実施例1)におけるCAD画像DBの生成処理のフローチャートを示す図である。It is a figure which shows the flowchart of a production | generation process of CAD image DB in this embodiment (Example 1). 正八面体上の視点の例を説明するための図である。It is a figure for demonstrating the example of the viewpoint on a regular octahedron. 本実施形態(実施例1)における複数の初期モデル姿勢候補のそれぞれから生成したCAD画像の一例を示す図である。It is a figure which shows an example of the CAD image produced | generated from each of several initial model attitude | position candidate in this embodiment (Example 1). 本実施形態(実施例1)におけるCAD画像からの交点抽出例を示す図である。It is a figure which shows the example of intersection extraction from the CAD image in this embodiment (Example 1). 本実施形態(実施例1)におけるLLAHの計算を説明するための図である。It is a figure for demonstrating calculation of LLAH in this embodiment (Example 1). 本実施形態(実施例1)におけるCAD画像DBの一例を示す図である。It is a figure which shows an example of CAD image DB in this embodiment (Example 1). 本実施形態(実施例1)における画像処理の具体例を示すフローチャートである。It is a flowchart which shows the specific example of the image processing in this embodiment (Example 1). 本実施形態(実施例1)における初期モデル姿勢推定処理(S24)のフローを示す図である。It is a figure showing the flow of initial model posture presumption processing (S24) in this embodiment (example 1). 画像内の四角形の指定領域の例を示す図である。It is a figure which shows the example of the square designation | designated area | region in an image. 本実施形態(実施例1)における撮像画像から特徴線の交点を抽出することについて説明するための図である。It is a figure for demonstrating extracting the intersection of a feature line from the captured image in this embodiment (Example 1). 図18に示した画像の領域に写っている物体のCADデータから検出された候補線の例を示す図である。It is a figure which shows the example of the candidate line | wire detected from the CAD data of the object reflected to the area | region of the image shown in FIG. 図20に示した候補線から隠線を除去した後の残りの候補線の例を示す図である。FIG. 21 is a diagram showing an example of remaining candidate lines after removing hidden lines from the candidate lines shown in FIG. 20. 本実施形態(実施例1)における物体の外周を表す候補線の例を示す図である。It is a figure which shows the example of the candidate line showing the outer periphery of the object in this embodiment (Example 1). 本実施形態(実施例1)における対応ペアの例を示す図である。It is a figure which shows the example of the corresponding | compatible pair in this embodiment (Example 1). 本実施形態(実施例1)における投影線と特徴線との間の領域の面積に基づく計算方法の例を示す図である。It is a figure which shows the example of the calculation method based on the area of the area | region between the projection line and the feature line in this embodiment (Example 1). 本実施形態(実施例1)における投影線と特徴線との間の距離に基づく計算方法の例を示す図である。It is a figure which shows the example of the calculation method based on the distance between the projection line and the feature line in this embodiment (Example 1). 180度回転した線分の例を示す図である。It is a figure which shows the example of the line segment rotated 180 degrees. パラメータの計算に適していない候補線の例を示す図である。It is a figure which shows the example of the candidate line which is not suitable for calculation of a parameter. 本実施形態(実施例1)における誤差の算出について説明するための図である。It is a figure for demonstrating calculation of the error in this embodiment (Example 1). 本実施形態における推定装置として用いられるコンピュータの構成例を示す図である。It is a figure which shows the structural example of the computer used as an estimation apparatus in this embodiment.

以下、図面を参照しながら、実施形態を詳細に説明する。
図1は、物体の画像の例を示す図である。図2は、図1の物体の形状を表すCADデータのモデルの初期の姿勢(初期モデル姿勢)の例を示す図である。図3は、図1の画像から検出されたエッジ線と、図2の初期モデル姿勢の輪郭線との対応付けの例を示す図である。
Hereinafter, embodiments will be described in detail with reference to the drawings.
FIG. 1 is a diagram showing an example of an image of an object. FIG. 2 is a view showing an example of an initial posture (initial model posture) of a model of CAD data representing the shape of the object in FIG. FIG. 3 is a diagram showing an example of correspondence between edge lines detected from the image of FIG. 1 and outlines of the initial model posture of FIG.

まず、携帯端末装置等の推定装置は、図3(a)に示すように、エッジ検出処理を行って、画像からエッジ線を検出する。次に、図3(b)に示すように、推定装置は、初期モデル姿勢のCADデータが表す輪郭線と、検出したエッジ線とを画像中に表示する。ユーザは、エッジ線及び輪郭線をマウス等で選択することで、それらの線同士を対応付ける。カメラの位置及び姿勢を求めるためには、最低限4個の対応ペアを用いることが望ましい。   First, as shown in FIG. 3A, an estimation device such as a portable terminal device performs edge detection processing to detect an edge line from an image. Next, as shown in FIG. 3B, the estimation device displays in the image an outline represented by CAD data of the initial model posture and a detected edge line. The user associates edge lines and outlines with one another by selecting them with a mouse or the like. In order to determine the position and orientation of the camera, it is desirable to use at least four corresponding pairs.

次に、推定装置は、対応付けられたエッジ線及び輪郭線の組み合わせを用いて、カメラの位置及び姿勢を計算する。そして、図5(c)に示すように、推定装置は、計算したカメラの位置及び姿勢に合わせて、CADデータが表す輪郭線を物体の画像に重畳表示する。
このような対応付け方法によれば、以下のような問題が発生すると考えられる。
Next, the estimation device calculates the position and orientation of the camera using the combination of the edge line and the contour line associated with each other. Then, as shown in FIG. 5C, the estimation apparatus superimposes and displays the outline represented by the CAD data on the image of the object in accordance with the calculated position and orientation of the camera.
According to such an association method, it is considered that the following problems occur.

図4は、画像中の物体の姿勢と初期モデル姿勢との関係を示す図である。CADデータのモデルの姿勢は、CADデータにより表される物体を撮像するカメラの位置に応じて決定される。   FIG. 4 is a view showing the relationship between the posture of an object in an image and the initial model posture. The posture of the CAD data model is determined according to the position of the camera that captures the object represented by the CAD data.

図3(b)において、ユーザは、まず初期モデル姿勢101を固定値に設定し、カメラの位置を移動させる。次に、ユーザは、対象物の姿勢102に一致するように、タッチ操作やマウス操作等で初期モデル姿勢101を動かす。このとき、対象物の姿勢102と初期モデル姿勢101とが合致していると、エッジ線及び輪郭線を対応づけることができる(図4(a))。一方、対象物の姿勢102と初期モデル姿勢101とが合致していないと、エッジ線及び輪郭線を対応づけることができない(図4(b))。   In FIG. 3B, the user first sets the initial model posture 101 to a fixed value, and moves the position of the camera. Next, the user moves the initial model posture 101 by a touch operation, a mouse operation, or the like so as to match the posture 102 of the object. At this time, when the posture 102 of the object matches the initial model posture 101, the edge line and the outline can be associated (FIG. 4A). On the other hand, if the posture 102 of the object and the initial model posture 101 do not match, the edge line and the contour can not be correlated (FIG. 4B).

そこで、第1の技術では、撮像画像から抽出されたエッジ線とCADデータが表す輪郭線(線分)との対応付けにおいて、画像中の対象物の姿勢102に応じて、初期モデル姿勢101を手動で調整している。   Therefore, in the first technique, the initial model posture 101 is set according to the posture 102 of the object in the image in the correspondence between the edge line extracted from the captured image and the outline (line segment) represented by the CAD data. I have adjusted manually.

しかしながら、撮像画像内の物体の姿勢に合わせて初期モデル姿勢を手動で調整するには手間も時間もかかる。一方で、その調整が行われないと、線分ペアを形成する場合に誤った対応付けをして線分ペアを形成する可能性がある。   However, it takes time and effort to manually adjust the initial model posture in accordance with the posture of the object in the captured image. On the other hand, if the adjustment is not performed, when forming a line segment pair, there is a possibility that a line segment pair is formed by incorrect association.

また、撮像されている対象物の姿勢が変わる度に、その対象物のCADデータからその姿勢に対応する線分を算出して対応する線分ペアを探索する場合、その探索する線辺ペアを探索する候補に際限がなく、演算処理の負担が大きくなる。   Also, every time the posture of the object being imaged changes, if the line segment corresponding to the posture is calculated from the CAD data of the object and the corresponding line pair is searched, the line edge pair to be searched is There is no limit to the candidates to be searched, and the burden of arithmetic processing becomes large.

そこで、本実施形態では、対象物を撮像した画像から、その対象物のCADデータの初期モデル姿勢を推定する。これにより、撮像画像から抽出されたエッジ線とCADデータが表す輪郭線(線分)との対応付けを簡略することで、その対応付けの時間の削減及びユーザビリティの向上、誤った重畳表示の防止を実現する。   Therefore, in the present embodiment, an initial model posture of CAD data of the object is estimated from an image obtained by imaging the object. Thereby, the correspondence between the edge line extracted from the captured image and the outline (line segment) represented by the CAD data is simplified, thereby reducing the time of the correspondence, improving the usability, and preventing the erroneous superimposed display. To achieve.

図5は、本実施形態における推定装置の一例を示す図である。推定装置1は、記憶部2、画像取得部3、照合部4、絞込部5、対応付け部6、推定部7を含む。推定装置1の一例として、後述する推定装置21が挙げられる。   FIG. 5 is a diagram showing an example of the estimation apparatus in the present embodiment. The estimation device 1 includes a storage unit 2, an image acquisition unit 3, a collation unit 4, a narrowing unit 5, an association unit 6, and an estimation unit 7. As an example of the estimation device 1, an estimation device 21 described later can be mentioned.

記憶部2は、複数の初期姿勢候補情報9を格納する。記憶部2の一例としては、後述する記憶部33が挙げられる。初期姿勢候補情報9は、複数の視点のいずれかから観察される物体の姿勢毎に、姿勢情報と、視点画像と、視点画像の特徴量とを関連付けた情報である。姿勢情報は、物体の姿勢を表す。視点画像は、該姿勢情報に対応する視点から観察された該物体の画像を示す。姿勢画像の特徴量は、該視点画像から抽出された複数の特徴点を用いて算出される。初期姿勢候補情報9の一例として、後述するCAD画像DB11が挙げられる。   The storage unit 2 stores a plurality of initial posture candidate information 9. An example of the storage unit 2 is a storage unit 33 described later. The initial posture candidate information 9 is information in which posture information, a viewpoint image, and a feature amount of a viewpoint image are associated with each posture of an object observed from any of a plurality of viewpoints. The posture information represents the posture of the object. The viewpoint image indicates the image of the object observed from the viewpoint corresponding to the posture information. The feature amount of the posture image is calculated using a plurality of feature points extracted from the viewpoint image. An example of the initial posture candidate information 9 is a CAD image DB 11 described later.

画像取得部3は、対象物を撮影した撮像画像を取得する。画像取得部3の一例として、後述する画像取得部25が挙げられる。   The image acquisition unit 3 acquires a captured image obtained by capturing an object. An example of the image acquisition unit 3 is an image acquisition unit 25 described later.

照合部4は、撮像画像の特徴量と複数の初期姿勢候補情報の特徴量とを照合し、照合結果に基づいて複数の初期姿勢候補情報9から、撮像画像に写っている対象物の姿勢に類似する姿勢の姿勢情報を含む初期姿勢候補情報を抽出する。照合部4の一例として、後述する姿勢推定部27が挙げられる。   The collation unit 4 collates the feature amount of the captured image with the feature amounts of the plurality of initial posture candidate information, and based on the comparison result, from the plurality of initial posture candidate information 9 to the posture of the object shown in the captured image Initial posture candidate information including posture information of similar postures is extracted. As an example of the matching unit 4, a posture estimation unit 27 described later can be mentioned.

絞込部5は、照合部4が抽出した初期姿勢候補情報に対応する姿勢の物体が観察される視点の位置に基づいて、物体の形状情報から得られる線分を絞り込む。絞込部5の一例として、後述する候補線抽出部24が挙げられる。   The narrowing-down unit 5 narrows down the line segment obtained from the shape information of the object based on the position of the viewpoint at which the object in the posture corresponding to the initial posture candidate information extracted by the collation unit 4 is observed. An example of the narrowing-down unit 5 includes a candidate line extraction unit 24 described later.

対応付け部6は、絞り込んだ前記線分と前記撮像画像から検出される特徴線とを対応付ける。対応付け部6の一例として、後述する生成部28が挙げられる。   The associating unit 6 associates the narrowed line segment with the feature line detected from the captured image. An example of the association unit 6 is a generation unit 28 described later.

推定部7は、対応付け結果に基づいて、前記対象物の画像から3次元空間内における該対象物に対する視点の位置及び方向を推定する。   The estimation unit 7 estimates the position and the direction of the viewpoint with respect to the object in the three-dimensional space from the image of the object based on the association result.

このように構成することにより、対象物の画像と物体の形状情報との対応付け処理にかかる計算量を削減することができる。   By configuring in this manner, it is possible to reduce the amount of calculation involved in the process of associating the image of the object with the shape information of the object.

初期姿勢候補情報9は、物体を取り囲む多面体の頂点及び面の中心に視点を配置した場合に視点のそれぞれから観察される該物体の姿勢に関する情報である。初期姿勢候補情報9の数は、多面体の頂点及び面の中心の数に対応する。   The initial posture candidate information 9 is information on the posture of the object observed from each of the viewpoints when the viewpoint is arranged at the center of the apex and surface of the polyhedron surrounding the object. The number of initial posture candidate information 9 corresponds to the number of vertexes of the polyhedron and the center of the surface.

このように構成することにより、多面体の頂点及び面の増加に応じて視点数が増えると、初期モデル姿勢候補も増加し精度が高まると共に,撮像する視点の位置の間隔を均等にすることができる。   With this configuration, when the number of viewpoints increases as the number of vertices and faces of the polyhedron increases, the initial model posture candidates also increase and the accuracy increases, and the intervals of the positions of the viewpoints to be imaged can be made uniform. .

候補線抽出部24は、さらに、生成部8を含む。生成部8は、物体の形状情報に基づいて、物体を取り囲む多面体の頂点及び面の中心に視点を配置した場合に視点のそれぞれから観察される物体の姿勢に関する複数の初期姿勢候補情報を生成する。   The candidate line extraction unit 24 further includes a generation unit 8. The generation unit 8 generates, based on the shape information of the object, a plurality of pieces of initial posture candidate information related to the posture of the object observed from each of the viewpoints when the viewpoints are arranged at the vertices of the polyhedron surrounding the object and the center of the surface. .

このように構成することにより、物体の形状情報から、異なる姿勢毎の初期姿勢候補情報を生成することができる。   By configuring in this way, it is possible to generate initial posture candidate information for each different posture from the shape information of the object.

特徴量は、視点画像または撮像画像から抽出した特徴線の交点それぞれについて、交点それぞれの周囲にある複数の交点に関して幾何学的変換に対する不変量を算出することにより得られる各交点の特徴量である。照合部4は、視点画像から抽出した特徴線の交点の特徴量と撮像画像から抽出した特徴線の交点の特徴量とが一致する交点の数を計測し、一致する交点の数が最も多い姿勢情報を初期姿勢情報として推定する。   The feature amount is a feature amount of each intersection obtained by calculating an invariant to a geometrical transformation with respect to a plurality of intersections around each of the intersections of the feature lines extracted from the viewpoint image or the captured image. . The matching unit 4 measures the number of intersections at which the feature amount at the intersection of the feature lines extracted from the viewpoint image matches the feature amount at the intersections of the feature lines extracted from the captured image. Information is estimated as initial attitude information.

このように構成することにより、画像の特徴量を算出することができるので、その特徴量に基づいて、撮像画像中の対象物の初期姿勢情報を推定することができる。   By configuring in this manner, the feature amount of the image can be calculated, and therefore, it is possible to estimate the initial posture information of the object in the captured image based on the feature amount.

姿勢情報は、回転成分を含む3次元座標系で表される。後述するように、姿勢情報には、少なくとも回転成分を含んでおけばよい。   The posture information is represented by a three-dimensional coordinate system including a rotation component. As described later, the posture information may include at least a rotation component.

ここで、上記の特徴量に関して詳述する。幾何学的変換の歪みによらない画像の特徴量を得るため、幾何学的変換に対する不変量を用いて特徴量が計算される。「不変量」とは、幾何学的変換を受けても変化しない量の総称である。幾何学的変換の一例は回転であり、画像を回転させても、画像中に映っている図形の面積は変化しない。図形の面積は回転に対する不変量の例である。また、辺の長さの比は、拡大縮小に対する不変量の例である。幾何学的変換には、回転や拡大縮小などの相似変換のほかに射影変換やアフィン変換がある。   Here, the above-mentioned feature quantities will be described in detail. In order to obtain feature quantities of the image that do not depend on distortion of the geometric transformation, feature quantities are calculated using invariants for the geometric transformation. "Invariant" is a generic term for quantities that do not change even after geometric transformation. An example of geometrical transformation is rotation, and rotating the image does not change the area of the figure shown in the image. The area of a figure is an example of an invariant to rotation. Also, the ratio of side lengths is an example of an invariant to scaling. Geometric transformations include projective transformations and affine transformations as well as similarity transformations such as rotation and scaling.

本実施形態では、不変量の一例として、複比を用いる。複比は、直線上の4点または平面上の5点から求められる値で、幾何学的変換の一種である射影変換に対する不変量として知られている。複比を用いるためには、対象とする画像の特徴を点(特徴点)で表す。   In this embodiment, a multiple ratio is used as an example of the invariant. A multiple ratio is a value obtained from four points on a straight line or five points on a plane, and is known as an invariant to projective transformation which is a type of geometrical transformation. In order to use a multiple ratio, the feature of the target image is represented by a point (feature point).

特徴点の可能な対応付けを全て試すことは、組み合わせ爆発が生じるため現実的ではない。そこで、本実施形態では、ハッシュを用いた投票を導入し、特徴点の対応を陽に取らずに検索を行う。登録時には、まず画像から特徴点を求めて特徴量を計算し、そこからインデックスを求めてハッシュに登録する。検索時には、検索質問から同様の処理で特徴点、特徴量、インデックスを求めてハッシュにアクセスし、登録されている文書・画像に対して投票を行うことで検索する。   It is not realistic to try all possible correspondences of feature points, as combination explosions occur. Therefore, in the present embodiment, a vote using a hash is introduced, and a search is performed without explicitly taking the correspondence of feature points. At the time of registration, first, feature points are obtained from the image and feature amounts are calculated, and an index is obtained therefrom to be registered in the hash. At the time of search, the hash value is obtained by obtaining the feature point, the feature amount, and the index in the same process from the search query, and the search is performed by voting on the registered document / image.

なお、「投票」とは、情報処理の分野で部分的に証拠を集計するために用いる処理であって、得られた証拠に基づいて選択肢の何れかに得点を与え、すべての証拠を集計した結果最高得点を得た選択肢を選択する処理をいう。一般的に各証拠は異なる点数の票を持つ。また、「検索質問」とは、情報検索において、ユーザの検索要求を表すデータをいう。本実施形態の場合には、ユーザは画像を検索質問として入力する。即ち、ユーザは、「この画像と同じものをデータベースより取り出せ」という意味で画像を入力する。   Note that “voting” is a process used to partially accumulate evidence in the field of information processing, and based on the obtained evidence, any one of the options is scored and all evidence is aggregated Result It is the process of selecting the option with the highest score. In general, each piece of evidence has a different score. Also, “search query” refers to data representing a user's search request in information search. In the case of this embodiment, the user inputs an image as a search question. That is, the user inputs an image in the sense that "the same as this image can be retrieved from the database".

本実施形態では、ある点に着目してその点の近傍ごとに特徴量を定義する。即ち、ある点の近傍n個の点を取り出す。さらに、n個の点からm個の点(複比の単位とする点の数、4または5<m<n)を取り出せば、幾何学的変換を受けても互いに対応する点の近傍n個のうちm個の点が一致するような組合せが存在すると考える。この場合、全ての点についてその近傍n個のうちm個の点の組み合わせを全て試すようにする。n、mの値を適当に選択することにより、計算量の爆発を回避することができる。   In the present embodiment, focusing on a certain point, feature quantities are defined in the vicinity of that point. That is, n points near a certain point are taken out. Furthermore, if m points (the number of points in multiple units, 4 or 5 <m <n) are extracted from n points, n points near corresponding points are obtained even if geometrical transformation is performed. It is considered that there exists a combination such that m points in the above match. In this case, all combinations of m points out of n neighborhoods are tried for all points. By appropriately selecting the values of n and m, explosion of computational complexity can be avoided.

さらに、m個の点から4または5個の点を選んで複比を計算すると、いくつかの複比が他の画像と同じになっても、全ての複比が一致することは非常に稀になる。その結果、精度よく同一性が判定できる。   Furthermore, if you select 4 or 5 points from m points and calculate the ratio, it is very rare that all ratios will match even if some ratios are the same as other images. become. As a result, identity can be determined with high accuracy.

図6は、本実施形態の全体の処理フローを示す図である。図7は、本実施形態における初期モデルの推定処理を説明するための図である。まず、推定装置1は、物体のCADデータに基づいて、初期モデル姿勢の候補データが格納されるCAD画像データベース(以下、データベースを「DB」と称する。)11を生成する(S1)。   FIG. 6 is a diagram showing an overall processing flow of the present embodiment. FIG. 7 is a diagram for explaining an estimation process of an initial model in the present embodiment. First, the estimation apparatus 1 generates a CAD image database (hereinafter, the database is referred to as “DB”) 11 in which candidate data of an initial model posture is stored based on CAD data of an object (S1).

CAD画像DB11には、その物体を複数の視点から観察した場合の各視点から観察された物体の姿勢を表すCADモデルの画像(CAD画像)と、その時のCADモデルの位置姿勢(Ri:回転成分、Ti:並進成分)が格納される。ここで、視点とは、上述のカメラに相当する。   The CAD image DB 11 includes an image (CAD image) of a CAD model representing the posture of the object observed from each viewpoint when the object is observed from a plurality of viewpoints, and the position and orientation (Ri: rotation component) of the CAD model at that time , Ti: translational component) is stored. Here, the viewpoint corresponds to the above-described camera.

CAD画像DB11には、さらに、CAD画像内のCADモデルの姿勢の候補(初期モデル姿勢候補)を特定するための特徴量fが格納される。ここで、推定装置1は、例えば、CAD画像から対象物の輪郭線を延長した直線同士の交点を算出する。それから、推定装置1は、各交点pの近傍にあるn個の交点を局所的な集合として決定し、各集合からm個の交点を選択する各組合せに対して特徴量fを計算する。   The CAD image DB 11 further stores feature amounts f for specifying candidates (initial model posture candidates) of postures of the CAD model in the CAD image. Here, the estimation device 1 calculates, for example, an intersection point of straight lines obtained by extending the outline of the object from the CAD image. Then, the estimation apparatus 1 determines n intersections in the vicinity of each intersection p as a local set, and calculates the feature amount f for each combination for selecting m intersections from each set.

次に、推定装置1は、対象物が撮像された撮像画像12を取得する(S2)。推定装置1は、初期モデル姿勢推定処理を行う(S3)。S3では、推定装置1は、CAD画像DB11から撮像画像12中の対象物の姿勢に最も近いCAD画像を探し、そのCAD画像におけるモデル位置姿勢を初期モデル姿勢と決定する。   Next, the estimation device 1 acquires a captured image 12 in which an object is captured (S2). The estimation device 1 performs initial model attitude estimation processing (S3). In S3, the estimation device 1 searches the CAD image DB 11 for a CAD image closest to the posture of the object in the captured image 12, and determines the model position and posture in the CAD image as the initial model posture.

S3では、推定装置1は、まず、CAD画像DB11に格納された各初期モデル姿勢候補の特徴量と、撮像画像に含まれる対象物の画像部分の特徴量とのマッチングを行う(S3−1)。ここで、推定装置1は、例えば、撮像画像から対象物の輪郭線を延長した直線同士の交点を算出する。それから、推定装置1は、各交点pの近傍にあるn個の交点を局所的な集合として決定し、各集合からm個の交点を選択する各組合せに対して特徴量fを計算する。推定装置1は、撮像画像と初期モデル姿勢候補との間で、特徴量が一致する交点の数を計測する。   In S3, the estimation apparatus 1 first performs matching between the feature quantities of the respective initial model posture candidates stored in the CAD image DB 11 and the feature quantities of the image portion of the target object included in the captured image (S3-1) . Here, the estimation device 1 calculates, for example, an intersection of straight lines obtained by extending the outline of the object from the captured image. Then, the estimation apparatus 1 determines n intersections in the vicinity of each intersection p as a local set, and calculates the feature amount f for each combination for selecting m intersections from each set. The estimation apparatus 1 measures the number of intersections at which the feature amounts match between the captured image and the initial model posture candidate.

推定装置1は、マッチングした交点数を類似度として算出する。推定装置1は、CAD画像DB11に格納された初期モデル姿勢候補から、撮像画像に含まれる対象物の姿勢と類似度が最も高いものを初期モデル姿勢13として決定する(S3−2)。   The estimation device 1 calculates the number of matching intersection points as the degree of similarity. From the initial model posture candidates stored in the CAD image DB 11, the estimation apparatus 1 determines, as the initial model posture 13, one having the highest similarity to the posture of the object included in the captured image (S3-2).

推定装置1は、初期モデル姿勢13の物体の形状情報に含まれる複数の輪郭線(候補線)のうち、物体を観察した視点から観察される複数の候補線を抽出する(S4)。   The estimation apparatus 1 extracts a plurality of candidate lines observed from the viewpoint of the observation of the object among the plurality of contour lines (candidate lines) included in the shape information of the object of the initial model posture 13 (S4).

次に、推定装置1は、観察される複数の候補線のうち所定数の候補線それぞれと、画像から検出した複数の特徴線のうち所定数の特徴線それぞれとを対応付けた、所定数の組み合わせを表す対応付け情報を複数個生成する(S5)。そして、推定装置1は、複数個の対応付け情報それぞれの誤差に基づいて対応付け結果を決定する(S6)。   Next, the estimation apparatus 1 determines a predetermined number of candidate lines to be observed, each of which is associated with a predetermined number of feature lines detected from the image. A plurality of pieces of association information indicating combinations are generated (S5). Then, the estimation device 1 determines the association result based on the errors of each of the plurality of association information (S6).

推定装置1は、対応付け結果に基づいて、対象物の画像から3次元空間内における対象物に対する視点の位置及び方向(カメラの位置及び姿勢)を推定する(S7)。   The estimation apparatus 1 estimates the position and direction (the position and orientation of the camera) of the viewpoint with respect to the object in the three-dimensional space from the image of the object based on the association result (S7).

本実施形態について、以下に詳述する。
図8は、本実施形態(実施例1)における推定装置のブロック図である。推定装置21は、CADデータ読込部22、CAD画像DB生成部23、候補線抽出部24、画像取得部25、特徴検出部26、姿勢推定部27、生成部28、位置計算部29、誤差計算部30、決定部31、出力部32、及び記憶部33を含む。
The present embodiment will be described in detail below.
FIG. 8 is a block diagram of an estimation apparatus in the present embodiment (Example 1). The estimation device 21 includes a CAD data reading unit 22, a CAD image DB generation unit 23, a candidate line extraction unit 24, an image acquisition unit 25, a feature detection unit 26, a posture estimation unit 27, a generation unit 28, a position calculation unit 29, and an error calculation. A unit 30, a determination unit 31, an output unit 32, and a storage unit 33 are included.

推定装置21は、タブレット、ノート型PC、スマートデバイス等の携帯端末装置であってもよく、デスクトップ型PC等のコンピュータであってもよい。   The estimation device 21 may be a portable terminal device such as a tablet, a notebook PC, or a smart device, or may be a computer such as a desktop PC.

記憶部33は、撮像画像12、CADデータ41、CAD画像DB11、特徴線43、候補線44、対応ペア45、パラメータ46、指標47、パラメータ48等を記憶する。   The storage unit 33 stores the captured image 12, CAD data 41, CAD image DB 11, feature line 43, candidate line 44, corresponding pair 45, parameter 46, index 47, parameter 48 and the like.

CADデータ41は、物体の3次元形状を表す複数の頂点の頂点情報と、複数の線分の線分情報とを含む。頂点情報は、物体の各頂点の3次元座標を含み、線分情報は、各線分の両端の頂点を示す識別情報を含む。   The CAD data 41 includes vertex information of a plurality of vertices representing a three-dimensional shape of an object, and line segment information of a plurality of line segments. The vertex information includes three-dimensional coordinates of each vertex of the object, and the line segment information includes identification information indicating vertices at both ends of each line segment.

CAD画像DB生成部23は、CADデータ41により表される物体を複数の撮像位置のそれぞれから観察した場合の物体の位置姿勢を示す値(姿勢値)の候補(初期モデル姿勢候補)を決定する。CAD画像DB生成部23は、レンダリングプログラムを用いて、その決定した初期モデル姿勢候補それぞれのCAD物体の画像の画像(CAD画像)を生成する。CAD画像DB生成部23は、生成したCAD画像からエッジ(特徴線)を抽出し、そのエッジ(特徴線)を延長した直線同士の交点を抽出し、各交点の特徴量を算出する。CAD画像DB生成部23は、初期モデル姿勢候補の姿勢値(Ri,Ti)と、その姿勢値に対応するCAD画像と、そのCAD画像に対応する各交点の特徴量とを関係づけて、CAD画像DB11に格納する。   The CAD image DB generation unit 23 determines a candidate (initial model posture candidate) of a value (posture value) indicating the position and posture of the object when the object represented by the CAD data 41 is observed from each of a plurality of imaging positions. . The CAD image DB generation unit 23 generates an image (CAD image) of the image of the CAD object of each of the determined initial model posture candidates using the rendering program. The CAD image DB generation unit 23 extracts an edge (feature line) from the generated CAD image, extracts an intersection of straight lines extending the edge (feature line), and calculates a feature amount of each intersection. The CAD image DB generation unit 23 associates the posture value (Ri, Ti) of the initial model posture candidate, the CAD image corresponding to the posture value, and the feature amount of each intersection corresponding to the CAD image, It stores in image DB11.

撮像装置20は、例えば、カメラであり、物体の撮像画像12を撮影する。画像取得部25は、撮像装置20から撮像画像12を取得して、記憶部33に格納する。   The imaging device 20 is, for example, a camera, and captures a captured image 12 of an object. The image acquisition unit 25 acquires the captured image 12 from the imaging device 20 and stores the acquired image 12 in the storage unit 33.

特徴検出部26は、エッジ検出処理を行って、撮像画像12から複数のエッジ線を検出し、検出したエッジ線を特徴線43として記憶部33に格納する。   The feature detection unit 26 performs edge detection processing, detects a plurality of edge lines from the captured image 12, and stores the detected edge lines in the storage unit 33 as feature lines 43.

姿勢推定部27は、CAD画像DB11に格納された初期モデル姿勢候補の中から、撮像画像12中の対象物に最も近い初期モデル姿勢候補を初期モデル姿勢と決定する。   The posture estimation unit 27 determines, among the initial model posture candidates stored in the CAD image DB 11, an initial model posture candidate closest to the object in the captured image 12 as an initial model posture.

候補線抽出部24は、決定された初期モデル姿勢での物体の輪郭線を抽出し、候補線44として記憶部33に格納する。   The candidate line extraction unit 24 extracts the outline of the object in the determined initial model posture, and stores the outline as a candidate line 44 in the storage unit 33.

生成部28は、撮像画像12から検出された特徴線43のうち、所定の条件を満たす複数の特徴線を抽出する。所定の条件としては、例えば、特徴線の少なくとも一部分が撮像画像12内の指定領域に含まれること、特徴線が撮像画像12内の基準位置から所定距離の範囲内に存在すること等が用いられる。また、生成部28は、初期モデル姿勢から検出された候補線44のうち、初期モデル姿勢が観察される視点の位置及び姿勢から観察される複数の候補線を抽出する。   The generation unit 28 extracts, from among the feature lines 43 detected from the captured image 12, a plurality of feature lines that satisfy a predetermined condition. As the predetermined condition, for example, it is used that at least a part of the feature line is included in a designated area in the captured image 12, that the feature line is within a range of a predetermined distance from a reference position in the captured image 12, or the like. . Further, the generation unit 28 extracts, from the candidate lines 44 detected from the initial model posture, a plurality of candidate lines observed from the position and the posture of the viewpoint at which the initial model posture is observed.

次に、生成部28は、抽出した候補線のうちN本(Nは2以上の整数)の候補線それぞれと、抽出した特徴線のうちN本の特徴線それぞれとを対応付けた、N個の組み合わせを生成する。そして、生成部28は、生成したN個の組み合わせをN個の対応ペア45として記憶部33に格納する。   Next, the generation unit 28 associates the N candidate lines (N is an integer of 2 or more) of the extracted candidate lines with the N feature lines of the extracted feature lines. Generate a combination of Then, the generation unit 28 stores the generated N combinations as N corresponding pairs 45 in the storage unit 33.

位置計算部29は、N個の対応ペア45を用いて、撮像画像12を撮影したときの撮像装置20の位置及び姿勢を計算し、計算した位置及び姿勢をパラメータ46として記憶部33に格納する。   The position calculation unit 29 calculates the position and orientation of the imaging device 20 when capturing the captured image 12 using the N corresponding pairs 45, and stores the calculated position and orientation in the storage unit 33 as the parameter 46. .

このとき、位置計算部29は、撮像装置20の位置及び姿勢を表す変数を所定値ずつ変更しながら、各対応ペアに含まれる候補線を撮像画像12上に投影することで、投影線を生成する。   At this time, the position calculation unit 29 generates a projection line by projecting a candidate line included in each corresponding pair onto the captured image 12 while changing a variable representing the position and orientation of the imaging device 20 by a predetermined value. Do.

誤差計算部30は、位置計算部29が生成した投影線の位置と、その対応ペアに含まれる特徴線の位置との間のずれを表す誤差を計算する。そして、位置計算部29は、誤差計算部30が計算した誤差の総和が最小となる変数の値を、パラメータ46として求める。   The error calculation unit 30 calculates an error representing a deviation between the position of the projection line generated by the position calculation unit 29 and the position of the feature line included in the corresponding pair. Then, the position calculation unit 29 obtains, as the parameter 46, the value of the variable that minimizes the total sum of the errors calculated by the error calculation unit 30.

位置計算部29は、N個の対応ペアの選択を変更しながら、パラメータ46を計算する処理を複数回繰り返す。   The position calculation unit 29 repeats the process of calculating the parameter 46 a plurality of times while changing the selection of the N corresponding pairs.

決定部31は、パラメータ46が計算される度に、そのパラメータ46が表す撮像装置20の位置及び姿勢を用いて、位置計算部29が選択したN個の対応ペアに含まれる候補線を撮像画像12上に投影することで、N本の投影線を生成する。そして、決定部31は、誤差計算部30と同様にして、N本の投影線の位置とN本の特徴線の位置との間の誤差の総和を計算し、計算した誤差の総和を指標47として記憶部33に格納する。   The determination unit 31 captures a candidate line included in the N corresponding pairs selected by the position calculation unit 29 using the position and orientation of the imaging device 20 represented by the parameter 46 each time the parameter 46 is calculated. By projecting onto 12, N projection lines are generated. Then, the determination unit 31 calculates the sum of the errors between the positions of the N projection lines and the positions of the N feature lines in the same manner as the error calculation unit 30, and calculates the sum of the calculated errors as the index 47. Are stored in the storage unit 33 as

次に、決定部31は、それぞれのパラメータ46を用いて計算した指標47に基づいて、誤差の総和が最小となるN個の対応ペアを決定する。これらのN個の対応ペアは、対応付け結果に対応する。そして、決定部31は、決定したN個の対応ペアを用いて、3次元空間内における撮像装置20の位置及び姿勢を計算し、計算した位置及び姿勢をパラメータ48として記憶部33に格納する。出力部32は、パラメータ48を処理結果として出力する。   Next, the determination unit 31 determines N corresponding pairs that minimize the sum of errors based on the indices 47 calculated using the respective parameters 46. These N corresponding pairs correspond to the association results. Then, using the determined N corresponding pairs, the determination unit 31 calculates the position and orientation of the imaging device 20 in the three-dimensional space, and stores the calculated position and orientation in the storage unit 33 as the parameter 48. The output unit 32 outputs the parameter 48 as a processing result.

図9は、本実施形態(実施例1)におけるCADデータのデータ構造例を示す図である。CADデータ41は、例えば、OBJ形式のCAD物体のデータである。CADデータ41は、例えばCAD物体を形成する線分、すなわち3次元直線の始点及び終点で表されるCADデータ構造を格納する。図9のCADデータ構造は、直線を識別する「直線番号」41−1、直線の始点座標を示す「始点[mm]」41−2、直線の終点座標を示す「終点[mm]」41−3を含む。   FIG. 9 is a view showing an example of the data structure of CAD data in the present embodiment (Example 1). The CAD data 41 is, for example, data of a CAD object in OBJ format. The CAD data 41 stores, for example, CAD data structures represented by line segments forming a CAD object, that is, the start point and the end point of a three-dimensional straight line. The CAD data structure in FIG. 9 includes “straight line number” 41-1 for identifying a straight line, “start point [mm]” 41-2 indicating a starting point coordinate of the straight line, and “end point [mm]” 41 Including 3

図10は、本実施形態(実施例1)におけるCAD画像DBの生成処理のフローチャートを示す図である。図11は、正八面体上の視点の例を説明するための図である。図12は、本実施形態(実施例1)における複数の初期モデル姿勢候補のそれぞれから生成したCAD画像の一例を示す図である。図13は、本実施形態(実施例1)におけるCAD画像からの交点抽出例を示す図である。   FIG. 10 is a diagram showing a flowchart of CAD image DB generation processing in the present embodiment (Example 1). FIG. 11 is a diagram for explaining an example of a viewpoint on a regular octahedron. FIG. 12 is a view showing an example of a CAD image generated from each of a plurality of initial model posture candidates in the present embodiment (Example 1). FIG. 13 is a view showing an example of extracting an intersection point from a CAD image in the present embodiment (Example 1).

CADデータ読込部22は、CADデータ41を読み込み、記憶部33に格納する(S11)。ここで、変数i=0とする(S12)
CAD画像DB生成部23は、CADデータ41に基づいて、CAD物体の初期モデル姿勢候補Kiの位置姿勢(Ri,Ti)を決定する(S13)。S13では、CAD画像DB生成部23は、CAD物体を取り囲むような多面体の頂点及び面の中心からCAD物体へ向くような視点の位置姿勢のいずれから初期モデル姿勢候補Kiを決定する。例えば、CAD画像DB生成部23は、CAD物体を正八面体(図11)の中心に置き、正八面体の頂点及び面の中心からCAD物体に向くような視点の位置姿勢のいずれかから、初期モデル姿勢候補Kiを計算する。
The CAD data reading unit 22 reads the CAD data 41 and stores it in the storage unit 33 (S11). Here, the variable i is set to 0 (S12)
The CAD image DB generation unit 23 determines the position and orientation (Ri, Ti) of the initial model orientation candidate Ki of the CAD object based on the CAD data 41 (S13). In S13, the CAD image DB generation unit 23 determines the initial model posture candidate Ki from any of the positions and orientations of the viewpoint that points from the vertex of the polyhedron surrounding the CAD object and the center of the surface to the CAD object. For example, the CAD image DB generation unit 23 sets the CAD object at the center of the regular octahedron (FIG. 11), and selects the initial model from any of the positions and orientations of viewpoints facing the CAD object from the vertex of the regular octahedron and the center of the surface. Calculate the posture candidate Ki.

なお、CAD物体を取り囲むような多面体として、正八面体ではなく別の正多面体を用いることもできる。視点数が増えると、初期モデル姿勢候補が増加し精度が高まるが、CAD画像DB11の容量が増え,計算の処理量も増加する。また、正多面体を使用するのは,カメラ間隔を均等にするためである。   In addition, not a regular octahedron but another regular polyhedron can also be used as a polyhedron which surrounds a CAD object. As the number of viewpoints increases, the initial model posture candidates increase and the accuracy increases, but the capacity of the CAD image DB 11 increases and the amount of calculation processing also increases. Also, the reason for using regular polyhedrons is to make the camera spacing even.

CAD画像DB生成部23は、OpenGL等のレンダリングプログラムで、初期モデル姿勢候補Kiの位置姿勢(Ri,Ti)でのCAD物体の画像(CAD画像)を描画する(S14)。初期モデル姿勢候補Kiの位置姿勢(Ri,Ti)(例えば、i=1〜6)に基づいて描画されたCAD画像の例を図12に示す。   The CAD image DB generation unit 23 is a rendering program such as OpenGL, and draws an image (CAD image) of a CAD object at the position and orientation (Ri, Ti) of the initial model orientation candidate Ki (S14). An example of a CAD image drawn based on the position and orientation (Ri, Ti) (for example, i = 1 to 6) of the initial model orientation candidate Ki is shown in FIG.

CAD画像DB生成部23は、初期モデル姿勢候補Kiの位置姿勢(Ri,Ti)について生成したCAD画像のエッジを抽出し、そのエッジを延長した直線同士の交点を抽出する(S15)。S15では、CAD画像DB生成部23は、S14で生成したCAD画像に対してエッジ抽出処理を行う。エッジ抽出処理として、例えば、非特許文献2に記載の処理を用いることが考えられる。CAD画像DB生成部23は、図13に示すように、抽出したエッジを延長させ、他のエッジと交わる点を交点として抽出する。ここで、エッジを延長させる理由は、実際の撮像画像に対して同様の交点抽出をする際に,エッジが細切れになっていることがあるためである。   The CAD image DB generation unit 23 extracts an edge of the CAD image generated for the position and orientation (Ri, Ti) of the initial model orientation candidate Ki, and extracts an intersection of straight lines extending the edge (S15). In S15, the CAD image DB generation unit 23 performs edge extraction processing on the CAD image generated in S14. As the edge extraction processing, for example, it is conceivable to use the processing described in Non-Patent Document 2. As shown in FIG. 13, the CAD image DB generation unit 23 extends the extracted edge, and extracts a point intersecting with another edge as an intersection point. Here, the reason for extending the edge is that the edge may be shredded when performing the same intersection extraction on the actual captured image.

CAD画像DB生成部23は、S15で抽出した交点のそれぞれに対して、例えばLocally Likely Arrangement Hashing(LLAH)による特徴量(以下、「LLAH特徴量」と称する)fiを算出する(S16)。LLAHは、ある特徴点の近傍に存在する複数の特徴点との位置関係の組み合わせを利用するものであり、ある程度の視点変化、交点の欠損に対応することができる。LLAHは、点の分布に対して定義される特徴量である。   The CAD image DB generation unit 23 calculates a feature quantity (hereinafter, referred to as “LLAH feature quantity”) fi based on, for example, Locally Likely Arrangement Hashing (LLAH) for each of the intersections extracted in S15 (S16). The LLAH uses a combination of positional relationships with a plurality of feature points existing in the vicinity of a certain feature point, and can correspond to a certain degree of viewpoint change and loss of an intersection point. LLAH is a feature defined for the distribution of points.

CAD画像DB生成部23は、各交点pの近傍にあるn個の交点を局所的な集合として決定し、各集合からm個の交点を選択する各組合せに対して特徴量を計算する。ここで、幾何学的変換の歪みによらない画像内のエッジで特定される形状の特徴量を得るため、幾何学的変換に対する不変量を用いて特徴量が計算される。本実施形態では、不変量の一例として、複比をとりあげる。複比は、直線上の4点または平面上の5点から求められる値で、幾何学的変換の一種である射影変換に対する不変量として知られている。   The CAD image DB generation unit 23 determines n intersections in the vicinity of each intersection p as a local set, and calculates a feature amount for each combination for selecting m intersections from each set. Here, in order to obtain feature quantities of a shape specified by an edge in an image that does not depend on distortion of geometric transformation, feature quantities are calculated using invariants for geometric transformation. In the present embodiment, a multiple ratio is taken as an example of an invariant. A multiple ratio is a value obtained from four points on a straight line or five points on a plane, and is known as an invariant to projective transformation which is a type of geometrical transformation.

ここで、候補IDは、物体の姿勢を特定する識別番号である。点IDは文書ごとに各点に割り当てられる点の識別番号である。nCmパターンIDはn点からm点を取り出す際の組み合わせパターンに与えられる識別番号であり、0からCm−1の値をとる。同様にmC5パターンIDはm点から5点を取り出す際の組み合わせパターンの識別番号であり、0からmC5−1の値をとる。 Here, the candidate ID is an identification number that specifies the posture of the object. The point ID is an identification number of a point assigned to each point for each document. The nCm pattern ID is an identification number given to the combination pattern when extracting m points from n points, and takes a value of 0 to Cm-1. Similarly mC 5 pattern ID is an identification number of a combination pattern when extracting five points from m point takes a value mC 5 -1 0.

例えば、m(=5点)から5点を取り出す場合を例に説明する。この場合、5点から5通りの複比を計算する。同一平面上の5点から得られる複比として、例えば、以下のものがある。   For example, the case where 5 points are taken out from m (= 5 points) will be described as an example. In this case, five to five multiple ratios are calculated. As a multiple ratio obtained from five points on the same plane, for example, there are the following.

ここで、P(A,B,C)は、頂点A,B,Cから構成される三角形の面積である。本実施形態では、例えば、このような複比を用いて画像固有の特徴量を計算し、画像の検索を行う。 Here, P (A, B, C) is the area of a triangle composed of vertices A, B, C. In the present embodiment, for example, feature quantities unique to an image are calculated using such a multiple ratio, and an image search is performed.

5通りの複比は、得られた5点ABCDEに対して、ABCDE,BCDEA,CDEAB,DEABC,EABCDというように先頭となる点を巡回させて得られるものである。   The five multiple ratios are obtained by circulating the leading points such as ABCDE, BCDEA, CDEAB, DEABC, and EABCD with respect to the obtained five-point ABCDE.

次に、ハッシュテーブルのインデックスが計算される。ハッシュ関数を以下に示す。   Next, the index of the hash table is calculated. The hash function is shown below.

ここで、crn(n=0から4)は離散化された5通りの複比、Vmaxは離散化された複
比の最大値、patはm5パターンIDである。
Here, cr n (n = 0 to 4) is five discretized multiple ratios, Vmax is a maximum value of the discretized multiple ratios, and pat is an m C 5 pattern ID.

その後インデックスを用いて(候補ID、交点ID、nmパターンID)の組をハッシ
ュテーブルH1に登録する。ハッシュで衝突が起きた場合、データはリスト構造で付け加えられる。ここで、候補IDだけでなく、交点IDおよびnmパターンIDもハッシュテーブルH1に登録するのは、検索時に特徴量の比較を行う際、順序付けられた複比の一致する個数を、候補ID、交点ID、nmパターンIDごとに集計するためである。
After that, a set of (candidate ID, intersection ID, n C m pattern ID) is registered in the hash table H 1 using the index. If a collision occurs in the hash, data is added in a list structure. Here, not only the candidate ID but also the intersection ID and n C m pattern ID are registered in the hash table H 1 when the feature quantities are compared at the time of the search. , Intersection ID, and n C m pattern ID.

図14は、本実施形態(実施例1)におけるLLAHの計算を説明するための図である。図14の例では、ある点pの周囲に存在する三角形ペアの面積比(A1/A2)が特徴量として計算される(例えば、非特許文献3参照。)。図14において、点pの特徴量は、近傍の点数を、例えばn(=7)とすると、数が、次元がの数値列で表される。mはn個のうち使用する特徴点数で、例えば5であるとする。 FIG. 14 is a diagram for explaining the calculation of LLAH in the present embodiment (Example 1). In the example of FIG. 14, the area ratio (A1 / A2) of triangle pairs existing around a certain point p is calculated as a feature amount (for example, see Non-Patent Document 3). In FIG. 14, the feature quantity of the point p is represented by a numeric string of 7 C m in number and m C 4 in dimension, where n (= 7) is a number of points nearby, for example. It is assumed that m is the number of feature points to be used out of n, for example, five.

このようにm個の点から4または5個の点を選んで複比を計算すると、いくつかの複比が他の画像と同じになっても、全ての複比が一致することは非常に稀になる。その結果、精度よく同一性が判定できる。   In this way, if you select 4 or 5 points from m points and calculate the ratio, even if some ratios are the same as other images, it is very possible that all ratios match. Become rare. As a result, identity can be determined with high accuracy.

CAD画像DB生成部23は、CAD画像DB11に、初期モデル姿勢候補Kiの位置姿勢(Ri,Ti)、その初期モデル姿勢候補に対応するCAD画像、そのCAD画像に含まれる交点毎のLLAH特徴量fiを格納する(S17)。CAD画像DB11について、図15を用いて説明する。   The CAD image DB generation unit 23 causes the CAD image DB 11 to include the position and orientation (Ri, Ti) of the initial model orientation candidate Ki, the CAD image corresponding to the initial model orientation candidate, and the LLAH feature value for each intersection included in the CAD image Store fi (S17). The CAD image DB 11 will be described with reference to FIG.

図15は、本実施形態(実施例1)におけるCAD画像DBの一例を示す。CAD画像DB11は、「ID」11−1、「回転成分Ri」11−2、「並進成分Ti」11−3、「LLAH特徴量fi」11−4、「CAD画像」11−5のデータ項目を含む。   FIG. 15 shows an example of a CAD image DB in the present embodiment (Example 1). The CAD image DB 11 includes data items of “ID” 11-1, “rotational component Ri” 11-2, “translational component Ti” 11-3, “LLAH feature amount fi” 11-4, and “CAD image” 11-5. including.

「ID」11−1には、初期モデル姿勢候補Kiを識別する識別情報が格納される。本実施形態の例では、ID=iとする。「回転成分Ri」11−2には、ID=iで特定される初期モデル姿勢候補Kiの回転成分Ri(Ri_x,Ri_y,Ri_z)が格納される。「並進成分Ti」11−3には、ID=iで特定される初期モデル姿勢候補Kiの並進成分Ti(Ti_x,Ti_y,Ti_z)が格納される。「LLAH特徴量fi」11−4には、ID=iで特定される初期モデル姿勢候補から抽出された交点毎のLLAH特徴量fiが格納される。m=5の場合、それぞれのIDに対して、LLAH特徴量fiは、例えば5×5×(交点の数)個得られる。「CAD画像」11−5には、ID=iで特定される初期モデル姿勢候補KiのCAD画像が格納される。 In the "ID" 11-1, identification information for identifying the initial model posture candidate Ki is stored. In the example of the present embodiment, ID = i. The rotational component Ri (Ri_x, Ri_y, Ri_z) of the initial model posture candidate Ki specified by ID = i is stored in the “rotational component Ri” 11-2. The translation component Ti (Ti_x, Ti_y, Ti_z) of the initial model posture candidate Ki specified by ID = i is stored in the “translation component Ti” 11-3. In the “LLAH feature quantity fi” 11-4, the LLAH feature quantity fi at each intersection point extracted from the initial model posture candidate specified by ID = i is stored. When m = 5, for example, 7 C 5 × 5 C 4 × (number of intersections) LLHA feature quantities fi are obtained for each ID. In the “CAD image” 11-5, a CAD image of an initial model posture candidate Ki specified by ID = i is stored.

S17の処理後、CAD画像DB生成部23は、iをインクリメントする(S18)。CAD画像DB生成部23は、iが所定の初期モデル姿勢候補数J以下の間(S19,NO)、S13〜S18の処理を繰り返す。所定の初期モデル姿勢候補数Jは、例えば、S13で説明した多面体の頂点及び面の中心の総数である。iが所定の初期モデル姿勢候補数Jを超えると(S19,YES)、図10のフローは終了する。   After the process of S17, the CAD image DB generation unit 23 increments i (S18). The CAD image DB generation unit 23 repeats the processing of S13 to S18 while i is equal to or less than the predetermined initial model posture candidate number J (S19, NO). The predetermined initial model posture candidate number J is, for example, the total number of the vertexes of the polyhedron described in S13 and the center of the plane. When i exceeds the predetermined initial model posture candidate number J (S19, YES), the flow of FIG. 10 ends.

これにより、CAD画像DB11は予め生成される。次に、撮像画像12から、撮像画像の対象物姿勢に対応する初期モデル姿勢を推定する処理を含む推定処理について説明する。   Thus, the CAD image DB 11 is generated in advance. Next, estimation processing including processing for estimating an initial model posture corresponding to an object posture of a captured image from the captured image 12 will be described.

図16は、本実施形態(実施例1)における画像処理の具体例を示すフローチャートである。CADデータ読込部22は、CADデータ41を読み込む(S20)。候補線抽出部24は、CADデータ41から3次元直線を検出し、図9に示すようなデータ構造を作成する(S21)。   FIG. 16 is a flowchart showing a specific example of the image processing in the present embodiment (Example 1). The CAD data reading unit 22 reads the CAD data 41 (S20). The candidate line extraction unit 24 detects a three-dimensional straight line from the CAD data 41, and creates a data structure as shown in FIG. 9 (S21).

画像取得部25は、撮像装置20から撮像画像12を取得し(S22)、特徴検出部26は、撮像画像12から複数の特徴線43を検出する(S23)。   The image acquisition unit 25 acquires the captured image 12 from the imaging device 20 (S22), and the feature detection unit 26 detects a plurality of feature lines 43 from the captured image 12 (S23).

次に、姿勢推定部27は、CAD画像DB11を用いて、撮像画像12中の対象物の姿勢に対応する初期モデル姿勢を推定する(S24)。S24の詳細については、図17を用いて説明する。   Next, the posture estimation unit 27 estimates an initial model posture corresponding to the posture of the object in the captured image 12 using the CAD image DB 11 (S24). Details of S24 will be described with reference to FIG.

図17は、本実施形態(実施例1)における初期モデル姿勢推定処理(S24)のフローを示す図である。まずユーザは、撮像画像12中の対象物の存在範囲を指定する四角形状の指定領域を用いて、画像中の左上座標・右下座標を指定する(S24−1)。すると、姿勢推定部27は、その指定された指定領域の内部で、対象物を示す画像部分のエッジ(特徴線)を抽出する。S24−1について、図18を用いて説明する。   FIG. 17 is a diagram showing a flow of initial model posture estimation processing (S24) in the present embodiment (Example 1). First, the user designates upper left coordinates and lower right coordinates in the image by using a quadrilateral designated area that designates the presence range of the object in the captured image 12 (S24-1). Then, the posture estimation unit 27 extracts an edge (feature line) of an image portion indicating an object within the designated region designated. S24-1 will be described with reference to FIG.

図18は、撮像画像12内の四角形の指定領域の例を示す図である。撮像画像12内においてユーザにより四角形の指定領域51が指定された場合、特徴検出部26は、指定領域51内に一部分又は全体が含まれる特徴線を抽出する。   FIG. 18 is a diagram illustrating an example of a rectangular designated area in the captured image 12. When the rectangular designated area 51 is designated by the user in the captured image 12, the feature detection unit 26 extracts a feature line partially or entirely included in the designated area 51.

図19は、本実施形態(実施例1)における撮像画像から特徴線の交点を抽出することについて説明するための図である。姿勢推定部27は、図19に示すように、指定領域51内で抽出された各エッジを延長して、エッジ同士の交点を抽出する(S24−2)。S24−2の処理は、S15及び図13で説明した処理と同様の処理である。   FIG. 19 is a diagram for describing extraction of intersections of feature lines from a captured image in the present embodiment (Example 1). As shown in FIG. 19, the posture estimation unit 27 extends each edge extracted in the designated area 51, and extracts an intersection of the edges (S24-2). The process of S24-2 is the same process as the process described in S15 and FIG.

姿勢推定部27は、LLAH特徴量fqを各交点に対して計算する(S24−3)。S24−3の処理は、S16及び図14で説明した処理と同様の処理である。姿勢推定部27は、S16で説明した方法によりハッシュテーブルにおいてハッシュのインデックスを求め、同様のハッシュテーブルH2を得る。   The posture estimation unit 27 calculates the LLAH feature quantity fq for each intersection point (S24-3). The process of S24-3 is the same process as the process described in S16 and FIG. The posture estimation unit 27 obtains a hash index in the hash table by the method described in S16, and obtains a similar hash table H2.

姿勢推定部27は、LLAH特徴量fi及びLLAH特徴量fqを用いた各交点のマッチングにより、CAD画像DB11に格納された初期モデル姿勢候補から、特徴量が一致する交点数が最も多いものを類似度が最大となる候補として特定する(S24−4)。   Posture estimation unit 27 is similar to the initial model posture candidate stored in CAD image DB 11 by the matching of each intersection point using LLAH feature quantity fi and LLAH feature quantity fq, and the one with the largest number of intersection points where the feature quantity matches is similar It identifies as a candidate whose degree becomes the largest (S24-4).

S24−4では、姿勢推定部27は、撮像画像12とCAD画像1枚について,撮像画像中の交点に対応するCAD画像中の交点を検索する。姿勢推定部27は、対応付いた交点の数を保存し,他のCAD画像でも繰り返す(特許文献4参照。)。   In S24-4, the posture estimation unit 27 searches for an intersection point in the CAD image corresponding to the intersection point in the captured image for one captured image 12 and one CAD image. The posture estimation unit 27 stores the number of corresponding intersection points, and repeats the process with other CAD images (see Patent Document 4).

より具体的には、姿勢推定部27は、H1,H2を用いて一定数L以上の複比が順序も含めて一致しているかどうかを調べ一致しているものについて一致する交点数を計測する。Lの好適な値を決定するためには、mnの制約条件の下、複数の適当な値を選んで予備的な実験を行い、検索結果の正解と不正解との比が大きい値をLの値として決定すればよい。 More specifically, posture estimation unit 27 uses H1 and H2 to check whether or not multiple ratios equal to or greater than a certain number L match, including the order, and measure the number of matching points for the matched items. . In order to determine a suitable value of L, a preliminary experiment is performed by selecting a plurality of appropriate values under the constraint of m C n , and the value of the ratio between the correct answer and the incorrect answer is large. It may be determined as the value of L.

以上の処理により、姿勢推定部27は、最終的に一致する交点数の最も多い候補IDに対応する初期モデル指定候補を、類似度が最大となる候補として特定する。   By the above-described process, the posture estimation unit 27 specifies an initial model specification candidate corresponding to the candidate ID with the largest number of the finally matching intersection points as a candidate with the highest degree of similarity.

姿勢推定部27は、最も対応付いた交点の数が多いCAD画像の初期モデル姿勢候補を初期モデル姿勢として決定する(S24−5)。   The posture estimation unit 27 determines an initial model posture candidate of the CAD image having the largest number of corresponding intersection points as the initial model posture (S24-5).

図16の説明に戻る。初期モデル姿勢推定処理(S24)の終了後、候補線抽出部24は、決定された初期モデル姿勢から候補線を抽出する(S25)。S25では、まず、候補線抽出部24は、選択された初期モデル姿勢に従ってCADデータを座標変換する。ここでは、S21で検出した3次元直線を用いる。候補線抽出部24は、非特許文献4に記載された方法によりCADデータの座標情報から、3次元直線のうち視点の裏側に存在する線(隠線)を除去する。候補線抽出部24は、CADデータの座標情報から、3次元直線のうち外周に存在する線(外周線)を抽出する。ここで、隠線以外の線を用いる場合と、外周線のみ用いる場合が有り得る。S25については、図20〜図22を用いて詳述する。   It returns to the explanation of FIG. After the end of the initial model posture estimation process (S24), the candidate line extraction unit 24 extracts candidate lines from the determined initial model posture (S25). In S25, first, the candidate line extraction unit 24 coordinate-converts CAD data in accordance with the selected initial model posture. Here, the three-dimensional straight line detected in S21 is used. The candidate line extraction unit 24 removes lines (hidden lines) present on the back side of the viewpoint among the three-dimensional straight lines from the coordinate information of the CAD data by the method described in Non-Patent Document 4. The candidate line extraction unit 24 extracts a line (peripheral line) existing at the outer periphery of the three-dimensional straight line from the coordinate information of the CAD data. Here, there may be a case where a line other than the hidden line is used, and a case where only the outer peripheral line is used. S25 will be described in detail with reference to FIGS.

図20は、図18に示した撮像画像12の領域51に写っている物体のCADデータ41から検出された候補線44の例を示す図である。この例では、25本の候補線44が検出されている。   FIG. 20 is a view showing an example of the candidate line 44 detected from the CAD data 41 of the object shown in the area 51 of the captured image 12 shown in FIG. In this example, 25 candidate lines 44 are detected.

図21は、図20に示した候補線44から隠線を除去した後の残りの候補線の例を示す図である。25本の候補線44のうち11本の隠線を除去することによって、14本の候補線が抽出されている。   FIG. 21 is a diagram showing an example of the remaining candidate lines after removing the hidden lines from the candidate lines 44 shown in FIG. By removing 11 hidden lines out of the 25 candidate lines 44, 14 candidate lines are extracted.

候補線抽出部24は、残りの候補線のうち物体の外形エッジを表す候補線を抽出してもよく、さらに、外形エッジを表す候補線のうち物体の外周を表す候補線を抽出してもよい。物体の外周を表す候補線は、物体の輪郭線を表しており、コンピュータグラフィックス(CG)における境界表現(Boundary Representations)の技術を用いることで、検出することが可能である。   The candidate line extraction unit 24 may extract a candidate line representing the outer edge of the object among the remaining candidate lines, and further extract a candidate line representing the outer periphery of the object among candidate lines representing the outer edge. Good. The candidate line representing the outer periphery of the object represents the outline of the object, and can be detected by using the technique of Boundary Representations in computer graphics (CG).

例えば、非特許文献8に開示されているように、境界表現の1つであるウィングドエッジ(Winged-Egde)構造のデータには、輪郭線とそれを形成する頂点及び面を表す情報と、他の輪郭線との接続関係を表す情報とが含まれている。これらの情報に基づいて、CADデータから検出された各候補線が外周に対応するか否かを判定することができる。   For example, as disclosed in Non-Patent Document 8, data of a Winged-Edge (Winged-Egde) structure, which is one of boundary representations, includes information representing an outline and vertices and faces forming the outline; And information representing the connection with other contours. Based on these pieces of information, it is possible to determine whether each candidate line detected from the CAD data corresponds to the outer circumference.

撮像画像12から検出される特徴線43が輪郭線である場合、物体と背景との境界線が特徴線43として検出される。物体と背景は物理的に離れているため、太陽、照明等の光の当たり方が異なっていたり、材質又は色が異なっていたりすることが多い。このため、より明瞭な特徴線が検出されやすく、特徴線の位置の精度も高くなる。また、輪郭線を表す対応ペアを多数生成することで、撮像画像12内における対応ペアの分布範囲が広くなり、パラメータ48の計算精度の向上に寄与すると考えられる。   When the feature line 43 detected from the captured image 12 is an outline, a boundary between the object and the background is detected as the feature line 43. Since the object and the background are physically separated, the light such as the sun or the illumination may be different in how it is hit, or in different materials or colors in many cases. For this reason, a clearer feature line is easily detected, and the accuracy of the position of the feature line is also enhanced. In addition, by generating a large number of corresponding pairs representing the outline, the distribution range of the corresponding pairs in the captured image 12 is broadened, which is considered to contribute to the improvement of the calculation accuracy of the parameter 48.

図22は、本実施形態(実施例1)における物体の外周を表す候補線の例を示す図である。図22において太線で示す8本の候補線が外周を表す候補線として抽出される。   FIG. 22 is a diagram showing an example of candidate lines representing the outer periphery of an object in the present embodiment (Example 1). Eight candidate lines indicated by thick lines in FIG. 22 are extracted as candidate lines representing the outer periphery.

候補線抽出部24は、図21〜図22に示した候補線の中から、撮像画像12上に投影した際に所定長よりも長いものを選択して使用してもよい。投影線が長い場合、物体の形状を表す輪郭線自体が長いため、より長い特徴線と対応付けられる可能性が高い。また、長い特徴線ほど、その信頼性も高いと考えられる。さらに、撮像装置20の位置及び姿勢の計算において、投影線と特徴線がともに長いほど、投影線と特徴線との間の誤差の計算精度が向上するため、パラメータ48の計算精度も向上する。   The candidate line extraction unit 24 may select and use a candidate line longer than a predetermined length when projected onto the captured image 12 among the candidate lines shown in FIGS. When the projection line is long, since the outline representing the shape of the object itself is long, it is likely to be associated with a longer feature line. Also, it is considered that the longer the feature line, the higher its reliability. Furthermore, in the calculation of the position and orientation of the imaging device 20, as the projection line and the feature line are both longer, the calculation accuracy of the error between the projection line and the feature line is improved, so that the calculation accuracy of the parameter 48 is also improved.

次に、生成部28は、N本の候補線とN本の特徴線とを対応付けたN個の対応ペア45を生成する(S26)。ここでは、生成部28は、対応ペアの直線を選択する。生成部28は、ランダムで、画像中のエッジ4本とCADデータの候補直線から4本を選択する。なお、生成部28は、線分を長い順にソートし、優先的に長い線を選択しても良い。これにより、後の姿勢推定の安定性が向上する。   Next, the generation unit 28 generates N corresponding pairs 45 in which the N candidate lines and the N feature lines are associated (S26). Here, the generation unit 28 selects a straight line of the corresponding pair. The generation unit 28 randomly selects four edges from four edges in the image and candidate straight lines of CAD data. The generation unit 28 may sort the line segments in the long order, and may preferentially select the long line. This improves the stability of later attitude estimation.

位置計算部29は、生成した対応ペア45を用いて撮像装置20の位置及び姿勢(パラメータ46)を計算する(S27)。位置計算部29は、例えば非特許文献6に記載の方法により、モデルに対する撮像装置20の位置及び姿勢(R’,T’)を算出する。   The position calculation unit 29 calculates the position and orientation (parameter 46) of the imaging device 20 using the generated corresponding pair 45 (S27). The position calculation unit 29 calculates the position and orientation (R ′, T ′) of the imaging device 20 with respect to the model by, for example, the method described in Non-Patent Document 6.

図23は、本実施形態(実施例1)における対応ペアの例を示す図である。この例では、候補線1711〜候補線1714が特徴線1701〜特徴線1704とそれぞれ対応付けられて、4個の対応ペアが生成されている。   FIG. 23 is a view showing an example of corresponding pairs in the present embodiment (Example 1). In this example, four corresponding pairs are generated by associating candidate lines 1711 to 1714 with feature lines 1701 to 1704, respectively.

S27において、位置計算部29は、例えば、最小二乗法を用いてパラメータ46を計算することができる。この場合、位置計算部29は、撮像装置20の位置及び姿勢を表す変数を所定値ずつ変更しながら、各対応ペアに含まれる候補線を撮像画像12上に投影することで、投影線を生成する。   In S27, the position calculation unit 29 can calculate the parameter 46 using, for example, the least squares method. In this case, the position calculation unit 29 generates a projection line by projecting a candidate line included in each corresponding pair onto the captured image 12 while changing a variable representing the position and orientation of the imaging device 20 by a predetermined value. Do.

誤差計算部30は、投影線の位置と、その対応ペアに含まれる特徴線の位置との誤差Ei(i=1〜N)を評価し、N個の対応ペアに対する二乗誤差の総和Eが最小となる変数の値を、パラメータ46として求める。二乗誤差の総和Eは、次式により計算される。   The error calculation unit 30 evaluates an error Ei (i = 1 to N) between the position of the projection line and the position of the feature line included in the corresponding pair, and the sum E of squared errors for N corresponding pairs is minimum. The value of the variable which becomes The sum E of squared errors is calculated by the following equation.

誤差計算部30は、例えば、図24又は図25に示すような方法で、誤差Eiを計算することができる。図24は、本実施形態(実施例1)における投影線と特徴線との間の領域の面積に基づく計算方法の例を示す図である。i番目の対応ペアに含まれる投影線が線分1801であり、特徴線が線分1802である場合、線分1801の両端と線分1802の両端とをそれぞれ結ぶ線分1803及び線分1804を定義することができる。この場合、線分1801〜線分1804によって囲まれた領域の面積Aiを、誤差Eiとして用いることができる(Ei=Ai)。   The error calculation unit 30 can calculate the error Ei by, for example, a method as shown in FIG. 24 or 25. FIG. 24 is a diagram showing an example of a calculation method based on the area of the region between the projection line and the feature line in the present embodiment (Example 1). When the projection line included in the i-th corresponding pair is the line segment 1801 and the feature line is the line segment 1802, the line segment 1803 and the line segment 1804 connecting the both ends of the line segment 1801 and the both ends of the line segment 1802 are It can be defined. In this case, the area Ai of the region surrounded by the line segments 1801 to 1804 can be used as the error Ei (Ei = Ai).

面積Aiが小さいほど、誤差Eiは小さくなり、線分1801が線分1802に重なっている場合、誤差Eiは0になる。   As the area Ai is smaller, the error Ei is smaller. When the line segment 1801 overlaps the line segment 1802, the error Ei is zero.

図25は、本実施形態(実施例1)における投影線と特徴線との間の距離に基づく計算方法の例を示す図である。線分1802の両端から線分1801上へ下ろした垂線1901及び垂線1902の長さを、それぞれ、Li1及びLi2とする。この場合、Li1及びLi2の和を、誤差Eiとして用いることができる(Ei=Li1+Li2)。   FIG. 25 is a diagram showing an example of a calculation method based on the distance between the projection line and the feature line in the present embodiment (Example 1). Let the lengths of the perpendicular 1901 and the perpendicular 1902 dropped onto the line segment 1801 from both ends of the line segment 1802 be Li1 and Li2, respectively. In this case, the sum of Li1 and Li2 can be used as the error Ei (Ei = Li1 + Li2).

Li1及びLi2が短いほど、誤差Eiは小さくなり、線分1801が線分1802に重なっている場合、誤差Eiは0になる。   As Li1 and Li2 become shorter, the error Ei becomes smaller, and when the line segment 1801 overlaps the line segment 1802, the error Ei becomes zero.

次に、決定部31は、パラメータ46が表す撮像装置20の位置及び姿勢を用いて、N個の対応ペアに含まれる候補線を撮像画像12上に投影することで、N本の投影線を生成する(S28)。   Next, the determination unit 31 projects the N projection lines by projecting the candidate lines included in the N corresponding pairs onto the captured image 12 using the position and orientation of the imaging device 20 represented by the parameter 46. It generates (S28).

決定部31は、以下の式により、CADデータの線分を2次元の画像平面内に投影する。   The determination unit 31 projects a line segment of CAD data into a two-dimensional image plane according to the following equation.

(X,Y,Z):CADの線分の端点の3次元座標
A:カメラの内部パラメータ(非特許文献7の方法で予め計測しておく。)
R:算出されたR’をロドリゲス変換(Rodrigues' rotation formula)により3行3列の行列に変換したもの
T:算出されたT’
(u,v):画像平面内に投影されたCAD線分の端点2次元座標
(X, Y, Z): Three-dimensional coordinates A of the end point of the CAD line segment: Internal parameters of the camera (previously measured by the method of Non-Patent Document 7)
R: The calculated R 'converted to a 3-by-3 matrix by the Rodrigues' rotation formula T: The calculated T'
(U, v): 2D coordinates of end points of CAD line segment projected in image plane

次に、決定部31は、N本の投影線の位置とN本の特徴線の位置との間の誤差の総和を表す指標47を計算し(S29)、指標47の計算を所定回数行ったか否かをチェックする(S30)。指標47の計算を所定回数行っていない場合(S30,NO)、位置計算部29は、N個の対応ペアの選択を変更し(S26)、推定装置21は、S27以降の処理を繰り返す。   Next, the determination unit 31 calculates an index 47 representing the sum of errors between the positions of the N projection lines and the positions of the N feature lines (S29), and the index 47 is calculated a predetermined number of times It is checked whether or not it is (S30). When the index 47 has not been calculated a predetermined number of times (S30, NO), the position calculation unit 29 changes the selection of N corresponding pairs (S26), and the estimation device 21 repeats the processes after S27.

指標47の計算を所定回数行った場合(S30,YES)、決定部31は、誤差の総和が最小となるN個の対応ペアを選択し(S31)、それらの対応ペアに基づいてパラメータ48を計算する(S32)。そして、出力部32は、選択されたN個の対応ペア及びパラメータ48を出力する(S33)。   When the index 47 has been calculated a predetermined number of times (S30, YES), the determination unit 31 selects N corresponding pairs that minimize the sum of errors (S31), and the parameter 48 is selected based on those corresponding pairs. Calculate (S32). Then, the output unit 32 outputs the selected N corresponding pairs and the parameter 48 (S33).

図16の画像処理によれば、N個の対応ペアの選択を自動的に変更しながら指標48の計算を繰り返すことで、誤差の総和が最小となるN個の対応ペアを求めることができる。これにより、ユーザによる選択操作の作業時間が削減され、処理時間が短縮されるとともに、撮像装置20の位置及び姿勢の推定精度が向上する。   According to the image processing of FIG. 16, by repeating the calculation of the index 48 while automatically changing the selection of the N corresponding pairs, it is possible to obtain the N corresponding pairs that minimize the total error. As a result, the working time of the selection operation by the user is reduced, the processing time is shortened, and the estimation accuracy of the position and orientation of the imaging device 20 is improved.

また、ヒューマンエラーに起因する選択ミスがなくなるため、選択のやり直しによる処理時間の増加が発生しない。熟練者でなくても最適なN個の対応ペアを求めることができるため、対応付け結果を適用する作業の種類及び対象者を拡大することが可能になる。   In addition, since there is no selection error due to human error, there is no increase in processing time due to reselection. Since it is possible to determine the optimal N corresponding pairs without being a skilled person, it is possible to expand the types of work to which the matching result is applied and the target person.

なお、図16のS30において、推定装置21は、指標47の計算を所定回数行った場合に繰り返し処理を打ち切る代わりに、指標47が表す誤差が所定値よりも小さくなった場合に繰り返し処理を打ち切ってもよい。   In S30 of FIG. 16, the estimation device 21 terminates the iterative process when the error represented by the indicator 47 becomes smaller than a predetermined value, instead of terminating the process repeatedly when the index 47 is calculated a predetermined number of times. May be

また、ステップS27及びS29において、推定装置21は、投影線の位置と特徴線の位置との間の誤差の代わりに、投影線と特徴線との間の類似度を評価してもよい。投影線と特徴線との間の類似度としては、例えば、特許文献5に記載された2本の線分の類似度を用いることができる。この場合、S27において、類似度の総和が最大となるパラメータ46が求められ、S31において、類似度の総和が最大となるN個の対応ペアが選択される。   In addition, in steps S27 and S29, the estimation device 21 may evaluate the similarity between the projection line and the feature line instead of the error between the position of the projection line and the position of the feature line. As the similarity between the projection line and the feature line, for example, the similarity between two line segments described in Patent Document 5 can be used. In this case, in S27, the parameter 46 that maximizes the sum of the similarities is obtained, and in S31, N corresponding pairs that maximize the sum of the similarities are selected.

ところで、S31において選択されたN個の対応ペアの誤差の総和が最小であったとしても、各投影線が各特徴線を180度回転させた線分を表していることがある。   By the way, even if the sum of the errors of the N corresponding pairs selected in S31 is minimum, each projection line may represent a line segment obtained by rotating each feature line by 180 degrees.

図26は、180度回転した線分の例を示す図である。図26の投影線及び特徴線のうち、投影線2012は、特徴線2002と重なっている。一方、投影線2011、投影線2013、及び投影線2014は、投影線2012を軸として、特徴線2002、特徴線2003、及び特徴線2004をそれぞれ180度回転させた線分に対応する。この場合、式(12)の面積Aiはほぼ0になるため、誤差の総和が最小になる可能性がある。   FIG. 26 is a diagram showing an example of a line segment rotated 180 degrees. Of the projection line and the feature line in FIG. 26, the projection line 2012 overlaps the feature line 2002. On the other hand, the projection line 2011, the projection line 2013, and the projection line 2014 correspond to line segments obtained by rotating the feature line 2002, the feature line 2003, and the feature line 2004 by 180 degrees about the projection line 2012 as an axis. In this case, since the area Ai of equation (12) is approximately zero, the sum of errors may be minimized.

そこで、このような対応付けを禁止するために、決定部31は、次のような条件を満たすN個の対応ペアの中から、誤差の総和が最小となるN個の対応ペアを選択してもよい。
(C11)N本の投影線のうち、所定の割合の投影線が画像821内に含まれている。
(C12)N本の投影線のうち、所定の割合の投影線が画像821内の所定位置の近傍に存在する。
(C13)画像821の面積に対するN本の投影線の分布範囲の割合が所定値以上である。
Therefore, in order to prohibit such correspondence, the determination unit 31 selects N corresponding pairs that minimize the sum of errors from among the N corresponding pairs that satisfy the following conditions: It is also good.
(C11) Of the N projection lines, a predetermined proportion of projection lines are included in the image 821.
(C12) Among the N projection lines, a projection line of a predetermined ratio exists in the vicinity of a predetermined position in the image 821.
(C13) The ratio of the distribution range of N projection lines to the area of the image 821 is equal to or greater than a predetermined value.

図27は、パラメータ46の計算に適していない候補線の例を示す図である。図27(a)は、互いに平行な4本の候補線を示している。4本の候補線が平行である場合、矢印2101の方向に候補線を並行移動させても誤差が変化せず、候補線の位置を固定することが困難になることがある。   FIG. 27 is a diagram showing an example of candidate lines not suitable for calculation of the parameter 46. As shown in FIG. FIG. 27A shows four candidate lines parallel to one another. When four candidate lines are parallel, even if the candidate lines are parallelly moved in the direction of the arrow 2101, the error does not change, and it may be difficult to fix the positions of the candidate lines.

図27(b)は、同一直線上に存在する2本の候補線を示している。2本の候補線が同一直線上に存在する場合、矢印2102の方向に候補線を拡大又は縮小させても誤差が変化せず、スケールを固定することが困難になることがある。   FIG. 27B shows two candidate lines existing on the same straight line. When two candidate lines exist on the same straight line, the error does not change even if the candidate lines are expanded or contracted in the direction of the arrow 2102, and it may be difficult to fix the scale.

そこで、図16のS26において、生成部28は、次のような条件を満たすN本の候補線を選択して、N個の対応ペアを生成してもよい。
(C21)N本の候補線のうち少なくとも2本の候補線は平行ではない。
(C22)N本の候補線のうちいずれの2本の候補線も同一直線上に存在しない。
Therefore, in S26 of FIG. 16, the generation unit 28 may select N candidate lines that satisfy the following conditions, and generate N corresponding pairs.
(C21) At least two of the N candidate lines are not parallel.
(C22) Any two candidate lines out of N candidate lines do not exist on the same straight line.

同様の理由から、生成部28は、次のような条件を満たすN本の特徴線を選択して、N個の対応ペアを生成してもよい。
(C31)N本の特徴線のうち少なくとも2本の特徴線は平行ではない。
(C32)N本の特徴線のうちいずれの2本の特徴線も同一直線上に存在しない。
For the same reason, the generation unit 28 may generate N corresponding pairs by selecting N feature lines that satisfy the following conditions.
(C31) At least two feature lines out of N feature lines are not parallel.
(C32) Any two feature lines out of N feature lines do not exist on the same straight line.

なお、S29において、対応ペア直線の誤差を算出してもよい。図28は、本実施形態(実施例1)における誤差の算出について説明するための図である。この場合、決定部31は、図28に示すように、N個の対応するエッジ−投影線ペアからなる面積の平均を算出し、各ペアの面積とその平均の面積との誤差を算出してもよい。   In S29, the error of the corresponding pair straight line may be calculated. FIG. 28 is a diagram for describing calculation of an error in the present embodiment (Example 1). In this case, as shown in FIG. 28, the determination unit 31 calculates the average of the area consisting of N corresponding edge-projection line pairs, and calculates the error between the area of each pair and the average area thereof. It is also good.

次に、本実施形態(実施例2)について説明する。実施例1では初期モデル姿勢候補を回転成分Riと並進成分Tiのペアとしていたが、実施例2では回転成分Riのみを候補としても良い(並進成分Tiがない以外は、用いるデータ及び処理、機能等は実施例1と同じである。)。この場合、並進成分Tiは,CADモデルの全体像が映る程度の値を予め設定しておく。   Next, the present embodiment (Example 2) will be described. In the first embodiment, the initial model posture candidate is a pair of the rotation component Ri and the translation component Ti, but in the second embodiment, only the rotation component Ri may be a candidate (other than the translation component Ti, the used data, processing, function Etc. are the same as in Example 1.). In this case, as the translational component Ti, a value is set in advance such that the entire image of the CAD model is captured.

例えば、CADモデルの大きさが10cm四方であった場合,T=(0,0,20)[cm]として固定してもよい。実施例2の場合、CAD画像DB11のデータ構造が回転成分だけで済むというメリットが有る。   For example, when the size of the CAD model is 10 cm square, it may be fixed as T = (0, 0, 20) [cm]. In the case of the second embodiment, there is an advantage that the data structure of the CAD image DB 11 may be only the rotation component.

次に、本実施形態(実施例3)について説明する。実施例1,2では事前にCAD画像DBを作成していたが,実施例3では初期モデル姿勢推定処理を行うときに、同時にCAD画像DB11が作成される。これにより、1回の初期モデル姿勢推定処理に掛かる時間は長くなるが、メモリ容量を削減することができる。   Next, the present embodiment (Example 3) will be described. In the first and second embodiments, the CAD image DB is created in advance, but in the third embodiment, the CAD image DB 11 is created at the same time when performing the initial model posture estimation process. As a result, although the time taken for one initial model posture estimation process becomes long, the memory capacity can be reduced.

次に、本実施形態(実施例4)について説明する。実施例4は、構成及び処理等は実施例1と同様である。実施例1では初期モデル姿勢候補の選択方法を、LLAHによる交点のマッチング数により決定していたが、それ以外の方法を用いても構わない。対象物の表面上に識別可能な模様が分布している場合、例えば、非特許文献9に記載された局所特徴量によるマッチングにより候補を決定しても良い。   Next, the present embodiment (Example 4) will be described. The fourth embodiment is the same as the first embodiment in the configuration, processing and the like. In the first embodiment, the selection method of the initial model posture candidate is determined by the number of matching points of the intersection by LLAH, but any other method may be used. If a distinguishable pattern is distributed on the surface of the object, for example, candidates may be determined by matching with local feature amounts described in Non-Patent Document 9.

この場合には、姿勢推定部27は、CAD画像、撮像画像の2つからORB特徴量を抽出し、マッチングを行い、マッチング点数が最も多い候補を初期モデル姿勢として用いてもよい。   In this case, the posture estimation unit 27 may extract ORB feature quantities from two of the CAD image and the captured image, perform matching, and use a candidate with the largest number of matching points as the initial model posture.

本実施例によれば、カメラの姿勢推定に用いる撮像画像中の直線と3Dモデルの直線の対応ペアを決定するための演算量が削減できる。すなわち、姿勢の向きの限定による処理対象の削減と、対象物の後ろに隠れる直線を対応付け処理から外すことで処理量を削減することができる。   According to the present embodiment, it is possible to reduce the amount of calculation for determining the corresponding pair of the straight line in the captured image used for the pose estimation of the camera and the straight line of the 3D model. That is, the amount of processing can be reduced by reducing the processing object by limiting the orientation of the posture and removing the straight line hidden behind the object from the association processing.

図29は、本実施形態における推定装置21として用いられるコンピュータの構成例を示す図である。コンピュータ2200は、Central Processing Unit(CPU)2201、メモリ2202、入力装置2203、出力装置2204、補助記憶装置2205、媒体駆動装置2206、及びネットワーク接続装置2207を含む。これらの構成要素はバス2208により互いに接続されている。撮像装置20は、バス2208に接続されていてもよい。   FIG. 29 is a diagram showing a configuration example of a computer used as the estimation device 21 in the present embodiment. The computer 2200 includes a central processing unit (CPU) 2201, a memory 2202, an input device 2203, an output device 2204, an auxiliary storage device 2205, a medium drive device 2206, and a network connection device 2207. These components are connected to one another by a bus 2208. The imaging device 20 may be connected to the bus 2208.

メモリ2202は、例えば、Read Only Memory(ROM)、Random Access Memory(RAM)、フラッシュメモリ等の半導体メモリであり、画像処理に用いられるプログラム及びデータを格納する。メモリ2202は、記憶部33として用いることができる。   The memory 2202 is, for example, a semiconductor memory such as a read only memory (ROM), a random access memory (RAM), or a flash memory, and stores programs and data used for image processing. The memory 2202 can be used as the storage unit 33.

CPU2201(プロセッサ)は、例えば、メモリ2202を利用してプログラムを実行することにより、CADデータ読込部22、CAD画像DB生成部23、候補線抽出部24、画像取得部25、特徴検出部26、姿勢推定部27として機能する。さらに、CPU2201は、生成部28、位置計算部29、誤差計算部30、決定部31として機能する。   The CPU 2201 (processor) executes a program using, for example, the memory 2202 to execute the CAD data reading unit 22, the CAD image DB generating unit 23, the candidate line extracting unit 24, the image acquiring unit 25, the feature detecting unit 26, It functions as the posture estimation unit 27. Furthermore, the CPU 2201 functions as a generation unit 28, a position calculation unit 29, an error calculation unit 30, and a determination unit 31.

入力装置2203は、例えば、キーボード、ポインティングデバイス等であり、オペレータ又はユーザからの指示又は情報の入力に用いられる。出力装置2204は、例えば、表示装置、プリンタ、スピーカ等であり、オペレータ又はユーザへの問い合わせ又は指示、及び処理結果の出力に用いられる。処理結果は、決定部31が決定したN個の対応ペアであってもよい。出力装置2204は、図8の出力部32として用いることができる。   The input device 2203 is, for example, a keyboard, a pointing device, etc., and is used to input an instruction or information from an operator or a user. The output device 2204 is, for example, a display device, a printer, a speaker, or the like, and is used to inquire or instruct an operator or a user, and to output a processing result. The processing result may be the N corresponding pairs determined by the determination unit 31. The output device 2204 can be used as the output unit 32 of FIG.

補助記憶装置2205は、例えば、磁気ディスク装置、光ディスク装置、光磁気ディスク装置、テープ装置等である。補助記憶装置2205は、ハードディスクドライブであってもよい。コンピュータ2200は、補助記憶装置2205にプログラム及びデータを格納しておき、それらをメモリ2202にロードして使用することができる。補助記憶装置2205は、記憶部33として用いることができる。   The auxiliary storage device 2205 is, for example, a magnetic disk device, an optical disk device, a magneto-optical disk device, a tape device or the like. The auxiliary storage device 2205 may be a hard disk drive. The computer 2200 can store programs and data in the auxiliary storage device 2205 and load them into the memory 2202 for use. The auxiliary storage device 2205 can be used as the storage unit 33.

媒体駆動装置2206は、可搬型記録媒体2209を駆動し、その記録内容にアクセスする。可搬型記録媒体2209は、メモリデバイス、フレキシブルディスク、光ディスク、光磁気ディスク等である。可搬型記録媒体2209は、Compact Disk Read Only Memory(CD−ROM)、Digital Versatile Disk(DVD)、Universal Serial Bus(USB)メモリ等であってもよい。オペレータ又はユーザは、この可搬型記録媒体2209にプログラム及びデータを格納しておき、それらをメモリ2202にロードして使用することができる。   A medium drive 2206 drives a portable recording medium 2209 and accesses the recorded contents. The portable recording medium 2209 is a memory device, a flexible disk, an optical disk, a magneto-optical disk or the like. The portable recording medium 2209 may be a Compact Disk Read Only Memory (CD-ROM), a Digital Versatile Disk (DVD), a Universal Serial Bus (USB) memory, or the like. An operator or a user can store programs and data in this portable recording medium 2209 and load them into the memory 2202 for use.

このように、画像処理に用いられるプログラム及びデータを格納するコンピュータ読み取り可能な記録媒体は、メモリ2202、補助記憶装置2205、又は可搬型記録媒体2209のような、物理的な(非一時的な)記録媒体である。   Thus, the computer readable recording medium for storing the program and data used for image processing is physical (non-temporary) such as the memory 2202, the auxiliary storage device 2205 or the portable recording medium 2209. It is a recording medium.

ネットワーク接続装置2207は、Local Area Network、Wide Area Network等の通信ネットワークに接続され、通信に伴うデータ変換を行う通信インタフェースである。コンピュータ2200は、プログラム及びデータを外部の装置からネットワーク接続装置2207を介して受信し、それらをメモリ2202にロードして使用することができる。ネットワーク接続装置2207は、図8の出力部32として用いることができる。   The network connection device 2207 is a communication interface that is connected to a communication network such as a Local Area Network, a Wide Area Network, etc., and performs data conversion involved in communication. The computer 2200 can receive programs and data from an external device via the network connection device 2207, load them into the memory 2202 and use them. The network connection device 2207 can be used as the output unit 32 of FIG.

なお、コンピュータ2200が図29のすべての構成要素を含む必要はなく、用途又は条件に応じて一部の構成要素を省略することも可能である。例えば、可搬型記録媒体2209又は通信ネットワークを使用しない場合は、媒体駆動装置2206又はネットワーク接続装置2207を省略してもよい。   Note that the computer 2200 need not include all the components shown in FIG. 29, and some components may be omitted depending on the application or conditions. For example, when the portable recording medium 2209 or the communication network is not used, the medium driving device 2206 or the network connection device 2207 may be omitted.

本実施形態によれば、撮像装置の位置及び姿勢を推定する技術において、CADデータの三次元線分と、撮影された画像中の対象物のエッジとの重畳させる場合に、特定した初期モデル姿勢を用いて線分のペアの対応付けを行うので、処理時間の削減を図ることができる。また、初期モデル姿勢の調整を手動で行う必要がなく、自動調整が可能なので、ユーザビリティの向上を図ることができる。また、初期モデル姿勢が特定されるので、CADデータの線分と、画像のエッジ線との対応付けにおいて、初期モデル姿勢に基づいて行うので、誤った重畳表示の防止を実現することができる。   According to the present embodiment, in the technique for estimating the position and orientation of the imaging device, the specified initial model orientation is determined when superimposing a three-dimensional line segment of CAD data on an edge of an object in a captured image. As the line segment pairs are associated with each other, the processing time can be reduced. In addition, there is no need to manually adjust the initial model posture, and automatic adjustment is possible, so that usability can be improved. Further, since the initial model attitude is specified, the line segments of the CAD data and the edge lines of the image are associated with each other based on the initial model attitude, so that it is possible to prevent erroneous superimposed display.

開示の実施形態とその利点について詳しく説明したが、当業者は、特許請求の範囲に明確に記載した本発明の範囲から逸脱することなく、様々な変更、追加、省略をすることができるであろう。   While the disclosed embodiments and their advantages have been described in detail, those skilled in the art can make various changes, additions, and omissions without departing from the scope of the present invention as set forth in the claims. I will.

上記実施形態に関し、さらに以下の付記を開示する。
(付記1)
複数の視点のいずれかから観察される物体の姿勢毎に、該姿勢を表す姿勢情報と、該姿勢情報に対応する視点から観察された該物体の画像を示す視点画像と、該視点画像から抽出された複数の特徴点を用いて算出される該視点画像の特徴量とを関連付けた情報である複数の初期姿勢候補情報を記憶する記憶部と、
対象物を撮影した撮像画像を取得する画像取得部と、
前記撮像画像の特徴量と前記複数の初期姿勢候補情報の特徴量とを照合し、照合結果に基づいて該複数の初期姿勢候補情報から、前記撮像画像に写っている前記対象物の姿勢に類似する姿勢の姿勢情報を含む初期姿勢候補情報を抽出する照合部と、
前記照合部が抽出した初期姿勢候補情報に対応する姿勢の物体が観察される視点の位置に基づいて、前記物体の形状情報から得られる線分を絞り込む絞込部と、
絞り込んだ前記線分と前記撮像画像から検出される特徴線とを対応付ける対応付け部と、
対応付け結果に基づいて、前記対象物の画像から3次元空間内における該対象物に対する視点の位置及び方向を推定する推定部と、
を備えることを特徴とする推定装置
(付記2)
前記初期姿勢候補情報は、前記物体を取り囲む多面体の頂点及び面の中心に前記視点を配置した場合に該視点のそれぞれから観察される該物体の姿勢に関する情報であり、
前記初期姿勢候補情報の数は、前記多面体の頂点及び面の中心の数に対応する
ことを特徴とする付記1に記載の勢推定装置。
(付記3)
前記推定装置は、さらに、
前記物体の形状情報に基づいて、前記物体を取り囲む多面体の頂点及び面の中心に前記視点を配置した場合に該視点のそれぞれから観察される該物体の姿勢に関する前記複数の初期姿勢候補情報を生成する生成部
を備えることを特徴とする付記1または2に記載の推定装置。
(付記4)
前記特徴量は、前記視点画像または前記撮像画像から抽出した特徴線の交点それぞれについて、該交点それぞれの周囲にある複数の交点に関して幾何学的変換に対する不変量を算出することにより得られる各交点の特徴量であり、
前記照合部は、前記視点画像から抽出した特徴線の交点の前記特徴量と前記撮像画像から抽出した特徴線の交点の前記特徴量とが一致する交点の数を計測し、一致する交点の数が最も多い姿勢情報を前記初期姿勢情報として推定する
ことを特徴とする付記1〜3のうちいずれかに記載の推定装置。
(付記5)
前記視点情報は、回転成分を含む3次元座標系で表される
ことを特徴とする付記1〜4のうちいずれかに記載の推定装置。
(付記6)
コンピュータに、
対象物を撮影した撮像画像を取得し、
記憶部から、複数の視点のいずれかから観察される物体の姿勢毎に、該姿勢を表す姿勢情報と、該姿勢情報に対応する視点から観察された該物体の画像を示す視点画像と、該視点画像から抽出された複数の特徴点を用いて算出される該視点画像の特徴量とを関連付けた情報である複数の初期姿勢候補情報を取得し、
前記撮像画像の特徴量と前記複数の初期姿勢候補情報の特徴量とを照合し、照合結果に基づいて該複数の初期姿勢候補情報から、前記撮像画像に写っている前記対象物の姿勢に類似する姿勢の姿勢情報を含む初期姿勢候補情報を抽出し、
抽出した前記初期姿勢候補情報に対応する姿勢の物体が観察される視点の位置に基づいて、前記物体の形状情報から得られる線分を絞り込み、
絞り込んだ前記線分と前記撮像画像から検出される特徴線とを対応付け、
対応付け結果に基づいて、前記対象物の画像から3次元空間内における該対象物に対する視点の位置及び方向を推定する、
処理を実行させる推定プログラム。
(付記7)
前記初期姿勢候補情報は、前記物体を取り囲む多面体の頂点及び面の中心に前記視点を配置した場合に該視点のそれぞれから観察される該物体の姿勢に関する情報であり、
前記初期姿勢候補情報の数は、前記多面体の頂点及び面の中心の数に対応する
ことを特徴とする付記6に記載の推定プログラム。
(付記8)
前記推定プログラムは、前記コンピュータに、さらに、
前記物体の形状情報に基づいて、前記物体を取り囲む多面体の頂点及び面の中心に前記視点を配置した場合に該視点のそれぞれから観察される該物体の姿勢に関する前記複数の初期姿勢候補情報を生成する
処理を実行させることを特徴とする付記6または7に記載の推定プログラム。
(付記9)
前記特徴量は、前記視点画像または前記撮像画像から抽出した特徴線の交点それぞれについて、該交点それぞれの周囲にある複数の交点に関して幾何学的変換に対する不変量を算出することにより得られる各交点の特徴量であり、
前記初期姿勢候補情報の抽出において、前記視点画像から抽出した特徴線の交点の前記特徴量と前記撮像画像から抽出した特徴線の交点の前記特徴量とが一致する交点の数を計測し、一致する交点の数が最も多い姿勢情報を前記初期姿勢情報として推定する
ことを特徴とする付記6〜8のうちいずれかに記載の推定プログラム。
(付記10)
前記視点情報は、回転成分を含む3次元座標系で表される
ことを特徴とする付記6〜9のうちいずれかに記載の推定プログラム。
(付記11)
コンピュータが、
対象物を撮影した撮像画像を取得し、
記憶部から、複数の視点のいずれかから観察される物体の姿勢毎に、該姿勢を表す姿勢情報と、該姿勢情報に対応する視点から観察された該物体の画像を示す視点画像と、該視点画像から抽出された複数の特徴点を用いて算出される該視点画像の特徴量とを関連付けた情報である複数の初期姿勢候補情報を取得し、
前記撮像画像の特徴量と前記複数の初期姿勢候補情報の特徴量とを照合し、照合結果に基づいて該複数の初期姿勢候補情報から、前記撮像画像に写っている前記対象物の姿勢に類似する姿勢の姿勢情報を含む初期姿勢候補情報を抽出し、
抽出した前記初期姿勢候補情報に対応する姿勢の物体が観察される視点の位置に基づいて、前記物体の形状情報から得られる線分を絞り込み、
絞り込んだ前記線分と前記撮像画像から検出される特徴線とを対応付け、
対応付け結果に基づいて、前記対象物の画像から3次元空間内における該対象物に対する視点の位置及び方向を推定する、
ことを特徴とする推定方法。
(付記12)
前記初期姿勢候補情報は、前記物体を取り囲む多面体の頂点及び面の中心に前記視点を配置した場合に該視点のそれぞれから観察される該物体の姿勢に関する情報であり、
前記初期姿勢候補情報の数は、前記多面体の頂点及び面の中心の数に対応する
ことを特徴とする付記11に記載の推定方法。
(付記13)
前記コンピュータは、さらに、
前記物体の形状情報に基づいて、前記物体を取り囲む多面体の頂点及び面の中心に前記視点を配置した場合に該視点のそれぞれから観察される該物体の姿勢に関する前記複数の初期姿勢候補情報を生成する
ことを特徴とする付記11または12に記載の推定方法。
(付記14)
前記特徴量は、前記視点画像または前記撮像画像から抽出した特徴線の交点それぞれについて、該交点それぞれの周囲にある複数の交点に関して幾何学的変換に対する不変量を算出することにより得られる各交点の特徴量であり、
前記初期姿勢候補情報の抽出において、前記視点画像から抽出した特徴線の交点の前記特徴量と前記撮像画像から抽出した特徴線の交点の前記特徴量とが一致する交点の数を計測し、一致する交点の数が最も多い姿勢情報を前記初期姿勢情報として推定する
ことを特徴とする付記11〜13のうちいずれかに記載の推定方法。
(付記15)
前記視点情報は、回転成分を含む3次元座標系で表される
ことを特徴とする付記11〜14のうちいずれかに記載の推定方法。
Further, the following appendices will be disclosed regarding the above embodiment.
(Supplementary Note 1)
For each posture of an object observed from any of a plurality of viewpoints, posture information indicating the posture, a viewpoint image indicating an image of the object observed from the viewpoint corresponding to the posture information, and extraction from the viewpoint image A storage unit for storing a plurality of initial posture candidate information, which is information associating the feature amount of the viewpoint image calculated using the plurality of selected feature points;
An image acquisition unit that acquires a captured image obtained by capturing an object;
The feature amount of the captured image and the feature amounts of the plurality of initial posture candidate information are collated, and the plurality of initial posture candidate information is similar to the posture of the object shown in the captured image based on the collation result A collation unit that extracts initial posture candidate information including posture information of a posture to be selected;
A narrowing unit which narrows down a line segment obtained from the shape information of the object based on the position of the viewpoint at which the object in the posture corresponding to the initial posture candidate information extracted by the collation unit is observed;
An associating unit that associates the narrowed line segment with a feature line detected from the captured image;
An estimation unit configured to estimate the position and the direction of the viewpoint with respect to the object in a three-dimensional space from the image of the object based on the correspondence result;
Estimation device characterized by including (Supplementary Note 2)
The initial posture candidate information is information on the posture of the object observed from each of the viewpoints when the viewpoints are arranged at the centers of vertices and faces of a polyhedron surrounding the object,
The number of the initial posture candidate information corresponds to the number of vertexes of the polyhedron and the center of the surface.
(Supplementary Note 3)
The estimation device further includes
Based on the shape information of the object, the plurality of initial posture candidate information on the posture of the object observed from each of the viewpoints when the viewpoints are arranged at the centers of vertices and faces of a polyhedron surrounding the object is generated The estimation apparatus according to any one of appendices 1 and 2, further comprising:
(Supplementary Note 4)
The feature quantity is obtained by calculating invariants to geometrical transformations with respect to a plurality of intersections around each of the intersections of the viewpoint image or the characteristic lines extracted from the captured image. It is a feature amount,
The matching unit measures the number of intersections at which the feature of the feature of the feature line extracted from the viewpoint image matches the feature of the feature of the feature line extracted from the captured image. The estimation apparatus according to any one of appendices 1 to 3, characterized in that posture information having the largest number of times is estimated as the initial posture information.
(Supplementary Note 5)
The estimation device according to any one of appendices 1 to 4, wherein the viewpoint information is represented by a three-dimensional coordinate system including a rotation component.
(Supplementary Note 6)
On the computer
Acquire a captured image obtained by capturing an object,
For each posture of an object observed from any of a plurality of viewpoints from the storage unit, posture information representing the posture, a viewpoint image indicating an image of the object observed from a viewpoint corresponding to the posture information, and Acquiring a plurality of initial posture candidate information which is information associating the feature amounts of the viewpoint image calculated using the plurality of feature points extracted from the viewpoint image;
The feature amount of the captured image and the feature amounts of the plurality of initial posture candidate information are collated, and the plurality of initial posture candidate information is similar to the posture of the object shown in the captured image based on the collation result Extracting initial posture candidate information including posture information of the posture to be
Narrowing down a line segment obtained from the shape information of the object based on the position of the viewpoint at which the object of the orientation corresponding to the extracted initial orientation candidate information is observed;
Associating the narrowed line segment with a feature line detected from the captured image;
Estimating the position and the direction of the viewpoint with respect to the object in the three-dimensional space from the image of the object based on the correspondence result
An estimation program that causes the process to run.
(Appendix 7)
The initial posture candidate information is information on the posture of the object observed from each of the viewpoints when the viewpoints are arranged at the centers of vertices and faces of a polyhedron surrounding the object,
The number of the initial posture candidate information corresponds to the number of vertexes of the polyhedron and the center of the surface.
(Supplementary Note 8)
The estimation program further causes the computer to:
Based on the shape information of the object, the plurality of initial posture candidate information on the posture of the object observed from each of the viewpoints when the viewpoints are arranged at the centers of vertices and faces of a polyhedron surrounding the object is generated The estimation program according to appendix 6 or 7, characterized in that the processing is performed.
(Appendix 9)
The feature quantity is obtained by calculating invariants to geometrical transformations with respect to a plurality of intersections around each of the intersections of the viewpoint image or the characteristic lines extracted from the captured image. It is a feature amount,
In the extraction of the initial posture candidate information, the number of intersections at which the feature amount of the intersection point of the feature line extracted from the viewpoint image matches the feature amount of the intersection point of the feature line extracted from the captured image is measured. The estimation program according to any one of Appendices 6 to 8, wherein posture information having the largest number of intersection points is estimated as the initial posture information.
(Supplementary Note 10)
The estimation program according to any one of appendices 6 to 9, wherein the viewpoint information is represented by a three-dimensional coordinate system including a rotation component.
(Supplementary Note 11)
The computer is
Acquire a captured image obtained by capturing an object,
For each posture of an object observed from any of a plurality of viewpoints from the storage unit, posture information representing the posture, a viewpoint image indicating an image of the object observed from a viewpoint corresponding to the posture information, and Acquiring a plurality of initial posture candidate information which is information associating the feature amounts of the viewpoint image calculated using the plurality of feature points extracted from the viewpoint image;
The feature amount of the captured image and the feature amounts of the plurality of initial posture candidate information are collated, and the plurality of initial posture candidate information is similar to the posture of the object shown in the captured image based on the collation result Extracting initial posture candidate information including posture information of the posture to be
Narrowing down a line segment obtained from the shape information of the object based on the position of the viewpoint at which the object of the orientation corresponding to the extracted initial orientation candidate information is observed;
Associating the narrowed line segment with a feature line detected from the captured image;
Estimating the position and the direction of the viewpoint with respect to the object in the three-dimensional space from the image of the object based on the correspondence result
Estimation method characterized by
(Supplementary Note 12)
The initial posture candidate information is information on the posture of the object observed from each of the viewpoints when the viewpoints are arranged at the centers of vertices and faces of a polyhedron surrounding the object,
The estimation method according to appendix 11, wherein the number of pieces of initial pose candidate information corresponds to the number of vertexes and face centers of the polyhedron.
(Supplementary Note 13)
The computer further comprises:
Based on the shape information of the object, the plurality of initial posture candidate information on the posture of the object observed from each of the viewpoints when the viewpoints are arranged at the centers of vertices and faces of a polyhedron surrounding the object is generated The estimation method according to appendix 11 or 12, characterized in that:
(Supplementary Note 14)
The feature quantity is obtained by calculating invariants to geometrical transformations with respect to a plurality of intersections around each of the intersections of the viewpoint image or the characteristic lines extracted from the captured image. It is a feature amount,
In the extraction of the initial posture candidate information, the number of intersections at which the feature amount of the intersection point of the feature line extracted from the viewpoint image matches the feature amount of the intersection point of the feature line extracted from the captured image is measured. The estimation method according to any one of appendices 11 to 13, wherein posture information having the largest number of intersection points is estimated as the initial posture information.
(Supplementary Note 15)
The estimation method according to any one of appendices 11 to 14, wherein the viewpoint information is represented by a three-dimensional coordinate system including a rotation component.

1 推定装置
2 記憶部
3 画像取得部
4 照合部
5 絞込部
6 対応付け部
7 推定部
8 生成部
9 初期姿勢候補情報
11 CAD画像DB
12 撮像画像
21 推定装置
22 CADデータ読込部
23 CAD画像DB生成部
24 候補線抽出部
25 画像取得部
26 特徴検出部
27 姿勢推定部
28 生成部
29 位置計算部
30 誤差計算部
31 決定部
32 出力部
33 記憶部
41 CADデータ
43 特徴線
44 候補線
45 対応ペア
46 パラメータ
47 指標
48 パラメータ
DESCRIPTION OF SYMBOLS 1 estimation device 2 storage unit 3 image acquisition unit 4 collation unit 5 narrowing-down unit 6 association unit 7 estimation unit 8 generation unit 9 initial posture candidate information 11 CAD image DB
12 captured image 21 estimation device 22 CAD data reading unit 23 CAD image DB generation unit 24 candidate line extraction unit 25 image acquisition unit 26 feature detection unit 27 posture estimation unit 28 generation unit 29 position calculation unit 30 error calculation unit 31 determination unit 32 output Part 33 Storage part 41 CAD data 43 Feature line 44 Candidate line 45 Correspondence pair 46 Parameter 47 Index 48 Parameter

Claims (7)

コンピュータに、
対象物を撮影した撮像画像を取得し、
記憶部から、複数の視点のいずれかから観察される物体の姿勢毎に、該姿勢を表す姿勢情報と、該姿勢情報に対応する視点から観察された該物体の画像を示す視点画像と、該視点画像から抽出された複数の特徴点を用いて算出される該視点画像の特徴量とを関連付けた情報である複数の初期姿勢候補情報を取得し、
前記撮像画像の特徴量と前記複数の初期姿勢候補情報の特徴量とを照合し、照合結果に基づいて該複数の初期姿勢候補情報から、前記撮像画像に写っている前記対象物の姿勢に類似する姿勢の姿勢情報を含む初期姿勢候補情報を抽出し、
抽出した前記初期姿勢候補情報に対応する姿勢の物体が観察される視点の位置に基づいて、前記物体の形状情報から得られる線分を絞り込み、
絞り込んだ前記線分と前記撮像画像から検出される特徴線とを対応付け、
対応付け結果に基づいて、前記対象物の画像から3次元空間内における該対象物に対する視点の位置及び方向を推定する、
処理を実行させる推定プログラム。
On the computer
Acquire a captured image obtained by capturing an object,
For each posture of an object observed from any of a plurality of viewpoints from the storage unit, posture information representing the posture, a viewpoint image indicating an image of the object observed from a viewpoint corresponding to the posture information, and Acquiring a plurality of initial posture candidate information which is information associating the feature amounts of the viewpoint image calculated using the plurality of feature points extracted from the viewpoint image;
The feature amount of the captured image and the feature amounts of the plurality of initial posture candidate information are collated, and the plurality of initial posture candidate information is similar to the posture of the object shown in the captured image based on the collation result Extracting initial posture candidate information including posture information of the posture to be
Narrowing down a line segment obtained from the shape information of the object based on the position of the viewpoint at which the object of the orientation corresponding to the extracted initial orientation candidate information is observed;
Associating the narrowed line segment with a feature line detected from the captured image;
Estimating the position and the direction of the viewpoint with respect to the object in the three-dimensional space from the image of the object based on the correspondence result
An estimation program that causes the process to run.
前記初期姿勢候補情報は、前記物体を取り囲む多面体の頂点及び面の中心に前記視点を配置した場合に該視点のそれぞれから観察される該物体の姿勢に関する情報であり、
前記初期姿勢候補情報の数は、前記多面体の頂点及び面の中心の数に対応する
ことを特徴とする請求項1に記載の推定プログラム。
The initial posture candidate information is information on the posture of the object observed from each of the viewpoints when the viewpoints are arranged at the centers of vertices and faces of a polyhedron surrounding the object,
The estimation program according to claim 1, wherein the number of pieces of initial posture candidate information corresponds to the number of vertexes and face centers of the polyhedron.
前記推定プログラムは、前記コンピュータに、さらに、
前記物体の形状情報に基づいて、前記物体を取り囲む多面体の頂点及び面の中心に前記視点を配置した場合に該視点のそれぞれから観察される該物体の姿勢に関する前記複数の初期姿勢候補情報を生成する
処理を実行させることを特徴とする請求項1または2に記載の推定プログラム。
The estimation program further causes the computer to:
Based on the shape information of the object, the plurality of initial posture candidate information on the posture of the object observed from each of the viewpoints when the viewpoints are arranged at the centers of vertices and faces of a polyhedron surrounding the object is generated The estimation program according to claim 1 or 2, wherein the processing is performed.
前記特徴量は、前記視点画像または前記撮像画像から抽出した特徴線の交点それぞれについて、該交点それぞれの周囲にある複数の交点に関して幾何学的変換に対する不変量を算出することにより得られる各交点の特徴量であり、
前記初期姿勢候補情報の抽出において、前記視点画像から抽出した特徴線の交点の前記特徴量と前記撮像画像から抽出した特徴線の交点の前記特徴量とが一致する交点の数を計測し、一致する交点の数が最も多い姿勢情報を前記初期姿勢情報として推定する
ことを特徴とする請求項1〜3のうちいずれかに記載の推定プログラム。
The feature quantity is obtained by calculating invariants to geometrical transformations with respect to a plurality of intersections around each of the intersections of the viewpoint image or the characteristic lines extracted from the captured image. It is a feature amount,
In the extraction of the initial posture candidate information, the number of intersections at which the feature amount of the intersection point of the feature line extracted from the viewpoint image matches the feature amount of the intersection point of the feature line extracted from the captured image is measured. The estimation program according to any one of claims 1 to 3, wherein posture information having the largest number of intersection points is estimated as the initial posture information.
前記初期姿勢候補情報は、回転成分を含む3次元座標系で表される
ことを特徴とする請求項1〜4のうちいずれかに記載の推定プログラム。
The estimation program according to any one of claims 1 to 4, wherein the initial posture candidate information is represented by a three-dimensional coordinate system including a rotation component.
複数の視点のいずれかから観察される物体の姿勢毎に、該姿勢を表す姿勢情報と、該姿勢情報に対応する視点から観察された該物体の画像を示す視点画像と、該視点画像から抽出された複数の特徴点を用いて算出される該視点画像の特徴量とを関連付けた情報である複数の初期姿勢候補情報を記憶する記憶部と、
対象物を撮影した撮像画像を取得する画像取得部と、
前記撮像画像の特徴量と前記複数の初期姿勢候補情報の特徴量とを照合し、照合結果に基づいて該複数の初期姿勢候補情報から、前記撮像画像に写っている前記対象物の姿勢に類似する姿勢の姿勢情報を含む初期姿勢候補情報を抽出する照合部と、
前記照合部が抽出した初期姿勢候補情報に対応する姿勢の物体が観察される視点の位置に基づいて、前記物体の形状情報から得られる線分を絞り込む絞込部と、
絞り込んだ前記線分と前記撮像画像から検出される特徴線とを対応付ける対応付け部と、
対応付け結果に基づいて、前記対象物の画像から3次元空間内における該対象物に対する視点の位置及び方向を推定する推定部と、
を備えることを特徴とする推定装置。
For each posture of an object observed from any of a plurality of viewpoints, posture information indicating the posture, a viewpoint image indicating an image of the object observed from the viewpoint corresponding to the posture information, and extraction from the viewpoint image A storage unit for storing a plurality of initial posture candidate information, which is information associating the feature amount of the viewpoint image calculated using the plurality of selected feature points;
An image acquisition unit that acquires a captured image obtained by capturing an object;
The feature amount of the captured image and the feature amounts of the plurality of initial posture candidate information are collated, and the plurality of initial posture candidate information is similar to the posture of the object shown in the captured image based on the collation result A collation unit that extracts initial posture candidate information including posture information of a posture to be selected;
A narrowing unit which narrows down a line segment obtained from the shape information of the object based on the position of the viewpoint at which the object in the posture corresponding to the initial posture candidate information extracted by the collation unit is observed;
An associating unit that associates the narrowed line segment with a feature line detected from the captured image;
An estimation unit configured to estimate the position and the direction of the viewpoint with respect to the object in a three-dimensional space from the image of the object based on the correspondence result;
An estimation apparatus comprising:
コンピュータが、
対象物を撮影した撮像画像を取得し、
記憶部から、複数の視点のいずれかから観察される物体の姿勢毎に、該姿勢を表す姿勢情報と、該姿勢情報に対応する視点から観察された該物体の画像を示す視点画像と、該視点画像から抽出された複数の特徴点を用いて算出される該視点画像の特徴量とを関連付けた情報である複数の初期姿勢候補情報を取得し、
前記撮像画像の特徴量と前記複数の初期姿勢候補情報の特徴量とを照合し、照合結果に基づいて該複数の初期姿勢候補情報から、前記撮像画像に写っている前記対象物の姿勢に類似する姿勢の姿勢情報を含む初期姿勢候補情報を抽出し、
抽出した前記初期姿勢候補情報に対応する姿勢の物体が観察される視点の位置に基づいて、前記物体の形状情報から得られる線分を絞り込み、
絞り込んだ前記線分と前記撮像画像から検出される特徴線とを対応付け、
対応付け結果に基づいて、前記対象物の画像から3次元空間内における該対象物に対する視点の位置及び方向を推定する、
ことを特徴とする推定方法。
The computer is
Acquire a captured image obtained by capturing an object,
For each posture of an object observed from any of a plurality of viewpoints from the storage unit, posture information representing the posture, a viewpoint image indicating an image of the object observed from a viewpoint corresponding to the posture information, and Acquiring a plurality of initial posture candidate information which is information associating the feature amounts of the viewpoint image calculated using the plurality of feature points extracted from the viewpoint image;
The feature amount of the captured image and the feature amounts of the plurality of initial posture candidate information are collated, and the plurality of initial posture candidate information is similar to the posture of the object shown in the captured image based on the collation result Extracting initial posture candidate information including posture information of the posture to be
Narrowing down a line segment obtained from the shape information of the object based on the position of the viewpoint at which the object of the orientation corresponding to the extracted initial orientation candidate information is observed;
Associating the narrowed line segment with a feature line detected from the captured image;
Estimating the position and the direction of the viewpoint with respect to the object in the three-dimensional space from the image of the object based on the correspondence result
Estimation method characterized by
JP2017195787A 2017-10-06 2017-10-06 Estimator program, estimator, and estimation method Active JP6946912B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017195787A JP6946912B2 (en) 2017-10-06 2017-10-06 Estimator program, estimator, and estimation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017195787A JP6946912B2 (en) 2017-10-06 2017-10-06 Estimator program, estimator, and estimation method

Publications (2)

Publication Number Publication Date
JP2019070898A true JP2019070898A (en) 2019-05-09
JP6946912B2 JP6946912B2 (en) 2021-10-13

Family

ID=66441210

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017195787A Active JP6946912B2 (en) 2017-10-06 2017-10-06 Estimator program, estimator, and estimation method

Country Status (1)

Country Link
JP (1) JP6946912B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11145048B2 (en) 2019-07-24 2021-10-12 Fujitsu Limited Image processing apparatus, image processing method, and non-transitory computer-readable storage medium for storing program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010134649A (en) * 2008-12-03 2010-06-17 Canon Inc Information processing apparatus, its processing method, and program
JP2012068772A (en) * 2010-09-22 2012-04-05 Nippon Hoso Kyokai <Nhk> Camera tracking device and program therefor
JP2013182523A (en) * 2012-03-02 2013-09-12 Hitachi Plant Technologies Ltd Image processing device, image processing system, and image processing method
JP2014106602A (en) * 2012-11-26 2014-06-09 Kddi Corp Information terminal device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010134649A (en) * 2008-12-03 2010-06-17 Canon Inc Information processing apparatus, its processing method, and program
JP2012068772A (en) * 2010-09-22 2012-04-05 Nippon Hoso Kyokai <Nhk> Camera tracking device and program therefor
JP2013182523A (en) * 2012-03-02 2013-09-12 Hitachi Plant Technologies Ltd Image processing device, image processing system, and image processing method
JP2014106602A (en) * 2012-11-26 2014-06-09 Kddi Corp Information terminal device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHUANTAO ZANG ET AL: "Camera localization by CAD model matching", 2011 IEEE/SICE INTERNATIONAL SYMPOSIUM ON SYSTEM INTEGRATION (SII), JPN7021003127, 22 December 2011 (2011-12-22), US, pages 30 - 35, XP032112653, ISSN: 0004570945, DOI: 10.1109/SII.2011.6147414 *
内山 英昭 他: "文書を対象とした拡張現実のためのLLAHを用いたカメラトラッキング", 電子情報通信学会技術研究報告, vol. 109, no. 215, JPN6021031142, 1 October 2009 (2009-10-01), JP, pages 29 - 34, ISSN: 0004570946 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11145048B2 (en) 2019-07-24 2021-10-12 Fujitsu Limited Image processing apparatus, image processing method, and non-transitory computer-readable storage medium for storing program

Also Published As

Publication number Publication date
JP6946912B2 (en) 2021-10-13

Similar Documents

Publication Publication Date Title
JP6216508B2 (en) Method for recognition and pose determination of 3D objects in 3D scenes
JP6430064B2 (en) Method and system for aligning data
JP5677798B2 (en) 3D object recognition and position and orientation determination method in 3D scene
CN109859305B (en) Three-dimensional face modeling and recognizing method and device based on multi-angle two-dimensional face
JP4900204B2 (en) Object recognition method
JP6880618B2 (en) Image processing program, image processing device, and image processing method
JP4709668B2 (en) 3D object recognition system
JP6172432B2 (en) Subject identification device, subject identification method, and subject identification program
Ozbay et al. A hybrid method for skeleton extraction on Kinect sensor data: Combination of L1-Median and Laplacian shrinking algorithms
JP6017343B2 (en) Database generation device, camera posture estimation device, database generation method, camera posture estimation method, and program
JP5647072B2 (en) Subject recognition apparatus, subject recognition method, and subject recognition program
US11468609B2 (en) Methods and apparatus for generating point cloud histograms
Ramisa et al. Mobile robot localization using panoramic vision and combinations of feature region detectors
Kordelas et al. Viewpoint independent object recognition in cluttered scenes exploiting ray-triangle intersection and SIFT algorithms
JP6946912B2 (en) Estimator program, estimator, and estimation method
JP2006113832A (en) Stereoscopic image processor and program
JP2019105992A (en) Image processing device, image processing program and image processing method
JP6544482B2 (en) Object recognition apparatus, object recognition method and storage medium
JP2019159470A (en) Estimation device, estimation method and estimation program
JP7265143B2 (en) Display control method, display control program and information processing device
JP2007140729A (en) Method and device detecting position and attitude of article
Matusiak et al. Depth-based descriptor for matching keypoints in 3D scenes
JP2018142267A (en) Object determination device, object determination method, program and data structure of feature quantity string
CN115713504A (en) Six-degree-of-freedom perspective invariance characteristic analysis method, device and processing equipment
Yang et al. An automated registration method for range images

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200709

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210804

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210817

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210830

R150 Certificate of patent or registration of utility model

Ref document number: 6946912

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150