JP7237773B2 - Posture estimation device, anomaly detection device, correction device, and posture estimation method - Google Patents

Posture estimation device, anomaly detection device, correction device, and posture estimation method Download PDF

Info

Publication number
JP7237773B2
JP7237773B2 JP2019152640A JP2019152640A JP7237773B2 JP 7237773 B2 JP7237773 B2 JP 7237773B2 JP 2019152640 A JP2019152640 A JP 2019152640A JP 2019152640 A JP2019152640 A JP 2019152640A JP 7237773 B2 JP7237773 B2 JP 7237773B2
Authority
JP
Japan
Prior art keywords
time
feature point
captured
captured image
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019152640A
Other languages
Japanese (ja)
Other versions
JP2021032677A (en
Inventor
隆幸 小笹
康司 大西
直士 垣田
輝彦 上林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso 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 JP2019152640A priority Critical patent/JP7237773B2/en
Publication of JP2021032677A publication Critical patent/JP2021032677A/en
Application granted granted Critical
Publication of JP7237773B2 publication Critical patent/JP7237773B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Description

本発明は、カメラの姿勢を推定する姿勢推定装置、カメラの異常を検出する異常検出装置、カメラのパラメータを補正する補正装置、および、カメラの姿勢を推定する姿勢推定方法に関する。 The present invention relates to a posture estimation device for estimating the posture of a camera, an anomaly detection device for detecting anomalies in a camera, a correction device for correcting camera parameters, and a posture estimation method for estimating the posture of a camera.

従来、車載カメラを用いて、例えば車両の駐車支援等の運転支援が行われている。車載カメラは、車両を工場から出荷する前に、車両に固定状態で取り付けられる。しかしながら、車載カメラは、例えば不意の接触や経年変化等によって、工場出荷時の取付状態から位置ずれを起こすことがある。車載カメラの位置(車両のボディに対する車載カメラの相対位置)がずれると、カメラ画像を利用して判断されるハンドルの操舵量等に誤差が生じるために、車載カメラの位置ずれを検出することは重要である。 2. Description of the Related Art Conventionally, vehicle-mounted cameras are used to provide driving assistance such as parking assistance for vehicles. An on-board camera is fixedly attached to a vehicle before the vehicle leaves the factory. However, the on-vehicle camera may be displaced from the mounting state at the time of shipment from the factory due to, for example, accidental contact or aging. If the position of the in-vehicle camera (relative position of the in-vehicle camera to the vehicle body) shifts, an error will occur in the amount of steering wheel steering determined using the camera image. is important.

特許文献1には、車載カメラの光軸ずれを検出する技術が開示される。特許文献1における車載カメラの光軸ずれ検出装置は、画像処理手段と判断手段とを備える。画像処理手段は、運転支援する車体部上のマーキングを含む範囲を撮影する車載カメラの撮影画像から該マーキングの位置情報を検出する。判断手段は、初期設定されたマーキング位置情報と、新たに検出されたマーキングの位置情報とを比較することにより、撮影光軸ずれを判断する。 Patent Literature 1 discloses a technique for detecting optical axis deviation of a vehicle-mounted camera. The optical axis deviation detection device for an on-vehicle camera in Patent Document 1 includes image processing means and determination means. The image processing means detects the position information of the marking from the captured image of the vehicle-mounted camera that captures the range including the marking on the vehicle body for driving assistance. The judging means judges the misalignment of the photographing optical axis by comparing the initially set marking position information and the newly detected marking position information.

特開2004-173037号公報JP 2004-173037 A

車載カメラの撮影画像には、車両周囲の風景等が映るために、例えばマーキングがボンネットの一部の特定形状である場合、当該特定形状を簡単に抽出できないことがある。当該特定形状が誤検出されると、車載カメラの光軸ずれが正確に判断されない可能性がある。なお、車載カメラの光軸ずれとは、車載カメラの姿勢が設計通りでないことを意味している。 Since the captured image of the on-vehicle camera shows the scenery around the vehicle, for example, when the marking is a specific shape of a part of the hood, the specific shape may not be easily extracted. If the specific shape is erroneously detected, there is a possibility that the misalignment of the optical axis of the in-vehicle camera may not be accurately determined. It should be noted that the deviation of the optical axis of the vehicle-mounted camera means that the posture of the vehicle-mounted camera is not as designed.

本発明は、上記課題に鑑みて、カメラの姿勢を精度良く推定できるとともに、姿勢推定に用いる特徴点の位置に依存して姿勢推定の精度が低下することを抑制できる技術を提供することを目的とする。 SUMMARY OF THE INVENTION In view of the above problems, it is an object of the present invention to provide a technique capable of estimating the pose of a camera with high accuracy and suppressing a decrease in pose estimation accuracy that depends on the positions of feature points used for pose estimation. and

本発明の一局面に係る姿勢推定装置は、移動体に搭載されたカメラで撮影された撮影画像を取得する取得部と、第1時刻と前記第1時刻より後の第2時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出し、前記第1時刻以後の第3時刻と前記第3時刻より後の第4時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出する抽出部と、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上離れていると推定できる場合に、前記第1時刻と前記第2時刻で撮影された2つの前記撮影画像から抽出された特徴点から、互いに対応する前記第1特徴点を選定し、前記第1特徴点の位置変化を算出し、前記第3時刻と前記第4時刻で撮影された2つの前記撮影画像から抽出された特徴点から、前記第1特徴点とは異なり、互いに対応する前記第2特徴点を選定し、前記第2特徴点の位置変化を算出し、前記第1特徴点の位置変化及び前記第2特徴点の位置変化に基づき、所定の平面との交線が互いに平行となる面の組を2組特定する特定部と、前記特定部で特定した面の組に基づき前記カメラの姿勢を推定する推定部と、を備える構成(第1の構成)である。 A posture estimation apparatus according to one aspect of the present invention includes an acquisition unit that acquires a captured image captured by a camera mounted on a mobile object, and an image captured at a first time and at a second time after the first time. Extracting feature points from each of the two captured images, and extracting feature points from each of the two captured images captured at a third time after the first time and at a fourth time after the third time. and when it can be estimated that the real-world position of the first feature point and the real-world position of the second feature point are separated by a first predetermined distance or more in a predetermined direction, the first time and the Selecting the first feature points corresponding to each other from the feature points extracted from the two captured images captured at the second time, calculating the positional change of the first feature points, calculating the third time and the Different from the first feature points, the second feature points corresponding to each other are selected from the feature points extracted from the two captured images captured at a fourth time, and positional changes of the second feature points are selected. a specifying unit that calculates and specifies two sets of planes whose intersection lines with a predetermined plane are parallel to each other based on the positional change of the first feature point and the positional change of the second feature point; and an estimating unit that estimates the orientation of the camera based on the set of planes specified in (1).

なお、上記第1の構成及び後述する他の構成において、前記第1時刻で撮影された前記撮影画像と前記第3時刻で撮影された前記撮影画像が同一の画像であり前記第2時刻で撮影された前記撮影画像と前記第4時刻で撮影された前記撮影画像が同一の画像であってもよく、前記第1時刻で撮影された前記撮影画像と前記第3時刻で撮影された前記撮影画像が異なる画像であり前記第2時刻で撮影された前記撮影画像と前記第4時刻で撮影された前記撮影画像が異なる画像であってもよい。 In addition, in the first configuration and other configurations described later, the captured image captured at the first time and the captured image captured at the third time are the same image, and the captured image is captured at the second time. The photographed image taken at the fourth time and the photographed image photographed at the fourth time may be the same image, and the photographed image photographed at the first time and the photographed image photographed at the third time may be different images, and the captured image captured at the second time and the captured image captured at the fourth time may be different images.

上記第1の構成の姿勢推定装置において、前記特定部は、前記第1特徴点の実世界上の位置と前記第2特徴点の実世界上の位置とが前記所定の方向において前記第1所定距離未満しか離れていないと推定できる場合に、前記所定の平面との交線が互いに平行となる面の組を特定しない構成(第2の構成)であってもよい。 In the posture estimation device having the first configuration, the specifying unit determines that the real-world position of the first feature point and the real-world position of the second feature point are in the first predetermined direction in the predetermined direction. In the case where it can be estimated that they are separated by less than a distance, a configuration (second configuration) that does not specify a set of planes whose lines of intersection with the predetermined plane are parallel to each other may be employed.

上記第1の構成の姿勢推定装置において、前記抽出部は、実世界上で前記所定の方向に沿って並ぶ複数の領域を前記撮影画像内に設定し、互いに前記撮影画像内の異なる位置に設定された2つの前記領域の一方から前記第1特徴点を抽出し、他方から前記第2特徴点を抽出し、前記特定部は、前記第1特徴点の実世界上の位置と前記第2特徴点の実世界上の位置とが前記所定の方向において前記第1所定距離以上離れていると推定する構成(第3の構成)であってもよい。 In the posture estimation device having the first configuration, the extracting unit sets a plurality of regions aligned in the predetermined direction in the real world within the captured image, and sets them at different positions within the captured image. The first feature point is extracted from one of the two regions and the second feature point is extracted from the other. A configuration (a third configuration) may be used in which it is estimated that the position of the point on the real world is separated by the first predetermined distance or more in the predetermined direction.

上記第1又は第2の構成の姿勢推定装置において、前記特定部は、前記第1時刻で撮影された前記撮影画像上での前記第1特徴点の位置と前記第3時刻で撮影された前記撮影画像上での前記第2特徴点の位置との少なくとも一方、及び、前記第1時刻で撮影された前記撮影画像上での前記第1特徴点の位置と前記第3時刻で撮影された前記撮影画像上での前記第2特徴点の位置との距離に基づき、並びに/又は、前記第2時刻で撮影された前記撮影画像上での前記第1特徴点の位置と前記第4時刻で撮影された前記撮影画像上での前記第2特徴点の位置との少なくとも一方、及び、前記第2時刻で撮影された前記撮影画像上での前記第1特徴点の位置と前記第4時刻で撮影された前記撮影画像上での前記第2特徴点の位置との距離に基づき、前記第1特徴点の実世界上の位置と前記第2特徴点の実世界上の位置とが前記所定の方向において前記第1所定距離以上離れているか否かを推定する構成(第4の構成)であってもよい。 In the posture estimation device having the first or second configuration described above, the specifying unit performs the position of the first feature point on the captured image captured at the first time and the position of the first feature point captured at the third time. At least one of the position of the second feature point on the captured image, and the position of the first feature point on the captured image captured at the first time and the position of the first feature point captured at the third time based on the distance from the position of the second feature point on the captured image and/or at the position of the first feature point on the captured image captured at the second time and at the fourth time and/or the position of the first feature point on the captured image captured at the second time and the position of the first feature point on the captured image captured at the fourth time. the position of the first feature point in the real world and the position of the second feature point in the real world based on the distance from the position of the second feature point on the photographed image obtained in the predetermined direction; may be a configuration (fourth configuration) for estimating whether or not the distance is greater than or equal to the first predetermined distance.

上記第1~第4いずれかの構成の姿勢推定装置において、前記特定部は、前記第1特徴点の実世界上の位置と前記第2特徴点の実世界上の位置とが前記所定の方向において前記第1所定距離以上離れていると推定できても、前記第1特徴点の実世界上の位置と前記第2特徴点の実世界上の位置とが前記所定の方向において前記第1所定距離より長い第2所定距離以上離れていると推定できる場合には、前記所定の平面との交線が互いに平行となる面の組を特定しない構成(第5の構成)であってもよい。 In the posture estimation device having any one of the first to fourth configurations, the identifying unit determines that the real-world position of the first feature point and the real-world position of the second feature point are aligned in the predetermined direction. , the position of the first feature point in the real world and the position of the second feature point in the real world can be estimated to be separated by the first predetermined distance or more in the predetermined direction. If it can be estimated that they are separated by a second predetermined distance longer than the distance, a configuration (fifth configuration) in which a set of planes whose intersection lines with the predetermined plane are parallel to each other is not specified.

本発明の他の局面に係る姿勢推定装置は、移動体に搭載されたカメラで撮影された撮影画像を取得する取得部と、第1時刻と前記第1時刻より後の第2時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出し、前記第1時刻以後の第3時刻と前記第3時刻より後の第4時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出する抽出部と、前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ第3所定距離以上であると推定できる場合に、前記第1時刻と前記第2時刻で撮影された2つの前記撮影画像から抽出された特徴点から、互いに対応する第1特徴点を選定し、該第1特徴点の位置変化を算出し、前記第3時刻と前記第4時刻で撮影された2つの前記撮影画像から抽出された特徴点から、前記第1特徴点とは異なり、互いに対応する第2特徴点を選定し、該第2特徴点の位置変化を算出し、前記第1特徴点の位置変化及び前記第2特徴点の位置変化に基づき、所定の平面との交線が互いに平行となる面の組を2組特定する特定部と、前記特定部で特定した面の組に基づき前記カメラの姿勢を推定する推定部と、を備える構成(第6の構成)である。 A posture estimation apparatus according to another aspect of the present invention includes an acquisition unit that acquires a captured image captured by a camera mounted on a mobile object, and an image captured at a first time and a second time after the first time. A feature point is extracted from each of the two photographed images, and a feature point is extracted from each of the two photographed images photographed at a third time after the first time and at a fourth time after the third time. an extracting unit, and an amount of movement of the moving body from the first time to the second time in the real world and an amount of movement of the moving body from the third time to the fourth time in the real world, respectively; selecting first feature points corresponding to each other from feature points extracted from the two captured images captured at the first time and the second time when it can be estimated that the distance is equal to or greater than a third predetermined distance; A change in position of the first feature point is calculated, and from the feature points extracted from the two photographed images photographed at the third time and the fourth time, different from the first feature point, corresponding to each other Selecting a second feature point, calculating a positional change of the second feature point, and based on the positional change of the first feature point and the positional change of the second feature point, lines of intersection with a predetermined plane being parallel to each other and an estimating unit for estimating the orientation of the camera based on the sets of surfaces specified by the specifying unit (sixth configuration).

上記第6の構成の姿勢推定装置において、前記特定部は、前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ前記第3所定距離未満であると推定できる場合に、前記所定の平面との交線が互いに平行となる面の組を特定しない構成(第7の構成)であってもよい。 In the posture estimation device having the sixth configuration, the specifying unit calculates the movement amount from the first time in the real world to the second time in the real world and the third time in the real world for the mobile. to the fourth time, and when it can be estimated that each of the movement amounts is less than the third predetermined distance, a configuration that does not specify a set of planes whose intersection lines with the predetermined plane are parallel to each other (a seventh configuration).

上記第6の構成の姿勢推定装置において、前記移動体の速度が第1所定速度以下であるときに、前記特定部は、前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ前記第3所定距離未満であると推定する構成(第8の構成)であってもよい。 In the posture estimation device having the sixth configuration, when the speed of the moving body is equal to or less than a first predetermined speed, the identifying unit performs and the movement amount of the moving body from the third time to the fourth time in the real world are each estimated to be less than the third predetermined distance (eighth configuration). good.

上記第6の構成の姿勢推定装置において、前記移動体の速度が第1所定速度以下であるときに、前記抽出部は、前記第1時刻と前記第2時刻との間隔及び前記第3時刻と前記第4時刻との間隔を前記移動体の速度が前記第1所定速度より速いときに比べて長くし、前記特定部は、前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ前記第3所定距離以上であると推定する構成(第9の構成)であってもよい。 In the posture estimation device having the sixth configuration, when the speed of the moving object is equal to or lower than a first predetermined speed, the extracting unit extracts an interval between the first time and the second time and an interval between the third time and the The interval from the fourth time is made longer than when the speed of the moving object is higher than the first predetermined speed, and the specifying unit is configured to set the interval from the first time in the real world of the moving object to the second time. and the movement amount of the moving body from the third time to the fourth time in the real world are each estimated to be equal to or greater than the third predetermined distance (ninth configuration), good too.

上記第6又は第7の構成の姿勢推定装置において、前記特定部は、前記第1時刻で撮影された前記撮影画像上での前記第1特徴点の位置と前記第2時刻で撮影された前記撮影画像上での前記第1特徴点の位置との少なくとも一方、及び、前記第1時刻で撮影された前記撮影画像上での前記第1特徴点の位置と前記第2時刻で撮影された前記撮影画像上での前記第1特徴点の位置との距離に基づき、並びに、前記第3時刻で撮影された前記撮影画像上での前記第2特徴点の位置と前記第4時刻で撮影された前記撮影画像上での前記第2特徴点の位置との少なくとも一方、及び、前記第3時刻で撮影された前記撮影画像上での前記第2特徴点の位置と前記第4時刻で撮影された前記撮影画像上での前記第2特徴点の位置との距離に基づき、前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ第3所定距離以上であるか否かを推定する構成(第10の構成)であってもよい。 In the posture estimation device having the sixth or seventh configuration, the specifying unit performs the position of the first feature point on the captured image captured at the first time and the position of the first feature point captured at the second time. At least one of the position of the first feature point on the captured image, and the position of the first feature point on the captured image captured at the first time and the position of the first feature point captured at the second time Based on the distance from the position of the first feature point on the captured image, and the position of the second feature point on the captured image captured at the third time and the position of the second feature point captured at the fourth time At least one of the position of the second feature point on the captured image, and the position of the second feature point on the captured image captured at the third time and the position of the second feature point captured at the fourth time Based on the distance from the position of the second feature point on the captured image, the amount of movement of the moving body from the first time point in the real world to the second time point and the moving amount of the moving body in the real world A configuration (a tenth configuration) may be used in which it is estimated whether or not the amount of movement from the third time to the fourth time is equal to or greater than a third predetermined distance.

上記第6~第10いずれかの構成の姿勢推定装置において、前記特定部は、前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ第3所定距離以上であると推定できても、前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ前記第3所定距離長い第4所定距離以上であると推定できる場合には、前記所定の平面との交線が互いに平行となる面の組を特定しない構成(第11の構成)であってもよい。 In the posture estimating device having any one of the sixth to tenth configurations, the specifying unit includes a moving amount from the first time to the second time in the real world of the moving body and a movement amount of the moving body in the real world movement amount from the third time to the fourth time can be estimated to be equal to or greater than a third predetermined distance, movement of the moving body from the first time to the second time in the real world and the amount of movement of the moving body from the third time to the fourth time in the real world can be estimated to be equal to or greater than a fourth predetermined distance that is longer than the third predetermined distance, the predetermined plane A configuration (eleventh configuration) in which a set of planes whose intersection lines are parallel to each other is not specified.

本発明に係る異常検出装置は、上記第1~第11いずれかの構成の姿勢推定装置と、前記推定部によって推定された前記カメラの姿勢に基づき、前記カメラの取付けのずれが生じた状態であるか否かを判定する判定部と、を備える構成(第12の構成)である。 An anomaly detection apparatus according to the present invention is a posture estimation device having any one of the first to eleventh configurations described above, and the camera posture estimated by the estimating unit in a state in which the camera is attached with a misalignment. and a determination unit for determining whether or not there is a configuration (a twelfth configuration).

本発明に係る補正装置は、上記第1~第11のいずれかの構成の姿勢推定装置と、前記推定部によって推定された前記カメラの姿勢に基づき、前記カメラのパラメータを補正する補正部と、を備える構成(第13の構成)である。 A correction device according to the present invention includes a posture estimation device having any one of the first to eleventh configurations; a correction unit that corrects parameters of the camera based on the posture of the camera estimated by the estimation unit; (13th configuration).

本発明の一局面に係る姿勢推定方法は、移動体に搭載されたカメラで撮影された撮影画像を取得する取得工程と、第1時刻と前記第1時刻より後の第2時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出し、前記第1時刻以後の第3時刻と前記第3時刻より後の第4時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出する抽出工程と、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上離れていると推定できる場合に、前記第1時刻と前記第2時刻で撮影された2つの前記撮影画像から抽出された特徴点から、互いに対応する前記第1特徴点を選定し、前記第1特徴点の位置変化を算出し、前記第3時刻と前記第4時刻で撮影された2つの前記撮影画像から抽出された特徴点から、前記第1特徴点とは異なり、互いに対応する前記第2特徴点を選定し、前記第2特徴点の位置変化を算出し、前記第1特徴点の位置変化及び前記第2特徴点の位置変化に基づき、所定の平面との交線が互いに平行となる面の組を2組特定する特定工程と、前記特定工程で特定した面の組に基づき前記カメラの姿勢を推定する推定工程と、を備える構成(第14の構成)である。 A posture estimation method according to an aspect of the present invention includes an acquisition step of acquiring a photographed image photographed by a camera mounted on a mobile body, and Extracting feature points from each of the two captured images, and extracting feature points from each of the two captured images captured at a third time after the first time and at a fourth time after the third time. and when it can be estimated that the real-world position of the first feature point and the real-world position of the second feature point are separated by a first predetermined distance or more in a predetermined direction, the first time and the Selecting the first feature points corresponding to each other from the feature points extracted from the two captured images captured at the second time, calculating the positional change of the first feature points, calculating the third time and the Different from the first feature points, the second feature points corresponding to each other are selected from the feature points extracted from the two captured images captured at a fourth time, and positional changes of the second feature points are selected. a specifying step of specifying two sets of planes whose lines of intersection with a predetermined plane are parallel to each other based on the positional change of the first feature point and the positional change of the second feature point; and an estimating step of estimating the orientation of the camera based on the set of planes specified in (14th configuration).

本発明の他の局面に係る姿勢推定方法は、移動体に搭載されたカメラで撮影された撮影画像を取得する取得工程と、第1時刻と前記第1時刻より後の第2時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出し、前記第1時刻以後の第3時刻と前記第3時刻より後の第4時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出する抽出工程と、前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ第3所定距離以上であると推定できる場合に、前記第1時刻と前記第2時刻で撮影された2つの前記撮影画像から抽出された特徴点から、互いに対応する第1特徴点を選定し、該第1特徴点の位置変化を算出し、前記第3時刻と前記第4時刻で撮影された2つの前記撮影画像から抽出された特徴点から、前記第1特徴点とは異なり、互いに対応する第2特徴点を選定し、該第2特徴点の位置変化を算出し、前記第1特徴点の位置変化及び前記第2特徴点の位置変化に基づき、所定の平面との交線が互いに平行となる面の組を2組特定する特定工程と、前記特定工程で特定した面の組に基づき前記カメラの姿勢を推定する推定工程と、を備える構成(第15の構成)である。 A posture estimation method according to another aspect of the present invention includes an obtaining step of obtaining a photographed image photographed by a camera mounted on a mobile object, and A feature point is extracted from each of the two photographed images, and a feature point is extracted from each of the two photographed images photographed at a third time after the first time and at a fourth time after the third time. an extraction step, and an amount of movement of the moving object from the first time to the second time in the real world and an amount of movement of the moving object from the third time to the fourth time in the real world, respectively. selecting first feature points corresponding to each other from feature points extracted from the two captured images captured at the first time and the second time when it can be estimated that the distance is equal to or greater than a third predetermined distance; A change in position of the first feature point is calculated, and from the feature points extracted from the two photographed images photographed at the third time and the fourth time, different from the first feature point, corresponding to each other Selecting a second feature point, calculating a positional change of the second feature point, and based on the positional change of the first feature point and the positional change of the second feature point, lines of intersection with a predetermined plane being parallel to each other and an estimating step of estimating the orientation of the camera based on the pairs of planes specified in the specifying step (a fifteenth configuration).

本発明によると、カメラの姿勢を精度良く推定できるとともに、姿勢推定に用いる特徴点の位置に依存して姿勢推定の精度が低下することを抑制できる。 According to the present invention, it is possible to accurately estimate the pose of a camera, and to prevent the accuracy of pose estimation from deteriorating depending on the positions of feature points used for pose estimation.

異常検出システムの構成を示すブロック図Block diagram showing the configuration of the anomaly detection system 車載カメラが車両に配置される位置を例示する図Diagram exemplifying the position where the on-board camera is arranged in the vehicle 撮影画像の一例を模式的に示す図A diagram schematically showing an example of a captured image 撮影画像の他の例を模式的に示す図A diagram schematically showing another example of a captured image 撮影画像の更に他の例を模式的に示す図The figure which shows typically another example of a picked-up image. 姿勢推定装置によるカメラの姿勢推定フローの一例を示すフローチャートFlowchart showing an example of a camera posture estimation flow by a posture estimation device 現フレームよりLフレーム前の撮影画像を模式的に示す図FIG. 4 is a diagram schematically showing a photographed image L frames before the current frame; 現フレームを模式的に示す図Schematic diagram of the current frame 現フレームよりNフレーム前の撮影画像を模式的に示す図A diagram schematically showing a photographed image N frames before the current frame. 現フレームよりMフレーム前の撮影画像を模式的に示す図FIG. 4 is a diagram schematically showing a photographed image M frames before the current frame; 現フレームよりLフレーム前の撮影画像を模式的に示す図FIG. 4 is a diagram schematically showing a photographed image L frames before the current frame; 現フレームを模式的に示す図Schematic diagram of the current frame 仮想的に形成される四角形を模式的に示す図A diagram schematically showing a virtually formed quadrangle 所定の平面との交線が互いに平行になる面の組を2組特定する手法を説明するための図FIG. 4 is a diagram for explaining a technique for identifying two sets of planes whose intersection lines with a predetermined plane are parallel to each other; 特定した面の組の一方に基づき、面同士の交線の方向を求める手法を説明するための図Diagram for explaining the method of determining the direction of the line of intersection between the faces based on one of the identified pairs of faces. 特定した面の組の他方に基づき、面同士の交線の方向を求める手法を説明するための図Diagram for explaining the method of determining the direction of the line of intersection between the faces based on the other of the identified faces ROIの設定例を説明するための図Diagram for explaining a setting example of ROI ROIの他の設定例を説明するための図Diagram for explaining another setting example of ROI 補正システムの構成を示すブロック図Block diagram showing the configuration of the correction system

以下、本発明の例示的な実施形態について、図面を参照しながら詳細に説明する。以下の説明では、移動体として車両を例にとり説明するが、移動体は車両に限定されない。車両には、例えば自動車、電車、無人搬送車等の車輪のついた乗り物が広く含まれる。車両以外の移動体として、例えば船舶や航空機等が挙げられる。 Exemplary embodiments of the invention are described in detail below with reference to the drawings. In the following description, a vehicle is taken as an example of a moving object, but the moving object is not limited to a vehicle. Vehicles broadly include vehicles with wheels, such as automobiles, trains, and automatic guided vehicles. Examples of mobile objects other than vehicles include ships and aircraft.

また以下の説明では、車両の直進進行方向であって、運転席からハンドルに向かう方向を「前方向」とする。また、車両の直進進行方向であって、ハンドルから運転席に向かう方向を「後方向」とする。また、車両の直進進行方向及び鉛直線に垂直な方向であって、前方向を向いている運転者の右側から左側に向かう方向を「左方向」とする。また、車両の直進進行方向及び鉛直線に垂直な方向であって、前方向を向いている運転者の左側から右側に向かう方向を「右方向」とする。 Further, in the following description, the direction in which the vehicle travels straight ahead, which is the direction from the driver's seat to the steering wheel, is referred to as the "forward direction." In addition, the direction from the steering wheel to the driver's seat, which is the direction in which the vehicle travels straight, is defined as the "rearward direction." In addition, the direction perpendicular to the straight traveling direction and the vertical line of the vehicle and from the right side to the left side of the driver who is facing forward is referred to as the "left direction." Also, the direction perpendicular to the straight traveling direction and the vertical line of the vehicle and from the left side to the right side of the driver who is facing forward is referred to as the "right direction."

<1.異常検出システム>
図1は、実施形態に係る異常検出システムSYS1の構成を示すブロック図である。本実施形態において、異常は、カメラの取付けのずれが生じた状態である。すなわち、異常検出システムSYS1は、車両に搭載されたカメラ(車載カメラ)の取付けのずれを検出するシステムである。図1に示すように、異常検出システムSYS1は、異常検出装置1及び撮影部2を備える。
<1. Anomaly detection system>
FIG. 1 is a block diagram showing the configuration of an abnormality detection system SYS1 according to the embodiment. In this embodiment, the abnormality is a state in which the mounting of the camera is misaligned. That is, the abnormality detection system SYS1 is a system that detects misalignment of a camera mounted on a vehicle (in-vehicle camera). As shown in FIG. 1 , an abnormality detection system SYS1 includes an abnormality detection device 1 and an imaging unit 2 .

異常検出装置1は、車載カメラで撮影された撮影画像に基づいて異常を検出する装置である。異常検出装置1は、車載カメラを搭載する車両ごとに備えられる。本実施形態では、異常検出装置1は、撮影部2から撮影画像を取得する。 The abnormality detection device 1 is a device that detects an abnormality based on an image captured by an in-vehicle camera. The abnormality detection device 1 is provided for each vehicle equipped with an in-vehicle camera. In this embodiment, the abnormality detection device 1 acquires a captured image from the imaging unit 2 .

撮影部2は、車両周辺の状況を監視する目的で設けられる。撮影部2は、4つのカメラ21~24を備える。4つのカメラ21~24は、車載カメラである。図2は、4つの車載カメラ21~24が車両5に配置される位置を例示する図である。 The photographing unit 2 is provided for the purpose of monitoring the situation around the vehicle. The imaging unit 2 includes four cameras 21-24. The four cameras 21-24 are in-vehicle cameras. FIG. 2 is a diagram illustrating the positions where the four vehicle-mounted cameras 21 to 24 are arranged on the vehicle 5. As shown in FIG.

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

車載カメラ23は車両5の左側ドアミラー51に設けられる。このため、車載カメラ23を左サイドカメラ23とも呼ぶ。左サイドカメラ23の光軸23aは上からの平面視で車両5の左右方向に沿っている。左サイドカメラ23は車両5の左方向を撮影する。車載カメラ24は車両5の右側ドアミラー52に設けられる。このため、車載カメラ24を右サイドカメラ24とも呼ぶ。右サイドカメラ24の光軸24aは上からの平面視で車両5の左右方向に沿っている。右サイドカメラ24は車両5の右方向を撮影する。なお、車両5がいわゆるドアミラーレス車である場合には、左サイドカメラ23は左サイドドアの回転軸(ヒンジ部)の周辺にドアミラーを介することなく取り付けられ、右サイドカメラ24は右サイドドアの回転軸(ヒンジ部)の周辺にドアミラーを介することなく取り付けられる。 The vehicle-mounted camera 23 is provided on the left side door mirror 51 of the vehicle 5 . Therefore, the in-vehicle camera 23 is also called a left side camera 23 . The optical axis 23a of the left side camera 23 extends along the left-right direction of the vehicle 5 in plan view from above. The left side camera 23 photographs the left direction of the vehicle 5 . The vehicle-mounted camera 24 is provided on the right side door mirror 52 of the vehicle 5 . Therefore, the in-vehicle camera 24 is also called a right side camera 24 . The optical axis 24a of the right side camera 24 extends along the left-right direction of the vehicle 5 in plan view from above. The right side camera 24 photographs the right direction of the vehicle 5 . When the vehicle 5 is a so-called door mirrorless vehicle, the left side camera 23 is attached around the rotation axis (hinge portion) of the left side door without interposing the door mirror, and the right side camera 24 is attached to the right side door. It can be attached around the rotating shaft (hinge part) without interposing the door mirror.

各車載カメラ21~24の水平方向の画角θは180度以上である。このため、車載カメラ21~24によって、車両5の水平方向における全周囲を撮影することができる。また、車載カメラ21~24によって撮影される画像には、車載カメラ21~24を搭載する車両5のボディが映り込む。 The horizontal angle of view θ of each vehicle-mounted camera 21 to 24 is 180 degrees or more. Therefore, the vehicle-mounted cameras 21 to 24 can photograph the entire circumference of the vehicle 5 in the horizontal direction. The body of the vehicle 5 on which the on-board cameras 21-24 are mounted is reflected in the images captured by the on-board cameras 21-24.

なお、本実施形態では、車載カメラの数を4つとしているが、この数は適宜変更されてよく、複数であっても単数であってもよい。例えば、車両5がバックで駐車することを支援する目的で車載カメラが搭載されている場合には、車載カメラは、バックカメラ22、左サイドカメラ23、右サイドカメラ24の3つで構成されてもよい。 In this embodiment, the number of vehicle-mounted cameras is four, but this number may be changed as appropriate, and may be plural or singular. For example, when an in-vehicle camera is installed for the purpose of assisting the vehicle 5 to park in reverse, the in-vehicle camera is composed of a back camera 22, a left side camera 23, and a right side camera 24. good too.

図1に戻って、本実施形態では、ステアリングホイール(ハンドル)の回転角を検出する舵角センサ3の出力及び車両5の速度を検出する車速度センサ4の出力は、CAN(Controller Area Network)バス等の通信バスB1を介して異常検出装置1に入力される。 Returning to FIG. 1, in this embodiment, the output of the steering angle sensor 3 that detects the rotation angle of the steering wheel (steering wheel) and the output of the vehicle speed sensor 4 that detects the speed of the vehicle 5 are connected to CAN (Controller Area Network). It is input to the abnormality detection device 1 via a communication bus B1 such as a bus.

<2.異常検出装置>
図1に示すように、異常検出装置1は、取得部11と、制御部12と、記憶部13と、を備える。
<2. Abnormality detection device>
As shown in FIG. 1 , the abnormality detection device 1 includes an acquisition section 11 , a control section 12 and a storage section 13 .

取得部11は、車載カメラ21~24からアナログ又はデジタルの撮影画像を所定の周期(例えば、1/30秒周期)で時間的に連続して取得する。すなわち、取得部11によって取得される撮影画像の集合体が車載カメラ21~24で撮影された動画像である。そして、取得した撮影画像がアナログの場合には、取得部11は、そのアナログの撮影画像をデジタルの撮影画像に変換(A/D変換)する。取得部11は、取得した撮影画像、或いは、取得及び変換した撮影画像を制御部12に出力する。取得部11から出力される1つの撮影画像が1つのフレーム画像となる。 The obtaining unit 11 temporally continuously obtains analog or digital captured images from the vehicle-mounted cameras 21 to 24 at a predetermined cycle (for example, 1/30 second cycle). In other words, an aggregate of captured images acquired by the acquisition unit 11 is a moving image captured by the vehicle-mounted cameras 21-24. Then, when the acquired captured image is analog, the acquisition unit 11 converts (A/D converts) the analog captured image into a digital captured image. The acquisition unit 11 outputs the acquired photographed image or the acquired and converted photographed image to the control unit 12 . One captured image output from the acquisition unit 11 becomes one frame image.

制御部12は、例えばマイクロコンピュータであり、異常検出装置1の全体を統括的に制御する。制御部12は、不図示のCPU(Central Processing Unit)、RAM(Random Access Memory)、及びROM(Read Only Memory)を含む。記憶部13は、例えば、フラッシュメモリ等の不揮発性のメモリであり、各種の情報を記憶する。記憶部13は、ファームウェアとしてのプログラムや各種のデータを記憶する。 The control unit 12 is, for example, a microcomputer, and controls the entire abnormality detection device 1 in an integrated manner. The control unit 12 includes a CPU (Central Processing Unit), a RAM (Random Access Memory), and a ROM (Read Only Memory) (not shown). The storage unit 13 is, for example, a non-volatile memory such as a flash memory, and stores various kinds of information. The storage unit 13 stores a program as firmware and various data.

制御部12は、抽出部121、特定部122、推定部123、及び判定部124を備える。なお、制御部12の抽出部121、特定部122、推定部123、及び判定部124の少なくともいずれか一つは、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)等のハードウェアで構成されてもよい。また、抽出部121、特定部122、推定部123、及び判定部124は、概念的な構成要素である。1つの構成要素が実行する機能を複数の構成要素に分散させたり、複数の構成要素が有する機能を1つの構成要素に統合したりしてよい。また、取得部11は、制御部12のCPUがプログラムに従って演算処理を行うことによって実現される構成でもよい。 The control unit 12 includes an extraction unit 121 , a specification unit 122 , an estimation unit 123 and a determination unit 124 . At least one of the extraction unit 121, the identification unit 122, the estimation unit 123, and the determination unit 124 of the control unit 12 is hardware such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array). may be configured. Also, the extraction unit 121, the identification unit 122, the estimation unit 123, and the determination unit 124 are conceptual components. A function performed by one component may be distributed to a plurality of components, or a function possessed by a plurality of components may be integrated into one component. Further, the acquisition unit 11 may be implemented by the CPU of the control unit 12 performing arithmetic processing according to a program.

抽出部121は、各車載カメラ21~24からの撮影画像から第1特徴点及び第2特徴点を含む複数の特徴点を抽出する。特徴点は、撮影画像中のエッジの交点など、撮影画像において際立って検出できる点である。特徴点は、例えば路面に描かれた白線のエッジ、路面上のひび、路面上のしみ、路面上の砂利などである。特徴点は、通常、1つの撮影画像の中に多数存在する。抽出部121は、例えば、ハリスオペレータ等の公知の手法を用いて特徴点を抽出する。抽出部121は、路面上の特徴点の中から第1特徴点及び第2特徴点を選定する。第1特徴点と第2特徴点とは互いに異なる特徴点である。なお、本実施形態では、所定の平面として路面を想定する。 The extraction unit 121 extracts a plurality of feature points including a first feature point and a second feature point from images captured by the vehicle-mounted cameras 21-24. A feature point is a point that can be conspicuously detected in a captured image, such as an intersection of edges in the captured image. The feature points are, for example, edges of white lines drawn on the road surface, cracks on the road surface, stains on the road surface, gravel on the road surface, and the like. A large number of feature points usually exist in one captured image. The extraction unit 121 extracts feature points using, for example, a known method such as a Harris operator. The extraction unit 121 selects a first feature point and a second feature point from the feature points on the road surface. The first feature point and the second feature point are feature points different from each other. In addition, in this embodiment, a road surface is assumed as a predetermined plane.

特定部122は、異なる時刻で撮影された2つの撮影画像から抽出された第1特徴点及び第2特徴点の各オプティカルフローを導出する。オプティカルフローは、異なる時刻で撮影された2つの撮影画像間における特徴点の動きを示す動きベクトルである。異なる時刻の間隔は、取得部11のフレーム周期と同一であってもよく、取得部11のフレーム周期の複数倍であってもよい。 The specifying unit 122 derives optical flows of the first feature points and the second feature points extracted from the two captured images captured at different times. Optical flow is a motion vector that indicates the motion of feature points between two captured images captured at different times. The interval between the different times may be the same as the frame period of the acquisition unit 11 or multiple times the frame period of the acquisition unit 11 .

特定部122は、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上第2所定距離未満離れていると推定でき、且つ、車両5の実世界上の上記異なる時刻の間隔での移動量が第3所定距離以上第4所定距離未満であると推定できる場合に、第1特徴点及び第2特徴点の各オプティカルフローを用いて、異なる時刻で撮影された2つの撮影画像から抽出された第1特徴点及び第2特徴点の各位置変化を算出する。なお、第2所定距離は第1所定距離より長く、第4所定距離は第3所定距離より長い。第1所定距離と第3所定距離とは同一であってもよく異なっていてもよい。第2所定距離と第4所定距離とは同一であってもよく異なっていてもよい。撮影画像がフロントカメラ21又はバックカメラ22で撮影された画像である場合、所定の方向は左右方向にすればよい。一方、撮影画像が左サイドカメラ23又は右サイドカメラ24で撮影された画像である場合、所定の方向は前後方向にすればよい。 The identifying unit 122 can estimate that the real-world position of the first feature point and the real-world position of the second feature point are separated from each other by a first predetermined distance or more and less than a second predetermined distance in a predetermined direction, and , when it can be estimated that the amount of movement of the vehicle 5 at the intervals of the different times in the real world is equal to or greater than the third predetermined distance and less than the fourth predetermined distance, the optical flows of the first feature point and the second feature point are are used to calculate positional changes of the first feature point and the second feature point extracted from two captured images captured at different times. The second predetermined distance is longer than the first predetermined distance, and the fourth predetermined distance is longer than the third predetermined distance. The first predetermined distance and the third predetermined distance may be the same or different. The second predetermined distance and the fourth predetermined distance may be the same or different. If the captured image is an image captured by the front camera 21 or the back camera 22, the predetermined direction may be the horizontal direction. On the other hand, when the captured image is an image captured by the left side camera 23 or the right side camera 24, the predetermined direction may be the front-rear direction.

特定部122は、第1特徴点の位置変化及び第2特徴点の位置変化に基づき、所定の平面との交線が互いに平行となる面の組を2組特定する。 The identifying unit 122 identifies two sets of planes whose intersection lines with a predetermined plane are parallel to each other, based on the positional change of the first feature point and the positional change of the second feature point.

なお、単一の撮影画像から第1特徴点及び第2特徴点のいずれか一方のみしか抽出できない場合がある。また、単一の撮影画像から抽出された第1特徴点及び第2特徴点が適切な位置関係でない場合がある。 In some cases, only one of the first feature point and the second feature point can be extracted from a single captured image. Also, the first feature point and the second feature point extracted from a single captured image may not have an appropriate positional relationship.

単一の撮影画像から第1特徴点及び第2特徴点のいずれか一方のみしか抽出できない場合の例として、図3に示す撮影画像及び図4に示す撮影画像を挙げることができる。 Examples of the case where only one of the first feature point and the second feature point can be extracted from a single captured image include the captured image shown in FIG. 3 and the captured image shown in FIG.

図3は、フロントカメラ21で撮影される撮影画像を模式的に示している。図3に示す撮影画像は、車両5のボディが映り込む領域BOを含む。図3に示す撮影画像内の斜線部は影を示しており、図3に示す撮影画像内の点線四角内が特徴点の抽出可能領域となるROI(region of interest)である。図3に示す撮影画像では、影の影響により路面RS上に存在する特徴点FPを一つしか抽出できない。 FIG. 3 schematically shows a photographed image photographed by the front camera 21. As shown in FIG. The captured image shown in FIG. 3 includes an area BO in which the body of the vehicle 5 is reflected. A shaded area in the photographed image shown in FIG. 3 indicates a shadow, and a dotted-line square in the photographed image shown in FIG. 3 is an ROI (region of interest) where feature points can be extracted. In the photographed image shown in FIG. 3, only one feature point FP existing on the road surface RS can be extracted due to the influence of the shadow.

図4は、左サイドカメラ23で撮影される撮影画像を模式的に示している。図4に示す撮影画像は、車両5のボディが映り込む領域BOを含む。図4に示す撮影画像内の点線四角内が特徴点の抽出可能領域となるROIである。図4に示す撮影画像では、ROI内に白線のコーナーが1つしか存在しないため路面RS上に存在する特徴点FPを一つしか抽出できない。 FIG. 4 schematically shows a photographed image photographed by the left side camera 23. As shown in FIG. The captured image shown in FIG. 4 includes an area BO in which the body of the vehicle 5 is reflected. The inside of the dotted-line square in the photographed image shown in FIG. 4 is the ROI, which is an extractable region for feature points. In the photographed image shown in FIG. 4, only one feature point FP existing on the road surface RS can be extracted because there is only one white line corner in the ROI.

単一の撮影画像から抽出された第1特徴点及び第2特徴点が適切な位置関係でない場合の例として、図5に示す撮影画像を挙げることができる。 As an example of a case where the first feature point and the second feature point extracted from a single captured image do not have an appropriate positional relationship, the captured image shown in FIG. 5 can be mentioned.

図5は、フロントカメラ21で撮影される撮影画像を模式的に示している。図5に示す撮影画像は、車両5のボディが映り込む領域BOを含む。図5に示す撮影画像内の斜線部は影を示しており、図5に示す撮影画像内の点線四角内が特徴点の抽出可能領域となるROIである。図5に示す撮影画像では、影の影響により路面RS上に存在する特徴点FPを局所的な場所でしか抽出できない。第1特徴点と第2特徴点が局所的な場所に偏在していると、PAN軸、TILT軸、及びROLL軸の一部でカメラの姿勢推定の精度が劣るおそれがある。 FIG. 5 schematically shows a photographed image photographed by the front camera 21. As shown in FIG. The captured image shown in FIG. 5 includes an area BO in which the body of the vehicle 5 is reflected. A shaded area in the photographed image shown in FIG. 5 indicates a shadow, and a dotted-line square in the photographed image shown in FIG. In the captured image shown in FIG. 5, feature points FP existing on the road surface RS can only be extracted at local locations due to the influence of shadows. If the first feature points and the second feature points are unevenly distributed at local locations, there is a risk that the accuracy of camera orientation estimation may be degraded in some of the PAN, TILT, and ROLL axes.

単一の撮影画像から第1特徴点及び第2特徴点のいずれか一方のみしか抽出できない場合、又は、単一の撮影画像から抽出された第1特徴点及び第2特徴点が適切な位置関係でない場合、抽出部121は、第1時刻と第1時刻より後の第2時刻で撮影された2つの撮影画像それぞれから特徴点を抽出し、第1時刻より後の第3時刻と第3時刻より後の第4時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出すればよい。そして、特定部122は、第1時刻と第2時刻で撮影された2つの撮影画像から抽出された特徴点から、互いに対応する第1特徴点を選定し、第1特徴点の位置変化を算出し、第3時刻と第4時刻で撮影された2つの撮影画像から抽出された特徴点から、第1特徴点とは異なり、互いに対応する第1特徴点を選定し、第2特徴点の位置変化を算出し、第1特徴点の位置変化及び第2特徴点の位置変化に基づき、所定の平面との交線が互いに平行となる面の組を2組特定すればよい。 When only one of the first feature point and the second feature point can be extracted from a single captured image, or when the first feature point and the second feature point extracted from the single captured image have an appropriate positional relationship Otherwise, the extracting unit 121 extracts the feature points from each of the two captured images captured at the first time and the second time after the first time, and extracts the feature points from the third time and the third time after the first time. Feature points may be extracted from each of the two captured images captured at the later fourth time. Then, the specifying unit 122 selects the first feature points corresponding to each other from the feature points extracted from the two captured images captured at the first time and the second time, and calculates the position change of the first feature points. Then, from the feature points extracted from the two captured images captured at the third time and the fourth time, the first feature points that are different from the first feature points and correspond to each other are selected, and the positions of the second feature points are selected. Two pairs of planes whose intersection lines with a predetermined plane are parallel to each other may be identified based on the positional changes of the first feature point and the positional changes of the second feature point.

推定部123は、特定部122で特定した面の組に基づきカメラの姿勢(カメラの取付け角度)を推定する。例えば抽出部121がフロントカメラ21から第1特徴点及び第2特徴点を抽出した場合、推定部123はフロントカメラ21の姿勢(カメラの取付け角度)を推定する。 The estimation unit 123 estimates the orientation of the camera (mounting angle of the camera) based on the set of surfaces identified by the identification unit 122 . For example, when the extraction unit 121 extracts the first feature point and the second feature point from the front camera 21, the estimation unit 123 estimates the orientation of the front camera 21 (camera mounting angle).

判定部124は、推定部123によって推定されたカメラの姿勢に基づき、カメラの取付けのずれが生じた状態であるか否かを判定する。カメラの取付けのずれが生じた状態であると判定されると、異常検出装置1がカメラの異常を検出したことになる。例えば、この異常を異常検出装置1が車両5のユーザに報知することで、車両5のユーザはディーラによるカメラの取付調整を依頼する等の対策をとることが可能となる。 The determination unit 124 determines whether or not the camera has been misaligned based on the orientation of the camera estimated by the estimation unit 123 . If it is determined that the camera is in a state of mounting misalignment, the abnormality detection device 1 has detected an abnormality in the camera. For example, if the abnormality detection device 1 notifies the user of the vehicle 5 of this abnormality, the user of the vehicle 5 can take countermeasures such as requesting the dealer to adjust the mounting of the camera.

取得部11、抽出部121、特定部122、及び推定部123によって姿勢推定装置14が構成される。言い換えると、異常検出装置1は姿勢推定装置14を備える。図6は、姿勢推定装置14によるカメラの姿勢推定フローの一例を示すフローチャートである。以下、フロントカメラ21の姿勢を推定する場合を例に挙げて説明する。 A posture estimation device 14 is configured by the acquisition unit 11 , the extraction unit 121 , the identification unit 122 , and the estimation unit 123 . In other words, the anomaly detection device 1 includes the attitude estimation device 14 . FIG. 6 is a flowchart showing an example of a camera pose estimation flow by the pose estimation device 14 . A case of estimating the orientation of the front camera 21 will be described below as an example.

図6に示すように、抽出部121は特徴点を抽出する(ステップS1)。より詳細には、ステップS1において、抽出部121は、最新の撮影画像である現フレームの特徴点と現フレームよりLフレーム前の撮影画像の特徴点を抽出する。 As shown in FIG. 6, the extraction unit 121 extracts feature points (step S1). More specifically, in step S1, the extraction unit 121 extracts the feature points of the current frame, which is the latest captured image, and the feature points of the captured image L frames before the current frame.

次に、特定部122は、オプティカルフローを導出する(ステップS2)。より詳細には、ステップS2において、抽出部121は、最新の撮影画像(現フレーム)と現フレームよりL(Lは自然数)フレーム前の撮影画像から抽出された特徴点のオプティカルフローを導出する。 Next, the specifying unit 122 derives an optical flow (step S2). More specifically, in step S2, the extraction unit 121 derives an optical flow of feature points extracted from the latest captured image (current frame) and the captured image L (L is a natural number) frames before the current frame.

なお、ステップS2においてオプティカルフローが1つも導出されない場合は、現フレームより1フレーム後のフレームを新たな現フレームとし、その新たな現フレームに関して、ステップS1及びS2の処理を実行する。 If no optical flow is derived in step S2, the frame one frame after the current frame is set as a new current frame, and the processes of steps S1 and S2 are executed for the new current frame.

記憶部13は、ステップS2で導出されたオプティカルフローを最新のオプティカルフローとして記憶する。最新のオプティカルフローは、現フレームの更新により過去のオプティカルフローに変化する。記憶部13は、最新のオプティカルフローが過去のオプティカルフローに変化した時点から一定時間が経過する迄の間、過去のオプティカルフローを記憶する。 The storage unit 13 stores the optical flow derived in step S2 as the latest optical flow. The latest optical flow changes to the past optical flow by updating the current frame. The storage unit 13 stores the past optical flow for a certain period of time after the latest optical flow changes to the past optical flow.

ステップS2におけるオプティカルフローの導出が終了すると、特定部122は、特徴点に対し、記憶部13に記憶されているフロントカメラ21に内部パラメータを用いて座標変換を行う。座標変換では、フロントカメラ21の収差補正と、歪補正とが行われる。収差補正は、フロントカメラ21の光学系の収差による歪みを補正するために行われる。具体的には樽型歪みや糸巻歪みなど歪曲収差の補正である。歪み補正は、フロントカメラ21の光学系そのものの歪みを補正するために行われる。具体的には魚眼補正などである。座標変換により、特徴点の座標は、被写体が透視投影によって撮影された場合に二次元画像上で得られる座標に変換される。 After the derivation of the optical flow in step S2 is finished, the specifying unit 122 performs coordinate transformation on the feature points using the internal parameters of the front camera 21 stored in the storage unit 13 . In the coordinate conversion, aberration correction and distortion correction of the front camera 21 are performed. Aberration correction is performed to correct distortion due to aberration of the optical system of the front camera 21 . Specifically, it is correction of distortion such as barrel distortion and pincushion distortion. Distortion correction is performed to correct distortion of the optical system itself of the front camera 21 . Specifically, it is fisheye correction. Coordinate transformation converts the coordinates of the feature points into coordinates obtained on a two-dimensional image when the subject is photographed by perspective projection.

上述した特徴点の座標変換が終了すると、特定部122は、最新のオプティカルフローのみで四角形を仮想的に形成できるか否かを判定する(ステップS3)。 When the coordinate transformation of the feature points described above is completed, the specifying unit 122 determines whether or not a quadrangle can be virtually formed only with the latest optical flow (step S3).

第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上第2所定距離未満離れていると推定でき、車両5の実世界上の現フレームの撮影時点と現フレームよりL(Lは自然数)フレーム前の撮影時点との間隔での移動量が第3所定距離以上第4所定距離未満であると推定でき、且つ最新のオプティカルフローのみで四角形を仮想的に形成できると判定した場合(ステップS3のYES)、特定部122は、最新のオプティカルフローのみで四角形を仮想的に形成する(ステップS4)。以降、説明のために四角形や、該四角形の辺などの幾何的要素を仮想的に形成して用いる。しかし、実際の処理では、特徴点の座標や直線の方向などのベクトル演算に基づき、同等の作用を持つ幾何的要素に基づかない処理としてもよい。 It can be estimated that the real-world position of the first feature point and the real-world position of the second feature point are separated from each other by a first predetermined distance or more and less than a second predetermined distance in a predetermined direction. can be estimated to be a third predetermined distance or more and less than a fourth predetermined distance, and the latest optical flow If it is determined that a quadrangle can be virtually formed using only the latest optical flow (YES in step S3), the specifying unit 122 virtually forms a quadrangle using only the latest optical flow (step S4). Hereinafter, for the sake of explanation, geometric elements such as quadrilaterals and sides of the quadrilaterals are virtually formed and used. However, in actual processing, processing may be based on vector operations such as the coordinates of feature points and the direction of straight lines, and may not be based on geometric elements having equivalent effects.

ここで、ステップS1、S2、S3、及びS4の順で処理が実行される場合の具体例について図7A、図7B、及び図8を参照して説明する。図7Aは現フレームよりL(Lは自然数)フレーム前の撮影画像を模式的に示す図である。図7Bは現フレームを模式的に示す図である。図8は仮想的に形成される四角形を模式的に示す図である。 Here, a specific example in which the processes are executed in the order of steps S1, S2, S3, and S4 will be described with reference to FIGS. 7A, 7B, and 8. FIG. FIG. 7A is a diagram schematically showing a photographed image L (L is a natural number) frames before the current frame. FIG. 7B is a diagram schematically showing the current frame. FIG. 8 is a diagram schematically showing a virtually formed quadrangle.

図7Aに示す撮影画像P1及び図7Bに示す撮影画像P2はフロントカメラ21で撮影される。撮影画像P1及びP2は、車両5のボディが映り込む領域BOを含む。第1特徴点FP1及び第2特徴点FP2は路面RS上に存在する。図7A及び図7Bにおいては、路面に描かれている白線のコーナーに第1特徴点FP1及び第2特徴点FP2が存在する。 A captured image P1 shown in FIG. 7A and a captured image P2 shown in FIG. 7B are captured by the front camera 21 . The captured images P1 and P2 include an area BO in which the body of the vehicle 5 is reflected. The first feature point FP1 and the second feature point FP2 are present on the road surface RS. In FIGS. 7A and 7B, the first feature point FP1 and the second feature point FP2 are present at the corners of the white lines drawn on the road surface.

撮影画像P1の撮影時点から撮影画像P2の撮影時点迄の間に、車両5は前方に直進している。図7Bに示す丸印FP1Pは、撮影画像P1の撮影時点における第1特徴点FP1の位置を示す。図7Bに示す丸印FP2Pは、撮影画像P1の撮影時点における第2特徴点FP2の位置を示す。 The vehicle 5 is traveling straight forward from the time when the photographed image P1 is taken until the time when the photographed image P2 is taken. A circle FP1P shown in FIG. 7B indicates the position of the first feature point FP1 at the time of capturing the captured image P1. A circle FP2P shown in FIG. 7B indicates the position of the second feature point FP2 at the time of capturing the captured image P1.

図7Bに示すように、車両5が前方に直進すると、車両5の前方に存在する第1特徴点FP1及び第2特徴点FP2は車両5に近づく。すなわち、第1特徴点FP1及び第2特徴点FP2は、撮影画像P2と撮影画像P1とで異なる位置に現れる。特定部122は、撮影画像P2の第1特徴点FP1と撮影画像P1の第1特徴点FP1とを、その近傍の画素値に基づいて対応付け、対応付けた第1特徴点FP1のそれぞれの位置に基づいて、第1特徴点FP1のオプティカルフローOF1を導出する。同様に、特定部122は、撮影画像P2の第2特徴点FP2と撮影画像P1の第2特徴点FP2とを、その近傍の画素値に基づいて対応付け、対応付けた第2特徴点FP2のそれぞれの位置に基づいて、第2特徴点FP2のオプティカルフローOF2を導出する。 As shown in FIG. 7B , when the vehicle 5 moves straight ahead, the first feature point FP1 and the second feature point FP2 existing in front of the vehicle 5 approach the vehicle 5 . That is, the first feature point FP1 and the second feature point FP2 appear at different positions in the captured image P2 and the captured image P1. The specifying unit 122 associates the first feature point FP1 of the captured image P2 with the first feature point FP1 of the captured image P1 based on pixel values in the neighborhood of the first feature point FP1, and determines the position of each of the associated first feature points FP1. Based on, the optical flow OF1 of the first feature point FP1 is derived. Similarly, the identifying unit 122 associates the second feature point FP2 of the captured image P2 with the second feature point FP2 of the captured image P1 based on pixel values in the neighborhood of the second feature point FP2, and An optical flow OF2 of the second feature point FP2 is derived based on each position.

第1特徴点FP1のオプティカルフローOF1と第2特徴点FP2のオプティカルフローOF2が導出されると、特定部122は、特徴点に対し、記憶部13に記憶されているフロントカメラ21に内部パラメータを用いて座標変換を行う。座標変換では、フロントカメラ21の収差補正と、歪補正とが行われる。収差補正は、フロントカメラ21の光学系の収差による歪みを補正するために行われる。具体的には樽型歪みや糸巻歪みなど歪曲収差の補正である。歪み補正は、フロントカメラ21の光学系そのものの歪みを補正するために行われる。具体的には魚眼補正などである。座標変換により、特徴点の座標は、被写体が透視投影によって撮影された場合に二次元画像上で得られる座標に変換される。 When the optical flow OF1 of the first feature point FP1 and the optical flow OF2 of the second feature point FP2 are derived, the identifying unit 122 applies internal parameters to the front camera 21 stored in the storage unit 13 for the feature points. Coordinate transformation is performed using In the coordinate conversion, aberration correction and distortion correction of the front camera 21 are performed. Aberration correction is performed to correct distortion due to aberration of the optical system of the front camera 21 . Specifically, it is correction of distortion such as barrel distortion and pincushion distortion. Distortion correction is performed to correct distortion of the optical system itself of the front camera 21 . Specifically, it is fisheye correction. Coordinate transformation converts the coordinates of the feature points into coordinates obtained on a two-dimensional image when the subject is photographed by perspective projection.

特徴点の座標変換が行われると、特定部122は、図8に示すように、第1特徴点FP1のオプティカルフローOF1の始点を頂点SP1、第1特徴点FP1のオプティカルフローOF1の終点を頂点EP1、第2特徴点FP1のオプティカルフローOF2の始点を頂点SP2、及び第2特徴点FP2のオプティカルフローOF2の終点を頂点EPとする四角形QLを仮想的に形成する。 When the feature point coordinate transformation is performed, the identifying unit 122 sets the starting point of the optical flow OF1 of the first feature point FP1 to the vertex SP1 and the end point of the optical flow OF1 of the first feature point FP1 to the vertex, as shown in FIG. A quadrangle QL is virtually formed in which the starting point of the optical flow OF2 of EP1 and the second feature point FP1 is the vertex SP2, and the end point of the optical flow OF2 of the second feature point FP2 is the vertex EP.

図6に戻ってフローチャートのステップS5に関して説明する。最新のオプティカルフローのみで四角形を仮想的に形成できないと判定した場合(ステップS3のNO)、特定部122は、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上第2所定距離未満離れていると推定でき、且つ車両5の実世界上の現フレームの撮影時点と現フレームよりL(Lは自然数)フレーム前の撮影時点との間隔及び現フレームよりN(Nは自然数)フレーム前の撮影時点と現フレームよりM(Mは自然数)フレーム前の撮影時点の間隔それぞれでの移動量が第3所定距離以上第4所定距離未満であると推定できれば、過去のオプティカルフローと最新のオプティカルフローを用いて四角形を仮想的に形成する(ステップS5)。なお、上述した推定ができなければ、ステップS5~S9を実施することなく、フローチャートを終了する。本実施形態では、上記N、M、及びLについてN>M>Lであるが、MとLは同一であってもよく、LがMより大きく且つNより小さくてもよい。 Returning to FIG. 6, step S5 of the flowchart will be described. If it is determined that a quadrangle cannot be virtually formed using only the latest optical flow (NO in step S3), the identifying unit 122 determines the real-world position of the first feature point and the real-world position of the second feature point. can be estimated to be at least a first predetermined distance but less than a second predetermined distance in a predetermined direction, and at the time of photographing the current frame in the real world of the vehicle 5 and at L (L is a natural number) frames before the current frame. and the interval between the photographing point of time N (N is a natural number) frames before the current frame and the photographing point of time M (M is a natural number) frames before the current frame. If it can be estimated that it is less than the distance, a rectangle is virtually formed using the past optical flow and the latest optical flow (step S5). If the above estimation cannot be performed, the flowchart ends without executing steps S5 to S9. In this embodiment, N>M>L for N, M, and L, but M and L may be the same, and L may be larger than M and smaller than N.

ここで、ステップS1、S2、S3、及びS5の順で処理が実行される場合の具体例について図7C~図7F及び図8を参照して説明する。図7Cは現フレームよりNフレーム前の撮影画像を模式的に示す図である。図7Dは現フレームよりMフレーム前の撮影画像を模式的に示す図である。図7Eは現フレームよりLフレーム前の撮影画像を模式的に示す図である。図7Fは現フレームを模式的に示す図である。 Here, a specific example in which the processes are executed in the order of steps S1, S2, S3, and S5 will be described with reference to FIGS. 7C to 7F and 8. FIG. FIG. 7C is a diagram schematically showing a photographed image N frames before the current frame. FIG. 7D is a diagram schematically showing a photographed image M frames before the current frame. FIG. 7E is a diagram schematically showing a photographed image L frames before the current frame. FIG. 7F is a diagram schematically showing the current frame.

図7Cに示す撮影画像P11は第1時刻で撮影された撮影画像の一例である。図7Dに示す撮影画像P12は第1時刻より後の第2時刻で撮影された撮影画像の一例である。図7Eに示す撮影画像P13は第2時刻以後の第3時刻で撮影された撮影画像の一例である。図7Fに示す撮影画像P14は第3時刻より後の第4時刻で撮影された撮影画像の一例である。 A captured image P11 shown in FIG. 7C is an example of a captured image captured at the first time. A captured image P12 shown in FIG. 7D is an example of a captured image captured at a second time after the first time. A captured image P13 shown in FIG. 7E is an example of a captured image captured at a third time after the second time. A captured image P14 shown in FIG. 7F is an example of a captured image captured at a fourth time after the third time.

図7C~図7Fに示す撮影画像P11~P14はフロントカメラ21で撮影される。撮影画像P11~P14は、車両5のボディが映り込む領域BOを含む。第1特徴点FP1及び第2特徴点FP2は路面RS上に存在する。図7C及び図7Dにおいては、路面に描かれている白線のコーナーに第1特徴点FP1が存在する。図7E及び図7Fにおいては、路面に描かれている白線のコーナーに第2特徴点FP2が存在する。 Photographed images P11 to P14 shown in FIGS. 7C to 7F are photographed by the front camera 21. FIG. The captured images P11 to P14 include an area BO in which the body of the vehicle 5 is reflected. The first feature point FP1 and the second feature point FP2 are present on the road surface RS. In FIGS. 7C and 7D, the first feature point FP1 exists at the corner of the white line drawn on the road surface. In FIGS. 7E and 7F, the second feature point FP2 exists at the corner of the white line drawn on the road surface.

撮影画像P11の撮影時点から撮影画像P12の撮影時点迄の間に、車両5は前方に直進している。図7Dに示す丸印FP1Pは、撮影画像P11の撮影時点における第1特徴点FP1の位置を示す。同様に、撮影画像P13の撮影時点から撮影画像P14の撮影時点迄の間に、車両5は前方に直進している。図7Fに示す丸印FP2Pは、撮影画像P13の撮影時点における第2特徴点FP2の位置を示す。 The vehicle 5 is traveling straight forward from the time when the captured image P11 is captured to the time when the captured image P12 is captured. A circle FP1P shown in FIG. 7D indicates the position of the first feature point FP1 at the time of capturing the captured image P11. Similarly, the vehicle 5 is traveling straight forward from the time when the captured image P13 is captured to the time when the captured image P14 is captured. A circle FP2P shown in FIG. 7F indicates the position of the second feature point FP2 at the time of capturing the captured image P13.

図7Dに示すように、車両5が前方に直進すると、車両5の前方に存在する第1特徴点FP1は車両5に近づく。すなわち、第1特徴点FP1は、撮影画像P12と撮影画像P11とで異なる位置に現れる。特定部122は、撮影画像P12の第1特徴点FP1と撮影画像P11の第1特徴点FP1とを、その近傍の画素値に基づいて対応付け、対応付けた第1特徴点FP1のそれぞれの位置に基づいて、第1特徴点FP1のオプティカルフローOF1を導出する。 As shown in FIG. 7D , when the vehicle 5 moves straight forward, the first feature point FP<b>1 existing in front of the vehicle 5 approaches the vehicle 5 . That is, the first feature point FP1 appears at different positions in the captured image P12 and the captured image P11. The specifying unit 122 associates the first feature point FP1 of the captured image P12 with the first feature point FP1 of the captured image P11 based on pixel values in the vicinity thereof, and determines the position of each of the associated first feature points FP1. Based on, the optical flow OF1 of the first feature point FP1 is derived.

図7Fに示すように、車両5が前方に直進すると、車両5の前方に存在する第2特徴点FP2は車両5に近づく。すなわち、第2特徴点FP2は、撮影画像P14と撮影画像P13とで異なる位置に現れる。特定部122は、撮影画像P14の第2特徴点FP2と撮影画像P13の第2特徴点FP2とを、その近傍の画素値に基づいて対応付け、対応付けた第2特徴点FP2のそれぞれの位置に基づいて、第2特徴点FP2のオプティカルフローOF2を導出する。 As shown in FIG. 7F , when the vehicle 5 moves straight ahead, the second feature point FP2 existing in front of the vehicle 5 approaches the vehicle 5 . That is, the second feature point FP2 appears at different positions in the captured image P14 and the captured image P13. The specifying unit 122 associates the second feature point FP2 of the captured image P14 with the second feature point FP2 of the captured image P13 based on pixel values in the vicinity thereof, and determines the position of each of the associated second feature points FP2. Based on, the optical flow OF2 of the second feature point FP2 is derived.

第1特徴点FP1のオプティカルフローOF1と第2特徴点FP2のオプティカルフローOF2が導出されると、特定部122は、特徴点に対し、記憶部13に記憶されているフロントカメラ21に内部パラメータを用いて座標変換を行う。座標変換では、フロントカメラ21の収差補正と、歪補正とが行われる。収差補正は、フロントカメラ21の光学系の収差による歪みを補正するために行われる。具体的には樽型歪みや糸巻歪みなど歪曲収差の補正である。歪み補正は、フロントカメラ21の光学系そのものの歪みを補正するために行われる。具体的には魚眼補正などである。座標変換により、特徴点の座標は、被写体が透視投影によって撮影された場合に二次元画像上で得られる座標に変換される。 When the optical flow OF1 of the first feature point FP1 and the optical flow OF2 of the second feature point FP2 are derived, the identifying unit 122 applies internal parameters to the front camera 21 stored in the storage unit 13 for the feature points. Coordinate transformation is performed using In the coordinate conversion, aberration correction and distortion correction of the front camera 21 are performed. Aberration correction is performed to correct distortion due to aberration of the optical system of the front camera 21 . Specifically, it is correction of distortion such as barrel distortion and pincushion distortion. Distortion correction is performed to correct distortion of the optical system itself of the front camera 21 . Specifically, it is fisheye correction. Coordinate transformation converts the coordinates of the feature points into coordinates obtained on a two-dimensional image when the subject is photographed by perspective projection.

特徴点の座標変換が行われると、特定部122は、図8に示すように、第1特徴点FP1のオプティカルフローOF1の始点を頂点SP1、第1特徴点FP1のオプティカルフローOF1の終点を頂点EP1、第2特徴点FP1のオプティカルフローOF2の始点を頂点SP2、及び第2特徴点FP2のオプティカルフローOF2の終点を頂点EPとする四角形QLを仮想的に形成する。 When the feature point coordinate transformation is performed, the identifying unit 122 sets the starting point of the optical flow OF1 of the first feature point FP1 to the vertex SP1 and the end point of the optical flow OF1 of the first feature point FP1 to the vertex, as shown in FIG. A quadrangle QL is virtually formed in which the starting point of the optical flow OF2 of EP1 and the second feature point FP1 is the vertex SP2, and the end point of the optical flow OF2 of the second feature point FP2 is the vertex EP.

図6に戻ってフローチャートのステップS5より後の処理に関して説明する。 Returning to FIG. 6, the processing after step S5 in the flowchart will be described.

四角形QLが仮想的に形成されると、特定部122は、四角形QLと、記憶部13に記憶されているフロントカメラ21の内部パラメータとを用いて、三次元空間におけるフロントカメラ21の投影面IMG上に四角形QLを移動させ、投影面IMG上での四角形QL1を仮想的に生成する(ステップS6)。 When the quadrangle QL is virtually formed, the specifying unit 122 uses the quadrangle QL and the internal parameters of the front camera 21 stored in the storage unit 13 to determine the projection plane IMG of the front camera 21 in the three-dimensional space. The quadrangle QL is moved upward to virtually generate a quadrangle QL1 on the projection plane IMG (step S6).

なお説明のため、以下のように四角形QL1の辺を定義する(図9参照)。四角形QL1の第1辺SD1は、四角形QLにおいて、頂点SP1および頂点SP2を結んだ辺に対応する。つまり、第1特徴点FP1のオプティカルフローOF1の始点と第2特徴点FP2のオプティカルフローOF2の始点とを結んだ辺に相当する。同様に、四角形QL1の第2辺SD2は、四角形QLにおいて、頂点SP2および頂点EP2を結んだ辺に対応する。つまり、第2特徴点FP2のオプティカルフローOF2に相当する。同様に、四角形QL1の第3辺SD3は、四角形QLにおいて、頂点EP1および頂点EP2を結んだ辺に対応する。つまり、第1特徴点FP1のオプティカルフローOF1の終点と第2特徴点FP2のオプティカルフローOF2の終点とを結んだ辺に相当する。同様に、四角形QL1の第4辺SD4は、四角形QLにおいて、頂点SP1および頂点EP1を結んだ辺に対応する。つまり、第1特徴点FP1のオプティカルフローOF1に相当する。 For the sake of explanation, the sides of quadrangle QL1 are defined as follows (see FIG. 9). A first side SD1 of quadrangle QL1 corresponds to a side connecting vertex SP1 and vertex SP2 in quadrangle QL. That is, it corresponds to the side connecting the starting point of the optical flow OF1 of the first feature point FP1 and the starting point of the optical flow OF2 of the second feature point FP2. Similarly, the second side SD2 of quadrangle QL1 corresponds to the side connecting vertex SP2 and vertex EP2 in quadrangle QL. That is, it corresponds to the optical flow OF2 of the second feature point FP2. Similarly, the third side SD3 of quadrangle QL1 corresponds to the side connecting vertex EP1 and vertex EP2 in quadrangle QL. That is, it corresponds to the side connecting the end point of the optical flow OF1 of the first feature point FP1 and the end point of the optical flow OF2 of the second feature point FP2. Similarly, the fourth side SD4 of quadrangle QL1 corresponds to the side connecting vertex SP1 and vertex EP1 in quadrangle QL. That is, it corresponds to the optical flow OF1 of the first feature point FP1.

また、以下のように面を定義する(図9参照)。四角形QL1の第1辺SD1とフロントカメラ21の光学中心OCとが含まれる面を第1面F1とする。同様に、四角形QL1の第2辺SD2とフロントカメラ21の光学中心OCとが含まれる面を第2面F2とする。同様に、四角形QL1の第3辺SD3とフロントカメラ21の光学中心OCとが含まれる面を第3面F3とする。同様に、四角形QL1の第4辺SD4とフロントカメラ21の光学中心OCとが含まれる面を第4面F4とする。 Also, a surface is defined as follows (see FIG. 9). A plane including the first side SD1 of the quadrangle QL1 and the optical center OC of the front camera 21 is defined as a first plane F1. Similarly, a plane including the second side SD2 of the quadrangle QL1 and the optical center OC of the front camera 21 is defined as a second plane F2. Similarly, a surface including the third side SD3 of the quadrangle QL1 and the optical center OC of the front camera 21 is defined as a third surface F3. Similarly, a plane including the fourth side SD4 of the quadrangle QL1 and the optical center OC of the front camera 21 is defined as a fourth plane F4.

ステップS6に続くステップS7において、特定部122は、所定の平面との交線が互いに平行になる面の組を2組特定する。所定の平面とはあらかじめ平面の法線が分かっている面である。具体的には車両5が移動を行っている平面であり、つまり路面である。所定の平面は、厳密な平面でなくてもよく、特定部122が所定の平面との交線が互いに平行になる面の組を2組特定する際に平面とみなすことができるものであればよい。 In step S7 following step S6, the identifying unit 122 identifies two sets of planes whose intersection lines with a predetermined plane are parallel to each other. A predetermined plane is a plane whose normal is known in advance. Specifically, it is a plane on which the vehicle 5 is moving, that is, a road surface. The predetermined plane does not have to be a strict plane, as long as it can be regarded as a plane when the specifying unit 122 specifies two sets of planes whose intersection lines with the predetermined plane are parallel to each other. good.

本実施形態では、第1特徴点及び第2特徴点は路面などの所定の平面上に位置している静止物から抽出される。したがって、特定部122によって導出される第1特徴点及び第2特徴点の各オプティカルフローは実世界上では、車両5に対する静止物の相対的な位置変化を表す。つまり向きが逆となった車両5の移動ベクトルである。 In this embodiment, the first feature point and the second feature point are extracted from a stationary object positioned on a predetermined plane such as a road surface. Therefore, each optical flow of the first feature point and the second feature point derived by the identifying unit 122 represents the relative position change of the stationary object with respect to the vehicle 5 in the real world. That is, it is the movement vector of the vehicle 5 whose direction is reversed.

四角形QL1の第2辺SD2と第4辺SD4とは、共に特徴点のオプティカルフローに対応するので、共に実世界上では車両5の移動ベクトルに相当する。したがって、路面上では互いに平行となると想定される。 The second side SD2 and the fourth side SD4 of the quadrangle QL1 both correspond to the optical flow of the feature points, and thus both correspond to the movement vector of the vehicle 5 in the real world. Therefore, it is assumed that they are parallel to each other on the road surface.

また、四角形QL1の第1辺SD1と第3辺SD3とは、共に特徴点同士の位置関係なので、実世界上では車両5の移動に伴う静止物同士の位置関係に相当する。移動前の位置関係が第1辺SD1に相当し、移動後の位置関係が第3辺SD3に相当する。このとき静止物の位置は変わらないため、移動前後で位置関係は変わらない。したがって、路面上ではこれも互いに平行となると想定される。 Further, since the first side SD1 and the third side SD3 of the quadrangle QL1 are both in the positional relationship between feature points, they correspond to the positional relationship between stationary objects accompanying the movement of the vehicle 5 in the real world. The positional relationship before movement corresponds to the first side SD1, and the positional relationship after movement corresponds to the third side SD3. Since the position of the stationary object does not change at this time, the positional relationship does not change before and after the movement. Therefore, it is assumed that they are also parallel to each other on the road surface.

したがって、特定部122は、路面との交線が平行な面として、第2面F2と第4面F4との組と、第1面F1と第3面F3との組と、の2つの組を特定する。つまり、特定部122は、オプティカルフローを含む面同士を1つの組とし、同時刻に撮影された特徴点を含む面同士を他の組として、計2つの組を特定する。 Therefore, the identification unit 122 has two sets of surfaces having parallel lines of intersection with the road surface: the set of the second surface F2 and the fourth surface F4, and the set of the first surface F1 and the third surface F3. identify. In other words, the specifying unit 122 specifies a total of two pairs of surfaces including optical flows as one pair and surfaces including feature points captured at the same time as another pair.

なお、図9において四角形QL2は、図7Aに示す撮影画像P1及び図7Bに示す撮影画像P2で得られるオプティカルフローを用いて仮想的に形成した場合、撮影画像P2の撮影時点での第1特徴点FP1の3次元空間(実世界)上の位置、撮影画像P2の撮影時点での第2特徴点FP2の3次元空間上の位置、撮影画像P1の撮影時点での第1特徴点FP1の3次元空間上の位置、及び撮影画像P1の撮影時点での第2特徴点FP2の3次元空間上の位置を頂点とする四角形である。 In addition, in FIG. 9, when the quadrangle QL2 is virtually formed using the optical flow obtained from the captured image P1 shown in FIG. 7A and the captured image P2 shown in FIG. The position of the point FP1 in the three-dimensional space (real world), the position of the second feature point FP2 in the three-dimensional space at the time of capturing the captured image P2, and the first feature point FP1 at the time of capturing the captured image P1. It is a quadrangle whose vertices are the position in the dimensional space and the position in the 3D space of the second feature point FP2 at the time of photographing the photographed image P1.

一方、図9において四角形QL2は、図7Cに示す撮影画像P11、図7Dに示す撮影画像P12、図7Eに示す撮影画像P13、及び図7Fに示す撮影画像P14で得られるオプティカルフローを用いて仮想的に形成した場合、撮影画像P12の撮影時点での第1特徴点FP1の3次元空間(実世界)上の位置、撮影画像P14の撮影時点での第2特徴点FP2の3次元空間上の位置、撮影画像P11の撮影時点での第1特徴点FP1の3次元空間上の位置、及び撮影画像P13の撮影時点での第2特徴点FP2の3次元空間上の位置を頂点とする四角形である。 On the other hand, the quadrangle QL2 in FIG. 9 is a virtual square using the optical flow obtained from the captured image P11 shown in FIG. 7C, the captured image P12 shown in FIG. 7D, the captured image P13 shown in FIG. 7E, and the captured image P14 shown in FIG. , the position of the first feature point FP1 in the three-dimensional space (real world) at the time of capturing the captured image P12, and the position of the second feature point FP2 in the three-dimensional space at the time of capturing the captured image P14. position, the position in the three-dimensional space of the first feature point FP1 at the time of capturing the captured image P11, and the position in the three-dimensional space of the second feature point FP2 at the time of capturing the captured image P13. be.

第1面F1は、四角形QL2の第1辺SD11を含む。同様に、第2面F2は四角形QL2の第2辺SD12を含み、第3面F3は四角形QL2の第3辺SD13を含み、第4面F4は四角形QL2の第4辺SD14を含む。このとき、上記のように四角形QL2は路面上に形成される平行四辺形であると想定される。 The first face F1 includes the first side SD11 of the quadrangle QL2. Similarly, the second surface F2 includes the second side SD12 of the quadrilateral QL2, the third surface F3 includes the third side SD13 of the quadrilateral QL2, and the fourth surface F4 includes the fourth side SD14 of the quadrilateral QL2. At this time, the quadrangle QL2 is assumed to be a parallelogram formed on the road surface as described above.

次に、推定部123は、路面の法線を算出する(ステップS8)。まず、推定部123は、特定部122で特定した面の組の一方である第1面F1と第3面F3とに基づき、面同士の交線の方向を求める。詳細には、第1面F1と第3面F3との交線CL1の向きを求める(図10参照)。交線CL1の方向ベクトルV1は、第1面F1の法線ベクトル及び第3面F3の法線ベクトルそれぞれと垂直なベクトルである。したがって、推定部123は、第1面F1の法線ベクトルと第3面F3の法線ベクトルとの外積により、交線CL1の方向ベクトルV1を求める。第1面F1と第3面F3は、路面との交線が平行となるため、方向ベクトルV1は路面と平行になる。 Next, the estimation unit 123 calculates the normal line of the road surface (step S8). First, the estimation unit 123 obtains the direction of the line of intersection between the surfaces based on the first surface F1 and the third surface F3, which are one of the pairs of surfaces identified by the identification unit 122 . Specifically, the direction of the line of intersection CL1 between the first surface F1 and the third surface F3 is obtained (see FIG. 10). A direction vector V1 of the line of intersection CL1 is a vector perpendicular to each of the normal vector of the first surface F1 and the normal vector of the third surface F3. Therefore, the estimation unit 123 obtains the direction vector V1 of the line of intersection CL1 from the cross product of the normal vector of the first surface F1 and the normal vector of the third surface F3. Since the first plane F1 and the third plane F3 are parallel to the road surface, the direction vector V1 is parallel to the road surface.

同様に、推定部123は、特定部122で特定した面の組の他方である第2面F2と第4面F4との交線の方向を求める。詳細には第2面F2と第4面F4との交線CL2の向きを求める(図11参照)。交線CL2の方向ベクトルV2は、第2面F2の法線ベクトル及び第4面F4の法線ベクトルそれぞれと垂直なベクトルである。したがって、推定部123は、第2面F2の法線ベクトルと第4面F4の法線ベクトルとの外積により、交線CL2の方向ベクトルV2を求める。第2面F2と第4面F4も同様に、路面との交線が平行となるため、方向ベクトルV2は路面と平行になる。 Similarly, the estimation unit 123 obtains the direction of the line of intersection between the second surface F2 and the fourth surface F4, which are the other of the set of surfaces identified by the identification unit 122 . Specifically, the direction of the intersection line CL2 between the second surface F2 and the fourth surface F4 is obtained (see FIG. 11). A direction vector V2 of the line of intersection CL2 is a vector perpendicular to each of the normal vector of the second surface F2 and the normal vector of the fourth surface F4. Therefore, the estimation unit 123 obtains the direction vector V2 of the line of intersection CL2 from the cross product of the normal vector of the second surface F2 and the normal vector of the fourth surface F4. Similarly, the second surface F2 and the fourth surface F4 also have parallel lines of intersection with the road surface, so the direction vector V2 is parallel with the road surface.

推定部123は、方向ベクトルV1と方向ベクトルV2との外積により、四角形QL2の面の法線、すなわち路面の法線を算出する。推定部123が算出した路面の法線はフロントカメラ21のカメラ座標系で算出されるため、実際の路面の法線である垂直方向との違いから3次元空間の座標系を求め、路面に対するフロントカメラ21の姿勢を推定することができる。その推定結果から推定部123は車両5に対するフロントカメラ21の姿勢を推定する(ステップS9)。なお、ステップS7の算出処理は、例えば公知のARToolkitを利用して実行することができる。 The estimating unit 123 calculates the normal to the surface of the quadrangle QL2, that is, the normal to the road surface, from the outer product of the direction vector V1 and the direction vector V2. Since the normal line of the road surface calculated by the estimating unit 123 is calculated in the camera coordinate system of the front camera 21, the coordinate system of the three-dimensional space is obtained from the difference from the vertical direction, which is the normal line of the actual road surface. The pose of the camera 21 can be estimated. Based on the estimation result, the estimation unit 123 estimates the posture of the front camera 21 with respect to the vehicle 5 (step S9). Note that the calculation process in step S7 can be executed using, for example, the known ARToolkit.

ステップS9におけるフロントカメラ21の姿勢推定が終了すると、図6に示すフローが終了する。 When the posture estimation of the front camera 21 in step S9 ends, the flow shown in FIG. 6 ends.

姿勢推定装置14は、車両5の移動を利用して、自律的に所定の平面との交線が互いに平行になる面の組を2組特定することで、特徴点の抽出誤差のみが推定精度に影響するカメラの姿勢推定を行うことができる。すなわち、姿勢推定装置14は、誤差要因が少ないカメラの姿勢推定を行うことができる。したがって、姿勢推定装置14は、カメラの姿勢を精度良く推定することができる。 The posture estimation device 14 uses the movement of the vehicle 5 to autonomously specify two sets of planes whose intersection lines with a predetermined plane are parallel to each other, so that only the feature point extraction error is the estimation accuracy. can be used to estimate the pose of the camera, which affects the In other words, the posture estimation device 14 can estimate the posture of the camera with few error factors. Therefore, the orientation estimation device 14 can accurately estimate the orientation of the camera.

また、姿勢推定装置14は、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上離れていると推定できる場合に、推定部122での特定処理及び推定部123での推定処理を実行している。これにより、図11に示す第2面F2と第4面F4とのなす角度α(α<90°)が小さくなり過ぎることを防止することができるので、交線CL2の方向ベクトルV2の算出精度の低下を防止できるとともに、第1特徴点及び第2特徴点の各座標にドットずれが生じた際の影響度を抑えることができる。その結果、第1特徴点の位置及び第2特徴点の位置に依存してカメラの姿勢推定の精度が低下することを抑制できる。 Further, when it can be estimated that the real-world position of the first feature point and the real-world position of the second feature point are separated by a first predetermined distance or more in a predetermined direction, posture estimation apparatus 14 performs the estimation. The identification process in the unit 122 and the estimation process in the estimation unit 123 are executed. As a result, it is possible to prevent the angle α (α<90°) between the second surface F2 and the fourth surface F4 shown in FIG. 11 from becoming too small. can be prevented from decreasing, and the degree of influence when dot misalignment occurs in each coordinate of the first feature point and the second feature point can be suppressed. As a result, it is possible to prevent the accuracy of camera orientation estimation from deteriorating depending on the position of the first feature point and the position of the second feature point.

例えば、図12Aに示す撮影画像のように、抽出部121が、実世界上で所定の方向に沿って第1所定距離以上離れて並ぶ2つのROI5A及び5Bを撮影画像内に設定し、互いに撮影画像内の異なる位置に設定された2つのROI5A及び5Bの一方から第1特徴点を抽出し、他方から第2特徴点を抽出するようにしてもよい。これにより、必然的に第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上離れるので、特定部122は、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上離れていると推定すればよい。つまり、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上離れているか否かを推定する推定処理が実質的に不要となる。 For example, as in the captured image shown in FIG. 12A , the extraction unit 121 sets two ROIs 5A and 5B aligned in a predetermined direction in the real world and separated by a first predetermined distance or more in the captured image, and captures each other. The first feature point may be extracted from one of the two ROIs 5A and 5B set at different positions in the image, and the second feature point may be extracted from the other. As a result, the position of the first feature point in the real world and the position of the second feature point in the real world are inevitably separated by the first predetermined distance or more in the predetermined direction. and the real-world position of the second feature point are estimated to be separated by a first predetermined distance or more in a predetermined direction. In other words, the estimation process for estimating whether or not the real-world position of the first feature point and the real-world position of the second feature point are separated by a first predetermined distance or more in a predetermined direction is substantially unnecessary. Become.

また、図12Bに示す撮影画像のように、抽出部121が、実世界上で所定の方向に沿って並ぶ3つ以上(図12Bでは4つ)のROI5C~5Fを撮影画像内に設定し、互いに撮影画像内の異なる位置に設定され隣り合っていない2つのROIの一方から第1特徴点を抽出し、他方から第2特徴点を抽出するようにしてもよい。この場合も、必然的に第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とを所定の方向において第1所定距離以上離すことが可能である。なお、3つ以上のROIを撮影画像内に設定し、互いに撮影画像内の異なる位置に設定され隣り合っていない2つのROIの一方から第1特徴点を抽出し、他方から第2特徴点を抽出する場合には、隣り合うROI同士が接していてもよい。 Further, as in the captured image shown in FIG. 12B, the extraction unit 121 sets three or more (four in FIG. 12B) ROIs 5C to 5F arranged along a predetermined direction in the real world in the captured image, The first feature point may be extracted from one of two non-adjacent ROIs set at different positions in the captured image, and the second feature point may be extracted from the other. Also in this case, it is necessarily possible to separate the real-world position of the first feature point from the real-world position of the second feature point by the first predetermined distance or more in a predetermined direction. Three or more ROIs are set in the captured image, the first feature points are extracted from one of the two ROIs that are set at different positions in the captured image and are not adjacent to each other, and the second feature points are extracted from the other. When extracting, adjacent ROIs may be in contact with each other.

また、特定部122は、撮影画像上での第1特徴点のオプティカルフローの始点と第2特徴点のオプティカルフローの始点との距離に基づき、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上離れているか否かを推定してもよい。例えば、撮影画像上での第1特徴点のオプティカルフローの始点と第2特徴点のオプティカルフローの始点との距離が閾値以上であれば、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上離れていると推定すればよい。 Further, the specifying unit 122 determines the real-world position of the first feature point and the second feature point based on the distance between the starting point of the optical flow of the first feature point and the starting point of the optical flow of the second feature point on the captured image. It may be estimated whether or not the position of the feature point in the real world is separated by a first predetermined distance or more in a predetermined direction. For example, if the distance between the starting point of the optical flow of the first feature point and the starting point of the optical flow of the second feature point on the captured image is equal to or greater than a threshold, the position of the first feature point in the real world and the second feature point It may be estimated that the position of the point in the real world is separated from the point in a predetermined direction by a first predetermined distance or more.

撮影画像上での第1特徴点のオプティカルフローの始点と第2特徴点のオプティカルフローの始点との距離として、撮影画像がフロントカメラ21またはバックカメラ22で撮影した画像である場合には例えば撮影画像の水平方向距離を採用すればよく、撮影画像がフロントカメラ21又はバックカメラ22で撮影した画像である場合には例えば撮影画像の水平方向距離を採用すればよく、左サイドカメラ23又は右サイドカメラ24で撮影した画像である場合には例えば撮影画像の垂直方向距離を採用すればよい。 The distance between the starting point of the optical flow of the first feature point and the starting point of the optical flow of the second feature point on the captured image is, for example, when the captured image is an image captured by the front camera 21 or the back camera 22. The horizontal distance of the image may be used, and if the captured image is an image captured by the front camera 21 or the back camera 22, for example, the horizontal distance of the captured image may be used. In the case of an image shot by the camera 24, for example, the vertical distance of the shot image may be used.

撮影画像上での第1特徴点のオプティカルフローの始点と第2特徴点のオプティカルフローの始点との距離の代わりに、或いは、撮影画像上での第1特徴点のオプティカルフローの始点と第2特徴点のオプティカルフローの始点との距離に加えて、撮影画像上での第1特徴点のオプティカルフローの終点と第2特徴点のオプティカルフローの終点との距離を用いてもよい。 Instead of the distance between the starting point of the optical flow of the first feature point on the captured image and the starting point of the optical flow of the second feature point, or the starting point of the optical flow of the first feature point on the captured image and the second In addition to the distance from the start point of the optical flow of the feature point, the distance between the end point of the optical flow of the first feature point and the end point of the optical flow of the second feature point on the captured image may be used.

撮影画像の位置によって撮影画像上の距離と実世界上の距離との関係は変わるので、特定部122は、撮影画像上での第1特徴点のオプティカルフローの始点の位置、撮影画像上での第2特徴点のオプティカルフローの始点の位置、撮影画像上での第1特徴点のオプティカルフローの終点の位置、及び撮影画像上での第2特徴点のオプティカルフローの終点の位置の少なくとも一つに基づき、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上離れているか否かを推定してもよい。これにより、撮影画像上での第1特徴点のオプティカルフロー及び第2特徴点のオプティカルフローのみから、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上離れているか否かを推定することができる。例えば、上記の閾値を、撮影画像上での第1特徴点のオプティカルフローの始点の位置、撮影画像上での第2特徴点のオプティカルフローの始点の位置、撮影画像上での第1特徴点のオプティカルフローの終点の位置、及び撮影画像上での第2特徴点のオプティカルフローの終点の位置の少なくとも一つに基づき、変更すればよい。 Since the relationship between the distance on the captured image and the distance in the real world changes depending on the position of the captured image, the specifying unit 122 determines the position of the starting point of the optical flow of the first feature point on the captured image, At least one of the position of the start point of the optical flow of the second feature point, the position of the end point of the optical flow of the first feature point on the captured image, and the position of the end point of the optical flow of the second feature point on the captured image , it may be estimated whether or not the real-world position of the first feature point and the real-world position of the second feature point are separated from each other by a first predetermined distance or more in a predetermined direction. Thereby, the real-world position of the first feature point and the real-world position of the second feature point are determined only from the optical flow of the first feature point and the optical flow of the second feature point on the captured image. , it can be estimated whether or not they are separated by a first predetermined distance or more in the direction of . For example, the above threshold may be the position of the starting point of the optical flow of the first feature point on the captured image, the position of the starting point of the optical flow of the second feature point on the captured image, and the position of the starting point of the optical flow of the second feature point on the captured image. and the position of the end point of the optical flow of the second feature point on the captured image.

なお、本実施形態では、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離未満しか離れていないと推定できる場合に、推定部122での特定処理及び推定部123での推定処理を実行しないことにより、第1特徴点の位置及び第2特徴点の位置に依存してカメラの姿勢推定の精度が低下することを抑制している。しかしながら、本実施形態と異なり、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離未満しか離れていないと推定できる場合でも、推定部122での特定処理及び推定部123での推定処理を実行し、例えば、カメラの姿勢推定の精度が低いことをカメラの姿勢推定結果とセットで姿勢推定装置14が出力するようにしてもよい。 Note that in the present embodiment, when it can be estimated that the real-world position of the first feature point and the real-world position of the second feature point are separated by less than a first predetermined distance in a predetermined direction, the estimation By not executing the specifying process in the unit 122 and the estimation process in the estimating unit 123, it is possible to prevent the accuracy of camera pose estimation from decreasing depending on the position of the first feature point and the position of the second feature point. ing. However, unlike the present embodiment, even if it can be estimated that the real-world position of the first feature point and the real-world position of the second feature point are less than the first predetermined distance in a predetermined direction, Even if the specific processing in the estimation unit 122 and the estimation processing in the estimation unit 123 are executed, and, for example, the posture estimation device 14 outputs that the accuracy of the camera posture estimation is low together with the camera posture estimation result. good.

また、姿勢推定装置14は、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上離れていると推定できても第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第2所定距離以上離れていると推定できる場合に、推定部122での特定処理及び推定部123での推定処理を実行しない。これにより、撮影画像において歪みが大きい位置の第1特徴点及び第2特徴点が抽出されることを防止できるので、歪みの影響によってカメラの姿勢推定の精度が低下することを抑制できる。 Moreover, even if posture estimation apparatus 14 can estimate that the real-world position of the first feature point and the real-world position of the second feature point are separated from each other by a first predetermined distance or more in a predetermined direction, the first If it can be estimated that the real-world position of the feature point and the real-world position of the second feature point are separated from each other by a second predetermined distance or more in a predetermined direction, the identification processing in the estimation unit 122 and the estimation unit 123 Do not perform the estimation process in . As a result, it is possible to prevent the first feature point and the second feature point from being extracted at positions where the distortion is large in the captured image, so that it is possible to suppress deterioration in the accuracy of estimating the pose of the camera due to the influence of the distortion.

また、姿勢推定装置14は、第1特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量及び第2特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量がそれぞれ第3所定距離以上であると推定できる場合に、推定部122での特定処理及び推定部123での推定処理を実行している。これにより、図10に示す第1面F1と第3面F3とのなす角度β(β<90°)が小さくなり過ぎることを防止することができるので、交線CL1の方向ベクトルV1の算出精度の低下を防止できるとともに、第1特徴点及び第2特徴点の各座標にドットずれが生じた際の影響度を抑えることができる。その結果、第1特徴点の位置及び第2特徴点の位置に依存してカメラの姿勢推定の精度が低下することを抑制できる。 In addition, the posture estimation device 14 calculates the movement amount of the vehicle 5 in the real world when the first feature point moves from the start point to the end point of the optical flow, and the movement amount when the second feature point moves from the start point to the end point of the optical flow. When it can be estimated that the amount of movement of the vehicle 5 in the real world is equal to or greater than the third predetermined distance, the specific process in the estimating section 122 and the estimating process in the estimating section 123 are executed. As a result, it is possible to prevent the angle β (β<90°) between the first surface F1 and the third surface F3 shown in FIG. 10 from becoming too small. can be prevented from decreasing, and the degree of influence when dot misalignment occurs in each coordinate of the first feature point and the second feature point can be suppressed. As a result, it is possible to prevent the accuracy of camera orientation estimation from deteriorating depending on the position of the first feature point and the position of the second feature point.

例えば、車両5の速度が第1所定速度以下であるときに、特定部122は、第1特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量及び第2特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量がそれぞれ第3所定距離以上であると推定すればよい。これにより、当該推定が容易になる。車両5の速度は、車速度センサ4で検出される実測値であってもよく、第1特徴点のオプティカルフロー及び第2特徴点のオプティカルフローから推定される推定速度であってもよい。 For example, when the speed of the vehicle 5 is equal to or less than the first predetermined speed, the specifying unit 122 determines the movement amount of the vehicle 5 in the real world when the first feature point moves from the start point to the end point of the optical flow, and the second It can be estimated that the amount of movement of the vehicle 5 in the real world when the feature point moves from the start point to the end point of the optical flow is equal to or greater than the third predetermined distance. This facilitates the estimation. The speed of the vehicle 5 may be a measured value detected by the vehicle speed sensor 4, or an estimated speed estimated from the optical flow at the first feature point and the optical flow at the second feature point.

例えば、抽出部121は、車両5の速度が第1所定速度以下であるときに、上述したLフレームのLの値を車両5の速度が第1所定速度より速い場合に比べて大きくし、上述したMフレーム及びNフレームのMとNとの差を車両5の速度が第1所定速度より速い場合に比べて大きくしてもよい。これにより、第1特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量及び第2特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量がそれぞれ第3所定距離以上であると推定できる場合を増やすことができる。 For example, when the speed of the vehicle 5 is equal to or lower than the first predetermined speed, the extraction unit 121 increases the value of L in the above-described L frame compared to when the speed of the vehicle 5 is higher than the first predetermined speed. The difference between M and N in the resulting M frame and N frame may be made larger than when the speed of the vehicle 5 is higher than the first predetermined speed. As a result, the movement amount of the vehicle 5 in the real world when the first feature point moves from the start point to the end point of the optical flow and the real world movement amount of the vehicle 5 when the second feature point moves from the start point to the end point of the optical flow It is possible to increase the number of cases where it can be estimated that each of the above movement amounts is equal to or greater than the third predetermined distance.

また、特定部122は、撮影画像上での第1特徴点のオプティカルフローの大きさに基づき、第1特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量及び第2特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量がそれぞれ第3所定距離以上であるか否かを推定してもよい。例えば、撮影画像上での第1特徴点のオプティカルフローの大きさが閾値以上であれば、第1特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量及び第2特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量がそれぞれ第3所定距離以上であると推定すればよい。 In addition, based on the size of the optical flow of the first feature point on the captured image, the identifying unit 122 determines the movement amount of the vehicle 5 in the real world when the first feature point moves from the start point to the end point of the optical flow. and the movement amount of the vehicle 5 in the real world when the second feature point moves from the start point to the end point of the optical flow, respectively, may be estimated as to whether or not it is equal to or greater than a third predetermined distance. For example, if the magnitude of the optical flow of the first feature point on the captured image is equal to or greater than the threshold, the amount of movement of the vehicle 5 in the real world when the first feature point moves from the start point to the end point of the optical flow and It can be estimated that the amount of movement of the vehicle 5 in the real world when the second feature point moves from the start point to the end point of the optical flow is equal to or greater than the third predetermined distance.

撮影画像上での第1特徴点のオプティカルフローの大きさの代わりに、或いは、撮影画像上での第1特徴点のオプティカルフローの大きさに加えて、撮影画像上での第2特徴点のオプティカルフローの大きさを用いてもよい。 Instead of the magnitude of the optical flow of the first feature point on the captured image, or in addition to the magnitude of the optical flow of the first feature point on the captured image, the magnitude of the second feature point on the captured image The magnitude of optical flow may also be used.

撮影画像の位置によって撮影画像上の距離と実世界上の距離との関係は変わるので、特定部122は、撮影画像上での第1特徴点のオプティカルフローの始点の位置、撮影画像上での第2特徴点のオプティカルフローの始点の位置、撮影画像上での第1特徴点のオプティカルフローの終点の位置、及び撮影画像上での第2特徴点のオプティカルフローの終点の位置の少なくとも一つに基づき、第1特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量及び第2特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量がそれぞれ第3所定距離以上であるか否かを推定してもよい。これにより、撮影画像上での第1特徴点のオプティカルフローや第2特徴点のオプティカルフローのみから、第1特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量及び第2特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量がそれぞれ第3所定距離以上であるか否かを推定することができる。例えば、上記の閾値を、撮影画像上での第1特徴点のオプティカルフローの始点の位置、撮影画像上での第2特徴点のオプティカルフローの始点の位置、撮影画像上での第1特徴点のオプティカルフローの終点の位置、及び撮影画像上での第2特徴点のオプティカルフローの終点の位置の少なくとも一つに基づき、変更すればよい。 Since the relationship between the distance on the captured image and the distance in the real world changes depending on the position of the captured image, the specifying unit 122 determines the position of the starting point of the optical flow of the first feature point on the captured image, At least one of the position of the start point of the optical flow of the second feature point, the position of the end point of the optical flow of the first feature point on the captured image, and the position of the end point of the optical flow of the second feature point on the captured image Based on, the amount of movement of the vehicle 5 in the real world when the first feature point moves from the start point to the end point of the optical flow and the real world of the vehicle 5 when the second feature point moves from the start point to the end point of the optical flow It may be estimated whether or not each of the above movement amounts is equal to or greater than a third predetermined distance. As a result, only the optical flow of the first feature point and the optical flow of the second feature point on the captured image can be used to determine the movement of the vehicle 5 in the real world when the first feature point moves from the start point to the end point of the optical flow. It is possible to estimate whether or not the movement amount of the vehicle 5 in the real world when the amount and the second feature point move from the start point to the end point of the optical flow are each a third predetermined distance or more. For example, the above threshold may be the position of the starting point of the optical flow of the first feature point on the captured image, the position of the starting point of the optical flow of the second feature point on the captured image, and the position of the starting point of the optical flow of the second feature point on the captured image. and the position of the end point of the optical flow of the second feature point on the captured image.

なお、本実施形態では、第1特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量及び第2特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量がそれぞれ第3所定距離未満であると推定できる場合に、推定部122での特定処理及び推定部123での推定処理を実行しないことにより、第1特徴点の位置及び第2特徴点の位置に依存してカメラの姿勢推定の精度が低下することを抑制している。しかしながら、本実施形態と異なり、第1特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量及び第2特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量がそれぞれ第3所定距離未満であると推定できる場合でも、推定部122での特定処理及び推定部123での推定処理を実行し、例えば、カメラの姿勢推定の精度が低いことをカメラの姿勢推定結果とセットで姿勢推定装置14が出力するようにしてもよい。 Note that in the present embodiment, the amount of movement of the vehicle 5 in the real world when the first feature point moves from the start point to the end point of the optical flow and the movement amount of the vehicle 5 when the second feature point moves from the start point to the end point of the optical flow 5 can be estimated to be less than the third predetermined distance, the position of the first feature point And, it suppresses the deterioration of the accuracy of the pose estimation of the camera depending on the position of the second feature point. However, unlike the present embodiment, the movement amount in the real world of the vehicle 5 when the first feature point moves from the start point to the end point of the optical flow and the movement amount when the second feature point moves from the start point to the end point of the optical flow Even if it can be estimated that the amount of movement of the vehicle 5 in the real world is less than the third predetermined distance, the specific processing in the estimating unit 122 and the estimation processing in the estimating unit 123 are executed, The posture estimation device 14 may output the fact that the accuracy is low together with the camera posture estimation result.

また、姿勢推定装置14は、第1特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量及び第2特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量がそれぞれ第3所定距離未満であると推定できても第1特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量及び第2特徴点がオプティカルフローの始点から終点まで移動したときの車両5の実世界上の移動量がそれぞれ第4所定距離以上であると推定できる場合に、推定部122での特定処理及び推定部123での推定処理を実行しない。これにより、第1特徴点のオプティカルフローの終点及び第2特徴点のオプティカルフローの終点が撮影画像内に収まらず、第1特徴点のオプティカルフローの終点及び第2特徴点のオプティカルフローの終点を抽出できないという不具合を防止することができる。 In addition, the posture estimation device 14 calculates the movement amount of the vehicle 5 in the real world when the first feature point moves from the start point to the end point of the optical flow, and the movement amount when the second feature point moves from the start point to the end point of the optical flow. Even if it can be estimated that the movement amount of the vehicle 5 in the real world is less than the third predetermined distance, the movement amount in the real world of the vehicle 5 when the first feature point moves from the start point to the end point of the optical flow and the third predetermined distance. When it can be estimated that the amount of movement of the vehicle 5 in the real world when the two feature points move from the start point to the end point of the optical flow is equal to or greater than the fourth predetermined distance, the specific processing in the estimation unit 122 and the estimation unit 123 Do not perform the estimation process in . As a result, the end point of the optical flow of the first feature point and the end point of the optical flow of the second feature point do not fall within the captured image, and the end point of the optical flow of the first feature point and the end point of the optical flow of the second feature point are It is possible to prevent the problem of being unable to extract.

また、姿勢推定装置14は、上述した通り、最新のオプティカルフローのみで四角形を仮想的に形成できない場合に、過去のオプティカルフローと最新のオプティカルフローを用いて四角形を仮想的に形成する。したがって、姿勢推定装置14は、最新のオプティカルフローのみで四角形を仮想的に形成することができない構成、すなわち、図6に示すフローチャートからステップS3及びS5を取り除いた動作を行う構成に比べて、カメラの姿勢推定に要する時間の長期化を抑制できる。なお、本実施形態では、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上第2所定距離未満離れていると推定でき、且つ、車両5の実世界上の現フレームの撮影時点と現フレームよりL(Lは自然数)フレーム前の撮影時点との間隔での移動量が第3所定距離以上第4所定距離未満であると推定できるという条件を満たさなければ、ステップS4が実行されないので、上述したカメラの姿勢推定に要する時間の長期化抑制効果が大きくなる。 Also, as described above, posture estimation apparatus 14 virtually forms a quadrangle using the past optical flow and the latest optical flow when a quadrangle cannot be virtually formed using only the latest optical flow. Therefore, the posture estimation device 14 has a configuration in which a quadrangle cannot be virtually formed using only the latest optical flow, that is, a configuration in which steps S3 and S5 are removed from the flowchart shown in FIG. It is possible to suppress the lengthening of the time required for posture estimation. In the present embodiment, it can be estimated that the real-world position of the first feature point and the real-world position of the second feature point are separated from each other by a first predetermined distance or more and less than a second predetermined distance in a predetermined direction. and the amount of movement of the vehicle 5 between the time of photographing the current frame in the real world and the time of photographing L (L is a natural number) frames before the current frame is greater than or equal to a third predetermined distance and less than a fourth predetermined distance. Since step S4 is not executed unless the condition that the estimation can be performed is satisfied, the above-described effect of suppressing the lengthening of the time required for estimating the orientation of the camera increases.

しかしながら、過去のオプティカルフローと最新のオプティカルフローを用いて四角形を仮想的に形成する場合、適切なオプティカルフローを用いなければ、最新のオプティカルフローのみで四角形を仮想的に形成する場合に比べて、カメラの姿勢推定の精度が大幅に低下するおそれがある。 However, in the case of virtually forming a quadrangle using the past optical flow and the latest optical flow, if an appropriate optical flow is not used, compared to the case of virtually forming a quadrangle with only the latest optical flow, The accuracy of camera pose estimation may be significantly degraded.

図6に示すステップS5の処理で用いるオプティカルフローが適切であるかは車両5の移動具合に依存する。そこで、図6に示すステップS5の処理を実行する場合、第1特徴点のオプティカルフローOP1と第2特徴点のオプティカルフローOP2との組合せは、車両5の移動情報に基づき決定されることが望ましい。 Whether the optical flow used in the process of step S5 shown in FIG. 6 is appropriate depends on how the vehicle 5 moves. Therefore, when executing the process of step S5 shown in FIG. 6, it is desirable that the combination of the optical flow OP1 of the first feature point and the optical flow OP2 of the second feature point is determined based on the movement information of the vehicle 5. .

上述した通り、姿勢推定装置14は、四角形QL2が路面上に形成される平行四辺形であるとの想定の下、カメラの姿勢推定を行っている。 As described above, the posture estimation device 14 estimates the posture of the camera on the assumption that the quadrangle QL2 is a parallelogram formed on the road surface.

第1特徴点のオプティカルフローOP1が発生するときの車両5の舵角と第2特徴点のオプティカルフローOP2が発生するときの車両5の舵角との違いが少ないほど、上記の想定と現実との乖離が小さくなる。したがって、上述した車両5の移動情報に車両5の舵角情報を含め、図6に示すステップS5の処理を実行する場合、第1特徴点のオプティカルフローOP1と第2特徴点のオプティカルフローOP2との組合せは、車両5の舵角情報に基づき決定されることが望ましい。以下、この組合せ決定手法を第1決定手法という。例えば、舵角センサ3から通信バスB1を経由して姿勢推定装置14に供給される舵角センサ3の出力を車両5の舵角情報として用いると、車両5の舵角情報が舵角の推定情報ではなく舵角の実測情報になるので、車両5の舵角情報の精度を高めることができる。 The smaller the difference between the steering angle of the vehicle 5 when the optical flow OP1 at the first feature point occurs and the steering angle of the vehicle 5 when the optical flow OP2 at the second feature point occurs, the closer the difference between the above assumption and reality. becomes smaller. Therefore, when the steering angle information of the vehicle 5 is included in the movement information of the vehicle 5 described above and the process of step S5 shown in FIG. is preferably determined based on the steering angle information of the vehicle 5 . Hereinafter, this combination determination method will be referred to as a first determination method. For example, if the output of the steering angle sensor 3, which is supplied from the steering angle sensor 3 to the attitude estimation device 14 via the communication bus B1, is used as the steering angle information of the vehicle 5, the steering angle information of the vehicle 5 can be used to estimate the steering angle. Since it is actual measurement information of the steering angle instead of information, the accuracy of the steering angle information of the vehicle 5 can be improved.

例えば、図7Dに示す撮影画像P12の撮影時点における車両5の舵角と図7Fに示す撮影画像P14の撮影時点における車両5の舵角との差が所定角度以内になるように、第1特徴点のオプティカルフローOP1と第2特徴点のオプティカルフローOP2との組合せを決定すればよい。また、例えば、図7Cに示す撮影画像P11の撮影時点から図7Dに示す撮影画像P12の撮影時点までの車両5の舵角の平均値と図7Eに示す撮影画像P13の撮影時点から図7Fに示す撮影画像P14の撮影時点までの車両5の舵角の平均値との差が所定角度以内になるように、第1特徴点のオプティカルフローOP1と第2特徴点のオプティカルフローOP2との組合せを決定してもよい。 For example, the first characteristic is set so that the difference between the steering angle of the vehicle 5 at the time of capturing the captured image P12 shown in FIG. 7D and the steering angle of the vehicle 5 at the time of capturing the captured image P14 shown in FIG. 7F is within a predetermined angle. A combination of the point optical flow OP1 and the second feature point optical flow OP2 may be determined. Further, for example, the average value of the steering angle of the vehicle 5 from the photographing time of the photographed image P11 shown in FIG. 7C to the photographing time of the photographed image P12 shown in FIG. The optical flow OP1 of the first feature point and the optical flow OP2 of the second feature point are combined so that the difference between the average value of the steering angle of the vehicle 5 and the average value of the steering angle of the vehicle 5 up to the time when the photographed image P14 shown in FIG. may decide.

第1特徴点のオプティカルフローOP1が発生するときの車両5の速度と第2特徴点のオプティカルフローOP2が発生するときの車両5の速度との違いが少ないほど、上記の想定と現実との乖離が小さくなる。したがって、上述した車両5の移動情報に車両5の速度情報を含め、図6に示すステップS5の処理を実行する場合、第1特徴点のオプティカルフローOP1と第2特徴点のオプティカルフローOP2との組合せは、車両5の速度情報に基づき決定されることが望ましい。以下、この組合せ決定手法を第2決定手法という。例えば、車速度センサ4から通信バスB1を経由して姿勢推定装置14に供給される車速度センサ4の出力を車両5の速度情報として用いると、車両5の速度情報が速度の推定情報ではなく速度の実測情報になるので、車両5の速度情報の精度を高めることができる。 The smaller the difference between the speed of the vehicle 5 when the optical flow OP1 at the first feature point occurs and the speed of the vehicle 5 when the optical flow OP2 at the second feature point occurs, the greater the divergence between the above assumption and reality. becomes smaller. Therefore, when the speed information of the vehicle 5 is included in the movement information of the vehicle 5 described above and the process of step S5 shown in FIG. The combination is desirably determined based on speed information of the vehicle 5 . Hereinafter, this combination determination method will be referred to as a second determination method. For example, if the output of the vehicle speed sensor 4, which is supplied from the vehicle speed sensor 4 to the attitude estimation device 14 via the communication bus B1, is used as the speed information of the vehicle 5, the speed information of the vehicle 5 is not speed estimation information. Since it becomes actual measurement information of the speed, the accuracy of the speed information of the vehicle 5 can be improved.

例えば、図7Dに示す撮影画像P12の撮影時点における車両5の速度と図7Fに示す撮影画像P14の撮影時点における車両5の速度との差が所定速度以内になるように、第1特徴点のオプティカルフローOP1と第2特徴点のオプティカルフローOP2との組合せを決定すればよい。また、例えば、図7Cに示す撮影画像P11の撮影時点から図7Dに示す撮影画像P12の撮影時点までの車両5の速度の平均値と図7Eに示す撮影画像P13の撮影時点から図7Fに示す撮影画像P14の撮影時点までの車両5の速度の平均値との差が所定速度以内になるように、第1特徴点のオプティカルフローOP1と第2特徴点のオプティカルフローOP2との組合せを決定してもよい。 For example, the first feature point is set so that the difference between the speed of the vehicle 5 at the time of capturing the captured image P12 shown in FIG. 7D and the speed of the vehicle 5 at the time of capturing the captured image P14 shown in FIG. 7F is within a predetermined speed. A combination of the optical flow OP1 and the optical flow OP2 of the second feature point may be determined. Further, for example, the average value of the speed of the vehicle 5 from the time of capturing the captured image P11 shown in FIG. 7C to the time of capturing the captured image P12 shown in FIG. 7D and the average value of the speed of the vehicle 5 from the time of capturing the captured image P13 shown in FIG. A combination of the optical flow OP1 of the first feature point and the optical flow OP2 of the second feature point is determined so that the difference from the average value of the speed of the vehicle 5 up to the time of shooting the shot image P14 is within a predetermined speed. may

なお、第1特徴点のオプティカルフローOP1が発生するときと第2特徴点のオプティカルフローOP1が発生するときとの時間差が短ければ、車両5の移動具合の変化も小さいことが期待できる。したがって、図6に示すステップS5の処理を実行する場合、第1特徴点のオプティカルフローOP1と第2特徴点のオプティカルフローOP2との組合せは、図7Cに示す撮影画像P11の撮影時点と図7Dに示す撮影画像P12の撮影時点の少なくとも一方に関連する時刻と図7Eに示す撮影画像P13の撮影時点と図7Fに示す撮影画像P14の撮影時点の少なくとも一方に関連する時刻との時間差に基づき決定されることが望ましい。以下、この組合せ決定手法を第3決定手法という。 If the time difference between the occurrence of the optical flow OP1 at the first feature point and the occurrence of the optical flow OP1 at the second feature point is short, it can be expected that the movement of the vehicle 5 will change little. Therefore, when executing the process of step S5 shown in FIG. 6, the combination of the optical flow OP1 of the first feature point and the optical flow OP2 of the second feature point is the time point of the taken image P11 shown in FIG. 7C and the time point of the taken image P11 shown in FIG. and the time associated with at least one of the photographing times of the photographed image P13 shown in FIG. 7E and the photographing time of the photographed image P14 shown in FIG. 7F. It is desirable that Hereinafter, this combination determination method will be referred to as a third determination method.

図7Cに示す撮影画像P11の撮影時点と図7Dに示す撮影画像P12の撮影時点の少なくとも一方に関連する時刻としては、例えば、図7Cに示す撮影画像P11の撮影時点の時刻、図7Dに示す撮影画像P12の撮影時点の時刻、図7Cに示す撮影画像P11の撮影時点と図7Dに示す撮影画像P12の撮影時点との中点の時刻等を挙げることができる。同様に、図7Eに示す撮影画像P13の撮影時点と図7Fに示す撮影画像P14の撮影時点の少なくとも一方に関連する時刻としては、例えば、図7Eに示す撮影画像P13の撮影時点の時刻、図7Fに示す撮影画像P14の撮影時点の時刻、図7Eに示す撮影画像P13の撮影時点と図7Fに示す撮影画像P14の撮影時点との中点の時刻等を挙げることができる。 Examples of the time related to at least one of the time point of the captured image P11 shown in FIG. 7C and the time point of the captured image P12 shown in FIG. Examples include the time when the captured image P12 is captured, and the midpoint time between the captured image P11 shown in FIG. 7C and the captured image P12 shown in FIG. 7D. Similarly, as the time related to at least one of the time of capturing the captured image P13 shown in FIG. 7E and the time of capturing the captured image P14 shown in FIG. 7F, for example, the time of capturing the captured image P13 shown in FIG. Examples include the time when the captured image P14 shown in 7F is captured, and the midpoint time between the time when the captured image P13 shown in FIG. 7E and the captured image P14 shown in FIG. 7F are captured.

上述した第1決定手法、第2決定手法、第3決定手法はそれぞれ単独で実施してもよく、任意の2つ以上を組み合わせて実施してもよい。 The above-described first determination method, second determination method, and third determination method may be implemented independently, or any two or more of them may be combined.

また、第1特徴点及び第2特徴点の各オプティカルフローは、向きが逆となった車両5の移動ベクトルであるので、上述した移動情報を、第1特徴点及び第2特徴点の各オプティカルフローを路面上に座標変換した結果に基づき推定された情報としてもよい。第1特徴点及び第2特徴点の各オプティカルフローを路面上に座標変換し、路面上での長さを算出することで車両5の速度を推定でき、路面上での傾きを算出することで車両5の舵角を推定できる。つまり、上述した第1決定手法、第2決定手法の代わりとして実施することができる。上述した移動情報を、第1特徴点及び第2特徴点の各オプティカルフローを路面上に座標変換した結果に基づき推定された情報とする場合、姿勢推定装置14と通信バスB1との接続が不要になる。 Further, since the optical flows of the first feature point and the second feature point are movement vectors of the vehicle 5 whose direction is reversed, the movement information described above is converted to the optical flow of the first feature point and the second feature point. Information estimated based on the result of coordinate transformation of the flow onto the road surface may be used. The speed of the vehicle 5 can be estimated by transforming the coordinates of the optical flows of the first feature point and the second feature point onto the road surface, and calculating the length on the road surface. The steering angle of the vehicle 5 can be estimated. That is, it can be implemented as an alternative to the above-described first determination method and second determination method. If the movement information described above is information estimated based on the results of coordinate transformation of the respective optical flows of the first feature points and the second feature points on the road surface, there is no need to connect the attitude estimation device 14 and the communication bus B1. become.

また、特定部122は、第1特徴点のオプティカルフローOP1が発生するときの車両5の速度(車速度センサ4で検出される実測値であってもよく上述した推定速度であってもよい)と第2特徴点のオプティカルフローOP2が発生するときの車両5の速度(車速度センサ4で検出される実測値であってもよく上述した推定速度であってもよい)との違いに基づき、第1特徴点のオプティカルフローOP1及び第2特徴点のオプティカルフローOP2の少なくとも一方を補正し、少なくとも一方が補正された第1特徴点及び第2特徴点の各オプティカルフローに基づき、路面との交線が互いに平行となる面の組を2組特定することが望ましい。これにより、カメラの姿勢推定の精度を向上させることができる。 Further, the specifying unit 122 determines the speed of the vehicle 5 when the optical flow OP1 of the first feature point occurs (it may be the actual measurement value detected by the vehicle speed sensor 4 or the estimated speed described above). and the speed of the vehicle 5 when the optical flow OP2 of the second feature point occurs (it may be the actual measured value detected by the vehicle speed sensor 4 or the estimated speed described above), At least one of the optical flow OP1 of the first feature point and the optical flow OP2 of the second feature point is corrected, and based on each optical flow of the first feature point and the second feature point, at least one of which is corrected, the intersection with the road surface It is desirable to identify two sets of planes whose lines are parallel to each other. As a result, the accuracy of camera orientation estimation can be improved.

例えば、第1特徴点のオプティカルフローOP1が発生するときの車両5の速度が第2特徴点のオプティカルフローOP2が発生するときの車両5の速度より大きい場合、第1特徴点のオプティカルフローOP1が短くなるように補正してよく、第2特徴点のオプティカルフローOP2が長くなるように補正してよく、第1特徴点のオプティカルフローOP1が短くなり且つ第2特徴点のオプティカルフローOP2が長くなるように補正してよい。 For example, if the speed of the vehicle 5 when the optical flow OP1 at the first feature point occurs is greater than the speed of the vehicle 5 when the optical flow OP2 at the second feature point occurs, the optical flow OP1 at the first feature point is The optical flow OP2 of the second feature point may be corrected to be shorter, and the optical flow OP2 of the second feature point may be corrected to be longer, the optical flow OP1 of the first feature point is shortened, and the optical flow OP2 of the second feature point is longer. can be corrected as follows.

なお、例えば路面RSがコンクリートで構成される場合、特徴点が抽出され難い。このため、特徴点の抽出誤差が大きくなり易い。しかしながら、例えば、コンクリートで構成される路面RSに汚れが存在する場合、その汚れ部分から第1特徴点FP1及び第2特徴点FP2を抽出すると、特徴度が高い特徴点を第1特徴点FP1及び第2特徴点FP2として選定することになり、第1特徴点FP1及び第2特徴点FP2の抽出誤差を抑制できると考えられる。 For example, when the road surface RS is made of concrete, it is difficult to extract feature points. For this reason, the feature point extraction error tends to increase. However, for example, when dirt exists on the road surface RS made of concrete, if the first feature point FP1 and the second feature point FP2 are extracted from the dirt portion, the feature points with high feature degrees are the first feature point FP1 and the second feature point FP2. It is considered that the extraction error of the first feature point FP1 and the second feature point FP2 can be suppressed by selecting the second feature point FP2.

汚れに限らず、特徴点が他に比べて集中して存在する高密度領域が存在する場合、その高密度領域の中から、第1特徴点FP1及び第2特徴点FP2を抽出することにより、第1特徴点FP1及び第2特徴点FP2の抽出誤差を抑制できると考えられる。したがって、特徴点が他に比べて集中して存在する高密度領域が存在する場合、その高密度領域の中から、第1特徴点FP1及び第2特徴点FP2が抽出部121によって抽出されてもよい。 When there is a high-density area in which feature points are more concentrated than others, regardless of dirt, by extracting the first feature point FP1 and the second feature point FP2 from the high-density area, It is considered that extraction errors of the first feature point FP1 and the second feature point FP2 can be suppressed. Therefore, when there is a high-density area where feature points are more concentrated than others, even if the extraction unit 121 extracts the first feature point FP1 and the second feature point FP2 from the high-density area, good.

また、コーナー度が高い特徴点の抽出では、抽出誤差が小さくなる。したがって、記第1特徴点及び前記第2特徴点を、コーナーらしさを示すコーナー度が所定のコーナー度閾値以上となる特定の特徴点としてもよい。コーナーとは2つのエッジが交わる部分である。コーナーでは、コーナー度が高くなる。コーナー度は、例えばHarrisオペレータやKLT(Kanade-Lucas-Tomasi)トラッカーなどの公知の検出手法を用いて求めることができる。 In addition, the extraction error is small when extracting feature points with a high degree of cornering. Therefore, the first feature point and the second feature point may be specific feature points whose corner degree indicating cornerness is equal to or greater than a predetermined corner degree threshold value. A corner is where two edges meet. At corners, the degree of cornering increases. The corner degree can be determined using a known detection method such as Harris operator or KLT (Kanade-Lucas-Tomasi) tracker.

なお、上記の説明ではフロントカメラ21の光学中心OCと、四角形QL1の1つの辺を含む平面を特定するとしたがこの限りではない。当該平面の法線方向の特定をもって平面を特定するとしてもよい。例えば光学中心OCから各頂点への方向ベクトルの外積により平面の法線方向を求め、該法線方向によって面を特定するとしてもよい。この場合、第1面F1の法線方向と第3面F3の法線方向とを1つの組とし、第2面F2の法線方向と第4面F4の法線方向とを他の組として2つの組を特定するとよい。 In the above description, the plane including the optical center OC of the front camera 21 and one side of the quadrangle QL1 is specified, but this is not the only option. A plane may be specified by specifying the normal direction of the plane. For example, the normal direction of the plane may be obtained from the outer product of the direction vectors from the optical center OC to each vertex, and the plane may be identified by the normal direction. In this case, the normal direction of the first surface F1 and the normal direction of the third surface F3 are set as one set, and the normal direction of the second surface F2 and the normal direction of the fourth surface F4 are set as another set. Two sets may be identified.

また、面は平行移動させてもよい。例えば第1面F1の代わりに、第1面F1を平行移動させた面を第3面F3と組としてもよい。平行移動しても所定の平面との交線の向きは変わらないからである。 Also, the plane may be translated. For example, instead of the first plane F1, a plane translated from the first plane F1 may be paired with the third plane F3. This is because the direction of the line of intersection with a predetermined plane does not change even if it is translated.

<3.補正システム>
図13は、実施形態に係る補正システムSYS2の構成を示すブロック図である。図13において、図1と同一の部分には同一の符号を付し詳細な説明を省略する。図13に示すように、補正システムSYS2は、補正装置1’及び撮影部2を備える。
<3. Correction system>
FIG. 13 is a block diagram showing the configuration of the correction system SYS2 according to the embodiment. In FIG. 13, the same parts as those in FIG. 1 are denoted by the same reference numerals, and detailed description thereof will be omitted. As shown in FIG. 13, the correction system SYS2 includes a correction device 1' and an imaging unit 2. FIG.

補正装置1’は、図1に示す異常検出装置1から判定部124を取り除き補正部125を追加した構成と同一である。すなわち、補正装置1’は、姿勢推定装置14及び補正部125を備える。 The correction device 1' has the same configuration as that of the abnormality detection device 1 shown in FIG. That is, the correction device 1 ′ includes the posture estimation device 14 and the correction section 125 .

補正部125は、推定部123によって推定されたカメラの姿勢に基づき、カメラのパラメータを補正する。これにより、カメラの取付けのずれが生じても、そのずれに応じたカメラのキャリブレーションが実行されることになり、カメラの取付けのずれが撮影画像に及ぼす悪影響を抑制することができる。 The correction unit 125 corrects the parameters of the camera based on the camera orientation estimated by the estimation unit 123 . As a result, even if there is a camera mounting misalignment, the camera is calibrated according to the misalignment, and the adverse effects of the camera mounting misalignment on the captured image can be suppressed.

<4.留意事項>
本明細書における実施形態や実施例の構成は、本発明の例示にすぎない。実施形態や変形例の構成は、本発明の技術的思想を超えない範囲で適宜変更されてもよい。また、複数の実施形態及び変形例は、可能な範囲で組み合わせて実施されてよい。
<4. Notes>
The configurations of the embodiments and examples herein are merely illustrative of the present invention. The configurations of the embodiments and modifications may be changed as appropriate without departing from the technical idea of the present invention. Also, multiple embodiments and modifications may be implemented in combination within a possible range.

本発明は、上述した実施形態のように、自動駐車等の移動体の運転支援を行うカメラの姿勢推定を行うために利用することができる。また、本発明は、ドライブレコーダ等の運転情報を記録するカメラの姿勢推定を行うために利用することができる。また、本発明は、上述した実施形態のように、カメラの姿勢の推定情報を利用して撮影画像を補正する補正装置等に利用することができる。また、本発明は、複数の移動体とネットワークにより通信可能に設けられるセンターと連携して動作する装置等に利用することができる。当該装置は、例えば、センターに撮影画像を送信する場合に、カメラの異常情報や姿勢の推定情報を撮影画像とセットにして送信する構成であってよい。そしてセンターでは、カメラの姿勢の推定情報を用いて、各種画像処理(カメラの姿勢も考慮した画像の視点・視方向を変更する処理、例えば車両の車体前方方向の画像に視点・視方向変換した画像を生成する等)、画像を用いた計測処理におけるカメラの姿勢に対する補正処理、カメラ姿勢の経年変化を統計処理(多くの車両のデータ)、等を行いユーザへの有用な提供データを生成する等する。 INDUSTRIAL APPLICABILITY As in the above-described embodiments, the present invention can be used for estimating the orientation of a camera that assists driving of a moving object such as automatic parking. The present invention can also be used to estimate the orientation of a camera that records driving information, such as a drive recorder. Moreover, the present invention can be used in a correction device or the like that corrects a photographed image using the estimation information of the orientation of the camera, as in the above-described embodiments. Further, the present invention can be used for a device or the like that operates in cooperation with a center that is provided so as to be able to communicate with a plurality of moving bodies via a network. For example, when transmitting a photographed image to the center, the apparatus may be configured to transmit the abnormal information of the camera and the estimation information of the posture together with the photographed image. Then, at the center, using the estimated camera posture, various image processing (processing to change the viewpoint and viewing direction of the image considering the camera posture, such as changing the viewpoint and viewing direction to an image in front of the vehicle body) image generation, etc.), correction processing for camera posture in measurement processing using images, statistical processing of changes in camera posture over time (data from many vehicles), etc. to generate useful data to be provided to users. equal.

上述した実施形態では、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上第2所定距離未満離れていると推定でき、且つ、車両5の実世界上の現フレームの撮影時点と現フレームよりL(Lは自然数)フレーム前の撮影時点との間隔での移動量が第3所定距離以上第4所定距離未満であると推定できるという条件を満たさなければ、ステップS4が実行されない。 In the embodiment described above, it can be estimated that the real-world position of the first feature point and the real-world position of the second feature point are separated from each other by a first predetermined distance or more and less than a second predetermined distance in a predetermined direction, In addition, the amount of movement of the vehicle 5 between the time of photographing the current frame in the real world and the time of photographing L (L is a natural number) frames before the current frame is greater than or equal to a third predetermined distance and less than a fourth predetermined distance. If the condition that estimation is possible is not satisfied, step S4 is not executed.

しかしながら、第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上第2所定距離未満離れていると推定できるという条件を満たしさえすれば、ステップS4が実行されるようにしてもよい。また、車両5の実世界上の現フレームの撮影時点と現フレームよりL(Lは自然数)フレーム前の撮影時点との間隔での移動量が第3所定距離以上第4所定距離未満であると推定できるという条件を満たしさえすれば、ステップS4が実行されるようにしてもよい。ステップS5の実行に関しても同様の変形が可能である。これらの変形例は、上述した実施形態に比べると、姿勢推定の精度が低下することを抑制する効果が小さくなるが、上記のような条件設定を全く行わない場合に比べると、姿勢推定の精度が低下することを抑制することができる。 However, even if it satisfies the condition that it can be estimated that the real-world position of the first feature point and the real-world position of the second feature point are separated from each other by a first predetermined distance or more and less than a second predetermined distance in a predetermined direction. Then, step S4 may be executed. Further, if the amount of movement between the time of photographing the current frame in the real world of the vehicle 5 and the time of photographing L (L is a natural number) frames before the current frame is greater than or equal to a third predetermined distance and less than a fourth predetermined distance. Step S4 may be executed as long as the condition that estimation is possible is satisfied. Similar modifications are possible for the execution of step S5. Compared to the above-described embodiment, these modified examples have a smaller effect of suppressing a decrease in posture estimation accuracy. can be suppressed.

また、上述した実施形態に比べると、姿勢推定の精度が低下することを抑制する効果が小さくなるが、第2所定距離に関する条件を設けないようにしてもよい。同様に、第4所定距離に関する条件を設けないようにしてもよい。 In addition, compared to the above-described embodiment, the effect of suppressing deterioration of posture estimation accuracy is small, but the condition regarding the second predetermined distance may not be provided. Similarly, the condition regarding the fourth predetermined distance may not be provided.

1 異常検出装置
1’ 補正装置
14 姿勢推定装置
21~24 車載カメラ
11 取得部
121 抽出部
122 特定部
123 推定部
124 判定部
125 補正部
1 Abnormality Detection Device 1' Correction Device 14 Posture Estimation Device 21-24 In-Vehicle Camera 11 Acquisition Unit 121 Extraction Unit 122 Identification Unit 123 Estimation Unit 124 Judgment Unit 125 Correction Unit

Claims (15)

移動体に搭載されたカメラで撮影された撮影画像を取得する取得部と、
第1時刻と前記第1時刻より後の第2時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出し、前記第1時刻以後の第3時刻と前記第3時刻より後の第4時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出する抽出部と、
第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上離れていると推定できる場合に、前記第1時刻と前記第2時刻で撮影された2つの前記撮影画像から抽出された特徴点から、互いに対応する前記第1特徴点を選定し、前記第1特徴点の位置変化を算出し、前記第3時刻と前記第4時刻で撮影された2つの前記撮影画像から抽出された特徴点から、前記第1特徴点とは異なり、互いに対応する前記第2特徴点を選定し、前記第2特徴点の位置変化を算出し、前記第1特徴点の位置変化及び前記第2特徴点の位置変化に基づき、所定の平面との交線が互いに平行となる面の組を2組特定する特定部と、
前記特定部で特定した面の組に基づき前記カメラの姿勢を推定する推定部と、
を備える、姿勢推定装置。
an acquisition unit that acquires a captured image captured by a camera mounted on a mobile object;
A feature point is extracted from each of the two captured images captured at a first time and a second time after the first time, and a feature point is extracted at a third time after the first time and a fourth time after the third time. an extraction unit that extracts feature points from each of the two captured images captured at the same time;
the first time and the second time when it can be estimated that the real-world position of the first feature point and the real-world position of the second feature point are separated by a first predetermined distance or more in a predetermined direction; selecting the first feature points corresponding to each other from the feature points extracted from the two captured images captured in , calculating the position change of the first feature points, and calculating the third time and the fourth time Selecting the second feature points corresponding to each other, unlike the first feature points, from the feature points extracted from the two captured images captured in , calculating the positional change of the second feature points, a specifying unit that specifies two sets of planes whose lines of intersection with a predetermined plane are parallel to each other based on the positional change of the first feature point and the positional change of the second feature point;
an estimation unit that estimates the orientation of the camera based on the set of planes identified by the identification unit;
A posture estimation device comprising:
前記特定部は、前記第1特徴点の実世界上の位置と前記第2特徴点の実世界上の位置とが前記所定の方向において前記第1所定距離未満しか離れていないと推定できる場合に、前記所定の平面との交線が互いに平行となる面の組を特定しない、請求項1に記載の姿勢推定装置。 When the identifying unit can estimate that the real-world position of the first feature point and the real-world position of the second feature point are separated from each other by less than the first predetermined distance in the predetermined direction 2. The posture estimation apparatus according to claim 1, wherein a set of planes whose intersection lines with said predetermined plane are parallel to each other is not specified. 前記抽出部は、実世界上で前記所定の方向に沿って並ぶ複数の領域を前記撮影画像内に設定し、互いに前記撮影画像内の異なる位置に設定された2つの前記領域の一方から前記第1特徴点を抽出し、他方から前記第2特徴点を抽出し、
前記特定部は、前記第1特徴点の実世界上の位置と前記第2特徴点の実世界上の位置とが前記所定の方向において前記第1所定距離以上離れていると推定する、請求項1に記載の姿勢推定装置。
The extraction unit sets a plurality of regions aligned in the predetermined direction in the real world in the captured image, and selects one of the two regions set at different positions in the captured image from the first region. extracting one feature point and extracting the second feature point from the other;
The identifying unit estimates that the real-world position of the first feature point and the real-world position of the second feature point are separated by the first predetermined distance or more in the predetermined direction. 2. The posture estimation device according to 1.
前記特定部は、
前記第1時刻で撮影された前記撮影画像上での前記第1特徴点の位置と前記第3時刻で撮影された前記撮影画像上での前記第2特徴点の位置との少なくとも一方、及び、前記第1時刻で撮影された前記撮影画像上での前記第1特徴点の位置と前記第3時刻で撮影された前記撮影画像上での前記第2特徴点の位置との距離に基づき、並びに/又は、
前記第2時刻で撮影された前記撮影画像上での前記第1特徴点の位置と前記第4時刻で撮影された前記撮影画像上での前記第2特徴点の位置との少なくとも一方、及び、前記第2時刻で撮影された前記撮影画像上での前記第1特徴点の位置と前記第4時刻で撮影された前記撮影画像上での前記第2特徴点の位置との距離に基づき、
前記第1特徴点の実世界上の位置と前記第2特徴点の実世界上の位置とが前記所定の方向において前記第1所定距離以上離れているか否かを推定する、請求項1又は請求項2に記載の姿勢推定装置。
The identification unit
at least one of the position of the first feature point on the captured image captured at the first time and the position of the second feature point on the captured image captured at the third time; and based on the distance between the position of the first feature point on the captured image captured at the first time and the position of the second feature point on the captured image captured at the third time, and / or
at least one of the position of the first feature point on the captured image captured at the second time and the position of the second feature point on the captured image captured at the fourth time; and Based on the distance between the position of the first feature point on the captured image captured at the second time and the position of the second feature point on the captured image captured at the fourth time,
3. estimating whether or not the real-world position of the first feature point and the real-world position of the second feature point are separated by the first predetermined distance or more in the predetermined direction. Item 3. The posture estimation device according to item 2.
前記特定部は、前記第1特徴点の実世界上の位置と前記第2特徴点の実世界上の位置とが前記所定の方向において前記第1所定距離以上離れていると推定できても、前記第1特徴点の実世界上の位置と前記第2特徴点の実世界上の位置とが前記所定の方向において前記第1所定距離より長い第2所定距離以上離れていると推定できる場合には、前記所定の平面との交線が互いに平行となる面の組を特定しない、請求項1~4のいずれか一項に記載の姿勢推定装置。 Even if the identifying unit can estimate that the real-world position of the first feature point and the real-world position of the second feature point are separated by the first predetermined distance or more in the predetermined direction, When it can be estimated that the real-world position of the first feature point and the real-world position of the second feature point are separated by a second predetermined distance longer than the first predetermined distance in the predetermined direction. 5. The posture estimation apparatus according to claim 1, wherein does not specify a set of planes whose intersection lines with said predetermined plane are parallel to each other. 移動体に搭載されたカメラで撮影された撮影画像を取得する取得部と、
第1時刻と前記第1時刻より後の第2時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出し、前記第1時刻以後の第3時刻と前記第3時刻より後の第4時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出する抽出部と、
前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ第3所定距離以上であると推定できる場合に、前記第1時刻と前記第2時刻で撮影された2つの前記撮影画像から抽出された特徴点から、互いに対応する第1特徴点を選定し、該第1特徴点の位置変化を算出し、前記第3時刻と前記第4時刻で撮影された2つの前記撮影画像から抽出された特徴点から、前記第1特徴点とは異なり、互いに対応する第2特徴点を選定し、該第2特徴点の位置変化を算出し、前記第1特徴点の位置変化及び前記第2特徴点の位置変化に基づき、所定の平面との交線が互いに平行となる面の組を2組特定する特定部と、
前記特定部で特定した面の組に基づき前記カメラの姿勢を推定する推定部と、
を備える、姿勢推定装置。
an acquisition unit that acquires a captured image captured by a camera mounted on a mobile object;
A feature point is extracted from each of the two captured images captured at a first time and a second time after the first time, and a feature point is extracted at a third time after the first time and a fourth time after the third time. an extraction unit that extracts feature points from each of the two captured images captured at the same time;
A moving amount from the first time to the second time in the real world and a moving amount from the third time to the fourth time in the real world are each a third predetermined distance. When it can be estimated that the above is the case, a first feature point corresponding to each other is selected from the feature points extracted from the two captured images captured at the first time and the second time, and the first feature A change in the position of the point is calculated, and from the feature points extracted from the two photographed images photographed at the third time and the fourth time, a second feature point corresponding to each other, unlike the first feature point. and calculate the positional change of the second feature point, and based on the positional change of the first feature point and the positional change of the second feature point, the plane whose intersection line with a predetermined plane is parallel to each other a specifying unit that specifies two pairs;
an estimation unit that estimates the orientation of the camera based on the set of planes identified by the identification unit;
A posture estimation device comprising:
前記特定部は、前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ前記第3所定距離未満であると推定できる場合に、前記所定の平面との交線が互いに平行となる面の組を特定しない、請求項6に記載の姿勢推定装置。 The specifying unit determines that the amount of movement of the mobile body from the first time to the second time in the real world and the amount of movement of the mobile body from the third time to the fourth time in the real world are different. 7. The posture estimation apparatus according to claim 6, wherein when it can be estimated that each distance is less than the third predetermined distance, a set of planes whose intersection lines with the predetermined plane are parallel to each other is not specified. 前記移動体の速度が第1所定速度以下であるときに、前記特定部は、前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ前記第3所定距離未満であると推定する、請求項6に記載の姿勢推定装置。 When the speed of the moving body is equal to or less than a first predetermined speed, the specifying unit determines a movement amount of the moving body from the first time to the second time in the real world and 7 . The posture estimation apparatus according to claim 6 , wherein the movement amount from the third time to the fourth time is estimated to be less than the third predetermined distance. 前記移動体の速度が第1所定速度以下であるときに、
前記抽出部は、前記第1時刻と前記第2時刻との間隔及び前記第3時刻と前記第4時刻との間隔を前記移動体の速度が前記第1所定速度より速いときに比べて長くし、
前記特定部は、前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ前記第3所定距離以上であると推定する、請求項6に記載の姿勢推定装置。
when the speed of the moving object is equal to or lower than the first predetermined speed,
The extraction unit lengthens the interval between the first time and the second time and the interval between the third time and the fourth time compared to when the speed of the moving object is higher than the first predetermined speed. ,
The specifying unit determines that the amount of movement of the mobile body from the first time to the second time in the real world and the amount of movement of the mobile body from the third time to the fourth time in the real world are different. 7. The posture estimation device according to claim 6, wherein each distance is estimated to be equal to or greater than the third predetermined distance.
前記特定部は、
前記第1時刻で撮影された前記撮影画像上での前記第1特徴点の位置と前記第2時刻で撮影された前記撮影画像上での前記第1特徴点の位置との少なくとも一方、及び、前記第1時刻で撮影された前記撮影画像上での前記第1特徴点の位置と前記第2時刻で撮影された前記撮影画像上での前記第1特徴点の位置との距離に基づき、並びに、
前記第3時刻で撮影された前記撮影画像上での前記第2特徴点の位置と前記第4時刻で撮影された前記撮影画像上での前記第2特徴点の位置との少なくとも一方、及び、前記第3時刻で撮影された前記撮影画像上での前記第2特徴点の位置と前記第4時刻で撮影された前記撮影画像上での前記第2特徴点の位置との距離に基づき、
前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ第3所定距離以上であるか否かを推定する、請求項6又は請求項7に記載の姿勢推定装置。
The identification unit
at least one of the position of the first feature point on the captured image captured at the first time and the position of the first feature point on the captured image captured at the second time; and based on the distance between the position of the first feature point on the captured image captured at the first time and the position of the first feature point on the captured image captured at the second time, and ,
at least one of the position of the second feature point on the captured image captured at the third time and the position of the second feature point on the captured image captured at the fourth time; and Based on the distance between the position of the second feature point on the captured image captured at the third time and the position of the second feature point on the captured image captured at the fourth time,
A moving amount from the first time to the second time in the real world and a moving amount from the third time to the fourth time in the real world are each a third predetermined distance. 8. The posture estimation device according to claim 6, which estimates whether or not the posture is above.
前記特定部は、前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ第3所定距離以上であると推定できても、前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ前記第3所定距離長い第4所定距離以上であると推定できる場合には、前記所定の平面との交線が互いに平行となる面の組を特定しない、請求項6~10のいずれか一項に記載の姿勢推定装置。 The specifying unit determines that the amount of movement of the mobile body from the first time to the second time in the real world and the amount of movement of the mobile body from the third time to the fourth time in the real world are different. Even if it can be estimated that they are at least the third predetermined distance, the moving amount from the first time in the real world to the second time in the real world and the movement amount from the third time in the real world to the moving amount If it can be estimated that the amount of movement up to the fourth time is equal to or greater than the fourth predetermined distance, which is longer than the third predetermined distance, the set of planes whose intersection lines with the predetermined plane are parallel to each other is not specified. A posture estimation device according to any one of claims 6 to 10. 請求項1~11のいずれか一項に記載の姿勢推定装置と、
前記推定部によって推定された前記カメラの姿勢に基づき、前記カメラの取付けのずれが生じた状態であるか否かを判定する判定部と、
を備える、異常検出装置。
a posture estimation device according to any one of claims 1 to 11;
a determination unit that determines whether or not there is a mounting deviation of the camera based on the orientation of the camera estimated by the estimation unit;
An anomaly detection device.
請求項1~11のいずれか一項に記載の姿勢推定装置と、
前記推定部によって推定された前記カメラの姿勢に基づき、前記カメラのパラメータを補正する補正部と、
を備える、補正装置。
a posture estimation device according to any one of claims 1 to 11;
a correction unit that corrects parameters of the camera based on the orientation of the camera estimated by the estimation unit;
a compensator.
移動体に搭載されたカメラで撮影された撮影画像を取得する取得工程と、
第1時刻と前記第1時刻より後の第2時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出し、前記第1時刻以後の第3時刻と前記第3時刻より後の第4時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出する抽出工程と、
第1特徴点の実世界上の位置と第2特徴点の実世界上の位置とが所定の方向において第1所定距離以上離れていると推定できる場合に、前記第1時刻と前記第2時刻で撮影された2つの前記撮影画像から抽出された特徴点から、互いに対応する前記第1特徴点を選定し、前記第1特徴点の位置変化を算出し、前記第3時刻と前記第4時刻で撮影された2つの前記撮影画像から抽出された特徴点から、前記第1特徴点とは異なり、互いに対応する前記第2特徴点を選定し、前記第2特徴点の位置変化を算出し、前記第1特徴点の位置変化及び前記第2特徴点の位置変化に基づき、所定の平面との交線が互いに平行となる面の組を2組特定する特定工程と、
前記特定工程で特定した面の組に基づき前記カメラの姿勢を推定する推定工程と、
を備える、姿勢推定方法。
an acquisition step of acquiring a photographed image photographed by a camera mounted on a mobile body;
A feature point is extracted from each of the two captured images captured at a first time and a second time after the first time, and a feature point is extracted at a third time after the first time and a fourth time after the third time. an extracting step of extracting feature points from each of the two captured images captured at the same time;
the first time and the second time when it can be estimated that the real-world position of the first feature point and the real-world position of the second feature point are separated by a first predetermined distance or more in a predetermined direction; selecting the first feature points corresponding to each other from the feature points extracted from the two captured images captured in , calculating the position change of the first feature points, and calculating the third time and the fourth time Selecting the second feature points corresponding to each other, unlike the first feature points, from the feature points extracted from the two captured images captured in , calculating the positional change of the second feature points, an identifying step of identifying two sets of planes whose lines of intersection with a predetermined plane are parallel to each other based on the positional change of the first feature point and the positional change of the second feature point;
an estimating step of estimating the orientation of the camera based on the set of planes identified in the identifying step;
A pose estimation method comprising:
移動体に搭載されたカメラで撮影された撮影画像を取得する取得工程と、
第1時刻と前記第1時刻より後の第2時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出し、前記第1時刻以後の第3時刻と前記第3時刻より後の第4時刻で撮影された2つの前記撮影画像それぞれから特徴点を抽出する抽出工程と、
前記移動体の実世界上の前記第1時刻から前記第2時刻までの移動量と前記移動体の実世界上の前記第3時刻から前記第4時刻までの移動量とがそれぞれ第3所定距離以上であると推定できる場合に、前記第1時刻と前記第2時刻で撮影された2つの前記撮影画像から抽出された特徴点から、互いに対応する第1特徴点を選定し、該第1特徴点の位置変化を算出し、前記第3時刻と前記第4時刻で撮影された2つの前記撮影画像から抽出された特徴点から、前記第1特徴点とは異なり、互いに対応する第2特徴点を選定し、該第2特徴点の位置変化を算出し、前記第1特徴点の位置変化及び前記第2特徴点の位置変化に基づき、所定の平面との交線が互いに平行となる面の組を2組特定する特定工程と、
前記特定工程で特定した面の組に基づき前記カメラの姿勢を推定する推定工程と、
を備える、姿勢推定方法。
an acquisition step of acquiring a photographed image photographed by a camera mounted on a mobile body;
A feature point is extracted from each of the two captured images captured at a first time and a second time after the first time, and a feature point is extracted at a third time after the first time and a fourth time after the third time. an extracting step of extracting feature points from each of the two captured images captured at the same time;
A moving amount from the first time to the second time in the real world and a moving amount from the third time to the fourth time in the real world are each a third predetermined distance. When it can be estimated that the above is the case, a first feature point corresponding to each other is selected from the feature points extracted from the two captured images captured at the first time and the second time, and the first feature A change in the position of the point is calculated, and from the feature points extracted from the two photographed images photographed at the third time and the fourth time, a second feature point corresponding to each other, unlike the first feature point. and calculate the positional change of the second feature point, and based on the positional change of the first feature point and the positional change of the second feature point, the plane whose intersection line with a predetermined plane is parallel to each other an identifying step of identifying two pairs;
an estimating step of estimating the orientation of the camera based on the set of planes identified in the identifying step;
A pose estimation method comprising:
JP2019152640A 2019-08-23 2019-08-23 Posture estimation device, anomaly detection device, correction device, and posture estimation method Active JP7237773B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019152640A JP7237773B2 (en) 2019-08-23 2019-08-23 Posture estimation device, anomaly detection device, correction device, and posture estimation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019152640A JP7237773B2 (en) 2019-08-23 2019-08-23 Posture estimation device, anomaly detection device, correction device, and posture estimation method

Publications (2)

Publication Number Publication Date
JP2021032677A JP2021032677A (en) 2021-03-01
JP7237773B2 true JP7237773B2 (en) 2023-03-13

Family

ID=74678143

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019152640A Active JP7237773B2 (en) 2019-08-23 2019-08-23 Posture estimation device, anomaly detection device, correction device, and posture estimation method

Country Status (1)

Country Link
JP (1) JP7237773B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003329411A (en) 2002-05-14 2003-11-19 Matsushita Electric Ind Co Ltd Camera calibration device
JP2017139612A (en) 2016-02-03 2017-08-10 パナソニックIpマネジメント株式会社 On-vehicle camera calibration system
JP2019139290A (en) 2018-02-06 2019-08-22 株式会社デンソー Attitude estimating device
JP2020198074A (en) 2019-05-29 2020-12-10 株式会社デンソーテン Posture estimation device, abnormality detection device, correction device, and posture estimation method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003329411A (en) 2002-05-14 2003-11-19 Matsushita Electric Ind Co Ltd Camera calibration device
JP2017139612A (en) 2016-02-03 2017-08-10 パナソニックIpマネジメント株式会社 On-vehicle camera calibration system
JP2019139290A (en) 2018-02-06 2019-08-22 株式会社デンソー Attitude estimating device
JP2020198074A (en) 2019-05-29 2020-12-10 株式会社デンソーテン Posture estimation device, abnormality detection device, correction device, and posture estimation method

Also Published As

Publication number Publication date
JP2021032677A (en) 2021-03-01

Similar Documents

Publication Publication Date Title
CN107004277B (en) Online calibration of motor vehicle camera system
JP7256734B2 (en) Posture estimation device, anomaly detection device, correction device, and posture estimation method
JP7445415B2 (en) Posture estimation device, abnormality detection device, correction device, and posture estimation method
CN109155066B (en) Method for motion estimation between two images of an environmental region of a motor vehicle, computing device, driver assistance system and motor vehicle
JP7270499B2 (en) Abnormality detection device, abnormality detection method, posture estimation device, and mobile body control system
WO2014199929A1 (en) Monocular-motion-stereo distance estimation method, and monocular-motion-stereo distance estimation apparatus
JP6602982B2 (en) In-vehicle camera, in-vehicle camera adjustment method, in-vehicle camera system
JP2008131250A (en) Correcting device for on-board camera and production method for vehicle using same correcting device
JP6743171B2 (en) METHOD, COMPUTER DEVICE, DRIVER ASSISTING SYSTEM, AND MOTOR VEHICLE FOR DETECTION OF OBJECTS AROUND A ROAD OF A MOTOR VEHICLE
JP7212486B2 (en) position estimator
JP2010191661A (en) Traveling path recognition device, automobile, and traveling path recognition method
US10839231B2 (en) Method for detecting a rolling shutter effect in images of an environmental region of a motor vehicle, computing device, driver assistance system as well as motor vehicle
WO2019156072A1 (en) Attitude estimating device
JP7303064B2 (en) Image processing device and image processing method
JP6161704B2 (en) Imaging apparatus, vehicle, and image correction method
JP7237773B2 (en) Posture estimation device, anomaly detection device, correction device, and posture estimation method
JP7297595B2 (en) Posture estimation device, anomaly detection device, correction device, and posture estimation method
JP7311407B2 (en) Posture estimation device and posture estimation method
JP7232005B2 (en) VEHICLE DRIVING ENVIRONMENT DETECTION DEVICE AND DRIVING CONTROL SYSTEM
JP2018136739A (en) Calibration device
JP7009209B2 (en) Camera misalignment detection device, camera misalignment detection method and abnormality detection device
JP6747176B2 (en) Image processing device, photographing device, program, device control system and device
KR101293263B1 (en) Image processing apparatus providing distacnce information in a composite image obtained from a plurality of image and method using the same
JP7236352B2 (en) Posture estimation device and posture estimation method
JP7311406B2 (en) Image processing device and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220331

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230119

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230301

R150 Certificate of patent or registration of utility model

Ref document number: 7237773

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150