JP2004265292A - Image processing method and device thereof - Google Patents

Image processing method and device thereof Download PDF

Info

Publication number
JP2004265292A
JP2004265292A JP2003056827A JP2003056827A JP2004265292A JP 2004265292 A JP2004265292 A JP 2004265292A JP 2003056827 A JP2003056827 A JP 2003056827A JP 2003056827 A JP2003056827 A JP 2003056827A JP 2004265292 A JP2004265292 A JP 2004265292A
Authority
JP
Japan
Prior art keywords
image
pixel
state
background
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.)
Pending
Application number
JP2003056827A
Other languages
Japanese (ja)
Inventor
Takashi Kumada
毅史 熊田
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.)
Azbil Corp
Original Assignee
Azbil 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 Azbil Corp filed Critical Azbil Corp
Priority to JP2003056827A priority Critical patent/JP2004265292A/en
Publication of JP2004265292A publication Critical patent/JP2004265292A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing method and a device which detects a movable body or the like with high accuracy. <P>SOLUTION: With an effective area S1 as an object, a difference between an input image I(x, y) and a background image A(x, y) is acquired as a background difference image BG(x, y). With the entire area being an object, a difference between a current input image I(x, y) and the previous input image F(x, y) is acquired as a contour extraction image (differential image between frames) O(x, y). On the basis of the figure of a varying body (a part of a person Ma) in the background difference image BG(x, y), the contour of the varying body is extracted in the contour extraction image O(x, y) which continues to the figure. Consequently, a movable body contour image M(x, y) is acquired which includes the entire contour of the person Ma and has high reliability. Even if an ineffective area S2 is widened which is automatically determined, the person Ma is detected with high accuracy. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
この発明は、有効領域を対象として入力画像と背景画像との差分を背景差分画像として求め、この背景差分画像から移動体などを検出する画像処理方法および装置に関するものである。
【0002】
【従来の技術】
従来より、移動体などの検出では、背景差分処理を行っている。図16(a)はTVカメラなどの撮像手段によって撮像された入力画像、図16(b)はこの入力画像に含まれる背景画像である。入力画像に移動体が写っていなければ入力画像と背景画像とは等しい。背景差分処理では、図16(a)に示された入力画像と図16(b)に示された背景画像との差分をとり、図16(c)に示されるような背景差分画像を得る。この例では、入力画像に移動体として人物Maが写っており、背景画像との差分をとることにより背景画像には含まれていなかった人物Maのみが背景差分画像に現れる。このようにして移動体の像を抽出(検出)することができる。
【0003】
しかしながら、背景には、静止物体だけではなく、動いたり、輝度が頻繁に変化する物体もある。例えば、ネオンなどは、輝度が頻繁にかつ著しく変化する。図17(a)に示す入力画像および図17(b)に示す背景画像にはネオンNeが含まれている。この場合、背景差分処理を行うと、図17(c)に示す背景差分画像には、人物Maに加えて、ネオンNeが現れる。図17(c)に示された背景差分画像中、ネオンNeは、移動体である人物Maの検出において不適切な判断を与える外乱要因となる。
【0004】
そこで、最近の背景差分処理では、背景画像に対して背景差分処理の対象とする有効領域と対象としない無効領域を設定し、有効領域のみの情報に基づいて移動体の検出を行っている。例えば、図18(b)に示すように、ネオンNeが存在する領域を無効領域S2、無効領域S2を除いた残りの領域を有効領域S1とし、有効領域S1についてのみ入力画像(図18(a))と背景画像(図18(b))との差分をとり、図18(c)に示されるような背景差分画像を得るようにしている。これにより、ネオンNeが存在する無効領域S2が背景差分処理の対象から除外され、入力画像中の人物Maのみを含む背景差分画像を得ることができる(例えば、特許文献1参照)。
【0005】
なお、上述した例では、有効領域S1についてのみ入力画像と背景画像との差分をとるようにしたが、全領域を対象として入力画像と背景画像との差分をとり、この差分画像における無効領域S2に対応する部分にマスクをかけて、図18(c)に示されるような背景差分画像を得ることも行われている。このようなマスクをかける方法によっても、無効領域S2を背景差分処理の対象から除外し、有効領域S1のみを背景差分処理の対象として、入力画像中の人物Maだけを移動体として検出することができる。
【0006】
【特許文献1】
特開平9−214938号公報(第4−5頁、図1−図4)
【0007】
【発明が解決しようとする課題】
しかしながら、このような従来の移動体の検出方法によると、背景差分処理の無効領域S2が広くなると、検出すべき移動体が無効領域S2に含まれてくる確率が高くなる。例えば、図19(b)に示すように無効領域S2を広くすると、この無効領域S2に人物Maの大部分が含まれてしまうということがあり、背景差分処理によって得られる背景差分画像には図19(c)に示されるように人物Maの一部分しか出現しなくなる。この場合、人物Maの充分な検出が行えず、ひいては移動体の検出性能の劣化につながる。
【0008】
本発明はこのような課題を解決するためになされたもので、その目的とするところは、移動体などの検出をより高精度で行うことができる画像処理方法および装置を提供することにある。
【0009】
【課題を解決するための手段】
このような目的を達成するために本発明は、画像フレーム内で任意に設定される有効領域を対象として入力画像と背景画像との差分を求め、入力画像の有効領域内における変化物体の像を含む背景差分画像を求めるステップと、入力画像中の変化物体の輪郭を含む輪郭抽出画像を求めるステップと、背景差分画像中の像に基づいてこの像と連続する輪郭抽出画像中の変化物体の輪郭を抽出するステップとを設けたものである。
【0010】
この発明では、有効領域を対象として入力画像と背景画像との差分が背景差分画像として求められる。また、入力画像中の変化物体の輪郭を含む輪郭抽出画像が求められる。移動体の検出を行う場合、背景差分画像に現れる物体は検出しようとする移動体である確率が高い。輪郭抽出画像に現れる物体は他の変化物体も含んでいる。本発明では、信頼性の高い背景差分画像の物体の像に基づいて、この像と連続する輪郭抽出画像中の変化物体の輪郭を抽出する。これにより、見かけ上、有効領域と無効領域との区別がなくなり、検出しようとする移動体の全体の輪郭を抽出することが可能となる。
【0011】
なお、本発明において、輪郭抽出画像は例えばフレーム間差分処理によって求めることができる。フレーム間差分処理では、入力画像の時系列から相前後する2つの入力画像の差分を輪郭抽出画像として求める。輪郭抽出画像は、必ずしもフレーム間差分処理によらなくてもよく、画像処理で一般に知られている微分処理、領域分割などを用いて求めるようにしてもよい。また、フレーム間差分や微分処理など、複数の処理手段を併用してもよい。
【0012】
【発明の実施の形態】
以下、本発明を図面に基づいて詳細に説明する。
図1は本発明に係る画像処理装置の一実施の形態を示す移動体検出装置の要部のブロック図である。同図において、1はTVカメラなどの撮像手段、2は背景差分処理部、3は輪郭抽出処理部、4は統合処理部、5は背景情報更新処理部である。
【0013】
この移動体検出装置100においては、撮像手段1からの所定周期で入力される時系列の入力画像I(x,y,t)(以下、I(x,y)と略す)を背景差分処理部2、輪郭抽出処理部3および背景情報更新処理部5へ送るようにし、背景差分処理部2において生成される背景差分画像BG(x,y)と輪郭抽出処理部3において生成される輪郭抽出画像O(x,y)とから統合処理部4において移動体輪郭画像M(x,y)を生成し、この生成した移動体輪郭画像M(x,y)を背景情報更新処理部5へフィードバックし、背景画像A(x,y)および背景差分処理の有効領域S1/無効領域S2の更新を行うようにしている。
【0014】
背景差分処理部2は、撮像手段1からの入力画像I(x,y)と、背景情報更新処理部5からの背景画像A(x,y)および背景差分処理の有効領域S1/無効領域S2とから、有効領域S1における変化物体の像を含む背景差分画像BG(x,y)を生成する。
輪郭抽出処理部3は、撮像手段1からの入力画像I(x,y)から、入力画像I(x,y)中の変化物体の輪郭を含む輪郭抽出画像O(x,y)を生成する。
【0015】
統合処理部4は、背景差分処理部2からの背景差分画像BG(x,y)と輪郭抽出処理部3からの輪郭抽出画像O(x,y)とから、入力画像I(x,y)中の移動体の全体の輪郭を含む信頼性の高い移動体輪郭画像M(x,y)を生成する。
背景情報更新処理部5は、撮像手段1からの入力画像I(x,y)と統合処理部4からの移動体輪郭画像M(x,y)とから、背景差分処理部2への背景画像A(x,y)および背景差分処理の有効領域S1/無効領域S2を生成(更新)する。
【0016】
図2は背景情報更新処理部5の内部構成の概略を示すブロック図である。背景情報更新処理部5は、画像確保部6、定量化部7、画素状態分類部8、背景情報保持部9、背景画像生成部10、有効/無効領域決定部11、移動体有無判定部12、画素状態確認部13、移動時間判定部14を備えている。
【0017】
〔背景情報更新処理部5の各部の機能の概略〕
背景情報更新処理部5において、画像確保部6は、撮像手段1からの所定周期で入力される時系列の入力画像I(x,y)を予め規定された特定の量だけ確保し、その確保した各画像の画像フレームを構成する各画素の画素値を背景情報保持部9に送り、各画素の背景情報の一部である「時系列データ」として保持させる。
【0018】
定量化部7は、背景情報保持部9に保持されている各画素の「時系列データ」を取り出し、この取り出した各画素の「時系列データ」の変動具合を定量化する。画素状態分類部8は、定量化部7で定量化された各画素の変動具合に基づいて各画素の状態を分類し、その分類した各画素の状態を背景情報保持部9に送り、各画素の背景情報の一部である「画素状態」として保持させる。
【0019】
なお、「画素状態」には、「未定状態」、「安定状態」、「不安定状態」、「移動状態」があり、「移動状態」はさらに「未定状態から移動状態」、「安定状態から移動状態」、「不安定状態から移動状態」に分けられる。これらの「画素状態」については後述する。
【0020】
背景情報保持部9は、上述した「時系列データ」、「画素状態」に加えて、「経過時間ET」(画素状態が未定状態に入ってから経過した時間)、「移動時間TM」(画素状態が移動状態に入ってから経過した時間)を各画素の背景情報として保持する。図3に画素毎の背景情報の要素名および概要を示す。
【0021】
背景画像生成部10は、背景情報保持部9における各画素の「時系列データ」に基づき、背景画像A(x,y)を生成する。有効/無効領域決定部11は、背景情報保持部9における各画素の「画素状態」に基づき、背景差分処理の有効領域S1/無効領域S2を決定する。
【0022】
移動体有無判定部12は、統合処理部4からフィードバックされてくる移動体輪郭画像M(x,y)の各画素毎に移動体の有無を判定し、その判定結果を画素状態確認部13へ送る。この場合、その画素の画素値が「1」であれば移動体有りと判定し、その画素の画素値が「0」でれば移動体無しと判定する。
【0023】
画素状態確認部13は、移動体有無判定部12からの各画素についての移動体有無の判定結果を受けて、その画素の背景情報保持部9における「画素状態」(直前の画素状態)を確認し、移動体有りと判定された画素については、その確認した「画素状態」を画素状態分類部8へ送り、移動体無しと判定された画素については、定量化部7へ定量化指令を送る。
【0024】
移動時間判定部14は、画素状態確認部13からの知らせを受けて、「移動体有り」から「移動体無し」へと変化した画素について、背景情報保持部9における背景情報中の「移動時間TM」をチェックし、その画素に移動体がとどまっていた時間の長短を判定する。
【0025】
〔移動体検出装置100における全体の処理の流れ〕
以下では、説明を簡単とするために、実稼働開始後少なくともn個の入力画像I(x,y)が取り込まれるまでの間は、撮像手段1からの入力画像I(x,y)には移動体や輝度が変化する物体が含まれないものとする。
【0026】
実稼働開始後、n個の入力画像I(x,y)が確保されるまでは、背景差分処理部2への有効/無効領域は、その全ての領域が無効領域S2とされる(後述)。入力画像I(x,y)がn個確保されると、このn個の入力画像I(x,y)に基づく最初の背景画像A(x,y)と有効領域S1/無効領域S2が背景情報更新処理部5において確定され、背景差分処理部2に対して設定される(▲1▼実稼働開始直後の背景画像および有効/無効領域の設定)。
【0027】
そして、背景差分処理部2において、背景画像A(x,y)と有効領域S1/無効領域S2を用いて、入力画像I(x,y)と背景画像A(x,y)との間で背景差分処理が行われ、背景差分画像BG(x,y)が得られる(▲2▼背景差分画像の取得)。
【0028】
また、この背景差分画像BG(x,y)の取得と並行して、輪郭抽出処理部3での入力画像I(x,y)に対する輪郭抽出処理が行われ、入力画像I(x,y)中の変化物体の輪郭を含む輪郭抽出画像O(x,y)が得られる(▲3▼輪郭抽出画像の取得)。
【0029】
そして、統合処理部4において、輪郭抽出処理部3で得られた輪郭抽出画像O(x,y)中の輪郭(変化物体の輪郭)から背景差分処理部2で得られた背景差分画像BG(x,y)中の像(移動体の像)と連続するものが抽出され、移動体の全体の輪郭を含む信頼性の高い移動体輪郭画像M(x,y)が得られる(▲4▼移動体の輪郭抽出)。
【0030】
また、この移動体輪郭画像M(x,y)が背景情報更新処理部5へフィードバックされ、背景画像A(x,y)および有効領域S1/無効領域S2が自動的に更新される(▲5▼稼働中の背景画像および有効/無効領域の自動更新)。
【0031】
以下、上述した全体の処理の流れに沿って、各部の詳細な機能を交えながら、その処理手順について説明する。なお、本発明は、この全体の処理の流れ中、「▲2▼背景差分画像の取得」、「▲3▼輪郭抽出画像の取得」、「▲4▼移動体の輪郭抽出」の各処理に関係し、「▲1▼実稼働開始直後の背景画像および有効/無効領域の設定」、「▲5▼稼働中の背景画像および有効/無効領域の自動更新」とは直接関係しない。
【0032】
〔▲1▼実稼働開始直後の背景画像および有効/無効領域の設定〕
実稼働開始の指示が出されると、背景情報更新処理部5における画像確保部6は、初期状態として、背景情報保持部9における各画素の「画素状態」を「未定状態」とする。「未定状態」とは、その画素の状態がまだ確定されていないことを意味する。また、各画素の「経過時間ET」および「移動時間TM」をリセットし、零とする。また、各画素の「時系列データ」をクリアして、零とする。
【0033】
実稼働開始後、撮像手段1からの最初の入力画像I(x,y)は、背景差分処理部2、輪郭抽出処理部3および背景情報更新処理部5へ送られる。
背景差分処理部2は、撮像手段1からの最初の入力画像I(x,y)が入力されると、その入力画像I(x,y)と背景情報更新処理部5からの背景画像A(x,y)および背景差分処理の有効領域S1/無効領域S2とから背景差分画像BG(x,y)を生成する。
【0034】
この場合、背景情報更新処理部5の背景情報保持部9における背景情報中、各画素の「画素状態」は「未定状態」とされている。背景情報更新処理部5は、「画素状態」が「未定状態」である画素については、その画素を無効画素と判断し、無効画素を集めた領域を背景差分処理の無効領域とする。したがって、この場合、背景差分処理の有効領域S1はなく、全ての領域が無効領域S2とされる。
【0035】
このため、背景差分画像BG(x,y)は入力画像I(x,y)に拘わらず全ての画素が「0」とされ、輪郭抽出処理部3において得られる輪郭抽出画像O(x,y)に変化物体の輪郭が抽出されていたとしても、統合処理部4で得られる移動体輪郭画像M(x,y)は全ての画素が「0」とされる。なお、輪郭抽出処理部3および統合処理部4での具体的な処理内容については後述する。
【0036】
統合処理部4から得られた移動体輪郭画像M(x,y)は背景情報更新処理部5へフィードバックされる。背景情報更新処理部5において、移動体有無判定部12は、統合処理部4からの移動体輪郭画像M(x,y)の各画素について、移動体の有無を判定する。
【0037】
ここで、移動体有無判定部12は、図4に示すフローチャートに従い、M(x,y)が「1」である画素については移動体有りと判定し(ステップ403)、M(x,y)が「0」である画素については移動体無しと判定する(ステップ402)。この場合、統合処理部4からの最初の移動体輪郭画像M(x,y)は全ての画素が「0」とされているので、全ての画素において移動体無しと判定される。
【0038】
移動体有無判定部12は、各画素についての移動体有無の判定結果を画素状態確認部13へ送る。画素状態確認部13は、移動体有無判定部12からの各画素についての移動体有無の判定結果を受けて、各画素の背景情報保持部9における「画素状態」(直前の画素状態)を確認する。ここで、移動体有りと判定された画素と移動体無しと判定された画素では、以降の処理が異なる。この場合、全ての画素が移動体無しと判定された画素であるので、図5に示す移動体無し時の処理動作が行われる。
【0039】
画素状態確認部13は、移動体無しと判定された各画素の背景情報保持部9における「画素状態」(直前の画素状態)をチェックし(ステップ402a)、その「画素状態」が「移動状態」であるか否かを確認する。この場合、移動体無しと判定された各画素の「画素状態」は「未定状態」であるので(ステップ402aのNO)、直ちに各画素に対しての定量化指令を定量化部7へ送る(ステップ402b)。
【0040】
定量化部7は、この画素状態確認部13からの定量化指令を受けて、背景情報保持部9に保持されている各画素の「時系列データ」および「経過時間ET」を読み出し、その各画素の「時系列データ」の変動具合を定量化する。この例では、各画素の変動具合として、「時系列データ」として保持されている画素値の平均A(x,y)と分散Varを求める。そして、定量化部7は、この求めた各画素の分散Varを画素状態分類部8へ送る。
【0041】
なお、画像フレーム(入力画像(x,y,t))の画素値をPix(x,y,t)とすると、画素値の平均A(x,y)と分散Var(x,y)はそれぞれ下記の(1)および(2)式で計算される。
【0042】
【数1】

Figure 2004265292
【0043】
最初の移動体輪郭画像M(x,y)が得られた時点では、背景情報保持部9にはまだ各画素の「時系列データ」は1つも保持されていないので、定量化部7ではまだ各画素の分散Varを求めることができない。この場合、定量化部7は、各画素の分散Varを零として画素状態分類部8へ送る。
【0044】
画素状態分類部8は、背景情報保持部9に保持されている各画素の「経過時間ET」を確認し、「経過時間ET」が予め定められている上限値ETmaxに達していなければ(ステップ402cのNO)、定量化部7からの分散Varに拘わらず、その画素の状態を「未定状態」であると判断し、その画素の「画素状態」として背景情報保持部9に保持させる(ステップ402d)。また、背景情報保持部9における各画素の「経過時間ET」を1アップし(ステップ402e)、画像確保部6へデータの保存指令を送る(ステップ402f)。なお、この実施の形態では、撮像手段1からn個の画像が取り込まれるまでの時間ETnを上限値ETmaxとしている。
【0045】
最初の移動体輪郭画像M(x,y)が得られた時点では、背景情報保持部9における各画素の「経過時間ET」は零とされている。したがって、この場合、画素状態分類部8は、各画素の状態を「未定状態」であると判断し、その画素の「画素状態」として背景情報保持部9に保持させる。また、背景情報保持部9における各画素の「経過時間ET」を1アップし、画像確保部6へデータの保存指令を送る。この保存指令を受けて、画像確保部6は、撮像手段1からの入力画像(最初の入力画像)I(x,y)における各画素の画素値D1を背景情報保持部9に送り、各画素の「時系列データ」として保持させる。
【0046】
以下、移動体有無判定部12に統合処理部4からの移動体輪郭画像M(x,y)が入力される毎に、同様動作を繰り返す。これによって、背景情報保持部9における各画素の背景情報は、「画素状態」を「未定状態」としたまま、「時系列データ」がD1,D2,D3・・・・Dnと保持されて行き、「経過時間ET」がET1,ET2,ET3・・・・ETnとカウントアップされて行く。
【0047】
移動体有無判定部12にn+1個目の移動体輪郭画像M(x,y)が入力され、画素状態分類部8へ定量化部7から各画素の分散Varが与えられると、画素状態分類部8で確認される背景情報保持部9における各画素の「経過時間ET」はETnとなり、ステップ402cにおいて経過時間ETが上限値ETmaxに達したことが検出される。この場合、画素状態分類部8は、各画素の「時系列データ」が必要量確保されたと判断し、定量化部7からの分散Varを用いての画素状態の分類を行う。
【0048】
すなわち、画素状態分類部8は、定量化部7から送られてくる各画素の分散Varと予め定められている閾値Varthとを比較し(ステップ402g)、Var>Varthであればその画素を「不安定状態」、Var≦Varthであれば「安定状態」と判断する。そして、この判断した各画素の状態(「安定状態」又は「不安定状態」)を背景情報保持部9に送り、各画素「画素状態」として保持させる(ステップ402h,402i)。これにより、それまで背景情報保持部9に保持されていた各画素の「画素状態」は、「未定状態」から「安定状態」又は「不安定状態」に書き替えられる。
【0049】
背景画像生成部10は、背景情報保持部9における各画素の「時系列データ(D1〜Dn)」に基づき、その各画素の「時系列データ(D1〜Dn)」の平均値として背景画像A(x,y)を生成し、保持する。
有効/無効領域決定部11は、背景情報保持部9における各画素の「画素状態」に基づき、「安定状態」である画素を有効画素(STATE(x,y)=1)、「不安定状態」である画素を無効画素(STATE(x,y)=0)とし、有効画素を集めた領域を背景差分処理の有効領域S1、無効画素を集めた領域を背景差分処理の無効領域S2として決定し、保持する。
【0050】
この後、画素状態分類部8は、画像確保部6へデータの保存指令を送る(ステップ402f)。この保存指令を受けて、画像確保部6は、撮像手段1からの入力画像I(x,y)(n+1個目の入力画像)における各画素の画素値Dn+1を背景情報保持部9に送り、各画素の「時系列データ」中の最も古い画素値D1と置き換える(ステップ402f)。
【0051】
このようにして、背景情報更新処理部5において、最初の背景画像A(x,y)と有効領域S1/無効領域S2が確定され、背景差分処理部2に対して設定される。
【0052】
〔実稼働中の移動体の検出〕
今、実稼働開始から時間ETn+1を経過した後の現時刻をTとし、例として、この現時刻Tにおける撮像手段1からの入力画像I(x,y)を図6(a)、背景情報更新処理部5からの背景画像A(x,y)を図6(b)、背景情報更新処理部5からの背景差分処理の有効領域S1/無効領域S2を図6(d)に示す。この現時刻Tにおける撮像手段1からの入力画像I(x,y)は、背景差分処理部2、輪郭抽出処理部3および背景情報更新処理部5へ送られる。
【0053】
〔▲2▼背景差分画像の取得:背景差分処理〕
背景差分処理部2は、撮像手段1からの現時刻Tにおける入力画像I(x,y)を取り込み、この取り込んだ現時刻Tの入力画像I(x,y)(図6(a))と背景画像更新処理部13からの背景画像A(x,y)(図6(b))との差を計算し、予め設定されている閾値Ths(x,y)を用いての閾値処理により差分画像S(x,y)(図6(c))を得る。この閾値処理は、数式表現すると、下記の(3),(4)式で表される。
【0054】
S(x,y)=1〔if |I(x,y)−A(x,y)|>Ths(x,y)〕 ・・・・(3)
S(x,y)=0〔if |I(x,y)−A(x,y)|≦Ths(x,y)〕 ・・・・(4)
【0055】
この処理は、入力画像I(x,y)の画素値と背景画像A(x,y)の画素値(平均値)との差が閾値Ths(x,y)より大きい画素、すなわち背景に大きな変化があった画素の値を「1」とする2値化処理である。
【0056】
そして、背景差分処理部2は、この閾値処理によって得た差分画像S(x,y)と背景情報更新処理部5からの有効領域S1/無効領域S2(図6(d)参照)とから、背景差分画像BG(x,y)を得る。この処理は、数式表現すると、下記の(5),(6)式で表される。この処理により、無効領域S2が背景差分処理の対象から除外され、図6(e)に示されるような背景差分画像BG(x,y)が得られる。
BG(x,y)=1〔if S(x,y)=1and(STATE(x,y)=1)〕・・・・(5)
BG(x,y)=0(otherwise)・・・(6)
【0057】
この処理は、差分画像S(x,y)において、その画素値が「1」でかつ有効画素(「安定状態」である画素)である画素の値を「1」、それ以外の画素の値を「0」とする2値化処理である。
この処理により、無効領域S2が背景差分処理の対象から除外され、図4(e)に示されるような背景差分画像BG(x,y)を得ることができる。
【0058】
この例では、差分画像S(x,y)において、移動体である人物Maの大部分が無効領域S2に位置している。したがって、背景差分画像BG(x,y)からは、ネオンNeとともにその無効領域S2に位置する人物Maの大部分が除外されている。背景差分画像BG(x,y)において、「1」とされた画素は、有効領域S1に位置している人物Maを示している。このようにして、背景差分処理によって、有効領域における移動体の像(2値画像)が得られる。
【0059】
なお、この実施の形態では、全領域を対象として入力画像I(x,y)と差分画像A(x,y)との差分画像S(x,y)を求め、この差分画像S(x,y)における無効領域S2の部分にマスクをかけることによって、無効領域S2を背景差分処理の対象から除外するようにしているが、有効領域S1についてのみ入力画像I(x,y)と差分画像A(x,y)との差分画像を求め、この差分画像を背景差分画像BG(x,y)として得るようにしてもよい。
【0060】
〔▲3▼輪郭抽出画像の取得:輪郭抽出処理〕
輪郭抽出処理部3は、撮像手段1からの現時刻Tにおける入力画像I(x,y)を取り込み、この取り込んだ入力画像I(x,y)中の変化物体の輪郭を含む輪郭抽出画像O(x,y)を生成する。この実施の形態では、一般にフレーム間差分と呼ばれている画像処理によって、輪郭抽出画像O(x,y)を生成する。
【0061】
図7は輪郭抽出処理部3の要部を示すブロック図である。輪郭抽出処理部3は、フレーム間差分処理部17と画像メモリ18とを備えている。フレーム間差分処理部17は、撮像手段1からの現時刻Tの入力画像I(x,y)(図6(a):今回の入力画像)と画像メモリ18に保存されている1フレーム前の入力画像F(x,y)(図6(f):前回の入力画像)との差を計算し、予め設定されている閾値Tho(x,y)を用いての閾値処理によりフレーム間差分画像(輪郭抽出画像)O(x,y)(図6(g))を得る。この閾値処理は、数式表現すると、下記の(7),(8)式で表される。
【0062】
O(x,y)=1〔if |I(x,y)−F(x,y)|>Tho(x,y)〕 ・・・・(7)
O(x,y)=0〔if |I(x,y)−F(x,y)|≦Tho(x,y)〕 ・・・・(8)
【0063】
この処理は、今回の入力画像I(x,y)の画素値と前回の入力画像F(x,y)の画素値との差が閾値Tho(x,y)より大きい画素、すなわちフレーム間で大きな変化があった画素の値を「1」とする2値化処理である。「1」とされた画素は、フレーム間で変化した物体を示し、ネオンのように移動体以外の物体も含まれる場合がある。
【0064】
フレーム間差分処理部17でのフレーム間差分処理の実行後、撮像手段1からの現時刻Tの入力画像I(x,y)はF(x,y)として画像メモリ18に格納され、次回行われるフレーム間差分処理において1フレーム前の入力画像として用いられる。なお、この例では、輪郭抽出処理部3においてフレーム間差分処理を行うようにしたが、現時刻Tの入力画像I(x,y)に対して画像処理で一般に知られている微分処理、領域分割などを用いて現時刻の入力画像I(x,y)内の変化物体の輪郭を含む輪郭抽出画像O(x,y)を得るようにしてもよい。また、フレーム間差分や微分処理など、複数の処理手段を併用してもよい。
【0065】
〔▲4▼移動体の輪郭抽出:統合処理〕
統合処理部4は、背景差分処理部2からの背景差分画像BG(x,y)中の移動体の像に基づいて輪郭抽出処理部3からの輪郭抽出画像O(x,y)中の変化物体の輪郭を絞り込み、移動体の全体の輪郭を特定する。
【0066】
基本的な考え方は、輪郭抽出画像O(x,y)に含まれる変化物体の輪郭から背景差分画像BG(x,y)の有効領域内の移動体の情報、すなわち信頼性の高い移動体の像に基づき、無効領域に位置する移動体の輪郭を絞り込んで行くことにある。
【0067】
本実施の形態の統合処理の主要部分である「移動体書き出し処理」(後述)では、以下に説明するように、背景差分画像BG(x,y)の有効領域の画素を探索点として、輪郭抽出画像O(x,y)に対して探索点の周囲の画素の値を繰り返しチェックして行く。その結果、統合処理部4における移動体の輪郭抽出においては、有効領域と無効領域との区別がなくなる。
【0068】
背景差分画像BG(x,y)(図6(e))において、その値が「1」の画素は、移動体(人物Ma)を表す。輪郭抽出画像O(x,y)において、その値が「1」の画素は、フレーム間で変化した物体(人物Maを含む)を表す。
【0069】
背景差分画像BG(x,y)における人物Maの像の輪郭と輪郭抽出画像O(x,y)における人物Maの輪郭とは一致する。従って、背景差分画像BG(x,y)における人物Maの像に基づき、この像の輪郭とつながる輪郭抽出画像O(x,y)における変化物体の輪郭を求めれば、人物Maの全体の輪郭を含む信頼性の高い移動体輪郭画像M(x,y)(図6(h))を得ることができる。
【0070】
統合処理部4における背景差分画像BG(x,y)と輪郭抽出画像O(x,y)とから移動体輪郭画像M(x,y)を生成する処理の流れを図8に示す。なお、前処理として、背景差分画像BG(x,y)や輪郭抽出画像O(x,y)に対し、収縮・膨張処理などを行いノイズ除去を行ってもよい。
【0071】
統合処理部4では、背景差分画像BG(x,y)と輪郭抽出画像O(x,y)との対応する各画素について、その値が共に「1」であるか否かを順番にチェックする(ステップ801)。背景差分画像BG(x,y)と輪郭抽出画像O(x,y)との対応する画素の値が共に「1」であれば(ステップ801のYES)、その都度、後述する「移動体書き出し処理」を実行する(ステップ802)。
【0072】
すなわち、背景差分画像BG(x,y)と輪郭抽出画像O(x,y)との対応する各画素について、下記の(9)式に従って順次評価値を求め、評価値が「1」となれば、「移動体書き出し処理」を行う。この「移動体書き出し処理」の繰り返しによって、移動体輪郭画像M(x,y)を生成する。
If〔BG(x,y)=「1」 and O(x,y)=「1」〕then「1」else「0」 ・・・・(9)
【0073】
なお、この(9)式は、(BG(x,y)、O(x,y)共に「1」の画素については評価値を「1」とし、それ以外の画素については評価値を「0」とすることを意味している。評価値が「1」となった画素についてのみ「移動体書き出し処理」を行い、評価値が「0」となった画素については「移動体書き出し処理」は行わない。
【0074】
〔移動体書き出し処理〕
ステップ801において、背景差分画像BG(x,y)と輪郭抽出画像O(x,y)との対応する画素が共に「1」であることが確認されると(図10(a),(b)参照)、すなわち上記(9)式によって求められる評価値が「1」となると、統合処理部4はその画素の座標点(x,y)を探索点として探索点メモリに書き込む(図9に示すステップ901)。
【0075】
また、その探索点(x,y)に対応する移動体輪郭画像M(x,y)における画素の値を「1」とする(ステップ902:図10(c)参照)。また、再度探索点とされないように、その探索点(x,y)に対応する背景差分画像BG(x,y)、輪郭抽出画像O(x,y)における画素の値を「0」とする(ステップ903:図10(d),(e)参照)。
【0076】
そして、探索点(x,y)の周囲の画素について、すなわち探索点(x,y)の周囲に位置する背景差分画像BG(x,y)と輪郭抽出画像O(x,y)との対応する各画素について、順番にその値をチェックして行く(ステップ904〜908)。なお、本実施の形態では、周囲8画素を処理対象とする。
【0077】
図11(a)は輪郭抽出画像O(x,y)における最初の探索点(x,y)の周囲8画素を示し、図11(b)は背景差分画像BG(x,y)における最初の探索点(x,y)の周囲8画素を示す。この探索点(x,y)の周囲8画素について、背景差分画像BG(x,y)と輪郭抽出画像O(x,y)との対応する画素(周囲画素)の値をチェックし、どちらかが「1」であれば(ステップ904のYES)、その周囲画素の座標点(x,y)を次期探索点として次期探索点メモリに登録する(ステップ905)。図11に示した例では、座標点(x,y+1)と(x,y−1)が次期探索点として登録される。
【0078】
また、次期探索点を登録した後、その次期探索点に対応する移動体輪郭画像M(x,y)における画素の値を「1」とする(ステップ906)。図11に示した例では、図12(a)に示すように、座標点(x,y+1)と(x,y−1)の対応する移動体輪郭画像M(x,y)における画素の値が「1」とされる。そして、再度探索点とされないように、その次期探索点に対応する背景差分画像BG(x,y)および輪郭抽出画像O(x,y)における画素の値を「0」とする(ステップ907:図13(a),(b)参照)。
【0079】
すなわち、探索点(x,y)の周囲の背景差分画像BG(x,y)と輪郭抽出画像O(x,y)との対応する各画素(周囲画素)について、下記の(10)式に従って評価値を求め、評価値が「1」となれば、その周囲画素の座標点(x,y)を次期探索点として次期探索点メモリに登録し、その周囲画素の座標点(x,y)に対応する移動体輪郭画像M(x,y)における画素の値を「1」とし、その周囲画素の座標点(x,y)に対応する背景差分画像BG(x,y)、輪郭抽出画像O(x,y)における画素の値を「0」とする。探索点(x,y)の周囲画素の全てについて処理を終了すれば(ステップ908のYES)、ステップ909へ進む。
If〔BG(x,y)=「1」 or O(x,y)=「1」〕then「1」else「0」 ・・・・(10)
【0080】
ステップ909では、次期探索点が次期探索点メモリに登録されているか否かをチェックし、次期探索点が次期探索点メモリに登録されていれば(ステップ909のYES)、その登録されている次期探索点の1つを新しい探索点として探索点メモリに登録し(ステップ910)、ステップ904へ戻って同様動作を繰り返す。
【0081】
これにより、図12(b)に示すように、移動体輪郭画像M(x,y)において、その値を「1」とする画素が探索点(x,y)を中心としてつながって行く。次期探索点メモリに次期探索点がなくなれば(ステップ909のNO)、一連の移動体書き出し処理を終了する。この移動体書き出し処理は、有効領域S1,無効領域S2の区別なく、ステップ803で全画素が終了するまで繰り返される。
【0082】
この「移動体書き出し処理」の繰り返しによって、背景差分画像BG(x,y)における信頼性の高い人物Maの像とつながる輪郭抽出画像O(x,y)中における変化物体の輪郭が求められて行き、人物Maの全体の輪郭を含む信頼性の高い移動体輪郭画像M(x,y)(図6(h))が得られるようになる。これにより、自動的に決定(自動的に更新)される無効領域S2が広くなっても、人物Maの検出を高精度で行うことができるようになる。
【0083】
〔▲5▼稼働中の背景画像および有効/無効領域の自動更新〕
統合処理部4で得られた移動体輪郭画像M(x,y)は背景情報更新処理部5へフィードバックされる。背景情報更新処理部5において、移動体有無判定部12は、統合処理部4からの移動体輪郭画像M(x,y)の各画素について、移動体の有無を判定する。すなわち、M(x,y)が「1」である画素については移動体有りと判定し(図4のステップ403)、M(x,y)が「0」である画素については移動体無しと判定する(ステップ402)。
【0084】
〔移動体無しと判定された画素:直前の「画素状態」に「移動状態」が含まれていない場合〕
移動体有無判定部12は、各画素についての移動体有無の判定結果を画素状態確認部13へ送る。画素状態確認部13は、移動体有無判定部12からの各画素についての移動体有無の判定結果を受けて、各画素の背景情報保持部9における「画素状態」(直前の画素状態)を確認する(図5のステップ402a)。この例では、説明上、背景情報保持部9における移動体無しと判定された画素の「画素状態」は「移動状態」を含まず、「安定状態」又は「不安定状態」とされているものとする。
【0085】
この場合、画素状態確認部13は、移動体無しと判定された全ての画素について定量化部7へ定量化指令を送る(ステップ402a,402b)。定量化部7は、この定量化指令を受けて、背景情報保持部9に保持されている移動体無しと判定された各画素の「時系列データ」および「経過時間ET」を読み出し、その「時系列データ」の平均と分散を求める。
【0086】
画素状態分類部8は、移動体無しと判定された各画素の経過時間ETが上限値ETmaxに達していることを確認のうえ(ステップ402cのYES)、定量化部7から送られてくる移動体無しと判定された各画素の分散Varと予め定められている閾値Varthとを比較し、Var>Varthであればその画素を「不安定状態」、Var≦Varthであれば「安定状態」と判断し、その画素の「画素状態」として背景情報保持部9に保持(更新)させる(ステップ402h,402i)。
【0087】
これにより、今回の過去一定時間(ETn)の画素値の分散VarがVarthを超えた画素(前回はVar≦Varth)については、その背景情報中の「画素状態」が「安定状態」から「不安定状態」へと変更される(図14に示す遷移▲5▼)。また、今回の過去一定時間(ETn)の画素値の分散VarがVarth以下になった画素(前回はVar>Varth)については、その背景情報中の「画素状態」が「不安定状態」から「安定状態」へと変更される(図14に示す遷移▲6▼)。
【0088】
この後、画素状態分類部8は、画像確保部6へデータの保存指令を送る。画像確保部6は、画素状態分類部8からの保存指令を受けて、撮像手段1からの入力画像I(x,y)における移動体無しと判定された各画素の画素値を背景情報保持部9に送り、その各画素の「時系列データ」中の最も古い画素値と置き換えて保存する(ステップ402f)。
【0089】
〔移動体有りと判定された画素:直前の「画素状態」に「移動状態」が含まれていない場合〕
移動体有無判定部12は、各画素についての移動体有無の判定結果を画素状態確認部13へ送る。画素状態確認部13は、移動体有無判定部12からの各画素についての移動体有無の判定結果を受けて、各画素の背景情報保持部9における「画素状態」(直前の画素状態)を確認する。この例では、説明上、背景情報保持部9における移動体有りと判定された画素の「画素状態」は「移動状態」を含まず、「安定状態」又は「不安定状態」とされているものとする。
【0090】
この場合、画素状態確認部13は、移動体有りと判定された全ての画素について、その確認した直前の「画素状態」を画素状態分類部8へ送る。画素状態分類部8は、画素状態確認部13から送られてくる「画素状態」が「安定状態」であった場合、その画素について「安定状態」から「移動状態」への遷移と判断し(図14に示す遷移▲3▼)、すなわちその「画素状態」を「移動状態」の一形態である「安定状態から移動状態」であると判断し、その画素の「画素状態」として背景情報保持部9に保持(更新)させる。また、これと同時に、その画素の背景情報中の「移動時間TM」を1アップさせる(図15に示す処理内容▲1▼参照)。これにより、「安定状態」から「移動状態」へ遷移した画素について、その移動時間(移動状態に遷移してからの経過時間)TMのカウントが開始される。
【0091】
画素状態分類部8は、画素状態確認部13から送られてくる「画素状態」が「不安定状態」であった場合、その画素について「不安定状態」から「移動状態」への遷移と判断し(図14に示す遷移▲4▼)、すなわちその「画素状態」を「移動状態」の一形態である「不安定状態から移動状態」であると判断し、その画素の「画素状態」として背景情報保持部9に保持(更新)させる。また、これと同時に、その画素の背景情報中の「移動時間TM」を1アップさせる(図15に示す処理内容▲2▼参照)。これにより、「不安定状態」から「移動状態」へ遷移した画素について、その移動時間TMのカウントが開始される。
【0092】
なお、全ての場合において「移動状態」への更新後は、その画素の背景情報における「時系列データ」中の最新の画素値(直前の画素値)を現在の画素値とし、この現在の画素値を最も古い画素値と置き換えて保存する。すなわち、移動体有りと判定された画素については、その移動体を含む画素値を背景情報中の時系列データとしては含めない。
【0093】
〔移動体有りと判定された画素:直前の「画素状態」に「移動状態」が含まれている場合〕
移動体有無判定部12は、各画素についての移動体有無の判定結果を画素状態確認部13へ送る。画素状態確認部13は、移動体有無判定部12からの各画素についての移動体有無の判定結果を受けて、各画素の背景情報保持部9における「画素状態」(直前の画素状態)を確認する。この例では、説明上、背景情報保持部9における移動体有りと判定された画素の「画素状態」に「移動状態」が含まれているものとする。
【0094】
この場合、画素状態確認部13は、移動体有りと判定された全ての画素について、その確認した直前の「画素状態」を画素状態分類部8へ送る。画素状態分類部8は、画素状態確認部13から送られてくる「画素状態」が「移動状態」であった場合、その送られてきた「移動状態」をそのままその画素の「画素状態」として背景情報保持部9に保持(更新)させる。すなわち、直前の「画素状態」が「安定状態から移動状態」であれば更新後の「画素状態」も「安定状態から移動状態」とし、直前の「画素状態」が「不安定状態から移動状態」であれば更新後の「画素状態」も「不安定状態から移動状態」とする。この場合、その画素の背景情報中、「移動時間TM」を1アップする(図15に示す処理内容▲4▼,▲5▼参照)。なお、移動時間TMは、予め定められた上限値TMmaxより上には増やさない。
【0095】
〔移動体無しと判定された画素:移動状態でなくなった場合〕
移動体有無判定部12は、移動体輪郭画像M(x,y)から移動体が無くなると、それまで移動体有りと判定していた画素を移動体無しと判定する。この場合、画素状態確認部13は、移動体有無判定部12からの各画素についての移動体有無の判定結果を受けて、各画素の背景情報保持部9における「画素状態」(直前の画素状態)を確認する。
【0096】
ここで、移動体無しと判定された画素の直前の「画素状態」は「移動状態」とされているので(図5に示すステップ402aのYES)、画素状態確認部13はその旨を移動時間判定部14へ知らせる。移動時間判定部14は、画素状態確認部13からの知らせを受けて、その移動体無しと判定された画素の背景情報保持部9における「移動時間TM」をチェックする(ステップ402j)。
【0097】
(イ)移動体がとどまっていた時間が短かった場合
「移動時間TM」が上限値TMmaxに達していない場合、すなわち移動体がその画素にとどまっていた時間が短かかった場合、移動時間判定部14はその画素の背景情報中の「移動時間TM」を零に戻し(ステップ402k)、定量化部7へ定量化指令を送る。
【0098】
定量化部7は、移動時間判定部14からの定量化指令を受けて、背景情報保持部9に保持されている移動体無しと判定された画素の「時系列データ」および「経過時間ET」を読み出し、その「時系列データ」の平均と分散を求める(ステップ402b)。この場合、移動体無しと判定された画素の「経過時間ET」は上限値ETmaxに達しているので(ステップ402cのYES)、ステップ402g以降の処理が実行される。
【0099】
この処理によって、「安定状態」か「不安定状態」かが判断され、「安定状態」と判断された画素の背景情報中の「画素状態」は「移動状態」から「安定状態」へ遷移し(ステップ402i:図14の遷移▲7▼)、「不安定状態」として判断された画素の背景情報中の「画素状態」は「移動状態」から「不安定状態」へ遷移する(ステップ402h:図14の遷移▲8▼)。
【0100】
(ロ)移動体がとどまっていた時間が長かった場合
「移動時間TM」が上限値TMmaxに達していた場合、すなわち移動体がその画素にとどまっていた時間が長かかった場合、移動時間判定部14はその画素の背景情報中の「時系列データ」をクリするとともに(ステップ402m)、その画素の背景情報中の「経過時間ET」および「移動時間TM」を零に戻し(ステップ402n,102k)、定量化部7へ定量化指令を送る。
【0101】
定量化部7は、移動時間判定部14からの定量化指令を受けて、背景情報保持部9に保持されている移動体無しと判定された画素の「時系列データ」および「経過時間ET」を読み出し、その「時系列データ」の平均と分散を求める(ステップ402b)。この場合、移動体無しと判定された画素の経過時間ETは0に戻されているので(ステップ402cのNO)、ステップ402d以降の処理が実行される。この処理によって、その画素の背景情報中の画素の「画素状態」は、「移動状態」から「未定状態」へ遷移する(ステップ402d:図14の遷移▲9▼)。また、その画素の背景情報中の「経過時間ET」のカウントが開始されるとともに(ステップ402e)、その画素の背景情報中の「時系列データ」の収集が開始される(ステップ402f)。
【0102】
〔移動体有りと判定された画素:直前の「画素状態」に「未定状態」が含まれている場合〕
移動体有無判定部12は、各画素についての移動体有無の判定結果を画素状態確認部13へ送る。画素状態確認部13は、移動体有無判定部12からの各画素についての移動体有無の判定結果を受けて、各画素の背景情報保持部9における「画素状態」(直前の画素状態)を確認する。この例では、説明上、背景情報保持部9における移動体有りと判定された画素の「画素状態」に「未定状態」が含まれているものとする。
【0103】
この場合、画素状態確認部13は、移動体有りと判定された全ての画素について、その確認した直前の「画素状態」を画素状態分類部8へ送る。画素状態分類部8は、画素状態確認部13から送られてくる「画素状態」が「未定状態」であった場合、その画素について「未定状態」から「移動状態」への遷移と判断し(図14の遷移(10))、すなわちその「画素状態」を「移動状態」の一形態である「未定状態から移動状態」であると判断し、この「未定状態から移動状態」をその画素の「画素状態」として背景情報保持部9に保持(更新)させる。また、これと同時に、その画素の背景情報中の「移動時間TM」を1アップさせる(図15に示す処理内容▲3▼参照)。これにより、「未定状態」から「移動状態」へ遷移した画素について、その移動時間TMのカウントが開始される。
【0104】
〔移動体有りと判定された画素:直前の「画素状態」に「未定状態から移動状態」が含まれている場合〕
移動体有無判定部12は、各画素についての移動体有無の判定結果を画素状態確認部13へ送る。画素状態確認部13は、移動体有無判定部12からの各画素についての移動体有無の判定結果を受けて、各画素の背景情報保持部9における「画素状態」(直前の画素状態)を確認する。この例では、説明上、背景情報保持部9における移動体有りと判定された画素の「画素状態」に「未定状態から移動状態」が含まれているものとする。
【0105】
この場合、画素状態確認部13は、移動体有りと判定された全ての画素について、その確認した直前の「画素状態」を画素状態分類部8へ送る。画素状態分類部8は、画素状態確認部13から送られてくる「画素状態」が「未定状態から移動状態」であった場合、その送られてきた「未定状態から移動状態」をそのままその画素の「画素状態」として背景情報保持部9に保持(更新)させる。また、これと同時に、その画素の背景情報中の「移動時間TM」を1アップする(図15に示す処理内容▲6▼参照)。
【0106】
このようにして自動更新された各画素の背景情報より、移動体輪郭画像M(x,y)が得られる毎に、有効/無効領域決定部11は、「安定状態」である画素、「安定状態から移動状態」である画素を有効画素(STATE(x,y)=1)とし、「未定状態」である画素、「不安定状態」である画素、「未定状態から移動状態」である画素「不安定状態から移動状態」である画素を無効画素(STATE(x,y)=0)とし、有効画素を集めた領域を背景差分処理の有効領域S1、無効画素を集めた領域を背景差分処理の無効領域S2として決定する。また、背景画像生成部10は、各画素の「時系列データ」の平均値として背景画像A(x,y)を生成する。
【0107】
【発明の効果】
以上説明したことから明らかなように本発明によれば、画像フレーム内で任意に設定される有効領域を対象として入力画像と背景画像との差分を求め、入力画像の有効領域内における変化物体の像を含む背景差分画像を求め、入力画像中の変化物体の輪郭を含む輪郭抽出画像を求め、背景差分画像中の像に基づいてこの像と連続する輪郭抽出画像中の変化物体の輪郭を抽出するようにしたので、信頼性の高い背景差分画像の物体の像に基づいて、この像と連続する輪郭抽出画像中の変化物体の輪郭が抽出されこれにより、見かけ上、有効領域と無効領域との区別がなくなり、有効/無効領域の自動決定などによって無効領域が広く設定されても、移動体などの検出をより高精度で行うことができるようになる。
【図面の簡単な説明】
【図1】本発明に係る画像処理装置の一実施の形態を示す移動体検出装置の要部のブロック図である。
【図2】この移動体検出装置における背景情報更新処理部の内部構成の概略を示すブロック図である。
【図3】この移動体検出装置における画素毎の背景情報の要素名および概要を示す図である。
【図4】この移動体検出装置における移動体の有無の判定処理を示すフローチャートである。
【図5】この移動体検出装置における移動体無しと判定された場合の処理を示すフローチャートである。
【図6】この移動体検出装置における移動体の検出処理を説明するための図である。
【図7】この移動体検出装置における輪郭抽出処理部の要部を示すブロック図である。
【図8】この移動体検出装置における統合処理部での背景差分画像と輪郭抽出画像とからの移動体輪郭画像の生成処理を示すフローチャートである。
【図9】この移動体検出装置における統合処理部での移動体輪郭画像を生成する際の移動体書き出し処理を示すフローチャートである。
【図10】このフローチャートに従う移動体書き出し処理を説明するための図である。
【図11】輪郭抽出画像および背景差分画像における最初の探索点(x,y)の周囲8画素を示す図である。
【図12】移動体輪郭画像が出来上がって行く様子を示す図である。
【図13】再度探索点とされないように時期探索点に対応する背景差分画像および輪郭抽出画像における画素の値が「0」とされて行く様子を示す図である。
【図14】画素状態分類部で分類される画素状態の遷移図である。
【図15】移動体有りと判定された画素についての処理内容を示す図である。
【図16】従来の背景差分処理を説明する図である。
【図17】頻繁に変化する物体として例えばネオンが含まれている場合の背景差分処理を説明する図である。
【図18】人為的に有効/無効領域を設定して背景差分処理を行うようにした従来例を説明する図である。
【図19】無効領域が広くなることによる検出性能の劣化を説明する図である。
【符号の説明】
1…撮像手段、2…背景差分処理部、3…輪郭抽出処理部(フレーム間差分処理部)、4…統合処理部、5…背景情報更新処理部、6…画像確保部、7…定量化部、8…画素状態分類部、9…背景情報保持部、10…背景画像生成部、11…有効/無効領域決定部、12…移動体有無判定部、13…画素状態確認部、14…移動時間判定部、15…フレーム間差分処理部、16…画像メモリ、100…移動体検出装置。[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing method and apparatus for obtaining a difference between an input image and a background image for a valid area as a background difference image and detecting a moving object or the like from the background difference image.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, a background difference process has been performed in detecting a moving object or the like. FIG. 16A shows an input image captured by an imaging unit such as a TV camera, and FIG. 16B shows a background image included in the input image. If the moving object is not shown in the input image, the input image is equal to the background image. In the background subtraction processing, a difference between the input image shown in FIG. 16A and the background image shown in FIG. 16B is obtained, and a background difference image as shown in FIG. 16C is obtained. In this example, a person Ma is shown as a moving object in the input image, and only the person Ma not included in the background image appears in the background difference image by calculating a difference from the background image. Thus, the image of the moving object can be extracted (detected).
[0003]
However, the background includes not only a stationary object but also an object that moves or whose luminance changes frequently. For example, neon and the like frequently and remarkably change in luminance. The input image shown in FIG. 17A and the background image shown in FIG. 17B contain neon Ne. In this case, when the background difference processing is performed, neon Ne appears in addition to the person Ma in the background difference image illustrated in FIG. In the background difference image shown in FIG. 17C, neon Ne is a disturbance factor that gives an inappropriate decision in detecting the person Ma as the moving body.
[0004]
Therefore, in the recent background subtraction processing, an effective area to be subjected to the background subtraction processing and an invalid area not to be subjected to the background image are set, and a moving object is detected based on information of only the effective area. For example, as shown in FIG. 18B, the area where neon Ne is present is defined as an invalid area S2, the remaining area excluding the invalid area S2 is defined as an effective area S1, and an input image (FIG. 18A )) And the background image (FIG. 18B) to obtain a background difference image as shown in FIG. 18C. As a result, the invalid area S2 in which the neon Ne is present is excluded from the target of the background subtraction processing, and a background difference image including only the person Ma in the input image can be obtained (for example, see Patent Document 1).
[0005]
In the above-described example, the difference between the input image and the background image is obtained only for the effective area S1, but the difference between the input image and the background image is obtained for the entire area, and the invalid area S2 in the difference image is obtained. Is also performed by applying a mask to the portion corresponding to the background difference image as shown in FIG. Even by such a masking method, it is possible to exclude the invalid area S2 from the target of the background subtraction processing, detect only the valid area S1 as the target of the background subtraction processing, and detect only the person Ma in the input image as a moving object. it can.
[0006]
[Patent Document 1]
JP-A-9-214938 (pages 4-5, FIGS. 1-4)
[0007]
[Problems to be solved by the invention]
However, according to such a conventional method of detecting a moving object, when the invalid area S2 of the background difference processing is widened, the probability that the moving object to be detected is included in the invalid area S2 increases. For example, if the invalid area S2 is widened as shown in FIG. 19B, the invalid area S2 may include most of the person Ma. As shown in FIG. 19 (c), only a part of the person Ma appears. In this case, sufficient detection of the person Ma cannot be performed, and eventually, the detection performance of the moving object is deteriorated.
[0008]
The present invention has been made to solve such a problem, and an object of the present invention is to provide an image processing method and apparatus capable of detecting a moving object or the like with higher accuracy.
[0009]
[Means for Solving the Problems]
In order to achieve such an object, the present invention obtains a difference between an input image and a background image for an effective area arbitrarily set in an image frame, and obtains an image of a changing object in the effective area of the input image. Obtaining a background subtraction image including the contour of the changing object in the input image; and obtaining a contour extraction image including the contour of the changing object in the input image. Is extracted.
[0010]
According to the present invention, a difference between an input image and a background image for an effective area is obtained as a background difference image. In addition, a contour extraction image including the contour of the changing object in the input image is obtained. When detecting a moving object, there is a high probability that the object appearing in the background difference image is the moving object to be detected. Objects appearing in the contour extraction image include other changed objects. According to the present invention, based on an image of an object of a highly reliable background difference image, the outline of a changing object in an outline extraction image that is continuous with this image is extracted. Thus, apparently, there is no distinction between the valid area and the invalid area, and the entire contour of the moving object to be detected can be extracted.
[0011]
In the present invention, the contour extraction image can be obtained by, for example, an inter-frame difference process. In the inter-frame difference processing, a difference between two successive input images from the time series of the input images is obtained as a contour extraction image. The contour extraction image does not necessarily need to be obtained by the inter-frame difference processing, and may be obtained by using a differential processing, a region division, or the like generally known in image processing. Also, a plurality of processing means such as an inter-frame difference and a differential processing may be used in combination.
[0012]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram of a main part of a moving object detection device showing an embodiment of an image processing device according to the present invention. In FIG. 1, reference numeral 1 denotes an imaging unit such as a TV camera, 2 denotes a background difference processing unit, 3 denotes an outline extraction processing unit, 4 denotes an integration processing unit, and 5 denotes a background information update processing unit.
[0013]
In the moving object detection device 100, a time-series input image I (x, y, t) (hereinafter, abbreviated as I (x, y)) input at a predetermined cycle from the imaging unit 1 is used as a background difference processing unit. 2. The background difference image BG (x, y) generated by the background difference processing unit 2 and the contour extraction image generated by the contour extraction processing unit 3 are sent to the contour extraction processing unit 3 and the background information update processing unit 5. A moving object outline image M (x, y) is generated in the integration processing unit 4 from O (x, y), and the generated moving object outline image M (x, y) is fed back to the background information update processing unit 5. , The background image A (x, y) and the effective area S1 / ineffective area S2 of the background difference processing are updated.
[0014]
The background difference processing unit 2 includes an input image I (x, y) from the imaging unit 1, a background image A (x, y) from the background information update processing unit 5, and an effective area S1 / invalid area S2 of the background difference processing. Then, a background difference image BG (x, y) including the image of the changing object in the effective area S1 is generated.
The contour extraction processing unit 3 generates a contour extraction image O (x, y) including a contour of a changing object in the input image I (x, y) from the input image I (x, y) from the imaging unit 1. .
[0015]
The integration processing unit 4 obtains an input image I (x, y) from the background difference image BG (x, y) from the background difference processing unit 2 and the contour extraction image O (x, y) from the contour extraction processing unit 3. A highly reliable moving object outline image M (x, y) including the entire outline of the moving object in the middle is generated.
The background information update processing unit 5 converts the input image I (x, y) from the imaging unit 1 and the moving object outline image M (x, y) from the integration processing unit 4 into a background image to the background difference processing unit 2. A (x, y) and an effective area S1 / ineffective area S2 for the background difference processing are generated (updated).
[0016]
FIG. 2 is a block diagram schematically showing the internal configuration of the background information update processing unit 5. The background information update processing unit 5 includes an image securing unit 6, a quantifying unit 7, a pixel state classifying unit 8, a background information holding unit 9, a background image generating unit 10, a valid / invalid area determining unit 11, a moving object presence / absence determining unit 12, , A pixel state confirmation unit 13 and a movement time determination unit 14.
[0017]
[Outline of Function of Each Unit of Background Information Update Processing Unit 5]
In the background information update processing unit 5, the image securing unit 6 secures a time-series input image I (x, y) input at a predetermined cycle from the imaging unit 1 by a predetermined specific amount, and secures it. The pixel value of each pixel constituting the image frame of each image is sent to the background information holding unit 9 and held as "time-series data" which is a part of the background information of each pixel.
[0018]
The quantification unit 7 extracts the “time-series data” of each pixel stored in the background information storage unit 9 and quantifies the degree of change of the “time-series data” of each extracted pixel. The pixel state classification unit 8 classifies the state of each pixel based on the degree of variation of each pixel quantified by the quantification unit 7, sends the classified state of each pixel to the background information holding unit 9, and Is stored as a “pixel state” which is a part of the background information.
[0019]
The “pixel state” includes “undetermined state”, “stable state”, “unstable state”, and “moving state”, and “moving state” further includes “moving state from undetermined state” and “moving state from stable state”. Moving state "and" moving state from unstable state ". These “pixel states” will be described later.
[0020]
The background information holding unit 9 includes, in addition to the “time-series data” and “pixel state” described above, “elapsed time ET” (time elapsed since the pixel state entered an undetermined state), “movement time TM” (pixel The time elapsed since the state entered the moving state) is held as background information of each pixel. FIG. 3 shows the element names and the outline of the background information for each pixel.
[0021]
The background image generation unit 10 generates a background image A (x, y) based on the “time-series data” of each pixel in the background information holding unit 9. The valid / invalid area determination unit 11 determines an effective area S1 / invalid area S2 for background subtraction processing based on the “pixel state” of each pixel in the background information holding unit 9.
[0022]
The moving body presence / absence determining unit 12 determines the presence / absence of a moving body for each pixel of the moving body outline image M (x, y) fed back from the integration processing unit 4, and sends the determination result to the pixel state checking unit 13. send. In this case, if the pixel value of the pixel is “1”, it is determined that there is a moving object, and if the pixel value of the pixel is “0”, it is determined that there is no moving object.
[0023]
The pixel state checking unit 13 receives the determination result of the moving object presence / absence for each pixel from the moving object presence / absence determining unit 12 and checks the “pixel state” (previous pixel state) of the pixel in the background information holding unit 9. For a pixel determined to have a moving object, the confirmed “pixel state” is sent to the pixel state classifying unit 8, and for a pixel determined to have no moving object, a quantification command is sent to the quantification unit 7. .
[0024]
In response to the notification from the pixel state checking unit 13, the moving time determination unit 14 determines the “moving time” in the background information in the background information holding unit 9 for the pixel that has changed from “with moving object” to “without moving object”. "TM" is checked to determine the length of time the moving body has stayed at that pixel.
[0025]
[Overall Processing Flow in Mobile Detector 100]
In the following, for the sake of simplicity, the input image I (x, y) from the imaging means 1 is not included until at least n input images I (x, y) are captured after the start of actual operation. It is assumed that a moving object and an object whose luminance changes are not included.
[0026]
After the start of the actual operation, until the n input images I (x, y) are secured, all the valid / invalid areas to the background difference processing unit 2 are the invalid areas S2 (described later). . When n input images I (x, y) are secured, the first background image A (x, y) based on the n input images I (x, y) and the effective area S1 / invalid area S2 are set as the background. The information is updated in the information update processing unit 5 and set in the background difference processing unit 2 ((1) setting of background image and valid / invalid area immediately after actual operation starts).
[0027]
Then, the background difference processing unit 2 uses the background image A (x, y) and the valid area S1 / invalid area S2 to determine between the input image I (x, y) and the background image A (x, y). The background difference processing is performed, and a background difference image BG (x, y) is obtained ((2) acquisition of a background difference image).
[0028]
In parallel with the acquisition of the background difference image BG (x, y), the contour extraction processing unit 3 performs a contour extraction process on the input image I (x, y), and outputs the input image I (x, y). An outline extraction image O (x, y) including the outline of the middle changing object is obtained ((3) acquisition of the outline extraction image).
[0029]
Then, in the integration processing unit 4, the background difference image BG (the outline of the changing object) in the outline extraction image O (x, y) obtained by the outline extraction processing unit 3 is obtained by the background difference processing unit 2. An image continuous with the image (image of the moving object) in (x, y) is extracted, and a highly reliable moving object outline image M (x, y) including the entire outline of the moving object is obtained ([4]). Extraction of outline of moving object).
[0030]
Further, the moving object outline image M (x, y) is fed back to the background information update processing unit 5, and the background image A (x, y) and the valid area S1 / invalid area S2 are automatically updated (▲ 5). ▼ Automatic updating of active background image and valid / invalid area).
[0031]
Hereinafter, the processing procedure will be described along with the above-described overall processing flow, with the detailed functions of each unit. It should be noted that, in the flow of the entire process, the present invention includes the processes of “(2) acquisition of a background difference image”, “(3) acquisition of a contour extraction image”, and “(4) extraction of a contour of a moving object”. It is not directly related to "(1) Setting of background image and valid / invalid area immediately after start of actual operation" and "(5) Automatic update of background image and valid / invalid area during operation".
[0032]
[(1) Setting of background image and valid / invalid area immediately after start of actual operation]
When an instruction to start actual operation is issued, the image securing unit 6 in the background information update processing unit 5 sets the “pixel state” of each pixel in the background information holding unit 9 to “undetermined state” as an initial state. “Undetermined state” means that the state of the pixel has not been determined yet. Further, the “elapsed time ET” and the “movement time TM” of each pixel are reset to zero. Also, the “time-series data” of each pixel is cleared to zero.
[0033]
After the start of actual operation, the first input image I (x, y) from the imaging unit 1 is sent to the background difference processing unit 2, the contour extraction processing unit 3, and the background information update processing unit 5.
When the first input image I (x, y) from the imaging unit 1 is input, the background difference processing unit 2 and the input image I (x, y) and the background image A ( x, y) and the effective area S1 / ineffective area S2 of the background subtraction processing, a background difference image BG (x, y) is generated.
[0034]
In this case, the “pixel state” of each pixel in the background information in the background information holding unit 9 of the background information update processing unit 5 is “undetermined”. The background information update processing unit 5 determines that a pixel whose “pixel state” is “undetermined state” is an invalid pixel, and sets an area where invalid pixels are collected as an invalid area in the background difference processing. Therefore, in this case, there is no effective area S1 for the background subtraction processing, and all areas are regarded as invalid areas S2.
[0035]
Therefore, all pixels of the background difference image BG (x, y) are set to “0” regardless of the input image I (x, y), and the contour extraction image O (x, y) obtained by the contour extraction processing unit 3. ), All pixels of the moving object outline image M (x, y) obtained by the integration processing unit 4 are set to “0”, even if the outline of the changing object is extracted in (). The specific processing contents of the contour extraction processing unit 3 and the integration processing unit 4 will be described later.
[0036]
The moving object outline image M (x, y) obtained from the integration processing unit 4 is fed back to the background information update processing unit 5. In the background information update processing unit 5, the moving object presence / absence determining unit 12 determines the presence / absence of a moving object for each pixel of the moving object outline image M (x, y) from the integration processing unit 4.
[0037]
Here, according to the flowchart shown in FIG. 4, the moving body presence / absence determining unit 12 determines that there is a moving body for a pixel whose M (x, y) is “1” (step 403), and M (x, y) It is determined that there is no moving object for the pixel for which is “0” (step 402). In this case, since all pixels of the first moving object contour image M (x, y) from the integration processing unit 4 are “0”, it is determined that no moving object exists in all pixels.
[0038]
The moving body presence / absence determining unit 12 sends the determination result of the moving body presence / absence for each pixel to the pixel state checking unit 13. The pixel state checking unit 13 receives the determination result of the moving object presence / absence for each pixel from the moving object presence / absence determining unit 12, and checks the “pixel state” (the immediately previous pixel state) in the background information holding unit 9 of each pixel. I do. Here, the subsequent processing is different between the pixel determined to have a moving object and the pixel determined to be absent. In this case, since all the pixels are pixels determined to have no moving object, the processing operation when there is no moving object shown in FIG. 5 is performed.
[0039]
The pixel state checking unit 13 checks the “pixel state” (the immediately preceding pixel state) in the background information holding unit 9 of each pixel determined as having no moving object (step 402a), and the “pixel state” is “moving state”. "Is checked. In this case, since the “pixel state” of each pixel determined to have no moving object is “undetermined state” (NO in step 402a), a quantification command for each pixel is immediately sent to the quantification unit 7 ( Step 402b).
[0040]
The quantification unit 7 receives the quantification command from the pixel state confirmation unit 13, reads out “time-series data” and “elapsed time ET” of each pixel stored in the background information storage unit 9, and The degree of fluctuation of “time-series data” of a pixel is quantified. In this example, the average A (x, y) and the variance Var of the pixel values held as “time-series data” are obtained as the degree of variation of each pixel. Then, the quantification unit 7 sends the obtained variance Var of each pixel to the pixel state classification unit 8.
[0041]
If the pixel value of the image frame (input image (x, y, t)) is Pix (x, y, t), the average A (x, y) and the variance Var (x, y) of the pixel values are respectively It is calculated by the following equations (1) and (2).
[0042]
(Equation 1)
Figure 2004265292
[0043]
At the time when the first moving object outline image M (x, y) is obtained, the quantification unit 7 has not yet stored any “time-series data” of each pixel in the background information storage unit 9. The variance Var of each pixel cannot be obtained. In this case, the quantification unit 7 sends the variance Var of each pixel to the pixel state classification unit 8 as zero.
[0044]
The pixel state classification unit 8 checks the “elapsed time ET” of each pixel stored in the background information storage unit 9 and determines that the “elapsed time ET” has not reached the predetermined upper limit ETmax (step 402c), regardless of the variance Var from the quantification unit 7, the state of the pixel is determined to be "undetermined state", and the pixel is stored in the background information storage unit 9 as the "pixel state" (step 402d). Further, the “elapsed time ET” of each pixel in the background information holding unit 9 is incremented by 1 (step 402e), and a data storage instruction is sent to the image securing unit 6 (step 402f). Note that in this embodiment, the time ETn until n images are captured from the imaging unit 1 is set as the upper limit ETmax.
[0045]
When the first moving object outline image M (x, y) is obtained, the “elapsed time ET” of each pixel in the background information holding unit 9 is set to zero. Therefore, in this case, the pixel state classification unit 8 determines that the state of each pixel is “undetermined state”, and causes the background information holding unit 9 to hold the “pixel state” of the pixel. Further, the “elapsed time ET” of each pixel in the background information holding unit 9 is incremented by one, and a data saving instruction is sent to the image securing unit 6. In response to the save instruction, the image securing unit 6 sends the pixel value D1 of each pixel in the input image (first input image) I (x, y) from the imaging unit 1 to the background information holding unit 9, and As “time-series data”.
[0046]
Hereinafter, each time the moving object outline image M (x, y) is input from the integration processing unit 4 to the moving object presence / absence determining unit 12, the same operation is repeated. As a result, the background information of each pixel in the background information holding unit 9 is such that “time-series data” is held as D1, D2, D3,. , "Elapsed time ET" is counted up as ET1, ET2, ET3,... ETn.
[0047]
When the (n + 1) -th moving object contour image M (x, y) is input to the moving object presence / absence determining unit 12 and the variance Var of each pixel is given from the quantification unit 7 to the pixel state classifying unit 8, the pixel state classifying unit The “elapsed time ET” of each pixel in the background information holding unit 9 confirmed in 8 is ETn, and it is detected in step 402c that the elapsed time ET has reached the upper limit value ETmax. In this case, the pixel state classification unit 8 determines that the required amount of “time-series data” of each pixel has been secured, and classifies the pixel state using the variance Var from the quantification unit 7.
[0048]
That is, the pixel state classification unit 8 compares the variance Var of each pixel sent from the quantification unit 7 with a predetermined threshold value Varth (step 402g). An unstable state ", and if Var ≦ Varth, it is determined to be a" stable state ". Then, the determined state (“stable state” or “unstable state”) of each pixel is sent to the background information holding unit 9 and held as the “pixel state” of each pixel (steps 402h and 402i). As a result, the “pixel state” of each pixel previously held in the background information holding unit 9 is rewritten from “undetermined state” to “stable state” or “unstable state”.
[0049]
Based on the “time-series data (D1 to Dn)” of each pixel in the background information holding unit 9, the background image generation unit 10 calculates a background image A as an average value of the “time-series data (D1 to Dn)” of each pixel. Generate (x, y) and hold.
Based on the “pixel state” of each pixel in the background information holding unit 9, the valid / invalid area determination unit 11 determines a pixel in a “stable state” as a valid pixel (STATE (x, y) = 1) and an “unstable state”. Is determined as an invalid pixel (STATE (x, y) = 0), an area where effective pixels are collected is determined as an effective area S1 for background subtraction processing, and an area where invalid pixels are collected is determined as an invalid area S2 for background subtraction processing. And hold.
[0050]
Thereafter, the pixel state classification unit 8 sends a data storage instruction to the image securing unit 6 (Step 402f). In response to the save instruction, the image securing unit 6 sends the pixel value Dn + 1 of each pixel in the input image I (x, y) (the (n + 1) th input image) from the imaging unit 1 to the background information holding unit 9, The oldest pixel value D1 in the "time-series data" of each pixel is replaced (step 402f).
[0051]
In this way, in the background information update processing section 5, the first background image A (x, y) and the valid area S1 / invalid area S2 are determined and set to the background difference processing section 2.
[0052]
[Detection of moving objects during actual operation]
Now, let T be the current time after the time ETn + 1 has elapsed since the start of actual operation, and as an example, the input image I (x, y) from the imaging means 1 at this current time T is shown in FIG. FIG. 6B shows the background image A (x, y) from the processing unit 5, and FIG. 6D shows the effective area S1 / invalid area S2 of the background difference processing from the background information update processing unit 5. The input image I (x, y) from the imaging unit 1 at the current time T is sent to the background difference processing unit 2, the contour extraction processing unit 3, and the background information update processing unit 5.
[0053]
[2] Acquisition of background difference image: background difference processing
The background difference processing unit 2 captures the input image I (x, y) at the current time T from the imaging unit 1 and combines the captured input image I (x, y) at the current time T (FIG. 6A). The difference from the background image A (x, y) (FIG. 6B) from the background image update processing unit 13 is calculated, and the difference is calculated by threshold processing using a preset threshold Ths (x, y). An image S (x, y) (FIG. 6C) is obtained. This threshold processing is expressed by the following equations (3) and (4) when expressed in mathematical expressions.
[0054]
S (x, y) = 1 [if | I (x, y) -A (x, y) |> Ths (x, y)] (3)
S (x, y) = 0 [if | I (x, y) -A (x, y) | ≤Ths (x, y)] (4)
[0055]
In this process, the difference between the pixel value of the input image I (x, y) and the pixel value (average value) of the background image A (x, y) is larger than the threshold value Ths (x, y), that is, larger than the threshold value Ths (x, y). This is a binarization process in which the value of the changed pixel is set to “1”.
[0056]
Then, the background difference processing unit 2 calculates the difference image S (x, y) obtained by the threshold processing and the valid area S1 / invalid area S2 from the background information update processing unit 5 (see FIG. 6D). The background difference image BG (x, y) is obtained. This processing is expressed by the following equations (5) and (6) when expressed in mathematical expressions. By this processing, the invalid area S2 is excluded from the background subtraction processing, and a background difference image BG (x, y) as shown in FIG. 6E is obtained.
BG (x, y) = 1 [if S (x, y) = 1 and (STATE (x, y) = 1)] (5)
BG (x, y) = 0 (otherwise) (6)
[0057]
In this processing, in the difference image S (x, y), the value of a pixel whose pixel value is “1” and is an effective pixel (a pixel in a “stable state”) is set to “1”, and the values of other pixels are set to “1”. Is "0".
By this processing, the invalid area S2 is excluded from the target of the background difference processing, and a background difference image BG (x, y) as shown in FIG. 4E can be obtained.
[0058]
In this example, in the difference image S (x, y), most of the person Ma as the moving body is located in the invalid area S2. Therefore, most of the person Ma located in the invalid area S2 is excluded from the background difference image BG (x, y) together with neon Ne. In the background difference image BG (x, y), the pixel set to “1” indicates the person Ma located in the effective area S1. In this way, an image (binary image) of the moving object in the effective area is obtained by the background subtraction processing.
[0059]
In this embodiment, a difference image S (x, y) between the input image I (x, y) and the difference image A (x, y) is obtained for the entire region, and the difference image S (x, y) is obtained. By masking the invalid area S2 in y), the invalid area S2 is excluded from the target of the background subtraction processing. However, only for the valid area S1, the input image I (x, y) and the difference image A A difference image from (x, y) may be obtained, and this difference image may be obtained as a background difference image BG (x, y).
[0060]
[3] Acquisition of contour extraction image: contour extraction processing
The contour extraction processing unit 3 captures the input image I (x, y) at the current time T from the imaging unit 1 and extracts a contour extracted image O including the contour of the changing object in the captured input image I (x, y). Generate (x, y). In this embodiment, an outline extraction image O (x, y) is generated by image processing generally called an inter-frame difference.
[0061]
FIG. 7 is a block diagram showing a main part of the contour extraction processing unit 3. The contour extraction processing unit 3 includes an inter-frame difference processing unit 17 and an image memory 18. The inter-frame difference processing unit 17 compares the input image I (x, y) (FIG. 6A: current input image) at the current time T from the imaging unit 1 with the one-frame previous image stored in the image memory 18. The difference from the input image F (x, y) (FIG. 6 (f): previous input image) is calculated, and the inter-frame difference image is obtained by threshold processing using a preset threshold Th (x, y). (Contour extracted image) O (x, y) (FIG. 6 (g)) is obtained. This threshold processing is expressed by the following equations (7) and (8) when expressed by mathematical expressions.
[0062]
O (x, y) = 1 [if | I (x, y) -F (x, y) |> Tho (x, y)] (7)
O (x, y) = 0 [if | I (x, y) -F (x, y) | ≤Tho (x, y)] (8)
[0063]
This processing is performed for pixels in which the difference between the pixel value of the current input image I (x, y) and the pixel value of the previous input image F (x, y) is larger than the threshold Tho (x, y), ie, between frames. This is a binarization process in which the value of a pixel having a large change is set to “1”. A pixel set to “1” indicates an object changed between frames, and may include an object other than a moving object such as neon.
[0064]
After the execution of the inter-frame difference processing by the inter-frame difference processing unit 17, the input image I (x, y) at the current time T from the imaging unit 1 is stored in the image memory 18 as F (x, y), and the next line This is used as an input image one frame before in the inter-frame difference processing performed. In this example, the frame extraction processing unit 3 performs the inter-frame difference processing. However, the input image I (x, y) at the current time T is differentiated by a generally known image processing. The contour extraction image O (x, y) including the contour of the changing object in the input image I (x, y) at the current time may be obtained by using division or the like. Also, a plurality of processing means such as an inter-frame difference and a differential processing may be used in combination.
[0065]
[▲ 4 ▼ Contour extraction of moving object: integration processing]
The integration processing unit 4 performs a change in the contour extraction image O (x, y) from the contour extraction processing unit 3 based on the image of the moving object in the background difference image BG (x, y) from the background difference processing unit 2. The outline of the object is narrowed down, and the entire outline of the moving body is specified.
[0066]
The basic idea is that the information of the moving object in the effective area of the background difference image BG (x, y) is obtained from the outline of the changing object included in the outline extracted image O (x, y), that is, the highly reliable moving object. The object of the present invention is to narrow down the contour of a moving object located in an invalid area based on an image.
[0067]
In a “moving object writing process” (described later), which is a main part of the integration process according to the present embodiment, as described below, a pixel in an effective area of the background difference image BG (x, y) is used as a search point, The values of the pixels around the search point are repeatedly checked for the extracted image O (x, y). As a result, in the contour extraction of the moving body in the integration processing unit 4, there is no distinction between the valid area and the invalid area.
[0068]
In the background difference image BG (x, y) (FIG. 6E), a pixel whose value is “1” represents a moving object (person Ma). In the contour extraction image O (x, y), a pixel whose value is “1” represents an object (including a person Ma) that has changed between frames.
[0069]
The outline of the image of the person Ma in the background difference image BG (x, y) matches the outline of the person Ma in the outline extracted image O (x, y). Therefore, based on the image of the person Ma in the background difference image BG (x, y), if the outline of the changing object in the outline extraction image O (x, y) connected to the outline of this image is obtained, the entire outline of the person Ma is obtained. A highly reliable moving object contour image M (x, y) (FIG. 6 (h)) can be obtained.
[0070]
FIG. 8 shows a flow of a process of generating the moving object outline image M (x, y) from the background difference image BG (x, y) and the outline extraction image O (x, y) in the integration processing unit 4. As the pre-processing, the background difference image BG (x, y) and the contour extraction image O (x, y) may be subjected to erosion / expansion processing to remove noise.
[0071]
The integration processing unit 4 sequentially checks whether the value of each of the pixels corresponding to the background difference image BG (x, y) and the contour extraction image O (x, y) is “1”. (Step 801). If the values of the corresponding pixels of the background difference image BG (x, y) and the contour extraction image O (x, y) are both "1" (YES in step 801), each time "moving object writing" described later is performed. Process ”(step 802).
[0072]
That is, for each pixel corresponding to the background difference image BG (x, y) and the contour extraction image O (x, y), an evaluation value is sequentially obtained according to the following equation (9), and the evaluation value becomes “1”. For example, a “moving object writing process” is performed. By repeating this “moving object writing process”, a moving object contour image M (x, y) is generated.
If [BG (x, y) = “1” and O (x, y) = “1”] then “1” else “0” (9)
[0073]
It should be noted that the expression (9) indicates that the evaluation value is “1” for a pixel having both “BG (x, y) and O (x, y) of“ 1 ”, and the evaluation value is“ 0 ”for the other pixels. The “moving object writing process” is performed only on the pixel whose evaluation value is “1”, and the “moving object writing process” is performed on the pixel whose evaluation value is “0”. Not performed.
[0074]
[Moving object writing process]
In step 801, when it is confirmed that both the corresponding pixels of the background difference image BG (x, y) and the outline extraction image O (x, y) are “1” (FIGS. 10A and 10B). )), That is, when the evaluation value obtained by the above equation (9) becomes “1”, the integration processing unit 4 writes the coordinate point (x, y) of the pixel as a search point in the search point memory (see FIG. 9). Step 901).
[0075]
Further, the pixel value in the moving object contour image M (x, y) corresponding to the search point (x, y) is set to “1” (step 902: see FIG. 10C). The pixel value in the background difference image BG (x, y) and the contour extraction image O (x, y) corresponding to the search point (x, y) is set to “0” so as not to be set as the search point again. (Step 903: see FIGS. 10D and 10E).
[0076]
Then, for the pixels around the search point (x, y), that is, the correspondence between the background difference image BG (x, y) and the contour extraction image O (x, y) located around the search point (x, y) The value of each pixel to be checked is checked in order (steps 904 to 908). In the present embodiment, eight surrounding pixels are to be processed.
[0077]
FIG. 11A shows eight pixels around the first search point (x, y) in the contour extraction image O (x, y), and FIG. 11B shows the first pixel in the background difference image BG (x, y). The eight pixels around the search point (x, y) are shown. For the eight pixels surrounding the search point (x, y), the value of the corresponding pixel (surrounding pixel) between the background difference image BG (x, y) and the contour extraction image O (x, y) is checked. Is "1" (YES in step 904), the coordinate point (x, y) of the surrounding pixels is registered in the next search point memory as the next search point (step 905). In the example shown in FIG. 11, the coordinate points (x, y + 1) and (x, y-1) are registered as the next search points.
[0078]
After the next search point is registered, the value of the pixel in the moving object contour image M (x, y) corresponding to the next search point is set to “1” (step 906). In the example shown in FIG. 11, as shown in FIG. 12A, the pixel values in the moving body contour image M (x, y) corresponding to the coordinate points (x, y + 1) and (x, y−1) Is set to “1”. Then, the pixel value in the background difference image BG (x, y) and the contour extraction image O (x, y) corresponding to the next search point is set to “0” so as not to be set as the search point again (step 907: (See FIGS. 13A and 13B).
[0079]
That is, for each pixel (surrounding pixel) corresponding to the background difference image BG (x, y) around the search point (x, y) and the contour extraction image O (x, y), the following equation (10) is used. An evaluation value is obtained, and when the evaluation value becomes "1", the coordinate point (x, y) of the surrounding pixel is registered in the next search point memory as the next search point, and the coordinate point (x, y) of the surrounding pixel is obtained. , The pixel value in the moving object outline image M (x, y) corresponding to “1” is set to “1”, the background difference image BG (x, y) corresponding to the coordinate point (x, y) of the surrounding pixels, and the outline extraction image The value of the pixel at O (x, y) is “0”. If the process is completed for all the pixels around the search point (x, y) (YES in step 908), the process proceeds to step 909.
If [BG (x, y) = “1” or O (x, y) = “1”] then “1” else “0” (10)
[0080]
In step 909, it is checked whether the next search point is registered in the next search point memory. If the next search point is registered in the next search point memory (YES in step 909), the registered next search point is checked. One of the search points is registered as a new search point in the search point memory (step 910), and the process returns to step 904 to repeat the same operation.
[0081]
As a result, as shown in FIG. 12B, in the moving object outline image M (x, y), pixels having the value “1” are connected around the search point (x, y). If there is no next search point in the next search point memory (NO in step 909), a series of moving object writing processes is terminated. This moving object writing process is repeated until all the pixels are completed in step 803 without distinguishing between the valid area S1 and the invalid area S2.
[0082]
By repeating the “moving object writing process”, the contour of the changing object in the contour extraction image O (x, y) connected to the highly reliable image of the person Ma in the background difference image BG (x, y) is obtained. Then, a highly reliable moving body contour image M (x, y) (FIG. 6 (h)) including the entire contour of the person Ma is obtained. Thereby, even if the invalid area S2 that is automatically determined (automatically updated) becomes large, the detection of the person Ma can be performed with high accuracy.
[0083]
[5] Automatic update of background image and active / inactive area during operation
The moving object outline image M (x, y) obtained by the integration processing unit 4 is fed back to the background information update processing unit 5. In the background information update processing unit 5, the moving object presence / absence determining unit 12 determines the presence / absence of a moving object for each pixel of the moving object outline image M (x, y) from the integration processing unit 4. That is, it is determined that there is a moving object for a pixel whose M (x, y) is “1” (Step 403 in FIG. 4), and that there is no moving object for a pixel whose M (x, y) is “0”. A determination is made (step 402).
[0084]
[Pixel judged to have no moving object: when "moving state" is not included in "pixel state" immediately before]
The moving body presence / absence determining unit 12 sends the determination result of the moving body presence / absence for each pixel to the pixel state checking unit 13. The pixel state checking unit 13 receives the determination result of the moving object presence / absence for each pixel from the moving object presence / absence determining unit 12, and checks the “pixel state” (the immediately previous pixel state) in the background information holding unit 9 of each pixel. (Step 402a in FIG. 5). In this example, for the sake of explanation, the “pixel state” of the pixel determined as having no moving object in the background information holding unit 9 does not include the “moving state” and is set to the “stable state” or the “unstable state”. And
[0085]
In this case, the pixel state confirmation unit 13 sends a quantification command to the quantification unit 7 for all pixels determined to have no moving object (steps 402a and 402b). In response to the quantification command, the quantification unit 7 reads out “time-series data” and “elapsed time ET” of each pixel determined to have no moving object held in the background information storage unit 9, and reads “ Find the mean and variance of "time series data".
[0086]
The pixel state classification unit 8 confirms that the elapsed time ET of each pixel determined to have no moving object has reached the upper limit value ETmax (YES in step 402c), and then moves the pixel sent from the quantification unit 7. The variance Var of each pixel determined as having no body is compared with a predetermined threshold value Varth. If Var> Varth, the pixel is determined to be “unstable”, and if Var ≦ Varth, the pixel is determined to be “stable”. Judgment is made and stored (updated) in the background information storage unit 9 as the "pixel state" of the pixel (steps 402h and 402i).
[0087]
As a result, for a pixel in which the variance Var of the pixel value of the current past certain time (ETn) has exceeded Varth (previous Var ≦ Varth), the “pixel state” in the background information is changed from “stable state” to “not stable”. The state is changed to "stable state" (transition (5) shown in FIG. 14). In addition, for a pixel in which the variance Var of the pixel value for the past certain time (ETn) has become equal to or less than Varth (previously, Var> Varth), the “pixel state” in the background information changes from “unstable state” to “unstable state”. The state is changed to "stable state" (transition (6) shown in FIG. 14).
[0088]
Thereafter, the pixel state classifying unit 8 sends a data saving instruction to the image securing unit 6. The image securing unit 6 receives the save command from the pixel state classifying unit 8 and stores the pixel value of each pixel in the input image I (x, y) from the imaging unit 1 determined as having no moving object in the background information holding unit. 9, and replaces the oldest pixel value in the "time-series data" of each pixel with the oldest pixel value and stores it (step 402f).
[0089]
[Pixel judged to have a moving object: when "moving state" is not included in "pixel state" immediately before]
The moving body presence / absence determining unit 12 sends the determination result of the moving body presence / absence for each pixel to the pixel state checking unit 13. The pixel state checking unit 13 receives the determination result of the moving object presence / absence for each pixel from the moving object presence / absence determining unit 12, and checks the “pixel state” (the immediately previous pixel state) in the background information holding unit 9 of each pixel. I do. In this example, for the sake of explanation, the “pixel state” of the pixel determined to have a moving object in the background information holding unit 9 does not include the “moving state” and is set to the “stable state” or the “unstable state”. And
[0090]
In this case, the pixel state confirmation unit 13 sends the “pixel state” immediately before confirmation of all the pixels determined to have the moving object to the pixel state classification unit 8. When the “pixel state” sent from the pixel state checking unit 13 is “stable state”, the pixel state classification unit 8 determines that the pixel has transitioned from “stable state” to “moving state” ( The transition (3) shown in FIG. 14), that is, the “pixel state” is determined to be a “moving state from a stable state” which is a form of the “moving state”, and the background information is retained as the “pixel state” of the pixel. The unit 9 holds (updates). At the same time, the “moving time TM” in the background information of the pixel is increased by 1 (see the processing content (1) shown in FIG. 15). Accordingly, the counting of the movement time (elapsed time since the transition to the movement state) TM of the pixel that has transitioned from the “stable state” to the “movement state” is started.
[0091]
When the “pixel state” sent from the pixel state confirmation unit 13 is “unstable state”, the pixel state classification unit 8 determines that the pixel has transitioned from “unstable state” to “moving state”. (Transition (4) shown in FIG. 14), that is, the “pixel state” is determined to be a “moving state from an unstable state” which is a form of the “moving state”, and the “pixel state” of the pixel is determined. The information is held (updated) in the background information holding unit 9. At the same time, the “moving time TM” in the background information of the pixel is increased by 1 (see the processing content (2) shown in FIG. 15). Thus, the counting of the movement time TM is started for the pixel that has transitioned from the “unstable state” to the “moving state”.
[0092]
In all cases, after updating to the “moving state”, the latest pixel value (the immediately preceding pixel value) in the “time-series data” in the background information of the pixel is set as the current pixel value, and Replace the value with the oldest pixel value and save. That is, for a pixel determined to have a moving object, a pixel value including the moving object is not included as time-series data in the background information.
[0093]
[Pixel judged to have a moving object: when "moving state" is included in "pixel state" immediately before]
The moving body presence / absence determining unit 12 sends the determination result of the moving body presence / absence for each pixel to the pixel state checking unit 13. The pixel state checking unit 13 receives the determination result of the moving object presence / absence for each pixel from the moving object presence / absence determining unit 12, and checks the “pixel state” (the immediately previous pixel state) in the background information holding unit 9 of each pixel. I do. In this example, for the sake of explanation, it is assumed that “moving state” is included in the “pixel state” of the pixel determined as having a moving object in the background information holding unit 9.
[0094]
In this case, the pixel state confirmation unit 13 sends the “pixel state” immediately before confirmation of all the pixels determined to have the moving object to the pixel state classification unit 8. When the “pixel state” sent from the pixel state checking unit 13 is “moving state”, the pixel state classifying unit 8 uses the sent “moving state” as the “pixel state” of the pixel as it is. The information is held (updated) in the background information holding unit 9. That is, if the immediately preceding “pixel state” is “moving state from stable state”, the updated “pixel state” is also “moving state from stable state”, and the immediately preceding “pixel state” is “moving state from unstable state”. ”, The updated“ pixel state ”is also changed from the“ unstable state to the moving state ”. In this case, the "moving time TM" is increased by one in the background information of the pixel (see processing contents (4) and (5) shown in FIG. 15). The moving time TM does not increase above a predetermined upper limit value TMmax.
[0095]
[Pixels judged to have no moving object: when no longer moving]
When the moving object disappears from the moving object outline image M (x, y), the moving object presence / absence determining unit 12 determines that the pixel which has been determined to have the moving object is no moving object. In this case, the pixel state checking unit 13 receives the determination result of the moving object presence / absence for each pixel from the moving object presence / absence determining unit 12, and receives the “pixel state” (previous pixel state) in the background information holding unit 9 for each pixel. ).
[0096]
Here, since the “pixel state” immediately before the pixel determined to have no moving object is the “moving state” (YES in step 402 a shown in FIG. 5), the pixel state checking unit 13 determines that the moving time has elapsed. Notify the determination unit 14. The moving time determination unit 14 receives the notification from the pixel state checking unit 13 and checks the “moving time TM” in the background information holding unit 9 of the pixel determined to have no moving object (step 402j).
[0097]
(B) When the moving body stays for a short time
If the “moving time TM” has not reached the upper limit value TMmax, that is, if the time during which the moving object has stayed at the pixel is short, the moving time determining unit 14 determines whether the “moving time TM” in the background information of the pixel is “moving time TM”. Is returned to zero (step 402k), and a quantification command is sent to the quantification unit 7.
[0098]
The quantification unit 7 receives the quantification command from the movement time determination unit 14, and receives the “time-series data” and the “elapsed time ET” of the pixel stored in the background information storage unit 9 and determined to have no moving object. Is read, and the average and variance of the "time-series data" are obtained (step 402b). In this case, since the “elapsed time ET” of the pixel determined to have no moving object has reached the upper limit value ETmax (YES in step 402c), the processing after step 402g is executed.
[0099]
By this processing, it is determined whether the state is “stable state” or “unstable state”, and “pixel state” in the background information of the pixel determined as “stable state” transits from “moving state” to “stable state”. (Step 402i: transition (7) in FIG. 14), the “pixel state” in the background information of the pixel determined as the “unstable state” transitions from the “moving state” to the “unstable state” (step 402h: Transition (8) in FIG. 14).
[0100]
(B) When the moving body stays for a long time
If the “moving time TM” has reached the upper limit value TMmax, that is, if the time during which the moving body has stayed at the pixel is long, the moving time determination unit 14 sets “time-series data” in the background information of the pixel. (Step 402m), the "elapsed time ET" and the "moving time TM" in the background information of the pixel are returned to zero (steps 402n and 102k), and a quantification command is sent to the quantification unit 7.
[0101]
The quantification unit 7 receives the quantification command from the movement time determination unit 14, and receives “time-series data” and “elapsed time ET” of the pixels stored in the background information storage unit 9 and determined to have no moving object. Is read, and the average and variance of the "time-series data" are obtained (step 402b). In this case, since the elapsed time ET of the pixel determined to have no moving object has been returned to 0 (NO in step 402c), the processing after step 402d is executed. By this processing, the “pixel state” of the pixel in the background information of the pixel changes from the “moving state” to the “undetermined state” (step 402d: transition (9) in FIG. 14). In addition, the counting of “elapsed time ET” in the background information of the pixel is started (step 402e), and the collection of “time-series data” in the background information of the pixel is started (step 402f).
[0102]
[Pixel determined to have a moving object: when "Pending state" is included in "Pixel state" immediately before]
The moving body presence / absence determining unit 12 sends the determination result of the moving body presence / absence for each pixel to the pixel state checking unit 13. The pixel state checking unit 13 receives the determination result of the moving object presence / absence for each pixel from the moving object presence / absence determining unit 12, and checks the “pixel state” (the immediately previous pixel state) in the background information holding unit 9 of each pixel. I do. In this example, for the sake of explanation, it is assumed that “undetermined state” is included in the “pixel state” of the pixel determined as having a moving object in the background information holding unit 9.
[0103]
In this case, the pixel state confirmation unit 13 sends the “pixel state” immediately before confirmation of all the pixels determined to have the moving object to the pixel state classification unit 8. If the “pixel state” sent from the pixel state confirmation unit 13 is “undefined state”, the pixel state classification unit 8 determines that the pixel has transitioned from “undefined state” to “moving state” ( The transition (10) in FIG. 14, that is, the “pixel state” is determined to be a “moving state from an undetermined state”, which is a form of the “moving state,” and the “moving state from the undetermined state” is determined for that pixel. It is stored (updated) in the background information storage unit 9 as “pixel state”. At the same time, the “moving time TM” in the background information of the pixel is increased by one (see the processing content (3) shown in FIG. 15). Thus, the counting of the movement time TM is started for the pixel that has transitioned from the “undetermined state” to the “moving state”.
[0104]
[Pixel judged to have a moving object: when the previous “pixel state” includes “moving state from undetermined state”]
The moving body presence / absence determining unit 12 sends the determination result of the moving body presence / absence for each pixel to the pixel state checking unit 13. The pixel state checking unit 13 receives the determination result of the moving object presence / absence for each pixel from the moving object presence / absence determining unit 12, and checks the “pixel state” (the immediately previous pixel state) in the background information holding unit 9 of each pixel. I do. In this example, for the sake of explanation, it is assumed that the “pixel state” of the pixel determined as having a moving object in the background information holding unit 9 includes “moving state from undetermined state”.
[0105]
In this case, the pixel state confirmation unit 13 sends the “pixel state” immediately before confirmation of all the pixels determined to have the moving object to the pixel state classification unit 8. When the “pixel state” sent from the pixel state checking unit 13 is “moving state from undetermined state”, the pixel state classifying unit 8 converts the sent “moving state from undetermined state” to the pixel as it is. Is stored (updated) in the background information storage unit 9 as the “pixel state”. At the same time, the “moving time TM” in the background information of the pixel is incremented by 1 (see processing content (6) shown in FIG. 15).
[0106]
Each time the moving object contour image M (x, y) is obtained from the background information of each pixel automatically updated in this way, the valid / invalid area determination unit 11 determines whether the pixel in the “stable state” A pixel that is in the “moving state from the state” is an effective pixel (STATE (x, y) = 1), and a pixel that is in the “undefined state”, a pixel that is in the “unstable state”, and a pixel that is in the “moving state from the undetermined state” Pixels that are in the “moving state from the unstable state” are invalid pixels (STATE (x, y) = 0). It is determined as the processing invalid area S2. Further, the background image generation unit 10 generates the background image A (x, y) as an average value of “time-series data” of each pixel.
[0107]
【The invention's effect】
As is apparent from the above description, according to the present invention, the difference between the input image and the background image is obtained for an effective area arbitrarily set in an image frame, and the change object in the effective area of the input image is obtained. A background difference image including an image is obtained, a contour extraction image including a contour of the changing object in the input image is obtained, and a contour of the changing object in the contour extraction image continuous with this image is extracted based on the image in the background difference image. Therefore, based on the image of the object of the background difference image with high reliability, the outline of the changing object in the outline extraction image that is continuous with this image is extracted, thereby apparently setting the effective area and the invalid area as the Thus, even if the invalid area is set wide by automatic determination of the valid / invalid area, the detection of a moving object or the like can be performed with higher accuracy.
[Brief description of the drawings]
FIG. 1 is a block diagram of a main part of a moving object detection device showing an embodiment of an image processing device according to the present invention.
FIG. 2 is a block diagram illustrating an outline of an internal configuration of a background information update processing unit in the moving object detection device.
FIG. 3 is a diagram showing an element name and an outline of background information for each pixel in the moving object detection device.
FIG. 4 is a flowchart illustrating a process of determining the presence or absence of a moving object in the moving object detection device.
FIG. 5 is a flowchart showing processing in the case where it is determined that there is no moving object in the moving object detection device.
FIG. 6 is a diagram illustrating a detection process of a moving object in the moving object detection device.
FIG. 7 is a block diagram showing a main part of a contour extraction processing unit in the moving object detection device.
FIG. 8 is a flowchart showing a generation process of a moving object outline image from a background difference image and an outline extraction image in an integration processing unit in the moving object detection device.
FIG. 9 is a flowchart showing a moving object writing process when a moving object contour image is generated by an integration processing unit in the moving object detection device.
FIG. 10 is a diagram for describing a moving object writing process according to this flowchart.
FIG. 11 is a diagram showing eight pixels around a first search point (x, y) in a contour extraction image and a background difference image.
FIG. 12 is a diagram illustrating a state in which a moving object outline image is completed.
FIG. 13 is a diagram illustrating a state in which pixel values in a background difference image and a contour extraction image corresponding to a time search point are set to “0” so as not to be set as a search point again.
FIG. 14 is a transition diagram of pixel states classified by a pixel state classification unit.
FIG. 15 is a diagram showing processing contents for a pixel determined to have a moving object;
FIG. 16 is a diagram for explaining conventional background subtraction processing.
FIG. 17 is a diagram illustrating background subtraction processing in a case where, for example, neon is included as a frequently changing object.
FIG. 18 is a diagram illustrating a conventional example in which a background difference process is performed by setting an effective / ineffective area artificially.
FIG. 19 is a diagram for explaining a deterioration in detection performance due to a wide invalid area.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Imaging means, 2 ... Background difference processing part, 3 ... Outline extraction processing part (inter-frame difference processing part), 4 ... Integration processing part, 5 ... Background information update processing part, 6 ... Image securing part, 7 ... Quantification Unit, 8: pixel state classification unit, 9: background information holding unit, 10: background image generation unit, 11: valid / invalid area determination unit, 12: moving object presence / absence judgment unit, 13: pixel state confirmation unit, 14: movement Time determination unit, 15: Inter-frame difference processing unit, 16: Image memory, 100: Moving object detection device.

Claims (4)

画像フレーム内で任意に設定される有効領域を対象として所定の背景を含む入力画像と前記背景からなる背景画像との差分を求め、前記入力画像の前記有効領域内における変化物体の像を含む背景差分画像を求めるステップと、
前記入力画像中の変化物体の輪郭を含む輪郭抽出画像を求めるステップと、
前記背景差分画像中の像に基づいてこの像と連続する前記輪郭抽出画像中の前記変化物体の輪郭を抽出するステップと
を備えたことを特徴とする画像処理方法。
A difference between an input image including a predetermined background and a background image composed of the background is obtained for an effective area arbitrarily set in an image frame, and a background including an image of a changing object in the effective area of the input image is obtained. Obtaining a difference image;
Obtaining an outline extracted image including the outline of the changing object in the input image;
Extracting a contour of the changing object in the contour extraction image that is continuous with the image based on the image in the background difference image.
請求項1に記載された画像処理方法において、
前記輪郭抽出画像を求めるステップは、
前記入力画像の時系列から相前後する2つの前記入力画像の差分を求め、前記入力画像中の変化物体の輪郭を含む輪郭抽出画像を求める
ことを特徴とする画像処理方法。
The image processing method according to claim 1,
The step of obtaining the contour extraction image,
An image processing method, wherein a difference between two successive input images is obtained from a time series of the input image, and a contour extraction image including a contour of a changing object in the input image is obtained.
画像フレーム内で任意に設定される有効領域を対象として所定の背景を含む入力画像と前記背景からなる背景画像との差分を求め、前記入力画像の前記有効領域内における変化物体の像を含む背景差分画像を求める手段と、
前記入力画像中の変化物体の輪郭を含む輪郭抽出画像を求める手段と、
前記背景差分画像中の像に基づいてこの像と連続する前記輪郭抽出画像中の前記変化物体の輪郭を抽出する手段と
を備えたことを特徴とする画像処理装置。
A difference between an input image including a predetermined background and a background image composed of the background is obtained for an effective area arbitrarily set in an image frame, and a background including an image of a changing object in the effective area of the input image is obtained. Means for obtaining a difference image;
Means for obtaining a contour extraction image including a contour of a changing object in the input image;
Means for extracting a contour of the changing object in the contour extraction image that is continuous with the image based on the image in the background difference image.
請求項1に記載された画像処理装置において、
前記輪郭抽出画像を求める手段は、
前記入力画像の時系列から相前後する2つの前記入力画像の差分を求め、前記入力画像中の変化物体の輪郭を含む輪郭抽出画像を求める
ことを特徴とする画像処理装置。
The image processing device according to claim 1,
The means for obtaining the contour extraction image includes:
An image processing apparatus, wherein a difference between two successive input images is obtained from a time series of the input image, and a contour extraction image including a contour of a changing object in the input image is obtained.
JP2003056827A 2003-03-04 2003-03-04 Image processing method and device thereof Pending JP2004265292A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003056827A JP2004265292A (en) 2003-03-04 2003-03-04 Image processing method and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003056827A JP2004265292A (en) 2003-03-04 2003-03-04 Image processing method and device thereof

Publications (1)

Publication Number Publication Date
JP2004265292A true JP2004265292A (en) 2004-09-24

Family

ID=33120399

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003056827A Pending JP2004265292A (en) 2003-03-04 2003-03-04 Image processing method and device thereof

Country Status (1)

Country Link
JP (1) JP2004265292A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007323572A (en) * 2006-06-05 2007-12-13 Nec Corp Object detector, object detection method, and object detection program
JP2008525051A (en) * 2004-12-28 2008-07-17 新世代株式会社 Method and apparatus for detecting a reflective object
WO2010026688A1 (en) * 2008-09-04 2010-03-11 株式会社ソニー・コンピュータエンタテインメント Image processing device, object tracking device, and image processing method
JP2010097430A (en) * 2008-10-16 2010-04-30 Tokyo Univ Of Agriculture & Technology Smoke detection device and smoke detection method
JP2010532898A (en) * 2007-07-08 2010-10-14 ユニベルシテ・ド・リエージュ Visual background extractor
JP2016071387A (en) * 2014-09-26 2016-05-09 富士通株式会社 Image processing apparatus, image processing method, and program

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008525051A (en) * 2004-12-28 2008-07-17 新世代株式会社 Method and apparatus for detecting a reflective object
US8311273B2 (en) 2006-06-05 2012-11-13 Nec Corporation Object detection based on determination of pixel state
JP4631806B2 (en) * 2006-06-05 2011-02-16 日本電気株式会社 Object detection apparatus, object detection method, and object detection program
JP2007323572A (en) * 2006-06-05 2007-12-13 Nec Corp Object detector, object detection method, and object detection program
JP2010532898A (en) * 2007-07-08 2010-10-14 ユニベルシテ・ド・リエージュ Visual background extractor
JP4699564B2 (en) * 2007-07-08 2011-06-15 ユニベルシテ・ド・リエージュ Visual background extractor
WO2010026688A1 (en) * 2008-09-04 2010-03-11 株式会社ソニー・コンピュータエンタテインメント Image processing device, object tracking device, and image processing method
JP2010061478A (en) * 2008-09-04 2010-03-18 Sony Computer Entertainment Inc Image processing device, object tracking device, and image processing method
EP2320379A1 (en) * 2008-09-04 2011-05-11 Sony Computer Entertainment Inc. Image processing device, object tracking device, and image processing method
US8503726B2 (en) 2008-09-04 2013-08-06 Sony Corporation Image processing device, object tracking device, and image processing method
EP2320379A4 (en) * 2008-09-04 2016-06-01 Sony Computer Entertainment Inc Image processing device, object tracking device, and image processing method
JP2010097430A (en) * 2008-10-16 2010-04-30 Tokyo Univ Of Agriculture & Technology Smoke detection device and smoke detection method
JP2016071387A (en) * 2014-09-26 2016-05-09 富士通株式会社 Image processing apparatus, image processing method, and program

Similar Documents

Publication Publication Date Title
US7982774B2 (en) Image processing apparatus and image processing method
JP4764561B2 (en) Method for detecting shot changes in a series of video images
US9053355B2 (en) System and method for face tracking
JP3308617B2 (en) Apparatus and method for detecting motion vector
EP4038540B1 (en) Object detection
JP2004265292A (en) Image processing method and device thereof
KR101690050B1 (en) Intelligent video security system
CN113052019A (en) Target tracking method and device, intelligent equipment and computer storage medium
JPH07249128A (en) Picture processor for vehicle
JP2004265291A (en) Background difference processing method and device thereof
JPH09284702A (en) Method and device for detecting scene change frame
CN106780646B (en) Parameter-free background modeling method suitable for multiple scenes
Love et al. An empirical study of block matching techniques for the detection of moving objects
JP6603123B2 (en) Animal body detection apparatus, detection method, and program
JP3230509B2 (en) Moving image processing device
JP2004295416A (en) Image processing apparatus
CN115104136A (en) Apparatus, method, and computer-readable storage medium for detecting an object in a video signal based on visual evidence utilizing an output of a machine learning model
JP3062394B2 (en) Moving image extraction method
JP4467702B2 (en) Shadow change region determination device, image determination device and image generation device using the same, and shadow intensity ratio calculation device used therefor
JP2021047710A (en) Image processing apparatus, image processing method, image processing system, and program
JPH09319978A (en) Intrusion body monitor device
JP2621806B2 (en) Background feature mask generation device and moving object feature extraction device
JP2003256849A (en) Object extracting system and method and its program
KR102589150B1 (en) Long-distance object detection system using cumulative difference image
JP2004118718A (en) Method and device for detecting scene changing point, as well as program thereof