JP2011141710A - Device, method and program for estimating depth - Google Patents

Device, method and program for estimating depth Download PDF

Info

Publication number
JP2011141710A
JP2011141710A JP2010001646A JP2010001646A JP2011141710A JP 2011141710 A JP2011141710 A JP 2011141710A JP 2010001646 A JP2010001646 A JP 2010001646A JP 2010001646 A JP2010001646 A JP 2010001646A JP 2011141710 A JP2011141710 A JP 2011141710A
Authority
JP
Japan
Prior art keywords
value
pixel
difference
depth
difference value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010001646A
Other languages
Japanese (ja)
Inventor
Takanori Senoo
孝憲 妹尾
Kenji Yamamoto
健詞 山本
Ryutaro Oi
隆太朗 大井
Tomoyuki Mishina
智之 三科
Yasuichiro Kurita
泰市郎 栗田
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.)
National Institute of Information and Communications Technology
Original Assignee
National Institute of Information and Communications Technology
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 National Institute of Information and Communications Technology filed Critical National Institute of Information and Communications Technology
Priority to JP2010001646A priority Critical patent/JP2011141710A/en
Publication of JP2011141710A publication Critical patent/JP2011141710A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a depth estimating device which can reduce incorrect estimation of a depth value when occlusion occurs among a plurality of camera images and corresponding points do not exist, or even when a plurality of corresponding points exist in a uniform object. <P>SOLUTION: The depth estimating device 1 includes: an image input means 10 which inputs a reference image and a plurality of adjacent images; a corresponding pixel difference operation means 20 which calculates for each assumed depth value, an adjacent image pixel difference value which is a difference absolute value between a pixel value of the pixel of the reference image and the pixel value of the pixel of the adjacent image corresponding to a parallax of an assumed depth value of the pixel; a difference value determining means 30 which determines an average value or a minimum value of the adjacent image pixel difference value as a selection difference value by a threshold; a storage means 40 which associates the selection difference value with the assumed depth value and a pixel position of the reference image to stores it; and a depth value determining means 60 which determines the depth value for each pixel position by searching an assumed depth value where the selection difference value becomes minimum in the storage means 40. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、複数のカメラで被写体を撮影した映像から、多視点映像用の被写体の奥行値を推定する奥行推定装置、奥行推定方法および奥行推定プログラムに関する。   The present invention relates to a depth estimation device, a depth estimation method, and a depth estimation program for estimating a depth value of a subject for a multi-view video from videos obtained by photographing the subject with a plurality of cameras.

近年、複数のカメラで同一の被写体を撮影した複数の映像(多視点映像)を用いて、立体映像や自由視点映像を生成、符号化する研究が進められている。これらの立体映像や自由視点映像を生成、符号化する技術では、基本的に、複数のカメラで被写体を撮影したカメラ映像の視差量を利用することで、被写体までの奥行値を求めている(特許文献1等参照)。   In recent years, research on generating and encoding stereoscopic video and free-viewpoint video using a plurality of videos (multi-view videos) obtained by shooting the same subject with a plurality of cameras is underway. In the technology for generating and encoding these stereoscopic video and free viewpoint video, the depth value to the subject is basically obtained by using the parallax amount of the camera video obtained by photographing the subject with a plurality of cameras ( (See Patent Document 1).

この特許文献1には、図13に示すように、複数のカメラ(C,C,C)で撮影された視差方向に異なるカメラ映像を、時間方向に符号化する技術が開示されている。
この符号化の際に、特許文献1に記載されている発明は、複数のカメラ(C,C,C)で撮影されたカメラ映像(F,F,F)間で、映像内の被写体の奥行値を仮定し、基準となるカメラ(例えば、C)で撮影されたカメラ映像(F)内のブロックに含まれる画素値と、カメラの位置関係と奥行値とから定まる他のカメラ(例えば、C,C)で撮影されたカメラ映像(F,F)内の対応ブロックに含まれる画素値との差分絶対値が最小となる奥行値を求めている。
As shown in FIG. 13, this Patent Document 1 discloses a technique for encoding, in the time direction, camera images that are captured in a plurality of cameras (C 1 , C 2 , C 3 ) and that have different parallax directions. Yes.
At the time of this encoding, the invention described in Japanese Patent Application Laid-Open No. H10-228867 is between camera images (F 1 , F 2 , F 3 ) taken by a plurality of cameras (C 1 , C 2 , C 3 ). Assuming the depth value of the subject in the video, the pixel value included in the block in the camera video (F 2 ) captured by the reference camera (eg, C 2 ), the positional relationship of the camera, and the depth value A depth value that minimizes the absolute value of the difference from the pixel value included in the corresponding block in the camera image (F 1 , F 3 ) captured by another fixed camera (eg, C 1 , C 3 ) is obtained. .

このように、従来は、複数のカメラ映像において、複数の仮定した奥行値に対応する画素値の差分絶対値が最小となる画素が、それぞれのカメラ映像の対応する画素であり、また、そのときの仮定した奥行値が当該画素の奥行値であると推定していた。   Thus, conventionally, in a plurality of camera images, the pixel having the smallest difference absolute value of pixel values corresponding to a plurality of assumed depth values is a corresponding pixel of each camera image, and at that time, Was assumed to be the depth value of the pixel.

特開2007−36800号公報(段落〔0118〕〜〔0112〕)JP 2007-36800 A (paragraphs [0118] to [0112])

前記したように、複数のカメラ映像において、複数の仮定した奥行値に対応する画素値の差分絶対値が最小となる画素を探索し、当該画素の奥行値を推定する手法では、以下に示す問題がある。
例えば、被写体の重なりによって、複数のカメラ映像間で対応点が存在しない場合や、画素値の変化が少ない一様な被写体において、複数のカメラ映像間に、画素値が近似する複数の誤った対応点が存在する場合がある。これらの場合、従来の手法では、単に、画素値の差分絶対値が最小となる画素を探索するため、誤った対応点を探索(偽マッチング)してしまう場合がある。すなわち、従来の手法では、誤った対応点を探索した結果、誤った奥行値が推定されてしまうという問題がある。
As described above, in the method of searching for a pixel having the smallest difference absolute value of pixel values corresponding to a plurality of assumed depth values in a plurality of camera images and estimating the depth value of the pixel, the following problems are encountered. There is.
For example, if there is no corresponding point between multiple camera images due to overlapping of the subjects, or multiple uniform responses with pixel values approximated between multiple camera images in a uniform subject with little change in pixel values There may be points. In these cases, the conventional method simply searches for a pixel with the smallest difference absolute value of the pixel value, and thus may find an incorrect corresponding point (false matching). That is, the conventional method has a problem that an incorrect depth value is estimated as a result of searching for an incorrect corresponding point.

本発明は、このような問題点に鑑みてなされたものであり、複数のカメラ映像間で対応点が存在しない場合や、一様な被写体で複数のカメラ映像間における対応点が複数存在する場合であっても、奥行値の誤推定を軽減することが可能な奥行推定装置、奥行推定方法および奥行推定プログラムを提供することを課題とする。   The present invention has been made in view of such a problem, and when there are no corresponding points between a plurality of camera images, or when there are a plurality of corresponding points between a plurality of camera images in a uniform subject. Even so, it is an object to provide a depth estimation device, a depth estimation method, and a depth estimation program that can reduce erroneous estimation of depth values.

本発明は、前記課題を解決するために創案されたものであり、まず、請求項1に記載の奥行推定装置は、予め定めた位置に複数配列したカメラで同一の被写体を撮影した複数のカメラ映像から、前記被写体の奥行きを示す奥行値を推定する奥行推定装置であって、映像入力手段と、対応画素差分演算手段と、差分値決定手段と、記憶手段と、奥行値決定手段と、を備える構成とした。   The present invention has been made to solve the above-mentioned problems. First, the depth estimation apparatus according to claim 1 is a plurality of cameras that photograph the same subject with a plurality of cameras arranged at predetermined positions. A depth estimation device for estimating a depth value indicating the depth of the subject from a video, comprising: a video input means; a corresponding pixel difference calculation means; a difference value determination means; a storage means; and a depth value determination means. It was set as the structure provided.

かかる構成において、奥行推定装置は、映像入力手段によって、複数配列したカメラのいずれかにおいて、予め定めた基準カメラで被写体を撮影した基準映像と、基準カメラに隣接する複数の隣接カメラで被写体を撮影した複数の隣接映像とを入力する。この隣接映像は、基準映像からの視差を計測するための映像である。   In such a configuration, the depth estimation apparatus captures a subject with a reference image obtained by photographing a subject with a predetermined reference camera and a plurality of adjacent cameras adjacent to the reference camera in any of a plurality of cameras arranged by the image input unit. Input a plurality of adjacent videos. This adjacent video is a video for measuring the parallax from the reference video.

そして、奥行推定装置は、対応画素差分演算手段によって、複数の仮定奥行値ごとに、基準映像の各画素の画素値と、当該画素の仮定奥行値の視差に対応する画素である複数の隣接映像の各画素の画素値との差分絶対値である隣接映像画素差分値を演算する。この仮定奥行値は、基準映像の画素に対応する被写体の奥行値を仮定した値であって、例えば、最小視差(“0”)から最大視差までの値とする。この対応画素差分演算手段によって、基準映像の各画素の画素値と、隣接映像の各画素の画素値との仮定奥行値に対応した対応点同士の画素値の差分絶対値が算出される。なお、この差分絶対値(隣接映像画素差分値)は、その値が小さいほど、仮定奥行値が実際の被写体において同一の対応点を指し示している可能性が高いといえる。   Then, the depth estimation device uses a corresponding pixel difference calculation unit to calculate, for each of a plurality of assumed depth values, a plurality of adjacent images that are pixels corresponding to the parallax of the pixel value of each pixel of the reference image and the assumed depth value of the pixel. Next, an adjacent video pixel difference value that is a difference absolute value from the pixel value of each pixel is calculated. The assumed depth value is a value that assumes the depth value of the subject corresponding to the pixel of the reference image, and is, for example, a value from the minimum parallax (“0”) to the maximum parallax. By this corresponding pixel difference calculating means, an absolute difference value between pixel values of corresponding points corresponding to an assumed depth value between the pixel value of each pixel of the reference image and the pixel value of each pixel of the adjacent image is calculated. It can be said that the smaller the value of the difference absolute value (adjacent video pixel difference value), the higher the possibility that the assumed depth value points to the same corresponding point in the actual subject.

さらに、奥行推定装置は、差分値決定手段によって、複数の仮定奥行値および基準映像の画素位置ごとに、隣接映像画素差分値の最大差分値と最小差分値との差が、予め定めた閾値よりも小さい場合は、隣接映像画素差分値の平均値である平均差分値を選択し、閾値よりも大きい場合は、隣接映像画素差分値の最小差分値を選択して、選択差分値として決定する。なお、平均差分値は、隣接映像画素差分値の相加平均としてもよいし、相乗平均としてもよい。
そして、奥行推定装置は、記憶手段に差分値決定手段で決定した選択差分値を、仮定奥行値と基準映像の画素位置とに対応付けて記憶する。
Further, the depth estimation device uses the difference value determination unit to determine whether the difference between the maximum difference value and the minimum difference value of the adjacent image pixel difference values is greater than a predetermined threshold value for each of the plurality of assumed depth values and the pixel positions of the reference image. Is smaller than the threshold value, the average difference value that is the average value of the adjacent video pixel difference values is selected. If it is larger than the threshold value, the minimum difference value of the adjacent video pixel difference values is selected and determined as the selected difference value. The average difference value may be an arithmetic average of adjacent video pixel difference values or a geometric average.
The depth estimation apparatus stores the selected difference value determined by the difference value determination unit in the storage unit in association with the assumed depth value and the pixel position of the reference image.

なお、正しい奥行値に対する選択差分値であれば、その値は小さくなり、ノイズ等によって、ある隣接映像画素差分値が誤った値をとった場合であっても、複数の隣接映像画素差分値を平均化することで、全体として選択差分値が小さくなる。
また、オクルージョンが発生することで、ある隣接映像画素差分値が大きな値となった場合であっても、閾値判定により、他の隣接映像における最小差分値が選択されるため、選択差分値は、より正しい値として選択されることになる。
これによって、選択差分値は、仮定奥行値の中で正しい奥行値を判定するための指標となる。
そして、奥行推定装置は、奥行値決定手段によって、画素位置ごとに、選択差分値が最小となる仮定奥行値を記憶手段において探索し、当該画素位置の奥行値と決定する。
Note that if the selected difference value is the correct depth value, the value becomes small, and even if a certain adjacent video pixel difference value takes an incorrect value due to noise or the like, a plurality of adjacent video pixel difference values are obtained. By averaging, the selection difference value becomes smaller as a whole.
Further, even if a certain adjacent video pixel difference value becomes a large value due to occurrence of occlusion, the minimum difference value in the other adjacent video is selected by the threshold determination, so the selection difference value is It will be selected as a more correct value.
Thus, the selection difference value becomes an index for determining a correct depth value among the assumed depth values.
Then, the depth estimation apparatus searches the storage unit for an assumed depth value at which the selection difference value is minimum for each pixel position by the depth value determination unit, and determines the depth value at the pixel position.

また、請求項2に記載の奥行推定装置は、予め定めた位置に複数配列したカメラで同一の被写体を撮影した複数のカメラ映像から、前記被写体の奥行きを示す奥行値を推定する奥行推定装置であって、映像入力手段と、対応画素差分演算手段と、差分値決定手段と、記憶手段と、奥行値決定手段と、を備える構成とした。
なお、請求項1に記載の奥行推定装置の差分値決定手段は、隣接映像画素差分値の最大差分値と最小差分値との差に基づいて選択差分値を決定したが、請求項2に記載の奥行推定装置の差分値決定手段は、隣接映像画素差分値の最大差分値と最小差分値との比に基づいて選択差分値を決定するものとした。
The depth estimation apparatus according to claim 2 is a depth estimation apparatus that estimates a depth value indicating a depth of the subject from a plurality of camera images obtained by photographing the same subject with a plurality of cameras arranged in a predetermined position. Thus, the image input means, the corresponding pixel difference calculation means, the difference value determination means, the storage means, and the depth value determination means are provided.
The difference value determination means of the depth estimation apparatus according to claim 1 determines the selection difference value based on the difference between the maximum difference value and the minimum difference value of the adjacent video pixel difference values. The difference value determination means of the depth estimation apparatus determines the selection difference value based on the ratio between the maximum difference value and the minimum difference value of the adjacent video pixel difference values.

すなわち、かかる構成において、奥行推定装置は、差分値決定手段によって、複数の仮定奥行値および基準映像の画素位置ごとに、隣接映像画素差分値の最大差分値と最小差分値との比が、予め定めた閾値の範囲内の場合は、隣接映像画素差分値の平均値である平均差分値を選択し、範囲外の場合は、隣接映像画素差分値の最小差分値を選択して、選択差分値として決定する。   That is, in such a configuration, the depth estimation device uses the difference value determination unit to determine in advance the ratio between the maximum difference value and the minimum difference value of the adjacent image pixel difference values for each of the plurality of assumed depth values and the pixel positions of the reference image. If it is within the defined threshold range, the average difference value that is the average value of the adjacent video pixel difference values is selected. If it is outside the range, the minimum difference value of the adjacent video pixel difference values is selected, and the selected difference value Determine as.

なお、正しい奥行値に対する選択差分値であれば、その値は小さくなり、ノイズ等によって、ある隣接映像画素差分値が誤った値をとった場合であっても、隣接映像画素差分値の比が予め定めた範囲内であれば、それらを平均化することで、全体として選択差分値が小さくなる。これによって、選択差分値は、仮定奥行値の中で正しい奥行値を判定するための指標となる。
また、オクルージョンが発生することで、ある隣接映像画素差分値が大きな値となり、比が大きく、または小さくなった場合であっても、閾値判定により、他の隣接映像における最小差分値が選択されるため、選択差分値は、より正しい値として選択されることになる。
Note that if the selection difference value is the correct depth value, the value becomes small, and even if a certain adjacent video pixel difference value takes an incorrect value due to noise or the like, the ratio of the adjacent video pixel difference value is If within a predetermined range, the selection difference value becomes smaller as a whole by averaging them. Thus, the selection difference value becomes an index for determining a correct depth value among the assumed depth values.
In addition, even when the adjacent video pixel difference value becomes a large value and the ratio is large or small due to the occurrence of occlusion, the minimum difference value in the other adjacent video is selected by the threshold determination. Therefore, the selection difference value is selected as a more correct value.

また、請求項3に記載の奥行推定装置は、請求項1または請求項2に記載の奥行推定装置において、差分値決定手段が、前記隣接映像画素差分値の中に、予め定めた第2閾値より小さい差分絶対値が存在する場合、当該差分絶対値を前記選択差分値として決定することを特徴とする。   The depth estimation apparatus according to claim 3 is the depth estimation apparatus according to claim 1 or 2, wherein the difference value determining means includes a second threshold value that is set in advance in the adjacent video pixel difference value. When a smaller difference absolute value exists, the difference absolute value is determined as the selected difference value.

かかる構成において、奥行推定装置は、差分値決定手段によって、隣接映像画素差分値が第2閾値より小さければ、平均差分値や最小差分値の選択のための判定を行わず、隣接映像画素差分値そのものを選択する。この第2閾値は、例えば、画素の取りうる値を“0”〜“255”の間のレベルとしたとき、数レベル程度とする。数レベル程度であれば、差分値決定手段が選択する差分値が、正しい奥行値に対応する差分値である可能性が高いからである。   In such a configuration, the depth estimation device does not perform the determination for selecting the average difference value or the minimum difference value by the difference value determining unit if the adjacent image pixel difference value is smaller than the second threshold value, and the adjacent image pixel difference value. Select itself. For example, when the value that can be taken by the pixel is set to a level between “0” and “255”, the second threshold is set to about several levels. This is because the difference value selected by the difference value determining means is likely to be a difference value corresponding to the correct depth value if it is about several levels.

さらに、請求項4に記載の奥行推定装置は、請求項1から請求項3のいずれか一項に記載の奥行推定装置において、平滑化手段をさらに備える構成とした。   Furthermore, the depth estimation apparatus according to claim 4 is configured to further include a smoothing unit in the depth estimation apparatus according to any one of claims 1 to 3.

かかる構成において、奥行推定装置は、平滑化手段によって、基準映像の画素位置ごとに、選択差分値に、選択差分値が最小となる仮定奥行値と、当該画素位置の隣接画素位置における選択差分値が最小となる仮定奥行値との差分を重み付け加算することで、当該画素位置における選択差分値を平滑化する。これによって、奥行値決定手段によって、平滑化された選択差分値が最小となる仮定奥行値が探索されることになり、当該画素位置の奥行値とするため、奥行値そのものが隣接画素間で平滑化されることになる。   In such a configuration, the depth estimation apparatus uses the smoothing unit to select a hypothetical depth value that minimizes the selection difference value and a selection difference value at an adjacent pixel position of the pixel position for each pixel position of the reference image. By weighting and adding the difference from the assumed depth value at which is the minimum, the selected difference value at the pixel position is smoothed. As a result, the depth value determining means searches for an assumed depth value at which the smoothed selection difference value is minimized, and the depth value itself is smoothed between adjacent pixels in order to obtain the depth value at the pixel position. Will be converted.

また、請求項5に記載の奥行推定装置は、請求項1から請求項4のいずれか一項に記載の奥行推定装置において、仮定奥行値が、前記カメラ映像の画素間隔よりも小さい仮想のサブ画素間隔を単位とする値であって、前記対応画素差分演算手段が、前記仮定奥行値に対応する前記サブ画素を含む画素の画素値と、当該画素に隣接する画素の画素値とから補間して生成した画素値を用いて差分絶対値を演算する構成とした。
かかる構成において、奥行推定装置は、対応画素差分演算手段によって、サブ画素単位で差分値が演算され、サブ画素単位で奥行値が決定されることになる。
A depth estimation apparatus according to claim 5 is the depth estimation apparatus according to any one of claims 1 to 4, wherein an assumed depth value is smaller than a pixel interval of the camera image. The pixel interval is a unit, and the corresponding pixel difference calculation means interpolates from a pixel value of a pixel including the sub-pixel corresponding to the assumed depth value and a pixel value of a pixel adjacent to the pixel. The difference absolute value is calculated using the pixel values generated in this way.
In such a configuration, the depth estimation apparatus calculates the difference value in units of sub-pixels by the corresponding pixel difference calculation unit, and determines the depth value in units of sub-pixels.

さらに、請求項6に記載の奥行推定装置は、請求項1から請求項5のいずれか一項に記載の奥行推定装置において、前記画素値が、輝度値および色差値、または、カラー値の複数の要素で構成される値であって、前記対応画素差分演算手段が、前記差分絶対値を、前記要素ごとの値の差分絶対値和として演算する構成とした。   Furthermore, the depth estimation apparatus according to claim 6 is the depth estimation apparatus according to any one of claims 1 to 5, wherein the pixel value includes a plurality of luminance values, color difference values, or color values. The corresponding pixel difference calculation means calculates the difference absolute value as a sum of absolute differences of values for each element.

かかる構成において、奥行推定装置は、画素値として、輝度値および色差値、または、カラー値(例えば、RGB値)といった複数の要素で構成される値であっても、輝度値および色差値の差分絶対値の和、または、RGB値それぞれの差分絶対値の和として差分絶対値を単一の値で処理することができる。   In such a configuration, the depth estimation apparatus can calculate the difference between the luminance value and the color difference value even if the pixel value is a value composed of a plurality of elements such as a luminance value and a color difference value, or a color value (for example, RGB value). The difference absolute value can be processed as a single value as the sum of absolute values or the sum of absolute differences of RGB values.

また、請求項7に記載の奥行推定方法は、予め定めた位置に複数配列したカメラで同一の被写体を撮影した複数のカメラ映像から、前記被写体の奥行きを示す奥行値を推定する奥行推定方法であって、映像入力ステップと、対応画素差分演算ステップと、差分値決定ステップと、記憶ステップと、奥行値決定ステップと、を含む手順とした。   The depth estimation method according to claim 7 is a depth estimation method for estimating a depth value indicating the depth of the subject from a plurality of camera images obtained by photographing the same subject with a plurality of cameras arranged in a predetermined position. Thus, the procedure includes a video input step, a corresponding pixel difference calculation step, a difference value determination step, a storage step, and a depth value determination step.

かかる手順において、奥行推定方法は、映像入力ステップで、複数配列したカメラのいずれかにおいて、予め定めた基準カメラで被写体を撮影した基準映像と、基準カメラに隣接する複数の隣接カメラで被写体を撮影した複数の隣接映像とを映像入力手段により入力する。
そして、奥行推定方法は、対応画素差分演算ステップで、複数の仮定奥行値ごとに、基準映像の各画素の画素値と、当該画素の仮定奥行値の視差に対応する画素である複数の隣接映像の各画素の画素値との差分絶対値である隣接映像画素差分値を対応画素差分演算手段により演算する。
In such a procedure, the depth estimation method is a video input step in which a reference video obtained by shooting a subject with a predetermined reference camera and a plurality of adjacent cameras adjacent to the reference camera are shot in any of a plurality of cameras arranged. The plurality of adjacent videos are input by video input means.
And the depth estimation method is a corresponding pixel difference calculation step, for each of a plurality of assumed depth values, a plurality of adjacent images that are pixels corresponding to the parallax of each pixel value of the reference image and the assumed depth value of the pixel. The adjacent pixel difference value, which is a difference absolute value from the pixel value of each pixel, is calculated by the corresponding pixel difference calculation means.

さらに、奥行推定方法は、差分値決定ステップで、対応画素差分演算ステップで演算した隣接映像画素差分値を、差分値決定手段により、複数の仮定奥行値および基準映像の画素位置ごとに、対応画素差分演算ステップで演算した隣接映像画素差分値の最大差分値と最小差分値との差が、予め定めた閾値よりも小さい場合は、隣接映像画素差分値の平均値である平均差分値を選択し、閾値よりも大きい場合は、隣接映像画素差分値の最小差分値を選択して、選択差分値として決定する。
そして、奥行推定方法は、記憶ステップで、差分値決定ステップで決定した選択差分値を、仮定奥行値と基準映像の画素位置とに対応付けて記憶手段に記憶する。
その後、奥行推定方法は、奥行値決定ステップで、奥行値決定手段により、画素位置ごとに、選択差分値が最小となる仮定奥行値を記憶手段において探索し、当該画素位置の奥行値とする。
Further, in the depth estimation method, in the difference value determination step, the adjacent image pixel difference value calculated in the corresponding pixel difference calculation step is determined by the difference value determination unit for each of a plurality of assumed depth values and pixel positions of the reference image. When the difference between the maximum difference value and the minimum difference value of the adjacent video pixel difference values calculated in the difference calculation step is smaller than a predetermined threshold, an average difference value that is an average value of the adjacent video pixel difference values is selected. If it is greater than the threshold, the minimum difference value of the adjacent video pixel difference values is selected and determined as the selected difference value.
In the depth estimation method, in the storage step, the selection difference value determined in the difference value determination step is stored in the storage unit in association with the assumed depth value and the pixel position of the reference image.
Thereafter, in the depth estimation method, in the depth value determination step, the depth value determination unit searches the storage unit for an assumed depth value at which the selection difference value is minimum for each pixel position, and sets it as the depth value of the pixel position.

また、請求項8に記載の奥行推定方法は、予め定めた位置に複数配列したカメラで同一の被写体を撮影した複数のカメラ映像から、前記被写体の奥行きを示す奥行値を推定する奥行推定方法であって、映像入力ステップと、対応画素差分演算ステップと、差分値決定ステップと、記憶ステップと、奥行値決定ステップと、を含む手順とした。
なお、請求項7に記載の奥行推定方法の差分値決定ステップは、隣接映像画素差分値の最大差分値と最小差分値との差に基づいて選択差分値を決定したが、請求項8に記載の奥行推定方法の差分値決定ステップは、隣接映像画素差分値の最大差分値と最小差分値との比に基づいて選択差分値を決定することとした。
The depth estimation method according to claim 8 is a depth estimation method for estimating a depth value indicating a depth of the subject from a plurality of camera images obtained by photographing the same subject with a plurality of cameras arranged in a predetermined position. Thus, the procedure includes a video input step, a corresponding pixel difference calculation step, a difference value determination step, a storage step, and a depth value determination step.
In addition, although the difference value determination step of the depth estimation method according to claim 7 determines the selection difference value based on the difference between the maximum difference value and the minimum difference value of the adjacent video pixel difference values, In the difference value determination step of the depth estimation method, the selection difference value is determined based on the ratio between the maximum difference value and the minimum difference value of the adjacent video pixel difference values.

すなわち、かかる手順において、奥行推定方法は、差分値決定手段によって、複数の仮定奥行値および基準映像の画素位置ごとに、隣接映像画素差分値の最大差分値と最小差分値との比が、予め定めた閾値の範囲内の場合は、隣接映像画素差分値の平均値である平均差分値を選択し、範囲外の場合は、隣接映像画素差分値の最小差分値を選択して、選択差分値として決定する。   That is, in such a procedure, the depth estimation method uses a difference value determination unit to determine in advance the ratio between the maximum difference value and the minimum difference value of the adjacent image pixel difference values for each of the plurality of assumed depth values and the pixel positions of the reference image. If it is within the defined threshold range, the average difference value that is the average value of the adjacent video pixel difference values is selected. If it is outside the range, the minimum difference value of the adjacent video pixel difference values is selected, and the selected difference value Determine as.

さらに、請求項9に記載の奥行推定プログラムは、予め定めた位置に複数配列したカメラで同一の被写体を撮影した複数のカメラ映像から、前記被写体の奥行きを示す奥行値を推定するために、コンピュータを、映像入力手段、対応画素差分演算手段、差分値決定手段、奥行値決定手段、として機能させる構成とした。   The depth estimation program according to claim 9 is a computer for estimating a depth value indicating the depth of the subject from a plurality of camera images obtained by photographing the same subject with a plurality of cameras arranged in a predetermined position. Are configured to function as video input means, corresponding pixel difference calculation means, difference value determination means, and depth value determination means.

かかる構成において、奥行推定プログラムは、映像入力手段によって、複数配列したカメラのいずれかにおいて、予め定めた基準カメラで被写体を撮影した基準映像と、基準カメラに隣接する複数の隣接カメラで被写体を撮影した複数の隣接映像とを入力する。
そして、奥行推定プログラムは、対応画素差分演算手段によって、複数の仮定奥行値ごとに、基準映像の各画素の画素値と、当該画素の仮定奥行値の視差に対応する画素である複数の隣接映像の各画素の画素値との差分絶対値である隣接映像画素差分値を演算する。
In such a configuration, the depth estimation program captures a subject with a reference image obtained by photographing a subject with a predetermined reference camera and a plurality of adjacent cameras adjacent to the reference camera in any of a plurality of cameras arranged by the image input means. Input a plurality of adjacent videos.
Then, the depth estimation program uses a corresponding pixel difference calculation unit to calculate, for each of a plurality of assumed depth values, a plurality of adjacent images that are pixels corresponding to the parallax of the pixel value of each pixel of the reference image and the assumed depth value of the pixel. Next, an adjacent video pixel difference value that is a difference absolute value from the pixel value of each pixel is calculated.

さらに、奥行推定プログラムは、差分値決定手段によって、複数の仮定奥行値および基準映像の画素位置ごとに、隣接映像画素差分値の最大差分値と最小差分値との差が、予め定めた閾値よりも小さい場合は、隣接映像画素差分値の平均値である平均差分値を選択し、閾値よりも大きい場合は、隣接映像画素差分値の最小差分値を選択して、選択差分値として決定し、仮定奥行値と基準映像の画素位置とに対応付けて記憶手段に書き込む。そして、奥行推定プログラムは、奥行値決定手段によって、画素位置ごとに、選択差分値が最小となる仮定奥行値を記憶手段において探索し、当該画素位置の奥行値と決定する。   Further, the depth estimation program causes the difference value determining means to determine that the difference between the maximum difference value and the minimum difference value of the adjacent video pixel difference values is greater than a predetermined threshold value for each of a plurality of assumed depth values and pixel positions of the reference image. Is also selected, the average difference value that is the average value of the adjacent video pixel difference values is selected, and if larger than the threshold value, the minimum difference value of the adjacent video pixel difference values is selected and determined as the selected difference value, Write to the storage means in association with the assumed depth value and the pixel position of the reference image. Then, the depth estimation program searches the storage unit for an assumed depth value at which the selection difference value is minimum for each pixel position by the depth value determination unit, and determines the depth value at the pixel position.

また、請求項10に記載の奥行推定プログラムは、予め定めた位置に複数配列したカメラで同一の被写体を撮影した複数のカメラ映像から、前記被写体の奥行きを示す奥行値を推定するために、コンピュータを、映像入力手段、対応画素差分演算手段、差分値決定手段、奥行値決定手段、として機能させる構成とした。
なお、請求項9に記載の奥行推定プログラムの差分値決定手段は、隣接映像画素差分値の最大差分値と最小差分値との差に基づいて選択差分値を決定したが、請求項10に記載の奥行推定プログラムの差分値決定手段は、隣接映像画素差分値の最大差分値と最小差分値との比に基づいて選択差分値を決定するものとした。
The depth estimation program according to claim 10 is a computer for estimating a depth value indicating the depth of a subject from a plurality of camera images obtained by photographing the same subject with a plurality of cameras arranged in a predetermined position. Are configured to function as video input means, corresponding pixel difference calculation means, difference value determination means, and depth value determination means.
The difference value determination means of the depth estimation program according to claim 9 determines the selection difference value based on the difference between the maximum difference value and the minimum difference value of the adjacent video pixel difference values. The difference value determination means of the depth estimation program determines the selection difference value based on the ratio between the maximum difference value and the minimum difference value of the adjacent video pixel difference values.

すなわち、かかる構成において、奥行推定プログラムは、差分値決定手段によって、複数の仮定奥行値および基準映像の画素位置ごとに、隣接映像画素差分値の最大差分値と最小差分値との比が、予め定めた閾値の範囲内の場合は、隣接映像画素差分値の平均値である平均差分値を選択し、範囲外の場合は、隣接映像画素差分値の最小差分値を選択して、選択差分値として決定する。   In other words, in such a configuration, the depth estimation program causes the difference value determination unit to determine in advance the ratio between the maximum difference value and the minimum difference value of the adjacent video pixel difference values for each of the plurality of assumed depth values and the pixel positions of the reference image. If it is within the defined threshold range, the average difference value that is the average value of the adjacent video pixel difference values is selected. If it is outside the range, the minimum difference value of the adjacent video pixel difference values is selected, and the selected difference value Determine as.

本発明は、以下に示す優れた効果を奏するものである。
請求項1,2,7〜10に記載の発明によれば、被写体の一部が手前の被写体の陰に隠れて対応点がないオクルージョンが発生した場合であっても、閾値に応じて、最小の差分値、すなわち、より正しい差分値が選択されるため、誤った奥行値を推定することを防止することができる。また、本発明によれば、一様な被写体で対応点を誤る偽マッチングが生じている場合であっても、閾値に応じて、差分値の平均値を選択するため、正しい差分値のように小さな値とはならず、正しい差分値として選択される度合いを低くすることができ、誤った奥行値を推定することを防止することができる。
The present invention has the following excellent effects.
According to the first, second, seventh and tenth aspects of the present invention, even when an occlusion where a part of the subject is hidden behind the subject in front and there is no corresponding point occurs, Difference value, that is, a more correct difference value is selected, so that it is possible to prevent an erroneous depth value from being estimated. In addition, according to the present invention, even if false matching that causes a corresponding point to be mistaken in a uniform subject occurs, the average value of the difference values is selected according to the threshold value, so that the correct difference value is It is not a small value, but the degree of selection as a correct difference value can be reduced, and an erroneous depth value can be prevented from being estimated.

請求項3に記載の発明によれば、奥行値が正しい場合の隣接映像画素差分値を直接選択することができるため、奥行値の推定精度を高めることができる。
請求項4に記載の発明によれば、画素の奥行値を隣接画素の奥行値によって平滑化することができるため、ノイズ等によって、奥行値が誤推定された場合であっても、隣接画素の奥行値によって平滑化されるため、滑らかな奥行値を得ることができる。
According to the third aspect of the present invention, it is possible to directly select the adjacent video pixel difference value when the depth value is correct, so that it is possible to increase the estimation accuracy of the depth value.
According to the invention of claim 4, since the depth value of the pixel can be smoothed by the depth value of the adjacent pixel, even if the depth value is erroneously estimated due to noise or the like, Since smoothing is performed by the depth value, a smooth depth value can be obtained.

請求項5に記載の発明によれば、仮定する奥行値の刻み幅を、映像の画素間隔よりも小さくすることができるため、カメラ間の間隔を狭くとった場合であっても、奥行値の分解能を高めることができる。これによって、カメラ間隔を狭くすることができ、カメラを含めたシステム構成の小型化を実現することができると共に、オクルージョンの発生を低減することができ、奥行値の誤推定を軽減することができる。   According to the fifth aspect of the present invention, since the assumed step size of the depth value can be made smaller than the pixel interval of the video, even if the interval between the cameras is narrowed, the depth value The resolution can be increased. As a result, the camera interval can be reduced, the system configuration including the camera can be downsized, the occurrence of occlusion can be reduced, and the erroneous estimation of the depth value can be reduced. .

請求項6に記載の発明によれば、輝度値のみ等の単一の差分のみではなく、複数の要素ごとの値の差分絶対値和を差分絶対値とすることで、画素の対応精度を高めることができ、偽マッチングによる誤った奥行値の推定を防止することができる。   According to the sixth aspect of the present invention, not only a single difference such as only a luminance value but also a difference absolute value sum of values for each of a plurality of elements is used as a difference absolute value, thereby improving the correspondence accuracy of pixels. It is possible to prevent the estimation of an erroneous depth value due to false matching.

本発明の実施形態に係る奥行推定システムの構成を示すブロック図である。It is a block diagram which shows the structure of the depth estimation system which concerns on embodiment of this invention. 本発明の実施形態に係る奥行推定装置の構成を示すブロック図である。It is a block diagram which shows the structure of the depth estimation apparatus which concerns on embodiment of this invention. 正マッチングにおける差分値決定手段の処理内容を説明するための説明図である。It is explanatory drawing for demonstrating the processing content of the difference value determination means in positive matching. 偽マッチングにおける差分値決定手段の処理内容を説明するための説明図である。It is explanatory drawing for demonstrating the processing content of the difference value determination means in false matching. オクルージョン発生時における差分値決定手段の処理内容を説明するための説明図である。It is explanatory drawing for demonstrating the processing content of the difference value determination means at the time of occlusion generation | occurrence | production. 記憶手段に記憶される記憶内容を説明するための説明図である。It is explanatory drawing for demonstrating the memory content memorize | stored in a memory | storage means. 本発明の実施形態に係る奥行推定装置の全体動作を示すフローチャートである。It is a flowchart which shows the whole operation | movement of the depth estimation apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る奥行推定装置の差分値決定動作を示すフローチャートである。It is a flowchart which shows the difference value determination operation | movement of the depth estimation apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る奥行推定装置の差分値平滑化動作を示すフローチャートである。It is a flowchart which shows the difference value smoothing operation | movement of the depth estimation apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る奥行推定装置の奥行値決定動作を示すフローチャートである。It is a flowchart which shows the depth value determination operation | movement of the depth estimation apparatus which concerns on embodiment of this invention. 本発明の実施形態の変形例に係る奥行推定装置の構成を示すブロック図である。It is a block diagram which shows the structure of the depth estimation apparatus which concerns on the modification of embodiment of this invention. 仮定奥行値がサブ画素単位である場合のサブ画素の画素値を補間により生成する手法を説明するための説明図である。It is explanatory drawing for demonstrating the method of producing | generating the pixel value of a subpixel by interpolation in case an assumption depth value is a subpixel unit. 従来の奥行推定手法を説明するための説明図である。It is explanatory drawing for demonstrating the conventional depth estimation method.

以下、本発明の実施形態について図面を参照して説明する。
〔奥行推定システムの全体構成〕
最初に、図1を参照して、本発明の実施形態に係る奥行推定装置を含んだ奥行推定システムの全体構成について説明する。奥行推定システムSは、複数配列したカメラで被写体を撮影した多視点映像から、被写体の奥行値を推定した奥行映像を生成するものである。図1に示した奥行推定システムSは、カメラC(C,C,C)と、奥行推定装置1とを備えている。
Embodiments of the present invention will be described below with reference to the drawings.
[Overall configuration of depth estimation system]
Initially, with reference to FIG. 1, the whole structure of the depth estimation system containing the depth estimation apparatus which concerns on embodiment of this invention is demonstrated. The depth estimation system S generates a depth video in which the depth value of a subject is estimated from a multi-view video obtained by photographing the subject with a plurality of cameras arranged. The depth estimation system S shown in FIG. 1 includes a camera C (C L , C C , C R ) and a depth estimation device 1.

カメラCは、被写体Tを撮影する一般的な撮影装置である。ここでは、水平方向の視差に応じて奥行値を生成することとし、視差の基準となるカメラ(基準カメラ)Cに対し、水平方向に予め定めた距離Lだけ等間隔に離間して、カメラ(隣接カメラ)C,Cを平行に配置している。なお、この距離Lは、奥行値と視差量とが対応可能な範囲であれば、その距離は任意である。 The camera C is a general photographing device that photographs the subject T. Here, it is possible to generate depth values in accordance with the horizontal parallax with respect to serving as a reference camera (reference camera) C C parallax, and equally spaced by a distance L determined in advance in the horizontal direction, the camera (adjacent cameras) C L, are arranged parallel to the C R. The distance L is arbitrary as long as the depth value and the amount of parallax can be accommodated.

カメラCは、視差の基準となる映像(基準映像F)を撮影するものである。また、カメラC,Cは、それぞれカメラCの左右に配置されたカメラであって、基準映像Fとの視差を求めるための映像(隣接映像F,F)を撮影するものである。このカメラC(C,C,C)で撮影された映像(F,F,F)は、奥行推定装置1に入力される。 The camera C C is for shooting the image (reference image F C) as a reference of parallax. The cameras C L and C R are cameras arranged on the left and right sides of the camera C C , respectively, and shoot images (adjacent images F L and F R ) for obtaining parallax with the reference image F C. It is. Videos (F L , F C , F R ) photographed by the camera C (C L , C C , C R ) are input to the depth estimation device 1.

なお、垂直方向の視差に応じて奥行値を生成する場合であれば、カメラCの配置は、垂直方向に離間させて配置すればよい。
また、カメラCが撮影する映像(F,F,F)は、静止画であっても動画であっても構わない。動画である場合、カメラCはそれぞれフレーム同期を行うことで、順次、静止画のフレーム画像として奥行推定装置1に入力されることとする。あるいは、フレーム画像ごとにタイムコードを付加し、奥行推定装置1で同期をとることとしてもよい。
Note that if the depth value is generated according to the parallax in the vertical direction, the cameras C may be arranged apart from each other in the vertical direction.
In addition, the video (F L , F C , F R ) captured by the camera C may be a still image or a moving image. In the case of a moving image, the camera C performs frame synchronization, and sequentially inputs the frame image of the still image to the depth estimation device 1. Alternatively, a time code may be added for each frame image, and the depth estimation apparatus 1 may be synchronized.

奥行推定装置1は、予め定めた位置に複数配列したカメラで同一の被写体を撮影した複数のカメラ映像から、被写体Tの奥行きを示す奥行値を推定するものである。ここでは、奥行推定装置1は、水平方向に配列したカメラC(C,C,C)で被写体Tを撮影したカメラ映像(F,F,F)から、被写体Tの奥行きを示す奥行値を推定する。なお、ここでは、奥行推定装置1は、奥行値を、映像の各画素値に対応付けることで奥行映像Fを生成することとする。 The depth estimation apparatus 1 estimates a depth value indicating the depth of the subject T from a plurality of camera images obtained by photographing the same subject with a plurality of cameras arranged at predetermined positions. Here, the depth estimation apparatus 1 uses the camera video (F L , F C , F R ) taken by the camera C (C L , C C , C R ) arranged in the horizontal direction to determine the depth of the subject T. The depth value indicating is estimated. Here, the depth estimation apparatus 1, the depth value, and generating a depth image F Z by associating to each pixel value of the image.

〔奥行推定装置の構成〕
次に、図2を参照(適宜図1参照)して、本発明の実施形態に係る奥行推定装置の構成について説明する。図2に示すように、奥行推定装置1は、映像入力手段10と、対応画素差分演算手段20と、差分値決定手段30と、記憶手段40と、平滑化手段50と、奥行値決定手段60と、を備えている。
[Configuration of depth estimation device]
Next, referring to FIG. 2 (refer to FIG. 1 as appropriate), the configuration of the depth estimation apparatus according to the embodiment of the present invention will be described. As shown in FIG. 2, the depth estimation apparatus 1 includes a video input unit 10, a corresponding pixel difference calculation unit 20, a difference value determination unit 30, a storage unit 40, a smoothing unit 50, and a depth value determination unit 60. And.

映像入力手段10は、カメラCで撮影された複数のカメラ映像を入力するものである。ここでは、映像入力手段10は、予め定めた基準カメラCで撮影した基準映像Fと、基準カメラCに隣接する複数の隣接カメラC,Cで撮影した隣接映像F,Fと、を入力する。
この映像入力手段10で入力した各映像(F,F,F)は、図示を省略したメモリに記憶され、後記する対応画素差分演算手段20によって参照されるものとする。
The video input means 10 inputs a plurality of camera videos taken by the camera C. Here, the image input unit 10, predetermined the reference image F C taken by the base camera C C were, the base camera C adjacent to the C plurality of adjacent cameras C L, C R taken with neighboring image F L, F And R.
Each video (F L , F C , F R ) input by the video input unit 10 is stored in a memory (not shown) and is referred to by a corresponding pixel difference calculation unit 20 described later.

対応画素差分演算手段20は、複数の仮定奥行値ごとに、基準映像Fの各画素の画素値と、当該画素の仮定奥行値の視差に対応する隣接映像F,Fの各画素の画素値との差分絶対値である隣接映像画素差分値eCL,eCRを演算するものである。ここで、隣接映像画素差分値eCLは、基準映像Fと隣接映像Fとの間で演算された差分絶対値であり、隣接映像画素差分値eCRは、基準映像Fと隣接映像Fとの間で演算された差分絶対値である。 For each of a plurality of assumed depth values, the corresponding pixel difference calculation means 20 calculates the pixel value of each pixel of the reference image F C and the adjacent images F L and F R corresponding to the parallax of the assumed depth value of the pixel. The adjacent image pixel difference values e CL and e CR which are absolute differences from the pixel values are calculated. Here, the neighboring image pixel difference value e CL is a calculated difference absolute value between the reference image F C and the neighboring image F L, the neighboring image pixel difference value e CR is the reference image F C and the neighboring image is a calculated difference absolute value between F R.

なお、画素値の差分絶対値は、カメラ映像(F,F,F)が、輝度(輝度値)と色差信号(色差値)との各要素で構成される場合、当該画素の輝度値の差分絶対値と、色差値の差分絶対値とを加算した値とする。このとき、色差値の差分絶対値に任意の係数を掛けて、色成分の重みを調整することとしてもよい。
また、画素値の差分絶対値は、カメラ映像(F,F,F)が、RGBのカラー信号で構成される場合、カラー信号の要素であるR値の差分絶対値と、G値の差分絶対値と、B値の差分絶対値とを加算した値とする。
Note that the absolute difference value of the pixel value is the luminance of the pixel when the camera image (F L , F C , F R ) is composed of each element of luminance (luminance value) and color difference signal (color difference value). A value obtained by adding the difference absolute value of the value and the difference absolute value of the color difference value. At this time, the color component weight may be adjusted by multiplying the absolute difference value of the color difference value by an arbitrary coefficient.
In addition, when the camera image (F L , F C , F R ) is composed of RGB color signals, the absolute difference value of the pixel value is the difference absolute value of the R value that is an element of the color signal, and the G value. And the difference absolute value of the B value are added to each other.

また、仮定奥行値は、被写体Tの奥行値を仮に設定する値であって、“0”から予め定めた最大視差量に対応する奥行値までの値をとる。例えば、奥行値を8ビットのデータで表す場合、仮想奥行値は、“0”〜“255”の範囲の値をとる。また、ここでは、対応画素差分演算手段20は、“0”から最大視差量に対応する奥行値(例えば、“255”)まで、順次、仮定奥行値を設定し、当該仮定奥行値の視差に対応する画素間の画素値の差分を隣接映像画素差分値として演算する。また、ここでは、奥行値の単位と画素間の視差の単位とを同一とし、奥行値が“1”増加することで、1画素ずつ視差が増加することとする。   The assumed depth value is a value that temporarily sets the depth value of the subject T, and takes a value from “0” to a depth value corresponding to a predetermined maximum parallax amount. For example, when the depth value is represented by 8-bit data, the virtual depth value takes a value in the range of “0” to “255”. Here, the corresponding pixel difference calculation means 20 sequentially sets the assumed depth value from “0” to the depth value corresponding to the maximum amount of parallax (for example, “255”), and sets the assumed depth value to the parallax. A difference in pixel value between corresponding pixels is calculated as an adjacent video pixel difference value. Here, the unit of the depth value is the same as the unit of the parallax between the pixels, and when the depth value increases by “1”, the parallax increases by one pixel.

ここでは、対応画素差分演算手段20は、基準映像Fの(x,y)座標の画素値をF(x,y)、基準映像Fの(x,y)座標の仮定奥行値dに対応する隣接映像Fの(x+d,y)座標の画素値をF(x+d,y)、隣接映像Fの(x−d,y)座標の画素値をF(x−d,y)としたとき、以下の(1)式の演算により、隣接映像画素差分値eCL(d,x,y),eCR(d,x,y)を算出する。なお、「||」は、絶対値を示す。
CL(d,x,y)=|F(x+d,y)−F(x,y)|
CR(d,x,y)=|F(x−d,y)−F(x,y)| …(1)式
Here, the corresponding pixel difference calculating means 20, the reference image F C of (x, y) the pixel value of the coordinate F C (x, y), the reference image F C (x, y) coordinates of the hypothetical depth value d corresponding to (x + d, y) of the neighboring image F L pixel values of the coordinates F L (x + d, y), of the neighboring image F R (x-d, y ) the pixel value of the coordinate F R (x-d, When y), the adjacent video pixel difference values e CL (d, x, y) and e CR (d, x, y) are calculated by the calculation of the following equation (1). “||” indicates an absolute value.
e CL (d, x, y) = | F L (x + d, y) −F C (x, y) |
e CR (d, x, y) = | F R (x−d, y) −F C (x, y) | (1)

この対応画素差分演算手段20は、演算により求めた仮定奥行値d(“0”〜最大視差量)ごとの隣接映像画素差分値eCL,eCRを、差分値決定手段30に出力する。なお、対応画素差分演算手段20は、差分値決定手段30から、差分値を記憶手段40に書き込んだ旨(書き込み完了)を通知されることで、演算対象とする画素の画素位置および仮定奥行値を順次更新し、隣接映像画素差分値eCL,eCRを演算する。 The corresponding pixel difference calculating unit 20 outputs the adjacent video pixel difference values e CL and e CR for each assumed depth value d (“0” to the maximum parallax amount) obtained by the calculation to the difference value determining unit 30. The corresponding pixel difference calculation means 20 is notified by the difference value determination means 30 that the difference value has been written in the storage means 40 (writing completion), whereby the pixel position and the assumed depth value of the pixel to be calculated are notified. Are sequentially updated, and adjacent video pixel difference values e CL and e CR are calculated.

差分値決定手段30は、複数の仮定奥行値および基準映像Fの画素位置ごとに、対応画素差分演算手段20で演算された隣接映像画素差分値eCL,eCRに基づいて、当該仮定奥行値における当該画素位置の隣接映像画素差分値を決定するものである。 Difference value determining means 30, for each pixel position of a plurality of hypothetical depth values and the reference image F C, the calculated neighboring image pixel difference value e CL at the corresponding pixel difference calculating unit 20, based on the e CR, the assumption depth The adjacent video pixel difference value of the pixel position in the value is determined.

ここでは、差分値決定手段30は、平均差分値演算手段30aと、最小差分値選択手段30bと、差分値選択手段30cと、を備えている。   Here, the difference value determination means 30 includes an average difference value calculation means 30a, a minimum difference value selection means 30b, and a difference value selection means 30c.

平均差分値演算手段30aは、複数の仮定奥行値および基準映像Fの画素位置ごとに、対応画素差分演算手段20で演算された隣接映像画素差分値eCL,eCRの平均値(平均差分値ea)を演算するものである。
すなわち、平均差分値演算手段30aは、基準映像Fの(x,y)座標の仮定奥行値dに対応する平均差分値ea(d,x,y)を、以下の(2)式の演算により算出する。
ea(d,x,y)={eCL(d,x,y)+eCR(d,x,y)}/2
…(2)式
Average differential value calculating means 30a, for each pixel position of a plurality of hypothetical depth values and the reference image F C, calculated by the corresponding pixel difference calculating unit 20 the neighboring image pixel difference value e CL, the average value of e CR (average difference The value ea) is calculated.
That is, the average difference value calculating unit 30a, the reference image F C of (x, y) average difference value ea corresponds to a hypothetical depth value d of coordinates (d, x, y) the following (2) calculation of the equation Calculated by
ea (d, x, y) = {e CL (d, x, y) + e CR (d, x, y)} / 2
... (2) formula

この平均差分値演算手段30aは、演算により求めた仮定奥行値d(“0”〜最大視差量)ごとの平均差分値eaを、差分値選択手段30cに出力する。   The average difference value calculating unit 30a outputs an average difference value ea for each assumed depth value d ("0" to the maximum parallax amount) obtained by the calculation to the difference value selecting unit 30c.

最小差分値選択手段30bは、複数の仮定奥行値および基準映像Fの画素位置ごとに、対応画素差分演算手段20で演算された隣接映像画素差分値eCL,eCRのうちで、値が小さい方(最小差分値em)を選択するものである。
すなわち、最小差分値選択手段30bは、基準映像Fの(x,y)座標の仮定奥行値dに対応する隣接映像画素差分値eCL(d,x,y)と、隣接映像画素差分値eCR(d,x,y)とを比較し、以下の(3)式に示すように、値が小さい方を最小差分値emとして選択する。
em(d,x,y)=min{eCL(d,x,y),eCR(d,x,y)}
…(3)式
Minimum difference value selecting unit 30b, for each pixel position of a plurality of hypothetical depth values and the reference image F C, corresponding pixel difference calculating unit 20 with the calculated neighboring image pixel difference value e CL, among e CR, the value The smaller one (minimum difference value em) is selected.
That is, the minimum difference value selection unit 30b, the reference image F C of (x, y) the neighboring image pixel difference values corresponding to the assumption depth value d of the coordinate e CL (d, x, y ) and, neighboring image pixel difference value e CR (d, x, y) is compared, and the smaller value is selected as the minimum difference value em as shown in the following equation (3).
em (d, x, y) = min {e CL (d, x, y), e CR (d, x, y)}
... (3) formula

この最小差分値選択手段30bは、選択した仮定奥行値d(“0”〜最大視差量)ごとの最小差分値emを、差分値選択手段30cに出力する。   The minimum difference value selection unit 30b outputs the minimum difference value em for each selected assumed depth value d (“0” to the maximum amount of parallax) to the difference value selection unit 30c.

差分値選択手段30cは、複数の仮定奥行値および基準映像Fの画素位置ごとに、対応画素差分演算手段20で演算された隣接映像画素差分値eCL,eCRの差の大きさに基づいて、平均差分値演算手段30aで演算された平均差分値eaと、最小差分値選択手段30bで選択された最小差分値emとのいずれかを、当該仮定奥行値における当該画素位置の差分値(隣接映像画素差分値)の候補として選択するものである。 Difference value selection unit 30c, for each pixel position of a plurality of hypothetical depth values and the reference image F C, the calculated neighboring image pixel difference value e CL at the corresponding pixel difference calculating unit 20, based on the magnitude of the difference e CR Thus, either the average difference value ea calculated by the average difference value calculation unit 30a or the minimum difference value em selected by the minimum difference value selection unit 30b is used as a difference value ( This is selected as a candidate for (adjacent video pixel difference value).

すなわち、差分値選択手段30cは、以下の(4)式に示すように、対応画素差分演算手段20で演算された隣接映像画素差分値eCL,eCRの差と、予め定めた閾値thとを比較し、差の絶対値が閾値thよりも小さい場合、平均差分値演算手段30aで演算された平均差分値eaを選択し、それ以外の場合、最小差分値選択手段30bで選択された最小差分値emを選択する。
|eCL(d,x,y)−eCR(d,x,y)|<th …(4)式
That is, the difference value selection means 30c, as shown in the following equation (4), the difference between the adjacent video pixel difference values e CL and e CR calculated by the corresponding pixel difference calculation means 20, and a predetermined threshold th If the absolute value of the difference is smaller than the threshold th, the average difference value ea calculated by the average difference value calculation means 30a is selected. Otherwise, the minimum value selected by the minimum difference value selection means 30b is selected. The difference value em is selected.
| E CL (d, x, y) −e CR (d, x, y) | <th (4)

この閾値thは、任意に定めることができるが、画素値の変化範囲の1/6程度の値とすることが好ましい。この閾値thが大きすぎると、基準映像Fの画素と、隣接映像Fまたは隣接映像Fの画素間で偽マッチングが生じていない場合でも、偽マッチングが生じていると判定し、閾値thが小さすぎると、基準映像Fの画素と、隣接映像Fまたは隣接映像Fの画素間でオクルージョンが生じていない場合でも、オクルージョンが生じていると判定してしまうことになり、以降の処理において誤った奥行値が決定されるからである。したがって、例えば、画素値の変化範囲が“0”〜“255”である場合、閾値thを“30”〜“60”程度とすることが好ましい。 The threshold th can be arbitrarily determined, but is preferably set to a value of about 1/6 of the change range of the pixel value. When this threshold value th is too large, it determines the pixel of the reference image F C, even if the false match between pixels of neighboring image F L or neighboring image F R is not generated, the false matching is occurring, the threshold th is too small, the pixel of the reference image F C, even when occlusion does not occur between pixels of neighboring image F L or neighboring image F R, will be thus determined that the occlusion has occurred, since This is because an incorrect depth value is determined in the process. Therefore, for example, when the change range of the pixel value is “0” to “255”, the threshold th is preferably set to about “30” to “60”.

なお、差分値選択手段30cは、対応画素差分演算手段20で演算された隣接映像画素差分値eCL,eCRのいずれかが予め定めた閾値(第2閾値)よりも小さい場合は、その差分値を当該仮定奥行値における当該画素位置の差分値(隣接映像画素差分値)の候補として選択することとしてもよい。この第2閾値は、閾値thよりも小さい値であって、例えば、“1”〜“3”である。隣接映像画素差分値eCL,eCRのいずれかが、第2閾値以下の差しかなければ、その差分値そのものが正しい奥行値における差分値を示している可能性が高いからである。
以下、差分値選択手段30cで選択された差分値を、特に、選択差分値と呼ぶこととする。
The difference value selection unit 30c determines that the difference between the adjacent image pixel difference values e CL and e CR calculated by the corresponding pixel difference calculation unit 20 is smaller than a predetermined threshold (second threshold). The value may be selected as a candidate for a difference value (adjacent video pixel difference value) of the pixel position in the assumed depth value. The second threshold value is smaller than the threshold th, and is, for example, “1” to “3”. This is because if one of the adjacent video pixel difference values e CL and e CR does not fall below the second threshold value, it is highly likely that the difference value itself indicates a difference value at the correct depth value.
Hereinafter, the difference value selected by the difference value selection unit 30c is particularly referred to as a selection difference value.

この差分値選択手段30cは、選択差分値(隣接映像画素差分値)を、仮定奥行値と基準映像の画素位置とに対応付けて記憶手段40に書き込む。なお、差分値決定手段30は、選択差分値を記憶手段40に書き込むごとに、書き込み完了を対応画素差分演算手段20に通知する。また、差分値決定手段30は、基準映像のすべての画素位置において、仮定奥行値ごとの選択差分値を記憶手段40書き込んだ後に、書き込み完了を平滑化手段50に通知する。   The difference value selection unit 30c writes the selection difference value (adjacent video pixel difference value) in the storage unit 40 in association with the assumed depth value and the pixel position of the reference video. The difference value determination unit 30 notifies the corresponding pixel difference calculation unit 20 of the completion of writing every time the selected difference value is written in the storage unit 40. Further, the difference value determining means 30 notifies the smoothing means 50 of the completion of writing after the storage means 40 has written the selected difference value for each assumed depth value at all pixel positions of the reference video.

ここで、図3〜図5を参照して、差分値決定手段30の処理内容およびその作用について、模式的に説明する。
まず、図3を参照(適宜図2参照)して、ある仮定奥行値において、基準映像Fの画素(注目画素P)と、隣接映像F,Fの画素(対応画素P,P)とが正しくマッチングしている場合(正マッチング)の処理について説明する。
Here, with reference to FIG. 3 to FIG. 5, the processing content and the operation of the difference value determination unit 30 will be schematically described.
First, referring to FIG. 3 (appropriately with reference to Figure 2), in certain assumptions depth value, and the pixels of the reference image F C (target pixel P C), the neighboring image F L, F R of the pixel (corresponding pixel P L, A process in a case where P R ) is correctly matched (positive matching) will be described.

図3に示すように、画素同士が正しくマッチングしている場合、対応画素差分演算手段20で演算された隣接映像画素差分値(差分絶対値)eCL,eCRは、いずれも数レベル未満の十分小さな値となる。このとき、隣接映像画素差分値(差分絶対値)eCL,eCRの差が、閾値thよりも小さければ、差分値選択手段30cは、平均差分値演算手段30aで演算された平均差分値eaを当該仮想奥行値および当該画素位置における差分値(選択差分値)eとして選択する。 As shown in FIG. 3, when the pixels are correctly matched, the adjacent video pixel difference values (difference absolute values) e CL and e CR calculated by the corresponding pixel difference calculation means 20 are both less than several levels. A sufficiently small value. At this time, if the difference between the adjacent video pixel difference values (difference absolute values) e CL and e CR is smaller than the threshold th, the difference value selection unit 30c calculates the average difference value ea calculated by the average difference value calculation unit 30a. Are selected as the virtual depth value and the difference value (selection difference value) e at the pixel position.

この場合、差分値(選択差分値)eは、差分絶対値eCL,eCRの平均であるため、カメラのばらつきが吸収され、より正しい値といえる。また、差分絶対値eCL,eCRの値は、正しいマッチングであるため、共に数レベル未満の十分小さな値となり、その平均値である差分値(選択差分値)eも数レベル未満の小さな値となる。
このように、差分値決定手段30は、ある仮定奥行値において、マッチングが正しければ、平均差分値eaを選択することで、差分値は小さな値のまま、さらに、カメラのばらつきを吸収し、より精度の高い差分値を決定することができる。
In this case, since the difference value (selection difference value) e is the average of the difference absolute values e CL and e CR , it can be said that the variation of the camera is absorbed and the value is more correct. Further, since the difference absolute values e CL and e CR are correct matching, both are sufficiently small values less than several levels, and the difference value (selection difference value) e that is the average value is also a small value less than several levels. It becomes.
As described above, if the matching is correct in a certain assumed depth value, the difference value determining means 30 selects the average difference value ea so that the difference value remains small and further absorbs camera variations. A highly accurate difference value can be determined.

次に、図4を参照(適宜図2参照)して、ある仮定奥行値において、基準映像Fの画素(注目画素P)と、隣接映像Fまたは隣接映像Fの画素(対応画素P,P)とで偽マッチングが発生している場合の処理について説明する。 Next, referring to FIG. 4 (appropriately with reference to Figure 2), in certain assumptions depth value, and the pixels of the reference image F C (target pixel P C), the pixel of the neighboring image F L or neighboring image F R (corresponding pixel Processing in the case where false matching occurs between P L and P R ) will be described.

図4に示すように、注目画素Pを持つ被写体が一様な(画素値の変化が少ない)場合、仮定奥行値が正しくなくても、どちらかの隣接映像、例えば、隣接映像Fの対応画素Pとの間で隣接映像画素差分値(差分絶対値)eCRが小さくなるため、偽マッチングが生じる場合がある。 As shown in FIG. 4, when a uniform object having a target pixel P C is (little change in pixel value), even assuming the depth value is not correct, either neighboring image, for example, of the neighboring image F R since the neighboring image pixel difference values between the corresponding pixels P R (absolute differences) e CR becomes small, there are cases where false matching may occur.

このとき、完全なマッチングではないため、差分絶対値eCRは、数レベル程度の小さな値とはならず(図中、“中”)、差分絶対値eCRと差分絶対値eCLとの差が、閾値thよりも小さくなることが多い。そこで、差分値選択手段30cは、平均差分値演算手段30aで演算された平均差分値eaを当該仮想奥行値および当該画素位置における差分値(選択差分値)eとして選択する。 At this time, not a perfect match, a difference absolute value e CR is not the small value of about several levels difference (in the figure, "medium"), a difference absolute value e CR and the difference absolute value e CL Is often smaller than the threshold th. Therefore, the difference value selection unit 30c selects the average difference value ea calculated by the average difference value calculation unit 30a as the difference value (selection difference value) e at the virtual depth value and the pixel position.

この場合、差分値(選択差分値)eは、差分絶対値eCL,eCRの平均であるため、差分絶対値eCRより大きい値になる。
このように、差分値決定手段30は、ある仮定奥行値において、偽マッチングが生じている場合、平均差分値eaを選択することで、偽マッチングが生じている差分値よりも大きな値に差分値を変換し、当該差分値が誤りである度合いを高めることができる。
In this case, the difference value (selected difference value) e is an average of the difference absolute values e CL and e CR , and thus becomes a value larger than the difference absolute value e CR .
As described above, the difference value determination unit 30 selects the average difference value ea when a false matching occurs in a certain assumed depth value, so that the difference value is set to a value larger than the difference value in which the false matching occurs. And the degree of error of the difference value can be increased.

次に、図5を参照(適宜図2参照)して、ある仮定奥行値において、基準映像Fの画素(注目画素P)と、隣接映像Fまたは隣接映像Fの画素(対応画素P,P)とでオクルージョンが発生している場合の処理について説明する。 Next, referring to FIG. 5 (appropriately with reference to Figure 2), in certain assumptions depth value, and the pixels of the reference image F C (target pixel P C), the pixel of the neighboring image F L or neighboring image F R (corresponding pixel Processing when occlusion occurs in P L , P R ) will be described.

図5に示すように、注目画素Pに対応する被写体の位置が、一方のカメラが撮影した隣接映像(ここでは、隣接映像F)の中で、前景の被写体の陰に隠れた場合、他方のカメラが撮影した隣接映像(ここでは、隣接映像F)では隠れていないことが多く、仮定奥行値が正しい場合には、差分絶対値eCLは十分小さな値となり、差分絶対値eCRは大きな値となる。 As shown in FIG. 5, when the position of the object corresponding to the pixel of interest P C is (here, the neighboring image F R) adjacent images one camera is taken in, hidden behind the foreground object, The adjacent video (here, the adjacent video FL ) captured by the other camera is often not hidden, and when the assumed depth value is correct, the difference absolute value eCL is sufficiently small, and the difference absolute value eCR Is a large value.

このとき、差分絶対値eCRと差分絶対値eCLとの差は、閾値thよりも大きくなる。そこで、差分値選択手段30cは、最小差分値選択手段30bで選択された最小差分値emを当該仮想奥行値および当該画素位置における差分値(選択差分値)eとして選択する。この場合、差分絶対値eCRと差分絶対値eCLとの平均ではなく、小さい方を選択するため、正しい差分値eが、選択されることになる。 In this case, the difference between the difference absolute value e CR and the difference absolute value e CL is larger than the threshold value th. Therefore, the difference value selection unit 30c selects the minimum difference value em selected by the minimum difference value selection unit 30b as the difference value (selection difference value) e at the virtual depth value and the pixel position. In this case, since the smaller one is selected instead of the average of the difference absolute value eCR and the difference absolute value eCL , the correct difference value e is selected.

以上説明したように、差分値決定手段30は、仮定した奥行値(仮定奥行値)が正しい場合、その奥行値に対応する差分値(選択差分値)eは、より小さな値となり、後記する奥行値決定手段60において、正しい奥行値が選択される度合いを高くすることができる。   As described above, when the assumed depth value (assumed depth value) is correct, the difference value determining means 30 has a smaller difference value (selected difference value) e corresponding to the depth value, and the depth described later. In the value determining means 60, the degree to which the correct depth value is selected can be increased.

また、隣接映像F,Fのいずれかで偽マッチングが生じている場合、選択した差分値(選択差分値)eである差分絶対値eCL,eCRの平均値が大きくなる。よって、この場合、差分値決定手段30は、後記する奥行値決定手段60において、仮定奥行値が選択される度合いを低くすることができる。 Moreover, neighboring image F L, if the false match in either F R occurs, the difference absolute value e CL selected difference value is (selected difference value) e, the average value of e CR increases. Therefore, in this case, the difference value determining unit 30 can reduce the degree to which the assumed depth value is selected in the depth value determining unit 60 described later.

さらに、隣接映像F,Fのいずれかでオクルージョンが発生している場合、仮想奥行値が正しければ、選択した差分値(選択差分値)eである最小差分値emが十分小さくなる。よって、この場合、差分値決定手段30は、後記する奥行値決定手段60において、仮定奥行値が選択される度合いを高くすることができる。
このように、差分値決定手段30が決定(選択)する差分値(選択差分値)は、仮定奥行値が正しいことを示す指標として用いることができる。
図2に戻って、奥行推定装置1の構成について説明を続ける。
Moreover, neighboring image F L, if the occlusion with either F R is occurring, if correct virtual depth value, the minimum difference value em is sufficiently small selected difference value is (selected difference value) e. Therefore, in this case, the difference value determination unit 30 can increase the degree to which the assumed depth value is selected in the depth value determination unit 60 described later.
As described above, the difference value (selected difference value) determined (selected) by the difference value determining means 30 can be used as an index indicating that the assumed depth value is correct.
Returning to FIG. 2, the description of the configuration of the depth estimation device 1 will be continued.

記憶手段40は、差分値決定手段30で決定(選択)された差分値(選択差分値)を、仮定奥行値と基準映像の画素位置とに対応付けて記憶するものである。例えば、記憶手段40は、メモリ等の一般的な記憶媒体である。   The storage unit 40 stores the difference value (selected difference value) determined (selected) by the difference value determination unit 30 in association with the assumed depth value and the pixel position of the reference image. For example, the storage unit 40 is a general storage medium such as a memory.

ここで、図6を参照して、記憶手段40に記憶される選択差分値の内容について説明する。図6に示すように、記憶手段40は、基準映像の画素位置である(x,y)座標ごとに、選択差分値を記憶する。このx座標値は、“0”から基準映像の映像幅(水平画素数)Xまでの値をとり、y座標値は、“0”から基準映像の映像高(垂直画素数)Yまでの値をとる。
また、記憶手段40は、基準映像の画素位置である(x,y)座標ごとの選択差分値を、さらに、仮定奥行値dごとに記憶する。この仮定奥行値dは、“0”から最大視差量に対応する値(最大視差量D)までの値をとる。
図2に戻って、奥行推定装置1の構成について説明を続ける。
Here, the contents of the selection difference value stored in the storage means 40 will be described with reference to FIG. As illustrated in FIG. 6, the storage unit 40 stores a selection difference value for each (x, y) coordinate that is a pixel position of the reference image. This x coordinate value takes a value from “0” to the video width (number of horizontal pixels) X of the reference video, and the y coordinate value is a value from “0” to the video height (number of vertical pixels) Y of the reference video. Take.
In addition, the storage unit 40 further stores a selection difference value for each (x, y) coordinate that is a pixel position of the reference image for each assumed depth value d. This assumed depth value d takes a value from “0” to a value corresponding to the maximum parallax amount (maximum parallax amount D).
Returning to FIG. 2, the description of the configuration of the depth estimation device 1 will be continued.

平滑化手段50は、基準映像の画素位置ごとに、当該画素位置における選択差分値を平滑化するものである。この平滑化手段50は、まず、基準映像の画素位置ごとに、選択差分値が最小となる仮定奥行値を奥行値候補とする。次に、平滑化手段50は、基準映像の画素位置ごとに、当該画素位置の奥行値候補での選択差分値に、隣接画素位置における奥行値候補と自身の奥行値候補との差分を重み付け加算することで、当該画素位置における選択差分値を平滑化する。なお、平滑化手段50は、差分値決定手段30から、基準映像のすべての画素位置において、仮定奥行値ごとの選択差分値を書き込んだ旨(書き込み完了)を通知されることで動作を開始する。   The smoothing means 50 smoothes the selection difference value at the pixel position for each pixel position of the reference image. The smoothing means 50 first sets an assumed depth value at which the selection difference value is minimum for each pixel position of the reference image as a depth value candidate. Next, for each pixel position of the reference image, the smoothing unit 50 weights and adds the difference between the depth value candidate at the adjacent pixel position and its own depth value candidate to the selection difference value at the depth value candidate at the pixel position. Thus, the selection difference value at the pixel position is smoothed. The smoothing unit 50 starts the operation when notified by the difference value determining unit 30 that the selected difference value for each assumed depth value has been written at all pixel positions of the reference image (writing completion). .

ここでは、平滑化手段50は、基準映像の画素位置に対応付けて記憶されているすべての奥行値候補とその選択差分値について、重み付け加算を行う。
すなわち、平滑化手段50は、記憶手段40に記憶されている基準映像Fの(x,y)座標の奥行値候補dに対応する選択差分値e(d,x,y)に、以下の(5)式により、隣接画素間の奥行値候補の差を重み付け加算することで、平滑化された選択差分値ev(d,x,y)を演算する。
ev(d,x,y)=e(d,x,y)
+w{|d(x+1,y)−d(x,y)|+|d(x,y+1)−d(x,y)|}
…(5)式
Here, the smoothing means 50 performs weighted addition on all depth value candidates stored in association with the pixel positions of the reference video and their selection difference values.
That is, the smoothing means 50, the reference image F C in the storage means 40 is stored (x, y) selected difference value e corresponding to the coordinates of the depth value candidates d (d, x, y), the following The smoothed selection difference value ev (d, x, y) is calculated by weighting and adding the depth value difference between adjacent pixels according to equation (5).
ev (d, x, y) = e (d, x, y)
+ W {| d (x + 1, y) -d (x, y) | + | d (x, y + 1) -d (x, y) |}
... (5)

なお、d(x,y)は、対象となる基準映像Fの(x,y)座標の選択差分値が最小となる奥行値候補、d(x+1,y)は、(x+1,y)座標の選択差分値が最小となる奥行値候補、d(x,y+1)は、(x,y+1)座標の選択差分値が最小となる奥行値候補をそれぞれ示している。また、wは重み係数であって、この係数wは、任意の値とすることができる。なお、この係数wは、図示を省略した入力手段を介して、外部から調整可能としてもよい。 Incidentally, d (x, y) is the reference image F C of interest (x, y) selecting the difference value of the coordinate is the minimum depth value candidate, d (x + 1, y ) is, (x + 1, y) coordinates Depth value candidates with a minimum selection difference value, d (x, y + 1) indicate depth value candidates with a minimum selection difference value of (x, y + 1) coordinates. Further, w is a weighting coefficient, and this coefficient w can be an arbitrary value. The coefficient w may be adjustable from the outside via an input unit (not shown).

このように、選択差分値に、隣接する画素間の奥行値候補の差分を重み付け加算することで、隣接する各画素の奥行値が平滑化されることになる。これによって、隣接画素間において、選択差分値が最小となる奥行値がノイズ等で互いに異なる場合であっても、滑らかな奥行値を得ることができる。   Thus, the depth value of each adjacent pixel is smoothed by weighting and adding the difference between the depth value candidates between adjacent pixels to the selected difference value. As a result, a smooth depth value can be obtained even when the depth values at which the selection difference value is minimum between adjacent pixels are different from each other due to noise or the like.

この平滑化手段50は、演算により求めた平滑化した選択差分値が最小となる奥行値を奥行値候補として、記憶手段40に書き込む。その後、平滑化手段50は、奥行値決定手段60に平滑化完了を通知する。   The smoothing unit 50 writes the depth value that minimizes the smoothed selection difference value obtained by the calculation as a depth value candidate in the storage unit 40. Thereafter, the smoothing means 50 notifies the depth value determining means 60 of the completion of smoothing.

奥行値決定手段60は、仮定奥行値と基準映像の画素位置とに対応付けて記憶手段40に記憶されている選択差分値について、画素位置ごとに、奥行値候補の値を用いて平滑化した選択差分値が最小となる仮定奥行値を新たな奥行値候補として探索するものである。ここでは、奥行値決定手段60は、平滑化手段50によって平滑化された選択差分値が最小となる仮定奥行値を探索し、当該画素位置における奥行値とする。   The depth value determining unit 60 smoothes the selection difference value stored in the storage unit 40 in association with the assumed depth value and the pixel position of the reference image, using the value of the depth value candidate for each pixel position. The hypothetical depth value with the smallest selection difference value is searched for as a new depth value candidate. Here, the depth value determining means 60 searches for an assumed depth value at which the selection difference value smoothed by the smoothing means 50 is minimum, and sets it as the depth value at the pixel position.

このように、奥行値決定手段60は、すべての画素位置における奥行値候補を再度決定することで、被写体の奥行値を推定した奥行映像Fを生成する。
なお、この奥行値決定手段60は、平滑化手段50から、選択差分値の平滑化が完了した旨(平滑化完了)を通知されることで動作を開始するものとする。
Thus, the depth determining means 60, by re-determining a depth value candidates in all the pixel positions, to generate a depth image F Z estimating the depth value of the subject.
The depth value determining unit 60 starts the operation when notified from the smoothing unit 50 that the smoothing of the selected difference value has been completed (smoothing completion).

以上説明したように、奥行推定装置1は、隣接映像における視差の差分値を指標として、被写体の奥行値を推定することができる。   As described above, the depth estimation apparatus 1 can estimate the depth value of the subject using the difference value of the parallax in the adjacent video as an index.

〔奥行推定装置の動作〕
次に、図7〜図10を参照して、本発明の実施形態に係る奥行推定装置の動作について説明する。ここでは、図7を参照して、奥行推定装置1の全体動作について説明し、詳細な説明については、図8〜図10を参照して説明を行うことにする。
[Operation of depth estimation device]
Next, with reference to FIGS. 7-10, operation | movement of the depth estimation apparatus which concerns on embodiment of this invention is demonstrated. Here, the overall operation of the depth estimation apparatus 1 will be described with reference to FIG. 7, and the detailed description will be described with reference to FIGS. 8 to 10.

(全体動作)
最初に、図7を参照(構成については適宜図1,2参照)して、奥行推定装置1の全体動作について説明する。
まず、奥行推定装置1は、映像入力手段10によって、一直線上に等間隔で平行に配置したカメラ(基準カメラC、隣接カメラC,C)で、同一の被写体Tを撮影したカメラ映像(基準映像F,隣接映像F,F)を入力する(ステップS1)。
(Overall operation)
First, the overall operation of the depth estimation apparatus 1 will be described with reference to FIG.
First, the depth estimation apparatus 1 uses the video input means 10 to capture a camera image of the same subject T with cameras (reference camera C C , adjacent cameras C L , C R ) arranged in parallel on the straight line at equal intervals. (reference image F C, the neighboring image F L, F R) to enter (step S1).

そして、奥行推定装置1は、対応画素差分演算手段20および差分値決定手段30によって、仮定奥行値ごとに、基準映像Fの各画素の画素値と、当該画素の仮定奥行値の視差に対応する隣接映像F,Fの各画素の画素値との差分絶対値である隣接映像画素差分値eCL,eCRを求め、平均値または最小値のいずれかを差分値として決定(選択)する(ステップS2;差分値決定動作)。このステップS2の動作については、図8を参照して後で説明を行う。 The depth estimation apparatus 1 by the corresponding pixel difference calculating unit 20 and difference value determination unit 30, for each hypothetical depth value, the pixel value of each pixel of the reference image F C, corresponding to the disparity of the hypothetical depth value of the pixel The adjacent video pixel difference values e CL and e CR , which are absolute differences from the pixel values of the adjacent pixels F L and F R , are determined, and either the average value or the minimum value is determined (selected). (Step S2; differential value determination operation). The operation in step S2 will be described later with reference to FIG.

そして、奥行推定装置1は、平滑化手段50によって、基準映像Fの(x,y)座標の仮定奥行値dに対応してステップS2で選択された選択差分値に、隣接画素間の奥行値の差を重み付け加算することで、選択差分値を平滑化する(ステップS3;差分値平滑化動作)。このステップS3の動作については、図9を参照して後で説明を行う。 The depth estimation apparatus 1, the smoothing means 50, the reference image F C (x, y) corresponding to the assumed depth value d of the coordinates to the selected selected difference value in step S2, the depth between adjacent pixels The selected difference value is smoothed by weighted addition of the value differences (step S3; difference value smoothing operation). The operation in step S3 will be described later with reference to FIG.

その後、奥行推定装置1は、奥行値決定手段60によって、画素位置(x,y)ごとに、平滑化された選択差分値が最小となる奥行値候補を探索し、当該画素位置の奥行値に決定する(ステップS4;奥行値決定動作)。このステップS4の動作については、図10を参照して後で説明を行う。
以上の動作によって、奥行推定装置1は、複数のカメラ映像から、被写体の奥行きを示す奥行値を推定する。
After that, the depth estimation apparatus 1 searches the depth value candidate having the smallest smoothed selection difference value for each pixel position (x, y) by the depth value determination unit 60, and sets the depth value at the pixel position. Determine (step S4; depth value determination operation). The operation of step S4 will be described later with reference to FIG.
Through the above operation, the depth estimation apparatus 1 estimates a depth value indicating the depth of the subject from a plurality of camera images.

(差分値決定動作)
次に、図8を参照(構成については適宜図1,2参照)して、図7のステップS2の動作である差分値決定動作について詳細に説明する。
(Differential value determination operation)
Next, referring to FIG. 8 (refer to FIGS. 1 and 2 as appropriate for the configuration), the difference value determining operation that is the operation of step S2 of FIG. 7 will be described in detail.

まず、奥行推定装置1は、変数として、仮定奥行値d、カメラ映像のx座標値、y座標値をそれぞれ初期化(d=0、x=0、y=0)する(ステップS10)。
その後、奥行推定装置1は、対応画素差分演算手段20によって、基準映像Fの(x,y)座標の画素の画素値と、当該画素の仮定奥行値dの視差に対応する隣接映像F,Fの画素の画素値との差分絶対値である隣接映像画素差分値eCL,eCRを前記(1)式により演算する(ステップS11)。
First, the depth estimation apparatus 1 initializes the assumed depth value d, the x-coordinate value of the camera image, and the y-coordinate value as variables (d = 0, x = 0, y = 0) (step S10).
Thereafter, the depth estimation apparatus 1 by the corresponding pixel difference calculating unit 20, the reference image F C (x, y) and the pixel value of the pixel of the coordinates, the neighboring image F L corresponding to the parallax assumptions depth value d of the pixel , difference absolute value in the form of the neighboring image pixel difference value e CL between the pixel value of the pixel of F R, computed by said e CR (1) formula (step S11).

すなわち、対応画素差分演算手段20は、基準映像Fの中の画素値F(x,y)に対し、隣接映像Fの画素位置を右にd画素移動した位置の画素値F(x+d,y)との差分絶対値である隣接映像画素差分値eCL(d,x,y)を演算する。
また、対応画素差分演算手段20は、基準映像Fの中の画素値F(x,y)に対し、隣接映像Fの画素位置をd画素左に移動した位置の画素値F(x−d,y)との差分絶対値である隣接映像画素差分値eCR(d,x,y)を演算する。
That is, the corresponding pixel difference calculating means 20, the pixel values F C (x, y) in the reference image F C to the adjacent image F pixel values of a position moved d pixel pixel positions to the right of L F L ( The adjacent video pixel difference value e CL (d, x, y) which is an absolute difference value with respect to x + d, y) is calculated.
Further, the corresponding pixel difference calculating means 20, the pixel values F C (x, y) in the reference image F C to the adjacent image F pixel values of the position of the pixel position moves to the left d pixels R F R ( An adjacent video pixel difference value e CR (d, x, y), which is an absolute difference value with respect to x−d, y), is calculated.

そして、奥行推定装置1は、差分値決定手段30の平均差分値演算手段30aによって、前記(2)式により、ステップS11で求めた隣接映像画素差分値eCLと隣接映像画素差分値eCRとの平均値を演算し、平均差分値eaを求める。さらに、奥行推定装置1は、差分値決定手段30の最小差分値選択手段30bによって、前記(3)式により、隣接映像画素差分値eCLと隣接映像画素差分値eCRとの最小値を最小差分値emとして選択する(ステップS12)。なお、この平均差分値eaの演算と、最小差分値emの選択とは、いずれを先に行っても構わない。
その後、奥行推定装置1は、差分値決定手段30の差分値選択手段30cによって、ステップS11で求めた隣接映像画素差分値eCLと隣接映像画素差分値eCRとの差を演算し、その差が、予め定めた閾値thよりも小さいか否かを判定する(ステップS13)。
Then, the depth estimation apparatus 1 uses the average difference value calculation unit 30a of the difference value determination unit 30 to calculate the adjacent video pixel difference value e CL and the adjacent video pixel difference value e CR obtained in step S11 according to the equation (2). Is calculated to obtain an average difference value ea. Further, the depth estimation apparatus 1, the minimum difference value selection means 30b of the difference value determination unit 30, by the equation (3), minimizing the minimum value of the neighboring image pixel difference value e CL and neighboring image pixel difference value e CR The difference value em is selected (step S12). Note that either the calculation of the average difference value ea or the selection of the minimum difference value em may be performed first.
Thereafter, the depth estimation apparatus 1 calculates the difference between the adjacent video pixel difference value e CL and the adjacent video pixel difference value e CR obtained in step S11 by the difference value selection unit 30c of the difference value determination unit 30, and the difference Is smaller than a predetermined threshold th (step S13).

そして、隣接映像画素差分値eCLと隣接映像画素差分値eCRとの差が閾値thよりも小さい場合(ステップS13でYes)、差分値選択手段30cは、差分値として、ステップS12で求めた平均差分値eaを選択し、仮定奥行値dと基準映像の画素位置(x,y)とに対応付けて記憶手段40に書き込む(ステップS14)。
一方、隣接映像画素差分値eCLと隣接映像画素差分値eCRとの差が閾値th以上の場合(ステップS13でNo)、差分値選択手段30cは、差分値として、ステップS12で求めた最小差分値emを選択し、仮定奥行値dと基準映像の画素位置(x,y)とに対応付けて記憶手段40に書き込む(ステップS15)。
Then, when the difference between the neighboring image pixel difference value e CL and neighboring image pixel difference value e CR is smaller than the threshold value th (Yes in step S13), and the difference value selecting unit 30c, as the difference value, calculated in step S12 The average difference value ea is selected and written in the storage means 40 in association with the assumed depth value d and the pixel position (x, y) of the reference image (step S14).
On the other hand, when the difference between the adjacent video pixel difference value e CL and the adjacent video pixel difference value e CR is equal to or greater than the threshold th (No in step S13), the difference value selection unit 30c obtains the minimum value obtained in step S12 as the difference value. The difference value em is selected and written in the storage means 40 in association with the assumed depth value d and the pixel position (x, y) of the reference image (step S15).

なお、ステップS12の後、差分値選択手段30cは、隣接映像画素差分値eCLまたは隣接映像画素差分値eCRのいずれかが第2閾値(例えば、数画素)以下であれば、その第2閾値以下の隣接映像画素差分値eCLまたは隣接映像画素差分値eCRのいずれかを、仮定奥行値dと基準映像の画素位置(x,y)とに対応付けて記憶手段40に書き込むこととする(ステップとして図示せず)。この場合、差分値選択手段30cは、ステップS13の判定をスキップする。これによって、仮定奥行値dにおける正しい差分値が記憶手段40に書き込まれることになる。 Incidentally, after step S12, the difference value selecting unit 30c is neighboring image pixel difference value e CL or any second threshold neighboring image pixel difference value e CR (e.g., a few pixels) equal to or less than, the second Writing either the adjacent video pixel difference value e CL or the adjacent video pixel difference value e CR equal to or less than the threshold value in the storage means 40 in association with the assumed depth value d and the pixel position (x, y) of the reference video; (Not shown as a step). In this case, the difference value selection unit 30c skips the determination in step S13. As a result, the correct difference value in the assumed depth value d is written in the storage means 40.

その後、奥行推定装置1は、変数である仮定奥行値d、カメラ映像のx座標値、y座標値を順次加算(インクリメント)し、仮定奥行値dについては最大視差量になるまで(ステップS16,S17)、x座標値についてはカメラ映像の幅になるまで(ステップS18,S19)、y座標値についてはカメラ映像の高さになるまで(ステップS20,S21)、ステップS11からステップS15までの動作を繰り返す。
この差分値決定動作によって、記憶手段40には、基準映像の画素位置(x,y)ごとに、複数の仮定奥行値d(“0”〜最大視差量)に対応した差分値(選択差分値)eが記憶される。
Thereafter, the depth estimation apparatus 1 sequentially adds (increments) the assumed depth value d, which is a variable, the x-coordinate value of the camera image, and the y-coordinate value, until the assumed depth value d reaches the maximum amount of parallax (step S16, S17) The operation from step S11 to step S15 until the x-coordinate value becomes the width of the camera image (steps S18 and S19), and the y-coordinate value becomes the height of the camera image (steps S20 and S21). repeat.
By this difference value determination operation, the storage means 40 stores difference values (selected difference values) corresponding to a plurality of assumed depth values d (“0” to maximum parallax amount) for each pixel position (x, y) of the reference image. ) E is stored.

(差分値平滑化動作)
次に、図9を参照(構成については適宜図1,2参照)して、図7のステップS3の動作である差分値平滑化動作について詳細に説明する。
まず、奥行推定装置1は、変数であるカメラ映像のx座標値、y座標値をそれぞれ初期化(x=0、y=0)し直す(ステップS30)。
そして、奥行推定装置1は、平滑化手段50によって、記憶手段40に記憶されている基準映像Fの(x,y)座標と、この座標と隣接する座標とにおいて、仮定奥行値の中で選択差分値が最小の仮定奥行値を奥行値候補dとして探索する(ステップS31)。
(Difference smoothing operation)
Next, the difference value smoothing operation, which is the operation of step S3 in FIG. 7, will be described in detail with reference to FIG.
First, the depth estimation apparatus 1 reinitializes (x = 0, y = 0) the x coordinate value and the y coordinate value of the camera image, which are variables (step S30).
The depth estimation apparatus 1, the smoothing means 50, (x, y) of the reference image F C stored in the storage unit 40 and the coordinate in the coordinate adjacent to the coordinates, in a hypothetical depth value The assumed depth value with the smallest selection difference value is searched for as a depth value candidate d (step S31).

すなわち、平滑化手段50は、基準映像Fの(x,y)座標の選択差分値が最小となる仮定奥行値d(x,y)、(x+1,y)座標の選択差分値が最小となる仮定奥行値d(x+1,y)、(x,y+1)座標の選択差分値が最小となる仮定奥行値d(x,y+1)を探索し、最初の奥行値候補dとする。 In other words, the smoothing unit 50 determines that the selection difference value of the assumed depth value d (x, y) and (x + 1, y) coordinates at which the selection difference value of the (x, y) coordinate of the reference image F C is minimum is the minimum. Assumed depth value d (x + 1, y) and (x, y + 1) are searched for an assumed depth value d (x, y + 1) that minimizes the selected difference value, and set as the first depth value candidate d.

そして、奥行推定装置1は、平滑化手段50によって、記憶手段40に記憶されている基準映像Fの(x,y)座標の奥行値候補dに対応する選択差分値e(d,x,y)に、前記(5)式により、隣接画素間の奥行値候補の差を重み付け加算することで、平滑化した選択差分値ev(d,x,y)を演算する(ステップS32)。
そして、奥行推定装置1は、ステップS32で演算した平滑化した選択差分値evが最小になる奥行値候補を、基準映像の画素位置(x,y)に対応付けて記憶手段40に書き込む(ステップS33)。
The depth estimation apparatus 1, the smoothing means 50, (x, y) of the reference image F C in the storage unit 40 are stored selected difference value e (d corresponding to the coordinates of the depth value candidates d, x, The smoothed selection difference value ev (d, x, y) is calculated by weighting and adding the difference between the depth value candidates between adjacent pixels to y) according to the equation (5) (step S32).
Then, the depth estimation apparatus 1 writes the depth value candidate that minimizes the smoothed selection difference value ev calculated in step S32 into the storage unit 40 in association with the pixel position (x, y) of the reference image (step S33).

その後、奥行推定装置1は、変数であるカメラ映像のx座標値、y座標値を順次加算(インクリメント)し、x座標値についてはカメラ映像の幅になるまで(ステップS34,S35)、y座標値についてはカメラ映像の高さになるまで(ステップS36,S37)、ステップS31からステップS33までの動作を繰り返す。
この差分値平滑化動作によって、記憶手段40には、基準映像の画素位置(x,y)ごとに、平滑化した選択差分値evが最小となる奥行値候補が記憶される。
Thereafter, the depth estimation apparatus 1 sequentially adds (increments) the x-coordinate value and y-coordinate value of the camera image, which are variables, until the x-coordinate value becomes the width of the camera image (steps S34 and S35). Regarding the value, the operations from step S31 to step S33 are repeated until the height of the camera image is reached (steps S36 and S37).
By this difference value smoothing operation, the storage unit 40 stores a depth value candidate that minimizes the smoothed selection difference value ev for each pixel position (x, y) of the reference image.

(奥行値決定動作)
次に、図10を参照(構成については適宜図1,2参照)して、図7のステップS4の動作である奥行値決定動作について詳細に説明する。
(Depth value determination operation)
Next, with reference to FIG. 10 (refer to FIGS. 1 and 2 as appropriate for the configuration), the depth value determination operation that is the operation of step S4 of FIG. 7 will be described in detail.

まず、奥行推定装置1は、変数であるカメラ映像のx座標値、y座標値をそれぞれ初期化(x=0、y=0)する(ステップS50)。
そして、奥行推定装置1は、奥行値決定手段60によって、記憶手段40に記憶されている奥行値候補の選択差分値eについて、画素位置(x,y)ごとに、平滑化された選択差分値evが最小となる仮定奥行値dを探索する(ステップS51)。このステップS51で探索された仮定奥行値dが、画素位置(x,y)における被写体の新たな奥行値候補として決定(出力)される(ステップS52)。
First, the depth estimation apparatus 1 initializes the x-coordinate value and the y-coordinate value of the camera image, which are variables, respectively (x = 0, y = 0) (step S50).
Then, the depth estimation apparatus 1 uses the depth value determination means 60 to select the smoothed selection difference value for each pixel position (x, y) for the selection difference value e of the depth value candidate stored in the storage means 40. The assumed depth value d that minimizes ev is searched (step S51). The assumed depth value d searched in step S51 is determined (output) as a new depth value candidate of the subject at the pixel position (x, y) (step S52).

その後、奥行推定装置1は、変数であるカメラ映像のx座標値、y座標値を順次加算(インクリメント)し、x座標値についてはカメラ映像の幅になるまで(ステップS53,S54)、y座標値についてはカメラ映像の高さになるまで(ステップS55,S56)、ステップS51,S52の動作を繰り返す。これによって、すべての画素位置(x,y)における被写体の奥行値候補が決定されることになる。
なお、この奥行値決定動作は、新たに決定された奥行値候補を用いて任意回数繰り返してもよい。その結果、より平滑化された奥行値候補を得ることができる。
Thereafter, the depth estimation apparatus 1 sequentially adds (increments) the x-coordinate value and y-coordinate value of the camera image, which are variables, until the x-coordinate value reaches the width of the camera image (steps S53 and S54). Regarding the value, the operations of steps S51 and S52 are repeated until the height of the camera image is reached (steps S55 and S56). Thereby, the depth value candidates of the subject at all the pixel positions (x, y) are determined.
This depth value determination operation may be repeated any number of times using newly determined depth value candidates. As a result, a depth value candidate that is smoother can be obtained.

以上、本発明の実施形態に係る奥行推定装置1の構成および動作について説明したが、本発明は、この実施形態に限定されるものではない。
以下、本発明の種々の変形例について説明する。
As mentioned above, although the structure and operation | movement of the depth estimation apparatus 1 which concern on embodiment of this invention were demonstrated, this invention is not limited to this embodiment.
Hereinafter, various modifications of the present invention will be described.

〔奥行推定装置の実施形態の変形例〕
(変形例1:平滑化手段を省略した変形例)
まず、第1の変形例として、図2に示した奥行推定装置1は、平滑化手段50を省略して構成してもよい。
ここで、図11を参照して、平滑化手段を省略した奥行推定装置の構成について説明する。図11に示した奥行推定装置1Bは、奥行推定装置1(図2参照)から平滑化手段50を省き、差分値決定手段30および奥行値決定手段60を、それぞれ差分値決定手段30Bおよび奥行値決定手段60Bとして構成している。奥行推定装置1と同一の構成については、同一の符号を付して説明を省略する。
[Modification of Embodiment of Depth Estimation Device]
(Modification 1: Modification in which smoothing means is omitted)
First, as a first modification, the depth estimation apparatus 1 illustrated in FIG. 2 may be configured by omitting the smoothing unit 50.
Here, with reference to FIG. 11, the structure of the depth estimation apparatus which abbreviate | omitted the smoothing means is demonstrated. The depth estimation apparatus 1B shown in FIG. 11 omits the smoothing means 50 from the depth estimation apparatus 1 (see FIG. 2), and replaces the difference value determination means 30 and the depth value determination means 60 with the difference value determination means 30B and the depth value, respectively. The determination unit 60B is configured. About the same structure as the depth estimation apparatus 1, the same code | symbol is attached | subjected and description is abbreviate | omitted.

差分値決定手段30Bは、その内部構成および内部動作については、図2で説明した差分値決定手段30と同様であるが、基準映像のすべての画素位置において、仮定奥行値ごとの選択差分値を記憶手段40に書き込んだ後に、書き込み完了を通知する先が、奥行値決定手段60Bである点が異なっている。   The difference value determination unit 30B is similar to the difference value determination unit 30 described in FIG. 2 with respect to its internal configuration and internal operation, but the selected difference value for each assumed depth value is obtained at all pixel positions of the reference image. The difference is that the destination of notifying the completion of writing after writing to the storage means 40 is the depth value determining means 60B.

奥行値決定手段60Bは、図2で説明した奥行値決定手段60と基本的な機能は同じであるが、差分値決定手段30Bから書き込み完了を通知されることで動作する点のみが異なっている。
また、奥行推定装置1Bの動作は、図7で説明した奥行推定装置1の動作のうち、ステップS3を除いた動作となる。
The depth value determining means 60B has the same basic function as the depth value determining means 60 described with reference to FIG. 2, except that the depth value determining means 60B operates when notified of completion of writing from the difference value determining means 30B. .
Further, the operation of the depth estimation apparatus 1B is an operation excluding step S3 among the operations of the depth estimation apparatus 1 described in FIG.

このように奥行推定装置1Bを構成し、動作させることで、奥行推定装置1Bは、図2で説明した奥行推定装置1に比べ、隣接画素間において、選択差分値が最小となる奥行値がノイズ等で互いに異なる場合、奥行推定を誤ることがある。しかし、奥行推定装置1Bは、ノイズ劣化の少ない映像において、奥行推定装置1と同様の効果を高速に得ることができる。   By configuring and operating the depth estimation device 1B in this manner, the depth estimation device 1B has a noise that has a minimum selection difference value between adjacent pixels compared to the depth estimation device 1 described in FIG. Etc., the depth estimation may be wrong. However, the depth estimation apparatus 1B can obtain the same effect as the depth estimation apparatus 1 at high speed in an image with little noise degradation.

すなわち、奥行推定装置1Bは、一様な被写体で対応点が複数存在する場合であっても、複数の仮定した奥行値に対応する画素値の差分絶対値が最小となる画素の奥行値を推定する従来の手法に比べ、閾値によって差分絶対値の平均値を選択するか、最小の差分絶対値を選択するかを切り替えることで、ある隣接映像で偽マッチングが発生している場合、その奥行値を推定対象から除くことができ、また、オクルージョンが発生している場合、正しい差分値から奥行値を推定することができ、精度よく奥行値を推定することができる。   That is, the depth estimation apparatus 1B estimates the depth value of a pixel having the smallest difference absolute value of pixel values corresponding to a plurality of assumed depth values even when there are a plurality of corresponding points in a uniform subject. Compared to the conventional method, the depth value when false matching occurs in a certain adjacent video by switching between the average difference absolute value or the minimum difference absolute value depending on the threshold. Can be removed from the estimation target, and when occlusion occurs, the depth value can be estimated from the correct difference value, and the depth value can be estimated with high accuracy.

(変形例2:画素をサブ画素化した変形例)
また、本実施形態では、仮定する奥行値の単位(刻み幅)と画素間の視差の単位(画素間隔)とを同一としたが、奥行値の単位を、画素間隔よりも小さい仮想のサブ画素間隔(例えば、半画素単位、1/4画素単位)としてもよい。この場合、例えば、半画素の画素値は、当該半画素を含む画素値と、隣接する画素の画素値とから補間して求めることができる。
(Modification 2: Modification in which pixels are sub-pixels)
In the present embodiment, the assumed depth value unit (step size) is the same as the unit of parallax between pixels (pixel interval), but the virtual value of the sub-pixel is smaller than the pixel interval. It is good also as a space | interval (for example, half pixel unit, 1/4 pixel unit). In this case, for example, the pixel value of the half pixel can be obtained by interpolation from the pixel value including the half pixel and the pixel value of the adjacent pixel.

例えば、図12に示したように画素が配列されている場合、(x,y)座標の画素Pの画素値をpv、(x,y−1)座標の画素Pの画素値をpv、(x−1,y)座標の画素Pの画素値をpv、(x−1,y−1)座標の画素Pの画素値をpvとしたとき、仮想の(x−1/2,y−1/2)座標のサブ画素Pの画素値psvは、以下の(6)式で求めることができる。
psv=(pv+pv+pv+pv)/4 …(6)式
なお、ここでは、サブ画素Pに隣接する画素P,P,P,Pを用いて補間により画素値を求めたが、サブ画素PがPとPのみに隣接する場合は、画素PとPのみを用いて補間を行ってもよい。
For example, if the pixels are arranged as shown in FIG. 12, (x, y) pv 1 pixel value of the pixel P 1 of the coordinates, the (x, y-1) pixel value of the pixel P 2 coordinates When the pixel value of the pixel P 3 at the pv 2 , (x−1, y) coordinates is pv 3 and the pixel value of the pixel P 4 at the (x−1, y−1) coordinates is pv 4 , the virtual (x -1 / 2, y-1/ 2) pixel values psv subpixels P S of coordinates may be calculated by the following equation (6).
psv = (pv 1 + pv 2 + pv 3 + pv 4) / 4 ... (6) equation Here, the pixel P 1 adjacent to the sub-pixels P S, P 2, P 3 , the pixel values by interpolation using P 4 While the obtained when the sub-pixel P S is adjacent only to the P 1 and P 3 may perform interpolation using only pixel P 1 and P 3.

この場合、奥行推定装置1(図2)の対応画素差分演算手段20が、サブ画素単位で隣接映像画素差分値eCL,eCRを算出することとする。なお、差分値決定手段30、平滑化手段50、記憶手段40、奥行値決定手段60においては、それぞれ画素単位で行う処理を、サブ画素単位で行えばよい。
このように、奥行値の単位を仮想のサブ画素間隔で行うことで、基準カメラCと、隣接カメラC,Cとのカメラ間隔が狭い場合であっても奥行値の分解能を高めることができる。
In this case, it is assumed that the corresponding pixel difference calculation means 20 of the depth estimation device 1 (FIG. 2) calculates the adjacent video pixel difference values e CL and e CR in units of sub-pixels. In the difference value determining unit 30, the smoothing unit 50, the storage unit 40, and the depth value determining unit 60, the processing performed in units of pixels may be performed in units of sub-pixels.
Thus, by performing the unit of depth values at the virtual sub-pixel spacing, the reference camera C C, to increase the resolution of the adjacent camera C L, depth values even when the camera distance between C R is narrow Can do.

(変形例3:カメラ台数の変形例)
また、本実施形態では、3台のカメラを用いて被写体の奥行を推定するものとして説明したが、4台以上のカメラを用いて奥行を推定することとしてもよい。
この場合、奥行値を求めたいカメラ映像を基準映像とし、対応画素差分演算手段20が、基準映像と、当該カメラの両隣に複数配置したカメラで撮影したカメラ映像との対応画素の差分絶対値をそれぞれ演算する。そして、差分値決定手段30の平均差分値演算手段30aが、複数の差分絶対値の平均値(平均差分値)を計算し、最小差分値選択手段30bが、複数の差分絶対値の最小値(最小差分値)を選択する。そして、差分値選択手段30cが、平均差分値または最小差分値のいずれかを選択する。なお、この差分値選択手段30cにおける選択は、複数の差分絶対値の最大値(最大差分値)と最小値(最小差分値)との差が、予め定めた閾値よりも小さい場合は、平均差分値を選択し、それ以外の場合は、最小差分値を選択すればよい。
このように、カメラ台数を増やすことで、奥行値の推定精度を高めることができる。
(Modification 3: Modification of the number of cameras)
Moreover, although this embodiment demonstrated as what estimates the depth of a to-be-photographed object using three cameras, it is good also as estimating a depth using four or more cameras.
In this case, the camera image for which the depth value is to be obtained is set as the reference image, and the corresponding pixel difference calculation means 20 calculates the absolute value of the difference between the corresponding pixels between the reference image and the camera images taken by a plurality of cameras arranged on both sides of the camera. Calculate each. Then, the average difference value calculating means 30a of the difference value determining means 30 calculates the average value (average difference value) of the plurality of difference absolute values, and the minimum difference value selecting means 30b is the minimum value of the plurality of difference absolute values ( Select the minimum difference value. Then, the difference value selection means 30c selects either the average difference value or the minimum difference value. The difference value selection means 30c selects the average difference when the difference between the maximum value (maximum difference value) and the minimum value (minimum difference value) of the plurality of absolute difference values is smaller than a predetermined threshold value. A value is selected, otherwise, a minimum difference value may be selected.
Thus, the estimation accuracy of the depth value can be increased by increasing the number of cameras.

(変形例4:カメラ配置間隔の変形例)
また、本実施形態では、被写体を撮影するカメラの設置間隔を等間隔としたが、異なるカメラ間隔としてもよい。
この場合、対応画素差分演算手段20は、それぞれの隣接映像F,Fについて、基準カメラCからのカメラ間隔ごとに、基準映像Fの画素から、視差に対応する画素の位置をそれぞれ求め、当該画素の画素値と、基準映像Fの画素の画素値との差分絶対値を演算すればよい。例えば、本実施形態では、奥行値の単位と画素間の視差の単位とを同一とし、奥行値が“1”増加することで、1画素ずつ視差が増加することとしたが、この場合、図1に示したカメラC,C間の距離が、カメラC,C間の距離の2倍であったとすると、対応画素差分演算手段20は、前記(1)式の代わりに、以下の(7)式により差分絶対値を算出すればよい。
CL(d,x,y)=|F(x+d,y)−F(x,y)|
CR(d,x,y)=|F(x−2d,y)−F(x,y)| …(7)式
これによって、奥行推定システム(図1)のカメラ配置の自由度を高めることができる。
(Modification 4: Modification of camera arrangement interval)
Further, in this embodiment, the installation intervals of the cameras that shoot the subject are set to be equal intervals, but different camera intervals may be used.
In this case, the corresponding pixel difference calculating means 20, each of the neighboring image F L, the F R, for each camera distance from the base camera C C, from the pixels of the reference image F C, the positions of the pixels corresponding to the parallax, respectively determined, it may be operational and the pixel value of the pixel, a difference absolute value between the pixel value of the pixel of the reference image F C. For example, in the present embodiment, the unit of the depth value is the same as the unit of the parallax between the pixels, and the parallax increases by one pixel by increasing the depth value by “1”. camera C C shown in 1, the distance between C R, camera C C, When was the twice the distance between C L, corresponding pixel difference calculating unit 20, instead of the equation (1), the following What is necessary is just to calculate a difference absolute value by (7) Formula.
e CL (d, x, y) = | F L (x + d, y) −F C (x, y) |
e CR (d, x, y) = | F R (x−2d, y) −F C (x, y) | (7) Thereby, the degree of freedom of the camera arrangement of the depth estimation system (FIG. 1). Can be increased.

(変形例5:対応画素差分演算手段の変形例)
また、本実施形態では、対応画素差分演算手段20が、基準映像Fの各画素の画素値と、当該画素の仮定奥行値の視差に対応する隣接映像F,Fの各画素の画素値との差分絶対値を演算することとしたが、この差分絶対値は、対応する画素のみでなく、対応画素を中心とするブロック内の画素値の差分絶対値の重み付け平均値を用いることとしてもよい。例えば、対応画素差分演算手段20は、前記(1)式の隣接映像画素差分値eCL(d,x,y)を、以下の(8)式により算出する。
CL(d,x,y)=|F(x+d,y)−F(x,y)|×1/2
+|F(x+d+1,y)−F(x+1,y)|×1/8
+|F(x+d−1,y)−F(x−1,y)|×1/8
+|F(x+d,y+1)−F(x,y+1)|×1/8
+|F(x+d,y−1)−F(x,y−1)|×1/8
…(8)式
これによって、ノイズ等によって発生する差分絶対値の誤差を軽減することができる。
(Modification 5: Modification of Corresponding Pixel Difference Calculation Unit)
Further, in the present embodiment, the corresponding pixel difference calculating means 20, the pixel value of each pixel of the reference image F C, for each pixel of the neighboring image F L, F R corresponding to the parallax assumptions depth value of the pixel pixel The absolute value of the difference with the value is calculated, but the absolute value of the difference is not only the corresponding pixel but also the weighted average value of the absolute difference value of the pixel values in the block centered on the corresponding pixel. Also good. For example, the corresponding pixel difference calculation means 20 calculates the adjacent video pixel difference value e CL (d, x, y) of the equation (1) by the following equation (8).
e CL (d, x, y) = | F L (x + d, y) −F C (x, y) | × 1/2
+ | F L (x + d + 1, y) −F C (x + 1, y) | × 1/8
+ | F L (x + d-1, y) -F C (x-1, y) | × 1/8
+ | F L (x + d, y + 1) −F C (x, y + 1) | × 1/8
+ | F L (x + d, y−1) −F C (x, y−1) | × 1/8
... (8) Formula By this, the difference | error of the difference absolute value which generate | occur | produces by noise etc. can be reduced.

(変形例6:平均差分値演算手段の変形例)
また、本実施形態では、平均差分値演算手段30aが、対応画素差分演算手段20で演算された隣接映像画素差分値eCL,eCRの平均値を相加平均により求めたが、相乗平均によって求めても、本実施形態と同様の作用効果を奏することができる。
すなわち、平均差分値演算手段30aは、前記(2)式の代わりに、以下の(9)式により平均差分値eaを求めることとしてもよい。
ea(d,x,y)=√{eCL(d,x,y)×eCR(d,x,y)}
…(9)式
(Modification 6: Modification of Average Difference Value Calculation Unit)
In the present embodiment, the average difference value calculating unit 30a calculates the average value of the adjacent video pixel difference values e CL and e CR calculated by the corresponding pixel difference calculating unit 20 by arithmetic averaging. Even if it calculates | requires, there can exist an effect similar to this embodiment.
That is, the average difference value calculation means 30a may obtain the average difference value ea by the following equation (9) instead of the above equation (2).
ea (d, x, y) = √ {e CL (d, x, y) × e CR (d, x, y)}
... (9) Formula

なお、平均差分値演算手段30aは、変形例3に示したように、4台以上のカメラでカメラ映像を入力する場合、対応画素差分演算手段20によって、隣接映像画素差分値(差分絶対値)は3個以上演算される。この場合、平均差分値演算手段30aは、隣接映像画素差分値の数をn個としたとき、隣接映像画素差分値の積のn乗根を平均差分値eaとすればよい。   Note that, as shown in the modification 3, the average difference value calculating unit 30a, when inputting camera images with four or more cameras, causes the corresponding pixel difference calculating unit 20 to perform adjacent video pixel difference values (difference absolute values). 3 or more are calculated. In this case, when the number of the adjacent video pixel difference values is n, the average difference value calculating unit 30a may set the nth root of the product of the adjacent video pixel difference values as the average difference value ea.

(変形例7:差分値選択手段の変形例)
また、本実施形態では、差分値選択手段30cが、対応画素差分演算手段20で演算された隣接映像画素差分値eCL,eCRの差によって、平均差分値eaか最小差分値emかのいずれかを選択することとしたが、隣接映像画素差分値eCL,eCRの比によって選択することとしても、本実施形態と同様の作用効果を奏することができる。
(Modification 7: Modification of Difference Value Selection Unit)
Further, in the present embodiment, the difference value selection unit 30 c is either the average difference value ea or the minimum difference value em depending on the difference between the adjacent video pixel difference values e CL and e CR calculated by the corresponding pixel difference calculation unit 20. However, even if the selection is made according to the ratio of the adjacent video pixel difference values e CL and e CR , the same effect as that of the present embodiment can be obtained.

すなわち、差分値選択手段30cは、前記(4)式の判定に代えて、以下の(10)式に示すように、隣接映像画素差分値eCL,eCRの比が予め定めた比の範囲に存在する場合に平均差分値eaを選択し、それ以外の場合は、図5で説明したオクルージョンが発生している可能性が高いと判定し、最小差分値emを選択することとしてもよい。 That is, the difference value selection unit 30c replaces the determination of the equation (4) with the ratio of the adjacent video pixel difference values e CL and e CR within a predetermined ratio range as shown in the following equation (10). In other cases, the average difference value ea may be selected. In other cases, it may be determined that the occlusion described with reference to FIG. 5 is highly likely to occur, and the minimum difference value em may be selected.

1/th<eCL(d,x,y)/eCR(d,x,y)<th …(10)式
この閾値thは、“1”より大きい値であって、例えば、“5”程度とする。この閾値thが大きすぎると、基準映像Fの画素と、隣接映像Fまたは隣接映像Fの画素間で偽マッチングが生じていない場合でも、偽マッチングが生じていると判定し、閾値thが小さすぎると、基準映像Fの画素と、隣接映像Fまたは隣接映像Fの画素間でオクルージョンが生じていない場合でも、オクルージョンが生じていると判定してしまうことになるからである。
1 / th R <e CL (d, x, y) / e CR (d, x, y) <th R (10) This threshold th R is a value greater than “1”, for example, “5” or so. When the threshold th R is too large, the pixel of the reference image F C, even if the false match between pixels of neighboring image F L or neighboring image F R does not occur, determines that the false match occurs, the threshold value when th R is too small, the pixel of the reference image F C, even when occlusion does not occur between pixels of neighboring image F L or neighboring image F R, would be attempting to determine the occlusion has occurred It is.

なお、差分値選択手段30cは、変形例3に示したように、4台以上のカメラでカメラ映像を入力する場合、対応画素差分演算手段20によって、隣接映像画素差分値(差分絶対値)は3個以上演算される。この場合、差分値選択手段30cは、隣接映像画素差分値の最大値(最大差分値)と最小値(最小差分値)との比を用いることとすればよい。   In addition, as shown in the modification 3, the difference value selection unit 30c, when the camera image is input by four or more cameras, is calculated by the corresponding pixel difference calculation unit 20 to determine the adjacent video pixel difference value (difference absolute value). Three or more are calculated. In this case, the difference value selection unit 30c may use a ratio between the maximum value (maximum difference value) and the minimum value (minimum difference value) of the adjacent video pixel difference values.

(変形例8:平滑化手段の変形例)
また、本実施形態では、平滑化手段50が、前記(5)式に示すように、基準映像Fの(x,y)座標の仮定奥行値dに対応する選択差分値e(d,x,y)に、隣接する2画素間の奥行値の差分絶対値を重み付け加算したが、以下の(11)式に示すように、隣接する4画素間の奥行値の差分絶対値を重み付け加算してもよい。
ev(d,x,y)=e(d,x,y)
+w{|d(x+1,y)−d(x,y)|+|d(x,y+1)−d(x,y)|
+|d(x−1,y)−d(x,y)|+|d(x,y−1)−d(x,y)|}
…(11)式
(Modification 8: Modification of smoothing means)
In the present embodiment, the smoothing unit 50 selects the selection difference value e (d, x) corresponding to the assumed depth value d of the (x, y) coordinates of the reference image F C as shown in the equation (5). , Y) is weighted and added to the absolute value of the depth value difference between two adjacent pixels. However, as shown in the following equation (11), the absolute value of the difference value between the four adjacent pixels is weighted and added. May be.
ev (d, x, y) = e (d, x, y)
+ W {| d (x + 1, y) -d (x, y) | + | d (x, y + 1) -d (x, y) |
+ | D (x-1, y) -d (x, y) | + | d (x, y-1) -d (x, y) |}
... (11) Formula

以上、本発明の実施形態である奥行推定装置1並びに奥行推定装置1B等の変形例について説明したが、奥行推定装置1並びに奥行推定装置1B等の変形例は、一般的なコンピュータを、前記した各手段として機能させる奥行推定プログラムによって動作させることができる。また、この奥行推定プログラムは、通信回線を介して配布したり、CD−ROM等の記録媒体に記録して配布したりすることも可能である。   The modification examples of the depth estimation device 1 and the depth estimation device 1B according to the embodiment of the present invention have been described above. However, the modification examples such as the depth estimation device 1 and the depth estimation device 1B have been described above with respect to general computers. It can be operated by a depth estimation program that functions as each means. The depth estimation program can also be distributed via a communication line, or can be recorded on a recording medium such as a CD-ROM for distribution.

以上説明したように、奥行推定装置1,1Bは、一様な被写体で対応点が複数存在する場合であっても、複数の仮定した奥行値に対応する画素値の差分絶対値が最小となる画素の奥行値を推定する従来の手法に比べ、閾値によって差分絶対値の平均値を選択するか、最小の差分絶対値を選択するかを切り替えることで、ある隣接映像で偽マッチングが発生している場合、その奥行値を推定対象から除くことができ、また、オクルージョンが発生している場合、正しい差分値から奥行値を推定することができ、精度よく奥行値を推定することができる。   As described above, the depth estimation devices 1 and 1B have the smallest difference absolute value of pixel values corresponding to a plurality of assumed depth values even when there are a plurality of corresponding points in a uniform subject. Compared to the conventional method of estimating the depth value of a pixel, false matching occurs in a certain adjacent video by switching between selecting the average difference absolute value or selecting the minimum difference absolute value according to the threshold value. If it is, the depth value can be excluded from the estimation target. If occlusion occurs, the depth value can be estimated from the correct difference value, and the depth value can be estimated accurately.

1 奥行推定装置
10 映像入力手段
20 対応画素差分演算手段
30 差分値決定手段
30a 平均差分値演算手段
30b 最小差分値選択手段
30c 差分値選択手段
40 記憶手段
50 平滑化手段
60 奥行値決定手段
DESCRIPTION OF SYMBOLS 1 Depth estimation apparatus 10 Image | video input means 20 Corresponding pixel difference calculation means 30 Difference value determination means 30a Average difference value calculation means 30b Minimum difference value selection means 30c Difference value selection means 40 Storage means 50 Smoothing means 60 Depth value determination means

Claims (10)

予め定めた位置に複数配列したカメラで同一の被写体を撮影した複数のカメラ映像から、前記被写体の奥行きを示す奥行値を推定する奥行推定装置であって、
前記複数配列した前記カメラのいずれかにおいて、予め定めた基準カメラで前記被写体を撮影した基準映像と、前記基準カメラに隣接する複数の隣接カメラで前記被写体を撮影した複数の隣接映像とを入力する映像入力手段と、
複数の仮定奥行値ごとに、前記基準映像の各画素の画素値と、当該画素の前記仮定奥行値の視差に対応する画素である前記複数の隣接映像の各画素の画素値との差分絶対値である隣接映像画素差分値を演算する対応画素差分演算手段と、
前記複数の仮定奥行値および前記基準映像の画素位置ごとに、前記隣接映像画素差分値の最大差分値と最小差分値との差が、予め定めた閾値よりも小さい場合は、前記隣接映像画素差分値の平均値である平均差分値を選択し、前記閾値よりも大きい場合は、前記隣接映像画素差分値の最小差分値を選択して、選択差分値として決定する差分値決定手段と、
この差分値決定手段で決定した選択差分値を前記仮定奥行値と前記基準映像の画素位置とに対応付けて記憶する記憶手段と、
前記画素位置ごとに、前記選択差分値が最小となる前記仮定奥行値を前記記憶手段において探索し、当該画素位置の奥行値とする奥行値決定手段と、
を備えることを特徴とする奥行推定装置。
A depth estimation device that estimates a depth value indicating the depth of the subject from a plurality of camera images obtained by photographing the same subject with a plurality of cameras arranged in a predetermined position,
In any of the plurality of cameras arranged in the plurality, a reference image obtained by photographing the subject with a predetermined reference camera and a plurality of adjacent images obtained by photographing the subject with a plurality of adjacent cameras adjacent to the reference camera are input. Video input means;
For each of a plurality of assumed depth values, a difference absolute value between a pixel value of each pixel of the reference image and a pixel value of each pixel of the plurality of adjacent images that is a pixel corresponding to the parallax of the assumed depth value of the pixel. Corresponding pixel difference calculating means for calculating the adjacent video pixel difference value,
When the difference between the maximum difference value and the minimum difference value of the adjacent video pixel difference value is smaller than a predetermined threshold for each of the plurality of assumed depth values and the pixel position of the reference video, the adjacent video pixel difference A difference value determining means for selecting an average difference value that is an average value of the values, and selecting a minimum difference value of the adjacent video pixel difference values and determining the selected difference value when the difference is larger than the threshold;
Storage means for storing the selection difference value determined by the difference value determination means in association with the assumed depth value and the pixel position of the reference image;
A depth value determining unit that searches the storage unit for the assumed depth value at which the selection difference value is minimum for each pixel position, and sets the depth value of the pixel position;
A depth estimation apparatus comprising:
予め定めた位置に複数配列したカメラで同一の被写体を撮影した複数のカメラ映像から、前記被写体の奥行きを示す奥行値を推定する奥行推定装置であって、
前記複数配列した前記カメラのいずれかにおいて、予め定めた基準カメラで前記被写体を撮影した基準映像と、前記基準カメラに隣接する複数の隣接カメラで前記被写体を撮影した複数の隣接映像とを入力する映像入力手段と、
複数の仮定奥行値ごとに、前記基準映像の各画素の画素値と、当該画素の前記仮定奥行値の視差に対応する画素である前記複数の隣接映像の各画素の画素値との差分絶対値である隣接映像画素差分値を演算する対応画素差分演算手段と、
前記複数の仮定奥行値および前記基準映像の画素位置ごとに、前記隣接映像画素差分値の最大差分値と最小差分値との比が、予め定めた閾値の範囲内の場合は、前記隣接映像画素差分値の平均値である平均差分値を選択し、前記範囲外の場合は、前記隣接映像画素差分値の最小差分値を選択して、選択差分値として決定する差分値決定手段と、
この差分値決定手段で決定した選択差分値を前記仮定奥行値と前記基準映像の画素位置とに対応付けて記憶する記憶手段と、
前記画素位置ごとに、前記選択差分値が最小となる前記仮定奥行値を前記記憶手段において探索し、当該画素位置の奥行値とする奥行値決定手段と、
を備えることを特徴とする奥行推定装置。
A depth estimation device that estimates a depth value indicating the depth of the subject from a plurality of camera images obtained by photographing the same subject with a plurality of cameras arranged in a predetermined position,
In any of the plurality of cameras arranged in the plurality, a reference image obtained by photographing the subject with a predetermined reference camera and a plurality of adjacent images obtained by photographing the subject with a plurality of adjacent cameras adjacent to the reference camera are input. Video input means;
For each of a plurality of assumed depth values, a difference absolute value between a pixel value of each pixel of the reference image and a pixel value of each pixel of the plurality of adjacent images that is a pixel corresponding to the parallax of the assumed depth value of the pixel. Corresponding pixel difference calculating means for calculating the adjacent video pixel difference value,
If the ratio between the maximum difference value and the minimum difference value of the adjacent video pixel difference values is within a predetermined threshold range for each of the plurality of assumed depth values and the pixel position of the reference video, the adjacent video pixels Selecting an average difference value that is an average value of the difference values, and, if out of the range, selecting a minimum difference value of the adjacent video pixel difference value, and determining a difference value determining means for determining the selected difference value;
Storage means for storing the selection difference value determined by the difference value determination means in association with the assumed depth value and the pixel position of the reference image;
A depth value determining unit that searches the storage unit for the assumed depth value at which the selection difference value is minimum for each pixel position, and sets the depth value of the pixel position;
A depth estimation apparatus comprising:
前記差分値決定手段は、前記隣接映像画素差分値の中に、予め定めた第2閾値より小さい差分絶対値が存在する場合、当該差分絶対値を前記選択差分値として決定することを特徴とする請求項1または請求項2に記載の奥行推定装置。   The difference value determining means determines the difference absolute value as the selection difference value when a difference absolute value smaller than a predetermined second threshold exists in the adjacent video pixel difference value. The depth estimation apparatus according to claim 1 or 2. 前記画素位置ごとに、前記選択差分値に、前記選択差分値が最小となる前記仮定奥行値と、当該画素位置の隣接画素位置における前記選択差分値が最小となる前記仮定奥行値との差分を重み付け加算することで、当該画素位置における選択差分値を平滑化する平滑化手段をさらに備え、
前記奥行値決定手段は、前記平滑化手段で平滑化した選択差分値が最小となる前記仮定奥行値を探索し、当該画素位置の奥行値とすることを特徴とする請求項1から請求項3のいずれか一項に記載の奥行推定装置。
For each pixel position, the difference between the assumed depth value at which the selection difference value is minimum and the assumed depth value at which the selection difference value at the adjacent pixel position of the pixel position is minimum is determined as the selection difference value. Smoothing means for smoothing the selection difference value at the pixel position by weighted addition;
The depth value determination unit searches for the assumed depth value that minimizes the selection difference value smoothed by the smoothing unit, and sets the depth value of the pixel position as the depth value. Depth estimation apparatus as described in any one of these.
前記仮定奥行値は、前記カメラ映像の画素間隔よりも小さい仮想のサブ画素間隔を単位とする値であって、
前記対応画素差分演算手段は、前記仮定奥行値に対応する前記サブ画素を含む画素の画素値と、当該画素に隣接する画素の画素値とから補間して生成した画素値を用いて差分絶対値を演算することを特徴とする請求項1から請求項4のいずれか一項に記載の奥行推定装置。
The assumed depth value is a value in units of virtual sub-pixel intervals smaller than the pixel interval of the camera image,
The corresponding pixel difference calculation means uses the pixel value generated by interpolation from the pixel value of the pixel including the sub-pixel corresponding to the assumed depth value and the pixel value of the pixel adjacent to the pixel, and the absolute difference value The depth estimation apparatus according to any one of claims 1 to 4, wherein the depth estimation device is calculated.
前記画素値は、輝度値および色差値、または、カラー値の複数の要素で構成される値であって、
前記対応画素差分演算手段は、前記差分絶対値を、前記要素ごとの値の差分絶対値和として演算することを特徴とする請求項1から請求項5のいずれか一項に記載の奥行推定装置。
The pixel value is a value composed of a plurality of elements of luminance value and color difference value, or color value,
The depth estimation device according to any one of claims 1 to 5, wherein the corresponding pixel difference calculation unit calculates the difference absolute value as a sum of absolute differences of values for each element. .
予め定めた位置に複数配列したカメラで同一の被写体を撮影した複数のカメラ映像から、前記被写体の奥行きを示す奥行値を推定する奥行推定方法であって、
前記複数配列した前記カメラのいずれかにおいて、予め定めた基準カメラで前記被写体を撮影した基準映像と、前記基準カメラに隣接する複数の隣接カメラで前記被写体を撮影した複数の隣接映像とを映像入力手段により入力する映像入力ステップと、
複数の仮定奥行値ごとに、前記基準映像の各画素の画素値と、当該画素の前記仮定奥行値の視差に対応する画素である前記複数の隣接映像の各画素の画素値との差分絶対値である隣接映像画素差分値を対応画素差分演算手段により演算する対応画素差分演算ステップと、
差分値決定手段により、前記複数の仮定奥行値および前記基準映像の画素位置ごとに、前記隣接映像画素差分値の最大差分値と最小差分値との差が、予め定めた閾値よりも小さい場合は、前記隣接映像画素差分値の平均値である平均差分値を選択し、前記閾値よりも大きい場合は、前記隣接映像画素差分値の最小差分値を選択して、選択差分値として決定する差分値決定ステップと、
この差分値決定ステップで決定した選択差分値を、前記仮定奥行値と前記基準映像の画素位置とに対応付けて記憶手段に記憶する記憶ステップと、
奥行値決定手段により、前記画素位置ごとに、前記選択差分値が最小となる前記仮定奥行値を前記記憶手段において探索し、当該画素位置の奥行値とする奥行値決定ステップと、
を含むことを特徴とする奥行推定方法。
A depth estimation method for estimating a depth value indicating the depth of a subject from a plurality of camera images obtained by photographing the same subject with a plurality of cameras arranged in a predetermined position,
Video input of a reference image obtained by photographing the subject with a predetermined reference camera and a plurality of adjacent images obtained by photographing the subject with a plurality of adjacent cameras adjacent to the reference camera in any of the plurality of cameras arranged in the plurality A video input step for inputting by means;
For each of a plurality of assumed depth values, a difference absolute value between a pixel value of each pixel of the reference image and a pixel value of each pixel of the plurality of adjacent images that is a pixel corresponding to the parallax of the assumed depth value of the pixel. A corresponding pixel difference calculation step for calculating the adjacent video pixel difference value by the corresponding pixel difference calculation means;
When a difference between the maximum difference value and the minimum difference value of the adjacent image pixel difference values is smaller than a predetermined threshold for each of the plurality of assumed depth values and the pixel position of the reference image by the difference value determination unit. A difference value that selects an average difference value that is an average value of the adjacent video pixel difference values and, when larger than the threshold, selects a minimum difference value of the adjacent video pixel difference values and determines it as a selection difference value A decision step;
A storage step of storing the selected difference value determined in the difference value determination step in a storage unit in association with the assumed depth value and the pixel position of the reference image;
A depth value determining step by searching the storage means for the assumed depth value at which the selection difference value is minimum for each pixel position by the depth value determining means, and setting the depth value at the pixel position;
The depth estimation method characterized by including.
予め定めた位置に複数配列したカメラで同一の被写体を撮影した複数のカメラ映像から、前記被写体の奥行きを示す奥行値を推定する奥行推定方法であって、
前記複数配列した前記カメラのいずれかにおいて、予め定めた基準カメラで前記被写体を撮影した基準映像と、前記基準カメラに隣接する複数の隣接カメラで前記被写体を撮影した複数の隣接映像とを映像入力手段により入力する映像入力ステップと、
複数の仮定奥行値ごとに、前記基準映像の各画素の画素値と、当該画素の前記仮定奥行値の視差に対応する画素である前記複数の隣接映像の各画素の画素値との差分絶対値である隣接映像画素差分値を対応画素差分演算手段により演算する対応画素差分演算ステップと、
差分値決定手段により、前記複数の仮定奥行値および前記基準映像の画素位置ごとに、前記隣接映像画素差分値の最大差分値と最小差分値との比が、予め定めた閾値の範囲内の場合は、前記隣接映像画素差分値の平均値である平均差分値を選択し、前記範囲外の場合は、前記隣接映像画素差分値の最小差分値を選択して、選択差分値として決定する差分値決定ステップと、
この差分値決定ステップで決定した選択差分値を、前記仮定奥行値と前記基準映像の画素位置とに対応付けて記憶手段に記憶する記憶ステップと、
奥行値決定手段により、前記画素位置ごとに、前記選択差分値が最小となる前記仮定奥行値を前記記憶手段において探索し、当該画素位置の奥行値とする奥行値決定ステップと、
を含むことを特徴とする奥行推定方法。
A depth estimation method for estimating a depth value indicating the depth of a subject from a plurality of camera images obtained by photographing the same subject with a plurality of cameras arranged in a predetermined position,
Video input of a reference image obtained by photographing the subject with a predetermined reference camera and a plurality of adjacent images obtained by photographing the subject with a plurality of adjacent cameras adjacent to the reference camera in any of the plurality of cameras arranged in the plurality A video input step for inputting by means;
For each of a plurality of assumed depth values, a difference absolute value between a pixel value of each pixel of the reference image and a pixel value of each pixel of the plurality of adjacent images that is a pixel corresponding to the parallax of the assumed depth value of the pixel. A corresponding pixel difference calculation step for calculating the adjacent video pixel difference value by the corresponding pixel difference calculation means;
When the difference value determining means determines that the ratio between the maximum difference value and the minimum difference value of the adjacent image pixel difference values is within a predetermined threshold range for each of the plurality of assumed depth values and the pixel position of the reference image. Selects an average difference value, which is an average value of the adjacent video pixel difference values, and, if out of the range, selects a minimum difference value of the adjacent video pixel difference values and determines the selected difference value as a difference value A decision step;
A storage step of storing the selected difference value determined in the difference value determination step in a storage unit in association with the assumed depth value and the pixel position of the reference image;
A depth value determining step by searching the storage means for the assumed depth value at which the selection difference value is minimum for each pixel position by the depth value determining means, and setting the depth value at the pixel position;
The depth estimation method characterized by including.
予め定めた位置に複数配列したカメラで同一の被写体を撮影した複数のカメラ映像から、前記被写体の奥行きを示す奥行値を推定するために、コンピュータを、
前記複数配列した前記カメラのいずれかにおいて、予め定めた基準カメラで前記被写体を撮影した基準映像と、前記基準カメラに隣接する複数の隣接カメラで前記被写体を撮影した複数の隣接映像とを入力する映像入力手段、
複数の仮定奥行値ごとに、前記基準映像の各画素の画素値と、当該画素の前記仮定奥行値の視差に対応する画素である前記複数の隣接映像の各画素の画素値との差分絶対値である隣接映像画素差分値を演算する対応画素差分演算手段、
前記複数の仮定奥行値および前記基準映像の画素位置ごとに、前記隣接映像画素差分値の最大差分値と最小差分値との差が、予め定めた閾値よりも小さい場合は、前記隣接映像画素差分値の平均値である平均差分値を選択し、前記閾値よりも大きい場合は、前記隣接映像画素差分値の最小差分値を選択して、選択差分値として決定し、前記仮定奥行値と前記基準映像の画素位置とに対応付けて記憶手段に書き込む差分値決定手段、
前記画素位置ごとに、前記選択差分値が最小となる前記仮定奥行値を前記記憶手段において探索し、当該画素位置の奥行値とする奥行値決定手段、
として機能させることを特徴とする奥行推定プログラム。
In order to estimate a depth value indicating the depth of the subject from a plurality of camera images obtained by photographing the same subject with a plurality of cameras arranged at predetermined positions, a computer is provided.
In any of the plurality of cameras arranged in the plurality, a reference image obtained by photographing the subject with a predetermined reference camera and a plurality of adjacent images obtained by photographing the subject with a plurality of adjacent cameras adjacent to the reference camera are input. Video input means,
For each of a plurality of assumed depth values, a difference absolute value between a pixel value of each pixel of the reference image and a pixel value of each pixel of the plurality of adjacent images that is a pixel corresponding to the parallax of the assumed depth value of the pixel. Corresponding pixel difference calculation means for calculating the adjacent video pixel difference value,
When the difference between the maximum difference value and the minimum difference value of the adjacent video pixel difference value is smaller than a predetermined threshold for each of the plurality of assumed depth values and the pixel position of the reference video, the adjacent video pixel difference An average difference value that is an average value of values is selected, and if it is greater than the threshold value, a minimum difference value of the adjacent video pixel difference value is selected and determined as a selection difference value, and the assumed depth value and the reference Difference value determining means for writing to the storage means in association with the pixel position of the video,
A depth value determining unit that searches the storage unit for the assumed depth value that minimizes the selection difference value for each pixel position, and sets the depth value of the pixel position as a depth value.
Depth estimation program characterized by functioning as
予め定めた位置に複数配列したカメラで同一の被写体を撮影した複数のカメラ映像から、前記被写体の奥行きを示す奥行値を推定するために、コンピュータを、
前記複数配列した前記カメラのいずれかにおいて、予め定めた基準カメラで前記被写体を撮影した基準映像と、前記基準カメラに隣接する複数の隣接カメラで前記被写体を撮影した複数の隣接映像とを入力する映像入力手段、
複数の仮定奥行値ごとに、前記基準映像の各画素の画素値と、当該画素の前記仮定奥行値の視差に対応する画素である前記複数の隣接映像の各画素の画素値との差分絶対値である隣接映像画素差分値を演算する対応画素差分演算手段、
前記複数の仮定奥行値および前記基準映像の画素位置ごとに、前記隣接映像画素差分値の最大差分値と最小差分値との比が、予め定めた閾値の範囲内の場合は、前記隣接映像画素差分値の平均値である平均差分値を選択し、前記範囲外の場合は、前記隣接映像画素差分値の最小差分値を選択して、選択差分値として決定し、前記仮定奥行値と前記基準映像の画素位置とに対応付けて記憶手段に書き込む差分値決定手段、
前記画素位置ごとに、前記選択差分値が最小となる前記仮定奥行値を前記記憶手段において探索し、当該画素位置の奥行値とする奥行値決定手段、
として機能させることを特徴とする奥行推定プログラム。
In order to estimate a depth value indicating the depth of the subject from a plurality of camera images obtained by photographing the same subject with a plurality of cameras arranged at predetermined positions, a computer is provided.
In any of the plurality of cameras arranged in the plurality, a reference image obtained by photographing the subject with a predetermined reference camera and a plurality of adjacent images obtained by photographing the subject with a plurality of adjacent cameras adjacent to the reference camera are input. Video input means,
For each of a plurality of assumed depth values, a difference absolute value between a pixel value of each pixel of the reference image and a pixel value of each pixel of the plurality of adjacent images that is a pixel corresponding to the parallax of the assumed depth value of the pixel. Corresponding pixel difference calculation means for calculating the adjacent video pixel difference value,
If the ratio between the maximum difference value and the minimum difference value of the adjacent video pixel difference values is within a predetermined threshold range for each of the plurality of assumed depth values and the pixel position of the reference video, the adjacent video pixels An average difference value that is an average value of difference values is selected, and if it is out of the range, a minimum difference value of the adjacent video pixel difference value is selected and determined as a selected difference value, and the assumed depth value and the reference Difference value determining means for writing to the storage means in association with the pixel position of the video,
A depth value determining unit that searches the storage unit for the assumed depth value that minimizes the selection difference value for each pixel position, and sets the depth value of the pixel position as a depth value.
Depth estimation program characterized by functioning as
JP2010001646A 2010-01-07 2010-01-07 Device, method and program for estimating depth Pending JP2011141710A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010001646A JP2011141710A (en) 2010-01-07 2010-01-07 Device, method and program for estimating depth

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010001646A JP2011141710A (en) 2010-01-07 2010-01-07 Device, method and program for estimating depth

Publications (1)

Publication Number Publication Date
JP2011141710A true JP2011141710A (en) 2011-07-21

Family

ID=44457505

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010001646A Pending JP2011141710A (en) 2010-01-07 2010-01-07 Device, method and program for estimating depth

Country Status (1)

Country Link
JP (1) JP2011141710A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013076621A (en) * 2011-09-30 2013-04-25 Nippon Hoso Kyokai <Nhk> Distance index information estimation device and program thereof
WO2014049894A1 (en) * 2012-09-25 2014-04-03 パナソニック株式会社 Image signal processing device and image signal processing method
CN104350749A (en) * 2012-06-13 2015-02-11 高通股份有限公司 Derivation of depth map estimate
WO2016129430A1 (en) * 2015-02-09 2016-08-18 国立研究開発法人情報通信研究機構 Depth estimation device, depth estimation method, and depth estimation program
JP2016531470A (en) * 2013-07-09 2016-10-06 リミテッド ライアビリティ カンパニー “3ディー ティーヴイ テクニックス” TV multi-angle method for acquisition, transmission and reception of stereo information about viewing location, and its automatic measurement of eye-point system
CN108061515A (en) * 2016-11-09 2018-05-22 株式会社三丰 Phase offset interferometer
JP2018534699A (en) * 2015-11-20 2018-11-22 クゥアルコム・インコーポレイテッドQualcomm Incorporated System and method for correcting erroneous depth information
JP2020197493A (en) * 2019-06-05 2020-12-10 公益財団法人かずさDna研究所 Three-dimensional measurement device using image, three-dimensional measurement method using image, and three-dimensional measurement program using image

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013076621A (en) * 2011-09-30 2013-04-25 Nippon Hoso Kyokai <Nhk> Distance index information estimation device and program thereof
CN104350749A (en) * 2012-06-13 2015-02-11 高通股份有限公司 Derivation of depth map estimate
WO2014049894A1 (en) * 2012-09-25 2014-04-03 パナソニック株式会社 Image signal processing device and image signal processing method
JP5830705B2 (en) * 2012-09-25 2015-12-09 パナソニックIpマネジメント株式会社 Image signal processing apparatus and image signal processing method
JP2016531470A (en) * 2013-07-09 2016-10-06 リミテッド ライアビリティ カンパニー “3ディー ティーヴイ テクニックス” TV multi-angle method for acquisition, transmission and reception of stereo information about viewing location, and its automatic measurement of eye-point system
WO2016129430A1 (en) * 2015-02-09 2016-08-18 国立研究開発法人情報通信研究機構 Depth estimation device, depth estimation method, and depth estimation program
JP2018534699A (en) * 2015-11-20 2018-11-22 クゥアルコム・インコーポレイテッドQualcomm Incorporated System and method for correcting erroneous depth information
CN108061515A (en) * 2016-11-09 2018-05-22 株式会社三丰 Phase offset interferometer
CN108061515B (en) * 2016-11-09 2021-04-27 株式会社三丰 Phase shift interferometer
JP2020197493A (en) * 2019-06-05 2020-12-10 公益財団法人かずさDna研究所 Three-dimensional measurement device using image, three-dimensional measurement method using image, and three-dimensional measurement program using image
JP7229102B2 (en) 2019-06-05 2023-02-27 公益財団法人かずさDna研究所 Three-dimensional measurement device using images, three-dimensional measurement method using images, and three-dimensional measurement program using images

Similar Documents

Publication Publication Date Title
JP2011141710A (en) Device, method and program for estimating depth
US20100142828A1 (en) Image matching apparatus and method
JP5153940B2 (en) System and method for image depth extraction using motion compensation
US9100537B2 (en) Object tracking using graphics engine derived vectors in a motion estimation system
US9445071B2 (en) Method and apparatus generating multi-view images for three-dimensional display
CA2726208C (en) System and method for depth extraction of images with forward and backward depth prediction
EP2389007A2 (en) Method and apparatus for temporally interpolating three-dimensional depth image
TWI493505B (en) Image processing method and image processing apparatus thereof
JP2004005596A (en) Method and system for three dimentionally recovering multiple views in varying search route and occlusion modeling
JP6173218B2 (en) Multi-view rendering apparatus and method using background pixel expansion and background-first patch matching
US10142613B2 (en) Image processing apparatus, image processing system, and image processing method
JP5476264B2 (en) Camera tracking device and program thereof
KR101918030B1 (en) Method and apparatus for rendering hybrid multi-view
WO2013054632A1 (en) Image processing device, image processing unit, and program
JP5252642B2 (en) Depth estimation apparatus, depth estimation method, and depth estimation program
JP7233150B2 (en) Depth estimation device and its program
KR20140074238A (en) Method and apparatus for color transfer between images
JP5931062B2 (en) Stereoscopic image processing apparatus, stereoscopic image processing method, and program
JP5565839B2 (en) Depth estimation apparatus, depth estimation method, and depth estimation program
JP2017515372A (en) Motion field estimation
JP5478533B2 (en) Omnidirectional image generation method, image generation apparatus, and program
JP2011221932A (en) Depth estimation device, depth estimation method and depth estimation program
JP4775221B2 (en) Image processing apparatus, image processing apparatus control method, and image processing apparatus control program
Shigwan et al. Objective image quality assessment using perceptual distortion for image retargeting
JP2017005480A (en) Stereoscopic video processing device, stereoscopic video processing method, stereoscopic video processing program, and recording medium