JP3058769B2 - 3D image generation method - Google Patents

3D image generation method

Info

Publication number
JP3058769B2
JP3058769B2 JP4257144A JP25714492A JP3058769B2 JP 3058769 B2 JP3058769 B2 JP 3058769B2 JP 4257144 A JP4257144 A JP 4257144A JP 25714492 A JP25714492 A JP 25714492A JP 3058769 B2 JP3058769 B2 JP 3058769B2
Authority
JP
Japan
Prior art keywords
pixel
image
blur
pixels
weighting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP4257144A
Other languages
Japanese (ja)
Other versions
JPH0683955A (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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP4257144A priority Critical patent/JP3058769B2/en
Publication of JPH0683955A publication Critical patent/JPH0683955A/en
Application granted granted Critical
Publication of JP3058769B2 publication Critical patent/JP3058769B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、コンピュータによって
得られた3次元画像によって遠近感を持つ画像を生成す
る3次元画像生成方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a three-dimensional image generating method for generating an image having a perspective from a three-dimensional image obtained by a computer.

【0002】[0002]

【従来の技術】コンピュータグラフィックスは、動画や
静止画の生成のために、あらゆる分野において広く利用
されている。コンピュータグラフィックスは、単なる平
面的な画像だけでなく、遠近法による立体感のある画像
を生成しディスプレーの上に映し出すことができる。
2. Description of the Related Art Computer graphics are widely used in all fields for generating moving images and still images. Computer graphics can generate not only a flat image but also a three-dimensional image based on perspective and display it on a display.

【0003】ここで、従来一般のカメラによって光学的
に映し出された像の説明を行なう。図2はピンホールカ
メラによる結像作用説明図である。図において、例えば
3個の物体A、B、Cがそれぞれピンホール3から適当
な距離だけ離れて位置しているものとする。この場合ピ
ンホール3によってこれらの物体の像が結像面4に結像
する。これらの像はピンホール3が十分面積の小さいも
のであれば、いずれも正確にピントの合った画像とな
る。通常、コンピュータグラフィックスによって得られ
る元画像は、この図2に示すようなピンホールカメラに
よる画像と同様に、何れもその奥行き方向の位置にかか
わらずピントが合ったものとなる。
[0003] Here, an image optically projected by a conventional general camera will be described. FIG. 2 is an explanatory diagram of an image forming operation by a pinhole camera. In the figure, it is assumed that, for example, three objects A, B, and C are located at an appropriate distance from the pinhole 3, respectively. In this case, the images of these objects are formed on the image plane 4 by the pinhole 3. As long as the pinhole 3 has a sufficiently small area, any of these images can be accurately focused. Normally, the original image obtained by computer graphics is in focus regardless of its position in the depth direction, similarly to the image obtained by the pinhole camera as shown in FIG.

【0004】一方、図3にレンズによる結像作用の説明
図を示す。図に示すように、レンズ5の前方に3個の物
体A、B、Cが位置するとき、これらの像はレンズ5に
よって結像面4上に結像する。この場合、例えば物体B
に対しレンズ5のピントが合っていると、物体Bについ
ては、結像面4に鮮明な像が映る。しかしながら、物体
Aや物体Cは、像を結ぶ位置が結像面4より前方あるい
は後方であるため、いわゆる画像がぼやける状態とな
る。この結像面4に平行でピントの合っている面、即ち
物体Bの存在する面を焦平面6と呼んでいる。
On the other hand, FIG. 3 is an explanatory view of the image forming operation by a lens. As shown in the figure, when three objects A, B, and C are located in front of the lens 5, these images are formed on the image plane 4 by the lens 5. In this case, for example, object B
When the lens 5 is in focus, a clear image of the object B appears on the image plane 4. However, the object A and the object C are in a state where the image is blurred because the image forming position is ahead or behind the image plane 4. The plane that is in focus and parallel to the imaging plane 4, that is, the plane on which the object B exists, is called a focal plane 6.

【0005】図4にはピンホールカメラの画像説明図を
示し、図5にはレンズによる画像説明図を示す。図4に
示すように、ピンホールカメラによる場合には、物体
A、物体B、物体Cがそれぞれ奥行き方向に異なる位置
に配置されているにもかかわらず、その画像は全て鮮明
に映し出される。しかし、図6に示すように、レンズに
よる場合には、焦平面に存在する物体Bについてはピン
トが正確に合っており、鮮明な画像が映し出されるが、
その前後に配置された物体A、物体Cについてはピント
がぼけた状態で映し出される。
FIG. 4 is a view for explaining an image of a pinhole camera, and FIG. 5 is a view for explaining an image by a lens. As shown in FIG. 4, in the case of using a pinhole camera, all images are clearly displayed even though the objects A, B, and C are arranged at different positions in the depth direction. However, as shown in FIG. 6, in the case of using a lens, the object B existing in the focal plane is accurately focused, and a clear image is displayed.
The objects A and C arranged before and after the object are projected out of focus.

【0006】[0006]

【発明が解決しようとする課題】ところで、図4及び図
5の図を比較してみると、図4に示す画像がディスプレ
ーに映し出された場合と、図5に示す画像がディスプレ
ーに映し出された場合とでは、3次元画像として見た場
合に、その与える効果が相違する。即ち、図5に示した
画像の方が、むしろ肉眼によって奥行きのある物を見る
ときの状態に近い。即ち図5に示すような画像の方が奥
行き知覚効果が高いといえる。従って、従来コンピュー
タグラフィックスを用いてこのような奥行き知覚効果の
高い画像を生成することも試みられている。この方法の
一つとして、ピンホールカメラを注目している物体に向
けつつ、奥行き方向に垂直な平面上でピンホールを少し
ずらして得られる画像を、動かし方を変えて複数枚生成
し、こうして得られた複数枚の画像の各画素毎に画素値
の平均を取ることによって目的の画像を得る方法があ
る。
By the way, comparing the figures of FIGS. 4 and 5, it can be seen that the image shown in FIG. 4 is shown on the display and the image shown in FIG. 5 is shown on the display. The effect obtained when viewed as a three-dimensional image differs from that in the case. In other words, the image shown in FIG. 5 is closer to a state where a deep object is viewed with the naked eye. That is, it can be said that the image shown in FIG. 5 has a higher depth perception effect. Therefore, conventionally, it has been attempted to generate such an image having a high depth perception effect using computer graphics. One of the methods is to generate a plurality of images obtained by shifting the pinhole slightly on a plane perpendicular to the depth direction while moving the pinhole camera toward the object of interest, changing the way of movement, and thus There is a method of obtaining a target image by taking an average of pixel values for each pixel of a plurality of obtained images.

【0007】しかしながら、このような方法では複数枚
の画像をまず生成するために膨大な演算を実行する必要
があり、処理時間が長時間になるという問題があった。
この他に従来、一枚の画像全体を一様にぼやけさせる方
法がある。この方法は画像の各画素に同一の重み付けフ
ィルタを用いた平滑化処理を施し、奥行きの度合に関係
なく一様にぼやけの影響が及ぶ。
However, in such a method, a huge amount of calculation must be performed to generate a plurality of images first, and there is a problem that a long processing time is required.
In addition to the above, there is a method of uniformly blurring an entire image. According to this method, each pixel of an image is subjected to a smoothing process using the same weighting filter, and the effect of blur is uniformly applied regardless of the degree of depth.

【0008】図6にこのような従来の方法による生成画
像例図を示す。図に示すように、従来の重み付けフィル
タを用いる方法では、焦平面にある物体Bも、重み付け
フィルタの平滑化の影響を受け、ぼやけが生じてしまう
という問題があった。また、本来手前の物体の後ろに隠
れて見えないはずの後方にある物体のぼやけの影響が、
手前の物体にも及んでしまうという問題もあった。本発
明は以上の点に着目してなされたもので、奥行き知覚効
果を高めた自然に近い画像を得るための処理を実行する
3次元画像生成方法を提供することを目的とする。
FIG. 6 shows an example of an image generated by such a conventional method. As shown in the figure, the conventional method using a weighting filter has a problem in that the object B in the focal plane is also affected by the smoothing of the weighting filter, causing blurring. Also, the effect of blurring of objects behind, which should not be visible behind the object in front,
There was also a problem that it reached the object in the foreground. The present invention has been made in view of the above points, and it is an object of the present invention to provide a three-dimensional image generation method that executes a process for obtaining an image close to nature with an enhanced depth perception effect.

【0009】[0009]

【課題を解決するための手段】本発明は、視点から離れ
る奥行き方向の距離を各画素毎に奥行き情報として含む
3次元画像からぼやけを付与する3次元画像を生成する
方法であって、前記奥行き方向に所定の基準位置を設定
すると共に、前記各画素毎に前記各奥行き情報から前記
基準位置に対する離間距離をそれぞれ求め、次に、前記
各画素毎に、他の周囲の画素に対するぼやけの影響を与
える円領域を仮定するために、前記各離間距離に基づく
半径をぼやけ半径として設定し、次に、新たな画素値を
設定すべくいずれかの画素を注目画素とし、かつ該注目
画素を中心とする所定数の各周辺画素に対し、対応する
前記各ぼやけ半径に基づいてそれぞれ重み付け値を設定
して重み付けフィルタを作成すると共に、前記周辺画素
の前記離間距離が前記注目画素のそれより大きいと該周
辺画素を重み付け対象から除去し、かつ前記周辺画素の
前記ぼやけ半径が該周辺画素から前記注目画素までの距
離より小さいと該周辺画素を重み付け対象から除去し、
前記重み付けフィルタを用いた演算処理にて前記注目画
素の画素値を設定することを特徴とするものである。
SUMMARY OF THE INVENTION The present invention is directed to
Includes the distance in the depth direction as depth information for each pixel
Generate a three-dimensional image to add blur from a three-dimensional image
Setting a predetermined reference position in the depth direction
And from the depth information for each pixel,
Determine the separation distance from the reference position, and then,
Each pixel has a blurring effect on other surrounding pixels
Based on each of the above separation distances to assume
Set the radius as the blur radius, then add a new pixel value
Set any pixel as a target pixel to be set, and
For a predetermined number of each peripheral pixel centered on the pixel, the corresponding
Set weighting value based on each blur radius
To create a weighting filter,
Is larger than that of the pixel of interest,
Remove the side pixels from the weighting target, and
The blur radius is the distance from the peripheral pixel to the pixel of interest.
If it is smaller than the separation, the surrounding pixels are removed from the weighting target,
The target image is calculated by the arithmetic processing using the weighting filter.
It is characterized by setting the elementary pixel value .

【0010】[0010]

【作用】この方法では、奥行き情報を含めて生成された
3次元画像を用意する。そして、各画素毎に基準位置に
対する離間距離を求め、この離間距離に基づいてぼやけ
の影響の及ぶ範囲を定めるためのぼやけ半径Rを設定す
る。 次に、注目画素の色や濃度を定める画素値を決定す
るために、周囲画素のぼやけ半径に基づく重み付け値を
設定する重み付けフィルタを得る。この重み付けフィル
では、注目画素より離間距離の大きい周辺画素や、注
目画素までの距離がぼやけ半径よりも大きい周辺画素
は、注目画素に影響を及ぼさないとして除外される。
れ以外の周辺画素はぼやけの影響を注目画素に与えると
して重み付け値が設定される。この方法によれば、各画
素に対し、離間距離に応じたぼやけの影響が与えられ
る。ぼやけ処理は一つの画像に対して行なわれるため、
演算処理に必要な時間が短い。また、焦点位置にある物
体の画像にその後方にある物体の画像のぼやけが影響を
及ぼさず自然に近い3次元画像が得られる。
According to this method, a three-dimensional image generated including depth information is prepared. Then, the reference position is set for each pixel.
Is determined, and blurring is performed based on this distance.
The blur radius R to determine the range affected by
You. Next, in order to determine a pixel value that determines the color and density of the pixel of interest , a weighting value based on the blur radius of surrounding pixels is calculated.
Get the weighting filter to set . In this weighting filter , a peripheral pixel having a larger separation distance than the target pixel or a peripheral pixel having a distance to the target pixel larger than the blur radius is used.
Are excluded because they do not affect the target pixel. If the surrounding pixels give the effect of blurring to the pixel of interest,
And the weighting value is set. According to this method, pairs in each pixel is given the effect of blurring corresponding to the separation distance. Since blur processing is performed on one image,
The time required for arithmetic processing is short. Further, a three-dimensional image close to nature can be obtained without blurring the image of the object behind the image of the object at the focal position .

【0011】[0011]

【実施例】以下、本発明の実施例を図を用いて詳細に説
明する。図1は本発明の3次元画像生成方法実施例を示
す説明図である。本発明の方法を概略説明すれば図のよ
うになる。まず、3次元的に配置された物体を、視点1
0から射影変換によって、即ち視点10から眺めたまま
の形のピントの合った元画像2を生成する。この図では
簡単のために奥行き方向の位置Z1、Z2、Z3に四角
形の平板状の物体が配置されている。このとき、Zバッ
ファアルゴリズムによって図のように隠面消去が行なわ
れる。また、元画像の生成を通して、Zバッファには元
画像の各画素に対応する奥行き方向の位置を示す奥行き
情報Zが格納される。即ち、奥行き情報はZ1、Z2、
Z3といった値となる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is an explanatory diagram showing an embodiment of a three-dimensional image generation method according to the present invention. An outline of the method of the present invention is shown in the figure. First, the object arranged three-dimensionally
An in-focus original image 2 having a shape as viewed from the viewpoint 10 is generated from 0 by projective transformation. In this figure, for the sake of simplicity, a rectangular plate-shaped object is arranged at positions Z1, Z2, and Z3 in the depth direction. At this time, hidden surface elimination is performed by the Z buffer algorithm as shown in the figure. Further, through generation of the original image, depth information Z indicating a position in the depth direction corresponding to each pixel of the original image is stored in the Z buffer. That is, the depth information is Z1, Z2,
It becomes a value such as Z3.

【0012】ここで本発明の方法においては、元画像2
と奥行き情報Zから、元画像の各画素のぼやけ半径Rを
求めておく。ピントが合っているとする焦平面の奥行き
情報をZ2とすると、ぼやけ半径Rは、各画素の奥行き
情報と前記焦平面の奥行き情報の差にほぼ比例した、ぼ
やけの影響が及ぶ範囲を示す半径に相当する値とする。
生成画像12を得る場合、注目画素とその周辺画素の奥
行き情報とぼやけ半径をもとにして得られる重み付けフ
ィルタ11を用いて、元画像の平滑処理を行って注目画
素の画素値を決定する。なお、重み付けフィルタ11の
説明は図10以下で行う。
Here, in the method of the present invention, the original image 2
And the depth information Z, the blur radius R of each pixel of the original image is obtained in advance. Assuming that the depth information of the focal plane that is in focus is Z2, the blur radius R is a radius indicating a range affected by the blur, which is almost proportional to the difference between the depth information of each pixel and the depth information of the focal plane. Is set to a value corresponding to
When obtaining the generated image 12, the original image is smoothed using the weighting filter 11 obtained based on the depth information and the blur radius of the target pixel and its surrounding pixels, and the pixel value of the target pixel is determined. Note that the weighting filter 11 will be described with reference to FIG.

【0013】図7に本発明の方法実施のための装置ブロ
ック図を示す。本発明の方法を実施するためには、図の
ような構成の演算処理回路を用意する。 図の装置は、
CPU(中央演算処理ユニット)21と、これにバスラ
イン22を介して接続されたメモリ23とから構成され
る。メモリ23には元画像データバッファ24、Zバッ
ファ25、Rバッファ26及び生成画像バッファ27が
設けられる。元画像データバッファ24には処理対象と
なる画像が格納される。Zバッファ25には先に図1を
用いて説明した奥行き情報Zが、画像を構成する各画素
に対応付けて格納される。Rバッファ26には同様に各
画素に対応付けてぼやけ半径Rが格納される。生成画像
データバッファ27には最終的にぼやけ処理が終了した
生成画像が格納される。
FIG. 7 shows an apparatus block diagram for implementing the method of the present invention. In order to carry out the method of the present invention, an arithmetic processing circuit having a configuration as shown in the figure is prepared. The device shown is
It comprises a CPU (Central Processing Unit) 21 and a memory 23 connected thereto via a bus line 22. The memory 23 is provided with an original image data buffer 24, a Z buffer 25, an R buffer 26, and a generated image buffer 27. The original image data buffer 24 stores an image to be processed. In the Z buffer 25, the depth information Z described above with reference to FIG. 1 is stored in association with each pixel constituting the image. Similarly, the R buffer 26 stores the blur radius R in association with each pixel. The generated image data buffer 27 stores the generated image that has been finally subjected to the blurring processing.

【0014】図8に本発明の方法の概略動作フローチャ
ートを示す。本発明は、図に示すようなステップS1か
らステップS4までの処理を実行することによって実施
される。ステップS1はぼやけ半径生成処理で、画像を
構成する各画素について、その奥行き情報を元にぼやけ
半径を求める処理である。ステップS2は、その処理が
全ての画素について終了したかを判断するステップであ
る。またステップS3は、各注目画素毎にその画素値を
求めるための平滑処理に必要な重み付けフィルタを生成
するための処理である。ステップS4は、重み付けフィ
ルタを実際に使用して各注目画素について平滑処理を実
行する部分である。
FIG. 8 shows a schematic operation flowchart of the method of the present invention. The present invention is implemented by executing the processing from step S1 to step S4 as shown in the figure. Step S1 is a blur radius generation process for obtaining a blur radius for each pixel forming an image based on the depth information. Step S2 is a step for determining whether or not the processing has been completed for all pixels. Step S3 is processing for generating a weighting filter necessary for smoothing processing for obtaining a pixel value for each target pixel. Step S4 is a part for executing a smoothing process for each target pixel by actually using the weighting filter.

【0015】以下、上記フローチャートの各動作につい
て具体的にその内容を説明する。図9に本発明によるぼ
やけ半径計算法説明図を示す。この図において、Zは奥
行き情報、R(Z)はぼやけ半径、Cは元画像データを
生成するときの座標変換に関係する一定の常数、Fは
準となる焦平面の位置の奥行き情報、Z−Fは焦平面か
らの離間距離を表わしている。具体的には図の物体1−
2が配置された場所が焦平面の位置であり、その奥行き
情報Z2はここではFに等しい。また、例えば物体1−
3の奥行き情報はZ3であるから、焦平面からの離間距
離はZ3−Fとなる。
Hereinafter, the details of each operation of the above-mentioned flowchart will be described. FIG. 9 is a diagram for explaining a method of calculating a blur radius according to the present invention. In this figure, Z is depth information, R (Z) is a blur radius, C is a constant constant related to coordinate transformation when generating original image data, and F is a base.
Depth information of the position of the focal plane becomes quasi, Z-F represents the distance from the focal plane. Specifically, the object 1 in the figure
2 is the position of the focal plane, and its depth information Z2 is equal to F here. Also, for example, object 1-
Since the depth information of No. 3 is Z3, the distance from the focal plane is Z3-F.

【0016】ここで、焦平面の物体1−2上の点8−2
は、目的の画像上でぼやけを発生する必要はないが、そ
の他の物体1−3や1−1上の点8−3や8−1は一定
のぼやけを生じさせる必要がある。そのぼやけの度合
を、本発明においては焦平面からの離間距離に合わせて
決定している。その係数が常数Cである。従って、ぼや
け半径R(Z)は、CとZ−Fの絶対値との積となる。
なお、この実施例では、ぼやけの影響が無限に広がるの
を抑えるため、図の下方に示すように、Z−Fの絶対値
が制限値D以下の場合にのみぼやけ半径R(Z)を焦平
面からの離間距離Z−Fに合わせて求めるようにし、そ
れ以外の場合については、ぼやけ半径R(Z)を常数C
と制限値Dの積CDで表わすことにしている。
Here, the point 8-2 on the focal plane object 1-2 is
Does not need to cause blur on the target image, but points 8-3 and 8-1 on other objects 1-3 and 1-1 need to cause a certain blur. In the present invention, the degree of the blur is determined according to the distance from the focal plane. The coefficient is a constant C. Therefore, the blur radius R (Z) is the product of C and the absolute value of ZF.
In this embodiment, as shown in the lower part of the figure, the blur radius R (Z) is focused only when the absolute value of ZF is equal to or less than the limit value D in order to suppress the effect of blur from spreading infinitely. In this case, the blur radius R (Z) is set to a constant C.
And the limit value D is expressed by a product CD.

【0017】次に、重み付けフィルタの説明を行なう。
図10に重み付けフィルタのマトリクス形状説明図を示
す。重み付けフィルタは、例えばこの実施例では7×7
のマトリクス状の演算子から構成される。ここで、図中
に、注目画素13をfc、周辺画素14をfeと表示し
た。注目画素13というのは画像中の処理対象となる画
素をいう。また、周辺画素14は、この注目画素13の
画素値を決定するために考慮にいれるべき一定範囲の画
素をいう。即ち、この重み付けフィルタは、そのマトリ
クスに含まれる48個の各周辺画素14が、注目画素1
3に対しそれぞれどの程度ぼやけの影響を及ぼすかを数
値化している。こうして求めた重み付け値を加算し平均
化して、注目画素13の画素値が決定される。
Next, the weighting filter will be described.
FIG. 10 is an explanatory diagram of the matrix shape of the weighting filter. The weighting filter is, for example, 7 × 7 in this embodiment.
It consists of matrix-like operators. Here, in the figure, the target pixel 13 is displayed as fc, and the peripheral pixels 14 are displayed as fe. The target pixel 13 is a pixel to be processed in the image. Further, the peripheral pixel 14 refers to a pixel in a certain range to be considered in determining the pixel value of the target pixel 13. That is, in this weighting filter, each of the forty-eight peripheral pixels 14 included in the matrix includes the target pixel 1
For each of the three, the degree of blurring is quantified. The weight values thus obtained are added and averaged, and the pixel value of the pixel of interest 13 is determined.

【0018】上記のような重み付けフィルタを生成する
ためには、まず図11や図12に示す演算テーブルを必
要とする。図11は注目画素までの距離Deの演算テー
ブル説明図である。この演算テーブルは、各周辺画素か
ら注目画素13までの距離Deを求めるためのテーブル
である。図のように、横方向に1ドット、2ドット、3
ドットそれぞれ離れた画素について、その距離Deを
1、2、3と設定すれば、注目画素13までの距離をそ
れぞれ縦横斜め方向に計算により求めることができる。
その結果をテーブル化し演算テーブルとしておけば、図
10に示した重み付けフィルタのマトリクスとこの演算
テーブルとを対応させて、周辺画素14から注目画素1
3までの距離を直ちに求めて、ぼやけ半径と比較するこ
とができる。
In order to generate such a weighting filter, first, an operation table shown in FIGS. 11 and 12 is required. FIG. 11 is an explanatory diagram of a calculation table of the distance De to the target pixel. This calculation table is a table for calculating the distance De from each peripheral pixel to the target pixel 13. As shown in the figure, 1 dot, 2 dots, 3 dots
If the distance De is set to 1, 2, and 3 for pixels separated by dots, the distance to the pixel of interest 13 can be obtained by calculation in the vertical and horizontal diagonal directions.
If the result is tabulated and set as an operation table, the matrix of the weighting filter shown in FIG.
The distance to 3 can be determined immediately and compared to the blur radius.

【0019】図12に関数f(R(Z))の演算テーブ
ル説明図を示す。関数f(R(Z))は、重み付けフィ
ルタのマトリクス上の各重み付け値を示している。図1
2の演算テーブルは、ぼやけ半径Rから重み付け値を求
める場合に使用される。この値は、図に示すように、周
辺画素14のぼやけ半径Rで示す円の中に入る画素数を
数え、そのぼやけ半径R(Z)に対応する関数f(R
(Z))の値を、ぼやけ半径で示す円の中に入る画素数
の逆数で表わしている。従って、ぼやけ半径が1以下、
即ち周辺画素に影響を及ぼさないものである場合、関数
f(R(Z))の値は1となり、ぼやけ半径が大きくな
る程関数f(R(Z))の値は小さくなる。なお、ぼや
け半径Rが図の演算テーブル以上の値になる場合、重み
付けフィルタ外にはずれるため、関数f(R(Z))の
値を一定値にしている。
FIG. 12 is an explanatory diagram of an operation table of the function f (R (Z)). The function f (R (Z)) indicates each weight value on the matrix of the weight filter. FIG.
The calculation table of No. 2 is used when obtaining a weight value from the blur radius R. As shown in the figure, this value is obtained by counting the number of pixels that fall within the circle indicated by the blur radius R of the peripheral pixel 14, and a function f (R) corresponding to the blur radius R (Z).
(Z)) is represented by the reciprocal of the number of pixels falling within a circle indicated by the blur radius. Therefore, the blur radius is 1 or less,
That is, if the pixel does not affect the peripheral pixels, the value of the function f (R (Z)) becomes 1, and the value of the function f (R (Z)) decreases as the blur radius increases. If the blur radius R is equal to or larger than the calculation table shown in the figure, it deviates from the weighting filter, so the value of the function f (R (Z)) is set to a constant value.

【0020】図13に本発明による重み付けフィルタと
その適用処理説明図を示す。上記のような演算テーブル
を使用して、図に示すような重み付けフィルタ11が生
成される。例えば、この例では、周辺画素14−1の重
み付け値は0となり、周辺画素14−2の重み付け値は
21分の1、周辺画素14−3の重み付け値は37分の
1となっている。ここで、重み付け値が0となるのは、
注目画素より奥行き方向の距離が遠い画素である場合、
または、ぼやけ半径R(Z)が注目画素までの距離De
よりも小さい場合である。即ち、注目画素より奥行き方
向が遠い画素については、手前の画像にぼやけの効果を
及ぼすと不都合になるため、重み付け値を強制的に0に
している。また、ぼやけ半径の円の中に注目画素13が
入らないような場合にはやはり、その画素のぼやけの影
響を注目画素13に及ぼさないように、重み付け値が0
となるようにしている。
FIG. 13 is a diagram illustrating a weighting filter according to the present invention and its application processing. The weighting filter 11 as shown in the figure is generated by using the above-described operation table. For example, in this example, the weight value of the peripheral pixel 14-1 is 0, the weight value of the peripheral pixel 14-2 is 1/21, and the weight value of the peripheral pixel 14-3 is 1/37. Here, the weight value becomes 0 because
If the pixel in the depth direction is farther than the pixel of interest,
Alternatively, the blur radius R (Z) is the distance De to the pixel of interest.
Is smaller than. That is, the weighting value is forcibly set to 0 for a pixel that is farther away from the target pixel if a blurring effect is applied to the image in the foreground. When the pixel of interest 13 does not fall within the circle of the blur radius, the weighting value is set to 0 so that the blur of the pixel does not affect the pixel of interest 13.
I am trying to be.

【0021】それ以外の画素、即ち注目画素13に対し
一定のぼやけの影響が及ぶ周辺画素については、図12
を用いて説明した関数f(R(Z))の値がそのまま重
み付け値となる。図に示した重み付けフィルタの例で
は、マトリクスを構成する全ての画素についての値が記
入されていないが、実際には全ての画素についてそれぞ
れ0あるいは1から関数f(R(Z))の最小値45分
の1までの何れかの重み付け値が設定されることにな
る。上記のようにして得られた重み付けフィルタは、画
像を構成する全ての画素に対し順に適用され、各画素に
ついてその適用処理が実行される。適用処理にあたって
は、図中の式に示すように、元画素値と各マトリクス中
の重み付け値の積を全て加算し、これを重み付け値だけ
の総和で割る。こうして注目画素13の新画素値が求め
られる。
The other pixels, that is, peripheral pixels that have a certain blurring effect on the target pixel 13 are shown in FIG.
The value of the function f (R (Z)) described using is directly used as the weighting value. In the example of the weighting filter shown in the figure, the values of all the pixels constituting the matrix are not entered, but in practice, the minimum value of the function f (R (Z)) is calculated from 0 or 1 for all the pixels. Any weight value up to 1/45 will be set. The weighting filter obtained as described above is sequentially applied to all the pixels constituting the image, and the application processing is executed for each pixel. In the application processing, as shown in the equation in the figure, all the products of the original pixel values and the weight values in each matrix are added, and this is divided by the sum total of the weight values. Thus, a new pixel value of the target pixel 13 is obtained.

【0022】なお、画素値は、カラー画像の場合例えば
赤、緑、青の3色の色成分を持つ。各色成分の画素値
は、それぞれ例えば8ビットの濃度レベルを示してお
り、それぞれについて上記のような重み付けフィルタを
用いた平滑化処理が行なわれる。以上の処理によって、
視点から見て手前にある画像のぼやけの影響は後方にあ
る画像に及び、その影響の度合は焦平面からの距離にほ
ぼ比例する。また、後方の画像は画像上で現われている
部分についてのみぼやけが表現され、手前の画像に対し
ては一切そのぼやけの影響が及ばず、焦平面に近い画像
をぼやけさせることがない。
In the case of a color image, the pixel values have, for example, three color components of red, green and blue. The pixel value of each color component indicates, for example, an 8-bit density level, and a smoothing process using the above-mentioned weighting filter is performed on each pixel value. By the above processing,
The effect of blurring of the image in the foreground from the viewpoint extends to the image in the rear, and the degree of the effect is almost proportional to the distance from the focal plane. Also, in the rear image, only the portion appearing on the image is blurred, and the image in front is not affected by the blur at all, and the image close to the focal plane is not blurred.

【0023】本発明は以上の実施例に限定されない。上
記実施例において使用した奥行き情報やぼやけ半径の値
は、形式的には上記以外の自由な表現で求めるようにし
てよく、また重み付けフィルタの構成は7×7マトリク
スに限らず、要求される合成画像の品質に応じて自由な
大きさに選定して差し支えない。
The present invention is not limited to the above embodiment. The values of the depth information and the blur radius used in the above embodiment may be formally obtained by any other expression other than the above, and the configuration of the weighting filter is not limited to the 7 × 7 matrix but may be the required synthesis. Any size can be selected according to the quality of the image.

【0024】[0024]

【発明の効果】以上説明した本発明の3次元画像生成方
法によれば、奥行き情報を含めて生成された3次元画像
に対して、この奥行き情報を用いて基準位置からの離間
距離に応じたぼやけの効果の及ぶ範囲を示すぼやけ半径
を求め、さらに画像中の注目画素を中心とする一定の領
域内に含まれる周辺画素について、注目画素の画素値を
決定するための重み付け値を計算し、マトリクス状の重
み付けフィルタを得て、画像の平滑化処理を施すように
したので、演算時間を十分に短縮することができる。
た、離間距離に応じたぼやけ半径を設定することによっ
て、基準位置から離れる程ぼやけの大きい自然に近い画
像を得ることができる。さらに、重み付け対象の周辺画
素を予め選定し、手前の画像に対し後方の画像のぼやけ
の影響がないよう平滑化処理を行なうようにしたので、
不自然なぼやけの影響を阻止し、より自然に近い3次元
画像を生成することができる。
According to the three-dimensional image generation method of the present invention described above, a three-dimensional image generated including depth information is used in accordance with the distance from a reference position using the depth information. Obtain a blur radius indicating the range of the effect of the blur, and further calculate a weighting value for determining a pixel value of the pixel of interest with respect to peripheral pixels included in a certain area centered on the pixel of interest in the image, Since a matrix weighting filter is obtained and the image is smoothed, the calculation time can be sufficiently reduced. Ma
In addition, by setting the blur radius in accordance with the separation distance, it is possible to obtain an image closer to nature with a larger blur as the distance from the reference position increases. In addition, the peripheral image to be weighted
Since the element is selected in advance, the smoothing process is performed on the image in front so as not to be affected by the blur of the image behind,
The effect of unnatural blur can be prevented, and a more natural three-dimensional image can be generated.

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

【図1】本発明の3次元画像生成方法説明図である。FIG. 1 is an explanatory diagram of a three-dimensional image generation method according to the present invention.

【図2】ピンホールカメラによる結像作用説明図であ
る。
FIG. 2 is an explanatory diagram of an image forming operation by a pinhole camera.

【図3】レンズによる結像作用説明図である。FIG. 3 is an explanatory diagram of an image forming operation by a lens.

【図4】ピンホールカメラの画像説明図である。FIG. 4 is an explanatory diagram of an image of a pinhole camera.

【図5】レンズによる画像説明図である。FIG. 5 is an explanatory diagram of an image by a lens.

【図6】従来の生成画像例説明図である。FIG. 6 is an explanatory diagram of a conventional generated image example.

【図7】本発明の方法実施のための装置ブロック図であ
る。
FIG. 7 is an apparatus block diagram for implementing the method of the present invention.

【図8】本発明の方法の概略動作フローチャートであ
る。
FIG. 8 is a schematic operational flowchart of the method of the present invention.

【図9】本発明によるぼやけ半径計算法説明図である。FIG. 9 is an explanatory diagram of a blur radius calculation method according to the present invention.

【図10】重み付けフィルタのマトリクス形状説明図で
ある。
FIG. 10 is an explanatory diagram of a matrix shape of a weighting filter.

【図11】注目画素までの距離Deの演算テーブル説明
図である。
FIG. 11 is an explanatory diagram of a calculation table of a distance De to a target pixel.

【図12】函数f(R(Z))の演算テーブル説明図で
ある。
FIG. 12 is an explanatory diagram of a calculation table of a function f (R (Z)).

【図13】本発明による重み付けフィルタとその適用処
理説明図である。
FIG. 13 is a diagram illustrating a weighting filter according to the present invention and its application processing.

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

1−1〜1−3 物体 2 元画像 10 視点 11 重み付けフィルタ 13 注目画素 12 生成画像 Z 奥行き情報 R ぼやけ半径 1-1 to 1-3 Object 2 Original image 10 Viewpoint 11 Weighting filter 13 Target pixel 12 Generated image Z Depth information R Blur radius

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 視点から離れる奥行き方向の距離を各画
素毎に奥行き情報として含む3次元画像からぼやけを付
与する3次元画像を生成する方法であって、 前記奥行き方向に所定の基準位置を設定すると共に、前
記各画素毎に前記各奥行き情報から前記基準位置に対す
る離間距離をそれぞれ求め、 次に、前記各画素毎に、他の周囲の画素に対するぼやけ
の影響を与える円領域を仮定するために、前記各離間距
離に基づく半径をぼやけ半径として設定し、 次に、新たな画素値を設定すべくいずれかの画素を注目
画素とし、かつ該注目画素を中心とする所定数の各周辺
画素に対し、対応する前記各ぼやけ半径に基づいてそれ
ぞれ重み付け値を設定して重み付けフィルタを作成する
と共に、 前記周辺画素の前記離間距離が前記注目画素のそれより
大きいと該周辺画素を重み付け対象から除去し、 かつ前記周辺画素の前記ぼやけ半径が該周辺画素から前
記注目画素までの距離より小さいと該周辺画素を重み付
け対象から除去し、 前記重み付けフィルタを用いた演算処理にて前記注目画
素の画素値を設定することを特徴とする3次元画像生成
方法。
The distance in the depth direction away from the viewpoint is determined for each image.
Adds blur from 3D images containing depth information for each element
A method for generating a three-dimensional image to be given , comprising: setting a predetermined reference position in the depth direction;
From each of the depth information for each pixel,
Of each of the pixels , and then, for each of the pixels, a blur with respect to other surrounding pixels.
Each of the above separation distances is assumed to
Set the radius based on the separation as the blur radius, and then focus on one of the pixels to set a new pixel value
Pixels and a predetermined number of each periphery around the pixel of interest
For the pixel, it is based on each corresponding blur radius
Create weighting filters by setting weighting values
At the same time, the separation distance of the peripheral pixel is larger than that of the pixel of interest.
If it is larger, the peripheral pixel is removed from the weighting target, and the blur radius of the peripheral pixel is
If the distance to the pixel of interest is smaller than
From the target image, and perform the arithmetic processing using the weighting filter.
3D image generation characterized by setting elementary pixel values
Method.
JP4257144A 1992-09-01 1992-09-01 3D image generation method Expired - Lifetime JP3058769B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4257144A JP3058769B2 (en) 1992-09-01 1992-09-01 3D image generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4257144A JP3058769B2 (en) 1992-09-01 1992-09-01 3D image generation method

Publications (2)

Publication Number Publication Date
JPH0683955A JPH0683955A (en) 1994-03-25
JP3058769B2 true JP3058769B2 (en) 2000-07-04

Family

ID=17302329

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4257144A Expired - Lifetime JP3058769B2 (en) 1992-09-01 1992-09-01 3D image generation method

Country Status (1)

Country Link
JP (1) JP3058769B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3668019B2 (en) * 1998-10-27 2005-07-06 株式会社ソニー・コンピュータエンタテインメント Recording medium, image processing apparatus, and image processing method
EP1705929A4 (en) * 2003-12-25 2007-04-04 Brother Ind Ltd Image display device and signal processing device
JP4506219B2 (en) * 2004-03-18 2010-07-21 ブラザー工業株式会社 Image display device and image display system
JP2009519625A (en) * 2005-12-02 2009-05-14 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Depth-dependent filtering of image signals
JP5509487B2 (en) * 2008-06-06 2014-06-04 リアルディー インコーポレイテッド Enhanced blur of stereoscopic images

Also Published As

Publication number Publication date
JPH0683955A (en) 1994-03-25

Similar Documents

Publication Publication Date Title
KR101168384B1 (en) Method of generating a depth map, depth map generating unit, image processing apparatus and computer program product
EP1303839B1 (en) System and method for median fusion of depth maps
US8213708B2 (en) Adjusting perspective for objects in stereoscopic images
JP5536115B2 (en) Rendering of 3D video images on stereoscopic display
US6717586B2 (en) Apparatus, method, program code, and storage medium for image processing
TWI441095B (en) Distance evaluation methods and apparatuses, and machine readable medium thereof
US20050195478A1 (en) Apparatus for and method of generating image, and computer program product
US11189041B2 (en) Image processing apparatus, control method of image processing apparatus, and non-transitory computer-readable storage medium
JP5175065B2 (en) 3D graphics rendering method and apparatus for efficiently providing motion blur effect
CN109711246B (en) Dynamic object recognition method, computer device and readable storage medium
JP7032871B2 (en) Image processing equipment and image processing methods, programs, storage media
CN111275801A (en) Three-dimensional picture rendering method and device
WO2019198570A1 (en) Video generation device, video generation method, program, and data structure
JP2023172882A (en) Three-dimensional representation method and representation apparatus
EP3982629A1 (en) Method and apparatus for measuring dynamic crosstalk
JP3058769B2 (en) 3D image generation method
KR101208767B1 (en) Stereoscopic image generation method, device and system using circular projection and recording medium for the same
US20130342536A1 (en) Image processing apparatus, method of controlling the same and computer-readable medium
KR102587298B1 (en) Real-time omnidirectional stereo matching method using multi-view fisheye lenses and system therefore
JP2013027023A (en) Image processing device and image processing method, and program
Fearing Importance ordering for real-time depth of field
JPH09179998A (en) Three-dimensional image display system
JPH11120359A (en) Image processor, its method and transmission medium
CN116188668B (en) Shadow rendering method, medium and electronic device based on IOS platform
CN113487746B (en) Optimal associated image selection method and system in vehicle-mounted point cloud coloring