JP2018060360A - Person number estimation method, person number estimation device, person number estimation program and recording medium - Google Patents
Person number estimation method, person number estimation device, person number estimation program and recording medium Download PDFInfo
- Publication number
- JP2018060360A JP2018060360A JP2016197230A JP2016197230A JP2018060360A JP 2018060360 A JP2018060360 A JP 2018060360A JP 2016197230 A JP2016197230 A JP 2016197230A JP 2016197230 A JP2016197230 A JP 2016197230A JP 2018060360 A JP2018060360 A JP 2018060360A
- Authority
- JP
- Japan
- Prior art keywords
- image
- person
- feature amount
- unit
- learning
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
【課題】画像特徴量を用いた人数推定における個別学習の手間及びコストを低減させることができる人数推定方法、人数推定装置、人数推定プログラム、及び記録媒体を提供する。【解決手段】事前設定時に、固定カメラと実空間座標系との幾何学的関係を示すキャリブレーションパラメータを計測し、無人状態で固定カメラにより撮影された画像である背景画像を取得し、キャリブレーションパラメータを参照しながら背景画像上に予め用意された人物画像を配置した画像である人物配置画像を生成し、生成された人物配置画像から画像特徴量を算出し、算出された画像特徴量と配置人数との関係を示す学習用特徴量データを保存する。計測時に、固定カメラにより撮影された撮影画像を入力し、入力された撮影画像から画像特徴量を算出し、算出された画像特徴量、及び保存された学習用特徴量データに基づき、撮影画像に写っている人物の人数を推定する。【選択図】図1A number estimation method, a number estimation device, a number estimation program, and a recording medium capable of reducing the labor and cost of individual learning in the number estimation using image feature amounts are provided. A calibration parameter indicating a geometric relationship between a fixed camera and a real space coordinate system is measured at the time of presetting, a background image that is an image photographed by the fixed camera in an unattended state is acquired, and calibration is performed. A person arrangement image that is an image in which a person image prepared in advance is arranged on a background image while referring to a parameter is generated, an image feature amount is calculated from the generated person arrangement image, and the calculated image feature amount and arrangement are calculated. Feature data for learning indicating the relationship with the number of people is stored. At the time of measurement, a captured image captured by a fixed camera is input, an image feature amount is calculated from the input captured image, and a captured image is calculated based on the calculated image feature amount and stored learning feature amount data. Estimate the number of people in the picture. [Selection] Figure 1
Description
本発明は、セキュリティ用途、安全管理用途、マーケティング用途等への適用を想定し、固定カメラで撮影した画像において、撮影されている場所に存在する人物の人数を推定する人数推定方法、人数推定装置、人数推定プログラム、及び記録媒体に関する。 The present invention is intended for security use, safety management use, marketing use, etc., and in a picture taken with a fixed camera, a number estimating method and a number estimating apparatus for estimating the number of persons existing at a place being shot , A number estimation program, and a recording medium.
駅、空港、イベント施設等の人が多く集まる場所において、過剰な混雑は、将棋倒し等の深刻な事故の原因となる。そのため、過剰な混雑が発生しないように事前に対策することに加えて、混雑発生時に適切に誘導する等の現場対応を行う必要がある。そこで、施設内の各要所において混雑状況をモニタリングしたいという安全管理上のニーズが存在している。一方、商業施設、アミューズメント施設等において、お客様の快適性確保及び効果的な販売促進等を目的として施設内の人の人数をデータとして計測し、計測結果を活用したいというマーケティング上のニーズが存在している。人数を計測するセンサには様々なセンサがあるが、計測したい場所が比較的広い場合には、カメラで撮影した画像が有力な計測手段となる。 In places where many people gather, such as stations, airports, and event facilities, excessive congestion can cause serious accidents such as shogi defeat. For this reason, in addition to taking measures in advance so as not to cause excessive congestion, it is necessary to take on-site measures such as appropriately guiding when congestion occurs. Therefore, there is a safety management need to monitor the congestion situation at each important point in the facility. On the other hand, in commercial facilities, amusement facilities, etc., there is a marketing need to measure the number of people in the facility as data for the purpose of ensuring customer comfort and effective sales promotion, etc., and to use the measurement results. ing. There are various sensors for measuring the number of people, but when a place to be measured is comparatively wide, an image taken by a camera is an effective measuring means.
画像から、画像に写っている人物の人数を計測又は推定する様々な方法が既に提案され、利用されている。これらの方法を大きく分類すると、下記の3つの方式が挙げられる。 Various methods for measuring or estimating the number of persons in an image from an image have already been proposed and used. These methods are roughly classified into the following three methods.
(1)画像上の個々の人物を検出する方式(人物検出タイプ)
(2)画像上の個々の移動物体を追跡することで人数を算出する方式(追跡タイプ)
(3)個々の人物を検出しないで、画像上の特徴量、局所的な画像処理の結果等を統合することで人数を推定する方式(特徴量タイプ)
(1) Method for detecting individual persons on an image (person detection type)
(2) Method to calculate the number of people by tracking individual moving objects on the image (tracking type)
(3) A method for estimating the number of persons by integrating feature amounts on an image, results of local image processing, etc. without detecting individual persons (feature type)
従来の多くの技術は、上述した方法の何れか、又は上述した方法を組み合わせて実現されている。このうち上記(1)及び(2)の方式では、人が少ない状況においては高い精度を実現するものの、混雑した状況においては誤差が大きくなって処理が破綻するため、混雑した状況への適用が困難となる。前述した利用場面のうち、駅等の公共施設、及びイベント施設における安全管理においては、混雑した状況でも一定の精度が保たれることが必須要件となるため、上記(1)及び(2)の方式を用いることは困難である。 Many conventional techniques are realized by combining any of the above-described methods or the above-described methods. Among them, the methods (1) and (2) above achieve high accuracy in a situation where there are few people, but in a crowded situation, the error becomes large and the processing breaks down. It becomes difficult. Among the above-mentioned usage scenes, in safety management at public facilities such as stations and event facilities, it is essential that a certain level of accuracy be maintained even in crowded situations, so the above (1) and (2) It is difficult to use the method.
一方、上記(3)の方式は、一般に人が少ない状況での推定精度は高くないものの、混雑した状況においても比較的安定した精度での推定が可能である(例えば、非特許文献1参照)。しかし、実際に上記(3)の方式を利用するためには、個々のカメラに対して学習データを取得し、特徴量と人数との関係を分析するといった学習又は回帰分析が必要となる。ここでの学習データは、実際に人物が写っている多数の画像を取得し、取得した画像に写っている人物の人数を計測し、計測したデータを画像毎に記録したデータである。 On the other hand, although the method (3) generally does not provide high estimation accuracy in a situation where there are few people, it can be estimated with relatively stable accuracy even in a crowded situation (see, for example, Non-Patent Document 1). . However, in order to actually use the method (3), learning or regression analysis is required in which learning data is acquired for each camera and the relationship between the feature quantity and the number of people is analyzed. The learning data here is data obtained by acquiring a large number of images in which a person is actually captured, measuring the number of persons in the acquired image, and recording the measured data for each image.
これに対し、個別の学習を行わず、カメラキャリブレーションのみで、人数推定を行う方式も提案されている(例えば、特許文献1を参照)。カメラキャリブレーションとは、カメラと、カメラの設置場所の床面等の実空間座標系と、の幾何学的な関係を示すキャリブレーションパラメータを計測する処理である。しかしながら、画像が人物で埋め尽くされているような状況等の、過密に混雑した状況においては、カメラキャリブレーションを用いる方法では人数が推定できない。 On the other hand, a method of estimating the number of people by only camera calibration without performing individual learning has been proposed (see, for example, Patent Document 1). The camera calibration is a process of measuring calibration parameters indicating a geometric relationship between the camera and a real space coordinate system such as a floor surface of the camera installation location. However, in an overcrowded situation such as a situation where the image is filled with people, the number of people cannot be estimated by the method using camera calibration.
つまり、過密に混雑した状況において人数計測又は人数推定を行いたい場合には、個々のカメラに対して学習データを収集し、特徴量もしくは画像そのものと、画像に写っている人の人数との関係を取得するといった個別の学習又は回帰分析が必要である。そのため、学習データを収集するための手間及びコスト、及び、学習又は回帰分析を行うための手間及びコストが妨げとなり、実用化が進まないという問題があった。特に、学習データを収集する手間及びコストが問題となっている。 In other words, if you want to measure or estimate the number of people in an overcrowded situation, collect learning data for each camera, and the relationship between the feature value or the image itself and the number of people in the image Requires separate learning or regression analysis. Therefore, the trouble and cost for collecting learning data and the trouble and cost for performing learning or regression analysis are hindered, and there has been a problem that the practical application has not progressed. In particular, the labor and cost of collecting learning data are a problem.
本発明は、以上のような事情に鑑みてなされたものであり、画像特徴量を用いた人数推定における個別学習の手間及びコストを低減させることができる人数推定方法、人数推定装置、人数推定プログラム、及び記録媒体を提供することを目的とする。 The present invention has been made in view of the circumstances as described above, and a person estimation method, a person estimation apparatus, and a person estimation program that can reduce the labor and cost of individual learning in person estimation using image feature amounts. And a recording medium.
また、上記目的を達成するために、本発明の人数推定方法は、キャリブレーション部、背景画像取得部、人物配置画像生成部、学習用特徴量保存部、画像入力部、画像特徴量算出部、及び人数推定部を含む人数推定装置における人数推定方法であって、事前設定時に、前記キャリブレーション部が、固定カメラと実空間座標系との幾何学的関係を示すキャリブレーションパラメータを計測するカメラキャリブレーションステップと、前記背景画像取得部が、無人状態で前記固定カメラにより撮影された画像である背景画像を取得する背景画像取得ステップと、前記人物配置画像生成部が、前記キャリブレーションパラメータを参照しながら前記背景画像上に予め用意された人物画像を配置した画像である人物配置画像を生成する人物配置画像生成ステップと、前記学習用特徴量保存部が、生成された前記人物配置画像から画像特徴量を算出し、算出された画像特徴量と配置人数との関係を示す学習用特徴量データを保存する学習用特徴量保存ステップと、計測時に、前記画像入力部が、前記固定カメラにより撮影された撮影画像を入力する画像入力ステップと、画像特徴量算出部が、入力された前記撮影画像から前記画像特徴量を算出する画像特徴量算出ステップと、前記人数推定部が、算出された前記画像特徴量、及び前記学習用特徴量保存部により保存された学習用特徴量データに基づき、前記撮影画像に写っている人物の人数を推定する人数推定ステップと、を行う。 In order to achieve the above object, a method for estimating the number of persons according to the present invention includes a calibration unit, a background image acquisition unit, a person arrangement image generation unit, a learning feature amount storage unit, an image input unit, an image feature amount calculation unit, Calibration method for measuring a calibration parameter indicating a geometric relationship between a fixed camera and a real space coordinate system at the time of presetting. A background image acquisition step in which the background image acquisition unit acquires a background image that is an image taken by the fixed camera in an unattended state, and the person arrangement image generation unit refers to the calibration parameter. However, a person arrangement image that generates a person arrangement image that is an image in which a person image prepared in advance is arranged on the background image And the learning feature amount storage unit calculates an image feature amount from the generated person layout image, and stores learning feature amount data indicating a relationship between the calculated image feature amount and the number of persons arranged. A learning feature amount storage step, an image input step in which the image input unit inputs a captured image captured by the fixed camera, and an image feature amount calculation unit, from the input captured image, at the time of measurement. An image feature amount calculating step for calculating a feature amount, and the number-of-person estimation unit adds the image feature amount to the captured image based on the calculated image feature amount and the learning feature amount data stored by the learning feature amount storage unit. And a number estimation step for estimating the number of persons in the image.
また、本発明の人数推定方法は、前記人数推定ステップでは、前記人数推定部が、計測時に算出された画像特徴量について、前記学習用特徴量データの特徴量に対する近傍探索を行い、探索結果に基づいて前記人数を推定するようにしても良い。 In the number estimating method according to the present invention, in the number estimating step, the number estimating unit performs a neighborhood search on the feature amount of the learning feature amount data with respect to the image feature amount calculated at the time of measurement, and the search result is obtained. The number of persons may be estimated based on the above.
また、本発明の人数推定方法は、前記人数推定装置は、学習部を含み、事前設定時に、前記学習部が、前記学習用特徴量データを用いて画像特徴量と前記人数との関係を示す回帰式を学習する学習ステップを更に行い、前記人数推定ステップでは、前記人数推定部が、計測時に算出された画像特徴量を、前記学習部により学習された前記回帰式に入力することにより、前記人数を推定するようにしても良い。 Further, in the number estimating method of the present invention, the number estimating device includes a learning unit, and the learning unit indicates the relationship between the image feature amount and the number of people using the learning feature amount data at the time of presetting. Further, a learning step of learning a regression equation is performed, and in the number of people estimation step, the number of people estimation unit inputs the image feature amount calculated at the time of measurement into the regression equation learned by the learning unit, The number of people may be estimated.
また、本発明の人数推定方法は、前記人物配置画像生成ステップでは、前記人物配置画像生成部が、前記固定カメラにより撮影された場所に現れる人物に関するプロフィールに基づき、配置する前記人物画像を性別、年代、及び服装の少なくとも1つにより選定するようにしても良い。 Further, in the person estimation image generation step of the present invention, in the person arrangement image generation step, the person arrangement image generation unit genders the person image to be arranged based on a profile relating to a person appearing in a place photographed by the fixed camera, You may make it select according to an age and at least one of clothes.
また、本発明の人数推定装置は、前記人数推定装置は、人物画像検出記録部を含み、前記人物画像検出記録部が、前記固定カメラにより撮影された撮影画像に写っている人物を検出して前記人物画像として記録する人物画像検出記録部を更に行い、前記人物配置画像生成ステップでは、前記人物配置画像生成部が、前記人物画像検出記録部に記録された前記人物画像を前記人物配置画像に配置するようにしても良い。 In the number estimating device according to the present invention, the number estimating device includes a person image detection / recording unit, and the person image detection / recording unit detects a person in a photographed image photographed by the fixed camera. A person image detection recording unit for recording as the person image is further performed. In the person arrangement image generation step, the person arrangement image generation unit converts the person image recorded in the person image detection recording unit into the person arrangement image. It may be arranged.
また、本発明の人数推定装置は、事前設定時に、固定カメラと実空間座標系との幾何学的関係を示すキャリブレーションパラメータを計測するキャリブレーション部と、無人状態で前記固定カメラにより撮影された画像である背景画像を取得する背景画像取得部と、前記キャリブレーションパラメータを参照しながら前記背景画像上に予め用意された人物画像を配置した画像である人物配置画像を生成する人物配置画像生成部と、生成された前記人物配置画像から画像特徴量を算出し、算出された画像特徴量と配置人数との関係を示す学習用特徴量データを保存する学習用特徴量保存部と、計測時に、前記固定カメラにより撮影された撮影画像を入力する画像入力部と、入力された前記撮影画像から前記画像特徴量を算出する画像特徴量算出部と、算出された前記画像特徴量、及び前記学習用特徴量保存部により保存された学習用特徴量データに基づき、前記撮影画像に写っている人物の人数を推定する人数推定部と、を含む。 In addition, the number estimating device of the present invention was photographed by the fixed camera in the unattended state with a calibration unit that measures a calibration parameter indicating a geometric relationship between the fixed camera and the real space coordinate system at the time of presetting. A background image acquisition unit that acquires a background image that is an image, and a person arrangement image generation unit that generates a person arrangement image that is an image in which a person image prepared in advance is arranged on the background image with reference to the calibration parameter And a learning feature amount storage unit that calculates an image feature amount from the generated person arrangement image, stores learning feature amount data indicating a relationship between the calculated image feature amount and the number of arranged people, and at the time of measurement, An image input unit that inputs a captured image captured by the fixed camera, and an image feature amount calculation that calculates the image feature amount from the input captured image And a number estimation unit that estimates the number of persons in the captured image based on the calculated image feature amount and the learning feature amount data stored by the learning feature amount storage unit. .
また、上記目的を達成するために、本発明の人数推定プログラムは、コンピュータに、本発明の人数推定方法の各ステップを実行させるためのプログラムである。 In order to achieve the above object, the number of persons estimation program of the present invention is a program for causing a computer to execute each step of the number of persons estimation method of the present invention.
また、上記目的を達成するために、本発明の記録媒体は、コンピュータに、本発明の人数推定方法の各ステップを実行させるための人数推定プログラムを記録したコンピュータ読み取り可能な記録媒体である。 In order to achieve the above object, the recording medium of the present invention is a computer-readable recording medium recording a number estimation program for causing a computer to execute each step of the number estimation method of the present invention.
本発明によれば、画像特徴量を用いた人数推定における個別学習の手間及びコストを低減させることが可能となる。 According to the present invention, it is possible to reduce the labor and cost of individual learning in estimating the number of people using image feature amounts.
以下、本発明に係る人数推定装置の実施形態について図面を用いて具体的に説明する。 Hereinafter, an embodiment of a number estimating device according to the present invention will be specifically described with reference to the drawings.
本実施形態では、固定カメラで撮影された画像データ(映像データ)を計算機に入力し、入力した画像データに対して、計算機上で画像処理を実施する場合について説明するが、この実施形態に限定されない。また、本実施形態には、固定カメラから画像データを逐一取得し、逐一画像処理を行うリアルタイム型の処理、及び、固定カメラから取得した画像データを一旦ハードディスク等の記録媒体に記録された画像データを読み出して画像処理を行うオフライン型の処理の何れも適用可能である。 In the present embodiment, a case will be described in which image data (video data) captured by a fixed camera is input to a computer, and image processing is performed on the input image data on the computer. However, the present embodiment is limited to this embodiment. Not. In addition, in the present embodiment, real-time processing that acquires image data from a fixed camera one by one and performs image processing one by one, and image data that is once recorded on a recording medium such as a hard disk are obtained. Any of the off-line type processes that read the image and perform image processing can be applied.
図1は、本実施形態に係る人数推定装置10の基本的な装置構成を示す機能ブロック図である。 FIG. 1 is a functional block diagram showing a basic device configuration of a number estimating device 10 according to the present embodiment.
まず、図面を参照しながら、事前設定時の処理を行うための構成について説明する。 First, a configuration for performing processing at the time of presetting will be described with reference to the drawings.
本実施形態に係る人数推定装置10は、図1に示すように、事前設定時の処理を行うための構成として、人物画像記憶部12、画像入力部14、背景画像取得部16、キャリブレーション部18、人物配置画像生成部20、画像特徴量算出部22、学習用特徴量保存部24、及び学習用特徴量データ記憶部26を備えている。 As shown in FIG. 1, a person image storage unit 12, an image input unit 14, a background image acquisition unit 16, and a calibration unit are configured as a configuration for performing processing at the time of presetting, as shown in FIG. 18, a person arrangement image generation unit 20, an image feature amount calculation unit 22, a learning feature amount storage unit 24, and a learning feature amount data storage unit 26.
人物画像記憶部12は、人物が描画された複数の人物画像を予め記憶している。ここでの人物画像は、一例として図2に示すように、起立した1人の人物の全身が描画された矩形の画像である。本実施形態では、人物画像記憶部12は、様々な人物の全身が描画された複数の人物画像44を記憶している。 The person image storage unit 12 stores a plurality of person images in which a person is drawn in advance. The person image here is a rectangular image in which the whole body of one standing person is drawn as shown in FIG. 2 as an example. In the present embodiment, the person image storage unit 12 stores a plurality of person images 44 in which the whole bodies of various persons are drawn.
画像入力部14は、事前設定時に、固定カメラ、当該固定カメラにより撮影された動画ファイル、当該固定カメラにより撮影された静止画系列等からフレーム画像を取得する。 The image input unit 14 acquires a frame image from a fixed camera, a moving image file captured by the fixed camera, a still image sequence captured by the fixed camera, and the like at the time of presetting.
背景画像取得部16は、画像入力部14で取得されたフレーム画像から、当該固定カメラにより撮影された、人物が写っていない無人状態の画像である背景画像を取得する。人物が映っていない状態で人手で当該固定カメラにより画像を撮影することにより、背景画像50を最も簡単に取得できる。その他、異なる時刻に当該固定カメラにより撮影された複数のフレーム画像を用いて、画素毎に時間方向の平均値を算出して各画素の画素値とした画像を背景画像50としても良い。なお、背景画像50を取得する方法については、既に様々な方法が提案されており、ここではその方法について限定しない。 The background image acquisition unit 16 acquires, from the frame image acquired by the image input unit 14, a background image that is an unmanned image that is captured by the fixed camera and does not show a person. The background image 50 can be most easily acquired by manually capturing an image with the fixed camera while no person is shown. Alternatively, the background image 50 may be an image obtained by calculating an average value in the time direction for each pixel using a plurality of frame images photographed by the fixed camera at different times. Various methods for acquiring the background image 50 have already been proposed, and the method is not limited here.
キャリブレーション部18は、当該固定カメラの設置後、計測処理の前処理として、固定カメラの幾何学的な配置を記述するキャリブレーションパラメータを取得する。ここでのキャリブレーションパラメータは、床面座標系における固定カメラの位置、撮影方向、焦点距離(拡大率)等を示すパラメータである。このようなカメラキャリブレーションとしては、既知のグリッドパターン、ドットパターン等を床面において撮影した画像を用いる方法が広く知られているが、その他、既知の構造物を置いて撮影した画像を用いる方法等もある(例えば、下記参考文献1を参照)。 After the installation of the fixed camera, the calibration unit 18 acquires a calibration parameter describing the geometric arrangement of the fixed camera as a pre-process of the measurement process. The calibration parameters here are parameters indicating the position of the fixed camera in the floor coordinate system, the shooting direction, the focal length (magnification ratio), and the like. As such camera calibration, a method using an image obtained by photographing a known grid pattern, dot pattern or the like on the floor surface is widely known, but other methods using an image obtained by placing a known structure are used. (For example, see the following reference 1).
[参考文献1]特許第5331047号公報 [Reference 1] Japanese Patent No. 5331047
なお、カメラキャリブレーション方法としては、様々な方法が用いられているが、ここでは、上述した各パラメータを取得できれば良く、フレーム画像の各画素が実空間でどのような直線に対応するのかを特定できる情報を取得できれば良いものとし、その具体的な方法については限定しない。 Various methods are used as the camera calibration method. Here, it is only necessary to acquire the above-described parameters, and it is possible to specify what line each pixel of the frame image corresponds to in real space. It is only necessary to acquire information that can be obtained, and the specific method is not limited.
人物配置画像生成部20は、背景画像50、キャリブレーションパラメータ、及び事前に準備した人物画像44を用いて、背景画像50上に人物画像44を配置した人物配置画像52を生成する。 The person arrangement image generation unit 20 generates a person arrangement image 52 in which the person image 44 is arranged on the background image 50 using the background image 50, the calibration parameters, and the person image 44 prepared in advance.
なお、以下の説明において、上記キャリブレーションパラメータが既知の前提において、下記(4)及び(5)の2つの幾何計算を適宜実行する必要がある。 In the following description, it is necessary to appropriately execute the following two geometric calculations (4) and (5) on the assumption that the calibration parameters are known.
(4)実空間座標(X,Y,Z)(ただし、X,Yは床面上の座標、Zは高さ方向の座標)が指定された場合の画像上の対応画素の画像座標(x,y)の算出
(5)画像座標(x,y)及び実空間における床面からの高さZが指定された場合の床面上座標(X,Y)の算出
(4) Image coordinates (x of the corresponding pixel on the image when real space coordinates (X, Y, Z) (where X, Y are coordinates on the floor and Z is coordinates in the height direction) are designated. , Y) (5) Calculation of the coordinates (X, Y) on the floor when the image coordinates (x, y) and the height Z from the floor in real space are specified
しかし、これらの具体的な計算方法については、上記参考文献1等に示すように既に広く知られているため、ここではその詳細な説明を割愛する。 However, since these specific calculation methods are already widely known as shown in the above-mentioned reference 1 and the like, detailed description thereof is omitted here.
以下、人物配置画像52を生成する具体的な方法の一例を示す。 Hereinafter, an example of a specific method for generating the person arrangement image 52 will be described.
まず、画像の四隅もしくは画像内の処理範囲を指定する矩形の四隅の画像座標(x,y)から、キャリブレーションパラメータを用いて、対応する床面の高さにおける床面座標(X,Y)を求める。そして、求められた床面上の4点を頂点とする四角形を、床面上において人物を配置する人物配置範囲40とする。 First, from the image coordinates (x, y) of the four corners of the image or the rectangular four corners that specify the processing range in the image, the floor surface coordinates (X, Y) at the corresponding floor surface height using the calibration parameters. Ask for. Then, a quadrangle having the obtained four points on the floor as vertices is set as a person arrangement range 40 in which a person is arranged on the floor.
床面上の所定領域内において無作為な位置に人物を配置する方法としては、例えば、床面上に上述した四角形を包含するような正方形(X方向の長さW、Y方向の長さWの正方形)の領域を設定し、例えば−1.0から+1.0までの乱数を2つ発生させ、発生させた乱数の値に応じて正方形内の座標を決めることで、正方形内の位置座標を無作為に発生させることができる。そして、発生させた床面座標が上述した人物配置範囲を示す四角形の中にある場合には、その床面座標を採用し、その四角形の中に含まれない場合には、その床面座標を棄却し、再度乱数を発生させて、人物配置範囲40を示す四角形の中にある床面座標が発生するまで繰り返せば良い。 As a method of arranging a person at a random position within a predetermined area on the floor surface, for example, a square (length W in the X direction, length W in the Y direction) that includes the above-described square on the floor surface. Position of the square), for example, two random numbers from -1.0 to +1.0 are generated, and the coordinates within the square are determined according to the generated random number values. Can be generated randomly. If the generated floor surface coordinates are in the rectangle indicating the person arrangement range described above, the floor surface coordinates are adopted, and if not included in the rectangle, the floor surface coordinates are used. It may be rejected, a random number is generated again, and repeated until a floor surface coordinate within a quadrilateral representing the person arrangement range 40 is generated.
このようにして、例えば、3人分の人物画像44を配置する場合には、人物配置範囲40を示す四角形に含まれる3つの床面座標を算出する。 In this way, for example, when three person images 44 are arranged, three floor surface coordinates included in a rectangle indicating the person arrangement range 40 are calculated.
次に、発生させた床面座標の位置に、人物のサイズに対応する矩形(例えば、高さ1.65m、幅0.4m等、人物の実寸サイズに類似したサイズの矩形)42を実空間上に配置する。この際、図2に示すように、固定カメラ48に対して正対する角度で矩形42を配置することが望ましい。そして、人物画像記憶部12に予め記憶させておいた人物画像44を、配置された矩形42にはめ込む。この際、キャリブレーションパラメータを用いて、矩形42上のX,Y,Zの三次元座標と人物画像44の画素との対応付けを行い、それをもとに矩形42上の人物画像44を画像上に投影していく。この際、矩形42上のX,Y,Zから画像上のx,yを算出しながら人物画像44の画素値を背景画像50上に転写することにより、人物画像を画像上に投影する。これにより、図2に示すように、矩形42上に人物画像44が配置された人物配置画像52を得ることができる。 Next, a rectangle 42 corresponding to the size of the person (for example, a rectangle having a size similar to the actual size of the person, such as a height of 1.65 m and a width of 0.4 m) 42 is placed in the real space at the position of the generated floor coordinate. Place on top. At this time, as shown in FIG. 2, it is desirable to arrange the rectangle 42 at an angle facing the fixed camera 48. Then, the person image 44 stored in advance in the person image storage unit 12 is fitted into the arranged rectangle 42. At this time, the calibration parameters are used to associate the three-dimensional coordinates of X, Y, and Z on the rectangle 42 with the pixels of the person image 44, and based on this, the person image 44 on the rectangle 42 is converted into an image. Project above. At this time, the pixel value of the person image 44 is transferred onto the background image 50 while calculating x and y on the image from X, Y, and Z on the rectangle 42, thereby projecting the person image onto the image. Thereby, as shown in FIG. 2, a person arrangement image 52 in which a person image 44 is arranged on a rectangle 42 can be obtained.
なお、この際、人物画像44の背景部(人物以外の部分)については、背景であることが指定されているものとし(例えば、透明化されているものとし)、背景画像50上に転写されないようにする。また、複数位置に配置された複数の人物画像44の背景画像50への転写の順番については、複数の人物画像44について、固定カメラ48直下の床面座標からの距離を計算し、その距離が遠いものから描画することで、前後関係が正しい人物配置画像52を生成することができる。 At this time, the background portion (portion other than the person) of the person image 44 is assumed to be the background (for example, transparent) and is not transferred onto the background image 50. Like that. Further, regarding the order of transfer of the plurality of person images 44 arranged at a plurality of positions to the background image 50, the distance from the floor coordinate immediately below the fixed camera 48 is calculated for the plurality of person images 44, and the distance is calculated. By drawing from a distant place, it is possible to generate a person arrangement image 52 with the correct context.
このようにして、配置する人物の人数、すなわち背景画像50に配置する人物画像44の数を0、1、2、3、10、100、…というように変化させながら、それぞれ複数枚数の人物配置画像52を生成する。 In this way, the number of persons to be arranged, that is, the number of person images 44 arranged on the background image 50 is changed to 0, 1, 2, 3, 10, 100,. An image 52 is generated.
なお、上述したように、背景画像50上の矩形(画像の四隅又は矩形で指定された処理範囲)を床面に投影した範囲を人物を配置する範囲とした場合について説明したが、これに限らない。例えば、実空間における人物の移動範囲が、柱等の構造物等により制限されている場合には、壁、柱等の構造物等に対応する範囲を人物の移動範囲から除外することにより、実空間における人物の移動範囲を人物配置画像52において正確に反映させるように床面上の人物配置範囲を決定することで、その場所の構造及び特性に合わせた人物配置画像52を生成することもできる。 In addition, as described above, the case where the range in which the rectangle on the background image 50 (the processing range specified by the four corners or the rectangle of the image) is projected on the floor surface is set as the range in which the person is arranged has been described. Absent. For example, when the movement range of a person in real space is limited by structures such as pillars, the range corresponding to structures such as walls and pillars is excluded from the movement range of persons. By determining the person arrangement range on the floor so that the movement range of the person in the space is accurately reflected in the person arrangement image 52, the person arrangement image 52 that matches the structure and characteristics of the place can be generated. .
このような配置の限定は、背景画像50上で床と壁や壁の下端が接する場所の端点(柱の角等)を背景画像50上で指定し、その床面座標を求めることで、床面座標上に柱、壁等の位置を投影することができる。これを用いて、床面上の人物配置範囲を限定すれば良い。 Such arrangement is limited by designating an end point (such as a column corner) where the floor and the wall or the lower end of the wall contact on the background image 50 on the background image 50 and obtaining the floor surface coordinates. The positions of pillars, walls, etc. can be projected on the plane coordinates. The person arrangement range on the floor may be limited using this.
なお、本実施形態では、二次元の人物画像44を用いて人物配置画像52を生成する場合について説明したが、これに限らない。例えば、二次元の人物画像44に代えて、三次元の人物モデル(CG(computer graphics)用三次元オブジェクト)を配置し、レンダリングにより得られた画像を用いることも可能である。ここでのレンダリングとは、例えば、三次元の人物モデルに予め定めた方向から照明を当てたときに得られる二次元画像を生成することをいう。 In the present embodiment, the case where the person arrangement image 52 is generated using the two-dimensional person image 44 has been described, but the present invention is not limited to this. For example, instead of the two-dimensional person image 44, a three-dimensional person model (a three-dimensional object for computer graphics (CG)) may be arranged and an image obtained by rendering may be used. Rendering here refers to, for example, generating a two-dimensional image obtained when a three-dimensional human model is illuminated from a predetermined direction.
次に、画像特徴量算出部22は、生成された人物配置画像52の各々に対して所定の画像処理(特徴量算出処理)を行う。ここで画像特徴量としては、人の混雑状況(その場所の総人数、密度)は直接的又は間接的に反映させる数値、もしくは多次元ベクトルであれば良く、これまでにも混雑状況に対応するとされるテクスチャ特徴は様々なものが提案されているが、その具体的な計算方法は特定しない。一例としては、下記参考文献2(及びその関連研究)で提案されている「フラクタル次元数」を画像特徴量としても良い。 Next, the image feature amount calculation unit 22 performs predetermined image processing (feature amount calculation processing) on each of the generated person layout images 52. Here, as the image feature amount, the congestion situation (total number of people in the place, density) of the person may be a numerical value or a multi-dimensional vector that is reflected directly or indirectly. Various texture features have been proposed, but the specific calculation method is not specified. As an example, the “fractal dimension number” proposed in Reference Document 2 (and related research) below may be used as the image feature amount.
[参考文献2]宮川,新井他「映像からの人数推定における遺伝的アルゴリズムを使ったカメラパータの調整」、知能と情報:日本知能情報ファジィ学会誌:journal of Japan Society for Fuzzy Theory and Intelligent Informatics 21(1), pp.41 -55, 2009-2-15. [Reference 2] Miyagawa, Arai et al. “Adjusting Camera Parter Using Genetic Algorithm for Estimating the Number of People from Video”, Intelligence and Information: Journal of Japan Society for Fuzzy Theory and Intelligent Informatics 21 (1), pp.41 -55, 2009-2-15.
学習用特徴量保存部24は、人物配置画像52に対して算出された画像特徴量と、配置した人数とを対にしたデータ(学習用特徴量データ)をハードディスク、メディア等の学習用特徴量データ記憶部26に記憶させる。 The learning feature quantity storage unit 24 uses data (learning feature quantity data) obtained by pairing the image feature quantity calculated for the person layout image 52 and the number of people arranged for learning feature quantities such as a hard disk and media. The data is stored in the data storage unit 26.
次に、図面を参照しながら、計測時の処理を行うための構成について説明する。 Next, a configuration for performing processing during measurement will be described with reference to the drawings.
また、本実施形態に係る人数推定装置10は、図1に示すように、計測時の処理を行うための構成として、画像入力部28、画像特徴量算出部30、及び、人数推定部32を備えている。 Further, as shown in FIG. 1, the number estimating device 10 according to the present embodiment includes an image input unit 28, an image feature amount calculating unit 30, and a number estimating unit 32 as a configuration for performing processing at the time of measurement. I have.
画像入力部28は、計測時に、固定カメラ、当該固定カメラにより撮影された動画ファイル、当該固定カメラにより撮影された静止画系列等からフレーム画像を取得する。 At the time of measurement, the image input unit 28 acquires a frame image from a fixed camera, a moving image file captured by the fixed camera, a still image sequence captured by the fixed camera, and the like.
画像特徴量算出部30は、上述した画像特徴量算出部22と同様に、画像入力部28により取得された画像について、画像特徴量を算出する。 The image feature amount calculation unit 30 calculates an image feature amount for the image acquired by the image input unit 28, similarly to the image feature amount calculation unit 22 described above.
人数推定部32は、画像特徴量算出部30により算出された画像特徴量と、学習用特徴量データ記憶部26に記憶されている、事前設定時に作成しておいた学習用特徴量データの画像特徴量とに基づいて、尤もらしい人数を推定し、推定結果34を出力する。 The number-of-persons estimation unit 32 includes the image feature amount calculated by the image feature amount calculation unit 30 and the image of the learning feature amount data that is stored in the learning feature amount data storage unit 26 and created in advance. Based on the feature quantity, the number of likely persons is estimated, and an estimation result 34 is output.
本実施形態では、学習用特徴量データとして、画像特徴量と配置人数とが対応付けられたデータが記憶されているため、近傍探索により、計測時の画像の画像特徴量と近い画像特徴量を持つ学習用特徴量データを探索し、探索された近傍データの配置人数を推定人数とする。この際、近傍探索の高速化のために、事前にツリー構造を作成する方法、ハッシングテーブルを作成しておく方法等があるが、これらの処理は適宜利用すれば良い。 In the present embodiment, as the learning feature value data, data in which the image feature value is associated with the number of persons to be arranged is stored. Therefore, an image feature value that is close to the image feature value of the image at the time of measurement is obtained by proximity search. The learning feature amount data is searched for, and the number of people in the searched neighborhood data is set as the estimated number. At this time, there are a method of creating a tree structure in advance and a method of creating a hashing table in order to speed up the neighborhood search. These processes may be used as appropriate.
なお、本実施形態に係る人数推定装置10は、例えば、CPU(Central Processing Unit)、RAM(Random Access Memory)、各種プログラムを記憶するROM(Read Only Memory)を備えたコンピュータ装置で構成される。また、人数推定装置10を構成するコンピュータは、ハードディスクドライブ、不揮発性メモリ等の記憶部を備えていても良い。本実施形態では、CPUがROM、ハードディスク等の記憶部に記憶されているプログラムを読み出して実行することにより、上記のハードウェア資源とプログラムとが協働し、上述した機能が実現される。 The number estimating device 10 according to the present embodiment is configured by a computer device including, for example, a CPU (Central Processing Unit), a RAM (Random Access Memory), and a ROM (Read Only Memory) that stores various programs. Moreover, the computer which comprises the number-of-people estimation apparatus 10 may be provided with memory | storage parts, such as a hard disk drive and a non-volatile memory. In the present embodiment, the CPU reads and executes a program stored in a storage unit such as a ROM or a hard disk, whereby the hardware resources and the program cooperate to realize the above-described function.
ここで、以上説明した、事前設定時に行われる生成処理と、計測時に行われる推定処理との処理手順を、図3に示すフローチャートを用いて説明する。 Here, the processing procedure of the generation process performed at the time of presetting described above and the estimation process performed at the time of measurement will be described with reference to the flowchart shown in FIG.
なお、本実形態では、生成処理及び推定処理のプログラムは予め記憶部に記憶されているが、これに限らない。例えば、生成処理及び推定処理のプログラムは、外部装置から受信して実行されても良い。また、CD−ROM等の記録媒体に記録された生成処理及び推定処理のプログラムがCD−ROMドライブ等で読み込まれることにより、生成処理及び推定処理が実行されるようにしてもよい。 In this embodiment, the generation process and estimation process programs are stored in the storage unit in advance, but the present invention is not limited thereto. For example, the program for the generation process and the estimation process may be received from an external device and executed. Further, the generation process and the estimation process may be executed by reading a program for the generation process and the estimation process recorded on a recording medium such as a CD-ROM with a CD-ROM drive or the like.
まず、事前設定時に行われる生成処理について説明する。 First, the generation process performed at the time of presetting will be described.
本実施形態では、生成処理のプログラムは、生成処理の実行の指示が入力された場合に実行される。 In the present embodiment, the generation process program is executed when an instruction to execute the generation process is input.
ステップS101では、画像入力部14が、撮影画像を入力し、フレーム画像を取得する。 In step S101, the image input unit 14 inputs a captured image and acquires a frame image.
ステップS103では、キャリブレーション部18が、固定カメラ48のキャリブレーションパラメータを取得することにより、カメラキャリブレーションを行う。 In step S <b> 103, the calibration unit 18 performs camera calibration by acquiring the calibration parameters of the fixed camera 48.
ステップS105では、背景画像取得部16が、画像入力部14により入力された撮影画像から、背景画像50を取得する。 In step S <b> 105, the background image acquisition unit 16 acquires the background image 50 from the captured image input by the image input unit 14.
ステップS107では、人物配置画像生成部20が、取得された背景画像50と、人物画像記憶部12に記憶されている人物画像44とを用いて、複数枚の人物配置画像52を生成する。 In step S107, the person arrangement image generation unit 20 generates a plurality of person arrangement images 52 using the acquired background image 50 and the person image 44 stored in the person image storage unit 12.
ステップS109では、画像特徴量算出部22が、生成された人物配置画像52から、画像特徴量を算出する。 In step S109, the image feature amount calculation unit 22 calculates an image feature amount from the generated person layout image 52.
ステップS111では、学習用特徴量保存部24が、算出された画像特徴量を、人物配置画像52に配置された人物の人数に対応づけて学習用特徴量データ記憶部26に記憶させ、本生成処理のプログラムの実行を終了する。 In step S111, the learning feature quantity storage unit 24 stores the calculated image feature quantity in the learning feature quantity data storage unit 26 in association with the number of persons arranged in the person arrangement image 52, thereby generating the main generation. Terminates execution of the processing program.
次に、計測時に行われる推定処理について説明する。 Next, the estimation process performed at the time of measurement is demonstrated.
本実施形態では、推定処理のプログラムは、推定処理の実行の指示が入力された場合に実行される。 In the present embodiment, the estimation process program is executed when an instruction to execute the estimation process is input.
ステップS201では、画像入力部28が、固定カメラ48により撮影された撮影画像を入力し、入力した撮影画像からフレーム画像を取得する。 In step S201, the image input unit 28 inputs a captured image captured by the fixed camera 48, and acquires a frame image from the input captured image.
ステップS203では、画像特徴量算出部30が、取得したフレーム画像の画像特徴量を算出する。 In step S203, the image feature amount calculation unit 30 calculates the image feature amount of the acquired frame image.
ステップS205では、人数推定部32が、学習用特徴量データ記憶部26に記憶されている学習用特徴量データと、算出したフレーム画像の画像特徴量とから、固定カメラ48により撮影されている場所に現れた人物の人数を推定する。 In step S205, the place where the number of people estimation unit 32 is photographed by the fixed camera 48 from the learning feature amount data stored in the learning feature amount data storage unit 26 and the calculated image feature amount of the frame image. Estimate the number of people who appeared in
ステップS207では、人数推定部32が、終了条件を満たしているか否かを判定する。ここでの終了条件は、例えば、ステップS201で取得した全てのフレーム画像に対してステップS203乃至S205の処理を行ったこととする。ステップS207で終了条件を満たしていないと判定した場合(S207,N)はステップS201に移行する。また、ステップS207で終了条件を満たしていると判定した場合(S207,Y)は、本推定処理のプログラムの実行を終了する。 In step S207, the number estimating unit 32 determines whether or not the end condition is satisfied. The termination condition here is, for example, that the processes in steps S203 to S205 have been performed on all the frame images acquired in step S201. If it is determined in step S207 that the termination condition is not satisfied (S207, N), the process proceeds to step S201. If it is determined in step S207 that the termination condition is satisfied (S207, Y), the execution of the program of the estimation process is terminated.
このように、本実施形態では、事前設定時に、キャリブレーション部18により、固定カメラ48と実空間座標系との幾何学的関係を示すキャリブレーションパラメータが計測される。また、背景画像取得部16により、無人状態で固定カメラ48により撮影された画像である背景画像50が取得される。また、人物配置画像生成部20により、キャリブレーションパラメータを参照しながら背景画像50上に予め用意された人物画像44を配置した画像である人物配置画像52が生成される。また、画像特徴量算出部22により、生成された人物配置画像52から画像特徴量が算出され、学習用特徴量保存部24により、算出された画像特徴量と配置人数との関係を示す学習用特徴量データが学習用特徴量データ記憶部26に記憶される。 As described above, in the present embodiment, the calibration parameter indicating the geometric relationship between the fixed camera 48 and the real space coordinate system is measured by the calibration unit 18 at the time of presetting. In addition, the background image acquisition unit 16 acquires a background image 50 that is an image taken by the fixed camera 48 in an unattended state. In addition, the person arrangement image generation unit 20 generates a person arrangement image 52 that is an image in which the person image 44 prepared in advance is arranged on the background image 50 while referring to the calibration parameters. Further, the image feature amount calculation unit 22 calculates an image feature amount from the generated person arrangement image 52, and the learning feature amount storage unit 24 indicates a relationship between the calculated image feature amount and the number of persons arranged. The feature amount data is stored in the learning feature amount data storage unit 26.
さらに、本実施形態では、計測時に、画像入力部28により、固定カメラ48により撮影された撮影画像が入力される。また、画像特徴量算出部30により、入力された撮影画像から画像特徴量が算出される。また、人数推定部32により、算出された画像特徴量、及び学習用特徴量データ記憶部26に記憶された学習用特徴量データに基づき、前記撮影画像に写っている人物の人数が推定される。 Furthermore, in the present embodiment, a captured image captured by the fixed camera 48 is input by the image input unit 28 during measurement. Further, the image feature amount calculation unit 30 calculates an image feature amount from the input captured image. In addition, the number of persons estimated in the photographed image is estimated by the number estimating unit 32 based on the calculated image feature amount and the learning feature amount data stored in the learning feature amount data storage unit 26. .
これにより、事前設定時に、個々の固定カメラ48に対して学習データを取得する必要がなくなるため、事前設定時の手間、及びコストを大幅に削減した形で人数推定処理を実行することが可能となる。特に、学習データして、実際に人物が写っている大量の画像を取得し、その画像に写っている人物の人数を計測して記憶する処理が削減されることにより、大幅に手間及びコストを削減できる。 This eliminates the need to acquire learning data for each fixed camera 48 at the time of pre-setting, so that it is possible to execute the number-of-people estimation process in a form that greatly reduces the labor and cost at the time of pre-setting. Become. In particular, learning data, a large amount of images that actually contain people, and the processing to measure and store the number of people in the images are reduced, which greatly reduces labor and cost. Can be reduced.
なお、本実施形態では、人物配置画像52に対して算出された画像特徴量と、人物配置画像52に配置した人数とを対にしたデータを学習用特徴量データとして学習用特徴量データ記憶部26に記憶する場合について説明したが、これに限らない。 In the present embodiment, the learning feature value data storage unit uses, as learning feature value data, a pair of the image feature value calculated for the person placement image 52 and the number of people arranged in the person placement image 52. Although the case where it memorize | stores in 26 was demonstrated, it is not restricted to this.
例えば、図4に示すように、学習用特徴量保存部24に学習部36を設けても良い。学習部36は、学習用特徴量データを用いて、配置人数と画像特徴量との間の関係を推定して回帰式を生成し、生成した回帰式のパラメータを求める。また、学習用特徴量保存部24は、学習部により求められたパラメータを適用した回帰式を、学習用特徴量データ記憶部26に記憶させる。 For example, as shown in FIG. 4, a learning unit 36 may be provided in the learning feature amount storage unit 24. The learning unit 36 uses the learning feature amount data to estimate the relationship between the number of arranged persons and the image feature amount, generates a regression equation, and obtains parameters of the generated regression equation. Further, the learning feature quantity storage unit 24 causes the learning feature quantity data storage unit 26 to store a regression equation to which the parameter obtained by the learning unit is applied.
具体的な回帰式としては、直線、多項式への近似等、様々な方法を用いることができ、ここではその方法については限定しない。 As a specific regression equation, various methods such as a straight line and approximation to a polynomial can be used, and the method is not limited here.
また、学習用特徴量データ記憶部26に、上述した回帰式が記憶されている場合には、人数推定部32は、計測時に固定カメラ48により撮影された撮影画像から算出された画像特徴量を回帰式に入力することで、推定人数を算出すると良い。 In addition, when the above-described regression equation is stored in the learning feature data storage unit 26, the number estimation unit 32 uses the image feature calculated from the captured image captured by the fixed camera 48 at the time of measurement. It is better to calculate the estimated number of people by entering the regression equation.
また、本実施形態では、人物配置画像52を生成する際に、予め用意された人物画像44を用いる場合について説明したが、これに限らない。計測する場所によって、固定カメラ48により撮影される場所に現れる人物のプロフィールが異なっている場合がある。例えば、オフィス、商業施設等において、男性サラリーマンが多い場所、学生が多い場所、買い物客が多い場所等、現れる人物のプロフィール(性別、年代、服装等)に関して偏りが大きい場所が存在する。また、曜日、季節、時間帯等によって、現れる人物のプロフィールに関して偏りが大きい場所が存在する。 In the present embodiment, the case where the person image 44 prepared in advance is used when the person arrangement image 52 is generated has been described. However, the present invention is not limited to this. Depending on the measurement location, the profile of the person appearing at the location photographed by the fixed camera 48 may be different. For example, in offices, commercial facilities, etc., there are places where there is a large bias with respect to the profile (gender, age, clothes, etc.) of the appearing person, such as a place with many male office workers, a place with many students, and a place with many shoppers. In addition, there are places where there is a large bias in the profile of the appearing person depending on the day of the week, the season, the time zone, and the like.
このような場合、場所毎に現れる人物のプロフィールが異なっている場合には、複数種類の人物画像44を人物画像記憶部12に記憶しておき、現れる人物のプロフィールに合わせて人物画像44を選択することで、より高精度な推定が可能となる。例えば、人物画像44に写っている人物の性別、年代、及び服装の少なくとも1つを示す情報を人物画像44に付加しておき、現れる人物のプロフィールに合わせて、性別、年代、及び服装の少なくとも1つに基づいて人物画像44を選定すると良い。また、曜日や季節や時間帯によって現れる人物が異なっている場合には、曜日、季節、及び時間帯毎に学習用特徴量データを切り換えることで対応が可能である。 In such a case, when the profile of the person appearing at each location is different, a plurality of types of person images 44 are stored in the person image storage unit 12 and the person image 44 is selected according to the profile of the person appearing. By doing so, more accurate estimation becomes possible. For example, information indicating at least one of the gender, age, and clothes of a person shown in the person image 44 is added to the person image 44, and at least gender, age, and clothes are matched with the profile of the person who appears. The person image 44 may be selected based on one. In addition, when the person appearing according to the day of the week, the season, or the time zone is different, it can be dealt with by switching the learning feature data for each day of the week, season, and time zone.
また、本実施形態に係る人数推定装置10は、固定カメラ48により撮影された撮影画像に写っている人物を検出して人物画像44として人物画像記憶部12に記憶させる人物画像検出記録部を備えていても良い。人物画像検出記録部は、固定カメラ48により撮影される場所に現れる人物を撮影した撮影画像を逐次収集し、撮影画像に写っている人物を検出して、人物画像44として人物画像記憶部12に記憶させておく。 In addition, the number estimation device 10 according to the present embodiment includes a person image detection recording unit that detects a person in a captured image captured by the fixed camera 48 and stores the person image 44 in the person image storage unit 12. May be. The person image detection / recording unit sequentially collects captured images obtained by capturing a person appearing at a place captured by the fixed camera 48, detects a person appearing in the captured image, and stores it as a person image 44 in the person image storage unit 12. Remember.
これにより、当該場所の照明条件に合った人物画像44であって、かつ当該場所に現れる人物のプロフィールを反映した人物画像44を用いて、人物配置画像52を生成することができる。また、これにより、人数推定の精度の向上が期待される。なお、動画中の人物を検出する方法としては、HOG(Histograms of Oriented Gradients)特徴量を用いてSVM(Support Vector Machine)等の識別器を組み合わせたものが一般化してきており、これを用いても良い。また、追跡(トラッキング)技術を組み合わせることでより安定した人物画像の収集が可能となる。 Thereby, the person arrangement image 52 can be generated using the person image 44 that matches the lighting condition of the place and reflects the profile of the person appearing in the place. In addition, it is expected to improve the accuracy of estimating the number of people. In addition, as a method for detecting a person in a moving image, a combination of discriminators such as SVM (Support Vector Machine) using HOG (Histograms of Oriented Gradients) features has been generalized. Also good. In addition, it becomes possible to collect human images more stably by combining tracking techniques.
この際、混雑度が高い場合には、周囲の人物が人物画像にノイズとして混入する可能性が高くなるため、上述した人数推定処理、HOGによる人物検出の結果、画像に写っている人物が少ないと想定される場合にのみ、人物画像の収集を行う等の工夫が必要となる。また、人物画像の収集時に日付、時間帯、曜日の上方と組み合わせて記憶させることで、上述したような時間帯、季節等による変動に適用することができる。 At this time, when the degree of congestion is high, there is a high possibility that surrounding persons will be mixed as noise in the person image. As a result of the above-described number estimation processing and person detection by HOG, there are few persons in the image. Only when it is assumed, it is necessary to devise such as collecting human images. In addition, by storing in combination with the date, time zone, and the upper part of the day of the week when collecting human images, it can be applied to changes due to the above-mentioned time zone, season, etc.
また、本実施形態では、事前設定時の生成処理のための画像入力部14と計測時の推定処理のための画像入力部28とを各々別個に設けた場合について説明したが、これに限らない。例えば、事前設定時の生成処理及び計測時の推定処理で共通で用いられる画像入力部を設けても良い。 In the present embodiment, the case where the image input unit 14 for the generation process at the time of presetting and the image input unit 28 for the estimation process at the time of measurement are provided separately has been described, but the present invention is not limited thereto. . For example, an image input unit that is commonly used in the generation process at the time of presetting and the estimation process at the time of measurement may be provided.
また、本実施形態では、事前設定時の生成処理のための画像特徴量算出部22と計測時の推定処理のための画像特徴量算出部30とを各々別個に設けた場合について説明したが、これに限らない。例えば、事前設定時の生成処理及び計測時の推定処理で共通で用いられる画像特徴量算出部を設けても良い。 In the present embodiment, the case has been described in which the image feature amount calculation unit 22 for the generation process at the time of presetting and the image feature amount calculation unit 30 for the estimation process at the time of measurement are provided separately. Not limited to this. For example, you may provide the image feature-value calculation part used in common by the production | generation process at the time of prior setting, and the estimation process at the time of measurement.
以上、本実施形態について図面を参照して詳細に説明したが、具体的な構成は本実施形態に限定されるものではなく、本発明の要旨を逸脱しない範囲の設計等も含まれる。 Although the present embodiment has been described in detail with reference to the drawings, the specific configuration is not limited to the present embodiment, and includes design and the like within a scope not departing from the gist of the present invention.
また、本実施形態では、図1に示す機能の構成要素の動作をプログラムとして構築し、人数推定装置10として利用されるコンピュータにインストールして実行させるが、これに限らず、ネットワークを介して流通させても良い。 Further, in the present embodiment, the operation of the components of the functions shown in FIG. 1 is constructed as a program, and is installed and executed on a computer used as the number estimating device 10, but is not limited thereto, and is distributed via a network. You may let them.
また、構築されたプログラムをハードディスクやフレキシブルディスク、CD−ROM等の可搬記憶媒体に格納し、コンピュータにインストールしたり、配布したりしても良い。 Further, the constructed program may be stored in a portable storage medium such as a hard disk, a flexible disk, or a CD-ROM, and installed in a computer or distributed.
10 人数推定装置
12 人物画像記憶部
14、28 画像入力部
16 背景取得部
18 キャリブレーション部
20 人物配置画像生成部
22、30 画像特徴量算出部
24 学習用特徴量保存部
32 人数推定部
34 推定結果
36 学習部
DESCRIPTION OF SYMBOLS 10 Person estimation apparatus 12 Person image memory | storage part 14, 28 Image input part 16 Background acquisition part 18 Calibration part 20 Person arrangement | positioning image generation part 22, 30 Image feature-value calculation part 24 Learning feature-value preservation | save part 32 Number-of-person estimation part 34 Estimation Result 36 Learning Department
Claims (8)
事前設定時に、前記キャリブレーション部が、固定カメラと実空間座標系との幾何学的関係を示すキャリブレーションパラメータを計測するカメラキャリブレーションステップと、
前記背景画像取得部が、無人状態で前記固定カメラにより撮影された画像である背景画像を取得する背景画像取得ステップと、
前記人物配置画像生成部が、前記キャリブレーションパラメータを参照しながら前記背景画像上に予め用意された人物画像を配置した画像である人物配置画像を生成する人物配置画像生成ステップと、
前記学習用特徴量保存部が、生成された前記人物配置画像から画像特徴量を算出し、算出された画像特徴量と配置人数との関係を示す学習用特徴量データを保存する学習用特徴量保存ステップと、
計測時に、前記画像入力部が、前記固定カメラにより撮影された撮影画像を入力する画像入力ステップと、
画像特徴量算出部が、入力された前記撮影画像から前記画像特徴量を算出する画像特徴量算出ステップと、
前記人数推定部が、算出された前記画像特徴量、及び前記学習用特徴量保存部により保存された学習用特徴量データに基づき、前記撮影画像に写っている人物の人数を推定する人数推定ステップと、
を行う人数推定方法。 A number estimation method in a number estimation device including a calibration unit, a background image acquisition unit, a person arrangement image generation unit, a learning feature amount storage unit, an image input unit, an image feature amount calculation unit, and a number estimation unit,
At the time of presetting, the calibration unit measures a calibration parameter indicating a geometric relationship between the fixed camera and the real space coordinate system; and
The background image acquisition unit acquires a background image that is an image taken by the fixed camera in an unattended state; and
A person arrangement image generating step in which the person arrangement image generation unit generates a person arrangement image that is an image in which a person image prepared in advance is arranged on the background image with reference to the calibration parameter;
The learning feature amount storage unit calculates an image feature amount from the generated person arrangement image, and stores learning feature amount data indicating a relationship between the calculated image feature amount and the number of people arranged. A save step;
An image input step in which the image input unit inputs a captured image captured by the fixed camera at the time of measurement;
An image feature amount calculating unit that calculates the image feature amount from the input captured image;
Step of estimating the number of persons in which the number of persons estimating section estimates the number of persons in the captured image based on the calculated image feature quantity and the learning feature quantity data stored by the learning feature quantity storage section. When,
How to estimate the number of people.
請求項1記載の人数推定方法。 2. In the number estimating step, the number estimating unit performs a neighborhood search on the feature amount of the learning feature amount data for the image feature amount calculated at the time of measurement, and estimates the number of people based on a search result. Number of people estimation method of mention.
事前設定時に、前記学習部が、前記学習用特徴量データを用いて画像特徴量と前記人数との関係を示す回帰式を学習する学習ステップを更に行い、
前記人数推定ステップでは、前記人数推定部が、計測時に算出された画像特徴量を、前記学習部により学習された前記回帰式に入力することにより、前記人数を推定する
請求項1又は2記載の人数推定方法。 The number-of-people estimation device includes a learning unit,
At the time of presetting, the learning unit further performs a learning step of learning a regression equation indicating a relationship between the image feature amount and the number of people using the learning feature amount data,
The said number estimation part estimates the said number of persons by inputting the image feature-value calculated at the time of a measurement into the said regression equation learned by the said learning part in the said number of persons estimation step. Number of people estimation method.
請求項1〜3の何れか1項記載の人数推定方法。 In the person arrangement image generation step, the person arrangement image generation unit selects the person image to be arranged by at least one of gender, age, and clothes based on a profile relating to a person appearing in a place photographed by the fixed camera. The number-of-people estimation method according to any one of claims 1 to 3.
前記人物画像検出記録部が、前記固定カメラにより撮影された撮影画像に写っている人物を検出して前記人物画像として記録する人物画像検出記録部を更に行い、
前記人物配置画像生成ステップでは、前記人物配置画像生成部が、前記人物画像検出記録部に記録された前記人物画像を前記人物配置画像に配置する
請求項1〜4の何れか1項記載の人数推定方法。 The number-of-people estimation device includes a person image detection recording unit,
The person image detection recording unit further performs a person image detection recording unit that detects a person in a captured image captured by the fixed camera and records the person image as the person image,
5. The number of persons according to claim 1, wherein, in the person arrangement image generation step, the person arrangement image generation unit arranges the person image recorded in the person image detection recording unit in the person arrangement image. Estimation method.
無人状態で前記固定カメラにより撮影された画像である背景画像を取得する背景画像取得部と、
前記キャリブレーションパラメータを参照しながら前記背景画像上に予め用意された人物画像を配置した画像である人物配置画像を生成する人物配置画像生成部と、
生成された前記人物配置画像から画像特徴量を算出し、算出された画像特徴量と配置人数との関係を示す学習用特徴量データを保存する学習用特徴量保存部と、
計測時に、前記固定カメラにより撮影された撮影画像を入力する画像入力部と、
入力された前記撮影画像から前記画像特徴量を算出する画像特徴量算出部と、
算出された前記画像特徴量、及び前記学習用特徴量保存部により保存された学習用特徴量データに基づき、前記撮影画像に写っている人物の人数を推定する人数推定部と、
を含む人数推定装置。 A calibration unit that measures a calibration parameter indicating a geometric relationship between the fixed camera and the real space coordinate system at the time of presetting;
A background image acquisition unit that acquires a background image that is an image taken by the fixed camera in an unattended state;
A person arrangement image generation unit that generates a person arrangement image that is an image in which a person image prepared in advance is arranged on the background image while referring to the calibration parameter;
A learning feature quantity storage unit that calculates an image feature quantity from the generated person arrangement image and stores learning feature quantity data indicating a relationship between the calculated image feature quantity and the number of arranged persons;
An image input unit that inputs a captured image captured by the fixed camera at the time of measurement;
An image feature amount calculation unit for calculating the image feature amount from the input captured image;
Based on the calculated image feature amount and the learning feature amount data stored by the learning feature amount storage unit, a number estimation unit that estimates the number of persons in the captured image;
Number estimation device including
コンピュータ読み取り可能な記録媒体。 A computer-readable recording medium recording a number estimation program for causing a computer to execute each step of the number estimation method according to claim 1.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016197230A JP2018060360A (en) | 2016-10-05 | 2016-10-05 | Person number estimation method, person number estimation device, person number estimation program and recording medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016197230A JP2018060360A (en) | 2016-10-05 | 2016-10-05 | Person number estimation method, person number estimation device, person number estimation program and recording medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2018060360A true JP2018060360A (en) | 2018-04-12 |
Family
ID=61908587
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2016197230A Pending JP2018060360A (en) | 2016-10-05 | 2016-10-05 | Person number estimation method, person number estimation device, person number estimation program and recording medium |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2018060360A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109829072A (en) * | 2018-12-26 | 2019-05-31 | 深圳云天励飞技术有限公司 | Construct atlas calculation and relevant apparatus |
| CN120235435A (en) * | 2025-06-03 | 2025-07-01 | 厦门理工学院 | An information push method based on Internet of Things campus management |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005242646A (en) * | 2004-02-26 | 2005-09-08 | Ntt Data Corp | Human flow measurement device, human flow measurement method, and human flow measurement program |
| JP2011210238A (en) * | 2010-03-10 | 2011-10-20 | Dainippon Printing Co Ltd | Advertisement effect measuring device and computer program |
| JP2014164525A (en) * | 2013-02-25 | 2014-09-08 | Nippon Telegr & Teleph Corp <Ntt> | Method, device and program for estimating number of object |
| WO2014207991A1 (en) * | 2013-06-28 | 2014-12-31 | 日本電気株式会社 | Teaching data generating device, method, and program, and crowd state recognition device, method, and program |
| US20150213624A1 (en) * | 2012-10-09 | 2015-07-30 | Sk Telecom Co., Ltd. | Image monitoring apparatus for estimating gradient of singleton, and method therefor |
| JP2015148895A (en) * | 2014-02-05 | 2015-08-20 | 日本電信電話株式会社 | object number distribution estimation method |
| US20150310312A1 (en) * | 2014-04-25 | 2015-10-29 | Xerox Corporation | Busyness detection and notification method and system |
-
2016
- 2016-10-05 JP JP2016197230A patent/JP2018060360A/en active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005242646A (en) * | 2004-02-26 | 2005-09-08 | Ntt Data Corp | Human flow measurement device, human flow measurement method, and human flow measurement program |
| JP2011210238A (en) * | 2010-03-10 | 2011-10-20 | Dainippon Printing Co Ltd | Advertisement effect measuring device and computer program |
| US20150213624A1 (en) * | 2012-10-09 | 2015-07-30 | Sk Telecom Co., Ltd. | Image monitoring apparatus for estimating gradient of singleton, and method therefor |
| JP2014164525A (en) * | 2013-02-25 | 2014-09-08 | Nippon Telegr & Teleph Corp <Ntt> | Method, device and program for estimating number of object |
| WO2014207991A1 (en) * | 2013-06-28 | 2014-12-31 | 日本電気株式会社 | Teaching data generating device, method, and program, and crowd state recognition device, method, and program |
| JP2015148895A (en) * | 2014-02-05 | 2015-08-20 | 日本電信電話株式会社 | object number distribution estimation method |
| US20150310312A1 (en) * | 2014-04-25 | 2015-10-29 | Xerox Corporation | Busyness detection and notification method and system |
Non-Patent Citations (1)
| Title |
|---|
| 田渕義宗 外6名: "空間的な人数分布推定のための記憶型回帰", 画像ラボ, vol. 第25巻,第12号, JPN6019045630, 10 December 2014 (2014-12-10), pages 55 - 60, ISSN: 0004299379 * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109829072A (en) * | 2018-12-26 | 2019-05-31 | 深圳云天励飞技术有限公司 | Construct atlas calculation and relevant apparatus |
| CN120235435A (en) * | 2025-06-03 | 2025-07-01 | 厦门理工学院 | An information push method based on Internet of Things campus management |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11393213B2 (en) | Tracking persons in an automated-checkout store | |
| EP2182469B1 (en) | System and method for sensing facial gesture | |
| US20210295081A1 (en) | Tracking and analytics system | |
| JP6779699B2 (en) | Image processing equipment, information processing methods and programs | |
| CN113689578B (en) | A method and device for generating human body data set | |
| CN113449570A (en) | Image processing method and device | |
| JP5439787B2 (en) | Camera device | |
| JP6120404B2 (en) | Mobile body behavior analysis / prediction device | |
| KR20150079585A (en) | System and method for deriving accurate body size measures from a sequence of 2d images | |
| JPWO2020176304A5 (en) | ||
| CN112070623A (en) | Thermal analysis method, device and system | |
| JP2019211364A (en) | Device and method for estimating weight of body of animal | |
| CN109961472A (en) | Method, system, storage medium and electronic device for generating 3D heat map | |
| CN112904365A (en) | Map updating method and device | |
| JP2012057974A (en) | Photographing object size estimation device, photographic object size estimation method and program therefor | |
| KR20170016578A (en) | Clothes Fitting System And Operation Method of Threof | |
| JP2018060360A (en) | Person number estimation method, person number estimation device, person number estimation program and recording medium | |
| CN112883920A (en) | Point cloud deep learning-based three-dimensional face scanning feature point detection method and device | |
| JP2018120402A (en) | Event detection device, event detection method, program | |
| JP6067527B2 (en) | Mobile object information management method, apparatus, and program | |
| CN112330799B (en) | A scar measurement method | |
| JP7370840B2 (en) | Image processing device, image processing method, computer program and storage medium | |
| JP2004046464A (en) | Moving object three-dimensional position estimation apparatus and method, program, and recording medium | |
| JP6733766B1 (en) | Analysis device, control method, and program | |
| JP2014164525A (en) | Method, device and program for estimating number of object |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20181129 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20191007 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20191126 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20200707 |