JP4825349B2 - Passing object counting device and counting method - Google Patents

Passing object counting device and counting method Download PDF

Info

Publication number
JP4825349B2
JP4825349B2 JP2000365662A JP2000365662A JP4825349B2 JP 4825349 B2 JP4825349 B2 JP 4825349B2 JP 2000365662 A JP2000365662 A JP 2000365662A JP 2000365662 A JP2000365662 A JP 2000365662A JP 4825349 B2 JP4825349 B2 JP 4825349B2
Authority
JP
Japan
Prior art keywords
image
passing
passing object
counting
plane
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
JP2000365662A
Other languages
Japanese (ja)
Other versions
JP2002170096A (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.)
Sumitomo Osaka Cement Co Ltd
Original Assignee
Sumitomo Osaka Cement Co 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 Sumitomo Osaka Cement Co Ltd filed Critical Sumitomo Osaka Cement Co Ltd
Priority to JP2000365662A priority Critical patent/JP4825349B2/en
Publication of JP2002170096A publication Critical patent/JP2002170096A/en
Application granted granted Critical
Publication of JP4825349B2 publication Critical patent/JP4825349B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、通過物体計数装置及び計数方法に関し、特にステレオ画像から通過物体を計数する通過物体計数装置及び計数方法に関するものである。
【0002】
【従来の技術】
2台の撮像装置により得られたステレオ画像から、計数線上での3次元情報を算出し、それを時間方向に並べた時の時空間画像を作成する。また同時に、計数線上での速度情報を算出し、それを時間方向に並べた時の時空間画像とを用いて、通過物体を計数していた。
【0003】
【発明が解決しようとする課題】
以上のような従来の通過物体計数装置によれば、次のような問題があった。まず通過物体計数装置は、2台の撮像装置でそれぞれ同時に撮影された2つの画像で対応点検出を行うことで算出した視差から、通過物体の3次元情報を算出する。次に2台の撮像装置のどちら一方で撮影された画像と、同撮像装置で撮影された時間的にずれた画像で対応点検出を行い、移動速度情報を算出する。このため3つの画像から2回の対応点検出を行わなくてはならないので、計算量が非常に多かった。
【0004】
そこで本発明は、計算量を減らし高速処理できる通過物体計数装置及び計数方法を提供することを目的としている。
【0005】
【課題を解決するための手段】
上記目的を達成するために、第1の態様の通過物体計数装置は、例えば図1に示すように、平面2に沿って平面2上の基準線1を通過する通過物体5を撮像する、平面2に対向して設けられた第1の撮像装置11と;第1の撮像装置11と並列に、且つ平面2に対向して設けられ、基準線1を通過する通過物体5を、第1の撮像装置11の撮像時点より所定の時間だけ遅らせて撮像する第2の撮像装置12と;第1の撮像装置11によって撮像された前記通過物体5の第1の画像と前記所定の時間だけ遅らせて第2の撮像装置12によって撮像された前記通過物体5の第2の画像とを比較して、通過物体5の平面2に交差する奥行方向の位置情報と基準線1に交差し平面2に平行な進行方向の速度情報を取得する比較演算部13とを備える。なお同じ進行方向について、進行の向きは正の向きと負の向きとがある。
【0006】
通過物体5が移動する面は、例えば図11に示すように、水平な平面に限らず斜面や階段のように傾斜した面2’であってもよい。但し、必要に応じて例えば図11(a)のような場合には、傾斜角度により位置情報と速度情報を補正する。
【0007】
また通過物体5の進行方向に交差する基準線1は、通過物体5の進行方向に垂直な線とするのがよい。また第1と第2の撮像装置は、並列に、基準線1と平行な方向に並べるのがよい。奥行方向は、典型的には平面に垂直な方向、又は鉛直方向である。
【0008】
このように構成すると、第1の撮像装置11によって撮像された通過物体5の第1の画像と所定の時間だけ遅らせて第2の撮像装置12によって撮像された通過物体5の第2の画像とを比較して、通過物体5の平面2に交差する奥行方向の位置情報と基準線1に交差し平面2に平行な進行方向の速度情報を取得する比較演算部とを備えるので、第1の画像と第2の画像から通過物体5の位置情報と速度情報を得ることができる。
【0009】
また第2の態様は第1の態様の通過物体計数装置10において、比較演算部13は、前記第1の画像と第2の画像との比較により、通過物体5上の部位の前記第1と第2の画像における位置を検出して、前記位置情報と前記速度情報とを含む情報を取得するように構成するとよい。
【0010】
このように構成すると、通過物体計数装置10は、2つの画像の比較により位置情報と速度情報とを含む情報を取得するので、位置情報と速度情報から通過物体の計数を効率よく行うことができ、処理の高速化が可能になる。
【0011】
前記目的を達成するために、第3の態様の通過物体計数方法は、例えば図3に示すように、平面に沿って該平面上の基準線を通過する通過物体を、前記平面に対向した第1の位置から、第1の時点に撮像して第1の画像を取得する第1の撮像工程S2と;前記基準線を通過する前記通過物体を、前記第1の時点から所定の時間だけ経過した第2の時点に、前記第1の位置と並列で、且つ前記平面に対向した第2の位置から撮像して第2の画像を取得する第2の撮像工程S3と;前記第1の画像と前記第2の画像とを比較して、前記通過物体の前記平面に交差する奥行方向の情報と前記基準線に交差し前記平面に平行な進行方向の速度を演算する比較演算工程S7、S10とを備える。
【0012】
このように構成すると、第1の画像と第2の画像とを比較して、通過物体の平面に交差する奥行方向の情報と基準線に交差し(典型的には垂直に交差し)平面に平行な進行方向の速度を演算する比較演算工程S7、S10を備えるので、通過物体の位置情報と速度情報を得ることができる。
【0013】
【発明の実施の形態】
以下、本発明の実施の形態について、図面を参照して説明する。なお、各図において互いに同一あるいは相当する部材には同一符号または類似符号を付し、重複した説明は省略する。
【0014】
図1は、本発明による実施の形態である通過物体計数装置10(以下適宜「計数装置10」という)の模式的斜視図である。図中通過物体5が平面である水平な通路2上を進行方向に移動している。XY軸を通路2内に置くように、直交座標系XYZがとられており、通路2はY軸と平行に延設されている。また通路2の延設方向と垂直即ちX軸と平行に基準線である計数線1がとられている。通過物体5の進行方向は、典型的には通路2の延設方向即ちY軸と平行である。通過物体5は、本実施の形態では人物である。また本実施の形態では、計数線1は通路2の延設方向と垂直としているが、特に垂直としなくてもよい。垂直でない場合は、X軸との角度で視差と速度を補正すればよい。計数線1は、この線を通過した通過物体5を計数するための基準線であり、仮想的な線であってもよく、実際に物理的に通路2に描く必要はない。
【0015】
一方、図中通路2の計数線1の鉛直方向上方には、通過物体である人物5が通過するのに十分な高さに、通路2の計数線1を通過する通過物体5を撮像するための第1の撮像装置11と第2の撮像装置12が設置されている。第1の撮像装置11と第2の撮像装置12は、適切な間隔をあけて並列に、計数線1と平行で且つ光軸がZ軸と平行になるように設置してある。ここでいう人物5が通過するのに十分な高さとは、例えば3000mm程度である。また、適切な間隔とは、例えば50mm程度である。
【0016】
図2を参照して、通過物体計数装置10の構成の一例を説明する。計数装置10は、第1の撮像装置としての第1のCCDカメラ11、第2の撮像装置としての第2のCCDカメラ12、比較演算部としてのパソコン13を含んで構成される。
【0017】
そして第1のCCDカメラ11、第2のCCDカメラ12は、パソコン13に接続されており、パソコン13は第1のCCDカメラ11、第2のCCDカメラ12によってそれぞれ撮像された画像を取得出来るように構成されている。
【0018】
パソコン13は、制御部14を備えており、計数装置10全体を制御している。制御部14には、撮像装置用インターフェイス15が接続されており、第1のCCDカメラ11、第2のCCDカメラ12は、撮像装置用インターフェイス15を介して制御部14に接続され、制御されている。
【0019】
また制御部14内には、CCDカメラにより撮像された画像を処理する画像処理部19、第1のCCDカメラにより撮像された第1の画像と、第2のCCDカメラにより撮像された第2の画像から対応点を求める対応点探索部20、通過物体5の3次元情報である高さを算出する3次元情報算出部21、通過物体5が計数線を通過する速度情報である速度を算出する速度情報算出部22、算出された3次元情報と速度情報とから通過物体5を計数する計数部23が備えられている。画像を処理するとは、例えば第1のCCDカメラ11、第2のCCDカメラ12からの撮像信号から第1の画像と第2の画像を取得することをいう。
【0020】
制御部14には、記憶部18が接続されており、第1のCCDカメラ11、第2のCCDカメラ12で撮像された画像や算出された情報等のデータが記憶できる。
【0021】
また制御部14には、計数装置10を操作するための情報を入力する入力装置16、計数装置10で処理された結果を出力する出力装置17が接続されている。入力装置16は例えばキーボードやマウスであり、出力装置17は例えばディスプレイやプリンタである。本図では、入力装置16、出力装置17はパソコン13に外付けするものとして図示されているが、内蔵されていてもよい。
【0022】
図3のフローを参照して、第1の実施の形態としての計数装置10の作用の一例を説明する。ここで、第1のCCDカメラ11で撮像された画像を左画像、第2のCCDカメラで撮像された画像を右画像として説明する。まずパソコン13の制御部14は、第1のCCDカメラ11、第2のCCDカメラ12で撮像された左画像、右画像を、撮像装置インターフェイス15を介してステレオ画像として取得する(ステップ1(図中「S1」と表示。以下同じ))。
【0023】
制御部14は、取得したステレオ画像から、制御部14内の画像処理部19によって、ある時間tに撮像された第1の画像であるtフレームの左画像を取得する(ステップ2)。また時点tよりΔt経過した時点t+Δtに撮像された第2の画像であるt+Δtフレームの右画像を取得する(ステップ3)。
【0024】
実際には、第1のCCDカメラと第2のCCDカメラとは同時並列的に各時点で撮像を行い、第1の画像として時点tの画像を、第2の画像として1フレーム以上ずらした時点t+Δtの画像を採用するようにしてもよい。このときΔtは、計数装置10の設定条件により適宜決めてよいが、あるフレームNが撮像されてから、次のフレームN+1が撮像されるまでの時間とすることが望ましい。即ち1フレームだけずらしたフレームを採用する。この時、Δtを1/30秒とすると、80m/minで歩く人物を撮像した場合、フレームN+1は、フレームNと比べて撮像された人物が約4.4cm進行方向に移動した画像となる。
【0025】
次に、tフレームの左画像のエッジ抽出を行い(ステップ4)、細線化する(ステップ5)。そして、tフレームの左画像の計数線1上のエッジ点を用いてt+Δtフレームの右画像の対応点探索を行なう(ステップ6)。エッジ抽出、細線化、対応点探索については、図5を参照してあとで詳しく説明する。
【0026】
対応点探索により得られた対応点から、3次元情報を算出する(ステップ7)。対応点から3次元情報を算出する方法は、図6、図7を参照してあとで説明する。ここで、背景除去によってあらかじめ非背景部分を規定しておき、その部分に対して、エッジ点における値を反映させるための線形補間を行なう(ステップ8)。これにより得られた3次元情報を時間方向に並べて、人物5の3次元情報を含む時空間画像を作成する(ステップ9)。ここで線形補間とは、例えば1つのエッジ点と、それに隣接するエッジ点の3次元座標を用いて、両エッジ点を直線で結ぶことにより、両エッジ点の間の点の3次元座標を得るようにするものである。
【0027】
同時に対応点から速度情報も算出し(ステップ10)、同様に線形補間を行う(ステップ11)。対応点から速度情報を算出する方法は、図6を参照してあとで説明する。
【0028】
次に最初のフレームを取得してからの経過時間であるTが、予め設定しておいた所定時間Tを経過したかを判断する(ステップ13)。Tが所定時間Tを経過していない場合は(ステップ13がN)、次のフレームを取得し、さらに時空間画像を時間方向に並べる。また、ステップ13の判断は、経過時間ではなく取得したフレーム数が所定のフレーム数に達した場合としてもよい。所定時間Tは、記憶装置の容量の制約で例えば20秒程度とすることが適当であるが、容量の制約を受けなければ例えば1時間以上としてもよい。ここで所定時間Tで得られた時空間画像をロット画面とよぶ。
【0029】
が所定時間Tを経過している場合すなわち1つのロット画面が得られたら(ステップ13がY)、そのロット画面内で、人物5の高さの最大値ZMAXから一般的なひざの高さZMINまで、一定の値例えば50mmずつ変化するZTHを用いて、ZTHを通る平面2に平行な平面で切断し(ステップ14)、その切断面の領域をラベリングする(ステップ15)。ここで領域とは、時空間画像上にある人物5の3次元情報を前述のZTHを通る平面で切断した際に、その平面上に存在する人物5の断面をいう。またラベリングとは、それぞれの領域を識別するための例えば番号や符号を付けることをいう。
【0030】
この時、ラベリングした領域に対応する速度でその領域の時空間画像上の面積値に重み付けをして空間画像上の面積値を算出する(ステップ16)。ここで面積値に速度で重み付けするのは、例えば通過速度の速い人は、通過速度と通過フレーム数は反比例するので、単に時空間画像で計算すると面積値が小さくなるためである。ここで、ZTHをZMAXからZMINまで変化させるので、例えば2人の人物5が非常に近接してすれ違った場合でも、頭部の切断面を得ることにより、2人の人物を区別することができる。
【0031】
これにより得られた面積値と予め設定された閾値とを比較して(ステップ17)、面積値が閾値より大きい場合は(ステップ17がY)、人物5が1人通過したものとして計数する(ステップ18)。またその領域が既に計数された領域であれば計数しない。このとき、その領域の速度により、通過した人物5の進行の向きを区別して、それを計数に反映させる(ステップ19)。また予め設定された閾値とは、典型的には計数しようとする人物5のうち最小人物の最大部分(例えば腹部)の断面積値である。そしてZTHがZMINより低い位置かを判断する(ステップ20)。
【0032】
面積値が閾値より小さい場合は(ステップ17がN)、計数せずにZTHがZMINより低い位置かを判断する(ステップ20)。ZTHがZMINより低い位置の場合(ステップ20がY)、次のロット画面に移る。ZTHがZMINより高い位置の場合(ステップ20がN)、ZTHを一定の値だけZMIN側(低い位置)に変化させ(ステップ21)、ステップ14に戻る。これにより、面積値の小さい通過物体は人物ではないと判断して計数しないので、人ではない手荷物などの通過物体を誤って計数してしまうことがない。
【0033】
図4のフローを参照して、第2の実施の形態としての計数装置10の作用の一例を説明する。まず第1の実施の形態と同様に、ステレオ画像を取得し(ステップ1)、tフレームの左画像と、t+Δtフレームの右画像とを取得する(ステップ2、3)。次に、tフレームの左画像のエッジ抽出を行い(ステップ4)、細線化し(ステップ5)、tフレームの左画像の計数線1上のエッジ点を用いてt+Δtフレームの右画像の対応点探索を行なう(ステップ6)。
【0034】
そして対応点探索により得られた対応点から、3次元情報を算出する(ステップ27)。ここで、背景除去によってあらかじめ非背景部分を規定しておき、その部分に対して、エッジ点における値を反映させるための線形補間を行なう(ステップ28)。同時に速度情報も算出し(ステップ29)、同様に線形補間を行う(ステップ30)。3次元情報及び速度情報を算出する方法は、図6、図7を参照してあとで説明する。
【0035】
次に算出された3次元情報に速度情報を乗じたものを時間方向に加え体積値を加算する(ステップ31)。体積値を算出する方法は、図8、図9を参照してあとで説明する。ここで3次元情報に速度情報を乗じて重み付けするのは、例えば通過速度の速い人物は、通過速度と通過フレーム数は反比例するので、単に時空間像で計算すると体積値が小さくなるためである。
【0036】
これにより得られた体積値と予め設定された閾値とを比較して(ステップ32)、体積値が閾値より大きい場合は(ステップ32がY)、人物5が1人通過したと判断して計数する(ステップ33)。このとき、前述で算出した速度情報を、通過した通過物体5の進行の向きとして反映させる(ステップ34)。また予め設定された閾値とは、典型的には計数すべき通過物体の最小体積値である。
【0037】
また、体積値が閾値より小さい場合は(ステップ32がN)、通過物体は、人物ではないと判断して計数せず、次のフレームを取得し、さらに体積値を加算する。これにより、人ではない手荷物などの通過物体や体積の無い通過物体の影を誤って計数してしまうことがない。
【0038】
このように第2の実施の形態によれば、第1の実施の形態では一定時間の時空間画像を作成したのに対して、通過物体の体積が一定値を越えたときに計数するので、一定時間の時空間画像を作成する必要がなく、処理の高速化が可能になる。
【0039】
図5を参照して、対応点探索についてさらに詳細に説明する。ここで、図示の各フレームでの通過物体として人物を、ハッチングにより表現しているが、これは断面を示しているものではなく、単に上方から撮像された人物を表現するものである。
【0040】
ここでは3次元情報および速度情報を求めるために、2枚の画像の対応点を求める。まず、tフレームの左画像と、t+Δtフレームの右画像での対応を求める。この際、近傍領域に特徴のない画素に関しては対応関係が明確に定まらない。そこで、以下のような流れで探索を行う。
【0041】
まず、tフレームの左画像のエッジ抽出を行い細線化した画像を求め、そのエッジ点においてのみ対応点探索を行う。エッジ抽出とは、濃淡で取得された画像から対象とする通過物体のエッジ点の集合である輪郭を抽出し、例えば座標で特定することをいう。また細線化とは、例えばエッジ抽出を行なった画像を、エッジ抽出で得られた通過物体の輪郭のみを細線で示した画像とするものである。
【0042】
対応点探索を行うには、まずtフレームの左画像の前記特定された輪郭上の点をエッジ点として選定し、濃淡画像上でそのエッジ点を含む近傍領域にウインドウを設定する。典型的には計数線上にあるエッジ点を選定する。エッジ点は典型的には前記細線と計数線との交点であり、通常は複数、典型的には10〜20点存在する。これら複数のエッジ点のうち、例えば最も左にある点をまず選定する。選定したエッジ点が中心になるようにウインドウを設定するとよい。そして前記設定されたウインドウを参照して、t+Δtフレームの右画像にウインドウを設定する。
【0043】
これらのウインドウについて、図10に示す式1を用いてtフレームの左画像とt+Δtフレームの右画像との濃淡値の相関をとる。ここで、I(i,j)とI(i,j)はそれぞれ左右画像上のウインドウ内の濃淡値であり、μ , μ , σ , σはそれぞれ左右ウインドウの濃淡値の平均及び分散である。Cは−1から+1までの範囲内の値をとる。選定された左画像のエッジ点に対して、右画像のウインドウを少しずつ、例えば計数線に平行に移動し、また計数線に直交する方向に移動しながら、各ウインドウでC値を計算する。このようにて求めたCのうち最大値を与える右画像のウインドウを、選定された左画像のウインドウに対応する局所領域とみなす。
【0044】
即ち、上記のように左右画像のウインドウの相関をとり、左画像で選定したエッジ点を含むウインドウと対応する(Cが最大となる)右画像のウインドウを探索する。この探索により得られた右画像のウインドウの中心が、先に選定した左画像のエッジ点に対応する右画像のエッジ点となる。
【0045】
ウインドウの探索は、例えば計数線と平行方向(X軸方向)と垂直方向(Y軸方向)に行う。例えば通過物体が人物である場合は、計数線と平行方向は後述のように左右画像間の視差と見るので、既に設定した左画像のウインドウを参照して、例えば高さが1m〜2mと算出される視差の幅を探索すればよい。垂直方向は、後述のように人物の移動量と見るので、既に設定した左画像のウインドウを参照して、時間Δt間に人物が移動すると予想される移動量の幅を探索すればよい。またCの値が、探索している方向に上昇傾向ならば、さらにCの値が最大となり、下降傾向に移るまで同じ探索方向に探索を継続し、下降傾向ならば、探索方向を変えるか、既に探索した範囲でCの値が最大となるウインドウを選択するようにしてもよい。
【0046】
このようにウインドウの探索を行えば、明らかに探索不要な部分の左右画像のウインドウの相関をとらなくてよいので、さらに計算量を減らすことができる。以上のようにして左画像に存在する全てのエッジ点について対応点の探索を行い、左右画像の対応するエッジ点を得る。
【0047】
図6を参照して、3次元情報と速度情報の算出についてさらに詳細に説明する。まず前述で得られた左右画像の対応するエッジ点同士を結ぶベクトルを考え、これを水平成分(X軸方向成分)と垂直成分(Y軸方向成分)に分離する。水平成分は、左右画像間の視差を表す量と見ることができ、この視差を用いて対象とする通過物体までの距離を算出することができる。対して、垂直成分は、注目点の通路に沿う方向の移動量と見ることができ、これを基に対象とする通過物体の速度情報を得ることができる。こうして、エッジ点における3次元情報である3次元高さ、速度情報である速度を対の形で一括して得ることができる。
【0048】
なお、1つの通過物体について得られた速度は、通常は等しいはずであるので、各エッジ点全てについて速度を求める必要はなく、例えば最も中心に近い点の速度を採用すればよい。または、各エッジ点の速度を求めて、突出した値を有するエッジ点は、探索に誤りがあったものとして再探索を行うか又はその点は不採用とするとよい。あるいは各エッジ点の速度を全て求めて、それらの平均値を計算し、その物体の速度として採用してもよい。
【0049】
また、後で説明する速度による重み付けは、各点毎の速度を用いてもよいし、平均値で求めた通過物体の速度を各点共通に用いてもよい。
【0050】
ここで左右画像は、Δtだけ時間的にずれた画像ではあるが、Δtが充分に小さい値であれば、左右画像には視差を求めるのに差支えるほどの差は生じない。逆にそのようにΔtを定めることにしてもよい。即ち視差を求めるのに差支えず、且つ速度情報を得るのに充分な長さとする。例えば、対象とする通過物体が歩行者の場合は1/60〜1/10秒程度、特に1/40〜1/20秒、さらに好ましくは約1/30秒とする。
【0051】
ここで、図7を参照して、対象とする通過物体の3次元情報としての平面からの高さzの算出方法について説明する。対象とする通過物体5までの距離aは、図10に示す式2を用いて算出することができる。ここで、wはCCDカメラ間距離(基線長)、fはCCDカメラの結像レンズを単一レンズとしたときそのレンズの焦点距離、dはCCDカメラの結像面上の視差である。ここでの焦点距離は、一般に用いられている組み合わせレンズを使用する場合は、その組み合わせレンズの焦点距離とする。また、CCDカメラの結像レンズから計数線1までの距離をhとすると、対象とする通過物体5の高さzは図10に示す式3で算出する。
【0052】
図8、図9を参照して、前述の方法によって各フレームで算出した通過物体の高さおよび速度を用いて、第2の実施の形態での計数を行う方法を説明する。ある位置xの、あるtフレームにおける物体の高さをz(x,t)、同じ位置、同じフレームにおける速度をv(x,t)とする。前述の対応点探索により、z(x,t)には高さ約0〜185cmに対応させた0〜255の値が、v(x,t)には速度約−12〜12km/hに対応させた−5〜5の値が求められている(図8(a))。
【0053】
次に、そのフレームの積zvを、X軸方向へ加算する。この総和、すなわち図10に示す式4は、あるフレームの3次元情報に、速度の重みを乗じた値(ある時点において単位時間に通過する体積)を意味している。直感的には、計数線を通過したときの人の時空間における断面積と見ることができるので、ここではこの値を「面積値」と呼ぶことにする(図8(b))。後に速度の向き別に計測する必要があるため、この加算の作業も、v(x,t)の正負すなわち通過する人物の進行の向きによって、加算する変数を図10に示す式5のように区別しておく。
【0054】
次に、各ラインで算出された面積値を時間方向に加算していく(図9−(a))。この和、すなわち図10に示す式6は、通過した人の体積を表すことになる。これをここでは「体積値」と呼ぶことにする(図9−(b))。フレーム間隔を一定に保っている限り、通過速度と通過フレーム数は反比例するので、速度の重みを考慮したこの加算によって、一人一人の通過から算出される体積値がある程度正規化される。即ち、3次元空間における真の体積値が求められる。
【0055】
図11を参照して、通過物体5が斜面を移動する場合を説明する。例えば階段や坂道などの傾斜した面2’を通過物体5が移動している場合、平面2は基準線1と第1、第2の撮像装置11、12を結ぶ線に垂直な仮想平面2とするのがよい。
【0056】
対象とする通過物体5が人物の場合は、斜面であっても鉛直方向に立つので、CCDカメラの光軸は鉛直方向に向ける(図11(a))。この場合は、仮想平面2は水平面となる。この例では、例えば傾斜した面2’と仮想平面2とのなす角をθとすると、仮想平面2からの通過物体5の高さを得るには、斜面2’を移動する通過物体5の時間Δtの移動量にtanθを乗じた値を、斜面2’を移動する通過物体5の算出された高さから引けばよい。
【0057】
また対象とする通過物体5が、例えば車の場合は、斜面をそのまま本発明の平面2としてよい。この場合、CCDカメラの光軸は斜面に垂直な方向に向ける(図11(b))。
【0058】
以上説明したように本発明の実施の形態によれば、2つの画像の比較により通過物体の高さ、速度が得られるので、従来と比較して通過物体を計数するのに必要な計算量を減らすことができる。
【0059】
【発明の効果】
以上のように本発明によれば、第1の撮像装置によって撮像された通過物体の第1の画像と所定の時間だけ遅らせて第2の撮像装置によって撮像された通過物体の第2の画像とを比較して、通過物体の平面に交差する奥行方向の位置情報と基準線に交差し平面に平行な進行方向の速度情報を取得する比較演算部とを備えるので、第1の画像と第2の画像から通過物体の位置情報と速度情報を得られ、計算量を減らし高速処理できる通過物体計数装置及び計数方法を提供することができる。
【図面の簡単な説明】
【図1】本発明の実施の形態である通過物体計数装置の概要を示す模式的斜視ブロック図である。
【図2】本発明の実施の形態である通過物体計数装置の構成例を示すブロック図である。
【図3】本発明の第1の実施の形態である通過物体計数装置の作用の一例あるいは本発明の実施の形態である通過物体計数方法を示すフローチャートである。
【図4】本発明の第2の実施の形態である通過物体計数装置の作用の一例あるいは本発明の実施の形態である通過物体計数方法を示すフローチャートである。
【図5】本発明の実施の形態で、第1の画像と第2の画像の対応点探索を行う場合の処理例を説明する画像図である。
【図6】図5の場合における、第1の画像と第2の画像の対応点を結ぶベクトルを説明する画像図である。
【図7】本発明の実施の形態で、第1の撮像装置と第2の撮像装置の視差から、通過物体の高さを算出する方法を説明する様式的正面図である。
【図8】本発明の実施の形態で、計数を行う方法を説明する様式的斜視図である。
【図9】図8の場合における、計数を行う方法を説明する様式的斜視図である。
【図10】本発明の実施の形態の説明で用いられる計算式を示す図である。
【図11】傾斜した面を移動する通過物体を計数する方法例として、仮想平面で計数する場合(a)と斜面をそのまま本発明の平面とする場合(b)を説明する図である。
【符号の説明】
1 計数線
2 通路
5 通過物体
10 通過物体計数装置
11 第1のCCDカメラ
12 第2のCCDカメラ
13 比較演算部
14 制御部
15 撮像装置用インターフェイス
16 入力装置
17 出力装置
18 記憶部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a passing object counting device and a counting method, and more particularly to a passing object counting device and a counting method for counting passing objects from a stereo image.
[0002]
[Prior art]
Three-dimensional information on the counting line is calculated from the stereo images obtained by the two imaging devices, and a spatio-temporal image is created when they are arranged in the time direction. At the same time, velocity information on the counting line is calculated, and passing objects are counted using a spatiotemporal image when the velocity information is arranged in the time direction.
[0003]
[Problems to be solved by the invention]
The conventional passing object counting apparatus as described above has the following problems. First, the passing object counting device calculates the three-dimensional information of the passing object from the parallax calculated by performing corresponding point detection on two images captured simultaneously by two imaging devices. Next, corresponding point detection is performed using an image captured by one of the two imaging devices and an image captured by the imaging device that is shifted in time, and movement speed information is calculated. For this reason, since the corresponding points must be detected twice from the three images, the amount of calculation is very large.
[0004]
Accordingly, an object of the present invention is to provide a passing object counting device and a counting method capable of reducing the amount of calculation and performing high speed processing.
[0005]
[Means for Solving the Problems]
In order to achieve the above object, the passing object counting device according to the first aspect images a passing object 5 passing through a reference line 1 on the plane 2 along the plane 2 as shown in FIG. The first imaging device 11 provided opposite to the first imaging device 11; the first imaging device 11 provided in parallel with the first imaging device 11 and opposed to the plane 2; A second imaging device 12 that captures an image delayed by a predetermined time from an imaging time point of the imaging device 11; a first image of the passing object 5 imaged by the first imaging device 11 and the predetermined time. Compared with the second image of the passing object 5 captured by the second imaging device 12, the position information in the depth direction intersecting the plane 2 of the passing object 5 and the reference line 1 intersect with the plane 2 in parallel. And a comparison operation unit 13 that acquires speed information in the advancing direction. For the same traveling direction, the traveling direction has a positive direction and a negative direction.
[0006]
For example, as shown in FIG. 11, the surface on which the passing object 5 moves is not limited to a horizontal plane, but may be a surface 2 'inclined like a slope or a staircase. However, for example, in the case of FIG. 11A, the position information and the speed information are corrected according to the inclination angle as necessary.
[0007]
The reference line 1 that intersects the traveling direction of the passing object 5 is preferably a line perpendicular to the traveling direction of the passing object 5. The first and second imaging devices are preferably arranged in parallel in a direction parallel to the reference line 1. The depth direction is typically a direction perpendicular to a plane or a vertical direction.
[0008]
With this configuration, the first image of the passing object 5 captured by the first imaging device 11 and the second image of the passing object 5 captured by the second imaging device 12 after being delayed by a predetermined time And a comparison operation unit that acquires position information in the depth direction that intersects the plane 2 of the passing object 5 and velocity information in the traveling direction that intersects the reference line 1 and is parallel to the plane 2. The position information and speed information of the passing object 5 can be obtained from the image and the second image.
[0009]
Further, according to the second aspect , in the passing object counting device 10 according to the first aspect , the comparison calculation unit 13 compares the first image with the second image, so that the first part of the part on the passing object 5 is compared. And a position in the second image may be detected to obtain information including the position information and the speed information.
[0010]
With this configuration, the passing object counting apparatus 10 acquires information including position information and speed information by comparing two images, and thus can efficiently count passing objects from the position information and speed information. The processing speed can be increased.
[0011]
In order to achieve the above object, a passing object counting method according to a third aspect includes, as shown in FIG. 3, for example, a passing object passing a reference line on a plane along a plane. A first imaging step S2 for capturing a first image from a position 1 to acquire a first image; and passing the passing object passing through the reference line for a predetermined time from the first time point. A second imaging step S3 for obtaining a second image by imaging from a second position parallel to the first position and facing the plane at the second time point; And the second image, and the comparison calculation steps S7 and S10 for calculating the depth direction information intersecting the plane of the passing object and the traveling direction velocity intersecting the reference line and parallel to the plane. With.
[0012]
If comprised in this way, the 1st image and the 2nd image will be compared, the information of the depth direction which cross | intersects the plane of a passing object, and the reference line will be crossed (typically perpendicularly crossing), Since the comparison calculation steps S7 and S10 for calculating the speed in the parallel traveling direction are provided, the position information and speed information of the passing object can be obtained.
[0013]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings. In addition, in each figure, the same code | symbol or a similar code | symbol is attached | subjected to the mutually same or equivalent member, and the overlapping description is abbreviate | omitted.
[0014]
FIG. 1 is a schematic perspective view of a passing object counting device 10 (hereinafter referred to as “counting device 10” as appropriate) according to an embodiment of the present invention. In the figure, the passing object 5 moves in the traveling direction on a horizontal passage 2 which is a plane. An orthogonal coordinate system XYZ is taken so that the XY axis is placed in the passage 2, and the passage 2 extends in parallel with the Y axis. Further, a counting line 1 which is a reference line is taken perpendicular to the extending direction of the passage 2, that is, parallel to the X axis. The traveling direction of the passing object 5 is typically parallel to the extending direction of the passage 2, that is, the Y axis. The passing object 5 is a person in the present embodiment. In the present embodiment, the counting line 1 is perpendicular to the extending direction of the passage 2, but it does not have to be particularly perpendicular. If it is not vertical, the parallax and the speed may be corrected by the angle with the X axis. The counting line 1 is a reference line for counting the passing objects 5 that have passed through this line, and may be a virtual line, and does not need to be physically drawn in the path 2.
[0015]
On the other hand, in order to image the passing object 5 passing through the counting line 1 of the passage 2 above the counting line 1 of the passage 2 in the figure in a vertical direction above the counting line 1 of the passage 2 at a height sufficient to pass the person 5 as a passing object. The first imaging device 11 and the second imaging device 12 are installed. The first imaging device 11 and the second imaging device 12 are installed in parallel at an appropriate interval so that they are parallel to the counting line 1 and the optical axis is parallel to the Z axis. The height sufficient for the person 5 to pass here is, for example, about 3000 mm. Further, the appropriate interval is, for example, about 50 mm.
[0016]
An example of the configuration of the passing object counting device 10 will be described with reference to FIG. The counting device 10 includes a first CCD camera 11 as a first imaging device, a second CCD camera 12 as a second imaging device, and a personal computer 13 as a comparison operation unit.
[0017]
The first CCD camera 11 and the second CCD camera 12 are connected to a personal computer 13 so that the personal computer 13 can acquire images captured by the first CCD camera 11 and the second CCD camera 12, respectively. It is configured.
[0018]
The personal computer 13 includes a control unit 14 and controls the counting device 10 as a whole. An imaging device interface 15 is connected to the control unit 14, and the first CCD camera 11 and the second CCD camera 12 are connected to the control unit 14 via the imaging device interface 15 and controlled. Yes.
[0019]
Further, in the control unit 14, an image processing unit 19 that processes an image captured by the CCD camera, a first image captured by the first CCD camera, and a second image captured by the second CCD camera. Corresponding point search unit 20 for obtaining corresponding points from the image, three-dimensional information calculation unit 21 for calculating the height that is the three-dimensional information of the passing object 5, and speed that is the speed information for the passing object 5 to pass the counting line. A velocity information calculation unit 22 and a counting unit 23 that counts the passing object 5 from the calculated three-dimensional information and velocity information are provided. Processing the image means obtaining the first image and the second image from the imaging signals from the first CCD camera 11 and the second CCD camera 12, for example.
[0020]
A storage unit 18 is connected to the control unit 14 and can store data such as images captured by the first CCD camera 11 and the second CCD camera 12 and calculated information.
[0021]
Further, an input device 16 for inputting information for operating the counting device 10 and an output device 17 for outputting a result processed by the counting device 10 are connected to the control unit 14. The input device 16 is, for example, a keyboard or a mouse, and the output device 17 is, for example, a display or a printer. Although the input device 16 and the output device 17 are illustrated as externally attached to the personal computer 13 in this figure, they may be built in.
[0022]
An example of the operation of the counting device 10 as the first embodiment will be described with reference to the flow in FIG. Here, an image captured by the first CCD camera 11 is described as a left image, and an image captured by the second CCD camera is described as a right image. First, the control unit 14 of the personal computer 13 acquires the left image and the right image captured by the first CCD camera 11 and the second CCD camera 12 as a stereo image via the imaging device interface 15 (step 1 (FIG. 1). Middle “S1” (the same applies hereinafter)).
[0023]
The control unit 14 acquires the left image of the t frame, which is the first image captured at a certain time t, by the image processing unit 19 in the control unit 14 from the acquired stereo image (step 2). Further, a right image of the t + Δt frame, which is a second image captured at time t + Δt after Δt has elapsed from time t, is acquired (step 3).
[0024]
Actually, the first CCD camera and the second CCD camera pick up images at each time point simultaneously and in parallel, and the time point t as the first image is shifted by one frame or more as the second image. You may make it employ | adopt the image of t + (DELTA) t. At this time, Δt may be appropriately determined according to the setting conditions of the counting device 10, but it is desirable that Δt be the time from when a certain frame N is imaged until the next frame N + 1 is imaged. That is, a frame shifted by one frame is employed. At this time, when Δt is set to 1/30 seconds, when a person walking at 80 m / min is imaged, the frame N + 1 is an image in which the imaged person moves in the traveling direction of about 4.4 cm compared to the frame N.
[0025]
Next, edge extraction of the left image of t frame is performed (step 4), and it thins (step 5). Then, the corresponding point search of the right image of t + Δt frame is performed using the edge points on the counting line 1 of the left image of t frame (step 6). Edge extraction, thinning, and corresponding point search will be described in detail later with reference to FIG.
[0026]
Three-dimensional information is calculated from the corresponding points obtained by the corresponding point search (step 7). A method of calculating the three-dimensional information from the corresponding points will be described later with reference to FIGS. Here, a non-background portion is defined in advance by background removal, and linear interpolation is performed on the portion to reflect the value at the edge point (step 8). The three-dimensional information obtained in this manner is arranged in the time direction to create a spatiotemporal image including the three-dimensional information of the person 5 (step 9). Here, the linear interpolation is, for example, using the three-dimensional coordinates of one edge point and the edge points adjacent to the edge point to connect the two edge points with a straight line, thereby obtaining the three-dimensional coordinates of the point between the two edge points. It is what you want to do.
[0027]
At the same time, speed information is calculated from the corresponding points (step 10), and linear interpolation is performed in the same manner (step 11). A method for calculating the speed information from the corresponding points will be described later with reference to FIG.
[0028]
Next, it is determined whether T 1 , which is an elapsed time since the first frame is acquired, has passed a preset time T 0 (step 13). If T 1 has not passed the predetermined time T 0 (N in step 13), the next frame is acquired, and the spatiotemporal images are arranged in the time direction. The determination in step 13 may be made when the acquired number of frames reaches a predetermined number of frames instead of the elapsed time. The predetermined time T 0 is suitably about 20 seconds, for example, due to the capacity limitation of the storage device, but may be one hour or longer, for example, if not limited by the capacity. Here spatiotemporal image obtained at a predetermined time T 0 is referred to as the Batch screen.
[0029]
When T 1 has passed the predetermined time T 0 , that is, when one lot screen is obtained (Step 13 is Y), a general knee is determined from the maximum height Z MAX of the person 5 in the lot screen. up height Z MIN, using Z TH that varies by a certain value for example 50 mm, cut with a plane parallel to the plane 2 through the Z TH (step 14), labeling area of the cut surface (step 15 ). Here, the region refers to a cross section of the person 5 existing on the plane when the three-dimensional information of the person 5 on the spatiotemporal image is cut along the plane passing through the ZTH . Labeling refers to attaching a number or a code for identifying each region.
[0030]
At this time, the area value on the space image is calculated by weighting the area value on the spatio-temporal image of the area at a speed corresponding to the labeled area (step 16). The reason why the area value is weighted by speed is that, for example, for a person with a high passing speed, the passing speed and the number of passing frames are inversely proportional to each other. Here, since Z TH is changed from Z MAX to Z MIN , for example, even when two persons 5 pass very close to each other, the two persons are distinguished by obtaining a cut surface of the head. be able to.
[0031]
The area value thus obtained is compared with a preset threshold value (step 17). When the area value is larger than the threshold value (step 17 is Y), it is counted that one person 5 has passed ( Step 18). If the area has already been counted, no counting is performed. At this time, the direction of travel of the person 5 who has passed is distinguished by the speed of the area and reflected in the count (step 19). The preset threshold is typically the cross-sectional area value of the maximum portion (for example, the abdomen) of the smallest person among the persons 5 to be counted. It is then determined whether Z TH is lower than Z MIN (step 20).
[0032]
When the area value is smaller than the threshold value (step 17 is N), it is determined whether Z TH is lower than Z MIN without counting (step 20). When Z TH is lower than Z MIN (step 20 is Y), the next lot screen is displayed. If Z TH is at a position higher than Z MIN (step 20 is N), Z TH is changed to the Z MIN side (low position) by a certain value (step 21), and the process returns to step 14. As a result, a passing object with a small area value is determined not to be a person and is not counted, so that a passing object such as baggage that is not a person is not erroneously counted.
[0033]
With reference to the flow of FIG. 4, an example of an effect | action of the counting apparatus 10 as 2nd Embodiment is demonstrated. First, as in the first embodiment, a stereo image is acquired (step 1), and a left image of t frame and a right image of t + Δt frame are acquired (steps 2 and 3). Next, edge extraction of the left image of the t frame is performed (step 4), thinning is performed (step 5), and the corresponding points of the right image of the t + Δt frame are searched using the edge points on the counting line 1 of the left image of the t frame. (Step 6).
[0034]
Then, three-dimensional information is calculated from the corresponding points obtained by the corresponding point search (step 27). Here, a non-background portion is defined in advance by background removal, and linear interpolation is performed on the portion to reflect the value at the edge point (step 28). At the same time, speed information is calculated (step 29), and linear interpolation is performed in the same manner (step 30). A method for calculating the three-dimensional information and the speed information will be described later with reference to FIGS.
[0035]
Next, the calculated three-dimensional information multiplied by speed information is added in the time direction and the volume value is added (step 31). A method for calculating the volume value will be described later with reference to FIGS. Here, the reason why the three-dimensional information is weighted by multiplying the speed information is that, for example, a person with a high passing speed is inversely proportional to the passing speed and the number of passing frames. .
[0036]
The volume value thus obtained is compared with a preset threshold value (step 32), and if the volume value is larger than the threshold value (step 32 is Y), it is determined that one person 5 has passed and counted. (Step 33). At this time, the speed information calculated above is reflected as the direction of travel of the passing object 5 that has passed (step 34). The preset threshold is typically the minimum volume value of the passing object to be counted.
[0037]
If the volume value is smaller than the threshold value (N in step 32), the passing object is determined not to be a person and is not counted, the next frame is acquired, and the volume value is added. As a result, the shadows of passing objects such as baggage that are not people or passing objects having no volume are not counted erroneously.
[0038]
As described above, according to the second embodiment, the spatio-temporal image of a certain time is created in the first embodiment, but the counting is performed when the volume of the passing object exceeds a certain value. There is no need to create a spatio-temporal image for a fixed time, and the processing speed can be increased.
[0039]
The corresponding point search will be described in more detail with reference to FIG. Here, although a person is expressed by hatching as a passing object in each illustrated frame, this does not indicate a cross section but merely represents a person imaged from above.
[0040]
Here, in order to obtain three-dimensional information and velocity information, corresponding points of two images are obtained. First, the correspondence between the left image of t frame and the right image of t + Δt frame is obtained. At this time, the correspondence relationship is not clearly determined for pixels having no feature in the neighboring region. Therefore, the search is performed according to the following flow.
[0041]
First, edge extraction of the left image of t frame is performed to obtain a thinned image, and corresponding point search is performed only at the edge point. Edge extraction refers to extracting a contour, which is a set of edge points of a target passing object, from an image acquired with shading and specifying the coordinates, for example, with coordinates. Thinning refers to, for example, converting an image obtained by edge extraction into an image in which only the outline of a passing object obtained by edge extraction is indicated by a thin line.
[0042]
In order to perform the corresponding point search, first, a point on the specified outline of the left image of the t frame is selected as an edge point, and a window is set in a neighborhood region including the edge point on the grayscale image. Typically, an edge point on the counting line is selected. An edge point is typically an intersection of the fine line and the count line, and usually there are a plurality of edge points, typically 10 to 20 points. For example, the leftmost point among the plurality of edge points is first selected. The window may be set so that the selected edge point is the center. Then, the window is set to the right image of the t + Δt frame with reference to the set window.
[0043]
For these windows, the correlation between the gray values of the left image of the t frame and the right image of the t + Δt frame is obtained using Equation 1 shown in FIG. Here, I L (i, j) and I R (i, j) are the gray values in the windows on the left and right images, respectively, and μ L , μ R , σ L , and σ R are the gray values in the left and right windows, respectively. Mean and variance. C takes a value within a range from −1 to +1. The C value is calculated in each window while moving the window of the right image little by little with respect to the selected edge point of the left image, for example, parallel to the count line and moving in the direction orthogonal to the count line. The window of the right image that gives the maximum value among C obtained in this way is regarded as a local region corresponding to the selected window of the left image.
[0044]
That is, the left and right image windows are correlated as described above, and the right image window corresponding to the window including the edge point selected in the left image (C is maximized) is searched. The center of the window of the right image obtained by this search becomes the edge point of the right image corresponding to the edge point of the left image selected previously.
[0045]
The search for the window is performed, for example, in a direction parallel to the count line (X-axis direction) and a vertical direction (Y-axis direction). For example, when the passing object is a person, the direction parallel to the counting line is regarded as a parallax between the left and right images as will be described later, so the height is calculated to be 1 m to 2 m, for example, with reference to the window of the left image that has already been set. What is necessary is just to search the width | variety of the parallax to be performed. Since the vertical direction is regarded as the movement amount of the person as will be described later, the width of the movement amount that the person is expected to move during the time Δt may be searched with reference to the window of the left image that has already been set. If the value of C is increasing in the direction of search, the value of C is further maximized, and the search is continued in the same search direction until the downward trend is reached. You may make it select the window where the value of C becomes the maximum in the already searched range.
[0046]
If the window search is performed in this way, it is not necessary to correlate the windows of the left and right images of the part that clearly does not need to be searched, so that the amount of calculation can be further reduced. As described above, the corresponding points are searched for all the edge points existing in the left image, and the corresponding edge points of the left and right images are obtained.
[0047]
The calculation of the three-dimensional information and the speed information will be described in more detail with reference to FIG. First, a vector connecting corresponding edge points of the left and right images obtained above is considered, and this is separated into a horizontal component (X-axis direction component) and a vertical component (Y-axis direction component). The horizontal component can be viewed as an amount representing the parallax between the left and right images, and the distance to the target passing object can be calculated using this parallax. On the other hand, the vertical component can be regarded as the amount of movement of the attention point in the direction along the path, and based on this, the speed information of the passing object can be obtained. In this way, the three-dimensional height, which is the three-dimensional information at the edge point, and the speed, which is the velocity information, can be collectively obtained in pairs.
[0048]
Since the speeds obtained for one passing object should normally be equal, it is not necessary to obtain the speeds for all the edge points. For example, the speed of the point closest to the center may be adopted. Alternatively, the speed of each edge point is obtained, and an edge point having a protruding value may be re-searched as a search error, or the point may be rejected. Or you may obtain | require all the speed | velocity | rate of each edge point, calculate those average values, and may employ | adopt as the speed | velocity | rate of the object.
[0049]
Further, the weighting by speed described later may use the speed for each point, or may use the speed of the passing object obtained by the average value in common for each point.
[0050]
Here, the left and right images are images that are shifted in time by Δt. However, if Δt is a sufficiently small value, the left and right images do not have a difference enough to support parallax. Conversely, Δt may be determined as such. That is, the length is sufficient to obtain the speed information without any problem for obtaining the parallax. For example, when the target passing object is a pedestrian, it is set to about 1/60 to 1/10 seconds, particularly 1/40 to 1/20 seconds, and more preferably about 1/30 seconds.
[0051]
Here, with reference to FIG. 7, the calculation method of the height z from the plane as the three-dimensional information of the passing object to be processed will be described. The distance a to the target passing object 5 can be calculated using Expression 2 shown in FIG. Here, w is the distance between the CCD cameras (baseline length), f is the focal length of the CCD camera when the imaging lens of the CCD camera is a single lens, and d is the parallax on the imaging surface of the CCD camera. The focal length here is the focal length of the combination lens when a commonly used combination lens is used. When the distance from the imaging lens of the CCD camera to the counting line 1 is h, the height z of the target passing object 5 is calculated by Equation 3 shown in FIG.
[0052]
With reference to FIG. 8 and FIG. 9, a method of performing counting in the second embodiment using the height and speed of the passing object calculated in each frame by the above-described method will be described. Assume that the height of an object at a certain position x in a certain t frame is z (x, t), and the velocity at the same position and the same frame is v (x, t). According to the corresponding point search described above, z (x, t) corresponds to a value of 0 to 255 corresponding to a height of about 0 to 185 cm, and v (x, t) corresponds to a speed of about −12 to 12 km / h. A value of -5 to 5 is obtained (FIG. 8A).
[0053]
Next, the product zv of the frames is added in the X-axis direction. This sum, that is, Expression 4 shown in FIG. 10, means a value obtained by multiplying the three-dimensional information of a certain frame by the weight of speed (volume passing through a unit time at a certain point in time). Intuitively, it can be viewed as a cross-sectional area in a person's space-time when passing through the counting line, so this value will be referred to as an “area value” (FIG. 8B). Since it is necessary to measure separately according to the direction of the speed later, this addition work is also performed according to the positive / negative sign of v (x, t), that is, the variable to be added as shown in Expression 5 shown in FIG. I'll keep it separate.
[0054]
Next, the area values calculated for each line are added in the time direction (FIG. 9A). This sum, that is, Equation 6 shown in FIG. 10, represents the volume of the person who has passed. This is referred to herein as “volume value” (FIG. 9- (b)). As long as the frame interval is kept constant, the passing speed and the number of passing frames are inversely proportional. Therefore, the volume value calculated from the passing of each person is normalized to some extent by this addition in consideration of the weight of the speed. That is, the true volume value in the three-dimensional space is obtained.
[0055]
A case where the passing object 5 moves on the slope will be described with reference to FIG. For example, when the passing object 5 is moving on an inclined surface 2 ′ such as a staircase or a slope, the plane 2 is a virtual plane 2 perpendicular to the line connecting the reference line 1 and the first and second imaging devices 11 and 12. It is good to do.
[0056]
When the target passing object 5 is a person, it stands in the vertical direction even if it is a slope, so the optical axis of the CCD camera is directed in the vertical direction (FIG. 11A). In this case, the virtual plane 2 is a horizontal plane. In this example, for example, when the angle formed between the inclined surface 2 ′ and the virtual plane 2 is θ, the time of the passing object 5 moving on the inclined surface 2 ′ is obtained in order to obtain the height of the passing object 5 from the virtual plane 2. A value obtained by multiplying the amount of movement of Δt by tan θ may be subtracted from the calculated height of the passing object 5 moving on the slope 2 ′.
[0057]
If the target passing object 5 is, for example, a car, the slope may be used as it is as the plane 2 of the present invention. In this case, the optical axis of the CCD camera is directed in a direction perpendicular to the inclined surface (FIG. 11B).
[0058]
As described above, according to the embodiment of the present invention, the height and speed of a passing object can be obtained by comparing two images, so that the amount of calculation required for counting passing objects compared to the conventional method is reduced. Can be reduced.
[0059]
【The invention's effect】
As described above, according to the present invention, the first image of the passing object imaged by the first imaging device and the second image of the passing object imaged by the second imaging device delayed by a predetermined time And a comparison operation unit that acquires position information in the depth direction that intersects the plane of the passing object and velocity information in the traveling direction that intersects the reference line and is parallel to the plane, the first image and the second It is possible to obtain the passing object position information and the speed information from the image, and to provide a passing object counting apparatus and counting method capable of reducing the amount of calculation and processing at high speed.
[Brief description of the drawings]
FIG. 1 is a schematic perspective block diagram showing an outline of a passing object counting apparatus according to an embodiment of the present invention.
FIG. 2 is a block diagram showing a configuration example of a passing object counting apparatus according to an embodiment of the present invention.
FIG. 3 is a flowchart showing an example of the operation of the passing object counting apparatus according to the first embodiment of the present invention or the passing object counting method according to the embodiment of the present invention.
FIG. 4 is a flowchart showing an example of the operation of a passing object counting device according to a second embodiment of the present invention or a passing object counting method according to an embodiment of the present invention.
FIG. 5 is an image diagram for explaining a processing example when searching for corresponding points between the first image and the second image in the embodiment of the present invention.
6 is an image diagram for explaining a vector connecting corresponding points of the first image and the second image in the case of FIG. 5. FIG.
FIG. 7 is a stylized front view for explaining a method of calculating the height of a passing object from parallax between the first imaging device and the second imaging device in the embodiment of the present invention.
FIG. 8 is a stylized perspective view illustrating a method of performing counting in the embodiment of the present invention.
FIG. 9 is a stylized perspective view for explaining a counting method in the case of FIG. 8;
FIG. 10 is a diagram showing a calculation formula used in the description of the embodiment of the present invention.
FIGS. 11A and 11B are diagrams illustrating a case where counting is performed on a virtual plane (a) and a case where a slope is directly used as a plane of the present invention (b) as an example of a method of counting passing objects moving on an inclined surface.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Count line 2 Path | passage 5 Passing object 10 Passing object counting device 11 1st CCD camera 12 2nd CCD camera 13 Comparison calculating part 14 Control part 15 Interface 16 for imaging devices Input device 17 Output device 18 Memory | storage part

Claims (4)

平面に沿って該平面上の基準線を通過する通過物体を撮像する、前記平面に対向して設けられた第1の撮像装置と;
前記第1の撮像装置と並列に、且つ前記平面に対向して設けられ、前記基準線を通過する前記通過物体を、前記第1の撮像装置の撮像時点より所定の時間だけ遅らせて撮像する第2の撮像装置と;
前記第1の撮像装置によって撮像された前記通過物体の第1の画像と前記所定の時間だけ遅らせて前記第2の撮像装置によって撮像された前記通過物体の第2の画像を取得する画像処理部と;
前記第1の画像と前記第2の画像の対応点を求める対応点探索部と;
前記対応点を用いて、前記通過物体の前記基準線に交差し前記平面に平行な進行方向の速度を算出する速度情報算出部
前記対応点を用いて、前記第1と第2の画像間の視差を表す量から前記通過物体の前記平面に交差する奥行方向の位置情報を算出する3次元情報算出部
前記速度と前記位置情報を用いて、前記通過物体を計数する計数部とを備える;
通過物体計数装置。
A first imaging device provided to face the plane, which images a passing object passing through a reference line on the plane along the plane;
The first imaging device is provided in parallel with the first imaging device and opposed to the plane, and images the passing object passing through the reference line with a delay of a predetermined time from the imaging time of the first imaging device. Two imaging devices;
An image processing unit that acquires a second image of the passing object imaged by the second imaging device with a delay of the predetermined time from the first image of the passing object imaged by the first imaging device. When;
A corresponding point search unit for determining corresponding points between the first image and the second image;
A velocity information calculation unit that calculates a velocity in a traveling direction that intersects the reference line of the passing object and is parallel to the plane using the corresponding points ;
A three-dimensional information calculation unit that calculates position information in the depth direction intersecting the plane of the passing object from the amount representing the parallax between the first and second images using the corresponding points ;
A counting unit that counts the passing object using the velocity and the position information ;
Passing object counting device.
前記計数部は、前記位置情報を時間方向に並べて作成された時空間画像上の前記対象物について、前記位置情報の一定の値を通り前記平面に平行な面で切断した断面積値に前記速度で重み付けした値と、予め設定された閾値とを比較して、前記重み付けした値が閾値よりも大きい場合に、前記通過物体を計数する、
請求項1に記載の通過物体計数装置。
The counting unit has the cross-sectional area value obtained by cutting the object on the spatio-temporal image created by arranging the position information in the time direction through a plane passing through a certain value of the position information and parallel to the plane. Comparing the weighted value with a preset threshold value, and counting the passing object when the weighted value is larger than the threshold value,
The passing object counting device according to claim 1.
前記計数部は、前記速度と前記位置情報を乗じたものを時間方向に加算して得られた体積値と、予め設定された閾値とを比較して、前記体積値が閾値よりも大きい場合に前記通過物体を計数する、The counting unit compares the volume value obtained by multiplying the velocity multiplied by the position information in the time direction with a preset threshold value, and the volume value is larger than the threshold value. Counting the passing objects;
請求項1に記載の通貨物体計数装置。The currency object counting device according to claim 1.
平面に沿って該平面上の基準線を通過する通過物体を、前記平面に対向した第1の位置から、第1の時点に撮像して第1の画像を取得する第1の撮像工程と;
前記基準線を通過する前記通過物体を、前記第1の時点から所定の時間だけ経過した第2の時点に、前記第1の位置と並列で、且つ前記平面に対向した第2の位置から撮像して第2の画像を取得する第2の撮像工程と;
前記第1の画像と前記第2の画像を取得する画像処理工程と;
前記第1の画像と前記第2の画像の対応点を求める対応点探索工程と;
前記対応点を用いて、前記通過物体の前記基準線に交差し前記平面に平行な進行方向の速度を算出する速度情報算出工程
前記対応点を用いて、前記第1と第2の画像間の視差を表す量から前記通過物体の前記平面に交差する奥行方向の位置情報を算出する3次元情報算出工程
前記速度と前記位置情報を用いて、前記通過物体を計数する計数工程とを備える;
通過物体計数方法。
A first imaging step of acquiring a first image by imaging a passing object passing through a reference line on the plane along a plane from a first position facing the plane at a first time point;
The passing object passing through the reference line is imaged from a second position parallel to the first position and facing the plane at a second time point after a lapse of a predetermined time from the first time point. And a second imaging step of acquiring a second image;
An image processing step of acquiring the first image and the second image;
A corresponding point search step for obtaining corresponding points between the first image and the second image;
A velocity information calculation step of calculating a velocity in a traveling direction that intersects the reference line of the passing object and is parallel to the plane using the corresponding points ;
A three-dimensional information calculation step of calculating position information in the depth direction intersecting the plane of the passing object from the amount representing the parallax between the first and second images using the corresponding points ;
A counting step of counting the passing object using the velocity and the position information ;
Passing object counting method.
JP2000365662A 2000-11-30 2000-11-30 Passing object counting device and counting method Expired - Fee Related JP4825349B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000365662A JP4825349B2 (en) 2000-11-30 2000-11-30 Passing object counting device and counting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000365662A JP4825349B2 (en) 2000-11-30 2000-11-30 Passing object counting device and counting method

Publications (2)

Publication Number Publication Date
JP2002170096A JP2002170096A (en) 2002-06-14
JP4825349B2 true JP4825349B2 (en) 2011-11-30

Family

ID=18836395

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000365662A Expired - Fee Related JP4825349B2 (en) 2000-11-30 2000-11-30 Passing object counting device and counting method

Country Status (1)

Country Link
JP (1) JP4825349B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4633942B2 (en) * 2001-01-05 2011-02-16 住友大阪セメント株式会社 Passing object counting method and counting apparatus
JP3787783B2 (en) * 2003-09-02 2006-06-21 松下電器産業株式会社 Object traveling direction detection method
JP2007025966A (en) * 2005-07-14 2007-02-01 Konica Minolta Photo Imaging Inc Image processing method, image processor and image processing program
JP5075672B2 (en) * 2008-02-25 2012-11-21 株式会社東芝 Object detection apparatus and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3490466B2 (en) * 1992-02-21 2004-01-26 株式会社東芝 Image monitoring device and elevator control device using the image monitoring device

Also Published As

Publication number Publication date
JP2002170096A (en) 2002-06-14

Similar Documents

Publication Publication Date Title
US11360571B2 (en) Information processing device and method, program and recording medium for identifying a gesture of a person from captured image data
US7729512B2 (en) Stereo image processing to detect moving objects
US7660436B2 (en) Stereo-vision based imminent collision detection
JP5127531B2 (en) Image monitoring device
CN106250850A (en) Face datection tracking and device, robot head method for controlling rotation and system
US20040213460A1 (en) Method of human figure contour outlining in images
EP2309454B1 (en) Apparatus and method for detecting motion
JP2012108785A (en) Person counting device, person counting method, and person counting program
JP2003098424A (en) Range finder based on image processing
JPH1166319A (en) Method and device for detecting traveling object, method and device for recognizing traveling object, and method and device for detecting person
US20100259597A1 (en) Face detection apparatus and distance measurement method using the same
JP2010057105A (en) Three-dimensional object tracking method and system
JP4235018B2 (en) Moving object detection apparatus, moving object detection method, and moving object detection program
JP4825349B2 (en) Passing object counting device and counting method
KR101205565B1 (en) Method for Dectecting Front and Rear Vehicle by Using Image
JP5448952B2 (en) Same person determination device, same person determination method, and same person determination program
JP4825350B2 (en) Passing object counting device and counting method
JP2005140754A (en) Method of detecting person, monitoring system, and computer program
JP4633942B2 (en) Passing object counting method and counting apparatus
JP4314929B2 (en) Motion detection device
JP2006010652A (en) Object-detecting device
KR101895678B1 (en) Efficient Search Window Set-Up Method for the Automotive Image Recognition System
KR102485317B1 (en) System and Method for Detecting Obstacle on the basis of motion information
JP2000331172A (en) Facial image processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070808

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100316

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100420

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100621

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110614

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110811

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140916

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees