JP2019068339A - Image processing apparatus, image processing method, and program - Google Patents

Image processing apparatus, image processing method, and program Download PDF

Info

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
Application number
JP2017193938A
Other languages
Japanese (ja)
Inventor
匠 木村
Takumi Kimura
匠 木村
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2017193938A priority Critical patent/JP2019068339A/en
Publication of JP2019068339A publication Critical patent/JP2019068339A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide an image processing apparatus capable of appropriately counting the number of objects within a target range even in an imaging range wider than an angle of view.SOLUTION: An image processing apparatus includes: detection means for detecting an object from an image captured by imaging means; detection means for detecting that the object detected by the detection means has passed a detection line set within an angle of view; counting means for counting the number of objects detected by the detection means that have passed through the detection line among the objects detected by the detection means; and control means for controlling the imaging means so as to move the detection line within a target range in which the number of objects should be counted.SELECTED DRAWING: Figure 6

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, Patent Document 1 discloses a technique for detecting a human body in a captured image by image analysis. Specifically, in the technique of Patent Document 1, an edge background difference image is generated, an edge of only a moving object is detected, an interframe difference image between temporally consecutive images is generated, and an edge background difference image is generated. Labeling is performed by superposing inter-frame difference images. Furthermore, according to the labeling result, edge information of only the moving object is tracked to generate an outline image of the moving object, and the number of people is counted based on the outline image.
Moreover, in patent document 2, the image processing of the image | video from the camera for surveillance is carried out, and the technique which counts the number of persons who passed specific places, such as the entrance to each residence area, is disclosed. Specifically, in the technique of Patent Document 2, the detected human body is tracked, the difference between the number of authenticated people and the number of people who actually passed the specific location is detected, and it is confirmed whether co-delivery is occurring. Is going. Then, when an unauthenticated person who is not a resident who is recognized as a suspicious person occurs, a real time image is automatically transmitted to a previously registered distribution destination together with the image taken by the monitoring camera.

特開2015−70359号公報JP, 2015-70359, A 特開2008−217205号公報JP 2008-217205 A

しかしながら、従来の技術では、人数をカウントする範囲は監視カメラの撮像画角内に限られている。このため、より広い範囲を対象に人数をカウントする場合は、カウントする範囲を画角内に入る範囲に分割して撮像し、夫々の画像に対する画像解析によりカウントした人数を足し合わせる必要がある。このように撮像範囲を分割して撮像すると、分割された境界の部分で人物の画像が途中で切れたり、画角を動かす間に人物が移動したりするため、二重にカウントされたりカウント漏れが発生したりするおそれがあった。   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.

実施形態1に係るネットワークカメラシステムの構成を示すブロック図Block diagram showing the configuration of the network camera system according to the first embodiment 情報処理装置のハードウェアの構成例を示すブロック図Block diagram showing an example of hardware configuration of an information processing apparatus ネットワークカメラの機能構成例を示すブロック図Block diagram showing an example of functional configuration of network camera 情報処理装置の機能構成例を示すブロック図Block diagram showing an example of functional configuration of information processing apparatus カメラ管理部および画像解析部の詳細構成例を示すブロック図Block diagram showing a detailed configuration example of a camera management unit and an image analysis unit 実施形態1に係る人数カウント処理の処理手順例を示すフローチャートA flowchart showing an example of a processing procedure of the people counting process according to the first embodiment 実施形態1に係るネットワークカメラの動作を決定する処理を説明する図A figure explaining processing which determines operation of a network camera concerning Embodiment 1. 実施形態2に係るネットワークカメラの動作を決定する処理を説明する図A figure explaining processing which determines operation of a network camera concerning Embodiment 2. 実施形態3に係る通過検知ラインの形状の変更処理を説明する図A figure explaining change processing of shape of a passage detection line concerning Embodiment 3 変形例に係る画像の例を示す図A figure showing an example of an image concerning a modification

以下、添付図面を参照して、本発明を実施するための実施形態について詳細に説明する。なお、以下に説明する実施形態は、本発明の実現手段としての一例であり、本発明が適用される装置の構成や各種条件によって適宜修正又は変更されるべきものであり、本発明は以下の実施形態に必ずしも限定されるものではない。また、本実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。なお、同一の構成については、同じ符号を付して説明する。   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 network camera 2 and an information processing apparatus 3 are connected via a network 1. A plurality of network cameras 2 and a plurality of information processing devices 3 may exist.
The network camera 2 may be, for example, a surveillance camera installed in a theater, a cinema, a stadium or the like. The network camera 2 captures an image of a subject according to control from the information processing device 3, and delivers the captured image to the information processing device 3 via the network 1. In the present embodiment, the network camera 2 can move the imaging angle of view with respect to the measurement target range where the number of people should be counted, and can capture an object within the measurement target range. An image captured by the network camera 2 includes a still image and a moving image.

情報処理装置3は、ネットワークカメラ2の制御およびネットワークカメラ2からの画像(動画像)の画質等の制御を行い、ネットワークカメラ2から配信された画像を解析処理する。情報処理装置3は、例えばPC(Personal Computer)により構成することができる。
ネットワーク1は、例えば、インターネットや有線LAN(Local Area Network)、無線LAN、WAN(Wide Area Network)、または、アナログケーブル等により構成することができる。ネットワーク1は、ネットワークカメラ2と情報処理装置3の間で通信を行うことができればよく、その通信規格、規模、構成は限定されない。
The information processing device 3 controls the network camera 2 and controls the image quality and the like of the image (moving image) from the network camera 2 and analyzes the image distributed from the network camera 2. The information processing device 3 can be configured by, for example, a PC (Personal Computer).
The network 1 can be configured by, for example, the Internet, a wired LAN (Local Area Network), a wireless LAN, a WAN (Wide Area Network), an analog cable, or the like. The network 1 only needs to be able to communicate between the network camera 2 and the information processing apparatus 3, and the communication standard, scale, and configuration thereof are not limited.

(ハードウェア構成)
図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 network camera 2 or the information processing apparatus 3 in FIG. 1 may be realized by the CPU 11 executing a program stored in a storage unit such as the ROM 12 described later. Note that at least a part of the functions of the network camera 2 or the information processing device 3 may be realized by hardware. In the case of hardware implementation, for example, by using a predetermined compiler, a dedicated circuit may be automatically generated on the FPGA from a program for realizing each step. FPGA is an abbreviation for Field Programmable Gate Array. Further, a Gate Array circuit may be formed in the same manner as an FPGA and realized as hardware. Also, it may be realized by an application specific integrated circuit (ASIC).

図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 information processing device 3. The information processing device 3 includes a CPU 11, a ROM 12, a RAM 13, an external memory 14, an input unit 15, an output unit 16, and a communication interface (I / F) 17. The CPU 11 to the communication I / F 17 are connected by a bus 18.
The CPU 11 controls each part constituting the network camera 2 or the information processing device 3 in accordance with the input signal or program. Specifically, the CPU 11 performs processing such as image analysis processing. Functional blocks in FIG. 3 and FIG. 4 described later illustrate functions executed by the CPU 11.
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 network camera 2 or the information processing apparatus 3 and various setting information. The external memory 14 is, for example, a removable memory card, and can be attached to a PC (personal computer) or the like to read out data.
Further, a predetermined area of the RAM 13 or the external memory 14 is used as a buffer of input / output data, temporary storage of data in processing executed by the CPU 11, or the like.
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 / F 17 performs communication via the above-described network 1.
Note that the network camera 2 may also have the hardware configuration shown in FIG. 2, and in that case, the network camera 2 further includes an imaging unit that images a subject.

以下、画像内にいる人体(人物)の人数をカウントするための、ネットワークカメラ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 network camera 2 and the information processing device 3 for counting the number of human bodies (people) present in an image will be described. In the present embodiment, an example of counting a human body in an image will be described, but in the present embodiment, any other object, for example, an animal or a vehicle can be counted, and an object to be counted is a moving object. And stationary.
FIG. 3 is a block diagram showing a functional configuration of the network camera 2. The network camera 2 includes an imaging unit 21, an imaging control unit 22, a processing unit 23, a communication unit 24, and a storage unit 25.
The imaging unit 21 images a subject and generates an image signal. The imaging unit 21 includes an imaging element such as a CMOS (Complementary MOS) image sensor. In addition, the imaging unit 21 includes a lens having a mechanism such as zoom, focus, and aperture, a pan head for changing an imaging direction by a pan / tilt mechanism, and a mechanism for image processing for changing luminance and color tone. Have.
The imaging control unit 22 controls zoom, focus, pan / tilt, and the like of the imaging unit 21 in accordance with a control command from the processing unit 23. Thereby, the object angle can be imaged by moving the angle of view of the imaging unit 21 with respect to the measurement target range. In the present embodiment, the imaging control unit 22 moves the angle of view of the network camera 2 by controlling operations such as pan / tilt, zoom and focus of the imaging unit 21. In each embodiment, the “angle of view” means a range (imaging range) to be imaged by the imaging unit 21.

処理部23は、後述の通信部24を介して外部からのリクエストコマンドを受信し、受信したリクエストコマンドを解析し実行する。例えば、リクエストコマンドがネットワークカメラ2の制御に関するコマンドであれば、処理部23は、そのリクエストコマンドを制御コマンドに変換して撮像制御部22に送る。撮像制御部22は、処理部23からの制御コマンドを実行する。また、リクエストコマンドがネットワークカメラ2の設定の状態の問い合わせに関するコマンドであれば、処理部23は、後述の記憶部25から該当する設定の状態を取得し、リクエストに対する応答をレスポンス形式に変換して通信部24を介して送信する。
通信部24は、他の装置との通信を行う。通信部24は、ネットワーク1と接続されており、ネットワーク1とのインタフェースとして機能する。
記憶部25は、ネットワークカメラ2の機種情報や名称や設定の状態等を記憶している。
The processing unit 23 receives a request command from the outside through the communication unit 24 described later, analyzes the received request command, and executes the request command. For example, if the request command is a command related to control of the network camera 2, the processing unit 23 converts the request command into a control command and sends the control command to the imaging control unit 22. The imaging control unit 22 executes a control command from the processing unit 23. If the request command is a command related to the inquiry about the setting state of the network camera 2, the processing unit 23 acquires the state of the corresponding setting from the storage unit 25 described later, and converts the response to the request into a response format. It transmits via the communication unit 24.
The communication unit 24 communicates with other devices. The communication unit 24 is connected to the network 1 and functions as an interface with the network 1.
The storage unit 25 stores model information, a name, a setting state, and the like of the network camera 2.

図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 information processing device 3. The information processing device 3 includes a communication unit 31, a camera management unit 32, an image analysis unit 33, a primary storage unit 34, a secondary storage unit 35, an input unit 36, a display unit 37, and a processing unit 38. And.
The communication unit 31 communicates with the network camera 2. The communication unit 31 is connected to the network 1 and functions as an interface with the network 1.
The camera management unit 32 acquires the state of the setting from the network camera 2 or receives the notification of the change of the state from the network camera 2. The camera management unit 32 grasps and manages the states of the camera platform and the imaging mechanism of the network camera 2 based on the acquired state or the received notification. In addition, the camera management unit 32 generates a request command for changing the camera platform of the network camera 2 or the imaging mechanism to a desired state or a request command for acquiring an image from the network camera 2, via the communication unit 31. To send.
The image analysis unit 33 acquires an image from the network camera 2, performs image analysis on the acquired image, detects an object (human body) to be measured in the image, and counts the detected human body. Do.

一次記憶部34は、画像解析プログラムやデータを一時記憶するRAM(Random Access Memory)等であり、画像解析部33で実行される解析処理の情報を一時的に記憶する。
二次記憶部35は、ハードディスクや光ディスクやメモリカード等であり、画像解析を実行するプログラムを記憶する。また二次記憶部は、画像解析の結果として出力される人数等の情報を保存する。
入力部36はマウス等のポインティングデバイスやキーボード等の、ユーザが入力のために操作する装置である。
表示部37は、CRT(Cathode Ray Tube)やLCD(Liquid Crystal Display)等のディスプレイで構成されており、画像解析プログラムのGUI(Graphical User Interface)を表示する。また、この表示部37には、画像解析の結果に応じた情報を表示する。
The primary storage unit 34 is a RAM (Random Access Memory) or the like that temporarily stores an image analysis program and data, and temporarily stores information of analysis processing executed by the image analysis unit 33.
The secondary storage unit 35 is a hard disk, an optical disk, a memory card, or the like, and stores a program for executing image analysis. Further, the secondary storage unit stores information such as the number of people output as a result of the image analysis.
The input unit 36 is a device such as a pointing device such as a mouse or a keyboard operated by the user for input.
The display unit 37 is configured by a display such as a CRT (Cathode Ray Tube) or an LCD (Liquid Crystal Display), and displays a GUI (Graphical User Interface) of an image analysis program. The display unit 37 also displays information according to the result of the image analysis.

処理部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 processing unit 38 expands the image analysis program read from the secondary storage unit 35 in the primary storage unit 34 and executes the program, and the instruction input to the input unit 36 or the state of the camera obtained from the camera management unit 32. The network camera 2 is controlled based on the camera management unit 32. In addition, the processing unit 38 supplies the image from the network camera 2 acquired from the camera management unit 32 to the image analysis unit 33 to execute the image analysis. Furthermore, the processing unit 38 causes the display unit 37 to display the result of the image analysis obtained from the image analysis unit 33 and stores the result in the secondary storage unit 35.
The processing unit 38 can be configured as a processor such as a central processing unit (CPU), for example. The processing unit 38, the camera management unit 32, and the image analysis unit 33 can be combined to form a single processor. Alternatively, the processing unit 38, the camera management unit 32, and the image analysis unit 33 may be configured by a plurality of CPUs, or may be configured to have a GPU (Graphics Processing Unit). Further, the processing unit 38 may execute the processing of the camera management unit 32 and the image analysis unit 33.

(カメラ管理部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 Camera Management Unit 32 and Image Analysis Unit 33)
FIG. 5 is a block diagram showing detailed functional configurations of the camera management unit 32 and the image analysis unit 33. As shown in FIG. The camera management unit 32 includes a range setting unit 41, an operation determination unit 42, and a camera control unit 43. The image analysis unit 33 further includes a line setting unit 44, a human body detection unit 45, a passage determination unit 46, and a number-of-people calculation unit 47.
Exchange of information between the camera management unit 32 and the image analysis unit 33 is performed via the processing unit 38.
The range setting unit 41 causes the display unit 37 to display a setting screen for setting a measurement target range (or a target range) which is a range to which the number of people is counted. The range setting unit 41 receives the range designated by the user via the input unit 36 on the setting screen, and stores the range in the primary storage unit 34. The range in which the number of persons is to be counted can be specified by, for example, the rotational position of pan and tilt of the network camera. For example, if two or more combinations of pan and tilt positions are set, the area surrounded by these positions can be set as a measurement target range in which imaging is performed by moving the angle of view of the imaging unit 21.

動作決定部42は、範囲設定部41で設定された測定対象範囲に対して、どのようにネットワークカメラ2を動作させるかを決定する。動作決定部42は、撮影開始のパン、チルト、ズーム位置、撮像中のパン・チルト速度と方向およびズーム位置、撮像終了のパン、チルトの位置を決定する。
カメラ制御部43は、動作決定部42により決定したネットワークカメラ2の撮像動作に従い、カメラの状態を取得しながら撮像の進捗に合わせてネットワークカメラ2を制御するコマンドを発行する。また、カメラ制御部43は、ネットワークカメラ2から画像を取得して、一次記憶部34に保存する。
ライン設定部44は、画像の画角内で通過した人数をカウントするための通過検知ライン(検知線)を設定するための設定画面を表示部37に表示させる。ライン設定部44は、ユーザが設定画面に応じて入力部36を介して指定した通過検知ラインを示す情報を、一次記憶部34に保存する。ライン設定部44では、通過検知ラインの位置や長さ、検知する通過の方向を設定できる。また、通過検知ラインは直線だけでなく、曲線としてもよい。また、複数の通過検知ラインを設定してもよい。
The operation determining unit 42 determines how to operate the network camera 2 with respect to the measurement target range set by the range setting unit 41. The operation determining unit 42 determines pan, tilt and zoom positions at the start of shooting, pan / tilt speed and direction during zoom, direction and zoom position, and pan and tilt positions at the end of shooting.
According to the imaging operation of the network camera 2 determined by the operation determination unit 42, the camera control unit 43 issues a command to control the network camera 2 in accordance with the progress of imaging while acquiring the state of the camera. Also, the camera control unit 43 acquires an image from the network camera 2 and stores the image in the primary storage unit 34.
The line setting unit 44 causes the display unit 37 to display a setting screen for setting a passage detection line (detection line) for counting the number of people who have passed within the angle of view of the image. The line setting unit 44 stores, in the primary storage unit 34, information indicating the passage detection line designated by the user via the input unit 36 according to the setting screen. The line setting unit 44 can set the position and length of the passage detection line, and the direction of passage to be detected. Further, the passage detection line may be not only a straight line but also a curved line. Also, a plurality of passage detection lines may be set.

人体検出部45は、カメラ制御部43がカメラから取得して一次記憶部34に保存した画像を読み出し、画像処理を行って画像内に映っている人体を検出する。人体検出部45は、画像内の人体の人数と、各人体の座標と大きさとを検出する。人体検出部45は、動画像内の複数のフレーム画像から連続して人体検出する場合に、同じ人体を識別することができる。すなわち、人体検出部45は動画像から同一人物を検出して追尾することができる。
なお、人体検出部45は、必ずしも画像全体から人体を検出する必要はない。すなわち、後述の通過判定部46で人体の通過が判定できる範囲であれば、通過検知ライン付近でのみ人体を検出すればよい。これにより、人体検出部45の処理負荷を軽減できる。
通過判定部46は、人体検出部45が検出した人体が、ライン設定部44で設定した通過検知ラインを通過したか否かを判定し、人体が通過した場合には後述の人数算出部47に通知する。
人数算出部47は、通過判定部46からの通知の回数を計測することで、通過検知ラインを通過した人数をカウントする。
The human body detection unit 45 reads an image acquired by the camera control unit 43 from the camera and stored in the primary storage unit 34, performs image processing, and detects a human body shown in the image. The human body detection unit 45 detects the number of human bodies in the image and the coordinates and size of each human body. The human body detection unit 45 can identify the same human body when detecting the human body continuously from a plurality of frame images in a moving image. That is, the human body detection unit 45 can detect and track the same person from the moving image.
The human body detection unit 45 does not necessarily have to detect a human body from the entire image. That is, the human body may be detected only in the vicinity of the passage detection line, as long as the passage determination unit 46 described later can determine the passage of the human body. Thereby, the processing load of the human body detection unit 45 can be reduced.
The passage determination unit 46 determines whether or not the human body detected by the human body detection unit 45 has passed through the passage detection line set by the line setting unit 44, and when the human body passes, the number calculation unit 47 described later. Notice.
The number-of-people calculating unit 47 counts the number of people who have passed the passage detection line by measuring the number of times of notification from the passage determining unit 46.

(人数カウント処理の処理手順)
図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 processing unit 38, the camera management unit 32, and the image analysis unit 33.
First, in S1, the processing unit 38 resets the number of people counted by the number-of-people calculation unit 47 to zero. In S2, the processing unit 38 moves the pan / tilt of the network camera 2 to the imaging start position determined by the operation determination unit 42. In S3, the processing unit 38 moves at least one of pan and tilt of the network camera 2 at the speed determined by the operation determination unit 42.

S4で、通過判定部46が、人体検出部45が検出した人体が通過検知ライン(検知線)を通過したかどうかを判断する。S5では、S4において人体が通過検知ラインを通過したと判断された場合は、人数算出部47が通過した人数をカウントする。一方、S4において人体が通過検知ラインを通過していないと判断された場合には、S5の処理を行わずにS6に進み、人数算出部47は、人数をカウントしない。
S6において、処理部38は、ネットワークカメラ2のパン、チルトが動作決定部42で決定した撮像終了位置に到達したかどうかを判断する。ネットワークカメラ2のパン、チルトが撮像終了位置に到達していない場合は、処理部38は、S4以降の処理を繰り返す。ネットワークカメラ2のパン・チルトが撮像終了処理に到達した場合は、S7でカメラのパン・チルトの動作を停止させ、処理を終了する。
In S4, the passage determination unit 46 determines whether the human body detected by the human body detection unit 45 has passed the passage detection line (detection line). In S5, when it is determined that the human body has passed through the passage detection line in S4, the number-of-people calculating unit 47 counts the number of people passing through. On the other hand, if it is determined in S4 that the human body has not passed the passage detection line, the process proceeds to S6 without performing the process of S5, and the number calculation unit 47 does not count the number of people.
In S6, the processing unit 38 determines whether the pan and tilt of the network camera 2 have reached the imaging end position determined by the operation determination unit 42. If the pan and tilt of the network camera 2 have not reached the imaging end position, the processing unit 38 repeats the processing of S4 and subsequent steps. If the pan / tilt of the network camera 2 has reached the imaging end process, the pan / tilt operation of the camera is stopped in S7, and the process is ended.

(カメラ動作決定処理詳細)
以下、動作決定部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 operation determining unit 42 determines the operation of the network camera 2 will be described with reference to FIGS. 7A to 7C. It is assumed that the target range for counting the number of people is set as shown by 61 in FIG. 7A by the range setting unit 41. In order to count the number of persons within the target range 61, a path for moving the imaging angle of view of the network camera 2 may be set such that the passage detection line passes through the entire target range 61. Therefore, the range setting unit 41 can set an area wider than the imaging angle of view of the imaging unit 21 as the measurement target range.

また、ライン設定部44は、通過検知ラインを、例えばネットワークカメラ2の画角の上端から下端まで、左右の中央に垂直に引く。すなわち、ライン設定部44は、撮像部21の撮像画角が移動する方向に対して直交する方向に通過検知ラインを設定する、
そして、動作決定部42は、通過検知ラインと対象範囲61の左端が一致し、かつ、通過検知ラインの下端と対象範囲61の下端が一致するように撮像開始位置を決定する。これにより、図7(b)に示すように、撮像開始位置における矩形領域で示される撮像画角は62、通過検知ラインは63のようになる。
Further, the line setting unit 44 vertically draws the passage detection line from the upper end to the lower end of the angle of view of the network camera 2 to the left and right centers, for example. That is, the line setting unit 44 sets the passage detection line in the direction orthogonal to the direction in which the imaging angle of view of the imaging unit 21 moves.
Then, the operation determination unit 42 determines the imaging start position so that the left end of the passage detection line matches the left end of the target range 61, and the lower end of the passage detection line matches the lower end of the target range 61. As a result, as shown in FIG. 7B, the imaging angle of view indicated by the rectangular area at the imaging start position is 62, and the passage detection line is 63.

次に、動作決定部42は、通過検知ラインと対象範囲61の右端が一致する位置64までネットワークカメラ2のパンを移動するよう決定する。その後、動作決定部42は、図7(c)に示すように、撮像画角を垂直画角分だけ上方向の位置65に移動するよう決定する。そして、動作決定部42は、再度パンのみを通過検知ラインが61の左端に通過検知ラインが一致する位置66まで移動するように決定する。このように、パンの移動とチルトの移動を繰り返すことにより、対象範囲61全体の人数をシームレスにカウントできる。   Next, the operation determination unit 42 determines to move the pan of the network camera 2 to a position 64 where the passage detection line and the right end of the target range 61 coincide with each other. Thereafter, as shown in FIG. 7C, the operation determining unit 42 determines to move the imaging angle of view to the position 65 in the upward direction by the vertical angle of view. Then, the operation determination unit 42 again determines that only the pan is moved to the position 66 where the passage detection line coincides with the left end of the passage detection line 61. As described above, by repeating the movement of the pan and the movement of the tilt, the number of people in the entire target range 61 can be seamlessly counted.

(本実施形態の効果)
以上のように、本実施形態では、測定対象範囲に対して撮像部の撮像画角を移動させながら、測定対象範囲を撮像する。そして、本実施形態では、撮像部からの画像から測定対象の物体を検出し、検出した物体が、測定対象範囲と撮像部の撮像画角に応じて設定された通過検知ラインを越えたか否かを判定し、通過検知ラインを越えた回数をカウントしている。すなわち、測定対象範囲内を設定された通過検知ラインが移動するよう、撮像部の撮像画角を移動するよう制御する。これにより、二重カウントやカウント漏れを低減することができる。すなわち、撮像部の画角より広域の撮像範囲(測定対象範囲)であっても、測定対象の物体を適切にカウントすることができる。
(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 operation determining unit 42 and the line setting unit 44 automatically set the imaging operation of the imaging unit and the passing knowledge line in accordance with the measurement target range set by the range setting unit 41.
When the user designates the pan and tilt coordinates of the network camera 2 in the moving order and designates the passage detection line, the range setting unit 41 may not set the measurement target range. Further, the line setting unit 44 can automatically set the passage detection line in, for example, a direction orthogonal to the moving direction of the camera determined by the operation determining unit 42.
Further, the line setting unit 44 can set the passage detection line so as to count only the human body passing in the opposite direction with respect to the movement direction of the network camera 2. The line setting unit 44 may set the passage detection line so as not to detect passage while the network camera 2 is moving in parallel to the passage detection line. This configuration can reduce count errors.

なお、上述の図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 network camera 2 is moved to count the number of persons. However, when the horizontal angle of view of the camera is longer than the vertical angle of view, setting the passage detection line in the horizontal direction with respect to the angle of view increases the number of people that can be counted at one time because the passage detection line becomes longer. . Depending on the arrangement of people to be counted, it may be possible to count with a smaller movement amount by setting the passage detection line in the horizontal direction with respect to the angle of view and moving the tilt of the network camera 2.
Further, in the present embodiment, while the pan and tilt of the network camera 2 are moved, the number of people passing through the passage detection line is counted. It may be a method. For example, a method such as zooming or rotation may be used, or imaging may be performed by attaching the network camera 2 to a moving object such as a car or a drone. Further, the same processing as described above may be performed on an image cut out while moving the cutout position from a large resolution or wide angle (wide area) image.
Further, by fixing the passage detection line with respect to the angle of view of the imaging unit 21, the processing load can be reduced.

<実施形態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 network camera 2 by the operation determination unit 42 in the present embodiment will be described with reference to FIG.
In the first embodiment, the angle of view of the network camera 2 is moved such that the passage detection line passes through the entire target range 61 where the number of people is counted. Then, the number-of-people calculation unit 47 counts only the number of the passage determination unit 46 that has determined that the passage detection line has passed.
In the present embodiment, when counting the number of people in the target range 61, the angle of view captured by the network camera 2 is only the minimum range in the target range 61. The number-of-people calculation unit 47 determines the number of human bodies within the measurement target range as the number determined by the passage determination unit 46 as having passed through the passage detection line and the number detected as a human body by the human body detection unit 45 Add as the number of
For example, the camera control unit 43 sets the initial position of the angle of view of the network camera 2 to 71 so that the left end of the angle of view and the left end of the target range 61 coincide with each other. Then, the camera control unit 43 moves the pan of the network camera 2 to the right, and moves it to a position 72 where the right end of the angle of view coincides with the right end of the target range 61. At this time, while the pan is moving, the number of human bodies passing through the passage detection line is counted as the number of people. In addition, the number of human bodies detected on the left side of the passage detection line when the angle of view is 71 and the number of human bodies detected on the right side of the passage detection line when the angle of view is 72 Do.

本実施形態では、通過検知ラインを通過した人数のカウントと、検出した人体の数の計測による人数カウントを組み合わせることにより、実施形態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 network camera 2 are reduced compared to the first embodiment. Can count the number of people in the entire target range.
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 network camera 2.

<実施形態3>
実施形態1、実施形態2ではライン設定部44が設定する通過検知ラインは画像の画角に対して一定であったが、本実施形態では、ライン設定部44がネットワークカメラ2のパン、チルトの位置によって通過検知ラインの位置や形状を変化させるようにしている。
以下、本実施形態における処理の具体例を、図9を用いて説明する。
図9のように、カメラの画角に対して奥行きの方向に行列があり、かつ折り返して行列が続いているような場面を考える。行列の正面や横側から撮像すると、人物が重なって検出漏れが発生しやすいため、行列に対して斜め上方から撮像する場合がある。このような場合、図9の81の位置から82の位置のように、カメラのパン、チルトを行列に沿って移動させ、通過検知ラインを行列と直交する方向に設定すれば効率よくカウントできる。しかし、行列に奥行きがあると、手前側と奥側で画像上の行列の幅が異なるため、手前側の行列の幅で通過検知ラインを設定すると、奥側では折り返した隣の列の人体も誤ってカウントしてしまう場合がある。そこで本実施例では、ネットワークカメラ2の画角が行列の手前側にあるときは81aのように長い通過検知ラインを設定し、ネットワークカメラの画角が行列の奥側にあるときは82aのように短い通過検知ラインを設定する。すなわち、ライン設定部44は、撮像部21の画角の移動に応じて通過検知ラインの位置または形状を変化させる。具体的には、例えば被写体までの距離に応じて通過検知ラインの長さを設定する。このように設定した通過検知ラインにより人数をカウントすることにより、列ごとに人数をカウントできるため、列の動きによる影響や、二重カウントを低減させることができる。
Embodiment 3
In the first and second embodiments, the passage detection line set by the line setting unit 44 is constant with respect to the angle of view of the image. However, in the present embodiment, the line setting unit 44 controls the pan and tilt of the network camera 2. The position and the shape of the passage detection line are changed according to the position.
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 position 82 from the position 81 in FIG. 9, and the passage detection line can be efficiently counted by setting it in the direction orthogonal to the matrix. However, if there is a depth in the matrix, the width of the matrix on the image is different between the near side and the far side, so if you set the passage detection line with the width of the near side matrix, the human body of the next column folded back is also It may be counted incorrectly. Therefore, in this embodiment, when the angle of view of the network camera 2 is on the front side of the matrix, a long passage detection line is set as 81a, and when the angle of view of the network camera is on the back of the matrix, as 82a. Set a short passage detection line to That is, the line setting unit 44 changes the position or the shape of the passage detection line according to the movement of the angle of view of the imaging unit 21. Specifically, the length of the passage detection line is set according to, for example, the distance to the subject. By counting the number of people according to the passage detection line set in this way, the number of people can be counted for each row, so the influence of the movement of the row and the double count can be reduced.

本実施形態では、撮像部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 imaging unit 21, it is possible to accurately count the number of persons in the image.
In the above description, the length of the passage detection line is changed depending on the position of the pan and tilt of the network camera 2. However, not only the length of the passage detection line but also the position and the shape may be changed. In addition to the pan and tilt of the network camera 2, the position and the shape of the passage detection line may be changed according to the zoom.

<第4の実施形態>
本実施形態では、動作決定部42が、撮像環境に合わせてネットワークカメラ2の移動速度や移動方向を自動的に設定する。
ネットワークカメラ2のシャッタースピードが遅い場合、ネットワークカメラ2のパン、チルト等を動作させることによる画角の移動速度が速いと、画像上の被写体のぶれが大きくなる。被写体のぶれが大きくなると、人体検出部45で検出する人体の検出精度が低くなる。そこで、本実施形態では、それぞれのシャッタースピードに対してあらかじめ設定しておいた移動速度で画角を移動する。ここで、画角の移動速度は、単位時間当たりに1画角分移動する速度であり、ズーム位置によっても異なる。具体的には、例えば、シャッタースピードが1/1000の場合は毎秒1画角分移動し、シャッタースピードが1/2000の場合は毎秒2画角分移動するというように設定する。すなわち、撮像部21のシャッタースピードに応じて撮像部21による画角の移動の速度を変更する。
Fourth Embodiment
In the present embodiment, the operation determination unit 42 automatically sets the moving speed and the moving direction of the network camera 2 in accordance with the imaging environment.
When the shutter speed of the network camera 2 is slow, if the moving speed of the angle of view by operating the pan, tilt and the like of the network camera 2 is fast, the subject on the image will be greatly blurred. When the blurring of the subject increases, the detection accuracy of the human body detected by the human body detection unit 45 decreases. Therefore, in the present embodiment, the angle of view is moved at a moving speed set in advance for each shutter speed. Here, the moving speed of the angle of view is a speed of moving by one angle of view per unit time, and also differs depending on the zoom position. Specifically, for example, when the shutter speed is 1/1000, movement is performed by one angle of view per second, and when the shutter speed is 1/2000, movement is performed by two angle of view per second. That is, the speed of movement of the angle of view by the imaging unit 21 is changed according to the shutter speed of the imaging unit 21.

本実施形態では、シャッタースピードに対してあらかじめ設定しておいた移動速度で、ネットワークカメラ2の画角を移動させることにより、シャッタースピードが変化した場合も、人体の検出に適した移動速度を実現できる。
なお、検出した人体の状況によりカメラのパン、チルト等の移動速度や移動方向を変更することもできる。
例えば、人体検出部45で検出した人体について、あらかじめ決められた閾値より大きさが小さい場合や、数が多く存在した場合に、人体検出の処理の負荷が大きくなり、時間がかかる場合がある。そのため、人体の数に合わせてフレームレートを変更することが考えられる。しかし、フレームレートが遅く、かつ画角の移動速度が速いと、前後のフレームで人体の移動距離が大きくなり、人体の追尾の精度が低くなる。そのような場合、画角の移動速度を遅くすればよい。すなわち、人体検出部45により検出された特定の物体の数と大きさの少なくとも一方により、撮像部21による画角の移動の速度を変更する。
In this embodiment, by moving the angle of view of the network camera 2 at a moving speed set in advance with respect to the shutter speed, a moving speed suitable for human body detection is realized even when the shutter speed changes. it can.
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 body detection unit 45 is smaller than a predetermined threshold or when the number is large, the load of the human body detection process may be large and it may take time. Therefore, it is conceivable to change the frame rate in accordance with the number of human bodies. However, if the frame rate is slow and the moving speed of the angle of view is fast, the moving distance of the human body in the previous and subsequent frames becomes large, and the accuracy of human tracking becomes low. In such a case, the moving speed of the angle of view may be reduced. That is, the speed of movement of the angle of view by the imaging unit 21 is changed according to at least one of the number and the size of the specific object detected by the human body detection unit 45.

さらに、人体の移動速度を検出して、画角の移動速度を決めることも考えられる。人体を追尾検出する場合、各フレームにおける座標から、画角内での単位時間あたりの移動量や移動方向が分かる。そのため、人物が移動している方向を検出して、反対方向にネットワークカメラのパン・チルトを移動すれば、効率よく人数をカウントできる。また、人が移動している方向と同じ方向に画角を移動しなければならない場合は、人物が移動している速度よりも早く画角を移動するといった方法をとることができる。すなわち、人物の移動方向と移動速度を検出し、移動方向と移動速度に応じて撮像部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 imaging unit 21 is changed according to the moving direction and the moving speed.

<変形例>
上述の各実施形態では、ネットワークカメラ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 network camera 2, but the method for moving the angle of view within the measurement target area is limited to this. Absent.
For example, an area 91 cut out in a predetermined size from the omnidirectional image shown in FIG. 10 is sequentially changed in a predetermined direction (circumferential direction) 92 in the omnidirectional image, and sequentially supplied to the human body detection unit 45 as a cutout image. included.
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 region 91 cut out in a predetermined size from the omnidirectional image in the predetermined direction 92 on the circumference, and then the passage detection line Set By determining whether or not the passage determination unit 46 has passed the passage detection line set in the cutout image, the number of people can be counted.
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 LIST 1 network 2 network camera 3 information processor 21 imaging unit 22 imaging control unit 32 camera management unit 33 image analysis unit 38 processing unit 41 range setting unit 44 ... line setting unit, 45 ... human body detection unit, 46 ... passage determination unit, 47 ... number of people calculation unit

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:
コンピュータを、請求項1から14のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。   The program for functioning a computer as each means of the image processing apparatus of any one of Claims 1-14.
JP2017193938A 2017-10-04 2017-10-04 Image processing apparatus, image processing method, and program Pending JP2019068339A (en)

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)

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