JP5795556B2 - Shadow information deriving device, shadow information deriving method and program - Google Patents

Shadow information deriving device, shadow information deriving method and program Download PDF

Info

Publication number
JP5795556B2
JP5795556B2 JP2012141254A JP2012141254A JP5795556B2 JP 5795556 B2 JP5795556 B2 JP 5795556B2 JP 2012141254 A JP2012141254 A JP 2012141254A JP 2012141254 A JP2012141254 A JP 2012141254A JP 5795556 B2 JP5795556 B2 JP 5795556B2
Authority
JP
Japan
Prior art keywords
shadow information
reference object
shadow
scene image
unit
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.)
Expired - Fee Related
Application number
JP2012141254A
Other languages
Japanese (ja)
Other versions
JP2014006658A (en
Inventor
泰洋 八尾
泰洋 八尾
春美 川村
春美 川村
明 小島
明 小島
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2012141254A priority Critical patent/JP5795556B2/en
Publication of JP2014006658A publication Critical patent/JP2014006658A/en
Application granted granted Critical
Publication of JP5795556B2 publication Critical patent/JP5795556B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、陰影情報を導出する技術に関する。   The present invention relates to a technique for deriving shadow information.

拡張現実においては、例えば仮想物体などのCG(コンピュータグラフィックス)オブジェクトをシーン画像に合成する際に、そのCGオブジェクトに陰影を付与することが行われている。このように、CGオブジェクトに対応して陰影を付加することによって、シーン画像においてそのCGオブジェクトが実際に存在しているかのように見せることができる。   In augmented reality, for example, when a CG (computer graphics) object such as a virtual object is combined with a scene image, a shadow is added to the CG object. In this way, by adding a shadow corresponding to the CG object, it is possible to make it appear as if the CG object actually exists in the scene image.

上記のように陰影を付加するのにあたっては陰影情報が利用される。陰影情報とは、シーン画像におけるCGオブジェクトの合成位置に対応させて実シーンにCGオブジェクトの実体を位置させたとした場合に生じる陰影が、シーン画像においてはどのように表現されるのかを示す情報である。   As described above, shadow information is used to add a shadow. The shadow information is information indicating how the shadow generated when the entity of the CG object is located in the actual scene in correspondence with the synthesis position of the CG object in the scene image is expressed in the scene image. is there.

陰影情報の導出は、例えば、シーンにおける光源に関する情報(光源情報)を推定し、この光源情報に基づいてCGオブジェクトのレンダリングを行うことにより実現されている。
光源情報を推定するにあたり、例えば全方位を撮像する全方位カメラを利用するというものが知られている(例えば、非特許文献1および非特許文献2参照)。この手法は、全方位を撮像した画像のいずれかの部分において光源が撮像されていることを前提としている。そのうえで、この手法は、全方位カメラにより撮像した画像に基づいて、シーン画像に対応する光源の位置、色、位置、強度などを推定するというものである。
The derivation of the shadow information is realized, for example, by estimating information (light source information) about the light source in the scene and rendering the CG object based on the light source information.
In estimating the light source information, for example, an omnidirectional camera that captures an omnidirectional image is used (see, for example, Non-Patent Document 1 and Non-Patent Document 2). This method is based on the premise that a light source is imaged in any part of an image obtained by imaging all directions. In addition, this method estimates the position, color, position, intensity, and the like of the light source corresponding to the scene image based on the image captured by the omnidirectional camera.

また、金属球を利用する手法が知られている(例えば、非特許文献3参照)。この手法は、上記の全方位カメラに準じた考え方に基づいている。つまり、この手法は、金属球に映った周囲のシーンの映像において光源も含まれていることを前提とする。そのうえで、この手法は、周囲のシーンが映り込んでいる金属球の画像に基づいて光源の位置、色、位置、強度などを推定するものである。
また、拡散反射面を有する白色球を利用する手法が知られている(例えば、非特許文献4参照)。この手法では、白色球の画像において現れている陰影に基づいて、その白色球の周囲における光源の色、強度、方向等を推定するものである。
さらに、反射特性が既知の平面において生じる形状が既知の物体の影に基づいて光源分布を推定するという手法も知られている(例えば、非特許文献5参照)。
Further, a technique using a metal sphere is known (for example, see Non-Patent Document 3). This method is based on the idea according to the above-mentioned omnidirectional camera. That is, this method is based on the premise that a light source is also included in an image of a surrounding scene reflected on a metal sphere. In addition, this method estimates the position, color, position, intensity, and the like of the light source based on the image of the metal sphere in which the surrounding scene is reflected.
In addition, a method using a white sphere having a diffuse reflection surface is known (for example, see Non-Patent Document 4). In this method, the color, intensity, direction, and the like of the light source around the white sphere are estimated based on the shadow appearing in the white sphere image.
Furthermore, a method of estimating a light source distribution based on a shadow of an object whose reflection characteristics are known on a known plane is also known (see, for example, Non-Patent Document 5).

Imari Sato, Yoichi Sato, and Katsushi Ikeuchi, Acquiring a radiance distribution to superimpose virtual objects onto a real scene, IEEE Transactions on Visualization and Computer Graphics, Volume 5, Issue 1, pages 1-12, 1999.Imari Sato, Yoichi Sato, and Katsushi Ikeuchi, Acquiring a radiance distribution to superimpose virtual objects onto a real scene, IEEE Transactions on Visualization and Computer Graphics, Volume 5, Issue 1, pages 1-12, 1999. 佐藤いまり,林田守広,甲斐郁代,佐藤洋一,池内克史,実光環境下での画像生成 : 基礎画像の線形和による高速レンダリング手法, 電子情報通信学会論文誌. D−II,情報・システム,II−パターン処理 J84−D−II(8),pages 1864−1872,2001.Imari Sato, Morihiro Hayashida, Kaiyo, Yoichi Sato, Katsushi Ikeuchi, Image Generation under Real Light Environment: High-speed rendering method based on linear sum of basic images, IEICE Transactions. D-II, Information / System, II-Pattern processing J84-D-II (8), pages 1864-1872, 2001. Kusuma Agusanto, Li Li, Zhu Chuangui, and Ng Wan Sing, Photorealistic rendering for augmented reality using environment illumination, Proceedings of the Second IEEE and ACM International Symposium on Mixed and Augmented Reality (ISMAR), pages 208-216, 2003.Kusuma Agusanto, Li Li, Zhu Chuangui, and Ng Wan Sing, Photorealistic rendering for augmented reality using environment illumination, Proceedings of the Second IEEE and ACM International Symposium on Mixed and Augmented Reality (ISMAR), pages 208-216, 2003. Miika Aittala, Inverse lighting and photorealistic rendering or augmented reality, The Visual Computer, Volume 26, Issue 6, pages 669-678, 2010.Miika Aittala, Inverse lighting and photorealistic rendering or augmented reality, The Visual Computer, Volume 26, Issue 6, pages 669-678, 2010. 佐藤いまり,佐藤洋一,池内克史,物体の陰影に基づく光源環境の推定,情報処理学会誌:コンピュータビジョンとイメージメディア,Volume 41,Number SIG 10(CVIM 1),pages 31−40,2000.Imari Sato, Yoichi Sato, Katsushi Ikeuchi, Estimation of light source environment based on object shadow, Journal of Information Processing Society of Japan: Computer Vision and Image Media, Volume 41, Number SIG 10 (CVIM 1), pages 31-40, 2000.

非特許文献1、2による手法を利用する場合には全方位カメラが必要である。この全方位カメラは、例えば魚眼レンズを備える特殊な機器であって、例えばコンシューマなどともいわれる一般のエンドユーザが手軽に入手できるものではない。
また、非特許文献3、4による手法の場合にも、金属球あるいは拡散反射面を有する白色球を準備する必要がある。このような金属球や白色球も器具としては特殊でありエンドユーザが容易に入手できるものではない。
また、非特許文献5による手法の場合、物体の形状と平面の反射特性が既知である必要がある。この場合、ユーザは、これらの物体の形状と平面の反射特性を測定しなければならず、このためには、一定以上の専門知識を必要とする。
このように、非特許文献1〜5によるいずれの手法も、例えば一般的でない装置や器具を必要としたり、あるいは、専門知識を必要とする。したがって、非特許文献1〜5のいずれの手法によっても、例えば拡張現実において陰影のあるCGオブジェクトをシーン画像に合成できるような環境をエンドユーザに提供することは難しい。
An omnidirectional camera is required when using the methods described in Non-Patent Documents 1 and 2. This omnidirectional camera is a special device including, for example, a fisheye lens, and is not easily available to a general end user called a consumer.
In the case of the methods according to Non-Patent Documents 3 and 4, it is necessary to prepare a metal sphere or a white sphere having a diffuse reflection surface. Such metal spheres and white spheres are also special as instruments and are not readily available to end users.
In the case of the method according to Non-Patent Document 5, the shape of the object and the reflection characteristics of the plane need to be known. In this case, the user must measure the shape and reflection characteristics of these objects, and this requires a certain level of expertise.
As described above, any method according to Non-Patent Documents 1 to 5 requires, for example, an uncommon apparatus or instrument, or requires specialized knowledge. Therefore, it is difficult to provide an end user with an environment in which, for example, a CG object having a shadow in augmented reality can be combined with a scene image by any of the methods of Non-Patent Documents 1 to 5.

本発明は、このような事情に鑑みてなされたもので、陰影を付与したCGオブジェクトを手軽にシーン画像に合成できる環境をユーザに提供可能とする技術の提供を目的とする。   The present invention has been made in view of such circumstances, and an object of the present invention is to provide a technique that can provide a user with an environment in which a shaded CG object can be easily combined with a scene image.

上述した課題を解決するために、本発明の一態様としての陰影情報導出装置は、シーンとしての画像内容を有するシーン画像に対応するデプスマップに基づいて前記シーン画像が示すシーンの法線マップを導出する法線マップ導出部と、前記シーン画像と前記デプスマップと前記法線マップとの少なくともいずれか1つに基づいて参照物体の領域部分である参照物体領域を抽出する参照物体領域抽出部と、前記シーン画像と前記法線マップと前記参照物体領域とに基づいて陰影情報を導出する陰影情報導出部とを備える。   In order to solve the above-described problem, a shadow information deriving device according to one aspect of the present invention provides a normal map of a scene indicated by the scene image based on a depth map corresponding to a scene image having image content as a scene. A normal map deriving unit for deriving, a reference object region extracting unit for extracting a reference object region that is a region portion of a reference object based on at least one of the scene image, the depth map, and the normal map; A shadow information deriving unit for deriving shadow information based on the scene image, the normal map, and the reference object region.

また、本発明の陰影情報導出装置は、正則化された陰影情報が導出されるように、陰影情報の導出に利用する所定のパラメータを補正する陰影情報正則化部をさらに備える。   The shadow information deriving device of the present invention further includes a shadow information regularization unit that corrects a predetermined parameter used to derive the shadow information so that the regularized shadow information is derived.

また、本発明の一態様としての陰影導出方法は、シーンとしての画像内容を有するシーン画像に対応するデプスマップに基づいて前記シーン画像が示すシーンの法線マップを導出する法線マップ導出ステップと、前記シーン画像と前記デプスマップと前記法線マップとの少なくともいずれか1つに基づいて参照物体の領域部分である参照物体領域を抽出する参照物体領域抽出ステップと、前記シーン画像と前記法線マップと前記参照物体領域とに基づいて陰影情報を導出する陰影情報導出ステップとを備える。   The shadow derivation method as one aspect of the present invention includes a normal map derivation step of deriving a normal map of a scene indicated by the scene image based on a depth map corresponding to a scene image having image content as a scene; A reference object region extracting step of extracting a reference object region that is a region portion of a reference object based on at least one of the scene image, the depth map, and the normal map; and the scene image and the normal vector A shadow information deriving step for deriving shadow information based on the map and the reference object region.

また、本発明の陰影情報導出装置は、正則化された陰影情報が導出されるように、陰影情報の導出に利用する所定のパラメータを補正する陰影情報正則化ステップをさらに備える。   The shadow information deriving device of the present invention further includes a shadow information regularization step for correcting a predetermined parameter used for deriving the shadow information so that the regularized shadow information is derived.

また、本発明の一態様としてのプログラムは、コンピュータを、上記の陰影情報導出装置として機能させるためのものである。   A program as one aspect of the present invention is for causing a computer to function as the above-described shadow information deriving device.

以上説明したように、本発明によれば、陰影を付与したCGオブジェクトを手軽にシーン画像に合成できる環境をユーザに提供できるという効果が得られる。   As described above, according to the present invention, it is possible to provide the user with an environment in which a shaded CG object can be easily combined with a scene image.

本発明の第1の実施形態における陰影情報導出装置の構成例を示す図である。It is a figure which shows the structural example of the shadow information derivation | leading-out apparatus in the 1st Embodiment of this invention. シーン画像の一例を示す図である。It is a figure which shows an example of a scene image. デプスマップの一例を示す図である。It is a figure which shows an example of a depth map. 法線マップを可視化して示す図である。It is a figure which visualizes and shows a normal map. 参照物体領域の抽出結果を示す図である。It is a figure which shows the extraction result of a reference object area | region. 本実施形態において利用する球面調和関数を可視化して示す図である。It is a figure which visualizes and shows the spherical harmonic function utilized in this embodiment. 本実施形態における陰影情報を可視化して示す図である。It is a figure which visualizes and shows the shadow information in this embodiment. 陰影情報により陰影を付与したCGオブジェクトの一例を示す図である。It is a figure which shows an example of the CG object which provided the shadow by the shadow information. 陰影情報により陰影を付与したCGオブジェクトが合成されたシーン画像の一例を示す図である。It is a figure which shows an example of the scene image with which the CG object which provided the shadow by the shadow information was synthesize | combined. 第1の実施形態における陰影情報導出装置が実行する処理手順例を示す図である。It is a figure which shows the example of a process sequence which the shadow information derivation | leading-out apparatus in 1st Embodiment performs. 第2の実施形態における陰影情報導出装置の構成例を示す図である。It is a figure which shows the structural example of the shadow information derivation | leading-out apparatus in 2nd Embodiment. シーン画像の一例を示す図である。It is a figure which shows an example of a scene image. デプスマップの一例を示す図である。It is a figure which shows an example of a depth map. 本実施形態の陰影情報正則化部により正則化されていない陰影情報を可視化して示す図である。It is a figure which visualizes and shows the shadow information which is not regularized by the shadow information regularization part of this embodiment. 本実施形態の陰影情報正則化部により正則化された陰影情報を可視化して示す図である。It is a figure which visualizes and shows the shadow information regularized by the shadow information regularization part of this embodiment. 第2の実施形態における陰影情報導出装置が実行する処理手順例を示す図である。It is a figure which shows the example of a process sequence which the shadow information derivation | leading-out apparatus in 2nd Embodiment performs.

<第1の実施形態>
[陰影情報導出装置の構成例]
以下、本発明の第1の実施形態の陰影情報導出装置について説明する。本実施形態の陰影情報導出装置は、シーン画像と、このシーン画像についてのデプスマップを入力して陰影情報を導出する。
<First Embodiment>
[Configuration example of shadow information deriving device]
The shadow information deriving device according to the first embodiment of the present invention will be described below. The shadow information deriving device of this embodiment derives shadow information by inputting a scene image and a depth map for the scene image.

本実施形態において、陰影情報とは、シーン画像におけるCG(コンピュータグラフィックス)オブジェクトの合成位置に対応させて実シーンにCGオブジェクトの実体を位置させたとした場合に生じる陰影を、シーン画像において表現するための情報である。この陰影情報は、CGオブジェクトを合成したシーン画像において、CGオブジェクトの位置やシーンの照明に応じた陰影を与えるのに利用される。このようにして陰影が与えられることで、シーン画像においてCGオブジェクトが自然に見えることになり、CGオブジェクトが合成されたシーン画像の現実感が向上する。   In the present embodiment, the shading information represents in the scene image the shading that occurs when the entity of the CG object is located in the actual scene in correspondence with the synthesis position of the CG (computer graphics) object in the scene image. It is information for. This shadow information is used to give a shadow according to the position of the CG object and the illumination of the scene in the scene image obtained by combining the CG objects. By giving the shadow in this way, the CG object looks natural in the scene image, and the realism of the scene image combined with the CG object is improved.

図1は、第1の実施形態における陰影情報導出装置100の構成例を示している。この図に示す陰影情報導出装置100は、シーン画像入力部101、デプスマップ入力部102、法線マップ導出部103、参照物体領域抽出部104、陰影情報導出部105の各機能部を備える。なお、これらの機能部は、例えばCPU(Central Processing Unit)などがプログラムを実行することにより実現される。また、陰影情報導出装置100は、記憶部106、表示部107および操作部108などのデバイスを備える。   FIG. 1 shows a configuration example of a shadow information deriving device 100 in the first embodiment. The shadow information deriving device 100 shown in this figure includes a scene image input unit 101, a depth map input unit 102, a normal map deriving unit 103, a reference object region extracting unit 104, and a shadow information deriving unit 105. Note that these functional units are realized by, for example, a CPU (Central Processing Unit) executing a program. The shadow information deriving device 100 includes devices such as a storage unit 106, a display unit 107, and an operation unit 108.

シーン画像入力部101は、シーンとしての画像内容を有するシーン画像201を外部から入力し、記憶部106に記憶させる。
本実施形態におけるシーン画像201は、例えば現実の或る環境を撮像して得られた画像であればよい。
図2は、上記のように現実の或る環境を撮像して得られたシーン画像201の画像内容の一例を示している。
The scene image input unit 101 inputs a scene image 201 having an image content as a scene from the outside, and stores it in the storage unit 106.
The scene image 201 in the present embodiment may be an image obtained by imaging a certain real environment, for example.
FIG. 2 shows an example of the image content of the scene image 201 obtained by imaging a certain real environment as described above.

デプスマップ入力部102は、シーン画像201に対応するデプスマップ202を外部から入力し、記憶部106に記憶させる。このデプスマップ202は、シーン画像201における被写空間に含まれる被写体や背景などの対象物に対する視点からの距離を示す信号値(デプス値)を二次元平面に配置された画素ごとの画素値(輝度)とする画像信号である。このデプスマップ202を形成する画素は、シーン画像201を形成する画素と対応する。   The depth map input unit 102 inputs a depth map 202 corresponding to the scene image 201 from the outside, and stores it in the storage unit 106. The depth map 202 is a pixel value (depth value) indicating a distance from a viewpoint to a subject such as a subject or a background included in the scene space in the scene image 201, and a pixel value (pixel value) for each pixel arranged on a two-dimensional plane ( Luminance). The pixels that form the depth map 202 correspond to the pixels that form the scene image 201.

図3は、図2のシーン画像201に対応するデプスマップ202の例を示している。この図に示すデプスマップ202において、各画素に対応する位置の被写体は、その輝度値が高くなるほど撮影位置(視点)との間の距離が長くなっていくことを示す。   FIG. 3 shows an example of the depth map 202 corresponding to the scene image 201 of FIG. In the depth map 202 shown in this figure, the subject at the position corresponding to each pixel indicates that the distance from the shooting position (viewpoint) increases as the luminance value increases.

なお、シーン画像入力部101が入力するシーン画像201とデプスマップ入力部102が入力するデプスマップ202は、コンシューマ(エンドユーザ)向けのRGBカメラとデプスセンサを備えた撮影装置により撮影を行って得ることができる。このような撮影装置の1つとして、例えば、Microsoft CorporationのKinect(登録商標)が知られている。   It should be noted that the scene image 201 input by the scene image input unit 101 and the depth map 202 input by the depth map input unit 102 are obtained by shooting with an RGB camera and a depth sensor for consumers (end users). Can do. As one of such imaging apparatuses, for example, Microsoft Corporation's Kinect (registered trademark) is known.

法線マップ導出部103は、記憶部106に記憶されるデプスマップ202に基づいてシーン画像201が示すシーンの法線マップを導出する。ここでの法線マップは、画素ごとに正則化された物体表面の法線を格納したデータである。   The normal map deriving unit 103 derives a normal map of the scene indicated by the scene image 201 based on the depth map 202 stored in the storage unit 106. The normal map here is data in which normals of the object surface regularized for each pixel are stored.

このために、法線マップ導出部103は、記憶部106からデプスマップ202を読み込む。次に、法線マップ導出部103は、デプスマップ202を形成する各画素の座標(画素座標)とデプス値(画素値)とを利用して、シーンにおける3次元頂点の位置(画素座標)を算出する。次に、法線マップ導出部103は、算出した3次元頂点の1つに注目し、デプスマップ202においてその注目した3次元頂点から縦に隣接する3次元頂点に向かうベクトルと、横に隣接する3次元頂点へと向かうベクトルとを求める。そして、法線マップ導出部103は、これら2つのベクトルの外積を求めることにより、注目した頂点における法線を導出する。
法線マップ導出部103は、上記の手順により画素ごとに法線を求め、これらの法線により法線マップ203を生成する。このように、法線マップ導出部103は法線マップ203を導出する。そして、法線マップ導出部103は、導出した法線マップ203を記憶部106に記憶させる。
For this purpose, the normal map deriving unit 103 reads the depth map 202 from the storage unit 106. Next, the normal map deriving unit 103 uses the coordinates (pixel coordinates) and depth values (pixel values) of the pixels forming the depth map 202 to determine the position (pixel coordinates) of the three-dimensional vertex in the scene. calculate. Next, the normal map deriving unit 103 pays attention to one of the calculated three-dimensional vertices, and horizontally adjoins a vector from the noted three-dimensional vertex to the vertically adjacent three-dimensional vertex in the depth map 202. Find a vector going to the 3D vertex. Then, the normal map deriving unit 103 derives the normal at the target vertex by obtaining the outer product of these two vectors.
The normal map deriving unit 103 obtains a normal for each pixel by the above procedure, and generates a normal map 203 using these normals. As described above, the normal map deriving unit 103 derives the normal map 203. Then, the normal map deriving unit 103 stores the derived normal map 203 in the storage unit 106.

具体例として、法線マップ導出部103は、以下の式(1)により、画素座標(u,v)における法線n(u,v)を求める。   As a specific example, the normal map deriving unit 103 obtains a normal n (u, v) at pixel coordinates (u, v) by the following equation (1).

式(1)によっては、法線ベクトルとしての法線n(u,v)が求められる。なお、式(1)において、d(u,v)は(u,v)における奥行値(デプス)であり、Kはデプスマップ202を撮像した撮像装置(デプスセンサ)の内部パラメータ行列である。この内部パラメータ行列Kは、撮像装置により撮像される撮像平面上の実世界座標を画素座標に変換する行列である。また、撮像平面上の実世界座標の原点は撮影位置であり、撮像平面上の実世界座標の奥行きは、デプスマップ202が示す画素ごとのデプス値に対応する。   Depending on equation (1), a normal n (u, v) as a normal vector is obtained. In Expression (1), d (u, v) is a depth value (depth) in (u, v), and K is an internal parameter matrix of an imaging device (depth sensor) that captures the depth map 202. This internal parameter matrix K is a matrix for converting real world coordinates on the imaging plane imaged by the imaging device into pixel coordinates. The origin of the real world coordinates on the imaging plane is the imaging position, and the depth of the real world coordinates on the imaging plane corresponds to the depth value for each pixel indicated by the depth map 202.

図4は、図3に示したデプスマップ202から導出された法線マップ203を画像により可視化した例を示している。この図に示す法線マップ203は、現実にはRGBにより表現されるカラー画像である。そのうえで、この図の法線マップ203は、例えば、上記のように画素座標ごとに求められた3次元の法線ベクトル成分の値が、それぞれ、対応の画素座標の画素のRGBの各成分の値に変換されている。つまり、図4の法線マップ203の画像は、画素ごとの法線ベクトル成分の値を、色により表現するように可視化している。   FIG. 4 shows an example in which the normal map 203 derived from the depth map 202 shown in FIG. 3 is visualized by an image. The normal map 203 shown in this figure is actually a color image expressed in RGB. In addition, the normal map 203 shown in this figure has, for example, the values of the three-dimensional normal vector components obtained for each pixel coordinate as described above, and the values of the RGB components of the pixels of the corresponding pixel coordinates, respectively. Has been converted. That is, the image of the normal map 203 in FIG. 4 is visualized so that the value of the normal vector component for each pixel is expressed by color.

参照物体領域抽出部104は、シーン画像201とデプスマップ202と法線マップ203との少なくともいずれか1つに基づいて参照物体の領域部分である参照物体領域を抽出する。なお、参照物体は、シーンにおいてCGオブジェクトが配置される位置の光源情報を取得するにあたって陰影情報導出部105が参照する物体である。   The reference object region extraction unit 104 extracts a reference object region that is a region portion of the reference object based on at least one of the scene image 201, the depth map 202, and the normal map 203. The reference object is an object that the shadow information deriving unit 105 refers to when acquiring light source information at a position where the CG object is arranged in the scene.

参照物体領域抽出部104は、例えば以下のように参照物体領域を抽出する。つまり、参照物体領域抽出部104は、記憶部106から、シーン画像201とデプスマップ202と法線マップ203のうちのいずれか1つを抽出対象データとして読み込む。参照物体領域抽出部104は、このように読み込まれた抽出対象データの画像を、例えば表示部107に表示させる。
ユーザは、表示された画像の被写体のうちから参照物体とする物体を決定する。この際、ユーザは、シーン画像に合成するCGオブジェクトにできるだけ近く、また、できるだけ陰影が明確に現れている物体を参照物体として決定するとよい。そして、ユーザは、表示された画像から参照物体が表示されている領域を選択するための所定の操作を操作部108に対して行う。
参照物体領域抽出部104は、読み込みを行った抽出対象データから、上記の操作により選択された領域を参照物体領域204として抽出する。参照物体領域抽出部104は、抽出した参照物体領域204を記憶部106に記憶する。
The reference object area extraction unit 104 extracts the reference object area as follows, for example. That is, the reference object region extraction unit 104 reads any one of the scene image 201, the depth map 202, and the normal map 203 from the storage unit 106 as extraction target data. The reference object region extraction unit 104 displays the image of the extraction target data read in this way on the display unit 107, for example.
The user determines an object to be a reference object from among the subjects of the displayed image. At this time, the user may determine, as a reference object, an object that is as close as possible to the CG object to be combined with the scene image and that has a clear shadow as much as possible. Then, the user performs a predetermined operation on the operation unit 108 for selecting a region where the reference object is displayed from the displayed image.
The reference object region extraction unit 104 extracts the region selected by the above operation as the reference object region 204 from the extracted extraction target data. The reference object area extraction unit 104 stores the extracted reference object area 204 in the storage unit 106.

または、参照物体領域抽出部104は、以下のように参照物体領域204を抽出してもよい。つまり、参照物体領域抽出部104は、記憶部106から、シーン画像201とデプスマップ202と法線マップ203をそれぞれ抽出対象データとして読み込む。そして、参照物体領域抽出部104は、例えば、読み込んだシーン画像201とデプスマップ202と法線マップ203のいずれかの画像を表示部107に表示させる。一例として、ユーザにとっては、シーン画像201が最もシーンを見やすいので、参照物体領域抽出部104は、シーン画像201を表示させればよい。   Alternatively, the reference object region extraction unit 104 may extract the reference object region 204 as follows. That is, the reference object region extraction unit 104 reads the scene image 201, the depth map 202, and the normal map 203 from the storage unit 106 as extraction target data. Then, the reference object region extraction unit 104 causes the display unit 107 to display any one of the read scene image 201, depth map 202, and normal map 203, for example. As an example, since the scene image 201 is most easily seen by the user, the reference object region extraction unit 104 may display the scene image 201.

この場合、ユーザは、表示された画像から参照物体として決定した領域における一部領域を指定する操作を操作部108に対して行う。
参照物体領域抽出部104は、抽出対象データであるシーン画像201とデプスマップ202と法線マップ203のそれぞれに対して個別に閾値を設定している。そのうえで、参照物体領域抽出部104は、操作により指定された一部領域において決定した代表点を起点として、シーン画像201とデプスマップ202と法線マップ203のそれぞれを対象として隣接する画素を探索していく。
In this case, the user performs an operation on the operation unit 108 for designating a partial area in the area determined as the reference object from the displayed image.
The reference object region extraction unit 104 individually sets a threshold value for each of the scene image 201, the depth map 202, and the normal map 203 that is extraction target data. In addition, the reference object region extraction unit 104 searches for adjacent pixels for each of the scene image 201, the depth map 202, and the normal map 203 with the representative point determined in the partial region designated by the operation as a starting point. To go.

そして、参照物体領域抽出部104は、探索過程において、シーン画像201とデプスマップ202と法線マップ203のうちのいずれかにおいて、隣接する画素同士の画素値の差が閾値以上となった場合に、その隣接する画素の境界を、参照物体領域とそれ以外の領域との境界部分として決定する。そして、参照物体領域抽出部104は、シーン画像201とデプスマップ202と法線マップ203との間で上記のように決定された境界部分を総合することにより、参照物体領域としての輪郭の画素座標を特定する。このようにしても、参照物体領域抽出部104は、参照物体領域204を抽出することができる。   Then, the reference object region extraction unit 104 determines that, in the search process, in any one of the scene image 201, the depth map 202, and the normal map 203, the difference in pixel value between adjacent pixels is equal to or greater than a threshold value. The boundary between the adjacent pixels is determined as a boundary portion between the reference object region and the other region. Then, the reference object region extraction unit 104 synthesizes the boundary portion determined as described above among the scene image 201, the depth map 202, and the normal map 203, thereby obtaining pixel coordinates of the contour as the reference object region. Is identified. Even in this way, the reference object region extraction unit 104 can extract the reference object region 204.

なお、参照物体領域抽出部104は、上記のようにデータに閾値を設定して参照物体領域204を抽出する処理について、例えばシーン画像201とデプスマップ202と法線マップ203のうちの2つ以下の組み合わせを対象として行ってもよい。ただし、シーン画像201とデプスマップ202と法線マップ203をすべて利用たほうが、輝度とデプス値と法線方向のすべての情報の組み合わせにより参照物体領域204と背景との境界を特定できるので、参照物体領域204の抽出精度は高くなる。 Note that the reference object region extraction unit 104 performs processing for setting the threshold value in the data and extracting the reference object region 204 as described above, for example, two or less of the scene image 201, the depth map 202, and the normal map 203. A combination of the above may be performed. However, better to use all of the scene image 201 and depth map 202 and normal map 203, it is possible to identify the boundary between the reference object region 204 and the background by the combination of all the information of the luminance and depth value and the normal direction, The extraction accuracy of the reference object area 204 is increased.

図5は、参照物体領域抽出部104による参照物体領域204の抽出結果を画像として示す図である。この図において、参照物体領域204に該当する部分は、黒色の背景画像において白色となっている部分である。この白色の部分は、例えば、図2のシーン画像における人の左上腕部分である。   FIG. 5 is a diagram illustrating an extraction result of the reference object region 204 by the reference object region extraction unit 104 as an image. In this figure, a portion corresponding to the reference object region 204 is a portion that is white in the black background image. This white portion is, for example, the left upper arm portion of the person in the scene image of FIG.

陰影情報導出部105は、シーン画像201と法線マップ203と参照物体領域204とに基づいて陰影情報を導出する。
一具体例として、陰影情報導出部105は、以下のように陰影情報を導出する。
The shadow information deriving unit 105 derives shadow information based on the scene image 201, the normal map 203, and the reference object region 204.
As a specific example, the shadow information deriving unit 105 derives shadow information as follows.

まず、陰影情報導出部105は、記憶部106からシーン画像201と法線マップ203と参照物体領域204とを読み出す。   First, the shadow information deriving unit 105 reads the scene image 201, the normal map 203, and the reference object region 204 from the storage unit 106.

陰影情報導出部105は、読み出した参照物体領域204に含まれる画素ごとに番号n(n=1・・・N)を付す。なお、参照物体領域204に含まれる画素の配列と番号nとの対応は演算結果には影響を及ぼさないので、参照物体領域204に含まれる画素に対する番号nの付与規則については特に限定されない。   The shadow information deriving unit 105 assigns a number n (n = 1... N) to each pixel included in the read reference object region 204. Note that the correspondence between the arrangement of the pixels included in the reference object region 204 and the number n does not affect the calculation result, and therefore the rule for assigning the number n to the pixels included in the reference object region 204 is not particularly limited.

陰影情報導出部105は、陰影情報を導出するのに、球面調和関数を用いる。球面調和関数を用いることによっては、例えば光源数が増加しても問題が複雑にならない、また、少数の基底によって拡散反射の陰影を高精度で表現できるなどの利点がある。   The shadow information deriving unit 105 uses a spherical harmonic function to derive the shadow information. By using the spherical harmonic function, there is an advantage that, for example, the problem does not become complicated even when the number of light sources is increased, and the shadow of diffuse reflection can be expressed with high accuracy by a small number of bases.

球面調和関数は、球面座標(θ,φ)についての関数であり、以下の式(2)により定義される。   The spherical harmonic function is a function with respect to spherical coordinates (θ, φ), and is defined by the following equation (2).

式(2)において、l、mは整数であり、例えば、l≧0、−1≦m≦1である。lは次数を示す。つまり、この例では、「0≦l≦2」の3次による9つの球面調和関数を用いる。また、Klmは正則化係数であり、Plmはルジャンドル(Legendre)陪関数である。   In the formula (2), l and m are integers, for example, l ≧ 0 and −1 ≦ m ≦ 1. l represents the order. That is, in this example, nine spherical harmonic functions of the third order of “0 ≦ l ≦ 2” are used. Klm is a regularization coefficient, and Plm is a Legendre power function.

本実施形態においては、球面調和関数を例えば上記のように9つとするように一定数以下に限定することによって、未知の反射特性の物体から拡散反射の陰影を導出するにあたってのロバスト性を向上させることができる。   In the present embodiment, the robustness in deriving a diffuse reflection shadow from an object having an unknown reflection characteristic is improved by limiting the spherical harmonic functions to a certain number or less, for example, nine as described above. be able to.

図6は、図5に示した参照物体領域204に対応する9つの球面調和関数の例を画像により可視化して示している。   FIG. 6 shows an example of nine spherical harmonic functions corresponding to the reference object region 204 shown in FIG.

陰影情報導出部105は、図6のように表現される9つの球面調和関数を統合するにあたり、球面調和関数ごとに係数(重み)を設定する。このために、例えば、陰影情報導出部105は、以下の式(3)により表される誤差関数E(w)を最小にするような重みwを求める。式(3)において、Inは参照物体領域204中のn番目の画素の輝度値であり、(θn,φn)は同画素の位置における法線ベクトルである。   The shadow information deriving unit 105 sets a coefficient (weight) for each spherical harmonic function when integrating the nine spherical harmonic functions expressed as shown in FIG. For this purpose, for example, the shadow information deriving unit 105 obtains a weight w that minimizes an error function E (w) expressed by the following equation (3). In Expression (3), In is a luminance value of the nth pixel in the reference object region 204, and (θn, φn) is a normal vector at the position of the pixel.

なお、陰影情報導出部105は、例えばQR分解などの手法を利用した演算により厳密にE(w)の最小化を行うことができる。   The shadow information deriving unit 105 can strictly minimize E (w) by an operation using a technique such as QR decomposition.

そして、陰影情報導出部105は、式(3)により算出した整数l、mの組み合わせごとの重みwlmと球面調和関数とを利用して、以下の式(4)により陰影情報I(θ,φ)を求める。 Then, the shadow information deriving unit 105 uses the weight w lm for each combination of the integers l and m calculated by the equation (3) and the spherical harmonic function, and the shadow information I (θ, Find φ).

陰影情報導出部105は、上記のように求めた陰影情報I(θ,φ)を、陰影情報205として記憶部106に記憶させる。
図7は、これまでの説明にしたがって求められた陰影情報205を画像により可視化して示したものである。
The shadow information deriving unit 105 causes the storage unit 106 to store the shadow information I (θ, φ) obtained as described above as the shadow information 205.
FIG. 7 shows the shadow information 205 obtained in accordance with the above description as an image visualized.

上記のように導出された陰影情報205は、例えば拡張現実に対応するレンダリングエンジンが、CGオブジェクトをシーン画像201に合成するのに利用することができる。この際、例えばレンダリングエンジンは、CGオブジェクトの法線方向(θ,φ)にしたがってI(θ,φ)を陰影として適用する。   The shadow information 205 derived as described above can be used by, for example, a rendering engine corresponding to augmented reality to synthesize a CG object with the scene image 201. At this time, for example, the rendering engine applies I (θ, φ) as a shadow according to the normal direction (θ, φ) of the CG object.

図8は、図7に示した陰影情報205を適用して陰影を付与したCGオブジェクトの例を示している。
図9は、図8のように陰影を付与したCGオブジェクトを元のシーン画像201に合成した合成画像201Aを示している。
このように、陰影情報205を適用して陰影を付与することで、例えば図9にも示されるように、CGオブジェクトの陰影はシーンにおける光源の状態にほぼ合致することになる。これにより、合成画像201Aのシーンにおいて存在するCGオブジェクトの実在感が向上する。
FIG. 8 shows an example of a CG object to which a shadow is given by applying the shadow information 205 shown in FIG.
FIG. 9 shows a synthesized image 201A obtained by synthesizing the CG object with a shadow as shown in FIG. 8 with the original scene image 201.
In this way, by applying the shadow information 205 to apply the shadow, the shadow of the CG object substantially matches the state of the light source in the scene, as shown in FIG. 9, for example. Thereby, the realism of the CG object existing in the scene of the composite image 201A is improved.

また、図1において、記憶部106は、これまでの説明から理解されるように、シーン画像201、デプスマップ202、法線マップ203、参照物体領域204および陰影情報205などの陰影情報の導出に利用するデータを記憶する。なお、記憶部106に対応するデバイスとしては、例えば、HDD(Hard Disc Drive)やフラッシュメモリなどを採用できる。
また、表示部107は、参照物体領域抽出部104の制御に応じて、抽出対象データなどの画像を表示する。
操作部108は、例えばユーザが参照物体の領域を表示部107に表示された画像から選択するための操作に使用される操作子や操作デバイスを一括して示したものである。このような操作部108の操作子や操作デバイスには、例えばマウスやキーボードなどが含まれる。
In FIG. 1, the storage unit 106 derives shadow information such as a scene image 201, a depth map 202, a normal map 203, a reference object region 204, and shadow information 205, as can be understood from the above description. Stores data to be used. As a device corresponding to the storage unit 106, for example, an HDD (Hard Disc Drive), a flash memory, or the like can be adopted.
In addition, the display unit 107 displays an image such as extraction target data in accordance with the control of the reference object region extraction unit 104.
The operation unit 108 collectively indicates operators and operation devices used for an operation for the user to select a reference object region from an image displayed on the display unit 107, for example. Such operators and operation devices of the operation unit 108 include, for example, a mouse and a keyboard.

[処理手順例]
図10のフローチャートは、第1の実施形態の陰影情報導出装置100が実行する処理手順例を示している。
まず、シーン画像入力部101は、シーン画像201を入力して記憶部106に記憶させる(ステップS101)。
また、デプスマップ入力部102は、デプスマップ202を入力して記憶部106に記憶させる(ステップS102)。
[Example of processing procedure]
The flowchart in FIG. 10 illustrates an example of a processing procedure executed by the shadow information deriving device 100 according to the first embodiment.
First, the scene image input unit 101 inputs the scene image 201 and stores it in the storage unit 106 (step S101).
Further, the depth map input unit 102 inputs the depth map 202 and stores it in the storage unit 106 (step S102).

次に、法線マップ導出部103は、記憶部106からデプスマップ202を読み込む(ステップS103)。
法線マップ導出部103は、読み込んだデプスマップ202を利用して前述のように法線マップ203を導出する(ステップS104)。法線マップ導出部103は、導出した法線マップ203を記憶部106に記憶させる(ステップS105)。
Next, the normal map deriving unit 103 reads the depth map 202 from the storage unit 106 (step S103).
The normal map deriving unit 103 uses the read depth map 202 to derive the normal map 203 as described above (step S104). The normal map deriving unit 103 stores the derived normal map 203 in the storage unit 106 (step S105).

次に、参照物体領域抽出部104は、抽出対象データを入力する(ステップS106)。抽出対象データは前述のように、シーン画像201とデプスマップ202と法線マップ203の少なくともいずれか1つである。
参照物体領域抽出部104は、前述のように、例えばユーザの操作に応じて抽出対象データから参照物体領域204を抽出する(ステップS107)。参照物体領域抽出部104は、抽出した参照物体領域204を記憶部106に記憶させる(ステップS108)。
Next, the reference object region extraction unit 104 inputs extraction target data (step S106). As described above, the extraction target data is at least one of the scene image 201, the depth map 202, and the normal map 203.
As described above, the reference object region extraction unit 104 extracts the reference object region 204 from the extraction target data in accordance with, for example, a user operation (step S107). The reference object area extraction unit 104 stores the extracted reference object area 204 in the storage unit 106 (step S108).

次に、陰影情報導出部105は、シーン画像201と法線マップ203と参照物体領域204とを入力する(ステップS109)。
陰影情報導出部105は、入力したシーン画像201と法線マップ203と参照物体領域204とを利用して、前述のように、陰影情報205を導出する(ステップS110)。
陰影情報導出部105は、このように導出した陰影情報205を記憶部106に記憶させる(ステップS111)。
Next, the shadow information deriving unit 105 inputs the scene image 201, the normal map 203, and the reference object region 204 (step S109).
The shadow information deriving unit 105 derives the shadow information 205 as described above using the input scene image 201, normal map 203, and reference object region 204 (step S110).
The shadow information deriving unit 105 stores the shadow information 205 derived in this way in the storage unit 106 (step S111).

<第2の実施形態>
[陰影情報導出装置の構成例]
次に、第2の実施形態について説明する。
図11は、第2の実施形態における陰影情報導出装置100Aの構成例を示している。なお、この図において、図1と同一部分には同一符号を付して、ここでの説明は省略する。
<Second Embodiment>
[Configuration example of shadow information deriving device]
Next, a second embodiment will be described.
FIG. 11 shows a configuration example of the shadow information deriving device 100A in the second embodiment. In this figure, the same parts as those in FIG. 1 are denoted by the same reference numerals, and description thereof is omitted here.

図11に示す陰影情報導出装置100Aは、図1の陰影情報導出装置100の構成に対して、陰影情報正則化部109をさらに備える。
陰影情報正則化部109は、正則化された陰影情報205が導出されるように、陰影情報205の導出に利用する所定のパラメータを補正する。ここでの正則化は、導出された陰影が拡散反射の陰影に適合するように制約を加えることをいう。また、陰影情報正則化部109が補正対象とするパラメータは、球面調和関数の係数(重みw)である。
なお、この陰影情報正則化部109は、例えばCPUがプログラムを実行することにより実現できる。
A shadow information deriving device 100A shown in FIG. 11 further includes a shadow information regularization unit 109 in addition to the configuration of the shadow information deriving device 100 in FIG.
The shadow information regularization unit 109 corrects a predetermined parameter used for deriving the shadow information 205 so that the regularized shadow information 205 is derived. Regularization here refers to applying a constraint so that the derived shadow matches the diffuse reflection shadow. Further, the parameter to be corrected by the shadow information regularization unit 109 is a coefficient (weight w) of a spherical harmonic function.
In addition, this shadow information regularization part 109 is realizable when CPU runs a program, for example.

例えば、参照物体が鏡面反射するものであったり、デプスマップ202が示すデプス値に誤差が生じていることなどが要因となって、式(3)に基づいて求めた重みwの次数間での比が、拡散反射の陰影には好ましくない結果となる可能性がある。このような結果が生じた場合、陰影情報205自体も、拡散反射の陰影に適合しないものとなってしまう。   For example, because the reference object is specularly reflected or an error has occurred in the depth value indicated by the depth map 202, the weight between the orders of the weight w obtained based on the equation (3) The ratio can lead to undesirable results for diffuse reflection shading. When such a result occurs, the shadow information 205 itself does not conform to the diffuse reflection shadow.

拡散反射の陰影に適合していない陰影情報205により生じる不具合の一具体例として、例えばリンギングアーティファクトが生じる場合がある。
図14は、図12に示すシーン画像201と、図13に示すデプスマップ202を入力し、図12において白抜きの矢印で示す球の領域を参照物体領域204として抽出した場合に導出される陰影情報205を画像により可視化したものである。
図14に示す陰影情報205においては、白抜きの矢印で示すように、円の左下の縁に沿うようにして明線が生じている。この明線がリンギングアーティファクトである。このリンギングアーティファクトとしての明線は、実世界の拡散反射では観察されないものである。このようなリンギングアーティファクトが生じないような陰影情報205を導出することができれば、これによりCGオブジェクトに付与される陰影についての実シーンとの合致度がさらに高くなる。
As a specific example of the malfunction caused by the shadow information 205 that is not adapted to the diffuse reflection shadow, for example, a ringing artifact may occur.
FIG. 14 shows a shadow derived when the scene image 201 shown in FIG. 12 and the depth map 202 shown in FIG. 13 are input and the sphere region indicated by the white arrow in FIG. 12 is extracted as the reference object region 204. Information 205 is visualized by an image.
In the shadow information 205 shown in FIG. 14, a bright line is generated along the lower left edge of the circle as indicated by a white arrow. This bright line is a ringing artifact. This bright line as a ringing artifact is not observed in the real world diffuse reflection. If the shadow information 205 that does not cause such ringing artifacts can be derived, the degree of coincidence with the actual scene regarding the shadow given to the CG object is further increased.

第2の実施形態における陰影情報正則化部109は、図14に示したようなリンギングアーティファクトなどの現象を低減するために、以下のように陰影情報を正則化する。
つまり、陰影情報正則化部109は、先の式(3)により表されるエラー関数E(w)に対して正則化項を加算したエラー関数E’(w)を最小化する重みwを求めるものである。エラー関数E’(w)を以下の式(5)に示す。
The shadow information regularization unit 109 in the second embodiment regularizes the shadow information as follows in order to reduce the phenomenon such as the ringing artifact as shown in FIG.
That is, the shading information regularization unit 109 obtains the weight w that minimizes the error function E ′ (w) obtained by adding the regularization term to the error function E (w) represented by the above equation (3). Is. The error function E ′ (w) is shown in the following equation (5).

なお、式(5)における2つの正則化項におけるλとλは、それぞれ、制約の強さを調節するための正則化係数である。 Note that λ 1 and λ 2 in the two regularization terms in Equation (5) are regularization coefficients for adjusting the strength of the constraint, respectively.

拡散反射の陰影を表現した際の球面調和関数の重みwの次数間の関係は、1次(l=1)の重みの絶対値が0次(l=0)の重みの絶対値の「2/3」程度であり、2次(l=2)の重みの絶対値が0次の重みの絶対値の「1/4」程度であることが知られている。
このことに基づいて、球面調和関数の次数間の2乗和の関係は以下のように求めることができる。
つまり、0次に対する1次の重みの2乗和は、1次に対応する球面調和関数の数である「3」と、1次の重みの絶対値に対する0次(l=0)の重みの絶対値の比である「2/3」とにより、3×(2/3)=4/3倍である。
また、0次に対する2次の重みの2乗和は、2次に対応する球面調和関数の数である「5」と、2次(l=1)の重みの絶対値に対する0次(l=0)の重みの絶対値の比である「1/4」とにより、5×(1/4)=5/16倍である。
式(5)のエラー関数E’(w)は、上記のように求められた2乗和の倍数が示す係数比を維持するように制約を与えたものである。このように制約を与えることは、すなわち、拡散反射の陰影を表現した際の球面調和関数の重みwの比により制約を与えることを意味する。
The relationship between the orders of the weights w of the spherical harmonic function when expressing the shadow of the diffuse reflection is “2” which is the absolute value of the first-order (l = 1) weight and the zero-order (l = 0) weight. It is known that the absolute value of the secondary (l = 2) weight is about [1/4] of the absolute value of the zeroth weight.
Based on this, the relation of the sum of squares between the orders of the spherical harmonic functions can be obtained as follows.
In other words, the square sum of the first-order weights for the zeroth order is “3”, which is the number of spherical harmonics corresponding to the first order, and the zeroth-order (l = 0) weight for the absolute value of the first-order weights. By the absolute value ratio “2/3”, 3 × (2/3) 2 = 4/3 times.
The square sum of the second-order weights for the zeroth order is “5” which is the number of spherical harmonics corresponding to the second order, and the zeroth order (l = 1) for the absolute value of the second-order (l = 1) weight. 0 ×), which is a ratio of the absolute value of the weight, is 5 × (1/4) 2 = 5/16 times.
The error function E ′ (w) in Equation (5) is given a constraint so as to maintain the coefficient ratio indicated by the multiple of the square sum obtained as described above. Giving the constraint in this way means that the constraint is given by the ratio of the weight w of the spherical harmonic function when the shadow of diffuse reflection is expressed.

陰影情報正則化部109は、例えば、陰影情報導出部105が求めた式(3)のエラー関数E(w)についての最小化結果を初期値として利用して、式(5)のエラー関数E’(w)を最小化する重みwを求めることができる。このように求められた球面調和関数の重みwは、拡散反射の陰影を表現するのに適した比を有している。
なお、陰影情報正則化部109は、例えば、式(3)のエラー関数E(w)についての最小化結果を初期値として利用してNewton法により式(5)のエラー関数E’(w)を最小化する重みwを求めてもよい。
The shadow information regularization unit 109 uses, for example, the minimization result of the error function E (w) of Equation (3) obtained by the shadow information deriving unit 105 as an initial value, and uses the error function E of Equation (5). The weight w that minimizes' (w) can be obtained. The weight w of the spherical harmonic function obtained in this way has a ratio suitable for expressing the shadow of diffuse reflection.
Note that the shadow information regularization unit 109 uses, for example, the minimization result of the error function E (w) of Equation (3) as an initial value, and the error function E ′ (w) of Equation (5) by the Newton method. The weight w for minimizing may be obtained.

第2の実施形態において、陰影情報導出部105は、上記のように陰影情報正則化部109により求められたエラー関数E’(w)に対応する重みwを利用して、式(4)の演算によって正則化陰影情報205Aを求める。このように導出された正則化陰影情報205Aは、例えば第1の実施形態における陰影情報205が正則化されたものであり、拡散反射の陰影の表現に適合したものとなっている。   In the second embodiment, the shadow information deriving unit 105 uses the weight w corresponding to the error function E ′ (w) obtained by the shadow information regularization unit 109 as described above, and uses Equation (4). Regularized shadow information 205A is obtained by calculation. The regularized shadow information 205A derived in this way is, for example, regularized shadow information 205 in the first embodiment, and is adapted to the expression of diffuse reflection shadows.

図15は、上記のように導出された正則化陰影情報205Aを画像により可視化して示したものである。なお、この図15に示す正則化陰影情報205Aは、図14と同様に、図12に示すシーン画像201と、図13に示すデプスマップ202を入力し、図12において白抜きの矢印で示す球の領域を参照物体領域204として抽出した場合に導出されるものである。
図15と図14を比較して分かるように、図15に示す正則化陰影情報205Aでは、白抜きの矢印により示される箇所におけるリンギングアーティフェクトが大幅に低減されている。
そして、この正則化陰影情報205Aにより拡散反射のCGオブジェクトに陰影を付与することによっては、そのCGオブジェクトのシーンにおける実在感が高まる。
FIG. 15 shows the regularized shadow information 205A derived as described above visualized by an image. As in FIG. 14, the regularized shadow information 205A shown in FIG. 15 is input with the scene image 201 shown in FIG. 12 and the depth map 202 shown in FIG. Is derived as a reference object region 204.
As can be seen by comparing FIG. 15 and FIG. 14, in the regularized shadow information 205 </ b> A shown in FIG. 15, the ringing artifacts at the locations indicated by the white arrows are greatly reduced.
Then, by adding a shadow to the diffusely reflected CG object using the regularized shadow information 205A, the presence of the CG object in the scene is enhanced.

[処理手順例]
図16のフローチャートは、第2の実施形態における陰影情報導出装置100Aが実行する処理手順例を示している。なお、この図に示すステップにおいて、図10と同じ処理のものについては同一符号を付し、ここでの説明を省略する。
陰影情報導出部105は、シーン画像201と法線マップ203と参照物体領域204とを入力した後(ステップS109)、式(3)のエラー関数E(w)を最小化する重みwを算出する(ステップS110A)。
次に、陰影情報正則化部109は、ステップS110Aにより求められた重みwについて、式(5)のエラー関数E’(w)を最小化する重みwを求めることにより補正する(ステップS110B)。
そして、陰影情報導出部105は、ステップS110Bにより補正された重みwを利用して、正則化陰影情報205Aを算出する(ステップS110C)。これにより、陰影情報導出部105は正則化された陰影情報を導出したことになる。そして、陰影情報導出部105は、算出した正則化陰影情報205Aを記憶部106に記憶させる(ステップS111)。このような処理によって、第2の実施形態における陰影情報導出装置100Aは、拡散反射に対応して正則化された陰影情報を得ることができる。
[Example of processing procedure]
The flowchart in FIG. 16 illustrates an example of a processing procedure executed by the shadow information deriving device 100A according to the second embodiment. Note that, in the steps shown in this figure, the same processes as those in FIG. 10 are denoted by the same reference numerals, and description thereof is omitted here.
The shadow information deriving unit 105 inputs the scene image 201, the normal map 203, and the reference object region 204 (step S109), and then calculates a weight w that minimizes the error function E (w) of Equation (3). (Step S110A).
Next, the shading information regularization unit 109 corrects the weight w obtained in step S110A by obtaining a weight w that minimizes the error function E ′ (w) in Expression (5) (step S110B).
Then, the shadow information deriving unit 105 calculates the regularized shadow information 205A using the weight w corrected in step S110B (step S110C). Thereby, the shadow information deriving unit 105 derives the regularized shadow information. The shadow information deriving unit 105 stores the calculated regularized shadow information 205A in the storage unit 106 (step S111 A ). By such processing, the shadow information deriving device 100A according to the second embodiment can obtain regularized shadow information corresponding to diffuse reflection.

なお、図1や図11における各機能部の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより本実施形態の陰影情報の導出を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。   Note that a program for realizing the functions of the functional units in FIGS. 1 and 11 is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system and executed. The shadow information of this embodiment may be derived. Here, the “computer system” includes an OS and hardware such as peripheral devices.

また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよい。
Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used.
The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Further, the “computer-readable recording medium” refers to a volatile memory (RAM) in a computer system that becomes a server or a client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. In addition, those holding programs for a certain period of time are also included. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.

以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。   The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes designs and the like that do not depart from the gist of the present invention.

100、100A…陰影情報導出装置, 101…シーン画像入力部, 102…デプスマップ入力部, 103…法線マップ導出部, 104…参照物体領域抽出部, 105…陰影情報導出部, 106…記憶部, 107…表示部, 108…操作部, 109…陰影情報正則化部, 201…シーン画像, 201A…合成画像, 202…デプスマップ, 203…法線マップ, 204…参照物体領域, 205…陰影情報, 205A…正則化陰影情報   DESCRIPTION OF SYMBOLS 100, 100A ... Shadow information derivation | leading-out apparatus, 101 ... Scene image input part, 102 ... Depth map input part, 103 ... Normal map derivation part, 104 ... Reference object area extraction part, 105 ... Shadow information derivation part, 106 ... Memory | storage part 107: Display unit, 108: Operation unit, 109 ... Shadow information regularization unit, 201 ... Scene image, 201A ... Composite image, 202 ... Depth map, 203 ... Normal map, 204 ... Reference object area, 205 ... Shadow information , 205A ... Regularized shadow information

Claims (4)

シーンとしての画像内容を有するシーン画像に対応するデプスマップに基づいて前記シーン画像が示すシーンの法線マップを導出する法線マップ導出部と、
前記シーン画像と前記デプスマップと前記法線マップとの少なくともいずれか1つに基づいて参照物体の領域部分である参照物体領域を抽出する参照物体領域抽出部と、
前記シーン画像と前記法線マップと前記参照物体領域とに基づいて陰影情報を導出する陰影情報導出部と、
正則化された陰影情報が導出されるように前記陰影情報導出部が用いる球面調和関数の係数を補正するにあたり、前記係数を含む誤差関数に対して前記球面調和関数における次数間の係数比が維持されるように制約を与えるための正則化項を加算し、前記正則化項が加算された誤差関数が最小となる前記係数を求める陰影情報正則化部と
を備える陰影情報導出装置。
A normal map derivation unit for deriving a normal map of the scene indicated by the scene image based on a depth map corresponding to a scene image having image content as a scene;
A reference object region extraction unit that extracts a reference object region that is a region portion of a reference object based on at least one of the scene image, the depth map, and the normal map;
A shadow information deriving unit for deriving shadow information based on the scene image, the normal map, and the reference object region;
When correcting the coefficient of the spherical harmonic function used by the shadow information deriving unit so that the normalized shadow information is derived, the coefficient ratio between the orders in the spherical harmonic function is maintained with respect to the error function including the coefficient. A shadow information deriving device comprising: a shadow information regularization unit that adds a regularization term for giving a constraint so as to obtain the coefficient that minimizes an error function to which the regularization term is added .
誤差関数(E(w))に対して前記正則化項を加算した誤差関数(E’(w))は、0次と1次との球面調和関数の係数の比を2/3、0次と2次との球面調和関数の係数の比を1/4とし、前記係数をw、制約の強さを調節するための正則化係数をλThe error function (E ′ (w)) obtained by adding the regularization term to the error function (E (w)) has a ratio of the coefficient of the spherical harmonic function of the 0th order and the 1st order to 2/3, the 0th order. The ratio of the coefficients of the spherical harmonics of the second order and the second order is 1/4, the coefficient is w, and the regularization coefficient for adjusting the constraint strength is λ 1 、λ, Λ 2 として、以下の式1により表されるAs represented by the following formula 1.
請求項1に記載の陰影情報導出装置。  The shadow information deriving device according to claim 1.
シーンとしての画像内容を有するシーン画像に対応するデプスマップに基づいて前記シーン画像が示すシーンの法線マップを導出する法線マップ導出ステップと、
前記シーン画像と前記デプスマップと前記法線マップとの少なくともいずれか1つに基づいて参照物体の領域部分である参照物体領域を抽出する参照物体領域抽出ステップと、
前記シーン画像と前記法線マップと前記参照物体領域とに基づいて陰影情報を導出する陰影情報導出ステップと、
正則化された陰影情報が導出されるように前記陰影情報導出ステップが用いる球面調和関数の係数を補正するにあたり、前記係数を含む誤差関数に対して前記球面調和関数における次数間の係数比が維持されるように制約を与えるための正則化項を加算し、前記正則化項が加算された誤差関数が最小となる前記係数を求める陰影情報正則化ステップと
を備える陰影情報導出方法。
A normal map derivation step for deriving a normal map of the scene indicated by the scene image based on a depth map corresponding to the scene image having image content as a scene;
A reference object region extraction step of extracting a reference object region that is a region portion of a reference object based on at least one of the scene image, the depth map, and the normal map;
Shadow information deriving step for deriving shadow information based on the scene image, the normal map, and the reference object region;
When correcting the coefficient of the spherical harmonic function used in the shadow information derivation step so that the regularized shadow information is derived, the coefficient ratio between the orders in the spherical harmonic function is maintained with respect to the error function including the coefficient. A shadow information deriving method comprising: adding a regularization term for giving a constraint so as to obtain a coefficient that minimizes an error function to which the regularization term is added .
コンピュータを、請求項1または2に記載の陰影情報導出装置として機能させるためのプログラム。   A program for causing a computer to function as the shadow information deriving device according to claim 1.
JP2012141254A 2012-06-22 2012-06-22 Shadow information deriving device, shadow information deriving method and program Expired - Fee Related JP5795556B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012141254A JP5795556B2 (en) 2012-06-22 2012-06-22 Shadow information deriving device, shadow information deriving method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012141254A JP5795556B2 (en) 2012-06-22 2012-06-22 Shadow information deriving device, shadow information deriving method and program

Publications (2)

Publication Number Publication Date
JP2014006658A JP2014006658A (en) 2014-01-16
JP5795556B2 true JP5795556B2 (en) 2015-10-14

Family

ID=50104330

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012141254A Expired - Fee Related JP5795556B2 (en) 2012-06-22 2012-06-22 Shadow information deriving device, shadow information deriving method and program

Country Status (1)

Country Link
JP (1) JP5795556B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6463177B2 (en) 2015-03-11 2019-01-30 キヤノン株式会社 Image processing apparatus and control method thereof
CN106408647B (en) * 2016-09-20 2019-03-05 广州视睿电子科技有限公司 A kind of image shade adding method and device
JP7020075B2 (en) * 2017-11-22 2022-02-16 富士フイルムビジネスイノベーション株式会社 Image processing equipment and programs
CN111462295B (en) * 2020-03-27 2023-09-05 咪咕文化科技有限公司 Shadow processing method, device and storage medium in augmented reality shooting

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003067772A (en) * 2001-08-30 2003-03-07 Canon Inc Image processing device and method
JP2004021388A (en) * 2002-06-13 2004-01-22 Nippon Hoso Kyokai <Nhk> Image processor and photographing system equipped therewith
WO2010087164A1 (en) * 2009-01-29 2010-08-05 日本電気株式会社 Color image processing method, color image processing device, and recording medium
US8194072B2 (en) * 2010-03-26 2012-06-05 Mitsubishi Electric Research Laboratories, Inc. Method for synthetically relighting images of objects

Also Published As

Publication number Publication date
JP2014006658A (en) 2014-01-16

Similar Documents

Publication Publication Date Title
JP7403528B2 (en) Method and system for reconstructing color and depth information of a scene
JP6360200B2 (en) System and method for rendering augmented reality content with an albedo model
EP3139589B1 (en) Image processing apparatus and image processing method
US9607429B2 (en) Relightable texture for use in rendering an image
KR101885090B1 (en) Image processing apparatus, apparatus and method for lighting processing
EP3561777B1 (en) Method and apparatus for processing a 3d scene
JP2009211335A (en) Virtual viewpoint image generation method, virtual viewpoint image generation apparatus, virtual viewpoint image generation program, and recording medium from which same recorded program can be read by computer
US8040352B2 (en) Adaptive image interpolation for volume rendering
JP5795556B2 (en) Shadow information deriving device, shadow information deriving method and program
EP2692140A2 (en) Real-time depth extraction using stereo correspondence
JP5909176B2 (en) Shadow information deriving device, shadow information deriving method and program
CN115239861A (en) Face data enhancement method and device, computer equipment and storage medium
KR20060131145A (en) Randering method of three dimension object using two dimension picture
CN107564085B (en) Image warping processing method and device, computing equipment and computer storage medium
US20130182944A1 (en) 2d to 3d image conversion
EP3343516A1 (en) Method and device for applying an effect of an augmented or mixed reality application
US20210209347A1 (en) Texture map generation using multi-viewpoint color images
JP5661381B2 (en) Image processing apparatus and method
CN114913287B (en) Three-dimensional human body model reconstruction method and system
Noh et al. Soft shadow rendering based on real light source estimation in augmented reality
JP2013253946A (en) Light source distribution estimation apparatus, light source distribution estimation method and light source distribution estimation program
CN115272575A (en) Image generation method and device, storage medium and electronic equipment
US11120606B1 (en) Systems and methods for image texture uniformization for multiview object capture
JP5865092B2 (en) Image processing apparatus, image processing method, and program
JP5952757B2 (en) Shadow information deriving device, shadow information deriving method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140724

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150525

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150602

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150715

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150811

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150813

R150 Certificate of patent or registration of utility model

Ref document number: 5795556

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees