JP2019068339A - Image processing apparatus, image processing method, and program - Google Patents
Image processing apparatus, image processing method, and program Download PDFInfo
- Publication number
- JP2019068339A JP2019068339A JP2017193938A JP2017193938A JP2019068339A JP 2019068339 A JP2019068339 A JP 2019068339A JP 2017193938 A JP2017193938 A JP 2017193938A JP 2017193938 A JP2017193938 A JP 2017193938A JP 2019068339 A JP2019068339 A JP 2019068339A
- Authority
- JP
- Japan
- Prior art keywords
- unit
- detection line
- image processing
- imaging
- processing apparatus
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、画像処理装置、画像処理方法およびプログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and a program.
従来、監視カメラで撮像された画像を解析することで、画像内の人数をカウントする方法が知られている。
例えば、特許文献1は、画像解析により撮像画像内の人体を検出する技術を開示する。具体的には、特許文献1の技術では、エッジ背景差分画像を生成し、移動物体のみのエッジを検出し、時間的に連続する画像間のフレーム間差分画像を生成し、エッジ背景差分画像とフレーム間差分画像を重ね合わせてラベリングを行っている。さらに、ラベリング結果に応じて移動体のみのエッジ情報を追跡して移動物体の輪郭画像を生成し、輪郭画像をもとに人の数をカウントしている。
また、特許文献2では、監視用カメラからの映像を画像処理し、各居住区内への玄関等の特定箇所を通過した人数をカウントする技術を開示する。具体的には、特許文献2の技術では、検出された人体を追尾し、認証された人数と実際に特定箇所を通過した人数の差を検出し、共連れが発生しているかどうかの確認を行っている。そして、不審者と認識される居住者ではない未認証者による共連れが発生した場合に、監視用カメラで撮影した映像と共にリアルタイム映像を、予め登録された配信先へ自動的に送信する。
Conventionally, there is known a method of counting the number of people in an image by analyzing an image captured by a surveillance camera.
For example,
Moreover, in
しかしながら、従来の技術では、人数をカウントする範囲は監視カメラの撮像画角内に限られている。このため、より広い範囲を対象に人数をカウントする場合は、カウントする範囲を画角内に入る範囲に分割して撮像し、夫々の画像に対する画像解析によりカウントした人数を足し合わせる必要がある。このように撮像範囲を分割して撮像すると、分割された境界の部分で人物の画像が途中で切れたり、画角を動かす間に人物が移動したりするため、二重にカウントされたりカウント漏れが発生したりするおそれがあった。 However, in the prior art, the range for counting the number of people is limited within the imaging angle of view of the monitoring camera. For this reason, when counting the number of people for a wider range, it is necessary to divide the range to be counted into a range that falls within the angle of view and to capture the number, and add the number of people counted by image analysis for each image. In this way, when the imaging range is divided and imaged, the image of the person is cut off halfway along the divided boundary portion, or the person moves while moving the angle of view, so double counting or count omission occurs. Was likely to occur.
本発明は、上記課題を解決するために成されたものであり、画角より広域の対象範囲であっても、対象範囲内の物体の数を適切にカウントすることができる画像処理装置、画像処理方法およびプログラムを提供することを目的とする。 The present invention has been made to solve the above problems, and an image processing apparatus capable of appropriately counting the number of objects within a target range even if the target range is wider than the angle of view. The purpose is to provide a processing method and program.
上記課題を解決するため、本発明のある態様によれば、撮像手段により撮像された画像から物体を検出する検出手段と、前記検出手段により検出された前記物体が、画角内に設定された検知線を通過したことを検知する検知手段と、前記検出手段により検出された前記物体のうち、前記検知手段により前記検知線を通過したことが検知された物体の数をカウントするカウント手段と、前記物体の数をカウントすべき対象範囲内を前記検知線が移動するよう、前記撮像手段を制御する制御手段と、を備える画像処理装置が提供される。 In order to solve the above problems, according to an aspect of the present invention, a detection unit that detects an object from an image captured by an imaging unit, and the object detected by the detection unit are set within an angle of view. Detection means for detecting that the detection line has passed, counting means for counting the number of objects of the objects detected by the detection means that have been detected to have passed the detection line by the detection means; And a control unit configured to control the imaging unit so that the detection line moves in a target range in which the number of objects is to be counted.
以上の構成を有する本発明によれば、画角より広域の対象範囲であっても、対象範囲内の物体の数を適切にカウントすることができる。 According to the present invention having the above configuration, the number of objects within the target range can be appropriately counted even if the target range is wider than the angle of view.
以下、添付図面を参照して、本発明を実施するための実施形態について詳細に説明する。なお、以下に説明する実施形態は、本発明の実現手段としての一例であり、本発明が適用される装置の構成や各種条件によって適宜修正又は変更されるべきものであり、本発明は以下の実施形態に必ずしも限定されるものではない。また、本実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。なお、同一の構成については、同じ符号を付して説明する。 Hereinafter, an embodiment for carrying out the present invention will be described in detail with reference to the attached drawings. The embodiment described below is an example as a realization means of the present invention, and should be appropriately corrected or changed according to the configuration of the apparatus to which the present invention is applied and various conditions. It is not necessarily limited to the embodiment. Moreover, not all combinations of the features described in the present embodiment are essential to the solution means of the present invention. In addition, about the same structure, the same code | symbol is attached | subjected and demonstrated.
<実施形態1>
本実施形態に係るネットワークカメラシステムの構成例について図1を用いて説明する。図1において、ネットワークカメラ2と情報処理装置3とは、ネットワーク1を介して接続される。なお、ネットワークカメラ2および情報処理装置3はそれぞれ複数存在してもよい。
ネットワークカメラ2は、例えば、劇場や映画館、スタジアム等に設置される監視カメラであってよい。このネットワークカメラ2は、情報処理装置3からの制御に応じて被写体の撮像を行い、撮像した画像をネットワーク1を介して情報処理装置3に配信する。本実施形態において、ネットワークカメラ2は、人数をカウントすべき測定対象範囲に対して、撮像画角を移動して、測定対象範囲内の被写体を撮像することができる。なお、ネットワークカメラ2により撮像される画像は、静止画像および動画像を含む。
First Embodiment
A configuration example of a network camera system according to the present embodiment will be described with reference to FIG. In FIG. 1, a
The
情報処理装置3は、ネットワークカメラ2の制御およびネットワークカメラ2からの画像(動画像)の画質等の制御を行い、ネットワークカメラ2から配信された画像を解析処理する。情報処理装置3は、例えばPC(Personal Computer)により構成することができる。
ネットワーク1は、例えば、インターネットや有線LAN(Local Area Network)、無線LAN、WAN(Wide Area Network)、または、アナログケーブル等により構成することができる。ネットワーク1は、ネットワークカメラ2と情報処理装置3の間で通信を行うことができればよく、その通信規格、規模、構成は限定されない。
The
The
(ハードウェア構成)
図1のネットワークカメラ2あるいは情報処理装置3の機能は、例えば後述するROM12等の記憶部に記憶されたプログラムを、CPU11によって実行することにより実現してもよい。なお、ネットワークカメラ2あるいは情報処理装置3の機能の少なくとも一部をハードウェアにより実現してもよい。ハードウェアにより実現する場合、例えば、所定のコンパイラを用いることで、各ステップを実現するためのプログラムからFPGA上に自動的に専用回路を生成すればよい。FPGAとは、Field Programmable Gate Arrayの略である。また、FPGAと同様にしてGate Array回路を形成し、ハードウェアとして実現するようにしてもよい。また、ASIC(Application Specific Integrated Circuit)により実現するようにしてもよい。
(Hardware configuration)
The functions of the
図2は、情報処理装置3のハードウェア構成の一例を示している。情報処理装置3は、CPU11、ROM12、RAM13、外部メモリ14、入力部15、出力部16、通信インタフェース(I/F)17を備えている。CPU11〜通信I/F17は、バス18によって接続されている。
CPU11は、入力された信号やプログラムに従って、ネットワークカメラ2あるいは情報処理装置3を構成する各部分の制御を行う。具体的には、CPU11は、画像解析処理等の処理を行う。後述の図3および図4の機能ブロックは、CPU11によって実行される機能を図示したものである。
RAM13は、一時的なデータを記憶し、CPU11の作業用に使われる。ROM12は、ネットワークカメラ2あるいは情報処理装置3の各機能部を実行するためのプログラムや、各種の設定情報を記憶する。外部メモリ14は、例えば、着脱可能なメモリカードであり、PC(パーソナルコンピュータ)等に装着してデータを読み出すことが可能である。
また、RAM13あるいは外部メモリ14の所定の領域は、入出力データのバッファ、CPU11が実行する処理における一時的なデータの格納等に使われる。
入力部15は、例えばユーザからの操作を入力するキーボードやマウス等の装置を備えている。出力部16は、例えば画像を表示するモニター等の装置を備えている。
通信I/F17は、上述のネットワーク1を介した通信を行う。
なお、ネットワークカメラ2も、図2のハードウェア構成を備えてよく、その場合さらに、被写体を撮像する撮像部を備える。
FIG. 2 shows an example of the hardware configuration of the
The CPU 11 controls each part constituting the
The RAM 13 stores temporary data and is used for work of the CPU 11. The ROM 12 stores programs for executing the functional units of the
Further, a predetermined area of the RAM 13 or the
The input unit 15 includes, for example, a device such as a keyboard and a mouse for inputting an operation from the user. The output unit 16 includes, for example, a device such as a monitor that displays an image.
The communication I /
Note that the
以下、画像内にいる人体(人物)の人数をカウントするための、ネットワークカメラ2と情報処理装置3の構成について説明する。なお、本実施形態においては、画像内の人体をカウントする例を説明するが、本実施形態はその他のあらゆる物体、例えば、動物や車両等をカウントすることができ、カウントされる物体は移動体と静止体を含む。
図3は、ネットワークカメラ2の機能構成を示すブロック図である。ネットワークカメラ2は、撮像部21と、撮像制御部22と、処理部23と、通信部24と、記憶部25と、を備えている。
撮像部21は、被写体を撮像して画像信号を生成する。撮像部21は、CMOS(Complementary MOS)イメージセンサ等の撮像素子を備えている。また、撮像部21は、ズームやフォーカスや絞り等の機構を備えたレンズと、パン・チルト機構等によって撮像方向を変えるための雲台と、輝度や色調を変更する画像処理の機構と、を備えている。
撮像制御部22は、処理部23からの制御コマンドに応じて撮像部21のズーム、フォーカス、パン・チルト等を制御する。これにより、測定対象範囲に対して撮像部21の画角を移動して被写体を撮像することができる。本実施形態において、撮像制御部22は、撮像部21のパン・チルト、ズーム、フォーカス等の動作を制御することでネットワークカメラ2の画角を移動させる。なお、各実施形態において、「画角」とは撮像部21によって撮像する範囲(撮像範囲)を意味するものとする。
Hereinafter, configurations of the
FIG. 3 is a block diagram showing a functional configuration of the
The
The
処理部23は、後述の通信部24を介して外部からのリクエストコマンドを受信し、受信したリクエストコマンドを解析し実行する。例えば、リクエストコマンドがネットワークカメラ2の制御に関するコマンドであれば、処理部23は、そのリクエストコマンドを制御コマンドに変換して撮像制御部22に送る。撮像制御部22は、処理部23からの制御コマンドを実行する。また、リクエストコマンドがネットワークカメラ2の設定の状態の問い合わせに関するコマンドであれば、処理部23は、後述の記憶部25から該当する設定の状態を取得し、リクエストに対する応答をレスポンス形式に変換して通信部24を介して送信する。
通信部24は、他の装置との通信を行う。通信部24は、ネットワーク1と接続されており、ネットワーク1とのインタフェースとして機能する。
記憶部25は、ネットワークカメラ2の機種情報や名称や設定の状態等を記憶している。
The
The
The
図4は、情報処理装置3の機能構成を示すブロック図である。情報処理装置3は、通信部31と、カメラ管理部32と、画像解析部33と、一次記憶部34と、二次記憶部35と、入力部36と、表示部37と、処理部38と、を備えている。
通信部31は、ネットワークカメラ2との通信を行う。通信部31は、ネットワーク1と接続されており、ネットワーク1とのインタフェースとして機能する。
カメラ管理部32は、ネットワークカメラ2から設定の状態を取得するか、またはネットワークカメラ2からの状態の変更の通知を受信する。カメラ管理部32は、取得した状態または受信した通知に基づいて、ネットワークカメラ2の雲台や撮像機構の状態を把握し管理する。また、カメラ管理部32は、ネットワークカメラ2の雲台や撮像機構を所望の状態に変更するためのリクエストコマンドやネットワークカメラ2から画像を取得するためのリクエストコマンドを生成し、通信部31を介して送信する。
画像解析部33は、ネットワークカメラ2からの画像を取得し、取得した画像に対して画像解析を行い、画像内の測定対象の物体(人体)の検出および検出された人体のカウント(計数)を行う。
FIG. 4 is a block diagram showing a functional configuration of the
The
The
The
一次記憶部34は、画像解析プログラムやデータを一時記憶するRAM(Random Access Memory)等であり、画像解析部33で実行される解析処理の情報を一時的に記憶する。
二次記憶部35は、ハードディスクや光ディスクやメモリカード等であり、画像解析を実行するプログラムを記憶する。また二次記憶部は、画像解析の結果として出力される人数等の情報を保存する。
入力部36はマウス等のポインティングデバイスやキーボード等の、ユーザが入力のために操作する装置である。
表示部37は、CRT(Cathode Ray Tube)やLCD(Liquid Crystal Display)等のディスプレイで構成されており、画像解析プログラムのGUI(Graphical User Interface)を表示する。また、この表示部37には、画像解析の結果に応じた情報を表示する。
The
The
The
The
処理部38は、二次記憶部35から読み出した画像解析のプログラムを一次記憶部34に展開して実行し、入力部36に入力された指示やカメラ管理部32から得られたカメラの状態に基づき、カメラ管理部32を介してネットワークカメラ2を制御する。また、処理部38は、カメラ管理部32から取得したネットワークカメラ2からの画像を画像解析部33に供給し、画像解析を実行させる。さらに、処理部38は、画像解析部33から得られた画像解析の結果を表示部37に表示させ、二次記憶部35に保存する。
この処理部38は、例えばCPU(Central Processing Unit)等のプロセッサとして構成することができる。処理部38と、カメラ管理部32および画像解析部33を合わせて1つのプロセッサで構成することができる。あるいは、処理部38、カメラ管理部32、画像解析部33を複数のCPUで構成してもよく、GPU(Graphics Processing Unit)を有する構成としてもよい。また、処理部38が、カメラ管理部32と画像解析部33の処理を実行するようにしてもよい。
The
The
(カメラ管理部32および画像解析部33の詳細構成)
図5は、カメラ管理部32と画像解析部33の詳細な機能構成を示すブロック図である。カメラ管理部32は、範囲設定部41と、動作決定部42と、カメラ制御部43と、を備えている。また、画像解析部33は、ライン設定部44と、人体検出部45と、通過判定部46と、人数算出部47と、を備えている。
カメラ管理部32と画像解析部33の間の情報のやり取りは、処理部38を介して行われる。
範囲設定部41は、人数をカウントする対象となる範囲である測定対象範囲(ないし対象範囲)を設定するための設定画面を表示部37に表示させる。範囲設定部41は、ユーザが入力部36を介して設定画面に指定した範囲を受け付け、一次記憶部34に保存する。人数をカウントする対象となる範囲は、例えばネットワークカメラのパン、チルトの回転位置によって指定できる。例えばパン、チルトの位置の組み合わせを2つ以上設定すれば、それらの位置に囲まれた領域を、撮像部21の画角を移動させて撮像を行う測定対象範囲として設定することができる。
(Detailed Configuration of
FIG. 5 is a block diagram showing detailed functional configurations of the
Exchange of information between the
The
動作決定部42は、範囲設定部41で設定された測定対象範囲に対して、どのようにネットワークカメラ2を動作させるかを決定する。動作決定部42は、撮影開始のパン、チルト、ズーム位置、撮像中のパン・チルト速度と方向およびズーム位置、撮像終了のパン、チルトの位置を決定する。
カメラ制御部43は、動作決定部42により決定したネットワークカメラ2の撮像動作に従い、カメラの状態を取得しながら撮像の進捗に合わせてネットワークカメラ2を制御するコマンドを発行する。また、カメラ制御部43は、ネットワークカメラ2から画像を取得して、一次記憶部34に保存する。
ライン設定部44は、画像の画角内で通過した人数をカウントするための通過検知ライン(検知線)を設定するための設定画面を表示部37に表示させる。ライン設定部44は、ユーザが設定画面に応じて入力部36を介して指定した通過検知ラインを示す情報を、一次記憶部34に保存する。ライン設定部44では、通過検知ラインの位置や長さ、検知する通過の方向を設定できる。また、通過検知ラインは直線だけでなく、曲線としてもよい。また、複数の通過検知ラインを設定してもよい。
The
According to the imaging operation of the
The
人体検出部45は、カメラ制御部43がカメラから取得して一次記憶部34に保存した画像を読み出し、画像処理を行って画像内に映っている人体を検出する。人体検出部45は、画像内の人体の人数と、各人体の座標と大きさとを検出する。人体検出部45は、動画像内の複数のフレーム画像から連続して人体検出する場合に、同じ人体を識別することができる。すなわち、人体検出部45は動画像から同一人物を検出して追尾することができる。
なお、人体検出部45は、必ずしも画像全体から人体を検出する必要はない。すなわち、後述の通過判定部46で人体の通過が判定できる範囲であれば、通過検知ライン付近でのみ人体を検出すればよい。これにより、人体検出部45の処理負荷を軽減できる。
通過判定部46は、人体検出部45が検出した人体が、ライン設定部44で設定した通過検知ラインを通過したか否かを判定し、人体が通過した場合には後述の人数算出部47に通知する。
人数算出部47は、通過判定部46からの通知の回数を計測することで、通過検知ラインを通過した人数をカウントする。
The human
The human
The
The number-of-
(人数カウント処理の処理手順)
図6は、処理部38およびカメラ管理部32と画像解析部33が実行する一連の処理(人数カウント処理)を示すフローチャートである。
まず、S1で、処理部38は、人数算出部47でカウントした人数を0にリセットする。S2で、処理部38は、動作決定部42で決定された撮像開始位置に、ネットワークカメラ2のパン・チルトを移動させる。S3で、処理部38は、動作決定部42で決定した速度で、ネットワークカメラ2のパン、チルトの少なくとも一方を移動させる。
(Processing procedure of people count process)
FIG. 6 is a flowchart showing a series of processing (number counting process) executed by the
First, in S1, the
S4で、通過判定部46が、人体検出部45が検出した人体が通過検知ライン(検知線)を通過したかどうかを判断する。S5では、S4において人体が通過検知ラインを通過したと判断された場合は、人数算出部47が通過した人数をカウントする。一方、S4において人体が通過検知ラインを通過していないと判断された場合には、S5の処理を行わずにS6に進み、人数算出部47は、人数をカウントしない。
S6において、処理部38は、ネットワークカメラ2のパン、チルトが動作決定部42で決定した撮像終了位置に到達したかどうかを判断する。ネットワークカメラ2のパン、チルトが撮像終了位置に到達していない場合は、処理部38は、S4以降の処理を繰り返す。ネットワークカメラ2のパン・チルトが撮像終了処理に到達した場合は、S7でカメラのパン・チルトの動作を停止させ、処理を終了する。
In S4, the
In S6, the
(カメラ動作決定処理詳細)
以下、動作決定部42がネットワークカメラ2の動作を決定する処理の例を、図7(a)から(c)を用いて説明する。範囲設定部41により、人数をカウントする対象範囲が図7(a)の61のように設定されているものとする。対象範囲61の範囲内にいる人物の人数をカウントするには、通過検知ラインが、対象範囲61内をすべて通過するようにネットワークカメラ2の撮像画角を移動させる経路を設定すればよい。このため範囲設定部41は、撮像部21の撮像画角に対してより広い領域を測定対象範囲として設定することができる。
(Details of camera operation determination process)
Hereinafter, an example of processing in which the
また、ライン設定部44は、通過検知ラインを、例えばネットワークカメラ2の画角の上端から下端まで、左右の中央に垂直に引く。すなわち、ライン設定部44は、撮像部21の撮像画角が移動する方向に対して直交する方向に通過検知ラインを設定する、
そして、動作決定部42は、通過検知ラインと対象範囲61の左端が一致し、かつ、通過検知ラインの下端と対象範囲61の下端が一致するように撮像開始位置を決定する。これにより、図7(b)に示すように、撮像開始位置における矩形領域で示される撮像画角は62、通過検知ラインは63のようになる。
Further, the
Then, the
次に、動作決定部42は、通過検知ラインと対象範囲61の右端が一致する位置64までネットワークカメラ2のパンを移動するよう決定する。その後、動作決定部42は、図7(c)に示すように、撮像画角を垂直画角分だけ上方向の位置65に移動するよう決定する。そして、動作決定部42は、再度パンのみを通過検知ラインが61の左端に通過検知ラインが一致する位置66まで移動するように決定する。このように、パンの移動とチルトの移動を繰り返すことにより、対象範囲61全体の人数をシームレスにカウントできる。
Next, the
(本実施形態の効果)
以上のように、本実施形態では、測定対象範囲に対して撮像部の撮像画角を移動させながら、測定対象範囲を撮像する。そして、本実施形態では、撮像部からの画像から測定対象の物体を検出し、検出した物体が、測定対象範囲と撮像部の撮像画角に応じて設定された通過検知ラインを越えたか否かを判定し、通過検知ラインを越えた回数をカウントしている。すなわち、測定対象範囲内を設定された通過検知ラインが移動するよう、撮像部の撮像画角を移動するよう制御する。これにより、二重カウントやカウント漏れを低減することができる。すなわち、撮像部の画角より広域の撮像範囲(測定対象範囲)であっても、測定対象の物体を適切にカウントすることができる。
(Effect of this embodiment)
As described above, in the present embodiment, the measurement target range is imaged while moving the imaging angle of view of the imaging unit with respect to the measurement target range. Then, in the present embodiment, an object to be measured is detected from an image from the imaging unit, and whether the detected object has passed a passage detection line set according to the measurement target range and the imaging angle of view of the imaging unit. And count the number of times the passing detection line has been crossed. That is, control is performed to move the imaging angle of view of the imaging unit so that the passage detection line set in the measurement target range moves. Thereby, double counting and count leakage can be reduced. That is, even if it is an imaging range (measurement object range) wider than the angle of view of an imaging part, the object of a measurement object can be counted appropriately.
また、動作決定部42とライン設定部44は、範囲設定部41が設定した測定対象範囲に合わせて、撮像部の撮像動作と通過知ラインを自動で設定する。
なお、ユーザがネットワークカメラ2のパン、チルトの座標を移動順に指定し、通過検知ラインを指定した場合は、範囲設定部41で測定対象範囲を設定しなくてもよい。また、ライン設定部44は、動作決定部42で決定したカメラの移動方向に対して、例えば直交する方向に通過検知ラインを自動で設定することができる。
また、ライン設定部44は、ネットワークカメラ2の移動方向に対して、反対方向に通過する人体のみをカウントするよう通過検知ラインを設定できる。また、ライン設定部44は、ネットワークカメラ2が通過検知ラインに対して平行に移動している間は通過を検知しないよう通過検知ラインを設定してよい。このように構成すれば、カウントの誤りを低減することができる。
The
When the user designates the pan and tilt coordinates of the
Further, the
なお、上述の図7の説明では、通過検知ラインを画角に対して垂直の方向に設定し、ネットワークカメラ2のパンを動かして人数をカウントしていた。しかし、カメラの水平画角が垂直画角よりも長い場合は、通過検知ラインを画角に対して水平の方向に設定した方が、通過検知ラインが長くなるため、一度にカウントできる人数が増える。カウントする人の並び方によっては、通過検知ラインを画角に対して水平の方向に設定し、ネットワークカメラ2のチルトを動かした方が少ない移動量でカウントできる場合がある。
また、本実施形態では、ネットワークカメラ2のパン、チルトを移動させながら通過検知ラインを通過した人数をカウントしていたが、パン、チルトに限らず、画角が移動する方法であれば他の方法でもよい。例えば、ズームや回転等の方法でもよく、あるいは、車やドローン等、移動する物体にネットワークカメラ2を取り付けて撮像を行ってもよい。また、大きい解像度あるいは広角(広域)の画像から切り出し位置を移動させながら切り出した画像に対して上述と同様の処理を実行してもよい。
また、通過検知ラインを撮像部21の画角に対して固定しておくことにより、処理負荷を低減することができる。
In the description of FIG. 7 described above, the passage detection line is set in the direction perpendicular to the angle of view, and the pan of the
Further, in the present embodiment, while the pan and tilt of the
Further, by fixing the passage detection line with respect to the angle of view of the
<実施形態2>
実施形態1では、検出した人物が通過検知ラインを越した数を計測していたが、本実施形態では、通過検知ラインを通過した人数のカウントと、検出した人体の数の計測による人数カウントを組み合わせる方法について説明する。
以下、本実施形態における動作決定部42がネットワークカメラ2の動作方法を決定する方法を、図8を用いて説明する。
実施形態1では、人数をカウントする対象範囲61全体を通過検知ラインが通過するようにネットワークカメラ2の画角を移動していた。そして、通過判定部46が、通過検知ラインを通過したと判断した数のみを人数算出部47が人数としてカウントした。
本実施形態では、対象範囲61の人数をカウントするとき、ネットワークカメラ2で撮像する画角は対象範囲61内の最小範囲のみとする。人数算出部47は、通過判定部46で通過検知ラインを通過したと判断した数と、通過検知ラインが通過しない範囲における人体検出部45で人体として検出された数を、測定対象範囲内の人体の数として合算する。
例えば、カメラ制御部43は、ネットワークカメラ2の画角の初期位置を71のように、画角の左端と対象範囲61の左端が一致するように設定する。そして、カメラ制御部43は、ネットワークカメラ2のパンを右側に移動させ、画角の右端が対象範囲61の右端と一致する位置72まで移動させる。このとき、パンの移動中に通過検知ラインを通過した人体の数を人数としてカウントする。それに加え、画角が71の位置にあるときの通過検知ラインの左側で検出した人体と、画角が72の位置にあるときの通過検知ラインの右側で検出した人体の数を、人数として合算する。
Second Embodiment
In the first embodiment, the number of people detected exceeds the passage detection line is measured, but in the present embodiment, the number of people who have passed the passage detection line and the number of people counted by measuring the number of human bodies detected The method of combining will be described.
Hereinafter, a method of determining the operation method of the
In the first embodiment, the angle of view of the
In the present embodiment, when counting the number of people in the
For example, the
本実施形態では、通過検知ラインを通過した人数のカウントと、検出した人体の数の計測による人数カウントを組み合わせることにより、実施形態1よりもネットワークカメラ2のパン、チルトの移動量を少なくした上で、対象範囲全体の人数をカウントできる。
また、ネットワークカメラ2のパン、チルトの稼働範囲の限界の位置まで画像中の人数をカウントしたい場合にも有効である。
In the present embodiment, by combining the count of the number of people who have passed the passage detection line and the count of the number of people by measuring the number of detected human bodies, the moving amounts of pan and tilt of the
It is also effective when it is desired to count the number of persons in the image up to the limit position of the pan and tilt operating range of the
<実施形態3>
実施形態1、実施形態2ではライン設定部44が設定する通過検知ラインは画像の画角に対して一定であったが、本実施形態では、ライン設定部44がネットワークカメラ2のパン、チルトの位置によって通過検知ラインの位置や形状を変化させるようにしている。
以下、本実施形態における処理の具体例を、図9を用いて説明する。
図9のように、カメラの画角に対して奥行きの方向に行列があり、かつ折り返して行列が続いているような場面を考える。行列の正面や横側から撮像すると、人物が重なって検出漏れが発生しやすいため、行列に対して斜め上方から撮像する場合がある。このような場合、図9の81の位置から82の位置のように、カメラのパン、チルトを行列に沿って移動させ、通過検知ラインを行列と直交する方向に設定すれば効率よくカウントできる。しかし、行列に奥行きがあると、手前側と奥側で画像上の行列の幅が異なるため、手前側の行列の幅で通過検知ラインを設定すると、奥側では折り返した隣の列の人体も誤ってカウントしてしまう場合がある。そこで本実施例では、ネットワークカメラ2の画角が行列の手前側にあるときは81aのように長い通過検知ラインを設定し、ネットワークカメラの画角が行列の奥側にあるときは82aのように短い通過検知ラインを設定する。すなわち、ライン設定部44は、撮像部21の画角の移動に応じて通過検知ラインの位置または形状を変化させる。具体的には、例えば被写体までの距離に応じて通過検知ラインの長さを設定する。このように設定した通過検知ラインにより人数をカウントすることにより、列ごとに人数をカウントできるため、列の動きによる影響や、二重カウントを低減させることができる。
In the first and second embodiments, the passage detection line set by the
Hereinafter, a specific example of the process in the present embodiment will be described with reference to FIG.
As shown in FIG. 9, consider a scene where there is a matrix in the direction of depth with respect to the angle of view of the camera, and the matrix is folded back and continued. When imaging is performed from the front or the side of the matrix, a person may overlap and a detection omission is likely to occur. Therefore, imaging may be performed from diagonally above the matrix. In such a case, pan and tilt of the camera are moved along the matrix as in the
本実施形態では、撮像部21の画角の移動に応じて通過検知ラインの位置または形状を変化させることにより、精度よく画像中の人物の人数をカウントすることができる。
なお、以上の説明では、ネットワークカメラ2のパン、チルトの位置によって通過検知ラインの長さを変更したが、通過検知ラインの長さだけでなく、位置や形状を変更してもよい。また、ネットワークカメラ2のパン、チルトだけでなく、ズームに応じて通過検知ラインの位置や形状を変更してもよい。
In the present embodiment, by changing the position or the shape of the passage detection line according to the movement of the angle of view of the
In the above description, the length of the passage detection line is changed depending on the position of the pan and tilt of the
<第4の実施形態>
本実施形態では、動作決定部42が、撮像環境に合わせてネットワークカメラ2の移動速度や移動方向を自動的に設定する。
ネットワークカメラ2のシャッタースピードが遅い場合、ネットワークカメラ2のパン、チルト等を動作させることによる画角の移動速度が速いと、画像上の被写体のぶれが大きくなる。被写体のぶれが大きくなると、人体検出部45で検出する人体の検出精度が低くなる。そこで、本実施形態では、それぞれのシャッタースピードに対してあらかじめ設定しておいた移動速度で画角を移動する。ここで、画角の移動速度は、単位時間当たりに1画角分移動する速度であり、ズーム位置によっても異なる。具体的には、例えば、シャッタースピードが1/1000の場合は毎秒1画角分移動し、シャッタースピードが1/2000の場合は毎秒2画角分移動するというように設定する。すなわち、撮像部21のシャッタースピードに応じて撮像部21による画角の移動の速度を変更する。
Fourth Embodiment
In the present embodiment, the
When the shutter speed of the
本実施形態では、シャッタースピードに対してあらかじめ設定しておいた移動速度で、ネットワークカメラ2の画角を移動させることにより、シャッタースピードが変化した場合も、人体の検出に適した移動速度を実現できる。
なお、検出した人体の状況によりカメラのパン、チルト等の移動速度や移動方向を変更することもできる。
例えば、人体検出部45で検出した人体について、あらかじめ決められた閾値より大きさが小さい場合や、数が多く存在した場合に、人体検出の処理の負荷が大きくなり、時間がかかる場合がある。そのため、人体の数に合わせてフレームレートを変更することが考えられる。しかし、フレームレートが遅く、かつ画角の移動速度が速いと、前後のフレームで人体の移動距離が大きくなり、人体の追尾の精度が低くなる。そのような場合、画角の移動速度を遅くすればよい。すなわち、人体検出部45により検出された特定の物体の数と大きさの少なくとも一方により、撮像部21による画角の移動の速度を変更する。
In this embodiment, by moving the angle of view of the
Note that the moving speed and moving direction such as pan and tilt of the camera can also be changed according to the detected condition of the human body.
For example, when the size of the human body detected by the human
さらに、人体の移動速度を検出して、画角の移動速度を決めることも考えられる。人体を追尾検出する場合、各フレームにおける座標から、画角内での単位時間あたりの移動量や移動方向が分かる。そのため、人物が移動している方向を検出して、反対方向にネットワークカメラのパン・チルトを移動すれば、効率よく人数をカウントできる。また、人が移動している方向と同じ方向に画角を移動しなければならない場合は、人物が移動している速度よりも早く画角を移動するといった方法をとることができる。すなわち、人物の移動方向と移動速度を検出し、移動方向と移動速度に応じて撮像部21による画角の移動の速度を変更する。
Furthermore, it is conceivable to determine the moving speed of the angle of view by detecting the moving speed of the human body. When tracking and detecting a human body, the amount of movement and the movement direction per unit time within the angle of view can be known from the coordinates in each frame. Therefore, if the direction in which the person is moving is detected and pan / tilt of the network camera is moved in the opposite direction, the number of people can be efficiently counted. If the angle of view must be moved in the same direction as the direction in which the person is moving, the angle of view can be moved faster than the speed at which the person is moving. That is, the moving direction and the moving speed of the person are detected, and the moving speed of the angle of view by the
<変形例>
上述の各実施形態では、ネットワークカメラ2のパン・チルト機能により測定対象領域内で画角を移動させて画像を得ていたが、測定対象領域内で画角を移動させる方法はこれに限られない。
例えば、図10に示す全方位画像から所定のサイズで切り出す領域91を、全方位画像中、所定の方向(周方向)92に順次変化させ、切り出し画像として人体検出部45に順次供給するものも含まれる。
半球状ミラーや魚眼レンズ等で得られる全方位画像は、単に特定の領域を抽出しても、画像の歪みや収差等の影響がある。これに対して、画角を構成する切り出し画像の座標変換や歪み補正等を行うことにより、通常のカメラの画像と同様の矩形領域の画像に変換することができる。
全方位画像から所定のサイズで切り出す領域91を、円周上で所定の方向92に移動させながら、順次歪み補正等を行った切り出し画像に対して人体の検出を行った後、通過検知ラインを設定する。通過判定部46によって切り出し画像内に設定された通過検知ラインを通過したか否かを判定することにより、人数のカウントを行うことができる。
この場合、通過検知ラインは、矩形領域に変換した切り出し画像内において固定としてよい。あるいは、検出した人体等に応じて変更してもよい。
このように、全方位画像出力され、歪み補正された画像に対して各実施形態と同様の処理を実行することにより、画像中に含まれる人物の数のカウントの精度を向上させることができる。
<Modification>
In the above-described embodiments, the image angle is obtained by moving the angle of view within the measurement target area by the pan / tilt function of the
For example, an
An omnidirectional image obtained by a hemispherical mirror, a fisheye lens or the like is affected by image distortion, aberration, etc. even if a specific region is simply extracted. On the other hand, by performing coordinate conversion, distortion correction, and the like of the cutout image forming the angle of view, the image can be converted into an image of a rectangular area similar to an image of a normal camera.
The detection of the human body is performed on the cutout image on which the distortion correction and the like are sequentially performed while moving the
In this case, the passage detection line may be fixed in the cutout image converted into the rectangular area. Or you may change according to the detected human body etc.
Thus, the accuracy of counting the number of persons included in the image can be improved by performing the same processing as in each embodiment on the image that is omnidirectional image output and distortion-corrected.
1…ネットワーク、2…ネットワークカメラ、3…情報処理装置、21…撮像部、22…撮像制御部、32…カメラ管理部、33…画像解析部、38…処理部、41…範囲設定部、44…ライン設定部、45…人体検出部、46…通過判定部、47…人数算出部
REFERENCE SIGNS
Claims (16)
前記検出手段により検出された前記物体が、画角内に設定された検知線を通過したことを検知する検知手段と、
前記検出手段により検出された前記物体のうち、前記検知手段により前記検知線を通過したことが検知された物体の数をカウントするカウント手段と、
前記物体の数をカウントすべき対象範囲内を前記検知線が移動するよう、前記撮像手段を制御する制御手段と、
を備えることを特徴とする画像処理装置。 Detection means for detecting an object from an image captured by the imaging means;
Detection means for detecting that the object detected by the detection means has passed a detection line set within the angle of view;
Counting means for counting the number of objects detected by the detecting means that have passed through the detection line among the objects detected by the detecting means;
Control means for controlling the imaging means to move the detection line within a target range in which the number of objects should be counted;
An image processing apparatus comprising:
ことを特徴とする請求項1記載の画像処理装置。 The control means controls the operation of the imaging means to move the detection line in the target range by moving the angle of view of the imaging means.
An image processing apparatus according to claim 1, characterized in that.
ことを特徴とする請求項1または2に記載の画像処理装置。 The detection means detects that, of the objects detected by the detection means, the object that has passed the detection line in the direction opposite to the direction of the operation of the imaging means has passed the detection line.
The image processing apparatus according to claim 1, wherein the image processing apparatus comprises:
ことを特徴とする請求項1から3のいずれか1項に記載の画像処理装置。 The detection means sets the detection line in a direction orthogonal to the direction of operation of the imaging means.
The image processing apparatus according to any one of claims 1 to 3, characterized in that:
ことを特徴とする請求項1から4のいずれか1項に記載の画像処理装置。 The control means controls the operation of the imaging means in accordance with the position or the shape of the detection line set by the detection means.
The image processing apparatus according to any one of claims 1 to 4, characterized in that:
ことを特徴とする請求項1から5のいずれか1項に記載の画像処理装置。 The control means sets an area having a predetermined width with respect to the angle of view of the imaging means as the target range, and controls the operation of the imaging means so that the detection line passes the entire target range. Set the route to
The image processing apparatus according to any one of claims 1 to 5, characterized in that:
ことを特徴とする請求項1から6のいずれか1項に記載の画像処理装置。 The counting means counts the number of the objects according to the number of the objects detected as having passed the detection line by the detection means and the number of the objects detected by the detection means.
The image processing apparatus according to any one of claims 1 to 6, characterized in that:
ことを特徴とする請求項1から7のいずれか1項に記載の画像処理装置。 The detection unit changes the position or the shape of the detection line according to the operation of the imaging unit.
The image processing apparatus according to any one of claims 1 to 7, characterized in that:
ことを特徴とする請求項1から8のいずれか1項に記載の画像処理装置。 The control unit controls the operation of the imaging unit according to at least one of the number and the size of the object detected by the detection unit.
An image processing apparatus according to any one of claims 1 to 8, characterized in that.
ことを特徴とする請求項1から9のいずれか1項に記載の画像処理装置。 The control means controls the speed of operation of the imaging means in accordance with the shutter speed of the imaging means.
The image processing apparatus according to any one of claims 1 to 9, characterized in that:
ことを特徴とする請求項1から10のいずれか1項に記載の画像処理装置。 The control means controls the operation of the imaging means in accordance with the moving direction of the object detected by the detection means.
The image processing apparatus according to any one of claims 1 to 10, characterized in that:
ことを特徴とする請求項1から11のいずれか1項に記載の画像処理装置。 The control means controls the operation of the imaging means in accordance with the moving speed of the object detected by the detection means.
The image processing apparatus according to any one of claims 1 to 11, characterized in that:
前記制御手段は、前記撮像手段が前記全方位画像から前記所定のサイズの画像を切り出す位置を変更することにより、前記対象範囲内を前記検知線が移動するよう、前記撮像手段を制御する、
ことを特徴とする請求項1記載の画像処理装置。 The imaging means constructs the angle of view by cutting out an image of a predetermined size from an omnidirectional image including the target range,
The control means controls the imaging means to move the detection line in the target range by changing a position at which the imaging means cuts out the image of the predetermined size from the omnidirectional image.
An image processing apparatus according to claim 1, characterized in that.
ことを特徴とする請求項13に記載の画像処理装置。 The detection means sets the detection line at a fixed angle with respect to the angle of view.
The image processing apparatus according to claim 13, characterized in that:
検出された前記物体が、画角内に設定された検知線を通過したことを検知するステップと、
検出された前記物体のうち、前記検知線を通過したことが検知された物体の数をカウントするステップと、
前記物体の数をカウントすべき対象範囲内を前記検知線が移動するよう、前記撮像手段を制御するステップと、
を含むことを特徴とする画像処理方法。 Detecting an object from an image taken by the imaging means;
Detecting that the detected object has passed a detection line set in an angle of view;
Counting the number of objects detected to have passed through the detection line among the detected objects;
Controlling the imaging means to move the detection line within a target range in which the number of objects should be counted;
An image processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017193938A JP2019068339A (en) | 2017-10-04 | 2017-10-04 | Image processing apparatus, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017193938A JP2019068339A (en) | 2017-10-04 | 2017-10-04 | Image processing apparatus, image processing method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2019068339A true JP2019068339A (en) | 2019-04-25 |
Family
ID=66339952
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017193938A Pending JP2019068339A (en) | 2017-10-04 | 2017-10-04 | Image processing apparatus, image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2019068339A (en) |
-
2017
- 2017-10-04 JP JP2017193938A patent/JP2019068339A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10127456B2 (en) | Information processing apparatus that corrects image distortion to set a passage detection line, information processing method, and medium | |
KR102111935B1 (en) | Display control apparatus, display control method, and program | |
JP2015142181A (en) | Control apparatus and control method | |
CN110199316B (en) | Camera and image processing method of camera | |
JP6381313B2 (en) | Control device, control method, and program | |
JP6914007B2 (en) | Information processing device and information processing method | |
US10129471B2 (en) | Method, apparatus and system for detecting location of laser point on screen | |
JP5525495B2 (en) | Image monitoring apparatus, image monitoring method and program | |
JP2016092693A (en) | Imaging apparatus, imaging apparatus control method, and program | |
JP2009017026A (en) | Coordinate conversion method, parameter-adjusting method and monitoring system | |
JP2010217984A (en) | Image detector and image detection method | |
JP6991045B2 (en) | Image processing device, control method of image processing device | |
JP2008217330A (en) | Speed estimation method and speed estimation program | |
JP2018063675A (en) | Image processor and control method | |
JP4871315B2 (en) | Compound eye photographing apparatus, control method therefor, and program | |
US20190130677A1 (en) | Information processing apparatus, information processing method, imaging apparatus, network camera system, and storage medium | |
JP2019068339A (en) | Image processing apparatus, image processing method, and program | |
JP2018092507A (en) | Image processing apparatus, image processing method, and program | |
JP2017073642A (en) | Information processing device, information processing method, and program | |
JP2020201674A (en) | Video analyzer and control method therefor and program | |
JP6501945B2 (en) | INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM | |
JP6759400B2 (en) | Information processing equipment, information processing methods, and programs | |
WO2017169593A1 (en) | Monitoring system and terminal device | |
JP6965419B2 (en) | Information processing equipment, information processing methods, and programs | |
JP6808398B2 (en) | Control device, imaging device, control method, and program |