JPH0683955A - Three-dimensional image generating method - Google Patents

Three-dimensional image generating method

Info

Publication number
JPH0683955A
JPH0683955A JP4257144A JP25714492A JPH0683955A JP H0683955 A JPH0683955 A JP H0683955A JP 4257144 A JP4257144 A JP 4257144A JP 25714492 A JP25714492 A JP 25714492A JP H0683955 A JPH0683955 A JP H0683955A
Authority
JP
Japan
Prior art keywords
image
pixel
focal plane
value
weighting filter
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.)
Granted
Application number
JP4257144A
Other languages
Japanese (ja)
Other versions
JP3058769B2 (en
Inventor
Shinichi Murata
伸一 村田
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

Landscapes

  • Image Processing (AREA)
  • Image Generation (AREA)

Abstract

PURPOSE:To obtain a three-dimensional image which is short in arithmetic time and close to a natural image and has no influence of the defocusing of a body behind a body on a focal plane upon an image of the latter body by giving respective pixels defocusing effects corresponding to the distances from the focal plane. CONSTITUTION:Depth information Z regarding the distance from a view point 10 to each body and a radius R of defocusing which corresponds to the distance from the focal plane to each body and allows the defocusing effects are prepared for each of pixels constituting an original image 2, and a weighting filter 11 which determines the pixel value of an aimed pixel 13 by using said values is obtained. The weighting filter 11 performs arithmetic processing so that peripheral pixels which are larger in depth-directional distance than the aimed pixel and peripheral pixels in a place larger than the defocusing radius are not affected.

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 a perspective image 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 perspective stereoscopic image and display it on a display.

【0003】ここで、従来一般のカメラによって光学的
に映し出された像の説明を行なう。図2はピンホールカ
メラによる結像作用説明図である。図において、例えば
3個の物体A、B、Cがそれぞれピンホール3から適当
な距離だけ離れて位置しているものとする。この場合ピ
ンホール3によってこれらの物体の像が結像面4に結像
する。これらの像はピンホール3が十分面積の小さいも
のであれば、いずれも正確にピントの合った画像とな
る。通常、コンピュータグラフィックスによって得られ
る元画像は、この図2に示すようなピンホールカメラに
よる画像と同様に、何れもその奥行き方向の位置にかか
わらずピントが合ったものとなる。
An image optically projected by a conventional camera will be described below. FIG. 2 is an explanatory diagram of an image forming operation by the pinhole camera. In the figure, for example, it is assumed that three objects A, B, and C are respectively located at appropriate distances from the pinhole 3. In this case, the images of these objects are formed on the image plane 4 by the pinhole 3. All of these images are accurately focused images if the area of the pinhole 3 is sufficiently small. Usually, the original image obtained by computer graphics is in focus regardless of the position in the depth direction, like the image 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 action by the 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, the object B
On the other hand, when the lens 5 is in focus, the object B has a clear image on the image plane 4. However, the object A and the object C are in a so-called image-blurred state because the position where the image is formed is in front of or behind the image plane 4. A plane parallel to the image plane 4 and in focus, that is, a 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 shows an image explanatory view of the pinhole camera, and FIG. 5 shows an image explanatory view by a lens. As shown in FIG. 4, in the case of the pinhole camera, the images are all 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 on the focal plane is accurately focused and a clear image is projected,
The objects A and C arranged before and after that are displayed in a defocused state.

【0006】[0006]

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

【0007】しかしながら、このような方法では複数枚
の画像をまず生成するために膨大な演算を実行する必要
があり、処理時間が長時間になるという問題があった。
この他に従来、一枚の画像全体を一様にぼやけさせる方
法がある。この方法は画像の各画素に同一の重み付けフ
ィルタを用いた平滑化処理を施し、奥行きの度合に関係
なく一様にぼやけの影響が及ぶ。
However, such a method has a problem in that a huge amount of calculation must be executed in order to first generate a plurality of images, and the processing time becomes long.
In addition to this, conventionally, there is a method of uniformly blurring an entire image. In this method, each pixel of the image is subjected to smoothing processing using the same weighting filter, and blurring affects uniformly 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 the weighting filter has a problem that the object B on the focal plane is also affected by the smoothing of the weighting filter and is blurred. In addition, the influence of the blur of the object behind, which should not be seen because it is hidden behind the object in front,
There was also the problem of reaching the object in front. The present invention has been made in view of the above points, and an object of the present invention is to provide a three-dimensional image generation method that executes a process for obtaining an image close to nature in which the depth perception effect is enhanced.

【0009】[0009]

【課題を解決するための手段】本発明の3次元画像生成
方法は、奥行き方向の位置を示す奥行き情報を含めて生
成された3次元画像に対して、ピントが合っているとす
る奥行き方向の位置における、奥行き方向に垂直な平面
を焦平面と呼ぶとき、前記画像を構成する各画素毎に、
前記焦平面からの離間距離に応じたぼやけの効果を与え
るための範囲を示すぼやけ半径を求め、前記画像中の注
目画素を中心とする一定の領域内に含まれる各周辺画素
について、前記奥行き情報と前記ぼやけ半径とから、前
記注目画素の画素値を決定するための重み付け値を計算
してマトリクス状の重み付けフィルタを得て、前記画像
を構成する全画素に対して、前記重み付けフイルタを用
いた平滑化処理を施すことを特徴とするものである。
A three-dimensional image generation method according to the present invention is a method for generating a three-dimensional image generated by including depth information indicating a position in the depth direction. When the plane perpendicular to the depth direction at the position is called the focal plane, for each pixel forming the image,
A depth of blur is calculated for each peripheral pixel included in a certain area centered on the pixel of interest in the image, by obtaining a blur radius indicating a range for providing a blur effect according to the distance from the focal plane. From the blur radius and the blur radius, a weighting value for determining the pixel value of the pixel of interest is calculated to obtain a matrix-shaped weighting filter, and the weighting filter is used for all pixels forming the image. It is characterized by performing a smoothing process.

【0010】[0010]

【作用】この方法では、奥行き方向の位置を数値を使っ
て表した奥行き情報を含めて生成された3次元画像を用
意する。また、各画素毎に焦平面の奥行き方向の数値と
その画素の奥行き方向の数値の差に応じた、ぼやけの効
果の及ぶ範囲を定めるぼやけ半径Rを求める。さらに、
注目画素の色や濃度を定める画素値を決定するために、
重み付けフィルタを得る。この重み付けフィルタは、処
理対象となる注目画素についての画素値演算に使用す
る。注目画素より奥行き方向の距離が遠い画素や、注目
画素までの距離がぼやけ半径よりも大きい場所にある周
辺画素は、注目画素に影響を及ぼさない。それ以外の周
辺画素はぼやけ半径の中に含まれる画素数の逆数に相当
する影響を注目画素に与える。この方法によれば、各画
素に対し、焦平面からの離間距離に応じたぼやけの効果
が与えられる。ぼやけ処理は一枚の画像に対して行なわ
れるため、演算処理に必要な時間が短い。また、焦平面
にある物体の画像にその後方にある物体のぼやけが影響
を及ぼさず自然に近い3次元画像が得られる。
In this method, a three-dimensional image is prepared which includes depth information in which the position in the depth direction is numerically represented. Further, for each pixel, a blur radius R that determines the range of the blur effect is calculated according to the difference between the numerical value in the depth direction of the focal plane and the numerical value in the depth direction of the pixel. further,
To determine the pixel value that determines the color and density of the pixel of interest,
Get the weighting filter. This weighting filter is used for pixel value calculation for the target pixel to be processed. Pixels whose distance in the depth direction is farther than the pixel of interest or peripheral pixels located at a distance to the pixel of interest larger than the blur radius do not affect the pixel of interest. Other peripheral pixels have an effect on the pixel of interest corresponding to the reciprocal of the number of pixels included in the blur radius. According to this method, a blurring effect according to the distance from the focal plane is given to each pixel. Since the blurring process is performed on one image, the time required for the calculation process is short. Further, the image of the object on the focal plane is not affected by the blur of the object behind it, and a three-dimensional image close to nature can be obtained.

【0011】[0011]

【実施例】以下、本発明の実施例を図を用いて詳細に説
明する。図1は本発明の3次元画像生成方法実施例を示
す説明図である。本発明の方法を概略説明すれば図のよ
うになる。まず、3次元的に配置された物体を、視点1
0から射影変換によって、即ち視点10から眺めたまま
の形のピントの合った元画像2を生成する。この図では
簡単のために奥行き方向の位置Z1、Z2、Z3に四角
形の平板状の物体が配置されている。このとき、Zバッ
ファアルゴリズムによって図のように隠面消去が行なわ
れる。また、元画像の生成を通して、Zバッファには元
画像の各画素に対応する奥行き方向の位置を示す奥行き
情報Zが格納される。即ち、奥行き情報はZ1、Z2、
Z3といった値となる。
Embodiments of the present invention will be described in detail below with reference to the drawings. FIG. 1 is an explanatory diagram showing an embodiment of a three-dimensional image generation method of the present invention. The method of the present invention will be outlined below. First, the viewpoint 1
From 0, the original image 2 in focus is generated by projective transformation, that is, as it is seen from the viewpoint 10. In this figure, for the sake of simplicity, a quadrangular plate-like object is arranged at positions Z1, Z2, Z3 in the depth direction. At this time, hidden surface removal is performed as shown in the figure by the Z-buffer algorithm. Further, through the generation of the original image, depth information Z indicating the 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
Then, the blur radius R of each pixel of the original image is obtained from the depth information Z. Letting Z2 be the depth information of the focal plane that is in focus, the blur radius R is a radius indicating a range affected by the blur, which is approximately proportional to the difference between the depth information of each pixel and the depth information of the focal plane. And the value corresponding to.
When the generated image 12 is obtained, the original image is smoothed by using the weighting filter 11 obtained based on the depth information and the blur radius of the target pixel and its peripheral pixels, and the pixel value of the target pixel is determined. 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 a block diagram of an apparatus for carrying out 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 is composed of a CPU (central processing unit) 21 and a memory 23 connected to the CPU 21 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 the image to be processed. The depth information Z described above with reference to FIG. 1 is stored in the Z buffer 25 in association with each pixel forming an image. In the R buffer 26, the blur radius R is similarly stored in association with each pixel. The generated image data buffer 27 stores the generated image that has been finally subjected to the blurring process.

【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 carried out by executing the processing from step S1 to step S4 as shown in the figure. Step S1 is a blur radius generation process, which is a process for obtaining a blur radius for each pixel forming an image based on the depth information thereof. Step S2 is a step of determining whether or not the process has been completed for all pixels. Further, step S3 is a process for generating a weighting filter necessary for the smoothing process for obtaining the pixel value of each target pixel. Step S4 is a part where the weighting filter is actually used to execute the smoothing process for each pixel of interest.

【0015】以下、上記フローチャートの各動作につい
て具体的にその内容を説明する。図9に本発明によるぼ
やけ半径計算法説明図を示す。この図において、Zは奥
行き情報、R(Z)はぼやけ半径、Cは元画像データを
生成するときの座標変換に関係する一定の常数、Fは焦
平面の位置の奥行き情報、Z−Fは焦平面からの離間距
離を表わしている。具体的には図の物体1−2が配置さ
れた場所が焦平面の位置であり、その奥行き情報Z2は
ここではFに等しい。また、例えば物体1−3の奥行き
情報はZ3であるから、焦平面からの離間距離はZ3−
Fとなる。
The details of each operation of the above-mentioned flowchart will be described below. FIG. 9 shows an explanatory diagram of a blur radius calculation method 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 conversion when generating original image data, F is depth information at the position of the focal plane, and Z-F is It represents the distance from the focal plane. Specifically, the position where the object 1-2 in the figure is arranged is the position of the focal plane, and the depth information Z2 thereof is equal to F here. Further, for example, since the depth information of the object 1-3 is Z3, the distance from the focal plane is Z3-.
It becomes 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, a point 8-2 on the focal plane object 1-2 is shown.
Does not need to cause blurring on the target image, but points 8-3 and 8-1 on the other objects 1-3 and 1-1 need to cause constant blurring. In the present invention, the degree of blurring is determined according to the distance from the focal plane. The coefficient is the constant C. Therefore, the blur radius R (Z) is the product of C and the absolute value of Z-F.
In this embodiment, in order to prevent the influence of blurring from spreading infinitely, the blur radius R (Z) is focused only when the absolute value of Z-F is equal to or less than the limit value D, as shown in the lower part of the figure. It is determined in accordance with the distance Z-F from the plane, and in other cases, the blur radius R (Z) is a constant C
And the limit value D will be represented by 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 shows a matrix shape explanatory diagram of the weighting filter. The weighting filter is, for example, 7 × 7 in this embodiment.
It consists of matrix operators. Here, in the figure, the target pixel 13 is displayed as fc, and the peripheral pixels 14 are displayed as fe. The pixel of interest 13 is a pixel to be processed in the image. In addition, the peripheral pixels 14 are pixels within a certain range that should be taken into consideration in order to determine the pixel value of the target pixel 13. That is, in this weighting filter, each of the 48 peripheral pixels 14 included in the matrix is
The degree to which each of the three is affected by blur is quantified. The weighting values thus obtained are added and averaged to determine the pixel value of the target pixel 13.

【0018】上記のような重み付けフィルタを生成する
ためには、まず図11や図12に示す演算テーブルを必
要とする。図11は注目画素までの距離Deの演算テー
ブル説明図である。この演算テーブルは、各周辺画素か
ら注目画素13までの距離Deを求めるためのテーブル
である。図のように、横方向に1ドット、2ドット、3
ドットそれぞれ離れた画素について、その距離Deを
1、2、3と設定すれば、注目画素13までの距離をそ
れぞれ縦横斜め方向に計算により求めることができる。
その結果をテーブル化し演算テーブルとしておけば、図
10に示した重み付けフィルタのマトリクスとこの演算
テーブルとを対応させて、周辺画素14から注目画素1
3までの距離を直ちに求めて、ぼやけ半径と比較するこ
とができる。
In order to generate the weighting filter as described above, first, the calculation tables shown in FIGS. 11 and 12 are required. FIG. 11 is an explanatory diagram of a calculation table of the distance De to the pixel of interest. This calculation table is a table for obtaining the distance De from each peripheral pixel to the target pixel 13. 1 dot, 2 dots, 3 in the horizontal direction as shown
If the distances De are set to 1, 2, and 3 for the pixels separated from each other, the distances to the target pixel 13 can be calculated in the vertical and horizontal diagonal directions.
If the result is made into a table and used as an operation table, the matrix of the weighting filter shown in FIG.
The distance to 3 can be found immediately and compared with 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 shows an explanatory diagram of the calculation table of the function f (R (Z)). The function f (R (Z)) indicates each weighting value on the matrix of the weighting filter. Figure 1
The calculation table No. 2 is used when the weighting value is obtained from the blur radius R. As shown in the figure, this value counts the number of pixels included in the blur radius R of the peripheral pixels 14, and the value of the function f (R (Z)) corresponding to the blur radius R (Z) is calculated as the blur radius. It is represented by the reciprocal of the number of pixels inside. Therefore, when the blur radius is 1 or less, that is, when it does not affect the surrounding pixels, the value of the function f (R (Z)) becomes 1, and the function f (R
The value of (Z)) becomes smaller. When the blur radius R has a value that is equal to or larger than the calculation table in the figure, the value falls outside 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 for explaining the weighting filter according to the present invention and its application processing. The weighting filter 11 as shown in the drawing is generated by using the above-mentioned calculation 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
When 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, with respect to a pixel whose depth direction is farther than the pixel of interest, it is inconvenient if a blurring effect is exerted on the image in front, so the weighting value is forcibly set to 0. If the pixel of interest 13 does not enter the circle of the blur radius, the weighting value is 0 so that the pixel of interest 13 is not affected by the blur of the pixel.
I am trying to become.

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

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

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

【0024】[0024]

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

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

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

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

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

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

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

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

【図7】本発明の方法実施のための装置ブロック図であ
る。
FIG. 7 is a block diagram of an apparatus for performing 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 a diagram illustrating 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 pixel of interest.

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

【図13】本発明による重み付けフィルタとその適用処
理説明図である。
FIG. 13 is an explanatory diagram of 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 Binary Image 10 Viewpoint 11 Weighting Filter 13 Target Pixel 12 Generated Image Z Depth Information R Blurring Radius

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 奥行き方向の位置を示す奥行き情報を含
めて生成された3次元画像に対して、 ピントが合っているとする奥行き方向の位置における、
奥行き方向に垂直な平面を焦平面と呼ぶとき、 前記画像を構成する各画素毎に、前記焦平面からの離間
距離に応じたぼやけの効果を与えるための範囲を示すぼ
やけ半径を求め、 前記画像中の注目画素を中心とする一定の領域内に含ま
れる各周辺画素について、前記奥行き情報と前記ぼやけ
半径とから、前記注目画素の画素値を決定するための重
み付け値を計算してマトリクス状の重み付けフィルタを
得て、 前記画像を構成する全画素に対して、前記重み付けフイ
ルタを用いた平滑化処理を施すことを特徴とする3次元
画像生成方法。
1. A three-dimensional image generated including depth information indicating a position in the depth direction, at a position in the depth direction that is in focus,
When a plane perpendicular to the depth direction is called a focal plane, for each pixel forming the image, a blur radius indicating a range for providing a blur effect according to a distance from the focal plane is obtained, For each peripheral pixel included in a certain area centered on the target pixel, a weighting value for determining the pixel value of the target pixel is calculated from the depth information and the blur radius to form a matrix. A three-dimensional image generation method, wherein a weighting filter is obtained, and smoothing processing using the weighting filter is performed on all pixels forming the image.
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 true JPH0683955A (en) 1994-03-25
JP3058769B2 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000025269A1 (en) * 1998-10-27 2000-05-04 Sony Computer Entertainment Inc. Recording medium, image processing device, and image processing method
WO2005067319A1 (en) * 2003-12-25 2005-07-21 Brother Kogyo Kabushiki Kaisha Image display device and signal processing device
JP2005267185A (en) * 2004-03-18 2005-09-29 Brother Ind Ltd Image display device and signal processing apparatus
JP2009519625A (en) * 2005-12-02 2009-05-14 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Depth-dependent filtering of image signals
JP2011523306A (en) * 2008-06-06 2011-08-04 リアルディー インコーポレイテッド Enhanced blur of stereoscopic images

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000025269A1 (en) * 1998-10-27 2000-05-04 Sony Computer Entertainment Inc. Recording medium, image processing device, and image processing method
WO2005067319A1 (en) * 2003-12-25 2005-07-21 Brother Kogyo Kabushiki Kaisha Image display device and signal processing device
US8089506B2 (en) 2003-12-25 2012-01-03 Brother Kogyo Kabushiki Kaisha Image display apparatus and signal processing apparatus
JP2005267185A (en) * 2004-03-18 2005-09-29 Brother Ind Ltd Image display device and signal processing apparatus
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
US8624964B2 (en) 2005-12-02 2014-01-07 Koninklijke Philips N.V. Depth dependent filtering of image signal
US9595128B2 (en) 2005-12-02 2017-03-14 Koninklijke Philips N.V. Depth dependent filtering of image signal
JP2011523306A (en) * 2008-06-06 2011-08-04 リアルディー インコーポレイテッド Enhanced blur of stereoscopic images

Also Published As

Publication number Publication date
JP3058769B2 (en) 2000-07-04

Similar Documents

Publication Publication Date Title
EP3496383A1 (en) Image processing method, apparatus and device
EP1303839B1 (en) System and method for median fusion of depth maps
US6717586B2 (en) Apparatus, method, program code, and storage medium for image processing
EP0610080B1 (en) Apparatus and method for defocusing images
US11189041B2 (en) Image processing apparatus, control method of image processing apparatus, and non-transitory computer-readable storage medium
CN109711246B (en) Dynamic object recognition method, computer device and readable storage medium
CN111275801A (en) Three-dimensional picture rendering method and device
US20070206025A1 (en) Image Processor and Method, Computer Program, and Recording Medium
JP7479729B2 (en) Three-dimensional representation method and device
WO2020187339A1 (en) Naked eye 3d virtual viewpoint image generation method and portable terminal
US20190355101A1 (en) Image refocusing
JPH0683955A (en) Three-dimensional image generating method
JP3629243B2 (en) Image processing apparatus and method for rendering shading process using distance component in modeling
CN114677393B (en) Depth image processing method, depth image processing device, image pickup apparatus, conference system, and medium
JP2002032744A (en) Device and method for three-dimensional modeling and three-dimensional image generation
CN107534729B (en) Image processing apparatus, image processing method, and program
CN113724129B (en) Image blurring method, storage medium and terminal equipment
JPH11242753A (en) Method and device for three-dimensional plotting
JP2022064148A (en) Image processing apparatus and image processing method
Fearing Importance ordering for real-time depth of field
JPH0772915B2 (en) Graphic shading device
JPS63259778A (en) Image data displaying method
JP2000322594A (en) Device and method for displaying image and storage medium with display program stored therein
CN113487746B (en) Optimal associated image selection method and system in vehicle-mounted point cloud coloring
JP2019192048A (en) Imaging apparatus