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

Image processing device and image processing method Download PDF

Info

Publication number
JP7303064B2
JP7303064B2 JP2019152641A JP2019152641A JP7303064B2 JP 7303064 B2 JP7303064 B2 JP 7303064B2 JP 2019152641 A JP2019152641 A JP 2019152641A JP 2019152641 A JP2019152641 A JP 2019152641A JP 7303064 B2 JP7303064 B2 JP 7303064B2
Authority
JP
Japan
Prior art keywords
speed
extraction
extraction region
vehicle
camera
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
JP2019152641A
Other languages
Japanese (ja)
Other versions
JP2021033605A (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 JP2019152641A priority Critical patent/JP7303064B2/en
Publication of JP2021033605A publication Critical patent/JP2021033605A/en
Application granted granted Critical
Publication of JP7303064B2 publication Critical patent/JP7303064B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理装置および画像処理方法に関する。 The present invention relates to an image processing device and an image processing method.

従来、形状や寸法が既知の図形を用いることなく車載カメラの現在の取り付け角度を求めることができる技術が知られる(例えば、特許文献1参照)。 2. Description of the Related Art Conventionally, there is known a technique capable of obtaining the current mounting angle of an in-vehicle camera without using a figure whose shape and dimensions are known (see, for example, Patent Document 1).

特許文献1に開示される方法は、車両に取り付けられたカメラが車両の周囲を撮像するステップと、カメラにより撮像された画像内の路面画像にもとづいて動きベクトルを検出するステップと、検出された動きベクトルを、真上視点の動きベクトルとなるように車両の進行方向軸、路面法線方向軸ならびに進行方向軸および路面法線方向軸に直交する路面平行方向軸の3軸の各軸周りに独立に回転補正させるための式である真上視点の動きベクトルへの変換式を作成するステップと、真上視点の動きベクトルへの変換式からカメラの車両に対する取り付け角度を求めるステップと、を有する。 The method disclosed in Patent Literature 1 includes the steps of capturing an image of the surroundings of the vehicle with a camera attached to the vehicle, detecting a motion vector based on a road surface image in the image captured by the camera, and detecting The motion vector is set around each of the three axes of the traveling direction axis of the vehicle, the road surface normal direction axis, and the road surface parallel direction axis orthogonal to the traveling direction axis and the road surface normal direction axis so that the motion vector becomes the motion vector of the directly above viewpoint. A step of creating a conversion formula to the motion vector of the top viewpoint, which is a formula for independent rotation correction, and a step of obtaining an installation angle of the camera with respect to the vehicle from the conversion formula to the motion vector of the top viewpoint. .

なお、動きベクトルを検出するステップは、カメラにより撮像された画像内の路面画像が特徴点を含む路面画像であるか否かを判定するステップと、路面画像が特徴点を含む路面画像であると判定されると、この特徴点を含む路面画像にもとづいて動きベクトルを検出するステップと、を有する。 Note that the step of detecting the motion vector includes the step of determining whether the road surface image in the image captured by the camera is a road surface image including the feature points, and the step of determining whether the road surface image is the road surface image including the feature points. Once determined, detecting a motion vector based on the road surface image containing this feature point.

特開2013-74325号公報JP 2013-74325 A

ところで、カメラにより撮影された画像から特徴点を抽出する場合、画像の広い範囲から特徴点を抽出する構成とした方が、多くの特徴点を抽出することができるという利点がある。しかしながら、特徴点の抽出範囲を単に広く設定するだけであると、例えば、狙いの特徴点(路面上の特徴点)に絞って特徴点を抽出したい場合に、路面上に存在する他車両等の物体の存在により、処理負担が大きくなったり、特徴点の抽出精度が低下したりすることが懸念される。 By the way, when extracting feature points from an image captured by a camera, there is an advantage that a larger number of feature points can be extracted by extracting feature points from a wider range of the image. However, if the extraction range of the feature points is simply set wide, for example, when it is desired to extract the target feature points (feature points on the road surface), it may be difficult to extract the feature points from other vehicles on the road surface. There is concern that the existence of the object increases the processing load and reduces the accuracy of feature point extraction.

また、特徴点の抽出範囲を単に広く設定すると、カメラを搭載する車両の速度が速くなった場合に、例えば撮影画像の車両の近い側において映像のブレの影響等により、特徴点の抽出精度が低下する可能性がある。また、レンズの外縁部ではレンズ歪が大きくなり易く、撮影画像の外縁側においては中央側よりも特徴点の抽出精度が低くなる傾向がある。このような傾向の影響も加わって、撮影画像の外縁側では、カメラを搭載する車両の速度が速くなった場合に特徴点の抽出精度が低下する虞がある。 In addition, if the extraction range of feature points is simply set wide, when the speed of a vehicle equipped with a camera increases, the accuracy of feature point extraction decreases on the closer side of the captured image due to the effects of image blur, for example. may decline. Further, lens distortion tends to increase at the outer edge of the lens, and the accuracy of extracting feature points tends to be lower on the outer edge side of the captured image than on the central side. In addition to the influence of such a tendency, there is a possibility that the extraction accuracy of feature points on the outer edge side of the photographed image may decrease when the speed of the vehicle on which the camera is mounted increases.

本発明は、上記の課題に鑑み、移動体に搭載されるカメラの撮影画像から、所望の特徴点の抽出精度を高めつつ、なるべく多くの特徴点を抽出することができる技術を提供することを目的とする。 In view of the above problems, it is an object of the present invention to provide a technique capable of extracting as many feature points as possible from an image captured by a camera mounted on a mobile object while increasing the accuracy of extracting desired feature points. aim.

上記目的を達成するために本発明の画像処理装置は、移動体に搭載されるカメラから撮影画像を取得する取得部と、前記撮影画像に設定される抽出領域から特徴点を抽出する抽出部と、前記カメラの撮影方向における前記移動体の外部環境に基づき前記抽出領域の設定および変更を行う設定部と、を備える構成(第1の構成)になっている。 In order to achieve the above object, the image processing apparatus of the present invention includes an acquisition unit that acquires a photographed image from a camera mounted on a mobile body, and an extraction unit that extracts feature points from an extraction region set in the photographed image. , and a setting unit that sets and changes the extraction area based on the external environment of the moving object in the shooting direction of the camera (first configuration).

また、上記第1の構成の画像処理装置は、基準抽出領域をデータとして記憶する記憶部を更に備え、前記設定部は、前記基準抽出領域を変動させて前記抽出領域を設定する構成(第2の構成)であることが好ましい。 The image processing apparatus having the first configuration further includes a storage unit that stores a reference extraction region as data, and the setting unit changes the reference extraction region to set the extraction region (second extraction region). configuration).

また、上記第2の構成の画像処理装置において、前記設定部は、前記カメラの撮影方向において前記移動体から離れて存在する物体の位置に基づき前記基準抽出領域を変動させて、前記抽出領域を設定する構成(第3の構成)であることが好ましい。 Further, in the image processing apparatus having the second configuration, the setting unit changes the reference extraction area based on the position of an object existing away from the moving body in the photographing direction of the camera to determine the extraction area. A setting configuration (third configuration) is preferable.

また、上記第3の構成の画像処理装置において、前記設定部は、前記物体が所定距離以内に存在する場合に、前記撮影画像において前記移動体に近づく方向に前記基準抽出領域の幅を狭くして前記抽出領域を設定するか、又は、前記物体が所定距離以内に存在しない場合に、前記撮影画像において前記移動体から離れる方向に前記基準抽出領域の幅を広くして前記抽出領域を設定する構成(第4の構成)であることが好ましい。 Further, in the image processing apparatus having the third configuration, the setting unit narrows the width of the reference extraction area in the direction toward the moving object in the captured image when the object exists within a predetermined distance. or setting the extraction region by increasing the width of the reference extraction region in the direction away from the moving object in the captured image when the object does not exist within a predetermined distance. A configuration (fourth configuration) is preferred.

また、上記第1から第4のいずれかの構成の画像処理装置において、前記設定部は、前記移動体の速度に基づき前記抽出領域の設定および変更を行う構成(第5の構成)であることが好ましい。 Further, in the image processing apparatus having any one of the first to fourth configurations, the setting unit is configured to set and change the extraction region based on the speed of the moving object (fifth configuration). is preferred.

また、上記第5の構成の画像処理装置は、前記記憶部を備え、前記設定部は、前記移動体の速度が第1速度以上になると、前記撮影画像において前記移動体から離れる方向に前記基準抽出領域の幅を狭くして前記抽出領域を設定するか、又は、前記移動体の速度が第1速度より小さくなると、前記撮影画像において前記移動体に近づく方向に前記基準抽出領域の幅を広くして前記抽出領域を設定する構成(第6の構成)であることが好ましい。 Further, the image processing apparatus having the fifth configuration described above includes the storage section, and the setting section moves the reference point in the direction away from the moving body in the captured image when the speed of the moving body becomes equal to or higher than a first speed. setting the extraction region by narrowing the width of the extraction region, or widening the width of the reference extraction region in the direction toward the moving object in the captured image when the speed of the moving object is lower than a first speed; It is preferable that the configuration (sixth configuration) sets the extraction region by

また、上記第5又は第6の構成の画像処理装置は、前記記憶部を備え、前記設定部は、前記移動体の速度が第2速度以上になると、前記撮影画像において前記移動体から離れる方向と交差する方向における前記基準抽出領域の幅を狭くして、前記抽出領域を設定するか、又は、前記移動体の速度が第2速度より小さくなると、前記撮影画像において前記移動体から離れる方向と交差する方向における前記基準抽出領域の幅を広くして、前記抽出領域を設定する構成(第7の構成)であってよい。 Further, the image processing apparatus having the fifth or sixth configuration includes the storage unit, and the setting unit changes the direction of moving away from the moving body in the captured image when the speed of the moving body becomes equal to or higher than a second speed. When the width of the reference extraction region in the direction intersecting with is narrowed to set the extraction region, or when the speed of the moving body becomes smaller than a second speed, the direction away from the moving body in the captured image and the A configuration (seventh configuration) may be employed in which the width of the reference extraction region in the intersecting direction is increased to set the extraction region.

また、上記第1から第7のいずれかの構成の画像処理装置は、前記特徴点に基づき前記カメラの姿勢を推定する推定部を更に備える構成(第8の構成)であってよい。 Further, the image processing apparatus having any one of the first to seventh configurations may further include an estimating unit that estimates the orientation of the camera based on the feature points (eighth configuration).

また、上記目的を達成するために本発明の画像処理方法は、移動体に搭載されるカメラから撮影画像を取得する取得工程と、前記撮影画像に設定される抽出領域から特徴点を抽出する抽出工程と、前記カメラの撮影方向における前記移動体の外部環境に基づき前記抽出領域の設定および変更を行う設定工程と、を備える構成(第9の構成)になっている。 Further, in order to achieve the above object, the image processing method of the present invention includes an acquisition step of acquiring a photographed image from a camera mounted on a moving object, and an extraction step of extracting feature points from an extraction region set in the photographed image. and a setting step of setting and changing the extraction area based on the external environment of the moving body in the photographing direction of the camera (ninth configuration).

本発明によれば、移動体に搭載されるカメラの撮影画像から、所望の特徴点の抽出精度を高めつつ、なるべく多くの特徴点を抽出することができる。 According to the present invention, it is possible to extract as many feature points as possible from an image captured by a camera mounted on a mobile object while increasing the accuracy of extracting desired feature points.

画像処理装置の構成を説明するための図A diagram for explaining the configuration of an image processing apparatus. 画像処理装置において実行されるカメラの姿勢推定処理の一例を示すフローチャート3 is a flow chart showing an example of camera posture estimation processing executed in an image processing device; 特徴点の抽出について説明するための図Diagram for explaining extraction of feature points オプティカルフローの導出について説明するための図Diagram for explaining derivation of optical flow オプティカルフローから仮想的に形成される四角形を示す図A diagram showing a rectangle formed virtually from optical flow 所定の平面との交線が互いに平行になる面の組を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 設定部による抽出領域の設定および変更について説明するための第1図FIG. 1 for explaining the setting and change of the extraction area by the setting unit 設定部による抽出領域の設定および変更について説明するための第2図FIG. 2 for explaining the setting and change of the extraction area by the setting unit 設定部による抽出領域の設定および変更について説明するための第3図FIG. 3 for explaining the setting and change of the extraction area by the setting unit 設定部による抽出領域の設定および変更について説明するための第4図FIG. 4 for explaining the setting and change of the extraction area by the setting unit 画像処理装置における抽出領域の設定処理の一例を示すフローチャート4 is a flowchart showing an example of extraction region setting processing in an image processing apparatus; 図13のフローチャートの捕捉説明用の図Diagram for capturing and explaining the flow chart of FIG.

以下、本発明の例示的な実施形態について、図面を参照しながら詳細に説明する。以下の説明では、移動体として車両を例にとり説明するが、移動体は車両に限定されない。車両には、例えば自動車、電車、無人搬送車等の車輪のついた乗り物が広く含まれる。車両以外の移動体として、例えば船舶や航空機等が挙げられる。 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は、本発明の実施形態に係る画像処理装置1の構成を説明するための図である。図1には、画像処理装置1に情報を入力する撮影部2、舵角センサ3、および、速度センサ4も示されている。画像処理装置1は、撮影部2が搭載される車両ごとに備えられる。以下、画像処理装置1が備えられる車両のことを自車両と表現することがある。
<1. Overview of Configuration of Image Processing Apparatus>
FIG. 1 is a diagram for explaining the configuration of an image processing apparatus 1 according to an embodiment of the invention. FIG. 1 also shows a photographing unit 2 for inputting information to the image processing device 1, a steering angle sensor 3, and a speed sensor 4. FIG. The image processing device 1 is provided for each vehicle in which the photographing unit 2 is mounted. Hereinafter, the vehicle provided with the image processing device 1 may be referred to as the own vehicle.

撮影部2は、車両外部の状況を監視する目的で車両に設けられる。撮影部2は、少なくとも1つのカメラ21を備える。カメラ21は、いわゆる車載カメラであり、車両に固定配置される。カメラ21は、画像処理装置1に有線又は無線により接続され、撮影画像を画像処理装置1に出力する。 The photographing unit 2 is provided in the vehicle for the purpose of monitoring the situation outside the vehicle. The imaging unit 2 has at least one camera 21 . The camera 21 is a so-called in-vehicle camera and is fixedly arranged in the vehicle. The camera 21 is connected to the image processing device 1 by wire or wirelessly, and outputs a captured image to the image processing device 1 .

なお、撮影部2が車両の周囲の状況を監視する目的で設けられる場合には、撮影部2は、好ましくは、フロントカメラと、バックカメラと、左サイドカメラと、右サイドカメラとの4つのカメラ21を備える。フロントカメラは、車両の前方を撮影するカメラである。バックカメラは、車両の後方を撮影するカメラである。左サイドカメラは、車両の左方を撮影するカメラである。右サイドカメラは、車両の右方を撮影するカメラである。これら4つのカメラ21は、例えば魚眼レンズを用いて構成され、水平方向の画角θは180度以上とされる。これにより、4つのカメラ21によって、車両の水平方向における全周囲を撮影することができる。 In addition, when the photographing unit 2 is provided for the purpose of monitoring the situation around the vehicle, the photographing unit 2 preferably includes a front camera, a back camera, a left side camera, and a right side camera. A camera 21 is provided. The front camera is a camera that captures the front of the vehicle. A back camera is a camera that photographs the rear of a vehicle. The left side camera is a camera that captures the left side of the vehicle. The right side camera is a camera that captures the right side of the vehicle. These four cameras 21 are configured using, for example, fish-eye lenses, and have a horizontal angle of view θ of 180 degrees or more. Accordingly, the four cameras 21 can photograph the entire circumference of the vehicle in the horizontal direction.

舵角センサ3は、画像処理装置1および撮影部2が搭載される車両に備えられ、当該車両のステアリングホイール(ハンドル)の回転角を検出する。舵角センサ3の出力は、CAN(Controller Area Network)バス等の通信バスB1を介して画像処理装置1に入力される。 The steering angle sensor 3 is provided in a vehicle in which the image processing device 1 and the photographing unit 2 are mounted, and detects the rotation angle of the steering wheel (steering wheel) of the vehicle. The output of the steering angle sensor 3 is input to the image processing device 1 via a communication bus B1 such as a CAN (Controller Area Network) bus.

速度センサ4は、画像処理装置1および撮影部2が搭載される車両に備えられ、当該車両の速度を検出する。速度センサ4の出力は、通信バスB1を介して画像処理装置1に入力される。 A speed sensor 4 is provided in a vehicle in which the image processing device 1 and the photographing unit 2 are mounted, and detects the speed of the vehicle. The output of speed sensor 4 is input to image processing apparatus 1 via communication bus B1.

画像処理装置1は、本実施形態では、カメラ21の姿勢を推定する姿勢推定装置である。カメラ21は、例えば、経年劣化や外部からの衝撃等によって取付け姿勢が変化することがある。姿勢推定装置として機能する本実施形態の画像処理装置1は、カメラ21の姿勢推定を行うことにより、カメラ21の取付け姿勢の変化(異常)を検出することができる。 The image processing device 1 is a posture estimation device that estimates the posture of the camera 21 in this embodiment. The mounting posture of the camera 21 may change due to, for example, deterioration over time or an external impact. The image processing device 1 of this embodiment, which functions as a posture estimation device, can detect a change (abnormality) in the mounting posture of the camera 21 by estimating the posture of the camera 21 .

図1に示すように、画像処理装置1は、取得部11と、制御部12と、記憶部13と、を備える。 As shown in FIG. 1 , the image processing apparatus 1 includes an acquisition section 11 , a control section 12 and a storage section 13 .

取得部11は、車両(移動体)に搭載されるカメラ21から撮影画像を取得する。取得部11は、カメラ21からアナログ又はデジタルの撮影画像を所定の周期(例えば、1/30秒周期)で時間的に連続して取得する。すなわち、取得部11によって取得される撮影画像の集合体がカメラ21で撮影された動画像である。そして、取得した撮影画像がアナログの場合には、取得部11は、そのアナログの撮影画像をデジタルの撮影画像に変換(A/D変換)する。取得部11は、取得した撮影画像、或いは、取得及び変換した撮影画像を制御部12に出力する。取得部11から出力される1つの撮影画像が1つのフレーム画像となる。 The acquisition unit 11 acquires a captured image from a camera 21 mounted on a vehicle (moving body). The obtaining unit 11 temporally continuously obtains analog or digital captured images from the camera 21 at a predetermined cycle (for example, a cycle of 1/30 second). That is, an aggregate of captured images acquired by the acquisition unit 11 is the moving image captured by the camera 21 . 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 overall image processing apparatus 1 . 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.

なお、記憶部13は、基準抽出領域をデータ(基準抽出領域情報131)として記憶する。基準抽出領域は、後述する抽出領域の設定に利用される。基準抽出領域情報131は、不変でもよいが、変更可能な構成や適宜更新される構成等であってもよい。 The storage unit 13 stores the reference extraction area as data (reference extraction area information 131). The reference extraction area is used for setting an extraction area, which will be described later. The reference extraction region information 131 may be invariable, but it may also have a configuration that can be changed, a configuration that is updated as appropriate, or the like.

図1に示す抽出部121、設定部122、および、推定部123は、制御部12のCPUが記憶部13に記憶されるプログラムに従って演算処理を実行することにより実現される制御部12の機能である。言い換えると、画像処理装置1は、抽出部121と、設定部122と、推定部123とを備える。 The extraction unit 121, the setting unit 122, and the estimation unit 123 shown in FIG. be. In other words, the image processing device 1 includes an extractor 121 , a setter 122 and an estimator 123 .

なお、制御部12の抽出部121、設定部122、および、推定部123の少なくともいずれか一つは、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)等のハードウェアで構成されてもよい。また、抽出部121、設定部122、および、推定部123は、概念的な構成要素である。1つの構成要素が実行する機能を複数の構成要素に分散させたり、複数の構成要素が有する機能を1つの構成要素に統合させたりしてよい。また、取得部11は、制御部12のCPUがプログラムに従って演算処理を行うことによって実現される構成でもよい。 At least one of the extraction unit 121, the setting unit 122, and the estimation unit 123 of the control unit 12 is configured by hardware such as ASIC (Application Specific Integrated Circuit) or FPGA (Field Programmable Gate Array). good too. Also, the extraction unit 121, the setting unit 122, and the estimation unit 123 are conceptual components. A function executed 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は、撮影画像から特徴点を抽出する。特徴点は、撮影画像中のエッジの交点など、撮影画像において際立って検出できる点である。特徴点は、例えば路面に描かれた白線のエッジ、路面上のひび、路面上のしみ、路面上の砂利などである。本実施形態では、好ましい形態として、コーナーらしさを示すコーナー度が高い特徴点を抽出する。コーナーとは2つのエッジが交わる部分である。コーナー度は、例えばHarrisオペレータやKLT(Kanade-Lucas-Tomasi)トラッカーなどの公知の検出手法を用いて求めることができる。 The extraction unit 121 extracts feature points from the captured image. 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. In the present embodiment, as a preferred form, feature points with a high corner degree indicating cornerness are extracted. A corner is where two edges meet. The corner degree can be determined using a known detection method such as Harris operator or KLT (Kanade-Lucas-Tomasi) tracker.

詳細には、抽出部121は、撮影画像に設定される抽出領域から特徴点を抽出する。抽出領域は、撮影画像から所望の特徴点を効率良く抽出する等の目的で設定される。本実施形態において、所望の特徴点は、自車両が走行する路面上の特徴点である。このために、抽出領域は、撮影画像の路面が映る領域に設定される。 Specifically, the extraction unit 121 extracts feature points from an extraction region set in the captured image. The extraction area is set for the purpose of efficiently extracting a desired feature point from the captured image. In this embodiment, the desired feature point is a feature point on the road surface on which the host vehicle travels. For this reason, the extraction area is set to an area in which the road surface of the photographed image is shown.

設定部122は、抽出領域の設定および変更を行う。すなわち、抽出領域は一定ではなく、変動する。設定部122は、例えば、画像毎に抽出領域の設定の変更を行うか否かを判断してもよい。また、設定部122は、所定のフレーム数ごとに抽出領域の設定の変更を行うか否かを判断してもよい。 The setting unit 122 sets and changes the extraction region. That is, the extraction area is not constant but fluctuates. The setting unit 122 may, for example, determine whether to change the setting of the extraction region for each image. Also, the setting unit 122 may determine whether or not to change the setting of the extraction region for each predetermined number of frames.

詳細には、設定部122は、カメラ21の撮影方向における自車両(移動体)の外部環境に基づき抽出領域の設定および変更を行う。例えば、カメラ21が上述のフロントカメラである場合、設定部122は、自車両の前方の外部環境に基づき抽出領域の設定および変更を行う。このような構成とすれば、自車両の外部に存在する物体の位置に応じて抽出領域を変動させることができる。例えば、路面上に存在する物体が抽出領域に入らないように抽出領域を変動させることができる。路面上の物体が抽出領域に入らないようにできるために、路面上の特徴点を精度良く抽出することができる。また、路面上の物体が抽出領域に入らない範囲で抽出領域を広げることができ、なるべく多くの特徴点を抽出することが可能になる。 Specifically, the setting unit 122 sets and changes the extraction region based on the external environment of the own vehicle (moving body) in the shooting direction of the camera 21 . For example, if the camera 21 is the front camera described above, the setting unit 122 sets and changes the extraction region based on the external environment in front of the vehicle. With such a configuration, it is possible to change the extraction area according to the position of the object existing outside the own vehicle. For example, the extraction area can be changed so that an object existing on the road surface does not enter the extraction area. Since objects on the road surface can be prevented from entering the extraction area, feature points on the road surface can be extracted with high accuracy. In addition, the extraction area can be widened to the extent that objects on the road surface do not fall within the extraction area, making it possible to extract as many feature points as possible.

なお、本実施形態では、物体は立体物であり、路面上に描かれる標識等の路面と高さが同等とみなされるものは物体に含まない。物体は、例えば、他車両(自動車、オートバイ、自転車等を含む)、歩行者、動物、又は、壁等の静止物である。 In this embodiment, the object is a three-dimensional object, and does not include an object such as a sign drawn on the road surface that is considered to have the same height as the road surface. The objects are, for example, other vehicles (including automobiles, motorcycles, bicycles, etc.), pedestrians, animals, or stationary objects such as walls.

設定部122は、記憶部13にデータとして記憶される基準抽出領域を変動させて抽出領域を設定する。これによれば、既にあるデータを基準として抽出領域を決めることができるために、抽出領域の設定に要する負担を軽減することができる。設定部122は、詳細には、基準抽出領域を拡大したり、縮小したりさせて抽出領域を設定する。なお、設定部122は、基準抽出領域を利用することなく、抽出領域を求める構成であってもよい。設定部122による抽出領域の設定および変更の詳細について後述する。 The setting unit 122 sets the extraction region by varying the reference extraction region stored as data in the storage unit 13 . According to this, since the extraction area can be determined based on existing data, the burden required for setting the extraction area can be reduced. More specifically, the setting unit 122 sets the extraction area by enlarging or reducing the reference extraction area. Note that the setting unit 122 may be configured to obtain an extraction region without using the reference extraction region. The details of setting and changing the extraction region by the setting unit 122 will be described later.

推定部123は、特徴点に基づきカメラ21の姿勢を推定する。設定部122の機能により、特徴点を精度良く抽出できるために、カメラ21の姿勢を精度良く推定することができる。また、設定部122の機能により、特徴点の抽出数をなるべく多くすることができ、推定部123による姿勢推定の結果を増やすことができる。この結果、カメラ21の姿勢推定の信頼性を向上することができる。 The estimation unit 123 estimates the orientation of the camera 21 based on the feature points. Since feature points can be extracted with high accuracy by the function of the setting unit 122, the posture of the camera 21 can be estimated with high accuracy. Moreover, the function of the setting unit 122 can increase the number of feature points to be extracted as much as possible, and the result of posture estimation by the estimation unit 123 can be increased. As a result, the reliability of orientation estimation of the camera 21 can be improved.

なお、推定部123は、例えば、特徴点の位置の時間変化に基づき自車両の移動量推定を行う構成であってもよい。推定部123により求められた移動量と、例えば速度センサ4等から得られる自車両の移動量とを比較して、カメラ21の姿勢が推定される構成であってもよい。 Note that the estimating unit 123 may be configured to estimate the amount of movement of the own vehicle, for example, based on the temporal change in the positions of the feature points. The posture of the camera 21 may be estimated by comparing the amount of movement obtained by the estimating unit 123 and the amount of movement of the own vehicle obtained from, for example, the speed sensor 4 .

<2.姿勢推定処理>
次に、画像処理装置1によって実行されるカメラ21の姿勢推定処理について説明する。図2は、画像処理装置1において実行されるカメラ21の姿勢推定処理の一例を示すフローチャートである。なお、撮影部2が複数のカメラ21を備える場合には、画像処理装置1は、各カメラ21に対して、図2に示す姿勢推定処理を実行する。ここでは、カメラ21がフロントカメラである場合を例に、画像処理装置1によって実行されるカメラ21の姿勢推定処理について説明する。
<2. Posture Estimation Processing>
Next, posture estimation processing of the camera 21 executed by the image processing device 1 will be described. FIG. 2 is a flowchart showing an example of posture estimation processing of the camera 21 executed in the image processing device 1. As shown in FIG. Note that when the photographing unit 2 includes a plurality of cameras 21 , the image processing device 1 executes posture estimation processing shown in FIG. 2 for each camera 21 . Here, the attitude estimation processing of the camera 21 executed by the image processing device 1 will be described, taking as an example the case where the camera 21 is the front camera.

図2に示すように、まず、制御部12は、カメラ21を搭載する自車両が直進しているか否かを監視する(ステップS1)。自車両が直進しているか否かは、例えば、舵角センサ3から得られるステアリングホイールの回転角情報に基づいて判断することができる。例えば、ステアリングホイールの回転角がゼロのときに自車両が完全にまっすぐに進むとした場合に、回転角がゼロの場合だけでなく、回転角がプラス方向とマイナス方向の一定範囲内の値である場合を含めて、自車両が直進していると判断してよい。なお、直進には、前方方向の直進と、後退方向の直進との両方が含まれる。 As shown in FIG. 2, first, the control unit 12 monitors whether or not the vehicle equipped with the camera 21 is traveling straight (step S1). Whether or not the host vehicle is traveling straight can be determined, for example, based on rotation angle information of the steering wheel obtained from the steering angle sensor 3 . For example, when the steering wheel rotation angle is zero and the vehicle is traveling in a straight line, it will not only be possible when the rotation angle is zero, but also when the rotation angle is within a certain range between positive and negative directions. It may be determined that the own vehicle is going straight including the case where there is. It should be noted that straight running includes both forward straight running and backward straight running.

制御部12は、自車両の直進を検出するまで、ステップS1の監視を繰り返す。言い換えると、制御部12は、自車両が直進しない限り、姿勢の推定処理を進めない。これによれば、直進移動中における特徴点の位置変化を用いて姿勢の推定が行われることになり、自車両の進行方向が曲がっている場合の情報を用いて姿勢の推定が行われないので、姿勢の推定処理が複雑になることを避けることができる。ただし、自車両の進行方向が曲がっているときの特徴点の位置変化を用いて、姿勢の推定処理が進められる構成としてもよい。 The control unit 12 repeats the monitoring of step S1 until it detects that the vehicle is running straight. In other words, the control unit 12 does not proceed with the attitude estimation process unless the vehicle is traveling straight. According to this, the attitude is estimated using the positional changes of the feature points during straight movement, and the attitude is not estimated using the information when the traveling direction of the own vehicle is curved. , it is possible to avoid complication of pose estimation processing. However, a configuration may be adopted in which the attitude estimation process is advanced using the positional changes of the feature points when the traveling direction of the host vehicle is curved.

なお、自車両が直進走行しているか否かの判断に加えて、制御部12は、自車両の速度が所定の速度範囲内であるか否かの判断を行う構成とすることが好ましい。自車両の速度が遅すぎると、特徴点の動きが少なくオプティカルフローの導出の精度が低下する可能性がある。一方、自車両の速度が速すぎると、特徴点の動きが速すぎて特徴点を追従できない可能性がある。自車両の速度が所定の速度範囲内である場合にのみ姿勢の推定処理を進めることにより、このような不具合の発生を抑制することができる。なお、所定の速度範囲は、例えば、時速10km以上、時速40km以下等であってよい。自車両の速度は、速度センサ4を利用して取得されてよい。 In addition to determining whether the vehicle is traveling straight ahead, the control unit 12 preferably determines whether the speed of the vehicle is within a predetermined speed range. If the speed of the own vehicle is too slow, there is a possibility that the movement of the feature points will be small and the accuracy of deriving the optical flow will decrease. On the other hand, if the speed of the host vehicle is too fast, the feature points may move too fast to follow the feature points. By advancing the attitude estimation process only when the speed of the own vehicle is within a predetermined speed range, it is possible to suppress the occurrence of such a problem. The predetermined speed range may be, for example, 10 km/h or more and 40 km/h or less. The speed of the own vehicle may be acquired using the speed sensor 4 .

自車両が直進していると判断される場合(ステップS1でYes)、制御部12は、取得部11を介してカメラ21から撮影画像を取得する(ステップS2)。制御部12は、例えば数フレームから数十フレームの撮影画像を取得する。 When it is determined that the host vehicle is traveling straight (Yes in step S1), the control unit 12 acquires a captured image from the camera 21 via the acquisition unit 11 (step S2). The control unit 12 acquires, for example, several frames to several tens of captured images.

次に、抽出部121は、各フレーム画像に対して特徴点の抽出を行う(ステップS3)。抽出部121は、各フレーム画像に対して、設定部122によって設定された抽出領域から特徴点を抽出する。本実施形態では、一例として、ステップS2で取得した複数のフレーム画像に対して、同一位置に同一形状の抽出領域が設定される。抽出領域の設定の詳細については後述する。なお、フレーム画像毎に抽出領域が設定されてもよい。 Next, the extraction unit 121 extracts feature points from each frame image (step S3). The extraction unit 121 extracts feature points from the extraction region set by the setting unit 122 for each frame image. In this embodiment, as an example, extraction regions having the same shape and at the same position are set for the plurality of frame images obtained in step S2. The details of setting the extraction area will be described later. An extraction region may be set for each frame image.

図3は、抽出部121による特徴点の抽出について説明するための図である。図3は、カメラ21で撮影された撮影画像Pを模式的に示している。撮影画像Pは、自車両のボディが映り込む領域BOを含む。図3において、破線で囲われた領域5は、抽出領域である。抽出部121は、抽出領域5から特徴点を抽出する。抽出領域5の設定により、路面RSから効率良く特徴点を抽出することができる。図3に示す例では、抽出領域5は矩形状であるが、抽出領域5の形状は、例えば円形状や楕円状等、矩形状以外であってもよい。図3に示す例では、路面RSに描かれている制限速度を示す数字の部分にコーナー度が高い第1特徴点FP1及び第2特徴点FP2が存在する。このために、抽出部121は、路面RS上に存在する第1特徴点FP1及び第2特徴点FP2を抽出する。 FIG. 3 is a diagram for explaining extraction of feature points by the extraction unit 121. As shown in FIG. FIG. 3 schematically shows a photographed image P photographed by the camera 21. As shown in FIG. The captured image P includes an area BO in which the body of the vehicle is reflected. In FIG. 3, an area 5 surrounded by a dashed line is an extraction area. The extraction unit 121 extracts feature points from the extraction region 5 . By setting the extraction area 5, feature points can be efficiently extracted from the road surface RS. Although the extraction region 5 is rectangular in the example shown in FIG. 3, the shape of the extraction region 5 may be circular, elliptical, or other shapes other than rectangular. In the example shown in FIG. 3, a first feature point FP1 and a second feature point FP2 with high corner degrees are present in the portion of the number indicating the speed limit drawn on the road surface RS. For this purpose, the extraction unit 121 extracts the first feature point FP1 and the second feature point FP2 existing on the road surface RS.

なお、図3では、便宜的に2つの特徴点FP1、FP2のみが示されているが、コーナー度が所定の特徴点閾値を超える特徴点が存在すれば、これ以外にも特徴点は抽出される。逆に、コーナー度が所定の特徴点閾値を超える特徴点が存在しない場合には、特徴点は抽出されない。各フレーム画像において、特徴点が1つも抽出されないこともあり得る。 In FIG. 3, only two feature points FP1 and FP2 are shown for the sake of convenience. be. Conversely, when there is no feature point whose corner degree exceeds the predetermined feature point threshold value, no feature point is extracted. It is possible that not even one feature point is extracted from each frame image.

図3に戻って、抽出部121による特徴点の抽出処理が全てのフレーム画像に対して完了すると、推定部123は、オプティカルフローの導出を行う(ステップS4)。オプティカルフローは、異なる時刻で撮影された2つの撮影画像間における特徴点の動きを示す動きベクトルである。本例では、異なる時刻の間隔は、取得部11のフレーム周期と同一である。ただし、これに限らず、異なる時刻の間隔は、例えば、取得部11のフレーム周期の複数倍であってもよい。 Returning to FIG. 3, when the feature point extraction processing by the extraction unit 121 is completed for all frame images, the estimation unit 123 derives optical flows (step S4). Optical flow is a motion vector that indicates the motion of feature points between two captured images captured at different times. In this example, the interval between different times is the same as the frame period of the acquisition unit 11 . However, the interval between different times is not limited to this, and may be, for example, multiple times the frame period of the acquisition unit 11 .

図4は、推定部123によるオプティカルフローの導出について説明するための図である。図4は、図3と同様に便宜的に示された模式図である。図4は、図3に示す撮影画像P(便宜的に前フレームPとする)の撮影後、1フレーム周期経過した後にカメラ21で撮影された撮影画像P’(便宜的に現フレームP’とする)である。図3に示す撮影画像Pの撮影後、1フレーム周期の間、自車両は前方に直進している。図4に示す丸印FP1Pは、図3に示す前フレームPの撮影時点における第1特徴点FP1の位置を示す。図4に示す丸印FP2Pは、図3に示す前フレームPの撮影時点における第2特徴点FP2の位置を示す。 FIG. 4 is a diagram for explaining how the estimation unit 123 derives the optical flow. FIG. 4 is a schematic diagram shown for convenience similar to FIG. FIG. 4 shows a photographed image P′ (referred to as a current frame P′ for convenience) photographed by the camera 21 after one frame cycle has elapsed after photographing the photographed image P (referred to as a previous frame P for convenience) shown in FIG. do). After capturing the captured image P shown in FIG. 3, the own vehicle is traveling straight forward for one frame cycle. A circle FP1P shown in FIG. 4 indicates the position of the first feature point FP1 at the time of capturing the previous frame P shown in FIG. A circle FP2P shown in FIG. 4 indicates the position of the second feature point FP2 at the time of capturing the previous frame P shown in FIG.

図4に示すように、自車両が前方に直進すると、自車両の前方に存在する第1特徴点FP1及び第2特徴点FP2は自車両に近づく。すなわち、第1特徴点FP1及び第2特徴点FP2は、現フレームP’と前フレームPとで異なる位置に現れる。推定部123は、現フレームP’の第1特徴点FP1と前フレームPの第1特徴点FP1とを、その近傍の画素値に基づいて対応付け、対応付けた第1特徴点FP1のそれぞれの位置に基づいて、第1特徴点FP1のオプティカルフローOF1を導出する。同様に、推定部123は、現フレームP’の第2特徴点FP2と前フレームPの第2特徴点FP2とを、その近傍の画素値に基づいて対応付け、対応付けた第2特徴点FP2のそれぞれの位置に基づいて、第2特徴点FP2のオプティカルフローOF2を導出する。 As shown in FIG. 4, when the own vehicle goes straight ahead, the first feature point FP1 and the second feature point FP2 existing in front of the own vehicle approach the own vehicle. That is, the first feature point FP1 and the second feature point FP2 appear at different positions between the current frame P' and the previous frame P. FIG. The estimating unit 123 associates the first feature point FP1 of the current frame P′ with the first feature point FP1 of the previous frame P based on pixel values in the vicinity thereof, and calculates each of the associated first feature points FP1. Based on the position, the optical flow OF1 of the first feature point FP1 is derived. Similarly, the estimation unit 123 associates the second feature point FP2 of the current frame P′ with the second feature point FP2 of the previous frame P based on the neighboring pixel values, and , the optical flow OF2 of the second feature point FP2 is derived.

なお、推定部123は、取得した複数のフレーム画像のそれぞれについて上述のようにしてオプティカルフローの導出を行う。また、各フレーム画像において2つより多くのオプティカルフローが得られる場合がある。このために、推定部123は、姿勢の推定に使うためのオプティカルフローの候補を複数得る場合がある。逆に、推定部123は、姿勢の推定に使うためのオプティカルフローの候補を得られない場合もある。 Note that the estimation unit 123 derives the optical flow as described above for each of the acquired frame images. Also, more than two optical flows may be obtained in each frame image. For this reason, the estimation unit 123 may obtain a plurality of optical flow candidates to be used for posture estimation. Conversely, estimation section 123 may not be able to obtain optical flow candidates for use in posture estimation.

図2に戻って、推定部123は、オプティカルフローの導出を行うと、以後に行われる処理に使用するオプティカルフローを所定の選択条件にしたがって選択する(ステップS5)。所定の選択条件は、以後に行われる姿勢の推定に適した、2つのオプティカルフローで構成される組が選択されるように設定される。所定の選択条件を満たす組が複数存在する場合には、所定の選択条件を満たす全ての組が選択される。所定の選択条件を満たす組の数は、撮影画像から抽出される特徴点の数等によって変動する。なお、所定の選択条件を満たす組が存在しない場合には、以後の処理を行うことができない。このために、姿勢の推定処理は終了される。この段階で姿勢の推定処理が終了された場合には、姿勢の推定結果は得られないことになる。 Returning to FIG. 2, after deriving the optical flow, the estimating unit 123 selects an optical flow to be used for subsequent processing according to a predetermined selection condition (step S5). A predetermined selection condition is set such that a set of two optical flows suitable for subsequent pose estimation is selected. If there are a plurality of sets that satisfy the predetermined selection condition, all the sets that satisfy the predetermined selection condition are selected. The number of sets satisfying a predetermined selection condition varies depending on the number of feature points extracted from the captured image. It should be noted that if there is no set that satisfies a predetermined selection condition, subsequent processing cannot be performed. Therefore, the orientation estimation process is terminated. If the orientation estimation process ends at this stage, the orientation estimation result cannot be obtained.

ここで、ステップS5で選択された使用オプティカルフローの組に、図4に示す第1オプティカルフローOF1と第2オプティカルフローOF2との組が含まれるものして、ステップS6以降の処理について説明する。 Here, the processing after step S6 will be described assuming that the set of used optical flows selected in step S5 includes the set of the first optical flow OF1 and the second optical flow OF2 shown in FIG.

推定部123は、第1特徴点FP1のオプティカルフローOF1と第2特徴点FP2のオプティカルフローOF2を用いた処理を進める。推定部123は、特徴点に対し、記憶部13に記憶されているカメラ21の内部パラメータを用いて座標変換を行う。座標変換では、カメラ21の収差補正と、歪補正とが行われる。収差補正は、カメラ21の光学系の収差による歪みを補正するために行われる。具体的には樽型歪みや糸巻歪みなど歪曲収差の補正である。歪み補正は、カメラ21の光学系そのものの歪みを補正するために行われる。具体的には魚眼補正などである。座標変換により、特徴点の座標は、被写体が透視投影によって撮影された場合に二次元画像上で得られる座標に変換される。 The estimation unit 123 proceeds with processing using the optical flow OF1 of the first feature point FP1 and the optical flow OF2 of the second feature point FP2. The estimation unit 123 performs coordinate transformation on the feature points using the internal parameters of the camera 21 stored in the storage unit 13 . Aberration correction and distortion correction of the camera 21 are performed in the coordinate transformation. Aberration correction is performed to correct distortion due to aberration of the optical system of the 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 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.

特徴点の座標変換が行われると、推定部123は、図5に示すように、第1特徴点FP1のオプティカルフローOF1の始点を頂点SP1、第1特徴点FP1のオプティカルフローOF1の終点を頂点EP1、第2特徴点FP1のオプティカルフローOF2の始点を頂点SP2、及び第2特徴点FP2のオプティカルフローOF2の終点を頂点EPとする四角形QLを仮想的に形成する(ステップS6)。以降、説明のために四角形や、該四角形の辺などの幾何的要素を仮想的に形成して用いる。しかし、実際の処理では、特徴点の座標や直線の方向などのベクトル演算に基づき、同等の作用を持つ幾何的要素に基づかない処理としてもよい。 When the feature point coordinate transformation is performed, the estimation unit 123 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 with the starting point of the optical flow OF2 of EP1 and the second feature point FP1 as the vertex SP2 and the end point of the optical flow OF2 of the second feature point FP2 as the vertex EP (step S6). 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.

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

なお説明のため、以下のように辺を定義する。四角形QL1の第1辺SD1は、四角形QLにおいて、頂点SP1および頂点SP2を結んだ辺に対応する。つまり、前フレームPにおける第1特徴点FP1と第2特徴点FP2を結んだ辺に相当する。同様に、四角形QL1の第2辺SD2は、四角形QLにおいて、頂点SP2および頂点EP2を結んだ辺に対応する。つまり、第2特徴点FP2のオプティカルフローOF2に相当する。同様に、四角形QL1の第3辺SD3は、四角形QLにおいて、頂点EP1および頂点EP2を結んだ辺に対応する。つまり、現フレームP’における第1特徴点FP1と第2特徴点FP2とを結んだ辺に相当する。同様に、四角形QL1の第4辺SD4は、四角形QLにおいて、頂点SP1および頂点EP1を結んだ辺に対応する。つまり、第1特徴点FP1のオプティカルフローOF1に相当する。 For the sake of explanation, the edges are defined as follows. 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 first feature point FP1 and the second feature point FP2 in the previous frame P. 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 first feature point FP1 and the second feature point FP2 in the current frame P'. 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.

また、以下のように面を定義する(図6参照)。四角形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. 6). A plane including the first side SD1 of the quadrangle QL1 and the optical center OC of the camera 21 is defined as a first plane F1. Similarly, the plane including the second side SD2 of the quadrangle QL1 and the optical center OC of the 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 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 camera 21 is defined as a fourth plane F4.

次に、推定部123は、所定の平面との交線が互いに平行になる面の組を2組特定する(ステップS8)。所定の平面とはあらかじめ平面の法線が分かっている面である。具体的には車両が移動を行っている平面であり、つまり路面である。所定の平面は、厳密な平面でなくてもよく、推定部123が所定の平面との交線が互いに平行になる面の組を2組特定する際に平面とみなすことができるものであればよい。 Next, the estimating unit 123 identifies two sets of planes whose intersection lines with a predetermined plane are parallel to each other (step S8). A predetermined plane is a plane whose normal is known in advance. Specifically, it is the plane on which the vehicle is moving, that is, the 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 estimation unit 123 identifies two sets of planes whose intersection lines with the predetermined plane are parallel to each other. good.

本実施形態では、画像処理装置1は、自車両が直進している場合に、異なる時刻に撮影された2つの画像から特徴点を抽出し、該特徴点のオプティカルフローを算出する。また、該特徴点は路面などの所定の平面上に位置している静止物から抽出される。したがって、算出されるオプティカルフローは実世界上では、自車両に対する静止物の相対的な位置変化を表す。つまり向きが逆となった自車両の移動ベクトルである。 In this embodiment, the image processing apparatus 1 extracts feature points from two images taken at different times and calculates the optical flow of the feature points when the vehicle is traveling straight. Also, the feature points are extracted from a stationary object positioned on a predetermined plane such as a road surface. Therefore, in the real world, the calculated optical flow represents the relative position change of the stationary object with respect to the host vehicle. In other words, it is the movement vector of the own vehicle whose direction is reversed.

四角形QL1の第2辺SD2と第4辺SD4とは、共に特徴点のオプティカルフローに対応するので、共に実世界上では自車両の移動ベクトルに相当する。したがって、路面上では互いに平行となると想定される。 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 own vehicle in the real world. Therefore, it is assumed that they are parallel to each other on the road surface.

また、四角形QL1の第1辺SD1と第3辺SD3とは、共に特徴点同士の位置関係なので、実世界上では自車両の移動に伴う静止物同士の位置関係に相当する。移動前の位置関係が第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 own vehicle 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.

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

なお、図6において四角形QL2は、現フレームP’の撮影時点での第1特徴点FP1の3次元空間(実世界)上の位置、現フレームP’の撮影時点での第2特徴点FP2の3次元空間上の位置、前フレームPの撮影時点での第1特徴点FP1の3次元空間上の位置、及び前フレームPの撮影時点での第2特徴点FP2の3次元空間上の位置を頂点とする四角形である。第1面F1は、四角形QL2の第1辺SD11を含む。同様に、第2面F2は四角形QL2の第2辺SD12を含み、第3面F3は四角形QL2の第3辺SD13を含み、第4面F4は四角形QL2の第4辺SD14を含む。このとき、上記のように四角形QL2は路面上に形成される平行四辺形であると想定される。 In FIG. 6, a rectangle QL2 represents the position of the first feature point FP1 in the three-dimensional space (real world) at the time of shooting the current frame P', and the position of the second feature point FP2 at the time of shooting the current frame P'. The position in the three-dimensional space, the position in the three-dimensional space of the first feature point FP1 at the time of capturing the previous frame P, and the position in the three-dimensional space of the second feature point FP2 at the time of capturing the previous frame P are It is a rectangle with vertices. 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は、路面の法線を算出する(ステップS9)。まず、推定部123は、先に特定した面の組の一方である第1面F1と第3面F3とに基づき、面同士の交線の方向を求める。詳細には、第1面F1と第3面F3との交線CL1の向きを求める(図7参照)。交線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 S9). First, the estimating 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 previously identified sets of surfaces. Specifically, the direction of the line of intersection CL1 between the first surface F1 and the third surface F3 is determined (see FIG. 7). 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は、先に特定した面の組の他方である第2面F2と第4面F4との交線の方向を求める。詳細には第2面F2と第4面F4との交線CL2の向きを求める(図8参照)。交線CL2の方向ベクトルV2は、第2面F2の法線ベクトル及び第4面F4の法線ベクトルそれぞれと垂直なベクトルである。したがって、推定部123は、第2面F2の法線ベクトルと第4面F4の法線ベクトルとの外積により、交線CL2の方向ベクトルV2を求める。第2面F2と第4面F4も同様に、路面との交線が平行となるため、方向ベクトルV2は路面と平行になる。 Similarly, the estimating 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 previously identified surfaces. Specifically, the direction of the intersection line CL2 between the second surface F2 and the fourth surface F4 is obtained (see FIG. 8). 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は自車両に対するカメラ21の姿勢を推定する(ステップS10)。なお、ステップS9の算出処理は、例えば公知の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 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. pose can be estimated. Based on the estimation result, the estimation unit 123 estimates the posture of the camera 21 with respect to the own vehicle (step S10). Note that the calculation process in step S9 can be executed using, for example, the known ARToolkit.

ステップS10における姿勢推定が終了すると、推定部123は、ステップS5で選択した全てのオプティカルフローの組について、姿勢の推定が完了したか否かを確認する(ステップS11)。全ての組に対して姿勢の推定が完了している場合には(ステップS11でYes)、図2に示すフローが終了する。一方、全ての組に対して姿勢の推定が完了していない場合には(ステップS11でNo)、ステップS6に戻ってステップS6以降の処理が繰り返される。 When the orientation estimation in step S10 is completed, the estimation unit 123 checks whether or not orientation estimation has been completed for all optical flow pairs selected in step S5 (step S11). If posture estimation has been completed for all pairs (Yes in step S11), the flow shown in FIG. 2 ends. On the other hand, if posture estimation has not been completed for all pairs (No in step S11), the process returns to step S6 and the processes after step S6 are repeated.

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

なお、上記の説明ではカメラ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 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.

また、画像処理装置1は、複数の推定結果に基づいて姿勢の推定を確定させることが好ましい。この場合、所定数以上の姿勢の推定結果が得られるまで図2の処理を繰り返す構成としてよい。所定数以上の姿勢の推定結果が蓄積された時点で、例えば、平均値、又は、ヒストグラムの中央値やピーク値を求めて、当該求めた結果を姿勢推定の確定結果としてよい。姿勢推定の確定結果は、画像処理装置1における更なる処理に利用されてもよいし、外部装置に出力されてもよい。 Also, the image processing device 1 preferably determines the posture estimation based on a plurality of estimation results. In this case, the processing in FIG. 2 may be repeated until a predetermined number or more of orientation estimation results are obtained. When a predetermined number or more of posture estimation results are accumulated, for example, an average value or a median value or peak value of a histogram may be obtained, and the obtained result may be used as the fixed result of posture estimation. The determination result of posture estimation may be used for further processing in the image processing device 1 or may be output to an external device.

姿勢推定の確定結果に基づいて、例えば、カメラ21の取付けのずれが生じた状態であるか否かが判定されてよい。カメラ21の取付けのずれが生じた状態であると判定された場合、例えば、当該異常事態が自車両のユーザに報知される。これにより、自車両のユーザはディーラによるカメラの取付け調整を依頼する等の対策をとることが可能となる。 For example, it may be determined whether or not the mounting of the camera 21 is misaligned based on the determination result of orientation estimation. When it is determined that the mounting of the camera 21 is in a state of deviation, for example, the user of the own vehicle is notified of the abnormal situation. As a result, the user of the own vehicle can take measures such as requesting the dealer to adjust the installation of the camera.

また、カメラ21の姿勢推定の確定結果は、カメラ21のパラメータの補正に利用されてよい。これにより、カメラ21の取付けのずれが生じても、そのずれに応じたカメラのキャリブレーションが実行されることになり、カメラ21の取付けのずれが撮影画像に及ぼす悪影響を抑制することができる。また、姿勢の推定結果は、複数の車両とネットワークにより通信可能に設けられるセンターに撮影画像を送信する場合に、撮影画像とセットにしてセンターに送信されてもよい。これにより、センターでの撮影情報の取り扱いを適切に行うことができる。 Also, the determined result of pose estimation of the camera 21 may be used to correct the parameters of the camera 21 . As a result, even if the camera 21 is misaligned, the camera is calibrated according to the misalignment, and the adverse effects of the misalignment of the camera 21 on the captured image can be suppressed. Further, when the photographed images are transmitted to a center which is provided so as to be able to communicate with a plurality of vehicles via a network, the posture estimation result may be transmitted to the center together with the photographed images. As a result, it is possible to appropriately handle the photographing information at the center.

<3.抽出領域の設定および変更>
図9は、設定部122による抽出領域5の設定および変更について説明するための第1図である。 図10は、設定部122による抽出領域5の設定および変更について説明するための第2図である。 図11は、設定部122による抽出領域5の設定および変更について説明するための第3図である。 図12は、設定部122による抽出領域5の設定および変更について説明するための第4図である。
<3. Setting and changing the extraction area>
FIG. 9 is a first diagram for explaining setting and changing of the extraction region 5 by the setting unit 122. FIG. FIG. 10 is a second diagram for explaining setting and changing of the extraction region 5 by the setting unit 122. FIG. FIG. 11 is a third diagram for explaining setting and changing of the extraction region 5 by the setting unit 122. FIG. FIG. 12 is a fourth diagram for explaining setting and changing of the extraction region 5 by the setting unit 122. FIG.

図9~図12において、符号200は自車両であり、符号300は他車両である。図9~図12においては、自車両200や他車両300との関係を理解し易くするために、撮影画像に設定される抽出領域5を、実空間上に仮想的に示している。図9~図12において、カメラ21はフロントカメラであり、カメラ21の撮影方向は前方である。図9~図12においては、一例として矩形状に設定される抽出領域5に対して、実空間と同様の方向を便宜的に与えて説明を行う。図9~図12において、符号5rは基準抽出領域である。 9 to 12, reference numeral 200 denotes the own vehicle, and reference numeral 300 denotes the other vehicle. 9 to 12, in order to facilitate understanding of the relationship between own vehicle 200 and other vehicle 300, the extraction area 5 set in the captured image is virtually shown in real space. 9 to 12, the camera 21 is a front camera, and the imaging direction of the camera 21 is forward. 9 to 12, the extraction area 5, which is set in a rectangular shape as an example, is given the same direction as the real space for the sake of convenience. 9 to 12, reference numeral 5r denotes a reference extraction area.

設定部122は、カメラ21の撮影方向において自車両(移動体)200から離れて存在する物体の位置に基づき基準抽出領域5rを変動させて、抽出領域5を設定する。これによれば、基準抽出領域5rの利用により処理負担を低減しつつ、路面RS上に存在する物体が抽出領域5に入らないように抽出領域5の設定を行うことができる。抽出領域5に路面RS上に存在する物体が入らないようにできるために、オプティカルフローを適切に導出することができる。 The setting unit 122 sets the extraction region 5 by changing the reference extraction region 5r based on the position of an object that exists away from the own vehicle (moving body) 200 in the photographing direction of the camera 21 . According to this, it is possible to set the extraction area 5 so that the object existing on the road surface RS does not enter the extraction area 5 while reducing the processing load by using the reference extraction area 5r. Since an object existing on the road surface RS can be prevented from entering the extraction region 5, the optical flow can be properly derived.

なお、物体の位置は、例えば、カメラ21から入力された撮影画像から求められてよい。また、物体の位置は、カメラ21以外の車載センサを利用して求められてもよい。このようなセンサとして、例えば、超音波センサ、レーダ、LIDAR(Laser Imaging Detection and Ranging)、カメラ21とは別に設けられるカメラ等が挙げられる。 It should be noted that the position of the object may be obtained from the captured image input from the camera 21, for example. Also, the position of the object may be determined using an in-vehicle sensor other than the camera 21 . Examples of such a sensor include an ultrasonic sensor, radar, LIDAR (Laser Imaging Detection and Ranging), a camera provided separately from the camera 21, and the like.

図9に示す例では、物体は他車両300である。すなわち、設定部122は、前方に自車両200から離れて存在する他車両300の位置に基づき基準抽出領域5rを変動させて、抽出領域5を設定する。詳細には、設定部122は、前方に存在する他車両300が自車両200から所定距離D以内に存在しない場合は、図9の左側に示すように、基準抽出領域5rを抽出領域5とする。なお、所定距離Dは、自車両200ではなく、自車両に固定されるカメラ21からの距離であってもよい。所定距離Dは、基準抽出領域5rの前方側の辺FRSと同じ、或いは、前方側の辺FRSより前方に設定される。図9に示す例では、所定距離Dは、基準抽出領域5rの前方側の辺FRSと同じである。なお、所定距離Dは、実験等により適宜決められてよい。 In the example shown in FIG. 9 , the object is another vehicle 300 . That is, the setting unit 122 sets the extraction region 5 by changing the reference extraction region 5r based on the position of the other vehicle 300 that is present ahead of the own vehicle 200 and is separated from the host vehicle 200 . Specifically, when the other vehicle 300 existing in front is not present within the predetermined distance D from the subject vehicle 200, the setting unit 122 sets the reference extraction region 5r as the extraction region 5, as shown on the left side of FIG. . Note that the predetermined distance D may be the distance from the camera 21 fixed to the own vehicle instead of the own vehicle 200 . The predetermined distance D is the same as the front side FRS of the reference extraction region 5r, or is set ahead of the front side FRS. In the example shown in FIG. 9, the predetermined distance D is the same as the front side FRS of the reference extraction region 5r. Note that the predetermined distance D may be appropriately determined through experiments or the like.

一方、設定部122は、他車両300(物体)が所定距離D以内に存在する場合、撮影画像において自車両(移動体)200に近づく方向に基準抽出領域5rの幅を狭くして抽出領域5を設定する。これによれば、基準抽出領域5rを予め広い範囲としておくことにより、他車両300が自車両200の近くに存在しない場合には、多くの特徴点を抽出することが可能になる。そして、他車両300が自車両200に近づいた場合には、抽出領域5を基準抽出領域5rよりも狭くして、抽出領域5外に他車両300を位置させることができる。図9の右側に示す例では、他車両300の一部が所定距離D以内に存在するために、設定部122は、基準抽出領域5rの前方側の辺FRSを自車両200側に近づけて基準抽出領域5rを狭くした領域を、抽出領域5とする。 On the other hand, when the other vehicle 300 (object) exists within the predetermined distance D, the setting unit 122 narrows the width of the reference extraction region 5r in the direction toward the host vehicle (moving object) 200 in the captured image, and extracts the extraction region 5r. set. According to this, when the other vehicle 300 does not exist near the own vehicle 200, it becomes possible to extract many feature points by setting the reference extraction area 5r to a wide range in advance. Then, when the other vehicle 300 approaches the own vehicle 200 , the extraction area 5 is made narrower than the reference extraction area 5 r so that the other vehicle 300 can be positioned outside the extraction area 5 . In the example shown on the right side of FIG. 9 , since part of the other vehicle 300 exists within the predetermined distance D, the setting unit 122 brings the front side FRS of the reference extraction region 5r closer to the own vehicle 200 side to make the reference An area obtained by narrowing the extraction area 5r is defined as an extraction area 5. FIG.

なお、設定部122は、抽出領域5を基準抽出領域5rよりも狭い領域とする場合に、予め準備された1つの領域に変更する構成であってよい。また、設定部122は、抽出領域5を基準抽出領域5rよりも狭い領域とする場合に、段階的に準備された複数の領域の中からいずれか1つの領域を選択する構成としてもよい。この場合、設定部122は、自車両200から他車両300までの距離に応じていずれか1つの領域を選択する構成としてよい。また、設定部122は、抽出領域5を基準抽出領域5rよりも狭い領域とする場合に、自車両200から他車両300までの距離に応じて段階的でなく連続的に狭くしてもよい。 Note that the setting unit 122 may be configured to change the extraction region 5 to one region prepared in advance when making the extraction region 5 narrower than the reference extraction region 5r. In addition, the setting unit 122 may be configured to select one of a plurality of regions prepared stepwise when the extraction region 5 is set to be narrower than the reference extraction region 5r. In this case, the setting unit 122 may be configured to select any one area according to the distance from the own vehicle 200 to the other vehicle 300 . Further, when setting the extraction region 5 to be narrower than the reference extraction region 5r, the setting unit 122 may continuously narrow the extraction region 5 according to the distance from the own vehicle 200 to the other vehicle 300 instead of stepwise.

また、設定部122は、他車両300が所定距離D以内に存在する場合に、基準抽出領域5rを抽出領域5としてもよい。そして、設定部122は、他車両300が所定距離D以内に存在しない場合に、撮影画像において自車両200から離れる方向に基準抽出領域5rの幅を広くして抽出領域5を設定する構成としてもよい。この変形例を図9に示す例を利用して説明すると、図9の右側の抽出領域5が基準抽出領域となり、他車両300が自車両200から離れて存在する場合に、図9の左側に示すように基準抽出領域が拡大された領域が抽出領域とされる。他車両300が自車両200から離れた位置にいる場合に、抽出領域5を基準抽出領域5rよりも広くして多くの特徴点を抽出することが可能になる。 Further, the setting unit 122 may set the reference extraction region 5r as the extraction region 5 when the other vehicle 300 exists within the predetermined distance D. Then, when the other vehicle 300 does not exist within the predetermined distance D, the setting unit 122 may set the extraction area 5 by increasing the width of the reference extraction area 5r in the direction away from the own vehicle 200 in the captured image. good. To explain this modified example using the example shown in FIG. 9, the extraction area 5 on the right side of FIG. As shown, the area obtained by enlarging the reference extraction area is used as the extraction area. When the other vehicle 300 is at a position away from the own vehicle 200, it becomes possible to extract many feature points by making the extraction area 5 wider than the reference extraction area 5r.

また、設定部122は、自車両200に対する他車両300の速度(相対速度)を加味して抽出領域5を設定してよい。自車両200の速度は、例えば速度センサ4により得られる。他車両300の速度は、例えば自車両200に搭載されるレーダや、車車間通信を利用して得られてよい。ここで、他車両300が所定距離D以内に存在して、基準抽出領域5rを狭くして抽出領域5を設定する必要がある場合を考える。この際に、設定部122は、相対速度から他車両300が自車両200に接近していると判断される場合には、基準抽出領域5rを狭くする量を大き目としてよい。これによれば、短時間のうちに連続して取得された複数のフレーム画像に同じ抽出領域5を設定する場合において、抽出領域5内に他車両が入り混む可能性を低減することができる。逆に、設定部122は、相対速度から他車両300が自車両200から離れていっていると判断される場合には、基準抽出領域5rを狭くする量を小さ目としてよい。これにより、抽出領域5をなるべく広くすることができる。 Further, the setting unit 122 may set the extraction region 5 by considering the speed (relative speed) of the other vehicle 300 with respect to the own vehicle 200 . The speed of the own vehicle 200 is obtained by the speed sensor 4, for example. The speed of the other vehicle 300 may be obtained using, for example, a radar mounted on the host vehicle 200 or inter-vehicle communication. Here, consider a case where another vehicle 300 exists within a predetermined distance D and it is necessary to set the extraction region 5 by narrowing the reference extraction region 5r. At this time, if it is determined from the relative speed that the other vehicle 300 is approaching the own vehicle 200, the setting unit 122 may increase the amount by which the reference extraction area 5r is narrowed. According to this, when setting the same extraction area 5 for a plurality of frame images that are successively acquired within a short period of time, it is possible to reduce the possibility that other vehicles will enter the extraction area 5 . Conversely, when it is determined from the relative speed that the other vehicle 300 is moving away from the host vehicle 200, the setting unit 122 may reduce the amount by which the reference extraction region 5r is narrowed. As a result, the extraction area 5 can be made as wide as possible.

設定部122は、自車両200(移動体)の速度に基づき抽出領域5の設定および変更を行う。これによれば、自車両200の速度が速くなった場合においても、特徴点の抽出精度が低下することを抑制することができる。なお、自車両の速度は、例えば速度センサ4により得られる。また、設定部122は、自車両200の速度に基づき抽出領域5の設定および変更を行わなくてもよい。 The setting unit 122 sets and changes the extraction region 5 based on the speed of the own vehicle 200 (moving body). According to this, even when the speed of the own vehicle 200 increases, it is possible to suppress the deterioration of the extraction accuracy of the feature points. The speed of the own vehicle is obtained by a speed sensor 4, for example. Also, the setting unit 122 does not have to set and change the extraction region 5 based on the speed of the own vehicle 200 .

図10に示す例では、設定部122は、自車両200の速度が第1速度より小さい場合、図10の左側に示すように、基準抽出領域5rを抽出領域5とする。第1速度は、例えば時速30kmである。そして、設定部122は、自車両200(移動体)の速度が第1速度以上になると、撮影画像において自車両200から離れる方向に基準抽出領域5rの幅を狭くして抽出領域5を設定する(図10の右側参照)。これによると、撮影画像において速度変化の影響が大きい自車両200の近傍について、自車両200の速度が遅い場合には抽出領域5に入れておき、自車両200の速度が速くなった場合に抽出領域5から除外するといったことができる。このために、特徴点の抽出精度を向上することができる。また、自車両200の速度が遅い場合には、特徴点の抽出領域5を広くして多くの特徴点を抽出することが可能になる。図10の右側に示す例では、自車両200の速度が第1速度以上であるために、設定部122は、基準抽出領域5rの後方側の辺BASを自車両200から離して基準抽出領域5rを狭くした領域を、抽出領域5とする。 In the example shown in FIG. 10, when the speed of the own vehicle 200 is lower than the first speed, the setting unit 122 sets the reference extraction region 5r as the extraction region 5 as shown on the left side of FIG. The first speed is, for example, 30 km/h. Then, when the speed of the own vehicle 200 (moving body) becomes equal to or higher than the first speed, the setting unit 122 narrows the width of the reference extraction area 5r in the direction away from the own vehicle 200 in the captured image to set the extraction area 5. (See right side of FIG. 10). According to this, the vicinity of the own vehicle 200 that is greatly affected by the speed change in the photographed image is included in the extraction area 5 when the speed of the own vehicle 200 is slow, and is extracted when the speed of the own vehicle 200 becomes faster. For example, it can be excluded from area 5. For this reason, it is possible to improve the extraction accuracy of feature points. Further, when the speed of the own vehicle 200 is slow, it is possible to widen the feature point extraction region 5 and extract many feature points. In the example shown on the right side of FIG. 10 , the speed of the vehicle 200 is equal to or higher than the first speed, so the setting unit 122 separates the rear side BAS of the reference extraction region 5r from the vehicle 200 to form the reference extraction region 5r. is defined as an extraction region 5.

なお、設定部122は、抽出領域5を基準抽出領域5rよりも狭い領域とする場合に、予め準備された1つの領域に変更する構成であってよい。また、設定部122は、抽出領域5を基準抽出領域5rよりも狭い領域とする場合に、段階的に準備された複数の領域の中からいずれか1つの領域を選択する構成としてもよい。この場合、設定部122は、自車両200の速度に応じていずれか1つの領域を選択する構成としてよい。また、設定部122は、抽出領域5を基準抽出領域5rよりも狭い領域とする場合に、自車両200の速度に応じて段階的でなく連続的に狭くしてよい。 Note that the setting unit 122 may be configured to change the extraction region 5 to one region prepared in advance when making the extraction region 5 narrower than the reference extraction region 5r. In addition, the setting unit 122 may be configured to select one of a plurality of regions prepared stepwise when the extraction region 5 is set to be narrower than the reference extraction region 5r. In this case, the setting unit 122 may be configured to select any one area according to the speed of the own vehicle 200 . Further, when setting the extraction region 5 to be narrower than the reference extraction region 5r, the setting unit 122 may continuously narrow it according to the speed of the vehicle 200 instead of stepwise.

また、設定部122は、自車両200の速度が第1速度以上である場合に、基準抽出領域5rを抽出領域5としてもよい。そして、設定部122は、自車両200の速度が第1速度より小さくなると、撮影画像において自車両200に近づく方向に基準抽出領域5rの幅を広くして抽出領域5を設定する構成としてもよい。この変形例を図10に示す例を利用して説明すると、図10の右側の抽出領域5が基準抽出領域となり、自車両200の速度が第1速度より小さくなると、図10の左側に示すように基準抽出領域が拡大された領域が抽出領域とされる。この様な構成とした場合も、撮影画像において速度変化の影響が大きい自車両200の近傍について、自車両200の速度が遅い場合には抽出領域5に入れ、自車両200の速度が速い場合に抽出領域5から除外するといったことができる。 Further, the setting unit 122 may set the reference extraction region 5r as the extraction region 5 when the speed of the own vehicle 200 is equal to or higher than the first speed. Then, when the speed of the vehicle 200 becomes lower than the first speed, the setting unit 122 may set the extraction region 5 by increasing the width of the reference extraction region 5r in the direction toward the vehicle 200 in the captured image. . To explain this modification using the example shown in FIG. 10, the extraction area 5 on the right side of FIG. A region obtained by enlarging the reference extraction region is set as the extraction region. Even with such a configuration, the vicinity of the own vehicle 200 that is greatly affected by the speed change in the captured image is included in the extraction area 5 when the speed of the own vehicle 200 is slow, and is extracted when the speed of the own vehicle 200 is fast. It can be excluded from the extraction area 5 .

図11に示す例では、設定部122は、自車両200の速度が第2速度より小さい場合、図11の左側に示すように、基準抽出領域5rを抽出領域5とする。第2速度は、例えば時速30kmである。そして、設定部122は、自車両200(移動体)の速度が第2速度以上になると、撮影画像において自車両200(移動体)から離れる方向と交差する方向における基準抽出領域5rの幅を狭くして、抽出領域5を設定する(図11の右側参照)。なお、移動体から離れる方向と交差する方向は、一例として、移動体から離れる方向と直交する方向であってよい。これによると、自車両200の速度が速くなった場合にレンズ歪の影響で抽出精度が低下し易い撮影画像の外縁部の特徴点を、自車両200の速度が速くなった場合に抽出対象から除外することができる。このために、特徴点の抽出精度を向上することができる。また、自車両200の速度が遅い場合には、特徴点の抽出範囲を広げて多くの特徴点を抽出することができる。図11の右側に示す例では、自車両200の速度が第2速度以上であるために、設定部122は、基準抽出領域5rの左右の辺LES、RISを中心側に移動して基準抽出領域5rを狭くした領域を、抽出領域5とする。 In the example shown in FIG. 11, when the speed of the own vehicle 200 is lower than the second speed, the setting unit 122 sets the reference extraction region 5r as the extraction region 5 as shown on the left side of FIG. The second speed is, for example, 30 km/h. Then, when the speed of own vehicle 200 (moving object) becomes equal to or higher than the second speed, setting unit 122 narrows the width of reference extraction region 5r in the direction crossing the direction away from own vehicle 200 (moving object) in the captured image. to set the extraction area 5 (see the right side of FIG. 11). Note that the direction intersecting with the direction away from the moving body may be, for example, a direction orthogonal to the direction away from the moving body. According to this, when the speed of the own vehicle 200 increases, the feature points on the outer edge of the photographed image, whose extraction accuracy tends to decrease due to the influence of the lens distortion, are removed from the extraction target when the speed of the own vehicle 200 increases. can be excluded. For this reason, it is possible to improve the extraction accuracy of feature points. Further, when the speed of the own vehicle 200 is slow, it is possible to expand the extraction range of the feature points and extract many feature points. In the example shown on the right side of FIG. 11, since the speed of the own vehicle 200 is equal to or higher than the second speed, the setting unit 122 shifts the left and right sides LES and RIS of the reference extraction region 5r toward the center to form a reference extraction region. A region obtained by narrowing 5r is defined as an extraction region 5 .

なお、設定部122は、抽出領域5を基準抽出領域5rよりも狭い領域とする場合に、予め準備された1つの領域に変更する構成であってよい。また、設定部122は、抽出領域5を基準抽出領域5rよりも狭い領域とする場合に、段階的に準備された複数の領域の中からいずれか1つの領域を選択する構成としてもよい。この場合、設定部122は、自車両200の速度に応じていずれか1つの領域を選択する構成としてよい。また、設定部122は、抽出領域5を基準抽出領域5rよりも狭い領域とする場合に、自車両200の速度に応じて段階的でなく連続的に狭くしてよい。 Note that the setting unit 122 may be configured to change the extraction region 5 to one region prepared in advance when making the extraction region 5 narrower than the reference extraction region 5r. In addition, the setting unit 122 may be configured to select one of a plurality of regions prepared stepwise when the extraction region 5 is set to be narrower than the reference extraction region 5r. In this case, the setting unit 122 may be configured to select any one area according to the speed of the own vehicle 200 . Further, when setting the extraction region 5 to be narrower than the reference extraction region 5r, the setting unit 122 may continuously narrow it according to the speed of the vehicle 200 instead of stepwise.

また、設定部122は、自車両200の速度が第2速度以上である場合に、基準抽出領域5rを抽出領域5としてもよい。そして、設定部122は、自車両200の速度が第2速度より小さくなると、撮影画像において自車両200から離れる方向と交差する方向における基準抽出領域5rの幅を広くして、抽出領域5を設定する構成としてもよい。この変形例を図11に示す例を利用して説明すると、図11の右側の抽出領域5が基準抽出領域となり、自車両200の速度が第2速度より小さくなると、図11の左側に示すように基準抽出領域が拡大された領域が抽出領域とされる。この様な構成とした場合も、自車両200の速度が速くなった場合にレンズ歪の影響で抽出精度が低下し易い撮影画像の外縁部の特徴点を、自車両200の速度が速い場合に抽出対象から除外することができる。このために、特徴点の抽出精度を向上することができる。また、自車両200の速度が遅い場合には、特徴点の抽出範囲を広げて多くの特徴点を抽出することができる。 Further, the setting unit 122 may set the reference extraction region 5r as the extraction region 5 when the speed of the own vehicle 200 is equal to or higher than the second speed. When the speed of the vehicle 200 becomes lower than the second speed, the setting unit 122 widens the width of the reference extraction region 5r in the direction crossing the direction away from the vehicle 200 in the captured image, and sets the extraction region 5. It is good also as a structure which carries out. To explain this modification using the example shown in FIG. 11, the extraction area 5 on the right side of FIG. A region obtained by enlarging the reference extraction region is set as the extraction region. Even with such a configuration, when the speed of the own vehicle 200 increases, the feature points at the outer edge of the photographed image, whose extraction accuracy tends to decrease due to the influence of lens distortion, are extracted when the speed of the own vehicle 200 increases. Can be excluded from extraction targets. For this reason, it is possible to improve the extraction accuracy of feature points. Further, when the speed of the own vehicle 200 is slow, it is possible to expand the extraction range of the feature points and extract many feature points.

本実施形態では、設定部122は、自車両200の速度が第1速度以上になると、基準抽出領域5rの後方側の辺BASを自車両200から離して基準抽出領域5rを狭くした領域を、抽出領域5とする。また、設定部122は、自車両200の速度が第2速度以上になると、基準抽出領域5rの左右の辺LES、RISを中心側に移動して基準抽出領域5rを狭くした領域を、抽出領域5とする。この場合において、第1速度と第2速度は異なってもよいが、本実施形態では同じである。 In this embodiment, when the speed of the vehicle 200 becomes equal to or higher than the first speed, the setting unit 122 separates the rear side BAS of the reference extraction region 5r from the vehicle 200 to narrow the reference extraction region 5r. An extraction area 5 is assumed. Further, when the speed of the own vehicle 200 becomes equal to or higher than the second speed, the setting unit 122 shifts the left and right sides LES and RIS of the reference extraction region 5r toward the center to narrow the reference extraction region 5r to the extraction region. 5. In this case, the first speed and the second speed may be different, but in this embodiment they are the same.

このために、図12に示すように、自車両200の速度が第1速度(=第2速度)以上になると、基準抽出領域5rの後方側の辺BASが自車両200から離れる方向に動かされるとともに左右の辺LES、RISが中心側に移動されて、基準抽出領域5rより狭い抽出領域5が設定される。 Therefore, as shown in FIG. 12, when the speed of the vehicle 200 becomes equal to or higher than the first speed (=the second speed), the rear side BAS of the reference extraction area 5r is moved away from the vehicle 200. At the same time, the left and right sides LES and RIS are moved toward the center, and an extraction area 5 narrower than the reference extraction area 5r is set.

なお、設定部122は、図10に示す抽出領域5の設定変更と、図11に示す抽出領域5の設定変更とのうち、いずれか一方のみを行う構成としてもよい。 Note that the setting unit 122 may be configured to change only one of the setting change of the extraction region 5 shown in FIG. 10 and the setting change of the extraction region 5 shown in FIG.

図13は、本実施形態の画像処理装置1における抽出領域5の設定処理の一例を示すフローチャートである。図13は、カメラ21がフロントカメラである場合を想定したフローチャートである。抽出領域5の設定は、例えば、図2のステップS2における撮影画像の取得処理が行われた後に実行される。 FIG. 13 is a flowchart showing an example of processing for setting the extraction region 5 in the image processing apparatus 1 of this embodiment. FIG. 13 is a flow chart assuming that the camera 21 is a front camera. The setting of the extraction region 5 is performed, for example, after the captured image acquisition process in step S2 of FIG. 2 is performed.

ステップS21では、設定部122は、前方車両が所定距離D以内に存在するか否かを確認する。設定部122は、前方車両が所定距離D以内に存在する場合(ステップS21でYes)、次のステップS22に処理を進める。一方、設定部122は、前方車両が所定距離D以内に存在しない場合(ステップS21でNo)、ステップS23に処理を進める。 In step S21, the setting unit 122 confirms whether or not the forward vehicle exists within a predetermined distance D. If the forward vehicle is within the predetermined distance D (Yes in step S21), the setting unit 122 proceeds to the next step S22. On the other hand, if the forward vehicle does not exist within the predetermined distance D (No in step S21), the setting unit 122 proceeds to step S23.

ステップS22では、設定部122は、第1仮設定として、基準抽出領域5rを自車両200に近づく方向に向けて狭くした第1領域5a(図14参照)を設定する。設定部122は、第1仮設定として第1領域5aを設定すると、ステップS24に処理を進める。なお、図14は、図13のフローチャートの捕捉説明用の図である。図14において、各領域5a、5b、5c、5d、5e、5r間で、僅かにずれて示された辺は、本来は互いに重なった辺である。区別し易いように、便宜上ずらしたものである。 In step S<b>22 , the setting unit 122 sets a first area 5 a (see FIG. 14 ) obtained by narrowing the reference extraction area 5 r toward the host vehicle 200 as a first provisional setting. After setting the first region 5a as the first temporary setting, the setting unit 122 advances the process to step S24. Note that FIG. 14 is a diagram for explaining the capturing of the flowchart of FIG. 13 . In FIG. 14, the sides slightly shifted between the regions 5a, 5b, 5c, 5d, 5e, and 5r are originally sides that overlap each other. They are shifted for convenience so that they can be easily distinguished.

ステップS23では、設定部122は、第1仮設定として、基準抽出領域5r(図14参照)を設定する。設定部122は、第1仮設定として基準抽出領域5rを設定すると、ステップS24に処理を進める。 In step S23, the setting unit 122 sets the reference extraction region 5r (see FIG. 14) as the first temporary setting. After setting the reference extraction region 5r as the first temporary setting, the setting unit 122 advances the process to step S24.

ステップS24では、設定部122は、自車両200の速度が所定速度以上であるか否かを確認する。所定速度は、上述の第1速度および第2速度と同じ速度であり、例えば時速30kmである。設定部122は、自車両200の速度が所定速度以上である場合(ステップS24でYes)、次のステップS25に処理を進める。一方、設定部122は、自車両200の速度が所定速度より小さい場合(ステップS24でYes)、ステップS27に処理を進める。 At step S24, the setting unit 122 confirms whether or not the speed of the own vehicle 200 is equal to or higher than a predetermined speed. The predetermined speed is the same speed as the above-described first speed and second speed, eg, 30 km/h. When the speed of the own vehicle 200 is equal to or higher than the predetermined speed (Yes in step S24), the setting unit 122 advances the process to the next step S25. On the other hand, if the speed of the own vehicle 200 is lower than the predetermined speed (Yes in step S24), the setting unit 122 advances the process to step S27.

ステップS25では、設定部122は、第2仮設定として、第1仮設定された領域を自車両200から離れる方向に向けて狭くした領域に設定する。第1仮設定で第1領域5aに設定されている場合には、第1領域5aを自車両200から離れる方向に向けて狭くした第2領域5bが第2仮設定の領域になる。第1仮設定で基準抽出領域5rに設定されている場合には、基準抽出領域5rを自車両200から離れる方向に向けて狭くした第3領域5cが第2仮設定の領域になる。設定部122は、第2仮設定を行うと、次のステップS26に処理を進める。 In step S<b>25 , the setting unit 122 sets, as the second provisional setting, a region narrowed from the first provisionally set region toward the direction away from the host vehicle 200 . When the first area 5a is set in the first temporary setting, the second area 5b, which is the first area 5a narrowed in the direction away from the host vehicle 200, becomes the second temporary setting area. When the reference extraction area 5r is set in the first temporary setting, the third area 5c, which is the reference extraction area 5r narrowed in the direction away from the host vehicle 200, becomes the second temporary setting area. After performing the second provisional setting, the setting unit 122 advances the process to the next step S26.

ステップS26では、設定部122は、自車両200から離れる方向と交差する方向における第2仮設定された領域の幅を狭くして、最終的な抽出領域5を設定する。第2仮設定で第2領域5bに設定されている場合には、第2領域5bの撮影画像上の左右方向の幅を狭くした第4領域5dが抽出領域5になる。第2仮設定で第3領域5cに設定されている場合には、第3領域5cの画像上の左右方向の幅を狭くした第5領域5eが抽出領域5になる。ステップS26が完了すると、抽出領域5の設定処理は完了する。 In step S<b>26 , the setting unit 122 narrows the width of the second provisionally set area in the direction crossing the direction away from the host vehicle 200 to set the final extraction area 5 . If the second region 5b is set in the second provisional setting, the extraction region 5 is a fourth region 5d that is narrowed in the left-right direction on the captured image of the second region 5b. If the third area 5 c is set in the second provisional setting, the extraction area 5 is the fifth area 5 e obtained by narrowing the horizontal width of the third area 5 c on the image. When step S26 is completed, the setting process of the extraction area 5 is completed.

ステップS27では、設定部122は、第1仮設定された領域を抽出領域5に設定する。第1仮設定で第1領域5aに設定されている場合には、第1領域5aが抽出領域5になる。第1仮設定で基準抽出領域5rに設定されている場合には、基準抽出領域5rが抽出領域5になる。ステップS27が完了すると、抽出領域5の設定処理は完了する。 In step S<b>27 , the setting unit 122 sets the first provisionally set area as the extraction area 5 . If the first region 5 a is set in the first provisional setting, the first region 5 a becomes the extraction region 5 . If the reference extraction region 5r is set in the first temporary setting, the reference extraction region 5r becomes the extraction region 5. FIG. When step S27 is completed, the setting process of the extraction area 5 is completed.

なお、図13に示す例では、前方車両が所定距離D以内か否かを確認した後に、自車両200の速度が所定速度以上であるか否かを確認する構成となっているが、この順番は逆であってもよい。また、図13に示すステップS25とステップS26との処理は順番が入れ替わってもよい。すなわち、第1仮設定領域の撮影画像上の左右方向の幅を狭くして第2仮設定領域を得て、第2仮設定領域を自車両200から離れる方向に狭くした領域を抽出領域5としてよい。 In the example shown in FIG. 13, after confirming whether or not the forward vehicle is within the predetermined distance D, it is confirmed whether or not the speed of the own vehicle 200 is equal to or higher than the predetermined speed. can be vice versa. Further, the order of the processes of steps S25 and S26 shown in FIG. 13 may be changed. That is, the second temporary setting area is obtained by narrowing the width of the first temporary setting area in the left-right direction on the photographed image, and the extraction area 5 is the area obtained by narrowing the second temporary setting area in the direction away from the host vehicle 200 . good.

なお、本実施形態の構成においては、自車両200の前方の所定距離D以内に物体(他車両300等)が存在したり、自車両200の速度が所定速度以上であったりした場合、基準抽出領域5rに比べて抽出領域5が狭くなる。この場合、単一の撮影画像から第1特徴点FP1及び第2特徴点FP2のいずれか一方のみしか抽出できない場合が起こる可能性が、基準抽出領域5rを用いる場合に比べて高くなる可能性がある。このような傾向は、自車両200の前方の所定距離D以内に物体が存在し、且つ、自車両200の速度が所定速度以上である場合に特に発生し易くなる。 In the configuration of the present embodiment, when an object (another vehicle 300 or the like) exists within a predetermined distance D in front of the own vehicle 200 or the speed of the own vehicle 200 is equal to or higher than a predetermined speed, reference extraction The extraction area 5 becomes narrower than the area 5r. In this case, the possibility that only one of the first feature point FP1 and the second feature point FP2 can be extracted from a single captured image is more likely than in the case of using the reference extraction region 5r. be. Such a tendency is particularly likely to occur when an object exists within a predetermined distance D in front of own vehicle 200 and the speed of own vehicle 200 is equal to or higher than a predetermined speed.

このような点を考慮して、推定部123は、第1時刻と第1時刻より後の第2時刻で撮影された2つの撮影画像から得られる第1特徴点の位置変化(第1オプティカルフローOF1)および第2特徴点の位置変化(第2オプティカルフローOF2)に基づき所定の平面との交線が互いに平行となる面の組を2組特定する構成(上述の構成)の他に、次のような構成を適宜利用してもよい。すなわち、推定部123は、第1時刻と第1時刻より後の第2時刻で撮影された2つの撮影画像から抽出された特徴点から、互いに対応する第1特徴点を選定し、当該第1特徴点の位置変化を算出する。また、推定部123は、第1時刻より後の第3時刻と第3時刻より後の第4時刻で撮影された2つの撮影画像から抽出された特徴点から、第1特徴点とは異なり、互いに対応する第2特徴点を選定し、当該第2特徴点の位置変化を算出する。そして、推定部123は、第1特徴点の位置変化及び第2特徴点の位置変化に基づき、所定の平面との交線が互いに平行となる面の組を2組特定する。このような構成を適宜利用することにより、抽出領域5を小さくした場合でも、カメラ21の姿勢の推定結果が得られる可能性が高くなる。 Considering such a point, the estimation unit 123 calculates the position change (first optical flow OF1) and the change in position of the second feature point (second optical flow OF2) to identify two pairs of planes whose intersection lines with a predetermined plane are parallel to each other (the above configuration). A configuration such as the following may be used as appropriate. That is, the estimation unit 123 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 after the first time, and selects the first feature points. Calculate the position change of the feature point. Further, the estimating unit 123 determines, from the feature points extracted from the two captured images captured at a third time after the first time and a fourth time after the third time, that the first feature point is Second feature points corresponding to each other are selected, and positional changes of the second feature points are calculated. Then, the estimating unit 123 identifies 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. By appropriately using such a configuration, even when the extraction region 5 is made small, the possibility of obtaining the estimation result of the orientation of the camera 21 is increased.

<4.留意事項>
本明細書における実施形態や変形例の構成は、本発明の例示にすぎない。実施形態や変形例の構成は、本発明の技術的思想を超えない範囲で適宜変更されてもよい。また、複数の実施形態及び変形例は、可能な範囲で組み合わせて実施されてよい。
<4. Notes>
The configurations of the embodiments and modifications in this specification are merely examples 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 The present invention can be used for estimating the posture of a camera that assists the 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. Further, the present invention can be used for a correction device or the like that corrects a photographed image by using the estimation information of the orientation of the camera. 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 captured image to the center, the apparatus may be configured to transmit estimation information of the orientation of the camera together with the captured image. Then, at the center, using the camera posture estimation information, 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 the image in front of the vehicle body) ), 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. and so on.

1 画像処理装置
5 抽出領域
5r 基準抽出領域
13 記憶部
21 カメラ
11 取得部
121 抽出部
122 設定部
123 推定部
200 自車両(移動体)
300 他車両(物体)
D 所定距離
1 image processing device 5 extraction region 5r reference extraction region 13 storage unit 21 camera 11 acquisition unit 121 extraction unit 122 setting unit 123 estimation unit 200 host vehicle (moving body)
300 other vehicle (object)
D Predetermined distance

Claims (7)

移動体に搭載されるカメラから撮影画像を取得
前記撮影画像に設定される抽出領域から特徴点を抽出
前記カメラの撮影方向における前記移動体の外部環境、および、前記移動体の速度に基づき前記抽出領域の設定および変更を行
前記特徴点に基づき前記カメラの姿勢を推定する姿勢推定装置であって、
前記カメラの撮影方向において前記移動体から離れて存在する物体が所定距離以内に存在する場合に、前記物体が前記所定距離以内に存在しない場合に比べて前記抽出領域を狭くし、
前記移動体の速度が所定速度以上である場合に、前記移動体の速度が前記所定速度より小さい場合に比べて前記抽出領域を狭くする姿勢推定装置。
Captured images are acquired from a camera mounted on a moving body,
extracting feature points from an extraction region set in the captured image;
setting and changing the extraction region based on the external environment of the moving body in the shooting direction of the camera and the speed of the moving body ;
A posture estimation device for estimating a posture of the camera based on the feature points,
narrowing the extraction area when an object existing away from the moving object exists within a predetermined distance in the shooting direction of the camera compared to when the object does not exist within the predetermined distance;
A posture estimating apparatus that narrows the extraction region when the speed of the moving body is equal to or higher than a predetermined speed compared to when the speed of the moving body is less than the predetermined speed.
基準抽出領域をデータとして記憶する記憶部を備え、
記基準抽出領域を変動させて前記抽出領域を設定する、請求項1に記載の姿勢推定装置。
A storage unit that stores the reference extraction region as data,
2. The posture estimation device according to claim 1, wherein said extraction region is set by varying said reference extraction region.
記物体が前記所定距離以内に存在する場合に、前記撮影画像において前記移動体に近づく方向に前記基準抽出領域の幅を狭くして前記抽出領域を設定するか、又は、
前記物体が前記所定距離以内に存在しない場合に、前記撮影画像において前記移動体から離れる方向に前記基準抽出領域の幅を広くして前記抽出領域を設定する、請求項に記載の姿勢推定装置。
setting the extraction area by narrowing the width of the reference extraction area in a direction approaching the moving object in the captured image when the object exists within the predetermined distance, or
3. The posture estimation apparatus according to claim 2 , wherein when the object does not exist within the predetermined distance, the extraction area is set by increasing the width of the reference extraction area in the captured image in a direction away from the moving object. .
記移動体の速度が第1速度以上になると、前記撮影画像において前記移動体から離れる方向に前記基準抽出領域の幅を狭くして前記抽出領域を設定するか、又は、
前記移動体の速度が第1速度より小さくなると、前記撮影画像において前記移動体に近づく方向に前記基準抽出領域の幅を広くして前記抽出領域を設定する、請求項2又は3に記載の姿勢推定装置。
setting the extraction region by narrowing the width of the reference extraction region in a direction away from the moving object in the photographed image when the speed of the moving object becomes equal to or higher than a first speed, or
4. The posture according to claim 2, wherein when the speed of said moving body becomes lower than a first speed, said extraction region is set by increasing the width of said reference extraction region in a direction toward said moving body in said photographed image. estimation device.
記移動体の速度が第2速度以上になると、前記撮影画像において前記移動体から離れる方向と交差する方向における前記基準抽出領域の幅を狭くして、前記抽出領域を設定するか、又は、
前記移動体の速度が第2速度より小さくなると、前記撮影画像において前記移動体から離れる方向と交差する方向における前記基準抽出領域の幅を広くして、前記抽出領域を設定する、請求項2から4のいずれか1項に記載の姿勢推定装置。
when the speed of the moving body becomes equal to or higher than a second speed, setting the extraction region by narrowing the width of the reference extraction region in the direction crossing the direction away from the moving body in the captured image, or
3. From claim 2, wherein when the speed of said moving body becomes smaller than a second speed, said extraction region is set by increasing the width of said reference extraction region in a direction intersecting a direction away from said moving body in said photographed image. 5. The posture estimation device according to any one of 4 .
前記カメラの姿勢の推定に際し、第1特徴点および第2特徴点の位置変化を算出し、
前記第1特徴点は、第1時刻と前記第1時刻より後の第2時刻で撮影された2つの前記撮影画像の前記抽出領域から抽出された特徴点から選定され、
前記第2特徴点は、前記第1時刻より後の第3時刻と前記第3時刻より後の第4時刻で撮影された2つの前記撮影画像の前記抽出領域から抽出された特徴点から選定される、請求項1からのいずれか1項に記載の姿勢推定装置。
when estimating the orientation of the camera, calculating positional changes of the first feature point and the second feature point;
The first feature point is selected from feature points extracted from the extraction regions of the two captured images captured at a first time and a second time after the first time,
The second feature point is selected from feature points extracted from the extraction regions of the two captured images captured at a third time after the first time and at a fourth time after the third time. The posture estimation device according to any one of claims 1 to 5 .
移動体に搭載されるカメラから撮影画像を取得する取得工程と、
前記撮影画像に設定される抽出領域から特徴点を抽出する抽出工程と、
前記カメラの撮影方向における前記移動体の外部環境、および、前記移動体の速度に基づき前記抽出領域の設定および変更を行う設定工程と、
前記特徴点に基づき前記カメラの姿勢を推定する姿勢推定工程と、
を装置が実行する姿勢推定方法であって、
前記カメラの撮影方向において前記移動体から離れて存在する物体が所定距離以内に存在する場合に、前記物体が前記所定距離以内に存在しない場合に比べて前記抽出領域を狭くし、
前記移動体の速度が所定速度以上である場合に、前記移動体の速度が前記所定速度より小さい場合に比べて前記抽出領域を狭くする姿勢推定方法。
an acquisition step of acquiring a photographed image from a camera mounted on a moving object;
an extraction step of extracting feature points from an extraction region set in the captured image;
a setting step of setting and changing the extraction region based on the external environment of the moving object in the photographing direction of the camera and the speed of the moving object ;
a posture estimation step of estimating a posture of the camera based on the feature points;
is a pose estimation method in which the device executes
narrowing the extraction area when an object existing away from the moving object exists within a predetermined distance in the shooting direction of the camera compared to when the object does not exist within the predetermined distance;
A posture estimation method, wherein when the speed of the moving body is equal to or higher than a predetermined speed, the extraction region is narrowed compared to when the speed of the moving body is less than the predetermined speed.
JP2019152641A 2019-08-23 2019-08-23 Image processing device and image processing method Active JP7303064B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019152641A JP7303064B2 (en) 2019-08-23 2019-08-23 Image processing device and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019152641A JP7303064B2 (en) 2019-08-23 2019-08-23 Image processing device and image processing method

Publications (2)

Publication Number Publication Date
JP2021033605A JP2021033605A (en) 2021-03-01
JP7303064B2 true JP7303064B2 (en) 2023-07-04

Family

ID=74675911

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019152641A Active JP7303064B2 (en) 2019-08-23 2019-08-23 Image processing device and image processing method

Country Status (1)

Country Link
JP (1) JP7303064B2 (en)

Families Citing this family (2)

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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005201741A (en) 2004-01-14 2005-07-28 Denso Corp Road surface reflection detector
JP2006322797A (en) 2005-05-18 2006-11-30 Olympus Corp Apparatus, method, and program for processing image
JP2009288867A (en) 2008-05-27 2009-12-10 Toyota Motor Corp Lane marking detection device and lane marking detection method
JP2016224590A (en) 2015-05-28 2016-12-28 日産自動車株式会社 Self position calculation device and self position calculation method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005201741A (en) 2004-01-14 2005-07-28 Denso Corp Road surface reflection detector
JP2006322797A (en) 2005-05-18 2006-11-30 Olympus Corp Apparatus, method, and program for processing image
JP2009288867A (en) 2008-05-27 2009-12-10 Toyota Motor Corp Lane marking detection device and lane marking detection method
JP2016224590A (en) 2015-05-28 2016-12-28 日産自動車株式会社 Self position calculation device and self position calculation method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
山口 晃一郎,外2名,電気関係学会東海支部連合大会,車載単眼カメラを用いた自車両の運動推定,電気学会論文誌C Vol.129 No.12 IEEJ,日本,(社)電気学会,第129巻

Also Published As

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

Similar Documents

Publication Publication Date Title
KR101188588B1 (en) Monocular Motion Stereo-Based Free Parking Space Detection Apparatus and Method
US9747524B2 (en) Disparity value deriving device, equipment control system, movable apparatus, and robot
JP4958279B2 (en) Object detection device
US10007998B2 (en) Image processor, apparatus, and control system for correction of stereo images
WO2014199929A1 (en) Monocular-motion-stereo distance estimation method, and monocular-motion-stereo distance estimation apparatus
JP6577661B2 (en) Road surface displacement detection device and suspension control method
KR102104005B1 (en) Methods for detecting objects on the roadside of automobiles, computing devices, driver assistance systems and automobiles
WO2018179281A1 (en) Object detection device and vehicle
JP3765862B2 (en) Vehicle environment recognition device
US9892519B2 (en) Method for detecting an object in an environmental region of a motor vehicle, driver assistance system and motor vehicle
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
JP7303064B2 (en) Image processing device and image processing method
JP2020060550A (en) Abnormality detector, method for detecting abnormality, posture estimating device, and mobile control system
JP2015179499A (en) Parallax value derivation device, apparatus control system, moving body, robot, parallax value derivation method and program
JP6337504B2 (en) Image processing apparatus, moving body, robot, device control method and program
JP7311407B2 (en) Posture estimation device and posture estimation method
JP7232005B2 (en) VEHICLE DRIVING ENVIRONMENT DETECTION DEVICE AND DRIVING CONTROL SYSTEM
JP6174884B2 (en) Outside environment recognition device and outside environment recognition method
JP6747176B2 (en) Image processing device, photographing device, program, device control system and device
JP7380443B2 (en) Partial image generation device and computer program for partial image generation
JP7311406B2 (en) Image processing device and image processing method
JP5973843B2 (en) Outside environment recognition device and outside environment recognition method
JP2010148058A (en) Device and method for driving support
JP7237773B2 (en) Posture estimation device, anomaly detection device, correction device, and posture estimation 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: 20230309

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230322

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230420

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230622

R150 Certificate of patent or registration of utility model

Ref document number: 7303064

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150