JP5900321B2 - Image processing apparatus, image processing method, and image processing program - Google Patents

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

Info

Publication number
JP5900321B2
JP5900321B2 JP2012285780A JP2012285780A JP5900321B2 JP 5900321 B2 JP5900321 B2 JP 5900321B2 JP 2012285780 A JP2012285780 A JP 2012285780A JP 2012285780 A JP2012285780 A JP 2012285780A JP 5900321 B2 JP5900321 B2 JP 5900321B2
Authority
JP
Japan
Prior art keywords
mask
depth map
image
unit
low
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.)
Active
Application number
JP2012285780A
Other languages
Japanese (ja)
Other versions
JP2013178749A (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.)
JVCKenwood Corp
Original Assignee
JVCKenwood 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 JVCKenwood Corp filed Critical JVCKenwood Corp
Priority to JP2012285780A priority Critical patent/JP5900321B2/en
Priority to US13/760,825 priority patent/US8971611B2/en
Publication of JP2013178749A publication Critical patent/JP2013178749A/en
Application granted granted Critical
Publication of JP5900321B2 publication Critical patent/JP5900321B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Description

本発明は、2D画像を立体視のための3D画像に変換する処理を実行する画像処理装置、画像処理方法及び画像処理プログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and an image processing program for executing processing for converting a 2D image into a 3D image for stereoscopic viewing.

近年、3D映画、3D放送などの3D映像コンテンツが普及してきている。観察者に立体視させるためには、視差を持つ右眼画像と左眼画像が必要である。3D映像を表示する際、右眼画像と左眼画像を時分割に表示し、シャッタメガネや偏光メガネなどの映像分離用メガネにより右眼画像と左眼画像を分離する。これにより観察者は右眼画像を右眼のみで、左眼画像を左眼のみで観察でき立体視できる。なお右眼画像と左眼画像を時分割ではなく空間分割すればメガネは必要なくなるが解像度が低下する。メガネ方式にしてもメガネレス方式にしても右眼画像と左眼画像が必要な点では共通する。   In recent years, 3D video contents such as 3D movies and 3D broadcasts have become widespread. In order to make an observer stereoscopically view, a right eye image and a left eye image having parallax are required. When displaying a 3D image, the right eye image and the left eye image are displayed in a time-sharing manner, and the right eye image and the left eye image are separated by image separation glasses such as shutter glasses and polarized glasses. Thus, the observer can observe the right eye image only with the right eye and the left eye image only with the left eye and can perform stereoscopic viewing. Note that if the right eye image and the left eye image are divided not by time division but by space division, glasses are not necessary, but the resolution is lowered. Both the glasses method and the glassesless method are common in that a right eye image and a left eye image are required.

3D映像を製作するには大きく2つの方法があり、2台のカメラを用いて右眼画像と左眼画像を同時に撮影する方法と、1台のカメラで撮影された2D画像を後に編集して視差画像を生成する方法がある。本発明は後者の方法に関するものであり、2D3D変換技術に関するものである。   There are two main methods for producing 3D video. A method for simultaneously capturing a right eye image and a left eye image using two cameras, and a later editing of a 2D image captured by one camera. There is a method for generating a parallax image. The present invention relates to the latter method, and to 2D3D conversion technology.

図1は、2D3D変換の基本処理プロセスを説明するための図である。まず2D入力画像からデプスマップ(奥行き情報ともいう)を生成する(ステップS10)。そして2D入力画像とデプスマップを用いて3D画像を生成する(ステップS30)。図1では2D入力画像を3D出力画像の右眼画像とし、2D入力画像をデプスマップを用いて画素シフトした画像を3D出力画像の左眼画像としている。以下、所定の視差を持つ右眼画像と左眼画像の組みを3D画像または視差画像という。   FIG. 1 is a diagram for explaining a basic processing process of 2D3D conversion. First, a depth map (also referred to as depth information) is generated from the 2D input image (step S10). Then, a 3D image is generated using the 2D input image and the depth map (step S30). In FIG. 1, a 2D input image is a right eye image of a 3D output image, and an image obtained by pixel shifting the 2D input image using a depth map is a left eye image of the 3D output image. Hereinafter, a combination of a right eye image and a left eye image having a predetermined parallax is referred to as a 3D image or a parallax image.

3D画像を生成する際にはデプスマップを用いて2D画像を画素シフトして、当該2D画像に対して視差を持つ別視点の2D画像を生成する。この画素シフトにより、生成される別視点の2D画像内に欠落画素が発生する。一般的に、この欠落画素は周辺画素から補間される。   When generating a 3D image, the 2D image is pixel-shifted using a depth map, and a 2D image of another viewpoint having a parallax with respect to the 2D image is generated. Due to this pixel shift, missing pixels are generated in the 2D image of the different viewpoint to be generated. Generally, this missing pixel is interpolated from surrounding pixels.

特開2011−48586号公報JP 2011-48586 A

画面内においてオブジェクト境界でのデプスの段差が大きい場合、その境界部分の画素シフト量も大きくなる。したがって欠落画素の数、即ち欠落領域の面積も大きくなる。上述したようにその欠落画素には周辺画素が補間されるが、その欠落領域の面積が大きくなると、補間される画素が補間位置にマッチしない箇所が発生しやすくなる。   When the depth difference at the object boundary is large in the screen, the pixel shift amount at the boundary part is also large. Therefore, the number of missing pixels, that is, the area of the missing region also increases. As described above, peripheral pixels are interpolated in the missing pixel, but when the area of the missing region is increased, a portion where the interpolated pixel does not match the interpolation position is likely to occur.

本発明はこうした状況に鑑みてなされたものであり、その目的は、2D画像から3D画像を生成する際に、オブジェクト境界部分の画像品質を向上させる技術を提供することにある。   The present invention has been made in view of such circumstances, and an object of the present invention is to provide a technique for improving the image quality of an object boundary portion when generating a 3D image from a 2D image.

上記課題を解決するために、本発明のある態様の画像処理装置(100)は、外部設定されるマスクパターンを補正するマスク補正部(80)と、入力画像のデプスマップを、前記マスク補正部(80)により補正された複数のマスクパターンにより指定される複数の領域ごとに加工するデプスマップ加工部(20)と、前記入力画像、及び前記デプスマップ加工部(20)により加工されたデプスマップをもとに、別視点の画像を生成する画像生成部(30)と、を備える。前記マスク補正部(80)は、マスク信号にフィルタをかける第1ローパスフィルタ(81)と、前記第1ローパスフィルタ(81)から出力されるマスク信号を前記マスク信号のエッジの位置を移動させるための第1閾値を用いて二値化する二値化部(82)と、前記二値化部(82)による二値化によりエッジの位置が移動された前記マスク信号のエッジに傾斜をつけるための第2ローパスフィルタ(83)を備えることにより、前記マスクパターンのオブジェクト境界部分に、ぼかし処理を施す。   In order to solve the above-described problem, an image processing apparatus (100) according to an aspect of the present invention includes a mask correction unit (80) that corrects an externally set mask pattern, and a depth map of an input image. A depth map processing unit (20) that processes each of a plurality of areas specified by the plurality of mask patterns corrected by (80), the input image, and a depth map processed by the depth map processing unit (20). And an image generation unit (30) for generating an image of another viewpoint. The mask correction unit (80) moves a position of an edge of the mask signal between the first low-pass filter (81) for filtering the mask signal and the mask signal output from the first low-pass filter (81). A binarization unit (82) for binarization using the first threshold value, and an edge of the mask signal whose edge position has been moved by binarization by the binarization unit (82) By providing the second low-pass filter (83), blurring processing is performed on the object boundary portion of the mask pattern.

本発明の別の態様は、画像処理方法である。この方法は、外部設定されるマスクパターンのオブジェクト境界部分にぼかし処理を施すステップと、入力画像のデプスマップを、オブジェクト境界部分にぼかし処理が施された複数のマスクパターンにより指定される複数の領域ごとに加工するステップと、前記入力画像、及び加工されたデプスマップをもとに、別視点の画像を生成するステップと、を備える。前記ぼかし処理を施すステップは、マスク信号にローパスフィルタをかけるステップと、ローパスフィルタをかけられたマスク信号を前記マスク信号のエッジの位置を移動させるための第1閾値を用いて二値化するステップと、二値化によりエッジの位置が移動された前記マスク信号のエッジに傾斜をつけるためにローパスフィルタをかけるステップと、を含む。   Another aspect of the present invention is an image processing method. This method includes a step of performing blur processing on an object boundary portion of an externally set mask pattern, and a plurality of regions specified by a plurality of mask patterns in which the depth map of the input image is subjected to blur processing. And a step of generating an image of another viewpoint based on the input image and the processed depth map. The step of performing the blurring process includes a step of applying a low-pass filter to the mask signal, and a step of binarizing the mask signal subjected to the low-pass filter using a first threshold value for moving the position of the edge of the mask signal. And applying a low-pass filter to incline the edge of the mask signal whose edge position has been moved by binarization.

なお、以上の構成要素の任意の組み合わせ、本発明の表現を方法、装置、システム、記録媒体、コンピュータプログラムなどの間で変換したものもまた、本発明の態様として有効である。   It should be noted that any combination of the above-described constituent elements and a conversion of the expression of the present invention between a method, an apparatus, a system, a recording medium, a computer program, and the like are also effective as an aspect of the present invention.

本発明によれば、2D画像から3D画像を生成する際に、製作者の手間を軽減しつつ高品質な3D画像を生成できる。   According to the present invention, when generating a 3D image from a 2D image, it is possible to generate a high-quality 3D image while reducing the labor of the producer.

2D3D変換の基本処理プロセスを説明するための図である。It is a figure for demonstrating the basic processing process of 2D3D conversion. 本発明の基本となる実施例に係る画像編集システムの構成を示す図である。It is a figure which shows the structure of the image editing system which concerns on the Example used as the foundation of this invention. 本発明の実施例に係るデプスマップ生成部の構成例を示す図である。It is a figure which shows the structural example of the depth map production | generation part which concerns on the Example of this invention. 本発明の基本となる実施例に係る画像編集システムの全体処理プロセスを説明するための図である。It is a figure for demonstrating the whole processing process of the image editing system which concerns on the Example used as the foundation of this invention. 入力デプスマップのゲイン調整プロセスを説明するための図である。It is a figure for demonstrating the gain adjustment process of an input depth map. 入力デプスマップのオフセット調整プロセスを説明するための図である。It is a figure for demonstrating the offset adjustment process of an input depth map. レイヤデプスマップの合成処理プロセスを説明するための図である。It is a figure for demonstrating the synthetic | combination process of a layer depth map. マスクを使用しない入力デプスマップのゲイン調整プロセスを説明するための図である。It is a figure for demonstrating the gain adjustment process of the input depth map which does not use a mask. マスクを使用しない入力デプスマップのオフセット調整プロセスを説明するための図である。It is a figure for demonstrating the offset adjustment process of the input depth map which does not use a mask. 画素シフトと画素補間を説明するための図である。It is a figure for demonstrating pixel shift and pixel interpolation. オブジェクト境界のデプスの段差が大きい場合における、画素シフトと画素補間を説明するための図である。It is a figure for demonstrating pixel shift and pixel interpolation in case the depth level | step difference of an object boundary is large. オブジェクト境界のデプスの段差が大きい場合でも不自然さが発生しない、画素シフトと画素補間を説明するための図である。It is a figure for demonstrating pixel shift and pixel interpolation which does not generate | occur | produce unnatural even when the level | step difference of the depth of an object boundary is large. 本発明の実施例1に係る画像編集システムの構成を示す図である。1 is a diagram illustrating a configuration of an image editing system according to Embodiment 1 of the present invention. 本発明の実施例1に係る画像編集システムの全体処理プロセスを説明するための図である。It is a figure for demonstrating the whole processing process of the image editing system which concerns on Example 1 of this invention. レイヤデプスマップのアルファブレンドを説明するための図である。It is a figure for demonstrating the alpha blend of a layer depth map. マスク補正部の構成例を示す図である。It is a figure which shows the structural example of a mask correction | amendment part. 図16のマスク補正部によるマスクぼかし処理を説明するための図である。It is a figure for demonstrating the mask blurring process by the mask correction part of FIG. 第1ローパスフィルタによりマスク信号に形成される傾斜と、二値化部に設定される第1閾値の関係を説明するための図である。It is a figure for demonstrating the relationship between the inclination formed in a mask signal by a 1st low-pass filter, and the 1st threshold value set to a binarization part. 第1ローパスフィルタにより付加される傾斜と、第2ローパスフィルタにより付加される傾斜を比較するための図である。It is a figure for comparing the inclination added by a 1st low-pass filter, and the inclination added by a 2nd low-pass filter. 本発明の実施例1の変形例に係る画像編集システムの全体処理プロセスを説明するための図である。It is a figure for demonstrating the whole processing process of the image editing system which concerns on the modification of Example 1 of this invention. 本発明の実施例2に係る画像編集システムによるフィルオフ機能を説明するための図である。It is a figure for demonstrating the fill-off function by the image editing system which concerns on Example 2 of this invention. 本発明の実施例2に係る3D画像生成部の構成を示す図である。It is a figure which shows the structure of the 3D image generation part which concerns on Example 2 of this invention. 図23(a)−(e)は、監視領域の複数の例を示す図である。FIGS. 23A to 23E are diagrams illustrating a plurality of examples of monitoring areas. 5つの設定パラメータにより生成される監視領域の具体例を説明するための図である(その1)。It is a figure for demonstrating the specific example of the monitoring area | region produced | generated by five setting parameters (the 1). 5つの設定パラメータにより生成される監視領域の具体例を説明するための図である(その2)。It is a figure for demonstrating the specific example of the monitoring area | region produced | generated by five setting parameters (the 2). デプス信号の微分値の監視およびフィルオフを説明するための図である(右眼画像)。It is a figure for demonstrating monitoring of the differential value of a depth signal, and fill-off (right eye image). デプス信号の微分値の監視およびフィルオフを説明するための図である(左眼画像)。It is a figure for demonstrating monitoring of the differential value of a depth signal, and fill-off (left eye image). 実施例3に係るマスク補正部の構成例を示す図である。FIG. 10 is a diagram illustrating a configuration example of a mask correction unit according to a third embodiment. 実施例3に係る第1レベル判定部による第1ローパスフィルタのフィルタ対象エリアの制限処理を説明するためのフローチャートである。12 is a flowchart for explaining a process of restricting a filter target area of the first low-pass filter by the first level determination unit according to the third embodiment. 実施例3に係る第2レベル判定部による第2ローパスフィルタのフィルタ対象エリアの制限処理を説明するためのフローチャートである。It is a flowchart for demonstrating the restriction | limiting process of the filter object area of a 2nd low-pass filter by the 2nd level determination part which concerns on Example 3. FIG. 図31(a)−(c)は全画素に対してフィルタ演算してマスクエッジ幅を広げる処理を説明するための図である。FIGS. 31A to 31C are diagrams for explaining processing for widening the mask edge width by performing filter operation on all pixels. 図32(a)−(c)はマスクの無効画素に対してのみフィルタ演算してマスクエッジ幅を広げる処理を説明するための図である。FIGS. 32A to 32C are views for explaining processing for expanding the mask edge width by performing filter operation only on the invalid pixels of the mask. 図33(a)−(c)は全画素に対してフィルタ演算してマスクエッジ幅を狭める処理を説明するための図である。FIGS. 33A to 33C are views for explaining processing for narrowing the mask edge width by performing a filter operation on all pixels. 図34(a)−(c)はマスクの有効画素に対してのみフィルタ演算してマスクエッジ幅を狭める処理を説明するための図である。FIGS. 34A to 34C are views for explaining processing for narrowing the mask edge width by performing filter operation only on the effective pixels of the mask. 図35(a)−(c)は全画素に対してフィルタ演算してマスクエッジに傾斜を付ける処理を説明するための図である。FIGS. 35A to 35C are diagrams for explaining processing for performing a filter operation on all the pixels to incline the mask edge. 図36(a)−(c)はマスクの有効画素に対してのみフィルタ演算してマスクエッジに傾斜を付ける処理を説明するための図である。FIGS. 36A to 36C are diagrams for explaining processing for filtering only the effective pixels of the mask to incline the mask edge.

図2は、本発明の基本となる実施例に係る画像編集システム500の構成を示す図である。本実施例に係る画像編集システム500は、画像処理装置100及びコンソール端末装置200を備える。   FIG. 2 is a diagram showing a configuration of an image editing system 500 according to an embodiment as a basis of the present invention. An image editing system 500 according to the present embodiment includes an image processing device 100 and a console terminal device 200.

コンソール端末装置200は画像製作者(以下、ユーザという)が画像を製作、編集するために使用する端末装置である。コンソール端末装置200は操作部60および表示部70を備える。操作部60はキーボード、マウス等の入力デバイスであり、表示部70はディスプレイ等の出力デバイスである。なお入出力が一体となったデバイスであるタッチパネルディスプレイが用いられてもよい。またコンソール端末装置200はプリンタ、スキャナ等の印刷物を媒体として用いるユーザインタフェースを含んでもよい。操作部60はユーザ操作を受け付け、そのユーザ操作に起因した信号を生成し、画像処理装置100に出力する。表示部70は画像処理装置100により生成された画像を表示する。   The console terminal device 200 is a terminal device used by an image producer (hereinafter referred to as a user) to produce and edit an image. The console terminal device 200 includes an operation unit 60 and a display unit 70. The operation unit 60 is an input device such as a keyboard and a mouse, and the display unit 70 is an output device such as a display. Note that a touch panel display which is a device in which input and output are integrated may be used. The console terminal device 200 may include a user interface that uses a printed material such as a printer or a scanner as a medium. The operation unit 60 receives a user operation, generates a signal resulting from the user operation, and outputs the signal to the image processing apparatus 100. The display unit 70 displays an image generated by the image processing apparatus 100.

画像処理装置100はデプスマップ生成部10、デプスマップ加工部20、3D画像生成部30、操作受付部40、表示制御部50を含む。これらの構成はハードウエア的には、任意のプロセッサ、メモリ、その他のLSIで実現でき、ソフトウエア的にはメモリにロードされたプログラムなどによって実現されるが、ここではそれらの連携によって実現される機能ブロックを描いている。したがって、これらの機能ブロックがハードウエアのみ、ソフトウエアのみ、またはそれらの組合せによっていろいろな形で実現できることは、当業者には理解されるところである。例えばデプスマップ生成部10、デプスマップ加工部20、3D画像生成部30について、その機能を全てソフトウェアで実現してもよいし、デプスマップ生成部10および3D画像生成部30の機能を専用のロジック回路で構成し、デプスマップ加工部20の機能をソフトウェアで実現してもよい。   The image processing apparatus 100 includes a depth map generation unit 10, a depth map processing unit 20, a 3D image generation unit 30, an operation reception unit 40, and a display control unit 50. These configurations can be realized by an arbitrary processor, memory, or other LSI in terms of hardware, and can be realized by a program loaded into the memory in terms of software, but here by their cooperation. Draw functional blocks. Accordingly, those skilled in the art will understand that these functional blocks can be realized in various forms by hardware only, software only, or a combination thereof. For example, all the functions of the depth map generation unit 10, the depth map processing unit 20, and the 3D image generation unit 30 may be realized by software, and the functions of the depth map generation unit 10 and the 3D image generation unit 30 are dedicated logic. It may be configured by a circuit, and the function of the depth map processing unit 20 may be realized by software.

デプスマップ生成部10は、入力される2D画像とデプスモデルをもとに当該2D画像のデプスマップを生成する。デプスマップは、デプス値(奥行き値ともいう)を輝度値で表したグレースケール画像である。デプスマップ生成部10はシーン構造を推定して、そのシーン構造に適合的なデプスモデルを使用してデプスマップを生成する。本実施例ではデプスマップ生成部10は複数の基本デプスモデルを合成してデプスマップ生成に使用する。その際、当該2D画像のシーン構造に応じて複数の基本デプスモデルの合成比率を変化させる。   The depth map generation unit 10 generates a depth map of the 2D image based on the input 2D image and the depth model. The depth map is a grayscale image in which depth values (also referred to as depth values) are represented by luminance values. The depth map generation unit 10 estimates a scene structure and generates a depth map using a depth model suitable for the scene structure. In this embodiment, the depth map generation unit 10 combines a plurality of basic depth models and uses them for depth map generation. At that time, the composition ratio of a plurality of basic depth models is changed according to the scene structure of the 2D image.

図3は、本発明の実施例に係るデプスマップ生成部10の構成例を示す図である。デプスマップ生成部10は、画面上部高域成分評価部11、画面下部高域成分評価部12、合成比率決定部13、第1基本デプスモデル用フレームメモリ14、第2基本デプスモデル用フレームメモリ15、第3基本デプスモデル用フレームメモリ16、合成部17、加算部18を含む。   FIG. 3 is a diagram illustrating a configuration example of the depth map generation unit 10 according to the embodiment of the present invention. The depth map generation unit 10 includes an upper screen high-frequency component evaluation unit 11, a lower screen high-frequency component evaluation unit 12, a composition ratio determination unit 13, a first basic depth model frame memory 14, and a second basic depth model frame memory 15. , A third basic depth model frame memory 16, a synthesis unit 17, and an addition unit 18.

画面上部高域成分評価部11は、処理すべき2D画像の画面上部において高域成分を有する画素の割合を算出する。その割合を画面上部の高域成分評価値とする。なお画面全体に対する画面上部の割合は略20%に設定するとよい。画面下部高域成分評価部12は当該2D画像の画面下部において高域成分を有する画素の割合を算出する。その割合を画面下部の高域成分評価値とする。なお画面全体に対する画面下部の割合は略20%に設定するとよい。   The screen upper high frequency component evaluation unit 11 calculates the ratio of pixels having a high frequency component in the upper screen of the 2D image to be processed. The ratio is used as the high frequency component evaluation value at the top of the screen. The ratio of the upper part of the screen to the entire screen is preferably set to approximately 20%. The lower screen high frequency component evaluation unit 12 calculates the ratio of pixels having a high frequency component in the lower screen of the 2D image. The ratio is used as the high frequency component evaluation value at the bottom of the screen. The ratio of the lower part of the screen to the entire screen is preferably set to approximately 20%.

第1基本デプスモデル用フレームメモリ14は第1基本デプスモデルを保持し、第2基本デプスモデル用フレームメモリ15は第2基本デプスモデルを保持し、第3基本デプスモデル用フレームメモリ16は第3デプスモデルを保持する。第1基本デプスモデルは画面上部及び画面下部をそれぞれ凹状の球面とするモデルである。第2基本デプスモデルは画面上部を縦方向に軸線を有する円筒面、画面下部を凹状の球面とするモデルである。第3基本デプスモデルは画面上部を平面、画面下部を横方向に軸線を有する円筒面とするモデルである。   The first basic depth model frame memory 14 holds the first basic depth model, the second basic depth model frame memory 15 holds the second basic depth model, and the third basic depth model frame memory 16 stores the third basic depth model. Holds the depth model. The first basic depth model is a model in which the upper part of the screen and the lower part of the screen are concave spherical surfaces. The second basic depth model is a model in which the upper part of the screen is a cylindrical surface having an axis in the vertical direction and the lower part of the screen is a concave spherical surface. The third basic depth model is a model in which the upper part of the screen is a plane and the lower part of the screen is a cylindrical surface having an axis in the horizontal direction.

合成比率決定部13は、画面上部高域成分評価部11および画面下部高域成分評価部12によりそれぞれ算出された、画面上部および画面下部の高域成分評価値をもとに第1基本デプスモデル、第2基本デプスモデル、第3基本デプスモデルの合成比率k1,k2,k3(ただし、k1+k2+k3=1)を決定する。合成部17はこれらの合成比率k1,k2,k3と、第1基本デプスモデル、第2基本デプスモデル、第3基本デプスモデルをそれぞれ乗算し、それぞれの乗算結果を加算する。この演算結果が合成基本デプスモデルとなる。   The composition ratio determination unit 13 is a first basic depth model based on the high-frequency component evaluation values of the upper screen portion and the lower screen portion calculated by the upper screen region high-frequency component evaluation unit 11 and the lower screen region high-frequency component evaluation unit 12, respectively. The combination ratios k1, k2, and k3 (where k1 + k2 + k3 = 1) of the second basic depth model and the third basic depth model are determined. The synthesizing unit 17 multiplies the synthesis ratios k1, k2, and k3 by the first basic depth model, the second basic depth model, and the third basic depth model, and adds the multiplication results. This calculation result becomes a synthetic basic depth model.

例えば合成比率決定部13は、画面上部の高域成分評価値が小さい場合は画面上部に空もしくは平坦な壁が存在するシーンと認識して、画面上部の奥行きを深くした第2基本デプスモデルの比率を増加させる。また画面下部の高域成分評価値が小さい場合は画面下部に平坦な地面もしくは水面が手前に連続的に広がるシーンと認識して、第3基本デプスモデルの比率を増加させる。第3基本デプスモデルでは、画面上部は遠景として平面近似し、画面下部は下に行くほど奥行きを小さくしている。   For example, when the high frequency component evaluation value at the upper part of the screen is small, the composition ratio determining unit 13 recognizes that the scene has an empty or flat wall at the upper part of the screen, and the second basic depth model with the deeper upper part of the screen. Increase the ratio. If the high-frequency component evaluation value at the bottom of the screen is small, it is recognized as a scene in which the flat ground or water surface continuously spreads at the bottom of the screen, and the ratio of the third basic depth model is increased. In the third basic depth model, the upper part of the screen is approximated as a distant view, and the depth is reduced toward the bottom of the lower part of the screen.

加算部18は、合成部17により生成された合成基本デプスモデルに上記2D画像の赤成分(R)信号を重畳してデプスマップを生成する。R信号を使用する理由は、R信号の大きさが順光に近い環境で、かつテクスチャの明度が大きく異ならないような条件において、被写体の凹凸と一致する確率が高いという経験則によるものである。また赤色および暖色は色彩学における前進色であり、寒色系よりも奥行きが手前に認識され、立体感が強調されるためである。   The adding unit 18 generates a depth map by superimposing the red component (R) signal of the 2D image on the combined basic depth model generated by the combining unit 17. The reason for using the R signal is based on an empirical rule that there is a high probability of matching with the unevenness of the subject in an environment in which the magnitude of the R signal is close to direct light and the brightness of the texture is not significantly different. . Further, red and warm colors are forward colors in chromatics, and the depth is recognized in front of the cold color system, and the stereoscopic effect is emphasized.

図2に戻る。デプスマップ加工部20は、デプスマップ生成部10により生成されたデプスマップを加工する。本実施例ではデプスマップ加工部20は、外部設定される複数のマスクパターン(以下、単にマスクという)により指定される画面内の複数の領域ごとに、デプスマップ生成部10により生成されたデプスマップを個別または独立に加工する。例えばゲイン調整、オフセット調整、グラデーション処理などの加工を行う。デプスマップ加工部20による処理の詳細は後述する。   Returning to FIG. The depth map processing unit 20 processes the depth map generated by the depth map generation unit 10. In the present embodiment, the depth map processing unit 20 generates a depth map generated by the depth map generation unit 10 for each of a plurality of areas in the screen specified by a plurality of mask patterns (hereinafter simply referred to as masks) set externally. Are processed individually or independently. For example, processing such as gain adjustment, offset adjustment and gradation processing is performed. Details of the processing by the depth map processing unit 20 will be described later.

3D画像生成部30は、上述の2D画像およびデプスマップ加工部20により加工されたデプスマップをもとに別視点の2D画像を生成する。3D画像生成部30は、オリジナル視点の2D画像と別視点の2D画像を右眼画像と左眼画像として出力する。   The 3D image generation unit 30 generates a 2D image of another viewpoint based on the above-described 2D image and the depth map processed by the depth map processing unit 20. The 3D image generation unit 30 outputs the 2D image of the original viewpoint and the 2D image of the different viewpoint as the right eye image and the left eye image.

以下、オリジナル視点の2D画像とデプスマップを用いて当該2D画像と視差を持つ別視点の2D画像を生成する具体例を説明する。この具体例ではオリジナル視点の2D画像を画面表示させた場合の視点を基準にして、左に視点移動した別視点の2D画像を生成する。その場合、観察者に対してテクスチャを近景として表示させるときは画面に向かって左側へオリジナル視点の2D画像のテクスチャを所定量移動させ、テクスチャを観察者に遠景として表示させるときは画面に向かって右側へテクスチャを所定量移動させる。   Hereinafter, a specific example of generating a 2D image of another viewpoint having a parallax with the 2D image using the 2D image of the original viewpoint and the depth map will be described. In this specific example, a 2D image of another viewpoint that is moved to the left is generated based on the viewpoint when the 2D image of the original viewpoint is displayed on the screen. In that case, when displaying the texture as a foreground for the observer, move the texture of the 2D image of the original viewpoint to the left side toward the screen by a predetermined amount, and toward the screen when displaying the texture as a distant view for the observer. Move the texture to the right by a predetermined amount.

デプスマップの各画素の輝度値をYd、飛び出し感を表す輻輳値をm、立体感を表す奥行き値をnとする。3D画像生成部30は輝度値Ydの小さい値から順に、その輝度値Ydに対応するオリジナル視点の2D画像のテクスチャを画素ごとに(Yd−m)/n画素分左にシフトする。(Yd−m)/nの値が負の場合、(m−Yd)/n画素分右にシフトする。なお観察者には、デプスマップの輝度値Ydの小さいテクスチャは画面奥側に見え、輝度値Ydの大きいテクスチャは画面手前に見える。輝度値Yd、輻輳値m、奥行き値nは0〜255の範囲の値であり、例えば、輻輳値m=200、奥行き値n=20に設定される。   Let Yd be the luminance value of each pixel in the depth map, m be the convergence value representing the pop-out feeling, and n be the depth value representing the stereoscopic effect. The 3D image generation unit 30 sequentially shifts the texture of the 2D image at the original viewpoint corresponding to the luminance value Yd to the left by (Yd−m) / n pixels in order from the smallest luminance value Yd. If the value of (Yd−m) / n is negative, shift to the right by (m−Yd) / n pixels. For the observer, a texture with a small luminance value Yd of the depth map appears on the back side of the screen, and a texture with a large luminance value Yd appears on the front side of the screen. The luminance value Yd, the convergence value m, and the depth value n are values in the range of 0 to 255. For example, the convergence value m = 200 and the depth value n = 20 are set.

なお、デプスマップ生成部10によるデプスマップ生成、および3D画像生成部30による3D画像生成のより詳細な説明は、本出願人が先に出願した特開2005−151534号公報、特開2009−44722号公報に開示されている。   A more detailed description of the depth map generation by the depth map generation unit 10 and the 3D image generation by the 3D image generation unit 30 will be described in Japanese Patent Application Laid-Open Nos. 2005-151534 and 2009-44722 previously filed by the present applicant. It is disclosed in the gazette.

操作受付部40は、コンソール端末装置200の操作部60から入力される信号を受け付ける。操作受付部40は、入力される信号をその内容に応じてデプスマップ加工部20または3D画像生成部30に出力する。表示制御部50はコンソール端末装置200の表示部70を制御する。具体的には表示制御部50は、2D入力画像、デプスマップ生成部10により生成されたデプスマップ、デプスマップ加工部20により加工されたデプスマップ、3D画像生成部30により生成された3D画像を表示できる。   The operation reception unit 40 receives a signal input from the operation unit 60 of the console terminal device 200. The operation reception unit 40 outputs the input signal to the depth map processing unit 20 or the 3D image generation unit 30 according to the content. The display control unit 50 controls the display unit 70 of the console terminal device 200. Specifically, the display control unit 50 displays the 2D input image, the depth map generated by the depth map generation unit 10, the depth map processed by the depth map processing unit 20, and the 3D image generated by the 3D image generation unit 30. Can be displayed.

図4は、本発明の基本となる実施例に係る画像編集システム500の全体処理プロセスを説明するための図である。一般的に2D画像には複数のオブジェクトが含まれる。図4の2D入力画像は3つのオブジェクトを含む。具体的には人物、木、背景のオブジェクトを含む。まずデプスマップ生成部10は、2D入力画像からデプスマップを生成する(ステップS10)。デプスマップは白に近いほど輝度が高く観察者との距離が近いことを示し、黒に近いほど輝度が低く観察者との距離が遠いことを示す。3D画像を生成する場合、デプスマップの白に近い領域ほど飛び出し量が大きくなり、黒に近い領域ほど引っ込み量が大きくなる。   FIG. 4 is a diagram for explaining the entire processing process of the image editing system 500 according to the embodiment as the basis of the present invention. In general, a 2D image includes a plurality of objects. The 2D input image of FIG. 4 includes three objects. Specifically, it includes people, trees, and background objects. First, the depth map generation unit 10 generates a depth map from the 2D input image (step S10). In the depth map, the closer to white, the higher the luminance and the closer to the observer, and the closer to black, the lower the luminance and the farther the observer. When a 3D image is generated, the pop-out amount increases as the area is closer to white in the depth map, and the retraction amount increases as the area is closer to black.

本実施例では画像内の複数のオブジェクトに対して個別に奥行き感を調整するために、デプスマップ内の個々のオブジェクト領域に対して独立にエフェクト調整する。具体的には、画像中の個々のオブジェクト領域を表す複数のマスクを用いて、デプスマップ内に、個々のオブジェクト領域を特定する。そして特定されたオブジェクト領域ごとに個別にエフェクト調整し、エフェクト調整された複数のデプスマップを得る。そして、この複数のデプスマップを合成して一つのデプスマップを生成する。このデプスマップは、オリジナル視点の2D画像から別視点の2D画像を生成する際に使用される。   In this embodiment, in order to individually adjust the sense of depth for a plurality of objects in the image, the effect adjustment is performed independently for each object area in the depth map. Specifically, each object area is specified in the depth map using a plurality of masks representing each object area in the image. Then, effect adjustment is performed individually for each identified object region, and a plurality of depth maps adjusted for effect are obtained. Then, one depth map is generated by combining the plurality of depth maps. This depth map is used when generating a 2D image of another viewpoint from a 2D image of the original viewpoint.

デプスマップ生成部10は2D入力画像のデプスマップを自動的に生成する(S10)。生成されたデプスマップは、デプスマップ加工部20に入力される。デプスマップ加工部20には、2D入力画像内の複数のオブジェクト領域をそれぞれ表す複数のマスクも入力される。これらのマスクはユーザによりトレースされたオブジェクト領域の輪郭をもとに生成される。例えば、表示制御部50は表示部70に2D入力画像を表示させ、ユーザはその2D入力画像内においてオブジェクト領域とすべき領域の輪郭を、操作部60を使用してトレースする。操作受付部40は操作部60からの信号により、個々のオブジェクト領域の輪郭情報を生成し、マスクとしてデプスマップ加工部20に出力する。なおユーザが印刷物上に描いた輪郭をスキャナにより読み取ることによりマスクを画像処理装置100に読み込ませてもよい。   The depth map generator 10 automatically generates a depth map of the 2D input image (S10). The generated depth map is input to the depth map processing unit 20. The depth map processing unit 20 also receives a plurality of masks respectively representing a plurality of object regions in the 2D input image. These masks are generated based on the outline of the object area traced by the user. For example, the display control unit 50 displays a 2D input image on the display unit 70, and the user traces the outline of the region to be an object region in the 2D input image using the operation unit 60. The operation receiving unit 40 generates contour information of each object region based on a signal from the operation unit 60 and outputs the contour information to the depth map processing unit 20 as a mask. Note that the mask may be read by the image processing apparatus 100 by reading the outline drawn on the printed matter by the scanner.

図4では各マスクの有効領域を白で無効領域を黒で描いている。人物のマスクは人物の領域のみを有効とし、他の領域を無効とするパターンである。木のマスクは木の領域のみを有効とし、他の領域を無効とするパターンである。背景のマスクは背景のみを有効とし、他の領域を無効とするパターンである。   In FIG. 4, the effective area of each mask is drawn in white and the ineffective area is drawn in black. The mask of the person is a pattern in which only the person area is valid and the other areas are invalid. The tree mask is a pattern in which only the tree area is valid and the other areas are invalid. The background mask is a pattern in which only the background is valid and other areas are invalid.

1画面あたりのマスクの数に制約はなく、ユーザが任意に設定できる。またオブジェクト領域はユーザが1つのオブジェクト領域にすべきと決定した領域に設定できる。例えば、図4に示すように1人の人物に1つのオブジェクト領域を設定してもよいし、人物の部位ごと、さらに各部位の部分ごとにオブジェクト領域を設定してもよい。特に高品質な3D画像を生成する際には、1人の人物に対しても多数のオブジェクト領域を設定し、部位ごと、さらに各部位の部分ごとに厚みや奥行き方向の位置を調整することもある。   There is no restriction on the number of masks per screen, and the user can arbitrarily set it. The object area can be set to an area determined by the user to be one object area. For example, as shown in FIG. 4, one object area may be set for one person, or an object area may be set for each part of the person and for each part. In particular, when generating a high-quality 3D image, a large number of object regions can be set for one person, and the position in the thickness and depth direction can be adjusted for each part and for each part. is there.

デプスマップ加工部20は、デプスマップ生成部10から入力されるデプスマップ(以下、入力デプスマップという)を、ユーザインタフェースを介して入力される複数のマスクを用いて加工する(S20)。デプスマップ加工部20は各マスクで特定される領域ごとに、個別にデプスマップを加工する。以下、この領域別のデプスマップの加工をデプスマップのレイヤ処理と呼ぶ。またレイヤ処理されたデプスマップをレイヤデプスマップと呼ぶ。本明細書ではレイヤを、マスクの有効領域に対する処理の単位を示す概念として使用している。   The depth map processing unit 20 processes the depth map (hereinafter referred to as input depth map) input from the depth map generation unit 10 using a plurality of masks input via the user interface (S20). The depth map processing unit 20 processes the depth map individually for each area specified by each mask. Hereinafter, this depth map processing for each region is referred to as depth map layer processing. A depth map that has been subjected to layer processing is called a layer depth map. In this specification, a layer is used as a concept indicating a unit of processing for an effective area of a mask.

図4では、一例としてデプスマップ加工部20は入力デプスマップから、人物のマスク(レイヤ1のマスク)を用いて人物の領域を特定してレイヤ処理している(S21a)。同様に入力デプスマップから、木のマスク(レイヤ2のマスク)を用いて木の領域を特定してレイヤ処理している(S21b)。同様に入力デプスマップから、背景のマスク(レイヤ3のマスク)を用いて背景の領域を特定してレイヤ処理している(S21c)。   In FIG. 4, as an example, the depth map processing unit 20 performs layer processing by specifying a person region from the input depth map using a person mask (layer 1 mask) (S <b> 21 a). Similarly, from the input depth map, a tree region is identified using a tree mask (layer 2 mask) and layer processing is performed (S21b). Similarly, a background region is identified from the input depth map using a background mask (layer 3 mask) and layer processing is performed (S21c).

デプスマップ加工部20は、レイヤ1〜3のレイヤデプスマップの各オブジェクト領域のデプスマップを合成する(S22)。この合成されたデプスマップを合成デプスマップと呼ぶ。3D画像生成部30は、この合成デプスマップを用いて2D入力画像の画素をシフトし、2D入力画像に対して視差を持つ画像を生成する(S30)。3D画像生成部30は2D入力画像を3D出力画像の右眼画像(R)とし、生成した画像を左眼画像(L)として出力する。   The depth map processing unit 20 synthesizes the depth maps of the object areas of the layer depth maps of layers 1 to 3 (S22). This combined depth map is referred to as a combined depth map. The 3D image generation unit 30 shifts the pixels of the 2D input image using the composite depth map, and generates an image having a parallax with respect to the 2D input image (S30). The 3D image generation unit 30 outputs the 2D input image as the right eye image (R) of the 3D output image and the generated image as the left eye image (L).

まず、デプスマップ加工部20によるレイヤ処理としてゲイン調整する例を説明する。ゲイン調整はオブジェクトの奥行き方向の厚みを調整する処理である。ゲインを上げるとオブジェクトが厚くなり、ゲインを下げるとオブジェクトが薄くなる。   First, an example of gain adjustment as layer processing by the depth map processing unit 20 will be described. Gain adjustment is a process of adjusting the thickness of the object in the depth direction. Increasing the gain makes the object thicker and lowering the gain makes the object thinner.

図5は、入力デプスマップのゲイン調整プロセスを説明するための図である。デプスマップ加工部20は、加工前のデプスマップである入力デプスマップに対して、人物のマスクの有効領域だけにゲインを乗算して、入力デプスマップ内の人物の部分のみデプス値の振幅を大きくする(S21a)。図5において加工後のデプスマップであるレイヤデプスマップは人物の部分の振幅が大きくなっている(符号a参照)。   FIG. 5 is a diagram for explaining the gain adjustment process of the input depth map. The depth map processing unit 20 multiplies the input depth map, which is a depth map before processing, by a gain only in the effective area of the person's mask, and increases the amplitude of the depth value only in the portion of the person in the input depth map. (S21a). In FIG. 5, the amplitude of the person portion of the layer depth map, which is a depth map after processing, is large (see symbol a).

次に、デプスマップ加工部20によるレイヤ処理としてオフセット調整する例を説明する。オフセット調整はオブジェクトの奥行き方向の位置を調整する処理である。正のオフセット値を加算するとオブジェクトが飛び出し方向に移動し、負のオフセット値を加算すると引っ込み方向に移動する。   Next, an example in which offset adjustment is performed as layer processing by the depth map processing unit 20 will be described. Offset adjustment is a process of adjusting the position of the object in the depth direction. When a positive offset value is added, the object moves in the pop-out direction, and when a negative offset value is added, the object moves in the retracting direction.

図6は、入力デプスマップのオフセット調整プロセスを説明するための図である。デプスマップ加工部20は、加工前のデプスマップである入力デプスマップに対して、木のマスクの有効領域だけにオフセットを加算して、入力デプスマップ内の木の部分のみデプス値のレベルを高くする(S21b)。図6において加工後のデプスマップであるレイヤデプスマップは木の部分のレベルが高くなっている(符号b参照)。   FIG. 6 is a diagram for explaining the offset adjustment process of the input depth map. The depth map processing unit 20 adds an offset only to the effective area of the tree mask to the input depth map, which is the depth map before processing, and increases the level of the depth value only for the portion of the tree in the input depth map. (S21b). In FIG. 6, the layer depth map, which is the depth map after processing, has a higher level of the tree portion (see symbol b).

図7は、レイヤデプスマップの合成処理プロセスを説明するための図である。デプスマップ加工部20は、レイヤ1のレイヤデプスマップ(人物のデプスマップ)のうち、レイヤ1のマスク(人物のマスク)の有効領域のみを切り出す。同様にレイヤ2のレイヤデプスマップ(木のデプスマップ)のうち、レイヤ2のマスク(木のマスク)の有効領域のみを切り出す。同様にレイヤ3のレイヤデプスマップ(背景のデプスマップ)のうち、レイヤ3のマスク(背景のマスク)の有効領域のみを切り出す。デプスマップ加工部20は、切り出した3つのデプスマップを組み合わせて合成デプスマップを生成する。   FIG. 7 is a diagram for explaining a process for synthesizing a layer depth map. The depth map processing unit 20 cuts out only the effective area of the layer 1 mask (person's mask) from the layer 1 layer depth map (person's depth map). Similarly, only the effective area of the layer 2 mask (tree mask) is cut out from the layer 2 layer depth map (tree depth map). Similarly, only the effective area of the layer 3 mask (background mask) is cut out from the layer 3 layer depth map (background depth map). The depth map processing unit 20 generates a combined depth map by combining the three extracted depth maps.

図8は、マスクを使用しない入力デプスマップのゲイン調整プロセスを説明するための図である。レイヤデプスマップの合成の際、各レイヤデプスマップのマスクの有効領域のみを用いて合成するのであれば、各レイヤデプスマップのマスクの無効領域は合成デプスマップに反映されないことになる。よって、デプスマップ加工部20は入力デプスマップ全体にゲインを乗算して、入力デプスマップ全体のデプス値の振幅を大きくする(S21a)。図8においてレイヤデプスマップは全体の振幅が大きくなっている(符号c参照)。   FIG. 8 is a diagram for explaining an input depth map gain adjustment process without using a mask. If the layer depth map is synthesized by using only the effective area of the mask of each layer depth map, the invalid area of the mask of each layer depth map is not reflected in the synthesized depth map. Therefore, the depth map processing unit 20 multiplies the entire input depth map by the gain to increase the amplitude of the depth value of the entire input depth map (S21a). In FIG. 8, the entire amplitude of the layer depth map is large (see symbol c).

図9は、マスクを使用しない入力デプスマップのオフセット調整プロセスを説明するための図である。レイヤデプスマップの合成の際、各レイヤデプスマップのマスクの有効領域のみを用いて合成するのであれば、各レイヤデプスマップのマスクの無効領域は合成デプスマップに反映されないことになる。よって、デプスマップ加工部20は入力デプスマップ全体にオフセットを加算して、入力デプスマップ全体のデプス値のレベルを高くする(S21b)。図9においてレイヤデプスマップは全体のレベルが高くなっている(符号d参照)。   FIG. 9 is a diagram for explaining an offset adjustment process of an input depth map without using a mask. If the layer depth map is synthesized by using only the effective area of the mask of each layer depth map, the invalid area of the mask of each layer depth map is not reflected in the synthesized depth map. Therefore, the depth map processing unit 20 adds an offset to the entire input depth map to increase the level of the depth value of the entire input depth map (S21b). In FIG. 9, the overall level of the layer depth map is high (see symbol d).

図10は、画素シフトと画素補間を説明するための図である。3D画像生成部30は合成デプスマップをもとに2D入力画像の画素をシフトし、2D入力画像に対して視差を持つ画像を生成する(S30)。図10では2D入力画像内の人物領域の画素を左にシフトする例を示している。図10のデプスマップは人物領域のデプス値にオフセット値が加算されて人物領域のデプス値が大きくなっている。人物領域のデプス値が大きくなると、3D画像の人物領域の飛び出し量が大きくなる。   FIG. 10 is a diagram for explaining pixel shift and pixel interpolation. The 3D image generation unit 30 shifts the pixels of the 2D input image based on the combined depth map, and generates an image having a parallax with respect to the 2D input image (S30). FIG. 10 shows an example in which the pixel of the person area in the 2D input image is shifted to the left. In the depth map of FIG. 10, the offset value is added to the depth value of the person area, and the depth value of the person area is increased. When the depth value of the person area increases, the pop-out amount of the person area of the 3D image increases.

人物領域の周囲の背景領域を画素シフトせずに人物領域のみを画素シフトすると、画素が存在しない欠落画素領域が発生する(補正前の画素シフト画像の符号e参照)。3D画像生成部30は、この欠落画素領域をその周辺画素から生成した画素で補間して欠落画素領域を補正する。画素補間には様々な方法があるが、例えば人物領域の境界の画素で補間する(補正後の画素シフト画像の符号f参照)。   If only the person area is pixel-shifted without shifting the background area around the person area, a missing pixel area in which no pixel exists is generated (see reference symbol e of the pixel-shifted image before correction). The 3D image generation unit 30 corrects the missing pixel region by interpolating the missing pixel region with pixels generated from the surrounding pixels. There are various methods for pixel interpolation. For example, interpolation is performed using pixels at the boundary of the person area (see reference numeral f of the pixel shifted image after correction).

図11は、オブジェクト境界のデプスの段差が大きい場合における、画素シフトと画素補間を説明するための図である。オブジェクト境界でのデプスの段差が大きい場合、画素シフト量も大きくなるため、欠落画素領域の面積も大きくなる。この欠落画素領域を周辺画素から生成した画素で補間する場合、その補間する領域の面積も大きくなるため、オブジェクト境界での画像の不自然、不整合、不適合が目立つようになる。   FIG. 11 is a diagram for explaining pixel shift and pixel interpolation when the depth difference of the object boundary is large. When the depth difference at the object boundary is large, the pixel shift amount is also large, so that the area of the missing pixel region is also large. When this missing pixel area is interpolated with pixels generated from surrounding pixels, the area of the area to be interpolated also increases, so that unnaturalness, inconsistency, and incompatibility of the image at the object boundary become conspicuous.

図11では図10と比較して人物領域の画素シフト量が大きくなっている。図11の補正前の画素シフト画像の欠落画素領域の面積は、図10のその面積より大きくなっている(符号g参照)。図11の補正後の画素シフト画像でも図10の補正後の画素シフト画像と同様に、欠落画素領域に人物領域の境界の画素を補間している。その欠落画素領域は本来は背景とすべき領域であり、その領域が大きくなると人物の形状が崩れてしまう(符号h参照)。   In FIG. 11, the pixel shift amount of the person area is larger than that in FIG. The area of the missing pixel region of the pixel shifted image before correction in FIG. 11 is larger than that in FIG. 10 (see symbol g). In the pixel shift image after correction in FIG. 11 as well, the pixels at the boundary of the person area are interpolated in the missing pixel area, as in the pixel shift image after correction in FIG. The missing pixel area is an area that should originally be a background, and when the area becomes larger, the shape of the person collapses (see symbol h).

また画像内のオブジェクトには、その境界が鮮明なものばかりではなく不鮮明なものも存在する。オブジェクト境界の不鮮明は、例えば撮影時のピンぼけ、手ぶれ、モーションブラーなどにより発生する。オブジェクト境界が不鮮明であいまいな場合、オブジェクト境界に合わせた適切なマスクを作成するのが困難である。不正確な輪郭で作成されたマスクを用いて、デプスマップの加工、画素シフト、画素補間を行った場合、生成される3D画像のオブジェクトの輪郭が不自然になりやすくなる。   Some objects in the image have not only clear boundaries but also unclear edges. The blurring of the object boundary occurs due to, for example, blurring at the time of shooting, camera shake, or motion blur. When the object boundary is unclear, it is difficult to create an appropriate mask that matches the object boundary. When depth map processing, pixel shift, and pixel interpolation are performed using a mask created with an inaccurate contour, the contour of the object of the generated 3D image tends to be unnatural.

図12は、オブジェクト境界のデプスの段差が大きい場合でも不自然さが発生しない、画素シフトと画素補間を説明するための図である。オブジェクト境界における欠落画素領域の面積が大きい場合でも、人物と背景がなだらかに切り替わるように補間することで、オブジェクト境界の不自然を目立ちにくくできる。   FIG. 12 is a diagram for explaining pixel shift and pixel interpolation in which unnaturalness does not occur even when the depth difference of the object boundary is large. Even when the area of the missing pixel region at the object boundary is large, the unnaturalness of the object boundary can be made inconspicuous by performing interpolation so that the person and the background are switched smoothly.

図12の補正前の画素シフト画像の欠落画素領域の面積も、図11と同様に図10のその面積より大きくなっている(符号i参照)。図12の補正後の画素シフト画像では図11の補正後の画素シフト画像と異なり、人物と背景の境界における不自然が目立ちにくくなっている(符号j参照)。   The area of the missing pixel region of the pixel shifted image before correction in FIG. 12 is also larger than that in FIG. 10 as in FIG. 11 (see symbol i). In the pixel-shifted image after correction shown in FIG. 12, unlike the pixel-shifted image after correction shown in FIG. 11, unnaturalness at the boundary between the person and the background is less noticeable (see symbol j).

図13は、本発明の実施例1に係る画像編集システム500の構成を示す図である。実施例1に係る画像編集システム500では、図2の基本となる実施例に係る画像編集システム500の画像処理装置100にマスク補正部80が追加される。以下、図13の実施例1に係る画像編集システム500と、図2の基本となる実施例に係る画像編集システム500との相違点を説明する。   FIG. 13 is a diagram showing the configuration of the image editing system 500 according to the first embodiment of the present invention. In the image editing system 500 according to the first embodiment, a mask correction unit 80 is added to the image processing apparatus 100 of the image editing system 500 according to the basic embodiment of FIG. Hereinafter, differences between the image editing system 500 according to the first embodiment shown in FIG. 13 and the image editing system 500 according to the basic embodiment shown in FIG. 2 will be described.

マスク補正部80は、操作受付部40を介してコンソール端末装置200から設定されるマスクを補正してデプスマップ加工部20に出力する。具体的にはマスク補正部80はマスクのオブジェクト境界に、ぼかし処理を施す。デプスマップ加工部20は、マスク補正部80により補正されたマスクをもとに生成される、複数のオブジェクト領域の各デプスマップをアルファブレンドする。即ちデプスマップ加工部20は、複数のレイヤデプスマップを、各マスクで規定された係数(α値)にしたがい合成する。   The mask correction unit 80 corrects the mask set from the console terminal device 200 via the operation reception unit 40 and outputs the corrected mask to the depth map processing unit 20. Specifically, the mask correction unit 80 performs a blurring process on the object boundary of the mask. The depth map processing unit 20 alpha-blends each depth map of a plurality of object regions generated based on the mask corrected by the mask correction unit 80. That is, the depth map processing unit 20 combines a plurality of layer depth maps according to the coefficient (α value) defined by each mask.

図14は、本発明の実施例1に係る画像編集システム500の全体処理プロセスを説明するための図である。図14の処理プロセスは図4の処理プロセスに、マスクぼかし処理が追加された構成である。以下、相違点について説明する。なお以下の説明では、マスクの有効領域(図では白で描いている)内の画素値を1、無効領域(図面では黒で描いている)内の画素値を0とする。   FIG. 14 is a diagram for explaining the overall processing process of the image editing system 500 according to the first embodiment of the present invention. The processing process of FIG. 14 has a configuration in which a mask blurring process is added to the processing process of FIG. Hereinafter, differences will be described. In the following description, the pixel value in the effective area of the mask (drawn in white in the figure) is 1, and the pixel value in the invalid area (drawn in black in the drawing) is 0.

実施例1では操作受付部40から出力されるレイヤ1のマスク(人物のマスク)、レイヤ2のマスク(木のマスク)及びレイヤ3のマスク(背景のマスク)は、デプスマップ加工部20に入力される前にマスク補正部80に入力される。マスク補正部80は各マスクのオブジェクト境界部分にぼかし処理を施す(S15a〜S15b)。具体的にはマスク補正部80は、マスク信号のエッジ(即ち、0と1の境界)及びその近傍領域(以下、両者を総称してエッジ領域という)の値を、0と1の間の値(0と1を除く)に補正する(符号k参照)。   In the first embodiment, the layer 1 mask (person mask), the layer 2 mask (tree mask), and the layer 3 mask (background mask) output from the operation reception unit 40 are input to the depth map processing unit 20. It is input to the mask correction unit 80 before being processed. The mask correction unit 80 performs blurring processing on the object boundary portion of each mask (S15a to S15b). Specifically, the mask correction unit 80 sets the values of the edge of the mask signal (that is, the boundary between 0 and 1) and its neighboring area (hereinafter collectively referred to as edge area) to a value between 0 and 1. (Excluding 0 and 1) (see symbol k).

デプスマップ加工部20は、補正されたマスクのレベルに応じて、レイヤデプスマップを合成する(S22)。これによりマスクのエッジ領域では、なだらかにデプス値が変化する合成デプスマップを生成できる。3D画像生成部30は、この合成デプスマップを用いて画素シフト、画素補間を行う。これによりオブジェクト境界がなだらかに変化し、オブジェクト境界の不自然が目立たなくなる。   The depth map processing unit 20 synthesizes a layer depth map according to the corrected mask level (S22). As a result, a combined depth map in which the depth value changes gently can be generated in the edge region of the mask. The 3D image generation unit 30 performs pixel shift and pixel interpolation using the composite depth map. As a result, the object boundary changes gently, and the unnaturalness of the object boundary becomes inconspicuous.

図15は、レイヤデプスマップのアルファブレンドを説明するための図である。デプスマップ加工部20は、マスク補正部80により補正された各マスク信号の値をもとに、各レイヤデプスマップ内のデプス値のブレンド比率を決定する。各レイヤデプスマップは指定された順番に重ね合わされる。重ね合わせの順番はユーザが操作部60から入力し、操作受付部40を介してデプスマップ加工部20に設定される。本明細書の例では背景のレイヤデプスマップ、木のレイヤデプスマップ、人物のデプスマップの順番で重ね合わされる。   FIG. 15 is a diagram for explaining alpha blending of the layer depth map. The depth map processing unit 20 determines a blend ratio of depth values in each layer depth map based on the value of each mask signal corrected by the mask correction unit 80. Each layer depth map is overlaid in the specified order. The order of superimposition is input from the operation unit 60 by the user and is set in the depth map processing unit 20 via the operation reception unit 40. In the example of this specification, the background layer depth map, the tree layer depth map, and the person depth map are overlaid in this order.

図15においてレイヤn(nは自然数)のマスク信号のエッジ領域は、0%から50%への垂直な立ち上がりと、50%から100%へのなだらかな傾斜から構成される。各パーセンテージの数値は合成比率を示している。このレイヤnのマスク信号を用いて、レイヤnのデプス信号(以下、レイヤnデプスという)と、レイヤΣ(n−1)の合成デプス信号(以下、レイヤΣ(n−1)デプスという)をブレンドする。レイヤΣ(n−1)デプスは、レイヤ1からレイヤ(n−1)までの各デプス信号をブレンドした合成デプス信号である。即ち、レイヤnデプスがブレンドされる時点までに生成された合成デプス信号である。   In FIG. 15, the edge region of the mask signal of layer n (n is a natural number) is composed of a vertical rise from 0% to 50% and a gentle slope from 50% to 100%. Each percentage value indicates the composition ratio. Using this layer n mask signal, a layer n depth signal (hereinafter referred to as layer n depth) and a layer Σ (n−1) combined depth signal (hereinafter referred to as layer Σ (n−1) depth) are used. Blend. The layer Σ (n−1) depth is a combined depth signal obtained by blending the depth signals from the layer 1 to the layer (n−1). That is, it is a combined depth signal generated up to the time point when the layer n depth is blended.

レイヤnのマスク信号の合成比率が0%の期間(符号l参照)では、レイヤnデプスが0%、レイヤΣ(n−1)デプスが100%でブレンドされる。即ち、レイヤΣ(n−1)デプスはレイヤnデプスにより全く上書きされず、レイヤΣ(n−1)デプスがそのまま出力される(符号o参照)。レイヤnのマスク信号の合成比率が50%の時点(符号p参照)では、レイヤnデプスが50%、レイヤΣ(n−1)デプスが50%の比率でブレンドされる。   In a period in which the composition ratio of the mask signal of layer n is 0% (see reference numeral 1), layer n depth is blended at 0% and layer Σ (n-1) depth is blended at 100%. That is, the layer Σ (n−1) depth is not overwritten at all by the layer n depth, and the layer Σ (n−1) depth is output as it is (see symbol o). At the time when the composition ratio of the mask signal of layer n is 50% (see symbol p), the layer n depth is blended at a ratio of 50% and the layer Σ (n−1) depth is blended at a ratio of 50%.

レイヤnのマスク信号の合成比率が50%〜100%の期間(符号m参照)では、合成比率が変化しながらレイヤnデプスとレイヤΣ(n−1)デプスがブレンドされる。例えばレイヤnのマスク信号の合成比率が75%の時点(符号q参照)では、レイヤnデプスが75%、レイヤΣ(n−1)デプスが25%の比率でブレンドされる。レイヤnのマスク信号の合成比率が100%に到達した時点(符号r参照)から、レイヤnデプスが100%、レイヤΣ(n−1)デプスが0%の比率でブレンドされる。レイヤnのマスク信号の合成比率が100%の期間(符号n参照)では、レイヤΣ(n−1)デプスはレイヤnデプスにより完全上書きされ、結果としてレイヤnデプスがそのまま出力される(符号s参照)。これによりレイヤΣnデプスが生成される。レイヤΣnデプスは、レイヤ1からレイヤnまでの各デプス信号をブレンドした合成デプス信号である。   In a period in which the composition ratio of the mask signal of layer n is 50% to 100% (see symbol m), the layer n depth and the layer Σ (n−1) depth are blended while the composition ratio changes. For example, when the composition ratio of the mask signal of layer n is 75% (see symbol q), the layer n depth is blended at a ratio of 75% and the layer Σ (n−1) depth is blended at a ratio of 25%. From the point in time when the composition ratio of the mask signal of layer n reaches 100% (see symbol r), the layer n depth is blended at a ratio of 100% and the layer Σ (n−1) depth is blended at a ratio of 0%. During the period when the composition ratio of the mask signal of layer n is 100% (see symbol n), the layer Σ (n−1) depth is completely overwritten by the layer n depth, and as a result, the layer n depth is output as it is (symbol s). reference). Thereby, the layer Σn depth is generated. The layer Σn depth is a combined depth signal obtained by blending the depth signals from layer 1 to layer n.

なおレイヤデプスのブレンドの際に、レイヤΣ(n−1)デプスのマスク信号は使用されない。レイヤΣnデプスのマスク信号のみにより、レイヤΣnデプスとレイヤΣ(n−1)デプスとの合成比率が決定される。したがってレイヤデプスの重なりが多い領域では、下のレイヤデプスのデプス値はレイヤデプスが重ねられるにつれ薄まっていく。   Note that the layer Σ (n−1) depth mask signal is not used during layer depth blending. The combination ratio of the layer Σn depth and the layer Σ (n−1) depth is determined only by the layer Σn depth mask signal. Therefore, in a region where the layer depth overlaps frequently, the depth value of the lower layer depth becomes thinner as the layer depth is overlapped.

以下、マスク信号のエッジをぼかす処理について具体的に説明する。このぼかし処理は以下の3つの基本ステップからなる。まずオリジナルのマスク信号のエッジを、対象となるオブジェクトの輪郭に対して適切な位置になるように移動させる。これによりマスクのオブジェクト領域の面積が拡大または縮小する。次に当該マスクのエッジに傾斜をつける。最後に傾斜をつけたマスクのエッジ領域を制限する。   Hereinafter, the process of blurring the edge of the mask signal will be described in detail. This blurring process consists of the following three basic steps. First, the edge of the original mask signal is moved to an appropriate position with respect to the contour of the target object. Thereby, the area of the object region of the mask is enlarged or reduced. Next, the edge of the mask is inclined. Limit the edge area of the mask with the last slope.

以下、上述のぼかし処理をローパスフィルタを用いて行う方法を説明する。まず黒い部分のレベルが0、白い部分のレベルが1であるマスクにローパスフィルタをかける。これにより、平坦部分のレベルは変化させずに、エッジ領域に0と1の中間のレベルの傾斜が付加されたマスクを生成できる。   Hereinafter, a method of performing the above blurring process using a low-pass filter will be described. First, a low-pass filter is applied to a mask in which the level of the black part is 0 and the level of the white part is 1. As a result, it is possible to generate a mask in which a slope having an intermediate level between 0 and 1 is added to the edge region without changing the level of the flat portion.

さらにマスクのエッジ領域のうち、マスクの有効領域に対して外側にのみ傾斜を付け、内側は加工前のレベルを保持したい場合がある。またその逆に、マスクのエッジ領域のうち、マスクの有効領域に対して内側にのみ傾斜を付け、外側は加工前のレベルを保持したい場合もある。これらの場合を考慮して、マスクの有効領域を拡大または縮小して、マスク信号のエッジの位置を任意に移動させる処理を、ぼかしマスク生成用のローパスフィルタの前段に挿入する。   Further, in some cases, it is desired to incline only the outer side of the effective area of the mask in the edge area of the mask and to maintain the level before processing on the inner side. On the contrary, in some cases, it is desired to incline only the inside of the mask edge area with respect to the effective area of the mask and to maintain the level before processing on the outside. In consideration of these cases, processing for arbitrarily moving the position of the edge of the mask signal by enlarging or reducing the effective area of the mask is inserted before the low-pass filter for generating the blur mask.

さらに、ぼかし処理によりマスクのエッジが意図した量より大きく拡大することを防ぐために、ぼかされたエッジ領域を制限する処理を、ぼかしマスク生成用のローパスフィルタの後段に挿入する。以下、このローパスフィルタを用いたぼかし処理について、より具体的に説明する。   Furthermore, in order to prevent the edge of the mask from expanding more than the intended amount due to the blurring process, a process for limiting the blurred edge region is inserted after the low-pass filter for blur mask generation. Hereinafter, the blurring process using the low-pass filter will be described more specifically.

図16は、マスク補正部80の構成例を示す図である。マスク補正部80は第1ローパスフィルタ81、二値化部82、第2ローパスフィルタ83、クリッピング部84を含む。これらの構成もハードウエアのみ、ソフトウエアのみ、またはそれらの組合せによっていろいろな形で実現できる。   FIG. 16 is a diagram illustrating a configuration example of the mask correction unit 80. The mask correction unit 80 includes a first low-pass filter 81, a binarization unit 82, a second low-pass filter 83, and a clipping unit 84. These configurations can also be realized in various forms by hardware only, software only, or a combination thereof.

1段目の第1ローパスフィルタ81は、オリジナルのマスク信号にローパスフィルタをかける。二値化部82は第1ローパスフィルタ81から出力される、エッジに傾斜がついたマスク信号を第1閾値を用いて二値化する。第1ローパスフィルタ81および二値化部82の作用により、オリジナルのマスク信号のエッジの位置が移動される。   The first low-pass filter 81 in the first stage applies a low-pass filter to the original mask signal. The binarization unit 82 binarizes the mask signal output from the first low-pass filter 81 and having an inclined edge using the first threshold value. By the action of the first low-pass filter 81 and the binarization unit 82, the position of the edge of the original mask signal is moved.

2段目の第2ローパスフィルタ83は、二値化部82から出力されるエッジの位置が移動されたマスク信号にローパスフィルタをかける。これによりマスク信号のエッジに傾斜がつけられる。クリッピング部84は第2ローパスフィルタ83から出力される、エッジに傾斜がついたマスク信号を第2閾値を用いて、第2閾値以下の信号を0にクリッピングする。   The second low-pass filter 83 at the second stage applies a low-pass filter to the mask signal output from the binarization unit 82 whose edge position has been moved. As a result, the edge of the mask signal is inclined. The clipping unit 84 uses the second threshold value for the mask signal output from the second low-pass filter 83 and having an inclined edge to clip a signal equal to or lower than the second threshold value to zero.

図17は、図16のマスク補正部80によるマスクぼかし処理を説明するための図である。図17の左に処理フローを、中央にマスクの信号波形を、右にマスクの画像を示す。図17の説明ではマスクの各画素値が8ビットで規定され、マスクの画像において黒が0(0b00000000)、白が255(0b11111111)であるとする。通常、オリジナルのマスク信号は0または255のみを持つ二値信号である。   FIG. 17 is a diagram for explaining mask blurring processing by the mask correction unit 80 of FIG. FIG. 17 shows a processing flow on the left, a mask signal waveform in the center, and a mask image on the right. In the description of FIG. 17, it is assumed that each pixel value of the mask is defined by 8 bits, and black is 0 (0b00000000) and white is 255 (0b11111111) in the mask image. Usually, the original mask signal is a binary signal having only 0 or 255.

オリジナルのマスク信号は、第1ローパスフィルタ81に入力される。第1ローパスフィルタ81はマスク信号のエッジの位置をかえる前処理として、オリジナルのマスク信号にローパスフィルタをかける(S81)。具体的には第1ローパスフィルタ81はオリジナルのマスク信号を、エッジ領域が傾斜を持つマスク信号に加工する。傾斜部分の値は0と255の間の値(0と255を除く)に加工される。   The original mask signal is input to the first low-pass filter 81. The first low-pass filter 81 applies a low-pass filter to the original mask signal as pre-processing for changing the position of the edge of the mask signal (S81). Specifically, the first low-pass filter 81 processes the original mask signal into a mask signal having an inclined edge region. The value of the inclined portion is processed to a value between 0 and 255 (excluding 0 and 255).

次に二値化部82はマスク信号のエッジの位置をかえる前処理として、加工されたマスク信号の値と第1閾値を比較してマスク信号を二値化する(S82)。具体的にはマスク信号の値が第1閾値よりも大きい場合はマスク信号の値を255に設定し、小さい場合は0に設定する。これにより再び、マスク信号は0または255のみを持つ二値信号となる。   Next, as a preprocessing for changing the position of the edge of the mask signal, the binarization unit 82 compares the value of the processed mask signal with the first threshold value and binarizes the mask signal (S82). Specifically, when the value of the mask signal is larger than the first threshold, the value of the mask signal is set to 255, and when it is smaller, it is set to 0. As a result, the mask signal again becomes a binary signal having only 0 or 255.

第1閾値が0と255の中間値である127より小さく設定される場合、二値化されたマスク信号のエッジは、オリジナルのマスク信号のエッジよりも外側に移動される。この場合、マスクの画像内において白の面積が拡大する。一方、第1閾値が中間値である127より大きく設定される場合、二値化されたマスク信号のエッジは、オリジナルのマスク信号のエッジよりも内側に移動される。この場合、マスクの画像内において白の面積が縮小する。なお第1閾値が中間値である127に設定される場合、二値化されたマスク信号のエッジは、オリジナルのマスク信号におけるエッジの位置と同じになる。   When the first threshold value is set to be smaller than 127, which is an intermediate value between 0 and 255, the edge of the binarized mask signal is moved outside the edge of the original mask signal. In this case, the white area is enlarged in the mask image. On the other hand, when the first threshold value is set to be larger than the intermediate value 127, the edge of the binarized mask signal is moved inward from the edge of the original mask signal. In this case, the white area is reduced in the mask image. When the first threshold is set to 127, which is an intermediate value, the edge of the binarized mask signal is the same as the position of the edge in the original mask signal.

図17ではマスク信号のエッジの位置を外側に移動させる例を示している。第1ローパスフィルタ81のタップ数や係数などのフィルタ特性および二値化部82の第1閾値を可変することにより、マスク信号のエッジの位置を任意に調整できる。   FIG. 17 shows an example in which the edge position of the mask signal is moved outward. By varying the filter characteristics such as the number of taps and coefficients of the first low-pass filter 81 and the first threshold value of the binarization unit 82, the position of the edge of the mask signal can be arbitrarily adjusted.

図18は、第1ローパスフィルタ81によりマスク信号に形成される傾斜と、二値化部82に設定される第1閾値の関係を説明するための図である。同じエッジの位置のマスク信号を生成する場合において、傾斜が緩くて長い場合は第1閾値が高くなり、傾斜が短く急な場合は第1閾値が低くなる関係にある。ユーザが操作部60から第1ローパスフィルタ81のフィルタ特性および二値化部82の第1閾値を入力することにより、操作受付部40を介して第1ローパスフィルタ81および二値化部82に設定される。ユーザは操作部60から、第1ローパスフィルタ81のフィルタ特性および二値化部82の第1閾値の少なくとも一方を調整することにより、マスク信号のエッジの位置を任意に調整できる。なお第1閾値を低く設定したほうが傾斜を短くできるため、第1ローパスフィルタ81のタップ数を減らすことができ、第1ローパスフィルタ81を簡素化できる。   FIG. 18 is a diagram for explaining the relationship between the slope formed in the mask signal by the first low-pass filter 81 and the first threshold value set in the binarization unit 82. When generating mask signals at the same edge position, the first threshold value is high when the slope is slow and long, and the first threshold value is low when the slope is short and steep. When the user inputs the filter characteristics of the first low-pass filter 81 and the first threshold value of the binarization unit 82 from the operation unit 60, the first low-pass filter 81 and the binarization unit 82 are set via the operation reception unit 40. Is done. The user can arbitrarily adjust the position of the edge of the mask signal by adjusting at least one of the filter characteristic of the first low-pass filter 81 and the first threshold value of the binarization unit 82 from the operation unit 60. Since the slope can be shortened by setting the first threshold value low, the number of taps of the first low-pass filter 81 can be reduced, and the first low-pass filter 81 can be simplified.

図17に戻る。エッジの位置が移動されたマスク信号は第2ローパスフィルタ83に入力される。第2ローパスフィルタ83は、エッジの位置が移動されたマスク信号にローパスフィルタをかける(S83)。これにより、再びエッジ領域に傾斜が付加されたぼかしマスクが生成される。   Returning to FIG. The mask signal whose edge position has been moved is input to the second low-pass filter 83. The second low-pass filter 83 applies a low-pass filter to the mask signal whose edge position has been moved (S83). As a result, a blur mask in which an inclination is added to the edge region again is generated.

次にクリッピング部84は、第2ローパスフィルタ83により生成されたエッジ領域に傾斜を持つマスク信号の値と第2閾値を比較して、当該マスク信号の値が第2閾値以下のときマスク信号の値を0に設定する(S84)。即ちエッジ領域において白側の傾斜は残し、黒側の傾斜は急峻に落とす。これにより第2閾値より大きい領域では白からグレーに変化する傾斜がつき、第2閾値以下の領域では黒のマスクを生成できる。このクリッピング処理により、マスク内のぼかしをかけた領域を制限し、マスクのエッジ領域が意図した大きさより、大きくなることを抑制できる。   Next, the clipping unit 84 compares the value of the mask signal having an inclination in the edge region generated by the second low-pass filter 83 with the second threshold, and when the value of the mask signal is equal to or smaller than the second threshold, The value is set to 0 (S84). That is, in the edge region, the white side slope is left and the black side slope is sharply dropped. As a result, a slope that changes from white to gray is provided in an area greater than the second threshold, and a black mask can be generated in an area that is less than or equal to the second threshold. By this clipping process, it is possible to limit the blurred area in the mask and prevent the edge area of the mask from becoming larger than intended.

図17では、ぼかし処理を水平方向にかける例を示しているが、二次元ローパスフィルタを用いることにより、ぼかし処理を水平方向と垂直方向の両方にかけることもできる。その際、水平方向と垂直方向で係数が異なるフィルタを用いてもよい。その場合、水平方向と垂直方向とで個別にマスク信号のエッジの位置、傾斜の度合い、ぼかし幅を調整できる。   Although FIG. 17 shows an example in which the blurring process is performed in the horizontal direction, the blurring process can be performed in both the horizontal direction and the vertical direction by using a two-dimensional low-pass filter. At that time, filters having different coefficients in the horizontal direction and the vertical direction may be used. In that case, the position of the edge of the mask signal, the degree of inclination, and the blur width can be individually adjusted in the horizontal direction and the vertical direction.

また水平方向と垂直方向で係数が異なり、かつ斜め方向は縦横の係数の中間値を持つ楕円状の二次元ローパスフィルタを用いてもよい。楕円状の二次元ローパスフィルタを用いれば、水平方向と垂直方向とで個別にマスク信号のエッジの位置および傾斜の度合い、ぼかし幅を調整でき、その調整を斜め方向に作用させることもできる。例えば、正方形のオリジナルマスクを、縦横が任意の長さで、かつ角が丸くなった長方形に加工することができる。また正方形のオリジナルマスクを、縦横の傾斜の度合いが個別かつ任意で、角においては縦横の傾斜の度合いと連続性を持ちつつなだらかに変化する傾斜を持つ全方位に任意のなだらかな傾斜がついた長方形に加工することもできる。   Alternatively, an elliptical two-dimensional low-pass filter having different coefficients in the horizontal direction and the vertical direction and having an intermediate value between the vertical and horizontal coefficients in the oblique direction may be used. If an elliptical two-dimensional low-pass filter is used, the edge position of the mask signal, the degree of inclination, and the blur width can be individually adjusted in the horizontal direction and the vertical direction, and the adjustment can be applied in an oblique direction. For example, a square original mask can be processed into a rectangular shape with arbitrary length and width and rounded corners. In addition, the square original mask has an arbitrary gentle slope in all directions, with the degree of vertical and horizontal inclination being individual and arbitrary, and with the angle gradually changing with the degree of horizontal and vertical inclination and continuity. It can also be processed into a rectangle.

図19は、第1ローパスフィルタ81により付加される傾斜と、第2ローパスフィルタ83により付加される傾斜を比較するための図である。第1ローパスフィルタ81により付加される傾斜(符号t参照)は、二値化境界位置を調整するために使用される仮の傾斜であり、二値化後には消える。したがって傾斜は一定の角度で線形に変化する傾斜でよい。第2ローパスフィルタ83により付加される傾斜(符号t参照)は、残る傾斜であるため、ユーザがその傾斜の形状も調整するとよい。例えば傾斜の上部では上が凸の、下部では下が凸の形状に調整してもよい。この形状に調整すると、クリッピングされる幅を大きくできる。   FIG. 19 is a diagram for comparing the slope added by the first low-pass filter 81 with the slope added by the second low-pass filter 83. The slope added by the first low-pass filter 81 (see symbol t) is a temporary slope used to adjust the binarization boundary position and disappears after binarization. Therefore, the inclination may be an inclination that changes linearly at a constant angle. Since the inclination (see symbol t) added by the second low-pass filter 83 is the remaining inclination, the user may adjust the shape of the inclination. For example, the upper part of the slope may be adjusted to be convex, and the lower part may be adjusted to be convex. By adjusting to this shape, the clipped width can be increased.

このように、第1ローパスフィルタ81、第2ローパスフィルタ83のタップ数や係数などのフィルタ特性、二値化部82の第1閾値、クリッピング部84の第2閾値を調整することにより、マスク信号のエッジの位置、マスクの有効領域の面積、ぼかし幅をそれぞれ自由に調整できる。また全てのレイヤのマスク信号に同一のぼかし処理をかける必要はなく、各レイヤのマスク信号ごとに個別にぼかし処理をかけてもよい。   In this way, the mask signal is adjusted by adjusting the filter characteristics such as the number of taps and coefficients of the first low-pass filter 81 and the second low-pass filter 83, the first threshold value of the binarization unit 82, and the second threshold value of the clipping unit 84. The edge position, the effective area of the mask, and the blur width can be freely adjusted. Further, it is not necessary to apply the same blurring process to the mask signals of all layers, and the blurring process may be performed individually for each mask signal of each layer.

以上のぼかし処理により、マスク信号のエッジを任意の位置に移動させ、マスクの有効領域の面積を変化させることができる。またエッジ領域に任意の傾きの傾斜をつけることができる。さらにマスクのぼかし領域を任意に制限することができる。   By the blurring process described above, the edge of the mask signal can be moved to an arbitrary position, and the area of the effective area of the mask can be changed. In addition, the edge region can be given an arbitrary inclination. Further, the blur area of the mask can be arbitrarily limited.

ぼかしマスクは、後段のデプスマップの合成で使用される。デプスマップ加工部20は、ぼかしマスクのレベルに応じて、複数のレイヤデプスマップをアルファブレンドする。その際、ぼかしマスクのレベルに応じて、各レイヤデプスマップの合成比率が決定される。   The blur mask is used in the synthesis of the depth map in the subsequent stage. The depth map processing unit 20 alpha blends a plurality of layer depth maps according to the level of the blur mask. At that time, the composition ratio of each layer depth map is determined according to the level of the blur mask.

以上説明したように実施例1によれば、レイヤデプスマップを合成する際、ぼかしマスクを使用することにより、合成デプスマップのオブジェクト境界部分に連続性を持たせることができる。即ちオブジェクト境界部分に大きな段差がある場合、その段差をなだらかにすることができる。したがって、この合成デプスマップをもとに生成される別視点の画像のオブジェクト境界部分を自然な境界に仕上げることができる。   As described above, according to the first embodiment, when layer depth maps are combined, by using a blur mask, it is possible to provide continuity to the object boundary portion of the combined depth map. That is, when there is a large step at the object boundary, the step can be made gentle. Therefore, the object boundary portion of the image of another viewpoint generated based on this composite depth map can be finished to a natural boundary.

また境界があいまいなオブジェクトに対して、不正確な輪郭で作成されたマスクを用いた場合でも、その輪郭の位置を調整することにより、生成される3D画像のオブジェクトの輪郭が不自然な輪郭となることを回避できる。   In addition, even when a mask created with an inaccurate contour is used for an object with an ambiguous boundary, by adjusting the position of the contour, the contour of the object of the generated 3D image becomes an unnatural contour. Can be avoided.

以下、ぼかしマスクを用いずにオブジェクト境界の不自然を目立ちにくくする方法について説明する。   Hereinafter, a method for making the unnaturalness of the object boundary inconspicuous without using a blur mask will be described.

図20は、本発明の実施例1の変形例に係る画像編集システム500の全体処理プロセスを説明するための図である。図20の処理プロセスは図4の処理プロセスに、ローパスフィルタ処理が追加された構成である。以下、相違点について説明する。なお図14の処理プロセスと異なりマスクぼかし処理が追加されない。   FIG. 20 is a diagram for explaining the overall processing process of the image editing system 500 according to the modification of the first embodiment of the present invention. The processing process of FIG. 20 has a configuration in which low-pass filter processing is added to the processing process of FIG. Hereinafter, differences will be described. Unlike the processing process of FIG. 14, the mask blurring process is not added.

デプスマップ加工部20は、合成デプスマップにローパスフィルタをかける(S85)。これにより、デプスマップ内のオブジェクト境界におけるデプス値の変化がなだらかになる。ただし、ぼかしマスクを使用する方法と比較し、そのデプス値の変化をオブジェクト毎に任意に調整することはできない。また、ぼかしマスクを使用する方法では、オブジェクト境界におけるデプス値の変化だけをなだらかに加工できる。これに対して、合成デプスマップにローパスフィルタをかける方法では、オブジェクト境界だけでなくオブジェクト内部の平坦部分についても、細かなディテール(凹凸)が失われる。   The depth map processing unit 20 applies a low-pass filter to the combined depth map (S85). Thereby, the change of the depth value at the object boundary in the depth map becomes gentle. However, the change in the depth value cannot be arbitrarily adjusted for each object as compared with the method using the blur mask. Further, in the method using the blur mask, only the change of the depth value at the object boundary can be smoothly processed. On the other hand, in the method of applying a low-pass filter to the composite depth map, fine details (unevenness) are lost not only on the object boundary but also on the flat part inside the object.

ぼかしマスクを使用する方法と、合成デプスマップにローパスフィルタをかける処理は、各々独立で使用することもできるし、両方の処理を同時に使用することもできる。また、各々の処理の順番を入れ替えることもできる。レイヤ合成する前のデプスマップにローパスフィルタをかけて、ぼかし処理されたレイヤデプスマップを生成し、それらレイヤデプスマップをぼかしマスクを用いて合成し、さらに合成デプスマップにローパスフィルタをかけてもよい。   The method of using the blur mask and the process of applying the low pass filter to the composite depth map can be used independently of each other, or both processes can be used simultaneously. Moreover, the order of each process can also be replaced. It is also possible to apply a low-pass filter to the depth map before layer synthesis to generate a blurred layer depth map, synthesize the layer depth map using a blur mask, and then apply a low-pass filter to the composite depth map. .

次に実施例2について説明する。実施例1ではオブジェクト境界をぼかすことにより、オブジェクト境界の不自然を目立ちにくくする方法を説明した。実施例2ではオブジェクト境界における不自然な箇所の画素をユーザの手作業によるペイント処理で修正する方法を説明する。このペイント処理は、以下の3つのプロセスからなる。まず不自然な箇所の画素を特定する。次に不自然な箇所の画素を消去する。最後に消去した箇所の画素をペイントにより再構成する。   Next, Example 2 will be described. In the first embodiment, the method of making the object boundary unnatural is not noticeable by blurring the object boundary. In the second embodiment, a method of correcting a pixel at an unnatural place on an object boundary by a user's manual painting process will be described. This painting process consists of the following three processes. First, an unnatural pixel is specified. Next, the unnatural pixel is erased. The pixel at the last erased portion is reconstructed by painting.

上記プロセスにおいて、画素シフトと同時に画素補間する場合、不自然な箇所の特定が困難である。また画素補間しない場合でも、シフトされた画素が欠落画素の周辺にまばらに存在する状態が発生し得る。その場合、まばらに存在するシフトされた画素を消去してから、あらためてペイントによる画素の再描画を行う必要がある。これらは、ペイント作業の工数を増やす要因となっている。   In the above process, when pixel interpolation is performed simultaneously with pixel shift, it is difficult to identify an unnatural part. Even when pixel interpolation is not performed, a state in which shifted pixels exist sparsely around missing pixels may occur. In that case, it is necessary to erase the sparsely shifted pixels and then redraw the pixels by painting again. These are factors that increase the man-hours for painting work.

図21は、本発明の実施例2に係る画像編集システム500によるフィルオフ機能を説明するための図である。フィルオフ機能は、以下の3つの機能を含む。広い欠落画素領域が生じるのは画素シフト量が大きいときである。第1機能は、画素シフト量が大きいときには画素補間を停止することにより意図的に欠落画素を残す機能である。第2機能は欠落画素がまばらでなくカタマリで生じる状態を作り出す機能である。具体的には、注目画素だけでなくその周辺画素についても画素シフト量を監視し、周辺画素を含めたいずれかの画素で、画素シフト量が大きいときに画素補間を停止する。第3機能は、発生した欠落画素を補間する代わりに特定色の画素を埋めることにより、欠落画素領域をユーザに認識しやすくする。   FIG. 21 is a diagram for explaining the fill-off function by the image editing system 500 according to the second embodiment of the present invention. The fill-off function includes the following three functions. A wide missing pixel region occurs when the pixel shift amount is large. The first function is a function that intentionally leaves missing pixels by stopping pixel interpolation when the pixel shift amount is large. The second function is a function for creating a state in which missing pixels are not sparse but occur in a catalyzed manner. Specifically, the pixel shift amount is monitored not only for the pixel of interest but also for its peripheral pixels, and pixel interpolation is stopped when the pixel shift amount is large for any pixel including the peripheral pixels. The third function makes it easier for the user to recognize the missing pixel region by filling in pixels of a specific color instead of interpolating the generated missing pixels.

図21において図11及び図12と同様に、画素シフトにより発生する欠落画素領域の面積は、図10のその面積より大きくなっている(符号v参照)。図21では欠落画素をカタマリで発生させ、欠落画素領域を特定色の画素で埋めている(符号w参照)。ユーザはペイント作業により、その特定色の欠落画素領域を描画して修正する(符号x参照)。   In FIG. 21, as in FIGS. 11 and 12, the area of the missing pixel region generated by the pixel shift is larger than that of FIG. 10 (see symbol v). In FIG. 21, missing pixels are generated in a catalyzed manner, and the missing pixel region is filled with pixels of a specific color (see reference symbol w). The user draws and corrects the missing pixel area of the specific color by the painting work (see symbol x).

図22は、本発明の実施例2に係る3D画像生成部30の構成を示す図である。実施例2に係る3D画像生成部30は、画素シフト部31、監視領域設定部32、画素補間部33を含む。これらの構成もハードウエアのみ、ソフトウエアのみ、またはそれらの組合せによっていろいろな形で実現できる。   FIG. 22 is a diagram illustrating a configuration of the 3D image generation unit 30 according to the second embodiment of the present invention. The 3D image generation unit 30 according to the second embodiment includes a pixel shift unit 31, a monitoring region setting unit 32, and a pixel interpolation unit 33. These configurations can also be realized in various forms by hardware only, software only, or a combination thereof.

画素シフト部31は、デプスマップ加工部20により加工されたデプスマップをもとに2D入力画像を画素シフトする。画素補間部33は、画素シフト部31による画素シフトにより発生する欠落画素を補間する。基本的に欠落画素をその周辺画素で補間する。画素補間部33は、欠落画素を補間する際、隣接画素とのデプス値の変化量(以下、デプスの微分値という)が設定値より大きい画素の補間をスキップする。当該設定値はユーザが操作部60から調整可能であり、当該設定値を調整することにより補間スキップ処理の感度を調整できる。   The pixel shift unit 31 pixel-shifts the 2D input image based on the depth map processed by the depth map processing unit 20. The pixel interpolation unit 33 interpolates missing pixels that are generated by the pixel shift by the pixel shift unit 31. Basically, the missing pixel is interpolated with the surrounding pixels. When interpolating missing pixels, the pixel interpolation unit 33 skips interpolation of pixels whose depth value change amount with an adjacent pixel (hereinafter referred to as a depth differential value) is larger than a set value. The set value can be adjusted by the user from the operation unit 60, and the sensitivity of the interpolation skip process can be adjusted by adjusting the set value.

画素補間部33は、対象画素およびその周辺画素のうち、デプスの微分値が当該設定値より大きい画素が少なくとも一つ存在する場合、対象画素を欠落させる。この欠落された画素も補間をスキップさせる。監視領域設定部32は対象画素およびその周辺画素で規定される監視領域を設定する。当該監視領域の面積および/または形状は、固定であってもよいし可変であってもよい。   The pixel interpolation unit 33 deletes the target pixel when at least one pixel having a depth differential value larger than the set value is present among the target pixel and its peripheral pixels. This missing pixel is also skipped for interpolation. The monitoring area setting unit 32 sets a monitoring area defined by the target pixel and its surrounding pixels. The area and / or shape of the monitoring area may be fixed or variable.

監視領域設定部32は、外部設定されるパラメータにしたがい当該監視領域を設定できる。当該パラメータはユーザが操作部60から調整可能である。例えば、対象画素を基準として上方向画素数、下方向画素数、左方向画素数、右方向画素数、膨張率の5つのパラメータにより規定される監視領域を設定できる。したがって対象画素を中心として左右非対称な監視領域を設定することもできる。例えば、監視領域設定部32は、画素シフト部31により2D入力画像が左にシフトされる場合は対象画素の左側より右側の面積が広い監視領域を設定し、2D入力画像が右にシフトされる場合は対象画素の右側より左側の面積が広い監視領域を設定することもできる。   The monitoring area setting unit 32 can set the monitoring area according to a parameter set externally. The parameter can be adjusted by the user from the operation unit 60. For example, it is possible to set a monitoring region defined by five parameters of the number of upward pixels, the number of downward pixels, the number of leftward pixels, the number of rightward pixels, and the expansion rate with reference to the target pixel. Therefore, it is possible to set a monitoring region that is asymmetrical about the target pixel. For example, when the 2D input image is shifted to the left by the pixel shift unit 31, the monitoring area setting unit 32 sets a monitoring area having a larger area on the right side than the left side of the target pixel, and the 2D input image is shifted to the right. In this case, it is possible to set a monitoring area having a larger area on the left side than the right side of the target pixel.

画素補間部33は、欠落画素に周辺画素を補間する代わりに、特定色の画素を埋め込んでもよい。例えば赤などの目立ちやすい色の画素を埋め込んでもよい。   The pixel interpolating unit 33 may embed a pixel of a specific color instead of interpolating the peripheral pixel to the missing pixel. For example, a pixel with a conspicuous color such as red may be embedded.

以下、具体例を挙げながら上述の3つの機能についてより詳細に説明する。まず第1機能について説明する。上述したように画素シフト量が大きいときは、画素シフト量の基準となるデプス値の変化量も大きくなる。デプスの微分値が設定値より大きい場合には、画素補間によるオブジェクト境界の不自然が顕著になると判断して画素補間を停止する。デプスの微分値は、対象画素のデプス値から、水平方向に1画素ずれた画素のデプス値を減算することにより求められる。   Hereinafter, the above three functions will be described in more detail with specific examples. First, the first function will be described. As described above, when the pixel shift amount is large, the amount of change in the depth value that serves as a reference for the pixel shift amount also increases. When the depth differential value is larger than the set value, it is determined that the unnaturalness of the object boundary due to pixel interpolation becomes significant, and the pixel interpolation is stopped. The differential value of the depth is obtained by subtracting the depth value of the pixel shifted by one pixel in the horizontal direction from the depth value of the target pixel.

入力画像を左に画素シフトして別の画像を生成する場合、オブジェクト境界の不自然はシフトされた画素の右側で発生する。よってこの場合、対象画素のデプスの変化を右側だけで監視して対象画素の左側に影響を与えないようにするとよい。同様に入力画像を右に画素シフトして別の画像を生成する場合、対象画素のデプスの変化を左側だけで監視して対象画素の右側に影響を与えないようにするとよい。   When the input image is shifted leftward to generate another image, object boundary unnaturalness occurs on the right side of the shifted pixel. Therefore, in this case, it is preferable to monitor the change in the depth of the target pixel only on the right side so as not to affect the left side of the target pixel. Similarly, when generating another image by shifting the input image to the right, it is preferable to monitor the change in the depth of the target pixel only on the left side so as not to affect the right side of the target pixel.

次に第2機能について説明する。欠落画素をカタマリで発生させるために、注目画素だけでなくその周辺画素についても、画素シフト量に対応するデプスの微分値を監視する。周辺の監視領域が広いほど、発生する欠落画素のカタマリの面積が大きくなるが、あまり広すぎると、正常にシフトされ修正の必要のない画素まで欠落させてしまうことになる。よって適切な監視領域の設定が必要となる。   Next, the second function will be described. In order to generate missing pixels in a catamaly, the differential value of the depth corresponding to the pixel shift amount is monitored not only for the pixel of interest but also for the surrounding pixels. The larger the peripheral monitoring area, the larger the area of the missing pixel catalyzer generated. However, if it is too wide, pixels that are normally shifted and need not be corrected will be lost. Therefore, it is necessary to set an appropriate monitoring area.

図23(a)−(e)は、監視領域の複数の例を示す。図23(a)は十字型、図23(b)は手裏剣型、図23(c)はダイヤ型、図23(d)は八角形型、図23(e)は長方形型の監視領域である。これらの形状は膨張率により設定可能である。十字型は膨張率を0%、手裏剣型は膨張率を25%、ダイヤ型は膨張率を50%、八角形型は膨張率を75%、長方形型は膨張率を100%に設定することにより生成される。   FIGS. 23A to 23E show a plurality of examples of monitoring areas. 23A is a cross-shaped area, FIG. 23B is a shuriken type, FIG. 23C is a diamond type, FIG. 23D is an octagonal type, and FIG. 23E is a rectangular type monitoring area. . These shapes can be set by the expansion coefficient. By setting the expansion rate to 0% for the cross type, 25% for the shuriken type, 50% for the diamond type, 75% for the octagonal type, and 100% for the rectangular type Generated.

この例では膨張率は、十字線とその十字線を内接する長方形との関係により定義される。具体的には当該長方形の中心と頂点とを結ぶ線分の長さを100%とした場合における、その線分の伸縮率で膨張率は定義される。即ち監視領域は、十字線の4つの端点と、それぞれ伸縮された線分の4つの端点とを結んで形成される。膨張率が0%のときは当該線分は存在しなくなるため十字線の4つの端点を結んで形成される。これら十字型から長方形型まで形状の異なる監視領域を自由に設定できることにより、ユーザの意図に沿った形状の、欠落画素のカタマリを生成できる。   In this example, the expansion rate is defined by the relationship between the crosshair and the rectangle inscribed in the crosshair. Specifically, the expansion rate is defined by the expansion / contraction rate of the line segment when the length of the line segment connecting the center and the vertex of the rectangle is 100%. That is, the monitoring area is formed by connecting the four end points of the crosshairs and the four end points of the stretched line segments. When the expansion rate is 0%, the line segment does not exist, and is formed by connecting the four end points of the crosshair. Since these monitoring regions having different shapes from a cross shape to a rectangular shape can be freely set, it is possible to generate a catalog of missing pixels having a shape in accordance with the user's intention.

以下、5つの設定パラメータを用いて監視領域を設定する方法を具体例を挙げながら説明する。使用する5つの設定パラメータは、上方向の画素数、下方向の画素数、左方向の画素数、右方向の画素数、膨張率である。膨張率は図23(a)−(e)で説明した膨張率である。   Hereinafter, a method for setting a monitoring area using five setting parameters will be described with a specific example. The five setting parameters to be used are the number of pixels in the upward direction, the number of pixels in the downward direction, the number of pixels in the left direction, the number of pixels in the right direction, and the expansion rate. The expansion coefficient is the expansion coefficient described with reference to FIGS.

図24は、5つの設定パラメータにより生成される監視領域の具体例を説明するための図である(その1)。この具体例では上方向の画素数Tが2、下方向の画素数Bが6、左方向の画素数Lが4、右方向の画素数Rが6に設定される。   FIG. 24 is a diagram for explaining a specific example of the monitoring area generated by the five setting parameters (part 1). In this specific example, the upper pixel number T is set to 2, the lower pixel number B is set to 6, the left pixel number L is set to 4, and the right pixel number R is set to 6.

図25は、5つの設定パラメータにより生成される監視領域の具体例を説明するための図である(その2)。図25のグラフには図24の設定値を前提に、膨張率Pが25%、膨張率Pが50%、膨張率Pが75%、膨張率Pが100%の場合の監視領域が描かれている。このように上記5つの設定パラメータをそれぞれ独立に自由に設定することにより、上下左右非対称な形状の監視領域を任意に設定できる。   FIG. 25 is a diagram for explaining a specific example of the monitoring area generated by the five setting parameters (part 2). In the graph of FIG. 25, on the assumption of the setting values of FIG. 24, a monitoring region is drawn when the expansion rate P is 25%, the expansion rate P is 50%, the expansion rate P is 75%, and the expansion rate P is 100%. ing. As described above, by freely setting the above five setting parameters independently, it is possible to arbitrarily set a monitoring region having an asymmetrical shape in the vertical and horizontal directions.

図26は、デプス信号の微分値の監視およびフィルオフを説明するための図である(右眼画像)。右眼画像は、入力画像を左に画素シフトして生成される。画素シフト部31は、デプス信号をもとに入力画像を画素シフトする。図26では画素f−kが左に3画素分、シフトされる。そのシフトの結果、画素f−kの右側に3画素の欠落画素領域が発生する。   FIG. 26 is a diagram for explaining monitoring of the differential value of the depth signal and fill-off (right eye image). The right eye image is generated by pixel shifting the input image to the left. The pixel shift unit 31 pixel-shifts the input image based on the depth signal. In FIG. 26, the pixel f-k is shifted three pixels to the left. As a result of the shift, a missing pixel region of 3 pixels is generated on the right side of the pixel f-k.

画素補間部33は、フィルオフするか否かを判定するためにデプス信号の微分値を生成する。左に画素シフトする場合、注目画素のデプス値と左隣画素のデプス値の差分を、デプス信号の微分値(X(n)-X(n-1))とする。欠落画素はシフトされた画素の右側に発生するため、デプス信号の微分値の負側を抽出することにより、欠落画素の位置を特定できる。負側が抽出されたデプス信号の微分値が設定値を超える場合、画素補間部33はその画素をフィルオフする。フィルオフされる画素は欠落画素領域の右端の画素だけであるため、その左側の2画素は原則として、フィルオフされない。   The pixel interpolation unit 33 generates a differential value of the depth signal in order to determine whether or not to fill off. When shifting the pixel to the left, the difference between the depth value of the pixel of interest and the depth value of the left adjacent pixel is taken as the differential value of the depth signal (X (n) -X (n-1)). Since the missing pixel occurs on the right side of the shifted pixel, the position of the missing pixel can be specified by extracting the negative side of the differential value of the depth signal. When the differential value of the depth signal from which the negative side is extracted exceeds the set value, the pixel interpolation unit 33 fills off the pixel. Since only the pixel at the right end of the missing pixel region is filled off, the two pixels on the left side are not filled off in principle.

図26では、デプス信号の微分値の監視領域を左に3画素、右に0画素、拡張している。したがって画素補間部33は対象画素とその左隣の2画素の合計3画素の、デプス信号の微分値を監視することになる。その3画素のいずれかのデプス信号の微分値が設定値を超えた場合、画素補間部33は対象画素をフィルオフする。これにより図26の一番下に示すような適切なフィルオフ領域を得ることができる。よって欠落画素領域について適切にフィルオフすることができる。また、監視領域の右側の拡張は0画素であるため、フィルオフする必要がない領域はフィルオフされない設定となっている。   In FIG. 26, the monitoring region of the differential value of the depth signal is expanded by 3 pixels on the left and 0 pixel on the right. Therefore, the pixel interpolating unit 33 monitors the differential value of the depth signal of a total of three pixels including the target pixel and the two pixels adjacent to the left side. When the differential value of the depth signal of any of the three pixels exceeds the set value, the pixel interpolation unit 33 fills off the target pixel. As a result, an appropriate fill-off region as shown at the bottom of FIG. 26 can be obtained. Therefore, it is possible to appropriately fill off the missing pixel region. Further, since the extension on the right side of the monitoring area is 0 pixels, the area which does not need to be filled off is set to be not filled off.

図27は、デプス信号の微分値の監視およびフィルオフを説明するための図である(左眼画像)。左眼画像は、入力画像を右に画素シフトして生成される。画素シフト部31は、デプス信号をもとに入力画像を画素シフトする。図27では画素f−hが右に3画素分、シフトされる。そのシフトの結果、画素f−hの左側に3画素の欠落画素領域が発生する。   FIG. 27 is a diagram for explaining monitoring of the differential value of the depth signal and fill-off (left eye image). The left eye image is generated by pixel shifting the input image to the right. The pixel shift unit 31 pixel-shifts the input image based on the depth signal. In FIG. 27, the pixel fh is shifted to the right by 3 pixels. As a result of the shift, a missing pixel region of 3 pixels is generated on the left side of the pixel f-h.

画素補間部33は、フィルオフするか否かを判定するためにデプス信号の微分値を生成する。右に画素シフトする場合、注目画素のデプス値と右隣画素のデプス値の差分を、デプス信号の微分値(X(n+1)-X(n))とする。欠落画素はシフトされた画素の左側に発生するため、デプス信号の微分値の正側を抽出することにより、欠落画素の位置を特定できる。正側が抽出されたデプス信号の微分値が設定値を超える場合、画素補間部33はその画素をフィルオフする。フィルオフされる画素は欠落画素領域の左端の画素だけであるため、その右側の2画素分は原則として、フィルオフされない。   The pixel interpolation unit 33 generates a differential value of the depth signal in order to determine whether or not to fill off. When the pixel is shifted to the right, the difference between the depth value of the pixel of interest and the depth value of the right adjacent pixel is set to the differential value (X (n + 1) −X (n)) of the depth signal. Since the missing pixel occurs on the left side of the shifted pixel, the position of the missing pixel can be specified by extracting the positive side of the differential value of the depth signal. When the differential value of the depth signal from which the positive side is extracted exceeds the set value, the pixel interpolation unit 33 fills off the pixel. Since only the pixel at the left end of the missing pixel region is filled off, the two pixels on the right side are not filled off in principle.

図27では、デプス信号の微分値の監視領域を右に3画素、左に0画素、拡張している。したがって画素補間部33は対象画素とその右隣の2画素の合計3画素の、デプス信号の微分値を監視することになる。その3画素のいずれかのデプス信号の微分値が設定値を超えた場合、画素補間部33は対象画素をフィルオフする。これにより、図27の一番下に示すような適切なフィルオフ領域を得ることができる。よって欠落画素領域について適切にフィルオフすることができる。また、監視領域の左側の拡張は0画素であるため、フィルオフする必要がない領域はフィルオフされない設定となっている。   In FIG. 27, the monitoring area of the differential value of the depth signal is expanded by 3 pixels on the right and 0 pixel on the left. Therefore, the pixel interpolating unit 33 monitors the differential value of the depth signal of a total of three pixels, that is, the target pixel and the two pixels adjacent to the right. When the differential value of the depth signal of any of the three pixels exceeds the set value, the pixel interpolation unit 33 fills off the target pixel. Thereby, an appropriate fill-off region as shown at the bottom of FIG. 27 can be obtained. Therefore, it is possible to appropriately fill off the missing pixel region. Further, since the left extension of the monitoring area is 0 pixels, the area that does not need to be filled off is set not to be filled off.

このように、監視領域を左右で非対称に設定する機能を有することにより、画素シフトによって生じる欠落画素領域を、画素シフトの特性と方向に従って適切に特定することができる。そして特定した欠落画素領域のフィルオフを適切に行うことができる。   Thus, by having the function of setting the monitoring area asymmetrically on the left and right, the missing pixel area caused by the pixel shift can be appropriately specified according to the characteristics and direction of the pixel shift. Then, the specified missing pixel region can be appropriately filled off.

次に第3機能について説明する。画素補間部33は、フィルオフにより補間されない欠落画素に対して周辺画素と異なる、赤色等の画素を書き込む。これにより、欠落画素の位置を特定しやすくなる。書き込む画素は赤色に限らず他の色でもよい。例えば原画に存在する色と異なる任意の色の画素を書き込むことにより、欠落画素の位置を認識しやすくさせることができる。また、書き込む画素の色を黒や白にすれば、ペイント作業時に画素を消す作業を省略させることができる。書き込む画素の画素値を任意に変更可能に設計することにより、目的に応じて書き込む画素の色を任意に選択できる。   Next, the third function will be described. The pixel interpolation unit 33 writes a pixel such as red, which is different from the surrounding pixels, to the missing pixel that is not interpolated due to fill-off. This makes it easy to specify the position of the missing pixel. The pixel to be written is not limited to red, but may be another color. For example, by writing a pixel of an arbitrary color different from the color existing in the original image, the position of the missing pixel can be easily recognized. Also, if the color of the pixel to be written is black or white, the operation of erasing the pixel at the time of painting can be omitted. By designing the pixel value of the pixel to be written to be arbitrarily changeable, the color of the pixel to be written can be arbitrarily selected according to the purpose.

以上説明したように実施例2によれば、画素シフトにより発生する欠落画素に対する画素補間をスキップする機能を備えたことにより、画素補間によりオブジェクト境界が不自然になることを回避できる。また対象画素のデプスの微分値だけでなく、対象画素の周辺画素のデプスの微分値も監視することにより、欠落画素がまばらに発生することを回避できる。ユーザがペイント作業する際、欠落画素周辺の欠落していない画素を消去する作業が必要となるが、欠落画素をブロックで発生させることにより、ペイント作業を簡略化させることができる。また画素補間しない欠落画素に特定色の画素を埋め込むことにより、ペイント作業により編集されるべき欠落画素領域をユーザに認識しやすくできる。   As described above, according to the second embodiment, by providing a function of skipping pixel interpolation for missing pixels caused by pixel shift, it is possible to avoid unnatural object boundaries due to pixel interpolation. Further, by monitoring not only the depth differential value of the target pixel but also the depth differential value of the peripheral pixels of the target pixel, it is possible to avoid occurrence of missing pixels sparsely. When the user performs a painting operation, it is necessary to delete pixels that are not missing around the missing pixels. However, the painting operation can be simplified by generating missing pixels in blocks. In addition, by embedding a pixel of a specific color in a missing pixel that is not subjected to pixel interpolation, it is possible for the user to easily recognize a missing pixel region to be edited by a painting operation.

以上説明した実施例1もしくは実施例2に係る画像編集システム500を単独で使用することにより、または実施例1と実施例2の組み合わせに係る画像編集システム500を使用することにより、2D画像から3D画像を生成する際に、オブジェクト境界部分の画像品質を向上させることができる。   By using the image editing system 500 according to the first embodiment or the second embodiment described above alone, or by using the image editing system 500 according to the combination of the first embodiment and the second embodiment, a 3D image can be converted into a 3D image. When generating an image, the image quality of the object boundary portion can be improved.

次に実施例3について説明する。実施例1では、デプスマップを加工する際の基準となるマスクに対して以下の処理を施した。マスクの有効エリアの面積を可変する。マスクのエッジ部分に傾斜をつける(具体的には、0または1ではなく、0.5などの中間値を作る)。マスクにつけた傾斜(中間値)の値に応じて、デプスマップをαブレンド合成する。合成されたデプスマップにローパスフィルタをかけて、急峻な変化を抑圧する。   Next, Example 3 will be described. In Example 1, the following processing was performed on a mask serving as a reference when processing a depth map. The area of the effective area of the mask is varied. The mask edge is inclined (specifically, an intermediate value such as 0.5 is created instead of 0 or 1). The depth map is subjected to α blend synthesis according to the value of the inclination (intermediate value) attached to the mask. A low-pass filter is applied to the synthesized depth map to suppress steep changes.

実施例1では、これらの処理により、合成デプスマップのオブジェクトの境界部分に連続性を持たせ、この合成デプスマップを基に生成された画像(3D画像)のオブジェクトの境界部分の不自然を目立たなくすることを示した。   In the first embodiment, by these processes, the boundary portion of the object of the synthesized depth map is made continuous, and the unnaturalness of the boundary portion of the object of the image (3D image) generated based on the synthesized depth map is conspicuous. Shown to lose.

この実施例1に係る方法では、マスクの有効エリアの面積を可変する、マスクのエッジ部分に傾斜をつける、の各々の処理のためにマスクにフィルタ演算を施す必要がある。つまり上述したように、マスクエッジの加工には以下の2つのフィルタを用いる。マスクのエッジポジションを移動させ、マスクの有効エリアの面積を可変するために用いるフィルタと、マスクに応じたデプスマップのブレンド比率を制御するために、マスクエッジに傾斜を付けるためのフィルタを用いる。   In the method according to the first embodiment, it is necessary to apply a filter operation to the mask for each process of changing the area of the effective area of the mask and inclining the edge portion of the mask. That is, as described above, the following two filters are used for mask edge processing. A filter used to move the edge position of the mask and change the area of the effective area of the mask, and a filter for tilting the mask edge are used to control the blend ratio of the depth map corresponding to the mask.

しかしながら、フィルタ演算は1つの画素に対して、フィルタのタップ数に相当する回数だけ積和演算する必要がある。フィルタのタップ数が多い場合、処理にかかる演算量も増加する。   However, the filter operation needs to perform the product-sum operation for one pixel as many times as the number of taps of the filter. When the number of filter taps is large, the amount of calculation required for processing also increases.

さらに、二次元フィルタを用いて水平と垂直の両方にフィルタ処理する場合、演算量はフィルタの面積に比例して増加する。例えば、フィルタのタップ数がnであったとすると、水平または垂直のどちらか一方にだけ一次元フィルタ処理する場合の積和演算回数はn回である。これに対して、水平と垂直の両方に二次元フィルタ処理する場合、フィルタの形状が円形であると仮定すると積和演算回数はπ/4*n回となる。即ち二次元フィルタ処理の積和演算回数は、フィルタのタップ数nの二乗に比例して増加する。この演算量の多さは処理時間の増大を招く。 Furthermore, when filtering is performed both horizontally and vertically using a two-dimensional filter, the amount of computation increases in proportion to the area of the filter. For example, if the number of taps of the filter is n, the number of product-sum operations when the one-dimensional filter process is performed only in either the horizontal or vertical direction is n. On the other hand, when performing two-dimensional filter processing both horizontally and vertically, assuming that the filter has a circular shape, the number of product-sum operations is π / 4 * n 2 times. That is, the number of product-sum operations in the two-dimensional filter process increases in proportion to the square of the filter tap number n. This large amount of calculation causes an increase in processing time.

実施例3では実施例1と同等の目的を達するためのフィルタ演算を、実施例1の方法よりも少ない演算量で行うことを目的とする。演算量の増加を抑圧し、処理時間を短縮する。   The third embodiment is intended to perform a filter calculation for achieving the same purpose as that of the first embodiment with a smaller calculation amount than the method of the first embodiment. Suppress the increase in calculation amount and shorten the processing time.

実施例3でも合成デプスマップのオブジェクトの境界部分に連続性を持たせ、この合成デプスマップを基に生成された画像(3D画像)のオブジェクトの境界部分の不自然を目立たなくする。そのためにデプスマップを加工する際の基準となるマスクに対して、エッジを移動させたりエッジに傾斜をつけたりする処理を行う。その際、この処理の一部をなすフィルタ演算を実施例1の方法よりも少ない演算量で行うことにより演算量の増加を抑圧し処理時間を短縮する。   Also in the third embodiment, the boundary portion of the object of the composite depth map is made continuous, and the unnaturalness of the boundary portion of the object of the image (3D image) generated based on this composite depth map is made inconspicuous. For this purpose, a process of moving the edge or inclining the edge is performed with respect to a mask serving as a reference when processing the depth map. At this time, the filter calculation which forms a part of this process is performed with a smaller calculation amount than the method of the first embodiment, thereby suppressing an increase in the calculation amount and shortening the processing time.

具体的には当該フィルタ演算の過程において、フィルタ処理する前のマスクの有効エリアまたは無効エリアの一方に対するフィルタ演算処理をスキップする。詳細は後述するが、マスクの有効エリアまたは無効エリアの一方に対するフィルタ演算処理をスキップしても、実施例1の処理と等価の効果を得ることができる。またマスクの全画素に対してフィルタ演算する必要がなくなるため、演算量の増加を抑圧し処理時間を短縮できる。   Specifically, in the process of the filter calculation, the filter calculation process for one of the effective area and the invalid area of the mask before the filter process is skipped. Although details will be described later, the same effect as that of the first embodiment can be obtained by skipping the filter calculation process for one of the effective area and the invalid area of the mask. Further, since it is not necessary to perform a filter operation on all the pixels of the mask, an increase in the amount of calculation can be suppressed and the processing time can be shortened.

図28は、実施例3に係るマスク補正部80の構成例を示す図である。実施例3に係るマスク補正部80は図16のマスク補正部80に第1レベル判定部86及び第2レベル判定部87が追加された構成である。以下、図16のマスク補正部80との相違点について説明する。   FIG. 28 is a diagram illustrating a configuration example of the mask correction unit 80 according to the third embodiment. The mask correction unit 80 according to the third embodiment has a configuration in which a first level determination unit 86 and a second level determination unit 87 are added to the mask correction unit 80 of FIG. Hereinafter, differences from the mask correction unit 80 of FIG. 16 will be described.

第1レベル判定部86は、第1ローパスフィルタ81に入力されるマスク信号のレベルを判定し、その判定結果に応じて、第1ローパスフィルタ81による、マスク信号におけるフィルタ処理の対象エリアを制限する。第2レベル判定部87は、第2ローパスフィルタ83に入力されるマスク信号のレベルを判定し、その判定結果に応じて、第2ローパスフィルタ83による、マスク信号におけるフィルタ処理の対象エリアを制限する。以下、具体的に説明する。   The first level determination unit 86 determines the level of the mask signal input to the first low-pass filter 81, and limits the target area of the filter processing in the mask signal by the first low-pass filter 81 according to the determination result. . The second level determination unit 87 determines the level of the mask signal input to the second low-pass filter 83, and restricts the target area for the filter processing on the mask signal by the second low-pass filter 83 according to the determination result. . This will be specifically described below.

図29は、実施例3に係る第1レベル判定部86による第1ローパスフィルタ81のフィルタ対象エリアの制限処理を説明するためのフローチャートである。第1レベル判定部86は、マスクエッジの移動方向が外側であるか内側であるか特定する(S861)。マスクエッジの位置を外側に移動させるとマスク信号の有効エリアが広がり、内側に移動させるとマスク信号の有効エリアが狭まる。   FIG. 29 is a flowchart for explaining a filter target area restriction process of the first low-pass filter 81 by the first level determination unit 86 according to the third embodiment. The first level determination unit 86 specifies whether the moving direction of the mask edge is the outside or the inside (S861). When the position of the mask edge is moved outward, the effective area of the mask signal is expanded, and when it is moved inward, the effective area of the mask signal is decreased.

外側に移動させる場合にて(S861の外)、第1レベル判定部86は、第1ローパスフィルタ81に入力されるマスク信号の画素レベルを判定する(S862)。当該画素レベルがローレベル(本実施例では無効画素に相当する)の場合(S862のL)、第1ローパスフィルタ81は当該画素をフィルタ処理する(S863)。当該画素レベルがハイレベル(本実施例では有効画素に相当する)の場合(S862のH)、当該画素のフィルタ処理をスキップする。当該マスク信号の全画素の処理が終了するまで(S864のY)、ステップS862、S863の処理を繰り返す(S864のN)。このようにマスク信号の有効エリアを広げる場合、第1レベル判定部86は、マスク信号の有効エリアに対する第1ローパスフィルタ81によるフィルタ処理をスキップさせる。   When moving to the outside (outside S861), the first level determination unit 86 determines the pixel level of the mask signal input to the first low-pass filter 81 (S862). When the pixel level is low (corresponding to an invalid pixel in this embodiment) (L in S862), the first low-pass filter 81 filters the pixel (S863). If the pixel level is a high level (corresponding to an effective pixel in this embodiment) (H in S862), the filtering process for the pixel is skipped. Until the processing of all the pixels of the mask signal is completed (Y in S864), the processing in steps S862 and S863 is repeated (N in S864). When expanding the effective area of the mask signal in this way, the first level determination unit 86 skips the filtering process by the first low-pass filter 81 for the effective area of the mask signal.

マスクエッジの位置を内側に移動させる場合にて(S861の内)、第1レベル判定部86は、第1ローパスフィルタ81に入力されるマスク信号の画素レベルを判定する(S865)。当該画素レベルがハイレベルの場合(S865のH)、第1ローパスフィルタ81は当該画素をフィルタ処理する(S866)。当該画素レベルがローレベルの場合(S865のL)、当該画素のフィルタ処理をスキップする。当該マスク信号の全画素の処理が終了するまで(S867のY)、ステップS865、S866の処理を繰り返す(S867のN)。このようにマスク信号の有効エリアを狭める場合、第1レベル判定部86は、マスク信号の無効エリアに対する第1ローパスフィルタ81によるフィルタ処理をスキップさせる。   When moving the position of the mask edge inward (in S861), the first level determination unit 86 determines the pixel level of the mask signal input to the first low-pass filter 81 (S865). When the pixel level is high (H in S865), the first low-pass filter 81 filters the pixel (S866). When the pixel level is the low level (L in S865), the filter processing of the pixel is skipped. Until the processing of all the pixels of the mask signal is completed (Y in S867), the processing in steps S865 and S866 is repeated (N in S867). When narrowing the effective area of the mask signal in this way, the first level determination unit 86 skips the filter processing by the first low-pass filter 81 for the invalid area of the mask signal.

図30は、実施例3に係る第2レベル判定部87による第2ローパスフィルタ83のフィルタ対象エリアの制限処理を説明するためのフローチャートである。第2レベル判定部87は、二値化部82による二値化によりエッジの位置が移動された第2ローパスフィルタ83に入力されるマスク信号の画素レベルを判定する(S868)。当該画素レベルがハイレベルの場合(S868のH)、第2ローパスフィルタ83は当該画素をフィルタ処理する(S869)。当該画素レベルがローレベルの場合(S868のL)、当該画素のフィルタ処理をスキップする。当該マスク信号の全画素の処理が終了するまで(S870のY)、ステップS868、S869の処理を繰り返す(S870のN)。このようにマスク信号のエッジに傾斜を付ける場合、第2レベル判定部87は、マスク信号の無効エリアに対する第2ローパスフィルタ83によるフィルタ処理をスキップさせる。以下、具体例を挙げながらより詳細に説明する。   FIG. 30 is a flowchart for explaining the filter area restriction process of the second low-pass filter 83 by the second level determination unit 87 according to the third embodiment. The second level determination unit 87 determines the pixel level of the mask signal input to the second low-pass filter 83 whose edge position has been moved by binarization by the binarization unit 82 (S868). If the pixel level is high (H in S868), the second low-pass filter 83 filters the pixel (S869). When the pixel level is a low level (L in S868), the filter processing of the pixel is skipped. Until the processing of all the pixels of the mask signal is completed (Y in S870), the processing in steps S868 and S869 is repeated (N in S870). When the edge of the mask signal is inclined as described above, the second level determination unit 87 skips the filtering process by the second low-pass filter 83 for the invalid area of the mask signal. Hereinafter, it demonstrates in detail, giving a specific example.

まず、マスクのエッジポジションを移動させ、マスクの有効エリアの面積を可変するために用いる第1ローパスフィルタ81の処理について説明する。最初に第1ローパスフィルタ81を用いてマスクエッジ幅を広げる場合について説明する。   First, the processing of the first low-pass filter 81 used to move the edge position of the mask and change the area of the effective area of the mask will be described. First, the case where the mask edge width is widened using the first low-pass filter 81 will be described.

図31(a)−(c)は全画素に対してフィルタ演算してマスクエッジ幅を広げる処理を説明するための図である。図32(a)−(c)はマスクの無効画素に対してのみフィルタ演算してマスクエッジ幅を広げる処理を説明するための図である。図31(a)に示す第1ローパスフィルタ81も図32(a)に示す第1ローパスフィルタ81も同じ形状である。   FIGS. 31A to 31C are diagrams for explaining processing for widening the mask edge width by performing filter operation on all pixels. FIGS. 32A to 32C are views for explaining processing for expanding the mask edge width by performing filter operation only on the invalid pixels of the mask. The first low-pass filter 81 shown in FIG. 31A and the first low-pass filter 81 shown in FIG. 32A have the same shape.

図31(b)は、フィルタリング対象となるマスクM31(点線)の全画素に対して図31(a)に示す第1ローパスフィルタ81を用いてフィルタ演算した結果を示す。図32(b)は、フィルタリング対象となるマスクM34(点線)の無効画素に対して図32(a)に示す第1ローパスフィルタ81を用いてフィルタ演算した結果を示す。フィルタ演算の結果、マスクM32(実線)、マスクM35(実線)ともフィルタ演算した部分だけに傾斜が付き、フィルタ演算しなかった部分はフィルタ演算前のマスク波形のままである。図31(b)ではフィルタリング後のマスクM32(実線)はマスクエッジの内外に傾斜が付されるが、図32(b)ではフィルタリング後のマスクM35(実線)はマスクエッジの外に傾斜が付されるが内には傾斜が付されない。   FIG. 31B shows the result of filtering using the first low-pass filter 81 shown in FIG. 31A for all the pixels of the mask M31 (dotted line) to be filtered. FIG. 32B shows the result of performing a filter operation using the first low-pass filter 81 shown in FIG. 32A on the invalid pixels of the mask M34 (dotted line) to be filtered. As a result of the filter calculation, both the mask M32 (solid line) and the mask M35 (solid line) are inclined only in the part where the filter calculation is performed, and the part which is not subjected to the filter calculation remains the mask waveform before the filter calculation. In FIG. 31B, the filtered mask M32 (solid line) is inclined on the inside and outside of the mask edge, while in FIG. 32B, the filtered mask M35 (solid line) is inclined on the outside of the mask edge. However, there is no slope inside.

図31(c)は、図31(b)に示すフィルタリング後のマスクM32(実線)を第1閾値で二値化した結果を示す。図32(c)は、図32(b)に示すフィルタリング後のマスクM35(実線)を第1閾値で二値化した結果を示す。マスクエッジ幅を広げる場合、第1閾値をゼロ付近に設定する。マスクエッジ幅を広げる場合、二値化前のマスクのエッジの傾斜は第1閾値付近(即ち、マスクのレベルが低い部分)にのみ付されていればよい。マスクのレベルが高い部分の傾斜は、その有無が二値化の結果に影響を与えない。エッジ幅が広がった、図31(c)の二値化後のマスクM33(太実線)と図32(c)の二値化後のマスクM36(太実線)の形状は同じである。   FIG. 31C shows the result of binarizing the filtered mask M32 (solid line) shown in FIG. 31B with the first threshold. FIG. 32C shows the result of binarizing the filtered mask M35 (solid line) shown in FIG. 32B with the first threshold value. When increasing the mask edge width, the first threshold value is set near zero. When the mask edge width is widened, the inclination of the edge of the mask before binarization needs to be given only to the vicinity of the first threshold value (that is, the portion where the mask level is low). The presence or absence of the inclination of the portion having a high mask level does not affect the binarization result. The shape of the binarized mask M33 (thick solid line) in FIG. 31 (c) and the binarized mask M36 (thick solid line) in FIG. 32 (c) with the increased edge width are the same.

しかしながら、図31(a)−(c)のようにマスクの全画素に対してフィルタ演算する場合と比較して、図32(a)−(c)のようにマスクの無効画素に対してのみフィルタ演算する場合の演算量は少ない。その差は、マスクの有効画素エリアが広ければ広いほど顕著になる。マスクの無効画素に対してのみフィルタ演算することにより、マスクエッジ幅を好適に広げつつ、演算量の増加を抑圧し処理時間を短縮できる。   However, as compared with the case where the filter operation is performed on all the pixels of the mask as shown in FIGS. 31A to 31C, only the invalid pixel of the mask as shown in FIGS. 32A to 32C. The amount of computation when performing filter computation is small. The difference becomes more prominent as the effective pixel area of the mask is wider. By performing the filter operation only on the invalid pixels of the mask, it is possible to suppress the increase in the calculation amount and shorten the processing time while suitably increasing the mask edge width.

次に第1ローパスフィルタ81を用いてマスクエッジ幅を狭める場合について説明する。図33(a)−(c)は全画素に対してフィルタ演算してマスクエッジ幅を狭める処理を説明するための図である。図34(a)−(c)はマスクの有効画素に対してのみフィルタ演算してマスクエッジ幅を狭める処理を説明するための図である。図33(a)に示す第1ローパスフィルタ81も図34(a)に示す第1ローパスフィルタ81も同じ形状である。   Next, the case where the mask edge width is narrowed using the first low-pass filter 81 will be described. FIGS. 33A to 33C are views for explaining processing for narrowing the mask edge width by performing a filter operation on all pixels. FIGS. 34A to 34C are views for explaining processing for narrowing the mask edge width by performing filter operation only on the effective pixels of the mask. The first low-pass filter 81 shown in FIG. 33A and the first low-pass filter 81 shown in FIG. 34A have the same shape.

図33(b)は、フィルタリング対象となるマスクM37(点線)の全画素に対して図33(a)に示す第1ローパスフィルタ81を用いてフィルタ演算した結果を示す。図34(b)は、フィルタリング対象となるマスクM40(点線)の有効画素に対して図34(a)に示す第1ローパスフィルタ81を用いてフィルタ演算した結果を示す。フィルタ演算の結果、マスクM38(実線)、マスクM41(実線)ともフィルタ演算した部分だけに傾斜が付き、フィルタ演算しなかった部分はフィルタ演算前のマスク波形のままである。図33(b)ではフィルタリング後のマスクM38(実線)はマスクエッジの内外に傾斜が付されるが、図34(b)ではフィルタリング後のマスクM41(実線)はマスクエッジの内に傾斜が付されるが外には傾斜が付されない。   FIG. 33 (b) shows the result of filtering using the first low-pass filter 81 shown in FIG. 33 (a) for all the pixels of the mask M37 (dotted line) to be filtered. FIG. 34 (b) shows the result of filtering using the first low-pass filter 81 shown in FIG. 34 (a) for the effective pixels of the mask M40 (dotted line) to be filtered. As a result of the filter operation, both the mask M38 (solid line) and the mask M41 (solid line) are sloped only in the portion where the filter operation is performed, and the portion where the filter operation is not performed remains the mask waveform before the filter operation. In FIG. 33 (b), the filtered mask M38 (solid line) is inclined on the inside and outside of the mask edge, whereas in FIG. 34 (b), the filtered mask M41 (solid line) is inclined on the mask edge. However, the outside is not inclined.

図33(c)は、図33(b)に示すフィルタリング後のマスクM38(実線)を第1閾値で二値化した結果を示す。図34(c)は、図34(b)に示すフィルタリング後のマスクM41(実線)を第1閾値で二値化した結果を示す。マスクエッジ幅を狭める場合、第1閾値を最大値付近に設定する。マスクエッジ幅を狭める場合、二値化前のマスクのエッジの傾斜は第1閾値付近(即ち、マスクのレベルが高い部分)にのみ付されていればよい。マスクのレベルが低い部分の傾斜は、その有無が二値化の結果に影響を与えない。エッジ幅が狭まった、図33(c)の二値化後のマスクM39(太実線)と図34(c)の二値化後のマスクM42(太実線)の形状は同じである。   FIG. 33 (c) shows the result of binarizing the filtered mask M38 (solid line) shown in FIG. 33 (b) with the first threshold value. FIG. 34 (c) shows the result of binarizing the filtered mask M41 (solid line) shown in FIG. 34 (b) with the first threshold value. When narrowing the mask edge width, the first threshold is set near the maximum value. When narrowing the mask edge width, it is only necessary that the slope of the edge of the mask before binarization is given only in the vicinity of the first threshold (that is, the portion where the mask level is high). The presence or absence of the inclination of the portion where the mask level is low does not affect the binarization result. The shape of the binarized mask M39 (thick solid line) in FIG. 33 (c) and the binarized mask M42 (thick solid line) in FIG. 34 (c) having the narrowed edge width are the same.

しかしながら、図33(a)−(c)のようにマスクの全画素に対してフィルタ演算する場合と比較して、図34(a)−(c)のようにマスクの有効画素に対してのみフィルタ演算する場合の演算量は少ない。その差は、マスクの無効エリアが広ければ広いほど顕著になる。マスクの有効画素に対してのみフィルタ演算することにより、マスクエッジ幅を好適に狭めつつ、演算量の増加を抑圧し処理時間を短縮できる。   However, compared with the case where the filter operation is performed on all the pixels of the mask as shown in FIGS. 33A to 33C, only the effective pixel of the mask as shown in FIGS. 34A to 34C. The amount of calculation when performing a filter operation is small. The difference becomes more significant as the invalid area of the mask is wider. By performing the filter calculation only on the effective pixels of the mask, it is possible to suppress the increase in the calculation amount and shorten the processing time while suitably reducing the mask edge width.

次にマスクに応じたデプスマップのブレンド比率を制御するために、マスクエッジに傾斜を付けるための第2ローパスフィルタ83の処理について説明する。   Next, in order to control the blend ratio of the depth map according to the mask, the processing of the second low-pass filter 83 for giving an inclination to the mask edge will be described.

図35(a)−(c)は全画素に対してフィルタ演算してマスクエッジに傾斜を付ける処理を説明するための図である。図36(a)−(c)はマスクの有効画素に対してのみフィルタ演算してマスクエッジに傾斜を付ける処理を説明するための図である。図35(a)に示す第2ローパスフィルタ83も図36(a)に示す第2ローパスフィルタ83も同じ形状である。   FIGS. 35A to 35C are diagrams for explaining processing for performing a filter operation on all the pixels to incline the mask edge. FIGS. 36A to 36C are diagrams for explaining processing for filtering only the effective pixels of the mask to incline the mask edge. The second low-pass filter 83 shown in FIG. 35A and the second low-pass filter 83 shown in FIG. 36A have the same shape.

図35(b)は、フィルタリング対象となるマスクM43(点線)の全画素に対して図35(a)に示す第2ローパスフィルタ83を用いてフィルタ演算した結果を示す。図36(b)は、フィルタリング対象となるマスクM46(点線)の有効画素に対して図36(a)に示す第2ローパスフィルタ83を用いてフィルタ演算した結果を示す。フィルタ演算の結果、マスクM44(実線)、マスクM47(実線)ともフィルタ演算した部分だけに傾斜が付き、フィルタ演算しなかった部分はフィルタ演算前のマスク波形のままである。図35(b)ではフィルタリング後のマスクM44(実線)はマスクエッジの内外に傾斜が付されるが、図36(b)ではフィルタリング後のマスクM47(実線)はマスクエッジの内に傾斜が付されるが外には傾斜が付されない。   FIG. 35B shows the result of filtering using the second low-pass filter 83 shown in FIG. 35A for all the pixels of the mask M43 (dotted line) to be filtered. FIG. 36B shows the result of filtering using the second low-pass filter 83 shown in FIG. 36A for the effective pixels of the mask M46 (dotted line) to be filtered. As a result of the filter calculation, both the mask M44 (solid line) and the mask M47 (solid line) are sloped only in the part subjected to the filter calculation, and the part not subjected to the filter calculation remains the mask waveform before the filter calculation. In FIG. 35 (b), the filtered mask M44 (solid line) is inclined on the inside and outside of the mask edge, while in FIG. 36 (b), the filtered mask M47 (solid line) is inclined on the mask edge. However, the outside is not inclined.

図35(c)は、図35(b)に示すフィルタリング後のマスクM44(実線)において、第2閾値より下のレベルの値をゼロにクリッピング処理した結果を示す。図36(c)は、図36(b)に示すフィルタリング後のマスクM47(実線)において、第2閾値より下のレベルの値をゼロにクリッピング処理した結果を示す。第2閾値はマスクレベルの中間付近のレベルに設定する。第2ローパスフィルタ83及びクリッピング部84による処理の目的は、マスクエッジの高レベル側に傾斜を付け、低レベル側の値をゼロにすることである。従って加工前のマスクエッジの傾斜は第2閾値より上(即ち、マスクのレベルが高い部分)にのみあればよい。第2閾値より下(即ち、マスクのレベルが低い部分)の傾斜は、その有無が加工の結果に影響を与えない。エッジに傾斜を付け第2閾値以下をゼロにクリッピングした、図35(c)の加工後のマスクM45(太実線)と図36(c)の加工後のマスクM48(太実線)の形状は同じである。   FIG. 35 (c) shows the result of clipping the value of the level lower than the second threshold to zero in the filtered mask M44 (solid line) shown in FIG. 35 (b). FIG. 36C shows the result of clipping the value of the level below the second threshold to zero in the filtered mask M47 shown by FIG. 36B (solid line). The second threshold is set to a level near the middle of the mask level. The purpose of the processing by the second low-pass filter 83 and the clipping unit 84 is to incline the high level side of the mask edge and set the value on the low level side to zero. Therefore, the inclination of the mask edge before processing only needs to be above the second threshold (that is, the portion where the mask level is high). The presence or absence of the inclination below the second threshold (that is, the portion where the mask level is low) does not affect the processing result. The shape of mask M45 (thick solid line) after processing in FIG. 35 (c) and mask M48 (thick solid line) after processing in FIG. 36 (c) in which the edge is inclined and clipped below the second threshold value to zero is the same. It is.

しかしながら、図35(a)−(c)のようにマスクの全画素に対してフィルタ演算する場合と比較して、図36(a)−(c)のようにマスクの有効画素に対してのみフィルタ演算する場合の演算量は少ない。その差は、マスクの無効エリアが広ければ広いほど顕著になる。マスクの無効画素に対してのみフィルタ演算することにより、マスクエッジに傾斜を付けつつ、演算量の増加を抑圧し処理時間を短縮できる。   However, as compared with the case where the filter operation is performed on all the pixels of the mask as shown in FIGS. 35A to 35C, only the effective pixel of the mask as shown in FIGS. 36A to 36C. The amount of computation when performing filter computation is small. The difference becomes more significant as the invalid area of the mask is wider. By performing the filter calculation only on the invalid pixels of the mask, it is possible to suppress the increase in the calculation amount and shorten the processing time while adding a gradient to the mask edge.

上述のようにマスクエッジ幅を変更する処理と、マスクエッジに傾斜を付ける処理は組み合わせて使用できる。以下、組み合わせて使用する場合における、実施例1の手法と実施例3の手法の演算量の差について説明する。   The process of changing the mask edge width as described above and the process of inclining the mask edge can be used in combination. Hereinafter, the difference in calculation amount between the method of the first embodiment and the method of the third embodiment when used in combination will be described.

まずマスクエッジ幅を広げる処理とマスクエッジに傾斜を付ける処理を組み合わせた場合を考える。実施例1の手法ではマスクの全画素に対してフィルタ処理する。これに対して実施例3の手法では、マスクエッジ幅を広げる処理についてはマスクの無効画素に対してのみフィルタ処理し、マスクエッジに傾斜を付ける処理についてはマスクの有効画素に対してのみフィルタ処理する。仮にマスクエッジ幅を広げる処理とマスクエッジに傾斜を付ける処理の演算量が等しい場合、マスクの有効画素の面積によらず、実施例3の手法は実施例1の手法に対して処理量を半分に削減できる。   First, consider a case where a process for widening the mask edge width and a process for inclining the mask edge are combined. In the method of the first embodiment, all the pixels of the mask are filtered. On the other hand, in the method of the third embodiment, the process for widening the mask edge width is performed by filtering only for invalid pixels of the mask, and the process for inclining the mask edge is performed by filtering only for effective pixels of the mask. To do. If the calculation amount of the processing for widening the mask edge width and the processing for inclining the mask edge are equal, the method of the third embodiment halves the processing amount of the method of the first embodiment regardless of the effective pixel area of the mask. Can be reduced.

次にマスクエッジ幅を狭める処理とマスクエッジに傾斜を付ける処理を組み合わせた場合を考える。実施例1の手法ではマスクの全画素に対してフィルタ処理する。これに対して実施例3の手法では、マスクエッジ幅を狭める処理とマスクエッジに傾斜を付ける処理の両方において、マスクの有効画素に対してのみフィルタ処理する。よって、マスクの有効画素が狭ければ狭いほど、実施例3の手法は実施例1の手法に対して処理量を大幅に削減できる。   Next, consider a case where a process for narrowing the mask edge width and a process for inclining the mask edge are combined. In the method of the first embodiment, all the pixels of the mask are filtered. On the other hand, in the method of the third embodiment, only the effective pixels of the mask are filtered in both the process of narrowing the mask edge width and the process of inclining the mask edge. Therefore, the narrower the effective pixels of the mask, the more the processing amount of the technique of the third embodiment can be reduced compared to the technique of the first embodiment.

以上説明したように実施例3によれば、合成デプスマップのオブジェクトの境界部分に連続性を持たせ、この合成デプスマップを基に生成された画像(3D画像)のオブジェクトの境界部分の不自然を目立たなくするために以下の処理を行う。デプスマップを加工する際の基準となるマスクに対して、エッジの位置を移動させたりエッジに傾斜を付けたりするためにフィルタ処理する。その際、フィルタ処理する前のマスクの有効エリアまたは無効エリアのフィルタ処理をスキップすることにより、実施例1の処理と等価の効果を得つつ、演算量を削減し処理時間を短縮できる。   As described above, according to the third embodiment, the boundary portion of the object in the combined depth map is made continuous, and the boundary portion of the object in the image (3D image) generated based on the combined depth map is unnatural. The following processing is performed to make the image less noticeable. Filtering is performed to move the position of the edge or to incline the edge with respect to a mask that is a reference for processing the depth map. At this time, by skipping the filtering process of the effective area or the invalid area of the mask before the filtering process, the calculation amount can be reduced and the processing time can be shortened while obtaining the same effect as the process of the first embodiment.

以上、本発明を実施の形態をもとに説明した。実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。   The present invention has been described based on the embodiments. The embodiments are exemplifications, and it will be understood by those skilled in the art that various modifications can be made to combinations of the respective constituent elements and processing processes, and such modifications are within the scope of the present invention. .

実施例2に係る画像編集システム500では、デプスマップ加工部20による加工をスキップして、デプスマップ生成部10により生成されたデプスマップをそのまま使用してもよい。またオブジェクト領域ごとに分割せずに、一括で加工されたデプスマップを使用してもよい。またユーザの作業により一から生成されたデプスマップが使用されてもよい。   In the image editing system 500 according to the second embodiment, processing by the depth map processing unit 20 may be skipped, and the depth map generated by the depth map generation unit 10 may be used as it is. Further, a depth map processed in a batch may be used without being divided for each object area. Also, a depth map generated from scratch by the user's work may be used.

実施例3では第2レベル判定部87は、エッジの位置が調整された後のマスク信号の無効エリアに対する第2ローパスフィルタ83によるフィルタ処理をスキップさせる例を説明した。この処理はマスクエッジの内側部分に傾斜を付けるための処理である。マスクエッジの外側部分に傾斜を付ける場合、第2レベル判定部87はマスク信号の有効エリアに対する第2ローパスフィルタ83によるフィルタ処理をスキップさせる。   In the third embodiment, the second level determination unit 87 has described an example in which the filtering process by the second low-pass filter 83 for the invalid area of the mask signal after the edge position is adjusted is skipped. This process is a process for inclining the inner part of the mask edge. When an inclination is given to the outer portion of the mask edge, the second level determination unit 87 skips the filtering process by the second low-pass filter 83 for the effective area of the mask signal.

500 画像編集システム、 100 画像処理装置、 10 デプスマップ生成部、 11 画面上部高域成分評価部、 12 画面下部高域成分評価部、 13 合成比率決定部、 14 第1基本デプスモデル用フレームメモリ、 15 第2基本デプスモデル用フレームメモリ、 16 第3基本デプスモデル用フレームメモリ、 17 合成部、 18 加算部、 20 デプスマップ加工部、 30 3D画像生成部、 31 画素シフト部、 32 監視領域設定部、 33 画素補間部、 40 操作受付部、 50 表示制御部、 200 コンソール端末装置、 60 操作部、 70 表示部、 80 マスク補正部、 81 第1ローパスフィルタ、 82 二値化部、 83 第2ローパスフィルタ、 84 クリッピング部、 86 第1レベル判定部、 87 第2レベル判定部。   500 image editing system, 100 image processing apparatus, 10 depth map generation unit, 11 upper screen high frequency component evaluation unit, 12 lower screen high frequency component evaluation unit, 13 synthesis ratio determination unit, 14 frame memory for first basic depth model, 15 Frame memory for the second basic depth model, 16 Frame memory for the third basic depth model, 17 Compositing unit, 18 Adder unit, 20 Depth map processing unit, 30 3D image generation unit, 31 Pixel shift unit, 32 Monitoring region setting unit 33 pixel interpolation unit, 40 operation reception unit, 50 display control unit, 200 console terminal device, 60 operation unit, 70 display unit, 80 mask correction unit, 81 first low pass filter, 82 binarization unit, 83 second low pass Filter, 84 Clipping unit, 86 First level judgment 87, a second level determination unit.

Claims (8)

外部設定されるマスクパターンを補正するマスク補正部と、
入力画像のデプスマップを、前記マスク補正部により補正された複数のマスクパターンにより指定される複数の領域ごとに加工するデプスマップ加工部と、
前記入力画像、及び前記デプスマップ加工部により加工されたデプスマップをもとに、別視点の画像を生成する画像生成部と、を備え、
前記マスク補正部は、
マスク信号にフィルタをかける第1ローパスフィルタと、
前記第1ローパスフィルタから出力されるマスク信号を前記マスク信号のエッジの位置を移動させるための第1閾値を用いて二値化する二値化部と、
前記二値化部による二値化によりエッジの位置が移動された前記マスク信号のエッジに傾斜をつけるための第2ローパスフィルタと、を含み、
前記マスクパターンのオブジェクト境界部分に、ぼかし処理を施すことを特徴とする画像処理装置。
A mask correction unit for correcting an externally set mask pattern;
A depth map processing unit that processes a depth map of an input image for each of a plurality of regions specified by a plurality of mask patterns corrected by the mask correction unit;
An image generation unit that generates an image of another viewpoint based on the input image and the depth map processed by the depth map processing unit;
The mask correction unit
A first low-pass filter for filtering the mask signal;
A binarization unit that binarizes the mask signal output from the first low-pass filter using a first threshold for moving the position of the edge of the mask signal;
A second low-pass filter for inclining the edge of the mask signal whose edge position has been moved by binarization by the binarization unit,
An image processing apparatus that performs blurring processing on an object boundary portion of the mask pattern.
前記マスク補正部は、
前記第2ローパスフィルタにより出力されるマスク信号を第2閾値を用いて、前記第2閾値以下の信号をゼロにクリッピングするクリッピング部を、さらに含むことを特徴とする請求項1に記載の画像処理装置。
The mask correction unit
2. The image processing according to claim 1, further comprising: a clipping unit that clips a mask signal output by the second low-pass filter using a second threshold value to zero a signal equal to or lower than the second threshold value. apparatus.
前記デプスマップ加工部は、前記マスク補正部により補正されたマスクパターンをもとに生成される、前記複数の領域の各デプスマップをアルファブレンドすることを特徴とする請求項1または2に記載の画像処理装置。   3. The depth map processing unit according to claim 1, wherein the depth map processing unit alpha-blends the depth maps of the plurality of regions generated based on the mask pattern corrected by the mask correction unit. Image processing device. 前記マスク補正部は、
前記マスク信号のレベルを判定するレベル判定部を、さらに含み、
前記レベル判定部は、レベル判定結果に応じて、前記第1ローパスフィルタおよび前記第2ローパスフィルタの少なくとも一方の、前記マスク信号にフィルタ処理を行う対象エリアを制限することを特徴とする請求項1に記載の画像処理装置
The mask correction unit
A level determination unit for determining a level of the mask signal;
The level determination unit restricts a target area to be subjected to filter processing on the mask signal in at least one of the first low-pass filter and the second low-pass filter according to a level determination result. Image processing apparatus according to
前記レベル判定部は、
前記マスク信号の有効エリアを広げる場合、前記マスク信号の有効エリアに対する前記第1ローパスフィルタによるフィルタ処理をスキップさせ、前記マスク信号の有効エリアを狭める場合、前記マスク信号の無効エリアに対する前記第1ローパスフィルタによるフィルタ処理をスキップさせることを特徴とする請求項4に記載の画像処理装置。
The level determination unit
When the effective area of the mask signal is expanded, the filtering process by the first low-pass filter for the effective area of the mask signal is skipped, and when the effective area of the mask signal is narrowed, the first low-pass for the invalid area of the mask signal The image processing apparatus according to claim 4, wherein the filtering process by the filter is skipped.
前記レベル判定部は、
前記二値化部による二値化によりエッジの位置が移動された前記マスク信号の無効エリアに対する前記第2ローパスフィルタによるフィルタ処理をスキップさせることを特徴とする請求項4または5に記載の画像処理装置。
The level determination unit
6. The image processing according to claim 4, wherein the filtering process by the second low-pass filter for the invalid area of the mask signal whose edge position has been moved by binarization by the binarization unit is skipped. apparatus.
外部設定されるマスクパターンのオブジェクト境界部分にぼかし処理を施すステップと、
入力画像のデプスマップを、オブジェクト境界部分にぼかし処理が施された複数のマスクパターンにより指定される複数の領域ごとに加工するステップと、
前記入力画像、及び加工されたデプスマップをもとに、別視点の画像を生成するステップと、を備え、
前記ぼかし処理を施すステップは、
マスク信号にローパスフィルタをかけるステップと、
ローパスフィルタをかけられたマスク信号を前記マスク信号のエッジの位置を移動させるための第1閾値を用いて二値化するステップと、
二値化によりエッジの位置が移動された前記マスク信号のエッジに傾斜をつけるためにローパスフィルタをかけるステップと、を含むことを特徴とする画像処理方法。
A step of blurring the object boundary portion of the mask pattern set externally;
Processing the depth map of the input image for each of a plurality of areas specified by a plurality of mask patterns in which the object boundary portion is subjected to blurring;
Generating an image of another viewpoint based on the input image and the processed depth map,
The step of performing the blurring process includes:
Applying a low pass filter to the mask signal;
Binarizing the low-pass filtered mask signal using a first threshold for moving the edge position of the mask signal;
Applying a low-pass filter to incline the edge of the mask signal whose edge position has been moved by binarization.
外部設定されるマスクパターンのオブジェクト境界部分にぼかし処理を施す処理と、
入力画像のデプスマップを、オブジェクト境界部分にぼかし処理が施された複数のマスクパターンにより指定される複数の領域ごとに加工する処理と、
前記入力画像、及び加工されたデプスマップをもとに、別視点の画像を生成する処理と、コンピュータに実行させ、
前記ぼかし処理を施す処理は、
マスク信号にローパスフィルタをかける処理と、
ローパスフィルタをかけられたマスク信号を前記マスク信号のエッジの位置を移動させるための第1閾値を用いて二値化する処理と、
二値化によりエッジの位置が移動された前記マスク信号のエッジに傾斜をつけるためにローパスフィルタをかける処理と、を含むことを特徴とする画像処理プログラム。
Processing to blur the object boundary part of the mask pattern set externally,
Processing the depth map of the input image for each of a plurality of areas designated by a plurality of mask patterns in which the object boundary portion is subjected to blurring;
Based on the input image and the processed depth map, processing for generating an image of another viewpoint, and causing the computer to execute,
The process of performing the blurring process is as follows:
Processing to apply a low-pass filter to the mask signal;
A process of binarizing the low-pass filtered mask signal using a first threshold for moving the position of the edge of the mask signal;
An image processing program comprising: applying a low-pass filter to incline the edge of the mask signal whose edge position has been moved by binarization.
JP2012285780A 2012-02-08 2012-12-27 Image processing apparatus, image processing method, and image processing program Active JP5900321B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2012285780A JP5900321B2 (en) 2012-02-08 2012-12-27 Image processing apparatus, image processing method, and image processing program
US13/760,825 US8971611B2 (en) 2012-02-08 2013-02-06 Image process device, image process method, and image process program

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2012025127 2012-02-08
JP2012025127 2012-02-08
JP2012285780A JP5900321B2 (en) 2012-02-08 2012-12-27 Image processing apparatus, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2013178749A JP2013178749A (en) 2013-09-09
JP5900321B2 true JP5900321B2 (en) 2016-04-06

Family

ID=49270295

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012285780A Active JP5900321B2 (en) 2012-02-08 2012-12-27 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP5900321B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6794854B2 (en) * 2017-02-02 2020-12-02 富士通株式会社 Arithmetic processing unit and control method of arithmetic processing unit
JP7434846B2 (en) 2019-11-29 2024-02-21 株式会社リコー Image processing device, image processing method, program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3086577B2 (en) * 1993-12-22 2000-09-11 三洋電機株式会社 3D image conversion method for 2D images
KR20130033125A (en) * 2011-09-26 2013-04-03 삼성전자주식회사 Apparatus and method for converting 2d content into 3d content

Also Published As

Publication number Publication date
JP2013178749A (en) 2013-09-09

Similar Documents

Publication Publication Date Title
JP5962393B2 (en) Image processing apparatus, image processing method, and image processing program
US8971611B2 (en) Image process device, image process method, and image process program
JP2015022458A (en) Image processing device, image processing method, and image processing program
JP6094863B2 (en) Image processing apparatus, image processing method, program, integrated circuit
US7755645B2 (en) Object-based image inpainting
US8953872B2 (en) Method for editing terrain data created by procedural terrain method
KR20060121972A (en) Electronic watermarking method, electronic watermark detecting method, apparatus and program
CN105678724A (en) Background replacing method and apparatus for images
JP5473173B2 (en) Image processing apparatus, image processing method, and image processing program
TWI712990B (en) Method and apparatus for determining a depth map for an image, and non-transitory computer readable storage medium
TWI498852B (en) Device and method of depth map generation
JP2018524896A (en) Method and apparatus for determining a depth map of an image
US11823357B2 (en) Corrective lighting for video inpainting
JP6904842B2 (en) Image processing device, image processing method
JP5900321B2 (en) Image processing apparatus, image processing method, and image processing program
JP2015012429A (en) Image processing apparatus, image processing method, and image processing program
JP5971017B2 (en) Image processing apparatus, image processing method, and image processing program
JP5867128B2 (en) Image processing apparatus, image processing method, and image processing program
JP5807569B2 (en) Image processing apparatus, image processing method, and image processing program
JPH1153534A (en) Method and device for reparing image
Munezawa et al. Noise removal method for moving images using 3-D and time-domain total variation regularization decomposition
JP5887966B2 (en) Image processing apparatus, image processing method, and image processing program
JP5807571B2 (en) Image processing apparatus, image processing method, and image processing program
JP5807570B2 (en) Image processing apparatus, image processing method, and image processing program
JP2015103960A (en) Method, program and apparatus for specifying image depth

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150331

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160129

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160222

R150 Certificate of patent or registration of utility model

Ref document number: 5900321

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150