JP6687496B2 - Parallax detection device - Google Patents

Parallax detection device Download PDF

Info

Publication number
JP6687496B2
JP6687496B2 JP2016204300A JP2016204300A JP6687496B2 JP 6687496 B2 JP6687496 B2 JP 6687496B2 JP 2016204300 A JP2016204300 A JP 2016204300A JP 2016204300 A JP2016204300 A JP 2016204300A JP 6687496 B2 JP6687496 B2 JP 6687496B2
Authority
JP
Japan
Prior art keywords
image
captured
frequency characteristic
motion vector
images
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016204300A
Other languages
Japanese (ja)
Other versions
JP2018066604A (en
Inventor
和寿 石丸
和寿 石丸
ホセイン テヘラニニキネジャド
ホセイン テヘラニニキネジャド
白井 孝昌
孝昌 白井
ユーチュエン シュー
ユーチュエン シュー
誠一 三田
誠一 三田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyota School Foundation
Denso Corp
Original Assignee
Toyota School Foundation
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyota School Foundation, Denso Corp filed Critical Toyota School Foundation
Priority to JP2016204300A priority Critical patent/JP6687496B2/en
Publication of JP2018066604A publication Critical patent/JP2018066604A/en
Application granted granted Critical
Publication of JP6687496B2 publication Critical patent/JP6687496B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)
  • Measurement Of Optical Distance (AREA)
  • Image Processing (AREA)

Description

本開示は、互いに異なる視点から撮影された複数の画像を用いて視差を検出する視差検出装置に関する。   The present disclosure relates to a parallax detection device that detects parallax using a plurality of images captured from different viewpoints.

特許文献1には、互いに平行に隣接して配置された第1撮影装置と第2撮影装置のそれぞれから第1画像と第2画像を取得し、第1画像と第2画像との間の視差を検出することにより、第1撮影装置および第2撮影装置が撮影した物体までの距離を測定する測距装置が記載されている。   In Patent Document 1, a first image and a second image are acquired from each of a first imaging device and a second imaging device that are arranged in parallel and adjacent to each other, and the parallax between the first image and the second image is acquired. There is disclosed a distance measuring device that detects a distance to an object photographed by the first photographing device and the second photographing device.

特許文献1に記載の測距装置では、第1画像と第2画像のうち、ぼけの強い方の画像のぼけを、ぼけの弱い方の画像のぼけに合わせることにより、第1画像と第2画像のぼけを補正し、視差検出の精度を向上させている。   In the distance measuring device described in Patent Document 1, the first image and the second image are adjusted by adjusting the blur of the image with stronger blur between the first image and the second image to the blur of the image with weak blur. The blur of the image is corrected to improve the accuracy of parallax detection.

特開2012−26841号公報JP, 2012-26841, A

しかし、特許文献1に記載の技術は、撮影装置のレンズに起因したぼけを補正するものであり、例えば撮影装置が車両に搭載されて高速で移動していることに起因して撮影画像に生じる動きぼけを補正することができない。   However, the technique described in Patent Document 1 corrects blurring caused by the lens of the image capturing apparatus, and occurs in a captured image due to, for example, the image capturing apparatus mounted on a vehicle and moving at high speed. Motion blur cannot be corrected.

本開示は、動きぼけを抑制する技術を提供することを目的とする。   The present disclosure aims to provide a technique for suppressing motion blur.

本開示の一態様は、画像取得部(S10)と、ベクトル設定部(S30)と、画像生成部(S40〜S70)と、視差検出部(S80)とを備える視差検出装置(5)である。
画像取得部は、互いに異なる視点から同一の撮影領域を含むように同時に撮影された複数の撮影画像を取得するように構成される。
One aspect of the present disclosure is a parallax detection device (5) including an image acquisition unit (S10), a vector setting unit (S30), an image generation unit (S40 to S70), and a parallax detection unit (S80). .
The image acquisition unit is configured to acquire a plurality of photographed images simultaneously photographed so as to include the same photographing region from different viewpoints.

ベクトル設定部は、複数の撮影画像のそれぞれについて、撮影画像を、複数の画素で構成された部分領域に分割し、分割された複数の部分領域毎に、部分領域内に写っている物体が撮影画像内で移動する大きさと方向とを示す動きベクトルを設定するように構成される。   The vector setting unit divides each of the plurality of captured images into a partial area composed of a plurality of pixels, and the object captured in the partial area is captured for each of the plurality of divided partial areas. It is configured to set a motion vector indicating the magnitude and direction of movement within the image.

画像生成部は、複数の撮影画像のそれぞれについて、少なくとも、撮影画像の周波数特性を示す画像周波数特性を、撮影画像に設定された動きベクトルの周波数特性を示すベクトル周波数特性で除算した演算を行い、更に、この演算結果の周波数特性に対応する画像である演算後画像を生成するように構成される。   The image generation unit performs, on each of the plurality of captured images, at least an image frequency characteristic indicating the frequency characteristic of the captured image divided by a vector frequency characteristic indicating the frequency characteristic of the motion vector set in the captured image, Further, it is configured to generate a post-computation image which is an image corresponding to the frequency characteristic of the computation result.

視差検出部は、複数の撮影画像のそれぞれに対応して画像生成部により生成された複数の演算後画像を用いて、複数の演算後画像間の視差を検出するように構成される。
このように構成された本開示の視差検出装置は、上記の画像周波数特性を上記のベクトル周波数特性で除算した演算を行うことにより、上記の動きベクトルの大きさと方向に応じた動きぼけを抑制することができる。そして、上記の動きベクトルは、部分領域内に写っている物体が撮影画像内で移動する大きさと方向とを示す。このため、本開示の視差検出装置は、撮影画像内に写っている物体が撮影画像内で移動することに起因して撮影画像に生じる動きぼけを抑制することができ、視差検出の精度を向上させることができる。
The parallax detection unit is configured to detect parallax between the plurality of post-computation images using the plurality of post-computation images generated by the image generation unit corresponding to each of the plurality of captured images.
The parallax detection device of the present disclosure configured in this manner suppresses motion blur according to the magnitude and direction of the motion vector by performing an operation in which the image frequency property is divided by the vector frequency property. be able to. The motion vector indicates the size and direction of movement of the object in the partial area in the captured image. Therefore, the parallax detection device of the present disclosure can suppress the motion blur that occurs in the captured image due to the movement of the object captured in the captured image in the captured image, and improves the accuracy of parallax detection. Can be made.

なお、この欄及び特許請求の範囲に記載した括弧内の符号は、一つの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、本開示の技術的範囲を限定するものではない。   In addition, the reference numerals in parentheses described in this column and the claims indicate the correspondence with the specific means described in the embodiments described below as one aspect, and the technical scope of the present disclosure. It is not limited.

測距装置1の構成を示すブロック図である。It is a block diagram showing a configuration of a distance measuring device 1. 距離測定処理を示すフローチャートである。It is a flow chart which shows distance measurement processing. 部分領域DRと処理領域PRを説明する図である。It is a figure explaining partial area DR and processing area PR. 撮影画像PG上に動きベクトルfを設定した具体例を示す図である。It is a figure which shows the specific example which set the motion vector f on the picked-up image PG. 三角窓関数wと処理領域PRとの対応関係を示す図である。It is a figure which shows the correspondence of the triangular window function w and the process area PR. 処理領域PR2内の画素PX2と処理領域PR3内の画素PX3との対応関係を示す図である。It is a figure which shows the correspondence of the pixel PX2 in the processing area PR2, and the pixel PX3 in the processing area PR3. 視差算出処理を示すフローチャートである。It is a flowchart which shows a parallax calculation process. 節点NPを配置する方法を説明する図である。It is a figure explaining the method of arranging the node NP. 節点空間NPSの斜視図である。It is a perspective view of node space NPS. X−Z平面を示す斜視図である。It is a perspective view which shows an XZ plane. Y−Z平面を示す斜視図である。It is a perspective view which shows a YZ plane. 右斜め平面を示す斜視図である。It is a perspective view which shows a right diagonal plane. 左斜め平面を示す斜視図である。It is a perspective view which shows a left diagonal plane. 測距装置1の距離測定結果を説明する図である。It is a figure explaining the distance measurement result of the ranging device 1.

以下に本開示の実施形態を図面とともに説明する。
本実施形態の測距装置1は、車両に搭載され、図1に示すように、右撮像装置2と、左撮像装置3と、車速センサ4と、画像処理装置5とを備える。以下、測距装置1が搭載された車両を自車両という。
Embodiments of the present disclosure will be described below with reference to the drawings.
The distance measuring device 1 of the present embodiment is mounted on a vehicle and includes a right image pickup device 2, a left image pickup device 3, a vehicle speed sensor 4, and an image processing device 5, as shown in FIG. Hereinafter, the vehicle in which the distance measuring device 1 is mounted is referred to as the own vehicle.

右撮像装置2と左撮像装置3は、自車両前方の風景を連続して撮影し、その撮影画像を示す画像データを画像処理装置5へ出力する。右撮像装置2と左撮像装置3はそれぞれ、自車両の進行方向に対して右側と左側に設置される。以下、右撮像装置2の画像データを右画像データ、左撮像装置3の画像データを左画像データという。   The right image pickup device 2 and the left image pickup device 3 continuously photograph a landscape in front of the own vehicle and output image data representing the photographed images to the image processing device 5. The right imaging device 2 and the left imaging device 3 are installed on the right side and the left side with respect to the traveling direction of the host vehicle, respectively. Hereinafter, the image data of the right imaging device 2 will be referred to as right image data, and the image data of the left imaging device 3 will be referred to as left image data.

右撮像装置2と左撮像装置3は、平行等位に配置される。具体的には、右撮像装置2と左撮像装置3は、右撮像装置2の光軸と左撮像装置3の光軸とが平行になるように配置される。これにより、右撮像装置2の撮像面と左撮像装置3の撮像面が同一平面上に配置される。さらに、右撮像装置2と左撮像装置3は、右撮像装置2の撮像面の横軸と左撮像装置3の撮像面の横軸とが一致するように、水平方向に沿って予め設定された基線長だけ離れて配置される。撮像面の横軸は、撮像面上において撮像面と光軸との交点を原点とした二次元直交座標系のX軸およびY軸のうちのX軸である。   The right image pickup device 2 and the left image pickup device 3 are arranged in parallel and equidistant positions. Specifically, the right imaging device 2 and the left imaging device 3 are arranged such that the optical axis of the right imaging device 2 and the optical axis of the left imaging device 3 are parallel to each other. As a result, the imaging surface of the right imaging device 2 and the imaging surface of the left imaging device 3 are arranged on the same plane. Furthermore, the right image pickup device 2 and the left image pickup device 3 are set in advance along the horizontal direction so that the horizontal axis of the image pickup surface of the right image pickup device 2 and the horizontal axis of the image pickup surface of the left image pickup device 3 coincide with each other. They are placed apart by the baseline length. The horizontal axis of the image pickup surface is the X axis of the X axis and the Y axis of the two-dimensional orthogonal coordinate system whose origin is the intersection of the image pickup surface and the optical axis on the image pickup surface.

車速センサ4は、自車両の走行速度(以下、車速)を検出し、その検出結果を示す車速信号を画像処理装置5へ出力する。
画像処理装置5は、CPU、ROM、RAM、I/O及びこれらの構成を接続するバスラインなどからなる周知のマイクロコンピュータを中心に構成される。マイクロコンピュータの各種機能は、CPUが非遷移的実体的記録媒体に格納されたプログラムを実行することにより実現される。この例では、ROMが、プログラムを格納した非遷移的実体的記録媒体に該当する。また、このプログラムの実行により、プログラムに対応する方法が実行される。なお、CPUが実行する機能の一部または全部を、一つあるいは複数のIC等によりハードウェア的に構成してもよい。また、画像処理装置5を構成するマイクロコンピュータの数は1つでも複数でもよい。
The vehicle speed sensor 4 detects the traveling speed of the host vehicle (hereinafter, vehicle speed) and outputs a vehicle speed signal indicating the detection result to the image processing device 5.
The image processing device 5 mainly includes a well-known microcomputer including a CPU, a ROM, a RAM, an I / O, and a bus line connecting these components. Various functions of the microcomputer are realized by the CPU executing the programs stored in the non-transitional substantive recording medium. In this example, the ROM corresponds to the non-transitional substantive recording medium storing the program. Further, by executing this program, the method corresponding to the program is executed. It should be noted that some or all of the functions executed by the CPU may be configured as hardware by one or more ICs or the like. Further, the number of microcomputers forming the image processing apparatus 5 may be one or plural.

このように構成された測距装置1において、画像処理装置5は、距離測定処理を実行する。この距離測定処理は、画像処理装置5の動作中において繰り返し実行される処理である。   In the distance measuring device 1 configured in this way, the image processing device 5 executes the distance measuring process. This distance measurement process is a process that is repeatedly executed during the operation of the image processing device 5.

この距離測定処理が実行されると、画像処理装置5は、図2に示すように、まずS10にて、右撮像装置2から右画像データを取得するとともに、左撮像装置3から左画像データを取得する。そしてS20にて、S10で取得した右画像データが示す右撮影画像と、S10で取得した左撮像データが示す左撮影画像との間の垂直方向のずれを補正し、右撮影画像と左撮影画像を互いに平行化する。具体的には、右撮影画像と左撮影画像との間で互いに対応関係にある画像領域(例えば、画素)の高さが一致するように、予め設定された補正パラメータに従って画素全体の垂直方向の座標を変換し、垂直方向のずれを補正する。   When this distance measuring process is executed, the image processing device 5 first acquires the right image data from the right imaging device 2 and acquires the left image data from the left imaging device 3 in S10, as shown in FIG. get. Then, in S20, the vertical shift between the right captured image represented by the right image data acquired in S10 and the left captured image represented by the left captured data acquired in S10 is corrected to correct the right captured image and the left captured image. Parallelize each other. Specifically, in order that the heights of the image areas (for example, pixels) that are in a corresponding relationship between the right captured image and the left captured image match each other, the vertical direction of all the pixels is adjusted according to a preset correction parameter. Convert coordinates and correct vertical displacement.

次にS30にて、右撮影画像および左撮影画像のそれぞれについて動きベクトルを設定する。以下、右撮影画像および左撮影画像をまとめて撮影画像という。具体的には、図3に示すように、まず、撮影画像PGを、X軸方向にm画素(mは正の整数)でY軸方向にn画素(nは正の整数)の矩形状の部分領域DRに分割する。本実施形態では、撮影画像PGは、例えば、X軸方向に沿って80個の部分領域DRが存在し、Y軸方向に沿って80個の部分領域DRが存在するように分割される。   Next, in S30, a motion vector is set for each of the right captured image and the left captured image. Hereinafter, the right captured image and the left captured image are collectively referred to as a captured image. Specifically, as shown in FIG. 3, first, the photographed image PG is formed into a rectangular shape having m pixels (m is a positive integer) in the X-axis direction and n pixels (n is a positive integer) in the Y-axis direction. Divide into partial regions DR. In the present embodiment, the captured image PG is divided so that, for example, there are 80 partial regions DR along the X-axis direction and 80 partial regions DR along the Y-axis direction.

そして、複数の部分領域DRのそれぞれについて、車速センサ4が検出した車速vと、画像処理装置5のROMに予め記憶されている動きベクトル設定マップとに基づいて、動きベクトルfを設定する。   Then, for each of the plurality of partial regions DR, the motion vector f is set based on the vehicle speed v detected by the vehicle speed sensor 4 and the motion vector setting map stored in advance in the ROM of the image processing device 5.

なお、動きベクトルfは、下式(1)で表される。なお、下式(1)のdは焦点距離、sは物体と撮像装置との相対速度、zは物体と撮像装置との距離である。
f = d×s/z ・・・(1)
動きベクトル設定マップは、撮影画像PG内における部分領域DRの位置と、車速センサ4が検出した車速vと、動きベクトルfの大きさおよび方向との対応関係を示す。
The motion vector f is expressed by the following equation (1). In the following equation (1), d is the focal length, s is the relative speed between the object and the imaging device, and z is the distance between the object and the imaging device.
f = d × s / z (1)
The motion vector setting map indicates the correspondence relationship between the position of the partial region DR in the captured image PG, the vehicle speed v detected by the vehicle speed sensor 4, and the magnitude and direction of the motion vector f.

次に、動きベクトル設定マップの作成方法を説明する。
自車両が車速vで直進していると仮定して動きベクトルfを計算する。まず、撮影画像上の座標x=(x1,y1)において、自車両を原点とした実空間上の三次元座標X=(X1,Y1,Z1)に位置する静止物が写っているとする。この場合に、撮影画像上の座標と実空間上の三次元点とを対応付けるカメラパラメータをPとして、x=PXが成り立つ。
Next, a method of creating the motion vector setting map will be described.
The motion vector f is calculated assuming that the host vehicle is traveling straight at the vehicle speed v. First, at a coordinate x = (x1, y1) on the captured image, it is assumed that a stationary object located at a three-dimensional coordinate X = (X1, Y1, Z1) in the real space with the vehicle as the origin is captured. In this case, x = PX is established, where P is the camera parameter that associates the coordinates on the captured image with the three-dimensional points in the real space.

自車両が車速vで直進しているため、予め設定されたベクトル算出用設定時間Δtが経過した後における上記の静止物の自車両を原点とした実空間上の三次元座標X’=(X2,Y2,Z2)は算出可能である。このため、予め設定されたベクトル算出用設定時間Δtが経過した後における上記静止物の撮影画像上の座標x’=(x2,y2)は、x’=PX’により算出することができる。そして、動きベクトルfは、(f=x’−x)により算出される。   Since the host vehicle is traveling straight at the vehicle speed v, three-dimensional coordinates X ′ = (X2 in the real space with the host vehicle as the origin after the preset vector calculation set time Δt has elapsed. , Y2, Z2) can be calculated. Therefore, the coordinates x ′ = (x2, y2) on the captured image of the stationary object after the preset vector calculation setting time Δt has elapsed can be calculated by x ′ = PX ′. Then, the motion vector f is calculated by (f = x'-x).

このようにした動きベクトルfの算出を、撮影画像PG内の全ての画素について実行する。そして、全ての部分領域DRのそれぞれについて、部分領域DRに含まれる画素の動きベクトルfの平均を算出し、この平均化した動きベクトルfを、部分領域DRの動きベクトルfとして決定する。   The calculation of the motion vector f in this way is executed for all the pixels in the captured image PG. Then, for each of all the partial regions DR, the average of the motion vector f of the pixels included in the partial region DR is calculated, and the averaged motion vector f is determined as the motion vector f of the partial region DR.

そして、このようにした部分領域DRの動きベクトルfの設定を複数の車速vで実行することにより、動きベクトル設定マップが作成される。なお、動きベクトル設定マップ内に記述されていない車速での動きベクトルfについては、動きベクトル設定マップに記述されている車速の動きベクトルfを用いた線形補間により算出することができる。   Then, the motion vector setting map is created by executing the setting of the motion vector f of the partial region DR as described above at a plurality of vehicle speeds v. The motion vector f at a vehicle speed not described in the motion vector setting map can be calculated by linear interpolation using the motion vector f at the vehicle speed described in the motion vector setting map.

撮影画像上に動きベクトルfを設定した具体例を図4に示す。図4に示す撮影画像PG上には、動きベクトルfとして多数の白色の矢印が設定されている。
そして、S30の処理が終了すると、図2に示すように、S40にて、撮影画像上に、複数の処理領域PRを設定する。図3に示すように、処理領域PRは、X軸方向に2×m画素でY軸方向にn画素(nは正の整数)の矩形状の領域である。すなわち、処理領域PRは、X軸方向に2つ並べた部分領域DRを備える。そして、撮影画像上に設定される複数の処理領域PRはそれぞれ、少なくとも1つの部分領域DRが他の処理領域PRと異なるように設定される。
FIG. 4 shows a specific example in which the motion vector f is set on the captured image. A large number of white arrows are set as the motion vector f on the captured image PG shown in FIG.
Then, when the process of S30 is completed, as shown in FIG. 2, in S40, a plurality of processing regions PR are set on the captured image. As shown in FIG. 3, the processing region PR is a rectangular region having 2 × m pixels in the X-axis direction and n pixels (n is a positive integer) in the Y-axis direction. That is, the processing region PR includes two partial regions DR arranged in the X-axis direction. Then, each of the plurality of processing regions PR set on the captured image is set such that at least one partial region DR is different from the other processing regions PR.

例えば、図3に示す撮影画像PGでは、最も上の行に設定されている部分領域DRを左から順に、部分領域DR1、部分領域DR2、部分領域DR3、部分領域DR4、部分領域DR5、部分領域DR6、・・・・・とする。また、最も上の行に設定されている処理領域PRを左から順に、処理領域PR1、処理領域PR2、処理領域PR3、処理領域PR4、処理領域PR5、・・・・・とする。   For example, in the captured image PG shown in FIG. 3, the partial regions DR set in the uppermost row are sequentially arranged from the left in the order of partial region DR1, partial region DR2, partial region DR3, partial region DR4, partial region DR5, and partial region. DR6 ... Further, the processing regions PR set in the uppermost row are referred to as a processing region PR1, a processing region PR2, a processing region PR3, a processing region PR4, a processing region PR5, ...

この場合に、処理領域PR1は、部分領域DR1と部分領域DR2とを備える。処理領域PR2は、部分領域DR2と部分領域DR3とを備える。処理領域PR3は、部分領域DR3と部分領域DR4とを備える。処理領域PR4は、部分領域DR4と部分領域DR5とを備える。処理領域PR5は、部分領域DR5と部分領域DR6とを備える。   In this case, the processing area PR1 includes a partial area DR1 and a partial area DR2. The processing region PR2 includes a partial region DR2 and a partial region DR3. The processing region PR3 includes a partial region DR3 and a partial region DR4. The processing region PR4 includes a partial region DR4 and a partial region DR5. The processing area PR5 includes a partial area DR5 and a partial area DR6.

そして、S40の処理が終了すると、図2に示すように、S50にて、右撮影画像および左撮影画像の全ての処理領域PRについて、処理領域PR内の画像の動きぼけを除去するフィルタ処理を行う。具体的には、まず、全ての処理領域PRのそれぞれについて、下式(2),(3),(4),(5)で示すフーリエ変換を実行する。下式(2)〜(5)のfftは、フーリエ変換を示す。   Then, when the process of S40 ends, as shown in FIG. 2, in S50, a filter process for removing motion blur of the images in the processing region PR is performed for all the processing regions PR of the right captured image and the left captured image. To do. Specifically, first, the Fourier transform represented by the following equations (2), (3), (4), and (5) is executed for each of all the processing regions PR. Fft in the following equations (2) to (5) indicates Fourier transform.

下式(2)は、処理領域PRにおける輝度Iの二次元分布に対するフーリエ変換により、輝度Iの周波数特性Lを算出することを示す。下式(3)は、処理領域PRにおける動きベクトルfの二次元分布に対するフーリエ変換により、動きベクトルfの周波数特性Fを算出することを示す。   The following expression (2) indicates that the frequency characteristic L of the brightness I is calculated by Fourier transforming the two-dimensional distribution of the brightness I in the processing region PR. The following Expression (3) indicates that the frequency characteristic F of the motion vector f is calculated by Fourier transform of the two-dimensional distribution of the motion vector f in the processing region PR.

下式(4)は、X軸方向の微分演算子fxに対するフーリエ変換により、微分演算子fxの周波数特性Fxを算出することを示す。微分演算子fxは、下式(6)で定義される。下式(5)は、Y軸方向の微分演算子fyに対するフーリエ変換により、微分演算子fyの周波数特性Fyを算出することを示す。微分演算子fyは、下式(7)で定義される。   The following formula (4) indicates that the frequency characteristic Fx of the differential operator fx is calculated by Fourier transforming the differential operator fx in the X-axis direction. The differential operator fx is defined by the following expression (6). The following equation (5) indicates that the frequency characteristic Fy of the differential operator fy is calculated by Fourier transforming the differential operator fy in the Y-axis direction. The differential operator fy is defined by the following expression (7).


全ての処理領域PRについて下式(2)〜(5)で示すフーリエ変換を実行した後に、全ての処理領域PRのそれぞれについて、下式(8)で示す逆フーリエ変換を実行する。下式(8)のifftは、逆フーリエ変換を示す。下式(8)のλは、画像の滑らかさを調整するためのパラメータである。下式(8)の左辺の画像xは、フィルタ処理が行われた後の処理領域PRにおける輝度Iの二次元分布を示す。

After performing the Fourier transform represented by the following equations (2) to (5) for all the processing regions PR, the inverse Fourier transform represented by the following equation (8) is executed for each of the processing regions PR. Ifft in the following equation (8) indicates an inverse Fourier transform. Λ in the following equation (8) is a parameter for adjusting the smoothness of the image. The image x on the left side of the following formula (8) shows the two-dimensional distribution of the brightness I in the processing region PR after the filtering process is performed.


なお、上式(8)における右辺の括弧内の分子は、周波数特性LとインバースFとの積である。インバースFは、(1/F)であり、動きベクトルfの周波数特性Fに掛けることにより振幅が1となり位相が0になるものである。

The numerator in the parentheses on the right side of the above equation (8) is the product of the frequency characteristic L and the inverse F. The inverse F is (1 / F), and by multiplying the frequency characteristic F of the motion vector f, the amplitude becomes 1 and the phase becomes 0.

ここで、フーリエ変換を用いて、画像のぼけを除去する手法について簡単に説明する。
まず、ぼけた画像g(x、y)と、ぼけのない画像f(x、y)との関係を、下式(9)でモデル化する。ここで、下式(9)のh(x、y)は、ぼけ関数である。また、下式(9)のn(x、y)は、ノイズである。なお、下式(9)の右辺の「*」は乗算記号ではなく、畳み込みの演算記号である。
Here, a method of removing the blur of the image by using the Fourier transform will be briefly described.
First, the relationship between the blurred image g (x, y) and the unblurred image f (x, y) is modeled by the following expression (9). Here, h (x, y) in the following equation (9) is a blur function. Further, n (x, y) in the following expression (9) is noise. In addition, "*" on the right side of the following equation (9) is not a multiplication symbol but a convolution operation symbol.


ぼけ関数h(x、y)は、下式(10)に示すように、ぼけのない画像f(x、y)の各画素に適用される。このように、ぼけ関数を各画素に適用する演算を畳み込みという。

The blurring function h (x, y) is applied to each pixel of the unblurred image f (x, y) as shown in the following equation (10). The operation of applying the blur function to each pixel in this way is called convolution.


ぼけた画像g(x、y)から、ぼけのない画像f(x、y)を直接的に導出するには、多くの連立方程式を解く必要があり、困難を伴う。しかし、フーリエ変換を用いて畳み込み定理を適用すると、下式(11)が成立することが知られている。空間領域の畳み込みは、周波数領域での単純な積で表されるためである。

In order to directly derive a blur-free image f (x, y) from a blurred image g (x, y), many simultaneous equations need to be solved, which is difficult. However, it is known that the following expression (11) is established when the convolution theorem is applied using the Fourier transform. This is because the convolution in the spatial domain is represented by a simple product in the frequency domain.


したがって、周波数領域おいて、ぼけた画像G(u、v)と、ぼけのない画像F(u、v)との関係を、下式(12)でモデル化することができる。ここで、下式(12)のN(u、v)は、周波数領域におけるノイズである。

Therefore, in the frequency domain, the relationship between the blurred image G (u, v) and the unblurred image F (u, v) can be modeled by the following expression (12). Here, N (u, v) in the following equation (12) is noise in the frequency domain.


下式(12)に示すぼけた画像G(u、v)を、周波数領域におけるぼけ関数H(u、v)で除算することにより、ぼけのない画像が得られる。但し、下式(13)に示すように、G(u、v)をH(u、v)で除算することより、周波数領域においてぼけが除去された画像F^(u、v)が得られる。

By dividing the blurred image G (u, v) shown in the following expression (12) by the blur function H (u, v) in the frequency domain, a blur-free image can be obtained. However, as shown in the following expression (13), by dividing G (u, v) by H (u, v), an image F ^ (u, v) from which blur has been removed in the frequency domain can be obtained. .


但し、一般的に、H(u、v)は、0となるか0付近の値となる場合が多い。これにより、ノイズ部分(すなわち、N(u、v)/H(u、v))を増幅させてしまい、ぼけの除去が困難となることが多いため、種々のフィルタ処理が提案されている。例えば、下式(14)に、「Constrained Least Square Filtering」と呼ばれる手法を示す。

However, in general, H (u, v) often becomes 0 or a value near 0. As a result, a noise portion (that is, N (u, v) / H (u, v)) is amplified, and it is difficult to remove the blur. Therefore, various filtering processes have been proposed. For example, the following formula (14) shows a method called “Constrained Least Square Filtering”.


本実施形態では、下式(14)のy|P(u,v)|の部分を、下式(15)に置き換えたものを使用している。下式(15)は、ノイズ成分を模擬する形になっており、この大きさをパラメータλで調整することにより、ぼけが除去された画像を復元できるようにしている。なお、パラメータλを大きくすると画像が滑らかになり、パラメータλを小さくすると画像がざらつく。

In the present embodiment, the one obtained by replacing the y | P (u, v) | 2 part of the following formula (14) with the following formula (15) is used. The following expression (15) has a form simulating a noise component, and by adjusting the size with the parameter λ, it is possible to restore the image from which the blur is removed. If the parameter λ is increased, the image becomes smooth, and if the parameter λ is decreased, the image becomes rough.


そして、S50の処理が終了すると、図2に示すように、S60にて、S50でのフィルタ処理が行われた全ての処理領域PRのそれぞれについて、三角窓関数wを適用する。三角窓関数wは、図5に示すように、処理領域PRにおけるX軸方向の位置と、重み係数との対応関係が三角形となるように設定されている。具体的には、まず、1つの処理領域PR内において最も左に位置している画素のX軸方向の位置を1[ピクセル]とし、最も右側に位置している画素のX軸方向の位置を2m[ピクセル]とする。そして、X軸方向の位置が1[ピクセル]および2m[ピクセル]のときの重み係数を0とし、X軸方向の位置が(m+0.5)[ピクセル]のときの重み係数を1とする。そして、X軸方向の位置が1[ピクセル]と(m+0.5)[ピクセル]との間である場合には、X軸方向の位置をxとして、重み係数を{(x−1)/(m−0.5)}とする。一方、X軸方向の位置が(m+0.5)[ピクセル]と2m[ピクセル]との間である場合には、X軸方向の位置をxとして、重み係数を{(2m−x)/(m−0.5)}とする。

Then, when the processing of S50 is completed, as shown in FIG. 2, in S60, the triangular window function w is applied to each of all the processing regions PR subjected to the filtering processing of S50. As shown in FIG. 5, the triangular window function w is set so that the correspondence between the position in the X-axis direction in the processing region PR and the weighting coefficient is a triangle. Specifically, first, the position of the pixel located on the leftmost side in one processing region PR in the X-axis direction is set to 1 [pixel], and the position of the pixel located on the rightmost side in the X-axis direction is set. 2 m [pixel]. Then, the weight coefficient when the position in the X axis direction is 1 [pixel] and 2 m [pixel] is set to 0, and the weight coefficient when the position in the X axis direction is (m + 0.5) [pixel] is set to 1. When the position in the X-axis direction is between 1 [pixel] and (m + 0.5) [pixel], the position in the X-axis direction is x, and the weighting factor is {(x-1) / ( m-0.5)}. On the other hand, when the position in the X-axis direction is between (m + 0.5) [pixel] and 2m [pixel], the position in the X-axis direction is x and the weighting factor is {(2m−x) / ( m-0.5)}.

S60では、全ての処理領域PRの中から1つの処理領域PRを選択し、選択した処理領域PRを構成する全ての画素のそれぞれについて、画素のX軸方向の位置を特定し、特定したX軸方向の位置に対応する重み係数を、三角窓関数wを用いて算出する。そして、算出した重み係数と、画素の輝度とを乗算し、この乗算値を、画素の新たな輝度として更新する。このようにした全画素の輝度の更新を、全ての処理領域PRについて実行する。   In S60, one processing region PR is selected from all the processing regions PR, the position of the pixel in the X-axis direction is specified for each of all the pixels forming the selected processing region PR, and the specified X-axis is specified. The weighting factor corresponding to the position in the direction is calculated using the triangular window function w. Then, the calculated weighting factor is multiplied by the luminance of the pixel, and this multiplication value is updated as the new luminance of the pixel. The updating of the brightness of all pixels in this way is executed for all the processing regions PR.

そして、S60の処理が終了すると、図2に示すように、S70にて、S60で三角窓関数wが適用された後の処理領域PRを統合して、右撮影画像および左撮影画像のそれぞれを復元する。以下、S70にて復元された後の撮影画像を復元後撮影画像という。また、S70にて復元された後の右撮影画像を復元後右撮影画像、復元された後の左撮影画像を復元後左撮影画像という。   Then, when the processing of S60 is completed, as shown in FIG. 2, in S70, the processing regions PR after the triangular window function w is applied in S60 are integrated to obtain the right and left captured images, respectively. Restore. Hereinafter, the captured image restored in S70 is referred to as a restored captured image. Further, the right captured image after being restored in S70 is referred to as a restored right captured image, and the restored left captured image is referred to as a restored left captured image.

具体的には、S60で三角窓関数wが適用された後の全ての処理領域PRについて、撮影画像内における位置が同一の画素を抽出し、抽出した1または複数の画素の輝度の総和を算出する。この総和を、下式(16)で示す三角窓関数wの総和Swで除算し、この除算値を、上記の位置における画素の輝度とする。下式(16)において、wは、画素のX軸方向の位置がiであるときの重み係数である。また、iは1から2mまでの整数である。 Specifically, for all the processing regions PR to which the triangular window function w has been applied in S60, pixels at the same position in the captured image are extracted, and the sum of the brightness of the extracted one or more pixels is calculated. To do. This total sum is divided by the total sum Sw of the triangular window function w shown by the following formula (16), and this division value is taken as the luminance of the pixel at the above position. In the following expression (16), w i is a weighting coefficient when the position of the pixel in the X-axis direction is i. Further, i is an integer from 1 to 2 m.


例えば、図6に示すように、処理領域PR2においてX軸方向の位置がs[ピクセル]でありY軸方向の位置がt[ピクセル]である画素PX2と、処理領域PR3においてX軸方向の位置が(s−m)[ピクセル]でありY軸方向の位置がt[ピクセル]である画素PX3は、撮影画像内における位置が同一である。このため、画素PX2の輝度と画素PX3の輝度とを加算し、この加算値を三角窓関数wの総和Swで除算する。

For example, as shown in FIG. 6, a pixel PX2 whose position in the X-axis direction is s [pixels] and a position in the Y-axis direction is t [pixels] in the processing region PR2, and a position in the X-axis direction in the processing region PR3. Is (s-m) [pixel] and the position in the Y-axis direction is t [pixel], the pixel PX3 has the same position in the captured image. Therefore, the brightness of the pixel PX2 and the brightness of the pixel PX3 are added, and this added value is divided by the total sum Sw of the triangular window function w.

このようにした輝度の計算を、撮影画像内における全ての画素について実行する。
そして、S70の処理が終了すると、図2に示すように、S80にて、視差算出処理を実行する。ここで、S80で実行される視差算出処理の手順を説明する。
The brightness calculation as described above is executed for all pixels in the captured image.
Then, when the processing of S70 is completed, as shown in FIG. 2, the parallax calculation processing is executed in S80. Here, the procedure of the parallax calculation process executed in S80 will be described.

この視差算出処理が実行されると、画像処理装置5は、図7に示すように、まずS210にて、右撮影画像および左撮影画像のそれぞれに対応する復元後右撮影画像および復元後左撮影画像を用いて、節点空間NPS内に節点NPを配置するとともに、節点NPのコストを算出する。   When this parallax calculation processing is executed, the image processing apparatus 5 first, in S210, as shown in FIG. 7, the restored right photographed image and the restored left photographed image corresponding to the right photographed image and the left photographed image, respectively. Using the image, the nodes NP are arranged in the node space NPS, and the cost of the nodes NP is calculated.

具体的には、図8に示すように、復元後右撮影画像および復元後左撮影画像のそれぞれについて、撮影画像を構成する各画素の位置を、物理座標系で設定する。物理座標は、撮影画像の左上の角を原点として、X軸の正方向が右向きとなり、Y軸の正方向が下向きとなる座標である。これにより、撮影画像を構成する各画素の位置が、ピクセル単位で設定される。以下、X軸方向の位置をX座標位置、Y軸方向の位置をY座標位置という。また、復元後右撮影画像および復元後左撮影画像をそれぞれ、基準画像および比較画像ともいう。   Specifically, as shown in FIG. 8, the position of each pixel forming the captured image is set in the physical coordinate system for each of the restored right captured image and the restored left captured image. Physical coordinates are coordinates in which the positive direction of the X axis is rightward and the positive direction of Y axis is downward, with the upper left corner of the captured image as the origin. As a result, the position of each pixel forming the captured image is set in pixel units. Hereinafter, the position in the X-axis direction will be referred to as the X coordinate position, and the position in the Y-axis direction will be referred to as the Y coordinate position. The restored right photographed image and the restored left photographed image are also referred to as a reference image and a comparative image, respectively.

そして、基準画像を、X軸方向にp画素(pは正の整数)でY軸方向にq画素(qは正の整数)の矩形状のブロックBLに分割する。
次に、分割された複数のブロックBLのそれぞれについて、領域SRで示すように、比較画像の中からY座標位置が同じ領域を探索領域として設定する。この探索領域において、ブロックBLとの視差が互いに異なり、且つ、ブロックBLと同じ大きさ(すなわち、X軸方向にp画素でY軸方向にq画素の矩形)の複数のブロックを節点設定用ブロックBLnとして抽出する。そして、抽出された複数の節点設定用ブロックBLnに基づいて、節点空間NPS内に節点NPを配置する。節点空間NPSは、図9に示すように、ブロックBLのX座標位置をX軸とし、ブロックBLのY座標位置をY軸とし、ブロックBLに対応する節点設定用ブロックBLnの視差をZ軸とした3次元直交座標空間である。
Then, the reference image is divided into rectangular blocks BL having p pixels (p is a positive integer) in the X-axis direction and q pixels (q is a positive integer) in the Y-axis direction.
Next, for each of the plurality of divided blocks BL, as shown by a region SR, a region having the same Y coordinate position in the comparison image is set as a search region. In this search area, a plurality of blocks having different parallax from the block BL and having the same size as the block BL (that is, a rectangle of p pixels in the X-axis direction and q pixels in the Y-axis direction) are set as the node setting blocks. Extract as BLn. Then, the node NP is arranged in the node space NPS based on the extracted plurality of node setting blocks BLn. In the node space NPS, as shown in FIG. 9, the X coordinate position of the block BL is the X axis, the Y coordinate position of the block BL is the Y axis, and the parallax of the node setting block BLn corresponding to the block BL is the Z axis. 3D orthogonal coordinate space.

例えば、図8では、基準画像内のブロックBB1について、矢印AL1で示すように、探索領域SR内でX座標位置が同じブロックBC1(1)を節点設定用ブロックBLnとして抽出するとする。この場合に、ブロックBB1のX座標位置をx1、ブロックBB1のY座標位置をy1、ブロックBB1とブロックBC1(1)との視差をd1と表記すると、矢印AL2で示すように、ブロックBC1(1)に対応する節点NP1(1)は節点空間NPS内の(x1,y1,d1)に配置される。なお、図8に示す節点空間NPSは、Y座標がy1であるX−Z平面である。   For example, in FIG. 8, for the block BB1 in the reference image, the block BC1 (1) having the same X coordinate position in the search area SR is extracted as the node setting block BLn, as indicated by an arrow AL1. In this case, if the X coordinate position of the block BB1 is x1, the Y coordinate position of the block BB1 is y1, and the parallax between the block BB1 and the block BC1 (1) is d1, the block BC1 (1 ) Corresponding to node NP1 (1) is located at (x1, y1, d1) in the node space NPS. The node space NPS shown in FIG. 8 is an XZ plane whose Y coordinate is y1.

また、基準画像内のブロックBB1について、矢印AL3で示すように、探索領域SR内でX座標位置が異なるブロックBC1(2)を節点設定用ブロックBLnとして抽出するとする。この場合に、ブロックBB1とブロックBC1(2)との視差をd2と表記すると、矢印AL4で示すように、ブロックBC1(2)に対応する節点NP1(2)は節点空間NPS内の(x1,y1,d2)に配置される。   As for the block BB1 in the reference image, as shown by an arrow AL3, a block BC1 (2) having a different X coordinate position in the search area SR is extracted as the node setting block BLn. In this case, if the parallax between the block BB1 and the block BC1 (2) is written as d2, the node NP1 (2) corresponding to the block BC1 (2) is (x1, in the node space NPS) as indicated by an arrow AL4. y1, d2).

また、基準画像内のブロックBB1に隣接するブロックBB2についても、ブロックBB1と同じ探索領域SR内で節点設定用ブロックBLnを抽出する。
例えば、基準画像内のブロックBB2について、矢印AL5で示すように、探索領域SR内でX座標位置が同じブロックBC2(1)を節点設定用ブロックBLnとして抽出するとする。この場合に、ブロックBB2のX座標位置をx2、ブロックBLのY座標位置をy1、ブロックBB2とブロックBC2(1)との視差をd1と表記すると、矢印AL6で示すように、ブロックBC2(1)に対応する節点NP2(1)は節点空間NPS内の(x2,y1,d1)に配置される。
Also, for the block BB2 adjacent to the block BB1 in the reference image, the node setting block BLn is extracted within the same search area SR as the block BB1.
For example, with respect to the block BB2 in the reference image, as shown by an arrow AL5, the block BC2 (1) having the same X coordinate position in the search region SR is extracted as the node setting block BLn. In this case, if the X coordinate position of the block BB2 is x2, the Y coordinate position of the block BL is y1, and the parallax between the block BB2 and the block BC2 (1) is d1, the block BC2 (1 ) Corresponding to the node NP2 (1) is arranged at (x2, y1, d1) in the node space NPS.

また、節点空間NPS内に配置された複数の節点NPのそれぞれについて、コストを算出する。コストは、節点NPを節点空間NPS内に配置する際に用いられた2つのブロック間の類似度を表す値である。上記2つのブロックは、基準画像内のブロックBLと、このブロックBLに対応して節点NPを配置するために比較画像から抽出された節点設定用ブロックBLnである。例えば、節点NP1(1)のコストは、ブロックBB1と、ブロックBC1(1)とを用いて算出される。   Further, the cost is calculated for each of the plurality of nodes NP arranged in the node space NPS. The cost is a value representing the degree of similarity between two blocks used when arranging the node NP in the node space NPS. The above two blocks are a block BL in the reference image and a node setting block BLn extracted from the comparison image in order to arrange the nodes NP corresponding to this block BL. For example, the cost of the node NP1 (1) is calculated using the block BB1 and the block BC1 (1).

節点空間NPS内における節点NPのX座標位置とY座標位置をまとめて節点位置pと表記し、節点NPの視差をuと表記する。さらに、節点空間NPS内において節点位置pと視差uで特定される位置に配置される節点NPのコストをD(p,u)と表記する。 The X coordinate position and the Y coordinate position of the node NP in the node space NPS are collectively expressed as a node position p, and the parallax of the node NP is expressed as u p . Further, the cost of the node NP arranged at the position specified by the node position p and the parallax u p in the node space NPS is expressed as D (p, u p ).

本実施形態では、周知のSSIM(Structural Similarity)を用いて、コストD(p,u)を下式(17)で算出する。 In the present embodiment, the cost D (p, u p ) is calculated by the following equation (17) using a well-known SSIM (Structural Similarity).


なお、上式(17)において、μは、基準画像内のブロックBLに含まれる画素の輝度の平均値である。μは、比較画像内の節点設定用ブロックBLnに含まれる画素の輝度の平均値である。σは、基準画像内のブロックBLに含まれる画素の輝度の標準偏差である。σは、比較画像内の節点設定用ブロックBLnに含まれる画素の輝度の標準偏差である。σxyは、基準画像内のブロックBLと比較画像内の節点設定用ブロックBLnに含まれる画素の輝度の共分散である。c,c,c,α,β,γは予め設定される定数である。

In the above equation (17), μ x is the average value of the luminance of the pixels included in the block BL in the reference image. μ y is the average value of the luminance of the pixels included in the node setting block BLn in the comparison image. σ x is the standard deviation of the luminance of the pixels included in the block BL in the reference image. σ y is the standard deviation of the brightness of the pixels included in the node setting block BLn in the comparison image. σ xy is the covariance of the luminance of the pixels included in the block BL in the reference image and the node setting block BLn in the comparison image. c 1 , c 2 , c 3 , α, β, γ are preset constants.

このようにして、分割されたブロックBLの全てについて節点NPを節点空間NPS内に配置するとともに、配置された節点NPの全てについてコストD(p,u)を算出すると、S210の処理を終了する。 In this way, when the nodes NP are arranged in the node space NPS for all the divided blocks BL and the costs D (p, u p ) are calculated for all the arranged nodes NP, the process of S210 ends. To do.

S210の処理が終了すると、図7に示すように、S220にて、節点NPのX方向移動コストEを算出する。X方向移動コストEについては後述する。図8に示すように、ブロックBLはY軸方向に沿ってq画素毎に分割されている。このため、図10の平面PL1,PL2,PL3で示すように、節点空間NPS内には、複数の節点NPが配置されたX−Z平面がY軸方向に沿ってq画素毎に存在する。 When the process of S210 is completed, as shown in FIG. 7, at S220, it calculates the X-direction movement cost E x node NP. The X-direction movement cost Ex will be described later. As shown in FIG. 8, the block BL is divided into q pixels along the Y-axis direction. Therefore, as indicated by planes PL1, PL2, PL3 in FIG. 10, in the node space NPS, there is an XZ plane in which a plurality of nodes NP are arranged for each q pixel along the Y-axis direction.

これら複数のX−Z平面のそれぞれについて、節点NPのX方向移動コストEを算出する。以下に、節点NPのX方向移動コストEの算出方法を説明する。
例えば、図8に示すように、X−Z平面において、複数の節点NPが2次元行列状に配列されているとする。また、以下の説明のために、Z軸方向を列方向とし、X軸方向を行方向として、第i行(iは正の整数)の第j列(jは正の整数)に位置する節点NPをNP(i,j)と表記する。なお、視差が小さいほどiは小さくなり、X座標位置が原点から近いほどjは小さくなる。
For each of the plurality of X-Z plane, and calculates an X-direction movement cost E x node NP. Hereinafter, a method of calculating the X-direction movement cost E x node NP.
For example, as shown in FIG. 8, it is assumed that a plurality of nodes NP are arranged in a two-dimensional matrix on the XZ plane. Further, for the following description, a node located in the j-th column (j is a positive integer) of the i-th row (i is a positive integer) with the Z-axis direction as the column direction and the X-axis direction as the row direction. The NP is written as NP (i, j). Note that the smaller the parallax is, the smaller i is, and the closer the X coordinate position is from the origin, the smaller j is.

まず、X−Z平面に配列されている複数の節点NPの中から1つの節点NPを終点として選択する。X座標位置が原点から最も近い複数の節点NP(すなわち、第i行の第1列に位置する節点NP)のうちの1つを始点とする。そして、図8と図10の移動方向M1で示すように、始点から、X軸の正方向に向かって、隣の列(すなわち、第2列)に位置する複数の節点NPのうちの1つへ移動させる。さらに、移動した節点NPから更に隣の列(すなわち、第3列)に位置する複数の節点NPのうちの1つへ移動させる。このように、始点の節点NPから、X軸の正方向に向かって1列ずつ節点NPへ順次移動させ、終点として選択された節点NPまで移動させた1つの移動経路を確定する。以下、この移動経路を右方向移動経路という。図8では、左からNP(4,1)、NP(3,2)、NP(3,3)、NP(3,4)の順に右方向へ移動する右方向移動経路を示している。   First, one node NP is selected as the end point from the plurality of nodes NP arranged on the XZ plane. One of the plurality of nodes NP whose X coordinate position is closest to the origin (that is, the node NP located in the first column of the i-th row) is set as the starting point. Then, as shown by the moving direction M1 in FIGS. 8 and 10, one of the plurality of nodes NP located in the adjacent row (that is, the second row) from the start point in the positive direction of the X-axis. Move to. Further, the moved node NP is moved to one of the plurality of nodes NP located in the adjacent column (that is, the third column). In this way, one movement path is determined in which the node NP at the starting point is sequentially moved to the node NP one column at a time in the positive direction of the X-axis, and is moved to the node NP selected as the end point. Hereinafter, this moving route is referred to as a rightward moving route. FIG. 8 shows a rightward movement route that moves to the right in the order of NP (4,1), NP (3,2), NP (3,3), and NP (3,4) from the left.

そして、確定した移動経路のコストEを、下式(18)で算出する。   Then, the cost E of the determined travel route is calculated by the following formula (18).


上式(18)の右辺の第1項は、移動経路上に存在する節点NPのコストD(p,u)の総和を示す。上式(18)の右辺の第1項は、データ項という。上式(18)の右辺の第2項は、正則化項である。上式(18)の右辺の第2項のS(u,u)は、視差がuである節点NPから、視差がuである節点NPへ移動する場合の視差コストである。S(u,u)は、視差uと視差uとの差が大きくほど値が大きくなるように設定された関数である。本実施形態では、S(u,u)は、視差uと視差uとの差分の絶対値である。したがって、上式(18)の右辺の第2項は、移動経路を通過することによる視差の変化の総和を示す。

The first term on the right side of the above equation (18) indicates the total sum of the costs D (p, u p ) of the nodes NP existing on the moving route. The first term on the right side of the above equation (18) is called a data term. The second term on the right side of the above equation (18) is a regularization term. Of the second term of the right side of the equation (18) S (u p, u q) from node NP parallax is u p, is the disparity cost of disparity moves node NP is a u q. S (u p, u q) are set function so as large a difference between the parallax u p and the parallax u q value increases. In this embodiment, S (u p, u q ) is the absolute value of the difference between the parallax u p and the parallax u q. Therefore, the second term on the right side of the above equation (18) indicates the sum total of changes in parallax due to passing through the movement route.

このようにして、第1列に位置する複数の節点NPの何れか1点を始点とし、複数の節点NPの中から選択された1つの節点NPを終点とした場合において可能な全ての移動経路を確定することができ、確定した全ての移動経路についてコストEを算出することができる。これにより、コストEが最小となる移動経路を特定することができる。   In this way, all possible movement paths in the case where the starting point is any one of the plurality of nodes NP located in the first row and the ending point is one node NP selected from the plurality of nodes NP Can be determined, and the cost E can be calculated for all the determined travel routes. As a result, it is possible to identify the travel route that minimizes the cost E.

本実施形態では、上記のように全ての移動経路でコストEを算出する代わりに、動的計画法の一種である周知のビタビアルゴリズムを用いて、コストEが最小となる移動経路を特定する演算を行う。   In the present embodiment, instead of calculating the cost E for all the travel routes as described above, a well-known Viterbi algorithm, which is a kind of dynamic programming, is used to perform an operation for identifying the travel route that minimizes the cost E. I do.

S220では、コストEが最小となる右方向移動経路の特定を、1つのX−Z平面に配列されている全ての節点NPについて行う。これにより、このX−Z平面に配列されている全ての節点NPのそれぞれについて、右方向移動経路の最小コスト(以下、右方向移動コスト)が算出される。   In S220, the rightward movement path having the minimum cost E is specified for all the nodes NP arranged in one XZ plane. Thereby, the minimum cost of the rightward movement path (hereinafter, rightward movement cost) is calculated for each of all the nodes NP arranged on the X-Z plane.

次に、右方向移動コストの算出と同様にして、このX−Z平面に配列されている全ての節点NPのそれぞれについて、左方向移動経路の最小コスト(以下、左方向移動コスト)を算出する。   Next, similar to the calculation of the rightward movement cost, the minimum cost of the leftward movement route (hereinafter, leftward movement cost) is calculated for each of all the nodes NP arranged on the XZ plane. .

具体的には、X−Z平面に配列されている複数の節点NPの中から1つの節点NPを終点として選択する。X座標位置が原点から最も遠い複数の節点NP(すなわち、第i行の最終列に位置する節点NP)のうちの1つを始点とする。そして、図8と図10の移動方向M2で示すように、始点から、X軸の負方向に向かって、隣の列に位置する複数の節点NPのうちの1つへ移動させる。さらに、移動した節点NPから更に隣の列に位置する複数の節点NPのうちの1つへ移動させる。このように、始点の節点NPから、X軸の負方向に向かって1列ずつ節点NPへ順次移動させ、終点として選択された節点NPまで移動させた1つの移動経路を確定する。以下、この移動経路を左方向移動経路という。   Specifically, one node NP is selected as the end point from the plurality of nodes NP arranged on the XZ plane. One of a plurality of nodes NP whose X coordinate position is farthest from the origin (that is, a node NP located in the last column of the i-th row) is set as the starting point. Then, as indicated by the moving direction M2 in FIGS. 8 and 10, the movement is made from the starting point in the negative direction of the X axis to one of the plurality of nodes NP located in the adjacent row. Further, the moved node NP is moved to one of the plurality of nodes NP located in the adjacent column. In this way, one moving path is determined by sequentially moving from the starting node NP to the node NP one column at a time in the negative direction of the X axis and moving to the node NP selected as the end point. Hereinafter, this moving route is referred to as a leftward moving route.

S220では、右方向移動経路の場合と同様にして、コストEが最小となる左方向移動経路の特定を、1つのX−Z平面に配列されている全ての節点NPについて行う。これにより、このX−Z平面に配列されている全ての節点NPのそれぞれについて、左方向移動経路の最小コスト(以下、左方向移動コスト)が算出される。   In S220, similarly to the case of the rightward movement route, the leftward movement route having the minimum cost E is specified for all the nodes NP arranged in one XZ plane. As a result, the minimum cost of the leftward movement path (hereinafter, leftward movement cost) is calculated for each of all the nodes NP arranged on the XZ plane.

そして、S220では、このX−Z平面に配列されている全ての節点NPのそれぞれについて、右方向移動コストと左方向移動コストとを加算した加算値を、X方向移動コストEとして算出する。 Then, in S220, an addition value obtained by adding the rightward movement cost and the leftward movement cost is calculated as the X-direction movement cost E x for each of all the nodes NP arranged on the XZ plane.

このX−Z平面でX方向移動コストEの算出が終了すると、次のX−Z平面について、同様にして、X方向移動コストEの算出を行う。そして、全てのX−Z平面についてX方向移動コストEの算出を行うと、S220の処理を終了する。 When the calculation of the X-Z plane in the X-direction moving costs E x is completed, the next X-Z plane, in the same manner, to calculate the X-direction moving cost E x. Then, when the X-direction movement cost Ex is calculated for all the X-Z planes, the process of S220 ends.

S220の処理が終了すると、図7に示すように、S230にて、節点NPのY方向移動コストEを算出する。Y方向移動コストEについては後述する。ブロックBLは、図5に示すように、X軸方向に沿ってp画素毎に分割されている。このため、図11の平面PL11,PL12,PL13,PL14で示すように、節点空間NPS内には、複数の節点NPが配置されたY−Z平面がX軸方向に沿ってp画素毎に存在する。 When the process of S220 ends, as shown in FIG. 7, the Y-direction movement cost E y of the node NP is calculated in S230. The Y-direction movement cost E y will be described later. As shown in FIG. 5, the block BL is divided every p pixels along the X-axis direction. Therefore, as shown by the planes PL11, PL12, PL13, PL14 in FIG. 11, a YZ plane in which a plurality of nodes NP are arranged exists in the nodal space NPS every p pixels along the X-axis direction. To do.

S230では、これら複数のY−Z平面のそれぞれについて、節点NPのY方向移動コストEを算出する。節点NPのY方向移動コストEの算出は、X−Z平面の代わりにY−Z平面を用いている点が、上述したX方向移動コストEの算出と異なる。 In S230, the Y-direction movement cost E y of the node NP is calculated for each of the plurality of YZ planes. The calculation of the Y-direction movement cost E y of the node NP is different from the above-described calculation of the X-direction movement cost E x in that the YZ plane is used instead of the XZ plane.

具体的には、Y−Z平面において、図11の移動方向M3で示すように、Y座標位置が原点から最も近い複数の節点NPのうちの1つを始点して、Y軸の正方向に向かって、1列ずつ節点NPへ順次移動させ、終点として選択された節点NPまで移動させた移動経路を下方向移動経路とする。また、Y−Z平面において、図11の移動方向M4で示すように、Y座標位置が原点から最も遠い複数の節点NPのうちの1つを始点して、Y軸の負方向に向かって、1列ずつ節点NPへ順次移動させ、終点として選択された節点NPまで移動させた移動経路を上方向移動経路とする。   Specifically, on the YZ plane, as indicated by the moving direction M3 in FIG. 11, one of the plurality of nodes NP whose Y coordinate position is closest to the origin is set as the starting point, and the positive direction of the Y axis is set. Toward, the movement route that is sequentially moved to the node NP one column at a time and moved to the node NP selected as the end point is set as the downward movement route. Further, on the YZ plane, as shown by the moving direction M4 in FIG. 11, the Y coordinate position starts from one of the plurality of nodes NP farthest from the origin and moves in the negative direction of the Y axis. The moving path moved to the node NP one column at a time and moved to the node NP selected as the end point is defined as the upward moving path.

S230では、コストEが最小となる下方向移動経路と上方向移動経路の特定を、1つのY−Z平面に配列されている全ての節点NPについて行う。これにより、このY−Z平面に配列されている全ての節点NPのそれぞれについて、下方向移動経路の最小コスト(以下、下方向移動コスト)と、上方向移動経路の最小コスト(以下、上方向移動コスト)が算出される。   In S230, the downward movement route and the upward movement route that minimize the cost E are specified for all the nodes NP arranged in one YZ plane. As a result, for each of all the nodes NP arranged on the YZ plane, the minimum cost of the downward movement route (hereinafter, downward movement cost) and the minimum cost of the upward movement route (hereinafter, upward direction) Moving cost) is calculated.

そして、S230では、このY−Z平面に配列されている全ての節点NPのそれぞれについて、下方向移動コストと上方向移動コストとを加算した加算値を、Y方向移動コストEyとして算出する。   Then, in S230, an addition value obtained by adding the downward movement cost and the upward movement cost is calculated as the Y-direction movement cost Ey for each of all the nodes NP arranged on the YZ plane.

このY−Z平面でY方向移動コストEの算出が終了すると、次のY−Z平面について、同様にして、Y方向移動コストEの算出を行う。そして、全てのY−Z平面についてY方向移動コストEの算出を行うと、S230の処理を終了する。 When the calculation of the Y-direction movement cost E y is completed on the Y-Z plane, the Y-direction movement cost E y is calculated similarly for the next Y-Z plane. Then, when the Y-direction movement cost E y has been calculated for all the YZ planes, the processing of S230 ends.

S230の処理が終了すると、図7に示すように、S240にて、節点NPの右斜め方向移動コストEx−yを算出する。右斜め方向移動コストEx−yについては後述する。
S240では、まず、図12の平面PL21,PL22,PL23で示すように、節点空間NPS内において、X軸とY軸との間に跨ってX−Y平面と垂直になるように形成された複数の平面(以下、右斜め平面)を設定する。これら複数の右斜め平面は、互いに平行となるように、且つ、その平面の全面に亘って節点NPが配置されるように設定されている。
When the process of S230 ends, as shown in FIG. 7, in S240, the diagonally rightward movement cost E xy of the node NP is calculated. The right diagonal movement cost E xy will be described later.
In S240, first, as shown by the planes PL21, PL22, PL23 in FIG. 12, a plurality of plurality are formed in the nodal space NPS so as to be perpendicular to the XY plane across the X axis and the Y axis. Plane (hereinafter, diagonal plane to the right) is set. The plurality of right diagonal planes are set to be parallel to each other, and the nodes NP are arranged over the entire plane.

S240では、これら複数の右斜め平面のそれぞれについて、節点NPの右斜め方向移動コストEx−yを算出する。節点NPの右斜め方向移動コストEx−yの算出は、X−Z平面の代わりに右斜め平面を用いている点が、上述したX方向移動コストEの算出と異なる。 In S240, for each of the plurality of right oblique plane, and it calculates the right oblique direction movement cost E x-y node NP. The calculation of the right diagonal movement cost E xy of the node NP is different from the above-described calculation of the X direction movement cost E x in that the right diagonal plane is used instead of the XZ plane.

具体的には、右斜め平面において、図12の移動方向M5で示すように、Y軸から最も近い複数の節点NPのうちの1つを始点して、X軸に向かって、1列ずつ節点NPへ順次移動させ、終点として選択された節点NPまで移動させた移動経路を右上方向移動経路とする。また、右斜め平面において、図12の移動方向M6で示すように、X軸からから最も遠い複数の節点NPのうちの1つを始点して、Y軸に向かって、1列ずつ節点NPへ順次移動させ、終点として選択された節点NPまで移動させた移動経路を左下方向移動経路とする。   Specifically, on the right oblique plane, as shown in the moving direction M5 in FIG. 12, starting from one of the plurality of nodes NP closest to the Y-axis, the nodes are line by column toward the X-axis. The moving route that is sequentially moved to the NP and is moved to the node NP selected as the end point is the upper right direction moving route. Further, in the right oblique plane, as shown by the moving direction M6 in FIG. 12, one of the plurality of nodes NP farthest from the X axis is started, and one column is moved toward the node NP toward the Y axis. The moving route that is sequentially moved to the node NP selected as the end point is defined as the lower left direction moving route.

S240では、コストEが最小となる右上方向移動経路と左下方向移動経路の特定を、1つの右斜め平面に配列されている全ての節点NPについて行う。これにより、この右斜め平面に配列されている全ての節点NPのそれぞれについて、右上方向移動経路の最小コスト(以下、右上方向移動コスト)と、左下方向移動経路の最小コスト(以下、左下方向移動コスト)が算出される。   In S240, the upper right movement path and the lower left movement path with the lowest cost E are specified for all the nodes NP arranged on one right oblique plane. As a result, for each of all the nodes NP arranged on the right diagonal plane, the minimum cost of the upper right movement path (hereinafter, upper right movement cost) and the minimum cost of the lower left movement path (hereinafter, lower left movement) Cost) is calculated.

そして、S240では、この右斜め平面に配列されている全ての節点NPのそれぞれについて、右上方向移動コストと左下方向移動コストとを加算した加算値を、右斜め方向移動コストEx−yとして算出する。 Then, in S240, an addition value obtained by adding the upper right movement cost and the lower left movement cost is calculated as the right diagonal movement cost E xy for each of all the nodes NP arranged on the right diagonal plane. To do.

この右斜め平面で右斜め方向移動コストEx−yとの算出が終了すると、次の右斜め平面について、同様にして、右斜め方向移動コストEx−yの算出を行う。そして、全ての右斜め平面について右斜め方向移動コストEx−yの算出を行うと、S240の処理を終了する。 When the calculation of the right oblique direction movement cost E x-y In this right oblique plane is completed, the next right oblique plane, in the same manner, to calculate the right oblique direction movement cost E x-y. Then, when the right diagonal movement cost E xy is calculated for all the right diagonal planes, the process of S240 ends.

S240の処理が終了すると、図7に示すように、S250にて、節点NPの左斜め方向移動コストEx+yを算出する。左斜め方向移動コストEx+yについては後述する。
S250では、まず、図13の平面PL31,PL32,PL33,PL34で示すように、節点空間NPS内において、右斜め平面と交差するように形成された複数の平面(以下、左斜め平面)を設定する。。これら複数の左斜め平面は、互いに平行となるように、且つ、その平面の全面に亘って節点NPが配置されるように設定されている。
When the process of S240 ends, as shown in FIG. 7, the left diagonal movement cost E x + y of the node NP is calculated in S250. The left diagonal movement cost E x + y will be described later.
In S250, first, as shown by the planes PL31, PL32, PL33, PL34 in FIG. 13, a plurality of planes (hereinafter, left diagonal planes) formed so as to intersect with the right diagonal plane are set in the node space NPS. To do. . The plurality of left oblique planes are set to be parallel to each other, and the nodes NP are arranged over the entire surface of the plane.

S250では、これら複数の左斜め平面のそれぞれについて、節点NPの左斜め方向移動コストEx+yを算出する。節点NPの左斜め方向移動コストEx+yの算出は、X−Z平面の代わりに左斜め平面を用いている点が、上述したX方向移動コストExの算出と異なる。 In S250, the left diagonal movement cost Ex + y of the node NP is calculated for each of the plurality of left diagonal planes. The calculation of the left diagonal movement cost Ex + y of the node NP differs from the above-described calculation of the X direction movement cost Ex in that the left diagonal plane is used instead of the XZ plane.

具体的には、左斜め平面において、図13の移動方向M7で示すように、原点から最も近い複数の節点NPのうちの1つを始点して、原点から離れる方向に向かって、1列ずつ節点NPへ順次移動させ、終点として選択された節点NPまで移動させた移動経路を右下方向移動経路とする。また、左斜め平面において、図13の移動方向M8で示すように、原点から最も遠い複数の節点NPのうちの1つを始点して、原点へ近付く方向に向かって、1列ずつ節点NPへ順次移動させ、終点として選択された節点NPまで移動させた移動経路を左上方向移動経路とする。   Specifically, on the left oblique plane, as shown by the moving direction M7 in FIG. 13, starting from one of the plurality of nodes NP closest to the origin, one column at a time in the direction away from the origin. The movement route that is sequentially moved to the node NP and is moved to the node NP selected as the end point is the lower right direction movement route. In the left oblique plane, as shown by the moving direction M8 in FIG. 13, one of the plurality of nodes NP farthest from the origin is set as a starting point, and the nodes NP are line by column toward the direction of approaching the origin. The moving route that is sequentially moved to the node NP selected as the end point is defined as the upper left direction moving route.

S250では、コストEが最小となる右下方向移動経路と左上方向移動経路の特定を、1つの左斜め平面に配列されている全ての節点NPについて行う。これにより、この左斜め平面に配列されている全ての節点NPのそれぞれについて、右下方向移動経路の最小コスト(以下、右下方向移動コスト)と、左上方向移動経路の最小コスト(以下、左上方向移動コスト)が算出される。   In S250, the lower rightward movement path and the upper leftward movement path that minimize the cost E are specified for all the nodes NP arranged on one left oblique plane. As a result, for each of all the nodes NP arranged on the left diagonal plane, the minimum cost of the lower right movement path (hereinafter, lower right movement cost) and the minimum cost of the upper left movement path (hereinafter, upper left). Direction movement cost) is calculated.

そして、S250では、この左斜め平面に配列されている全ての節点NPのそれぞれについて、右下方向移動コストと左上方向移動コストとを加算した加算値を、左斜め方向移動コストEx+yとして算出する。 Then, in S250, an added value obtained by adding the lower rightward movement cost and the upper leftward movement cost is calculated as the left diagonal movement cost E x + y for each of all the nodes NP arranged on the left diagonal plane. .

この左斜め平面で左斜め方向移動コストEx+yとの算出が終了すると、次の左斜め平面について、同様にして、左斜め方向移動コストEx+yの算出を行う。そして、全ての左斜め平面について左斜め方向移動コストEx+yの算出を行うと、S250の処理を終了する。 When the left oblique plane calculating the left oblique direction movement cost E x + y is finished, the next left oblique plane, in the same manner, to calculate the left oblique direction movement cost E x + y. When the left diagonal movement cost E x + y is calculated for all the left diagonal planes, the process of S250 ends.

S250の処理が終了すると、図7に示すように、S260にて、節点空間NPS内の全ての節点NPについて、総方向移動コストEsumを、下式(19)で算出する。 When the process of S250 is completed, as shown in FIG. 7, in S260, the total direction movement cost E sum is calculated by the following formula (19) for all the nodes NP in the node space NPS.


そしてS270にて、基準画像を構成する全てのブロックBLのそれぞれについて、ブロックBLと同じX座標位置とY座標位置を有して視差が互いに異なる複数の節点NPの中から、総方向移動コストEsumが最小となる節点NPを選択する。

Then, in S270, for each of all the blocks BL forming the reference image, the total direction movement cost E is selected from the plurality of nodes NP having the same X coordinate position and Y coordinate position as the block BL and different in parallax. A node NP that minimizes the sum is selected.

さらにS280にて、S270で選択された節点NPの視差を、対応するブロックBLの視差として決定する。S280にて、基準画像を構成する全てのブロックBLについて視差を決定すると、視差算出処理を終了する。   Further, in S280, the parallax of the node NP selected in S270 is determined as the parallax of the corresponding block BL. In S280, when the parallax is determined for all the blocks BL forming the reference image, the parallax calculation processing ends.

S80の処理が終了すると、図2に示すように、S90にて、基準画像を構成する全てのブロックBLmについて、S80で算出された視差に基づき、視差を用いた周知の距離算出式を用いて距離を算出し、距離測定処理を終了する。これにより、基準画像を構成するブロックBLm毎に、ブロックBLm内に写っている物体までの距離が特定される。   When the process of S80 is completed, as shown in FIG. 2, in S90, for all the blocks BLm forming the reference image, based on the parallax calculated in S80, a known distance calculation formula using parallax is used. The distance is calculated, and the distance measurement process ends. As a result, the distance to the object shown in the block BLm is specified for each block BLm forming the reference image.

このように構成された測距装置1は、互いに異なる視点から同一の撮影領域を含むように同時に撮影された右撮影画像および左撮影画像を取得する。測距装置1は、右撮影画像および左撮影画像のそれぞれについて、撮影画像を、複数の画素で構成された部分領域DRに分割し、分割された複数の部分領域DR毎に、部分領域DR内に写っている物体が撮影画像内で移動する大きさと方向とを示す動きベクトルfを設定する。   The distance measuring apparatus 1 configured in this way acquires right and left photographed images simultaneously photographed so as to include the same photographing area from different viewpoints. The distance measuring device 1 divides the captured image into the partial regions DR configured by a plurality of pixels for each of the right captured image and the left captured image, and within the partial region DR for each of the plurality of divided partial regions DR. A motion vector f indicating the size and direction of movement of the object shown in FIG.

測距装置1は、右撮影画像および左撮影画像のそれぞれについて、上式(2)〜(8)に示すように、少なくとも、撮影画像の周波数特性Lを、撮影画像に設定された動きベクトルfの周波数特性Fで除算した演算を行い、更に、この演算結果の周波数特性に対応する復元後撮影画像を生成する。   The distance measuring apparatus 1 determines at least the frequency characteristic L of the captured image for each of the right captured image and the left captured image, as shown in the above equations (2) to (8), by using the motion vector f set in the captured image. The calculation is performed by dividing by the frequency characteristic F of, and a restored captured image corresponding to the frequency characteristic of the calculation result is generated.

測距装置1は、右撮影画像および左撮影画像のそれぞれに対応して生成された復元後右撮影画像および復元後左撮影画像を用いて、復元後右撮影画像と復元後左撮影画像間との間の視差を検出する。   The range finder 1 uses the restored right photographed image and the restored left photographed image generated corresponding to the right photographed image and the left photographed image, respectively, and uses the restored right photographed image and the restored left photographed image. Detect the parallax between.

なお測距装置1は、撮影画像の輝度Iの二次元分布に対してフーリエ変換を行うことにより周波数特性Lを算出する。また測距装置1は、撮影画像に設定された動きベクトルfの二次元分布に対してフーリエ変換を行うことにより周波数特性Fを算出する。また測距装置1は、演算結果に対して逆フーリエ変換を行うことにより、復元後撮影画像を生成する。   The range finder 1 calculates the frequency characteristic L by performing a Fourier transform on the two-dimensional distribution of the brightness I of the captured image. Further, the distance measuring device 1 calculates the frequency characteristic F by performing the Fourier transform on the two-dimensional distribution of the motion vector f set in the captured image. Further, the range finder 1 generates an image after restoration by performing an inverse Fourier transform on the calculation result.

このように測距装置1は、周波数特性Lを周波数特性Fで除算した演算を行うことにより、動きベクトルfの大きさと方向に応じた動きぼけを抑制することができる。そして動きベクトルfは、撮影画像内に写っている物体が撮影画像内で移動する大きさと方向とを示す。このため、測距装置1は、撮影画像内に写っている物体が撮影画像内で移動することに起因して撮影画像に生じる動きぼけを抑制することができ、視差検出の精度を向上させることができる。   As described above, the distance measuring apparatus 1 can suppress the motion blur corresponding to the magnitude and the direction of the motion vector f by performing the operation of dividing the frequency characteristic L by the frequency characteristic F. The motion vector f indicates the size and direction of movement of the object in the captured image within the captured image. Therefore, the distance measuring apparatus 1 can suppress the motion blur that occurs in the captured image due to the movement of the object captured in the captured image in the captured image, and improve the accuracy of parallax detection. You can

図14に、動きぼけを抑制する前の撮影画像G1を用いた距離測定結果と、動きぼけを抑制した後の撮影画像G2を用いた距離測定結果とを示す。
図14に示す画像G1は、自車両がトンネル内を走行しているときに右撮像装置2で撮影された画像である。画像G2は、画像G1から動きぼけを抑制した後の画像である。
FIG. 14 shows a distance measurement result using the captured image G1 before the motion blur is suppressed and a distance measurement result using the captured image G2 after the motion blur is suppressed.
An image G1 shown in FIG. 14 is an image captured by the right imaging device 2 while the vehicle is traveling in the tunnel. The image G2 is an image after suppressing the motion blur from the image G1.

図14に示す画像G3は、画像G1において指示円CI1で示す領域を用いて距離を測定した結果を示す。画像G4は、画像G2において指示円CI2で示す領域を用いて距離を測定した結果を示す。   An image G3 shown in FIG. 14 shows the result of measuring the distance using the area indicated by the indicated circle CI1 in the image G1. The image G4 shows the result of measuring the distance using the area indicated by the indicated circle CI2 in the image G2.

図14の画像G3と画像G4とを比較すると明らかなように、画像G4は、画像G3よりも、距離の長短を示す濃淡の変化が明確になっており、画像G2は画像G1よりも動きぼけが抑制されている。   As is clear from a comparison between the images G3 and G4 in FIG. 14, the image G4 has a clearer change in the light and shade indicating the length of the distance than the image G3, and the image G2 is more blurred than the image G1. Is suppressed.

また測距装置1は、車両に搭載され、車両の走行速度を検出する車速センサ4を備える。測距装置1は、車速センサ4により検出された車速と、撮影画像内における部分領域DRの位置とに基づいて、部分領域DRに動きベクトルfを設定する。   Further, the distance measuring device 1 is mounted on a vehicle and includes a vehicle speed sensor 4 that detects a traveling speed of the vehicle. The distance measuring device 1 sets the motion vector f in the partial region DR based on the vehicle speed detected by the vehicle speed sensor 4 and the position of the partial region DR in the captured image.

これにより、測距装置1は、撮影時刻の異なる少なくとも2枚の撮影画像から同一の物体を探索して、少なくとも2枚の撮影画像における物体の位置の相違から動きベクトルfを算出するという処理を行うことなく、簡便に動きベクトルfを設定することができる。このため、測距装置1は、測距装置1の処理負荷を低減することができる。   Accordingly, the distance measuring apparatus 1 searches for the same object from at least two captured images at different capturing times, and calculates the motion vector f from the difference in the positions of the objects in at least two captured images. It is possible to easily set the motion vector f without performing it. Therefore, the distance measuring device 1 can reduce the processing load of the distance measuring device 1.

以上説明した実施形態において、画像処理装置5は視差検出装置に相当し、S10は画像取得部としての処理に相当し、S30はベクトル設定部としての処理に相当し、S40〜S70は画像生成部としての処理に相当し、S80は視差検出部としての処理に相当する。   In the embodiment described above, the image processing device 5 corresponds to a parallax detection device, S10 corresponds to a process as an image acquisition unit, S30 corresponds to a process as a vector setting unit, and S40 to S70 are image generation units. And the processing of S80 corresponds to the processing of the parallax detection unit.

また、周波数特性Lは画像周波数特性に相当し、周波数特性Fはベクトル周波数特性に相当し、復元後右撮影画像および復元後左撮影画像は演算後画像に相当し、車速センサ4は車速検出部に相当する。   Further, the frequency characteristic L corresponds to the image frequency characteristic, the frequency characteristic F corresponds to the vector frequency characteristic, the restored right photographed image and the restored left photographed image correspond to the calculated image, and the vehicle speed sensor 4 is the vehicle speed detection unit. Equivalent to.

以上、本開示の一実施形態について説明したが、本開示は上記実施形態に限定されるものではなく、種々変形して実施することができる。
[変形例1]
例えば上記実施形態では、2台の撮像装置(すなわち、右撮像装置2と左撮像装置3)を用いて視差を検出するものを示したが、3台以上の撮像装置を用いるようにしてもよい。
Although one embodiment of the present disclosure has been described above, the present disclosure is not limited to the above embodiment, and various modifications can be implemented.
[Modification 1]
For example, in the above embodiment, the case where the parallax is detected by using the two image pickup devices (that is, the right image pickup device 2 and the left image pickup device 3) has been described, but three or more image pickup devices may be used. .

[変形例2]
上記実施形態では、動きベクトル設定マップに基づいて動きベクトルfを設定するものを示した。しかし、動きベクトルfの設定方法はこれに限定されるものではなく、例えば、撮影時刻の異なる少なくとも2枚の撮影画像から同一の物体を探索して、複数の撮影画像における物体の位置の相違から動きベクトルfを算出するようにしてもよい。撮影時刻の異なる複数の撮影画像から同一の物体を探索する方法としては、例えば、周知のオプティカルフローが挙げられる。このように、複数の撮影画像から同一の物体を探索することにより、部分領域DR内に写っている物体が撮影画像内で移動する大きさと方向を示す動きベクトルを正確に設定することができる。このため、測距装置1は、動きぼけを更に抑制することができ、視差検出の精度を更に向上させることができる。
[Modification 2]
In the above embodiment, the motion vector f is set based on the motion vector setting map. However, the method of setting the motion vector f is not limited to this. For example, the same object is searched from at least two captured images at different capturing times, and the position of the object in the plurality of captured images is different. The motion vector f may be calculated. As a method of searching for the same object from a plurality of photographed images at different photographing times, for example, there is a known optical flow. In this way, by searching for the same object from a plurality of captured images, it is possible to accurately set the motion vector indicating the size and direction in which the object captured in the partial region DR moves within the captured image. Therefore, the distance measuring device 1 can further suppress motion blur and further improve the accuracy of parallax detection.

[変形例3]
上記実施形態では、部分領域DRに含まれる画素の動きベクトルfの平均を算出し、この平均化した動きベクトルfを、部分領域DRの動きベクトルfとして決定するものを示した。しかし、部分領域DRの動きベクトルfを、部分領域DRの中心位置の画素における動きベクトルfで代表させるようにしてもよい。
[Modification 3]
In the above embodiment, the average of the motion vectors f of the pixels included in the partial region DR is calculated, and the averaged motion vector f is determined as the motion vector f of the partial region DR. However, the motion vector f of the partial region DR may be represented by the motion vector f in the pixel at the center position of the partial region DR.

また、上記実施形態における1つの構成要素が有する機能を複数の構成要素に分担させたり、複数の構成要素が有する機能を1つの構成要素に発揮させたりしてもよい。また、上記実施形態の構成の一部を省略してもよい。また、上記実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加、置換等してもよい。なお、特許請求の範囲に記載の文言から特定される技術思想に含まれるあらゆる態様が本開示の実施形態である。   Further, the function of one constituent element in the above-described embodiment may be shared by a plurality of constituent elements, or the function of a plurality of constituent elements may be exerted by one constituent element. Moreover, you may omit a part of structure of the said embodiment. Further, at least a part of the configuration of the above-described embodiment may be added to or replaced with the configuration of the other above-described embodiment. It should be noted that all aspects included in the technical idea specified by the wording recited in the claims are embodiments of the present disclosure.

上述した測距装置1の他、当該測距装置1を構成要素とするシステム、当該測距装置1としてコンピュータを機能させるためのプログラム、このプログラムを記録した媒体、視差検出方法など、種々の形態で本開示を実現することもできる。   In addition to the distance measuring device 1 described above, various forms such as a system including the distance measuring device 1 as a component, a program for causing a computer to function as the distance measuring device 1, a medium storing the program, a parallax detection method, and the like. The present disclosure can also be realized with.

1…測距装置、2…右撮像装置、3…左撮像装置、5…画像処理装置、   1 ... Distance measuring device, 2 ... Right imaging device, 3 ... Left imaging device, 5 ... Image processing device,

Claims (3)

互いに異なる視点から同一の撮影領域を含むように同時に撮影された複数の撮影画像を取得するように構成された画像取得部(S10)と、
複数の前記撮影画像のそれぞれについて、前記撮影画像を、複数の画素で構成された部分領域に分割し、分割された複数の前記部分領域毎に、前記部分領域内に写っている物体が前記撮影画像内で移動する大きさと方向とを示す動きベクトルを設定するように構成されたベクトル設定部(S30)と、
複数の前記撮影画像のそれぞれについて、少なくとも、前記撮影画像の周波数特性を示す画像周波数特性を、前記撮影画像に設定された前記動きベクトルの周波数特性を示すベクトル周波数特性で除算した演算を行い、更に、この演算結果の周波数特性に対応する画像である演算後画像を生成するように構成された画像生成部(S40〜S70)と、
複数の前記撮影画像のそれぞれに対応して前記画像生成部により生成された複数の前記演算後画像を用いて、複数の前記演算後画像間の視差を検出するように構成された視差検出部(S80)と
備え、
車両に搭載され、
前記車両の走行速度を検出する車速検出部(4)を備え、
前記ベクトル設定部は、前記車速検出部により検出された前記走行速度と、前記撮影画像内における前記部分領域の位置とに基づいて、前記部分領域に前記動きベクトルを設定する視差検出装置(5)。
An image acquisition unit (S10) configured to acquire a plurality of captured images simultaneously captured so as to include the same imaging region from different viewpoints;
For each of the plurality of photographed images, the photographed image is divided into partial regions configured by a plurality of pixels, and an object imaged in the partial region is photographed for each of the divided plurality of partial regions. A vector setting unit (S30) configured to set a motion vector indicating the size and direction of movement within the image;
For each of the plurality of captured images, at least an image frequency characteristic indicating the frequency characteristic of the captured image is divided by a vector frequency characteristic indicating the frequency characteristic of the motion vector set in the captured image, and further, An image generation unit (S40 to S70) configured to generate a post-calculation image that is an image corresponding to the frequency characteristic of the calculation result,
A parallax detection unit configured to detect a parallax between the plurality of post-computation images by using the plurality of post-computation images generated by the image generation unit corresponding to each of the plurality of captured images. S80) and equipped with a,
Mounted on the vehicle,
A vehicle speed detection unit (4) for detecting the traveling speed of the vehicle,
The vector setting unit sets the motion vector in the partial region based on the traveling speed detected by the vehicle speed detecting unit and the position of the partial region in the captured image (5). .
互いに異なる視点から同一の撮影領域を含むように同時に撮影された複数の撮影画像を取得するように構成された画像取得部(S10)と、
複数の前記撮影画像のそれぞれについて、前記撮影画像を、複数の画素で構成された部分領域に分割し、分割された複数の前記部分領域毎に、前記部分領域内に写っている物体が前記撮影画像内で移動する大きさと方向とを示す動きベクトルを設定するように構成されたベクトル設定部(S30)と、
複数の前記撮影画像のそれぞれについて、少なくとも、前記撮影画像の周波数特性を示す画像周波数特性を、前記撮影画像に設定された前記動きベクトルの周波数特性を示すベクトル周波数特性で除算した演算を行い、更に、この演算結果の周波数特性に対応する画像である演算後画像を生成するように構成された画像生成部(S40〜S70)と、
複数の前記撮影画像のそれぞれに対応して前記画像生成部により生成された複数の前記演算後画像を用いて、複数の前記演算後画像間の視差を検出するように構成された視差検出部(S80)と
を備え、
前記ベクトル設定部は、前記部分領域内に写っている前記物体を、前記画像取得部により取得された前記撮影画像のうち撮影時刻の異なる複数の前記撮影画像内において探索し、複数の前記撮影画像内における前記物体の位置に基づいて、前記部分領域に前記動きベクトルを設定する視差検出装置。
An image acquisition unit (S10) configured to acquire a plurality of captured images simultaneously captured so as to include the same imaging region from different viewpoints;
For each of the plurality of photographed images, the photographed image is divided into partial regions configured by a plurality of pixels, and an object imaged in the partial region is photographed for each of the divided plurality of partial regions. A vector setting unit (S30) configured to set a motion vector indicating the size and direction of movement within the image;
For each of the plurality of captured images, at least an image frequency characteristic indicating the frequency characteristic of the captured image is divided by a vector frequency characteristic indicating the frequency characteristic of the motion vector set in the captured image, and further, An image generation unit (S40 to S70) configured to generate a post-calculation image that is an image corresponding to the frequency characteristic of the calculation result,
A parallax detection unit configured to detect a parallax between the plurality of post-computation images by using the plurality of post-computation images generated by the image generation unit corresponding to each of the plurality of captured images. S80) and
Equipped with
The vector setting unit searches for the object captured in the partial area in the plurality of captured images at different capturing times among the captured images acquired by the image acquisition unit, and acquires the plurality of captured images. A parallax detection device that sets the motion vector in the partial region based on the position of the object in the inside.
請求項1または請求項2に記載の視差検出装置であって、
前記画像生成部は、前記撮影画像の輝度の二次元分布に対してフーリエ変換を行うことにより前記画像周波数特性を算出し、前記撮影画像に設定された前記動きベクトルの二次元分布に対してフーリエ変換を行うことにより前記ベクトル周波数特性を算出し、前記演算結果に対して逆フーリエ変換を行うことにより、前記演算後画像を生成する視差検出装置。
The parallax detection device according to claim 1 or 2 , wherein
The image generation unit calculates the image frequency characteristic by performing a Fourier transform on a two-dimensional distribution of luminance of the captured image, and performs a Fourier transform on the two-dimensional distribution of the motion vector set in the captured image. A parallax detection device that generates the post-computation image by calculating the vector frequency characteristic by performing conversion and performing an inverse Fourier transform on the calculation result.
JP2016204300A 2016-10-18 2016-10-18 Parallax detection device Active JP6687496B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016204300A JP6687496B2 (en) 2016-10-18 2016-10-18 Parallax detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016204300A JP6687496B2 (en) 2016-10-18 2016-10-18 Parallax detection device

Publications (2)

Publication Number Publication Date
JP2018066604A JP2018066604A (en) 2018-04-26
JP6687496B2 true JP6687496B2 (en) 2020-04-22

Family

ID=62085980

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016204300A Active JP6687496B2 (en) 2016-10-18 2016-10-18 Parallax detection device

Country Status (1)

Country Link
JP (1) JP6687496B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110220500B (en) * 2019-05-06 2021-12-07 深圳市华芯技研科技有限公司 Binocular camera-based distance measurement method for unmanned driving

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4414661B2 (en) * 2003-02-25 2010-02-10 オリンパス株式会社 Stereo adapter and range image input device using the same
JP2005354157A (en) * 2004-06-08 2005-12-22 Matsushita Electric Ind Co Ltd Imaging apparatus
US20110019873A1 (en) * 2008-02-04 2011-01-27 Konica Minolta Holdings, Inc. Periphery monitoring device and periphery monitoring method

Also Published As

Publication number Publication date
JP2018066604A (en) 2018-04-26

Similar Documents

Publication Publication Date Title
US10268901B2 (en) Quasi-parametric optical flow estimation
CN110348454B (en) Matching local image feature descriptors
JP2008185375A (en) 3d shape calculation device of sar image, and distortion correction device of sar image
JP7032871B2 (en) Image processing equipment and image processing methods, programs, storage media
WO2009096520A1 (en) Corresponding point search apparatus and corresponding point search method
US20100118125A1 (en) Method and apparatus for generating three-dimensional (3d) image data
WO2020017334A1 (en) Vehicle-mounted environment recognition device
US10043106B2 (en) Corresponding point searching method and distance detection device
EP3383038B1 (en) Camera calibration
JP5110235B1 (en) Image processing apparatus, image processing method, and program
US20170244957A1 (en) Disparity-to-Depth Calibration for Plenoptic Imaging Systems
JP2018179577A (en) Position measuring device
JP6687496B2 (en) Parallax detection device
JP6212021B2 (en) Distance detector
CN109859313B (en) 3D point cloud data acquisition method and device, and 3D data generation method and system
CN107396083B (en) Holographic image generation method and device
JP2017045124A (en) Parallax detection device
JP6991700B2 (en) Information processing equipment, information processing method, program
JP5769248B2 (en) Stereo matching processing device, stereo matching processing method, and program
JP6843552B2 (en) Image processing equipment, image processing methods and programs.
CN110728710A (en) Visual mileage calculation method, device and computer readable storage medium
JP7195785B2 (en) Apparatus, method and program for generating 3D shape data
JP6459487B2 (en) Image processing apparatus, image processing method, and program
Uh et al. Efficient multiview stereo by random-search and propagation
JP6730214B2 (en) Parallax calculator

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190118

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191112

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191119

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191219

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200310

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200402

R150 Certificate of patent or registration of utility model

Ref document number: 6687496

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250