JP2013101552A - Object coordinate system conversion matrix estimation success/failure determination device and object coordinate system conversion matrix estimation success/failure determination method, and program therefor - Google Patents
Object coordinate system conversion matrix estimation success/failure determination device and object coordinate system conversion matrix estimation success/failure determination method, and program therefor Download PDFInfo
- Publication number
- JP2013101552A JP2013101552A JP2011245666A JP2011245666A JP2013101552A JP 2013101552 A JP2013101552 A JP 2013101552A JP 2011245666 A JP2011245666 A JP 2011245666A JP 2011245666 A JP2011245666 A JP 2011245666A JP 2013101552 A JP2013101552 A JP 2013101552A
- Authority
- JP
- Japan
- Prior art keywords
- coordinate system
- score
- image
- object coordinate
- superimposed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
本発明は、物体を含む実空間を撮像するカメラによって入力されたフレーム画像列から、物体に対してコンピュータグラフィクス等を合成するために算出する、実空間内の基準座標系であるワールド座標系から見た物体の位置・姿勢を示す物体座標系への変換行列の推定成否を判定する物体座標系変換行列推定成否判定装置および物体座標系変換行列推定成否判定方法ならびにそのプログラムに関する。 The present invention calculates from a world coordinate system, which is a reference coordinate system in real space, calculated from a frame image sequence input by a camera that captures a real space including the object to synthesize computer graphics and the like on the object. The present invention relates to an object coordinate system conversion matrix estimation success / failure determination apparatus, an object coordinate system conversion matrix estimation success / failure determination method, and a program thereof that determine the success or failure of an estimation of a conversion matrix into an object coordinate system indicating the position and orientation of a viewed object.
実空間を撮像するカメラによって入力されたフレーム画像から、実空間におけるカメラの位置・姿勢を示すカメラポーズと、フレーム画像内の特徴点の3次元座標を算出するカメラポーズ・3D装置が存在する。当該カメラポーズ・3D装置では、算出したカメラポーズを用いて、例えばフレーム画像中にコンピュータグラフィクス(CG)等を合成することを可能にしている。 There is a camera pose that indicates the position and orientation of a camera in the real space from a frame image input by a camera that captures the real space, and a camera pose and 3D device that calculates three-dimensional coordinates of feature points in the frame image. The camera pose / 3D device can synthesize computer graphics (CG) or the like into a frame image, for example, using the calculated camera pose.
カメラポーズ・3D推定装置では、カメラポーズと実空間内の3次元点(特徴点)の3次元座標の初期値及びフレーム画像を入力し、
(1)実空間の3次元点がフレーム画像で観測された画像点を決定し、
(2)3次元点の3次元座標と画像点の座標の組から非線形最小自乗法によってカメラポーズを算出し、
(3)過去に亘った複数時刻のフレーム画像を用いて3次元点の3次元座標を更新する処理を時々刻々繰り返すことによって正確にカメラポーズと3次元点の3次元座標を算出する。
In the camera pose and 3D estimation device, the camera pose and the initial value of the 3D coordinates of the 3D point (feature point) in the real space and the frame image are input,
(1) An image point where a three-dimensional point in real space is observed in a frame image is determined;
(2) A camera pose is calculated by a non-linear least square method from a set of 3D coordinates of 3D points and coordinates of image points,
(3) The camera pose and the three-dimensional coordinates of the three-dimensional points are accurately calculated by repeating the process of updating the three-dimensional coordinates of the three-dimensional points from time to time using frame images of a plurality of times over the past.
従来のカメラポーズ・3D推定装置で算出されるカメラポーズと3次元点の3次元座標は、カメラポーズはワールド座標系から見たカメラの位置及び向き、3次元点の3次元座標はワールド座標系からの位置として表現される。当該ワールド座標系はカメラポーズ・3D推定装置で初期時刻において予め設定したものが利用される。このため、例えばフレーム画像中の物体に対してCG等を合成する場合には、ワールド座標系から見た物体の位置・姿勢を示す物体座標系への剛体変換行列が必要となる。物体座標系変換装置の処理が、例えば非特許文献1に記載されている。当該非特許文献1に記載の処理では、カメラポーズ・3D算出装置において、フレーム画像中の物体に対してコンピュータグラフィクス等を合成する場合においても正確な合成を実現するため、ワールド座標系から見た物体座標系への剛体変換行列を算出している。
The camera pose calculated by a conventional camera pose / 3D estimation device and the 3D coordinates of the 3D point are the camera position and orientation of the camera viewed from the world coordinate system, and the 3D coordinate of the 3D point is the world coordinate system. Expressed as a position from As the world coordinate system, a camera pose / 3D estimation device preset at an initial time is used. For this reason, for example, when CG or the like is synthesized with an object in a frame image, a rigid transformation matrix to the object coordinate system indicating the position and orientation of the object viewed from the world coordinate system is required. The processing of the object coordinate system conversion device is described in
図25は、従来の物体座標系変換装置の構成を示す図である。
以下、従来の物体座標系変換装置を詳解する。
物体座標系変換装置への入力データは、カメラで撮像したある時刻tのフレーム画像F(t)と、平面物体が写されているテンプレート画像と、カメラの焦点距離等を示すカメラパラメータ、及びテンプレート画像内の平面物体に相当する物体を表示するフレーム画像F(t)上の当該物体に合成したいCGデータである。ここで夫々のデータは予め与えられるものである。ここでは説明の簡単化のためテンプレート画像は1枚のみテンプレート画像記憶部251に格納されているものとする。物体座標系変換装置ではまず、カメラポーズ・3次元座標推定部252によって、フレーム画像F(t)上の物体等の角や交点となる特徴点を追跡した結果に基づき時刻tの特徴点(3次元点)の3次元座標及びカメラポーズを推定する。このカメラポーズと、3次元点の3次元座標はカメラポーズ・3次元座標推定部252で適当に設定されたワールド座標系で記述表現される。
FIG. 25 is a diagram showing a configuration of a conventional object coordinate system conversion apparatus.
Hereinafter, a conventional object coordinate system conversion apparatus will be described in detail.
The input data to the object coordinate system conversion device includes a frame image F (t) at a certain time t captured by the camera, a template image in which a planar object is photographed, a camera parameter indicating the focal length of the camera, and a template. This is CG data to be combined with the object on the frame image F (t) displaying the object corresponding to the planar object in the image. Here, each data is given in advance. Here, for simplicity of explanation, it is assumed that only one template image is stored in the template
並行して、物体座標系変換装置では、テンプレート照合部253でテンプレート画像とフレーム画像F(t)をScale-Invariant Feature Transform(SIFT)等を用いて照合することにより、テンプレート内部の平面物体の特徴点の位置をフレーム画像F(t)上で推定する。続いて、テンプレート照合部253は、テンプレート内部の平面物体の特徴点の位置とこれに対応付けられたフレーム画像F(t)上の位置の集合から、射影変換行列を求め、当該射影変換行列を用いて、テンプレート画像の4隅を示す端点の位置に対応するフレーム画像F(t)上のテンプレート画像の端点位置を推定する。
次に3次元座標算出部254にて、前記テンプレート画像内の平面物体の特徴点の三次元座標と、フレーム画像F(t)上のテンプレート画像の端点位置の三次元座標を、フレーム画像F(t)が撮影された時刻t以前の、他の撮影時刻が近いフレーム画像に対するステレオ対応付けによって算出する。続いて平面算出部255が、算出したテンプレート画像内の平面物体内の特徴点の三次元座標に基づいて、3次元空間内でのワールド座標系で記述される平面の法線を算出する。
そして平面算出部255は、フレーム画像F(t)上のテンプレート画像の端点位置の三次元座標と、ワールド座標系での当該平面の法線と、予めテンプレート画像の4隅点に設定された物体座標系での三次元座標と、当該三次元座標から算出した、物体座標系でのテンプレート画像の3次元空間内での平面法線とから、テンプレート画像の平面物体の座標系である物体座標系への剛体変換を表現する物体座標系変換行列を算出する。
In parallel, in the object coordinate system conversion apparatus, the
Next, in the three-dimensional
The
物体座標系変換装置は、最後にCG合成部256にて物体座標系で記述表現された付加情報である例えば図26に示すCG情報を、物体座標系変換行列を用いてワールド座標系での記述表現に変換し、カメラポーズを用いて現時刻のフレーム画像F(t)に例えば図27に示すように重畳合成する。この一連の処理を時々刻々繰り返すことによって、フレーム画像中の物体に対してCG等を合成することを実現している。
The object coordinate system conversion device finally describes, for example, CG information shown in FIG. 26, which is additional information described in the object coordinate system by the
しかしながら、カメラポーズ・3次元座標推定部252で算出される3次元点群の3次元座標は、画像の量子化誤差や、対応付け誤りによる誤差を有しており、これに起因し物体座標系変換行列の精度が劣化する。このような精度の低い物体座標系変換行列を用いると、結果的にフレーム画像F(t)中の物体の位置や向きに対してCGの合成がずれるといった問題がある。
However, the three-dimensional coordinates of the three-dimensional point group calculated by the camera pose / three-dimensional
本発明は上述したような問題点に鑑みてなされたものであり、物体座標系変換装置において算出された物体座標系変換行列の精度を定量化し、推定成否を判定する物体座標系変換行列推定成否判定装置および物体座標系変換行列推定成否判定方法ならびにそのプログラムを提供することを目的とする。 The present invention has been made in view of the above-described problems, and quantifies the accuracy of the object coordinate system conversion matrix calculated in the object coordinate system conversion apparatus, and determines whether or not the object coordinate system conversion matrix is estimated. It is an object of the present invention to provide a determination apparatus, an object coordinate system transformation matrix estimation success / failure determination method, and a program thereof.
上記目的を達成するために、本発明は、ワールド座標系における基準点および基準方向を基準とするカメラの並進位置および回転角度を示すカメラポーズと、少なくとも前記カメラの焦点距離を示すカメラパラメータと、前記カメラの撮影に基づいて得られたフレーム画像上において重畳画像の重畳対象の物体を示す対象画像点と、前記ワールド座標系とは異なる座標系である物体座標系での前記重畳画像の3次元点を示すオブジェクト上3次元点と、前記ワールド座標系における座標を前記物体座標系の座標への変換に利用する物体座標変換行列と、に基づいて、前記オブジェクト上3次元点が前記物体座標変換行列によって前記フレーム画像上に重畳される場合の対応する合成画像点を算出する合成画像点算出部と、前記対象画像点と対応する前記合成画像点とに基づいて、前記物体座標変換行列によって前記フレーム画像上の重畳対象の物体に重畳画像が重畳される場合の、当該重畳対象の物体と重畳画像との不一致の度合いを示すスコアを算出するスコア算出部と、当該算出されたスコアが過去に算出された何れの他のスコアよりも値が低い場合には、前記スコア算出部がスコアの算出に用いた物体座標変換行列による重畳画像の重畳の精度向上が成功した旨を示す成功信号を出力し、前記スコア算出部の算出したスコアが過去に算出された最も値の低いスコアよりも値が高い場合には、前記スコア算出部がスコアの算出に用いた物体座標変換行列による重畳画像の重畳の精度向上が失敗した旨を示す失敗信号を出力する成否判定部と、を備えることを特徴とする物体座標系変換行列推定成否判定装置である。 To achieve the above object, the present invention provides a camera pose indicating a translation position and a rotation angle of a camera with respect to a reference point and a reference direction in a world coordinate system, and a camera parameter indicating at least a focal length of the camera, 3D of the superimposed image in the object coordinate system that is a coordinate system different from the world coordinate system, on the target image point indicating the object to be superimposed on the superimposed image on the frame image obtained based on the photographing of the camera Based on a three-dimensional point on the object indicating a point and an object coordinate conversion matrix that uses coordinates in the world coordinate system to convert to coordinates in the object coordinate system, the three-dimensional point on the object converts the object coordinate A composite image point calculation unit that calculates a corresponding composite image point when superimposed on the frame image by a matrix; The degree of mismatch between the superimposition target object and the superimposition image when the superimposition image is superimposed on the superimposition target object on the frame image by the object coordinate transformation matrix based on the synthesized image point A score calculation unit that calculates a score, and when the calculated score is lower than any other score calculated in the past, the object coordinate conversion matrix used by the score calculation unit to calculate the score When a success signal indicating that the superimposition image accuracy improvement has succeeded is output and the score calculated by the score calculation unit is higher than the lowest score calculated in the past, the score calculation is performed. A success / failure determination unit that outputs a failure signal indicating that the accuracy of superimposing the superimposed image using the object coordinate transformation matrix used for calculating the score has failed. A transformation matrix estimation success determination unit.
また本発明は、上述の物体座標系変換行列推定成否判定装置において、前記スコア算出部は、前記対象画像点と対応する前記合成画像点の差を、複数の前記対象画像点と対応する前記合成画像点の組合せについて算出し、その総和に基づいて前記スコアを算出することを特徴とする。 In the object coordinate system conversion matrix estimation success / failure determination apparatus according to the present invention, the score calculation unit may determine a difference between the composite image points corresponding to the target image points and the composite corresponding to a plurality of the target image points. It calculates about the combination of an image point, The said score is calculated based on the sum total.
また本発明は、上述の物体座標系変換行列推定成否判定装置において、前記スコア算出部は、前記対象画像点の全てを包含する前記フレーム画像上の領域と、前記合成画像点の全てを包含する前記フレーム画像上の領域との重複領域を決定し、当該重複領域の大きさに基づく値の逆数を前記スコアとして算出することを特徴とする。 In the object coordinate system conversion matrix estimation success / failure determination apparatus according to the present invention, the score calculation unit includes an area on the frame image including all of the target image points and all of the composite image points. An overlapping area with an area on the frame image is determined, and a reciprocal of a value based on the size of the overlapping area is calculated as the score.
また本発明は、上述の物体座標系変換行列推定成否判定装置において、前記スコア算出部は、前記合成画像点の全てを包含する前記フレーム画像上の領域の各画素についてのテクスチャ情報と、前記対象画像点の全てを包含する前記フレーム画像上の領域の各画素について前記合成画像点の全てを包含する前記フレーム画像上の領域へとマッピングした場合の各画素についてのテクスチャ情報との差分の総和に基づいて、前記スコアを算出することを特徴とする。 In the object coordinate system conversion matrix estimation success / failure determination apparatus according to the present invention, the score calculation unit may include texture information about each pixel in a region on the frame image including all of the composite image points, and the target. The sum of the differences from the texture information for each pixel when mapping each pixel of the region on the frame image including all of the image points to the region on the frame image including all of the composite image points Based on the above, the score is calculated.
また本発明は、上述の物体座標系変換行列推定成否判定装置において、前記スコア算出部は、前記フレーム画像において検出したエッジ画像と、前記フレーム画像に写る被写体の重畳画像を前記フレーム画像に合成した場合の当該フレーム画像において検出したエッジ画像との差異に基づいて、前記スコアを算出することを特徴とする。 In the object coordinate system transformation matrix estimation success / failure determination apparatus according to the present invention, the score calculation unit synthesizes an edge image detected in the frame image and a superimposed image of a subject in the frame image into the frame image. The score is calculated based on a difference from the edge image detected in the frame image in the case.
また本発明は、物体座標系変換行列推定成否判定装置が、ワールド座標系における基準点および基準方向を基準とするカメラの並進位置および回転角度を示すカメラポーズと、少なくとも前記カメラの焦点距離を示すカメラパラメータと、前記カメラの撮影に基づいて得られたフレーム画像上において重畳画像の重畳対象の物体を示す対象画像点と、前記ワールド座標系とは異なる座標系である物体座標系での前記重畳画像の3次元点を示すオブジェクト上3次元点と、前記ワールド座標系における座標を前記物体座標系の座標への変換に利用する物体座標変換行列と、に基づいて、前記オブジェクト上3次元点が前記物体座標変換行列によって前記フレーム画像上に重畳される場合の対応する合成画像点を算出し、前記対象画像点と対応する前記合成画像点とに基づいて、前記物体座標変換行列によって前記フレーム画像上の重畳対象の物体に重畳画像が重畳される場合の、当該重畳対象の物体と重畳画像との不一致の度合いを示すスコアを算出し、当該算出されたスコアが過去に算出された何れの他のスコアよりも値が低い場合には、前記スコアの算出に用いた物体座標変換行列による重畳画像の重畳の精度向上が成功した旨を示す成功信号を出力し、前記算出したスコアが過去に算出された最も値の低いスコアよりも値が高い場合には、前記スコアの算出に用いた物体座標変換行列による重畳画像の重畳の精度向上が失敗した旨を示す失敗信号を出力することを特徴とする物体座標系変換行列推定成否判定方法である。 According to the present invention, the object coordinate system transformation matrix estimation success / failure determination apparatus indicates a camera pose indicating a translation position and a rotation angle of a camera with reference to a reference point and a reference direction in the world coordinate system, and at least a focal distance of the camera. The superimposition in an object coordinate system, which is a coordinate system different from the world coordinate system, and a target image point that indicates a superimposition target object of a superimposed image on a frame image obtained based on camera imaging. Based on the three-dimensional point on the object indicating the three-dimensional point of the image and the object coordinate transformation matrix that uses the coordinates in the world coordinate system to transform the coordinates in the object coordinate system, A corresponding composite image point when superimposed on the frame image by the object coordinate transformation matrix is calculated, and the corresponding image point is calculated. A score indicating the degree of inconsistency between the superimposed object and the superimposed image when the superimposed image is superimposed on the superimposed object on the frame image by the object coordinate transformation matrix based on the synthesized image point And when the calculated score is lower than any other score calculated in the past, the accuracy of superimposition of the superimposed image by the object coordinate transformation matrix used for the calculation of the score succeeds. If the calculated score is higher than the lowest score calculated in the past, the superimposed image is superimposed by the object coordinate transformation matrix used for the calculation of the score. The object coordinate system transformation matrix estimation success / failure determination method is characterized by outputting a failure signal indicating that the accuracy improvement of the object has failed.
また本発明は、物体座標系変換行列推定成否判定装置のコンピュータを、ワールド座標系における基準点および基準方向を基準とするカメラの並進位置および回転角度を示すカメラポーズと、少なくとも前記カメラの焦点距離を示すカメラパラメータと、前記カメラの撮影に基づいて得られたフレーム画像上において重畳画像の重畳対象の物体を示す対象画像点と、前記ワールド座標系とは異なる座標系である物体座標系での前記重畳画像の3次元点を示すオブジェクト上3次元点と、前記ワールド座標系における座標を前記物体座標系の座標への変換に利用する物体座標変換行列と、に基づいて、前記オブジェクト上3次元点が前記物体座標変換行列によって前記フレーム画像上に重畳される場合の対応する合成画像点を算出する合成画像点算出手段、前記対象画像点と対応する前記合成画像点とに基づいて、前記物体座標変換行列によって前記フレーム画像上の重畳対象の物体に重畳画像が重畳される場合の、当該重畳対象の物体と重畳画像との不一致の度合いを示すスコアを算出するスコア算出手段、当該算出されたスコアが過去に算出された何れの他のスコアよりも値が低い場合には、前記スコア算出手段がスコアの算出に用いた物体座標変換行列による重畳画像の重畳の精度向上が成功した旨を示す成功信号を出力し、前記スコア算出手段の算出したスコアが過去に算出された最も値の低いスコアよりも値が高い場合には、前記スコア算出手段がスコアの算出に用いた物体座標変換行列による重畳画像の重畳の精度向上が失敗した旨を示す失敗信号を出力する成否判定手段、として機能させるためのプログラムである。 The present invention also provides a computer of an object coordinate system transformation matrix estimation success / failure determination apparatus, a camera pose indicating a translation position and a rotation angle of a camera with reference to a reference point and a reference direction in a world coordinate system, and at least a focal length of the camera A target image point indicating an object to be superimposed on a superimposed image on a frame image obtained on the basis of photographing by the camera, and an object coordinate system that is a coordinate system different from the world coordinate system. Based on the three-dimensional point on the object indicating the three-dimensional point of the superimposed image and the object coordinate transformation matrix used to convert the coordinates in the world coordinate system to the coordinates of the object coordinate system, A composite image for calculating a corresponding composite image point when a point is superimposed on the frame image by the object coordinate transformation matrix Based on the calculation means, the composite image point corresponding to the target image point, and when the superimposed image is superimposed on the superimposition target object on the frame image by the object coordinate transformation matrix, A score calculation unit that calculates a score indicating the degree of mismatch with the superimposed image, and when the calculated score is lower than any other score calculated in the past, the score calculation unit calculates the score A success signal indicating that the accuracy of superimposition of the superimposed image has been successfully improved by the object coordinate transformation matrix used in the above, and the score calculated by the score calculation means has a value lower than the lowest score calculated in the past In the case of high, the success / failure determination means for outputting a failure signal indicating that the accuracy improvement of the superimposition image superimposition using the object coordinate transformation matrix used for the score calculation by the score calculation unit has failed. A program for functioning as a.
本発明によれば、物体座標系変換装置において算出された物体座標系変換行列の精度を定量化し、推定成否を判定することができる。 According to the present invention, it is possible to quantify the accuracy of the object coordinate system conversion matrix calculated in the object coordinate system conversion apparatus and determine the success or failure of the estimation.
まず初めに、座標系及び用語の定義を、図24を用いて説明する。
ワールド座標系は空間全体を表す座標系であり、3次元点の3次元座標は該ワールド座標系での位置を示す。また本実施形態において「カメラポーズ」とは、ワールド座標系における基準点および基準方向を基準とするカメラの並進(並進位置)、回転(回転角度)を示す。またフレーム画像F(t)は、時刻tにおいてカメラが撮像した画像を示す。
First, the definition of the coordinate system and terms will be described with reference to FIG.
The world coordinate system is a coordinate system that represents the entire space, and the three-dimensional coordinates of the three-dimensional point indicate positions in the world coordinate system. In this embodiment, “camera pose” indicates translation (translation position) and rotation (rotation angle) of a camera with reference to a reference point and a reference direction in the world coordinate system. A frame image F (t) indicates an image captured by the camera at time t.
また、フレーム画像F(t)上において、CG(重畳画像)を重畳表示する対象物体の領域を構成する点群を対象画像点、3D−CG空間内において物体座標系で表現されたCG上の点で対象画像点に対応する3次元点や、フレーム画像F(t)上の重畳対象に重畳表示するCGの特徴を示す点に対応する3次元点を、オブジェクト上3次元点と呼ぶこととする。なお、ワールド座標系と、物体座標系は異なる座標系であり、ワールド座標系から物体座標系への剛体変換を表現する行列を物体座標系変換行列と呼ぶ。物体座標系変換行列に加えて、カメラポーズ、対象画像点及び、オブジェクト上3次元点は物体座標系変換装置で夫々決定されるものである。 In addition, on the frame image F (t), a point group constituting a region of the target object on which the CG (superimposed image) is superimposed and displayed is the target image point on the CG expressed in the object coordinate system in the 3D-CG space. A three-dimensional point corresponding to a target image point by a point or a point indicating a feature of CG superimposed on a superimposition target on the frame image F (t) is referred to as a three-dimensional point on the object. To do. Note that the world coordinate system and the object coordinate system are different coordinate systems, and a matrix expressing rigid body transformation from the world coordinate system to the object coordinate system is called an object coordinate system transformation matrix. In addition to the object coordinate system conversion matrix, the camera pose, the target image point, and the three-dimensional point on the object are determined by the object coordinate system conversion device.
以下、物体座標系変換行列推定成否判定装置を図面を参照して説明する。
図1は物体座標系変換行列推定成否判定装置の構成を示すブロック図である。
図1に示すとおり、物体座標系変換行列推定成否判定装置1は、合成画像点算出部11と、スコア算出部12と、成否判定部13とを備える。本実施形態による物体座標系変換行列推定成否判定装置1の各処理に用いるデータは、物体座標系変換行列推定成否判定装置1が備える記憶部14に適宜格納することができる。
The object coordinate system conversion matrix estimation success / failure determination apparatus will be described below with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of an object coordinate system conversion matrix estimation success / failure determination apparatus.
As illustrated in FIG. 1, the object coordinate system conversion matrix estimation success /
物体座標系変換行列推定成否判定装置1は、物体座標系変換装置で算出された物体座標系変換行列及び、対象画像点、対象画像点に関連付けられたオブジェクト上3次元点、カメラポーズと、カメラから入力されるフレーム画像F(t)、及び、前記カメラの焦点距離等を示す所定のカメラパラメータを入力する。そして、物体座標系変換行列推定成否判定装置1は、これら入力した情報により、物体座標系変換行列の推定精度を定量化したスコアを用いて物体座標系変換行列推定の成否を判定し、成否信号を出力する。
The object coordinate system conversion matrix estimation success /
合成画像点算出部11は、物体座標系変換行列、カメラポーズ、カメラパラメータ、対象画像点、対象画像点に関連付けられたオブジェクト上3次元点を入力し、合成画像点を算出し対象画像点に関連付けて出力する。合成画像点は、フレーム画像F(t)に重畳するCGのオブジェクト上3次元点が、物体座標系変換行列によりフレーム画像F(t)上に合成される際の当該フレーム画像F(t)上の点である。
スコア算出部12は、以下の第1,2の実施形態では、対象画像点及び、対象画像点に関連付けられた合成画像点を夫々入力し、物体座標系変換行列の推定精度を定量化したスコアを出力する。なお合成画像点と対象画像点との距離が離れるほど、CGがフレーム画像F(t)上の合成対象の物体から離れて合成されることとなり、またスコア値も高くなる。スコア算出部12は、以下の第3の実施形態では第1、2の実施形態の入力データに加えてフレーム画像を、第4の実施形態では第3の実施形態の入力データに加えて被写体の3D−CGと、物体座標系変換行列、カメラポーズ、カメラパラメータを、夫々入力し、物体座標系変換行列の推定精度を定量化したスコアを出力する。なおスコアは、物体座標変換行列によってフレーム画像上の重畳対象の物体にCGが重畳される場合の、当該重畳対象の物体とCGとの不一致の度合いを示す値でもある。成否判定部13は、スコア算出部12からスコアを入力し、記憶部14から最小スコアを読出し、成功と判定した場合は成功信号を、失敗と判定した場合は失敗信号を出力する。
The composite image
In the first and second embodiments below, the
<第1の実施形態>
第1の実施形態に係る物体座標系変換行列推定成否判定装置で実行される詳細な処理を以下に説明する。
<First Embodiment>
Detailed processing executed by the object coordinate system transformation matrix estimation success / failure determination apparatus according to the first embodiment will be described below.
図2は、第1の実施形態における合成画像点算出部11の処理フローを示す図である。
図3は、合成画像点算出部の入力する入力データを示す図である。
図4は、合成画像点算出部の記録するデータを示す図である。
第1の実施形態における物体座標系変換行列推定成否判定装置1では、まず合成画像点算出部11が起動される。合成画像点算出部11は起動されると物体座標系変換行列、カメラポーズ、カメラパラメータ、フレーム画像F(t)上のCGの重畳対象の物体を示す対象画像点、CGについてのオブジェクト上3次元点を入力する(ステップS201)。ここで、対象画像点とオブジェクト上3次元点は図3に示すように、唯一割り振られたIDによって関連付けられている。
FIG. 2 is a diagram illustrating a processing flow of the composite image
FIG. 3 is a diagram illustrating input data input by the composite image point calculation unit.
FIG. 4 is a diagram illustrating data recorded by the composite image point calculation unit.
In the object coordinate system transformation matrix estimation success /
続いて、合成画像点算出部11は、入力したオブジェクト上3次元点全てについて、物体座標系変換行列とカメラポーズ及びカメラパラメータとから合成画像点を算出する(ステップS202)。合成画像点は、入力した物体座標系変換行列を用いて、オブジェクト上3次元点をフレーム画像F(t)上に合成する際の、オブジェクト上3次元点に対応するフレーム画像F(t)上の点である。ここでIDがi番目のオブジェクト上3次元点(X_i, Y_i, Z_i)に対応するフレーム画像F(t)上の合成画像点(xr_i, yr_i)は式(1)によって算出できる。
Subsequently, the composite image
ただし、演算子“〜”は、その両辺が定数倍の違いを許して等しいことを表している。なお、式(1)において、行列Lは物体座標系変換行列を、行列Mはカメラポーズを示し、夫々、式(2)、式(3)で表現される。 However, the operator “˜” represents that both sides are equal by allowing a constant multiple difference. In Expression (1), the matrix L represents the object coordinate system conversion matrix, and the matrix M represents the camera pose, which are expressed by Expression (2) and Expression (3), respectively.
式(2)、式(3)におけるRc,Roは、3×3の回転行列を、tc,toは3×1の並進ベクトルをそれぞれ示す。また、式(1)において行列Aは式(4)に示すカメラのカメラパラメータからなる3×3の行列である。式(4)において、fはカメラの焦点距離であり、δuとδvはカメラの撮像素子の横方向と縦方向の画素の物理的な間隔、Cu、Cvは画像中心を示す。 In equations (2) and (3), Rc and Ro represent a 3 × 3 rotation matrix, and tc and to represent a 3 × 1 translation vector, respectively. In the equation (1), the matrix A is a 3 × 3 matrix composed of the camera parameters of the camera shown in the equation (4). In equation (4), f is the focal length of the camera, δu and δv are the physical distance between the horizontal and vertical pixels of the image sensor of the camera, and Cu and Cv are the image centers.
次に合成画像点算出部11は入力したオブジェクト上3次元点全てについて合成画像点を算出した後に、該合成画像点を図4に示すように対象画像点に関連付けて記録し(ステップS203)、処理を終える。
Next, the composite image
図5は、第1の実施形態におけるスコア算出部12の処理フローを示す図である。
図6は、スコア算出部の処理概要を示す図である。
次に、第1の実施形態でのスコア算出部12は、対象画像点及び、対象画像点に関連付けられた合成画像点を入力する。続いて、全ての対象画像点を包含するフレーム画像F(t)上領域を決定する(ステップS502)。この処理は例えば非特許文献『Michael Kass, Andrew Witkin and Demetri Terzopoulos,“Snakes: Active contour models,”International Journal of Computer Vision, vol. 1, no. 4, pp. 321-331,1988.』に記載の動的輪郭法を用いることで実現できる。動的輪郭法とは条件に従って動的に複数個の離散的な点列を結んだ閉曲線の変形を繰り返すことで、輪郭を抽出する方法である。
FIG. 5 is a diagram illustrating a processing flow of the
FIG. 6 is a diagram illustrating an outline of processing performed by the score calculation unit.
Next, the
続いて、スコア算出部12は、入力した全ての対象画像点について、合成画像点との距離を算出する(ステップS503)。ここで距離とは、図6に示すとおり、対象画像点と、該対象画像点に関連付けて記録された合成画像点との間のユークリッド距離を示す。IDがi番目の距離d_iは対象画像点の座標を(x_i, y_i)、合成画像点の座標を(xr_i, yr_i)とすると、式(5)により算出できる。
Subsequently, the
またスコア算出部12は、算出した距離の全ての対象画像点に亘っての総和を、前記フレーム画像上領域の面積で正規化した値を算出し、当該値をスコアscore1として出力する(ステップS504)。このスコアscore1は、フレーム画像上領域の面積をSとすると、式(6)によって算出できる。なお、各合成画像点が、対応する各対象画像点から離れれば離れるほど、スコアscore1の値は大きくなる。合成画像点は、対象画像点に近いほど、CG画像をフレーム画像F(t)内のCG合成対象の物体に精度良く合成することができる。従って、スコアの値は小さいほど良い。
The
図7は、第1の実施形態における成否判定部13の処理フローを示す図である。
続いて、成否判定部13が起動される。成否判定部13は起動すると、スコア算出部12からスコアを入力する(ステップS701)。続いて成否判定部13は、記憶部14から過去に算出された最小スコアを読み出す(ステップS702)。該最小スコアとは、処理対象であるフレーム画像F(t)以前のフレーム画像を用いて算出したスコアであり、物体座標系変換装置が起動した時刻からフレーム画像F(t)を撮像した時刻tまでの間での最小のスコア値を示す。続いて成否判定部13は、スコアが最小スコアより小さいかを判定し(ステップS703)、スコアが最小スコアより小さい場合は、スコア算出部12がスコアの算出に用いた物体座標変換行列によるCG重畳の精度向上が成功したと判定し、最小スコアをスコアで更新し記憶部14に記録する(ステップS704)。成否判定部13は、スコアが最小スコアより大きい場合は、スコア算出部12がスコアの算出に用いた物体座標変換行列によるCG重畳の精度向上が失敗したと判定する。そして、更新判定部13は、上記処理で更新と判定した場合は成功信号を出力し(ステップS705)、失敗と判定した場合は失敗信号を出力し(ステップS706)、処理を終える。
FIG. 7 is a diagram illustrating a processing flow of the success /
Subsequently, the success /
なお、例えば更新信号は物体座標系変換装置へ出力される。更新信号を入力した場合、その更新信号の出力についてのスコアの算出に用いられた物体座標系変換行列が、最小のスコアの算出に用いられた物体座標系変換行列である。従って、物体座標系変換装置では、以降、その物体座標系変換行列を用いて、CG合成の処理を行うこととなる。これにより、CG合成処理に用いていた物体座標系変換行列を、新たな最小のスコア値の算出に用いられた物体座標系変換行列へと更新する。 For example, the update signal is output to the object coordinate system conversion device. When an update signal is input, the object coordinate system conversion matrix used for calculating the score for the output of the update signal is the object coordinate system conversion matrix used for calculating the minimum score. Accordingly, in the object coordinate system conversion apparatus, CG composition processing is performed using the object coordinate system conversion matrix. As a result, the object coordinate system conversion matrix used for the CG synthesis process is updated to the object coordinate system conversion matrix used for calculating the new minimum score value.
<第2の実施形態>
第1の実施形態では、対象画像点と、該対象画像点に関連付けて記録された合成画像点間のユークリッド距離をスコアとするため、対象画像点数が多い場合は、物体座標系変換行列推定精度を良好に定量化できる。しかしながら、対象画像点数が少ない場合はスコアの信頼性が下がり、成否判定に失敗することがある。
そこで第2の実施形態では、対象画像点が構成する領域と、合成画像点が構成する領域を比較することで、物体座標系変換行列推定精度をより高い信頼度で表現するスコアの算出方法について述べる。
<Second Embodiment>
In the first embodiment, since the Euclidean distance between the target image point and the composite image point recorded in association with the target image point is used as a score, the object coordinate system conversion matrix estimation accuracy is large when the number of target image points is large. Can be quantified well. However, when the number of target image points is small, the reliability of the score decreases, and the success / failure determination may fail.
Therefore, in the second embodiment, a score calculation method that expresses the object coordinate system transformation matrix estimation accuracy with higher reliability by comparing the region formed by the target image point and the region formed by the composite image point. State.
第2の実施形態における、合成画像点算出部11と、成否判定部13は、第1の実施形態の処理と何ら変わるところがないので、その説明を省略する。以降、第2の実施形態におけるスコア算出部12の処理について述べる。
Since the composite image
図8は、第2の実施形態におけるスコア算出部12の処理フローを示す図である。
図9は、第2の実施形態によるスコア算出部の処理概要を示す第1の図である。
図10は、第2の実施形態によるスコア算出部の処理概要を示す第2の図である。
図11は、第2の実施形態によるスコア算出部の処理概要を示す第3の図である。
FIG. 8 is a diagram illustrating a processing flow of the
FIG. 9 is a first diagram illustrating a processing outline of the score calculation unit according to the second embodiment.
FIG. 10 is a second diagram illustrating an outline of processing performed by the score calculation unit according to the second embodiment.
FIG. 11 is a third diagram illustrating an outline of processing performed by the score calculation unit according to the second embodiment.
第2の実施形態におけるスコア算出部12では、第1の実施形態同様、対象画像点及び、対象画像点に関連付けられた合成画像点を入力する(ステップS801)。続いて、第1の実施形態同様に全ての対象画像点を包含するフレーム画像上領域を図9のように決定する(ステップS802)。続いてスコア算出部12は、同様に全ての合成画像点を包含するフレーム画像上領域を図10のように決定する(ステップS803)。続いてスコア算出部12、前記フレーム画像上領域と前記合成画像上領域との重複領域面積を算出する(ステップS804)。この処理は、例えば、フレーム画像においてフレーム画像上領域内の画素値を1, それ以外を0とした画像と、フレーム画像において合成画像上領域内の画素値を1,それ以外を0とした画像をそれぞれ作成しておき、或る画素の画素値が両画像において1の場合は1を、それ以外の場合は0を設定するAND演算によって図11のような重複領域を決定し、当該重複領域の面積をAND演算後の画像の画素値が1である画素の総数によって算出することで実現できる。
As in the first embodiment, the
なお重複領域の面積が小さい場合は、入力した物体座標系変換行列を用いてCGをフレーム画像F(t)上の合成対象の物体に合成した際に、精度良く(ズレが少なく)合成できる場合である。よって、重複領域の面積が小さい程、入力した物体座標系変換行列によるCG合成の精度がよい。 When the area of the overlapping region is small, when the CG is synthesized with the object to be synthesized on the frame image F (t) using the input object coordinate system transformation matrix, it can be synthesized with high accuracy (less deviation). It is. Therefore, the smaller the area of the overlapping region, the better the accuracy of CG synthesis using the input object coordinate system transformation matrix.
続いてスコア算出部12は、前記重複領域面積を、前記フレーム画像上領域の面積で正規化した値を算出し、その逆数をスコアとして出力し(ステップS805)、処理を終える。このスコアscore2は、重複領域面積をSo、フレーム画像上領域の面積をSとすると、式(7)によって算出できる。
Subsequently, the
なおここで、前記重複領域面積を前記フレーム画像上領域の面積で正規化した値の逆数をスコアとする理由は、重複領域の面積が大きい方が、物体座標系変換行列推定精度が高いとされるのに対し、成否判定部13において算出したスコアが最小スコアより小さい場合に成功と判定するためである。成否判定部13において算出したスコアが最大スコアより大きい場合に成功と判定する実施形態の場合は、逆数を取る必要はない。
Here, the reason why the score is the reciprocal of the value obtained by normalizing the area of the overlapping region with the area of the region on the frame image is that the larger the area of the overlapping region, the higher the object coordinate system transformation matrix estimation accuracy is. In contrast, if the score calculated by the success /
<第3の実施形態>
第2の実施形態では、対象画像点が構成する領域と、合成画像点が構成する領域の重なり度で物体座標系変換行列推定精度を表現するが、フレーム画像のテクスチャ情報の類似度まで含めてスコアを表現した方が、物体座標系変換行列推定精度をより高い信頼度で表現できる。
<Third Embodiment>
In the second embodiment, the object coordinate system transformation matrix estimation accuracy is expressed by the degree of overlap between the region formed by the target image point and the region formed by the composite image point, but includes the similarity of the texture information of the frame image. When the score is expressed, the object coordinate system conversion matrix estimation accuracy can be expressed with higher reliability.
そこで第3の実施形態では、対象画像点が構成する領域に属する各画素のテクスチャ情報を、合成画像点が構成する領域へマッピングしたものと、合成画像点が構成する領域に属する各画素のテクスチャ情報を比較することで、物体座標系変換行列推定精度を表現するスコアの算出方法について述べる。なお、第3の実施形態においてテクスチャ情報としては、フレーム画像をグレースケールに変換した画素値を用いてもよいし、カラー画像のRGBの画素値をそのまま利用してもよい。 Therefore, in the third embodiment, the texture information of each pixel belonging to the area constituted by the target image point is mapped to the area constituted by the synthesized image point, and the texture information of each pixel belonging to the area constituted by the synthesized image point. A method for calculating a score expressing the object coordinate system transformation matrix estimation accuracy by comparing information will be described. In the third embodiment, as texture information, pixel values obtained by converting a frame image into gray scale may be used, or RGB pixel values of a color image may be used as they are.
第3の実施形態における、合成画像点算出部11と、成否判定部13は、第1の実施形態と何ら変わるところがないので説明は省略する。以降、第3の実施形態におけるスコア算出部12の動作について述べる。
Since the composite image
図12は、第3の実施形態におけるスコア算出部12の処理フローを示す図である。
第3の実施形態におけるスコア算出部12では、第1の実施形態同様、対象画像点及び、対象画像点に関連付けられた合成画像点を入力する。第3の実施形態では加えてフレーム画像F(t)も入力する(ステップS1201)。続いて、スコア算出部12は、第1の実施形態同様に全ての対象画像点を包含するフレーム画像上領域を決定する(ステップS1202)。続いて、スコア算出部12は、同様に全ての合成画像点を包含する合成画像上領域を決定する(ステップS1203)。
FIG. 12 is a diagram illustrating a processing flow of the
In the
続いて、スコア算出部12は、フレーム画像上領域内の各画素のテクスチャ情報を、合成画像上領域にマッピングする(ステップS1204)。この処理は、例えば非特許文献『OpenGL策定委員会,“OpenGLプログラミングガイド,”ピアソンエデュケーション,Dec. 2006.』に記載の、コンピュータグラフィクス分野において一般的なテクスチャマッピング処理によって実現できる。
Subsequently, the
図13は、第3の実施形態によるスコア算出部の処理概要を示す第1の図である。
図14は、第3の実施形態によるスコア算出部の処理概要を示す第2の図である。
図15は、第3の実施形態によるスコア算出部の処理概要を示す第3の図である。
フレーム画像上領域内の各画素のテクスチャ情報を合成画像上領域にマッピングする処理の詳細について、図13,14,15を用いて説明する。
まず、フレーム画像上領域は図13に示すような5角形の(5つの対象画像点を頂点とする)領域である。スコア算出部12は、当該フレーム画像上領域を構成する全ての対象画像点について、横座標および縦座標ともに0.0〜1.0の座標範囲で正規化し、各対象画像点についての座標をそれぞれ決定し、対象画像点の情報に関連付けて記録しておく。
FIG. 13 is a first diagram illustrating a processing outline of the score calculation unit according to the third embodiment.
FIG. 14 is a second diagram illustrating an outline of processing performed by the score calculation unit according to the third embodiment.
FIG. 15 is a third diagram illustrating an outline of processing performed by the score calculation unit according to the third embodiment.
Details of the process of mapping the texture information of each pixel in the frame image upper area to the synthesized image upper area will be described with reference to FIGS.
First, the region on the frame image is a pentagonal region (with five target image points as vertices) as shown in FIG. The
続いて、或る合成画像点について、頂点を合成画像点の座標、テクスチャ座標を該合成画像点に関連付けられた対象画像点に関連付けて記録されているテクスチャ座標を設定する。次にレンダリング処理を行うことで、形状は合成画像上領域と同一で、フレーム画像上領域内のフレーム画像のテクスチャ情報を合成画像上領域にマッピングする。つまり、フレーム画像領域上の各対象画像点のテクスチャ情報を、合成画像上領域の対応する各合成画像点にマッピングすると共に、フレーム画像上領域内の各画素のテクスチャ情報についても同様に、合成画像上領域にマッピングする。これにより、合成画像上領域内の各画素からは、フレーム画像領域上の各画素についてのマッピング後のテクスチャ情報を得ることができる。ここで例えば、図13で示すように、フレーム画像F(t)において「A」の文字が表示されており、その文字の表示領域の一部がフレーム画像上領域に含まれるとする。また合成画像上領域が図14に示すとおりの場合であるとする。このような場合、図13で示すフレーム画像上領域内の各画素を合成画像領域内にマッピング処理した場合、フレーム画像上領域において表示されていた「A」の一部を示す各画素は、図15で示すような所定範囲マッピング位置にマッピングされる。合成画像領域とフレーム画像上領域とがずれているほど、「A」の文字が歪んでマッピングされる。 Subsequently, with respect to a certain composite image point, the coordinates of the composite image point and the texture coordinates recorded in association with the target image point associated with the composite image point are set. Next, by performing rendering processing, the shape is the same as the region on the composite image, and the texture information of the frame image in the region on the frame image is mapped to the region on the composite image. That is, the texture information of each target image point on the frame image area is mapped to each corresponding composite image point of the area on the composite image, and the texture information of each pixel in the area on the frame image is also similarly displayed. Map to the upper area. Thereby, texture information after mapping for each pixel in the frame image region can be obtained from each pixel in the region on the composite image. Here, for example, as shown in FIG. 13, it is assumed that the character “A” is displayed in the frame image F (t), and a part of the display region of the character is included in the region on the frame image. Assume that the region on the composite image is as shown in FIG. In such a case, when each pixel in the region on the frame image shown in FIG. 13 is mapped into the region on the composite image, each pixel indicating a part of “A” displayed in the region on the frame image is 15 is mapped to a predetermined range mapping position as indicated by 15. As the synthesized image area and the upper frame image area are shifted, the character “A” is distorted and mapped.
図16は、第3の実施形態によるスコア算出部の処理概要を示す第4の図である。
続いて、スコア算出部12は、フレーム画像上領域内に表示された文字「A」と同一位置に当該文字「A」が表示されている場合の合成画像上領域内の各画素についてのテクスチャ情報と、図15で示すようなマッピング後の合成画像上領域内の各画素についてのテクスチャ情報との差分総和値Idiffを算出する(ステップS1205)。ここで、図16におけるフレーム画像内において合成画像上領域外のテクスチャ情報を0、合成画像上領域内にマッピングされた後(図15)の合成画像上領域の各画素の座標(p,q)のテクスチャ情報をIm(p,q)、文字「A」が表示された場合(図14)の合成画像上領域内の各画素の座標(p,q)のテクスチャ情報をIr(p,q)とした場合、差分総和値Idiffは、式(8)によって算出できる。
FIG. 16 is a fourth diagram illustrating a processing outline of the score calculation unit according to the third embodiment.
Subsequently, the
最後にスコア算出部12は、差分総和値Idiffを、フレーム画像上領域の面積で正規化した値を算出し、スコアとして出力し(ステップS1206)、処理を終える。このスコアscore3は、フレーム画像上領域の面積をSとすると、式(9)によって算出できる。
Finally, the
物体座標系変換行列の精度がよくない場合には、フレーム画像上領域と合成画像上領域は大きく異なることとなる。これにより、物体座標系変換行列の精度がよくない場合には差分総和値Idiffが大きいことからスコアの値も大きくなり、物体座標系変換行列の精度がより良い場合には差分総和値Idiffが小さいことからスコアの値も小さくなる。 When the accuracy of the object coordinate system conversion matrix is not good, the region on the frame image and the region on the composite image are greatly different. As a result, when the accuracy of the object coordinate system transformation matrix is not good, the difference sum value Idiff is large, so the score value is also large. When the accuracy of the object coordinate system transformation matrix is better, the difference sum value Idiff is small. As a result, the score value also decreases.
<第4の実施形態>
第3の実施形態では、フレーム画像F(t)内における対象画像点が構成する領域に属する各画素のテクスチャ情報を、合成画像点が構成する領域へマッピングしたものと、当該マッピング以前に合成画像点が構成する領域に属する各画素のテクスチャ情報を比較することで、物体座標系変換行列推定精度を表現するが、テクスチャ情報の取得やマッピングに幾何変換を要するため計算量が大きいといった問題がある。
<Fourth Embodiment>
In the third embodiment, the texture information of each pixel belonging to the region formed by the target image point in the frame image F (t) is mapped to the region formed by the composite image point, and the composite image before the mapping. The object coordinate system transformation matrix estimation accuracy is expressed by comparing the texture information of each pixel belonging to the area formed by the point, but there is a problem that the calculation amount is large because geometric transformation is required for acquisition and mapping of the texture information. .
そこで本実施例では、テクスチャ情報のマッピングを利用せず、フレーム画像F(t)と、被写体を表現した3D−CGから合成するCG合成画像を比較することで、高速に物体座標系変換行列推定精度を表現するスコアの算出方法について述べる。 Therefore, in this embodiment, the mapping of texture information is not used, and the frame image F (t) is compared with the CG synthesized image synthesized from 3D-CG representing the subject, so that the object coordinate system transformation matrix is estimated at high speed. A method for calculating a score expressing accuracy will be described.
本実施例における、合成画像点算出部11と、成否判定部13の処理は、第1の実施形態と何ら変わるところがないので説明は省く。以降、第4の実施形態におけるスコア算出部12の処理について述べる。
The processing of the composite image
図17は、第4の実施形態におけるスコア算出部12の処理フローを示す図である。
第4の実施形態におけるスコア算出部12では、第1の実施形態同様、対象画像点及び、対象画像点に関連付けられた合成画像点を入力する。第4の実施形態では加えてフレーム画像F(t)も入力する(ステップS1701)。続いてスコア算出部12は、フレーム画像F(t)内に写る所定の被写体と同じ被写体についての3D−CGとカメラパラメータ、及び、物体座標系変換装置が算出した物体座標系変換行列、カメラポーズを入力する(ステップS1702)。
FIG. 17 is a diagram illustrating a processing flow of the
In the
図18は、第4の実施形態によるスコア算出部の処理の説明に用いる第1の図である。
図19は、第4の実施形態によるスコア算出部の処理の説明に用いる第2の図である。
図20は、第4の実施形態によるスコア算出部の処理の説明に用いる第3の図である。
図21は、第4の実施形態によるスコア算出部の処理の説明に用いる第4の図である。
図22は、第4の実施形態によるスコア算出部の処理の説明に用いる第5の図である。
図23は、第4の実施形態によるスコア算出部の処理の説明に用いる第6の図である。
第4の実施形態では、例えば図18に示すような3D−CGが予め準備されており、これを物体座標系変換行列推定成否判定装置1が入力したものとして以降の説明を進める。ここで、被写体の3D−CGは3次元座標で表現される頂点と頂点同士を結んだ面から構成されるソリッドモデルであるものとする。当該3D−CGに面の色を示すテクスチャは付与されていてもされていなくてもよい。
FIG. 18 is a first diagram used for explaining the processing of the score calculation unit according to the fourth embodiment.
FIG. 19 is a second diagram used for explaining the processing of the score calculation unit according to the fourth embodiment.
FIG. 20 is a third diagram used for explaining the processing of the score calculation unit according to the fourth embodiment.
FIG. 21 is a fourth diagram used for explaining the processing of the score calculation unit according to the fourth embodiment.
FIG. 22 is a fifth diagram used for explaining the processing of the score calculation unit according to the fourth embodiment.
FIG. 23 is a sixth diagram used for explaining the processing of the score calculation unit according to the fourth embodiment.
In the fourth embodiment, for example, 3D-CG as shown in FIG. 18 is prepared in advance, and the following description will be made assuming that this is input by the object coordinate system conversion matrix estimation success /
続いてスコア算出部12は、第1の実施形態同様に全ての対象画像点を包含するフレーム画像上領域を決定する(ステップS1703)。続いてスコア算出部12は、フレーム画像からエッジ画像をエッジ検出により生成する(ステップS1704)。この処理は従来の方法と特に変わるところはないのでここでの説明は省く。なおエッジ画像とは、隣接する画素の輝度値などのテクスチャ情報について所定の閾値以上離れた値となっている画素の集合を示す画像である。第4の実施形態では、例えば図19に示すようなフレーム画像に対して、図20に示すようなエッジ画像が生成されたものとする。
Subsequently, the
次にスコア算出部12は、被写体の3D−CGと物体座標系変換行列、カメラポーズ、カメラパラメータから、CG合成画像を生成する(ステップS1705)。この処理は物体座標系変換装置のCG合成部での物体座標系変換行列を用いたCG合成の処理と何ら変わるところは無いので、ここでの説明は省く。第4の実施形態では、例えば図21に示すようなCG合成画像が生成されたものとする。続いてスコア算出部12は、CG合成画像からエッジ画像を生成し(ステップS1706)、CGエッジ画像とする。第4の実施形態では、例えば図22に示すようなCGエッジ画像が生成されたものとする。
Next, the
スコア算出部12は、前記エッジ画像と、前記CGエッジ画像からAND演算により重複画素数を算出する(ステップS1707)。この処理は、例えば、エッジ画像においてエッジ上の画素値を1、それ以外を0とした画像と、CGエッジ画像においてエッジ上の画素値を1、それ以外を0とした画像をそれぞれ作成しておく。そして、或る画素の画素値が両画像において1の場合は1を、それ以外の場合は0を設定するAND演算によって図23のような重複画素を決定し、AND演算後の画像の画素値が1である画素の総数を重複画素数とすることで実現できる。
The
続いてスコア算出部12は、前記重複画素数を、前記フレーム画像上領域の面積で正規化した値を算出し、逆数をスコアとして出力する(ステップS1708)。このスコアscore4は、重複領域数をO、フレーム画像上領域の面積をSとすると、式(10)によって算出できる。
Subsequently, the
なお、ここで、前記重複領域数を前記フレーム画像上領域の面積で正規化した値の逆数をスコアとする理由は、重複領域数が多い方が物体座標系変換行列推定精度が高いとされるのに対し、成否判定部13において算出したスコアが最小スコアより小さい場合に成功と判定するためである。成否判定部13において算出したスコアが最大スコアより大きい場合に成功と判定する実施形態の場合は、逆数を取る必要はない。
Here, the reason why the score is the reciprocal of the value obtained by normalizing the number of overlapping regions by the area of the region on the frame image is that the larger the number of overlapping regions, the higher the object coordinate system transformation matrix estimation accuracy. On the other hand, when the score calculated by the success /
また、本実施形態において、CGエッジ画像はCG合成画像を生成し、当該CG合成画像からエッジ検出により作成する方法について記述したが、CG合成画像を生成する時に、陰面処理を施した3D−CGのワイヤーフレームモデルからCG合成画像を生成することでCGエッジ画像を生成してもよい。 In the present embodiment, a method for generating a CG composite image by generating an CG composite image and performing edge detection from the CG composite image has been described. However, when a CG composite image is generated, 3D-CG subjected to hidden surface processing is described. A CG edge image may be generated by generating a CG composite image from the wire frame model.
以上説明したように、上述の物体座標系変換行列推定成否判定装置1の処理によれば、フレーム画像中の物体に対してコンピュータグラフィクス等を合成する場合に算出する物体座標系変換行列推定の成否を判定することができるため、正確なCG合成を実現することができる。
As described above, according to the processing of the object coordinate system conversion matrix estimation success /
なお、本発明を各実施形態について具体的に説明したが、上記各実施形態の説明は、本発明を説明するためのものであって、特許請求の範囲に記載の発明を限定し、或は範囲を減縮する様に解すべきではない。また、上述の実施形態における各手段の構成は上記実施形態に限らず、特許請求の範囲に記載の技術的範囲内で種々の変形が可能であることは勿論である。 Although the present invention has been specifically described for each embodiment, the above description of each embodiment is for explaining the present invention, and limits the invention described in the claims, or It should not be construed as reducing the scope. In addition, the configuration of each unit in the above-described embodiment is not limited to the above-described embodiment, and various modifications can be made within the technical scope described in the claims.
上述の物体座標系変換行列推定成否判定装置1は内部に、コンピュータシステムを有している。そして、上述した各処理の過程は、プログラムの形式でコンピュータ読み取り可能な記録媒体に記憶されており、このプログラムをコンピュータが読み出して実行することによって、上記処理が行われる。ここでコンピュータ読み取り可能な記録媒体とは、磁気ディスク、光磁気ディスク、CD−ROM、DVD−ROM、半導体メモリ等をいう。また、このコンピュータプログラムを通信回線によってコンピュータに配信し、この配信を受けたコンピュータが当該プログラムを実行するようにしても良い。
The above-described object coordinate system transformation matrix estimation success /
また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。 The program may be for realizing a part of the functions described above. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, what is called a difference file (difference program) may be sufficient.
1・・・物体座標系変換行列推定成否判定装置
11・・・合成画像点算出部
12・・・スコア算出部
13・・・成否判定部
14・・・記憶部
DESCRIPTION OF
Claims (7)
前記対象画像点と対応する前記合成画像点とに基づいて、前記物体座標変換行列によって前記フレーム画像上の重畳対象の物体に重畳画像が重畳される場合の、当該重畳対象の物体と重畳画像との不一致の度合いを示すスコアを算出するスコア算出部と、
当該算出されたスコアが過去に算出された何れの他のスコアよりも値が低い場合には、前記スコア算出部がスコアの算出に用いた物体座標変換行列による重畳画像の重畳の精度向上が成功した旨を示す成功信号を出力し、前記スコア算出部の算出したスコアが過去に算出された最も値の低いスコアよりも値が高い場合には、前記スコア算出部がスコアの算出に用いた物体座標変換行列による重畳画像の重畳の精度向上が失敗した旨を示す失敗信号を出力する成否判定部と、
を備えることを特徴とする物体座標系変換行列推定成否判定装置。 A camera pose indicating a translation position and a rotation angle of a camera with reference to a reference point and a reference direction in the world coordinate system, a camera parameter indicating at least a focal length of the camera, and a frame image obtained based on photographing by the camera A target image point indicating an object to be superimposed on the superimposed image, a three-dimensional point on the object indicating a three-dimensional point of the superimposed image in an object coordinate system that is a coordinate system different from the world coordinate system, and the world A case in which a three-dimensional point on the object is superimposed on the frame image by the object coordinate conversion matrix based on an object coordinate conversion matrix that uses coordinates in the coordinate system to convert to coordinates in the object coordinate system. A composite image point calculation unit for calculating a corresponding composite image point;
Based on the target image point and the corresponding composite image point, when the superimposed image is superimposed on the object to be superimposed on the frame image by the object coordinate transformation matrix, A score calculation unit that calculates a score indicating the degree of inconsistency of
When the calculated score is lower than any other score calculated in the past, the score calculation unit succeeded in improving the accuracy of superimposition of the superimposed image using the object coordinate transformation matrix used for the calculation of the score. If the score calculated by the score calculation unit is higher than the lowest score calculated in the past, the object used by the score calculation unit to calculate the score is output. A success / failure determination unit that outputs a failure signal indicating that the accuracy improvement of the superimposition of the superimposed image by the coordinate transformation matrix has failed;
An object coordinate system conversion matrix estimation success / failure determination apparatus comprising:
ことを特徴とする請求項1に記載の物体座標系変換行列推定成否判定装置。 The score calculation unit calculates a difference between the composite image points corresponding to the target image points for a combination of the composite image points corresponding to a plurality of the target image points, and calculates the score based on the sum of the combinations. The object coordinate system transformation matrix estimation success / failure determination apparatus according to claim 1.
ことを特徴とする請求項1に記載の物体座標系変換行列推定成否判定装置。 The score calculation unit determines an overlapping area between an area on the frame image that includes all of the target image points and an area on the frame image that includes all of the composite image points. The object coordinate system transformation matrix estimation success / failure determination apparatus according to claim 1, wherein an inverse of a value based on a magnitude is calculated as the score.
ことを特徴とする請求項1に記載の物体座標系変換行列推定成否判定装置。 The score calculation unit includes the texture information for each pixel in the region on the frame image that includes all of the composite image points, and the pixels in the region on the frame image that includes all of the target image points. The score is calculated based on a sum of differences from texture information for each pixel when mapping to an area on the frame image including all of the composite image points. Object coordinate system transformation matrix estimation success / failure determination apparatus.
ことを特徴とする請求項1に記載の物体座標系変換行列推定成否判定装置。 The score calculation unit is based on a difference between an edge image detected in the frame image and an edge image detected in the frame image when a superimposed image of a subject captured in the frame image is combined with the frame image. The object coordinate system transformation matrix estimation success / failure determination apparatus according to claim 1, wherein a score is calculated.
ワールド座標系における基準点および基準方向を基準とするカメラの並進位置および回転角度を示すカメラポーズと、少なくとも前記カメラの焦点距離を示すカメラパラメータと、前記カメラの撮影に基づいて得られたフレーム画像上において重畳画像の重畳対象の物体を示す対象画像点と、前記ワールド座標系とは異なる座標系である物体座標系での前記重畳画像の3次元点を示すオブジェクト上3次元点と、前記ワールド座標系における座標を前記物体座標系の座標への変換に利用する物体座標変換行列と、に基づいて、前記オブジェクト上3次元点が前記物体座標変換行列によって前記フレーム画像上に重畳される場合の対応する合成画像点を算出し、
前記対象画像点と対応する前記合成画像点とに基づいて、前記物体座標変換行列によって前記フレーム画像上の重畳対象の物体に重畳画像が重畳される場合の、当該重畳対象の物体と重畳画像との不一致の度合いを示すスコアを算出し、
当該算出されたスコアが過去に算出された何れの他のスコアよりも値が低い場合には、前記スコアの算出に用いた物体座標変換行列による重畳画像の重畳の精度向上が成功した旨を示す成功信号を出力し、前記算出したスコアが過去に算出された最も値の低いスコアよりも値が高い場合には、前記スコアの算出に用いた物体座標変換行列による重畳画像の重畳の精度向上が失敗した旨を示す失敗信号を出力する
ことを特徴とする物体座標系変換行列推定成否判定方法。 The object coordinate system transformation matrix estimation success / failure determination device is
A camera pose indicating a translation position and a rotation angle of a camera with reference to a reference point and a reference direction in the world coordinate system, a camera parameter indicating at least a focal length of the camera, and a frame image obtained based on photographing by the camera A target image point indicating an object to be superimposed on the superimposed image, a three-dimensional point on the object indicating a three-dimensional point of the superimposed image in an object coordinate system that is a coordinate system different from the world coordinate system, and the world A case in which a three-dimensional point on the object is superimposed on the frame image by the object coordinate conversion matrix based on an object coordinate conversion matrix that uses coordinates in the coordinate system to convert to coordinates in the object coordinate system. Calculate the corresponding composite image point,
Based on the target image point and the corresponding composite image point, when the superimposed image is superimposed on the object to be superimposed on the frame image by the object coordinate transformation matrix, Calculate a score that indicates the degree of discrepancy between
When the calculated score is lower than any other score calculated in the past, it indicates that the accuracy of superimposition of the superimposed image by the object coordinate transformation matrix used for the calculation of the score has succeeded. When a success signal is output and the calculated score is higher than the lowest score calculated in the past, the accuracy of superimposition of the superimposed image by the object coordinate transformation matrix used for the calculation of the score is improved. An object coordinate system transformation matrix estimation success / failure determination method, comprising: outputting a failure signal indicating failure.
ワールド座標系における基準点および基準方向を基準とするカメラの並進位置および回転角度を示すカメラポーズと、少なくとも前記カメラの焦点距離を示すカメラパラメータと、前記カメラの撮影に基づいて得られたフレーム画像上において重畳画像の重畳対象の物体を示す対象画像点と、前記ワールド座標系とは異なる座標系である物体座標系での前記重畳画像の3次元点を示すオブジェクト上3次元点と、前記ワールド座標系における座標を前記物体座標系の座標への変換に利用する物体座標変換行列と、に基づいて、前記オブジェクト上3次元点が前記物体座標変換行列によって前記フレーム画像上に重畳される場合の対応する合成画像点を算出する合成画像点算出手段、
前記対象画像点と対応する前記合成画像点とに基づいて、前記物体座標変換行列によって前記フレーム画像上の重畳対象の物体に重畳画像が重畳される場合の、当該重畳対象の物体と重畳画像との不一致の度合いを示すスコアを算出するスコア算出手段、
当該算出されたスコアが過去に算出された何れの他のスコアよりも値が低い場合には、前記スコア算出手段がスコアの算出に用いた物体座標変換行列による重畳画像の重畳の精度向上が成功した旨を示す成功信号を出力し、前記スコア算出手段の算出したスコアが過去に算出された最も値の低いスコアよりも値が高い場合には、前記スコア算出手段がスコアの算出に用いた物体座標変換行列による重畳画像の重畳の精度向上が失敗した旨を示す失敗信号を出力する成否判定手段、
として機能させるためのプログラム。 The computer of the object coordinate system transformation matrix estimation success / failure determination apparatus,
A camera pose indicating a translation position and a rotation angle of a camera with reference to a reference point and a reference direction in the world coordinate system, a camera parameter indicating at least a focal length of the camera, and a frame image obtained based on photographing by the camera A target image point indicating an object to be superimposed on the superimposed image, a three-dimensional point on the object indicating a three-dimensional point of the superimposed image in an object coordinate system that is a coordinate system different from the world coordinate system, and the world A case in which a three-dimensional point on the object is superimposed on the frame image by the object coordinate conversion matrix based on an object coordinate conversion matrix that uses coordinates in the coordinate system to convert to coordinates in the object coordinate system. A composite image point calculating means for calculating a corresponding composite image point;
Based on the target image point and the corresponding composite image point, when the superimposed image is superimposed on the object to be superimposed on the frame image by the object coordinate transformation matrix, Score calculating means for calculating a score indicating the degree of mismatch of
When the calculated score is lower than any other score calculated in the past, the accuracy of superimposing the superimposed image by the object coordinate transformation matrix used by the score calculation means for the calculation of the score is successful. If the score calculated by the score calculation means is higher than the lowest score calculated in the past, the object used by the score calculation means to calculate the score is output. A success / failure determination means for outputting a failure signal indicating that the accuracy of superimposing the superimposed image using the coordinate transformation matrix has failed
Program to function as.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011245666A JP5719277B2 (en) | 2011-11-09 | 2011-11-09 | Object coordinate system conversion matrix estimation success / failure determination apparatus, object coordinate system conversion matrix estimation success / failure determination method, and program thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011245666A JP5719277B2 (en) | 2011-11-09 | 2011-11-09 | Object coordinate system conversion matrix estimation success / failure determination apparatus, object coordinate system conversion matrix estimation success / failure determination method, and program thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013101552A true JP2013101552A (en) | 2013-05-23 |
JP5719277B2 JP5719277B2 (en) | 2015-05-13 |
Family
ID=48622104
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011245666A Expired - Fee Related JP5719277B2 (en) | 2011-11-09 | 2011-11-09 | Object coordinate system conversion matrix estimation success / failure determination apparatus, object coordinate system conversion matrix estimation success / failure determination method, and program thereof |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5719277B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111327840A (en) * | 2020-02-27 | 2020-06-23 | 努比亚技术有限公司 | Multi-frame special-effect video acquisition method, terminal and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030044047A1 (en) * | 2001-08-27 | 2003-03-06 | Kelly Alonzo J. | System and method for object localization |
WO2007119870A1 (en) * | 2006-04-14 | 2007-10-25 | Nec Corporation | Checking device and checking method |
JP2010113731A (en) * | 2007-03-09 | 2010-05-20 | Omron Corp | Recognition method, and image processing apparatus using the method |
JP2011220752A (en) * | 2010-04-07 | 2011-11-04 | Seiko Epson Corp | Three-dimensional shape measurement apparatus and calibration method for three-dimensional shape measurement apparatus |
-
2011
- 2011-11-09 JP JP2011245666A patent/JP5719277B2/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030044047A1 (en) * | 2001-08-27 | 2003-03-06 | Kelly Alonzo J. | System and method for object localization |
WO2007119870A1 (en) * | 2006-04-14 | 2007-10-25 | Nec Corporation | Checking device and checking method |
JP2010113731A (en) * | 2007-03-09 | 2010-05-20 | Omron Corp | Recognition method, and image processing apparatus using the method |
JP2011220752A (en) * | 2010-04-07 | 2011-11-04 | Seiko Epson Corp | Three-dimensional shape measurement apparatus and calibration method for three-dimensional shape measurement apparatus |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111327840A (en) * | 2020-02-27 | 2020-06-23 | 努比亚技术有限公司 | Multi-frame special-effect video acquisition method, terminal and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
JP5719277B2 (en) | 2015-05-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Poirson et al. | Fast single shot detection and pose estimation | |
CN110568447B (en) | Visual positioning method, device and computer readable medium | |
US10254845B2 (en) | Hand gesture recognition for cursor control | |
US10354129B2 (en) | Hand gesture recognition for virtual reality and augmented reality devices | |
US10776936B2 (en) | Point cloud matching method | |
JP6560480B2 (en) | Image processing system, image processing method, and program | |
JP6011102B2 (en) | Object posture estimation method | |
US10380413B2 (en) | System and method for pose-invariant face alignment | |
US9420265B2 (en) | Tracking poses of 3D camera using points and planes | |
US9892323B2 (en) | Augmented reality device based on recognition of spatial structure and method thereof | |
CN110853100B (en) | Structured scene vision SLAM method based on improved point-line characteristics | |
WO2021114776A1 (en) | Object detection method, object detection device, terminal device, and medium | |
CN111160291B (en) | Human eye detection method based on depth information and CNN | |
WO2020152927A1 (en) | Training data generation method, training data generation device, and inference processing method | |
CN110546644A (en) | Recognition device, recognition method, and recognition program | |
US10460472B2 (en) | System and method for model adaptation | |
KR101478709B1 (en) | Method and apparatus for extracting and generating feature point and feature descriptor rgb-d image | |
US9317968B2 (en) | System and method for multiple hypotheses testing for surface orientation during 3D point cloud extraction from 2D imagery | |
Li et al. | RGBD relocalisation using pairwise geometry and concise key point sets | |
EP3825804A1 (en) | Map construction method, apparatus, storage medium and electronic device | |
KR101225644B1 (en) | method for object recognition and pose estimation at robot | |
JP5719277B2 (en) | Object coordinate system conversion matrix estimation success / failure determination apparatus, object coordinate system conversion matrix estimation success / failure determination method, and program thereof | |
CN115497086A (en) | 3D scene flow estimation method based on fine-grained identification in automatic driving | |
Afzal et al. | Kinect Deform: enhanced 3d reconstruction of non-rigidly deforming objects | |
EP3846136A1 (en) | Augmenting a video flux of a real scene |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20130606 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20130802 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140115 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140912 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140924 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20141120 |
|
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: 20150317 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150320 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5719277 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |