JP2005149143A - Object detecting device and method, and computer program - Google Patents
Object detecting device and method, and computer program Download PDFInfo
- Publication number
- JP2005149143A JP2005149143A JP2003385845A JP2003385845A JP2005149143A JP 2005149143 A JP2005149143 A JP 2005149143A JP 2003385845 A JP2003385845 A JP 2003385845A JP 2003385845 A JP2003385845 A JP 2003385845A JP 2005149143 A JP2005149143 A JP 2005149143A
- Authority
- JP
- Japan
- Prior art keywords
- image
- plane
- photographed image
- feature
- detecting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Image Analysis (AREA)
- Image Processing (AREA)
- Closed-Circuit Television Systems (AREA)
Abstract
Description
本発明は、画像の中から目標の物体を検出する物体検出装置または物体検知方法に関する。 The present invention relates to an object detection apparatus or an object detection method for detecting a target object from an image.
従来より、歩行者や侵入者の検知、個人認証、またはフレーミングなどを目的とした人体検知方法が提案されている。 Conventionally, human body detection methods for the purpose of detecting pedestrians and intruders, personal authentication, or framing have been proposed.
人体検知方法として、歩行者が通る場所にカメラを設置しておき、そのカメラで撮影して得た画像を解析して歩行者の画像領域を検出することによって、歩行者を検知する方法が知られている。歩行者の画像領域を検出する方法として、例えば、背景差分を用いる方法、動き差分(時間差分)を用いる方法、オプティカルフローを求める方法、肌色領域を検出する方法、頭部の楕円形状を検出する方法、または眼や鼻などの身体の部位を検出する方法などが提案されている。 As a human body detection method, there is a known method for detecting a pedestrian by installing a camera in a place where a pedestrian passes and analyzing an image captured by the camera to detect an image area of the pedestrian. It has been. As a method for detecting an image area of a pedestrian, for example, a method using a background difference, a method using a motion difference (time difference), a method for obtaining an optical flow, a method for detecting a skin color area, and detecting an elliptical shape of a head A method or a method for detecting a body part such as an eye or a nose has been proposed.
上記の検出方法では、次のような不都合がある場合に歩行者を上手く検出できないことがある。 In the above detection method, there are cases where a pedestrian cannot be detected well when there is the following inconvenience.
例えば、背景画像が肌などの色と近い場合または照明条件の変化によって背景基準画像に誤差が生じた場合は、背景差分が上手く求められないので、背景差分を用いる方法では歩行者を上手く検出ができないことがある。歩行者の移動速度が遅い場合または歩行者が静止している場合は、2枚の画像の差が現れにくいので、動き差分(時間差分)を用いる方法およびオプティカルフローを求める方法では歩行者を上手く検出ができないことがある。 For example, if the background image is close to a color such as skin or if an error occurs in the background reference image due to a change in lighting conditions, the background difference cannot be obtained well, so the method using the background difference can detect pedestrians well. There are things that cannot be done. When the moving speed of the pedestrian is slow or when the pedestrian is stationary, the difference between the two images is unlikely to appear. Therefore, the method using the motion difference (time difference) and the method for obtaining the optical flow are good for the pedestrian. Detection may not be possible.
背景領域に肌色が多く含まれている場合は背景領域を人体の領域と誤認識しやすく、歩行者が後ろを振り返っている場合は肌色領域が小さくなるので、肌色領域を検出する方法では、歩行者を上手く検出ができないことがある。歩行者が帽子、眼鏡、サングラス、またはマスクなどを身に付けている場合は、これらの部位が隠れてしまうので、頭部の楕円形状を検出する方法および眼や鼻などの身体の部位を検出する方法では歩行者を上手く検出ができないことがある。 If the background area contains a lot of skin color, it will be easy to misrecognize the background area as a human body area.If the pedestrian is looking back, the skin color area will be smaller. May not be able to detect a person well. If a pedestrian wears a hat, glasses, sunglasses, or mask, these parts will be hidden, so a method to detect the elliptical shape of the head and body parts such as eyes and nose are detected. This method may not be able to detect pedestrians well.
これらの問題点を解決する方法として、特許文献1に記載されるような方法が提案されている。係る方法によると、特性の異なる複数の被写体抽出を行い、各被写体抽出で抽出された被写体を合成する。そして、もしも合成結果が所定の判定基準を満たしていなければ、さらに特性の異なる補助被写体抽出を行い、合成結果と補助被写体抽出による抽出結果とを用いて主要被写体を抽出する。
As a method for solving these problems, a method as described in
しかし、係る方法では、合成結果が所定の判定基準を満たしているか否かを常に判別しなければならない。また、最初の複数の被写体抽出の設定が適切でなければ、常に追加処理である補助被写体抽出を行わなければならない。したがって、同時に(つまり1つのフレームに対して)実行する処理数が多くなり、処理速度が非常に遅くなってしまう。
本発明は、上記のような問題点に鑑み、目標物の検出を行う際に撮影環境などに不都合が生じても、処理速度および検出精度の低下を抑えつつ当該検出を行うことができるようにすることを目的とする。 In view of the above-described problems, the present invention enables detection to be performed while suppressing a decrease in processing speed and detection accuracy even when there is a problem in a shooting environment or the like when detecting a target. The purpose is to do.
本発明に係る物体検出装置は、画像の中から目標の物体を検出する物体検出装置であって、所定の時間おきに撮影されて得られた撮影画像を入力する画像入力手段と、互いに異なる方法を用いて、前記撮影画像の特徴を検出する複数の特徴検出手段と、時系列上で互いに隣り合う前記撮影画像についてそれぞれ異なる前記特徴検出手段によって前記特徴が検出されるように前記各特徴検出手段を制御する制御手段と、前記撮影画像に写っている前記物体を、いずれかの前記特徴検出手段によって当該撮影画像から検出された前記特徴および当該特徴検出手段以外の特徴検出手段によって当該撮影画像以外の撮影画像から検出された前記特徴に基づいて検出する物体検出手段と、を有することを特徴とする。 An object detection apparatus according to the present invention is an object detection apparatus that detects a target object from an image, and is different from an image input unit that inputs captured images obtained at predetermined time intervals. And a plurality of feature detection means for detecting features of the photographed image and the feature detection means so that the feature detection means is detected by the feature detection means different for the photographed images adjacent to each other in time series. A control means for controlling the object, and the object shown in the photographed image other than the photographed image by the feature detection means other than the feature detection means and the feature detected by the feature detection means. And an object detection means for detecting based on the feature detected from the photographed image.
または、互いに異なる方法を用いて、前記撮影画像の画素面を区画した領域ごとに当該撮影画像に写っている前記物体に対する確からしさを求める、複数の確からしさ算出手段と、時系列上で互いに隣り合う前記撮影画像についてそれぞれ異なる前記確からしさ算出手段によって前記確からしさが求められるように前記各確からしさ算出手段を制御する制御手段と、前記撮影画像に写っている前記物体を、いずれかの前記確からしさ算出手段によって当該撮影画像から求められた前記確からしさおよび当該確からしさ算出手段以外の確からしさ算出手段によって当該撮影画像以外の撮影画像から求められた前記確からしさに基づいて検出する物体検出手段と、を有することを特徴とする。 Alternatively, a plurality of probability calculation means for obtaining a probability of the object appearing in the photographed image for each region dividing the pixel surface of the photographed image using different methods, and adjacent to each other in time series Control means for controlling each of the certainty calculation means so that the certainty is calculated by the different certainty calculation means for each of the matching photographed images, and the object appearing in the photographed image is any one of the certainty Object detection means for detecting based on the likelihood obtained from the photographed image other than the photographed image by the probability computed means other than the photographed image other than the photographed image by the likelihood computed from the photographed image by the likelihood calculating means; It is characterized by having.
前記確からしさを数値によって表し、前記検出手段は、前記撮影画像の前記領域ごとの前記確からしさを表す数値を、同じ位置の前記領域のもの同士で加算し、それらの加算値のピークを調べることによって前記物体を検出するようにしてもよい。 The probability is represented by a numerical value, and the detection means adds the numerical value representing the certainty for each region of the photographed image between the regions at the same position, and examines the peak of the added value. The object may be detected by.
前記物体が人である場合には、前記確からしさ算出手段として、前記撮影画像に対して半楕円形状のテンプレートのテンプレートマッチングを行うことよって前記各領域の前記確からしさを求める手段、前記撮影画像の前記領域における肌の色らしさを検出することによって当該領域の前記確からしさを求める手段、前記撮影画像の前記領域における髪の色らしさを検出することによって当該領域の前記確からしさを求める手段、または前記撮影画像に対して肩形状のテンプレートのテンプレートマッチングを行うことよって前記各領域の前記確からしさを求める手段、を設けることが望ましい。 When the object is a person, as the probability calculation means, means for determining the likelihood of each region by performing template matching of a semi-elliptical template to the photographed image, Means for determining the likelihood of the region by detecting the likelihood of skin color in the region, means for determining the likelihood of the region by detecting the likelihood of hair color in the region of the captured image, or It is desirable to provide means for obtaining the certainty of each region by performing template matching of a shoulder-shaped template on a photographed image.
前記確からしさを、前記物体の所定の位置への近さによって表してもよい。この場合は、前記各領域のうち、前記物体の所定の位置に近いと考えられる領域ほど、確からしさを示す数値が大きくなる。 The certainty may be expressed by the proximity of the object to a predetermined position. In this case, the numerical value indicating the probability increases as the region considered to be closer to the predetermined position of the object among the regions.
本発明によると、目標物の検出を行う際に撮影環境などに不都合または不具合が生じても、処理速度および検出精度をあまり低下させることなく当該検出を行うことができる。 According to the present invention, even if an inconvenience or problem occurs in the shooting environment when detecting a target, the detection can be performed without significantly reducing the processing speed and detection accuracy.
図1は監視システム100の全体的な構成の例を示す図、図2はビデオカメラ2の位置姿勢および撮影状況の例を示す図、図3は人体検出装置1のハードウェア構成の例を示す図、図4は人体検出装置1の機能的構成の例を示す図である。
FIG. 1 is a diagram illustrating an example of the overall configuration of the
図1に示すように、監視システム100は、本発明に係る人体検出装置1、ビデオカメラ2、および通信回線3などによって構成される。人体検出装置1とビデオカメラ2とは、通信回線3を介して互いに接続されている。通信回線3として、LAN、公衆回線、専用線、またはインターネットなどが用いられる。
As shown in FIG. 1, the
ビデオカメラ2は、CCDなどのイメージセンサ、光学系、外部の装置とデータの送受信を行うためのインタフェース、および制御用回路などを備えており、撮影によって得られた画像を画像データ70として人体検出装置1に送信する。
The
このビデオカメラ2は、図2に示すように、店舗、地下街、ビル、またはイベント会場などの施設の通路または出入口などのように、人が通行する場所の天井などに設置される。以下、ビデオカメラ2が施設の通路に設置され、その通路の様子を監視するために使用される場合を例に説明する。また、ビデオカメラ2は、水平画角が60度くらい、検知対象(被写体)との距離すなわち撮影距離が3〜5mくらい、出力する画像の解像度が640×480画素(いわゆるVGA)に設定されているものとする。通路の幅は、1〜1.5mくらいであるものとする。
As shown in FIG. 2, the
人体検出装置1は、図3に示すように、CPU1a、RAM1b、ROM1c、磁気記憶装置(ハードディスク)1d、通信インタフェース1e、表示装置1f、およびマウスまたはキーボードなどの入力装置1gなどによって構成される。
As shown in FIG. 3, the human
磁気記憶装置1dには、図4に示すような画像入力部101、前処理部102、特徴量演算部103、頭部中心度プレーン生成部104、検出処理部105、特徴量演算制御部106、頭部画像表示部107、および頭部画像保存部108、特徴度プレーン記憶部1M1、前フレーム記憶部1M2、テンプレート記憶部1M3、および結果プレーン記憶部1M4などの機能を実現するためのプログラムおよびデータがインストールされている。これらのプログラムおよびデータは必要に応じてRAM1bにロードされ、CPU1aによってプログラムが実行される。
The
この人体検出装置1は、施設の管理室などに設置されており、警備員が管理室に居ながら通路の様子を監視するために使用される。また、ビデオカメラ2によって撮影された画像に写っている通行人の頭部を検出し、頭部を拡大表示しまたは頭部の画像(映像)を保存しておくことができる。人体検出装置1として、ワークステーションまたはパーソナルコンピュータなどが用いられる。
The human
以下、ビデオカメラ2で撮影された画像から歩行者の頭部の中心の位置(例えば、鼻の先端)を検出する際の、図4に示す人体検出装置1の各部の処理内容などについて説明する。
Hereinafter, processing contents of each part of the human
〔検出対象の画像の入力および前処理〕
図5はビデオカメラ2で撮影された画像FGの例を示す図、図6は色空間変換処理の流れの例を説明するフローチャート、図7は切出画像GCの生成方法の例を説明する図、図8は切出縮小画像GSの生成方法の例を説明する図、図9は画像縮小処理の流れの例を説明するフローチャート、図10は時間差分プレーンSTの生成方法の例を示す図、図11は時間差分検出処理の流れの例を説明するフローチャート、図12は空間差分プレーンSSの生成方法の例を示す図、図13は空間差分検出処理の流れの例を説明するフローチャート、図14は論理積プレーンANの生成方法の例を示す図、図15は論理積画像生成処理の流れの例を説明するフローチャート、図16は論理積プレーンANの例を示す図である。
[Input and preprocessing of detection target image]
FIG. 5 is a diagram illustrating an example of an image FG photographed by the
図4の画像入力部101は、ビデオカメラ2から送信されてきた画像データ70の受信処理を行う。これにより、ビデオカメラ2の撮影速度に応じたフレーム数(例えば、毎秒30フレーム)の、図5に示すような画像FG(映像)が得られる。
The
前処理部102は、色空間変換部201、画像縮小処理部202、時間差分算出部203、空間差分算出部204、および論理積画像生成部205などによって構成され、画像FGに写っている歩行者HMNの頭部の中心位置を求める処理に必要な画像を準備する処理を行う。
The preprocessing
色空間変換部201は、画像入力部101によって入力された画像FGがRGB色空間の画像である場合に、この画像のデータをYUV色空間のデータに変換する処理を行う。係る処理は、図6および図7に示す手順で行われる。
When the image FG input by the
画像FGの中から歩行者HMNの頭部が写っていそうな画像領域を図7のように設定する(図6の#101)。以下、係る画像領域を「注目画像領域RC」と記載する。注目画像領域RCは、ビデオカメラ2の位置姿勢および人の頭部のサイズなどに基づいて設定される。または、予めビデオカメラ2で撮影しておいた画像を参照して設定してもよい。本実施形態の人体検出装置1では、注目画像領域RCのサイズおよび形状は640×100画素の長方形であると定められている。したがって、注目画像領域RCの開始アドレス(左上隅の画素の座標)だけを設定すればよい。例えば、図7に示すように、開始アドレスの座標(Xs,Ys)として(0,20)を与えるだけで、終了アドレスすなわち右下隅の画素の座標(Xe,Ye)が自ずと決まり、注目画像領域RCが設定される。
An image area in which the head of the pedestrian HMN is likely to be captured is set as shown in FIG. 7 (# 101 in FIG. 6). Hereinafter, such an image region is referred to as “attention image region RC”. The attention image area RC is set based on the position and orientation of the
画像FGについて、座標(Xs,Ys)の画素からX軸方向(画像の水平方向)に向かって1画素ずつ順番に走査するようにその画素のRGB値をYUV値に変換する(#102でNo、#103、#104)。係る変換は、例えば、その画素のRGB値を次の(1)式に代入することによって行うことができる。 For the image FG, the RGB value of the pixel is converted into a YUV value so that the pixel is sequentially scanned from the pixel at the coordinates (Xs, Ys) in the X-axis direction (the horizontal direction of the image) (No in # 102). , # 103, # 104). Such conversion can be performed, for example, by substituting the RGB value of the pixel into the following equation (1).
Y座標がYsであるライン上にある画素について変換が終わったら(#102でYes)、そのすぐ下のラインつまり「Ys+1」のラインに注目し(#105)、そのライン上にある画素について、同様に、1画素ずつ順番にその画素のRGB値をYUV値に変換する(#102でNo、#103、#104)。以下、座標(Xe,Ye)についての変換が終了するまで、上の処理を繰り返す。 When the conversion is completed for pixels on the line whose Y coordinate is Ys (Yes in # 102), pay attention to the line immediately below that, that is, the line of “Ys + 1” (# 105), and for the pixels on the line, Similarly, the RGB values of the pixels are converted into YUV values in order of each pixel (No in # 102, # 103, # 104). Thereafter, the above processing is repeated until the conversion for the coordinates (Xe, Ye) is completed.
そして、すべての画素についての変換の終了後(#106でYes)、YUV値に変換された注目画像領域RCの画像を切り出すことによって、切出画像GCを生成する(#107)。なお、先に画像FGから注目画像領域RCを切りだしておいて、その注目画像領域RCの全画素に対して変換処理(#103)を施すようにしてもよい。 Then, after the conversion for all the pixels is completed (Yes in # 106), the cut-out image GC is generated by cutting out the image of the target image area RC converted into the YUV value (# 107). Note that the attention image area RC may be cut out from the image FG first, and the conversion process (# 103) may be performed on all the pixels in the attention image area RC.
ビデオカメラ2から入力された画像FGが最初からYUV色空間の画像であった場合は、ステップ#102〜#106の変換処理は実行せず、ステップ#101の注目画像領域RCの設定および#107の切出し処理だけを行って切出画像GCを取得する。
If the image FG input from the
図4に戻って、画像縮小処理部202は、図8に示すように、切出画像GCを所定の倍率(本実施形態では1/4倍)に縮小し、切出縮小画像GSを生成する処理を行う。係る処理は、図9に示すような手順で行われる。
Returning to FIG. 4, as shown in FIG. 8, the image
切出画像GCを、4×4画素の大きさからなるブロックBKに区切っておくとともに、開始アドレスの座標(X,Y)を(0,0)に設定しておく(図9の#111)。切出画像GCの画素のうち、対角線の両端の座標が(4X,4Y)および(4X+3,4Y+3)となるブロックBKに属する画素の画素値(YUV値)を次の(2)式に代入する。 The cut image GC is divided into blocks BK each having a size of 4 × 4 pixels, and the coordinates (X, Y) of the start address are set to (0, 0) (# 111 in FIG. 9). . Of the pixels of the cut-out image GC, the pixel values (YUV values) of the pixels belonging to the block BK whose coordinates at both ends of the diagonal line are (4X, 4Y) and (4X + 3, 4Y + 3) are substituted into the following equation (2). .
ただし、m=4X、n=4Y、である。Q(X,Y)は切出縮小画像GSの座標(X,Y)の画素のYUV値であり、P(m,n)は、切出画像GCの座標(m,n)の画素のYUV値である。 However, m = 4X and n = 4Y. Q (X, Y) is the YUV value of the pixel at the coordinate (X, Y) of the cut-out reduced image GS, and P (m, n) is the YUV of the pixel at the coordinate (m, n) of the cut-out image GC. Value.
これにより、切出画像GCの左上隅のブロックBKのYUV値の平均(単純平均)が算出される(#113)。算出された値が、切出縮小画像GSの左上隅の画素のYUV値となる。 Thereby, the average (simple average) of the YUV values of the block BK at the upper left corner of the cut-out image GC is calculated (# 113). The calculated value is the YUV value of the pixel at the upper left corner of the cut-out reduced image GS.
そのブロックBKの右隣に並ぶ159個のブロックBKについても同様にYUV値の平均を算出し(#113、#114)、切出縮小画像GSの水平方向の1ライン目の残りの159個の画素のYUV値を得る。 The average of the YUV values is similarly calculated for 159 blocks BK arranged to the right of the block BK (# 113, # 114), and the remaining 159 blocks of the first line in the horizontal direction of the cut-out reduced image GS are calculated. Get the YUV value of the pixel.
切出縮小画像GSの2〜100ライン目のYUV値も同様に、切出画像GCの2〜25段目のブロックBKの画素のYUV値の平均を算出することによって取得する(#112〜#116)。そして、切出縮小画像GSの右下隅の画素のYUV値が求められたら(#116でYes)、処理を終了する。 Similarly, the YUV values of the 2nd to 100th lines of the cut-out reduced image GS are obtained by calculating the average of the YUV values of the pixels of the blocks BK in the 2nd to 25th stages of the cut-out image GC (# 112 to ## 116). Then, when the YUV value of the pixel at the lower right corner of the cut-out reduced image GS is obtained (Yes in # 116), the process ends.
このようにして、切出画像GCを縮小し、切出縮小画像GSを生成する。生成された切出縮小画像GSは、後に説明する肌色度プレーンの生成処理、髪色度プレーンの生成処理、時間差分の算出処理、および空間差分の算出処理のために用いられる。また、生成された切出縮小画像GSは、後に説明するように、必要に応じて前フレーム記憶部1M2に記憶しておく。 In this way, the cut-out image GC is reduced, and the cut-out reduced image GS is generated. The generated cut-out reduced image GS is used for a skin chromaticity plane generation process, a hair chromaticity plane generation process, a time difference calculation process, and a space difference calculation process, which will be described later. Further, the generated cut-out reduced image GS is stored in the previous frame storage unit 1M2 as necessary, as will be described later.
図4に戻って、時間差分算出部203は、図10に示すように、画像縮小処理部202によって生成された切出縮小画像GS(図10の説明において、「現切出縮小画像GSc」と記載する。)の明度とそれより前の時刻(例えば、2フレーム前)の切出縮小画像GS(図10の説明において、「前切出縮小画像GSp」と記載する。)の明度との時間差分(フレーム差分)を算出し、時間差分プレーンSTを生成する。生成された時間差分プレーンSTは、現切出縮小画像GScと前切出縮小画像GSpの明度の時間差分画像であると言える。本実施形態では、時間差分プレーンSTの各画素の値を二進数の値(二値)で表している。したがって、時間差分プレーンSTは、白黒画像として表すことができる。時間差分プレーンSTの生成は、図11に示す手順で行われる。
Returning to FIG. 4, the time
まず、開始アドレスの座標(X,Y)を(0,0)に設定しておく(#121)。次の(3)式に基づいて、現切出縮小画像GScおよび前切出縮小画像GSpのそれぞれの(0,0)の画素の明度すなわちYUV値のY成分同士の差(明度差分)を求める。
Buffer=abs|Yc(i,j)−Yp(i,j)| … (3)
ただし、Yc(i、j)、Yp(i、j)はそれぞれ現切出縮小画像GSc、前切出縮小画像GSpの座標(i、j)の画素のYUV値のY成分である。abs|A|は、Aの絶対値である。
First, the coordinates (X, Y) of the start address are set to (0, 0) (# 121). Based on the following equation (3), the brightness of each (0, 0) pixel of the current cut reduced image Gsc and the previous cut reduced image GSp, that is, the difference between the Y components of the YUV values (lightness difference) is obtained. .
Buffer = abs | Yc (i, j) −Yp (i, j) | (3)
However, Yc (i, j) and Yp (i, j) are Y components of the YUV value of the pixel at the coordinates (i, j) of the current cut reduced image GSp and the previous cut reduced image GSp, respectively. abs | A | is the absolute value of A.
得られたBufferを二値化する。例えば、Bufferが閾値THstを超えた場合は両画像の明度差分を「1」とし、閾値THst以下であった場合は明度差分を「0」とする(#123)。YUV値が256階調である場合は、閾値THstとして、例えば「10」を設定しておく。 The obtained buffer is binarized. For example, when Buffer exceeds the threshold value THst, the brightness difference between the two images is set to “1”, and when it is equal to or less than the threshold value THst, the brightness difference is set to “0” (# 123). When the YUV value is 256 gradations, for example, “10” is set as the threshold value THst.
以下、同様に、X軸方向(画像の水平方向)に向かって1画素ずつシフトしながら、互いに対応する画素の明度差分を求める(#123、#124)。右端の画素の明度差分が求められたら(#122でYes)、Y軸方向(画像の垂直方向)に1画素シフトし(#125)、同様に、左端から右端に向かって明度差分を求める(#123、#124)。そして、右下隅の画素の明度差分が求められたら(#126でYes)、処理を終了する。このようにして、時間差分プレーンSTが生成される。 Similarly, the brightness difference between the corresponding pixels is obtained while shifting one pixel at a time in the X-axis direction (the horizontal direction of the image) (# 123, # 124). When the brightness difference of the rightmost pixel is obtained (Yes in # 122), the pixel is shifted by one pixel in the Y-axis direction (vertical direction of the image) (# 125), and similarly, the brightness difference is obtained from the left edge toward the right edge ( # 123, # 124). When the brightness difference of the pixel in the lower right corner is obtained (Yes in # 126), the process is terminated. In this way, the time difference plane ST is generated.
図4に戻って、空間差分算出部204は、図12および図13に示す手順で、画像縮小処理部202によって生成された切出縮小画像GSの空間差分を算出し、空間差分プレーンSS(空間差分画像)を生成する。
Returning to FIG. 4, the spatial
切出縮小画像GSの各画素に対して空間差分処理を施す(図13の#133)。例えば、図11で説明した時間差分検出処理の場合と同様に、左上隅の画素から順に右下隅の画素まで空間差分処理を施す。 Spatial difference processing is performed on each pixel of the cut-out reduced image GS (# 133 in FIG. 13). For example, as in the case of the time difference detection process described with reference to FIG. 11, the spatial difference process is performed from the upper left corner pixel to the lower right corner pixel in order.
空間差分処理は、図12に示すように、まず、処理対象の画素およびその周囲にある8つの画素の画素値を次の(4)式および(5)式に代入する。つまり、SOBELフィルタを掛ける。 In the spatial difference processing, as shown in FIG. 12, first, the pixel values of the pixel to be processed and the surrounding eight pixels are substituted into the following equations (4) and (5). That is, the SOBEL filter is applied.
ただし、P(i,j)は切出縮小画像GSの(i,j)の画素の明度(Y成分)の値であり、Q1(i,j)およびQ2(i,j)はそれぞれ切出縮小画像GSの(i,j)の画素についての水平エッジ検出用垂直SOBELフィルタおよび垂直エッジ検出用水平SOBELフィルタによる出力結果である。また、K1(m,n)およびK2(m,n)は下記に示すような値を持つ水平エッジ検出用垂直SOBELフィルタおよび垂直エッジ検出用水平SOBELフィルタである。 However, P (i, j) is the value of the brightness (Y component) of the pixel (i, j) of the cut-out reduced image GS, and Q1 (i, j) and Q2 (i, j) are cut out respectively. It is the output result by the horizontal edge detection vertical SOBEL filter and the vertical edge detection horizontal SOBEL filter for the pixel (i, j) of the reduced image GS. K1 (m, n) and K2 (m, n) are a horizontal edge detecting vertical SOBEL filter and a vertical edge detecting horizontal SOBEL filter having values as shown below.
算出されたQ1(i,j)およびQ2(i,j)の値を次の(6)式に代入することによって、SobelプレーンSBを求める(図12の#141)。 The Sobel plane SB is obtained by substituting the calculated values of Q1 (i, j) and Q2 (i, j) into the following equation (6) (# 141 in FIG. 12).
このSobelプレーンSBを、次の(7)式に示す平滑化フィルタを掛けることによって平滑化する(#142)。 The Sobel plane SB is smoothed by applying a smoothing filter shown in the following equation (7) (# 142).
ただし、QS(i,j)は平滑化されたSobelプレーンSBの座標(i,j)の画素の明度(Y成分)の値であり、KS(m,n)は下記に示すような値を持つ平滑化フィルタである。 However, QS (i, j) is the value of the brightness (Y component) of the pixel at the coordinates (i, j) of the smoothed Sobel plane SB, and KS (m, n) is a value as shown below. This is a smoothing filter.
そして、次の(8)式に基づいて二値化の処理を行う(#143)。 Then, binarization processing is performed based on the following equation (8) (# 143).
ただし、Buffer=QS(i,j)−Sbl(i,j)、である。Thssは閾値である。THssとして、例えば「6」が設定される。 However, Buffer = QS (i, j) −Sbl (i, j). Thss is a threshold value. For example, “6” is set as THss.
このような演算を行うことによって、空間差分プレーンSSが生成される。なお、空間差分プレーンSSは、白黒画像として表される。 By performing such an operation, a spatial difference plane SS is generated. The spatial difference plane SS is represented as a black and white image.
図4に戻って、論理積画像生成部205は、図14および図15に示すように、時間差分算出部203によって算出(生成)された時間差分プレーンSTおよび空間差分算出部204によって算出された空間差分プレーンSSの互いに対応する画素の画素値(二値)の論理積を算出することによって、論理積プレーンANを生成する。
Returning to FIG. 4, the logical product
この論理積プレーンANには、図16に示すように、動いている物体のエッジ(輪郭)だけが表れる。つまり、論理積プレーンANは、動体のエッジ画像(輪郭画像)であると言える。論理積プレーンANを生成する手順は、図15のフローチャートに示す通りである。なお、図15のフローチャートでは、左上隅の画素から右下隅の画素まで順に走査するように論理積演算処理(#153)を行うことを説明している。このような順で処理を行う点は、図11および図13の場合と同じであるので、詳しい説明は省略する。以下、図19、図20、図25、図26などについても同様である。 In the logical product plane AN, as shown in FIG. 16, only the edge (contour) of the moving object appears. That is, it can be said that the logical product plane AN is an edge image (contour image) of a moving object. The procedure for generating the logical product plane AN is as shown in the flowchart of FIG. In the flowchart of FIG. 15, the AND operation process (# 153) is described so as to sequentially scan from the upper left corner pixel to the lower right corner pixel. Since the processing in this order is the same as in the case of FIGS. 11 and 13, detailed description thereof is omitted. The same applies to FIG. 19, FIG. 20, FIG. 25, FIG.
〔特徴度プレーンの生成〕
図17は4種類の特徴度プレーン8の例を示す図、図18は肌色度とYUV空間の画素値のU成分の値およびV成分の値との関係を示す図、図19は肌色度プレーン生成処理の流れの例を説明するフローチャート、図20は髪色度プレーン生成処理の流れの例を説明するフローチャート、図21はオフセット補正について説明する図、図22は髪色度とYUV空間の画素値のU成分の値およびV成分の値との関係を示す図、図23はテンプレートTP1、TP2の例を示す図、図24はテンプレートTP1、TP2の作成方法の例を示す図、図25は中心度プレーン算出処理の流れの例を説明するフローチャート、図26は投票処理の流れの例を説明するフローチャート、図27はテンプレートTP1によるテンプレートマッチングの方法の例を説明する図、図28は特徴度プレーン記憶部1M1の高齢の例を示す図、図29は特徴量演算制御部106による特徴量演算部103の制御方法の例を示す図である。
[Generation of feature plane]
17 is a diagram showing examples of four types of
図4に戻って、特徴量演算部103は、肌色度プレーン生成部301、半楕円中心度プレーン生成部302、髪色度プレーン生成部303、および肩中心度プレーン生成部304などによって構成され、4種類の特徴度プレーン8(肌色度プレーン8FC、半楕円中心度プレーン8SE、髪色度プレーン8HC、肩中心度プレーン8SH)を生成するための演算処理を行う。これらの特徴度プレーン8は、図17に示すように、各画素の値の大きさを濃さで表現した濃淡画像(明度画像)として表される。後に説明する頭部中心度プレーン84(図30参照)も同様である。
Returning to FIG. 4, the feature
肌色度プレーン生成部301は、画像縮小処理部202によって生成された切出縮小画像GSの各画素の肌色度を検出することによって、肌色度プレーン8FCを生成する。「肌色度」とは、肌の色らしさ、を意味する。つまり、肌色に近いまたは類似しているほど肌色度は大きくなる。本実施形態では、画素値(ここでは、YUV値)のU成分およびV成分の値がそれぞれFCu、FCvの場合に、肌色度が最大となるように設定している。例えば、ベージュ色を肌の色とする場合は、FCuおよびFCvとしてそれぞれ「107」および「157」を設定しておく。肌色度は、次の(9)式に画素値を代入することによって算出される。
The skin chromaticity
ただし、abs|A|は、Aの絶対値である。 Where abs | A | is the absolute value of A.
なお、(9)式に示す、画素のU成分の値およびV成分の値と肌色度の大きさとの関係を濃淡で表すと、およそ図18のように表される。 Note that the relationship between the U component value and the V component value of the pixel and the skin chromaticity shown in the equation (9) is expressed as shown in FIG.
切出縮小画像GSの各画素の肌色度の検出処理の手順は、図19のステップ#161〜#166に示す通りである。つまり、切出縮小画像GSの各画素の肌色度を順に求めることによって(#163)、肌色度検出プレーンを生成する。 The procedure for detecting the skin chromaticity of each pixel of the cut-out reduced image GS is as shown in steps # 161 to # 166 of FIG. That is, the skin chromaticity detection plane is generated by sequentially obtaining the skin chromaticity of each pixel of the cut-out reduced image GS (# 163).
ところで、ビデオカメラ2で撮影された画像FG(図5参照)に歩行者HMNの顔(頭部)が写っていれば、ステップ#161〜#166の処理によって得られる肌色度検出プレーンの中の肌色度の高い画像領域とその歩行者HMNの頭部の領域とは、ほぼ一致するはずである。したがって、肌色度検出プレーンの中の肌色度のピークがある画素または画像領域に、検索の目標である歩行者HMNの頭部の中心があると考えられる。
By the way, if the face (head) of the pedestrian HMN is shown in the image FG (see FIG. 5) photographed by the
しかし、顔の中はすべてが肌色というわけではなく、眉毛、目、鼻の穴、および唇といった肌色以外の色をした部位が含まれている。また、歩行者HMNが眼鏡を掛けている場合もあり得るし、元の画像FGそのものにノイズが含まれている場合もあり得る。そこで、本実施形態では、頭部の中心の検出精度を高めるために例えば次のような補正処理を行う。 However, not all of the face is skin-colored, but includes parts with colors other than skin-colored, such as eyebrows, eyes, nostrils, and lips. Further, the pedestrian HMN may be wearing glasses, or the original image FG itself may contain noise. Therefore, in the present embodiment, for example, the following correction process is performed in order to increase the accuracy of detecting the center of the head.
すなわち、まず、肌色以外の部分およびノイズなどを除去するために、ステップ#161〜#166によって得られた肌色度検出プレーンに対して3×3の輝度(明度)の最大値フィルタを掛けることによってDilation処理を行う(#167)。そして、先鋭度を高めるために、Dilation処理がなされた肌色度検出プレーンに対して3×3の輝度(明度)の最小値フィルタを掛けることによってErosion処理を行い、さらにErosion処理の処理前の肌色度検出プレーンと処理後の肌色度検出プレーンとの平均処理を行う(#168)。ステップ#168の処理は、「(HW/2)+1」回繰り返す。「HW」は、切出縮小画像GSに写っていると想定される検出目標である頭部の幅を示す画素数である。例えば、頭部の幅を示す画素数が「7」であると想定されている場合は、4回または5回繰り返すことになる。 That is, first, a 3 × 3 luminance (brightness) maximum value filter is applied to the skin chromaticity detection plane obtained in steps # 161 to # 166 in order to remove portions other than the skin color and noise. Dilation processing is performed (# 167). In order to increase the sharpness, Erosion processing is performed by applying a 3 × 3 luminance (lightness) minimum value filter to the skin chromaticity detection plane that has been subjected to Dilation processing, and the skin color before the processing of Erosion processing is performed. An average process of the degree detection plane and the processed skin color degree detection plane is performed (# 168). The process of step # 168 is repeated “(HW / 2) +1” times. “HW” is the number of pixels indicating the width of the head, which is a detection target assumed to appear in the cut-out reduced image GS. For example, when it is assumed that the number of pixels indicating the width of the head is “7”, the process is repeated four or five times.
以上のように、切出縮小画像GSの肌色度を検出し(#161〜#166)、検出精度を高めるための補正処理(#167、#168)を実行することによって、図17(a)に示すような肌色度プレーン8FCが生成される。 As described above, the skin chromaticity of the cut-out reduced image GS is detected (# 161 to # 166), and the correction processing (# 167, # 168) for improving the detection accuracy is executed, thereby FIG. A skin chromaticity plane 8FC as shown in FIG.
図4に戻って、髪色度プレーン生成部303は、画像縮小処理部202によって生成された切出縮小画像GSの各画素の髪色度を検出することによって、図17(c)に示すような髪色度プレーン8HCを生成する。「髪色度」とは、髪の色らしさ、を意味する。つまり、髪の色に近いまたは類似しているほど髪色度は大きくなる。本実施形態では、画素値のU成分およびV成分の値がそれぞれHCu、HCvの場合に、髪色度が最大であると設定している。例えば、黒色を髪の色とする場合は、FCuおよびFCvとしてそれぞれ「112」および「142」を設定しておく。
Returning to FIG. 4, the hair chromaticity
髪色度プレーン8HCを生成する手順は、肌色度プレーン8FCの生成する手順と基本的に同様である。すなわち、図20に示すように、切出縮小画像GSの各画素について髪色度を算出し(#171〜#176)、頭部の中心の検出精度を高めるための処理を行う(#177、#178)。ただし、髪色度の検出関数として、(9)式の関数の代わりに、次の(10)式の関数を用いる。 The procedure for generating the hair chromaticity plane 8HC is basically the same as the procedure for generating the skin chromaticity plane 8FC. That is, as shown in FIG. 20, the hair chromaticity is calculated for each pixel of the cut-out reduced image GS (# 171 to # 176), and processing for increasing the accuracy of detecting the center of the head is performed (# 177, # 178). However, the function of the following equation (10) is used as a hair chromaticity detection function instead of the function of equation (9).
図21に示すように、高い髪色度が検出される領域は、髪の毛の生えている頭の上部の領域RYkである。しかし、前に述べたように、本実施形態では、頭部の中心(点Ptc)を検出することが目的である。そこで、高い髪色度が検出されると予測される領域の中心(点Ptk)と頭部の中心(点Ptc)とができるだけ一致するように、(10)式では、Y軸方向(垂直方向)にずれの調整(オフセット補正)を行っている。(10)式中の「offset」はオフセット値であり、例えば、offset=HS/2、と設定される。「HW」は、切出縮小画像GSに写っていると想定される検出目標である頭部の頂から顎までの長さを示す画素数である。例えば、長さを示す画素数が「9」であると想定されている場合は、offset=4.5、となる。 As shown in FIG. 21, the region where high hair chromaticity is detected is a region RYk at the top of the head where the hair grows. However, as described above, the purpose of this embodiment is to detect the center of the head (point Ptc). Therefore, in the equation (10), the Y-axis direction (vertical direction) is used so that the center of the region where the high hair chromaticity is detected (point Ptk) matches the center of the head (point Ptc) as much as possible. ) Is adjusted for offset (offset correction). In the equation (10), “offset” is an offset value, and is set to, for example, offset = HS / 2. “HW” is the number of pixels indicating the length from the top of the head to the chin, which is a detection target assumed to be captured in the cut-out reduced image GS. For example, when the number of pixels indicating the length is assumed to be “9”, offset = 4.5.
なお、(10)式に示す画素のU成分の値およびV成分の値と髪色度の大きさとの関係を濃淡で表すと、図22のように表される。 The relationship between the U component value and the V component value of the pixel and the hair chromaticity shown in equation (10) is expressed as shown in FIG.
図4に戻って、半楕円中心度プレーン生成部302は、論理積画像生成部205によって生成された論理積プレーンAN(エッジ画像)の各画素の半楕円中心度を検出することによって、図17(b)に示すような半楕円中心度プレーン8SEを生成する。「半楕円中心度」とは、論理積プレーンANに対して図23(a)の半楕円形のテンプレートTP1を用いたテンプレートマッチングを行った際に、論理積プレーンANの画素がそのテンプレートの中心位置(基準点CT1)にどれだけ近いか、つまり、中心らしさ、を意味する。テンプレートマッチングの方法として、例えば、後述するHough変換法に基づく方法が用いられる。
Returning to FIG. 4, the semi-elliptical centrality
テンプレートTP1および後に説明する肩中心度プレーン生成部304で使用されるテンプレートTP2は、例えば、次のようにして作成される。
The template TP1 and the template TP2 used in the shoulder centrality
まず、通路の基準位置L1(図2参照)にモデルとなる人を立たせ、ビデオカメラ2によって撮影を行う。モデルとなる人は、標準的な体型であることが望ましい。図24(a)に示すように、撮影によって得られた画像の中のモデルの輪郭部分に注目する。
First, a person who becomes a model stands at the reference position L1 (see FIG. 2) of the passage and the
図24(b)に示すように、モデルの輪郭から頭部の上半分を示す1本の開曲線および両肩を示す2本の開曲線をそれぞれエッジEG1、EG2として抽出する。この際に、エッジEG1、EG2から離れた所定の位置をそれぞれ基準点CT1、CT2として定める。基準点CT1、CT2は、それぞれ、テンプレートTP1、TP2の基準位置(中心位置)を示すものである。なお、基準点CT1、CT2をそれぞれエッジEG1、EG2上の所定の位置に定めてもよい。この基準点CT1、CT2もエッジEG1、EG2とともに抽出する。 As shown in FIG. 24B, one open curve indicating the upper half of the head and two open curves indicating both shoulders are extracted as edges EG1 and EG2, respectively, from the contour of the model. At this time, predetermined positions apart from the edges EG1 and EG2 are determined as reference points CT1 and CT2, respectively. The reference points CT1 and CT2 indicate the reference positions (center positions) of the templates TP1 and TP2, respectively. The reference points CT1 and CT2 may be set at predetermined positions on the edges EG1 and EG2, respectively. The reference points CT1 and CT2 are also extracted together with the edges EG1 and EG2.
すると、図24(b)(c)に示すようなテンプレート画像が得られる。そして、エッジEG1、EG2をそれぞれ基準点CT1、CT2を中心に半回転(180度回転)させる。このようにして、テンプレートTP1、TP2が作成される。テンプレートTP1、TP2は、図4のテンプレート記憶部1M3に記憶(格納)しておく。 Then, a template image as shown in FIGS. 24B and 24C is obtained. Then, the edges EG1 and EG2 are rotated halfway (rotated 180 degrees) around the reference points CT1 and CT2, respectively. In this way, templates TP1 and TP2 are created. The templates TP1 and TP2 are stored (stored) in the template storage unit 1M3 of FIG.
または、論理積プレーンANに写る頭部の大きさがそれほど大きくないと想定される(例えば、縦横10画素前後くらいと想定される場合)は、その想定される大きさの半楕円をCGソフトなどで作成し、これをテンプレートTP1として用いてもよい。テンプレートTP2についても同様である。 Alternatively, if the size of the head shown in the logical product plane AN is assumed not to be very large (for example, assumed to be about 10 pixels in length and width), a semi-ellipse having the assumed size is represented by CG software or the like. May be used as the template TP1. The same applies to the template TP2.
図24(a)のα1、α2は、テンプレートマッチングの際に位置のずれの調整(オフセット補正)のために用いられるオフセット値である。前に述べたように、本実施形態では頭部の中心を検出することが目的である。したがって、半楕円中心度のピークの位置と頭部の中心位置とができるだけ一致することが望まれるからである。 Α1 and α2 in FIG. 24A are offset values used for adjustment of position shift (offset correction) in template matching. As described above, the purpose of this embodiment is to detect the center of the head. Therefore, it is desired that the peak position of the semi-elliptical centrality matches the center position of the head as much as possible.
半楕円中心度プレーン8SEを生成する手順は、図25に示す通りである。すなわち、まず、論理積プレーンANの画素ごとに1つずつカウンタを用意し、これらのカウンタを「0」にリセットし(#180)、開始アドレスの座標を(0,0)に設定しておく(#181)。論理積プレーンANにおける(0,0)の画素を注目画素として、投票処理を行う(#183)。投票処理は、図26に示すような手順で行われる。 The procedure for generating the semi-elliptical centrality plane 8SE is as shown in FIG. That is, first, one counter is prepared for each pixel of the AND plane AN, these counters are reset to “0” (# 180), and the coordinates of the start address are set to (0, 0). (# 181). The voting process is performed with the pixel of (0, 0) in the logical product plane AN as the target pixel (# 183). The voting process is performed according to the procedure shown in FIG.
まず、論理積プレーンANに写っているエッジ(輪郭線)の上にその注目画素があるか否かを判別する(#191)。エッジ上になければ(#191でNo)、その注目画素についての投票処理は終了し、図25のステップ#184に進む。 First, it is determined whether or not the pixel of interest is on an edge (outline) reflected in the logical product plane AN (# 191). If it is not on the edge (No in # 191), the voting process for that pixel of interest ends, and the process proceeds to step # 184 in FIG.
図27(b)に示すように、注目画素が論理積プレーンANのエッジRN上にある場合は(#191でYes)、その注目画素とテンプレートTP1の基準点CT1とが一致するように、論理積プレーンANの上にテンプレートTP1を重ねる(#192)。 As shown in FIG. 27B, when the target pixel is on the edge RN of the logical product plane AN (Yes in # 191), the logical value is set so that the target pixel matches the reference point CT1 of the template TP1. The template TP1 is overlaid on the product plane AN (# 192).
テンプレートTP1と重なった論理積プレーンANのtxsize×tysizeの領域(図27(b)の点線領域)に注目し、ステップ#193〜#198の処理を行う。すなわち、その点線領域の中の、エッジEG1と重なった画素を見つける。そして、図27(d)に示すように、見つかった画素からオフセット値α1(図24(a)参照)だけ下にシフト(オフセット補正)した画素のカウンタに「1」を加算して1票を投じる。 Paying attention to the txsize × size area (dotted line area in FIG. 27B) of the logical product plane AN overlapping the template TP1, the processes of steps # 193 to # 198 are performed. That is, a pixel that overlaps the edge EG1 is found in the dotted line area. Then, as shown in FIG. 27D, “1” is added to the counter of the pixel shifted (offset correction) by the offset value α1 (see FIG. 24A) from the found pixel to obtain one vote. cast.
なお、図27(c)において、太枠の正方形は論理積プレーンANのエッジRN上の画素を示し、黒く塗りつぶした正方形は注目画素を示し、斜線で塗りつぶした正方形はテンプレートTP1のエッジEG1が重なった画素を示している。 In FIG. 27C, a thick square indicates a pixel on the edge RN of the logical product plane AN, a black square indicates a target pixel, and a hatched square overlaps the edge EG1 of the template TP1. The pixel is shown.
図25に戻って、論理積プレーンANの他の画素についても同様に、これを注目画素として投票処理を行う(#182〜#186)。以上のように投票を行った結果、各画素のカウンタにカウントされた得票数の分布が、図17(b)に示す半楕円中心度プレーン8SEとなる。 Returning to FIG. 25, similarly, the other pixels of the AND plane AN are similarly subjected to voting processing (# 182 to # 186). As a result of voting as described above, the distribution of the number of votes counted by the counter of each pixel becomes a semi-elliptical centrality plane 8SE shown in FIG.
図4に戻って、肩中心度プレーン生成部304は、論理積画像生成部205によって生成された論理積プレーンAN(エッジ画像)の各画素の肩中心度を検出することによって、図17(d)に示すような肩中心度プレーン8SHを生成する。「肩中心度」とは、論理積プレーンANに対して図23(b)の肩の形状をしたテンプレートTP2によるテンプレートマッチングを行った際に、論理積プレーンANの画素がそのテンプレートの中心位置(基準点CT2)にどれだけ近いか、つまり、中心らしさ、を意味する。
Returning to FIG. 4, the shoulder center degree
肩中心度プレーン8SHを生成する手順は、図25および図26に示す半楕円中心度プレーン8SEを生成する手順と同様である。ただし、テンプレートマッチングのためのテンプレートTP2(図23(b)参照)を使用し、オフセット補正のためのオフセット値としてα2(図24(a)参照)を使用する。 The procedure for generating the shoulder centrality plane 8SH is the same as the procedure for generating the semi-elliptical centrality plane 8SE shown in FIGS. However, template TP2 (see FIG. 23B) for template matching is used, and α2 (see FIG. 24A) is used as an offset value for offset correction.
特徴度プレーン記憶部1M1は、図28に示すように、肌色度プレーン記憶領域MFC、半楕円中心度プレーン記憶領域MSE、髪色度プレーン記憶領域MHC、および肩中心度プレーン記憶領域MSHなどの記憶領域を有する。これらの記憶領域には、それぞれ、肌色度プレーン生成部301、半楕円中心度プレーン生成部302、髪色度プレーン生成部303、および肩中心度プレーン生成部304で生成された最新の肌色度プレーン8FC、半楕円中心度プレーン8SE、髪色度プレーン8HC、および肩中心度プレーン8SHが記憶(格納)される。
As shown in FIG. 28, the feature plane storage unit 1M1 stores a skin chromaticity plane storage area MFC, a semi-elliptical centrality plane storage area MSE, a hair chromaticity plane storage area MHC, a shoulder centrality plane storage area MSH, and the like. Has a region. In these storage areas, the latest skin chromaticity planes generated by the skin chromaticity
特徴量演算制御部106は、図29に示すようなタイミングで、特徴量演算部103を構成する各プレーン生成部301〜304の制御を行う。
The feature amount
まず、画像入力部101によって「4n−3」フレーム目(1、5、9、…フレーム目)の画像FGが入力されると、特徴量演算制御部106は、その画像FGより画像縮小処理部202によって生成される切出縮小画像GSに基づいて肌色度プレーン8FCを生成するように、肌色度プレーン生成部301に対して指令を与える(図29(a))。ただし、図29において「n」は正の整数である。肌色度プレーン記憶領域MFCでは、それまで格納されていた肌色度プレーン8FCが削除され、今回生成された新しい肌色度プレーン8FCが格納される。つまり、肌色度プレーン8FCが更新(置換)される。
First, when the image FG of the “4n-3” frame (1, 5, 9,...) Is input by the
その次の画像FGが入力されると、その画像FGより論理積画像生成部205によって生成される論理積プレーンANに基づいて半楕円中心度プレーン8SEを生成するように、半楕円中心度プレーン生成部302に対して指令を与える(図29(b))。半楕円中心度プレーン記憶領域MSEでは、半楕円中心度プレーン8SEが新しいものに更新される。なお、論理積プレーンANが生成される過程で生成された切出縮小画像GSは、2フレーム後に論理積プレーンANを生成する際に使用するために、前フレーム記憶部1M2(図4参照)に記憶される。
When the next image FG is input, the semi-elliptical centrality plane generation is performed so as to generate the semi-elliptical centrality plane 8SE based on the logical product plane AN generated by the logical product
さらにその次の画像FGが入力されると、その画像FGより生成される切出縮小画像GSに基づいて髪色度プレーン8HCを生成するように、髪色度プレーン生成部303に対して指令を与える(図29(c))。髪色度プレーン記憶領域MHCでは、髪色度プレーン8HCが新しいものに更新される。
Further, when the next image FG is input, a command is given to the hair chromaticity
さらにその次の画像FGが入力されると、その画像FGより生成される論理積プレーンANに基づいて肩中心度プレーン8SHを生成するように、肩中心度プレーン生成部304に対して指令を与える(図29(d))。肩中心度プレーン記憶領域MSHでは、肩中心度プレーン8SHが新しいものに更新される。なお、論理積プレーンANが生成される過程で生成された切出縮小画像GSは、前フレーム記憶部1M2(図4参照)に記憶される。
Further, when the next image FG is input, a command is given to the shoulder center degree
そして、さらにその次の画像FGが入力されると、図29(a)に戻って、肌色度プレーン生成部301に対して前述の指令を与える。以下、同様に、図29(b)以降の指令を繰り返し行う。
When the next image FG is further input, the process returns to FIG. 29A and gives the above-described command to the skin chromaticity
〔頭部の中心の検出〕
図30は頭部中心度プレーン84の例を示す図、図31は頭部中心検出処理の処理の流れの例を説明するフローチャート、図32は矩形領域KRの抽出の例を示す図、図33は頭部抽出処理の流れの例を説明するフローチャート、図34は頭部検出結果プレーンTKの生成方法の例を説明する図、図35は探索領域RTおよび二乗和算出範囲NRの例を示す図、図36は矩形領域KR1から抜き出されまたはクリアされる対象となる領域TR1、TR2の形状およびサイズの例を説明する図、図37は前のフレームの頭部検出結果プレーンTKを使用して頭部中心の検出を行う方法の例を示す図である。
[Detection of the center of the head]
30 is a diagram illustrating an example of the head
図4に戻って、頭部中心度プレーン生成部104は、図30に示すような頭部中心度プレーン84を生成するための処理を行う。「頭部中心度」とは、頭部の中心らしさ、すなわち、頭部の中心までの近さを示す度合いを意味する。頭部中心度プレーン84は、図17に示す4種類の特徴度プレーン8すなわち肌色度プレーン8FC、半楕円中心度プレーン8SE、髪色度プレーン8HC、および肩中心度プレーン8SHに基づいて次のようにして生成される。
Returning to FIG. 4, the head centrality
例えば、21フレーム目の画像FGが入力されたとする。このタイミングにおいては、図29から分かるように、4種類の特徴度プレーン8のうちの肌色度プレーン8FCだけが生成される。頭部中心度プレーン生成部104は、新たに生成されたこの肌色度プレーン8FCを取得するとともに、前に生成された他の3種類の特徴度プレーン8(18フレーム目の半楕円中心度プレーン8SE、19フレーム目の髪色度プレーン8HC、および20フレーム目の肩中心度プレーン8SH)を特徴度プレーン記憶部1M1より取得する。そして、これら4つの特徴度プレーン8の互いに対応する画素のプレーン値(肌色度、半楕円中心度、髪色度、および肩中心度)を、次の(11)式に代入する。
TB(i,j)={Min(fc(i,j),hc(i,j))
+Min(fc(i,j),se(i,j))
+Min(hc(i,j),se(i,j))
+Min(fc(i,j),sh(i,j))
+Min(hc(i,j),sh(i,j))
+se(i,j)+sh(i,j)}/7 … (11)
ただし、Min(A,B)は、AおよびBのうち小さいほうの値を選択して出力する関数である。TB(i,j)は、頭部中心度プレーン84の座標(i,j)の画素の画素値を意味する。fc(i,j)は、肌色度プレーン8FCの座標(i,j)の画素の画素値(肌色度)を意味する。se(i,j)は、半楕円中心度プレーン8SEの座標(i,j)の画素の画素値(半楕円中心度)を意味する。hc(i,j)は、髪色度プレーン8HCの座標(i,j)の画素の画素値(髪色度)を意味する。sh(i,j)は、肩中心度プレーン8SHの座標(i,j)の画素の画素値(肩中心度)を意味する。
For example, assume that an image FG of the 21st frame is input. At this timing, as can be seen from FIG. 29, only the skin color plane 8FC of the four types of
TB (i, j) = {Min (fc (i, j), hc (i, j))
+ Min (fc (i, j), se (i, j))
+ Min (hc (i, j), se (i, j))
+ Min (fc (i, j), sh (i, j))
+ Min (hc (i, j), sh (i, j))
+ Se (i, j) + sh (i, j)} / 7 (11)
However, Min (A, B) is a function that selects and outputs the smaller value of A and B. TB (i, j) means the pixel value of the pixel at the coordinates (i, j) of the
このように、160×25個の画素についてTBを算出することによって、図30に示す頭部中心度プレーン84が生成される。
In this way, by calculating TB for 160 × 25 pixels, the
検出処理部105は、頭部中心度ピーク検出部501、検出結果プレーン生成部502、および計数処理部503などによって構成され、頭部中心度プレーン生成部104で生成された頭部中心度プレーン84に基づいて、画像FG(図5参照)に写っている歩行者HMNの頭部の中心を検出する処理を行う。
The
頭部中心度ピーク検出部501は、検出対象の画像FGに係る頭部中心度プレーン84の中の、歩行者HMNの頭部の中心があると予測される位置を1つまたは複数検出する。検出結果プレーン生成部502は、頭部中心度ピーク検出部501によって検出された位置に基づいて、歩行者HMNの頭部の中心の位置を最終的に決定し、その結果を示す頭部検出結果プレーンTKを生成する。これらの処理は、図31に示すような手順で行われる。
The head centrality
まず、頭部中心度プレーン84の各画素の濃度(頭部中心度)の値に応じて図32に示すような斜影ヒストグラムを求める(図31の#201)。水平方向の斜影ヒストグラムに注目し、座標(0,0)から水平方向に向かって順に各画素の値を調べ、閾値HIST_MIN(例えば、「10」)以上の度数が連続している範囲を検出する(#202、#203)。何も検出されなかった場合は(#204でNo)、検出対象の画像FGには歩行者が写っていないものとして、この検出処理を終了する。 First, an oblique histogram as shown in FIG. 32 is obtained according to the density (head center degree) value of each pixel of the head center degree plane 84 (# 201 in FIG. 31). Paying attention to the horizontal shading histogram, the value of each pixel is examined in order from the coordinate (0, 0) in the horizontal direction, and a range in which the frequency equal to or higher than the threshold value HIST_MIN (for example, “10”) is detected is detected. (# 202, # 203). If nothing is detected (No in # 204), it is assumed that no pedestrian is shown in the detection target image FG, and this detection process is terminated.
検出された場合は(#204でYes)、検出されたその水平方向の範囲に属する領域の垂直方向の斜影ヒストグラムに注目し、閾値HIST_MIN以上の度数が連続している範囲を検出する(#206)。 If it is detected (Yes in # 204), the vertical shading histogram of the area belonging to the detected horizontal range is noticed, and a range in which the frequency equal to or higher than the threshold HIST_MIN is detected (# 206). ).
連続している範囲が見つからなかった場合は(#207でNo)、ステップ#203に戻って、閾値HIST_MIN以上の度数が連続している水平方向の範囲がほかにないかどうか調べる。 If no continuous range is found (No in # 207), the process returns to step # 203 to check whether there is any other horizontal range in which the frequency equal to or higher than the threshold value HIST_MIN is continuous.
見つかった場合は(#207でYes)、ステップ#203、#206で見つかった範囲の矩形領域KR(例えば、図32のxa≦x≦xb,ya≦y≦ybにある矩形領域KR1)に対して、次に説明する頭部抽出処理を行う(#208)。 If found (Yes in # 207), for the rectangular area KR in the range found in steps # 203 and # 206 (for example, the rectangular area KR1 in xa ≦ x ≦ xb, ya ≦ y ≦ yb in FIG. 32) Then, the head extraction process described below is performed (# 208).
図33に示すように、矩形領域KR(例えば、矩形領域KR1)の中から画素値(頭部中心度)のピークを検出する(#221)。すると、図34(a)に示すように、ピークの画素(以下、「ピーク画素Pk」と記載する。)が3つ検出される。 As shown in FIG. 33, the peak of the pixel value (head centrality) is detected from the rectangular area KR (for example, the rectangular area KR1) (# 221). Then, as shown in FIG. 34A, three peak pixels (hereinafter referred to as “peak pixel Pk”) are detected.
検出されたピーク画素Pkについて、次に挙げる2つの要件を満たしているか否かを判別することによって、頭部の中心を検出する。
(A) ピーク画素Pkの画素値(頭部中心度)が閾値TH_MAXを超えていること。
(B) 微調整後のピーク画素Pkを中心とした二乗和算出範囲の二乗和(最大二乗和)が閾値TH_SUM2以上になること。
The center of the head is detected by determining whether or not the detected peak pixel Pk satisfies the following two requirements.
(A) The pixel value (head centrality) of the peak pixel Pk exceeds the threshold value TH_MAX.
(B) The sum of squares (maximum sum of squares) of the sum of squares calculation range around the peak pixel Pk after fine adjustment is equal to or greater than the threshold value TH_SUM2.
上記(A)の要件を満たすピーク画素Pkまたはその周辺には頭部の中心が存在する可能性があり、満たさないピーク画素Pkおよびその周辺には頭部の中心が存在する可能性はないものと判別する(#222)。係る判別の結果、ピーク画素Pk1は上記(A)の要件を満たさず(#222でNo)、ピーク画素Pk2、Pk3は上記(A)の要件を満たしたとする(#222でYes)。この場合は、以下、ピーク画素Pk2、Pk3にのみ注目する。 There is a possibility that the center of the head exists in or around the peak pixel Pk that satisfies the above requirement (A), and there is no possibility that the center of the head exists in and around the peak pixel Pk that does not satisfy the requirement (A). (# 222). As a result of the determination, it is assumed that the peak pixel Pk1 does not satisfy the requirement (A) (No in # 222), and the peak pixels Pk2 and Pk3 satisfy the requirement (A) (Yes in # 222). In this case, attention is paid only to the peak pixels Pk2 and Pk3.
ピーク画素Pk2、Pk3と検出目標の頭部の中心とがより正確に一致するように、現在のピーク画素Pk2、Pk3の位置の微調整(微修正)を次のようにして行う(#223)。 Fine adjustment (fine correction) of the positions of the current peak pixels Pk2, Pk3 is performed as follows (# 223) so that the peak pixels Pk2, Pk3 and the center of the head of the detection target coincide with each other more accurately. .
まず、図35(a)に示すように、現在のピーク画素Pk2の位置を中心とする横「(w/2)+1」個の画素、縦「(h/2)+1」個の画素の領域(以下、「探索領域RT」と記載する。)に注目する。探索領域RTの中の各画素について、その画素が図35(b)に示す二乗和算出範囲NRの中心になるようにし、その二乗和算出範囲NRの中の画素値の二乗和を算出する。そして、算出した二乗和が最大となったときの二乗和算出範囲NRの中心の画素を、新たなピーク画素Pk2とする。これにより、ピーク画素Pkの微調整が完了する。ピーク画素Pk3についても同様に微調整を行う。 First, as shown in FIG. 35A, a region of horizontal ((w / 2) +1) pixels and vertical ((h / 2) +1) pixels centered on the position of the current peak pixel Pk2. (Hereinafter referred to as “search area RT”). For each pixel in the search region RT, the pixel is set to the center of the square sum calculation range NR shown in FIG. 35B, and the square sum of the pixel values in the square sum calculation range NR is calculated. The pixel at the center of the square sum calculation range NR when the calculated square sum is maximized is set as a new peak pixel Pk2. Thereby, fine adjustment of the peak pixel Pk is completed. Similarly, fine adjustment is performed for the peak pixel Pk3.
図33および図34に戻って、微調整後のピーク画素Pk2、Pk3についてのそれぞれの二乗和が閾値TH_SUM2以上になるか否かを判別する(図33の#224)。つまり、上記(B)の要件を満たすか否かを判別する。係る判別の結果、ピーク画素Pk2は上記(B)の要件を満たすが(#224でYes)、ピーク画素Pk3は上記(B)の要件を満たさなかったとする(#224でNo)。 Returning to FIG. 33 and FIG. 34, it is determined whether or not the sum of squares of the finely adjusted peak pixels Pk2 and Pk3 is equal to or greater than the threshold value TH_SUM2 (# 224 in FIG. 33). That is, it is determined whether or not the requirement (B) is satisfied. As a result of such determination, it is assumed that the peak pixel Pk2 satisfies the requirement (B) (Yes in # 224), but the peak pixel Pk3 does not satisfy the requirement (B) (No in # 224).
この場合は、ピーク画素Pk2を頭部の中心とみなし、ピーク画素Pk2およびその周囲の画素を含む領域TR1を図34(b)に示すように矩形領域KR1から抜き出す(#225)。そして、その抜き出した矩形領域KR1を、頭部検出結果プレーンTKとして結果プレーン記憶部1M4に記憶させておきまたは表示装置1f(図3参照)などに出力する。この頭部検出結果プレーンTKが、頭部の中心の位置の最終的な検出結果である。矩形領域KR1において、領域TR1が抜き出された部分の画素値は、他の検出に影響を与えないようにするために、すべて消去(クリア)しておく(#226)。
In this case, the peak pixel Pk2 is regarded as the center of the head, and the region TR1 including the peak pixel Pk2 and surrounding pixels is extracted from the rectangular region KR1 as shown in FIG. 34B (# 225). Then, the extracted rectangular region KR1 is stored in the result plane storage unit 1M4 as the head detection result plane TK, or is output to the
一方、ピーク画素Pk3およびその周辺の画素は頭部ではないものとみなし、他の検出に影響を与えないようにするために、ピーク画素Pk2およびその周囲の画素を含む領域TR2を図34(d)に示すように消去(クリア)する(#227)。 On the other hand, the peak pixel Pk3 and its surrounding pixels are considered not to be the head, and the region TR2 including the peak pixel Pk2 and its surrounding pixels is set as shown in FIG. ) Is erased (cleared) as shown in FIG.
なお、図34の領域TR1、TR2のサイズおよび検出目標の頭部のサイズは、図36に示すようなテンプレートによって定められている。 Note that the sizes of the regions TR1 and TR2 in FIG. 34 and the size of the head of the detection target are determined by a template as shown in FIG.
そして、図31に戻って、ステップ#203、#206の検出処理を繰り返し、ほかにも図32に示すような矩形領域KRがないかどうか調べる。ある場合は、その矩形領域KRに対して、上に説明した図33および図34の処理を行う(#208)。 Then, returning to FIG. 31, the detection process of steps # 203 and # 206 is repeated, and it is checked whether there is any other rectangular area KR as shown in FIG. If there is, the process shown in FIGS. 33 and 34 described above is performed on the rectangular area KR (# 208).
なお、頭部検出結果プレーンTKを生成する際に、直前のフレームにおける検出結果である頭部検出結果プレーンTKpを使用し、検出精度を高めるようにしてもよい。なぜなら、直前のフレームの頭部検出結果プレーンTKpを示される頭部の中心の位置と今回検出すべき頭部の中心の位置とは、歩行者の動きによって多少のずれはあるものの、ほぼ一致するはずだからである。例えば、図37に示すような手順で頭部検出結果プレーンTKpを使用する。 When generating the head detection result plane TK, the head detection result plane TKp that is the detection result in the immediately preceding frame may be used to improve the detection accuracy. This is because the position of the center of the head indicated by the head detection result plane TKp of the immediately preceding frame and the position of the center of the head to be detected this time are almost the same, although there is a slight deviation depending on the movement of the pedestrian. Because it should be. For example, the head detection result plane TKp is used in the procedure as shown in FIG.
今回のフレームに係る頭部中心度プレーン84と前のフレームに係る頭部検出結果プレーンTKpとの互いに対応する画素の画素値を平均を求めることによって、頭部中心度プレーン84’を生成する。そして、検出処理部105は、その頭部中心度プレーン84’に基づいて、前に説明した図31および図33などの処理を行い、頭部検出結果プレーンTKを生成する。なお、生成された頭部検出結果プレーンTKは、次のフレームの頭部検出結果プレーンTKを生成するために、結果プレーン記憶部1M4に保存しておく。
The
図4に戻って、計数処理部503は、検出結果プレーン生成部502によって生成される頭部検出結果プレーンTKの個数つまり画像FGから検出された歩行者HMNの人数を計数する。
Returning to FIG. 4, the
頭部画像表示部107は、頭部検出結果プレーンTKに示される頭部の中心位置に基づいて、画像FGより歩行者HMNの頭部の領域を抽出して拡大し、これを拡大画像として表示装置1f(図3参照)に表示する。これにより、監視員は、歩行者HMNを容易に特定することができる。また、頭部画像保存部108は、歩行者HMNの頭部の拡大画像を磁気記憶装置1dまたは外部の記録媒体(DVD−ROM、MO、CD−Rなど)に保存(録画)する。
The head
図38および図39は人体検出装置1の全体の処理の流れの例を説明するフローチャートである。次に、ビデオカメラ2で撮影される画像から歩行者を検出する際の人体検出装置1の処理の流れを、フローチャートを参照して説明する。
FIG. 38 and FIG. 39 are flowcharts for explaining an example of the overall processing flow of the human
人体検出装置1は、ビデオカメラ2によって撮影された、ある時刻における画像FG(フレーム画像)を入力すると(図38の#1)、必要に応じて色空間の変換を行い(図6参照)、歩行者の頭部が写っていることが想定される画像領域を切り出し、これを縮小することによって、切出縮小画像GSを生成する(#2)。切出縮小画像GSの生成の手順は、前に図9で説明した通りである。
When the human
入力された画像FGが1、5、9、…フレーム目の画像つまり「4n−3」フレーム目の画像である場合は(#3でYes、#4でYes)、図17(a)のような肌色度プレーン8FCを生成する処理を行う(#5)。ただし、図38において「n」は正の整数である。3、7、11、…フレーム目の画像つまり「4n−1」フレーム目の画像である場合は(#3でYes、#4でNo)、図17(c)のような髪色度プレーン8HCを生成する処理を行う(#6)。肌色度プレーン8FCの生成の手順および髪色度プレーン8HCの生成の手順は、それぞれ、前に図19および図20で説明した通りである。 When the input image FG is an image of the 1st, 5th, 9th,... Frame, that is, an image of the “4n-3” frame (Yes in # 3, Yes in # 4), as shown in FIG. To generate a smooth skin chromaticity plane 8FC (# 5). In FIG. 38, “n” is a positive integer. 3, 7, 11,..., In the case of an image of the “4n−1” frame (Yes in # 3, No in # 4), the hair chromaticity plane 8HC as shown in FIG. Is generated (# 6). The procedure for generating the skin chromaticity plane 8FC and the procedure for generating the hair chromaticity plane 8HC are as described above with reference to FIGS. 19 and 20, respectively.
入力された画像FGが偶数フレームのものである場合は(#3でNo)、切出縮小画像GSおよびその2フレーム前の切出縮小画像GSに基づいて論理積プレーンANを生成する(#7)。そして、入力された画像FGが2、6、10、…フレーム目の画像つまり「4n−2」フレーム目の画像である場合は(#8でYes)、図17(b)のような半楕円中心度プレーン8SEを生成する処理を行う(#9)。4、8、12、…フレーム目の画像つまり4nフレーム目の画像である場合は(#8でNo)、図17(d)のような肩中心度プレーン8SHを生成する処理を行う(#10)。論理積プレーンANの生成の手順は、前に図15で説明した通りである。半楕円中心度プレーン8SEおよび肩中心度プレーン8SHの生成の手順は、前に図25で説明した通りである。
If the input image FG is of an even frame (No in # 3), a logical product plane AN is generated based on the cut-out reduced image GS and the cut-out reduced image GS two frames before (# 7). ). When the input image FG is an image of the second, sixth, tenth,... Frame, that is, an image of the “4n-2” frame (Yes in # 8), a semi-elliptical shape as shown in FIG. A process of generating the centrality plane 8SE is performed (# 9). 4, 8, 12,..., In the case of the 4n frame image (No in # 8), a process for generating the shoulder
ステップ#5、#6、#9、または#10で生成された最新のプレーンは、図28に示すように特徴度プレーン記憶部1M1の所定の領域に格納しておく(#11)。
The latest plane generated in
ステップ#5、#6、#9、または#10のうちのいずれかで生成された最新のプレーンおよびその直前の3フレームで生成されたプレーンに基づいて、つまり、最新の肌色度プレーン8FC、半楕円中心度プレーン8SE、髪色度プレーン8HC、および肩中心度プレーン8SHに基づいて、図30に示すような頭部中心度プレーン84を生成する(図39の#12)。この際に、図37で説明したように、前のフレームについての処理の際に生成された頭部検出結果プレーンTKを使用してもよい。
Based on the latest plane generated in any of
生成された頭部中心度プレーン84に基づいて、検出目標である歩行者の頭部の位置および中心を検出し(#13)、図34(b)のような最終的な検出結果を示す頭部検出結果プレーンTKを生成し、結果プレーン記憶部1M4に格納しておく(#14)。ステップ#13の処理は、前に図31で説明した通りである。
Based on the generated head
図38のステップ#1から図39のステップ#14までの処理は、ビデオカメラ2で撮影が行われている間、繰り返し行う(#15でNo)。
The processing from
本実施形態によると、ビデオカメラ2による撮影環境などに不都合が生じても、処理速度を遅くすることなく歩行者を検出することができる。
According to the present embodiment, it is possible to detect a pedestrian without slowing down the processing speed even if inconvenience occurs in the shooting environment of the
例えば、歩行者が帽子をかぶっている場合には、歩行者の頭部の輪郭が撮影画像(フレーム)に表れないので半楕円中心度プレーン8SE(図17参照)が上手く得られないが、直前の3フレームから求めた他の3つの特徴度プレーン8でこれを補うことによって、歩行者を上手く検出することができる。歩行者がマスクやサングラスをしている場合には、歩行者の肌色領域が非常に狭くなるので肌色度プレーン8FCが上手く得られないが、やはり、他の3つの特徴度プレーン8でこれを補うことによって、歩行者を上手く検出することができる。
For example, when the pedestrian is wearing a hat, the outline of the pedestrian's head does not appear in the photographed image (frame), so the semi-elliptical centrality plane 8SE (see FIG. 17) cannot be obtained well. By supplementing this with the other three
その他、歩行者が髪の毛を脱色していること、前を歩く他の歩行者と重なるなどして肩領域などにオクルージョンが発生していること、または照明や背景(床や壁)の状況によって肌色または髪色が上手く検出できないことなどが原因で、一部の特徴度プレーン8が上手く得られなくても、他の特徴度プレーン8を用いて歩行者を上手く検出することができる。
In addition, pedestrians are decolorizing their hair, overlapping with other pedestrians walking in front, causing occlusion in the shoulder area, etc., or depending on the lighting and background (floor and wall) conditions Even if some
図40は特徴度プレーン8を生成するタイミングの制御方法の変形例を説明する図である。
FIG. 40 is a diagram for explaining a modification of the timing control method for generating the
本実施形態では、1フレームの撮影画像(図5の画像FG)ごとに図17に示すいずれか1種類の特徴度プレーン8を生成したが、各特徴度プレーン8の生成処理時間に応じて複数の種類の特徴度プレーン8を生成するようにしてもよい。
In the present embodiment, any one type of
例えば、ビデオカメラ2からはTf秒ごとに撮影画像(フレーム)が送信されてくるものとする。また、4種類の特徴A〜Dの度合いに基づいて頭部の検出を行うものとする。特徴A〜Dの度合いを示す特徴度プレーン(以下、「特徴Aプレーン」、「特徴Bプレーン」、…のように記載する。)を生成するための処理時間が、図40(a)に示すように、それぞれ、時間Ta〜Tdであるとする。ただし、時間Ta〜Tdは、0.5Tf<Ta<Tf、0<Tb<0.5Tf、0<Tc<0.5Tf、0.5Tf<Td<Tf、Ta+Tb>Tf、Ta+Tc>Tf、Tb+Td>Tf、Tc+Td>Tf、の関係を満たすものとする。
For example, it is assumed that a captured image (frame) is transmitted from the
あるフレームを取得してからすぐに特徴Bプレーンを生成する処理を行ったとする。すると、次のフレームを取得するまで「Tf−Tb」秒の時間が残るが、係る時間は上の関係式より0.5秒以上であることが分かる。したがって、特徴Bプレーンを生成する処理が終わってすぐに、特徴Cプレーンを生成する処理を行うことができる。そこで、図40(b)に示すように、Tf秒間に、特徴Bプレーンおよび特徴Cプレーンの両方を生成する処理を行うようにしてもよい。 Assume that processing for generating a feature B plane is performed immediately after a certain frame is acquired. Then, although the time of “Tf−Tb” seconds remains until the next frame is acquired, it can be seen from the above relational expression that the time is 0.5 seconds or more. Therefore, immediately after the process of generating the feature B plane is completed, the process of generating the feature C plane can be performed. Therefore, as shown in FIG. 40B, processing for generating both the feature B plane and the feature C plane may be performed in Tf seconds.
これに対して、特徴Aプレーンまたは特徴Dプレーンを生成する処理を行った場合は、残りの「Tf−Ta」または「Tf−Td」秒間では、上の関係式より、他のいずれの特徴度プレーンも生成できないことがわかる。よって、特徴Aプレーンまたは特徴Dプレーンを生成する処理の実行後は、次のフレームが取得されるまで、特徴度プレーンの生成を休止する。 On the other hand, when the process of generating the feature A plane or the feature D plane is performed, any other feature degree is calculated from the above relational expression for the remaining “Tf-Ta” or “Tf-Td” seconds. It can be seen that a plane cannot be generated. Therefore, after the process of generating the feature A plane or the feature D plane is executed, generation of the feature plane is paused until the next frame is acquired.
本実施形態では、各画像または各プレーンを構成する各画素に対する処理を、水平方向を主走査方向とするような順番で行ったが、垂直方向を主走査方向とするような順番で行ってもよい。または、右下隅の画素から順に処理を行うなど、処理の順序は適宜変更可能である。 In this embodiment, the processing for each pixel constituting each image or each plane is performed in the order in which the horizontal direction is the main scanning direction, but may be performed in the order in which the vertical direction is the main scanning direction. Good. Alternatively, the processing order can be changed as appropriate, for example, processing is performed in order from the pixel in the lower right corner.
本実施形態では、特徴度として肌色度、髪色度、半楕円中心度、および肩中心度の4種類の特徴度を求め、これらの特徴度に基づいて人の頭部の中心の検出を行ったが、これ以外の種類の特徴度などを組み合わせて検出を行ってもよい。例えば、オプティカルフロー、眼または口などの部位の形状をしたテンプレートとのマッチングの度合い、背景差分を用いた検出方法による検出結果、またはテクスチャを用いた検出方法による検出結果などに基づいて人の頭部の中心の検出を行ってもよい。 In the present embodiment, four types of feature degrees, skin chromaticity, hair chromaticity, semi-elliptical center degree, and shoulder center degree, are obtained as feature degrees, and the center of the human head is detected based on these feature degrees. However, the detection may be performed by combining other types of features. For example, the human head based on the optical flow, the degree of matching with a template having a shape of a part such as an eye or mouth, the detection result using a detection method using a background difference, or the detection result using a detection method using a texture. The center of the part may be detected.
同じ種類の特徴度を、互いに異なる複数の方法によってそれぞれ算出し、頭部の中心の検出のために用いてもよい。例えば、互いに異なる2つのパラメータA、Bを設定しておき、4nフレーム目ではパラメータAを用いて肌色度を算出し、4n+2フレーム目ではパラメータBを用いて肌色度を算出するようにしてもよい。 The same type of feature degree may be calculated by a plurality of different methods and used for detecting the center of the head. For example, two different parameters A and B may be set, the skin chromaticity may be calculated using the parameter A in the 4nth frame, and the skin chromaticity may be calculated using the parameter B in the 4n + 2th frame. .
(1)〜(10)式において使用した係数、定数、閾値、または関数などは、監視システム100を使用する目的、ビデオカメラ2の設置場所の環境またはスペック、または他の様々な条件に応じて適宜変更可能である。また、特徴度プレーン8の組合せまたは生成の順序もこれらの条件に応じて適宜変更可能である。
The coefficients, constants, threshold values, functions, etc. used in the expressions (1) to (10) depend on the purpose of using the
本実施形態では、図5の画像FGから歩行者HMNの頭部の中心を検出する際に、この画像FGを縮小し、その縮小画像(図8の切出縮小画像GS)を用いたが、この画像FGを縮小せずにそのまま用いてもよい。肌色度および髪色度を、YUV空間値に基づいて求めたが、RGB空間など他の色空間の値に基づいて求めてもよい。 In the present embodiment, when the center of the head of the pedestrian HMN is detected from the image FG in FIG. 5, the image FG is reduced and the reduced image (the cut reduced image GS in FIG. 8) is used. The image FG may be used as it is without being reduced. Although the skin chromaticity and the hair chromaticity are obtained based on the YUV space values, they may be obtained based on values of other color spaces such as the RGB space.
本発明に係る人体検出装置1を使用して、人以外の物体の検出を行うことも可能である。例えば、動物の身体の検出、直方体の検出、または自動車やオートバイなどのナンバープレートの検出に応用することも可能である。
It is also possible to detect an object other than a person using the human
その他、監視システム100、人体検出装置1、ビデオカメラ2の全体または各部の構成、特徴度プレーン8の生成方法、中心度の算出方法、処理内容、処理順序などは、本発明の趣旨に沿って適宜変更することができる。
In addition, the configuration of the whole or each part of the
本発明によると、様々な不都合または不具合が生じても、処理速度を落とすことなく目標物を検出することができる。よって、本発明は、特に、撮影環境が変化しやすい施設における歩行者または侵入者の検出のために好適に用いられる。 According to the present invention, even if various inconveniences or problems occur, a target can be detected without reducing the processing speed. Therefore, the present invention is particularly preferably used for detecting a pedestrian or an intruder in a facility where the photographing environment is likely to change.
1 人体検出装置(物体検出装置)
101 画像入力部(画像入力手段)
105 検出処理部(物体検出手段)
106 特徴量演算制御部(制御手段)
301 肌色度プレーン生成部(特徴検出手段、近さ算出手段)
302 半楕円中心度プレーン生成部(特徴検出手段、近さ算出手段)
303 髪色度プレーン生成部(特徴検出手段、近さ算出手段)
304 肩中心度プレーン生成部(特徴検出手段、近さ算出手段)
FG 画像(撮影画像)
HMN 歩行者(物体)
1 Human body detection device (object detection device)
101 Image input unit (image input means)
105 Detection processing unit (object detection means)
106 Feature value calculation control unit (control means)
301 skin chromaticity plane generation unit (feature detection means, proximity calculation means)
302 Semi-elliptic centrality plane generation unit (feature detection means, proximity calculation means)
303 Hair chromaticity plane generation unit (feature detection means, proximity calculation means)
304 Shoulder centrality plane generation unit (feature detection means, proximity calculation means)
FG image (photographed image)
HMN pedestrian (object)
Claims (6)
所定の時間おきに撮影されて得られた撮影画像を入力する画像入力手段と、
互いに異なる方法を用いて、前記撮影画像の特徴を検出する複数の特徴検出手段と、
時系列上で互いに隣り合う前記撮影画像についてそれぞれ異なる前記特徴検出手段によって前記特徴が検出されるように前記各特徴検出手段を制御する制御手段と、
前記撮影画像に写っている前記物体を、いずれかの前記特徴検出手段によって当該撮影画像から検出された前記特徴および当該特徴検出手段以外の特徴検出手段によって当該撮影画像以外の撮影画像から検出された前記特徴に基づいて検出する物体検出手段と、
を有することを特徴とする物体検出装置。 An object detection device for detecting a target object from an image,
Image input means for inputting captured images obtained by shooting every predetermined time;
A plurality of feature detection means for detecting features of the captured image using different methods;
Control means for controlling the feature detection means so that the feature detection means is detected by the different feature detection means for the captured images adjacent to each other in time series;
The object in the photographed image is detected from the photographed image other than the photographed image by the feature detection means other than the feature detected by the feature detection means and the feature detection means. Object detection means for detecting based on the characteristics;
An object detection apparatus comprising:
所定の時間おきに撮影されて得られた撮影画像を入力する画像入力手段と、
互いに異なる方法を用いて、前記撮影画像の画素面を区画した領域ごとに当該撮影画像に写っている前記物体に対する確からしさを求める、複数の確からしさ算出手段と、
時系列上で互いに隣り合う前記撮影画像についてそれぞれ異なる前記確からしさ算出手段によって前記確からしさが求められるように前記各確からしさ算出手段を制御する制御手段と、
前記撮影画像に写っている前記物体を、いずれかの前記確からしさ算出手段によって当該撮影画像から求められた前記確からしさおよび当該確からしさ算出手段以外の確からしさ算出手段によって当該撮影画像以外の撮影画像から求められた前記確からしさに基づいて検出する物体検出手段と、
を有することを特徴とする物体検出装置。 An object detection device for detecting a target object from an image,
Image input means for inputting captured images obtained by shooting every predetermined time;
A plurality of probability calculating means for determining the probability of the object appearing in the photographed image for each region partitioning the pixel plane of the photographed image using different methods;
Control means for controlling each of the likelihood calculation means so that the certainty is calculated by the different probability calculation means for each of the captured images adjacent to each other in time series;
The object shown in the photographed image is a photographed image other than the photographed image by the certainty calculation means other than the certainty calculated from the photographed image by the certainty calculating means and the certainty calculating means. Object detection means for detecting based on the probability obtained from
An object detection apparatus comprising:
前記検出手段は、前記撮影画像の前記領域ごとの前記確からしさを表す数値を、同じ位置の前記領域のもの同士で加算し、それらの加算値のピークを調べることによって前記物体を検出する、
請求項2記載の物体検出装置。 The certainty is represented by a numerical value,
The detection means adds the numerical value representing the probability for each region of the captured image between the regions at the same position, and detects the object by examining the peak of the added value.
The object detection apparatus according to claim 2.
前記確からしさ算出手段として、半楕円形状のテンプレートとのマッチングの度合いを求めることによって前記各領域の前記確からしさを求める手段、前記撮影画像の前記領域における肌の色らしさを検出することによって当該領域の前記確からしさを求める手段、前記撮影画像の前記領域における髪の色らしさを検出することによって当該領域の前記確からしさを求める手段、または肩形状のテンプレートとのマッチングの度合いを求めることによって前記各領域の前記確からしさを求める手段、を有する、
請求項2または請求項3記載の物体検出装置。 The object is a person;
As the probability calculation means, means for determining the likelihood of each area by determining the degree of matching with a semi-elliptical template, and detecting the skin color likelihood in the area of the photographed image The means for determining the likelihood of the above, the means for determining the likelihood of the area by detecting the color likelihood of the hair in the area of the photographed image, or the degree of matching with a shoulder-shaped template Means for determining the certainty of the area,
The object detection apparatus of Claim 2 or Claim 3.
所定の時間おきに撮影されて得られた撮影画像を入力し、
時系列上で互いに隣り合う前記撮影画像について、それぞれ異なる特徴検出方法で当該撮影画像の特徴を検出し、
前記撮影画像に写っている前記物体を、いずれかの前記特徴検出方法によって当該撮影画像から検出された特徴および当該特徴検出方法以外の特徴検出方法によって当該撮影画像以外の撮影画像から検出された特徴に基づいて検出する、
ことを有することを特徴とする物体検出方法。 An object detection method for detecting a target object from an image,
Enter the captured images that were taken every predetermined time,
For the captured images that are adjacent to each other in time series, the features of the captured images are detected by different feature detection methods,
Features detected from the photographed image other than the photographed image by the feature detection method other than the feature detected from the photographed image by any one of the feature detection methods and the feature detection method. Detect based on the
An object detection method characterized by comprising:
所定の時間おきに撮影されて得られた撮影画像を入力する処理と、
時系列上で互いに隣り合う前記撮影画像について、それぞれ異なる特徴検出方法で当該物体の特徴を検出する処理と、
前記撮影画像に写っている前記物体を、いずれかの前記特徴検出方法によって当該撮影画像から検出された特徴および当該特徴検出方法以外の特徴検出方法によって当該撮影画像以外の撮影画像の特徴に基づいて検出する処理と、
をコンピュータに実行させるためのコンピュータプログラム。
画像の中から目標の物体を検出する物体検出装置であって、
所定の時間おきに撮影されて得られた撮影画像を入力する画像入力手段と、
互いに異なる方法を用いて、前記撮影画像の画素面を区画した領域ごとに当該撮影画像に写っている前記物体の所定の位置への近さを求める、複数の近さ算出手段と、
時系列上で互いに隣り合う前記撮影画像についてそれぞれ異なる前記近さ算出手段によって前記近さが求められるように前記各近さ算出手段を制御する制御手段と、
前記撮影画像に写っている前記物体を、いずれかの前記近さ算出手段によって当該撮影画像から求められた前記近さおよび当該近さ算出手段以外の近さ算出手段によって当該撮影画像以外の撮影画像から求められた前記近さに基づいて検出する物体検出手段と、
を有することを特徴とする物体検出装置。
A computer program used in a computer for detecting a target object from an image,
A process of inputting a photographed image obtained by photographing every predetermined time;
A process for detecting features of the object with different feature detection methods for the captured images adjacent to each other in time series,
Based on the feature detected from the photographed image by any one of the feature detection methods and the feature of the photographed image other than the photographed image by a feature detection method other than the feature detection method, the object reflected in the photographed image Processing to detect,
A computer program for causing a computer to execute.
An object detection device for detecting a target object from an image,
Image input means for inputting captured images obtained by shooting every predetermined time;
A plurality of proximity calculation means for determining the proximity of the object in the captured image for each region that divides the pixel plane of the captured image using different methods;
Control means for controlling the proximity calculation means so that the proximity is calculated by the different proximity calculation means for the captured images adjacent to each other in time series;
The object shown in the photographed image is a photographed image other than the photographed image by the proximity calculating means other than the proximity calculated from the photographed image by any of the proximity calculating means. Object detection means for detecting based on the proximity obtained from:
An object detection apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003385845A JP2005149143A (en) | 2003-11-14 | 2003-11-14 | Object detecting device and method, and computer program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003385845A JP2005149143A (en) | 2003-11-14 | 2003-11-14 | Object detecting device and method, and computer program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005149143A true JP2005149143A (en) | 2005-06-09 |
Family
ID=34693765
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003385845A Pending JP2005149143A (en) | 2003-11-14 | 2003-11-14 | Object detecting device and method, and computer program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005149143A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007235950A (en) * | 2006-02-28 | 2007-09-13 | Alpine Electronics Inc | Method and device for detecting vehicle position |
JP2008047991A (en) * | 2006-08-11 | 2008-02-28 | Hitachi Kokusai Electric Inc | Image processor |
JP2008241707A (en) * | 2008-03-17 | 2008-10-09 | Hitachi Kokusai Electric Inc | Automatic monitoring system |
KR101185935B1 (en) | 2011-05-25 | 2012-09-26 | 에스엘 주식회사 | Animal detection system and method thereof |
-
2003
- 2003-11-14 JP JP2003385845A patent/JP2005149143A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007235950A (en) * | 2006-02-28 | 2007-09-13 | Alpine Electronics Inc | Method and device for detecting vehicle position |
JP2008047991A (en) * | 2006-08-11 | 2008-02-28 | Hitachi Kokusai Electric Inc | Image processor |
JP4664878B2 (en) * | 2006-08-11 | 2011-04-06 | 株式会社日立国際電気 | Image processing device |
JP2008241707A (en) * | 2008-03-17 | 2008-10-09 | Hitachi Kokusai Electric Inc | Automatic monitoring system |
JP4694589B2 (en) * | 2008-03-17 | 2011-06-08 | 株式会社日立国際電気 | Automatic monitoring system |
KR101185935B1 (en) | 2011-05-25 | 2012-09-26 | 에스엘 주식회사 | Animal detection system and method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3879732B2 (en) | Object detection apparatus, object detection method, and computer program | |
JP4085959B2 (en) | Object detection device, object detection method, and recording medium | |
EP3477931B1 (en) | Image processing method and device, readable storage medium and electronic device | |
US8150205B2 (en) | Image processing apparatus, image processing method, program, and data configuration | |
JP3935500B2 (en) | Motion vector calculation method and camera shake correction device, imaging device, and moving image generation device using this method | |
JP5925068B2 (en) | Video processing apparatus, video processing method, and program | |
CN110099209B (en) | Image processing apparatus, image processing method, and storage medium | |
US9342738B2 (en) | Image processing to improve physique of imaged subject | |
JP5127531B2 (en) | Image monitoring device | |
JP2012530994A (en) | Method and apparatus for half-face detection | |
US20050041111A1 (en) | Frame adjustment device and image-taking device and printing device | |
CN103685926B (en) | Method for image processing of face regions and electronic device by using the same | |
JP5101429B2 (en) | Image monitoring device | |
US10872268B2 (en) | Information processing device, information processing program, and information processing method | |
JP5419757B2 (en) | Face image synthesizer | |
JP2006120128A (en) | Image processing device, image processing method and image processing program | |
JP5419773B2 (en) | Face image synthesizer | |
JP2008033818A (en) | Object tracking device and its control method, object tracking system, object tracking program, and recording medium recording the program | |
JP5419777B2 (en) | Face image synthesizer | |
JP2005149143A (en) | Object detecting device and method, and computer program | |
JP2005149145A (en) | Object detecting device and method, and computer program | |
US9159118B2 (en) | Image processing apparatus, image processing system, and non-transitory computer-readable medium | |
JP7459151B2 (en) | Information processing device, information processing system, information processing method, and program | |
WO2023017723A1 (en) | Information processing device, information processing system, information processing method, and program | |
JP2019029747A (en) | Image monitoring system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20061025 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090825 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091023 Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20091023 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20091124 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20100316 |