Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7491024B2 - Object detection device and program - Google Patents
[go: Go Back, main page]

JP7491024B2 - Object detection device and program - Google Patents

Object detection device and program Download PDF

Info

Publication number
JP7491024B2
JP7491024B2 JP2020064085A JP2020064085A JP7491024B2 JP 7491024 B2 JP7491024 B2 JP 7491024B2 JP 2020064085 A JP2020064085 A JP 2020064085A JP 2020064085 A JP2020064085 A JP 2020064085A JP 7491024 B2 JP7491024 B2 JP 7491024B2
Authority
JP
Japan
Prior art keywords
distance
image
compound eye
camera
monocular
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
JP2020064085A
Other languages
Japanese (ja)
Other versions
JP2021163204A (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.)
Denso Corp
Original Assignee
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 Denso Corp filed Critical Denso Corp
Priority to JP2020064085A priority Critical patent/JP7491024B2/en
Publication of JP2021163204A publication Critical patent/JP2021163204A/en
Application granted granted Critical
Publication of JP7491024B2 publication Critical patent/JP7491024B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Description

本発明は、車両などの移動体における物体検出装置、及びプログラムに関する。 The present invention relates to an object detection device and a program for detecting an object in a moving body such as a vehicle.

従来、ステレオカメラを車両に搭載し、一対の撮影画像に基づいて車両周囲に存在する物体を検出する装置が知られている(例えば、特許文献1)。この装置では、ステレオカメラを構成する2台のカメラにより撮影された第1画像及び第2画像における視差に基づいて、車両と物体との間の距離を算出する。 Conventionally, there is known a device that mounts a stereo camera on a vehicle and detects objects around the vehicle based on a pair of captured images (for example, see Patent Document 1). This device calculates the distance between the vehicle and the object based on the parallax between a first image and a second image captured by the two cameras that make up the stereo camera.

特許第4814669号公報Japanese Patent No. 4814669

上記の距離の算出では、第1画像及び第2画像における視差から、三角測量の原理によって、車両と物体との間の距離が算出される。この場合、当該距離と視差とは互いに反比例の関係にあり、距離が長くなるほど視差が小さくなる。また、視差が小さいほど距離の算出精度が低下し、この距離に含まれる誤差は、誤差が小さくなるに従って急激に大きくなるといった不具合が懸念される。 In the above distance calculation, the distance between the vehicle and the object is calculated from the parallax in the first image and the second image using the principle of triangulation. In this case, the distance and the parallax are inversely proportional to each other, and the longer the distance, the smaller the parallax. Furthermore, the smaller the parallax, the lower the accuracy of the distance calculation, and there is a concern that the error contained in this distance will rapidly increase as the error becomes smaller.

本発明は、上記事情に鑑みてなされたものであり、その目的は、第1画像及び第2画像における視差に基づいて、移動体と物体との間の距離を精度良く算出できる物体検出装置、及びプログラムを提供することにある。 The present invention has been made in consideration of the above-mentioned circumstances, and its purpose is to provide an object detection device and a program that can accurately calculate the distance between a moving body and an object based on the disparity between a first image and a second image.

上記課題を解決するための手段は、視差を含む第1画像及び第2画像を撮影する第1カメラ及び第2カメラが搭載された移動体に適用され、前記第1画像及び前記第2画像に基づいて、前記移動体の周囲に存在する物体を検出する物体検出装置であって、前記第1画像上の前記物体の位置と前記第2画像上の前記物体の位置とから求められる視差に基づいて、前記移動体と前記物体との間の距離を複眼距離として算出する複眼距離算出部と、前記第1画像及び前記第2画像の一方を用い、当該一方の画像上の前記物体の大きさに基づいて、前記移動体と前記物体との間の距離を単眼距離として算出する単眼距離算出部と、前記複眼距離と前記単眼距離との差分値を複数回に亘って取得し、取得された複数の前記差分値の中間値に基づいて前記複眼距離を補正する距離補正部と、を備える。 The means for solving the above problem is an object detection device that is applied to a moving body equipped with a first camera and a second camera that capture a first image and a second image including parallax, and detects an object present around the moving body based on the first image and the second image, and includes a compound eye distance calculation unit that calculates the distance between the moving body and the object as a compound eye distance based on the parallax obtained from the position of the object on the first image and the position of the object on the second image, a monocular distance calculation unit that uses one of the first image and the second image to calculate the distance between the moving body and the object as a monocular distance based on the size of the object on the one image, and a distance correction unit that obtains a difference value between the compound eye distance and the monocular distance multiple times and corrects the compound eye distance based on the intermediate value of the obtained multiple difference values.

第1カメラにより撮影された第1画像上の物体の位置と、第2カメラにより撮影された第2画像上の物体の位置とから求められる視差に基づいて、移動体と物体との間の距離を複眼距離として算出する場合、物体が移動体の遠方に存在している場合に、複眼距離の誤差が急激に大きくなり、その算出精度が低下する。 When the distance between a moving body and an object is calculated as the compound eye distance based on the parallax obtained from the position of the object on the first image captured by the first camera and the position of the object on the second image captured by the second camera, if the object is located far away from the moving body, the error in the compound eye distance increases rapidly and the calculation accuracy decreases.

その点、上記構成では、第1画像及び第2画像の一方を用い、当該一方の画像上の物体の大きさに基づいて、移動体と物体との間の距離を単眼距離として算出するようにした。ここで画像上の物体の大きさは、その物体に相当する画素の数である画素数を用いて表される。この場合、単眼距離には、最大で1画素相当分の長さに依存する誤差が生じ、その誤差の大きさは概ね移動物と物体との間の距離に比例したものとなる。そのため、例えば物体が移動体の遠方に存在している場合、単眼距離の誤差は複眼距離の誤差よりも小さくなる。そのため、複眼距離と単眼距離との差分値に基づいて複眼距離を補正することで、複眼距離の誤差を抑制することができる。 In this regard, in the above configuration, one of the first image and the second image is used, and the distance between the moving body and the object is calculated as the monocular distance based on the size of the object in that one image. Here, the size of the object in the image is expressed using the number of pixels, which is the number of pixels corresponding to the object. In this case, an error occurs in the monocular distance that depends on the length of up to one pixel, and the magnitude of the error is roughly proportional to the distance between the moving body and the object. Therefore, for example, when the object is located far away from the moving body, the error in the monocular distance is smaller than the error in the compound eye distance. Therefore, the error in the compound eye distance can be suppressed by correcting the compound eye distance based on the difference value between the compound eye distance and the monocular distance.

この場合に、上記構成では、複眼距離と単眼距離との差分値を複数回に亘って取得し、取得された複数の差分値の中間値に基づいて複眼距離を補正するようにした。複眼距離では、移動体と物体との間の実距離に対するずれ方向が一定であるのに対し、単眼距離では、画素数の増減に伴う変動により実距離に対するずれ方向が変動する。そのため、複数の差分値の中間値に基づいて複眼距離を補正することで、単眼距離のずれ方向の変動の影響を抑制することができ、第1画像及び第2画像における視差に基づいて、移動体と物体との間の距離を精度よく算出することができる。 In this case, in the above configuration, the difference value between the compound eye distance and the monocular distance is acquired multiple times, and the compound eye distance is corrected based on the intermediate value of the acquired multiple difference values. In the compound eye distance, the direction of deviation from the actual distance between the moving body and the object is constant, whereas in the monocular distance, the direction of deviation from the actual distance varies due to fluctuations associated with an increase or decrease in the number of pixels. Therefore, by correcting the compound eye distance based on the intermediate value of multiple difference values, the influence of fluctuations in the direction of deviation of the monocular distance can be suppressed, and the distance between the moving body and the object can be calculated with high accuracy based on the parallax in the first image and the second image.

第1実施形態に係る物体検知システムの全体構成図。1 is an overall configuration diagram of an object detection system according to a first embodiment. 三角測量の原理を説明する図。FIG. 1 is a diagram explaining the principle of triangulation. 第1実施形態に係る補正処理の手順を示すフローチャート。5 is a flowchart showing a procedure of a correction process according to the first embodiment. 複眼距離の推移を示すグラフ。Graph showing the change in compound eye distance. 単眼距離の推移を示すグラフ。13 is a graph showing the change in monocular distance. 距離差の推移を示すグラフ。11 is a graph showing a change in distance difference. 第1実施形態に係る平均視差ずれ量の推移を示すグラフ。6 is a graph showing a transition of an average parallax shift amount according to the first embodiment. 第2実施形態に係る物体検知システムの全体構成図。FIG. 11 is an overall configuration diagram of an object detection system according to a second embodiment. 第2実施形態に係る補正処理の手順を示すフローチャート。10 is a flowchart showing a procedure of a correction process according to a second embodiment. 複眼距離及び単眼距離の推移を示すグラフ。13 is a graph showing changes in compound eye distance and monocular distance. 比較例における平均視差ずれ量の推移を示すグラフ。11 is a graph showing a change in average parallax shift amount in a comparative example. 第2実施形態に係る平均視差ずれ量の推移を示すグラフ。13 is a graph showing a transition of an average parallax shift amount according to the second embodiment.

(第1実施形態)
以下、本発明を具体化した実施形態を図面に基づいて説明する。本実施形態は、車両に搭載された物体検知システムを具体化している。当該システムは、例えば、車両に搭載される車両システムの一例であり、車両の周囲に存在する物体(例えば、他の車両や道路構造物等)を検知する。
First Embodiment
Hereinafter, an embodiment of the present invention will be described with reference to the drawings. The embodiment is an object detection system mounted on a vehicle. The system is an example of a vehicle system mounted on a vehicle, and detects objects (e.g., other vehicles, road structures, etc.) present around the vehicle.

まず、本実施形態に係る車両の物体検知システムの概略構成について図1を用いて説明する。移動体としての車両50は、ステレオカメラ10と、物体検出装置としてのECU20と、ECU20の制御対象としての被制御装置30とを備えている。 First, the schematic configuration of the vehicle object detection system according to this embodiment will be described with reference to FIG. 1. A vehicle 50 as a moving body includes a stereo camera 10, an ECU 20 as an object detection device, and a controlled device 30 as a control target of the ECU 20.

ステレオカメラ10は、車両50の前方を撮影できるよう光軸を車両50の前方に向けた状態で車両50の前部に設置されている。ステレオカメラ10は、右カメラ11及び左カメラ12を備えている。右カメラ11及び左カメラ12は、重力方向において同じ高さに配置されるとともに左右(水平)方向に離れた位置に配置されている。なお、本実施形態において、左右方向が「所定方向」に相当し、右カメラ11及び左カメラ12がそれぞれ「第1カメラ及び第2カメラ」に相当する。 The stereo camera 10 is installed at the front of the vehicle 50 with its optical axis facing forward of the vehicle 50 so that it can capture images of the area in front of the vehicle 50. The stereo camera 10 is equipped with a right camera 11 and a left camera 12. The right camera 11 and the left camera 12 are disposed at the same height in the direction of gravity and are disposed at positions separated in the left-right (horizontal) direction. In this embodiment, the left-right direction corresponds to the "predetermined direction", and the right camera 11 and the left camera 12 correspond to the "first camera and the second camera", respectively.

右カメラ11及び左カメラ12は、車両50の前方に位置する同一の物体を異なる方向から撮影する。右カメラ11及び左カメラ12は、所定周期で同時に撮影を行い、右カメラ11で撮影された右画像及び左カメラ12で撮影された左画像は、それぞれECU20に出力される。右カメラ11及び左カメラ12は、例えば、それぞれがCCDイメージセンサやCMOSイメージセンサで構成されている。なお、本実施形態において、右画像及び左画像がそれぞれ「第1画像及び第2画像」に相当する。 The right camera 11 and the left camera 12 capture images of the same object located in front of the vehicle 50 from different directions. The right camera 11 and the left camera 12 capture images simultaneously at a predetermined cycle, and the right image captured by the right camera 11 and the left image captured by the left camera 12 are each output to the ECU 20. The right camera 11 and the left camera 12 are each configured, for example, with a CCD image sensor or a CMOS image sensor. In this embodiment, the right image and the left image correspond to the "first image and the second image", respectively.

ECU20は、CPUや各種メモリ等を備えたコンピュータを主体として構成されている。ECU20は、ステレオカメラ10の右カメラ11及び左カメラ12によってそれぞれ出力された右画像及び左画像に基づいて、車両前方に位置する物体を検出し、その物体までの距離を算出する。 The ECU 20 is mainly composed of a computer equipped with a CPU, various memories, etc. The ECU 20 detects an object located in front of the vehicle based on the right image and the left image output by the right camera 11 and the left camera 12 of the stereo camera 10, respectively, and calculates the distance to the object.

物体までの距離の算出には、周知のステレオマッチング処理を用いた手法が適用される。簡単に説明すると、ECU20は、同時に撮影された右画像及び左画像を取得し、これらの画像に共通に存在する物体の位置の視差DP(画像上のずれ量)に基づき、三角測量の原理を用いて物体までの距離を算出する。以下、視差DPに基づいて算出された物体までの距離を、複眼距離LPという。 A method using well-known stereo matching processing is applied to calculate the distance to an object. Simply put, the ECU 20 acquires right and left images captured simultaneously, and calculates the distance to the object using the principles of triangulation based on the parallax DP (amount of shift on the image) of the position of an object that is commonly present in these images. Hereinafter, the distance to the object calculated based on the parallax DP is referred to as the compound eye distance LP.

また、ECU20は、算出された複眼距離LPに基づいて、その物体に対する接触回避処理等を実施する。具体的には、被制御装置30である警報装置31及びブレーキ装置32を、それぞれ所定の作動タイミングで作動させる。警報装置31は、ECU20からの制御指令により、ドライバに対して車両前方に物体が存在することを警報する。警報装置31は、例えば、車室内に設けられたスピーカや、画像を表示する表示部により構成されている。また、ブレーキ装置32は、車両50の制動力を変化させるブレーキ機構と、このブレーキ機構の動作を制御するブレーキECUとを備えている。ブレーキECUは、ECU20と通信可能に接続されており、ECU20からの制御指令により、ブレーキ機構を制御する。 The ECU 20 also performs contact avoidance processing for the object based on the calculated compound eye distance LP. Specifically, it activates the controlled devices 30, the warning device 31 and the brake device 32, at a predetermined activation timing. The warning device 31 warns the driver of the presence of an object in front of the vehicle in response to a control command from the ECU 20. The warning device 31 is composed of, for example, a speaker installed in the vehicle cabin and a display unit that displays images. The brake device 32 also includes a brake mechanism that changes the braking force of the vehicle 50, and a brake ECU that controls the operation of the brake mechanism. The brake ECU is connected to the ECU 20 so as to be able to communicate with it, and controls the brake mechanism in response to a control command from the ECU 20.

ところで、複眼距離LPの算出では、右画像及び左画像における視差DPから、三角測量の原理によって複眼距離LPを算出する。図2を用いて、三角測量の原理について説明する。図2の上側には、右カメラ11、左カメラ12及び物体を重力方向上側から見た様子が示されており、図2の下側には、右カメラ11及び左カメラ12で撮影された右画像及び左画像がそれぞれ示されている。図2に示すように、複眼距離LPは、右カメラ11及び左カメラ12の間の左右方向における距離である基準長LCと、右カメラ11及び左カメラ12の焦点距離LFと、右画像及び左画像における視差DPとを用いて、以下の(式1)のように表される。 The compound eye distance LP is calculated from the parallax DP in the right and left images by the principle of triangulation. The principle of triangulation will be explained with reference to FIG. 2. The upper side of FIG. 2 shows the right camera 11, the left camera 12, and the object as viewed from above in the direction of gravity, and the lower side of FIG. 2 shows the right and left images taken by the right and left cameras 11 and 12, respectively. As shown in FIG. 2, the compound eye distance LP is expressed as follows (Equation 1) using a reference length LC, which is the distance in the left-right direction between the right camera 11 and the left camera 12, the focal length LF of the right camera 11 and the left camera 12, and the parallax DP in the right and left images.

LP=LC×LF/DP・・・(式1)
(式1)によれば、複眼距離LPと視差DPとは互いに反比例の関係にあり、複眼距離LPが長くなるほど視差DPが小さくなる。また、視差DPが小さいほど複眼距離LPの算出精度が低下し、複眼距離LPに含まれる誤差は、視差DPが小さくなるに従って急激に大きくなる。
LP = LC × LF / DP (Equation 1)
According to formula 1, the compound eye distance LP and the parallax DP are inversely proportional to each other, and the longer the compound eye distance LP, the smaller the parallax DP. Also, the smaller the parallax DP, the lower the calculation accuracy of the compound eye distance LP, and the error included in the compound eye distance LP increases rapidly as the parallax DP decreases.

そこで、本実施形態では、右画像及び左画像の一方を用い、当該一方の画像上の物体の大きさに基づいて、車両50と物体との間の距離を単眼距離LSとして算出するようにした。つまり、右画像及び左画像の両方を用いて複眼距離LPを算出しつつ、その右画像及び左画像の一方を用いて単眼距離LSを算出するようにした。そして、同一の右画像及び左画像を用いて算出された複眼距離LPと単眼距離LSとの間の視差ずれ量ΔZを算出し、複数回に亘って算出された視差ずれ量ΔZの平均値である平均視差ずれ量ZCに基づいて複眼距離LPを補正する補正処理を実施するようにした。なお、視差ずれ量ΔZは、複眼距離LPと単眼距離LSとの距離差ΔLを視差DPのずれ量に変換したものであり、単眼距離LS及び視差ずれ量ΔZの算出方法については、後述する。 In this embodiment, one of the right and left images is used, and the distance between the vehicle 50 and the object is calculated as the monocular distance LS based on the size of the object on the one image. In other words, the compound eye distance LP is calculated using both the right and left images, and the monocular distance LS is calculated using one of the right and left images. Then, the parallax shift amount ΔZ between the compound eye distance LP calculated using the same right and left images and the monocular distance LS is calculated, and a correction process is performed to correct the compound eye distance LP based on the average parallax shift amount ZC, which is the average value of the parallax shift amounts ΔZ calculated multiple times. The parallax shift amount ΔZ is obtained by converting the distance difference ΔL between the compound eye distance LP and the monocular distance LS into the shift amount of parallax DP, and the calculation method of the monocular distance LS and the parallax shift amount ΔZ will be described later.

本実施形態におけるECU20の具体的な構成について、図1を用いて説明する。図1に示すように、ECU20は、取得部21、距離算出部22、距離判定部23、補正値算出部25、距離補正部26、警報制御部27及び停止制御部28として機能する。 The specific configuration of the ECU 20 in this embodiment will be described with reference to FIG. 1. As shown in FIG. 1, the ECU 20 functions as an acquisition unit 21, a distance calculation unit 22, a distance determination unit 23, a correction value calculation unit 25, a distance correction unit 26, an alarm control unit 27, and a stop control unit 28.

取得部21は、右カメラ11及び左カメラ12により撮影された右画像及び左画像をそれぞれ取得する。右画像及び左画像は同時に撮影された画像であり、取得部21は、これらの対の画像を所定周期で取得する。距離算出部22は、取得部21により取得された右画像及び左画像を用いて複眼距離LP及び単眼距離LSを算出する。距離算出部22は、右画像及び左画像が取得される毎に複眼距離LP及び単眼距離LSを算出する。 The acquisition unit 21 acquires the right and left images captured by the right and left cameras 11 and 12, respectively. The right and left images are captured simultaneously, and the acquisition unit 21 acquires these paired images at a predetermined cycle. The distance calculation unit 22 calculates the compound eye distance LP and the monocular distance LS using the right and left images acquired by the acquisition unit 21. The distance calculation unit 22 calculates the compound eye distance LP and the monocular distance LS each time a right and left image is acquired.

距離判定部23は、距離算出部22により算出された複眼距離LPが距離閾値Lthよりも大きいことを判定する。ここで距離閾値Lthは、複眼距離LPの誤差と単眼距離LSの誤差とが略等しくなる距離であり、物体の大きさ及びステレオカメラ10の基準長LCにより定まる値である。距離判定部23により複眼距離LPが距離閾値Lthよりも大きいと判定された場合、複眼距離LPの誤差は単眼距離LSの誤差よりも大きくなる。また、距離判定部23により複眼距離LPが距離閾値Lthよりも小さいと判定された場合、複眼距離LPの誤差は単眼距離LSの誤差よりも小さくなる。 The distance determination unit 23 determines that the compound eye distance LP calculated by the distance calculation unit 22 is greater than the distance threshold Lth. Here, the distance threshold Lth is the distance at which the error in the compound eye distance LP and the error in the monocular distance LS are approximately equal, and is a value determined by the size of the object and the reference length LC of the stereo camera 10. If the distance determination unit 23 determines that the compound eye distance LP is greater than the distance threshold Lth, the error in the compound eye distance LP will be greater than the error in the monocular distance LS. Also, if the distance determination unit 23 determines that the compound eye distance LP is smaller than the distance threshold Lth, the error in the compound eye distance LP will be smaller than the error in the monocular distance LS.

補正値算出部25は、複眼距離LPと単眼距離LSとの間の視差ずれ量ΔZを算出し、算出された複数の視差ずれ量ΔZの平均視差ずれ量ZCに基づいて複眼距離LPを補正するための補正値を算出する。詳しくは、補正値算出部25は、同一の右画像及び左画像を用いて算出された複眼距離LPと単眼距離LSとの間の視差ずれ量ΔZを算出し、これらの対の画像の複数個について算出された複数の視差ずれ量ΔZの平均視差ずれ量ZCを補正値として算出する。なお、本実施形態において、視差ずれ量ΔZが「差分値」に相当し、平均視差ずれ量ZCが「中間値」に相当する。 The correction value calculation unit 25 calculates the parallax shift amount ΔZ between the compound eye distance LP and the monocular distance LS, and calculates a correction value for correcting the compound eye distance LP based on the average parallax shift amount ZC of the calculated multiple parallax shift amounts ΔZ. In detail, the correction value calculation unit 25 calculates the parallax shift amount ΔZ between the compound eye distance LP and the monocular distance LS calculated using the same right and left images, and calculates the average parallax shift amount ZC of the multiple parallax shift amounts ΔZ calculated for multiple of these paired images as the correction value. Note that in this embodiment, the parallax shift amount ΔZ corresponds to the "difference value", and the average parallax shift amount ZC corresponds to the "intermediate value".

距離補正部26は、補正値算出部25により算出された平均視差ずれ量ZCを用いて複眼距離LPを補正する。以下、補正後の複眼距離LPを補正距離LPRという。 The distance correction unit 26 corrects the compound eye distance LP using the average parallax shift amount ZC calculated by the correction value calculation unit 25. Hereinafter, the corrected compound eye distance LP is referred to as the corrected distance LPR.

警報制御部27は、距離補正部26により算出された補正距離LPRが所定の警告距離になったと判定された場合に、ドライバに物体が接近している旨を通知するために警報装置31に対して制御指令を送信する。停止制御部28は、補正距離LPRが所定の停止距離になったと判定された場合に、車両50と物体との接触を回避するために、ブレーキ装置32に対して制御指令を送信する。 When it is determined that the corrected distance LPR calculated by the distance correction unit 26 has reached a predetermined warning distance, the warning control unit 27 transmits a control command to the warning device 31 to notify the driver that an object is approaching. When it is determined that the corrected distance LPR has reached a predetermined stopping distance, the stop control unit 28 transmits a control command to the brake device 32 to avoid contact between the vehicle 50 and the object.

次に、本実施形態における補正処理の手順について、図3のフローチャートを参照して説明する。本処理は、例えば車両50及び物体がともに等速直線走行をしている、又は物体が車両50の正面に存在している等、単眼距離LSが安定する条件下において、ECU20が所定間隔で繰り返し実施する。 Next, the procedure of the correction process in this embodiment will be described with reference to the flowchart in FIG. 3. This process is repeatedly performed by the ECU 20 at a predetermined interval under conditions in which the monocular distance LS is stable, such as when the vehicle 50 and the object are both traveling at a constant speed in a straight line, or when the object is present in front of the vehicle 50.

まず、ステップS10では、右カメラ11により撮影された右画像を取得する。ステップS12では、左カメラ12により撮影された左画像を取得する。ステップS10及びステップS12で取得される右画像及び左画像は、右カメラ11及び左カメラ12により同時に撮影された画像である。 First, in step S10, a right image captured by the right camera 11 is acquired. In step S12, a left image captured by the left camera 12 is acquired. The right image and left image acquired in steps S10 and S12 are images captured simultaneously by the right camera 11 and the left camera 12.

ステップS14では、ステップS10及びステップS12で取得された右画像及び左画像に、同一物体が存在するか否かを判定する。ステップS14で否定判定すると、補正処理を終了する。一方、ステップS14で肯定判定すると、ステップS16において、単眼距離LSを算出する。なお、本実施形態において、ステップS16の処理が「単眼距離算出部」に相当する。 In step S14, it is determined whether or not the same object is present in the right image and the left image acquired in step S10 and step S12. If a negative determination is made in step S14, the correction process is terminated. On the other hand, if a positive determination is made in step S14, the monocular distance LS is calculated in step S16. Note that in this embodiment, the process of step S16 corresponds to the "monocular distance calculation unit."

ステップS16では、ステップS10及びステップS12で取得された右画像及び左画像のうち、単眼距離LSを算出するのに用いる一方の画像を選択する。具体的には、物体が、左右方向における右カメラ11と左カメラ12との間の中心に対して、右カメラ11側に存在しているか又は左カメラ12側に存在しているかを判定する。つまり、右カメラ11と左カメラ12とを結ぶ線分の垂直二等分線よりも右カメラ11側に存在しているか、又は左カメラ12側に存在しているかを判定する。物体が右カメラ11及び左カメラ12のどちら側に存在しているかは、例えば左右方向における右画像及び左画像上の物体の位置により判定することができる。 In step S16, one of the right and left images acquired in steps S10 and S12 is selected to be used to calculate the monocular distance LS. Specifically, it is determined whether the object is on the right camera 11 side or the left camera 12 side with respect to the center between the right camera 11 and the left camera 12 in the left-right direction. In other words, it is determined whether the object is on the right camera 11 side or the left camera 12 side of the perpendicular bisector of the line segment connecting the right camera 11 and the left camera 12. Whether the object is on the right camera 11 side or the left camera 12 side can be determined, for example, from the position of the object on the right image and the left image in the left-right direction.

ステップS16では、物体が右カメラ11側に存在していると判定した場合、右画像を用いて単眼距離LSを算出する。また、物体が左カメラ12側に存在していると判定した場合、左画像を用いて単眼距離LSを算出する。 In step S16, if it is determined that the object is present on the right camera 11 side, the monocular distance LS is calculated using the right image. If it is determined that the object is present on the left camera 12 side, the monocular distance LS is calculated using the left image.

ステップS18では、ステップS10及びステップS12で取得された右画像及び左画像を用いて複眼距離LPを算出する。続くステップS20では、ステップS18で算出された複眼距離LPが距離閾値Lthよりも大きいか否かを判定する。なお、本実施形態において、ステップS18の処理が「複眼距離算出部」に相当し、ステップS20の処理が「距離判定部」に相当する。 In step S18, the compound eye distance LP is calculated using the right and left images acquired in steps S10 and S12. In the following step S20, it is determined whether the compound eye distance LP calculated in step S18 is greater than the distance threshold Lth. Note that in this embodiment, the process of step S18 corresponds to the "compound eye distance calculation unit", and the process of step S20 corresponds to the "distance determination unit".

複眼距離LPが距離閾値Lthよりも大きいと判定した場合、ステップS20で肯定判定する。この場合、ステップS22において、平均視差ずれ量ZCを算出し、ステップS26に進む。平均視差ずれ量ZCの算出では、まず、単眼距離LSを視差に変換した視差変換量DSを算出する。視差変換量DSは、基準長LC、焦点距離LF及び単眼距離LSを用いて、以下の(式2)のように表される。 If it is determined that the compound eye distance LP is greater than the distance threshold Lth, a positive determination is made in step S20. In this case, in step S22, the average parallax shift amount ZC is calculated, and the process proceeds to step S26. In calculating the average parallax shift amount ZC, first, a parallax conversion amount DS that converts the monocular distance LS into parallax is calculated. The parallax conversion amount DS is expressed as follows (Equation 2) using the reference length LC, focal length LF, and monocular distance LS.

DS=LC×LF/LS・・・(式2)
次に、視差ずれ量ΔZを算出する。視差ずれ量ΔZは、複眼距離LPの視差DPと、単眼距離LSの視差変換量DSとを用いて、以下の(式3)のように表される。
DS=LC×LF/LS (Equation 2)
Next, the parallax shift amount ΔZ is calculated. The parallax shift amount ΔZ is expressed as the following (Equation 3) using the parallax DP of the compound eye distance LP and the parallax conversion amount DS of the monocular distance LS.

ΔZ=DP-DS・・・(式3)
算出された視差ずれ量ΔZは、ECU20内のメモリに記憶される。そして、メモリに記憶された複数の視差ずれ量ΔZを用いて平均視差ずれ量ZCを算出する。平均視差ずれ量ZCは、メモリに記憶された複数の視差ずれ量ΔZの累積平均であり、新たな視差ずれ量ΔZがメモリに記憶される度に、平均視差ずれ量ZCが逐次更新される。算出された平均視差ずれ量ZCは、ECU20内のメモリに記憶される。
ΔZ=DP-DS (Equation 3)
The calculated parallax shift amount ΔZ is stored in the memory in the ECU 20. Then, an average parallax shift amount ZC is calculated using the plurality of parallax shift amounts ΔZ stored in the memory. The average parallax shift amount ZC is a cumulative average of the plurality of parallax shift amounts ΔZ stored in the memory, and the average parallax shift amount ZC is updated each time a new parallax shift amount ΔZ is stored in the memory. The calculated average parallax shift amount ZC is stored in the memory in the ECU 20.

一方、複眼距離LPが距離閾値Lthよりも小さいと判定した場合、ステップS20で否定判定する。この場合、ステップS24において、平均視差ずれ量ZCを算出することなく、ECU20内のメモリから前回の平均視差ずれ量ZCを読み出し、ステップS26に進む。ここで前回の平均視差ずれ量ZCとは、ステップS22の処理が実施された補正処理において、ECU20内のメモリに記憶された平均視差ずれ量ZCを意味する。本実施形態では、ステップS24において、ECU20内のメモリに最後に記憶された平均視差ずれ量ZCを読み出す。 On the other hand, if it is determined that the compound eye distance LP is smaller than the distance threshold Lth, a negative determination is made in step S20. In this case, in step S24, the previous average parallax shift amount ZC is read from the memory in the ECU 20 without calculating the average parallax shift amount ZC, and the process proceeds to step S26. Here, the previous average parallax shift amount ZC means the average parallax shift amount ZC stored in the memory in the ECU 20 in the correction process in which the process in step S22 was performed. In this embodiment, in step S24, the average parallax shift amount ZC last stored in the memory in the ECU 20 is read.

ステップS26では、ステップS22で算出され、又はステップS24で読み出された平均視差ずれ量ZCに基づいて複眼距離LPを補正し、補正処理を終了する。つまり、ステップS26では、ステップS20の判定結果に関わらず、平均視差ずれ量ZCによる複眼距離LPの補正が実施される。なお、本実施形態において、ステップS26の処理が「距離補正部」に相当する。 In step S26, the compound eye distance LP is corrected based on the average parallax shift amount ZC calculated in step S22 or read out in step S24, and the correction process ends. In other words, in step S26, the compound eye distance LP is corrected based on the average parallax shift amount ZC regardless of the determination result of step S20. Note that in this embodiment, the process of step S26 corresponds to the "distance correction unit."

補正距離LPRの算出では、まず、複眼距離LPの視差DPから平均視差ずれ量ZCを減算した補正視差DPRを算出する。補正視差DPRは、視差DP及び平均視差ずれ量ZCを用いて、以下の(式4)のように表される。 To calculate the correction distance LPR, first, the correction parallax DPR is calculated by subtracting the average parallax shift amount ZC from the parallax DP at the compound eye distance LP. The correction parallax DPR is expressed as follows (Equation 4) using the parallax DP and the average parallax shift amount ZC.

DPR=DP-ZC・・・(式4)
次に、補正距離LPRを算出する。補正距離LPRは、基準長LC、焦点距離LF及び補正視差DPRを用いて、以下の(式5)のように表される。
DPR=DP-ZC (Equation 4)
Next, the correction distance LPR is calculated. The correction distance LPR is expressed as the following (Equation 5) using the reference length LC, the focal length LF, and the correction parallax DPR.

LPR=LC×LF/DPR・・・(式5)
続いて、図4~図7に、補正処理の一例を示す。図4は、車両50が一定速度で物体に近づく場合における複眼距離LPの推移を示している。図4に示すように、複眼距離LPが距離閾値Lthよりも大きく、物体が車両50の遠方に存在している場合、物体までの実距離LT(破線)と複眼距離LP(実線)との差である複眼距離LPの誤差が大きく、車両50が物体に近づくに従ってその誤差が小さくなる。なお、ステレオカメラ10では、ステレオカメラ10の仕様によって実距離LTに対して大きい側にずれるものと、小さい側にずれるものとが存在し、図4にはその両方の推移が示されている。以下では、複眼距離LPが実距離LTに対して小さい側にずれる例について説明を行う。
LPR=LC×LF/DPR (Equation 5)
Next, an example of the correction process is shown in Fig. 4 to Fig. 7. Fig. 4 shows the transition of the compound eye distance LP when the vehicle 50 approaches an object at a constant speed. As shown in Fig. 4, when the compound eye distance LP is larger than the distance threshold Lth and the object is far from the vehicle 50, the error of the compound eye distance LP, which is the difference between the actual distance LT (dashed line) to the object and the compound eye distance LP (solid line), is large, and the error becomes smaller as the vehicle 50 approaches the object. Note that in the stereo camera 10, there are cases where the deviation is larger than the actual distance LT and cases where the deviation is smaller than the actual distance LT depending on the specifications of the stereo camera 10, and Fig. 4 shows the transition of both of these. Below, an example in which the compound eye distance LP deviates to the smaller side than the actual distance LT will be described.

図5は、図4に対応する単眼距離LSの推移を示している。単眼距離LSは、物体の実寸法WRと、右画像又は左画像上の物体の大きさである画像寸法WGとの比に基づいて算出される。具体的には、単眼距離LSは、焦点距離LFと、実寸法WRと、画像寸法WGとを用いて、以下の(式6)のように表される。 Figure 5 shows the progression of the monocular distance LS corresponding to Figure 4. The monocular distance LS is calculated based on the ratio of the actual dimension WR of the object to the image dimension WG, which is the size of the object on the right image or the left image. Specifically, the monocular distance LS is expressed as follows (Equation 6) using the focal length LF, the actual dimension WR, and the image dimension WG.

LS=WR×LF/WG・・・(式6)
ここで、物体の実寸法WRは、周知のパターンマッチングにより右画像又は左画像上の物体を判定することで取得される。
LS=WR×LF/WG (Equation 6)
Here, the actual dimension WR of the object is obtained by determining the object on the right or left image by well-known pattern matching.

ところで、画像寸法WGは、物体に相当する画素の数である画素数を用いて表される。この場合、単眼距離LSには、最大で1画素相当分の長さに依存する誤差が生じ、その誤差の大きさは概ね車両50と物体との間の距離に比例したものとなる。そのため、物体が車両50の遠方に存在している場合、単眼距離LSの誤差は複眼距離LPの誤差よりも小さくなる。 The image dimension WG is expressed using the number of pixels, which is the number of pixels that correspond to the object. In this case, an error occurs in the monocular distance LS that depends on the length of up to one pixel, and the magnitude of the error is roughly proportional to the distance between the vehicle 50 and the object. Therefore, when an object is located far away from the vehicle 50, the error in the monocular distance LS is smaller than the error in the compound eye distance LP.

そこで、本実施形態では、物体が車両50の遠方に存在している場合に、単眼距離LSを基準として複眼距離LPを補正する。具体的には、図6に示すように、複眼距離LPが距離閾値Lthと等しくなる時刻t1よりも前において、複眼距離LPと単眼距離LSとの距離差ΔLに対応する視差ずれ量ΔZを算出する。そして、この視差ずれ量ΔZに基づいて複眼距離LPを補正する。 Therefore, in this embodiment, when an object is present far away from the vehicle 50, the compound eye distance LP is corrected based on the monocular distance LS. Specifically, as shown in FIG. 6, before time t1 at which the compound eye distance LP becomes equal to the distance threshold Lth, the parallax shift amount ΔZ corresponding to the distance difference ΔL between the compound eye distance LP and the monocular distance LS is calculated. Then, the compound eye distance LP is corrected based on this parallax shift amount ΔZ.

また、単眼距離LSでは、画素数の増減に伴う変動により実距離LTに対するずれ方向が変動する。そのため、単眼距離LSを基準として複眼距離LPを補正すると、視差ずれ量ΔZに残る単眼距離LSのずれ方向の変動の影響により、補正後の補正距離LPRも変動してしまう。 In addition, the direction of deviation of the monocular distance LS from the actual distance LT varies due to fluctuations associated with an increase or decrease in the number of pixels. Therefore, if the compound eye distance LP is corrected based on the monocular distance LS, the correction distance LPR after correction will also vary due to the influence of the fluctuation in the deviation direction of the monocular distance LS that remains in the parallax deviation amount ΔZ.

そこで、本実施形態では、複数の視差ずれ量ΔZの平均値である平均視差ずれ量ZCを算出し、この平均視差ずれ量ZCに基づいて複眼距離LPを補正する。平均視差ずれ量ZCを算出することで、視差ずれ量ΔZに残る単眼距離LSのずれ方向の変動の影響が抑制される。この結果、図7に示すように、処理開始時刻t0からの経過時間が長くなるほど補正距離LPRの変動が抑制される。 Therefore, in this embodiment, an average parallax shift amount ZC, which is the average value of multiple parallax shift amounts ΔZ, is calculated, and the compound eye distance LP is corrected based on this average parallax shift amount ZC. By calculating the average parallax shift amount ZC, the influence of fluctuations in the shift direction of the monocular distance LS that remain in the parallax shift amount ΔZ is suppressed. As a result, as shown in FIG. 7, the longer the elapsed time from the processing start time t0, the more the fluctuations in the correction distance LPR are suppressed.

一方、図5に示すように、複眼距離LPが距離閾値Lthよりも小さく、物体が車両50の近方に存在している場合、単眼距離LSの誤差は複眼距離LPの誤差よりも大きくなることがある。この場合、複眼距離LPと単眼距離LSとの間の視差ずれ量ΔZ及び平均視差ずれ量ZCを適正に算出することができない。そこで、本実施形態では、物体が車両50の近方に存在している場合に、つまり時刻t1よりも後において、平均視差ずれ量ZCを算出しない(図6で矢印不記載)。 On the other hand, as shown in FIG. 5, when the compound eye distance LP is smaller than the distance threshold Lth and an object is present near the vehicle 50, the error in the monocular distance LS may be larger than the error in the compound eye distance LP. In this case, the parallax shift amount ΔZ between the compound eye distance LP and the monocular distance LS and the average parallax shift amount ZC cannot be calculated properly. Therefore, in this embodiment, when an object is present near the vehicle 50, that is, after time t1, the average parallax shift amount ZC is not calculated (no arrow is shown in FIG. 6).

また、単眼距離LSの誤差が複眼距離LPの誤差よりも大きくなる場合、単眼距離LSに基づいて複眼距離LPを補正する必要がない。そのため、物体が車両50の近方に存在している場合には複眼距離LPの補正を停止するとも考えられる。しかし、物体が車両50の近方に存在している場合に複眼距離LPの補正を停止すると、複眼距離LPが距離閾値Lthを超えて変化する場合に、複眼距離LPが、図7に実線で示す補正距離LPRと図7に二点鎖線で示す複眼距離LPとの間で段差状に変化する。この変化によりECU20が物体に対する接触回避処理を適正に実施できないことが考えられる。 In addition, if the error in the monocular distance LS becomes larger than the error in the compound eye distance LP, there is no need to correct the compound eye distance LP based on the monocular distance LS. Therefore, it is also possible to stop the correction of the compound eye distance LP when an object is present close to the vehicle 50. However, if the correction of the compound eye distance LP is stopped when an object is present close to the vehicle 50, when the compound eye distance LP changes beyond the distance threshold Lth, the compound eye distance LP changes in a step-like manner between the correction distance LPR shown by the solid line in Figure 7 and the compound eye distance LP shown by the two-dot chain line in Figure 7. It is considered that this change will prevent the ECU 20 from properly performing contact avoidance processing for the object.

そこで、本実施形態では、複眼距離LPが距離閾値Lthよりも大きいか否かに関わらず、平均視差ずれ量ZCにより複眼距離LPの補正を実施する(図7で矢印記載)。具体的には、複眼距離LPが距離閾値Lthよりも大きい場合には、その複眼距離LPが算出された補正処理で算出された平均視差ずれ量ZCに基づいて複眼距離LPを補正する。また、複眼距離LPが距離閾値Lthよりも小さい場合には、その複眼距離LPが算出された補正処理よりも前の補正処理で算出された前回の平均視差ずれ量ZCに基づいて複眼距離LPを補正する。これにより、複眼距離LPが距離閾値Lthを超えて変化する場合における複眼距離LP(補正距離LPR)の変化を抑制することができる。 Therefore, in this embodiment, regardless of whether the compound eye distance LP is greater than the distance threshold Lth, the compound eye distance LP is corrected based on the average parallax shift amount ZC (indicated by an arrow in Figure 7). Specifically, if the compound eye distance LP is greater than the distance threshold Lth, the compound eye distance LP is corrected based on the average parallax shift amount ZC calculated in the correction process in which the compound eye distance LP was calculated. Also, if the compound eye distance LP is smaller than the distance threshold Lth, the compound eye distance LP is corrected based on the previous average parallax shift amount ZC calculated in the correction process prior to the correction process in which the compound eye distance LP was calculated. This makes it possible to suppress changes in the compound eye distance LP (corrected distance LPR) when the compound eye distance LP changes beyond the distance threshold Lth.

以上説明した本実施形態によれば、以下の効果を奏する。 The above-described embodiment provides the following advantages:

・右カメラ11により撮影された右画像上の物体の位置と、左カメラ12により撮影された左画像上の物体の位置とから求められる視差DPに基づいて車両50と物体との間の距離を複眼距離LPとして算出する場合、物体が車両50の遠方に存在していると、複眼距離LPの誤差が急激に大きくなり、その算出精度が低下する。また、右画像上又は左画像上の画像寸法WGに基づいて、車両50と物体との間の距離を単眼距離LSとして算出する場合、単眼距離LSには、最大で1画素相当分の長さに依存する誤差が生じ、その誤差の大きさは概ね車両50と他車両との間の距離に比例したものとなる。そのため、例えば物体が車両50の遠方に存在している場合、単眼距離LSの誤差は複眼距離LPの誤差よりも小さくなる。したがって、複眼距離LPと単眼距離LSとの間の視差ずれ量ΔZに基づいて複眼距離LPを補正することで、複眼距離LPの誤差を抑制することができる。 -When the distance between the vehicle 50 and an object is calculated as the compound eye distance LP based on the parallax DP calculated from the position of the object on the right image captured by the right camera 11 and the position of the object on the left image captured by the left camera 12, if the object is located far from the vehicle 50, the error in the compound eye distance LP increases rapidly and the calculation accuracy decreases. In addition, when the distance between the vehicle 50 and an object is calculated as the monocular distance LS based on the image dimension WG on the right image or the left image, an error occurs in the monocular distance LS that depends on the length of up to one pixel, and the magnitude of the error is roughly proportional to the distance between the vehicle 50 and another vehicle. Therefore, for example, when an object is located far from the vehicle 50, the error in the monocular distance LS is smaller than the error in the compound eye distance LP. Therefore, the error in the compound eye distance LP can be suppressed by correcting the compound eye distance LP based on the parallax shift amount ΔZ between the compound eye distance LP and the monocular distance LS.

この場合に、本実施形態では、複数回に亘って算出された視差ずれ量ΔZの平均値である平均視差ずれ量ZCに基づいて複眼距離LPを補正するようにした。複眼距離LPでは、車両50と物体との間の実距離LTに対するずれ方向が一定であるのに対し、単眼距離LSでは、画素数の増減に伴う変動により実距離LTに対するずれ方向が変動する。そのため、平均視差ずれ量ZCに基づいて複眼距離LPを補正することで、視差ずれ量ΔZに残る単眼距離LSのずれ方向の変動の影響を抑制することができ、右画像及び左画像における視差DPに基づいて、車両50と物体の間の距離を精度よく算出することができる。 In this case, in this embodiment, the compound eye distance LP is corrected based on the average parallax shift amount ZC, which is the average value of the parallax shift amount ΔZ calculated over multiple times. In the compound eye distance LP, the shift direction with respect to the actual distance LT between the vehicle 50 and the object is constant, whereas in the monocular distance LS, the shift direction with respect to the actual distance LT fluctuates due to fluctuations associated with an increase or decrease in the number of pixels. Therefore, by correcting the compound eye distance LP based on the average parallax shift amount ZC, the influence of fluctuations in the shift direction of the monocular distance LS remaining in the parallax shift amount ΔZ can be suppressed, and the distance between the vehicle 50 and the object can be calculated with high accuracy based on the parallax DP in the right image and the left image.

・複眼距離LPが距離閾値Lthよりも大きく、物体が車両50の遠方に存在している場合、複眼距離LPの誤差は単眼距離LSの誤差よりも大きくなるため、視差ずれ量ΔZを算出して平均視差ずれ量ZCを算出し、複眼距離LPを補正する。一方、複眼距離LPが距離閾値Lthよりも小さく、物体が車両50の近方に存在している場合、複眼距離LPの誤差は単眼距離LSの誤差よりも小さくなることがあり、平均視差ずれ量ZCを適正に算出することができない。その点、本実施形態では、複眼距離LPが距離閾値Lthよりも小さいと判定された場合に平均視差ずれ量ZCを算出しないようにした。このため、平均視差ずれ量ZCの算出精度低下に伴って複眼距離LPの算出精度が低下することを抑制することができる。 - When the compound eye distance LP is greater than the distance threshold Lth and the object is located far from the vehicle 50, the error in the compound eye distance LP is greater than the error in the monocular distance LS, so the parallax shift amount ΔZ is calculated to calculate the average parallax shift amount ZC, and the compound eye distance LP is corrected. On the other hand, when the compound eye distance LP is smaller than the distance threshold Lth and the object is located close to the vehicle 50, the error in the compound eye distance LP may be smaller than the error in the monocular distance LS, and the average parallax shift amount ZC cannot be calculated properly. In this regard, in this embodiment, when it is determined that the compound eye distance LP is smaller than the distance threshold Lth, the average parallax shift amount ZC is not calculated. This makes it possible to suppress a decrease in the calculation accuracy of the compound eye distance LP due to a decrease in the calculation accuracy of the average parallax shift amount ZC.

・物体が車両50の近方に存在している場合、複眼距離LPの誤差は単眼距離LSの誤差よりも小さくなることがあり、この場合、単眼距離LSに基づいて複眼距離LPを補正する必要がない。そのため、物体が車両50の近方に存在している場合、複眼距離LPの補正を停止することが考えられる。しかし、この場合に複眼距離LPの補正が停止されると、複眼距離LPが距離閾値Lthを超えて変化する場合に、複眼距離LP(補正距離LPR)が平均視差ずれ量ZCだけ変化することになり、この段差状の変化により、接触回避処理の実施に影響が及ぶことが考えられる。その点、本実施形態では、複眼距離LPが距離閾値Lthよりも大きいか否かに関わらず、平均視差ずれ量ZCによる複眼距離LPの補正を実施するようにした。そのため、複眼距離LPが距離閾値Lthを超えて変化する場合における複眼距離LPの変化を抑制することができる。 - When an object is present near the vehicle 50, the error in the compound eye distance LP may be smaller than the error in the monocular distance LS, and in this case, there is no need to correct the compound eye distance LP based on the monocular distance LS. Therefore, when an object is present near the vehicle 50, it is possible to stop the correction of the compound eye distance LP. However, if the correction of the compound eye distance LP is stopped in this case, when the compound eye distance LP changes beyond the distance threshold Lth, the compound eye distance LP (corrected distance LPR) will change by the average parallax shift amount ZC, and this step-like change is considered to affect the implementation of the contact avoidance process. In this regard, in this embodiment, regardless of whether the compound eye distance LP is greater than the distance threshold Lth, the compound eye distance LP is corrected by the average parallax shift amount ZC. Therefore, it is possible to suppress the change in the compound eye distance LP when the compound eye distance LP changes beyond the distance threshold Lth.

・物体が左右方向における右カメラ11と左カメラ12との間の中心に対して右カメラ11側に存在している場合、右カメラ11の光軸から物体までのずれ幅は、左カメラ12の光軸から物体までのずれ幅に比べて小さくなる。そのため、右カメラ11により撮影された右画像を用いて単眼距離LSを算出することで、単眼距離LSを精度よく算出することができ、複眼距離LPの誤差を抑制することができる。また、物体が左右方向における右カメラ11と左カメラ12との間の中心に対して左カメラ12側に存在している場合、左カメラ12の光軸から物体までのずれ幅は右カメラ11の光軸からの物体のずれ幅に比べて小さくなる。そのため、左カメラ12により撮影された右画像を用いて単眼距離LSを算出することで、単眼距離LSを精度よく算出することができ、複眼距離LPの誤差を抑制することができる。 - When an object is present on the right camera 11 side with respect to the center between the right camera 11 and the left camera 12 in the left-right direction, the deviation width from the optical axis of the right camera 11 to the object is smaller than the deviation width from the optical axis of the left camera 12 to the object. Therefore, by calculating the monocular distance LS using the right image captured by the right camera 11, the monocular distance LS can be calculated with high accuracy, and errors in the compound eye distance LP can be suppressed. Also, when an object is present on the left camera 12 side with respect to the center between the right camera 11 and the left camera 12 in the left-right direction, the deviation width from the optical axis of the left camera 12 to the object is smaller than the deviation width of the object from the optical axis of the right camera 11. Therefore, by calculating the monocular distance LS using the right image captured by the left camera 12, the monocular distance LS can be calculated with high accuracy, and errors in the compound eye distance LP can be suppressed.

(第2実施形態)
以下、第2実施形態について、第1実施形態との相違点を中心に図8~図12を参照しつつ説明する。図8に示すように、本実施形態では、ECU20が変化量判定部24として機能する点で第1実施形態と異なる。なお、図8において、先の図1に示した構成と同一の構成については、便宜上、同一の符号を付して説明を省略する。
Second Embodiment
The second embodiment will be described below with reference to Figures 8 to 12, focusing on the differences from the first embodiment. As shown in Figure 8, this embodiment differs from the first embodiment in that the ECU 20 functions as a change amount determination unit 24. In Figure 8, the same components as those shown in Figure 1 are denoted by the same reference numerals and will not be described for convenience.

変化量判定部24は、所定期間における車両50と物体との間の距離の変化量VCが変化量閾値Vthよりも大きいことを判定する。本実施形態において、変化量VCは現在から所定期間前までに実施された複数の補正処理において算出された複眼距離LPの差の最大値を意味する。また変化量閾値Vthは、単眼距離LSに所定の変動が生じる複眼距離LPの変化量である。ここで所定の変動は、画素数の増減に伴い単眼距離LSに生じる極大値及び極小値のうち、隣接する極大値と極小値との間に相当する変動である。 The change amount determination unit 24 determines that the change amount VC in the distance between the vehicle 50 and the object during a specified period is greater than the change amount threshold Vth. In this embodiment, the change amount VC means the maximum value of the difference between the compound eye distance LP calculated in multiple correction processes performed from the present to the specified period ago. The change amount threshold Vth is the amount of change in the compound eye distance LP at which a specified fluctuation occurs in the monocular distance LS. Here, the specified fluctuation is the fluctuation corresponding to between adjacent maximum and minimum values among the maximum and minimum values that occur in the monocular distance LS due to an increase or decrease in the number of pixels.

図9に、本実施形態の補正処理のフローチャートを示す。なお、図9において、先の図3に示した処理と同一の処理については、便宜上、同一のステップ番号を付して説明を省略する。 Figure 9 shows a flowchart of the correction process of this embodiment. Note that in Figure 9, the same processes as those shown in Figure 3 above are given the same step numbers for convenience, and descriptions are omitted.

本実施形態の補正処理では、ステップS20で肯定判定すると、ステップS30において、変化量VCを算出する。続くステップS32では、ステップS30で算出された変化量VCが変化量閾値Vthよりも大きいか否かを判定する。なお、本実施形態において、ステップS30の処理が「変化量判定部」に相当する。 In the correction process of this embodiment, if a positive determination is made in step S20, the amount of change VC is calculated in step S30. In the following step S32, it is determined whether the amount of change VC calculated in step S30 is greater than the amount of change threshold Vth. In this embodiment, the process of step S30 corresponds to the "amount of change determination unit."

所定期間における複眼距離LPの変化量VCが変化量閾値Vthよりも大きいと判定された場合、ステップS32で肯定判定する。この場合、ステップS22に進み、その所定期間に取得された視差ずれ量ΔZを用いて算出して平均視差ずれ量ZCを算出する。 If it is determined that the change amount VC of the compound eye distance LP during the specified period is greater than the change amount threshold Vth, a positive determination is made in step S32. In this case, the process proceeds to step S22, where the average parallax shift amount ZC is calculated using the parallax shift amount ΔZ acquired during the specified period.

一方、所定期間における複眼距離LPの変化量VCが変化量閾値Vthよりも小さいと判定された場合、ステップS32で否定判定する。この場合、ステップS24に進み、平均視差ずれ量ZCを算出することなく、ECU20内のメモリから前回の平均視差ずれ量ZCを読み出す。 On the other hand, if it is determined that the change amount VC of the compound eye distance LP during the specified period is smaller than the change amount threshold Vth, a negative determination is made in step S32. In this case, the process proceeds to step S24, and the previous average parallax shift amount ZC is read from the memory in the ECU 20 without calculating the average parallax shift amount ZC.

続いて、図10~図12に、本実施形態の補正処理の一例を示す。図10は、車両50が物体に近づく場合における複眼距離LP及び単眼距離LSの推移を示している。図10では、物体は移動体(例えば他車両)であり、処理開始時刻t0から時刻t2までの第1期間TAにおいて、車両50は一定速度で物体に近づく。その後の時刻t2から時刻t3までの第2期間TBにおいて、車両50と物体との間の距離が一定に維持される。その後の時刻t3からの第3期間TCにおいて、車両50は再び一定速度で物体に近づく場合における複眼距離LP及び単眼距離LSの推移を示している。 Next, an example of the correction process of this embodiment is shown in Figures 10 to 12. Figure 10 shows the changes in the compound eye distance LP and the monocular distance LS when the vehicle 50 approaches an object. In Figure 10, the object is a moving body (e.g., another vehicle), and in a first period TA from processing start time t0 to time t2, the vehicle 50 approaches the object at a constant speed. In the subsequent second period TB from time t2 to time t3, the distance between the vehicle 50 and the object is maintained constant. In the subsequent third period TC from time t3, the changes in the compound eye distance LP and the monocular distance LS are shown when the vehicle 50 approaches the object at a constant speed again.

第2期間TBにおいて、車両50と物体との間の距離が一定に維持されると、補正処理において算出される複眼距離LP及び単眼距離LSも一定に維持される。そして、一定に維持された複眼距離LPが距離閾値Lthよりも大きく、物体が車両50の遠方に存在している場合、第2期間TBにおいて視差ずれ量ΔZが算出されるとも考えられる。 When the distance between the vehicle 50 and the object is maintained constant during the second period TB, the compound eye distance LP and the monocular distance LS calculated in the correction process are also maintained constant. If the compound eye distance LP maintained constant is greater than the distance threshold Lth and the object is located far away from the vehicle 50, it is also possible that the parallax shift amount ΔZ is calculated during the second period TB.

比較例を示す図11では、第2期間TBにおいて視差ずれ量ΔZが算出される。第2期間TBでは、複眼距離LP及び単眼距離LSが一定に維持されるため、複眼距離LPと単眼距離LSとの距離差ΔLが一定に維持され、この距離差ΔLに対応する視差ずれ量ΔZも一定に維持される。例えば、図11に示すように、一定に維持される距離差ΔLが小さい場合には、算出される視差ずれ量ΔZも小さい値となる。その結果、平均視差ずれ量ZCは徐々に減少し、過小な平均視差ずれ量ZCに基づいて複眼距離LPが補正されると、補正距離LPRが実距離LTから離間する。 In FIG. 11 showing a comparative example, the parallax shift amount ΔZ is calculated in the second period TB. In the second period TB, the compound eye distance LP and the monocular distance LS are maintained constant, so the distance difference ΔL between the compound eye distance LP and the monocular distance LS is maintained constant, and the parallax shift amount ΔZ corresponding to this distance difference ΔL is also maintained constant. For example, as shown in FIG. 11, when the distance difference ΔL maintained constant is small, the calculated parallax shift amount ΔZ is also a small value. As a result, the average parallax shift amount ZC gradually decreases, and when the compound eye distance LP is corrected based on an excessively small average parallax shift amount ZC, the corrected distance LPR moves away from the actual distance LT.

また、第2期間TBでは、単眼距離LSのずれ方向の変動が抑制され、単眼距離LSが実距離LTに対して特定方向(図11では小さい側)にずれた状態が維持される。そのため、所定期間に算出された視差ずれ量ΔZ及びこの視差ずれ量ΔZに基づいて算出される平均視差ずれ量ZCには、単眼距離LSのずれ方向の変動の影響が残り、平均視差ずれ量ZCに基づいて複眼距離LPを精度よく補正することができない。 In addition, in the second period TB, fluctuations in the shift direction of the monocular distance LS are suppressed, and the monocular distance LS is maintained in a state where it is shifted in a specific direction (the smaller side in FIG. 11) relative to the actual distance LT. Therefore, the parallax shift amount ΔZ calculated in a specified period and the average parallax shift amount ZC calculated based on this parallax shift amount ΔZ are still affected by the fluctuations in the shift direction of the monocular distance LS, and the compound eye distance LP cannot be accurately corrected based on the average parallax shift amount ZC.

そこで、本実施形態では、所定期間における複眼距離LPの変化量VCが変化量閾値Vthよりも大きいことを判定し、大きいと判定された場合に平均視差ずれ量ZCを算出し、小さいと判定された場合に平均視差ずれ量ZCを算出しない。具体的には、車両50が一定速度で物体に近づいており、変化量VCが変化量閾値Vthよりも大きい第1期間TA及び第3期間TCでは、平均視差ずれ量ZCを算出する。一方、車両50と物体との間の距離が一定に保たれており、変化量VCが変化量閾値Vthよりも小さい第2期間TBでは、平均視差ずれ量ZCを算出せず、その変化量VCが算出された補正処理よりも前の補正処理で算出された前回の平均視差ずれ量ZCに基づいて複眼距離LPを補正する。つまり、複眼距離LP及び単眼距離LSの変化が小さい場合には、平均視差ずれ量ZCを算出しないようにした。この結果、図12に示すように、平均視差ずれ量ZCの算出精度低下に伴って複眼距離LPの算出精度が低下することを抑制することができる。 Therefore, in this embodiment, it is determined that the change amount VC of the compound eye distance LP in a predetermined period is greater than the change amount threshold Vth, and if it is determined that it is greater, the average parallax shift amount ZC is calculated, and if it is determined that it is smaller, the average parallax shift amount ZC is not calculated. Specifically, the vehicle 50 approaches the object at a constant speed, and in the first period TA and the third period TC, in which the change amount VC is greater than the change amount threshold Vth, the average parallax shift amount ZC is calculated. On the other hand, in the second period TB, in which the distance between the vehicle 50 and the object is kept constant and the change amount VC is smaller than the change amount threshold Vth, the average parallax shift amount ZC is not calculated, and the compound eye distance LP is corrected based on the previous average parallax shift amount ZC calculated in the correction process before the correction process in which the change amount VC was calculated. In other words, when the change in the compound eye distance LP and the monocular distance LS is small, the average parallax shift amount ZC is not calculated. As a result, as shown in FIG. 12, it is possible to prevent a decrease in the calculation accuracy of the compound eye distance LP due to a decrease in the calculation accuracy of the average parallax shift amount ZC.

以上説明した本実施形態によれば、以下の効果を奏する。 The above-described embodiment provides the following advantages:

・例えば車両50と物体との間の距離が一定に維持されるなど、所定期間における複眼距離LPの変化量VCが変化量閾値Vthよりも小さい場合、単眼距離LSのずれ方向の変動が抑制される。そのため、単眼距離LSが実距離LTに対して特定方向にずれた状態が維持され、所定期間に取得された視差ずれ量ΔZ及びこの視差ずれ量ΔZに基づいて算出される平均視差ずれ量ZCには、単眼距離LSのずれ方向の変動の影響が残る。したがって、この平均視差ずれ量ZCに基づいて複眼距離LPを精度よく補正することができない。 - When the change amount VC of the compound eye distance LP in a specified period is smaller than the change amount threshold Vth, for example when the distance between the vehicle 50 and an object is maintained constant, fluctuations in the shift direction of the monocular distance LS are suppressed. As a result, the monocular distance LS is maintained in a state where it is shifted in a specific direction relative to the actual distance LT, and the parallax shift amount ΔZ acquired in the specified period and the average parallax shift amount ZC calculated based on this parallax shift amount ΔZ are still affected by the fluctuations in the shift direction of the monocular distance LS. Therefore, the compound eye distance LP cannot be accurately corrected based on this average parallax shift amount ZC.

その点、本実施形態では、所定期間における複眼距離LPの変化量VCが変化量閾値Vthよりも小さいと判定された場合に、その所定期間に平均視差ずれ量ZCを算出しないようにした。これにより、平均視差ずれ量ZCの算出精度低下に伴って複眼距離LPの算出精度が低下することを抑制することができる。 In this regard, in the present embodiment, if it is determined that the change amount VC of the compound eye distance LP during a predetermined period is smaller than the change amount threshold Vth, the average parallax shift amount ZC is not calculated during that predetermined period. This makes it possible to prevent a decrease in the calculation accuracy of the compound eye distance LP due to a decrease in the calculation accuracy of the average parallax shift amount ZC.

(その他の実施形態)
本発明は上記実施形態の記載内容に限定されず、次のように実施されてもよい。
Other Embodiments
The present invention is not limited to the above-described embodiment, and may be implemented as follows.

・移動体は、車両50に限られず、例えばドローンであってもよい。 - The moving object is not limited to a vehicle 50 and may be, for example, a drone.

・複眼距離LPと単眼距離LSとの差分値として視差ずれ量ΔZを用いる例を示したが、これに限られず、複眼距離LPと単眼距離LSとの距離差ΔLを差分値として用いてもよい。 - An example has been shown in which the parallax shift amount ΔZ is used as the difference value between the compound eye distance LP and the monocular distance LS, but this is not limited to this, and the distance difference ΔL between the compound eye distance LP and the monocular distance LS may also be used as the difference value.

・差分値の中間値は、差分値の平均値に限られず、例えば差分値の中央値であってもよい。 - The intermediate value of the difference values is not limited to the average value of the difference values, but may be, for example, the median value of the difference values.

・距離閾値Lthと比較に用いる距離は、複眼距離LPに限られず、例えば単眼距離LSであってもよい。つまり、複眼距離LP及び単眼距離LSの少なくとも一方が距離閾値Lthよりも大きいことを判定すればよい。 The distance used for comparison with the distance threshold Lth is not limited to the compound eye distance LP, but may be, for example, the monocular distance LS. In other words, it is sufficient to determine that at least one of the compound eye distance LP and the monocular distance LS is greater than the distance threshold Lth.

・変化量VCの算出に用いられる距離は、複眼距離LPに限られず、例えば単眼距離LSであってもよい。さらには、車両50の速度やアクセル操作量などの情報に基づいて、車両50と物体との間の距離の変化量VCを算出してもよい。 The distance used to calculate the change amount VC is not limited to the compound eye distance LP, but may be, for example, the monocular distance LS. Furthermore, the change amount VC in the distance between the vehicle 50 and the object may be calculated based on information such as the speed of the vehicle 50 and the accelerator operation amount.

・上記実施形態では、複眼距離LPが距離閾値Lthよりも小さいと判定された場合、ECU20内のメモリから前回の平均視差ずれ量ZCを読み出す例を用いて説明を行ったが、これに限られない。 - In the above embodiment, an example was given in which when it is determined that the compound eye distance LP is smaller than the distance threshold Lth, the previous average parallax shift amount ZC is read from the memory in the ECU 20, but this is not limited to this.

例えば、複眼距離LPの変化量VCが変化量閾値Vthよりも大きいと判定された場合に算出された平均視差ずれ量ZCが一定の傾きで単調減少している場合、ECU20内のメモリに最後に記憶された平均視差ずれ量ZCから当該傾きで単調減少させた平均視差ずれ量ZCを用いて複眼距離LPを算出してもよい。 For example, if the change amount VC of the compound eye distance LP is determined to be greater than the change amount threshold Vth and the calculated average parallax shift amount ZC is monotonically decreasing at a constant slope, the compound eye distance LP may be calculated using the average parallax shift amount ZC that is monotonically decreasing at that slope from the average parallax shift amount ZC last stored in the memory in the ECU 20.

・また例えば、ECU20内のメモリに最後に記憶された平均視差ずれ量ZCと、その平均視差ずれ量ZCが算出された補正処理において算出された複眼距離LPとを用いて、複眼距離LPがゼロとなる場合に、平均視差ずれ量ZCがゼロとなるような直線や曲線を設定し、設定された直線や曲線に基づいて平均視差ずれ量ZCを減少させるようにしてもよい。 - For example, by using the average parallax shift amount ZC last stored in the memory in the ECU 20 and the compound eye distance LP calculated in the correction process in which the average parallax shift amount ZC was calculated, a straight line or curve may be set so that the average parallax shift amount ZC becomes zero when the compound eye distance LP becomes zero, and the average parallax shift amount ZC may be reduced based on the set straight line or curve.

・本開示に記載の制御装置及びその手法は、コンピュータプログラムにより具体化された一つ乃至は複数の機能を実行するようにプログラムされたプロセッサ及びメモリを構成することによって提供された専用コンピュータにより、実現されてもよい。あるいは、本開示に記載の制御装置及びその手法は、一つ以上の専用ハードウェア論理回路によってプロセッサを構成することによって提供された専用コンピュータにより、実現されてもよい。もしくは、本開示に記載の制御装置及びその手法は、一つ乃至は複数の機能を実行するようにプログラムされたプロセッサ及びメモリと一つ以上のハードウェア論理回路によって構成されたプロセッサとの組み合わせにより構成された一つ以上の専用コンピュータにより、実現されてもよい。また、コンピュータプログラムは、コンピュータにより実行されるインストラクションとして、コンピュータ読み取り可能な非遷移有形記録媒体に記憶されていてもよい。 The control device and method described in the present disclosure may be realized by a dedicated computer provided by configuring a processor and memory programmed to execute one or more functions embodied in a computer program. Alternatively, the control device and method described in the present disclosure may be realized by a dedicated computer provided by configuring a processor with one or more dedicated hardware logic circuits. Alternatively, the control device and method described in the present disclosure may be realized by one or more dedicated computers configured by combining a processor and memory programmed to execute one or more functions with a processor configured with one or more hardware logic circuits. In addition, the computer program may be stored in a computer-readable non-transient tangible recording medium as instructions executed by the computer.

11…右カメラ、12…左カメラ、20…ECU、50…車両。 11...right camera, 12...left camera, 20...ECU, 50...vehicle.

Claims (7)

視差を含む第1画像及び第2画像を撮影する第1カメラ(11)及び第2カメラ(12)が搭載された移動体(50)に適用され、前記第1画像及び前記第2画像に基づいて、前記移動体の周囲に存在する物体を検出する物体検出装置(20)であって、
前記第1画像上の前記物体の位置と前記第2画像上の前記物体の位置とから求められる視差に基づいて、前記移動体と前記物体との間の距離を複眼距離として算出する複眼距離算出部と、
前記第1画像及び前記第2画像の一方を用い、当該一方の画像上の前記物体の大きさに基づいて、前記移動体と前記物体との間の距離を単眼距離として算出する単眼距離算出部と、
前記複眼距離及び前記単眼距離の少なくとも一方が所定の距離閾値よりも大きいことを判定する距離判定部と、
前記複眼距離及び前記単眼距離の少なくとも一方が前記距離閾値よりも大きいと判定されたことを条件に、前記複眼距離と前記単眼距離との差分値を複数回に亘って取得し、取得された複数の前記差分値の中間値に基づいて前記複眼距離を補正する補正値を算出する補正値算出部と、
前記補正値により前記複眼距離を補正する距離補正部と、を備える物体検出装置。
An object detection device (20) is applied to a moving body (50) equipped with a first camera (11) and a second camera (12) for capturing a first image and a second image including parallax, and detects an object present around the moving body based on the first image and the second image,
a compound eye distance calculation unit that calculates a distance between the moving body and the object as a compound eye distance based on a parallax obtained from a position of the object on the first image and a position of the object on the second image;
a monocular distance calculation unit that uses one of the first image and the second image and calculates a distance between the moving body and the object as a monocular distance based on a size of the object in the one image;
a distance determination unit that determines whether at least one of the compound eye distance and the monocular distance is greater than a predetermined distance threshold;
a correction value calculation unit that, on condition that at least one of the compound eye distance and the monocular distance is determined to be greater than the distance threshold, acquires a difference value between the compound eye distance and the monocular distance multiple times and calculates a correction value for correcting the compound eye distance based on an intermediate value of the acquired multiple difference values;
and a distance correction unit that corrects the compound eye distance using the correction value .
前記距離補正部は、前記距離判定部の判定結果に関わらず、前記補正値による前記複眼距離の補正を実施する請求項に記載の物体検出装置。 The object detection device according to claim 1 , wherein the distance correction unit corrects the compound eye distance using the correction value regardless of a determination result of the distance determination unit. 所定期間における前記移動体と前記物体との間の距離の変化量が所定の変化量閾値よりも大きいことを判定する変化量判定部を備え、
前記補正値算出部は、前記所定期間における前記複眼距離の変化量が前記変化量閾値よりも大きいと判定されたことを条件に、その所定期間に取得された前記差分値を用いて前記補正値を算出する請求項1または2に記載の物体検出装置。
a change amount determination unit that determines whether a change amount of the distance between the moving body and the object in a predetermined period of time is greater than a predetermined change amount threshold,
The object detection device of claim 1 or 2, wherein the correction value calculation unit calculates the correction value using the difference value acquired during the specified period, on condition that it is determined that the amount of change in the compound eye distance during the specified period is greater than the change amount threshold.
前記第1カメラ及び前記第2カメラは、所定方向に並んで配置されており、
前記単眼距離算出部は、
前記物体が、前記所定方向における前記第1カメラと前記第2カメラとの間の中心に対して、前記第1カメラ側に存在しているか又は前記第2カメラ側に存在しているかを判定し、
前記物体が前記第1カメラ側に存在していると判定した場合に、前記第1画像を用いて前記単眼距離を算出し、
前記物体が前記第2カメラ側に存在していると判定した場合に、前記第2画像を用いて前記単眼距離を算出する請求項1からまでのいずれか一項に記載の物体検出装置。
The first camera and the second camera are arranged side by side in a predetermined direction,
The monocular distance calculation unit
determining whether the object is present on the first camera side or the second camera side with respect to a center between the first camera and the second camera in the predetermined direction;
When it is determined that the object is present on the first camera side, the monocular distance is calculated using the first image;
The object detection device according to claim 1 , wherein when it is determined that the object is present on the second camera side, the monocular distance is calculated using the second image.
所定方向に並んで配置され、視差を含む第1画像及び第2画像を撮影する第1カメラ(11)及び第2カメラ(12)が搭載された移動体(50)に適用され、前記第1画像及び前記第2画像に基づいて、前記移動体の周囲に存在する物体を検出する物体検出装置(20)であって、
前記第1画像上の前記物体の位置と前記第2画像上の前記物体の位置とから求められる視差に基づいて、前記移動体と前記物体との間の距離を複眼距離として算出する複眼距離算出部と、
前記第1画像及び前記第2画像の一方を用い、当該一方の画像上の前記物体の大きさに基づいて、前記移動体と前記物体との間の距離を単眼距離として算出する単眼距離算出部と、
前記複眼距離と前記単眼距離との差分値を複数回に亘って取得し、取得された複数の前記差分値の中間値に基づいて前記複眼距離を補正する距離補正部と、を備え
前記単眼距離算出部は、
前記物体が、前記所定方向における前記第1カメラと前記第2カメラとの間の中心に対して、前記第1カメラ側に存在しているか又は前記第2カメラ側に存在しているかを判定し、
前記物体が前記第1カメラ側に存在していると判定した場合に、前記第1画像を用いて前記単眼距離を算出し、
前記物体が前記第2カメラ側に存在していると判定した場合に、前記第2画像を用いて前記単眼距離を算出する物体検出装置。
An object detection device (20) is applied to a moving body (50) equipped with a first camera (11) and a second camera (12) that are arranged side by side in a predetermined direction and capture a first image and a second image including parallax, and detects an object present around the moving body based on the first image and the second image,
a compound eye distance calculation unit that calculates a distance between the moving body and the object as a compound eye distance based on a parallax obtained from a position of the object on the first image and a position of the object on the second image;
a monocular distance calculation unit that uses one of the first image and the second image and calculates a distance between the moving body and the object as a monocular distance based on a size of the object in the one image;
a distance correction unit that acquires a difference value between the compound eye distance and the monocular distance a plurality of times and corrects the compound eye distance based on an intermediate value of the acquired plurality of difference values ,
The monocular distance calculation unit
determining whether the object is present on the first camera side or the second camera side with respect to a center between the first camera and the second camera in the predetermined direction;
When it is determined that the object is present on the first camera side, the first image is used to calculate the monocular distance;
An object detection device that calculates the monocular distance using the second image when it is determined that the object is present on the second camera side .
視差を含む第1画像及び第2画像を撮影する第1カメラ(11)及び第2カメラ(12)が搭載された移動体(50)に適用され、前記第1画像及び前記第2画像に基づいて、前記移動体の周囲に存在する物体を検出するプログラムであって、A program that is applied to a moving body (50) equipped with a first camera (11) and a second camera (12) that capture a first image and a second image including parallax, and detects an object present around the moving body based on the first image and the second image,
コンピュータに、On the computer,
前記第1画像上の前記物体の位置と前記第2画像上の前記物体の位置とから求められる視差に基づいて、前記移動体と前記物体との間の距離を複眼距離として算出する複眼距離算出処理と、a compound eye distance calculation process for calculating a distance between the moving body and the object as a compound eye distance based on a parallax obtained from a position of the object on the first image and a position of the object on the second image;
前記第1画像及び前記第2画像の一方を用い、当該一方の画像上の前記物体の大きさに基づいて、前記移動体と前記物体との間の距離を単眼距離として算出する単眼距離算出処理と、a monocular distance calculation process for calculating a distance between the moving body and the object as a monocular distance based on a size of the object in one of the first image and the second image, using the one of the first image and the second image;
前記複眼距離及び前記単眼距離の少なくとも一方が所定の距離閾値よりも大きいことを判定する距離判定処理と、a distance determination process for determining whether at least one of the compound eye distance and the monocular distance is greater than a predetermined distance threshold;
前記複眼距離及び前記単眼距離の少なくとも一方が前記距離閾値よりも大きいと判定されたことを条件に、前記複眼距離と前記単眼距離との差分値を複数回に亘って取得し、取得された複数の前記差分値の中間値に基づいて前記複眼距離を補正する補正値を算出する補正値算出処理と、a correction value calculation process for obtaining a difference value between the compound eye distance and the monocular distance multiple times, on condition that at least one of the compound eye distance and the monocular distance is determined to be greater than the distance threshold, and calculating a correction value for correcting the compound eye distance based on an intermediate value of the obtained difference values;
前記補正値により前記複眼距離を補正する距離補正処理と、を実行させるプログラム。A distance correction process for correcting the compound eye distance using the correction value.
所定方向に並んで配置され、視差を含む第1画像及び第2画像を撮影する第1カメラ(11)及び第2カメラ(12)が搭載された移動体(50)に適用され、前記第1画像及び前記第2画像に基づいて、前記移動体の周囲に存在する物体を検出するプログラムであって、A program applied to a moving body (50) equipped with a first camera (11) and a second camera (12) that are arranged side by side in a predetermined direction and capture a first image and a second image including parallax, the program detecting an object present around the moving body based on the first image and the second image,
コンピュータに、On the computer,
前記第1画像上の前記物体の位置と前記第2画像上の前記物体の位置とから求められる視差に基づいて、前記移動体と前記物体との間の距離を複眼距離として算出する複眼距離算出処理と、a compound eye distance calculation process for calculating a distance between the moving body and the object as a compound eye distance based on a parallax obtained from a position of the object on the first image and a position of the object on the second image;
前記第1画像及び前記第2画像の一方を用い、当該一方の画像上の前記物体の大きさに基づいて、前記移動体と前記物体との間の距離を単眼距離として算出する単眼距離算出処理と、a monocular distance calculation process for calculating a distance between the moving body and the object as a monocular distance based on a size of the object in one of the first image and the second image, using the one of the first image and the second image;
前記複眼距離と前記単眼距離との差分値を複数回に亘って取得し、取得された複数の前記差分値の中間値に基づいて前記複眼距離を補正する距離補正処理と、実行させるものであり、a distance correction process for acquiring a difference value between the compound eye distance and the monocular distance multiple times and correcting the compound eye distance based on an intermediate value of the acquired multiple difference values;
前記単眼距離算出処理は、The monocular distance calculation process includes:
前記物体が、前記所定方向における前記第1カメラと前記第2カメラとの間の中心に対して、前記第1カメラ側に存在しているか又は前記第2カメラ側に存在しているかを判定し、determining whether the object is present on the first camera side or the second camera side with respect to a center between the first camera and the second camera in the predetermined direction;
前記物体が前記第1カメラ側に存在していると判定した場合に、前記第1画像を用いて前記単眼距離を算出し、When it is determined that the object is present on the first camera side, the first image is used to calculate the monocular distance;
前記物体が前記第2カメラ側に存在していると判定した場合に、前記第2画像を用いて前記単眼距離を算出するプログラム。A program that calculates the monocular distance using the second image when it is determined that the object is present on the second camera side.
JP2020064085A 2020-03-31 2020-03-31 Object detection device and program Active JP7491024B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020064085A JP7491024B2 (en) 2020-03-31 2020-03-31 Object detection device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020064085A JP7491024B2 (en) 2020-03-31 2020-03-31 Object detection device and program

Publications (2)

Publication Number Publication Date
JP2021163204A JP2021163204A (en) 2021-10-11
JP7491024B2 true JP7491024B2 (en) 2024-05-28

Family

ID=78003405

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020064085A Active JP7491024B2 (en) 2020-03-31 2020-03-31 Object detection device and program

Country Status (1)

Country Link
JP (1) JP7491024B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7813610B2 (en) * 2022-03-04 2026-02-13 株式会社Subaru Image processing device and image processing method
WO2025163785A1 (en) * 2024-01-31 2025-08-07 Astemo株式会社 External recognition device and external recognition method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001283199A (en) 2000-03-29 2001-10-12 Toyoda Mach Works Ltd Distance recognizing device
JP2010139275A (en) 2008-12-09 2010-06-24 Ricoh Co Ltd Device and method for measurement of compound eye distance for vehicle

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3827368B2 (en) * 1996-08-01 2006-09-27 富士通テン株式会社 Inter-vehicle distance measuring device with compound eye camera

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001283199A (en) 2000-03-29 2001-10-12 Toyoda Mach Works Ltd Distance recognizing device
JP2010139275A (en) 2008-12-09 2010-06-24 Ricoh Co Ltd Device and method for measurement of compound eye distance for vehicle

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Shuxiang Guo et al.,"Binocular Vision-based Underwater Ranging Methods",2017 IEEE International Conference on Mechatronics and Automation (ICMA),米国,IEEE,2017年08月06日,pp.1058-1063
佐藤 雄隆,"RGB-Dカメラから得られるDepthデータの歪み補正",映像情報インダストリアル,日本,産業開発機構(株),2014年03月01日,Vol.46, No.3,pp.66-71

Also Published As

Publication number Publication date
JP2021163204A (en) 2021-10-11

Similar Documents

Publication Publication Date Title
US10147003B2 (en) Lane detection device and method thereof, curve starting point detection device and method thereof, and steering assistance device and method thereof
CN110232836A (en) Object identification device and vehicle travel control system
US10007998B2 (en) Image processor, apparatus, and control system for correction of stereo images
US11560174B2 (en) Automatic steering control device
JP6602982B2 (en) In-vehicle camera, in-vehicle camera adjustment method, in-vehicle camera system
CN108351207A (en) Stereoscopic camera device
JP6722084B2 (en) Object detection device
JP7491024B2 (en) Object detection device and program
US10853666B2 (en) Target object estimating apparatus
JP6035774B2 (en) Image processing apparatus, image processing method, and vehicle
WO2017002811A1 (en) Lane deviation avoidance device
JP6778620B2 (en) Road marking device, road marking system, and road marking method
CN111989541A (en) Stereo camera device
WO2014148161A1 (en) Fault detection device
US20180321030A1 (en) Image processing device
JP4850963B1 (en) Vehicle driving support device
JP5717416B2 (en) Driving support control device
EP3829155B1 (en) Imaging system for railway vehicle
JP6747176B2 (en) Image processing device, photographing device, program, device control system and device
EP4030746B1 (en) Image processing device and stereo camera device using same
US11816902B2 (en) Vehicle external environment recognition apparatus
JP7307699B2 (en) object detector
JP2010018223A (en) Device for detecting vehicle traveling road surface
JP2020201876A (en) Information processing device and operation support system
WO2022254795A1 (en) Image processing device and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230309

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240206

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240328

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240429

R150 Certificate of patent or registration of utility model

Ref document number: 7491024

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150