JP2008021210A - Method, device and program for generating free-viewpoint image using multi-viewpoint image - Google Patents

Method, device and program for generating free-viewpoint image using multi-viewpoint image Download PDF

Info

Publication number
JP2008021210A
JP2008021210A JP2006193841A JP2006193841A JP2008021210A JP 2008021210 A JP2008021210 A JP 2008021210A JP 2006193841 A JP2006193841 A JP 2006193841A JP 2006193841 A JP2006193841 A JP 2006193841A JP 2008021210 A JP2008021210 A JP 2008021210A
Authority
JP
Japan
Prior art keywords
camera
image
block
arbitrary
coordinates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2006193841A
Other languages
Japanese (ja)
Other versions
JP4775903B2 (en
Inventor
Akio Ishikawa
彰夫 石川
Atsushi Koike
淳 小池
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
KDDI Corp
Original Assignee
KDDI Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by KDDI Corp filed Critical KDDI Corp
Priority to JP2006193841A priority Critical patent/JP4775903B2/en
Publication of JP2008021210A publication Critical patent/JP2008021210A/en
Application granted granted Critical
Publication of JP4775903B2 publication Critical patent/JP4775903B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a free-viewpoint image generating method or the like capable of generating an image of an optional viewpoint by detecting a parallax vector by block matching and using the parallax vector even when the surface of an object is inclined with respect to optical axes of a plurality of camera. <P>SOLUTION: One and the same rotational transformation is applied so as to make the optical axes of the two cameras perpendicular to the same plane going through the cameras. Depth distance Z of an optional point and a unit normal vector at an optional point of the surface of an object are determined arbitrarily, moved by a parallax vector based on t and Z, transformed by a primary transformation matrix based on t, Z and n and matched to a block of a second image. While changing Z and n arbitrarily, a second block of the second image that resembles a first block of a first image most is retrieved. A block of an image from an optional viewpoint is generated in accordance with an internal division ratio of an optional viewpoint on a straight line connecting the two cameras. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、多視点画像を用いた自由視点画像生成方法、装置及びプログラムに関する。   The present invention relates to a free viewpoint image generation method, apparatus, and program using multi-viewpoint images.

従来、視聴者が視点位置又は視点方向を自由に選択できる「自由視点画像」という技術がある。自由視点画像は、被写体を、複数のカメラによって撮影した多視点画像によって生成される。カメラによって撮影されない視点からの画像は、視差ベクトルを用いた画像間の補間によって生成される。このために、多視点画像間の対応点探索問題を解く必要がある。勿論、カメラの間隔を密にするほど、高品質の自由視点画像が得られる。   Conventionally, there is a technique called “free viewpoint image” in which a viewer can freely select a viewpoint position or a viewpoint direction. The free viewpoint image is generated by a multi-viewpoint image obtained by photographing a subject with a plurality of cameras. An image from a viewpoint that is not photographed by the camera is generated by interpolation between images using a disparity vector. Therefore, it is necessary to solve the corresponding point search problem between multi-viewpoint images. Of course, the closer the camera interval, the higher the quality of the free viewpoint image.

多視点画像間の対応点探索問題を解く代表的な方法として、「ブロックマッチング」がある。「ブロックマッチング」を用いた視差ベクトルの検出は、以下のようにしてなされる。   “Block matching” is a typical method for solving the corresponding point search problem between multi-viewpoint images. Detection of a disparity vector using “block matching” is performed as follows.

第1のカメラ(第1の視点)によって撮影された第1の画像を、小さなブロックに分割する。第1の画像の第1のブロックの各々を、第2のカメラ(他の視点)の第2の画像の中で平行移動させて、最も類似度が高い領域を探索する。具体的には、第1の画像の第1のブロックに対して、絶対値誤差又は2乗誤差が最小となる第2の画像の第2のブロックを探索する。そして、探索された第2のブロックと、第1のブロックとの距離量を視差ベクトルとして算出する。第1のカメラと第2のカメラとを直線で結ぶ線上に、任意の視点が選択された場合、任意の視点と第1及び第2のカメラとの距離の内分比に応じて、その視差ベクトルを調整する。調整された視差ベクトルに応じて、第1のカメラの第1の画像を補間することによって、その任意の視点の画像を生成することができる。   The first image taken by the first camera (first viewpoint) is divided into small blocks. Each of the first blocks of the first image is translated in the second image of the second camera (other viewpoint) to search for a region having the highest similarity. Specifically, the second block of the second image having the smallest absolute value error or square error is searched for the first block of the first image. Then, the distance amount between the searched second block and the first block is calculated as a disparity vector. When an arbitrary viewpoint is selected on a line connecting the first camera and the second camera with a straight line, the parallax is determined according to the internal ratio of the distance between the arbitrary viewpoint and the first and second cameras. Adjust the vector. By interpolating the first image of the first camera in accordance with the adjusted disparity vector, an image of the arbitrary viewpoint can be generated.

特開平11−37721号公報JP 11-37721 A 特開平10−191393号公報Japanese Patent Laid-Open No. 10-191393 特開平10−191394号公報Japanese Patent Laid-Open No. 10-191394

従来のブロックマッチングは、第1の画像の中の被写体が、第2の画像の中で平行移動した場合に、ブロックをマッチングさせるものである。複数のカメラから見て、被写体の表面が、そのカメラの光軸に垂直となり、かつ、そのカメラから等距離にある場合にしか、完全なブロックマッチングをさせることができない。   Conventional block matching is to match blocks when a subject in a first image is translated in a second image. Only when the surface of the subject is perpendicular to the optical axis of the camera as viewed from a plurality of cameras and is equidistant from the camera, complete block matching can be performed.

しかしながら、複数のカメラの光軸に対して、被写体の表面が傾いている場合には、その被写体の面も異なって見える。即ち、第1の画像の第1のブロックを、第2の画像の中で平行移動させても、第1のブロックと完全にマッチングした第2のブロックを探索することはできない。第1の画像の中の被写体の形状は、第2の画像の中の被写体の形状と異なって射影されたものとなるからである。   However, when the surface of the subject is inclined with respect to the optical axes of a plurality of cameras, the surface of the subject also looks different. That is, even if the first block of the first image is translated in the second image, it is not possible to search for the second block that perfectly matches the first block. This is because the shape of the subject in the first image is different from the shape of the subject in the second image.

そこで、本発明は、複数のカメラの光軸に対して、被写体の表面が傾いている場合であっても、ブロックマッチングによって視差ベクトルを検出し、その視差ベクトルを用いて任意の視点の画像を生成することができる自由視点画像生成方法、装置及びプログラムを提供することを目的とする。   Therefore, the present invention detects a disparity vector by block matching even when the surface of an object is inclined with respect to the optical axes of a plurality of cameras, and uses the disparity vector to obtain an image of an arbitrary viewpoint. It is an object of the present invention to provide a free viewpoint image generation method, apparatus, and program that can be generated.

本発明によれば、光軸をZ軸に平行とする第1のカメラ及び第2のカメラが、第1の相対的位置(t,t,t)(ただし、t≠0)で配置されており、被写体を撮影した第1のカメラの第1の画像と第2のカメラの第2の画像とを用いて、任意の視点の画像を生成する自由視点画像生成方法であって、
第1のカメラ及び第2のカメラの光軸が第1のカメラと第2のカメラを通る同一平面に対して垂直となるように、カメラ内部パラメータを用いて、第1のカメラ及び第2のカメラに同一の回転変換を加えて、第1のカメラのカメラ座標系座標及び第2のカメラのカメラ座標系座標を変換する第1のステップと、
被写体上の任意点を決定する第2のステップと、
任意点を、回転変換を加えた第1のカメラの第1の画像に射影した第1の画像座標(x,y)と、任意点を、回転変換を加えた第2のカメラの第2の画像に射影した第2の画像座標(x’,y’)とを導出する第3のステップと、
第1の画像について任意点を含む第1のブロックを選択する第4のステップと、
任意点の奥行き距離Zと、被写体の表面の任意点における単位法線ベクトル(n,n,n)とを任意に決定し、前記回転変換を加えた前記同一平面に対する奥行き距離Zと単位法線ベクトル(nRx,nRy,nRz)を導出する第5のステップと、
第1のブロックを、回転変換を加えた第2の相対的位置(tRx,tRy,0)及び奥行き距離Zに基づく視差ベクトルで移動させ、第1の画像座標を原点として、第2の相対的位置(tRx,tRy,0)、奥行き距離Z、単位法線ベクトル(nRx,nRy,nRz)及び第2の画像座標(x’,y’)に基づく一次変換行列で変形させて、第2の画像のブロックにマッチングさせる第6のステップと、
奥行き距離Z及び単位法線ベクトル(n,n,n)を任意に変更しながら、第5及び第6のステップを繰り返し、移動させ且つ変形させた第1の画像の第1のブロックに最も類似する第2の画像の第2のブロックを探索し、奥行き距離Z及び単位法線ベクトル(n,n,n)を導出する第7のステップと、
第1のカメラと第2のカメラとを結ぶ直線上の任意の視点の内分比に応じて、任意の視点の相対的位置(t”,t”,t”)及び画像座標(x”,y”)を決定する第8のステップと、
奥行き距離Z及び単位法線ベクトル(n,n,n)と、任意の視点の相対的位置(t”,t”,t”)及び画像座標(x”,y”)とを用いて、任意の視点からの画像のブロックを生成する第9のステップと
を有することを特徴とする。
According to the present invention, the first camera and the second camera whose optical axes are parallel to the Z axis have the first relative position (t x , t y , t z ) (where t z ≠ 0). Is a free viewpoint image generation method for generating an image of an arbitrary viewpoint using a first image of a first camera and a second image of a second camera that have taken a subject. ,
Using the camera internal parameters, the first camera and the second camera are set so that the optical axes of the first camera and the second camera are perpendicular to the same plane passing through the first camera and the second camera. A first step of applying the same rotational transformation to the camera to transform the camera coordinate system coordinates of the first camera and the camera coordinate system coordinates of the second camera;
A second step of determining an arbitrary point on the subject;
The first image coordinates (x R , y R ) obtained by projecting the arbitrary point to the first image of the first camera to which the rotation transformation is applied, and the second image of the second camera to which the arbitrary point is subjected to the rotation transformation. A third step of deriving second image coordinates (x R ′, y R ′) projected onto the second image;
A fourth step of selecting a first block including an arbitrary point for the first image;
A depth distance Z of an arbitrary point and a unit normal vector ( nx , ny , nz ) at an arbitrary point on the surface of the subject are arbitrarily determined, and the depth distance Z R with respect to the same plane subjected to the rotation transformation And a fifth step of deriving a unit normal vector (n Rx , n Ry , n Rz ),
The first block is moved by a disparity vector based on the second relative position (t Rx , t Ry , 0) and the depth distance Z R to which the rotation transformation is applied, and the second image is used with the first image coordinates as the origin. Based on the relative position (t Rx , t Ry , 0), the depth distance Z R , the unit normal vector (n Rx , n Ry , n Rz ) and the second image coordinates (x R ′, y R ′). A sixth step of transforming with a primary transformation matrix to match a block of the second image;
The first block of the first image in which the depth distance Z and the unit normal vector (n x , n y , n z ) are arbitrarily changed, and the fifth and sixth steps are repeated, moved, and deformed. Searching for a second block of a second image most similar to, and deriving a depth distance Z and unit normal vectors ( nx , ny , nz );
Relative position (t x ″, t y ″, t z ″) of the arbitrary viewpoint and image coordinates (in accordance with the internal ratio of the arbitrary viewpoint on the straight line connecting the first camera and the second camera) an eighth step of determining x ″, y ″);
Depth distance Z and unit normal vector (n x, n y, n z) and the relative position of the arbitrary viewpoints (t x ", t y" , t z ") and image coordinates (x", y ") And a ninth step of generating a block of an image from an arbitrary viewpoint.

本発明の自由視点画像生成方法における他の実施形態によれば、
第1の画像の第1のブロック以外の部分について被写体上の任意点を更に決定し、第2から第7のステップを繰り返し、
最終的に、第1のカメラと第2のカメラとを結ぶ直線上の任意の視点からの画像の全ての部分を生成することも好ましい。
According to another embodiment of the free viewpoint image generation method of the present invention,
An arbitrary point on the subject is further determined for a portion other than the first block of the first image, and the second to seventh steps are repeated,
Finally, it is also preferable to generate all parts of an image from an arbitrary viewpoint on a straight line connecting the first camera and the second camera.

本発明の自由視点画像生成方法における他の実施形態によれば、
第1のステップについて、回転変換を表す行列は、以下のものであり、

Figure 2008021210
第2のステップについて、任意点の画像座標は、正規化画像座標であり、
回転変換の結果、新たな奥行き距離Z及び新たな単位法線ベクトル(nRx,nRy,nRz)と、任意の視点の新たな相対的位置(tRx,tRy,0)及び新たな画像座標(x’,y’)が得られたとし、
第6のステップについて、視差ベクトルは、以下のものであり、
Figure 2008021210
一次変換行列は、以下のものである
Figure 2008021210
ことも好ましい。 According to another embodiment of the free viewpoint image generation method of the present invention,
For the first step, the matrix representing the rotation transformation is:
Figure 2008021210
For the second step, the image coordinates of the arbitrary point are normalized image coordinates,
As a result of the rotation transformation, a new depth distance Z R and a new unit normal vector (n Rx , n Ry , n Rz ), a new relative position (t Rx , t Ry , 0) of the arbitrary viewpoint, and a new Suppose that the correct image coordinates (x R ', y R ') are obtained,
For the sixth step, the disparity vector is:
Figure 2008021210
The primary transformation matrix is
Figure 2008021210
It is also preferable.

本発明の自由視点画像生成方法における他の実施形態によれば、
第1のカメラ及び/又は第2のカメラの光軸がZ軸に平行でない場合に、第1のステップの前段にあって、
第1のカメラと第2のカメラの光軸がZ軸に平行となるように、カメラ内部パラメータを用いて、第1のカメラのカメラ座標系座標及び第2のカメラのカメラ座標系座標を変換するステップを有することも好ましい。
According to another embodiment of the free viewpoint image generation method of the present invention,
When the optical axis of the first camera and / or the second camera is not parallel to the Z axis,
The camera coordinate system coordinates of the first camera and the camera coordinate system coordinates of the second camera are converted using camera internal parameters so that the optical axes of the first camera and the second camera are parallel to the Z axis. It is also preferable to have the step to do.

本発明の自由視点画像生成方法における他の実施形態によれば、
3つ以上のカメラが配置された場合であっても、奥行き距離Z及び単位法線ベクトル(n,n,n)は一定であって、
第7のステップにおいて、1つのベースカメラのブロックに対する他のカメラのブロックとの予測誤差を算出し、該予測誤差の総和が最小となる奥行き距離Z及び単位法線ベクトル(n,n,n)を導出することも好ましい。
According to another embodiment of the free viewpoint image generation method of the present invention,
Even when three or more cameras are arranged, the depth distance Z and the unit normal vector ( nx , ny , nz ) are constant,
In a seventh step, a prediction error between one base camera block and another camera block is calculated, and a depth distance Z and a unit normal vector (n x , n y , It is also preferable to derive nz ).

本発明によれば、光軸をZ軸に平行とする第1のカメラ及び第2のカメラが、第1の相対的位置(t,t,t)(ただし、t≠0)で配置されており、被写体を撮影した第1のカメラの第1の画像と第2のカメラの第2の画像とを用いて、任意の視点の画像を生成する自由視点画像生成装置であって、
第1のカメラ及び第2のカメラの光軸が第1のカメラと第2のカメラを通る同一平面に対して垂直となるように、カメラ内部パラメータを用いて、第1のカメラ及び第2のカメラに同一の回転変換を加えて、第1のカメラのカメラ座標系座標及び第2のカメラのカメラ座標系座標を変換するカメラ座標系座標変換手段と、
被写体上の任意点を決定する任意点選択手段と、
任意点を、回転変換を加えた第1のカメラの第1の画像に射影した第1の画像座標(x,y)と、任意点を、回転変換を加えた第2のカメラの第2の画像に射影した第2の画像座標(x’,y’)とを導出する画像座標算出手段と、
第1の画像について任意点を含む第1のブロックを選択するブロック選択手段と、
任意点の奥行き距離Zと、被写体の表面の任意点における単位法線ベクトル(n,n,n)とを任意に決定し、前記回転変換を加えた前記同一平面に対する奥行き距離Zと単位法線ベクトル(nRx,nRy,nRz)を導出するパラメータ決定手段と、
第1のブロックを、回転変換を加えた第2の相対的位置(tRx,tRy,0)及び奥行き距離Zに基づく視差ベクトルで移動させ、第1の画像座標を原点として、第2の相対的位置(tRx,tRy,0)、奥行き距離Z、単位法線ベクトル(nRx,nRy,nRz)及び第2の画像座標(x’,y’)に基づく一次変換行列で変形させて、第2の画像のブロックにマッチングさせるブロックマッチング手段と、
奥行き距離Z及び単位法線ベクトル(n,n,n)を任意に変更しながら、パラメータ決定手段及びブロックマッチング手段を繰り返し制御し、移動させ且つ変形させた第1の画像の第1のブロックに最も類似する第2の画像の第2のブロックを探索し、奥行き距離Z及び単位法線ベクトル(n,n,n)を導出するマッチング制御手段と、
第1のカメラと第2のカメラとを結ぶ直線上の任意の視点の内分比に応じて、任意の視点の相対的位置(t”,t”,t”)及び画像座標(x”,y”)を決定する任意視点パラメータ決定手段と、
奥行き距離Z及び単位法線ベクトル(n,n,n)と、任意の視点の相対的位置(t”,t”,t”)及び画像座標(x”,y”)とを用いて、任意の視点からの画像のブロックを生成する自由視点画像生成手段と
を有することを特徴とする。
According to the present invention, the first camera and the second camera whose optical axes are parallel to the Z axis have the first relative position (t x , t y , t z ) (where t z ≠ 0). Is a free viewpoint image generation device that generates an image of an arbitrary viewpoint using a first image of a first camera and a second image of a second camera that have photographed a subject. ,
Using the camera internal parameters, the first camera and the second camera are set so that the optical axes of the first camera and the second camera are perpendicular to the same plane passing through the first camera and the second camera. Camera coordinate system coordinate conversion means for converting the camera coordinate system coordinates of the first camera and the camera coordinate system coordinates of the second camera by applying the same rotational transformation to the camera;
Arbitrary point selection means for determining an arbitrary point on the subject;
The first image coordinates (x R , y R ) obtained by projecting the arbitrary point to the first image of the first camera to which the rotation transformation is applied, and the second image of the second camera to which the arbitrary point is subjected to the rotation transformation. Image coordinate calculating means for deriving second image coordinates (x R ′, y R ′) projected onto the image of 2;
Block selection means for selecting a first block including an arbitrary point for the first image;
A depth distance Z of an arbitrary point and a unit normal vector ( nx , ny , nz ) at an arbitrary point on the surface of the subject are arbitrarily determined, and the depth distance Z R with respect to the same plane subjected to the rotation transformation And parameter determining means for deriving unit normal vectors (n Rx , n Ry , n Rz ),
The first block is moved by a disparity vector based on the second relative position (t Rx , t Ry , 0) and the depth distance Z R to which the rotation transformation is applied, and the second image is used with the first image coordinates as the origin. Based on the relative position (t Rx , t Ry , 0), the depth distance Z R , the unit normal vector (n Rx , n Ry , n Rz ) and the second image coordinates (x R ′, y R ′). Block matching means for transforming with a primary transformation matrix and matching with a block of the second image;
While arbitrarily changing the depth distance Z and the unit normal vector (n x , n y , n z ), the parameter determination means and the block matching means are repeatedly controlled to move and deform the first of the first image Matching control means for searching for a second block of the second image most similar to the block and deriving a depth distance Z and a unit normal vector ( nx , ny , nz );
Relative position (t x ″, t y ″, t z ″) of the arbitrary viewpoint and image coordinates (in accordance with the internal ratio of the arbitrary viewpoint on the straight line connecting the first camera and the second camera) arbitrary viewpoint parameter determining means for determining x ″, y ″);
Depth distance Z and unit normal vector (n x, n y, n z) and the relative position of the arbitrary viewpoints (t x ", t y" , t z ") and image coordinates (x", y ") And free viewpoint image generation means for generating a block of an image from an arbitrary viewpoint.

本発明の自由視点画像生成装置における他の実施形態によれば、
任意点選択手段は、第1の画像の第1のブロック以外の部分について被写体上の任意点を更に決定し、
任意点について、画像座標算出手段と、パラメータ決定手段と、ブロックマッチング手段と、マッチング制御手段と、任意視点パラメータ決定手段と、自由視点画像生成手段とを繰り返すブロック制御手段を更に有し、
最終的に、第1のカメラと第2のカメラとを結ぶ直線上の任意の視点からの画像の全ての部分を生成することも好ましい。
According to another embodiment of the free viewpoint image generation device of the present invention,
The arbitrary point selection means further determines an arbitrary point on the subject for a portion other than the first block of the first image,
A block control unit that repeats an image coordinate calculation unit, a parameter determination unit, a block matching unit, a matching control unit, an arbitrary viewpoint parameter determination unit, and a free viewpoint image generation unit for an arbitrary point,
Finally, it is also preferable to generate all parts of an image from an arbitrary viewpoint on a straight line connecting the first camera and the second camera.

本発明の自由視点画像生成装置における他の実施形態によれば、
カメラ座標系座標変換手段について、回転変換を表す行列は、以下のものであり、

Figure 2008021210
画像座標算出手段は、任意点の画像座標として正規化画像座標を導出し、
回転変換の結果、新たな奥行き距離Z及び新たな単位法線ベクトル(nRx,nRy,nRz)と、任意の視点の新たな相対的位置(tRx,tRy,0)及び新たな画像座標(x’,y’)が得られたとし、
ブロックマッチング手段は、視差ベクトルを以下のものとし、
Figure 2008021210
一次変換行列を以下のものとする
Figure 2008021210
ことも好ましい。 According to another embodiment of the free viewpoint image generation device of the present invention,
For the camera coordinate system coordinate transformation means, the matrix representing the rotation transformation is as follows:
Figure 2008021210
The image coordinate calculation means derives normalized image coordinates as image coordinates of an arbitrary point,
As a result of the rotation transformation, a new depth distance Z R and a new unit normal vector (n Rx , n Ry , n Rz ), a new relative position (t Rx , t Ry , 0) of the arbitrary viewpoint, and a new Suppose that the correct image coordinates (x R ', y R ') are obtained,
The block matching means uses the following disparity vectors:
Figure 2008021210
Let the primary transformation matrix be
Figure 2008021210
It is also preferable.

本発明の自由視点画像生成装置における他の実施形態によれば、
第1のカメラ及び/又は第2のカメラの光軸がZ軸に平行でない場合に、
第1のカメラと第2のカメラの光軸がZ軸に平行となるように、カメラ内部パラメータを用いて、第1のカメラのカメラ座標系座標及び第2のカメラのカメラ座標系座標を変換することも好ましい。
According to another embodiment of the free viewpoint image generation device of the present invention,
When the optical axis of the first camera and / or the second camera is not parallel to the Z axis,
The camera coordinate system coordinates of the first camera and the camera coordinate system coordinates of the second camera are converted using camera internal parameters so that the optical axes of the first camera and the second camera are parallel to the Z axis. It is also preferable to do.

本発明の自由視点画像生成装置における他の実施形態によれば、
3つ以上のカメラが配置された場合であっても、奥行き距離Z及び単位法線ベクトル(n,n,n)は一定であって、
第7のステップにおいて、1つのベースカメラのブロックに対する他のカメラのブロックとの予測誤差を算出し、該予測誤差の総和が最小となる奥行き距離Z及び単位法線ベクトル(n,n,n)を導出することも好ましい。
According to another embodiment of the free viewpoint image generation device of the present invention,
Even when three or more cameras are arranged, the depth distance Z and the unit normal vector ( nx , ny , nz ) are constant,
In a seventh step, a prediction error between one base camera block and another camera block is calculated, and a depth distance Z and a unit normal vector (n x , n y , It is also preferable to derive nz ).

本発明によれば、光軸をZ軸に平行とする第1のカメラ及び第2のカメラが、第1の相対的位置(t,t,t)(ただし、t≠0)で配置されており、被写体を撮影した第1のカメラの第1の画像と第2のカメラの第2の画像とを用いて、任意の視点の画像を生成するコンピュータを機能させる自由視点画像生成プログラムであって、
第1のカメラ及び第2のカメラの光軸が第1のカメラと第2のカメラを通る同一平面に対して垂直となるように、カメラ内部パラメータを用いて、第1のカメラ及び第2のカメラに同一の回転変換を加えて、第1のカメラのカメラ座標系座標及び第2のカメラのカメラ座標系座標を変換するカメラ座標系座標変換手段と、
被写体上の任意点を決定する任意点選択手段と、
任意点を、回転変換を加えた第1のカメラの第1の画像に射影した第1の画像座標(x,y)と、任意点を、回転変換を加えた第2のカメラの第2の画像に射影した第2の画像座標(x’,y’)とを導出する画像座標算出手段と、
第1の画像について任意点を含む第1のブロックを選択するブロック選択手段と、
任意点の奥行き距離Zと、被写体の表面の任意点における単位法線ベクトル(n,n,n)とを任意に決定し、前記回転変換を加えた前記同一平面に対する奥行き距離Zと単位法線ベクトル(nRx,nRy,nRz)を導出するパラメータ決定手段と、
第1のブロックを、回転変換を加えた第2の相対的位置(tRx,tRy,0)及び奥行き距離Zに基づく視差ベクトルで移動させ、第1の画像座標を原点として、第2の相対的位置(tRx,tRy,0)、奥行き距離Z、単位法線ベクトル(nRx,nRy,nRz)及び第2の画像座標(x’,y’)に基づく一次変換行列で変形させて、第2の画像のブロックにマッチングさせるブロックマッチング手段と、
奥行き距離Z及び単位法線ベクトル(n,n,n)を任意に変更しながら、パラメータ決定手段及びブロックマッチング手段を繰り返し制御し、移動させ且つ変形させた第1の画像の第1のブロックに最も類似する第2の画像の第2のブロックを探索し、奥行き距離Z及び単位法線ベクトル(n,n,n)を導出するマッチング制御手段と、
第1のカメラと第2のカメラとを結ぶ直線上の任意の視点の内分比に応じて、任意の視点の相対的位置(t”,t”,t”)及び画像座標(x”,y”)を決定する任意視点パラメータ決定手段と、
奥行き距離Z及び単位法線ベクトル(n,n,n)と、任意の視点の相対的位置(t”,t”,t”)及び画像座標(x”,y”)とを用いて、任意の視点からの画像のブロックを生成する自由視点画像生成手段と
してコンピュータを機能させることを特徴とする。
According to the present invention, the first camera and the second camera whose optical axes are parallel to the Z axis have the first relative position (t x , t y , t z ) (where t z ≠ 0). Free viewpoint image generation that causes a computer that generates an image of an arbitrary viewpoint to function using the first image of the first camera and the second image of the second camera that have been photographed for the subject. A program,
Using the camera internal parameters, the first camera and the second camera are set so that the optical axes of the first camera and the second camera are perpendicular to the same plane passing through the first camera and the second camera. Camera coordinate system coordinate conversion means for converting the camera coordinate system coordinates of the first camera and the camera coordinate system coordinates of the second camera by applying the same rotational transformation to the camera;
Arbitrary point selection means for determining an arbitrary point on the subject;
The first image coordinates (x R , y R ) obtained by projecting the arbitrary point to the first image of the first camera to which the rotation transformation is applied, and the second image of the second camera to which the arbitrary point is subjected to the rotation transformation. Image coordinate calculating means for deriving second image coordinates (x R ′, y R ′) projected onto the image of 2;
Block selection means for selecting a first block including an arbitrary point for the first image;
A depth distance Z of an arbitrary point and a unit normal vector ( nx , ny , nz ) at an arbitrary point on the surface of the subject are arbitrarily determined, and the depth distance Z R with respect to the same plane subjected to the rotation transformation And parameter determining means for deriving unit normal vectors (n Rx , n Ry , n Rz ),
The first block is moved by a disparity vector based on the second relative position (t Rx , t Ry , 0) and the depth distance Z R to which the rotation transformation is applied, and the second image is used with the first image coordinates as the origin. Based on the relative position (t Rx , t Ry , 0), the depth distance Z R , the unit normal vector (n Rx , n Ry , n Rz ) and the second image coordinates (x R ′, y R ′). Block matching means for transforming with a primary transformation matrix and matching with a block of the second image;
While arbitrarily changing the depth distance Z and the unit normal vector (n x , n y , n z ), the parameter determination means and the block matching means are repeatedly controlled to move and deform the first of the first image Matching control means for searching for a second block of the second image most similar to the block and deriving a depth distance Z and a unit normal vector ( nx , ny , nz );
Relative position (t x ″, t y ″, t z ″) of the arbitrary viewpoint and image coordinates (in accordance with the internal ratio of the arbitrary viewpoint on the straight line connecting the first camera and the second camera) arbitrary viewpoint parameter determining means for determining x ″, y ″);
Depth distance Z and unit normal vector (n x, n y, n z) and the relative position of the arbitrary viewpoints (t x ", t y" , t z ") and image coordinates (x", y ") And a computer that functions as free viewpoint image generation means for generating an image block from an arbitrary viewpoint.

本発明の自由視点画像生成方法、装置及びプログラムによれば、複数のカメラの光軸に対して、被写体の表面が傾いている場合であっても、ブロックマッチングによって視差ベクトルを検出し、その視差ベクトルを用いて任意の視点の画像を生成することができる。第1の画像の第1のブロックを、任意の奥行き距離Zと、被写体の表面の法線の任意の向きnに基づいて移動及び変形をさせながらブロックマッチングをすることにより、視差ベクトルだけでなく、一次変換行列を検出することができる。任意の視点の位置に応じて、視差ベクトル及び一次変換行列を調整することにより、第1の画像の第1のブロックから、現実に近い任意の視点の画像を生成することができる。   According to the free viewpoint image generation method, apparatus, and program of the present invention, even when the surface of a subject is tilted with respect to the optical axes of a plurality of cameras, a disparity vector is detected by block matching, and the disparity is detected. An image of an arbitrary viewpoint can be generated using a vector. By performing block matching while moving and deforming the first block of the first image based on an arbitrary depth distance Z and an arbitrary direction n of the normal of the subject surface, not only the disparity vector The primary transformation matrix can be detected. By adjusting the parallax vector and the primary transformation matrix according to the position of an arbitrary viewpoint, an image of an arbitrary viewpoint close to reality can be generated from the first block of the first image.

以下では、図面を用いて、本発明を実施するための最良の形態について詳細に説明する。   Hereinafter, the best mode for carrying out the present invention will be described in detail with reference to the drawings.

図1は、本発明におけるシステム構成図である。   FIG. 1 is a system configuration diagram according to the present invention.

異なる位置に配置された複数のカメラ1が、被写体3を撮影する。複数のカメラ1は、光軸をZ軸に平行として配置されている。但し、それらのカメラは、光軸に垂直な同一平面(XY平面に平行な平面)上には配置されない。即ち、前後左右に散らばって配置されている。図1によれば、9台の縦3列横3列(視点(0,0)〜(2,2))で配置されている。また、複数のカメラ1は、自由視点画像生成装置2に接続される。本発明によれば、少なくとも2つのカメラによって撮影された多視点画像を必要とする。   A plurality of cameras 1 arranged at different positions capture the subject 3. The plurality of cameras 1 are arranged with the optical axis parallel to the Z axis. However, these cameras are not arranged on the same plane perpendicular to the optical axis (a plane parallel to the XY plane). In other words, they are arranged scattered in the front, rear, left and right. According to FIG. 1, nine units are arranged in three vertical rows and three horizontal rows (viewpoints (0, 0) to (2, 2)). The plurality of cameras 1 are connected to a free viewpoint image generation device 2. According to the present invention, multi-viewpoint images taken by at least two cameras are required.

カメラ1は、被写体3を撮影した画像を自由視点画像生成装置2へ送信する。ここで、カメラ1が移動可能なものである場合、カメラ位置情報も、自由視点画像生成装置2へ送信される。勿論、自由視点画像生成装置2が、全てのカメラ位置情報を予め記憶しているものであってもよい。   The camera 1 transmits an image obtained by photographing the subject 3 to the free viewpoint image generation device 2. Here, when the camera 1 is movable, the camera position information is also transmitted to the free viewpoint image generation device 2. Of course, the free viewpoint image generation device 2 may store all camera position information in advance.

図2は、図1のシステム構成について、複数のカメラを正面及び側面から見た配置図である。   FIG. 2 is a layout view of a plurality of cameras viewed from the front and side in the system configuration of FIG.

図2によれば、正面から見ると、等幅で縦3列横3列に配置されている。側面から見ると、カメラ(0,1)(1,1)(2,1)がz軸に対して後方に配置されている。即ち、被写体3に対して、複数のカメラ1は、y軸に対して円筒面上に配置されている。   According to FIG. 2, when viewed from the front, they are arranged in three rows and three rows in the same width. When viewed from the side, the cameras (0, 1) (1, 1) (2, 1) are arranged rearward with respect to the z-axis. That is, with respect to the subject 3, the plurality of cameras 1 are arranged on the cylindrical surface with respect to the y-axis.

図3は、図2における各カメラから見た被写体の見え方を表す画面図である。   FIG. 3 is a screen diagram showing how the subject is seen from each camera in FIG.

図3によれば、被写体は、台形状立体である。被写体の正面に、カメラ(1,1)が位置する。カメラ(0,1)(1,1)(2,1)は、z軸に対して後方に配置されているので、被写体が少し小さく見える。また、カメラ(1,1)の前方にあり且つ左側のカメラ(1,0)から見ると、被写体が全体として大きく、且つ、左側が広がり、右側が縮小して見える。また、カメラ(1,1)の前方にあり且つ右側のカメラ(1,2)から見ると、被写体が全体として大きく、且つ、左側が縮小し、右側が広がって見える。   According to FIG. 3, the subject is a trapezoidal solid. The camera (1, 1) is located in front of the subject. Since the cameras (0, 1) (1, 1) (2, 1) are arranged rearward with respect to the z-axis, the subject looks a little small. When viewed from the left camera (1, 0) in front of the camera (1, 1), the subject appears to be large as a whole, the left side is widened, and the right side is reduced. Further, when viewed from the right camera (1, 2) in front of the camera (1, 1), the subject is large as a whole, the left side is reduced, and the right side is expanded.

同様に、カメラ(1,1)の上側のカメラ(0,1)から見ると、被写体の上側が広がり、下側が縮小して見える。カメラ(1,1)の下側のカメラ(2,1)から見ると、被写体の上側が縮小し、下側が広がって見える。   Similarly, when viewed from the camera (0, 1) above the camera (1, 1), the upper side of the subject appears to expand and the lower side appears to be reduced. When viewed from the lower camera (2, 1) of the camera (1, 1), the upper side of the subject is reduced and the lower side is expanded.

図3からも明らかなとおり、視差を考慮してブロックを移動させても、正確に一致する領域がない。従って、正しいマッチングを取ることができない。   As is clear from FIG. 3, even if the block is moved in consideration of parallax, there is no region that matches exactly. Therefore, correct matching cannot be obtained.

図4〜図6には、被写体の表面の傾きによって、各カメラによって撮影される画像を表している。   4 to 6 show images taken by each camera according to the inclination of the surface of the subject.

図4は、被写体の表面を横方向斜めに傾けた場合に、各カメラから撮影した画像である。   FIG. 4 is an image taken from each camera when the surface of the subject is inclined obliquely in the horizontal direction.

被写体は、左側が奥に、右側が手前にある。このとき、カメラ(1,1)の画像よりも、カメラ(1,1)の前方にあり且つ左側のカメラ(1,0)の画像の方が、被写体が全体として大きく、且つ、横方向に広がって見える。また、カメラ(1,1)の画像よりも、カメラ(1,1)の前方にあり且つ右側のカメラ(1,2)の画像の方が、被写体が全体として大きく、且つ、横方向に狭く見える。   The subject is on the back on the left and the front on the right. At this time, the image of the camera (1, 0) in front of the camera (1, 1) and the camera (1, 0) on the left side is larger than the image of the camera (1, 1). It seems to spread. Also, the image of the camera (1, 2) on the right side of the camera (1, 1) in front of the camera (1, 1) is larger as a whole and narrower in the lateral direction than the image of the camera (1, 1). appear.

図5は、被写体の表面を上下方向斜めに傾けた場合に、各カメラから撮影した画像である。   FIG. 5 is an image taken from each camera when the surface of the subject is tilted in the vertical direction.

被写体は、上側が奥に、下側が手前にある。このとき、カメラ(1,1)の画像よりも、カメラ(1,1)の上側のカメラ(0,1)の画像の方が、平面が縦方向に広がって見える。また、カメラ(1,1)の画像よりも、カメラ(1,1)の下側のカメラ(2,1)の画像の方が、平面が縦方向に狭く見える。   The subject has an upper side at the back and a lower side at the front. At this time, the plane of the image of the camera (0, 1) on the upper side of the camera (1, 1) appears to expand in the vertical direction than the image of the camera (1, 1). Further, the plane of the image of the camera (2, 1) below the camera (1, 1) appears narrower in the vertical direction than the image of the camera (1, 1).

図6は、被写体の表面を横方向斜めに傾けて、且つ、上下方向斜めに傾けた場合に、各カメラから撮影した画像である。即ち、図4の傾きと図5の傾きとを合わせたものである。   FIG. 6 is an image taken from each camera when the surface of the subject is tilted obliquely in the horizontal direction and tilted in the vertical direction. In other words, the slope of FIG. 4 and the slope of FIG. 5 are combined.

図3、図4〜図6に表されたように、このような見え方の差異は、複数のカメラの光軸に対して、被写体の台形状立体の側面が傾いているために生じる。本発明によれば、カメラの光軸に対して被写体の表面が傾いている場合であっても、第1のブロックと完全にマッチングした第2のブロックを探索することができる。   As shown in FIGS. 3 and 4 to 6, such a difference in appearance occurs because the side surface of the trapezoidal solid of the subject is inclined with respect to the optical axes of a plurality of cameras. According to the present invention, even when the surface of the subject is inclined with respect to the optical axis of the camera, it is possible to search for a second block that perfectly matches the first block.

図7は、2つのカメラにおける第1の相対位置関係の説明図である。   FIG. 7 is an explanatory diagram of a first relative positional relationship between the two cameras.

一般に、被写体は平面ではないため、ブロックの変形も非線形になる。しかしながら、充分に小さなブロックに着目すると、ブロック内の被写体の面は平面に近似できる。また、2つのカメラは、光軸を平行に、第1の相対的位置(t,t,t)で配置される。図7によれば、被写体に対して、カメラCとカメラC’のxy平面は、異なる位置にある。従って、t≠0である。 In general, since the subject is not a plane, the deformation of the block is also nonlinear. However, if attention is paid to a sufficiently small block, the surface of the subject in the block can be approximated to a plane. The two cameras are arranged at the first relative position (t x , t y , t z ) with the optical axes in parallel. According to FIG. 7, the xy planes of the camera C and the camera C ′ are at different positions with respect to the subject. Therefore, t z ≠ 0.

図8は、2つのカメラに回転を加えた第2の相対位置関係の説明図である。   FIG. 8 is an explanatory diagram of a second relative positional relationship in which two cameras are rotated.

本発明によれば、カメラ内部パラメータを用いて、カメラCとカメラC’に同一の回転変換を加える。この回転Rは、カメラC及びカメラC’の光軸が、カメラC及びカメラC’を通る同一平面に対して垂直となるようにする。このように、カメラCのカメラ座標系座標と、カメラC’のカメラ座標系座標とを変換する。これにより、カメラC及びカメラC’の第2の相対的位置は、(tRx,tRy,0)となる。即ち、tRz=0で表される。 According to the present invention, the same rotational transformation is applied to camera C and camera C ′ using camera internal parameters. This rotation R causes the optical axes of camera C and camera C ′ to be perpendicular to the same plane passing through camera C and camera C ′. In this way, the camera coordinate system coordinates of the camera C and the camera coordinate system coordinates of the camera C ′ are converted. As a result, the second relative positions of the camera C and the camera C ′ are (t Rx , t Ry , 0). That is, t Rz = 0.

カメラ座標系座標に回転Rを加えて、そのxy平面から被写体の任意点までの奥行き距離Zと、近似平面の向き(単位法線ベクトル)nとを、ブロックマッチングのパラメータとして用いる。 And the rotation R in addition to the camera coordinate system coordinates, the depth distance Z R from the xy plane to any point of the object, and orientation (the unit normal vector) n R of the approximate plane, is used as a parameter for block matching.

図9は、カメラCの第1の画像の第1のブロックを、カメラC’の第2の画像の第2のブロックに、ブロックマッチングをさせている説明図である。   FIG. 9 is an explanatory diagram in which block matching is performed on the first block of the first image of the camera C and the second block of the second image of the camera C ′.

一般に、被写体は平面ではないため、ブロックの変形も非線形になる。しかしながら、充分に小さなブロックに着目すると、ブロック内の被写体の面は平面に近似できる。また、2つのカメラは、光軸を平行に、且つ、光軸に垂直な同一平面上に、相対的位置(tRx,tRy,0)で配置される。本発明は、その近似平面から被写体の任意点までの奥行き距離Zと、その近似平面の向き(単位法線ベクトル)nとを、ブロックマッチングのパラメータとして用いる。 In general, since the subject is not a plane, the deformation of the block is also nonlinear. However, if attention is paid to a sufficiently small block, the surface of the subject in the block can be approximated to a plane. The two cameras are arranged at relative positions (t Rx , t Ry , 0) on the same plane that is parallel to the optical axis and perpendicular to the optical axis. The present invention includes a depth distance Z R from the approximate plane to any point of the object, and its orientation (unit normal vector) of the approximate plane n R, used as a parameter for block matching.

以下では、ブロック又は画像の移動及び変形となる一次変換行列の導出過程を詳細に説明する。   Hereinafter, a process of deriving a primary transformation matrix that is a movement or deformation of a block or an image will be described in detail.

最初に、カメラの内部パラメータ(内部カメラ行列)Aは、以下の式で表される。この値は、既知であるとする。

Figure 2008021210
fku、fkv:焦点距離(カメラの距離のピクセル数)
θ=π/2:座標軸の角度
、v:画像中心 First, an internal parameter (internal camera matrix) A of the camera is expressed by the following equation. This value is assumed to be known.
Figure 2008021210
fk u , fk v : focal length (number of pixels of camera distance)
θ = π / 2: Coordinate axis angle u 0 , v 0 : Image center

カメラCのカメラ座標系を平行移動(相対的位置t)させて、カメラC’のカメラ座標系が得られる。tは、カメラの外部パラメータの1つであり、カメラCのカメラ座標系に対するカメラC’の変位ベクトルを表す。カメラC及びC’は、光軸を平行に配置される。また、カメラCのカメラ座標系に対するカメラC’の相対的位置ベクトルtは、z軸成分を必ず非0とする(t≠0)。

Figure 2008021210
The camera coordinate system of the camera C ′ is obtained by moving the camera coordinate system of the camera C in parallel (relative position t). t is one of the external parameters of the camera and represents the displacement vector of the camera C ′ with respect to the camera coordinate system of the camera C. Cameras C and C ′ are arranged with their optical axes in parallel. The relative position vector t of the camera C ′ with respect to the camera coordinate system of the camera C always has a non-zero z-axis component (t Z ≠ 0).
Figure 2008021210

カメラCのカメラ座標系座標と、カメラC’のカメラ座標系座標との間には、以下の関係が成り立つ。即ち、カメラCのカメラ座標系座標が、カメラの外部パラメータを通じて、カメラC’のカメラ座標系座標に変換される。
M=M’+t 式(2)
M:カメラCにおける被写体の任意点Pのカメラ座標系座標
M’:カメラC’における被写体の任意点Pのカメラ座標系座標

Figure 2008021210
The following relationship is established between the camera coordinate system coordinates of the camera C and the camera coordinate system coordinates of the camera C ′. That is, the camera coordinate system coordinates of the camera C are converted to the camera coordinate system coordinates of the camera C ′ through the external parameters of the camera.
M = M ′ + t Formula (2)
M: Camera coordinate system coordinates of the arbitrary point P of the subject in the camera C M ′: Camera coordinate system coordinates of the arbitrary point P of the subject in the camera C ′
Figure 2008021210

ここで、被写体の近似平面πに対して、カメラC’のカメラ座標系では以下の式が成り立つ。
M’=d 式(5)
n(|n|=1):カメラC’のカメラ座標系における平面の法線ベクトル

Figure 2008021210
d:カメラC’のカメラ座標系の原点から平面までの距離 Here, with respect to the approximate plane π of the subject, the following expression is established in the camera coordinate system of the camera C ′.
n T M ′ = d Formula (5)
n (| n | = 1): normal vector of the plane in the camera coordinate system of the camera C ′
Figure 2008021210
d: Distance from the origin of the camera coordinate system of camera C ′ to the plane

次に、任意点Pのディジタル画像座標を、以下のようにする。
m:カメラCにおける任意点Pのディジタル画像座標
m’:カメラC’における任意点Pのディジタル画像座標

Figure 2008021210
Next, the digital image coordinates of the arbitrary point P are as follows.
m: digital image coordinates of an arbitrary point P in the camera C m ′: digital image coordinates of the arbitrary point P in the camera C ′
Figure 2008021210

また、任意点Pの正規化画像座標を、以下のようにする。「正規化画像」とは、画像平面が焦点から単位長のところにあるカメラ(正規化カメラ)で撮影したと仮定した場合の画像をいう。正規化画像における任意点の座標を、「正規化画像座標」という。
x:任意点PのカメラCにおける正規化画像座標
x’:任意点PのカメラC’における正規化画像座標

Figure 2008021210
Further, the normalized image coordinates of the arbitrary point P are as follows. A “normalized image” refers to an image when it is assumed that the image plane is taken by a camera (normalized camera) whose unit length is from the focal point. The coordinates of an arbitrary point in the normalized image are referred to as “normalized image coordinates”.
x: Normalized image coordinates of the arbitrary point P in the camera C x ′: Normalized image coordinates of the arbitrary point P in the camera C ′
Figure 2008021210

これにより、以下の中心射影変換が成立する。

Figure 2008021210
As a result, the following central projective transformation is established.
Figure 2008021210

次に、式(9)に式(7)及び式(3)を代入すると、以下の式が導出される。

Figure 2008021210
Next, when Expression (7) and Expression (3) are substituted into Expression (9), the following expression is derived.
Figure 2008021210

両辺の3行目を比較すると、s=Zが導かれる。   Comparing the third row on both sides leads to s = Z.

これを式(9)に代入すると、以下の式が導出される。

Figure 2008021210
Substituting this into equation (9) yields the following equation:
Figure 2008021210

一方で、式(10)に式(2)を代入すると、以下の式が成立する。

Figure 2008021210
On the other hand, when the formula (2) is substituted into the formula (10), the following formula is established.
Figure 2008021210

式(1)、式(3)、式(4)、及び式(8)を代入して、以下の式が導出される。

Figure 2008021210
By substituting Equation (1), Equation (3), Equation (4), and Equation (8), the following equation is derived.
Figure 2008021210

両辺の3行目を比較すると、s’=Z’=Z−tが導出される。 When comparing the third row on both sides, s ′ = Z ′ = Z− tz is derived.

これを式(10)に代入すると、以下の式が導出される。

Figure 2008021210
Substituting this into equation (10) yields the following equation:
Figure 2008021210

次に、カメラCのカメラ座標系を回転変換し、tを、それをXY平面に正射影したベクトルtxyの方向に一致させることを考える。但し、txyは、以下のようになる。

Figure 2008021210
Next, it is assumed that the camera coordinate system of the camera C is rotationally transformed and t is matched with the direction of a vector t xy obtained by orthogonally projecting it onto the XY plane. However, t xy is as follows.
Figure 2008021210

一般に、単位ベクトルrを回転軸とする角度θの回転を表す行列Rは、Rodriguesの公式により、以下のように表される。

Figure 2008021210
In general, the matrix R representing the rotation of the angle θ with the unit vector r as the rotation axis is expressed as follows according to the Rodrigues formula.
Figure 2008021210

ここで、以下のものである。

Figure 2008021210
Here, it is as follows.
Figure 2008021210

rは、t及びtxyと直交するので、以下の式になる。

Figure 2008021210
Since r is orthogonal to t and t xy , the following equation is obtained.
Figure 2008021210

回転角度をθとすると、以下の式となる。

Figure 2008021210
When the rotation angle is θ, the following formula is obtained.
Figure 2008021210

以上より、式(14)及び式(15)を式(13)に代入すると、求める回転変換行列は、以下のようになる。

Figure 2008021210
As described above, when Expression (14) and Expression (15) are substituted into Expression (13), the rotation transformation matrix to be obtained is as follows.
Figure 2008021210

同様に、逆変換の行列は、以下のようになる。

Figure 2008021210
Similarly, the inverse transformation matrix is as follows.
Figure 2008021210

回転変換行列Rを用いて、平行移動ベクトルt、近似平面πの単位法線ベクトルnを回転変換する。回転変換した結果をそれぞれ、t、nとおくと、以下のようになる。

Figure 2008021210
Using the rotation transformation matrix R, the translation vector t and the unit normal vector n of the approximate plane π are rotationally transformed. When the results of rotational transformation are respectively denoted as t R and n R , the results are as follows.
Figure 2008021210

回転変換後のカメラCのカメラ座標系座標と、回転変換後のカメラC’のカメラ座標系座標との間には、以下の関係が成り立つ。即ち、カメラCのカメラ座標系座標が、カメラの外部パラメータを通じて、カメラC’のカメラ座標系座標に変換される。
=M’+t 式(20)
:回転変換後のカメラCにおける被写体の任意点Pのカメラ座標系座標
’:回転変換後のカメラC’における被写体の任意点Pのカメラ座標系座標

Figure 2008021210
The following relationship is established between the camera coordinate system coordinates of the camera C after rotation conversion and the camera coordinate system coordinates of the camera C ′ after rotation conversion. That is, the camera coordinate system coordinates of the camera C are converted to the camera coordinate system coordinates of the camera C ′ through the external parameters of the camera.
M R = M R '+ t R formula (20)
M R : Camera coordinate system coordinates of the arbitrary point P of the subject in the camera C after rotation conversion M R ′: Camera coordinate system coordinates of the arbitrary point P of the subject in the camera C ′ after rotation conversion
Figure 2008021210

ここで、被写体の近似平面πに対して、回転変換後のカメラC’のカメラ座標系では、近似平面πとカメラC’との距離dの値は回転変換によって不変であるから、以下の式が成り立つ。
’=d 式(23)
∴n ’/d=1 式(24)
Here, in the camera coordinate system of the camera C ′ after rotation conversion with respect to the approximate plane π of the subject, the value of the distance d between the approximate plane π and the camera C ′ is not changed by rotation conversion. Holds.
n R T M R '= d Equation (23)
∴n R T M R '/ d = 1 Equation (24)

式(24)を、式(20)に代入すると、以下の平面射影変換の式が得られる。

Figure 2008021210
Substituting equation (24) into equation (20) yields the following planar projective transformation equation.
Figure 2008021210

Hをホモグラフィ行列とすると、以下のようになる。

Figure 2008021210
If H is a homography matrix, the result is as follows.
Figure 2008021210

次に、任意点Pのディジタル画像座標を、以下のようにする。
:回転変換後のカメラCにおける任意点Pのディジタル画像座標
’:回転変換後のカメラC’における任意点Pのディジタル画像座標

Figure 2008021210
Next, the digital image coordinates of the arbitrary point P are as follows.
m R : digital image coordinates of the arbitrary point P in the camera C after the rotation conversion m R ': digital image coordinates of the arbitrary point P in the camera C' after the rotation conversion
Figure 2008021210

また、任意点Pの正規化画像座標を、以下のようにする。
:回転変換後の任意点PのカメラCにおける正規化画像座標
’:回転変換後の任意点PのカメラC’における正規化画像座標

Figure 2008021210
Further, the normalized image coordinates of the arbitrary point P are as follows.
x R : normalized image coordinates of the arbitrary point P after rotation conversion in the camera C x R ′: normalized image coordinates of the arbitrary point P after rotation conversion in the camera C ′
Figure 2008021210

これにより、中心射影変換として、以下の式が成立する。

Figure 2008021210
Thus, the following expression is established as the central projective transformation.
Figure 2008021210

式(28)に式(26)及び式(21)式を代入すると、以下の式が導出される。

Figure 2008021210
By substituting Equation (26) and Equation (21) into Equation (28), the following equation is derived.
Figure 2008021210

両辺の3行目を比較すると、s=Zが導かれる。 Comparing the third row on both sides leads to s R = Z R.

これを式(28)に代入すると、以下の式が導出される。

Figure 2008021210
Substituting this into equation (28) yields the following equation:
Figure 2008021210

一方で、式(29)に式(20)を代入すると、以下の式が成立する。

Figure 2008021210
On the other hand, when the formula (20) is substituted into the formula (29), the following formula is established.
Figure 2008021210

式(21)、式(22)、式(1)、式(18)及び式(27)を代入して、以下の式を導出する。

Figure 2008021210
Substituting Equation (21), Equation (22), Equation (1), Equation (18), and Equation (27), the following equation is derived.
Figure 2008021210

両辺の3行目を比較すると、
’=Z’=Z 式(41)
が導かれる。
Comparing the third row on both sides,
s R '= Z R ' = Z R formula (41)
Is guided.

これを、式(29)に代入すると、以下の式が成立する。

Figure 2008021210
Substituting this into equation (29) gives the following equation:
Figure 2008021210

従って、式(23)に代入すると、以下の式が成立する。

Figure 2008021210
Therefore, when substituting into the equation (23), the following equation is established.
Figure 2008021210

式(19)及び式(27)を代入すると、以下の式が成立する。
d=Z(nRx’+nRy’+nRz) 式(31)
Substituting Equation (19) and Equation (27), the following equation is established.
d = Z R (n Rx x R '+ n Ry y R' + n Rz) formula (31)

式(31)を式(13)に代入すると、以下の式が導出される。

Figure 2008021210
Substituting equation (31) into equation (13) yields the following equation:
Figure 2008021210

また、xとxの変換式、及び、x’とx’の変換式を求める。簡単のため、以下のように定義する。

Figure 2008021210
The conversion formula for x and x R, and obtains a conversion equation x 'and x R'. For simplicity, the definition is as follows.
Figure 2008021210

そうすると、式(11)より、以下のようになる。

Figure 2008021210
Then, from the equation (11), the following is obtained.
Figure 2008021210

両辺の3行目を比較すると、以下の式となる。

Figure 2008021210
Comparing the third row on both sides gives the following formula.
Figure 2008021210

これにより、以下の式が成立する。

Figure 2008021210
As a result, the following expression is established.
Figure 2008021210

また、式(32)に式(41)を代入すると、以下の式となり、Z,t,x’,y’からZが導出できる。

Figure 2008021210
Further, by substituting equation (41) into equation (32) becomes a following formula, Z, t, x ', y' can Z R is derived from.
Figure 2008021210

ここで、式(40)において、カメラ座標系座標M及びM’に代えて、正規化画像座標x及びx’を用いると、以下の変換式が得られる。

Figure 2008021210
Here, in the formula (40), 'in place of the normalized image coordinates x R and x R' camera coordinate system coordinates M R and M R With, the conversion equation is obtained.
Figure 2008021210

両辺の3行目を比較すると、s=1が導かれる。 Comparing the third row on both sides leads to s R = 1.

これを式(35)に代入すると、以下の式が成立する。

Figure 2008021210
Substituting this into equation (35) gives the following equation:
Figure 2008021210

更に、ディジタル画像座標m及びm’を用いると、以下の変換式が得られる。

Figure 2008021210
Further, when the digital image coordinates m R and m R ′ are used, the following conversion formula is obtained.
Figure 2008021210

正規化画像座標系における視差ベクトルをDとすると、以下の式が成り立つ。

Figure 2008021210
When the disparity vector in the normalized image coordinate system is D, the following equation is established.
Figure 2008021210

Figure 2008021210
Figure 2008021210

右辺及び左辺の差を求めると、以下の式が成り立つ。

Figure 2008021210
When the difference between the right side and the left side is obtained, the following equation is established.
Figure 2008021210

回転変換した第2の画像の第2のブロックについて、回転変換した第1の画像の中を、以下のDの平行移動をさせて、第1の画像座標(x,y)を原点として以下のLの一次変換行列で変形をさせることにより、第2のブロックに最も類似するような、第1の画像のブロックを探索する。一次変換行列によれば、視差ベクトルと、被写体の(平面に近似された)面の傾きとに基づいてブロックを変形し、ブロックマッチングをすることができる。 For the second block of the rotation-converted second image, the following D translation is performed in the rotation-converted first image, and the first image coordinates (x R , y R ) are used as the origin. A block of the first image that is most similar to the second block is searched by transforming with the following L linear transformation matrix. According to the primary transformation matrix, block matching can be performed by deforming a block based on the parallax vector and the inclination of the surface of the subject (approximate to a plane).

Figure 2008021210
Figure 2008021210

次に、第1のカメラと第2のカメラとを結ぶ直線上をp:qに内分する視点C”からの画像を合成する方法を説明する。   Next, a method for synthesizing an image from the viewpoint C ″ that internally divides the line connecting the first camera and the second camera into p: q will be described.

カメラCのカメラ座標系に対する視点C”の相対的位置ベクトルt”は、以下の値となる。

Figure 2008021210
The relative position vector t ″ of the viewpoint C ″ with respect to the camera coordinate system of the camera C has the following value.
Figure 2008021210

また、任意点Pの視点C”における正規化画像座標をx”とおくと、x”は、xとx'とp:qに内分する点となる。

Figure 2008021210
Further, if the normalized image coordinate at the viewpoint C ″ of the arbitrary point P is x ″, x ″ is a point that is internally divided into x, x ′, and p: q.
Figure 2008021210

視点C”の画像は、第1の画像の各ブロックを、以下のD”の平行移動をさせて、第1の画像座標を原点として以下のL”の一次変換行列で変形をさせることにより、合成することができる。

Figure 2008021210
The image of the viewpoint C ″ is obtained by transforming each block of the first image by the following D ″ parallel transformation and deforming with the following L ″ linear transformation matrix with the first image coordinates as the origin: Can be synthesized.
Figure 2008021210

以下では、具体的な実施例を説明する。   Hereinafter, specific examples will be described.

第1に、同一平面上に無い2台のカメラの画像に対してブロックマッチングを行う場合の実施例を示す。   First, an example in which block matching is performed on images of two cameras that are not on the same plane will be described.

カメラの内部パラメータA及び相対的位置ベクトルtは、事前に得られていることが前提である。簡単のため、以下のように定義する。

Figure 2008021210
It is assumed that the camera internal parameter A and the relative position vector t are obtained in advance. For simplicity, the definition is as follows.
Figure 2008021210

この相対的位置ベクトルtは、2台のカメラが半径Rの円周上に角度θだけ離れて設置してある状況に相当する。   This relative position vector t corresponds to a situation in which two cameras are installed on the circumference of radius R by an angle θ.

まず、カメラCの画像の中の点Mに着目する。点Mのディジタル画像座標mが、以下の値であったとする。

Figure 2008021210
First, attention is focused on the point M 0 in the image of the camera C. Digital image coordinate m 0 of the point M 0 is the following was value.
Figure 2008021210

そこで、正規化画像座標に変換する。点Mの正規化画像座標xは、以下の値になる。

Figure 2008021210
Therefore, it is converted into normalized image coordinates. The normalized image coordinate x 0 of the point M 0 has the following value.
Figure 2008021210

同様にして、カメラCの画像及びカメラC’の画像を、ディジタル画像座標から正規化画像座標に変換する。   Similarly, the image of the camera C and the image of the camera C ′ are converted from the digital image coordinates to the normalized image coordinates.

次に、カメラCの画像及びカメラC’の画像を回転変換する。回転変換行列は、式(16)に基づくと、下記の通りである。

Figure 2008021210
Next, the image of the camera C and the image of the camera C ′ are rotationally converted. The rotation transformation matrix is as follows based on Equation (16).
Figure 2008021210

相対的位置ベクトルは、式(18)に基づき、下記のベクトルに変換される。

Figure 2008021210
The relative position vector is converted into the following vector based on Expression (18).
Figure 2008021210

式(33)に基づき、回転変換する。例えば、点Mは下記の点MR0に変換される。

Figure 2008021210
Based on the equation (33), rotation conversion is performed. For example, the point M 0 is converted into the following point M R0 .
Figure 2008021210

点Mを中心点とする、大きさW×Hのブロックで探索を行うとする。 It is assumed that the search is performed with a block of size W × H with the point M 0 as the center point.

本発明によれば、法線ベクトルn、n、n及び奥行き距離Zを、任意に変化させてブロックマッチングを行う。例えば、n=0、n=1、n=0、Z=R/2の時、回転変換された座標系における、奥行き距離、法線ベクトルは、式(32)及び式(19)を用いて、以下のようになる。

Figure 2008021210
According to the present invention, the normal vector n x, n y, and n z and depth distance Z, the block matching by changing arbitrarily performed. For example, when n x = 0, n y = 1, n z = 0, and Z = R / 2, the depth distance and the normal vector in the rotation-transformed coordinate system are expressed by equations (32) and (19). Is used as follows.
Figure 2008021210

従って、この時の視差ベクトルDは、式(37)より、以下のようになる。

Figure 2008021210
Accordingly, the parallax vector D 0 at this time is as follows from the equation (37).
Figure 2008021210

また、この時の一次変換行列Lは、式(38)より、以下のようになる。

Figure 2008021210
Further, the primary transformation matrix L 0 at this time is as follows from the equation (38).
Figure 2008021210

このとき、ブロックマッチングの誤差が最小であったならば、D及びLが目的の視差ベクトルと一次変換行列であることになる。 At this time, if the error of the block matching is the minimum, D 0 and L 0 are the target disparity vector and the primary transformation matrix.

第2に、同一平面上にあるK台のカメラの画像に対してブロックマッチングを行う場合の実施例を示す。   Second, an example in which block matching is performed on images of K cameras on the same plane will be described.

カメラの内部パラメータA及び相対的位置ベクトルt(第0カメラをベースカメラとして、第0カメラに対する第kカメラの相対的位置ベクトルを示す。k=1〜K−1)は、事前に得られていることが前提である。簡単のため、以下のようであったとする。

Figure 2008021210
The internal parameter A of the camera and the relative position vector t k (representing the relative position vector of the kth camera with respect to the 0th camera, where the 0th camera is the base camera, k = 1 to K−1) are obtained in advance. It is a premise. For simplicity, suppose that it is as follows.
Figure 2008021210

この相対的位置ベクトルtは、K台のカメラがX軸上にΔ間隔で設置してある状況に相当する。 This relative position vector t k corresponds to a situation in which K cameras are are installed at Δ intervals on the X axis.

まず、第0カメラの画像の中の点Mに着目する。点Mのディジタル画像座標mが、以下の値であったとする。

Figure 2008021210
First, focus on the point M 0 in the image of the 0th camera. Digital image coordinate m 0 of the point M 0 is the following was value.
Figure 2008021210

そこで、正規化画像座標に変換する。点Mの正規化画像座標xは、以下の値になる。

Figure 2008021210
Therefore, it is converted into normalized image coordinates. The normalized image coordinate x 0 of the point M 0 has the following value.
Figure 2008021210

同様にして、他のK−1台のカメラの画像を、ディジタル画像座標から正規化画像座標に変換する。   Similarly, the images of the other K-1 cameras are converted from digital image coordinates to normalized image coordinates.

本発明によれば、法線ベクトル(n、n、n)及び奥行き距離Zを、任意に変化させてブロックマッチングを行う。例えば、n=nx0、n=ny0、n=nz0、Z=Zの時、第0カメラの画像の中の点Mに対する第kカメラの画像の対応点の視差ベクトルDは、以下のようになる。

Figure 2008021210
According to the present invention, block matching is performed by arbitrarily changing the normal vector (n x , n y , n z ) and the depth distance Z. For example, when n x = n x0, n y = n y0, n z = n z0, Z = Z 0, disparity vectors of the corresponding point of the k camera images for a point M 0 in the zeroth camera images D k is as follows.
Figure 2008021210

また、第0カメラの画像の中のブロックに対する第kカメラの画像の中のブロックの一次変換行列Lは、以下のようになる。

Figure 2008021210
Further, the primary transformation matrix L k of the block in the image of the kth camera with respect to the block in the image of the 0th camera is as follows.
Figure 2008021210

ここで、法線ベクトル(n、n、n)及び奥行き距離Zは固定したまま(n=nx0、n=ny0、n=nz0、Z=Z)で、各カメラにおいて、Dに基づいて平行移動しLに基づいて一次変換したブロックを比較し、両者(第0カメラの画像と第kカメラの画像の中の対応するブロック同士)の差分を評価する。例えば、最小自乗誤差を求める。 Here, in the normal vector (n x, n y, n z) and depth distance Z remains fixed (n x = n x0, n y = n y0, n z = n z0, Z = Z 0), In each camera, the blocks that are translated based on D k and linearly converted based on L k are compared, and the difference between the two (corresponding blocks in the 0th camera image and the kth camera image) is evaluated. To do. For example, the least square error is obtained.

第0カメラの画像と第kカメラの画像の中の対応するブロック同士の差分の評価値をdとおく。この時、法線ベクトルと奥行き距離の各組合せに対して、以下のように算出する。

Figure 2008021210
The corresponding evaluation value of the difference between blocks in the zeroth camera image and the k camera image is denoted by d k. At this time, the calculation is performed as follows for each combination of the normal vector and the depth distance.
Figure 2008021210

このSを最小化する、法線ベクトルと奥行き距離の組合せが、目的の視差ベクトルと一次変換行列であることになる。   The combination of the normal vector and the depth distance that minimizes S is the target disparity vector and the primary transformation matrix.

第3に、同一平面上に無いK台のカメラの画像に対してブロックマッチングを行う場合の実施例を示す。   Third, an embodiment in which block matching is performed on images of K cameras not on the same plane will be described.

カメラの内部パラメータA及び相対的位置ベクトルt(第0カメラをベースカメラとして、第0カメラに対する第kカメラの相対的位置ベクトルを示す。k=1〜K−1)は、事前に得られていることが前提である。簡単のため、以下のようであったとする。

Figure 2008021210
The internal parameter A of the camera and the relative position vector t k (representing the relative position vector of the kth camera with respect to the 0th camera, where the 0th camera is the base camera, k = 1 to K−1) are obtained in advance. It is a premise. For simplicity, suppose that it is as follows.
Figure 2008021210

この相対的位置ベクトルtは、K台のカメラが半径Rの円周上に角度Θ間隔で設置してある状況に相当する。 This relative position vector t k corresponds to a situation in which K cameras are are installed at an angle Θ intervals on the circumference of radius R.

まず、第0カメラの画像の中の点Mに着目する。点Mのディジタル画像座標mが、以下の値であったとする。

Figure 2008021210
First, focus on the point M 0 in the image of the 0th camera. Digital image coordinate m 0 of the point M 0 is the following was value.
Figure 2008021210

そこで、正規化画像座標に変換する。点Mの正規化画像座標xは、以下の値になる。

Figure 2008021210
Therefore, it is converted into normalized image coordinates. The normalized image coordinate x 0 of the point M 0 has the following value.
Figure 2008021210

同様にして、他のK−1台のカメラの画像を、ディジタル画像座標から正規化画像座標に変換する。   Similarly, the images of the other K-1 cameras are converted from digital image coordinates to normalized image coordinates.

次に、K台のカメラの画像を回転変換する。第0カメラと第kカメラの組合せにおける回転変換行列は、式(16)に基づくと、以下のようになる。

Figure 2008021210
Next, the K camera images are rotationally converted. The rotation transformation matrix in the combination of the 0th camera and the kth camera is as follows based on Equation (16).
Figure 2008021210

第0カメラと第kカメラの組合せにおける相対的位置ベクトルは、式(18)に基づき、下記のベクトルに変換される。

Figure 2008021210
The relative position vector in the combination of the 0th camera and the kth camera is converted into the following vector based on Expression (18).
Figure 2008021210

式(33)に基づき、回転変換する。例えば、点Mは下記の点Mに変換される。

Figure 2008021210
Based on the equation (33), rotation conversion is performed. For example, the point M 0 is converted to a point M k below.
Figure 2008021210

点Mを左上端とするブロックで探索を行うとする。 And performing a search block of a point M 0 and the upper left corner.

本発明によれば、法線ベクトル(n、n、n)及び奥行き距離Zを、任意に変化させてブロックマッチングを行う。例えば、n=0、n=1、n=0、Z=R/2の時、第0カメラと第kカメラの組合せで回転変換された座標系における、奥行き距離、法線ベクトルは、式(32)及び式(19)を用いて、以下のようになる。

Figure 2008021210
According to the present invention, block matching is performed by arbitrarily changing the normal vector (n x , n y , n z ) and the depth distance Z. For example, when n x = 0, n y = 1, n z = 0, and Z = R / 2, the depth distance and normal vector in the coordinate system rotationally transformed by the combination of the 0th camera and the kth camera are Using Equation (32) and Equation (19), the following is obtained.
Figure 2008021210

従って、この時の第0カメラと第kカメラの組合せにおける視差ベクトルDkは、式(37)より、以下のようになる。

Figure 2008021210
Accordingly, the disparity vector D k in the combination of the 0th camera and the kth camera at this time is as follows from the equation (37).
Figure 2008021210

また、この時の第0カメラと第kカメラの組合せにおける一次変換行列Lkは、式(38)より、以下のようになる。

Figure 2008021210
Further, the primary transformation matrix L k in the combination of the 0th camera and the kth camera at this time is as follows from the equation (38).
Figure 2008021210

ここで、法線ベクトル(n、n、n)及び奥行き距離Zは固定したまま(n=0、n=1、n=0、Z=R/2)で、各カメラにおいて、Dに基づいて平行移動しLに基づいて一次変換したブロックを比較し、両者(第0カメラの画像と第kカメラの画像の中の対応するブロック同士)の差分を評価する。例えば、最小自乗誤差を求める。 Here, the normal vector (n x, n y, n z) in and remain depth distance Z was fixed (n x = 0, n y = 1, n z = 0, Z = R / 2), the cameras , The blocks that have been translated based on D k and linearly transformed based on L k are compared, and the difference between the two (corresponding blocks in the image of the 0th camera and the image of the kth camera) is evaluated. For example, the least square error is obtained.

第0カメラの画像と第kカメラの画像の中の対応するブロック同士の差分の評価値をdとおく。この時、法線ベクトルと奥行き距離の各組合せに対して、以下のように算出する。

Figure 2008021210
The corresponding evaluation value of the difference between blocks in the zeroth camera image and the k camera image is denoted by d k. At this time, the calculation is performed as follows for each combination of the normal vector and the depth distance.
Figure 2008021210

このSを最小化する、法線ベクトルと奥行き距離の組合せが、目的の視差ベクトルと一次変換行列であることになる。   The combination of the normal vector and the depth distance that minimizes S is the target disparity vector and the primary transformation matrix.

このとき、ブロックマッチングの誤差が最小であったならば、D及びLが目的の視差ベクトルと一次変換行列であることになる。 At this time, if the error of the block matching is the minimum, D 0 and L 0 are the target disparity vector and the primary transformation matrix.

図10は、2つのカメラによる変形ブロックマッチングの説明図である。   FIG. 10 is an explanatory diagram of modified block matching by two cameras.

図10によれば、各画像について1対1の組み合わせによって、独立に変形ブロックマッチングをする。この場合、組み合わせ毎に、異なる奥行き距離と法線ベクトルとが必要となり、大きい計算量を要する。   According to FIG. 10, the deformed block matching is independently performed for each image by a one-to-one combination. In this case, a different depth distance and normal vector are required for each combination, and a large amount of calculation is required.

図11は、3つ以上のカメラによる変形ブロックマッチングの説明図である。   FIG. 11 is an explanatory diagram of modified block matching using three or more cameras.

図11によれば、1つのベースカメラのブロックに対する他のカメラのブロックとの予測誤差を算出し、その予測誤差の総和が最小となる奥行き距離Z及び単位法線ベクトル(n,n,n)を導出する。1組の奥行き距離及び法線ベクトルによって、全ての画像の対応ブロックのマッチングをとることができる。 According to FIG. 11, a prediction error between one base camera block and another camera block is calculated, and a depth distance Z and a unit normal vector (n x , n y , nz ) is derived. With a set of depth distances and normal vectors, matching of the corresponding blocks of all images can be achieved.

図12は、本発明におけるフローチャートである。   FIG. 12 is a flowchart in the present invention.

(S901)全てのカメラの位置情報を取得する。全てのカメラは、光軸を平行に且つ該光軸に垂直な同一平面上に配置されている。従って、第1のカメラに対する第2のカメラの世界座標系の第1の相対的位置(t,t,t)を取得する。カメラは、移動可能なものであってもよい。カメラ自体が、例えばGPS等の測位機能を備えている場合、その位置情報を受信する。尚、カメラが固定なものであれば、その位置情報は予め登録されているものであってもよい。 (S901) The position information of all cameras is acquired. All the cameras are arranged on the same plane parallel to the optical axis and perpendicular to the optical axis. Accordingly, the first relative position (t x , t y , t z ) of the world coordinate system of the second camera with respect to the first camera is acquired. The camera may be movable. When the camera itself has a positioning function such as GPS, the position information is received. If the camera is fixed, the position information may be registered in advance.

(S902)全てのカメラの画像を取得する。ここで、第1のカメラ及び/又は第2のカメラの光軸がZ軸に平行でない場合に、第1のカメラと第2のカメラの光軸がZ軸に平行となるように、カメラ内部パラメータを用いて、第1のカメラのカメラ座標系座標及び第2のカメラのカメラ座標系座標を変換する。 (S902) All the camera images are acquired. Here, when the optical axes of the first camera and / or the second camera are not parallel to the Z axis, the optical axes of the first camera and the second camera are parallel to the Z axis. Using the parameters, the camera coordinate system coordinates of the first camera and the camera coordinate system coordinates of the second camera are transformed.

(S903)第1のカメラ及び第2のカメラの光軸が第1のカメラと第2のカメラを通る同一平面に対して垂直となるように、カメラ内部パラメータを用いて、第1のカメラ及び第2のカメラに同一の回転変換を加えて、第1のカメラのカメラ座標系座標及び第2のカメラのカメラ座標系座標を変換する。回転変換を表す行列は、以下のものである。

Figure 2008021210
(S903) Using the camera internal parameters, the first camera and the second camera so that the optical axes of the first camera and the second camera are perpendicular to the same plane passing through the first camera and the second camera. The same rotational transformation is applied to the second camera to transform the camera coordinate system coordinates of the first camera and the camera coordinate system coordinates of the second camera. The matrix representing the rotation transformation is as follows.
Figure 2008021210

(S904)被写体上の任意点を決定する。
(S905)任意点を、回転変換を加えた第1の画像に射影した第1の画像座標(x,y)と、任意点を、回転変換を加えた第2の画像に射影した第2の画像座標(x',y')とを導出する。ここで、任意点の画像座標は、正規化画像座標である。
(S906)第1の画像について任意点を含む第1のブロックを選択する。
(S904) An arbitrary point on the subject is determined.
(S905) First image coordinates (x, y) obtained by projecting an arbitrary point to the first image subjected to rotation transformation, and a second image obtained by projecting the arbitrary point to the second image subjected to rotation transformation. Image coordinates (x ′, y ′) are derived. Here, the image coordinates of an arbitrary point are normalized image coordinates.
(S906) A first block including an arbitrary point is selected for the first image.

(S907)以下、S908〜S911を繰り返す。
(S908)任意点の奥行き距離Zを任意に決定する。
(S909)被写体の表面の任意点における単位法線ベクトル(n,n,n)を任意に決定する。
(S907) Hereinafter, S908 to S911 are repeated.
(S908) The depth distance Z of an arbitrary point is arbitrarily determined.
(S909) unit normal vector at any point of the surface of the object (n x, n y, n z) arbitrarily determined.

(S910)ここで、回転変換の結果、新たな奥行き距離Z及び新たな単位法線ベクトル(nRx,nRy,nRz)と、任意の視点の新たな相対的位置(tRx,tRy,0)及び新たな画像座標(x’,y’)が得られたとする。そうすると、視差ベクトルは、以下のものとなる。

Figure 2008021210
一次変換行列は、以下のものである。
Figure 2008021210
(S910) Here, as a result of the rotation transformation, a new depth distance Z R and a new unit normal vector (n Rx , n Ry , n Rz ) and a new relative position (t Rx , t of an arbitrary viewpoint) Ry, 0) and the new image coordinates (x R ', y R' and) was obtained. Then, the disparity vector is as follows.
Figure 2008021210
The primary transformation matrix is:
Figure 2008021210

第1のブロックを、第2の相対的位置(tRx,tRy,0)及び奥行き距離Zに基づく視差ベクトルで移動させ、第1の画像座標(x,y)を原点として、第2の相対的位置(tRx,tRy,0)、奥行き距離Z、単位法線ベクトル(nRx,nRy,nRz)及び第2の画像座標(x',y')に基づく一次変換行列で変形させて、第2の画像のブロックにマッチングさせる。 The first block is moved with a disparity vector based on the second relative position (t Rx , t Ry , 0) and the depth distance Z R , and the first image coordinates (x R , y R ) are used as the origin, Second relative position (t Rx , t Ry , 0), depth distance Z R , unit normal vector (n Rx , n Ry , n Rz ) and second image coordinates (x R ′, y R ′) And is matched with the second image block.

(S911)奥行き距離Z及び単位法線ベクトル(n,n,n)を任意に変更しながら、S907〜S910を繰り返す。そして、移動させ且つ変形させた第1の画像の第1のブロックに最も類似する第2の画像の第2のブロックを探索する。結果的に、奥行き距離Z及び単位法線ベクトル(n,n,n)を導出する。 (S911) depth distance Z and unit normal vector (n x, n y, n z) while arbitrarily changed, repeated S907~S910. Then, the second block of the second image that is most similar to the first block of the first image that has been moved and deformed is searched for. As a result, the depth distance Z and the unit normal vector ( nx , ny , nz ) are derived.

(S912)第1の画像の第1のブロック以外の部分について被写体上の任意点を更に決定し、S904〜S911を繰り返す。最終的に、第1のカメラと第2のカメラとを結ぶ直線上の任意の視点からの画像の全ての部分を生成する。 (S912) An arbitrary point on the subject is further determined for a portion other than the first block of the first image, and S904 to S911 are repeated. Finally, all parts of an image from an arbitrary viewpoint on a straight line connecting the first camera and the second camera are generated.

(S913)第1のカメラと第2のカメラとを結ぶ直線上の任意の視点の内分比に応じて、任意の視点の相対的位置(t'',t'',0)及び画像座標(x'',y'')を決定する。
(S914)奥行き距離Z及び単位法線ベクトル(n,n,n)と、任意の視点の相対的位置(t'',t'',0)及び画像座標(x'',y'')とを用いて、任意の視点からの画像のブロックを生成する。
(S913) The relative position (t x ″, t y ″, 0) of the arbitrary viewpoint according to the internal ratio of the arbitrary viewpoint on the straight line connecting the first camera and the second camera, and Image coordinates (x ″, y ″) are determined.
(S914) depth distance Z and unit normal vector (n x, n y, n z) and the relative position of the arbitrary viewpoints (t x '', t y '', 0) and image coordinates (x '' , Y ″) to generate a block of an image from an arbitrary viewpoint.

図13は、本発明における自由視点画像生成装置の機能構成図である。   FIG. 13 is a functional configuration diagram of the free viewpoint image generation device according to the present invention.

図13によれば、自由視点画像生成装置2は、位置情報取得部21と、画像取得部22と、カメラ座標系座標変換部203と、任意点選択部204と、正規化画像座標導出部205と、ブロック選択部206と、ブロックマッチング部207と、パラメータ決定部208と、マッチング制御部209と、ブロック制御部210と、任意視点パラメータ決定部211と、自由視点画像生成部212とを有する。これら機能部は、コンピュータによって実行されるプログラムによっても実現できる。   According to FIG. 13, the free viewpoint image generation device 2 includes a position information acquisition unit 21, an image acquisition unit 22, a camera coordinate system coordinate conversion unit 203, an arbitrary point selection unit 204, and a normalized image coordinate derivation unit 205. A block selection unit 206, a block matching unit 207, a parameter determination unit 208, a matching control unit 209, a block control unit 210, an arbitrary viewpoint parameter determination unit 211, and a free viewpoint image generation unit 212. These functional units can also be realized by a program executed by a computer.

位置情報取得部21は、全てのカメラの位置情報を取得する。前述した図12のS901と同様の機能を有する。   The position information acquisition unit 21 acquires position information of all cameras. It has the same function as S901 in FIG.

画像取得部22は、全てのカメラから同期した画像を取得する。前述した図12のS902と同様の機能を有する。   The image acquisition unit 22 acquires synchronized images from all cameras. It has the same function as S902 in FIG.

カメラ座標系座標変換部203は、第1のカメラ及び第2のカメラの光軸が第1のカメラと第2のカメラを通る同一平面に対して垂直となるように、カメラ内部パラメータを用いて、第1のカメラ及び第2のカメラに同一の回転変換を加えて、第1のカメラのカメラ座標系座標及び第2のカメラのカメラ座標系座標を変換する。前述した図12のS903と同様の機能を有する。   The camera coordinate system coordinate conversion unit 203 uses the camera internal parameters so that the optical axes of the first camera and the second camera are perpendicular to the same plane passing through the first camera and the second camera. The same rotation transformation is applied to the first camera and the second camera to transform the camera coordinate system coordinates of the first camera and the camera coordinate system coordinates of the second camera. It has the same function as S903 in FIG.

任意点選択部204は、被写体上の任意点を決定する。任意点選択部204は、ブロック制御部210からの指示に応じて、第1の画像の第1のブロック以外の部分について被写体上の任意点を更に決定する。前述した図12のS904と同様の機能を有する。   The arbitrary point selection unit 204 determines an arbitrary point on the subject. The arbitrary point selection unit 204 further determines an arbitrary point on the subject for a portion other than the first block of the first image in response to an instruction from the block control unit 210. It has the same function as S904 in FIG.

正規化画像座標導出部205は、任意点を、回転変換を加えた第1の画像に射影した第1の正規化画像座標(x,y)と、任意点を、回転変換を加えた第2の画像に射影した第2の正規化画像座標(x',y')とを導出する。前述した図12のS905と同様の機能を有する。   The normalized image coordinate deriving unit 205 projects a first normalized image coordinate (x, y) obtained by projecting an arbitrary point onto the first image subjected to rotation transformation, and a second obtained by performing rotation transformation on the arbitrary point. And the second normalized image coordinates (x ′, y ′) projected onto the image. It has the same function as S905 of FIG.

ブロック選択部206は、第1の画像について任意点を含む第1のブロックを選択する。前述した図12のS906と同様の機能を有する。   The block selection unit 206 selects a first block including an arbitrary point for the first image. It has the same function as S906 in FIG.

ブロックマッチング部207は、第1のブロックを、第2の相対的位置(tRx,tRy,0)及び奥行き距離Zに基づく視差ベクトルで移動させ、第1の画像座標(x,y)を原点として、第2の相対的位置(tRx,tRy,0)、奥行き距離Z、単位法線ベクトル(nRx,nRy,nRz)及び第2の画像座標(x',y')に基づく一次変換行列で変形させて、第2の画像のブロックにマッチングさせる。前述した図12のS910と同様である。 The block matching unit 207 moves the first block by a disparity vector based on the second relative position (t Rx , t Ry , 0) and the depth distance Z, and the first image coordinates (x R , y R ) As the origin, second relative position (t Rx , t Ry , 0), depth distance Z, unit normal vector (n Rx , n Ry , n Rz ) and second image coordinates (x R ′, The first transformation matrix based on yR ′) is transformed to match the second image block. This is the same as S910 in FIG.

尚、ブロック選択部206が、第2の画像について任意点を含む第2のブロックを選択する場合、ブロックマッチング部207は、第1の画像を、視差ベクトルで移動させ、第1の画像座標(x,y)を原点として一次変換行列で変形させて、第2の画像の第2のブロックにマッチングさせる。 When the block selection unit 206 selects a second block including an arbitrary point with respect to the second image, the block matching unit 207 moves the first image by a parallax vector, and the first image coordinates ( x R 1 , y R ) is used as an origin, and is transformed with a primary transformation matrix to be matched with the second block of the second image.

パラメータ決定部208は、任意点の奥行き距離Zと、被写体の表面の任意点における単位法線ベクトル(n,n,n)とを任意に決定する。前述した図12のS908及びS909と同様である。 The parameter determining unit 208 arbitrarily determines the depth distance Z of an arbitrary point and the unit normal vector ( nx , ny , nz ) at the arbitrary point on the surface of the subject. This is the same as S908 and S909 of FIG.

マッチング制御部209は、奥行き距離Z及び単位法線ベクトル(n,n,n)を任意に変更しながら、パラメータ決定手段及びブロックマッチング手段を繰り返し制御し、移動させ且つ変形させた第1の画像の第1のブロックに最も類似する第2の画像の第2のブロックを探索し、奥行き距離Z及び単位法線ベクトル(n,n,n)を導出する。前述した図12のS907及びS911と同様である。 The matching control unit 209 repeatedly controls the parameter determination unit and the block matching unit while arbitrarily changing the depth distance Z and the unit normal vector (n x , n y , n z ), and moves and deforms the first unit. The second block of the second image that is most similar to the first block of one image is searched to derive the depth distance Z and the unit normal vector ( nx , ny , nz ). This is the same as S907 and S911 of FIG.

ブロック制御部210は、任意点について、正規化画像座標算出部205と、パラメータ決定部208と、ブロックマッチング部207と、マッチング制御部209とを繰り返す。最終的に、第1のカメラと第2のカメラとを結ぶ直線上の任意の視点からの画像の全ての部分を生成する。前述した図12のS904及びS912と同様である。   The block control unit 210 repeats the normalized image coordinate calculation unit 205, the parameter determination unit 208, the block matching unit 207, and the matching control unit 209 for an arbitrary point. Finally, all parts of an image from an arbitrary viewpoint on a straight line connecting the first camera and the second camera are generated. This is the same as S904 and S912 in FIG.

任意視点パラメータ決定部211は、第1のカメラと第2のカメラとを結ぶ直線上の任意の視点の内分比に応じて、任意の視点の相対的位置(t'',t'',0)及び画像座標(x'',y'')を決定する。前述した図12のS913と同様である。 The arbitrary viewpoint parameter determination unit 211 determines the relative position (t x ″, t y ′) of the arbitrary viewpoint according to the internal division ratio of the arbitrary viewpoint on the straight line connecting the first camera and the second camera. ', 0) and image coordinates (x ″, y ″) are determined. This is the same as S913 in FIG.

自由視点画像生成部212は、奥行き距離Z及び単位法線ベクトル(n,n,n)と、任意の視点の相対的位置(t'',t'',0)及び画像座標(x'',y'')とを用いて、任意の視点からの画像のブロックを生成する。前述した図12のS914と同様である。 The free viewpoint image generation unit 212 includes a depth distance Z and a unit normal vector (n x , n y , n z ), a relative position (t x ″, t y ″, 0) of an arbitrary viewpoint, and an image. A block of an image from an arbitrary viewpoint is generated using the coordinates (x ″, y ″). This is the same as S914 in FIG.

以上、詳細に説明したように、本発明の自由視点画像生成方法、装置及びプログラムによれば、複数のカメラの光軸に対して、被写体の表面が傾いている場合であっても、ブロックマッチングによって視差ベクトルを検出し、その視差ベクトルを用いて任意の視点の画像を生成することができる。第1の画像の第1のブロックを、任意の奥行き距離Zと、被写体の表面の法線の任意の向きnに基づいて移動及び変形をさせながらブロックマッチングをすることにより、視差ベクトルだけでなく、一次変換行列を検出することができる。任意の視点の位置に応じて、視差ベクトル及び一次変換行列を調整することにより、第1の画像の第1のブロックから、現実に近い任意の視点の画像を生成することができる。   As described above in detail, according to the free viewpoint image generation method, apparatus, and program of the present invention, even if the surface of the subject is inclined with respect to the optical axes of a plurality of cameras, block matching is performed. Can detect a disparity vector and generate an image of an arbitrary viewpoint using the disparity vector. By performing block matching while moving and deforming the first block of the first image based on an arbitrary depth distance Z and an arbitrary direction n of the normal of the subject surface, not only the disparity vector The primary transformation matrix can be detected. By adjusting the parallax vector and the primary transformation matrix according to the position of an arbitrary viewpoint, an image of an arbitrary viewpoint close to reality can be generated from the first block of the first image.

前述した本発明における種々の実施形態によれば、当業者は、本発明の技術思想及び見地の範囲における種々の変更、修正及び省略を容易に行うことができる。前述の説明はあくまで例であって、何ら制約しようとするものではない。本発明は、特許請求の範囲及びその均等物として限定するものにのみ制約される。   According to the various embodiments of the present invention described above, those skilled in the art can easily make various changes, modifications and omissions within the scope of the technical idea and the viewpoint of the present invention. The above description is merely an example, and is not intended to be restrictive. The invention is limited only as defined in the following claims and the equivalents thereto.

本発明におけるシステム構成図である。It is a system configuration diagram in the present invention. 図1のシステム構成について、複数のカメラを正面及び側面から見た配置図である。FIG. 2 is a layout view of a plurality of cameras viewed from the front and side in the system configuration of FIG. 1. 図2における各カメラから見た被写体の見え方を表す画面図である。FIG. 3 is a screen diagram showing how a subject is viewed from each camera in FIG. 2. 被写体の表面を横方向斜めに傾けた場合に、各カメラから撮影した画像である。This is an image taken from each camera when the surface of the subject is tilted in the horizontal direction. 被写体の表面を上下方向斜めに傾けた場合に、各カメラから撮影した画像である。This is an image taken from each camera when the surface of the subject is tilted in the vertical direction. 被写体の表面を横方向斜めに傾けて、且つ、上下方向斜めに傾けた場合に、各カメラから撮影した画像である。It is an image taken from each camera when the surface of the subject is tilted obliquely in the horizontal direction and tilted in the vertical direction. 2つのカメラにおける第1の相対位置関係の説明図である。It is explanatory drawing of the 1st relative positional relationship in two cameras. 2つのカメラに回転を加えた第2の相対位置関係の説明図である。It is explanatory drawing of the 2nd relative positional relationship which added rotation to two cameras. カメラCの第1の画像の第1のブロックを、カメラC’の第2の画像の第2のブロックに、ブロックマッチングをさせている説明図である。It is explanatory drawing which made the block matching of the 1st block of the 1st image of the camera C and the 2nd block of the 2nd image of the camera C '. 2つのカメラによる変形ブロックマッチングの説明図である。It is explanatory drawing of the deformation | transformation block matching by two cameras. 3つ以上のカメラによる変形ブロックマッチングの説明図である。It is explanatory drawing of the deformation | transformation block matching by three or more cameras. 本発明におけるフローチャートである。It is a flowchart in this invention. 本発明における自由視点画像生成装置の機能構成図である。It is a functional block diagram of the free viewpoint image generation apparatus in this invention.

符号の説明Explanation of symbols

1 カメラ
2 自由視点画像生成装置
201 位置情報取得部
202 画像取得部
203 カメラ座標系座標変換部
204 任意点選択部
205 正規化画像座標導出部
206 ブロック選択部
207 ブロックマッチング部
208 パラメータ決定部
209 マッチング制御部
210 ブロック制御部
211 任意視点パラメータ決定部
212 自由視点画像生成部
3 被写体
DESCRIPTION OF SYMBOLS 1 Camera 2 Free viewpoint image generation apparatus 201 Position information acquisition part 202 Image acquisition part 203 Camera coordinate system coordinate transformation part 204 Arbitrary point selection part 205 Normalized image coordinate derivation part 206 Block selection part 207 Block matching part 208 Parameter determination part 209 Matching Control unit 210 Block control unit 211 Arbitrary viewpoint parameter determination unit 212 Free viewpoint image generation unit 3 Subject

Claims (11)

光軸をZ軸に平行とする第1のカメラ及び第2のカメラが、第1の相対的位置(t,t,t)(ただし、t≠0)で配置されており、被写体を撮影した第1のカメラの第1の画像と第2のカメラの第2の画像とを用いて、任意の視点の画像を生成する自由視点画像生成方法であって、
第1のカメラ及び第2のカメラの光軸が第1のカメラと第2のカメラを通る同一平面に対して垂直となるように、カメラ内部パラメータを用いて、第1のカメラ及び第2のカメラに同一の回転変換を加えて、第1のカメラのカメラ座標系座標及び第2のカメラのカメラ座標系座標を変換する第1のステップと、
被写体上の任意点を決定する第2のステップと、
前記任意点を、前記回転変換を加えた第1のカメラの第1の画像に射影した第1の画像座標(x,y)と、前記任意点を、前記回転変換を加えた第2のカメラの第2の画像に射影した第2の画像座標(x’,y’)とを導出する第3のステップと、
第1の画像について任意点を含む第1のブロックを選択する第4のステップと、
任意点の奥行き距離Zと、被写体の表面の任意点における単位法線ベクトル(n,n,n)とを任意に決定し、前記回転変換を加えた前記同一平面に対する奥行き距離Zと単位法線ベクトル(nRx,nRy,nRz)を導出する第5のステップと、
第1のブロックを、前記回転変換を加えた第2の相対的位置(tRx,tRy,0)及び奥行き距離Zに基づく視差ベクトルで移動させ、第1の画像座標を原点として、第2の相対的位置(tRx,tRy,0)、奥行き距離Z、単位法線ベクトル(nRx,nRy,nRz)及び第2の画像座標(x’,y’)に基づく一次変換行列で変形させて、第2の画像のブロックにマッチングさせる第6のステップと、
奥行き距離Z及び単位法線ベクトル(n,n,n)を任意に変更しながら、第5及び第6のステップを繰り返し、移動させ且つ変形させた第1の画像の第1のブロックに最も類似する第2の画像の第2のブロックを探索し、奥行き距離Z及び単位法線ベクトル(n,n,n)を導出する第7のステップと、
第1のカメラと第2のカメラとを結ぶ直線上の任意の視点の内分比に応じて、任意の視点の相対的位置(t”,t”,t”)及び画像座標(x”,y”)を決定する第8のステップと、
奥行き距離Z及び単位法線ベクトル(n,n,n)と、任意の視点の相対的位置(t”,t”,t”)及び画像座標(x”,y”)とを用いて、任意の視点からの画像のブロックを生成する第9のステップと
を有することを特徴とする自由視点画像生成方法。
A first camera and a second camera having an optical axis parallel to the Z axis are arranged at a first relative position (t x , t y , t z ) (where t z ≠ 0); A free viewpoint image generation method for generating an image of an arbitrary viewpoint using a first image of a first camera and a second image of a second camera that photograph a subject,
Using the camera internal parameters, the first camera and the second camera are set so that the optical axes of the first camera and the second camera are perpendicular to the same plane passing through the first camera and the second camera. A first step of applying the same rotational transformation to the camera to transform the camera coordinate system coordinates of the first camera and the camera coordinate system coordinates of the second camera;
A second step of determining an arbitrary point on the subject;
First image coordinates (x R , y R ) obtained by projecting the arbitrary point onto the first image of the first camera subjected to the rotation transformation, and a second image obtained by applying the rotation transformation to the arbitrary point. A third step of deriving second image coordinates (x R ′, y R ′) projected onto the second image of the camera of
A fourth step of selecting a first block including an arbitrary point for the first image;
A depth distance Z of an arbitrary point and a unit normal vector ( nx , ny , nz ) at an arbitrary point on the surface of the subject are arbitrarily determined, and the depth distance Z R with respect to the same plane subjected to the rotation transformation And a fifth step of deriving a unit normal vector (n Rx , n Ry , n Rz ),
The first block is moved by a disparity vector based on the second relative position (t Rx , t Ry , 0) and the depth distance Z R to which the rotational transformation is applied, and the first image coordinates are used as the origin and 2 relative positions (t Rx , t Ry , 0), depth distance Z R , unit normal vector (n Rx , n Ry , n Rz ) and second image coordinates (x R ′, y R ′). A sixth step of transforming with a primary transformation matrix based to match a block of the second image;
The first block of the first image in which the depth distance Z and the unit normal vector (n x , n y , n z ) are arbitrarily changed, and the fifth and sixth steps are repeated, moved, and deformed. Searching for a second block of a second image most similar to, and deriving a depth distance Z and unit normal vectors ( nx , ny , nz );
Relative position (t x ″, t y ″, t z ″) of the arbitrary viewpoint and image coordinates (in accordance with the internal ratio of the arbitrary viewpoint on the straight line connecting the first camera and the second camera) an eighth step of determining x ″, y ″);
Depth distance Z and unit normal vector (n x, n y, n z) and the relative position of the arbitrary viewpoints (t x ", t y" , t z ") and image coordinates (x", y ") And a ninth step of generating a block of an image from an arbitrary viewpoint.
第1の画像の第1のブロック以外の部分について被写体上の任意点を更に決定し、第2から第7のステップを繰り返し、
最終的に、第1のカメラと第2のカメラとを結ぶ直線上の任意の視点からの画像の全ての部分を生成する
ことを特徴とする請求項1に記載の自由視点画像生成方法。
An arbitrary point on the subject is further determined for a portion other than the first block of the first image, and the second to seventh steps are repeated,
The free viewpoint image generation method according to claim 1, wherein all parts of an image from an arbitrary viewpoint on a straight line connecting the first camera and the second camera are finally generated.
第1のステップについて、前記回転変換を表す行列は、以下のものであり、
Figure 2008021210
第2のステップについて、任意点の画像座標は、正規化画像座標であり、
前記回転変換の結果、新たな奥行き距離Z及び新たな単位法線ベクトル(nRx,nRy,nRz)と、任意の視点の新たな相対的位置(tRx,tRy,0)及び新たな画像座標(x’,y’)が得られたとし、
第6のステップについて、視差ベクトルは、以下のものであり、
Figure 2008021210
一次変換行列は、以下のものである
Figure 2008021210
ことを特徴とする請求項1又は2に記載の自由視点画像生成方法。
For the first step, the matrix representing the rotational transformation is:
Figure 2008021210
For the second step, the image coordinates of the arbitrary point are normalized image coordinates,
As a result of the rotation transformation, a new depth distance Z R and a new unit normal vector (n Rx , n Ry , n Rz ), a new relative position (t Rx , t Ry , 0) of an arbitrary viewpoint, and Suppose that new image coordinates (x R ', y R ') are obtained,
For the sixth step, the disparity vector is:
Figure 2008021210
The primary transformation matrix is
Figure 2008021210
The method of generating a free viewpoint image according to claim 1 or 2.
第1のカメラ及び/又は第2のカメラの光軸がZ軸に平行でない場合に、第1のステップの前段にあって、
第1のカメラと第2のカメラの光軸がZ軸に平行となるように、カメラ内部パラメータを用いて、第1のカメラのカメラ座標系座標及び第2のカメラのカメラ座標系座標を変換するステップを有する
ことを特徴とする請求項1から3のいずれか1項に記載の自由視点画像生成方法。
When the optical axis of the first camera and / or the second camera is not parallel to the Z axis,
The camera coordinate system coordinates of the first camera and the camera coordinate system coordinates of the second camera are converted using camera internal parameters so that the optical axes of the first camera and the second camera are parallel to the Z axis. The free viewpoint image generation method according to claim 1, further comprising a step of:
3つ以上のカメラが配置された場合であっても、奥行き距離Z及び単位法線ベクトル(n,n,n)は一定であって、
第7のステップにおいて、1つのベースカメラのブロックに対する他のカメラのブロックとの予測誤差を算出し、該予測誤差の総和が最小となる奥行き距離Z及び単位法線ベクトル(n,n,n)を導出する
ことを特徴とする請求項1から4のいずれか1項に記載の自由視点画像生成方法。
Even when three or more cameras are arranged, the depth distance Z and the unit normal vector ( nx , ny , nz ) are constant,
In a seventh step, a prediction error between one base camera block and another camera block is calculated, and a depth distance Z and a unit normal vector (n x , n y , The method of generating a free viewpoint image according to any one of claims 1 to 4, wherein nz ) is derived.
光軸をZ軸に平行とする第1のカメラ及び第2のカメラが、第1の相対的位置(t,t,t)(ただし、t≠0)で配置されており、被写体を撮影した第1のカメラの第1の画像と第2のカメラの第2の画像とを用いて、任意の視点の画像を生成する自由視点画像生成装置であって、
第1のカメラ及び第2のカメラの光軸が第1のカメラと第2のカメラを通る同一平面に対して垂直となるように、カメラ内部パラメータを用いて、第1のカメラ及び第2のカメラに同一の回転変換を加えて、第1のカメラのカメラ座標系座標及び第2のカメラのカメラ座標系座標を変換するカメラ座標系座標変換手段と、
被写体上の任意点を決定する任意点選択手段と、
前記任意点を、前記回転変換を加えた第1のカメラの第1の画像に射影した第1の画像座標(x,y)と、前記任意点を、前記回転変換を加えた第2のカメラの第2の画像に射影した第2の画像座標(x’,y’)とを導出する画像座標算出手段と、
第1の画像について任意点を含む第1のブロックを選択するブロック選択手段と、
任意点の奥行き距離Zと、被写体の表面の任意点における単位法線ベクトル(n,n,n)とを任意に決定し、前記回転変換を加えた前記同一平面に対する奥行き距離Zと単位法線ベクトル(nRx,nRy,nRz)を導出するパラメータ決定手段と、
第1のブロックを、前記回転変換を加えた第2の相対的位置(tRx,tRy,0)及び奥行き距離Zに基づく視差ベクトルで移動させ、第1の画像座標を原点として、第2の相対的位置(tRx,tRy,0)、奥行き距離Z、単位法線ベクトル(nRx,nRy,nRz)及び第2の画像座標(x’,y’)に基づく一次変換行列で変形させて、第2の画像のブロックにマッチングさせるブロックマッチング手段と、
奥行き距離Z及び単位法線ベクトル(n,n,n)を任意に変更しながら、パラメータ決定手段及びブロックマッチング手段を繰り返し制御し、移動させ且つ変形させた第1の画像の第1のブロックに最も類似する第2の画像の第2のブロックを探索し、奥行き距離Z及び単位法線ベクトル(n,n,n)を導出するマッチング制御手段と、
第1のカメラと第2のカメラとを結ぶ直線上の任意の視点の内分比に応じて、任意の視点の相対的位置(t”,t”,t”)及び画像座標(x”,y”)を決定する任意視点パラメータ決定手段と、
奥行き距離Z及び単位法線ベクトル(n,n,n)と、任意の視点の相対的位置(t”,t”,t”)及び画像座標(x”,y”)とを用いて、任意の視点からの画像のブロックを生成する自由視点画像生成手段と
を有することを特徴とする自由視点画像生成装置。
A first camera and a second camera having an optical axis parallel to the Z axis are arranged at a first relative position (t x , t y , t z ) (where t z ≠ 0); A free viewpoint image generation device that generates an image of an arbitrary viewpoint using a first image of a first camera and a second image of a second camera that photograph a subject,
Using the camera internal parameters, the first camera and the second camera are set so that the optical axes of the first camera and the second camera are perpendicular to the same plane passing through the first camera and the second camera. Camera coordinate system coordinate conversion means for converting the camera coordinate system coordinates of the first camera and the camera coordinate system coordinates of the second camera by applying the same rotational transformation to the camera;
Arbitrary point selection means for determining an arbitrary point on the subject;
First image coordinates (x R , y R ) obtained by projecting the arbitrary point onto the first image of the first camera subjected to the rotation transformation, and a second image obtained by applying the rotation transformation to the arbitrary point. Image coordinate calculation means for deriving second image coordinates (x R ′, y R ′) projected onto the second image of the camera of
Block selection means for selecting a first block including an arbitrary point for the first image;
A depth distance Z of an arbitrary point and a unit normal vector ( nx , ny , nz ) at an arbitrary point on the surface of the subject are arbitrarily determined, and the depth distance Z R with respect to the same plane subjected to the rotation transformation And parameter determining means for deriving unit normal vectors (n Rx , n Ry , n Rz ),
The first block is moved by a disparity vector based on the second relative position (t Rx , t Ry , 0) and the depth distance Z R to which the rotational transformation is applied, and the first image coordinates are used as the origin and 2 relative positions (t Rx , t Ry , 0), depth distance Z R , unit normal vector (n Rx , n Ry , n Rz ) and second image coordinates (x R ′, y R ′). A block matching means for deforming with a primary transformation matrix based on and matching with a block of the second image;
While arbitrarily changing the depth distance Z and the unit normal vector (n x , n y , n z ), the parameter determination means and the block matching means are repeatedly controlled to move and deform the first of the first image Matching control means for searching for a second block of the second image most similar to the block and deriving a depth distance Z and a unit normal vector ( nx , ny , nz );
Relative position (t x ″, t y ″, t z ″) of the arbitrary viewpoint and image coordinates (in accordance with the internal ratio of the arbitrary viewpoint on the straight line connecting the first camera and the second camera) arbitrary viewpoint parameter determining means for determining x ″, y ″);
Depth distance Z and unit normal vector (n x, n y, n z) and the relative position of the arbitrary viewpoints (t x ", t y" , t z ") and image coordinates (x", y ") And a free viewpoint image generation means for generating a block of an image from an arbitrary viewpoint.
前記任意点選択手段は、第1の画像の第1のブロック以外の部分について被写体上の任意点を更に決定し、
前記任意点について、画像座標算出手段と、パラメータ決定手段と、ブロックマッチング手段と、マッチング制御手段と、任意視点パラメータ決定手段と、自由視点画像生成手段とを繰り返すブロック制御手段を更に有し、
最終的に、第1のカメラと第2のカメラとを結ぶ直線上の任意の視点からの画像の全ての部分を生成する
ことを特徴とする請求項6に記載の自由視点画像生成装置。
The arbitrary point selecting means further determines an arbitrary point on the subject for a portion other than the first block of the first image;
A block control unit that repeats an image coordinate calculation unit, a parameter determination unit, a block matching unit, a matching control unit, an arbitrary viewpoint parameter determination unit, and a free viewpoint image generation unit for the arbitrary point;
7. The free viewpoint image generation apparatus according to claim 6, wherein all parts of an image from an arbitrary viewpoint on a straight line connecting the first camera and the second camera are finally generated.
前記カメラ座標系座標変換手段について、前記回転変換を表す行列は、以下のものであり、
Figure 2008021210
前記画像座標算出手段は、前記任意点の画像座標として正規化画像座標を導出し、
前記回転変換の結果、新たな奥行き距離Z及び新たな単位法線ベクトル(nRx,nRy,nRz)と、任意の視点の新たな相対的位置(tRx,tRy,0)及び新たな画像座標(x’,y’)が得られたとし、
前記ブロックマッチング手段は前記、視差ベクトルを以下のものとし、
Figure 2008021210
前記一次変換行列を以下のものとする
Figure 2008021210
ことを特徴とする請求項6又は7に記載の自由視点画像生成装置。
For the camera coordinate system coordinate transformation means, the matrix representing the rotation transformation is as follows:
Figure 2008021210
The image coordinate calculation means derives normalized image coordinates as the image coordinates of the arbitrary point,
As a result of the rotation transformation, a new depth distance Z R and a new unit normal vector (n Rx , n Ry , n Rz ), a new relative position (t Rx , t Ry , 0) of an arbitrary viewpoint, and Suppose that new image coordinates (x R ', y R ') are obtained,
The block matching means sets the disparity vector as follows:
Figure 2008021210
The primary transformation matrix is
Figure 2008021210
The free viewpoint image generation device according to claim 6 or 7, characterized in that.
第1のカメラ及び/又は第2のカメラの光軸がZ軸に平行でない場合に、
第1のカメラと第2のカメラの光軸がZ軸に平行となるように、カメラ内部パラメータを用いて、第1のカメラのカメラ座標系座標及び第2のカメラのカメラ座標系座標を変換することを特徴とする請求項6から8のいずれか1項に記載の自由視点画像生成装置。
When the optical axis of the first camera and / or the second camera is not parallel to the Z axis,
The camera coordinate system coordinates of the first camera and the camera coordinate system coordinates of the second camera are converted using camera internal parameters so that the optical axes of the first camera and the second camera are parallel to the Z axis. The free viewpoint image generation device according to any one of claims 6 to 8, wherein:
3つ以上のカメラが配置された場合であっても、奥行き距離Z及び単位法線ベクトル(n,n,n)は一定であって、
第7のステップにおいて、1つのベースカメラのブロックに対する他のカメラのブロックとの予測誤差を算出し、該予測誤差の総和が最小となる奥行き距離Z及び単位法線ベクトル(n,n,n)を導出する
ことを特徴とする請求項6から9のいずれか1項に記載の自由視点画像生成装置。
Even when three or more cameras are arranged, the depth distance Z and the unit normal vector ( nx , ny , nz ) are constant,
In a seventh step, a prediction error between one base camera block and another camera block is calculated, and a depth distance Z and a unit normal vector (n x , n y , nz ) is derived, The free viewpoint image generation device according to any one of claims 6 to 9.
光軸をZ軸に平行とする第1のカメラ及び第2のカメラが、第1の相対的位置(t,t,t)(ただし、t≠0)で配置されており、被写体を撮影した第1のカメラの第1の画像と第2のカメラの第2の画像とを用いて、任意の視点の画像を生成するコンピュータを機能させる自由視点画像生成プログラムであって、
第1のカメラ及び第2のカメラの光軸が第1のカメラと第2のカメラを通る同一平面に対して垂直となるように、カメラ内部パラメータを用いて、第1のカメラ及び第2のカメラに同一の回転変換を加えて、第1のカメラのカメラ座標系座標及び第2のカメラのカメラ座標系座標を変換するカメラ座標系座標変換手段と、
被写体上の任意点を決定する任意点選択手段と、
前記任意点を、前記回転変換を加えた第1のカメラの第1の画像に射影した第1の画像座標(x,y)と、前記任意点を、前記回転変換を加えた第2のカメラの第2の画像に射影した第2の画像座標(x’,y’)とを導出する画像座標算出手段と、
第1の画像について任意点を含む第1のブロックを選択するブロック選択手段と、
任意点の奥行き距離Zと、被写体の表面の任意点における単位法線ベクトル(n,n,n)とを任意に決定し、前記回転変換を加えた前記同一平面に対する奥行き距離Zと単位法線ベクトル(nRx,nRy,nRz)を導出するパラメータ決定手段と、
第1のブロックを、前記回転変換を加えた第2の相対的位置(tRx,tRy,0)及び奥行き距離Zに基づく視差ベクトルで移動させ、第1の画像座標を原点として、第2の相対的位置(tRx,tRy,0)、奥行き距離Z、単位法線ベクトル(nRx,nRy,nRz)及び第2の画像座標(x’,y’)に基づく一次変換行列で変形させて、第2の画像のブロックにマッチングさせるブロックマッチング手段と、
奥行き距離Z及び単位法線ベクトル(n,n,n)を任意に変更しながら、パラメータ決定手段及びブロックマッチング手段を繰り返し制御し、移動させ且つ変形させた第1の画像の第1のブロックに最も類似する第2の画像の第2のブロックを探索し、奥行き距離Z及び単位法線ベクトル(n,n,n)を導出するマッチング制御手段と、
第1のカメラと第2のカメラとを結ぶ直線上の任意の視点の内分比に応じて、任意の視点の相対的位置(t”,t”,t”)及び画像座標(x”,y”)を決定する任意視点パラメータ決定手段と、
奥行き距離Z及び単位法線ベクトル(n,n,n)と、任意の視点の相対的位置(t”,t”,t”)及び画像座標(x”,y”)とを用いて、任意の視点からの画像のブロックを生成する自由視点画像生成手段と
してコンピュータを機能させることを特徴とする自由視点画像生成プログラム。
A first camera and a second camera having an optical axis parallel to the Z axis are arranged at a first relative position (t x , t y , t z ) (where t z ≠ 0); A free viewpoint image generation program for causing a computer that generates an image of an arbitrary viewpoint to function using a first image of a first camera and a second image of a second camera that photograph a subject,
Using the camera internal parameters, the first camera and the second camera are set so that the optical axes of the first camera and the second camera are perpendicular to the same plane passing through the first camera and the second camera. Camera coordinate system coordinate conversion means for converting the camera coordinate system coordinates of the first camera and the camera coordinate system coordinates of the second camera by applying the same rotational transformation to the camera;
Arbitrary point selection means for determining an arbitrary point on the subject;
First image coordinates (x R , y R ) obtained by projecting the arbitrary point onto the first image of the first camera subjected to the rotation transformation, and a second image obtained by applying the rotation transformation to the arbitrary point. Image coordinate calculation means for deriving second image coordinates (x R ′, y R ′) projected onto the second image of the camera of
Block selection means for selecting a first block including an arbitrary point for the first image;
A depth distance Z of an arbitrary point and a unit normal vector ( nx , ny , nz ) at an arbitrary point on the surface of the subject are arbitrarily determined, and the depth distance Z R with respect to the same plane subjected to the rotation transformation And parameter determining means for deriving unit normal vectors (n Rx , n Ry , n Rz ),
The first block is moved by a disparity vector based on the second relative position (t Rx , t Ry , 0) and the depth distance Z R to which the rotational transformation is applied, and the first image coordinates are used as the origin and 2 relative positions (t Rx , t Ry , 0), depth distance Z R , unit normal vector (n Rx , n Ry , n Rz ) and second image coordinates (x R ′, y R ′). A block matching means for deforming with a primary transformation matrix based on and matching with a block of the second image;
While arbitrarily changing the depth distance Z and the unit normal vector (n x , n y , n z ), the parameter determination means and the block matching means are repeatedly controlled to move and deform the first of the first image Matching control means for searching for a second block of the second image most similar to the block and deriving a depth distance Z and a unit normal vector ( nx , ny , nz );
Relative position (t x ″, t y ″, t z ″) of the arbitrary viewpoint and image coordinates (in accordance with the internal ratio of the arbitrary viewpoint on the straight line connecting the first camera and the second camera) arbitrary viewpoint parameter determining means for determining x ″, y ″);
Depth distance Z and unit normal vector (n x, n y, n z) and the relative position of the arbitrary viewpoints (t x ", t y" , t z ") and image coordinates (x", y ") And a free viewpoint image generation program that causes a computer to function as free viewpoint image generation means for generating a block of an image from an arbitrary viewpoint.
JP2006193841A 2006-07-14 2006-07-14 Free viewpoint image generation method, apparatus and program using multi-viewpoint images Expired - Fee Related JP4775903B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006193841A JP4775903B2 (en) 2006-07-14 2006-07-14 Free viewpoint image generation method, apparatus and program using multi-viewpoint images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006193841A JP4775903B2 (en) 2006-07-14 2006-07-14 Free viewpoint image generation method, apparatus and program using multi-viewpoint images

Publications (2)

Publication Number Publication Date
JP2008021210A true JP2008021210A (en) 2008-01-31
JP4775903B2 JP4775903B2 (en) 2011-09-21

Family

ID=39077083

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006193841A Expired - Fee Related JP4775903B2 (en) 2006-07-14 2006-07-14 Free viewpoint image generation method, apparatus and program using multi-viewpoint images

Country Status (1)

Country Link
JP (1) JP4775903B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010119852A1 (en) * 2009-04-14 2010-10-21 学校法人東京理科大学 Arbitrary viewpoint image synthesizing device
JP2010273910A (en) * 2009-05-29 2010-12-09 Sophia Co Ltd Game machine
WO2011148606A1 (en) * 2010-05-28 2011-12-01 Sony Corporation Image processing apparatus and method, and program
WO2013038679A1 (en) 2011-09-13 2013-03-21 パナソニック株式会社 Encoding device, decoding device, playback device, encoding method, and decoding method
CN111815711A (en) * 2020-06-01 2020-10-23 佛山隆深机器人有限公司 Single-camera multi-view calibration method based on robot

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010119852A1 (en) * 2009-04-14 2010-10-21 学校法人東京理科大学 Arbitrary viewpoint image synthesizing device
JP2010273910A (en) * 2009-05-29 2010-12-09 Sophia Co Ltd Game machine
WO2011148606A1 (en) * 2010-05-28 2011-12-01 Sony Corporation Image processing apparatus and method, and program
CN102473321A (en) * 2010-05-28 2012-05-23 索尼公司 Image processing apparatus and method, and program
US9210407B2 (en) 2010-05-28 2015-12-08 Sony Corporation Image processing apparatus and method, and program
WO2013038679A1 (en) 2011-09-13 2013-03-21 パナソニック株式会社 Encoding device, decoding device, playback device, encoding method, and decoding method
US9661320B2 (en) 2011-09-13 2017-05-23 Panasonic Intellectual Property Management Co., Ltd. Encoding device, decoding device, playback device, encoding method, and decoding method
CN111815711A (en) * 2020-06-01 2020-10-23 佛山隆深机器人有限公司 Single-camera multi-view calibration method based on robot
CN111815711B (en) * 2020-06-01 2023-08-18 佛山隆深机器人有限公司 Single-camera multi-view calibration method based on robot

Also Published As

Publication number Publication date
JP4775903B2 (en) 2011-09-21

Similar Documents

Publication Publication Date Title
JP4737763B2 (en) Free viewpoint image generation method, apparatus and program using multi-viewpoint images
JP5762142B2 (en) Imaging apparatus, image processing apparatus and method thereof
JP6223169B2 (en) Information processing apparatus, information processing method, and program
JPH11331874A (en) Image processing unit, depth image measuring device, composite reality presenting system, image processing method, depth image measuring method, composite reality presenting method and storage medium for program
US8441518B2 (en) Imaging apparatus, imaging control method, and recording medium
WO2018179040A1 (en) Camera parameter estimation device, method, and program
JP7116262B2 (en) Image depth estimation method and apparatus, electronic device, and storage medium
WO2018179039A1 (en) Camera parameter estimation device, method, and program
JP4775903B2 (en) Free viewpoint image generation method, apparatus and program using multi-viewpoint images
WO2019093457A1 (en) Information processing device, information processing method and program
JP2011022805A (en) Image processor
WO2009096520A1 (en) Corresponding point search apparatus and corresponding point search method
JP4605716B2 (en) Multi-view image compression encoding method, apparatus, and program
CN109495733B (en) Three-dimensional image reconstruction method, device and non-transitory computer readable storage medium thereof
TWI820246B (en) Apparatus with disparity estimation, method and computer program product of estimating disparity from a wide angle image
JP6061334B2 (en) AR system using optical see-through HMD
JP6040782B2 (en) Image processing apparatus and program
EP3832600A1 (en) Image processing device and three-dimensional measuring system
JP2017028510A (en) Multi-viewpoint video generating device, program therefor, and multi-viewpoint video generating system
JP6278771B2 (en) Projection position determination device and projection position determination program
JP4778569B2 (en) Stereo image processing apparatus, stereo image processing method, and stereo image processing program
WO2015141214A1 (en) Processing device for label information for multi-viewpoint images and processing method for label information
JP2014048896A (en) Distance information estimating apparatus
JP2006197036A (en) Device and method for stereoscopic image display
JP2013196160A (en) Free viewpoint image generation method, device and program using multi-viewpoint images

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090125

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: 20110623

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110623

R150 Certificate of patent or registration of utility model

Ref document number: 4775903

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140708

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees