JP7465671B2 - Image processing device and image processing method - Google Patents

Image processing device and image processing method Download PDF

Info

Publication number
JP7465671B2
JP7465671B2 JP2020027050A JP2020027050A JP7465671B2 JP 7465671 B2 JP7465671 B2 JP 7465671B2 JP 2020027050 A JP2020027050 A JP 2020027050A JP 2020027050 A JP2020027050 A JP 2020027050A JP 7465671 B2 JP7465671 B2 JP 7465671B2
Authority
JP
Japan
Prior art keywords
image
image processing
parameter
parameters
control
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
JP2020027050A
Other languages
Japanese (ja)
Other versions
JP2021131750A (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.)
Subaru Corp
Original Assignee
Subaru 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 Subaru Corp filed Critical Subaru Corp
Priority to JP2020027050A priority Critical patent/JP7465671B2/en
Publication of JP2021131750A publication Critical patent/JP2021131750A/en
Application granted granted Critical
Publication of JP7465671B2 publication Critical patent/JP7465671B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement Of Optical Distance (AREA)
  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)

Description

本開示は、ステレオ画像に基づいて視差画像を得る画像処理装置、およびそのような画像処理装置において使用される画像処理方法に関する。 This disclosure relates to an image processing device that obtains a parallax image based on a stereo image, and an image processing method used in such an image processing device.

自動車等の車両には、ステレオカメラにより得られたステレオ画像に基づいて、ステレオマッチング処理を行うことにより、物体までの距離および方位を検出するものがある。例えば、特許文献1には、左画像および右画像の上下位置を補正する平行化補正処理を行った後に、ステレオマッチング処理を行う技術が開示されている。 Some vehicles, such as automobiles, detect the distance and direction to an object by performing stereo matching processing based on stereo images obtained by a stereo camera. For example, Patent Document 1 discloses a technology in which stereo matching processing is performed after performing parallelization correction processing to correct the vertical positions of the left and right images.

特開2017-33366号公報JP 2017-33366 A

画像処理装置では、ステレオマッチング処理を行うことにより生成された視差画像の精度が高いことが望まれており、さらなる精度の向上が期待されている。 In image processing devices, it is desirable for the parallax images generated by performing stereo matching processing to be highly accurate, and further improvements in accuracy are expected.

視差画像の精度を高めることができる画像処理装置を提供することが望ましい。 It is desirable to provide an image processing device that can improve the accuracy of disparity images.

本開示の一実施の形態に係る画像処理装置は、画像処理部と、視差画像生成部と、制御部とを備える。画像処理部は、左画像および右画像を有するステレオ画像における、左画像および右画像の一方または双方に対して、制御パラメータに応じた画像処理を行うように構成される。視差画像生成部は、画像処理が行われたステレオ画像に含まれる左画像および右画像に基づいてステレオマッチング処理を行うことにより視差画像を生成するとともに、左画像および右画像のマッチング度合いに応じた評価値を算出するように構成される。制御部は、第1の期間において、制御パラメータを順次変化させ、視差画像生成部により算出された複数の評価値に基づいて、第1の期間の後の第2の期間に使用すべき制御パラメータを決定するように構成される。制御部は、第1の期間において、複数のパラメータのうちの1つを制御パラメータとして順次設定する。画像処理部は、複数のステレオ画像に対して、複数のパラメータのうちの設定されたパラメータに応じた画像処理を行う。視差画像生成部は、画像処理が行われた複数のステレオ画像のそれぞれに基づいて評価値を算出することにより、設定されたパラメータに対応する複数の評価値を算出する。制御部は、設定されたパラメータに対応する複数の評価値の代表値を算出し、代表値が最も大きくなるようなパラメータを予想することにより、第2の期間に使用すべき制御パラメータを決定する。 An image processing device according to an embodiment of the present disclosure includes an image processing unit, a parallax image generating unit, and a control unit. The image processing unit is configured to perform image processing on one or both of a left image and a right image in a stereo image having a left image and a right image according to a control parameter. The parallax image generating unit is configured to generate a parallax image by performing a stereo matching process based on the left image and the right image included in the stereo image subjected to image processing, and to calculate an evaluation value according to a matching degree of the left image and the right image. The control unit is configured to sequentially change the control parameter in a first period, and determine a control parameter to be used in a second period after the first period based on the multiple evaluation values calculated by the parallax image generating unit. The control unit sequentially sets one of the multiple parameters as a control parameter in the first period. The image processing unit performs image processing on the multiple stereo images according to a set parameter of the multiple parameters. The parallax image generating unit calculates an evaluation value based on each of the multiple stereo images subjected to image processing, thereby calculating multiple evaluation values corresponding to the set parameter. The control unit calculates a representative value of a plurality of evaluation values corresponding to the set parameters, and predicts the parameter that will produce the largest representative value, thereby determining the control parameter to be used in the second period.

本開示の一実施の形態に係る画像処理方法は、左画像および右画像を有するステレオ画像における、左画像および右画像の一方または双方に対して、制御パラメータに応じた画像処理を行うことと、画像処理が行われたステレオ画像に含まれる左画像および右画像に基づいてステレオマッチング処理を行うことにより視差画像を生成することと、ステレオマッチング処理において、左画像および右画像のマッチング度合いに応じた評価値を算出することと、第1の期間において、制御パラメータを順次変化させることと、複数の評価値に基づいて、第1の期間の後の第2の期間に使用すべき制御パラメータを決定することとを含む。上記制御パラメータを決定する際、第1の期間において、複数のパラメータのうちの1つを制御パラメータとして順次設定し、複数のステレオ画像に対して、複数のパラメータのうちの設定されたパラメータに応じた画像処理を行い、画像処理が行われた複数のステレオ画像のそれぞれに基づいて評価値を算出することにより、設定されたパラメータに対応する複数の評価値を算出し、設定されたパラメータに対応する複数の評価値の代表値を算出し、代表値が最も大きくなるようなパラメータを予想することにより、第2の期間に使用すべき制御パラメータを決定する。
The image processing method according to an embodiment of the present disclosure includes performing image processing on one or both of the left and right images in a stereo image having a left image and a right image according to a control parameter, performing stereo matching processing based on the left and right images included in the stereo image subjected to image processing to generate a parallax image, calculating an evaluation value according to the degree of matching of the left and right images in the stereo matching processing, sequentially changing the control parameter in a first period, and determining a control parameter to be used in a second period after the first period based on the multiple evaluation values. When determining the control parameter, in the first period, one of the multiple parameters is sequentially set as the control parameter, image processing is performed on the multiple stereo images according to the set parameter of the multiple parameters, and an evaluation value is calculated based on each of the multiple stereo images subjected to image processing to calculate multiple evaluation values corresponding to the set parameter, a representative value of the multiple evaluation values corresponding to the set parameter is calculated, and the control parameter to be used in the second period is determined by predicting the parameter with the largest representative value.

本開示の一実施の形態に係る画像処理装置および画像処理方法によれば、視差画像の精度を高めることができる。 According to an image processing device and an image processing method according to an embodiment of the present disclosure, the accuracy of the parallax image can be improved.

本開示の一実施の形態に係る画像処理装置の一構成例を表すブロック図である。1 is a block diagram illustrating an example of a configuration of an image processing device according to an embodiment of the present disclosure. 図1に示したステレオカメラが生成した左画像および右画像の一例を表す説明図である。2 is an explanatory diagram illustrating an example of a left image and a right image generated by the stereo camera illustrated in FIG. 1 . 図1に示したステレオカメラが生成した左画像および右画像の他の例を表す説明図である。1. FIG. 4 is an explanatory diagram illustrating another example of the left image and the right image generated by the stereo camera illustrated in FIG. 図1に示したステレオカメラが生成した左画像および右画像の他の例を表す説明図である。1. FIG. 4 is an explanatory diagram illustrating another example of the left image and the right image generated by the stereo camera illustrated in FIG. 図1に示した画像処理部の一動作例を表す説明図である。2 is an explanatory diagram illustrating an example of an operation of the image processing unit illustrated in FIG. 1 . 図1に示した画像処理部の他の動作例を表す説明図である。1. FIG. 4 is an explanatory diagram illustrating another example of the operation of the image processing unit illustrated in FIG. 図1に示した処理部の一動作例を表すフローチャートである。2 is a flowchart illustrating an example of an operation of a processing unit illustrated in FIG. 1 . 図1に示した設定制御部の一動作例を表す説明図である。2 is an explanatory diagram illustrating an example of an operation of a setting control unit illustrated in FIG. 1; 図1に示したパラメータ決定部の一動作例を表す説明図である。2 is an explanatory diagram illustrating an operation example of a parameter determination unit illustrated in FIG. 1 . 変形例に係る処理部の一動作例を表すフローチャートである。13 is a flowchart illustrating an example of an operation of a processing unit according to a modified example. 変形例に係る設定制御部の一動作例を表す説明図である。13 is an explanatory diagram illustrating an example of an operation of a setting control unit according to a modified example. FIG. 他の変形例に係る画像処理装置の一構成例を表すブロック図である。FIG. 13 is a block diagram illustrating an example of the configuration of an image processing device according to another modified example. 他の変形例に係る画像処理装置の一構成例を表すブロック図である。FIG. 13 is a block diagram illustrating an example of a configuration of an image processing device according to another modified example. 他の変形例に係る画像処理装置の一構成例を表すブロック図である。FIG. 13 is a block diagram illustrating an example of the configuration of an image processing device according to another modified example. 図14に示した設定制御部の一動作例を表す説明図である。15 is an explanatory diagram illustrating an example of an operation of the setting control unit illustrated in FIG. 14 .

以下、本開示の実施の形態について、図面を参照して詳細に説明する。 The following describes in detail the embodiments of the present disclosure with reference to the drawings.

<実施の形態>
[構成例]
図1は、一実施の形態に係る画像処理装置(画像処理装置1)の一構成例を表すものである。画像処理装置1は、ステレオカメラ11と、処理部20とを備えている。画像処理装置1は、この例では、自動車等の車両10に搭載される。
<Embodiment>
[Configuration example]
1 shows an example of the configuration of an image processing device (image processing device 1) according to an embodiment. The image processing device 1 includes a stereo camera 11 and a processing unit 20. In this example, the image processing device 1 is mounted on a vehicle 10 such as an automobile.

ステレオカメラ11は、車両10の前方を撮像することにより、互いに視差を有する一組の画像(左画像PLおよび右画像PR)を生成するように構成される。ステレオカメラ11は、左カメラ11Lと、右カメラ11Rとを有する。左カメラ11Lおよび右カメラ11Rのそれぞれは、レンズとイメージセンサとを含んでいる。左カメラ11Lおよび右カメラ11Rは、この例では、車両10の車両内において、車両10のフロントガラスの上部近傍に、車両10の幅方向に所定距離だけ離間して配置される。左カメラ11Lおよび右カメラ11Rは、互いに同期して撮像動作を行う。左カメラ11Lは左画像PLを生成し、右カメラ11Rは右画像PRを生成する。左画像PLおよび右画像PRは、ステレオ画像PICを構成する。ステレオカメラ11は、所定のフレームレート(例えば60[fps])で撮像動作を行うことにより、一連のステレオ画像PICを生成するようになっている。 The stereo camera 11 is configured to capture an image of the area in front of the vehicle 10, thereby generating a pair of images (a left image PL and a right image PR) having a parallax between them. The stereo camera 11 has a left camera 11L and a right camera 11R. Each of the left camera 11L and the right camera 11R includes a lens and an image sensor. In this example, the left camera 11L and the right camera 11R are disposed in the vehicle 10, near the upper part of the windshield of the vehicle 10, and spaced apart by a predetermined distance in the width direction of the vehicle 10. The left camera 11L and the right camera 11R perform imaging operations in synchronization with each other. The left camera 11L generates a left image PL, and the right camera 11R generates a right image PR. The left image PL and the right image PR constitute a stereo image PIC. The stereo camera 11 performs imaging operations at a predetermined frame rate (for example, 60 [fps]) to generate a series of stereo images PIC.

図2は、ステレオ画像PICの一例を表すものであり、図2(A)は左画像PLの一例を示し、図2(B)は右画像PRの一例を示す。この例では、車両10が走行している道路における車両10の前方に、他車両(先行車両90)が走行している。左カメラ11Lがこの先行車両90を撮像することにより左画像PLを生成し、右カメラ11Rがこの先行車両90を撮像することにより右画像PRを生成する。ステレオカメラ11は、このような左画像PLおよび右画像PRを含むステレオ画像PICを生成するようになっている。 Figure 2 shows an example of a stereo image PIC, with Figure 2(A) showing an example of a left image PL and Figure 2(B) showing an example of a right image PR. In this example, another vehicle (preceding vehicle 90) is traveling ahead of vehicle 10 on the road on which vehicle 10 is traveling. The left camera 11L captures an image of this preceding vehicle 90 to generate the left image PL, and the right camera 11R captures an image of this preceding vehicle 90 to generate the right image PR. The stereo camera 11 is configured to generate a stereo image PIC that includes such a left image PL and right image PR.

処理部20は、ステレオカメラ11から供給されたステレオ画像PICに基づいて、車両10の前方の物体を認識するように構成される。車両10では、例えば、処理部20が認識した物体についての情報に基づいて、例えば、車両10の走行制御を行い、あるいは、認識した物体についての情報をコンソールモニタに表示することができるようになっている。処理部20は、例えば、プログラムを実行するCPU(Central Processing Unit)、処理データを一時的に記憶するRAM(Random Access Memory)、プログラムを記憶するROM(Read Only Memory)などにより構成される。処理部20は、画像処理部21と、視差画像生成部22と、画像処理制御部24と、物体認識部29とを有している。 The processing unit 20 is configured to recognize an object in front of the vehicle 10 based on the stereo image PIC supplied from the stereo camera 11. In the vehicle 10, for example, the driving control of the vehicle 10 is performed based on the information about the object recognized by the processing unit 20, or the information about the recognized object is displayed on a console monitor. The processing unit 20 is configured, for example, with a CPU (Central Processing Unit) that executes a program, a RAM (Random Access Memory) that temporarily stores processing data, and a ROM (Read Only Memory) that stores the program. The processing unit 20 has an image processing unit 21, a parallax image generating unit 22, an image processing control unit 24, and an object recognition unit 29.

画像処理部21は、ステレオ画像PICに含まれる左画像PLおよび右画像PRのうちの一方および双方に対して、画像処理制御部24から供給された制御パラメータCTLに応じた画像処理を行うことにより、左画像PL1および右画像PR1を生成するように構成される。 The image processing unit 21 is configured to generate a left image PL1 and a right image PR1 by performing image processing on one or both of the left image PL and the right image PR included in the stereo image PIC according to the control parameters CTL supplied from the image processing control unit 24.

すなわち、処理部20では、後述するように、視差画像生成部22が、左画像PL(左画像PL1)および右画像PR(右画像PR1)に基づいてステレオマッチング処理を行うことにより、視差画像PDを生成する。このように、視差画像生成部22が視差画像PDを生成する際、図2に示したように、左画像PLおよび右画像PRにおける上下方向の画像位置がほぼ等しいことや、左画像PLおよび右画像PRにおける回転方向の画像角度がほぼ等しいことが望まれる。しかしながら、左カメラ11Lおよび右カメラ11Rが相対的にずれた位置や向きに配置されることにより、左画像PLおよび右画像PRにおける上下方向の画像位置が互いにずれる場合や、左画像PLおよび右画像PRにおける回転方向の画像角度が互いにずれる場合があり得る。 That is, in the processing unit 20, as described below, the parallax image generating unit 22 performs stereo matching processing based on the left image PL (left image PL1) and the right image PR (right image PR1) to generate the parallax image PD. In this way, when the parallax image generating unit 22 generates the parallax image PD, it is desirable that the image positions in the vertical direction in the left image PL and the right image PR are approximately equal, and the image angles in the rotational direction in the left image PL and the right image PR are approximately equal, as shown in FIG. 2. However, if the left camera 11L and the right camera 11R are arranged in positions and orientations that are offset relative to each other, the image positions in the vertical direction in the left image PL and the right image PR may be offset from each other, or the image angles in the rotational direction in the left image PL and the right image PR may be offset from each other.

図3は、左画像PLおよび右画像PRにおける上下方向の画像位置が互いにずれる場合における、ステレオ画像PICの一例を表すものであり、図3(A)は左画像PLの一例を示し、図3(B)は右画像PRの一例を示す。この例では、左画像PLにおける上下方向の画像位置は、右画像PRにおける上下方向の画像位置よりも高い。このような状況は、例えば、左カメラ11Lが、右カメラ11Rの位置よりも低い位置に配置された場合により生じ得る。 Figure 3 shows an example of a stereo image PIC when the vertical image positions of the left image PL and the right image PR are misaligned from each other, with Figure 3(A) showing an example of the left image PL and Figure 3(B) showing an example of the right image PR. In this example, the vertical image position of the left image PL is higher than the vertical image position of the right image PR. This situation can arise, for example, when the left camera 11L is positioned lower than the right camera 11R.

図4は、左画像PLおよび右画像PRにおける回転方向の画像角度が互いにずれる場合におけるステレオ画像PICの一例を表すものであり、図4(A)は左画像PLの一例を示し、図4(B)は右画像PRの一例を示す。この例では、左画像PLにおける画像が、水平方向からやや反時計回りに回転している。このような状況は、例えば、左カメラ11Lが、光軸を中心として水平方向から時計回りにやや回転した角度で配置された場合に生じ得る。 Figure 4 shows an example of a stereo image PIC when the image angles in the rotational direction of the left image PL and the right image PR are misaligned from each other, with Figure 4(A) showing an example of the left image PL and Figure 4(B) showing an example of the right image PR. In this example, the image in the left image PL is rotated slightly counterclockwise from the horizontal direction. This situation can occur, for example, when the left camera 11L is positioned at an angle rotated slightly clockwise from the horizontal direction around the optical axis.

このように、左画像PLおよび右画像PRにおける上下方向の画像位置が互いにずれる場合(図3)や、左画像PLおよび右画像PRにおける回転方向の画像角度が互いにずれる場合(図4)には、視差画像生成部22は、ステレオマッチング処理を行うことが難しくなり、その結果、視差画像PDの精度が低下するおそれがある。そこで、画像処理装置1では、画像処理部21は、左画像PLおよび右画像PRの一方または双方に対して、制御パラメータCTLに応じた画像処理を行うことにより、左画像PL1および右画像PR1を生成する。この画像処理は、上下方向に画像を移動させる処理(移動処理A1)や、画像を回転させる処理(回転処理A2)を含む。制御パラメータCTLは、移動処理A1における上下方向の画像の移動量についての情報や、回転処理A2における画像の回転角度についての情報を含む。そして、視差画像生成部22は、この左画像PL1および右画像PR1に基づいてステレオマッチング処理を行う。 In this way, when the image positions in the left image PL and the right image PR are misaligned in the vertical direction (FIG. 3) or when the image angles in the rotational direction in the left image PL and the right image PR are misaligned in the vertical direction (FIG. 4), it becomes difficult for the parallax image generating unit 22 to perform stereo matching processing, and as a result, there is a risk of the accuracy of the parallax image PD decreasing. Therefore, in the image processing device 1, the image processing unit 21 performs image processing according to the control parameters CTL on one or both of the left image PL and the right image PR to generate the left image PL1 and the right image PR1. This image processing includes a process of moving the image in the vertical direction (moving process A1) and a process of rotating the image (rotating process A2). The control parameters CTL include information on the amount of movement of the image in the vertical direction in the moving process A1 and information on the rotation angle of the image in the rotating process A2. Then, the parallax image generating unit 22 performs stereo matching processing based on the left image PL1 and the right image PR1.

図5は、図3に示したように、左画像PLにおける上下方向の画像位置が、右画像PRにおける上下方向の画像位置よりも高い場合における画像処理部21の一動作例を表すものであり、図5(A)は、画像処理部21が生成した左画像PL1を示し、図5(B)は、画像処理部21が生成した右画像PR1を示す。この例では、画像処理部21は、左画像PLを下方向に移動させる移動処理A1を行うことにより、左画像PL1および右画像PR1における上下方向の画像位置を一致させる。 Figure 5 shows an example of the operation of the image processing unit 21 when the vertical image position in the left image PL is higher than the vertical image position in the right image PR, as shown in Figure 3, where Figure 5(A) shows the left image PL1 generated by the image processing unit 21 and Figure 5(B) shows the right image PR1 generated by the image processing unit 21. In this example, the image processing unit 21 performs movement process A1 to move the left image PL downward, thereby matching the vertical image positions in the left image PL1 and the right image PR1.

図6は、図4に示したように、左画像PLにおける画像が、水平方向からやや反時計回りに回転している場合における画像処理部21の一動作例を表すものであり、図6(A)は、画像処理部21が生成した左画像PL1を示し、図6(B)は、画像処理部21が生成した右画像PR1を示す。この例では、画像処理部21は、左画像PLを時計回りに回転させる回転処理A2を行うことにより、左画像PL1および右画像PR1における回転方向の画像角度を一致させる。 Figure 6 shows an example of the operation of the image processing unit 21 when the image in the left image PL is rotated slightly counterclockwise from the horizontal direction as shown in Figure 4, where Figure 6 (A) shows the left image PL1 generated by the image processing unit 21 and Figure 6 (B) shows the right image PR1 generated by the image processing unit 21. In this example, the image processing unit 21 performs a rotation process A2 that rotates the left image PL clockwise, thereby matching the image angles of the rotation direction in the left image PL1 and the right image PR1.

これにより、視差画像生成部22は、左画像PL1および右画像PR1に基づいてステレオマッチング処理を行いやすくなり、その結果、視差画像PDの精度を高めることができるようになっている。 This makes it easier for the parallax image generating unit 22 to perform stereo matching processing based on the left image PL1 and the right image PR1, thereby improving the accuracy of the parallax image PD.

視差画像生成部22(図1)は、画像処理部21により生成された左画像PL1および右画像PR1に基づいて、ステレオマッチング処理を含む所定の画像処理を行うことにより、視差画像PDを生成するように構成される。視差画像PDは、複数の画素値を有している。複数の画素値のそれぞれは、各画素における視差についての値を示している。言い換えれば、複数の画素値のそれぞれは、3次元の実空間における、各画素に対応する点までの距離に対応している。 The parallax image generating unit 22 (Fig. 1) is configured to generate a parallax image PD by performing predetermined image processing, including stereo matching processing, based on the left image PL1 and right image PR1 generated by the image processing unit 21. The parallax image PD has a plurality of pixel values. Each of the plurality of pixel values indicates a value for the parallax at each pixel. In other words, each of the plurality of pixel values corresponds to the distance to a point corresponding to each pixel in three-dimensional real space.

視差画像生成部22は、対応点算出部23を有している。対応点算出部23は、左画像PL1および右画像PR1に基づいて、区分された複数のサブ領域Sのそれぞれを単位としてステレオマッチング処理を行うことにより、互いに対応する2つの画像点を含む対応点CPを特定するように構成される。具体的には、対応点算出部23は、左画像PL1における複数のサブ領域SL、および右画像PR1における複数のサブ領域SRのうち、同様の画像パターンを有するサブ領域SL,SRを探索することにより、互いに対応する左画像点CPLおよび右画像点CPRを対応点CPとして特定するようになっている。また、対応点算出部23は、左画像PL1および右画像PR1により得られた対応点CPの数を算出し、その算出結果を対応点数CNTとして、画像処理制御部24に供給するようになっている。対応点算出部23は、例えばテンプレートマッチングにより対応点CPを特定してもよいし、局所特徴量に基づく特徴量マッチングにより対応点CPを特定してもよい。 The parallax image generating unit 22 includes a corresponding point calculation unit 23. The corresponding point calculation unit 23 is configured to perform stereo matching processing on each of a plurality of divided sub-regions S based on the left image PL1 and the right image PR1, thereby identifying corresponding points CP including two corresponding image points. Specifically, the corresponding point calculation unit 23 searches for sub-regions SL, SR having similar image patterns among a plurality of sub-regions SL in the left image PL1 and a plurality of sub-regions SR in the right image PR1, thereby identifying corresponding left image points CPL and right image points CPR as corresponding points CP. The corresponding point calculation unit 23 also calculates the number of corresponding points CP obtained from the left image PL1 and the right image PR1, and supplies the calculation result to the image processing control unit 24 as the number of corresponding points CNT. The corresponding point calculation unit 23 may identify the corresponding points CP by, for example, template matching, or may identify the corresponding points CP by feature amount matching based on local features.

画像処理制御部24は、キャリブレーション処理を行うことにより、視差画像PDの精度を高めることができる制御パラメータCTLを決定するように構成される。キャリブレーション処理は、例えば、エンジンが起動した時、例えば交通信号が赤信号である場合などにおいて車両が停止した時、不具合が発生した時などに実行される。画像処理制御部24は、設定制御部25と、対応点数格納部26と、平均値算出部27と、パラメータ決定部28とを有している。 The image processing control unit 24 is configured to perform a calibration process to determine a control parameter CTL that can improve the accuracy of the parallax image PD. The calibration process is performed, for example, when the engine is started, when the vehicle is stopped, for example, when a traffic light is red, or when a malfunction occurs. The image processing control unit 24 has a setting control unit 25, a corresponding point storage unit 26, an average value calculation unit 27, and a parameter determination unit 28.

設定制御部25は、キャリブレーション処理において、制御パラメータCTLを順次変化させるように構成される。具体的には、設定制御部25は、キャリブレーション処理において、移動処理A1における上下方向の画像の移動量や、回転処理A2における画像の回転角度を順次変化させ、この移動量および回転角度についての情報を含む制御パラメータCTLを順次生成するようになっている。また、設定制御部25は、キャリブレーション処理において、パラメータ決定部28により決定された制御パラメータCTLAに基づいて、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLを設定するようになっている。 The setting control unit 25 is configured to sequentially change the control parameter CTL in the calibration process. Specifically, in the calibration process, the setting control unit 25 sequentially changes the amount of movement of the image in the vertical direction in the movement process A1 and the rotation angle of the image in the rotation process A2, and sequentially generates the control parameter CTL including information on the amount of movement and the rotation angle. In addition, in the calibration process, the setting control unit 25 sets the control parameter CTL to be used after the calibration process is completed based on the control parameter CTLA determined by the parameter determination unit 28.

対応点数格納部26は、対応点算出部23により算出された対応点数CNTを、設定制御部25が設定した制御パラメータCTLと対応づけて記憶するように構成される。 The corresponding point number storage unit 26 is configured to store the corresponding point number CNT calculated by the corresponding point calculation unit 23 in association with the control parameter CTL set by the setting control unit 25.

平均値算出部27は、対応点数格納部26に格納された、様々な制御パラメータCTLに対応づけられた複数の対応点数CNTのうち、同じ制御パラメータCTLに対応づけられた複数の対応点数CNTの平均値CAVを算出するように構成される。これにより、平均値算出部27は、複数の制御パラメータCTLにそれぞれ対応づけられた複数の平均値CAVを算出するようになっている。 The average value calculation unit 27 is configured to calculate an average value CAV of multiple corresponding points CNT associated with the same control parameter CTL among multiple corresponding points CNT associated with various control parameters CTL stored in the corresponding point storage unit 26. In this way, the average value calculation unit 27 is configured to calculate multiple average values CAV associated with the multiple control parameters CTL, respectively.

パラメータ決定部28は、複数の制御パラメータCTLにそれぞれ対応づけられた複数の平均値CAVに基づいて、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLを制御パラメータCTLAとして決定するように構成される。 The parameter determination unit 28 is configured to determine the control parameter CTL to be used after the calibration process is completed as the control parameter CTLA based on a plurality of average values CAV respectively associated with the plurality of control parameters CTL.

物体認識部29は、左画像PL1および右画像PR1と、視差画像生成部22により生成された視差画像PDとに基づいて、車両10の前方の物体を認識するように構成される。そして、物体認識部29は、その認識結果についてのデータを出力するようになっている。 The object recognition unit 29 is configured to recognize objects in front of the vehicle 10 based on the left image PL1, the right image PR1, and the parallax image PD generated by the parallax image generation unit 22. The object recognition unit 29 then outputs data on the recognition result.

ここで、画像処理部21は、本開示における「画像処理部」の一具体例に対応する。視差画像生成部22は、本開示における「視差画像生成部」の一具体例に対応する。画像処理制御部24は、本開示における「制御部」の一具体例に対応する。ステレオ画像PICは、本開示における「ステレオ画像」の一具体例に対応する。左画像PLは、本開示における「左画像」の一具体例に対応する。右画像PRは、本開示における「右画像」の一具体例に対応する。視差画像PDは、本開示における「視差画像」の一具体例に対応する。対応点は、本開示における「対応点CP」の一具体例に対応する。制御パラメータCTLは、本開示における「制御パラメータ」の一具体例に対応する。対応点数CNTは、本開示における「評価値」の一具体例に対応する。平均値CAVは、本開示における「代表値」の一具体例に対応する。 Here, the image processing unit 21 corresponds to a specific example of an "image processing unit" in the present disclosure. The parallax image generating unit 22 corresponds to a specific example of a "parallax image generating unit" in the present disclosure. The image processing control unit 24 corresponds to a specific example of a "control unit" in the present disclosure. The stereo image PIC corresponds to a specific example of a "stereo image" in the present disclosure. The left image PL corresponds to a specific example of a "left image" in the present disclosure. The right image PR corresponds to a specific example of a "right image" in the present disclosure. The parallax image PD corresponds to a specific example of a "parallax image" in the present disclosure. The corresponding points correspond to a specific example of a "corresponding point CP" in the present disclosure. The control parameter CTL corresponds to a specific example of a "control parameter" in the present disclosure. The number of corresponding points CNT corresponds to a specific example of an "evaluation value" in the present disclosure. The average value CAV corresponds to a specific example of a "representative value" in the present disclosure.

[動作および作用]
続いて、本実施の形態の画像処理装置1の動作および作用について説明する。
[Actions and Functions]
Next, the operation and function of the image processing device 1 of this embodiment will be described.

(全体動作概要)
まず、図1を参照して、画像処理装置1の全体動作概要を説明する。ステレオカメラ11は、車両10の前方を撮像することにより、左画像PLおよび右画像PRを含むステレオ画像PICを生成する。処理部20において、画像処理部21は、ステレオ画像PICに含まれる左画像PLおよび右画像PRの一方または双方に対して、制御パラメータCTLに応じた画像処理を行うことにより、左画像PL1および右画像PR1を生成する。視差画像生成部22は、画像処理部21により生成された左画像PL1および右画像PR1に基づいて、ステレオマッチング処理を含む所定の画像処理を行うことにより、視差画像PDを生成する。画像処理制御部24は、キャリブレーション処理を行うことにより、視差画像PDの精度を高めることができる制御パラメータCTLを決定する。物体認識部29は、左画像PL1および右画像PR1と、視差画像生成部22により生成された視差画像PDとに基づいて、車両10の前方の物体を認識する。
(Overall operation overview)
First, an overview of the overall operation of the image processing device 1 will be described with reference to FIG. 1. The stereo camera 11 captures an image ahead of the vehicle 10 to generate a stereo image PIC including a left image PL and a right image PR. In the processing unit 20, the image processing unit 21 performs image processing according to a control parameter CTL on one or both of the left image PL and the right image PR included in the stereo image PIC to generate a left image PL1 and a right image PR1. The parallax image generating unit 22 performs predetermined image processing including a stereo matching process based on the left image PL1 and the right image PR1 generated by the image processing unit 21 to generate a parallax image PD. The image processing control unit 24 performs a calibration process to determine a control parameter CTL that can increase the accuracy of the parallax image PD. The object recognition unit 29 recognizes an object ahead of the vehicle 10 based on the left image PL1 and the right image PR1 and the parallax image PD generated by the parallax image generating unit 22.

(詳細動作)
図7は、キャリブレーション処理における処理部20の一動作例を表すものである。図8は、キャリブレーション処理における、制御パラメータCTLの一設定例を表すものである。図8において、N個のパラメータP(パラメータP1~PN)のそれぞれは、制御パラメータCTLである。パラメータPは、移動処理A1における上下方向の画像の移動量についての情報と、回転処理A2における画像の回転角度についての情報を含んでいる。
(Detailed operation)
Fig. 7 shows an example of an operation of the processing unit 20 in the calibration process. Fig. 8 shows an example of a setting of the control parameters CTL in the calibration process. In Fig. 8, each of the N parameters P (parameters P 1 to P N ) is a control parameter CTL. The parameters P include information on the amount of movement of the image in the vertical direction in the movement process A1 and information on the rotation angle of the image in the rotation process A2.

処理部20は、キャリブレーション期間TCにおける複数の期間T(この例ではM個の期間T1~TM)のそれぞれにおいて、制御パラメータCTLを順次設定することにより、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLを決定する。以下に、この処理について詳細に説明する。 The processing unit 20 sequentially sets the control parameters CTL for each of the multiple periods T (M periods T 1 to T M in this example) in the calibration period TC, thereby determining the control parameters CTL to be used after the calibration process is completed. This process will be described in detail below.

まず、画像処理制御部24の設定制御部25は、制御パラメータCTLを初期値に設定する(ステップS101)。具体的には、設定制御部25は、移動処理A1における上下方向の画像の移動量を初期値に設定するとともに、回転処理A2における画像の回転角度を初期値に設定する。図8の例では、設定制御部25は、制御パラメータCTLをパラメータP1に設定する。 First, the setting control unit 25 of the image processing control unit 24 sets the control parameter CTL to an initial value (step S101). Specifically, the setting control unit 25 sets the amount of image movement in the vertical direction in the movement process A1 to an initial value, and sets the image rotation angle in the rotation process A2 to an initial value. In the example of Fig. 8, the setting control unit 25 sets the control parameter CTL to the parameter P1 .

次に、画像処理部21は、ステレオカメラ11により生成されたステレオ画像PICを取得する(ステップS102)。 Next, the image processing unit 21 acquires the stereo image PIC generated by the stereo camera 11 (step S102).

次に、画像処理部21は、ステレオ画像PICに対して、制御パラメータCTLに応じた画像処理を行うことにより、左画像PL1および右画像PR1を生成する(ステップS103)。 Next, the image processing unit 21 performs image processing on the stereo image PIC according to the control parameters CTL to generate a left image PL1 and a right image PR1 (step S103).

次に、視差画像生成部22は、左画像PL1および右画像PR1に基づいて、ステレオマッチング処理を含む所定の画像処理を行うことにより視差画像PDを生成するとともに、対応点数CNTを算出する(ステップS104)。 Next, the parallax image generating unit 22 generates a parallax image PD by performing predetermined image processing including stereo matching processing based on the left image PL1 and the right image PR1, and calculates the number of corresponding points CNT (step S104).

次に、画像処理制御部24の対応点数格納部26は、視差画像生成部22により算出された対応点数CNTを、設定制御部25が設定した制御パラメータCTLと対応づけて記憶する(ステップS105)。 Next, the corresponding point number storage unit 26 of the image processing control unit 24 stores the corresponding point number CNT calculated by the parallax image generating unit 22 in association with the control parameter CTL set by the setting control unit 25 (step S105).

次に、画像処理制御部24の設定制御部25は、全ての制御パラメータCTLを設定したかどうかを確認する(ステップS106)。まだ全ての制御パラメータCTLを設定していない場合(ステップS106において“N”)には、設定制御部25は、制御パラメータCTLを変更する(ステップS107)。具体的には、設定制御部25は、移動処理A1における上下方向の画像の移動量や、回転処理A2における画像の回転角度を変更することにより、制御パラメータCTLを変更する。そして、ステップS102の処理に戻る。このようにして、処理部20は、全ての制御パラメータCTLを設定するまで、ステップS102~S107の処理を繰り返す。 Next, the setting control unit 25 of the image processing control unit 24 checks whether all the control parameters CTL have been set (step S106). If all the control parameters CTL have not yet been set ("N" in step S106), the setting control unit 25 changes the control parameters CTL (step S107). Specifically, the setting control unit 25 changes the control parameters CTL by changing the amount of vertical movement of the image in the movement process A1 and the rotation angle of the image in the rotation process A2. Then, the process returns to step S102. In this way, the processing unit 20 repeats the processes of steps S102 to S107 until all the control parameters CTL have been set.

図8の例では、処理部20は、制御パラメータCTLをパラメータP1に設定し、1つのフレーム画像PICに対する処理を行い、次に、制御パラメータCTLをパラメータP2に設定し、1つのフレーム画像PICに対する処理を行い、次に、制御パラメータCTLをパラメータP3に設定し、1つのフレーム画像PICに対する処理を行う。パラメータP4~PNについても同様である。これにより、N個の制御パラメータCTL(パラメータP1~PN)のそれぞれに対応づけられた1つの対応点数CNTが、対応点数格納部26に記憶される。 8, the processing unit 20 sets the control parameter CTL to parameter P1 and processes one frame image PIC, then sets the control parameter CTL to parameter P2 and processes one frame image PIC, then sets the control parameter CTL to parameter P3 and processes one frame image PIC. The same is true for parameters P4 to PN . As a result, one corresponding point number CNT associated with each of the N control parameters CTL (parameters P1 to PN ) is stored in the corresponding point number storage unit 26.

ステップS106において、全ての制御パラメータCTLを設定した場合(ステップS106において“Y”)には、設定制御部25は、ステップS101~S107の処理を所定回数(この例ではM回)繰り返したかどうかを確認する(ステップS108)。まだ所定回数繰り返していない場合(ステップS108において“N”)には、ステップS101の処理に戻る。このようにして、処理部20は、ステップS101~S107の処理を所定回数(この例ではM回)繰り返す。 If all control parameters CTL have been set in step S106 ("Y" in step S106), the setting control unit 25 checks whether the processing of steps S101 to S107 has been repeated a predetermined number of times (M times in this example) (step S108). If the processing has not yet been repeated the predetermined number of times ("N" in step S108), the processing returns to step S101. In this way, the processing unit 20 repeats the processing of steps S101 to S107 a predetermined number of times (M times in this example).

図8の例では、処理部20は、期間T1において、制御パラメータCTLをパラメータP1~PNに順次設定し、フレーム画像PICに対する処理をそれぞれ行う。同様に、処理部20は、期間T2において、制御パラメータCTLをパラメータP1~PNに順次設定し、フレーム画像PICに対する処理をそれぞれ行う。期間T3~TMについても同様である。これにより、N個の制御パラメータCTL(パラメータP1~PN)のそれぞれに対応づけられたM個の対応点数CNTが、対応点数格納部26に記憶される。 8, the processing unit 20 sequentially sets the control parameter CTL to parameters P1 to PN during period T1 , and processes the frame image PIC, respectively. Similarly, the processing unit 20 sequentially sets the control parameter CTL to parameters P1 to PN during period T2 , and processes the frame image PIC, respectively. The same is true for periods T3 to TM . As a result, M corresponding points CNT corresponding to the N control parameters CTL (parameters P1 to PN ), respectively, are stored in the corresponding point storage unit 26.

ステップS108において、所定回数繰り返した場合(ステップS108において“Y”)には、平均値算出部27は、対応点数格納部26に格納された、複数の制御パラメータCTLに対応づけられた複数の対応点数CNTに基づいて、各制御パラメータCTLについて、対応点数CNTの平均値CAVを算出する(ステップS109)。具体的には、図8の例では、平均値算出部27は、パラメータP1に対応づけられたM個の対応点数CNTの平均値CAV(平均値CAV1)を算出し、パラメータP2に対応づけられたM個の対応点数CNTの平均値CAV(平均値CAV2)を算出し、パラメータP3に対応づけられたM個の対応点数CNTの平均値CAV(平均値CAV3)を算出する。パラメータP4~PNについても同様である。このようにして、平均値算出部27は、複数の制御パラメータCTL(N個のパラメータP1~PN)にそれぞれ対応する複数の平均値CAV(N個の平均値CAV1~CAVN)を算出する。 In step S108, if the process is repeated a predetermined number of times ("Y" in step S108), the average value calculation unit 27 calculates an average value CAV of the corresponding points CNT for each control parameter CTL based on the corresponding points CNT associated with the control parameters CTL stored in the corresponding point storage unit 26 (step S109). Specifically, in the example of Fig. 8, the average value calculation unit 27 calculates an average value CAV (average value CAV 1 ) of the M corresponding points CNT associated with the parameter P1 , calculates an average value CAV (average value CAV 2 ) of the M corresponding points CNT associated with the parameter P2 , and calculates an average value CAV (average value CAV 3 ) of the M corresponding points CNT associated with the parameter P3 . The same applies to the parameters P4 to PN . In this manner, the average value calculation section 27 calculates a plurality of average values CAV (N average values CAV 1 to CAV N ) corresponding respectively to the plurality of control parameters CTL (N parameters P 1 to P N ).

次に、パラメータ決定部28は、複数の制御パラメータCTLにそれぞれ対応する複数の平均値CAVに基づいて、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLを制御パラメータCTLAとして決定する(ステップS110)。この例では、パラメータ決定部28は、複数の制御パラメータCTLのうち、平均値CAVが最も大きくなるような制御パラメータCTLを、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLとして決定する。 Next, the parameter determination unit 28 determines the control parameter CTL to be used after the calibration process is completed as the control parameter CTLA based on the multiple average values CAV corresponding to the multiple control parameters CTL (step S110). In this example, the parameter determination unit 28 determines the control parameter CTL that has the largest average value CAV among the multiple control parameters CTL as the control parameter CTL to be used after the calibration process is completed.

図9は、平均値CAVの分布の一例を、等高線図を用いて表すものである。この例では、画像処理部21は、左画像PLに対してのみ、移動処理A1および回転処理A2を行う。制御パラメータCTLは、左画像PLに対する、移動処理A1における上下方向の画像の移動量についての情報、および回転処理A2における画像の回転角度についての情報を含む。図9の横軸は移動量を示し、縦軸は回転角度を示す。移動量の単位は、例えばピクセルであり、回転角度の単位は、例えば度である。この例では、移動量が“-100ピクセル”であり、回転角度が“7度”である場合に、平均値CAVが最も大きくなる。よって、パラメータ決定部28は、移動量“-100ピクセル”、および回転角度“7度”を、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLとして決定する。このように、パラメータ決定部28は、この例では、移動量および回転角度により定義される2次元空間において、平均値CAVが最も大きくなるような制御パラメータCTLを決定する。 Figure 9 shows an example of the distribution of the average value CAV using a contour map. In this example, the image processing unit 21 performs the movement process A1 and the rotation process A2 only on the left image PL. The control parameter CTL includes information on the amount of movement of the image in the vertical direction in the movement process A1 with respect to the left image PL, and information on the rotation angle of the image in the rotation process A2. The horizontal axis of Figure 9 indicates the amount of movement, and the vertical axis indicates the rotation angle. The unit of the amount of movement is, for example, pixels, and the unit of the rotation angle is, for example, degrees. In this example, the average value CAV is maximized when the amount of movement is "-100 pixels" and the rotation angle is "7 degrees". Therefore, the parameter determination unit 28 determines the amount of movement "-100 pixels" and the rotation angle "7 degrees" as the control parameter CTL to be used after the calibration process is completed. In this example, the parameter determination unit 28 determines the control parameter CTL that maximizes the average value CAV in the two-dimensional space defined by the amount of movement and the rotation angle.

以上で、このキャリブレーション処理は終了する。 This completes the calibration process.

ここで、キャリブレーション期間TCは、本開示における「第1の期間」の一具体例に対応する。期間Tは、本開示における「サブ期間」の一具体例に対応する。パラメータPは、本開示における「パラメータ」の一具体例に対応する。 Here, the calibration period TC corresponds to a specific example of a "first period" in this disclosure. The period T corresponds to a specific example of a "sub-period" in this disclosure. The parameter P corresponds to a specific example of a "parameter" in this disclosure.

このように、画像処理装置1では、キャリブレーション処理を行うキャリブレーション期間TCにおいて、画像処理部21における画像処理を制御するための制御パラメータCTLを順次変化させ、ステレオマッチング処理を行う視差画像生成部22により算出された対応点数CNTに基づいて、キャリブレーション期間TCの後に使用すべき制御パラメータCTLを決定するようにした。これにより、画像処理制御部24は、例えば、複数の制御パラメータCTLのうち、対応点数CNTの平均値CAVが最も大きい制御パラメータCTLを、キャリブレーション期間TCの後に使用すべき制御パラメータCTLとすることができる。これにより、画像処理装置1では、視差画像PDの精度を高めることができる。 In this way, in the image processing device 1, during the calibration period TC in which the calibration process is performed, the control parameters CTL for controlling the image processing in the image processing unit 21 are sequentially changed, and the control parameters CTL to be used after the calibration period TC are determined based on the number of corresponding points CNT calculated by the parallax image generation unit 22 that performs the stereo matching process. This allows the image processing control unit 24 to determine, for example, the control parameter CTL with the largest average value CAV of the number of corresponding points CNT among the multiple control parameters CTL as the control parameter CTL to be used after the calibration period TC. This allows the image processing device 1 to improve the accuracy of the parallax image PD.

すなわち、対応点算出部23は、ステレオマッチング処理において、左画像PL1における複数のサブ領域SL、および右画像PR1における複数のサブ領域SRのうち、同様の画像パターンを有するサブ領域SL,SRを探索することにより、互いに対応する左画像点CPLおよび右画像点CPRを対応点CPとして特定する。例えば、左画像PL1および右画像PR1における上下方向の画像位置のずれが小さいほど、また、左画像PL1および右画像PR1における回転方向の画像角度のずれが小さいほど、ステレオマッチング処理におけるマッチング度合いが高くなる。その結果、対応点算出部23は、対応点CPを特定しやすくなり、対応点数CNTが多くなる。すなわち、対応点数CNTが多いことは、ステレオマッチング処理におけるマッチング度合いが高いことを意味し、視差画像PDの精度が高いことを意味する。画像処理装置1では、複数の制御パラメータCTLのうちの、対応点数CNTの平均値CAVが最も大きい制御パラメータCTLを、使用すべき制御パラメータCTLとすることができるので、視差画像PDの精度を高めることができる。 That is, in the stereo matching process, the correspondence point calculation unit 23 searches for sub-regions SL, SR having similar image patterns among the multiple sub-regions SL in the left image PL1 and the multiple sub-regions SR in the right image PR1, and identifies the corresponding left image point CPL and right image point CPR as the correspondence points CP. For example, the smaller the deviation in the image position in the up-down direction in the left image PL1 and the right image PR1, and the smaller the deviation in the image angle in the rotation direction in the left image PL1 and the right image PR1, the higher the degree of matching in the stereo matching process. As a result, the correspondence point calculation unit 23 can easily identify the correspondence points CP, and the number of correspondence points CNT increases. In other words, a large number of correspondence points CNT means a high degree of matching in the stereo matching process and a high accuracy of the parallax image PD. In the image processing device 1, the control parameter CTL that has the largest average value CAV of the number of corresponding points CNT among the multiple control parameters CTL can be determined as the control parameter CTL to be used, thereby improving the accuracy of the parallax image PD.

また、画像処理装置1では、視差画像生成部22により算出された対応点数CNTに基づいて、キャリブレーション期間TCの後に使用すべき制御パラメータCTLを決定するようにした。この視差画像生成部22は、通常動作において使用される回路であり、処理部20は、キャリブレーション処理において、この回路を流用することにより、使用すべき制御パラメータCTLを決定することができるので、シンプルな構成を実現することができる。 In addition, the image processing device 1 is configured to determine the control parameters CTL to be used after the calibration period TC based on the number of corresponding points CNT calculated by the parallax image generating unit 22. This parallax image generating unit 22 is a circuit used in normal operation, and the processing unit 20 can determine the control parameters CTL to be used by utilizing this circuit in the calibration process, thereby realizing a simple configuration.

また、画像処理装置1では、制御パラメータCTLを順次設定し、複数の制御パラメータCTLのうち、対応点数CNTの平均値CAVが最も大きい制御パラメータCTLを、キャリブレーション期間TCの後に使用すべき制御パラメータCTLとするようにした。よって、例えば、順次設定した制御パラメータCTLのうちの1つをそのまま、使用すべき制御パラメータCTLとすることができるので、ロバスト性を高めることができる。 In addition, in the image processing device 1, the control parameters CTL are set sequentially, and among the multiple control parameters CTL, the control parameter CTL with the largest average value CAV of the number of corresponding points CNT is set as the control parameter CTL to be used after the calibration period TC. Therefore, for example, one of the sequentially set control parameters CTL can be directly set as the control parameter CTL to be used, thereby improving robustness.

また、画像処理装置1では、画像処理制御部24が、キャリブレーション期間TCにおいて、複数のパラメータPのうちの1つを制御パラメータCTLとして順次設定し、画像処理部21が、複数のステレオ画像PICに対して、複数のパラメータPのうちの設定されたパラメータPに応じた画像処理を行うようにした。視差画像生成部22は、この画像処理が行われた複数のステレオ画像PICのそれぞれに基づいて対応点数CNTを算出することにより、設定されたパラメータPに対応する複数の対応点数CNTを算出するようにした。そして、画像処理制御部24は、設定されたパラメータPに対応する複数の対応点数CNTの平均値CAVを算出し、この平均値CAVに基づいて、キャリブレーション期間TCの後に使用すべき制御パラメータCTLを決定するようにした。このように、画像処理装置1では、複数の対応点数CNTの平均値CAVに基づいて、使用すべき制御パラメータCTLを決定するので、例えば1つの対応点数CNTに基づいて使用すべき制御パラメータCTLを決定する場合に比べて、使用すべき制御パラメータCTLの決定精度を高めることができる。 In the image processing device 1, the image processing control unit 24 sequentially sets one of the multiple parameters P as the control parameter CTL during the calibration period TC, and the image processing unit 21 performs image processing on the multiple stereo images PIC according to the set parameter P of the multiple parameters P. The parallax image generating unit 22 calculates the number of corresponding points CNT based on each of the multiple stereo images PIC on which the image processing has been performed, thereby calculating the number of corresponding points CNT corresponding to the set parameter P. Then, the image processing control unit 24 calculates the average value CAV of the number of corresponding points CNT corresponding to the set parameter P, and determines the control parameter CTL to be used after the calibration period TC based on this average value CAV. In this way, in the image processing device 1, the control parameter CTL to be used is determined based on the average value CAV of the number of corresponding points CNT, so that the accuracy of determining the control parameter CTL to be used can be improved compared to the case where the control parameter CTL to be used is determined based on, for example, one number of corresponding points CNT.

また、画像処理装置1では、図8に示したように、キャリブレーション期間TCに含まれる複数の期間Tのそれぞれにおいて、制御パラメータCTLを順次設定し、複数の期間Tにおける、あるパラメータPに対応する複数の対応点数CNTの平均値CAVを算出するようにした。これにより、例えば、キャリブレーション処理を行っている最中に車両10が走行した場合でも、使用すべき制御パラメータCTLの精度を高めることができる。すなわち、車両10が走行した場合には、ステレオカメラ11における撮像対象が変化するので、対応点数CNTが変化するおそれがある。画像処理装置1では複数の期間T(図8の例ではM個の期間T1~TM)のそれぞれにおいて、制御パラメータCTLを順次設定する。これにより、複数の制御パラメータCTLにそれぞれ対応する複数の平均値CAVにおいて、撮像対象が変化したことの影響をほぼ同じにすることができる。これにより、使用すべき制御パラメータCTLの決定精度を高めることができる。 In addition, as shown in FIG. 8, in the image processing device 1, the control parameters CTL are set sequentially in each of the multiple periods T included in the calibration period TC, and the average value CAV of the multiple corresponding points CNT corresponding to a certain parameter P in the multiple periods T is calculated. This makes it possible to improve the accuracy of the control parameters CTL to be used, for example, even if the vehicle 10 runs during the calibration process. That is, when the vehicle 10 runs, the imaging target of the stereo camera 11 changes, so there is a risk that the corresponding points CNT will change. In the image processing device 1, the control parameters CTL are set sequentially in each of the multiple periods T (M periods T 1 to T M in the example of FIG. 8). This makes it possible to make the influence of the change in the imaging target almost the same in the multiple average values CAV corresponding to the multiple control parameters CTL, respectively. This makes it possible to improve the accuracy of determining the control parameters CTL to be used.

[効果]
以上のように本実施の形態では、キャリブレーション処理を行うキャリブレーション期間において、画像処理部における画像処理を制御するための制御パラメータを順次変化させ、ステレオマッチング処理を行う視差画像生成部により算出された対応点数に基づいて、キャリブレーション期間の後に使用すべき制御パラメータを決定するようにしたので、視差画像の精度を高めることができる。
[effect]
As described above, in the present embodiment, during the calibration period in which the calibration process is performed, the control parameters for controlling the image processing in the image processing unit are sequentially changed, and the control parameters to be used after the calibration period are determined based on the number of corresponding points calculated by the disparity image generation unit that performs the stereo matching process, thereby making it possible to improve the accuracy of the disparity image.

[変形例1]
上記実施の形態では、画像処理部21は、左画像PLに対してのみ、移動処理A1および回転処理A2を行うようにしたが、これに限定されるものではない。画像処理部21は、例えば、右画像PRに対して移動処理A1を行うようにしてもよいし、右画像PRに対して回転処理A2を行うようにしてもよい。また、画像処理部21は、左画像PLおよび右画像PRの両方に対して、別々に回転処理A2を行うようにしてもよい。この場合、パラメータ決定部28は、移動量、左画像PLの回転角度、および右画像PRの回転角度により定義される3次元空間において、平均値CAVが最も大きくなるような制御パラメータCTLを決定することができる。
[Modification 1]
In the above embodiment, the image processing unit 21 performs the movement process A1 and the rotation process A2 only on the left image PL, but this is not limited to the above. For example, the image processing unit 21 may perform the movement process A1 on the right image PR, or the rotation process A2 on the right image PR. The image processing unit 21 may also perform the rotation process A2 separately on both the left image PL and the right image PR. In this case, the parameter determination unit 28 can determine the control parameter CTL that maximizes the average value CAV in a three-dimensional space defined by the movement amount, the rotation angle of the left image PL, and the rotation angle of the right image PR.

[変形例2]
上記実施の形態では、図7,8に示したように、キャリブレーション期間TCに含まれる複数の期間Tのそれぞれにおいて、制御パラメータCTLを順次設定するようにしたが、これに限定されるものではない。以下に、本変形例に係る画像処理装置1Aについて、以下に詳細に説明する。
[Modification 2]
In the above embodiment, the control parameters CTL are set sequentially in each of the multiple periods T included in the calibration period TC as shown in Figures 7 and 8, but the present invention is not limited to this. The image processing device 1A according to this modified example will be described in detail below.

画像処理装置1Aは、上記実施の形態に係る画像処理装置1(図1)と同様に、処理部20Aを備えている。処理部20Aは、画像処理制御部24Aを有している。画像処理制御部24Aは、設定制御部25Aを有している。 The image processing device 1A includes a processing unit 20A, similar to the image processing device 1 (FIG. 1) according to the above embodiment. The processing unit 20A includes an image processing control unit 24A. The image processing control unit 24A includes a setting control unit 25A.

図10は、キャリブレーション処理における処理部20Aの一動作例を表すものである。図11は、キャリブレーション処理における、制御パラメータCTLの一設定例を表すものである。この例では、処理部20Aは、キャリブレーション期間TCにおける複数の期間T(この例ではN個の期間T1~TN)のそれぞれにおいて制御パラメータCTLが互い異なるように、制御パラメータCTLを設定することにより、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLを決定する。以下に、この処理について詳細に説明する。 Fig. 10 shows an example of an operation of the processing unit 20A in the calibration process. Fig. 11 shows an example of setting the control parameter CTL in the calibration process. In this example, the processing unit 20A sets the control parameter CTL so that the control parameter CTL is different from one another in each of a plurality of periods T (in this example, N periods T 1 to T N ) in the calibration period TC, thereby determining the control parameter CTL to be used after the calibration process is completed. This process will be described in detail below.

まず、画像処理制御部24Aの設定制御部25Aは、制御パラメータCTLを初期値に設定する(ステップS121)。図11の例では、設定制御部25Aは、制御パラメータCTLをパラメータP1に設定する。 First, the setting control unit 25A of the image processing control unit 24A sets the control parameter CTL to an initial value (step S121). In the example of Fig. 11, the setting control unit 25A sets the control parameter CTL to the parameter P1 .

次に、画像処理部21は、ステレオカメラ11により生成されたステレオ画像PICを取得する(ステップS122)。次に、画像処理部21は、ステレオ画像PICに対して、制御パラメータCTLに応じた画像処理を行うことにより、左画像PL1および右画像PR1を生成する(ステップS123)。次に、視差画像生成部22は、左画像PL1および右画像PR1に基づいて、ステレオマッチング処理を含む所定の画像処理を行うことにより視差画像PDを生成するとともに、対応点数CNTを算出する(ステップS124)。次に、画像処理制御部24Aの対応点数格納部26は、視差画像生成部22により算出された対応点数CNTを、設定制御部25が設定した制御パラメータCTLと対応づけて記憶する(ステップS125)。 Next, the image processing unit 21 acquires the stereo image PIC generated by the stereo camera 11 (step S122). Next, the image processing unit 21 performs image processing on the stereo image PIC according to the control parameter CTL to generate a left image PL1 and a right image PR1 (step S123). Next, the parallax image generating unit 22 performs predetermined image processing including stereo matching processing based on the left image PL1 and the right image PR1 to generate a parallax image PD and calculates the number of corresponding points CNT (step S124). Next, the number of corresponding points storage unit 26 of the image processing control unit 24A stores the number of corresponding points CNT calculated by the parallax image generating unit 22 in association with the control parameter CTL set by the setting control unit 25 (step S125).

次に、設定制御部25Aは、1つの制御パラメータCTLについて、ステップS122~S125の処理を所定回数(この例ではM回)繰り返したかどうかを確認する(ステップS126)。まだ所定回数繰り返していない場合(ステップS126において“N”)には、ステップS122の処理に戻る。このようにして、処理部20は、1つの制御パラメータCTLについて、ステップS122~S126の処理を所定回数繰り返す。 Then, the setting control unit 25A checks whether the processing of steps S122 to S125 has been repeated a predetermined number of times (M times in this example) for one control parameter CTL (step S126). If the processing has not yet been repeated the predetermined number of times ("N" in step S126), the processing returns to step S122. In this way, the processing unit 20 repeats the processing of steps S122 to S126 a predetermined number of times for one control parameter CTL.

図11の例では、処理部20Aは、制御パラメータCTLをパラメータP1に設定し、M個のフレーム画像PICに対する処理を行う。これにより、1つの制御パラメータCTL(パラメータP1)に対応づけられたM個の対応点数CNTが、対応点数格納部26に記憶される。 11, the processing unit 20A sets the control parameter CTL to the parameter P1 and processes M frame images PIC, whereby M corresponding points CNT associated with one control parameter CTL (parameter P1 ) are stored in the corresponding point storage unit 26.

ステップS126において、所定回数繰り返した場合(ステップS126において“Y”)には、設定制御部25Aは、全ての制御パラメータCTLを設定したかどうかを確認する(ステップS127)。まだ全ての制御パラメータCTLを設定していない場合(ステップS127において“N”)には、設定制御部25Aは、制御パラメータCTLを変更し(ステップS128)、ステップS122の処理に戻る。このようにして、処理部20は、全ての制御パラメータCTLを設定するまで、ステップS122~S128の処理を繰り返す。 If the process has been repeated a predetermined number of times in step S126 ("Y" in step S126), the setting control unit 25A checks whether all the control parameters CTL have been set (step S127). If all the control parameters CTL have not yet been set ("N" in step S127), the setting control unit 25A changes the control parameters CTL (step S128) and returns to the process of step S122. In this way, the processing unit 20 repeats the processes of steps S122 to S128 until all the control parameters CTL have been set.

図11の例では、処理部20Aは、期間T1において、制御パラメータCTLをパラメータP1に設定し、M個のフレーム画像PICに対する処理を行い、期間T2において、制御パラメータCTLをパラメータP2に設定し、M個のフレーム画像PICに対する処理を行う。期間T3~TNについても同様である。これにより、N個の制御パラメータCTL(パラメータP1~PN)のそれぞれに対応づけられたM個の対応点数CNTが、対応点数格納部26に記憶される。 11, the processing unit 20A sets the control parameter CTL to parameter P1 in period T1 and processes M frame images PIC, and sets the control parameter CTL to parameter P2 in period T2 and processes M frame images PIC. The same is true for periods T3 to TN . As a result, M corresponding points CNT associated with the N control parameters CTL (parameters P1 to PN ) are stored in the corresponding point storage unit 26.

ステップS127において、全ての制御パラメータCTLを設定した場合(ステップS127において“Y”)には、平均値算出部27は、対応点数格納部26に格納された、複数の制御パラメータCTLに対応づけられた複数の対応点数CNTに基づいて、各制御パラメータCTLについて、対応点数CNTの平均値CAVを算出する(ステップS129)。具体的には、図11の例では、平均値算出部27は、パラメータP1に対応づけられたM個の対応点数CNTの平均値CAV(平均値CAV1)を算出し、パラメータP2に対応づけられたM個の対応点数CNTの平均値CAV(平均値CAV2)を算出し、パラメータP3に対応づけられたM個の対応点数CNTの平均値CAV(平均値CAV3)を算出する。パラメータP4~PNについても同様である。このようにして、平均値算出部27は、複数の制御パラメータCTL(N個のパラメータP1~PN)にそれぞれ対応する複数の平均値CAV(N個の平均値CAV1~CAVN)を算出する。 In step S127, when all the control parameters CTL are set (step S127: "Y"), the average value calculation unit 27 calculates the average value CAV of the corresponding points CNT for each control parameter CTL based on the corresponding points CNT associated with the control parameters CTL stored in the corresponding point storage unit 26 (step S129). Specifically, in the example of Fig. 11, the average value calculation unit 27 calculates the average value CAV (average value CAV 1 ) of the M corresponding points CNT associated with the parameter P1 , calculates the average value CAV (average value CAV 2 ) of the M corresponding points CNT associated with the parameter P2 , and calculates the average value CAV (average value CAV 3 ) of the M corresponding points CNT associated with the parameter P3 . The same applies to the parameters P4 to PN . In this manner, the average value calculation section 27 calculates a plurality of average values CAV (N average values CAV 1 to CAV N ) corresponding respectively to the plurality of control parameters CTL (N parameters P 1 to P N ).

次に、パラメータ決定部28は、複数の制御パラメータCTLにそれぞれ対応する複数の平均値CAVに基づいて、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLを制御パラメータCTLAとして決定する(ステップS130)。以上で、このキャリブレーション処理は終了する。 Next, the parameter determination unit 28 determines the control parameter CTL to be used after the calibration process is completed as the control parameter CTLA based on the multiple average values CAV corresponding to the multiple control parameters CTL (step S130). This completes the calibration process.

[変形例3]
上記実施の形態では、平均値算出部27を設け、パラメータ決定部28は、平均値算出部27により算出された複数の平均値CAVに基づいて、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLを決定するようにしたが、これに限定されるものではない。これに代えて、例えば、図12に示す画像処理装置1Bのように、最頻値に基づいて、使用すべき制御パラメータCTLを決定してもよい。画像処理装置1Bは、処理部20Bを備えている。処理部20Bは、画像処理制御部24Bを有している。画像処理制御部24Bは、最頻値算出部27Bと、パラメータ決定部28Bとを有している。
[Modification 3]
In the above embodiment, the average value calculation unit 27 is provided, and the parameter determination unit 28 determines the control parameter CTL to be used after the calibration process is completed based on the multiple average values CAV calculated by the average value calculation unit 27, but this is not limited to the above. Instead, the control parameter CTL to be used may be determined based on the most frequent value, as in the image processing device 1B shown in FIG. 12. The image processing device 1B includes a processing unit 20B. The processing unit 20B includes an image processing control unit 24B. The image processing control unit 24B includes a most frequent value calculation unit 27B and a parameter determination unit 28B.

最頻値算出部27Bは、対応点数格納部26に格納された、様々な制御パラメータCTLに対応づけられた複数の対応点数CNTのうち、同じ制御パラメータCTLに対応づけられた複数の対応点数CNTの最頻値VALを算出するように構成される。具体的には、最頻値算出部27Bは、複数の対応点数CNTに基づいてヒストグラムを生成し、そのヒストグラムに基づいて、複数の対応点数CNTの最頻値VALを算出することができる。これにより、最頻値算出部27Bは、複数の制御パラメータCTLにそれぞれ対応づけられた複数の最頻値VALを算出するようになっている。ここで、最頻値VALは、本開示における「代表値」の一具体例に対応する。 The mode calculation unit 27B is configured to calculate a mode VAL of multiple corresponding points CNT associated with the same control parameter CTL among the multiple corresponding points CNT associated with various control parameters CTL stored in the corresponding point storage unit 26. Specifically, the mode calculation unit 27B generates a histogram based on the multiple corresponding points CNT, and can calculate the mode VAL of the multiple corresponding points CNT based on the histogram. In this way, the mode calculation unit 27B calculates multiple mode values VAL associated with the multiple control parameters CTL, respectively. Here, the mode VAL corresponds to one specific example of a "representative value" in this disclosure.

パラメータ決定部28Bは、複数の制御パラメータCTLにそれぞれ対応づけられた複数の最頻値VALに基づいて、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLを制御パラメータCTLAとして決定するように構成される。 The parameter determination unit 28B is configured to determine the control parameter CTL to be used after the calibration process is completed as the control parameter CTLA based on a plurality of most frequent values VAL respectively associated with the plurality of control parameters CTL.

[変形例4]
上記実施の形態では、画像処理制御部24は、対応点算出部23が算出した対応点数CNTに基づいて、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLを決定するようにしたが、これに限定されるものではない。これに代えて、例えば、図13に示す画像処理装置1Cのように、マッチングスコアSCRに基づいて、使用すべき制御パラメータCTLを決定してもよい。画像処理装置1Cは、処理部20Cを備えている。処理部20Cは、視差画像生成部22Cと、画像処理制御部24Cを有している。
[Modification 4]
In the above embodiment, the image processing control unit 24 determines the control parameters CTL to be used after the calibration process is completed based on the number of corresponding points CNT calculated by the corresponding point calculation unit 23, but this is not limited to the above. Instead, for example, as in an image processing device 1C shown in Fig. 13, the control parameters CTL to be used may be determined based on the matching score SCR. The image processing device 1C includes a processing unit 20C. The processing unit 20C includes a parallax image generation unit 22C and an image processing control unit 24C.

視差画像生成部22Cは、対応点算出部23Cを有している。対応点算出部23Cは、上記実施の形態に係る対応点算出部23と同様に、左画像PL1および右画像PR1に基づいて、区分された複数のサブ領域Sのそれぞれを単位としてステレオマッチング処理を行うことにより、互いに対応する2つの画像点を含む対応点CPを特定するように構成される。また、対応点算出部23Cは、ステレオマッチング処理におけるマッチング度合いに応じたマッチングスコアSCRを算出する。マッチングスコアSCRは、例えば、マッチング度合いが高いほど高い値になるスコアである。対応点算出部23Cは、このマッチングスコアSCRを画像処理制御部24Cに供給するようになっている。 The parallax image generating unit 22C has a corresponding point calculation unit 23C. Similar to the corresponding point calculation unit 23 according to the above embodiment, the corresponding point calculation unit 23C is configured to identify corresponding points CP including two corresponding image points by performing stereo matching processing on each of a plurality of divided sub-regions S based on the left image PL1 and the right image PR1. The corresponding point calculation unit 23C also calculates a matching score SCR according to the degree of matching in the stereo matching processing. The matching score SCR is, for example, a score that has a higher value as the degree of matching increases. The corresponding point calculation unit 23C supplies this matching score SCR to the image processing control unit 24C.

画像処理制御部24Cは、マッチングスコア格納部26Cと、平均値算出部27Cと、パラメータ決定部28Cとを有している。 The image processing control unit 24C has a matching score storage unit 26C, an average value calculation unit 27C, and a parameter determination unit 28C.

マッチングスコア格納部26Cは、対応点算出部23Cにより算出されたマッチングスコアSCRを、設定制御部25が設定した制御パラメータCTLと対応づけて記憶するように構成される。 The matching score storage unit 26C is configured to store the matching score SCR calculated by the corresponding point calculation unit 23C in association with the control parameter CTL set by the setting control unit 25.

平均値算出部27Cは、対応点数格納部26に格納された、様々な制御パラメータCTLに対応づけられた複数のマッチングスコアSCRのうち、同じ制御パラメータCTLに対応づけられた複数のマッチングスコアSCRの平均値SAVを算出するように構成される。これにより、平均値算出部27Cは、複数の制御パラメータCTLにそれぞれ対応づけられた複数の平均値SAVを算出するようになっている。ここで、マッチングスコアSCRは、本開示における「評価値」の一具体例に対応する。平均値SAVは、本開示における「代表値」の一具体例に対応する。 The average value calculation unit 27C is configured to calculate an average value SAV of multiple matching scores SCR associated with the same control parameter CTL among multiple matching scores SCR associated with various control parameters CTL stored in the correspondence score storage unit 26. In this way, the average value calculation unit 27C calculates multiple average values SAV associated with the multiple control parameters CTL, respectively. Here, the matching score SCR corresponds to a specific example of an "evaluation value" in this disclosure. The average value SAV corresponds to a specific example of a "representative value" in this disclosure.

パラメータ決定部28Cは、複数の制御パラメータCTLにそれぞれ対応づけられた複数の平均値SAVに基づいて、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLを制御パラメータCTLAとして決定するように構成される。 The parameter determination unit 28C is configured to determine the control parameter CTL to be used after the calibration process is completed as the control parameter CTLA based on a plurality of average values SAV respectively associated with the plurality of control parameters CTL.

[変形例5]
上記実施の形態では、全ての制御パラメータCTLを設定するようにしたが、これに限定されるものではない。以下に、本変形例に係る画像処理装置1Dについて、以下に詳細に説明する。
[Modification 5]
In the above embodiment, all the control parameters CTL are set, but the present invention is not limited to this. An image processing device 1D according to this modified example will be described in detail below.

図14は、画像処理装置1Dの一構成例を表すものである。画像処理装置1Dは、処理部20Dを備えている。処理部20Dは、画像処理制御部24Dを有している。画像処理制御部24Dは、設定制御部25Dを有している。 Figure 14 shows an example of the configuration of an image processing device 1D. The image processing device 1D has a processing unit 20D. The processing unit 20D has an image processing control unit 24D. The image processing control unit 24D has a setting control unit 25D.

設定制御部25Dは、キャリブレーション処理において、制御パラメータCTLを順次変化させ、複数の制御パラメータCTLにそれぞれ対応づけられた複数の平均値CAVに基づいて、平均値CAVが最も大きくなるような制御パラメータCTLを予想することにより、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLを制御パラメータCTLAとして決定するように構成される。設定制御部25Dは、分析部31Dと、パラメータ決定部28Dとを有している。 The setting control unit 25D is configured to sequentially change the control parameter CTL during the calibration process, predict the control parameter CTL that maximizes the average value CAV based on a plurality of average values CAV respectively associated with the plurality of control parameters CTL, and determine the control parameter CTL to be used after the calibration process is completed as the control parameter CTLA. The setting control unit 25D has an analysis unit 31D and a parameter determination unit 28D.

分析部31Dは、複数の制御パラメータCTLにそれぞれ対応づけられた複数の平均値CAVに基づいて、平均値CAVが最も大きくなるような制御パラメータCTLを予想するように構成される。 The analysis unit 31D is configured to predict the control parameter CTL that maximizes the average value CAV based on a plurality of average values CAV that are respectively associated with the plurality of control parameters CTL.

パラメータ決定部28Dは、複数の制御パラメータCTLにそれぞれ対応づけられた複数の平均値CAVに基づいて、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLを制御パラメータCTLAとして決定するように構成される。 The parameter determination unit 28D is configured to determine the control parameter CTL to be used after the calibration process is completed as the control parameter CTLA based on a plurality of average values CAV respectively associated with the plurality of control parameters CTL.

図15は、処理部20Dの一動作例を表すものである。例えば、設定制御部25Dは、図15に示した範囲W1において、制御パラメータCTLを順次設定する。そして、設定制御部25Dの分析部31Dは、これらの複数の制御パラメータCTLのそれぞれに対応づけられた平均値CAVに基づいて、この範囲W1の右下方向に平均値CAVが最も大きくなるような制御パラメータCTLがあることを予想する。 Figure 15 shows an example of the operation of the processing unit 20D. For example, the setting control unit 25D sequentially sets the control parameters CTL in the range W1 shown in Figure 15. Then, based on the average values CAV associated with each of these multiple control parameters CTL, the analysis unit 31D of the setting control unit 25D predicts that there is a control parameter CTL with the largest average value CAV in the lower right direction of this range W1.

そして、設定制御部25Dは、この範囲W1の右下の範囲W2において、制御パラメータCTLを順次設定する。そして、設定制御部25Dの分析部31Dは、これらの複数の制御パラメータCTLのそれぞれに対応づけられた平均値CAVに基づいて、この範囲W2の右下方向に平均値CAVが最も大きくなるような制御パラメータCTLがあることを予想する。 Then, the setting control unit 25D sequentially sets the control parameters CTL in the range W2 to the lower right of this range W1. Then, based on the average values CAV associated with each of these multiple control parameters CTL, the analysis unit 31D of the setting control unit 25D predicts that there is a control parameter CTL with the largest average value CAV in the lower right direction of this range W2.

設定制御部25Dは、このような処理を繰り返す。そして、設定制御部25Dのパラメータ決定部28Dは、複数の制御パラメータCTLにそれぞれ対応づけられた複数の平均値CAVに基づいて、キャリブレーション処理が終了した後で使用すべき制御パラメータCTLを制御パラメータCTLAとして決定する。 The setting control unit 25D repeats this process. Then, the parameter determination unit 28D of the setting control unit 25D determines the control parameter CTL to be used after the calibration process is completed as the control parameter CTLA based on the multiple average values CAV that are respectively associated with the multiple control parameters CTL.

[その他の変形例]
また、これらの変形例のうちの2以上を組み合わせてもよい。
[Other Modifications]
Moreover, two or more of these modifications may be combined.

以上、実施の形態およびいくつかの変形例を挙げて本技術を説明したが、本技術はこれらの実施の形態等には限定されず、種々の変形が可能である。 The present technology has been described above using embodiments and several modified examples, but the present technology is not limited to these embodiments and can be modified in various ways.

例えば、上記実施の形態では、ステレオカメラ11は車両10の前方を撮像するようにしたが、これに限定されるものではなく、例えば、車両10の側方や後方を撮像してもよい。 For example, in the above embodiment, the stereo camera 11 captures an image in front of the vehicle 10, but this is not limited to this, and it may capture an image, for example, of the side or rear of the vehicle 10.

なお、本明細書中に記載された効果はあくまで例示であって限定されるものではなく、また、他の効果があってもよい。 Note that the effects described in this specification are merely examples and are not limiting, and other effects may also be present.

1,1B,1C,1D…画像処理装置、11…ステレオカメラ、11L…左カメラ、11R…右カメラ、20,20B,20C,20D…処理部、21…画像処理部、22…視差画像生成部、23…対応点算出部、24,24B,24C,24D…画像処理制御部、25,25D…設定制御部、26…対応点数格納部、26C…マッチングスコア格納部、27,27C…平均値算出部、27B…最頻値算出部、28,28B,28C,28D…パラメータ決定部、31D…分析部、CAV,SAV…平均値、CNT…対応点数、CTL,CTLA…制御パラメータ、PD…視差画像、P…パラメータ、PIC…ステレオ画像、PL,PL1…左画像、PR,PR1…右画像、SCR…マッチングスコア、T…期間、TC…キャリブレーション期間。 1, 1B, 1C, 1D... image processing device, 11... stereo camera, 11L... left camera, 11R... right camera, 20, 20B, 20C, 20D... processing unit, 21... image processing unit, 22... parallax image generation unit, 23... corresponding point calculation unit, 24, 24B, 24C, 24D... image processing control unit, 25, 25D... setting control unit, 26... corresponding point storage unit, 26C... matching score storage unit, 27, 27C... average Value calculation section, 27B...mode calculation section, 28, 28B, 28C, 28D...parameter determination section, 31D...analysis section, CAV, SAV...average value, CNT...number of corresponding points, CTL, CTLA...control parameters, PD...parallax image, P...parameters, PIC...stereo image, PL, PL1...left image, PR, PR1...right image, SCR...matching score, T...period, TC...calibration period.

Claims (9)

左画像および右画像を有するステレオ画像における、前記左画像および前記右画像の一方または双方に対して、制御パラメータに応じた画像処理を行う画像処理部と、
前記画像処理が行われた前記ステレオ画像に含まれる前記左画像および前記右画像に基づいてステレオマッチング処理を行うことにより視差画像を生成するとともに、前記左画像および前記右画像のマッチング度合いに応じた評価値を算出する視差画像生成部と、
第1の期間において、前記制御パラメータを順次変化させ、前記視差画像生成部により算出された複数の前記評価値に基づいて、前記第1の期間の後の第2の期間に使用すべき前記制御パラメータを決定する制御部と
を備え
前記制御部は、前記第1の期間において、複数のパラメータのうちの1つを前記制御パラメータとして順次設定し、
前記画像処理部は、複数の前記ステレオ画像に対して、前記複数のパラメータのうちの設定されたパラメータに応じた前記画像処理を行い、
前記視差画像生成部は、前記画像処理が行われた前記複数のステレオ画像のそれぞれに基づいて前記評価値を算出することにより、設定された前記パラメータに対応する複数の前記評価値を算出し、
前記制御部は、設定された前記パラメータに対応する前記複数の評価値の代表値を算出し、前記代表値が最も大きくなるようなパラメータを予想することにより、前記第2の期間に使用すべき前記制御パラメータを決定する
画像処理装置。
an image processing unit that performs image processing on one or both of a left image and a right image in a stereo image having the left image and the right image in accordance with a control parameter;
a parallax image generating unit that generates a parallax image by performing a stereo matching process based on the left image and the right image included in the stereo image that has been subjected to the image processing, and calculates an evaluation value according to a matching degree between the left image and the right image;
a control unit that sequentially changes the control parameters during a first period, and determines the control parameters to be used during a second period following the first period, based on the plurality of evaluation values calculated by the parallax image generation unit ;
The control unit sequentially sets one of a plurality of parameters as the control parameter during the first period;
the image processing unit performs the image processing on the plurality of stereo images in accordance with a set parameter among the plurality of parameters,
the parallax image generating unit calculates the evaluation value based on each of the plurality of stereo images that have been subjected to the image processing, thereby calculating a plurality of the evaluation values corresponding to the set parameters;
The control unit calculates a representative value of the plurality of evaluation values corresponding to the set parameter, and predicts a parameter that will maximize the representative value, thereby determining the control parameter to be used in the second period.
Image processing device.
前記視差画像生成部は、互いに対応する、前記左画像における左画像点および前記右画像における右画像点を含む対応点を探索する探索処理を行うことにより前記視差画像を生成し、
前記評価値は、前記ステレオ画像における前記対応点の数である
請求項1に記載の画像処理装置。
the parallax image generating unit generates the parallax image by performing a search process to search for corresponding points including left image points in the left image and right image points in the right image that correspond to each other;
The image processing device according to claim 1 , wherein the evaluation value is the number of the corresponding points in the stereo images.
前記制御部は、前記第1の期間に含まれる複数のサブ期間のそれぞれにおいて、前記複数のパラメータのうちの1つを前記制御パラメータとして順次設定し
記制御部は、前記複数のパラメータのそれぞれについて、前記複数の評価値の前記代表値を算出する
請求項1または請求項2に記載の画像処理装置。
The control unit sequentially sets one of the plurality of parameters as the control parameter in each of a plurality of sub-periods included in the first period ;
The control unit calculates the representative value of the plurality of evaluation values for each of the plurality of parameters.
3. The image processing device according to claim 1 or 2 .
前記制御部は、
前記第1の期間に含まれる複数のサブ期間のそれぞれにおいて、前記複数のサブ期間の間でパラメータが異なるように、前記複数のパラメータのうちの1つを前記制御パラメータとして設定し
記制御部は、前記複数のパラメータのそれぞれについて、前記複数の評価値の前記代表値を算出する
請求項1または請求項2に記載の画像処理装置。
The control unit is
setting one of the plurality of parameters as the control parameter in each of a plurality of sub-periods included in the first period such that the parameter differs between the plurality of sub-periods ;
The control unit calculates the representative value of the plurality of evaluation values for each of the plurality of parameters.
3. The image processing device according to claim 1 or 2 .
前記代表値は、設定された前記パラメータに対応する前記複数の評価値の平均値である
請求項1から請求項4のいずれか一項に記載の画像処理装置。
The representative value is an average value of the plurality of evaluation values corresponding to the set parameter.
The image processing device according to claim 1 .
前記代表値は、設定された前記パラメータに対応する前記複数の評価値の最頻値である
請求項1から請求項4のいずれか一項に記載の画像処理装置。
The representative value is the most frequent value of the plurality of evaluation values corresponding to the set parameter.
The image processing device according to claim 1 .
前記画像処理は、上下方向に画像を移動させる処理を含む
請求項1から請求項6のいずれか一項に記載の画像処理装置。
The image processing device according to claim 1 , wherein the image processing includes a process of moving the image in a vertical direction.
前記画像処理は、画像を回転させる処理を含む
請求項1から請求項6のいずれか一項に記載の画像処理装置。
The image processing device according to claim 1 , wherein the image processing includes a process of rotating an image.
左画像および右画像を有するステレオ画像における、前記左画像および前記右画像の一方または双方に対して、制御パラメータに応じた画像処理を行うことと、
前記画像処理が行われた前記ステレオ画像に含まれる前記左画像および前記右画像に基づいてステレオマッチング処理を行うことにより視差画像を生成することと、
前記ステレオマッチング処理において、前記左画像および前記右画像のマッチング度合いに応じた評価値を算出することと、
第1の期間において、前記制御パラメータを順次変化させることと、
複数の前記評価値に基づいて、前記第1の期間の後の第2の期間に使用すべき前記制御パラメータを決定することと
を含み、
前記制御パラメータを決定する際、前記第1の期間において、複数のパラメータのうちの1つを前記制御パラメータとして順次設定し、複数の前記ステレオ画像に対して、前記複数のパラメータのうちの設定されたパラメータに応じた前記画像処理を行い、前記画像処理が行われた前記複数のステレオ画像のそれぞれに基づいて前記評価値を算出することにより、設定された前記パラメータに対応する複数の前記評価値を算出し、設定された前記パラメータに対応する前記複数の評価値の代表値を算出し、前記代表値が最も大きくなるようなパラメータを予想することにより、前記第2の期間に使用すべき前記制御パラメータを決定する
画像処理方法。
performing image processing on one or both of a left image and a right image in a stereo image having a left image and a right image in accordance with a control parameter;
generating a parallax image by performing stereo matching processing based on the left image and the right image included in the stereo image subjected to the image processing;
calculating an evaluation value according to a degree of matching between the left image and the right image in the stereo matching process;
sequentially varying the control parameters during a first period;
determining the control parameters to be used in a second time period after the first time period based on a plurality of the evaluation values ;
When determining the control parameter, in the first period, one of a plurality of parameters is sequentially set as the control parameter, the image processing is performed on a plurality of the stereo images according to the set parameter among the plurality of parameters, and the evaluation value is calculated based on each of the plurality of the stereo images subjected to the image processing, thereby calculating the plurality of evaluation values corresponding to the set parameter, calculating a representative value of the plurality of evaluation values corresponding to the set parameter, and predicting the parameter that will maximize the representative value, thereby determining the control parameter to be used in the second period.
Image processing methods.
JP2020027050A 2020-02-20 2020-02-20 Image processing device and image processing method Active JP7465671B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020027050A JP7465671B2 (en) 2020-02-20 2020-02-20 Image processing device and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020027050A JP7465671B2 (en) 2020-02-20 2020-02-20 Image processing device and image processing method

Publications (2)

Publication Number Publication Date
JP2021131750A JP2021131750A (en) 2021-09-09
JP7465671B2 true JP7465671B2 (en) 2024-04-11

Family

ID=77551075

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020027050A Active JP7465671B2 (en) 2020-02-20 2020-02-20 Image processing device and image processing method

Country Status (1)

Country Link
JP (1) JP7465671B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7394934B1 (en) 2022-08-16 2023-12-08 株式会社デンソーテン Information processing device, information processing method, and program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004063991A1 (en) 2003-01-14 2004-07-29 The Circle For The Promotion Of Science And Engineering Multi-parameter highly-accurate simultaneous estimation method in image sub-pixel matching and multi-parameter highly-accurate simultaneous estimation program
JP2012177676A (en) 2011-01-31 2012-09-13 Sony Corp Information processor and method, and program
JP2018105682A (en) 2016-12-26 2018-07-05 日立オートモティブシステムズ株式会社 Stereo camera
JP2020012735A (en) 2018-07-18 2020-01-23 日立オートモティブシステムズ株式会社 On-vehicle environment recognition device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004063991A1 (en) 2003-01-14 2004-07-29 The Circle For The Promotion Of Science And Engineering Multi-parameter highly-accurate simultaneous estimation method in image sub-pixel matching and multi-parameter highly-accurate simultaneous estimation program
JP2012177676A (en) 2011-01-31 2012-09-13 Sony Corp Information processor and method, and program
JP2018105682A (en) 2016-12-26 2018-07-05 日立オートモティブシステムズ株式会社 Stereo camera
JP2020012735A (en) 2018-07-18 2020-01-23 日立オートモティブシステムズ株式会社 On-vehicle environment recognition device

Also Published As

Publication number Publication date
JP2021131750A (en) 2021-09-09

Similar Documents

Publication Publication Date Title
JP6910973B2 (en) Vehicle control device, its control method, and vehicle control system
US10839248B2 (en) Information acquisition apparatus and information acquisition method
CN102959600B (en) Device for estimating vehicle travel path
JP6720510B2 (en) Mobile system
EP3113150B1 (en) Local location computation device and local location computation method
US9772627B2 (en) Self-position calculating apparatus and self-position calculating method
JP6176387B2 (en) Self-position calculation device and self-position calculation method
WO2015125297A1 (en) Local location computation device and local location computation method
JP6936098B2 (en) Object estimation device
CN103303198A (en) Vehicle circumference monitor device
KR20190084594A (en) Apparatus and method tracking object based on 3 dimension images
JP7041172B2 (en) 3D visual system for automobiles and how to control 3D visual system
JP2008304248A (en) Method for calibrating on-board stereo camera, on-board distance image generating apparatus, and program
JP7465671B2 (en) Image processing device and image processing method
JP2006011570A (en) Camera calibration method and camera calibration device
JP6635621B2 (en) Automotive vision system and method of controlling the vision system
JP7145770B2 (en) Inter-Vehicle Distance Measuring Device, Error Model Generating Device, Learning Model Generating Device, Methods and Programs Therefor
CN111989541B (en) Stereo camera device
WO2020110435A1 (en) External environment recognition device
JP2017112566A (en) Parameter identification device
US20220318960A1 (en) Image processing apparatus, image processing method, vehicle control apparatus, and storage medium
JP2019059274A (en) Vehicular control device and method for controlling vehicle
WO2020153384A1 (en) Calibration auxiliary device for mobile body-mounted camera, and mobile body-mounted camera calibration system
JP7358593B1 (en) In-vehicle device, operation method of in-vehicle device, and program
JP7291505B2 (en) External environment detection device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230112

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20231127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20231205

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240118

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240401

R150 Certificate of patent or registration of utility model

Ref document number: 7465671

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150