WO2018230340A1 - ステレオカメラ装置 - Google Patents

ステレオカメラ装置 Download PDF

Info

Publication number
WO2018230340A1
WO2018230340A1 PCT/JP2018/020661 JP2018020661W WO2018230340A1 WO 2018230340 A1 WO2018230340 A1 WO 2018230340A1 JP 2018020661 W JP2018020661 W JP 2018020661W WO 2018230340 A1 WO2018230340 A1 WO 2018230340A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
reference image
parallax
stereo
matching
Prior art date
Application number
PCT/JP2018/020661
Other languages
English (en)
French (fr)
Inventor
松尾 茂
佐々本 学
敦 市毛
Original Assignee
日立オートモティブシステムズ株式会社
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 日立オートモティブシステムズ株式会社 filed Critical 日立オートモティブシステムズ株式会社
Priority to EP18818696.9A priority Critical patent/EP3640585B1/en
Publication of WO2018230340A1 publication Critical patent/WO2018230340A1/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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • 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
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • G06T7/85Stereo camera calibration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals
    • H04N13/122Improving the 3D impression of stereoscopic images by modifying image signal contents, e.g. by filtering or adding monoscopic depth cues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/204Image signal generators using stereoscopic image cameras
    • H04N13/239Image signal generators using stereoscopic image cameras using two 2D image sensors having a relative position equal to or related to the interocular distance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/204Image signal generators using stereoscopic image cameras
    • H04N13/246Calibration of cameras
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N2013/0074Stereoscopic image analysis
    • H04N2013/0081Depth or disparity estimation from stereoscopic image signals

Definitions

  • the present invention relates to a stereo camera device.
  • millimeter wave radar laser radar, camera, etc.
  • sensors for monitoring the front of the vehicle there are a monocular camera and a stereo camera using a plurality of cameras.
  • the stereo camera can measure the distance to the photographed object using the parallax of the overlapping area photographed by the two cameras at a predetermined interval. For this reason, it is possible to accurately grasp the risk of collision with the object ahead.
  • Stereo camera obtains the parallax of images taken by two cameras and converts the parallax into distance.
  • parallax it is necessary to determine the degree of coincidence of images between two cameras.
  • parallax it is necessary to correct correctly the lens distortion and the camera position shift of these two images.
  • Lens distortion can be corrected by using correction parameters when the stereo camera device is manufactured.
  • Patent Document 1 since the positional deviation of the camera is caused by aging, temperature change, or vibration, it is necessary to adjust the correction parameter after the product is shipped.
  • Patent Document 1 has been proposed as a method for correcting this positional deviation.
  • Patent Document 1 the vertical deviation is corrected in real time at predetermined time intervals while the stereo camera device is in operation.
  • the misalignment adjustment process is performed by software of the microcomputer, the period becomes very slow compared to the period of the parallax calculation.
  • the positional deviation adjustment processing by this software is hardwareized for speeding up, the amount of hardware increases correspondingly, and there is a problem that costs and power consumption increase.
  • An object of the present invention is to prevent an increase in the amount of hardware and an increase in power consumption that accompany hardware adjustment of misalignment in a stereo camera device.
  • a stereo matching circuit that calculates a parallax between the reference image and the reference image
  • the stereo matching circuit includes a one-dimensional conversion unit that reads a two-dimensional image in units of block lines, and the reference image is read by each of the plurality of block lines.
  • a search is performed to detect a vertical shift of the reference image with respect to the reference image.
  • FIG. 1 is a block diagram of the stereo camera device 10.
  • a CPU 60 In the stereo camera device 10, a CPU 60, a photographing unit 20, an affine transformation unit 302, a parallax calculation unit 303, and an internal bus 70 are mounted on the same SoC (System-on-a-Chip) 90.
  • SoC System-on-a-Chip
  • the photographing unit 20 is connected to two cameras, a right camera 22 and a left camera 21.
  • the photographing unit 20 performs luminance correction and noise removal on the images taken by the left and right cameras 21 and 22, and then, via the internal bus 70, the source image right 220 and source image left 210 regions in the image memory 50. Write to.
  • the source image right 220 and the source image left 210 written in this way are corrected for lens distortion and positional deviation of the left and right cameras 21 and 22 by the affine conversion unit 302.
  • the corrected images are written in the image memory 50 as an affine rear right image 2210 and an affine rear left image 2110. Further, the parallax of these images is calculated by the stereo matching unit 3031 of the parallax calculation unit 303 to calculate distance information.
  • the vertical deviation detection unit 304 can detect the amount of vertical deviation between the left and right cameras 21 and 22. These results are stored in the parallax image 502 and the vertical shift detection result 503 in the image memory 50. Thereafter, the vertical deviation adjustment value setting process 601 operating in the CPU 60 calculates the vertical deviation amount using the vertical deviation detection result 503, and sets the value in the vertical deviation adjustment value register 3020 in the affine transformation unit 302. . According to the value of the register 3020, the affine transformation unit 302 can adjust the vertical shift between the left and right cameras 21 and 22. Image correction processing by the register 3020 follows the following calculation.
  • x and y are coordinate values of an image input to the affine transformation unit 302
  • is a rotation correction angle
  • ShiftX is a horizontal shift amount
  • ShiftY is a vertical shift amount.
  • FIG. 2 shows the parallax calculation processing of the parallax calculation unit 303.
  • An image captured by the right camera 22 is defined as a reference image, and a reference block image 221 such as 8 pixels ⁇ 8 pixels is defined.
  • the size of the block image is not limited to this example.
  • a reference image 212 having a search width (for example, 128 pixels) is selected from the images taken by the left camera 21 based on the same vertical position (Y coordinate) and horizontal position (X coordinate) as the reference block image 221. To do. Thereafter, the difference between the standard block image 221 and the reference image is calculated. This difference calculation is called SAD, and the following calculation is performed.
  • I is an 8 ⁇ 8 image block in the reference image
  • T is image data of the standard block image 221
  • i and j are coordinates in the image block.
  • the calculation is performed by the search width while shifting the reference position of the reference image pixel by pixel, and a position where the SAD value is the smallest is searched.
  • f is the focal length of the right and left cameras
  • B is the distance (baseline length) between the right camera 22 and the left camera 21.
  • FIG. 3 shows an outline of the processing of the vertical deviation detection unit 304.
  • a reference image A2211, a reference image B2212, and a reference image C2213 of 16 pixels ⁇ 16 pixels are determined at a plurality of positions aligned in a horizontal row of the right image 2210 after affine transformation.
  • a reference image A2111, a reference image B2112, and a reference image C2113 of 24 ⁇ 24 pixels are determined at the same position as the center thereof.
  • the reference image A2111 is subjected to two-dimensional block matching while shifting the standard image A2211 pixel by pixel in the horizontal direction and the vertical direction, and the most consistent Y coordinate is obtained. If there is no vertical shift, the reference image A2111 matches at the center of the reference image A2111, and the Y coordinate becomes zero.
  • the block matching evaluation function performs the same calculation as [Expression 2] for performing the parallax calculation.
  • the standard image B2212 detects a vertical shift in the reference image B2112
  • the standard image C2213 detects a vertical shift in the reference image C2113.
  • the accuracy of the vertical shift adjustment improves.
  • FIG. 4 shows the configuration of the parallax calculation unit 303.
  • the parallax calculation unit 303 performs stereo matching processing for calculating parallax and vertical deviation detection processing.
  • stereo matching processing an image having an 8 ⁇ 8 pixel size is placed in the reference image buffer A 3032 from the right image 2210 after affine transformation. This image is the reference block image 221 in FIG.
  • the reference image line buffer 3030 an image having an 8 ⁇ 128 pixel size from the same coordinate position as the right image 2210 is entered from the left image 2110 after affine transformation. This image is the reference image 212 in FIG.
  • These two buffers are connected to the stereo matching circuit 3031, an 8 ⁇ 8 pixel size image is extracted from the reference image line buffer 3030, the above-mentioned [Equation 2] is calculated by the coincidence evaluation unit 3034, and the result is evaluated Put in result memory A.
  • the matching score is evaluated while shifting this process pixel by pixel up to 128 pixels which is the horizontal size of the reference image line buffer 3030.
  • the evaluation result memory 3033 contains 128 evaluation results, from which the minimum value is extracted.
  • the position of the minimum value is parallax.
  • the accuracy of the parallax is the accuracy of the integer value of the coordinates.
  • the subpixel processing unit 3035 calculates subpixels.
  • the accuracy of the parallax value at that time decreases. Therefore, it is assumed that there is no parallax data.
  • one of the reference images from the left image 2110 after affine transformation is stored in the reference image block memory 3050.
  • data of 16 pixels vertically and 24 pixels horizontally is read from the memory 3050 to the block line buffer 3051.
  • the standard image corresponding to the reference image from the right image 2210 after affine transformation is entered in the standard image buffer B307.
  • the coincidence evaluation unit 3034 of the stereo matching circuit 3031 puts the result into one line in the evaluation result memory B306 while performing block matching.
  • data is read from a position shifted by one pixel in the vertical direction of the reference image block memory 3050 and stored in the block line buffer 3051. Thereafter, block matching is performed in the same manner. This is processed for all of the reference image block memory 3050.
  • evaluation results for 9 words ⁇ 9 lines are stored in the evaluation result memory B306.
  • the position of the minimum value in the evaluation result memory B306 becomes the matching position, and the evaluation value of the matching position and the evaluation value of the matching position and the X coordinate are the same and the Y coordinate is +1 and ⁇ 1 are sub-pixel processing unit 3035.
  • FIG. 5 shows a method of calculating a parallax sub-pixel.
  • the horizontal axis in FIG. 5 is the X coordinate obtained by scanning the reference image line buffer 3030, and the vertical axis is the coincidence evaluation value.
  • the evaluation value 4011 of the coordinate value X is minimum, the X becomes a matching position.
  • the slopes of the straight line 4013 and the straight line 4014 are calculated, and the one having the larger slope is selected.
  • a straight line 4015 passing through the evaluation value 4010 is calculated with a slope obtained by inverting the sign of the slope of the straight line 4013.
  • a point 4016 obtained by projecting the intersection of the straight line 4015 and the straight line 4013 onto the scan coordinate axis becomes a sub-pixel, and an accurate matching position can be calculated.
  • FIG. 6 shows a case where the sub-pixel process of the vertical deviation detection process is performed.
  • the horizontal axis indicates the coincidence evaluation value
  • the vertical axis indicates the Y coordinate.
  • the Y coordinate of the portion of the minimum value 4021 in the 9 word ⁇ 9 line of the evaluation result memory B306 becomes the matching position.
  • the inclinations of the straight line 4024 and the straight line 4023 are calculated using the evaluation values 4020 and 4022 of the upper and lower coordinates, and the one having the smaller absolute value of these inclinations is selected. In this example, since the inclination of the straight line 4023 is small, a straight line 4025 passing through the evaluation value 4020 is calculated with an inclination obtained by inverting the sign of the inclination of the straight line 4023.
  • a point 4026 obtained by projecting the intersection of the straight line 4025 and the straight line 4023 onto the Y coordinate becomes a sub-pixel, and an accurate matching position can be calculated.
  • both can be processed by the subpixel processing unit 3035.
  • FIG. 7 shows a flowchart of the vertical deviation adjustment value setting process 601.
  • one of the reference images from the left image 2110 after affine transformation is stored in the reference image block memory 3050. Further, the standard image corresponding to the reference image is stored in the standard image buffer B307 from the right image 2210 after affine transformation (S100).
  • the reference pointer Yp for reading the reference image block memory 3050 is initialized to zero (S110).
  • the data of 16 pixels vertically and 24 pixels horizontally is transferred from the position of the reference pointer Yp to the block line buffer 3051 (S120).
  • the stereo matching circuit 3031 processes block matching for one line.
  • the evaluation result is stored in one line of the evaluation result memory B306 (S130).
  • the minimum Y coordinate and its evaluation value are extracted from the result of the evaluation result memory B306 (S160).
  • the subpixel is calculated by the subpixel processing unit 3035 using the extracted data (S170).
  • the vertical shift amount is calculated from the Y coordinate including the sub-pixels at the matching positions of the reference images A2111, B2112, and C2113 (S190).
  • the calculated vertical deviation amount is set in the vertical deviation adjustment value register 3020 of the affine transformation unit 302 (S200).
  • the data set in this way is calculated by the affine transformation unit 302 as ⁇ and ShiftY in equation (1).
  • FIG. 8 shows a method of calculating the vertical deviation amount.
  • the horizontal axis represents the left X coordinate after affine transformation
  • the vertical axis represents the Y coordinate of the two-dimensional block matching process shown in FIG.
  • the matching position 501 of the reference image A, the matching position 502 of the reference image B, and the matching position 503 of the reference image C calculated in the flowchart of FIG. 7 are arranged in this figure.
  • These three points are approximated by an approximate line 500 by an approximation method such as a least square method.
  • an angle 504 between the horizontal line 505 extending horizontally from the intersection 506 and the approximate straight line 500 is the rotation angle ⁇ .
  • FIG. 9 shows a time chart of parallax calculation and vertical deviation detection. Since the parallax calculation and the vertical shift detection share the stereo matching circuit 3031, they are processed alternately.
  • the parallax calculation of the image (1) is started while the imaging unit 20 is capturing the image (1). Thereafter, after the parallax calculation is completed, vertical deviation detection is performed on the same image (1). Using the result, the vertical deviation can be adjusted by the affine transformation process at the time of the parallax calculation of the image (2). In this way, it is possible to reduce the time delay from when the image (1) is taken until the parallax calculation is completed. However, the image for which vertical deviation detection is performed and the image for which parallax calculation is performed are shifted and processed.
  • This method is suitable when the vertical deviation occurs gently. Further, in terms of power consumption, since the same stereo matching circuit 3031 is used for parallax calculation and vertical deviation detection, the power consumption of the parallax calculation unit 303 has a small amount of change. On the other hand, when the vertical shift detection and the parallax calculation have individual matching circuits without sharing them, the processing can be parallelized, and the power consumption increases when the vertical shift is detected.
  • FIG. 10 shows the processing order of the vertical deviation detection and the parallax calculation in FIG. 9 reversed.
  • the parallax calculation is performed on the image for which the parallax calculation is always performed after the vertical deviation detection is finished and the vertical deviation is adjusted, so that the parallax accuracy is improved.
  • This method is suitable when a vertical shift occurs at a high speed due to camera shake or the like.
  • block matching for vertical deviation detection and block matching for parallax calculation can be processed by common hardware, an increase in hardware amount and power consumption can be prevented.
  • the vertical shift detection process can be performed at high speed, the vertical shift of the image can be adjusted before performing the parallax calculation, so that high-precision parallax calculation is possible even in an environment where vertical shift occurs in units of frames. There is.

Landscapes

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

Abstract

本発明は、ステレオカメラの垂直ずれ調整の処理高速化のためにハードウェア化してもハード量の増加と消費電力の増加を防止する。本発明のステレオカメラ装置10は、基準画像と参照画像の視差を算出するステレオマッチング回路3031を備え、ステレオマッチング回路3031は、2次元画像をブロックライン単位で読み出す1次元変換部305を有し、参照画像を複数のブロックラインそれぞれで探索し、基準画像に対する参照画像の垂直ずれを検知する。

Description

ステレオカメラ装置
本発明は、ステレオカメラ装置に関する。
 車両の走行安全性を向上させるために、車両に搭載したカメラで前方の障害物を検知して、その障害物に衝突する可能性がある場合は、ドライバへの警報や自動ブレーキを行うシステムが研究されている。
 車両の前方を監視するセンサとして、ミリ波レーダー、レーザレーダ、カメラなどがある。カメラの種類としては、単眼カメラと、複数のカメラを使用したステレオカメラがある。ステレオカメラは、所定の間隔の2つのカメラで撮影された重複領域の視差を利用して、撮影された物体までの距離を計測することができる。このため、前方の物体までの衝突危険度を的確に把握することができる。
 ステレオカメラは、2つのカメラで撮影された画像の視差を求めて、その視差を距離に変換する。視差を求めるためには、2つのカメラ間の画像の一致度判定を行う必要がある。視差を正確に算出するためには、この2つの画像のレンズの歪みやカメラの位置ずれを正しく補正する必要がある。レンズの歪みは、ステレオカメラ装置を製造した時に補正パラメータを使用して、画像の歪みを補正することができる。一方、カメラの位置ずれは経年変化や温度変化、または振動によって発生するため、製品が出荷された後に補正パラメータを調整する必要がある。この位置ずれを補正する方式として、特許文献1が提案されている。
特開2003-256875号公報
 特許文献1では、ステレオカメラ装置が稼働中に、所定の時間間隔で垂直ずれをリアルタイムに補正するとしている。しかし、位置ずれ調整の処理はマイクロコンピュータのソフトウェアで処理されるため、視差演算の周期に比べて、非常に遅い周期になる。高速化のためにこのソフトウェアによる位置ずれ調整処理をハード化した場合、その分のハード量が増加することになり、コストや消費電力の増加する課題がある。
 本発明は、ステレオカメラ装置において、位置ずれ調整のハード化に伴うハード量の増加と消費電力の増加を防止することを目的としている。
 上記課題を解決するための本発明の特徴は、例えば以下の通りである。基準画像と参照画像の視差を算出するステレオマッチング回路を備え、該ステレオマッチング回路は、2次元画像をブロックライン単位で読み出す1次元変換部を有し、前記参照画像を複数の前記ブロックラインそれぞれで探索し、前記基準画像に対する前記参照画像の垂直ずれを検知する。
 本発明によれば、位置ずれ検知のブロックマッチングと視差演算のブロックマッチングを共通のハードウェアで処理することができるため、ハード量の増加と消費電力の増加を防止できる効果がある。上記した以外の課題、構成及び効果は以下の実施形態の説明により明らかにされる。
ステレオカメラ装置の機能ブロック図 視差演算の説明図 垂直ずれ検知を行うための基準画像と参照画像を示す図 視差演算部の構成を示す図 視差演算のサブピクセルの算出方法を示す図 垂直ずれ検知のサブピクセルの算出方法を示す図 垂直ずれ調整値設定処理のフローチャート 垂直ずれ検知の結果から垂直ずれ調整値を算出する方法を示す図 視差演算の後で垂直ずれ検知を処理するタイムチャート 垂直ずれ検知の後で視差演算を処理するタイムチャート
 以下、図面等を用いて、本発明の実施形態について説明する。以下の説明は本発明の内容の具体例を示すものであり、本発明がこれらの説明に限定されるものではなく、本明細書に開示される技術的思想の範囲内において当業者による様々な変更および修正が可能である。また、本発明を説明するための全図において、同一の機能を有するものは、同一の符号を付け、その繰り返しの説明は省略する場合がある。
 図1は、ステレオカメラ装置10のブロック図を示したものである。該ステレオカメラ装置10は、CPU60、撮影部20、アフィン変換部302、視差演算部303、内部バス70が同一のSoC(System on a Chip)90に搭載される。
 撮影部20は、右カメラ22と左カメラ21の2つのカメラに接続される。撮影部20は、左右カメラ21、22が撮影した画像を輝度補正やノイズ除去を行った後、内部バス70を経由して、画像メモリ50の中のソース画像右220とソース画像左210の領域に書き込む。
 このようにして書き込まれたソース画像右220とソース画像左210は、アフィンへ変換部302によって、レンズの歪みや左右カメラ21、22の位置ずれが補正される。この補正された画像は、画像メモリ50に、アフィン後右画像2210とアフィン後左画像2110として書き込まれる。またこれらの画像は視差演算部303のステレオマッチング部3031によって、距離情報の算出のため視差が演算される。
 更に、垂直ずれ検知部304によって、左右カメラ21、22の垂直ずれのずれ量を検知することができる。これらの結果は画像メモリ50の視差画像502と垂直ずれ検知結果503に格納される。その後、CPU60で動作する垂直ずれ調整値設定処理601が、前記垂直ずれ検知結果503を用いて垂直ずれ量を算出し、アフィン変換部302の中の垂直ずれ調整値レジスタ3020にその値を設定する。前記レジスタ3020の値に従って、アフィン変換部302は、左右カメラ21、22の垂直ずれを調整することが可能となる。前記レジスタ3020による画像の補正処理は以下の演算に従う。
Figure JPOXMLDOC01-appb-M000001
 但し、x,yはアフィン変換部302に入力される画像の座標値、θは回転補正角度、ShiftXは水平ずれ量、ShiftYは垂直ずれ量である。
 図2は、視差演算部303の視差演算処理を示したものである。右カメラ22が撮影した画像を基準画像とし、例えば8画素x 8画素のような基準ブロック画像221を定義する。ブロック画像のサイズはこの例に限るものではない。一方、左カメラ21が撮影した画像の中で、前記基準ブロック画像221と同じ縦位置(Y座標)と横位置(X座標)を基準として、探索幅(例えば128画素)の参照画像212を選択する。その後、前記基準ブロック画像221と前記参照画像との差分を計算する。この差分計算はSADと呼ばれ、次の計算を行う。
Figure JPOXMLDOC01-appb-M000002
 但し、Iは前記参照画像の中の8x8画像ブロック、Tは前記基準ブロック画像221の画像データであり、i,jは画像ブロック内の座標である。1つの視差を算出するために、前記参照画像の参照位置を1画素ずつずらしながら前記探索幅の分だけ演算を行い、最もSAD値が小さくなる位置を探索する。
 図2に示す、車両の前方窓から見た実際の風景230には、前方車両200がある。右カメラ22で撮影した右画像2210と、左カメラ21で撮影した左画像2110がある時、前方車両200の一部201は、右画像2210では位置221の位置に撮影され、左画像2110では位置211の位置に撮影される。この結果、基準ブロック画像221の位置と参照ブロック画像211には視差dが生じる。この視差dは、前方車両200がステレオカメラ装置10に近い場合は大きい値となり、遠いものは小さい値となる。このように求めた視差を、画像全体で求める。この視差dを用いて、三角測量の原理でステレオカメラ装置10までの距離を測定することが出来る。
視差dから距離Zは次の式で求められる。
Figure JPOXMLDOC01-appb-M000003
 但し、fは右及び左カメラの焦点距離、Bは右カメラ22と左カメラ21の距離(基線長)である。
 図3は、垂直ずれ検知部304の処理の概要を示す。アフィン変換後右画像2210の横一列に揃った複数個所に16画素x16画素の基準画像A2211、基準画像B2212、基準画像C2213を決める。アフィン変換後左画像2110には、それらの中心と同じ位置に24x24画素の参照画像A2111、参照画像B2112、参照画像C2113を決める。その後、参照画像A2111に対して基準画像A2211を1画素ずつ横方向及び縦方向にずらしながら2次元ブロックマッチングを行い、最も一致するY座標を求める。垂直ずれがなければ、参照画像A2111の中心で基準画像A2211がマッチングするため、Y座標はゼロになる。
 ブロックマッチングの評価関数は、視差演算を行う[数2]と同じ演算を行う。以降同様に、基準画像B2212は参照画像B2112で垂直ずれを検知し、基準画像C2213は参照画像C2113で垂直ずれを検知する。前記基準画像と参照画像の数が多いほど、縦ずれ調整の精度が向上する。この縦ずれ検知処理をハードウェア化して高速処理を可能とすることで、前記基準画像と参照画像の数を増やすことができる。
 図4は、視差演算部303の構成を示したものである。視差演算部303は、視差を算出するためのステレオマッチング処理と、垂直ずれ検知処理を行う。ステレオマッチング処理は、アフィン変換後右画像2210の中から、8x8画素サイズの画像を基準画像バッファA3032に入れる。この画像は、図2における基準ブロック画像221である。
 参照画像ラインバッファ3030には、アフィン変換後左画像2110の中から前記右画像2210と同じ座標位置から8x128画素サイズの画像を入れる。この画像は、図2における参照画像212である。これらの2つのバッファをステレオマッチング回路3031に接続し、参照画像ラインバッファ3030から8x8画素サイズの画像を抽出して、一致度評価部3034で前記[数2]の計算を行い、その結果を評価結果メモリAに入れる。
 この処理を参照画像ラインバッファ3030の横方向のサイズである128画素まで1画素ずつずらしながら一致度評価を行う。評価結果メモリ3033は128個の評価結果が入っており、この中から最小値を抽出する。その最小値の位置が視差となる。しかし、このままでは、視差の精度は座標の整数値の精度である。更に精度を上げるため、サブピクセル処理部3035でサブピクセルの算出を行う。
 また、ステレオマッチング処理の前記評価結果メモリ3033の中で、最小値が複数存在する場合、または最小値から所定の範囲内に評価値が複数存在した場合は、その時の視差値は精度が低下しているため、視差データは無いものとする。縦ずれ検知処理の場合は、参照画像ブロックメモリ3050にアフィン変換後左画像2110から参照画像の1つを格納する。
  次にそのメモリ3050から縦16画素、横24画素のデータをブロックラインバッファ3051に読み出す。また、基準画像バッファB307には、アフィン変換後右画像2210から、前記参照画像に対応した基準画像を入れる。
 ステレオマッチング回路3031の一致度評価部3034で、ブロックマッチングを行いながらその結果を評価結果メモリB306の中の1つのラインに入れていく。1つのラインの処理が終了したら、参照画像ブロックメモリ3050の縦方向に1画素ずらした位置からデータを読み出してブロックラインバッファ3051に格納する。以下同様にブロックマッチングを行う。これを参照画像ブロックメモリ3050の全てについて処理する。
 その結果、評価結果メモリB306には、9ワードx9ライン分の評価結果が入る。評価結果メモリB306の中の最小値の位置がマッチング位置となり、そのマッチング位置の評価値と、そのマッチング位置とX座標は同じでY座標が+1、-1の評価値をサブピクセル処理部3035に送り、Y方向のサブピクセルを算出する。前記評価値の最小値が複数存在した場合、または、最小値から所定の範囲内の評価値が複数存在した場合、縦ずれが無いものとする。
 図5は、視差のサブピクセルを算出する方法を示したものである。図5の横軸は参照画像ラインバッファ3030をスキャンしたX座標で、縦軸は一致度評価値である。座標値Xの評価値4011が最小であった時にそのXはマッチング位置となる。その前後の座標の一致度評価値4010と4012を用いて、直線4013と直線4014の傾きを計算し、これらの傾きが大きい方を選択する。この例では直線4013の傾きが大きいので、直線4013の傾きの符号を反転した傾きで評価値4010を通る直線4015を計算する。その直線4015と直線4013の交点をスキャン座標軸に投影した点4016がサブピクセルとなり、正確なマッチング位置を算出することができる。
 図6は、垂直ずれ検知処理のサブピクセル処理を行う場合について示したものである。横軸に一致度評価値、縦軸にはY座標を示す。評価結果メモリB306の9ワードx9ラインの中の最小値4021の部分のY座標がマッチング位置となる。その上下の座標の評価値4020、4022を用いて直線4024と直線4023の傾きを計算し、これらの傾きの絶対値が小さい方を選択する。この例では直線4023の傾きが小さいので、直線4023の傾きの符号を反転した傾きで評価値4020を通る直線4025を計算する。その直線4025と直線4023の交点をY座標に投影した点4026がサブピクセルとなり、正確なマッチング位置を算出することができる。
  以上のように、図5と図6では基本的な処理は同じであるため、サブピクセル処理部3035でどちらも処理が可能である。
 図7は、縦ずれ調整値設定処理601のフローチャートを示したものである。
 まず、アフィン変換後左画像2110から参照画像の1つを参照画像ブロックメモリ3050に格納する。更にアフィン変換後右画像2210から、前記参照画像に対応した基準画像を基準画像バッファB307に格納する(S100)。
 次に、参照画像ブロックメモリ3050を読み出すための参照ポインタYpをゼロに初期化する(S110)。
 前記参照ポインタYpの位置から縦16画素、横24画素のデータをブロックラインバッファ3051に転送する(S120)。
 このデータを用いて、ステレオマッチング回路3031で1ライン分のブロックマッチングを処理する。評価結果は評価結果メモリB306の1ラインに格納する(S130)。
 1ライン分のブロックマッチングが終了すると前記参照ポインタYpを更新する(S140)。
 参照画像ブロックメモリ3050の最後までブロックマッチングを行ったか判定し、終了するまでS120から処理を繰り返す(S150)。
 1つの参照画像のブロックマッチングが終了した場合は、評価結果メモリB306の結果から最小値のY座標とその評価値を抽出する(S160)。
 その抽出されたデータを用いてサブピクセル処理部3035でサブピクセルを算出する(S170)。
 参照画像A2111、B2112、C2113の全てが終了するまでS100から処理を繰り返す(S180)。
 次に、参照画像A2111、B2112、C2113のマッチング位置のサブピクセルを含めたY座標から縦すれ量を算出する(S190)。
 垂直ずれ量の算出方法は図8で説明する。次に、算出された垂直ずれ量をアフィン変換部302の垂直ずれ調整値レジスタ3020に設定する(S200)。
 このようにして設定されたデータは、式(1)のθとShiftYとしてアフィン変換部302で演算される。
 図8は、垂直ずれ量を算出する方法を示したものである。横軸にアフィン変換後左のX座標、縦軸には図3に示す2次元ブロックマッチング処理のY座標とする。図7のフローチャートで算出された、参照画像Aのマッチング位置501、参照画像Bのマッチング位置502、参照画像Cのマッチング位置503をこの図に配置する。最小二乗法等の近似手法によって、これらの3点を近似直線500で近似する。その結果、この直線503のY軸との交点506が左画像垂直オフセットShiftYとなる。また、交点506から水平に伸ばした水平線505と近似直線500の角度504が回転角θとなる。
 図9は、視差演算と垂直ずれ検知のタイムチャートを示したものである。視差演算と垂直ずれ検知はステレオマッチング回路3031を共用するため、交互に処理を行う。撮影部20が画像(1)を取り込んでいる途中から、画像(1)の視差演算を開始する。その後、視差演算が終了した後に、同じ画像(1)で垂直ずれ検知を行う。その結果を用いて画像(2)の視差演算のときのアフィン変換処理で垂直ずれ調整が可能となる。このようにすると、画像(1)が撮影されてから視差演算が終了するまでの時間遅れを少なくすることができる。但し、垂直ずれ検知を行う画像と視差演算を行う画像がずれて処理される。この方法は、垂直ずれが緩やかに発生する場合に適している。また、消費電力では、視差演算と垂直ずれ検知では同じステレオマッチング回路3031を使用しているので、視差演算部303の消費電力は変化量が少ない。一方、垂直ずれ検知と視差演算でマッチング回路を共用せず個別に持つ場合は、処理を並列化できる代わりに、垂直ずれ検知の時は消費電力が増える。
 図10は、図9の垂直ずれ検知と視差演算の処理順序を逆にしたものである。このようにすると、視差演算を行う画像は、常に垂直ずれ検知が終わって垂直ずれが調整された後で視差演算が行われるので、視差の精度が高くなる。この方法は、カメラのブレ等で垂直ずれが高速に発生する場合に適している。
 以上の実施例によれば、垂直ずれ検知のブロックマッチングと視差演算のブロックマッチングを共通のハードウェアで処理することができるため、ハード量の増加と消費電力の増加を防止できる効果がある。また、垂直ずれ検知処理を高速処理できるため、視差演算を行う前にその画像の垂直ずれを調整できるため、フレーム単位で垂直ずれが発生するような環境でも高精度な視差演算が可能となる効果がある。
10 ステレオカメラ装置
20 撮影部
21 左カメラ
22 右カメラ
50 画像メモリ
60 CPU
70 内部リバス
90 SoC
210 ソース画像左
220 ソース画像右
302 アフィン変換部
303 視差演算部
304 垂直ずれ検知部
305 1次元変換部
306 評価結果メモリB
307 基準画像バッファB
502 視差画像
503 垂直ずれ検知結果
601 垂直ずれ調整値設定処理
2110 アフィン変換後左画像
2210 アフィン変換後右画像
3020 垂直ずれ調整値レジスタ
3030 参照画像ラインバッファ
3031 ステレオマッチング回路
3032 基準画像バッファA
3033 評価結果メモリA
3034 一致度評価部
3035 サブピクセル処理部
3050 参照画像ブロックメモリ
3051 ブロックラインバッファ

Claims (5)

  1.  基準画像と参照画像の視差を算出するステレオマッチング回路を備え、
     該ステレオマッチング回路は、2次元画像をブロックライン単位で読み出す1次元変換部を有し、
     前記参照画像を複数の前記ブロックラインそれぞれで探索し、前記基準画像に対する前記参照画像の垂直ずれを検知することを特徴とするステレオカメラ装置。
  2.  前記1次元変換部は、参照画像の垂直位置をずらしながら抽出された1ライン分のブロックラインデータを保持するブロックラインバッファを有することを特徴とする、請求項1に記載のステレオカメラ装置。
  3.  前記ステレオマッチング回路は、複数の前記探索した前記ブロックラインの結果を保持するメモリを有し、
     該メモリから前記基準画像との一致度が最も大きい前記参照画像の位置をマッチング位置とし、
     前記マッチング位置のマッチング結果と、前記マッチング位置の上下の前記ブロックラインに位置するマッチング結果とを用いて、垂直方向にサブピクセルを算出することを特徴とする、請求項1又は2に記載のステレオカメラ装置。
  4.  垂直ずれ検知に使用した画像の垂直ずれを調整し、前記調整された画像で視差を算出する、請求項1乃至3のいずれかに記載のステレオカメラ装置。
  5.  前記視差を算出する処理の消費電力と、前記垂直ずれの検知する処理の消費電力との差が所定値以下であることを特徴とする、請求項1乃至4のいずれかに記載のステレオカメラ装置。
PCT/JP2018/020661 2017-06-15 2018-05-30 ステレオカメラ装置 WO2018230340A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP18818696.9A EP3640585B1 (en) 2017-06-15 2018-05-30 Stereo camera device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017-117336 2017-06-15
JP2017117336A JP6789888B2 (ja) 2017-06-15 2017-06-15 ステレオカメラ装置

Publications (1)

Publication Number Publication Date
WO2018230340A1 true WO2018230340A1 (ja) 2018-12-20

Family

ID=64659144

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/020661 WO2018230340A1 (ja) 2017-06-15 2018-05-30 ステレオカメラ装置

Country Status (3)

Country Link
EP (1) EP3640585B1 (ja)
JP (1) JP6789888B2 (ja)
WO (1) WO2018230340A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3916349A4 (en) * 2019-01-22 2023-02-22 Hitachi Astemo, Ltd. IMAGE PROCESSING DEVICE

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7134113B2 (ja) * 2019-02-12 2022-09-09 日立Astemo株式会社 画像処理装置
JP7492372B2 (ja) * 2020-05-08 2024-05-29 株式会社Subaru 画像処理装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05114099A (ja) * 1991-10-22 1993-05-07 Fuji Heavy Ind Ltd 車輌用距離検出装置
JP2003256875A (ja) 2002-02-27 2003-09-12 Fuji Heavy Ind Ltd ステレオ画像の位置ずれ調整装置、位置ずれ調整方法、およびステレオ式監視装置
JP2005009883A (ja) * 2003-06-16 2005-01-13 Calsonic Kansei Corp ステレオカメラ装置
JP2011118509A (ja) * 2009-12-01 2011-06-16 Fuji Heavy Ind Ltd 道路認識装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5768404A (en) * 1994-04-13 1998-06-16 Matsushita Electric Industrial Co., Ltd. Motion and disparity estimation method, image synthesis method, and apparatus for implementing same methods
JP3280001B2 (ja) * 1999-09-16 2002-04-30 富士重工業株式会社 ステレオ画像の位置ずれ調整装置
US6674892B1 (en) * 1999-11-01 2004-01-06 Canon Kabushiki Kaisha Correcting an epipolar axis for skew and offset
JP5792662B2 (ja) * 2011-03-23 2015-10-14 シャープ株式会社 視差算出装置、距離算出装置及び視差算出方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05114099A (ja) * 1991-10-22 1993-05-07 Fuji Heavy Ind Ltd 車輌用距離検出装置
JP2003256875A (ja) 2002-02-27 2003-09-12 Fuji Heavy Ind Ltd ステレオ画像の位置ずれ調整装置、位置ずれ調整方法、およびステレオ式監視装置
JP2005009883A (ja) * 2003-06-16 2005-01-13 Calsonic Kansei Corp ステレオカメラ装置
JP2011118509A (ja) * 2009-12-01 2011-06-16 Fuji Heavy Ind Ltd 道路認識装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3640585A4

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3916349A4 (en) * 2019-01-22 2023-02-22 Hitachi Astemo, Ltd. IMAGE PROCESSING DEVICE

Also Published As

Publication number Publication date
EP3640585A1 (en) 2020-04-22
JP6789888B2 (ja) 2020-11-25
JP2019002787A (ja) 2019-01-10
EP3640585A4 (en) 2021-03-10
EP3640585B1 (en) 2022-11-23

Similar Documents

Publication Publication Date Title
JP5293131B2 (ja) 車両用複眼距離測定装置及び複眼距離測定方法
EP2642447A2 (en) Device for the calibration of a stereo camera
US20060227041A1 (en) Apparatus, method and computer program product for calibrating image transform parameter, and obstacle detection apparatus
CN111263142B (zh) 一种摄像模组光学防抖的测试方法、装置、设备及介质
WO2018123642A1 (ja) ステレオカメラ
WO2018230340A1 (ja) ステレオカメラ装置
JP5365387B2 (ja) 位置検出装置
JP6515650B2 (ja) 校正装置、距離計測装置及び校正方法
JP6708730B2 (ja) 移動体
JP6602982B2 (ja) 車載カメラ、車載カメラの調整方法、車載カメラシステム
JP6035774B2 (ja) 画像処理装置、画像処理方法、及び車両
JP6536529B2 (ja) 車載カメラのキャリブレーション装置及び車載カメラのキャリブレーション方法
JP6040782B2 (ja) 画像処理装置及びプログラム
JP7004971B2 (ja) 校正装置、校正方法及び校正プログラム
JP7118717B2 (ja) 画像処理装置およびステレオカメラ装置
CN117557944A (zh) 雷达和视频融合的目标检测方法、系统、设备及介质
JP7152506B2 (ja) 撮像装置
JPH07152914A (ja) 車輌用距離検出装置
EP4235574A1 (en) Measuring device, moving device, measuring method, and storage medium
US10726528B2 (en) Image processing apparatus and image processing method for image picked up by two cameras
JP6241083B2 (ja) 撮像装置及び視差検出方法
JPH09126759A (ja) 車載カメラによる測距方法およびそれを用いる測距装置
CN112465920A (zh) 一种视觉传感器标定方法及装置
JPH11223516A (ja) 3次元画像撮像装置
EP4030746A1 (en) Image processing device and stereo camera device using same

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018818696

Country of ref document: EP

Effective date: 20200115