JP2019192155A - Image processing device, photographing device, image processing method, and program - Google Patents

Image processing device, photographing device, image processing method, and program Download PDF

Info

Publication number
JP2019192155A
JP2019192155A JP2018087494A JP2018087494A JP2019192155A JP 2019192155 A JP2019192155 A JP 2019192155A JP 2018087494 A JP2018087494 A JP 2018087494A JP 2018087494 A JP2018087494 A JP 2018087494A JP 2019192155 A JP2019192155 A JP 2019192155A
Authority
JP
Japan
Prior art keywords
detection
image
area
unit
passed
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
JP2018087494A
Other languages
Japanese (ja)
Inventor
達也 丸山
Tatsuya Maruyama
達也 丸山
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 JP2018087494A priority Critical patent/JP2019192155A/en
Publication of JP2019192155A publication Critical patent/JP2019192155A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide an image processing device, a photographing device, an image processing method, and a program, capable of efficiently reducing a processing load for detecting a person on the basis of the passage amount of the person for each passage direction.SOLUTION: Detection processing for detecting an object from a photographed image is performed. The detected object is tracked to determine that the tracked object passes through a detection line and determine a passage direction and the number of objects determined to have passed the detection line is calculated for each passage direction. A detection area for executing the detection processing of the object in an image is set on the basis of the calculated result.SELECTED DRAWING: Figure 5

Description

本発明は、人数をカウントする画像処理技術に関するものである。   The present invention relates to an image processing technique for counting the number of people.

マーケティングの用途などへの活用を目的として、店舗等における通路を撮影装置によって撮影し、撮影した画像から通路を通過する人の数を通過方向ごとにカウントする技術が知られている。   For the purpose of utilization for marketing purposes, a technique is known in which a passage in a store or the like is photographed by a photographing device, and the number of people passing through the passage is counted for each passage direction from the photographed image.

特許文献1では、画像全体について所定の照合パターンを走査させながらマッチングすることで人の上半身を検出し、複数フレームの検出結果に基づいて人の軌跡を生成して通過ラインと比較することで、ラインを通過する人の数を計数する旨の記載がある。   In Patent Document 1, the upper body of a person is detected by matching a predetermined matching pattern while scanning the entire image, and a human trajectory is generated based on the detection results of a plurality of frames and compared with a passing line. There is a statement that the number of people passing the line is counted.

特開2009−211311号公報JP 2009-211311 A

しかしながら、通過方向ごとの人の通過量に極端に偏りがある場合であっても、特許文献1では、通過方向ごとの通過量の傾向を考慮せずに、画像全体の領域に対して人を検出する処理を行っているため、人を計数する処理のための人の検出負荷が大きかった。   However, even if the amount of passage of people in each passing direction is extremely biased, Patent Document 1 does not consider the tendency of the amount of passing in each passing direction, and does not consider people in the entire image area. Since the detection process is performed, the human detection load for the process of counting people is large.

本発明は、このような問題に鑑みてなされたものであり、通過方向ごとの人の通過量に基づいて、人を検出する処理負荷を効率的に低減することを目的としている。   The present invention has been made in view of such a problem, and an object thereof is to efficiently reduce the processing load for detecting a person based on the passage amount of the person for each passing direction.

上記課題を解決するために、本発明の画像処理装置は以下の構成を備える。すなわち、画像から物体を検出する検出処理を行う検出手段と、前記検出手段により検出された物体を追尾する追尾手段と、前記追尾手段により追尾される物体が前記画像における検知線を通過したこと及び通過方向を判定する判定手段と、前記判定手段により前記検知線を通過したと判定された物体の数を前記通過方向ごとに算出する算出手段と、前記算出手段の結果に基づいて、前記画像において前記検出手段による検出処理を実行する検出領域を設定する設定手段とを有する。   In order to solve the above problems, an image processing apparatus of the present invention has the following configuration. That is, a detection unit that performs detection processing for detecting an object from an image, a tracking unit that tracks an object detected by the detection unit, and that an object tracked by the tracking unit has passed a detection line in the image; In the image, based on a result of the calculation unit, a determination unit that determines a passing direction, a calculation unit that calculates the number of objects that are determined to have passed through the detection line by the determination unit, for each passing direction Setting means for setting a detection region in which detection processing by the detection means is executed.

本発明によれば、通過方向ごとの人の通過量に基づいて、人を検出する処理負荷を効率的に低減することができる。   According to the present invention, it is possible to efficiently reduce the processing load for detecting a person based on the passing amount of the person for each passing direction.

画像処理システムの構成を示す模式図である。It is a schematic diagram which shows the structure of an image processing system. 画像処理装置および撮像装置のハードウェア構成を示す概略図である。It is the schematic which shows the hardware constitutions of an image processing apparatus and an imaging device. 画像処理装置および撮影装置の機能ブロック図である。It is a functional block diagram of an image processing apparatus and an imaging device. 検出領域を設定する処理を説明するための模式図である。It is a schematic diagram for demonstrating the process which sets a detection area. 通過カウント処理および検出領域を設定する処理のフローチャートである。It is a flowchart of the process which sets a passage count process and a detection area. 軌跡情報および通過情報のデータ構成図の一例である。It is an example of a data block diagram of locus information and passage information. 検出領域を設定する処理のフローチャートである。It is a flowchart of the process which sets a detection area. 検出領域を設定する処理を説明するための模式図である。It is a schematic diagram for demonstrating the process which sets a detection area. 画像処理装置の一部の機能を有する撮影装置とクライアント装置の機能ブロック図である。It is a functional block diagram of the imaging device and client device which have a part of function of an image processing device.

(実施形態1)
以下、添付図面を参照しながら本発明に係る実施形態について説明する。なお、以下の実施形態において示す構成は一例に過ぎず、図示された構成に限定されるものではない。
(Embodiment 1)
Embodiments according to the present invention will be described below with reference to the accompanying drawings. In addition, the structure shown in the following embodiment is only an example, and is not limited to the illustrated structure.

図1は、本実施形態に係るシステム構成を示す模式図である。画像処理装置100は、後述する画像処理を実行する装置である。なお、画像処理装置100は、例えば、後述する画像処理の機能を実現するためのプログラムがインストールされたパーソナルコンピュータである。   FIG. 1 is a schematic diagram showing a system configuration according to the present embodiment. The image processing apparatus 100 is an apparatus that executes image processing to be described later. The image processing apparatus 100 is, for example, a personal computer in which a program for realizing an image processing function described later is installed.

表示装置101は、画像処理装置100に接続され、撮像装置102から配信される画像データに基づく画像や後述する画像処理により出力されるデータなどを表示するディスプレイ等を含む。   The display device 101 is connected to the image processing device 100 and includes a display that displays an image based on image data distributed from the imaging device 102, data output by image processing described later, and the like.

撮影装置102は、画像を撮影する装置であり、例えば、ネットワークを介して画像の画像データなどを送信できるネットワークカメラや監視カメラなどである。記録装置103は、撮影装置102から送信された画像データなどを記録する。   The photographing apparatus 102 is an apparatus that captures an image, and is, for example, a network camera or a surveillance camera that can transmit image data of an image via a network. The recording device 103 records the image data transmitted from the imaging device 102.

また、画像処理装置100、撮影装置102、および記録装置103は、ネットワーク104を介して互いに通信を行う。ネットワーク104は、例えばETHERNET(登録商標)等の通信規格を満足する複数のルータ、スイッチ、ケーブル等から構成される。本実施形態においては画像処理装置100、撮影装置102、記録装置103間の通信を行うことができるものであれば、その通信規格、規模、構成を問わない。例えば、ネットワーク104はインターネットや有線LAN(LOCAL AREA NETWORK)、無線LAN(WIRELESS LAN)、WAN(WIDE AREA NETWORK)等により構成されてもよい。   Further, the image processing apparatus 100, the imaging apparatus 102, and the recording apparatus 103 communicate with each other via the network 104. The network 104 includes a plurality of routers, switches, cables, and the like that satisfy a communication standard such as ETHERNET (registered trademark). In the present embodiment, any communication standard, scale, and configuration may be used as long as communication between the image processing apparatus 100, the imaging apparatus 102, and the recording apparatus 103 can be performed. For example, the network 104 may be configured by the Internet, a wired LAN (LOCAL AREA NETWORK), a wireless LAN (WIRELESS LAN), a WAN (WIDE AREA NETWORK), or the like.

また、図1に示す本実施形態の構成では、撮影装置102により撮影された画像の画像データ(ライブ映像)や記録装置103にて記録された画像データ(過去に撮影した画像)などが画像処理装置100に送信される。   Further, in the configuration of the present embodiment shown in FIG. 1, image data (live video) of an image captured by the imaging device 102, image data (an image captured in the past) recorded by the recording device 103, and the like are processed. Transmitted to the device 100.

次に、図2を参照して、画像処理装置100および撮影装置102のハードウェア構成について説明する。図2は、画像処理装置100および撮影装置102のハードウェア構成を示す概略図である。   Next, the hardware configuration of the image processing apparatus 100 and the photographing apparatus 102 will be described with reference to FIG. FIG. 2 is a schematic diagram illustrating a hardware configuration of the image processing apparatus 100 and the imaging apparatus 102.

まず、画像処理装置100のハードウェア構成について説明する。CPU(CENTRAL PROCESSING UNIT)200は、画像処理装置100を制御する。   First, the hardware configuration of the image processing apparatus 100 will be described. A CPU (CENTRAL PROCESSING UNIT) 200 controls the image processing apparatus 100.

IF201は、ネットワーク104を介してTCP/IPやHTTP、ONVIF等のプロトコルに従って、撮影装置102との通信を行う。また、IF201は、撮影装置102が撮影した画像の画像データなどを受信したり、撮影装置102を制御するための各種のコマンドなどを送信したりする。   The IF 201 communicates with the photographing apparatus 102 via the network 104 according to a protocol such as TCP / IP, HTTP, or ONVIF. The IF 201 receives image data of an image captured by the image capturing apparatus 102 and transmits various commands for controlling the image capturing apparatus 102.

RAM(RANDOM ACCESS MEMORY)202は、CPU200が実行するコンピュータプログラムを一時的に記憶する。また、RAM202は、IF201を介して外部から取得したデータ(コマンドや画像データ)などを一時的に記憶する。また、RAM202は、CPU200が後述の画像処理を実行する際に用いるワークエリアを提供する。また、RAM202は、例えば、フレームメモリとして機能したり、バッファメモリとして機能したりする。   A RAM (RANDOM ACCESS MEMORY) 202 temporarily stores a computer program executed by the CPU 200. The RAM 202 temporarily stores data (commands and image data) acquired from the outside via the IF 201. The RAM 202 provides a work area used when the CPU 200 executes image processing to be described later. The RAM 202 functions as a frame memory or a buffer memory, for example.

CPU200は、RAM202に格納されるコンピュータプログラムを実行する。なおCPU以外にも、DSP(DIGITAL SIGNAL PROCESSOR)等のプロセッサを用いてもよい。   CPU 200 executes a computer program stored in RAM 202. In addition to the CPU, a processor such as a DSP (DIGITAL SIGNAL PROCESSOR) may be used.

HDD(HARD DISK DRIVE)203は、オペレーティングシステムのプログラムや画像データを記憶する。後述する図5および図7のフローチャートを実行するためのコンピュータプログラムやデータはHDD203に格納されており、CPU200による制御に従って、適宜、RAM202にロードされ、CPU200によって実行される。なおHDD以外にもフラッシュメモリ等の他の記憶媒体を用いてもよい。   An HDD (HARD DISK DRIVE) 203 stores an operating system program and image data. Computer programs and data for executing the flowcharts of FIGS. 5 and 7 to be described later are stored in the HDD 203, and are appropriately loaded into the RAM 202 and executed by the CPU 200 under the control of the CPU 200. In addition to the HDD, other storage media such as a flash memory may be used.

なお、画像処理装置100の筐体は表示装置101と一体であってもよい。UI(USER INTERFACE)204は、キーボードやマウスなどの入力装置である。   Note that the housing of the image processing apparatus 100 may be integrated with the display apparatus 101. A UI (USER INTERFACE) 204 is an input device such as a keyboard or a mouse.

なお、以降の説明では、CPU200が画像処理を実行する例について説明するが、CPU200の処理のうち少なくとも一部を専用のハードウェアによって行うようにしてもよい。例えば、表示装置101にGUI(GRAPHICAL USER INTERFACE)や画像データを表示する処理は、GPU(GRAPHICS PROCESSING UNIT)で実行してもよい。また、HDD203からプログラムコードを読み出してRAM202に展開する処理は、転送装置として機能するDMA(DIRECT MEMORY ACCESS)によって実行してもよい。   In the following description, an example in which the CPU 200 executes image processing will be described. However, at least a part of the processing of the CPU 200 may be performed by dedicated hardware. For example, processing for displaying GUI (GRAPHICAL USER INTERFACE) and image data on the display device 101 may be executed by a GPU (GRAPHICS PROCESSING UNIT). Further, the process of reading the program code from the HDD 203 and expanding it into the RAM 202 may be executed by a DMA (DIRECT MEMORY ACCESS) functioning as a transfer device.

次に、撮影装置102のハードウェア構成について説明する。CPU210は撮影装置102を統括制御する中央処理装置である。   Next, the hardware configuration of the photographing apparatus 102 will be described. A CPU 210 is a central processing unit that performs overall control of the photographing apparatus 102.

IF211は、ネットワーク104を介してTCP/IPやHTTP、ONVIF等のプロトコルに従って、画像処理装置100との通信を行う。IF211は、画像処理装置100へ画像の画像データなどを送信したり、撮影装置102を制御するための各種のコマンドなどを画像処理装置100から受信したりする。   The IF 211 communicates with the image processing apparatus 100 via the network 104 according to a protocol such as TCP / IP, HTTP, or ONVIF. The IF 211 transmits image data of the image to the image processing apparatus 100 and receives various commands from the image processing apparatus 100 for controlling the photographing apparatus 102.

RAM212は、CPU210が実行するコンピュータプログラムを一時的に記憶する。また、RAM212は、IF211を介して外部から取得したデータ(コマンドや撮像条件に関するパラメータなど)を一時的に記憶する。また、RAM212は、CPU210が処理を実行する際に用いるワークエリアを提供する。また、RAM212は、例えば、フレームメモリとして機能したり、バッファメモリとして機能したりする。   The RAM 212 temporarily stores a computer program executed by the CPU 210. The RAM 212 temporarily stores data (commands, parameters relating to imaging conditions, etc.) acquired from the outside via the IF 211. The RAM 212 provides a work area used when the CPU 210 executes processing. The RAM 212 functions as, for example, a frame memory or a buffer memory.

ROM213は、CPU210が撮影装置102を制御するためのプログラムなどを記憶する。なお、ROM213に加えてHDD203と同等な二次記憶装置を備えるようにしてもよい。   The ROM 213 stores a program for the CPU 210 to control the photographing apparatus 102 and the like. In addition to the ROM 213, a secondary storage device equivalent to the HDD 203 may be provided.

撮影デバイス214は、動画または静止画を撮影するビデオカメラ、赤外線カメラなどの撮影デバイスである。なお、撮影装置102の筐体と撮影デバイス214の筐体は一体でなくてもよい。   The photographing device 214 is a photographing device such as a video camera or an infrared camera for photographing a moving image or a still image. Note that the housing of the photographing apparatus 102 and the housing of the photographing device 214 may not be integrated.

次に、図3(a)を参照して、本実施形態に係る画像処理装置100について説明する。図3(a)は、本実施形態に係る画像処理装置100の機能ブロック図である。なお、図3(a)に示す各機能ブロックは、ソフトウェアモジュールで実現してもよいし、ハードウェアモジュールで実現してもよい。また、ソフトウェアモジュールとハードウェアモジュールとを協働させて実現してもよい。なお、以降の説明においては、画像処理装置100が有する各機能は、画像処理装置100のCPU200により実行されるものとする。   Next, the image processing apparatus 100 according to the present embodiment will be described with reference to FIG. FIG. 3A is a functional block diagram of the image processing apparatus 100 according to the present embodiment. Each functional block shown in FIG. 3A may be realized by a software module or a hardware module. Further, the software module and the hardware module may be realized in cooperation. In the following description, each function of the image processing apparatus 100 is assumed to be executed by the CPU 200 of the image processing apparatus 100.

本実施形態における画像処理装置100は、通信部300と、検出部301と、追尾部302と、保持部303と、判定部304と、算出部305と、設定部306と、出力制御部307と、操作受付部308と、記憶部309とを有する。   The image processing apparatus 100 according to the present embodiment includes a communication unit 300, a detection unit 301, a tracking unit 302, a holding unit 303, a determination unit 304, a calculation unit 305, a setting unit 306, and an output control unit 307. , An operation receiving unit 308 and a storage unit 309.

通信部300は、ネットワーク104を介して、撮影装置102が撮影した画像の画像データなどを受信したり、撮影装置102を制御するための各種のコマンドなどを撮影装置102へ送信したりする。   The communication unit 300 receives image data of an image captured by the image capturing device 102 via the network 104 and transmits various commands for controlling the image capturing device 102 to the image capturing device 102.

検出部301は、画像における検出領域を対象にして所定の物体(人や車など)を検出する検出処理を行う。本実施形態における検出部301は、照合パターン(辞書)を使用して、画像の検出領域を対象にして人体を検出する検出処理を行う。なお、検出領域は、検出部301が検出処理を行う対象とする画像内の領域であり、検出領域について照合パターンを走査する。   The detection unit 301 performs detection processing for detecting a predetermined object (such as a person or a car) for a detection region in the image. The detection unit 301 according to the present embodiment performs a detection process for detecting a human body in a detection region of an image using a matching pattern (dictionary). The detection area is an area in the image that is a target for the detection unit 301 to perform a detection process, and the detection area is scanned with a matching pattern.

なお、画像から人体などの特定の物体を検出する場合において、人体が正面向きである場合と横向きである場合とで使用する照合パターンを使い分けることで検出精度の向上が期待できる。例えば、正面(背面)向きの人体の画像と照合させるための照合パターンと、横向きの人体の画像と照合させるための照合パターンとを保持し、撮影装置102の設置状況(通路の方向と撮影方向の関係)やユーザーの指定に基づいて使い分けることができる。   In the case of detecting a specific object such as a human body from an image, improvement in detection accuracy can be expected by using different verification patterns depending on whether the human body is facing front or sideways. For example, a collation pattern for collating with an image of a human body facing the front (rear) and a collation pattern for collating with an image of a human body facing sideways are stored, and the installation state of the photographing apparatus 102 (direction of passage and photographing direction) Relationship) and user designation.

また、照合パターンは、斜め方向からや上方向からなど他の角度からのものを用意しておいてもよい。また、人体を検出する場合、全身の特徴を辞書化しておく必要はなく、上半身、下半身、頭部、顔、足などの人体の一部について照合パターンを用意してもよい。照合パターンは人体以外にも、車や動物など特定の移動体を検出するために用意しておけばよい。   The collation pattern may be prepared from another angle, such as from an oblique direction or an upward direction. Further, when detecting a human body, it is not necessary to create a dictionary of the features of the whole body, and a collation pattern may be prepared for a part of the human body such as the upper body, lower body, head, face, and feet. The verification pattern may be prepared for detecting a specific moving body such as a car or an animal in addition to the human body.

なお、検出部301は、ユーザーが検出したい対象である物体を画像から検出する機能を有していればよく、既知の動体検出や肌色検出などでもよく、パターンマッチング処理に限定されるものではない。また、以降の説明では本実施形態における検出部301は、検出処理を行う対象を人体として説明するが、検出処理を行う対象として、例えば、人の顔、車、動物等であってもよい。   The detection unit 301 only needs to have a function of detecting an object, which is a target that the user wants to detect, from an image, and may be a known moving object detection or skin color detection, and is not limited to pattern matching processing. . Further, in the following description, the detection unit 301 in the present embodiment will be described on the assumption that the detection processing target is a human body, but the detection processing target may be, for example, a human face, a car, an animal, or the like.

追尾部302は、検出部301により検出された人体を追尾する。本実施形態における追尾部302は、着目フレームよりも1つ以上前のフレームの画像から検出部301が検出した人体と同じ人体を検出部301が着目フレームの画像から検出した場合、それぞれのフレームにおける人体同士を対応づける。すなわち、時間的に近い複数のフレームについて画像間で物体を追尾する。   The tracking unit 302 tracks the human body detected by the detection unit 301. In the present embodiment, the tracking unit 302, when the detection unit 301 detects the same human body as the human body detected by the detection unit 301 from the image of one or more frames before the target frame, from the image of the target frame, Associate human bodies with each other. That is, an object is tracked between images for a plurality of frames that are close in time.

なお、追尾部302は、追尾する対象となる人体ごとにIDを付与する。例えば、追尾部302は、着目フレームよりも1つ以上前のフレームの画像から検出部301が検出した人体に対してID=1を付与したとする。そして、検出部301が着目フレームの画像からもこの人体を検出した場合、追尾部302は、この人体にもID=1を付与する。このように、複数のフレームの画像にわたって同じ人体が検出された場合には、それぞれの物体に同じIDを付与する。なお、記憶部309は、追尾部302が追尾する人体に対応するIDごとに、その人体の画像における位置と、画像が撮影された時刻とを含んだ軌跡情報を記憶する。なお、軌跡情報についての更に詳細な説明は図6を参照して後述する。   The tracking unit 302 assigns an ID to each human body to be tracked. For example, it is assumed that the tracking unit 302 assigns ID = 1 to the human body detected by the detection unit 301 from the image of one or more frames before the frame of interest. When the detection unit 301 detects this human body from the image of the frame of interest, the tracking unit 302 also assigns ID = 1 to this human body. Thus, when the same human body is detected over a plurality of frames of images, the same ID is assigned to each object. Note that the storage unit 309 stores, for each ID corresponding to the human body tracked by the tracking unit 302, trajectory information including the position of the human body in the image and the time when the image was captured. A more detailed description of the trajectory information will be described later with reference to FIG.

追尾部302が複数のフレームの画像にわたって同じ物体であると判断する方法として、例えば、検出された物体の移動ベクトルを用いて物体の移動予測位置と検出した物体位置が一定距離内であれば同一物体であるとする。また、追尾部302が物体の色、形状、大きさ(画素数)等を用いて、複数のフレームの画像間で相関の高い物体を対応付けてもよい。このように、追尾部302は、複数のフレームの画像にわたって同じ物体であると判断し追尾する処理を実行できればよく、特定の方法に限定されるものではない。   As a method for determining that the tracking unit 302 is the same object over a plurality of frames of images, for example, using the movement vector of the detected object, the same if the predicted movement position of the object and the detected object position are within a certain distance. Suppose it is an object. Further, the tracking unit 302 may associate objects having high correlation between images of a plurality of frames using the color, shape, size (number of pixels) of the object, and the like. As described above, the tracking unit 302 is not limited to a specific method as long as it can perform processing for determining and tracking the same object over a plurality of frames of images.

保持部303は、追尾部302により追尾される人体が検知線を通過したか否かを判定するためのパラメータ、つまり、検知線を規定するパラメータの情報を保持する。例えば、出力制御部307により表示装置101に出力された画像に対して、ユーザーが指定した画像上における2点の位置座標の情報を操作受付部308が受け付ける。そして、保持部303は、その2点の位置座標の情報が検知線を規定するパラメータとして保持する。なお、本実施形態において、画像の左下の端点を原点とした(x、y)座標を位置座標の情報として定められるとし、2点の位置座標を結ぶ線が検知線となる。なお保持部303は、事前に予め登録されたパラメータを保持してもよく、このパラメータにより規定されるラインを画像内における検知線としてもよい。   The holding unit 303 holds parameters for determining whether or not the human body tracked by the tracking unit 302 has passed the detection line, that is, information on a parameter that defines the detection line. For example, with respect to the image output to the display device 101 by the output control unit 307, the operation receiving unit 308 receives information on the position coordinates of two points on the image designated by the user. And the holding | maintenance part 303 hold | maintains the information of the position coordinate of the two points as a parameter which prescribes | regulates a detection line. In the present embodiment, (x, y) coordinates with the lower left end point of the image as the origin are determined as position coordinate information, and a line connecting the position coordinates of the two points is a detection line. The holding unit 303 may hold a parameter registered in advance, and a line defined by the parameter may be a detection line in the image.

判定部304は、追尾部302により追尾される人体が画像における検知線を通過したこと及びその通過方向を判定する。なお、本実施形態における判定部304は、記憶部309が記憶する人体ごとの軌跡情報と、検知線を規定するパラメータとに基づいて、人体が検知線を通過したこと及びその通過方向を判定する。なお、記憶部309は、判定部304により通過したことを判定された時刻と、通過した人体のIDと、通過方向とを含む通過情報を記憶する。   The determination unit 304 determines that the human body tracked by the tracking unit 302 has passed the detection line in the image and its passing direction. Note that the determination unit 304 in the present embodiment determines that the human body has passed the detection line and its passing direction based on the trajectory information for each human body stored in the storage unit 309 and the parameters that define the detection line. . Note that the storage unit 309 stores passage information including the time when it is determined by the determination unit 304 that it has passed, the ID of the human body that has passed, and the passing direction.

算出部305は、判定部304により検知線を通過したと判定された人体の数を通過方向ごとに算出する。算出部305により算出された通過方向ごとの人体の数は、記憶部309が記憶する。   The calculation unit 305 calculates the number of human bodies determined by the determination unit 304 as having passed the detection line for each passing direction. The storage unit 309 stores the number of human bodies for each passing direction calculated by the calculation unit 305.

設定部306は、算出部305の結果に基づいて、検出部301が検出処理を行う領域である検出領域を設定する。なお、本実施形態における設定部306は、通過方向ごとの人体の数が所定の条件を満たした場合、検知線を通過する人体の数が多い通過方向の入口側と出口側の領域を規定したとき、出口側の領域における検出領域の面積が小さくなるよう検出領域を設定する。   Based on the result of the calculation unit 305, the setting unit 306 sets a detection region that is a region where the detection unit 301 performs a detection process. Note that the setting unit 306 in the present embodiment defines the areas on the entrance side and the exit side in the passing direction in which the number of human bodies passing through the detection line is large when the number of human bodies in each passing direction satisfies a predetermined condition. At this time, the detection region is set so that the area of the detection region in the region on the exit side becomes small.

出力制御部307は、通信部300が受信した画像や本実施形態に係る画像処理の結果などを表示装置101に出力する。   The output control unit 307 outputs the image received by the communication unit 300, the result of image processing according to the present embodiment, and the like to the display device 101.

操作受付部308は、UI204を介したユーザーにより行われた操作の情報を受け付ける。例えば、操作受付部308は、ユーザーにより画像内に指定されたラインの位置座標に関する情報を受け付ける。   The operation reception unit 308 receives information on an operation performed by the user via the UI 204. For example, the operation reception unit 308 receives information related to the position coordinates of the line specified in the image by the user.

記憶部309は、追尾部302により追尾される人体に関する情報や、判定部304により通過したことを判定された人体に関する情報などを記憶する。   The storage unit 309 stores information related to the human body tracked by the tracking unit 302, information related to the human body determined to have passed by the determination unit 304, and the like.

次に、図3(b)を参照して、本実施形態に係る撮影装置102について説明する。図3(b)は、撮影装置102の機能ブロック図である。撮影装置102は、撮影部330と、画像処理部331と、制御部332と、通信部333とを有する。   Next, the photographing apparatus 102 according to the present embodiment will be described with reference to FIG. FIG. 3B is a functional block diagram of the photographing apparatus 102. The photographing apparatus 102 includes a photographing unit 330, an image processing unit 331, a control unit 332, and a communication unit 333.

撮影部330は、CCD(charge coupled device)センサやCMOS(complementary metal oxide semiconductor)センサ等の撮像素子により構成される。そして、撮影部330は、撮影装置102のレンズを通って結像された被写体像を光電変換して電気信号を生成する。   The imaging unit 330 includes an image sensor such as a CCD (charge coupled device) sensor or a CMOS (complementary metal oxide semiconductor) sensor. Then, the photographing unit 330 photoelectrically converts the subject image formed through the lens of the photographing apparatus 102 to generate an electrical signal.

画像処理部331は、撮影部330において光電変換された電気信号をデジタル信号へ変換する処理や、圧縮符号化処理などを行い、画像データを生成する。   The image processing unit 331 performs processing for converting the electrical signal photoelectrically converted in the photographing unit 330 into a digital signal, compression encoding processing, and the like, and generates image data.

制御部332は、画像処理装置100から受信した撮影装置102を制御するコマンドに従い、撮影装置102を制御する。例えば、制御部332は、撮影装置102の画角を変更する制御を行う。   The control unit 332 controls the photographing apparatus 102 according to the command for controlling the photographing apparatus 102 received from the image processing apparatus 100. For example, the control unit 332 performs control to change the angle of view of the photographing apparatus 102.

通信部333は、画像処理装置100との通信を行うインターフェースである。例えば、通信部333は、画像処理部331で生成された画像データを画像処理装置100に送信する。また、通信部333は、画像処理装置100が送信する撮影装置102を制御するコマンドを受信する。   The communication unit 333 is an interface that performs communication with the image processing apparatus 100. For example, the communication unit 333 transmits the image data generated by the image processing unit 331 to the image processing apparatus 100. Further, the communication unit 333 receives a command for controlling the photographing apparatus 102 transmitted by the image processing apparatus 100.

次に、図4〜図6を参照して、本実施形態に係る画像処理について説明する。なお、以降の説明において、本実施形態に係る画像処理の対象となる物体は人体とする。例えば、検出部301は人体を検出する検出処理を行うとして説明する。   Next, image processing according to the present embodiment will be described with reference to FIGS. In the following description, the object that is the target of image processing according to the present embodiment is a human body. For example, the detection unit 301 will be described as performing detection processing for detecting a human body.

図4は、本実施形態に係る画像処理を説明するための模式図である。なお、図4(b)は図4(a)に映っている人体が検知線を通り過ぎてから撮影されている様子を示す模式図である。   FIG. 4 is a schematic diagram for explaining image processing according to the present embodiment. FIG. 4B is a schematic diagram showing a state where the human body shown in FIG. 4A is photographed after passing the detection line.

図4において、画像400aおよび画像400bは通信部300が受信した画像である。なお画像400bは、画像400aが撮影装置102により撮影された時刻から所定時間経過したのちに撮影された画像である。領域401aおよび領域401bは、検出部301が人体の検出処理を行う対象となる検出領域である。なお、領域401aは、画像400における全体の領域であり、予め設定された検出領域である。また、領域401bは、画像400における一部分の領域である。領域401cは、検出部301により人体の検出処理が行われない領域である。   In FIG. 4, an image 400 a and an image 400 b are images received by the communication unit 300. The image 400b is an image taken after a predetermined time has elapsed from the time when the image 400a was taken by the photographing apparatus 102. The region 401a and the region 401b are detection regions that are targets for the detection unit 301 to perform human body detection processing. The region 401a is the entire region in the image 400, and is a preset detection region. An area 401 b is a partial area in the image 400. The area 401c is an area where the human body detection process is not performed by the detection unit 301.

ライン403は、画像において通過する人体を検知するための検知線である。なお、画像400aや画像400bなど通信部300が受信する画像が示す全体の領域は、便宜的に、ライン403を基準にして領域Aと領域Bとで分かれるものとして説明する。枠405は、検出部301により検出された人体404の位置と大きさを示す枠である。   A line 403 is a detection line for detecting a human body passing through the image. Note that the entire area indicated by the image received by the communication unit 300, such as the image 400a and the image 400b, is described as being divided into the area A and the area B on the basis of the line 403 for convenience. A frame 405 is a frame indicating the position and size of the human body 404 detected by the detection unit 301.

また説明の簡便化のため、領域Aを基準として、領域Aから領域Bの方向へ人体がライン403を通過した場合の通過方向を「IN方向」とする。対して、領域Bから領域Aへ人体がライン403を通過した場合の通過方向を「OUT方向」とする。なお矢印402は、IN方向を示す矢印である。   For the sake of simplicity, the passing direction when the human body passes through the line 403 from the region A to the region B with the region A as a reference is referred to as “IN direction”. On the other hand, the passing direction when the human body passes through the line 403 from the region B to the region A is referred to as “OUT direction”. An arrow 402 is an arrow indicating the IN direction.

次に本実施形態における画像処理について図5に示すフローチャートを参照して説明する。図5(a)は、本実施形態に係る通過カウント処理の流れを示すフローチャートである。また、図5(b)は、本実施形態に係る検出領域の設定処理の流れを示すフローチャートである。   Next, image processing in the present embodiment will be described with reference to a flowchart shown in FIG. FIG. 5A is a flowchart showing the flow of the pass count process according to the present embodiment. FIG. 5B is a flowchart showing the flow of detection area setting processing according to the present embodiment.

なお、本実施形態において、図5に示すフローチャートの処理は、画像処理装置100のHDD203に格納されたコンピュータプログラムをCPU200が実行することにより実現される図3の各機能ブロックにより実行されるものとして説明する。しかし、図5に示すフローチャートの処理の一部は、専用のハードウェアによって実行するようにしてもよい。   In the present embodiment, the processing of the flowchart shown in FIG. 5 is executed by each functional block of FIG. 3 realized by the CPU 200 executing the computer program stored in the HDD 203 of the image processing apparatus 100. explain. However, a part of the processing of the flowchart shown in FIG. 5 may be executed by dedicated hardware.

まず、図5(a)を参照して、本実施形態に係る通過カウント処理のフローチャートについて説明する。ステップS501において、通信部300は、ネットワーク104を介して、画像データを受信する。   First, with reference to FIG. 5A, a flowchart of the passage count process according to the present embodiment will be described. In step S <b> 501, the communication unit 300 receives image data via the network 104.

次に、ステップS502において、検出部301は、画像における検出領域を対象にして人体を検出する検出処理を行う。なお設定部306の後述する処理が行われる前における初期の段階では、検出部301は、画像全体に予め設定された検出領域である領域401aを対象に検出処理を行うものとする。図4(a)において、検出部301は人体404を検出する。なお、出力制御部307は、検出された人体404の位置と大きさが分かるような枠を、人体404に外接するように画像に重畳させて表示装置101に表示させてもよい。   Next, in step S502, the detection unit 301 performs a detection process for detecting a human body with respect to a detection region in the image. It should be noted that in the initial stage before the processing described later of the setting unit 306 is performed, the detection unit 301 performs the detection process on the region 401a that is a detection region set in advance for the entire image. In FIG. 4A, the detection unit 301 detects a human body 404. Note that the output control unit 307 may display a frame on the display device 101 so that the detected position and size of the human body 404 can be superimposed on the image so as to circumscribe the human body 404.

次に、ステップS503において、追尾部302は、検出部301により検出された人体を追尾する。図4(a)において、追尾部302は、人体404の追尾を行い、さらに人体404に対してID=1を付与するものとする。ここで図6(a)を参照して、追尾部302により追尾される人体の軌跡の情報である軌跡情報について説明する。   Next, in step S503, the tracking unit 302 tracks the human body detected by the detection unit 301. In FIG. 4A, the tracking unit 302 tracks the human body 404 and further assigns ID = 1 to the human body 404. Here, with reference to FIG. 6A, trajectory information, which is information on the trajectory of the human body tracked by the tracking unit 302, will be described.

図6(a)は人体の軌跡情報を示すデータ構成図の一例である。図6(a)における軌跡情報を示すデータ構成は、追尾部302により付与されたID毎に、人体の軌跡情報として、検出部301により検出された時刻と、検出された画像における座標の位置とが含まれている。なお、図6(a)に示すデータ構成の例では、追尾部302によりID=1と付与された人体について、検出部301により検出された時刻と、その時刻における画像内での人体の位置が示されている。このような軌跡情報は、追尾部302により追尾されるID毎、すなわち、人体毎に存在し、それらの軌跡情報は記憶部309にて記憶される。なお、人体の位置は、画像における人体の位置を示す枠(例えば、枠405)の中心点の座標として説明する。   FIG. 6A is an example of a data configuration diagram showing the trajectory information of the human body. The data structure indicating the trajectory information in FIG. 6A includes the time detected by the detection unit 301 as the trajectory information of the human body and the position of the coordinates in the detected image for each ID given by the tracking unit 302. It is included. In the example of the data configuration shown in FIG. 6A, for the human body given ID = 1 by the tracking unit 302, the time detected by the detection unit 301 and the position of the human body in the image at that time are as follows. It is shown. Such trajectory information exists for each ID tracked by the tracking unit 302, that is, for each human body, and the trajectory information is stored in the storage unit 309. The position of the human body will be described as the coordinates of the center point of a frame (for example, the frame 405) indicating the position of the human body in the image.

次に、ステップS504において、判定部304は、追尾部302により追尾される人体がパラメータにより規定される画像内に設定された検知線を通過したこと及びその通過方向を判定する。図4において、画像400aが撮影された時刻から画像400bが撮影された時刻までの過程で、人体404は領域Aから領域Bへ移動した場合、判定部304は、人体404が検知線をIN方向へ通過したと判定する。なお、判定部304により人体が検知線を通過した時刻と、その人体に付与されたIDと、通過方向とを含む情報である通過情報は記憶部309により記憶される。図6(b)は通過情報の一例を示すデータ構成図である。図6(b)が示すデータ構成には、判定部304により通過したことを判定された時刻と、通過した人体に付与されたIDと、通過した人体の通過方向が含まれている。   Next, in step S504, the determination unit 304 determines that the human body tracked by the tracking unit 302 has passed the detection line set in the image defined by the parameter and its passing direction. In FIG. 4, when the human body 404 moves from the region A to the region B in the process from the time when the image 400a is captured to the time when the image 400b is captured, the determination unit 304 causes the human body 404 to move the detection line in the IN direction. It is determined that it has passed. The storage unit 309 stores passage information that is information including the time when the human body passes the detection line by the determination unit 304, the ID assigned to the human body, and the passage direction. FIG. 6B is a data configuration diagram illustrating an example of passage information. The data configuration shown in FIG. 6B includes the time when it is determined by the determination unit 304 that it has passed, the ID assigned to the passed human body, and the passing direction of the passed human body.

次に、図5(b)を参照して、検出領域を設定する処理について説明する。ステップS505において、算出部305は、判定部304により検知線を通過したと判定された人体の数を通過方向ごとに算出する。つまり、算出部305は、通過方向ごとの人体の通過量を算出する。なお本実施形態における算出部305は、記憶部309に記憶される通過情報に基づいて、通過方向ごとの人体の通過量を算出するものとする。   Next, processing for setting a detection area will be described with reference to FIG. In step S505, the calculation unit 305 calculates the number of human bodies determined by the determination unit 304 to have passed the detection line for each passing direction. That is, the calculation unit 305 calculates the passing amount of the human body for each passing direction. Note that the calculation unit 305 in the present embodiment calculates the passing amount of the human body for each passing direction based on the passing information stored in the storage unit 309.

算出部305により算出された通過方向ごとの人体の数は、記憶部309が記憶する。なお、出力制御部307は、算出部305により算出された通過方向ごとの人体の数を画像に重畳させて表示装置101に出力するようにしてもよい。   The storage unit 309 stores the number of human bodies for each passing direction calculated by the calculation unit 305. Note that the output control unit 307 may superimpose the number of human bodies for each passing direction calculated by the calculation unit 305 on the image and output the image to the display device 101.

次に、ステップS506において、検出領域設定の条件を満たしたか否かを判定する。本実施形態において、最新一定期間において、或る一方向を通過した人数が所定値以上かつもう一方向を通過した人数が所定値以下の条件を満たしたか否かを条件とする。なお以下の説明において、或る一方向を直前5秒間にて通過した人数が10人以上、かつ、もう一方向を直前5秒間にて通過した人数が1人以下であるか否かの条件を検出領域設定の条件とするが、これに限らない。例えば、最新の一定期間において、通過方向ごとの通過する人体の数の差分が所定値以上であるかの条件を検出領域設定の条件としてもよく、通過量に偏りがあるか否かを判定できる条件であればよい。また、検出領域設定の条件については、予め事前に登録された条件でもよいし、ユーザーにより適宜設定されるようにしてもよい。   Next, in step S506, it is determined whether or not a detection area setting condition is satisfied. In the present embodiment, the condition is whether or not the number of people who have passed in one direction satisfies a condition equal to or greater than a predetermined value and the number of people who have passed in another direction satisfies a predetermined value or less in the latest certain period. In the following description, the condition whether or not the number of people who passed in one direction in the last 5 seconds is 10 or more and the number of people who passed in the other direction in the last 5 seconds is 1 or less is determined. The detection area setting condition is not limited to this. For example, in the latest fixed period, the condition of whether the difference in the number of passing human bodies in each passing direction is a predetermined value or more may be set as the detection region setting condition, and it can be determined whether or not the passing amount is biased. Any condition is acceptable. The detection area setting condition may be a condition registered in advance or may be set as appropriate by the user.

ステップS506においてNoの場合、ステップS507の処理へ移行する。ステップS507にて、設定部306は、第一の領域を検出領域として設定する。なお、本実施形態において、第一の領域は画像全体の領域を示し、図4の場合、第一の領域は領域401aとなる。   If No in step S506, the process proceeds to step S507. In step S507, the setting unit 306 sets the first area as a detection area. In the present embodiment, the first area indicates the entire image area, and in the case of FIG. 4, the first area is the area 401a.

ステップS506においてYesの場合、ステップS508の処理へ移行する。ステップS508にて、設定部306は、第二の領域を検出領域として設定する。第二の領域は、通過した人数が多い通過方向の入口側と出口側の領域を規定したとき、出口側での領域における検出領域の面積を小さくするように設定された領域である。例えば、図4において、IN方向を直前5秒間で通過した人数が10人以上、かつ、OUT方向を直前5秒間で通過した人数が1人以下である場合を想定する。このとき、設定部306は、通過した人数が多い方向であるIN方向の出口側である領域Bの検出領域の面積を減らすように検出領域を設定する。なおこのとき、本実施形態の設定部306は、領域Bを対象に、検知線の延伸方向に直交する方向において、検知線から所定長の距離406までは検出領域とし、検知線から距離406の長さ以上に離れた領域における検出領域の面積を削るようにする。この場合、設定部306は、領域401aから領域401cを削った領域401bを検出領域として設定する。設定部306が設定した検出領域の大きさ及び位置の情報は記憶部309にて記憶される。   If Yes in step S506, the process proceeds to step S508. In step S508, the setting unit 306 sets the second area as a detection area. The second region is a region set so as to reduce the area of the detection region in the region on the exit side when the region on the entrance side and the exit side in the passing direction in which the number of people who have passed is defined. For example, in FIG. 4, it is assumed that the number of people who passed the IN direction in the last 5 seconds is 10 or more and the number of people who passed the OUT direction in the last 5 seconds is 1 or less. At this time, the setting unit 306 sets the detection region so as to reduce the area of the detection region of the region B on the exit side in the IN direction, which is the direction in which the number of people who have passed is large. At this time, the setting unit 306 of the present embodiment targets the region B as a detection region in a direction orthogonal to the extension direction of the detection line, from the detection line to a distance 406 of a predetermined length, and sets the distance 406 from the detection line. The area of the detection region in the region separated by more than the length is reduced. In this case, the setting unit 306 sets an area 401b obtained by removing the area 401c from the area 401a as a detection area. Information on the size and position of the detection area set by the setting unit 306 is stored in the storage unit 309.

このように、最新一定期間において通過方向ごとの通過量に偏りが生じている場合、通過量の偏りが継続すると推定することができる。そこで、通過量に偏りが生じている通過方向に基づいて、検出領域の大きさを変更する。具体的には、通過量が多い通過方向の入口側と出口側の領域を規定したとき、出口側での領域における検出処理を行う面積を小さくすることで、すでに検知線を通過したと判定された人に対して検出処理を行う負荷を低減することができる。   Thus, when there is a deviation in the passage amount for each passage direction in the latest fixed period, it can be estimated that the deviation in the passage amount continues. Therefore, the size of the detection area is changed based on the passing direction in which the passing amount is biased. Specifically, when the area on the entrance side and the exit side in the passing direction with a large amount of passage is defined, it is determined that the detection line has already been passed by reducing the area for performing the detection process in the area on the exit side. It is possible to reduce the load of performing detection processing on a person who has been injured.

次に、ステップS509にて、出力制御部307は、ステップS507またはステップS508にて設定部306により設定された検出領域の位置を画像に重畳させて表示装置101に出力する。こうすることにより、人体の検出処理の対象となる検出領域の位置をユーザーは容易に把握することができる。   Next, in step S509, the output control unit 307 superimposes the position of the detection region set by the setting unit 306 in step S507 or step S508 on the image and outputs the image to the display device 101. By doing so, the user can easily grasp the position of the detection region that is the target of the human body detection process.

なお、ステップS508において、設定部306は、通過方向ごとの通過する人体の数に応じて、領域401cの面積を変化させるようにしてもよい。例えば、或る一方向を直前5秒間で通過した人数が10人以上、かつ、もう一方向を直前5秒間で通過した人数が1人以下であるという条件(S506)を満たしたうえで、通過した人数が多ければ多い程、領域401cの面積を大きくするようにしてもよい。   In step S508, the setting unit 306 may change the area of the region 401c according to the number of human bodies that pass in each passing direction. For example, the number of people who passed in one direction in the last 5 seconds is 10 or more, and the number of people who passed in the other direction in the last 5 seconds is 1 or less (S506). The larger the number of people, the larger the area 401c may be.

なお、本実施形態における設定部306は、検知線を通過する通過量に基づいて、検出領域の大きさを変更するようにしたが、これに限定されない。設定部306は、検知線を通過する通過量に基づいて、検出部301により検出処理が行われる頻度を変更するようにしてもよい。   Note that the setting unit 306 in the present embodiment changes the size of the detection region based on the amount of passage through the detection line, but is not limited thereto. The setting unit 306 may change the frequency with which the detection processing is performed by the detection unit 301 based on the passage amount passing through the detection line.

例えば、検出部301は、初期の段階において、通信部300が受信する画像のうち毎フレームに対して、つまり1フレームに1回の頻度で検出処理を行う場合を想定する。このとき、ステップS507にて、つまり検知線を通過する通過量の偏りが少ない場合、設定部306は、領域Aおよび領域Bを対象に、毎フレームに対して検出処理が行われるよう設定する。   For example, it is assumed that the detection unit 301 performs detection processing for each frame in the image received by the communication unit 300 in an initial stage, that is, at a frequency of once per frame. At this time, in step S507, that is, when the deviation of the passing amount passing through the detection line is small, the setting unit 306 sets the detection processing for each frame for the regions A and B.

そして、ステップS508にて、つまり検知線を通過する通過量に偏りがある場合、通過した人数が多い通過方向の入口側と出口側の領域を規定したとき、設定部306は、出口側での領域では、5フレームに1回の頻度で検出処理が行われるよう設定する。例えば、図4において、IN方向を直前5秒間で通過した人数が10人以上、かつ、OUT方向を直前5秒間で通過した人数が1人以下である場合を想定する。このとき、設定部306は、領域Aでは検出処理の頻度を毎フレームに設定し、通過した人数が多い方向であるIN方向の出口側である領域Bにおいては、検出部301による検出処理の頻度を5フレームに1回に設定する。   In step S508, that is, when the amount of passage through the detection line is uneven, when the entrance side and exit side regions in the passage direction with a large number of people passing are defined, the setting unit 306 In the area, the detection process is set to be performed once every five frames. For example, in FIG. 4, it is assumed that the number of people who passed the IN direction in the last 5 seconds is 10 or more and the number of people who passed the OUT direction in the last 5 seconds is 1 or less. At this time, the setting unit 306 sets the detection processing frequency for each frame in the region A, and the detection processing frequency by the detection unit 301 in the region B on the exit side in the IN direction, which is the direction in which many people have passed. Is set to once every 5 frames.

なお、ステップS508にて、通過した人数が多い通過方向の入口側と出口側の領域を規定したとき、設定部306は、出口側での領域において、検知線からの距離に基づいて検出処理の頻度を変更するようにしてもよい。例えば、図4において、IN方向を直前5秒間で通過した人数が10人以上、かつ、OUT方向を直前5秒間で通過した人数が1人以下である場合を想定する。このとき設定部306は、IN方向の入口側の領域である領域Aでは検出処理の頻度を毎フレームに設定する。そして、設定部306は、IN方向の出口側の領域である領域Bを対象に、検知線と直交する方向において、検知線から距離406までは検出処理の頻度を毎フレームに設定し、距離406より離れた領域では5フレームに1回を検出処理の頻度として設定する。   In step S508, when the areas on the entrance side and the exit side in the passing direction with a large number of people passing are defined, the setting unit 306 performs detection processing based on the distance from the detection line in the area on the exit side. The frequency may be changed. For example, in FIG. 4, it is assumed that the number of people who passed the IN direction in the last 5 seconds is 10 or more and the number of people who passed the OUT direction in the last 5 seconds is 1 or less. At this time, the setting unit 306 sets the frequency of detection processing for each frame in the area A which is the area on the entrance side in the IN direction. Then, the setting unit 306 sets the frequency of detection processing for each frame from the detection line to the distance 406 in the direction orthogonal to the detection line for the area B that is the area on the exit side in the IN direction. In a more distant area, once every 5 frames is set as the frequency of detection processing.

以上のように、設定部306は、検知線を通過する通過量に基づいて、検出処理の頻度を変更するようにしてもよい。具体的には、設定部306は、通過量が多い通過方向の入口側と出口側の領域を規定したとき、出口側での領域において、検出部301により検出処理が行われる頻度を少なくするようにしてもよい。こうすることにより、通過量が少ない通過方向を通過する人に対する検出部301による検出の精度低下を抑制することができる。   As described above, the setting unit 306 may change the frequency of the detection process based on the passage amount passing through the detection line. Specifically, the setting unit 306 reduces the frequency with which the detection processing is performed by the detection unit 301 in the region on the exit side when the region on the entrance side and the exit side in the passage direction in which the passage amount is large is defined. It may be. By doing so, it is possible to suppress a decrease in detection accuracy by the detection unit 301 for a person who passes through a passing direction with a small passing amount.

なお、本実施形態において図5(a)に示す通過カウント処理および図5(b)に示す検出領域の設定処理は時間的に並行して実行されてもよいし、時間的に別々で実行されるようにしてもよい。   In the present embodiment, the passage count process shown in FIG. 5A and the detection area setting process shown in FIG. 5B may be executed in parallel in time or executed separately in time. You may make it do.

以上説明したように、本実施形態によれば、通過方向ごとの人の通過量に基づいて、人を計数する処理のための人を検出する処理負荷を効率的に低減することができる。   As described above, according to the present embodiment, it is possible to efficiently reduce the processing load for detecting a person for the process of counting people based on the passing amount of the person for each passing direction.

(実施形態2)
実施形態1では、検知線を通過する人の通過量に基づいて、検出領域の大きさを変更する処理について説明したが、これに限らない。例えば、検知線を通過する人の通過量に基づいて、検出部301が検出処理の対象として画像から切り出す矩形領域の位置を変更するようにしてもよい。この場合における画像処理について、図5(a)、図7、および図8を参照して説明する。なお、以下の説明において、実施形態1と同一または同等の構成要素、処理には、同一の符号を付するものとし、適宜、重複した説明は省略する。
(Embodiment 2)
In the first embodiment, the process of changing the size of the detection region based on the passage amount of the person passing the detection line has been described, but the present invention is not limited to this. For example, the position of the rectangular area that the detection unit 301 cuts out from the image as the target of the detection process may be changed based on the passage amount of the person who passes the detection line. Image processing in this case will be described with reference to FIGS. 5 (a), 7 and 8. FIG. In the following description, components and processes that are the same as or equivalent to those in the first embodiment are denoted by the same reference numerals, and redundant descriptions are omitted as appropriate.

図5(a)、図7および図8を参照して、実施形態2に係る画像処理について説明する。図7は、実施形態2に係る画像処理の流れを示すフローチャートである。図8は、実施形態2に係る画像処理を説明するための図である。   Image processing according to the second embodiment will be described with reference to FIG. 5A, FIG. 7, and FIG. 8. FIG. 7 is a flowchart illustrating a flow of image processing according to the second embodiment. FIG. 8 is a diagram for explaining image processing according to the second embodiment.

図5(a)に示す通過カウント処理におけるステップS501にて、通信部300は、ネットワーク104を介して、画像データを受信する。   In step S <b> 501 in the passage count process illustrated in FIG. 5A, the communication unit 300 receives image data via the network 104.

ステップS502にて、検出部301は、画像における検出領域を対象にして人体を検出する検出処理を行う。なお、実施形態2に係る検出部301は、所定の大きさの矩形領域を画像内において水平および垂直方向に走査しつつ順次切り出していく。そして、検出部301は、切り出した矩形領域を対象にして、照合パターン(辞書)を使用し、人体の検出処理を行っていく。つまり、検出部301は、切り出した矩形領域を検出領域として、人体を検出する検出処理を行う。   In step S502, the detection unit 301 performs a detection process for detecting a human body with respect to a detection region in the image. Note that the detection unit 301 according to the second embodiment sequentially cuts out a rectangular region having a predetermined size while scanning the image in the horizontal and vertical directions. And the detection part 301 performs the detection process of a human body using the collation pattern (dictionary) targeting the cut-out rectangular area. That is, the detection unit 301 performs detection processing for detecting a human body using the cut-out rectangular area as a detection area.

図8において、検出部301は、矩形領域である領域801を画像内にて水平および垂直方向に走査させて、矩形領域を切り出していく。そして、検出部301は、切り出した矩形領域を検出領域として、人体を検出する検出処理を行う。   In FIG. 8, the detection unit 301 scans a region 801 that is a rectangular region in the image in the horizontal and vertical directions, and cuts out the rectangular region. And the detection part 301 performs the detection process which detects a human body by making the cut-out rectangular area into a detection area.

ステップS503およびステップS504の処理は、実施形態1と同様であるため説明を省略する。   Since the processing in step S503 and step S504 is the same as that in the first embodiment, description thereof is omitted.

次に図7を参照して、本実施形態に係る検出領域の設定処理のフローチャートについて説明する。なお図7に示すフローチャートの処理は、画像処理装置100のHDD203に格納されたコンピュータプログラムをCPU200が実行することにより実現される図3の各機能ブロックにより実行ものとして説明する。しかし、図7に示すフローチャートの処理の一部は、専用のハードウェアによって実行するようにしてもよい。   Next, with reference to FIG. 7, a flowchart of detection area setting processing according to the present embodiment will be described. Note that the processing of the flowchart shown in FIG. 7 will be described as being executed by each functional block of FIG. 3 realized by the CPU 200 executing a computer program stored in the HDD 203 of the image processing apparatus 100. However, a part of the processing of the flowchart shown in FIG. 7 may be executed by dedicated hardware.

図7においてS505およびS506の処理は、実施形態1と同様であるため説明を省略する。   In FIG. 7, the processes in S505 and S506 are the same as those in the first embodiment, and a description thereof will be omitted.

ステップS506においてNoの場合、ステップS707の処理へ移行する。ステップS707にて、実施形態2における設定部306は、画像全体の領域にて矩形領域の水平方向における走査の間隔を第一間隔に設定する。なお、本実施形態において第一間隔は、1つの矩形領域における水平方向の辺の長さであるとする。図8の場合、第一間隔は距離802aとなる。つまり、ステップS707の処理を経て、検出部301は、第一間隔である距離802aに従って矩形領域800を水平方向に走査させ、矩形領域を切り出していく。そして、検出部301は、切り出した矩形領域を検出領域として、人体を検出する検出処理を行う。つまり、この場合、検出部301は、画像全体の領域を検出領域として検出処理を行う。   If No in step S506, the process proceeds to step S707. In step S707, the setting unit 306 in the second embodiment sets the scanning interval in the horizontal direction of the rectangular region in the entire image region to the first interval. In the present embodiment, the first interval is assumed to be the length of the horizontal side in one rectangular area. In the case of FIG. 8, the first interval is the distance 802a. That is, through the processing in step S707, the detection unit 301 scans the rectangular area 800 in the horizontal direction according to the distance 802a that is the first interval, and cuts out the rectangular area. And the detection part 301 performs the detection process which detects a human body by making the cut-out rectangular area into a detection area. That is, in this case, the detection unit 301 performs detection processing using the entire image area as a detection area.

ステップS506においてYesの場合、ステップS708の処理へ移行する。ステップS708にて、実施形態2における設定部306は、通過した人数が多い通過方向について入口側と出口側の領域を規定したとき、出口側での領域にて矩形領域の水平方向における走査の間隔を第二間隔に設定する。本実施形態の場合、第二間隔は、第一間隔より所定値大きい長さである。例えば、図8において、IN方向を直前5秒間で通過した人数が10人以上、かつ、OUT方向を直前5秒間で通過した人数が1人以下である場合を想定する。このとき、図8(b)に示すように、設定部306は、通過した人数が多いIN方向の出口側である領域Bにて水平方向における走査の間隔を第二間隔である距離802bに設定する。なお、第二間隔の距離802bの長さは、予め事前に登録された設定でもよいし、ユーザーにより適宜設定するようにしてもよい。以上のように、本実施形態の設定部306は、通過方向ごとの人体の数が所定の条件を満たした場合、検知線を通過する物体の数が多い通過方向の入口側と出口側の領域を規定したとき、出口側の領域にて水平方向における矩形領域を走査させる間隔を変更する。   If Yes in step S506, the process proceeds to step S708. In step S708, when the setting unit 306 in the second embodiment defines areas on the entrance side and the exit side in the passage direction in which the number of people who have passed is large, the horizontal scanning interval of the rectangular area in the area on the exit side. Is set to the second interval. In the case of this embodiment, the second interval is a length larger than the first interval by a predetermined value. For example, in FIG. 8, it is assumed that the number of people who passed the IN direction in the last 5 seconds is 10 or more and the number of people who passed the OUT direction in the last 5 seconds is 1 or less. At this time, as shown in FIG. 8B, the setting unit 306 sets the horizontal scanning interval to a second interval 802b in the region B on the exit side in the IN direction where a large number of people have passed. To do. Note that the length of the second distance 802b may be set in advance or may be set as appropriate by the user. As described above, the setting unit 306 according to the present embodiment is configured so that when the number of human bodies in each passing direction satisfies a predetermined condition, there are a large number of objects passing through the detection line on the entrance side and the exit side in the passing direction. Is defined, the interval for scanning the rectangular region in the horizontal direction is changed in the region on the exit side.

最新一定期間における人体の通過方向ごとの通過量に偏りが生じている場合、通過量の偏りが継続すると推定することができる。そこで、通過量に偏りが生じている通過方向に基づいて、矩形領域を走査させる間隔を変化させる。そして通過量が多い通過方向に検知線を通過した人がいる領域においては、検出部301が切り出す矩形領域を走査させる間隔を大きくすることで、すでに通過したと判定された人に対して検出処理の負荷を低減することが可能になる。   If there is a bias in the passage amount of each human body in the latest fixed period, it can be estimated that the bias in the passage amount continues. Therefore, the interval for scanning the rectangular area is changed based on the passing direction in which the passing amount is biased. In a region where there is a person who has passed the detection line in the passing direction with a large amount of passage, the detection processing is performed on a person who has already been determined to pass by increasing the interval for scanning the rectangular region cut out by the detection unit 301. It is possible to reduce the load.

次に、ステップS509にて、出力制御部307は、ステップS707またはステップS708にて設定部306が設定した矩形領域を走査させる間隔に基づき、検出部301の検出処理の対象である検出領域を画像に重畳させて表示装置101に出力する。こうすることにより、人体の検出処理の対象となる検出領域の位置をユーザーは容易に把握することができる。   Next, in step S509, the output control unit 307 generates an image of a detection region that is a target of detection processing of the detection unit 301 based on the interval for scanning the rectangular region set by the setting unit 306 in step S707 or step S708. And output to the display device 101. By doing so, the user can easily grasp the position of the detection region that is the target of the human body detection process.

なお、ステップS708にて、設定部306は、通過方向ごとの通過する人体の数に応じて、第二の間隔の長さを変化させるようにしてもよい。例えば、或る一方向を直前5秒間で通過した人数が10人以上、かつ、もう一方向を直前5秒間で通過した人数が1人以下であるという条件(S506)を満たしたうえで、通過した人数が多ければ多い程、第二の間隔の距離802bを長くするようにしてもよい。   In step S708, the setting unit 306 may change the length of the second interval according to the number of human bodies that pass in each passing direction. For example, after satisfying the condition (S506) that the number of people passing in one direction in the last 5 seconds is 10 or more and the number of people passing in the other direction in the last 5 seconds is 1 or less (S506) The larger the number of people who have been, the longer the second distance 802b may be.

また、ステップS708にて、本実施形態における設定部306は、通過した人数が多い通過方向の出口側の領域における矩形領域を走査させる間隔を大きくするとしたが、例えば次のような処理を行ってもよい。すなわち、ステップS708にて、設定部306は、図8(c)に示すように、検知線の延伸方向と直交する方向において、検知線から所定長の距離803までは、第一の間隔とし、検知線から距離803より離れた領域においては、第二の間隔としてもよい。なお、距離803の長さは、予め登録された設定でもいいし、ユーザーにより適宜設定されるようにしてもよい。   In step S708, the setting unit 306 in the present embodiment increases the interval for scanning the rectangular area in the exit-side area in the passing direction where the number of people who have passed is large. For example, the following processing is performed. Also good. That is, in step S708, the setting unit 306 sets the first interval from the detection line to a predetermined length 803 in the direction orthogonal to the extension direction of the detection line, as shown in FIG. In the area away from the detection line from the distance 803, the second interval may be used. Note that the length of the distance 803 may be a pre-registered setting or may be set as appropriate by the user.

また、本実施形態において、設定部306は、検知線を通過する通過量に基づいて、画像において水平方向に矩形領域801を走査させる間隔を変更するようにしたが、垂直方向に矩形領域801を走査させる間隔を変更するようにしてもよい。また、設定部306は、検知線を通過する通過量に基づいて、水平方向および垂直方向に矩形領域801を走査させる間隔を変更するようにしてもよい。   In the present embodiment, the setting unit 306 changes the interval for scanning the rectangular area 801 in the horizontal direction in the image based on the amount of passage through the detection line, but the rectangular area 801 is changed in the vertical direction. The scanning interval may be changed. Further, the setting unit 306 may change the interval at which the rectangular area 801 is scanned in the horizontal direction and the vertical direction based on the amount of passage through the detection line.

なお、本実施形態において、図5(a)に示す通過カウント処理および図7に示す検出領域の設定処理は時間的に並行して実行されてもよいし、時間的に別々で実行されるようにしてもよい。   In the present embodiment, the passage count process shown in FIG. 5A and the detection area setting process shown in FIG. 7 may be executed in parallel in time, or may be executed separately in time. It may be.

以上説明したように、本実施形態によれば、通過方向ごとの人の通過量に基づいて、人を計数する処理のための人を検出する処理負荷を効率的に低減することができる。   As described above, according to the present embodiment, it is possible to efficiently reduce the processing load for detecting a person for the process of counting people based on the passing amount of the person for each passing direction.

(実施形態3)
上述した実施形態に係る画像処理は画像処理装置100が行うとして説明したが、これに限定されない。実施形態1または実施形態2に係る画像処理装置100の1以上の機能を、撮影装置102が有していてもよい。つまり、実施形態1または実施形態2に係る画像処理は、画像処理装置100のCPU200により実行されたが、撮影装置102のCPU210およびクライアント装置が有するCPUが協働することにより実現されてもよい。
(Embodiment 3)
Although the image processing according to the above-described embodiment has been described as being performed by the image processing apparatus 100, the present invention is not limited to this. The imaging apparatus 102 may have one or more functions of the image processing apparatus 100 according to the first embodiment or the second embodiment. That is, the image processing according to the first or second embodiment is performed by the CPU 200 of the image processing apparatus 100, but may be realized by the cooperation of the CPU 210 of the photographing apparatus 102 and the CPU of the client apparatus.

例えば、図3に示す、検出部301と、追尾部302と、保持部303と、判定部304と、算出部305と、設定部306と、記憶部309は撮影装置102が有していてもよい。なおこのとき、出力制御部307と、操作受付部308は、クライアント装置900が有する。クライアント装置900は、画像処理装置100と同等のハードウェア構成を有するパーソナルコンピュータである。この場合について、図9を参照して更に詳細に説明する。なお、図1〜図8と同一または同等の構成要素、処理には、同一の符号を付するものとし、適宜、重複した説明は省略する。   For example, even if the imaging apparatus 102 has the detection unit 301, the tracking unit 302, the holding unit 303, the determination unit 304, the calculation unit 305, the setting unit 306, and the storage unit 309 illustrated in FIG. Good. At this time, the output control unit 307 and the operation reception unit 308 are included in the client device 900. The client apparatus 900 is a personal computer having a hardware configuration equivalent to that of the image processing apparatus 100. This case will be described in more detail with reference to FIG. In addition, the same code | symbol shall be attached | subjected to the same or equivalent component and process as FIGS. 1-8, and the overlapping description is abbreviate | omitted suitably.

図9は、画像処理装置100の一部の機能を有する撮影装置102とクライアント装置900の機能ブロック図の一例である。撮影装置102とクライアント装置900は、ネットワーク104を介して通信が行われる。   FIG. 9 is an example of a functional block diagram of the image capturing apparatus 102 and the client apparatus 900 having some functions of the image processing apparatus 100. The imaging apparatus 102 and the client apparatus 900 communicate with each other via the network 104.

撮影部330は、CCDセンサやCMOSセンサ等の撮像素子を有し、撮影装置102のレンズを通って結像された被写体像を光電変換して電気信号を生成する。   The imaging unit 330 includes an image sensor such as a CCD sensor or a CMOS sensor, and generates an electrical signal by photoelectrically converting a subject image formed through the lens of the imaging device 102.

画像処理部331は、撮影部330において生成された電気信号をデジタル信号へ変換する処理や、圧縮符号化処理などを行い、画像データを生成する。   The image processing unit 331 performs processing for converting the electrical signal generated by the photographing unit 330 into a digital signal, compression encoding processing, and the like, and generates image data.

画像処理部331にて生成された画像データは、通信部333と通信部901とを介して、出力制御部307へ送られ、出力制御部307により表示装置101に出力される。なお、クライアント装置900における通信部901は、撮影装置102から送られる画像データの受信や、撮影装置102を制御するための各種のコマンドなどを送信する。   The image data generated by the image processing unit 331 is sent to the output control unit 307 via the communication unit 333 and the communication unit 901, and is output to the display device 101 by the output control unit 307. Note that the communication unit 901 in the client device 900 receives image data sent from the image capturing device 102 and transmits various commands for controlling the image capturing device 102.

クライアント装置900における操作受付部308は、マウスやキーボードなどの入力装置を介してユーザーによる操作を受け付ける。なお、操作受付部308が受け付けた情報は、通信部901と通信部333とを介して撮影装置102へ送られる。例えば、操作受付部308は、出力制御部307により表示装置101に出力された画像に対して、ユーザーが設定した検知線の位置に関する情報を受け付ける。そして操作受付部300が受け付けた検出領域の位置に関する情報は、通信部901と通信部333とを介して撮影装置102の保持部303へ送られる。   An operation reception unit 308 in the client device 900 receives an operation by a user via an input device such as a mouse or a keyboard. Note that the information received by the operation receiving unit 308 is sent to the photographing apparatus 102 via the communication unit 901 and the communication unit 333. For example, the operation reception unit 308 receives information regarding the position of the detection line set by the user with respect to the image output to the display device 101 by the output control unit 307. Information regarding the position of the detection region received by the operation receiving unit 300 is sent to the holding unit 303 of the imaging apparatus 102 via the communication unit 901 and the communication unit 333.

検出部301と、追尾部302と、保持部303と、判定部304と、算出部305と、設定部306と、記憶部309における機能は実施形態1または2において説明したものと同様であるため省略する。   The functions of the detection unit 301, the tracking unit 302, the holding unit 303, the determination unit 304, the calculation unit 305, the setting unit 306, and the storage unit 309 are the same as those described in the first or second embodiment. Omitted.

設定部306により設定された検出領域の位置の情報は、通信部333および通信部901を介して、クライアント装置900の出力制御部307へ送られる。そして出力制御部307は、設定部306により設定された検出領域を画像に重畳させて表示装置101に出力する。   Information on the position of the detection area set by the setting unit 306 is sent to the output control unit 307 of the client device 900 via the communication unit 333 and the communication unit 901. The output control unit 307 then superimposes the detection area set by the setting unit 306 on the image and outputs the image to the display device 101.

以上のように実施形態1または実施形態2に係る画像処理装置100の1以上の機能を、撮影装置102が有していてもよい。   As described above, the imaging apparatus 102 may have one or more functions of the image processing apparatus 100 according to the first embodiment or the second embodiment.

(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを1つ以上のプロセッサが読出して実行する処理でも実現可能である。プログラムは、ネットワーク又は記憶媒体を介して、プロセッサを有するシステム又は装置に供給するようにしてもよい。また、本発明は、上述の実施形態の1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention can also be realized by a process in which one or more processors read and execute a program that realizes one or more functions of the above-described embodiment. The program may be supplied to a system or apparatus having a processor via a network or a storage medium. The present invention can also be realized by a circuit (for example, ASIC) that realizes one or more functions of the above-described embodiments.

301 検出部
302 追尾部
304 判定部
305 算出部
306 設定部
301 Detection Unit 302 Tracking Unit 304 Determination Unit 305 Calculation Unit 306 Setting Unit

Claims (8)

画像から物体を検出する検出処理を行う検出手段と、
前記検出手段により検出された物体を追尾する追尾手段と、
前記追尾手段により追尾される物体が前記画像における検知線を通過したこと及び通過方向を判定する判定手段と、
前記判定手段により前記検知線を通過したと判定された物体の数を前記通過方向ごとに算出する算出手段と、
前記算出手段の結果に基づいて、前記画像において前記検出手段による検出処理を実行する検出領域を設定する設定手段とを有することを特徴とした画像処理装置。
Detection means for performing detection processing for detecting an object from an image;
Tracking means for tracking the object detected by the detection means;
A determination means for determining that an object tracked by the tracking means has passed a detection line in the image and a passing direction;
Calculating means for calculating the number of objects determined to have passed the detection line by the determining means for each passing direction;
An image processing apparatus comprising: a setting unit configured to set a detection region in the image based on a result of the calculation unit.
前記設定手段は、前記算出手段により算出された前記通過方向ごとの物体の数が所定の条件を満たした場合、前記検知線を通過する物体の数がより多い通過方向の出口側の領域において、前記検出領域の面積が小さくなるように前記検出領域を設定することを特徴とした請求項1に記載の画像処理装置。   The setting means, when the number of objects for each passing direction calculated by the calculating means satisfies a predetermined condition, in the region on the exit side in the passing direction where the number of objects passing through the detection line is larger, The image processing apparatus according to claim 1, wherein the detection area is set so that an area of the detection area becomes small. 前記設定手段は、一定期間において或る一方向を通過した人数が所定値以上、かつ、もう一方向を通過した人数が所定値以下の条件を満たした場合、前記検知線を通過する物体の数がより多い通過方向の出口側の領域において、前記検出領域の面積が小さくなるように前記検出領域を設定することを特徴とした請求項1または2に記載の画像処理装置。   The setting means determines the number of objects passing through the detection line when the number of people who have passed in one direction in a certain period satisfies a condition equal to or greater than a predetermined value and the number of people who have passed in another direction satisfies a predetermined value. 3. The image processing apparatus according to claim 1, wherein the detection area is set so that an area of the detection area is small in a region on the exit side in a passing direction with more. 前記検出手段は、所定の大きさの矩形領域を画像内において水平および垂直方向に走査しつつ順次切り出し、切り出した該矩形領域を検出領域として、物体を検出する検出手段であって、
前記設定手段は、前記算出手段により算出された前記通過方向ごとの物体の数が所定の条件を満たした場合、前記検知線を通過する物体の数がより多い通過方向の入口側と出口側の領域を規定したとき、出口側の領域における矩形領域を走査させる間隔を変更することを特徴とした請求項1に記載の画像処理装置。
The detection means is a detection means for detecting an object by sequentially cutting out a rectangular area of a predetermined size while scanning in the horizontal and vertical directions in the image, and using the cut-out rectangular area as a detection area,
The setting means, when the number of objects for each passing direction calculated by the calculating means satisfies a predetermined condition, the number of objects passing through the detection line is larger on the entrance side and the exit side in the passing direction. The image processing apparatus according to claim 1, wherein when the area is defined, an interval for scanning the rectangular area in the area on the exit side is changed.
前記検出手段は、所定の大きさの矩形領域を画像内において水平および垂直方向に走査しつつ順次切り出し、切り出した該矩形領域を検出領域として、物体を検出する検出手段であって、
前記設定手段は、一定期間において或る一方向を通過した人数が所定値以上、かつ、もう一方向を通過した人数が所定値以下の条件を満たした場合、前記検知線を通過する物体の数がより多い通過方向の入口側と出口側の領域を規定したとき、出口側の領域における矩形領域を走査させる間隔を変更することを特徴とした請求項1または請求項4に記載の画像処理装置。
The detection means is a detection means for detecting an object by sequentially cutting out a rectangular area of a predetermined size while scanning in the horizontal and vertical directions in the image, and using the cut-out rectangular area as a detection area,
The setting means is configured such that the number of objects passing through the detection line when the number of people who have passed in one direction in a certain period satisfies a condition equal to or larger than a predetermined value and the number of people who have passed in another direction satisfies a predetermined value or less. 5. The image processing apparatus according to claim 1, wherein when an entrance-side area and an exit-side area in a passing direction with a larger number of lines are defined, an interval for scanning a rectangular area in the exit-side area is changed. .
画像を撮影する撮影手段と、
前記撮影手段により撮影された画像から物体を検出する検出処理を行う検出手段と、
前記検出手段により検出された物体を追尾する追尾手段と、
前記追尾手段により追尾される物体が前記画像における検知線を通過したこと及び通過方向を判定する判定手段と、
前記判定手段により前記検知線を通過したと判定された物体の数を前記通過方向ごとに算出する算出手段と、
前記算出手段の結果に基づいて、前記画像において前記検出手段による検出処理を実行する検出領域を設定する設定手段とを有することを特徴とした撮影装置。
Photographing means for photographing an image;
Detection means for performing detection processing for detecting an object from an image photographed by the photographing means;
Tracking means for tracking the object detected by the detection means;
A determination means for determining that an object tracked by the tracking means has passed a detection line in the image and a passing direction;
Calculating means for calculating the number of objects determined to have passed the detection line by the determining means for each passing direction;
An imaging apparatus, comprising: a setting unit that sets a detection region in the image based on a result of the calculation unit for executing detection processing by the detection unit.
画像から物体を検出する検出処理を行う検出工程と、
前記検出工程により検出された物体を追尾する追尾工程と、
前記追尾工程により追尾される物体が前記画像における検知線を通過したこと及び通過方向を判定する判定工程と、
前記判定工程により前記検知線を通過したと判定された物体の数を前記通過方向ごとに算出する算出工程と、
前記算出工程の結果に基づいて、前記画像において前記検出工程による検出処理を実行する検出領域を設定する設定工程とを有することを特徴とした画像処理方法。
A detection step for performing detection processing for detecting an object from an image;
A tracking step of tracking the object detected by the detection step;
A determination step of determining that an object to be tracked by the tracking step has passed a detection line in the image and a passing direction;
A calculation step of calculating the number of objects determined to have passed through the detection line by the determination step for each of the passing directions;
An image processing method comprising: a setting step for setting a detection region in the image based on a result of the calculation step, in which detection processing by the detection step is executed.
画像から物体を検出する検出処理を行う検出手段と、
前記検出手段により検出された物体を追尾する追尾手段と、
前記追尾手段により追尾される物体が前記画像における検知線を通過したこと及び通過方向を判定する判定手段と、
前記判定手段により前記検知線を通過したと判定された物体の数を前記通過方向ごとに算出する算出手段と、
前記算出手段の結果に基づいて、前記画像において前記検出手段による検出処理を実行する検出領域を設定する設定手段として、コンピュータを機能させるためのプログラム。
Detection means for performing detection processing for detecting an object from an image;
Tracking means for tracking the object detected by the detection means;
A determination means for determining that an object tracked by the tracking means has passed a detection line in the image and a passing direction;
Calculating means for calculating the number of objects determined to have passed the detection line by the determining means for each passing direction;
A program for causing a computer to function as a setting unit that sets a detection region for executing detection processing by the detection unit in the image based on a result of the calculation unit.
JP2018087494A 2018-04-27 2018-04-27 Image processing device, photographing device, image processing method, and program Pending JP2019192155A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018087494A JP2019192155A (en) 2018-04-27 2018-04-27 Image processing device, photographing device, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018087494A JP2019192155A (en) 2018-04-27 2018-04-27 Image processing device, photographing device, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2019192155A true JP2019192155A (en) 2019-10-31

Family

ID=68390482

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018087494A Pending JP2019192155A (en) 2018-04-27 2018-04-27 Image processing device, photographing device, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2019192155A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113762169A (en) * 2021-09-09 2021-12-07 北京市商汤科技开发有限公司 People flow statistical method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113762169A (en) * 2021-09-09 2021-12-07 北京市商汤科技开发有限公司 People flow statistical method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10438360B2 (en) Video processing apparatus, video processing method, and storage medium
JP5398341B2 (en) Object recognition apparatus and object recognition method
JP3801137B2 (en) Intruder detection device
JP5484184B2 (en) Image processing apparatus, image processing method, and program
JP6555906B2 (en) Information processing apparatus, information processing method, and program
JP5693094B2 (en) Image processing apparatus, image processing method, and computer program
JP2019078880A (en) Control device, imaging apparatus, control method, and program
JP5839796B2 (en) Information processing apparatus, information processing system, information processing method, and program
JP2014236312A (en) Setting device and setting method
JP6798609B2 (en) Video analysis device, video analysis method and program
JP2019192155A (en) Image processing device, photographing device, image processing method, and program
JP2004228770A (en) Image processing system
JP2018063675A (en) Image processor and control method
US20190130677A1 (en) Information processing apparatus, information processing method, imaging apparatus, network camera system, and storage medium
KR20080079506A (en) Photographing apparatus for tracking object and method thereof
JP2022136115A (en) Video conference system, video conference method, and program
JP5769468B2 (en) Object detection system and object detection method
JP7182893B2 (en) Image processing device, imaging device, image processing method, and program
JP7338174B2 (en) Object detection device and object detection method
JP2018092507A (en) Image processing apparatus, image processing method, and program
JP6602286B2 (en) Image processing apparatus, image processing method, and program
JP2019192154A (en) Image processing apparatus, imaging device, image processing method, and program
JP7130375B2 (en) Image processing device, imaging device, image processing method, and program
JP2020086961A (en) Image analysis device, imaging device, image analysis method, and program
WO2023276050A1 (en) Image processing system and imaging device