Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4470342B2 - Image processing method and image processing apparatus using the same - Google Patents
[go: Go Back, main page]

JP4470342B2 - Image processing method and image processing apparatus using the same - Google Patents

Image processing method and image processing apparatus using the same Download PDF

Info

Publication number
JP4470342B2
JP4470342B2 JP2001160780A JP2001160780A JP4470342B2 JP 4470342 B2 JP4470342 B2 JP 4470342B2 JP 2001160780 A JP2001160780 A JP 2001160780A JP 2001160780 A JP2001160780 A JP 2001160780A JP 4470342 B2 JP4470342 B2 JP 4470342B2
Authority
JP
Japan
Prior art keywords
image
search
time
extracted
contour
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2001160780A
Other languages
Japanese (ja)
Other versions
JP2002352239A (en
Inventor
淳之 広野
聡 古川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Panasonic Electric Works Co Ltd
Original Assignee
Panasonic Corp
Matsushita Electric Works Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Works Ltd filed Critical Panasonic Corp
Priority to JP2001160780A priority Critical patent/JP4470342B2/en
Publication of JP2002352239A publication Critical patent/JP2002352239A/en
Application granted granted Critical
Publication of JP4470342B2 publication Critical patent/JP4470342B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Closed-Circuit Television Systems (AREA)
  • Image Analysis (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、所定の監視エリアにおける人や車輌などの物体の動きを自動的に検出するための画像処理方法及びそれを用いた画像処理装置に関するものである。
【0002】
【従来の技術】
この種の画像処理方法としては背景差分方法とフレーム間差分方法とが従来より提供されている。
【0003】
先ず背景差分方法について図11(a)〜(c)を参照して説明する。この方法では、事前に移動する物体が存在していない時の監視エリアAの画像(図11(a)参照)を撮像し、この画像を背景画像として記憶させる。その後、監視エリアAの画像を逐次撮像して、背景画像との差分を求め、差分の発生した領域を背景になかった物体の侵入してきた部分であると判断している。例えば監視エリアAに人Hが侵入した場合、この時の監視エリアAの画像(図11(b)参照)と背景画像との差分をとると、図11(c)に示すような差分二値画像が得られるので、この画像から人Hが侵入したことを判別することができる。
【0004】
次に、フレーム間差分方法について図12(a)〜(c)を参照して説明する。この方法では、監視エリアAの画像を逐次撮像しており、異なる時刻に撮像された2枚の画像の差分をとることによって、移動する物体を検出している。図12(a)はある時刻に撮像された監視エリアAの画像、図12(b)はそれ以降のある時刻に撮像された監視エリアAの画像をそれぞれ示しており、この間に動いた人Hの部位が差分画像となって、図12(c)に示すような差分二値画像が得られるので、この画像から何らかの物体が移動していることを検出できる。
【0005】
【発明が解決しようとする課題】
上述した画像処理方法の内、前者の方法(背景差分方法)では、予め人が存在していない監視エリアの画像(背景画像)を撮像しておく必要があるが、監視エリア内に人が存在していないことを作業者が目視により確認して撮像しなければならず、背景画像を自動的に撮像することができなかった。また、背景画像を撮像する作業は実際の設置現場で行わねばならず、撮像作業の手間がかかるという問題があった。
【0006】
なお、背景画像を自動的に撮像するために、監視エリアを長時間撮像してその平均値を背景画像とすることが考えられるが、その間中ずっと監視エリア内で人が静止していると、人が背景画像の中に埋もれてしまうという問題がある。また、監視エリアを長時間撮像して、撮像した画像の中から変化の少ない領域又は変化の緩やかな領域を背景として、各領域毎に背景の画像を順次更新する方法も考えられるが、その間中ずっと人が静止していた場合は、上述と同様に、人が背景画像の中に埋もれてしまうという問題がある。
【0007】
一方、後者の方法(フレーム間差分方法)では、異なる時刻に撮像された2枚の画像の差分を求めており、移動中の物体は、その物体の画像が2重にだぶって抽出されてしまうため、抽出された物体が人であるか否かを判断する手段が複雑になるという問題がある。
【0008】
また、この方法では2枚の画像から変化のあった部分を抽出しているので、人体の一部分のみが動いている場合は、この部分しか抽出することができず、人体の形状そのものを抽出することができなかった。例えば監視エリア内で人が座っていたり、寝ている場合に、手足だけが動いて胴体が静止していると、動いている手足のみが抽出され、しかも手と足が分離した状態で抽出されるから、抽出された手と足が同じ人物の手足なのか、それぞれ別人のものなのかを判別する必要があり、この手順がかなり複雑になるという問題があった。
【0009】
本発明は上記問題点に鑑みて為されたものであり、その目的とするところは、事前に背景画像を撮像する必要がなく、探索対象の全体を検出できるようにした画像処理方法及びそれを用いた画像処理装置を提供するにある。
【0010】
【課題を解決するための手段】
上記目的を達成するために、請求項1の発明では、所定の監視エリアにおける人や車輌などの探索物体の存否やその動きを検出するための画像処理方法であって、所定のタイミングで監視エリアの濃淡画像をカメラに撮像させるとともに、カメラより入力される上記濃淡画像から物体の輪郭を示す輪郭画像を作成する処理と、上記濃淡画像から物体の輪郭を示す輪郭画像を作成する処理と、前回作成した第1の輪郭画像と今回作成した第2の輪郭画像とから、この間で動いていない静止物体の画像を抽出する処理と、上記第2の輪郭画像と今回抽出した静止物体の画像とから、この間で移動した探索物体の移動部位の画像を抽出する処理と、前回抽出した静止物体の画像には存在せず今回抽出した静止物体の画像のみに存在する部分を、探索物体の停止部位の画像として抽出する処理と、今回抽出した移動部位及び停止部位の画像から探索物体を含む探索領域の画像を作成する処理と、探索領域の画像及び今回作成した第2の輪郭画像とテンプレート画像とのマッチング処理を行って探索物体の存否やその動きを判断する処理とをCPUに行わせることを特徴とし、探索物体の内、移動している部位の画像と停止している部位の画像をそれぞれ求め、両者の画像から探索物体の全体の画像を求めているので、フレーム間差分方法のように移動している部位のみを抽出する場合に比べて、探索物体の判別を容易に行うことができ、またフレーム間差分方法のように探索物体の画像が2重にだぶって抽出されることはないから、テンプレートマッチングなどの処理を容易に行うことができる。さらに、背景差分方法のように探索物体が存在しない状態の背景画像を予め撮影しておく必要がないから、背景画像を撮像する手間を無くすことができる。
【0011】
しかも、探索物体の停止部位の画像として、前回抽出した静止物体の画像には存在せず、今回抽出した静止物体の画像のみに存在する部分を抽出しているので、探索物体の停止部位の画像を簡単な方法で抽出することができる。
【0012】
請求項の発明では、請求項の発明において、今回抽出した移動部位の画像と停止部位の画像との論理和を求めて得た画像の内、物体の輪郭を含む領域をテンプレートマッチングを行う探索領域に設定する処理を、CPUに行わせることを特徴とし、請求項の発明の作用に加えて、移動部位の画像と停止部位の画像との論理和を求めているので、探索物体の全体の形状を判別することができ、テンプレート画像との相関値を正確に求めることができる。
【0013】
請求項の発明では、請求項の発明において、今回抽出した移動部位の画像と停止部位の画像との論理和を求めて得た画像をテンプレートマッチングを行う第1の探索画像とし、第1の探索画像の内、物体の輪郭を含む領域についてテンプレート画像との相関値を求めるとともに、今回作成した輪郭画像をテンプレートマッチングを行う第2の探索画像とし、第2の探索画像における探索物体の前回の検出位置近傍を探索領域として、この探索領域内でテンプレート画像との相関値を求め、相関値が最も高く且つ予め設定された閾値よりも高い領域を探索物体の検出位置とし、この検出位置の画像に基づいて次回のテンプレート画像を設定する処理を、CPUに行わせることを特徴とし、請求項の発明の作用に加えて、今回抽出した移動部位の画像と停止部位の画像との論理和を求めて得た画像を第1の探索画像、今回作成した輪郭画像を第2の探索画像としてそれぞれテンプレートマッチングを行っているので、探索物体が移動している場合でも停止している場合でも、探索物体の存否を確実に検出することができる。
【0014】
請求項の発明では、請求項の発明において、前回抽出した停止部位の画像に存在する領域の内、今回抽出した停止部位及び移動部位の画像に存在しない領域を、今回抽出した停止部位の画像に加える処理を、CPUに行わせることを特徴とし、請求項の発明の作用に加えて、前回停止していた停止部位が停止し続けている場合、この停止部位は今回抽出した停止部位及び移動部位の画像の何れにも現れないため、前回抽出した停止部位の画像に存在する領域の内、今回抽出した停止部位及び移動部位の画像に存在しない領域を、今回抽出した停止部位の画像に加えることによって探索物体の形状を正確に検出することができる。
【0015】
請求項の発明では、請求項1乃至の発明において、静止物体の画像として、第1の輪郭画像と第2の輪郭画像との間で差分が存在しない部分を抽出する処理を、CPUに行わせることを特徴とし、請求項1乃至の発明の作用に加えて、静止物体の画像を簡単な処理で抽出することができる。
【0016】
請求項の発明では、請求項1乃至5の発明において、探索物体の移動部位の画像として、第2の輪郭画像と今回抽出した静止物体の画像との間で差分が存在した部分を抽出する処理を、CPUに行わせることを特徴とし、請求項1乃至5の発明の作用に加えて、移動部位の画像を簡単な処理で抽出することができる。
【0017】
請求項の発明では、所定の監視エリアにおける人や車輌などの探索物体の存否やその動きを検出するための画像処理装置において、所定のタイミングで監視エリアの濃淡画像を撮像する手段と、上記濃淡画像から物体の輪郭を示す輪郭画像を作成する手段と、前回作成した第1の輪郭画像と今回作成した第2の輪郭画像とから、この間で動いていない静止物体の画像を抽出する手段と、上記第2の輪郭画像と今回抽出した静止物体の画像とから、この間で移動した探索物体の移動部位の画像を抽出する手段と、前回抽出した静止物体の画像には存在せず、今回抽出した静止物体の画像のみに存在する部分を、探索物体の停止部位の画像として抽出する手段と、今回抽出した移動部位及び停止部位の画像から探索物体を含む探索領域の画像を作成する手段と、探索領域の画像及び今回作成した輪郭画像とテンプレート画像とのマッチング処理を行って探索物体の存否やその動きを判断する手段とを備えて成ることを特徴とし、探索物体の内、移動している部位の画像と停止している部位の画像をそれぞれ求め、両者の画像から探索物体の全体の画像を求めているので、フレーム間差分方法を用いる場合のように移動している部位のみを抽出する場合に比べて、探索物体の判別を容易に行うことができ、またフレーム間差分方法を用いる場合のように探索物体の画像が2重にだぶって抽出されることはないから、テンプレートマッチングなどの処理を容易に行える画像処理装置を提供できる。さらに、背景差分方法を用いる場合のように探索物体が存在しない状態の背景画像を予め撮影しておく必要がないから、背景画像を撮像する手間を無くした画像処理装置を提供できる。しかも、探索物体の停止部位の画像として、前回抽出した静止物体の画像には存在せず、今回抽出した静止物体の画像のみに存在する部分を抽出しているので、探索物体の停止部位の画像を簡単な方法で抽出できる。
【0018】
【発明の実施の形態】
本発明の実施形態1を図1乃至図10を参照して説明する。この画像処理装置は、所定の監視エリアA(例えば建物の部屋など)における人H(探索物体)の存否やその動きを自動的に検出するものである。図1はこの画像処理装置の概略構成図であり、例えば部屋の天井などに設置され、部屋内の白黒濃淡画像を撮像するCCDカメラのようなカメラ1と、カメラ1から入力されるアナログの映像信号をディジタル信号に変換するA/D変換部2と、A/D変換部2の出力信号を信号処理して人Hの存否や動きを検出するCPU3と、直流電源(図示せず)から供給される電源電圧を所望の電圧値の直流電圧に変換してカメラ1に給電する電源回路4とを備えている。
【0019】
この画像処理装置の画像処理方法を図2乃至図10を参照して説明する。図3(a)は人Hが倒れる途中の時刻T0における入力画像、図3(b)は人Hが倒れた(床に横たわった)瞬間の時刻T1における入力画像、図3(c),(d)は人Hが倒れたまま静止している状態の時刻T2,T3における入力画像をそれぞれ示しており、時刻T1〜T3の間、人Hは静止している。また、図4(a)〜(d)は時刻T0〜T3における輪郭画像を、図5(a)〜(d)は時刻T0〜T3における静止物体の抽出画像を、図6(a)〜(d)は時刻T0〜T3における探索物体の移動部位の抽出画像を、図7(a)〜(d)は時刻T0〜T3における探索物体の停止部位の抽出画像を、図8(a)〜(d)は時刻T0〜T3における探索画像を、図8(e)(g)(i)(k)は各時刻でテンプレートマッチングを行う際に用いるテンプレート画像t01,t11,t21,t31を、図8(f)(h)(j)(l)はテンプレートマッチングを行った結果が反映されたテンプレート画像t02,t12,t22,t32を、それぞれ示している。尚、図4〜図8は模式図であり、物体の輪郭を示す線を同じ太さの線で図示しているが、実際には細い部分や太い部分があるので、処理の過程で消滅する部分や残る部分が発生する。
【0020】
カメラ1は監視エリアAの白黒濃淡画像を所定の時間間隔で撮像しており、カメラ1の映像信号はA/D変換部2によってディジタル信号に変換されて、CPU3に逐次入力される(図2のステップS1)。カメラ1からの白黒濃淡画像がCPU3に入力されると、CPU3ではこの白黒濃淡画像から微分画像を作成し、それを二値化して物体の境界線(エッジ)を検出する。すなわち、画像中の物体に対応する部分では、その特徴、例えば濃度が一様で、異なる物体あるいは物体の部分間では濃度が急激に変化すると考えられるので、濃度の急激に変化する場所を探すことにより、対象物の境界線(エッジ)を検出することができる。また、異なる2つの物体が重なっていると、両者の境界部分では濃度が不連続になり、濃度の変化量(傾き)が大きくなっているので、濃度の傾きが大きい場所を検出することによって、物体の境界線を検出することができる。一般に濃淡の不連続性を検出するには空間微分を行えば良く、ある時刻に撮像された白黒濃淡画像において隣接する画素間の差分を求めることによって、濃度の微分値、すなわち勾配(傾き)を検出することができる。尚、エッジ検出の方法としては種々の方法が提供されており、一般的にソーベルの演算式を用いた方法が行われている。
【0021】
つまり、CPU3は白黒濃淡画像の画像データを画像処理して濃度の勾配値を求めており、勾配値と所定のしきい値との高低を比較して、勾配値がしきい値よりも高ければ輪郭部、しきい値以下であれば平面部と判断している(二値化処理)。例えば、図3(a)〜(d)は時刻T0〜T3においてカメラ1から入力された白黒濃淡画像(入力画像)、図4(a)〜(d)は各時刻の白黒濃淡画像から求めた輪郭画像をそれぞれ示しており、図4(a)〜(d)中の実線が物体の輪郭を示している。なお、本実施形態では人体Hの胴体部分や顔と背景との区別がつきにくいため、図4(a)〜(d)の輪郭画像では胴体部分や顔の輪郭を検出することができず、頭部や手足がばらばらに分離したような画像になっている。
【0022】
次にCPU3は、前回作成した輪郭画像(第1の微分画像)と今回作成した輪郭画像(第2の微分画像)との論理積を求めることによって、第1の微分画像と第2の微分画像との間で差分が存在しない部分(すなわち変化していない部分)を抽出し、前回の撮像時点から今回の撮像時点までの間、静止していた物体(静止物体)の画像(図5(a)〜(d)参照)を作成する(図2のステップS2)。例えば時刻T2ではCPU3が、時刻T1における輪郭画像(図4(b)参照)と時刻T2における輪郭画像(図4(c)参照)との論理積を求めることにより、この間に移動していない静止物体の画像(図5(c)参照)を抽出している。
【0023】
またCPU3は、今回作成した輪郭画像(第2の微分画像)と、ステップS2で抽出した静止物体の画像との差分を求めることによって、2つの画像の間で差分が存在した部分(すなわち移動した部分)を抽出し、前回の撮像時点から今回の撮像時点までの間に移動した探索物体の移動部位の画像(図6(a)〜(d)参照)を作成する(図2のステップS3)。例えば時刻T1ではCPU3が、この時点での輪郭画像(図4(b)参照)と静止物体の画像(図5(b)参照)との差分を取ることによって、移動部位の画像(図6(b)参照)を抽出している。時刻T1では人Hの頭及び手の一部と左足とが静止しているので、頭及び手の移動している部分と右足の部分が残ったような画像となる。
【0024】
また更にCPU3は、前回抽出した静止物体の画像と今回抽出した静止物体の画像との差分を求めることによって、前回抽出した静止物体の画像には存在せず、今回抽出した静止物体の画像のみに存在する部分を抽出し、今回抽出した静止物体の画像から探索物体の停止部位のみの画像(図7(a)〜(d)参照)を抽出する(図2のステップS4)。例えば時刻T2ではCPU3が、時刻T2で抽出した静止物体の画像(図5(c)参照)と、時刻T1で抽出した静止物体の画像(図5(b)参照)との差分を求めることによって、探索物体の停止部位のみの画像(図7(c)参照)を抽出している。
【0025】
尚、探索物体の停止部位を抽出する際に、CPU3が、前回抽出した停止部位の画像に存在する領域の内、今回抽出した停止部位及び移動部位の画像に存在しない領域を、今回抽出した停止部位の画像に加えるようにしても良い。例えば時刻T3では時刻T2で停止していた停止部位が停止し続けているため、この停止部位は今回抽出した停止部位及び移動部位の画像の何れにも現れず、その結果探索画像(図8(d)参照)には何も現れなくなるが、前回抽出した停止部位の画像に存在する領域の内、今回抽出した停止部位及び移動部位の画像に存在しない領域を、今回抽出した停止部位の画像に加えるようにすれば、探索物体(人H)の形状を正確に検出することができる。
【0026】
その後CPU3は、ステップS3で抽出した移動部位の画像と、ステップS4で抽出した停止部位の画像との論理和を求め、さらにノイズ成分を除去することにより、テンプレートマッチングを行って探索物体(人体)を探索するための探索画像(図8(a)〜(d)参照)を作成する(図2のステップS5)。
【0027】
ここで、テンプレートマッチングを行うことにより探索物体の有無やその位置を検出する方法について以下に説明する。
【0028】
先ずCPU3は、ステップS5で作成した探索画像から探索物体が存在すると思われる探索領域を抽出する。図9(a)はステップS5で作成された探索画像の一例を示しており、この図に示されるように探索画像では探索物体(人H)の境界線Eが細切れに分割され、しかも境界線の一部が抜け落ちているので、どの部分に探索物体である人Hが存在するのか分からないという問題がある。そこで、CPU3では、ステップS5で得られた探索画像に膨張処理を施し、細切れに分割された境界線Eを膨張させることによって、図9(b)に示すようなブロックBを形成しており、この画像中のブロックBに外接する外接長方形を求める。また、各ブロックBを含む外接長方形がある程度近接している場合には、これら複数の外接長方形を1つに纏めており、このようにして求めた外接長方形から探索領域C1〜C3を決定している。なお探索領域C1〜C3を決定する場合には、ある程度の余裕を見込むためにブロックBに外接する外接長方形よりも大きめの領域を設定している。例えば図9(a)に示す探索画像では人体の境界線の一部しか現れておらず、頭部及び脚部の境界線Eが細切れになっているが、膨張処理を行うことによって、細切れになった境界線Eを一体化し、人体の境界線を復元することができる。また細切れになった人体の境界線Eを膨張させて複数のブロックBを形成した場合、これらのブロックBをそれぞれ含む複数の外接長方形は互いに近接しているので、人体を含む探索領域C1は最終的に1つの領域に纏められる。
【0029】
CPU3は、上述のような方法で探索画像内に探索領域を設定しており、探索領域内の画像と所定のテンプレート画像とのマッチング処理を行うことによって、両者の相関値を求めている(図2のステップS6)。例えば時刻T1では、CPU3がこの時刻における探索画像(図8(b)参照)の探索領域に、図8(g)に示すテンプレート画像t11を重ね合わせ、テンプレート画像t11の位置を1画素づつずらしながら、相関値を検出する。そして、この探索領域内で最も高い相関値が予め設定された閾値を超えていれば、人が存在しているものと判断し、この相関値に対応する探索領域を人が存在する位置に設定ている。
【0030】
また、CPU3では探索画像についてテンプレートマッチングを行うと同時に、同時刻に作成した輪郭画像に対してテンプレートマッチングを行っている。この場合、CPU3は、輪郭画像において前回の人体検出位置近傍を探索領域(図示せず)に設定し、この探索領域の画像とテンプレート画像とのマッチング処理を行って、両者の相関値を求めている。例えば時刻T1では、CPU3がこの時刻の輪郭画像(図4(b)参照)について前回の人体検出位置近傍を探索領域に設定した後、探索領域内の画像にテンプレート画像t11を重ね合わせ、テンプレート画像t11の位置を1画像づつずらしながら、相関値を検出する。そして、この探索領域内で最も高い相関値が予め設定された閾値を超えていれば、人が存在しているものと判断し、この相関値に対応する探索領域を人が存在する位置に設定ている。
【0031】
ここで、探索画像についてテンプレートマッチングを行って得た相関値が、輪郭画像についてテンプレートマッチングを行って得た相関値よりも高い場合、CPU3は人体が動いているものと判断し、人が存在すると判断した探索画面内の探索領域の画像を次回のテンプレート画像に設定するとともに、人Hの検出位置を更新する(図2のステップS7)。例えば時刻T1では、探索画像についてテンプレートマッチングを行って得た相関値が、輪郭画像についてテンプレートマッチングを行って得た相関値よりも高くなるので、探索画像内に設定した探索領域の画像をテンプレート画像t12に設定する。
【0032】
一方、輪郭画像についてテンプレートマッチングを行って得た相関値が、探索画像についてテンプレートマッチングを行って得た相関値よりも高い場合、CPU3は人体が止まっているものと判断し、テンプレート画像の更新は行わない。例えば時刻T3では、時刻T1〜T3まで人Hがずっと静止しているために探索画像には何も現れなくなり、その結果輪郭画像についてテンプレートマッチングを行って得た相関値が、探索画像についてテンプレートマッチングを行って得た相関値よりも高くなるので、テンプレート画像の更新は行わず、今回のテンプレート画像t31をそのまま次回のテンプレート画像t32とする。なお、図10(a)〜(c)は電源投入時に用いるテンプレート画像ta〜tcを示しており、人体Hの頭部と胴体をシンボル化したような形状のテンプレート画像を用いている。
【0033】
以上説明したように本実施形態の画像処理装置では、探索物体(人H)の内、移動している部位の画像と停止している部位の画像をそれぞれ求め、両者の画像から探索物体の全体の画像を求めているので、フレーム間差分方法のように移動している部位のみを抽出する場合に比べて、探索物体の判別を容易に行うことができ、またフレーム間差分方法のように探索物体の画像が2重にだぶって抽出されることはないから、テンプレートマッチングなどの処理を容易に行える。さらに、背景差分方法のように探索物体が存在しない状態の背景画像を予め撮影しておく必要がないから、背景画像を撮像する手間を無くすことができる。
【0034】
【発明の効果】
上述のように、請求項1の発明は、所定の監視エリアにおける人や車輌などの探索物体の存否やその動きを検出するための画像処理方法であって、所定のタイミングで監視エリアの濃淡画像をカメラに撮像させるとともに、カメラより入力される上記濃淡画像から物体の輪郭を示す輪郭画像を作成する処理と、前回作成した第1の輪郭画像と今回作成した第2の輪郭画像とから、この間で動いていない静止物体の画像を抽出する処理と、上記第2の輪郭画像と今回抽出した静止物体の画像とから、この間で移動した探索物体の移動部位の画像を抽出する処理と、前回抽出した静止物体の画像には存在せず今回抽出した静止物体の画像のみに存在する部分を、探索物体の停止部位の画像として抽出する処理と、今回抽出した移動部位及び停止部位の画像から探索物体を含む探索領域の画像を作成する処理と、探索領域の画像及び今回作成した第2の輪郭画像とテンプレート画像とのマッチング処理を行って探索物体の存否やその動きを判断する処理とをCPUに行わせることを特徴とし、探索物体の内、移動している部位の画像と停止している部位の画像をそれぞれ求め、両者の画像から探索物体の全体の画像を求めているので、フレーム間差分方法のように移動している部位のみを抽出する場合に比べて、探索物体の判別を容易に行うことができ、またフレーム間差分方法のように探索物体の画像が2重にだぶって抽出されることはないから、テンプレートマッチングなどの処理を容易に行えるという効果がある。さらに、背景差分方法のように探索物体が存在しない状態の背景画像を予め撮影しておく必要がないから、背景画像を撮像する手間を無くすことができるという効果がある。
【0035】
しかも、探索物体の停止部位の画像として、前回抽出した静止物体の画像には存在せず、今回抽出した静止物体の画像のみに存在する部分を抽出しているので、探索物体の停止部位の画像を簡単な方法で抽出できるという効果がある。
【0036】
請求項の発明は、請求項の発明において、今回抽出した移動部位の画像と停止部位の画像との論理和を求めて得た画像の内、物体の輪郭を含む領域をテンプレートマッチングを行う探索領域に設定する処理を、CPUに行わせることを特徴とし、請求項の発明の作用に加えて、移動部位の画像と停止部位の画像との論理和を求めているので、探索物体の全体の形状を判別することができ、テンプレート画像との相関値を正確に求めることができるという効果がある。
【0037】
請求項の発明は、請求項の発明において、今回抽出した移動部位の画像と停止部位の画像との論理和を求めて得た画像をテンプレートマッチングを行う第1の探索画像とし、第1の探索画像の内、物体の輪郭を含む領域についてテンプレート画像との相関値を求めるとともに、今回作成した輪郭画像をテンプレートマッチングを行う第2の探索画像とし、第2の探索画像における探索物体の前回の検出位置近傍を探索領域として、この探索領域内でテンプレート画像との相関値を求め、相関値が最も高く且つ予め設定された閾値よりも高い領域を探索物体の検出位置とし、この検出位置の画像に基づいて次回のテンプレート画像を設定する処理を、CPUに行わせることを特徴とし、請求項の発明の作用に加えて、今回抽出した移動部位の画像と停止部位の画像との論理和を求めて得た画像を第1の探索画像、今回作成した輪郭画像を第2の探索画像としてそれぞれテンプレートマッチングを行っているので、探索物体が移動している場合でも停止している場合でも、探索物体の存否を確実に検出できるという効果がある。
【0038】
請求項の発明は、請求項の発明において、前回抽出した停止部位の画像に存在する領域の内、今回抽出した停止部位及び移動部位の画像に存在しない領域を、今回抽出した停止部位の画像に加える処理を、CPUに行わせることを特徴とし、請求項の発明の作用に加えて、前回停止していた停止部位が停止し続けている場合、この停止部位は今回抽出した停止部位及び移動部位の画像の何れにも現れないため、前回抽出した停止部位の画像に存在する領域の内、今回抽出した停止部位及び移動部位の画像に存在しない領域を、今回抽出した停止部位の画像に加えることによって探索物体の形状を正確に検出できるという効果がある。
【0039】
請求項の発明は、請求項1乃至の発明において、静止物体の画像として、第1の輪郭画像と第2の輪郭画像との間で差分が存在しない部分を抽出する処理を、CPUに行わせることを特徴とし、請求項1乃至の発明の作用に加えて、静止物体の画像を簡単な処理で抽出できるという効果がある。
【0040】
請求項の発明は、請求項1乃至5の発明において、探索物体の移動部位の画像として、第2の輪郭画像と今回抽出した静止物体の画像との間で差分が存在した部分を抽出する処理を、CPUに行わせることを特徴とし、請求項1乃至5の発明の作用に加えて、移動部位の画像を簡単な処理で抽出できるという効果がある。
【0041】
請求項の発明は、所定の監視エリアにおける人や車輌などの探索物体の存否やその動きを検出するための画像処理装置において、所定のタイミングで監視エリアの濃淡画像を撮像する手段と、上記濃淡画像から物体の輪郭を示す輪郭画像を作成する手段と、前回作成した第1の輪郭画像と今回作成した第2の輪郭画像とから、この間で動いていない静止物体の画像を抽出する手段と、上記第2の輪郭画像と今回抽出した静止物体の画像とから、この間で移動した探索物体の移動部位の画像を抽出する手段と、前回抽出した静止物体の画像には存在せず、今回抽出した静止物体の画像のみに存在する部分を、探索物体の停止部位の画像として抽出する手段と、今回抽出した移動部位及び停止部位の画像から探索物体を含む探索領域の画像を作成する手段と、探索領域の画像及び今回作成した輪郭画像とテンプレート画像とのマッチング処理を行って探索物体の存否やその動きを判断する手段とを備えて成ることを特徴とし、探索物体の内、移動している部位の画像と停止している部位の画像をそれぞれ求め、両者の画像から探索物体の全体の画像を求めているので、フレーム間差分方法を用いる場合のように移動している部位のみを抽出する場合に比べて、探索物体の判別を容易に行うことができ、またフレーム間差分方法を用いる場合のように探索物体の画像が2重にだぶって抽出されることはないから、テンプレートマッチングなどの処理を容易に行える画像処理装置を提供できるという効果がある。さらに、背景差分方法を用いる場合のように探索物体が存在しない状態の背景画像を予め撮影しておく必要がないから、背景画像を撮像する手間を無くした画像処理装置を提供できるという効果がある。しかも、探索物体の停止部位の画像として、前回抽出した静止物体の画像には存在せず、今回抽出した静止物体の画像のみに存在する部分を抽出しているので、探索物体の停止部位の画像を簡単な方法で抽出できる。
【図面の簡単な説明】
【図1】本実施形態の画像処理装置の概略構成図である。
【図2】同上の動作を説明するフローチャートである。
【図3】(a)〜(d)は各時刻における入力画像の説明図である。
【図4】(a)〜(d)は各時刻における輪郭画像の説明図である。
【図5】(a)〜(d)は各時刻における静止物体の抽出画像の説明図である。
【図6】(a)〜(d)は各時刻における移動物体の抽出画像の説明図である。
【図7】(a)〜(d)は各時刻における停止物体の抽出画像の説明図である。
【図8】(a)〜(d)は各時刻における探索画像の説明図、(e)〜(l)は各時刻におけるテンプレート画像の説明図である。
【図9】(a)(b)は探索画像から探索領域を作成する手順を説明する説明図である。
【図10】(a)〜(c)は電源投入時のテンプレート画像の説明図である。
【図11】(a)〜(c)は背景差分方法を用いた画像処理方法の説明図である。
【図12】(a)〜(c)はフレーム間差分方法を用いた画像処理方法の説明図である。
【符号の説明】
1 カメラ
3 CPU
A 監視エリア
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method for automatically detecting the movement of an object such as a person or a vehicle in a predetermined monitoring area, and an image processing apparatus using the image processing method.
[0002]
[Prior art]
As this kind of image processing method, a background difference method and an inter-frame difference method have been conventionally provided.
[0003]
First, the background difference method will be described with reference to FIGS. In this method, an image of the monitoring area A (see FIG. 11A) when no moving object exists in advance is captured and stored as a background image. Thereafter, the image of the monitoring area A is sequentially picked up, the difference from the background image is obtained, and it is determined that the area where the difference has occurred is the part where the object not in the background has entered. For example, when a person H enters the monitoring area A, if the difference between the image of the monitoring area A at this time (see FIG. 11B) and the background image is taken, the binary difference shown in FIG. Since an image is obtained, it can be determined from this image that the person H has entered.
[0004]
Next, the interframe difference method will be described with reference to FIGS. In this method, images of the monitoring area A are sequentially captured, and a moving object is detected by taking a difference between two images captured at different times. FIG. 12A shows an image of the monitoring area A taken at a certain time, and FIG. 12B shows an image of the monitoring area A taken at a certain time thereafter. Since the difference image becomes a difference image and a binary difference image as shown in FIG. 12C is obtained, it can be detected from this image that some object is moving.
[0005]
[Problems to be solved by the invention]
Among the above-described image processing methods, the former method (background difference method) needs to capture an image (background image) of a monitoring area in which no person exists in advance, but there is a person in the monitoring area. The operator must visually confirm that the image has not been captured, and the background image cannot be captured automatically. In addition, the operation of capturing the background image has to be performed at the actual installation site, and there is a problem that it takes time and effort for the imaging operation.
[0006]
In order to automatically capture the background image, it is conceivable that the monitoring area is imaged for a long time and the average value is used as a background image. There is a problem that people are buried in the background image. In addition, it is possible to take a method of imaging the monitoring area for a long time and sequentially updating the background image for each area, with the background of the area with little or no change from the captured image. When a person is stationary all the time, there is a problem that the person is buried in the background image as described above.
[0007]
On the other hand, in the latter method (inter-frame difference method), the difference between two images taken at different times is obtained, and the moving object is extracted with double images of the object. Therefore, there is a problem that the means for determining whether or not the extracted object is a person is complicated.
[0008]
In addition, in this method, the changed part is extracted from the two images, so when only a part of the human body is moving, only this part can be extracted, and the shape of the human body itself is extracted. I couldn't. For example, when a person is sitting or sleeping in the surveillance area, if only the limbs move and the torso is stationary, only the moving limbs are extracted, and the hand and feet are separated. Therefore, it is necessary to determine whether the extracted hand and foot are those of the same person or different persons, and this procedure has a problem that it is considerably complicated.
[0009]
The present invention has been made in view of the above problems, and an object of the present invention is to provide an image processing method and an image processing method that can detect the entire search target without having to capture a background image in advance. It is to provide an image processing apparatus used.
[0010]
[Means for Solving the Problems]
  In order to achieve the above object, according to the first aspect of the present invention, there is provided an image processing method for detecting the presence or absence of a search object such as a person or a vehicle in a predetermined monitoring area and its movement, wherein the monitoring area has a predetermined timing. Grayscale imageTo the cameraImageAnd input from the cameraCreate a contour image showing the contour of an object from the grayscale imageprocessingAnd creating a contour image showing the contour of the object from the grayscale imageprocessingAnd an image of a stationary object that does not move between the first contour image created last time and the second contour image created this timeprocessingAnd the image of the moving part of the search object moved between the second contour image and the still object image extracted this timeprocessingWhen,Processing to extract the part that exists only in the static object image extracted this time but does not exist in the previously extracted static object image as the stop part image of the search objectAnd an image of the search area including the search object from the extracted moving part and stopping part imagesprocessingAnd the search area image and this timeSecondPerforms matching processing between the contour image and the template image to determine the existence of the search object and its movementprocessingAndLet the CPU do itIn the search object, the image of the moving part and the image of the stopped part are obtained, and the whole image of the search object is obtained from both images. As compared with the case where only the moving part is extracted, the search object can be easily discriminated, and the search object image is extracted twice as in the inter-frame difference method. Therefore, processing such as template matching can be easily performed. Furthermore, since it is not necessary to capture a background image in a state where no search object exists unlike the background difference method, it is possible to eliminate the trouble of capturing the background image.
[0011]
  Moreover,As the image of the stop part of the search object, the part that exists only in the image of the stationary object extracted this time but not in the previously extracted stationary object image is extracted.BecauseThe image of the stop part of the search object can be extracted by a simple method.
[0012]
  Claim2In the invention of claim1In this invention, an area including the contour of the object is set as a search area for performing template matching in the image obtained by calculating the logical sum of the moving part image and the stop part image extracted this time.Have the CPU do the processingAnd claims1In addition to the operation of the present invention, since the logical sum of the moving part image and the stop part image is obtained, the entire shape of the search object can be determined, and the correlation value with the template image is obtained accurately. be able to.
[0013]
  Claim3In the invention of claim1In this invention, the image obtained by calculating the logical sum of the moving part image and the stop part image extracted this time is used as a first search image for template matching, and the contour of the object in the first search image is defined as the first search image. While calculating the correlation value with the template image for the included region, the contour image created this time is used as the second search image for template matching, and the vicinity of the previous detection position of the search object in the second search image is used as the search region. The correlation value with the template image is obtained in the search area, the area having the highest correlation value and higher than a preset threshold is set as the detection position of the search object, and the next template image is set based on the image at the detection position. DoHave the CPU do the processingAnd claims1In addition to the operation of the present invention, the image obtained by calculating the logical sum of the image of the moving part extracted this time and the image of the stop part is used as the first search image, and the contour image created this time is used as the second search image. Since template matching is performed, the presence or absence of the search object can be reliably detected regardless of whether the search object is moving or stopped.
[0014]
  Claim4In the invention of claim1In the present invention, among the regions existing in the previously extracted stop portion image, the regions not present in the currently extracted stop portion and moving portion images are added to the currently extracted stop portion image.Have the CPU do the processingAnd claims1In addition to the action of the invention of the present invention, when the stop part that was stopped last time continues to stop, this stop part does not appear in either the stop part extracted this time or the image of the moving part. The shape of the search object can be accurately detected by adding the region not present in the image of the stop part and the moving part extracted this time to the image of the stop part extracted this time.
[0015]
  Claim5In the present invention, claims 1 to4In the invention, a portion where no difference exists between the first contour image and the second contour image is extracted as a still object image.Have the CPU do the processingClaims 1 to4In addition to the operation of the present invention, an image of a stationary object can be extracted by a simple process.
[0016]
  Claim6In the invention of claim 1, in the inventions of claims 1 to 5, a part where a difference exists between the second contour image and the image of the stationary object extracted this time is extracted as the image of the moving part of the search object.Have the CPU do the processingIn addition to the effects of the first to fifth aspects of the invention, the moving part image can be extracted by a simple process.
[0017]
  Claim7In the invention, in the image processing apparatus for detecting the presence or absence of a search object such as a person or a vehicle in a predetermined monitoring area and its movement, a means for capturing a grayscale image of the monitoring area at a predetermined timing, and the above grayscale image Means for creating a contour image showing the contour of the object, means for extracting an image of a stationary object that has not moved between the first contour image created last time and the second contour image created this time, Means for extracting, from the contour image of 2 and the image of the stationary object extracted this time, an image of the moving part of the search object that has moved between the two,Means for extracting, as an image of the stop part of the search object, a portion that is not present in the previously extracted stationary object image but is present only in the stationary object image extracted this time;Means for creating an image of the search area including the search object from the image of the moving part and the stop part extracted this time, and the presence / absence of the search object by performing a matching process between the image of the search area and the contour image created this time and the template image And a means for judging the movement of the search object, and obtaining an image of the moving part and an image of the stopped part of the search object, respectively. Compared to extracting only moving parts as in the case of using the inter-frame difference method, the search object can be easily discriminated, and the inter-frame difference method is used. As described above, since the image of the search object is not extracted twice, it is possible to provide an image processing apparatus that can easily perform processing such as template matching. Furthermore, since it is not necessary to previously capture a background image in a state where no search object exists as in the case of using the background difference method, it is possible to provide an image processing apparatus that eliminates the trouble of capturing a background image.Moreover, as the image of the stop part of the search object, the part of the search object that is not present in the previously extracted still object image but is present only in the still object image extracted this time is extracted. Can be extracted in a simple way.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
A first embodiment of the present invention will be described with reference to FIGS. This image processing apparatus automatically detects the presence / absence and movement of a person H (search object) in a predetermined monitoring area A (for example, a room in a building). FIG. 1 is a schematic configuration diagram of this image processing apparatus. For example, a camera 1 such as a CCD camera that is installed on a ceiling of a room and picks up a black and white grayscale image in the room, and an analog video input from the camera 1. Supplied from an A / D converter 2 that converts a signal into a digital signal, a CPU 3 that detects the presence / absence and movement of a person H by processing the output signal of the A / D converter 2, and a DC power supply (not shown) And a power supply circuit 4 for supplying power to the camera 1 by converting the power supply voltage to a DC voltage having a desired voltage value.
[0019]
An image processing method of the image processing apparatus will be described with reference to FIGS. 3 (a) is an input image at time T0 when the person H is falling down, FIG. 3 (b) is an input image at the time T1 at the moment when the person H has fallen (lie on the floor), and FIGS. d) respectively shows the input images at times T2 and T3 in a state where the person H is standing still with the person H lying down, and the person H is stationary between the times T1 to T3. 4A to 4D show contour images at times T0 to T3, FIGS. 5A to 5D show still object extraction images at times T0 to T3, and FIGS. d) is an extracted image of the moving part of the search object at times T0 to T3, FIGS. 7A to 7D are extracted images of the stop part of the search object at times T0 to T3, and FIGS. d) shows search images at times T0 to T3, and FIGS. 8E, 8G, 8I, and 8K show template images t01, t11, t21, and t31 used when template matching is performed at each time. (F), (h), (j), and (l) respectively show template images t02, t12, t22, and t32 that reflect the results of template matching. 4 to 8 are schematic diagrams, and the lines indicating the outline of the object are illustrated with the same thickness lines, but in reality, there are thin portions and thick portions, so that they disappear in the process. Part and remaining part occur.
[0020]
The camera 1 captures black and white grayscale images in the monitoring area A at predetermined time intervals, and the video signal of the camera 1 is converted into a digital signal by the A / D converter 2 and sequentially input to the CPU 3 (FIG. 2). Step S1). When a black and white grayscale image from the camera 1 is input to the CPU 3, the CPU 3 creates a differential image from the black and white grayscale image and binarizes it to detect the boundary line (edge) of the object. That is, in the part corresponding to the object in the image, its characteristics, for example, the density is uniform, and it is considered that the density changes suddenly between different objects or parts of the object, so search for a place where the density changes rapidly. Thus, the boundary line (edge) of the object can be detected. Also, if two different objects overlap, the density becomes discontinuous at the boundary between them, and the amount of change (gradient) in density is large, so by detecting the location where the density gradient is large, The boundary line of the object can be detected. In general, it is only necessary to perform spatial differentiation in order to detect discontinuity of light and dark, and by obtaining a difference between adjacent pixels in a black and white light image captured at a certain time, a differential value of density, that is, a gradient (gradient) is obtained. Can be detected. Note that various methods are provided as edge detection methods, and a method using a Sobel arithmetic expression is generally performed.
[0021]
That is, the CPU 3 performs image processing on the image data of the black and white image and obtains the gradient value of the density. If the gradient value is higher than the threshold value, the gradient value is compared with the predetermined threshold value. If the contour portion is equal to or less than the threshold value, it is determined as a flat portion (binarization process). For example, FIGS. 3A to 3D are obtained from black and white grayscale images (input images) input from the camera 1 at times T0 to T3, and FIGS. 4A to 4D are obtained from black and white grayscale images at each time. Each contour image is shown, and the solid line in FIGS. 4A to 4D shows the contour of the object. In this embodiment, since it is difficult to distinguish between the body part of the human body H and the face and the background, the contour image of FIGS. 4A to 4D cannot detect the body part and the face outline. The image looks like the head and limbs are separated.
[0022]
Next, the CPU 3 obtains the logical product of the contour image (first differential image) created last time and the contour image (second differential image) created this time, thereby obtaining the first differential image and the second differential image. A portion where there is no difference between them (that is, a portion that has not changed) is extracted, and an image of a stationary object (stationary object) from the previous imaging time point to the current imaging time point (FIG. 5A ) To (d)) (step S2 in FIG. 2). For example, at time T2, the CPU 3 obtains a logical product of the contour image at time T1 (see FIG. 4B) and the contour image at time T2 (see FIG. 4C), so that the stationary image does not move during this time. An object image (see FIG. 5C) is extracted.
[0023]
Further, the CPU 3 obtains a difference between the contour image (second differential image) created this time and the image of the stationary object extracted in step S2, and thus a portion where the difference exists between the two images (that is, moved). (Part)) is extracted, and an image (see FIGS. 6A to 6D) of the moving part of the search object that has moved between the previous imaging time point and the current imaging time point is created (step S3 in FIG. 2). . For example, at time T1, the CPU 3 obtains the difference between the contour image at this time (see FIG. 4B) and the image of the stationary object (see FIG. 5B), thereby moving the moving part image (FIG. b) is extracted. At time T1, since the person H's head and part of the hand and the left foot are stationary, the image is such that the part where the head and hand are moving and the part of the right foot remain.
[0024]
Further, the CPU 3 obtains a difference between the image of the stationary object extracted last time and the image of the stationary object extracted this time, so that it does not exist in the image of the stationary object extracted last time, but only the image of the stationary object extracted this time. An existing portion is extracted, and an image of only the stop portion of the search object (see FIGS. 7A to 7D) is extracted from the image of the still object extracted this time (step S4 in FIG. 2). For example, at time T2, the CPU 3 obtains a difference between the still object image extracted at time T2 (see FIG. 5C) and the still object image extracted at time T1 (see FIG. 5B). The image of only the stop part of the search object (see FIG. 7C) is extracted.
[0025]
When extracting the stop part of the search object, the CPU 3 extracts the stop part extracted this time and the stop part extracted this time and the area not present in the image of the movement part among the areas existing in the previously extracted stop part image. You may make it add to the image of a site | part. For example, at time T3, the stop part stopped at time T2 continues to stop, so this stop part does not appear in any of the stop part and moving part images extracted this time, and as a result a search image (FIG. 8 ( In (d) see), nothing appears, but out of the areas existing in the previously extracted stop part image, the stop part extracted this time and the non-existing area in the moving part image are displayed in the stop part image extracted this time. If added, the shape of the search object (person H) can be accurately detected.
[0026]
Thereafter, the CPU 3 calculates the logical sum of the image of the moving part extracted in step S3 and the image of the stop part extracted in step S4, and further removes the noise component, thereby performing template matching to perform a search object (human body). Search images (see FIGS. 8A to 8D) are created (step S5 in FIG. 2).
[0027]
Here, a method for detecting presence / absence of a search object and its position by performing template matching will be described below.
[0028]
First, the CPU 3 extracts a search area where a search object is considered to exist from the search image created in step S5. FIG. 9A shows an example of the search image created in step S5. As shown in FIG. 9, the boundary line E of the search object (person H) is divided into small pieces in the search image. There is a problem that it is not known in which part the person H who is the search object exists. Therefore, the CPU 3 performs the expansion process on the search image obtained in step S5 to expand the boundary line E divided into small pieces, thereby forming a block B as shown in FIG. 9B. A circumscribed rectangle circumscribing the block B in this image is obtained. When the circumscribed rectangles including the blocks B are close to each other to some extent, these circumscribed rectangles are combined into one, and search areas C1 to C3 are determined from the circumscribed rectangles thus obtained. Yes. When determining the search areas C1 to C3, an area larger than the circumscribed rectangle circumscribing the block B is set in order to allow a certain margin. For example, in the search image shown in FIG. 9 (a), only a part of the boundary line of the human body appears and the boundary line E of the head and legs is shredded. The boundary line E thus formed can be integrated to restore the boundary line of the human body. In addition, when a plurality of blocks B are formed by expanding the cut border line E of the human body, since the circumscribed rectangles including these blocks B are close to each other, the search region C1 including the human body is the final Thus, they are grouped into one area.
[0029]
The CPU 3 sets a search area in the search image by the method as described above, and obtains a correlation value between the two by performing a matching process between the image in the search area and a predetermined template image (see FIG. 2 step S6). For example, at time T1, the CPU 3 superimposes the template image t11 shown in FIG. 8G on the search area of the search image (see FIG. 8B) at this time, and shifts the position of the template image t11 pixel by pixel. The correlation value is detected. If the highest correlation value in the search area exceeds a preset threshold, it is determined that a person exists, and the search area corresponding to the correlation value is set at a position where the person exists. ing.
[0030]
Further, the CPU 3 performs template matching for the contour image created at the same time as template matching for the search image. In this case, the CPU 3 sets the vicinity of the previous human body detection position in the contour image as a search region (not shown), performs a matching process between the image in the search region and the template image, and obtains a correlation value between them. Yes. For example, at the time T1, the CPU 3 sets the vicinity of the previous human body detection position in the search region for the contour image at this time (see FIG. 4B), and then superimposes the template image t11 on the image in the search region, The correlation value is detected while shifting the position of t11 by one image. If the highest correlation value in the search area exceeds a preset threshold, it is determined that a person exists, and the search area corresponding to the correlation value is set at a position where the person exists. ing.
[0031]
Here, when the correlation value obtained by performing the template matching for the search image is higher than the correlation value obtained by performing the template matching for the contour image, the CPU 3 determines that the human body is moving, and there is a person. The image of the search area in the determined search screen is set as the next template image, and the detection position of the person H is updated (step S7 in FIG. 2). For example, at time T1, the correlation value obtained by performing the template matching on the search image becomes higher than the correlation value obtained by performing the template matching on the contour image, so the image of the search area set in the search image is used as the template image. Set to t12.
[0032]
On the other hand, if the correlation value obtained by performing the template matching on the contour image is higher than the correlation value obtained by performing the template matching on the search image, the CPU 3 determines that the human body is stopped, and the template image is updated. Not performed. For example, at time T3, since the person H remains stationary from time T1 to T3, nothing appears in the search image. As a result, the correlation value obtained by performing the template matching on the contour image becomes the template matching on the search image. Therefore, the template image is not updated and the current template image t31 is used as the next template image t32. FIGS. 10A to 10C show template images ta to tc used when the power is turned on, and template images having a shape that symbolizes the head and torso of the human body H are used.
[0033]
As described above, in the image processing apparatus according to the present embodiment, an image of a moving part and an image of a stopped part of the search object (person H) are obtained, and the entire search object is obtained from both images. Compared to the case of extracting only moving parts as in the inter-frame difference method, the search object can be easily identified, and the search is performed as in the inter-frame difference method. Since object images are not extracted twice, processing such as template matching can be easily performed. Furthermore, since it is not necessary to capture a background image in a state where no search object exists unlike the background difference method, it is possible to eliminate the trouble of capturing the background image.
[0034]
【The invention's effect】
  As described above, the invention of claim 1 is an image processing method for detecting the presence or absence of a search object such as a person or a vehicle in a predetermined monitoring area and its movement, and a grayscale image of the monitoring area at a predetermined timing. TheTo the cameraImageAnd input from the cameraCreate a contour image showing the contour of an object from the grayscale imageprocessingAnd an image of a stationary object that does not move between the first contour image created last time and the second contour image created this timeprocessingAnd the image of the moving part of the search object moved between the second contour image and the still object image extracted this timeprocessingWhen,Processing to extract the part that exists only in the static object image extracted this time but does not exist in the previously extracted static object image as the stop part image of the search objectAnd an image of the search area including the search object from the extracted moving part and stopping part imagesprocessingAnd the search area image and this timeSecondPerforms matching processing between the contour image and the template image to determine the existence of the search object and its movementprocessingAndLet the CPU do itIn the search object, the image of the moving part and the image of the stopped part are obtained, and the whole image of the search object is obtained from both images. As compared with the case where only the moving part is extracted, the search object can be easily discriminated, and the search object image is extracted twice as in the inter-frame difference method. Therefore, there is an effect that processing such as template matching can be easily performed. In addition, unlike the background subtraction method, there is no need to capture a background image in a state where no search object exists in advance, so that it is possible to eliminate the trouble of capturing the background image.
[0035]
  Moreover,As the image of the stop part of the search object, the part that exists only in the image of the stationary object extracted this time but not in the previously extracted stationary object image is extracted.BecauseThere is an effect that an image of a stop portion of the search object can be extracted by a simple method.
[0036]
  Claim2The invention of claim1In this invention, an area including the contour of the object is set as a search area for performing template matching in the image obtained by calculating the logical sum of the moving part image and the stop part image extracted this time.Have the CPU do the processingAnd claims1In addition to the operation of the present invention, since the logical sum of the moving part image and the stop part image is obtained, the entire shape of the search object can be determined, and the correlation value with the template image is obtained accurately. There is an effect that can be.
[0037]
  Claim3The invention of claim1In this invention, the image obtained by calculating the logical sum of the moving part image and the stop part image extracted this time is used as a first search image for template matching, and the contour of the object in the first search image is defined as the first search image. While calculating the correlation value with the template image for the included region, the contour image created this time is used as the second search image for template matching, and the vicinity of the previous detection position of the search object in the second search image is used as the search region. The correlation value with the template image is obtained in the search area, the area having the highest correlation value and higher than a preset threshold is set as the detection position of the search object, and the next template image is set based on the image at the detection position. DoHave the CPU do the processingAnd claims1In addition to the operation of the present invention, the image obtained by calculating the logical sum of the image of the moving part extracted this time and the image of the stop part is used as the first search image, and the contour image created this time is used as the second search image. Since template matching is performed, there is an effect that the presence or absence of the search object can be reliably detected regardless of whether the search object is moving or stopped.
[0038]
  Claim4The invention of claim1In the present invention, among the regions existing in the previously extracted stop portion image, the regions not present in the currently extracted stop portion and moving portion images are added to the currently extracted stop portion image.Have the CPU do the processingAnd claims1In addition to the action of the invention of the present invention, if the stop part that was stopped last time continues to stop, this stop part does not appear in either the stop part extracted this time or the image of the moving part. Among the regions existing in this image, there is an effect that the shape of the search object can be accurately detected by adding the region not present in the image of the stop region and the moving region extracted this time to the image of the stop region extracted this time.
[0039]
  Claim5The invention of claim 1 to claim 14In the invention, a portion where no difference exists between the first contour image and the second contour image is extracted as a still object image.Have the CPU do the processingClaims 1 to4In addition to the operation of the invention, there is an effect that an image of a stationary object can be extracted by a simple process.
[0040]
  Claim6According to the invention of any one of claims 1 to 5, as the image of the moving part of the search object, a portion where a difference exists between the second contour image and the image of the stationary object extracted this time is extracted.Have the CPU do the processingIn addition to the effects of the first to fifth aspects of the invention, there is an effect that the image of the moving part can be extracted by a simple process.
[0041]
  Claim7In the image processing apparatus for detecting the presence / absence of a search object such as a person or a vehicle in a predetermined monitoring area and its movement, means for capturing a grayscale image of the monitoring area at a predetermined timing, and the grayscale image Means for creating a contour image showing the contour of the object; means for extracting an image of a stationary object that has not moved between the first contour image created last time and the second contour image created this time; Means for extracting, from the contour image of 2 and the image of the stationary object extracted this time, an image of the moving part of the search object that has moved between the two,Means for extracting, as an image of the stop part of the search object, a portion that is not present in the previously extracted stationary object image but is present only in the stationary object image extracted this time;Means for creating an image of the search area including the search object from the image of the moving part and the stop part extracted this time, and the presence / absence of the search object by performing a matching process between the image of the search area and the contour image created this time and the template image And a means for judging the movement of the search object, and obtaining an image of the moving part and an image of the stopped part of the search object, respectively. Compared to extracting only moving parts as in the case of using the inter-frame difference method, the search object can be easily discriminated, and the inter-frame difference method is used. As described above, since the image of the search object is not extracted twice, it is possible to provide an image processing apparatus that can easily perform processing such as template matching. That. Furthermore, unlike the case where the background subtraction method is used, it is not necessary to capture a background image in a state where no search object exists in advance, so that it is possible to provide an image processing apparatus that eliminates the trouble of capturing the background image. .Moreover, as the image of the stop part of the search object, the part of the search object that is not present in the previously extracted still object image but is present only in the still object image extracted this time is extracted. Can be extracted in a simple way.
[Brief description of the drawings]
FIG. 1 is a schematic configuration diagram of an image processing apparatus according to an embodiment.
FIG. 2 is a flowchart illustrating the operation of the above.
FIGS. 3A to 3D are explanatory diagrams of an input image at each time.
4A to 4D are explanatory diagrams of a contour image at each time. FIG.
FIGS. 5A to 5D are explanatory diagrams of an extracted image of a stationary object at each time.
FIGS. 6A to 6D are explanatory diagrams of extracted images of moving objects at each time.
7A to 7D are explanatory diagrams of extracted images of a stopped object at each time.
FIGS. 8A to 8D are explanatory diagrams of a search image at each time, and FIGS. 8E to l are explanatory diagrams of a template image at each time.
FIGS. 9A and 9B are explanatory diagrams illustrating a procedure for creating a search area from a search image. FIGS.
FIGS. 10A to 10C are explanatory diagrams of template images when power is turned on.
FIGS. 11A to 11C are explanatory diagrams of an image processing method using a background difference method.
FIGS. 12A to 12C are explanatory diagrams of an image processing method using an inter-frame difference method.
[Explanation of symbols]
1 Camera
3 CPU
A monitoring area

Claims (7)

所定の監視エリアにおける人や車輌などの探索物体の存否やその動きを検出するための画像処理方法であって、
所定のタイミングで監視エリアの濃淡画像をカメラに撮像させるとともに、カメラより入力される上記濃淡画像から物体の輪郭を示す輪郭画像を作成する処理と、前回作成した第1の輪郭画像と今回作成した第2の輪郭画像とから、この間で動いていない静止物体の画像を抽出する処理と、上記第2の輪郭画像と今回抽出した静止物体の画像とから、この間で移動した探索物体の移動部位の画像を抽出する処理と、前回抽出した静止物体の画像には存在せず今回抽出した静止物体の画像のみに存在する部分を、探索物体の停止部位の画像として抽出する処理と、今回抽出した移動部位及び停止部位の画像から探索物体を含む探索領域の画像を作成する処理と、探索領域の画像及び今回作成した第2の輪郭画像とテンプレート画像とのマッチング処理を行って探索物体の存否やその動きを判断する処理とをCPUに行わせることを特徴とする画像処理方法。
An image processing method for detecting the presence or absence of a search object such as a person or vehicle in a predetermined monitoring area and its movement,
A process of creating a contour image showing the outline of an object from the grayscale image inputted from a predetermined Rutotomoni camera is captured camera grayscale image of the monitor area in the timing, created this time and the first contour image previously created was from a second contour image, a process of extracting an image of a stationary object is not moving during this period, the and a second outline image and the image of the current extracted still object, moving part of the search object has moved in the meantime The process of extracting the image of the search object, the process of extracting the part that exists only in the image of the still object extracted this time but not in the image of the still object extracted last time, and the process of extracting this time Matching from the mobile site and stop site of the image processing for creating an image in the search region including the search object, the image and the second outline image and the template image created this search area Image processing method characterized by causing the process of determining presence or the movement of the search object by performing a process to the CPU.
今回抽出した移動部位の画像と停止部位の画像との論理和を求めて得た画像の内、物体の輪郭を含む領域をテンプレートマッチングを行う探索領域に設定する処理を、CPUに行わせることを特徴とする請求項1記載の画像処理方法。 Let the CPU perform the process of setting the region including the contour of the object as the search region for template matching in the image obtained by calculating the logical sum of the image of the moving part and the image of the stopping part extracted this time. The image processing method according to claim 1, wherein: 今回抽出した移動部位の画像と停止部位の画像との論理和を求めて得た画像をテンプレートマッチングを行う第1の探索画像とし、第1の探索画像の内、物体の輪郭を含む領域についてテンプレート画像との相関値を求めるとともに、今回作成した輪郭画像をテンプレートマッチングを行う第2の探索画像とし、第2の探索画像における探索物体の前回の検出位置近傍を探索領域として、この探索領域内でテンプレート画像との相関値を求め、相関値が最も高く且つ予め設定された閾値よりも高い領域を探索物体の検出位置とし、この検出位置の画像に基づいて次回のテンプレート画像を設定する処理を、CPUに行わせることを特徴とする請求項記載の画像処理方法。 The image obtained by calculating the logical sum of the image of the moving part and the image of the stop part extracted this time is used as a first search image for template matching, and a template for the region including the contour of the object in the first search image is used. While calculating the correlation value with the image, the contour image created this time is used as the second search image for template matching, and the vicinity of the previous detection position of the search object in the second search image is set as the search region. A process of obtaining a correlation value with the template image, setting a region having the highest correlation value and higher than a preset threshold as a detection position of the search object, and setting a next template image based on the image of the detection position, The image processing method according to claim 1 , wherein the image processing is performed by a CPU . 前回抽出した停止部位の画像に存在する領域の内、今回抽出した停止部位及び移動部位の画像に存在しない領域を、今回抽出した停止部位の画像に加える処理を、CPUに行わせることを特徴とする請求項記載の画像処理方法。 A feature of causing the CPU to perform processing for adding a region not present in the image of the stop part extracted this time and a part of the movement part extracted in the image of the stop part extracted this time to the image of the stop part extracted this time. The image processing method according to claim 1 . 静止物体の画像として、第1の輪郭画像と第2の輪郭画像との間で差分が存在しない部分を抽出する処理を、CPUに行わせることを特徴とする請求項1乃至4の何れか1項に記載の画像処理方法。 An image of a stationary object, the process of extracting the partial absence of the difference between the first outline image and the second outline image, either of claims 1 to 4, characterized in that causing the CPU 1 The image processing method according to item . 探索物体の移動部位の画像として、第2の輪郭画像と今回抽出した静止物体の画像との間で差分が存在した部分を抽出する処理を、CPUに行わせることを特徴とする請求項1乃至5の何れか1項に記載の画像処理方法。 An image of the moving part of the search object, the processing for extracting a portion difference was present between the second contour image and the image of the current extracted stationary object, 1 to claim, characterized in that to perform the CPU the image processing method according to any one of 5. 所定の監視エリアにおける人や車輌などの探索物体の存否やその動きを検出するための画像処理装置において、所定のタイミングで監視エリアの濃淡画像を撮像する手段と、上記濃淡画像から物体の輪郭を示す輪郭画像を作成する手段と、前回作成した第1の輪郭画像と今回作成した第2の輪郭画像とから、この間で動いていない静止物体の画像を抽出する手段と、上記第2の輪郭画像と今回抽出した静止物体の画像とから、この間で移動した探索物体の移動部位の画像を抽出する手段と、前回抽出した静止物体の画像には存在せず、今回抽出した静止物体の画像のみに存在する部分を、探索物体の停止部位の画像として抽出する手段と、今回抽出した移動部位及び停止部位の画像から探索物体を含む探索領域の画像を作成する手段と、探索領域の画像及び今回作成した輪郭画像とテンプレート画像とのマッチング処理を行って探索物体の存否やその動きを判断する手段とを備えて成ることを特徴とする画像処理装置。In an image processing apparatus for detecting the presence or absence of a search object such as a person or a vehicle in a predetermined monitoring area and its movement, a means for capturing a gray image of the monitoring area at a predetermined timing, and an outline of the object from the gray image Means for creating a contour image to be shown, means for extracting an image of a stationary object that has not moved between the first contour image created last time and the second contour image created this time, and the second contour image Means for extracting the image of the moving part of the search object moved between this time and the image of the stationary object extracted this time, and only the image of the stationary object extracted this time that does not exist in the previously extracted stationary object image Means for extracting an existing portion as an image of a stop part of a search object, means for creating an image of a search area including the search object from the image of the moving part and stop part extracted this time, and search The image processing apparatus characterized by comprising a means for determining the image and presence and the movement of the search object by performing a matching process between the contour image and the template image created this range.
JP2001160780A 2001-05-29 2001-05-29 Image processing method and image processing apparatus using the same Expired - Fee Related JP4470342B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001160780A JP4470342B2 (en) 2001-05-29 2001-05-29 Image processing method and image processing apparatus using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001160780A JP4470342B2 (en) 2001-05-29 2001-05-29 Image processing method and image processing apparatus using the same

Publications (2)

Publication Number Publication Date
JP2002352239A JP2002352239A (en) 2002-12-06
JP4470342B2 true JP4470342B2 (en) 2010-06-02

Family

ID=19004144

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001160780A Expired - Fee Related JP4470342B2 (en) 2001-05-29 2001-05-29 Image processing method and image processing apparatus using the same

Country Status (1)

Country Link
JP (1) JP4470342B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4085844B2 (en) * 2003-03-03 2008-05-14 松下電工株式会社 Image processing device
JP4042602B2 (en) * 2003-03-26 2008-02-06 松下電工株式会社 Image processing device
JP4203648B2 (en) * 2003-09-01 2009-01-07 パナソニック電工株式会社 Image processing device
JP3906845B2 (en) * 2004-02-06 2007-04-18 日産自動車株式会社 Occupant detection apparatus and method
JP2005301719A (en) * 2004-04-13 2005-10-27 Nissan Motor Co Ltd Occupant detection apparatus and method
JP5058002B2 (en) 2008-01-21 2012-10-24 株式会社豊田中央研究所 Object detection device
JP6931290B2 (en) * 2017-03-03 2021-09-01 キヤノン株式会社 Image generator and its control method

Also Published As

Publication number Publication date
JP2002352239A (en) 2002-12-06

Similar Documents

Publication Publication Date Title
JP6650677B2 (en) Video processing apparatus, video processing method, and program
US10740906B2 (en) Unattended object monitoring device, unattended object monitoring system equipped with same, and unattended object monitoring method
JP6504156B2 (en) INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM
JP2013152669A (en) Image monitoring device
JP4470342B2 (en) Image processing method and image processing apparatus using the same
JPWO2018056355A1 (en) Monitoring device
Debard et al. Camera-based fall detection on real world data
US11348372B2 (en) Security management system
JPWO2020129176A1 (en) Image processing system, image processing method and image processing program
WO2016194402A1 (en) Image analysis device, image analysis method, and image analysis program
JP5470187B2 (en) Image processing apparatus and object detection apparatus
JP2004157879A (en) Object detection method
JP2010063033A (en) Apparatus and method for extracting object, and object extraction program
WO2016185738A1 (en) Image analysis device, image analysis method, and image analysis program
JP2003111063A (en) Intruding object tracking method and intruding object monitoring device
JP4875652B2 (en) Action recognition system and method
JP6866182B2 (en) Bed positioning device
JP6822326B2 (en) Watching support system and its control method
JP4096757B2 (en) Image tracking device
JP3230509B2 (en) Moving image processing device
JPWO2017029841A1 (en) Image analysis apparatus, image analysis method, and image analysis program
JP7802511B2 (en) Image processing device, image processing method, and program
JP2004295416A (en) Image processing apparatus
JP3417635B2 (en) Intruding object recognition method
JP6124739B2 (en) Image sensor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091106

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091117

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100118

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100209

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100222

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130312

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130312

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130312

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140312

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees