JP6188592B2 - Object detection apparatus, object detection method, and object detection program - Google Patents

Object detection apparatus, object detection method, and object detection program Download PDF

Info

Publication number
JP6188592B2
JP6188592B2 JP2014008472A JP2014008472A JP6188592B2 JP 6188592 B2 JP6188592 B2 JP 6188592B2 JP 2014008472 A JP2014008472 A JP 2014008472A JP 2014008472 A JP2014008472 A JP 2014008472A JP 6188592 B2 JP6188592 B2 JP 6188592B2
Authority
JP
Japan
Prior art keywords
motion vector
region
image
detected
unit
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.)
Expired - Fee Related
Application number
JP2014008472A
Other languages
Japanese (ja)
Other versions
JP2015138319A (en
Inventor
亜紀 木村
亜紀 木村
悟崇 奥田
悟崇 奥田
由佳 津田
由佳 津田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2014008472A priority Critical patent/JP6188592B2/en
Publication of JP2015138319A publication Critical patent/JP2015138319A/en
Application granted granted Critical
Publication of JP6188592B2 publication Critical patent/JP6188592B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Description

本発明は、カメラによって撮影された画像から物体領域を検出する物体検出装置、物体検出方法、および物体検出プログラムに関する。   The present invention relates to an object detection device, an object detection method, and an object detection program for detecting an object region from an image photographed by a camera.

自動車などの車両の運転を支援するために、例えば車両にカメラを設置し、カメラで撮影された画像から車両の障害となりうる物体を検出する技術がある。   In order to support driving of a vehicle such as an automobile, for example, there is a technique in which a camera is installed in a vehicle and an object that can be an obstacle of the vehicle is detected from an image captured by the camera.

特許文献1には、カメラにより撮像された複数の画像間の動きベクトルを検出し、検出された動きベクトルから自車の移動パラメータと背景ベクトルとを検出し、背景ベクトルとして検出されなかった動きベクトルを物体ベクトルとして扱い、この物体ベクトルから物体を検出し、得られた物体の接近状況に応じて運転者に警告を行う技術が開示されている。   In Patent Document 1, a motion vector between a plurality of images captured by a camera is detected, a movement parameter and a background vector of the own vehicle are detected from the detected motion vector, and a motion vector that is not detected as a background vector Is detected as an object vector, an object is detected from the object vector, and a warning is disclosed to the driver according to the approaching state of the obtained object.

特開2013−97390号公報JP 2013-97390 A

しかし、カメラにより撮影された複数の画像から動きベクトルを検出し、検出された動きベクトルのみに基づいて物体領域を検出する構成では、物体領域を正確に検出することができない。   However, in a configuration in which a motion vector is detected from a plurality of images taken by a camera and an object region is detected based only on the detected motion vector, the object region cannot be accurately detected.

本発明は、動きベクトルのみに基づいて物体領域を検出する場合と比べて、正確に物体領域を検出することができる物体検出装置、物体検出方法、および物体検出プログラムを提供することを目的とする。   It is an object of the present invention to provide an object detection device, an object detection method, and an object detection program that can detect an object region more accurately than when detecting an object region based only on a motion vector. .

本発明に係る物体検出装置は、カメラにより順次撮影された複数の画像を取得する画像取得部と、前記画像取得部により取得された複数の画像のうちの対象画像および少なくとも1つの参照画像から、前記対象画像の各部分の動きベクトルを検出する動きベクトル検出部と、前記画像取得部により取得された複数の画像のうちの2つの画像間の差分画像を算出する差分算出部と、前記動きベクトル検出部により検出された動きベクトルと、前記差分算出部により算出された差分画像とに基づいて、物体が存在する物体領域を検出する物体検出部とを備え、前記物体検出部は、前記動きベクトルに基づいて前記対象画像から物体の領域を検出する領域検出部と、前記差分画像から物体の輪郭を抽出する輪郭抽出部と、前記領域検出部により検出された領域に対応する、前記輪郭抽出部により抽出された輪郭で囲まれた領域を、前記物体領域として検出する物体領域検出部とを有することを特徴とする。 An object detection device according to the present invention includes an image acquisition unit that acquires a plurality of images sequentially captured by a camera, and a target image and at least one reference image among the plurality of images acquired by the image acquisition unit, A motion vector detection unit that detects a motion vector of each part of the target image, a difference calculation unit that calculates a difference image between two images of the plurality of images acquired by the image acquisition unit, and the motion vector An object detection unit that detects an object region in which an object exists based on the motion vector detected by the detection unit and the difference image calculated by the difference calculation unit ; and the object detection unit includes the motion vector Based on the target image, a region detection unit that detects a region of the object, a contour extraction unit that extracts a contour of the object from the difference image, and a detection by the region detection unit Corresponding to the region, the region surrounded by the contour extracted by the contour extracting unit, and having a body area detection unit for detecting as the object region.

本発明に係る物体検出方法は、カメラにより順次撮影された複数の画像を取得する画像取得ステップと、前記画像取得ステップで取得された複数の画像のうちの対象画像および少なくとも1つの参照画像から、前記対象画像の各部分の動きベクトルを検出する動きベクトル検出ステップと、前記画像取得ステップで取得された複数の画像のうちの2つの画像間の差分画像を算出する差分算出ステップと、前記動きベクトル検出ステップで検出された動きベクトルと、前記差分算出ステップで算出された差分画像とに基づいて、物体が存在する物体領域を検出する物体検出ステップとを含み、前記物体検出ステップは、前記動きベクトルに基づいて前記対象画像から物体の領域を検出する領域検出ステップと、前記差分画像から物体の輪郭を抽出する輪郭抽出ステップと、前記領域検出ステップで検出された領域に対応する、前記輪郭抽出ステップで抽出された輪郭で囲まれた領域を、前記物体領域として検出する物体領域検出ステップとを有することを特徴とする。 The object detection method according to the present invention includes an image acquisition step of acquiring a plurality of images sequentially captured by a camera, a target image and at least one reference image among the plurality of images acquired in the image acquisition step, A motion vector detection step for detecting a motion vector of each part of the target image, a difference calculation step for calculating a difference image between two images of the plurality of images acquired in the image acquisition step, and the motion vector a motion vector detected in the detection step, the based on the difference image calculated by the difference calculation step, seen including a object detection step of detecting an object area where an object exists, the object detection step, the motion A region detecting step of detecting a region of the object from the target image based on the vector; and extracting an outline of the object from the difference image. To a contour extraction step, corresponding to the detected in the area detecting step region, a region surrounded by the extracted at the contour extraction step contour, in that it has an object area detection step of detecting as said object area Features.

本発明に係る物体検出プログラムは、カメラにより順次撮影された複数の画像を取得する画像取得ステップと、前記画像取得ステップで取得された複数の画像のうちの対象画像および少なくとも1つの参照画像から、前記対象画像の各部分の動きベクトルを検出する動きベクトル検出ステップと、前記画像取得ステップで取得された複数の画像のうちの2つの画像間の差分画像を算出する差分算出ステップと、前記動きベクトル検出ステップで検出された動きベクトルと、前記差分算出ステップで算出された差分画像とに基づいて、物体が存在する物体領域を検出する物体検出ステップとをコンピュータに実行させ、前記物体検出ステップは、前記動きベクトルに基づいて前記対象画像から物体の領域を検出する領域検出ステップと、前記差分画像から物体の輪郭を抽出する輪郭抽出ステップと、前記領域検出ステップで検出された領域に対応する、前記輪郭抽出ステップで抽出された輪郭で囲まれた領域を、前記物体領域として検出する物体領域検出ステップとを有することを特徴とする。 The object detection program according to the present invention includes an image acquisition step of acquiring a plurality of images sequentially captured by a camera, a target image and at least one reference image among the plurality of images acquired in the image acquisition step, A motion vector detection step for detecting a motion vector of each part of the target image, a difference calculation step for calculating a difference image between two images of the plurality of images acquired in the image acquisition step, and the motion vector Based on the motion vector detected in the detection step and the difference image calculated in the difference calculation step, the computer executes an object detection step for detecting an object region where the object exists , and the object detection step includes: A region detecting step of detecting a region of an object from the target image based on the motion vector; and the difference An object region for detecting, as the object region, a region surrounded by the contour extracted in the contour extraction step, which corresponds to the region detected in the region detection step and a contour extraction step for extracting the contour of the object from the image And a detecting step .

本発明によれば、動きベクトルに加えて差分画像に基づいて物体領域を検出することにより、動きベクトルのみに基づいて物体領域を検出する場合と比べて、正確に物体領域を検出することができる。   According to the present invention, by detecting an object region based on a difference image in addition to a motion vector, the object region can be detected more accurately than when detecting an object region based only on a motion vector. .

実施の形態1に係る物体検出装置を含む物体検出システムの構成の一例を示すブロック図である。1 is a block diagram illustrating an example of a configuration of an object detection system including an object detection device according to Embodiment 1. FIG. (a)〜(c)は、画素単位の動きベクトルを検出する処理を説明するための図である。(A)-(c) is a figure for demonstrating the process which detects the motion vector of a pixel unit. 動きベクトルの検出結果の一例を示す図である。It is a figure which shows an example of the detection result of a motion vector. 差分画像の算出処理を説明するための図である。It is a figure for demonstrating the calculation process of a difference image. 動きベクトルの検出結果に基づいて領域を検出する処理を説明するための図である。It is a figure for demonstrating the process which detects an area | region based on the detection result of a motion vector. 差分画像から輪郭を抽出する処理を説明するための図である。It is a figure for demonstrating the process which extracts an outline from a difference image. 物体領域を検出する処理を説明するための図である。It is a figure for demonstrating the process which detects an object area | region. 実施の形態1に係る物体検出装置による障害物検出処理の一例を示すフローチャートである。6 is a flowchart illustrating an example of an obstacle detection process performed by the object detection device according to the first embodiment. 図8のステップS3の動きベクトル検出処理の内容を示すフローチャートである。It is a flowchart which shows the content of the motion vector detection process of step S3 of FIG. 図8のステップS5の差分算出処理の内容を示すフローチャートである。It is a flowchart which shows the content of the difference calculation process of step S5 of FIG. 変形例における物体検出装置による障害物検出処理の一例を示すフローチャートである。It is a flowchart which shows an example of the obstruction detection process by the object detection apparatus in a modification. 実施の形態2に係る物体検出装置を含む物体検出システムの構成の一例を示すブロック図である。6 is a block diagram illustrating an example of a configuration of an object detection system including an object detection device according to Embodiment 2. FIG. 実施の形態2における動きベクトル検出処理の内容を示すフローチャートである。10 is a flowchart showing the contents of motion vector detection processing in the second embodiment. 実施の形態3に係る物体検出装置を含む物体検出システムの構成の一例を示すブロック図である。10 is a block diagram illustrating an example of a configuration of an object detection system including an object detection device according to Embodiment 3. FIG. 実施の形態3における物体検出装置による障害物検出処理の一例を示すフローチャートである。14 is a flowchart illustrating an example of an obstacle detection process performed by the object detection device according to the third embodiment.

以下、本発明の実施の形態を図面に従って説明する。
実施の形態1.
図1は、実施の形態1に係る物体検出装置20を含む物体検出システム1の構成の一例を示すブロック図である。この物体検出システム1は、カメラにより撮影された画像から物体を検出するシステムである。本実施の形態では、物体検出システム1は、自動車などの車両に搭載されたカメラによって撮影された画像から車両周辺の障害物を検出する障害物検出システムである。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
Embodiment 1 FIG.
FIG. 1 is a block diagram illustrating an example of a configuration of an object detection system 1 including an object detection device 20 according to the first embodiment. The object detection system 1 is a system that detects an object from an image taken by a camera. In the present embodiment, the object detection system 1 is an obstacle detection system that detects an obstacle around the vehicle from an image taken by a camera mounted on a vehicle such as an automobile.

図1に示されるように、物体検出システム1は、カメラ10、物体検出装置20、および障害物通知部30を備えている。   As shown in FIG. 1, the object detection system 1 includes a camera 10, an object detection device 20, and an obstacle notification unit 30.

カメラ10は、撮影対象領域を順次撮影し、撮影された複数の画像を物体検出装置20に出力する。ここで、画像は、画像データ(または画像信号)である。画像データは、画像を構成する各画素の画素値を表すデータであり、具体的には2次元状に配列された複数の画素の各々の画素値を表すデータである。本実施の形態では、カメラ10は、画像データである画像フレーム(以下、単に「フレーム」という)を出力する。例えば、カメラ10は、所定のフレームレートで撮影を行い、得られたフレームを物体検出装置20に順次出力する。また、カメラ10は、車両に設置されており、車両の周囲を撮影する。例えば、カメラ10は、車両のサイドミラーの位置に車両後方を撮像する方向に取り付けられる。サイドミラーの位置に設置することで、サイドミラーをカメラに置き換えることが可能となる。この場合、サイドミラーよりも広角のカメラを使用することにより、後側方の死角をなくすことが可能となる。   The camera 10 sequentially captures the imaging target area and outputs a plurality of captured images to the object detection device 20. Here, the image is image data (or an image signal). The image data is data representing the pixel value of each pixel constituting the image, specifically, data representing each pixel value of a plurality of pixels arranged in a two-dimensional manner. In the present embodiment, the camera 10 outputs an image frame (hereinafter simply referred to as “frame”) that is image data. For example, the camera 10 captures images at a predetermined frame rate, and sequentially outputs the obtained frames to the object detection device 20. Moreover, the camera 10 is installed in the vehicle and images the surroundings of the vehicle. For example, the camera 10 is attached to the position of the side mirror of the vehicle in the direction of imaging the rear of the vehicle. By installing at the position of the side mirror, the side mirror can be replaced with a camera. In this case, it is possible to eliminate the blind spot on the rear side by using a camera having a wider angle than the side mirror.

物体検出装置20は、カメラ10により撮影された画像を取得し、取得された画像から物体を検出する。本例では、物体検出装置20は、取得された画像から車両周辺の障害物を検出する障害物検出装置である。図1において、物体検出装置20は、画像取得部21、動きベクトル検出部22、差分算出部23、および物体検出部24を有する。   The object detection device 20 acquires an image taken by the camera 10 and detects an object from the acquired image. In this example, the object detection device 20 is an obstacle detection device that detects an obstacle around the vehicle from the acquired image. In FIG. 1, the object detection device 20 includes an image acquisition unit 21, a motion vector detection unit 22, a difference calculation unit 23, and an object detection unit 24.

画像取得部21は、カメラ10により順次撮影された複数のフレームを取得する。画像取得部21は、カメラ10から出力されるフレームをすべて取り込んでもよいし、間引いて取り込んでもよい。例えば、画像取得部21は、30fpsのフレームレートで撮影された複数のフレームを、撮影時と同じフレームレート(すなわちフレーム間隔1/30秒)で取得してもよいし、撮影時と異なるフレームレート(例えば、3フレームに1フレームの割合、すなわちフレーム間隔1/10秒)で取得してもよい。画像取得部21は、取得した複数のフレームを動きベクトル検出部22と差分算出部23とに出力する。   The image acquisition unit 21 acquires a plurality of frames taken sequentially by the camera 10. The image acquisition unit 21 may capture all frames output from the camera 10 or may capture by thinning out. For example, the image acquisition unit 21 may acquire a plurality of frames shot at a frame rate of 30 fps at the same frame rate as that at the time of shooting (that is, a frame interval of 1/30 seconds), or a frame rate different from that at the time of shooting. (For example, it may be acquired at a rate of one frame to three frames, that is, a frame interval of 1/10 seconds). The image acquisition unit 21 outputs the acquired plurality of frames to the motion vector detection unit 22 and the difference calculation unit 23.

動きベクトル検出部22は、画像取得部21により取得された複数の画像から画像の各部分の動きベクトルを検出する。具体的には、動きベクトル検出部22は、入力された複数の画像のうちの対象画像および少なくとも1つの参照画像から、対象画像の各部分の動きベクトルを検出する。動きベクトル検出部22は、検出結果を物体検出部24に出力する。   The motion vector detection unit 22 detects a motion vector of each part of the image from the plurality of images acquired by the image acquisition unit 21. Specifically, the motion vector detection unit 22 detects a motion vector of each part of the target image from the target image and at least one reference image among the plurality of input images. The motion vector detection unit 22 outputs the detection result to the object detection unit 24.

差分算出部23は、画像取得部21により取得された複数の画像のうちの2つの画像間の差分画像を算出する。差分算出部23は、算出結果を物体検出部24に出力する。   The difference calculation unit 23 calculates a difference image between two images among the plurality of images acquired by the image acquisition unit 21. The difference calculation unit 23 outputs the calculation result to the object detection unit 24.

物体検出部24は、動きベクトル検出部22により検出された動きベクトルと、差分算出部23により算出された差分画像とに基づいて、物体が存在する物体領域を検出する。また、物体検出部24は、物体領域を検出した場合に、当該物体領域の位置と当該物体領域内の動きベクトルとに基づき、当該物体領域に存在する物体が車両に対する障害物であるか否かを判定し、これにより車両周辺の障害物を検出する。物体検出部24は、障害物を検出した場合、その旨を障害物通知部30に通知する。このとき、物体検出部24は、障害物と判定された物体の物体領域を通知してもよいし、物体領域から特定される物体の位置または形状を通知してもよい。   The object detection unit 24 detects an object region where an object exists based on the motion vector detected by the motion vector detection unit 22 and the difference image calculated by the difference calculation unit 23. Further, when detecting the object area, the object detection unit 24 determines whether the object existing in the object area is an obstacle to the vehicle based on the position of the object area and the motion vector in the object area. Thus, obstacles around the vehicle are detected. When the object detection unit 24 detects an obstacle, the object detection unit 24 notifies the obstacle notification unit 30 to that effect. At this time, the object detection unit 24 may notify the object area of the object determined to be an obstacle, or may notify the position or shape of the object specified from the object area.

障害物通知部30は、物体検出部24からの通知を受けると、障害物が存在することを車両の運転者に対して通知または警告する。このとき、障害物通知部30は、物体検出部24からの通知に基づき、障害物の物体領域、位置、または形状を運転者に通知してもよい。障害物通知部30は、例えば、表示装置による表示や音声出力装置による音声出力により通知を行う。   When the obstacle notification unit 30 receives the notification from the object detection unit 24, the obstacle notification unit 30 notifies or warns the driver of the vehicle that an obstacle exists. At this time, the obstacle notification unit 30 may notify the driver of the object region, position, or shape of the obstacle based on the notification from the object detection unit 24. The obstacle notification unit 30 performs notification by, for example, display by a display device or sound output by a sound output device.

上記構成において、画像取得部21は、カメラ10からの画像を記憶する画像記憶部21aを含んでもよく、動きベクトル検出部22および差分算出部23は、処理に用いる画像を画像記憶部21aから取得してもよい。   In the above configuration, the image acquisition unit 21 may include an image storage unit 21a that stores an image from the camera 10, and the motion vector detection unit 22 and the difference calculation unit 23 acquire an image used for processing from the image storage unit 21a. May be.

以下、動きベクトル検出部22、差分算出部23、および物体検出部24の構成および処理について、具体的に説明する。   Hereinafter, the configuration and processing of the motion vector detection unit 22, the difference calculation unit 23, and the object detection unit 24 will be specifically described.

動きベクトル検出部22は、画像取得部21から入力された複数のフレームのうちの対象フレームおよび参照フレームから、対象フレームの各部分の動きベクトルを検出する。例えば、対象フレームは現在のフレーム(以下、「現フレーム」という)であり、参照フレームは現フレームよりも時間的に前に撮影されたフレーム(以下、「前フレーム」という)である。本実施の形態では、対象フレームを複数のブロックに分割し、動きベクトル検出部22は、対象フレームのブロック単位で動きベクトルを検出し、検出されたブロック単位の動きベクトルを用いて、対象フレームの画素単位で動きベクトルを検出する。各ブロックは、対象フレームの複数の画素により構成され、例えば矩形状の画素領域である。ブロックのサイズは、適宜決められればよいが、ここでは16×16画素である。   The motion vector detection unit 22 detects a motion vector of each part of the target frame from the target frame and the reference frame among the plurality of frames input from the image acquisition unit 21. For example, the target frame is a current frame (hereinafter referred to as “current frame”), and the reference frame is a frame (hereinafter referred to as “previous frame”) that is captured in time before the current frame. In the present embodiment, the target frame is divided into a plurality of blocks, and the motion vector detection unit 22 detects a motion vector for each block of the target frame, and uses the detected motion vector for each block to detect the target frame. A motion vector is detected in units of pixels. Each block is composed of a plurality of pixels of the target frame, and is, for example, a rectangular pixel region. The block size may be determined as appropriate, but here it is 16 × 16 pixels.

図1の例では、動きベクトル検出部22は、ブロック動きベクトル検出部22aと、画素動きベクトル検出部22bとを有する。   In the example of FIG. 1, the motion vector detection unit 22 includes a block motion vector detection unit 22a and a pixel motion vector detection unit 22b.

ブロック動きベクトル検出部22aは、対象フレームの各ブロックの動きベクトルを検出する。動きベクトルを検出する方法としては、公知の方法を含む様々な方法を利用することができるが、ここではブロックマッチング法を用いる。ブロック動きベクトル検出部22aは、複数のブロックのうちの対象ブロックの動きベクトルを求める場合、参照フレームに探索範囲を設定し、この探索範囲内で対象ブロックと最も類似するブロックを探索し、探索されたブロックの位置から対象ブロックの位置へのベクトルを対象ブロックの動きベクトルとして求める。ブロック動きベクトル検出部22aは、検出結果として、対象フレームの各ブロックの動きベクトルを画素動きベクトル検出部22bに出力する。   The block motion vector detection unit 22a detects a motion vector of each block of the target frame. As a method for detecting a motion vector, various methods including a known method can be used. Here, a block matching method is used. When obtaining a motion vector of a target block among a plurality of blocks, the block motion vector detection unit 22a sets a search range in the reference frame, searches for a block most similar to the target block within the search range, and is searched. A vector from the position of the block to the position of the target block is obtained as a motion vector of the target block. The block motion vector detection unit 22a outputs the motion vector of each block of the target frame to the pixel motion vector detection unit 22b as a detection result.

画素動きベクトル検出部22bは、ブロック動きベクトル検出部22aからの対象フレームの各ブロックの動きベクトルに基づき、対象フレームの各画素の動きベクトルを検出する。画素動きベクトル検出部22bは、ブロック単位の動きベクトルを画素単位の動きベクトルに詳細化する。具体的には、画素動きベクトル検出部22bは、対象フレームのブロックを段階的に小さくしていきながら、ブロック単位の動きベクトルの検出を行い、最終的に画素単位の動きベクトルを検出する。この場合、ブロック単位または画素単位の動きベクトルを検出するとき、その前の段階で検出された動きベクトルに基づいて探索範囲を決定することができる。例えば、画素動きベクトル検出部22bは、16×16画素の各ブロックを8×8画素のブロックに4分割し、8×8画素の各ブロックの動きベクトルを求める。このとき、動きベクトルを求める対象となる8×8画素のブロックが属する16×16画素のブロックの動きベクトルに基づき、動きベクトルを求める際の探索範囲を絞り込む。同様に、8×8画素の各ブロックを4×4画素のブロックに4分割して4×4画素の各ブロックの動きベクトルを求め、4×4画素の各ブロックを2×2画素のブロックに4分割して2×2画素の各ブロックの動きベクトルを求める。そして、2×2画素の各ブロックの動きベクトルに基づき、対象フレームの各画素の動きベクトルを求める。以下、この処理について、図2(a)〜(c)を参照して説明する。   The pixel motion vector detection unit 22b detects the motion vector of each pixel of the target frame based on the motion vector of each block of the target frame from the block motion vector detection unit 22a. The pixel motion vector detection unit 22b refines the motion vector in units of blocks into a motion vector in units of pixels. Specifically, the pixel motion vector detection unit 22b detects a motion vector in units of blocks while gradually reducing the block of the target frame, and finally detects a motion vector in units of pixels. In this case, when detecting a motion vector in units of blocks or pixels, a search range can be determined based on the motion vector detected in the previous stage. For example, the pixel motion vector detection unit 22b divides each block of 16 × 16 pixels into four blocks of 8 × 8 pixels, and obtains a motion vector of each block of 8 × 8 pixels. At this time, the search range for obtaining the motion vector is narrowed down based on the motion vector of the 16 × 16 pixel block to which the 8 × 8 pixel block for which the motion vector is obtained belongs. Similarly, each block of 8 × 8 pixels is divided into four blocks of 4 × 4 pixels to obtain a motion vector of each block of 4 × 4 pixels, and each block of 4 × 4 pixels is converted to a block of 2 × 2 pixels. The motion vector of each block of 2 × 2 pixels is obtained by dividing into four. Based on the motion vector of each block of 2 × 2 pixels, the motion vector of each pixel of the target frame is obtained. Hereinafter, this process will be described with reference to FIGS.

ここでは、図2(a)に示される対象フレーム40の対象画素41の動きベクトルを求める場合について説明する。図2(b)に示されるように、対象画素41が属する2×2画素のブロックの動きベクトル42に基づき、参照フレーム43に探索範囲44を設定する。具体的には、対象画素41に対応する参照フレーム43上の画素の位置45を動きベクトル42から求め、位置45を中心とする所定サイズの領域を探索範囲44として設定する。そして、参照フレーム43において、参照画素46を探索範囲44内の各画素位置に移動させる。このとき、各画素位置において、参照画素46およびその周辺画素の画素値と対象画素41の画素値との差分値の和を算出する。例えば、図2(c)のように、対象画素41の画素値をpとし、参照画素46を中心とする3×3の画素群47の各画素の画素値をp1〜p9とした場合、差分値の和Sを下記式(1)により算出する。そして、探索範囲44内において和Sが最小となる参照画素の位置48を特定し、特定された参照画素の位置48から対象画素41の位置へのベクトル49を、対象画素41の動きベクトルとして決定する。
S=(p1−p)+(p2−p)+・・・+(p9−p) …(1)
Here, a case where the motion vector of the target pixel 41 of the target frame 40 shown in FIG. As shown in FIG. 2B, a search range 44 is set in the reference frame 43 based on the motion vector 42 of the 2 × 2 pixel block to which the target pixel 41 belongs. Specifically, the pixel position 45 on the reference frame 43 corresponding to the target pixel 41 is obtained from the motion vector 42, and an area of a predetermined size centered on the position 45 is set as the search range 44. Then, in the reference frame 43, the reference pixel 46 is moved to each pixel position in the search range 44. At this time, the sum of the difference values between the pixel value of the reference pixel 46 and its surrounding pixels and the pixel value of the target pixel 41 is calculated at each pixel position. For example, as shown in FIG. 2C, when the pixel value of the target pixel 41 is p and the pixel values of each pixel of the 3 × 3 pixel group 47 centering on the reference pixel 46 are p1 to p9, the difference The sum S of values is calculated by the following equation (1). Then, the position 48 of the reference pixel having the minimum sum S in the search range 44 is specified, and the vector 49 from the position 48 of the specified reference pixel to the position of the target pixel 41 is determined as the motion vector of the target pixel 41. To do.
S = (p1−p) + (p2−p) +... + (P9−p) (1)

図3は、動きベクトル検出部22の検出結果の一例を示す図である。図3には、参照フレーム50を参照して対象フレーム51の各画素の動きベクトルを検出した場合の結果が示されている。一例では、対象フレーム51は現フレームであり、参照フレーム50は前フレームである。図3において、対象フレーム51内には、検出結果である各画素の動きベクトルのうちの一部が矢印で示されている。矢印の長さは動きベクトルの大きさを示し、矢印の方向は動きベクトルの方向を示し、矢印の始点は動きベクトルに対応する画素の位置を示す。参照フレーム50の領域52には物体が写っており、これと同じ物体が対象フレーム51の領域53に写っている。対象フレーム51の座標(x2,y2)の画素について、差分値の和Sが最小となる参照画素の位置として座標(x1,y1)が算出された場合、座標(x1,y1)から座標(x2,y2)へのベクトル(x2−x1,y2−y1)が動きベクトル54として検出される。座標(x2,y2)は物体の位置に相当し、動きベクトル54は、物体の動きの方向と大きさを表す。図3において動きベクトル54と同様に実線矢印で示される他の動きベクトルも、物体の動きの方向と大きさを表す。これらの実線矢印で示される動きベクトルは、互いに同じ大きさおよび方向を有し、物体の動きベクトルと呼べる。一方、図3において、動きベクトル55を含む一点鎖線矢印で示される複数の動きベクトルは、物体の背景の動きの方向と大きさを表し、物体の動きベクトルとは異なる大きさおよび方向を有する。これらの一点鎖線矢印で示される動きベクトルは、背景の動きベクトルと呼べる。   FIG. 3 is a diagram illustrating an example of a detection result of the motion vector detection unit 22. FIG. 3 shows a result when a motion vector of each pixel of the target frame 51 is detected with reference to the reference frame 50. In one example, the target frame 51 is the current frame, and the reference frame 50 is the previous frame. In FIG. 3, in the target frame 51, a part of the motion vector of each pixel that is a detection result is indicated by an arrow. The length of the arrow indicates the magnitude of the motion vector, the direction of the arrow indicates the direction of the motion vector, and the starting point of the arrow indicates the position of the pixel corresponding to the motion vector. An object is shown in the area 52 of the reference frame 50, and the same object is shown in the area 53 of the target frame 51. For the pixel at the coordinate (x2, y2) of the target frame 51, when the coordinate (x1, y1) is calculated as the position of the reference pixel that minimizes the sum S of difference values, the coordinate (x2) from the coordinate (x1, y1) is calculated. , Y2) is detected as the motion vector 54 (x2-x1, y2-y1). The coordinates (x2, y2) correspond to the position of the object, and the motion vector 54 represents the direction and magnitude of the movement of the object. Similar to the motion vector 54 in FIG. 3, the other motion vectors indicated by solid arrows also indicate the direction and magnitude of the motion of the object. The motion vectors indicated by these solid arrows have the same size and direction as each other, and can be called object motion vectors. On the other hand, in FIG. 3, a plurality of motion vectors indicated by a one-dot chain line arrow including the motion vector 55 represents the direction and magnitude of the background motion of the object, and have a magnitude and direction different from the motion vector of the object. The motion vectors indicated by these alternate long and short dash arrows can be called background motion vectors.

なお、動きベクトルを検出するためには、対象フレームと参照フレームとの少なくとも2つのフレームが必要であるが、より多くの参照フレームが用いられてもよい。例えば、動きベクトル検出部22は、対象フレームとその前後の参照フレームとの合計3枚のフレームを使用して動きベクトルを検出してもよい。対象フレームの前後のフレームを使用することで、より精度の高い動きベクトルを検出することができる。   Note that in order to detect a motion vector, at least two frames of a target frame and a reference frame are necessary, but more reference frames may be used. For example, the motion vector detection unit 22 may detect a motion vector using a total of three frames including the target frame and the reference frames before and after the target frame. By using frames before and after the target frame, it is possible to detect a motion vector with higher accuracy.

また、動きベクトルの検出に用いられる対象フレームと参照フレームとの間隔は、適宜決められればよい。対象フレームの1フレーム前のフレームが参照フレームとして用いられてもよいし、対象フレームのNフレーム(Nは2以上の整数)前のフレームが参照フレームとして用いられてもよい。例えば、30fpsで撮影される場合、隣接するフレーム間の間隔は1/30秒であるが、この間隔では画像の変化が小さすぎて動きベクトルが検出されにくい場合がある。このような場合、動きベクトルの検出に用いられるフレーム間の間隔を1/30秒ではなく、1/15秒としてもよい。ただし、フレーム間の間隔が大きすぎると、接近速度が非常に速い障害物など、動きが速い物体の動きベクトルを適切に検出できない可能性がある。動きベクトルの検出に用いられるフレーム間の間隔は、以上のような事情を考慮して最適化されることが望ましい。   The interval between the target frame and the reference frame used for motion vector detection may be determined as appropriate. A frame one frame before the target frame may be used as a reference frame, or a frame N frames (N is an integer of 2 or more) before the target frame may be used as a reference frame. For example, in the case of shooting at 30 fps, the interval between adjacent frames is 1/30 second. However, at this interval, the change in the image is too small and it may be difficult to detect the motion vector. In such a case, the interval between frames used for motion vector detection may be 1/15 seconds instead of 1/30 seconds. However, if the interval between frames is too large, there is a possibility that a motion vector of a fast moving object such as an obstacle with a very fast approach speed cannot be detected properly. It is desirable that the interval between frames used for motion vector detection be optimized in consideration of the above situation.

また、動きベクトルの検出の対象となる対象フレームの間隔も、適宜決められればよい。例えば、動きベクトル検出部22は、撮影されたフレーム毎に動きベクトルを検出してもよいし、Nフレーム(Nは2以上の整数)に1フレームの割合で動きベクトルを検出してもよい。例えば、30fpsで撮影される場合、フレーム毎に動きベクトルを検出しようとすると、1/30秒毎に動きベクトルの検出を行わなければならず、速い演算速度が必要となる。そこで、動きベクトルの検出を行う間隔を1/30秒ではなく、1/15秒としてもよい。ただし、動きベクトルを検出するフレームの間隔が大きすぎると、障害物の接近速度が非常に速い場合に、危険通知が遅れる可能性がある。動きベクトルを検出するフレームの間隔は、以上のような事情を考慮して最適化されることが望ましい。   In addition, the interval between target frames for which motion vectors are to be detected may be determined as appropriate. For example, the motion vector detection unit 22 may detect a motion vector for each captured frame, or may detect a motion vector at a rate of one frame in N frames (N is an integer of 2 or more). For example, when shooting at 30 fps, if a motion vector is to be detected for each frame, the motion vector must be detected every 1/30 seconds, and a high calculation speed is required. Therefore, the interval for detecting the motion vector may be 1/15 seconds instead of 1/30 seconds. However, if the frame interval for detecting the motion vector is too large, the danger notification may be delayed when the approach speed of the obstacle is very high. It is desirable that the frame interval for detecting the motion vector is optimized in consideration of the above situation.

差分算出部23は、画像取得部21から入力された複数のフレームのうちの2つのフレーム間の差分を算出して差分画像を生成する。具体的には、差分算出部23は、2つのフレーム間の各画素の画素値の差分を算出し、算出された各画素の差分を画素値として有する差分画像を生成する。一つの態様では、2つのフレームのうちの一方は、動きベクトルの検出に用いられる対象フレームと同じフレームである。2つのフレームのうちの他方は、例えば動きベクトルの検出に用いられる参照フレームと同じフレームであるが、異なるフレームであってもよい。差分算出部23は、例えば、動きベクトル検出の対象フレーム毎に、当該対象フレームを含む2つのフレーム間の差分画像を算出する。   The difference calculation unit 23 calculates a difference between two frames of the plurality of frames input from the image acquisition unit 21 to generate a difference image. Specifically, the difference calculation unit 23 calculates a difference between pixel values of each pixel between two frames, and generates a difference image having the calculated difference between the pixels as a pixel value. In one aspect, one of the two frames is the same frame as the target frame used for motion vector detection. The other of the two frames is, for example, the same frame as a reference frame used for motion vector detection, but may be a different frame. For example, the difference calculation unit 23 calculates a difference image between two frames including the target frame for each target frame of motion vector detection.

図4は、差分算出部23の処理の一例を示す図である。図4の例では、差分算出部23は、第1のフレーム61と第2のフレーム62との差分画像63を生成する。例えば、第1のフレーム61は前フレームであり、第2のフレーム62は現フレームである。各フレームは、座標(x,y)(x=1,2,・・・,X、y=1,2,・・・,Y)に位置する合計X×Y個の画素で構成され、第1のフレーム61の座標(x,y)の画素の画素値はp1(x,y)で表され、第2のフレーム62の座標(x,y)の画素の画素値はp2(x,y)で表されるものとする。このとき、差分画像63は、座標(x,y)(x=1,2,・・・,X、y=1,2,・・・,Y)に位置する合計X×Y個の画素で構成され、差分画像63の座標(x,y)の画素の画素値p3(x,y)は、下記式(2)で表される。
p3(x,y)=p1(x,y)−p2(x,y) …(2)
FIG. 4 is a diagram illustrating an example of processing of the difference calculation unit 23. In the example of FIG. 4, the difference calculation unit 23 generates a difference image 63 between the first frame 61 and the second frame 62. For example, the first frame 61 is the previous frame, and the second frame 62 is the current frame. Each frame is composed of a total of X × Y pixels located at coordinates (x, y) (x = 1, 2,..., X, y = 1, 2,..., Y). The pixel value of the pixel at the coordinates (x, y) of the first frame 61 is represented by p1 (x, y), and the pixel value of the pixel at the coordinates (x, y) of the second frame 62 is p2 (x, y). ). At this time, the difference image 63 is a total of X × Y pixels located at coordinates (x, y) (x = 1, 2,..., X, y = 1, 2,..., Y). The pixel value p3 (x, y) of the pixel having the coordinates (x, y) of the difference image 63 is expressed by the following equation (2).
p3 (x, y) = p1 (x, y) -p2 (x, y) (2)

図4において、第1のフレーム61の領域61aには物体が写っており、これと同じ物体が第2のフレーム62の領域62aに写っている。2つのフレーム間では、フレーム内の物体の位置が移動しており、物体の輪郭がずれている。この輪郭のずれにより、2つのフレーム間の差分画像63には物体の輪郭が現れる。具体的には、差分画像63には、第1のフレーム61の領域61aの輪郭L1と、第2のフレーム62の領域62aの輪郭L2とが現れる。より詳しく説明すると、差分画像63において、領域63aは、第1のフレーム61の物体の領域61aと第2のフレーム62の背景の領域62bとの差分領域であり、この領域の画素値の絶対値は比較的大きい。領域63bは、第1のフレーム61の背景の領域61bと第2のフレーム62の物体の領域62aとの差分領域であり、この領域の画素値の絶対値は比較的大きい。領域63cは、第1のフレーム61の物体の領域61aと第2のフレーム62の物体の領域62aとの差分領域であり、この領域の画素値の絶対値は比較的小さい。領域63dは、第1のフレーム61の背景の領域61bと第2のフレーム62の背景の領域62bとの差分領域であり、この領域の画素値の絶対値は比較的小さい。このような領域間の画素値の違いにより、領域間の境界に輪郭L1およびL2が現れる。   In FIG. 4, an object is shown in the area 61 a of the first frame 61, and the same object is shown in the area 62 a of the second frame 62. Between the two frames, the position of the object in the frame moves, and the contour of the object is shifted. Due to the deviation of the contour, the contour of the object appears in the difference image 63 between the two frames. Specifically, in the difference image 63, the contour L1 of the region 61a of the first frame 61 and the contour L2 of the region 62a of the second frame 62 appear. More specifically, in the difference image 63, the region 63a is a difference region between the object region 61a of the first frame 61 and the background region 62b of the second frame 62, and the absolute value of the pixel value of this region Is relatively large. The region 63b is a difference region between the background region 61b of the first frame 61 and the object region 62a of the second frame 62, and the absolute value of the pixel value of this region is relatively large. The region 63c is a difference region between the object region 61a of the first frame 61 and the object region 62a of the second frame 62, and the absolute value of the pixel value of this region is relatively small. The region 63d is a difference region between the background region 61b of the first frame 61 and the background region 62b of the second frame 62, and the absolute value of the pixel value of this region is relatively small. Due to the difference in pixel values between the regions, contours L1 and L2 appear at the boundary between the regions.

なお、差分画像の算出に用いられる2つのフレームの間隔は適宜決められればよく、隣接する2つのフレーム間の差分画像が算出されてもよいし、1以上のフレームを間に挟む2つのフレーム間の差分画像が算出されてもよい。例えば、30fpsで撮影される場合、隣接するフレーム間の間隔は1/30秒であるが、この間隔では画像の変化が小さすぎて輪郭が検出されにくい場合がある。このような場合、2枚のフレーム間の間隔を1/30秒ではなく、1/15秒としてもよい。ただし、フレーム間の間隔が大きすぎると、接近速度が非常に速い障害物など、動きが速い物体の輪郭を適切に検出できない可能性がある。差分画像の算出に用いられる2枚のフレーム間の間隔は、以上のような事情を考慮して最適化されることが望ましい。   The interval between two frames used for calculating the difference image may be determined as appropriate, a difference image between two adjacent frames may be calculated, or between two frames sandwiching one or more frames in between. The difference image may be calculated. For example, in the case of shooting at 30 fps, the interval between adjacent frames is 1/30 second. However, at this interval, the change in the image is too small and the contour may not be detected. In such a case, the interval between two frames may be 1/15 seconds instead of 1/30 seconds. However, if the interval between frames is too large, there is a possibility that the contour of an object that moves fast, such as an obstacle with a very fast approach speed, cannot be detected properly. It is desirable that the interval between the two frames used for calculating the difference image be optimized in consideration of the above situation.

また、差分画像を算出するフレームの間隔(例えば第2のフレームとなるフレームの間隔)についても、適宜決められればよい。例えば、差分算出部23は、撮影された各フレームを第2のフレームとして差分画像を算出してもよいし、Nフレーム(Nは2以上の整数)毎に1つのフレームを第2のフレームとして差分画像を算出してもよい。例えば、30fpsで撮影される場合、フレーム毎に差分画像を算出しようとすると、1/30秒毎に算出を行わなければならず、速い演算速度が必要となる。そこで、差分画像の算出を行う間隔を1/30秒ではなく、1/15秒としてもよい。ただし、差分画像を算出するフレームの間隔が大きすぎると、障害物の接近速度が非常に速い場合に、危険通知が遅れる可能性がある。差分画像を算出するフレームの間隔は、以上のような事情を考慮して最適化されることが望ましい。   In addition, the frame interval for calculating the difference image (for example, the interval between the frames serving as the second frames) may be determined as appropriate. For example, the difference calculation unit 23 may calculate a difference image using each captured frame as the second frame, or one frame as the second frame every N frames (N is an integer of 2 or more). A difference image may be calculated. For example, in the case of shooting at 30 fps, if a difference image is to be calculated for each frame, the calculation must be performed every 1/30 seconds, and a high calculation speed is required. Therefore, the interval for calculating the difference image may be 1/15 seconds instead of 1/30 seconds. However, if the frame interval for calculating the difference image is too large, the danger notification may be delayed if the approach speed of the obstacle is very fast. It is desirable that the frame interval for calculating the difference image be optimized in consideration of the above situation.

物体検出部24は、動きベクトル検出部22の検出結果と、差分算出部23の算出結果とに基づいて、フレーム中の物体が存在する物体領域を検出する。物体検出部24は、例えば、動きベクトル検出の対象フレームの各々について、物体領域の検出を行う。以下に詳しく説明するように、物体検出部24は、対象フレーム中の同じ動きベクトルを有する複数の部分で構成される領域(または対象フレーム中の動きベクトルが均一な領域)に対応する、差分画像中の輪郭で囲まれた領域を物体領域として検出する。   The object detection unit 24 detects an object region where an object in the frame exists based on the detection result of the motion vector detection unit 22 and the calculation result of the difference calculation unit 23. For example, the object detection unit 24 detects an object region for each target frame of motion vector detection. As will be described in detail below, the object detection unit 24 is a differential image corresponding to a region (or a region where the motion vectors in the target frame are uniform) composed of a plurality of portions having the same motion vector in the target frame. A region surrounded by the inside contour is detected as an object region.

図1の例では、物体検出部24は、領域検出部24a、輪郭抽出部24b、物体領域検出部24c、および障害物判定部24dを有する。   In the example of FIG. 1, the object detection unit 24 includes a region detection unit 24a, a contour extraction unit 24b, an object region detection unit 24c, and an obstacle determination unit 24d.

領域検出部24aは、動きベクトル検出部22により検出された動きベクトルに基づいて対象フレームから物体の領域を検出する。具体的には、領域検出部24aは、対象フレーム中の同じ動きベクトルを有する複数の画素で構成される領域を物体の領域として検出する。具体的には、領域検出部24aは、同じ大きさおよび方向の動きベクトルを有する複数の画素によって構成される一塊の領域を物体の領域として検出する。上記の「同じ」とは、厳密な意味での同じに限られず、同じ物体の動きベクトルとみなせる程度に同じであればよく、略同じであってもよい。   The region detection unit 24 a detects the region of the object from the target frame based on the motion vector detected by the motion vector detection unit 22. Specifically, the region detection unit 24a detects a region including a plurality of pixels having the same motion vector in the target frame as an object region. Specifically, the region detection unit 24a detects a single region composed of a plurality of pixels having the same magnitude and direction of motion vectors as an object region. The above “same” is not limited to the same in a strict sense, but may be the same as long as it can be regarded as a motion vector of the same object, and may be substantially the same.

例えば、動きベクトル検出部22により図3に示される検出結果が得られた場合、領域検出部24aは、図5に示されるように、同じ大きさおよび方向の動きベクトルを有する複数の画素によって形成される一塊の領域70を、物体の領域として検出する。図5において、検出された物体の領域70は、実際に物体が写っている領域53と概ね一致しているが、輪郭がずれている。   For example, when the detection result shown in FIG. 3 is obtained by the motion vector detection unit 22, the region detection unit 24a is formed by a plurality of pixels having the same magnitude and direction of motion vectors as shown in FIG. The lump area 70 is detected as an object area. In FIG. 5, the area 70 of the detected object substantially coincides with the area 53 where the object is actually shown, but the outline is shifted.

輪郭抽出部24bは、差分算出部23により算出された差分画像から物体の輪郭を抽出する。例えば、差分算出部23により図4に示される差分画像63が得られた場合、輪郭抽出部24bは、例えばラベリング処理によって、図6に示されるように、差分画像63から領域63a〜63dを特定し、特定された領域間の境界線B1〜B4を物体の輪郭として抽出する。境界線B1およびB3は輪郭L1に相当し、境界線B2およびB4は輪郭L2に相当する。なお、画像から輪郭を抽出する方法としては、公知の方法を含む様々な方法を利用することができる。   The contour extraction unit 24 b extracts the contour of the object from the difference image calculated by the difference calculation unit 23. For example, when the difference calculation unit 23 obtains the difference image 63 illustrated in FIG. 4, the contour extraction unit 24 b identifies the regions 63 a to 63 d from the difference image 63 as illustrated in FIG. 6 by, for example, labeling processing. Then, the boundary lines B1 to B4 between the specified regions are extracted as the contours of the object. The boundary lines B1 and B3 correspond to the contour L1, and the boundary lines B2 and B4 correspond to the contour L2. In addition, as a method for extracting a contour from an image, various methods including a known method can be used.

物体領域検出部24cは、領域検出部24aにより検出された領域に対応する、輪郭抽出部24bにより抽出された輪郭で囲まれた領域を、物体領域として検出する。具体的には、物体領域検出部24cは、領域検出部24aにより検出された領域と輪郭抽出部24bにより抽出された輪郭とを重ね合わせることにより(または対象フレームと差分画像とを重ね合わせることにより)、検出された領域に対応する、抽出された輪郭で囲まれた領域を、物体領域として検出する。   The object region detection unit 24c detects a region surrounded by the contour extracted by the contour extraction unit 24b corresponding to the region detected by the region detection unit 24a as an object region. Specifically, the object region detection unit 24c superimposes the region detected by the region detection unit 24a and the contour extracted by the contour extraction unit 24b (or superimposes the target frame and the difference image). ), An area surrounded by the extracted contour corresponding to the detected area is detected as an object area.

領域検出部24aにより図5の領域70が検出され、輪郭抽出部24bにより図6の輪郭B1〜B4が抽出された場合、物体領域検出部24cは、図7に示されるように、領域70に輪郭B1〜B4を重ね合わせて、領域70に対応する輪郭B2およびB4(すなわち輪郭L2)で囲まれた領域80を物体領域として検出する。   When the region 70 in FIG. 5 is detected by the region detection unit 24a and the contours B1 to B4 in FIG. 6 are extracted by the contour extraction unit 24b, the object region detection unit 24c adds the region 70 to the region 70 as shown in FIG. The contours B1 to B4 are overlapped, and a region 80 surrounded by the contours B2 and B4 (that is, the contour L2) corresponding to the region 70 is detected as an object region.

一例では、物体領域検出部24cは、抽出された輪郭B1〜B4により構成可能な領域のうち、検出された領域70と最も一致する領域(ここでは輪郭B2およびB4で構成される領域)を物体領域として検出する。例えば、輪郭B1〜B4により構成可能な各候補領域について、領域70との重複率Dを求め、重複率Dが最も高い候補領域を物体領域として検出する。重複率Dは、例えば、領域70の面積をS1、候補領域の面積をS2、領域70と候補領域とが重複する領域の面積をS3とした場合、下記式(3)により計算される。なお、計算された重複率の中で最も高い重複率が予め定められた閾値以下である場合には、物体領域検出部24cは、領域70に対応する物体領域を検出しないこととしてもよい。
D=S3/(S1+S2−S3) …(3)
In one example, the object region detection unit 24c sets the region that is most consistent with the detected region 70 (here, the region configured by the contours B2 and B4) among the regions that can be configured by the extracted contours B1 to B4. Detect as a region. For example, for each candidate region that can be configured by the contours B1 to B4, the overlapping rate D with the region 70 is obtained, and the candidate region with the highest overlapping rate D is detected as the object region. The overlap rate D is calculated by the following equation (3), for example, when the area of the region 70 is S1, the area of the candidate region is S2, and the area of the region where the region 70 and the candidate region overlap is S3. Note that when the highest overlap rate among the calculated overlap rates is equal to or less than a predetermined threshold, the object region detection unit 24c may not detect the object region corresponding to the region 70.
D = S3 / (S1 + S2-S3) (3)

別の例では、物体領域検出部24cは、抽出された輪郭B1〜B4のそれぞれについて、領域70の輪郭との一致度を計算し、一致度が閾値以上の輪郭を特定し、特定された輪郭(ここでは輪郭B2およびB4)で囲まれた領域を物体領域として検出する。なお、一致度が閾値以上の輪郭が存在しない場合や、特定された輪郭だけでは領域を構成できない場合には、物体領域検出部24cは、領域70に対応する物体領域を検出しないこととしてもよい。   In another example, the object region detection unit 24c calculates the degree of coincidence with the contour of the region 70 for each of the extracted contours B1 to B4, identifies the contour having a coincidence degree equal to or greater than a threshold, and identifies the identified contour A region surrounded by (here, contours B2 and B4) is detected as an object region. Note that if there is no contour having a matching degree equal to or higher than the threshold value, or if the region cannot be configured only by the specified contour, the object region detection unit 24c may not detect the object region corresponding to the region 70. .

障害物判定部24dは、物体領域検出部24cにより物体領域が検出された場合に、当該物体領域の位置、当該物体領域内の動きベクトルの大きさおよび方向、ならびに車両の移動方向および速度に基づき、当該物体領域にある物体が車両に対する障害物であるか否かを判定する。ここで、車両に対する障害物とは、車両に障害となる物体であり、車両に障害となりうる物体を含んでもよい。上記物体領域内の動きベクトルとしては、動きベクトル検出部22によって検出された動きベクトルが用いられる。具体的には、障害物判定部24dは、物体と車両との相対速度および移動方向の関係に基づき、物体が車両に衝突する可能性があると判断した場合に、物体が障害物であると判定する。例えば、車両に対して一定以上の速度で接近してきている物体については、障害物であると判定する。   When the object region is detected by the object region detection unit 24c, the obstacle determination unit 24d is based on the position of the object region, the magnitude and direction of the motion vector in the object region, and the moving direction and speed of the vehicle. Then, it is determined whether an object in the object area is an obstacle to the vehicle. Here, the obstacle to the vehicle is an object that obstructs the vehicle, and may include an object that can obstruct the vehicle. The motion vector detected by the motion vector detection unit 22 is used as the motion vector in the object region. Specifically, when the obstacle determination unit 24d determines that the object may collide with the vehicle based on the relationship between the relative speed between the object and the vehicle and the moving direction, the object is determined to be an obstacle. judge. For example, an object approaching the vehicle at a certain speed or more is determined to be an obstacle.

図8は、物体検出装置20による障害物検出処理(または実施の形態1に係る物体検出方法を含む障害物検出方法)の一例を示すフローチャートである。図8の処理は、物体検出装置20によって繰り返し実行される。   FIG. 8 is a flowchart illustrating an example of an obstacle detection process (or an obstacle detection method including the object detection method according to Embodiment 1) by the object detection device 20. The process of FIG. 8 is repeatedly executed by the object detection device 20.

物体検出装置20は、自車の走行状態を検知する(S1)。走行状態は、自車の移動方向および速度を含む。   The object detection device 20 detects the traveling state of the host vehicle (S1). The traveling state includes the moving direction and speed of the own vehicle.

次に、物体検出装置20は、カメラ10から撮影されたフレームを取得し、取得されたフレームを画像記憶部21aに記憶する(S2)。   Next, the object detection apparatus 20 acquires a frame shot from the camera 10 and stores the acquired frame in the image storage unit 21a (S2).

次に、物体検出装置20は、ステップS2で取得されたフレームを対象フレームとして動きベクトル検出処理を行い、対象フレームの各画素の動きベクトルを検出し(S3)、検出された動きベクトルを用いて、対象フレーム中の物体が存在する領域を検出する(S4)。   Next, the object detection device 20 performs a motion vector detection process using the frame acquired in step S2 as a target frame, detects a motion vector of each pixel of the target frame (S3), and uses the detected motion vector. A region where an object in the target frame is present is detected (S4).

次に、物体検出装置20は、ステップS2で取得されたフレームに対して差分算出処理を行って差分画像を算出し(S5)、得られた差分画像から物体の輪郭を抽出する(S6)。   Next, the object detection apparatus 20 performs a difference calculation process on the frame acquired in step S2 to calculate a difference image (S5), and extracts the contour of the object from the obtained difference image (S6).

次に、物体検出装置20は、ステップS4の領域検出結果とステップS6の輪郭抽出結果とを合わせて、物体領域を検出する(S7)。例えば、ステップS4で検出された物体の領域に、ステップS6で抽出された物体の輪郭を重ね合わせて、検出された物体の領域に対応する、抽出された物体の輪郭で囲まれた領域を物体領域として特定する。   Next, the object detection device 20 detects the object region by combining the region detection result in step S4 and the contour extraction result in step S6 (S7). For example, by superimposing the contour of the object extracted in step S6 on the region of the object detected in step S4, the region surrounded by the contour of the extracted object corresponding to the detected region of the object Specify as an area.

次に、物体検出装置20は、ステップS1で検知された自車の走行状態と、ステップS7で検出された物体領域の位置と、当該物体領域内のステップS3で検出された動きベクトルとから、当該物体領域にある物体が自車の障害物であるか否かを判定する(S8)。例えば、物体検出装置20は、物体領域にある物体の移動方向および速度と自車の移動方向および速度との関係から、衝突の危険があると判断した場合には、障害物であると判定する。また、物体領域の物体と自車とで移動方向および速度が等しく、物体と自車とが互いに平行に移動している場合にも、自車または物体の移動方向または速度が変化すれば、物体が自車の障害となる可能性があるので、障害物であると判定する。自車の移動方向と反対方向に移動している物体については、障害物でないと判定する。   Next, the object detection device 20 uses the traveling state of the vehicle detected in step S1, the position of the object region detected in step S7, and the motion vector detected in step S3 in the object region. It is determined whether an object in the object area is an obstacle of the own vehicle (S8). For example, when the object detection device 20 determines that there is a risk of collision from the relationship between the moving direction and speed of the object in the object area and the moving direction and speed of the own vehicle, it determines that the object is an obstacle. . In addition, even when the moving direction and speed of the object in the object area and the own vehicle are equal and the object and the own vehicle are moving in parallel with each other, if the moving direction or speed of the own vehicle or the object changes, the object May be an obstacle for the vehicle, so it is determined that the vehicle is an obstacle. An object moving in the direction opposite to the moving direction of the host vehicle is determined not to be an obstacle.

物体検出装置20は、物体が障害物であると判定した場合(S8:Yes)、その旨を障害物通知部30に通知し(S9)、物体が障害物でないと判定した場合には(S8:No)、処理を終了する。   When the object detection device 20 determines that the object is an obstacle (S8: Yes), the object detection device 20 notifies the obstacle notification unit 30 to that effect (S9), and when the object detection device 20 determines that the object is not an obstacle (S8). : No), the process ends.

図9は、図8のステップS3の動きベクトル検出処理の内容を示すフローチャートである。以下、図9を参照して、動きベクトル検出処理について説明する。   FIG. 9 is a flowchart showing the contents of the motion vector detection process in step S3 of FIG. Hereinafter, the motion vector detection process will be described with reference to FIG.

まず、物体検出装置20は、動きベクトルの検出に用いる複数のフレームを画像記憶部21aから取得する(S11)。具体的には、物体検出装置20は、今回のステップS2で取得されたフレームを対象フレームとして取り出し、前回のステップS2で取得されたフレームを参照フレームとして取り出す。   First, the object detection apparatus 20 acquires a plurality of frames used for motion vector detection from the image storage unit 21a (S11). Specifically, the object detection device 20 takes out the frame acquired in the current step S2 as a target frame, and takes out the frame acquired in the previous step S2 as a reference frame.

次に、物体検出装置20は、ステップS11で取得された各フレームに対して画像の解像度を下げる解像度変換処理を行い、各フレームの低解像度画像(または縮小画像)を生成する(S12)。   Next, the object detection device 20 performs resolution conversion processing for reducing the resolution of the image for each frame acquired in step S11, and generates a low-resolution image (or a reduced image) for each frame (S12).

次に、物体検出装置20は、ステップS12で生成された各フレームの低解像度画像から動きベクトルを検出する。具体的には、まず、対象フレームの低解像度画像を複数のブロックに分割し、ブロック毎の動きベクトルを検出する(S13)。そして、ブロック毎の動きベクトルの検出結果を用いて、画素毎の動きベクトルを検出する(S14)。   Next, the object detection device 20 detects a motion vector from the low-resolution image of each frame generated in step S12. Specifically, first, the low-resolution image of the target frame is divided into a plurality of blocks, and a motion vector for each block is detected (S13). Then, the motion vector for each pixel is detected using the motion vector detection result for each block (S14).

なお、上記の処理において、各フレームの解像度を下げて低解像度画像を使用するのは、動きベクトル検出の演算量を抑えるためである。撮影されたフレームの解像度が大きい場合には、フレームをそのまま使用すると動きベクトル検出の演算量が多くなる一方、解像度を下げても問題なく動きベクトル検出が可能であることから、上記のように解像度を下げることが有効である。一方、元のフレームの解像度が小さい場合には、ステップS12の処理は省略されてもよい。   In the above processing, the reason why the resolution of each frame is lowered and the low-resolution image is used is to suppress the calculation amount of motion vector detection. If the resolution of the shot frame is large, using the frame as it is will increase the amount of motion vector detection, but the motion vector can be detected without any problem even if the resolution is lowered. Is effective. On the other hand, when the resolution of the original frame is small, the process of step S12 may be omitted.

また、ステップS12において、複数段階の低解像度画像を生成して、解像度が低いものから順番に、各段階の低解像度画像に対して動きベクトルの検出(ステップS13およびS14の処理)を行ってもよい。この場合、2段階目以降の低解像度画像に対する動きベクトル検出においては、1段階前の低解像度画像に対する動きベクトル検出の結果を用いて、動きベクトル検出の探索範囲を絞り込むことができ、これにより演算量を削減することができる。   Alternatively, in step S12, a plurality of low-resolution images may be generated, and motion vectors may be detected for the low-resolution images at each level in order from the lowest resolution (steps S13 and S14). Good. In this case, in the motion vector detection for the low-resolution image after the second stage, the search range of the motion vector detection can be narrowed down by using the result of the motion vector detection for the low-resolution image one stage before. The amount can be reduced.

図10は、図8のステップS5の差分算出処理の内容を示すフローチャートである。以下、図10を参照して、差分算出処理について説明する。   FIG. 10 is a flowchart showing the contents of the difference calculation process in step S5 of FIG. Hereinafter, the difference calculation process will be described with reference to FIG.

まず、物体検出装置20は、差分画像の算出に用いる複数のフレームを画像記憶部21aから取得する(S21)。例えば、物体検出装置20は、図8のステップS3の動きベクトル検出処理に使用される複数のフレームと同じものを取得する。具体的には、物体検出装置20は、今回のステップS2で取得されたフレームと、前回のステップS2で取得されたフレームとを取り出す。ただし、物体検出装置20は、動きベクトル検出処理に使用されるフレームとは異なるタイミングで取得されたフレームを使用してもよい。例えば、物体検出装置20は、今回のステップS2で取得されたフレームと、前々回のステップS2で取得されたフレームとを取り出してもよい。   First, the object detection apparatus 20 acquires a plurality of frames used for calculating a difference image from the image storage unit 21a (S21). For example, the object detection device 20 acquires the same frame as a plurality of frames used in the motion vector detection process in step S3 of FIG. Specifically, the object detection device 20 takes out the frame acquired in the current step S2 and the frame acquired in the previous step S2. However, the object detection apparatus 20 may use a frame acquired at a timing different from the frame used for the motion vector detection process. For example, the object detection apparatus 20 may extract the frame acquired in step S2 this time and the frame acquired in step S2 the previous time.

次に、物体検出装置20は、ステップS21で取得した2つのフレームの各画素の差分を算出して、2つのフレーム間の差分画像を生成する(S22)。   Next, the object detection device 20 calculates a difference between the pixels of the two frames acquired in step S21, and generates a difference image between the two frames (S22).

以上のとおり、本実施の形態では、物体検出装置20は、動きベクトルと差分画像とに基づいて物体領域を検出する。これにより、動きベクトルのみに基づいて物体領域を検出する場合と比べて、正確に物体領域を検出することができる。具体的には、動きベクトルのみに基づいて物体領域を検出する構成では、1つの物体内で動きベクトルが異なる方向を示す場合があり、また、背景部分であっても物体領域として誤検出される場合もあることなどから、物体領域の輪郭を正確に検出することができず、物体領域を精度良く検出することができないという問題がある。これに対し、本実施の形態では、動きベクトルから検出された物体の領域と、差分画像から抽出された物体の輪郭とを重ね合わせることで、物体領域を輪郭まで正確に検出することができる。つまり、動きベクトルによって大まかに物体の領域を検出し、この領域の輪郭を差分画像によって詳細に決定することで、精度良く物体領域を検出することができる。また、物体の輪郭を把握するためには、エッジ検出を行う方法もあるが、この方法では演算量が多くなってしまう。これに対し、差分画像の算出は、画像の各画素値の差分を計算するだけの非常に単純な演算であり、演算量が非常に少ない。このため、本実施の形態によれば、演算量を大きく増やすことなく、物体領域の検出精度を上げることが可能となる。   As described above, in the present embodiment, the object detection device 20 detects the object region based on the motion vector and the difference image. Thereby, compared with the case where an object region is detected based only on a motion vector, an object region can be detected more accurately. Specifically, in the configuration in which the object region is detected based only on the motion vector, the motion vector may indicate a different direction within one object, and even the background portion is erroneously detected as the object region. In some cases, the contour of the object region cannot be accurately detected, and the object region cannot be detected with high accuracy. In contrast, in the present embodiment, the object region can be accurately detected up to the contour by superimposing the object region detected from the motion vector and the contour of the object extracted from the difference image. That is, the object region can be detected with high accuracy by roughly detecting the region of the object based on the motion vector and determining the contour of this region in detail using the difference image. In addition, there is a method of performing edge detection in order to grasp the contour of an object, but this method increases the amount of calculation. On the other hand, the calculation of the difference image is a very simple calculation that only calculates the difference between the pixel values of the image, and the calculation amount is very small. For this reason, according to the present embodiment, it is possible to increase the detection accuracy of the object region without greatly increasing the amount of calculation.

また、本実施の形態では、物体検出装置20は、物体領域が検出された場合に、当該物体領域の位置と当該物体領域内の動きベクトルとに基づき、当該物体領域に存在する物体が車両に対する障害物であるか否かを判定する。このため、障害物を正確に検出することができる。   Further, in the present embodiment, when the object region is detected, the object detection device 20 determines that an object existing in the object region is relative to the vehicle based on the position of the object region and the motion vector in the object region. Determine if it is an obstacle. For this reason, an obstacle can be detected accurately.

なお、上記の処理の順序は、一例であり、適宜変更されてもよい。例えば、動きベクトルから検出された物体の領域に対して障害物であるか否かの判定を行い、障害物であると判定された物体の領域と、差分画像から抽出された輪郭とから物体領域を検出してもよい。以下、この変形例について説明する。   Note that the order of the above processes is an example, and may be changed as appropriate. For example, it is determined whether or not the object area detected from the motion vector is an obstacle, and the object area is determined from the object area determined to be an obstacle and the contour extracted from the difference image. May be detected. Hereinafter, this modification will be described.

障害物判定部24dは、領域検出部24aにより物体の領域が検出された場合に、当該検出された領域の位置と当該検出された領域内の動きベクトルとに基づき、当該検出された領域に存在する物体が車両に対する障害物であるか否かを判定する。   The obstacle determination unit 24d exists in the detected region based on the position of the detected region and the motion vector in the detected region when the region of the object is detected by the region detection unit 24a. It is determined whether the object to be performed is an obstacle to the vehicle.

物体領域検出部24cは、障害物判定部24dにより上記検出された領域に存在する物体が障害物であると判定された場合に、当該検出された領域に対応する、輪郭抽出部24bにより抽出された輪郭で囲まれた領域を、物体領域として検出する。   The object region detection unit 24c is extracted by the contour extraction unit 24b corresponding to the detected region when the obstacle determination unit 24d determines that the object existing in the detected region is an obstacle. A region surrounded by a contour is detected as an object region.

図11は、変形例における物体検出装置20による障害物検出処理の一例を示すフローチャートである。図11の処理は、物体検出装置20によって繰り返し実行される。   FIG. 11 is a flowchart illustrating an example of an obstacle detection process performed by the object detection device 20 according to the modification. The process of FIG. 11 is repeatedly executed by the object detection device 20.

物体検出装置20は、図8のステップS1〜S4と同様に、自車の走行状態を検知し(S31)、カメラ10からフレームを取得し(S32)、動きベクトル検出処理を行い(S33)、検出された動きベクトルを用いて物体の領域を検出する(S34)。   The object detection device 20 detects the running state of the vehicle (S31), acquires a frame from the camera 10 (S32), performs a motion vector detection process (S33), similarly to steps S1 to S4 in FIG. An object region is detected using the detected motion vector (S34).

そして、物体検出装置20は、図8のステップS8と同様に、ステップS31で検知された自車の走行状態と、ステップS34で検出された領域の位置と、当該領域内の動きベクトルとから、当該領域にある物体が自車の障害物であるか否かを判定する(S35)。   Then, similarly to step S8 in FIG. 8, the object detection device 20 uses the traveling state of the vehicle detected in step S31, the position of the area detected in step S34, and the motion vector in the area. It is determined whether or not the object in the area is an obstacle of the own vehicle (S35).

物体検出装置20は、物体が障害物であると判定した場合(S35:Yes)、ステップS36に進み、物体が障害物でないと判定した場合には(S35:No)、処理を終了する。   If the object detection device 20 determines that the object is an obstacle (S35: Yes), the process proceeds to step S36. If the object detection device 20 determines that the object is not an obstacle (S35: No), the process ends.

ステップS36では、物体検出装置20は、図8のステップS5と同様に、差分画像を算出する。そして、物体検出装置20は、図8のステップS6〜S7と同様に、差分画像から物体の輪郭を抽出し(S37)、物体領域を検出する(S38)。この場合に検出される物体領域は、障害物が存在する領域である。そして、物体検出装置20は、障害物が存在する物体領域を障害物通知部30に通知する(S39)。   In step S36, the object detection apparatus 20 calculates a difference image similarly to step S5 of FIG. And the object detection apparatus 20 extracts the outline of an object from a difference image similarly to step S6-S7 of FIG. 8 (S37), and detects an object area | region (S38). The object area detected in this case is an area where an obstacle exists. And the object detection apparatus 20 notifies the object area | region where an obstruction exists to the obstruction notification part 30 (S39).

実施の形態2.
図12は、実施の形態2に係る物体検出装置220を含む物体検出システム2の構成の一例を示すブロック図である。以下、図12を参照して、物体検出システム2について説明する。以下の説明では、実施の形態1と同様の部分については説明を省略または簡略化し、実施の形態1と同一または対応する要素については同一の符号を付す。
Embodiment 2. FIG.
FIG. 12 is a block diagram illustrating an example of the configuration of the object detection system 2 including the object detection device 220 according to the second embodiment. Hereinafter, the object detection system 2 will be described with reference to FIG. In the following description, the description of the same parts as those in the first embodiment is omitted or simplified, and the same or corresponding elements as those in the first embodiment are denoted by the same reference numerals.

図12に示されるように、物体検出システム2は、図1の物体検出システム1と略同様の構成を有するが、画素動きベクトル検出部22bが省略されている。   As shown in FIG. 12, the object detection system 2 has substantially the same configuration as the object detection system 1 of FIG. 1, but the pixel motion vector detection unit 22b is omitted.

本実施の形態では、動きベクトル検出部222は、対象フレームのブロック単位で動きベクトルを検出する。具体的には、動きベクトル検出部222において、ブロック動きベクトル検出部222aは、対象フレームの各ブロックの動きベクトルを検出し、検出された各ブロックの動きベクトルを物体検出部24に出力する。画素単位の動きベクトルの検出は省略される。   In the present embodiment, the motion vector detection unit 222 detects a motion vector for each block of the target frame. Specifically, in the motion vector detection unit 222, the block motion vector detection unit 222 a detects the motion vector of each block of the target frame and outputs the detected motion vector of each block to the object detection unit 24. Detection of motion vectors in pixel units is omitted.

物体検出部24は、動きベクトル検出部222から入力されるブロック単位の動きベクトルを用いて、物体領域の検出および障害物の判定を行う。物体検出部24の処理は、画素単位の動きベクトルの代わりにブロック単位の動きベクトルを用いる点を除いて、実施の形態1と同様である。   The object detection unit 24 uses the block-based motion vector input from the motion vector detection unit 222 to detect an object region and determine an obstacle. The processing of the object detection unit 24 is the same as that of the first embodiment except that a block-unit motion vector is used instead of a pixel-unit motion vector.

物体検出装置220の動作は、図8に示される物体検出装置20の動作と略同様であるが、ステップS3の動きベクトル検出処理が異なる。   The operation of the object detection device 220 is substantially the same as the operation of the object detection device 20 shown in FIG. 8, but the motion vector detection process in step S3 is different.

図13は、実施の形態2における動きベクトル検出処理の内容を示すフローチャートである。以下、図13を参照して、動きベクトル検出処理について説明する。   FIG. 13 is a flowchart showing the contents of motion vector detection processing in the second embodiment. Hereinafter, the motion vector detection process will be described with reference to FIG.

物体検出装置220は、図9のステップS11〜S12と同様に、動きベクトルの検出に用いる複数のフレームを取得し(S41)、各フレームの解像度を下げる解像度変換処理を行う(S42)。   The object detection apparatus 220 acquires a plurality of frames used for motion vector detection (S41) and performs resolution conversion processing for reducing the resolution of each frame (S42), as in steps S11 to S12 of FIG.

次に、物体検出装置220は、ステップS42で生成された各フレームの低解像度画像から、対象フレームのブロック毎の動きベクトルを検出する(S43)。実施の形態1ではブロック単位の動きベクトルを詳細化することによって画素単位の動きベクトルの検出を行ったが、本実施の形態では、画素単位の動きベクトルの検出は行われず、ブロック単位の動きベクトルの検出結果を用いて以降の処理が行われる。   Next, the object detection device 220 detects a motion vector for each block of the target frame from the low-resolution image of each frame generated in step S42 (S43). In the first embodiment, the motion vector for each pixel is detected by refining the motion vector for each block. However, in this embodiment, the motion vector for each pixel is not detected and the motion vector for each block is detected. Subsequent processing is performed using the detection result.

以上のとおり、本実施の形態では、物体検出装置220は、ブロック単位で動きベクトルを検出し、ブロック単位の動きベクトルを用いて物体領域の検出を行う。本構成によれば、画素単位で動きベクトルを検出する場合と比較して、動きベクトル検出の処理負荷または演算量を軽減することができ、処理速度を上げることができる。また、ブロック単位の動きベクトルを用いる場合、動きベクトルのみから物体の詳細な形状を検出することはできないが、画素単位の差分値を有する差分画像を用いることによって、物体の詳細な形状を検出することが可能となる。したがって、本実施の形態によれば、物体検出の精度を維持しながら、処理負荷を軽減することができる。   As described above, in the present embodiment, the object detection device 220 detects a motion vector in units of blocks, and detects an object region using the motion vectors in units of blocks. According to this configuration, the processing load or calculation amount of motion vector detection can be reduced and the processing speed can be increased compared to the case of detecting a motion vector in units of pixels. In addition, when using a motion vector in units of blocks, it is not possible to detect the detailed shape of the object from only the motion vectors, but the detailed shape of the object is detected by using a difference image having a difference value in units of pixels. It becomes possible. Therefore, according to the present embodiment, it is possible to reduce the processing load while maintaining the accuracy of object detection.

実施の形態3.
図14は、実施の形態3に係る物体検出装置320を含む物体検出システム3の構成の一例を示すブロック図である。以下、図14を参照して、物体検出システム3について説明する。以下の説明では、実施の形態1と同様の部分については説明を省略または簡略化し、実施の形態1と同一または対応する要素については同一の符号を付す。
Embodiment 3 FIG.
FIG. 14 is a block diagram illustrating an example of the configuration of the object detection system 3 including the object detection device 320 according to the third embodiment. Hereinafter, the object detection system 3 will be described with reference to FIG. In the following description, the description of the same parts as those in the first embodiment is omitted or simplified, and the same or corresponding elements as those in the first embodiment are denoted by the same reference numerals.

図14に示されるように、物体検出システム3は、図1の物体検出システム1と略同様の構成を有するが、動きベクトル検出部322と差分算出部323とが接続されている。   As shown in FIG. 14, the object detection system 3 has substantially the same configuration as the object detection system 1 of FIG. 1, but a motion vector detection unit 322 and a difference calculation unit 323 are connected.

本実施の形態では、差分算出部323は、2つのフレーム間の各画素の画素値の差分を算出し、算出された各画素の差分を画素値として有する画像を差分画像として生成し、生成された差分画像を物体検出部24に出力するとともに、動きベクトル検出部322にも出力する。   In the present embodiment, the difference calculation unit 323 calculates a difference between pixel values of each pixel between two frames, generates an image having the calculated difference between each pixel as a pixel value, and generates a difference image. The difference image is output to the object detection unit 24 and is also output to the motion vector detection unit 322.

動きベクトル検出部322は、差分算出部323から差分画像を受け、対象フレームのうち、差分画像中の画素値の絶対値が閾値以下である部分に対応する部分を除いて、動きベクトルの検出を行う。   The motion vector detection unit 322 receives the difference image from the difference calculation unit 323 and detects a motion vector except for a portion corresponding to a portion of the target frame in which the absolute value of the pixel value in the difference image is equal to or less than a threshold value. Do.

図15は、実施の形態3における物体検出装置320による障害物検出処理の一例を示すフローチャートである。図15の処理は、物体検出装置320によって繰り返し実行される。   FIG. 15 is a flowchart illustrating an example of an obstacle detection process performed by the object detection device 320 according to the third embodiment. The process of FIG. 15 is repeatedly executed by the object detection device 320.

物体検出装置320は、図8のステップS1〜S2と同様に、自車の走行状態を検知し(S51)、カメラ10からフレームを取得する(S52)。   The object detection device 320 detects the traveling state of the vehicle (S51) and acquires a frame from the camera 10 (S52), similarly to steps S1 and S2 of FIG.

次に、物体検出装置320は、図8のステップS5〜S6と同様に、ステップS52で取得されたフレームに対して差分算出処理を行って差分画像を算出し(S53)、得られた差分画像から物体の輪郭を抽出する(S54)。   Next, similarly to steps S5 to S6 in FIG. 8, the object detection device 320 performs a difference calculation process on the frame acquired in step S52 to calculate a difference image (S53), and the obtained difference image. The outline of the object is extracted from (S54).

次に、物体検出装置320は、ステップS53で得られた差分画像を用いて、ステップS52で取得されたフレームに対して背景フィルタ処理(または遠景フィルタ処理)を行う(S55)。この背景フィルタ処理では、差分画像のうち、画素値の絶対値が予め定められた閾値以下である部分を背景部分(または遠景部分)として検出する。そして、ステップS52で取得されたフレームから背景部分を除去し、背景除去後のフレームを生成する。   Next, the object detection device 320 performs background filter processing (or distant view filter processing) on the frame acquired in step S52 using the difference image obtained in step S53 (S55). In this background filter processing, a portion of the difference image in which the absolute value of the pixel value is equal to or less than a predetermined threshold value is detected as a background portion (or a distant view portion). Then, the background portion is removed from the frame acquired in step S52, and a frame after background removal is generated.

次に、物体検出装置320は、ステップS55で生成された背景除去後のフレームを対象フレームとして、動きベクトル検出処理を行う(S56)。すなわち、物体検出装置320は、ステップS52で取得されたフレームのうち背景部分を除去した残りの部分について、動きベクトルの検出を行う。ステップS56の動きベクトル検出処理では、実施の形態1と同様に画素単位の動きベクトルまで算出してもよいし、実施の形態2と同様にブロック単位の動きベクトルの算出で処理をとどめてもよい。   Next, the object detection device 320 performs a motion vector detection process using the frame after background removal generated in step S55 as a target frame (S56). That is, the object detection device 320 detects a motion vector for the remaining part of the frame acquired in step S52 from which the background part has been removed. In the motion vector detection process in step S56, up to a pixel-unit motion vector may be calculated as in the first embodiment, or the processing may be stopped by calculating a block-unit motion vector as in the second embodiment. .

次に、物体検出装置320は、ステップS56で検出された動きベクトルを用いて、対象フレーム中の物体が存在する領域を検出する(S57)。   Next, the object detection device 320 detects an area where an object exists in the target frame using the motion vector detected in step S56 (S57).

次に、物体検出装置320は、ステップS57の領域検出結果とステップS54の輪郭抽出結果とを合わせて、物体領域を検出する(S58)。   Next, the object detection device 320 detects the object region by combining the region detection result in step S57 and the contour extraction result in step S54 (S58).

次に、物体検出装置320は、ステップS51で検知された自車の走行状態と、ステップS58で検出された物体領域の位置と、当該物体領域内のステップS56で検出された動きベクトルとから、当該物体領域にある物体が自車の障害物であるか否かを判定する(S59)。   Next, the object detection device 320 uses the traveling state of the vehicle detected in step S51, the position of the object region detected in step S58, and the motion vector detected in step S56 in the object region. It is determined whether an object in the object area is an obstacle of the own vehicle (S59).

物体検出装置320は、物体が障害物であると判定した場合(S59:Yes)、その旨を障害物通知部30に通知し(S60)、物体が障害物でないと判定した場合には(S59:No)、処理を終了する。   If the object detection device 320 determines that the object is an obstacle (S59: Yes), it notifies the obstacle notification unit 30 to that effect (S60), and if it determines that the object is not an obstacle (S59). : No), the process ends.

以上のとおり、本実施の形態では、物体検出装置320は、差分画像から背景部分を検出し、対象フレームから当該背景部分を除いて動きベクトル検出を行う。これにより、動きベクトル検出処理の負荷を軽減することができる。   As described above, in the present embodiment, the object detection device 320 detects the background portion from the difference image, and performs motion vector detection by removing the background portion from the target frame. Thereby, the load of the motion vector detection process can be reduced.

上記実施の形態1〜3において、物体検出装置の機能は、電子回路などのハードウェア資源のみにより実現されてもよいし、ハードウェア資源とソフトウェアとの協働により実現されてもよい。後者の場合、物体検出装置の機能は、例えば、物体検出プログラムがコンピュータにより実行されることによって実現され、より具体的には、ROM(Read Only Memory)等の記録媒体に記録された物体検出プログラムが主記憶装置に読み出されて中央処理装置(CPU:Central Processing Unit)により実行されることによって実現される。物体検出プログラムは、光ディスク等のコンピュータ読み取り可能な記録媒体に記録されて提供されてもよいし、インターネット等の通信回線を介して提供されてもよい。   In the first to third embodiments, the function of the object detection apparatus may be realized only by hardware resources such as an electronic circuit, or may be realized by cooperation of hardware resources and software. In the latter case, the function of the object detection device is realized by, for example, an object detection program being executed by a computer, more specifically, an object detection program recorded on a recording medium such as a ROM (Read Only Memory). Is read out to the main memory and executed by a central processing unit (CPU). The object detection program may be provided by being recorded on a computer-readable recording medium such as an optical disk, or may be provided via a communication line such as the Internet.

なお、本発明は、上記実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々の態様で実施することができる。例えば、差分画像の算出に用いられる2つのフレームのうちの一方は、動きベクトル検出の対象フレームと同じフレームであることが望ましいが、対象フレームと略同じタイミングまたは十分に近いタイミングで撮影されたフレームであってもよい。また、物体検出装置は、車両以外の移動体に搭載されてもよく、当該移動体の障害物を検出してもよい。また、物体検出装置は、障害物の検出以外の用途に適用されてもよい。   In addition, this invention is not limited to the said embodiment, In the range which does not deviate from the summary of this invention, it can implement with a various aspect. For example, one of the two frames used for calculating the difference image is preferably the same frame as the target frame for motion vector detection, but the frame is captured at substantially the same timing as the target frame or sufficiently close to the target frame. It may be. Further, the object detection device may be mounted on a moving body other than the vehicle, and may detect an obstacle on the moving body. Further, the object detection device may be applied to uses other than the detection of an obstacle.

1〜3 物体検出システム、 10 カメラ、 20,220,320 物体検出装置、 21 画像取得部、 22,222,322 動きベクトル検出部、 23,323 差分算出部、 24 物体検出部、 24a 領域検出部、 24b 輪郭抽出部、 24c 物体領域検出部、 24d 障害物判定部、 30 障害物通知部。   1 to 3 object detection system, 10 cameras, 20, 220, 320 object detection device, 21 image acquisition unit, 22, 222, 322 motion vector detection unit, 23, 323 difference calculation unit, 24 object detection unit, 24a region detection unit 24b Outline extraction unit 24c Object region detection unit 24d Obstacle determination unit 30 Obstacle notification unit

Claims (9)

カメラにより順次撮影された複数の画像を取得する画像取得部と、
前記画像取得部により取得された複数の画像のうちの対象画像および少なくとも1つの参照画像から、前記対象画像の各部分の動きベクトルを検出する動きベクトル検出部と、
前記画像取得部により取得された複数の画像のうちの2つの画像間の差分画像を算出する差分算出部と、
前記動きベクトル検出部により検出された動きベクトルと、前記差分算出部により算出された差分画像とに基づいて、物体が存在する物体領域を検出する物体検出部と
を備え
前記物体検出部は、
前記動きベクトルに基づいて前記対象画像から物体の領域を検出する領域検出部と、
前記差分画像から物体の輪郭を抽出する輪郭抽出部と、
前記領域検出部により検出された領域に対応する、前記輪郭抽出部により抽出された輪郭で囲まれた領域を、前記物体領域として検出する物体領域検出部と
を有することを特徴とする物体検出装置。
An image acquisition unit for acquiring a plurality of images sequentially taken by the camera;
A motion vector detection unit that detects a motion vector of each part of the target image from the target image and at least one reference image of the plurality of images acquired by the image acquisition unit;
A difference calculating unit that calculates a difference image between two images of the plurality of images acquired by the image acquiring unit;
An object detection unit for detecting an object region where an object exists based on the motion vector detected by the motion vector detection unit and the difference image calculated by the difference calculation unit ;
The object detection unit is
An area detection unit for detecting an area of an object from the target image based on the motion vector;
A contour extraction unit that extracts a contour of an object from the difference image;
An object region detection unit for detecting, as the object region, a region surrounded by the contour extracted by the contour extraction unit corresponding to the region detected by the region detection unit;
An object detection apparatus comprising:
前記物体検出部は、前記対象画像中の同じ動きベクトルを有する複数の部分で構成される領域に対応する、前記差分画像中の輪郭で囲まれた領域を、前記物体領域として検出することを特徴とする請求項1に記載の物体検出装置。   The object detection unit detects, as the object region, a region surrounded by a contour in the difference image corresponding to a region composed of a plurality of portions having the same motion vector in the target image. The object detection apparatus according to claim 1. 前記カメラは移動体に設けられ、
前記物体検出部は、前記物体領域が検出された場合に、当該物体領域の位置と当該物体領域内の前記動きベクトルとに基づき、当該物体領域に存在する物体が前記移動体に対する障害物であるか否かを判定する障害物判定部を有することを特徴とする請求項1または2に記載の物体検出装置。
The camera is provided on a moving body,
When the object area is detected, the object detection unit is configured such that an object existing in the object area is an obstacle to the moving body based on the position of the object area and the motion vector in the object area. object detection apparatus according to claim 1 or 2 characterized by having a determining obstacle determining unit that determines whether.
前記カメラは移動体に設けられ、
前記物体検出部は、
前記動きベクトルに基づいて前記対象画像から物体の領域を検出する領域検出部と、
前記差分画像から物体の輪郭を抽出する輪郭抽出部と、
前記領域検出部により領域が検出された場合に、前記検出された領域の位置と前記検出された領域内の前記動きベクトルとに基づき、前記検出された領域に存在する物体が前記移動体に対する障害物であるか否かを判定する障害物判定部と、
前記障害物判定部により前記検出された領域に存在する物体が障害物であると判定された場合に、前記検出された領域に対応する、前記輪郭抽出部により抽出された輪郭で囲まれた領域を、前記物体領域として検出する物体領域検出部と
を有することを特徴とする請求項1または2に記載の物体検出装置。
The camera is provided on a moving body,
The object detection unit is
An area detection unit for detecting an area of an object from the target image based on the motion vector;
A contour extraction unit that extracts a contour of an object from the difference image;
When an area is detected by the area detection unit, an object present in the detected area is an obstacle to the moving body based on the position of the detected area and the motion vector in the detected area. An obstacle determination unit for determining whether the object is an object,
A region surrounded by the contour extracted by the contour extraction unit corresponding to the detected region when the obstacle determination unit determines that the object existing in the detected region is an obstacle. the object detection apparatus according to claim 1 or 2, characterized in that it has a object area detection unit for detecting as the object region.
前記動きベクトル検出部は、前記対象画像の画素単位で前記動きベクトルを検出することを特徴とする請求項1からのいずれか1項に記載の物体検出装置。 The motion vector detecting section, the object detection apparatus according to claim 1, any one of 4 and detects the motion vector in units of pixels of the target image. 前記動きベクトル検出部は、前記対象画像の複数の画素で構成されるブロック単位で前記動きベクトルを検出することを特徴とする請求項1からのいずれか1項に記載の物体検出装置。 The motion vector detecting section, the object detection apparatus according to claim 1, any one of 4 and detects the motion vector in units of blocks composed of a plurality of pixels of the target image. 前記差分算出部は、前記2つの画像間の各画素の画素値の差分を算出し、算出された各画素の差分を画素値として有する画像を前記差分画像として生成し、
前記動きベクトル検出部は、前記対象画像のうち、前記差分画像中の画素値の絶対値が閾値以下である部分に対応する部分を除いて、前記動きベクトルの検出を行うことを特徴とする請求項1からのいずれか1項に記載の物体検出装置。
The difference calculation unit calculates a difference between pixel values of each pixel between the two images, generates an image having the calculated difference between the pixels as a pixel value as the difference image,
The said motion vector detection part detects the said motion vector except the part corresponding to the part whose absolute value of the pixel value in the said difference image is below a threshold value among the said target images. Item 7. The object detection device according to any one of Items 1 to 6 .
カメラにより順次撮影された複数の画像を取得する画像取得ステップと、
前記画像取得ステップで取得された複数の画像のうちの対象画像および少なくとも1つの参照画像から、前記対象画像の各部分の動きベクトルを検出する動きベクトル検出ステップと、
前記画像取得ステップで取得された複数の画像のうちの2つの画像間の差分画像を算出する差分算出ステップと、
前記動きベクトル検出ステップで検出された動きベクトルと、前記差分算出ステップで算出された差分画像とに基づいて、物体が存在する物体領域を検出する物体検出ステップと
を含み、
前記物体検出ステップは、
前記動きベクトルに基づいて前記対象画像から物体の領域を検出する領域検出ステップと、
前記差分画像から物体の輪郭を抽出する輪郭抽出ステップと、
前記領域検出ステップで検出された領域に対応する、前記輪郭抽出ステップで抽出された輪郭で囲まれた領域を、前記物体領域として検出する物体領域検出ステップと
を有することを特徴とする物体検出方法。
An image acquisition step of acquiring a plurality of images sequentially taken by the camera;
A motion vector detection step of detecting a motion vector of each part of the target image from the target image and at least one reference image of the plurality of images acquired in the image acquisition step;
A difference calculating step of calculating a difference image between two images of the plurality of images acquired in the image acquiring step;
A motion vector detected by said motion vector detection step, the based on the difference image calculated by the difference calculation step, seen including a object detection step of detecting an object area where an object is present,
The object detection step includes
A region detecting step of detecting a region of an object from the target image based on the motion vector;
A contour extracting step of extracting a contour of the object from the difference image;
An object region detection step for detecting, as the object region, a region surrounded by the contour extracted in the contour extraction step corresponding to the region detected in the region detection step;
An object detection method characterized by comprising:
カメラにより順次撮影された複数の画像を取得する画像取得ステップと、
前記画像取得ステップで取得された複数の画像のうちの対象画像および少なくとも1つの参照画像から、前記対象画像の各部分の動きベクトルを検出する動きベクトル検出ステップと、
前記画像取得ステップで取得された複数の画像のうちの2つの画像間の差分画像を算出する差分算出ステップと、
前記動きベクトル検出ステップで検出された動きベクトルと、前記差分算出ステップで算出された差分画像とに基づいて、物体が存在する物体領域を検出する物体検出ステップと
をコンピュータに実行させ
前記物体検出ステップは、
前記動きベクトルに基づいて前記対象画像から物体の領域を検出する領域検出ステップと、
前記差分画像から物体の輪郭を抽出する輪郭抽出ステップと、
前記領域検出ステップで検出された領域に対応する、前記輪郭抽出ステップで抽出された輪郭で囲まれた領域を、前記物体領域として検出する物体領域検出ステップと
を有することを特徴とする物体検出プログラム。
An image acquisition step of acquiring a plurality of images sequentially taken by the camera;
A motion vector detection step of detecting a motion vector of each part of the target image from the target image and at least one reference image of the plurality of images acquired in the image acquisition step;
A difference calculating step of calculating a difference image between two images of the plurality of images acquired in the image acquiring step;
Based on the motion vector detected in the motion vector detection step and the difference image calculated in the difference calculation step, causing the computer to execute an object detection step of detecting an object region where an object exists ,
The object detection step includes
A region detecting step of detecting a region of an object from the target image based on the motion vector;
A contour extracting step of extracting a contour of the object from the difference image;
An object region detection step for detecting, as the object region, a region surrounded by the contour extracted in the contour extraction step corresponding to the region detected in the region detection step;
An object detection program characterized by comprising:
JP2014008472A 2014-01-21 2014-01-21 Object detection apparatus, object detection method, and object detection program Expired - Fee Related JP6188592B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014008472A JP6188592B2 (en) 2014-01-21 2014-01-21 Object detection apparatus, object detection method, and object detection program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014008472A JP6188592B2 (en) 2014-01-21 2014-01-21 Object detection apparatus, object detection method, and object detection program

Publications (2)

Publication Number Publication Date
JP2015138319A JP2015138319A (en) 2015-07-30
JP6188592B2 true JP6188592B2 (en) 2017-08-30

Family

ID=53769298

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014008472A Expired - Fee Related JP6188592B2 (en) 2014-01-21 2014-01-21 Object detection apparatus, object detection method, and object detection program

Country Status (1)

Country Link
JP (1) JP6188592B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017018310A (en) * 2015-07-10 2017-01-26 京楽産業.株式会社 Game machine
JP6884219B2 (en) * 2017-02-06 2021-06-09 イデアル・インダストリーズ・ライティング・エルエルシー Image analysis technique
JP6681965B2 (en) * 2018-04-19 2020-04-15 クラウドワークス インコーポレイテッドCrowdWorks, Inc. Apparatus and method for extracting learning target image for autonomous driving
KR102015939B1 (en) * 2018-09-27 2019-08-28 주식회사 크라우드웍스 Method, apparatus and program for sampling a learning target frame image of video for image learning of artificial intelligence and image learning method thereof
US20220148283A1 (en) * 2019-03-28 2022-05-12 Sony Group Corporation Information processing apparatus, information processing method, and program
DE112020001581T5 (en) 2019-03-28 2021-12-30 Sony Group Corporation INFORMATION PROCESSING DEVICE, INFORMATION PROCESSING METHOD AND PROGRAM
CN113379985B (en) * 2020-02-25 2022-09-27 北京君正集成电路股份有限公司 Nursing electronic fence alarm device
CN113379984B (en) * 2020-02-25 2022-09-23 北京君正集成电路股份有限公司 Electronic nursing fence system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0737099A (en) * 1993-07-22 1995-02-07 Nippondenso Co Ltd Moving object detector
JP4330914B2 (en) * 2003-04-09 2009-09-16 株式会社エヌ・ティ・ティ・データ Moving object detection apparatus and moving object detection method
JP4704998B2 (en) * 2006-10-26 2011-06-22 本田技研工業株式会社 Image processing device
JP5507014B2 (en) * 2011-08-10 2014-05-28 富士フイルム株式会社 Moving object detection apparatus and method

Also Published As

Publication number Publication date
JP2015138319A (en) 2015-07-30

Similar Documents

Publication Publication Date Title
JP6188592B2 (en) Object detection apparatus, object detection method, and object detection program
CN107851318B (en) System and method for object tracking
JP6525545B2 (en) INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND COMPUTER PROGRAM
JP6230751B1 (en) Object detection apparatus and object detection method
JP6569385B2 (en) Vehicle detection device, vehicle detection system, vehicle detection method, and vehicle detection program
JP2014137815A (en) System and method for correcting camera image with distortion
JP2006338272A (en) Vehicle behavior detector and vehicle behavior detection method
WO2014002692A1 (en) Stereo camera
JP6592991B2 (en) Object detection apparatus, object detection method, and program
JP6194604B2 (en) Recognizing device, vehicle, and computer executable program
WO2018211930A1 (en) Object detection device, object detection method, and computer-readable recording medium
JP6795224B2 (en) Mobile detection device, mobile detection method, and program
JP2012252501A (en) Traveling path recognition device and traveling path recognition program
JP2018142828A (en) Deposit detector and deposit detection method
JP2008026999A (en) Obstacle detection system and obstacle detection method
JP6221283B2 (en) Image processing apparatus, image processing method, and image processing program
JP6577595B2 (en) Vehicle external recognition device
JP5541099B2 (en) Road marking line recognition device
JP2020201876A (en) Information processing device and operation support system
JP2007233487A (en) Pedestrian detection method, device, and program
JP6949090B2 (en) Obstacle detection device and obstacle detection method
KR101628931B1 (en) Method and apparatus for controlling view angle of blackbox
JP2011203766A (en) Image processing apparatus for vehicle
JP2008040724A (en) Image processing device and image processing method
JP2021051348A (en) Object distance estimation apparatus and object distance estimation method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160120

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20161122

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161213

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170130

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170801

R150 Certificate of patent or registration of utility model

Ref document number: 6188592

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees