JP2019121032A - Camera deviation detection device, and camera deviation detection method - Google Patents

Camera deviation detection device, and camera deviation detection method Download PDF

Info

Publication number
JP2019121032A
JP2019121032A JP2017253756A JP2017253756A JP2019121032A JP 2019121032 A JP2019121032 A JP 2019121032A JP 2017253756 A JP2017253756 A JP 2017253756A JP 2017253756 A JP2017253756 A JP 2017253756A JP 2019121032 A JP2019121032 A JP 2019121032A
Authority
JP
Japan
Prior art keywords
camera
vehicle
movement
unit
shift
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.)
Granted
Application number
JP2017253756A
Other languages
Japanese (ja)
Other versions
JP6986962B2 (en
Inventor
武生 松本
Takeo Matsumoto
武生 松本
康司 大西
Yasushi Onishi
康司 大西
直士 垣田
Naoshi Kakita
直士 垣田
隆幸 小笹
Takayuki Ozasa
隆幸 小笹
知之 藤本
Tomoyuki Fujimoto
知之 藤本
輝彦 上林
Teruhiko Kamibayashi
輝彦 上林
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 Ten Ltd
Original Assignee
Denso Ten Ltd
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 Ten Ltd filed Critical Denso Ten Ltd
Priority to JP2017253756A priority Critical patent/JP6986962B2/en
Priority to US16/137,011 priority patent/US10657654B2/en
Priority to DE102018216144.5A priority patent/DE102018216144A1/en
Publication of JP2019121032A publication Critical patent/JP2019121032A/en
Application granted granted Critical
Publication of JP6986962B2 publication Critical patent/JP6986962B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To provide a technique that can properly detect irregularity such as a deviation of an attachment position or angle of an on-vehicle camera.SOLUTION: A camera deviation detection device, which detects an attachment deviation of a camera to be boarded in a moving body includes:, a derivation unit that derives an optical flow serving a movement of a characteristic point between two images input by the camera at a prescribed time interval for each characteristic point; an amount-of-movement estimation unit that estimates an amount of movement of the moving body boarding the camera on the basis of a plurality of optical flows; and a determination unit that determines a deviation of the camera on the basis of estimation information obtained by the amount-of-movement estimation unit and actual measurement information relating to a movement of the moving body to be input from an external sensor other than the camera. The determination unit is configured to, when an irregularity state where it is estimated by the estimation information that the moving body stands still although it is recognized based on the external sensor that the moving body is moving occurs, halt determination processing of the deviation of the camera.SELECTED DRAWING: Figure 1

Description

本発明は、カメラずれ検出装置およびカメラずれ検出方法に関する。   The present invention relates to a camera shift detection device and a camera shift detection method.

従来、車両等の移動体に搭載されたカメラ(以下、車載カメラという)を用いて、例えば車両の駐車支援等の運転支援が行われている。車載カメラは、例えば、車両を工場から出荷する前に、車両に固定状態で取り付けられる。しかしながら、車載カメラは、例えば不意の接触や経年変化等によって、工場出荷時の取付け状態からずれを起こすことがある。車載カメラの取付け位置や角度がずれると、カメラ画像を利用して判断されるハンドルの操舵量等に誤差が生じるために、車載カメラの取付けのずれを検出することは重要である。   2. Description of the Related Art Conventionally, driving assistance such as parking assistance for a vehicle has been performed using a camera mounted on a movable body such as a vehicle (hereinafter referred to as an on-vehicle camera). The on-vehicle camera is fixedly attached to the vehicle, for example, before the vehicle is shipped from the factory. However, the on-vehicle camera may deviate from the factory-installed state due to, for example, unexpected contact or aging. If the mounting position or angle of the in-vehicle camera deviates, an error occurs in the steering amount of the steering wheel determined using the camera image, so it is important to detect the mounting deviation of the in-vehicle camera.

特許文献1には、複数の撮像手段同士間の光軸ずれを検出する技術が開示される。詳細には、2つのカメラの光軸の相対的な軸ずれに起因する視差オフセットは、自車両の直進状態で各カメラにより検知した適宜の静止対象物までの距離の所定時間での変化と、この所定時間でのナビゲーション装置等により検出された自車両の移動量との偏差に応じた値とされることが開示される。   Patent Document 1 discloses a technique for detecting an optical axis deviation between a plurality of imaging means. Specifically, the parallax offset caused by the relative axis deviation of the optical axes of the two cameras is a change in the distance to the appropriate stationary object detected by each camera in the straight ahead state of the host vehicle in a predetermined time period; It is disclosed that the value corresponds to the deviation from the movement amount of the host vehicle detected by the navigation device or the like at this predetermined time.

特開2006−153778号公報JP, 2006-153778, A

特許文献1における光軸ずれ検出手段では、互いに光軸が平行に配置される2つのカメラ間の光軸ずれを検出することができる。しかしながら、当該光軸ずれ検出手段では、単独の車載カメラにおける、工場出荷時の取付け状態からのずれを検出することはできない。   The optical axis offset detection means in Patent Document 1 can detect an optical axis offset between two cameras whose optical axes are arranged in parallel to each other. However, the optical axis misalignment detecting means can not detect the deviation from the factory-installed state of a single on-vehicle camera.

本発明は、車載カメラの取付け位置や角度のずれを適切に検出することができる技術を提供することを目的とする。   An object of the present invention is to provide a technology capable of appropriately detecting a mounting position or an angle deviation of a vehicle-mounted camera.

上記目的を達成するために本発明の、移動体に搭載されるカメラの取付けのずれを検出するカメラずれ検出装置は、前記カメラによって所定時間をおいて入力された2つの画像間における特徴点の動きであるオプティカルフローを前記特徴点ごと導出する導出部と、複数の前記オプティカルフローに基づいて前記カメラを搭載する移動体の移動量を推定する移動量推定部と、前記移動量推定部で得られた推定情報と、前記カメラ以外の外部センサから入力される前記移動体の移動に関わる実測情報とに基づいて前記カメラのずれを判定する判定部と、を備え、前記判定部は、前記外部センサに基づいて前記移動体が動いていると認識されるにもかかわらず前記推定情報により前記移動体が停止していると推定される異常状態が生じた場合に、前記カメラのずれ判定処理を停止する構成(第1の構成)になっている。   In order to achieve the above object, according to the present invention, a camera shift detection device for detecting a shift in mounting of a camera mounted on a mobile object is a feature point between two images input with a predetermined time by the camera. Obtained by a derivation unit that derives an optical flow that is a motion for each feature point, a movement amount estimation unit that estimates the movement amount of a moving object equipped with the camera based on a plurality of optical flows, and the movement amount estimation unit A determination unit that determines the displacement of the camera based on the estimated information obtained and the measurement information related to the movement of the moving object input from an external sensor other than the camera, the determination unit including the external In the case where an abnormal state occurs in which it is estimated by the estimated information that the moving body is stopped although it is recognized that the moving body is moving based on a sensor. The shift determination process of the serial cameras have been configured to stop (first configuration).

上記第1の構成のカメラずれ検出装置において、前記異常状態には、前記外部センサに基づいて前記移動体が動いていると認識されるにもかかわらず、前記導出部で導出された複数の前記オプティカルフローの中に動きが無いと判断される前記オプティカルフローが所定の割合以上存在する場合も含まれる構成(第2の構成)であってよい。   In the camera shift detection device of the first configuration, in the abnormal state, although it is recognized that the movable body is moving based on the external sensor, the plurality of the derived units are derived by the deriving unit. The configuration (second configuration) may include the case where there is a predetermined ratio or more of the optical flow determined to have no motion in the optical flow.

上記第1又は第2の構成のカメラずれ検出装置において、前記判定部は、前記異常状態が少なくとも1回検出された場合に、前記移動体の進行方向が変化するまで前記ずれ判定処理の停止を継続する構成(第3の構成)であることが好ましい。   In the camera shift detection device having the first or second configuration, the determination unit may stop the shift determination process until the traveling direction of the movable body changes when the abnormal state is detected at least once. It is preferable that the configuration is a continuous configuration (third configuration).

上記第3の構成のカメラずれ検出装置において、前記移動体の進行方向が変化すると、前記進行方向の変化後に新たに取得された複数の前記オプティカルフローに基づいて、前記移動量推定部による移動量推定と前記判定部による前記ずれ判定処理とが行われる構成(第4の構成)であることが好ましい。   In the camera shift detecting device of the third configuration, when the traveling direction of the movable body changes, the movement amount by the movement amount estimation unit based on the plurality of optical flows newly acquired after the change of the traveling direction. It is preferable that it is the structure (4th structure) in which estimation and the said deviation determination processing by the said determination part are performed.

上記第1から第4のいずれかの構成のカメラずれ検出装置において、前記異常状態が生じた際に前記移動体の影の位置が認識できる場合には、前記ずれ判定処理が停止されず、前記影からずれた範囲に位置する前記特徴点を用いて導出される複数の前記オプティカルフローに基づいて、前記移動量推定部による移動量推定と前記判定部による前記ずれ判定処理とが行われる構成(第5の構成)であってよい。   In the camera shift detection device having any one of the first to fourth configurations, when the position of the shadow of the moving body can be recognized when the abnormal state occurs, the shift determination process is not stopped, and A configuration in which movement amount estimation by the movement amount estimation unit and the deviation determination processing by the determination unit are performed based on a plurality of optical flows derived using the feature points positioned in a range deviated from the shadow ( Fifth configuration).

上記第1から第5のいずれかの構成のカメラずれ検出装置において、前記カメラが複数あり、複数の前記カメラのうち一部の前記カメラについて前記異常状態が生じている場合には、前記異常状態が生じていない残りの前記カメラについて、前記ずれ判定処理が行われる構成(第6の構成)であることが好ましい。   In the camera shift detecting device according to any one of the first to fifth configurations, when there is a plurality of cameras and the abnormal state occurs in some of the plurality of cameras, the abnormal state is generated. It is preferable that it is the structure (6th structure) by which the said shift | offset | difference determination process is performed about the said remaining camera which has not produced.

上記第1から第6のいずれかの構成のカメラずれ検出装置は、前記移動体の影位置を推定する影位置推定部を更に備え、前記導出部は、推定された前記影位置に基づいて前記特徴点の抽出範囲を設定する構成(第7の構成)であることが好ましい。   The camera shift detecting device according to any one of the first to sixth configurations further includes a shadow position estimating unit configured to estimate a shadow position of the moving body, and the deriving unit is configured to determine the shadow position based on the estimated shadow position. It is preferable that the configuration (the seventh configuration) is to set the extraction range of the feature point.

上記目的を達成するために本発明の、移動体に搭載されるカメラの取付けずれを検出するカメラずれ検出方法は、前記カメラによって所定時間をおいて入力された2つの画像間における特徴点の動きであるオプティカルフローを前記特徴点ごとに導出する導出工程と、複数の前記オプティカルフローに基づいて前記カメラを搭載する移動体の移動量を推定する推定工程と、前記推定工程で得られた推定情報と、前記カメラ以外のセンサから入力される前記移動体の移動に関わる実測情報とに基づいて前記カメラのずれを判定する判定工程と、を備え、前記センサに基づいて前記移動体が動いていると認識されるにもかかわらず前記推定工程で前記移動体が停止していると推定される異常状態が生じた場合に、前記判定工程における前記カメラのずれ判定処理が停止される構成(第8の構成)になっている。   In order to achieve the above object, according to a camera shift detection method for detecting a mount shift of a camera mounted on a moving body of the present invention, movement of a feature point between two images inputted by a predetermined time by the camera Optical flow for each feature point, an estimation step of estimating the amount of movement of a moving object equipped with the camera based on a plurality of optical flows, and estimation information obtained in the estimation step And a determination step of determining the shift of the camera based on the measurement information related to the movement of the mobile input from a sensor other than the camera, and the mobile is moving based on the sensor The camera in the determination step if an abnormal state occurs in which it is estimated that the moving object is stopped in the estimation step despite the fact that Deviation determination process has a configuration which is stopped (eighth configuration).

本発明によると、車載カメラの取付け位置や角度のずれを適切に検出することができる。   According to the present invention, it is possible to properly detect the mounting position and the angle deviation of the on-vehicle camera.

カメラずれ検出システムの構成を示すブロック図Block diagram showing the configuration of the camera shift detection system 車載カメラが車両に配置される位置を例示する図A diagram exemplifying a position where an on-vehicle camera is disposed on a vehicle カメラずれ検出装置によるカメラずれの検出フローの一例を示すフローチャートFlow chart showing an example of camera shift detection flow by the camera shift detection device 特徴点を抽出する手法を説明するための図Diagram for explaining the method of extracting feature points オプティカルフローを導出する手法を説明するための図Diagram for explaining the method of deriving optical flow 座標変換処理を説明するための図Diagram for explaining the coordinate conversion process 移動量推定部によって生成される第1ヒストグラムの一例を示す図A diagram showing an example of a first histogram generated by the movement amount estimation unit 移動量推定部によって生成される第2ヒストグラムの一例を示す図A diagram showing an example of a second histogram generated by the movement amount estimation unit カメラずれが発生した場合のヒストグラムの変化を例示する図Diagram showing histogram change when camera shift occurs 判定部によって行われるカメラずれ判定処理の一例を示すフローチャートFlow chart showing an example of camera shift determination processing performed by the determination unit 車載カメラで撮影される撮影画像の模式図Schematic diagram of the image taken by the on-board camera 図3に示すカメラずれの検出フローとは異なる第1実施例を示すフローチャートA flowchart showing a first embodiment different from the camera displacement detection flow shown in FIG. 3 図3に示すカメラずれの検出フローとは異なる第2実施例を示すフローチャートA flowchart showing a second embodiment different from the camera shift detection flow shown in FIG. 3 特徴点抽出範囲の変更処理について説明するための模式図A schematic diagram for explaining the process of changing the feature point extraction range カメラずれの再判定処理の一例について説明するための図Figure for explaining an example of re-determination processing of camera shift カメラずれ検出装置によるカメラずれの検出フローの変形例を示すフローチャートA flowchart showing a modified example of the camera misalignment detection flow by the camera misalignment detection device 変形例のカメラずれ検出装置の構成を示すブロック図Block diagram showing the configuration of a camera shift detection device according to a modification 変形例のカメラずれ検出装置によるカメラずれの検出フローの一例を示すフローチャートFlow chart showing an example of camera shift detection flow by the camera shift detection device of the modified example

以下、本発明の例示的な実施形態について、図面を参照しながら詳細に説明する。以下の説明では、移動体として車両を例にとり説明するが移動体であれば車両に限定されない。また以下の説明では、車両の直進進行方向であって、運転席からハンドルに向かう方向を「前方向」とする。また、車両の直進進行方向であって、ハンドルから運転席に向かう方向を「後方向」とする。また、車両の直進進行方向及び鉛直線に垂直な方向であって、前方向を向いている運転者の右側から左側に向かう方向を「左方向」とする。また、車両の直進進行方向及び鉛直線に垂直な方向であって、前方向を向いている運転者の左側から右側に向かう方向を「右方向」とする。   Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. In the following description, a vehicle will be described as an example of a moving body, but it is not limited to a vehicle as long as it is a moving body. Further, in the following description, the direction in which the vehicle travels in a straight line, and the direction from the driver's seat to the steering wheel is referred to as "forward direction". In addition, a direction in which the vehicle travels straight ahead and which is directed from the steering wheel to the driver's seat is referred to as “rearward direction”. In addition, a direction perpendicular to the straight traveling direction of the vehicle and the vertical line, that is, a direction from the right side to the left side of the driver facing the front direction is referred to as “left direction”. Further, a direction perpendicular to the straight traveling direction of the vehicle and the vertical line, and a direction from the left side to the right side of the driver facing the front direction is referred to as “right direction”.

<1.カメラずれ検出システム>
図1は、本発明の実施形態に係るカメラずれ検出システムSYSの構成を示すブロック図である。カメラずれ検出システムSYSは、例えば車両の工場出荷時における取付け状態等、基準となる取付け状態からの車載カメラのずれを検出するシステムである。図1に示すように、カメラずれ検出システムSYSは、カメラずれ検出装置1と、撮影部2と、入力部3と、センサ部4とを備える。
<1. Camera offset detection system>
FIG. 1 is a block diagram showing the configuration of a camera shift detection system SYS according to an embodiment of the present invention. The camera shift detection system SYS is a system that detects a shift of the on-vehicle camera from a reference installation state, such as the installation state of the vehicle at the time of factory shipment. As shown in FIG. 1, the camera shift detection system SYS includes a camera shift detection device 1, a photographing unit 2, an input unit 3, and a sensor unit 4.

カメラずれ検出装置1は、車載カメラの取付けのずれを検出する装置である。取付けのずれには、取付け位置のずれや取付け角度のずれが含まれる。カメラずれ検出装置1は、車載カメラを搭載する各車両に備えられる。カメラずれ検出装置1は、撮影部2に含まれる車載カメラ21〜24で撮影された撮影画像、および、当該装置1の外部に設けられるセンサ部4からの情報を処理して、車載カメラ21〜24の取付け位置や取付け角度のずれを検出する。カメラずれ検出装置1の詳細については後述する。   The camera shift detection device 1 is a device that detects a shift in mounting of an on-vehicle camera. Mounting deviations include mounting position deviations and mounting angle deviations. The camera shift detection device 1 is provided in each vehicle equipped with an on-vehicle camera. The camera shift detection device 1 processes the captured images captured by the on-vehicle cameras 21 to 24 included in the imaging unit 2 and information from the sensor unit 4 provided outside the device 1 to obtain the on-vehicle cameras 21 to 21. Detects the mounting position and mounting angle of 24. Details of the camera shift detection device 1 will be described later.

なお、カメラずれ検出装置1は、不図示の表示装置や運転支援装置に処理情報を出力してよい。表示装置は、カメラずれ検出装置1から出力される情報に基づいて、適宜、警告等を画面に表示する。運転支援装置は、カメラずれ検出装置1から出力される情報に基づいて、適宜、運転支援機能を停止したり、撮影情報の補正を行って運転支援を行ったりする。運転支援装置は、例えば自動運転を支援する装置、自動駐車を支援する装置、緊急ブレーキを支援する装置等であってよい。   The camera offset detection device 1 may output processing information to a display device or a driving support device (not shown). The display device appropriately displays a warning or the like on the screen based on the information output from the camera shift detection device 1. The driving support device appropriately stops the driving support function based on the information output from the camera shift detection device 1 and corrects the imaging information to perform the driving support. The driving support device may be, for example, a device supporting automatic driving, a device supporting automatic parking, a device supporting emergency braking, and the like.

撮影部2は、車両周辺の状況を監視する目的で車両に設けられる。本実施形態では、撮影部2は、4つの車載カメラ21〜24を備える。各車載カメラ21〜24は、有線または無線によってカメラずれ検出装置1に接続される。図2は、車載カメラ21〜24が車両7に配置される位置を例示する図である。図2は、車両7を上から見た図である。   The imaging unit 2 is provided in the vehicle for the purpose of monitoring the situation around the vehicle. In the present embodiment, the imaging unit 2 includes four on-vehicle cameras 21 to 24. Each of the on-vehicle cameras 21 to 24 is connected to the camera shift detection device 1 by wire or wirelessly. FIG. 2 is a view exemplifying the positions at which the on-vehicle cameras 21 to 24 are disposed in the vehicle 7. FIG. 2 is a top view of the vehicle 7.

車載カメラ21は車両7の前端に設けられる。このため、車載カメラ21をフロントカメラ21とも呼ぶ。フロントカメラ21の光軸21aは車両7の前後方向に沿っている。フロントカメラ21は車両7の前方向を撮影する。車載カメラ22は車両7の後端に設けられる。このため、車載カメラ22をバックカメラ22とも呼ぶ。バックカメラ22の光軸22aは車両7の前後方向に沿っている。バックカメラ22は車両7の後方向を撮影する。フロントカメラ21及びバックカメラ22の取付け位置は、車両7の左右中央であることが好ましいが、左右中央から左右方向に多少ずれた位置であってもよい。   The on-vehicle camera 21 is provided at the front end of the vehicle 7. For this reason, the on-vehicle camera 21 is also referred to as a front camera 21. The optical axis 21 a of the front camera 21 is along the front-rear direction of the vehicle 7. The front camera 21 shoots the front of the vehicle 7. The on-vehicle camera 22 is provided at the rear end of the vehicle 7. For this reason, the on-vehicle camera 22 is also referred to as a back camera 22. The optical axis 22 a of the back camera 22 is along the front-rear direction of the vehicle 7. The back camera 22 shoots the rear of the vehicle 7. The mounting position of the front camera 21 and the back camera 22 is preferably at the left and right center of the vehicle 7, but may be slightly offset from the left and right center in the left and right direction.

車載カメラ23は車両7の左側ドアミラー71に設けられる。このため、車載カメラ23を左サイドカメラ23とも呼ぶ。左サイドカメラ23の光軸23aは車両7の左右方向に沿っている。左サイドカメラ23は車両7の左方向を撮影する。車載カメラ24は車両7の右側ドアミラー72に設けられる。このため、車載カメラ24を右サイドカメラ24とも呼ぶ。右サイドカメラ24の光軸24aは車両7の左右方向に沿っている。右サイドカメラ24は車両7の右方向を撮影する。   The on-vehicle camera 23 is provided on the left side door mirror 71 of the vehicle 7. For this reason, the on-vehicle camera 23 is also referred to as the left side camera 23. The optical axis 23 a of the left side camera 23 is along the left-right direction of the vehicle 7. The left side camera 23 captures the left direction of the vehicle 7. The on-vehicle camera 24 is provided on the right side door mirror 72 of the vehicle 7. For this reason, the on-vehicle camera 24 is also referred to as the right side camera 24. The optical axis 24 a of the right side camera 24 is in the left-right direction of the vehicle 7. The right side camera 24 shoots the right of the vehicle 7.

各車載カメラ21〜24は魚眼レンズで構成され、水平方向の画角θは180°以上である。このため、車載カメラ21〜24によって、車両7の水平方向における全周囲を撮影することができる。なお、本実施形態では、車載カメラの数は4つであるが、この数は適宜変更されてよく、複数でも単数でもよい。例えば、車両7がバックで駐車することを支援する目的で車載カメラが搭載されている場合には、撮影部2が有する車載カメラは、バックカメラ22、左サイドカメラ23、右サイドカメラ24の3つで構成されてよい。   Each of the on-vehicle cameras 21 to 24 is configured by a fisheye lens, and the horizontal angle of view θ is 180 ° or more. Therefore, the on-vehicle cameras 21 to 24 can capture the entire circumference of the vehicle 7 in the horizontal direction. In the present embodiment, the number of in-vehicle cameras is four, but the number may be changed as appropriate, and may be plural or singular. For example, in the case where a vehicle-mounted camera is mounted for the purpose of assisting the vehicle 7 to park in the back, the vehicle-mounted camera of the photographing unit 2 includes three of the back camera 22, the left side camera 23 and the right side camera 24. It may consist of one.

図1に戻って、入力部3は、カメラずれ検出装置1に対する指示を入力可能とする。入力部3は、例えば、タッチパネル、ボタン、レバー等で構成されてよい。入力部3は、有線または無線によってカメラずれ検出装置1に接続される。   Returning to FIG. 1, the input unit 3 can input an instruction to the camera shift detection device 1. The input unit 3 may be configured by, for example, a touch panel, a button, a lever, or the like. The input unit 3 is connected to the camera shift detection device 1 by wire or wirelessly.

センサ部4は、車載カメラ21〜24が搭載される車両7に関する情報を検出する複数のセンサを有する。本実施形態では、センサ部4は、車速センサ41と舵角センサ42とを含む。車速センサ41は、車両7の速度を検出する。舵角センサ42は、車両7のステアリングホイール(ハンドル)の回転角を検出する。車速センサ41および舵角センサ42は、通信バス50を介してカメラずれ検出装置1と繋がる。すなわち、車速センサ41で取得された車両7の速度情報は、通信バス50を介してカメラずれ検出装置1に入力される。舵角センサ42で取得された車両7のステアリングホイールの回転角情報は、通信バス50を介してカメラずれ検出装置1に入力される。なお、通信バス50は、例えばCAN(Controller Area Network)バスであってよい。   Sensor part 4 has a plurality of sensors which detect information about vehicles 7 in which in-vehicle cameras 21-24 are carried. In the present embodiment, the sensor unit 4 includes a vehicle speed sensor 41 and a steering angle sensor 42. The vehicle speed sensor 41 detects the speed of the vehicle 7. The steering angle sensor 42 detects the rotation angle of the steering wheel (handle) of the vehicle 7. The vehicle speed sensor 41 and the steering angle sensor 42 are connected to the camera shift detection device 1 via the communication bus 50. That is, the speed information of the vehicle 7 acquired by the vehicle speed sensor 41 is input to the camera shift detection device 1 via the communication bus 50. The rotation angle information of the steering wheel of the vehicle 7 acquired by the steering angle sensor 42 is input to the camera shift detection device 1 via the communication bus 50. The communication bus 50 may be, for example, a CAN (Controller Area Network) bus.

<2.カメラずれ検出装置>
図1に示すように、カメラずれ検出装置1は、画像取得部11と、制御部12と、記憶部13とを備える。
<2. Camera offset detection device>
As shown in FIG. 1, the camera shift detection device 1 includes an image acquisition unit 11, a control unit 12, and a storage unit 13.

画像取得部11は、4つの車載カメラ21〜24のそれぞれから、撮影画像を取得する。画像取得部11は、アナログの撮影画像をデジタルの撮影画像に変換するA/D変換機能などの基本的な画像処理機能を有する。画像取得部11は、取得した撮影画像に所定の画像処理を行い、処理後の撮影画像を制御部12に入力する。   The image acquisition unit 11 acquires a photographed image from each of the four on-vehicle cameras 21 to 24. The image acquisition unit 11 has a basic image processing function such as an A / D conversion function that converts an analog captured image into a digital captured image. The image acquisition unit 11 performs predetermined image processing on the acquired captured image, and inputs the processed captured image to the control unit 12.

制御部12は、例えばマイクロコンピュータであり、カメラずれ検出装置1の全体を統括的に制御する。制御部12は、CPU、RAMおよびROM等を備える。記憶部13は、例えば、フラッシュメモリ等の不揮発性のメモリであり、各種の情報を記憶する。記憶部13は、ファームウェアとしてのプログラムや各種のデータを記憶する。   The control unit 12 is, for example, a microcomputer, and controls the entire camera displacement detection device 1 in an integrated manner. The control unit 12 includes a CPU, a RAM, a ROM, and the like. The storage unit 13 is, for example, a non-volatile memory such as a flash memory, and stores various types of information. The storage unit 13 stores programs as firmware and various data.

詳細には、制御部12は、導出部121と、移動量推定部122と、判定部123とを備える。すなわち、カメラずれ検出装置1は、導出部121と、移動量推定部122と、判定部123とを備える。制御部12が備えるこれら各部121〜123の機能は、例えば記憶部13に記憶されるプログラムに従ってCPUが演算処理を行うことによって実現される。   In detail, the control unit 12 includes a derivation unit 121, a movement amount estimation unit 122, and a determination unit 123. That is, the camera misalignment detection device 1 includes the derivation unit 121, the movement amount estimation unit 122, and the determination unit 123. The functions of the units 121 to 123 included in the control unit 12 are realized, for example, by the CPU performing arithmetic processing in accordance with a program stored in the storage unit 13.

なお、制御部11の導出部121、移動量推定部122、および、判定部123の少なくともいずれか1つは、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)等のハードウェアで構成されてもよい。また、導出部121、移動量推定部122、および、判定部123は、概念的な構成要素である。1つの構成要素が実行する機能を複数の構成要素に分散させたり、複数の構成要素が有する機能を1つの構成要素に統合したりしてよい。   Note that at least one of the derivation unit 121, the movement amount estimation unit 122, and the determination unit 123 of the control unit 11 is configured by hardware such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA). It may be done. Further, the derivation unit 121, the movement amount estimation unit 122, and the determination unit 123 are conceptual components. The function performed by one component may be distributed to a plurality of components, or the function possessed by a plurality of components may be integrated into one component.

導出部121は、車載カメラ21〜24によって所定時間をおいて入力された2つの画像間における特徴点の動きであるオプティカルフロー(動きベクトル)を特徴点ごとに導出する。なお、本実施形態では、車両7は4つの車載カメラ21〜24を有する。このために、導出部121は、各車載カメラ21〜24について、オプティカルフローを特徴点ごとに導出する。特徴点は、撮影画像中のエッジの交点など、撮影画像において際立って検出できる点である。特徴点は、例えば路面に描かれた白線のエッジ、路面上のひび、路面上のしみ、路面上の砂利等である。特徴点は、通常、1つの撮影画像の中に多数存在する。導出部121は、例えば、ハリスオペレータ等の公知の手法を用いて撮影画像の特徴点を導出する。   The deriving unit 121 derives, for each feature point, an optical flow (motion vector) that is a motion of a feature point between two images input with a predetermined time by the on-vehicle cameras 21 to 24. In the present embodiment, the vehicle 7 has four on-vehicle cameras 21-24. For this purpose, the deriving unit 121 derives an optical flow for each of the feature points for each of the on-vehicle cameras 21 to 24. A feature point is a point that can be detected prominently in a captured image, such as the intersection of edges in the captured image. The characteristic points are, for example, an edge of a white line drawn on the road surface, a crack on the road surface, a stain on the road surface, a gravel on the road surface, and the like. Usually, a large number of feature points exist in one captured image. The deriving unit 121 derives feature points of the captured image using, for example, a known method such as a Harris operator.

移動量推定部122は、複数のオプティカルフローに基づいて車載カメラ21〜24を搭載する車両7の移動量を推定する。詳細には、移動量推定部122は、統計処理を用いて車両7の移動量を推定する。なお、本実施形態では、車両7が4つの車載カメラ21〜24を有するために、移動量推定部122は、車載カメラ21〜24ごとに、車両7の移動量の推定値を求める。本実施形態では、移動量推定部122が行う統計処理は、ヒストグラムを用いた処理である。ヒストグラムを用いた移動量の推定処理の詳細については後述する。   The movement amount estimation unit 122 estimates the movement amount of the vehicle 7 on which the in-vehicle cameras 21 to 24 are mounted based on the plurality of optical flows. In detail, the movement amount estimation unit 122 estimates the movement amount of the vehicle 7 using statistical processing. In the present embodiment, since the vehicle 7 includes the four on-vehicle cameras 21 to 24, the movement amount estimating unit 122 obtains an estimated value of the movement amount of the vehicle 7 for each of the on-vehicle cameras 21 to 24. In the present embodiment, the statistical processing performed by the movement amount estimation unit 122 is processing using a histogram. Details of the process of estimating the movement amount using a histogram will be described later.

判定部123は、移動量推定部122で得られた推定情報と、車載カメラ21〜24以外の外部センサから入力される車両7の移動に関わる実測情報とに基づいて車載カメラ21〜24のずれを判定する。なお、本実施形態では、車両7が4つの車載カメラ21〜24を有するために、判定部123は、車載カメラ21〜24ごとにカメラずれの判定を行う。   The determination unit 123 shifts the on-vehicle cameras 21 to 24 based on the estimated information obtained by the movement amount estimation unit 122 and the measurement information related to the movement of the vehicle 7 input from an external sensor other than the on-vehicle cameras 21 to 24. Determine In the present embodiment, since the vehicle 7 includes the four on-vehicle cameras 21 to 24, the determination unit 123 determines the camera shift for each on-vehicle camera 21 to 24.

本実施形態では、判定部123は、移動量推定部122で得られた推定情報と、車速センサ41から入力される車両7の速度情報とに基づいて車載カメラ21〜24のずれを判定する。すなわち、本実施形態においては、実測情報は、通信バス50を介して判定部123に入力される車両7の速度情報を含む。これによれば、車両7の実際の移動量を簡単且つ正確に取得することができる。   In the present embodiment, the determination unit 123 determines the deviation of the in-vehicle cameras 21 to 24 based on the estimation information obtained by the movement amount estimation unit 122 and the speed information of the vehicle 7 input from the vehicle speed sensor 41. That is, in the present embodiment, the actual measurement information includes the speed information of the vehicle 7 input to the determination unit 123 via the communication bus 50. According to this, the actual movement amount of the vehicle 7 can be acquired easily and accurately.

なお、車両7の移動に関わる実測情報は、車速センサ41から取得される車両7の速度情報に限定されない。例えば、車両7の移動に関わる実測情報は、GPS(Global Positioning System)受信機から取得される車両7の移動距離情報(移動量情報)であってもよい。また、車両7の移動に関わる実測情報は、1つの情報ではなく、複数の情報であってよい。例えば、車両7の移動に関わる実測情報は、車速センサ41から取得される車両7の速度情報と、舵角センサ42から取得される車両7におけるステアリングホイールの回転角情報との2つの情報であってもよい。   The actual measurement information related to the movement of the vehicle 7 is not limited to the speed information of the vehicle 7 acquired from the vehicle speed sensor 41. For example, the measurement information related to the movement of the vehicle 7 may be movement distance information (movement amount information) of the vehicle 7 acquired from a GPS (Global Positioning System) receiver. Further, the actual measurement information related to the movement of the vehicle 7 may be a plurality of pieces of information instead of one piece of information. For example, the measurement information related to the movement of the vehicle 7 is two pieces of information of the speed information of the vehicle 7 acquired from the vehicle speed sensor 41 and the rotation angle information of the steering wheel in the vehicle 7 acquired from the steering angle sensor 42 May be

本実施形態の構成によれば、カメラずれ検出装置1は、車載カメラ21〜24の撮影画像と、車速センサ41等の車両7が既に備えるセンサを用いてカメラずれを検出することができるために、カメラずれを検出するための構成に要するコストを抑制することができる。また、本実施形態の構成では、撮影画像の大部分が路面であると想定することで、路面の特徴点のオプティカルフローを利用した統計処理によって、カメラずれを検出することができる。   According to the configuration of the present embodiment, the camera shift detection device 1 can detect the camera shift using the captured image of the on-vehicle cameras 21 to 24 and the sensor such as the vehicle speed sensor 41 that is already provided to the vehicle 7. The cost required for the configuration for detecting camera misalignment can be suppressed. Further, in the configuration of the present embodiment, camera displacement can be detected by statistical processing using the optical flow of the feature points of the road surface by assuming that most of the photographed image is the road surface.

図3は、カメラずれ検出装置1によるカメラずれの検出フローの一例を示すフローチャートである。なお、本実施形態では、4つの車載カメラ21〜24のそれぞれについて、図3に示すカメラずれの検出フローが実施される。重複説明を避けるために、ここでは、フロントカメラ21の場合を代表例として、カメラずれの検出フローを説明する。   FIG. 3 is a flow chart showing an example of a camera shift detection flow by the camera shift detection device 1. In the present embodiment, the camera shift detection flow shown in FIG. 3 is performed for each of the four on-vehicle cameras 21 to 24. In order to avoid redundant description, here, the detection flow of the camera shift will be described with the case of the front camera 21 as a representative example.

図3に示すように、まず、制御部12は、フロントカメラ21を搭載する車両7が直進しているか否かを確認する(ステップS1)。車両7が直進しているか否かは、例えば、舵角センサ42から得られるステアリングホイールの回転角情報に基づいて判断することができる。例えば、ステアリングホイールの回転角がゼロの時に車両7が完全にまっすぐに進むとした場合に、回転角がゼロの場合だけなく、回転角がプラス方向とマイナス方向の一定範囲内の回転である場合を含めて、車両7が直進していると判断してよい。なお、直進には、前進方向の直進と、後退方向の直進との両方が含まれる。   As shown in FIG. 3, first, the control unit 12 checks whether the vehicle 7 on which the front camera 21 is mounted is going straight (step S1). Whether or not the vehicle 7 is traveling straight can be determined based on, for example, rotation angle information of the steering wheel obtained from the steering angle sensor 42. For example, assuming that the vehicle 7 travels completely straight when the rotation angle of the steering wheel is zero, not only when the rotation angle is zero but also when the rotation angle is within a certain range of plus and minus directions. And the vehicle 7 may be determined to be going straight. In addition, straight running includes both straight running in the forward direction and straight running in the reverse direction.

制御部12は、車両7が直進していると判断されるまで、ステップS1の確認を繰り返す。車両7が直進走行しない限り、カメラずれを判定するための情報が取得されない。換言すると、判定部123による車載カメラ(フロントカメラ)21のずれ判定は、車載カメラ以外の外部センサ(ここでは舵角センサ42)によって車両7が直進していると判断される場合に取得された情報を用いて行われる。これによれば、車両7の進行方向が曲がっている場合の情報を用いてカメラずれの判定が行われないために、カメラずれを判定するための情報処理が複雑になることを避けられる。   The control unit 12 repeats the confirmation in step S1 until it is determined that the vehicle 7 is traveling straight. As long as the vehicle 7 does not travel straight, information for determining a camera shift is not acquired. In other words, the shift determination of the on-vehicle camera (front camera) 21 by the determination unit 123 is acquired when it is determined that the vehicle 7 is traveling straight by the external sensor other than the on-vehicle camera (the steering angle sensor 42 here). It is done using information. According to this, since the determination of the camera shift is not performed using the information when the traveling direction of the vehicle 7 is curved, it is possible to prevent the information processing for determining the camera shift from being complicated.

車両7が直進していると判断される場合(ステップS1でYes)、制御部12は、車両7の速度が所定速度範囲内であるか否かを確認する(ステップS2)。所定速度範囲は、例えば時速3km以上時速5km以下である。本実施形態では、車両7の速度は、車載カメラ21〜24以外の外部センサである車速センサ41によって取得することができる。なお、ステップS1とステップS2とは、順番が入れ替わってもよい。また、ステップS1とステップS2とは同時に処理が行われてもよい。   When it is determined that the vehicle 7 is traveling straight (Yes in step S1), the control unit 12 checks whether the speed of the vehicle 7 is within a predetermined speed range (step S2). The predetermined speed range is, for example, 3 km / hour or more and 5 km / hour or less. In the present embodiment, the speed of the vehicle 7 can be acquired by the vehicle speed sensor 41 which is an external sensor other than the on-vehicle cameras 21-24. The order of step S1 and step S2 may be reversed. Moreover, processing may be performed simultaneously with step S1 and step S2.

制御部12は、車両7の速度が所定速度範囲外である場合(ステップS2でNo)、ステップS1に戻って車両7の直進判断を行う。車両7の速度が所定速度範囲内でない限り、カメラずれを判定するための情報が取得されない。換言すると、判定部123による車載カメラ(フロントカメラ)21のずれ判定は、車載カメラ21〜24以外の外部センサ(ここでは車速センサ41)によって車両7が所定速度範囲内で走行していると判断される場合に取得された情報を用いて行われる。例えば、車両7の速度が速すぎると、オプティカルフローの導出が不確かになり易くなる。一方で、車両7の速度が遅すぎると、車速センサ41から取得される車両7の速度の信頼性が低下する。この点、本実施形態の構成によれば、車両7の速度が速すぎる場合や遅すぎる場合を除いてカメラずれの判定を行うことができるために、カメラずれの判定の信頼性を向上することができる。   When the speed of the vehicle 7 is out of the predetermined speed range (No in step S2), the control unit 12 returns to step S1 to determine whether the vehicle 7 goes straight. As long as the speed of the vehicle 7 is not within the predetermined speed range, information for determining the camera shift is not acquired. In other words, the shift determination of the on-vehicle camera (front camera) 21 by the determination unit 123 determines that the vehicle 7 is traveling within the predetermined speed range by an external sensor other than the on-vehicle cameras 21 to 24 (here, the vehicle speed sensor 41). If done, it is done using the information obtained. For example, when the speed of the vehicle 7 is too fast, the derivation of the optical flow tends to be uncertain. On the other hand, when the speed of the vehicle 7 is too slow, the reliability of the speed of the vehicle 7 acquired from the vehicle speed sensor 41 is reduced. In this respect, according to the configuration of the present embodiment, the camera shift can be determined except when the speed of the vehicle 7 is too fast or too slow, so that the reliability of the determination of the camera shift can be improved. Can.

なお、所定速度範囲は設定変更可能であることが好ましい。これによれば、所定速度範囲を各車両に適した値にすることができ、カメラずれの判定の信頼性を向上することができる。本実施形態では、所定速度範囲の設定は入力部3によって行うことができる。   Preferably, the predetermined speed range can be changed. According to this, the predetermined speed range can be set to a value suitable for each vehicle, and the reliability of the determination of the camera shift can be improved. In the present embodiment, the setting of the predetermined speed range can be performed by the input unit 3.

車両7が所定速度範囲内で走行していると判断される場合(ステップS2でYes)、導出部121によって特徴点の抽出が行われる(ステップS3)。換言すると、車両7が所定の低速で直進走行している場合に、導出部121によって特徴点の抽出が行われる。導出部121による特徴点の抽出は、例えば、停止している車両7が動き出す場合や、走行している車両7が止まる場合等に行われる。   When it is determined that the vehicle 7 is traveling within the predetermined speed range (Yes in step S2), extraction of feature points is performed by the derivation unit 121 (step S3). In other words, when the vehicle 7 travels straight at a predetermined low speed, the derivation unit 121 extracts a feature point. Extraction of the feature points by the derivation unit 121 is performed, for example, when the stopped vehicle 7 starts moving, when the traveling vehicle 7 stops, or the like.

図4は、特徴点FPを抽出する手法を説明するための図である。図4は、フロントカメラ21で撮影される撮影画像Pを模式的に示している。特徴点FPは路面RS上に存在する。図4においては、特徴点FPの数は2つとされているが、この数は便宜的なものであり、実際の数を示すものではない。通常、多数の特徴点が取得される。図4に示すように、導出部121は特徴点FPを所定領域RE内で抽出する。所定領域REは、撮影画像Pの中心部Cを含む広範囲に設定される。これにより、特徴点FPの発生箇所が均一でなく偏った範囲である場合でも、特徴点FPを抽出することができる。なお、所定領域REは、車両7のボディBOが映る領域は避けて設定される。   FIG. 4 is a diagram for explaining a method of extracting the feature point FP. FIG. 4 schematically shows a photographed image P photographed by the front camera 21. The feature point FP exists on the road surface RS. Although the number of feature points FP is two in FIG. 4, this number is for convenience and does not indicate the actual number. Usually, a large number of feature points are obtained. As shown in FIG. 4, the derivation unit 121 extracts the feature point FP in the predetermined region RE. The predetermined area RE is set in a wide range including the central portion C of the captured image P. Thereby, the feature point FP can be extracted even when the occurrence point of the feature point FP is not uniform but in a range which is biased. In addition, the predetermined area | region RE avoids the area | region where the body BO of the vehicle 7 is reflected, and is set.

特徴点FPが抽出されると、導出部121は、抽出した特徴点FPごとにオプティカルフローを導出する(ステップS4)。図5は、オプティカルフローOFを導出する手法を説明するための図である。図5は、図4と同様に便宜的に示された模式図である。図5は、図4に示す撮影画像(前フレームP)の撮影後、所定時間が経過した後にフロントカメラ21で撮影された撮影画像(現フレームP´)である。図4に示す撮影画像Pの撮影後、所定時間が経過するまでの間に、車両7は後退している。図5に示す破線の丸印は、図4に示す撮影画像Pの撮影時点における特徴点FPの位置を示す。   When the feature points FP are extracted, the derivation unit 121 derives an optical flow for each of the extracted feature points FP (step S4). FIG. 5 is a diagram for explaining a method of deriving the optical flow OF. FIG. 5 is a schematic view shown for convenience as in FIG. FIG. 5 shows a photographed image (current frame P ′) photographed by the front camera 21 after a predetermined time has elapsed after photographing of the photographed image (the previous frame P) shown in FIG. After the photographing of the photographed image P shown in FIG. 4, the vehicle 7 is moving backward until the predetermined time elapses. The broken-line circle shown in FIG. 5 indicates the position of the feature point FP at the time of shooting of the shot image P shown in FIG.

図5に示すように、車両7が後退すると、車両7の前方に存在する特徴点FPは車両7から離れる。すなわち、特徴点FPは、現フレームP´と前フレームPとで異なる位置に現れる。導出部11は、現フレームP´の特徴点FPと前フレームPの特徴点FPとを、その近傍の画素値に基づいて対応付け、対応付けた特徴点FPのそれぞれの位置に基づいてオプティカルフローOFを導出する。   As shown in FIG. 5, when the vehicle 7 moves backward, the feature point FP present in front of the vehicle 7 leaves the vehicle 7. That is, the feature point FP appears at different positions in the current frame P ′ and the previous frame P. The deriving unit 11 associates the feature point FP of the current frame P ′ with the feature point FP of the previous frame P based on the pixel values in the vicinity, and the optical flow based on the respective positions of the associated feature points FP. Derive the OF.

オプティカルフローOFが導出されると、移動量推定部122は、カメラ座標系で得られた各オプティカルフローOFを、ワールド座標系のオプティカルフローに変換する(ステップS5)。図6は、座標変換処理を説明するための図である。図6に示すように、移動量推定部122は、フロントカメラ21の位置(視点VP1)から見たオプティカルフローOFを、車両7が存在する路面の上方の視点VP2から見たオプティカルフローOF_Cに変換する。移動量推定部122は、撮影画像Pにおける各オプティカルフローOFを、路面に相当する仮想平面RS_Vに投影することで、ワールド座標系のオプティカルフローOF_Cに変換する。   When the optical flow OF is derived, the movement amount estimation unit 122 converts each optical flow OF obtained in the camera coordinate system into an optical flow in the world coordinate system (step S5). FIG. 6 is a diagram for explaining coordinate conversion processing. As shown in FIG. 6, the movement amount estimation unit 122 converts the optical flow OF viewed from the position of the front camera 21 (viewpoint VP1) into an optical flow OF_C viewed from the viewpoint VP2 above the road surface on which the vehicle 7 is present. Do. The movement amount estimation unit 122 converts each optical flow OF in the captured image P into an optical flow OF_C in the world coordinate system by projecting the optical flow OF onto the virtual plane RS_V corresponding to the road surface.

次に、移動量推定部122は、ワールド座標系の各オプティカルフローOF_Cに基づいてヒストグラムを生成する(ステップS6)。本実施形態では、移動量推定部122は、各オプティカルフローOF_Cを前後方向と左右方向との2成分に分けて、第1ヒストグラムと第2ヒストグラムとを生成する。図7は、移動量推定部122によって生成される第1ヒストグラムHG1の一例を示す図である。図8は、移動量推定部122によって生成される第2ヒストグラムHG2の一例を示す図である。なお、図7および図8はカメラずれが発生していない場合に得られるヒストグラムを示す。   Next, the movement amount estimation unit 122 generates a histogram based on each optical flow OF_C of the world coordinate system (step S6). In the present embodiment, the movement amount estimation unit 122 divides each optical flow OF_C into two components in the front-rear direction and the left-right direction to generate a first histogram and a second histogram. FIG. 7 is a diagram showing an example of the first histogram HG1 generated by the movement amount estimation unit 122. As shown in FIG. FIG. 8 is a diagram illustrating an example of the second histogram HG2 generated by the movement amount estimation unit 122. 7 and 8 show histograms obtained when no camera displacement occurs.

図7に示す第1ヒストグラムHG1は、各オプティカルフローOF_Cの前後方向成分に基づいて得られたヒストグラムである。第1ヒストグラムHG1は、オプティカルフローOF_Cの数を度数とし、前後方向への移動量(オプティカルフローOF_Cの前後方向成分の長さ)を階級とするヒストグラムである。図8に示す第2ヒストグラムHG2は、オプティカルフローOF_Cの左右方向成分に基づいて得られたヒストグラムである。第2ヒストグラムHG2は、オプティカルフローOF_Cの数を度数とし、左右方向への移動量(オプティカルフローOF_Cの左右方向成分の長さ)を階級とするヒストグラムである。   The first histogram HG1 shown in FIG. 7 is a histogram obtained based on the longitudinal components of each optical flow OF_C. The first histogram HG1 is a histogram in which the number of optical flows OF_C is a frequency, and the amount of movement in the front-rear direction (the length of the front-rear direction component of the optical flow OF_C) is a class. The second histogram HG2 shown in FIG. 8 is a histogram obtained based on the left-right direction component of the optical flow OF_C. The second histogram HG2 is a histogram in which the number of optical flows OF_C is a frequency, and the amount of movement in the left-right direction (the length of the left-right direction component of the optical flow OF_C) is a class.

図7および図8は、カメラずれが発生しておらず、車両7が後方に直進した場合に得られるヒストグラムである。このために、第1ヒストグラムHG1は、後退側の特定の移動距離(階級)に偏って度数が多くなっている。一方、第2ヒストグラムHG2は、移動量ゼロの近傍の階級に偏って度数が多くなっている。   FIG. 7 and FIG. 8 are histograms obtained when the camera 7 does not go straight and the vehicle 7 goes straight in the backward direction. For this reason, the first histogram HG1 has a high frequency biased to a specific movement distance (class) on the backward side. On the other hand, the frequency of the second histogram HG2 is increased toward the class near the movement amount zero.

図9は、カメラずれが発生した場合のヒストグラムの変化を例示する図である。図9は、フロントカメラ21がチルト方向(鉛直方向)に回転してずれた場合を例示する。図9において、上段(a)はカメラずれが発生していない場合(正常時)の第1ヒストグラムHG1であり、下段(b)はカメラずれが発生した場合の第1ヒストグラムHG1である。フロントカメラ21のチルト方向の回転ずれは、主にオプティカルフローOF_Cの前後方向成分に影響を与える。図9に示す例では、フロントカメラ21のチルト方向の回転ずれによって、度数が大きくなる階級が正常時に比べて前方側にずれている。   FIG. 9 is a diagram illustrating the change of the histogram when a camera shift occurs. FIG. 9 illustrates the case where the front camera 21 is rotated and shifted in the tilt direction (vertical direction). In FIG. 9, the upper part (a) is the first histogram HG1 when no camera displacement occurs (normal time), and the lower part (b) is the first histogram HG1 when camera displacement occurs. The rotational deviation of the front camera 21 in the tilt direction mainly affects the longitudinal component of the optical flow OF_C. In the example shown in FIG. 9, due to the rotational deviation of the front camera 21 in the tilt direction, the class whose frequency increases is deviated to the front side compared to that in the normal state.

なお、フロントカメラ21のチルト方向の回転ずれは、オプティカルフローOF_Cの左右方向成分に対する影響は小さい。このために、図示は省略するが、第2ヒストグラムHG2のカメラずれ前後の変化は、第1ヒストグラムHG1の場合に比べて小さい。ただし、これは、フロントカメラ21がチルト方向にずれた場合の話であり、フロントカメラ21が、例えばパン方向(水平方向)やロール方向(光軸を中心とする回転方向)等にずれを生じた場合には、異なったヒストグラム変化が発生する。   The rotational deviation of the front camera 21 in the tilt direction has little influence on the left-right direction component of the optical flow OF_C. For this reason, although illustration is omitted, changes before and after camera shift of the second histogram HG2 are smaller than those in the case of the first histogram HG1. However, this is a story when the front camera 21 shifts in the tilt direction, and the front camera 21 shifts in, for example, the pan direction (horizontal direction) or the roll direction (rotation direction about the optical axis). In this case, different histogram changes occur.

移動量推定部122は、生成したヒストグラムHG1、HG2によって車両7の移動量を推定する(ステップS7)。本実施形態では、移動量推定部122は、第1ヒストグラムHG1によって、車両7の前後方向の移動量を推定する。移動量推定部122は、第2ヒストグラムHG2によって、車両7の左右方向の移動量を推定する。すなわち、移動量推定部122で得られた推定情報には、車両7の前後方向および左右方向の移動量の推定値が含まれる。これによれば、車両7の前後方向および左右方向の移動量の推定値を用いてカメラずれの検出を行うことができるために、カメラずれの検出結果の信頼性を向上することができる。なお、本実施形態では、特定の条件下で抽出される特徴点が路面RS上に存在するとの前提の下に車両7の移動量を推定する。   The movement amount estimation unit 122 estimates the movement amount of the vehicle 7 based on the generated histograms HG1 and HG2 (step S7). In the present embodiment, the movement amount estimation unit 122 estimates the movement amount of the vehicle 7 in the front-rear direction by the first histogram HG1. The movement amount estimation unit 122 estimates the movement amount of the vehicle 7 in the left-right direction by the second histogram HG2. That is, the estimation information obtained by the movement amount estimation unit 122 includes estimated values of the movement amount of the vehicle 7 in the front-rear direction and the left-right direction. According to this, since the camera shift can be detected using the estimated values of the amount of movement of the vehicle 7 in the front-rear direction and the left-right direction, the reliability of the detection result of the camera shift can be improved. In the present embodiment, the amount of movement of the vehicle 7 is estimated on the premise that feature points extracted under specific conditions exist on the road surface RS.

本実施形態では、移動量推定部122は、第1ヒストグラムHG1の中央値(メジアン)を前後方向の移動量の推定値とする。移動量推定部122は、第2ヒストグラムHG2の中央値を左右方向の移動量の推定値とする。ただし、移動量推定部122による推定値の決定方法は、これに限定されない。移動量推定部122は、例えば、各ヒストグラムHG1、HG2の度数が最大となる階級を移動量の推定値としてもよい。また、移動量推定部122は、例えば、各ヒストグラムHG1、HG2において、平均値を移動量の推定値としてもよい。   In the present embodiment, the movement amount estimation unit 122 sets the median (median) of the first histogram HG1 as the estimated value of the movement amount in the front-rear direction. The movement amount estimation unit 122 sets the median of the second histogram HG2 as the estimated value of the movement amount in the left-right direction. However, the method of determining the estimated value by the movement amount estimation unit 122 is not limited to this. The movement amount estimation unit 122 may use, for example, a class in which the frequency of each of the histograms HG1 and HG2 is maximum as an estimated value of the movement amount. In addition, for example, in each of the histograms HG1 and HG2, the movement amount estimation unit 122 may use the average value as the estimated value of the movement amount.

なお、図9に示す例では、一点鎖線はフロントカメラ21が正常である場合の前後方向の移動量の推定値を示し、二点鎖線はカメラずれが発生した場合の前後方向の移動量の推定値を示す。図9に示すように、カメラずれの発生によって、前後方向の移動量の推定値に差Δが生じていることがわかる。   In the example shown in FIG. 9, the dashed-dotted line indicates the estimated value of the moving amount in the back and forth direction when the front camera 21 is normal, and the two-dot chain line indicates the moving amount in the back and forth direction when camera displacement occurs. Indicates a value. As shown in FIG. 9, it can be seen that a difference Δ occurs in the estimated values of the amount of movement in the front-rear direction due to the occurrence of the camera shift.

移動量推定部122で車両7の移動量の推定値が得られると、判定部123はフロントカメラ21のずれ判定を行う(ステップS8)。判定部123は、車両7の前後方向の移動量と、車両7の左右方向の移動量と、車両7の前後方向および左右方向の移動量に基づいて得られる特定量とのうち少なくともいずれか1つについて、移動量推定部122で得られた推定値と、車載カメラ21〜24以外の外部センサから入力される車両7の移動に関わる実測情報によって得られる値との差が所定の閾値以上になった場合に、車載カメラ(フロントカメラ)21のずれが発生していると判定する。これによれば、車載カメラから得られる車両7の移動量の推定値と、外部センサを用いた実測情報から得られる車両7の移動量とを比較して、車載カメラのずれを適切に検出することができる。   When the estimated value of the moving amount of the vehicle 7 is obtained by the moving amount estimating unit 122, the determining unit 123 determines the shift of the front camera 21 (step S8). The determination unit 123 is at least one of the movement amount of the vehicle 7 in the front-rear direction, the movement amount of the vehicle 7 in the left-right direction, and the specific amount obtained based on the movement amount of the vehicle 7 in the front-rear direction and the left-right direction. The difference between the estimated value obtained by the movement amount estimation unit 122 and the value obtained by the measurement information related to the movement of the vehicle 7 input from an external sensor other than the on-vehicle cameras 21 to 24 is a predetermined threshold or more. When it becomes, it determines with the shift | offset | difference of the vehicle-mounted camera (front camera) 21 having generate | occur | produced. According to this, the estimated value of the amount of movement of the vehicle 7 obtained from the on-vehicle camera is compared with the amount of movement of the vehicle 7 obtained from the measurement information using the external sensor to appropriately detect the deviation of the on-vehicle camera be able to.

本実施形態では、車載カメラ21〜24以外の外部センサから入力される車両7の移動に関わる実測情報は、車速センサ41から入力される車両7の速度情報である。この速度情報から推定値と比較する車両7の移動量が算出される。詳細には、当該移動量は、オプティカルフローOFを導出するための2つの撮影画像の撮影時間間隔と、その間の車速センサ41によって得られる車両7の速度とによって算出される。また、当該移動量は、移動量推定部122で得られる移動量の推定値が前後方向と左右方向との2つであることに対応して、前後方向と左右方向との2つの値が存在する。ただし、本実施形態では、車両7が前後方向に直進している場合にオプティカルフローOFを導出するための撮影画像を撮影する構成であるために、この間に車両7は左右方向に移動しておらず、速度情報から算出される左右方向の移動量は常にゼロになる。   In the present embodiment, the measurement information related to the movement of the vehicle 7 input from an external sensor other than the on-vehicle cameras 21 to 24 is speed information of the vehicle 7 input from the vehicle speed sensor 41. From this speed information, the amount of movement of the vehicle 7 to be compared with the estimated value is calculated. In detail, the movement amount is calculated by the photographing time interval of the two photographed images for deriving the optical flow OF and the speed of the vehicle 7 obtained by the vehicle speed sensor 41 during that time. In addition, corresponding to the fact that the estimated value of the movement amount obtained by the movement amount estimation unit 122 is two in the front-rear direction and the left-right direction, the movement amount has two values in the front-rear direction and the left-right direction. Do. However, in the present embodiment, when the vehicle 7 travels straight in the front-rear direction, the vehicle 7 moves in the left-right direction because the captured image for deriving the optical flow OF is captured. In addition, the amount of movement in the left and right direction calculated from the speed information is always zero.

図10は、判定部123によって行われるカメラずれ判定処理の一例を示すフローチャートである。まず、判定部123は、前後方向の移動量について、移動量推定部122で推定された推定値と、車速センサ41から得られる車両7の速度情報によって求められる値との差の大きさが第1閾値より小さいか否かを確認する(ステップS11)。両者の差の大きさが第1閾値以上である場合(ステップS11でNo)、判定部123は、フロントカメラ21の取付け状態が異常であり、カメラずれが生じていると判定する(ステップS15)。一方、両者の差の大きさが第1閾値より小さい場合(ステップS11でYes)、判定部123は、前後方向の移動量からは異常が検出されないと判定する。   FIG. 10 is a flowchart illustrating an example of the camera shift determination process performed by the determination unit 123. First, the determination unit 123 determines the difference between the estimated value estimated by the movement amount estimation unit 122 and the value obtained by the speed information of the vehicle 7 obtained from the vehicle speed sensor 41 for the movement amount in the front-rear direction. It is checked whether it is smaller than 1 threshold (step S11). If the magnitude of the difference between the two is greater than or equal to the first threshold (No in step S11), the determination unit 123 determines that the mounting state of the front camera 21 is abnormal and camera misalignment occurs (step S15). . On the other hand, when the magnitude of the difference between the two is smaller than the first threshold (Yes in step S11), the determination unit 123 determines that an abnormality is not detected from the amount of movement in the front-rear direction.

前後方向の移動量から異常が検出されない場合、判定部123は、左右方向の移動量について、移動量推定部122で推定された推定値と、車速センサ41から得られる車両7の速度情報によって求められる値との差の大きさが第2閾値より小さいか否かを確認する(ステップS12)。両者の差の大きさが第2閾値以上である場合(ステップS12でNo)、判定部123は、フロントカメラ21の取付け状態が異常であり、カメラずれが生じていると判定する(ステップS15)。一方、両者の差の大きさが第2閾値より小さい場合(ステップS12でYes)、判定部123は、左右方向の移動量からは異常が検出されないと判定する。   When no abnormality is detected from the amount of movement in the front-rear direction, the determination unit 123 obtains the amount of movement in the left-right direction from the estimated value estimated by the movement amount estimation unit 122 and the speed information of the vehicle 7 obtained from the vehicle speed sensor 41 It is checked whether the magnitude of the difference from the value to be calculated is smaller than the second threshold (step S12). If the magnitude of the difference between the two is greater than or equal to the second threshold (No in step S12), the determination unit 123 determines that the mounting state of the front camera 21 is abnormal and camera misalignment occurs (step S15). . On the other hand, when the magnitude of the difference between the two is smaller than the second threshold (Yes in step S12), the determination unit 123 determines that an abnormality is not detected from the movement amount in the left and right direction.

左右方向の移動量からも異常が検出されない場合、判定部123は、前後方向および左右方向の移動量に基づいて得られる特定量について、移動量推定部122で推定された推定値と、車速センサ41から得られる車両7の速度情報によって求められる値との差の大きさが第3閾値より小さいか否かを確認する(ステップS13)。本実施形態では、特定量は、前後方向の移動量を二乗して得られる値と、左右方向の移動量を二乗して得られる値との和の平方根値である。ただし、これは例示にすぎず、特定量は、例えば、前後方向の移動量を二乗して得られる値と、左右方向の移動量を二乗して得られる値との和であってもよい。   When no abnormality is detected from the amount of movement in the left and right direction, the determination unit 123 determines the estimated value estimated by the movement amount estimation unit 122 for the specific amount obtained based on the amount of movement in the front and rear direction and the left and right direction It is checked whether the magnitude of the difference with the value obtained by the speed information of the vehicle 7 obtained from 41 is smaller than the third threshold (step S13). In the present embodiment, the specific amount is a square root value of a sum of a value obtained by squaring the amount of movement in the front-rear direction and a value obtained by squaring the amount of movement in the left-right direction. However, this is merely an example, and the specific amount may be, for example, a sum of a value obtained by squaring the amount of movement in the front-rear direction and a value obtained by squaring the amount of movement in the left-right direction.

特定量の推定値と、速度情報によって求められる値との差の大きさが第3閾値以上である場合(ステップS13でNo)、判定部123は、フロントカメラ21の取付け状態が異常であり、カメラずれが生じていると判定する(ステップS15)。一方、両者の差の大きさが第3閾値より小さい場合(ステップS13でYes)、判定部123は、フロントカメラ21の取付け状態は正常であると判定する(ステップS14)。   When the magnitude of the difference between the estimated value of the specific amount and the value determined by the speed information is equal to or greater than the third threshold (No in step S13), the determination unit 123 determines that the mounting state of the front camera 21 is abnormal. It is determined that camera shift has occurred (step S15). On the other hand, when the magnitude of the difference between the two is smaller than the third threshold (Yes in step S13), the determination unit 123 determines that the attachment state of the front camera 21 is normal (step S14).

本実施形態では、前後方向の移動量、左右方向の移動量、および、特定量のうち、いずれか1つでも、移動量推定部122で得られる推定値と、速度情報によって得られる値との比較により異常が認められると、カメラずれが発生していると判定する。これによれば、カメラずれが発生しているにもかかわらず、カメラずれが発生していないと判定する可能性を低減できる。ただし、これは例示である。例えば、前後方向の移動量、左右方向の移動量、および、特定量の全てにおいて、移動量推定部122で得られる推定値と、速度情報から得られる値との比較により異常が認められる場合に限って、カメラずれが発生していると判定する構成としてもよい。カメラずれの判定基準は、入力部3によって適宜変更することができることが好ましい。   In the present embodiment, the estimated value obtained by the moving amount estimating unit 122 and the value obtained by the speed information are at least one of the moving amount in the front-rear direction, the moving amount in the left-right direction, and the specific amount. If an abnormality is found by the comparison, it is determined that a camera shift has occurred. According to this, it is possible to reduce the possibility of determining that the camera shift has not occurred although the camera shift has occurred. However, this is an example. For example, when abnormality is recognized by comparison between the estimated value obtained by the movement amount estimation unit 122 and the value obtained from the velocity information in all of the movement amount in the front-rear direction, the movement amount in the left-right direction, and the specific amount. The configuration may be limited to determine that a camera shift has occurred. It is preferable that the determination criterion of the camera shift can be appropriately changed by the input unit 3.

本実施形態では、前後方向の移動量、左右方向の移動量、および、特定量について、推定値と速度情報から得られる値との比較を順番に行う構成としたが、これらの比較は同じタイミングで行われてもよい。また、前後方向の移動量、左右方向の移動量、および、特定量について、推定値と速度情報から得られる値との比較を順番に行う構成の場合、その順番は特に限定されず、図10に示す順番とは異なる順番とされてもよい。なお、本実施形態では、移動量に基づいてカメラずれを判定したが、速度に基づいてカメラずれを判定してもよい。この場合、オプティカルフローから推定した移動量と、オプティカルフローの算出に使用したフレーム間の時間を基に前後方向および左右方向の速度を推定し、車速センサ41から得られる車両7の速度と比較することでカメラずれを判定すればよい。この場合の車速センサ41から得られる車両7の速度は前後方向の速度であり、左右方向の速度は0である。すなわち、本実施形態では、移動量と速度は同義である。   Although the present embodiment is configured to sequentially compare the estimated value and the value obtained from the speed information for the amount of movement in the front-rear direction, the amount of movement in the left-right direction, and the specific amount, these comparisons have the same timing May be performed. In the case of a configuration in which the estimated value and the value obtained from the speed information are sequentially compared for the movement amount in the front-rear direction, the movement amount in the left-right direction, and the specific amount, the order is not particularly limited. The order may be different from the order shown in FIG. In the present embodiment, the camera shift is determined based on the movement amount, but the camera shift may be determined based on the speed. In this case, the longitudinal and lateral velocities are estimated based on the movement amount estimated from the optical flow and the time between frames used for calculating the optical flow, and compared with the velocity of the vehicle 7 obtained from the vehicle speed sensor 41 The camera deviation may be determined by The speed of the vehicle 7 obtained from the vehicle speed sensor 41 in this case is the speed in the front-rear direction, and the speed in the left-right direction is zero. That is, in the present embodiment, the movement amount and the speed are synonymous.

なお、カメラずれが検出された場合、カメラずれ検出装置1は、そのことを運転者等に報知するための処理を行うことが好ましい。また、カメラずれ検出装置1は、車載カメラ21〜24からの情報を用いて運転支援を行う運転支援装置に、カメラずれが発生していることを通知する処理を行うことが好ましい。本実施形態では、4つの車載カメラ21〜24が存在するが、4つの車載カメラ21〜24のうちの1つでもカメラずれが発生した場合には、上記報知処理及び通知処理を行うことが好ましい。   In addition, when a camera shift is detected, it is preferable that the camera shift detection apparatus 1 perform a process for notifying the driver or the like of the fact. In addition, it is preferable that the camera shift detection device 1 perform a process of notifying the driving assistance device that performs driving assistance using information from the on-vehicle cameras 21 to 24 that a camera shift is occurring. In the present embodiment, there are four in-vehicle cameras 21-24, but it is preferable to perform the notification process and the notification process when camera displacement occurs even in one of the four in-vehicle cameras 21-24. .

<3.異常状態に関する処理>
図11は、車載カメラ21〜24で撮影される撮影画像Pの模式図である。図11に示すように、車載カメラ21〜24で撮影される撮影画像Pには、車両7(自車両)の影SHが映ることがある。例えば、日射方向が車両7の進行方向の後方から前方に向く場合、フロントカメラ21に車両7の影SHが映ることがある。図11に示すように、影SHが特徴点FPを抽出する所定領域RE内に入ると、導出部121が影SHに由来する特徴点FPを抽出することがある。影SHに由来する特徴点FPは車両7とともに移動するために、当該特徴点FPに基づくオプティカルフローOFの大きさはゼロとなり、車両7の動きを反映しない。
<3. Processing related to abnormal condition>
FIG. 11 is a schematic view of a photographed image P photographed by the on-vehicle cameras 21-24. As shown in FIG. 11, a shadow SH of the vehicle 7 (the host vehicle) may appear in the captured image P captured by the on-vehicle cameras 21 to 24. For example, when the solar radiation direction is forward from the rear of the traveling direction of the vehicle 7, the shadow SH of the vehicle 7 may be reflected on the front camera 21. As shown in FIG. 11, when the shadow SH falls within the predetermined region RE for extracting the feature point FP, the derivation unit 121 may extract the feature point FP derived from the shadow SH. Since the feature point FP derived from the shadow SH moves with the vehicle 7, the size of the optical flow OF based on the feature point FP is zero, and the movement of the vehicle 7 is not reflected.

すなわち、上述したオプティカルフローOFを用いたカメラずれの検出方法においては、外部センサ(例えば車速センサ41)に基づいて車両7が動いていると認識されるにもかかわらず移動量推定部122で取得される推定情報により車両7が停止していると推定される異常状態が生じる場合がある。この異常状態は、カメラずれが生じていない場合にも発生するために、カメラずれを誤検出する可能性がある。このために、判定部123は、異常状態が生じた場合に、車載カメラ21〜24のずれ判定処理を停止することが好ましい。これによれば、カメラずれが生じていないにもかかわらず、カメラずれが生じていると判定する誤判定の発生を抑制できる。   That is, in the above-described method for detecting a camera shift using the optical flow OF, the movement amount estimation unit 122 obtains the movement despite the fact that the vehicle 7 is moving based on an external sensor (for example, the vehicle speed sensor 41). The estimated information may cause an abnormal state in which it is estimated that the vehicle 7 is at a stop. Since this abnormal state occurs even when no camera shift has occurred, there is a possibility that the camera shift may be erroneously detected. For this reason, it is preferable that the determination unit 123 stop the shift determination process of the in-vehicle cameras 21 to 24 when an abnormal state occurs. According to this, it is possible to suppress the occurrence of an erroneous determination that it is determined that a camera shift has occurred although the camera shift has not occurred.

図12は、図3に示すカメラずれの検出フローとは異なる第1実施例を示すフローチャートである。なお、4つの車載カメラ21〜24のそれぞれについて、図12に示すカメラずれの検出フローが実施される。図12に示す例では、ステップS1からステップS7までは、図3に示す例と同じ処理が行われる。これらの処理は上述した処理と同一であるために、説明を省略する。図12に示す例では、ステップS7の移動量推定処理の後に、異常状態確認処理が行われる(ステップS21)。異常状態確認処理は、例えば判定部123によって行われるが、これに限らず、例えば移動量推定部122によって行われてもよい。   FIG. 12 is a flow chart showing a first embodiment different from the detection flow of camera misalignment shown in FIG. In addition, the detection flow of a camera offset shown in FIG. 12 is implemented about each of four vehicle-mounted cameras 21-24. In the example shown in FIG. 12, the same processing as the example shown in FIG. 3 is performed in steps S1 to S7. Since these processes are the same as the processes described above, the description will be omitted. In the example shown in FIG. 12, after the movement amount estimation process of step S7, an abnormal state confirmation process is performed (step S21). The abnormal state confirmation process is performed by, for example, the determination unit 123, but not limited to this, for example, may be performed by the movement amount estimation unit 122.

判定部123は、例えば車速センサ41から得られる速度情報に基づいて、オプティカルフローOFを導出するための2つの撮影画像の撮影時間間隔に、車両7が前後方向に移動したか否かを確認する。ただし、本実施形態では、オプティカルフローOFを導出するための撮影画像は、センサ部4から得られる情報によって車両7が前後方向に移動していることを検出した場合に行われるために、判定部123は、上述の車両7が前後方向に移動したか否かの確認は実質的に行われない。すなわち、判定部123は、移動量推定部122によって得られる前後方向の移動量推定値によって、車両7が停止していると推定されるか否かのみを確認する。判定部123は、車両7が停止していると推定される場合、異常状態を検出する。一方、判定部123は、車両7が停止していないと推定される場合、異常状態を検出しない。なお、前後方向の移動量推定値がゼロの場合のみならず、ゼロ近傍の場合にも、車両7が停止していると推定されてよい。   For example, based on the speed information obtained from the vehicle speed sensor 41, the determination unit 123 confirms whether or not the vehicle 7 has moved in the front-rear direction at the shooting time interval of two shot images for deriving the optical flow OF. . However, in the present embodiment, since the captured image for deriving the optical flow OF is detected when the vehicle 7 is moving in the front-rear direction according to the information obtained from the sensor unit 4, the determination unit In 123, confirmation of whether the above-mentioned vehicle 7 moved to the front-back direction is not performed substantially. That is, the determination unit 123 only confirms whether or not it is estimated that the vehicle 7 is stopped by the movement amount estimation value in the front-rear direction obtained by the movement amount estimation unit 122. When it is estimated that the vehicle 7 has stopped, the determination unit 123 detects an abnormal state. On the other hand, when it is estimated that the vehicle 7 is not stopped, the determination unit 123 does not detect an abnormal state. In addition, not only when the movement amount estimated value in the front-rear direction is zero, but also when it is near zero, it may be estimated that the vehicle 7 is stopped.

異常状態が検出されなかった場合(ステップS21でNo)、判定部123は、上述したステップS8のずれ判定処理を行う。一方、異常状態が検出された場合(ステップS21でYes)、判定部123は、ずれ判定処理を停止する(ステップS22)。すなわち、判定部123は、ずれ判定処理を行わない。なお、本実施形態では、車載カメラ21〜24は複数である。複数の車載カメラ21〜24のうち一部の車載カメラについて異常状態が生じている場合には、異常状態が生じていない残りの車載カメラについて、ずれ判定処理が行われる。これにより、複数の車載カメラ21〜24のカメラずれについて、効率良く検出することができる。   When an abnormal state is not detected (No in step S21), the determination unit 123 performs the shift determination process of step S8 described above. On the other hand, when an abnormal state is detected (Yes in step S21), the determination unit 123 stops the deviation determination process (step S22). That is, the determination unit 123 does not perform the deviation determination process. In the present embodiment, the in-vehicle cameras 21 to 24 are plural. When an abnormal state occurs in some of the plurality of on-vehicle cameras 21 to 24, the deviation determination process is performed on the remaining on-vehicle cameras in which the abnormal state does not occur. As a result, camera displacements of the plurality of on-vehicle cameras 21 to 24 can be efficiently detected.

カメラずれの判定処理が停止された後、ずれ判定処理の停止が継続されるか否かが確認される(ステップS23)。当該確認処理は、例えば判定部123によって行われる。詳細には、判定部123は、舵角センサ42から得られる情報によって車両7の進行方向を監視する。判定部123は、車両7の進行方向が一定である場合、ずれ判定処理の停止を継続すると判断する(ステップS23でYes)。判定部123は、車両7の進行方向が変わるまで、ステップS23の確認処理を繰り返す。判定部123は、車両7の進行方向が変化した場合、ずれ判定処理の停止を継続しないと判断する(ステップS23でNo)。換言すると、判定部123は、車両7の進行方向が変化するまで、ずれ判定処理の停止を継続する。なお、判定部123は、例えば、舵角センサ42から得られる情報によって車両7の進行方向が所定の角度以上変化したと判断される場合に、車両7が進行方向を変化したと判断する。   After the determination processing of the camera shift is stopped, it is checked whether the stop of the shift determination processing is continued (step S23). The confirmation process is performed by, for example, the determination unit 123. In detail, the determination unit 123 monitors the traveling direction of the vehicle 7 by the information obtained from the steering angle sensor 42. If the traveling direction of the vehicle 7 is constant, the determination unit 123 determines to continue stopping the deviation determination process (Yes in step S23). The determination unit 123 repeats the confirmation process of step S23 until the traveling direction of the vehicle 7 changes. When the traveling direction of the vehicle 7 changes, the determination unit 123 determines that the stop of the deviation determination process is not continued (No in step S23). In other words, the determination unit 123 continues stopping the deviation determination process until the traveling direction of the vehicle 7 changes. When it is determined that the traveling direction of the vehicle 7 has changed by a predetermined angle or more based on the information obtained from the steering angle sensor 42, for example, the determination unit 123 determines that the vehicle 7 has changed the traveling direction.

異常状態が車両7の影SHによって発生している場合、車両7の進行方向が一定であれば、再判定を行っても、車両7の影SHに起因する異常状態が再度検出される可能性が高い。このために、車両7の進行方向が変化するまで、ずれ判定処理の停止を継続することによって、異常状態が繰り返し検出されることを抑制できる。   When the abnormal state is caused by the shadow SH of the vehicle 7, if the traveling direction of the vehicle 7 is constant, the abnormal state caused by the shadow SH of the vehicle 7 may be detected again even if the determination is made again. Is high. Therefore, by continuing the stop of the deviation determination process until the traveling direction of the vehicle 7 changes, repeated detection of an abnormal state can be suppressed.

なお、上記例では、異常状態が1回検出された時点で、ずれ判定処理が停止される構成である。しかし、異常状態が複数回続けて検出された場合に、ずれ判定処理が停止される構成としてもよい。すなわち、判定部123は、異常状態が少なくとも1回検出された場合に、車両7の進行方向が変化するまでずれ判定処理の停止を継続してもよい。   In the above example, the deviation determination process is stopped when an abnormal state is detected once. However, the deviation determination process may be stopped when an abnormal state is detected a plurality of times in succession. That is, when an abnormal state is detected at least once, the determination unit 123 may continue stopping the deviation determination process until the traveling direction of the vehicle 7 changes.

また、車両7の進行方向は、例えば、舵角センサ42からの情報に替えてGPSセンサからの情報を用いて監視されてもよい。また、車両7の進行方向は、例えば、舵角センサ42からの情報に加えてGPSセンサからの情報も用いて監視されてよい。   In addition, the traveling direction of the vehicle 7 may be monitored using information from a GPS sensor instead of the information from the steering angle sensor 42, for example. In addition to the information from the steering angle sensor 42, for example, the traveling direction of the vehicle 7 may be monitored using information from a GPS sensor.

また、異常状態には、外部センサ(例えば車速センサ41)に基づいて車両7が動いていると認識されるにもかかわらず、導出部121で導出された複数のオプティカルフローOFの中に動きが無いと判断されるオプティカルフローOFが所定の割合以上存在する場合も含まれてよい。所定の割合は、実験やシミュレーション等によって適宜決定されてよい。車両7が動いているにもかかわらず、導出部121で導出された複数のオプティカルフローOFの中に動きが無いと判断されるオプティカルフローOFが多数存在する場合、移動量推定部122の移動量推定値の信頼性が低下し、誤ってカメラずれを検出する可能性が高くなる。本構成によれば、車両7の移動量推定値の信頼性が低いと予想される範囲を広げてカメラずれの判定を停止することができるために、カメラずれに関する誤判定が発生する可能性を低減できる。   Also, in the abnormal state, although it is recognized that the vehicle 7 is moving based on the external sensor (for example, the vehicle speed sensor 41), the movement is made in the plurality of optical flows OF derived by the deriving unit 121. There may also be included a case where there is a predetermined ratio or more of optical flows OF determined to be absent. The predetermined ratio may be appropriately determined by experiment, simulation or the like. When there are a large number of optical flows OF judged to have no movement among the plurality of optical flows OF derived by the deriving unit 121 although the vehicle 7 is moving, the movement amount of the movement amount estimating unit 122 The reliability of the estimate is reduced and the possibility of falsely detecting camera misalignment is increased. According to this configuration, since it is possible to widen the range where the reliability of the movement amount estimated value of the vehicle 7 is expected to be low and stop the determination of the camera shift, there is a possibility that an erroneous determination regarding the camera shift may occur. It can be reduced.

判定部123によってずれ判定処理の停止を継続しないと判断されると(ステップS23でNo)、ステップS1に戻って、所定のタイミングで撮影画像が取得されて導出部121によるオプティカルフローOFの導出処理が再開される。すなわち、車両7の進行方向が変化すると、進行方向の変化後に新たに取得された複数のオプティカルフローOFに基づいて、移動量推定部122による移動量推定と、判定部123によるずれ判定処理が行われる。これによれば、車両7の影SHが映っていない撮影画像を用いてオプティカルフローOFを導出できる可能性が高く、カメラずれに関する誤判定が生じる可能性を低減することができる。なお、図12に示す例では、新たに取得された複数のオプティカルフローOFに基づいて再度異常状態が検出された場合、ずれ判定処理は停止される。   If it is determined by the determination unit 123 that the stop of the deviation determination process is not continued (No in step S23), the process returns to step S1 and a photographed image is acquired at a predetermined timing and the derivation process of the optical flow OF by the derivation unit 121 Is resumed. That is, when the traveling direction of the vehicle 7 changes, movement amount estimation by the movement amount estimation unit 122 and deviation determination processing by the determination unit 123 are performed based on the plurality of optical flows OF newly acquired after the change of the movement direction. It will be. According to this, there is a high possibility that the optical flow OF can be derived using a captured image in which the shadow SH of the vehicle 7 is not reflected, and the possibility of an erroneous determination regarding camera shift can be reduced. In the example shown in FIG. 12, when the abnormal state is detected again based on a plurality of newly acquired optical flows OF, the deviation determination process is stopped.

図13は、図3に示すカメラずれの検出フローとは異なる第2実施例を示すフローチャートである。なお、4つの車載カメラ21〜24のそれぞれについて、図13に示すカメラずれの検出フローが実施される。図13に示す例でも、図12に示す例と同様に、ステップS1からステップS7までは、図3に示す例と同じ処理が行われる。また、図13に示す例でも、図12に示す例と同様に、ステップS7の移動量推定処理の後に、異常状態の確認処理が行われる(ステップS21)。異常状態の確認処理は、上述した処理と同じであるために説明を省略する。また、異常状態が検出されなかった場合(ステップS21でNo)の処理(ステップS8)も、上述の処理と同じであるために説明を省略する。   FIG. 13 is a flow chart showing a second embodiment different from the detection flow of camera misalignment shown in FIG. In addition, the detection flow of a camera offset shown in FIG. 13 is implemented about each of four vehicle-mounted cameras 21-24. Also in the example shown in FIG. 13, the same processing as the example shown in FIG. 3 is performed from step S1 to step S7 as in the example shown in FIG. Also in the example shown in FIG. 13, as in the example shown in FIG. 12, after the movement amount estimation process of step S7, an abnormal state confirmation process is performed (step S21). The process of confirming the abnormal state is the same as the process described above, and therefore the description thereof is omitted. Further, the process (step S8) in the case where an abnormal state is not detected (No in step S21) is also the same as the above-described process, and thus the description is omitted.

図13に示す例では、図12に示す例とは異なり、異常状態が検出された場合に(ステップS21でYes)、判定部123によるずれ判定処理が即座に停止されるのではなく、ずれ判定処理が停止されるか否かが確認される(ステップS24)。当該確認処理は、例えば判定部123によって行われる。   In the example shown in FIG. 13, unlike the example shown in FIG. 12, when an abnormal state is detected (Yes in step S21), the deviation determination processing by the determination unit 123 is not immediately stopped, but is determined It is confirmed whether the process is stopped (step S24). The confirmation process is performed by, for example, the determination unit 123.

詳細には、判定部123は、車両7(自車両)の影SHの位置が認識できるか否かを確認する。判定部123は、車両7の影SHの位置が認識できない場合、ずれ判定処理の停止を行うと判断する(ステップS24でYes)。一方、判定部123は、車両7の影SHの位置が認識できる場合、ずれ判定処理の停止を行わないと判断する(ステップS24でNo)。車両7の影SHの位置は、例えば、オプティカルフローOFを取得するために撮影された撮影画像のコントラストに基づいて判断される。この他、車両7の影SHの位置は、例えば、オプティカルフローOFを取得するために撮影された撮影画像の時刻、当該時刻における天気予報、通信バス50を介して取得される車両情報(例えば進行方向)等の、単数又は複数の情報によって判断されてもよい。   In detail, the determination unit 123 confirms whether or not the position of the shadow SH of the vehicle 7 (own vehicle) can be recognized. If the position of the shadow SH of the vehicle 7 can not be recognized, the determination unit 123 determines that the shift determination process is to be stopped (Yes in step S24). On the other hand, when the position of the shadow SH of the vehicle 7 can be recognized, the determination unit 123 determines that the shift determination process is not to be stopped (No in step S24). The position of the shadow SH of the vehicle 7 is determined based on, for example, the contrast of a captured image captured to obtain the optical flow OF. Besides, the position of the shadow SH of the vehicle 7 is, for example, the time of the photographed image taken to obtain the optical flow OF, the weather forecast at the time, vehicle information obtained via the communication bus 50 (for example It may be determined by one or more pieces of information such as direction).

ずれ判定処理を停止すると判断された場合(ステップS24でYes)、上述のステップS23が行われる。当該処理は、上述の処理と同じであるために説明を省略する。一方、ずれ判定処理を停止しないと判断された場合(ステップS24でNo)、特徴点抽出範囲を変更する処理が行われる(ステップS25)。   If it is determined that the deviation determination process is to be stopped (Yes in step S24), the above-described step S23 is performed. Since the said process is the same as the above-mentioned process, description is abbreviate | omitted. On the other hand, when it is determined that the shift determination process is not to be stopped (No in step S24), a process of changing the feature point extraction range is performed (step S25).

図14は、特徴点抽出範囲REの変更処理について説明するための模式図である。上述のように、ずれ判定処理を停止しないと判断される場合には、車両7の影SHの位置が認識できている。このために、オプティカルフローOFの導出にあたって、車両7の影SHの影響を受けない位置を特定することができる。このために、図14に示すように、車両7の影SHからずれた位置(影SHと重ならない位置)に、特徴点抽出範囲RE´が設定される。   FIG. 14 is a schematic diagram for explaining the process of changing the feature point extraction range RE. As described above, when it is determined that the deviation determination process is not to be stopped, the position of the shadow SH of the vehicle 7 can be recognized. Therefore, in deriving the optical flow OF, it is possible to specify a position which is not affected by the shadow SH of the vehicle 7. For this reason, as shown in FIG. 14, the feature point extraction range RE 'is set at a position shifted from the shadow SH of the vehicle 7 (a position not overlapping the shadow SH).

特徴点抽出位置RE´が設定されると、ステップS3に戻って、新たに設定した抽出範囲でオプティカルフローOFが導出され、当該オプティカルフローOFに基づいて、移動量推定部122による移動量推定と判定部123によるずれ判定処理とが行われる。なお、オプティカルフローOFを導出する撮影画像は、先に異常状態を検出するために用いられた撮影画像と同じである。   When the feature point extraction position RE 'is set, the process returns to step S3 and the optical flow OF is derived in the newly set extraction range, and the movement amount estimation by the movement amount estimation unit 122 is performed based on the optical flow OF. A shift determination process by the determination unit 123 is performed. The captured image for deriving the optical flow OF is the same as the captured image previously used to detect an abnormal state.

以上に説明したように、図13に示す例では、異常状態が生じた際に車両7の影SHの位置が認識できる場合には、判定部123によるずれ判定処理を停止せず、影SHからずれた範囲に位置する特徴点FPを用いて導出される複数のオプティカルフローOFに基づいて、移動量推定部122による移動量推定と判定部123によるずれ判定処理とが行われる。これによれば、ずれ判定処理を停止することなく、カメラずれの判定を適切に行うことができる。すなわち、迅速にカメラずれを検出することができる。   As described above, in the example illustrated in FIG. 13, when the position of the shadow SH of the vehicle 7 can be recognized when an abnormal state occurs, the shift determination processing by the determination unit 123 is not stopped, and The movement amount estimation by the movement amount estimation unit 122 and the deviation determination processing by the determination unit 123 are performed based on a plurality of optical flows OF derived using feature points FP located in the deviated range. According to this, it is possible to appropriately determine the camera shift without stopping the shift determination process. That is, camera shift can be detected quickly.

<4.変形例等>
<4−1.第1変形例>
以上においては、判定部123によって、カメラずれが生じていると一度判定されただけで、カメラずれが発生しているとの判定を確定し、カメラずれを検出する構成としている。これに限らず、判定部123によってカメラずれが生じていると判定された場合に、少なくとも1回、再判定を行い、再判定によって更にカメラずれが生じていると判定された場合に、カメラずれが発生しているとの判定を確定してもよい。再判定は、単純に、図3に示すステップS1〜S8を少なくとも1回繰り返す構成であってよいが、別の構成であってもよい。再判定は、図12や図13に示す異常状態を検出する手順が追加されたフローにも適用可能である。
<4. Modified example etc>
<4-1. First Modified Example>
In the above, the determination unit 123 determines that the camera shift has occurred only once it has been determined that the camera shift has occurred, and the camera shift is detected. The present invention is not limited to this. When it is determined by the determination unit 123 that a camera shift has occurred, redetermination is performed at least once, and when it is determined that another camera shift has occurred by redetermination, a camera shift It may be determined that the occurrence of The re-determination may simply be configured to repeat steps S1 to S8 illustrated in FIG. 3 at least once, but may be another configuration. The re-determination is also applicable to the flow to which the procedure for detecting an abnormal state shown in FIG. 12 or 13 is added.

図15は、カメラずれの再判定処理の一例について説明するための図である。図15においては特徴点の記載は省略されている。図15に示すように、判定部123は、画像の中心部Cを含む第1領域RE1内の特徴点のオプティカルフローを用いて推定された推定情報に基づいて車載カメラがずれていると判定した場合に、画像の中心部Cを含まない第2領域RE2内の特徴点のオプティカルフローを用いて求められた推定情報によって車載カメラのずれを再判定してよい。再判定で用いる画像は、先のカメラずれの判定に用いた画像と同じであってよいが、場合によっては、先のカメラずれの判定に用いた画像の撮影後に再度撮影された画像であってもよい。   FIG. 15 is a diagram for describing an example of the camera shift re-determination process. The description of the feature points is omitted in FIG. As illustrated in FIG. 15, the determination unit 123 determines that the on-vehicle camera is shifted based on the estimated information estimated using the optical flow of the feature point in the first region RE1 including the central portion C of the image. In this case, the displacement of the on-vehicle camera may be re-judged based on the estimated information obtained using the optical flow of the feature points in the second region RE2 not including the central portion C of the image. The image used in the redetermination may be the same as the image used in the previous determination of the camera shift, but in some cases it is an image captured again after the image used in the previous camera shift determination It is also good.

第2領域RE2は、1つでもよいが複数であってもよい。図15に示す例では、第2領域RE2は2つであるが3つ以上であってもよい。第2領域RE2が複数である場合、各第2領域RE2において、導出部121によるオプティカルフローOFの導出、移動量推定部122による移動量の推定情報の取得、および、判定部123によるカメラずれの判定が行われる。第2領域RE2は、第1領域RE1に比べて小さい領域であることが好ましい。   The second region RE2 may be one or plural. In the example shown in FIG. 15, the second region RE2 is two, but may be three or more. When there are a plurality of second areas RE2, in each second area RE2, derivation of the optical flow OF by the derivation unit 121, acquisition of estimated movement amount information by the movement amount estimation unit 122, and camera displacement by the determination unit 123 A determination is made. The second region RE2 is preferably a region smaller than the first region RE1.

車載カメラ21〜24のカメラずれが生じた場合、画像の中心部Cよりも中心部Cから離れた領域の方が、移動量推定部122によって得られる車両7の移動量と、車速センサ41等のセンサから得られる実測情報によって得られる車両7の移動量との差が大きくなり易い。このために、画像の中心部Cから離れて位置する第2領域RE2を用いた再判定を行うことによって、カメラずれの検出精度を向上することができる。   When the camera shift of the on-vehicle cameras 21 to 24 occurs, the moving amount of the vehicle 7 obtained by the moving amount estimating unit 122, the vehicle speed sensor 41, and the like in the region farther from the central portion C than the central portion C of the image. The difference between the amount of movement of the vehicle 7 and the amount of movement of the vehicle 7 obtained by the actual measurement information obtained from the sensor For this reason, by performing redetermination using the second region RE2 located away from the central portion C of the image, it is possible to improve the detection accuracy of the camera shift.

<4−2.第2変形例>
図16は、カメラずれ検出装置1によるカメラずれの検出フローの変形例を示すフローチャートである。図16に示すステップS1からステップS7の処理は、上述した図3に示す処理と同様であるために説明を省略する。本変形例では、ステップS7によって移動量の推定値を求めた後に、求めた移動量の推定値を先に求めた移動量の累積値に足し合わせる処理が行われる(ステップS9)。当該処理は、例えば移動量推定部122又は判定部123で行われてよい。なお、累積値算出処理は、前後方向の移動量の推定値、および、左右方向の移動量の推定値に対して行われる。また、第1回目の推定値が求められた際には、先に求めた累積値が無いために、累積値算出処理で得られる累積値は、ステップS7で取得した推定値そのものになる。
<4-2. Second Modified Example>
FIG. 16 is a flow chart showing a modification of the camera shift detection flow by the camera shift detection device 1. The processes in steps S1 to S7 shown in FIG. 16 are the same as the processes shown in FIG. In the present modification, after the estimated value of the movement amount is obtained in step S7, a process of adding the estimated value of the movement amount obtained to the cumulative value of the movement amounts obtained in advance is performed (step S9). The process may be performed by, for example, the movement amount estimation unit 122 or the determination unit 123. The accumulated value calculation process is performed on the estimated value of the movement amount in the front-rear direction and the estimated value of the movement amount in the left-right direction. In addition, when the first estimated value is obtained, the accumulated value obtained in the accumulated value calculation process becomes the estimated value itself obtained in step S7 because there is no previously obtained accumulated value.

累積値の算出が行われると、車両7の移動量が所定の移動距離に到達したか否かが確認される(ステップS10)。本変形例では、ここで言う車両7の移動量は、オプティカルフローOFを導出するための2つの画像の撮影時間間隔に車両7が前後方向に移動する量を積算したものである。車両7の前後方向の移動量は、車速センサ41によって得られる速度情報から算出される。当該移動量の積算の開始は、推定値の累積処理の開始に合わせて行われる。車両7の前後方向の移動量が所定の移動距離に到達しない場合(ステップS10でNo)、ステップS1に戻って、ステップS1〜ステップS7およびステップS9が順次行われる。   When the cumulative value is calculated, it is checked whether the movement amount of the vehicle 7 has reached a predetermined movement distance (step S10). In this modification, the amount of movement of the vehicle 7 referred to here is obtained by integrating the amount of movement of the vehicle 7 in the front-rear direction at the photographing time interval of the two images for deriving the optical flow OF. The amount of movement of the vehicle 7 in the front-rear direction is calculated from the speed information obtained by the vehicle speed sensor 41. The start of integration of the movement amount is performed at the start of the accumulation processing of the estimated value. If the amount of movement of the vehicle 7 in the front-rear direction does not reach the predetermined movement distance (No in step S10), the process returns to step S1, and steps S1 to S7 and step S9 are sequentially performed.

一方、車両7の前後方向の移動量が所定の移動距離に到達すると(ステップS10でYes)、判定部123によってカメラずれの判定が行われる(ステップS8A)。判定部123は、移動量の推定値として累積値を用いる。本実施形態では、累積値には、前後方向の累積値と、左右方向の累積値とが存在する。比較対象となる値は、オプティカルフローOFを導出するための2つの画像の撮影時間間隔に車両7が移動する量を積算したもので、車速センサ41によって得られる速度情報から算出される。当該値には、前後方向の移動量と、左右方向の移動量とが存在する。ただし、本変形例では、車両7が前後方向に直進している場合にオプティカルフローOFを導出するための撮影画像を撮影する構成であるために、この間に車両7は左右方向に移動しておらず、左右方向の移動量(左右方向の累積値と比較する比較値)はゼロである。   On the other hand, when the movement amount of the vehicle 7 in the front-rear direction reaches a predetermined movement distance (Yes in step S10), the determination unit 123 determines the camera shift (step S8A). The determination unit 123 uses an accumulated value as the estimated value of the movement amount. In the present embodiment, the accumulated value includes an accumulated value in the front-rear direction and an accumulated value in the left-right direction. The value to be compared is a value obtained by integrating the amount of movement of the vehicle 7 at the photographing time interval of the two images for deriving the optical flow OF, and is calculated from the speed information obtained by the vehicle speed sensor 41. The values include the amount of movement in the front-rear direction and the amount of movement in the left-right direction. However, in this modification, since the photographed image for deriving the optical flow OF is photographed when the vehicle 7 travels straight in the front-rear direction, the vehicle 7 moves in the left-right direction during this period. The movement amount in the left and right direction (a comparison value to be compared with the accumulated value in the left and right direction) is zero.

本変形例では、車両7の移動量が所定距離に到達するまで移動量推定部122で得られた推定値を足し合わせて累積値を求める処理が行われ、判定部123は、車両の移動量が所定距離に到達した時点で累積値に基づいて車載カメラのずれを判定する。これによれば、カメラずれが生じている場合に、推定値と、実測情報から得られる値との差が明確に表れるタイミングでずれ判定を行うことができ、ずれ判定の信頼性を向上することができる。なお、本変形例の構成は、図12や図13に示す異常状態を検出する手順が追加されたフローにも適用可能である。   In this modification, the process of adding the estimated values obtained by the movement amount estimation unit 122 and obtaining the cumulative value is performed until the movement amount of the vehicle 7 reaches a predetermined distance, and the determination unit 123 performs the movement amount of the vehicle When it reaches a predetermined distance, the shift of the on-vehicle camera is determined based on the accumulated value. According to this, when camera shift has occurred, shift determination can be performed at the timing at which the difference between the estimated value and the value obtained from the actual measurement information appears clearly, and the reliability of shift determination can be improved. Can. The configuration of the present modification is also applicable to the flow to which the procedure for detecting an abnormal state shown in FIG. 12 or 13 is added.

<4−3.第3変形例>
図17は、変形例のカメラずれ検出装置1Aの構成を示すブロック図である。カメラずれ検出装置1Aは、影位置推定部124を更に備える点で、以上に示した実施形態と異なる。影位置推定部124は、制御部12のCPUが記憶部13に記憶されるプログラムに従ってCPUが演算処理を行うことによって実現される機能部である。影位置推定部124は、車両7(自車両)の影位置を推定する。
<4-3. Third Modified Example>
FIG. 17 is a block diagram showing a configuration of a camera shift detection device 1A of a modification. The camera shift detection device 1A differs from the embodiment described above in that the camera shift detection device 1A further includes the shadow position estimation unit 124. The shadow position estimation unit 124 is a functional unit realized by the CPU performing arithmetic processing according to a program stored in the storage unit 13 by the CPU of the control unit 12. The shadow position estimation unit 124 estimates the shadow position of the vehicle 7 (own vehicle).

なお、影位置の推定は、例えば、時刻、季節、天候、車両7の進行方向等に基づいて行われてよい。季節や天候に関する情報は、例えば、インターネット等を介してサーバ装置等から取得してよい。また、車両7の進行方向については、例えば通信バス50を介して舵角センサ42から得られる情報に基づいて取得してよい。   The shadow position may be estimated based on, for example, time, season, weather, the traveling direction of the vehicle 7, or the like. Information on the season and the weather may be acquired from, for example, a server apparatus or the like via the Internet or the like. In addition, the traveling direction of the vehicle 7 may be acquired based on information obtained from the steering angle sensor 42 via the communication bus 50, for example.

図18は、変形例のカメラずれ検出装置1Aによるカメラずれの検出フローの一例を示すフローチャートである。カメラずれ検出装置1Aにおいても、図3に示した例と同様に、ステップS1とステップS2とが実行され、車両7が低速で直進走行する場合にオプティカルフローOFを導出するための撮影画像が撮影される。当該撮影画像が撮影されると、影位置推定部124によって影位置の推定が行われる(ステップS31)。   FIG. 18 is a flow chart showing an example of a camera shift detection flow by the camera shift detection device 1A of the modification. Also in the camera shift detection device 1A, steps S1 and S2 are executed similarly to the example shown in FIG. 3, and when the vehicle 7 travels straight at a low speed, the captured image for deriving the optical flow OF is captured Be done. When the photographed image is photographed, the shadow position estimation unit 124 estimates a shadow position (step S31).

影位置の推定が行われると、導出部121は、推定された影位置に基づいて特徴点FPの抽出範囲を設定する(ステップS31)。詳細には、導出部121は、推定された影位置からずれた位置(影位置と重ならない位置)に特徴点FPの抽出範囲を設定する。この後、上述した図3、図12、図13、又は図16で示すステップS3以降が実行される。
これによれば、影SHによる影響によってオプティカルフローOFに基づく車両7の移動量推定値が不正確になる可能性を低減することができ、カメラずれの判定を迅速且つ適切に行うことができる。
When the shadow position is estimated, the derivation unit 121 sets the extraction range of the feature point FP based on the estimated shadow position (step S31). Specifically, the derivation unit 121 sets the extraction range of the feature point FP at a position deviated from the estimated shadow position (a position not overlapping the shadow position). After this, step S3 and subsequent steps shown in FIG. 3, FIG. 12, FIG. 13, or FIG. 16 described above are executed.
According to this, it is possible to reduce the possibility that the movement amount estimated value of the vehicle 7 based on the optical flow OF becomes inaccurate due to the influence of the shadow SH, and it is possible to quickly and appropriately determine the camera shift.

<4−4.その他>
本明細書における実施形態や変形例の構成は、本発明の例示にすぎない。実施形態や変形例の構成は、本発明の技術的思想を超えない範囲で適宜変更されてもよい。また、複数の実施形態及び変形例は、可能な範囲で組み合わせて実施されてよい。
<4-4. Other>
The configurations of the embodiments and modifications in the present specification are merely examples of the present invention. The configurations of the embodiment and the modifications may be appropriately changed without departing from the technical concept of the present invention. Moreover, several embodiment and modification may be implemented in combination as much as possible.

以上においては、車載カメラ21〜24のずれ判定に用いるデータは、車両7が直進走行している場合に収集される構成とした。ただし、これは例示であり、車載カメラ21〜24のずれ判定に用いるデータは、車両7が直進走行していない場合に収集されてもよい。車速センサ41から得られる速度情報と舵角センサ42から得られる情報とを用いれば、車両7の前後方向および左右方向の実際の移動量を正確に求めることができるために、車両7が直進走行していない場合でも上述のずれ判定を行うことができる。   In the above, the data used for the shift determination of the on-vehicle cameras 21 to 24 is configured to be collected when the vehicle 7 is traveling straight. However, this is an example, and data used for shift judgment of in-vehicle cameras 21-24 may be collected when vehicles 7 do not go straight on. By using the speed information obtained from the vehicle speed sensor 41 and the information obtained from the steering angle sensor 42, it is possible to accurately obtain the actual amount of movement of the vehicle 7 in the longitudinal and lateral directions. The above-described deviation determination can be performed even when not being performed.

また、以上においては、移動量推定部122は、前後方向の移動量の推定値と、左右方向の移動量の推定値とを求める構成としたが、いずれか一方だけを求める構成としてもよい。ただし、いずれか一方だけの推定値を求める構成とする場合には、移動量推定部122は、前後方向の移動量の推定値のみを求めることが好ましい。この場合、例えば、判定部123は、前後方向の移動量について、移動量推定部122で得られる推定値と、センサ部4で取得される実測情報から得られる値とを比較してカメラずれの判定を行ってよい。   In the above, the movement amount estimation unit 122 is configured to obtain the estimated value of the movement amount in the front-rear direction and the estimated value of the movement amount in the left-right direction. However, only one of them may be obtained. However, in a configuration in which only one of the estimated values is obtained, it is preferable that the movement amount estimation unit 122 obtain only the estimated value of the movement amount in the front-rear direction. In this case, for example, the determination unit 123 compares the estimated value obtained by the movement amount estimation unit 122 with the value obtained from the actual measurement information acquired by the sensor unit 4 with respect to the movement amount in the front-rear direction, You may make a decision.

1、1A・・・カメラずれ検出装置
7・・・車両
21・・・フロントカメラ(車載カメラ)
22・・・バックカメラ(車載カメラ)
23・・・左サイドカメラ(車載カメラ)
24・・・右サイドカメラ(車載カメラ)
41・・・車速センサ(外部センサ)
42・・・舵角センサ(外部センサ)
121・・・導出部
122・・・移動量推定部
123・・・判定部
124・・・影位置推定部
FP・・・特徴点
OF・・・オプティカルフロー
1, 1A: camera deviation detection device 7: vehicle 21: front camera (vehicle-mounted camera)
22 · · · back camera (vehicle-mounted camera)
23 ··· Left side camera (vehicle-mounted camera)
24 ··· Right side camera (vehicle-mounted camera)
41 ... vehicle speed sensor (external sensor)
42 · · · rudder angle sensor (external sensor)
121: Derivation unit 122: Movement amount estimation unit 123: Judgment unit 124: Shadow position estimation unit FP: Feature point OF: Optical flow

Claims (8)

移動体に搭載されるカメラの取付けのずれを検出するカメラずれ検出装置であって、
前記カメラによって所定時間をおいて入力された2つの画像間における特徴点の動きであるオプティカルフローを前記特徴点ごと導出する導出部と、
複数の前記オプティカルフローに基づいて前記カメラを搭載する移動体の移動量を推定する移動量推定部と、
前記移動量推定部で得られた推定情報と、前記カメラ以外の外部センサから入力される前記移動体の移動に関わる実測情報とに基づいて前記カメラのずれを判定する判定部と、
を備え、
前記判定部は、前記外部センサに基づいて前記移動体が動いていると認識されるにもかかわらず前記推定情報により前記移動体が停止していると推定される異常状態が生じた場合に、前記カメラのずれ判定処理を停止する、カメラずれ検出装置。
A camera shift detection device for detecting a shift in mounting of a camera mounted on a moving body, comprising:
A derivation unit that derives an optical flow, which is the movement of a feature point between two images input with a predetermined time by the camera, for each feature point;
A movement amount estimation unit configured to estimate a movement amount of a moving object equipped with the camera based on a plurality of the optical flows;
A determination unit that determines the displacement of the camera based on the estimation information obtained by the movement amount estimation unit and the measurement information related to the movement of the moving object input from an external sensor other than the camera;
Equipped with
The determination unit is configured to detect an abnormal state in which the moving object is estimated to be stopped based on the estimation information despite the fact that the moving object is recognized as moving based on the external sensor. A camera shift detection device for stopping the shift determination process of the camera.
前記異常状態には、前記外部センサに基づいて前記移動体が動いていると認識されるにもかかわらず、前記導出部で導出された複数の前記オプティカルフローの中に動きが無いと判断される前記オプティカルフローが所定の割合以上存在する場合も含まれる、請求項1に記載のカメラずれ検出装置。   In the abnormal state, it is determined that there is no movement in the plurality of optical flows derived by the deriving unit although the moving body is recognized as moving based on the external sensor. The camera shift detector according to claim 1, wherein the case where the optical flow is present at a predetermined rate or more is also included. 前記判定部は、前記異常状態が少なくとも1回検出された場合に、前記移動体の進行方向が変化するまで前記ずれ判定処理の停止を継続する、請求項1又は2に記載のカメラずれ検出装置。   The camera shift detection device according to claim 1, wherein the determination unit continues stopping the shift determination process until the traveling direction of the moving body changes when the abnormal state is detected at least once. . 前記移動体の進行方向が変化すると、前記進行方向の変化後に新たに取得された複数の前記オプティカルフローに基づいて、前記移動量推定部による移動量推定と前記判定部による前記ずれ判定処理とが行われる、請求項3に記載のカメラずれ検出装置。   When the moving direction of the moving body changes, movement amount estimation by the movement amount estimation unit and the deviation determination processing by the determination unit are performed based on the plurality of optical flows newly acquired after the change of the movement direction. The camera shift detection device according to claim 3, which is performed. 前記異常状態が生じた際に前記移動体の影の位置が認識できる場合には、前記ずれ判定処理が停止されず、前記影からずれた範囲に位置する前記特徴点を用いて導出される複数の前記オプティカルフローに基づいて、前記移動量推定部による移動量推定と前記判定部による前記ずれ判定処理とが行われる、請求項1から4のいずれか1項に記載のカメラずれ検出装置。   When the position of the shadow of the moving body can be recognized when the abnormal state occurs, the displacement determination process is not stopped, and a plurality of the features are derived using the feature points located in the range shifted from the shadow. The camera displacement detection device according to any one of claims 1 to 4, wherein the movement amount estimation by the movement amount estimation unit and the deviation determination processing by the determination unit are performed based on the optical flow. 前記カメラが複数あり、複数の前記カメラのうち一部の前記カメラについて前記異常状態が生じている場合には、
前記異常状態が生じていない残りの前記カメラについて、前記ずれ判定処理が行われる、請求項1から5のいずれか1項に記載のカメラずれ検出装置。
When there are a plurality of the cameras and the abnormal state occurs in some of the plurality of cameras,
The camera shift detection device according to any one of claims 1 to 5, wherein the shift determination process is performed on the remaining cameras in which the abnormal state has not occurred.
前記移動体の影位置を推定する影位置推定部を更に備え、
前記導出部は、推定された前記影位置に基づいて前記特徴点の抽出範囲を設定する、請求項1から6のいずれか1項に記載のカメラずれ検出装置。
It further comprises a shadow position estimation unit for estimating the shadow position of the moving body,
The camera deviation detection device according to any one of claims 1 to 6, wherein the derivation unit sets an extraction range of the feature point based on the estimated shadow position.
移動体に搭載されるカメラの取付けずれを検出するカメラずれ検出方法であって、
前記カメラによって所定時間をおいて入力された2つの画像間における特徴点の動きであるオプティカルフローを前記特徴点ごとに導出する導出工程と、
複数の前記オプティカルフローに基づいて前記カメラを搭載する移動体の移動量を推定する推定工程と、
前記推定工程で得られた推定情報と、前記カメラ以外のセンサから入力される前記移動体の移動に関わる実測情報とに基づいて前記カメラのずれを判定する判定工程と、
を備え、
前記センサに基づいて前記移動体が動いていると認識されるにもかかわらず前記推定工程で前記移動体が停止していると推定される異常状態が生じた場合に、前記判定工程における前記カメラのずれ判定処理が停止される、カメラずれ検出方法。
A camera shift detection method for detecting a mount shift of a camera mounted on a moving body, comprising:
A derivation step of deriving, for each feature point, an optical flow that is a motion of the feature point between two images input with a predetermined time by the camera;
Estimating an amount of movement of a mobile unit on which the camera is mounted based on a plurality of the optical flows;
A determination step of determining the deviation of the camera based on the estimation information obtained in the estimation step and the measurement information related to the movement of the moving object input from a sensor other than the camera;
Equipped with
The camera in the determination step when an abnormal state occurs in which it is estimated that the moving body is stopped in the estimation step despite the fact that the moving body is recognized to be moving based on the sensor. A camera shift detection method in which the shift determination process is stopped.
JP2017253756A 2017-12-28 2017-12-28 Camera misalignment detection device and camera misalignment detection method Active JP6986962B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2017253756A JP6986962B2 (en) 2017-12-28 2017-12-28 Camera misalignment detection device and camera misalignment detection method
US16/137,011 US10657654B2 (en) 2017-12-28 2018-09-20 Abnormality detection device and abnormality detection method
DE102018216144.5A DE102018216144A1 (en) 2017-12-28 2018-09-21 Anomaly Detection Device and Anomaly Detection Method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017253756A JP6986962B2 (en) 2017-12-28 2017-12-28 Camera misalignment detection device and camera misalignment detection method

Publications (2)

Publication Number Publication Date
JP2019121032A true JP2019121032A (en) 2019-07-22
JP6986962B2 JP6986962B2 (en) 2021-12-22

Family

ID=67307844

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017253756A Active JP6986962B2 (en) 2017-12-28 2017-12-28 Camera misalignment detection device and camera misalignment detection method

Country Status (1)

Country Link
JP (1) JP6986962B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021059765A1 (en) * 2019-09-26 2021-04-01 ソニー株式会社 Imaging device, image processing system, image processing method and program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015175635A (en) * 2014-03-13 2015-10-05 ヤマハ発動機株式会社 Distance estimation system and vehicle including the same
JP2016038261A (en) * 2014-08-06 2016-03-22 株式会社デンソー Object recognition device
JP2016042288A (en) * 2014-08-18 2016-03-31 株式会社デンソー Object recognition device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015175635A (en) * 2014-03-13 2015-10-05 ヤマハ発動機株式会社 Distance estimation system and vehicle including the same
JP2016038261A (en) * 2014-08-06 2016-03-22 株式会社デンソー Object recognition device
JP2016042288A (en) * 2014-08-18 2016-03-31 株式会社デンソー Object recognition device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021059765A1 (en) * 2019-09-26 2021-04-01 ソニー株式会社 Imaging device, image processing system, image processing method and program

Also Published As

Publication number Publication date
JP6986962B2 (en) 2021-12-22

Similar Documents

Publication Publication Date Title
US10657654B2 (en) Abnormality detection device and abnormality detection method
JP2019191806A (en) Abnormality detection device and abnormality detection method
JP5421072B2 (en) Approaching object detection system
JP2019191807A (en) Abnormality detection device and abnormality detection method
JP5065210B2 (en) Lane recognition device
KR20110047505A (en) Apparaus and Method for Detecting Slip of a Mobile Robot
US20200090347A1 (en) Apparatus for estimating movement information
JP6302519B2 (en) Vehicle driving support device
JP6407447B1 (en) Traveling path recognition device and traveling path recognition method
JP2019219719A (en) Abnormality detection device and abnormality detection method
JP2020060531A (en) Abnormal detector, abnormality detection system, and method for detecting abnormality
JP7256734B2 (en) Posture estimation device, anomaly detection device, correction device, and posture estimation method
JP7009209B2 (en) Camera misalignment detection device, camera misalignment detection method and abnormality detection device
JP2019191808A (en) Abnormality detection device and abnormality detection method
JP6564127B2 (en) VISUAL SYSTEM FOR AUTOMOBILE AND METHOD FOR CONTROLLING VISUAL SYSTEM
JP6590988B1 (en) Lane marking recognition system
JP5107154B2 (en) Motion estimation device
JP6986962B2 (en) Camera misalignment detection device and camera misalignment detection method
JP6314655B2 (en) Marking line detection device, marking line detection method
JP6981881B2 (en) Camera misalignment detection device and camera misalignment detection method
US20160021313A1 (en) Image Processing Apparatus
JP5821687B2 (en) Vehicle detection device and vehicle detection method
US20190362164A1 (en) Image recognition device, image recognition method, and parking assist system
JP2017102634A (en) Image processing apparatus and image processing system
JP6974192B2 (en) Camera misalignment detection device and camera misalignment detection method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200930

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211130

R150 Certificate of patent or registration of utility model

Ref document number: 6986962

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150