JP6534411B2 - Relative angle estimation device, relative angle estimation method, and relative angle estimation program - Google Patents

Relative angle estimation device, relative angle estimation method, and relative angle estimation program Download PDF

Info

Publication number
JP6534411B2
JP6534411B2 JP2017071608A JP2017071608A JP6534411B2 JP 6534411 B2 JP6534411 B2 JP 6534411B2 JP 2017071608 A JP2017071608 A JP 2017071608A JP 2017071608 A JP2017071608 A JP 2017071608A JP 6534411 B2 JP6534411 B2 JP 6534411B2
Authority
JP
Japan
Prior art keywords
unit
image
transformation matrix
relative angle
projective transformation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017071608A
Other languages
Japanese (ja)
Other versions
JP2018173823A (en
Inventor
周平 田良島
周平 田良島
隆行 黒住
隆行 黒住
杵渕 哲也
哲也 杵渕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2017071608A priority Critical patent/JP6534411B2/en
Publication of JP2018173823A publication Critical patent/JP2018173823A/en
Application granted granted Critical
Publication of JP6534411B2 publication Critical patent/JP6534411B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Description

本発明は、画像中に写り込む平面物体の被写体と画像を撮影したカメラとの相対角度を推定する相対角度推定装置、相対角度推定方法、及び相対角度推定プログラムに関する。   The present invention relates to a relative angle estimation device, a relative angle estimation method, and a relative angle estimation program for estimating the relative angle between a subject of a flat object captured in an image and a camera that has captured an image.

画像に被写体が写っている場合に、画像上に写った被写体が何であるかを認識できれば、画像上の被写体の位置と、事前に構築しておいた認識対象の実空間上での位置とを照合することで、カメラ(撮影者)の実空間中でのおよその位置を特定することができる。加えて、認識した被写体と撮影者との相対的な角度(例えば、図1に示す方位角)が推定できれば、スマートフォン、タブレット端末等で撮影された画像から、撮影者の実空間中での場所と向きに応じたナビゲーション(次に向かう場所の提示、現在地に関連した情報提示等)を実現することができる。   If the subject appears in the image, if the subject in the image can be recognized, the position of the subject in the image and the position in the real space of the recognition target constructed in advance By collation, the approximate position of the camera (photographer) in the real space can be identified. In addition, if the relative angle between the recognized subject and the photographer (for example, the azimuth angle shown in FIG. 1) can be estimated, the location in the real space of the photographer from the image captured by the smartphone, tablet terminal, etc. It is possible to realize navigation in accordance with the direction (presentation of a place to go next, information presentation related to the present location, etc.).

非特許文献1及び非特許文献2には、2画像間の対応点集合から基礎行列及び基本行列を推定する技術が開示されている。2画像の対応点集合から基礎行列及び基本行列が正しく推定できれば、対応点を三次元空間に逆投影することができるため、被写体と撮影者との三次元的な位置関係が復元できる。   Non-Patent Document 1 and Non-Patent Document 2 disclose a technique for estimating a base matrix and a base matrix from a set of corresponding points between two images. If the basic matrix and the basic matrix can be correctly estimated from the corresponding point sets of the two images, the corresponding points can be backprojected onto the three-dimensional space, so that the three-dimensional positional relationship between the subject and the photographer can be restored.

しかし、非特許文献1及び非特許文献2で開示されている技術における、基礎行列及び基本行列を推定する公知の方法は、2画像間の対応点が三次元空間上で同一平面内には存在しないことを仮定しており、2画像が一つの平面のみを捉えている場合、基礎行列及び基本行列を精度良く推定することができない。撮影者が平面的な被写体を近づいて撮影し、画像中には被写体の平面部しか写り込まないという状況は高い頻度で発生すると考えられる。このような状況で、被写体と撮影者との相対角度が推定できないことは、システムの可用性やユーザビリティを大きく損ねてしまう、という問題がある。   However, in the techniques disclosed in Non-Patent Document 1 and Non-Patent Document 2, the known method for estimating the base matrix and the base matrix is that corresponding points between two images exist in the same plane in a three-dimensional space. If it is assumed that the two images capture only one plane, it is not possible to accurately estimate the base matrix and the base matrix. It is considered that a situation in which a photographer approaches and photographs a flat subject and only the flat part of the subject is captured in the image occurs at a high frequency. In such a situation, the inability to estimate the relative angle between the subject and the photographer has a problem that the availability and usability of the system are greatly impaired.

一方、非特許文献3では、認識対象が写り込む2画像間を幾何的に対応付ける射影変換行列と、撮影に用いられたカメラの内部パラメータ(以下、「カメラパラメータ」という)とから、2画像間の相対的な回転情報、2画像間の相対的な並進情報、及び被写体の法線とを推定する技術が開示されている。非特許文献2で開示されている技術を用いることで、入力画像に一つの平面のみしか写っていない場合でも、被写体と撮影者との三次元空間中での位置関係を精度良く推定することができる。   On the other hand, in Non-Patent Document 3, a projection transformation matrix that geometrically associates two images in which a recognition target is captured and an internal parameter of a camera used for photographing (hereinafter referred to as "camera parameter") A technique is disclosed for estimating relative rotation information, relative translation information between two images, and a normal of an object. By using the technology disclosed in Non-Patent Document 2, it is possible to accurately estimate the positional relationship between a subject and a photographer in a three-dimensional space, even when only one plane is shown in the input image. it can.

なお、被写体と撮影者との相対角度の推定は、被写体と撮影者との三次元空間中での位置関係の推定の一例とみなすことができる。   The estimation of the relative angle between the subject and the photographer can be regarded as an example of the estimation of the positional relationship between the subject and the photographer in a three-dimensional space.

R. I. Hartley, In Defence of the 8-point Algorithm, TPAMI, 1997.インターネット<URL:http://www.cs.cmu.edu/afs/andrew/scs/cs/15-463/f07/proj_final/www/amichals/fundamental.pdf>RI Hartley, In Defense of the 8-point Algorithm, TPAMI, 1997. Internet <URL: http://www.cs.cmu.edu/afs/andrew/scs/cs/15/463/f07/proj_final/www/ amichals / fundamental.pdf> D. Niester, An Efficient Solution to the Five-Point Relative Pose Problem, TPAMI, 2004. インターネット<URL:http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.86.8769&rep=rep1&type=pdf>D. Niester, An Efficient Solution to the Five-Point Relative Pose Problem, TPAMI, 2004. Internet <URL: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.86.8769&rep=rep1&type= pdf> E. Malis et al., Deeper Understanding of the Homography Decomposition for Vision-based Control, INRIA Research Report, 2007. インターネット<URL:https://hal.inria.fr/inria-00174036/document>E. Malis et al., Deeper Understanding of the Photography Decomposition for Vision-based Control, INRIA Research Report, 2007. Internet <URL: https://hal.inria.fr/inria-00174036/document>

被写体と撮影者との相対角度を推定するに際に、非特許文献3で開示されている技術には、下記の3つの問題がある。   In estimating the relative angle between the subject and the photographer, the technique disclosed in Non-Patent Document 3 has the following three problems.

まず、非特許文献3で開示されている技術は、射影変換行列によって対応付けられる2画像を撮影した各々のカメラパラメータが正確に求まっていることを仮定している。しかし実運用においては、撮影に用いられる全てのカメラについて内部パラメータを事前に用意しておくことは負荷が高い。特に、テスト画像は任意の撮影デバイスで撮影される可能性があり、それら全てについてカメラパラメータを事前に推定しておくことは困難である。カメラパラメータが未知の場合に上記と同様なことを実現する単純な方法として、入力画像のサイズや固定の焦点距離等から算出したおおまかなカメラパラメータを非特許文献1に開示されている技術に適用する方法が考えられる。しかし、この方法を用いるのみでは、カメラパラメータの不正確さに起因して、解の精度が低下したり、解が一意に定まらなかったりする、という問題が生じる。   First, the technique disclosed in Non-Patent Document 3 assumes that the camera parameters of each of the two images captured by the projective transformation matrix are accurately determined. However, in actual operation, it is expensive to prepare internal parameters in advance for all cameras used for shooting. In particular, test images can be taken with any imaging device, and it is difficult to estimate camera parameters in advance for all of them. As a simple method to realize the same as above when the camera parameters are unknown, the rough camera parameters calculated from the size of the input image, the fixed focal length, etc. are applied to the technology disclosed in Non-Patent Document 1 How to do However, using this method alone causes a problem that the accuracy of the solution is reduced or the solution is not uniquely determined due to the imprecision of the camera parameters.

また、テスト画像に写った被写体と撮影者との相対角度の推定は、テスト画像に写る被写体の識別と合わせて実施されることが少なくない。被写体の識別の精度を向上させるために、訓練画像はリサイズ、切り出し等といった前処理が行われることはごく一般的である。しかし、その場合、前処理によって得られた画像のカメラパラメータは、元画像のカメラパラメータとは異なるため、訓練画像を撮影したカメラのカメラパラメータをそのまま適用することができない、という問題が生じる。   Further, the estimation of the relative angle between the subject shown in the test image and the photographer is often performed together with the identification of the subject shown in the test image. In order to improve the accuracy of object identification, it is very common for training images to be subjected to preprocessing such as resizing and clipping. However, in this case, since the camera parameters of the image obtained by the pre-processing are different from the camera parameters of the original image, there arises a problem that the camera parameters of the camera that captured the training image can not be applied as it is.

さらに、非特許文献3で開示されている技術のみでは、被写体平面を示す法線は得られても、例えば方位角のような、実空間を考慮した被写体と撮影者の相対角度を正確に算出することはできない、という問題もある。カメラの向き、及び被写体の法線のみから角度そのものを算出すること自体は容易であるものの、算出された角度はナビゲーションを実現する際に必要な角度(例えば、被写体と撮影者とが水平方向になす角(方位角))とは異なる。すなわち、テスト画像が全て地面に垂直に設置されたカメラで撮影されたと仮定すれば、算出された角度は方位角に一致するが、特にテスト画像の撮影者に対し、カメラの平面部を地面に垂直に設置させることは、ユーザの撮影自由度を著しく制約してしまうことにつながる。   Furthermore, even with the technique disclosed in Non-Patent Document 3, although the normal line indicating the subject plane can be obtained, the relative angle between the subject and the photographer considering the real space, such as azimuth, can be accurately calculated. There is also the problem that you can not Although it is easy to calculate the angle itself only from the camera orientation and the normal to the subject, the calculated angle is the angle required to realize navigation (for example, the subject and the photographer are in the horizontal direction). Different from the angle (azimuth angle)). That is, assuming that all the test images were taken by the camera installed perpendicular to the ground, the calculated angle matches the azimuth angle, but especially for the photographer of the test image, the flat part of the camera is on the ground Vertical installation leads to significant restriction of the user's imaging freedom.

以上をまとめると、テスト画像中の平面的な被写体と撮影者との相対的な角度の推定に関連する公知の技術には、下記(1)乃至(3)の課題があった:   To summarize the above, the known techniques related to the estimation of the relative angle between the planar subject and the photographer in the test image have the following problems (1) to (3):

(1)テスト画像の撮影に用いるカメラのカメラパラメータが未知の場合、得られる解が一意に定まるとは限らない。 (1) When the camera parameters of the camera used for capturing a test image are unknown, the obtained solution is not necessarily determined uniquely.

(2)テスト画像、及び訓練画像にリサイズ、クロッピング等の前処理が施されている場合、元画像を撮影したカメラのカメラパラメータをそのまま適用できない。 (2) When the test image and the training image are subjected to preprocessing such as resizing and cropping, the camera parameters of the camera that captured the original image can not be applied as they are.

(3)被写体と撮影者の相対的な角度算出にあたり、実空間の情報を考慮できない。例えば、水平方向における被写体と撮影者の相対角度(方位角)を、ユーザの撮影自由度を損なわずに推定することができない。 (3) Real space information can not be taken into account in calculating the relative angle between the subject and the photographer. For example, the relative angle (azimuth angle) of the subject and the photographer in the horizontal direction can not be estimated without losing the user's imaging freedom.

本発明は、以上のような事情に鑑みてなされたものであり、画像に写った平面的な被写体とカメラとの相対角度を精度良く推定することができる相対角度推定装置、相対角度推定方法、及び相対角度推定プログラムを提供することを目的とする。   The present invention has been made in view of the circumstances as described above, and is a relative angle estimation device and relative angle estimation method capable of accurately estimating the relative angle between a planar subject and a camera shown in an image. And provide a relative angle estimation program.

上記目的を達成するために、本発明の相対角度推定装置は、平面物体が写る訓練画像及びテスト画像の各々から局所特徴量を抽出する局所特徴抽出部と、前記訓練画像に写る前記平面物体上の複数の基準点の情報、前記訓練画像を撮影したカメラのカメラパラメータ、及び前記訓練画像に写る前記平面物体の法線を記憶する補助情報保存部と、前記訓練画像の局所特徴量と前記テスト画像の局所特徴量とから前記訓練画像と前記テスト画像とにおける対応点を決定する対応点決定部と、前記対応点決定部より決定された対応点の集合から、前記訓練画像を前記テスト画像に射影変換するための射影変換行列を推定する射影変換行列推定部と、前記カメラパラメータから、前記射影変換行列推定部により推定された前記射影変換行列を、前記訓練画像と前記テスト画像との間の回転及び並進運動と前記テスト画像に写る前記平面物体の法線とに分解したときの複数の解候補を算出する射影変換行列分解部と、予め定められた制約に基づいて、前記射影変換行列分解部により算出された前記複数の解候補から、物理的に実現可能な前記解候補を選択する掌性判定部と、前記掌性判定部により選択された前記解候補を入力し、前記射影変換行列推定部により推定された前記射影変換行列を用いて、前記解候補の前記法線と前記訓練画像の前記法線と照合し、1つの前記解候補を選択する解妥当性判定部と、前記複数の基準点の情報と、前記解妥当性判定部により選択された前記解候補の前記回転及び並進運動と、前記射影変換行列とから、前記テスト画像に写る前記平面物体と前記テスト画像を撮影したカメラとの相対角度を算出する角度算出部と、を含む。   In order to achieve the above object, the relative angle estimation device of the present invention comprises a local feature extraction unit for extracting local feature amounts from each of a training image and a test image in which a planar object appears, and the planar object on the training image. An auxiliary information storage unit that stores information on a plurality of reference points of the above, camera parameters of a camera that captured the training image, and a normal of the flat object captured in the training image; local features of the training image and the test A corresponding point determination unit that determines corresponding points in the training image and the test image from local feature amounts of an image, and a set of corresponding points determined by the corresponding point determination unit, the training image as the test image A projection transformation matrix estimation unit for estimating a projection transformation matrix for projective transformation; and the projection transformation matrix estimated by the projection transformation matrix estimation unit from the camera parameters; A projective transformation matrix decomposing unit for calculating a plurality of solution candidates when it is decomposed into rotation and translational motion between an image and the test image and a normal of the planar object shown in the test image; and a predetermined constraint A palmarity determination unit for selecting the physically feasible solution candidate from the plurality of solution candidates calculated by the projective transformation matrix decomposing unit based on The candidate is input, and the projective transformation matrix estimated by the projective transformation matrix estimation unit is used to collate the normal of the solution candidate with the normal of the training image to select one solution candidate The image captured in the test image from a solution validity determination unit, information on the plurality of reference points, the rotation and translational motion of the solution candidate selected by the solution validity determination unit, and the projective transformation matrix Plane object and the test Includes an angle calculation unit that calculates a relative angle between the cameras taking the image, a.

なお、前記角度算出部は、前記解妥当性判定部により選択された前記解候補の前記回転及び並進運動と、前記射影変換行列とを用いて算出した前記複数の基準点の三次元空間上の位置に基づいて、前記相対角度を算出するようにしても良い。   Note that the angle calculation unit is configured to calculate the three-dimensional space of the plurality of reference points calculated using the rotation and translational motion of the solution candidate selected by the solution validity determination unit and the projective transformation matrix. The relative angle may be calculated based on the position.

また、平面物体が写る訓練画像及びテスト画像を入力し、前記訓練画像及び前記テスト画像の各々に対して前処理を実施する前処理部を更に含み、前記補助情報保存部は、前記訓練画像及び前記テスト画像の各々に対して、前記前処理の前後の変換パラメータを更に記憶し、前記射影変換行列推定部は、前記カメラパラメータと、前記対応点決定部により決定された対応点の集合と、前記変換パラメータとから、前記前処理部により前処理が実施される前の、前記訓練画像を前記テスト画像に射影変換するための射影変換行列を推定するようにしても良い。   The image processing apparatus further includes a pre-processing unit which inputs a training image and a test image including a flat object and performs pre-processing on each of the training image and the test image, and the auxiliary information storage unit includes the training image and The transformation parameters before and after the pre-processing are further stored for each of the test images, and the projective transformation matrix estimation unit further includes the camera parameters and a set of corresponding points determined by the corresponding point determination unit. From the transformation parameters, a projection transformation matrix for projective transforming the training image to the test image before the preprocessing is performed by the preprocessing unit may be estimated.

また、複数の前記訓練画像を入力した場合、前記複数の前記訓練画像から、前記テスト画像と最も類似する前記訓練画像を選択する候補画像選択部を更に含むようにしても良い。   In addition, when a plurality of the training images are input, a candidate image selection unit may be further included which selects the training image most similar to the test image from the plurality of training images.

また、前記訓練画像に写る前記平面物体の法線を推定する被写体法線推定部を更に含み、前記補助情報保存部は、前記被写体法線推定部によって推定された、前記訓練画像に写る前記平面物体の法線を記憶するようにしても良い。   The image processing apparatus may further include a subject normal estimating unit for estimating a normal of the planar object shown in the training image, and the auxiliary information storage unit may estimate the plane of the training image estimated by the subject normal estimating unit. The normal of the object may be stored.

上記目的を達成するために、本発明の相対角度推定方法は、局所特徴抽出部と、訓練画像に写る平面物体上の複数の基準点の情報、前記訓練画像を撮影したカメラのカメラパラメータ、及び前記訓練画像に写る前記平面物体の法線を記憶する補助情報保存部と、対応点決定部と、射影変換行列推定部と、射影変換行列分解部と、掌性判定部と、解妥当性判定部と、及び角度算出部とを有する相対角度推定装置における相対角度推定方法であって、前記局所特徴抽出部が、前記訓練画像及びテスト画像の各々から局所特徴量を抽出するステップと、前記対応点決定部が、前記訓練画像の局所特徴量と前記テスト画像の局所特徴量とから前記訓練画像と前記テスト画像とにおける対応点を決定する対応点決定部と、前記射影変換行列推定部が、前記対応点決定部より決定された対応点の集合から、前記訓練画像を前記テスト画像に射影変換するための射影変換行列を推定するステップと、前記射影変換行列分解部が、前記カメラパラメータから、前記射影変換行列推定部により推定された前記射影変換行列を、前記訓練画像と前記テスト画像との間の回転及び並進運動と前記テスト画像に写る前記平面物体の法線とに分解したときの複数の解候補を算出するステップと、前記掌性判定部が、予め定められた制約に基づいて、前記射影変換行列分解部により算出された前記複数の解候補から、物理的に実現可能な前記解候補を選択するステップと、前記解妥当性判定部が、前記掌性判定部により選択された前記解候補を入力し、前記射影変換行列推定部により推定された前記射影変換行列を用いて、前記解候補の前記法線と前記訓練画像の前記法線と照合し、1つの前記解候補を選択するステップと、角度算出部が、前記複数の基準点の情報と、前記解妥当性判定部により選択された前記解候補の前記回転及び並進運動と、前記射影変換行列とから、前記テスト画像に写る前記平面物体と前記テスト画像を撮影したカメラとの相対角度を算出するステップと、を含む。   In order to achieve the above object, according to a relative angle estimation method of the present invention, a local feature extraction unit, information of a plurality of reference points on a planar object captured in a training image, camera parameters of a camera that captured the training image, An auxiliary information storage unit that stores the normal of the planar object in the training image, a corresponding point determination unit, a projective transformation matrix estimation unit, a projective transformation matrix decomposition unit, a palmarity determination unit, solution validity determination A relative angle estimation method in a relative angle estimation device having a unit and an angle calculation unit, wherein the local feature extraction unit extracts a local feature amount from each of the training image and the test image, and the correspondence A corresponding point determination unit that determines corresponding points in the training image and the test image from the local feature of the training image and the local feature of the test image; and the projective transformation matrix estimation unit; Previous Estimating a projective transformation matrix for projective transformation of the training image to the test image from the set of corresponding points determined by the corresponding point determination unit; and the projective transformation matrix decomposing unit determines the camera parameters from the camera parameters A plurality of the projective transformation matrix estimated by the projective transformation matrix estimating unit is decomposed into rotation and translational motion between the training image and the test image and normals of the planar object shown in the test image. The solution candidate physically feasible from the plurality of solution candidates calculated by the projective transformation matrix decomposing unit based on the step of calculating the solution candidate and the hand determining unit based on a predetermined constraint Selecting the solution candidate, the solution validity determination unit inputs the solution candidate selected by the hand property determination unit, and the projective transformation matrix estimated by the projective transformation matrix estimation unit Using the normal of the solution candidate and the normal of the training image to select one solution candidate, the angle calculation unit, information on the plurality of reference points, and the solution valid Calculating a relative angle between the planar object captured in the test image and the camera that captured the test image from the rotation and translational motion of the solution candidate selected by the sex determination unit and the projective transformation matrix; ,including.

上記目的を達成するために、本発明の相対角度推定プログラムは、コンピュータを、上記相対角度推定装置の各部として機能させるためのプログラムである。   In order to achieve the above object, a relative angle estimation program of the present invention is a program for causing a computer to function as each part of the relative angle estimation device.

本発明によれば、画像に写った平面的な被写体とカメラとの相対角度を精度良く推定することが可能となる。   According to the present invention, it is possible to accurately estimate the relative angle between a planar subject and an image captured in an image.

被写体及びカメラの位置関係と当該位置関係における方位角とを示す模式図である。It is a schematic diagram which shows the positional relationship of a to-be-photographed object and a camera, and the azimuth in the said positional relationship. 第1実施形態に係る相対角度推定装置の機能的な構成を示すブロック図である。It is a block diagram showing functional composition of relative angle estimating device concerning a 1st embodiment. 実施形態に係る補助情報保存部について説明するための模式図である。It is a schematic diagram for demonstrating the auxiliary information storage part which concerns on embodiment. 実施形態に係る補助情報保存部により記憶される各情報について説明するための模式図である。It is a schematic diagram for demonstrating each information memorize | stored by the auxiliary information storage part which concerns on embodiment. 実施形態に係る相対角度の算出方法について説明するための模式図である。It is a schematic diagram for demonstrating the calculation method of the relative angle which concerns on embodiment. 実施形態に係る相対角度の算出方法について説明するための模式図である。It is a schematic diagram for demonstrating the calculation method of the relative angle which concerns on embodiment. 実施形態に係る相対角度の算出方法について説明するための模式図である。It is a schematic diagram for demonstrating the calculation method of the relative angle which concerns on embodiment. 第1実施形態に係る補助情報記憶処理の流れを示すフローチャートである。It is a flow chart which shows a flow of auxiliary information storage processing concerning a 1st embodiment. 第1実施形態に係る相対角度推定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the relative angle estimation process which concerns on 1st Embodiment. 第2実施形態に係る相対角度推定装置の機能的な構成を示すブロック図である。It is a block diagram which shows the functional structure of the relative angle estimation apparatus which concerns on 2nd Embodiment. 第2実施形態に係る相対角度推定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the relative angle estimation process which concerns on 2nd Embodiment. 第3実施形態に係る相対角度推定装置の機能的な構成を示すブロック図である。It is a block diagram which shows the functional structure of the relative angle estimation apparatus which concerns on 3rd Embodiment. 第3実施形態に係る補助情報記憶処理の流れを示すフローチャートである。It is a flow chart which shows the flow of the auxiliary information storage processing concerning a 3rd embodiment.

以下、本発明の実施形態について図面を用いて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

本実施形態に係る相対角度推定装置は、撮影された画像に写り込む平面状の被写体(例えば、看板、広告等であり、以下、「平面物体」という)とカメラとの相対的な角度を推定する装置である。   The relative angle estimation apparatus according to the present embodiment estimates a relative angle between a planar subject (for example, a signboard, an advertisement, etc., hereinafter referred to as a “planar object”) and a camera, which are captured in a captured image. Device.

最初に、本実施形態に係る相対角度推定装置は、各々の訓練画像に写った平面物体の法線の情報を事前に記憶させる。なお、相対角度推定装置は、後述するように射影変換行列を算出した際に、訓練画像に写った平面物体の法線を用いて、算出された射影変換行列から得られた平面物体の法線の候補解との一貫性を評価することで、候補解の妥当性を評価する。妥当性の評価とは、例えば、解候補が複数存在する場合に解候補を一意に特定すること、信頼性が低い解候補を棄却すること等である。   First, the relative angle estimation device according to the present embodiment stores in advance information on the normals of the planar object shown in each training image. When the relative angle estimation device calculates the projective transformation matrix as described later, the normal of the planar object obtained from the projective transformation matrix calculated using the normal of the planar object shown in the training image Evaluate the validity of the candidate solution by evaluating its consistency with the candidate solution. The evaluation of validity includes, for example, uniquely identifying a solution candidate when there are a plurality of solution candidates, and rejecting a solution candidate with low reliability.

また、本実施形態に係る相対角度推定装置は、複数の訓練画像にリサイズ、切り出し等の前処理を行うと共に、前処理後の訓練画像の画像座標系を、カメラパラメータが既知である前処理前の画像座標系へ変換するためのパラメータを事前に記憶しておく。そして、射影変換行列を推定する際には、この変換パラメータを用いて、カメラパラメータが既知の画像座標系における射影変換行列を推定する。   In addition, the relative angle estimation device according to the present embodiment performs preprocessing such as resizing and clipping on a plurality of training images, and the image coordinate system of the training image after preprocessing is preprocessed before camera parameters are known. The parameters for conversion to the image coordinate system of are stored in advance. Then, when estimating the projective transformation matrix, the projective transformation matrix in the image coordinate system whose camera parameters are known is estimated using this transformation parameter.

さらに、本実施形態に係る相対角度推定装置は、実空間の情報を考慮した相対角度の推定に必要な平面物体上の基準点の情報を事前に記憶しておく。相対角度を算出する際には、上記基準点と、それまでの処理で得られた画像間の射影変換行列、相対回転情報、及び相対並進情報から、カメラと平面物体との相対角度を算出する。   Furthermore, the relative angle estimation device according to the present embodiment stores, in advance, information of the reference point on the planar object necessary for estimation of the relative angle in consideration of the information of the real space. When calculating the relative angle, the relative angle between the camera and the planar object is calculated from the reference point and the projective transformation matrix between the images obtained by the processing up to that point, the relative rotation information, and the relative translation information. .

第1実施形態では、訓練画像として、相対角度の推定対象とする平面物体(例えば、壁に設置された看板、広告等の平面物体)が正面から撮影された1枚の画像を入力する場合について考える。また、第1実施形態では、相対角度の推定対象とする平面物体が写ったテスト画像を入力すると、カメラの撮像面に対する平面物体の方位角を相対角度として推定し、推定した相対角度を出力する。なお、ここでいう方位角とは、図1に示す通り、水平面における平面物体とカメラの撮像面との相対角度である。   In the first embodiment, in the case of inputting, as a training image, one image in which a flat object (for example, a signboard installed on a wall, a flat object such as an advertisement or the like) whose relative angle is to be estimated Think. In the first embodiment, when a test image including a planar object whose relative angle is to be estimated is input, the azimuth angle of the planar object with respect to the imaging surface of the camera is estimated as a relative angle, and the estimated relative angle is output. . In addition, the azimuth angle here is a relative angle of the plane object in a horizontal surface, and the imaging surface of a camera, as shown in FIG.

図2は、第1実施形態に係る相対角度推定装置10の機能的な構成を示すブロック図である。図2に示すように、第1実施形態に係る相対角度推定装置10は、訓練部34、及び、認識部36を有している。   FIG. 2 is a block diagram showing a functional configuration of the relative angle estimation device 10 according to the first embodiment. As shown in FIG. 2, the relative angle estimation device 10 according to the first embodiment includes a training unit 34 and a recognition unit 36.

訓練部34は、前処理部12、補助情報保存部14、パラメータ記憶部16、及び、局所特徴抽出部18を有している。また、認識部36は、上述した前処理部12、局所特徴抽出部20、対応点決定部22、射影変換行列推定部24、射影変換行列分解部26、掌性判定部28、解妥当性判定部30、及び、角度算出部32を有している。   The training unit 34 includes a preprocessing unit 12, an auxiliary information storage unit 14, a parameter storage unit 16, and a local feature extraction unit 18. In addition, the recognition unit 36 includes the above-described preprocessing unit 12, local feature extraction unit 20, corresponding point determination unit 22, projective transformation matrix estimation unit 24, projective transformation matrix decomposition unit 26, palmarity determination unit 28, solution validity determination A unit 30 and an angle calculation unit 32 are provided.

まず、訓練部34について説明する。   First, the training unit 34 will be described.

前処理部12は、訓練画像40を入力とし、入力した訓練画像40に対して所定の画像処理を実施する。なお、前処理部12で実施される画像処理は任意の画像処理であって良く、例えば、所定の大きさへのリサイズ、特定の領域の手動クロッピング、画像ノイズの影響を低減するためのフィルタリング等が挙げられる。   The preprocessing unit 12 receives a training image 40 as input, and performs predetermined image processing on the input training image 40. Note that the image processing performed by the preprocessing unit 12 may be any image processing, for example, resizing to a predetermined size, manual cropping of a specific area, filtering for reducing the influence of image noise, etc. Can be mentioned.

補助情報保存部14は、前処理部12における画像処理の前後の訓練画像40において画像座標系が変化した場合に、前処理後の画像座標系を前処理前の画像座標系に変換するために必要な情報(以下、「変換パラメータ」という)をパラメータ記憶部16に記憶させる。変換パラメータを用いることにより、訓練画像40の座標が、カメラパラメータが既知の画像座標系の座標に変換される。   The auxiliary information storage unit 14 converts the image coordinate system after pre-processing to the image coordinate system before pre-processing when the image coordinate system changes in the training image 40 before and after the image processing in the pre-processing unit 12 Necessary information (hereinafter referred to as “conversion parameter”) is stored in the parameter storage unit 16. By using the transformation parameters, the coordinates of the training image 40 are transformed to the coordinates of the image coordinate system in which the camera parameters are known.

一例として、図3に示すように、前処理部12で、入力した訓練画像40を左上点(sx,sy)からクロッピングした後に、訓練画像40を1/k倍したとする。この場合に、補助情報保存部14に、変換パラメータとして、(sx,sy)と、1/kとが記憶される。また、補助情報保存部14には、更に、訓練画像40に写る平面物体の法線の情報、実空間の情報を反映した平面物体とカメラとの相対角度を推定するための基準点の情報、及び訓練画像40を撮影したカメラ固有のカメラパラメータが事前に記憶されている。訓練画像40に写る平面物体の法線の情報としては、例えば図3に示すように、三次元ベクトル

を構成する要素の値を記憶すれば良い。
As an example, as shown in FIG. 3, after the input training image 40 is cropped from the upper left point (sx, sy) by the preprocessing unit 12, the training image 40 is multiplied by 1 / k. In this case, (sx, sy) and 1 / k are stored in the auxiliary information storage unit 14 as conversion parameters. Further, the auxiliary information storage unit 14 further includes information of the normal of the planar object shown in the training image 40, information of a reference point for estimating the relative angle between the planar object reflecting the information of the real space and the camera, And camera parameters unique to the camera that captured the training image 40 are stored in advance. For example, as shown in FIG. 3, a three-dimensional vector may be used as the information on the normal of the planar object shown in the training image 40.

It suffices to store the values of the elements that make up

本実施形態では、訓練画像40が平面物体を正面から捉えていることに注意すると、法線ベクトルは、奥行き方向(ここでは、z軸とする)にのみ値を持つベクトル(例えば、n=n=0,n=1)で表わされる。また、平面物体とカメラとの方位角を求めるためには、訓練画像40における矩形の平面物体の3頂点の座標がわかれば良く、図3に示す例では、これらの3頂点の座標をA(x1,y1)、B(x2,y2)、C(x3,y3)として記憶している。 In the present embodiment, it is noted that the training image 40 captures a flat object from the front, the normal vector is a vector having a value only in the depth direction (here, the z axis) (for example, n x = It is represented by n y = 0 and n z = 1). Further, in order to obtain the azimuth angle between the planar object and the camera, it is sufficient to know the coordinates of the three vertices of the rectangular planar object in the training image 40, and in the example shown in FIG. It stores as x1, y1), B (x2, y2), and C (x3, y3).

さらに、図3に示す例では、訓練画像40を撮影したカメラのIDを補助情報として記憶している。パラメータ記憶部16は、複数のカメラのIDの各々に対応付けられたカメラパラメータのデータベースを有しており、訓練画像40を撮影したカメラのIDの情報から、カメラパラメータデータを検索する。なお、カメラのカメラパラメータについては、任意のモデルに基づくものを用いることができる。   Furthermore, in the example illustrated in FIG. 3, the ID of the camera that has captured the training image 40 is stored as the auxiliary information. The parameter storage unit 16 has a database of camera parameters associated with each of the IDs of a plurality of cameras, and searches for camera parameter data from information of the ID of the camera that has captured the training image 40. As camera parameters of the camera, those based on any model can be used.

以下、本実施例では、下記(1)式に示す3x3のカメラパラメータを用いるものとする:

……(1)
Hereinafter, in the present embodiment, it is assumed that 3x3 camera parameters shown in the following equation (1) are used:

...... (1)

なお、パラメータf、f、c、cは、撮影画像のサイズ、カメラの焦点距離等から算出しても良いし、あるいは下記参考文献1に開示されている公知の方法で推定したものを用いてもよい。 The parameters f x , f y , c x , and c y may be calculated from the size of the captured image, the focal length of the camera, etc., or estimated by a known method disclosed in the following reference 1 You may use a thing.

[参考文献1]Z. Zhang, A Flexible New Technique for Camera Calibration, TPAMI, 2000. [Reference 1] Z. Zhang, A Flexible New Technique for Camera Calibration, TPAMI, 2000.

局所特徴抽出部18は、前処理部12が入力した訓練画像40から、局所特徴量及び各局所特徴に対応する属性情報を抽出し、抽出した局所特徴量と属性情報との組をパラメータ記憶部16に記憶させる。局所特徴量の抽出方法としては、任意の公知の技術を用いることが可能であり、例えば、下記参考文献2で開示されているSIFT、下記参考文献3で開示されているLIFT、その他、SURF、BEIEF、BRISK、ORB、FREAK、AKAZE等が挙げられる。   The local feature extraction unit 18 extracts a local feature amount and attribute information corresponding to each local feature from the training image 40 input by the pre-processing unit 12, and sets a set of the extracted local feature amount and attribute information as a parameter storage unit Make it memorize in 16. As a method of extracting a local feature, any known technique can be used. For example, SIFT disclosed in the following reference 2, LIFT disclosed in the following reference 3, others, SURF, BEIEF, BRISK, ORB, FREAK, AKAZE etc. are mentioned.

[参考文献2]D. G. Lowe, Distinctive Image Features from Scale-Invariant Keypoints, IJCV, 2004. [Reference 2] D. G. Lowe, Distinctive Image Features from Scale-Invariant Keypoints, IJCV, 2004.

[参考文献3]K. M. Yi et al., LIFT: Learned Invariant Feature Transform, in Proc. ECCV, 2016. [Reference 3] K. M. Yi et al., LIFT: Learned Invariant Feature Transform, in Proc. ECCV, 2016.

次に、認識部36について説明する。   Next, the recognition unit 36 will be described.

前処理部12は、撮影で得られたテスト画像42を入力とし、訓練部34の場合と同様に、入力したテスト画像42に対して所定の画像処理を実施する。なお、テスト画像42に適用される前処理は、訓練画像40に適用された画像処理とは異なっていても良い。ただし、訓練部34の場合と同様に、前処理部12による画像処理によってテスト画像42の画像座標系が変化する場合には、変換パラメータをパラメータ記憶部16に記憶させておき、以降の射影変換行列推定部24で、パラメータ記憶部16に記憶されている変換パラメータを用いる。   The preprocessing unit 12 receives the test image 42 obtained by photographing, and performs predetermined image processing on the input test image 42 as in the case of the training unit 34. Note that the pre-processing applied to the test image 42 may be different from the image processing applied to the training image 40. However, as in the case of the training unit 34, when the image coordinate system of the test image 42 is changed by the image processing by the pre-processing unit 12, the conversion parameter is stored in the parameter storage unit 16, and the projective conversion thereafter is performed. The matrix estimation unit 24 uses the conversion parameters stored in the parameter storage unit 16.

局所特徴抽出部20は、テスト画像42から、局所特徴抽出部18と同様に、局所特徴量及び各局所特徴に対応する属性情報を抽出する。また、局所特徴抽出部20は、パラメータ記憶部16に記憶されている局所特徴量と属性情報との組を取得する。   The local feature extraction unit 20 extracts local feature amounts and attribute information corresponding to each local feature from the test image 42 as in the local feature extraction unit 18. In addition, the local feature extraction unit 20 acquires a set of the local feature amount and the attribute information stored in the parameter storage unit 16.

対応点決定部22は、テスト画像42及び訓練画像40の双方から抽出された局所特徴量を、特徴量の類似性に基づいて対応付ける。テスト画像42及び訓練画像40の双方から抽出された局所特徴量を対応付ける方法としては、任意の方法を用いることができ、例えば、上記参考文献2に開示されているような、画像間の各対応点ペアについて類似度を計算する方法、下記参考文献4で開示されている、k−d treeの高速に基づく近似近傍探索手法等が挙げられる。なお、誤対応を除去するため、最も類似した対応点ペアの類似度が、2番目に類似した対応点ペアの類似度よりも一定の閾値以上大きい場合にのみ、対応点ペアの類似度を計算するratio testを実施してもよい。   The corresponding point determination unit 22 associates local feature quantities extracted from both the test image 42 and the training image 40 based on the similarity of the feature quantities. An arbitrary method can be used as a method of correlating local feature quantities extracted from both the test image 42 and the training image 40. For example, each correspondence between images as disclosed in the above-mentioned reference 2 Examples include a method of calculating the degree of similarity for point pairs, and an approximate neighborhood search method based on k-d tree fast, which is disclosed in Reference 4 below. Note that, in order to remove the incorrect correspondence, the similarity of the corresponding point pair is calculated only when the similarity of the most similar corresponding point pair is larger by a certain threshold or more than the similarity of the second similar corresponding point pair. You may carry out a ratio test.

以下では、対応点決定部22により得られた訓練画像40とテスト画像42との対応点の組の集合を、

とする。
In the following, a set of corresponding points of the training image 40 and the test image 42 obtained by the corresponding point determination unit 22 is

I assume.

なお、

は、訓練画像40中の対応点座標であり、

は、テスト画像42中の対応点座標である。
Note that

Is the corresponding point coordinates in the training image 40,

Is the corresponding point coordinates in the test image 42.

[参考文献4]M. Muja et al., Fast Approximate Nearest Neighbors with Automatic Algorithm Configuration, in Proc. VISAPP, 2009. [Reference 4] M. Muja et al., Fast Approximate Nearest Neighbors with Automatic Algorithm Configuration, in Proc. VISAPP, 2009.

射影変換行列推定部24は、対応点決定部22で得られた対応点集合と、補助情報保存部14で得られた訓練画像40の変換パラメータ、テスト画像42に前処理部12の処理を施す際に得られた変換パラメータを入力として、カメラパラメータが既知あるいは推定可能な画像座標系における射影変換行列を推定する。該射影変換行列を推定する方法としては、例えば対応点の集合

に変換パラメータを適用し、得られた対応点集合

に下記参考文献5で開示されているDLTを適用する方法、対応点集合

からDLTで求められた射影変換行列を、訓練画像40及びテスト画像42の各々の変換パラメータを用いて変形する方法等を用いることができる。
The projective transformation matrix estimation unit 24 applies the processing of the preprocessing unit 12 to the corresponding point set obtained by the corresponding point determination unit 22, the conversion parameter of the training image 40 obtained by the auxiliary information storage unit 14, and the test image 42. The projective transformation matrix in the image coordinate system in which the camera parameters are known or can be estimated is estimated with the transformation parameter obtained at that time as an input. As a method of estimating the projective transformation matrix, for example, a set of corresponding points

Apply transformation parameters to the set of corresponding points obtained

Method for applying DLT disclosed in reference 5 below to corresponding points set

The projection transformation matrix obtained by DLT can be transformed using transformation parameters of the training image 40 and the test image 42, for example.

[参考文献5]R. Hartley et al., Multiple View Geometry in Computer Vision, 2004. [Reference 5] R. Hartley et al., Multiple View Geometry in Computer Vision, 2004.

対応点決定部22までに残ってしまった誤対応の影響を低減するため、上記参考文献5で開示されているRANSACをDLTと組み合わせて用いても良い。   In order to reduce the influence of erroneous correspondence left up to the correspondence point determination unit 22, RANSAC disclosed in the above-mentioned reference 5 may be used in combination with DLT.

射影変換行列推定部24で推定する射影変換行列は、訓練画像40の座標をテスト画像42に変換する行列であっても、テスト画像42の座標を訓練画像40に変換する行列であっても良い。なお、本実施形態では、テスト画像42を訓練画像40に変換する射影変換行列

を用いた場合について説明する。
The projective transformation matrix estimated by the projective transformation matrix estimation unit 24 may be a matrix that transforms the coordinates of the training image 40 into the test image 42 or a matrix that transforms the coordinates of the test image 42 into the training image 40 . In the present embodiment, a projection transformation matrix that transforms the test image 42 into the training image 40

The case where is used will be described.

射影変換行列分解部26は、射影変換行列推定部24で得られた射影変換行列を、下記(2)式に基づいて、画像間の相対回転情報、相対並進情報および平面物体の法線の候補解に分解する。具体的には、射影変換行列

を、下記(2)式に示すように、以下の関係性に基づいて回転行列

、並進ベクトル

、及び法線ベクトル

に分解する:

……(2)
The projective transformation matrix decomposing unit 26 uses the projection transformation matrix obtained by the projective transformation matrix estimating unit 24 as the relative rotation information between images, the relative translation information, and the candidate of the normal of the plane object based on the following equation (2) Break down into solutions. Specifically, the projective transformation matrix

As shown in the following equation (2), based on the following relationship:

, Translational vector

, And normal vectors

Disassemble:

...... (2)

なお、

はテスト画像42を撮影したカメラのカメラパラメータであり、

は訓練画像40を撮影したカメラのカメラパラメータである。
Note that

Is the camera parameter of the camera that captured the test image 42,

Is a camera parameter of the camera that captured the training image 40.

上記(2)式を満たす分解候補解を算出する公知の方法としては、例えば、上記非特許文献1で開示されている方法が挙げられる。   As a well-known method of calculating the decomposition | disassembly candidate solution which satisfy | fills said Formula (2), the method currently indicated by the said nonpatent literature 1 is mentioned, for example.

なお、上記非特許文献1で開示されている方法は、具体的には、下記(3)式〜(19)式を用いて求められる。なお、下記(7)式〜(19)式は、下記(6)式においてi=1であった場合について示した式である。   In addition, the method currently disclosed by the said nonpatent literature 1 is calculated | required specifically, using following (3) Formula-(19) Formula. In addition, following (7) Formula-(19) Formula is a formula shown about the case where it is i = 1 in following formula (6).


……(3)

...... (3)


……(4)

...... (4)


……(5)

...... (5)


……(6)

...... (6)


……(7)

...... (7)


……(8)

...... (8)


……(9)

...... (9)


……(10)

...... (10)


……(11)

...... (11)


……(12)

...... (12)


……(13)

...... (13)


……(14)

...... (14)


……(15)

...... (15)


……(16)

...... (16)


……(16)

...... (16)


……(18)

...... (18)


……(19)

...... (19)

なお、上記(2)式を満たす分解候補解を算出する公知の方法としては、上述した方法の他にも、下記参考文献6で開示されている方法、下記参考文献7で開示されている方法等を用いることができる。   In addition to the methods described above, the methods disclosed in the following reference 6 and the methods disclosed in the following reference 7 can be used as well-known methods for calculating decomposition candidate solutions that satisfy the above equation (2). Etc. can be used.

[参考文献6]O. Faugeras et al., Motion and structure from motion in a piecewise planar environment, International Journal of Pattern Recognition and Artificial Intelligence, 1988. [Reference 6] O. Faugeras et al., Motion and structure from motion in a piecewise planar environment, International Journal of Pattern Recognition and Artificial Intelligence, 1988.

[参考文献7]Z. Zhang et al., 3D Reconstruction based on Homography Mapping, in ARPA, 1996. [Reference 7] Z. Zhang et al., 3D Reconstruction based on Homography Mapping, in ARPA, 1996.


は、補助情報保存部14で得られたカメラパラメータを用いれば良い。

についても、事前にカメラパラメータが既知の場合にはそのカメラパラメータを用いれば良く、カメラパラメータが未知の場合には、テスト画像42のサイズ等から見積もったカメラパラメータを用いれば良い。なお、

の正確な値が分かっていない場合、掌性判定部28のみでは解を一意に特定できない場合がある。

The camera parameters obtained by the auxiliary information storage unit 14 may be used.

Also in the case where the camera parameter is known in advance, the camera parameter may be used, and when the camera parameter is unknown, the camera parameter estimated from the size of the test image 42 may be used. Note that

There is a case where it is not possible to uniquely identify the solution only by the hand-capability determination unit 28 when the exact value of is not known.

上記非特許文献3で開示されている技術を用いると、下記の4つの解候補が得られる:



The following four solution candidates can be obtained using the technology disclosed in the above-mentioned Non-Patent Document 3:



掌性判定部28は、射影変換行列分解部26で得られた候補解のうち、物理的に実現可能な解を絞り込む。候補解が物理的に実現可能な解か否かを判定する方法は、例えば、下記(1)乃至(3)に示す条件の全てを満たすか否かで判定することができる。   The handedness determining unit 28 narrows down physically feasible solutions among the candidate solutions obtained by the projective transformation matrix decomposing unit 26. The method for determining whether the candidate solution is a physically feasible solution can be determined, for example, based on whether all the conditions shown in the following (1) to (3) are satisfied.

(1)2つの画像は、被写体から見て同じ側から撮影されている、という制約(平面物体は透明でない)を満たすことを条件とする。すなわち、下記(20)式の条件を満たさなければ棄却する。

……(20)
(2)対応点は2つの画像どちらからも見える、という制約を満たすことを条件とする。画像内の対応点の同次座標を

として、下記(21)式の条件を満たさなければ棄却する。

……(21)
(3)各カメラ座標系から見たときの被写体の法線の向きは一致している、という制約を満たすことを条件とする。被写体法線の奥行きに対応する要素(例えば、z軸)の値が正でなければ棄却する。
(1) The condition is that the two images satisfy the constraint that the image is taken from the same side as viewed from the subject (a flat object is not transparent). That is, if the condition of the following equation (20) is not satisfied, it is rejected.

...... (20)
(2) The condition that the corresponding point can be seen from both of the two images is satisfied. Homogeneous coordinates of corresponding points in the image

If the condition of the following equation (21) is not satisfied:

...... (21)
(3) A condition is satisfied that the direction of the normal to the subject when viewed from each camera coordinate system is the same. If the value of an element (for example, the z-axis) corresponding to the depth of the subject normal is not positive, it is rejected.

射影変換行列分解部26で用いられる射影変換行列とカメラパラメータとが正確である場合、掌性判定部28によって解を一意に定めることができる。しかし、用いたカメラパラメータが粗く推定されたものである場合等では、掌性判定部28のみでは解を一意に特定することができない。   If the projective transformation matrix and the camera parameters used in the projective transformation matrix factorization unit 26 are correct, the handness determination unit 28 can uniquely determine a solution. However, if the camera parameters used are roughly estimated, etc., the hand can not be uniquely identified only by the hand determining unit 28.

解妥当性判定部30は、掌性判定部28で得られた解の法線を、補助情報保存部14で得られた訓練画像40中の被写体法線の情報と照合し、その解妥当性を判定する。解妥当性を判定する具体的な方法としては、例えば、補助情報保存部14から得られた、訓練画像40の画像座標系における平面物体の法線

と、掌性判定部28で得られた、テスト画像42の座標系からみた被写体の法線

を、訓練画像40の画像座標系における法線に変換したもの

とのコサイン類似度を算出し、算出したコサイン類似度が最も高く、かつ予め設定しておいた閾値以上のものを解として出力すればよい。
The solution validity determination unit 30 collates the normal of the solution obtained by the hand nature determination unit 28 with the information of the object normal in the training image 40 obtained by the auxiliary information storage unit 14, and the solution validity Determine As a specific method of determining solution validity, for example, the normal of a flat object in the image coordinate system of the training image 40 obtained from the auxiliary information storage unit 14

And the normal to the subject viewed from the coordinate system of the test image 42 obtained by the hand-capability determination unit 28

Converted to the normal in the image coordinate system of the training image 40

The calculated cosine similarity may be calculated, and the calculated cosine similarity may be the highest and may be output as a solution that is equal to or higher than a preset threshold.

角度算出部32は、解妥当性判定部30までの処理で得られた射影変換行列と、射影変換行列を分解して得られる回転行列、並進ベクトル、及び法線と、補助情報保存部14で得られた基準点の情報を用いて、実空間を考慮した平面物体とカメラとの相対角度を算出する。相対角度の算出は、例えば図5乃至7に示す手順で実施すればよい。   The angle calculation unit 32 uses a projective transformation matrix obtained by the processing up to the solution validity determination unit 30, a rotation matrix obtained by decomposing the projective transformation matrix, a translation vector, and a normal, and the auxiliary information storage unit 14. Using the information of the obtained reference point, the relative angle between the planar object and the camera considering the real space is calculated. The calculation of the relative angle may be performed, for example, in the procedure shown in FIGS.

すなわち、図5に示すように、下記(22)式を用いて、射影変換行列推定部24で得られた射影変換行列を用いて、補助情報保存部14で得られた各基準点

のテスト画像42の画像座標系における位置

を算出する。
That is, as shown in FIG. 5, each reference point obtained by the auxiliary information storage unit 14 using the projective transformation matrix obtained by the projective transformation matrix estimation unit 24 using the following equation (22)

The position of the test image 42 in the image coordinate system

Calculate


……(22)

...... (22)

また、図6に示すように、

及び

を用いて、下記(23)式を計算することにより、基準点の三次元空間上での位置を復元する。
Also, as shown in FIG.

as well as

The position of the reference point on the three-dimensional space is restored by calculating the following equation (23) using


……(23)

...... (23)

ただし、








とする。
However,








I assume.

また、図7に示すように、各基準点の3次元空間上での位置から、下記(24)式に基づいて、カメラの撮像面に対する被写体の方位角φを算出する。この際、角度算出部32は、下記(24)式を満たす角度φを方位角として出力する。   Further, as shown in FIG. 7, the azimuth angle φ of the subject with respect to the imaging surface of the camera is calculated based on the following equation (24) from the position of each reference point in the three-dimensional space. At this time, the angle calculation unit 32 outputs an angle φ satisfying the following equation (24) as an azimuth.


……(24)

...... (24)

なお、


とする。
Note that


I assume.

なお、本実施形態に係る相対角度推定装置10は、例えば、CPU(Central Processing Unit)、RAM(Random Access Memory)、各種プログラムを記憶するROM(Read Only Memory)を備えたコンピュータ装置で構成される。また、相対角度推定装置10を構成するコンピュータは、ハードディスクドライブ、不揮発性メモリ等の記憶部を備えていても良い。本実施形態では、CPUがROM、ハードディスク等の記憶部に記憶されているプログラムを読み出して実行することにより、上記のハードウェア資源とプログラムとが協働し、上述した機能が実現される。   The relative angle estimation device 10 according to the present embodiment is configured by, for example, a computer device provided with a central processing unit (CPU), a random access memory (RAM), and a read only memory (ROM) for storing various programs. . Moreover, the computer which comprises the relative angle estimation apparatus 10 may be equipped with memory | storage parts, such as a hard disk drive and non-volatile memory. In the present embodiment, when the CPU reads and executes the program stored in the storage unit such as the ROM and the hard disk, the above-described hardware resource and the program cooperate with each other to realize the above-described function.

本実施形態に係る相対角度推定装置10による補助情報記憶処理の流れを、図8に示すフローチャートを用いて説明する。本実施形態では、相対角度推定装置10に、補助情報記憶処理の実行を開始するための予め定めた情報が入力されたタイミングで補助情報記憶処理が開始されるが、補助情報記憶処理が開始されるタイミングはこれに限らず、例えば、訓練画像40が入力されたタイミングで補助情報記憶処理が開始されても良い。   The flow of the auxiliary information storage process by the relative angle estimation device 10 according to the present embodiment will be described using the flowchart shown in FIG. In the present embodiment, the auxiliary information storage process is started at a timing when predetermined information for starting execution of the auxiliary information storage process is input to the relative angle estimation device 10, but the auxiliary information storage process is started. The timing is not limited to this, and for example, the auxiliary information storage process may be started at the timing when the training image 40 is input.

ステップS101では、前処理部12が、相対角度の推定対象とする平面物体が写った訓練画像40、当該訓練画像40の撮影に用いたカメラのカメラパラメータ、当該訓練画像40に写った平面画像の法線の情報、及び、当該平面画像上の基準点の情報を入力する。   In step S101, the training image 40 in which the preprocessing unit 12 captures a flat object whose relative angle is to be estimated, the camera parameters of the camera used for shooting the training image 40, and the flat image in the training image 40 The information on the normal and the information on the reference point on the planar image are input.

ステップS103では、前処理部12が、入力した訓練画像40に対して前処理を実施する。また、この際に訓練画像40の画像座標系が変化する場合には、訓練画像40の座標を、前処理後の画像座標系の座標から前処理前の画像座標系の座標に変換するための変換パラメータを生成する。   In step S103, the preprocessing unit 12 performs preprocessing on the input training image 40. At this time, when the image coordinate system of the training image 40 changes, the coordinates of the training image 40 are converted from the coordinates of the image coordinate system after preprocessing to the coordinates of the image coordinate system before preprocessing. Generate conversion parameters.

ステップS105では、局所特徴抽出部18が、前処理が実施された訓練画像40から局所特徴量を抽出する。   In step S105, the local feature extraction unit 18 extracts local feature amounts from the training image 40 on which the preprocessing has been performed.

ステップS107では、補助情報保存部14が、入力したカメラパラメータ、入力した法線の情報、入力した基準点の情報、及び、生成した変換パラメータを、補助情報としてパラメータ記憶部16に記憶させると共に、局所特徴抽出部18により抽出された局所特徴量の情報をパラメータ記憶部16に記憶させ、本補助情報記憶処理のプログラムの実行を終了する。   In step S107, the auxiliary information storage unit 14 stores the input camera parameter, the input normal line information, the input reference point information, and the generated conversion parameter in the parameter storage unit 16 as auxiliary information. The information of the local feature amount extracted by the local feature extraction unit 18 is stored in the parameter storage unit 16, and the execution of the program of the auxiliary information storage process is ended.

次に、本実施形態に係る相対角度推定装置10による相対角度推定処理の流れを、図9に示すフローチャートを用いて説明する。本実施形態では、相対角度推定装置10に、相対角度推定処理の実行を開始するための予め定めた情報が入力されたタイミングで相対角度推定処理が開始されるが、相対角度推定処理が開始されるタイミングはこれに限らず、例えば、テスト画像42が入力されたタイミングで相対角度推定処理が開始されても良い。   Next, the flow of relative angle estimation processing by the relative angle estimation device 10 according to the present embodiment will be described using the flowchart shown in FIG. In this embodiment, the relative angle estimation process is started at the timing when the predetermined information for starting the execution of the relative angle estimation process is input to the relative angle estimation device 10, but the relative angle estimation process is started. For example, the relative angle estimation process may be started at the timing when the test image 42 is input.

ステップS201では、前処理部12が、テスト画像42を入力する。   In step S201, the preprocessing unit 12 inputs a test image 42.

ステップS203では、前処理部12が、入力したテスト画像42に対して前処理を実施する。また、この際にテスト画像42の画像座標系が変化する場合には、ステップS103と同様に、テスト画像42の座標を、前処理後の画像座標系の座標から前処理前の画像座標系の座標に変換するための変換パラメータを生成する。   In step S203, the preprocessing unit 12 performs preprocessing on the input test image 42. In addition, when the image coordinate system of the test image 42 changes at this time, the coordinates of the test image 42 are changed from the coordinates of the image coordinate system after preprocessing to that of the image coordinate system before preprocessing as in step S103. Generate transformation parameters for transformation to coordinates.

ステップS205は、局所特徴抽出部20が、前処理が実施されたテスト画像42から局所特徴量を抽出する。   In step S205, the local feature extraction unit 20 extracts a local feature amount from the test image 42 on which the pre-processing has been performed.

ステップS207では、対応点決定部22が、パラメータ記憶部16に記憶されている訓練画像40の局所特徴量と、抽出したテスト画像42から抽出した局所特徴量とを用いて、訓練画像40とテスト画像42とにおける対応点を決定する。   In step S207, the corresponding point determination unit 22 uses the local feature of the training image 40 stored in the parameter storage unit 16 and the local feature extracted from the extracted test image 42 to execute the training image 40 and the test. The corresponding points in the image 42 are determined.

ステップS209では、射影変換行列推定部24が、パラメータ記憶部16に記憶されているカメラパラメータ及び変換パラメータと、対応点決定部22により決定された対応点の集合とから、訓練画像40をテスト画像42に射影変換するための射影変換行列を推定する。   In step S209, the projective transformation matrix estimation unit 24 uses the camera parameters and transformation parameters stored in the parameter storage unit 16 and the set of corresponding points determined by the corresponding point determination unit 22 as a test image for the test image Estimate a projective transformation matrix for projective transformation to 42.

ステップS211では、射影変換行列分解部26が、推定された射影変換行列を、訓練画像40とテスト画像42との間の回転及び並進運動とテスト画像42に写った平面物体の法線とに分解したときの複数の解候補を算出する。   In step S211, the projective transformation matrix decomposing unit 26 decomposes the estimated projective transformation matrix into the rotation and translation between the training image 40 and the test image 42 and the normal of the planar object captured in the test image 42. Calculate multiple solution candidates when you

ステップS213では、掌性判定部28が、上述した予め定められた制約に基づいて、算出された複数の解候補から、物理的に実現可能な解候補を選択する。   In step S213, the palmarity determination unit 28 selects a physically feasible solution candidate from the calculated plurality of solution candidates based on the above-described predetermined constraints.

ステップS215では、解妥当性判定部30が、掌性判定部28により選択された、物理的に実現可能な解候補を入力し、推定された射影変換行列を用いて、解候補の法線とパラメータ記憶部16に記憶されている訓練画像40の法線と照合し、1つの解候補を選択する。   In step S215, the solution validity determination unit 30 receives the physically feasible solution candidate selected by the hand property determination unit 28, and uses the estimated projective transformation matrix to determine the normal of the solution candidate and The normal of the training image 40 stored in the parameter storage unit 16 is checked to select one solution candidate.

ステップS217では、角度算出部32が、パラメータ記憶部16に記憶されている基準点の情報と、解妥当性判定部により選択された1つの解候補の回転及び並進運動と、射影変換行列とから、テスト画像42に写った平面物体とテスト画像42を撮影したカメラとの相対角度を算出する。   In step S217, the angle calculation unit 32 uses the information of the reference point stored in the parameter storage unit 16, the rotation and translational motion of one solution candidate selected by the solution validity determination unit, and the projective transformation matrix. Then, the relative angle between the planar object shown in the test image 42 and the camera that has taken the test image 42 is calculated.

ステップS219では、角度算出部32が、算出した相対角度を出力し、本相対角度推定処理のプログラムの実行を終了する。なお、本実施形態では、算出した相対角度を示すデータをディスプレイ等の表示手段に表示させたり、算出した相対角度を示すデータを外部装置に送信したり、算出した相対角度を示すデータを記憶手段に記憶させたりすることにより、算出した相対角度に関するデータを出力する。   In step S219, the angle calculation unit 32 outputs the calculated relative angle, and the execution of the program of the present relative angle estimation process ends. In the present embodiment, data indicating the calculated relative angle is displayed on a display means such as a display, data indicating the calculated relative angle is transmitted to an external device, and data indicating the calculated relative angle is stored. By storing the data, the data relating to the calculated relative angle is output.

このように、本実施形態では、平面物体が写る訓練画像40及びテスト画像42の各々から局所特徴量を抽出し、訓練画像40に写る平面物体上の複数の基準点の情報、訓練画像40を撮影したカメラのカメラパラメータ、及び訓練画像40に写る平面物体の法線を記憶する。また、訓練画像40の局所特徴量とテスト画像42の局所特徴量とから訓練画像40とテスト画像42とにおける対応点を決定する。また、カメラパラメータと、決定された対応点の集合とから、訓練画像40をテスト画像42に射影変換するための射影変換行列を推定する。また、推定された射影変換行列を、訓練画像40とテスト画像42との間の回転及び並進運動とテスト画像42に写る平面物体の法線とに分解したときの複数の解候補を算出する。また、予め定められた制約に基づいて、算出された複数の解候補から、物理的に実現可能な解候補を選択する。また、選択された解候補を入力し、推定された射影変換行列を用いて、解候補の法線と訓練画像40の法線と照合し、1つの解候補を選択する。そして、複数の基準点の情報と、選択された1つの解候補の回転及び並進運動と、射影変換行列とから、テスト画像42に写る平面物体とテスト画像42を撮影したカメラとの相対角度を算出する。   As described above, in the present embodiment, local feature quantities are extracted from each of the training image 40 and the test image 42 in which the flat object appears, and information on a plurality of reference points on the flat object in the training image 40 The camera parameters of the photographed camera and the normal of the flat object shown in the training image 40 are stored. Also, corresponding points in the training image 40 and the test image 42 are determined from the local feature quantities of the training image 40 and the local feature quantities of the test image 42. Also, a projection transformation matrix for projective transformation of the training image 40 into the test image 42 is estimated from the camera parameters and the set of determined corresponding points. Also, a plurality of solution candidates are calculated when the estimated projection transformation matrix is decomposed into the rotation and translation between the training image 40 and the test image 42 and the normals of the planar object shown in the test image 42. In addition, physically feasible solution candidates are selected from the plurality of calculated solution candidates based on predetermined constraints. Also, the selected solution candidate is input, and the estimated projective transformation matrix is used to collate the normal of the solution candidate with the normal of the training image 40 to select one solution candidate. Then, based on information of a plurality of reference points, the rotation and translation of one selected solution candidate, and the projective transformation matrix, the relative angle between the planar object captured in the test image 42 and the camera that captured the test image 42 calculate.

また、テスト画像42に写る平面物体とテスト画像42を撮影したカメラとの相対角度を算出する際には、解妥当性判定部30により選択された解候補の回転及び並進運動と、射影変換行列とを用いて算出した複数の基準点の三次元空間上の位置に基づいて、相対角度を算出する。   In addition, when calculating the relative angle between the planar object shown in the test image 42 and the camera that captured the test image 42, the rotation and translational motion of the solution candidate selected by the solution validity determination unit 30, and the projective transformation matrix The relative angle is calculated based on the position in the three-dimensional space of the plurality of reference points calculated using.

また、平面物体が写る訓練画像40及びテスト画像42を入力し、訓練画像40及びテスト画像42の各々に対して前処理を実施し、訓練画像40及びテスト画像42の各々に対して、前処理の前後の変換パラメータを更に記憶する。また、カメラパラメータと、決定された対応点の集合と、変換パラメータとから、前処理が実施される前の、訓練画像40をテスト画像42に射影変換するための射影変換行列を推定する。   Also, a training image 40 and a test image 42 showing a flat object are input, pre-processing is performed on each of the training image 40 and the test image 42, and pre-processing is performed on each of the training image 40 and the test image 42. The transformation parameters before and after are further stored. Also, from the camera parameters, the determined set of corresponding points, and the transformation parameters, a projection transformation matrix for projective transformation of the training image 40 into the test image 42 before the preprocessing is performed is estimated.

これにより、テスト画像42の撮影に用いられたカメラのパラメータが未知であっても、精度良く被写体とカメラとの相対角度を推定したり、推定精度が低いものは事前に棄却したりすることが可能になる。また、相対角度の推定に用いられる訓練画像40及びテスト画像42に前処理が施されていても、上記相対角度を精度良く推定することができる。更には、テスト画像42が平面物体を捉えている状態によらず、実空間の情報を考慮した相対角度が算出できる。   Thereby, even if the parameters of the camera used to capture the test image 42 are unknown, the relative angle between the subject and the camera can be accurately estimated, or those with low estimation accuracy can be rejected in advance. It will be possible. Further, even if the training image 40 and the test image 42 used for estimation of the relative angle are preprocessed, the relative angle can be accurately estimated. Furthermore, regardless of the state in which the test image 42 captures a planar object, it is possible to calculate a relative angle in consideration of information in the real space.

<第2実施形態> Second Embodiment

次に、第2実施形態に係る相対角度推定装置について説明する。   Next, a relative angle estimation device according to a second embodiment will be described.

上述した第1実施形態では、1つの平面物体が写ったテスト画像42を入力すると共に、当該平面物体が写った1枚の訓練画像40を入力する場合について説明した。一方、本第2実施形態では、複数の平面物体のうちの何れか1つが写ったテスト画像42を入力すると共に、複数の平面物体の各々について、当該平面物体が正面から撮影された1枚ずつの訓練画像40を入力する場合について説明する。   In the first embodiment described above, the case has been described in which the test image 42 in which one planar object is photographed is input and the one training image 40 in which the planar object is photographed is input. On the other hand, in the second embodiment, the test image 42 in which any one of a plurality of planar objects is captured is input, and for each of the plurality of planar objects, the planar object is photographed one by one from the front. The case of inputting the training image 40 of FIG.

図10に、第2実施形態に係る相対角度推定装置の機能的な構成を示す。第2実施形態に係る相対角度推定装置10Aの構成は、候補画像選択部50を除いて、上記第1実施形態に係る相対角度推定装置10と同じであるため、候補画像選択部50以外の各構成の説明を省略する。   FIG. 10 shows a functional configuration of the relative angle estimation device according to the second embodiment. The configuration of the relative angle estimation device 10A according to the second embodiment is the same as the relative angle estimation device 10 according to the first embodiment except for the candidate image selection unit 50. Description of the configuration is omitted.

本実施形態に係る相対角度推定装置10Aは、テスト画像42が入力されると、テスト画像42に写る平面物体の種類と、テスト画像42を撮影したカメラの撮像面に対するテスト画像42に写った平面物体の方位角を相対角度として出力する。   When the test image 42 is input, the relative angle estimation device 10A according to the present embodiment receives the type of the planar object shown in the test image 42 and the plane shown in the test image 42 with respect to the imaging surface of the camera that shot the test image Output the azimuth of the object as a relative angle.

ここで、訓練画像40として複数の訓練画像40を入力した場合、入力した全ての訓練画像40についてテスト画像42との対応付けを行う必要があるため、計算コストが高くなってしまう。   Here, in the case where a plurality of training images 40 are input as the training image 40, it is necessary to associate all the training images 40 input with the test image 42, which increases the calculation cost.

候補画像選択部50は、予め定めた基準で、入力したテスト画像42に最も類似した1枚の訓練画像40を選択する。なお、テスト画像42に最も類似した訓練画像40の選択方法としては、例えば、色ヒストグラムに基づく画像類似度を評価する方法、下記参考文献8に開示されている、幾何情報を保存した投票ベースの方法等が挙げられる。   The candidate image selection unit 50 selects one training image 40 most similar to the input test image 42 based on a predetermined standard. In addition, as a selection method of the training image 40 most similar to the test image 42, for example, a method of evaluating image similarity based on a color histogram, a voting base disclosed in reference 8 below, which stores geometric information. Methods etc.

[参考文献8]特開2016−018444号公報 [Reference 8] Japanese Patent Application Laid-Open No. 2016-018444

次に、本実施形態に係る相対角度推定装置10Aによる相対角度推定処理の流れを、図9に示すフローチャートを用いて説明する。本実施形態では、相対角度推定装置10Aに、相対角度推定処理の実行を開始するための予め定めた情報が入力されたタイミングで相対角度推定処理が開始されるが、相対角度推定処理が開始されるタイミングはこれに限らず、例えば、テスト画像42が入力されたタイミングで相対角度推定処理が開始されても良い。   Next, the flow of relative angle estimation processing by the relative angle estimation device 10A according to the present embodiment will be described using the flowchart shown in FIG. In the present embodiment, the relative angle estimation process is started at the timing when predetermined information for starting execution of the relative angle estimation process is input to the relative angle estimation device 10A, but the relative angle estimation process is started. For example, the relative angle estimation process may be started at the timing when the test image 42 is input.

なお、本実施形態では、各々種類が異なる平面物体が写った複数の訓練画像40が入力され、複数の訓練画像40の各々の法線の情報がパラメータ記憶部16に記憶されているものとする。   In the present embodiment, it is assumed that a plurality of training images 40 in which planar objects of different types are captured are input, and information on normals of the plurality of training images 40 is stored in the parameter storage unit 16. .

ステップS301では、前処理部12が、テスト画像42を入力する。   In step S301, the preprocessing unit 12 inputs a test image 42.

ステップS303では、前処理部12が、入力したテスト画像42に対して前処理を実施する。また、この際にテスト画像42の画像座標系が変化する場合には、ステップS203と同様に、テスト画像42の座標を、前処理後の画像座標系の座標から前処理前の画像座標系の座標に変換するための変換パラメータを生成する。   In step S303, the preprocessing unit 12 performs preprocessing on the input test image 42. In addition, when the image coordinate system of the test image 42 changes at this time, the coordinates of the test image 42 are changed from the coordinates of the image coordinate system after preprocessing to that of the image coordinate system before preprocessing as in step S203. Generate transformation parameters for transformation to coordinates.

ステップS305は、局所特徴抽出部20が、前処理が実施されたテスト画像42から局所特徴量を抽出する。   In step S305, the local feature extraction unit 20 extracts local feature amounts from the test image 42 on which the pre-processing has been performed.

ステップS307は、候補画像選択部50が、複数の訓練画像40から、テスト画像42と最も類似する訓練画像40を選択する。   In step S <b> 307, the candidate image selection unit 50 selects a training image 40 most similar to the test image 42 from the plurality of training images 40.

ステップS309では、対応点決定部22が、パラメータ記憶部16に記憶されている、選択された訓練画像40の局所特徴量と、抽出したテスト画像42から抽出した局所特徴量とを用いて、選択された訓練画像40とテスト画像42とにおける対応点を決定する。   In step S309, the corresponding point determination unit 22 performs selection using the local feature of the selected training image 40 stored in the parameter storage unit 16 and the local feature extracted from the extracted test image 42. The corresponding points in the training image 40 and the test image 42 are determined.

ステップS311では、射影変換行列推定部24が、パラメータ記憶部16に記憶されているカメラパラメータ及び変換パラメータと、対応点決定部22により決定された対応点の集合とから、訓練画像40をテスト画像42に射影変換するための射影変換行列を推定する。   In step S311, the projective transformation matrix estimation unit 24 uses the camera parameters and transformation parameters stored in the parameter storage unit 16 and the set of corresponding points determined by the corresponding point determination unit 22 as a test image for the test image Estimate a projective transformation matrix for projective transformation to 42.

ステップS313では、射影変換行列分解部26が、推定された射影変換行列を、訓練画像40とテスト画像42との間の回転及び並進運動とテスト画像42に写った平面物体の法線とに分解したときの複数の解候補を算出する。   In step S313, the projective transformation matrix decomposition unit 26 decomposes the estimated projective transformation matrix into the rotation and translation between the training image 40 and the test image 42 and the normal of the planar object captured in the test image 42. Calculate multiple solution candidates when you

ステップS315では、掌性判定部28が、上述した予め定められた制約に基づいて、算出された複数の解候補から、物理的に実現可能な解候補を選択する。   In step S315, the palmarity determination unit 28 selects a physically feasible solution candidate from among the calculated plurality of solution candidates based on the above-described predetermined constraints.

ステップS317では、解妥当性判定部30が、掌性判定部28により選択された、物理的に実現可能な解候補を入力し、推定された射影変換行列を用いて、解候補の法線とパラメータ記憶部16に記憶されている訓練画像40の法線と照合し、1つの解候補を選択する。   In step S317, the solution validity determining unit 30 receives the physically feasible solution candidate selected by the hand determining unit 28, and uses the estimated projective transformation matrix to determine the normal of the solution candidate and The normal of the training image 40 stored in the parameter storage unit 16 is checked to select one solution candidate.

ステップS319では、角度算出部32が、パラメータ記憶部16に記憶されている基準点の情報と、解妥当性判定部により選択された1つの解候補の回転及び並進運動と、射影変換行列とから、テスト画像42に写った平面物体とテスト画像42を撮影したカメラとの相対角度を算出する。   In step S319, the angle calculation unit 32 uses the information of the reference point stored in the parameter storage unit 16, the rotation and translational motion of one solution candidate selected by the solution validity determination unit, and the projective transformation matrix. Then, the relative angle between the planar object shown in the test image 42 and the camera that has taken the test image 42 is calculated.

ステップS321では、角度算出部32が、算出した相対角度を出力し、本相対角度推定処理のプログラムの実行を終了する。なお、本実施形態では、算出した相対角度を示すデータをディスプレイ等の表示手段に表示させたり、算出した相対角度を示すデータを外部装置に送信したり、算出した相対角度を示すデータを記憶手段に記憶させたりすることにより、算出した相対角度に関するデータを出力する。   In step S321, the angle calculation unit 32 outputs the calculated relative angle, and ends the execution of the program of the relative angle estimation process. In the present embodiment, data indicating the calculated relative angle is displayed on a display means such as a display, data indicating the calculated relative angle is transmitted to an external device, and data indicating the calculated relative angle is stored. By storing the data, the data relating to the calculated relative angle is output.

このようにして、本実施形態では、テスト画像42に平面画像が写っている場合に、複数の訓練画像40から、テスト画像42と最も類似前記訓練画像40を選択する。   In this manner, in the present embodiment, when a planar image is captured in the test image 42, the training image 40 most similar to the test image 42 is selected from the plurality of training images 40.

<第3実施形態> Third Embodiment

次に、第3実施形態に係る相対角度推定装置について説明する。   Next, a relative angle estimation device according to a third embodiment will be described.

上述した第1実施形態及び第2実施形態では、訓練画像40における平面物体の法線の情報を入力する場合について説明した。一方、本第3実施形態では、入力した訓練画像40から平面物体の法線を推定する場合について説明する。   In the first embodiment and the second embodiment described above, the case of inputting the information on the normal of the flat object in the training image 40 has been described. On the other hand, in the third embodiment, the case of estimating the normal of the planar object from the input training image 40 will be described.

第3実施形態に係る相対角度推定装置の構成は、被写体法線推定部60を除いて、上記第2実施形態に係る相対角度推定装置10Aと同じであるため、被写体法線推定部60以外の各構成の説明を省略する。   The configuration of the relative angle estimation device according to the third embodiment is the same as the relative angle estimation device 10A according to the second embodiment except for the subject normal direction estimation unit 60. Description of each configuration is omitted.

図11に、第3実施形態に係る相対角度推定装置10Bの構成を示す。本実施形態では、認識対象となる被写体が複数種類存在し、各被写体について様々な方向から撮影した複数の画像を訓練画像40として登録するものとする。テスト画像42が入力されると、相対角度推定装置10Bは、テスト画像42に写る被写体の種類と、被写体とカメラとの方位角を相対角度として出力する。各被写体について様々な方向から撮影された画像をデータベースに登録することで、テスト画像42に写る被写体を認識する精度がより向上する。一方で、訓練画像40は被写体を任意の方向から撮影したものであるため、その法線を手動でアノテーションするのには非常に手間がかかる。   FIG. 11 shows the configuration of a relative angle estimation device 10B according to the third embodiment. In this embodiment, a plurality of types of subjects to be recognized exist, and a plurality of images captured from various directions for each subject are registered as the training image 40. When the test image 42 is input, the relative angle estimation device 10B outputs, as a relative angle, the type of the subject shown in the test image 42 and the azimuth between the subject and the camera. By registering images captured from various directions for each subject in the database, the accuracy of recognizing the subject shown in the test image 42 is further improved. On the other hand, since the training image 40 is an image of the subject taken from an arbitrary direction, it takes a lot of time to manually annotate the normal.

そこで、被写体法線推定部60は、同一の被写体が写る画像が複数撮影されていることを活用して、個々の画像に写る被写体の法線を自動で推定する。これを実現する方法としては、例えば参考文献9に示すような、同一被写体が写る画像集合の中で一貫性が高くなるように個々の画像に写る被写体の法線を推定する方法を用いることができる。   Therefore, the subject normal direction estimation unit 60 automatically estimates the normals of subjects appearing in individual images by taking advantage of the fact that a plurality of images in which the same subject appears are taken. As a method of realizing this, for example, as shown in reference 9, a method of estimating the normal line of the subject shown in each image so as to be highly consistent in the image set showing the same subject is used. it can.

また、画像の中で正面から撮影した画像がわかっている場合は、その画像における被写体法線の情報(法線は奥行き方向にのみ値を持つベクトルとおける)を補助情報として用いることもできる。   In addition, when the image captured from the front in the image is known, the information of the object normal in the image (the normal may be a vector having a value only in the depth direction) may be used as the auxiliary information.

[参考文献9]特願2016−244526号公報 [Reference 9] Japanese Patent Application No. 2016-244526

次に、本実施形態に係る相対角度推定装置10Bによる補助情報記憶処理の流れを、図13に示すフローチャートを用いて説明する。本実施形態では、相対角度推定装置10Bに、補助情報記憶処理の実行を開始するための予め定めた情報が入力されたタイミングで補助情報記憶処理が開始されるが、補助情報記憶処理が開始されるタイミングはこれに限らず、例えば、訓練画像40が入力されたタイミングで補助情報記憶処理が開始されても良い。   Next, the flow of the auxiliary information storage process by the relative angle estimation device 10B according to the present embodiment will be described using the flowchart shown in FIG. In the present embodiment, the auxiliary information storage process is started at a timing when predetermined information for starting execution of the auxiliary information storage process is input to the relative angle estimation device 10B, but the auxiliary information storage process is started. The timing is not limited to this, and for example, the auxiliary information storage process may be started at the timing when the training image 40 is input.

ステップS401では、前処理部12が、相対角度の推定対象とする平面物体が写った訓練画像40、当該訓練画像40の撮影に用いたカメラのカメラパラメータ、及び、当該平面画像上の基準点の情報を入力する。   In step S401, the training image 40 in which the preprocessing unit 12 captures a flat object whose relative angle is to be estimated, the camera parameters of the camera used for shooting the training image 40, and the reference points on the flat image Enter information.

ステップS403では、前処理部12が、入力した訓練画像40に対して前処理を実施する。また、この際に訓練画像40の画像座標系が変化する場合には、訓練画像40の座標を、前処理後の画像座標系の座標から前処理前の画像座標系の座標に変換するための変換パラメータを生成する。   In step S403, the preprocessing unit 12 performs preprocessing on the input training image 40. At this time, when the image coordinate system of the training image 40 changes, the coordinates of the training image 40 are converted from the coordinates of the image coordinate system after preprocessing to the coordinates of the image coordinate system before preprocessing. Generate conversion parameters.

ステップS405では、局所特徴抽出部18が、前処理が実施された訓練画像40から局所特徴量を抽出する。   In step S405, the local feature extraction unit 18 extracts local feature amounts from the training image 40 on which the preprocessing has been performed.

ステップS407では、被写体法線推定部60が、平面物体の種類毎に、同一の平面物体が写った複数の訓練画像40を用いて、各訓練画像40に写る当該平面物体の法線を推定する。   In step S <b> 407, the subject normal direction estimation unit 60 estimates, for each type of planar object, the normals of the planar object shown in each training image 40 using a plurality of training images 40 in which the same planar object appears. .

ステップS409では、補助情報保存部14が、入力したカメラパラメータ、推定した法線の情報、入力した基準点の情報、及び、生成した変換パラメータを、補助情報としてパラメータ記憶部16に記憶させると共に、局所特徴抽出部18により抽出された局所特徴量の情報をパラメータ記憶部16に記憶させ、本補助情報記憶処理のプログラムの実行を終了する。   In step S409, the auxiliary information storage unit 14 stores the input camera parameter, information of the estimated normal, information of the input reference point, and the generated conversion parameter in the parameter storage unit 16 as auxiliary information. The information of the local feature amount extracted by the local feature extraction unit 18 is stored in the parameter storage unit 16, and the execution of the program of the auxiliary information storage process is ended.

このように、本実施形態では、訓練画像40に写る平面物体の法線を推定し、推定された、訓練画像40に写る平面物体の法線をパラメータ記憶部16に記憶させる。   As described above, in the present embodiment, the normal of the planar object shown in the training image 40 is estimated, and the estimated normal of the planar object shown in the training image 40 is stored in the parameter storage unit 16.

なお、本実施形態では、図1に示す機能の構成要素の動作をプログラムとして構築し、相対角度推定装置10、10Aとして利用されるコンピュータにインストールして実行させるが、これに限らず、ネットワークを介して流通させても良い。   In this embodiment, the operation of the component of the function shown in FIG. 1 is constructed as a program and installed in a computer used as the relative angle estimation device 10 or 10A and executed, but the present invention is not limited thereto. You may distribute it through.

また、構築されたプログラムをハードディスク、CD−ROM等の可搬記憶媒体に格納し、コンピュータにインストールしたり、配布したりしても良い。   Further, the constructed program may be stored in a portable storage medium such as a hard disk or a CD-ROM, and may be installed in a computer or distributed.

10 相対角度推定装置
12 前処理部
14 補助情報保存部
16 パラメータ記憶部
18、20 局所特徴抽出部
22 対応点決定部
24 射影変換行列推定部
26 射影変換行列分解部
28 掌性判定部
30 解妥当性判定部
32 角度算出部
34 訓練部
36 認識部
50 候補画像選択部
60 被写体法線推定部
10 Relative Angle Estimation Device 12 Preprocessing Unit 14 Auxiliary Information Storage Unit 16 Parameter Storage Unit 18 and 20 Local Feature Extraction Unit 22 Corresponding Point Determination Unit 24 Projective Transformation Matrix Estimation Unit 26 Projective Transformation Matrix Decomposition Unit 28 Palmarity Determination Unit 30 Solution Validity Ability judgment unit 32 Angle calculation unit 34 Training unit 36 Recognition unit 50 Candidate image selection unit 60 Subject normal line estimation unit

Claims (7)

平面物体が写る訓練画像及びテスト画像の各々から局所特徴量を抽出する局所特徴抽出部と、
前記訓練画像に写る前記平面物体上の複数の基準点の情報、前記訓練画像を撮影したカメラのカメラパラメータ、及び前記訓練画像に写る前記平面物体の法線を記憶する補助情報保存部と、
前記訓練画像の局所特徴量と前記テスト画像の局所特徴量とから前記訓練画像と前記テスト画像とにおける対応点を決定する対応点決定部と、
前記対応点決定部より決定された対応点の集合から、前記訓練画像を前記テスト画像に射影変換するための射影変換行列を推定する射影変換行列推定部と、
前記カメラパラメータから、前記射影変換行列推定部により推定された前記射影変換行列を、前記訓練画像と前記テスト画像との間の回転及び並進運動と前記テスト画像に写る前記平面物体の法線とに分解したときの複数の解候補を算出する射影変換行列分解部と、
予め定められた制約に基づいて、前記射影変換行列分解部により算出された前記複数の解候補から、物理的に実現可能な前記解候補を選択する掌性判定部と、
前記掌性判定部により選択された前記解候補を入力し、前記射影変換行列推定部により推定された前記射影変換行列を用いて、前記解候補の前記法線と前記訓練画像の前記法線と照合し、1つの前記解候補を選択する解妥当性判定部と、
前記複数の基準点の情報と、前記解妥当性判定部により選択された前記解候補の前記回転及び並進運動と、前記射影変換行列とから、前記テスト画像に写る前記平面物体と前記テスト画像を撮影したカメラとの相対角度を算出する角度算出部と、
を含む相対角度推定装置。
A local feature extraction unit for extracting local feature amounts from each of a training image and a test image in which a planar object is taken;
An auxiliary information storage unit that stores information of a plurality of reference points on the planar object captured in the training image, camera parameters of a camera that captured the training image, and a normal of the planar object captured in the training image;
A corresponding point determination unit that determines corresponding points in the training image and the test image from the local feature of the training image and the local feature of the test image;
A projective transformation matrix estimation unit for estimating a projective transformation matrix for projective transformation of the training image to the test image from the set of corresponding points determined by the corresponding point determination unit;
The projective transformation matrix estimated by the projective transformation matrix estimation unit from the camera parameters is converted into rotation and translation between the training image and the test image, and a normal of the planar object captured in the test image. A projective transformation matrix factorization unit for calculating a plurality of solution candidates when being decomposed;
A handness determination unit which selects the physically feasible solution candidate from the plurality of solution candidates calculated by the projective transformation matrix decomposing unit based on a predetermined constraint;
The solution candidate selected by the hand determining unit is input, and the normal of the solution candidate and the normal of the training image are input using the projective transformation matrix estimated by the projective transformation matrix estimating unit. A solution validity determination unit that collates and selects one solution candidate;
The planar object and the test image reflected in the test image are obtained from information on the plurality of reference points, the rotation and translational motion of the solution candidate selected by the solution validity determination unit, and the projective transformation matrix. An angle calculation unit that calculates a relative angle with a captured camera;
Relative angle estimation device including.
前記角度算出部は、前記解妥当性判定部により選択された前記解候補の前記回転及び並進運動と、前記射影変換行列とを用いて算出した前記複数の基準点の三次元空間上の位置に基づいて、前記相対角度を算出する
請求項1記載の相対角度推定装置。
The angle calculation unit is configured to calculate the positions of the plurality of reference points in three-dimensional space calculated using the rotation and translational motion of the solution candidate selected by the solution validity determination unit and the projective transformation matrix. The relative angle estimation device according to claim 1, wherein the relative angle is calculated based on the relative angle.
平面物体が写る訓練画像及びテスト画像を入力し、前記訓練画像及び前記テスト画像の各々に対して前処理を実施する前処理部を更に含み、
前記補助情報保存部は、前記訓練画像及び前記テスト画像の各々に対して、前記前処理の前後の変換パラメータを更に記憶し、
前記射影変換行列推定部は、前記カメラパラメータと、前記対応点決定部により決定された対応点の集合と、前記変換パラメータとから、前記前処理部により前処理が実施される前の、前記訓練画像を前記テスト画像に射影変換するための射影変換行列を推定する
請求項1記載の相対角度推定装置。
The method further includes a pre-processing unit that inputs a training image and a test image in which a planar object is taken, and performs preprocessing on each of the training image and the test image,
The auxiliary information storage unit further stores, for each of the training image and the test image, conversion parameters before and after the preprocessing.
The projective transformation matrix estimation unit performs the training before the preprocessing is performed by the preprocessing unit from the camera parameter, the set of corresponding points determined by the corresponding point determination unit, and the conversion parameter. The relative angle estimation device according to claim 1, wherein a projective transformation matrix for projective transforming an image into the test image is estimated.
複数の前記訓練画像を入力した場合、前記複数の前記訓練画像から、前記テスト画像と最も類似する前記訓練画像を選択する候補画像選択部を更に含む
請求項1〜3の何れか1項記載の相対角度推定装置。
The candidate image selection part which selects the said training image most similar to the said test image from the said some said training images is further included, when the said some training image is input. Relative angle estimation device.
前記訓練画像に写る前記平面物体の法線を推定する被写体法線推定部を更に含み、
前記補助情報保存部は、前記被写体法線推定部によって推定された、前記訓練画像に写る前記平面物体の法線を記憶する
請求項1〜4の何れか1項記載の相対角度推定装置。
The image processing apparatus further includes a subject normal estimating unit for estimating a normal of the planar object shown in the training image,
The relative angle estimation device according to any one of claims 1 to 4, wherein the auxiliary information storage unit stores the normal of the planar object shown in the training image estimated by the subject normal estimation unit.
局所特徴抽出部と、訓練画像に写る平面物体上の複数の基準点の情報、前記訓練画像を撮影したカメラのカメラパラメータ、及び前記訓練画像に写る前記平面物体の法線を記憶する補助情報保存部と、対応点決定部と、射影変換行列推定部と、射影変換行列分解部と、掌性判定部と、解妥当性判定部と、及び角度算出部とを有する相対角度推定装置における相対角度推定方法であって、
前記局所特徴抽出部が、前記訓練画像及びテスト画像の各々から局所特徴量を抽出するステップと、
前記対応点決定部が、前記訓練画像の局所特徴量と前記テスト画像の局所特徴量とから前記訓練画像と前記テスト画像とにおける対応点を決定する対応点決定部と、
前記射影変換行列推定部が、前記対応点決定部より決定された対応点の集合から、前記訓練画像を前記テスト画像に射影変換するための射影変換行列を推定するステップと、
前記射影変換行列分解部が、前記カメラパラメータから、前記射影変換行列推定部により推定された前記射影変換行列を、前記訓練画像と前記テスト画像との間の回転及び並進運動と前記テスト画像に写る前記平面物体の法線とに分解したときの複数の解候補を算出するステップと、
前記掌性判定部が、予め定められた制約に基づいて、前記射影変換行列分解部により算出された前記複数の解候補から、物理的に実現可能な前記解候補を選択するステップと、
前記解妥当性判定部が、前記掌性判定部により選択された前記解候補を入力し、前記射影変換行列推定部により推定された前記射影変換行列を用いて、前記解候補の前記法線と前記訓練画像の前記法線と照合し、1つの前記解候補を選択するステップと、
角度算出部が、前記複数の基準点の情報と、前記解妥当性判定部により選択された前記解候補の前記回転及び並進運動と、前記射影変換行列とから、前記テスト画像に写る前記平面物体と前記テスト画像を撮影したカメラとの相対角度を算出するステップと、
を含む相対角度推定方法。
A local feature extraction unit, information of a plurality of reference points on a planar object captured in a training image, camera parameters of a camera that captured the training image, and auxiliary information storage storing normals of the planar object captured in the training image Relative angle in a relative angle estimation apparatus including a division unit, a corresponding point determination unit, a projective transformation matrix estimation unit, a projective transformation matrix decomposition unit, a handedness determination unit, a solution validity determination unit, and an angle calculation unit The estimation method,
Extracting the local feature amount from each of the training image and the test image by the local feature extraction unit;
A corresponding point determination unit that determines corresponding points in the training image and the test image from the local feature amount of the training image and the local feature amount of the test image;
The projective transformation matrix estimating unit estimating a projective transformation matrix for projective transforming the training image to the test image from the set of corresponding points determined by the corresponding point determining unit;
The projective transformation matrix decomposing unit reflects the projective transformation matrix estimated by the projective transformation matrix estimating unit from the camera parameters in rotation and translation between the training image and the test image and the test image Calculating a plurality of solution candidates when being decomposed into the normal of the planar object;
Selecting the physically feasible solution candidate from the plurality of solution candidates calculated by the projective transformation matrix decomposing unit based on a predetermined constraint;
The solution validity determining unit receives the solution candidate selected by the hand determining unit, and uses the projective transformation matrix estimated by the projective transformation matrix estimating unit to obtain the normal of the solution candidate Matching with the normal of the training image and selecting one of the candidate solutions;
The planar object captured in the test image from the information on the plurality of reference points, the rotation and translational motion of the solution candidate selected by the solution validity determination unit, and the projective transformation matrix. Calculating the relative angle between the camera and the camera that captured the test image;
Relative angle estimation method including.
コンピュータを、請求項1〜5の何れか1項記載の相対角度推定装置の各部として機能させるための相対角度推定プログラム。   The relative angle estimation program for functioning a computer as each part of the relative angle estimation apparatus in any one of Claims 1-5.
JP2017071608A 2017-03-31 2017-03-31 Relative angle estimation device, relative angle estimation method, and relative angle estimation program Active JP6534411B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017071608A JP6534411B2 (en) 2017-03-31 2017-03-31 Relative angle estimation device, relative angle estimation method, and relative angle estimation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017071608A JP6534411B2 (en) 2017-03-31 2017-03-31 Relative angle estimation device, relative angle estimation method, and relative angle estimation program

Publications (2)

Publication Number Publication Date
JP2018173823A JP2018173823A (en) 2018-11-08
JP6534411B2 true JP6534411B2 (en) 2019-06-26

Family

ID=64108681

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017071608A Active JP6534411B2 (en) 2017-03-31 2017-03-31 Relative angle estimation device, relative angle estimation method, and relative angle estimation program

Country Status (1)

Country Link
JP (1) JP6534411B2 (en)

Also Published As

Publication number Publication date
JP2018173823A (en) 2018-11-08

Similar Documents

Publication Publication Date Title
US10311595B2 (en) Image processing device and its control method, imaging apparatus, and storage medium
KR101333871B1 (en) Method and arrangement for multi-camera calibration
US8467596B2 (en) Method and apparatus for object pose estimation
JP5940453B2 (en) Method, computer program, and apparatus for hybrid tracking of real-time representations of objects in a sequence of images
US20150262346A1 (en) Image processing apparatus, image processing method, and image processing program
US7587082B1 (en) Object recognition based on 2D images and 3D models
JP5631086B2 (en) Information processing apparatus, control method therefor, and program
JP4709668B2 (en) 3D object recognition system
JP6172432B2 (en) Subject identification device, subject identification method, and subject identification program
JP5936561B2 (en) Object classification based on appearance and context in images
JP2016212784A (en) Image processing apparatus and image processing method
CN116051736A (en) Three-dimensional reconstruction method, device, edge equipment and storage medium
JP2006113832A (en) Stereoscopic image processor and program
JP2011223250A (en) Photographing assisting apparatus, photographing assisting method, and program used therewith
US20230100238A1 (en) Methods and systems for determining the 3d-locations, the local reference frames and the grasping patterns of grasping points of an object
JP6534411B2 (en) Relative angle estimation device, relative angle estimation method, and relative angle estimation program
JP2012234500A (en) Pattern identification device, pattern identification method and program
WO2017042852A1 (en) Object recognition appratus, object recognition method and storage medium
JP2007140729A (en) Method and device detecting position and attitude of article
WO2019016879A1 (en) Object detection device and object detection method
Hołowko et al. Color-based algorithm for automatic merging of multiview 3D point clouds
JP6946912B2 (en) Estimator program, estimator, and estimation method
JP6650829B2 (en) Image retrieval apparatus, method, and program
JP4812743B2 (en) Face recognition device, face recognition method, face recognition program, and recording medium recording the program
JP2016194847A (en) Image detection device, image detection method, and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190425

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190521

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190528

R150 Certificate of patent or registration of utility model

Ref document number: 6534411

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150