JP2019057070A - Image processing device, image processing method, and program - Google Patents
Image processing device, image processing method, and program Download PDFInfo
- Publication number
- JP2019057070A JP2019057070A JP2017180439A JP2017180439A JP2019057070A JP 2019057070 A JP2019057070 A JP 2019057070A JP 2017180439 A JP2017180439 A JP 2017180439A JP 2017180439 A JP2017180439 A JP 2017180439A JP 2019057070 A JP2019057070 A JP 2019057070A
- Authority
- JP
- Japan
- Prior art keywords
- image
- position information
- subject
- image processing
- processing apparatus
- 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.)
- Pending
Links
Images
Abstract
Description
本発明は、仮想視点画像を生成する場合における、仮想カメラパスを設定するための画像処理の技術に関する。 The present invention relates to an image processing technique for setting a virtual camera path when generating a virtual viewpoint image.
複数台の実カメラ画像を用いて、3次元空間内に仮想的に配置したカメラから撮影された画像を再現して、実カメラの設置位置から撮影した画像だけでなく任意の視点の画像を仮想視点画像として生成する技術がある。特許文献1では、複数のカメラにより撮影された画像から仮想視点画像を生成する技術が開示されている。 Using multiple real camera images, reproduce the image taken from the camera virtually placed in the three-dimensional space, and not only the image taken from the actual camera installation position but also the image of any viewpoint There is a technique for generating a viewpoint image. Patent Document 1 discloses a technique for generating a virtual viewpoint image from images taken by a plurality of cameras.
仮想視点画像に係る視点の位置を指定する場合、被写体の位置がわからなければ、ユーザは、どの位置を仮想視点画像に係る視点の位置とすれば、所望とする仮想視点画像が得られるかを判断することが難しかった。したがって、所望とする仮想視点画像に係る視点の指定を容易にするために、実空間での被写体の位置をユーザに特定可能にするための技術が望まれる。 When specifying the position of the viewpoint related to the virtual viewpoint image, if the position of the subject is not known, the user can determine which position is the position of the viewpoint related to the virtual viewpoint image and obtain the desired virtual viewpoint image. It was difficult to judge. Therefore, a technique for enabling the user to specify the position of the subject in real space is desired in order to easily specify the viewpoint related to the desired virtual viewpoint image.
本発明は、仮想視点画像に係る視点の位置を指定する際に、実空間での被写体の位置を特定可能にするための技術を提供することを目的とする。 An object of the present invention is to provide a technique for enabling the position of a subject in a real space to be specified when designating the position of a viewpoint related to a virtual viewpoint image.
本発明の一態様に係る画像処理装置は、複数のカメラにより撮影された複数の画像を用いて生成される仮想視点画像に係る視点の位置の指定を受け付ける画像処理装置であって、前記複数のカメラの撮影対象領域を撮影した画像に基づいて、当該画像に写るオブジェクトの位置情報を取得する取得手段と、前記撮影対象領域を示すコンピュータグラフィックにおいて、前記取得手段により取得された位置情報に対応する位置に、前記オブジェクトを示す情報を表示させる表示制御手段と、前記表示制御手段により前記オブジェクトを示す情報を表示させている状態で、仮想視点画像に係る視点の位置の指定を受け付ける受付手段と、を備えることを特徴とする。 An image processing apparatus according to an aspect of the present invention is an image processing apparatus that accepts designation of a viewpoint position related to a virtual viewpoint image generated using a plurality of images captured by a plurality of cameras. In an acquisition unit that acquires position information of an object shown in the image based on an image obtained by shooting a shooting target area of the camera, and corresponding to the position information acquired by the acquiring unit in a computer graphic indicating the shooting target area Display control means for displaying information indicating the object at a position, and receiving means for receiving designation of the position of the viewpoint related to the virtual viewpoint image in a state where the information indicating the object is displayed by the display control means; It is characterized by providing.
本発明の他の態様に係る画像処理装置は、フィールドを撮影した画像を、前記フィールドを上空から見た鳥瞰図画像に変換する変換手段と、前記鳥瞰図画像から、被写体の2次元の位置情報を取得する第一の取得手段と、前記2次元の位置情報を用いて、前記被写体を含む前記フィールドの領域をCG(コンピュータグラフィック)モデルで再現したCGシーンを生成する生成手段と、前記CGシーンを用いて特定の被写体の3次元の位置情報を取得する第二の取得手段と、前記特定の被写体の3次元の位置情報を用いて前記特定の被写体の位置情報を修正する修正手段とを備えることを特徴とする。 An image processing apparatus according to another aspect of the present invention obtains two-dimensional position information of a subject from conversion means for converting an image obtained by photographing a field into a bird's eye view image obtained by viewing the field from the sky, and the bird's eye view image. First generation means for generating, using the two-dimensional position information, generating means for generating a CG scene in which the area of the field including the subject is reproduced by a CG (computer graphic) model, and using the CG scene Second acquisition means for acquiring the three-dimensional position information of the specific subject, and correction means for correcting the position information of the specific subject using the three-dimensional position information of the specific subject. Features.
本発明によれば、仮想視点画像に係る視点の位置を指定する際に、実空間での被写体の位置を特定可能にすることができる。 ADVANTAGE OF THE INVENTION According to this invention, when designating the position of the viewpoint which concerns on a virtual viewpoint image, the position of the to-be-photographed object can be specified in real space.
以下、本発明の実施形態について、図面を参照して説明する。なお、以下の実施形態は本発明を限定するものではなく、また、本実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。なお、同一の構成については、同じ符号を付して説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. The following embodiments do not limit the present invention, and all the combinations of features described in the present embodiment are not necessarily essential to the solution means of the present invention. In addition, about the same structure, the same code | symbol is attached | subjected and demonstrated.
以下に示す実施形態では、実カメラにより撮影された撮影画像に基づいて被写体の位置を特定し、特定した被写体の位置を、実空間を模したCG(コンピュータグラフィック)上に示すことで、仮想視点画像に係る視点の位置の指定を容易にする形態を説明する。 In the embodiment described below, a virtual viewpoint is obtained by specifying the position of a subject on the basis of a photographed image taken by a real camera and showing the position of the identified subject on a CG (computer graphic) imitating real space. A mode for facilitating designation of the position of the viewpoint relating to the image will be described.
また、実空間における被写体の位置情報を取得する方法としては、複数台のカメラを用いた三角測量によって、被写体の位置情報を取得する方法が一般的である。しかし、このような方法では、処理時間が長くなる問題がある。また、処理時間を短縮するには専用のハードウェアを用いる必要がある点などの問題がある。また、撮影対象である人物やボールなどの被写体の高さなどは刻々と変化していくものであり、従来の技術では3次元位置の精度は低いという課題がある。また、以下に示す実施形態では、被写体位置を高精度かつ短時間で取得することを可能とする。 Further, as a method of acquiring subject position information in real space, a method of acquiring subject position information by triangulation using a plurality of cameras is generally used. However, such a method has a problem that the processing time becomes long. In addition, there is a problem that it is necessary to use dedicated hardware in order to shorten the processing time. In addition, the height of a subject such as a person to be photographed or a ball changes every moment, and the conventional technology has a problem that the accuracy of the three-dimensional position is low. In the embodiment described below, the subject position can be acquired with high accuracy and in a short time.
また、以下に示す実施形態では、仮想視点画像を撮影する仮想的なカメラ(以下、仮想化カメラと呼ぶ)を見立て、仮想視点画像に係る視点の位置及び視線の方向を指定することを仮想カメラの位置姿勢を指定するとも呼ぶ。また、仮想カメラの位置、注視点、および画角などの各種のパラメータを時間軸に沿って設定することを、仮想カメラパスを設定するとも呼ぶ。 In the embodiment described below, it is assumed that a virtual camera that captures a virtual viewpoint image (hereinafter referred to as a virtual camera) is used, and that the viewpoint position and the direction of the line of sight associated with the virtual viewpoint image are designated. It is also called to specify the position and orientation. Setting various parameters such as the position of the virtual camera, the gazing point, and the angle of view along the time axis is also referred to as setting a virtual camera path.
また、以下に示す実施形態において、特に断りがない限り、画像という文言は、静止画も動画も含むもとして説明を行う。即ち、以下に示す実施形態において、仮想視点画像は、静止画であっても動画であってもよい。 In the embodiment described below, the term “image” will be described as including a still image and a moving image unless otherwise specified. That is, in the embodiment described below, the virtual viewpoint image may be a still image or a moving image.
<<実施形態1>>
本実施形態では、特定のオブジェクトである被写体の位置情報(被写体位置情報ともいう)の取得に際して、サッカー競技を題材として説明を行う。即ち、仮想視点画像を生成するための撮影対象はサッカーが行われるフィールドであるものとして説明を行う。サッカーでは、選手などの人物被写体はフィールドに接地しているケースが大半である。そのため、本実施形態では、フィールド平面に則した2次元の位置情報を被写体位置情報として取得し、処理を高速化する。また、サッカーで、3次元的な動きをする被写体は限られている。具体的には、3次元的な動きをする被写体は、滞空時間が長いボールである。そこで、本実施形態では、被写体情報として3次元の位置情報を取得する対象を、ボールに絞り込む。これにより、処理時間の効率化を図るとともに、実空間における被写体位置情報の精度を高めることができる。
<< Embodiment 1 >>
In the present embodiment, a description will be given using soccer competition as a subject when acquiring position information (also referred to as object position information) of a subject that is a specific object. That is, the description will be made assuming that the shooting target for generating the virtual viewpoint image is a field where soccer is played. In soccer, human subjects such as players are mostly in contact with the field. For this reason, in this embodiment, two-dimensional position information conforming to the field plane is acquired as subject position information, and the processing speed is increased. Also, there are a limited number of subjects that make a three-dimensional movement in soccer. Specifically, a subject that moves three-dimensionally is a ball with a long flight time. Therefore, in the present embodiment, the target for acquiring the three-dimensional position information as the subject information is narrowed down to the ball. As a result, the processing time can be improved and the accuracy of the subject position information in the real space can be increased.
<システム構成>
図1は、本実施形態における、画像処理装置100とカメラ装置110とを含むシステム構成を示すブロック図である。画像処理装置100は、CPU101、メインメモリ102、記憶部103、入力部104、表示部105、外部I/F部106、バス107を備える。CPU(Central Processing Unit)101は、演算処理や各種プログラムの実行を行う。メインメモリ102は、処理に必要なプログラム、データ、作業領域などをCPU101に提供する。記憶部103は、画像処理プログラムやGUI(Graphical User Interface)表示に必要な各種データを蓄積する装置で、例えばハードディスクやシリコンディスク等の不揮発性メモリが用いられる。入力部104は、キーボードやマウス、電子ペン、タッチパネル等の装置であり、ユーザからの操作入力を受け付ける。表示部105はGUIなどの画面の表示を行う。外部I/F(InterFace)部106はカメラ装置110と接続し、画像データや制御信号データの送受信をLAN120経由で行う。バス107は上述の各部を接続し、データ転送を行う。
<System configuration>
FIG. 1 is a block diagram showing a system configuration including an
カメラ装置110は、複数台のカメラから構成されるカメラ群111を備える。カメラ群111はLAN(Local Area Network)120経由で画像処理装置100と接続されている。カメラ群111は、画像処理装置100からの制御信号をもとに、撮影の開始および停止、カメラ設定(シャッタースピード、焦点距離、絞値など)の変更、ならびに撮影データの転送を行う。
The camera device 110 includes a
なお、システム構成については、上記以外にも、様々な構成要素が存在し得るが、本実施形態の主眼ではないので、その説明は省略する。 In addition to the above, there may be various components of the system configuration, but since it is not the main point of the present embodiment, the description thereof is omitted.
図2は、カメラ群111の配置を示した図である。ここでは、スポーツなどを行う競技場にカメラ群111を設置したケースで説明する。競技を行うフィールド201上に被写体202が存在する。図2では、例示的に1つの被写体202のみを示している。カメラ群111は、フィールド201を取り囲むように配置されている。カメラ群111を構成する個々のカメラ203においては、フィールドの部分的な領域が収まるように焦点距離・画角(θ°)と撮影方向とが設定されている。また、トラッキングカメラ204を別途配置しており、フィールド全域が撮影できるよう焦点距離・画角(φ°)を設定している。ここで、θ<φの関係となっている。本実施形態では、主にフィールド全域の領域を撮影するトラッキングカメラ204で撮影した画像を元に、被写体202の位置情報を取得する処理が行われる。すなわち、1台のカメラで撮影した画像を元に被写体202の位置情報を取得する処理が行われる。なお、トラッキングカメラ204を複数台にしてもよい。
FIG. 2 is a diagram showing the arrangement of the
<GUI画面>
図3は、仮想視点画像生成時の仮想カメラパス設定を行うGUI画面を示した図である。前述したように、仮想視点画像を生成するには、仮想カメラパスを設定する必要がある。仮想カメラパスとは、仮想カメラの位置、注視点、および画角を時間軸に沿って設定した仮想カメラの経路である。仮想視点画像は、この仮想カメラで撮影されたような画像が再現された画像である。所望の仮想カメラパスを設定するためには、ユーザが、フィールド上における被写体の位置を確認できていることが必要となる。本実施形態では、画像処理装置100が、被写体の位置情報を取得する処理を行う。画像処理装置100は、1台のトラッキングカメラ204で撮影した画像に基づいて被写体の位置情報を取得する。そして、取得した位置情報を用いて、実空間をCGモデルで再現したCGシーンを生成する。ユーザは、CGシーンを用いて再現されたCG画像を見て、仮想カメラパスを指定する。そして、画像処理装置100は、指定された仮想カメラパスを設定し、この仮想カメラパスに基づいてCGモデルで仮想視点画像を生成する。このような処理によれば、画像処理装置100は、仮想カメラパスを設定するための被写体の位置情報を、1台のトラッキングカメラ204からの画像に基づいて取得することができるので、低コストで被写体の位置情報を取得できる。また、カメラ台数が少ない方が、データ量が少なくなるので、処理時間も短縮できる。なお、詳細は後述するが、画像処理装置100は、被写体の位置情報のうち、特定の被写体(例えばボール)については、3次元の位置情報を取得し、他の被写体については実質的に2次元の位置情報を取得する。このような処理によれば、短時間で高精度の位置情報を取得することができる。
<GUI screen>
FIG. 3 is a diagram showing a GUI screen for setting a virtual camera path when generating a virtual viewpoint image. As described above, in order to generate a virtual viewpoint image, it is necessary to set a virtual camera path. The virtual camera path is a path of the virtual camera in which the position, gazing point, and angle of view of the virtual camera are set along the time axis. The virtual viewpoint image is an image in which an image as if taken with this virtual camera is reproduced. In order to set a desired virtual camera path, the user needs to be able to confirm the position of the subject on the field. In the present embodiment, the
図3(a)のGUI画面300は、CGウィンドウ310、操作ボタン類320、カメラパス設定ダイアログ330を含む構成である。CGウィンドウ310は、フィールドCGモデル311、選手CGモデル312、ボールCGモデル313を含む各種の3次元形状CGモデル(以下、CGモデルという)を可視化するウィンドウである。各CGモデルはポリゴン面で構成されており、レイトレーシング法やスキャンライン法など、既存のCGレンダリング手法を用いて可視化される。本実施形態では、所望の時間帯の、カメラ群111の撮影対象であるフィールド上を再現するCGシーンを、CGウィンドウ310で表示する。ユーザは、CGウィンドウ310で可視化された選手などの被写体を示す各CGモデルの位置を確認しながら、仮想カメラを配置・移動させ、仮想視点画像の仮想カメラパスを指定することになる。本実施形態は、このCGウィンドウ310に可視化する被写体(CGモデル)の位置情報を短時間で高精度に取得する処理についても説明する。特に、本実施形態では、選手CGモデル312およびボールCGモデル313の被写体位置情報を短時間で高精度に取得する。詳細は後述する。
The
操作ボタン類320は、必要な入力データの読み込みや選手トラッキングの開始に利用される。選手トラッキングとは、各被写体である各選手の位置を経時的に追跡することである。具体的には、各選手の被写体位置情報を経時的に示すトラッキングデータが収集されることになる。操作ボタン類320には、CGモデル読み込みボタン321、トラッキングデータ適用ボタン322、仮想視点画像生成ボタン323、および選手トラッキングボタン324が含まれる。
The
カメラパス設定ダイアログ330は、仮想カメラパスの設定を詳細に行う際に利用される。カメラパス設定ダイアログ330は、仮想カメラパス設定ボタン331およびボール高さ設定ボタン332を含むものである。
The camera path setting dialog 330 is used when setting the virtual camera path in detail. The camera path setting dialog 330 includes a virtual camera
図3(b)のGUI画面350は、図3(a)の操作ボタン類320の選手トラッキングボタン324が押下されることにより、CGウィンドウ310が、トラッキングウィンドウ360に遷移した画面である。トラッキングウィンドウ360には、トラッキングカメラ204で撮影された画像が表示されたり、フィールドを上方から見た鳥瞰図画像が表示されたりする。詳細は後述する。ユーザは、トラッキングウィンドウ360に表示された鳥瞰図画像に基づいて、選手やボールの被写体位置情報をトラッキングする際に必要な設定を行う。なお、図3(b)のGUI画面350では、トラッキングウィンドウ360への遷移に併せて、図3(a)のカメラパス設定ダイアログ330が、トラッキングダイアログ370に遷移する。図3の詳細については、後述する処理と関連して適宜説明をする。
The
<機能ブロック図>
図4は、本実施形態の画像処理装置100の機能ブロック図の一例を示す図である。画像処理装置は、画像データ格納部401、画像時刻取得部402、画像データ抽出部403、画像変換部404、2次元位置情報取得部405、CGモデル格納部406、CGシーン生成部407を有する。また、3次元位置情報取得部408、修正部409、表示制御部410、仮想カメラパス設定部411、仮想視点画像生成部412を有する。
<Functional block diagram>
FIG. 4 is a diagram illustrating an example of a functional block diagram of the
図1に示す記憶部103は、画像データ格納部401およびCGモデル格納部406として機能する。なお、不図示のネットワーク接続されている外部装置を仮想的に用いて画像データ格納部401およびCGモデル格納部406として機能させてもよい。図4に示す他の各部は、CPU101が、メインメモリ102または記憶部103に格納されたソフトウェアプログラムに従った処理を行うことで、CPU101が図4に示す各部として機能する。このように、本実施形態においては、ソフトウェアによる処理によって画像処理装置100の構成を説明することとする。しかしながら、同様の処理を専用に行うハードウェアによって、あるいは、このようなハードウェアとソフトウェアとの組み合わせによって、処理が実現されるように構成されていてもよい。また、図4で示す各部は、画像処理装置100に含まれる形態を示しているが、図4で示す各部の処理を複数の装置によって分散して処理を行うような形態を採用してもよい。
The storage unit 103 illustrated in FIG. 1 functions as an image
画像データ格納部401は、トラッキングカメラ204で撮影された画像データを格納する。画像時刻取得部402は、ユーザから指定された画像時刻(開始時刻と終了時刻を含む)を取得する。画像データ抽出部403は、画像時刻取得部402で取得された画像時刻に対応する画像データを、画像データ格納部401から抽出する。画像変換部404は、画像データ抽出部403で抽出された画像データが示す画像(トラッキングカメラ204で撮影された画像)を、鳥瞰図画像に変換する。
The image
2次元位置情報取得部(第一の取得部)405は、画像変換部404で変換された鳥瞰図画像を用いて、各被写体の被写体位置情報を取得する。ここでは、高さ(フィールドの鉛直方向の座標)については、所定の値(例えば「0」)で固定し、実質的に2次元の位置情報を取得する。つまり、フィールド平面上に各被写体が位置していると想定し、各被写体の2次元の被写体位置情報を取得する。なお、ここでは理解を容易にするために、2次元の被写体位置情報と説明しているが、実質的には高さを示す座標が、上述したように、「0」で固定されている3次元の被写体位置情報を取得しているものである。2次元位置情報取得部405は、被写体位置情報を経時的に示したトラッキングデータを取得する。
A two-dimensional position information acquisition unit (first acquisition unit) 405 acquires subject position information of each subject using the bird's eye view image converted by the
CGモデル格納部406は、各種のCGモデルを格納している。たとえば、フィールドCGモデル311、選手CGモデル312、ボールCGモデル313を格納している。CGシーン生成部407は、2次元位置情報取得部405で取得されたトラッキングデータ(経時的な被写体位置情報)に基づいて、CGモデル格納部406で格納されるCGモデルを用いてCGシーンを生成する。
The CG
CGシーンとは、CG画像を制作するための素材である。CG画像は、仮想空間内に被写体や背景の3次元形状モデルを配置し、その後、仮想カメラを設定し、仮想カメラから撮影した画像をレンダリングすることで再現される。CGシーンを生成することは、上記の仮想空間内に被写体や背景の3次元形状モデルを配置することに相当する。CGシーンには、時間の概念(アニメーション)が含まれる。 A CG scene is a material for producing a CG image. A CG image is reproduced by placing a three-dimensional shape model of a subject or background in a virtual space, then setting a virtual camera and rendering an image taken from the virtual camera. Generating a CG scene is equivalent to arranging a three-dimensional shape model of a subject or background in the virtual space. The CG scene includes the concept of time (animation).
3次元位置情報取得部(第二の取得部)408は、CGシーン生成部407で生成されたCGシーンを用いて、特定の被写体の3次元位置情報を取得する。特定の被写体としては、例えばフィールドの上空を移動することがあるボールが挙げられる。ボールが空中にある場合には、2次元位置情報取得部405で取得した位置情報が正しくない可能性が高い。そこで、3次元位置情報取得部408は、特定の被写体の位置情報(3次元位置)の座標の値を取得する。詳細については後述する。
A three-dimensional position information acquisition unit (second acquisition unit) 408 acquires three-dimensional position information of a specific subject using the CG scene generated by the CG scene generation unit 407. An example of the specific subject is a ball that may move over the field. When the ball is in the air, there is a high possibility that the position information acquired by the two-dimensional position
修正部409は、CGシーン生成部407で生成されたCGシーンを修正する。例えば、3次元位置情報取得部408において3次元位置情報を取得できるように、CGシーンにおける特定の被写体の位置情報を変更する。詳細は後述する。また、修正部409は、3次元位置情報取得部408によって取得された被写体位置情報(3次元位置情報)の座標の値を用いて、その特定の被写体(ボール)のトラッキングデータを修正する。そして、修正後のトラッキングデータを用いてCGシーン生成部407で生成されているCGシーンを修正する。表示制御部410は、CGシーン生成部407で生成されたCGシーンもしくは修正部409で修正されたCGシーン、または、このCGシーンを用いたCG画像を表示部105に表示するように制御する。
The
仮想カメラパス設定部411は、ユーザから指定を受け付ける受付部として機能する。そして、ユーザから指定された仮想カメラパスを設定する。ユーザは、表示されているCGシーンから、各被写体の位置を確認し、所望の仮想カメラパスを指定することになる。仮想視点画像生成部412は、仮想カメラパス設定部411で設定された仮想カメラパスに従ったCGシーンを用いたCGの仮想視点画像を生成する。生成された仮想視点画像は、表示部105に表示され、ユーザが指定した仮想カメラパスが所望のものであるかをユーザが確認できる。
The virtual camera
なお、ユーザが指定した仮想カメラパスが所望のものである場合、カメラ群111を構成するカメラ203によって撮影された画像を用いて、指定された仮想カメラパスに従った実際の画像の仮想視点画像が生成される。
Note that if the virtual camera path specified by the user is desired, a virtual viewpoint image of an actual image according to the specified virtual camera path using images taken by the cameras 203 constituting the
<フローチャート>
図5は、上述した各部によってCGシーンを用いた仮想視点画像を生成するまでの処理過程を示したフローチャート図である。
<Flowchart>
FIG. 5 is a flowchart showing the process until the above-described units generate a virtual viewpoint image using a CG scene.
ステップS501においてCPU101は、カメラ装置110に対して、撮影時の露光が適切となるようにカメラ設定を変更し、撮影開始の信号を送信する。カメラ装置110は、撮影信号の受信に応じて撮影を開始し、撮影した画像データをLAN120経由で画像処理装置100に転送する。カメラ装置110は、トラッキングカメラ204の画像データも併せて転送する。送信された画像データは、画像データ格納部401に格納される。
In step S <b> 501, the
ステップS502において画像時刻取得部402は、ユーザによって設定された画像時刻を取得する。画像時刻は、仮想視点画像生成の対象となる画像が撮影されている時刻である。画像時刻は、不図示のUI画面などを通じてユーザから設定される。ステップS503において画像データ抽出部403は、画像時刻に対応する画像データを、画像データ格納部401から抽出する。ステップS503においてCPU101は、図3(a)のGUI画面300を起動し、表示部105に表示する。起動直後はCGウィンドウ310には何も表示されていない。
In step S502, the image
ステップS505において2次元位置情報取得部405は、被写体の2次元位置情報を取得する。例えば、ステップS504で表示されているGUI画面300の選手トラッキングボタン324がユーザによって押下される。選手トラッキングボタン324の押下に応じて、CPU101は、表示部105に表示する画面を図3(b)に示すGUI画面350に遷移させる。すなわち、CPU101は、表示部105に、トラッキングウィンドウ360やトラッキングダイアログ370を含むGUI画面350を表示する。2次元位置情報取得部405は、画像データ抽出部403にて抽出された画像データ、すなわち、ステップS502で取得された画像時刻に含まれる全てのフレーム(画像データ)を取得する。そして、それらのフレーム(画像データ)において、フィールド面に沿った被写体202の被写体位置情報(2次元位置)を、トラッキングカメラ204の画像に基づいて取得する。本ステップにおいては、被写体位置情報として3次元の位置情報ではなく、2次元の位置情報を取得するので、高速に処理が実行可能である。本処理の詳細は後程詳述する。取得した被写体位置情報(2次元位置)は、記憶部103に保存される。
In step S505, the two-dimensional position
ステップS506においてCGシーン生成部407は、取得された被写体位置情報(2次元位置)と、CGモデル格納部406に格納されている既存のCGモデルとを用いて、3次元のCGシーンを生成する。本処理の詳細も後程詳述する。
In step S506, the CG scene generation unit 407 generates a three-dimensional CG scene using the acquired subject position information (two-dimensional position) and the existing CG model stored in the CG
ステップS507において3次元位置情報取得部408は、被写体の中から特定の被写体(ボール)を抽出し、その特定の被写体の3次元位置を算出する。ボールは、競技中に地面ではなくフィールド上空に位置していることがある。したがって、3次元位置情報取得部408は、このような特定の被写体の3次元の被写体位置情報を取得する。これにより、ボールの位置取得精度が向上する。また、3次元位置を取得する処理対象をボールに絞り込むため、高速に処理が実行可能である。本処理の詳細も後程詳述する。
In step S507, the three-dimensional position
ステップS508において仮想カメラパス設定部411は、仮想カメラパス設定を行う。例えば、図3(a)のCGを表示する表示領域であるCGウィンドウ310に表示されているCGシーンにおいてユーザが、仮想カメラパスを指定する。例えば、CGウィンドウ310に対するユーザのドラッグ操作またはタッチ操作を受け付け、これらの操作に対応する軌跡を仮想カメラパスとして指定する構成としてもよい。そして、仮想カメラパス設定ボタン331の押下に応じて、仮想カメラパス設定部411は、指定された仮想カメラパスを設定する。仮想カメラパス設定は3次元のCGシーン内で実施される。その手法は例えば、仮想カメラ位置を時間軸方向に何点かサンプリング設定し、その間をスプライン関数などで補間する方法を用いることができる。
In step S508, the virtual camera
ステップS509において仮想視点画像生成部412は、設定された仮想カメラパスに従った仮想視点画像を生成する。具体的には、ユーザによって図3(a)の仮想視点画像生成ボタン323が押下されると、仮想視点画像生成部412は、設定された仮想カメラパスに基づいて、仮想視点画像を生成する。仮想視点画像生成は、被写体の3次元形状に対して、仮想カメラから見た画像を公知のコンピュータグラフィックスの技術を用いて生成することができる。
In step S509, the virtual viewpoint image generation unit 412 generates a virtual viewpoint image according to the set virtual camera path. Specifically, when the virtual viewpoint
以上説明した処理により、ユーザは、実際の画像の仮想視点画像を生成するための仮想カメラパスを指定する際に、CGシーンの仮想視点画像を見て、所望の仮想視点画像が再現できるか否かを容易に判断することができる。 Whether or not the user can reproduce the desired virtual viewpoint image by viewing the virtual viewpoint image of the CG scene when the virtual camera path for generating the virtual viewpoint image of the actual image is designated by the processing described above. Can be easily determined.
<被写体位置情報(2次元位置)の取得処理>
次に、ステップS504の被写体位置情報(2次元位置)の取得処理の詳細について、図6のフローチャートを用いて説明する。図6は、S504の処理過程を示したフローチャート図である。
<Subject position information (two-dimensional position) acquisition processing>
Next, details of the subject position information (two-dimensional position) acquisition process in step S504 will be described with reference to the flowchart of FIG. FIG. 6 is a flowchart showing the process of S504.
ステップS601において画像変換部404は、画像データ抽出部403によって抽出された、トラッキングカメラ204の画像を取得する。例えば図3(a)の選手トラッキングボタン324が、ユーザによって押下されたタイミングで、画像の取得を実行する。取得された画像は、図3(b)のトラッキングウィンドウ360に表示される。例えば、トラッキングウィンドウ360には、図7(a)のトラッキングカメラ画像701のように、トラッキングカメラ204で撮影され、指定された画像時刻のトラッキングカメラ画像701が表示される。
In step S <b> 601, the
ステップS602では、画像変換部404は、フィールドのコーナー4点の位置情報を取得する。コーナー4点は、トラッキングカメラ画像を、フィールドの上から見た鳥瞰図画像に変換する際の、鳥瞰図画像の四隅の位置に対応することになる。コーナー4点の位置情報は、例えば、トラッキングウィンドウ360に表示されているトラッキングカメラ画像701を見たユーザが、フィールドのコーナー4点を指定することで取得される。コーナーは、図7(a)のコーナー705に示す位置であり、ユーザは、マウスやタッチ操作で指定すればよい。もちろん、ハフ変換などの直線抽出手法を用いて、コーナーの位置を検出してもよい。
In step S602, the
ステップS603において画像変換部404は、トラッキングカメラ画像を射影変換し、フィールドを上から見た鳥瞰図画像を生成する。サッカーフィールドのサイズは規定されている。このため、コーナー4点の座標値を、そのまま物理的な位置座標(ワールド座標)に変換可能である。また、トラッキングカメラ204の焦点距離は既知である。焦点距離が既知の場合、フィールドを構成する四辺形の歪み角度から、トラッキングカメラ204の物理的な位置(ワールド座標)を算出できる。
In step S603, the
以下では、トラッキングカメラ204の画像を「Image(X,Y)」で表す。トラッキングカメラ画像に映っている被写体は、トラッキング画像上では2次元座標(スクリーン座標)上に位置しているが、物理的には、3次元座標(ワールド座標)上に位置していることになる。したがって、トラッキング画像Image(X,Y)(2次元座標)は、式1に従った画像といえる。なお、X,Yはトラッキング画像の画素位置(2次元座標)を示す。
Image(X,Y) = Screen( Proj * View * Pos(x,y,z) ); 式1
ここで、
Pos(x,y,z) : 被写体の三次元的な位置(3次元座標)
View : 視点変換行列(カメラの位置、方向を決定)
Proj : 2次元射影行列(カメラの画角を決定)
Screen() : スクリーン座標変換関数
である。
Hereinafter, the image of the tracking
Image (X, Y) = Screen (Proj * View * Pos (x, y, z)); Equation 1
here,
Pos (x, y, z): three-dimensional position of the subject (three-dimensional coordinates)
View: Viewpoint transformation matrix (determines camera position and direction)
Proj: Two-dimensional projection matrix (determines the angle of view of the camera)
Screen (): Screen coordinate conversion function.
また、鳥瞰図画像を「ImageV(X,Y)」で表す。鳥瞰図画像に映っている被写体も、鳥瞰図画像上ではトラッキング画像上では2次元座標(スクリーン座標)上に位置しているが、物理的には、3次元座標(ワールド座標)上に位置していることになる。したがって、鳥瞰図画像ImageV(X,Y)(2次元座標)は、式2に従った画像といえる。なお、X,Yは鳥瞰図画像の画素位置(2次元座標)を示す。
ImageV(X,Y) = Screen( Proj * ViewV * Pos(x,y,z) ); 式2
ここで、
Pos(x,y,z) : 被写体の三次元的な位置
ViewV : 視点変換行列(カメラの位置、方向を決定)
Proj : 2次元射影行列(カメラの画角を決定)
Screen() : スクリーン座標変換関数
である。
The bird's eye view image is represented by “ImageV (X, Y)”. The subject shown in the bird's-eye view image is also located on the two-dimensional coordinates (screen coordinates) on the tracking image on the bird's-eye view image, but physically located on the three-dimensional coordinates (world coordinates). It will be. Therefore, it can be said that the bird's-eye view image ImageV (X, Y) (two-dimensional coordinates) is an image according to Equation 2. X and Y indicate pixel positions (two-dimensional coordinates) of the bird's eye view image.
ImageV (X, Y) = Screen (Proj * ViewV * Pos (x, y, z)); Equation 2
here,
Pos (x, y, z): Three-dimensional position of the subject ViewV: View point transformation matrix (determines the position and direction of the camera)
Proj: Two-dimensional projection matrix (determines the angle of view of the camera)
Screen (): Screen coordinate conversion function.
式1および式2を用いて、Pos(x,y,z)を対応させると、Image(X,Y)からImageV(X,Y)への射影変換を行うことができる。すなわち、トラッキングカメラ画像上のある位置の画素Image(X,Y)(スクリーン座標)は、ワールド座標の第一の点Pos(x,y,z)に、式1を用いて変換することができる。さらに、そのワールド座標系の第一の点Pos(x,y,z)を、式2を用いて変換することで、トラッキング画像Image(X,Y)を、鳥瞰図画像ImageV(X,Y)(スクリーン座標)に変換することができる。なお、本実施形態では、ワールド座標の位置Pos(x,y,z)におけるz座標(高さを示す)は、フィールド面で固定される(0で固定される)。つまり、本実施形態では、被写体(例えば選手)の位置するz座標(高さ)を、所定の高さ(フィールド面)に固定した固定値として扱う。このように処理を行うことで、1台のトラッキングカメラの画像を用いて、鳥瞰図画像を生成することができる。 When Pos (x, y, z) is made to correspond using Equation 1 and Equation 2, projective transformation from Image (X, Y) to ImageV (X, Y) can be performed. That is, the pixel Image (X, Y) (screen coordinates) at a certain position on the tracking camera image can be converted into the first point Pos (x, y, z) in the world coordinates using Equation 1. . Further, by converting the first point Pos (x, y, z) of the world coordinate system using Expression 2, the tracking image Image (X, Y) is converted into the bird's eye view image ImageV (X, Y) ( Screen coordinates). In the present embodiment, the z coordinate (indicating the height) at the position Pos (x, y, z) of the world coordinate is fixed on the field plane (fixed at 0). That is, in the present embodiment, the z coordinate (height) at which the subject (for example, a player) is located is handled as a fixed value fixed at a predetermined height (field surface). By performing processing in this way, it is possible to generate a bird's eye view image using an image of one tracking camera.
なお、前述したように、被写体のz座標を得るには、複数台のカメラを用いた三角測量等の方法があるが、データ量が増えることなどにより処理時間を要してしまう。本実施形態では、被写体は、フィールド面に固定されているものと扱い、1台のカメラの画像から鳥瞰図画像に変換している。鳥瞰図画像を生成することで、各被写体のフィールド面上における被写体位置情報(2次元位置)を取得することが可能となる。 As described above, there are methods such as triangulation using a plurality of cameras in order to obtain the z-coordinate of the subject, but processing time is required due to an increase in the amount of data. In the present embodiment, the subject is treated as being fixed on the field surface, and the image of one camera is converted into a bird's eye view image. By generating the bird's-eye view image, it is possible to acquire subject position information (two-dimensional position) on the field plane of each subject.
画像変換部404は、上述した画像変換処理を行い、図7(a)のトラッキングカメラ画像701を、図7(b)の鳥瞰図画像702に変換する。変換された鳥瞰図画像702は、図3(b)のトラッキングウィンドウ360に表示される。
The
ステップS604において2次元位置情報取得部405は、ステップS603で生成された鳥瞰図画像702の全フレームにおいて画素単位で中間値を抽出し、抽出した中間値によって各画素が表現されている背景画像を生成する。この背景画像は、後述する被写体シルエット画像を生成するために用いられる。背景画像は、被写体が映っていない画像に相当する。
In step S604, the two-dimensional position
ステップS605において2次元位置情報取得部405は、被写体シルエット画像を生成する。具体的には、2次元位置情報取得部405は、ステップS603で生成された鳥瞰図画像702の全フレームにおいて、鳥瞰図画像702とステップS604で生成された背景画像との差分を画素単位で行う。そして、差分の画素値によって各画素が表現されている被写体シルエット画像を生成する。図7(c)および図7(d)は、フレーム(時刻)の異なるシルエット画像703および704を、それぞれ示している。シルエット画像703および704の白い領域が、被写体(選手やボール)のシルエットに相当する領域であり、被写体のみが抽出されていることがわかる。
In step S605, the two-dimensional position
ステップS606において2次元位置情報取得部405は、各フレームのシルエット画像の被写体領域をラベリングする。例えば、2次元位置情報取得部405は、孤立した被写体シルエット領域に対して、固有のラベル番号を付与する。図7(c)および図7(d)では、被写体シルエットに対して、ラベルM1からM4が付与されていることを示している。ステップS606では、2次元位置情報取得部405は、各フレーム単位で、画面の左上から右下にかけて順番に被写体領域にラベルを付与している。
In step S606, the two-dimensional position
ステップS607において2次元位置情報取得部405は、フレーム単位で設定した被写体とラベル番号とを、全フレームにおいて整合性を保つように調整する。先のステップS606では、他のフレームとの関係を考慮せず、単純にフレーム内での位置に応じてラベル番号を付与している。ステップS607では、他のフレームとの関係を考慮し、同じ被写体に対して全フレームを通じて同じラベル番号が付与されるように調整する処理である。例えば、フレームt0、t1において、ある被写体Xに付与したラベル番号がずれていた場合、被写体Xに付与されるラベル番号が同一のラベル番号になるように各フレームで付与されているラベル番号を変更する。具体的には、フレームt0におけるラベルMX1の被写体領域の位置が、フレームt1におけるラベルMX2の被写体領域の位置に近い場合、フレームt1のラベルMX2を、ラベルMX1に書き換える処理が行われる。なお、ラベリングの調整は、シルエット画像のほかに、鳥瞰図画像を用いて行なってもよい。例えば、被写体の顔や背番号などを画像認識して用いてラベリングを調整してもよい。以上の処理により、ある特定の被写体Xの、鳥瞰図画像702の全フレームにおける位置を特定することができる。
In step S607, the two-dimensional position
ステップS608において2次元位置情報取得部405は、被写体に対して属性を追加する。属性とは、選手のチーム、キーパー、審判、ボールなどの付加情報を意味する。ユーザの指定に基づいて被写体に対して属性を追加する例を、図3(b)を用いて説明する。図3(b)のGUI画面350のトラッキングウィンドウ360には、ラベル番号が付与された被写体M1、M2、M3が表示されている。トラッキングウィンドウ360に表示されている画像は、被写体シルエットおよびラベル番号を鳥瞰図画像に重畳した画像である。ここで、例えば被写体M1をユーザがマウスでクリック、またはタッチすると、トラッキングダイアログ370に被写体M1の属性を指定するためのコンボボックス371が表示される。ユーザが、コンボボックス371の中から属性を選択する。本実施形態は、サッカーの場面を想定しており、属性としては、チームAのフィールド選手、チームBのフィールド選手,チームAのゴールキーパー、チームBのゴールキーパー、審判、およびボールのいずれかが付与されることになる。属性が選択されると、CGシーン生成部407が、CGモデル格納部406から属性に合わせたCGモデルを取得してプレビューする。CGモデルについては、後述する。2次元位置情報取得部405は、選択された属性を被写体M1に付与する。この一連の処理を全被写体に実施する。なお、ここではユーザの指定に基づいて属性付与が行われる形態を例に挙げて説明したが、属性付与は機械学習を用いた画像認識を用いることで自動処理することも可能である。また、ボールが円形もしくは楕円形である特徴を用いることにより、ボールの属性を自動的に付与することもできる。
In step S608, the two-dimensional position
ステップS609において2次元位置情報取得部405は、ラベル番号毎に、被写体の2次元位置を算出する。具体的には、各被写体シルエットの所定方向(Y座標)の最小値のXY座標を被写体位置とする。所定方向の最小値のXY座標は、各被写体の足元(Y座標の最小値)のXY座標に相当する。被写体シルエットの足元のXY座標を被写体位置とすることで、被写体の姿勢に影響を受けにくい被写体位置情報を取得できる。なお、XY座標は図7(c)および(d)のシルエット画像703、704に示す軸に沿って定義する。このようにして、各被写体について全対象フレームを通じた被写体位置情報(2次元位置)が取得される。全対象フレームを通じた被写体位置情報のことを、経時的な位置情報を示すトラッキングデータともいう。その後、図3(b)のGUI画面350においてユーザがトラッキングダイアログ370のトラッキング終了ボタン372を押下する。すると、2次元位置情報取得部405は、被写体の経時的な2次元位置の情報を記録したトラッキングデータを記憶部103に保存する。CPU101はまた、図3(a)に示すGUI画面300に表示画面を遷移させ、一連の処理を終了する。このとき、CGウィンドウ310は空白のままである。なお、図6の処理においては、全被写体に対して一律に処理を実施しているが、属性を用いてトラッキングデータを生成する対象を限定してもよい。例えば、仮想視点画像において重要な、ボール属性の被写体の周辺に位置する被写体のみをトラッキング対象とすることで、より処理を効率的に実施することも可能である。
In step S609, the two-dimensional position
以上が、図5のステップS505の被写体の2次元位置を取得する処理の詳細である。次に、図5のステップS506のCGシーンの生成処理の詳細について、図8を用いて説明する。 The above is the details of the process of acquiring the two-dimensional position of the subject in step S505 in FIG. Next, details of the CG scene generation processing in step S506 in FIG. 5 will be described with reference to FIG.
<CGシーンの生成処理>
図8は、図5のステップS506のCGシーンの生成処理の詳細を示したフローチャート図である。ステップS801においてCGシーン生成部407は、ユーザによって図3(a)のCGモデル読み込みボタン321が押下されたことを検知し、フィールドおよび被写体のCGモデルをそれぞれ読み込む。
<CG scene generation processing>
FIG. 8 is a flowchart showing details of the CG scene generation processing in step S506 of FIG. In step S801, the CG scene generation unit 407 detects that the user has pressed the CG
図9は、CGモデルの例を示す図である。フィールドモデル907は、ポリゴンから構成されており、カメラ群111の撮影対象領域であるフィールドのラインなどがテクスチャとして表現されている。被写体モデルは図9に示すように、チームAモデル901、チームBモデル902、キーパーモデル(チームA)903、キーパーモデル(チームB)904、審判モデル905、ボールモデル906が存在する。また、全モデルがポリゴンから構成されており、ユニフォームやボールの模様がテクスチャとして表現されている。これらのモデルは、仮想カメラ経路を設定する際に、ユーザが混乱しないよう、ユニフォームの種類と同数のモデルを準備しておく。もちろん、背番号毎に用意するなど、種類が多い程望ましい。例えば、サッカーの場合、チームAモデル901、チームBモデル902は、フィールドプレイヤーの10人分をそれぞれのチームで用意すると良い。
FIG. 9 is a diagram illustrating an example of a CG model. The
ステップS802においてCGシーン生成部407は、ユーザによって図3(a)のトラッキングデータ適用ボタン322が押下されたことを検知し、被写体の2次元位置を記録したトラッキングデータを読み込む。
In step S <b> 802, the CG scene generation unit 407 detects that the user has pressed the tracking
ステップS803においてCGシーン生成部407は、読み込んだトラッキングデータを参照して、属性に応じたモデルを複製する。例えば、CGシーン生成部407は、チームAの属性を持つ被写体数nAをカウントする。そして、チームAモデル901をnA個分複製する。同様に、チームBの属性を持つ被写体数nBをカウントし、チームBモデル902をnB個分複製する。また、審判の属性を持つ被写体数nSをカウントし、審判モデル905をnS個分複製する。なお、ここでは、各チームおよび審判のCGモデルは同じモデルとして示しているが、被写体ごとにCGモデルが用意されている場合には、各被写体のモデルを、対応する分の数だけ複製すればよい。また、キーパーモデルについても同様に複製する。
In step S803, the CG scene generation unit 407 refers to the read tracking data and duplicates a model according to the attribute. For example, the CG scene generation unit 407 counts the number of subjects nA having the team A attribute. Then, nA
ステップS804においてCGシーン生成部407は、フィールドモデル907を除く全CGモデルに対して、ステップS802で読み込んだトラッキングデータに基づいて2次元位置情報を設定する。図9においては、各モデルが必要分複製され、フィールドモデル907上に配置されていることが確認できる。また、トラッキングデータは、フレーム単位で記録されている2次元位置情報であるので、フレームが進むごとに被写体が移動するCGシーンが構築できる。
In step S804, the CG scene generation unit 407 sets two-dimensional position information for all CG models except the
ステップS805において表示制御部410は、図3(a)のCGウィンドウ310に、生成されたCGシーンを表示する。以上の処理により、CGシーンの生成処理が終了する。即ち、表示制御部410は、カメラ群111の撮影対象領域を示す画像であるフィールドモデル907上において、取得された位置情報に対応する位置に、被写体である選手等のオブジェクトを示す情報であるCGモデルを重畳して表示させる。
In step S805, the display control unit 410 displays the generated CG scene on the CG window 310 of FIG. With the above processing, the CG scene generation processing ends. In other words, the display control unit 410 is CG which is information indicating an object such as a player who is a subject at a position corresponding to the acquired position information on the
なお、このとき、全被写体の高さ情報(Z座標値)は0に設定されている。このため、フィールドに接地していないことがあるボールに対しては、被写体位置情報が正しくない可能性がある。このため、生成されたCGシーンにおいて、ボールの位置が正しくない可能性がある。そこで、引き続き図5のステップS507において特定の被写体(ボール)の被写体位置情報(3次元情報)の取得処理が行われる。 At this time, the height information (Z coordinate value) of all subjects is set to zero. For this reason, the subject position information may not be correct for a ball that may not be in contact with the field. For this reason, the position of the ball may be incorrect in the generated CG scene. Accordingly, in step S507 in FIG. 5, the process of acquiring subject position information (three-dimensional information) of a specific subject (ball) is performed.
<特定の被写体の被写体位置情報(3次元情報)の取得処理>
図10は、図5のステップS507のボールの3次元位置取得処理の詳細を示したフローチャート図である。この処理は、図8の処理において、誤って設定された可能性がある特定の被写体(ボール)の位置情報を修正する処理に相当する。なお、ボールが空中に存在しないような場面について仮想カメラパスを設定することもある。例えば、ドリブルの場面を再現したい場合などである。このように、ボールの3次元位置の取得が明らかに必要ない場合も想定される。そこで、本実施形態では、必要に応じてユーザが、図3(a)のカメラパス設定ダイアログ330のボール高さ設定ボタン332を押下することにより特定の被写体の3次元位置情報を取得する処理を開始する。なお、このようにユーザによる指示に拠らずに、図10の処理が開始されてもよい。
<Acquisition processing of subject position information (three-dimensional information) of a specific subject>
FIG. 10 is a flowchart showing details of the three-dimensional position acquisition process of the ball in step S507 of FIG. This process corresponds to the process of correcting the position information of a specific subject (ball) that may have been set incorrectly in the process of FIG. A virtual camera pass may be set for a scene where the ball does not exist in the air. For example, when it is desired to reproduce a dribble scene. In this way, it may be assumed that acquisition of the three-dimensional position of the ball is clearly unnecessary. Therefore, in the present embodiment, a process in which the user acquires the three-dimensional position information of a specific subject by pressing the ball
ステップS1001において3次元位置情報取得部408は、鳥瞰図画像における処理対象のフレームにおけるボールのシルエット領域を取得する。ステップS1002において3次元位置情報取得部408は、ボールのシルエット領域の面積(画素数)S1を算出する。ステップS1003において3次元位置情報取得部408は、3次元空間内でのトラッキングカメラ204の位置とボールのシルエットの中心座標とを結ぶ直線L(図11(a)参照)を算出する。図11は、3次元位置情報の取得処理の概要を説明する図である。図11(a)に示すように、ボールの正しい位置は、この直線L上のいずれかに存在する。なお、トラッキングカメラ204の3次元空間における位置や撮影パラメータは既知であり、これらの既知の情報とシルエットの中心座標とを用いて直線Lは算出される。
In step S1001, the three-dimensional position
ここで、トラッキングカメラ204とボールとの間の距離と、ボールのシルエット領域との面積は反比例関係にある。図11(a)と図11(b)は、直線L上でのボール位置を異ならせた場合の例を示している。図11(a)と図11(b)とにおけるトラッキングカメラ204とボールと間の距離を比較すると、図11(b)の方が長い。このため、図11(b)の方が、図11(a)に比べて鳥瞰図画像におけるボールのシルエット領域は小さくなっていることがわかる。本実施形態では、このようなボールのシルエット領域の大きさを用いてボールの3次元位置情報が取得されることになる。
Here, the distance between the tracking
ステップS1004において3次元位置情報取得部408は、ステップS506において生成したCGシーンにおいて、トラッキングカメラ204と同じ3次元位置に、CGトラッキングカメラ1101を配置する。このとき、トラッキングカメラ204とCGトラッキングカメラ1101の撮影パラメータ(焦点距離など)は共通化しておく。
In step S1004, the three-dimensional position
ステップS1005において3次元位置情報取得部408は、CGシーン中に直線Lを設定する。そして、直線L上にボールモデル906を配置する。つまり、トラッキングカメラ204で撮影した画像と同じ構図の画像を、CGシーンを用いて再現する処理が行われる。そして、再現されたCGシーンにおけるボールのシルエットの面積が、実画像を変換した鳥瞰図画像のボールのシルエットと等しくなるような位置が、ボールの3次元位置であるものとして推定されることになる。本実施形態では、ボールモデル906の配置位置をずらしながら適切なボールの位置を求める処理を行う。ステップS1005では、ボールモデル906はCGトラッキングカメラ1101に近い位置に配置される。
In step S1005, the three-dimensional position
ステップS1006において修正部409は、CGトラッキングカメラ1101から見たCG画像をレンダリングする。ステップS1007において修正部409は、レンダリングされたCG画像を射影変換し、CG鳥瞰図画像を生成する。CG鳥瞰図画像の生成は、前述した鳥瞰図画像の生成と同様の方法で行うことができる。
In step S1006, the
ステップS1008において3次元位置情報取得部408は、CG鳥瞰図画像におけるボールモデルのシルエット面積(画素数)S2を算出する。CG鳥瞰図画像におけるシルエット画像の生成についても、前述した鳥瞰図画像からシルエット画像を生成する方法と同様の方法で行うことができる。ステップS1009において3次元位置情報取得部408は、面積S1と面積S2との差分を算出し、差分値が、所定の閾値未満であるかを判定する。差分値が、所定の閾値未満であれば、シルエットが一致したと見なして処理対象のフレームに対する一連の処理を終了し、ステップS1011に進む。差分値が閾値以上であれば、ステップS1010に進む。ステップS1010において修正部409は、ボールモデル906の位置を更新し、ステップS1006に進む。
In step S1008, the three-dimensional position
ステップS1005からS1010の概要を、図10(c)を用いて説明する。CGシーン中の直線L上にボールモデルを配置し、CG鳥瞰図画像を生成することで、CGシーンにおけるボールモデル906のシルエットと実空間におけるボールのシルエットが比較可能となる。そして、双方のサイズが一致した場合、その際のボールモデル906の3次元位置が、実空間におけるボールの3次元位置となる。ステップS1010においては、ボールモデル906の3次元座標値をCGトラッキングカメラとの距離が大きくなるよう、直線L上でボールモデル906の位置が調整される。
An outline of steps S1005 to S1010 will be described with reference to FIG. By arranging the ball model on the straight line L in the CG scene and generating the CG bird's eye view image, the silhouette of the
ステップS1011では、全フレームの処理が終了したかが判定される。全フレームの処理が終了していない場合、ステップS1012に進み、未処理のフレームを処理対象のフレームと設定し、ステップS1001に戻り、処理を繰り返す。以上の処理により、ボールの正確な3次元位置が設定可能となる。 In step S1011, it is determined whether processing of all frames has been completed. If the processing of all frames has not been completed, the process proceeds to step S1012, the unprocessed frame is set as the processing target frame, the process returns to step S1001, and the process is repeated. Through the above processing, an accurate three-dimensional position of the ball can be set.
その後、前述したように、特定の被写体(ボール)の被写体位置情報を修正したCGシーンが生成される。また、生成されたCGシーンに基づいて仮想カメラパスの設定などが行われることになる。 Thereafter, as described above, a CG scene in which subject position information of a specific subject (ball) is corrected is generated. In addition, a virtual camera path is set based on the generated CG scene.
以上説明したように、本実施形態においては、3次元の被写体位置情報を取得する対象を特定の被写体に絞り込むことで、1台のカメラ画像から、被写体位置情報を高精度かつ短時間に取得することが可能となる。また、CGにより選手である被写体の位置をフィールドと対応付けて示すため、実空間での被写体の位置をユーザが特定可能にすることができる。したがって、ユーザは、所望とする仮想視点画像を得るための仮想カメラパスを容易に設定することができる。 As described above, in the present embodiment, the subject position information is acquired with high accuracy and in a short time from one camera image by narrowing down the target for acquiring the three-dimensional subject position information to a specific subject. It becomes possible. Further, since the position of the subject that is the player is indicated by the CG in association with the field, the user can specify the position of the subject in the real space. Therefore, the user can easily set a virtual camera path for obtaining a desired virtual viewpoint image.
<<実施形態2>>
本実施形態では、被写体位置の取得に際して、ボールが楕円状のラグビー競技を題材として説明を行う。なお、処理の大半は実施形態1と共通であるため、重複する部分については説明を省略する。
<< Embodiment 2 >>
In the present embodiment, the acquisition of the subject position will be described using a rugby game with an elliptical ball as a theme. Since most of the processing is the same as that of the first embodiment, the description of the overlapping parts is omitted.
図12は、図5のステップS506の3次元位置情報の取得処理の詳細を示したフローチャート図である。ステップS1202、S1208、S1209以外は図10と同じ処理であるため、説明を省略する。ステップS1202において3次元位置情報取得部408は、ボールのシルエット領域の面積(画素数)S1と離心率r1とを算出する。離心率は楕円の長軸aと短軸bの比率を表すもので、ボールの回転方向が同じならば一定の値となる。ボールが楕円状の場合、同じ3次元位置にボールがあったとしても、ボールの回転方向に応じてシルエット領域の面積が異なる。そこで、本実施形態では、離心率を考慮した処理を行う。離心率は、以下の式3で算出できる。
FIG. 12 is a flowchart showing details of the three-dimensional position information acquisition process in step S506 of FIG. Except for steps S1202, S1208, and S1209, the processing is the same as that shown in FIG. In step S1202, the three-dimensional position
ステップS1208において3次元位置情報取得部408は、CG鳥瞰図画像におけるボールモデルのシルエット面積(画素数)S2と離心率r2とを算出する。ステップS1209において修正部409は、ボールモデルの位置を変えずに回転のみを行い、r1とr2が等しくまで回転を繰り返す。これにより、ボールモデルと実空間のボールの回転方向が一致する。そして、回転方向を一致させた状態で、ステップS1210においてシルエット面積の比較が行われることになる。このように、本実施形態の処理によれば、ラグビーのように、楕円状のボールに対しても正確な3次元位置が設定可能となる。なお、この例では離心率を基に回転方向を決定する手法に関して説明しているが、楕円形状を表すパラメータであれば何でも構わない。
In step S1208, the three-dimensional position
以上説明したように、回転方向を考慮することにより、楕円状のボールを用いる競技においても、1台のカメラ画像から、仮想視点画像生成に特化した被写体位置情報を高精度かつ短時間に取得することができる。 As described above, by considering the rotation direction, subject position information specialized for virtual viewpoint image generation can be obtained with high accuracy and in a short time from a single camera image even in a game using an elliptical ball. can do.
<<その他の実施形態>>
以上説明した実施形態では、サッカー競技とラグビー競技とを題材に説明したが、これらに限られるものではない。フィールド上において任意の球技を行う形態に本発明を適用することは可能である。また、球技だけでなく、スケート、相撲、コンサートなど様々な撮影対象にも本発明を適用することは可能である。また、3次元位置情報を取得する被写体は、円状(球状)または楕円状の被写体の形状を例に挙げて説明したが、これに限られない。例えば、バドミントンのシャトルのように、特定の形状の被写体を、3次元位置情報を取得する対象の被写体として用いることができる。
<< Other Embodiments >>
In the embodiment described above, the soccer competition and the rugby competition have been described as the theme, but the present invention is not limited to these. It is possible to apply the present invention to a form in which an arbitrary ball game is performed on the field. Further, the present invention can be applied not only to ball games but also to various shooting objects such as skating, sumo, and concerts. Further, the subject from which the three-dimensional position information is acquired has been described by taking the shape of a circular (spherical) or elliptical subject as an example, but is not limited thereto. For example, a subject having a specific shape, such as a badminton shuttle, can be used as a subject to acquire three-dimensional position information.
また、CGウィンドウ310において、選手CGモデル312に個人を識別するための背番号や顔画像をテクスチャとしてマッピングしてもよい。 本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 Further, in the CG window 310, a back number or a face image for identifying an individual may be mapped to the player CG model 312 as a texture. The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
トラッキングカメラ 204
画像変換部 404
2次元位置情報取得部 405
3次元位置情報取得部 408
Two-dimensional position
3D position
Claims (22)
前記複数のカメラの撮影対象領域を撮影した画像に基づいて、当該画像に写るオブジェクトの位置情報を取得する取得手段と、
前記撮影対象領域を示すコンピュータグラフィックにおいて、前記取得手段により取得された位置情報に対応する位置に、前記オブジェクトを示す情報を表示させる表示制御手段と、
前記表示制御手段により前記オブジェクトを示す情報を表示させている状態で、仮想視点画像に係る視点の位置の指定を受け付ける受付手段と、
を備えることを特徴とする画像処理装置。 An image processing apparatus that accepts designation of a viewpoint position related to a virtual viewpoint image generated using a plurality of images photographed by a plurality of cameras,
An acquisition means for acquiring position information of an object shown in the image based on an image obtained by imaging the imaging target areas of the plurality of cameras;
Display control means for displaying information indicating the object at a position corresponding to the position information acquired by the acquisition means in the computer graphic indicating the imaging target area;
Accepting means for accepting designation of the position of the viewpoint related to the virtual viewpoint image in a state where the information indicating the object is displayed by the display control means;
An image processing apparatus comprising:
前記鳥瞰図画像から、被写体の2次元の位置情報を取得する第一の取得手段と、
前記2次元の位置情報を用いて、前記被写体を含む前記フィールドの領域をCG(コンピュータグラフィック)モデルで再現したCGシーンを生成する生成手段と、
前記CGシーンを用いて特定の被写体の3次元の位置情報を取得する第二の取得手段と、
前記特定の被写体の3次元の位置情報を用いて前記特定の被写体の位置情報を修正する修正手段と
を備えることを特徴とする画像処理装置。 Conversion means for converting an image of the field into a bird's eye view image of the field viewed from above;
First acquisition means for acquiring two-dimensional position information of a subject from the bird's eye view image;
Generating means for generating a CG scene in which a region of the field including the subject is reproduced by a CG (computer graphic) model using the two-dimensional position information;
Second acquisition means for acquiring three-dimensional position information of a specific subject using the CG scene;
An image processing apparatus comprising: correction means for correcting position information of the specific subject using three-dimensional position information of the specific subject.
指定された仮想カメラパスを設定する設定手段と
をさらに備えることを特徴とする請求項7または8に記載の画像処理装置。 Display control means for displaying the CG scene on a screen;
9. The image processing apparatus according to claim 7, further comprising setting means for setting a designated virtual camera path.
前記設定された仮想カメラパスに従って前記複数の画像を用いた仮想視点画像を生成する第二の画像生成手段をさらに備えることを特徴とする請求項9または10に記載の画像処理装置。 Third acquisition means for acquiring a plurality of images obtained by photographing the field from a plurality of viewpoints;
The image processing apparatus according to claim 9, further comprising a second image generation unit configured to generate a virtual viewpoint image using the plurality of images according to the set virtual camera path.
前記鳥瞰図画像から被写体のシルエットを抽出し、
前記シルエットの所定方向における最小値の座標を、それぞれの被写体の2次元の位置情報として取得することを特徴とする請求項7から12のいずれか一項に記載の画像処理装置。 The first acquisition means includes
Extract the silhouette of the subject from the bird's eye view image,
The image processing apparatus according to claim 7, wherein coordinates of a minimum value in a predetermined direction of the silhouette are acquired as two-dimensional position information of each subject.
前記第二の取得手段は、前記鳥瞰図画像における前記特定の被写体のシルエットの面積と前記CG鳥瞰図画像における前記特定の被写体のCGモデルのシルエットの面積とが、所定の閾値未満となるCGモデルの位置を、前記特定の被写体の3次元の位置情報として取得することを特徴とする請求項13から15のいずれか一項に記載の画像処理装置。 The generation unit generates a CG image having the same composition as an image obtained by photographing the field using the CG scene, generates a CG bird's eye view image from the generated CG image,
The second acquisition means includes a position of a CG model where an area of the silhouette of the specific subject in the bird's-eye view image and an area of the silhouette of the CG model of the specific subject in the CG bird's-eye view image are less than a predetermined threshold. The image processing apparatus according to claim 13, wherein the image processing device is acquired as three-dimensional position information of the specific subject.
前記鳥瞰図画像から、被写体の2次元の位置情報を取得するステップと、
前記2次元の位置情報を用いて、前記被写体を含む前記フィールドの領域をCG(コンピュータグラフィック)モデルで再現したCGシーンを生成するステップと、
前記CGシーンを用いて特定の被写体の3次元の位置情報を取得するステップと、
前記特定の被写体の3次元の位置情報を用いて前記特定の被写体の位置情報を修正するステップと
を備えることを特徴とする画像処理方法。 Converting an image of the field into a bird's eye view image of the field viewed from above;
Obtaining two-dimensional position information of the subject from the bird's eye view image;
Using the two-dimensional position information to generate a CG scene in which a field area including the subject is reproduced by a CG (computer graphic) model;
Obtaining three-dimensional position information of a specific subject using the CG scene;
And correcting the position information of the specific subject using three-dimensional position information of the specific subject.
前記複数のカメラの撮影対象領域を撮影した画像に基づいて、当該画像に写るオブジェクトの位置情報を取得する取得工程と、
前記撮影対象領域を示すコンピュータグラフィックにおいて、前記取得工程において取得された位置情報に対応する位置に、前記オブジェクトを示す情報を表示させる表示制御工程と、
前記表示制御工程において前記オブジェクトを示す情報を表示させている状態で、仮想視点画像に係る視点の位置の指定を受け付ける受付工程と、
を備えることを特徴とする画像処理方法。 An image processing method by an image processing apparatus that accepts designation of a viewpoint position related to a virtual viewpoint image generated using a plurality of images photographed by a plurality of cameras,
An acquisition step of acquiring position information of an object shown in the image based on an image obtained by imaging the imaging target areas of the plurality of cameras;
In the computer graphic indicating the shooting target area, a display control step of displaying information indicating the object at a position corresponding to the position information acquired in the acquisition step;
An accepting step of accepting designation of a position of a viewpoint related to a virtual viewpoint image in a state in which information indicating the object is displayed in the display control step;
An image processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017180439A JP2019057070A (en) | 2017-09-20 | 2017-09-20 | Image processing device, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017180439A JP2019057070A (en) | 2017-09-20 | 2017-09-20 | Image processing device, image processing method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2019057070A true JP2019057070A (en) | 2019-04-11 |
Family
ID=66107433
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017180439A Pending JP2019057070A (en) | 2017-09-20 | 2017-09-20 | Image processing device, image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2019057070A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020187385A (en) * | 2019-05-09 | 2020-11-19 | エヌ・ティ・ティ・コミュニケーションズ株式会社 | Geometric parameter estimation device, geometric parameter estimation system, geometric parameter estimation method and computer program |
JP2021056767A (en) * | 2019-09-30 | 2021-04-08 | キヤノン株式会社 | Image generation system, image processing device, information processing device, image generation method, and program |
-
2017
- 2017-09-20 JP JP2017180439A patent/JP2019057070A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020187385A (en) * | 2019-05-09 | 2020-11-19 | エヌ・ティ・ティ・コミュニケーションズ株式会社 | Geometric parameter estimation device, geometric parameter estimation system, geometric parameter estimation method and computer program |
JP7334058B2 (en) | 2019-05-09 | 2023-08-28 | エヌ・ティ・ティ・コミュニケーションズ株式会社 | Geometric parameter estimation device, geometric parameter estimation system, geometric parameter estimation method, and computer program |
JP2021056767A (en) * | 2019-09-30 | 2021-04-08 | キヤノン株式会社 | Image generation system, image processing device, information processing device, image generation method, and program |
JP7458731B2 (en) | 2019-09-30 | 2024-04-01 | キヤノン株式会社 | Image generation system, image processing device, information processing device, image generation method, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Achenbach et al. | Fast generation of realistic virtual humans | |
US10705678B2 (en) | Image processing apparatus, image processing method, and storage medium for generating a virtual viewpoint image | |
US9348950B2 (en) | Perceptually guided capture and stylization of 3D human figures | |
CN105809701B (en) | Panoramic video posture scaling method | |
CN103140879B (en) | Information presentation device, digital camera, head mounted display, projecting apparatus, information demonstrating method and information are presented program | |
Shen et al. | Virtual mirror rendering with stationary rgb-d cameras and stored 3-d background | |
JP6302132B2 (en) | Image processing apparatus, image processing system, image processing method, and program | |
US9361660B2 (en) | Image processing device and method, supplement image generation device and method, program, and recording medium | |
US10785469B2 (en) | Generation apparatus and method for generating a virtual viewpoint image | |
JP2018081410A (en) | Computer program | |
JP2012185772A (en) | Method and program for enhancing accuracy of composited picture quality of free viewpoint picture using non-fixed zoom camera | |
JP2019197279A (en) | Image processing apparatus, method for controlling image processing apparatus, and program | |
JP2013120556A (en) | Object attribute estimation device and video plotting device | |
JP2016071645A (en) | Object three-dimensional model restoration method, device, and program | |
JP7403967B2 (en) | Information processing device, video generation device, image processing system, control method and program thereof | |
JP2008217593A (en) | Subject area extraction device and subject area extraction program | |
JP6555755B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2019057070A (en) | Image processing device, image processing method, and program | |
JP7318814B2 (en) | DATA GENERATION METHOD, DATA GENERATION PROGRAM AND INFORMATION PROCESSING DEVICE | |
JP6799468B2 (en) | Image processing equipment, image processing methods and computer programs | |
Calagari et al. | Sports VR content generation from regular camera feeds | |
JP6392739B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2017111620A (en) | Image processing device, image processing method and image processing program | |
JP2021016081A (en) | Information processing device, information processing method, and program | |
JP6450306B2 (en) | Image processing apparatus, image processing method, and image processing program |