JP2011242134A - Image processor, image processing method, program, and electronic device - Google Patents
Image processor, image processing method, program, and electronic device Download PDFInfo
- Publication number
- JP2011242134A JP2011242134A JP2010111588A JP2010111588A JP2011242134A JP 2011242134 A JP2011242134 A JP 2011242134A JP 2010111588 A JP2010111588 A JP 2010111588A JP 2010111588 A JP2010111588 A JP 2010111588A JP 2011242134 A JP2011242134 A JP 2011242134A
- Authority
- JP
- Japan
- Prior art keywords
- image
- projection parameter
- composite image
- pixel
- evaluation function
- 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.)
- Withdrawn
Links
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
【課題】簡易な構成で、より容易にカメラの位置や姿勢を推定する。
【解決手段】合成画像生成部103は、推定の基準となる基準画像を構成する画素の位置を、基準画像を構成する画素に対応する撮像画像上の画素の位置に射影する射影パラメータに基づいて、射影パラメータにより射影される撮像画像上の位置に存在する各画素により構成される合成画像を生成し、評価部104は、合成画像と基準画像との相関を表す評価関数を生成し、パラメータ更新部106は、評価関数に基づいて、射影パラメータを更新し、更新後の射影パラメータに基づいて、撮像部の位置又は姿勢の少なくとも一方を推定する。本発明は、例えば、カメラの位置や姿勢を推定し、その推定結果に基づく処理を行なうコンピュータ等に適用できる。
【選択図】図3The position and orientation of a camera can be estimated more easily with a simple configuration.
A composite image generation unit 103 projects a position of a pixel constituting a reference image serving as a reference for estimation onto a position of a pixel on a captured image corresponding to a pixel constituting the reference image. Then, a composite image composed of each pixel existing at a position on the captured image projected by the projection parameter is generated, and the evaluation unit 104 generates an evaluation function representing a correlation between the composite image and the reference image, and updates the parameters The unit 106 updates the projection parameter based on the evaluation function, and estimates at least one of the position or orientation of the imaging unit based on the updated projection parameter. The present invention can be applied to, for example, a computer that estimates the position and orientation of a camera and performs processing based on the estimation result.
[Selection] Figure 3
Description
本発明は、画像処理装置、画像処理方法、プログラム、及び電子装置に関し、特に、例えば、カメラの撮像により得られる撮像画像に基づいて、カメラの位置や姿勢を推定する場合に用いて好適な画像処理装置、画像処理方法、プログラム、及び電子装置に関する。 The present invention relates to an image processing device, an image processing method, a program, and an electronic device, and in particular, an image suitable for use when, for example, estimating the position and orientation of a camera based on a captured image obtained by imaging with a camera. The present invention relates to a processing device, an image processing method, a program, and an electronic device.
カメラの撮像により得られる撮像画像に基づいて、カメラの位置や姿勢を推定するキャリブレーションを行なう推定方法として、例えば、以下の第1及び第2の推定方法が存在する。 For example, there are the following first and second estimation methods as an estimation method for performing calibration for estimating the position and orientation of the camera based on a captured image obtained by imaging of the camera.
第1の推定方法では、カメラが、特定の模様(例えば市松模様等)の壁紙等を撮像する。そして、予め用意された基準画像と撮像された撮像画像との、対応する画素どうしの差分自乗和を算出し、算出した差分自乗和を、カメラの位置や姿勢を推定するための評価関数として用いて、カメラの位置や姿勢を推定する(例えば、特許文献1を参照)。 In the first estimation method, the camera captures a wallpaper or the like having a specific pattern (for example, a checkered pattern). Then, the difference square sum between corresponding pixels of the reference image prepared in advance and the captured image is calculated, and the calculated difference square sum is used as an evaluation function for estimating the position and orientation of the camera. Thus, the position and orientation of the camera are estimated (see, for example, Patent Document 1).
なお、基準画像とは、位置や姿勢が既知であるカメラにより、特定の模様の壁紙等を撮像したときに得られる画像を表す。 The reference image represents an image obtained when a wallpaper having a specific pattern is captured by a camera whose position and orientation are known.
また、第2の推定方法では、例えば、8ビットの画素値を有する画素により構成される8ビット画像から、8ビットのビット列を構成する各ビットのうち、異なる8つの位置に存在するビットをそれぞれ画素値とする8枚の1ビット画像を生成する。 Further, in the second estimation method, for example, from an 8-bit image configured by pixels having an 8-bit pixel value, bits existing at eight different positions among the respective bits configuring an 8-bit bit string are respectively determined. Eight 1-bit images are generated as pixel values.
そして、8枚の1ビット画像を、順次、LCD(Liquid Crystal Display)に表示させるようにして、LCDに表示される8枚の1ビット画像を、カメラにより撮像して得られる撮像画像に基づいて、カメラの位置や姿勢を推定する(例えば、非特許文献1を参照)。 Then, eight 1-bit images are sequentially displayed on an LCD (Liquid Crystal Display), and the eight 1-bit images displayed on the LCD are captured based on the captured images obtained by the camera. The position and orientation of the camera are estimated (see, for example, Non-Patent Document 1).
しかしながら、上述した第1の推定方法では、評価関数を算出する際に、撮像画像と基準画像との間に生じる画素値(輝度値)のレベル差による悪影響を軽減するために、特定の模様の壁紙等を対象として撮像を行なうとともに、基準画像及び撮像画像それぞれを構成する各画素の画素値を、所定の値で正規化(除算)して2値化する必要があった。 However, in the first estimation method described above, when calculating the evaluation function, in order to reduce the adverse effect due to the level difference of the pixel value (luminance value) that occurs between the captured image and the reference image, In addition to capturing images such as wallpaper, it is necessary to normalize (divide) the pixel values of each pixel constituting each of the reference image and the captured image and binarize them with a predetermined value.
また、上述した第2の推定方法では、LCDが表示可能な総画素数に応じて、LCDに表示させる1ビット画像の画素数に制限が加わってしまう。さらに、第2の推定方法では、LCDに表示される8枚の1ビット画像を撮像するために、カメラにより、少なくとも8回の撮像を行なわなければならなかった。 In the second estimation method described above, the number of pixels of the 1-bit image displayed on the LCD is limited according to the total number of pixels that can be displayed on the LCD. Further, in the second estimation method, in order to capture eight 1-bit images displayed on the LCD, it has been necessary to perform imaging at least eight times by the camera.
また、第2の推定方法では、キャリブレーションにおいて、LCDを使用するため、例えば、LCDを使用せずにキャリブレーションを行なう場合と比較して、大掛かりな構成となっていた。 Further, in the second estimation method, since an LCD is used for calibration, for example, the configuration is large compared with a case where calibration is performed without using an LCD.
本発明は、このような状況に鑑みてなされたものであり、簡易な構成で、より容易にカメラの位置や姿勢を推定できるようにするものである。 The present invention has been made in view of such a situation, and makes it possible to more easily estimate the position and orientation of a camera with a simple configuration.
本発明の第1の側面の画像処理装置は、撮像部の撮像により得られる撮像画像に基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定する画像処理装置であって、推定の基準となる基準画像を構成する画素の位置を、前記基準画像を構成する画素に対応する前記撮像画像上の画素の位置に射影する射影パラメータに基づいて、前記射影パラメータにより射影される前記撮像画像上の位置に存在する各画素により構成される合成画像を生成する合成画像生成手段と、前記合成画像と前記基準画像との相関を表す評価関数を生成する評価生成手段と、前記評価関数に基づいて、前記射影パラメータを更新する更新手段と、更新後の前記射影パラメータに基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定する推定手段とを含む画像処理装置である。 An image processing apparatus according to a first aspect of the present invention is an image processing apparatus that estimates at least one of the position or orientation of the imaging unit based on a captured image obtained by imaging of the imaging unit, On the captured image projected by the projection parameter based on the projection parameter that projects the position of the pixel constituting the reference image to the position of the pixel on the captured image corresponding to the pixel constituting the reference image. Based on the evaluation function, a composite image generation unit that generates a composite image composed of each pixel existing at a position, an evaluation generation unit that generates an evaluation function that represents a correlation between the composite image and the reference image, Updating means for updating the projection parameter; and estimation means for estimating at least one of the position or orientation of the imaging unit based on the updated projection parameter. An image processing apparatus.
前記評価生成手段では、2次多項式により表される前記評価関数を生成し、前記更新手段では、前記評価関数を用いた最急降下法により算出した射影パラメータを新たな射影パラメータとして更新するようにすることができる。 The evaluation generation unit generates the evaluation function represented by a quadratic polynomial, and the update unit updates the projection parameter calculated by the steepest descent method using the evaluation function as a new projection parameter. be able to.
前記評価生成手段では、更新後の前記射影パラメータの候補を表す候補射影パラメータを変数として有する前記評価関数を生成し、前記更新手段では、前記評価関数が最小となるときの前記候補射影パラメータを新たな射影パラメータとして更新するようにすることができる。 The evaluation generation means generates the evaluation function having a candidate projection parameter representing the updated projection parameter candidate as a variable, and the update means newly sets the candidate projection parameter when the evaluation function is minimized. It can be updated as a new projection parameter.
前記基準画像を構成する各画素の位置と、対応する前記撮像画像上の位置に基づいて、前記射影パラメータを生成する初期パラメータ生成手段をさらに設けることができ、前記合成画像生成手段では、前記初期パラメータ生成手段により前記射影パラメータが生成されたことに対応して、前記射影パラメータに基づいて、前記合成画像を生成し、前記更新手段により前記射影パラメータが更新されたことに対応して、更新後の前記射影パラメータに基づいて、前記合成画像を生成するようにすることができる。 An initial parameter generating means for generating the projection parameter based on the position of each pixel constituting the reference image and the corresponding position on the captured image can be further provided, and the composite image generating means In response to the projection parameter being generated by the parameter generation unit, the composite image is generated based on the projection parameter, and the updated unit is updated in response to the update of the projection parameter by the update unit. The composite image can be generated based on the projection parameters.
前記基準画像は、前記撮像部とは異なる、位置及び姿勢が既知である他の撮像部の撮像により得られたものであり、前記推定手段では、前記他の撮像部に対する前記撮像部の位置及び姿勢の違いを表す前記射影パラメータに基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定するようにすることができる。 The reference image is obtained by imaging with another imaging unit having a known position and orientation different from the imaging unit, and the estimation unit includes the position of the imaging unit with respect to the other imaging unit and It is possible to estimate at least one of the position or the posture of the imaging unit based on the projection parameter representing the difference in posture.
本発明の第1の側面の画像処理方法は、撮像部の撮像により得られる撮像画像に基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定する画像処理装置の画像処理方法であって、前記画像処理装置は、合成画像生成手段と、評価生成手段と、更新手段と、推定手段とを含み、前記画像合成手段が、推定の基準となる基準画像を構成する画素の位置を、前記基準画像を構成する画素に対応する前記撮像画像上の画素の位置に射影する射影パラメータに基づいて、前記射影パラメータにより射影される前記撮像画像上の位置に存在する各画素により構成される合成画像を生成し、前記評価生成手段が、前記合成画像と前記基準画像との相関を表す評価関数を生成し、前記更新手段が、前記評価関数に基づいて、前記射影パラメータを更新し、前記推定手段が、更新後の前記射影パラメータに基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定するステップを含む画像処理方法である。 An image processing method according to a first aspect of the present invention is an image processing method of an image processing apparatus that estimates at least one of the position or orientation of the imaging unit based on a captured image obtained by imaging of the imaging unit, The image processing apparatus includes a composite image generation unit, an evaluation generation unit, an update unit, and an estimation unit, and the image synthesis unit determines a position of a pixel constituting a reference image serving as a reference for estimation. Based on a projection parameter projected to the position of the pixel on the captured image corresponding to the pixel constituting the image, a composite image composed of each pixel present at the position on the captured image projected by the projection parameter Generating the evaluation function representing the correlation between the composite image and the reference image, and updating the projection parameter based on the evaluation function. The estimating means, based on said projection parameter after update, an image processing method comprising the step of estimating at least one of the position or orientation of the imaging unit.
本発明の第1の側面のプログラムは、撮像部の撮像により得られる撮像画像に基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定する画像処理装置のコンピュータを、推定の基準となる基準画像を構成する画素の位置を、前記基準画像を構成する画素に対応する前記撮像画像上の画素の位置に射影する射影パラメータに基づいて、前記射影パラメータにより射影される前記撮像画像上の位置に存在する各画素により構成される合成画像を生成する合成画像生成手段と、前記合成画像と前記基準画像との相関を表す評価関数を生成する評価生成手段と、前記評価関数に基づいて、前記射影パラメータを更新する更新手段と、更新後の前記射影パラメータに基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定する推定手段として機能させるためのプログラムである。 The program according to the first aspect of the present invention is based on a captured image obtained by imaging by an imaging unit, and uses a computer of an image processing apparatus that estimates at least one of the position or orientation of the imaging unit as a criterion for estimation. Based on the projection parameter that projects the position of the pixel that constitutes the image to the position of the pixel on the captured image that corresponds to the pixel that constitutes the reference image, the position on the captured image that is projected by the projection parameter Based on the evaluation function, a composite image generation unit that generates a composite image composed of each existing pixel, an evaluation generation unit that generates an evaluation function representing a correlation between the composite image and the reference image, and the projection based on the evaluation function Update means for updating parameters, and estimation means for estimating at least one of the position or orientation of the imaging unit based on the updated projection parameters Is a program for making the function Te.
本発明の第1の側面によれば、推定の基準となる基準画像を構成する画素の位置を、基準画像を構成する画素に対応する撮像画像上の画素の位置に射影する射影パラメータに基づいて、射影パラメータにより射影される撮像画像上の位置に存在する各画素により構成される合成画像が生成され、合成画像と基準画像との相関を表す評価関数が生成され、評価関数に基づいて、射影パラメータが更新され、更新後の射影パラメータに基づいて、撮像部の位置又は姿勢の少なくとも一方が推定される。 According to the first aspect of the present invention, based on a projection parameter for projecting the position of a pixel constituting a reference image serving as a reference for estimation to the position of a pixel on a captured image corresponding to the pixel constituting the reference image. A composite image composed of each pixel existing at a position on the captured image projected by the projection parameter is generated, and an evaluation function representing a correlation between the composite image and the reference image is generated. Based on the evaluation function, the projection is performed. The parameter is updated, and at least one of the position and orientation of the imaging unit is estimated based on the updated projection parameter.
本発明の第2の側面の電子装置は、撮像部の撮像により得られる撮像画像に基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定する電子装置であって、推定の基準となる基準画像を構成する画素の位置を、前記基準画像を構成する画素に対応する前記撮像画像上の画素の位置に射影する射影パラメータに基づいて、前記射影パラメータにより射影される前記撮像画像上の位置に存在する各画素により構成される合成画像を生成する合成画像生成手段と、前記合成画像と前記基準画像との相関を表す評価関数を生成する評価生成手段と、前記評価関数に基づいて、前記射影パラメータを更新する更新手段と、更新後の前記射影パラメータに基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定する推定手段と、前記推定手段により推定された推定結果に基づいて、所定の処理を実行する実行手段とを含む電子装置である。 An electronic device according to a second aspect of the present invention is an electronic device that estimates at least one of the position or orientation of the imaging unit based on a captured image obtained by imaging of the imaging unit, and serves as a reference for estimation. Based on the projection parameter that projects the position of the pixel that constitutes the image to the position of the pixel on the captured image that corresponds to the pixel that constitutes the reference image, the position on the captured image that is projected by the projection parameter Based on the evaluation function, a composite image generation unit that generates a composite image composed of each existing pixel, an evaluation generation unit that generates an evaluation function representing a correlation between the composite image and the reference image, and the projection based on the evaluation function Update means for updating parameters, estimation means for estimating at least one of the position or orientation of the imaging unit based on the updated projection parameters, and the estimation means Based on more estimated estimation result, an electronic device and an execution means for executing a predetermined process.
本発明の第2の側面によれば、推定の基準となる基準画像を構成する画素の位置を、基準画像を構成する画素に対応する撮像画像上の画素の位置に射影する射影パラメータに基づいて、射影パラメータにより射影される撮像画像上の位置に存在する各画素により構成される合成画像が生成され、合成画像と基準画像との相関を表す評価関数が生成され、評価関数に基づいて、射影パラメータが更新され、更新後の射影パラメータに基づいて、撮像部の位置又は姿勢の少なくとも一方が推定され、その推定結果に基づいて、所定の処理が実行される。 According to the second aspect of the present invention, based on a projection parameter that projects the position of a pixel constituting a reference image serving as a reference for estimation to the position of a pixel on a captured image corresponding to the pixel constituting the reference image. A composite image composed of each pixel existing at a position on the captured image projected by the projection parameter is generated, and an evaluation function representing a correlation between the composite image and the reference image is generated. Based on the evaluation function, the projection is performed. The parameter is updated, and at least one of the position and orientation of the imaging unit is estimated based on the updated projection parameter, and a predetermined process is executed based on the estimation result.
本発明によれば、簡易な構成で、より容易にカメラの位置や姿勢を推定することが可能となる。 According to the present invention, it is possible to estimate the position and orientation of a camera more easily with a simple configuration.
以下、発明を実施するための形態(以下、本実施の形態という)について説明する。なお、説明は以下の順序で行う。
本実施の形態(合成画像と基準画像との相互相関に基づいて射影行列を更新する場合の一例)
変形例
Hereinafter, modes for carrying out the invention (hereinafter referred to as the present embodiment) will be described. The description will be given in the following order.
Embodiment (an example of updating a projection matrix based on the cross-correlation between a composite image and a reference image)
Modified example
[本発明の概要]
図1は、本発明の概要を示している。
[Outline of the present invention]
FIG. 1 shows an overview of the present invention.
図1Aには、3次元位置(x,y,z)が既知である3次元物体が示されている。なお、図1Aにおいて、3次元物体は、X軸、Y軸、及びZ軸により定義されるXYZ座標軸上に配置されている。 FIG. 1A shows a three-dimensional object whose three-dimensional position (x, y, z) is known. In FIG. 1A, the three-dimensional object is arranged on the XYZ coordinate axes defined by the X axis, the Y axis, and the Z axis.
図1B上側には、カメラ21により、3次元物体を撮像した場合に得られる基準画像41を示している。なお、カメラ21の3次元位置(x,y,z)及び姿勢は既知であるものとする。
On the upper side of FIG. 1B, a
ここで、カメラ21の姿勢は、例えば、カメラ21の回転角度(θr,θp,θy)により表される。なお、回転角度(θr,θp,θy)とは、カメラ21の中心を原点とし、その原点において互いに直交するロール軸、ピッチ軸、及びヨー軸を定義した場合、カメラ21の撮像方向に対して、ロール軸との成す角度を表すロール角θr、ピッチ軸との成す角度を表すピッチ角θp、及びヨー軸との成す角度を表すヨー角θyを表す。このことは、カメラ22についても同様である。
Here, the posture of the
また、図1B下側には、カメラ22により、3次元物体を撮像した場合に得られる撮像画像42を示している。なお、カメラ22の3次元位置(x,y,z)及び姿勢は未知であるものとする。
1B shows a captured
本発明では、カメラ21の撮像により得られる基準画像41、及びカメラ22の撮像により得られる撮像画像42に基づいて、カメラ22の3次元位置(x,y,z)及び姿勢を推定する。
In the present invention, the three-dimensional position (x, y, z) and posture of the
すなわち、例えば、本発明では、カメラ21の撮像により得られる基準画像41、及びカメラ22の撮像により得られる撮像画像42に基づいて、撮像画像42に生じている、基準画像41との位置ずれを補正するための補正パラメータとして、例えば、射影行列P0を算出する。
That is, for example, in the present invention, based on the
そして、本発明では、算出した射影行列P0に基づき生成される評価関数に対して、Levenberg-Marquardt法等の最急降下法を適用して射影行列P1を算出する。さらに、本発明では、算出した射影行列P1に基づき生成される評価関数に対して、最急降下法を適用して射影行列P2を算出する。 In the present invention, the projection matrix P 1 is calculated by applying the steepest descent method such as the Levenberg-Marquardt method to the evaluation function generated based on the calculated projection matrix P 0 . Furthermore, in the present invention, the projection matrix P 2 is calculated by applying the steepest descent method to the evaluation function generated based on the calculated projection matrix P 1 .
このようにして、本発明では、射影行列Piに基づいて新たな射影行列Pi+1を算出するようにして、射影行列Piを新たな射影行列Pi+1に更新する。そして、最終的に得られる射影行列Piに基づいて、カメラ22の3次元位置(x,y,z)及び姿勢を推定する。なお、射影行列Piは、i+1番目(iは自然数を示す)に算出された射影行列を表す。
In this way, in the present invention, so as to calculate a new projection matrix P i + 1 based on the projection matrix P i, and updates the projection matrix P i to the new projection matrix P i + 1. Then, the three-dimensional position (x, y, z) and posture of the
次に、図2は、最急降下法を用いて、射影行列Piを更新する様子の一例を示している。 Next, FIG. 2 shows an example of how the projection matrix P i is updated using the steepest descent method.
本発明では、図2に示されるように、カメラ22の撮像により得られる撮像画像42内の部分領域42a(基準画像41上に存在する3次元物体(被写体)と同一の3次元物体が存在する領域)に生じている位置ずれを、基準画像41の位置に補正するための射影行列P0を算出する。そして、本発明では、算出した射影行列P0に基づいて、撮像画像42内の部分領域42aに生じている位置ずれを、基準画像41の位置に補正して合成画像61を生成する。
In the present invention, as shown in FIG. 2, there is a three-dimensional object identical to the
さらに、本発明では、射影行列P0に基づいて生成された合成画像61と、基準画像41との相関の程度を表す評価関数を算出する。
Further, in the present invention, an evaluation function representing the degree of correlation between the
そして、本発明は、算出した評価関数に対して、最急降下法を適用して、評価関数が最小となるときの射影行列P1を算出する。これにより、射影行列P0は、撮像画像42に生じている位置ずれを、基準画像41の位置に補正する精度がより高い射影行列P1に更新される。
Then, the present invention applies the steepest descent method to the calculated evaluation function to calculate the projection matrix P 1 when the evaluation function is minimized. As a result, the projection matrix P 0 is updated to the projection matrix P 1 with higher accuracy for correcting the positional deviation occurring in the captured
また、本発明は、射影行列P1に基づいて、新たに合成画像61を生成し、生成した合成画像61と基準画像41との相関の程度を表す評価関数を算出する。そして、算出した評価関数に対して、最急降下法を適用して、評価関数が最小となるときの射影行列P2を算出して、射影行列P1を新たな射影行列P2に更新する。それ以降、同様にして、射影行列Piを、最急降下法を用いて更新する。
Further, the present invention newly generates a
本発明では、例えば、更新により得られる射影行列Piが収束した場合、すなわち、射影行列Pi-1と殆ど変わらない射影行列Piが更新により得られた場合、射影行列Piに基づいて、カメラ22の3次元位置(x,y,z)及び姿勢を推定する。
In the present invention, for example, if the projection matrix P i obtained by the update converges, that is, if the projection matrix P i-1 and almost the same projection matrix P i is obtained by the update, based on the projection matrix P i The three-dimensional position (x, y, z) and posture of the
なお、射影行列Piは、上述のように、撮像画像42内の部分領域42aに生じている、基準画像41との位置ずれを補正するためのものである。したがって、射影行列Piは、撮像画像42内の部分領域42aと基準画像41との間に生じている位置ずれを表している。
Note that the projection matrix P i is used to correct a positional deviation from the
また、撮像画像42内の部分領域42aと基準画像41との間に生じる位置ずれは、カメラ22の3次元位置(x,y,z)、及びカメラ22の姿勢を表す回転角度(θr,θp,θy)に応じて変化する。
In addition, the positional shift that occurs between the
すなわち、射影行列Piは、カメラ22の3次元位置(x,y,z)及び回転角度(θr,θp,θy)に応じて変化するものであり、カメラ21とカメラ22との3次元位置(x,y,z)及び回転角度(θr,θp,θy)の違いを表すものである。
That is, the projection matrix P i changes in accordance with the three-dimensional position (x, y, z) and rotation angle (θ r , θ p , θ y ) of the
このため、本発明では、カメラ22の3次元位置(x,y,z)及び回転角度(θr,θp,θy)に応じて変化する射影行列Piに基づいて、カメラ22の3次元位置(x,y,z)、及び回転角度(θr,θp,θy)により表される姿勢を推定できる。
For this reason, in the present invention, 3 of the
[画像処理装置81の構成例]
図3は、本実施の形態である画像処理装置81の構成例を示している。
[Configuration Example of Image Processing Device 81]
FIG. 3 shows a configuration example of the
この画像処理装置81は、3次元情報保持部101、基準画像保持部102、合成画像生成部103、評価部104、最適化演算部105、及びパラメータ更新部106により構成される。
The
3次元情報保持部101は、基準画像41上に存在する3次元物体の3次元位置(x,y,z)Tを、予め保持している。なお、説明の便宜のため、3次元位置(x,y,z)を行列により表すようにしている。すなわち、Tは転置を表しており、したがって、3次元位置(x,y,z)Tは、3行1列の行列を表す。
The three-dimensional
具体的には、例えば、3次元情報保持部101は、基準画像41を構成する画素毎に、その画素に表示される3次元物体の3次元位置(x,y,z)Tが対応付けられて保持されている。
Specifically, for example, the three-dimensional
なお、基準画像41を構成する画素の2次元位置(x,y)は、基準画像41を構成する各画素のうち、最も左下に存在する画素の位置を原点(0,0)とし、撮像画像42の水平方向にX軸を、垂直方向にY軸を定義したXY座標により表される。
Note that the two-dimensional position (x, y) of the pixels constituting the
すなわち、本実施の形態では、基準画像41を構成する画素の2次元位置(x,y)を表すXY座標と、3次元物体の3次元位置(x,y,z)のうちの(x,y)を表すXY座標とは一致しているものとする。
That is, in the present embodiment, (x, y, z) out of the XY coordinates representing the two-dimensional position (x, y) of the pixels constituting the
3次元情報保持部101は、基準画像41を構成する各画素の2次元位置(xj,yj)を特徴点mjとして、特徴点mj毎に、特徴点mjの特徴を表す特徴量を予め保持している。なお、特徴点mj毎の特徴量は、基準画像41に基づいて予め生成される。
Three-dimensional
なお、本実施の形態では、説明を簡単にするため、基準画像41を構成する各画素の2次元位置(xj,yj)を特徴点mjとすることとしているが、特徴点mjとして採用される位置はこれに限定されない。
In this embodiment, for the sake of simplicity, the two-dimensional position (x j , y j ) of each pixel constituting the
すなわち、例えば、特徴点mjは、基準画像41を構成する各画素において、横方向及び縦方向にそれぞれ所定の画素(例えば、5画素や25画素)だけ離れて存在する画素それぞれが存在する2次元位置(xj,yj)のみを特徴点mjとして採用するようにしてもよい。
In other words, for example, the feature point m j includes pixels that are separated by predetermined pixels (for example, 5 pixels or 25 pixels) in the horizontal direction and the vertical direction in each pixel constituting the
基準画像保持部102は、カメラ21により、3次元物体を撮像して得られた基準画像41が予め保持されている。
The reference
合成画像生成部103には、カメラ22から撮像画像42が供給される。合成画像生成部103は、射影行列Piに基づいて、カメラ22からの撮像画像42における、基準画像41との位置ずれを補正することにより、撮像画像42から合成画像61を生成する。
A captured
すなわち、例えば、合成画像生成部103は、3次元情報保持部101から、3次元情報保持部101に保持されている基準画像41上の特徴点mj、及び特徴点mj毎の特徴量を読み出す。
That is, for example, the composite
そして、合成画像生成部103は、読み出した特徴点mj毎の特徴量に基づいて、カメラ22からの撮像画像42から、特徴点mjに対応する撮像画像42上の特徴点nj(撮像画像42を構成する画素の位置(uj,vj))を抽出する。
Then, based on the feature amount for each feature point m j that has been read, the composite
なお、撮像画像42を構成する画素の位置(u,v)は、撮像画像42を構成する各画素のうち、最も左下に存在する画素の位置を原点(0,0)とし、撮像画像42の水平方向にU軸を、垂直方向にV軸を定義したUV座標により表される。
Note that the position (u, v) of the pixel constituting the captured
合成画像生成部103は、読み出した基準画像41上の特徴点mjと、対応する撮像画像42上の特徴点njとにおいて、特徴点mjに対応する3次元位置(xj,yj,zj)Tと特徴点njとしての2次元位置(uj,vj)Tを用いて、最小自乗法等により、3次元位置(xj,yj,zj)Tを2次元位置(uj,vj)Tに変換(射影)するための射影行列P0を算出する。
The composite
合成画像生成部103は、算出した射影行列P0に基づいて、読み出した特徴点njに対応する3次元位置(xj,yj,zj)Tを、撮像画像42上の2次元位置(uj,vj)Tに変換する。
Based on the calculated projection matrix P 0 , the composite
合成画像生成部103は、カメラ22からの撮像画像42を構成する各画素のうち、変換により得られた2次元位置(uj,vj)Tに存在する画素を抽出し、抽出した画素により構成される合成画像61を生成する。そして、合成画像生成部103は、生成した合成画像61及び射影行列P0を、評価部104に供給する。
The composite
また、合成画像生成部103は、3次元情報保持部101に予め保持されている、基準画像41を構成する各画素に対応付けられている3次元位置(x,y,z)Tを読み出す。さらに、合成画像生成部103は、パラメータ更新部106からの射影行列Pi(≠P0)に基づいて、読み出した3次元位置(x,y,z)Tを、撮像画像42上の2次元位置(u,v)Tに変換する。
In addition, the composite
合成画像生成部103は、カメラ22からの撮像画像42を構成する各画素のうち、変換により得られた2次元位置(uj,vj)Tに存在する画素を抽出し、抽出した画素により構成される合成画像61を生成する。そして、合成画像生成部103は、生成した合成画像61、及びパラメータ更新部106からの射影行列Piを、評価部104に供給する。
The composite
評価部104は、基準画像保持部102に保持されている基準画像41を、基準画像保持部102から読み出す。
The
評価部104は、読み出した基準画像41、並びに合成画像生成部103からの合成画像61及び射影行列Piに基づいて、次式(1)に示されるように、基準画像41と合成画像61との相関を表す評価関数f(xn)を算出する。
ここで、式(1)において、画素値ai及びajは、基準画像41を構成する各画素の画素値を表し、画素値bi及びbkは、合成画像61を構成する各画素の画素値を表す。また、i,j,kは、それぞれ、1から基準画像41(又は合成画像61)を構成する各画素の総数までの値をとる。なお、基準画像41と合成画像61は、同一の画素数により構成されている。
Here, in Expression (1), the pixel values a i and a j represent the pixel values of each pixel constituting the
また、式(1)において、候補行列xnは、新たな射影行列Pi+1の候補を表しており、xn=Pi+dnである。なお、dnは射影行列Piと同一の行と列により表される行列であり、それぞれ異なる行列を表す。 Further, in Equation (1), the candidate matrix x n represents a candidate for a new projection matrix P i + 1 , and x n = P i + d n . D n is a matrix represented by the same row and column as the projection matrix Pi, and represents a different matrix.
ところで、基準画像41を構成する各画素の画素値ai及びakは定数であり、合成画像61を構成する各画素の画素値bi及びbkは、候補行列xnに応じて変化する変数である。したがって、評価関数f(xn)は、画素値bi及びbkを変数として有する関数となる。
Incidentally, the pixel values a i and a k of the pixels constituting the
評価部104は、算出した評価関数f(xn)を最適化演算部105に供給する。
The
最適化演算部105は、評価部104からの評価関数f(xn)に対して、最急降下法を適用して、評価関数f(xn)が最小となるときの候補行列xn(=Pi+dn)を、新たな射影行列Pi+1として算出し、パラメータ更新部106に供給する。
Optimizing
パラメータ更新部106は、最適化演算部105からの射影行列Pi+1を、合成画像生成部103に供給する。この場合、合成画像生成部103は、パラメータ更新部106からの射影行列Pi+1に基づいて、合成画像61を生成する。
The
また、パラメータ更新部106は、例えば、最適化演算部105からの射影行列Pi+1が収束したと判定した場合、最適化演算部105からの射影行列Pi+1に基づいて、カメラ22の3次元位置(x,y,z)及び姿勢を表す回転角度(θr,θp,θy)を推定し、後段に出力する。
For example, when the
ところで、最適化演算部105において行われる最急降下法によれば、評価関数f(xn)が2次多項式により表されている場合、2次多項式により表されていない場合と比較して、容易に解を算出することができる。
By the way, according to the steepest descent method performed in the
したがって、評価関数f(xn)は2次多項式により表されていることが望ましい。そこで、式(1)に示された評価関数f(xn)を2次多項式により表すことを考える。 Therefore, it is desirable that the evaluation function f (x n ) is represented by a quadratic polynomial. Therefore, consider expressing the evaluation function f (x n ) shown in the equation (1) by a quadratic polynomial.
まず、式(1)の右辺を2乗して逆数をとり、次式(2)に示されるような評価関数に変更する。 First, the right side of Expression (1) is squared to obtain an inverse, and the evaluation function is changed to that shown in Expression (2) below.
式(2)において、Σaj 2は定数であり、候補行列xnによって変化する値ではないため、候補行列xnに応じて変化する評価関数f(xn)から、Σaj 2を除外し、式(3)を導出する。 In the formula (2), Σa j 2 are constants, not a value that changes by the candidate matrix x n, the evaluation function f which varies depending on the candidate matrix x n (x n), excludes? A j 2 Equation (3) is derived.
式(3)において、変数kについてのΣ(サメーション)を外部に移動させて、式(4)に変換する。 In equation (3), Σ (summation) for variable k is moved to the outside and converted to equation (4).
ここで、式(4)に示される評価関数f(xn)は、変数bi及びbkについての2次多項式となっている。 Here, the evaluation function f (x n ) shown in Expression (4) is a quadratic polynomial for the variables b i and b k .
したがって、式(4)に示される評価関数f(xn)に対して、最急降下法を適用する場合には、評価関数f(xn)が2次多項式により表されていない場合と比較して、最急降下法の解としての射影行列Pi+1を容易に算出できるので、より迅速に射影行列Pi+1を算出することが可能となる。 Therefore, when the steepest descent method is applied to the evaluation function f (x n ) shown in Equation (4), the evaluation function f (x n ) is compared with the case where the evaluation function f (x n ) is not represented by a quadratic polynomial. Thus, since the projection matrix P i + 1 as a solution of the steepest descent method can be easily calculated, the projection matrix P i + 1 can be calculated more quickly.
なお、式(4)において、f(Bk)は(bk/Σaibi)を表している。 In equation (4), f (B k ) represents (b k / Σa i b i ).
以下、評価部104は、式(1)に示される評価関数f(xn)ではなく、式(4)に示された評価関数f(xn)を算出して、最適化演算部105に供給し、最適化演算部105は、評価部104からの、式(4)に示された評価関数f(xn)に基づいて、最急降下法により、新たな射影行列Pi+1を算出して、合成画像生成部103に供給するものとして説明する。
Hereinafter, the
[画像処理装置81の動作説明]
次に、図4のフローチャートを参照して、画像処理装置81が行うパラメータ更新処理について説明する。
[Description of Operation of Image Processing Device 81]
Next, parameter update processing performed by the
このパラメータ更新処理は、例えば、カメラ22から画像処理装置81の合成画像生成部103に撮像画像42が供給されたときに開始される。
This parameter update process is started when, for example, the captured
ステップS1において、合成画像生成部103は、3次元画像保持部101に記憶されている基準画像41上の特徴点mj、及びカメラ22からの撮像画像42上の特徴点njに基づいて、射影行列Pi(=P0)を算出する初期行列算出処理を行う。なお、初期行列算出処理については、図5及び図6を参照して後述する。
In step S < b > 1, the composite
ステップS2において、合成画像生成部103は、3次元情報保持部101に予め保持されている、基準画像41を構成する各画素に対応付けられている3次元位置(x,y,z)T、及びステップS1の処理で算出された射影行列Piに基づいて、撮像画像42から合成画像61を生成する合成画像生成処理を行なう。なお、合成画像生成処理の詳細は、図7を参照して後述する。
In step S <b> 2, the composite
合成画像生成部103は、合成画像生成処理で生成した合成画像61を、評価部104に供給する。
The composite
ステップS3において、評価部104は、基準画像保持部102に予め保持されている基準画像41を、基準画像保持部102から読み出す。そして、評価部104は、読み出した基準画像41、並びに合成画像生成部103からの合成画像61及び射影行列Piに基づいて、式(4)に示されたような評価関数f(xn)を算出し、最適化演算部105に供給する。
In step S <b> 3, the
ステップS4において、最適化演算部105は、評価部105からの評価関数f(xn)に基づいて、最急降下法を適用し、評価関数f(xn)が最小となるときの候補行列xnを新たな射影行列Pi+1として算出し、パラメータ更新部106に供給する。
In step S4, the
ステップS5において、パラメータ更新部106は、最適化演算部105からの射影行列Pi+1を、合成画像生成部103に供給して、処理をステップS2に戻す。
In step S5, the
そして、ステップS2では、合成画像生成部103は、3次元情報保持部101に予め保持されている、基準画像41を構成する各画素に対応付けられている3次元位置(x,y,z)T、及び直前のステップS5の処理で更新された新たな射影行列Pi+1に基づいて、撮像画像42から合成画像61を生成する合成画像生成処理を行ない、それ以降、同様の処理が行なわれる。
In step S <b> 2, the composite
なお、ステップS5において、パラメータ更新部106は、例えば、最適化演算部105からの射影行列Pi+1が収束したと判定した場合、最適化演算部105からの射影行列Pi+1に基づいて、カメラ22の3次元位置(x,y,z)及び姿勢を推定し、後段に出力して、パラメータ更新処理は終了される。
In step S5, for example, when the
[初期行列算出処理の詳細]
次に、図5のフローチャートを参照して、パラメータ更新処理のステップS1において、合成画像生成部103が行なう初期行列算出処理としての第1の初期行列算出処理について説明する。
[Details of initial matrix calculation process]
Next, the first initial matrix calculation process as the initial matrix calculation process performed by the composite
ステップS21において、合成画像生成部103は、3次元情報保持部101から、基準画像41上の特徴点mj及び特徴点mjの特徴量を読み出す。なお、変数jは、1からJまでの自然数を表す。
In step S21, the composite
ステップS22において、合成画像生成部103は、読み出した特徴点mj(=(xj,yj)T)の特徴量と同様の特徴量を有する特徴点として、カメラ22から供給される撮像画像42上の特徴点nj(=(uj,vj)T)を抽出する。
In step S < b> 22, the composite
これにより、合成画像生成部103は、基準画像41上の特徴点mjと、特徴点mjに対応する、撮像画像42上の特徴点njとのJ個の組合せ(mj,nj)を、組合せ対応点(mj,nj)として取得する。
Thus, the composite
ステップS23において、合成画像生成部103は、J個の組合せ対応点(mj,nj)から、それぞれ異なるQ(<J)個の組合せ対応点(mj,nj)を抽出し、抽出したQ個の組合せ対応点(mj,nj)により構成される集合Ukを生成する。
In step S23, the composite
すなわち、合成画像生成部103は、J個の組合せ対応点(mj,nj)の中から、JCQ通りの組合せにより、Q個の組合せ対応点(mj,nj)を抽出し、抽出したQ個の組合せ対応点(mj,nj)それぞれの集合を、JCQ個の集合Ukとして生成する。なお、kは1からJCQまでの自然数の値をとる。
That is, the composite
ステップS24において、合成画像生成部103は、生成した集合Uk毎に、集合Ukを構成するQ個の組合せ対応点(mj,nj)に基づいて得られる射影行列Pkを算出する。
In step S24, the composite
具体的には、例えば、合成画像生成部103は、集合Ukを構成するQ個の組合せ対応点(mj,nj)において、特徴点mjに対応する3次元位置(xj,yj,zj)Tと、特徴点njとしての2次元位置(uj,vj)Tとを用いて、最小自乗法等により、誤差Err1=Σj=1 J{(uj,vj)T-Pk(xj,yj,zj)T}が最小となるような射影行列Pkを算出する。
Specifically, for example, the composite
ステップS25において、合成画像生成部103は、算出した複数の射影行列Pkのうち、算出した誤差Err1=Σj=1 J{(uj,vj)T-Pk(xj,yj,zj)T}が最小となるときの射影行列Pkを、射影行列Pminとする。
In step S25, the composite
ステップS26において、合成画像生成部103は、J個の組合せ対応点(mj,nj)において、特徴点mjに対応する3次元位置(xj,yj,zj)Tと、特徴点njとしての2次元位置(uj,vj)Tとを用いて、誤差En=Σj=1 J(uj,vj)T-Pn(xj,yj,zj)T=Σj=1 J(uj,vj)T-(Pmin+dn)(xj,yj,zj)Tを算出する。
In step S < b> 26, the composite
そして、合成画像生成部103は、算出した値Enに基づいて、関数g(En)=αEn 2/(1+αEn 2)を算出する。なお、αは定数であり、例えば、0以上であって1以下の値とされる。
Then, the composite
ステップS27において、合成画像生成部103は、最急降下法により、関数g(En)を最小化するときのEnを算出し、算出したEnに対応するPn=(Pmin+dn)を、射影行列P0とする。そして、ステップS27の処理の終了後、処理を図4のステップS1にリターンさせ、処理をステップS2に進め、それ以降の処理が行なわれる。
In step S27, the composite
なお、合成画像生成部103は、上述した第1の初期行列算出処理により射影行列P0を算出するようにしたが、図6のフローチャートに示される第2の初期行列算出処理により、射影行列P0を算出するようにしてもよい。
Note that the composite
[第2の初期行列算出処理の詳細]
次に、図6のフローチャートを参照して、パラメータ更新処理のステップS1において、合成画像生成部103が行う初期行列算出処理として行なう第2の初期行列算出処理について説明する。
[Details of second initial matrix calculation process]
Next, the second initial matrix calculation process performed as the initial matrix calculation process performed by the composite
ステップS41乃至ステップS45において、図5のステップS21乃至ステップS25と同様の処理が行なわれる。 In steps S41 to S45, processing similar to that in steps S21 to S25 in FIG. 5 is performed.
ステップS46において、合成画像生成部103は、J個の組合せ対応点(mj,nj)毎に、特徴点mjに対応する3次元位置(xj,yj,zj)T、及び特徴点njとしての2次元位置(uj,vj)Tに基づいて、誤差Err2=(uj,vj)T-Pmin(xj,yj,zj)Tを算出する。そして、合成画像生成部103は、J個の組合せ対応点(mj,nj)のうち、対応する誤差Err2が予め決めた閾値未満となる組合せ対応点(mj,nj)を選択する。
In step S46, the composite
ステップS47において、合成画像生成部103は、選択した組合せ対応点(mj,nj)において、特徴点mjに対応する3次元位置(xj,yj,zj)Tと、特徴点njとしての2次元位置(uj,vj)Tとを用いて、最小自乗法等により、(uj,vj)T-P0(xj,yj,zj)Tが最小となるときの射影行列P0を算出し、処理を図4のステップS1にリターンさせ、処理をステップS2に進め、それ以降の処理が行なわれる。
In step S47, the composite
[合成画像生成処理の詳細]
次に、図7のフローチャートを参照して、パラメータ更新処理のステップS2において、合成画像生成部103が行なう合成画像生成処理について説明する。
[Details of composite image generation processing]
Next, the composite image generation process performed by the composite
ステップS61において、合成画像生成部103は、3次元情報保持部101から、基準画像41を構成する各画素に対応付けられている3次元位置(x,y,z)Tを読み出す。
In step S <b> 61, the composite
そして、ステップS62において、合成画像生成部103は、ステップS1の処理で射影行列P0が生成され、ステップS2に進められた場合には、生成した射影行列P0に基づいて、読み出した基準画像41上の3次元位置(x,y,z)Tを、撮像画像42上の2次元位置(u,v)Tに変換する。
Then, in step S62, the composite
また、ステップS62において、合成画像生成部103は、パラメータ更新部106から新たな射影行列Pi+1が供給され、ステップS5からステップS2に進められた場合には、パラメータ更新部106からの新たな射影行列Pi+1に基づいて、3次元情報保持部101から読み出した3次元位置(x,y,z)Tを、撮像画像42上の2次元位置(u,v)Tに変換する。
In step S62, the composite
ステップS63において、合成画像生成部103は、カメラ22からの撮像画像42を構成する各画素のうち、ステップS62の処理で得られた撮像画像42上の2次元位置(u,v)Tに存在する画素を抽出する。
In step S63, the composite
そして、合成画像生成部103は、抽出した画素により構成される画像を、合成画像61として生成し、処理を図4のステップS2にリターンさせ、生成した合成画像61を、評価部104に供給して、それ以降の処理が行なわれる。
Then, the composite
以上説明したように、パラメータ更新処理によれば、ステップS3において、カメラ21とカメラ22との性能の違いや、撮像条件の違いに応じて、撮像画像42(合成画像61)と基準画像41との画素値に生じるレベル差による影響を受けにくい評価関数として、合成画像61と基準画像41との相関を表す評価関数P(xn)を算出するようにしている。
As described above, according to the parameter update process, in step S3, the captured image 42 (the synthesized image 61) and the
したがって、例えば、パラメータ更新処理では、合成画像61と基準画像41との、対応する各画素の画素値についての差分自乗和Σ(ai-bi)2を評価関数P(xn)として用いる場合のように、特定の模様(パターン)が表示された壁紙等を被写体として撮像したり、合成画像61と基準画像41とを正規化して2値化画像に変換する必要がなくなる。
Therefore, for example, in the parameter updating process, the difference square sum Σ (a i −b i ) 2 for the pixel values of the corresponding pixels of the
すなわち、パラメータ更新処理によれば、カメラ21及び22で撮像する被写体は、特定の模様が表示された壁紙等に限定されず、どのような物体を被写体として撮像するようにしてもよいし、合成画像61及び基準画像41は、2値化画像とされる必要がなく、グレースケールの他、RGB(Red,Green,Blue)値により表される画像として用いることが可能となる。
That is, according to the parameter update process, the subject to be imaged by the
また、パラメータ更新処理では、式(4)に示されるように、2次多項式により表される評価関数P(xn)を用いるようにしたので、評価関数P(xn)が2次多項式ではない場合と比較して、より迅速に、最急降下法の解としての新たな射影行列Pi+1を算出することが可能となる。 In the parameter updating process, as shown in the equation (4), the evaluation function P (x n ) represented by the quadratic polynomial is used. Therefore, the evaluation function P (x n ) is not a quadratic polynomial. It is possible to calculate a new projection matrix P i + 1 as a solution of the steepest descent method more quickly than in the case where there is no such method.
さらに、例えば、パラメータ更新処理では、式(4)に示されたように、2次多項式により表される評価関数P(xn)を用いるようにしたので、式(4)の評価関数P(xn)において、評価関数P(xn)の計算速度を速めるために、評価関数P(xn)に用いられる画素値ai,aj,bi及びbkを少なくしたとしても、比較的、精度の高い射影行列Pi+1を算出することが可能となる。 Further, for example, in the parameter updating process, the evaluation function P (x n ) represented by the quadratic polynomial is used as shown in the equation (4), so that the evaluation function P ( x n ), even if the pixel values a i , a j , b i and b k used in the evaluation function P (x n ) are reduced in order to increase the calculation speed of the evaluation function P (x n ) Therefore, it is possible to calculate the projection matrix P i + 1 with high accuracy.
なお、評価関数P(xn)に用いられる画素値ai,aj,bi及びbkを少なくしたとしても、比較的、精度の高い射影行列Pi+1を算出できる点は、本出願人が行なった実験により確認されている。本出願人が行なった実験と、その実験により確認された事項については、後述する図16乃至図20を参照して説明する。 Note that even if the pixel values a i , a j , b i, and b k used in the evaluation function P (x n ) are reduced, a relatively accurate projection matrix P i + 1 can be calculated. This has been confirmed by experiments conducted by the applicant. The experiment conducted by the applicant and the items confirmed by the experiment will be described with reference to FIGS.
また、例えば、パラメータ更新処理において、撮像画像61にノイズが生じていたとしても、式(4)に示されたような評価関数(xn)を用いるときには、例えば、自乗和Σ(ai-bi)2を評価関数P(xn)として用いるときと比較して、より精度の高い射影行列Pi+1を算出することができる。
Further, for example, even when noise is generated in the captured
なお、撮像画像42にノイズが生じていたとしても、比較的、精度の高い射影行列Pi+1が算出可能な点については、後述する図16を参照して説明する。
Note that the fact that a relatively accurate projection matrix P i + 1 can be calculated even if noise occurs in the captured
[第1及び第2の初期行列算出処理により得られる射影行列P0による推定結果]
次に、図8は、121個の組合せ対応点(mj,nj)を、それぞれ異なる15パターンだけ用意し、用意した15パターンそれぞれに基づいて、第1及び第2の初期行列算出処理を行った場合に得られる射影行列P0から推定される推定結果を示している。
[Estimation result by projection matrix P 0 obtained by first and second initial matrix calculation processes]
Next, FIG. 8 shows that 121 combinations corresponding points (m j , n j ) are prepared for 15 different patterns, and the first and second initial matrix calculation processes are performed based on the prepared 15 patterns. It shows the estimation results estimated from projection matrix P 0 obtained when performing.
図8A及び図8Bにおいて、黒色で示される棒グラフは、それぞれ異なる15パターンの、121個の組合せ対応点(mj,nj)に基づいて、第1の初期行列算出処理を行った場合に得られる射影行列P0に基づく推定結果の誤差についての平均を示している。 8A and 8B, black bar graphs are obtained when the first initial matrix calculation process is performed based on 121 combination corresponding points (m j , n j ) of 15 different patterns. An average of errors in the estimation result based on the projection matrix P 0 obtained is shown.
また、図8A及び図8Bにおいて、白色で示される棒グラフは、それぞれ異なる15パターンの、121個の組合せ対応点(mj,nj)に基づいて、第2の初期行列算出処理を行った場合に得られる射影行列P0に基づく推定結果の誤差についての平均を示している。 8A and 8B, the bar graphs shown in white are obtained when the second initial matrix calculation process is performed based on 121 combination corresponding points (m j , n j ) in 15 different patterns. The average of the errors in the estimation results based on the projection matrix P 0 obtained is shown.
具体的には、図8A中央では、撮像画像42に対するノイズが0である場合(撮像画像42に対してノイズが生じていない場合)における3次元位置の平均誤差として、白色で示される棒グラフが誤差0.00011633を表しており、黒色で示される棒グラフが誤差0.000145667を表している。
Specifically, in the center of FIG. 8A, the bar graph shown in white is an error as the average error of the three-dimensional position when the noise for the captured
なお、3次元位置の平均誤差とは、それぞれ異なる15パターンについて得られる推定結果として推定されたカメラ22の3次元位置(x,y,z)と、実際の3次元位置(x',y',z')との誤差|x-x'|+|y-y'|+|z-z'|の平均を表している。
Note that the average error of the three-dimensional position refers to the three-dimensional position (x, y, z) of the
また、図8A右側では、撮像画像42に対するノイズが0である場合における回転角度の平均誤差として、白色で示される棒グラフが誤差0.000123333を表しており、黒色で示される棒グラフが誤差0.000142667を表している。
On the right side of FIG. 8A, as an average error of the rotation angle when the noise with respect to the captured
なお、回転角度の平均誤差とは、それぞれ異なる15パターンについて得られる推定結果として推定されたカメラ22の姿勢を表す回転角度(θr,θp,θy)と、実際の回転角度(θr',θp',θy')との誤差|θr-θr'|+|θp-θp'|+|θy-θy'|の平均を表している。
Note that the average error of the rotation angle is a rotation angle (θ r , θ p , θ y ) representing the posture of the
また、図8A左側では、撮像画像42に対するノイズが0である場合において、パラメータ更新処理により、射影行列P0に基づいて、新たに生成した射影行列P1から推定される3次元位置及び回転角度それぞれの平均誤差を加算した平均誤差加算値を表している。図8A左側において、射影行列P1に基づく平均誤差加算値として、白色及び黒色で示されるいずれの棒グラフについても、平均誤差加算値0を表している。
On the left side of FIG. 8A, when the noise with respect to the captured
さらに、図8B中央では、撮像画像42に対するノイズが3.0である場合(本来、得られるノイズのない撮像画像42の各画素の画素値に画素値3を加算した場合)における3次元位置の平均誤差として、白色で示される棒グラフが誤差1.58628を表しており、黒色で示される棒グラフが誤差1.067658667を表している。
Further, in the center of FIG. 8B, the average error of the three-dimensional position in the case where the noise with respect to the captured
また、図8B右側では、撮像画像42に対するノイズが3.0である場合における回転角度の平均誤差として、白色で示される棒グラフが誤差6.623128333を表しており、黒色で示される棒グラフが誤差1.421813333を表している。
On the right side of FIG. 8B, as an average error of the rotation angle when the noise with respect to the captured
なお、図8B左側では、撮像画像42に対するノイズが3.0である場合において、パラメータ更新処理により、射影行列P0に基づいて、新たに生成した射影行列P1から推定される3次元位置及び回転角度それぞれの平均誤差を加算した平均誤差加算値を表している。図8B左側において、射影行列P1に基づく平均誤差加算値として、白色で示される棒グラフが平均誤差加算値0.032973を表しており、黒色で示される棒グラフが平均誤差加算値0.333367333を表している。
On the left side of FIG. 8B, when the noise with respect to the captured
図8A中央及び右側、並びに図8B中央及び右側に示されるように、撮像画像42にノイズが生じていない(ノイズが0である)場合には、第1及び第2の初期行列算出処理により生成された射影行列P0について、推定結果の誤差に大きな差はない。 As shown in the center and right side of FIG. 8A and the center and right side of FIG. 8B, when no noise is generated in the captured image 42 (noise is 0), it is generated by the first and second initial matrix calculation processes. There is no significant difference in the error of the estimation results for the projected projection matrix P 0 .
しかしながら、図8A中央及び右側、並びに図8B中央及び右側に示されるように、撮像画像42にノイズが生じている(ノイズが3.0である)場合には、第1の初期行列算出処理により生成された射影行列P0についての推定結果の方が、第2の初期行列算出処理により生成された射影行列P0についての推定結果と比較して、推定結果の誤差は非常に小さくなる。 However, as shown in the center and right side of FIG. 8A and the center and right side of FIG. 8B, when noise occurs in the captured image 42 (noise is 3.0), it is generated by the first initial matrix calculation process. and towards the estimation results for the projection matrix P 0, compared with the estimation results for the projection matrix P 0 generated by the second initial matrix calculation process, the error of the estimation result becomes very small.
次に、図9乃至図13を参照して、第1の初期行列算出処理を用いて算出した射影行列P0に基づいて推定されるカメラ22の3次元位置(x,y,z)及び回転角度(θr,θp,θy)、並びに第2の初期行列算出処理を用いて算出した射影行列P0に基づいて推定される3次元位置(x,y,z)及び回転角度(θr,θp,θy)について説明する。
Next, referring to FIGS. 9 to 13, the three-dimensional position (x, y, z) and rotation of the
[撮像画像42上に生じるノイズに応じて変化する推定結果の様子]
図9は、撮像画像42を構成する各画素に生じるノイズに応じて、推定される3次元位置(x,y,z)及び回転角度(θr,θp,θy)が変化する様子の一例を示している。
[State of estimation result that changes according to noise generated on captured image 42]
FIG. 9 shows a state in which the estimated three-dimensional position (x, y, z) and the rotation angle (θ r , θ p , θ y ) change according to noise generated in each pixel constituting the captured
なお、図9A及び図9Bの横軸は、各画素に生じるノイズとして加算される画素値を表す。 9A and 9B represent pixel values added as noise generated in each pixel.
また、図9Aにおける縦軸は、推定された3次元位置(x,y,z)と、実際の3次元位置(x',y',z')との誤差|x-x'|+|y-y'|+|z-z'|を表している。このことは、図10A、図11A、図12A、及び図13Aにおける縦軸においても同様である。 The vertical axis in FIG. 9A represents the error | x−x ′ | + | between the estimated three-dimensional position (x, y, z) and the actual three-dimensional position (x ′, y ′, z ′). y-y '| + | z-z' | This also applies to the vertical axis in FIGS. 10A, 11A, 12A, and 13A.
さらに、図9Bにおける縦軸は、推定された回転角度(θr,θp,θy)と、実際の回転角度(θr',θp',θy')との誤差|θr-θr'|+|θp-θp'|+|θy-θy'|を表している。このことは、図10B、図11B、図12B、及び図13Bにおける縦軸においても同様である。 Furthermore, the vertical axis in FIG. 9B represents the error | θ r − between the estimated rotation angle (θ r , θ p , θ y ) and the actual rotation angle (θ r ′, θ p ′, θ y ′). θ r '| + | θ p -θ p ' | + | θ y -θ y '| This also applies to the vertical axis in FIGS. 10B, 11B, 12B, and 13B.
また、図9において、グラフ121乃至123は、第2の初期行列算出処理を用いて算出した射影行列P0に基づいて推定された推定結果についてのグラフを表している。
In FIG. 9,
さらに、図9において、グラフ141乃至143は、第1の初期行列算出処理を用いて算出した射影行列P0に基づいて推定された推定結果についてのグラフを表している。
Further, in FIG. 9,
なお、グラフ121及び141の組合せ,グラフ122及び142の組合せ,並びにグラフ123及び143の組合せにおいて、それぞれ異なる組合せ毎に、基準画像41上の特徴点mjとして異なる特徴点mjを採用した場合に得られるグラフの組合せを示している。
Note that, in the combination of the
グラフ121乃至123、及びグラフ141乃至143については、後述する図10乃至図13についても同様である。
The same applies to the
[カメラ22のピッチ角θpに応じて変化する推定結果の様子]
図10は、カメラ22のピッチ角θpの変化に応じて、推定される3次元位置(x,y,z)及び回転角度(θr,θp,θy)が変化する様子の一例を示している。なお、図10A及び図10Bの横軸は、カメラ22のピッチ角θpを表しており、カメラ22のロール角θr及びヨー角θyは、カメラ21と同様に設定されている。
[State of estimation result that changes according to pitch angle θ p of camera 22]
FIG. 10 shows an example of how the estimated three-dimensional position (x, y, z) and rotation angle (θ r , θ p , θ y ) change according to the change in the pitch angle θ p of the
[カメラ22のヨー角θyに応じて変化する推定結果の様子]
図11は、カメラ22のヨー角θyの変化に応じて、推定される3次元位置(x,y,z)及び回転角度(θr,θp,θy)が変化する様子の一例を示している。なお、図11A及び図11Bの横軸は、カメラ22のヨー角θyを表しており、カメラ22のロール角θr及びピッチ角θpは、カメラ21と同様に設定されている。
[State estimation result changes according to the yaw angle theta y Camera 22]
FIG. 11 shows an example of how the estimated three-dimensional position (x, y, z) and rotation angle (θ r , θ p , θ y ) change according to the change in the yaw angle θ y of the
[カメラ22のロール角θrに応じて変化する推定結果の様子]
図12は、カメラ22のロール角θrの変化に応じて、推定される3次元位置(x,y,z)及び回転角度(θr,θp,θy)が変化する様子の一例を示している。なお、図12A及び図12Bの横軸は、カメラ22のロール角θrを表しており、カメラ22のピッチ角θp及びヨー角θyは、カメラ21と同様に設定されている。
[State of estimation result that changes according to roll angle θ r of camera 22]
FIG. 12 shows an example of how the estimated three-dimensional position (x, y, z) and rotation angle (θ r , θ p , θ y ) change according to the change in the roll angle θ r of the
[撮像画像42内の部分領域42aの面積に応じて変化する推定結果の様子]
図13は、撮像画像42内の部分領域42aの面積に応じて、推定される3次元位置(x,y,z)及び回転角度(θr,θp,θy)が変化する様子の一例を示している。なお、図13A及び図13Bの横軸は、撮像画像42上の全領域の面積を100とした場合における、部分領域42aの面積の割合を表す。
[State of the estimation result that changes according to the area of the
FIG. 13 shows an example of how the estimated three-dimensional position (x, y, z) and rotation angle (θ r , θ p , θ y ) change according to the area of the
第1の初期行列算出処理を用いて算出した射影行列P0から推定される3次元位置(x',y',z')及び回転角度(θr',θp',θy')の方が、図9乃至図13に示されるいずれの場合も、第2の初期行列算出処理を用いて算出した射影行列P0から推定された3次元位置(x',y',z')及び回転角度(θr',θp',θy')と比較して、より正確に推定されていることがわかる。 The three-dimensional position (x ′, y ′, z ′) and rotation angle (θ r ′, θ p ′, θ y ′) estimated from the projection matrix P 0 calculated using the first initial matrix calculation process In any of the cases shown in FIGS. 9 to 13, the three-dimensional position (x ′, y ′, z ′) estimated from the projection matrix P 0 calculated using the second initial matrix calculation process and It can be seen that the estimation is more accurate than the rotation angles (θ r ′, θ p ′, θ y ′).
次に、図14及び図15を参照して、領域マッチング処理により、基準画像41と合成画像61との組合せ対応点(mj,nj)を抽出し、抽出した組合せ対応点(mj,nj)に基づいて、射影行列P1を生成する場合について説明する。
Next, referring to FIG. 14 and FIG. 15, a combination corresponding point (m j , n j ) between the
なお、図14及び図15を参照して説明する領域マッチング処理は、後述する図16乃至20において、本発明との対比のために用いられる。 The region matching processing described with reference to FIGS. 14 and 15 is used for comparison with the present invention in FIGS. 16 to 20 described later.
図14は、領域マッチング処理により組合せ対応点(mj,nj)を抽出する様子を示している。 FIG. 14 shows how the combination corresponding points (m j , n j ) are extracted by the region matching process.
なお、合成画像61は、本発明におけるパラメータ更新処理の場合と同様にして、射影行列P0が算出され、算出された射影行列P0に基づいて生成されたものとして説明する。
Incidentally, the
領域マッチング処理では、基準画像41上の特徴点mjを順次、注目特徴点とし、注目特徴点に存在する画素を含む、注目特徴点の周囲に存在する複数の画素により構成される矩形領域41aを設定する。また、領域マッチング処理では、合成画像61上の全領域のうち、矩形領域41aと最も類似する領域を検出し、検出した領域の中心に存在する画素が存在する位置を、特徴点mjに対応する合成画像61上の特徴点njとして抽出する。
In the area matching process, the feature point m j on the
そして、領域マッチング処理は、基準画像41上の特徴点mjと、対応する合成画像61上の特徴点njとの組合せを表す組合せ対応点(mj,nj)に基づいて、最小自乗法等により射影行列P1を算出する。
Then, the region matching processing is performed based on the combination corresponding point (m j , n j ) representing the combination of the feature point m j on the
これにより、領域マッチング処理では、図15に示されるように、基準画像41上の特徴点mjに対応する3次元位置(x,y,z)を、対応する撮像画像42上の2次元位置(u,v)に変換するための射影行列P1が算出される。
Thereby, in the area matching process, as shown in FIG. 15, the three-dimensional position (x, y, z) corresponding to the feature point m j on the
次に、図16乃至図20を参照して、領域マッチング処理により算出した射影行列P1に基づいて推定されるカメラ22の3次元位置(x,y,z)及び回転角度(θr,θp,θy)、並びにパラメータ更新処理により算出した射影行列P1に基づいて推定される3次元位置(x,y,z)及び回転角度(θr,θp,θy)について説明する。
Next, referring to FIG. 16 to FIG. 20, the three-dimensional position (x, y, z) and rotation angle (θ r , θ) of the
[撮像画像42上に生じるノイズに応じて変化する推定結果の様子]
図16は、撮像画像42を構成する各画素に生じるノイズに応じて、推定される3次元位置(x,y,z)及び回転角度(θr,θp,θy)が変化する様子の一例を示している。
[State of estimation result that changes according to noise generated on captured image 42]
FIG. 16 shows a state in which the estimated three-dimensional position (x, y, z) and rotation angle (θ r , θ p , θ y ) change according to noise generated in each pixel constituting the captured
なお、図16A及び図16Bの横軸は、各画素に生じるノイズとして加算される画素値を表す。 16A and 16B represent pixel values added as noise generated in each pixel.
また、図16Aにおける縦軸は、推定された3次元位置(x,y,z)と、実際の3次元位置(x',y',z')との誤差|x-x'|+|y-y'|+|z-z'|を表している。このことは、図17A、図18A、図19A、及び図20Aにおける縦軸においても同様である。 Also, the vertical axis in FIG. 16A represents the error | x−x ′ | + | between the estimated three-dimensional position (x, y, z) and the actual three-dimensional position (x ′, y ′, z ′). y-y '| + | z-z' | This also applies to the vertical axis in FIGS. 17A, 18A, 19A, and 20A.
さらに、図16Bにおける縦軸は、推定された回転角度(θr,θp,θy)と、実際の回転角度(θr',θp',θy')との誤差|θr-θr'|+|θp-θp'|+|θy-θy'|を表している。このことは、図17B、図18B、図19B、及び図20Bにおける縦軸においても同様である。 Further, the vertical axis in FIG. 16B represents the error | θ r − between the estimated rotation angle (θ r , θ p , θ y ) and the actual rotation angle (θ r ′, θ p ′, θ y ′). θ r '| + | θ p -θ p ' | + | θ y -θ y '| This also applies to the vertical axis in FIGS. 17B, 18B, 19B, and 20B.
また、図16において、グラフ161乃至163は、パラメータ更新処理により算出した射影行列P1に基づいて推定された推定結果についてのグラフを表している。
In FIG. 16,
さらに、図16において、グラフ181乃至183は、領域マッチング処理により算出した射影行列P1に基づいて推定された推定結果についてのグラフを表している。
Further, in FIG. 16,
なお、グラフ161及び181は、基準画像41を構成する各画素のうち、縦方向及び横方向に1画素だけ離れて存在する画素それぞれの2次元位置(x,y)を、基準画像41の特徴点mjとした場合についてのグラフを示している。
Note that the
また、グラフ162及び182は、基準画像41を構成する各画素のうち、縦方向及び横方向に5画素だけ離れて存在する画素それぞれの2次元位置(x,y)を、基準画像41の特徴点mjとした場合についてのグラフを示している。
The
さらに、グラフ163及び183は、基準画像41を構成する各画素のうち、縦方向及び横方向に25画素だけ離れて存在する画素それぞれの2次元位置(x,y)を、基準画像41の特徴点mjとした場合についてのグラフを示している。
Furthermore, the
グラフ161乃至163、及びグラフ181乃至183については、後述する図17乃至図20についても同様である。
The same applies to the
[カメラ22のピッチ角θpに応じて変化する推定結果の様子]
図17は、カメラ22のピッチ角θpの変化に応じて、推定される3次元位置(x,y,z)及び回転角度(θr,θp,θy)が変化する様子の一例を示している。なお、図17A及び図17Bの横軸は、カメラ22のピッチ角θpを表しており、カメラ22のロール角θr及びヨー角θyは、カメラ21と同様に設定されている。
[State of estimation result that changes according to pitch angle θ p of camera 22]
FIG. 17 shows an example of how the estimated three-dimensional position (x, y, z) and rotation angle (θ r , θ p , θ y ) change according to the change in the pitch angle θ p of the
[カメラ22のヨー角θyに応じて変化する推定結果の様子]
図18は、カメラ22のヨー角θyの変化に応じて、推定される3次元位置(x,y,z)及び回転角度(θr,θp,θy)が変化する様子の一例を示している。なお、図18A及び図18Bの横軸は、カメラ22のヨー角θyを表しており、カメラ22のロール角θr及びピッチ角θpは、カメラ21と同様に設定されている。
[State estimation result changes according to the yaw angle theta y Camera 22]
FIG. 18 shows an example of how the estimated three-dimensional position (x, y, z) and rotation angle (θ r , θ p , θ y ) change according to the change in the yaw angle θ y of the
[カメラ22のロール角θrに応じて変化する推定結果の様子]
図19は、カメラ22のロール角θrの変化に応じて、推定される3次元位置(x,y,z)及び回転角度(θr,θp,θy)が変化する様子の一例を示している。なお、図19A及び図19Bの横軸は、カメラ22のロール角θrを表しており、カメラ22のピッチ角θp及びヨー角θyは、カメラ21と同様に設定されている。
[State of estimation result that changes according to roll angle θ r of camera 22]
FIG. 19 shows an example of how the estimated three-dimensional position (x, y, z) and rotation angle (θ r , θ p , θ y ) change according to the change in the roll angle θ r of the
[撮像画像42内の部分領域42aの面積に応じて変化する推定結果の様子]
図20は、撮像画像42内の部分領域42aの面積に応じて、推定される3次元位置(x,y,z)及び回転角度(θr,θp,θy)が変化する様子の一例を示している。なお、図20A及び図20Bの横軸は、撮像画像42上の全領域の面積を100とした場合における、部分領域42aの面積の割合を表す。
[State of the estimation result that changes according to the area of the
FIG. 20 shows an example of how the estimated three-dimensional position (x, y, z) and rotation angle (θ r , θ p , θ y ) change according to the area of the
パラメータ更新処理により算出した射影行列P1から推定される3次元位置(x',y',z')及び回転角度(θr',θp',θy')の方が、図16乃至図20に示されるいずれの場合も、領域マッチング処理により算出した射影行列P1から推定された3次元位置(x',y',z')及び回転角度(θr',θp',θy')と比較して、より正確に推定されていることがわかる。 The three-dimensional position (x ′, y ′, z ′) and rotation angle (θ r ′, θ p ′, θ y ′) estimated from the projection matrix P 1 calculated by the parameter update process are the same as those in FIG. In any case shown in FIG. 20, the three-dimensional position (x ′, y ′, z ′) estimated from the projection matrix P 1 calculated by the region matching process and the rotation angle (θ r ′, θ p ′, θ It can be seen that the estimation is more accurate than y ′).
また、パラメータ更新処理により算出した射影行列P1から推定された3次元位置(x',y',z')及び回転角度(θr',θp',θy')においては、基準画像41の特徴点が、25画素おきに存在するようにしても、領域マッチング処理の場合と比較して、精度良く推定することができる。 In addition, at the three-dimensional position (x ′, y ′, z ′) and the rotation angle (θ r ′, θ p ′, θ y ′) estimated from the projection matrix P 1 calculated by the parameter update process, the reference image Even if 41 feature points exist every 25 pixels, it can be estimated with higher accuracy than in the case of region matching processing.
したがって、本発明におけるパラメータ更新処理によれば、パラメータ更新処理において、射影行列P1を生成する際に、評価関数f(xn)に用いられる基準画像41の特徴点が疎であったとしても、比較的精度良く、カメラ22の3次元位置(x',y',z')及び回転角度(θr',θp',θy')を推定することが可能となる。
<2.変形例>
本実施の形態では、3次元情報保持部101には、基準画像41を構成する各画素の3次元位置(x,y,z)Tを予め保持するようにしたが、例えば、3次元位置(x,y,z)Tに代えて、2次元位置(x,y)Tを保持するようにしてもよい。
Therefore, according to the parameter update process of the present invention, even when the feature points of the
<2. Modification>
In the present embodiment, the three-dimensional
この場合、2次元位置(x,y)Tを、3次元位置(x,y,c)Tとして表すようにすれば、本実施の形態において説明した場合と同様にして、パラメータ更新処理を行うことができる。なお、3次元位置(x,y,c)Tにおけるcは定数を表しており、例えばc=0とされる。 In this case, if the two-dimensional position (x, y) T is expressed as the three-dimensional position (x, y, c) T , the parameter update process is performed in the same manner as described in the present embodiment. be able to. Note that c at the three-dimensional position (x, y, c) T represents a constant, for example, c = 0.
また、本実施の形態における画像処理装置81には、カメラ22が含まれないように構成したが、その他、例えば、カメラ22を含めるように構成してもよい。
Further, the
さらに、本実施の形態では、射影行列Piに基づいて、カメラ22の3次元位置(x,y,z)及び姿勢を推定するようにしたが、その他、例えば、カメラ22の3次元位置(x,y,z)又は姿勢のいずれか一方を推定するようにしてもよい。
Furthermore, in the present embodiment, the three-dimensional position (x, y, z) and posture of the
なお、画像処理装置81としては、例えば、カメラ22の位置や姿勢に基づいて、所定の処理を行なうカメラ付き携帯端末や、HMD(head mount display、ヘッドマウントディスプレイ)等の電子装置を採用することができる。すなわち、例えば、画像処理装置81としては、AR(Augmented Reality)技術を用いて、カメラ22により撮像されて図示せぬモニタ等に表示される撮像画像上に、カメラ22の位置や姿勢に応じた物体を表示させる処理等を行なう電子装置を採用できる。
As the
この電子装置は、カメラ22の撮像により得られる撮像画像上に存在する物体に関連した関連情報を、ネットワークに接続されたサーバから取得する。
This electronic apparatus acquires related information related to an object existing on a captured image obtained by imaging by the
例えば、撮像画像上に存在する物体についての特徴点のパターンを表す各特徴点パターン(例えば、物体としての四角い紙が存在する場合、その紙の4つの角をそれぞれ表す4つの特徴点を、1つの特徴点パターンとする)毎に、対応する物体の関連情報を対応付けて保持するようにサーバを構成した場合、電子装置は、カメラ22の撮像により得られる撮像画像から、特徴点を抽出し、抽出した特徴点についての特徴点パターンに対応付けられている関連情報をサーバから取得する。
For example, each feature point pattern representing a pattern of feature points for an object existing on a captured image (for example, when a square paper as an object exists, four feature points respectively representing four corners of the paper are represented by 1 When the server is configured to hold the related information of the corresponding object in association with each other), the electronic device extracts the feature points from the captured image obtained by the imaging of the
また、電子装置の位置及び方向(例えば、電子装置に内蔵されるカメラ22の撮像方向)の組合せ毎に、対応する関連情報を対応付けて保持するようにサーバを構成した場合、電子装置は、GPS(global positioning system)等により、電子装置の位置を測定するとともに、加速度センサやジャイロセンサ等を用いて、電子装置の方向を測定する。
Further, when the server is configured so as to associate and hold the corresponding related information for each combination of the position and direction of the electronic device (for example, the imaging direction of the
そして、電子装置は、測定した位置及び方向の組合せに対応付けられている関連情報を、サーバから取得するものとなる。 And an electronic device will acquire the relevant information matched with the combination of the measured position and direction from a server.
なお、電子装置の位置毎に、対応する関連情報を対応付けて保持するようにサーバを構成した場合、電子装置は、測定した位置に対応付けられている関連情報を取得し、電子装置の方向毎に、対応する関連情報を対応付けて保持するようにサーバを構成した場合、電子装置は、測定した方向に対応付けられている関連情報を取得するものとなる。 In addition, when the server is configured to hold corresponding related information in association with each position of the electronic device, the electronic device acquires the related information associated with the measured position, and the direction of the electronic device When the server is configured to hold corresponding related information in association with each other, the electronic apparatus acquires related information associated with the measured direction.
電子装置は、取得した関連情報に基づいて、撮像画像上に合成(重畳)して表示させる合成用画像を生成する。そして、電子装置は、本実施の形態において上述したようにして、カメラ22の位置や姿勢を推定し、その結果得られる推定結果を考慮して、合成用画像を、撮像画像に合成して表示させる。
Based on the acquired related information, the electronic device generates a composite image to be displayed by being combined (superimposed) on the captured image. Then, the electronic device estimates the position and orientation of the
電子装置は、ネットワークに接続されたサーバから、関連情報を取得するようにしたが、その他、例えば、電子装置が、関連情報を予め保持する記憶部を有している場合には、サーバに代えて、記憶部から関連情報を取得することができる。 The electronic device acquires the related information from the server connected to the network. However, for example, when the electronic device has a storage unit that holds the related information in advance, the electronic device is replaced with the server. Thus, related information can be acquired from the storage unit.
この場合、電子装置は、ネットワークに接続することなく、記憶部から関連情報を取得できるので、ネットワークに接続できない環境下においても、撮像画像上に、関連情報に対応する合成用画像を合成して表示することが可能となる。 In this case, the electronic device can acquire the related information from the storage unit without connecting to the network. Therefore, even in an environment where the electronic device cannot be connected to the network, the composite image corresponding to the related information is synthesized on the captured image. It is possible to display.
次に、上述した一連の処理は、専用のハードウエアにより実行させることもできるし、ソフトウエアにより実行させることもできる。一連の処理をソフトウエアにより実行させる場合には、そのソフトウエアを構成するプログラムが、いわゆる組み込み型のコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどに、記録媒体からインストールされる。 Next, the series of processes described above can be executed by dedicated hardware or can be executed by software. When a series of processing is executed by software, a program constituting the software can execute various functions by installing a so-called embedded computer or various programs. For example, it is installed from a recording medium in a general-purpose personal computer.
[コンピュータの構成例]
図21は、上述した一連の処理をプログラムにより実行するパーソナルコンピュータの構成例を示している。
[Computer configuration example]
FIG. 21 shows a configuration example of a personal computer that executes the above-described series of processing by a program.
CPU(Central Processing Unit)201は、ROM(Read Only Memory)202、または記憶部208に記憶されているプログラムに従って各種の処理を実行する。RAM(Random Access Memory)203には、CPU201が実行するプログラムやデータなどが適宜記憶される。これらのCPU201、ROM202、およびRAM203は、バス204により相互に接続されている。
A CPU (Central Processing Unit) 201 executes various processes according to a program stored in a ROM (Read Only Memory) 202 or a
CPU201にはまた、バス204を介して入出力インタフェース205が接続されている。入出力インタフェース205には、キーボード、マウス、マイクロホンなどよりなる入力部206、ディスプレイ、スピーカなどよりなる出力部207が接続されている。CPU201は、入力部206から入力される指令に対応して各種の処理を実行する。そして、CPU201は、処理の結果を出力部207に出力する。
An input /
入出力インタフェース205に接続されている記憶部208は、例えばハードディスクからなり、CPU201が実行するプログラムや各種のデータを記憶する。通信部209は、インターネットやローカルエリアネットワークなどのネットワークを介して外部の装置と通信する。
A
また、通信部209を介してプログラムを取得し、記憶部208に記憶してもよい。
Further, a program may be acquired via the
入出力インタフェース205に接続されているドライブ210は、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリなどのリムーバブルメディア211が装着されたとき、それらを駆動し、そこに記録されているプログラムやデータなどを取得する。取得されたプログラムやデータは、必要に応じて記憶部208に転送され、記憶される。
The
コンピュータにインストールされ、コンピュータによって実行可能な状態とされるプログラムを記録する記録媒体は、図21に示されるように、磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD-ROM(compact disc-read only memory),DVD(digital versatile disc)を含む)、光磁気ディスク(MD(mini-disc)を含む)、もしくは半導体メモリなどよりなるパッケージメディアであるリムーバブルメディア211、または、プログラムが一時的もしくは永続的に記録されるROM202や、記憶部208を構成するハードディスクなどにより構成される。記録媒体へのプログラムの記録は、必要に応じてルータ、モデムなどのインタフェースである通信部209を介して、ローカルエリアネットワーク、インターネット、デジタル衛星放送といった、有線または無線の通信媒体を利用して行われる。
As shown in FIG. 21, a recording medium that is installed in a computer and records a program that can be executed by the computer includes a magnetic disk (including a flexible disk), an optical disk (CD-ROM (compact disc-read only). memory), DVD (including digital versatile disc)), magneto-optical disc (including MD (mini-disc)), or
なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。 In the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in chronological order according to the described order, but is not necessarily performed in chronological order. It also includes processes that are executed individually.
さらに、本実施の形態は、上述した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。 Furthermore, the present embodiment is not limited to the above-described embodiments, and various modifications can be made without departing from the gist of the present invention.
81 画像処理装置, 101 3次元情報保持部, 102 基準画像保持部, 103 合成画像生成部, 104 評価部, 105 最適化演算部, 106 パラメータ更新部 81 image processing apparatus, 101 three-dimensional information holding unit, 102 reference image holding unit, 103 composite image generation unit, 104 evaluation unit, 105 optimization calculation unit, 106 parameter update unit
Claims (8)
推定の基準となる基準画像を構成する画素の位置を、前記基準画像を構成する画素に対応する前記撮像画像上の画素の位置に射影する射影パラメータに基づいて、前記射影パラメータにより射影される前記撮像画像上の位置に存在する各画素により構成される合成画像を生成する合成画像生成手段と、
前記合成画像と前記基準画像との相関を表す評価関数を生成する評価生成手段と、
前記評価関数に基づいて、前記射影パラメータを更新する更新手段と、
更新後の前記射影パラメータに基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定する推定手段と
を含む画像処理装置。 In an image processing apparatus that estimates at least one of the position or orientation of the imaging unit based on a captured image obtained by imaging of the imaging unit,
Based on a projection parameter that projects the position of a pixel constituting a reference image serving as a reference for estimation onto the position of a pixel on the captured image corresponding to the pixel constituting the reference image, the projection parameter projects the position A composite image generating means for generating a composite image composed of each pixel present at a position on the captured image;
Evaluation generation means for generating an evaluation function representing a correlation between the composite image and the reference image;
Updating means for updating the projection parameter based on the evaluation function;
An image processing apparatus comprising: an estimation unit configured to estimate at least one of a position and a posture of the imaging unit based on the updated projection parameter.
前記更新手段は、前記評価関数を用いた最急降下法により算出した射影パラメータを新たな射影パラメータとして更新する
請求項1に記載の画像処理装置。 The evaluation generation unit generates the evaluation function represented by a quadratic polynomial,
The image processing apparatus according to claim 1, wherein the updating unit updates a projection parameter calculated by a steepest descent method using the evaluation function as a new projection parameter.
前記更新手段は、前記評価関数が最小となるときの前記候補射影パラメータを新たな射影パラメータとして更新する
請求項2に記載の画像処理装置。 The evaluation generation means generates the evaluation function having a candidate projection parameter representing a candidate of the updated projection parameter as a variable,
The image processing apparatus according to claim 2, wherein the updating unit updates the candidate projection parameter when the evaluation function is minimized as a new projection parameter.
前記合成画像生成手段は、
前記初期パラメータ生成手段により前記射影パラメータが生成されたことに対応して、前記射影パラメータに基づいて、前記合成画像を生成し、
前記更新手段により前記射影パラメータが更新されたことに対応して、更新後の前記射影パラメータに基づいて、前記合成画像を生成する
請求項1に記載の画像処理装置。 An initial parameter generating means for generating the projection parameter based on the position of each pixel constituting the reference image and the corresponding position on the captured image;
The composite image generation means includes
In response to the projection parameter being generated by the initial parameter generation means, the composite image is generated based on the projection parameter,
The image processing apparatus according to claim 1, wherein the composite image is generated based on the updated projection parameter in response to the update of the projection parameter by the update unit.
前記推定手段は、前記他の撮像部に対する前記撮像部の位置及び姿勢の違いを表す前記射影パラメータに基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定する
請求項1に記載の画像処理装置。 The reference image is obtained by imaging with another imaging unit having a known position and orientation different from the imaging unit,
The image processing according to claim 1, wherein the estimation unit estimates at least one of a position or a posture of the imaging unit based on the projection parameter representing a difference in position and posture of the imaging unit with respect to the other imaging unit. apparatus.
前記画像処理装置は、
合成画像生成手段と、
評価生成手段と、
更新手段と、
推定手段と
を含み、
前記画像合成手段が、推定の基準となる基準画像を構成する画素の位置を、前記基準画像を構成する画素に対応する前記撮像画像上の画素の位置に射影する射影パラメータに基づいて、前記射影パラメータにより射影される前記撮像画像上の位置に存在する各画素により構成される合成画像を生成し、
前記評価生成手段が、前記合成画像と前記基準画像との相関を表す評価関数を生成し、
前記更新手段が、前記評価関数に基づいて、前記射影パラメータを更新し、
前記推定手段が、更新後の前記射影パラメータに基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定する
ステップを含む画像処理方法。 In the image processing method of the image processing apparatus that estimates at least one of the position or orientation of the imaging unit based on a captured image obtained by imaging of the imaging unit,
The image processing apparatus includes:
A composite image generating means;
Evaluation generation means;
Update means;
Including estimation means and
The image synthesizing unit projects the position of a pixel constituting a reference image serving as a reference for estimation based on a projection parameter that projects the position of a pixel on the captured image corresponding to the pixel constituting the reference image. Generating a composite image composed of each pixel present at a position on the captured image projected by the parameter;
The evaluation generation means generates an evaluation function representing a correlation between the composite image and the reference image;
The updating means updates the projection parameter based on the evaluation function,
An image processing method, comprising: a step of estimating at least one of a position or a posture of the imaging unit based on the projection parameter after update.
推定の基準となる基準画像を構成する画素の位置を、前記基準画像を構成する画素に対応する前記撮像画像上の画素の位置に射影する射影パラメータに基づいて、前記射影パラメータにより射影される前記撮像画像上の位置に存在する各画素により構成される合成画像を生成する合成画像生成手段と、
前記合成画像と前記基準画像との相関を表す評価関数を生成する評価生成手段と、
前記評価関数に基づいて、前記射影パラメータを更新する更新手段と、
更新後の前記射影パラメータに基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定する推定手段と
して機能させるためのプログラム。 A computer of an image processing apparatus that estimates at least one of the position or orientation of the imaging unit based on a captured image obtained by imaging of the imaging unit,
Based on a projection parameter that projects the position of a pixel constituting a reference image serving as a reference for estimation onto the position of a pixel on the captured image corresponding to the pixel constituting the reference image, the projection parameter projects the position A composite image generating means for generating a composite image composed of each pixel present at a position on the captured image;
Evaluation generation means for generating an evaluation function representing a correlation between the composite image and the reference image;
Updating means for updating the projection parameter based on the evaluation function;
A program for functioning as an estimation means for estimating at least one of the position or orientation of the imaging unit based on the updated projection parameter.
推定の基準となる基準画像を構成する画素の位置を、前記基準画像を構成する画素に対応する前記撮像画像上の画素の位置に射影する射影パラメータに基づいて、前記射影パラメータにより射影される前記撮像画像上の位置に存在する各画素により構成される合成画像を生成する合成画像生成手段と、
前記合成画像と前記基準画像との相関を表す評価関数を生成する評価生成手段と、
前記評価関数に基づいて、前記射影パラメータを更新する更新手段と、
更新後の前記射影パラメータに基づいて、前記撮像部の位置又は姿勢の少なくとも一方を推定する推定手段と、
前記推定手段により推定された推定結果に基づいて、所定の処理を実行する実行手段と
を含む電子装置。 In an electronic device that estimates at least one of the position or orientation of the imaging unit based on a captured image obtained by imaging of the imaging unit,
Based on a projection parameter that projects the position of a pixel constituting a reference image serving as a reference for estimation onto the position of a pixel on the captured image corresponding to the pixel constituting the reference image, the projection parameter projects the position A composite image generating means for generating a composite image composed of each pixel present at a position on the captured image;
Evaluation generation means for generating an evaluation function representing a correlation between the composite image and the reference image;
Updating means for updating the projection parameter based on the evaluation function;
An estimation means for estimating at least one of the position or orientation of the imaging unit based on the updated projection parameters;
An electronic device comprising: execution means for executing predetermined processing based on the estimation result estimated by the estimation means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010111588A JP2011242134A (en) | 2010-05-14 | 2010-05-14 | Image processor, image processing method, program, and electronic device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010111588A JP2011242134A (en) | 2010-05-14 | 2010-05-14 | Image processor, image processing method, program, and electronic device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2011242134A true JP2011242134A (en) | 2011-12-01 |
Family
ID=45408963
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2010111588A Withdrawn JP2011242134A (en) | 2010-05-14 | 2010-05-14 | Image processor, image processing method, program, and electronic device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2011242134A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2019044608A1 (en) * | 2017-08-29 | 2019-03-07 | 日本電気株式会社 | Information processing device, information processing method, and recording medium |
| CN113396580A (en) * | 2019-02-18 | 2021-09-14 | 三菱电机株式会社 | Image processing apparatus, image processing method, and image processing program |
| CN113994662A (en) * | 2019-06-20 | 2022-01-28 | 索尼集团公司 | Information processing apparatus, information processing method, program, projection apparatus, and information processing system |
-
2010
- 2010-05-14 JP JP2010111588A patent/JP2011242134A/en not_active Withdrawn
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2019044608A1 (en) * | 2017-08-29 | 2019-03-07 | 日本電気株式会社 | Information processing device, information processing method, and recording medium |
| JPWO2019044608A1 (en) * | 2017-08-29 | 2020-07-16 | 日本電気株式会社 | Information processing device, information processing method, and program |
| US11055834B2 (en) | 2017-08-29 | 2021-07-06 | Nec Corporation | Information processing device, information processing method, and recording medium for processing synthesized images |
| CN113396580A (en) * | 2019-02-18 | 2021-09-14 | 三菱电机株式会社 | Image processing apparatus, image processing method, and image processing program |
| CN113994662A (en) * | 2019-06-20 | 2022-01-28 | 索尼集团公司 | Information processing apparatus, information processing method, program, projection apparatus, and information processing system |
| CN113994662B (en) * | 2019-06-20 | 2024-04-16 | 索尼集团公司 | Information processing device and corresponding method, system, medium and projection device |
| US12167180B2 (en) | 2019-06-20 | 2024-12-10 | Sony Group Corporation | Information processing device, information processing method, program, projection device, and information processing system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP2640057B1 (en) | Image processing device, image processing method and program | |
| JP7058277B2 (en) | Reconstruction method and reconfiguration device | |
| JP6418449B2 (en) | Image processing apparatus, image processing method, and program | |
| JP6701930B2 (en) | Authoring device, authoring method, and authoring program | |
| JP2014131257A (en) | Image correction system, image correction method, and program | |
| JP2012177676A (en) | Information processor and method, and program | |
| CN102800127A (en) | Light stream optimization based three-dimensional reconstruction method and device | |
| JP2004235934A (en) | Calibration processing device, calibration processing method, and computer program | |
| JPWO2018207365A1 (en) | Range image processing apparatus, range image processing system, range image processing method, and range image processing program | |
| JP5499261B2 (en) | Image processing device | |
| WO2009154294A1 (en) | Motion extraction device and program, image correction device and program, and recording medium | |
| JP2017011328A (en) | Apparatus, method and program for image processing | |
| KR20150114950A (en) | Increasing frame rate of an image stream | |
| JP2018173882A (en) | Information processing device, method, and program | |
| JP2018207252A (en) | Image processing system, control method for image processing system, and program | |
| JP2011155412A (en) | Projection system and distortion correction method in the same | |
| KR20110089299A (en) | Stereo matching processing system, stereo matching processing method, and recording medium | |
| JP2011242134A (en) | Image processor, image processing method, program, and electronic device | |
| TW201523510A (en) | System and method for combining point clouds | |
| JP5748355B2 (en) | Three-dimensional coordinate calculation apparatus, three-dimensional coordinate calculation method, and program | |
| JP2012164188A (en) | Image processing apparatus, image processing method and program | |
| JP5530391B2 (en) | Camera pose estimation apparatus, camera pose estimation method, and camera pose estimation program | |
| JP5769248B2 (en) | Stereo matching processing device, stereo matching processing method, and program | |
| JPWO2017109997A1 (en) | Image processing apparatus, image processing method, and program | |
| WO2023166618A1 (en) | Camera parameter estimation device, camera parameter estimation method, and computer-readable recording medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20130806 |