JP2014021744A - Image processing device, image processing method, and program - Google Patents

Image processing device, image processing method, and program Download PDF

Info

Publication number
JP2014021744A
JP2014021744A JP2012160190A JP2012160190A JP2014021744A JP 2014021744 A JP2014021744 A JP 2014021744A JP 2012160190 A JP2012160190 A JP 2012160190A JP 2012160190 A JP2012160190 A JP 2012160190A JP 2014021744 A JP2014021744 A JP 2014021744A
Authority
JP
Japan
Prior art keywords
quadratic curve
region
image
face
depth value
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
Application number
JP2012160190A
Other languages
Japanese (ja)
Inventor
Hironori Mori
浩典 森
Kazuhiko Nishibori
一彦 西堀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2012160190A priority Critical patent/JP2014021744A/en
Publication of JP2014021744A publication Critical patent/JP2014021744A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To enable reduction of an information amount of information used for generating a depth value representing the position of an object in a depth direction in an image.SOLUTION: On the basis of a quadratic curve representing a model of a depth value representing the position in a depth direction of an object such as an in-face area, an out-of-face area, a neck area, an in-body area, and an out-of-body area, a depth generation unit generates a depth value of the object such as an in-face area, an out-of-face area, a neck area, an in-body area, and an out-of-body area in an image. The present technique can be applied to, for example, an image processing device for generating a depth map of an image.

Description

本技術は、画像処理装置、画像処理方法、およびプログラムに関し、特に、画像内の物体の奥行き方向の位置を表す奥行き値の生成に用いられる情報の情報量を削減することができるようにした画像処理装置、画像処理方法、およびプログラムに関する。   The present technology relates to an image processing device, an image processing method, and a program, and in particular, an image that can reduce an information amount of information used for generating a depth value representing a position in a depth direction of an object in an image. The present invention relates to a processing device, an image processing method, and a program.

画像処理装置は、2次元(2D)画像から3次元(3D)画像を生成する際、例えば、2次元画像の各画素の奥行き方向の位置を表す奥行き値からなる奥行きマップを利用する。具体的には、画像処理装置は、奥行きマップを構成する各画素の奥行き値に基づいて2次元画像の各画素を左右方向にずらし、3次元画像のうちの左目用の画像と右目用の画像を生成する。その結果、3次元画像を表示する3Dディスプレイなどを視聴する視聴者が、左目用の画像を左目で、右目用の画像を右目で見ることにより、視差が発生し、視聴者は奥行きを感じる。   When generating a three-dimensional (3D) image from a two-dimensional (2D) image, the image processing apparatus uses, for example, a depth map including a depth value representing a position in the depth direction of each pixel of the two-dimensional image. Specifically, the image processing apparatus shifts each pixel of the two-dimensional image in the left-right direction based on the depth value of each pixel constituting the depth map, and the left-eye image and the right-eye image in the three-dimensional image. Is generated. As a result, when a viewer who views a 3D display or the like that displays a three-dimensional image views the left-eye image with the left eye and the right-eye image with the right eye, parallax occurs, and the viewer feels the depth.

ところで、画像内の物体の奥行き値の生成方法としては、各種の方法が考案されている。例えば、人間の一般的な顔の同一平面状に存在しない4点以上の各特徴点の3次元形状情報を用いて、画像内の人物の顔の奥行き値を生成する方法が考案されている(例えば、特許文献1参照)。   By the way, various methods have been devised as a method for generating the depth value of an object in an image. For example, a method of generating a depth value of a person's face in an image using three-dimensional shape information of four or more feature points that do not exist on the same plane of a general human face has been devised ( For example, see Patent Document 1).

特開2007−4767号JP 2007-4767

しかしながら、各特徴点の3次元形状情報の情報量は比較的大きく、その3次元形状情報を保持するためには、比較的大きなメモリが必要となる。   However, the information amount of the three-dimensional shape information of each feature point is relatively large, and a relatively large memory is required to hold the three-dimensional shape information.

本技術は、このような状況に鑑みてなされたものであり、画像内の物体の奥行き値の生成に用いられる情報の情報量を削減することができるようにするものである。   The present technology has been made in view of such a situation, and makes it possible to reduce the amount of information used for generating the depth value of an object in an image.

本技術の一側面の画像処理装置は、物体の奥行き方向の位置を表す奥行き値のモデルを表す2次曲線に基づいて、画像内の前記物体の奥行き値を生成する生成部を備える画像処理装置である。   An image processing apparatus according to one aspect of the present technology includes a generation unit that generates a depth value of the object in an image based on a quadratic curve representing a model of a depth value representing a position of the object in the depth direction. It is.

本技術の一側面の画像処理方法およびプログラムは、本技術の一側面の画像処理装置に対応する。   An image processing method and a program according to an aspect of the present technology correspond to an image processing apparatus according to an aspect of the present technology.

本技術の一側面においては、物体の奥行き方向の位置を表す奥行き値のモデルを表す2次曲線に基づいて、画像内の前記物体の奥行き値が生成される。   In one aspect of the present technology, the depth value of the object in the image is generated based on a quadratic curve representing a model of the depth value representing the position of the object in the depth direction.

本技術の一側面によれば、画像内の物体の奥行き値の生成に用いられる情報の情報量を削減することができる。   According to an aspect of the present technology, it is possible to reduce the amount of information used for generating the depth value of an object in an image.

本技術を適用した画像処理装置の一実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of one Embodiment of the image processing apparatus to which this technique is applied. 部位情報の例を示す図である。It is a figure which shows the example of site | part information. 図1の奥行き生成部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the depth production | generation part of FIG. 水平2次曲線の例を示す図である。It is a figure which shows the example of a horizontal quadratic curve. ズームイン撮影に伴う奥行き値の変化を説明する図である。It is a figure explaining the change of the depth value accompanying zoom-in imaging. 顔画像のサイズと補正後の水平2次曲線のレンジの関係を示す図である。It is a figure which shows the relationship between the size of a face image, and the range of the horizontal quadratic curve after correction | amendment. 顔画像の角度が全て0度である場合の奥行き値の生成を説明する図である。It is a figure explaining the production | generation of a depth value in case all the angles of a face image are 0 degree | times. 顔画像の角度が全て0度である場合の奥行き値の生成を説明する図である。It is a figure explaining the production | generation of a depth value in case all the angles of a face image are 0 degree | times. 顔画像の角度が全て0度である場合の人物領域の各画素の奥行き値の例を示す図である。It is a figure which shows the example of the depth value of each pixel of a person area | region when all the angles of a face image are 0 degree | times. 顔画像のヨー角とピッチ角が0以外である場合の奥行き値の生成を説明する図である。It is a figure explaining the production | generation of a depth value in case the yaw angle and pitch angle of a face image are other than zero. 図1の画像処理装置の奥行きマップ生成処理を説明するフローチャートである。It is a flowchart explaining the depth map production | generation process of the image processing apparatus of FIG. 図11の奥行き値生成処理の詳細を説明するフローチャートである。It is a flowchart explaining the detail of the depth value production | generation process of FIG. 奥行きマップ生成処理の他の例を説明するフローチャートである。It is a flowchart explaining the other example of a depth map production | generation process. コンピュータのハードウエアの構成例を示すブロック図である。It is a block diagram which shows the structural example of the hardware of a computer.

<一実施の形態>
[画像処理装置の一実施の形態の構成例]
図1は、本技術を適用した画像処理装置の一実施の形態の構成例を示すブロック図である。
<One embodiment>
[Configuration Example of Embodiment of Image Processing Apparatus]
FIG. 1 is a block diagram illustrating a configuration example of an embodiment of an image processing apparatus to which the present technology is applied.

図1の画像処理装置10は、顔検出部11、顔内領域判定部12、顔外領域判定部13、首領域判定部14、胴体内領域判定部15、胴体外領域判定部16、境界判定部17、奥行き生成部18、選択部19、および平滑化処理部20により構成される。画像処理装置10は、外部から入力画像として入力された画像の奥行きマップを生成する。   1 includes a face detection unit 11, an in-face region determination unit 12, an out-of-face region determination unit 13, a neck region determination unit 14, a torso region determination unit 15, an torso region determination unit 16, and a boundary determination. The unit 17, the depth generation unit 18, the selection unit 19, and the smoothing processing unit 20 are configured. The image processing apparatus 10 generates a depth map of an image input as an input image from the outside.

具体的には、画像処理装置10の顔検出部11は、外部から入力された入力画像内の顔画像を検出する。顔検出部11は、顔画像の位置とサイズを表す顔画像情報を、顔内領域判定部12、顔外領域判定部13、首領域判定部14、胴体内領域判定部15、および胴体外領域判定部16に供給する。   Specifically, the face detection unit 11 of the image processing apparatus 10 detects a face image in an input image input from the outside. The face detection unit 11 converts the face image information representing the position and size of the face image into an in-face region determination unit 12, an out-of-face region determination unit 13, a neck region determination unit 14, a torso region determination unit 15, and an torso region. It supplies to the determination part 16.

また、顔検出部11は、検出された顔画像のピッチ角とヨー角を顔画像の角度として検出する。なお、顔画像のピッチ角とは、人の左右の目を結んだ線と平行で、ほぼ人の頭の中心を通る軸を中心として回転する角度である。また、ヨー角とは、その軸に垂直な軸であって、ほぼ頭の中心を垂直に通る軸を中心として回転する角度である。顔画像のピッチ角とヨー角の検出方法の詳細は、例えば、特開2010−3021号公報に記載されている。顔検出部11は、検出された顔画像の角度と顔画像のサイズを奥行き生成部18に供給する。   The face detection unit 11 detects the pitch angle and yaw angle of the detected face image as the face image angle. Note that the pitch angle of the face image is an angle that is rotated about an axis that is parallel to the line connecting the left and right eyes of the person and passes through the center of the person's head. The yaw angle is an angle that is perpendicular to the axis and rotates about an axis that passes substantially through the center of the head. Details of the pitch angle and yaw angle detection method of the face image are described in, for example, Japanese Patent Application Laid-Open No. 2010-3021. The face detection unit 11 supplies the detected angle of the face image and the size of the face image to the depth generation unit 18.

顔内領域判定部12は、顔検出部11から供給される顔画像情報に基づいて、顔画像の中心を中心とする、顔画像のサイズに基づくサイズの楕円領域を顔内領域に設定する。例えば、顔内領域判定部12は、短軸が顔画像の水平方向の長さの1倍であり、長軸が顔画像の垂直方向の長さの1.5倍である楕円領域を顔内領域に設定する。顔内領域判定部12は、顔内領域の位置とサイズを表す顔内領域情報を境界判定部17に供給する。   Based on the face image information supplied from the face detection unit 11, the in-face region determination unit 12 sets an ellipse region having a size based on the size of the face image as the in-face region centered on the center of the face image. For example, the intra-facial region determination unit 12 sets an elliptical region whose short axis is one time the horizontal length of the face image and whose long axis is 1.5 times the vertical length of the face image as the intra-face region. Set. The intra-facial region determination unit 12 supplies intra-facial region information indicating the position and size of the intra-facial region to the boundary determination unit 17.

顔外領域判定部13は、顔検出部11から供給される顔画像情報に基づいて、顔画像の中心を中心とする、顔画像のサイズに基づくサイズであって、顔内領域より大きい楕円領域を顔外領域に設定する。顔外領域判定部13は、顔外領域の位置とサイズを表す顔外領域情報を境界判定部17に供給する。   The out-of-face area determination unit 13 is based on the face image information supplied from the face detection unit 11 and has a size based on the size of the face image centered on the center of the face image and is larger than the in-face area. Is set to the area outside the face. The out-of-face area determination unit 13 supplies out-of-face area information indicating the position and size of the out-of-face area to the boundary determination unit 17.

首領域判定部14は、顔検出部11から供給される顔画像情報に基づいて、顔画像の下の、顔画像のサイズに基づくサイズの長方形の領域を首領域に設定する。首領域判定部14は、首領域の位置とサイズを表す首領域情報を境界判定部17に供給する。   Based on the face image information supplied from the face detection unit 11, the neck region determination unit 14 sets a rectangular region having a size based on the size of the face image below the face image as the neck region. The neck region determination unit 14 supplies neck region information representing the position and size of the neck region to the boundary determination unit 17.

胴体内領域判定部15は、顔検出部11から供給される顔画像情報に基づいて、顔画像のサイズに基づくサイズの、首領域の下の台形領域と、その台形領域の下の長方形領域とを、胴体内領域に設定する。   Based on the face image information supplied from the face detection unit 11, the torso region determination unit 15 has a trapezoidal region below the neck region, a rectangular region below the trapezoidal region, and a size based on the size of the face image. To the body region.

例えば、胴体内領域判定部15は、首領域の下の、上辺と下辺が、顔画像の水平方向の長さに比例し、高さが、顔画像の垂直方向の長さに比例する台形領域と、その台形領域の下の、水平方向の長さが顔画像の水平方向の長さに比例し、垂直方向の長さが顔画像の垂直方向の長さに比例する長方形領域とを、胴体内領域に設定する。胴体内領域判定部15は、胴体内領域の位置とサイズを表す胴体内領域情報を境界判定部17に供給する。   For example, the torso region determination unit 15 has a trapezoidal region in which the upper side and the lower side below the neck region are proportional to the horizontal length of the face image, and the height is proportional to the vertical length of the face image. And a rectangular area under the trapezoidal area, the horizontal length of which is proportional to the horizontal length of the face image, and the vertical length of which is proportional to the vertical length of the face image, Set to the inner area. The body region determination unit 15 supplies body region information indicating the position and size of the body region to the boundary determination unit 17.

胴体外領域判定部16は、顔検出部11から供給される顔画像情報に基づいて、顔画像のサイズに基づくサイズであって、首領域の下の胴体内領域より大きい、台形領域と、その台形領域の下の長方形領域とを、胴体外領域に設定する。胴体外領域判定部16は、胴体外領域の位置とサイズを表す胴体外領域情報を境界判定部17に供給する。   The torso-outside region determination unit 16 is based on the face image information supplied from the face detection unit 11 and is a size based on the size of the face image, which is larger than the torso region below the neck region, The rectangular area below the trapezoidal area is set as the body outside area. The torso outside region determination unit 16 supplies the torso outside region information indicating the position and size of the torso outside region to the boundary determination unit 17.

境界判定部17は、顔内領域判定部12からの顔内領域情報、顔外領域判定部13からの顔外領域情報、首領域判定部14からの首領域情報、胴体内領域判定部15からの胴体内領域情報、および胴体外領域判定部16からの胴体外領域情報に基づいて、顔内領域、顔外領域、首領域、胴体内領域、または胴体外領域の少なくともいずれかである領域を人物領域とする。   The boundary determination unit 17 includes the in-face region information from the in-face region determination unit 12, the out-of-face region information from the out-of-face region determination unit 13, the neck region information from the neck region determination unit 14, and the in-body region determination unit 15. A region that is at least one of an in-face region, an out-of-face region, a neck region, a torso region, or an out-of-torso region based on the torso region information and the torso region information from the torso region determining unit 16 Let it be a person area.

また、境界判定部17は、顔内領域情報、顔外領域情報、首領域情報、胴体内領域情報、および胴体外領域情報に基づいて、人物領域内の各画素を最終的な顔内領域、顔外領域、首領域、胴体内領域、または胴体外領域の画素のいずかに決定する。即ち、境界判定部17は、設定部として機能し、人物領域を複数の領域に分割して設定する。   Further, the boundary determination unit 17 determines each pixel in the person area as a final in-face area based on the in-face area information, the out-of-face area information, the neck area information, the in-body area information, and the out-to-body area information. The pixel is determined as any one of the pixels in the region outside the face, the neck region, the body region, or the region outside the body. That is, the boundary determination unit 17 functions as a setting unit and divides and sets a person area into a plurality of areas.

なお、以下では、顔内領域、顔外領域、首領域、胴体内領域、胴体外領域のそれぞれを特に区別する必要がない場合、それらをまとめて部位領域という。同様に、顔内領域情報、顔外領域情報、首領域情報、胴体内領域情報、胴体外領域情報をまとめて部位領域情報という。   In the following, when it is not necessary to particularly distinguish each of the in-face region, the out-of-face region, the neck region, the torso region, and the torso region, these are collectively referred to as a part region. Similarly, in-face area information, out-of-face area information, neck area information, torso area information, and torso area information are collectively referred to as part area information.

境界判定部17は、最終的な部位領域の位置とサイズを部位領域ごとに表す部位情報を、奥行き生成部18に供給する。また、境界判定部17は、人物領域内の各画素に対して、人物領域であることを表す人物領域フラグを生成し、入力画像内の人物領域外の各画素に対して、人物領域ではないことを表す人物領域フラグを生成する。境界判定部17は、入力画像の各画素の人物領域フラグを選択部19に供給する。   The boundary determination unit 17 supplies part information representing the position and size of the final part region for each part region to the depth generation unit 18. In addition, the boundary determination unit 17 generates a person area flag indicating that it is a person area for each pixel in the person area, and is not a person area for each pixel outside the person area in the input image. A person region flag representing this is generated. The boundary determination unit 17 supplies the person region flag of each pixel of the input image to the selection unit 19.

奥行き生成部18は、各部位領域の物体の奥行き値のモデルを表す2次曲線を記憶する。奥行き生成部18は、顔検出部11から供給される顔画像のサイズおよび角度、記憶している2次曲線、並びに、境界判定部17から供給される部位情報に基づいて、人物領域内の各画素の奥行き値を生成する。奥行き生成部18は、生成された奥行き値を選択部19に供給する。   The depth generation unit 18 stores a quadratic curve representing a model of the depth value of the object in each region. Based on the size and angle of the face image supplied from the face detection unit 11, the stored quadratic curve, and the part information supplied from the boundary determination unit 17, the depth generation unit 18 Generate pixel depth values. The depth generation unit 18 supplies the generated depth value to the selection unit 19.

選択部19は、入力画像の画素ごとに、境界判定部17から供給される人物領域フラグに基づいて、奥行き生成部18から供給される奥行き値、または、外部から入力される背景画像用の奥行き値を選択する。選択部19は、選択された各画素の奥行き値を、その画素の奥行きマップの画素値に割り当てることにより奥行きマップを生成する。そして、選択部19は、生成された奥行きマップを平滑化処理部20に供給する。   For each pixel of the input image, the selection unit 19 determines the depth value supplied from the depth generation unit 18 based on the person area flag supplied from the boundary determination unit 17 or the depth for the background image input from the outside. Select a value. The selection unit 19 generates a depth map by assigning the depth value of each selected pixel to the pixel value of the depth map of the pixel. Then, the selection unit 19 supplies the generated depth map to the smoothing processing unit 20.

平滑化処理部20は、一般的な空間フィルタを用いて、選択部19から供給される奥行きマップを平滑化する。これにより、各部位領域の境界で発生する奥行き値の大きな変化を抑制することができる。   The smoothing processing unit 20 smoothes the depth map supplied from the selection unit 19 using a general spatial filter. Thereby, the big change of the depth value which generate | occur | produces at the boundary of each site | part area | region can be suppressed.

[部位情報の例]
図2は、図1の境界判定部17により生成される部位情報の例を示す図である。
[Example of part information]
FIG. 2 is a diagram illustrating an example of the part information generated by the boundary determination unit 17 in FIG.

図2の例では、画像40内の中央に人物領域41が存在する。境界判定部17は、まず、顔内領域情報に基づいて、人物領域41内の画素のうちの顔内領域情報が表す顔内領域内の画素を、最終的な顔内領域42の画素に決定する。   In the example of FIG. 2, a person area 41 exists in the center of the image 40. The boundary determination unit 17 first determines, based on the intra-facial region information, a pixel in the intra-facial region represented by the intra-facial region information among pixels in the person region 41 as a final intra-facial region 42 pixel. To do.

次に、境界判定部17は、顔外領域情報に基づいて、顔外領域情報が表す顔外領域内の画素のうちの顔内領域42の画素以外の画素を、最終的な顔外領域43に決定する。そして、境界判定部17は、首領域情報に基づいて、首領域情報が表す首領域内の画素のうちの顔内領域42と顔外領域43以外の画素を、最終的な首領域44に決定する。   Next, based on the out-of-face region information, the boundary determination unit 17 determines pixels other than the pixels in the in-face region 42 among the pixels in the out-of-face region represented by the out-of-face region information. To decide. Then, based on the neck area information, the boundary determination unit 17 determines a pixel other than the in-face area 42 and the out-of-face area 43 among the pixels in the neck area represented by the neck area information as the final neck area 44. To do.

次に、境界判定部17は、胴体内領域情報に基づいて、胴体内領域情報が表す胴体内領域内の画素のうちの、顔内領域42、顔外領域43、および首領域44以外の画素を、最終的な胴体内領域45に決定する。最後に、境界判定部17は、胴体外領域情報に基づいて、胴体外領域情報が表す胴体外領域内の画素のうちの、顔内領域42、顔外領域43、首領域44、および胴体内領域45以外の画素を、最終的な胴体外領域46に決定する。   Next, the boundary determination unit 17 selects pixels other than the in-face region 42, the out-of-face region 43, and the neck region 44 among the pixels in the torso region represented by the torso region information based on the torso region information. Is determined as the final body region 45. Finally, the boundary determination unit 17 determines the in-face region 42, the out-of-face region 43, the neck region 44, and the torso among the pixels in the out-of-torso region represented by the out-of-torso region information based on the out-of-torso region information. Pixels other than the region 45 are determined as the final torso region 46.

[奥行き生成部の構成例]
図3は、図1の奥行き生成部18の構成例を示すブロック図である。
[Configuration example of depth generator]
FIG. 3 is a block diagram illustrating a configuration example of the depth generation unit 18 of FIG.

図3の奥行き生成部18は、記憶部61、サイズ補正部62、角度補正部63、および生成部64により構成される。   The depth generation unit 18 in FIG. 3 includes a storage unit 61, a size correction unit 62, an angle correction unit 63, and a generation unit 64.

奥行き生成部18の記憶部61は、各部位領域の2次曲線を記憶する。具体的には、記憶部61は、各部位領域の物体の奥行き値と部位領域における水平方向の位置との関係のモデルを表す2次曲線である水平2次曲線と、各部位領域の物体の奥行き値と部位領域における垂直方向の位置との関係のモデルを表す2次曲線である垂直2次曲線とを記憶する。   The storage unit 61 of the depth generation unit 18 stores a quadratic curve of each part region. Specifically, the storage unit 61 includes a horizontal quadratic curve that is a quadratic curve representing a model of the relationship between the depth value of the object in each part region and the horizontal position in the part region, and the object in each part region. A vertical quadratic curve that is a quadratic curve representing a model of the relationship between the depth value and the position in the vertical direction in the region is stored.

サイズ補正部62は、記憶部61から各部位領域の水平2次曲線と垂直2次曲線を読み出し、顔検出部11から供給される顔画像のサイズに基づいて、その水平2次曲線と垂直2次曲線を補正する。サイズ補正部62は、補正後の水平2次曲線と垂直2次曲線を角度補正部63に供給する。   The size correction unit 62 reads out the horizontal quadratic curve and the vertical quadratic curve of each region from the storage unit 61, and based on the size of the face image supplied from the face detection unit 11, the horizontal quadratic curve and the vertical 2 Correct the quadratic curve. The size correction unit 62 supplies the corrected horizontal quadratic curve and vertical quadratic curve to the angle correction unit 63.

角度補正部63は、顔検出部11から供給される顔画像の角度に基づいて、サイズ補正部62から供給される顔内領域および顔外領域の水平2次曲線と垂直2次曲線を補正する。角度補正部63は、補正後の顔内領域および顔外領域の水平2次曲線と垂直2次曲線を生成部64に供給する。また、角度補正部63は、サイズ補正部62から供給される首領域、胴体内領域、および胴体外領域の水平2次曲線と垂直2次曲線をそのまま生成部64に供給する。   The angle correction unit 63 corrects the horizontal quadratic curve and the vertical quadratic curve of the in-face region and the out-of-face region supplied from the size correction unit 62 based on the angle of the face image supplied from the face detection unit 11. . The angle correction unit 63 supplies the corrected horizontal quadratic curve and vertical quadratic curve of the in-face region and the out-of-face region to the generation unit 64. In addition, the angle correction unit 63 supplies the horizontal quadratic curve and the vertical quadratic curve of the neck region, the body region, and the body outside region supplied from the size correction unit 62 to the generation unit 64 as they are.

生成部64は、人物領域内の各画素を順次処理対象の画素とする。生成部64は、境界判定部17から供給される部位情報に基づいて、処理対象の画素の部位領域を判定する。生成部64は、角度補正部63から供給される水平2次曲線および垂直2次曲線のうちの、処理対象の画素の部位領域の水平2次曲線および垂直2次曲線に基づいて、処理対象の画素の水平方向および垂直方向の位置に対応する奥行き値を生成する。生成部64は、生成された人物領域内の各画素の奥行き値を図1の選択部19に供給する。   The generation unit 64 sequentially sets each pixel in the person area as a processing target pixel. The generation unit 64 determines the region of the pixel to be processed based on the region information supplied from the boundary determination unit 17. The generating unit 64 is based on the horizontal quadratic curve and the vertical quadratic curve of the region of the pixel to be processed among the horizontal quadratic curve and the vertical quadratic curve supplied from the angle correction unit 63. Depth values corresponding to the horizontal and vertical positions of the pixel are generated. The generation unit 64 supplies the generated depth value of each pixel in the person area to the selection unit 19 in FIG.

[水平2次曲線の例]
図4は、図3の記憶部61に記憶される水平2次曲線の例を示す図である。
[Example of horizontal quadratic curve]
FIG. 4 is a diagram illustrating an example of a horizontal quadratic curve stored in the storage unit 61 of FIG.

なお、図4において、横軸は、部位領域の水平方向の中心座標を0としたときの水平方向の位置jを表している。また、縦軸は、位置jにおける部位領域の物体の奥行き値dhを表している。本明細書では、奥行き値は、背景画像用の奥行き値を0としたときの値であり、手前側の位置を表すほど大きく、奥側の位置を表すほど小さいものとする。 In FIG. 4, the horizontal axis represents the position j in the horizontal direction when the center coordinate in the horizontal direction of the part region is 0. The vertical axis represents the depth value d h of the object in the part region at position j. In this specification, the depth value is a value when the depth value for the background image is set to 0, and is assumed to be larger as representing the near side position and smaller as representing the far side position.

図4に示すように、水平2次曲線は、部位領域の物体の奥行き値dhと部位領域における水平方向の位置jとの関係のモデルを表している。具体的には、水平2次曲線は、以下の式(1)で定義される。 As shown in FIG. 4, the horizontal quadratic curve represents a model of the relationship between the depth value d h of the object in the part region and the horizontal position j in the part region. Specifically, the horizontal quadratic curve is defined by the following equation (1).

Figure 2014021744
Figure 2014021744

式(1)におけるofstは、図4に示すように、背景画像用の奥行き値から水平2次曲線が表す奥行き値dhまでの距離であり、jvolは、水平2次曲線が表す奥行き値dhの範囲(レンジ)である。また、jwは、水平2次曲線において有効な水平方向の位置jの範囲の半分の値である。 As shown in FIG. 4, ofst in equation (1) is the distance from the depth value for the background image to the depth value d h represented by the horizontal quadratic curve, and jvol is the depth value d represented by the horizontal quadratic curve. The range of h . Moreover, jw is a half value of the range of the position j in the horizontal direction effective in the horizontal quadratic curve.

なお、図4では水平2次曲線についてのみ説明したが、垂直2次曲線は、位置jが部位領域の垂直方向の中心座標を0としたときの垂直方向の位置iに代わる点を除いて水平2次曲線と同様であるので、説明は省略する。   Although only the horizontal quadratic curve is described in FIG. 4, the vertical quadratic curve is horizontal except that the position j replaces the vertical position i when the central coordinate in the vertical direction of the region is 0. Since it is the same as a quadratic curve, description is abbreviate | omitted.

ここで、背景画像用の奥行き値から垂直2次曲線が表す奥行き値dvまでの距離は、水平2次曲線の距離ofstと同一である。また、以下では、垂直2次曲線が表す奥行き値dvの範囲(レンジ)を、レンジivolといい、垂直2次曲線において有効な垂直方向の位置iの範囲の半分の値を、値iwという。 Here, the distance from the depth value of the background image to the depth value d v representing the vertical quadratic curve is the same as the distance of the horizontal quadratic curve ofst. In the following, the range of depth values d v representing the vertical quadratic curve (range) is referred to as range IVOL, the half value of the range of positions i of the effective vertical in the vertical quadratic curve, that the value iw .

[水平2次曲線および垂直2次曲線の顔画像のサイズに基づく補正の説明]
図5は、ズームイン撮影に伴う奥行き値の変化を説明する図である。
[Description of correction based on size of face image of horizontal quadratic curve and vertical quadratic curve]
FIG. 5 is a diagram for explaining a change in depth value accompanying zoom-in photographing.

図5に示すように、通常撮影された画像81における人物領域81Aの水平方向の位置に対応する奥行き値のレンジは、所定のズーム倍率で撮影された画像82における人物領域82Aの水平方向の位置に対応する奥行き値のレンジより大きくなる。このように、ズームイン撮影や比較的近くからの撮影等により人物領域のサイズが大きくなると、水平方向の位置に対応する奥行き値のレンジは大きくなる。これに対して、図示は省略するが、ズームアウト撮影や比較的遠くからの撮影等により人物領域のサイズが小さくなると、水平方向の位置に対応する奥行き値のレンジは小さくなる。   As shown in FIG. 5, the range of the depth value corresponding to the horizontal position of the person area 81A in the normally photographed image 81 is the horizontal position of the person area 82A in the image 82 photographed at a predetermined zoom magnification. It is larger than the range of depth values corresponding to. As described above, when the size of the person area increases due to zoom-in shooting or shooting from a relatively close distance, the range of depth values corresponding to the position in the horizontal direction increases. On the other hand, although not shown, when the size of the person area is reduced by zoom-out shooting or shooting from a relatively long distance, the range of depth values corresponding to the position in the horizontal direction is reduced.

また、図示は省略するが、垂直方向の位置に対応する奥行き値のレンジも水平方向の位置に対応する奥行き値のレンジと同様に、人物領域のサイズに応じて変化する。従って、サイズ補正部62は、人物領域のサイズに対応する顔画像のサイズに基づいて、水平2次曲線のレンジjvolと垂直2次曲線のレンジivolを補正する。   Although not shown, the depth value range corresponding to the position in the vertical direction also changes according to the size of the person area in the same manner as the depth value range corresponding to the position in the horizontal direction. Accordingly, the size correction unit 62 corrects the range jvol of the horizontal quadratic curve and the range ivol of the vertical quadratic curve based on the size of the face image corresponding to the size of the person area.

図6は、顔画像のサイズと、サイズ補正部62により補正された水平2次曲線のレンジjvolの関係を示す図である。   FIG. 6 is a diagram showing the relationship between the size of the face image and the range jvol of the horizontal quadratic curve corrected by the size correction unit 62.

なお、図6において、横軸は、顔画像の水平方向の長さを表し、縦軸は、サイズ補正部62により補正された水平2次曲線のレンジjvolを表している。   In FIG. 6, the horizontal axis represents the horizontal length of the face image, and the vertical axis represents the horizontal quadratic curve range jvol corrected by the size correction unit 62.

図6に示すように、サイズ補正部62により補正された水平2次曲線のレンジjvolは、顔画像の水平方向の長さに比例する。即ち、サイズ補正部62は、顔画像の水平方向の長さに基づいて、レンジjvolが顔画像の水平方向の長さに比例するように、レンジjvolを補正する。また、図示は省略するが、サイズ補正部62は、レンジivolもレンジjvolと同様に、顔画像の垂直方向の長さに基づいて、顔画像の垂直方向の長さに比例するように補正する。   As shown in FIG. 6, the range jvol of the horizontal quadratic curve corrected by the size correction unit 62 is proportional to the horizontal length of the face image. That is, the size correction unit 62 corrects the range jvol based on the horizontal length of the face image so that the range jvol is proportional to the horizontal length of the face image. Although not shown, the size correction unit 62 corrects the range ivol to be proportional to the vertical length of the face image based on the vertical length of the face image, similarly to the range jvol. .

なお、記憶部61に記憶されている水平2次曲線のレンジjvolと垂直2次曲線のレンジivolは、例えば、デフォルト値であるようにすることができる。   Note that the horizontal quadratic curve range jvol and the vertical quadratic curve range ivol stored in the storage unit 61 may be default values, for example.

以上のように、サイズ補正部62は、顔画像のサイズに基づいて、顔画像のサイズが大きいほど、レンジjvolとレンジivolが大きくなるように補正する。従って、画像処理装置10は、実世界で人間が感じる近距離の人物と遠距離の人物の奥行き値の差を反映した奥行きマップを生成することができる。その結果、この奥行きマップを用いて、より自然な3D画像を生成することができる。   As described above, the size correction unit 62 corrects the range jvol and the range ivol to be larger as the size of the face image is larger, based on the size of the face image. Therefore, the image processing apparatus 10 can generate a depth map that reflects the difference in depth value between a short-distance person and a long-distance person that humans feel in the real world. As a result, a more natural 3D image can be generated using this depth map.

また、サイズ補正部62は、顔画像のサイズに基づいてレンジjvolとレンジivolを補正するだけで、より自然な奥行きマップを容易に生成することができる。これに対して、従来のように人間の一般的な顔の3次元形状情報に基づいて奥行きマップを生成する場合、その3次元形状情報に対応する顔を拡大または縮小して、3次元形状情報に対応する顔のサイズと入力画像内の顔のサイズを精度良く一致させる必要がある。従って、従来の場合、より自然な奥行きマップを生成するためには複雑な処理が必要である。   In addition, the size correction unit 62 can easily generate a more natural depth map only by correcting the range jvol and the range ivol based on the size of the face image. On the other hand, when generating a depth map based on three-dimensional shape information of a general human face as in the prior art, the face corresponding to the three-dimensional shape information is enlarged or reduced to obtain three-dimensional shape information. It is necessary to match the face size corresponding to the face size in the input image with high accuracy. Therefore, in the conventional case, complicated processing is required to generate a more natural depth map.

なお、図6の例では、サイズ補正部62は、顔画像のサイズに基づいて、レンジjvolとレンジivolを線形変換したが、人間の視覚特性に応じた非線形変換するようにしてもよい。   In the example of FIG. 6, the size correction unit 62 linearly converts the range jvol and the range ivol based on the size of the face image, but may perform nonlinear conversion according to human visual characteristics.

[奥行き値の生成の説明]
図7および図8は、顔画像の角度が全て0度である場合の奥行き値の生成を説明する図である。
[Description of depth value generation]
7 and 8 are diagrams for explaining generation of depth values when the angles of the face images are all 0 degrees.

図7および図8に示すように、顔画像の角度が全て0度である場合、角度補正部63は、サイズ補正部62から供給される水平2次曲線と垂直2次曲線をそのまま生成部64に供給する。   As shown in FIGS. 7 and 8, when the angles of the face images are all 0 degrees, the angle correction unit 63 generates the horizontal quadratic curve and the vertical quadratic curve supplied from the size correction unit 62 as they are. To supply.

図7に示すように、生成部64は、処理対象の画素の部位領域が顔内領域42である場合、生成部64は、角度補正部63から供給される水平2次曲線と垂直2次曲線のうちの、顔内領域42の水平2次曲線101と垂直2次曲線102を選択する。そして、生成部64は、選択された水平2次曲線101と垂直2次曲線102を用いて、処理対象の画素の奥行き値を生成する。   As illustrated in FIG. 7, the generation unit 64 generates a horizontal quadratic curve and a vertical quadratic curve supplied from the angle correction unit 63 when the region of the pixel to be processed is the in-face region 42. Of these, the horizontal quadratic curve 101 and the vertical quadratic curve 102 of the in-face region 42 are selected. Then, the generating unit 64 generates the depth value of the pixel to be processed using the selected horizontal quadratic curve 101 and vertical quadratic curve 102.

具体的には、顔内領域42の水平2次曲線101が以下の式(2)で定義され、垂直2次曲線102が以下の式(3)で定義される場合、生成部64は、以下の式(4)により、処理対象の画素の奥行き値を生成する。   Specifically, when the horizontal quadratic curve 101 of the in-face region 42 is defined by the following equation (2) and the vertical quadratic curve 102 is defined by the following equation (3), the generation unit 64: The depth value of the pixel to be processed is generated by the equation (4).

Figure 2014021744
Figure 2014021744

なお、式(2)乃至(4)において、ofst1は、水平2次曲線101と垂直2次曲線102に共通の距離ofstであり、式(2)において、dh1は、水平2次曲線101が表す奥行き値である。また、式(2)および式(4)において、jvol1は水平2次曲線101のレンジjvolであり、jw1は水平2次曲線101の値jwである。 In equations (2) to (4), ofst 1 is a distance ofst common to the horizontal quadratic curve 101 and the vertical quadratic curve 102. In equation (2), d h1 is the horizontal quadratic curve 101. Depth value represented by. In the equations (2) and (4), jvol 1 is the range jvol of the horizontal quadratic curve 101, and jw 1 is the value jw of the horizontal quadratic curve 101.

また、式(3)において、dV1は、垂直2次曲線102が表す奥行き値であり、式(4)において、d1は、顔内領域42の奥行き値である。さらに、式(3)および式(4)において、ivol1は垂直2次曲線102のレンジivolであり、iw1は垂直2次曲線102の値iwである。 In Expression (3), d V1 is a depth value represented by the vertical quadratic curve 102, and in Expression (4), d 1 is a depth value of the in-face region 42. Further, in Expression (3) and Expression (4), ivol 1 is the range ivol of the vertical quadratic curve 102, and iw 1 is the value iw of the vertical quadratic curve 102.

また、図7に示すように、処理対象の画素の部位領域が顔外領域43である場合、生成部64は、角度補正部63から供給される水平2次曲線と垂直2次曲線のうちの、顔外領域42の水平2次曲線103と垂直2次曲線104を選択する。そして、生成部64は、選択された水平2次曲線103と垂直2次曲線104を用いて、処理対象の画素の奥行き値を生成する。   As shown in FIG. 7, when the region of the pixel to be processed is the out-of-face region 43, the generation unit 64 includes the horizontal quadratic curve and the vertical quadratic curve supplied from the angle correction unit 63. Then, the horizontal quadratic curve 103 and the vertical quadratic curve 104 of the out-of-face region 42 are selected. Then, the generation unit 64 generates the depth value of the pixel to be processed using the selected horizontal quadratic curve 103 and vertical quadratic curve 104.

具体的には、顔外領域42の水平2次曲線103が以下の式(5)で定義され、垂直2次曲線104が以下の式(6)で定義される場合、生成部64は、以下の式(7)により、処理対象の画素の奥行き値を生成する。   Specifically, when the horizontal quadratic curve 103 of the out-of-face region 42 is defined by the following equation (5) and the vertical quadratic curve 104 is defined by the following equation (6), the generation unit 64: The depth value of the pixel to be processed is generated by the equation (7).

Figure 2014021744
Figure 2014021744

なお、式(5)乃至(7)において、ofst2は、水平2次曲線103と垂直2次曲線104に共通の距離ofstであり、式(5)において、dh2は、水平2次曲線103が表す奥行き値である。また、式(5)および式(7)において、jvol2は水平2次曲線103のレンジjvolであり、jw2は水平2次曲線103の値jwである。 In Expressions (5) to (7), ofst 2 is a distance ofst common to the horizontal quadratic curve 103 and the vertical quadratic curve 104. In Expression (5), d h2 is the horizontal quadratic curve 103. Depth value represented by. In the equations (5) and (7), jvol 2 is the range jvol of the horizontal quadratic curve 103, and jw 2 is the value jw of the horizontal quadratic curve 103.

また、式(6)において、dV2は、垂直2次曲線104が表す奥行き値であり、式(7)において、d2は、顔外領域42の奥行き値である。さらに、式(6)および式(7)において、ivol2は垂直2次曲線104のレンジivolであり、iw2は垂直2次曲線104の値iwである。 In Expression (6), d V2 is a depth value represented by the vertical quadratic curve 104, and in Expression (7), d 2 is a depth value of the out-of-face region 42. Further, in Expression (6) and Expression (7), ivol 2 is the range ivol of the vertical quadratic curve 104, and iw 2 is the value iw of the vertical quadratic curve 104.

図7の例では、レンジjvol2がレンジjvol1より大きく設定されているので、より実際の人物の顔の奥行き値に近い奥行き値を生成することができる。 In the example of FIG. 7, since the range jvol 2 is set to be larger than the range jvol 1 , a depth value closer to the actual human face depth value can be generated.

即ち、生成部64は、顔内領域42の奥行き値を、レンジjvol1で定義される水平2次曲線101を用いて生成し、顔外領域43の奥行き値を、レンジjvol1より大きいレンジjvol2で定義される水平2次曲線103を用いて生成する。従って、顔外領域43の奥行き値に対応する曲率は、顔内領域42の奥行き値に対応する曲率より大きくなる。ここで、一般的に、人物の顔を正面から見た場合、顔内領域42に対応する顔の前面に比べて、顔外領域43に対応する顔の側面の曲率は強い。よって、生成部64は、より実際の人物の顔の奥行き値に近い奥行き値を生成することができるといえる。 That is, the generation unit 64 generates the depth value of the in-face region 42 using the horizontal quadratic curve 101 defined by the range jvol 1 , and sets the depth value of the out-of-face region 43 to a range jvol that is larger than the range jvol 1. It generated using a horizontal quadratic curve 103 defined by 2. Accordingly, the curvature corresponding to the depth value of the out-of-face region 43 is larger than the curvature corresponding to the depth value of the in-face region 42. Here, generally, when the face of a person is viewed from the front, the curvature of the side of the face corresponding to the out-of-face region 43 is stronger than the front of the face corresponding to the in-face region 42. Therefore, it can be said that the generation unit 64 can generate a depth value closer to the depth value of the actual person's face.

また、レンジjvol2がレンジjvol1より大きく設定されているので、人物領域外の領域と顔外領域43の奥行き値の差が大きくなる。その結果、奥行きマップを用いて生成される3D画像において、視聴者は、人物画像と背景画像を奥行き方向の位置により容易に分離することができる。即ち、奥行きマップを用いて立体効果の大きい3D画像を生成することができる。 In addition, since the range jvol 2 is set to be larger than the range jvol 1 , the difference between the depth values of the area outside the person area and the outside face area 43 becomes large. As a result, in the 3D image generated using the depth map, the viewer can easily separate the person image and the background image by the position in the depth direction. That is, a 3D image having a large stereoscopic effect can be generated using the depth map.

また、図8に示すように、処理対象の画素の部位領域が胴体内領域45である場合、生成部64は、角度補正部63から供給される水平2次曲線と垂直2次曲線のうちの、胴体内領域45の水平2次曲線121と垂直2次曲線122を選択する。そして、生成部64は、選択された水平2次曲線121と垂直2次曲線122を用いて、図7で説明した顔内領域42の場合と同様に、処理対象の画素の奥行き値を生成する。   As shown in FIG. 8, when the region of the pixel to be processed is the body region 45, the generation unit 64 includes the horizontal quadratic curve and the vertical quadratic curve supplied from the angle correction unit 63. The horizontal quadratic curve 121 and the vertical quadratic curve 122 of the body region 45 are selected. Then, the generation unit 64 generates the depth value of the pixel to be processed using the selected horizontal quadratic curve 121 and vertical quadratic curve 122 as in the case of the in-face region 42 described with reference to FIG. .

さらに、図8に示すように、処理対象の画素の部位領域が胴体外領域46である場合、生成部64は、角度補正部63から供給される水平2次曲線と垂直2次曲線のうちの、胴体外領域46の水平2次曲線123と垂直2次曲線124を選択する。そして、生成部64は、選択された水平2次曲線123と垂直2次曲線124を用いて、図7で説明した顔外領域43の場合と同様に、処理対象の画素の奥行き値を生成する。   Furthermore, as illustrated in FIG. 8, when the region of the pixel to be processed is the torso-outside region 46, the generation unit 64 includes the horizontal quadratic curve and the vertical quadratic curve supplied from the angle correction unit 63. The horizontal quadratic curve 123 and the vertical quadratic curve 124 of the outer body region 46 are selected. Then, the generation unit 64 generates the depth value of the pixel to be processed using the selected horizontal quadratic curve 123 and vertical quadratic curve 124 as in the case of the out-of-face region 43 described with reference to FIG. .

なお、図示は省略するが、処理対象の画素の部位領域が首領域44である場合も、生成部64は、他の部位領域の場合と同様に、首領域44の水平2次曲線と垂直2次曲線を用いて、処理対象の画素の奥行き値を生成する。首領域44の水平2次曲線と垂直2次曲線は、顔外領域43の奥行き値より首領域44の奥行き値の方が小さくなるようになっている。これにより、奥行きマップを用いて生成された3D画像において、顎と首を分離するができ、実際の人物により近似した3D画像を生成することができる。   Although illustration is omitted, when the part region of the pixel to be processed is the neck region 44, the generation unit 64 is similar to the case of other part regions, and the horizontal quadratic curve and the vertical 2 of the neck region 44 are the same. The depth value of the pixel to be processed is generated using the next curve. In the horizontal quadratic curve and the vertical quadratic curve of the neck region 44, the depth value of the neck region 44 is smaller than the depth value of the out-of-face region 43. Thereby, in the 3D image generated by using the depth map, the chin and the neck can be separated, and a 3D image approximated to an actual person can be generated.

図9は、以上のように生成された人物領域の各画素の奥行き値の例を示す図である。   FIG. 9 is a diagram illustrating an example of the depth value of each pixel of the person area generated as described above.

図9において、x軸は、入力画像における各画素の水平方向の位置を表し、y軸は、入力画像における各画素の垂直方向の位置を表し、z軸は、各画素の奥行き値を表す。なお、図9では、人物領域外の領域の奥行き値も、背景画像用の奥行き値0として示されている。   In FIG. 9, the x-axis represents the horizontal position of each pixel in the input image, the y-axis represents the vertical position of each pixel in the input image, and the z-axis represents the depth value of each pixel. In FIG. 9, the depth value of the area outside the person area is also shown as the depth value 0 for the background image.

次に、図10は、顔画像のヨー角が0以外のθjであり、ピッチ角が0以外のθiである場合の顔内領域42と顔外領域43の画素の奥行き値の生成を説明する図である。 Next, FIG. 10 illustrates generation of pixel depth values in the in-face region 42 and the out-of-face region 43 when the yaw angle of the face image is θ j other than 0 and the pitch angle is θ i other than 0. It is a figure explaining.

図10に示すように、顔画像のヨー角が0以外のθjである場合、角度補正部63は、以下の式(8)に示すように、ヨー角θjを用いてシフト量shiftjを求める。なお、本明細書では、顔画像が左向きである場合、ヨー角θjは正の値であり、顔画像が右向きである場合、ヨー角θjは負の値であるものとする。 As shown in FIG. 10, when the yaw angle of the face image is θ j other than 0, the angle correction unit 63 uses the yaw angle θ j as shown in the following equation (8) to shift amount shift j. Ask for. In this specification, it is assumed that the yaw angle θ j is a positive value when the face image is facing left, and the yaw angle θ j is a negative value when the face image is facing right.

Figure 2014021744
Figure 2014021744

そして、図10に示すように、角度補正部63は、シフト量shiftjに基づいて、水平2次曲線101(図7)を、以下の式(9)で定義される水平2次曲線141に補正する。 Then, as shown in FIG. 10, the angle correction unit 63 converts the horizontal quadratic curve 101 (FIG. 7) into a horizontal quadratic curve 141 defined by the following equation (9) based on the shift amount shift j . to correct.

Figure 2014021744
Figure 2014021744

なお、式(9)において、dh1'は、水平2次曲線141が表す奥行き値である。 In Expression (9), d h1 ′ is a depth value represented by the horizontal quadratic curve 141.

ここで、補正後の水平2次曲線103である水平2次曲線143を、水平2次曲線143が表す奥行き値dh2'と水平2次曲線103の距離ofst2を用いて、以下の式(10)で定義する。 Here, the horizontal quadratic curve 143 that is the corrected horizontal quadratic curve 103 is expressed by the following equation ( 2 ) using the depth value d h2 ′ represented by the horizontal quadratic curve 143 and the distance ofst 2 of the horizontal quadratic curve 103: 10).

h2'-ofst2=a(j-b)
・・・(10)
d h2 '-ofst 2 = a (jb)
(10)

このとき、水平2次曲線141と補正後の水平2次曲線103である水平2次曲線143の2つの交点(Hb,dHb)と交点(Hc,dHc)は、以下の式(11)で表される。 At this time, two intersections (Hb, d Hb ) and intersections (Hc, d Hc ) of the horizontal quadratic curve 141 and the horizontal quadratic curve 143 which is the corrected horizontal quadratic curve 103 are expressed by the following equation (11). It is represented by

Figure 2014021744
Figure 2014021744

なお、式(11)における-Hb、即ちHcは、顔内領域42の短軸の長さの半分である。   In Expression (11), −Hb, that is, Hc, is half the length of the short axis of the in-face region 42.

式(11)の連立方程式を解くことにより、a,bは、以下の式(12)で表される。   By solving the simultaneous equations of Expression (11), a and b are expressed by the following Expression (12).

Figure 2014021744
Figure 2014021744

ここで、交点(Hb,dHb)と交点(Hc,dHc)は、水平2次曲線141上の点でもあるため、上述した式(9)により、dHbとdHcを求めることができる。従って、角度補正部63は、上述した式(9)により、dHbとdHcを求め、水平2次曲線103を、以下の式(13)で定義する水平2次曲線143に補正する。 Here, since the intersection (Hb, d Hb ) and the intersection (Hc, d Hc ) are also points on the horizontal quadratic curve 141, d Hb and d Hc can be obtained by the above-described equation (9). . Accordingly, the angle correction unit 63 obtains d Hb and d Hc by the above-described equation (9), and corrects the horizontal quadratic curve 103 to a horizontal quadratic curve 143 defined by the following equation (13).

Figure 2014021744
Figure 2014021744

また、図10に示すように、顔画像のピッチ角が0以外のθiである場合、角度補正部63は、値iw1、ピッチ角θi、およびレンジivol1を用いて、シフト量shiftjと同様にシフト量shiftiを求める。なお、本明細書では、顔画像が上向きである場合、ピッチ角θiは正の値であり、顔画像が下向きである場合、ピッチ角θiは負の値であるものとする。 As shown in FIG. 10, when the pitch angle of the face image is θ i other than 0, the angle correction unit 63 uses the value iw 1 , the pitch angle θ i , and the range ivol 1 to shift the shift amount shift. The shift amount shift i is obtained in the same manner as j . In this specification, when the face image is upward, the pitch angle θi is a positive value, when the face image is downward, it is assumed the pitch angle theta i is a negative value.

図10に示すように、角度補正部63は、シフト量shiftiに基づいて、水平2次曲線101と同様に、垂直2次曲線102(図7)を垂直2次曲線142に補正する。また、角度補正部63は、水平2次曲線143と同様に、垂直2次曲線104を垂直2次曲線144に補正する。 As shown in FIG. 10, the angle correction unit 63 corrects the vertical quadratic curve 102 (FIG. 7) to the vertical quadratic curve 142 in the same manner as the horizontal quadratic curve 101 based on the shift amount shift i . Further, the angle correction unit 63 corrects the vertical quadratic curve 104 to the vertical quadratic curve 144 in the same manner as the horizontal quadratic curve 143.

そして、ピッチ角とヨー角が0以外である場合、生成部64は、水平2次曲線141と垂直2次曲線142に基づいて、以下の式(14)により、顔内領域42の画素の奥行き値d1’を生成する。 When the pitch angle and the yaw angle are other than 0, the generation unit 64 uses the following equation (14) based on the horizontal quadratic curve 141 and the vertical quadratic curve 142 to calculate the pixel depth of the in-face region 42. Generate the value d 1 '.

Figure 2014021744
Figure 2014021744

また、生成部64は、水平2次曲線143と垂直2次曲線144に基づいて、以下の式(15)により、顔外領域43の画素の奥行き値d2’を生成する。 Further, the generation unit 64 generates the depth value d 2 ′ of the pixel in the out-of-face region 43 based on the horizontal quadratic curve 143 and the vertical quadratic curve 144 by the following equation (15).

Figure 2014021744
Figure 2014021744

なお、式(15)において、dVb,dVcは、垂直2次曲線142と垂直2次曲線144の2つの交点の垂直方向の位置Vb,Vcに対応する奥行き値である。また、位置-Vbは位置Vcと同一であり、顔内領域42の長軸の長さの半分である。 In Expression (15), d Vb and d Vc are depth values corresponding to the vertical positions Vb and Vc of the two intersections of the vertical quadratic curve 142 and the vertical quadratic curve 144. The position −Vb is the same as the position Vc, and is half the length of the long axis of the in-face region 42.

以上のように、角度補正部63は、顔画像のヨー角θjとピッチ角θiに基づいて、ヨー角とピッチ角が所定値(本実施の形態では0)である場合の顔内領域42および顔外領域43の水平2次曲線と垂直2次曲線を補正する。従って、奥行き生成部18は、ヨー角とピッチ角が所定値である場合の顔内領域42および顔外領域43の水平2次曲線と垂直2次曲線を用いて、顔内領域42と顔外領域43の奥行き値を、顔画像の角度に応じた自然な奥行き値にすることができる。 As described above, the angle correction unit 63 is based on the yaw angle θ j and the pitch angle θ i of the face image, and the in-face region when the yaw angle and the pitch angle are predetermined values (0 in the present embodiment). 42 and the horizontal quadratic curve and the vertical quadratic curve of the region 43 outside the face are corrected. Therefore, the depth generation unit 18 uses the horizontal quadratic curve and the vertical quadratic curve of the in-face region 42 and the out-of-face region 43 when the yaw angle and the pitch angle are predetermined values, and the in-face region 42 and the out-of-face region. The depth value of the region 43 can be a natural depth value corresponding to the angle of the face image.

これに対して、従来のように人間の一般的な顔の3次元形状情報を用いて奥行きマップを生成する場合、顔画像の角度に応じた奥行き値を生成するためには、顔画像の角度ごとの3次元形状情報を保持する必要がある。従って、奥行きマップの生成に用いられる情報の情報量が多くなる。   On the other hand, when a depth map is generated using three-dimensional shape information of a general human face as in the prior art, in order to generate a depth value according to the angle of the face image, the angle of the face image Each three-dimensional shape information needs to be held. Therefore, the amount of information used for generating the depth map increases.

[画像処理装置の処理の説明]
図11は、図1の画像処理装置10の奥行きマップ生成処理を説明するフローチャートである。この奥行きマップ生成処理は、画像処理装置10に外部から画像が入力画像として入力されたとき、開始される。
[Description of processing of image processing apparatus]
FIG. 11 is a flowchart for explaining the depth map generation processing of the image processing apparatus 10 of FIG. This depth map generation process is started when an image is input to the image processing apparatus 10 from the outside as an input image.

図11のステップS11において、画像処理装置10の顔検出部11は、外部から入力された入力画像内の顔画像を検出する。顔検出部11は、検出された顔画像の顔画像情報を、顔内領域判定部12、顔外領域判定部13、首領域判定部14、胴体内領域判定部15、および胴体外領域判定部16に供給する。   In step S11 of FIG. 11, the face detection unit 11 of the image processing apparatus 10 detects a face image in an input image input from the outside. The face detection unit 11 converts the face image information of the detected face image into an in-face region determination unit 12, an out-of-face region determination unit 13, a neck region determination unit 14, a torso region determination unit 15, and an torso region determination unit. 16 is supplied.

ステップS12において、顔検出部11は、検出された顔画像のピッチ角とヨー角を顔画像の角度として検出する。顔検出部11は、検出された顔画像の角度と顔画像のサイズを奥行き生成部18に供給する。   In step S12, the face detection unit 11 detects the pitch angle and yaw angle of the detected face image as the angle of the face image. The face detection unit 11 supplies the detected angle of the face image and the size of the face image to the depth generation unit 18.

ステップS13において、顔内領域判定部12は、顔検出部11から供給される顔画像情報に基づいて、顔画像の中心を中心とする、顔画像のサイズに基づくサイズの楕円領域を顔内領域に設定し、その顔内領域の顔内領域情報を境界判定部17に供給する。   In step S <b> 13, the in-face region determination unit 12 determines an ellipse region having a size based on the size of the face image centered on the center of the face image based on the face image information supplied from the face detection unit 11. And the face area information of the face area is supplied to the boundary determination unit 17.

ステップS14において、顔外領域判定部13は、顔検出部11から供給される顔画像情報に基づいて、顔画像の中心を中心とする、顔画像のサイズに基づくサイズであって、顔内領域より大きい楕円領域を顔外領域に設定する。顔外領域判定部13は、その顔外領域の顔外領域情報を境界判定部17に供給する。   In step S <b> 14, the out-of-face area determination unit 13 has a size based on the size of the face image centered on the center of the face image based on the face image information supplied from the face detection unit 11. A larger ellipse area is set as the out-of-face area. The out-of-face area determination unit 13 supplies out-of-face area information of the out-of-face area to the boundary determination unit 17.

ステップS15において、首領域判定部14は、顔検出部11から供給される顔画像情報に基づいて、顔画像の下の、顔画像のサイズに基づくサイズの長方形の領域を首領域に設定し、その首領域の首領域情報を境界判定部17に供給する。   In step S15, the neck region determination unit 14 sets a rectangular region having a size based on the size of the face image below the face image as the neck region based on the face image information supplied from the face detection unit 11. The neck area information of the neck area is supplied to the boundary determination unit 17.

ステップS16において、胴体内領域判定部15は、顔検出部11から供給される顔画像情報に基づいて、顔画像のサイズに基づくサイズの、首領域の下の台形領域と、その台形領域の下の長方形領域とを、胴体内領域に設定する。胴体内領域判定部15は、その胴体内領域の胴体内領域情報を境界判定部17に供給する。   In step S <b> 16, the body region determination unit 15, based on the face image information supplied from the face detection unit 11, has a trapezoid region below the neck region and a size below the trapezoid region, based on the size of the face image. The rectangular area is set as the body area. The body area determination unit 15 supplies the body area information of the body area to the boundary determination unit 17.

ステップS17において、胴体外領域判定部16は、顔検出部11から供給される顔画像情報に基づいて、顔画像のサイズに基づくサイズであって、首領域の下の胴体内領域より大きい、台形領域と、その台形領域の下の長方形領域とを、胴体外領域に設定する。胴体外領域判定部16は、その胴体外領域の胴体外領域情報を境界判定部17に供給する。   In step S17, the torso outside region determination unit 16 is based on the face image information supplied from the face detection unit 11, and is a size based on the size of the face image and larger than the torso region below the neck region. The region and the rectangular region below the trapezoidal region are set as the body outside region. The torso outside region determination unit 16 supplies the torso outside region information of the torso outside region to the boundary determination unit 17.

ステップS18において、境界判定部17は、顔内領域判定部12、首領域判定部14、胴体内領域判定部15、および胴体外領域判定部16から供給される部位領域情報に基づいて、部位領域を人物領域に決定する。   In step S <b> 18, the boundary determination unit 17 determines the part region based on the part region information supplied from the in-face region determination unit 12, the neck region determination unit 14, the torso region determination unit 15, and the torso region determination unit 16. Is determined as a person area.

ステップS19において、境界判定部17は、部位領域情報に基づいて、図2で説明したように、人物領域内の各画素を、最終的な顔内領域、顔外領域、首領域、胴体内領域、または胴体外領域の画素に決定することにより、最終的な部位領域を決定する。境界判定部17は、決定された最終的な部位領域の部位情報を、奥行き生成部18に供給する。   In step S19, the boundary determination unit 17 determines each pixel in the person area based on the part area information as a final in-face area, an out-of-face area, a neck area, and a torso area, as described in FIG. The final region is determined by determining the pixel in the region outside the body. The boundary determination unit 17 supplies the determined part information on the final part region to the depth generation unit 18.

ステップS20において、境界判定部17は、人物領域内の各画素に対して、人物領域であることを表す人物領域フラグを生成し、入力画像内の人物領域外の各画素に対して、人物領域ではないことを表す人物領域フラグを生成する。境界判定部17は、入力画像の各画素の人物領域フラグを選択部19に供給する。   In step S <b> 20, the boundary determination unit 17 generates a person area flag representing a person area for each pixel in the person area, and the person area for each pixel outside the person area in the input image. A person area flag representing that is not generated is generated. The boundary determination unit 17 supplies the person region flag of each pixel of the input image to the selection unit 19.

ステップS21において、奥行き生成部18は、人物領域内の各画素の奥行き値を生成する奥行き値生成処理を行う。この奥行き値生成処理の詳細は、後述する図12を参照して説明する。   In step S <b> 21, the depth generation unit 18 performs a depth value generation process for generating a depth value of each pixel in the person area. Details of the depth value generation processing will be described with reference to FIG.

ステップS22において、選択部19は、入力画像を構成する画素のうちの、まだ処理対象の画素として決定されていない画素を、処理対象の画像に決定する。ステップS23において、選択部19は、処理対象の画像の人物領域フラグが、人物領域であることを表しているかどうかを判定する。   In step S <b> 22, the selection unit 19 determines a pixel that has not yet been determined as a pixel to be processed among the pixels constituting the input image as a processing target image. In step S <b> 23, the selection unit 19 determines whether or not the person area flag of the image to be processed represents a person area.

ステップS23で処理対象の画像の人物領域フラグが、人物領域であることを表していると判定された場合、処理はステップS24に進む。ステップS24において、選択部19は、処理対象の画素に対応する奥行きマップの画素の画素値として、奥行き生成部18から供給される人物領域の処理対象の画素の奥行き値を割り当て、処理をステップS26に進める。   If it is determined in step S23 that the person area flag of the image to be processed represents a person area, the process proceeds to step S24. In step S24, the selection unit 19 assigns the depth value of the pixel to be processed of the person area supplied from the depth generation unit 18 as the pixel value of the pixel in the depth map corresponding to the pixel to be processed, and performs the process in step S26. Proceed to

一方、ステップS23で処理対象の画像の人物領域フラグが、人物領域ではないことを表していると判定された場合、処理はステップS25に進む。ステップS25において、選択部19は、処理対象の画素に対応する奥行きマップの画素の画素値として、外部から入力される背景画像用の奥行き値を割り当て、処理をステップS26に進める。   On the other hand, if it is determined in step S23 that the person area flag of the image to be processed represents that it is not a person area, the process proceeds to step S25. In step S25, the selection unit 19 assigns a background image depth value input from the outside as the pixel value of the pixel of the depth map corresponding to the pixel to be processed, and advances the process to step S26.

ステップS26において、選択部19は、入力画像の全ての画素を処理対象の画素としたかどうかを判定する。ステップS26でまだ入力画像の全ての画素を処理対象の画素としていないと判定された場合、選択部19は、処理をステップS22に戻し、入力画像の全ての画素を処理対象の画素とするまで、ステップS22乃至S26の処理を繰り返す。   In step S <b> 26, the selection unit 19 determines whether all the pixels of the input image have been processed. When it is determined in step S26 that all the pixels of the input image have not yet been processed, the selection unit 19 returns the process to step S22 until all the pixels of the input image are processed. The processes in steps S22 to S26 are repeated.

一方、ステップS26で入力画像の全ての画素を処理対象の画素としたと判定された場合、選択部19は、全ての画素の画素値として奥行き値が割り当てられた奥行きマップを平滑化処理部20に供給する。   On the other hand, when it is determined in step S26 that all the pixels of the input image are the processing target pixels, the selection unit 19 smoothes the depth map in which the depth values are assigned as the pixel values of all the pixels. To supply.

ステップS27において、平滑化処理部20は、一般的な空間フィルタを用いて、選択部19から供給される奥行きマップを平滑化して出力し、処理を終了する。   In step S27, the smoothing processing unit 20 smoothes and outputs the depth map supplied from the selection unit 19 using a general spatial filter, and ends the processing.

図12は、図11のステップS21の奥行き値生成処理の詳細を説明するフローチャートである。   FIG. 12 is a flowchart for explaining details of the depth value generation processing in step S21 of FIG.

図12のステップS41において、サイズ補正部62は、記憶部61から各部位領域の水平2次曲線と垂直2次曲線を読み出す。ステップS42において、顔検出部11から供給される顔画像のサイズに基づいて、読み出された各部位領域の水平2次曲線のレンジjvolと垂直2次曲線のレンジivolを補正する。   In step S <b> 41 of FIG. 12, the size correction unit 62 reads out the horizontal quadratic curve and the vertical quadratic curve of each region from the storage unit 61. In step S42, based on the size of the face image supplied from the face detection unit 11, the range jvol of the horizontal quadratic curve and the range ivol of the vertical quadratic curve of each read region are corrected.

サイズ補正部62は、補正後の水平2次曲線と垂直2次曲線を角度補正部63に供給する。角度補正部63は、サイズ補正部62から供給される首領域44、胴体内領域45、および胴体外領域46の水平2次曲線と垂直2次曲線をそのまま生成部64に供給する。   The size correction unit 62 supplies the corrected horizontal quadratic curve and vertical quadratic curve to the angle correction unit 63. The angle correction unit 63 supplies the horizontal quadratic curve and the vertical quadratic curve of the neck region 44, the body region 45, and the body outside region 46 supplied from the size correction unit 62 to the generation unit 64 as they are.

ステップS43において、角度補正部63は、顔検出部11から顔画像の角度として供給される顔画像のヨー角が0であるかどうかを判定する。ステップS43で顔画像のヨー角が0ではないと判定された場合、ステップS44において、角度補正部63は、0ではないヨー角θjに基づいて、上述した式(8)、式(9)、および式(13)により、顔内領域42と顔外領域43の水平2次曲線を補正する。そして、角度補正部63は、補正後の顔内領域42と顔外領域43の水平2次曲線を生成部64に供給し、処理をステップS45に進める。 In step S <b> 43, the angle correction unit 63 determines whether the yaw angle of the face image supplied as the face image angle from the face detection unit 11 is zero. When it is determined in step S43 that the yaw angle of the face image is not 0, in step S44, the angle correction unit 63 is based on the non-zero yaw angle θ j and the above-described equations (8) and (9). And the horizontal quadratic curve of the in-face region 42 and the out-of-face region 43 is corrected by Equation (13). Then, the angle correction unit 63 supplies the corrected horizontal quadratic curves of the in-face region 42 and the out-of-face region 43 to the generation unit 64, and the process proceeds to step S45.

一方、ステップS43で顔画像のヨー角が0であると判定された場合、角度補正部63は、ステップS44の処理をスキップし、サイズ補正部62から供給される顔内領域42と顔外領域43の水平2次曲線をそのまま生成部64に供給する。そして、処理はステップS45に進む。   On the other hand, when it is determined in step S43 that the yaw angle of the face image is 0, the angle correction unit 63 skips the process of step S44 and the in-face region 42 and the out-of-face region supplied from the size correction unit 62. 43 horizontal quadratic curves are supplied to the generator 64 as they are. Then, the process proceeds to step S45.

ステップS45において、角度補正部63は、顔検出部11から顔画像の角度として供給される顔画像のピッチ角が0であるかどうかを判定する。ステップS45で顔画像のピッチ角が0ではないと判定された場合、ステップS46において、角度補正部63は、0ではないピッチ角θiに基づいて、図10で説明したように、顔内領域42と顔外領域43の垂直2次曲線を補正する。そして、角度補正部63は、補正後の顔内領域42と顔外領域43の垂直2次曲線を生成部64に供給し、処理をステップS47に進める。 In step S45, the angle correction unit 63 determines whether the pitch angle of the face image supplied as the face image angle from the face detection unit 11 is zero. When it is determined in step S45 that the pitch angle of the face image is not 0, in step S46, the angle correction unit 63, based on the non-zero pitch angle θ i , as described in FIG. 42 and the vertical quadratic curve of the out-of-face area 43 are corrected. Then, the angle correction unit 63 supplies the corrected vertical quadratic curve of the in-face region 42 and the out-of-face region 43 to the generation unit 64, and the process proceeds to step S47.

一方、ステップS45で顔画像のピッチ角が0であると判定された場合、角度補正部63は、ステップS46の処理をスキップし、サイズ補正部62から供給される顔内領域42と顔外領域43の垂直2次曲線をそのまま生成部64に供給する。そして、処理はステップS47に進む。   On the other hand, when it is determined in step S45 that the pitch angle of the face image is 0, the angle correction unit 63 skips the process of step S46 and the in-face area 42 and the out-of-face area supplied from the size correction unit 62. 43 vertical quadratic curves are supplied to the generation unit 64 as they are. Then, the process proceeds to step S47.

ステップS47において、生成部64は、人物領域内の画素のうちのまだ処理対象の画素とされていない画素を、処理対象の画素に決定する。ステップS48において、生成部64は、境界判定部17から供給される部位情報に基づいて、処理対象の画素の部位領域を判定する。   In step S47, the generation unit 64 determines a pixel that has not yet been processed as a pixel to be processed among the pixels in the person area. In step S <b> 48, the generation unit 64 determines the region of the pixel to be processed based on the region information supplied from the boundary determination unit 17.

ステップS49において、生成部64は、角度補正部63から供給される水平2次曲線および垂直2次曲線のうちの、処理対象の画素の部位領域の水平2次曲線および垂直2次曲線に基づいて、処理対象の画素の水平方向および垂直方向の位置に対応する奥行き値を生成する。   In step S49, the generation unit 64 is based on the horizontal quadratic curve and the vertical quadratic curve of the region of the pixel to be processed among the horizontal quadratic curve and the vertical quadratic curve supplied from the angle correction unit 63. Depth values corresponding to the horizontal and vertical positions of the pixel to be processed are generated.

ステップS50において、生成部64は、人物領域内の全ての画素を処理対象の画像としたかどうかを判定する。ステップS50でまだ人物領域内の全ての画素を処理対象の画素としていないと判定された場合、処理はステップS47に戻り、人物領域内の全ての画素を処理対象とするまで、ステップS47乃至S50の処理が繰り返される。   In step S50, the generation unit 64 determines whether all the pixels in the person area have been processed. If it is determined in step S50 that all pixels in the person area have not yet been processed, the process returns to step S47, and steps S47 to S50 are performed until all pixels in the person area are processed. The process is repeated.

一方、ステップS50で人物領域内の全ての画素を処理対象の画素としたと判定された場合、生成部64は、生成された人物領域内の全ての画素の奥行き値を図1の選択部19に供給する。そして、処理は、図11のステップS21に戻り、ステップS22に進む。   On the other hand, when it is determined in step S50 that all the pixels in the person area have been processed, the generation unit 64 sets the depth values of all the pixels in the generated person area to the selection unit 19 in FIG. To supply. And a process returns to step S21 of FIG. 11, and progresses to step S22.

以上のように、画像処理装置10は、奥行き値のモデルを表す2次曲線に基づいて、入力画像の奥行き値を生成する。従って、従来のように人間の一般的な顔の各特徴点の3次元形状情報に基づいて奥行き値を生成する場合に比べて、奥行き値の生成に用いられる情報の情報量を削減することができる。その結果、記憶部61の記憶容量は少なくて済む。   As described above, the image processing apparatus 10 generates the depth value of the input image based on the quadratic curve representing the depth value model. Therefore, the amount of information used to generate the depth value can be reduced as compared with the conventional case where the depth value is generated based on the three-dimensional shape information of each feature point of a general human face. it can. As a result, the storage capacity of the storage unit 61 can be small.

また、画像処理装置10は、部位領域ごとの2次曲線に基づいて部位領域ごとに奥行き値を生成するので、人物領域全体の1つの2次曲線に基づいて奥行き値を生成する場合に比べて、奥行き値の自由度が高くなる。その結果、より自然な奥行き値を容易に生成することができる。さらに、画像処理装置10は、顔画像に基づいて部位領域を設定するので、部位領域の設定が容易である。   Further, since the image processing apparatus 10 generates the depth value for each part region based on the quadratic curve for each part region, compared to the case where the depth value is generated based on one quadratic curve of the entire person region. , Depth value freedom is increased. As a result, a more natural depth value can be easily generated. Furthermore, since the image processing apparatus 10 sets the part region based on the face image, the part region can be easily set.

さらに、画像処理装置10では、各部位領域の物体の奥行き値の生成に用いられる情報が全て2次曲線であるので、奥行き生成部18は、奥行き値を演算する演算部を部位領域間で共有化することができる。   Further, in the image processing apparatus 10, since all the information used for generating the depth value of the object in each part area is a quadratic curve, the depth generation part 18 shares a calculation part for calculating the depth value between the part areas. Can be

なお、画像処理装置10は、入力画像内に5つの部位領域を設定し、その部位領域ごとの2次曲線に基づいて奥行き値を生成したが、入力画像内に設定される部位領域の数は、5個に限定されない。また、例えば、画像処理装置10は、所定の部位領域を設定しないモードを有していてもよい。このモードは、例えば、ユーザからの指示により設定される。   The image processing apparatus 10 sets five part regions in the input image and generates the depth value based on the quadratic curve for each part region. However, the number of part regions set in the input image is as follows. The number is not limited to five. For example, the image processing apparatus 10 may have a mode in which a predetermined part region is not set. This mode is set by an instruction from the user, for example.

[奥行き値生成処理の他の例]
図13は、画像処理装置10が、首領域を設定しない首領域除外モードを有している場合の奥行きマップ生成処理を説明するフローチャートである。この奥行きマップ生成処理は、画像処理装置10に外部から画像が入力画像として入力されたとき、開始される。
[Another example of depth value generation processing]
FIG. 13 is a flowchart for explaining a depth map generation process when the image processing apparatus 10 has a neck area exclusion mode in which a neck area is not set. This depth map generation process is started when an image is input to the image processing apparatus 10 from the outside as an input image.

図13のステップS71乃至S74の処理は、図11のステップS11乃至S14の処理と同様であるので、説明は省略する。   The processing in steps S71 to S74 in FIG. 13 is the same as the processing in steps S11 to S14 in FIG.

ステップS75において、首領域判定部14は、首領域除外モードが設定されているかどうかを判定する。ステップS75で首領域除外モードが設定されていないと判定された場合、首領域判定部14は、処理をステップS76に進める。   In step S75, the neck area determination unit 14 determines whether or not the neck area exclusion mode is set. If it is determined in step S75 that the neck area exclusion mode is not set, the neck area determination unit 14 advances the process to step S76.

一方、ステップS75で首領域除外モードが設定されていると判定された場合、首領域判定部14は、ステップS76をスキップし、処理をステップS77に進める。   On the other hand, when it is determined in step S75 that the neck area exclusion mode is set, the neck area determination unit 14 skips step S76 and advances the process to step S77.

ステップS76乃至S88の処理は、図13のステップS15乃至S27の処理と同様であるが、首領域除外モードが設定されている場合、人物領域および部位領域には首領域が含まれない。   The processes in steps S76 to S88 are the same as the processes in steps S15 to S27 in FIG. 13, but when the neck area exclusion mode is set, the person area and the part area do not include the neck area.

[本技術を適用したコンピュータの説明]
上述した一連の処理は、ハードウエアにより実行することもできるし、ソフトウエアにより実行することもできる。一連の処理をソフトウエアにより実行する場合には、そのソフトウエアを構成するプログラムが、コンピュータにインストールされる。ここで、コンピュータには、専用のハードウエアに組み込まれているコンピュータや、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどが含まれる。
[Description of computer to which this technology is applied]
The series of processes described above can be executed by hardware or can be executed by software. When a series of processing is executed by software, a program constituting the software is installed in the computer. Here, the computer includes, for example, a general-purpose personal computer capable of executing various functions by installing various programs by installing a computer incorporated in dedicated hardware.

図14は、上述した一連の処理をプログラムにより実行するコンピュータのハードウエアの構成例を示すブロック図である。   FIG. 14 is a block diagram illustrating an example of a hardware configuration of a computer that executes the above-described series of processes using a program.

コンピュータにおいて、CPU(Central Processing Unit)201,ROM(Read Only Memory)202,RAM(Random Access Memory)203は、バス204により相互に接続されている。   In a computer, a central processing unit (CPU) 201, a read only memory (ROM) 202, and a random access memory (RAM) 203 are connected to each other by a bus 204.

バス204には、さらに、入出力インタフェース205が接続されている。入出力インタフェース205には、入力部206、出力部207、記憶部208、通信部209、及びドライブ210が接続されている。   An input / output interface 205 is further connected to the bus 204. An input unit 206, an output unit 207, a storage unit 208, a communication unit 209, and a drive 210 are connected to the input / output interface 205.

入力部206は、キーボード、マウス、マイクロフォンなどよりなる。出力部207は、ディスプレイ、スピーカなどよりなる。記憶部208は、ハードディスクや不揮発性のメモリなどよりなる。通信部209は、ネットワークインタフェースなどよりなる。ドライブ210は、磁気ディスク、光ディスク、光磁気ディスク、又は半導体メモリなどのリムーバブルメディア211を駆動する。   The input unit 206 includes a keyboard, a mouse, a microphone, and the like. The output unit 207 includes a display, a speaker, and the like. The storage unit 208 includes a hard disk, a nonvolatile memory, and the like. The communication unit 209 includes a network interface and the like. The drive 210 drives a removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory.

以上のように構成されるコンピュータでは、CPU201が、例えば、記憶部208に記憶されているプログラムを、入出力インタフェース205及びバス204を介して、RAM203にロードして実行することにより、上述した一連の処理が行われる。   In the computer configured as described above, the CPU 201 loads, for example, the program stored in the storage unit 208 to the RAM 203 via the input / output interface 205 and the bus 204 and executes the program. Is performed.

コンピュータ(CPU201)が実行するプログラムは、例えば、パッケージメディア等としてのリムーバブルメディア211に記録して提供することができる。また、プログラムは、ローカルエリアネットワーク、インターネット、デジタル衛星放送といった、有線または無線の伝送媒体を介して提供することができる。   The program executed by the computer (CPU 201) can be provided by being recorded on the removable medium 211 as a package medium or the like, for example. The program can be provided via a wired or wireless transmission medium such as a local area network, the Internet, or digital satellite broadcasting.

コンピュータでは、プログラムは、リムーバブルメディア211をドライブ210に装着することにより、入出力インタフェース205を介して、記憶部208にインストールすることができる。また、プログラムは、有線または無線の伝送媒体を介して、通信部209で受信し、記憶部208にインストールすることができる。その他、プログラムは、ROM202や記憶部208に、あらかじめインストールしておくことができる。   In the computer, the program can be installed in the storage unit 208 via the input / output interface 205 by attaching the removable medium 211 to the drive 210. The program can be received by the communication unit 209 via a wired or wireless transmission medium and installed in the storage unit 208. In addition, the program can be installed in the ROM 202 or the storage unit 208 in advance.

なお、コンピュータが実行するプログラムは、本明細書で説明する順序に沿って時系列に処理が行われるプログラムであっても良いし、並列に、あるいは呼び出しが行われたとき等の必要なタイミングで処理が行われるプログラムであっても良い。   The program executed by the computer may be a program that is processed in time series in the order described in this specification, or in parallel or at a necessary timing such as when a call is made. It may be a program for processing.

また、本技術の実施の形態は、上述した実施の形態に限定されるものではなく、本技術の要旨を逸脱しない範囲において種々の変更が可能である。   The embodiments of the present technology are not limited to the above-described embodiments, and various modifications can be made without departing from the gist of the present technology.

例えば、画像処理装置10は、画像内の人物領域以外の領域(建物の領域、空の領域、風景の領域、動物の領域、車の領域等)の物体の奥行き値を生成するようにしてもよい。この場合、その領域に適した領域が部位領域として設定される。例えば、画像処理装置10が車の領域の物体の奥行き値を生成する場合、フロントガラスの領域、タイヤの領域、ボンネットの領域等が部位領域として設定される。   For example, the image processing apparatus 10 may generate the depth value of an object in an area other than the person area (building area, sky area, landscape area, animal area, car area, etc.) in the image. Good. In this case, an area suitable for the area is set as the part area. For example, when the image processing apparatus 10 generates a depth value of an object in a car area, a windshield area, a tire area, a hood area, and the like are set as the part areas.

また、画像処理装置10は、顔画像の位置とサイズに基づいて部位領域を設定するのではなく、入力画像から部位領域を検出し、設定するようにしてもよい。   Further, the image processing apparatus 10 may detect and set a part region from the input image instead of setting the part region based on the position and size of the face image.

さらに、画像処理装置10は、顔や胴体の領域以外の領域(首領域等)においても、内領域と外領域を設定し、2種類の2次曲線に基づいて奥行き値を生成するようにしてもよい。また、顔や胴体の領域の分割数は2に限定されず、3以上であってもよい。分割数が多いほど、奥行き値の自由度は高くなり、より自然な奥行き値を生成することができる。   Further, the image processing apparatus 10 sets an inner region and an outer region in regions other than the face and body regions (such as a neck region), and generates depth values based on two types of quadratic curves. Also good. Further, the number of divisions of the face and body regions is not limited to 2, and may be 3 or more. As the number of divisions increases, the degree of freedom of the depth value increases and a more natural depth value can be generated.

また、画像処理装置10は、顔画像以外の胴体画像や首画像などの角度を検出し、その角度に応じて、顔内領域および顔外領域と同様に、対応する部分領域の水平2次曲線と垂直2次曲線を補正するようにしてもよい。   Further, the image processing apparatus 10 detects an angle of a body image other than a face image, a neck image, and the like, and according to the angle, a horizontal quadratic curve of a corresponding partial region, similar to the in-face region and the out-of-face region. The vertical quadratic curve may be corrected.

さらに、画像処理装置10は、顔画像のサイズや顔画像の角度に基づいて水平2次曲線と垂直2次曲線を補正しなくてもよい。また、奥行き値の生成単位は、画素単位でなくてもよい。   Furthermore, the image processing apparatus 10 may not correct the horizontal quadratic curve and the vertical quadratic curve based on the size of the face image and the angle of the face image. Further, the generation unit of the depth value may not be a pixel unit.

また、例えば、本技術は、1つの機能をネットワークを介して複数の装置で分担、共同して処理するクラウドコンピューティングの構成をとることができる。   Further, for example, the present technology can take a configuration of cloud computing in which one function is shared by a plurality of devices via a network and is jointly processed.

さらに、上述のフローチャートで説明した各ステップは、1つの装置で実行する他、複数の装置で分担して実行することができる。   Furthermore, each step described in the above flowchart can be executed by one apparatus or can be shared by a plurality of apparatuses.

また、1つのステップに複数の処理が含まれる場合には、その1つのステップに含まれる複数の処理は、1つの装置で実行する他、複数の装置で分担して実行することができる。   In addition, when a plurality of processes are included in one step, the plurality of processes included in the one step can be executed by being shared by a plurality of apparatuses in addition to being executed by one apparatus.

本技術は、以下のような構成もとることができる。   The present technology can be configured as follows.

(1)
物体の奥行き方向の位置を表す奥行き値のモデルを表す2次曲線に基づいて、画像内の前記物体の奥行き値を生成する生成部
を備える画像処理装置。
(2)
前記画像内の前記物体の領域を複数の領域に分割して設定する設定部
をさらに備え、
前記生成部は、前記設定部により設定される前記領域ごとの前記2次曲線に基づいて、前記画像内の前記物体の奥行き値を生成する
前記(1)に記載の画像処理装置。
(3)
前記設定部は、前記物体の外側の領域と前記物体の内側の領域を設定する
前記(2)に記載の画像処理装置。
(4)
前記2次曲線は、前記物体の奥行き値と前記物体における位置の関係のモデルを表し、
前記生成部は、前記2次曲線に基づいて、前記画像内の前記物体における位置ごとに、その位置に対応する前記奥行き値を生成する
前記(1)乃至(3)のいずれかに記載の画像処理装置。
(5)
前記2次曲線は、前記物体の奥行き値と前記物体における水平方向の位置の関係のモデルを表す水平2次曲線と、前記物体の奥行き値と前記物体における垂直方向の位置の関係のモデルを表す垂直2次曲線とにより構成され、
前記生成部は、前記水平2次曲線と前記垂直2次曲線に基づいて、前記画像内の前記物体における水平方向および垂直方向の位置ごとに、その位置に対応する前記奥行き値を生成する
前記(4)に記載の画像処理装置。
(6)
前記画像内の前記物体の角度に基づいて、前記2次曲線を補正する角度補正部
をさらに備え、
前記生成部は、前記角度補正部により補正された前記2次曲線に基づいて、前記画像内の前記物体の奥行き値を生成する
前記(1)乃至(5)のいずれかに記載の画像処理装置。
(7)
前記画像内の前記物体のサイズに基づいて、前記2次曲線を補正するサイズ補正部
をさらに備え、
前記生成部は、前記サイズ補正部により補正された前記2次曲線に基づいて、前記画像内の前記物体の奥行き値を生成する
前記(1)乃至(6)のいずれかに記載の画像処理装置。
(8)
前記物体は、少なくとも顔を含む
前記(1)乃至(7)のいずれかに記載の画像処理装置。
(9)
画像処理装置が、
物体の奥行き方向の位置を表す奥行き値のモデルを表す2次曲線に基づいて、画像内の前記物体の奥行き値を生成する生成ステップ
を含む画像処理方法。
(10)
コンピュータを、
物体の奥行き方向の位置を表す奥行き値のモデルを表す2次曲線に基づいて、画像内の前記物体の奥行き値を生成する生成部
として機能させるためのプログラム。
(1)
An image processing apparatus comprising: a generation unit configured to generate a depth value of the object in an image based on a quadratic curve representing a depth value model representing a position of the object in the depth direction.
(2)
A setting unit configured to divide and set the region of the object in the image into a plurality of regions;
The image processing apparatus according to (1), wherein the generation unit generates a depth value of the object in the image based on the quadratic curve for each of the areas set by the setting unit.
(3)
The image processing apparatus according to (2), wherein the setting unit sets a region outside the object and a region inside the object.
(4)
The quadratic curve represents a model of the relationship between the depth value of the object and the position in the object,
The image generation unit according to any one of (1) to (3), wherein the generation unit generates the depth value corresponding to a position of the object in the image based on the quadratic curve. Processing equipment.
(5)
The quadratic curve represents a horizontal quadratic curve representing a model of the relationship between the depth value of the object and the horizontal position of the object, and a model of the relationship between the depth value of the object and the vertical position of the object. A vertical quadratic curve,
The generation unit generates the depth value corresponding to each position in the horizontal direction and the vertical direction of the object in the image based on the horizontal quadratic curve and the vertical quadratic curve. The image processing apparatus according to 4).
(6)
An angle correction unit for correcting the quadratic curve based on the angle of the object in the image;
The image processing device according to any one of (1) to (5), wherein the generation unit generates a depth value of the object in the image based on the quadratic curve corrected by the angle correction unit. .
(7)
A size correction unit for correcting the quadratic curve based on the size of the object in the image;
The image processing apparatus according to any one of (1) to (6), wherein the generation unit generates a depth value of the object in the image based on the quadratic curve corrected by the size correction unit. .
(8)
The image processing apparatus according to any one of (1) to (7), wherein the object includes at least a face.
(9)
The image processing device
An image processing method including a generation step of generating a depth value of the object in an image based on a quadratic curve representing a model of a depth value representing a position in the depth direction of the object.
(10)
Computer
The program for functioning as a production | generation part which produces | generates the depth value of the said object in an image based on the quadratic curve showing the model of the depth value showing the position of the depth direction of an object.

10 画像処理装置, 17 境界判定部, 18 奥行き生成部, 62 サイズ補正部, 63 角度補正部   DESCRIPTION OF SYMBOLS 10 Image processing apparatus, 17 Boundary determination part, 18 Depth generation part, 62 Size correction part, 63 Angle correction part

Claims (10)

物体の奥行き方向の位置を表す奥行き値のモデルを表す2次曲線に基づいて、画像内の前記物体の奥行き値を生成する生成部
を備える画像処理装置。
An image processing apparatus comprising: a generation unit configured to generate a depth value of the object in an image based on a quadratic curve representing a depth value model representing a position of the object in the depth direction.
前記画像内の前記物体の領域を複数の領域に分割して設定する設定部
をさらに備え、
前記生成部は、前記設定部により設定される前記領域ごとの前記2次曲線に基づいて、前記画像内の前記物体の奥行き値を生成する
請求項1に記載の画像処理装置。
A setting unit configured to divide and set the region of the object in the image into a plurality of regions;
The image processing apparatus according to claim 1, wherein the generation unit generates a depth value of the object in the image based on the quadratic curve for each region set by the setting unit.
前記設定部は、前記物体の外側の領域と前記物体の内側の領域を設定する
請求項2に記載の画像処理装置。
The image processing apparatus according to claim 2, wherein the setting unit sets a region outside the object and a region inside the object.
前記2次曲線は、前記物体の奥行き値と前記物体における位置の関係のモデルを表し、
前記生成部は、前記2次曲線に基づいて、前記画像内の前記物体における位置ごとに、その位置に対応する前記奥行き値を生成する
請求項1に記載の画像処理装置。
The quadratic curve represents a model of the relationship between the depth value of the object and the position in the object,
The image processing apparatus according to claim 1, wherein the generation unit generates the depth value corresponding to a position for each position in the object in the image based on the quadratic curve.
前記2次曲線は、前記物体の奥行き値と前記物体における水平方向の位置の関係のモデルを表す水平2次曲線と、前記物体の奥行き値と前記物体における垂直方向の位置の関係のモデルを表す垂直2次曲線とにより構成され、
前記生成部は、前記水平2次曲線と前記垂直2次曲線に基づいて、前記画像内の前記物体における水平方向および垂直方向の位置ごとに、その位置に対応する前記奥行き値を生成する
請求項4に記載の画像処理装置。
The quadratic curve represents a horizontal quadratic curve representing a model of the relationship between the depth value of the object and the horizontal position of the object, and a model of the relationship between the depth value of the object and the vertical position of the object. A vertical quadratic curve,
The generation unit generates the depth value corresponding to each position in the horizontal direction and the vertical direction of the object in the image based on the horizontal quadratic curve and the vertical quadratic curve. 5. The image processing apparatus according to 4.
前記画像内の前記物体の角度に基づいて、前記2次曲線を補正する角度補正部
をさらに備え、
前記生成部は、前記角度補正部により補正された前記2次曲線に基づいて、前記画像内の前記物体の奥行き値を生成する
請求項1に記載の画像処理装置。
An angle correction unit for correcting the quadratic curve based on the angle of the object in the image;
The image processing apparatus according to claim 1, wherein the generation unit generates a depth value of the object in the image based on the quadratic curve corrected by the angle correction unit.
前記画像内の前記物体のサイズに基づいて、前記2次曲線を補正するサイズ補正部
をさらに備え、
前記生成部は、前記サイズ補正部により補正された前記2次曲線に基づいて、前記画像内の前記物体の奥行き値を生成する
請求項1に記載の画像処理装置。
A size correction unit for correcting the quadratic curve based on the size of the object in the image;
The image processing apparatus according to claim 1, wherein the generation unit generates a depth value of the object in the image based on the quadratic curve corrected by the size correction unit.
前記物体は、少なくとも顔を含む
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the object includes at least a face.
画像処理装置が、
物体の奥行き方向の位置を表す奥行き値のモデルを表す2次曲線に基づいて、画像内の前記物体の奥行き値を生成する生成ステップ
を含む画像処理方法。
The image processing device
An image processing method including a generation step of generating a depth value of the object in an image based on a quadratic curve representing a model of a depth value representing a position in the depth direction of the object.
コンピュータを、
物体の奥行き方向の位置を表す奥行き値のモデルを表す2次曲線に基づいて、画像内の前記物体の奥行き値を生成する生成部
として機能させるためのプログラム。
Computer
The program for functioning as a production | generation part which produces | generates the depth value of the said object in an image based on the quadratic curve showing the model of the depth value showing the position of the depth direction of an object.
JP2012160190A 2012-07-19 2012-07-19 Image processing device, image processing method, and program Pending JP2014021744A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012160190A JP2014021744A (en) 2012-07-19 2012-07-19 Image processing device, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012160190A JP2014021744A (en) 2012-07-19 2012-07-19 Image processing device, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2014021744A true JP2014021744A (en) 2014-02-03

Family

ID=50196545

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012160190A Pending JP2014021744A (en) 2012-07-19 2012-07-19 Image processing device, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2014021744A (en)

Similar Documents

Publication Publication Date Title
JP4966431B2 (en) Image processing device
JP6021541B2 (en) Image processing apparatus and method
CN107274338B (en) Systems, methods, and apparatus for low-latency warping of depth maps
US8655055B2 (en) Method, system and computer program product for converting a 2D image into a 3D image
US9013559B2 (en) System, method and program for capturing images from a virtual viewpoint
EP2437494A1 (en) Device for monitoring area around vehicle
JP5011168B2 (en) Virtual viewpoint image generation method, virtual viewpoint image generation apparatus, virtual viewpoint image generation program, and computer-readable recording medium recording the program
US9591280B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium
US20120301044A1 (en) Image processing apparatus, image processing method, and program
WO2012153447A1 (en) Image processing device, image processing method, program, and integrated circuit
US20120001902A1 (en) Apparatus and method for bidirectionally inpainting occlusion area based on predicted volume
JP6020471B2 (en) Image processing method, image processing apparatus, and image processing program
JP2013005259A (en) Image processing apparatus, image processing method, and program
CN107451952B (en) Splicing and fusing method, equipment and system for panoramic video
WO2012157540A1 (en) Image processing apparatus, image processing method, and program
CN111047709B (en) Binocular vision naked eye 3D image generation method
JP6552266B2 (en) Image processing apparatus, image processing method, and program
JP6128748B2 (en) Image processing apparatus and method
JP5627498B2 (en) Stereo image generating apparatus and method
JP2014021744A (en) Image processing device, image processing method, and program
US9092840B2 (en) Image processing apparatus, control method of the same and non-transitory computer-readable storage medium
CN109089100B (en) Method for synthesizing binocular stereo video
KR101804157B1 (en) Disparity map generating method based on enhanced semi global matching
JP7304790B2 (en) Information processing device, generation method, and generation program
JP2011048545A (en) Image synthesizing device and program