JPH10116359A - Camera parameter arithmetic unit and image composing device - Google Patents

Camera parameter arithmetic unit and image composing device

Info

Publication number
JPH10116359A
JPH10116359A JP8268985A JP26898596A JPH10116359A JP H10116359 A JPH10116359 A JP H10116359A JP 8268985 A JP8268985 A JP 8268985A JP 26898596 A JP26898596 A JP 26898596A JP H10116359 A JPH10116359 A JP H10116359A
Authority
JP
Japan
Prior art keywords
camera parameter
camera
unit
correction
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP8268985A
Other languages
Japanese (ja)
Inventor
Hidetoshi Nagano
秀敏 永野
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP8268985A priority Critical patent/JPH10116359A/en
Publication of JPH10116359A publication Critical patent/JPH10116359A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To compose three-dimensional CG image generated based on an estimated camera parameter with an animation image by automatically and precisely estimate the camera parameter from the animation image data photographed by a video camera. SOLUTION: A camera parameter setting part 11 sets the camera parameter when the image of the frame is photographed to the first frame of the animation image. The camera parameter predicting part 12 predicts the camera parameter of a next frame from the world coordinate of the feature point of an already known shape object photographed in image data of the next frame and a position within image data of the feature point of the already known shape object. A camera parameter correcting part 13 corrects the camera parameter predicted by the part 12 by using the surface color of the already known shape object copied into image data.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、ビデオカメラ等
で撮影した画像と3次元CG(コンピュータグラフィッ
クス)で生成した画像とを合成する技術に関するもの
で、詳しくは、ビデオカメラ等で撮影された画像のデー
タから撮影時のカメラパラメータを求めるカメラパラメ
ータ演算装置、並びに、撮影された画像のデータから求
めたカメラパラメータを用いて3次元CG画像を生成し
て、撮影画像と3次元CG画像を合成する画像合成装置
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique for synthesizing an image photographed by a video camera or the like and an image generated by three-dimensional CG (computer graphics). A camera parameter calculation device for obtaining a camera parameter at the time of shooting from image data, and a three-dimensional CG image is generated using a camera parameter obtained from data of the shot image, and the shot image and the three-dimensional CG image are synthesized. The present invention relates to an image combining device that performs

【0002】[0002]

【従来の技術】ビデオカメラ等で撮影した静止画や動画
像(以下、撮影画像と記す)と3次元CGで生成した画
像(以下、3次元CG画像と記す)との合成は、映画や
コマーシャルフィルム等での特殊効果を始めとして、映
像製作の現場で幅広く利用されている。特に、動画像の
動きに合せて3次元CG画像を動かすことは、実在しな
いものに現実味と迫力を与えるときなどに良く使われ
る。
2. Description of the Related Art The synthesis of a still image or moving image (hereinafter referred to as a photographed image) photographed by a video camera or the like and an image generated by three-dimensional CG (hereinafter referred to as a three-dimensional CG image) is performed by combining a movie or a commercial. It is widely used in video production sites, including special effects on films and the like. In particular, moving a three-dimensional CG image in accordance with the motion of a moving image is often used to give a non-existent one a reality and power.

【0003】図12は撮像画像と3次元CG画像との合
成例を示す説明図である。図12では、実際に撮影され
たビルの画像に、現実には存在しないロボット(例えば
ビルよりも大きいロボット)を3次元CGで生成して合
成する例を示している。こうした画像合成では、3次元
CG画像を作成する際に用いるカメラパラメータと、撮
影画像を撮影した際のカメラパラメータとを一致させ
て、奥行き感や動きを調和させる必要がある。ここで、
カメラパラメータとは、カメラの位置、向き、焦点距
離、アスペクト比、カメラ位置から投影スクリーンに垂
線を下ろした点の投影座標である。
FIG. 12 is an explanatory diagram showing an example of synthesizing a captured image and a three-dimensional CG image. FIG. 12 shows an example in which a robot that does not actually exist (for example, a robot larger than a building) is generated by three-dimensional CG and combined with an actually captured building image. In such image synthesis, it is necessary to match a camera parameter used when creating a three-dimensional CG image with a camera parameter used when a captured image is captured, so that a sense of depth and movement are harmonized. here,
The camera parameters are the position, orientation, focal length, aspect ratio of the camera, and the projection coordinates of a point drawn perpendicular to the projection screen from the camera position.

【0004】図13はカメラパラメータの不一致による
合成画像の違和感を示す説明図である。図13では、実
在のビルに並べて3次元CGで生成したビルを合成した
例を示している。実在のビルを撮影した際のカメラパラ
メータと3次元CG画像を生成する際のカメラパラメー
タとが一致しない場合、合成画像には違和感が生ずる。
FIG. 13 is an explanatory diagram showing a sense of discomfort of a synthesized image due to mismatch of camera parameters. FIG. 13 shows an example in which buildings generated by three-dimensional CG are combined with real buildings to be combined. If the camera parameters at the time of photographing the real building and the camera parameters at the time of generating the three-dimensional CG image do not match, a sense of incongruity occurs in the composite image.

【0005】このように、動画像(撮影画像)と3次元
CG画像とを遠近感や動きに違和感をもたせることなく
合成するには、動画像を撮影する際のカメラパラメータ
と3次元CGを作成する際のカメラパラメータとを一致
させる必要がある。
As described above, in order to combine a moving image (captured image) and a three-dimensional CG image without giving a sense of perspective and unnatural feeling to the movement, a camera parameter and a three-dimensional CG for capturing the moving image are created. It is necessary to match with the camera parameters when performing.

【0006】そこで、カメラパラメータを測定・記録で
きるカメラを用いて動画像を撮影し、撮影された動画像
の各フレーム毎に記録されたカメラパラメータに基づい
て3次元CGを作成して、動画像(撮影画像)と3次元
CG画像とを合成している。又は、3次元CG画像を生
成する際のカメラパラメータに合せて、動画像を撮影す
るようにしている。
Accordingly, a moving image is photographed using a camera capable of measuring and recording camera parameters, and a three-dimensional CG is created based on the camera parameters recorded for each frame of the photographed moving image, thereby obtaining a moving image. (Captured image) and a three-dimensional CG image. Alternatively, a moving image is shot according to camera parameters used when generating a three-dimensional CG image.

【0007】このような撮影画像と3次元CG画像との
合成に関する技術として、以下に示す技術が知られてい
る。
The following technique is known as a technique for synthesizing such a photographed image and a three-dimensional CG image.

【0008】特開昭61−267182号公報には、角
度、拡大率を変化させながらビデオカメラで撮像した風
景等の映像と、ビデオカメラで撮像した状態に基づいて
コンピュータグラフィックスで作成した3次元モデルを
変化させて得たコンピュータグラフィックス映像とを合
成する映像合成方式が記載されている。
Japanese Unexamined Patent Publication (Kokai) No. 61-267182 discloses a three-dimensional image created by computer graphics based on an image such as a landscape imaged by a video camera while changing the angle and magnification, and a state captured by the video camera. An image synthesis method for synthesizing a computer graphics image obtained by changing a model is described.

【0009】特開平5−181952号公報には、3次
元の動きが自在に行える基台にビデオカメラを搭載する
と共に、このビデオカメラの3次元の位置、方向及び画
角を検出する位置検出装置を基台に取り付け、この位置
検出装置によるビデオカメラの位置データに基づきコン
ピュータ内に3次元のコンピュータグラフィックスの映
像を生成し、このコンピュータグラフィックスによる映
像にビデオカメラで撮影した被写体の映像を合成するよ
うにした実時間合成装置が記載されている。
Japanese Patent Laid-Open Publication No. Hei 5-181952 discloses a position detecting device for mounting a video camera on a base capable of freely moving in three dimensions and detecting the three-dimensional position, direction and angle of view of the video camera. Is mounted on a base, a three-dimensional computer graphics image is generated in the computer based on the position data of the video camera by the position detection device, and the image of the subject photographed by the video camera is synthesized with the computer graphics image. A real-time synthesizing device is described.

【0010】特開平5−183808号公報には、撮影
対象物をモデル化して仮想空間に配置し、撮影時のカメ
ラの位置、方向等のパラメータの検出結果に基づき、モ
デル化した仮想対象物までの奥行きを、そのカメラの撮
影画像の画素毎に演算して、画像中の前後関係を正しく
保ちながら画像を合成するようにした画像合成装置が記
載されている。
Japanese Patent Application Laid-Open No. 5-183808 discloses that an object to be photographed is modeled and arranged in a virtual space, and a modeled virtual object is obtained based on detection results of parameters such as the position and direction of a camera at the time of photographing. An image synthesizing apparatus is described in which the depth of the image is calculated for each pixel of an image captured by the camera, and the images are synthesized while maintaining the correct context.

【0011】特開平7−146501号公報には、広範
な範囲のカメラ移動を扱えるようにするため、操作する
人間が物理的に入力できる範囲を自在に拡大、縮小でき
るスケール機能を持つと共に、撮影対象内の任意の位置
の目標に3次元座標原点を設定する機能を持ち、この原
点に対してスケールを機能させることで、1回の連続し
た操作で、目標の周りの広い空間内の移動経路を一挙に
入力でき、同時に、カメラワークに関する全てのデータ
を、映像が撮影される映像同期毎に収集蓄積することに
より、映像同期毎に描画を行うCGなどにおけるカメラ
ワーク入力地区性装置として使うことを可能にしたカメ
ラワーク入力装置が記載されている。
Japanese Patent Laid-Open Publication No. Hei 7-146501 has a scale function that can freely expand and reduce the range that can be physically input by an operating person in order to handle a wide range of camera movement. It has a function to set the origin of three-dimensional coordinates to a target at an arbitrary position in the target, and by making the scale function with respect to this origin, the movement path in a wide space around the target with one continuous operation Can be input all at once, and at the same time, by collecting and accumulating all data related to camera work every time the video is shot, it can be used as a camera work input locality device in CG etc. that draws every video sync Is described.

【0012】また、静止画像からその静止画像を撮影し
た際のカメラパラメータを推定する方法として、Rod
G.BogartのVIEW CORRELATIO
N法(GRAPHICS GEMS 2,ACADEM
IC PRESS pp181−190)が知られてい
る。このVIEW CORRELATION法は、人間
が画像データ中の特徴点にワールド座標における3次元
座標を対応させ、3次元座標が画像中のどの位置に投影
されるかを5点以上の特徴点について与えることで、カ
メラパラメータを推定するものである。画像データ中の
特徴点としては、図14に示すように、物体の角等の形
状変化点や物体表面上の色が変化する色変化点を用い
る。
A method for estimating camera parameters when a still image is photographed from a still image is described in Rod.
G. FIG. Bogart's VIEW CORRELATIO
N method (GRAPHIICS GEMS 2, ACADEM
IC PRESS pp 181-190) is known. In the VIEW CORRERATION method, a human associates feature points in image data with three-dimensional coordinates in world coordinates, and gives a position in the image at which the three-dimensional coordinates are projected for five or more feature points. , For estimating camera parameters. As feature points in the image data, as shown in FIG. 14, a shape change point such as a corner of an object or a color change point at which a color on the object surface changes is used.

【0013】このVIEW CORRELATION法
を応用して動画像のカメラパラメータを推定することが
考えられる。動画像データを構成する各フレームの画像
データ一枚一枚に対して、VIEW CORRELAT
ION法を用いてカメラパラメータを推定し、各フレー
ム毎に推定されたカメラパラメータに基づいて各フレー
ムに合成する3次元CG画像を生成すれば、動画像と3
次元CG画像とを違和感を与えることなく合成できる。
しかしながら、多数の画像データからなる動画像データ
に対して特徴点のワールド座標を対応させる作業が極め
て膨大となり、効率の点で問題である。
It is conceivable to estimate the camera parameters of a moving image by applying the VIEW CORRELATION method. VIEW CORRELAT is applied to each image data of each frame constituting the moving image data.
If the camera parameters are estimated using the ION method and a three-dimensional CG image to be synthesized with each frame is generated based on the camera parameters estimated for each frame, a moving image and a three-dimensional CG image can be obtained.
It can be synthesized with the dimensional CG image without giving a sense of incongruity.
However, the work of associating the world coordinates of the feature points with moving image data composed of a large number of image data becomes extremely enormous, which is a problem in terms of efficiency.

【0014】そこで、作業量を減らす方法として、動画
像データの最初のフレームに対して人間が特徴点の画像
データ内での位置とワールド座標との対応付けを行い、
後続のフレームについては自動的にカメラパラメータの
推定させることが考えられる。この方法では、最初のフ
レームにおける特徴点が後続のフレームでどのように移
動するかを追跡する。この追跡処理の結果、すべてのフ
レームで特徴点の位置がわかれば、VIEW CORR
ELATION法を適用して全てのフレームのカメラパ
ラメータを推定することができる。
Therefore, as a method of reducing the amount of work, a human associates the position of the feature point in the image data with the world coordinates with respect to the first frame of the moving image data,
It is conceivable to automatically estimate the camera parameters for the subsequent frames. This method tracks how feature points in the first frame move in subsequent frames. As a result of this tracking processing, if the positions of the feature points are known in all the frames, VIEW CORR
The camera parameters of all frames can be estimated by applying the ELATION method.

【0015】図15は動画像を撮影した際のカメラパラ
メータをVIEW CORRELATION法を応用し
て推定する方法のフローチャートである。ステップS1
では、人間(ユーザ)が動画像データの最初のフレーム
の画像データに対して、特徴点の画像データ中での位置
とワールド座標との対応付けを行う。ステップS2で
は、この対応関係を用いてVIEW CORRELAT
ION法を適用し、最初のフレームの画像データに対す
るカメラパラメータを算出する。
FIG. 15 is a flowchart of a method for estimating camera parameters at the time of capturing a moving image by applying the VIEW CORRELATION method. Step S1
Then, a human (user) associates the position of the feature point in the image data with the world coordinates with respect to the image data of the first frame of the moving image data. In step S2, VIEW CORRELAT is performed using this correspondence.
The camera parameters for the image data of the first frame are calculated by applying the ION method.

【0016】ステップS3では、最初のフレームの画像
データから第2フレームの画像データに変わった際に、
特徴点がどこに移動したかを追跡する。この特徴点の追
跡方法には、残差逐次検定法(画像処理ハンドブック,
東京大学出版会,pp708)を用いる。残差逐次検定
法は一般的なパターン照合法であり、現フレームの画像
データにおける特徴点とその隣接ピクセルを参照パター
ンとして、次フレームの画像データ中からこの参照パタ
ーンを探索することにより、特徴点の追跡を行うことが
できる。
In step S3, when the image data of the first frame is changed to the image data of the second frame,
Track where feature points have moved. This feature point tracking method includes a residual sequential test method (Image Processing Handbook,
The University of Tokyo Press, pp 708) is used. The residual sequential test method is a general pattern matching method. The feature point in the image data of the current frame and its neighboring pixels are used as a reference pattern to search for the reference pattern in the image data of the next frame. Tracking can be done.

【0017】ステップS4では、ステップS3の特徴点
の追跡により得られた第2フレームでの特徴点の画像内
での位置と、この特徴点に対してステップS1で対応付
けられたワールド座標を用いてVIEW CORREL
ATION法を適用し、第2フレームのカメラパラメー
タを算出する。以降、ステップS3とステップS4とを
繰り返し行い、動画像データの全てのフレームの画像デ
ータに対するカメラパラメータを算出する。
In step S4, the position in the image of the feature point in the second frame obtained by tracking the feature point in step S3 and the world coordinates associated with this feature point in step S1 are used. VIEW CORREL
The camera parameter of the second frame is calculated by applying the ATION method. Thereafter, steps S3 and S4 are repeated to calculate camera parameters for image data of all frames of the moving image data.

【0018】図15に示した方法によって算出したカメ
ラパラメータに基づいて3次元CG画像を生成して、生
成した3次元CG画像と動画像(撮影画像)とを合成す
ることが原理的には可能である。しかしながら、ステッ
プS3で特徴点の追跡を行っても、追跡結果の特徴点の
位置と実際の特徴点の位置とにずれが生じてしまう。こ
のため、ステップS4でのカメラパラメータの算出結果
に誤差が生じ、動画像(撮影画像)に合ったカメラパラ
メータを推定することができない。よって、図15に示
したカメラパラメータの推定方法を用いて、動画像と3
次元CG画像とを合成することは実用上行われていな
い。
In principle, it is possible to generate a three-dimensional CG image based on the camera parameters calculated by the method shown in FIG. 15 and to combine the generated three-dimensional CG image with a moving image (captured image). It is. However, even if the tracking of the feature points is performed in step S3, a deviation occurs between the positions of the feature points in the tracking result and the actual positions of the feature points. Therefore, an error occurs in the calculation result of the camera parameters in step S4, and it is not possible to estimate a camera parameter suitable for a moving image (captured image). Therefore, using the camera parameter estimation method shown in FIG.
Synthesizing with a dimensional CG image has not been performed practically.

【0019】上述したように、従来の技術では、カメラ
パラメータを測定・記録することのできる特殊な機構を
備えていない一般のカメラで撮影した動画像データに対
して、カメラパラメータの合った3次元CG画像を生成
して合成することはできなかった。
As described above, according to the conventional technique, three-dimensional moving image data obtained by a general camera having no special mechanism capable of measuring and recording camera parameters is used. A CG image could not be generated and combined.

【0020】[0020]

【発明が解決しようとする課題】従来、撮影時のカメラ
パラメータ(カメラの位置、向き、焦点距離、アスペク
ト比、カメラの位置から投影スクリーンに垂線を下ろし
た点の投影座標)と3次元CG画像を生成する際のカメ
ラパラメータとを一致させて、動画像(撮影画像)と3
次元CG画像を合成する場合には、動画像データの撮影
時にカメラパラメータを測定・記録し記録されたカメラ
パラメータに基づいて3次元CG画像を生成するか、3
次元CG画像生成時のカメラパラメータを記録し記録し
たカメラパラメータに基づいて動画像の撮影を行うかの
2通りの方法が用いられていた。
Conventionally, camera parameters (camera position, orientation, focal length, aspect ratio, projection coordinates of a point perpendicular to the projection screen from the camera position) at the time of photographing and a three-dimensional CG image The moving image (captured image) and 3
When synthesizing a three-dimensional CG image, camera parameters are measured and recorded at the time of capturing moving image data, and a three-dimensional CG image is generated based on the recorded camera parameters.
Two methods have been used, in which camera parameters at the time of generating a dimensional CG image are recorded and a moving image is shot based on the recorded camera parameters.

【0021】このため、動画像データを撮影する撮影器
材には、カメラパラメータを測定・記録するための機
構、又は、カメラパラメータに基づいてカメラの動き
(姿勢)を制御する機構が必要であった。カメラパラメ
ータには、焦点距離やアスペクト比、光軸のスクリーン
座標といったカメラ内部のパラメータが含まれるため、
カメラ自体にもカメラパラメータがわかる機構が必要で
ある。
For this reason, a photographing device for photographing moving image data needs a mechanism for measuring and recording camera parameters or a mechanism for controlling the movement (posture) of the camera based on the camera parameters. . Since camera parameters include parameters inside the camera, such as focal length, aspect ratio, and screen coordinates of the optical axis,
The camera itself needs a mechanism to understand the camera parameters.

【0022】したがって、上記2通りの方法では、特殊
な撮影器材の設営が必要である。市販されているビデオ
カメラで撮影された動画像データや過去に撮影された動
画像データに、3次元CG画像を合成することは不可能
である。
Therefore, the above two methods require the installation of special photographing equipment. It is impossible to combine a three-dimensional CG image with moving image data shot by a commercially available video camera or moving image data shot in the past.

【0023】一方、上記2通りの方法とは別に、カメラ
パラメータを静止画像データから推定する方法(VIE
W CORRELATION法)を用いて、動画像デー
タの各フレームにおけるカメラパラメータを推定し、推
定したカメラパラメータを用いて3次元CG画像を生成
し合成する方法が考えられる。
On the other hand, apart from the above two methods, a method of estimating camera parameters from still image data (VIE)
A method of estimating the camera parameters in each frame of the moving image data using the W CORRELATION method, and generating and synthesizing a three-dimensional CG image using the estimated camera parameters is conceivable.

【0024】VIEW CORRELATION法で
は、画像データ中の特徴点(物体の角や物体表面上の色
が変化する点)の位置とワールド座標系における3次元
座標の対応付けが必要であるため、動画像データの各フ
レームの画像データ中の特徴点の位置が必要である。こ
の特徴点の位置を決める方法として、全てのフレームに
亘ってユーザが特徴点の位置を各フレーム毎に指定する
方法と、最初のフレームでユーザが特徴点の位置を指定
し、その後のフレームでは特徴点の追跡を自動的に行わ
せる方法が考えられる。
In the VIEW CORRELATION method, it is necessary to associate the positions of feature points (points at which the corners of an object or a color on the object surface change) in the image data with three-dimensional coordinates in the world coordinate system. The position of the feature point in the image data of each frame of the data is required. As a method of determining the position of the feature point, a method in which the user specifies the position of the feature point for each frame over all frames, and a method in which the user specifies the position of the feature point in the first frame, and in the subsequent frames, A method of automatically tracking feature points can be considered.

【0025】これら2つの方法によれば、原理的には、
市販されているビデオカメラで撮影された動画像データ
に3次元CG画像を合成することが可能である。しか
し、第1の方法は、動画像データの各フレーム毎に人手
が介在するため効率的でない。
According to these two methods, in principle,
It is possible to combine a three-dimensional CG image with moving image data captured by a commercially available video camera. However, the first method is not efficient because manual intervention is required for each frame of moving image data.

【0026】第2の方法では、特徴点の追跡結果のずれ
がカメラパラメータのずれを引き起こし、実用できる精
度のカメラパラメータを推定することができない。
In the second method, the deviation of the tracking result of the feature point causes the deviation of the camera parameter, and it is impossible to estimate the camera parameter with practical accuracy.

【0027】この発明はこのような課題を解決するため
なされたもので、特殊な機構を備えていないカメラで撮
影した動画像データからカメラパラメータを精度良く推
定する技術、並びに、推定したカメラパラメータに基づ
いて3次元CG画像を生成し合成する画像合成技術を提
供することを目的とする。
The present invention has been made to solve such a problem, and a technique for accurately estimating camera parameters from moving image data captured by a camera having no special mechanism. It is an object of the present invention to provide an image synthesis technique for generating and synthesizing a three-dimensional CG image based on the image.

【0028】[0028]

【課題を解決するための手段】前記課題を解決するため
この発明に係るカメラパラメータ演算装置は、入力され
たカメラパラメータ(暫定カメラパラメータ)を画像デ
ータ内に撮影された既知形状物体の表面色を用いて評価
するカメラパラメータ評価部と、このカメラパラメータ
評価部における評価を改善するために非線形最小自乗法
を用いてカメラパラメータを更新する量を算出するカメ
ラパラメータ更新量算出部と、カメラ更新量算出部で算
出されたカメラパラメータ更新量によりカメラパラメー
タを更新するカメラパラメータ更新部と、カメラパラメ
ータ評価部,カメラパラメータ更新量算出部,カメラパ
ラメータ更新部の3つの処理部による反復処理を終了さ
せるカメラパラメータ補正終了判定部とを有することを
特徴とする。
In order to solve the above-mentioned problems, a camera parameter calculation device according to the present invention converts an input camera parameter (temporary camera parameter) into a surface color of a known shape object photographed in image data. A camera parameter estimating unit that evaluates using a camera parameter, a camera parameter updating amount calculating unit that calculates an amount of updating a camera parameter using a nonlinear least squares method in order to improve the evaluation in the camera parameter estimating unit, and a camera updating amount calculating A camera parameter updating unit for updating the camera parameter based on the camera parameter updating amount calculated by the camera unit, and a camera parameter for terminating the iterative processing by the three processing units of the camera parameter evaluating unit, the camera parameter updating amount calculating unit, and the camera parameter updating unit. A correction end determining unit.

【0029】この発明に係るカメラパラメータ演算装置
は、入力されたカメラパラメータの初期値と画像データ
を撮影したときのカメラパラメータとの間の誤差をカメ
ラパラメータ補正部における処理により減少させる。
The camera parameter calculation device according to the present invention reduces an error between the initial value of the input camera parameter and the camera parameter at the time of capturing the image data by processing in the camera parameter correction unit.

【0030】カメラパラメータ補正部に入力されたカメ
ラパラメータは、カメラパラメータ評価部において、既
知形状をもつ物体上の色と現フレームに写されたときの
色の差から評価値を算出する。
With respect to the camera parameters input to the camera parameter correction unit, the camera parameter evaluation unit calculates an evaluation value from a difference between a color on an object having a known shape and a color at the time of being captured in the current frame.

【0031】次にこの評価値を改善するようにカメラパ
ラメータを更新する量をカメラパラメータ更新量算出部
において算出する。
Next, an amount of updating the camera parameters so as to improve the evaluation value is calculated by a camera parameter update amount calculating section.

【0032】カメラパラメータ補正終了判定部は、評価
値と更新量並びにカメラパラメータ補正のためにカメラ
パラメータ補正部内で反復処理を行った回数を用いてカ
メラパラメータの補正を終了するかを判定する。終了し
ない場合には、カメラパラメータ更新部で先に得られた
カメラパラメータ更新量を用いてカメラパラメータを更
新し、再度カメラパラメータ評価部へカメラパラメータ
を入力する。
The camera parameter correction end determining unit determines whether to end the camera parameter correction by using the evaluation value, the update amount, and the number of times the repetition processing is performed in the camera parameter correction unit for camera parameter correction. If not terminated, the camera parameter updating unit updates the camera parameter using the previously obtained camera parameter update amount, and inputs the camera parameter to the camera parameter evaluation unit again.

【0033】一方、終了する場合には、最終的に得られ
ているカメラパラメータの評価値とユーザが予め設定し
たしきい値とを用いて、カメラパラメータの補正が成功
したか失敗したかを判定する。
On the other hand, when the processing is completed, it is determined whether the correction of the camera parameters has succeeded or failed using the finally obtained evaluation value of the camera parameters and a threshold value set in advance by the user. I do.

【0034】[0034]

【発明の実施の形態】以下、この発明の実施の形態を添
付図面に基づいて説明する。図1はこの発明に係る画像
合成装置の全体構成図である。画像合成装置1は、再生
装置2と、記録装置3と、描画・合成装置4と、キーボ
ード5と、ポインティングデバイス6と、画像表示装置
7とからなる。
Embodiments of the present invention will be described below with reference to the accompanying drawings. FIG. 1 is an overall configuration diagram of an image synthesizing apparatus according to the present invention. The image synthesizing device 1 includes a reproducing device 2, a recording device 3, a drawing / synthesizing device 4, a keyboard 5, a pointing device 6, and an image display device 7.

【0035】再生装置2は、ビデオカメラ等で事前に撮
影された動画像データを描画・合成装置4へ供給すると
共に、CG画像を生成するためのCG画像データを描画
・合成装置4へ供給するためのものであり、VTR装
置,メモリ装置,ハードディスク装置,CD−ROM再
生装置等を用いて構成される。動画像データは、離散時
間でサンプリングされた連続画像データである。連続画
像データの一枚一枚をフレームと呼ぶ。再生装置2は、
1フレームずつ再生できる構成としている。
The reproducing apparatus 2 supplies moving image data photographed in advance by a video camera or the like to the drawing / synthesizing apparatus 4 and supplies CG image data for generating a CG image to the drawing / synthesizing apparatus 4. And a VTR device, a memory device, a hard disk device, a CD-ROM playback device, and the like. The moving image data is continuous image data sampled at discrete times. Each piece of continuous image data is called a frame. The playback device 2
It is configured to be able to reproduce one frame at a time.

【0036】記録装置3は、描画・合成装置4から出力
される合成画像(動画像とCG画像との合成画像)を記
録するためのものであり、VTR装置,メモリ装置,ハ
ードディスク装置等を用いて構成される。
The recording device 3 is for recording a composite image (composite image of a moving image and a CG image) output from the drawing / compositing device 4, and uses a VTR device, a memory device, a hard disk device, or the like. It is composed.

【0037】キーボード5は、暫定カメラパラメータ入
力部並びにカメラパラメータ設定部を構成するものであ
る。このキーボード5は、静止画像からその静止画像が
撮影された際のカメラパラメータを求める際に暫定カメ
ラパラメータを入力するため、並びに、動画像からその
動画像が撮影された際のカメラパラメータを求める際の
特定のフレームの画像が撮影されたときのカメラパラメ
ータを入力するためのものである。ポインティングデバ
イス6は、画像表示装置7の画面上に表示された撮影画
像に対してその撮影画像の特徴点を指定するためにもの
である。
The keyboard 5 constitutes a provisional camera parameter input section and a camera parameter setting section. The keyboard 5 is used to input provisional camera parameters when obtaining a camera parameter when a still image is captured from a still image, and when obtaining a camera parameter when the video is captured from a moving image. This is for inputting camera parameters when an image of a specific frame is taken. The pointing device 6 is for specifying a feature point of the captured image displayed on the screen of the image display device 7.

【0038】図2は描画・合成装置のブロック構成図で
ある。描画・合成装置4は、カメラパラメータ演算装置
10と、3次元CG生成部20と、画像合成部30とを
備える。カメラパラメータ演算装置10は、動画像の各
フレームに対してそのフレームの画像が撮影されたとき
のカメラパラメータを求める。求めたカメラパラメータ
は、3次元CG生成部20へ供給される。3次元CG生
成部20は、各フレーム毎に求められたカメラパラメー
タに基づいて3次元CG画像を生成する。生成された3
次元CG画像は、画像合成部30へ供給される。画像合
成部30は、動画像と3次元CG画像とを合成して合成
画像を出力する。
FIG. 2 is a block diagram of the drawing / synthesizing apparatus. The drawing / synthesizing device 4 includes a camera parameter calculating device 10, a three-dimensional CG generating unit 20, and an image synthesizing unit 30. The camera parameter calculation device 10 obtains, for each frame of the moving image, a camera parameter when an image of the frame is captured. The obtained camera parameters are supplied to the three-dimensional CG generation unit 20. The three-dimensional CG generation unit 20 generates a three-dimensional CG image based on the camera parameters obtained for each frame. 3 generated
The dimensional CG image is supplied to the image combining unit 30. The image combining unit 30 combines the moving image and the three-dimensional CG image and outputs a combined image.

【0039】図3は描画・合成装置の動作を示すフロー
チャートである。ステップS11でカメラパラメータ演
算装置10は、ビデオカメラ等で撮影された動画像の画
像データを1フレームずつ読み込むと、ステップS12
でそのフレームが撮影されたときのカメラパラメータを
求める。ステップS13で、3次元CG生成部20は求
めたカメラパラメータに基づいてそのフレームに合成す
る3次元CG画像を生成する。ステップS14で、画像
合成部30は動画像と3次元CG画像とを合成する。描
画・合成装置4は、動画像の各フレーム毎にカメラパラ
メータと求め、求めたパラメータに基づいて3次元CG
画像を生成して、動画像と3次元CG画像とを合成する
ので、合成された位置や遠近感に違和感のない合成画像
を得ることができる。
FIG. 3 is a flowchart showing the operation of the drawing / synthesizing device. In step S11, the camera parameter calculation device 10 reads image data of a moving image captured by a video camera or the like one frame at a time.
Obtains the camera parameters when the frame was shot. In step S13, the three-dimensional CG generating unit 20 generates a three-dimensional CG image to be combined with the frame based on the obtained camera parameters. In step S14, the image combining unit 30 combines the moving image and the three-dimensional CG image. The drawing / synthesizing device 4 obtains camera parameters for each frame of the moving image, and performs three-dimensional CG based on the obtained parameters.
Since the image is generated and the moving image and the three-dimensional CG image are combined, a combined image having no uncomfortable feeling in the combined position or the perspective can be obtained.

【0040】図4はカメラパラメータ演算装置のブロッ
ク構成図である。カメラパラメータ演算装置10は、カ
メラパラメータ設定部11と、カメラパラメータ予測部
12と、カメラパラメータ補正部13とからなる。カメ
ラパラメータ補正部13は、カメラパラメータ評価部1
4と、カメラパラメータ更新量算出部15と、カメラパ
ラメータ更新部16と、カメラパラメータ補正終了判定
部17とを備える。
FIG. 4 is a block diagram of the camera parameter calculation device. The camera parameter calculation device 10 includes a camera parameter setting unit 11, a camera parameter prediction unit 12, and a camera parameter correction unit 13. The camera parameter correction unit 13 includes a camera parameter evaluation unit 1
4, a camera parameter update amount calculation unit 15, a camera parameter update unit 16, and a camera parameter correction end determination unit 17.

【0041】カメラパラメータ設定部11は、動画像の
フレームデータを図示しない画像表示制御装置へ供給し
て、評価対象となるフレームの画像を図1に示した画像
表示装置の画面上に表示させる機能を備えている。
The camera parameter setting section 11 supplies the frame data of the moving image to an image display control device (not shown) to display the image of the frame to be evaluated on the screen of the image display device shown in FIG. It has.

【0042】カメラパラメータ設定部11には、ユーザ
が特徴点のワールド座標を設定するとともに特定フレー
ムの画像内の特徴点の位置又は特定フレームに対するカ
メラパラメータを設定する。なお、特徴点の位置が指定
された場合には、そのフレームのカメラパラメータを特
徴点のワールド座標と画像内での位置から推定する。そ
して、カメラパラメータ設定部11は、特徴点のワール
ド座標と特定フレームのかメラパラメータを出力する。
In the camera parameter setting section 11, the user sets the world coordinates of the feature point and sets the position of the feature point in the image of the specific frame or the camera parameter for the specific frame. When the position of the feature point is designated, the camera parameters of the frame are estimated from the world coordinates of the feature point and the position in the image. Then, the camera parameter setting unit 11 outputs the world coordinates of the feature point and the camera parameters of the specific frame.

【0043】なお、特徴点のワールド座標とカメラパラ
メータは、図1に示したキーボード5を操作することに
より入力される。また、特定フレームの画像内の特徴点
の位置は、図1に示したポインティングデバイス6によ
って入力される。
The world coordinates of the feature points and the camera parameters are input by operating the keyboard 5 shown in FIG. The positions of the feature points in the image of the specific frame are input by the pointing device 6 shown in FIG.

【0044】このカメラパラメータ演算装置10は、複
数のフレームからなる動画像の中で特定のフレームに対
してカメラパラメータを設定すると、他のフレームのカ
メラパラメータを求めることができる。
When the camera parameter calculation device 10 sets camera parameters for a specific frame in a moving image composed of a plurality of frames, the camera parameters of another frame can be obtained.

【0045】そして、 カメラパラメータ予測部12
は、動画像データ、特徴点のワールド座標及び隣接フレ
ームのカメラパラメータを入力として、カメラパラメー
タと特徴点のワールド座標から特徴点の画像内での位置
を算出し、隣接フレームから現フレームへの特徴点位置
の追跡を残差逐次検定法などで行い、現フレームの特徴
点のワールド座標と特徴点位置からカメラパラメータを
View Corelation法などにより予測し、予測したカメラ
パラメータをカメラパラメータ補正部13へ供給する。
The camera parameter prediction unit 12
Calculates the position of the feature point in the image from the camera parameters and the world coordinates of the feature point, using the moving image data, the world coordinates of the feature point, and the camera parameters of the adjacent frame as inputs, and calculates the feature from the adjacent frame to the current frame. The tracking of the point position is performed by the residual sequential test method, etc., and the camera parameters are calculated from the world coordinates of the feature points of the current frame and the feature point positions.
The camera parameters are predicted by the View Corelation method or the like, and the predicted camera parameters are supplied to the camera parameter correction unit 13.

【0046】カメラパラメータ補正部13は、予測され
たカメラパラメータを画像データ内の写し込まれた既知
形状物体の表面色を用いて補正する。カメラパラメータ
補正部13で補正されたカメラパラメータはカメラパラ
メータ設定部11へ供給される。カメラパラメータ設定
部11は、補正されたカメラパラメータをフレームを一
時記憶すると共に、さらに次なるフレームのカメラパラ
メータを予測する際のカメラパラメータの初期値として
カメラパラメータ予測部12へ供給する。このようにし
て、次なるフレームのカメラパラメータを順次求める。
The camera parameter correcting section 13 corrects the predicted camera parameters by using the surface color of the object of known shape in the image data. The camera parameters corrected by the camera parameter correction unit 13 are supplied to the camera parameter setting unit 11. The camera parameter setting unit 11 temporarily stores the corrected camera parameters in the frame, and supplies the corrected camera parameters to the camera parameter prediction unit 12 as initial values of the camera parameters when predicting the camera parameters of the next frame. In this way, the camera parameters of the next frame are sequentially obtained.

【0047】カメラパラメータ評価部14は、画像デー
タ内に撮影された既知形状物体の色を用いてカメラパラ
メータを評価する。このカメラパラメータ評価部14
は、画像データ内の写っている既知形状をもつ物体の表
面のワールド座標とカメラパラメータから、画像データ
内での既知形状をもつ物体の位置を算出し、画像データ
内の算出された位置の色を既知形状物体の色として判断
する既知形状物体色決定部18を備える。カメラパラメ
ータ評価部14は、画像データ内の写っている既知形状
をもつ物体の色が既知の場合に、評価対象のカメラパラ
メータと画像を撮影したときのカメラパラメータとのず
れを表す量として、既知である色と既知形状物体決定部
18によって判断した色との差の自乗和又は自乗和の平
均を用いる。
The camera parameter evaluation section 14 evaluates the camera parameters using the color of the known shape object photographed in the image data. This camera parameter evaluation unit 14
Calculates the position of the object having the known shape in the image data from the world coordinates and the camera parameters of the surface of the object having the known shape in the image data, and calculates the color of the calculated position in the image data. Is determined as the color of the known-shaped object. When the color of an object having a known shape in the image data is known, the camera parameter evaluation unit 14 calculates a known amount as a quantity representing a difference between the camera parameter to be evaluated and the camera parameter at the time of capturing the image. And the average of the sum of squares of the difference between the color and the color determined by the known shape object determination unit 18.

【0048】カメラパラメータ更新量算出部15は、カ
メラパラメータ評価部14における評価を改善するため
に非線形自乗法を用いてカメラパラメータを更新する量
を算出する。
The camera parameter update amount calculator 15 calculates the amount of camera parameter update using the nonlinear square method in order to improve the evaluation in the camera parameter evaluator 14.

【0049】カメラパラメータ更新部16は、カメラパ
ラメータ更新量算出部15で算出されたカメラパラメー
タ更新量によりカメラパラメータを更新する。
The camera parameter update unit 16 updates the camera parameters based on the camera parameter update amount calculated by the camera parameter update amount calculation unit 15.

【0050】カメラパラメータ補正終了判定部17は、
カメラパラメータ評価部14で算出したカメラパラメー
タの評価値とユーザが設定した第1の許容誤差とを比較
し、評価値が第1の許容誤差よりも小さい場合にカメラ
パラメータの補正を終了する。また、カメラパラメータ
補正終了判定部17は、カメラパラメータ更新量算出部
15で算出したカメラパラメータの更新量とユーザが設
定した最小更新量とを比較し、更新量が最新更新量より
も小さい場合にカメラパラメータの補正を終了すると判
断する。
The camera parameter correction end determining section 17
The evaluation value of the camera parameter calculated by the camera parameter evaluation unit 14 is compared with a first allowable error set by the user, and when the evaluation value is smaller than the first allowable error, the correction of the camera parameter is ended. Further, the camera parameter correction end determining unit 17 compares the update amount of the camera parameter calculated by the camera parameter update amount calculation unit 15 with the minimum update amount set by the user, and when the update amount is smaller than the latest update amount. It is determined that the correction of the camera parameters is completed.

【0051】さらに、このカメラパラメータ補正終了判
定部17は、カメラパラメータの補正を終了すると判定
した際に、カメラパラメータ評価部14で算出したカメ
ラパラメータの評価値がユーザが設定した第2の許容誤
差を越えている場合は、カメラパラメータの補正に失敗
したと判定するカメラパラメータ補正失敗判定部19を
備えている。そして、このカメラパラメータ補正終了判
定部17は、カメラパラメータの補正が失敗したと判定
された場合には、補正が失敗したカメラパラメータの修
正をユーザへ要求するためのパラメータ修正要求を発生
するよう構成している。
Further, when the camera parameter correction end determining section 17 determines that the camera parameter correction is to be ended, the camera parameter evaluation value calculated by the camera parameter evaluation section 14 is replaced by the second allowable error set by the user. When the number of camera parameters exceeds the limit, a camera parameter correction failure determination unit 19 that determines that the correction of the camera parameter has failed is provided. When it is determined that the correction of the camera parameter has failed, the camera parameter correction end determination unit 17 generates a parameter correction request for requesting the user to correct the camera parameter whose correction has failed. doing.

【0052】図5はカメラパラメータ演算装置の全体動
作を示すフローチャートである。ステップS21では、
カメラパラメータ補正部13でカメラパラメータの補正
終了を判断する際の用いる第1の許容誤差、最小更新
量、第2の許容誤差、並びに、最大反復回数の入力がユ
ーザによってなされる。
FIG. 5 is a flowchart showing the overall operation of the camera parameter calculation device. In step S21,
The user inputs the first permissible error, the minimum update amount, the second permissible error, and the maximum number of repetitions used when the camera parameter correction unit 13 determines the end of the correction of the camera parameter.

【0053】ステップS22では、ユーザが動画像デー
タの最初の画像データにおいて、既知形状物体上の特徴
点(図14に示す物体の角などの形状変化による特徴点
や物体表面上の色が変化する点)について、画像データ
中での位置とワールド座標系における3次元座標との対
応付けを行う。ステップS23では、VIEW COR
RELATION法を用いて、特徴点の位置とそのワー
ルド座標からカメラパラメータを算出する。ステップS
24では、特徴点のワールド座標を前フレームのカメラ
パラメータで変換し、前フレームの画像内の特徴点の位
置を修正する。ステップS25では、修正された前フレ
ームの画像内の特徴点に対応する現フレームの画像内の
特徴点の位置を求める。ステップS26では、ステップ
S25の処理の結果得られた現フレームの画像における
特徴点の位置とその特徴点にステップS22で対応付け
られたワールド座標からカメラパラメータを算出する。
In step S22, in the first image data of the moving image data, the user changes a feature point on a known shape object (a feature point due to a shape change such as a corner of the object shown in FIG. 14 or a color on the object surface). (Point), the position in the image data is associated with the three-dimensional coordinates in the world coordinate system. In step S23, VIEW COR
The camera parameters are calculated from the positions of the feature points and their world coordinates using the RELECTION method. Step S
At 24, the world coordinates of the feature point are converted by the camera parameters of the previous frame, and the position of the feature point in the image of the previous frame is corrected. In step S25, the position of a feature point in the current frame image corresponding to the corrected feature point in the previous frame image is obtained. In step S26, the camera parameters are calculated from the positions of the feature points in the image of the current frame obtained as a result of the processing in step S25 and the world coordinates associated with the feature points in step S22.

【0054】ステップS27では、ステップS26で算
出されたカメラパラメータの補正を行う。ステップS2
4〜ステップS27の各処理は、動画像データの各フレ
ームに対して実行される。
In step S27, the camera parameters calculated in step S26 are corrected. Step S2
The processes from 4 to S27 are executed for each frame of the moving image data.

【0055】図5に示したこの発明に係るカメラパラメ
ータ演算装置の処理と図15に示した従来技術の組合せ
によるカメラパラメータの推定方法との違いは、ステッ
プS21とステップS26の有無である。特に、本発明
ではステップS26に示したカメラパラメータ補正部に
よる処理によって、カメラパラメータ推定の精度を向上
させることができる。
The difference between the processing of the camera parameter calculation device according to the present invention shown in FIG. 5 and the method of estimating camera parameters by the combination of the prior art shown in FIG. 15 is the presence or absence of steps S21 and S26. In particular, in the present invention, the accuracy of camera parameter estimation can be improved by the processing by the camera parameter correction unit shown in step S26.

【0056】図6はカメラパラメータ補正部の動作を示
すフローチャートである。カメラパラメータ補正部13
は、ステップS31〜ステップS34の処理を反復する
ことで、カメラパラメータの補正を行う。まず、ステッ
プS31では、カメラパラメータの評価値を算出する。
ステップS32では、ステップS31で求めたカメラパ
ラメータの評価値が最小になるようにカメラパラメータ
を更新する量を算出する。ステップS33では、図5の
ステップS21で既に設定済みの第1の許容誤差、最小
更新量、第2の許容誤差、並びに、最大反復回数を用い
て、カメラパラメータの補正が終了したかどうかを判定
する。
FIG. 6 is a flowchart showing the operation of the camera parameter correction unit. Camera parameter correction unit 13
Performs the correction of the camera parameters by repeating the processing of steps S31 to S34. First, in step S31, an evaluation value of a camera parameter is calculated.
In step S32, the amount of updating the camera parameter is calculated so that the evaluation value of the camera parameter obtained in step S31 is minimized. In step S33, it is determined whether the correction of the camera parameters has been completed using the first allowable error, the minimum update amount, the second allowable error, and the maximum number of repetitions already set in step S21 in FIG. I do.

【0057】第1の許容誤差及び最小更新量は、カメラ
パラメータの補正が十分に行われたかを判定するために
用いられる。最大反復回数は、カメラパラメータ補正部
13におけるステップS31〜ステップS34の反復処
理回数の最大値であり、これ以上の反復は行わない。第
2の許容誤差は、カメラパラメータの補正が終了した際
にカメラパラメータ補正が正しく行われたかを判定する
ために用いられる。
The first allowable error and the minimum update amount are used to determine whether the camera parameters have been sufficiently corrected. The maximum number of repetitions is the maximum value of the number of repetitions of steps S31 to S34 in the camera parameter correction unit 13, and no further repetition is performed. The second allowable error is used to determine whether the camera parameter correction has been correctly performed when the camera parameter correction has been completed.

【0058】ステップS33では、以上の4つの値(第
1の許容誤差、最小更新量、第2の許容誤差、並びに、
最大反復回数)を用いて、カメラパラメータの終了判定
を行う。カメラパラメータの補正が終了したと判定する
のは、 (1)カメラパラメータの評価値が第1の許容誤差より
も小さい場合 (2)カメラパラメータの更新量が最小更新量よりも小
さい場合 (3)カメラパラメータ補正部13において、ステップ
S31〜ステップS34の反復処理回数が最大反復回数
を越えた場合 の3通りである。
In step S33, the above four values (first allowable error, minimum update amount, second allowable error, and
The end of the camera parameter is determined using the maximum number of repetitions. It is determined that the correction of the camera parameter is completed. (1) When the evaluation value of the camera parameter is smaller than the first allowable error (2) When the update amount of the camera parameter is smaller than the minimum update amount (3) In the camera parameter correction unit 13, there are three cases in which the number of repetition processes in steps S31 to S34 exceeds the maximum number of repetitions.

【0059】ただし、(1)の終了条件以外でカメラパ
ラメータの補正を終了する場合には、カメラパラメータ
の補正が失敗していることがある。この理由については
後述するが、ステップS33では第2の許容誤差を用い
て補正が失敗したことを検知する。カメラパラメータの
評価値が第2の許容誤差よりも大きい場合には、カメラ
パラメータの補正が失敗したと判定し、図5のステップ
S22及びステップS23の処理を通して、補正に失敗
したカメラパラメータの修正をユーザに要求する。
However, when the correction of the camera parameters is terminated under conditions other than the termination condition (1), the correction of the camera parameters may have failed. Although the reason for this will be described later, it is detected in step S33 that the correction has failed using the second allowable error. When the evaluation value of the camera parameter is larger than the second allowable error, it is determined that the correction of the camera parameter has failed, and the correction of the camera parameter that has failed to be corrected is performed through the processing of steps S22 and S23 in FIG. Ask the user.

【0060】一方、前記3通りの終了条件のうち、どの
条件も満たさない場合には、カメラパラメータの補正は
終了しない。この場合にはステップS34で、ステップ
S32で算出したカメラパラメータの更新量によるカメ
ラパラメータの更新を行い、ステップS31へ戻ってカ
メラパラメータの補正を続行する。
On the other hand, if none of the three end conditions is satisfied, the correction of the camera parameters does not end. In this case, in step S34, the camera parameter is updated based on the update amount of the camera parameter calculated in step S32, and the process returns to step S31 to continue the correction of the camera parameter.

【0061】次に、カメラパラメータの評価について説
明する。この発明におけるカメラパラメータの評価方法
は、動画像データに撮影された物体の色が撮影中に急激
に変化しないと仮定している。この仮定から物体の表面
上で対応する点、つまり、ワールド座標の同じ点の色
は、動画像データ中の隣接するフレームにおいてほぼ一
致することになる。ネオンなど発光体が明滅する場合や
鏡など特殊な物体を除けば、この仮定はほぼ成立する。
Next, evaluation of camera parameters will be described. The camera parameter evaluation method according to the present invention assumes that the color of an object photographed in moving image data does not change rapidly during photographing. Based on this assumption, the color of the corresponding point on the surface of the object, that is, the color of the same point in the world coordinates substantially matches in the adjacent frame in the moving image data. This assumption is almost satisfied except when the luminous body such as neon blinks or a special object such as a mirror.

【0062】図7は中心投影による座標変換の変換式を
示す説明図、図8はカメラモデルを示す説明図である。
既知形状物体の表面上の点は、そのワールド空間におけ
る3次元座標とカメラパラメータとから画像データ上の
どの位置に投影されるかが算出できる。この算出式は、
図7に示す式1である。式1は、図8に示すカメラモデ
ルから導かれる。
FIG. 7 is an explanatory view showing a conversion formula of coordinate conversion by central projection, and FIG. 8 is an explanatory view showing a camera model.
From the three-dimensional coordinates in the world space and the camera parameters, it is possible to calculate at which position on the image data a point on the surface of the known shape object is projected. This formula is:
Equation 1 shown in FIG. Equation 1 is derived from the camera model shown in FIG.

【0063】カメラモデルはカメラの中心とスクリーン
とからなり、物体上の点P=(x,y,z)は、点Pと
カメラの中心とを結んだ直線とスクリーンの交点に投影
される。カメラパラメータは、カメラの中心の位置P
c、物体の3次元座標を与える座標系のx,y平面をス
クリーンと平行に回転する回転行列R、カメラの中心か
らスクリーンに垂線を下ろした点の投影座標(Xc,Y
c)、及び、スクリーンにおける投影座標の座標軸方向
での拡大率Xz,Yzからなる。このカメラモデルによ
り、物体上の点P=(x,y,z)は、投影座標(X,
Y)に投影される。この(X,Y)が画像データにおけ
る位置である。
The camera model is composed of the center of the camera and the screen, and a point P = (x, y, z) on the object is projected on the intersection of a straight line connecting the point P and the center of the camera with the screen. The camera parameter is the position P of the center of the camera.
c, a rotation matrix R for rotating the x, y planes of the coordinate system giving the three-dimensional coordinates of the object parallel to the screen, and projected coordinates (Xc, Y) of a point perpendicular to the screen from the center of the camera.
c) and enlargement factors Xz, Yz in the coordinate axis direction of the projected coordinates on the screen. According to this camera model, a point P = (x, y, z) on the object is projected at coordinates (X, y, z).
Y). This (X, Y) is the position in the image data.

【0064】図9は既知形状物体表面色決定部の動作を
示す説明図である。図9に示すように、既知形状物体の
モデルをワールド座標上に作成し、式1を用いれば、物
体表面上の点Pのワールド座標とカメラパラメータとか
ら画像データ内での位置P’を計算できる。式1に用い
たカメラパラメータが画像データを撮影したときのカメ
ラパラメータと一致していれば、画像データ内での点
P’の色は、既知形状物体の表面色となる。
FIG. 9 is an explanatory diagram showing the operation of the known-shaped object surface color determination unit. As shown in FIG. 9, a model of a known-shaped object is created on world coordinates, and by using Equation 1, a position P ′ in image data is calculated from world coordinates and camera parameters of a point P on the object surface. it can. If the camera parameters used in Equation 1 match the camera parameters used when the image data was captured, the color of the point P ′ in the image data is the surface color of the known shape object.

【0065】カメラパラメータの補正を行う際には、必
ず隣接するフレームのうちどちらか一方のカメラパラメ
ータが既知なので、式1を用いて得られる既知形状物体
の表面色を求めることができる。もう一方のフレームに
おいても、仮のカメラパラメータを用いて既知形状物体
の表面色を求め、得られた2つの表面色の間に大きな差
があれば、仮のカメラパラメータは画像データに合って
いないことがわかる。
When correcting the camera parameters, since one of the camera parameters of the adjacent frames is always known, the surface color of the known-shaped object obtained by using Equation 1 can be obtained. In the other frame as well, the surface color of the known shape object is obtained using the temporary camera parameters, and if there is a large difference between the obtained two surface colors, the temporary camera parameters do not match the image data. You can see that.

【0066】本発明では、既知形状物体の表面上の多数
の点について、隣接フレームから得た表面色の差の自乗
平均(又は自乗和)をカメラパラメータの評価値として
求め、この評価値がどのくらい小さいかによってカメラ
パラメータの評価を行う。
In the present invention, for a number of points on the surface of a known-shaped object, the root mean square (or the sum of squares) of the surface color differences obtained from adjacent frames is obtained as an evaluation value of a camera parameter. The camera parameters are evaluated depending on whether they are small.

【0067】図10はカメラパラメータ評価部の動作を
示す説明図である。カメラパラメータ評価部14は、既
知形状物体の3次元モデルとカメラパラメータ予測部1
2から供給されるカメラパラメータとに基づいて既知形
状物体の投影画像を生成し、生成した既知形状物体の投
影画像の各画素の投影座標点(Xi,Yi)の色データ
(Ri,Gi,Bi)と、実際のビデオカメラ等を用い
て撮影されたフレーム画像における同じ座標点の画素の
色データR((Xi,Yi),G(Xi,Yi),B
(Xi,Yi))との差を求め、各画素毎に差の自乗値
を演算すると共に、各画素の差の自乗平均(又は自乗
和)を演算する。
FIG. 10 is an explanatory diagram showing the operation of the camera parameter evaluation unit. The camera parameter evaluation unit 14 includes a three-dimensional model of the known shape object and the camera parameter prediction unit 1
2, a projection image of the known-shaped object is generated based on the camera parameters supplied from the camera 2 and the color data (Ri, Gi, Bi) of the projection coordinate point (Xi, Yi) of each pixel of the generated projection image of the known-shaped object. ) And the color data R ((Xi, Yi), G (Xi, Yi), B) of the pixel at the same coordinate point in the frame image captured using the actual video camera or the like.
(Xi, Yi)), a square value of the difference is calculated for each pixel, and a mean square (or a sum of squares) of the difference of each pixel is calculated.

【0068】なお、既知形状物体は、予めその3次元形
状モデルとワールド座標系での存在位置が定義されてい
る。
Note that the known shape object has its three-dimensional shape model and its existing position in the world coordinate system defined in advance.

【0069】また、図10では色をRGB空間のデータ
として表現したが、CMY空間、HSL空間、HSV空
間、XYZ空間、Luv空間、YUV空間、YIQ空
間、YCbCr空間における色としてもよい。
Although the colors are represented as data in the RGB space in FIG. 10, colors in the CMY space, the HSL space, the HSV space, the XYZ space, the Luv space, the YUV space, the YIQ space, and the YCbCr space may be used.

【0070】カメラパラメータの評価値は、カメラパラ
メータに対して非線形な値であり、評価値が既知形状物
体上の各点における色の差の自乗平均(又は自乗和)で
あるので、非線形最小自乗法によってカメラパラメータ
の評価値を極小とするカメラパラメータを求める。
The evaluation value of the camera parameter is a non-linear value with respect to the camera parameter, and the evaluation value is a root mean square (or a sum of squares) of the color differences at each point on the known shape object. A camera parameter that minimizes the evaluation value of the camera parameter is obtained by a multiplication method.

【0071】本実施例では、非線形最小自乗法問題を解
く方法として、Levenberg−Marquard
t法(W.H.Press et al.Numeri
cal Recipes in C:The Art
of ScientificComputing,2n
d edition,Cambridge Univ.
Press)を用いている。もちろん、非線形最小自乗
法の解法はこの方法に限定されるものではない。非線形
最小自乗法をパラメータの更新と評価値の算出を交互に
行い、パラメータの更新量が小さくなるか、評価値が0
に十分近づいた場合に終了する。カメラパラメータの更
新量は、非線形最小自乗法に基づいて算出される。
In this embodiment, as a method for solving the nonlinear least squares problem, Levenberg-Marquard is used.
t method (WH Press et al. Numeri)
cal Recipes in C: The Art
of ScientificComputing, 2n
d edition, Cambridge Univ.
Press). Of course, the solution of the nonlinear least squares method is not limited to this method. The parameter update and the calculation of the evaluation value are alternately performed by the non-linear least squares method, and the parameter update amount becomes small or the evaluation value becomes 0.
It ends when it approaches sufficiently. The update amount of the camera parameter is calculated based on the nonlinear least squares method.

【0072】図11は非線形最小自乗法を用いてカメラ
パラメータを更新する処理を示す説明図である。カメラ
パラメータの評価値を隣接フレームから得た表面色の差
の自乗和とすると、評価値Eは図11中の式2で示され
る。(自乗平均の場合には物体表面でサンプルした点数
Nで、式2に示した評価値Eを除算すれば良い。)ただ
し、Nは物体表面でサンプルされた点数であり、(Rp
i,Gpi,Bpi)はカメラパラメータを推定する画
像において仮のカメラパラメータを用いて得られて既知
形状物体のモデル上の点Piの色である。また、(R
i,Gi,Bi)は、既にカメラパラメータがわかって
いる画像において、既知のカメラパラメータを用いて得
られた既知形状物体のモデル上の点Piの色である。ま
た、akはk番目のカメラパラメータである。akにお
けるカメラパラメータの順番は計算の都合上定めるもの
で、順位による推定結果への影響はない。
FIG. 11 is an explanatory diagram showing a process for updating camera parameters using the nonlinear least squares method. Assuming that the evaluation value of the camera parameter is the sum of squares of the difference between the surface colors obtained from the adjacent frames, the evaluation value E is expressed by Expression 2 in FIG. (In the case of the root mean square, the evaluation value E shown in Expression 2 may be divided by the number N of points sampled on the object surface.) However, N is the number of points sampled on the object surface, and (Rp
i, Gpi, Bpi) is the color of the point Pi on the model of the known shape object obtained by using the temporary camera parameters in the image for estimating the camera parameters. Also, (R
i, Gi, Bi) is the color of the point Pi on the model of the known-shaped object obtained using the known camera parameters in the image whose camera parameters are already known. Ak is a k-th camera parameter. The order of the camera parameters in ak is determined for convenience of calculation, and the order does not affect the estimation result.

【0073】Levenberg−Marquardt
法の処理によって算出されるカメラパラメータの更新量
Δaは図11中の式3で示される。式3で用いる偏微分
値は式4に示すように画像の濃度勾配とカメラパラメー
タによる投影座標の偏微分値との積として求める。画像
の濃度勾配は画像データから得られる。カメラパラメー
タによる投影座標の偏微分値は式1をカメラパラメータ
で微分することで得ることができる。λは収束度合に応
じて変化する安定化パラメータであり、評価値Eが前回
の評価に比べ小さくなった場合にはλを小さくし、カメ
ラパラメータを更新する。評価値が前回の評価値よりも
大きくなった場合にはλを大きくし、カメラパラメータ
は前回のカメラパラメータのままとする。本実施例で
は、λの初期値を100.0とし、評価値が前回よりも
小さくなった場合にはλを1/3倍し、大きくなった場
合には3倍にしている。
Levenberg-Marquardt
The update amount Δa of the camera parameter calculated by the processing of the method is expressed by Expression 3 in FIG. The partial differential value used in Expression 3 is obtained as the product of the density gradient of the image and the partial differential value of the projection coordinates based on the camera parameters, as shown in Expression 4. The density gradient of the image is obtained from the image data. The partial differential value of the projection coordinates based on the camera parameters can be obtained by differentiating Equation 1 with the camera parameters. λ is a stabilization parameter that changes according to the degree of convergence. When the evaluation value E becomes smaller than the previous evaluation, λ is made smaller and the camera parameters are updated. When the evaluation value becomes larger than the previous evaluation value, λ is increased, and the camera parameters remain the same as the previous camera parameters. In the present embodiment, the initial value of λ is set to 100.0, λ is increased by 3 when the evaluation value is smaller than the previous evaluation value, and tripled when the evaluation value is increased.

【0074】非線形自乗法は評価値を極小にするパラメ
ータの算出を行う。したがって、カメラパラメータ補正
部13において補正されたカメラパラメータは極小値で
あっても最小値ではない可能性がある。また、入力され
る画像データによって非線形最小自乗法が収束しない場
合もある。これらの2つの場合には、カメラパラメータ
の補正が正しく行われない。
In the nonlinear square method, a parameter for minimizing the evaluation value is calculated. Therefore, there is a possibility that the camera parameter corrected by the camera parameter correction unit 13 is not the minimum value even if it is the minimum value. The nonlinear least squares method may not converge depending on the input image data. In these two cases, the camera parameters are not correctly corrected.

【0075】そこで、本発明に係るカメラパラメータ演
算装置では、図5のステップS21で設定した第2の許
容誤差を用いてカメラパラメータの補正の良否判定を行
う。補正後のカメラパラメータが第2の許容誤差を越え
る場合には、本発明におけるカメラパラメータの補正は
失敗したと判定し、図5のステップS22においてユー
ザによる特徴点の投影座標と3次元座標との対応付けを
要求する。この処理によりカメラパラメータの推定が途
切れたり、誤ったカメラパラメータをもとに次のフレー
ムのカメラパラメータを推定しないようにしている。
Therefore, in the camera parameter calculation device according to the present invention, the quality of the correction of the camera parameters is determined using the second allowable error set in step S21 of FIG. If the corrected camera parameter exceeds the second allowable error, it is determined that the correction of the camera parameter in the present invention has failed, and in step S22 of FIG. Request an association. By this processing, the camera parameter estimation is interrupted, or the camera parameter of the next frame is not estimated based on an incorrect camera parameter.

【0076】[0076]

【発明の効果】以上説明したようにこの発明によれば、
動画像データの最初のフレームに対して、ユーザの介在
を経てカメラパラメータの設定を行えば、以降のフレー
ムにおけるカメラパラメータを推定することができる。
この発明では、既知形状物体の表面の色が隣接フレーム
でほとんど変化しないという性質を用いているので、画
像データを撮影した際のカメラパラメータとずれのない
カメラパラメータを推定することが可能である。
As described above, according to the present invention,
If the camera parameters are set for the first frame of the moving image data via user's intervention, the camera parameters in the subsequent frames can be estimated.
According to the present invention, since the property that the color of the surface of the known-shaped object hardly changes in the adjacent frame is used, it is possible to estimate a camera parameter having no deviation from the camera parameter at the time of capturing the image data.

【0077】このようにして、本発明を用いれば、従来
行われていたようなカメラパラメータの測定・記録が可
能であるカメラを用いずに、しかも、カメラパラメータ
推定に係る人手を極力押さえた形で、動画像データと3
次元CG画像とを違和感なく合成することが可能であ
る。
As described above, according to the present invention, it is possible to use a camera capable of measuring and recording camera parameters, which has been conventionally performed, without using a camera. So, moving image data and 3
It is possible to combine with the dimensional CG image without a sense of incongruity.

【0078】さらに、本発明ではユーザが、カメラパラ
メータの補正終了を判定するためのしきい値(第1の許
容誤差、最小更新量、第2の許容誤差、並びに、最大反
復回数)を設定することにより、ユーザが希望する推定
精度に達していないカメラパラメータが推定された場合
にそれを検出し、その時点でユーザがカメラパラメータ
を修正することができる。
Further, in the present invention, the user sets thresholds (first allowable error, minimum update amount, second allowable error, and maximum number of repetitions) for judging the end of correction of camera parameters. Thus, when a camera parameter that does not reach the estimation accuracy desired by the user is detected, it is detected, and at that time, the user can correct the camera parameter.

【図面の簡単な説明】[Brief description of the drawings]

【図1】この発明に係る画像合成装置の全体構成図であ
る。
FIG. 1 is an overall configuration diagram of an image synthesizing apparatus according to the present invention.

【図2】描画・合成装置のブロック構成図である。FIG. 2 is a block diagram of a drawing / synthesizing apparatus.

【図3】描画・合成装置の動作を示すフローチャートで
ある。
FIG. 3 is a flowchart illustrating an operation of the drawing / synthesizing apparatus.

【図4】カメラパラメータ演算装置のブロック構成図で
ある。
FIG. 4 is a block diagram of a camera parameter calculation device.

【図5】カメラパラメータ演算装置の全体動作を示すフ
ローチャートである。
FIG. 5 is a flowchart illustrating an overall operation of the camera parameter calculation device.

【図6】カメラパラメータ補正部の動作を示すフローチ
ャートである。
FIG. 6 is a flowchart illustrating an operation of a camera parameter correction unit.

【図7】中心投影による座標変換の変換式を示す説明図
である。
FIG. 7 is an explanatory diagram showing a conversion formula of coordinate conversion by central projection.

【図8】カメラモデルを示す説明図である。FIG. 8 is an explanatory diagram showing a camera model.

【図9】既知形状物体表面色決定部の動作を示す説明図
である。
FIG. 9 is an explanatory diagram illustrating an operation of a known-shape object surface color determination unit.

【図10】カメラパラメータ評価部の動作を示す説明図
である。
FIG. 10 is an explanatory diagram illustrating an operation of a camera parameter evaluation unit.

【図11】非線形最小自乗法を用いてカメラパラメータ
を更新する処理を示す説明図である。
FIG. 11 is an explanatory diagram showing a process of updating camera parameters using the nonlinear least squares method.

【図12】撮像画像と3次元CG画像との合成例を示す
説明図である。
FIG. 12 is an explanatory diagram illustrating an example of combining a captured image and a three-dimensional CG image.

【図13】カメラパラメータの不一致による合成画像の
違和感を示す説明図である。
FIG. 13 is an explanatory diagram showing a sense of discomfort of a synthesized image due to mismatch of camera parameters.

【図14】VIEW CORRELATION法で用い
る画像の特徴点の一例を示す説明図である。
FIG. 14 is an explanatory diagram showing an example of a feature point of an image used in the VIEW CORRELATION method.

【図15】動画像を撮影した際のカメラパラメータをV
IEW CORRELATION法を応用して推定する
方法のフローチャートである。
FIG. 15 shows a camera parameter V when a moving image is captured.
It is a flowchart of the method of estimating applying the IEW CORRELATION method.

【符号の説明】[Explanation of symbols]

1 画像合成装置、2 再生装置、3 記録装置、4
描画・合成装置、5キーボード、6 ポインティングデ
バイス、7 画像表示装置、10 カメラパラメータ演
算装置、11 カメラパラメータ設定部、12 カメラ
パラメータ予測部、13 カメラパラメータ補正部、1
4 カメラパラメータ評価部、15カメラパラメータ更
新量算出部、16 カメラパラメータ更新部、17 カ
メラパラメータ補正終了判定部、18 形状既知物体色
決定部、19 補正失敗判断部、20 3次元CG生成
部、30 画像合成部
1 image synthesis device, 2 playback device, 3 recording device, 4
Drawing / synthesizing device, 5 keyboard, 6 pointing device, 7 image display device, 10 camera parameter calculation device, 11 camera parameter setting unit, 12 camera parameter prediction unit, 13 camera parameter correction unit, 1
4 camera parameter evaluation unit, 15 camera parameter update amount calculation unit, 16 camera parameter update unit, 17 camera parameter correction end determination unit, 18 shape known object color determination unit, 19 correction failure determination unit, 20 three-dimensional CG generation unit, 30 Image synthesis unit

Claims (19)

【特許請求の範囲】[Claims] 【請求項1】 ビデオカメラで撮影された画像の画像デ
ータからその画像が撮影されたときのカメラパラメータ
を求めるカメラパラメータ演算装置において、 予測されるカメラパラメータを入力するカメラパラメー
タ入力部と、 画像データ内に写し込まれている既知形状物体の表面色
を用いて前記カメラパラメータ入力部から入力されたカ
メラパラメータを補正するカメラパラメータ補正部とを
備えたことを特徴とするカメラパラメータ演算装置。
1. A camera parameter calculation device for obtaining a camera parameter when an image is captured from image data of an image captured by a video camera, a camera parameter input unit for inputting a predicted camera parameter, A camera parameter correction unit for correcting a camera parameter input from the camera parameter input unit using a surface color of a known shape object projected in the camera parameter calculation unit.
【請求項2】 前記カメラパラメータ補正部は、 画像データ内に撮影された既知形状物体の表面色を用い
てカメラパラメータを評価するカメラパラメータ評価部
と、 前記カメラパラメータ評価部における評価を改善するた
めに非線形最小自乗法を用いてカメラパラメータの更新
量を算出するカメラパラメータ更新量算出部と、 前記カメラパラメータ更新量算出部で算出されたカメラ
パラメータ更新量によりカメラパラメータを更新するカ
メラパラメータ更新部と、 前記カメラパラメータ評価部、カメラパラメータ更新量
算出部、カメラパラメータ更新部の3つの処理部による
反復処理の終了を判定するカメラパラメータ補正終了判
定部とを備えたことを特徴とする請求項1記載のカメラ
パラメータ演算装置。
2. A camera parameter estimator for evaluating a camera parameter using a surface color of a known shape object photographed in image data, and a camera parameter estimator for improving the evaluation in the camera parameter evaluator. A camera parameter update amount calculation unit that calculates the update amount of the camera parameter using the nonlinear least squares method, and a camera parameter update unit that updates the camera parameter with the camera parameter update amount calculated by the camera parameter update amount calculation unit 2. The camera parameter correction unit according to claim 1, further comprising: a camera parameter evaluation unit, a camera parameter update amount calculation unit, and a camera parameter correction end determination unit that determines the end of the repetitive processing by the three processing units. Camera parameter calculation device.
【請求項3】 前記カメラパラメータ評価部は、 画像データ内に写っている既知形状をもつ物体の表面の
ワールド座標とカメラパラメータから、画像データ内で
の既知形状をもつ物体の位置を算出し、画像データ内の
算出された位置の色を既知形状の物体の色として判断す
る既知形状物体色決定部を備えたことを特徴とする請求
項2記載のカメラパラメータ演算装置。
3. The camera parameter evaluation unit calculates a position of the object having the known shape in the image data from the world coordinates of the surface of the object having the known shape in the image data and the camera parameters, 3. The camera parameter calculation device according to claim 2, further comprising a known shape object color determination unit that determines a color at a position calculated in the image data as a color of a known shape object.
【請求項4】 前記カメラパラメータ評価部は、 画像データ内に写っている既知形状をもつ物体の表面の
色が既知の場合に、評価対象のカメラパラメータと画像
を撮影した時のカメラパラメータとのずれを表す評価値
として、既知である色と前記既知形状物体色決定部によ
って判断した色との差の自乗又は自乗和の平均を用いる
ことを特徴とする請求項3記載のカメラパラメータ演算
装置。
4. The camera parameter evaluation section, when a color of a surface of an object having a known shape in image data is known, a camera parameter to be evaluated and a camera parameter at the time of capturing an image. 4. The camera parameter calculation device according to claim 3, wherein a square or an average of the sum of squares of a difference between a known color and a color determined by the known shape object color determination unit is used as the evaluation value representing the shift.
【請求項5】 前記カメラパラメータ補正終了判定部
は、 前記カメラパラメータ評価部で算出したカメラパラメー
タの評価値とユーザが設定した第1の許容誤差とを比較
し、評価値が第1の許容誤差よりも小さい場合にカメラ
パラメータの補正を終了すると判定することを特徴とす
る請求項2記載のカメラパラメータ演算装置。
5. The camera parameter correction end determination unit compares the camera parameter evaluation value calculated by the camera parameter evaluation unit with a first tolerance set by a user, and determines that the evaluation value is a first tolerance. 3. The camera parameter calculation device according to claim 2, wherein it is determined that the correction of the camera parameter is ended when the value is smaller than the predetermined value.
【請求項6】 前記カメラパラメータ補正終了判定部
は、 前記カメラパラメータ更新量算出部で算出したカメラパ
ラメータの更新量とユーザが設定した最小更新量とを比
較し、更新量が最小更新量よりも小さい場合にカメラパ
ラメータの補正を終了すると判定することを特徴とする
請求項2記載のカメラパラメータ演算装置。
6. The camera parameter correction end determination unit compares the camera parameter update amount calculated by the camera parameter update amount calculation unit with a minimum update amount set by a user, and the update amount is larger than the minimum update amount. 3. The camera parameter calculation device according to claim 2, wherein it is determined that the correction of the camera parameter is ended when the value is smaller.
【請求項7】 前記カメラパラメータ補正終了判定部
は、 前記カメラパラメータ評価部、カメラパラメータ更新量
算出部、カメラパラメータ更新部の3つの処理部による
反復処理回数とユーザが設定した最大反復回数とを比較
し、反復処理回数が最大反復回数を越えた場合にカメラ
パラメータの補正を終了すると判定することを特徴とす
る請求項2記載のカメラパラメータ演算装置。
7. The camera parameter correction end determination unit determines the number of repetitions performed by the three processing units of the camera parameter evaluation unit, the camera parameter update amount calculation unit, and the camera parameter update unit, and the maximum number of repetitions set by the user. 3. The camera parameter calculation device according to claim 2, wherein the comparison is made to determine that the correction of the camera parameter is to be terminated when the number of repetition processes exceeds the maximum number of repetitions.
【請求項8】 前記カメラパラメータ補正終了判定部
は、 カメラパラメータの補正を終了すると判定した際に、前
記カメラパラメータ評価部で算出したカメラパラメータ
の評価値がユーザが設定した第2の許容誤差を越えてい
る場合は、カメラパラメータの補正が失敗したと判定す
るカメラパラメータ補正失敗判定部を備えたことを特徴
とする請求項2記載のカメラパラメータ演算装置。
8. The camera parameter correction end determining unit, when determining that the correction of the camera parameter is to be ended, sets the camera parameter evaluation value calculated by the camera parameter evaluation unit to a second allowable error set by a user. 3. The camera parameter calculation device according to claim 2, further comprising a camera parameter correction failure determination unit that determines that the correction of the camera parameter has failed when the value exceeds the predetermined value.
【請求項9】 前記カメラパラメータ補正終了判定部
は、 カメラパラメータの補正が失敗したと判定された場合
に、補正が失敗したカメラパラメータの修正をユーザを
要求するためのパラメータ修正要求を発生することを特
徴とする請求項2記載のカメラパラメータ演算装置。
9. The camera parameter correction end determining unit, when determining that the correction of the camera parameter has failed, generating a parameter correction request for requesting a user to correct the camera parameter whose correction has failed. The camera parameter calculation device according to claim 2, wherein:
【請求項10】 ビデオカメラで撮影された複数のフレ
ームからなる動画像の画像データから各フレームの画像
が撮影されたときの各カメラパラメータを求めるカメラ
パラメータ演算装置において、 特定のフレームの画像に対してその特定のフレームの画
像が撮影されたときのカメラパラメータを設定するカメ
ラパラメータ設定部と、 カメラパラメータが設定されているフレームに隣接する
フレームのカメラパラメータを予測するにあたり、カメ
ラパラメータが設定されているフレームで既知形状物体
の特徴点の画像データ内の位置を特徴点のワールド座標
とカメラパラメータから算出し、算出した特徴点の画像
データ内の位置がカメラパラメータを予測するフレーム
の画像中ではどこに移動するかを追跡し、カメラパラメ
ータを予測するフレームで画追跡の結果得られた位置と
特徴点のワールド座標からカメラパラメータを予測する
カメラパラメータ予測部と、 前記カメラパラメータ予測部で予測されたカメラパラメ
ータを画像データ内に写し込まれた既知形状物体の表面
色を用いて補正するカメラパラメータ補正部とを備え、 1つのフレームにおけるカメラパラメータ設定後、前記
カメラパラメータ予測部とカメラパラメータ補正部との
処理を繰り返し行うことで、動画像データの全てのフレ
ームに亘って各フレーム毎にカメラパラメータを設定す
ることを特徴とするカメラパラメータ演算装置。
10. A camera parameter calculation device for obtaining each camera parameter when an image of each frame is captured from video data of a moving image composed of a plurality of frames captured by a video camera. A camera parameter setting unit for setting a camera parameter when an image of the specific frame is captured, and setting a camera parameter in predicting a camera parameter of a frame adjacent to the frame in which the camera parameter is set. The position of the feature point of the known shape object in the image data in the image data is calculated from the world coordinates of the feature point and the camera parameter, and where the calculated position of the feature point in the image data predicts the camera parameter in the image of the frame. Track whether to move and predict camera parameters A camera parameter prediction unit for predicting a camera parameter from a position and a world coordinate of a feature point obtained as a result of image tracking in a camera, and a camera parameter predicted by the camera parameter prediction unit, the known camera parameter being projected into image data. A camera parameter correction unit that corrects using the surface color of the shape object. After setting the camera parameters in one frame, the processing of the camera parameter prediction unit and the camera parameter correction unit is repeatedly performed to obtain moving image data. A camera parameter calculation device for setting camera parameters for each frame over all frames.
【請求項11】 前記カメラパラメータ補正部は、 画像データ内に撮影された既知形状物体の表面色を用い
てカメラパラメータを評価するカメラパラメータ評価部
と、 前記カメラパラメータ評価部における評価を改善するた
めに非線形最小自乗法を用いてカメラパラメータの更新
量を算出するカメラパラメータ更新量算出部と、 前記カメラパラメータ更新量算出部で算出されたカメラ
パラメータ更新量によりカメラパラメータを更新するカ
メラパラメータ更新部と、 前記カメラパラメータ評価部、カメラパラメータ更新量
算出部、カメラパラメータ更新部の3つの処理部による
反復処理の終了を判定するカメラパラメータ補正終了判
定部とを備えたことを特徴とする請求項10記載のカメ
ラパラメータ演算装置。
11. A camera parameter evaluation unit for evaluating a camera parameter using a surface color of a known shape object photographed in image data, and a camera parameter evaluation unit for improving the evaluation in the camera parameter evaluation unit. A camera parameter update amount calculation unit that calculates the update amount of the camera parameter using the nonlinear least squares method, and a camera parameter update unit that updates the camera parameter with the camera parameter update amount calculated by the camera parameter update amount calculation unit 11. The camera parameter correction unit according to claim 10, further comprising: a camera parameter evaluation unit, a camera parameter update amount calculation unit, and a camera parameter correction end determination unit that determines the end of the repetitive processing by the three processing units. Camera parameter calculation device.
【請求項12】 前記カメラパラメータ評価部は、 画像データ内に写っている既知形状をもつ物体の表面の
ワールド座標とカメラパラメータから、画像データ内で
の既知形状をもつ物体の位置を算出し、画像データ内の
算出された位置の色を既知形状の物体の色として判断す
る既知形状物体色決定部を備えたことを特徴とする請求
項11記載のカメラパラメータ演算装置。
12. The camera parameter evaluation unit calculates a position of an object having a known shape in the image data from world coordinates and a camera parameter of a surface of the object having a known shape in the image data, The camera parameter calculation device according to claim 11, further comprising a known shape object color determination unit that determines a color at a position calculated in the image data as a color of a known shape object.
【請求項13】 前記カメラパラメータ評価部は、 画像データ内に写っている既知形状をもつ物体の表面の
色が既知の場合に、評価対象のカメラパラメータと画像
を撮影した時のカメラパラメータとのずれを表す評価値
として、既知である色と前記既知形状物体色決定部によ
って判断した色との差の自乗和又は自乗和の平均を用い
ることを特徴とする請求項11記載のカメラパラメータ
演算装置。
13. The camera parameter evaluation unit, when the color of the surface of an object having a known shape shown in image data is known, compares the camera parameter to be evaluated with the camera parameter at the time of capturing the image. 12. The camera parameter calculation device according to claim 11, wherein a sum of squares or an average of the sum of squares of a difference between a known color and a color determined by the known shape object color determination unit is used as the evaluation value representing the shift. .
【請求項14】 前記カメラパラメータ補正終了判定部
は、 前記カメラパラメータ評価部で算出したカメラパラメー
タの評価値とユーザが設定した第1の許容誤差とを比較
し、評価値が第1の許容誤差よりも小さい場合にカメラ
パラメータの補正を終了すると判定することを特徴とす
る請求項11記載のカメラパラメータ演算装置。
14. The camera parameter correction end determination unit compares the camera parameter evaluation value calculated by the camera parameter evaluation unit with a first tolerance set by a user, and determines that the evaluation value is a first tolerance. 12. The camera parameter calculation device according to claim 11, wherein it is determined that the correction of the camera parameter is to be terminated when the value is smaller than the correction value.
【請求項15】 前記カメラパラメータ補正終了判定部
は、 前記カメラパラメータ更新量算出部で算出したカメラパ
ラメータの更新量とユーザが設定した最小更新量とを比
較し、更新量が最小更新量よりも小さい場合にカメラパ
ラメータの補正を終了すると判定することを特徴とする
請求項11記載のカメラパラメータ演算装置。
15. The camera parameter correction end determination unit compares the camera parameter update amount calculated by the camera parameter update amount calculation unit with a minimum update amount set by a user, and the update amount is larger than the minimum update amount. 12. The camera parameter calculation device according to claim 11, wherein it is determined that the correction of the camera parameter is ended when the value is smaller.
【請求項16】 前記カメラパラメータ補正終了判定部
は、 前記カメラパラメータ評価部、カメラパラメータ更新量
算出部、カメラパラメータ更新部の3つの処理部による
反復処理回数とユーザが設定した最大反復回数とを比較
し、反復処理回数が最大反復回数を越えた場合にカメラ
パラメータの補正を終了すると判定することを特徴とす
る請求項11記載のカメラパラメータ演算装置。
16. The camera parameter correction end determining unit determines the number of repetitions performed by the three processing units of the camera parameter evaluation unit, the camera parameter update amount calculation unit, and the camera parameter update unit, and the maximum number of repetitions set by the user. 12. The camera parameter calculation device according to claim 11, wherein it is determined that the correction of the camera parameter is ended when the number of repetition processes exceeds the maximum number of repetitions.
【請求項17】 前記カメラパラメータ補正終了判定部
は、 カメラパラメータの補正を終了すると判定した際に、前
記カメラパラメータ評価部で算出したカメラパラメータ
の評価値がユーザが設定した第2の許容誤差を越えてい
る場合は、カメラパラメータの補正が失敗したと判定す
るカメラパラメータ補正失敗判定部を備えたことを特徴
とする請求項11記載のカメラパラメータ演算装置。
17. The camera parameter correction end determining unit, when determining that the camera parameter correction is to be ended, sets the camera parameter evaluation value calculated by the camera parameter evaluation unit to a second allowable error set by a user. The camera parameter calculation device according to claim 11, further comprising a camera parameter correction failure determination unit that determines that the correction of the camera parameter has failed when the value exceeds the predetermined value.
【請求項18】 前記カメラパラメータ補正終了判定部
は、 カメラパラメータの補正が失敗したと判定された場合
に、補正が失敗したカメラパラメータの修正をユーザを
要求するためのパラメータ修正要求を発生することを特
徴とする請求項11記載のカメラパラメータ演算装置。
18. The camera parameter correction end determining unit, when determining that the correction of the camera parameter has failed, generating a parameter correction request for requesting the user to correct the camera parameter for which the correction has failed. The camera parameter calculation device according to claim 11, wherein
【請求項19】 特定のフレームの画像に対してその特
定のフレームの画像が撮影されたときのカメラパラメー
タを設定するカメラパラメータ設定部と、カメラパラメ
ータが設定されているフレームに隣接するフレームのカ
メラパラメータを予測するにあたり、カメラパラメータ
が設定されているフレームで既知形状物体の特徴点の画
像データ内の位置を特徴点のワールド座標とカメラパラ
メータから算出し、算出した特徴点の画像データ内の位
置がカメラパラメータを予測するフレームの画像中では
どこに移動するかを追跡し、カメラパラメータを予測す
るフレームで画追跡の結果得られた位置と特徴点のワー
ルド座標からカメラパラメータを予測するカメラパラメ
ータ予測部と、前記カメラパラメータ予測部で予測され
たカメラパラメータを画像データ内に写し込まれた既知
形状物体の表面色を用いて補正するカメラパラメータ補
正部とを備え、1つのフレームにおけるカメラパラメー
タ設定後、前記カメラパラメータ予測部とカメラパラメ
ータ補正部との処理を繰り返し行うことで、動画像デー
タの全てのフレームに亘って各フレーム毎にカメラパラ
メータを設定するカメラパラメータ演算装置と、 前記カメラパラメータ演算装置によって設定された各フ
レーム毎のカメラパラメータに基づいて3次元CG画像
を生成する3次元CG生成部と、 前記3次元CG生成部で生成された3次元CG画像と動
画像とを合成する画像合成部とを備えたことを特徴とす
る画像合成装置。
19. A camera parameter setting unit for setting a camera parameter when an image of a specific frame is captured for an image of a specific frame, and a camera of a frame adjacent to the frame in which the camera parameter is set. In predicting the parameters, the position in the image data of the feature point of the known shape object in the frame in which the camera parameter is set is calculated from the world coordinates of the feature point and the camera parameter, and the calculated position of the feature point in the image data A camera parameter prediction unit that tracks where the camera moves in the image of the frame for which the camera parameters are predicted, and predicts the camera parameters from the position and the world coordinates of the feature points obtained as a result of the image tracking in the frame for which the camera parameters are predicted. And camera parameters predicted by the camera parameter prediction unit And a camera parameter correction unit that corrects using a surface color of a known-shaped object projected in image data, and sets a camera parameter in one frame, and then processes the camera parameter prediction unit and the camera parameter correction unit. Is repeatedly performed to set camera parameters for each frame over all frames of the moving image data; and 3 based on the camera parameters for each frame set by the camera parameter calculation device. An image synthesizing apparatus, comprising: a three-dimensional CG generating unit that generates a three-dimensional CG image; and an image synthesizing unit that synthesizes a three-dimensional CG image generated by the three-dimensional CG generating unit with a moving image.
JP8268985A 1996-10-09 1996-10-09 Camera parameter arithmetic unit and image composing device Withdrawn JPH10116359A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8268985A JPH10116359A (en) 1996-10-09 1996-10-09 Camera parameter arithmetic unit and image composing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8268985A JPH10116359A (en) 1996-10-09 1996-10-09 Camera parameter arithmetic unit and image composing device

Publications (1)

Publication Number Publication Date
JPH10116359A true JPH10116359A (en) 1998-05-06

Family

ID=17466062

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8268985A Withdrawn JPH10116359A (en) 1996-10-09 1996-10-09 Camera parameter arithmetic unit and image composing device

Country Status (1)

Country Link
JP (1) JPH10116359A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001034750A (en) * 1999-06-22 2001-02-09 Eastman Kodak Co Method for correcting non-image data in image processing chain
JP2002324234A (en) * 2001-02-23 2002-11-08 Sharp Corp Method and device for rectifying stereoscopic image
JP2008005478A (en) * 2006-05-24 2008-01-10 Kazuo Iwane Apparatus in front of image in source point reference cv region
JP2009031295A (en) * 2008-08-05 2009-02-12 Olympus Corp Mobile object posture detection device
KR100908084B1 (en) 2007-11-14 2009-07-16 주식회사 영구아트 Recording medium recording method of 3-dimensional coordinates of subject and program for executing the method in computer
JP2010532465A (en) * 2007-05-22 2010-10-07 メタイオ ゲゼルシャフト ミット ベシュレンクテル ハフツング Camera pose estimation apparatus and method for extended reality image
JP2010261785A (en) * 2009-05-01 2010-11-18 Nippon Hoso Kyokai <Nhk> Camera calibrating device and camera calibration program
JP2012070238A (en) * 2010-09-24 2012-04-05 Hitachi Plant Technologies Ltd Site information communication system, site information communication method
US9020261B2 (en) 2001-03-23 2015-04-28 Avigilon Fortress Corporation Video segmentation using statistical pixel modeling
US9378632B2 (en) 2000-10-24 2016-06-28 Avigilon Fortress Corporation Video surveillance system employing video primitives
US9892606B2 (en) 2001-11-15 2018-02-13 Avigilon Fortress Corporation Video surveillance system employing video primitives
US10645350B2 (en) 2000-10-24 2020-05-05 Avigilon Fortress Corporation Video analytic rule detection system and method

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001034750A (en) * 1999-06-22 2001-02-09 Eastman Kodak Co Method for correcting non-image data in image processing chain
US10026285B2 (en) 2000-10-24 2018-07-17 Avigilon Fortress Corporation Video surveillance system employing video primitives
US10645350B2 (en) 2000-10-24 2020-05-05 Avigilon Fortress Corporation Video analytic rule detection system and method
US10347101B2 (en) 2000-10-24 2019-07-09 Avigilon Fortress Corporation Video surveillance system employing video primitives
US9378632B2 (en) 2000-10-24 2016-06-28 Avigilon Fortress Corporation Video surveillance system employing video primitives
JP2002324234A (en) * 2001-02-23 2002-11-08 Sharp Corp Method and device for rectifying stereoscopic image
US9020261B2 (en) 2001-03-23 2015-04-28 Avigilon Fortress Corporation Video segmentation using statistical pixel modeling
US9892606B2 (en) 2001-11-15 2018-02-13 Avigilon Fortress Corporation Video surveillance system employing video primitives
JP2008005478A (en) * 2006-05-24 2008-01-10 Kazuo Iwane Apparatus in front of image in source point reference cv region
JP2010532465A (en) * 2007-05-22 2010-10-07 メタイオ ゲゼルシャフト ミット ベシュレンクテル ハフツング Camera pose estimation apparatus and method for extended reality image
JP2013178252A (en) * 2007-05-22 2013-09-09 Metaio Gmbh Camera pose estimation apparatus and method for augmented reality imaging
KR100908084B1 (en) 2007-11-14 2009-07-16 주식회사 영구아트 Recording medium recording method of 3-dimensional coordinates of subject and program for executing the method in computer
JP2009031295A (en) * 2008-08-05 2009-02-12 Olympus Corp Mobile object posture detection device
JP2010261785A (en) * 2009-05-01 2010-11-18 Nippon Hoso Kyokai <Nhk> Camera calibrating device and camera calibration program
JP2012070238A (en) * 2010-09-24 2012-04-05 Hitachi Plant Technologies Ltd Site information communication system, site information communication method

Similar Documents

Publication Publication Date Title
US7471292B2 (en) Virtual view specification and synthesis in free viewpoint
US6868191B2 (en) System and method for median fusion of depth maps
US6396491B2 (en) Method and apparatus for reproducing a shape and a pattern in a three-dimensional scene
KR100879324B1 (en) A method for compressing video information and a recording medium readable by a computer, reading thereof
EP2043049A2 (en) Facial animation using motion capture data
JPH11175733A (en) Method for extracting three-dimensional model by using restricted structure based upon outward appearance from movement
JP2017156162A (en) Information processing device, information processing method, and program
JPH10116359A (en) Camera parameter arithmetic unit and image composing device
JP4887376B2 (en) A method for obtaining a dense parallax field in stereo vision
WO2020218024A1 (en) Panoramic video image synthesis device, panoramic video image synthesis method, and panoramic video image synthesis program
US7196707B2 (en) Tangent balancing
JP2002236909A (en) Image data processing method and modeling device
WO2016030304A1 (en) Method and device for editing a facial image
CN111260765A (en) Dynamic three-dimensional reconstruction method for microsurgery operative field
CN113469886B (en) Image splicing method based on three-dimensional reconstruction
WO2021161878A1 (en) Image processing device, image processing method, method of generating learned model, and program
US20050088531A1 (en) Automatic stabilization control apparatus, automatic stabilization control method, and computer readable recording medium having automatic stabilization control program recorded thereon
JP2005063041A (en) Three-dimensional modeling apparatus, method, and program
JP2002525764A (en) Graphics and image processing system
JP4568050B2 (en) Camera parameter calculation calibration apparatus and camera parameter calculation calibration program
Conze et al. Multi-reference combinatorial strategy towards longer long-term dense motion estimation
JPH10302070A (en) Movement extracting processing method, its device and program storing medium
WO2022259618A1 (en) Information processing device, information processing method, and program
JPH11264724A (en) Device and method for processing image, and medium provided
JPH06323821A (en) Skeleton data preparing equipment

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20040106