JP2004133919A - Device and method for generating pseudo three-dimensional image, and program and recording medium therefor - Google Patents

Device and method for generating pseudo three-dimensional image, and program and recording medium therefor Download PDF

Info

Publication number
JP2004133919A
JP2004133919A JP2003326818A JP2003326818A JP2004133919A JP 2004133919 A JP2004133919 A JP 2004133919A JP 2003326818 A JP2003326818 A JP 2003326818A JP 2003326818 A JP2003326818 A JP 2003326818A JP 2004133919 A JP2004133919 A JP 2004133919A
Authority
JP
Japan
Prior art keywords
pseudo
dimensional image
image generation
pixel
images
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
JP2003326818A
Other languages
Japanese (ja)
Other versions
JP3938122B2 (en
Inventor
Hajime Noto
能登 肇
Yasuo Ishigure
石榑 康雄
Akihiko Hashimoto
橋本 秋彦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2003326818A priority Critical patent/JP3938122B2/en
Publication of JP2004133919A publication Critical patent/JP2004133919A/en
Application granted granted Critical
Publication of JP3938122B2 publication Critical patent/JP3938122B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide a pseudo three-dimensional image generating device which is small in size and can easily be used, and to provide a pseudo three-dimensional image generating method. <P>SOLUTION: Simulative depth information of a photographing object is generated from a plurality of images photographed with the existence/absence of illumination for the photographing object or by changing the intensity of the illumination. This pseudo three-dimensional image generating device is provided with an image recording means 13 for recording a plurality of images and an operating means 14 for calculating discrete depth data of the photographing object on the basis of a comparison operation of pixel values of corresponding pixels in the plurality of images and calculating a simulative depth value on the basis of the discrete depth data, and generates a pseudo-three-dimensional image. According to the present invention, a small and simple three-dimensional image image generating device can be generated. <P>COPYRIGHT: (C)2004,JPO

Description

 本発明は、画像から擬似3次元画像を生成する画像生成装置および方法並びにそのためのプログラムおよび記録媒体に関する。 The present invention relates to an image generating apparatus and method for generating a pseudo three-dimensional image from an image, and a program and a recording medium therefor.

 従来から、物体の3次元画像を入力するために様々な方法が用いられている。3次元画像入力方法はパッシブ法とアクティブ法の2つに大別することができ、例えばパッシブ法の代表例としてステレオ法、アクティブ法の代表例として光切断法がある。 Conventionally, various methods have been used to input a three-dimensional image of an object. The three-dimensional image input method can be roughly divided into two methods, a passive method and an active method. For example, a stereo method is a typical example of the passive method, and a light section method is a typical example of the active method.

 ステレオ法は2台の撮影装置をある間隔で配置し、同一の撮影対象に対する両者の画像内における投影位置の違い、すなわち対応点の差から三角測量の原理によって撮影対象の位置を求める方法である。また光切断法はスリット光投影装置と撮影装置をある間隔で配置し、撮影対象に投影したスリット光が撮影装置の画像内に投影される位置から三角測量の原理によって撮影対象の位置を求める方法である。 The stereo method is a method in which two photographing devices are arranged at a certain interval, and the position of the photographing target is obtained from the difference between the projection positions of the same photographing target in both images, that is, the difference between corresponding points, based on the principle of triangulation. . The light cutting method is a method in which a slit light projecting device and a photographing device are arranged at a certain interval, and a position of the photographing object is obtained from the position where the slit light projected on the photographing object is projected in the image of the photographing device by the principle of triangulation. It is.

 被写体に照明光を照射し奥行き値を得る技術としては、被写体に対して少なくとも被写体上の位置によって明るさが変化する照明(例えば、左から右に明るさが増加するような照明)を照射して、各光強度ごとの反射光を検出し、三角測量の原理を用いて奥行き値を求める方法がある。しかし、この技術では、奥行き値の算出に三角測量の原理を用いているため、カメラと照明装置との間に一定の距離を設ける必要があり、装置の小型化は困難である(例えば特許文献1参照。)。 As a technique for irradiating a subject with illumination light to obtain a depth value, the subject is illuminated with illumination whose brightness changes at least depending on a position on the subject (for example, illumination whose brightness increases from left to right). Then, there is a method of detecting reflected light for each light intensity and obtaining a depth value using the principle of triangulation. However, in this technique, since the principle of triangulation is used for calculating the depth value, it is necessary to provide a certain distance between the camera and the lighting device, and it is difficult to reduce the size of the device (for example, see Patent Document 1). 1).

 また、上記と別の技術として、被写体に対して光強度が時間とともに変化する強度変調照明光を照射して、その反射光の強度から、光の伝搬時間によって被写体までの距離を算出するいわゆるTime of flightの原理を用いて奥行き値を求める方法がある。しかし、この技術では、強度変調照明光を投影するための特殊な照明装置と強度変調照明光の変化を捉えるための高速シャッターを備えたカメラとが必要であり、装置の低コスト化には向いていない(例えば特許文献2参照。)。 Further, as another technique, a so-called Time that irradiates an object with intensity-modulated illumination light whose light intensity changes with time and calculates the distance to the object from the intensity of the reflected light based on the light propagation time. There is a method of obtaining a depth value using the principle of of flight. However, this technique requires a special illumination device for projecting the intensity-modulated illumination light and a camera having a high-speed shutter for capturing changes in the intensity-modulated illumination light, which is suitable for reducing the cost of the device. (For example, see Patent Document 2).

 さらに、被写体の擬似奥行き値を得る技術としては、X線CT装置などを用いて得られた被写体の離散的な奥行き値ごとの分割画像に対して、分割画像作成に用いた透過画像の濃淡値から隣接する分割画像に滑らかにつながるよう奥行き値を擬似的に算出する方法がある。しかし、この技術では、X線CT装置などによって予め被写体の離散的な奥行き値ごとに分割された透過画像が得られていることが前提であり、医療などの特殊な用途以外への適用は困難である(例えば特許文献3参照。)。
特開2000−329524号公報 特開2000−121339号公報 特開平2−079179号公報
Further, as a technique for obtaining a pseudo depth value of a subject, a gradation value of a transmission image used for creating a divided image is compared with a divided image for each discrete depth value of the subject obtained using an X-ray CT apparatus or the like. There is a method in which a depth value is pseudo-calculated so as to be smoothly connected to an adjacent divided image. However, this technique is based on the premise that an X-ray CT apparatus or the like has previously obtained a transmission image divided for each discrete depth value of the subject, and it is difficult to apply the technique to a special purpose such as medical treatment. (For example, see Patent Document 3).
JP 2000-329524 A JP-A-2000-121339 JP-A-2-079179

 近年、携帯端末にカメラを搭載することが一般的になっている。カメラから取得される画像は2次元画像のみであるが、3次元画像の入力が可能になれば画像の活用の幅が広がり画像の利用分野が増大する。しかしながら従来法はパッシブ法・アクティブ法ともに三角測量の原理を用いているため、撮影装置やスリット光投影装置などの装置間にある程度の長い距離が必要であり小型化が難しく携帯端末向きではない。また一般的にパッシブ法は計測時間が短いが精度が低いため、入力された奥行き値から生成される画像のクオリティが低くなり、アクティブ法は精度が高いが計測時間が長いため工業用途向きである。さらに上述のその他の方法も特殊な装置が必要であるなどの理由から限定された用途向けである。 In recent years, it has become common to mount cameras on mobile terminals. The images acquired from the camera are only two-dimensional images. However, if three-dimensional images can be input, the range of use of the images is widened and the field of use of the images is increased. However, since the conventional method uses the principle of triangulation in both the passive method and the active method, a certain long distance is required between devices such as a photographing device and a slit light projecting device, so that miniaturization is difficult and not suitable for portable terminals. In general, the passive method has a short measurement time but low accuracy, so the quality of an image generated from the input depth value is low. The active method has high accuracy but a long measurement time, and is suitable for industrial use. . Furthermore, the other methods described above are also intended for limited applications, such as the need for special equipment.

 本発明は上記の課題を鑑みて発明されたものであり、小型で手軽に使用できる擬似3次元画像生成装置、3次元画像生成方法を提供することを目的とする。なお、本発明では真の距離が分からないときに、真の距離の代わりに当てはめる距離を擬似と定義する。 The present invention has been made in view of the above problems, and an object of the present invention is to provide a pseudo three-dimensional image generation device and a three-dimensional image generation method which are small and can be easily used. In the present invention, when the true distance is unknown, a distance to be applied instead of the true distance is defined as pseudo.

 本発明による擬似3次元画像生成装置は、複数の照明状態において撮影対象を撮影した複数の画像から、前記撮影対象の擬似的な3次元画像を生成する擬似3次元画像生成装置であって、前記複数の画像を記録する画像記録手段と、前記複数の画像における対応する画素の画素値の比較演算に基づいて、前記対応する画素の離散的奥行きデータを算出する画像演算手段と、前記離散的奥行きデータに基づいて、前記対応する画素の擬似的な奥行き値を算出する奥行き値算出手段とを備えることを特徴とするものである。 The pseudo three-dimensional image generation device according to the present invention is a pseudo three-dimensional image generation device that generates a pseudo three-dimensional image of the shooting target from a plurality of images obtained by shooting the shooting target in a plurality of lighting conditions, Image recording means for recording a plurality of images, image calculation means for calculating discrete depth data of the corresponding pixels based on a comparison operation of pixel values of corresponding pixels in the plurality of images, and the discrete depth Depth value calculating means for calculating a pseudo depth value of the corresponding pixel based on the data.

 本発明による3次元画像生成装置は、撮影対象に対して異なる照明条件での複数の画像を入力する。この複数の画像を比較することにより奥行き値を算出する。比較方法として例えば、照明条件として「照明有り」と「照明無し」を設定し、各条件下での画像の差分を取ったときに輝度差が大きいほど照明に近いとする。このとき算出される奥行き値は離散的であり、離散的奥行きをもった擬似3次元画像を生成することができる。また奥行き値が離散的にならないように、すべての奥行きが滑らかにつながる適当な連続関数を用いて算出すれば、書割現象を防ぎ観察者にクオリティの高い立体感を与える画像を生成することが可能である。 3 The three-dimensional image generation device according to the present invention inputs a plurality of images under different lighting conditions to a photographing target. The depth value is calculated by comparing the plurality of images. As a comparison method, for example, “illuminated” and “non-illuminated” are set as the illumination conditions, and when the difference between the images under each condition is calculated, the greater the difference in luminance, the closer to the illumination. The depth value calculated at this time is discrete, and a pseudo three-dimensional image having a discrete depth can be generated. Also, by calculating using an appropriate continuous function that smoothly connects all depths so that the depth values do not become discrete, it is possible to generate an image that prevents the writing phenomenon and gives the viewer a high quality stereoscopic effect. It is possible.

 本発明の他の目的、特長は図面を参照しながら以下の詳細な説明を読めば明らかとなる。 {Other objects and features of the present invention will become apparent from the following detailed description with reference to the drawings.

 以上述べたように本発明によれば以下に示すような効果が生じる。 よ う As described above, according to the present invention, the following effects are produced.

 本発明の一態様によれば、撮影装置と照明手段の距離を隣接させても良いため、従来の装置より小型化が可能となる。 According to one embodiment of the present invention, the distance between the photographing device and the lighting means may be adjacent to each other, so that the size can be reduced as compared with a conventional device.

 本発明の別の態様によれば、奥行きを算出するために用いる画像の解像度を低下させて、演算を行う画素数を減らすことができるため、計算負荷が少ない高速な処理が可能になる。 According to another aspect of the present invention, the resolution of an image used to calculate depth can be reduced to reduce the number of pixels on which calculations are performed, so that high-speed processing with a small calculation load can be performed.

 本発明のさらに別の態様によれば、単純な2値化処理の結果を擬似的な距離とすることにより、計算負荷が少ない高速な処理が可能となる。 According to another aspect of the present invention, high-speed processing with a small calculation load can be performed by using the result of the simple binarization processing as a pseudo distance.

 本発明のさらに別の態様によれば、複雑な計測処理をすることなく簡便に連続した擬似的な奥行き値を得ることができる。 According to another aspect of the present invention, a continuous pseudo depth value can be easily obtained without performing complicated measurement processing.

 本発明のさらに別の態様によれば、擬似的に計算した奥行き値の急激な変化による観察者の違和感を軽減することができる。 According to another aspect of the present invention, it is possible to reduce a sense of incongruity of an observer due to a sudden change in a depth value calculated in a pseudo manner.

 以下、本発明を実施するための最良の形態について詳しく説明する。
[第1の実施形態]
 図1は、本発明の第1の実施形態の擬似3次元画像生成装置を示すブロック図である。図1に示した擬似3次元画像生成装置10は、撮影対象を照明する照明手段12を備えたあるいは接続した撮影装置11に接続されている。擬似3次元画像生成装置10は、撮影対象の画像データを取り込み保持する画像記録手段13、照明の強弱が異なる撮影対象の複数の画像を比較することにより、撮影対象の擬似的な奥行き値の算出を行う演算手段14、上記各手段を制御する制御手段15により構成される。
Hereinafter, the best mode for carrying out the present invention will be described in detail.
[First Embodiment]
FIG. 1 is a block diagram showing a pseudo three-dimensional image generation device according to the first embodiment of the present invention. The pseudo three-dimensional image generating apparatus 10 shown in FIG. 1 is connected to a photographing apparatus 11 provided with or connected to an illuminating unit 12 for illuminating a photographing target. The pseudo three-dimensional image generation device 10 includes an image recording unit 13 that captures and holds image data of a photographing target, and calculates a pseudo depth value of the photographing target by comparing a plurality of images of the photographing target with different levels of illumination. And control means 15 for controlling each of the above means.

 図2は、図1に示した擬似3次元画像生成装置10が実行する擬似3次元画像生成方法を説明するためのフローチャートである。以下、擬似3次元画像生成装置10の動作を、図2に示す擬似3次元画像生成方法のフローチャートを用いて説明する。 FIG. 2 is a flowchart for explaining a pseudo three-dimensional image generation method executed by the pseudo three-dimensional image generation device 10 shown in FIG. Hereinafter, the operation of the pseudo three-dimensional image generation device 10 will be described with reference to the flowchart of the pseudo three-dimensional image generation method illustrated in FIG.

 ある撮影対象の擬似3次元画像を生成する場合、まず照明条件と撮影枚数kを入力する(ステップS21)。照明条件および撮影枚数は予め決めておいても良い。次に照明手段12を用いて撮影対象をj番目の照明条件で照明し、撮影装置11により撮影した画像を入力する(ステップS22)。照明条件は照明の強弱で決定され、撮影装置11からの照明信号(例えば撮影のシャッターに同期したパルス)にあわせて照明を行う。j番目に入力された画像信号は画像記録手段13のフレームメモリjに画像データとして格納される(ステップS23)。ステップS22からステップS23までの処理を撮影枚数kに達するまで繰り返す(ステップS24、S25)。 生成 When generating a pseudo three-dimensional image of a certain photographing target, first, an illumination condition and the number k of photographed images are input (step S21). The lighting conditions and the number of shots may be determined in advance. Next, the object to be photographed is illuminated using the illuminating means 12 under the j-th illumination condition, and an image photographed by the photographing apparatus 11 is input (step S22). The illumination condition is determined by the intensity of the illumination, and illumination is performed in accordance with an illumination signal from the imaging device 11 (for example, a pulse synchronized with an imaging shutter). The j-th input image signal is stored as image data in the frame memory j of the image recording means 13 (step S23). The processing from step S22 to step S23 is repeated until the number of shots reaches k (steps S24 and S25).

 画像の入力が終了すると、制御手段15の指令により、撮影された画像データはフレームメモリ131〜133から演算手段14の画像演算手段141に転送される(ステップS26)。画像演算手段141は照明条件の異なる複数の画像に基づき、対応する画素の画素値に減算、除算等の演算、所定の閾値との比較等を行い、離散的奥行きデータを生成する(ステップS27)。離散的奥行きデータについては、後で詳しく説明する。 (4) When the input of the image is completed, the photographed image data is transferred from the frame memories 131 to 133 to the image calculation means 141 of the calculation means 14 according to a command from the control means 15 (step S26). Based on the plurality of images having different illumination conditions, the image calculation unit 141 performs operations such as subtraction and division on the pixel values of the corresponding pixels, comparison with a predetermined threshold, and the like to generate discrete depth data (step S27). . The discrete depth data will be described later in detail.

 また、画像演算手段141は、複数画像間の色情報の合成や奥行き値計算のための前処理も行う。色情報の合成処理としては、各画像のコントラストが最大になるように変換し最もコントラストが高いものを抽出する方法や、それらを適当な重み付けで合成する方法などがある。また奥行き値計算のための前処理としてエッジ検出・色によるオブジェクト検出・2値化後の膨張/収縮処理などがある。これらの処理の組み合わせを制御手段15の命令により選択させても良い。 {Circle around (4)} The image calculation means 141 also performs preprocessing for synthesizing color information between a plurality of images and calculating a depth value. Examples of the color information synthesizing process include a method of converting each image so as to maximize the contrast and extracting an image having the highest contrast, and a method of synthesizing them with appropriate weighting. Further, pre-processing for depth value calculation includes edge detection, object detection by color, and dilation / contraction processing after binarization. A combination of these processes may be selected by an instruction from the control unit 15.

 画像演算手段141により生成された離散的奥行きデータを用いて、奥行き値算出手段142により各画素ごとの擬似的な奥行き値が計算される(ステップS28)。 Using the discrete depth data generated by the image calculation means 141, the depth value calculation means 142 calculates a pseudo depth value for each pixel (step S28).

 上記、奥行き値計算処理を行うためには、撮影対象に照明を当てることが出来さえすれば良く、撮影装置と照明手段の距離を隣接させてもよい。したがって従来の装置より小型化が可能であり、携帯端末への搭載が可能となる。 In order to perform the above-described depth value calculation processing, it is only necessary to illuminate the imaging target, and the distance between the imaging device and the illumination unit may be adjacent. Therefore, the device can be made smaller than the conventional device, and can be mounted on a portable terminal.

 図3は、図2の離散的奥行きデータを生成する過程(ステップS27)を示すフローチャートである。なお、離散的奥行きデータは定性的に奥行きを表すものであり、奥行きの前後関係のみを表す。また、奥行き値は定量的に奥行きを表すものである。本実施形態では説明を容易にするため奥行き値として前後2値の奥行きとする。照明条件として「照明有り」「照明無し」の2つを設定し、撮影枚数は2枚とする。このとき「照明有り」のときの画像データのi番目の画素の画素値をAi、「照明無し」のときの画像データのi番目の画素の画素値をBi、定性的に離散的奥行きを示す2値データをCiで表す。 FIG. 3 is a flowchart showing a process (step S27) of generating the discrete depth data of FIG. Note that the discrete depth data qualitatively represents depth, and represents only the depth order. Further, the depth value quantitatively represents the depth. In this embodiment, for ease of explanation, the depth value is set to two values before and after. It is assumed that two lighting conditions, “with lighting” and “without lighting”, are set, and the number of shots is two. At this time, the pixel value of the i-th pixel of the image data when “illuminated” is Ai, the pixel value of the i-th pixel of the image data when “no illumination” is Bi, and qualitatively indicates a discrete depth. Binary data is represented by Ci.

 奥行き値を計算するとき、まず閾値n・画像サイズsを決定する(ステップS31)。閾値nは画像の各画素を、撮影装置11に近いものと遠いものの2種類に分けるときのパラメータで、任意に決定が可能である。閾値nの決定方法については後述する。また画像サイズsは入力する画像データの横方向画素数xと縦方向画素数yを掛け合わせた値とする。次に画素値AiとBiの差分を取り、閾値n以上であればCiを1、そうでなければ0とする(ステップS32〜S34)。ステップS32〜S34の処理を画像データの全画素分繰り返す(ステップS35〜S36)。 When calculating the depth value, first, the threshold value n and the image size s are determined (step S31). The threshold value n is a parameter for dividing each pixel of the image into two types, one near and far from the photographing apparatus 11, and can be arbitrarily determined. The method for determining the threshold value n will be described later. The image size s is a value obtained by multiplying the number of horizontal pixels x and the number of vertical pixels y of the input image data. Next, the difference between the pixel values Ai and Bi is obtained. If the difference is equal to or larger than the threshold value n, Ci is set to 1, otherwise 0 is set (steps S32 to S34). The processing of steps S32 to S34 is repeated for all the pixels of the image data (steps S35 to S36).

 2値の離散的奥行きデータCiの値が1の画素は撮影装置の近くにあると判断し、その他の画素は遠くにあると判断する。このように、2値データCiは、各画素の離散的奥行きを、閾値nとの比較において定性的に表すデータである。単純な2値化処理の結果を擬似的な奥行き値とすれば、計算負荷が少ない高速な処理によって擬似3次元画像を生成することが可能である。 画素 A pixel having a value of binary discrete depth data Ci of 1 is determined to be near the imaging device, and the other pixels are determined to be far away. As described above, the binary data Ci is data that qualitatively represents the discrete depth of each pixel in comparison with the threshold value n. If the result of the simple binarization process is a pseudo depth value, a pseudo three-dimensional image can be generated by high-speed processing with a small calculation load.

 照明光量が異なる複数の画像に基づく2値化処理、または複数の異なる閾値を用いた2値化処理の組み合わせによって、多段階の奥行き値を得る事もできる。この場合、演算は、複数の画像の任意の一枚を基準画像とし、その他の画像と基準画像の間で演算を行えばよい。 多 Multi-level depth values can be obtained by a combination of binarization processing based on a plurality of images with different illumination light amounts or binarization processing using a plurality of different thresholds. In this case, the calculation may be performed between any other image and the reference image, using any one of the plurality of images as the reference image.

 図4は、図3を参照して説明した離散的奥行きデータを生成する過程(図2のステップS27)の変形例を示すフローチャートである。図4のフローチャートに示した離散的奥行きデータ生成過程は、図3に示した離散的奥行きデータ生成過程と比較して、画素iの2値データCiを求めるとき、画素データAiおよびBiの代わりにその近傍数画素の平均値A’iおよびB’iを使用する点で相違する。平均値を使うことによって、比較を行う複数の画像のデータがずれてしまう場合も、ずれによる影響を軽減することが出来る。また、平均値を計算する画素の範囲を適当に決めれば、動画に対応することも可能となる。さらに平均値をとることによりS/N比が向上するため、比較演算の結果が安定する効果もある。
[第2の実施形態]
 本発明の第2の実施形態について説明する。第2の実施形態の擬似3次元画像生成装置および擬似3次元画像生成方法は、離散的奥行きデータ生成過程を除いて、第1の実施形態と同一である。したがって、相違点のみ説明する。
FIG. 4 is a flowchart showing a modification of the process of generating discrete depth data (step S27 in FIG. 2) described with reference to FIG. The discrete depth data generation process illustrated in the flowchart of FIG. 4 is different from the discrete depth data generation process illustrated in FIG. 3 in that the binary data Ci of the pixel i is obtained instead of the pixel data Ai and Bi. The difference is that the average values A′i and B′i of the several pixels in the vicinity are used. By using the average value, even when data of a plurality of images to be compared is shifted, the influence of the shift can be reduced. If the range of pixels for which the average value is calculated is appropriately determined, it is possible to support a moving image. Furthermore, since the S / N ratio is improved by taking the average value, the result of the comparison operation is also stabilized.
[Second embodiment]
A second embodiment of the present invention will be described. The pseudo three-dimensional image generation device and the pseudo three-dimensional image generation method of the second embodiment are the same as those of the first embodiment except for a discrete depth data generation process. Therefore, only the differences will be described.

 図5は本発明の第2の実施形態の離散的奥行きデータを生成する過程を示すフローチャートである。本実施形態でも、奥行き値は前後2値の奥行きとする。照明条件として「照明有り」「照明無し」の2つを設定し、撮影枚数は2枚とする。このとき「照明有り」のときの画像データのi番目の画素の画素値をAi、「照明無し」のときの画像データのi番目の画素の画素値をBi、離散的奥行きを定性的に示す2値データをCiで表す。 FIG. 5 is a flowchart showing a process of generating discrete depth data according to the second embodiment of the present invention. Also in the present embodiment, the depth value is a depth of two values before and after. Two lighting conditions, “lighting on” and “lighting off,” are set, and the number of shots is two. At this time, the pixel value of the i-th pixel of the image data when “illuminated” is Ai, the pixel value of the i-th pixel of the image data when “no illumination” is Bi, and the discrete depth is qualitatively indicated. Binary data is represented by Ci.

 奥行き値を計算するとき、まず閾値m・画像サイズsを決定する(ステップS51)。閾値mは画像を2値に分けるときのパラメータで任意に決定が可能である。また画像サイズsは入力する画像データの横方向画素数xと縦方向画素数yを掛け合わせた値とする。次に画素値Aiの画像データBiに対する変化の割合がm以上であればCiを1、そうでなければ0とする(ステップS52〜S54)。ステップS52〜S54の処理を画像データの全画素分繰り返す(ステップS55〜S56)。 When calculating the depth value, first, the threshold value m and the image size s are determined (step S51). The threshold value m can be arbitrarily determined by a parameter for dividing an image into binary values. The image size s is a value obtained by multiplying the number of horizontal pixels x and the number of vertical pixels y of the input image data. Next, if the rate of change of the pixel value Ai with respect to the image data Bi is equal to or greater than m, Ci is set to 1; otherwise, Ci is set to 0 (steps S52 to S54). The processing of steps S52 to S54 is repeated for all pixels of the image data (steps S55 to S56).

 2値データCiの値が1の画素は撮影装置の近くにあると判断し、その他の画素は遠くにあると判断する。 画素 A pixel whose binary data Ci has a value of 1 is determined to be near the imaging device, and the other pixels are determined to be far away.

 ここで、図5に示したとおり、第2の実施形態における離散的奥行きデータを生成する過程では、画素値AiおよびBiの除算を用いている。複数の反射率が異なる撮影対象がある場合、第2の実施形態のごとく画素値AiおよびBiの除算を用いれば、反射率の違いが離散的奥行きデータCiに影響しないからである。 Here, as shown in FIG. 5, in the process of generating discrete depth data in the second embodiment, division of pixel values Ai and Bi is used. This is because, when there is a plurality of imaging targets having different reflectances, if the division of the pixel values Ai and Bi is used as in the second embodiment, the difference in the reflectance does not affect the discrete depth data Ci.

 第1の実施形態のごとく画素値AiおよびBiの減算を用いると、反射率の違いが離散的奥行きデータCiに影響してしまう場合がある。撮影対象によって反射率は異なるため、反射率が高い撮影対象は、実際の距離よりも近くにあると判定されたり、反射率が低い撮影対象は、実際の距離よりも遠くにあると判定される場合がある。しかし、遠近分離のように非常に低い距離分解能しか求められない用途では、多くの場合、この影響は無視できる。 と If the subtraction of the pixel values Ai and Bi is used as in the first embodiment, the difference in the reflectance may affect the discrete depth data Ci. Since the reflectance differs depending on the imaging target, an imaging target having a high reflectance is determined to be closer than the actual distance, and an imaging target having a low reflectance is determined to be farther than the actual distance. There are cases. However, in applications requiring very low range resolution, such as perspective separation, this effect is often negligible.

 図6は、複数の反射率が異なる撮影対象がある場合に、反射率の違いが離散的奥行きデータCiに与える影響を説明するための図である。図6において、撮影対象621および622は、撮影装置61および照明手段63から等距離にある。それぞれの反射率はraおよびrbで、相異なる。撮影装置61によって、撮影対象621および撮影対象622を撮影すると、その画像が表示装置64に表示されるものとする。照明手段63から撮影対象621および622に到達する光量をXとすると、撮影対象621は輝度ra×Xの物体641、撮影対象622は輝度rb×Xの物体642として、表示装置64上に表示される。同様に、照明手段63から撮影対象621および622に到達する光量がYならば、撮影対象621および622は、それぞれ輝度ra×Yおよびrb×Yの物体として、表示装置64上に表示される。この場合、撮影対象621の輝度の差はra×(X−Y)であり、撮影対象622の輝度の差はrb×(X−Y)である。撮影対象621および622は、撮影装置61から等距離にあるにもかかわらず、それぞれの輝度の差は異なる。 FIG. 6 is a diagram for explaining the effect of a difference in reflectance on discrete depth data Ci when there are a plurality of imaging targets with different reflectances. In FIG. 6, the imaging targets 621 and 622 are equidistant from the imaging device 61 and the illumination unit 63. Each of reflectivity r a and r b, different. When the photographing target 621 and the photographing target 622 are photographed by the photographing device 61, the images are displayed on the display device 64. When the amount of light reaching from the illumination means 63 to the imaging target 621 and 622 is X, the imaging object 621 is an object 641 of the luminance r a × X, as the object 642 to be imaged 622 is luminance r b × X, on the display device 64 Is displayed. Similarly, if the amount of light reaching from the illumination means 63 to the imaging target 621 and 622 is Y, imaging object 621 and 622, as the object luminance r a × Y and r b × Y respectively, are displayed on the display device 64 You. In this case, the luminance difference of the imaging target 621 is r a × (X−Y), and the luminance difference of the imaging target 622 is r b × (X−Y). Although the photographing targets 621 and 622 are at the same distance from the photographing device 61, the difference in luminance between them is different.

 離散的奥行きデータCiを、第2の実施形態の通り、除算で求めた場合、撮影対象621の輝度の比はX/Y、撮影対象622の輝度の比もX/Yとなる。反射率の違いはキャンセルされ、距離が同じ撮影対象の輝度の比は等しくなる。 When the discrete depth data Ci is obtained by division as in the second embodiment, the luminance ratio of the imaging target 621 is X / Y and the luminance ratio of the imaging target 622 is X / Y. The difference in reflectance is canceled, and the luminance ratios of the imaging targets at the same distance become equal.

 照明をあまり反射しない材質であるために画像データ内で輝度が暗い部分は輝度の差分そのものは小さいが、輝度の比を用いることにより正しい離散的奥行きデータを求めることができる。 (4) Since the material does not reflect much illumination, the difference in luminance itself is small in a portion where the luminance is low in the image data, but correct discrete depth data can be obtained by using the luminance ratio.

 照明光量が異なる複数の画像に基づく2値化処理、または複数の異なる閾値を用いた2値化処理の組み合わせによって、多段階の奥行き値を得ることができるのは、第1の実施形態と同様である。 Multilevel depth values can be obtained by binarization processing based on a plurality of images with different illumination light amounts or binarization processing using a plurality of different threshold values, as in the first embodiment. It is.

 図7は、図5を参照して説明した第2の実施形態に係る離散的奥行きデータを生成する過程(図2のステップS27)の変形例を示すフローチャートである。図7のフローチャートに示した離散的奥行きデータ生成過程は、図5に示した離散的奥行きデータ生成過程と比較して、画素iの2値データCiを求めるとき、画素データAiおよびBiの代わりにその近傍数画素の平均値A’iおよびB’iを使用する点で相違する。平均値を使うことによって、比較を行う複数の画像のデータがずれてしまう場合も、ずれによる影響を軽減することが出来る。また、平均値を計算する画素の範囲を適当に決めれば、動画に対応することも可能となる。さらに平均値をとることによりS/N比が向上するため、比較演算の結果が安定する効果もある。 FIG. 7 is a flowchart showing a modification of the process of generating discrete depth data (step S27 in FIG. 2) according to the second embodiment described with reference to FIG. The discrete depth data generation process shown in the flowchart of FIG. 7 is different from the discrete depth data generation process shown in FIG. 5 in that the binary data Ci of the pixel i is obtained instead of the pixel data Ai and Bi. The difference is that the average values A′i and B′i of the several pixels in the vicinity are used. By using the average value, even when data of a plurality of images to be compared is shifted, the influence of the shift can be reduced. If the range of pixels for which the average value is calculated is appropriately determined, it is possible to support a moving image. Furthermore, since the S / N ratio is improved by taking the average value, the result of the comparison operation is also stabilized.

 ここで、図13を参照して、第1の実施形態および第2の実施形態で使用した閾値の決定方法について説明する。図13は、撮影対象の距離と照度の関係を示すグラフである。曲線1310および1320は、強度の異なる照明状態による撮影対象の照度の距離による変化を表す。照明から撮影対象に到達する光量は距離の2乗に反比例することをグラフは示している。 Here, with reference to FIG. 13, a method of determining the threshold used in the first embodiment and the second embodiment will be described. FIG. 13 is a graph showing the relationship between the distance of the shooting target and the illuminance. Curves 1310 and 1320 represent changes in the illuminance of the object to be photographed with distance due to illumination conditions having different intensities. The graph shows that the amount of light reaching the object from the illumination is inversely proportional to the square of the distance.

 照明光量1310の場合、距離Lの撮影対象に届く光量をYとすると、距離2Lの撮影対象に届く光量はY/4となる。閾値nをグラフの通りとすると、照度が閾値n以上の画素は、距離1311よりも近くにある。同様に撮影対象が照明光量1320のとき、距離1321よりも近くにある。従って、第1の実施形態のように離散的奥行きデータを画素値の差分で求める場合は、距離に対する閾値が照明光量に応じて決定できる。この際、撮影対象の反射率として適当な値を仮定しなければならない。なお、このときは撮影対象への外光からの入射光量(本実施形態の場合は、照明無しの場合の撮影対象への光量に相当する)の影響は差分により相殺されるため考慮する必要はない。離散的奥行きデータを生成した結果に基づき仮定した反射率を調整することによって、より適当な閾値を決定することができる。 In the case of the illumination light amount 1310, if the light amount reaching the shooting target at the distance L is Y, the light amount reaching the shooting target at the distance 2L is Y / 4. Assuming that the threshold value n is as shown in the graph, a pixel whose illuminance is equal to or larger than the threshold value n is closer than the distance 1311. Similarly, when the photographing target has the illumination light amount 1320, it is closer than the distance 1321. Therefore, when the discrete depth data is obtained from the difference between the pixel values as in the first embodiment, the threshold value for the distance can be determined according to the illumination light amount. At this time, an appropriate value must be assumed as the reflectance of the imaging target. At this time, the effect of the amount of incident light from the external light on the object to be photographed (corresponding to the amount of light to the object without illumination in the case of the present embodiment) is offset by the difference, so it is not necessary to consider it. Absent. By adjusting the assumed reflectance based on the result of generating the discrete depth data, a more appropriate threshold can be determined.

 一方、第2の実施形態のように離散的奥行きデータを画素値の除算で求める場合は、距離に対する閾値が撮影対象への照明からの入射光量と外光(例えば室内の蛍光灯)からの入射光量から決定できる。 On the other hand, when the discrete depth data is obtained by dividing the pixel value as in the second embodiment, the threshold for the distance is determined by the amount of incident light from the illumination of the object to be photographed and the amount of incident light from the external light (for example, indoor fluorescent lamp). It can be determined from the amount of light.

 撮影対象への外光からの入射光量がどれだけであっても、その量が一定ならば図13の照度の最低値が増えて一定量のオフセットが付くだけである。したがって除算により相対的な距離を得ることが出来る。例えば、照明からの光量は距離の2乗で減衰するので、ある画素の除算により得た変化の割合に対して、別の画素の除算により得た変化の割合が1/4ならば、ある画素のカメラからの距離に比べて別の画素の距離は2倍になる。 Regardless of the amount of external light incident on the object to be photographed, if the amount is constant, the minimum value of the illuminance in FIG. 13 is increased and only a fixed amount of offset is added. Therefore, a relative distance can be obtained by division. For example, since the amount of light from the illumination attenuates with the square of the distance, the ratio of the change obtained by dividing one pixel to the ratio of the change obtained by dividing another pixel is 1/4. The distance of another pixel is twice as long as the distance from the camera.

 この際、撮影対象への外光からの入射光量として一定の適当な値を仮定してやれば、距離に対する閾値が決定できる。なお、このときは撮影対象の反射率の影響は除算により相殺されるため考慮する必要は無い。 At this time, a threshold value for the distance can be determined by assuming a constant appropriate value as the amount of incident light from the external light to the imaging target. In this case, there is no need to consider the influence of the reflectance of the object to be photographed because the influence of the reflectance is offset by the division.

 離散的奥行きデータを生成した結果に基づき仮定した入射光量を調整することによって、より適当な閾値を決定することが出来る。
[第3の実施形態]
 本発明の第3の実施形態について説明する。第3の実施形態の擬似3次元画像生成装置および擬似3次元画像生成方法は、離散的奥行きデータ生成過程を除いて、第1の実施形態と同一である。したがって、相違点のみ説明する。
By adjusting the assumed amount of incident light based on the result of generating discrete depth data, a more appropriate threshold can be determined.
[Third Embodiment]
A third embodiment of the present invention will be described. The pseudo three-dimensional image generation device and the pseudo three-dimensional image generation method of the third embodiment are the same as those of the first embodiment, except for a discrete depth data generation process. Therefore, only the differences will be described.

 図8は本発明の第3の実施形態の離散的な奥行きデータを生成する過程を示すフローチャートである。本実施例では奥行き値として前後2値の奥行きとする。照明条件として「照明有り」「照明無し」の2つを設定し、撮影枚数は2枚とする。このとき「照明有り」のときの画像データのi番目の画素の画素値をAi、「照明無し」のときの画像データのi番目の画素値をBi、離散的奥行きを示す2値データをCiで表す。 FIG. 8 is a flowchart showing a process of generating discrete depth data according to the third embodiment of the present invention. In the present embodiment, the depth value is two depths before and after. It is assumed that two lighting conditions, “with lighting” and “without lighting”, are set, and the number of shots is two. At this time, the pixel value of the i-th pixel of the image data when “illuminated” is Ai, the i-th pixel value of the image data when “no illumination” is Bi, and the binary data indicating the discrete depth is Ci. Expressed by

 奥行き値を計算するとき、まず差分演算の閾値n・除算演算の閾値m・分割値p・画像サイズsを決定する(図8のステップS81)。差分演算の閾値n・除算演算の閾値m・分割値pは画像を2値に分けるときのパラメータで任意に決定が可能である。また画像サイズsは入力する画像データの横方向画素数xと縦方向画素数yを掛け合わせた値とする。次に画素値Aiが分割値p以上であれば第1の実施形態に記載の閾値nによる離散的奥行きデータ生成過程、そうでなければ第2の実施形態に記載の閾値mによる離散的奥行きデータ生成過程を行う(図8のステップS82〜S86)。 When calculating the depth value, first, the threshold value n for the difference operation, the threshold value m for the division operation, the division value p, and the image size s are determined (step S81 in FIG. 8). The threshold value n for the difference operation, the threshold value m for the division operation, and the division value p can be arbitrarily determined by parameters for dividing an image into binary values. The image size s is a value obtained by multiplying the number of horizontal pixels x and the number of vertical pixels y of the input image data. Next, if the pixel value Ai is equal to or larger than the division value p, the discrete depth data generation process based on the threshold n described in the first embodiment, otherwise, the discrete depth data based on the threshold m described in the second embodiment The generation process is performed (steps S82 to S86 in FIG. 8).

 2値データCiが1の画素は撮影装置の近くにあると判断し、その他の画素は遠くにあると判断する。 画素 A pixel whose binary data Ci is 1 is determined to be close to the imaging device, and the other pixels are determined to be far away.

 このように分割値p以上の輝度値を持つ画素に対しては、差分による2値化処理の結果を擬似的な距離とすることにより、計算負荷が少ない高速な処理が可能となる。また画像データ内で輝度が暗い部分は照明をあまり反射しない材質なので、分割値p以下の輝度値を持つ画素に対しては、除算による2値化処理の結果を用いることにより正しく手前部分を分離できる。 画素 For pixels having a luminance value equal to or greater than the division value p, high-speed processing with a small calculation load can be performed by using the result of the binarization processing based on the difference as a pseudo distance. In addition, since a portion having low luminance in the image data is a material that does not reflect much illumination, a pixel having a luminance value equal to or less than the division value p is properly separated from a near portion by using a result of binarization processing by division. it can.

 照明光量が異なる複数の画像に基づく2値化処理、または複数の異なる閾値を用いた2値化処理の組み合わせによって、多段階の奥行き値を得ることができるのは、第1の実施形態と同様である。 Multilevel depth values can be obtained by binarization processing based on a plurality of images with different illumination light amounts or binarization processing using a plurality of different threshold values, as in the first embodiment. It is.

 図9は、図8を参照して説明した第3の実施形態に係る離散的奥行きデータを生成する過程(図2のステップS27)の変形例を示すフローチャートである。図9のフローチャートに示した離散的奥行きデータ生成過程は、図8に示した離散的奥行きデータ生成過程と比較して、画素iの2値データCiを求めるとき、画素データAiおよびBiの替わりにその近傍数画素の平均値A’iおよびB’iを使用する点で相違する。平均値を使うことによって、比較を行う複数の画像のデータがずれてしまう場合も、ずれによる影響を軽減することが出来る。また、平均値を計算する画素の範囲を適当に決めれば、動画に対応することも可能となる。さらに平均値をとることによりS/N比が向上するため、比較演算の結果が安定する効果もある。 FIG. 9 is a flowchart showing a modification of the process of generating discrete depth data (step S27 in FIG. 2) according to the third embodiment described with reference to FIG. The discrete depth data generation process illustrated in the flowchart of FIG. 9 is different from the discrete depth data generation process illustrated in FIG. 8 in that the binary data Ci of the pixel i is obtained instead of the pixel data Ai and Bi. The difference is that the average values A′i and B′i of the several pixels in the vicinity are used. By using the average value, even when data of a plurality of images to be compared is shifted, the influence of the shift can be reduced. If the range of pixels for which the average value is calculated is appropriately determined, it is possible to support a moving image. Furthermore, since the S / N ratio is improved by taking the average value, the result of the comparison operation is also stabilized.

 さらに第3の実施形態の変形例として複数の分割値を用いてもよい。例えばp1>p2なる2つの分割値を定めた場合、画素値がp1より大きい場合は差分の閾値n1での差分演算、画素値がp2より大きい場合は差分の閾値n2での差分演算、画素値がp2以下の場合は差分の閾値n3での差分演算などの処理を行う。このように画素値に応じて予め決めておいた閾値を変更しても良い。また閾値は適応2値化のように局所領域ごとに随時演算を行い決めても良い。
[第4の実施形態]
 以上説明した通り、第1から第3までの実施形態においては、離散的奥行きデータを生成し(図2のステップS27)、そのデータをそのまま擬似3次元画像の奥行きとして使用する(図2のステップS28)。具体的には、近景として予め決めておいた距離および遠景として予め決めておいた距離を当てはめる。本発明の第4の実施形態においては、図2のステップ28にて、生成した離散的奥行きデータをさらに処理し、より現実感のある擬似3次元画像を生成する。
Further, as a modified example of the third embodiment, a plurality of division values may be used. For example, when two divided values of p1> p2 are determined, the difference operation at the difference threshold n1 when the pixel value is larger than p1, the difference operation at the difference threshold n2 when the pixel value is larger than p2, the pixel value Is smaller than or equal to p2, a process such as a difference calculation at a difference threshold value n3 is performed. As described above, the predetermined threshold value may be changed according to the pixel value. Further, the threshold value may be determined by performing an arithmetic operation as needed for each local region as in adaptive binarization.
[Fourth embodiment]
As described above, in the first to third embodiments, discrete depth data is generated (Step S27 in FIG. 2), and the data is used as it is as the depth of the pseudo three-dimensional image (Step in FIG. 2). S28). Specifically, a predetermined distance as a near view and a predetermined distance as a distant view are applied. In the fourth embodiment of the present invention, the generated discrete depth data is further processed in step 28 of FIG. 2 to generate a more realistic pseudo three-dimensional image.

 図10は本発明の第4の実施形態の擬似3次元画像生成方法を説明するための図である。以下、図10を用いて処理アルゴリズムを説明する。 FIG. 10 is a diagram for explaining a pseudo three-dimensional image generation method according to the fourth embodiment of the present invention. Hereinafter, the processing algorithm will be described with reference to FIG.

 元の画像101を、第1から第3までのいずれかの実施形態において生成された離散的奥行きデータ102に基づいて分割する。離散的奥行きデータCiは2値データなので、Ciを2次元画像として表した離散的奥行きデータ画像は白黒の2値で表される。元の画像101は離散的奥行きデータ画像に基づき、2枚の画像に分けられる。分割画像をそれぞれ前面画像103および後面画像104と呼ぶ。なお奥行きデータ画像102の作成は第1から第3の実施形態に記載の方法などを用いればよい。 分割 The original image 101 is divided based on the discrete depth data 102 generated in any of the first to third embodiments. Since the discrete depth data Ci is binary data, the discrete depth data image in which Ci is represented as a two-dimensional image is represented by black and white binary values. The original image 101 is divided into two images based on the discrete depth data image. The divided images are called a front image 103 and a rear image 104, respectively. The depth data image 102 may be created by using the method described in the first to third embodiments.

 次に前面画像103に注目し組分けを行うことにより、オブジェクトを抽出する。前面画像103上で黒色の部分は他の分割画像(すなわち後面画像104)上に存在する領域であるから、残った領域上で隣接する画素を連結した部分画像(1031、1032)を求めれば、これらが各撮影対象に対応したいわゆるオブジェクトとなる。なお、ここでは画素の連結により組分けを行ったが、色情報で領域分割を行い各領域を組分けされた部分画像、すなわちオブジェクトとするなどの方法を取ってもよい。この2つのオブジェクト(1031、1032)の奥行き値が隣接する分割画像(後面画像104)の奥行き値と連続的につながるように手前側の分割画像(前面画像103)に属するオブジェクト(1031、1032)の奥行き値を再計算する。具体的には、任意の関数で奥行き値の置換を行う。 Next, objects are extracted by focusing on the front image 103 and performing grouping. Since the black portion on the front image 103 is a region existing on another divided image (that is, the rear image 104), if a partial image (1031, 1032) obtained by connecting adjacent pixels on the remaining region is obtained, These are so-called objects corresponding to the respective imaging targets. In this case, the grouping is performed by connecting the pixels. However, a method may be adopted in which the area is divided based on the color information and each area is set as a divided partial image, that is, an object. Objects (1031, 1032) belonging to the near-side divided image (front image 103) such that the depth value of these two objects (1031, 1032) is continuously connected to the depth value of the adjacent divided image (back image 104). Recalculate the depth value of. Specifically, the depth value is replaced by an arbitrary function.

 図10では任意の関数の例として、オブジェクトの奥行き値を横方向に変化する2次関数で置換した画像105、オブジェクトの奥行き値を中心部を一定とし周辺部を横方向に変化する2次関数で置換した画像106、オブジェクトの奥行き値を中心部を一定とし周辺部を重心から放射状に延びたラインに沿って変化する2次関数で置換した画像107を示している。 In FIG. 10, as an example of an arbitrary function, an image 105 in which the depth value of an object is replaced by a quadratic function that changes in the horizontal direction, a quadratic function in which the depth value of the object is fixed at the center and the peripheral portion changes in the horizontal direction And an image 107 in which the depth value of the object is replaced by a quadratic function that changes the depth value of the object along the line radially extending from the center of gravity while keeping the center constant.

 オブジェクトの奥行き値を横方向に変化する2次関数で置換した画像105を生成する場合は画像の横方向の各ラインごとに走査し擬似の奥行き値を与える。例えばライン1051を走査した場合、そのオブジェクトのライン1051上での左端と右端を検出し、後面画像104につながる奥行き値をmin、前面画像103上で後面画像104から最も離れる奥行き値をmaxとして、オブジェクトの左端と右端でmin、中心でmaxを通る2次関数1052で置換する。このような簡便な処理によって擬似的な奥行き値を与えることにより、計測を行うことなく実写の3次元画像が作成可能になる。 To generate an image 105 in which the depth value of an object is replaced by a quadratic function that changes in the horizontal direction, a scan is performed for each horizontal line of the image to give a pseudo depth value. For example, when the line 1051 is scanned, the left end and the right end of the object on the line 1051 are detected, and the depth value connected to the rear image 104 is defined as min, and the depth value farthest from the rear image 104 on the front image 103 is defined as max. The object is replaced by a quadratic function 1052 that passes through min at the left end and right end and through max at the center. By giving a pseudo depth value by such simple processing, a real three-dimensional image can be created without performing measurement.

 オブジェクトの奥行き値を中心部を一定とし周辺部を横方向に変化する2次関数で置換した画像106を生成する場合は画像の横方向の各ラインごとに走査し擬似の奥行き値を与える。例えばライン1061を走査した場合、そのオブジェクトのライン1061上での左端と右端を検出し、後面画像104につながる奥行き値をmin、前面画像103上で後面画像104から最も離れる奥行き値をmaxとして、オブジェクトの左端(右端)でmin、中心から左(右)へ15%離れた位置でmaxを通る2次関数と、中心区間の30%でmax一定となる直線とを組合せた関数1062で置換する。このようにオブジェクトの中心付近がより強調して飛び出る擬似的な奥行き値を与えることにより、観察者にオブジェクトがより近くあるように感じさせることができる。 To generate an image 106 in which the depth value of the object is replaced with a quadratic function that changes the depth value of the object at the center and the peripheral portion in the horizontal direction, a scan is performed for each horizontal line of the image to give a pseudo depth value. For example, when the line 1061 is scanned, the left end and the right end of the object on the line 1061 are detected, the depth value connected to the rear image 104 is defined as min, and the depth value farthest from the rear image 104 on the front image 103 is defined as max. The function 1062 is a combination of a quadratic function that passes max at a position 15% away from the center to the left (right end) at the left end (right end) of the object and a constant max at 30% of the center section. . By giving a pseudo depth value in which the vicinity of the center of the object pops out with more emphasis, the observer can feel as if the object is closer.

 オブジェクトの奥行き値を中心部を一定とし周辺部を重心から放射状に延びたラインに沿って変化する2次関数で置換した画像107を生成する場合は各オブジェクトの重心を計算し重心とオブジェクトの境界を通るラインごとに擬似の奥行き値を与える。例えばライン1071の奥行き値を計算する場合、そのオブジェクトの境界とライン1071の交点を検出し、後面画像104につながる奥行き値をmin、前面画像103上で後面画像104から最も離れる奥行き値をmaxとして、前記交点でmin、二つの前記交点間の長さのうち重心を中心とした30%の長さでmaxを通る1062と同様にして得られる関数1072で置換する。 To generate an image 107 in which the depth value of an object is fixed at the center and the periphery is replaced by a quadratic function that changes along a line extending radially from the center of gravity, the center of gravity of each object is calculated and the boundary between the center of gravity and the object is calculated. Gives a pseudo depth value for each line passing through. For example, when calculating the depth value of the line 1071, the intersection of the boundary of the object and the line 1071 is detected, and the depth value connected to the rear image 104 is min, and the depth value of the front image 103 that is farthest from the rear image 104 is max. , Min at the intersection, and a function 1072 obtained in the same manner as 1062 passing through max at a length of 30% centered on the center of gravity of the length between the two intersections.

 このようにオブジェクトの中心付近がより強調して飛び出る擬似的な奥行き値を与えることにより、観察者にオブジェクトがより近くにあるように感じさせることができる。またオブジェクトの重心から放射状に延びたラインに沿って奥行き値を計算するため、境界線の傾きによらず均等に丸みを付けることができ、観察者により自然な立体感を与えることができる。
[第5の実施形態]
 図11は本発明の第5の実施形態に係る擬似3次元画像生成方法を示す図である。第4の実施形態に係る擬似3次元画像生成方法によって計算されたある分割画像の各画素の元の奥行き値1110に、その画素を中心とした7×7の範囲を平均化する平滑化処理を行い、平滑化した奥行き値1130を得た。
By giving a pseudo depth value in which the vicinity of the center of the object pops out with more emphasis, the observer can feel as if the object is closer. Further, since the depth value is calculated along a line extending radially from the center of gravity of the object, the object can be evenly rounded regardless of the inclination of the boundary line, and a more natural three-dimensional effect can be given to the observer.
[Fifth Embodiment]
FIG. 11 is a diagram illustrating a pseudo three-dimensional image generation method according to the fifth embodiment of the present invention. The original depth value 1110 of each pixel of a certain divided image calculated by the pseudo three-dimensional image generation method according to the fourth embodiment is subjected to a smoothing process for averaging a 7 × 7 range centered on the pixel. Then, a smoothed depth value 1130 was obtained.

 図12に本実施形態の平滑化処理で用いた平滑化フィルタの係数を示す。ここでは、平滑化フィルタとして、処理対象の画素を中心としたフィルタサイズ(7×7)の範囲内の全ての画素の画素値に係数としてフィルタサイズの逆数(1/49)を掛けて足し合わせる、単純移動平均フィルタを適用した。なお、フィルタサイズは任意に変更可能であり、また、平滑化の効果を持つ他のフィルタを適用しても良い。平滑化の効果を持つ他のフィルタの例としては、フィルタ内の各マトリクスに随時重み付けを行う加重移動平均フィルタや、正規分布に従った重み付けを行うガウシアンフィルタなどがある。 FIG. 12 shows the coefficients of the smoothing filter used in the smoothing processing of the present embodiment. Here, as the smoothing filter, the pixel values of all the pixels within the range of the filter size (7 × 7) centering on the pixel to be processed are multiplied by the reciprocal of the filter size (1/49) as a coefficient and added. A simple moving average filter was applied. The filter size can be arbitrarily changed, and another filter having a smoothing effect may be applied. Examples of other filters having a smoothing effect include a weighted moving average filter that weights each matrix in the filter as needed, and a Gaussian filter that weights according to a normal distribution.

 元の奥行き値1110の顎の部分1111の拡大図1112と、平滑化した奥行き値1130の顎の部分1131の拡大図1132とを比較すると明らかなように、平滑化処理を行うことによって奥行き値の急激な変化が緩和される。 As is clear from comparison between the enlarged view 1112 of the jaw portion 1111 of the original depth value 1110 and the enlarged view 1132 of the jaw portion 1131 of the smoothed depth value 1130, the smoothing process is performed to reduce the depth value. Rapid changes are mitigated.

 第1~第4の実施形態に係る擬似3次元画像生成方法によって、オブジェクトの内部に急激な奥行き値の変化が生じた場合、観察者に違和感を与えることがある。またオブジェクトの境界線部において急激な奥行き値の変化が生じた場合、隣接する他の奥行き値の分割画像と乖離し同様に違和感を与えることがある。 場合 When a sudden change in the depth value occurs inside the object by the pseudo three-dimensional image generation methods according to the first to fourth embodiments, the observer may feel uncomfortable. Further, when a sudden change in the depth value occurs at the boundary of the object, the image may be separated from another adjacent divided image of the depth value, giving a sense of incompatibility.

 しかしこのように一度計算した奥行き値を平滑化することにより、あるオブジェクト内に奥行き値の急激な変化が存在する場合に観察者に違和感を与えることを防止できる。またオブジェクトの境界線部において急激な奥行き値の変化が生じる場合も、隣接する他の分割画像の奥行き値とのつながりが緩やかになり、他の分割画像とのつながりにおいて観察者に違和感を与えることを防止できる。 However, by smoothing the depth value once calculated in this way, it is possible to prevent a viewer from feeling uncomfortable when a sudden change in the depth value exists in an object. Also, when a sharp change in the depth value occurs at the boundary of the object, the connection with the depth value of another adjacent divided image becomes loose, and the observer may feel uncomfortable in the connection with the other divided image. Can be prevented.

 なお、前記フローチャートに示された手順をコンピュータに実行させるためのプログラムが実現可能なことは明らかであり、また、そのプログラムをコンピュータ読取り可能な記録媒体に記録できることも明らかである。 Note that it is apparent that a program for causing a computer to execute the procedure shown in the flowchart can be realized, and that the program can be recorded on a computer-readable recording medium.

 第1~第5の実施形態においては、離散的奥行きデータに基づき撮影対象をオブジェクトとして抽出し、抽出したオブジェクトに擬似的な奥行き値を与えた。本発明の別の実施形態では、オブジェクトの抽出は従来から利用されているエッジ検出や色により行い、従来のオブジェクト抽出法によって抽出したオブジェクトに、離散的奥行きデータに基づき擬似的な奥行き値を与えてもよい。ここで、エッジ検出は、例えば1次微分フィルタや2次微分フィルタによる抽出方法がある。また、色によるオブジェクト抽出には、例えば色空間を用いた抽出方法や彩度を用いた抽出方法がある。 In the first to fifth embodiments, a shooting target is extracted as an object based on discrete depth data, and a pseudo depth value is given to the extracted object. In another embodiment of the present invention, the extraction of the object is performed by the conventionally used edge detection and color, and the object extracted by the conventional object extraction method is given a pseudo depth value based on the discrete depth data. May be. Here, for edge detection, for example, there is an extraction method using a primary differential filter or a secondary differential filter. The object extraction by color includes, for example, an extraction method using a color space and an extraction method using saturation.

 また、離散的奥行きデータに基づき抽出したオブジェクトを、エッジ検出や色により抽出したオブジェクトによって、補正してもよい。図14を用いて処理の例を説明する。1410は例えばエッジ検出で抽出したオブジェクトの輪郭線、1420は、離散的奥行きデータに基づいて抽出された領域とする。離散的奥行きデータ画像は、撮影対象の反射率の影響や撮影対象の移動などにより、実際とずれる場合がある。このとき輪郭線1410を用いて補正を行う。具体的には、離散的奥行きデータに基づいて抽出された領域1420の輪郭線を、一番近い輪郭線1410に補正する。例えば点1431を点1441に、点1432を点1442に補正する。 オ ブ ジ ェ ク ト Alternatively, an object extracted based on discrete depth data may be corrected by an object extracted by edge detection or color. An example of the process will be described with reference to FIG. 1410 is, for example, an outline of an object extracted by edge detection, and 1420 is a region extracted based on discrete depth data. The discrete depth data image may deviate from the actual one due to the influence of the reflectance of the imaging target or the movement of the imaging target. At this time, the correction is performed using the contour line 1410. Specifically, the contour of the region 1420 extracted based on the discrete depth data is corrected to the closest contour 1410. For example, the point 1431 is corrected to a point 1441, and the point 1432 is corrected to a point 1442.

 また、輪郭線の補正だけではなく、離散的奥行きデータ画像において、面積が小さな領域を削除したり、画像に開いた面積が小さい穴を埋める補正も可能である。例えば、撮影対象の一部(例えば、人物の目の部分やボタン)がオブジェクトとして表れていない場合に、その部分を追加したり、逆に表れている場合に削除することができる。削除したり穴埋めを行う領域の面積は、別途経験則に基づき指定すればよい。上記に類似する補正として、オブジェクトとオブジェクトの隙間が狭い場合は、隙間を埋めてオブジェクトを連結してもよい。隙間を埋める領域の幅は、穴埋めの面積と同様に、別途経験則に基づき指定すればよい。 In addition to the correction of the contour line, it is also possible to correct a region having a small area in a discrete depth data image or to fill a hole having a small area opened in the image. For example, when a part of a photographing target (for example, a part of a person's eyes or a button) does not appear as an object, the part can be added or conversely deleted when it appears. The area of the region to be deleted or filled may be specified based on a separate rule of thumb. As a correction similar to the above, when a gap between objects is small, the gaps may be filled to connect the objects. The width of the region for filling the gap may be specified based on a separate rule of thumb, similarly to the area for filling the hole.

 また、計算負荷をより減少させるため、離散的奥行きデータを生成する前に、画像の解像度を低下させてもよい。解像度を下げることにより、計算量を減らすことができる。また実際に抽出したオブジェクトに、反射率の影響や撮影対象の移動などにより、ずれが生じた場合にも、テクスチャに比べて奥行き値の解像度が粗くなるので、実際とずれた領域の奥行き値の輪郭線をぼかして、ずれを少なく見せる効果がある。 In addition, in order to further reduce the calculation load, the resolution of the image may be reduced before generating the discrete depth data. By reducing the resolution, the amount of calculation can be reduced. Also, if the actually extracted object is displaced due to the influence of the reflectance or the movement of the shooting target, the resolution of the depth value becomes coarser than the texture, so the depth value This has the effect of blurring the outline and showing less deviation.

 さらに解像度を低下させるときに、解像度を低下させる前の周辺画素の平均値を取ったもので解像度を低下させれば、平滑化フィルタをかけたのと同様に、S/N比を向上させる効果を得ることができる。 When the resolution is further reduced, if the resolution is reduced by taking an average value of peripheral pixels before the resolution is reduced, the effect of improving the S / N ratio is obtained as in the case of applying the smoothing filter. Can be obtained.

 ここでシグナルSはノイズ0かつ無限階調で撮像された画像情報を示す。またノイズNは光学的または電気的なノイズや有限長量子化に起因して起こる量子化ノイズなどの全てのノイズ要因を含んだノイズ量を示す。 Here, signal S indicates image information captured with no noise and infinite gradation. The noise N indicates a noise amount including all noise factors such as optical or electrical noise and quantization noise caused by finite length quantization.

 なお、平均値をとる画素は、解像度を低下させる場合に必要な画素のみでよい。例えば、平均値を縦横共に一画素飛びで求めることによって画素数を1/4に削減できる。第2の実施形態で説明した除算を用いた離散的奥行きデータの生成は、画像のノイズに敏感である。この場合でも、解像度を低下させることによって、S/N比を向上することができる。 画素 Note that only the pixels required to reduce the resolution need to take the average value. For example, the number of pixels can be reduced to 1 / by calculating the average value by one pixel in both the vertical and horizontal directions. The generation of discrete depth data using the division described in the second embodiment is sensitive to image noise. Also in this case, the S / N ratio can be improved by lowering the resolution.

 なお、上記の処理をすべて行う必要はなく、制御手段15の命令に基づいて、必要に応じて実行すればよい。 Note that it is not necessary to perform all of the above processing, and the processing may be performed as needed based on the instruction of the control unit 15.

 以上、本発明者によってなされた発明を、前記実施例に基づき具体的に説明したが、本発明は、前記実施例に限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは勿論である。 As described above, the invention made by the inventor has been specifically described based on the embodiment. However, the present invention is not limited to the embodiment, and can be variously modified without departing from the gist of the invention. Of course.

 本願発明により、従来法による3次元画像生成装置と比較して、より小型でより手軽な擬似3次元画像生成装置を実現することが可能となる。 According to the present invention, it is possible to realize a smaller and easier pseudo three-dimensional image generation device as compared with a three-dimensional image generation device according to a conventional method.

本発明の第1の実施形態による擬似3次元画像生成装置を示す図である。FIG. 1 is a diagram illustrating a pseudo three-dimensional image generation device according to a first embodiment of the present invention. 本発明の第1の実施形態による処理のフローチャートを示す図である。FIG. 4 is a diagram illustrating a flowchart of a process according to the first embodiment of the present invention. 本発明の第1の実施形態による離散的奥行きデータ生成過程を示すフローチャートである。5 is a flowchart illustrating a process of generating discrete depth data according to the first embodiment of the present invention. 図3に示す例で平均値を比較に用いる場合のフローチャートである。4 is a flowchart when an average value is used for comparison in the example shown in FIG. 3. 本発明の第2の実施形態による離散的奥行きデータ生成過程を示すフローチャートである。9 is a flowchart illustrating a process of generating discrete depth data according to a second embodiment of the present invention. 離散的奥行きデータに対する撮影対象の反射率の影響を説明するための図である。FIG. 5 is a diagram for explaining the influence of the reflectance of the imaging target on discrete depth data. 図5に示す例で平均値を比較に用いる場合のフローチャートである。6 is a flowchart in a case where an average value is used for comparison in the example shown in FIG. 5. 本発明の第3の実施形態による離散的奥行きデータ生成過程を示すフローチャートである。11 is a flowchart illustrating a process of generating discrete depth data according to a third embodiment of the present invention. 図8に示す例で平均値を比較に用いる場合のフローチャートである。9 is a flowchart when an average value is used for comparison in the example shown in FIG. 8. 本発明の第4の実施形態を説明するための図である。It is a figure for explaining a 4th embodiment of the present invention. 本発明の実施形態による平滑化フィルタによる処理を説明するための図である。FIG. 4 is a diagram for explaining processing by a smoothing filter according to the embodiment of the present invention. 本発明の実施形態による平滑化フィルタの一例を示す図である。FIG. 3 is a diagram illustrating an example of a smoothing filter according to the embodiment of the present invention. 本発明の実施形態による離散的奥行きデータを生成するための閾値の考え方を説明するグラフである。5 is a graph illustrating a concept of a threshold for generating discrete depth data according to an embodiment of the present invention. 本発明の実施形態によるオブジェクトの補正を説明するための図である。FIG. 5 is a diagram for describing correction of an object according to the embodiment of the present invention.

符号の説明Explanation of reference numerals

 11…撮影装置、111…固体撮像素子、112…A/D変換手段、12…照明手段、13…画像記録手段、131…フレームメモリ1、132…フレームメモリ2,133…フレームメモリk、14…演算手段、141…画像演算手段、142…奥行き値算出手段、15…制御手段、61…撮影装置、621…撮影対象、622…撮影対象、63…照明手段、64…表示装置、641…画像、642…画像、101…元の画像、102…奥行き値、103…前面画像、1031…前面画像上の部分画像、1032…前面画像上の部分画像、104…後面画像、105…奥行き値を横方向に変化する2次関数で置換した画像、1051…ライン、1052…関数、106…奥行き値を中心部を一定とし周辺部を横方向に変化する2次関数で置換した画像、1061…ライン、1062…関数、107…奥行き値を中心部を一定とし周辺部を部分画像の重心から放射状に延びるラインに沿って変化する2次関数で置換した画像、1071…ライン、1072…関数、1110…元の奥行き値、1111…注目部分、1112…拡大図、1130…平滑化した奥行き値、1131…注目部分、1132…拡大図、1310…照度グラフ、1320…照度グラフ、1311…閾値nを満たす距離、1321…閾値nを満たす距離、1410…離散的奥行きデータによる輪郭線、1420…他のオブジェクト抽出法による輪郭線、1431、1441…輪郭線上の対応する点、1432、1442…輪郭線上の対応する点 DESCRIPTION OF SYMBOLS 11 ... Photographing device, 111 ... Solid-state image sensor, 112 ... A / D conversion means, 12 ... Illumination means, 13 ... Image recording means, 131 ... Frame memory 1, 132 ... Frame memory 2, 133 ... Frame memory k, 14 ... Calculation means, 141 ... image calculation means, 142 ... depth value calculation means, 15 ... control means, 61 ... photographing device, 621 ... photographing object, 622 ... photographing object, 63 ... lighting means, 64 ... display device, 641 ... image, 642: image, 101: original image, 102: depth value, 103: front image, 1031: partial image on front image, 1032: partial image on front image, 104: rear image, 105: depth value in horizontal direction 1051... Line, 1052... Function, 106... Depth value is a quadratic function that changes the peripheral portion in the horizontal direction while keeping the center constant. Image, 1061... Line, 1062... Function, 107... Image in which the center of the depth value is fixed and the peripheral portion is replaced by a quadratic function that changes along a line extending radially from the center of gravity of the partial image, 1071. , 1072... Function, 1110... Original depth value, 1111... Noticed part, 1112... Enlarged view, 1130... Smoothed depth value, 1313... Noticed part, 1132. 1311: distance that satisfies threshold n, 1321: distance that satisfies threshold n, 1410: contour by discrete depth data, 1420: contour by another object extraction method, 1431, 1441 ... corresponding points on the contour, 1432, 1442 ... corresponding point on contour

Claims (18)

 複数の照明状態において撮影対象を撮影した複数の画像から、前記撮影対象の擬似的な3次元画像を生成する擬似3次元画像生成装置であって、
 前記複数の画像を記録する画像記録手段と、
 前記複数の画像における対応する画素の画素値の比較演算に基づいて、前記対応する画素の離散的奥行きデータを算出する画像演算手段と、
 前記離散的奥行きデータに基づいて、前記対応する画素の擬似的な奥行き値を算出する奥行き値算出手段と
 を備えることを特徴とする擬似3次元画像生成装置。
A pseudo three-dimensional image generation device that generates a pseudo three-dimensional image of the shooting target from a plurality of images obtained by shooting the shooting target in a plurality of lighting states,
Image recording means for recording the plurality of images,
Image calculation means for calculating discrete depth data of the corresponding pixel based on a comparison operation of pixel values of corresponding pixels in the plurality of images,
A depth value calculating unit configured to calculate a pseudo depth value of the corresponding pixel based on the discrete depth data.
 請求項1記載の擬似3次元画像生成装置であって、
 前記画像演算手段は、前記複数の画像の解像度を低下させ、解像度を低下させた複数の画像における対応する画素の画素値の比較演算に基づいて、前記対応する画素の離散的奥行きデータを算出することを特徴とする擬似3次元画像生成装置。
The pseudo three-dimensional image generation device according to claim 1,
The image calculation means reduces the resolution of the plurality of images, and calculates discrete depth data of the corresponding pixel based on a comparison operation of pixel values of corresponding pixels in the plurality of reduced-resolution images. A pseudo three-dimensional image generation device, characterized in that:
 請求項2記載の擬似3次元画像生成装置であって、
 前記画像演算手段は、前記複数の画像を平滑化し、かつ解像度を低下させることを特徴とする擬似3次元画像生成装置。
The pseudo three-dimensional image generation device according to claim 2,
A pseudo three-dimensional image generation apparatus, wherein the image calculation means smoothes the plurality of images and lowers resolution.
 請求項1乃至3いずれか一項記載の擬似3次元画像生成装置であって、
 前記画像演算手段は、前記複数の画像における対応する画素の画素値の差または比を当該画素ごとの閾値と比較することにより、画素ごとに離散的奥行きデータを割り当てることを特徴とする擬似3次元画像生成装置。
The pseudo three-dimensional image generation device according to any one of claims 1 to 3,
The image calculation means assigns discrete depth data for each pixel by comparing a difference or a ratio of pixel values of corresponding pixels in the plurality of images with a threshold value for each pixel. Image generation device.
 請求項1乃至4いずれか一項記載の擬似3次元画像生成装置であって、
 前記画像演算手段は、算出された前記対応する画素の離散的奥行きデータに基づいて、前記撮影対象のオブジェクトを抽出することを特徴とする擬似3次元画像生成装置。
The pseudo three-dimensional image generation device according to claim 1, wherein:
The pseudo three-dimensional image generation device according to claim 1, wherein the image calculation unit extracts the object to be photographed based on the calculated discrete depth data of the corresponding pixel.
 請求項5記載の擬似3次元画像生成装置であって、
 前記画像演算手段は、前記複数の画像における対応する画素の画素値の差または比を当該画素値に応じた所定の閾値と比較することにより、画素ごとに離散的奥行きデータを割り当て、前記複数の画像のいずれかにおいて、前記離散的奥行きデータが等しくかつ隣接する画素を前記オブジェクトとして抽出することを特徴とする擬似3次元画像生成装置。
The pseudo three-dimensional image generation device according to claim 5,
The image calculating means assigns discrete depth data for each pixel by comparing a difference or a ratio of pixel values of corresponding pixels in the plurality of images with a predetermined threshold value corresponding to the pixel value, and A pseudo three-dimensional image generation apparatus, wherein, in any one of the images, pixels having the same discrete depth data and adjacent pixels are extracted as the object.
 請求項5または6記載の擬似3次元画像生成装置であって、
 前記奥行き値算出手段は、前記離散的奥行きデータに基づき、前記オブジェクトに奥行き関数をあてはめることを特徴とする擬似3次元画像生成装置。
The pseudo three-dimensional image generation device according to claim 5 or 6,
The pseudo-three-dimensional image generation device according to claim 1, wherein the depth value calculation unit applies a depth function to the object based on the discrete depth data.
 請求項7記載の擬似3次元画像生成装置であって、
 前記奥行き値算出手段は、前記画像全体、前記オブジェクトの隣接部分、および前記オブジェクト内のいずれかにおいて、画素の位置に対する奥行き値の平滑化処理を行うことを特徴とする擬似3次元画像生成装置。
The pseudo three-dimensional image generation device according to claim 7,
The pseudo-three-dimensional image generation apparatus according to claim 3, wherein the depth value calculation unit performs a smoothing process of a depth value with respect to a position of a pixel in the entire image, a portion adjacent to the object, or in the object.
 複数の照明状態において撮影対象を撮影した複数の画像から、前記撮影対象の擬似的な3次元画像を生成する擬似3次元画像生成方法であって、
 前記複数の画像を記録する画像記録過程と、
 前記複数の画像における対応する画素の画素値の比較演算に基づいて、前記対応する画素の離散的奥行きデータを算出する離散的奥行きデータ算出過程と、
 前記算出された離散的奥行きデータに基づいて、前記対応する画素の擬似的な奥行き値を算出する奥行き値算出過程と
 を有することを特徴とする擬似3次元画像生成方法。
A pseudo three-dimensional image generation method for generating a pseudo three-dimensional image of the shooting target from a plurality of images obtained by shooting the shooting target in a plurality of lighting conditions,
An image recording step of recording the plurality of images,
Based on a comparison operation of pixel values of corresponding pixels in the plurality of images, a discrete depth data calculation step of calculating discrete depth data of the corresponding pixels,
A depth value calculating step of calculating a pseudo depth value of the corresponding pixel based on the calculated discrete depth data.
 請求項9記載の擬似3次元画像生成方法であって、
 前記離散的奥行きデータ算出過程は、
 前記複数の画像の解像度を下げる過程と、
 解像度を下げた複数の画像における対応する画素の画素値の比較演算に基づいて、前記対応する画素の離散的奥行きデータを算出する過程と
 を有することを特徴とする擬似3次元画像生成方法。
The pseudo three-dimensional image generation method according to claim 9,
The discrete depth data calculation step,
Reducing the resolution of the plurality of images;
Calculating the discrete depth data of the corresponding pixels based on a comparison operation of the pixel values of the corresponding pixels in the plurality of images with reduced resolutions.
 請求項10記載の擬似3次元画像生成方法であって、
 前記複数の画像の解像度を下げる過程において、前記複数の画像を平滑化し、かつ解像度を下げることを特徴とする擬似3次元画像生成方法。
The pseudo three-dimensional image generation method according to claim 10, wherein
A pseudo three-dimensional image generation method, characterized in that in the step of reducing the resolution of the plurality of images, the plurality of images are smoothed and the resolution is reduced.
 請求項9乃至11いずれか一項記載の擬似3次元画像生成方法であって、
 前記離散的奥行きデータ算出過程において、前記複数の画像における対応する画素の画素値の差または比を当該画素ごとの閾値と比較することにより、画素ごとに離散的奥行きデータを割り当てることを特徴とする擬似3次元画像生成方法。
The pseudo three-dimensional image generation method according to claim 9, wherein
In the discrete depth data calculation step, discrete depth data is assigned to each pixel by comparing a difference or a ratio of pixel values of corresponding pixels in the plurality of images with a threshold value for each pixel. A pseudo three-dimensional image generation method.
 請求項9乃至12いずれか一項記載の擬似3次元画像生成方法であって、
 前記離散的奥行きデータ算出過程において、算出した前記対応する画素の離散的奥行きデータに基づいて、前記撮影対象のオブジェクトを抽出することを特徴とする擬似3次元画像生成方法。
The pseudo three-dimensional image generation method according to claim 9, wherein:
A pseudo three-dimensional image generation method, wherein in the discrete depth data calculation step, the object to be photographed is extracted based on the calculated discrete depth data of the corresponding pixel.
 請求項13記載の擬似3次元画像生成方法であって、
 前記離散的奥行きデータ算出過程において、前記複数の画像における対応する画素の画素値の差または比を当該画素ごとの閾値と比較することにより、画素ごとに離散的奥行きデータを割り当て、前記複数の画像のいずれかにおいて、前記離散的奥行きデータが等しくかつ隣接する画素を前記オブジェクトとして抽出することを特徴とする擬似3次元画像生成方法。
The pseudo three-dimensional image generation method according to claim 13,
In the discrete depth data calculation step, by comparing the difference or ratio of the pixel values of the corresponding pixels in the plurality of images with a threshold value for each pixel, discrete depth data is assigned to each pixel, In any one of the first to third aspects, a pixel having the same discrete depth data and adjacent pixels is extracted as the object.
 請求項13または14記載の擬似3次元画像生成方法であって、
 前記奥行き値算出過程において、前記離散的奥行きデータに基づき、前記オブジェクトに奥行き関数をあてはめる奥行き関数あてはめ過程をさらに有することを特徴とする擬似3次元画像生成方法。
The pseudo three-dimensional image generation method according to claim 13 or 14,
The pseudo three-dimensional image generating method according to claim 1, further comprising a depth function fitting step of fitting a depth function to the object based on the discrete depth data in the depth value calculating step.
 請求項15記載の擬似3次元画像生成方法であって、
 前記画像全体、前記オブジェクトの隣接部分、および前記オブジェクト内のいずれかにおいて、画素の位置に対する奥行き値の平滑化処理を行う過程
 をさらに含むことを特徴とする擬似3次元画像生成方法。
The pseudo three-dimensional image generation method according to claim 15,
Performing a process of smoothing a depth value with respect to a position of a pixel in the entire image, a portion adjacent to the object, or any of the inside of the object.
 請求項9乃至16いずれか一項記載の擬似3次元画像生成方法における過程をコンピュータに実行させるためのプログラムとした
 ことを特徴とする擬似3次元画像生成プログラム。
A pseudo three-dimensional image generation program, characterized in that it is a program for causing a computer to execute the process in the pseudo three-dimensional image generation method according to any one of claims 9 to 16.
 請求項9乃至16のいずれか一項記載の擬似3次元画像生成方法における過程をコンピュータに実行させるためのプログラムとし、
 前記プログラムを前記コンピュータで読取り可能な記録媒体に記録した
 ことを特徴とする擬似3次元画像生成プログラムを記録した記録媒体。
A program for causing a computer to execute a process in the pseudo three-dimensional image generation method according to any one of claims 9 to 16,
A recording medium recording a pseudo three-dimensional image generation program, wherein the program is recorded on a recording medium readable by the computer.
JP2003326818A 2002-09-20 2003-09-18 Pseudo three-dimensional image generation apparatus, generation method, program therefor, and recording medium Expired - Fee Related JP3938122B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003326818A JP3938122B2 (en) 2002-09-20 2003-09-18 Pseudo three-dimensional image generation apparatus, generation method, program therefor, and recording medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2002275471 2002-09-20
JP2003326818A JP3938122B2 (en) 2002-09-20 2003-09-18 Pseudo three-dimensional image generation apparatus, generation method, program therefor, and recording medium

Publications (2)

Publication Number Publication Date
JP2004133919A true JP2004133919A (en) 2004-04-30
JP3938122B2 JP3938122B2 (en) 2007-06-27

Family

ID=32301768

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003326818A Expired - Fee Related JP3938122B2 (en) 2002-09-20 2003-09-18 Pseudo three-dimensional image generation apparatus, generation method, program therefor, and recording medium

Country Status (1)

Country Link
JP (1) JP3938122B2 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010510600A (en) * 2006-11-21 2010-04-02 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Generating an image depth map
JP2012098406A (en) * 2010-10-29 2012-05-24 Ricoh Co Ltd Image forming apparatus and method for setting threshold
JP2013005289A (en) * 2011-06-17 2013-01-07 Sony Corp Image processing device and method and program
JP2013078101A (en) * 2011-09-13 2013-04-25 Sharp Corp Image processing apparatus, image capturing apparatus and image displaying apparatus
JP2013085133A (en) * 2011-10-11 2013-05-09 Dainippon Printing Co Ltd Depth creating support device, depth creating support method and program
JP2014239436A (en) * 2013-06-06 2014-12-18 ソニー株式会社 Method and device for real-time conversion from two-dimensional content to three-dimensional content
JP2015508947A (en) * 2012-01-04 2015-03-23 トムソン ライセンシングThomson Licensing 3D image sequence processing
JP2015073292A (en) * 2009-06-16 2015-04-16 三星電子株式会社Samsung Electronics Co.,Ltd. Device and method of converting two dimensional image to three dimensional image
JP5830705B2 (en) * 2012-09-25 2015-12-09 パナソニックIpマネジメント株式会社 Image signal processing apparatus and image signal processing method
US9483836B2 (en) 2011-02-28 2016-11-01 Sony Corporation Method and apparatus for real-time conversion of 2-dimensional content to 3-dimensional content
JP2017112419A (en) * 2015-12-14 2017-06-22 日本電信電話株式会社 Optimal depth determination device, optimal depth determination method and computer program
JP2020529086A (en) * 2017-11-30 2020-10-01 オッポ広東移動通信有限公司Guangdong Oppo Mobile Telecommunications Corp., Ltd. Methods and equipment for blurring preview photos and storage media

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010510600A (en) * 2006-11-21 2010-04-02 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Generating an image depth map
JP2015073292A (en) * 2009-06-16 2015-04-16 三星電子株式会社Samsung Electronics Co.,Ltd. Device and method of converting two dimensional image to three dimensional image
JP2012098406A (en) * 2010-10-29 2012-05-24 Ricoh Co Ltd Image forming apparatus and method for setting threshold
US9483836B2 (en) 2011-02-28 2016-11-01 Sony Corporation Method and apparatus for real-time conversion of 2-dimensional content to 3-dimensional content
JP2013005289A (en) * 2011-06-17 2013-01-07 Sony Corp Image processing device and method and program
JP2013078101A (en) * 2011-09-13 2013-04-25 Sharp Corp Image processing apparatus, image capturing apparatus and image displaying apparatus
JP2013085133A (en) * 2011-10-11 2013-05-09 Dainippon Printing Co Ltd Depth creating support device, depth creating support method and program
JP2015508947A (en) * 2012-01-04 2015-03-23 トムソン ライセンシングThomson Licensing 3D image sequence processing
JP5830705B2 (en) * 2012-09-25 2015-12-09 パナソニックIpマネジメント株式会社 Image signal processing apparatus and image signal processing method
JP2014239436A (en) * 2013-06-06 2014-12-18 ソニー株式会社 Method and device for real-time conversion from two-dimensional content to three-dimensional content
JP2017112419A (en) * 2015-12-14 2017-06-22 日本電信電話株式会社 Optimal depth determination device, optimal depth determination method and computer program
JP2020529086A (en) * 2017-11-30 2020-10-01 オッポ広東移動通信有限公司Guangdong Oppo Mobile Telecommunications Corp., Ltd. Methods and equipment for blurring preview photos and storage media

Also Published As

Publication number Publication date
JP3938122B2 (en) 2007-06-27

Similar Documents

Publication Publication Date Title
US11948282B2 (en) Image processing apparatus, image processing method, and storage medium for lighting processing on image using model data
US10997696B2 (en) Image processing method, apparatus and device
EP3198852B1 (en) Image processing apparatus and control method thereof
KR100543801B1 (en) Pseudo three dimensional image generating apparatus
JP6576083B2 (en) Image processing apparatus, image processing method, and program
WO2019047985A1 (en) Image processing method and device, electronic device, and computer-readable storage medium
CN107465866A (en) Image processing equipment and method, picture pick-up device and computer-readable recording medium
KR20150050450A (en) Method and apparatus for generating depth map of a scene
US11282176B2 (en) Image refocusing
JP3990271B2 (en) Simple stereo image input device, method, program, and recording medium
JP3938122B2 (en) Pseudo three-dimensional image generation apparatus, generation method, program therefor, and recording medium
JP7059076B2 (en) Image processing device, its control method, program, recording medium
JP2017152866A (en) Image processing system and image processing method
CN117058183A (en) Image processing method and device based on double cameras, electronic equipment and storage medium
JP6896811B2 (en) Image processing equipment, image processing methods, and programs
JP2014098859A (en) Imaging apparatus and imaging method
WO2020084894A1 (en) Multi-camera system, control value calculation method and control device
JP2017138927A (en) Image processing device, imaging apparatus, control method and program thereof
JP2007304743A (en) Parallax interpolation processing method and processor
JP2006031171A (en) Pseudo three-dimensional data generation method, apparatus, program and recording medium
CN111147760B (en) Light field camera, luminosity adjusting method and device thereof and electronic equipment
JP7011694B2 (en) Image processing equipment and its control method, program
JP6675461B2 (en) Image processing apparatus, control method therefor, and program
JP2009038670A (en) Method and device for flicker correction
JP2021026320A (en) Image processing device, control method thereof and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040227

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061102

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061128

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070129

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070319

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110406

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120406

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130406

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140406

Year of fee payment: 7

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees