JP2016152027A - Image processing device, image processing method and program - Google Patents

Image processing device, image processing method and program Download PDF

Info

Publication number
JP2016152027A
JP2016152027A JP2015030953A JP2015030953A JP2016152027A JP 2016152027 A JP2016152027 A JP 2016152027A JP 2015030953 A JP2015030953 A JP 2015030953A JP 2015030953 A JP2015030953 A JP 2015030953A JP 2016152027 A JP2016152027 A JP 2016152027A
Authority
JP
Japan
Prior art keywords
point
feature point
unit
frame
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2015030953A
Other languages
Japanese (ja)
Inventor
靖子 白鷹
Yasuko Shirataka
靖子 白鷹
多聞 貞末
Tamon Sadasue
多聞 貞末
康宏 梶原
Yasuhiro Kajiwara
康宏 梶原
賢 青木
Masaru Aoki
賢 青木
和史 松下
Kazufumi Matsushita
和史 松下
康子 橋本
yasuko Hashimoto
康子 橋本
和寛 ▲高▼澤
和寛 ▲高▼澤
Kazuhiro Takazawa
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2015030953A priority Critical patent/JP2016152027A/en
Publication of JP2016152027A publication Critical patent/JP2016152027A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an image processing device, image processing method and program capable of reducing a load of image processing.SOLUTION: The image processing device includes: extraction means for extracting a feature point of a subject in a frame of a video image picked up by at least one imaging means in two imaging means; matching means for performing a matching operation for retrieving a feature point that coincides with a feature point in the next frame of a frame with the feature point reflected therein; determination means for determining whether the feature point disappears in the next frame on the basis of a result of the matching operation; prediction means for acquiring a prediction point at which the position of the disappeared feature point is predicted on the basis of an operation of a replacement point that replaces the disappeared feature point in the case that the determination means determines that the feature point disappears; and return means for returning a point based on the prediction point as a feature point being a tracking object in the case that the point based on the prediction point coincides with the feature point before disappearance.SELECTED DRAWING: Figure 6

Description

本発明は、画像処理装置、画像処理方法およびプログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and a program.

近年、自動車またはロボット等を自律運転させるために必要となる地図を作成する手法として、未知の環境下で自律的に地図構築および自己位置の推定を行う技術(SLAM:Simultaneously Localization And Mapping)が知られている。SLAMでは、カメラ画像またはレーザーレーダー等のセンサ情報から特徴点を抽出し、時系列で特徴点を追跡して、その結果を基に姿勢推定および三次元再構成を行うことで地図構築および自己位置の推定を行う。   2. Description of the Related Art As a technique for creating a map necessary for autonomous driving of a car or a robot in recent years, a technique for autonomously constructing a map and estimating its own position (SLAM: Simulatively Localization Mapping) is known in an unknown environment. It has been. In SLAM, feature points are extracted from sensor information such as camera images or laser radar, feature points are tracked in time series, posture estimation and 3D reconstruction are performed based on the results, map construction and self-location Estimate

しかし、例えばカメラ画像を利用した場合、カメラの前を動く物体が通り過ぎた場合に特徴点が消失してしまう、または、ステレオカメラ等の場合、視差によって一方のカメラでは特徴点が見えているが、他方のカメラではその特徴点が見えないというオクルージョンが発生し、特徴点の追跡に失敗することがある。このような、特徴点の追跡の失敗に対応するために、オクルージョンが発生した場合に、パラメータを変更することによって、特徴点の追跡範囲を小さくし、再度、特徴点を追跡することにより、特徴点の追跡の失敗を低減する技術が提案されている(特許文献1参照)。   However, for example, when a camera image is used, the feature point disappears when an object moving in front of the camera passes, or in the case of a stereo camera or the like, the feature point is visible on one camera due to parallax. Occlusion that the feature point cannot be seen by the other camera may occur, and tracking of the feature point may fail. In order to cope with such failure of tracking of feature points, when occlusion occurs, by changing the parameters, the tracking range of the feature points is reduced and the feature points are tracked again. A technique for reducing point tracking failures has been proposed (see Patent Document 1).

しかしながら、特許文献1に記載された技術は、特徴点の追跡の失敗を低減するために、オクルージョンが発生している部分であって特徴点が追跡できない複数の過去の画像を使う必要性があり、かつ、再度追跡を行う必要性があるため、画像処理の負荷につながるという問題点があった。   However, in the technique described in Patent Document 1, it is necessary to use a plurality of past images in which feature points cannot be tracked in a portion where occlusion occurs in order to reduce failure in tracking feature points. In addition, since it is necessary to perform tracking again, there is a problem that it leads to a load of image processing.

本発明は、上記に鑑みてなされたものであって、画像処理の負荷を低減することができる画像処理装置、画像処理方法およびプログラムを提供することを目的とする。   The present invention has been made in view of the above, and an object thereof is to provide an image processing apparatus, an image processing method, and a program capable of reducing the load of image processing.

上述した課題を解決し、目的を達成するために、本発明は、2つの撮像手段のうち少なくとも一方の撮像手段により撮像された映像のフレームにおいて被写体の特徴点を抽出する抽出手段と、前記特徴点が写っているフレームの次のフレームで、該特徴点と一致する特徴点を検索するマッチング動作を行うマッチング手段と、前記マッチング動作の結果に基づいて、前記特徴点が前記次のフレームで消失したか否かを判定する判定手段と、前記判定手段によって前記特徴点が消失したと判定された場合、消失した前記特徴点を代替する代替点の動きに基づいて、消失した該特徴点の位置を予測した予測点を求める予測手段と、前記予測点に基づく点と、消失する前の前記特徴点とが一致する場合、該予測点に基づく点を、追跡対象である前記特徴点として復帰させる復帰手段と、を備えた ことを特徴とする。   In order to solve the above-described problems and achieve the object, the present invention provides an extraction unit that extracts a feature point of a subject in a frame of an image captured by at least one of two imaging units, and the feature Matching means for performing a matching operation for searching for a feature point matching the feature point in a frame next to the frame in which the point is shown, and based on the result of the matching operation, the feature point is lost in the next frame. A determination unit that determines whether or not the feature point has disappeared, and when the determination unit determines that the feature point has disappeared, the position of the disappeared feature point based on the movement of the alternative point that replaces the lost feature point When the prediction means for obtaining the prediction point predicting the point, the point based on the prediction point, and the feature point before disappearing match, the point based on the prediction point is the tracking target And restoration means for restoring the feature points, and further comprising a.

本発明によれば、画像処理の負荷を低減することができる。   According to the present invention, it is possible to reduce the load of image processing.

図1は、第1の実施の形態の画像処理装置の概観図である。FIG. 1 is an overview of the image processing apparatus according to the first embodiment. 図2は、第1の実施の形態の画像処理装置を車両に搭載した例を示す図である。FIG. 2 is a diagram illustrating an example in which the image processing apparatus according to the first embodiment is mounted on a vehicle. 図3は、第1の実施の形態の画像処理装置のハードウェア構成の一例を示す図である。FIG. 3 is a diagram illustrating an example of a hardware configuration of the image processing apparatus according to the first embodiment. 図4は、第1の実施の形態の画像処理装置のブロック構成の一例を示す図である。FIG. 4 is a diagram illustrating an example of a block configuration of the image processing apparatus according to the first embodiment. 図5は、第1の実施の形態の画像処理装置の距離測定部のブロック構成の一例を示す図である。FIG. 5 is a diagram illustrating an example of a block configuration of a distance measurement unit of the image processing apparatus according to the first embodiment. 図6は、第1の実施の形態の画像処理装置の特徴点追跡部のブロック構成の一例を示す図である。FIG. 6 is a diagram illustrating an example of a block configuration of a feature point tracking unit of the image processing apparatus according to the first embodiment. 図7は、撮像装置から物体までの距離を導き出す原理を説明する図である。FIG. 7 is a diagram for explaining the principle of deriving the distance from the imaging device to the object. 図8は、基準画像、高密度視差画像およびエッジ視差画像を示す概念図である。FIG. 8 is a conceptual diagram showing a reference image, a high-density parallax image, and an edge parallax image. 図9は、基準画像における基準画素に対応する比較画像における対応画素を求める場合の説明図である。FIG. 9 is an explanatory diagram for obtaining a corresponding pixel in a comparison image corresponding to a reference pixel in a reference image. 図10は、シフト量とコスト値との関係を示すグラフの一例を示す図である。FIG. 10 is a diagram illustrating an example of a graph indicating the relationship between the shift amount and the cost value. 図11は、合成コストを導出するための概念図である。FIG. 11 is a conceptual diagram for deriving the synthesis cost. 図12は、シフト量と合成コスト値との関係を示すグラフの一例を示す図である。FIG. 12 is a diagram illustrating an example of a graph indicating the relationship between the shift amount and the combined cost value. 図13は、特徴点の追跡失敗および成功の状態の一例を示す図である。FIG. 13 is a diagram illustrating an example of a feature point tracking failure and success state. 図14は、ブロックマッチング動作を説明する図である。FIG. 14 is a diagram for explaining the block matching operation. 図15は、ブロックマッチング動作におけるサーチ範囲における処理を説明する図である。FIG. 15 is a diagram for explaining processing in the search range in the block matching operation. 図16は、オクルージョンの判定動作を説明する図である。FIG. 16 is a diagram for explaining an occlusion determination operation. 図17は、第1の実施の形態の画像処理装置において予測点を推定するためのグルーピングの動作を説明する図である。FIG. 17 is a diagram illustrating a grouping operation for estimating a prediction point in the image processing apparatus according to the first embodiment. 図18は、第1の実施の形態の画像処理装置において予測点を推定するためのグルーピングの動作を説明する図である。FIG. 18 is a diagram illustrating a grouping operation for estimating a prediction point in the image processing apparatus according to the first embodiment. 図19は、第1の実施の形態の画像処理装置においてオクルージョンが発生した場合の予測点の推定動作を説明する図である。FIG. 19 is a diagram for explaining a prediction point estimation operation when occlusion occurs in the image processing apparatus according to the first embodiment. 図20は、第1の実施の形態の画像処理装置における追跡点の復帰動作を説明する図である。FIG. 20 is a diagram for explaining the tracking point return operation in the image processing apparatus according to the first embodiment. 図21は、第1の実施の形態の画像処理装置の画像処理の動作フローの一例を示す図である。FIG. 21 is a diagram illustrating an example of an operation flow of image processing of the image processing apparatus according to the first embodiment. 図22は、第1の実施の形態の変形例の画像処理装置における追跡点の復帰動作を説明する図である。FIG. 22 is a diagram for explaining the tracking point return operation in the image processing apparatus according to the modification of the first embodiment. 図23は、第2の実施の形態の画像処理装置のブロック構成の一例を示す図である。FIG. 23 is a diagram illustrating an example of a block configuration of the image processing apparatus according to the second embodiment. 図24は、第2の実施の形態の画像処理装置の特徴点追跡部のブロック構成の一例を示す図である。FIG. 24 is a diagram illustrating an example of a block configuration of a feature point tracking unit of the image processing apparatus according to the second embodiment. 図25は、第2の実施の形態の画像処理装置においてオクルージョンが発生した場合の予測点の推定動作を説明する図である。FIG. 25 is a diagram for explaining a prediction point estimation operation when occlusion occurs in the image processing apparatus according to the second embodiment. 図26は、第3の実施の形態の変形例の画像処理装置における追跡点の復帰動作を説明する図である。FIG. 26 is a diagram for explaining the tracking point return operation in the image processing apparatus according to the modification of the third embodiment.

[第1の実施の形態]
(画像処理装置の概観および設置例)
図1は、第1の実施の形態の画像処理装置の概観図である。図2は、第1の実施の形態の画像処理装置を車両に搭載した例を示す図である。図1、2を参照しながら、画像処理装置1の概観および設置例について説明する。
[First Embodiment]
(Overview of image processing device and installation example)
FIG. 1 is an overview of the image processing apparatus according to the first embodiment. FIG. 2 is a diagram illustrating an example in which the image processing apparatus according to the first embodiment is mounted on a vehicle. An overview and an installation example of the image processing apparatus 1 will be described with reference to FIGS.

図1に示すように、本実施の形態の画像処理装置1は、本体部2と、本体部2に固定された一対の円筒状の撮像装置10aおよび撮像装置10bと、を備えている。画像処理装置1は、撮像装置10a、10bが、例えば、自動車の進行方向前方の光景を撮像することができるように設置される。なお、説明の便宜上、撮像装置10aを「右のカメラ」と称し、撮像装置10bを「左のカメラ」と称する場合あるものとする。   As shown in FIG. 1, the image processing apparatus 1 according to the present embodiment includes a main body 2 and a pair of cylindrical imaging devices 10 a and 10 b fixed to the main body 2. The image processing apparatus 1 is installed so that the imaging devices 10a and 10b can capture a scene in front of the traveling direction of the automobile, for example. For convenience of explanation, the imaging device 10a may be referred to as a “right camera” and the imaging device 10b may be referred to as a “left camera”.

画像処理装置1は、例えば、図2に示すように、自動車等である車両100の居室空間のフロントガラス内側のバックミラー近傍に設置される。図2のうち、図2(a)は、画像処理装置1を搭載した車両100の側面概観図であり、図2(b)は、車両100の正面図である。   For example, as illustrated in FIG. 2, the image processing apparatus 1 is installed in the vicinity of a rearview mirror inside a windshield of a living room space of a vehicle 100 such as an automobile. 2A is a schematic side view of the vehicle 100 on which the image processing apparatus 1 is mounted, and FIG. 2B is a front view of the vehicle 100.

なお、画像処理装置1は、車両の一例としての自動車だけでなく、車両の他の例として、バイク、自転車、車椅子、または農業用の耕運機等に搭載するものとしてもよい。   The image processing apparatus 1 may be mounted not only on an automobile as an example of a vehicle but also on a motorcycle, a bicycle, a wheelchair, an agricultural cultivator, or the like as another example of a vehicle.

(画像処理装置のハードウェア構成)
図3は、第1の実施の形態の画像処理装置のハードウェア構成の一例を示す図である。図3を参照しながら、画像処理装置1のハードウェア構成について説明する。
(Hardware configuration of image processing device)
FIG. 3 is a diagram illustrating an example of a hardware configuration of the image processing apparatus according to the first embodiment. The hardware configuration of the image processing apparatus 1 will be described with reference to FIG.

図3に示すように、画像処理装置1は、本体部2と、撮像装置10a(撮像手段)と、撮像装置10b(撮像手段)と、信号変換装置20aと、信号変換装置20bと、追跡処理装置30と、を備えている。   As shown in FIG. 3, the image processing apparatus 1 includes a main body 2, an imaging apparatus 10a (imaging means), an imaging apparatus 10b (imaging means), a signal conversion apparatus 20a, a signal conversion apparatus 20b, and a tracking process. Device 30.

本体部2は、画像処理装置1の筐体を構成するものであり、撮像装置10a、10bを固定して支持し、信号変換装置20a、20bおよび追跡処理装置30を内蔵する。   The main body 2 constitutes the housing of the image processing apparatus 1, fixes and supports the imaging devices 10 a and 10 b, and incorporates the signal conversion devices 20 a and 20 b and the tracking processing device 30.

撮像装置10aは、前方の被写体を撮像してアナログの画像信号を生成する装置である。撮像装置10aは、撮像レンズ11aと、絞り12aと、画像センサ13aと、を備えている。   The imaging device 10a is a device that images an object in front and generates an analog image signal. The imaging device 10a includes an imaging lens 11a, a diaphragm 12a, and an image sensor 13a.

撮像レンズ11aは、入射した光を屈折させて物体の像を結像させるための光学素子である。絞り12aは、撮像レンズ11aを通過した光の一部を遮ることによって、画像センサ13aに到達する光の量を調整する部材である。画像センサ13aは、撮像レンズ11aおよび絞り12aを通過した光を電気的なアナログの画像信号に変換する固体撮像素子である。画像センサ13aは、例えば、CCD(Charge Coupled Devices)またはCMOS(Complementary Metal Oxide Semiconductor)によって実現される。   The imaging lens 11a is an optical element for refracting incident light to form an object image. The diaphragm 12a is a member that adjusts the amount of light reaching the image sensor 13a by blocking part of the light that has passed through the imaging lens 11a. The image sensor 13a is a solid-state image sensor that converts light that has passed through the imaging lens 11a and the diaphragm 12a into an electrical analog image signal. The image sensor 13a is realized by, for example, a CCD (Charge Coupled Devices) or a CMOS (Complementary Metal Oxide Semiconductor).

撮像装置10bは、前方の被写体を撮像してアナログの画像信号を生成する装置である。撮像装置10bは、撮像レンズ11bと、絞り12bと、画像センサ13bと、を備えている。撮像レンズ11b、絞り12bおよび画像センサ13bの機能は、それぞれ上述した撮像レンズ11a、絞り12aおよび画像センサ13aの機能と同様である。また、撮像レンズ11aおよび撮像レンズ11bは、それぞれのレンズ面が互いに同一平面内上にあるように設置されている。   The imaging device 10b is a device that images an object in front and generates an analog image signal. The imaging device 10b includes an imaging lens 11b, a diaphragm 12b, and an image sensor 13b. The functions of the imaging lens 11b, the diaphragm 12b, and the image sensor 13b are the same as the functions of the imaging lens 11a, the diaphragm 12a, and the image sensor 13a, respectively. Further, the imaging lens 11a and the imaging lens 11b are installed such that their lens surfaces are on the same plane.

信号変換装置20aは、撮像装置10aにより生成されたアナログの画像信号を、デジタル形式の画像データに変換する装置である。信号変換装置20aは、CDS(Correlated Double Sampling)21aと、AGC(Auto Gain Control)22aと、ADC(Analog Digital Converter)23aと、フレームメモリ24aと、を備えている。   The signal conversion device 20a is a device that converts the analog image signal generated by the imaging device 10a into digital image data. The signal conversion device 20a includes a CDS (Correlated Double Sampling) 21a, an AGC (Auto Gain Control) 22a, an ADC (Analog Digital Converter) 23a, and a frame memory 24a.

CDS21aは、画像センサ13aにより生成されたアナログの画像信号に対して、相関二重サンプリング、横方向の微分フィルタ、および縦方向の平滑フィルタ等によりノイズを除去する。AGC22aは、CDS21aによってノイズが除去されたアナログの画像信号の強度を制御する利得制御を行う。ADC23aは、AGC22aによって利得制御されたアナログの画像信号をデジタル形式の画像データに変換する。フレームメモリ24aは、ADC23aによって変換された画像データを記憶する。   The CDS 21a removes noise from the analog image signal generated by the image sensor 13a by correlated double sampling, a horizontal differential filter, a vertical smoothing filter, and the like. The AGC 22a performs gain control for controlling the intensity of the analog image signal from which noise has been removed by the CDS 21a. The ADC 23a converts an analog image signal whose gain is controlled by the AGC 22a into digital image data. The frame memory 24a stores the image data converted by the ADC 23a.

信号変換装置20bは、撮像装置10bにより生成されたアナログの画像信号を、デジタル形式の画像データに変換する装置である。信号変換装置20bは、CDS21bと、AGC22bと、ADC23bと、フレームメモリ24bと、を備えている。CDS21b、AGC22b、ADC23bおよびフレームメモリ24bの機能は、それぞれ上述したCDS21a、AGC22a、ADC23aおよびフレームメモリ24aの機能と同様である。   The signal conversion device 20b is a device that converts an analog image signal generated by the imaging device 10b into digital image data. The signal conversion device 20b includes a CDS 21b, an AGC 22b, an ADC 23b, and a frame memory 24b. The functions of the CDS 21b, AGC 22b, ADC 23b, and frame memory 24b are the same as the functions of the CDS 21a, AGC 22a, ADC 23a, and frame memory 24a, respectively.

追跡処理装置30は、信号変換装置20aおよび信号変換装置20bによって変換された画像データに対して、後述する特徴点を追跡する画像処理(以下、「追跡画像処理」と称する場合がある)を実行する装置である。追跡処理装置30は、FPGA(Field Programmable Gate Array)31と、CPU(Central Processing Unit)32と、ROM(Read Only Memory)33と、RAM(Random Access Memory)34と、I/F(Interface)35と、スピーカ36と、バスライン39と、を備えている。   The tracking processing device 30 executes image processing for tracking feature points described later (hereinafter sometimes referred to as “tracking image processing”) on the image data converted by the signal conversion device 20a and the signal conversion device 20b. It is a device to do. The tracking processing device 30 includes an FPGA (Field Programmable Gate Array) 31, a CPU (Central Processing Unit) 32, a ROM (Read Only Memory) 33, a RAM (Random Access Memory) 34, and an I / F (Inter) (35). And a speaker 36 and a bus line 39.

FPGA31は、画像データに基づく画像における視差値Δを算出する処理、および追跡画像処理等を行う集積回路である。CPU32は、画像処理装置1の各機能を制御する。ROM33は、CPU32が画像処理装置1の各機能を制御するために実行する画像処理用プログラムを記憶している。RAM34は、CPU32のワークエリアとして使用される。I/F35は、外部機器等と通信するためのインターフェースであり、例えば、CAN(Controller Area Network)等のインターフェースである。スピーカ36は、FPGA31またはCPU32による命令に従って、警告音等の音声を出力する装置である。バスライン39は、図3に示すように、FPGA31、CPU32、ROM33、RAM34、I/F35およびスピーカ36 を互いに電気的に接続するアドレスバスおよびデータバス等である。   The FPGA 31 is an integrated circuit that performs processing for calculating a parallax value Δ in an image based on image data, tracking image processing, and the like. The CPU 32 controls each function of the image processing apparatus 1. The ROM 33 stores an image processing program executed by the CPU 32 to control each function of the image processing apparatus 1. The RAM 34 is used as a work area for the CPU 32. The I / F 35 is an interface for communicating with an external device or the like, and is an interface such as a CAN (Controller Area Network), for example. The speaker 36 is a device that outputs a sound such as a warning sound according to a command from the FPGA 31 or the CPU 32. As shown in FIG. 3, the bus line 39 is an address bus and a data bus that electrically connect the FPGA 31, the CPU 32, the ROM 33, the RAM 34, the I / F 35, and the speaker 36 to each other.

また、上述の画像処理用プログラムは、インストール可能な形式または実行可能な形式のファイルで、コンピュータで読み取り可能な記録媒体に記録して流通させてもよい。この記録媒体は、CD−ROM(Compact Disc Read Only Memory)またはSDメモリカード(Secure Digital memory card)等である。   Further, the above-described image processing program may be recorded in a computer-readable recording medium and distributed as a file in an installable format or an executable format. This recording medium is a CD-ROM (Compact Disc Read Only Memory) or an SD memory card (Secure Digital memory card).

(画像処理装置のブロック構成)
図4は、第1の実施の形態の画像処理装置のブロック構成の一例を示す図である。図4を参照しながら、画像処理装置1のブロック構成について説明する。
(Block configuration of image processing apparatus)
FIG. 4 is a diagram illustrating an example of a block configuration of the image processing apparatus according to the first embodiment. The block configuration of the image processing apparatus 1 will be described with reference to FIG.

図4に示すように、画像処理装置1は、画像取得部110と、補正部120と、距離測定部130と、特徴点抽出部140(抽出手段)と、グルーピング部150と、特徴点追跡部160と、警告部170と、を有する。   As shown in FIG. 4, the image processing apparatus 1 includes an image acquisition unit 110, a correction unit 120, a distance measurement unit 130, a feature point extraction unit 140 (extraction means), a grouping unit 150, and a feature point tracking unit. 160 and a warning unit 170.

画像取得部110は、左右2台のカメラにより前方の被写体を撮像して、それぞれアナログの画像信号を生成し、各画像信号に基づく画像である2つの輝度画像を得る機能部である。画像取得部110は、図3に示す撮像装置10a、10bによって実現される。   The image acquisition unit 110 is a functional unit that captures a subject in front by two cameras on the left and right sides, generates an analog image signal, and obtains two luminance images that are images based on the image signals. The image acquisition unit 110 is realized by the imaging devices 10a and 10b illustrated in FIG.

補正部120は、画像取得部110により得られた2つの輝度画像の画像データに対して、フィルタ処理等による補正によりノイズおよび歪み等を除去し、デジタル形式の画像データに変換して出力する機能部である。ここで、補正部120が出力する2つの輝度画像の画像データ(以下、単に「輝度画像」と称する)のうち、画像取得部110の右のカメラ(撮像装置10a)により撮像された画像データを基準画像Iaの画像データ(以下、単に「基準画像Ia」という)とし、左のカメラ(撮像装置10b)により撮像された画像データを比較画像Ibの画像データ(以下、単に「比較画像Ib」という)とする。すなわち、補正部120は、画像取得部110から出力された2つの輝度画像に基づいて、基準画像Iaおよび比較画像Ibを出力する。補正部120は、図3に示す信号変換装置20a、20bによって実現される。   The correction unit 120 has a function of removing noise and distortion from the image data of the two luminance images obtained by the image acquisition unit 110 by correction using a filter process or the like, converting the image data into digital image data, and outputting the image data. Part. Here, image data captured by the right camera (imaging device 10a) of the image acquisition unit 110 among the image data of the two luminance images output from the correction unit 120 (hereinafter simply referred to as “luminance image”). The image data of the reference image Ia (hereinafter simply referred to as “reference image Ia”), and the image data captured by the left camera (imaging device 10b) is the image data of the comparison image Ib (hereinafter simply referred to as “comparison image Ib”). ). That is, the correction unit 120 outputs the reference image Ia and the comparison image Ib based on the two luminance images output from the image acquisition unit 110. The correction unit 120 is realized by the signal conversion devices 20a and 20b illustrated in FIG.

距離測定部130は、ステレオマッチング動作により、補正部120から得られた基準画像Iaおよび比較画像Ibに基づく視差によって、比較画像Ib(または基準画像Ia)に含まれる各被写体(物体)について、画像処理装置1からその各被写体までの距離を測定する機能部である。距離測定部130による距離の測定動作は、画像処理装置1による追跡画像処理が実行されている間、原則として常時、実行される。距離測定部130の構成および動作の詳細については、後述する。距離測定部130は、図3に示すFPGA31によって実現される。   The distance measurement unit 130 performs an image for each subject (object) included in the comparison image Ib (or the reference image Ia) based on the parallax based on the reference image Ia and the comparison image Ib obtained from the correction unit 120 by the stereo matching operation. It is a functional unit that measures the distance from the processing apparatus 1 to each subject. In principle, the distance measuring operation by the distance measuring unit 130 is always performed while the tracking image processing by the image processing apparatus 1 is being performed. Details of the configuration and operation of the distance measuring unit 130 will be described later. The distance measuring unit 130 is realized by the FPGA 31 illustrated in FIG.

特徴点抽出部140は、撮像装置10a、10bにより撮像される物体の角等のように際立って認識される画像上の点(特徴点)を抽出する機能部である。特徴点抽出部140による特徴点の抽出動作は、画像処理装置1による追跡画像処理が実行されている間、原則として常時、実行される。これは、画像処理装置1が搭載された移動体である車両100等では、撮像装置10a、10bにより撮像される画像には、常時、新規の特徴点が現れるためである。特徴点抽出部140による特徴点の抽出方法としては、例えば、ハリス(Harris)のコーナー検出アルゴリズム等が適用できる。特徴点抽出部140は、図3に示すFPGA31によって実現される。   The feature point extraction unit 140 is a functional unit that extracts points (feature points) on an image that are remarkably recognized, such as the corners of an object imaged by the imaging devices 10a and 10b. In principle, the feature point extraction operation by the feature point extraction unit 140 is always performed while the tracking image processing by the image processing apparatus 1 is being performed. This is because, in the vehicle 100 or the like that is a moving body on which the image processing device 1 is mounted, new feature points always appear in images captured by the imaging devices 10a and 10b. As a feature point extraction method by the feature point extraction unit 140, for example, a Harris corner detection algorithm can be applied. The feature point extraction unit 140 is realized by the FPGA 31 illustrated in FIG.

グルーピング部150は、特徴点追跡部160による特徴点の追跡動作において、特徴点が消失した場合に、消失した特徴点の代替とする点(以下、代替点という)を特定するために、複数の特徴点をグルーピングする機能部である。上述のように、撮像装置10a、10bにより撮像される画像には、常時、新規の特徴点が現れるため、グルーピング部150によるグルーピングの動作は、画像処理装置1による追跡画像処理が実行されている間、原則として常時、実行される必要がある。グルーピング部150によるグルーピングの動作については、後述する。グルーピング部150は、図3に示すFPGA31によって実現される。   In the feature point tracking operation by the feature point tracking unit 160, the grouping unit 150 includes a plurality of points in order to identify a point to be replaced with the lost feature point (hereinafter referred to as a replacement point) when the feature point is lost. It is a functional unit that groups feature points. As described above, since new feature points always appear in the images captured by the imaging devices 10a and 10b, the grouping operation by the grouping unit 150 is performed by tracking image processing by the image processing device 1. In principle, it needs to be executed at all times. The grouping operation by the grouping unit 150 will be described later. The grouping unit 150 is realized by the FPGA 31 illustrated in FIG.

特徴点追跡部160は、距離測定部130により測定された距離情報、特徴点抽出部140により抽出された特徴点の座標、およびグルーピング部150による特徴点のグルーピングの情報に基づいて、特徴点の追跡動作を実行する機能部である。特徴点追跡部160の構成および動作の詳細については、後述する。特徴点追跡部160は、図3に示すFPGA31によって実現される。   Based on the distance information measured by the distance measuring unit 130, the feature point coordinates extracted by the feature point extracting unit 140, and the feature point grouping information by the grouping unit 150, the feature point tracking unit 160 It is a functional unit that executes a tracking operation. Details of the configuration and operation of the feature point tracking unit 160 will be described later. The feature point tracking unit 160 is realized by the FPGA 31 shown in FIG.

警告部170は、特徴点追跡部160により特徴点の追跡失敗を示す追跡情報を受け取った場合、警告を発する機能部である。具体的には、警告部170は、例えば、特徴点の追跡失敗を示す追跡情報を受け取った場合、警告として警告音を出力する。警告部170は、図3に示すスピーカ36によって実現される。なお、警告部170は、スピーカ36によって実現されることに限定されるものではなく、例えば、警告を示すランプまたは警告メッセージ等の表示装置によって実現されるものとしてもよい。   The warning unit 170 is a functional unit that issues a warning when the feature point tracking unit 160 receives tracking information indicating failure of tracking a feature point. Specifically, the warning unit 170 outputs a warning sound as a warning when, for example, tracking information indicating failure to track a feature point is received. The warning unit 170 is realized by the speaker 36 shown in FIG. The warning unit 170 is not limited to being realized by the speaker 36, and may be realized by, for example, a display device such as a warning lamp or a warning message.

なお、以下、上述の特徴点抽出部140による特徴点の抽出動作、グルーピング部150によるグルーピングの動作、および特徴点追跡部160による特徴点の追跡動作は、左のカメラ(撮像装置10b)により撮像された映像データのフレームに対して実行されるものとして説明する。ただし、右のカメラ(撮像装置10a)により撮像された映像データのフレームに対して実行することも可能であることは言うまでもない。   Hereinafter, the feature point extraction operation by the feature point extraction unit 140, the grouping operation by the grouping unit 150, and the feature point tracking operation by the feature point tracking unit 160 are imaged by the left camera (imaging device 10b). The description will be made assuming that the processing is performed on the frame of the video data that has been processed. However, it goes without saying that it can also be executed on a frame of video data imaged by the right camera (imaging device 10a).

図5は、第1の実施の形態の画像処理装置の距離測定部のブロック構成の一例を示す図である。図5を参照しながら、画像処理装置1の距離測定部130のブロック構成について説明する。   FIG. 5 is a diagram illustrating an example of a block configuration of a distance measurement unit of the image processing apparatus according to the first embodiment. A block configuration of the distance measuring unit 130 of the image processing apparatus 1 will be described with reference to FIG.

図5に示すように、距離測定部130は、コスト算出部131と、コスト合成部132と、距離導出部133と、を有する。   As illustrated in FIG. 5, the distance measurement unit 130 includes a cost calculation unit 131, a cost synthesis unit 132, and a distance derivation unit 133.

コスト算出部131は、基準画像Iaにおける基準画素p(x,y)(x、yは画像上の座標)の輝度値、および、基準画素p(x,y)に基づく比較画像Ibにおけるエピポーラ線上で、基準画素p(x,y)の位置に相当する画素からシフト量dでシフトすることにより特定される、対応画素の候補である候補画素q(x+d,y)の各輝度値に基づいて、各候補画素q(x+d,y)の非類似度を示すコスト値C(p,d)を算出する機能部である。コスト算出部131が算出するコスト値Cとしては、例えば、SAD(Sum of Absolute Differences)、またはSSD(Sum of Squared Differences)等を用いることができる。コスト算出部131の動作の詳細については、後述する。   The cost calculator 131 calculates the luminance value of the reference pixel p (x, y) (x and y are coordinates on the image) in the reference image Ia and the epipolar line in the comparison image Ib based on the reference pixel p (x, y). Thus, based on each luminance value of the candidate pixel q (x + d, y), which is a candidate for the corresponding pixel, specified by shifting by the shift amount d from the pixel corresponding to the position of the reference pixel p (x, y). , A functional unit that calculates a cost value C (p, d) indicating the dissimilarity of each candidate pixel q (x + d, y). As the cost value C calculated by the cost calculation unit 131, for example, SAD (Sum of Absolute Differences), SSD (Sum of Squared Differences), or the like can be used. Details of the operation of the cost calculation unit 131 will be described later.

コスト合成部132は、基準画像Iaにおける基準画素p(x,y)の周辺の画素を基準画素とした場合のその基準画素についての比較画像Ibにおける画素のコスト値Cを、コスト算出部131により算出された候補画素q(x+d,y)のコスト値C(p,d)に集約させて、候補画素q(x+d,y)の合成コスト値Ls(p,d)を算出する機能部である。コスト合成部132の動作の詳細については、後述する。   The cost calculation unit 131 uses the cost calculation unit 131 to calculate the cost value C of the pixel in the comparison image Ib for the reference pixel when the pixel around the reference pixel p (x, y) in the reference image Ia is the reference pixel. This is a functional unit that aggregates the calculated cost value C (p + d, y) of the candidate pixel q (x + d, y) and calculates the combined cost value Ls (p, d) of the candidate pixel q (x + d, y). . Details of the operation of the cost composition unit 132 will be described later.

距離導出部133は、コスト合成部132により算出された、基準画像Iaにおける基準画素についての比較画像Ibにおける画素の合成コスト値Lsの最小値に対応するシフト量dを視差値Δとして特定する機能部である。さらに、距離導出部133は、特定した視差値Δから距離を導出する。距離導出部133の動作の詳細については、後述する。なお、上述のように特定された視差値Δは、画素単位の値であるが、例えば、サブピクセル推定により画素よりも細かい単位(サブピクセル単位)で視差値Δを求めるものとしてもよい。サブピクセル推定としては、パラボラフィッティングまたは最小二乗法等による方法が適用できる。   The distance deriving unit 133 specifies the shift amount d corresponding to the minimum value of the combined cost value Ls of the pixels in the comparison image Ib for the reference pixel in the reference image Ia, calculated by the cost combining unit 132, as the parallax value Δ. Part. Furthermore, the distance deriving unit 133 derives a distance from the specified parallax value Δ. Details of the operation of the distance deriving unit 133 will be described later. Note that the parallax value Δ identified as described above is a value in units of pixels, but the parallax value Δ may be obtained in units smaller than pixels (subpixel units) by subpixel estimation, for example. As the subpixel estimation, a parabola fitting method or a least square method can be applied.

図6は、第1の実施の形態の画像処理装置の特徴点追跡部のブロック構成の一例を示す図である。図6を参照しながら、画像処理装置1の特徴点追跡部160のブロック構成について説明する。   FIG. 6 is a diagram illustrating an example of a block configuration of a feature point tracking unit of the image processing apparatus according to the first embodiment. The block configuration of the feature point tracking unit 160 of the image processing apparatus 1 will be described with reference to FIG.

図6に示すように、特徴点追跡部160は、マッチング部161(マッチング手段)と、追跡判定部162(判定手段)と、座標予測部163(予測手段)と、復帰部164(復帰手段)と、を有する。   As shown in FIG. 6, the feature point tracking unit 160 includes a matching unit 161 (matching unit), a tracking determination unit 162 (determination unit), a coordinate prediction unit 163 (prediction unit), and a return unit 164 (return unit). And having.

マッチング部161は、特徴点抽出部140により特定のフレーム(以下、単に「n枚目のフレーム」と称する場合がある)で抽出された特徴点の座標を中心とした所定の大きさ(N画素×N画素)の範囲の画像であるテンプレートと一致する画像を、次のフレーム(以下、単に「(n+1)枚目のフレーム」と称する場合がある)における所定のサーチ範囲(W画素×H画素)で探索するブロックマッチング動作を実行する機能部である。ここで、フレームとは、撮像装置10a、10bにより撮像される映像データを構成する1つ1つの画像を示す。マッチング部161の動作の詳細については、後述する。なお、テンプレートは、N画素×N画素としたが、これに限定されるものではなく、縦横異なる画素数の画像であってもよく、または、矩形ではなく円形等のテンプレートであってもよい。また、マッチング部161によるマッチング動作は、画像の画素値について縦横に微分した画像を用いて実行されるものとしてもよい。   The matching unit 161 has a predetermined size (N pixels) centered on the coordinates of the feature points extracted in a specific frame (hereinafter sometimes simply referred to as “nth frame”) by the feature point extraction unit 140. A predetermined search range (W pixels × H pixels) in the next frame (hereinafter, sometimes simply referred to as “(n + 1) th frame”) is an image that matches the template that is an image in the range of × N pixels. ) Is a functional unit that executes a block matching operation to be searched. Here, the frame indicates each image that constitutes video data captured by the imaging devices 10a and 10b. Details of the operation of the matching unit 161 will be described later. The template is N pixels × N pixels, but is not limited to this, and may be an image having a different number of pixels in the vertical and horizontal directions, or may be a template such as a circle instead of a rectangle. Further, the matching operation by the matching unit 161 may be executed using an image obtained by differentiating the pixel value of the image vertically and horizontally.

追跡判定部162は、マッチング部161によるブロックマッチング動作の結果、n枚目のフレームにおける追跡対象となる特徴点(以下、「追跡点」と称する場合がある)を含むテンプレートを、(n+1)枚目のフレームにおけるサーチ範囲で探索できたか否か、すなわち、(n+1)枚目のフレームで特徴点を追跡できたか否かを判定する機能部である。追跡判定部162は、例えば、追跡点についてオクルージョンが発生したか否かを判定することにより、追跡点が追跡できたか否かを判定する。追跡判定部162の動作の詳細については、後述する。   As a result of the block matching operation by the matching unit 161, the tracking determination unit 162 generates (n + 1) templates including feature points to be tracked in the nth frame (hereinafter sometimes referred to as “tracking points”). This is a functional unit that determines whether or not the search has been performed within the search range in the eye frame, that is, whether or not the feature point has been tracked in the (n + 1) th frame. The tracking determination unit 162 determines whether or not the tracking point has been tracked by determining whether or not occlusion has occurred for the tracking point, for example. Details of the operation of the tracking determination unit 162 will be described later.

座標予測部163は、追跡判定部162により追跡点の追跡ができないと判定された場合、すなわち、追跡点が消失したと判定された場合、グルーピング部150によって消失した追跡点である特徴点と同じグループにグルーピングされた他の特徴点を代替点として特定し、代替点を利用して、消失した追跡点の動きを予測する機能部である。具体的には、座標予測部163は、特定した代替点の動きのベクトル(オプティカルフロー)を利用して、消失した追跡点が存在する点を予測する。座標予測部163の動作の詳細については、後述する。   When the tracking determination unit 162 determines that the tracking point cannot be tracked, that is, when it is determined that the tracking point has disappeared, the coordinate prediction unit 163 is the same as the feature point that is the tracking point that has disappeared by the grouping unit 150 This is a functional unit that identifies other feature points grouped in a group as alternative points, and uses the alternative points to predict the movement of a tracked point that has disappeared. Specifically, the coordinate predicting unit 163 predicts a point where the disappeared tracking point exists using a motion vector (optical flow) of the specified alternative point. Details of the operation of the coordinate prediction unit 163 will be described later.

復帰部164は、座標予測部163によって消失した追跡点が存在すると予測された点(予測点)を中心にサーチ領域を形成し、追跡点が消失する前のその追跡点のテンプレートと、形成したサーチ領域とを比較することにより、追跡点の復帰動作を行う機能部である。復帰部164の動作の詳細については、後述する。   The return unit 164 forms a search area around a point (predicted point) where the tracking point disappeared by the coordinate predicting unit 163 is predicted, and forms a template of the tracking point before the tracking point disappears. This is a functional unit that performs tracking point return operation by comparing the search area. Details of the operation of the return unit 164 will be described later.

なお、図4〜6に示した各機能部は、機能を概念的に示したものであって、このような構成に限定されるものではない。例えば、図4〜6で独立した機能部として図示した複数の機能部を、1つの機能部として構成してもよい。一方、図4〜6の1つの機能部が有する機能を複数に分割し、複数の機能部として構成するものとしてもよい。   4 to 6 conceptually show functions, and are not limited to such a configuration. For example, a plurality of functional units illustrated as independent functional units in FIGS. 4 to 6 may be configured as one functional unit. On the other hand, it is also possible to divide the functions of one functional unit shown in FIGS.

また、図4〜6に示した各機能部は、FPGA31等のハードウェア回路で構成されることに限定されるものではなく、少なくとも一部の機能部が図3に示すCPU32で実行されるプログラムによって実現されるものとしてもよい。   The functional units shown in FIGS. 4 to 6 are not limited to being configured by hardware circuits such as the FPGA 31, but at least a part of the functional units is executed by the CPU 32 shown in FIG. It is good also as what is realized by.

(物体の距離の測定動作)
図7〜12を参照しながら、距離測定部130によるSGM(Semi−Global Matching)法を用いた距離の測定動作について説明する。
(Object distance measurement operation)
The distance measuring operation using the SGM (Semi-Global Matching) method by the distance measuring unit 130 will be described with reference to FIGS.

<測距の原理>
図7は、撮像装置から物体までの距離を導き出す原理を説明する図である。図7を参照しながら、ステレオマッチング動作により、ステレオカメラから物体に対する視差を導出し、この視差を示す視差値によって、ステレオカメラから物体までの距離を測定する原理について説明する。なお、以下では、説明を簡略化するため、複数の画素からなる所定領域のマッチングではなく、画素単位のマッチングの例について説明する。また、一画素単位ではなく、複数の画素からなる所定領域単位で処理される場合、基準画素を含む所定領域は基準領域として示され、対応画素を含む所定領域は対応領域として示される。また、この基準領域には基準画素のみの場合も含まれ、対応領域には対応画素のみの場合も含まれる。
<Principles of ranging>
FIG. 7 is a diagram for explaining the principle of deriving the distance from the imaging device to the object. With reference to FIG. 7, the principle of deriving a parallax with respect to an object from a stereo camera by a stereo matching operation and measuring the distance from the stereo camera to the object with a parallax value indicating the parallax will be described. In the following, in order to simplify the description, an example of matching in units of pixels will be described instead of matching a predetermined region composed of a plurality of pixels. In addition, when processing is performed in units of a predetermined area including a plurality of pixels instead of a single pixel, the predetermined area including the reference pixel is indicated as a reference area, and the predetermined area including the corresponding pixel is indicated as a corresponding area. Further, this reference area includes the case of only the reference pixel, and the corresponding area includes the case of only the corresponding pixel.

図7に示すように、撮像装置10a、10bは、平行等位に設置されている。図7において、3次元空間内の物体E上の点Sは、基準画像Iaおよび比較画像Ibそれぞれにおいて、撮像レンズ11aと撮像レンズ11bとを結ぶ直線と平行な直線上の位置に写像される。ここで、各画像に写像された点Sを、基準画像Iaにおいて点Sa(x,y)とし、比較画像Ibにおいて点Sb(X,y)とする。このとき、視差値Δは、基準画像Ia上の点Sa(x,y)の座標と、比較画像Ib上の点Sb(X,y)の座標とを用いて、以下の(式1)のように表される。   As shown in FIG. 7, the imaging devices 10a and 10b are installed in parallel equiposition. In FIG. 7, the point S on the object E in the three-dimensional space is mapped to a position on a straight line parallel to a straight line connecting the imaging lens 11a and the imaging lens 11b in each of the reference image Ia and the comparison image Ib. Here, the point S mapped to each image is a point Sa (x, y) in the reference image Ia and a point Sb (X, y) in the comparison image Ib. At this time, the parallax value Δ is expressed by the following (Expression 1) using the coordinates of the point Sa (x, y) on the reference image Ia and the coordinates of the point Sb (X, y) on the comparison image Ib. It is expressed as follows.

Δ=X−x ・・・(式1)   Δ = X−x (Formula 1)

また、図7において、基準画像Iaにおける点Sa(x,y)と撮像レンズ11aから撮像面上におろした垂線の交点との距離をΔaとし、比較画像Ibにおける点Sb(X,y)と撮像レンズ11bから撮像面上におろした垂線の交点との距離をΔbとすると、視差値Δは、Δ=Δa+Δbと表される。   In FIG. 7, the distance between the point Sa (x, y) in the reference image Ia and the intersection of the perpendicular line taken from the imaging lens 11a on the imaging surface is Δa, and the point Sb (X, y) in the comparative image Ib is When the distance from the intersection of the perpendicular line taken from the imaging lens 11b on the imaging surface is Δb, the parallax value Δ is expressed as Δ = Δa + Δb.

次に、視差値Δを用いることにより、撮像装置10a、10bと物体Eとの間の距離Zを導出する。ここで、距離Zとは、撮像レンズ11aの焦点位置と撮像レンズ11bの焦点位置とを結ぶ直線から物体E上の点Sまでの距離である。図7に示すように、撮像レンズ11aおよび撮像レンズ11bの焦点距離f、撮像レンズ11aと撮像レンズ11bとの間の長さである基線長B、および視差値Δを用いて、下記の(式2)により、距離Zを算出することができる。   Next, the distance Z between the imaging devices 10a and 10b and the object E is derived by using the parallax value Δ. Here, the distance Z is a distance from a straight line connecting the focal position of the imaging lens 11a and the focal position of the imaging lens 11b to the point S on the object E. As shown in FIG. 7, using the focal length f of the imaging lens 11a and the imaging lens 11b, the baseline length B that is the length between the imaging lens 11a and the imaging lens 11b, and the parallax value Δ, According to 2), the distance Z can be calculated.

Z=(B×f)/Δ ・・・(式2)   Z = (B × f) / Δ (Expression 2)

この(式2)が示すように、視差値Δが大きいほど距離Zは小さく、視差値Δが小さいほど距離Zは大きくなる。   As shown in (Equation 2), the larger the parallax value Δ, the smaller the distance Z, and the smaller the parallax value Δ, the larger the distance Z.

図8は、基準画像、高密度視差画像およびエッジ視差画像を示す概念図である。このうち、図8(a)は、基準画像を示し、図8(b)は、図8(a)に示す基準画像に対するデンス視差画像を示し、図8(c)は、図8(a)に示す基準画像に対するエッジ視差画像を示す概念図である。ここで、基準画像は、図7に示す基準画像Iaに相当し、撮像された被写体が輝度値によって表された画像である。また、高密度視差画像とは、基準画像の各画素を、SGM法によって導出された基準画像における各画素に対応する視差値で表した画像を示すものとする。そして、エッジ視差画像とは、基準画像の各画素を、ブロックマッチング法によって導出された基準画像における各画素に対応する視差値で表した画像を示すものとする。ただし、ブロックマッチング法によって導出できる視差値は、後述するように、基準画像におけるエッジ部のような比較的テクスチャの強い部分であり、テクスチャの弱い部分のように視差値を導出できない場合は、例えば、視差値を「0」として画像を構成する。   FIG. 8 is a conceptual diagram showing a reference image, a high-density parallax image, and an edge parallax image. 8A shows a reference image, FIG. 8B shows a dense parallax image with respect to the reference image shown in FIG. 8A, and FIG. 8C shows FIG. 8A. It is a conceptual diagram which shows the edge parallax image with respect to the reference | standard image shown in FIG. Here, the reference image corresponds to the reference image Ia shown in FIG. 7, and is an image in which the captured subject is represented by a luminance value. Further, the high-density parallax image indicates an image in which each pixel of the reference image is represented by a parallax value corresponding to each pixel in the reference image derived by the SGM method. And an edge parallax image shall show the image which represented each pixel of the reference | standard image by the parallax value corresponding to each pixel in the reference | standard image derived | led-out by the block matching method. However, as will be described later, the disparity value that can be derived by the block matching method is a relatively textured portion such as an edge portion in the reference image, and when the disparity value cannot be derived such as a weak texture portion, for example, The image is configured with a parallax value of “0”.

SGM法は、画像におけるテクスチャが弱い部分に対しても適切に視差値を導出する方法であり、図8(a)に示す基準画像に基づいて、図8(b)に示す高密度視差画像を導出する方法である。また、ブロックマッチング法は、図8(a)に示す基準画像に基づいて、図8(c)に示すエッジ視差画像を導出する方法である。SGM法によれば、図8(b)および図8(c)における破線の楕円内を比べると分かるように、高密度視差画像は、エッジ視差画像に比べてテクスチャが弱い道路等においても詳細な視差値に基づく距離を表すことができるため、より詳細な測距を行うことができる。   The SGM method is a method for appropriately deriving a parallax value even for a portion having a weak texture in an image. Based on the reference image shown in FIG. 8A, the high-density parallax image shown in FIG. It is a method of deriving. The block matching method is a method for deriving the edge parallax image shown in FIG. 8C based on the reference image shown in FIG. According to the SGM method, as can be seen by comparing the inside of the dashed ellipse in FIGS. 8B and 8C, the high-density parallax image is detailed even on roads and the like where the texture is weaker than the edge parallax image. Since the distance based on the parallax value can be expressed, more detailed distance measurement can be performed.

SGM法は、基準画像に対する比較画像上の、非類似度であるコスト値を算出して直ちに視差値を導出せず、コスト値を算出後、さらに、合成コスト値を算出することで視差値を導出する方法である。そして、SGM法は、最終的に、基準画像におけるほぼ全ての画素に対応する視差値で表された視差画像(ここでは、高密度視差画像)を導出する。   In the SGM method, a cost value that is a dissimilarity on a comparison image with respect to a reference image is not calculated and a parallax value is not derived immediately. After calculating a cost value, a disparity value is calculated by calculating a combined cost value. It is a method of deriving. The SGM method finally derives a parallax image (here, a high-density parallax image) represented by parallax values corresponding to almost all pixels in the reference image.

一方、ブロックマッチング法の場合は、コスト値を算出する点はSGM法と同じであるが、SGM法のように、合成コスト値を算出せずに、エッジ部のような比較的テクスチャの強い部分の視差値のみが導出される。   On the other hand, in the case of the block matching method, the cost value is calculated in the same way as the SGM method. However, as in the SGM method, a comparatively strong texture such as an edge portion is calculated without calculating the synthesis cost value. Only the parallax value is derived.

なお、上述のように、右のカメラ(撮像装置10a)により撮像された画像を基準画像Iaとし、左のカメラ(撮像装置10b)により撮像された画像を比較画像Ibとしているが、これに限定されるものではない。すなわち、左のカメラにより撮像された画像を比較画像Ibとし、右のカメラにより撮像された画像を基準画像Iaとしてもよい。   As described above, the image captured by the right camera (imaging device 10a) is the reference image Ia, and the image captured by the left camera (imaging device 10b) is the comparison image Ib. However, the present invention is not limited to this. Is not to be done. That is, an image captured by the left camera may be used as the comparison image Ib, and an image captured by the right camera may be used as the reference image Ia.

<コスト値の算出>
図9は、基準画像における基準画素に対応する比較画像における対応画素を求める場合の説明図である。図10は、シフト量とコスト値との関係を示すグラフの一例を示す図である。図9および10を参照しながら、コスト値C(p,d)の算出方法について説明する。なお、以下の説明では、C(p,d)は、C(x,y,d)を表すものとして説明する。
<Calculation of cost value>
FIG. 9 is an explanatory diagram for obtaining a corresponding pixel in a comparison image corresponding to a reference pixel in a reference image. FIG. 10 is a diagram illustrating an example of a graph indicating the relationship between the shift amount and the cost value. A method for calculating the cost value C (p, d) will be described with reference to FIGS. In the following description, C (p, d) is described as representing C (x, y, d).

図9のうち、図9(a)は、基準画像における基準画素を示す概念図を示し、図9(b)は、図9(a)に示す基準画素に対応する比較画像における対応画素の候補を順次シフトしながら(ずらしながら)コスト値を算出する際の概念図である。ここで、対応画素とは、基準画像における基準画素に最も類似する比較画像における画素を示す。   9A is a conceptual diagram showing reference pixels in the reference image, and FIG. 9B is a corresponding pixel candidate in the comparison image corresponding to the reference pixel shown in FIG. 9A. It is a conceptual diagram at the time of calculating a cost value while shifting (shifting) sequentially. Here, the corresponding pixel indicates a pixel in the comparison image that is most similar to the reference pixel in the reference image.

図9(a)に示すように、距離測定部130のコスト算出部131は、基準画像Iaにおける基準画素p(x,y)、および、基準画素p(x,y)に対する比較画像Ibにおけるエピポーラ線EL上の対応画素の候補の画素である候補画素q(x+d,y)の各輝度値に基づいて、基準画素p(x,y)に対する対応画素の候補画素q(x+d,y)のコスト値C(p,d)を算出する。dは、基準画素pと候補画素qとのシフト量(ずれ量)であり、シフト量dは、画素単位でシフトされる。すなわち、図9では、候補画素q(x+d,y)を予め指定された範囲(例えば、0<d<25)において順次一画素分シフトしながら、候補画素q(x+d,y)と基準画素p(x,y)との非類似度であるコスト値C(p,d)がコスト算出部131によって算出される。   As shown in FIG. 9A, the cost calculation unit 131 of the distance measurement unit 130 includes the reference pixel p (x, y) in the reference image Ia and the epipolar in the comparison image Ib with respect to the reference pixel p (x, y). The cost of the candidate pixel q (x + d, y) of the corresponding pixel with respect to the reference pixel p (x, y) based on each luminance value of the candidate pixel q (x + d, y) that is a candidate pixel of the corresponding pixel on the line EL A value C (p, d) is calculated. d is a shift amount (shift amount) between the reference pixel p and the candidate pixel q, and the shift amount d is shifted in units of pixels. That is, in FIG. 9, the candidate pixel q (x + d, y) and the reference pixel p are sequentially shifted by one pixel within a predetermined range (for example, 0 <d <25). A cost value C (p, d) that is a dissimilarity with (x, y) is calculated by the cost calculation unit 131.

なお、上述のように、撮像装置10a、10bは、それぞれ平行等位に配置されるため、基準画像Iaおよび比較画像Ibも、それぞれ平行等位の関係にある。したがって、基準画像Iaにおける基準画素pに対応する比較画像Ibにおける対応画素は、図9で画像横方向の線として示されるエピポーラ線EL上に存在することになり、比較画像Ibにおける対応画素を求めるためには、比較画像Ibのエピポーラ線EL上の画素を探索すればよい。   As described above, since the imaging devices 10a and 10b are arranged in parallel equiposition, the reference image Ia and the comparison image Ib are also in parallel equivalence relations. Therefore, the corresponding pixel in the comparison image Ib corresponding to the reference pixel p in the reference image Ia exists on the epipolar line EL shown as the horizontal line in FIG. 9, and the corresponding pixel in the comparison image Ib is obtained. For this purpose, a pixel on the epipolar line EL of the comparison image Ib may be searched.

このようにして算出されたコスト値C(p,d)は、画素単位のシフト量dとの関係で、図10に示すグラフにより表される。図10の例では、コスト値Cは、シフト量d=5,12,19の場合が「0」となるため、最小値を求めることができない。このように、例えば、画像におけるテクスチャが弱い部分がある場合には、このようにコスト値Cの最小値を求めることは困難になる。   The cost value C (p, d) calculated in this way is represented by the graph shown in FIG. 10 in relation to the shift amount d in pixel units. In the example of FIG. 10, the cost value C is “0” when the shift amount d = 5, 12, and 19, and thus the minimum value cannot be obtained. Thus, for example, when there is a portion where the texture is weak in the image, it is difficult to obtain the minimum value of the cost value C in this way.

<合成コスト値の算出および距離の導出>
図11は、合成コストを導出するための概念図である。図12は、シフト量と合成コスト値との関係を示すグラフの一例を示す図である。図11および12を参照しながら、合成コスト値Ls(p,d)の算出方法について説明する。
<Calculation of synthesis cost value and derivation of distance>
FIG. 11 is a conceptual diagram for deriving the synthesis cost. FIG. 12 is a diagram illustrating an example of a graph indicating the relationship between the shift amount and the combined cost value. A method for calculating the combined cost value Ls (p, d) will be described with reference to FIGS.

本実施の形態の合成コスト値の算出方法は、コスト値C(p,d)の算出だけでなく、基準画素p(x,y)の周辺の画素を基準画素とした場合のコスト値を、基準画素p(x,y)におけるコスト値C(p,d)に集約させて、合成コスト値Ls(p,d)を算出するものである。距離測定部130のコスト合成部132は、合成コスト値Ls(p,d)を算出するためには、まず、経路コスト値Lr(p,d)を算出する。コスト合成部132は、経路コスト値Lr(p,d)を、下記の(式3)により算出する。   The calculation method of the synthesis cost value according to the present embodiment not only calculates the cost value C (p, d), but also calculates the cost value when pixels around the reference pixel p (x, y) are the reference pixels. The combined cost value Ls (p, d) is calculated by consolidating the cost value C (p, d) in the reference pixel p (x, y). In order to calculate the combined cost value Ls (p, d), the cost combining unit 132 of the distance measuring unit 130 first calculates the route cost value Lr (p, d). The cost synthesizing unit 132 calculates the route cost value Lr (p, d) by the following (Formula 3).

Lr(p,d)=C(p,d)+min(Lr(p−r,k)+P(d,k))
・・・(式3)
(P=0(d=kの場合)、
P=P1(|d−k|=1の場合)、
P=P2(>P1)(|d−k|>1の場合))
Lr (p, d) = C (p, d) + min (Lr (p−r, k) + P (d, k))
... (Formula 3)
(P = 0 (when d = k))
P = P1 (when | d−k | = 1),
P = P2 (> P1) (when | dk |> 1))

(式3)に示すように経路コスト値Lrは、再帰的に求められる。ここで、rは、集約方向の方向ベクトルを示し、x方向およびy方向の2成分を有する。min()は、最小値を求める関数である。Lr(p−r,k)は、基準画素pの座標からr方向に1画素シフトした座標の画素について、シフト量を変化させた場合(この場合のシフト量をkとしている)のそれぞれの経路コスト値Lrを示す。そして、経路コスト値Lr(p−r,k)のうち、経路コスト値Lr(p,d)のシフト量であるdと、シフト量kとの間の関係に基づいて、下記の(1)〜(3)のように値P(d,k)を求め、Lr(p−r,k)+P(d,k)を算出している。   As shown in (Formula 3), the route cost value Lr is obtained recursively. Here, r indicates a direction vector in the aggregation direction, and has two components in the x direction and the y direction. min () is a function for obtaining the minimum value. Lr (p−r, k) is the respective path when the shift amount is changed (the shift amount in this case is k) for the pixel having the coordinate shifted by one pixel in the r direction from the coordinate of the reference pixel p. The cost value Lr is shown. Based on the relationship between d, which is the amount of shift of the route cost value Lr (p, d) in the route cost value Lr (pr, k), and the shift amount k, the following (1) The value P (d, k) is obtained as in (3), and Lr (pr, k) + P (d, k) is calculated.

(1)d=kの場合、P=0とする。すなわち、Lr(p−r,k)+P(d,k)=Lr(p−r,k)となる。
(2)|d−k|=1の場合、P=P1とする。すなわち、Lr(p−r,k)+P(d,k)=Lr(p−r,k)+P1となる。
(3)|d−k|>1の場合、P=P2(>P1)とする。すなわち、Lr(p−r,k)+P(d,k)=Lr(p−r,k)+P2となる。
(1) When d = k, P = 0. That is, Lr (p−r, k) + P (d, k) = Lr (p−r, k).
(2) When | d−k | = 1, P = P1. That is, Lr (p−r, k) + P (d, k) = Lr (p−r, k) + P1.
(3) When | d−k |> 1, P = P2 (> P1). That is, Lr (p−r, k) + P (d, k) = Lr (p−r, k) + P2.

そして、min(Lr(p−r,k)+P(d,k))は、kを様々な値に変化させた場合の、上述の(1)〜(3)で算出したLr(p−r,k)+P(d,k)のうち最小の値を抽出した値となる。すなわち、比較画像Ibにおける基準画素pの座標の位置にある画素からr方向において隣接する画素(p−r)からシフト量dだけシフトした画素から離れた場合に、値P1、または値P1よりも大きい値P2を加算することにより、比較画像Ibにおける基準画素pの座標から離れた画素についての、シフト量dが不連続な経路コスト値Lrの影響を受け過ぎないようにしている。また、値P1および値P2は、予め実験により定められた固定パラメータであり、経路上で隣接する基準画素の視差値が連続になりやすいようなパラメータになっている。例えば、P1=48、P2=96である。このように、コスト合成部132は、比較画像Ibにおいてr方向の各画素における経路コスト値Lrを求めるために、最初は、基準画素p(x,y)の座標からr方向の一番端の画素から経路コスト値Lrを求め、r方向に沿って経路コスト値Lrを求める。   Then, min (Lr (p−r, k) + P (d, k)) is Lr (p−r) calculated in the above (1) to (3) when k is changed to various values. , K) + P (d, k) is a value obtained by extracting the minimum value. That is, the value P1 or the value P1 is exceeded when the pixel located at the coordinate position of the reference pixel p in the comparison image Ib is away from the pixel shifted by the shift amount d from the pixel (pr) adjacent in the r direction. By adding the large value P2, the shift amount d of the pixel away from the coordinate of the reference pixel p in the comparison image Ib is prevented from being influenced by the discontinuous path cost value Lr. Further, the value P1 and the value P2 are fixed parameters determined in advance by experiments, and are parameters such that the parallax values of the reference pixels adjacent on the path are likely to be continuous. For example, P1 = 48 and P2 = 96. As described above, in order to obtain the path cost value Lr for each pixel in the r direction in the comparison image Ib, the cost composition unit 132 first determines the extreme end in the r direction from the coordinates of the reference pixel p (x, y). The route cost value Lr is obtained from the pixel, and the route cost value Lr is obtained along the r direction.

そして、コスト合成部132は、図11に示すように、8方向(r、r45、r90、r135、r180、r225、r270およびr315)の経路コスト値LrであるLr、Lr45、Lr90、Lr135、Lr180、Lr225、Lr270およびLr315が求められ、最終的に下記の(式4)に基づいて、合成コスト値Ls(p,d)を求める。
以上のようにして、コスト合成部132により算出された合成コスト値Ls(p,d)は、画素単位のシフト量dとの関係で、図12に示すグラフによって表すことができる。
Then, as shown in FIG. 11, the cost composition unit 132 has Lr which is a route cost value Lr in eight directions (r 0 , r 45 , r 90 , r 135 , r 180 , r 225 , r 270 and r 315 ). 0 , Lr 45 , Lr 90 , Lr 135 , Lr 180 , Lr 225 , Lr 270 and Lr 315 are obtained, and finally a synthesis cost value Ls (p, d) is obtained based on (Equation 4) below. .
As described above, the synthesis cost value Ls (p, d) calculated by the cost synthesis unit 132 can be represented by the graph shown in FIG. 12 in relation to the shift amount d in pixel units.

そして、距離測定部130の距離導出部133は、コスト合成部132により算出された、基準画像Iaにおける基準画素についての比較画像Ibにおける画素の合成コスト値Lsの最小値に対応するシフト量dを視差値Δとして特定する。図12の例では、合成コスト値Lsは、シフト量d=3の場合が最小値となるため、視差値Δ=3として導出される。さらに、距離導出部133は、特定した視差値Δを用いて、上述の式(2)により距離Zを算出する。   Then, the distance deriving unit 133 of the distance measuring unit 130 calculates the shift amount d corresponding to the minimum value of the combined cost value Ls of the pixels in the comparison image Ib for the reference pixel in the reference image Ia calculated by the cost combining unit 132. It is specified as a parallax value Δ. In the example of FIG. 12, the combined cost value Ls is derived as a parallax value Δ = 3 because the minimum value is obtained when the shift amount d = 3. Further, the distance deriving unit 133 calculates the distance Z by the above-described equation (2) using the specified parallax value Δ.

なお、距離測定部130による距離の測定は、画像全体で実行するのではなく、特徴点抽出部140によって抽出された特徴点の座標に対応する画素に対して行うものとし、特徴点のみの距離を測定するものとしてもよい。   Note that the distance measurement by the distance measurement unit 130 is not performed on the entire image, but on the pixels corresponding to the coordinates of the feature points extracted by the feature point extraction unit 140, and only the distances of the feature points are measured. It is good also as what measures.

また、上述の説明においては、r方向の数を8個として説明しているが、これに限定されるものではない。例えば、8方向をさらに2つに分割して16方向、または、3つに分割して24方向等にしてもよい。あるいは、8方向のうちのいずれかの経路コスト値Lrを求め、合成コスト値Lsを算出するものとしてもよい。   In the above description, the number in the r direction is eight, but the present invention is not limited to this. For example, the eight directions may be further divided into two to be 16 directions, or may be divided into three to be 24 directions. Or it is good also as what calculates | requires the path | route cost value Lr in any of eight directions, and calculates the synthetic | combination cost value Ls.

また、コスト値Cは、非類似度を示す値としたが、これに限定されるものではなく、類似度の評価値で表されるものとしてもよい。この場合、合成コスト値Lsが、最小値ではなく、最大値となるシフト量dが視差値Δとして導出される。また、非類似度および類似度の両者を、「一致度」と称するものとしてもよい。   Further, although the cost value C is a value indicating the dissimilarity, the cost value C is not limited thereto, and may be represented by an evaluation value of the similarity. In this case, the shift amount d at which the combined cost value Ls is not the minimum value but the maximum value is derived as the parallax value Δ. Further, both dissimilarity and similarity may be referred to as “matching degree”.

また、上述のように、距離測定部130は、SGM法を利用して距離の測定を実行するものとしたが、これに限定する趣旨ではなく、従来のブロックマッチング法による距離の測定を実行するものとしてもよい。   In addition, as described above, the distance measurement unit 130 performs distance measurement using the SGM method. However, the distance measurement unit 130 is not limited to this, and performs distance measurement by a conventional block matching method. It may be a thing.

(追跡画像処理の詳細)
図13〜21を参照しながら、本実施の形態の画像処理装置1による追跡画像処理の詳細について説明する。
(Details of tracking image processing)
Details of the tracking image processing by the image processing apparatus 1 according to the present embodiment will be described with reference to FIGS.

<特徴点の追跡の成否について>
図13は、特徴点の追跡失敗および成功の状態の一例を示す図である。図13を参照しながら、特徴点抽出部140により抽出された特徴点の追跡の成否の状態の例を説明する。
<About success or failure of feature point tracking>
FIG. 13 is a diagram illustrating an example of a feature point tracking failure and success state. With reference to FIG. 13, an example of the success or failure of the tracking of feature points extracted by the feature point extraction unit 140 will be described.

図13(a)に示すように、n枚目のフレームであるフレーム200には、特徴点抽出部140により抽出された特徴点300が写っている。そして、フレーム200の次のフレーム((n+1)枚目のフレーム)であるフレーム201にも特徴点300が写っている。この場合、フレーム200からフレーム201にかけて、特徴点300が写っているので、特徴点追跡部160は、原則として、特徴点300を追跡することが可能である。   As shown in FIG. 13A, the feature point 300 extracted by the feature point extraction unit 140 is shown in the frame 200 which is the nth frame. The feature point 300 is also reflected in the frame 201 which is the frame after the frame 200 (the (n + 1) th frame). In this case, since the feature point 300 is shown from the frame 200 to the frame 201, the feature point tracking unit 160 can track the feature point 300 in principle.

一方、図13(b)に示すように、フレーム200には、特徴点抽出部140により抽出された特徴点300が写っているが、次のフレームであるフレーム201aでは、ワイパー900が特徴点300を遮ることによって、特徴点300が写っていない。この場合、フレーム200からフレーム201aにかけて、特徴点300が消失するので、特徴点追跡部160は、特徴点300の追跡が一時的にできないことになる。   On the other hand, as shown in FIG. 13B, the feature point 300 extracted by the feature point extraction unit 140 is shown in the frame 200, but in the frame 201 a that is the next frame, the wiper 900 has the feature point 300. The feature point 300 is not captured by blocking. In this case, since the feature point 300 disappears from the frame 200 to the frame 201a, the feature point tracking unit 160 cannot temporarily track the feature point 300.

<ブロックマッチング動作および追跡点の消失判定動作>
図14は、ブロックマッチング動作を説明する図である。図15は、ブロックマッチング動作におけるサーチ範囲における処理を説明する図である。図16は、オクルージョンの判定動作を説明する図である。図14〜16を参照しながら、特徴点追跡部160のマッチング部161によるブロックマッチング動作、および追跡判定部162による追跡点の消失判定動作の詳細について説明する。
<Block matching operation and tracking point disappearance determination operation>
FIG. 14 is a diagram for explaining the block matching operation. FIG. 15 is a diagram for explaining processing in the search range in the block matching operation. FIG. 16 is a diagram for explaining an occlusion determination operation. Details of the block matching operation by the matching unit 161 of the feature point tracking unit 160 and the tracking point disappearance determination operation by the tracking determination unit 162 will be described with reference to FIGS.

図14(a)に示すように、特徴点抽出部140は、n枚目のフレームであるフレーム210において、抽出した特徴点(例えば、特徴点310)の座標を中心とする所定の大きさ(N画素×N画素)の範囲のテンプレート(図14(b)に示すテンプレート610)(第1テンプレート画像)を特定し、記憶部(例えば、RAM34)にテンプレート610の画像を一時記憶させる。   As shown in FIG. 14A, the feature point extraction unit 140 has a predetermined size centered on the coordinates of the extracted feature point (for example, the feature point 310) in the frame 210, which is the nth frame. A template (template 610 shown in FIG. 14B) (first template image) in the range of N pixels × N pixels is specified, and the image of the template 610 is temporarily stored in the storage unit (for example, the RAM 34).

次に、図14(c)に示すように、マッチング部161は、フレーム210の次のフレーム((n+1)枚目のフレーム)であるフレーム211において、フレーム210の特徴点310の座標に対応する点である対応点410を中心に所定のサーチ範囲810(W画素×H画素)(第1探索範囲)を形成する。そして、マッチング部161は、図15(a)に示すように、サーチ範囲810において、記憶部に一時記憶されたテンプレート610と同じ大きさであるサーチ領域710をラスタースキャンさせ、テンプレート610とサーチ領域710の画像とのブロックマッチング動作を実行する。具体的には、マッチング部161は、テンプレート610とサーチ領域710の画像と一致度を算出しながら、サーチ範囲810において、サーチ領域710をラスタースキャンさせる。マッチング部161が算出する一致度としては、例えば、SADまたはSSD等を用いることができる。   Next, as illustrated in FIG. 14C, the matching unit 161 corresponds to the coordinates of the feature point 310 of the frame 210 in the frame 211 that is the next frame (the (n + 1) th frame) of the frame 210. A predetermined search range 810 (W pixels × H pixels) (first search range) is formed around the corresponding point 410 that is a point. Then, as shown in FIG. 15A, the matching unit 161 raster-scans the search area 710 having the same size as the template 610 temporarily stored in the storage unit in the search range 810, and the template 610 and the search area A block matching operation with the image 710 is performed. Specifically, the matching unit 161 raster scans the search area 710 in the search range 810 while calculating the degree of coincidence between the template 610 and the image of the search area 710. As the degree of coincidence calculated by the matching unit 161, for example, SAD or SSD can be used.

そして、追跡判定部162は、マッチング部161により算出された一致度に対して閾値判定を行う。例えば、一致度がSADのように非類似度を示す値であれば、追跡判定部162は、一致度が所定の閾値以下である場合、その一致度が算出されたサーチ領域710の画像と、テンプレート610とが一致するものと判定し、追跡成功と判定する。一方、追跡判定部162は、サーチ範囲810全体において、一致度が所定の閾値よりも大きい場合、サーチ領域710の画像と、テンプレート610とは一致せず、特徴点310の追跡ができなかった、すなわち、フレーム211で特徴点310は消失したものと判定する。   Then, the tracking determination unit 162 performs threshold determination on the degree of coincidence calculated by the matching unit 161. For example, if the degree of coincidence is a value indicating dissimilarity such as SAD, the tracking determination unit 162, when the degree of coincidence is a predetermined threshold value or less, the image of the search area 710 for which the degree of coincidence is calculated, It is determined that the template 610 matches and it is determined that tracking is successful. On the other hand, when the matching degree is larger than a predetermined threshold in the entire search range 810, the tracking determination unit 162 does not match the image of the search region 710 and the template 610, and the feature point 310 cannot be tracked. That is, it is determined that the feature point 310 has disappeared in the frame 211.

追跡判定部162は、追跡に成功した場合、図15(b)に示すテンプレート610と一致したサーチ領域710であるサーチ領域711の画像の中央の点を、特徴点310を追跡した結果である追跡点311として特定する。そして、マッチング部161および追跡判定部162は、(n+1)枚目のフレームであるフレーム211において特定された追跡点311(特徴点310)について、以降のフレームでさらに追跡を繰り返す。また、追跡判定部162は、追跡点311の座標を中心とするサーチ領域711の画像を新たなテンプレートとして記憶部(例えば、RAM34)に一時記憶させる。そして、追跡判定部162は、対応点410から追跡点311へ向かうベクトルであるオプティカルフロー510の情報を記憶部(例えば、HDD(Hard Disk Drive)等の外部記憶装置)に記憶させる。   When the tracking determination unit 162 succeeds in tracking, tracking is a result of tracking the feature point 310 at the center point of the image of the search region 711 that is the search region 710 that matches the template 610 shown in FIG. The point 311 is specified. Then, the matching unit 161 and the tracking determination unit 162 further repeat tracking in the subsequent frames with respect to the tracking point 311 (feature point 310) specified in the frame 211 that is the (n + 1) th frame. Further, the tracking determination unit 162 temporarily stores an image of the search area 711 centered on the coordinates of the tracking point 311 as a new template in a storage unit (for example, the RAM 34). Then, the tracking determination unit 162 stores information of the optical flow 510 that is a vector from the corresponding point 410 to the tracking point 311 in a storage unit (for example, an external storage device such as a HDD (Hard Disk Drive)).

また、追跡判定部162が、特徴点を追跡できない、すなわち、特徴点を消失したものと判定する原因の例として、物体によって特徴点が遮られることによるオクルージョンの発生がある。例えば、図16(a)に示すように、特徴点抽出部140によって、フレーム220で被写体である物体902の特徴点として特徴点320、321が抽出されているものとする。そして、図16(b)に示すように、フレーム220の次のフレームであるフレーム221において、車両100(図1参照)のフロントガラス901上を動くワイパー900によって特徴点320が遮られることによるオクルージョンが発生したとする。この場合、追跡判定部162は、マッチング部161によるブロックマッチング動作の結果、特徴点320のフレーム221において対応する点である対応点420を中心とするサーチ範囲820(第1探索範囲)で、特徴点320のテンプレートと一致するサーチ領域の画像を検索することができず、特徴点320は消失したものと判定する。また、例えば、追跡判定部162は、フレーム221において、フレーム220の特徴点320の座標に対応する点である対応点420を中心とするサーチ範囲820に含まれる被写体の距離情報を距離測定部130から受け取り、その距離情報に基づいて所定距離よりも近い距離の物体(例えば、ワイパー900)がサーチ範囲820に含まれていると判定した場合、オクルージョンが発生したものと判定し、フレーム221で特徴点320は消失したものと判定するものとしてもよい。   In addition, as an example of the cause that the tracking determination unit 162 cannot track the feature point, that is, determines that the feature point has disappeared, occlusion occurs due to the feature point being blocked by the object. For example, as illustrated in FIG. 16A, it is assumed that feature points 320 and 321 are extracted as feature points of the object 902 that is the subject in the frame 220 by the feature point extraction unit 140. Then, as shown in FIG. 16B, in the frame 221 that is the next frame of the frame 220, the occlusion caused by the feature point 320 being blocked by the wiper 900 moving on the windshield 901 of the vehicle 100 (see FIG. 1). Suppose that occurs. In this case, as a result of the block matching operation by the matching unit 161, the tracking determination unit 162 has a feature in a search range 820 (first search range) centered on a corresponding point 420 that is a corresponding point in the frame 221 of the feature point 320. An image in the search area that matches the template of the point 320 cannot be searched, and it is determined that the feature point 320 has disappeared. Further, for example, the tracking determination unit 162 uses the distance measurement unit 130 to calculate distance information of the subject included in the search range 820 centered on the corresponding point 420 that is a point corresponding to the coordinates of the feature point 320 of the frame 220 in the frame 221. If the search range 820 determines that an object (for example, the wiper 900) having a distance shorter than a predetermined distance is included in the search range 820 based on the distance information, it is determined that occlusion has occurred, and the frame 221 is characterized. The point 320 may be determined as having disappeared.

なお、マッチング部161によるマッチング動作において、サーチ領域710は車両100の状態に応じて大きさが変化するようにしてもよい。例えば、車両100の走行速度、車両100のステアリングの角度、または外部環境の明るさ等の情報に基づいて、サーチ領域710の大きさが調整されるものとしてもよい。   Note that, in the matching operation by the matching unit 161, the size of the search area 710 may change according to the state of the vehicle 100. For example, the size of the search area 710 may be adjusted based on information such as the traveling speed of the vehicle 100, the steering angle of the vehicle 100, or the brightness of the external environment.

<グルーピングの動作>
図17および18は、第1の実施の形態の画像処理装置において予測点を推定するためのグルーピングの動作を説明する図である。図17および18を参照しながら、画像処理装置1の特徴点抽出部140のグルーピングの動作の詳細について説明する。
<Grouping operation>
17 and 18 are diagrams for explaining the grouping operation for estimating the prediction point in the image processing apparatus according to the first embodiment. Details of the grouping operation of the feature point extraction unit 140 of the image processing apparatus 1 will be described with reference to FIGS. 17 and 18.

グルーピング部150は、上述のように、特徴点追跡部160による特徴点の追跡動作において、特徴点が消失した場合に、消失した特徴点の予測点を求めるために用いる代替点を特定するために、同じような軌跡で動くと想定される複数の特徴点をグルーピングしておく必要がある。グルーピング部150は、グルーピングの方法としては、例えば、特徴点抽出部140によって抽出された特徴点のうち、画像処理装置1からの距離が同一の特徴点同士をグルーピングする。この場合、グルーピング部150は、距離測定部130から受け取った距離情報に基づいて、画像処理装置1から特徴点までの距離が同一であるか否かを判定する。ここで、距離が同一とは、完全に同一している場合のみを想定するものではなく、同一とみなし得る程度に近似した距離である場合も含むものとする。この場合、例えば、グルーピング部150は、2つ特徴点について、画像処理装置1から特の距離が同一であるか否かは、各特徴点までの距離の差分が所定の閾値以下であるか否かにより判定するものとすればよい。   As described above, the grouping unit 150 specifies an alternative point used for obtaining a predicted point of a lost feature point when the feature point disappears in the feature point tracking operation by the feature point tracking unit 160. It is necessary to group a plurality of feature points that are assumed to move along a similar locus. As a grouping method, the grouping unit 150 groups, for example, feature points having the same distance from the image processing apparatus 1 among the feature points extracted by the feature point extraction unit 140. In this case, the grouping unit 150 determines whether or not the distance from the image processing apparatus 1 to the feature point is the same based on the distance information received from the distance measurement unit 130. Here, the same distance does not assume the case where the distances are completely the same, but includes the case where the distances are approximate to the extent that they can be regarded as the same. In this case, for example, the grouping unit 150 determines whether the special distance from the image processing apparatus 1 is the same for the two feature points, whether the difference in distance to each feature point is equal to or less than a predetermined threshold value. It may be determined based on whether or not.

例えば、図17(a)において、左カメラで撮像された画像がフレーム225であり、右カメラで撮像された画像がフレーム226であるものとする。特徴点抽出部140は、図17(a)および17(b)に示すように、フレーム225に写っている物体902において、特徴点320、321を抽出したものとする。また、距離測定部130は、フレーム225とフレーム226とを重ね合わせた画像227に示す視差値Δ1に基づいて、特徴点320、321の距離を測定し、その距離情報をグルーピング部150に送る。そして、グルーピング部150は、距離測定部130から受け取った特徴点320、321それぞれの距離情報から、双方が同一の距離であるものと判定した場合、同じグループにグルーピングする。グルーピング部150は、特徴点抽出部140により抽出された特徴点についてグルーピングした情報(グループ情報)を、特徴点追跡部160に送る。   For example, in FIG. 17A, an image captured by the left camera is a frame 225, and an image captured by the right camera is a frame 226. As shown in FIGS. 17A and 17B, the feature point extraction unit 140 extracts feature points 320 and 321 in the object 902 shown in the frame 225. The distance measuring unit 130 measures the distance between the feature points 320 and 321 based on the parallax value Δ1 shown in the image 227 obtained by superimposing the frame 225 and the frame 226 and sends the distance information to the grouping unit 150. Then, when the grouping unit 150 determines that both are the same distance from the distance information of the feature points 320 and 321 received from the distance measurement unit 130, the grouping unit 150 groups them into the same group. The grouping unit 150 sends information (group information) obtained by grouping the feature points extracted by the feature point extraction unit 140 to the feature point tracking unit 160.

また、図18に示す例では、グルーピング部150によるグルーピングの方法を、例えば、以下のように行う。図18(a)に示すように、画像処理装置1の左右のカメラはそれぞれ、物体910、911をそれぞれ撮像し、図18(b)に示すフレーム230が左のカメラ(撮像装置10b)により撮像されたフレームであるものとする。まず、特徴点抽出部140は、図18(b)に示すように、フレーム230に写っている物体910の特徴点330、331、および物体911の特徴点332、333を抽出したものとする。また、距離測定部130により測定される物体910までの距離Z1(すなわち、特徴点330、331までの距離)と、物体911までの距離Z2(すなわち、特徴点332、333までの距離)とは、同一であるものとする。ここで、画像処理装置1を搭載した車両100が、物体910と、物体911との間を通過する場合、撮像装置10bにより撮像される映像では、特徴点330、331は、映像の中央から左側へ向かう方向に、特徴点332、333は、映像の中央から右側へ向かう方向に向かうことになる。   In the example illustrated in FIG. 18, the grouping method by the grouping unit 150 is performed as follows, for example. As shown in FIG. 18A, the left and right cameras of the image processing apparatus 1 respectively capture the objects 910 and 911, and the frame 230 illustrated in FIG. 18B is captured by the left camera (imaging apparatus 10b). Frame. First, it is assumed that the feature point extraction unit 140 extracts the feature points 330 and 331 of the object 910 and the feature points 332 and 333 of the object 911 shown in the frame 230 as shown in FIG. Further, the distance Z1 to the object 910 measured by the distance measuring unit 130 (that is, the distance to the feature points 330 and 331) and the distance Z2 to the object 911 (that is, the distance to the feature points 332 and 333) are Are the same. Here, when the vehicle 100 on which the image processing apparatus 1 is mounted passes between the object 910 and the object 911, the feature points 330 and 331 are on the left side from the center of the image in the image captured by the imaging device 10b. In the direction toward, the feature points 332 and 333 are directed in the direction from the center of the video toward the right side.

この場合、図17の例と同様に、画像処理装置1からの距離が同一の特徴点同士をグルーピングすると、グルーピング部150によって特徴点330〜333はすべて画像処理装置1からの距離が同一なので、同一のグループにグルーピングされることになる。しかし、上述のように、特徴点330、331と、特徴点332、333とは、異なる軌跡で動くので、特徴点追跡部160による特徴点の追跡動作において、消失した特徴点の予測点を求めるために用いる代替点として、軌跡の異なる特徴点が特定される可能性があり、座標予測部163による予測点の推定動作、および、復帰部164による追跡点の復帰動作が失敗する可能性がある。そこで、例えば、グルーピング部150は、フレーム230の中央から左側の部分と、右側の部分とに区分けしてグルーピングを行うものとしてもよい。具体的には、図18(b)において、グルーピング部150は、フレーム230の中心から左側にある特徴点330と特徴点331とを同一のグループにグルーピングし、右側にある特徴点332と特徴点333とを、特徴点330、331のグループとは異なるグループにグルーピングする。   In this case, as in the example of FIG. 17, when feature points having the same distance from the image processing device 1 are grouped, the feature points 330 to 333 are all the same distance from the image processing device 1 by the grouping unit 150. It will be grouped into the same group. However, as described above, since the feature points 330 and 331 and the feature points 332 and 333 move along different trajectories, the feature point tracking operation performed by the feature point tracking unit 160 obtains a predicted point of the lost feature point. Therefore, there is a possibility that a feature point having a different locus is specified as an alternative point used for the purpose, and the estimation operation of the prediction point by the coordinate prediction unit 163 and the return operation of the tracking point by the return unit 164 may fail. . Therefore, for example, the grouping unit 150 may perform grouping by dividing the frame 230 into a left part and a right part from the center. Specifically, in FIG. 18B, the grouping unit 150 groups the feature points 330 and feature points 331 on the left side from the center of the frame 230 into the same group, and the feature points 332 and feature points on the right side. 333 are grouped into a group different from the group of feature points 330 and 331.

なお、グルーピング部150によるグルーピングの方法は、図17および18で上述した方法に限定されるものではなく、その他の方法によって、同じような軌跡で動くと想定される複数の特徴点をグルーピングするものとしてもよい。図18の例では、フレームの中心から左側の部分と、右側の部分とに区分けするものとしたが、例えば、フレームの中心から左上、左下、右上および右下に区分けし、各区分けした領域において特徴点をグルーピングするものとしてもよい。また、例えば、車両100が前方方向に進むのではなく、カーブまたは交差点等で曲がる場合、フレーム内の特徴点はすべて右または左に移動することが想定されるので、上述のようにフレーム内で区分けはせず、フレーム全体で距離が同一の特徴点をグルーピングするものとしてもよい。   Note that the grouping method by the grouping unit 150 is not limited to the method described above with reference to FIGS. 17 and 18, and grouping a plurality of feature points that are assumed to move along a similar locus by other methods. It is good. In the example of FIG. 18, the frame is divided into a left part and a right part from the center of the frame. For example, the frame is divided into the upper left, lower left, upper right, and lower right from the center of the frame. The feature points may be grouped. Further, for example, when the vehicle 100 does not travel forward but bends at a curve or an intersection, all feature points in the frame are assumed to move to the right or left. It is good also as what groups the feature point with the same distance in the whole flame | frame, without dividing.

<予測点の推定動作>
図19は、第1の実施の形態の画像処理装置においてオクルージョンが発生した場合の予測点の推定動作を説明する図である。図19を参照しながら、特徴点追跡部160の座標予測部163による予測点の推定動作について説明する。
<Prediction point estimation operation>
FIG. 19 is a diagram for explaining a prediction point estimation operation when occlusion occurs in the image processing apparatus according to the first embodiment. With reference to FIG. 19, a prediction point estimation operation by the coordinate prediction unit 163 of the feature point tracking unit 160 will be described.

図19(a)に示すように、まず、n枚目のフレームであるフレーム240において、特徴点抽出部140により物体940における特徴点340、341がそれぞれ抽出されているものとする。また、特徴点抽出部140は、特徴点340と特徴点341とを同じグループにグルーピングしているものとする。また、フレーム240には、左から右に回転移動してくるワイパー900が写っている。   As shown in FIG. 19A, first, it is assumed that feature points 340 and 341 in the object 940 are extracted by the feature point extraction unit 140 in the frame 240 that is the nth frame. Further, it is assumed that the feature point extraction unit 140 groups the feature points 340 and the feature points 341 into the same group. In addition, the wiper 900 that rotates and moves from left to right is shown in the frame 240.

そして、図19(b)に示すように、フレーム240の次のフレーム((n+1)枚目のフレーム)であるフレーム241において、右から左に回転移動してきたワイパー900により追跡対象である特徴点340が遮られることによるオクルージョンが発生したものとする。この場合、上述のように、追跡判定部162は、特徴点340を追跡することができず、特徴点340は消失したものと判定する。このように、追跡判定部162により特徴点340が消失したと判定された場合、座標予測部163は、消失した特徴点340の動きを予測するため、特徴点340と同一のグループかつ特徴点340に最も近い特徴点(図19(b)の例では特徴点341)を代替点として特定する。   Then, as shown in FIG. 19B, in the frame 241 that is the next frame ((n + 1) th frame) of the frame 240, the feature point that is tracked by the wiper 900 that has been rotated from right to left. Assume that occlusion occurs due to 340 being blocked. In this case, as described above, the tracking determination unit 162 cannot track the feature point 340 and determines that the feature point 340 has disappeared. As described above, when the tracking determination unit 162 determines that the feature point 340 has disappeared, the coordinate prediction unit 163 predicts the movement of the feature point 340 that has disappeared. The closest feature point (feature point 341 in the example of FIG. 19B) is specified as an alternative point.

そして、座標予測部163は、フレーム241において、フレーム240の特徴点341の座標に対応する点である対応点441から、特徴点341の座標へ向かうベクトルであるオプティカルフロー541を、消失した特徴点340のオプティカルフロー(オプティカルフロー540)として利用する。具体的には、座標予測部163は、消失した特徴点340が、フレーム241において、フレーム240の特徴点340の座標に対応する点である対応点440から、オプティカルフロー540で指し示される位置に移動していると予測する。すなわち、座標予測部163は、フレーム241において、対応点440からオプティカルフロー540で示される点の座標を、消失した特徴点340が存在すると推定される予測点450の座標として求める。   The coordinate predicting unit 163 then erases the optical flow 541 that is a vector from the corresponding point 441 corresponding to the coordinate of the feature point 341 of the frame 240 to the coordinate of the feature point 341 in the frame 241. It is used as an optical flow 340 (optical flow 540). Specifically, the coordinate predicting unit 163 places the lost feature point 340 in the position indicated by the optical flow 540 from the corresponding point 440 that corresponds to the coordinate of the feature point 340 of the frame 240 in the frame 241. Predict that it is moving. That is, the coordinate predicting unit 163 obtains the coordinates of the point indicated by the optical flow 540 from the corresponding point 440 in the frame 241 as the coordinates of the predicted point 450 estimated that the missing feature point 340 exists.

さらに、図19(c)に示すように、座標予測部163は、フレーム241の次のフレーム((n+2)枚目のフレーム)であるフレーム242において、フレーム241の特徴点341の座標に対応する点である対応点442から、特徴点341の座標へ向かうベクトルであるオプティカルフロー551を、消失した特徴点340の次のオプティカルフロー(オプティカルフロー550)として利用する。具体的には、座標予測部163は、消失した特徴点340が、フレーム242において、フレーム241の予測点450(特徴点340の予測点)から、オプティカルフロー550で指し示される位置に新たに移動していると予測する。すなわち、座標予測部163は、フレーム242において、対応点450からオプティカルフロー550で示される点の座標を、消失した特徴点340が存在すると新たに推定される予測点451の座標として求める。   Further, as illustrated in FIG. 19C, the coordinate predicting unit 163 corresponds to the coordinates of the feature point 341 of the frame 241 in the frame 242 that is the next frame ((n + 2) th frame) of the frame 241. The optical flow 551 that is a vector from the corresponding point 442 that is a point to the coordinates of the feature point 341 is used as the next optical flow (optical flow 550) of the lost feature point 340. Specifically, the coordinate predicting unit 163 newly moves the lost feature point 340 from the prediction point 450 of the frame 241 (prediction point of the feature point 340) to the position indicated by the optical flow 550 in the frame 242. Predict that you are. That is, the coordinate predicting unit 163 obtains the coordinates of the point indicated by the optical flow 550 from the corresponding point 450 as the coordinates of the predicted point 451 newly estimated as the missing feature point 340 exists in the frame 242.

<追跡点の復帰動作>
図20は、第1の実施の形態の画像処理装置における追跡点の復帰動作を説明する図である。図20を参照しながら、特徴点追跡部160の復帰部164による追跡点の復帰動作について説明する。
<Tracking point return operation>
FIG. 20 is a diagram for explaining the tracking point return operation in the image processing apparatus according to the first embodiment. The tracking point return operation by the return unit 164 of the feature point tracking unit 160 will be described with reference to FIG.

図20(a)は、図19(a)に示す状態と同様であり、フレーム240において、特徴点抽出部140により物体940における特徴点340、341がそれぞれ抽出される状態を示す。上述のように、特徴点抽出部140は、さらに、フレーム240において、抽出した特徴点340の座標を中心とする所定の大きさのテンプレート640を特定し、記憶部にテンプレート640の画像を一時記憶させる。なお、テンプレートの特定および記憶の動作は、特徴点341に対しても同様に行われる。   FIG. 20A is the same as the state shown in FIG. 19A, and shows a state in which feature points 340 and 341 in the object 940 are extracted by the feature point extraction unit 140 in the frame 240, respectively. As described above, the feature point extraction unit 140 further specifies a template 640 having a predetermined size around the coordinates of the extracted feature point 340 in the frame 240, and temporarily stores the image of the template 640 in the storage unit. Let The template specifying and storing operations are performed in the same manner for the feature points 341.

図20(b)は、図19(b)に示す状態と同様であり、フレーム241において、右から左に回転移動してきたワイパー900により追跡対象である特徴点340が遮られることによるオクルージョンが発生した状態を示す。この場合、追跡判定部162は、特徴点340を追跡することができず、特徴点340は消失したものと判定する。   FIG. 20B is the same as the state shown in FIG. 19B, and in the frame 241, occlusion occurs when the feature point 340 to be tracked is blocked by the wiper 900 that has rotated from the right to the left. Shows the state. In this case, the tracking determination unit 162 cannot track the feature point 340 and determines that the feature point 340 has disappeared.

追跡判定部162によって追跡対象である特徴点340が消失したと判定された後、図20(c)に示すように、復帰部164は、フレーム242(特徴点340が消失したフレーム241の次のフレーム)において、座標予測部163によって推定された予測点451を中心にテンプレート640と同じ大きさのサーチ領域740を形成する。そして、復帰部164は、記憶部に記憶されたテンプレート640と、サーチ領域740の画像とを比較し、これらの一致度を算出する。復帰部164が算出する一致度としては、例えば、マッチング部161と同様にSADまたはSSD等を用いることができる。   After it is determined by the tracking determination unit 162 that the feature point 340 to be tracked has disappeared, as shown in FIG. 20C, the return unit 164 performs the frame 242 (next to the frame 241 in which the feature point 340 has disappeared). In the frame), a search area 740 having the same size as the template 640 is formed around the prediction point 451 estimated by the coordinate prediction unit 163. Then, the restoration unit 164 compares the template 640 stored in the storage unit with the image in the search area 740 and calculates the degree of coincidence thereof. As the degree of coincidence calculated by the return unit 164, for example, SAD or SSD can be used in the same manner as the matching unit 161.

そして、復帰部164は、算出した一致度に対して閾値判定を行う。例えば、一致度がSADのように非類似度を示す値であれば、復帰部164は、一致度が所定の閾値以下である場合、テンプレート640と、サーチ領域740の画像とが一致するものと判定し、座標予測部163により推定された予測点451を、特徴点340に対する追跡点として復帰させる。一方、復帰部164は、一致度が所定の閾値よりも大きい場合、テンプレート640と、サーチ領域740の画像とは一致しないものと判定する。この場合、座標予測部163による予測点の推定動作、および復帰部164に追跡点の復帰動作を継続する。ただし、例えば、復帰部164は、復帰動作が所定回数行われても成功しなった場合、消失した特徴点340の追跡に失敗したものと判定する。   Then, the return unit 164 performs threshold determination on the calculated degree of coincidence. For example, if the degree of coincidence is a value indicating dissimilarity such as SAD, the restoration unit 164 determines that the template 640 matches the image in the search area 740 if the degree of coincidence is equal to or less than a predetermined threshold. The prediction point 451 determined by the coordinate prediction unit 163 is returned as a tracking point for the feature point 340. On the other hand, the restoration unit 164 determines that the template 640 does not match the image in the search area 740 when the degree of matching is greater than a predetermined threshold. In this case, the prediction point estimation operation by the coordinate prediction unit 163 and the tracking point return operation by the return unit 164 are continued. However, for example, the return unit 164 determines that the tracking of the lost feature point 340 has failed if the return operation is successful even after being performed a predetermined number of times.

<特徴点の追跡動作の流れ>
図21は、第1の実施の形態の画像処理装置の画像処理の動作フローの一例を示す図である。図21を参照しながら、画像処理装置1の追跡画像処理のうち、特徴点追跡部160による特徴点の追跡動作の流れについて総括的に説明する。なお、予め、グルーピング部150は、特徴点抽出部140により抽出された特徴点が、上述の方法によりグルーピングされているものとする。
<Flow of feature point tracking>
FIG. 21 is a diagram illustrating an example of an operation flow of image processing of the image processing apparatus according to the first embodiment. With reference to FIG. 21, the flow of the feature point tracking operation by the feature point tracking unit 160 in the tracking image processing of the image processing apparatus 1 will be generally described. Note that the grouping unit 150 assumes that the feature points extracted by the feature point extraction unit 140 are grouped in advance by the method described above.

<<ステップS11>>
特徴点抽出部140は、n枚目のフレームにおいて、抽出した特徴点の座標を中心とする所定の大きさの範囲のテンプレートを特定し、記憶部(例えば、RAM34)にテンプレートの画像を一時記憶させる。マッチング部161は、次のフレーム((n+1)枚目のフレーム)において、n枚目のフレームの追跡対象となる特徴点の座標に対応する点である対応点を中心に所定のサーチ範囲を形成する。そして、マッチング部161は、サーチ範囲において、記憶部に一時記憶されたテンプレートと同じ大きさであるサーチ領域をラスタースキャンさせ、テンプレートとサーチ領域の画像とのブロックマッチング動作を実行する。具体的には、マッチング部161は、テンプレートとサーチ領域の画像と一致度を算出しながら、サーチ範囲において、サーチ領域をラスタースキャンさせる。そして、ステップS12へ移行する。
<< Step S11 >>
The feature point extraction unit 140 specifies a template having a predetermined size centered on the coordinates of the extracted feature points in the nth frame, and temporarily stores the template image in the storage unit (for example, the RAM 34). Let The matching unit 161 forms a predetermined search range around the corresponding point that is the point corresponding to the coordinates of the feature point to be tracked in the nth frame in the next frame ((n + 1) th frame). To do. The matching unit 161 raster-scans a search area having the same size as the template temporarily stored in the storage unit in the search range, and executes a block matching operation between the template and the image in the search area. Specifically, the matching unit 161 raster-scans the search area in the search range while calculating the degree of coincidence between the template and the image of the search area. Then, the process proceeds to step S12.

<<ステップS12>>
追跡判定部162は、マッチング部161により算出された一致度に対して閾値判定を行う。例えば、一致度がSADのように非類似度を示す値であれば、追跡判定部162は、一致度が所定の閾値以下である場合、その一致度が算出されたサーチ領域の画像と、テンプレートとが一致するものと判定し、追跡成功と判定する(ステップS12:Yes)。追跡判定部162は、追跡に成功した場合、テンプレートと一致したサーチ領域の画像の中央の点を、特徴点を追跡した結果である追跡点として特定する。そして、マッチング部161および追跡判定部162は、特定された追跡点について、以降のフレームでさらに追跡を繰り返す。
<< Step S12 >>
The tracking determination unit 162 performs threshold determination for the degree of coincidence calculated by the matching unit 161. For example, if the degree of coincidence is a value indicating dissimilarity such as SAD, the tracking determination unit 162, when the degree of coincidence is equal to or less than a predetermined threshold, the image of the search region in which the degree of coincidence is calculated, the template Are matched, and it is determined that the tracking is successful (step S12: Yes). If the tracking determination unit 162 succeeds in tracking, the tracking determination unit 162 identifies the center point of the image in the search area that matches the template as a tracking point that is a result of tracking the feature point. Then, the matching unit 161 and the tracking determination unit 162 further repeat tracking in the subsequent frames for the identified tracking points.

一方、追跡判定部162は、サーチ範囲全体において、一致度が所定の閾値よりも大きい場合、サーチ領域の画像と、テンプレートとは一致せず、特徴点の追跡ができなかった、すなわち、特徴点は消失したものと判定し(ステップS12:No)、ステップS13へ移行する。   On the other hand, when the matching degree is larger than a predetermined threshold in the entire search range, the tracking determination unit 162 does not match the search region image and the template, and the feature point cannot be tracked. Is determined to have disappeared (step S12: No), and the process proceeds to step S13.

<<ステップS13>>
座標予測部163は、消失した特徴点の動きを予測するため、消失した特徴点と同一のグループかつ消失した特徴点に最も近い特徴点を代替点として特定する。そして、座標予測部163は、(n+1)枚目のフレームにおいて、n枚目のフレームの代替点の座標に対応する点である対応点から、代替点の座標へ向かうベクトルであるオプティカルフローを、消失した特徴点のオプティカルフローとして利用する。具体的には、座標予測部163は、消失した特徴点が、(n+1)枚目のフレームにおいて、n枚目のフレームでの消失した特徴点の座標に対応する点である対応点から、上述のオプティカルフローで指し示される位置に移動していると予測する。すなわち、座標予測部163は、(n+1)枚目のフレームにおいて、消失した特徴点の対応点からオプティカルフローで示される点の座標を、消失した特徴点が存在すると推定される予測点の座標として求める。そして、ステップS14へ移行する。
<< Step S13 >>
In order to predict the movement of the lost feature point, the coordinate predicting unit 163 specifies a feature point closest to the lost feature point in the same group as the lost feature point as an alternative point. Then, the coordinate predicting unit 163 calculates an optical flow that is a vector from the corresponding point that is a point corresponding to the coordinates of the substitute point of the nth frame to the coordinates of the substitute point in the (n + 1) th frame, It is used as an optical flow for missing feature points. Specifically, the coordinate predicting unit 163 determines whether the lost feature point is a point corresponding to the coordinates of the lost feature point in the nth frame in the (n + 1) th frame. Is predicted to have moved to the position indicated by the optical flow. That is, in the (n + 1) th frame, the coordinate predicting unit 163 uses the coordinates of the point indicated by the optical flow from the corresponding point of the lost feature point as the coordinate of the predicted point where the lost feature point is estimated to exist. Ask. Then, the process proceeds to step S14.

<<ステップS14>>
座標予測部163によって予測点の座標の推定が成功した場合(ステップS14:Yes)、ステップS15へ移行し、成功しなかった場合(ステップS14:No)、ステップS19へ移行する。ここで、予測点の座標の推定が成功しない場合の例としては、座標予測部163によって、消失した特徴点が属するグループに他の特徴点が存在しない等の要因で代替点が特定されなかった場合等が挙げられる。
<< Step S14 >>
When the estimation of the coordinates of the predicted point is successful by the coordinate predicting unit 163 (step S14: Yes), the process proceeds to step S15, and when it is not successful (step S14: No), the process proceeds to step S19. Here, as an example of the case where the estimation of the coordinates of the predicted point is not successful, the coordinate predicting unit 163 did not specify an alternative point due to a reason that no other feature point exists in the group to which the lost feature point belongs. Cases.

<<ステップS15>>
復帰部164は、(n+2)枚目のフレームにおいて、座標予測部163によって推定された予測点を中心にテンプレートと同じ大きさのサーチ領域を形成する。次に、復帰部164は、記憶部に記憶されたテンプレートと、サーチ領域の画像とを比較し、これらの一致度を算出する。そして、復帰部164は、算出した一致度に対して閾値判定を行う。そして、ステップS16へ移行する。
<< Step S15 >>
The return unit 164 forms a search area having the same size as the template around the prediction point estimated by the coordinate prediction unit 163 in the (n + 2) th frame. Next, the restoration unit 164 compares the template stored in the storage unit with the image in the search area, and calculates the degree of coincidence thereof. Then, the return unit 164 performs threshold determination on the calculated degree of coincidence. Then, the process proceeds to step S16.

<<ステップS16>>
例えば、一致度がSADのように非類似度を示す値であれば、復帰部164は、一致度が所定の閾値以下である場合、テンプレートと、サーチ領域の画像とが一致するものと判定し、追跡点の復帰は成功であると判定する(ステップS16:Yes)。この場合、復帰部164は、座標予測部163により推定された予測点を、特徴点に対する追跡点として復帰させる。
<< Step S16 >>
For example, if the degree of coincidence is a value indicating dissimilarity such as SAD, the restoration unit 164 determines that the template and the image in the search area match if the degree of coincidence is equal to or less than a predetermined threshold. The tracking point return is determined to be successful (step S16: Yes). In this case, the return unit 164 returns the prediction point estimated by the coordinate prediction unit 163 as a tracking point for the feature point.

一方、復帰部164は、一致度が所定の閾値よりも大きい場合、テンプレートと、サーチ領域の画像とは一致しないものと判定し、追跡点の復帰は失敗であると判定する(ステップS16:No)。そして、ステップS17へ移行する。   On the other hand, when the matching degree is greater than the predetermined threshold, the restoration unit 164 determines that the template does not match the image in the search area, and determines that the tracking point restoration has failed (step S16: No). ). Then, the process proceeds to step S17.

<<ステップS17>>
復帰部164は、追跡点の復帰動作が所定回数に達したか否かを判定する。所定回数に達した場合(ステップS17:Yes)、ステップS18へ移行し、達していない場合(ステップS17:No)、ステップS13へ戻り、座標予測部163による予測点の推定動作から動作が繰り返される。なお、復帰部164が追跡点の復帰動作が所定回数に達してない場合に、ステップS13へ戻ることに限定されるものではなく、例えば、復帰部164が追跡点の復帰は失敗であると判定してから所定時間のタイムラグを空けてから、ステップS13へ戻るものとしてもよい。
<< Step S17 >>
The return unit 164 determines whether or not the tracking point return operation has reached a predetermined number of times. If the predetermined number of times has been reached (step S17: Yes), the process proceeds to step S18, and if not reached (step S17: No), the process returns to step S13, and the operation is repeated from the predicted point estimation operation by the coordinate prediction unit 163. . The return unit 164 is not limited to returning to step S13 when the tracking point return operation has not reached the predetermined number of times. For example, the return unit 164 determines that the tracking point return has failed. Then, after a lapse of a predetermined time, the process may return to step S13.

<<ステップS18>>
警告部170は、特徴点追跡部160により特徴点の追跡失敗を示す追跡情報を受け取ると警告を発する。
<< Step S18 >>
The warning unit 170 issues a warning when the feature point tracking unit 160 receives the tracking information indicating the tracking failure of the feature point.

<<ステップS19>>
警告部170は、座標予測部163により予測点の座標の推定が失敗した場合、警告を発する。
<< Step S19 >>
The warning unit 170 issues a warning when the coordinate prediction unit 163 fails to estimate the coordinates of the predicted point.

以上のステップS11〜S19の流れによって、特徴点追跡部160による特徴点の追跡動作が実行される。   The feature point tracking operation by the feature point tracking unit 160 is executed by the flow of steps S11 to S19 described above.

以上のように、マッチング部161および追跡判定部162は、抽出された特徴点の追跡を行い、追跡判定部162によって特徴点が消失したと判定した場合、座標予測部163は、消失した特徴点と同一のグループの特徴点を代替点として特定する。そして、座標予測部163は、消失した特徴点の対応点から、代替点のオプティカルフローで示さる点を予測点とし、復帰部164は、消失する前の特徴点のテンプレートが、予測点を含むサーチ領域の画像と一致する場合、この予測点を、消失した特徴点に対する追跡点として復帰させるものとしている。これによって、消失した特徴点を再度復帰させることができ、また、追跡を継続するために過去の映像(フレーム)を使う必要はなく、特徴点について再度追跡し直す必要もないので、追跡画像処理の処理負荷を低減することができる。また、特徴点抽出部140、グルーピング部150および特徴点追跡部160の少なくともいずれかをハードウェア回路によって実現する場合、上述のように、再度復帰させることができ、追跡を継続するために過去の映像(フレーム)を使う必要はなく、特徴点について再度追跡し直す必要もないので、回路規模の増大を抑制することもできる。   As described above, when the matching unit 161 and the tracking determination unit 162 track the extracted feature points and the tracking determination unit 162 determines that the feature points have disappeared, the coordinate prediction unit 163 The feature points of the same group as are specified as alternative points. Then, the coordinate predicting unit 163 uses a point indicated by the optical flow of the alternative point from the corresponding point of the lost feature point as a predicted point, and the returning unit 164 includes the template of the feature point before the disappearance includes the predicted point. If the image matches the image in the search area, the predicted point is returned as a tracking point for the lost feature point. As a result, the lost feature points can be restored again, and it is not necessary to use past images (frames) to continue tracking, and there is no need to re-track the feature points. The processing load can be reduced. Further, when at least one of the feature point extraction unit 140, the grouping unit 150, and the feature point tracking unit 160 is realized by a hardware circuit, as described above, the feature point extraction unit 140, the grouping unit 150, and the feature point tracking unit 160 can be restored again. It is not necessary to use a video (frame), and there is no need to re-track feature points, so that an increase in circuit scale can be suppressed.

また、追跡判定部162によって特徴点が消失したと判定した場合、座標予測部163は、消失した特徴点と同一のグループかつ消失した特徴点に最も近い特徴点を代替点として特定することが望ましい。これによって、消失した特徴点は、特定された代替点と近似した動きをすると想定されるので、座標予測部163による予測点の推定の精度が向上する可能性が高くなり、復帰部164による追跡点の復帰を容易にすることができる。   In addition, when the tracking determination unit 162 determines that the feature point has disappeared, the coordinate prediction unit 163 desirably specifies the feature point closest to the disappearing feature point in the same group as the disappeared feature point as an alternative point. . As a result, since the lost feature point is assumed to move similar to the specified substitute point, there is a high possibility that the accuracy of the prediction of the prediction point by the coordinate prediction unit 163 is improved, and the tracking by the restoration unit 164 is performed. The point can be easily restored.

また、復帰部164による復帰が失敗しても、再度、座標予測部163による予測点の推定動作、および復帰部164による追跡点の復帰動作が行われるものとしている。このように、予測点の推定、および追跡点の復帰の動作が繰り返されることにより、追跡点の復帰が成功する確率を向上させることができる。   In addition, even if the return by the return unit 164 fails, the estimation operation of the prediction point by the coordinate prediction unit 163 and the return operation of the tracking point by the return unit 164 are performed again. In this way, by repeating the estimation of the prediction point and the operation of returning the tracking point, the probability that the recovery of the tracking point is successful can be improved.

(変形例)
図22は、第1の実施の形態の変形例の画像処理装置における追跡点の復帰動作を説明する図である。図22を参照しながら、図20で示した復帰部164の追跡点の復帰動作と相違する点を中心に説明する。
(Modification)
FIG. 22 is a diagram for explaining the tracking point return operation in the image processing apparatus according to the modification of the first embodiment. With reference to FIG. 22, the description will focus on differences from the tracking point return operation of the return unit 164 shown in FIG.

図22(a)および(b)は、それぞれ上述の図20(a)および(b)と同様の状態を示しており、フレーム241において、右から左に回転移動してきたワイパー900により追跡対象である特徴点340が遮られることによるオクルージョンが発生した状態を示す。この場合、追跡判定部162は、特徴点340を追跡することができず、特徴点340は消失したものと判定する。   FIGS. 22A and 22B show the same state as FIGS. 20A and 20B described above, respectively. In the frame 241, the wiper 900 that has been rotated from the right to the left is tracked. This shows a state in which occlusion occurs due to a certain feature point 340 being blocked. In this case, the tracking determination unit 162 cannot track the feature point 340 and determines that the feature point 340 has disappeared.

追跡判定部162によって追跡対象である特徴点340が消失したと判定された後、図22(c)に示すように、復帰部164は、フレーム242(特徴点340が消失したフレーム241の次のフレーム)において、予測点451を中心とするサーチ範囲840(第2探索範囲)を形成する。そして、復帰部164は、サーチ範囲840において、テンプレート640(第2テンプレート画像)と同じ大きさであるサーチ領域740をラスタースキャンさせ、テンプレート640とサーチ領域740の画像とのブロックマッチングを実行する。具体的には、復帰部164は、テンプレート640とサーチ領域740の画像と一致度を算出しながら、サーチ範囲840において、サーチ領域740をラスタースキャンさせる。   After the tracking determination unit 162 determines that the feature point 340 to be tracked has disappeared, as shown in FIG. 22C, the restoration unit 164 performs the frame 242 (next to the frame 241 in which the feature point 340 has disappeared). Frame), a search range 840 (second search range) centered on the prediction point 451 is formed. Then, the restoration unit 164 performs a raster scan of the search area 740 having the same size as the template 640 (second template image) in the search range 840, and executes block matching between the template 640 and the image of the search area 740. Specifically, the restoration unit 164 performs a raster scan of the search area 740 in the search range 840 while calculating the degree of coincidence between the template 640 and the image of the search area 740.

そして、復帰部164は、算出した一致度に対して閾値判定を行う。例えば、一致度がSADのように非類似度を示す値であれば、復帰部164は、一致度が所定の閾値以下である場合、テンプレート640と、サーチ領域740の画像とが一致するものと判定し、座標予測部163により推定された予測点451を、特徴点340に対する追跡点として復帰させる。一方、復帰部164は、サーチ範囲840全体において、一致度が所定の閾値よりも大きい場合、テンプレート640と、サーチ領域740の画像とは一致しないものと判定する。この場合、座標予測部163による予測点の推定動作、および復帰部164に追跡点の復帰動作を継続する。ただし、例えば、復帰部164は、復帰動作が所定回数行われても成功しなった場合、消失した特徴点340の追跡に失敗したものと判定する。   Then, the return unit 164 performs threshold determination on the calculated degree of coincidence. For example, if the degree of coincidence is a value indicating dissimilarity such as SAD, the restoration unit 164 determines that the template 640 matches the image in the search area 740 if the degree of coincidence is equal to or less than a predetermined threshold. The prediction point 451 determined by the coordinate prediction unit 163 is returned as a tracking point for the feature point 340. On the other hand, the restoration unit 164 determines that the template 640 does not match the image of the search area 740 when the matching degree is larger than a predetermined threshold in the entire search range 840. In this case, the prediction point estimation operation by the coordinate prediction unit 163 and the tracking point return operation by the return unit 164 are continued. However, for example, the return unit 164 determines that the tracking of the lost feature point 340 has failed if the return operation is successful even after being performed a predetermined number of times.

以上のように、復帰部164は、テンプレート640を、予測点451を中心とするサーチ領域740の画像のみと比較するのではなく、予測点451を含むサーチ範囲840を形成し、サーチ領域740をラスタースキャンさせ、テンプレート640とサーチ領域740の画像とのブロックマッチングを実行するものとしている。これによって、サーチ範囲840において、テンプレート640と一致する画像を探索するので、テンプレート640と一致する画像が見つかる可能性が高くなり、追跡点の復帰が成功する確率を向上させることができる。   As described above, the restoration unit 164 does not compare the template 640 with only the image of the search region 740 centered on the prediction point 451, but forms the search range 840 including the prediction point 451, Raster scanning is performed, and block matching between the template 640 and the image of the search area 740 is executed. As a result, an image that matches the template 640 is searched in the search range 840, so that there is a high possibility that an image that matches the template 640 will be found, and the probability of successful return of the tracking point can be improved.

[第2の実施の形態]
本実施の形態に係る画像処理装置1aについて、第1の実施の形態に係る画像処理装置1と相違する点を中心に説明する。第1の実施の形態では、消失した特徴点の代替点として、グルーピング部150によりグルーピングされた他の特徴点を特定したが、本実施の形態では、特徴点追跡部160による特徴点の追跡動作等を行うカメラの映像データとは、異なるカメラの映像データにおける特徴点を用いる動作について説明する。
[Second Embodiment]
The image processing apparatus 1a according to the present embodiment will be described focusing on differences from the image processing apparatus 1 according to the first embodiment. In the first embodiment, another feature point grouped by the grouping unit 150 is specified as an alternative point of the lost feature point. In this embodiment, the feature point tracking operation by the feature point tracking unit 160 is performed. The operation using the feature points in the video data of a camera different from the video data of the camera performing the above will be described.

(画像処理装置のブロック構成)
図23は、第2の実施の形態の画像処理装置のブロック構成の一例を示す図である。図23を参照しながら、画像処理装置1aのブロック構成について、第1の実施の形態に係る画像処理装置1のブロック構成と相違する点を中心に説明する。
(Block configuration of image processing apparatus)
FIG. 23 is a diagram illustrating an example of a block configuration of the image processing apparatus according to the second embodiment. With reference to FIG. 23, the block configuration of the image processing device 1 a will be described focusing on differences from the block configuration of the image processing device 1 according to the first embodiment.

図23に示すように、画像処理装置1aは、画像取得部110と、補正部120と、距離測定部130と、特徴点抽出部140と、特定部150a(特定手段)と、特徴点追跡部160aと、警告部170と、を有する。すなわち、画像処理装置1aは、第1の実施の形態に係る画像処理装置1aのグルーピング部150の代わりに、特定部150aを有している。なお、画像取得部110、補正部120、距離測定部130、特徴点抽出部140および警告部170の動作は、第1の実施の形態と同様である。また、第1の実施の形態と同様に、特徴点抽出部140による特徴点の抽出動作、および特徴点追跡部160aによる特徴点の追跡動作は、左のカメラ(撮像装置10b)により撮像された映像データのフレームに対して実行されるものとして説明する。ただし、右のカメラ(撮像装置10a)により撮像された映像データのフレームに対して実行することも可能であることは言うまでもない。   As shown in FIG. 23, the image processing apparatus 1a includes an image acquisition unit 110, a correction unit 120, a distance measurement unit 130, a feature point extraction unit 140, a specification unit 150a (specification means), and a feature point tracking unit. 160a and a warning unit 170. That is, the image processing device 1a includes a specifying unit 150a instead of the grouping unit 150 of the image processing device 1a according to the first embodiment. The operations of the image acquisition unit 110, the correction unit 120, the distance measurement unit 130, the feature point extraction unit 140, and the warning unit 170 are the same as those in the first embodiment. Similarly to the first embodiment, the feature point extraction operation by the feature point extraction unit 140 and the feature point tracking operation by the feature point tracking unit 160a are imaged by the left camera (imaging device 10b). A description will be given assuming that the process is performed on a frame of video data. However, it goes without saying that it can also be executed on a frame of video data imaged by the right camera (imaging device 10a).

特定部150aは、特徴点追跡部160aによる特徴点の追跡動作において、特徴点が消失した場合に、消失した特徴点の予測点を求めるために用いる代替点を、右のカメラ(撮像装置10a)により撮像された映像データのフレームで特定する機能部である。特定部150aによる動作については、後述する。特定部150aは、図3に示すFPGA31によって実現される。   When the feature point disappears in the feature point tracking operation by the feature point tracking unit 160a, the specifying unit 150a uses the right camera (imaging device 10a) as an alternative point used to obtain a predicted point of the lost feature point. It is a functional part specified by the frame of the video data imaged by. The operation by the specifying unit 150a will be described later. The specifying unit 150a is realized by the FPGA 31 illustrated in FIG.

特徴点追跡部160aは、距離測定部130により測定された距離情報、特徴点抽出部140により抽出された特徴点の座標、および特定部150aによる特定された代替点についての特定情報に基づいて、特徴点の追跡動作を実行する機能部である。特徴点追跡部160aの構成および動作の詳細については、後述する。特徴点追跡部160aは、図3に示すFPGA31によって実現される。   The feature point tracking unit 160a is based on the distance information measured by the distance measuring unit 130, the coordinates of the feature point extracted by the feature point extracting unit 140, and the specific information about the alternative point specified by the specifying unit 150a. It is a functional unit that executes a feature point tracking operation. Details of the configuration and operation of the feature point tracking unit 160a will be described later. The feature point tracking unit 160a is realized by the FPGA 31 shown in FIG.

図24は、第2の実施の形態の画像処理装置の特徴点追跡部のブロック構成の一例を示す図である。図24を参照しながら、画像処理装置1aの特徴点追跡部160aのブロック構成について、第1の実施の形態に係る画像処理装置1の特徴点追跡部160のブロック構成と相違する点を中心に説明する。   FIG. 24 is a diagram illustrating an example of a block configuration of a feature point tracking unit of the image processing apparatus according to the second embodiment. Referring to FIG. 24, the block configuration of the feature point tracking unit 160a of the image processing device 1a is mainly different from the block configuration of the feature point tracking unit 160 of the image processing device 1 according to the first embodiment. explain.

図24に示すように、特徴点追跡部160aは、マッチング部161(マッチング手段)と、追跡判定部162(判定手段)と、座標予測部163a(予測手段)と、復帰部164(復帰手段)と、を有する。すなわち、特徴点追跡部160aは、第1の実施の形態の特徴点追跡部160の座標予測部163の代わりに、座標予測部163aを有している。なお、マッチング部161、追跡判定部162および復帰部164の動作は、第1の実施の形態と同様である。   As shown in FIG. 24, the feature point tracking unit 160a includes a matching unit 161 (matching unit), a tracking determination unit 162 (determination unit), a coordinate prediction unit 163a (prediction unit), and a return unit 164 (return unit). And having. That is, the feature point tracking unit 160a has a coordinate prediction unit 163a instead of the coordinate prediction unit 163 of the feature point tracking unit 160 of the first embodiment. The operations of the matching unit 161, the tracking determination unit 162, and the return unit 164 are the same as those in the first embodiment.

座標予測部163aは、追跡判定部162により追跡点の追跡ができないと判定された場合、すなわち、追跡点が消失したと判定された場合、特定部150aによって特定された特徴点を代替点として特定し、代替点を利用して、消失した追跡点の動きを予測する機能部である。具体的には、座標予測部163aは、特定した代替点の動きのベクトル(オプティカルフロー)を利用して、消失した追跡点存在する点を予測する。座標予測部163aの動作の詳細については、後述する。   When the tracking determination unit 162 determines that the tracking point cannot be tracked, that is, when it is determined that the tracking point has disappeared, the coordinate prediction unit 163a specifies the feature point specified by the specifying unit 150a as an alternative point The function unit predicts the movement of the lost tracking point by using the alternative point. Specifically, the coordinate predicting unit 163a predicts a point where the disappeared tracking point exists by using a motion vector (optical flow) of the specified alternative point. Details of the operation of the coordinate predicting unit 163a will be described later.

なお、図23および24に示した各機能部は、機能を概念的に示したものであって、このような構成に限定されるものではない。例えば、図23および24で独立した機能部として図示した複数の機能部を、1つの機能部として構成してもよい。一方、図23および24の1つの機能部が有する機能を複数に分割し、複数の機能部として構成するものとしてもよい。   Each functional unit shown in FIGS. 23 and 24 conceptually shows a function, and is not limited to such a configuration. For example, a plurality of functional units illustrated as independent functional units in FIGS. 23 and 24 may be configured as one functional unit. On the other hand, it is also possible to divide the functions of one functional unit shown in FIGS. 23 and 24 into a plurality of functional units and configure them as a plurality of functional units.

(代替点の特定動作および予測点の推定動作)
図25は、第2の実施の形態の画像処理装置においてオクルージョンが発生した場合の予測点の推定動作を説明する図である。図25を参照しながら、画像処理装置1aの特定部150aの代替点の特定動作、および、特徴点追跡部160aの座標予測部163aの予測点の推定動作について説明する。
(Identification of alternative points and estimation of prediction points)
FIG. 25 is a diagram for explaining a prediction point estimation operation when occlusion occurs in the image processing apparatus according to the second embodiment. With reference to FIG. 25, description will be made on the operation of specifying an alternative point of the specifying unit 150a of the image processing apparatus 1a and the operation of estimating the predicted point of the coordinate predicting unit 163a of the feature point tracking unit 160a.

図25(a)に示すように、まず、左のカメラ(撮像装置10b)により撮像されたn枚目のフレームであるフレーム260において、特徴点抽出部140により物体960における特徴点360が抽出されているものとする。また、図25(b)に示すように、同様に、右のカメラ(撮像装置10a)により撮像されたn枚目のフレームであるフレーム270において、特徴点抽出部140により物体960における特徴点370が抽出されているものとする。図25から明らかなように、フレーム260の特徴点360は、フレーム270の特徴点370に対応する点である。また、フレーム260、270には、左から右に回転移動してくるワイパー900が写っている。   As shown in FIG. 25A, first, a feature point 360 in the object 960 is extracted by the feature point extraction unit 140 in a frame 260 that is the nth frame imaged by the left camera (imaging device 10b). It shall be. Similarly, as shown in FIG. 25B, in the frame 270 that is the n-th frame imaged by the right camera (imaging device 10a), the feature point 370 in the object 960 is obtained by the feature point extraction unit 140. Is extracted. As is clear from FIG. 25, the feature point 360 of the frame 260 is a point corresponding to the feature point 370 of the frame 270. The frames 260 and 270 show the wiper 900 that rotates and moves from left to right.

特定部150aは、上述のように、特徴点追跡部160aによる特徴点の追跡動作において、特徴点が消失した場合に、消失した特徴点の予測点を求めるために用いる代替点として、同じような軌跡で動くと想定される特徴点を特定しておく必要がある。具体的には、特定部150aは、消失した特徴点の予測点を求めるために用いる代替点として、右のカメラ(撮像装置10a)により撮像されたフレームでの特徴点を特定する。この場合、特定部150aは、距離測定部130から受け取った距離情報(特徴点360についての視差の情報)に基づいて、フレーム260上の追跡対象となる特徴点360に対応する、フレーム270上の特徴点370を特定し、特徴点360が消失した場合の予測点を求めるために用いる代替点として特徴点370を特定する。   As described above, when the feature point disappears in the feature point tracking operation by the feature point tracking unit 160a, the specifying unit 150a is similar as an alternative point used to obtain a predicted point of the lost feature point. It is necessary to identify feature points that are supposed to move along the trajectory. Specifically, the specifying unit 150a specifies a feature point in a frame imaged by the right camera (imaging device 10a) as an alternative point used for obtaining a predicted point of a lost feature point. In this case, the specifying unit 150a on the frame 270 corresponding to the feature point 360 to be tracked on the frame 260 based on the distance information received from the distance measuring unit 130 (disparity information about the feature point 360). The feature point 370 is specified, and the feature point 370 is specified as an alternative point used for obtaining a predicted point when the feature point 360 disappears.

そして、図25(a)に示すように、フレーム260の次のフレーム((n+1)枚目のフレーム)であるフレーム261において、右から左に回転移動してきたワイパー900により追跡対象である特徴点360が遮られることによるオクルージョンが発生したものとする。この場合、上述のように、追跡判定部162は、特徴点360を追跡することができず、特徴点360は消失したものと判定する。このように、追跡判定部162により特徴点360が消失したと判定された場合、座標予測部163aは、消失した特徴点360の動きを予測するため、特定部150aによって、右のカメラで撮像されたフレーム270の次のフレーム((n+1)枚目のフレーム)であるフレーム271において特徴点360に対応する点として特定された特徴点370を、代替点として特定する。   Then, as shown in FIG. 25A, in the frame 261 that is the next frame (the (n + 1) th frame) of the frame 260, the feature point that is the tracking target by the wiper 900 that has been rotated from right to left. It is assumed that occlusion occurs due to 360 being blocked. In this case, as described above, the tracking determination unit 162 cannot track the feature point 360 and determines that the feature point 360 has disappeared. As described above, when it is determined by the tracking determination unit 162 that the feature point 360 has disappeared, the coordinate prediction unit 163a is imaged by the specifying unit 150a with the right camera in order to predict the motion of the lost feature point 360. The feature point 370 specified as a point corresponding to the feature point 360 in the frame 271 that is the next frame (the (n + 1) th frame) after the frame 270 is specified as an alternative point.

そして、座標予測部163aは、フレーム271において、フレーム270の特徴点370の座標に対応する点である対応点470から、特徴点370の座標へ向かうベクトルであるオプティカルフロー570を、消失した特徴点360のオプティカルフロー(オプティカルフロー560)として利用する。具体的には、座標予測部163aは、消失した特徴点360が、フレーム261において、フレーム260の特徴点360の座標に対応する点である対応点460から、オプティカルフロー560で指し示される位置に移動していると予測する。すなわち、座標予測部163aは、フレーム261において、対応点460からオプティカルフロー560で示される点の座標を、消失した特徴点360が存在すると推定される予測点480の座標として求める。   The coordinate predicting unit 163a then deletes the optical flow 570 that is a vector from the corresponding point 470 corresponding to the coordinate of the feature point 370 of the frame 270 to the coordinate of the feature point 370 in the frame 271. 360 is used as an optical flow (optical flow 560). Specifically, the coordinate predicting unit 163a sets the lost feature point 360 at a position indicated by the optical flow 560 from the corresponding point 460 corresponding to the coordinate of the feature point 360 of the frame 260 in the frame 261. Predict that it is moving. That is, the coordinate predicting unit 163a obtains the coordinates of the point indicated by the optical flow 560 from the corresponding point 460 in the frame 261 as the coordinates of the predicted point 480 where it is estimated that the lost feature point 360 exists.

以上のように、座標予測部163aは、消失した特徴点の対応点から、右のカメラで撮像されたフレームで特定された代替点のオプティカルフローで示さる点を予測点とするものとしている。これによって、消失した特徴点を再度復帰させることができ、また、追跡を継続するために過去の映像(フレーム)を使う必要はなく、特徴点について再度追跡し直す必要もないので、追跡画像処理の処理負荷を低減することができる。   As described above, the coordinate predicting unit 163a sets the point indicated by the optical flow of the alternative point specified by the frame captured by the right camera from the corresponding point of the lost feature point as the predicted point. As a result, the lost feature points can be restored again, and it is not necessary to use past images (frames) to continue tracking, and there is no need to re-track the feature points. The processing load can be reduced.

また、座標予測部163aは、図25に示すように、消失した特徴点360に対応する特徴点370を代替点として特定している。これによって、消失した特徴点は、特定された代替点とほぼ同じ動きをすると想定されるので、座標予測部163aによる予測点の推定の精度が向上する可能性が高くなり、復帰部164による追跡点の復帰をさらに容易にすることができる。   In addition, as shown in FIG. 25, the coordinate predicting unit 163a specifies a feature point 370 corresponding to the lost feature point 360 as an alternative point. As a result, since the lost feature point is assumed to move substantially the same as the specified substitute point, the accuracy of the prediction of the prediction point by the coordinate prediction unit 163a is likely to be improved, and the tracking by the restoration unit 164 is performed. Point return can be made easier.

なお、第2の実施の形態に係る画像処理装置1aに対して、第1の実施の形態の変形例に係る復帰部164の復帰動作も適用することは、当然可能である。   Note that it is naturally possible to apply the return operation of the return unit 164 according to the modification of the first embodiment to the image processing device 1a according to the second embodiment.

[第3の実施の形態]
本実施の形態に係る画像処理装置について、第1の実施の形態に係る画像処理装置1と相違する点を中心に説明する。第1の実施の形態では、座標予測部163により推定された予測点が、消失した特徴点と一致するか否かを判定して復帰させるものとしているが、本実施の形態では、予測点に最も近い特徴点が、消失した特徴点と一致するか否かを判定して復帰させる動作について説明する。
[Third Embodiment]
The image processing apparatus according to the present embodiment will be described focusing on differences from the image processing apparatus 1 according to the first embodiment. In the first embodiment, it is assumed that the prediction point estimated by the coordinate prediction unit 163 is matched with the lost feature point and returned, but in this embodiment, the prediction point is used as the prediction point. An operation of determining and returning whether the closest feature point matches the lost feature point will be described.

(追跡点の復帰動作)
図26は、第3の実施の形態の変形例の画像処理装置における追跡点の復帰動作を説明する図である。図26を参照しながら、本実施の形態における特徴点追跡部160の復帰部164による追跡点の復帰動作について説明する。
(Tracking point return operation)
FIG. 26 is a diagram for explaining the tracking point return operation in the image processing apparatus according to the modification of the third embodiment. With reference to FIG. 26, the tracking point return operation by the return unit 164 of the feature point tracking unit 160 in the present embodiment will be described.

図26(a)は、第1の実施の形態の図20(a)と同様に、フレーム240において、特徴点抽出部140により物体940における特徴点340、341がそれぞれ抽出される状態を示す。上述のように、特徴点抽出部140は、さらに、フレーム240において、抽出した特徴点340の座標を中心とする所定の大きさのテンプレート640を特定し、記憶部にテンプレート640の画像を一時記憶させる。なお、テンプレートの特定および記憶の動作は、特徴点341に対しても同様に行われる。   FIG. 26A shows a state in which feature points 340 and 341 in the object 940 are respectively extracted by the feature point extraction unit 140 in the frame 240, as in FIG. 20A of the first embodiment. As described above, the feature point extraction unit 140 further specifies a template 640 having a predetermined size around the coordinates of the extracted feature point 340 in the frame 240, and temporarily stores the image of the template 640 in the storage unit. Let The template specifying and storing operations are performed in the same manner for the feature points 341.

図26(b)は、第1の実施の形態の図20(b)に示す状態と同様であり、フレーム241において、右から左に回転移動してきたワイパー900により追跡対象である特徴点340が遮られることによるオクルージョンが発生した状態を示す。この場合、追跡判定部162は、特徴点340を追跡することができず、特徴点340は消失したものと判定する。   FIG. 26B is the same as the state shown in FIG. 20B of the first embodiment. In the frame 241, the feature point 340 to be tracked by the wiper 900 rotated and moved from right to left is displayed. It shows the state where occlusion has occurred due to being blocked. In this case, the tracking determination unit 162 cannot track the feature point 340 and determines that the feature point 340 has disappeared.

追跡判定部162によって追跡対象である特徴点340が消失したと判定された後、図26(c)に示すように、復帰部164は、フレーム242a(特徴点340が消失したフレーム241の次のフレーム)において、座標予測部163によって推定された予測点451ではなく、特徴点抽出部140により改めて抽出された特徴点のうち予測点451に最も近い特徴点(図26(c)では、元の特徴点340)を中心にテンプレート640と同じ大きさのサーチ領域740aを形成する。そして、復帰部164は、記憶部に記憶されたテンプレート640と、サーチ領域740aの画像とを比較し、これらの一致度を算出する。   After the tracking determination unit 162 determines that the feature point 340 to be tracked has disappeared, as shown in FIG. 26C, the restoration unit 164 performs a frame 242a (next to the frame 241 in which the feature point 340 has disappeared). In the frame), not the predicted point 451 estimated by the coordinate predicting unit 163 but the feature point closest to the predicted point 451 among the feature points newly extracted by the feature point extracting unit 140 (in FIG. A search area 740a having the same size as the template 640 is formed around the feature point 340). Then, the restoration unit 164 compares the template 640 stored in the storage unit with the image in the search area 740a, and calculates the degree of coincidence thereof.

そして、復帰部164は、算出した一致度に対して閾値判定を行う。例えば、一致度がSADのように非類似度を示す値であれば、復帰部164は、一致度が所定の閾値以下である場合、テンプレート640と、サーチ領域740aの画像とが一致するものと判定し、特徴点抽出部140により改めて抽出された特徴点のうち予測点451に最も近い特徴点を、消失した特徴点340に対する追跡点として復帰させる。一方、復帰部164は、一致度が所定の閾値よりも大きい場合、テンプレート640と、サーチ領域740aの画像とは一致しないものと判定する。この場合、座標予測部163による予測点の推定動作、および復帰部164に追跡点の復帰動作を継続する。ただし、例えば、復帰部164は、復帰動作が所定回数行われても成功しなった場合、消失した特徴点340の追跡に失敗したものと判定する。   Then, the return unit 164 performs threshold determination on the calculated degree of coincidence. For example, if the degree of coincidence is a value indicating dissimilarity such as SAD, the restoration unit 164 matches the template 640 and the image in the search area 740a when the degree of coincidence is a predetermined threshold value or less. The feature point closest to the prediction point 451 among the feature points newly extracted by the feature point extraction unit 140 is returned as a tracking point for the lost feature point 340. On the other hand, the restoration unit 164 determines that the template 640 does not match the image of the search area 740a when the degree of matching is greater than a predetermined threshold. In this case, the prediction point estimation operation by the coordinate prediction unit 163 and the tracking point return operation by the return unit 164 are continued. However, for example, the return unit 164 determines that the tracking of the lost feature point 340 has failed if the return operation is successful even after being performed a predetermined number of times.

以上のように、本実施の形態の復帰部164は、テンプレート640を、予測点451を中心とするサーチ領域ではなく、特徴点抽出部140により改めて抽出された特徴点のうち予測点451に最も近い特徴点を中心とするサーチ領域と比較するものとしている。これによって、消失した特徴点の真の位置からずれている可能性がある予測点ではなく、消失した元の特徴点で復帰させることができる確率が高くなり、追跡点の復帰の精度を向上させることができる。   As described above, the return unit 164 according to the present embodiment sets the template 640 to the predicted point 451 among the feature points newly extracted by the feature point extracting unit 140 instead of the search region centered on the predicted point 451. Comparison is made with a search area centered on a nearby feature point. This increases the probability that it can be restored with the original feature point that has disappeared, rather than the predicted point that may have shifted from the true position of the missing feature point, improving the accuracy of tracking point restoration. be able to.

なお、第3の実施の形態に係る画像処理装置に対して、第1の実施の形態の変形例に係る復帰部164の復帰動作も適用することは、当然可能である。   Of course, the return operation of the return unit 164 according to the modification of the first embodiment can also be applied to the image processing apparatus according to the third embodiment.

なお、上述の距離測定部130、特徴点抽出部140、グルーピング部150、特定部150a、マッチング部161、追跡判定部162、座標予測部163、163a、および復帰部164のうち少なくともいずれかがプログラムで実現される場合、画像処理装置1で実行されるそのプログラムは、インストール可能な形式または実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−RまたはDVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録してコンピュータプログラムプロダクトとして提供される。   Note that at least one of the distance measurement unit 130, the feature point extraction unit 140, the grouping unit 150, the identification unit 150a, the matching unit 161, the tracking determination unit 162, the coordinate prediction units 163 and 163a, and the restoration unit 164 described above is a program. The program executed by the image processing apparatus 1 is a CD-ROM, flexible disk (FD), CD-R, or DVD (Digital Versatile Disk) in an installable or executable file. The program is recorded on a computer-readable recording medium such as a computer program product.

また、上述の各実施の形態および変形例に係る画像処理装置で実行されるプログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また、上述の各実施の形態および変形例に係る画像処理装置で実行されるプログラムをインターネット等のネットワーク経由で提供または配布するように構成してもよい。また、上述のプログラムを、ROM等に予め組み込んで提供するように構成してもよい。   In addition, the program executed by the image processing apparatus according to each of the above-described embodiments and modifications is stored on a computer connected to a network such as the Internet and provided by being downloaded via the network. May be. The program executed by the image processing apparatus according to each of the above-described embodiments and modifications may be provided or distributed via a network such as the Internet. Further, the above program may be provided by being incorporated in advance in a ROM or the like.

また、上述の各実施の形態および変形例に係る画像処理装置で実行されるプログラムは、上述した距離測定部130、特徴点抽出部140、グルーピング部150、特定部150a、マッチング部161、追跡判定部162、座標予測部163、163a、および復帰部164のうち少なくともいずれかを含むモジュール構成となっていてもよく、実際のハードウェアとしてはCPU32が上述の記憶媒体からプログラムを読み出して実行することにより、上述の各機能部が主記憶装置上にロードされて生成されるようになっている。   The program executed by the image processing apparatus according to each of the above-described embodiments and modifications includes the above-described distance measurement unit 130, feature point extraction unit 140, grouping unit 150, identification unit 150a, matching unit 161, tracking determination The module may include at least one of the unit 162, the coordinate prediction units 163 and 163a, and the return unit 164. As actual hardware, the CPU 32 reads and executes the program from the above-described storage medium. Thus, each functional unit described above is loaded and generated on the main storage device.

1、1a 画像処理装置
2 本体部
10a、10b 撮像装置
11a、11b 撮像レンズ
12a、12b 絞り
13a、13b 画像センサ
20a、20b 信号変換装置
21a、21b CDS
22a、22b AGC
23a、23b ADC
24a、24b フレームメモリ
30 追跡処理装置
31 FPGA
32 CPU
33 ROM
34 RAM
35 I/F
36 スピーカ
39 バスライン
100 車両
110 画像取得部
120 補正部
130 距離測定部
131 コスト算出部
132 コスト合成部
133 距離導出部
140 特徴点抽出部
150 グルーピング部
150a 特定部
160、160a 特徴点追跡部
161 マッチング部
162 追跡判定部
163、163a 座標予測部
164 復帰部
170 警告部
200、201、201a フレーム
210、211 フレーム
220、221、225、226 フレーム
227 画像
230 フレーム
240〜242、242a フレーム
260、261、270、271 フレーム
300、310 特徴点
311 追跡点
320、321 特徴点
330〜333 特徴点
340、341 特徴点
360、370 特徴点
410、420 対応点
440〜442 対応点
450、451 予測点
460、470 対応点
480 予測点
510 オプティカルフロー
540、541 オプティカルフロー
550、551 オプティカルフロー
560、570 オプティカルフロー
610、640 テンプレート
710、711、740、740a サーチ領域
810、820、840 サーチ範囲
900 ワイパー
901 フロントガラス
902、910、911 物体
940、960 物体
B 基線長
C コスト値
d シフト量
E 物体
EL エピポーラ線
f 焦点距離
Ia 基準画像
Ib 比較画像
Lr 経路コスト値
Ls 合成コスト値
S、Sa、Sb 点
Z、Z1、Z2 距離
Δ、Δ1 視差値
DESCRIPTION OF SYMBOLS 1, 1a Image processing apparatus 2 Main-body part 10a, 10b Imaging device 11a, 11b Imaging lens 12a, 12b Aperture 13a, 13b Image sensor 20a, 20b Signal conversion device 21a, 21b CDS
22a, 22b AGC
23a, 23b ADC
24a, 24b Frame memory 30 Tracking processor 31 FPGA
32 CPU
33 ROM
34 RAM
35 I / F
36 speaker 39 bus line 100 vehicle 110 image acquisition unit 120 correction unit 130 distance measurement unit 131 cost calculation unit 132 cost synthesis unit 133 distance derivation unit 140 feature point extraction unit 150 grouping unit 150a identification unit 160, 160a feature point tracking unit 161 matching Unit 162 tracking determination unit 163, 163a coordinate prediction unit 164 return unit 170 warning unit 200, 201, 201a frame 210, 211 frame 220, 221, 225, 226 frame 227 image 230 frame 240-242, 242a frame 260, 261, 270 , 271 Frame 300, 310 Feature point 311 Tracking point 320, 321 Feature point 330-333 Feature point 340, 341 Feature point 360, 370 Feature point 410, 420 Corresponding point 440-4 42 Corresponding point 450, 451 Predicted point 460, 470 Corresponding point 480 Predicted point 510 Optical flow 540, 541 Optical flow 550, 551 Optical flow 560, 570 Optical flow 610, 640 Template 710, 711, 740, 740a Search region 810, 820 , 840 Search range 900 Wiper 901 Windshield 902, 910, 911 Object 940, 960 Object B Baseline length C Cost value d Shift amount E Object EL Epipolar line f Focal length Ia Reference image Ib Comparison image Lr Path cost value Ls Composite cost value S, Sa, Sb Points Z, Z1, Z2 Distance Δ, Δ1 Parallax value

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

Claims (15)

2つの撮像手段のうち少なくとも一方の撮像手段により撮像された映像のフレームにおいて被写体の特徴点を抽出する抽出手段と、
前記特徴点が写っているフレームの次のフレームで、該特徴点と一致する特徴点を検索するマッチング動作を行うマッチング手段と、
前記マッチング動作の結果に基づいて、前記特徴点が前記次のフレームで消失したか否かを判定する判定手段と、
前記判定手段によって前記特徴点が消失したと判定された場合、消失した前記特徴点を代替する代替点の動きに基づいて、消失した該特徴点の位置を予測した予測点を求める予測手段と、
前記予測点に基づく点と、消失する前の前記特徴点とが一致する場合、該予測点に基づく点を、追跡対象である前記特徴点として復帰させる復帰手段と、
を備えた画像処理装置。
Extraction means for extracting feature points of a subject in a frame of an image captured by at least one of the two imaging means;
Matching means for performing a matching operation for searching for a feature point that matches the feature point in a frame next to the frame in which the feature point is shown;
Determination means for determining whether or not the feature point has disappeared in the next frame based on a result of the matching operation;
When it is determined by the determining means that the feature point has disappeared, based on the movement of an alternative point that replaces the lost feature point, a predicting unit that obtains a prediction point that predicts the position of the lost feature point;
When the point based on the predicted point matches the feature point before disappearing, a return means for returning the point based on the predicted point as the feature point to be tracked;
An image processing apparatus.
前記予測手段は、消失する前の前記特徴点の位置から、前記代替点のオプティカルフローで指し示される位置を前記予測点とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the prediction unit sets a position indicated by an optical flow of the alternative point from the position of the feature point before disappearance as the prediction point. 前記マッチング手段は、前記特徴点を含む第1テンプレート画像と、前記次のフレームにおける第1探索範囲で一致する画像を探索することにより前記マッチング動作を行う請求項1または2に記載の画像処理装置。   3. The image processing apparatus according to claim 1, wherein the matching unit performs the matching operation by searching for an image that matches the first template image including the feature point in a first search range in the next frame. . 前記判定手段は、前記次のフレームで、少なくとも所定距離よりも近い物体が前記第1探索範囲に含まれていると判定した場合、前記特徴点に対するオクルージョンによって該特徴点が消失したと判定する請求項3に記載の画像処理装置。   The determination unit determines that the feature point has disappeared due to occlusion with respect to the feature point when it is determined that an object closer than a predetermined distance is included in the first search range in the next frame. Item 4. The image processing apparatus according to Item 3. 前記2つの撮像手段により撮像された各フレームの視差に基づいて、前記フレームに含まれる前記被写体までの距離を測定する測定手段と、
前記抽出手段により抽出された複数の特徴点を、前記測定手段により測定された前記複数の特徴点までの各距離に基づいてグループに分類するする分類手段と、
をさらに備え、
前記予測手段は、前記判定手段によって特定の特徴点が消失したと判定された場合、消失した前記特定の特徴点と同じグループの特徴点のいずれかを前記代替点とする請求項1〜4のいずれか一項に記載の画像処理装置。
Measuring means for measuring the distance to the subject included in the frame based on the parallax of each frame imaged by the two imaging means;
Classification means for classifying the plurality of feature points extracted by the extraction means into groups based on the distances to the plurality of feature points measured by the measurement means;
Further comprising
5. The prediction unit according to claim 1, wherein when the determination unit determines that the specific feature point has disappeared, the prediction unit uses any one of the feature points of the same group as the specific feature point that has disappeared as the substitute point. The image processing apparatus according to any one of claims.
前記予測手段は、消失した前記特定の特徴点と同じグループの特徴点のうち、該特定の特徴点に最も近い特徴点を前記代替点とする請求項5に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein the prediction unit sets a feature point closest to the specific feature point among the feature points of the same group as the specific feature point that has disappeared as the substitute point. 前記抽出手段は、前記2つの撮像手段の双方で撮像された映像のフレームにおいて前記被写体の特徴点を抽出し、
前記2つの撮像手段により撮像された各フレームの視差に基づいて、前記一方の撮像手段により撮像されたフレームの特徴点に対応する点を、他方の撮像手段により撮像されたフレームで特定する特定手段を、さらに備え、
前記予測手段は、前記判定手段によって特定の特徴点が消失したと判定された場合、消失した前記特定の特徴点に対応する点として前記特定手段により特定された点を前記代替点とする請求項1〜4のいずれか一項に記載の画像処理装置。
The extraction means extracts feature points of the subject in a frame of a video imaged by both of the two imaging means;
A specifying unit that identifies a point corresponding to a feature point of a frame imaged by the one imaging unit based on a parallax of each frame imaged by the two imaging units using the frame imaged by the other imaging unit Further,
The said prediction means makes the point specified by the said specific means as a said alternative point as a point corresponding to the said specific feature point which lose | disappeared, when it determines with the specific feature point having disappeared by the said determination means. The image processing apparatus as described in any one of 1-4.
前記復帰手段は、消失する前の前記特徴点を含む第2テンプレート画像と、前記予測点を含む第2探索範囲で一致する画像を探索し、該一致する画像を探索できた場合、該予測点に基づく点が、消失する前の前記特徴点と一致すると判定する請求項1〜7のいずれか一項に記載の画像処理装置。   The restoration means searches for a matching image in the second search range including the prediction point and the second template image including the feature point before disappearing, and when the matching image can be searched, the prediction point The image processing apparatus according to claim 1, wherein a point based on the image is determined to match the feature point before disappearing. 前記復帰手段は、前記第2テンプレート画像と一致する画像を探索できなかった場合、前記第2探索範囲を広げて、再度、探索を行う請求項8に記載の画像処理装置。   The image processing apparatus according to claim 8, wherein when the returning unit cannot search for an image that matches the second template image, the searching unit expands the second search range and searches again. 前記復帰手段によって、前記予測点に基づく点と、消失する前の前記特徴点とが一致しなかったと判定された場合、前記予測手段による前記予測点を求める動作、および該復帰手段による前記特徴点の復帰動作を再度行う請求項1〜9のいずれか一項に記載の画像処理装置。   When it is determined by the return means that the point based on the prediction point and the feature point before disappearing do not match, the operation for obtaining the prediction point by the prediction means, and the feature point by the return means The image processing apparatus according to claim 1, wherein the return operation is performed again. 前記復帰手段は、前記予測点と、消失する前の前記特徴点とが一致する場合、該予測点を、追跡対象である前記特徴点として復帰させる請求項1〜10のいずれか一項に記載の画像処理装置。   The said return means returns this prediction point as the said feature point which is a tracking object, when the said prediction point and the said feature point before lose | disappearing correspond. Image processing apparatus. 前記復帰手段は、前記抽出手段により抽出された新たな特徴点のうち前記予測点に最も近い前記新たな特徴点と、消失する前の前記特徴点とが一致する場合、該予測点に最も近い該新たな特徴点を、追跡対象である前記特徴点として復帰させる請求項1〜10のいずれか一項に記載の画像処理装置。   The restoration unit is closest to the prediction point when the new feature point closest to the prediction point among the new feature points extracted by the extraction unit matches the feature point before disappearance. The image processing apparatus according to claim 1, wherein the new feature point is returned as the feature point to be tracked. 前記復帰手段により、前記予測点に基づく点を、追跡対象である前記特徴点として復帰させることができない場合、警告を報知する報知手段を、さらに備えた請求項1〜12のいずれか一項に記載の画像処理装置。   The notification means for notifying a warning when the point based on the prediction point cannot be returned as the feature point to be tracked by the return means. The image processing apparatus described. 2つの撮像手段のうち少なくとも一方の撮像手段により撮像された映像のフレームにおいて被写体の特徴点を抽出する抽出ステップと、
前記特徴点が写っているフレームの次のフレームで、該特徴点と一致する特徴点を検索するマッチング動作を行うマッチングステップと、
前記マッチング動作の結果に基づいて、前記特徴点が前記次のフレームで消失したか否かを判定する判定ステップと、
前記特徴点が消失したと判定した場合、消失した前記特徴点を代替する代替点の動きに基づいて、消失した該特徴点の位置を予測した予測点を求める予測ステップと、
前記予測点に基づく点と、消失する前の前記特徴点とが一致する場合、該予測点に基づく点を、追跡対象である前記特徴点として復帰させる復帰ステップと、
を有する画像処理方法。
An extraction step of extracting feature points of a subject in a frame of an image captured by at least one of the two imaging units;
A matching step for performing a matching operation for searching for a feature point matching the feature point in a frame next to the frame in which the feature point is shown;
A determination step of determining whether the feature point has disappeared in the next frame based on a result of the matching operation;
When it is determined that the feature point has disappeared, a prediction step for obtaining a prediction point that predicts the position of the lost feature point based on the movement of the substitute point that replaces the lost feature point;
When the point based on the predicted point matches the feature point before disappearing, a return step for returning the point based on the predicted point as the feature point to be tracked;
An image processing method.
2つの撮像手段のうち少なくとも一方の撮像手段により撮像された映像のフレームにおいて被写体の特徴点を抽出する抽出手段と、
前記特徴点が写っているフレームの次のフレームで、該特徴点と一致する特徴点を検索するマッチング動作を行うマッチング手段と、
前記マッチング動作の結果に基づいて、前記特徴点が前記次のフレームで消失したか否かを判定する判定手段と、
前記判定手段によって前記特徴点が消失したと判定された場合、消失した前記特徴点を代替する代替点の動きに基づいて、消失した該特徴点の位置を予測した予測点を求める予測手段と、
前記予測点に基づく点と、消失する前の前記特徴点とが一致する場合、該予測点に基づく点を、追跡対象である前記特徴点として復帰させる復帰手段と、
をコンピュータに実現させるためのプログラム。
Extraction means for extracting feature points of a subject in a frame of an image captured by at least one of the two imaging means;
Matching means for performing a matching operation for searching for a feature point that matches the feature point in a frame next to the frame in which the feature point is shown;
Determination means for determining whether or not the feature point has disappeared in the next frame based on a result of the matching operation;
When it is determined by the determining means that the feature point has disappeared, based on the movement of an alternative point that replaces the lost feature point, a predicting unit that obtains a prediction point that predicts the position of the lost feature point;
When the point based on the predicted point matches the feature point before disappearing, a return means for returning the point based on the predicted point as the feature point to be tracked;
A program to make a computer realize.
JP2015030953A 2015-02-19 2015-02-19 Image processing device, image processing method and program Pending JP2016152027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015030953A JP2016152027A (en) 2015-02-19 2015-02-19 Image processing device, image processing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015030953A JP2016152027A (en) 2015-02-19 2015-02-19 Image processing device, image processing method and program

Publications (1)

Publication Number Publication Date
JP2016152027A true JP2016152027A (en) 2016-08-22

Family

ID=56695491

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015030953A Pending JP2016152027A (en) 2015-02-19 2015-02-19 Image processing device, image processing method and program

Country Status (1)

Country Link
JP (1) JP2016152027A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018037479A1 (en) * 2016-08-23 2018-03-01 株式会社日立製作所 Image processing device, stereo camera device, and image processing method
JP2018151689A (en) * 2017-03-09 2018-09-27 キヤノン株式会社 Image processing apparatus, control method thereof, program and storage medium
JPWO2018061927A1 (en) * 2016-09-30 2019-06-24 日本電気株式会社 INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM STORAGE MEDIUM
CN111383247A (en) * 2018-12-29 2020-07-07 北京易讯理想科技有限公司 Method for enhancing image tracking stability of pyramid LK optical flow algorithm
WO2021100681A1 (en) * 2019-11-20 2021-05-27 パナソニックIpマネジメント株式会社 Three-dimensional model generation method and three-dimensional model generation device
CN113012216A (en) * 2019-12-20 2021-06-22 舜宇光学(浙江)研究院有限公司 Feature classification optimization method, SLAM positioning method, system thereof and electronic equipment
JP2023047371A (en) * 2021-09-27 2023-04-06 日本電気株式会社 Fish detection device, fish detection method and program

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018037479A1 (en) * 2016-08-23 2018-03-01 株式会社日立製作所 Image processing device, stereo camera device, and image processing method
JPWO2018037479A1 (en) * 2016-08-23 2019-03-22 株式会社日立製作所 Image processing apparatus, stereo camera apparatus, and image processing method
CN109643437A (en) * 2016-08-23 2019-04-16 株式会社日立制作所 Image processing apparatus, stereo-camera arrangement and image processing method
JPWO2018061927A1 (en) * 2016-09-30 2019-06-24 日本電気株式会社 INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM STORAGE MEDIUM
US10803597B2 (en) 2017-03-09 2020-10-13 Canon Kabushiki Kaisha Image processing device, method for controlling the same, program, and storage medium
JP2018151689A (en) * 2017-03-09 2018-09-27 キヤノン株式会社 Image processing apparatus, control method thereof, program and storage medium
CN111383247A (en) * 2018-12-29 2020-07-07 北京易讯理想科技有限公司 Method for enhancing image tracking stability of pyramid LK optical flow algorithm
WO2021100681A1 (en) * 2019-11-20 2021-05-27 パナソニックIpマネジメント株式会社 Three-dimensional model generation method and three-dimensional model generation device
US11869146B2 (en) 2019-11-20 2024-01-09 Panasonic Intellectual Property Management Co., Ltd. Three-dimensional model generation method and three-dimensional model generation device
CN113012216A (en) * 2019-12-20 2021-06-22 舜宇光学(浙江)研究院有限公司 Feature classification optimization method, SLAM positioning method, system thereof and electronic equipment
CN113012216B (en) * 2019-12-20 2023-07-07 舜宇光学(浙江)研究院有限公司 Feature classification optimization method, SLAM positioning method, system and electronic equipment
JP2023047371A (en) * 2021-09-27 2023-04-06 日本電気株式会社 Fish detection device, fish detection method and program
JP7287430B2 (en) 2021-09-27 2023-06-06 日本電気株式会社 Fish detection device, fish detection method and program

Similar Documents

Publication Publication Date Title
KR101708659B1 (en) Apparatus for recognizing location mobile robot using search based correlative matching and method thereof
KR101725060B1 (en) Apparatus for recognizing location mobile robot using key point based on gradient and method thereof
KR101776622B1 (en) Apparatus for recognizing location mobile robot using edge based refinement and method thereof
KR101776621B1 (en) Apparatus for recognizing location mobile robot using edge based refinement and method thereof
JP2016152027A (en) Image processing device, image processing method and program
KR101784183B1 (en) APPARATUS FOR RECOGNIZING LOCATION MOBILE ROBOT USING KEY POINT BASED ON ADoG AND METHOD THEREOF
WO2017138245A1 (en) Image processing device, object recognition device, device control system, and image processing method and program
JP6561512B2 (en) Parallax value deriving device, moving body, robot, parallax value deriving method, parallax value producing method, and program
JP6565188B2 (en) Parallax value deriving apparatus, device control system, moving body, robot, parallax value deriving method, and program
JP6597795B2 (en) Image processing apparatus, object recognition apparatus, device control system, image processing method and program
JP6597792B2 (en) Image processing apparatus, object recognition apparatus, device control system, image processing method and program
JP6589313B2 (en) Parallax value deriving apparatus, device control system, moving body, robot, parallax value deriving method, and program
JP6547841B2 (en) Image processing apparatus, object recognition apparatus, device control system, image processing method and program
JP2017151535A (en) Image processing device, object recognition device, equipment control system, image processing method, and program
JP6516012B2 (en) Image processing apparatus, object recognition apparatus, device control system, image processing method and program
JP6617150B2 (en) Object detection method and object detection apparatus
JP6455164B2 (en) Parallax value deriving apparatus, device control system, moving body, robot, parallax value deriving method, and program
JP6543935B2 (en) PARALLEL VALUE DERIVING DEVICE, DEVICE CONTROL SYSTEM, MOBILE OBJECT, ROBOT, PARALLEL VALUE DERIVING METHOD, AND PROGRAM
JP6561511B2 (en) Parallax value deriving device, moving body, robot, parallax value production deriving method, parallax value producing method and program
JP6519138B2 (en) PARALLEL VALUE DERIVING DEVICE, MOBILE OBJECT, ROBOT, PARALLEL VALUE PRODUCTION METHOD, AND PROGRAM
JP2016173795A (en) Image processing apparatus, image processing method, and program
JP2017167970A (en) Image processing apparatus, object recognition apparatus, device control system, image processing method, and program
JP2007233487A (en) Pedestrian detection method, device, and program
JP2018151940A (en) Obstacle detection device and obstacle detection method
JP6836350B2 (en) Movement speed arithmetic unit