JP6564756B2 - Flow condition measuring apparatus, method, and program - Google Patents

Flow condition measuring apparatus, method, and program Download PDF

Info

Publication number
JP6564756B2
JP6564756B2 JP2016209984A JP2016209984A JP6564756B2 JP 6564756 B2 JP6564756 B2 JP 6564756B2 JP 2016209984 A JP2016209984 A JP 2016209984A JP 2016209984 A JP2016209984 A JP 2016209984A JP 6564756 B2 JP6564756 B2 JP 6564756B2
Authority
JP
Japan
Prior art keywords
flow
region
image
update memory
people
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.)
Active
Application number
JP2016209984A
Other languages
Japanese (ja)
Other versions
JP2018074299A (en
Inventor
悠 米本
悠 米本
新井 啓之
啓之 新井
杵渕 哲也
哲也 杵渕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2016209984A priority Critical patent/JP6564756B2/en
Publication of JP2018074299A publication Critical patent/JP2018074299A/en
Application granted granted Critical
Publication of JP6564756B2 publication Critical patent/JP6564756B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Description

本発明は、流動状況計測装置、方法、及びプログラムに係り、特に、画像に写る場所の流動状況を計測する流動状況計測装置、方法、及びプログラムに関する。 The present invention relates to a flow situation measuring apparatus, method, and program, and more particularly, to a flow situation measuring apparatus, method, and program for measuring a flow situation in a place reflected in an image .

従来より、セキュリティや安全管理用途またはマーケティング用途への適用を想定し、固定されたカメラで撮影した画像において、その場所を通過した人の数や、群衆の流速や密度といった流動状態を示す物理量を計測または推定する技術が知られている。   Conventionally, it is assumed that it is applied to security, safety management use, or marketing use, and in an image taken with a fixed camera, the physical quantity indicating the flow state such as the number of people passing through the place and the flow velocity and density of the crowd. Techniques for measuring or estimating are known.

駅、空港、イベント施設など人が多く集まる場所における過剰な混雑は、将棋倒しなどの深刻な事故の原因となるため、過剰な混雑が発生しないように事前に対策することに加えて混雑発生時に迅速に誘導するなどの現場対応を行う必要がある。このため施設内の要所、要所において群衆の流動状況をモニタリングしたいという安全管理上のニーズが存在している。また商業施設やアミューズメント施設においては、お客様の快適性確保および効果的な販売促進などを目的として施設内の人の流動状況をデータとして計測し、これを活用したいというマーケティング上のニーズが存在している。   Excessive congestion in places where many people gather, such as stations, airports, and event facilities, can cause serious accidents such as shogi defeats, so in addition to taking precautions to prevent excessive congestion, it is quick when congestion occurs. It is necessary to take on-site measures such as guiding to For this reason, there is a safety management need to monitor the flow of crowds at important points in the facility. In commercial facilities and amusement facilities, there is a marketing need to measure the flow of people in the facility as data for the purpose of ensuring customer comfort and effective sales promotion. Yes.

特許5419925号公報Japanese Patent No. 5419925

流動状況を計測することのできるセンサは様々なものがあるが、計測したい場所が比較的広い場合にはカメラ(カメラにより撮影した画像)が有力な計測手段となる。画像から人数を計測、推定する様々な方法が既に提案、利用されてきている。これらを大きく分類すると、(1)画像上の個々の人物を検出・追跡することで所定時間内の流動数を算出する方式(人物検出・追跡タイプ)と、(2)瞬間の領域内人数の推定と流速の推定を別個に行い、これらの結果から所定時間内の流動数を推定する方式(流体近似タイプ)(例えば特許文献1参照)と、を挙げることができる。     There are various sensors that can measure the flow situation, but when a place to be measured is relatively wide, a camera (image taken by the camera) is an effective measuring means. Various methods for measuring and estimating the number of people from images have already been proposed and used. These can be broadly classified as follows: (1) A method for calculating the number of flows in a predetermined time by detecting and tracking individual persons on the image (person detection / tracking type), and (2) A method (fluid approximation type) (see, for example, Patent Document 1) that performs estimation and flow velocity estimation separately and estimates the number of flows within a predetermined time from these results can be given.

このうち、(1)の方式は、人が少ない状況においては高い精度を実現するものの、混雑状況においては誤差が大きくなる(処理が破綻してしまう)という問題がある。駅などの公共施設やイベント施設における安全管理に適用する場合には、混雑状況でも一定の精度が保たれることが必要であるため(1)の方式の適用は困難となる。一方、(2)の方式は一般に人が少ない状況での精度は必ずしも高くはないものの、混雑している状況において比較的安定した精度での推定が可能である。また(2)の方式は(1)の方式と比べると小さい計算コストで実行できるという長所を持っている。しかしながら(2)の方式であっても複数の処理を同じ計算機で同時に実行すると所定の時間間隔での処理が間に合わない状況が起きる。また、処理が終わった時点で計測結果を出力する方式の場合には、計算機の負荷状況や計算機のスペック等の状況によって計測が終了するまでの時間が大きくばらつく、といった状況が発生する。このように、結果として処理結果の信頼性、利用性が低くなってしまうという問題があった。   Among these methods, the method (1) has a problem that, although high accuracy is realized in a situation where there are few people, an error becomes large (processing fails) in a crowded situation. When applied to safety management in public facilities such as stations and event facilities, it is difficult to apply the method (1) because it is necessary to maintain a certain degree of accuracy even in a crowded situation. On the other hand, although the accuracy of the method (2) is generally not necessarily high in a situation where there are few people, it can be estimated with a relatively stable accuracy in a crowded situation. Further, the method (2) has an advantage that it can be executed at a lower calculation cost than the method (1). However, even when the method (2) is used, if a plurality of processes are executed simultaneously on the same computer, a situation occurs in which the processes at a predetermined time interval cannot be performed in time. Further, in the case of the method of outputting the measurement result when the processing is completed, a situation occurs in which the time until the measurement ends largely varies depending on the load status of the computer, the specifications of the computer, and the like. As described above, there is a problem that the reliability and usability of the processing result are lowered as a result.

本発明は、上記問題点を解決するために成されたものであり、安定して精度よく流動状況を計測できる流動状況計測装置、方法、及びプログラムを提供することを目的とする。   The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a flow state measuring device, method, and program capable of stably and accurately measuring a flow state.

上記目的を達成するために、第1の発明に係る流動状況計測装置は、カメラで撮影した画像に写る場所の群衆の流動状況を計測する流動状況計測装置であって、前記カメラにより撮影したフレーム画像の画像系列を時系列順に入力する画像入力部と、入力された前記画像系列に基づいて、画像上の被写体の動きに対応する動きベクトルを算出するフロー算出部と、前記算出された前記動きベクトルに基づいて、前記群衆の画像上の流速を推定する流速推定部と、前記フレーム画像に基づいて、画像上の動物体領域を抽出し、前記動物体領域を表す前景画像を算出する前景画像算出部と、算出された前景画像に基づいて、予め処理対象と指定された領域内における領域内人数を推定する領域内人数推定部と、前記推定された前記流速を一時的に保持する流速更新メモリと、前記推定された前記領域内人数を一時的に保持する領域内人数更新メモリと、前記流速更新メモリの前記流速と、前記領域内人数更新メモリの前記領域内人数とを参照し、所定時間内の推定流動数を算出する流動計算部と、を含んで構成されており、前記フロー算出部及び前記流速推定部の一連の処理と、前記前景画像算出部及び前記領域内人数推定部の一連の処理とは、非同期に繰り返し実行され、前記流動計算部は、予め指定されたタイミングで、前記流速更新メモリの前記流速と、前記領域内人数更新メモリの前記領域内人数とを参照し、所定時間内の推定流動数を繰り返し算出してログデータとして保存する。   In order to achieve the above object, a flow situation measuring apparatus according to a first aspect of the present invention is a flow situation measurement apparatus for measuring a flow situation of a crowd in a place taken in an image taken by a camera, the frame taken by the camera. An image input unit that inputs an image sequence of images in time series, a flow calculation unit that calculates a motion vector corresponding to a motion of a subject on the image based on the input image sequence, and the calculated motion A foreground image that extracts a moving body region on the image based on the frame image and calculates a foreground image representing the moving body region based on the frame image; Based on the calculated foreground image, a calculation unit, an in-region number estimation unit for estimating the number of people in the region in the region designated in advance, and the estimated flow velocity temporarily A flow rate update memory, a region number update memory that temporarily holds the estimated number of people in the region, the flow rate of the flow rate update memory, and the number of people in the region of the region number update memory. A flow calculation unit that calculates an estimated flow number within a predetermined time, and includes a series of processes of the flow calculation unit and the flow velocity estimation unit, the foreground image calculation unit, and the region The series of processes of the number estimation unit is repeatedly executed asynchronously, and the flow calculation unit is configured to calculate the flow rate of the flow rate update memory and the number of people in the region of the region number update memory at a predetermined timing. , The estimated number of flows within a predetermined time is repeatedly calculated and stored as log data.

また、第1の発明に係る流動状況計測装置において、前記カメラの設置位置、撮影方向、及び焦点距離を含むカメラパラメータを事前に取得するキャリブレーション部を更に含み、前記流動計算部は、前記推定流動数の算出に加え、事前に取得した前記カメラパラメータと、前記流速更新メモリの前記流速と、前記領域内人数更新メモリの前記領域内人数とに基づいて、実空間における群衆の前記流速、又は前記実空間における人の密度を算出するようにしてもよい。   The flow condition measuring device according to the first invention further includes a calibration unit that acquires in advance camera parameters including an installation position, a shooting direction, and a focal length of the camera, and the flow calculation unit includes the estimation In addition to calculating the number of flows, based on the camera parameters acquired in advance, the flow rate of the flow rate update memory, and the number of people in the region of the number of people update region, the flow rate of the crowd in real space, or You may make it calculate the density of the person in the said real space.

また、第2の発明に係る流動状況計測装置において、前記流速更新メモリは、前記推定された前記流速の移動平均を保持し、前記領域内人数更新メモリは、前記推定された前記領域内人数の移動平均を保持するようにしてもよい。   In the flow condition measuring apparatus according to the second aspect of the invention, the flow velocity update memory holds a moving average of the estimated flow velocity, and the in-region number update memory stores the estimated number of people in the region. You may make it hold | maintain a moving average.

第2の発明に係る流動状況計測方法は、カメラで撮影した画像に写る場所の群衆の流動状況を計測する流動状況計測装置における流動状況計測方法であって、画像入力部が、前記カメラにより撮影したフレーム画像の画像系列を時系列順に入力するステップと、フロー算出部が、入力された前記画像系列に基づいて、画像上の被写体の動きに対応する動きベクトルを算出するステップと、流速推定部が、前記算出された前記動きベクトルに基づいて、前記群衆の画像上の流速を推定し、前記流速を一時的に保持する流速更新メモリに、前記推定された前記流速を格納するステップと、前景画像算出部が、前記フレーム画像に基づいて、画像上の動物体領域を抽出し、前記動物体領域を表す前景画像を算出するステップと、領域内人数推定部が、算出された前景画像に基づいて、予め処理対象と指定された領域内における領域内人数を推定し、前記領域内人数を一時的に保持する領域内人数更新メモリに、前記推定された前記領域内人数を格納するステップと、流動計算部が、前記流速更新メモリの前記流速と、前記領域内人数更新メモリの前記領域内人数とを参照し、所定時間内の推定流動数を算出するステップと、を含んで実行することを特徴とし、前記フロー算出部及び前記流速推定部の各ステップの一連の処理と、前記前景画像算出部及び前記領域内人数推定部の各ステップの一連の処理とは、非同期に繰り返し実行され、前記流動計算部が算出するステップは、予め指定されたタイミングで、前記流速更新メモリの前記流速と、前記領域内人数更新メモリの前記領域内人数とを参照し、所定時間内の推定流動数を繰り返し算出してログデータとして保存する。   A flow situation measurement method according to a second aspect of the present invention is a flow situation measurement method in a flow situation measurement apparatus for measuring the flow situation of a crowd in a place taken in an image taken by a camera, wherein the image input unit is taken by the camera. A step of inputting an image sequence of the frame images in chronological order, a step of calculating a motion vector corresponding to a motion of a subject on the image based on the input image sequence, and a flow rate estimating unit Estimating the flow velocity on the crowd image based on the calculated motion vector, and storing the estimated flow velocity in a flow velocity update memory that temporarily holds the flow velocity; and foreground An image calculating unit extracting a moving object region on the image based on the frame image, calculating a foreground image representing the moving object region; Based on the calculated foreground image, the number of persons in the area in the area designated as a processing target is estimated in advance, and the number of persons in the area is temporarily stored in the area in the area. A step of storing the number of people, a flow calculation unit referring to the flow rate of the flow rate update memory and the number of people in the region of the region number of people update memory, and calculating an estimated flow number within a predetermined time; And a series of processes of each step of the flow calculation unit and the flow velocity estimation unit, and a series of processes of each step of the foreground image calculation unit and the in-region number estimation unit, The step of being repeatedly executed asynchronously and calculated by the flow calculation unit, the flow rate of the flow rate update memory and the number of people in the region of the in-region number update memory at a predetermined timing. It refers to the stores as log data repeatedly calculating the estimated flow number within a predetermined time period.

また、第2の発明に係る流動状況計測装置において、キャリブレーション部が、前記カメラの設置位置、撮影方向、及び焦点距離を含むカメラパラメータを事前に取得するステップを更に含み、前記流動計算部が算出するステップは、前記推定流動数の算出に加え、事前に取得した前記カメラパラメータと、前記流速更新メモリの前記流速と、前記領域内人数更新メモリの前記領域内人数とに基づいて、実空間における群衆の前記流速、又は前記実空間における人の密度を算出するようにしてもよい。   Further, in the flow condition measuring device according to the second invention, the calibration unit further includes a step of acquiring in advance camera parameters including an installation position, a photographing direction, and a focal length of the camera, and the flow calculation unit includes In addition to calculating the estimated number of flows, the step of calculating is based on the camera parameters acquired in advance, the flow rate of the flow rate update memory, and the number of people in the region of the region number update memory. You may make it calculate the said flow velocity of the crowd in, or the density of the person in the said real space.

また、第2の発明に係る流動状況計測装置において、前記流速推定部が前記流速更新メモリに格納するステップは、前記推定された前記流速の移動平均を前記流速更新メモリに格納し、前記領域内人数推定部が前記領域内人数更新メモリに格納するステップは、前記推定された前記領域内人数の移動平均を前記領域内人数更新メモリに格納するようにしてもよい。   Further, in the flow state measuring device according to the second invention, the step of storing the flow velocity estimation unit in the flow velocity update memory stores the moving average of the estimated flow velocity in the flow velocity update memory, The step of storing the number of persons in the in-area number update memory by the number-of-persons estimation unit may store the estimated moving average of the number of persons in the area in the in-area number update memory.

また、第3の発明に係るプログラムは、コンピュータを、第1の発明に係る流動状況計測装置の各部として機能させるためのプログラムである。   A program according to the third invention is a program for causing a computer to function as each part of the flow situation measuring device according to the first invention.

本発明の流動状況計測装置、方法、及びプログラムによれば、画像系列に基づいて、画像上の被写体の動きに対応する動きベクトルを算出し、動きベクトルに基づいて、群衆の画像上の流速を推定し、画像系列に基づいて、画像上の動物体領域を抽出し、動物体領域を表す前景画像を算出し、前景画像に基づいて、予め処理対象と指定された領域内における領域内人数を推定し、流速更新メモリの流速と、領域内人数更新メモリの領域内人数とを参照し、所定時間内の推定流動数を算出する過程において、フロー算出部及び流速推定部の一連の処理と、前景画像算出部及び領域内人数推定部の一連の処理とは、非同期に繰り返し実行され、流動計算部は、予め指定されたタイミングで、流速更新メモリの流速と、領域内人数更新メモリの領域内人数とを参照し、所定時間内の推定流動数を繰り返し算出してログデータとして保存することにより、安定して精度よく流動状況を計測できる、という効果が得られる。   According to the flow condition measuring device, method, and program of the present invention, a motion vector corresponding to the motion of a subject on an image is calculated based on an image sequence, and the flow velocity on the crowd image is calculated based on the motion vector. Estimating, extracting a moving object region on the image based on the image sequence, calculating a foreground image representing the moving object region, and determining the number of people in the region in the region designated as a processing target in advance based on the foreground image. In the process of estimating, referring to the flow rate of the flow rate update memory and the number of people in the region of the region update memory, and calculating the estimated number of flows within a predetermined time, a series of processes of the flow calculation unit and the flow rate estimation unit, The series of processes of the foreground image calculation unit and the in-region number estimation unit are repeatedly executed asynchronously, and the flow calculation unit performs the flow rate of the flow rate update memory and the region of the in-region number update memory at a predetermined timing. Referring to the number of persons, by storing as the estimated flow number repeatedly calculated by the log data within a predetermined time can be measured with high accuracy flow conditions stable, the effect is obtained that.

本発明の第1の実施の形態に係る流動状況計測装置の構成を示すブロック図である。It is a block diagram which shows the structure of the flow condition measuring apparatus which concerns on the 1st Embodiment of this invention. 処理対象領域(ROI)における流動数の推定の一例を示す図である。It is a figure which shows an example of estimation of the flow number in a process target area | region (ROI). 流動状況計測装置における各処理プロセスの一例を示す図である。It is a figure which shows an example of each processing process in a flow condition measuring apparatus. 本発明の実施の形態に係る流動状況計測装置における流動状況計測の各処理を示すタイムチャートである。It is a time chart which shows each process of the flow condition measurement in the flow condition measuring apparatus which concerns on embodiment of this invention. 本発明の第2の実施の形態に係る流動状況計測装置の構成を示すブロック図である。It is a block diagram which shows the structure of the flow condition measuring apparatus which concerns on the 2nd Embodiment of this invention.

以下、図面を参照して本発明の実施の形態を詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

<本発明の実施の形態に係る概要> <Outline according to Embodiment of the Present Invention>

まず、本発明の実施の形態における概要を説明する。   First, an outline of the embodiment of the present invention will be described.

本発明の実施の形態の流動状況計測装置は、カメラで撮影した画像に写る場所の群衆の流動状況を計測する。 The flow condition measuring device according to the embodiment of the present invention measures the flow condition of a crowd in a place that appears in an image taken by a camera.

本発明の実施の形態に係る手法では、上述したような流動計測に関する従来手法の問題点を鑑み、瞬間の領域内人数の推定と流速の推定を別個に行い、これらの結果から所定時間内の流動数を推定する方式において、同じ計算機上で複数の処理を効率的かつ安定的に実行することを目的とする。   In the method according to the embodiment of the present invention, in consideration of the problems of the conventional method related to flow measurement as described above, the estimation of the number of people in the region and the estimation of the flow velocity are separately performed, and these results are within a predetermined time. An object of the method for estimating the number of flows is to execute a plurality of processes efficiently and stably on the same computer.

<本発明の第1の実施の形態に係る流動状況計測装置の構成> <Configuration of flow condition measuring apparatus according to first embodiment of the present invention>

次に、本発明の第1の実施の形態に係る流動状況計測装置の構成について説明する。図1に示すように、本発明の実施の形態に係る流動状況計測装置100は、CPUと、RAMと、後述する流動状況計測処理ルーチンを実行するためのプログラムや各種データを記憶したROMと、を含むコンピュータで構成することが出来る。この流動状況計測装置100は、機能的には図1に示すようにカメラ10と、計測部20とを備えている。   Next, the configuration of the flow condition measuring apparatus according to the first embodiment of the present invention will be described. As shown in FIG. 1, a flow situation measuring apparatus 100 according to an embodiment of the present invention includes a CPU, a RAM, a ROM that stores a program and various data for executing a flow situation measurement processing routine described later, Can be configured with a computer including Functionally, the flow state measuring apparatus 100 includes a camera 10 and a measuring unit 20 as shown in FIG.

以下で説明する本実施の形態では、カメラ10で撮影された画像データ(映像データ)を計測部20に入力し、計算機上で画像処理を実施する場合を想定しているが、その詳細な形態は限定しない。またカメラ10から画像(映像)を逐一取得しながら処理を行うリアルタイム型の処理、一旦ハードディスクなどの記録媒体に記録された画像(映像)を読み出しながら処理していくオフライン型の処理のいずれに対しても適用可能であるが、以下ではカメラ10からリアルタイムで画像を取り込みながらリアルタイムに実行することを想定して説明していく。また説明を簡単にするために、画像上の人の動きは左右方向であると(通路を横切る方向にカメラを設置した場合を)想定し、左右方向(画像のx軸方向)に通過する人の数を計測、推定する場合を想定して説明を行う。また、上記の想定においては左右方向で別々に流動を計測する必要があるが、これは例えばオプティカルフローの算出結果から右向きの動きを持つ画素と左向きの画素を持つ画素を分けることができるので、ここでは一方向に人が流れる場合に単純化して説明していく。   In the present embodiment described below, it is assumed that image data (video data) captured by the camera 10 is input to the measurement unit 20 and image processing is performed on a computer. Is not limited. Also, for either real-time processing that performs processing while acquiring images (video) from the camera 10 one by one, or offline processing that performs processing while reading images (video) once recorded on a recording medium such as a hard disk. However, in the following description, it is assumed that an image is captured in real time from the camera 10 and executed in real time. To simplify the explanation, it is assumed that the movement of the person on the image is the left-right direction (when the camera is installed in a direction crossing the passage), and the person who passes in the left-right direction (the x-axis direction of the image) The description will be made on the assumption that the number is estimated and estimated. Further, in the above assumption, it is necessary to measure the flow separately in the left and right directions. This is because, for example, a pixel having a rightward movement and a pixel having a leftward direction can be separated from the calculation result of the optical flow. Here, the explanation is simplified when a person flows in one direction.

計測部20は、システムクロック22と、画像入力部30と、フロー算出部32と、流速推定部34と、流速更新メモリ36と、前景画像算出部38と、領域内人数推定部40と、領域内人数更新メモリ42と、流動計算部44とを含んで構成されている。フロー算出部32及び流速推定部34の一連の処理と、前景画像算出部38及び領域内人数推定部40の一連の処理とは、非同期に繰り返し実行される。   The measurement unit 20 includes a system clock 22, an image input unit 30, a flow calculation unit 32, a flow velocity estimation unit 34, a flow velocity update memory 36, a foreground image calculation unit 38, an in-region number estimation unit 40, and a region An internal number update memory 42 and a flow calculation unit 44 are included. A series of processes of the flow calculation unit 32 and the flow velocity estimation unit 34 and a series of processes of the foreground image calculation unit 38 and the in-region number estimation unit 40 are repeatedly executed asynchronously.

画像入力部30は、カメラ10により撮影した映像から得られるフレーム画像の画像系列を時系列順に入力する。なお、フレーム画像の画像系列は、カメラ10で撮影された静止画系列から取得してもよい。   The image input unit 30 inputs an image sequence of frame images obtained from video captured by the camera 10 in chronological order. Note that the image sequence of the frame image may be acquired from a still image sequence captured by the camera 10.

フロー算出部32は、画像入力部30から入力された画像系列を取得し、取得した画像系列に基づいて、画像上の被写体の動きに対応する動きベクトルを算出する。ここでの動きベクトルは、オプティカルフロー(隣接するフレーム画像を比較することで画像上の見かけの動きの方向と大きさを算出したもの)を用いる。フレーム間での特徴点のマッチングの結果得られた動き情報(前のフレームで検出された特徴点について、後のフレームのどこに類似した特徴点があるかを探索した結果得られた特徴点の対応)でも良く、被写体の動きの大きさと方向を示す動きベクトルが得られれば良い。またこの際、動きベクトルが画像上の全ての画素やブロックに対して得られている必要はなく、例えば特徴点マッチングがうまく行った場所(画素やブロック)の動きベクトルが算出されていれば良い。   The flow calculation unit 32 acquires the image series input from the image input unit 30, and calculates a motion vector corresponding to the motion of the subject on the image based on the acquired image sequence. The motion vector here uses an optical flow (the direction and magnitude of the apparent motion on the image calculated by comparing adjacent frame images). Motion information obtained as a result of matching of feature points between frames (correspondence of feature points obtained as a result of searching for similar feature points in the subsequent frame with respect to the feature points detected in the previous frame) Or a motion vector indicating the magnitude and direction of the movement of the subject. At this time, it is not necessary that the motion vector is obtained for all the pixels and blocks on the image. For example, it is only necessary to calculate the motion vector of the place (pixel or block) where the feature point matching has been successfully performed. .

流速推定部34は、フロー算出部32で算出された動きベクトルに基づいて、群衆の画像上の流速を推定する。ここでは、算出された動きベクトル(フロー)を用いて、その時点での流速(被写体である人・群衆の平均速度)を算出する。得られた複数の動きベクトルから群衆の動きを代表する速度を求める方法としては、得られた動きベクトルの平均値(動きが左右方向であれば、x成分の平均値)を求める方法や、動きベクトルの大きさ、方向に関して投票計算を行い最頻値を求める方法等が考えられる。なお、速度の表現方法は様々な形があり、例えば画像上での動きを[pixel/フレーム]で表現する形、また後述するような実空間の歩行速度[m/秒]に換算した形などがあり得るが、ここでは単純に画像上の動きを算出するものとする。   The flow velocity estimation unit 34 estimates the flow velocity on the crowd image based on the motion vector calculated by the flow calculation unit 32. Here, using the calculated motion vector (flow), the current flow velocity (average speed of the person / crowd as the subject) is calculated. As a method for obtaining the speed representing the movement of the crowd from the obtained plurality of motion vectors, a method for obtaining an average value of the obtained motion vectors (or an average value of x components if the motion is in the horizontal direction) A method of calculating the mode value by voting calculation regarding the size and direction of the vector can be considered. There are various ways of expressing the speed, for example, a form in which the movement on the image is expressed in [pixel / frame], or a form converted into a walking speed [m / second] in the real space as described later. Here, it is assumed that the motion on the image is simply calculated.

流速推定部34は、上記の計算の結果、得られた流速の値を流速更新メモリ36に記録する。流速更新メモリ36は、推定された流速を一時的に保持する。記録の際、単に新たに算出した流速を上書きして更新しても良いが、流速の計算は一時的に大きな誤差を含む場合もあるので、移動平均を取った値を記録するものとする。例えば、過去の平均値に対して一定の重みを付けて新たに算出された数値との平均を計算することで、過去の数値を緩やかに忘却する形で平均化を行う。この際、移動平均をとる場合の重みは経験的に設定すればよい。なお、移動平均でなくとも計測のノイズを軽減できる値であればよい。   The flow velocity estimation unit 34 records the flow velocity value obtained as a result of the above calculation in the flow velocity update memory 36. The flow rate update memory 36 temporarily holds the estimated flow rate. At the time of recording, the newly calculated flow velocity may be simply overwritten and updated. However, since the flow velocity calculation may temporarily include a large error, a value obtained by taking a moving average is recorded. For example, by averaging the past average values with a newly calculated numerical value with a certain weight, the past numerical values are averaged in a manner that is gently forgotten. At this time, the weight for taking the moving average may be set empirically. It should be noted that a value that can reduce measurement noise is not required even if it is a moving average.

前景画像算出部38は、画像入力部30から入力された画像系列のうちの現在画像を取得し、取得した現在画像に基づいて、画像上の動物体領域を抽出し、動物体領域を表す前景画像を算出する。前景画像の検出は、予め取得しておいた固定背景画像(人がいない画像)と現在画像との画素値の比較(差の絶対値を取ってしきい値処理する)や、画素値の時間変動を統計的にモデルすることで前景を検出する方法(Gaussian Mixture法など)、他にも様々な方法があるが、ここではその手法は特に限定しない。   The foreground image calculation unit 38 acquires a current image of the image series input from the image input unit 30, extracts a moving body region on the image based on the acquired current image, and represents a foreground representing the moving body region. Calculate the image. The foreground image is detected by comparing the pixel values of the fixed background image (image without a person) acquired in advance and the current image (by taking the absolute value of the difference and performing threshold processing), or by the time of the pixel value There are various other methods such as a method for detecting the foreground by statistically modeling variation (such as Gaussian Mixture method), but the method is not particularly limited here.

領域内人数推定部40は、前景画像算出部38で算出された前景画像に基づいて、予め処理対象と指定された領域内(画像内もしくは予め設定された処理対象領域(ROI)内)の人数を推定する。前景画像からの人数推定方法としては、領域内の前景画素数と背景画素数から大凡の人数を推定する方式を使えばよい(特許文献2参照)。   The in-region number estimation unit 40 is based on the foreground image calculated by the foreground image calculation unit 38 and the number of people in the region designated as the processing target in advance (in the image or in the preset processing target region (ROI)). Is estimated. As a method for estimating the number of people from the foreground image, a method of estimating the approximate number of people from the number of foreground pixels and the number of background pixels in the region may be used (see Patent Document 2).

[特許文献2]:特許04914870号公報 [Patent Document 2]: Japanese Patent No. 04914870

領域内人数推定部40は、上記のように推定された領域内人数を領域内人数更新メモリ42に記録する。領域内人数更新メモリ42は、推定された領域内人数を一時的に保持する。領域内人数更新メモリ42への記録は、前述した流速更新メモリ36への記録と同様に移動平均を計算した値を記録するものとする。   The in-area number estimating unit 40 records the in-area number estimated as described above in the in-area number update memory 42. The in-area number update memory 42 temporarily holds the estimated in-area number. As for the record in the in-region number update memory 42, the value obtained by calculating the moving average is recorded in the same manner as the record in the flow rate update memory 36 described above.

流動計算部44は、予め指定されたタイミングで、流速更新メモリ36の流速と、領域内人数更新メモリ42の領域内人数とを参照し、所定時間内の推定流動数を繰り返し算出してログデータとして保存する。   The flow calculation unit 44 refers to the flow rate in the flow rate update memory 36 and the number of people in the area in the area number update memory 42 at a predetermined timing, and repeatedly calculates the estimated number of flows within a predetermined time to log data. Save as.

流動計算部44では、システムクロック等を参照しながら、予め指定されたタイミングで、流速更新メモリ36及び領域内人数更新メモリ42にアクセスし、記録されている流速と領域内人数を読み込み、これらの値から所定時間内の流動数(通過人数)を算出する。通過人数の算出は図2に示すように、処理対象領域(ROI)の移動方向の長さL、幅をWとし、領域内人数N、集団の平均速度Vが得られたとすると、以下のように時間T内の流動数を求めることができる。   The flow calculation unit 44 accesses the flow rate update memory 36 and the in-region number update memory 42 at a predetermined timing while referring to the system clock and the like, reads the recorded flow rate and the in-region number of people, The number of flows (number of people passing) within a predetermined time is calculated from the value. As shown in FIG. 2, the number of passing people is calculated as follows, assuming that the length L and width in the moving direction of the processing target region (ROI) are W, the number of people N in the region, and the average velocity V of the group are obtained. The number of flows within the time T can be obtained.

時間T内の流動数(通過人数)={N/(LW)}{VW}T=NVT/L Number of flows in time T (number of people passing) = {N / (LW)} {VW} T = NVT / L

流動状況計測装置100は、以上の各部の処理を行うことにより流動数(通過人数)を算出することができるが、その処理の制御方法について補足する。前述の「フロー算出部32及び流速推定部34」「前景画像算出部38及び領域内人数推定部40」の処理は、図3に示すように、それぞれ別個のプロセスとして同期せずに実行するものとする。またこれらのプロセスとは別に、流動計算のプロセス(流動計算部44の処理)があり、これらは全て別個のプロセスとして動作する。   The flow state measuring apparatus 100 can calculate the number of flow (number of passing people) by performing the processing of each part described above, and supplements the control method of the processing. The processes of the above-mentioned “flow calculation unit 32 and flow velocity estimation unit 34”, “foreground image calculation unit 38 and in-region number estimation unit 40” are executed without being synchronized as separate processes, as shown in FIG. And In addition to these processes, there is a flow calculation process (processing by the flow calculation unit 44), which all operate as separate processes.

それぞれのプロセスを同期しないことのメリットを以下に示す。このような形で動作させることで、以下の二つのメリットが生まれる。一つ目は、流動状況計測装置100を汎用計算機上に実装する場合、プロセスを並列実行できるため、全ての処理をシーケンシャルに実行する場合と比べて実質的な処理速度を早くすることができる(画像処理の結果が反映される時間間隔を短くすることができる)点である。二つ目は、同一計算機上で複数の計測を同時に実行したり、別の処理が動作している場合などでも決まった時間間隔で計測が行われることである。計算機のスペックや状況によっては処理量の多い画像処理プロセスが終了するまでの時間が大きく変動する可能性があるが、上記の流動計算のプロセスは計算量が極めて小さいため決まった時間間隔で動作(メモリ読み取り、計算、ログ出力)させることができる。仮に画像処理のプロセス(「フロー算出部32及び流速推定部34」「前景画像算出部38及び領域内人数推定部40」のプロセスのいずれか、または両方の処理が一時的に遅れた場合には、その前の値が更新メモリから読み込まれるが、流速や領域内人数が短時間で極端に変化しなければ、このような場合でも計算される流動数(通過人数)は一定の信頼性を持つと期待できる。   The advantages of not synchronizing each process are shown below. By operating in this way, the following two merits are born. First, when the flow status measuring device 100 is mounted on a general-purpose computer, the processes can be executed in parallel, so that the substantial processing speed can be increased compared to the case where all the processes are executed sequentially ( The time interval during which the image processing result is reflected can be shortened). The second is that measurement is performed at a fixed time interval even when a plurality of measurements are executed simultaneously on the same computer or when another process is operating. Depending on computer specifications and circumstances, the time required to complete a large-volume image processing process may vary greatly, but the above-mentioned flow calculation process operates at a fixed time interval because the calculation amount is extremely small ( Memory read, calculation, log output). If the process of image processing (“flow calculation unit 32 and flow velocity estimation unit 34”, “foreground image calculation unit 38 and in-region number estimation unit 40” process, or both processes are temporarily delayed) The previous value is read from the update memory, but if the flow rate and the number of people in the area do not change drastically in a short time, the calculated flow number (passing number of people) has a certain reliability even in this case. Can be expected.

図4に、流動状況計測装置100のタイムチャートを示す。   In FIG. 4, the time chart of the flow condition measuring apparatus 100 is shown.

まず、領域推定プロセスについて説明する。   First, the region estimation process will be described.

ステップS11では、所定枚(例えば2枚)のフレーム画像の画像系列を取得する。   In step S11, an image sequence of predetermined (for example, two) frame images is acquired.

ステップS12では、ステップS11で取得した画像系列に基づいて、画像上の被写体の動きに対応する動きベクトルを算出する。 In step S12, on the basis of the image sequence acquired in step S11 1, and calculates the motion vector corresponding to the movement of an object on an image.

ステップS13では、ステップS12で算出された動きベクトルに基づいて、群衆の画像上の流速を推定する。   In step S13, the flow velocity on the crowd image is estimated based on the motion vector calculated in step S12.

ステップS14では、ステップS13で推定された流速の移動平均を流速更新メモリ36に記録する。   In step S14, the moving average of the flow velocity estimated in step S13 is recorded in the flow velocity update memory 36.

領域推定プロセスは、上記のステップS11〜S14からなる一連の処理を繰り返す。   The region estimation process repeats a series of processes consisting of steps S11 to S14 described above.

次に、領域内人数推定プロセスについて説明する。   Next, the process of estimating the number of people in the area will be described.

ステップS21では、フレーム画像の画像系列のうちの現在画像を取得する。   In step S21, the current image in the image sequence of the frame image is acquired.

ステップS22では、ステップS21で取得した現在画像に基づいて、画像上の動物体領域を抽出し、動物体領域を表す前景画像を算出する。   In step S22, a moving object region on the image is extracted based on the current image acquired in step S21, and a foreground image representing the moving object region is calculated.

ステップS23では、ステップS22で算出された前景画像に基づいて、予め処理対象と指定された領域内における領域内人数を推定する。   In step S23, based on the foreground image calculated in step S22, the number of people in the area in the area designated as the processing target in advance is estimated.

ステップS24では、ステップS23で推定された領域内人数を領域内人数更新メモリ42に記録する。   In step S24, the number of people in the area estimated in step S23 is recorded in the number of people in area update memory 42.

領域内人数推定プロセスは、上記のステップS21〜S24からなる一連の処理を繰り返す。このとき、領域内人数推定プロセスの一連の処理は、領域推定プロセスの一連の処理とは非同期に実行される。   The in-area number estimation process repeats a series of processes including steps S21 to S24 described above. At this time, a series of processes in the area estimation process is executed asynchronously with a series of processes in the area estimation process.

次に、流動計算プロセスについて説明する。   Next, the flow calculation process will be described.

ステップS31では、流速更新メモリ36の流速と、領域内人数更新メモリ42の領域内人数とを取得する。   In step S31, the flow rate in the flow rate update memory 36 and the number of people in the area of the in-region number update memory 42 are acquired.

ステップS32では、ステップS31で取得した流速更新メモリ36の流速と、領域内人数更新メモリ42の領域内人数とに基づいて、所定時間内の推定流動数を計算する。   In step S32, the estimated number of flows within a predetermined time is calculated based on the flow rate of the flow rate update memory 36 acquired in step S31 and the number of people in the area of the in-region number update memory 42.

ステップS33では、ステップS32で計算された推定流動数をログデータとして保存する。
流動計算プロセスは、上記のステップS31〜S33からなる一連の処理を繰り返す。このとき、流動計算プロセスの一連の処理は、領域推定プロセスの一連の処理及び領域内人数推定プロセスの一連の処理のそれぞれとは非同期に実行される。
In step S33, the estimated number of flows calculated in step S32 is stored as log data.
The flow calculation process repeats a series of processes composed of steps S31 to S33 described above. At this time, a series of processes of the flow calculation process is executed asynchronously with each of a series of processes of the area estimation process and a series of processes of the in-area number estimation process.

以上説明したように、本発明の第1の実施の形態に係る流動状況計測装置によれば、画像系列に基づいて、画像上の被写体の動きに対応する動きベクトルを算出し、動きベクトルに基づいて、群衆の画像上の流速を推定し、画像系列に基づいて、画像上の動物体領域を抽出し、動物体領域を表す前景画像を算出し、前景画像に基づいて、予め処理対象と指定された領域内における領域内人数を推定し、流速更新メモリ36の流速と、領域内人数更新メモリ42の領域内人数とを参照し、所定時間内の推定流動数を算出する過程において、フロー算出部32及び流速推定部34の一連の処理と、前景画像算出部38及び領域内人数推定部40の一連の処理とは、非同期に繰り返し実行され、流動計算部44は、予め指定されたタイミングで、流速更新メモリ36の流速と、領域内人数更新メモリ42の領域内人数とを参照し、所定時間内の推定流動数を繰り返し算出してログデータとして保存することにより、安定して精度よく流動状況を計測できる。   As described above, according to the flow situation measuring apparatus according to the first embodiment of the present invention, the motion vector corresponding to the motion of the subject on the image is calculated based on the image series, and based on the motion vector. Then, the flow velocity on the crowd image is estimated, the moving object region on the image is extracted based on the image series, the foreground image representing the moving object region is calculated, and the processing target is designated in advance based on the foreground image. In the process of estimating the number of people in the region and referring to the flow rate in the flow rate update memory 36 and the number of people in the region in the region number update memory 42, the flow calculation is performed in the process of calculating the estimated number of flows within a predetermined time. The series of processes of the unit 32 and the flow velocity estimation unit 34 and the series of processes of the foreground image calculation unit 38 and the in-region number estimation unit 40 are repeatedly executed asynchronously, and the flow calculation unit 44 is performed at a timing specified in advance. The flow By referring to the flow rate of the update memory 36 and the number of people in the area of the area memory update memory 42 and repeatedly calculating the estimated number of flows within a predetermined time and storing it as log data, the flow situation can be stably and accurately determined. It can be measured.

<本発明の第2の実施の形態に係る流動状況計測装置の構成> <Configuration of Flow Status Measuring Device According to Second Embodiment of the Present Invention>

次に、本発明の第2の実施の形態に係る流動状況計測装置の構成について説明する。なお、第1の実施の形態と同様となる箇所については同一符号を付して説明を省略する。   Next, the structure of the flow condition measuring device according to the second embodiment of the present invention will be described. In addition, the same code | symbol is attached | subjected about the location similar to 1st Embodiment, and description is abbreviate | omitted.

図5に示すように、第2の実施の形態の流動状況計測装置200では、第1の実施の形態の流動状況計測装置100の構成に加え、カメラ較正部50を更に備える。カメラ較正部50は、画像入力部60と、キャリブレーション部62とを備えている。   As shown in FIG. 5, the flow state measuring apparatus 200 according to the second embodiment further includes a camera calibration unit 50 in addition to the configuration of the flow state measuring apparatus 100 according to the first embodiment. The camera calibration unit 50 includes an image input unit 60 and a calibration unit 62.

画像入力部60は、画像入力部30と同様に、カメラ10により撮影した映像から得られるフレーム画像を入力する。   Similar to the image input unit 30, the image input unit 60 inputs a frame image obtained from video captured by the camera 10.

キャリブレーション部62は、画像入力部60から入力されたフレーム画像から、カメラの位置(床面座標系に対する3次元位置)、方向(床面座標系に対するカメラの画像軸方向)、カメラの焦点距離等のカメラ較正データを、カメラキャリブレーション(較正)を行うことで取得しておき、カメラパラメータ64として保存する。   The calibration unit 62 determines the camera position (three-dimensional position with respect to the floor coordinate system), direction (camera image axis direction with respect to the floor coordinate system), and camera focal length from the frame image input from the image input unit 60. The camera calibration data such as is acquired by performing camera calibration (calibration) and stored as the camera parameter 64.

流動計算部44は、推定流動数の算出に加えて、カメラパラメータ64と、領域内人数更新メモリ42の領域内人数とに基づいて、実空間における人の密度を算出する。ここでは、カメラパラメータ64から画像上のROIに対応する床面上の面積を算出しておき、実空間における人の密度である実空間密度[人/m]を求めればよい。この実空間密度は、安全管理上の指標(サービス水準の指標)となるため、実空間密度の値をログデータとして出力する。 In addition to calculating the estimated number of flows, the flow calculation unit 44 calculates the density of people in the real space based on the camera parameters 64 and the number of people in the area of the number of people update area 42 in the area. Here, the area on the floor corresponding to the ROI on the image is calculated from the camera parameter 64, and the real space density [person / m 2 ], which is the density of the person in the real space, may be obtained. Since this real space density is an index for safety management (an index of service level), the value of the real space density is output as log data.

また、流動計算部44は、カメラパラメータ64と、流速更新メモリ36の流速とに基づいて、実空間における群衆の流速を算出する。ここでは、カメラパラメータ64から求められる画像上の実空間の移動の長さから、大凡の実空間における流速(群衆の平均速度)[m/s]を求めればよい。この実空間における流速も安全管理上の指標(サービス水準の指標)となるため、実空間における流速の値をログデータとして出力する。なお、実空間における流速の際の具体的な計算方法は、上記特許文献1、特許文献1から引用される先行技術文献、非特許文献1、及び非特許文献2などを参照すれば良い。   Further, the flow calculation unit 44 calculates the crowd flow velocity in the real space based on the camera parameter 64 and the flow velocity of the flow velocity update memory 36. Here, the flow velocity (average speed of the crowd) [m / s] in the approximate real space may be obtained from the length of the real space movement on the image obtained from the camera parameter 64. Since the flow velocity in the real space is also an index for safety management (an index of service level), the value of the flow velocity in the real space is output as log data. In addition, what is necessary is just to refer to the prior art literature quoted from the said patent document 1, the patent document 1, the nonpatent literature 1, the nonpatent literature 2, etc. for the specific calculation method in the case of the flow velocity in real space.

[非特許文献1]:「映像からの人数推定における遺伝的アルゴリズムを使ったカメラパラメータの調整」、宮川勲,新井啓之,小池秀樹、日本知能情報ファジィ学会誌21(1) 41-55、2009年2月 [Non-patent document 1]: “Adjusting camera parameters using a genetic algorithm for estimating the number of people from video”, Isao Miyagawa, Hiroyuki Arai, Hideki Koike, Journal of Japan Society for Fuzzy Information Technology 21 (1) 41-55, 2009 February

[非特許文献2]:「Estimating the Number of Pedestrians based on People Flow Analysis and Tracking」、IIEEJ Transactions on Image and Visual Computing, Vol.1, No.1, pp19-27(2012). [Non-Patent Document 2]: “Estimating the Number of Pedestrians based on People Flow Analysis and Tracking”, IIEEJ Transactions on Image and Visual Computing, Vol.1, No.1, pp19-27 (2012).

なお、第2の実施の形態の他の構成については、第1の実施の形態と同様であるため、詳細な説明を省略する。   Since the other configuration of the second embodiment is the same as that of the first embodiment, detailed description thereof is omitted.

以上説明したように、本発明の第2の実施の形態に係る流動状況計測装置によれば、画像系列に基づいて、画像上の被写体の動きに対応する動きベクトルを算出し、動きベクトルに基づいて、群衆の画像上の流速を推定し、画像系列に基づいて、画像上の動物体領域を抽出し、動物体領域を表す前景画像を算出し、前景画像に基づいて、予め処理対象と指定された領域内における領域内人数を推定し、流速更新メモリ36の流速と、領域内人数更新メモリ42の領域内人数とを参照し、所定時間内の推定流動数を算出する過程において、フロー算出部32及び流速推定部34の一連の処理と、前景画像算出部38及び領域内人数推定部40の一連の処理とは、非同期に繰り返し実行され、流動計算部44は、予め指定されたタイミングで、流速更新メモリ36の流速と、領域内人数更新メモリ42の領域内人数と、カメラパラメータ64とに基づいて、所定時間内の推定流動数、実空間における群衆の流速、及び実空間における人の密度を繰り返し算出してログデータとして保存することにより、安定して精度よく流動状況を計測できる。   As described above, according to the flow situation measuring apparatus according to the second embodiment of the present invention, the motion vector corresponding to the motion of the subject on the image is calculated based on the image series, and based on the motion vector. Then, the flow velocity on the crowd image is estimated, the moving object region on the image is extracted based on the image series, the foreground image representing the moving object region is calculated, and the processing target is designated in advance based on the foreground image. In the process of estimating the number of people in the region and referring to the flow rate in the flow rate update memory 36 and the number of people in the region in the region number update memory 42, the flow calculation is performed in the process of calculating the estimated number of flows within a predetermined time. The series of processes of the unit 32 and the flow velocity estimation unit 34 and the series of processes of the foreground image calculation unit 38 and the in-region number estimation unit 40 are repeatedly executed asynchronously, and the flow calculation unit 44 is performed at a timing specified in advance. The flow Based on the flow rate of the update memory 36, the number of people in the area of the update memory 42, the number of people in the area, and the camera parameter 64, the estimated number of flows in a predetermined time, the flow rate of the crowd in the real space, and the density of people in the real space are obtained. By repeatedly calculating and saving as log data, the flow situation can be measured stably and accurately.

また、本発明の第1及び第2の実施の形態の手法により、カメラ画像から流動数を計測する際、スペックの低い計算機での高速処理が可能となり、また複数の計測を同じ計算上で多重に動作させても、所定の計測間隔を保った形での計測が可能となるため、限られた計算資源を有効に活用した計測が可能となる(計算資源が不足する場合でも良好な計測を継続することができる)。   In addition, when the number of flows is measured from a camera image by the method of the first and second embodiments of the present invention, high-speed processing is possible with a low-spec computer, and multiple measurements are multiplexed on the same calculation. Even if it is operated, it is possible to measure in a form that keeps a predetermined measurement interval. Therefore, it is possible to make effective use of limited calculation resources (even if calculation resources are insufficient, good measurement can be performed. Can continue).

なお、本発明は、上述した実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲内で様々な変形や応用が可能である。   The present invention is not limited to the above-described embodiment, and various modifications and applications can be made without departing from the gist of the present invention.

10 カメラ
20 計測部
22 システムクロック
30、60 画像入力部
32 フロー算出部
34 流速推定部
36 流速更新メモリ
38 前景画像算出部
40 領域内人数推定部
42 領域内人数更新メモリ
44 流動計算部
50 カメラ較正部
62 キャリブレーション部
64 カメラパラメータ
100、200 流動状況計測装置
DESCRIPTION OF SYMBOLS 10 Camera 20 Measurement part 22 System clock 30, 60 Image input part 32 Flow calculation part 34 Flow rate estimation part 36 Flow rate update memory 38 Foreground image calculation part 40 In-area number estimation part 42 In-area number update memory 44 Flow calculation part 50 Camera calibration Unit 62 Calibration unit 64 Camera parameter 100, 200 Flow condition measuring device

Claims (7)

カメラで撮影した画像に写る場所の群衆の流動状況を計測する流動状況計測装置であって、
前記カメラにより撮影したフレーム画像の画像系列を時系列順に入力する画像入力部と、
入力された前記画像系列に基づいて、画像上の被写体の動きに対応する動きベクトルを算出するフロー算出部と、
前記算出された前記動きベクトルに基づいて、前記群衆の画像上の流速を推定する流速推定部と、
前記フレーム画像に基づいて、画像上の動物体領域を抽出し、前記動物体領域を表す前景画像を算出する前景画像算出部と、
算出された前景画像に基づいて、予め処理対象と指定された領域内における領域内人数を推定する領域内人数推定部と、
前記推定された前記流速を一時的に保持する流速更新メモリと、
前記推定された前記領域内人数を一時的に保持する領域内人数更新メモリと、
前記流速更新メモリの前記流速と、前記領域内人数更新メモリの前記領域内人数とを参照し、前記処理対象と指定された領域内における所定時間内の推定流動数を算出する流動計算部と、
を含み、
前記フロー算出部及び前記流速推定部の一連の処理と、前記前景画像算出部及び前記領域内人数推定部の一連の処理とは、非同期に繰り返し実行され、
前記流動計算部は、予め指定されたタイミングで、前記流速更新メモリの前記流速と、前記領域内人数更新メモリの前記領域内人数とを参照し、所定時間内の推定流動数を繰り返し算出してログデータとして保存する流動状況計測装置。
A flow condition measuring device for measuring the flow condition of a crowd in a place reflected in an image taken by a camera,
An image input unit for inputting an image sequence of frame images taken by the camera in time-series order;
A flow calculation unit that calculates a motion vector corresponding to the motion of the subject on the image based on the input image sequence;
A flow velocity estimating unit for estimating a flow velocity on the image of the crowd based on the calculated motion vector;
A foreground image calculation unit for extracting a moving object region on the image based on the frame image and calculating a foreground image representing the moving object region;
Based on the calculated foreground image, the in-region number estimating unit for estimating the number of people in the region in the region designated as the processing target in advance,
A flow rate update memory for temporarily holding the estimated flow rate;
An area number update memory that temporarily holds the estimated number of persons in the area;
A flow calculation unit that refers to the flow rate of the flow rate update memory and the number of people in the area of the area update memory, and calculates an estimated flow number within a predetermined time in the area designated as the processing target ;
Including
A series of processes of the flow calculation unit and the flow velocity estimation unit and a series of processes of the foreground image calculation unit and the in-region number estimation unit are repeatedly executed asynchronously,
The flow calculation unit repeatedly calculates the estimated number of flows within a predetermined time with reference to the flow rate of the flow rate update memory and the number of people in the region in the region at a predetermined timing. A flow status measurement device that saves log data.
前記カメラの設置位置、撮影方向、及び焦点距離を含むカメラパラメータを事前に取得するキャリブレーション部を更に含み、
前記流動計算部は、前記推定流動数の算出に加え、事前に取得した前記カメラパラメータと、前記流速更新メモリの前記流速と、前記領域内人数更新メモリの前記領域内人数とに基づいて、実空間における群衆の前記流速、又は前記実空間における人の密度を算出する請求項1に記載の流動状況計測装置。
A calibration unit for acquiring in advance camera parameters including the installation position, shooting direction, and focal length of the camera;
In addition to the calculation of the estimated number of flows, the flow calculation unit performs an actual operation based on the camera parameters acquired in advance, the flow velocity of the flow velocity update memory, and the number of people in the region of the area number update memory. The flow condition measuring device according to claim 1, wherein the flow velocity of the crowd in the space or the density of the person in the real space is calculated.
前記流速更新メモリは、前記推定された前記流速の移動平均を保持し、
前記領域内人数更新メモリは、前記推定された前記領域内人数の移動平均を保持し、
前記流動計算部は、予め指定されたタイミングで、前記流速更新メモリの前記流速の移動平均と、前記領域内人数更新メモリの前記領域内人数の移動平均とを参照し、所定時間内の推定流動数を繰り返し算出してログデータとして保存する請求項1又は2記載の流動状況計測装置。
The flow velocity update memory holds a moving average of the estimated flow velocity,
The in-region number update memory holds a moving average of the estimated number of people in the region ,
The flow calculation unit refers to the moving average of the flow rate in the flow rate update memory and the moving average of the number of people in the area in the area update memory at a predetermined timing, and estimates the flow within a predetermined time. The flow state measuring device according to claim 1 or 2, wherein the number is repeatedly calculated and stored as log data .
カメラで撮影した画像に写る場所の群衆の流動状況を計測する流動状況計測装置における流動状況計測方法であって、
画像入力部が、前記カメラにより撮影したフレーム画像の画像系列を時系列順に入力するステップと、
フロー算出部が、入力された前記画像系列に基づいて、画像上の被写体の動きに対応する動きベクトルを算出するステップと、
流速推定部が、前記算出された前記動きベクトルに基づいて、前記群衆の画像上の流速を推定し、前記流速を一時的に保持する流速更新メモリに、前記推定された前記流速を格納するステップと、
前景画像算出部が、前記フレーム画像に基づいて、画像上の動物体領域を抽出し、前記動物体領域を表す前景画像を算出するステップと、
領域内人数推定部が、算出された前景画像に基づいて、予め処理対象と指定された領域内における領域内人数を推定し、前記領域内人数を一時的に保持する領域内人数更新メモリに、前記推定された前記領域内人数を格納するステップと、
流動計算部が、前記流速更新メモリの前記流速と、前記領域内人数更新メモリの前記領域内人数とを参照し、前記処理対象と指定された領域内における所定時間内の推定流動数を算出するステップと、
を含み、
前記フロー算出部及び前記流速推定部の各ステップの一連の処理と、前記前景画像算出部及び前記領域内人数推定部の各ステップの一連の処理とは、非同期に繰り返し実行され、
前記流動計算部が算出するステップは、予め指定されたタイミングで、前記流速更新メモリの前記流速と、前記領域内人数更新メモリの前記領域内人数とを参照し、所定時間内の推定流動数を繰り返し算出してログデータとして保存する流動状況計測方法。
A flow status measurement method in a flow status measurement device for measuring the flow status of a crowd in a place taken in an image taken by a camera,
An image input unit inputting an image sequence of frame images photographed by the camera in chronological order;
A flow calculating unit calculating a motion vector corresponding to a motion of a subject on the image based on the input image sequence;
A step of estimating a flow velocity on the crowd image based on the calculated motion vector, and storing the estimated flow velocity in a flow velocity update memory that temporarily holds the flow velocity; When,
A foreground image calculating unit extracting a moving object region on the image based on the frame image and calculating a foreground image representing the moving object region;
The in-area number estimating unit estimates the in-area number of persons in the area designated as a processing target in advance based on the calculated foreground image, and temporarily stores the in-area number of persons in the in-area number update memory. Storing the estimated number of people in the area;
The flow calculation unit calculates the estimated number of flows within a predetermined time in the area designated as the processing target with reference to the flow rate in the flow rate update memory and the number of people in the area in the area update memory. Steps,
Including
A series of processes of each step of the flow calculation unit and the flow velocity estimation unit and a series of processes of each step of the foreground image calculation unit and the in-region number estimation unit are repeatedly executed asynchronously,
The step of calculating the flow calculation unit refers to the flow rate of the flow rate update memory and the number of people in the region in the region at a predetermined timing, and calculates the estimated number of flows in a predetermined time. A flow status measurement method that repeatedly calculates and saves log data.
キャリブレーション部が、前記カメラの設置位置、撮影方向、及び焦点距離を含むカメラパラメータを事前に取得するステップを更に含み、
前記流動計算部が算出するステップは、前記推定流動数の算出に加え、事前に取得した前記カメラパラメータと、前記流速更新メモリの前記流速と、前記領域内人数更新メモリの前記領域内人数とに基づいて、実空間における群衆の前記流速、又は前記実空間における人の密度を算出する請求項4に記載の流動状況計測方法。
The calibration unit further includes a step of acquiring in advance camera parameters including an installation position, a shooting direction, and a focal length of the camera,
In addition to calculating the estimated number of flows, the flow calculation unit calculates the camera parameters acquired in advance, the flow rate of the flow rate update memory, and the number of people in the region of the in-region number update memory. The flow state measuring method according to claim 4, wherein the flow velocity of the crowd in the real space or the density of the person in the real space is calculated based on the flow rate.
前記流速推定部が前記流速更新メモリに格納するステップは、前記推定された前記流速の移動平均を前記流速更新メモリに格納し、
前記領域内人数推定部が前記領域内人数更新メモリに格納するステップは、前記推定された前記領域内人数の移動平均を前記領域内人数更新メモリに格納し、
前記流動計算部は、予め指定されたタイミングで、前記流速更新メモリの前記流速の移動平均と、前記領域内人数更新メモリの前記領域内人数の移動平均とを参照し、所定時間内の推定流動数を繰り返し算出してログデータとして保存する請求項4又は5記載の流動状況計測方法。
The step of storing the flow velocity estimation unit in the flow velocity update memory stores the moving average of the estimated flow velocity in the flow velocity update memory,
The step of storing the number of people in the area in the number of people update memory in the region stores the estimated moving average of the number of people in the region in the number of people update memory in the region ,
The flow calculation unit refers to the moving average of the flow rate in the flow rate update memory and the moving average of the number of people in the area in the area update memory at a predetermined timing, and estimates the flow within a predetermined time. The flow state measuring method according to claim 4 or 5, wherein the number is repeatedly calculated and stored as log data .
コンピュータを、請求項1〜請求項3のいずれか1項に記載の流動状況計測装置の各部として機能させるためのプログラム。   The program for functioning a computer as each part of the flow condition measuring apparatus of any one of Claims 1-3.
JP2016209984A 2016-10-26 2016-10-26 Flow condition measuring apparatus, method, and program Active JP6564756B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016209984A JP6564756B2 (en) 2016-10-26 2016-10-26 Flow condition measuring apparatus, method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016209984A JP6564756B2 (en) 2016-10-26 2016-10-26 Flow condition measuring apparatus, method, and program

Publications (2)

Publication Number Publication Date
JP2018074299A JP2018074299A (en) 2018-05-10
JP6564756B2 true JP6564756B2 (en) 2019-08-21

Family

ID=62111654

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016209984A Active JP6564756B2 (en) 2016-10-26 2016-10-26 Flow condition measuring apparatus, method, and program

Country Status (1)

Country Link
JP (1) JP6564756B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7237499B2 (en) * 2018-09-19 2023-03-13 株式会社東芝 Image sensor, sensing method, control system and program
JP2020170252A (en) 2019-04-01 2020-10-15 キヤノン株式会社 Image processing device, image processing method, and program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5272213B2 (en) * 2010-04-30 2013-08-28 日本電信電話株式会社 ADVERTISEMENT EFFECT MEASUREMENT DEVICE, ADVERTISEMENT EFFECT MEASUREMENT METHOD, AND PROGRAM
JP2013246490A (en) * 2012-05-23 2013-12-09 Nippon Telegr & Teleph Corp <Ntt> Estimation device, estimation method and computer program
JP5990042B2 (en) * 2012-06-22 2016-09-07 日本電信電話株式会社 Passing number estimation method and computer program
US11138443B2 (en) * 2014-06-30 2021-10-05 Nec Corporation Guidance processing apparatus and guidance method

Also Published As

Publication number Publication date
JP2018074299A (en) 2018-05-10

Similar Documents

Publication Publication Date Title
JP7428213B2 (en) Information processing system, information processing method and program
JP6161257B2 (en) Event detection apparatus and method, operation recognition apparatus and method, and program
EP2330557B1 (en) Moving body detection method and moving body detection device
JP4966820B2 (en) Congestion estimation apparatus and method
US10853949B2 (en) Image processing device
US8363902B2 (en) Moving object detection method and moving object detection apparatus
JP6120404B2 (en) Mobile body behavior analysis / prediction device
KR101708491B1 (en) Method for recognizing object using pressure sensor
JP2014006586A (en) Information processor, and control method and computer program thereof
KR101840167B1 (en) System and method for interworking with target interest through handover between multiple cameras in cloud
KR101472674B1 (en) Method and apparatus for video surveillance based on detecting abnormal behavior using extraction of trajectories from crowd in images
JP6564756B2 (en) Flow condition measuring apparatus, method, and program
JP4836065B2 (en) Edge tracking method and computer program therefor
JP7327645B2 (en) Image processing device, image processing system, image processing method, and image processing program
KR20180013149A (en) Poaching environment monitoring apparatus
US20210287051A1 (en) Methods and systems for recognizing object using machine learning model
JP2023161956A (en) Object tracking device, object tracking method, and program
US10891491B2 (en) In-store monitoring device, in-store monitoring method, and recording medium
Mahmood et al. Contextual Anomaly Detection Based Video Surveillance System
WO2020166129A1 (en) State recognition device
JP2010087937A (en) Video detection device, video detection method and video detection program
Feng et al. A robust Student's-t distribution PHD filter with OCSVM updating for multiple human tracking
CN109885560A (en) The cleaning method and device of shale gas pressure break equipment infrared imaging inspection data
JP7131690B2 (en) Control device, control method, and program
KR101888495B1 (en) Pixel parallel processing method for real time motion detection

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180207

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181022

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181204

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190201

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190723

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190729

R150 Certificate of patent or registration of utility model

Ref document number: 6564756

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150