JP2019053625A - Moving object detection device, and moving object detection method - Google Patents

Moving object detection device, and moving object detection method Download PDF

Info

Publication number
JP2019053625A
JP2019053625A JP2017178431A JP2017178431A JP2019053625A JP 2019053625 A JP2019053625 A JP 2019053625A JP 2017178431 A JP2017178431 A JP 2017178431A JP 2017178431 A JP2017178431 A JP 2017178431A JP 2019053625 A JP2019053625 A JP 2019053625A
Authority
JP
Japan
Prior art keywords
frame
detection
moving object
image
frames
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2017178431A
Other languages
Japanese (ja)
Other versions
JP7018607B2 (en
Inventor
卓也 明石
Takuya Akashi
卓也 明石
潮 張
Chao Zhang
潮 張
ウーガンバヤル ガンボルド
Uganbayar Ganbold
ウーガンバヤル ガンボルド
久保田 整
Hitoshi Kubota
整 久保田
浩行 富田
Hiroyuki Tomita
浩行 富田
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.)
Iwate University
Suzuki Motor Corp
Original Assignee
Iwate University
Suzuki Motor Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Iwate University, Suzuki Motor Corp filed Critical Iwate University
Priority to JP2017178431A priority Critical patent/JP7018607B2/en
Publication of JP2019053625A publication Critical patent/JP2019053625A/en
Application granted granted Critical
Publication of JP7018607B2 publication Critical patent/JP7018607B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

To provide an inexpensive and highly safe moving object detection device and moving object detection method that can detect moving objects from motion images of a monocular camera with high accuracy and quickly.SOLUTION: A representative configuration of a moving object detection device according to the present invention comprises a moving object detection unit that sets a detection frame to a moving object of a frame image. The moving object detection unit is configured to: extract a foreground pixel from a current frame, using a background differential method; determine a frame surrounding the foreground pixel as a primary candidate frame; acquire the detection frame of a previous frame from a storage unit; determine, of the primary candidate frames, the primary candidate frame overlapping the detection frame of the previous frame in an area more than a prescribed ratio as a secondary candidate frame; group the secondary candidate frames overlapping the detection frame of the previous frame, of the secondary candidate frames; determine, of the grouped secondary candidate frames, the secondary candidate frame overlapping the detection frame thereof in the area more than prescribed ratio in a y-axis direction as an integrated detection frame; and determine the secondary candidate frame non-overlapping the detection frame thereof in the area more than prescribed ratio in the y-axis direction as a separated detection frame.SELECTED DRAWING: Figure 6

Description

本発明は、単眼カメラの動画像から移動物体を高い精度で高速に検出することが可能な移動物体検出装置および移動物体検出方法に関する。   The present invention relates to a moving object detection apparatus and a moving object detection method capable of detecting a moving object with high accuracy and high speed from a moving image of a monocular camera.

現在、交通事故を未然に防ぐことを目的とした、多くの予防安全技術の研究開発が進められている。そのひとつに、交差点等での自動車と歩行者、自転車、自動車等との出合い頭の交通事故を防止する要請がある。そのようなシステムにおいては、車載センサや車載カメラを利用して移動物体を検出することが考えられる。   Currently, many preventive safety technologies are being researched and developed to prevent traffic accidents. One of these is a request to prevent traffic accidents at the intersection of cars and pedestrians, bicycles, cars, etc. at intersections. In such a system, it is conceivable to detect a moving object using an in-vehicle sensor or an in-vehicle camera.

車載センサを用いた物体検出技術としては、レーザーレンジセンサ等の補助装置を使用するシステムがある。しかしレーザー装置は高価である上に、強いレーザーを人体に照射することができないため、出力を上げにくいという問題がある。   As an object detection technique using a vehicle-mounted sensor, there is a system that uses an auxiliary device such as a laser range sensor. However, the laser device is expensive and has a problem that it is difficult to increase the output because it cannot irradiate the human body with a strong laser.

車載カメラを用いる場合、背景差分法を用いることが考えられる。背景差分法は高速に処理可能であり、動的なシーンの変化を用いた信頼性の高い手法である。しかし、物体が平坦なテクスチャを有する場合や、物体の一部が背景と似た色である場合には、物体の一部しか検出できない場合がある。   When using an in-vehicle camera, it is conceivable to use the background subtraction method. The background subtraction method can be processed at high speed and is a highly reliable method using dynamic scene changes. However, when the object has a flat texture or when a part of the object has a color similar to the background, only a part of the object may be detected.

特許文献1には、検出対象領域の候補が複数ある場合(顔部分と足部分)、検出対象領域が撮像画像中で占めるべき大きさを特定し、その大きさの範囲に、他の候補が含まれている場合、前記候補と他の候補とを結合した領域を新たな一の検出対象領域の候補として抽出する画像処理装置が提案されている。   In Patent Document 1, when there are a plurality of candidates for the detection target region (face portion and foot portion), the size that the detection target region should occupy in the captured image is specified, and other candidates exist within the size range. If included, an image processing apparatus has been proposed that extracts a region obtained by combining the candidate and another candidate as a new candidate for one detection target region.

特開2010−092353号公報JP 2010-092353 A

しかしながら、特許文献1の技術は、撮像画像中の検出対象領域の候補の位置に基づいて、占めるべき大きさを特定している。すると、まず検出対象の距離を判定する必要がある。特許文献1では撮像装置は交差点を俯瞰するように固定設置されている(段落0038、図1)。この限定的な条件により画像上の位置から距離を測ることが可能となっているが、車載カメラの画像を基にした場合は距離を測ることは困難である。   However, the technique of Patent Literature 1 specifies the size to be occupied based on the position of the detection target region candidate in the captured image. Then, it is necessary to first determine the distance to be detected. In Patent Document 1, the imaging device is fixedly installed so as to look down on the intersection (paragraph 0038, FIG. 1). Although it is possible to measure the distance from the position on the image under this limited condition, it is difficult to measure the distance based on the image of the in-vehicle camera.

また特許文献1では、検出対象の種類(人物であるかどうか)を判定し、占めるべき大きさを特定する必要がある。このような判定は非常に不確実である。さらに、特許文献1では赤外線カメラを使用しているため肌が露出している部分が検出されるが、肌が見える面積は人物の向きや、服装、髪型により全く異なる点でも、不確実性が増してしまう。   In Patent Document 1, it is necessary to determine the type of detection target (whether it is a person) and to specify the size to be occupied. Such a determination is very uncertain. Further, in Patent Document 1, since an infrared camera is used, a portion where the skin is exposed is detected. However, there is uncertainty in that the area where the skin can be seen is completely different depending on the direction of the person, clothes, and hairstyle. It will increase.

また、赤外線カメラではなく安価な単眼カメラを用いたり、さらに広範囲を撮影するために魚眼レンズや広角レンズを用いた場合には、赤外線カメラを用いた場合よりもノイズが大きくなる可能性がある。   Further, when an inexpensive monocular camera is used instead of an infrared camera, or when a fish-eye lens or a wide-angle lens is used for photographing a wider range, noise may be larger than when an infrared camera is used.

そこで本発明は、単眼カメラの動画像から移動物体を高い精度で高速に検出することが可能な、安価で安全性の高い移動物体検出装置および移動物体検出方法を提供することを目的としている。   Accordingly, an object of the present invention is to provide an inexpensive and highly safe moving object detection apparatus and moving object detection method capable of detecting a moving object with high accuracy and high speed from a moving image of a monocular camera.

上記課題を解決するために、本発明にかかる移動物体検出装置の代表的な構成は、動画像を入力する入力部と、動画像から連続的に複数のフレーム画像を取り出すフレーム取得部と、移動物体に検出枠を設定する移動物体検出部と、設定した検出枠を記憶する記憶部とを備え、移動物体検出部は、現フレームから背景差分法を用いて前景画素を抽出し、前景画素を囲う枠を1次候補枠とし、記憶部から前フレームの検出枠を取得し、1次候補枠のうち、前フレームの検出枠と面積が所定以上重なるものを2次候補枠とし、2次候補枠のうち、同じ前フレームの検出枠と重なるものをグループ化し、グループ化された2次候補枠のうち、y軸方向に所定以上重なるものは統合した検出枠とし、y軸方向に所定以上重ならないものは分離した検出枠とすることを特徴とする。   In order to solve the above problems, a typical configuration of the moving object detection device according to the present invention includes an input unit that inputs a moving image, a frame acquisition unit that continuously extracts a plurality of frame images from the moving image, and a moving unit. A moving object detection unit configured to set a detection frame on the object; and a storage unit configured to store the set detection frame. The moving object detection unit extracts a foreground pixel from the current frame using a background subtraction method. The enclosing frame is set as a primary candidate frame, the detection frame of the previous frame is acquired from the storage unit, and the primary candidate frame is defined as a secondary candidate frame if the area of the detection frame of the previous frame overlaps by a predetermined amount or more. Of the frames, those that overlap with the detection frame of the same previous frame are grouped, and among the grouped secondary candidate frames, those that overlap more than a predetermined amount in the y-axis direction are combined into a detection frame, and more than a predetermined overlap in the y-axis direction. What does not become a separate detection Characterized by a.

上記構成によれば、現フレームの候補枠に対して、前フレームの検出枠と重なった範囲内で統合と分離を行う。移動物体の種類や距離を判定する必要がなく、またノイズが多くても候補枠の統合と分離を行うことができる。これにより単眼カメラの画像であっても、そして車載カメラのように移動しながら撮影した画像であっても、移動物体に適切に対応した検出枠を設定することができる。したがって、接近する移動物体を高い精度で高速に検出することができ、安価に安全性の向上を図ることができる。   According to the above configuration, the current frame candidate frame is integrated and separated within a range that overlaps the detection frame of the previous frame. It is not necessary to determine the type and distance of the moving object, and the candidate frames can be integrated and separated even if there is a lot of noise. As a result, it is possible to set a detection frame appropriately corresponding to a moving object, whether it is an image of a monocular camera or an image taken while moving like a vehicle-mounted camera. Therefore, a moving object approaching can be detected at high speed with high accuracy, and safety can be improved at low cost.

背景画像と現フレームの画像を合成して背景画像を更新する背景画像生成部をさらに備えていてもよい。これにより移動しながら撮影された動画像であっても、背景画像を適宜生成することができる。   A background image generation unit that combines the background image and the current frame image to update the background image may be further included. Thus, a background image can be generated as appropriate even for a moving image shot while moving.

現フレームにおいて検出された1または複数の検出枠に対し、所定の面積または縦横比を満たさない検出枠を除去するフィルタ部をさらに備えていてもよい。動画像が移動しながら撮影されたものであること、単眼カメラの画像であることは、ノイズが増える要因となる。上記構成によればノイズを除去して、移動物体の検出精度を向上させることができる。   A filter unit for removing a detection frame that does not satisfy a predetermined area or aspect ratio with respect to one or more detection frames detected in the current frame may be further provided. The fact that the moving image is taken while moving and that it is an image of a monocular camera causes noise to increase. According to the above configuration, noise can be removed and detection accuracy of a moving object can be improved.

現フレームにおいて地平線を検出し、現フレームにおいて検出された1または複数の検出枠に対し、地平線に所定の割合で重なっていない検出枠を除去するフィルタ部をさらに備えていてもよい。   A filter unit may be further provided that detects a horizon in the current frame and removes detection frames that do not overlap the horizon at a predetermined ratio with respect to one or more detection frames detected in the current frame.

車載カメラなどで移動しながら撮影した動画像においては、下方については道路標示や横断歩道、上方については建物や看板、信号機、電線、街路灯なども移動物体として検知してしまう可能性がある。しかし本発明において検出したい移動体は地上を移動するものである。そして上記の構成によれば、移動体でない検出枠を除去することができる。   In a moving image taken while moving with an in-vehicle camera or the like, there is a possibility that a road sign or a pedestrian crossing is detected as a moving object below, and a building, a signboard, a traffic light, an electric wire, a street light, or the like is detected as a moving object. However, the moving object to be detected in the present invention moves on the ground. And according to said structure, the detection frame which is not a mobile body can be removed.

フィルタ部は、地平線の検出に遺伝的アルゴリズムを用いてもよい。これにより、建物や道路の形状に邪魔されて簡単にはわかりにくい地平線を、高い精度で検出することができる。   The filter unit may use a genetic algorithm for detecting the horizon. As a result, it is possible to detect with high accuracy a horizon that is obstructed by the shape of the building or road and is not easily understood.

本発明にかかる移動物体検出方法の代表的な構成は、動画像を入力し、動画像から連続的に複数のフレーム画像を取り出し、処理対象となるフレーム画像を現フレームとし、その前のフレーム画像を前フレームとしたとき、現フレームから背景差分法を用いて前景画素を抽出し、前景画素を囲う枠を1次候補枠とし、前フレームにおける移動物体を囲う検出枠を取得し、1次候補枠のうち、前フレームの検出枠と面積が所定以上重なるものを2次候補枠とし、2次候補枠のうち、同じ前フレームの検出枠と重なるものをグループ化し、グループ化された2次候補枠のうち、y軸方向に所定以上重なるものは統合した検出枠とし、y軸方向に所定以上重ならないものは分離した検出枠とすることを特徴とする。   A typical configuration of the moving object detection method according to the present invention is that a moving image is input, a plurality of frame images are continuously extracted from the moving image, a frame image to be processed is set as a current frame, and the previous frame image Is the previous frame, the foreground pixels are extracted from the current frame using the background subtraction method, the frame surrounding the foreground pixels is set as the primary candidate frame, the detection frame surrounding the moving object in the previous frame is acquired, and the primary candidate is acquired. Of the frames, a frame that overlaps the detection frame of the previous frame by a predetermined amount or more is a secondary candidate frame, and among the secondary candidate frames, those that overlap the detection frame of the same previous frame are grouped, and the grouped secondary candidates Among the frames, those that overlap a predetermined amount or more in the y-axis direction are integrated detection frames, and those that do not overlap a predetermined amount or more in the y-axis direction are separated detection frames.

上記方法によれば、単眼カメラの動画像から移動物体を高い精度で高速に検出することができ、安価に安全性の向上を図ることができる。上記移動物体検出装置と同様の技術的思想を、当該移動物体検出方法にも適用することができる。   According to the above method, a moving object can be detected from a moving image of a monocular camera at high speed with high accuracy, and safety can be improved at low cost. The same technical idea as that of the moving object detection apparatus can be applied to the moving object detection method.

本発明によれば、単眼カメラの動画像から移動物体を高い精度で高速に検出することが可能な、安価で安全性の高い移動物体検出装置および移動物体検出方法を提供することができる。   According to the present invention, it is possible to provide an inexpensive and highly safe moving object detecting apparatus and moving object detecting method capable of detecting a moving object with high accuracy and high speed from a moving image of a monocular camera.

本実施形態にかかる移動物体検出装置の全体構成を説明する図である。It is a figure explaining the whole structure of the moving object detection apparatus concerning this embodiment. 本実施形態にかかる移動物体検出方法を説明するフローチャートである。It is a flowchart explaining the moving object detection method concerning this embodiment. 移動物体の検出の手順を説明するフローチャートである。It is a flowchart explaining the procedure of the detection of a moving object. 背景差分法の画像例である。It is an example of an image of a background difference method. 前景画素の膨張と収縮を説明する画像例である。It is an example of an image explaining expansion and contraction of a foreground pixel. 検出枠の設定について説明する画像例である。It is an example of an image explaining setting of a detection frame. 統合と分離を説明する他の画像例である。It is another example of an image explaining integration and separation. 検出枠のフィルタリング処理を説明する画像例である。It is an example image explaining filtering processing of a detection frame. 背景画像の生成について説明する画像例である。It is an example of an image explaining generation of a background image. 地平線を用いたフィルタリング処理について説明する画像例である。It is an example of an image explaining filtering processing using a horizon. 遺伝的アルゴリズムの条件等を説明する図である。It is a figure explaining the conditions etc. of a genetic algorithm. 遺伝的アルゴリズムのフローチャートである。It is a flowchart of a genetic algorithm. 遺伝的アルゴリズムの目的関数を説明する図である。It is a figure explaining the objective function of a genetic algorithm.

以下に添付図面を参照しながら、本発明の好適な実施形態について詳細に説明する。かかる実施形態に示す寸法、材料、その他具体的な数値などは、発明の理解を容易とするための例示に過ぎず、特に断る場合を除き、本発明を限定するものではない。なお、本明細書および図面において、実質的に同一の機能、構成を有する要素については、同一の符号を付することにより重複説明を省略し、また本発明に直接関係のない要素は図示を省略する。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The dimensions, materials, and other specific numerical values shown in the embodiments are merely examples for facilitating understanding of the invention, and do not limit the present invention unless otherwise specified. In the present specification and drawings, elements having substantially the same function and configuration are denoted by the same reference numerals, and redundant description is omitted, and elements not directly related to the present invention are not illustrated. To do.

[第1実施形態]
本発明にかかる移動物体検出装置および移動物体検出方法の第1実施形態について説明する。図1は本実施形態にかかる移動物体検出装置100の全体構成を説明する図である。図2は本実施形態にかかる移動物体検出方法を説明するフローチャートである。
[First Embodiment]
A first embodiment of a moving object detection device and a moving object detection method according to the present invention will be described. FIG. 1 is a diagram illustrating the overall configuration of a moving object detection device 100 according to the present embodiment. FIG. 2 is a flowchart for explaining the moving object detection method according to the present embodiment.

図1(a)に示すように、移動物体検出装置100は自動車10に搭載される車載システムである。代表的な例として、自動車10の車載カメラ12が撮影した動画像が移動物体検出装置100に入力されて、移動物体を検出する。移動物体検出装置100によって検出された移動物体の情報は、ブレーキングシステム14や不図示のモニター等に送られて利用される。   As shown in FIG. 1A, the moving object detection device 100 is an in-vehicle system that is mounted on an automobile 10. As a representative example, a moving image captured by the in-vehicle camera 12 of the automobile 10 is input to the moving object detection device 100 to detect a moving object. Information on the moving object detected by the moving object detection apparatus 100 is sent to the braking system 14 or a monitor (not shown) for use.

車載カメラ12は、安価な単眼カメラであり、一般的な動画像を撮影する。動画像はカラー画像であってもよいし、グレースケール画像(モノクローム画像)であってもよい。また車載カメラ12は、魚眼レンズや広角レンズを備えていてもよい。本発明によれば、単眼カメラの動画像からでも、後述するように移動物体を高い精度で高速に検出することが可能であるため、安価で安全性の高い移動物体検出装置および移動物体検出方法を提供することができる。   The in-vehicle camera 12 is an inexpensive monocular camera and captures a general moving image. The moving image may be a color image or a gray scale image (monochrome image). The in-vehicle camera 12 may include a fisheye lens or a wide angle lens. According to the present invention, it is possible to detect a moving object with high accuracy and high speed even from a moving image of a monocular camera, as will be described later. Can be provided.

図1(b)には移動物体検出装置100の構成が示されている。移動物体検出装置100は具体的にはコンピュータシステムで構築することができる。以下、移動物体検出装置100の構成について、図2に示すフローチャートを参照しながら説明する。   FIG. 1B shows the configuration of the moving object detection device 100. Specifically, the moving object detection apparatus 100 can be constructed by a computer system. Hereinafter, the configuration of the moving object detection device 100 will be described with reference to the flowchart shown in FIG.

入力部110には、車載カメラ12が撮影した動画像が入力される(ステップ210)。動画像が映像信号である場合にはコンポジット端子やHDMI(登録商標)端子を備えるビデオエンコーダチップが入力部110に該当する。動画像がエンコードされたデジタルデータになっている場合にはUSBやIEEE1394インターフェースが入力部110に該当する。いずれにしても入力部110は、移動物体検出装置100内で処理可能なように動画像のデータを入力できればよい。   A moving image captured by the in-vehicle camera 12 is input to the input unit 110 (step 210). When the moving image is a video signal, a video encoder chip having a composite terminal or an HDMI (registered trademark) terminal corresponds to the input unit 110. When the moving image is encoded digital data, the USB or IEEE 1394 interface corresponds to the input unit 110. In any case, the input unit 110 only needs to be able to input moving image data so that it can be processed in the moving object detection apparatus 100.

フレーム取得部112は、入力された動画像から連続的に複数のフレーム画像(静止画)を取得する(ステップ212)。動画像からフレームを取得する具体的な処理は、動画像のフォーマットに依存する。例えば動画像がMotionJPEGのように静止画を配列したフォーマットであれば、単純に各フレームを抜き出せばよい。なお、動画像のfps(frame per second)に依存することなく、一定時間単位(例えば0.1秒単位)で抜き出してもよい。MPEGのように差分圧縮されているものは、GOP(Group Of Pictures)のIフレームごとに抜き出してもよい。   The frame acquisition unit 112 continuously acquires a plurality of frame images (still images) from the input moving image (step 212). A specific process for acquiring a frame from a moving image depends on the format of the moving image. For example, if the moving image is a format in which still images are arranged, such as Motion JPEG, each frame may be simply extracted. In addition, you may extract by a fixed time unit (for example, 0.1 second unit), without depending on fps (frame per second) of a moving image. What is differentially compressed like MPEG may be extracted for each G frame (Group Of Pictures) I frame.

前処理部114は、取得したフレーム画像に対して前処理を行う(ステップ214)。本実施形態では、入力される動画像がカラー画像であり、前処理としてグレースケール画像に変換する。なお前処理としては、必要に応じてノイズ除去を行ったり、画像処理の対象となる領域を切り出すクロップ処理を行ってもよい。   The preprocessing unit 114 performs preprocessing on the acquired frame image (step 214). In the present embodiment, the input moving image is a color image, and is converted into a grayscale image as preprocessing. Note that, as preprocessing, noise removal may be performed as necessary, or crop processing for cutting out an area to be subjected to image processing may be performed.

移動物体検出部118は、処理対象となるフレーム画像を現フレームとしたとき、現フレームから背景差分法を用いて移動物体を検出し、その検出枠を設定する(ステップ216)。なお以下の説明において、処理対象となるフレームの前のフレームを「前フレーム」と称し、次のフレームを「次フレーム」と称する。   When the frame image to be processed is the current frame, the moving object detection unit 118 detects the moving object from the current frame using the background subtraction method, and sets the detection frame (step 216). In the following description, the frame before the frame to be processed is referred to as “previous frame”, and the next frame is referred to as “next frame”.

図3は移動物体の検出の手順(サブルーチン)を説明するフローチャートである。移動物体検出部118は、まず、背景差分法を用いて前景画素を抽出する(ステップ232)。   FIG. 3 is a flowchart for explaining the procedure (subroutine) for detecting a moving object. The moving object detection unit 118 first extracts foreground pixels using the background subtraction method (step 232).

図4は背景差分法の画像例である。図4(a)に示す現フレームの画像において、左側に位置している自転車に乗った人物と、中央に位置している2台の自動車が移動物体である。図4(b)に示す背景画像は、背景画像生成部116から取得する。背景画像においてもこれらの移動物体は写っているが、それぞれ位置が少しずつ異なっている。これらの画像に背景差分法を適用する(輝度の減算を行う)と、図4(c)に示す差分画像のように、差異のある画素が抽出される。この差異のある画素が前景画素である。   FIG. 4 is an image example of the background subtraction method. In the image of the current frame shown in FIG. 4A, a person riding on a bicycle located on the left side and two cars located in the center are moving objects. The background image illustrated in FIG. 4B is acquired from the background image generation unit 116. These moving objects are also shown in the background image, but their positions are slightly different. When the background difference method is applied to these images (luminance subtraction is performed), different pixels are extracted as in the difference image shown in FIG. A pixel having this difference is a foreground pixel.

図5は前景画素の膨張と収縮を説明する画像例である。背景差分法によって抽出した前景画素は、輝度が低く、また細かく分断された状態である。そこで、ガウシアンフィルタ等による平滑化(ぼかし処理)を行って近接する前景画素を連結した後に、図5(a)に示す画像のように二値化して明瞭化する(ステップ234)。これでもまだ中抜けや細かな分断があるため、図5(b)に示すように前景画素の膨張を行った後に、図5(c)に示すように前景画素の収縮を行う(ステップ236)。   FIG. 5 is an image example illustrating the expansion and contraction of the foreground pixels. The foreground pixels extracted by the background subtraction method are in a state of low brightness and finely divided. Therefore, smoothing (blurring processing) using a Gaussian filter or the like is performed to connect adjacent foreground pixels, and then binarized as shown in FIG. 5A to clarify (step 234). Even in this case, since there are still voids and fine divisions, the foreground pixels are contracted as shown in FIG. 5C after the foreground pixels are expanded as shown in FIG. 5B (step 236). .

膨張とは、背景画素が黒、前景画素が白として、フィルタ径を例えば5×5とすると、総ての白い画素を中心とするフィルタ径内の画素を白にする処理である。収縮はその逆で、総ての黒い画素を中心とするフィルタ径内の画素を黒にする処理である。膨張と収縮を行うと、外縁の輪郭は元の位置に戻るものの、膨張によって埋められた中抜けや分断(不連続)は収縮しても埋められたままであるので、近接する前景画素同士を連結することができる。   The expansion is a process of setting pixels within the filter diameter centering on all white pixels to white when the background pixel is black and the foreground pixel is white and the filter diameter is 5 × 5, for example. Shrinkage is the reverse, and is the process of making the pixels within the filter diameter centered on all black pixels black. When expansion and contraction are performed, the outline of the outer edge returns to the original position, but the voids and divisions (discontinuities) that are filled by expansion remain buried even after contraction, so adjacent foreground pixels are connected together. can do.

ここで、冒頭で説明したように、背景差分法においては物体が平坦なテクスチャを有する場合や、物体の一部が背景と似た色である場合には、背景画像と現フレームの画像で輝度差が生じないため、物体の一部しか検出できない場合がある。この場合、前景画素が離れて存在するため、上記のような平滑化や、膨張と収縮だけでは、前景画素同士を連結することはできない。そこで本発明においては、次に述べる候補枠の統合と分離を行う。   Here, as explained at the beginning, in the background subtraction method, when the object has a flat texture or when a part of the object has a color similar to the background, the brightness of the background image and the current frame image Since no difference occurs, only a part of the object may be detected. In this case, since the foreground pixels exist apart from each other, the foreground pixels cannot be connected only by smoothing as described above, expansion and contraction. Therefore, in the present invention, the candidate frames described below are integrated and separated.

統合とは、本来1つの移動物体であるものを、誤検出により複数の検出枠として抽出されたものであると判定して、1つの検出枠にする処理である。分離とは、近接する検出枠を、近接する複数の移動物体であると判定して独立した検出枠とする処理である。   The integration is a process of determining that a single moving object is originally extracted as a plurality of detection frames due to erroneous detection to form one detection frame. Separation is a process of determining adjacent detection frames as a plurality of adjacent moving objects and making them independent detection frames.

図6は検出枠の設定について説明する画像例である。移動物体検出部118は、抽出した前景画素の輪郭を検出して、図6(a)に示すように前景画素を囲う枠を1次候補枠150a〜fとする(ステップ238)。そして移動物体検出部118は、記憶部120から前フレームの検出枠を取得する(ステップ240)。なお、現フレームにおいてまだ前フレームの検出枠が存在しない場合には、この統合と分離の処理(ステップ240 〜ステップ244)はスキップする。   FIG. 6 is an example of an image for explaining detection frame setting. The moving object detection unit 118 detects the outline of the extracted foreground pixels, and sets the frames surrounding the foreground pixels as primary candidate frames 150a to 150f as shown in FIG. 6A (step 238). Then, the moving object detection unit 118 acquires the detection frame of the previous frame from the storage unit 120 (step 240). If there is no previous frame detection frame in the current frame, this integration and separation processing (steps 240 to 244) is skipped.

そして移動物体検出部118は、図6(a)に示す1次候補枠150a〜fのうち、図6(b)に示すように前フレームの検出枠152a〜cと面積が所定以上(例えば50%以上)重なるものを2次候補枠154a〜dに設定する(ステップ242)。図6(b)において前フレームの検出枠152は一点鎖線で示し、2次候補枠154は破線で示している。1次候補枠150a〜fのうち、2次候補枠にならなかった1次候補枠150e、150fは、そのまま検出枠となる(「検出枠」は、候補ではない)。   Then, the moving object detection unit 118 has, as shown in FIG. 6B, primary detection frames 152a to 150f shown in FIG. % Or more) are set as secondary candidate frames 154a to 154d (step 242). In FIG. 6B, the detection frame 152 of the previous frame is indicated by a one-dot chain line, and the secondary candidate frame 154 is indicated by a broken line. Of the primary candidate frames 150a to 150f, the primary candidate frames 150e and 150f that have not become secondary candidate frames are used as detection frames as they are ("detection frames" are not candidates).

移動物体検出部118は、2次候補枠154のうち、同じ前フレームの検出枠152と重なるものをグループ化する。図6(b)において左側にある前フレームの検出枠152aには2次候補枠154a、154bが重なっているため、これらをグループ化する。そして、グループ化された2次候補枠154a、154bのうち、図6(c)に示すように、y軸方向に所定以上(例えば30%以上)重なるものは統合した検出枠156aとする。y軸方向に所定以上重ならないものは分離(独立)した検出枠とする(ステップ244)。なお「y軸方向に所定以上重なる」とは、枠のx軸方向の座標の範囲が所定以上重複していることと同義である。   The moving object detection unit 118 groups the secondary candidate frames 154 that overlap with the detection frame 152 of the same previous frame. Since the secondary candidate frames 154a and 154b overlap the detection frame 152a of the previous frame on the left side in FIG. 6B, these are grouped. Then, among the grouped secondary candidate frames 154a and 154b, as shown in FIG. 6C, an overlapping detection frame 156a that overlaps in the y-axis direction by a predetermined amount (for example, 30% or more). Those that do not overlap a predetermined amount or more in the y-axis direction are separated (independent) detection frames (step 244). Note that “overlap in the y-axis direction by a predetermined amount or more” is synonymous with a range of coordinates in the x-axis direction of the frame overlapping a predetermined amount or more.

上記を整理すると、「検出枠」となるのは次の3通りである。
・1次候補枠のうち、2次候補枠にならなかったもの(150e、150f)
・2次候補枠のうち、統合したもの(156a)
・2次候補枠のうち、統合せずに分離したままのもの(154c、154d)
なお、グループ化された2次候補枠が多数ある場合には、複数の統合した検出枠が設定される場合がある。例えば1つのグループに2次候補枠が4つある場合に、2つずつ統合されて、2つの検出枠が設定される場合がある。
To summarize the above, there are the following three detection frames.
-Of the primary candidate frames, those that did not become secondary candidate frames (150e, 150f)
-Integrated secondary candidate frame (156a)
-Secondary candidate frames that remain separated without being merged (154c, 154d)
When there are a large number of grouped secondary candidate frames, a plurality of integrated detection frames may be set. For example, when there are four secondary candidate frames in one group, two detection frames may be set by integrating two candidate frames.

図7は統合と分離を説明する他の画像例であり、重なって見えていた2人の歩行者が離れていくときの処理例である。図7(a)は現フレームの画像である。道路上に2人の歩行者が歩いている。図7(b)は現フレームにおいて抽出した前景画素を示していて、現フレームの中央部に対応している。右側の人物の前景画素は1つの1次候補枠150gになっているが、左側の人物の前景画素は上下で切れた2つの1次候補枠150h、150iになっている。2人の歩行者についての前景画素のブロックは合計3つである。図7(c)は前フレームにおいて抽出した前景画素および検出枠を示している。前フレームでは2人の歩行者がまだ重なって見えていたため、2人で1つの大きな検出枠152dとなっている。   FIG. 7 is another image example for explaining the integration and separation, and is a processing example when two pedestrians that have been seen overlapping each other are separated. FIG. 7A shows an image of the current frame. Two pedestrians are walking on the road. FIG. 7B shows the foreground pixels extracted in the current frame and corresponds to the center of the current frame. The foreground pixel of the right person is one primary candidate frame 150g, while the foreground pixel of the left person is two primary candidate frames 150h and 150i cut off at the top and bottom. There are a total of three foreground pixel blocks for two pedestrians. FIG. 7C shows the foreground pixels and detection frames extracted in the previous frame. In the previous frame, two pedestrians still seemed to overlap each other, so two people form one large detection frame 152d.

そして移動物体検出部118は、図7(d)に示すように、1次候補枠150に前フレームの検出枠152dを重ねて、面積が所定以上重なるものを2次候補枠に設定する。本例では3つの1次候補枠150g〜iは、総て3つの2次候補枠154e〜gとなる。また、3つの2次候補枠154e〜gは同じ前フレームの検出枠152dに重なっているから、これらはグループ化される。   Then, as shown in FIG. 7D, the moving object detection unit 118 superimposes the detection frame 152d of the previous frame on the primary candidate frame 150, and sets an area that overlaps a predetermined area or more as a secondary candidate frame. In this example, the three primary candidate frames 150g-i are all three secondary candidate frames 154e-g. Further, since the three secondary candidate frames 154e to 154g overlap the detection frame 152d of the same previous frame, they are grouped.

図7(d)において2次候補枠154f、154gはy軸方向に所定以上重なっているから、図7(e)に示すように統合した検出枠156bとする。2次候補枠154eはy軸方向に所定以上重なっていないから、統合せずに分離したままとする。結果として、図7(f)に示すように、2人の歩行者にそれぞれ検出枠(2次候補枠154e、統合した検出枠156b)が設定される。なお、重なり度合いを判定するとき、2つの候補枠のx軸方向に重複する大きさ(長さ)を、2つの候補枠のうちx軸方向の大きさが小さい方と比較するとよい。   In FIG. 7D, since the secondary candidate frames 154f and 154g overlap each other by a predetermined amount or more in the y-axis direction, they are set as an integrated detection frame 156b as shown in FIG. Since the secondary candidate frame 154e does not overlap by a predetermined amount or more in the y-axis direction, it remains separated without being integrated. As a result, as shown in FIG. 7F, detection frames (secondary candidate frame 154e and integrated detection frame 156b) are set for two pedestrians, respectively. When determining the degree of overlap, the size (length) of the two candidate frames overlapping in the x-axis direction may be compared with the smaller of the two candidate frames in the x-axis direction.

このようにして、3つの前景画素を適切に統合して、2つの移動物体に検出枠を設定することができる。また同時に、前フレームでは1つであった検出枠を現フレームでは2つの検出枠に分離することができる。   In this manner, it is possible to appropriately integrate the three foreground pixels and set the detection frames for the two moving objects. At the same time, the detection frame that was one in the previous frame can be separated into two detection frames in the current frame.

図8は検出枠のフィルタリング処理(ステップ246)を説明する画像例である。図8(a)は統合と分離が終了した後の検出枠を示している(図6(c)参照)。図8(a)において、画像左側の自転車に乗った人物は統合した検出枠156aとなり、画像中央の2台の自動車は2次候補枠154c、154dとして検出されている。そして1次候補枠150e、150fは、検出枠として残っているものの、極端に小さいため、ノイズと考えることができる。   FIG. 8 is an image example illustrating detection frame filtering processing (step 246). FIG. 8A shows a detection frame after the integration and separation are completed (see FIG. 6C). In FIG. 8A, the person riding on the bicycle on the left side of the image becomes an integrated detection frame 156a, and the two cars in the center of the image are detected as secondary candidate frames 154c and 154d. The primary candidate frames 150e and 150f remain as detection frames, but are extremely small and can be considered as noise.

そこで本実施形態においては、フィルタ部122が、現フレームにおいて検出された1または複数の検出枠に対し、所定の面積または縦横比を満たさない検出枠を除去する(ASF:Area Size Filtering)。すなわち、極端に小さい検出枠や、極端に細長い検出枠を除去する。   Therefore, in the present embodiment, the filter unit 122 removes detection frames that do not satisfy a predetermined area or aspect ratio from one or more detection frames detected in the current frame (ASF: Area Size Filtering). That is, an extremely small detection frame or an extremely long detection frame is removed.

図8(b)の例では、フィルタリング処理によって極端に小さな検出枠(1次候補枠150e、150f)が除去されて、統合した検出枠156a、2次候補枠154c、154dが残っている。なお図8(b)では、これらの最終的な検出枠を、二値画像ではなく現フレームのグレースケール画像に重ねて示している。   In the example of FIG. 8B, extremely small detection frames (primary candidate frames 150e and 150f) are removed by filtering processing, and integrated detection frames 156a, secondary candidate frames 154c and 154d remain. In FIG. 8B, these final detection frames are shown superimposed on the grayscale image of the current frame instead of the binary image.

動画像が移動しながら撮影されたものであること、単眼カメラの画像であること、さらに魚眼レンズや広角レンズを使用することは、ノイズが増える要因となる。そこで上記のフィルタリング処理を行うことにより、ノイズを除去して、移動物体の検出精度を向上させることができる。   The fact that the moving image is taken while moving, the image of a monocular camera, and the use of a fish-eye lens or a wide-angle lens are factors that increase noise. Therefore, by performing the above filtering process, it is possible to remove noise and improve the detection accuracy of the moving object.

移動物体検出部118は、フィルタ部122がフィルタリング処理を施した最終的な検出枠を、記憶部120に登録する(ステップ218)。検出枠はフレームの番号と対応付けて記憶され、任意のフレームの画像に対して検出済みの検出枠を読み出すことができる。特に、上記説明において現フレームの画像処理に前フレームの検出枠を利用したように、次フレームの画像処理に現フレームの検出枠を利用する。また移動物体検出装置100が設定した検出枠は、出力部124によってブレーキングシステム14や不図示のモニター等に送られる。   The moving object detection unit 118 registers the final detection frame subjected to the filtering process by the filter unit 122 in the storage unit 120 (step 218). The detection frame is stored in association with the frame number, and a detection frame that has been detected for an image of an arbitrary frame can be read out. In particular, the detection frame of the current frame is used for image processing of the next frame, like the detection frame of the previous frame is used for image processing of the current frame in the above description. The detection frame set by the moving object detection device 100 is sent to the braking system 14 or a monitor (not shown) by the output unit 124.

背景画像生成部116は、次フレームの画像を処理するときのために、背景画像の生成(更新)を行う(ステップ220)。フレーム取得部112が取得した複数のフレーム画像のうち、1番目のフレーム画像は前景画素の抽出は行われず、背景画像としてのみ用いられる。2番目のフレーム画像から前景画素の抽出を行うとき、1番目のフレーム画像が背景画像に用いられる。3番目以降のフレーム画像から前景画素の抽出を行うとき、背景画像生成部116が生成(更新)した背景画像を用いる。   The background image generation unit 116 generates (updates) a background image for processing the next frame image (step 220). Of the plurality of frame images acquired by the frame acquisition unit 112, the foreground pixels are not extracted from the first frame image and are used only as the background image. When foreground pixels are extracted from the second frame image, the first frame image is used as the background image. When extracting the foreground pixels from the third and subsequent frame images, the background image generated (updated) by the background image generation unit 116 is used.

図9は背景画像の生成について説明する画像例である。背景画像生成部116は、背景画像と現フレームの画像を合成して背景画像を更新し、次フレームを処理する際の背景画像とする。具体例として、図9に示すように、現フレームの輝度を25%に落とした画像と背景画像の輝度を75%に落とした画像を合成して背景画像を生成する。このようにして順繰りに背景画像の合成(更新)を行うことにより、移動しながら撮影された動画像であっても、また移動物体が存在しない状態がない動画像であっても、背景画像を適宜生成することができる。   FIG. 9 is an image example illustrating generation of a background image. The background image generation unit 116 combines the background image and the current frame image to update the background image, and sets it as a background image when processing the next frame. As a specific example, as shown in FIG. 9, a background image is generated by synthesizing an image in which the luminance of the current frame is reduced to 25% and an image in which the luminance of the background image is reduced to 75%. By sequentially combining (updating) the background image in this way, the background image can be obtained even if it is a moving image shot while moving or a moving image without a moving object. It can generate | occur | produce suitably.

また、背景差分法において、学習に基づいた背景モデルの更新は計算コストが高いため、高速な動画像処理に応用が困難であるとされてきた。しかし本実施形態のように過去の背景画像と現フレームの画像を組み合わせることは、計算量が少なくて済むため、システム全体として計算コストの効率化を図ることができる。   In addition, in the background subtraction method, updating the background model based on learning has a high calculation cost, so that it has been difficult to apply to high-speed moving image processing. However, combining the past background image and the current frame image as in this embodiment requires a small amount of calculation, so that the calculation cost can be improved as a whole system.

背景画像の生成が完了すると、次のフレーム画像があるか否かを判定する(ステップ222)。次フレームの画像があれば上記一連の処理を繰り返す。次フレームの画像がなければ処理を終了する。   When the generation of the background image is completed, it is determined whether there is a next frame image (step 222). If there is an image of the next frame, the above series of processing is repeated. If there is no next frame image, the process is terminated.

上記説明したように、本実施形態にかかる移動物体検出装置および移動物体検出方法によれば、現フレームの候補枠に対して、前フレームの検出枠と重なった範囲内で統合と分離を行う。移動物体の種類や距離を判定する必要がなく、またノイズが多くても候補枠の統合と分離を行うことができる。   As described above, according to the moving object detection device and the moving object detection method according to the present embodiment, the candidate frame of the current frame is integrated and separated within the range overlapping the detection frame of the previous frame. It is not necessary to determine the type and distance of the moving object, and the candidate frames can be integrated and separated even if there is a lot of noise.

これにより安価な単眼カメラの画像であっても、そして車載カメラのように移動しながら撮影した画像であっても、移動物体に適切に対応した検出枠を設定することができる。また、背景差分法は高速に処理可能であり、また上記の候補枠の統合と分離の処理やフィルタリング処理も高速に処理可能である。したがって、接近する移動物体を高い精度で高速に検出することができ、安全性の向上を図ることができる。   As a result, it is possible to set a detection frame appropriately corresponding to a moving object, whether it is an image of an inexpensive monocular camera or an image taken while moving like an in-vehicle camera. The background subtraction method can be processed at high speed, and the above-described candidate frame integration and separation processing and filtering processing can also be processed at high speed. Therefore, a moving object approaching can be detected at high speed with high accuracy, and safety can be improved.

特に、統合と分離のアルゴリズムがシンプルであるため、従来の単なる背景差分法と比較すると、移動物体の検出率を大幅に上げたにもかかわらず、計算量の増加が少ない。従来技術と比較して本手法は実用性が高く、技術的な優位性も十分に高い。また本発明では1つの単眼カメラだけを使用するため、複数のカメラやレーザーレーダや赤外カメラ等を使用するような従来手法と比較すると、コスト面で大きな優位性がある。   In particular, since the integration and separation algorithms are simple, the amount of calculation is small compared with the conventional simple background subtraction method, although the detection rate of moving objects is greatly increased. Compared with the prior art, this method has high practicality and sufficiently high technical superiority. In addition, since only one monocular camera is used in the present invention, there is a significant cost advantage compared to conventional methods using a plurality of cameras, laser radars, infrared cameras, and the like.

本発明は、出合い頭における交通事故を防ぐ車載の安全運転システムや、ロボットなどの移動装置の自動走行システムへの応用が可能である。また自動車やロボットなどに搭載されるシステムに限定されず、広角防犯カメラを用いた固定設置の監視システムに応用することもできる。   INDUSTRIAL APPLICABILITY The present invention can be applied to an in-vehicle safe driving system that prevents a traffic accident at the head of a meeting or an automatic traveling system of a mobile device such as a robot. Further, the present invention is not limited to a system mounted on an automobile or a robot, and can be applied to a fixed installation monitoring system using a wide-angle security camera.

[第2実施形態]
本発明にかかる移動物体検出装置および移動物体検出方法の第2実施形態について説明する。上記第1実施形態においては、フィルタ部122が所定の面積または縦横比を満たさない検出枠を除去する(ASF)ように説明した。これに対し本実施形態においては、ASFに代えて、またはASFに追加して、地平線を検出し、現フレームにおいて検出された1または複数の検出枠に対し、地平線に所定の割合で重なっていない検出枠を除去する(HLF:Horizontal Line Filtering)。
[Second Embodiment]
A second embodiment of the moving object detection device and the moving object detection method according to the present invention will be described. In the first embodiment, it has been described that the filter unit 122 removes a detection frame that does not satisfy a predetermined area or aspect ratio (ASF). In contrast, in the present embodiment, the horizon is detected instead of or in addition to the ASF, and one or more detection frames detected in the current frame are not overlapped with the horizon at a predetermined rate. The detection frame is removed (HLF: Horizontal Line Filtering).

図10は地平線を用いたフィルタリング処理について説明する画像例である。図10(a)は二値化画像と検出枠(統合と分離まで完了したもの)を示している。図10(b)は現フレームのグレースケール画像にフィルタリング処理後の検出枠を重ねて示している。   FIG. 10 is an image example illustrating filtering processing using the horizon. FIG. 10A shows a binarized image and a detection frame (completed until integration and separation). FIG. 10B shows the detection frame after filtering processing superimposed on the grayscale image of the current frame.

図10(a)を図10(b)と対比するとわかるように、車載カメラなどで移動しながら撮影した動画像においては、下方については道路標示や横断歩道(横断歩道の検出枠160b)、上方については建物や看板、信号機、電線、街路灯など(看板の検出枠160c、電線の検出枠160d、街路灯の検出枠160e)も移動物体として検知してしまう可能性がある。しかし本発明において検出したい移動体は、歩行者や自動車など地上を移動するもの(自動車の検出枠160a)である。   As can be seen by comparing FIG. 10 (a) with FIG. 10 (b), in moving images taken while moving with an in-vehicle camera or the like, road markings and pedestrian crossings (pedestrian crossing detection frame 160b) are shown below. There is also a possibility that buildings, signboards, traffic lights, electric wires, street lights, etc. (signboard detection frame 160c, electric wire detection frame 160d, street light detection frame 160e) may also be detected as moving objects. However, the moving body to be detected in the present invention is one that moves on the ground such as a pedestrian or automobile (automobile detection frame 160a).

そこで図10(c)に示す判定式のように、総ての検出枠160について、地平線HLによって分断される面積a、bを取得し、地平線HLに所定の割合で重なっていない検出枠を除去する。本実施形態では、判定式:|a−b|/(a+b)≦0.6となる検出枠を残し(Correct=1)、それ以外の検出枠は除去する(Correct=0)。   Therefore, as in the determination formula shown in FIG. 10C, the areas a and b divided by the horizon HL are obtained for all the detection frames 160, and the detection frames that do not overlap the horizon HL at a predetermined ratio are removed. To do. In the present embodiment, a detection frame that satisfies the determination formula: | a−b | / (a + b) ≦ 0.6 is left (correct = 1), and other detection frames are removed (correct = 0).

判定式の具体例として、地平線HLが検出枠の中央を通るとき、a=bであるから判定式の値は0となり、Correct=1となってその検出枠160は残る。地平線HLが検出枠に重ならないとき、判定式の値は1となり、Correct=0となってその検出枠160は除去される。   As a specific example of the determination formula, when the horizon HL passes through the center of the detection frame, since a = b, the value of the determination formula is 0 and Correct = 1, and the detection frame 160 remains. When the horizon HL does not overlap the detection frame, the value of the determination formula is 1, and Correct = 0 and the detection frame 160 is removed.

なお閾値を0.6としたのは一例であって、閾値の数値は適宜定めてよい。例えば|a−b|/(a+b)<1としてもよい。この場合、検出枠に地平線HLが全く重なっていない検出枠のみが除去される。   Note that the threshold value is set to 0.6, and the threshold value may be set as appropriate. For example, it may be | a−b | / (a + b) <1. In this case, only the detection frame in which the horizon HL does not overlap the detection frame at all is removed.

このようにして、移動体でない検出枠160を適切かつ高速な処理で除去することができる。これにより危険回避のために検出したい移動物体の検出精度を高めることができる。   In this way, the detection frame 160 that is not a moving body can be removed by appropriate and high-speed processing. As a result, it is possible to increase the detection accuracy of a moving object that is desired to be detected for avoiding danger.

地平線を検出するための手法はさまざまなものが考えられるが、本実施形態では地平線の検出に遺伝的アルゴリズムを用いて地平線を検出する。遺伝的アルゴリズムは常に局所的に良好な解を複数保持しながら解の改良を図る多点探索であることから、大域的に最良の解を探索しうるため、最も好ましい方法である。これにより、建物や道路の形状に邪魔されて簡単にはわかりにくい地平線を、高い精度で検出することができる。   There are various methods for detecting the horizon. In this embodiment, the horizon is detected by using a genetic algorithm for detecting the horizon. The genetic algorithm is the most preferable method because it is a multi-point search that always improves a solution while maintaining a plurality of good solutions locally, so that the best solution can be searched globally. As a result, it is possible to detect with high accuracy a horizon that is obstructed by the shape of the building or road and is not easily understood.

図11は遺伝的アルゴリズムの条件等を説明する図である。以下に説明する地平線の検出を簡潔に説明すると、路面とそれ以外(建物等の構造物や空など)との境界線を遺伝的アルゴリズムによって検出することにより、これを地平線とする。P(x,y)は地平線上のi番目のピクセル(点)である。xは地平線上のi番目の点のx座標である。yは地平線上のi番目の点のy座標であり、ベースラインの高さB+定数a+変数bで表される。そして、a,b,b,…bを遺伝的アルゴリズムの染色体とする。 FIG. 11 is a diagram for explaining conditions and the like of the genetic algorithm. Briefly explaining the detection of the horizon described below, a boundary line between the road surface and other areas (such as a structure such as a building or the sky) is detected by a genetic algorithm, and this is defined as the horizon. P i (x i , y i ) is the i-th pixel (point) on the horizon. x i is the x coordinate of the i th point on the horizon. y i is the y coordinate of the i th point on the horizon, and is represented by the baseline height B + constant a + variable b i . Then, a, b 0 , b 1 ,... B M are set as the chromosomes of the genetic algorithm.

図12は遺伝的アルゴリズムのフローチャートである。フィルタ部122は、まず所定の初期値を用いてアルゴリズムを初期化する(ステップ250)。アルゴリズムの初期値は、一例として、世代数50、初期個体数50、交叉レート0.7、突然変異レート0.01としてよい。   FIG. 12 is a flowchart of the genetic algorithm. The filter unit 122 first initializes the algorithm using a predetermined initial value (step 250). For example, the initial value of the algorithm may be 50 generations, 50 initial individuals, 0.7 crossover rate, and 0.01 mutation rate.

次に初期個体に仮パラメータを与えて、地平線の候補線を生成する(ステップ252)。遺伝的アルゴリズムのロジックに基づいて交叉と突然変異を繰り返しながら、候補線の目的関数に対する適合度の評価を行う(ステップ254)。なお、遺伝的アルゴリズムにおける交叉と突然変異については既知の技術であるため、ここでの詳述は省略する。   Next, provisional parameters are given to the initial individual to generate a horizon candidate line (step 252). The fitness of the candidate line with respect to the objective function is evaluated while repeating crossover and mutation based on the logic of the genetic algorithm (step 254). Since crossover and mutation in the genetic algorithm are known techniques, detailed description thereof is omitted here.

図13は遺伝的アルゴリズムの目的関数を説明する図である。目的関数Fは、閾値を超えるピクセル値の差が認められるピクセルDiff(j,x)の個数である。jは評価幅であり、評価範囲Lが最大値である。xはピクセルP(x,y)とPi+1(xi+1,yi+1)の中間位置のx座標である。yはピクセルPのy座標を線形補間(1次方程式)によって表したxの関数である。 FIG. 13 is a diagram for explaining an objective function of the genetic algorithm. The objective function F is the number of pixels Diff (j, x) where a difference in pixel values exceeding a threshold value is recognized. j is an evaluation width, and the evaluation range L is the maximum value. x is an x coordinate of an intermediate position between the pixels P i (x i , y i ) and P i + 1 (x i + 1 , y i + 1 ). y x is a function of x representing the y coordinate of the pixel P by linear interpolation (linear equation).

i番目のピクセルP(x,y)のピクセル値(グレースケール値)をP(x,y)と表す。差が認められるピクセルDiff(j,x)の判定は、ピクセル値の差|P(x,y+j)−P(x,y−j)|が閾値以上であれば1、閾値未満であれば0とする。DiffTB(j,x)は、y軸方向に上下2j離れた位置のピクセル値を比較して、閾値以上にピクセル値(グレースケール値)が異なっていれば1となる。したがって目的関数Fは、染色体a,b,b,…bによって形成する地平線が路面とそれ以外との境界線に沿っているほど値が大きくなる。換言すれば、この遺伝的アルゴリズムによる地平線検出は、路面の上縁の輪郭抽出である。 represents i th pixel P i (x i, y i) the pixel value of the (gray scale value) P (x i, y i ) and. The determination of the pixel Diff (j, x) where the difference is recognized is 1 if the pixel value difference | P (x, y x + j) −P (x, y x −j) | 0 if there is. DiffTB (j, x) is 1 when the pixel values (grayscale values) differ by more than a threshold value by comparing pixel values at positions 2j above and below in the y-axis direction. Therefore, the value of the objective function F increases as the horizon formed by the chromosomes a, b 0 , b 1 ,... B M extends along the boundary line between the road surface and the rest. In other words, the horizon detection by this genetic algorithm is the contour extraction of the upper edge of the road surface.

また評価関数FにあるDiffTN、DiffBNは、それぞれP(x,y−j)、P(x,y+j)と隣の(次の)ピクセルとでピクセル値を比較している。これにより評価関数Fは、水平線(横線)のみでなく建物等の輪郭(縦線)にさしかかった場合も値が大きくなる。横線と縦線の交点で値が高くなるため、すなわち建物と地面との交点で値が高くなる。これにより地平線検出の精度を向上させることができる。 DiffTN and DiffBN in the evaluation function F compare pixel values of P (x, y x −j) and P (x, y x + j) and the next (next) pixel, respectively. As a result, the value of the evaluation function F increases not only when it reaches the horizontal line (horizontal line) but also the outline (vertical line) of a building or the like. Since the value increases at the intersection of the horizontal line and the vertical line, that is, the value increases at the intersection of the building and the ground. Thereby, the accuracy of horizon detection can be improved.

フィルタ部122は、所定の世代数の計算を終えると、選択された候補線を地平線として出力する(ステップ256)。出力された地平線は、図10(c)で説明した判定式に使用する。   When finishing the calculation of the predetermined number of generations, the filter unit 122 outputs the selected candidate line as a horizon line (step 256). The output horizon is used in the determination formula described in FIG.

そしてフィルタ部122は、次フレームがあるか否かを判定し(ステップ258)、次フレームがあれば遺伝的アルゴリズムによる地平線検出を繰り返し、次フレームがなければ地平線検出の処理を終了する。   Then, the filter unit 122 determines whether there is a next frame (step 258). If there is a next frame, the horizon detection by the genetic algorithm is repeated, and if there is no next frame, the horizon detection processing is terminated.

遺伝的アルゴリズムを用いた地平線の検出は、1枚の画像に対して処理を行うことが可能である。この場合、総てのフレームに対して処理を行ってもよいが、一定時間おきのフレームに対して行うことによって大幅に高速化を図ることができる。また、画像に変化がない間は一定時間おきに処理し、画像が大幅に変化したときにも処理を行うことにより、処理の高速化と精度の向上を図ることができる。   Detection of the horizon using a genetic algorithm can be performed on a single image. In this case, the processing may be performed for all the frames, but the speed can be significantly increased by performing the processing for the frames at regular intervals. Further, when the image is not changed, processing is performed at regular intervals, and processing is performed even when the image is significantly changed, so that the processing speed can be increased and the accuracy can be improved.

また、加速度センサを搭載したり、ナビゲーションシステムから加速度センサの信号を受け取れるのであれば、角を曲がったときや上り下りが変化したときにも処理してよい。これにより地平線の変化に追従しやすくなり、検出精度の向上を図ることができる。   In addition, if an acceleration sensor is mounted or an acceleration sensor signal can be received from the navigation system, processing may be performed when turning a corner or when the up / down direction changes. This makes it easier to follow changes in the horizon and improve detection accuracy.

また遺伝的アルゴリズムを用いた地平線の検出は、前フレームの演算結果を用いる(前フレームの画像を用いるのではない)ことによって高速化と精度の向上を図ることができる。具体的には、前フレームにおいて算出した最適解を含む遺伝的アルゴリズムのすべての個体の染色体情報を初期個体集団の初期の染色体として用いて演算を行う(進化的動画像処理)。特に総てのフレームに対して処理を行うとき、または短時間おきのフレームに対して処理を行うときには、画像内での地平線の移動はわずかであるため、前フレームの演算結果を用いれば最適解までの収束が極めて短時間となる。したがって、車載コンピュータのCPUでもリアルタイム処理に十分な速度で演算することができ、地平線を検出しつづけることが可能となる。   In addition, the detection of the horizon using a genetic algorithm can improve the speed and accuracy by using the calculation result of the previous frame (not using the image of the previous frame). Specifically, the calculation is performed using the chromosome information of all individuals of the genetic algorithm including the optimal solution calculated in the previous frame as the initial chromosome of the initial individual population (evolutionary moving image processing). In particular, when processing is performed on all frames, or when processing is performed on frames at short intervals, the movement of the horizon in the image is slight. Convergence up to is extremely short. Therefore, the CPU of the in-vehicle computer can calculate at a speed sufficient for real-time processing, and can continue to detect the horizon.

第2実施形態によれば、地平線に所定の割合で重なっていない検出枠を除去することにより、移動物体の検出精度を高めることができる。また、地平線の検出に遺伝的アルゴリズムを用いることにより、地平線を高い精度で検出することができる。   According to the second embodiment, the detection accuracy of the moving object can be improved by removing the detection frame that does not overlap the horizon at a predetermined rate. Further, by using a genetic algorithm for detecting the horizon, the horizon can be detected with high accuracy.

本発明は、単眼カメラの動画像から移動物体を高い精度で高速に検出することが可能な、安価で安全性の高い移動物体検出装置および移動物体検出方法として利用することができる。   INDUSTRIAL APPLICABILITY The present invention can be used as an inexpensive and highly safe moving object detection apparatus and moving object detection method capable of detecting a moving object with high accuracy and high speed from a moving image of a monocular camera.

10…自動車、12…車載カメラ、14…ブレーキングシステム、100…移動物体検出装置、110…入力部、112…フレーム取得部、114…前処理部、116…背景画像生成部、118…移動物体検出部、120…記憶部、122…フィルタ部、124…出力部、150…1次候補枠、152…前フレームの検出枠、154…2次候補枠、156…統合した検出枠、160…検出枠 DESCRIPTION OF SYMBOLS 10 ... Automobile, 12 ... Car-mounted camera, 14 ... Braking system, 100 ... Moving object detection apparatus, 110 ... Input part, 112 ... Frame acquisition part, 114 ... Pre-processing part, 116 ... Background image generation part, 118 ... Moving object Detection unit, 120 ... storage unit, 122 ... filter unit, 124 ... output unit, 150 ... primary candidate frame, 152 ... detection frame of previous frame, 154 ... secondary candidate frame, 156 ... integrated detection frame, 160 ... detection frame

Claims (6)

動画像を入力する入力部と、
動画像から連続的に複数のフレーム画像を取り出すフレーム取得部と、
前記移動物体に検出枠を設定する移動物体検出部と、
設定した検出枠を記憶する記憶部とを備え、
前記移動物体検出部は、
現フレームから背景差分法を用いて前景画素を抽出し、
前記前景画素を囲う枠を1次候補枠とし、
前記記憶部から前フレームの検出枠を取得し、
前記1次候補枠のうち、前記前フレームの検出枠と面積が所定以上重なるものを2次候補枠とし、
前記2次候補枠のうち、同じ前フレームの検出枠と重なるものをグループ化し、
グループ化された2次候補枠のうち、y軸方向に所定以上重なるものは統合した検出枠とし、y軸方向に所定以上重ならないものは分離した検出枠とすることを特徴とする移動物体検出装置。
An input unit for inputting a moving image;
A frame acquisition unit that continuously extracts a plurality of frame images from a moving image;
A moving object detection unit for setting a detection frame on the moving object;
A storage unit for storing the set detection frame,
The moving object detector is
Extract foreground pixels from the current frame using the background subtraction method,
A frame surrounding the foreground pixels is a primary candidate frame,
Obtain the detection frame of the previous frame from the storage unit,
Among the primary candidate frames, those that overlap the detection frame of the previous frame by a predetermined amount or more are defined as secondary candidate frames,
Grouping the secondary candidate frames that overlap with the detection frame of the same previous frame,
Among the grouped secondary candidate frames, those that overlap more than a predetermined amount in the y-axis direction are integrated detection frames, and those that do not overlap more than a predetermined amount in the y-axis direction are separated detection frames. apparatus.
前記背景画像と現フレームの画像を合成して背景画像を更新する背景画像生成部をさらに備えることを特徴とする請求項1に記載の移動物体検出装置。   The moving object detection device according to claim 1, further comprising a background image generation unit configured to synthesize the background image and the current frame image to update a background image. 現フレームにおいて検出された1または複数の前記検出枠に対し、所定の面積または縦横比を満たさない検出枠を除去するフィルタ部をさらに備えることを特徴とする請求項1または請求項2に記載の移動物体検出装置。   The filter unit for removing a detection frame that does not satisfy a predetermined area or aspect ratio with respect to one or a plurality of the detection frames detected in a current frame. Moving object detection device. 現フレームにおいて地平線を検出し、
現フレームにおいて検出された1または複数の前記検出枠に対し、前記地平線に所定の割合で重なっていない検出枠を除去するフィルタ部をさらに備えることを特徴とする請求項1から3のいずれか1項に記載の移動物体検出装置。
Detect the horizon in the current frame,
4. The apparatus according to claim 1, further comprising a filter unit that removes a detection frame that does not overlap the horizon at a predetermined ratio with respect to one or a plurality of the detection frames detected in a current frame. The moving object detection device according to item.
前記フィルタ部は、前記地平線の検出に遺伝的アルゴリズムを用いることを特徴とする請求項4に記載の移動物体検出装置。   The moving object detection apparatus according to claim 4, wherein the filter unit uses a genetic algorithm to detect the horizon. 動画像を入力し、
動画像から連続的に複数のフレーム画像を取り出し、
処理対象となるフレーム画像を現フレームとし、その前のフレーム画像を前フレームとしたとき、
現フレームから背景差分法を用いて前景画素を抽出し、
前記前景画素を囲う枠を1次候補枠とし、
前フレームにおける移動物体を囲う検出枠を取得し、
前記1次候補枠のうち、前フレームの検出枠と面積が所定以上重なるものを2次候補枠とし、
前記2次候補枠のうち、同じ前フレームの検出枠と重なるものをグループ化し、
グループ化された2次候補枠のうち、y軸方向に所定以上重なるものは統合した検出枠とし、y軸方向に所定以上重ならないものは分離した検出枠とすることを特徴とする移動物体検出方法。
Enter a video,
Extract multiple frame images from a moving image,
When the frame image to be processed is the current frame and the previous frame image is the previous frame,
Extract foreground pixels from the current frame using the background subtraction method,
A frame surrounding the foreground pixels is a primary candidate frame,
Obtain a detection frame that surrounds the moving object in the previous frame,
Among the primary candidate frames, those that overlap the detection frame of the previous frame by a predetermined amount or more are defined as secondary candidate frames,
Grouping the secondary candidate frames that overlap with the detection frame of the same previous frame,
Among the grouped secondary candidate frames, those that overlap more than a predetermined amount in the y-axis direction are integrated detection frames, and those that do not overlap more than a predetermined amount in the y-axis direction are separated detection frames. Method.
JP2017178431A 2017-09-17 2017-09-17 Moving object detection device and moving object detection method Active JP7018607B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017178431A JP7018607B2 (en) 2017-09-17 2017-09-17 Moving object detection device and moving object detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017178431A JP7018607B2 (en) 2017-09-17 2017-09-17 Moving object detection device and moving object detection method

Publications (2)

Publication Number Publication Date
JP2019053625A true JP2019053625A (en) 2019-04-04
JP7018607B2 JP7018607B2 (en) 2022-02-14

Family

ID=66015164

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017178431A Active JP7018607B2 (en) 2017-09-17 2017-09-17 Moving object detection device and moving object detection method

Country Status (1)

Country Link
JP (1) JP7018607B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111781600A (en) * 2020-06-18 2020-10-16 重庆工程职业技术学院 Vehicle queuing length detection method suitable for signalized intersection scene
US11024042B2 (en) 2018-08-24 2021-06-01 Incorporated National University Iwate University; Moving object detection apparatus and moving object detection method
CN113344967A (en) * 2021-06-07 2021-09-03 哈尔滨理工大学 Dynamic target identification tracking method under complex background
CN113361299A (en) * 2020-03-03 2021-09-07 浙江宇视科技有限公司 Abnormal parking detection method and device, storage medium and electronic equipment
CN113379984A (en) * 2020-02-25 2021-09-10 北京君正集成电路股份有限公司 Electronic nursing fence system
CN113379985A (en) * 2020-02-25 2021-09-10 北京君正集成电路股份有限公司 Nursing electronic fence alarm device
JP7360303B2 (en) 2019-11-08 2023-10-12 株式会社デンソーテン Image processing device and image processing method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10108198A (en) * 1996-09-30 1998-04-24 Sanyo Electric Co Ltd Image area integration method
JPH1115982A (en) * 1997-06-24 1999-01-22 Nippon Denki Denpa Kiki Eng Kk Method for detecting moving object
JP2006053692A (en) * 2004-08-10 2006-02-23 Riyuukoku Univ Image processor, image processing method and image processing program in moving image, and recording medium recording the program
JP2011243154A (en) * 2010-05-21 2011-12-01 Mitsubishi Electric Corp Device and method for detecting vehicle
JP2013207393A (en) * 2012-03-27 2013-10-07 Secom Co Ltd Image monitoring device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10108198A (en) * 1996-09-30 1998-04-24 Sanyo Electric Co Ltd Image area integration method
JPH1115982A (en) * 1997-06-24 1999-01-22 Nippon Denki Denpa Kiki Eng Kk Method for detecting moving object
JP2006053692A (en) * 2004-08-10 2006-02-23 Riyuukoku Univ Image processor, image processing method and image processing program in moving image, and recording medium recording the program
JP2011243154A (en) * 2010-05-21 2011-12-01 Mitsubishi Electric Corp Device and method for detecting vehicle
JP2013207393A (en) * 2012-03-27 2013-10-07 Secom Co Ltd Image monitoring device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11024042B2 (en) 2018-08-24 2021-06-01 Incorporated National University Iwate University; Moving object detection apparatus and moving object detection method
JP7360303B2 (en) 2019-11-08 2023-10-12 株式会社デンソーテン Image processing device and image processing method
CN113379984A (en) * 2020-02-25 2021-09-10 北京君正集成电路股份有限公司 Electronic nursing fence system
CN113379985A (en) * 2020-02-25 2021-09-10 北京君正集成电路股份有限公司 Nursing electronic fence alarm device
CN113379984B (en) * 2020-02-25 2022-09-23 北京君正集成电路股份有限公司 Electronic nursing fence system
CN113379985B (en) * 2020-02-25 2022-09-27 北京君正集成电路股份有限公司 Nursing electronic fence alarm device
CN113361299A (en) * 2020-03-03 2021-09-07 浙江宇视科技有限公司 Abnormal parking detection method and device, storage medium and electronic equipment
CN113361299B (en) * 2020-03-03 2023-08-15 浙江宇视科技有限公司 Abnormal parking detection method and device, storage medium and electronic equipment
CN111781600A (en) * 2020-06-18 2020-10-16 重庆工程职业技术学院 Vehicle queuing length detection method suitable for signalized intersection scene
CN111781600B (en) * 2020-06-18 2023-05-30 重庆工程职业技术学院 Vehicle queuing length detection method suitable for signalized intersection scene
CN113344967A (en) * 2021-06-07 2021-09-03 哈尔滨理工大学 Dynamic target identification tracking method under complex background
CN113344967B (en) * 2021-06-07 2023-04-07 哈尔滨理工大学 Dynamic target identification tracking method under complex background

Also Published As

Publication number Publication date
JP7018607B2 (en) 2022-02-14

Similar Documents

Publication Publication Date Title
JP7018607B2 (en) Moving object detection device and moving object detection method
JP7104916B2 (en) Moving object detection device and moving object detection method
JP6398347B2 (en) Image processing apparatus, recognition object detection method, recognition object detection program, and moving object control system
JP6519262B2 (en) Three-dimensional object detection device, three-dimensional object detection method, three-dimensional object detection program, and mobile device control system
US9773176B2 (en) Image processing apparatus and image processing method
JP2013109760A (en) Target detection method and target detection system
JP6601506B2 (en) Image processing apparatus, object recognition apparatus, device control system, image processing method, image processing program, and vehicle
US10803605B2 (en) Vehicle exterior environment recognition apparatus
WO2006068223A1 (en) Image processor
WO2019110824A1 (en) Using silhouette for fast object recognition
WO2018211930A1 (en) Object detection device, object detection method, and computer-readable recording medium
JP6572696B2 (en) Image processing apparatus, object recognition apparatus, device control system, image processing method and program
JP2006318059A (en) Apparatus, method, and program for image processing
JP2006318060A (en) Apparatus, method, and program for image processing
WO2017047282A1 (en) Image processing device, object recognition device, device control system, image processing method, and program
JP2006318062A (en) Image processor, image processing method and image processing program
CN109522779B (en) Image processing apparatus and method
JP6683245B2 (en) Image processing device, image processing method, image processing program, object recognition device, and device control system
JP2009037476A (en) Vehicle periphery monitoring device, vehicle periphery monitoring method, and program for monitoring vehicle periphery
JP4788399B2 (en) Pedestrian detection method, apparatus, and program
JP2006318061A (en) Apparatus, method, and program for image processing
JP5195377B2 (en) Lane boundary deriving device
JP2019114150A (en) Extravehicular environment recognition device
JP6569416B2 (en) Image processing apparatus, object recognition apparatus, device control system, image processing method, and image processing program
JP2007140828A (en) Sign recognition method

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20180612

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200831

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20200831

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210928

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211129

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20220111

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220121

R150 Certificate of patent or registration of utility model

Ref document number: 7018607

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150