JP2019105992A - Image processing device, image processing program and image processing method - Google Patents

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

Info

Publication number
JP2019105992A
JP2019105992A JP2017237961A JP2017237961A JP2019105992A JP 2019105992 A JP2019105992 A JP 2019105992A JP 2017237961 A JP2017237961 A JP 2017237961A JP 2017237961 A JP2017237961 A JP 2017237961A JP 2019105992 A JP2019105992 A JP 2019105992A
Authority
JP
Japan
Prior art keywords
line
feature
dimensional
line segment
pair
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2017237961A
Other languages
Japanese (ja)
Inventor
あゆ 烏谷
Ayu Karasuya
あゆ 烏谷
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 JP2017237961A priority Critical patent/JP2019105992A/en
Publication of JP2019105992A publication Critical patent/JP2019105992A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

To reduce a calculation amount of determining a pair of a feature line of a target object in a photographic image used to estimate the position and attitude of an imaging position and a line segment of shape information representing the shape of a corresponding object.SOLUTION: An image processing device includes: a three-dimensional line segment extraction part for extracting a plurality of three-dimensional line segments from three-dimensional shape information; a feature line extraction part for extracting a plurality of feature lines from a photographic image; a pair estimation part for estimating one pair of a first feature line and a first three-dimensional line segment on the basis of a distance between a first distribution about angles of the plurality of feature lines and a second distribution about angles of a plurality of projection lines obtained by projecting a plurality of three-dimensional line segments to a projection surface, and estimating at least three pairs of the feature lines and the three-dimensional line segments on the basis of the estimated one pair; and a viewpoint estimation part for estimating the position and the direction of an imaging device with respect to a target object in a three-dimensional space from the photographic image on the basis of at least four estimated pairs.SELECTED DRAWING: Figure 6

Description

本発明は、画像処理装置、画像処理プログラム及び画像処理方法に関する。   The present invention relates to an image processing apparatus, an image processing program, and an image processing method.

近年、拡張現実(Augmented Reality, AR)技術を用いて画像を表示するシステムが普及してきている(例えば、特許文献1〜3を参照)。AR技術の一例では、パーソナルコンピュータ(PC)、携帯端末装置等に搭載したカメラを用いて物体が撮影され、物体の画像から3次元空間内におけるカメラの位置及び姿勢が推定される。そして、決定されたカメラの位置及び姿勢を基準にして、画像中の任意の位置にコンテンツ情報が重畳表示される。   In recent years, systems that display images using Augmented Reality (AR) technology have become widespread (see, for example, Patent Documents 1 to 3). 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データの3次元線分と、撮影された画像中の対象物において対応する線分とのペアが、少なくとも4ペア用いられる。   As content information to be superimposed and displayed, for example, Computer-Aided Design (CAD) data representing a three-dimensional shape of an object is used. 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の技術として、撮像装置が撮影した物体の画像と形状情報とを用いて、撮像装置の位置を推定する技術がある(例えば、特許文献2。)。第2の技術では、コンピュータは、物体の形状情報に含まれる候補線を画像上に投影した投影線と、画像から検出した特徴線とを対応付けた、所定数の組み合わせを用いて、撮像装置の第1位置を推定する。次に、コンピュータは、第1位置を用いて別の候補線を画像上に投影することで、第1投影線を生成し、それに対応する特徴線を選択する。次に、コンピュータは、第1投影線と特徴線とを対応付けた組み合わせを用いて、撮像装置の第2位置を推定する。そして、コンピュータは、第2位置を用いて上記別の候補線を画像上に投影することで、第2投影線を生成し、第2投影線と上記別の特徴線との間のずれを表す指標に基づいて、撮像装置の第3位置を決定する。   As a second technology, there is a technology for estimating the position of an imaging device using an image of an object captured by the imaging device and shape information (for example, Patent Document 2). In the second technique, the computer uses the predetermined number of combinations in which a projection line obtained by projecting a candidate line included in shape information of an object onto an image and a feature line detected from the image are associated with each other. Estimate the first position of Next, the computer generates a first projection line by projecting another candidate line onto the image using the first position, and selects a feature line corresponding thereto. Next, the computer estimates the second position of the imaging device using a combination in which the first projection line and the feature line are associated with each other. The computer then projects the further candidate line onto the image using the second position to generate a second projection line, which represents the deviation between the second projection line and the further feature line. The third position of the imaging device is determined based on the index.

特開2017−91078号公報JP 2017-91078 A 特開2017−182302号公報JP, 2017-182302, A 特開2015−118641号公報JP, 2015-118641, A

カメラにより撮影した物体の画像と、その物体のCADデータとを対応付けることでカメラの位置及び姿勢を推定する場合、対応付けのための計算量が大きくなる。   When the position and orientation of the camera are estimated by associating the image of the object captured by the camera with the CAD data of the object, the amount of calculation for association is large.

なお、かかる問題は、物体の画像とCADデータとを対応付ける場合に限らず、物体の画像と他の形状情報とを対応付ける場合においても生ずるものである。   Such a problem arises not only in the case of associating the image of the object with the CAD data, but also in the case of associating the image of the object with other shape information.

1つの側面において、本発明は、撮像装置の位置及び姿勢の推定に用いる撮影画像中の対象物の特徴線と、対応する物体の形状を表す形状情報の線分とのペアを決定するための計算量を削減することを目的とする。   In one aspect, the present invention is for determining a pair of a feature line of an object in a captured image used for estimating the position and orientation of an imaging device and a line segment of shape information representing the shape of the corresponding object. The purpose is to reduce the amount of calculation.

一態様によれば、画像処理装置は、物体の3次元形状を示す3次元形状情報から、3次元形状を形成する複数の3次元線分を抽出する3次元線分抽出部と、撮像装置により対象物を撮影した撮影画像から、該対象物の形状の特徴を示す複数の特徴線を抽出する特徴線抽出部と、複数の特徴線の角度についての分布を示す第1の分布と、複数の3次元線分を投影面に投影して得られる複数の投影線の角度についての分布を示す第2の分布との間の距離に基づいて、複数の特徴線のうちの第1の特徴線と複数の3次元線分のうちの第1の3次元線分との1対のペアを推定すると共に、推定した1対のペアに基づいて特徴線と3次元線分とのペアを少なくとも3対推定するペア推定部と、推定された少なくとも4対のペアに基づいて、撮像画像から3次元空間内における対象物に対する前記撮像装置の位置及び方向を推定する視点推定部と、を含む。   According to one aspect, the image processing apparatus includes a three-dimensional line segment extraction unit that extracts a plurality of three-dimensional line segments that form a three-dimensional shape from three-dimensional shape information indicating the three-dimensional shape of the object; A feature line extracting unit for extracting a plurality of feature lines indicating features of the shape of the object from a photographed image obtained by photographing the object; a first distribution indicating a distribution of angles of the plurality of feature lines; A first feature line of the plurality of feature lines based on a distance between the plurality of feature lines obtained by projecting the three-dimensional line segment onto the projection plane and a second distribution indicating a distribution of angles of the plurality of projection lines; While estimating one pair of a plurality of three-dimensional line segments with the first three-dimensional line segment, at least three pairs of feature lines and three-dimensional line segments are estimated based on the estimated pair of pairs. From the captured image, based on the pair estimation unit to be estimated and the estimated at least four pairs. Including a viewpoint estimation unit for estimating the position and orientation of the imaging device with respect to the object in the dimension space.

実施形態によれば、撮像装置の位置及び姿勢の推定に用いる撮影画像中の対象物の特徴線と、対応する物体の形状を表す形状情報の線分とのペアを決定するための計算量を削減することができる。   According to the embodiment, the amount of calculation for determining a pair of a feature line of an object in a captured image used for estimating the position and orientation of an imaging device and a line segment of shape information representing the shape of the corresponding object It can be reduced.

撮影した画像に含まれる特徴点を用いてカメラの位置及び姿勢を求める方法を説明するための図である。It is a figure for demonstrating the method to obtain | require the position and attitude | position of a camera using the feature point contained in the image | photographed image. 3次元マップの生成方法の例を示す図である。It is a figure which shows the example of the production | generation method of a three-dimensional map. 物体の撮影画像の例を示す図である。It is a figure which shows the example of the picked-up image of an object. CADデータの例を示す図である。It is a figure which shows the example of CAD data. 撮像画像から検出されたエッジ線と、CADデータが表す輪郭線との対応付けの例を示す図である。It is a figure which shows the example of matching with the edge line detected from the captured image, and the outline represented by CAD data. 実施形態における画像処理装置の一例を示す図である。It is a figure showing an example of the image processing device in an embodiment. 本実施形態における画像処理の例を示すフローチャートである。It is a flowchart which shows the example of the image processing in this embodiment. 本実施形態における撮像画像からの特徴線の検出の例を示す図である。It is a figure which shows the example of detection of the feature line from the captured image in this embodiment. 本実施形態における3次元線分の検出の例を示す図である。It is a figure which shows the example of a detection of the three-dimensional line segment in this embodiment. 本実施形態における線分Lmdlが投影面上で線分Limgと平行になるように、3Dモデルを回転させることを説明するための図である。It is a figure for demonstrating rotating a 3D model so that line segment L mdl in this embodiment may become parallel to line segment L img on a projection plane. 本実施形態における線分Limgとカメラ視点とがなす平面の法線nを説明する図である。It is a figure explaining the normal line n of the plane which line segment L img in this embodiment and a camera viewpoint make. 本実施形態における線分Lmdl、法線nそれぞれを軸として、3Dモデルを回転させた場合の状態遷移を説明するための図である。It is a figure for demonstrating the state transition at the time of rotating a 3D model by making line segment L mdl and each normal line n into an axis in this embodiment. 本実施形態における、撮影画像より抽出した特徴線と、仮対応線分ペアに基づいて回転させた3Dモデルの3次元線分との例を示す図である。FIG. 7 is a diagram showing an example of a feature line extracted from a photographed image and a three-dimensional line segment of a 3D model rotated based on a temporary corresponding line segment pair in the present embodiment. 本実施形態における撮影画像上の特徴線の方向(角度)と、各回転状態における3Dモデルの各投影線の方向(角度)の例を示す図である。It is a figure which shows the example of the direction (angle) of the characteristic line on the picked-up image in this embodiment, and the direction (angle) of each projection line of 3D model in each rotation state. 本実施形態における撮影画像上の特徴線の角度についてのヒストグラムと、各回転状態における3Dモデルの各投影線の角度についてのヒストグラムの例を示す図である。It is a figure which shows the example of the histogram about the angle of the feature line on the picked-up image in this embodiment, and the histogram about the angle of each projection line of 3D model in each rotation state. 本実施形態における撮影画像上の特徴線の角度についてのヒストグラムと、各回転状態における3Dモデルの各投影線の角度についてのヒストグラムとの間の距離の例を説明するための図である。It is a figure for demonstrating the example of the distance between the histogram about the angle of the feature line on the picked-up image in this embodiment, and the histogram about the angle of each projection line of 3D model in each rotation state. 本実施形態(実施例1)における画像処理装置の一例を示す図である。It is a figure showing an example of the image processing device in this embodiment (example 1). 本実施形態(実施例1)におけるペア推定部の機能ブロック図である。It is a functional block diagram of the pair estimation part 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)における対応線分ペアの推定処理(ステップ1906)の詳細処理のフローチャートである。It is a flowchart of detailed processing of estimation processing (step 1906) of the corresponding line segment pair in the present embodiment (Example 1). 本実施形態(実施例1)における他の3対の対応線分ペアを推定する処理(ステップ2008)の詳細処理のフローチャートである。It is a flowchart of a detailed process of processing (step 2008) which presumes other 3 pairs of corresponding line segment pairs in this embodiment (Example 1). 本実施形態(実施例1)における対応線分ペアの例を示す図であるIt is a figure which shows the example of the corresponding line segment pair in this embodiment (Example 1). 本実施形態(実施例1)における領域の面積に基づく計算方法を示す図である。It is a figure which shows the calculation method based on the area of the area | region in this embodiment (Example 1). 本実施形態(実施例1)における距離に基づく計算方法を示す図である。It is a figure which shows the calculation method based on the distance in this embodiment (Example 1). 本実施形態(実施例1)における180度回転した線分を示す図である。It is a figure which shows the line segment rotated 180 degrees in this embodiment (Example 1). 本実施形態(実施例1)における粗パラメータの計算に適していない3次元線分の例を示す図である。It is a figure which shows the example of the three-dimensional line segment which is not suitable for calculation of the rough | crude parameter in this embodiment (Example 1). 本実施形態(実施例2)におけるペア推定部の機能ブロック図である。It is a functional block diagram of the pair estimation part in this embodiment (Example 2). 本実施形態(実施例2)における画像処理の具体例を示すフローチャートであるIt is a flowchart which shows the specific example of the image processing in this embodiment (Example 2). 本実施形態(実施例2)における特徴線選択(ステップ2001)の詳細フローチャートである。It is a detailed flowchart of feature line selection (step 2001) in the present embodiment (Example 2). 本実施形態(実施例2)における外側の特徴線から選択する方法について説明する図である。It is a figure explaining the method to select from the outside feature line in this embodiment (Example 2). 本実施形態(実施例2)における3次元線分選択(ステップ2002)の詳細処理のフローチャートである。It is a flowchart of detailed processing of three-dimensional line segment selection (step 2002) in the present embodiment (Example 2). 本実施形態(実施例2)における対応線分を選択する方法を説明するための図である。It is a figure for demonstrating the method to select the corresponding line segment in this embodiment (Example 2). 本実施形態(実施例1、実施例2)における画像処理装置として用いられる情報処理装置(コンピュータ)の構成例を示す図である。It is a figure which shows the structural example of the information processing apparatus (computer) used as an image processing apparatus in this embodiment (Example 1, Example 2).

以下、図面を参照しながら、実施形態を詳細に説明する。
図1は、撮影した画像に含まれる特徴点を用いてカメラの位置及び姿勢を求める方法を説明するための図である。この方法では、物体上におけるマップ点(3次元における位置)111の3次元座標の集合を表す3次元マップ101が、予め生成される。
Hereinafter, embodiments will be described in detail with reference to the drawings.
FIG. 1 is a diagram for explaining a method of determining the position and orientation of a camera using feature points included in a captured image. In this method, a three-dimensional map 101 representing a set of three-dimensional coordinates of map points (positions in three dimensions) 111 on an object is generated in advance.

次に、カメラによって画像102が撮影されたとき、3次元座標系103をカメラ座標系104へ変換する変換行列Mを用いて、マップ点111を投影面としての画像102上に投影することで、投影点112が求められる。そして、投影点112と画像102から検出された特徴点113とを対応付けることで、3次元座標系103におけるカメラの位置及び姿勢が推定される。なお、カメラの姿勢とはカメラの視点の方向を意味する。   Next, when the image 102 is captured by the camera, the map points 111 are projected onto the image 102 as a projection plane using a transformation matrix M that transforms the three-dimensional coordinate system 103 into the camera coordinate system 104. A projection point 112 is determined. Then, by associating the projection point 112 with the feature point 113 detected from the image 102, the position and orientation of the camera in the three-dimensional coordinate system 103 are estimated. The attitude of the camera means the direction of the viewpoint of the camera.

例えば、画像102を撮像したカメラの位置は、3次元座標系103に対するカメラ座標系104の相対位置によって表され、カメラの姿勢は、3次元座標系103に対するカメラ座標系104の相対角度によって表される。   For example, the position of the camera capturing the image 102 is represented by the relative position of the camera coordinate system 104 with respect to the three-dimensional coordinate system 103, and the posture of the camera is represented by the relative angle of the camera coordinate system 104 with respect to the three-dimensional coordinate system 103. Ru.

マップ点pの3次元座標Sp、マップ点pに対応する投影点の2次元座標xp’、及びマップ点pに対応する特徴点の2次元座標xpは、次式のように記述することができる。   The three-dimensional coordinate Sp of the map point p, the two-dimensional coordinate xp 'of the projection point corresponding to the map point p, and the two-dimensional coordinate xp of the feature point corresponding to the map point p can be described as .

Sp=(x,y,z) (1)
xp’=(u’,v’) (2)
xp=(u,v) (3)
Sp = (x, y, z) (1)
xp '= (u', v ') (2)
xp = (u, v) (3)

この場合、画像上における投影点と特徴点との距離の二乗和Eは、次式により表される。   In this case, the square sum E of the distance between the projection point and the feature point on the image is expressed by the following equation.

式(4)の二乗和Eが最小となるような変換行列Mを求めることで、カメラの位置及び姿勢が決定される。   The position and orientation of the camera can be determined by determining a conversion matrix M that minimizes the sum of squares E in equation (4).

また、投影点112同士を結ぶ線分を投影線115と称し、そのベクトルを投影線の方向ベクトルと称する。   Further, a line segment connecting the projection points 112 is referred to as a projection line 115, and the vector thereof is referred to as a direction vector of the projection line.

図2は、3次元マップ101の生成方法の例を示す図である。この生成方法では、ステレオ撮影及びステレオ計測が用いられる。撮影位置211及び撮影位置212からそれぞれ撮影した画像201及び画像202がキーフレームとして用いられ、画像201内の特徴点213と画像202内の特徴点214とを対応付けることで、3次元空間内のマップ点215が復元される。2枚の画像内の複数の特徴点同士を対応付けることで、複数のマップ点が復元され、それらのマップ点の集合を表す3次元マップ101が生成される。   FIG. 2 is a diagram showing an example of a method of generating the three-dimensional map 101. As shown in FIG. In this generation method, stereo photography and stereo measurement are used. The image 201 and the image 202 photographed respectively from the photographing position 211 and the photographing position 212 are used as key frames, and by associating the feature points 213 in the image 201 with the feature points 214 in the image 202, a map in a three-dimensional space Point 215 is restored. By associating a plurality of feature points in two images, a plurality of map points are restored, and a three-dimensional map 101 representing a set of the map points is generated.

カメラの位置及び姿勢を求める際に、物体のCADデータを図1の3次元マップ101として使用する場合、CADデータと物体との間で、模様又は色合いといった“見た目”の特徴が異なる場合が多い。この“見た目”の特徴が一致することを前提とした場合、画像内の特徴点とCADデータが表すマップ点との対応付けを、画像処理によって自動的に行うことが難しい。このため、PCの画面上でのマウス操作によって、特徴点とマップ点との対応付けが手作業で行われることがある。この場合、以下のような問題が発生すると考えられる。   When CAD data of an object is used as the three-dimensional map 101 of FIG. 1 when determining the position and orientation of a camera, the “look” characteristics such as pattern or color often differ between the CAD data and the object. . It is difficult to automatically associate the feature points in the image with the map points represented by the CAD data by image processing on the assumption that the features of the "look" match. For this reason, the correspondence between the feature points and the map points may be manually performed by the mouse operation on the screen of the PC. In this case, the following problems are considered to occur.

(A)画像中から特徴点を精度よく検出することが難しい。
(B)マップ点を画像上に投影した投影点及び特徴点をマウス等で選択する操作が難しい。
(C)投影点及び特徴点を選択する操作が難しいことと、手作業の手間のため、選択する投影点と特徴点との組み合わせ(対応ペア)の個数が限られる。
(D)対応ペアの個数が少ないため、カメラの位置及び姿勢の計算精度が低下する。
(A) It is difficult to accurately detect feature points in an image.
(B) It is difficult to select a projection point and a feature point by projecting a map point onto an image with a mouse or the like.
(C) The number of combinations (corresponding pairs) of the projection point and the feature point to be selected is limited due to the difficulty in the operation of selecting the projection point and the feature point and the labor of manual work.
(D) Since the number of corresponding pairs is small, the calculation accuracy of the position and orientation of the camera is reduced.

そこで、特許文献1に記載されているように、画像から検出されたエッジ線と、CADデータが表す輪郭線とを対応付ける方法も考えられる。   Therefore, as described in Patent Document 1, a method may be considered in which edge lines detected from an image are associated with outlines represented by CAD data.

図3は、物体の撮影画像の例を示す図である。図3の撮影画像は、ある物体を被写体(対象物)として撮影した画像である。図4は、CADデータの例を示す図である。図4のCADデータは、図3の物体に対応するCADデータである。   FIG. 3 is a view showing an example of a photographed image of an object. The captured image of FIG. 3 is an image obtained by capturing an object as a subject (target object). FIG. 4 is a diagram showing an example of CAD data. The CAD data of FIG. 4 is CAD data corresponding to the object of FIG.

図5は、撮像画像から検出されたエッジ線と、CADデータが表す輪郭線との対応付けの例を示す図である。以下では、図3の撮影画像と図4のCADデータとを対応付けることについて説明する。   FIG. 5 is a diagram showing an example of the correspondence between edge lines detected from a captured image and outlines represented by CAD data. Hereinafter, the association of the photographed image of FIG. 3 with the CAD data of FIG. 4 will be described.

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

次に、画像処理装置は、対応付けられたエッジ線及び輪郭線の組み合わせを用いて、その撮影画像を撮影したカメラの位置及び姿勢を計算する。そして、図5(c)に示すように、画像処理装置は、計算したカメラの位置及び姿勢に合わせて、CADデータが表す輪郭線を物体の画像に重畳表示する。   Next, the image processing apparatus calculates the position and orientation of the camera that captured the captured image, using the combination of the associated edge line and outline. Then, as shown in FIG. 5C, the image processing apparatus superimposes and displays an outline represented by CAD data on the image of the object in accordance with the calculated position and orientation of the camera.

このような対応付け方法によれば、エッジ線を精度よく検出することができ、エッジ線及び輪郭線を容易に選択することができるため、上記(A)及び(B)の問題が解決されるが、以下のような問題が発生すると考えられる。   According to such a correspondence method, edge lines can be detected with high accuracy, and edge lines and outlines can be easily selected, thereby solving the problems (A) and (B). However, it is considered that the following problems occur.

(E)手作業の手間のため、選択する輪郭線とエッジ線との組み合わせ(対応ペア)の個数が限られる。
(F)対応ペアの個数が少ないため、カメラの位置及び姿勢の計算精度が低下する。
(E) The number of combinations (corresponding pairs) of contour lines and edge lines to be selected is limited due to the time and labor of manual work.
(F) Since the number of corresponding pairs is small, the calculation accuracy of the position and orientation of the camera is reduced.

そこで、特許文献2に記載されているように、対応ペアを自動的に追加してカメラの位置及び姿勢を再計算する方法も考えられる。対応ペアの個数を増加させることで、計算精度が向上する。しかしながら、この方法においても、所定数の初期対応ペアがユーザによって選択されており、初期対応ペアを自動的に選択する具体的な方法は記載されていない。   Therefore, as described in Patent Document 2, a method is also conceivable in which a correspondence pair is automatically added to recalculate the position and orientation of the camera. The calculation accuracy is improved by increasing the number of corresponding pairs. However, also in this method, a predetermined number of initial corresponding pairs are selected by the user, and a specific method of automatically selecting an initial corresponding pair is not described.

熟練者ではないユーザが目視による手作業で対応ペアを選択する場合、作業に時間がかかるとともに、選択ミスが発生する可能性がある。   When a non-expert user manually selects a corresponding pair visually, the operation takes time and a selection error may occur.

一方、画像から検出されたエッジ線とCADデータが表す輪郭線とのすべての組み合わせを用いて、総当たり計算を行う方法も考えられる。例えば、m本のエッジ線から4本のエッジ線を選択し、n本の輪郭線から4本の輪郭線を選択して、4個の対応ペアを生成する場合、組み合わせの総数は×個になる。このため、エッジ線の数及び輪郭線の数が増加すると、組み合わせの総数が膨大になり、対応ペアを生成するための計算量が増加する。 On the other hand, a method of performing round-robin calculation using all combinations of edge lines detected from an image and contour lines represented by CAD data is also conceivable. For example, when four edge lines are selected from m edge lines and four outline lines are selected from n outline lines to generate four corresponding pairs, the total number of combinations is m C 4 × n C 4 pieces. Therefore, as the number of edge lines and the number of contour lines increase, the total number of combinations increases, and the amount of calculation for generating corresponding pairs increases.

本実施形態では、一例として、3DモデルもしくはCADデータ等の3次元形状情報が存在し、およその撮影距離が判明している場合、撮影画像への3Dモデルの重畳では、対応線分ペアの選択を自動化してカメラの位置及び姿勢を推定することを説明する。これにより、手作業の手間を低減し、処理時間の短縮及びミスの低減を図る。   In the present embodiment, as an example, when three-dimensional shape information such as a 3D model or CAD data is present and an approximate shooting distance is known, in the superposition of the 3D model on the shot image, selection of corresponding line segment pairs Is automated to estimate the position and orientation of the camera. In this way, the time and effort of manual work can be reduced, and the processing time can be shortened and errors can be reduced.

図6は、実施形態における画像処理装置の一例を示す図である。画像処理装置601は、3次元線分抽出部602、特徴線抽出部603、ペア推定部604、視点推定部605を含む。   FIG. 6 is a diagram illustrating an example of the image processing apparatus according to the embodiment. The image processing device 601 includes a three-dimensional line segment extraction unit 602, a feature line extraction unit 603, a pair estimation unit 604, and a viewpoint estimation unit 605.

3次元線分抽出部602は、物体の3次元形状を示す3次元形状情報から、3次元形状を形成する複数の3次元線分を抽出する。3次元線分抽出部602の一例としては、後述する3次元線分抽出部1703が挙げられる。   The three-dimensional line segment extraction unit 602 extracts a plurality of three-dimensional line segments forming a three-dimensional shape from three-dimensional shape information indicating the three-dimensional shape of the object. An example of the three-dimensional line segment extraction unit 602 is a three-dimensional line segment extraction unit 1703 described later.

特徴線抽出部603は、撮像装置により対象物を撮影した撮影画像から、対象物の形状の特徴を示す複数の特徴線を抽出する。特徴線抽出部603の一例としては、後述する特徴線検出部1705が挙げられる。   The feature line extraction unit 603 extracts a plurality of feature lines indicating features of the shape of the object from the photographed image obtained by photographing the object by the imaging device. An example of the feature line extraction unit 603 is a feature line detection unit 1705 described later.

ペア推定部604は、第1の分布と、第2の分布との間の距離に基づいて、複数の特徴線のうちの第1の特徴線と複数の3次元線分のうちの第1の3次元線分との1対のペアを推定する。第1の分布は、複数の特徴線の角度についての分布を示す。第2の分布は、複数の3次元線分を投影面に投影して得られる複数の投影線の角度についての分布を示す。ペア推定部604は、推定した1対のペアに基づいて特徴線と3次元線分とのペアを少なくとも3対推定する。ペア推定部604の一例としては、後述する推定部1706が挙げられる。   The pair estimation unit 604 determines, based on the distance between the first distribution and the second distribution, the first feature line of the plurality of feature lines and the first of the plurality of three-dimensional line segments. Estimate a pair of 3D line segments. The first distribution shows the distribution of the angles of the plurality of feature lines. The second distribution indicates a distribution of angles of a plurality of projection lines obtained by projecting a plurality of three-dimensional line segments on a projection plane. The pair estimation unit 604 estimates at least three pairs of a feature line and a three-dimensional line segment based on the estimated pair. An example of the pair estimation unit 604 is an estimation unit 1706 described later.

視点推定部605は、推定された少なくとも4対のペアに基づいて、撮像画像から3次元空間内における対象物に対する撮像装置の位置及び方向を推定する。視点推定部605の一例としては、後述する位置計算部1707、誤差計算部1708、及び決定部1709が挙げられる。   The viewpoint estimation unit 605 estimates the position and direction of the imaging device with respect to the object in the three-dimensional space from the captured image based on the estimated at least four pairs. Examples of the viewpoint estimation unit 605 include a position calculation unit 1707, an error calculation unit 1708, and a determination unit 1709, which will be described later.

このように構成することにより、撮像装置の位置及び姿勢の推定に用いる撮影画像中の対象物の特徴線と、対応する物体の形状を表す形状情報の線分とのペアを決定するための計算量を削減することができる。   With this configuration, calculation is performed to determine a pair of a feature line of an object in a captured image used to estimate the position and orientation of the imaging device and a line segment of shape information representing the shape of the corresponding object. The amount can be reduced.

ペア推定部604は、抽出した複数の特徴線から第1の特徴線を選択し、抽出した複数の3次元線分から第1の3次元線分を選択する。ペア推定部604は、仮想空間において、3次元形状を回転させて第1の特徴線と第1の3次元線分とを一致させる。ペア推定部604は、第1の特徴線と第1の3次元線分とを一致させた3次元形状を、第1の3次元線分と、第1の特徴線と撮像装置の視点とがなす平面に対する法線と、をそれぞれ回転軸として、3次元形状を所定角度ずつ回転させる。ペア推定部604は、回転させる毎に複数の3次元線分を投影面に投影して得られる複数の投影線の角度についての第2の分布を生成する。ペア推定部604は、生成した複数の第2の分布のそれぞれと、第1の分布との間の距離に応じて、1対のペアを推定する。   The pair estimation unit 604 selects a first feature line from the plurality of extracted feature lines, and selects a first three-dimensional line segment from the plurality of extracted three-dimensional line segments. The pair estimation unit 604 rotates the three-dimensional shape in the virtual space to match the first feature line with the first three-dimensional line segment. The pair estimation unit 604 has a three-dimensional shape in which the first feature line matches the first three-dimensional line segment, the first three-dimensional line segment, the first feature line, and the viewpoint of the imaging device. The three-dimensional shape is rotated by a predetermined angle with the normal to the plane to be made as the rotation axis. The pair estimation unit 604 generates a second distribution of the angles of the plurality of projection lines obtained by projecting the plurality of three-dimensional line segments on the projection plane each time the pair of rotations is rotated. The pair estimation unit 604 estimates a pair of pairs according to the distance between each of the plurality of generated second distributions and the first distribution.

このように構成することにより、撮影画像から選んだ特徴線と、3次元形状情報から選んだ3次元線分とが対応する線分同士であるか推定することができる。   With such a configuration, it can be estimated whether the feature line selected from the photographed image and the three-dimensional line segment selected from the three-dimensional shape information correspond to one another.

ペア推定部604は、1対のペアである第1のペアを推定した場合、第1のペアを形成する第1の3次元線分の第1の投影線以外の複数の投影線から、1対のペアを形成する第1の特徴線以外の第2の特徴線と角度が一致している第2の投影線を取得する。ペア推定部604は、第2の投影線に対応する第2の3次元線分と第2の特徴線とを選択し、第2の3次元線分と第2の特徴線を第2のペアと推定する。   When the pair estimation unit 604 estimates a first pair that is a pair of pairs, one from a plurality of projection lines other than the first projection line of the first three-dimensional line segment that forms the first pair. A second projection line whose angle coincides with a second feature line other than the first feature line forming the pair is acquired. The pair estimation unit 604 selects the second three-dimensional line segment and the second feature line corresponding to the second projection line, and generates a second pair of the second three-dimensional line segment and the second feature line. Estimate.

ペア推定部604は、第1の投影線及び第2の投影線以外の複数の投影線から、第1の特徴線及び第2の特徴線以外の第3の特徴線と角度と位置が一致している第3の投影線を取得する。ペア推定部604は、第3の投影線に対応する第3の3次元線分と第3の特徴線とを選択し、第3の3次元線分と第3の特徴線を第3のペアと推定する。   From the plurality of projection lines other than the first projection line and the second projection line, the pair estimation unit 604 coincides in position and angle with the third feature line other than the first feature line and the second feature line. Acquire a third projection line. The pair estimation unit 604 selects the third three-dimensional line segment and the third feature line corresponding to the third projection line, and the third three-dimensional line segment and the third feature line as a third pair Estimate.

ペア推定部604は、第1の投影線、第2の投影線及び第3の投影線以外の複数の投影線から、第1の特徴線、第2の特徴線及び第3の特徴線以外の第4の特徴線と角度と位置が一致している第4の投影線を取得する。ペア推定部604は、第4の投影線に対応する第4の3次元線分と第4の特徴線を選択し、第4の3次元線分と第4の特徴線を第4のペアと推定する。   The pair estimation unit 604 determines, from the plurality of projection lines other than the first projection line, the second projection line and the third projection line, the first feature line, the second feature line and the third feature line. A fourth projection line whose angle and position match the fourth feature line is acquired. The pair estimation unit 604 selects the fourth three-dimensional line segment and the fourth feature line corresponding to the fourth projection line, and selects the fourth three-dimensional line segment and the fourth feature line as the fourth pair. presume.

このように構成することにより、第1のペアが推定された場合に、第1のペアを仮に固定して他の特徴線と3次元線分との位置や角度の関係から、他のペアを推定することができる。   By this configuration, when the first pair is estimated, the first pair is temporarily fixed, and another pair is determined from the relationship between the position and angle of another feature line and a three-dimensional line segment. It can be estimated.

ペア推定部604は、撮影画像より抽出した複数の特徴線を同一方向毎にグループ化して複数の特徴線グループを形成する。ペア推定部604は、複数の3次元線分を同一方向毎にグループ化して複数の3次元線分グループを形成する。   The pair estimation unit 604 groups a plurality of feature lines extracted from the captured image in the same direction to form a plurality of feature line groups. The pair estimation unit 604 groups a plurality of three-dimensional line segments in the same direction to form a plurality of three-dimensional line segment groups.

ペア推定部604は、それぞれの特徴線グループに含まれる特徴線の数、それぞれの特徴線グループに含まれる特徴線の長さ、及びそれぞれの特徴線グループにおける特徴線の位置のうち少なくとも1つの条件に基づいて、第1の特徴線を選択する。   The pair estimation unit 604 sets at least one condition among the number of feature lines included in each feature line group, the length of feature lines included in each feature line group, and the position of feature lines in each feature line group The first feature line is selected based on

ペア推定部604は、それぞれの3次元線分グループに含まれる3次元線分の数、及びそれぞれの3次元線分グループに含まれる3次元線分の長さのうち少なくとも1つの条件に基づいて、第1の3次元線分を選択する。   The pair estimation unit 604 is based on at least one condition among the number of 3D line segments included in each 3D line segment group and the length of 3D line segments included in each 3D line segment group. , Select a first three-dimensional line segment.

このように構成することにより、3次元線分の選択時の正しい対応線分ペアが得られる期待値を上げ、かつ対応線分ペアの探索処理を高速化することができる。   With this configuration, it is possible to increase the expected value for obtaining the correct corresponding line segment pair when selecting a three-dimensional line segment, and to speed up the process of searching for the corresponding line segment pair.

ペア推定部604は、撮影画像より抽出した複数の特徴線を同一方向毎にグループ化して複数の特徴線グループを形成する。ペア推定部604は、複数の3次元線分を同一方向毎にグループ化して複数の3次元線分グループを形成する。   The pair estimation unit 604 groups a plurality of feature lines extracted from the captured image in the same direction to form a plurality of feature line groups. The pair estimation unit 604 groups a plurality of three-dimensional line segments in the same direction to form a plurality of three-dimensional line segment groups.

ペア推定部604は、複数の特徴線グループから、最も多く特徴線を含む特徴線グループを選択する。ペア推定部604は、選択した特徴線グループに含まれるすべての特徴線の長さが所定の範囲内である場合には選択した特徴線グループにおいて外周線に対応する特徴線を第1の特徴線として選択する。ペア推定部604は、選択した特徴線グループに含まれるいずれかの特徴線の長さが所定の範囲を超える場合には選択した特徴線グループから最も長い特徴線を第1の特徴線として選択する。   The pair estimation unit 604 selects a feature line group including the largest number of feature lines from the plurality of feature line groups. When the lengths of all the feature lines included in the selected feature line group are within a predetermined range, the pair estimation unit 604 sets the feature line corresponding to the outer circumferential line in the selected feature line group as the first feature line. Choose as. When the length of any feature line included in the selected feature line group exceeds a predetermined range, the pair estimation unit 604 selects the longest feature line from the selected feature line group as the first feature line. .

ペア推定部604は、複数の3次元線分グループから、選択された特徴線グループに含まれる特徴線の数以上でより近い数の3次元線分を含む3次元線分グループが1つの場合には1つの3次元線分グループを選択する。ペア推定部604は、特徴線の数以上でより近い数の3次元線分を含む3次元線分グループが複数存在する場合には最も長い3次元線分を含む3次元線分グループを選択する。ペア推定部604は、特徴線の数以上の3次元線分を含む3次元線分グループが存在しない場合には選択された特徴線グループに含まれる特徴線の数未満でより近い数の3次元線分を含む3次元線分グループを選択する。ペア推定部604は、選択した3次元線分グループから最も長い3次元線分を第1の3次元線分として選択する。   The pair estimation unit 604 selects one three-dimensional line segment group including a three-dimensional line segment whose number is equal to or more than the number of feature lines included in the selected feature line group from among a plurality of three-dimensional line segment groups. Selects one 3D line segment group. The pair estimation unit 604 selects the three-dimensional line segment group including the longest three-dimensional line segment, when there are a plurality of three-dimensional line segment groups including the three-dimensional line segment having a closer number by the number of feature lines or more. . When there is no three-dimensional line segment group including three or more three-dimensional line segments equal to or more than the number of feature lines, the pair estimation unit 604 has a closer number of three-dimensional lines less than the number of feature lines included in the selected feature line group. Select 3D line segment group including line segments. The pair estimation unit 604 selects the longest three-dimensional line segment as the first three-dimensional line segment from the selected three-dimensional line segment group.

このように構成することにより、3次元線分の選択時の正しい対応線分ペアが得られる期待値を上げ、かつ対応線分ペアの探索処理を高速化することができる。   With this configuration, it is possible to increase the expected value for obtaining the correct corresponding line segment pair when selecting a three-dimensional line segment, and to speed up the process of searching for the corresponding line segment pair.

図7は、本実施形態における画像処理の例を示すフローチャートである。図8は、本実施形態における撮像画像からの特徴線の検出の例を示す図である。図9は、本実施形態における3次元線分の検出の例を示す図である。図10は、本実施形態における線分Lmdlが投影面上で線分Limgと平行になるように、すなわち仮対応線分ペアの角度が一致するように、3Dモデルを回転させることを説明するための図である。 FIG. 7 is a flowchart showing an example of image processing in the present embodiment. FIG. 8 is a diagram showing an example of detection of feature lines from a captured image in the present embodiment. FIG. 9 is a diagram showing an example of detection of a three-dimensional line segment in the present embodiment. FIG. 10 illustrates that the 3D model is rotated so that the line segment L mdl in this embodiment is parallel to the line segment L img on the projection plane, that is, the angles of the temporary corresponding line segment pair coincide with each other. FIG.

図7では、画像処理装置601は、撮影画像上の線分と、3Dモデルから選んだ線分とが対応する線分同士(対応線分)か簡易的に推定し、対応する線分同士ではないと推定した場合には3Dモデルの線分を選び直す。画像処理装置601は、対応線分同士と推定した場合、他の対応線分の組を推定し、4ペア以上の組が見つかった場合、精密な計算を行う。   In FIG. 7, the image processing apparatus 601 simply estimates whether the line segment on the captured image and the line segment selected from the 3D model correspond to each other (corresponding line segment), and the corresponding line segments If it is estimated that there is no line segment in the 3D model. The image processing apparatus 601 estimates another set of corresponding line segments when the corresponding line segments are estimated, and performs precise calculation when a set of four or more pairs is found.

特徴線抽出部603は、図8(a)に示すように、カメラ等で撮影された撮影画像から特徴線(撮影画像から検出した線分)を検出する(ステップ701)。   As shown in FIG. 8A, the feature line extraction unit 603 detects a feature line (a line segment detected from a shot image) from a shot image shot by a camera or the like (step 701).

3次元線分抽出部602は、図9(a)に示すように、3DモデルデータもしくはCADデータ等の3次元形状情報(以下、「3Dモデル」と称する。)から3次元線分を検出する(ステップ702)。3次元線分は、3次元の形状を形成する線分を示す情報である。   The three-dimensional line segment extraction unit 602 detects three-dimensional line segments from three-dimensional shape information (hereinafter referred to as "3D model") such as 3D model data or CAD data as shown in FIG. 9A. (Step 702). The three-dimensional line segment is information indicating a line segment that forms a three-dimensional shape.

ペア推定部604は、図9(b)に示すように、仮想的な空間において、適当な位置にカメラと、そのカメラの視線上のおよその撮影距離に3Dモデルとを仮想的に配置する(ステップ703)。   As shown in FIG. 9B, the pair estimation unit 604 virtually arranges the camera at an appropriate position in a virtual space, and the 3D model at an approximate shooting distance on the line of sight of the camera ( Step 703).

ペア推定部604は、撮像画像上の線分Limg(図8(b))と、3Dモデル上の線分Lmdl(図9(b))とを選択する(ステップ704)。この選択した線分Limgと線分Lmdlとのペアを、説明の便宜上、仮対応線分ペアと称する。 The pair estimation unit 604 selects the line segment L img (FIG. 8 (b)) on the captured image and the line segment L mdl (FIG. 9 (b)) on the 3D model (step 704). The pair of the selected line segment L img and the line segment L mdl is referred to as a temporary corresponding line segment pair for convenience of description.

ペア推定部604は、図10に示すように、線分Lmdlが投影面上で線分Limgと平行になるように、すなわち仮対応線分ペアの角度が一致するように、3Dモデルを回転させる(ステップ705)。 As shown in FIG. 10, the pair estimation unit 604 sets the 3D model so that the line segment L mdl is parallel to the line segment L img on the projection plane, that is, the angles of the temporary corresponding line segment pair coincide with each other. Rotate (step 705).

ペア推定部604は、線分Lmdlを軸としておよび、線分Limgとカメラ視点とがなす平面の法線nを軸として、3Dモデルを回転させて3Dモデルの投影線の方向ベクトルを求める(ステップ706)。3Dモデルの投影線の方向ベクトルとは、図1で説明したように、符号115で表したものである。 The pair estimation unit 604 obtains the direction vector of the projection line of the 3D model by rotating the 3D model with the line segment L mdl as an axis and with the normal line n between the line segment L img and the camera viewpoint as an axis. (Step 706). The direction vector of the projection line of the 3D model is represented by reference numeral 115 as described in FIG.

図11は、本実施形態における線分Limgとカメラ視点とがなす平面の法線nを説明する図である。画像平面1101は、カメラ視点(カメラ座標系原点)1104から撮像される平面である。画像平面1101上に線分Limgが存在する。線分Limgは、3Dモデル上のエッジ1102に相当する。このとき、線分Limgとカメラ視点とがなす平面に対して垂直方向の線分は、法線nで示される。 FIG. 11 is a diagram for explaining the normal line n of the plane formed by the line segment L img and the camera viewpoint in the present embodiment. An image plane 1101 is a plane captured from a camera viewpoint (camera coordinate system origin) 1104. A line segment L img exists on the image plane 1101. The line segment L img corresponds to the edge 1102 on the 3D model. At this time, a line segment in the direction perpendicular to the plane formed by the line segment L img and the camera viewpoint is indicated by the normal line n.

図12は、本実施形態における線分Lmdl、法線nそれぞれを軸として、3Dモデルを回転させた場合の状態遷移を説明するための図である。図12において、横方向は、選択した3次元線分Lmdlを軸として3Dモデルを回転させた場合の3Dモデルの状態遷移を示す。縦方向は、線分Limgとカメラ視点とがなす平面1105の法線nを軸として3Dモデルを回転させた場合の3Dモデルの状態遷移を示す。 FIG. 12 is a diagram for explaining state transition in the case where the 3D model is rotated with the line segment L mdl and the normal line n as axes in the present embodiment. In FIG. 12, the horizontal direction indicates the state transition of the 3D model when the 3D model is rotated about the selected three-dimensional line segment L mdl . The vertical direction indicates the state transition of the 3D model in the case where the 3D model is rotated about the normal line n of the plane 1105 formed by the line segment L img and the camera viewpoint.

図12に示すように、線分Lmdl、法線nそれぞれを軸として3Dモデルを回転させ、その回転させた状態での3Dモデルを形成する3次元線分の投影線の方向ベクトルを求める。 As shown in FIG. 12, the 3D model is rotated about the line segment L mdl and the normal line n, and the direction vector of the projection line of the 3D line segment forming the 3D model in the rotated state is determined.

図7の説明に戻る。ペア推定部604は、撮影画像上の特徴線の方向(角度)のヒストグラムH1と投影線の方向(角度)のヒストグラムH2との距離を指標として、仮対応線分ペアが対応線分の可能性があるか否かを判断する(ステップ707)。ステップ707について、図13〜図16を用いて説明する。   It returns to the explanation of FIG. The pair estimation unit 604 uses the distance between the histogram H1 of the direction (angle) of the feature line on the captured image and the histogram H2 of the direction (angle) of the projection line as an index It is determined whether or not there is (step 707). Step 707 will be described using FIGS. 13 to 16.

図13は、本実施形態における、撮影画像より抽出した特徴線と、仮対応線分ペアに基づいて回転させた3Dモデルの3次元線分との例を示す図である。撮影画像より抽出した特徴線は、ステップ701で得られる。   FIG. 13 is a diagram illustrating an example of a feature line extracted from a photographed image and a three-dimensional line segment of a 3D model rotated based on a temporary corresponding line segment pair in the present embodiment. A feature line extracted from the photographed image is obtained in step 701.

ステップ707では、ペア推定部604は、撮影画像より抽出した特徴線1301と、各回転状態にて投影面に投影した3Dモデル1302,1303,1304とを比較して、仮対応線分ペアが対応線分の可能性があるか否かを判断する。この場合に、ペア推定部604は、撮影画像上の特徴線の方向(角度)のヒストグラムH1と投影線の方向(角度)のヒストグラムH2との距離を指標として、仮対応線分ペアが対応線分の可能性があるか否かを判断する。   In step 707, the pair estimation unit 604 compares the feature line 1301 extracted from the photographed image with the 3D models 1302, 1303, and 1304 projected on the projection plane in each rotation state, and the temporary corresponding line segment pair corresponds. Determine if there is a possibility of a line segment. In this case, the pair estimation unit 604 uses the distance between the histogram H1 of the direction (angle) of the feature line on the captured image and the histogram H2 of the direction (angle) of the projection line as an index. Determine if there is a potential for minutes.

まずは、撮影画像上の特徴線の方向(角度)と、各回転状態における3Dモデルの各投影線の方向(角度)とが算出される。撮影画像上の特徴線の角度は、撮影画像上における特徴線の傾きであって、例えば、図1のカメラ座標系104のX軸に対する角度で表される。投影線の角度は、投影面における投影線の傾きであって、例えば、図1のカメラ座標系104のX軸に対する角度で表される。   First, the direction (angle) of the feature line on the photographed image and the direction (angle) of each projection line of the 3D model in each rotation state are calculated. The angle of the feature line on the captured image is the inclination of the feature line on the captured image, and is represented by, for example, the angle with respect to the X axis of the camera coordinate system 104 in FIG. The angle of the projection line is the inclination of the projection line in the projection plane, and is represented, for example, by the angle with respect to the X axis of the camera coordinate system 104 of FIG.

図14は、本実施形態における撮影画像上の特徴線の方向(角度)と、各回転状態における3Dモデルの各投影線の方向(角度)の例を示す図である。   FIG. 14 is a view showing an example of the direction (angle) of the feature line on the photographed image and the direction (angle) of each projection line of the 3D model in each rotation state in the present embodiment.

図14(a)は、撮影画像1301上の15本の特徴線の方向(角度)を示す。図14(b)は、15本の3次元線分で形成される3Dモデル1302を撮像平面(図1の画像102に相当)に投影した場合に得られる15本の投影線の方向(角度)を示す。図14(c)は、15本の3次元線分で形成される3Dモデル1303を撮像平面(図1の画像102に相当)に投影した場合に得られる15本の投影線の方向(角度)を示す。図14(c)は、15本の3次元線分で形成される3Dモデル1304を撮像平面(図1の画像102に相当)に投影した場合に得られる15本の投影線の方向(角度)を示す。   FIG. 14A shows the directions (angles) of 15 feature lines on the captured image 1301. FIG. 14B shows the directions (angles) of 15 projection lines obtained when the 3D model 1302 formed by 15 three-dimensional line segments is projected onto the imaging plane (corresponding to the image 102 in FIG. 1). Indicates FIG. 14C shows the directions (angles) of 15 projection lines obtained when the 3D model 1303 formed of 15 three-dimensional line segments is projected onto the imaging plane (corresponding to the image 102 in FIG. 1). Indicates FIG. 14C shows the directions (angles) of 15 projection lines obtained when the 3D model 1304 formed by 15 three-dimensional line segments is projected onto the imaging plane (corresponding to the image 102 in FIG. 1). Indicates

図15は、本実施形態における撮影画像上の特徴線の角度についてのヒストグラムと、各回転状態における3Dモデルの各投影線の角度についてのヒストグラムの例を示す図である。各ヒストグラム1501,1502,1503,1504の横軸は角度(3度単位)、縦軸はその角度の範囲に含まれる角度の個数(頻度)を示す。   FIG. 15 is a diagram showing an example of a histogram of angles of feature lines on a photographed image and a histogram of angles of projection lines of the 3D model in each rotation state in the present embodiment. The horizontal axis of each of the histograms 1501, 1502, 1503, and 1504 indicates an angle (in 3 degree units), and the vertical axis indicates the number (frequency) of angles included in the range of the angle.

ヒストグラムH1(1501)は、撮影画像1301上の特徴線の角度についてのヒストグラムであり、図14(a)を3度単位でヒストグラム化したものである。   The histogram H1 (1501) is a histogram of the angle of the feature line on the photographed image 1301, and is a histogram of FIG. 14 (a) in units of three degrees.

ヒストグラムH2(1502)は、3Dモデル1302の各投影線の角度についてのヒストグラムであり、図14(b)を3度単位でヒストグラム化したものである。   The histogram H2 (1502) is a histogram of the angle of each projection line of the 3D model 1302, and is a histogram of FIG. 14 (b) in units of three degrees.

ヒストグラムH2(1503)は、3Dモデル1303の各投影線の角度についてのヒストグラムであり、図14(c)を3度単位でヒストグラム化したものである。   The histogram H2 (1503) is a histogram of the angle of each projection line of the 3D model 1303, and is a histogram of FIG. 14C in units of three degrees.

ヒストグラムH2(1504)は、3Dモデル1304の各投影線の角度についてのヒストグラムであり、図14(d)を3度単位でヒストグラム化したものである。   The histogram H2 (1504) is a histogram of the angle of each projection line of the 3D model 1304, and is a histogram of FIG. 14 (d) in units of three degrees.

なお、ヒストグラムにおいて、頻度の集計の単位をビン(ヒストグラムのグラフの柱のこと)といい、上述のように、ヒストグラムH1及びヒストグラムH2のビンの単位及びビンの数が同じになるようにする。   In the histogram, the unit of frequency aggregation is referred to as a bin (the column of the histogram graph), and as described above, the unit of bins and the number of bins of the histogram H1 and the histogram H2 are made the same.

図16は、本実施形態における撮影画像上の特徴線の角度についてのヒストグラムH1と、各回転状態における3Dモデルの各投影線の角度についてのヒストグラムH2との間の距離の例を説明するための図である。   FIG. 16 is a view for explaining an example of the distance between the histogram H1 of the angle of the feature line on the photographed image and the histogram H2 of the angle of each projection line of the 3D model in each rotation state in this embodiment. FIG.

ここで、比較するヒストグラム同士がどれほど類似しているかを、ヒストグラム間の距離といい、以下ではd(x1,x2)で表す。x1は、ヒストグラムH1のn個のビンそれぞれの頻度を要素とするn次元ベクトルである。x2は、ヒストグラムH2のn個のビンそれぞれの頻度を要素とするn次元ベクトルである。 Here, how similar the histograms to be compared are to each other is referred to as a distance between the histograms, and hereinafter, it is represented by d (x 1 , x 2 ). x 1 is an n-dimensional vector whose element is the frequency of each of n bins of the histogram H 1 . x 2 is an n-dimensional vector whose element is the frequency of each of n bins of the histogram H 2 .

ヒストグラム同士が類似しているほど、ヒストグラム間の距離の値は小さくなり、ヒストグラム同士が相違しているほど、ヒストグラム間の距離の値は大きくなる。ヒストグラム間の距離の計算には様々な方法を用いることができるが、その計算方法の一例を以下に示す。   The more similar the histograms are, the smaller the value of the distance between the histograms, and the different the histograms are, the larger the value of the distance between the histograms. Although various methods can be used to calculate the distance between histograms, an example of the calculation method is shown below.

ここで、ヒストグラムH1とヒストグラムH2とを、同一の2次元座標系に描画する。このとき、ヒストグラムH1の各ビンの頂上の座標をx1iで表し、ヒストグラムH2の各ビンの頂上の座標をx2iで表すものとする。x1iは、ベクトルx1のi番目(i=1〜n)の要素である。x2iは、ベクトルx2のi番目(i=1〜n)の要素である。 Here, the histogram H1 and the histogram H2 are drawn in the same two-dimensional coordinate system. At this time, the coordinate of the top of each bin of the histogram H1 is represented by x 1i , and the coordinate of the top of each bin of the histogram H2 is represented by x 2i . x 1i is the i-th (i = 1 to n) element of the vector x 1 . x 2 i is the i-th (i = 1 to n) element of the vector x 2 .

・マンハッタン(Manhattan)距離(L1ノルムなどともいう)
マンハッタン距離d(x1,x2)は、式(5)に示すように、ヒストグラムH1の座標x1iとヒストグラムH2の座標x2iそれぞれの差(の絶対値)の総和を2点間の距離で表すことができる。ここで、式(5)のΣは、i=1からi=nまでの総和を表し、nはヒストグラムH1およびヒストグラムH2のビンの数である。
・ Manhattan distance (also called L1 norm)
Manhattan distance d (x 1, x 2), as shown in Equation (5), the distance sum of the coordinates x 1i and the coordinate x 2i each histogram difference H2 of the histogram H1 (absolute value) between two points Can be represented by Here, Σ in equation (5) represents the total sum from i = 1 to i = n, and n is the number of bins of the histogram H1 and the histogram H2.

・ユークリッド(Euclidean)距離(L2ノルムなどともいう)
ユークリッド距離d(x1,x2)は、式(6)に示すように、ヒストグラムH1の座標x1iとヒストグラムH2の座標x2iそれぞれの差の二乗和の平方根を2点間の距離として表すことができる。ここで、式(6)のΣは、i=1からi=nまでの総和を表し、nはヒストグラムH1およびヒストグラムH2のビンの数である。
Euclidean distance (also called L2 norm)
Euclidean distance d (x 1, x 2), as shown in Equation (6) represents the square root of the sum of the squares of the coordinates x 1i and the coordinate x 2i each histogram difference H2 of the histogram H1 as the distance between two points be able to. Here, Σ in equation (6) represents the sum from i = 1 to i = n, and n is the number of bins of the histogram H1 and the histogram H2.

・Hellinger距離
Hellinger距離d(x1,x2)は、式(7)で表される。ここで、式(7)のΣは、i=1からi=nまでの総和を表し、nはヒストグラムH1およびヒストグラムH2のビンの数である。
Hellinger Distance The Hellinger distance d (x 1 , x 2 ) is expressed by Expression (7). Here, Σ in equation (7) represents the total sum from i = 1 to i = n, and n is the number of bins of the histogram H1 and the histogram H2.

・バタチャリア(Bhattacharyya)距離
バタチャリア距離d(x1,x2)は、式(8)で表される。ここで、式(8)のΣは、i=1からi=nまでの総和を表し、nはヒストグラムH1およびヒストグラムH2のビンの数である。
· Batacharia (Bhattacharyya) Distance Batacharia distance d (x 1, x 2) can be expressed by equation (8). Here, Σ in equation (8) represents the total sum from i = 1 to i = n, and n is the number of bins of the histogram H1 and the histogram H2.

・ヒストグラム交差法(Histogram Intersection)
ヒストグラム交差法は、式(9)に示すように、比較するビン毎に小さい値を選択しその総和を総数で割る方法である。ここで、式(9)のΣは、i=1からi=nまでの総和を表し、nはヒストグラムH1およびヒストグラムH2のビンの数である。min(x1i,x2i)は、x1iとx2iとのうち小さい方を選択することを示す。ヒストグラム交差法において、比較するヒストグラムが一致した場合には最大値の1で表される。
・ Histogram intersection method (Histogram Intersection)
The histogram crossover method is a method in which a small value is selected for each bin to be compared and the sum is divided by the total number, as shown in equation (9). Here, Σ in equation (9) represents the total sum from i = 1 to i = n, and n is the number of bins of the histogram H1 and the histogram H2. min (x 1i , x 2i ) indicates that the smaller of x 1i and x 2i is to be selected. In the histogram crossover method, when the histograms to be compared match, they are represented by 1 of the maximum value.

・コサイン類似度
コサイン類似度は、式(10)に示すように、比較するヒストグラムH1,H2のビンの頂上の各座標をベクトルとして扱い、そのベクトル間のCOS値を求めることにより得られる。ここで、式(10)のΣは、i=1からi=nまでの総和を表し、nはヒストグラムH1およびヒストグラムH2のビンの数である。
Cosine Similarity The cosine similarity is obtained by treating each coordinate of the top of the bins of the histograms H1 and H2 to be compared as a vector and calculating the COS value between the vectors, as shown in equation (10). Here, Σ in equation (10) represents the sum from i = 1 to i = n, and n is the number of bins of the histogram H1 and the histogram H2.

コサイン類似度が1に近ければ近いほど、比較するヒストグラムH1,H2の距離は近い。すなわち比較するヒストグラムH1,H2が一致した場合にはコサイン類似度は、最大値の1で表される。   The closer the cosine similarity is to one, the closer the distance between the histograms H1 and H2 to be compared. That is, when the histograms H1 and H2 to be compared coincide with each other, the cosine similarity is represented by 1 of the maximum value.

ヒストグラム間の距離は、上述した方法の他、例えば、Earth Mover‘s Distance(EMD)等を用いてもよい。   For the distance between the histograms, for example, Earth Mover's Distance (EMD) may be used in addition to the method described above.

図16では、ヒストグラムH1(1501)と、ヒストグラム1502,1503,1504とのヒストグラム間の距離を、一例として、マンハッタン距離、ユークリッド距離、ヒストグラム交差法を用いて算出している。   In FIG. 16, the distances between the histogram H1 (1501) and the histograms 1502, 1503, and 1504 are calculated using, for example, the Manhattan distance, the Euclidean distance, and the histogram intersection method.

マンハッタン距離とユークリッド距離については、その距離が短いほど比較するヒストグラム間は類似していると評価される。ヒストグラム交差法では、比較するヒストグラム間が類似しているほど、値が1に近づき、一致した場合、最大値1となる。   Regarding the Manhattan distance and the Euclidean distance, it is evaluated that the histograms to be compared are more similar as the distance is shorter. In the histogram crossover method, the closer the histograms to be compared are, the closer to 1 the value is, and the maximum value is 1 when they match.

図16の表より、ヒストグラムH1(1501)と、ヒストグラムH2(1502,1503,1504)との比較では、いずれの距離計算方法を採用しても、ヒストグラムH1(1501)と、ヒストグラムH2(1503)とが類似度が最も高い。   From the table of FIG. 16, in comparison between the histogram H1 (1501) and the histogram H2 (1502, 1503, 1504), the histogram H1 (1501) and the histogram H2 (1503) can be used regardless of which distance calculation method is adopted. The degree of similarity is the highest.

このように、撮影画像より抽出した特徴線と、仮対応線分ペアに基づいて回転させた3Dモデルの3次元線分との画像間の類似度を、撮影画像上の特徴線の角度のヒストグラムと投影線の角度のヒストグラムとの距離を指標として、算出することができる。   Thus, the similarity between images of the feature line extracted from the captured image and the three-dimensional line segment of the 3D model rotated based on the temporary corresponding segment pair is a histogram of the angle of the feature line on the captured image It is possible to calculate the distance between the angle of the projection line and the histogram of the projection line as an index.

このとき、ヒストグラム間の距離の値が閾値以上のとき、または閾値以下のとき、撮影画像より抽出した特徴線と、仮対応線分ペアに基づいて回転させた3Dモデルの3次元線分との対応関係が正しいと推定することができる。この場合、ペア推定部604は、仮対応線分ペアが対応線分の可能性があると判定する。   At this time, when the value of the distance between the histograms is equal to or more than the threshold value or less than the threshold value, the feature line extracted from the photographed image and the three-dimensional line segment of the 3D model rotated based on the temporary corresponding line segment pair. It can be estimated that the correspondence is correct. In this case, the pair estimation unit 604 determines that the temporary corresponding line segment pair has a possibility of the corresponding line segment.

図7の説明に戻る。ペア推定部604は、仮対応線分ペアが対応線分の可能性がある場合は、線分の位置関係から他の対応線分のペアを探す(ステップ708)。上述したように、カメラの位置・姿勢を決定するためには、3次元線分と、特徴線とのペアが少なくとも4ペア必要である。ここでは、ペア推定部604は、仮対応線分ペア(1ペア)の他に、3ペアの対応線分を探す。具体的には、ペア推定部604は、対応線分の可能性があると判定した仮対応線分ペアを固定した場合に他の対応する線分同士の角度や位置に基づいて、他の対応線分3ペアを探す。   It returns to the explanation of FIG. If there is a possibility that the temporary corresponding line segment pair is a corresponding line segment, the pair estimation unit 604 searches for a pair of other corresponding line segments from the positional relationship of the line segments (step 708). As described above, in order to determine the position and orientation of the camera, at least four pairs of three-dimensional line segments and feature lines are required. Here, the pair estimation unit 604 searches for three pairs of corresponding line segments in addition to the temporary corresponding line segment pair (one pair). Specifically, when the pair estimation unit 604 fixes the temporary corresponding line segment pair determined to have the possibility of the corresponding line segment, another process is performed based on the angle and the position of the other corresponding line segments. Find line 3 pairs.

対応線分ペアが4ペア以上見つかった場合、視点推定部605は、その対応線分ペアの対応付け結果に基づいて、対象物の画像から3次元空間内における対象物に対するカメラ視点の位置及び方向(カメラ位置姿勢)を算出する(ステップ709)。それから、視点推定部605は、算出したカメラ位置姿勢に対して、特徴線と3次元線分を撮影画像に投影した投影線との誤差を算出する。それから、視点推定部605は、ステップ704〜ステップ709を繰り返し、誤差が最小となるカメラ位置姿勢を選択して出力する。   When four or more corresponding line segment pairs are found, the viewpoint estimation unit 605 determines the position and direction of the camera viewpoint with respect to the object in the three-dimensional space from the image of the object based on the correspondence result of the corresponding line pair. The (camera position and orientation) is calculated (step 709). Then, the viewpoint estimation unit 605 calculates, for the calculated camera position and orientation, an error between a feature line and a projection line obtained by projecting a three-dimensional line segment on a captured image. Then, the viewpoint estimation unit 605 repeats steps 704 to 709, and selects and outputs a camera position and orientation that minimizes the error.

このような画像処理装置601によれば、物体の画像と物体の形状を表す形状情報とを対応付けるための計算量を削減することができる。以下では、本実施形態の実施例について詳述する。   According to such an image processing apparatus 601, it is possible to reduce the amount of calculation for correlating the image of the object with the shape information representing the shape of the object. Below, the Example of this embodiment is explained in full detail.

図17は、本実施形態(実施例1)における画像処理装置の一例を示す図である。画像処理装置1701は、3Dモデル読込部1702、3次元線分抽出部1703、画像取得部1704、特徴線検出部1705、ペア推定部1706、位置計算部1707、誤差計算部1708、決定部1709、出力部1710を含む。   FIG. 17 is a diagram showing an example of the image processing apparatus in the present embodiment (Example 1). The image processing apparatus 1701 includes a 3D model reading unit 1702, a two-dimensional line segment extraction unit 1703, an image acquisition unit 1704, a feature line detection unit 1705, a pair estimation unit 1706, a position calculation unit 1707, an error calculation unit 1708, a determination unit 1709, An output unit 1710 is included.

画像処理装置1701は、タブレット、ノート型PC、スマートデバイス等の携帯端末装置であってもよく、デスクトップ型PC等の情報処理装置であってもよい。   The image processing device 1701 may be a portable terminal device such as a tablet, a laptop PC, or a smart device, or may be an information processing device such as a desktop PC.

撮像装置1740は、例えば、カメラであり、物体を撮影して撮像画像1722を生成する。画像取得部1704は、撮像装置1740よって撮像された撮影画像1722を取得して、記憶部1721に格納する。記憶部1721は、撮像画像1722、3Dモデル1723、特徴線1725、3次元線分1726、対応線分ペア1727、粗パラメータ1728、指標1729及びパラメータ1730を記憶する。   The imaging device 1740 is, for example, a camera, and captures an object to generate a captured image 1722. The image acquisition unit 1704 acquires the photographed image 1722 captured by the imaging device 1740 and stores the acquired image in the storage unit 1721. The storage unit 1721 stores the captured image 172 2D model 1723, the feature line 1725, the three-dimensional line segment 1726, the corresponding line segment pair 1727, the rough parameter 1728, the index 1729, and the parameter 1730.

3Dモデル読込部1702は、撮影対象物に対応する3Dモデル1723を読み込み、記憶部1721に格納する。3Dモデル1723は、上述の通り、3次元形状情報の一例であって、物体の3次元形状を表す複数の頂点の頂点情報と、複数の線分の線分情報とを含む。頂点情報は、物体の各頂点の3次元座標を含み、線分情報は、各線分の両端の頂点を示す識別情報を含む。   The 3D model reading unit 1702 reads the 3D model 1723 corresponding to the imaging target, and stores the 3D model 1723 in the storage unit 1721. As described above, the 3D model 1723 is an example of three-dimensional shape information, and 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.

3次元線分抽出部1703は、3Dモデル1723における物体の輪郭線(3次元線分)を抽出し、3次元線分1726として記憶部1721に格納する。3次元線分抽出部1703は、上述の3次元線分抽出部602に対応する。   The three-dimensional line segment extraction unit 1703 extracts the outline (three-dimensional line segment) of the object in the 3D model 1723 and stores the outline as a three-dimensional line segment 1726 in the storage unit 1721. The three-dimensional line segment extraction unit 1703 corresponds to the three-dimensional line segment extraction unit 602 described above.

特徴線検出部1705は、エッジ検出処理を行って、撮影画像1722から複数のエッジ線を検出し、検出したエッジ線を特徴線1725として記憶部1721に格納する。特徴線検出部1705は、上述の特徴線抽出部603に対応する。   The feature line detection unit 1705 performs edge detection processing to detect a plurality of edge lines from the captured image 1722, and stores the detected edge lines in the storage unit 1721 as feature lines 1725. A feature line detection unit 1705 corresponds to the feature line extraction unit 603 described above.

ペア推定部1706は、検出した複数の特徴線から1つの特徴線と、抽出した複数の3次元線分から1つの3次元線分を選択して対応線分ペアを推定し、推定した対応線分ペアに基づいて他の対応線分ペアも推定する。本実施形態では、ペア推定部1706は、図7のステップ703〜ステップ708の処理を行って、N(ここで、N≧4)対の対応線分ペア1727を推定し、記憶部1721に記憶する。ペア推定部1706は、上述のペア推定部604に対応する。   The pair estimation unit 1706 selects one three-dimensional line segment from one of the detected feature lines and one of the extracted three-dimensional line segments, estimates a corresponding line segment pair, and estimates the corresponding line segment. Other corresponding line segment pairs are also estimated based on the pairs. In the present embodiment, the pair estimation unit 1706 performs the processing of step 703 to step 708 in FIG. 7 to estimate N (where N.gtoreq.4) pairs of corresponding line segment pairs 1727 and store them in the storage unit 1721. Do. The pair estimation unit 1706 corresponds to the above-described pair estimation unit 604.

位置計算部1707は、選択された対応線分ペアを用いてカメラの位置・姿勢の推定値(ここでの推定値は、誤差修正前の値なので、以下、「粗推定値」と称する)を算出する。すなわち、位置計算部1707は、N対の対応線分ペア1727を用いて、撮影画像1722を撮影したときの撮像装置1740の位置及び姿勢の粗推定値を計算し、計算した粗推定値を粗パラメータ1728として記憶部1721に格納する。   The position calculation unit 1707 estimates an estimated value of the position and orientation of the camera using the selected corresponding line segment pair (here, the estimated value is a value before error correction, and hereinafter, will be referred to as a “rough estimated value”). calculate. That is, the position calculation unit 1707 calculates rough estimation values of the position and orientation of the imaging device 1740 when the photographed image 1722 is photographed using N pairs of corresponding line segments 1727, and calculates the rough estimation values. It is stored in the storage unit 1721 as a parameter 1728.

このとき、位置計算部1707は、撮像装置1740の位置及び姿勢を表す粗推定値の変数を所定値ずつ変更しながら、各対応線分ペアに含まれる3次元線分を撮影画像1722上に投影することで、投影線を生成する。   At this time, the position calculation unit 1707 projects the three-dimensional line segment included in each corresponding line segment pair onto the captured image 1722 while changing the variable of the rough estimated value representing the position and orientation of the imaging device 1740 by a predetermined value. By doing this, a projection line is generated.

誤差計算部1708は、算出したカメラ位置姿勢の粗推定値に対して、特徴線と3次元線分を撮影画像に投影した投影線との誤差を算出する。すなわち、誤差計算部1708は、位置計算部1707が生成した投影線の位置と、その対応線分ペアに含まれる特徴線の位置との間のずれを表す誤差を計算する。そして、位置計算部1707は、誤差計算部1708が計算した誤差の総和が最小となる変数の値を、粗パラメータ1728として求める。   An error calculation unit 1708 calculates an error between a feature line and a projection line obtained by projecting a three-dimensional line segment on a captured image, with respect to the calculated rough estimated value of the camera position and orientation. That is, the error calculation unit 1708 calculates an error representing a deviation between the position of the projection line generated by the position calculation unit 1707 and the position of the feature line included in the corresponding line segment pair. Then, the position calculation unit 1707 obtains, as a coarse parameter 1728, a value of a variable that minimizes the total sum of the errors calculated by the error calculation unit 1708.

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

決定部1709は、ペア推定部1706、位置算出部1707、及び誤差計算部1708の処理を所定の回数もしくは所定の誤差未満になるまで繰り返し実行し、誤差が最小となるカメラ位置姿勢を推定値として決定する。   The determination unit 1709 repeatedly executes the processing of the pair estimation unit 1706, the position calculation unit 1707, and the error calculation unit 1708 until it becomes a predetermined number of times or less than a predetermined error, and uses the camera position and posture with the smallest error as an estimated value. decide.

すなわち、決定部1709は、粗パラメータ1728が計算される度に、その粗パラメータ1728が表す撮像装置1740の位置及び姿勢を用いて、位置計算部1707が選択したN個の対応線分ペアに含まれる3次元線分を撮影画像1722上に投影する。これにより、決定部1709は、N本の投影線を生成する。そして、決定部1709は、誤差計算部1708と同様にして、N本の投影線の位置とN本の特徴線の位置との間の誤差の総和を計算し、計算した誤差の総和を指標1729として記憶部1721に格納する。   That is, determination unit 1709 is included in the N corresponding line segment pairs selected by position calculation unit 1707 using the position and orientation of imaging device 1740 represented by rough parameter 1728 every time rough parameter 1728 is calculated. The three-dimensional line segment to be projected is projected onto the photographed image 1722. Thereby, the determination unit 1709 generates N projection lines. Then, the determination unit 1709 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 1708, and calculates the sum of the calculated errors as an index 1729. And stored in the storage unit 1721 as

次に、決定部1709は、それぞれの粗パラメータ1728を用いて計算した指標1729に基づいて、誤差の総和が最小となるN個の対応線分ペアを決定する。これらのN個の対応線分ペアは、対応付け結果に対応する。そして、決定部1709は、決定したN個の対応線分ペアを用いて、3次元空間内における撮像装置1740の位置及び姿勢を計算し、計算した位置及び姿勢をパラメータ1730として記憶部1721に格納する。   Next, the determination unit 1709 determines N pairs of corresponding line segments that minimize the sum of errors, based on the indices 1729 calculated using the respective rough parameters 1728. These N corresponding line segment pairs correspond to the association results. The determining unit 1709 then calculates the position and orientation of the imaging device 1740 in the three-dimensional space using the determined N corresponding line segment pairs, and stores the calculated position and orientation in the storage unit 1721 as the parameter 1730. Do.

位置計算部1707、誤差計算部1708及び決定部1709は、上述の視点推定部605に対応する。出力部1710は、パラメータ1730を処理結果として出力する。   The position calculation unit 1707, the error calculation unit 1708, and the determination unit 1709 correspond to the viewpoint estimation unit 605 described above. The output unit 1710 outputs the parameter 1730 as a processing result.

このような画像処理装置1701によれば、ユーザが選択操作を行うことなく、3Dモデル1723から検出された3次元線分と撮影画像1722から検出された特徴線との対応線分ペアを自動的に生成することができる。このとき、生成部1707によって、対応線分ペアの生成に用いる3次元線分及び特徴線が絞り込まれるため、総当たり計算を行う場合と比較して、少なくとも4対の対応線分ペアを決定するための計算量が大幅に削減される。   According to such an image processing apparatus 1701, a pair of corresponding line segments of a three-dimensional line segment detected from the 3D model 1723 and a feature line detected from the captured image 1722 is automatically performed without the user performing a selection operation. Can be generated. At this time, since the generation unit 1707 narrows down the three-dimensional line segment and the feature line used to generate the corresponding line segment pair, at least four pairs of corresponding line segment pairs are determined as compared with the case of performing round-robin calculation. The amount of computation for this is significantly reduced.

図18は、本実施形態(実施例1)におけるペア推定部の機能ブロック図である。ペア推定部1706は、特徴線選択部1801、3次元線分選択部1802、初期設定部1803、回転制御部1804、特徴線角度ヒストグラム生成部1805、投影線角度ヒストグラム生成部1806として機能する。さらに、ペア推定部1706は、ヒストグラム距離算出部1807、及び仮ペア判定部1808として機能する。   FIG. 18 is a functional block diagram of a pair estimation unit in the present embodiment (Example 1). The pair estimation unit 1706 functions as a feature line selection unit 1801, a three-dimensional line segment selection unit 1802, an initial setting unit 1803, a rotation control unit 1804, a feature line angle histogram generation unit 1805, and a projection line angle histogram generation unit 1806. Further, the pair estimation unit 1706 functions as a histogram distance calculation unit 1807 and a temporary pair determination unit 1808.

特徴線選択部1801は、特徴線抽出部1705により検出された複数の特徴線からいずれか1つの特徴線を選択する。3次元線分選択部1802は、3次元線分抽出部1703により抽出された複数の3次元線分からいずれか1つの3次元線分を選択する。   The feature line selection unit 1801 selects any one feature line from the plurality of feature lines detected by the feature line extraction unit 1705. The three-dimensional line segment selection unit 1802 selects any one three-dimensional line segment from the plurality of three-dimensional line segments extracted by the three-dimensional line segment extraction unit 1703.

初期設定部1803は、図9及び図10で説明したように、選択した3次元線分が選択した特徴線と同じ方向に見えるように、3Dモデル1723を回転させる。   The initial setting unit 1803 rotates the 3D model 1723 so that the selected three-dimensional line segment can be seen in the same direction as the selected feature line, as described with reference to FIGS. 9 and 10.

回転制御部1804は、図12で説明したように、選択した3次元線分の投影方向が変わらないように3Dモデル1723を回転させる。すなわち、回転制御部1804は、線分Lmdlを軸としておよび、線分Limgとカメラ視点とがなす平面の法線nを軸として、3Dモデル1723を所定角度ずつ回転させる。 The rotation control unit 1804 rotates the 3D model 1723 so that the projection direction of the selected three-dimensional line segment does not change, as described with reference to FIG. That is, the rotation control unit 1804 rotates the 3D model 1723 by a predetermined angle with the line segment L mdl as an axis and with the normal line n between the line segment L img and the camera viewpoint as an axis.

特徴線角度ヒストグラム生成部1805は、図7のステップ707で説明したように、特徴線抽出部1705により検出された複数の特徴線の方向(角度)についてのヒストグラムH1を算出する。   The feature line angle histogram generation unit 1805 calculates a histogram H1 for the direction (angle) of the plurality of feature lines detected by the feature line extraction unit 1705 as described in step 707 of FIG. 7.

投影線角度ヒストグラム生成部1806は、図7のステップ707で説明したように、複数の3次元線分により形成される3Dモデル1723を投影面に投影した場合の3Dモデルの投影線の方向(角度)についてのヒストグラムH2を算出する。   The projection line angle histogram generation unit 1806, as described in step 707 in FIG. 7, projects the direction (the angle of the projection line of the 3D model when the 3D model 1723 formed by the plurality of The histogram H2 for) is calculated.

ヒストグラム距離算出部1807は、図7のステップ707で説明したように、徴線の角度についてのヒストグラムH1と3Dモデルの投影線の方向(角度)のヒストグラムH2との距離を算出する。   The histogram distance calculation unit 1807 calculates the distance between the histogram H1 of the angle of the trace and the histogram H2 of the direction (angle) of the projection line of the 3D model as described in step 707 of FIG.

仮ペア判定部1808は、ヒストグラム間の距離から選択した3次元線分と選択した特徴線との組み合わせが正しい対応関係の可能性があるかを判定する。正しい対応関係の可能性がある場合には、仮ペア判定部1808は、その選択した3次元線分とその選択した特徴線との組み合わせを基準として、他の3次元線分の投影線の位置関係と特徴線との位置関係性をチェックして、仮対応線分ペアの正当性を判定する。   The provisional pair determination unit 1808 determines whether there is a possibility of a correct correspondence between a combination of a three-dimensional line segment selected from the distances between the histograms and the selected feature line. If there is a possibility of a correct correspondence, the temporary pair determination unit 1808 determines the position of the projection line of another three-dimensional line segment based on the combination of the selected three-dimensional line segment and the selected feature line. The positional relationship between the relationship and the feature line is checked to determine the correctness of the temporary corresponding line segment pair.

図19は、本実施形態(実施例1)における画像処理の具体例を示すフローチャートである。まず、3Dモデル読込部1702は、3Dモデル1723を読み込み、記憶部1721に格納する(ステップ1901)。3次元線分抽出部1703は、読み込んだ3Dモデル1723から複数の3次元線分1726を抽出する(ステップ1902)。   FIG. 19 is a flowchart showing a specific example of the image processing in the present embodiment (Example 1). First, the 3D model reading unit 1702 reads the 3D model 1723 and stores it in the storage unit 1721 (Step 1901). The three-dimensional line segment extraction unit 1703 extracts a plurality of three-dimensional line segments 1726 from the read 3D model 1723 (step 1902).

画像取得部1704は、撮像装置1740から撮影画像1722を取得する(ステップ1903)。特徴線検出部1705は、撮影画像1722から複数の特徴線1725を検出する(ステップ1904)。   The image acquisition unit 1704 acquires the captured image 1722 from the imaging device 1740 (step 1903). The feature line detection unit 1705 detects a plurality of feature lines 1725 from the captured image 1722 (step 1904).

ペア推定部1706(特徴線角度ヒストグラム生成部1805)は、図7のステップ707で説明したように、検出した各特徴線の方向(角度)を算出し、d(d:整数)度単位で、角度についてのヒストグラムH1を生成する(ステップ1905)。   The pair estimation unit 1706 (feature line angle histogram generation unit 1805) calculates the direction (angle) of each detected feature line as described in step 707 of FIG. A histogram H1 of angles is generated (step 1905).

ペア推定部1706は、対応線分ペアの推定処理を実行する(ステップ1906)。ステップ1906の詳細については、図20を用いて説明する。   The pair estimation unit 1706 executes an estimation process of the corresponding line segment pair (step 1906). The details of step 1906 will be described using FIG.

図20は、本実施形態(実施例1)における対応線分ペアの推定処理(ステップ1906)の詳細処理のフローチャートである。ペア推定部1706は、図9(b)に示すように、仮想的な空間において、適当な位置にカメラと、その視線上のおよその撮影距離に3Dモデル1723とを仮想的に配置する。   FIG. 20 is a flowchart of detailed processing of the corresponding line segment pair estimation process (step 1906) in the present embodiment (Example 1). As shown in FIG. 9B, the pair estimation unit 1706 virtually arranges the camera at an appropriate position in a virtual space, and the 3D model 1723 at an approximate shooting distance on the line of sight.

特徴線選択部1801は、ステップ1904で検出した特徴線の中から1本の特徴線Limgを選択する(ステップ2001)。3次元線分選択部1802は、ステップ1902で検出した3次元線分1726から1本の3次元線分Lmdlを選択する(ステップ2002)。 The feature line selection unit 1801 selects one feature line L img from the feature lines detected in step 1904 (step 2001). The three-dimensional line segment selecting unit 1802 selects one three-dimensional line segment L mdl from the three-dimensional line segment 1726 detected in step 1902 (step 2002).

初期設定部1803は、この選択した線分Limgと線分Lmdlとのペアを、仮対応線分ペアと設定する。初期設定部1803は、図7のステップ705で説明したように、線分Lmdlが投影面上で線分Limgと平行になるように、すなわち仮対応線分ペアの角度が一致するように、3Dモデル1723を回転させる(ステップ2003)。 The initial setting unit 1803 sets the pair of the selected line segment L img and the line segment L mdl as a temporary corresponding line segment pair. As described in step 705 of FIG. 7, the initial setting unit 1803 causes the line segment L mdl to be parallel to the line segment L img on the projection plane, that is, the angles of the temporary corresponding line segment pair coincide with each other. , 3D model 1723 is rotated (step 2003).

回転制御部1804は、図7のステップ706で説明したように、線分Lmdlを軸としておよび、線分Limgとカメラ視点とがなす平面の法線nを軸として、3Dモデル1723を所定角度ずつ回転させる。回転制御部1804は、3Dモデル1723を所定角度ずつ回転させる毎に、3Dモデル1723を投影面に投影させ、投影面上の全ての投影線の方向ベクトル(角度)を求める(ステップ2004)。 As described in step 706 of FIG. 7, the rotation control unit 1804 specifies the 3D model 1723 with the line segment L mdl as the axis and the normal line n of the plane formed by the line segment L img and the camera viewpoint as the axis. Rotate by angle. The rotation control unit 1804 projects the 3D model 1723 on the projection plane every time the 3D model 1723 is rotated by a predetermined angle, and obtains direction vectors (angles) of all projection lines on the projection plane (step 2004).

投影線角度ヒストグラム生成部1806は、図7のステップ707で説明したように、d(d:整数)度単位で、検出した各投影線の角度についてのヒストグラムH2を生成する(ステップ2005)。   The projection line angle histogram generation unit 1806 generates a histogram H2 about the detected angle of each projection line in d (d: integer) degree units as described in step 707 of FIG. 7 (step 2005).

ヒストグラム距離算出部1807は、図7のステップ707で説明したように、特徴線の角度についてのヒストグラムH1と、投影線の角度についてのヒストグラムH2との間の距離を算出する(ステップ2006)。   The histogram distance calculation unit 1807 calculates the distance between the histogram H1 of the feature line angle and the histogram H2 of the projection line angle as described in step 707 of FIG. 7 (step 2006).

仮ペア判定部1808は、採用した距離の算出方法に応じて、算出された距離を評価する。例えば、採用した距離の算出方法がマンハッタン距離算出法やユークリッド距離算出法であるとする。このとき、算出された距離が閾値以下である場合には、仮ペア判定部1808は、仮対応線分ペアは対応線分ペアの可能性があると判定する(ステップ2007で「YES」)。算出された距離が閾値より大きい場合には、仮ペア判定部1808は、仮対応線分ペアは対応線分ペアの可能性がないと判定する(ステップ2007で「NO」)。   The temporary pair determination unit 1808 evaluates the calculated distance in accordance with the adopted method of calculating the distance. For example, it is assumed that the adopted distance calculation method is the Manhattan distance calculation method or the Euclidean distance calculation method. At this time, if the calculated distance is equal to or less than the threshold value, the temporary pair determination unit 1808 determines that the temporary corresponding line segment pair has a possibility of a corresponding line segment pair (“YES” in step 2007). If the calculated distance is larger than the threshold value, the temporary pair determination unit 1808 determines that the temporary corresponding line segment pair has no possibility of the corresponding line segment pair (“NO” in step 2007).

また、例えば、採用した距離の算出方法がヒストグラム交差法であるとする。このとき、算出された距離が閾値以上である場合には、仮ペア判定部1808は、仮対応線分ペアは対応線分ペアの可能性があると判定する(ステップ2007で「YES」)。算出された距離が閾値未満の場合には、仮ペア判定部1808は、仮対応線分ペアは対応線分ペアの可能性がないと判定する(ステップ2007で「NO」)。   Also, for example, it is assumed that the adopted method of calculating the distance is the histogram crossing method. At this time, if the calculated distance is equal to or larger than the threshold, the temporary pair determination unit 1808 determines that the temporary corresponding line segment pair has a possibility of a corresponding line segment pair (“YES” in step 2007). If the calculated distance is less than the threshold value, the temporary pair determination unit 1808 determines that the temporary corresponding line segment pair has no possibility of the corresponding line segment pair (“NO” in step 2007).

仮対応線分ペアは対応線分ペアの可能性があると判定された場合、仮ペア判定部1808は、他の3対の対応線分ペアを推定する(ステップ2008)。ステップ2008については、図21で説明する。   If it is determined that the temporary corresponding line segment pair is likely to be a corresponding line segment pair, the temporary pair determination unit 1808 estimates three other corresponding line pair pairs (step 2008). Step 2008 will be described with reference to FIG.

仮対応線分ペアは対応線分ペアの可能性がないと判定された場合(ステップ2007で「NO」)、ステップ2008の処理により計4対の対応線分ペアが見つからなかった場合(ステップ2009で「NO」)、ステップ2010の処理が行われる。すなわち、仮ペア判定部1808は、3Dモデル1723を回転させた場合の全ての位置について、ステップ2003以降の処理が済んだかを判定する。3Dモデル1723を回転させた場合の全ての位置とは、図12で説明したように、3次元線分Lmdlを軸として、線分Limgとカメラ視点とがなす平面の法線nを軸として、各軸について3Dモデル1723を、例えば1度ずつ回転させて場合の全ての位置を表す。 If it is determined that there is no possibility of a corresponding line segment pair ("NO" in step 2007), a total of four pairs of corresponding line segment pairs can not be found by the processing of step 2008 (step 2009). And the process of step 2010 is performed. That is, the temporary pair determination unit 1808 determines whether or not the processing after step 2003 has been completed for all positions when the 3D model 1723 is rotated. With all the positions when the 3D model 1723 is rotated, as described in FIG. 12, the normal line n of the plane formed by the line segment L img and the camera viewpoint with the three-dimensional line segment L mdl as an axis is an axis The 3D model 1723 is rotated about each axis, for example, one degree at a time, to represent all positions.

3Dモデル1723を回転させた場合の全ての位置について処理が完了していない場合(ステップ2010で「NO」)、回転制御部1804は、処理が完了していない位置に3Dモデル1723を回転させる(ステップ2003)。   When the process is not completed for all the positions when the 3D model 1723 is rotated (“NO” in step 2010), the rotation control unit 1804 rotates the 3D model 1723 to a position where the process is not completed ( Step 2003).

計4対の対応線分ペアが見つからない場合に、3Dモデル1723を回転させた場合の全ての位置について処理が完了するまで、仮ペア判定部1808は、ステップ2003〜ステップ2010の処理を繰り返す。   If a total of four pairs of corresponding line segment pairs can not be found, the temporary pair determination unit 1808 repeats the processing of step 2003 to step 2010 until the processing is completed for all positions when the 3D model 1723 is rotated.

3Dモデル1723を回転させた場合の全ての位置について処理が完了した場合(ステップ2010で「YES」)、仮ペア判定部1808は、未選択の3次元線分があるかを判定する(ステップ2011)。未選択の3次元線分がある場合には(ステップ2011で「YES」)、3次元線分選択部1802は、その未選択の3次元線分の中から1本を選択して、ステップ2002以降の処理を行う。   When the processing is completed for all the positions when the 3D model 1723 is rotated (“YES” in step 2010), the temporary pair determination unit 1808 determines whether there is an unselected three-dimensional line segment (step 2011). ). If there is an unselected three-dimensional line segment (“YES” in step 2011), the three-dimensional line segment selecting unit 1802 selects one of the unselected three-dimensional line segments, and step 2002 Perform the following processing.

計4対の対応線分ペアが見つからない場合に、全ての3次元線分について処理が完了するまで、仮ペア判定部1808は、ステップ2002〜ステップ2011の処理を繰り返す。   If a total of four pairs of corresponding line segment pairs are not found, the temporary pair determination unit 1808 repeats the processes of step 2002 to step 2011 until the process is completed for all three-dimensional line segments.

計4対の対応線分ペアが見つからない場合に、全ての3次元線分について処理が完了した場合(ステップ2011で「NO」)、特徴線選択部1801は、未選択の特徴線の中から1本を選択して、ステップ2001以降の処理を行う。   When processing for all three-dimensional line segments is completed when a total of four pairs of corresponding line segment pairs are not found (“NO” in step 2011), the feature line selection unit 1801 selects one of the unselected feature lines. One is selected, and the processing after step 2001 is performed.

計4対の対応線分ペアが見つからない場合に、全ての特徴線について処理が完了するまで、仮ペア判定部1808は、ステップ2001〜ステップ2011の処理を繰り返す。   If a total of four pairs of corresponding line segment pairs can not be found, the temporary pair determination unit 1808 repeats the processes of steps 2001 to 2011 until the process is completed for all feature lines.

計4対の対応線分ペアが見つかった場合(ステップ2009で「YES」)、ペア推定部1706は、本フローを終了する。   If a total of four pairs of corresponding line segments are found (“YES” in step 2009), the pair estimation unit 1706 ends this flow.

図21は、本実施形態(実施例1)における他の3対の対応線分ペアを推定する処理(ステップ2008)の詳細処理のフローチャートである。ステップ2002で設定した仮対応線分ペアは特徴線Limgと3次元線分Lmdlで形成されている。ここで、図21の説明の便宜上、特徴線Limgを第1の特徴線といい、3次元線分Lmdlの投影線を第1の投影線という。また、特徴線Limgと3次元線分Lmdlとのペア、すなわち対応線分ペアの可能性があると判定された仮対応線分ペアを、第1の対応線分ペアと称する。 FIG. 21 is a flowchart of a detailed process of the process (step 2008) of estimating another three pairs of corresponding line segment pairs in the present embodiment (Example 1). The temporary corresponding line segment pair set in step 2002 is formed of the feature line L img and the three-dimensional line segment L mdl . Here, for convenience of description of FIG. 21, the feature line L img is referred to as a first feature line, and the projection line of the three-dimensional line segment L mdl is referred to as a first projection line. Further, a pair of the feature line L img and the three-dimensional line segment L mdl , that is, a temporary corresponding line segment pair determined to have a possibility of a corresponding line segment pair is referred to as a first corresponding line segment pair.

仮ペア判定部1808は、ステップ2004で得られた3Dモデル1723の投影線の中から(但し、第1の投影線を除く)、エッジの角度が特徴線と一致している投影線を第2の投影線として選択する(ステップ2101)。   Among the projection lines of the 3D model 1723 obtained in step 2004 (except for the first projection line), the temporary pair determination unit 1808 performs a second projection line whose edge angle matches the feature line. It selects as a projection line of (step 2101).

仮ペア判定部1808は、ステップ1904で検出した特徴線の中から(但し、第1の特徴線を除く)、ステップ2101で選択した投影線と角度が一致する特徴線を第2の特徴線として選択する(ステップ2102)。このとき、仮ペア判定部1808は、第2の特徴線と、第2の投影線に対応する3次元線分とのペアを第2の対応線分ペアと推定する。   The temporary pair determination unit 1808 sets, as a second feature line, a feature line whose angle coincides with the projection line selected in step 2101 out of the feature lines detected in step 1904 (except for the first feature line). The selection is made (step 2102). At this time, the temporary pair determination unit 1808 estimates a pair of the second feature line and the three-dimensional line segment corresponding to the second projection line as a second corresponding line segment pair.

仮ペア判定部1808は、スケーリング調整処理を行う(ステップ2103)。カメラのZ方向は暫定値を用いてこれまで処理を行っていたので、ペア推定部1706は、3Dモデルの投影サイズを調整する。   The temporary pair determination unit 1808 performs scaling adjustment processing (step 2103). Since the Z direction of the camera has been processed using provisional values so far, the pair estimation unit 1706 adjusts the projection size of the 3D model.

仮ペア判定部1808は、ステップ2004で得られた3Dモデル1723の投影線の中から(但し、第1の投影線及び第2の投影線を除く)、エッジの角度が特徴線と一致している投影線を第3の投影線として選択する(ステップ2104)。   The temporary pair determination unit 1808 determines that the angle of the edge matches the feature line from among the projection lines of the 3D model 1723 obtained in step 2004 (except for the first projection line and the second projection line). The projection line existing is selected as a third projection line (step 2104).

仮ペア判定部1808は、ステップ1904で検出した特徴線の中から(但し、第1の特徴線及び第2の特徴線を除く)、第3の投影線と角度及び位置が適合する特徴線、すなわち第3の特徴線があるかを判定する(ステップ2105)。   The temporary pair determination unit 1808 selects a feature line whose angle and position match the third projection line out of the feature lines detected in step 1904 (except for the first feature line and the second feature line). That is, it is determined whether there is a third feature line (step 2105).

第3の特徴線がない場合(ステップ2105で「NO」)、仮ペア判定部1808は、未選択の投影線について、ステップ2101以降の処理を行う。すなわち、仮ペア判定部1808は、未選択の投影線の中から(但し、第1の投影線を除く)、エッジの角度が特徴線と一致している投影線を第2の投影線として選択し(ステップ2101)、上記と同様に処理を繰り返す。   If there is no third feature line (“NO” in step 2105), the temporary pair determination unit 1808 performs the process of step 2101 and subsequent steps on the unselected projection lines. That is, the temporary pair determination unit 1808 selects a projection line whose edge angle matches the feature line as a second projection line from among the unselected projection lines (except for the first projection line). Then (step 2101), the process is repeated as described above.

第3の特徴線がある場合(ステップ2105で「YES」)、仮ペア判定部1808は、第3の特徴線と、第3の投影線に対応する3次元線分とのペアを第3の対応線分ペアと推定する。   If there is a third feature line (“YES” in step 2105), the temporary pair determination unit 1808 generates a third pair of the third feature line and the three-dimensional line segment corresponding to the third projection line. Estimate as corresponding line pair.

それから、仮ペア判定部1808は、ステップ2004で得られた3Dモデル1723の投影線の中から(但し、第1〜第3の投影線を除く)、エッジの角度及び位置が特徴線と適合している投影線を第4の投影線として選択する(ステップ2106)。   Then, from among the projection lines of the 3D model 1723 obtained in step 2004 (except for the first to third projection lines), the temporary pair determination unit 1808 matches the angle and position of the edge with the feature line. The selected projection line is selected as a fourth projection line (step 2106).

仮ペア判定部1808は、ステップ1904で検出した特徴線の中から(但し、第1〜第3の特徴線を除く)、第4の投影線と角度及び位置が適合する特徴線、すなわち第4の特徴線があるかを判定する(ステップ2107)。   The temporary pair determination unit 1808 selects a feature line whose angle and position match the fourth projection line from among the feature lines detected in step 1904 (except for the first to third feature lines), that is, the fourth feature line It is determined whether there is a feature line of (step 2107).

第4の特徴線がある場合(ステップ2107で「YES」)、仮ペア判定部1808は、第4の特徴線と、第4の投影線に対応する3次元線分とのペアを第4の対応線分ペアと推定する。この場合、仮ペア判定部1808は、計4対の対応線分ペアが存在すると判定する(ステップ2110)。   If there is a fourth feature line (“YES” in step 2107), the temporary pair determination unit 1808 generates a fourth pair of the fourth feature line and the three-dimensional line segment corresponding to the fourth projection line. Estimate as corresponding line pair. In this case, the temporary pair determination unit 1808 determines that there are a total of four pairs of corresponding line segments (step 2110).

第4の特徴線がない場合(ステップ2107で「NO」)、仮ペア判定部1808は、未選択の投影線について、ステップ2101以降の処理を行う(ステップ2108で「NO」)。すなわち、仮ペア判定部1808は、未選択の投影線の中から(但し、第1の投影線を除く)、エッジの角度が特徴線と一致している投影線を第2の投影線として選択し(ステップ2101)、上記と同様に処理を繰り返す。全ての投影線(但し、第1の投影線を除く)について、ステップ2101〜ステップ2108の処理を行う。   If there is no fourth feature line (“NO” in step 2107), the temporary pair determination unit 1808 performs the process of step 2101 and subsequent steps on the unselected projection lines (“NO” in step 2108). That is, the temporary pair determination unit 1808 selects a projection line whose edge angle matches the feature line as a second projection line from among the unselected projection lines (except for the first projection line). Then (step 2101), the process is repeated as described above. The processing of steps 2101 to 2108 is performed for all projection lines (except for the first projection line).

全ての投影線(但し、第1の投影線を除く)について、ステップ2101〜ステップ2108の処理が完了した場合(ステップ2108で「YES」)、仮ペア判定部1808は、計4対の対応線分ペアが存在しないと判定する(ステップ2109)。   When the processing of step 2101 to step 2108 is completed for all projection lines (except for the first projection line) (“YES” in step 2108), the temporary pair determination unit 1808 determines a total of four pairs of corresponding lines. It is determined that a minute pair does not exist (step 2109).

図19の説明に戻る。対応線分ペアの推定処理(ステップ1906)後、位置計算部1707は、N(本実施例ではN=4)対の対応線分ペア1727を用いて粗カメラ位置姿勢を示すパラメータ(以下、「粗パラメータ」と称する)を算出する(ステップ1907)。粗カメラ位置姿勢とは、誤差を含むカメラ位置姿勢を示す。   It returns to the explanation of FIG. After the corresponding line segment pair estimation process (step 1906), the position calculation unit 1707 uses the N (corresponding to N = 4 in the present embodiment) corresponding line segment pair 1727 to indicate a rough camera position and orientation (hereinafter referred to as “ The rough parameter (referred to as “coarse parameter”) is calculated (step 1907). The coarse camera position attitude indicates a camera position attitude including an error.

図22は、本実施形態(実施例1)における対応線分ペアの例を示す図である。この例では、3次元線分2211〜3次元線分2214が特徴線2201〜特徴線2204とそれぞれ対応付けられて、4個の対応線分ペアが形成されている。   FIG. 22 is a diagram showing an example of the corresponding line segment pair in the present embodiment (Example 1). In this example, a three-dimensional line segment 2211 to a three-dimensional line segment 2214 are respectively associated with the feature line 2201 to the feature line 2204 to form four corresponding line segment pairs.

ステップ1907において、位置計算部1707は、例えば、最小二乗法を用いて粗パラメータ1728を計算することができる。この場合、位置計算部1707は、撮像装置1740の位置及び姿勢を表す変数を所定値ずつ変更しながら、各対応線分ペアに含まれる3次元線分を撮影画像1722上に投影することで、投影線を生成する。   In step 1907, the position calculation unit 1707 can calculate the coarse parameter 1728 using, for example, the least squares method. In this case, the position calculation unit 1707 projects three-dimensional line segments included in each corresponding line segment pair onto the captured image 1722 while changing variables representing the position and orientation of the imaging device 1740 by predetermined values. Generate a projection line.

誤差計算部1708は、投影線の位置と、その対応線分ペアに含まれる特徴線の位置との誤差Ei(i=1〜N)を評価し、4個の対応線分ペアに対する二乗誤差の総和Eが最小となる変数の値を、粗パラメータ1728として求める。二乗誤差の総和Eは、次式(11)により計算される。   The error calculation unit 1708 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 line segment pair, and calculates the square error of four corresponding line segment pairs. The value of the variable that minimizes the sum E is determined as a coarse parameter 1728. The sum E of squared errors is calculated by the following equation (11).

誤差計算部1708は、例えば、図23または図24に示すような方法で、誤差Eiを計算することができる。図23は、投影線と特徴線との間の領域の面積に基づく計算方法の例を示している。i番目の対応線分ペアに含まれる投影線が線分2301であり、特徴線が線分2302である場合、線分2301の両端と線分2302の両端とをそれぞれ結ぶ線分2303及び線分2304を定義することができる。この場合、線分2301〜線分2304によって囲まれた領域の面積Aiを、誤差Eiとして用いることができる。   The error calculator 1708 can calculate the error Ei, for example, by the method shown in FIG. 23 or 24. FIG. 23 shows an example of a calculation method based on the area of the region between the projection line and the feature line. When the projection line included in the i-th corresponding line pair is a line segment 2301 and the feature line is a line segment 2302, a line segment 2303 and a line segment respectively connecting both ends of the line segment 2301 and both ends of the line segment 2302 2304 can be defined. In this case, the area Ai of the region surrounded by the line segments 2301 to 2304 can be used as the error Ei.

Ei=Ai (12) Ei = Ai (12)

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

図24は、投影線と特徴線との間の距離に基づく計算方法の例を示している。線分2302の両端から線分2301上へ下ろした垂線2401及び垂線2402の長さを、それぞれ、Li1及びLi2とする。この場合、Li1及びLi2の和を、誤差Eiとして用いることができる。   FIG. 24 shows an example of a calculation method based on the distance between the projection line and the feature line. Let the lengths of the perpendicular 2401 and the perpendicular 2402 dropped onto the line segment 2301 from both ends of the line segment 2301 be Li1 and Li2, respectively. In this case, the sum of Li1 and Li2 can be used as the error Ei.

Ei=Li1+Li2 (13) Ei = Li1 + Li2 (13)

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

次に、決定部1709は、粗パラメータ1728が表す撮像装置1740の位置及び姿勢を用いて、N個の対応線分ペアに含まれる3次元線分を撮影画像1722上に投影することで、N本の投影線を生成する(ステップ1908)。   Next, the determination unit 1709 uses the position and orientation of the imaging device 1740 represented by the coarse parameter 1728 to project a three-dimensional line segment included in the N corresponding line segment pairs onto the captured image 1722 to obtain N. A projection line of a book is generated (step 1908).

次に、決定部1709は、N本の投影線の位置とN本の特徴線の位置との間の誤差の総和を表す指標1729を計算し(ステップ1909)、指標1729の計算を所定回数行ったか否かをチェックする(ステップ1910)。指標1729の計算を所定回数行っていない場合(ステップ1910で「No」)、位置計算部1707は、N個の対応線分ペアの選択を変更し(ステップ1906)、画像処理装置1701は、ステップ1907以降の処理を繰り返す。   Next, the determination unit 1709 calculates an index 1729 representing the sum of errors between the positions of the N projection lines and the positions of the N feature lines (step 1909), and performs calculation of the index 1729 a predetermined number of times. Whether or not it is checked (step 1910). When the index 1729 has not been calculated a predetermined number of times (“No” in step 1910), the position calculation unit 1707 changes the selection of N corresponding line segment pairs (step 1906), and the image processing apparatus 1701 The process after 1907 is repeated.

指標1729の計算を所定回数行った場合(ステップ1910で「Yes」)、決定部1709は、誤差の総和が最小となるN個の対応線分ペアを選択する(ステップ1911)。そして、決定部1709は、それらの対応線分ペアに基づいてカメラ位置姿勢を示すパラメータ(以下、「パラメータ」と称する)1730を計算する(ステップ1912)。そして、出力部1710は、選択されたN個の対応線分ペア及びパラメータ1730を出力する(ステップ1913)。   When the index 1729 has been calculated a predetermined number of times (“Yes” in step 1910), the determination unit 1709 selects N corresponding line segment pairs that minimize the sum of errors (step 1911). Then, the determination unit 1709 calculates a parameter (hereinafter, referred to as “parameter”) 1730 indicating the camera position and orientation based on the corresponding line segment pair (step 1912). Then, the output unit 1710 outputs the selected N corresponding line segment pairs and the parameter 1730 (step 1913).

本実施形態の画像処理によれば、N個の対応線分ペアの選択を自動的に変更しながら指標1729の計算を繰り返すことで、誤差の総和が最小となるN個の対応線分ペアを求めることができる。これにより、ユーザによる選択操作の作業時間が削減され、処理時間が短縮されるとともに、撮像装置1740の位置及び姿勢の推定精度が向上する。   According to the image processing of the present embodiment, by repeating the calculation of the index 1729 while automatically changing the selection of the N corresponding line segment pairs, the N corresponding line segment pairs for which the total sum of the errors is minimized It can be asked. 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 1740 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 optimum N corresponding line segment pairs without being a skilled person, it is possible to expand the types of work and the target person to which the correspondence result is applied.

なお、図19のステップ1910において、画像処理装置1701は、指標1729の計算を所定回数行った場合に繰り返し処理を打ち切る代わりに、指標1729が表す誤差が所定値よりも小さくなった場合に繰り返し処理を打ち切ってもよい。   In step 1910 of FIG. 19, the image processing apparatus 1701 repeatedly performs the process when the error represented by the index 1729 is smaller than a predetermined value, instead of terminating the process repeatedly when the calculation of the index 1729 is performed a predetermined number of times. You may

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

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

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

そこで、このような対応付けを禁止するために、決定部1709は、次のような条件を満たすN個の対応線分ペアの中から、誤差の総和が最小となるN個の対応線分ペアを選択してもよい。   Therefore, in order to prohibit such correspondence, the determination unit 1709 selects N corresponding line segment pairs for which the sum of errors is minimized among N corresponding line segment pairs satisfying the following conditions. May be selected.

(C11)N本の投影線のうち、所定の割合の投影線が撮像画像1722内に含まれている。
(C12)N本の投影線のうち、所定の割合の投影線が撮像画像1722内の所定位置の近傍に存在する。
(C13)撮像画像1722の面積に対するN本の投影線の分布範囲の割合が所定値以上である。
(C11) Among the N projection lines, a projection line of a predetermined ratio is included in the captured image 1722.
(C12) Of the N projection lines, a projection line of a predetermined ratio is present in the vicinity of a predetermined position in the captured image 1722.
(C13) The ratio of the distribution range of N projection lines to the area of the captured image 1722 is equal to or more than a predetermined value.

図26は、粗パラメータ1728の計算に適していない3次元線分の例を示す図である。図26(a)は、互いに平行な4本の3次元線分を示している。4本の3次元線分が平行である場合、矢印2601の方向に3次元線分を並行移動させても誤差が変化せず、3次元線分の位置を固定することが困難になることがある。   FIG. 26 is a diagram showing an example of a three-dimensional line segment not suitable for calculation of the coarse parameter 1728. FIG. 26 (a) shows four three-dimensional line segments parallel to one another. When four three-dimensional line segments are parallel, the error does not change even if the three-dimensional line segment is parallelly moved in the direction of arrow 2601, and it becomes difficult to fix the position of the three-dimensional line segment. is there.

図26(b)は、同一直線上に存在する2本の3次元線分を示している。2本の3次元線分が同一直線上に存在する場合、矢印2602の方向に3次元線分を拡大又は縮小させても誤差が変化せず、スケールを固定することが困難になることがある。   FIG. 26B shows two three-dimensional line segments existing on the same straight line. When two three-dimensional line segments exist on the same straight line, the error does not change even if the three-dimensional line segment is enlarged or reduced in the direction of arrow 2602, and it may be difficult to fix the scale. .

そこで、図9のステップ906において、ペア推定部1706は、次のような条件を満たすN本の3次元線分を選択して、N個の対応線分ペアを生成してもよい。   Therefore, in step 906 of FIG. 9, the pair estimation unit 1706 may select N three-dimensional line segments that satisfy the following conditions to generate N corresponding line segment pairs.

(C21)N本の3次元線分のうち少なくとも2本の3次元線分は平行ではない。
(C22)N本の3次元線分のうちいずれの2本の3次元線分も同一直線上に存在しない。
(C21) At least two of the N three-dimensional line segments are not parallel.
(C22) Any two of the N three-dimensional line segments do not exist on the same straight line.

同様の理由から、ペア推定部1706は、次のような条件を満たすN本の特徴線を選択して、N個の対応線分ペアを生成してもよい。   For the same reason, the pair estimation unit 1706 may select N feature lines that satisfy the following conditions to generate N corresponding line segment pairs.

(C31)N本の特徴線のうち少なくとも2本の特徴線は平行ではない。
(C32)N本の特徴線のうちいずれの2本の特徴線も同一直線上に存在しない。
(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.

次に、本実施形態(実施例2)について説明する。実施例1では、対応線分ペアの推定処理(ステップ1906)において、対応線分ペアを見つけるに際し、特徴線及び3次元線分を順次検索した。それに対して、実施例2では、より適切な対応線分ペアが得られる期待値を上げると共に、より早く対応線分ペアが得られるように、特徴線及び3次元線分を選択する。   Next, the present embodiment (Example 2) will be described. In the first embodiment, in the corresponding line segment pair estimation process (step 1906), when finding the corresponding line segment pair, the feature line and the three-dimensional line segment are sequentially searched. On the other hand, in the second embodiment, the characteristic line and the three-dimensional line segment are selected so that the corresponding line segment pair can be obtained more quickly while increasing the expected value that can obtain a more appropriate corresponding line segment pair.

実施例2の画像処理装置は、図17の画像処理装置のペア推定部1706の機能が一部相違し、それ以外の構成、機能及び処理は、特段の言及がない限り、実施例1と同じである。また、実施例2において、実施例1と同様の構成、機能及び処理については、同一の符号で示し、その説明を省略する。   The image processing apparatus of the second embodiment is the same as that of the first embodiment except that the functions of the pair estimation unit 1706 of the image processing apparatus of FIG. 17 are partially different, and the other configurations, functions, and processes are not particularly mentioned. It is. Further, in the second embodiment, configurations, functions and processes similar to those of the first embodiment are denoted by the same reference numerals, and the description thereof is omitted.

図27は、本実施形態(実施例2)におけるペア推定部の機能ブロック図である。図27は、図18のペア推定部の機能ブロック図に、特徴線グループ作成部2703、3次元線分グループ作成部2704が追加され、特徴線選択部1801が特徴線選択部2701に置換され、3次元選択部1802が3次元選択部2702に置換されている。   FIG. 27 is a functional block diagram of a pair estimation unit in the present embodiment (Example 2). 27, a feature line group creation unit 2703 and a three-dimensional line segment group creation unit 2704 are added to the functional block diagram of the pair estimation unit of FIG. 18, and the feature line selection unit 1801 is replaced by the feature line selection unit 2701. Three-dimensional selection unit 1802 is replaced with three-dimensional selection unit 2702.

特徴線グループ作成部2701は、図19のステップ1904において検出された特徴線を、同一方向(平行)のもの同士でグループ化する。このとき、同一方向の程度に関しては、一定の誤差は許容されるものとする。グループ化された特徴線を特徴線グループと称する。   The feature line group creation unit 2701 groups the feature lines detected in step 1904 of FIG. 19 in the same direction (parallel). At this time, with respect to the degree of the same direction, a constant error is tolerable. The grouped feature lines are referred to as feature line groups.

3次元線分グループ作成部2704は、図19のステップ1902において検出された3次元線分を、同一方向(平行)のもの同士でグループ化する。グループ化された3次元線分を3次元線分グループと称する。   The three-dimensional line segment group creation unit 2704 groups the three-dimensional line segments detected in step 1902 of FIG. 19 together in the same direction (parallel). The grouped three-dimensional line segments are referred to as three-dimensional line segment groups.

特徴線選択部2701は、特徴線グループ内の特徴線の数が多い特徴線グループから選択する。特徴線選択部2701は、選択した特徴線グループに含まれるすべての特徴線の長さが所定の範囲内である場合には、選択した特徴線グループにおいて外側から特徴線を選択する。特徴線選択部2701は、選択した特徴線グループに含まれるいずれかの特徴線の長さが所定の範囲を超える場合には、選択した特徴線グループから最も長い特徴線を選択する。   The feature line selection unit 2701 selects a feature line group having a large number of feature lines in the feature line group. The feature line selection unit 2701 selects a feature line from the outside in the selected feature line group when the lengths of all feature lines included in the selected feature line group are within a predetermined range. If the length of any feature line included in the selected feature line group exceeds a predetermined range, the feature line selection unit 2701 selects the longest feature line from the selected feature line group.

3次元選択部2702は、複数の3次元線分グループから、選択された特徴線グループに含まれる特徴線の数以上でより近い数の3次元線分を含む3次元線分グループが1つの場合には、その1つの3次元線分グループを選択する。3次元選択部2702は、特徴線の数以上でより近い数の3次元線分を含む3次元線分グループが複数存在する場合には最も長い3次元線分を含む3次元線分グループを選択する。3次元選択部2702は、特徴線の数以上の3次元線分を含む3次元線分グループが存在しない場合には、選択された特徴線グループに含まれる特徴線の数未満でより近い数の3次元線分を含む3次元線分グループを選択する。3次元選択部2702は、選択した3次元線分グループから最も長い3次元線分を選択する。   The three-dimensional selection unit 2702 selects one three-dimensional line segment group including a number of three-dimensional line segments closer in number to the number of feature lines included in the selected feature line group from among a plurality of three-dimensional line segment groups. , Select one of the three-dimensional line segment groups. The three-dimensional selection unit 2702 selects the three-dimensional line segment group including the longest three-dimensional line segment, when there are a plurality of three-dimensional line segment groups including three or more near-numbered three-dimensional line segments. Do. If there is no three-dimensional line segment group including three-dimensional line segments equal to or more than the number of feature lines, the three-dimensional selection unit 2702 selects a closer number of feature lines less than the number of feature lines included in the selected feature line group. Select 3D line segment group including 3D line segments. The three-dimensional selection unit 2702 selects the longest three-dimensional line segment from the selected three-dimensional line segment group.

なお、ヒストグラム距離で仮対応が否定された場合、仮ペア判定部1808は、他の3次元線分グループから次の仮対応線分ペアを選択する。仮ペア判定部1808は、他の対応線分ペアが見つからず仮対応が否定された場合、仮ペア判定部1808は、同一の3次元線分グループの3次元線分で近傍の回転角の方向ベクトル分布から対応線分ペアを探索する。   When the temporary correspondence is denied by the histogram distance, the temporary pair determination unit 1808 selects the next temporary corresponding line segment pair from other three-dimensional line segment groups. If another corresponding line segment pair is not found and the temporary correspondence is denied, the temporary pair determination unit 1808 determines the direction of the rotation angle in the vicinity of the three-dimensional line segment of the same three-dimensional line segment group. Find the corresponding segment pair from the vector distribution.

図28は、本実施形態(実施例2)における画像処理の具体例を示すフローチャートである。図28のフローチャートは、図19のフローチャートに、ステップ2801及びステップ2802を追加したものである。   FIG. 28 is a flowchart showing a specific example of the image processing in the present embodiment (example 2). The flowchart of FIG. 28 is obtained by adding steps 2801 and 2802 to the flowchart of FIG.

ステップ1901〜ステップ1905の処理後、特徴線グループ作成部2701は、図19のステップ1904において検出された特徴線を、同一方向(平行)のもの同士でグループ化する(ステップ2801)。このとき、同一方向の程度に関しては、一定の誤差は許容されるものとする。   After the processing of steps 1901 to 1905, the feature line group creating unit 2701 groups the feature lines detected in step 1904 of FIG. 19 in the same direction (parallel) (step 2801). At this time, with respect to the degree of the same direction, a constant error is tolerable.

3次元線分グループ作成部2704は、図19のステップ1902において検出された3次元線分を、同一方向(平行)のもの同士でグループ化する(ステップ2802)。   The three-dimensional line segment group creation unit 2704 groups the three-dimensional line segments detected in step 1902 of FIG. 19 together in the same direction (parallel) (step 2802).

その後、ステップ1906以降の処理を行う。但し、実施例2では、ステップ1906の処理内のステップ2001及びステップ2002について改良されているので、以下ではこれらについて説明する。   Thereafter, the processing of step 1906 and thereafter is performed. However, in the second embodiment, since step 2001 and step 2002 in the process of step 1906 are improved, these will be described below.

図29は、本実施形態(実施例2)における特徴線選択(ステップ2001)の詳細フローチャートである。図29は、図20の特徴線選択(ステップ2001)を詳細にしたフローチャートである。   FIG. 29 is a detailed flowchart of feature line selection (step 2001) in the present embodiment (Example 2). FIG. 29 is a flowchart detailing feature line selection (step 2001) of FIG.

特徴線選択部2701は、未選択の特徴線グループのうち、特徴線を最も多く保有している特徴線グループを選択する(ステップ2901)。   The feature line selection unit 2701 selects a feature line group having the largest number of feature lines among the unselected feature line groups (step 2901).

特徴線選択部2701は、選択した特徴線グループに含まれる特徴線同士の長さが同じ程度であるか否かを判定する(ステップ2902)。例えば、選択した特徴線グループに含まれる特徴線の長さの標準偏差を算出して、全ての特徴線の長さが所定の範囲以内に収まる場合には、特徴線選択部2701は、全ての特徴線の長さは同程度であると判定する。例えば、選択した特徴線グループに含まれる特徴線の長さの標準偏差を算出して、選択した特徴線グループに含まれる全ての特徴線の長さが所定の範囲以内に収まらない場合には、特徴線選択部2701は、全ての特徴線の長さは同程度でないと判定する。   The feature line selection unit 2701 determines whether the lengths of the feature lines included in the selected feature line group are substantially the same (step 2902). For example, when the standard deviation of the lengths of the feature lines included in the selected feature line group is calculated, and the lengths of all the feature lines fall within the predetermined range, the feature line selection unit 2701 It is determined that the lengths of the feature lines are approximately the same. For example, when the standard deviation of the lengths of the feature lines included in the selected feature line group is calculated, and the lengths of all the feature lines included in the selected feature line group do not fall within the predetermined range, The feature line selection unit 2701 determines that the lengths of all the feature lines are not equal.

ステップ2902において、全ての特徴線の長さは同程度でないと判定した場合(ステップ2902で「NO」)、特徴線選択部2701は、選択した特徴線グループにおいて、未選択の特徴線のうち、最も長い特徴線を選択する(ステップ2903)。長い特徴線から選択するのは、長い線分ほどその線分の角度精度が高いためである。   If it is determined in step 2902 that the lengths of all the feature lines are not equal ("NO" in step 2902), the feature line selection unit 2701 selects one of the unselected feature lines in the selected feature line group. The longest feature line is selected (step 2903). The reason for selecting from longer feature lines is that the longer the line segment, the higher the angle accuracy of that line segment.

ステップ2902において、全ての特徴線の長さは同程度であると判定した場合(ステップ2902で「YES」)、特徴線選択部2701は、選択した特徴線グループにおいて、未選択の特徴線のうち、最も外側にある特徴線を第1の特徴線として選択する(ステップ2904)。外側の線分から選択するのは、他に選択する線分との相対距離が長くなることが期待でき、結果的に間違った対応の場合のズレが大きく出ることが期待できるためである。   If it is determined in step 2902 that the lengths of all the feature lines are substantially the same (“YES” in step 2902), the feature line selection unit 2701 selects one of the unselected feature lines in the selected feature line group. , The outermost feature line is selected as a first feature line (step 2904). The reason for selecting from the outer line segments is that it is expected that the relative distance to the other selected line segment will be long, and as a result, it can be expected that a large deviation will occur in the case of incorrect correspondence.

ここで外側の特徴線から選択する方法としては、例えば、外周線から先に選択する方法ある。ここで、外周線か否かは、例えば平行な複数の線分のグループにおいて、ある特徴線の一方の側に特徴線があって、他方の側には特徴線がないかで判断することができる。   Here, as a method of selecting from the outer feature lines, for example, there is a method of selecting from the outer peripheral line first. Here, whether or not it is an outer peripheral line may be determined, for example, in a group of a plurality of parallel line segments, if there is a feature line on one side of a certain feature line and no feature line on the other side. it can.

図30は、本実施形態(実施例2)における外側の特徴線から選択する方法について説明する図である。図30において、特徴線3001,3002,3003は、およそ平行なもの同士なので、同一グループである。このとき、特徴線3002は、その両側に特徴線3001,3003があるから、外周線に該当しない。一方、特徴線3003の左側には特徴線3102があるが、特徴線3003の左側には特徴線がないので、特徴線3103は、外周線に該当する。   FIG. 30 is a diagram for describing a method of selecting from outer feature lines in the present embodiment (Example 2). In FIG. 30, the feature lines 3001, 3002, and 3003 are approximately parallel, so they are the same group. At this time, the feature line 3002 does not correspond to the outer peripheral line because the feature lines 3001 and 3003 are present on both sides thereof. On the other hand, there is a feature line 3102 on the left side of the feature line 3003, but there is no feature line on the left side of the feature line 3003, so the feature line 3103 corresponds to an outer peripheral line.

また、外側の特徴線から選択する他の方法としては、例えば、同じ長さの外周線が複数ある場合、もしくは、外周線ではない線分から選ぶ方法がある。例えば、特徴線選択部2701は、全線分の中点の重心との距離が遠い特徴線から選択してもよい。また、例えば、線分を延長した直線上の任意の点と他の線分上の任意の点との間の最大距離が長い特徴線から選択してもよい。   Further, as another method of selecting from the outer characteristic lines, there is, for example, a method of selecting from a plurality of outer peripheral lines having the same length or selecting from line segments that are not outer peripheral lines. For example, the feature line selection unit 2701 may select from feature lines that are far from the center of gravity of all the line segments. Also, for example, the maximum distance between any point on the straight line extending the line segment and any point on the other line segment may be selected from a long feature line.

図31は、本実施形態(実施例2)における3次元線分選択(ステップ2002)の詳細処理のフローチャートである。図31は、図20の特徴線選択(ステップ2002)を詳細にしたフローチャートである。   FIG. 31 is a flowchart of detailed processing of three-dimensional line segment selection (step 2002) in the present embodiment (Example 2). FIG. 31 is a flowchart detailing feature line selection (step 2002) of FIG.

3次元線分選択部2702は、未選択の3次元線分グループのうち、選択した特徴線グループ内の特徴線の本数以上の本数を有する3次元線分グループがあるかを判定する(ステップ3101)。   The three-dimensional line segment selection unit 2702 determines whether there are three-dimensional line segment groups having the number of feature lines in the selected feature line group or more among the unselected three-dimensional line segment groups (step 3101). ).

未選択の3次元線分グループのうち、選択した特徴線グループ内の特徴線の本数(M1)以上の本数を有する3次元線分グループがある場合(ステップ3101で「YES」)、3次元線分選択部2702は、次を行う。すなわち、3次元線分選択部2702は、M1以上M1に最も近い本数(M2)を有する3次元線分グループを選択する(ステップ3103)。選択の結果、M1以上でM1に最も近い本数(M2)を有する3次元線分グループが1グループ選択された場合(ステップ3104で「YES」)、3次元線分選択部2702は、ステップ3106の処理を行う。   When there is a three-dimensional line segment group having the number (M1) or more of the feature lines in the selected feature line group among the unselected three-dimensional line segment groups (“YES” in step 3101) The minute selecting unit 2702 performs the following. That is, the three-dimensional line segment selection unit 2702 selects a three-dimensional line segment group having the number (M2) closest to M1 or more and M1 (step 3103). As a result of selection, when one group of three-dimensional line segment groups having M1 or more and the number (M2) closest to M1 is selected (“YES” in step 3104), the three-dimensional line segment selection unit 2702 proceeds to step 3106. Do the processing.

選択の結果、M1以上でM1に最も近い本数(M2)を有する3次元線分グループが複数グループ選択された場合(ステップ3104で「NO」)、3次元線分選択部2702は、より長い3次元線分を有する3次元線分グループを選択する(ステップ3105)。   As a result of selection, when a plurality of three-dimensional line segment groups having the number (M2) closest to M1 and not less than M1 are selected (“NO” in step 3104), the three-dimensional line segment selection unit 2702 A three-dimensional line segment group having dimensional line segments is selected (step 3105).

未選択の3次元線分グループのうち、選択した特徴線グループ内の特徴線の本数(M1)以上の本数を有する3次元線分グループがない場合(ステップ3101で「NO」)、3次元線分選択部2702は、次を行う。すなわち、3次元線分選択部2702は、未選択の3次元線分グループのうち、選択した特徴線グループ内の特徴線の本数(M1)未満で最も近い本数を有する3次元線分グループを選択する(ステップ3102)。   When there is no three-dimensional line segment group having the number (M1) or more of the feature lines in the selected feature line group among the unselected three-dimensional line segment groups ("NO" in step 3101), the three-dimensional line The minute selecting unit 2702 performs the following. That is, the three-dimensional line segment selecting unit 2702 selects the three-dimensional line segment group having the closest number of feature lines in the selected feature line group less than the number (M1) among the unselected three-dimensional line segment groups. (Step 3102).

ステップ3104で「YES」の場合、ステップ3102が終了した場合、またはステップ3105が終了した場合、3次元線分選択部2702は、選択した3次元線分グループ内の未選択の3次元線分のうち最も長い3次元線分を選択する(ステップ3106)。   If “YES” in step 3104, or if step 3102 ends, or if step 3105 ends, the three-dimensional line segment selection unit 2702 selects one of the unselected three-dimensional line segments in the selected three-dimensional line segment group. The longest three-dimensional line segment is selected (step 3106).

ステップ3103で、M1≦M2となる3次元線分グループを選択するのは、特徴線数は対応する3次元線分数以下の場合が多いからである。なお、誤グルーピングがある場合は反転する。   The reason for selecting a three-dimensional line segment group in which M1 ≦ M2 in step 3103 is because the number of feature lines is often equal to or less than the number of corresponding three-dimensional line segments. If there is an erroneous grouping, it is reversed.

ステップ3105で、長い3次元線分から選択するのは、特徴線を長いものから選んでいるため、3次元線分も長いことが期待されるためである。3次元線分グループが見つからない場合M1>M2からも探すのは、誤グルーピングの可能性もあるためである。   The reason for selecting from the long three-dimensional line segments in step 3105 is that since the feature lines are selected from the long ones, it is expected that the three-dimensional line segments are also long. If the three-dimensional line segment group is not found, the reason for searching from M1> M2 is also because there is a possibility of erroneous grouping.

3次元線分グループから長いものから選択するのは、特徴線を長いものから選んでいるので、3次元線分も長いものから選んだ方が、正しい対応が早く見つかる期待値が高いためである。   The reason for selecting from long 3D line segment groups is that feature lines are selected from long ones, so if you choose from long 3D line segments, the expected value for finding the correct correspondence is higher. .

3次元線分について、ステップ3102,3103,3105で選択したグループの3次元線分が、方向ベクトルの分布で仮対応線分ペアが全ての角度で否定された場合(図20のステップ2007で「NO」)、仮ペア判定部1808は、次を行う。すなわち、仮ペア判定部1808は、他の3次元線分グループから次の対応線分ペアを選択する。他の3次元線分グループから次の対応線分ペアを選択するのは、その3次元線分グループの線分は平行なので、そのどれかを軸として回転した線分の傾きの分布は、同グループ内の他の線分を軸として回転させた線分の傾きとほぼ同じになる。そのため、選択した線分が分布で否決された場合は同グループ内の他の線分も否決される可能性が極めて高いためである。   When the three-dimensional line segment of the group selected in steps 3102, 3103, 3105 is the distribution of the direction vector and the temporary corresponding line segment pair is negated at all angles in the three-dimensional line segment (Step 2007 in FIG. NO "), the temporary pair determination unit 1808 performs the following. That is, the temporary pair determination unit 1808 selects the next corresponding line segment pair from other three-dimensional line segment groups. The selection of the next corresponding line segment pair from other three-dimensional line segment groups is that the line segments of the three-dimensional line segment group are parallel, so the distribution of the slope of the line segment rotated about any of them is the same It is almost the same as the inclination of the line segment rotated around the other line segments in the group. Therefore, if the selected line segment is rejected in the distribution, the other line segments in the same group are also highly likely to be rejected.

対応線分ペアが見つからず対応線分ペアが否定された場合(図20のステップ2009で「NO」)、仮ペア判定部1808は、同一の3次元線分グループ内の3次元線分で近傍の回転角の方向ベクトル分布から対応線分ペアを探索する。ここで、近傍の回転角とは、ステップ2007で「YES」の場合の回転角度の近傍を示す。
同一3次元線分グループ内の3次元線分で近傍の回転角の方向ベクトル分布が探索される。ここで、その3次元線分グループの線分は平行なので、そのどれかを軸として回転した線分の傾きの分布は、同一3次元線分グループ内の他の線分を軸として回転させた線分の傾きとほぼ同じになる。そのため、対応線分ペアを見つけるためには、近傍の角度を探索すれば十分である。
When the corresponding line segment pair is not found and the corresponding line segment pair is negated (“NO” in step 2009 of FIG. 20), the temporary pair determination unit 1808 determines that the three-dimensional line segment in the same three-dimensional line segment group is adjacent The corresponding line segment pair is searched from the direction vector distribution of the rotation angle of. Here, the rotation angle in the vicinity indicates the vicinity of the rotation angle in the case of “YES” in step 2007.
Direction vector distributions of nearby rotation angles are searched for in three-dimensional line segments in the same three-dimensional line segment group. Here, since the line segments of the three-dimensional line segment group are parallel, the distribution of the inclination of the line segment rotated about one of them is rotated about the other line segment in the same three-dimensional line segment group It is almost the same as the slope of the line segment. Therefore, in order to find the corresponding line segment pair, it is sufficient to search the angle in the vicinity.

図32は、本実施形態(実施例2)における対応線分を選択する方法を説明するための図である。図32(a)は、撮影画像1722より検出された特徴線の例を示す。図32(b)は、3Dモデルにおいて検出された3次元線分を示す。   FIG. 32 is a diagram for describing a method of selecting a corresponding line segment in the present embodiment (Example 2). FIG. 32A shows an example of the feature line detected from the photographed image 1722. FIG. 32 (b) shows three-dimensional line segments detected in the 3D model.

(S11)図32(a)において、特徴線3201〜3203のグループと、特徴線3204〜3206のグループがそれぞれ3本の特徴線を有する。   (S11) In FIG. 32A, the group of feature lines 3201 to 3203 and the group of feature lines 3204 to 3206 each have three feature lines.

(S12)特徴線選択部2701は、その2つのグループのうち、最も長い特徴線を有する特徴線3201〜3203のグループを選択するとする。   (S12) The feature line selection unit 2701 selects a group of feature lines 3201 to 3203 having the longest feature line among the two groups.

(S13)3次元線分選択部2702は、3次元線分の本数が3本のグループはないので、4本の3次元線分3211〜3214から、3次元線分を選択する。   (S13) The three-dimensional line segment selection unit 2702 selects a three-dimensional line segment from the four three-dimensional line segments 3211 to 3214 because there is no group having three three-dimensional line segments.

(S14)最も長い3次元線分3211は、他対応線分ペア推定処理(ステップ2008)において、他線分との位置関係で、選択することができない。   (S14) The longest three-dimensional line segment 3211 can not be selected due to the positional relationship with other line segments in the other corresponding line segment pair estimation process (step 2008).

(S15)同一グループの3次元線分から2番目に長い3次元線分3212を選択することは、可能である。   (S15) It is possible to select a second longest three-dimensional line segment 3212 from three-dimensional line segments in the same group.

次に、特徴線選択部2701は、上記S12で、グループ3204〜3206を選択するとする。   Next, the feature line selection unit 2701 selects the groups 3204 to 3206 in S12.

(S13’)3次元線分の本数が3本のグループはないので、3次元線分選択部2702は、4本の3次元線分3211〜3214から、3次元線分を選択する。   (S13 ') Since there is no group having three three-dimensional line segments, the three-dimensional line segment selection unit 2702 selects three-dimensional line segments from the four three-dimensional line segments 3211 to 3214.

(S14’)選択した3次元線分のうち最も長い3次元線分3211は3Dモデルを回転させた全ての角度で、対応線分ペアの可能性がない(図21のステップ1907で「NO」)。そこで、3次元線分選択部2702は、5本の3次元線分3215〜3219から選択するとする。この場合、図20のステップ2007で「YES」になるか、または対応線分ペアが見つからず対応線分ペアが否定される(ステップ2009で「NO」)。   (S14 ') The longest three-dimensional line segment 3211 among the selected three-dimensional line segments is all angles obtained by rotating the 3D model, and there is no possibility of corresponding line segment pair ("NO" at step 1907 in FIG. 21). ). Therefore, it is assumed that the three-dimensional line segment selection unit 2702 selects from the five three-dimensional line segments 3215 to 3219. In this case, "YES" is obtained in step 2007 in FIG. 20, or the corresponding line segment pair is not found, and the corresponding line segment pair is negated ("NO" in step 2009).

(S15’)この場合、仮ペア判定部1808は、同一3次元線分グループ内の3次元線分3215〜3219で近傍の回転角の方向ベクトル分布に基づいて、対応線分ペアを探索する。   (S15 ') In this case, the temporary pair determination unit 1808 searches for the corresponding line segment pair based on the direction vector distribution of the rotation angle in the vicinity of the three-dimensional line segments 3215 to 3219 in the same three-dimensional line segment group.

実施例2によれば、3次元線分の選択時の正しい対応線分ペアが得られる期待値を上げ、かつ対応線分ペアの探索処理を高速化することができる。   According to the second embodiment, it is possible to increase the expected value for obtaining the correct corresponding line segment pair when selecting a three-dimensional line segment, and to speed up the process of searching for the corresponding line segment pair.

図17の画像処理装置1701の構成は一例に過ぎず、画像処理装置1701の用途又は条件に応じて一部の構成要素を省略又は変更してもよい。例えば、撮影画像1722から特徴線1725を検出する処理が画像処理装置1701の外部の装置によって行われる場合は、図17の特徴線検出部1705を省略することができる。   The configuration of the image processing apparatus 1701 in FIG. 17 is merely an example, and some components may be omitted or changed depending on the application or conditions of the image processing apparatus 1701. For example, when the process of detecting the feature line 1725 from the captured image 1722 is performed by an apparatus outside the image processing apparatus 1701, the feature line detection unit 1705 in FIG. 17 can be omitted.

3Dモデル1723から3次元線分1726を抽出する処理が外部の装置によって行われる場合は、3次元線分抽出部1703を省略することができる。   When the process of extracting the three-dimensional line segment 1726 from the 3D model 1723 is performed by an external device, the three-dimensional line segment extraction unit 1703 can be omitted.

図33は、本実施形態(実施例1、実施例2)における画像処理装置1701として用いられる情報処理装置(コンピュータ)の構成例を示す図である。情報処理装置3300は、Central Processing Unit(CPU)3301、メモリ3302、入力装置3303、出力装置3304、補助記憶装置3305、媒体駆動装置3306、及びネットワーク接続装置3307を含む。これらの構成要素はバス3308により互いに接続されている。図17の撮像装置1740は、バス3308に接続されていてもよい。   FIG. 33 is a view showing a configuration example of an information processing apparatus (computer) used as the image processing apparatus 1701 in the present embodiment (Example 1, Example 2). The information processing device 3300 includes a central processing unit (CPU) 3301, a memory 3302, an input device 3303, an output device 3304, an auxiliary storage device 3305, a medium drive device 3306, and a network connection device 3307. These components are connected to one another by a bus 3308. The imaging device 1740 of FIG. 17 may be connected to the bus 3308.

メモリ3302は、例えば、Read Only Memory(ROM)、Random Access Memory(RAM)、フラッシュメモリ等の半導体メモリであり、画像処理に用いられるプログラム及びデータを格納する。メモリ3302は、図17の記憶部1721として用いることができる。   The memory 3302 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 3302 can be used as the storage unit 1721 in FIG.

CPU3301(プロセッサ)は、例えば、メモリ3302を利用してプログラムを実行することにより、ペア推定部1706及び決定部1709として動作する。さらに、CPU3301は、図17の3Dモデル読込部1702、3次元線分抽出部1703、画像取得部1704、特徴線検出部1705、位置計算部1707、誤差計算部1708としても動作する。   The CPU 3301 (processor) operates as a pair estimation unit 1706 and a determination unit 1709, for example, by executing a program using the memory 3302. Furthermore, the CPU 3301 also operates as a 3D model reading unit 1702, a two-dimensional line segment extraction unit 1703, an image acquisition unit 1704, a feature line detection unit 1705, a position calculation unit 1707, and an error calculation unit 1708 in FIG.

入力装置3303は、例えば、キーボード、ポインティングデバイス等であり、オペレータ又はユーザからの指示又は情報の入力に用いられる。出力装置3304は、例えば、表示装置、プリンタ、スピーカ等であり、オペレータ又はユーザへの問い合わせ又は指示、及び処理結果の出力に用いられる。処理結果は、決定部613が決定したN個の対応線分ペアであってもよい。出力装置3304は、図17の出力部1710として用いることができる。   The input device 3303 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 3304 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 line segment pairs determined by the determination unit 613. The output device 3304 can be used as the output unit 1710 in FIG.

補助記憶装置3305は、例えば、磁気ディスク装置、光ディスク装置、光磁気ディスク装置、テープ装置等である。補助記憶装置3305は、ハードディスクドライブであってもよい。情報処理装置は、補助記憶装置3305にプログラム及びデータを格納しておき、それらをメモリ3302にロードして使用することができる。補助記憶装置3305は、図17の記憶部1721として用いることができる。   The auxiliary storage device 3305 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 3305 may be a hard disk drive. The information processing apparatus can store programs and data in the auxiliary storage device 3305, load them into the memory 3302, and use them. The auxiliary storage device 3305 can be used as the storage unit 1721 of FIG.

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

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

ネットワーク接続装置3307は、Local Area Network、Wide Area Network等の通信ネットワークに接続され、通信に伴うデータ変換を行う通信インタフェースである。情報処理装置は、プログラム及びデータを外部の装置からネットワーク接続装置3307を介して受信し、それらをメモリ3302にロードして使用することができる。ネットワーク接続装置3307は、図17の出力部1710として用いることができる。   The network connection device 3307 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 information processing device can receive programs and data from an external device via the network connection device 3307, load them into the memory 3302, and use them. The network connection device 3307 can be used as the output unit 1710 in FIG.

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

開示の実施形態とその利点について詳しく説明したが、当業者は、特許請求の範囲に明確に記載した本発明の範囲から逸脱することなく、様々な変更、追加、省略をすることができるであろう。   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次元形状を示す3次元形状情報から、該3次元形状を形成する複数の3次元線分を抽出する3次元線分抽出部と、
撮像装置により対象物を撮影した撮影画像から、該対象物の形状の特徴を示す複数の特徴線を抽出する特徴線抽出部と、
前記複数の特徴線の角度についての分布を示す第1の分布と、前記複数の3次元線分を投影面に投影して得られる複数の投影線の角度についての分布を示す第2の分布との間の距離に基づいて、該複数の特徴線のうちの第1の特徴線と前記複数の3次元線分のうちの第1の3次元線分との1対のペアを推定すると共に、推定した該1対のペアに基づいて前記特徴線と前記3次元線分とのペアを少なくとも3対推定するペア推定部と、
推定された少なくとも4対のペアに基づいて、前記撮影画像から3次元空間内における該対象物に対する前記撮像装置の位置及び方向を推定する視点推定部と、
を備えることを特徴とする画像処理装置。
(付記2)
前記ペア推定部は、抽出した前記複数の特徴線から前記第1の特徴線を選択し、抽出した前記複数の3次元線分から前記第1の3次元線分を選択し、
仮想空間において、前記3次元形状を回転させて前記第1の特徴線と前記第1の3次元線分とを一致させ、
前記第1の特徴線と前記第1の3次元線分とを一致させた前記3次元形状を、該第1の3次元線分と、該第1の特徴線と前記撮像装置の視点とがなす平面に対する法線と、をそれぞれ回転軸として、前記3次元形状を所定角度ずつ回転させ、
回転させる毎に前記複数の3次元線分を前記投影面に投影して得られる複数の投影線の角度についての前記第2の分布を生成し、生成した複数の該第2の分布のそれぞれと、前記第1の分布との間の距離に応じて、前記1対のペアを推定する
ことを特徴とする付記1に記載の画像処理装置。
(付記3)
前記ペア推定部は、前記1対のペアである第1のペアを推定した場合、該第1のペアを形成する前記第1の3次元線分の第1の投影線以外の前記複数の投影線から、該1対のペアを形成する前記第1の特徴線以外の第2の特徴線と角度が一致している第2の投影線を取得し、該第2の投影線に対応する第2の3次元線分と該第2の特徴線とを選択し、該第2の3次元線分と該第2の特徴線を第2のペアと推定し、
前記第1の投影線及び前記第2の投影線以外の前記複数の投影線から、前記第1の特徴線及び前記第2の特徴線以外の第3の特徴線と角度と位置が一致している第3の投影線を取得し、該第3の投影線に対応する第3の3次元線分と該第3の特徴線とを選択し、該第3の3次元線分と該第3の特徴線を第3のペアと推定し、
前記第1の投影線、前記第2の投影線及び前記第3の投影線以外の前記複数の投影線から、前記第1の特徴線、前記第2の特徴線及び前記第3の特徴線以外の第4の特徴線と角度と位置が一致している第4の投影線を取得し、該第4の投影線に対応する第4の3次元線分と該第4の特徴線を選択し、該第4の3次元線分と該第4の特徴線を第4のペアと推定する
ことを特徴とする付記1又は2に記載の画像処理装置。
(付記4)
前記ペア推定部は、前記撮影画像より抽出した前記複数の特徴線を同一方向毎にグループ化して複数の特徴線グループを形成し、前記複数の3次元線分を同一方向毎にグループ化して複数の3次元線分グループを形成し、
それぞれの特徴線グループに含まれる前記特徴線の数、該それぞれの特徴線グループに含まれる前記特徴線の長さ、及びそれぞれの特徴線グループにおける特徴線の位置のうち少なくとも1つの条件に基づいて、前記第1の特徴線を選択し、
それぞれの3次元線分グループに含まれる3次元線分の数、及び該それぞれの3次元線分グループに含まれる前記3次元線分の長さのうち少なくとも1つの条件に基づいて、前記第1の3次元線分を選択する、
ことを特徴とする付記1〜3のうちいずれか1項に記載の画像処理装置。
(付記5)
前記ペア推定部は、前記撮影画像より抽出した前記複数の特徴線を同一方向毎にグループ化して複数の特徴線グループを形成し、前記複数の3次元線分を同一方向毎にグループ化して複数の3次元線分グループを形成し、
前記複数の特徴線グループから、最も多く特徴線を含む特徴線グループを選択し、
選択した前記特徴線グループに含まれるすべての特徴線の長さが所定の範囲内である場合には前記選択した特徴線グループにおいて外周線に対応する特徴線を前記第1の特徴線として選択し、選択した前記特徴線グループに含まれるいずれかの特徴線の長さが前記所定の範囲を超える場合には選択した前記特徴線グループから最も長い特徴線を前記第1の特徴線として選択し、
前記複数の3次元線分グループから、前記選択された特徴線グループに含まれる前記特徴線の数以上でより近い数の3次元線分を含む3次元線分グループが1つの場合には該1つの3次元線分グループを選択し、前記特徴線の数以上でより近い数の3次元線分を含む3次元線分グループが複数存在する場合には最も長い3次元線分を含む3次元線分グループを選択し、前記特徴線の数以上の3次元線分を含む3次元線分グループが存在しない場合には前記選択された特徴線グループに含まれる前記特徴線の数未満でより近い数の3次元線分を含む3次元線分グループを選択し、
選択した前記3次元線分グループから最も長い3次元線分を前記第1の3次元線分として選択する
ことを特徴とする付記1〜3のうちいずれか1項に記載の画像処理装置。
(付記6)
コンピュータに、
物体の3次元形状を示す3次元形状情報から、該3次元形状を形成する複数の3次元線分を抽出し、
撮像装置により対象物を撮影した撮影画像から、該対象物の形状の特徴を示す複数の特徴線を抽出し、
前記複数の特徴線の角度についての分布を示す第1の分布と、前記複数の3次元線分を投影面に投影して得られる複数の投影線の角度についての分布を示す第2の分布との間の距離に基づいて、該複数の特徴線のうちの第1の特徴線と前記複数の3次元線分のうちの第1の3次元線分との1対のペアを推定すると共に、推定した該1対のペアに基づいて前記特徴線と前記3次元線分とのペアを少なくとも3対推定し、
推定された少なくとも4対のペアに基づいて、前記撮像画像から3次元空間内における該対象物に対する前記撮像装置の位置及び方向を推定する
処理を実行させる画像処理プログラム。
(付記7)
前記1対のペアを推定する場合、
抽出した前記複数の特徴線から前記第1の特徴線を選択し、抽出した前記複数の3次元線分から前記第1の3次元線分を選択し、
仮想空間において、前記3次元形状を回転させて前記第1の特徴線と前記第1の3次元線分とを一致させ、
前記第1の特徴線と前記第1の3次元線分とを一致させた前記3次元形状を、該第1の3次元線分と、該第1の特徴線と前記撮像装置の視点とがなす平面に対する法線と、をそれぞれ回転軸として、前記3次元形状を所定角度ずつ回転させ、
回転させる毎に前記複数の3次元線分を前記投影面に投影して得られる複数の投影線の角度についての前記第2の分布を生成し、生成した複数の該第2の分布のそれぞれと、前記第1の分布との間の距離に応じて、前記1対のペアを推定する
ことを特徴とする付記6に記載の画像処理プログラム。
(付記8)
前記1対のペアである第1のペアを推定した場合、該第1のペアを形成する前記第1の3次元線分の第1の投影線以外の前記複数の投影線から、該1対のペアを形成する前記第1の特徴線以外の第2の特徴線と角度が一致している第2の投影線を取得し、該第2の投影線に対応する第2の3次元線分と該第2の特徴線とを選択し、該第2の3次元線分と該第2の特徴線を第2のペアと推定し、
前記第1の投影線及び前記第2の投影線以外の前記複数の投影線から、前記第1の特徴線及び前記第2の特徴線以外の第3の特徴線と角度と位置が一致している第3の投影線を取得し、該第3の投影線に対応する第3の3次元線分と該第3の特徴線とを選択し、該第3の3次元線分と該第3の特徴線を第3のペアと推定し、
前記第1の投影線、前記第2の投影線及び前記第3の投影線以外の前記複数の投影線から、前記第1の特徴線、前記第2の特徴線及び前記第3の特徴線以外の第4の特徴線と角度と位置が一致している第4の投影線を取得し、該第4の投影線に対応する第4の3次元線分と該第4の特徴線を選択し、該第4の3次元線分と該第4の特徴線を第4のペアと推定する
ことを特徴とする付記6又は7に記載の画像処理プログラム。
(付記9)
前記1対のペアを推定する場合、
前記撮影画像より抽出した前記複数の特徴線を同一方向毎にグループ化して複数の特徴線グループを形成し、前記複数の3次元線分を同一方向毎にグループ化して複数の3次元線分グループを形成し、
それぞれの特徴線グループに含まれる前記特徴線の数、該それぞれの特徴線グループに含まれる前記特徴線の長さ、及びそれぞれの特徴線グループにおける特徴線の位置のうち少なくとも1つの条件に基づいて、前記第1の特徴線を選択し、
それぞれの3次元線分グループに含まれる3次元線分の数、及び該それぞれの3次元線分グループに含まれる前記3次元線分の長さのうち少なくとも1つの条件に基づいて、前記第1の3次元線分を選択する、
ことを特徴とする付記6〜8のうちいずれか1項に記載の画像処理プログラム。
(付記10)
前記1対のペアを推定する場合、
前記撮影画像より抽出した前記複数の特徴線を同一方向毎にグループ化して複数の特徴線グループを形成し、前記複数の3次元線分を同一方向毎にグループ化して複数の3次元線分グループを形成し、
前記複数の特徴線グループから、最も多く特徴線を含む特徴線グループを選択し、
選択した前記特徴線グループに含まれるすべての特徴線の長さが所定の範囲内である場合には前記選択した特徴線グループにおいて外周線に対応する特徴線を前記第1の特徴線として選択し、選択した前記特徴線グループに含まれるいずれかの特徴線の長さが前記所定の範囲を超える場合には選択した前記特徴線グループから最も長い特徴線を前記第1の特徴線として選択し、
前記複数の3次元線分グループから、前記選択された特徴線グループに含まれる前記特徴線の数以上でより近い数の3次元線分を含む3次元線分グループが1つの場合には該1つの3次元線分グループを選択し、前記特徴線の数以上でより近い数の3次元線分を含む3次元線分グループが複数存在する場合には最も長い3次元線分を含む3次元線分グループを選択し、前記特徴線の数以上の3次元線分を含む3次元線分グループが存在しない場合には前記選択された特徴線グループに含まれる前記特徴線の数未満でより近い数の3次元線分を含む3次元線分グループを選択し、
選択した前記3次元線分グループから最も長い3次元線分を前記第1の3次元線分として選択する
ことを特徴とする付記6〜8のうちいずれか1項に記載の画像処理プログラム。
(付記11)
コンピュータが、
物体の3次元形状を示す3次元形状情報から、該3次元形状を形成する複数の3次元線分を抽出し、
撮像装置により対象物を撮影した撮影画像から、該対象物の形状の特徴を示す複数の特徴線を抽出し、
前記複数の特徴線の角度についての分布を示す第1の分布と、前記複数の3次元線分を投影面に投影して得られる複数の投影線の角度についての分布を示す第2の分布との間の距離に基づいて、該複数の特徴線のうちの第1の特徴線と前記複数の3次元線分のうちの第1の3次元線分との1対のペアを推定すると共に、推定した該1対のペアに基づいて前記特徴線と前記3次元線分とのペアを少なくとも3対推定し、
推定された少なくとも4対のペアに基づいて、前記撮像画像から3次元空間内における該対象物に対する前記撮像装置の位置及び方向を推定する
ことを特徴とする画像処理方法。
(付記12)
前記1対のペアを推定する場合、
抽出した前記複数の特徴線から前記第1の特徴線を選択し、抽出した前記複数の3次元線分から前記第1の3次元線分を選択し、
仮想空間において、前記3次元形状を回転させて前記第1の特徴線と前記第1の3次元線分とを一致させ、
前記第1の特徴線と前記第1の3次元線分とを一致させた前記3次元形状を、該第1の3次元線分と、該第1の特徴線と前記撮像装置の視点とがなす平面に対する法線と、をそれぞれ回転軸として、前記3次元形状を所定角度ずつ回転させ、
回転させる毎に前記複数の3次元線分を前記投影面に投影して得られる複数の投影線の角度についての前記第2の分布を生成し、生成した複数の該第2の分布のそれぞれと、前記第1の分布との間の距離に応じて、前記1対のペアを推定する
ことを特徴とする付記11に記載の画像処理方法。
(付記13)
前記1対のペアである第1のペアを推定した場合、該第1のペアを形成する前記第1の3次元線分の第1の投影線以外の前記複数の投影線から、該1対のペアを形成する前記第1の特徴線以外の第2の特徴線と角度が一致している第2の投影線を取得し、該第2の投影線に対応する第2の3次元線分と該第2の特徴線とを選択し、該第2の3次元線分と該第2の特徴線を第2のペアと推定し、
前記第1の投影線及び前記第2の投影線以外の前記複数の投影線から、前記第1の特徴線及び前記第2の特徴線以外の第3の特徴線と角度と位置が一致している第3の投影線を取得し、該第3の投影線に対応する第3の3次元線分と該第3の特徴線とを選択し、該第3の3次元線分と該第3の特徴線を第3のペアと推定し、
前記第1の投影線、前記第2の投影線及び前記第3の投影線以外の前記複数の投影線から、前記第1の特徴線、前記第2の特徴線及び前記第3の特徴線以外の第4の特徴線と角度と位置が一致している第4の投影線を取得し、該第4の投影線に対応する第4の3次元線分と該第4の特徴線を選択し、該第4の3次元線分と該第4の特徴線を第4のペアと推定する
ことを特徴とする付記11又は12に記載の画像処理方法。
(付記14)
前記1対のペアを推定する場合、
前記撮影画像より抽出した前記複数の特徴線を同一方向毎にグループ化して複数の特徴線グループを形成し、前記複数の3次元線分を同一方向毎にグループ化して複数の3次元線分グループを形成し、
それぞれの特徴線グループに含まれる前記特徴線の数、該それぞれの特徴線グループに含まれる前記特徴線の長さ、及びそれぞれの特徴線グループにおける特徴線の位置のうち少なくとも1つの条件に基づいて、前記第1の特徴線を選択し、
それぞれの3次元線分グループに含まれる3次元線分の数、及び該それぞれの3次元線分グループに含まれる前記3次元線分の長さのうち少なくとも1つの条件に基づいて、前記第1の3次元線分を選択する、
ことを特徴とする付記11〜13のうちいずれか1項に記載の画像処理方法。
(付記15)
前記1対のペアを推定する場合、
前記撮影画像より抽出した前記複数の特徴線を同一方向毎にグループ化して複数の特徴線グループを形成し、前記複数の3次元線分を同一方向毎にグループ化して複数の3次元線分グループを形成し、
前記複数の特徴線グループから、最も多く特徴線を含む特徴線グループを選択し、
選択した前記特徴線グループに含まれるすべての特徴線の長さが所定の範囲内である場合には前記選択した特徴線グループにおいて外周線に対応する特徴線を前記第1の特徴線として選択し、選択した前記特徴線グループに含まれるいずれかの特徴線の長さが前記所定の範囲を超える場合には選択した前記特徴線グループから最も長い特徴線を前記第1の特徴線として選択し、
前記複数の3次元線分グループから、前記選択された特徴線グループに含まれる前記特徴線の数以上でより近い数の3次元線分を含む3次元線分グループが1つの場合には該1つの3次元線分グループを選択し、前記特徴線の数以上でより近い数の3次元線分を含む3次元線分グループが複数存在する場合には最も長い3次元線分を含む3次元線分グループを選択し、前記特徴線の数以上の3次元線分を含む3次元線分グループが存在しない場合には前記選択された特徴線グループに含まれる前記特徴線の数未満でより近い数の3次元線分を含む3次元線分グループを選択し、
選択した前記3次元線分グループから最も長い3次元線分を前記第1の3次元線分として選択する
ことを特徴とする付記11〜13のうちいずれか1項に記載の画像処理方法。
Further, the following appendices will be disclosed regarding the embodiment described above.
(Supplementary Note 1)
A three-dimensional line segment extraction unit for extracting a plurality of three-dimensional line segments forming the three-dimensional shape from three-dimensional shape information indicating a three-dimensional shape of an object;
A feature line extraction unit that extracts a plurality of feature lines indicating features of the shape of the target object from a captured image obtained by capturing the target object with the imaging device;
A first distribution showing a distribution of the angles of the plurality of feature lines, and a second distribution showing a distribution of angles of a plurality of projection lines obtained by projecting the plurality of three-dimensional line segments onto the projection surface Estimating a pair of a first feature line of the plurality of feature lines and a first three-dimensional line segment of the plurality of three-dimensional line segments based on the distance between A pair estimation unit that estimates at least three pairs of the feature line and the three-dimensional line segment based on the estimated pair of pairs;
A viewpoint estimation unit that estimates the position and direction of the imaging device with respect to the object in a three-dimensional space from the captured image based on the estimated at least four pairs;
An image processing apparatus comprising:
(Supplementary Note 2)
The pair estimation unit selects the first feature line from the extracted feature lines, and selects the first three-dimensional line segment from the extracted three-dimensional line segments.
In the virtual space, the three-dimensional shape is rotated to match the first feature line with the first three-dimensional line segment;
The three-dimensional shape in which the first feature line and the first three-dimensional line segment coincide with each other includes the first three-dimensional line segment, the first feature line, and the viewpoint of the imaging device. The three-dimensional shape is rotated by a predetermined angle with the normal to the plane being made as the rotation axis,
The second distribution is generated for the angles of the plurality of projection lines obtained by projecting the plurality of three-dimensional line segments onto the projection plane each time it is rotated, and each of the plurality of generated second distributions The image processing apparatus according to claim 1, wherein the pair of pairs is estimated in accordance with a distance between the first distribution and the first distribution.
(Supplementary Note 3)
When the pair estimation unit estimates a first pair that is the pair, the plurality of projections other than the first projection line of the first three-dimensional line segment that forms the first pair Acquiring from the line a second projection line whose angle coincides with a second feature line other than the first feature line forming the pair, and a second corresponding to the second projection line Select two three-dimensional line segments and the second feature line, and estimate the second three-dimensional line segment and the second feature line as a second pair,
The positions and angles of the plurality of projection lines other than the first projection line and the second projection line coincide with the angle of the third feature line other than the first feature line and the second feature line. Acquiring a third projection line, selecting a third three-dimensional line segment corresponding to the third projection line and the third feature line, and selecting the third three-dimensional line segment and the third line Estimate the feature lines of the third pair,
From the plurality of projection lines other than the first projection line, the second projection line and the third projection line, other than the first feature line, the second feature line and the third feature line Acquiring a fourth projection line whose angle and position are coincident with the fourth feature line of the fourth feature line, and selecting a fourth three-dimensional line segment corresponding to the fourth projection line and the fourth feature line; The image processing apparatus according to Additional remark 1 or 2, wherein the fourth three-dimensional line segment and the fourth feature line are estimated as a fourth pair.
(Supplementary Note 4)
The pair estimation unit groups the plurality of feature lines extracted from the captured image in the same direction to form a plurality of feature line groups, and groups the plurality of three-dimensional line segments in the same direction Form a 3D line segment group of
Based on at least one condition among the number of feature lines included in each feature line group, the length of the feature lines included in each feature line group, and the position of feature lines in each feature line group , Select the first feature line,
The first one is based on at least one condition among the number of three-dimensional line segments included in each three-dimensional line segment group and the length of the three-dimensional line segment included in each three-dimensional line segment group. Select a 3D line segment of
The image processing apparatus according to any one of appendices 1 to 3, characterized in that:
(Supplementary Note 5)
The pair estimation unit groups the plurality of feature lines extracted from the captured image in the same direction to form a plurality of feature line groups, and groups the plurality of three-dimensional line segments in the same direction Form a 3D line segment group of
From the plurality of feature line groups, select the feature line group containing the most feature lines,
If lengths of all feature lines included in the selected feature line group are within a predetermined range, a feature line corresponding to an outer peripheral line in the selected feature line group is selected as the first feature line If the length of any feature line included in the selected feature line group exceeds the predetermined range, the longest feature line is selected as the first feature line from the selected feature line group,
In the case where there is one three-dimensional line segment group including a number of three-dimensional line segments closer in number to the number of the feature lines included in the selected feature line group from the plurality of three-dimensional line segment groups, Three three-dimensional line segments including the longest three-dimensional line segment when there are a plurality of three-dimensional line segments including a plurality of three-dimensional line segments having a number equal to or greater than the number of feature lines. When a minute group is selected, and there is no three-dimensional line segment group including three-dimensional line segments equal to or more than the number of feature lines, the number is closer than the number of feature lines included in the selected feature line group. Select a 3D line segment group that contains 3D line segments of
The image processing apparatus according to any one of Appendices 1 to 3, wherein a longest three-dimensional line segment is selected as the first three-dimensional line segment from the selected three-dimensional line segment group.
(Supplementary Note 6)
On the computer
Extracting a plurality of three-dimensional line segments forming the three-dimensional shape from the three-dimensional shape information indicating the three-dimensional shape of the object;
Extracting a plurality of feature lines indicating features of the shape of the object from a photographed image obtained by photographing the object by the imaging device;
A first distribution showing a distribution of the angles of the plurality of feature lines, and a second distribution showing a distribution of angles of a plurality of projection lines obtained by projecting the plurality of three-dimensional line segments onto the projection surface Estimating a pair of a first feature line of the plurality of feature lines and a first three-dimensional line segment of the plurality of three-dimensional line segments based on the distance between At least three pairs of the feature line and the three-dimensional line segment are estimated based on the estimated pair of pairs,
An image processing program for executing a process of estimating the position and direction of the imaging device with respect to the object in a three-dimensional space from the captured image based on the estimated at least four pairs.
(Appendix 7)
When estimating the pair of pairs,
The first feature line is selected from the plurality of extracted feature lines, and the first three-dimensional line segment is selected from the plurality of extracted three-dimensional line segments;
In the virtual space, the three-dimensional shape is rotated to match the first feature line with the first three-dimensional line segment;
The three-dimensional shape in which the first feature line and the first three-dimensional line segment coincide with each other includes the first three-dimensional line segment, the first feature line, and the viewpoint of the imaging device. The three-dimensional shape is rotated by a predetermined angle with the normal to the plane being made as the rotation axis,
The second distribution is generated for the angles of the plurality of projection lines obtained by projecting the plurality of three-dimensional line segments onto the projection plane each time it is rotated, and each of the plurality of generated second distributions The image processing program according to supplementary note 6, wherein the pair of pairs is estimated according to a distance between the first distribution and the first distribution.
(Supplementary Note 8)
When the first pair that is the pair is estimated, the pair is extracted from the plurality of projection lines other than the first projection line of the first three-dimensional line segment forming the first pair. Acquiring a second projection line whose angle coincides with a second feature line other than the first feature line forming the pair of lines; and a second three-dimensional line segment corresponding to the second projection line And the second feature line, and estimating the second three-dimensional line segment and the second feature line as a second pair,
The positions and angles of the plurality of projection lines other than the first projection line and the second projection line coincide with the angle of the third feature line other than the first feature line and the second feature line. Acquiring a third projection line, selecting a third three-dimensional line segment corresponding to the third projection line and the third feature line, and selecting the third three-dimensional line segment and the third line Estimate the feature lines of the third pair,
From the plurality of projection lines other than the first projection line, the second projection line and the third projection line, other than the first feature line, the second feature line and the third feature line Acquiring a fourth projection line whose angle and position are coincident with the fourth feature line of the fourth feature line, and selecting a fourth three-dimensional line segment corresponding to the fourth projection line and the fourth feature line; The image processing program according to appendix 6 or 7, wherein the fourth three-dimensional line segment and the fourth feature line are estimated as a fourth pair.
(Appendix 9)
When estimating the pair of pairs,
The plurality of feature lines extracted from the captured image are grouped in the same direction to form a plurality of feature line groups, and the plurality of three-dimensional line segments are grouped in the same direction to form a plurality of three-dimensional line groups Form
Based on at least one condition among the number of feature lines included in each feature line group, the length of the feature lines included in each feature line group, and the position of feature lines in each feature line group , Select the first feature line,
The first one is based on at least one condition among the number of three-dimensional line segments included in each three-dimensional line segment group and the length of the three-dimensional line segment included in each three-dimensional line segment group. Select a 3D line segment of
The image processing program according to any one of appendices 6 to 8, characterized in that
(Supplementary Note 10)
When estimating the pair of pairs,
The plurality of feature lines extracted from the captured image are grouped in the same direction to form a plurality of feature line groups, and the plurality of three-dimensional line segments are grouped in the same direction to form a plurality of three-dimensional line groups Form
From the plurality of feature line groups, select the feature line group containing the most feature lines,
If lengths of all feature lines included in the selected feature line group are within a predetermined range, a feature line corresponding to an outer peripheral line in the selected feature line group is selected as the first feature line If the length of any feature line included in the selected feature line group exceeds the predetermined range, the longest feature line is selected as the first feature line from the selected feature line group,
In the case where there is one three-dimensional line segment group including a number of three-dimensional line segments closer in number to the number of the feature lines included in the selected feature line group from the plurality of three-dimensional line segment groups, Three three-dimensional line segments including the longest three-dimensional line segment when there are a plurality of three-dimensional line segments including a plurality of three-dimensional line segments having a number equal to or greater than the number of feature lines. When a minute group is selected, and there is no three-dimensional line segment group including three-dimensional line segments equal to or more than the number of feature lines, the number is closer than the number of feature lines included in the selected feature line group. Select a 3D line segment group that contains 3D line segments of
The image processing program according to any one of appendices 6 to 8, wherein a longest three-dimensional line segment is selected as the first three-dimensional line segment from the selected three-dimensional line segment group.
(Supplementary Note 11)
The computer is
Extracting a plurality of three-dimensional line segments forming the three-dimensional shape from the three-dimensional shape information indicating the three-dimensional shape of the object;
Extracting a plurality of feature lines indicating features of the shape of the object from a photographed image obtained by photographing the object by the imaging device;
A first distribution showing a distribution of the angles of the plurality of feature lines, and a second distribution showing a distribution of angles of a plurality of projection lines obtained by projecting the plurality of three-dimensional line segments onto the projection surface Estimating a pair of a first feature line of the plurality of feature lines and a first three-dimensional line segment of the plurality of three-dimensional line segments based on the distance between At least three pairs of the feature line and the three-dimensional line segment are estimated based on the estimated pair of pairs,
An image processing method comprising: estimating a position and a direction of the imaging device with respect to the object in a three-dimensional space from the captured image based on the estimated at least four pairs.
(Supplementary Note 12)
When estimating the pair of pairs,
The first feature line is selected from the plurality of extracted feature lines, and the first three-dimensional line segment is selected from the plurality of extracted three-dimensional line segments;
In the virtual space, the three-dimensional shape is rotated to match the first feature line with the first three-dimensional line segment;
The three-dimensional shape in which the first feature line and the first three-dimensional line segment coincide with each other includes the first three-dimensional line segment, the first feature line, and the viewpoint of the imaging device. The three-dimensional shape is rotated by a predetermined angle with the normal to the plane being made as the rotation axis,
The second distribution is generated for the angles of the plurality of projection lines obtained by projecting the plurality of three-dimensional line segments onto the projection plane each time it is rotated, and each of the plurality of generated second distributions The image processing method according to appendix 11, wherein the pair of pairs is estimated according to a distance between the first distribution and the first distribution.
(Supplementary Note 13)
When the first pair that is the pair is estimated, the pair is extracted from the plurality of projection lines other than the first projection line of the first three-dimensional line segment forming the first pair. Acquiring a second projection line whose angle coincides with a second feature line other than the first feature line forming the pair of lines; and a second three-dimensional line segment corresponding to the second projection line And the second feature line, and estimating the second three-dimensional line segment and the second feature line as a second pair,
The positions and angles of the plurality of projection lines other than the first projection line and the second projection line coincide with the angle of the third feature line other than the first feature line and the second feature line. Acquiring a third projection line, selecting a third three-dimensional line segment corresponding to the third projection line and the third feature line, and selecting the third three-dimensional line segment and the third line Estimate the feature lines of the third pair,
From the plurality of projection lines other than the first projection line, the second projection line and the third projection line, other than the first feature line, the second feature line and the third feature line Acquiring a fourth projection line whose angle and position are coincident with the fourth feature line of the fourth feature line, and selecting a fourth three-dimensional line segment corresponding to the fourth projection line and the fourth feature line; The image processing method according to appendix 11 or 12, wherein the fourth three-dimensional line segment and the fourth feature line are estimated as a fourth pair.
(Supplementary Note 14)
When estimating the pair of pairs,
The plurality of feature lines extracted from the captured image are grouped in the same direction to form a plurality of feature line groups, and the plurality of three-dimensional line segments are grouped in the same direction to form a plurality of three-dimensional line groups Form
Based on at least one condition among the number of feature lines included in each feature line group, the length of the feature lines included in each feature line group, and the position of feature lines in each feature line group , Select the first feature line,
The first one is based on at least one condition among the number of three-dimensional line segments included in each three-dimensional line segment group and the length of the three-dimensional line segment included in each three-dimensional line segment group. Select a 3D line segment of
The image processing method according to any one of appendices 11 to 13, characterized in that
(Supplementary Note 15)
When estimating the pair of pairs,
The plurality of feature lines extracted from the captured image are grouped in the same direction to form a plurality of feature line groups, and the plurality of three-dimensional line segments are grouped in the same direction to form a plurality of three-dimensional line groups Form
From the plurality of feature line groups, select the feature line group containing the most feature lines,
If lengths of all feature lines included in the selected feature line group are within a predetermined range, a feature line corresponding to an outer peripheral line in the selected feature line group is selected as the first feature line If the length of any feature line included in the selected feature line group exceeds the predetermined range, the longest feature line is selected as the first feature line from the selected feature line group,
In the case where there is one three-dimensional line segment group including a number of three-dimensional line segments closer in number to the number of the feature lines included in the selected feature line group from the plurality of three-dimensional line segment groups, Three three-dimensional line segments including the longest three-dimensional line segment when there are a plurality of three-dimensional line segments including a plurality of three-dimensional line segments having a number equal to or greater than the number of feature lines. When a minute group is selected, and there is no three-dimensional line segment group including three-dimensional line segments equal to or more than the number of feature lines, the number is closer than the number of feature lines included in the selected feature line group. Select a 3D line segment group that contains 3D line segments of
The image processing method according to any one of Appendices 11 to 13, wherein a longest three-dimensional line segment is selected as the first three-dimensional line segment from the selected three-dimensional line segment group.

601 画像処理装置
602 3次元線分抽出部
603 特徴線抽出部
604 ペア推定部
605 視点推定部
1701 画像処理装置
1702 3Dモデル読込部
1703 3次元線分抽出部
1704 画像取得部
1705 特徴線検出部
1706 ペア推定部
1707 位置計算部
1708 誤差計算部
1709 決定部
1710 出力部
1721 記憶部
1722 撮像画像
1723 3Dモデル
1725 特徴線
1726 3次元線分
1727 対応線分ペア
1728 粗パラメータ
1729 指標
1730 パラメータ
1801 特徴線選択部
1802 3次元線分選択部
1803 初期設定部
1804 回転制御部
1805 特徴線角度ヒストグラム生成部
1806 投影線角度ヒストグラム生成部
1807 ヒストグラム距離算出部
1808 仮ペア判定部
2701 特徴線選択部
2702 3次元選択部
2703 特徴線グループ作成部
2704 3次元線分グループ作成部
601 image processing apparatus 602 three-dimensional line segment extraction unit 603 feature line extraction unit 604 pair estimation unit 605 viewpoint estimation unit 1701 image processing apparatus 1702 3D model reading unit 1703 three-dimensional line segment extraction unit 1704 image acquisition unit 1705 feature line detection unit 1706 Pair estimation unit 1707 Position calculation unit 1708 Error calculation unit 1709 Determination unit 1710 Output unit 1721 Storage unit 1722 Captured image 1723 3D model 1725 Feature line 1726 3D line segment 1727 Corresponding line segment pair 1728 Coarse parameter 1729 Index 1730 Parameter 1801 Feature line selection Part 1802 3D line segment selection part 1803 Initial setting part 1804 Rotation control part 1805 Feature line angle histogram generation part 1806 Projection line angle histogram generation part 1807 Histogram distance calculation part 1808 Temporary pair Tough 2701 feature line selector 2702 3-dimensional selector 2703 feature line group creation unit 2704 three-dimensional line segment group creating unit

Claims (7)

物体の3次元形状を示す3次元形状情報から、該3次元形状を形成する複数の3次元線分を抽出する3次元線分抽出部と、
撮像装置により対象物を撮影した撮影画像から、該対象物の形状の特徴を示す複数の特徴線を抽出する特徴線抽出部と、
前記複数の特徴線の角度についての分布を示す第1の分布と、前記複数の3次元線分を投影面に投影して得られる複数の投影線の角度についての分布を示す第2の分布との間の距離に基づいて、該複数の特徴線のうちの第1の特徴線と前記複数の3次元線分のうちの第1の3次元線分との1対のペアを推定すると共に、推定した該1対のペアに基づいて前記特徴線と前記3次元線分とのペアを少なくとも3対推定するペア推定部と、
推定された少なくとも4対のペアに基づいて、前記撮像画像から3次元空間内における該対象物に対する前記撮像装置の位置及び方向を推定する視点推定部と、
を備えることを特徴とする画像処理装置。
A three-dimensional line segment extraction unit for extracting a plurality of three-dimensional line segments forming the three-dimensional shape from three-dimensional shape information indicating a three-dimensional shape of an object;
A feature line extraction unit that extracts a plurality of feature lines indicating features of the shape of the target object from a captured image obtained by capturing the target object with the imaging device;
A first distribution showing a distribution of the angles of the plurality of feature lines, and a second distribution showing a distribution of angles of a plurality of projection lines obtained by projecting the plurality of three-dimensional line segments onto the projection surface Estimating a pair of a first feature line of the plurality of feature lines and a first three-dimensional line segment of the plurality of three-dimensional line segments based on the distance between A pair estimation unit that estimates at least three pairs of the feature line and the three-dimensional line segment based on the estimated pair of pairs;
A viewpoint estimation unit that estimates the position and direction of the imaging device with respect to the object in a three-dimensional space from the captured image based on the estimated at least four pairs;
An image processing apparatus comprising:
前記ペア推定部は、抽出した前記複数の特徴線から前記第1の特徴線を選択し、抽出した前記複数の3次元線分から前記第1の3次元線分を選択し、
仮想空間において、前記3次元形状を回転させて前記第1の特徴線と前記第1の3次元線分とを一致させ、
前記第1の特徴線と前記第1の3次元線分とを一致させた前記3次元形状を、該第1の3次元線分と、該第1の特徴線と前記撮像装置の視点とがなす平面に対する法線と、をそれぞれ回転軸として、前記3次元形状を所定角度ずつ回転させ、
回転させる毎に前記複数の3次元線分を前記投影面に投影して得られる複数の投影線の角度についての前記第2の分布を生成し、生成した複数の該第2の分布のそれぞれと、前記第1の分布との間の距離に応じて、前記1対のペアを推定する
ことを特徴とする請求項1に記載の画像処理装置。
The pair estimation unit selects the first feature line from the extracted feature lines, and selects the first three-dimensional line segment from the extracted three-dimensional line segments.
In the virtual space, the three-dimensional shape is rotated to match the first feature line with the first three-dimensional line segment;
The three-dimensional shape in which the first feature line and the first three-dimensional line segment coincide with each other includes the first three-dimensional line segment, the first feature line, and the viewpoint of the imaging device. The three-dimensional shape is rotated by a predetermined angle with the normal to the plane being made as the rotation axis,
The second distribution is generated for the angles of the plurality of projection lines obtained by projecting the plurality of three-dimensional line segments onto the projection plane each time it is rotated, and each of the plurality of generated second distributions The image processing apparatus according to claim 1, wherein the pair of pairs is estimated according to a distance between the first distribution and the first distribution.
前記ペア推定部は、前記1対のペアである第1のペアを推定した場合、該第1のペアを形成する前記第1の3次元線分の第1の投影線以外の前記複数の投影線から、該1対のペアを形成する前記第1の特徴線以外の第2の特徴線と角度が一致している第2の投影線を取得し、該第2の投影線に対応する第2の3次元線分と該第2の特徴線とを選択し、該第2の3次元線分と該第2の特徴線を第2のペアと推定し、
前記第1の投影線及び前記第2の投影線以外の前記複数の投影線から、前記第1の特徴線及び前記第2の特徴線以外の第3の特徴線と角度と位置が一致している第3の投影線を取得し、該第3の投影線に対応する第3の3次元線分と該第3の特徴線とを選択し、該第3の3次元線分と該第3の特徴線を第3のペアと推定し、
前記第1の投影線、前記第2の投影線及び前記第3の投影線以外の前記複数の投影線から、前記第1の特徴線、前記第2の特徴線及び前記第3の特徴線以外の第4の特徴線と角度と位置が一致している第4の投影線を取得し、該第4の投影線に対応する第4の3次元線分と該第4の特徴線を選択し、該第4の3次元線分と該第4の特徴線を第4のペアと推定する
ことを特徴とする請求項1又は2に記載の画像処理装置。
When the pair estimation unit estimates a first pair that is the pair, the plurality of projections other than the first projection line of the first three-dimensional line segment that forms the first pair Acquiring from the line a second projection line whose angle coincides with a second feature line other than the first feature line forming the pair, and a second corresponding to the second projection line Select two three-dimensional line segments and the second feature line, and estimate the second three-dimensional line segment and the second feature line as a second pair,
The positions and angles of the plurality of projection lines other than the first projection line and the second projection line coincide with the angle of the third feature line other than the first feature line and the second feature line. Acquiring a third projection line, selecting a third three-dimensional line segment corresponding to the third projection line and the third feature line, and selecting the third three-dimensional line segment and the third line Estimate the feature lines of the third pair,
From the plurality of projection lines other than the first projection line, the second projection line and the third projection line, other than the first feature line, the second feature line and the third feature line Acquiring a fourth projection line whose angle and position are coincident with the fourth feature line of the fourth feature line, and selecting a fourth three-dimensional line segment corresponding to the fourth projection line and the fourth feature line; The image processing apparatus according to claim 1, wherein the fourth three-dimensional line segment and the fourth feature line are estimated as a fourth pair.
前記ペア推定部は、前記撮影画像より抽出した前記複数の特徴線を同一方向毎にグループ化して複数の特徴線グループを形成し、前記複数の3次元線分を同一方向毎にグループ化して複数の3次元線分グループを形成し、
それぞれの特徴線グループに含まれる前記特徴線の数、該それぞれの特徴線グループに含まれる前記特徴線の長さ、及びそれぞれの特徴線グループにおける特徴線の位置のうち少なくとも1つの条件に基づいて、前記第1の特徴線を選択し、
それぞれの3次元線分グループに含まれる3次元線分の数、及び該それぞれの3次元線分グループに含まれる前記3次元線分の長さのうち少なくとも1つの条件に基づいて、前記第1の3次元線分を選択する、
ことを特徴とする請求項1〜3のうちいずれか1項に記載の画像処理装置。
The pair estimation unit groups the plurality of feature lines extracted from the captured image in the same direction to form a plurality of feature line groups, and groups the plurality of three-dimensional line segments in the same direction Form a 3D line segment group of
Based on at least one condition among the number of feature lines included in each feature line group, the length of the feature lines included in each feature line group, and the position of feature lines in each feature line group , Select the first feature line,
The first one is based on at least one condition among the number of three-dimensional line segments included in each three-dimensional line segment group and the length of the three-dimensional line segment included in each three-dimensional line segment group. Select a 3D line segment of
The image processing apparatus according to any one of claims 1 to 3, characterized in that:
前記ペア推定部は、前記撮影画像より抽出した前記複数の特徴線を同一方向毎にグループ化して複数の特徴線グループを形成し、前記複数の3次元線分を同一方向毎にグループ化して複数の3次元線分グループを形成し、
前記複数の特徴線グループから、最も多く特徴線を含む特徴線グループを選択し、
選択した前記特徴線グループに含まれるすべての特徴線の長さが所定の範囲内である場合には前記選択した特徴線グループにおいて外周線に対応する特徴線を前記第1の特徴線として選択し、選択した前記特徴線グループに含まれるいずれかの特徴線の長さが前記所定の範囲を超える場合には選択した前記特徴線グループから最も長い特徴線を前記第1の特徴線として選択し、
前記複数の3次元線分グループから、前記選択された特徴線グループに含まれる前記特徴線の数以上でより近い数の3次元線分を含む3次元線分グループが1つの場合には該1つの3次元線分グループを選択し、前記特徴線の数以上でより近い数の3次元線分を含む3次元線分グループが複数存在する場合には最も長い3次元線分を含む3次元線分グループを選択し、前記特徴線の数以上の3次元線分を含む3次元線分グループが存在しない場合には前記選択された特徴線グループに含まれる前記特徴線の数未満でより近い数の3次元線分を含む3次元線分グループを選択し、
選択した前記3次元線分グループから最も長い3次元線分を前記第1の3次元線分として選択する
ことを特徴とする請求項1〜3のうちいずれか1項に記載の画像処理装置。
The pair estimation unit groups the plurality of feature lines extracted from the captured image in the same direction to form a plurality of feature line groups, and groups the plurality of three-dimensional line segments in the same direction Form a 3D line segment group of
From the plurality of feature line groups, select the feature line group containing the most feature lines,
If lengths of all feature lines included in the selected feature line group are within a predetermined range, a feature line corresponding to an outer peripheral line in the selected feature line group is selected as the first feature line If the length of any feature line included in the selected feature line group exceeds the predetermined range, the longest feature line is selected as the first feature line from the selected feature line group,
In the case where there is one three-dimensional line segment group including a number of three-dimensional line segments closer in number to the number of the feature lines included in the selected feature line group from the plurality of three-dimensional line segment groups, Three three-dimensional line segments including the longest three-dimensional line segment when there are a plurality of three-dimensional line segments including a plurality of three-dimensional line segments having a number equal to or greater than the number of feature lines. When a minute group is selected, and there is no three-dimensional line segment group including three-dimensional line segments equal to or more than the number of feature lines, the number is closer than the number of feature lines included in the selected feature line group. Select a 3D line segment group that contains 3D line segments of
The image processing apparatus according to any one of claims 1 to 3, wherein a longest three-dimensional line segment is selected as the first three-dimensional line segment from the selected three-dimensional line segment group.
コンピュータに、
物体の3次元形状を示す3次元形状情報から、該3次元形状を形成する複数の3次元線分を抽出し、
撮像装置により対象物を撮影した撮影画像から、該対象物の形状の特徴を示す複数の特徴線を抽出し、
前記複数の特徴線の角度についての分布を示す第1の分布と、前記複数の3次元線分を投影面に投影して得られる複数の投影線の角度についての分布を示す第2の分布との間の距離に基づいて、該複数の特徴線のうちの第1の特徴線と前記複数の3次元線分のうちの第1の3次元線分との1対のペアを推定すると共に、推定した該1対のペアに基づいて前記特徴線と前記3次元線分とのペアを少なくとも3対推定し、
推定された少なくとも4対のペアに基づいて、前記撮像画像から3次元空間内における該対象物に対する前記撮像装置の位置及び方向を推定する
処理を実行させる画像処理プログラム。
On the computer
Extracting a plurality of three-dimensional line segments forming the three-dimensional shape from the three-dimensional shape information indicating the three-dimensional shape of the object;
Extracting a plurality of feature lines indicating features of the shape of the object from a photographed image obtained by photographing the object by the imaging device;
A first distribution showing a distribution of the angles of the plurality of feature lines, and a second distribution showing a distribution of angles of a plurality of projection lines obtained by projecting the plurality of three-dimensional line segments onto the projection surface Estimating a pair of a first feature line of the plurality of feature lines and a first three-dimensional line segment of the plurality of three-dimensional line segments based on the distance between At least three pairs of the feature line and the three-dimensional line segment are estimated based on the estimated pair of pairs,
An image processing program for executing a process of estimating the position and direction of the imaging device with respect to the object in a three-dimensional space from the captured image based on the estimated at least four pairs.
コンピュータが、
物体の3次元形状を示す3次元形状情報から、該3次元形状を形成する複数の3次元線分を抽出し、
撮像装置により対象物を撮影した撮影画像から、該対象物の形状の特徴を示す複数の特徴線を抽出し、
前記複数の特徴線の角度についての分布を示す第1の分布と、前記複数の3次元線分を投影面に投影して得られる複数の投影線の角度についての分布を示す第2の分布との間の距離に基づいて、該複数の特徴線のうちの第1の特徴線と前記複数の3次元線分のうちの第1の3次元線分との1対のペアを推定すると共に、推定した該1対のペアに基づいて前記特徴線と前記3次元線分とのペアを少なくとも3対推定し、
推定された少なくとも4対のペアに基づいて、前記撮像画像から3次元空間内における該対象物に対する前記撮像装置の位置及び方向を推定する
ことを特徴とする画像処理方法。
The computer is
Extracting a plurality of three-dimensional line segments forming the three-dimensional shape from the three-dimensional shape information indicating the three-dimensional shape of the object;
Extracting a plurality of feature lines indicating features of the shape of the object from a photographed image obtained by photographing the object by the imaging device;
A first distribution showing a distribution of the angles of the plurality of feature lines, and a second distribution showing a distribution of angles of a plurality of projection lines obtained by projecting the plurality of three-dimensional line segments onto the projection surface Estimating a pair of a first feature line of the plurality of feature lines and a first three-dimensional line segment of the plurality of three-dimensional line segments based on the distance between At least three pairs of the feature line and the three-dimensional line segment are estimated based on the estimated pair of pairs,
An image processing method comprising: estimating a position and a direction of the imaging device with respect to the object in a three-dimensional space from the captured image based on the estimated at least four pairs.
JP2017237961A 2017-12-12 2017-12-12 Image processing device, image processing program and image processing method Pending JP2019105992A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017237961A JP2019105992A (en) 2017-12-12 2017-12-12 Image processing device, image processing program and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017237961A JP2019105992A (en) 2017-12-12 2017-12-12 Image processing device, image processing program and image processing method

Publications (1)

Publication Number Publication Date
JP2019105992A true JP2019105992A (en) 2019-06-27

Family

ID=67062403

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017237961A Pending JP2019105992A (en) 2017-12-12 2017-12-12 Image processing device, image processing program and image processing method

Country Status (1)

Country Link
JP (1) JP2019105992A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6715542B1 (en) * 2019-10-28 2020-07-01 株式会社センシンロボティクス Aircraft, inspection method and inspection system
CN113920160A (en) * 2021-09-17 2022-01-11 北京航空航天大学 Estimation method, apparatus, computer-readable medium, and program product of initial pose

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6715542B1 (en) * 2019-10-28 2020-07-01 株式会社センシンロボティクス Aircraft, inspection method and inspection system
CN113920160A (en) * 2021-09-17 2022-01-11 北京航空航天大学 Estimation method, apparatus, computer-readable medium, and program product of initial pose

Similar Documents

Publication Publication Date Title
CN107810522B (en) Real-time, model-based object detection and pose estimation
Zeisl et al. Camera pose voting for large-scale image-based localization
JP6216508B2 (en) Method for recognition and pose determination of 3D objects in 3D scenes
EP2915138B1 (en) Systems and methods of merging multiple maps for computer vision based tracking
US9633281B2 (en) Point cloud matching method
JP6716996B2 (en) Image processing program, image processing apparatus, and image processing method
US9626552B2 (en) Calculating facial image similarity
JP6880618B2 (en) Image processing program, image processing device, and image processing method
WO2019125741A1 (en) Graphical coordinate system transform for video frames
US20130236108A1 (en) Object or shape information representation method
JP2019114103A (en) Object recognition processing device, object recognition processing method and program
US20230040550A1 (en) Method, apparatus, system, and storage medium for 3d reconstruction
CN113506373A (en) Real-time luggage three-dimensional modeling method, electronic device and storage medium
JP2019105992A (en) Image processing device, image processing program and image processing method
JP5734000B2 (en) Object identification system and method, and feature point position extraction system and method
JP2019106008A (en) Estimation device, estimation method, and estimation program
JP2006113832A (en) Stereoscopic image processor and program
Polic et al. Uncertainty based camera model selection
JP5030183B2 (en) 3D object position and orientation measurement method
JP2019159470A (en) Estimation device, estimation method and estimation program
WO2017042852A1 (en) Object recognition appratus, object recognition method and storage medium
JP6946912B2 (en) Estimator program, estimator, and estimation method
JP7265143B2 (en) Display control method, display control program and information processing device
JP2015184743A (en) Image processor and object recognition method
JP6092012B2 (en) Object identification system and object identification method