WO2021256020A1 - ステレオ画像処理装置及び距離測定方法 - Google Patents

ステレオ画像処理装置及び距離測定方法 Download PDF

Info

Publication number
WO2021256020A1
WO2021256020A1 PCT/JP2021/009660 JP2021009660W WO2021256020A1 WO 2021256020 A1 WO2021256020 A1 WO 2021256020A1 JP 2021009660 W JP2021009660 W JP 2021009660W WO 2021256020 A1 WO2021256020 A1 WO 2021256020A1
Authority
WO
WIPO (PCT)
Prior art keywords
parallax
pixel
target area
function
reference image
Prior art date
Application number
PCT/JP2021/009660
Other languages
English (en)
French (fr)
Inventor
康一 崎田
圭一 別井
Original Assignee
日立Astemo株式会社
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 日立Astemo株式会社 filed Critical 日立Astemo株式会社
Priority to DE112021001995.3T priority Critical patent/DE112021001995T5/de
Publication of WO2021256020A1 publication Critical patent/WO2021256020A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders
    • G01C3/02Details
    • G01C3/06Use of electric means to obtain final indication
    • G01C3/08Use of electric radiation detectors
    • G01C3/085Use of electric radiation detectors with electronic parallax measurement
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/04Interpretation of pictures
    • G01C11/06Interpretation of pictures by comparison of two or more pictures of the same area
    • G01C11/12Interpretation of pictures by comparison of two or more pictures of the same area the pictures being supported in the same relative position as when they were taken
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/593Depth or shape recovery from multiple images from stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Definitions

  • the present invention relates to a stereo image processing device for measuring a distance to an object based on images of a plurality of cameras, and a distance measuring method.
  • a stereo camera is known as a device for measuring the distance to an object based on images captured by a plurality of cameras.
  • the stereo camera captures an object by using a plurality of cameras arranged at different positions, and measures the distance from the parallax between the pair of images to the object by using the principle of triangulation.
  • each of a pair of images (reference image, reference image) captured by the two cameras is divided into blocks.
  • the pixel correlation between the block of the reference image and the block of the reference image is calculated, and when the correlation value becomes the maximum value or the minimum value, two. It is determined that one block is matched, and the difference in the position of each block in the reference image and the reference image is obtained as the parallax and converted into the distance.
  • an object of the present invention is to provide a stereo image processing device and a distance measuring method capable of obtaining parallax of a pixel unit or less with high accuracy without increasing the circuit scale.
  • the stereo image processing apparatus is captured by the first and second image pickup units, the reference image captured by the first image pickup unit, and the second image pickup unit. It is provided with a distance calculation unit that calculates the distance based on the parallax between the reference image and the reference image.
  • the distance calculation unit is based on the first target region of the reference image captured by the first imaging unit, and corresponds to the first target region in the reference image captured by the second imaging unit.
  • a target area extraction unit that extracts two target areas
  • a pixel disparity calculation unit that calculates pixel disparity, which is a pixel-by-pixel difference between the first target area and the second target area, and the first target.
  • a sub-pixel deviation calculation unit that calculates a sub-pixel deviation that is a deviation of less than one pixel by calculating a phase difference ⁇ generated between the data of the region and the second target region, and includes the pixel deviation and the sub-pixel. Calculate the distance based on the parallax.
  • the present invention it is possible to provide a stereo image processing apparatus and a stereo image processing method capable of obtaining parallax of a pixel unit or less with high accuracy without increasing the circuit scale.
  • the stereo camera 1 (stereo image processing apparatus) according to the first embodiment will be described with reference to the block diagram of FIG.
  • the stereo camera 1 is roughly composed of a right side camera 11, a left side camera 12, a right side image acquisition unit 13, a left side image acquisition unit 14, an image generation unit 20, a distance calculation unit 30, and an application processing unit 40.
  • the distance calculation unit 30 further includes a target area extraction unit 31, a pixel parallax calculation unit 32, and a sub-pixel parallax calculation unit 33.
  • the right image acquisition unit 13, the left image acquisition unit 14, the image generation unit 20, the distance calculation unit 30, and the application processing unit 40 are a general computer input / output interface, a storage unit, an arithmetic processing device, and a storage unit. It can be realized by a computer program stored in.
  • the right side camera 11 and the left side camera 12 are arranged with a predetermined baseline length, and are configured to image the same object from different positions and directions. As an example, both cameras 11 and 12 are attached to the left side and the right side of the front part of the vehicle at a predetermined distance so as to take an image of an object in front of the vehicle and measure the distance to the object.
  • the right image acquisition unit 13 and the left image acquisition unit 14 simultaneously acquire images from the right camera 11 and the left camera 12, respectively.
  • the camera has its own distortion.
  • causes of this distortion include misalignment of the imaging device, distortion inherent in the lens in the camera, misalignment in the optical axis direction of the camera, and the like.
  • the image generation unit 20 performs image processing for aligning the two images captured by the left and right cameras 11 and 12 in parallel, and also performs image processing for correcting various other distortions to obtain a distortion-free image. It is configured to be viable.
  • the distance calculation unit 30 performs parallax calculation using the left and right images generated by the image generation unit 20 and image-processed, and measures the distance from the vehicle of the own vehicle to the object.
  • the obtained distance information is output to the application processing unit 40 and used in the inter-vehicle distance maintenance system and the collision mitigation braking system.
  • the target area extraction unit 31 in the distance calculation unit 30 searches for and extracts the corresponding small area in the left and right images captured by the left and right cameras 11 and 12. Then, the pixel parallax calculation unit 32 in the distance calculation unit 30 calculates the pixel parallax, which is the parallax of each pixel, based on the result of the search. Further, the sub-pixel parallax calculation unit 33 in the distance calculation unit 30 calculates the sub-pixel parallax, which is a parallax of less than one pixel, by using a method described later after the pixel parallax is calculated. The distance calculation unit 30 calculates the distance to the object according to the calculated pixel parallax and sub-pixel parallax.
  • steps S201 to S207 are operations in the target area extraction unit 31 and the pixel parallax calculation unit 32, and search for where the small area (matching block) in the reference image is in the reference image. (Calculation of corresponding points), it is an operation to calculate the difference of the coordinate unit on the image as parallax (pixel parallax). Further, steps S208 to S209 show the operation of the sub-pixel parallax calculation unit 33, and are operations for detecting the sub-pixel parallax.
  • the right image acquired from the right camera 11 is referred to as the reference image 301
  • the left image acquired from the left camera 12 is referred to as the reference image 302.
  • the reference image 301 is an image that serves as a reference when calculating parallax, and specifically, is an image that defines a matching block 303 that serves as a reference for calculating parallax.
  • the size of the matching block 303 can be, for example, 16 ⁇ 8 pixels, but the size can be arbitrarily determined according to the processing speed, determination accuracy, and the like, and is not limited to a specific size. From the viewpoint of improving the processing speed, the size of the matching block 303 can be set to the minimum size at which an appropriate correlation value can be obtained when matching the left and right images (calculation of pixel parallax). ..
  • the reference image 302 is an image in which the reference image block 304 that matches the matching block 303 is searched for.
  • the image acquired from the right side camera 11 is referred to as the reference image 201
  • the image acquired from the left side camera 12 is referred to as the reference image 302. This is an example, and even if the left and right sides are reversed. good.
  • step S201 when the reference image 301 and the reference image 302 are obtained from the left and right cameras (11, 12), in step S201, the matching block 303 having the upper left corner at the coordinates (i, j) in the reference image 301. Is selected. A reference image block 304 that matches the matching block 303 is searched for in the reference image 302 according to a procedure described in detail below.
  • the reference image block 304 in which the upper left corner is located at the coordinates (i + m, j) in the reference image 302 is selected in step S203.
  • the reference image block 304 selected here is one of the block candidates finally regarded as the reference image block 304.
  • step S204 SAD (Sum of Absolute Difference), which is the sum of the absolute values of the differences between the matching block 303 and the reference image block 304 for each corresponding pixel, is calculated, and the calculation result is stored in the storage unit. Store it in (not shown).
  • the procedure of steps S203 and S204 is repeated mmax + 1 times (steps S205 and S206). That is, by incrementing m by 1 (step S206), the reference image block 304 moves to the right in the reference image 302 pixel by pixel, and the above procedure is repeated for the reference image 302 after the movement. Is done. This procedure is repeated until the variable m is equal to mmmax.
  • the absolute value sum SAD is calculated and stored for each of the mmmax + 1 reference image blocks 304.
  • the absolute sum SAD (Sum of Absolute Difference) was calculated, but instead of this, the SSD (Sum of Squared Difference), which is the sum of squares of the differences for each pixel, may be calculated. ..
  • the SAD (m) is calculated and stored in the storage unit for the mmax + 1 reference image blocks 304 that have been moved one pixel at a time. Since the reference image 301 and the reference image 302 are image-processed so as to be parallel to each other in the image generation unit 20 (parallelization processing of the left and right images), the reference image block 304 is in the reference image 302 in the horizontal direction. It is enough to move it in one dimension. However, vertical movement may be added as appropriate depending on the situation.
  • SAD (m) is calculated by the following formula (1).
  • g (i, j) is the luminance value in the matching block 303 of the reference image 301
  • f (i, j) is the luminance value in the reference image block 304 of the reference image 302.
  • This SAD (m) is calculated and stored for mmax + 1 reference image blocks 304.
  • step S207 the minimum SAD (m) is obtained as SAD (mSADmin) with respect to the stored mmax + 1 SAD (0) to SAD (mmax).
  • the reference image block 304 that gives the minimum SAD (m) is finally selected (specified) as the reference image block 304 that matches the matching block 303.
  • the position difference m mSADmin between the selected reference image block 304 and the matching block 303 is calculated as the pixel parallax 305.
  • the sub-pixel parallax is calculated by the following steps S208 to 209. Specifically, in step S208, the phase difference ⁇ between the reference image block 304 in which the SAD (m) is minimized and the matching block 303 is calculated. The details of the calculation method of the phase difference ⁇ will be described later.
  • step S209 the sum of the estimated phase difference ⁇ (subpixel parallax) and the value of m when SAD (m) is minimized (that is, pixel parallax) mSADmin is obtained, and the pixel parallax and the subpixel are obtained.
  • the sum of the parallax is finally calculated as the parallax obtained by the stereo camera 1.
  • the distance to the imaged object is calculated from the distance between the left and right cameras (baseline length), the physical length of the parallax, etc. by the principle of triangulation. The process described above is continued until all the matching blocks to be measured are completed (step S210).
  • step S208 the calculation method of the phase difference ⁇ in step S208 will be described in more detail with reference to FIGS. 4 and 5.
  • FIG. 4 shows an example of the luminance data sequence 403 of the block of the reference image 301 and the luminance data sequence 404 of the block of the reference image 302 in which the value of SAD (m) is minimized.
  • the size of the block is set to 8 ⁇ 8 pixels.
  • the sampling theorem if the spatial frequency of these captured data is limited to the Nyquist frequency or lower, the value of the data not at the sampling point (lattice point) is also perfect using the value of the data represented on the grid point. It is guaranteed that it can be restored to. This means that the data sequence of existing grid points can be used to interpolate the data of non-existent points. Data complementation can be performed and the phase difference ⁇ can be obtained according to the result of the complementation.
  • FIG. 5A shows an example of a data string along the horizontal pixel direction (scan direction) at a certain vertical pixel position in FIG.
  • the black circle points indicate the luminance data sequence 403 in the reference image 301
  • the white square dots indicate the luminance data sequence 404 in the reference image 302.
  • the values of the luminance data sequence 403 and the luminance data sequence 404 do not completely match even in the reference image 302 having the minimum SAD (m).
  • the luminance data sequence 403 of the block of the reference image 301 and the luminance data sequence 404 of the block of the reference image 302 are only present at the grid points.
  • a grid point with the luminance data sequence 404 and a curve passing through the adjacent grid points adjacent to the grid points are specified, and the curve is approximated by a function.
  • FIG. 5A pay attention to the third grid point (lattice point 3) and the sixth grid point (lattice point 6) of the brightness data sequence 404, and the grid points 3 and 6 and them.
  • the curve 501 connecting the adjacent grid points (2, 4 or 5, 7) of is specified, and the curve is approximated by a quadratic function.
  • the curve 501 connecting the grid points 3 and the grid points 6 and their adjacent grid points 2, 4, 5, and 7 is a quadratic function fi (t) represented by the following equation (2). expressed.
  • the curve 501 approximated by the quadratic function is displaced by the distance ⁇ in the horizontal axis direction to obtain the curve 502.
  • the curve 502 is represented by a quadratic function fi (t ⁇ ) represented by the following equation (3).
  • the phase difference ⁇ that minimizes the error between the function representing the curve 502 and the data string 403 of the reference image 301 is determined. Specifically, the value of the phase difference ⁇ is determined so that the sum of the errors on the grid points (see FIG. 5B) is minimized. The phase difference determined in this way becomes the subpixel parallax.
  • the objective function L ( ⁇ ) for evaluating the total error the function L ( ⁇ ) represented by the following equation (5) is set, and the least squares error thereof is obtained. ... (5)
  • Equation (5) is expressed in the form of a polynomial with respect to ⁇ . Further, the coefficient of the equation (5) is a sum or difference between adjacent pixels. Therefore, it is possible to easily obtain the coefficient without performing complicated calculation. Further, in the minimization of the objective function L ( ⁇ ), an algorithm for finding the minimum value of an even-order polynomial function is applied. Further, since the range taken by the variable ⁇ is also narrowed down to within one pixel by stereo matching in pixel units, it is sufficient to search this range, and the search range is very limited. Since the phase difference ⁇ is obtained by assuming the phase difference ⁇ and minimizing the objective function L ( ⁇ ), it is not necessary to generate a large number of high-definition interpolation points, and the amount of calculation is overwhelmingly small. ..
  • the stereo camera 1 according to the second embodiment will be described with reference to FIG. Since the overall configuration of the stereo camera 1 of the second embodiment may be the same as that of the first embodiment, overlapping description will be omitted. Further, the procedure for calculating the parallax is also the same as that of the first embodiment (FIG. 2). However, in this second embodiment, the data complementation and the calculation of the phase difference ⁇ (calculation method of subpixel parallax) in the distance calculation unit 30 are different from those in the first embodiment. Hereinafter, this difference will be described with reference to FIG.
  • the curve connecting the grid points and the adjacent grid points before and after the grid points is approximated by a quadratic function, and this quadratic function is used for calculating the phase difference ⁇ .
  • the phase difference ⁇ is calculated by connecting the grid points of the reference image and the adjacent grid points with a straight line (approximate with a straight line) and expressing this straight line with a linear function. ..
  • the sum of the errors between the points on the grid points of the straight line 501S and the data string 403 is calculated, and the phase difference is set so that the sum of the errors is minimized.
  • Determine ⁇ it is not necessary to calculate the sum of the errors of all the points on the grid points, and some of them may be excluded. For example, if the grid point 5 shown in FIG. 9 satisfies the equation (9) shown below, it may be excluded from the calculation target. It is preferable to exclude such points from the calculation because the accuracy of the linear approximation is lowered and an error other than the error caused by the phase difference ⁇ occurs.
  • the objective function L ( ⁇ ) for evaluating the total error the objective function L ( ⁇ ) represented by the following equation (10) for calculating the least squares error can be used.
  • the total error can be calculated only for those satisfying the condition of the equation (9).
  • equation (10) is a quadratic polynomial with respect to the phase difference ⁇ , as shown in equation (11), it is possible to directly obtain the value of the phase difference ⁇ by setting the derivative with respect to ⁇ to zero, which simplifies the optimization process. Can be transformed into.
  • the present invention is not limited to the above-described embodiment, and includes various modifications.
  • the above-described embodiments have been described in detail in order to explain the present invention in an easy-to-understand manner, and are not necessarily limited to those having all the described configurations.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Electromagnetism (AREA)
  • Measurement Of Optical Distance (AREA)
  • Image Analysis (AREA)

Abstract

回路規模を増大させず、高精度に画素単位以下の視差を求めることを可能にしたステレオ画像処理装置及びステレオ画像処理方法を提供する。このステレオ画像処理装置は、第1及び第2の撮像部と、第1の撮像部で撮像された基準画像と、第2の撮像部で撮像された参照画像との間の視差に基づき距離を計算する距離計算部とを備える。距離計算部は、第1の撮像部で撮像した基準画像の第1の対象領域に基づき、第2の撮像部で撮像した参照画像において第1の対象領域に対応する第2の対象領域を抽出する対象領域抽出部と、第1の対象領域と第2の対象領域とのピクセル視差を算出するピクセル視差算出部と、第1の対象領域及び第2の対象領域のデータ間に生じる位相差δを算出することで1画素未満の視差であるサブピクセル視差を算出するサブピクセル視差算出部とを備える。ピクセル視差及びサブピクセル視差に基づき距離が計算される。

Description

ステレオ画像処理装置及び距離測定方法
 本発明は、複数台のカメラの画像に基づいて、物体までの距離を計測するためのステレオ画像処理装置、及び距離測定方法に関する。
 複数台のカメラが撮像した画像に基づいて、物体までの距離を計測するための装置として、ステレオカメラが知られている。ステレオカメラは、異なる位置に配置された複数台のカメラを用いて対象物を撮像し、一対の画像の間の視差から、三角測量の原理を用いて対象物までの距離を計測する。例えば特許文献1に開示のステレオカメラでは、長距離にある小さな物体を精度よく検出するため、2台のカメラで撮像した一対の画像(基準画像、参照画像)の各々をブロックに分割する。そして、参照画像内のブロック位置を画素単位で順次にシフトさせながら、基準画像のブロックと参照画像のブロックとの画素相関を計算し、相関値が極大値又は極小値をとなったとき、二つのブロックがマッチングしたと判定し、基準画像及び参照画像における各ブロックの位置の差を視差として求め、距離に換算する。
 しかしながら、視差計算では、基準画像と参照画像の類似ブロックの探索が画素単位のシフトで行われるため、視差精度が画素単位に制限せれるという問題がある。そのため、画素単位以下の視差の誤差が生じ、距離測定精度に影響するという問題が生じる。基準画像と参照画像のブロックの画像データの画素数を補間処理によって増加させ、相関演算を行うことも考えられるが、この場合画素数が増大し、その分計算量が増大するため、回路規模が大きくなるという別の問題が生じる。
特開2000-283753号公報
 本発明は、上記の課題に鑑み、回路規模を増大させず、高精度に画素単位以下の視差を求めることを可能にしたステレオ画像処理装置及び距離測定方法を提供することを目的とする。
 上記目的を達成するため、本発明に係るステレオ画像処理装置は、第1及び第2の撮像部と、前記第1の撮像部で撮像された基準画像と、前記第2の撮像部で撮像された参照画像との間の視差に基づき距離を計算する距離計算部とを備える。前記距離計算部は、前記第1の撮像部で撮像した前記基準画像の第1の対象領域に基づき、前記第2の撮像部で撮像した前記参照画像において前記第1の対象領域に対応する第2の対象領域を抽出する対象領域抽出部と、前記第1の対象領域と前記第2の対象領域との画素単位の視差であるピクセル視差を算出するピクセル視差算出部と、前記第1の対象領域及び前記第2の対象領域のデータ間に生じる位相差δを算出することで1画素未満の視差であるサブピクセル視差を算出するサブピクセル視差算出部とを備え、前記ピクセル視差及び前記サブピクセル視差に基づき距離を計算する。
 本発明によれば、回路規模を増大させず、高精度に画素単位以下の視差を求めることを可能にしたステレオ画像処理装置及びステレオ画像処理方法を提供することができる。
第1の実施の形態に係るステレオカメラ1の全体構成を説明するブロック図である。 距離計算部30におけるデータ処理の手順を説明するフローチャートである。 距離計算部30におけるピクセル視差の算出の手順を説明する概略図である。 SAD(m)の値が最小となった基準画像301のブロックの輝度データ列403及び参照画像302のブロックの輝度データ列404の一例を示している。 第1の実施の形態におけるデータ補完及び位相差δの算出の具体的な方法について説明する。 第2の実施の形態におけるデータ補完及び位相差δの算出の具体的な方法について説明する。
 以下、添付図面を参照して本実施形態について説明する。添付図面では、機能的に同じ要素は同じ番号で表示される場合もある。なお、添付図面は本開示の原理に則った実施形態と実装例を示しているが、これらは本開示の理解のためのものであり、決して本開示を限定的に解釈するために用いられるものではない。本明細書の記述は典型的な例示に過ぎず、本開示の特許請求の範囲又は適用例を如何なる意味においても限定するものではない。
 本実施形態では、当業者が本開示を実施するのに十分詳細にその説明がなされているが、他の実装・形態も可能で、本開示の技術的思想の範囲と精神を逸脱することなく構成・構造の変更や多様な要素の置き換えが可能であることを理解する必要がある。従って、以降の記述をこれに限定して解釈してはならない。
[第1の実施の形態]
 図1のブロック図を参照して、第1の実施の形態に係るステレオカメラ1(ステレオ画像処理装置)の全体構成を説明する。このステレオカメラ1は、右側カメラ11、左側カメラ12、右側画像取得部13、左側画像取得部14、画像生成部20、距離計算部30、アプリケーション処理部40から大略構成される。
 距離計算部30は更に、対象領域抽出部31、ピクセル視差算出部32、及びサブピクセル視差算出部33を備える。なお、右側画像取得部13、左側画像取得部14、画像生成部20、距離計算部30、アプリケーション処理部40は、一般的なコンピュータの入出力インタフェース、記憶部、及び演算処理装置、並びに記憶部に記憶されたコンピュータプログラムにより実現され得る。
 右側カメラ11と左側カメラ12は、所定の基線長を与えられて配置され、異なる位置及び方向から同一の対象物を撮像するように構成されている。一例として、両カメラ11、12は、車両の前部の左側及び右側に所定距離を空けて取り付けられ、車両前方の対象物を撮像し、対象物までの距離を計測できるようになっている。右側画像取得部13及び左側画像取得部14は、それぞれ右側カメラ11と左側カメラ12から画像を同期して取得する。
 通常、カメラには固有の歪みが存在する。この歪みの原因は、撮像デバイスの設置ずれ、カメラの中のレンズに固有の歪み、カメラの光軸方向のずれなどを含む。ステレオカメラ1による三角測量では、左右のカメラ11、12の小領域(マッチングブロック)での相関値を正確に求めるために、左右の画像が正確に平行に並んでいることが重要である。このため、画像生成部20は、左右のカメラ11、12で撮像された2つの画像を平行に揃える画像処理を実行すると共に、その他様々な歪みを補正して歪みのない画像とする画像処理を実行可能に構成されている。
 距離計算部30は、画像生成部20で生成され画像処理された左右の画像を用いて視差計算を行い、自車の車両から対象物までの距離を計測する。得られた距離情報は、アプリケーション処理部40に出力され、車間距離維持システムや衝突軽減ブレーキシステムにおいて利用される。
 距離計算部30中の対象領域抽出部31は、左右のカメラ11、12で撮像された左右の画像において対応する小領域を探索し抽出する。そして、距離計算部30中のピクセル視差算出部32は、その探索の結果に基づいて、画素単位の視差であるピクセル視差を算出する。更に距離計算部30中のサブピクセル視差算出部33は、ピクセル視差が算出された後、後述する手法を用いて、1画素未満の視差であるサブピクセル視差を算出する。距離計算部30は、算出されたピクセル視差及びサブピクセル視差に従って、対象物までの距離を演算する。
 図2のフローチャートを参照して、距離計算部30におけるデータ処理の手順を説明する。図2のフローチャート中、ステップS201~S207は、対象領域抽出部31及びピクセル視差算出部32での動作であり、基準画像中の小領域(マッチングブロック)が参照画像中のどこにあるかを探索して(対応点算出)、画像上の座標単位の差を視差(ピクセル視差)として算出する動作である。また、ステップS208~S209は、サブピクセル視差算出部33での動作を示しており、サブピクセル視差を検出する動作である。
 以下で説明する例では、図3に示すように、右側カメラ11から取得される右側画像を基準画像301とし、左側カメラ12から取得される左側画像を参照画像302とする。基準画像301は、視差を計算する際に基準となる画像であり、具体的には、視差の計算の基準となるマッチングブロック303を定義される画像である。マッチングブロック303は、例えばブロックのサイズを16×8画素とすることができるが、サイズは、処理速度や判定精度などに従って任意に定めることができ、特定の大きさに限定されるものではない。処理速度の向上の観点からは、マッチングブロック303のサイズは、左右の画像のマッチング処理(ピクセル視差の算出)を行う場合に、適正な相関値を求めることができる最小のサイズとすることができる。
 一方、参照画像302は、マッチングブロック303と一致する参照画像ブロック304を探索される画像である。なお、図示の例では、右側カメラ11から取得される画像を基準画像201とし、左側カメラ12から取得される画像を参照画像302とするが、これは一例であり、左右は逆であってもよい。
 図2を参照して、距離計算部30におけるデータ処理の手順を詳細に説明する。まず、左右のカメラ(11、12)から、基準画像301、及び参照画像302が得られたら、ステップS201において、基準画像301において、座標(i,j)に左上の角部を有するマッチングブロック303が選定される。以下に詳細に説明する手順に従って、マッチングブロック303と一致する参照画像ブロック304が、参照画像302の中から探索される。
 ステップS202において、変数mが0に設定された後、ステップS203において、参照画像302中の座標(i+m、j)に左上の角部が位置する参照画像ブロック304が選定される。ここで選定される参照画像ブロック304は、最終的に参照画像ブロック304とされるブロックの候補の1つである。
 次に、ステップS204において、マッチングブロック303と参照画像ブロック304との間の対応する画素毎の差の絶対値の和であるSAD(Sum of Absolute Difference)を計算し、計算の結果を、記憶部(図示せず)に記憶させる。このステップS203、S204の手順がmmax+1回繰り返される(ステップS205、S206)。すなわち、mが1ずつインクリメントされることにより(ステップS206)、参照画像ブロック304は、1画素ずつ参照画像302中を右方向に移動し、その移動後の参照画像302に関し、上記の手順が繰り返される。この手順は、変数mがmmmaxに等しくなるまで繰り返される。そして、mmmax+1個の参照画像ブロック304について、それぞれ絶対値和SADが計算され、記憶される。なお、上記の例では、絶対値和SAD (Sum of Absolute Difference)が演算されたが、これに代えて、画素毎の差の二乗和であるSSD(Sum of Squared Difference)が演算されてもよい。
 こうして、1画素ずつ移動したmmax+1個の参照画像ブロック304に関し、SAD(m)が計算され、記憶部に記憶される。基準画像301と参照画像302とは、画像生成部20において互いに平行になるよう画像処理されているので(左右画像の平行化処理)、参照画像ブロック304は、参照画像302中で、水平方向に一次元中に移動させれば十分である。ただし、状況に応じて垂直方向への移動が適宜加えられてもよい。
 なお、SAD(m)は下記の式(1)で算出される。
Figure JPOXMLDOC01-appb-M000001
…(1)
 ここで、g(i、j)は基準画像301のマッチングブロック303における輝度値、f(i、j)は参照画像302の参照画像ブロック304における輝度値である。このSAD(m)が、mmax+1個の参照画像ブロック304について演算・記憶される。
 その後、ステップS207では、記憶されたmmax+1個のSAD(0)~SAD(mmax)に関し、最小のSAD(m)をSAD(mSADmin)として求める。複数の参照画像ブロック304のうち、最小のSAD(m)を与える参照画像ブロック304が、最終的にマッチングブロック303とマッチングする参照画像ブロック304として選定(特定)される。そして、その選定された参照画像ブロック304と、マッチングブロック303との間の位置の差m=mSADminが、ピクセル視差305として計算される。
 参照画像ブロック304が特定され、ピクセル視差が特定されると、続くステップS208~209によりサブピクセル視差が計算される。具体的には、ステップS208において、SAD(m)が最小とされた参照画像ブロック304と、マッチングブロック303との間の位相差δが演算される。位相差δの演算方法の詳細に関しては後述する。
 続くステップS209では、推定された位相差δ(サブピクセル視差)と、SAD(m)が最小となったときのmの値(すなわちピクセル視差)mSADminとの和が求められ、ピクセル視差とサブピクセル視差の和が、最終的にステレオカメラ1により求められる視差として演算される。このようにして求められた視差に従って、三角測量の原理で、左右のカメラ間距離(基線長)、視差の物理的な長さ等から、撮像された物体までの距離が演算される。以上説明した処理が、計測するマッチングブロックが全てについて終了するまで続けられる(ステップS210)。
 次に、図4、図5を用いて、ステップS208での位相差δの計算方法についてより詳細に説明する。
 図4は、SAD(m)の値が最小となった基準画像301のブロックの輝度データ列403及び参照画像302のブロックの輝度データ列404の一例を示している。ここでは説明の簡単のため、ブロックのサイズを8×8画素とした。
 SAD(m)の値が最小となる時点では、二つのデータ列403、404の値は近い値になるが、完全に一致することはほとんどなく、僅かの差が残っている。この僅かな差は、同一物体の像が二つのカメラ11、12の撮像面でサンプリングされたときの僅かなサンプリング位置の差のために生じていると解釈することができる。
 サンプリング定理によると、これら撮像されたデータの空間周波数がナイキスト周波数以下に制限されていれば、サンプリング点(格子点)にないデータの値も格子点上で表されたデータの値を用いて完全に復元することが可能であることが保証されている。これは、存在する格子点のデータ列を使って、存在しない点のデータを補間することができることを意味する。データ補完を行い、その補完の結果に従って、位相差δを求めることができる。
 図5を参照して、データ補完及び位相差δの算出の具体的な方法について説明する。図5(a)は、図4のある垂直画素位置における水平画素方向(スキャン方向)に沿ったデータ列の一例を示す。
 図5(a)中、黒丸の点は基準画像301の中の輝度データ列403を示し、白抜き四角形の点は、参照画像302の中の輝度データ列404を示している。前述のように、これら輝度データ列403及び輝度データ列404の値は、SAD(m)が最小となる参照画像302であっても完全には一致していない。また、前述した通り、基準画像301のブロックの輝度データ列403、及び参照画像302のブロックの輝度データ列404は、格子点において飛び飛びに存在しているのみである。
 この例では、位相差δを求めるため、輝度データ列404のある格子点と、その格子点に隣接する隣接格子点を通る曲線を特定し、その曲線を関数で近似する。一例として、図5(a)に示すように、輝度データ列404の3番目の格子点(格子点3)及び6番目の格子点(格子点6)に着目し、格子点3、6とそれらの隣接格子点(2、4又は5、7)を接続する曲線501を特定し、その曲線を二次関数で近似する。二次関数で近似する場合、格子点3及び格子点6、及びその隣接格子点2、4、5、7を結ぶ曲線501は、以下の式(2)で示す二次関数fi(t)で表される。
Figure JPOXMLDOC01-appb-M000002
…(2)
 こうして二次関数で近似された曲線501を、水平軸方向に距離δだけ変位させて、曲線502とする。その曲線502は、以下の式(3)で示す二次関数fi(t-δ)で表される。
Figure JPOXMLDOC01-appb-M000003
…(3)
 したがって、参照画像302を表す曲線が変数δだけ横軸方向に変位した曲線502の格子点上の点は、式(4)で表されることになる。
Figure JPOXMLDOC01-appb-M000004
…(4)
 そして、曲線502を表す関数と基準画像301のデータ列403との間の誤差が最小となるような位相差δを決定する。具体的には、格子点上の誤差(図5(b)参照)の総和が最小になるように、位相差δの値を決定する。こうして決定された位相差が、サブピクセル視差となる。このとき誤差の総和を評価する目的関数L(δ)として、以下の式(5)で表される関数L(δ)が設定され、その最小二乗誤差が求められる。
Figure JPOXMLDOC01-appb-M000005
…(5)
 式(5)は、δに関する多項式の形で表される。また、式(5)の係数は、隣接画素間の和や差になっている。このため、複雑な計算を実行せずとも、簡単に係数を求めることが可能である。また目的関数L(δ)の最小化においては、偶数次数の多項式関数の最小値を求めるアルゴリズムが適用される。また変数δのとる範囲も、画素単位のステレオマッチングによって一画素以内にまで絞り込めているので、この範囲を探索すればよく、探索範囲は非常に限定的である。位相差δを想定し、目的関数L(δ)を最小化することで、位相差δを求めるので、高精細な補間点を大量に生成する必要がなく、圧倒的に計算量が少なくて済む。
 以上説明したように、第1の実施の形態のステレオカメラによれば、回路規模を増大させず、高精度に画素単位以下の視差を求めることが可能になる。
[第2の実施の形態]
 次に、図6を参照して、第2の実施の形態に係るステレオカメラ1を説明する。この第2の実施の形態のステレオカメラ1の全体構成は、第1の実施の形態と同様でよいので、重複する説明は省略する。また、視差の算出の手順も第1の実施の形態(図2)と同一である。ただし、この第2の実施の形態は、距離計算部30におけるデータ補完、位相差δの算出(サブピクセル視差の計算方法)が、第1の実施の形態とは異なっている。以下、この相違点について、図6を参照して説明する。
 図6を参照して、第2の実施の形態におけるデータ補完及び位相差δの算出の具体的な方法について説明する。第1の実施の形態では、格子点と、その前後の隣接格子点とを結ぶ曲線を二次関数で近似し、この二次関数を位相差δの算出に用いている。これに対し、第2の実施の形態では、参照画像の格子点と、隣接格子点とを直線で結び(直線で近似し)、この直線を一次関数で表すことで、位相差δを算出する。
 直線の関数は、以下の式(6)で表すことができる。格子間の実数精度に関し正負の場合分けが必要になることから、式(6)は次のようにt>=0とt<0に分けて表記される。
Figure JPOXMLDOC01-appb-M000006
…(6)
 また、横軸の正方向に変数δだけ変位した直線の関数は、次の式(7)のように表される。
Figure JPOXMLDOC01-appb-M000007
…(7)
 したがって、参照画像データを表す直線501Sが変数δだけ変位した直線502Sの格子点上の点は、式(8)で表されることになる。
Figure JPOXMLDOC01-appb-M000008
…(8)
 このようにして求められる格子点上の点に関し、直線501Sの格子点上の点と、データ列403との間の誤差の総和を演算し、その誤差の総和が最小となるように、位相差δを決定する。このとき、格子点上の全ての点の誤差の総和を演算する必要はなく、一部は除外してもよい。例えば、図9に示す格子点5が、以下に示す式(9)を満たすならば、計算の対象から除外してもよい。このような点は、直線近似の精度を低下させ、位相差δのために生じる誤差以外の誤差が発生するため、除外して演算することが好ましい。
Figure JPOXMLDOC01-appb-M000009
…(9)
 誤差の総和を評価する目的関数L(δ)として、最小二乗誤差を演算する以下の式(10)で表される目的関数L(δ)を使用することができる。ここで、誤差の総和は、式(9)の条件を満たすもののみについて演算され得る。
Figure JPOXMLDOC01-appb-M000010
…(10)
 式(10)は位相差δに関する二次多項式なので、式(11)に示すように、δに関する微分をゼロとおいて、位相差δの値を直接求めることが可能となり、最適化の処理を簡略化することができる。
Figure JPOXMLDOC01-appb-M000011
…(11)
 このとき、δを求める式が二つ存在するので、式とδの符号の関係や、それぞれのδに対し、式(10)の目的関数の値を評価し、小さい方を採択することにより、妥当なδを求めることができる。上述した実施の形態では、二次関数、一次関数による補間公式を使ったが、使用する補間公式はラグランジェ補間、スプライン補間などの多項式を使った補間公式であってもよい。次数を上げることによって、さらに精度を向上させることができる。特に3次スプライン補間(スプラインコンボリューション)を使った補間公式を用いると、標本化関数(Sinc関数)で復元された理想的な値に近い値を使うことになるため、非常に高精度な位相差検出が可能となる。
 以上説明したように、第2の実施の形態のステレオカメラによれば、第1の実施の形態と同様に、回路規模を増大させず、高精度に画素単位以下の視差を求めることが可能になる。
[その他]
 なお、本発明は上記した実施の形態に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施の形態は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施の形態の構成の一部を他の実施の形態の構成に置き換えることが可能であり、また、ある実施の形態の構成に他の実施の形態の構成を加えることも可能である。また、各実施の形態の構成の一部について、他の公知の構成の追加・削除・置換をすることが可能である。
1…ステレオカメラ、11…右側カメラ、12…左側カメラ、13…右側画像取得部、14…左側画像取得部、20…画像生成部、30…距離計算部、40…アプリケーション処理部、301…基準画像、302…参照画像、303…マッチングブロック、304…参照画像ブロック、305…ピクセル視差、403、404…輝度データ列、501、502…曲線。

Claims (8)

  1.  第1及び第2の撮像部と、
     前記第1の撮像部で撮像された基準画像と、前記第2の撮像部で撮像された参照画像との間の視差に基づき距離を計算する距離計算部と
     を備え、
     前記距離計算部は、
     前記第1の撮像部で撮像した前記基準画像の第1の対象領域に基づき、前記第2の撮像部で撮像した前記参照画像において前記第1の対象領域に対応する第2の対象領域を抽出する対象領域抽出部と、
     前記第1の対象領域と前記第2の対象領域との画素単位の視差であるピクセル視差を算出するピクセル視差算出部と、
     前記第1の対象領域及び前記第2の対象領域のデータ間に生じる位相差δを算出することで1画素未満の視差であるサブピクセル視差を算出するサブピクセル視差算出部と
     を備え、
     前記ピクセル視差及び前記サブピクセル視差に基づき距離を計算する
    ことを特徴とするステレオ画像処理装置。
  2.  前記サブピクセル視差算出部は、
     前記第2の対象領域のデータ列を結ぶ曲線を第1の関数で近似し、前記第1の関数を前記位相差δだけ移動させて第2の関数で表し、前記第2の関数と前記第1の対象領域のデータの間の誤差が最小となるような前記位相差δを決定する、請求項1に記載のステレオ画像処理装置。
  3.  前記距離計算部は、前記第1の対象領域及び前記第2の対象領域のデータ間の一致度を評価する目的関数を設定し、前記目的関数に基づいて位相差δを算出する、請求項2に記載のステレオ画像処理装置。
  4.  前記第1の関数は、前記データ列のうちの一の格子点と、この一の格子点に隣接する隣接格子点とを結ぶ曲線を近似した二次関数である、請求項3に記載のステレオ画像処理装置。
  5.  前記第1の関数は、前記データ列のうちの一の格子点と、この一の格子点に隣接する隣接格子点とを結ぶ直線を表す一次関数である、請求項2に記載のステレオ画像処理装置。
  6.  第1の撮像部で撮像された基準画像と、第2の撮像部で撮像された参照画像との間の視差に基づき距離を測定する距離測定方法であって、
     前記基準画像の第1の対象領域に基づき、前記参照画像において前記第1の対象領域に対応する第2の対象領域を抽出するステップと、
     前記第1の対象領域と前記第2の対象領域との画素単位の視差であるピクセル視差を算出するステップと、
     前記第1の対象領域及び前記第2の対象領域のデータ間に生じる位相差δを算出することで1画素未満の視差であるサブピクセル視差を算出するステップと、
     前記ピクセル視差及び前記サブピクセル視差に基づき距離を計算するステップと
    を備える、距離測定方法。
  7.  前記第2の対象領域のデータ列を結ぶ曲線を第1の関数で近似し、前記第1の関数を前記位相差δだけ移動させて第2の関数で表し、前記第2の関数と前記第1の対象領域のデータの間の誤差が最小となるような前記位相差δを決定する、請求項6に記載の距離測定方法。
  8.  前記第1の対象領域及び前記第2の対象領域のデータ間の一致度を評価する目的関数を設定し、前記目的関数に基づいて位相差δを算出する、請求項7に記載の距離測定方法。 
PCT/JP2021/009660 2020-06-19 2021-03-10 ステレオ画像処理装置及び距離測定方法 WO2021256020A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE112021001995.3T DE112021001995T5 (de) 2020-06-19 2021-03-10 Stereobildverarbeitungsvorrichtung und Abstandsmessverfahren

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020-106281 2020-06-19
JP2020106281A JP7394709B2 (ja) 2020-06-19 2020-06-19 ステレオ画像処理装置及び距離測定方法

Publications (1)

Publication Number Publication Date
WO2021256020A1 true WO2021256020A1 (ja) 2021-12-23

Family

ID=79244349

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/009660 WO2021256020A1 (ja) 2020-06-19 2021-03-10 ステレオ画像処理装置及び距離測定方法

Country Status (3)

Country Link
JP (1) JP7394709B2 (ja)
DE (1) DE112021001995T5 (ja)
WO (1) WO2021256020A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000283753A (ja) * 1999-03-31 2000-10-13 Fuji Heavy Ind Ltd ステレオ画像による測距装置
JP2008039491A (ja) * 2006-08-02 2008-02-21 Fuji Heavy Ind Ltd ステレオ画像処理装置
JP2008216127A (ja) * 2007-03-06 2008-09-18 Konica Minolta Holdings Inc 距離画像生成装置、距離画像生成方法及びプログラム
WO2012086173A1 (ja) * 2010-12-20 2012-06-28 パナソニック株式会社 ステレオ画像処理装置及びステレオ画像処理方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000283753A (ja) * 1999-03-31 2000-10-13 Fuji Heavy Ind Ltd ステレオ画像による測距装置
JP2008039491A (ja) * 2006-08-02 2008-02-21 Fuji Heavy Ind Ltd ステレオ画像処理装置
JP2008216127A (ja) * 2007-03-06 2008-09-18 Konica Minolta Holdings Inc 距離画像生成装置、距離画像生成方法及びプログラム
WO2012086173A1 (ja) * 2010-12-20 2012-06-28 パナソニック株式会社 ステレオ画像処理装置及びステレオ画像処理方法

Also Published As

Publication number Publication date
JP7394709B2 (ja) 2023-12-08
JP2022001830A (ja) 2022-01-06
DE112021001995T5 (de) 2023-01-19

Similar Documents

Publication Publication Date Title
JP5404773B2 (ja) ステレオ画像処理装置およびステレオ画像処理方法
JP6363863B2 (ja) 情報処理装置および情報処理方法
TWI485632B (zh) 影像校準方法及影像校準系統
WO2008056765A1 (fr) Procédé de recherche de point correspondant et procédé de mesure de position tridimensionnelle
JP5810314B2 (ja) ステレオ画像処理装置およびステレオ画像処理方法
JP2012058076A (ja) 3次元計測装置及び3次元計測方法
US10142613B2 (en) Image processing apparatus, image processing system, and image processing method
JP4055998B2 (ja) 距離検出装置、距離検出方法、及び距離検出プログラム
WO2023046211A1 (zh) 摄影测量方法、装置、设备及存储介质
KR100951309B1 (ko) 광학식 모션 캡처 장비를 위한 다중 카메라 보정 방법
JP6641729B2 (ja) ラインセンサカメラのキャリブレーション装置及び方法
Gao et al. Computing a complete camera lens distortion model by planar homography
CN116758136B (zh) 一种货物体积实时在线识别方法、系统、设备以及介质
JP2017130067A (ja) 衛星映像の位置正確度改善のための自動映像処理システム及びその方法
US10134136B2 (en) Image processing apparatus and image processing method
JP5071866B2 (ja) 距離測定装置および方法並びにプログラム
WO2021256020A1 (ja) ステレオ画像処理装置及び距離測定方法
WO2021163406A1 (en) Methods and systems for determining calibration quality metrics for a multicamera imaging system
CN117333367A (zh) 基于图像局部特征的图像拼接方法、系统、介质及装置
KR20110133677A (ko) 3d 영상 처리 장치 및 그 방법
KR20170001448A (ko) 스테레오 카메라를 이용한 카메라 위치 측정 장치 및 방법
CN112819900B (zh) 一种智能立体摄影内方位、相对定向和畸变系数标定方法
CN114399540A (zh) 一种基于二维迭代最近点的异源图像配准方法及系统
JP2018032144A (ja) 画像処理装置、画像処理方法およびプログラム。
Mustaniemi et al. Parallax correction via disparity estimation in a multi-aperture camera

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21825439

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21825439

Country of ref document: EP

Kind code of ref document: A1