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

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

Info

Publication number
JP2021086391A
JP2021086391A JP2019214782A JP2019214782A JP2021086391A JP 2021086391 A JP2021086391 A JP 2021086391A JP 2019214782 A JP2019214782 A JP 2019214782A JP 2019214782 A JP2019214782 A JP 2019214782A JP 2021086391 A JP2021086391 A JP 2021086391A
Authority
JP
Japan
Prior art keywords
image
estimation
specific object
image processing
object information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2019214782A
Other languages
Japanese (ja)
Inventor
祐也 渡辺
Yuya Watanabe
祐也 渡辺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2019214782A priority Critical patent/JP2021086391A/en
Publication of JP2021086391A publication Critical patent/JP2021086391A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

To set an appropriate estimation area in order to increase the accuracy of estimating the number of specific objects.SOLUTION: Detection means executes detection processing for detecting a specific object from a captured image. Holding means holds object information indicating position and size of the specific object on the image. Tracking means tracks the same specific object on the basis of detection processing on each of the images captured at different times. Setting means sets a plurality of estimation areas on the captured images on the basis of object information corresponding to the tracked specific object. Estimation means executes estimation processing for estimating the number of specific objects included in each of the estimation areas.SELECTED DRAWING: Figure 6

Description

本発明は、画像処理技術に関する。 The present invention relates to an image processing technique.

近年、撮像装置で所定の領域を撮像し、撮像した画像を解析することによって画像中の人物を計数するシステムが提案されている。このようなシステムは、公共の空間での混雑の検知及び混雑時の人物の流れを把握することでイベント時の混雑解消や災害時の避難誘導への活用が期待されている。 In recent years, a system has been proposed in which a predetermined area is imaged by an imaging device and a person in the image is counted by analyzing the captured image. Such a system is expected to be used for eliminating congestion at an event and guiding evacuation in the event of a disaster by detecting congestion in a public space and grasping the flow of people at the time of congestion.

非特許文献1では、機械学習によって得た認識モデルを用いて、画像の所定の推定領域に映る人数を直接推定する方法が開示されている。以下、この方法を回帰ベース推定法とする。 Non-Patent Document 1 discloses a method of directly estimating the number of people appearing in a predetermined estimation area of an image by using a recognition model obtained by machine learning. Hereinafter, this method will be referred to as a regression-based estimation method.

池田浩雄,大網亮磨,宮野博義.CNNを用いた群衆パッチ学習に基づく人数推定の高精度化.FIT,2014Hiroo Ikeda, Ryoma Oami, Hiroyoshi Miyano. Higher accuracy of number estimation based on crowd patch learning using CNN. FIT, 2014

回帰ベース推定法において、特定物体の数を推定する精度を向上させるために、画像上に映る特定物体のサイズに比例したサイズの推定領域を設定する必要がある。このとき、撮像装置により撮像された画像に対して複数の推定領域を設定する場合、該画像上で複数の異なる位置で映る特定物体のサイズをユーザが確認しながら該画像に対し複数の推定領域を設定する方法が考えられる。しかしながら、ユーザが確認する画像には必ずしも複数の異なる位置に特定物体が位置するとは限らないため、画像上の複数の異なる位置で映る特定物体のサイズに比例したサイズの推定領域を適切に設定できないことがあった。 In the regression-based estimation method, in order to improve the accuracy of estimating the number of specific objects, it is necessary to set an estimation area having a size proportional to the size of the specific objects displayed on the image. At this time, when a plurality of estimation regions are set for the image captured by the imaging device, the user confirms the size of a specific object displayed at a plurality of different positions on the image, and the plurality of estimation regions are set for the image. Can be considered. However, since the specific object is not always located at a plurality of different positions in the image confirmed by the user, it is not possible to appropriately set an estimation area having a size proportional to the size of the specific object appearing at a plurality of different positions on the image. There was something.

そこで本発明は、特定物体の数を推定する精度を高くするためにより適切な推定領域を設定することを目的としている。 Therefore, an object of the present invention is to set a more appropriate estimation area in order to improve the accuracy of estimating the number of specific objects.

上記課題を解決するために、本発明の画像処理装置は以下の構成を備える。すなわち、撮像手段により撮像された画像から特定物体を検出する検出処理を実行する検出手段と、前記特定物体の前記画像上の位置およびサイズを示す物体情報を保持する保持手段と、前記撮像手段により異なる時刻に撮像された複数の画像各々に対する前記検出処理に基づき、同一の特定物体を追尾する追尾手段と、前記追尾手段により追尾された前記同一の特定物体に対応する前記物体情報に基づき、前記撮像手段により撮像された画像に対して複数の推定領域を設定する設定手段と、前記複数の推定領域の各々に含まれる前記特定物体の数を推定する推定処理を実行する推定手段と、を有する。 In order to solve the above problems, the image processing apparatus of the present invention has the following configurations. That is, the detection means for executing the detection process for detecting the specific object from the image captured by the imaging means, the holding means for holding the object information indicating the position and size of the specific object on the image, and the imaging means. Based on the detection process for each of a plurality of images captured at different times, the tracking means for tracking the same specific object and the object information corresponding to the same specific object tracked by the tracking means are used. It has a setting means for setting a plurality of estimation regions for an image captured by the imaging means, and an estimation means for executing an estimation process for estimating the number of the specific object included in each of the plurality of estimation regions. ..

本発明によれば、特定物体の数を推定する精度を高くするためにより適切な推定領域を設定することができる。 According to the present invention, a more appropriate estimation region can be set in order to increase the accuracy of estimating the number of specific objects.

システム構成の一例を示す図である。It is a figure which shows an example of a system configuration. 画像処理装置の機能ブロックを示す図である。It is a figure which shows the functional block of an image processing apparatus. ジオメトリ情報を推定する処理を説明するための図である。It is a figure for demonstrating the process of estimating geometry information. ジオメトリ情報を推定する処理を説明するための図である。It is a figure for demonstrating the process of estimating geometry information. 推定領域を設定する処理を説明するための図である。It is a figure for demonstrating the process of setting an estimation area. 推定領域に対する推定処理を説明するための図である。It is a figure for demonstrating the estimation process with respect to the estimation area. 推定領域を設定する処理および推定領域に対する推定処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process of setting an estimation area and the estimation process for the estimation area. ジオメトリ情報を推定する処理を説明するための図である。It is a figure for demonstrating the process of estimating geometry information. ジオメトリ情報を推定する処理を説明するための図である。It is a figure for demonstrating the process of estimating geometry information. ジオメトリ情報を推定する処理を説明するための図である。It is a figure for demonstrating the process of estimating geometry information. 推定領域を設定する処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process of setting an estimation area. 各装置のハードウェア構成を示す図である。It is a figure which shows the hardware configuration of each apparatus.

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

(実施形態1)
図1は、本実施形態におけるシステム構成を示す図である。本実施形態におけるシステムは、画像処理装置100、撮像装置110、記録装置120、およびディスプレイ130を有している。
(Embodiment 1)
FIG. 1 is a diagram showing a system configuration according to the present embodiment. The system in this embodiment includes an image processing device 100, an image pickup device 110, a recording device 120, and a display 130.

画像処理装置100、撮像装置110、および記録装置120は、ネットワーク140を介して相互に接続されている。ネットワーク140は、例えばETHERNET(登録商標)等の通信規格に準拠する複数のルータ、スイッチ、ケーブル等から実現される。 The image processing device 100, the image pickup device 110, and the recording device 120 are connected to each other via the network 140. The network 140 is realized from a plurality of routers, switches, cables and the like conforming to a communication standard such as Ethernet (registered trademark).

なお、ネットワーク140は、インターネットや有線LAN(Local Area Network)、無線LAN(Wireless Lan)、WAN(Wide Area Network)等により実現されてもよい。 The network 140 may be realized by the Internet, a wired LAN (Local Area Network), a wireless LAN (Wireless Lan), a WAN (Wide Area Network), or the like.

画像処理装置100は、例えば、後述する画像処理の機能を実現するためのプログラムがインストールされたパーソナルコンピュータ等によって実現される。撮像装置110は、画像を撮像する装置である。撮像装置110は、撮像した画像の画像データと、画像を撮像した撮像時刻の情報と、撮像装置110を識別する情報である識別情報とを関連付けて、ネットワーク140を介し、画像処理装置100や記録装置120等の外部装置へ送信する。なお、本実施形態に係るシステムにおいて、撮像装置110は1つとするが、複数であってもよい。 The image processing device 100 is realized, for example, by a personal computer or the like in which a program for realizing an image processing function described later is installed. The image pickup device 110 is a device for capturing an image. The image pickup device 110 associates the image data of the captured image, the information of the image capture time at which the image was captured, and the identification information which is the information for identifying the image pickup device 110, and records the image processing device 100 and the recording via the network 140. It is transmitted to an external device such as the device 120. In the system according to the present embodiment, the number of image pickup devices 110 is one, but there may be a plurality of image pickup devices 110.

記録装置120は、撮像装置110が撮像した画像の画像データと、画像を撮像した撮像時刻の情報と、撮像装置110を識別する識別情報とを関連付けて記録する。そして、画像処理装置100からの要求に従って、記録装置120は、記録したデータ(画像、識別情報など)を画像処理装置100へ送信する。 The recording device 120 records the image data of the image captured by the imaging device 110, the information of the imaging time at which the image was captured, and the identification information for identifying the imaging device 110 in association with each other. Then, in accordance with the request from the image processing device 100, the recording device 120 transmits the recorded data (image, identification information, etc.) to the image processing device 100.

ディスプレイ130は、LCD(Liquid Crystal Display)等により構成されており、画像処理装置100の画像処理の結果や、撮像装置110が撮像した画像などを表示する。ディスプレイ130は、HDMI(登録商標)(High Definition Multimedia Interface)等の通信規格に準拠したディスプレイケーブルを介して画像処理装置100と接続されている。 The display 130 is composed of an LCD (Liquid Crystal Display) or the like, and displays the result of image processing of the image processing device 100, an image captured by the image pickup device 110, and the like. The display 130 is connected to the image processing device 100 via a display cable compliant with a communication standard such as HDMI (registered trademark) (High Definition Multimedia Interface).

また、ディスプレイ130は、表示手段として機能し、撮像装置110が撮像した画像や、後述する画像処理による結果等を表示する。なお、ディスプレイ130、画像処理装置100、および記録装置120の少なくともいずれか2つ又は全ては、単一の筐体に設けられてもよい。また、画像処理装置100および撮像装置110は単一の筐体に設けられていてもよい。すなわち、撮像装置110が後述する画像処理装置100の機能および構成を有していてもよい。 In addition, the display 130 functions as a display means, and displays an image captured by the image pickup apparatus 110, a result of image processing described later, and the like. At least any two or all of the display 130, the image processing device 100, and the recording device 120 may be provided in a single housing. Further, the image processing device 100 and the image pickup device 110 may be provided in a single housing. That is, the image pickup apparatus 110 may have the functions and configurations of the image processing apparatus 100 described later.

なお、画像処理装置100の画像処理の結果や、撮像装置110により撮像された画像は、画像処理装置100にディスプレイケーブルを介して接続されたディスプレイ130に限らず、例えば、次のような外部装置が有するディスプレイに表示されてもよい。すなわち、ネットワーク140を介して接続されたスマートフォン、タブレット端末などのモバイルデバイスが有するディスプレイに表示されていてもよい。 The result of image processing of the image processing device 100 and the image captured by the image pickup device 110 are not limited to the display 130 connected to the image processing device 100 via the display cable, and for example, the following external device It may be displayed on the display of. That is, it may be displayed on the display of a mobile device such as a smartphone or tablet terminal connected via the network 140.

次に、図2に示す本実施形態に係る画像処理装置100の機能ブロックを参照して、本実施形態に係る画像処理装置100の画像処理について説明する。なお、図2に示す各機能は、本実施形態の場合、図12を参照して後述するROM(Read Only Memory)1202とCPU(Central Processing Unit)1200とを用いて、次のようにして実現されるものとする。図2に示す各機能は、画像処理装置100のROM1202に格納されたコンピュータプログラムを画像処理装置100のCPU1200が実行することにより実現される。 Next, the image processing of the image processing apparatus 100 according to the present embodiment will be described with reference to the functional blocks of the image processing apparatus 100 according to the present embodiment shown in FIG. In the case of the present embodiment, each function shown in FIG. 2 is realized as follows by using a ROM (Read Only Memory) 1202 and a CPU (Central Processing Unit) 1200, which will be described later with reference to FIG. It shall be done. Each function shown in FIG. 2 is realized by executing a computer program stored in the ROM 1202 of the image processing device 100 by the CPU 1200 of the image processing device 100.

通信部200は、図12を参照して後述するI/F(Interface)1204によって実現でき、ネットワーク140を介して、撮像装置110や記録装置120と通信を行う。通信部200は、例えば、撮像装置110が撮像した画像の画像データを受信したり、撮像装置110を制御するための制御コマンドを撮像装置110へ送信したりする。なお、制御コマンドは、例えば、撮像装置110に対して画像を撮像するよう指示を行うコマンドなどを含む。 The communication unit 200 can be realized by an I / F (Interface) 1204 described later with reference to FIG. 12, and communicates with the image pickup device 110 and the recording device 120 via the network 140. The communication unit 200 receives, for example, image data of an image captured by the image pickup device 110, or transmits a control command for controlling the image pickup device 110 to the image pickup device 110. The control command includes, for example, a command for instructing the image pickup apparatus 110 to capture an image.

記憶部201は、図12を参照して後述するRAM(Random Access Memory)1201やHDD(Hard Disk Drive)1203等によって実現でき、画像処理装置100による画像処理に関わる情報やデータを記憶する。記憶部201は、後述する検出部204による検出処理により検出された特定物体の画像上の位置およびサイズの情報を示す物体情報を保持する。 The storage unit 201 can be realized by a RAM (Random Access Memory) 1201 or an HDD (Hard Disk Drive) 1203, which will be described later with reference to FIG. 12, and stores information and data related to image processing by the image processing device 100. The storage unit 201 holds object information indicating the position and size information on the image of the specific object detected by the detection process by the detection unit 204 described later.

出力制御部202は、撮像装置110が撮像した画像や、画像処理の結果を示す情報などを外部装置に出力したり、ディスプレイ130に表示させたりする。なお、出力制御部202による情報の出力先である外部装置は、例えば、他の画像処理装置(不図示)や記録装置120を含む。操作受付部203は、キーボードやマウス等の入力装置(不図示)を介して、ユーザが行った操作を受け付ける。 The output control unit 202 outputs an image captured by the image pickup device 110, information indicating the result of image processing, and the like to an external device, and displays the image on the display 130. The external device to which the information is output by the output control unit 202 includes, for example, another image processing device (not shown) or a recording device 120. The operation reception unit 203 receives an operation performed by the user via an input device (not shown) such as a keyboard or a mouse.

検出部204は、回帰ベース推定法と異なる方法を用いて、画像における特定物体を検出する検出処理を実行する。本実施形態における検出部204は、例えば、照合パターン(辞書)を使用して、パターンマッチング等の処理を行うことで、画像から特定物体の検出を行う。そして記憶部201は、画像において特定物体が検出されるたびに特定物体の画像上の位置およびサイズを示す物体情報を蓄積していく。 The detection unit 204 executes a detection process for detecting a specific object in the image by using a method different from the regression-based estimation method. The detection unit 204 in the present embodiment detects a specific object from an image by performing processing such as pattern matching using, for example, a collation pattern (dictionary). Then, the storage unit 201 accumulates object information indicating the position and size of the specific object on the image each time a specific object is detected in the image.

なお、画像から特定物体として人物を検出する場合において、人物が正面向きである場合の照合パターンと横向きである場合の照合パターンなど複数の照合パターンを用いて画像から人物を検出するようにしてもよい。このように、複数の照合パターンを用いた検出処理を実行することで、検出精度の向上が期待できる。 When detecting a person as a specific object from an image, the person may be detected from the image by using a plurality of matching patterns such as a matching pattern when the person is facing forward and a matching pattern when the person is facing sideways. Good. By executing the detection process using a plurality of collation patterns in this way, improvement in detection accuracy can be expected.

なお、照合パターンとして、斜め方向からや上方向からなど他の角度から特定の物体を見た場合の照合パターンを用意しておいてもよい。また、特定物体として人物を検出する場合、必ずしも全身の特徴を示す照合パターン(辞書)を用意しておく必要はなく、上半身、下半身、頭部、顔、足などの人物の一部について照合パターンを用意してもよい。 As a collation pattern, a collation pattern may be prepared when a specific object is viewed from another angle such as from an oblique direction or from an upward direction. In addition, when detecting a person as a specific object, it is not always necessary to prepare a collation pattern (dictionary) showing the characteristics of the whole body, and a collation pattern for a part of the person such as the upper body, lower body, head, face, and legs. May be prepared.

追尾部205は、撮像装置110により異なる時刻に撮像された複数の画像各々に対する検出処理に基づき、同一の特定物体を追尾する。本実施形態における追尾部205は、例えば、撮像装置110が撮像した画像を対象にして次のような処理を行う。すなわち、追尾部205は、現在のフレームよりも1つ以上前のフレームの画像から検出部204により検出された特定物体と同じ特定物体が現在のフレームの画像に存在する場合、それぞれのフレームにおける特定物体同士を対応づける。すなわち、時間的に近い複数のフレームについて画像間で同一の特定物体を追尾する。なお、追尾部205による同一の特定物体の追尾の詳細な説明については後述する。 The tracking unit 205 tracks the same specific object based on detection processing for each of a plurality of images captured at different times by the imaging device 110. The tracking unit 205 in the present embodiment performs the following processing on the image captured by the image pickup apparatus 110, for example. That is, when the same specific object as the specific object detected by the detection unit 204 from the image of the frame one or more before the current frame exists in the image of the current frame, the tracking unit 205 identifies the specific object in each frame. Associate objects with each other. That is, the same specific object is tracked between images for a plurality of frames that are close in time. A detailed description of tracking the same specific object by the tracking unit 205 will be described later.

第1推定部206は、追尾部205により追尾された同一の特定物体に対応する物体情報に基づき、撮像装置110により撮像される画像上の位置ごとの特定物体のサイズを推定する。ここでの同一の特定物体に対応する物体情報は、検出部204により該同一の特定物体が検出されるたびに記憶部201により蓄積される物体情報を示す。なお、以降の説明において、第1推定部206により推定される画像上の位置ごとの特定物体のサイズを示す情報をジオメトリ情報とする。 The first estimation unit 206 estimates the size of the specific object for each position on the image captured by the image pickup apparatus 110 based on the object information corresponding to the same specific object tracked by the tracking unit 205. The object information corresponding to the same specific object here indicates the object information accumulated by the storage unit 201 each time the same specific object is detected by the detection unit 204. In the following description, the information indicating the size of the specific object for each position on the image estimated by the first estimation unit 206 is used as the geometry information.

設定部207は、追尾部205により追尾された同一の特定物体に対応する物体情報に基づき第1推定部206により推定されたジオメトリ情報に従い、撮像装置110により撮像された画像に対して複数の推定領域を設定する。 The setting unit 207 makes a plurality of estimates for the image captured by the image pickup device 110 according to the geometry information estimated by the first estimation unit 206 based on the object information corresponding to the same specific object tracked by the tracking unit 205. Set the area.

第2推定部208は、回帰ベース推定法を用いて、設定部207により設定された画像における複数の推定領域の各々に含まれる特定物体の数を推定する推定処理を実行する。回帰ベース推定法では、ある固定サイズSの小画像を入力とし、該小画像に写っている特定物体の数を出力とする回帰器(学習済み認識モデル)を用いることで、撮像装置110により撮像された画像上の推定領域における特定物体の数を推定する。回帰器を学習させるにあたって、特定物体の位置が既知である固定サイズSの小画像を大量に用意し、該小画像を学習データとして、機械学習手法に基づいて回帰器を学習しておく。このとき、特定物体の数の推定精度を向上させるため、学習データである小画像のサイズ(固定サイズS)と当該小画像に映る特定物体のサイズとの比率が略一定であることが望ましい。そして第2推定部208は、複数の推定領域の各々について、該推定領域の画像を固定サイズSにリサイズしたものを小画像とし、該小画像を回帰器に入力することで「該推定領域内の特定物体の位置」を回帰器からの出力として求める。このとき、該推定領域内の特定物体の位置の数が、該推定領域内における特定物体の数となる。 The second estimation unit 208 uses the regression-based estimation method to perform an estimation process for estimating the number of specific objects included in each of the plurality of estimation regions in the image set by the setting unit 207. In the regression-based estimation method, an image is captured by the image pickup apparatus 110 by using a regression device (learned recognition model) that inputs a small image of a certain fixed size S and outputs the number of specific objects in the small image. Estimate the number of specific objects in the estimation area on the image. In training the regressionr, a large number of small images of fixed size S in which the position of a specific object is known are prepared, and the regressionr is learned based on the machine learning method using the small images as training data. At this time, in order to improve the estimation accuracy of the number of specific objects, it is desirable that the ratio of the size of the small image (fixed size S), which is the learning data, to the size of the specific object reflected in the small image is substantially constant. Then, the second estimation unit 208 makes a small image obtained by resizing the image of the estimation area to a fixed size S for each of the plurality of estimation areas, and inputs the small image to the regression device to "in the estimation area". "Position of a specific object" is obtained as the output from the regression device. At this time, the number of positions of the specific object in the estimated area is the number of the specific objects in the estimated area.

また、設定部207が画像に対し複数の推定領域を設定するにあたって、推定領域のサイズと該推定領域における特定物体のサイズとの比率が、学習データである小画像のサイズと当該小画像に映る特定物体のサイズとの比率rと略同一になることが望ましい。このように、学習データの環境に近づくよう画像に対し推定領域を設定することで、推定領域に含まれる特定物体の数の推定精度をより高めることができる。 Further, when the setting unit 207 sets a plurality of estimation regions for the image, the ratio of the size of the estimation region to the size of the specific object in the estimation region is reflected in the size of the small image which is the learning data and the small image. It is desirable that the ratio r to the size of a specific object is substantially the same. By setting the estimation area for the image so as to approach the environment of the learning data in this way, the estimation accuracy of the number of specific objects included in the estimation area can be further improved.

したがって、本実施形態における設定部207は、追尾部205により追尾された同一の特定物体に対応する物体情報に基づき、次のような処理を実行する。すなわち、設定部207は、追尾部205により追尾された同一の特定物体について蓄積された物体情報に基づき推定されたジオメトリ情報に従って、画像に対し複数の推定領域を設定する。このとき、設定部207は、該ジオメトリ情報に従って、推定領域のサイズと該推定領域に含まれる特定物体のサイズとの比率が学習データに対応する比率rとなるよう画像に対し複数の推定領域を設定する。 Therefore, the setting unit 207 in the present embodiment executes the following processing based on the object information corresponding to the same specific object tracked by the tracking unit 205. That is, the setting unit 207 sets a plurality of estimation regions for the image according to the geometry information estimated based on the object information accumulated for the same specific object tracked by the tracking unit 205. At this time, the setting unit 207 sets a plurality of estimation regions for the image so that the ratio between the size of the estimation region and the size of the specific object included in the estimation region becomes the ratio r corresponding to the learning data according to the geometry information. Set.

計数部209は、撮像された画像に対し設定された複数の推定領域の各々に対する第2推定部208による推定処理に推定された特定物体の数を合算することで計数結果を取得する。出力制御部202は、推定領域の各々に対して推定された特定物体の数を合算した計数結果を示す情報を外部装置(ディスプレイ130等)へ出力する。 The counting unit 209 acquires the counting result by adding up the number of specific objects estimated in the estimation process by the second estimation unit 208 for each of the plurality of estimation regions set for the captured image. The output control unit 202 outputs information indicating a counting result obtained by adding up the estimated number of specific objects for each of the estimation regions to an external device (display 130 or the like).

ここで、図3を参照して本実施形態に係る画像処理について更に具体的に説明する。なお、以降の説明において数の推定対象となる特定物体を人物として説明するが、人物に限定されるものではない。例えば、特定物体は、道路等を走行している各種車両、工場内のコンベアー上を流れている部品や製品、その他、動物等であってもよい。 Here, the image processing according to the present embodiment will be described more specifically with reference to FIG. In the following description, a specific object whose number is to be estimated will be described as a person, but the number is not limited to the person. For example, the specific object may be various vehicles traveling on a road or the like, parts or products flowing on a conveyor in a factory, or an animal or the like.

図3は、画像上の同一の人物が追尾部205により追尾される様子を示す図である。本実施形態における追尾部205は、複数のフレームの画像にわたって検出部204により検出された人物同士が同一であると判定することで、検出された人物の追尾を実行する。追尾部205による複数フレームの画像にわたって検出された人物同士が同一であると判定する方法として次のような方法を用いることができる。例えば、追尾部205は、検出された人物の移動ベクトルを用いて人物の移動予測位置と検出した人物の位置とが一定距離内であれば同一の人物であると判定する方法である。また、追尾部205は、人物の色、形状、大きさ(画素数)等を用いて、複数のフレームの画像間で相関の高い人物を対応付けてもよい。このように、追尾部205は、複数のフレームの画像にわたって同じ人物であると判断し追尾する処理を実行できればよく、特定の方法に限定されるものではない。 FIG. 3 is a diagram showing how the same person on the image is tracked by the tracking unit 205. The tracking unit 205 in the present embodiment executes tracking of the detected person by determining that the persons detected by the detection unit 204 are the same over the images of a plurality of frames. The following method can be used as a method for determining that the persons detected over the images of a plurality of frames by the tracking unit 205 are the same. For example, the tracking unit 205 is a method of determining that the person is the same person if the predicted movement position of the person and the position of the detected person are within a certain distance by using the movement vector of the detected person. Further, the tracking unit 205 may associate a person with a high correlation between images of a plurality of frames by using the color, shape, size (number of pixels), and the like of the person. As described above, the tracking unit 205 is not limited to a specific method as long as it can perform a process of determining that the person is the same person over a plurality of frames of images and tracking the person.

なお、本実施形態における検出部204は、照合パターンを用いたパターンマッチング法により画像上の人物の領域(以下人物領域)を検出するものとし、追尾部205は、複数フレームの画像にわたって検出された同一人物の人物領域を追尾する。ここで図3の説明に戻り、図3に示す物体情報302は、第1画像から検出部204により検出された人物301の人物領域の画像上における位置およびサイズを示す情報である。また、物体情報303は、第1画像より後に撮像された第2画像において検出された人物301の人物領域の画像上における位置およびサイズを示す情報である。また、物体情報304は、第2画像より後に撮像された第3画像において検出された人物301の人物領域の画像上における位置およびサイズを示す情報である。 The detection unit 204 in the present embodiment detects a person's area (hereinafter referred to as a person's area) on the image by a pattern matching method using a matching pattern, and the tracking unit 205 is detected over a plurality of frames of the image. Track the person area of the same person. Here, returning to the description of FIG. 3, the object information 302 shown in FIG. 3 is information indicating the position and size of the person 301 detected by the detection unit 204 from the first image on the image. Further, the object information 303 is information indicating the position and size of the person region of the person 301 detected in the second image captured after the first image on the image. Further, the object information 304 is information indicating the position and size of the person area of the person 301 detected in the third image captured after the second image on the image.

なお物体情報302〜304における検出された人物領域の画像上の位置は、画像の左上の端点を原点としたときの該人物領域の中心位置におけるX座標およびY座標で示されるものとする。また、物体情報302〜304における検出された人物領域の画像上のサイズは、画像の垂直方向(Y軸方向)における該人物領域の長さを示すものとする。記憶部201は、図3に示すように複数のフレームの画像にわたって追尾される人物301に対応する物体情報を保持および蓄積していく。すなわち、記憶部201は、複数のフレームの画像にわたって検出された同一人物である人物301の物体情報301〜304を蓄積する。 The position on the image of the detected person area in the object information 302 to 304 shall be indicated by the X coordinate and the Y coordinate at the center position of the person area when the upper left end point of the image is the origin. Further, the size of the detected person area on the image in the object information 302 to 304 indicates the length of the person area in the vertical direction (Y-axis direction) of the image. As shown in FIG. 3, the storage unit 201 holds and accumulates object information corresponding to the person 301 that is tracked over the images of a plurality of frames. That is, the storage unit 201 stores the object information 301 to 304 of the same person 301 detected over the images of a plurality of frames.

第1推定部206は、複数のフレームの画像にわたって同一人物が追尾された場合、記憶部201により蓄積された人物の物体情報に基づき、画像上の任意の位置に映る人物のサイズを示すジオメトリ情報を推定する。ジオメトリ情報は、画像上の任意の位置(x,y)から、当該位置で映る平均的な人物のサイズf(x,y)として与えられる。画像上の任意の位置における人物のサイズであるf(x,y)は、例えば、x、y及び1個以上のパラメータによって表せると仮定する。例えば、f(x,y)=ax+by+cと仮定する。この例では、未知のパラメータはa、b及びcである。このとき第1推定部206は、記憶部201により蓄積された人物の物体情報を用いて、未知のパラメータを、例えば最小二乗法等の統計処理により求めることができる。最小二乗法やニュートン法などの既存の最適化手法によってf(x,y)のパラメータを推定する。 The first estimation unit 206 is a geometry information indicating the size of a person appearing at an arbitrary position on an image based on the object information of the person accumulated by the storage unit 201 when the same person is tracked over images of a plurality of frames. To estimate. Geometry information is given from an arbitrary position (x, y) on the image as the size f (x, y) of an average person appearing at that position. It is assumed that f (x, y), which is the size of a person at an arbitrary position on an image, can be represented by, for example, x, y and one or more parameters. For example, assume that f (x, y) = ax + by + c. In this example, the unknown parameters are a, b and c. At this time, the first estimation unit 206 can obtain an unknown parameter by statistical processing such as the least squares method by using the object information of the person accumulated by the storage unit 201. The parameters of f (x, y) are estimated by existing optimization methods such as the least squares method and Newton's method.

ここで、図4を参照して、ジオメトリ情報の一例について説明する。なお、図4を参照した説明において説明の簡略化のため、画像上の水平方向(x軸方向)では人物のサイズに変化はなく、画像上の垂直方向(y軸方向)にて人物のサイズに変化があるものとする。第1推定部206は、第1画像から検出された人物301に対応する物体情報302と、第2画像から検出された人物301に対応する物体情報303と、第3画像から検出された人物301に対応する物体情報304とに基づき、ジオメトリ情報を推定する。図4では、物体情報302〜304各々が示す画像上における人物301の位置およびサイズがプロットされている。そして、第1推定部206は、物体情報302〜304を用いて、最小二乗法やニュートン法等により図4に示すような曲線で示すジオメトリ情報を推定する。 Here, an example of geometry information will be described with reference to FIG. In the description with reference to FIG. 4, for simplification of the explanation, the size of the person does not change in the horizontal direction (x-axis direction) on the image, and the size of the person in the vertical direction (y-axis direction) on the image. Suppose there is a change in. The first estimation unit 206 has object information 302 corresponding to the person 301 detected from the first image, object information 303 corresponding to the person 301 detected from the second image, and the person 301 detected from the third image. Geometry information is estimated based on the object information 304 corresponding to. In FIG. 4, the position and size of the person 301 on the image shown by each of the object information 302 to 304 are plotted. Then, the first estimation unit 206 estimates the geometry information shown by the curve as shown in FIG. 4 by the least squares method, Newton's method, or the like using the object information 302 to 304.

なお、第1推定部206は、次のような条件を満たした場合、記憶部201により蓄積された同一人物の物体情報に基づき、ジオメトリ情報を推定するようにしてもよい。すなわち、第1推定部206は、同一人物が追尾部205により追尾された画像上の距離が所定値以上である同一人物について蓄積された物体情報に基づきジオメトリ情報を推定するようにしてもよい。また、第1推定部206は、追尾部205により追尾される同一人物の軌跡における第1の位置から該軌跡における第2の位置までの距離が所定値以上である場合、該同一人物について蓄積された物体情報に基づき、ジオメトリ情報を推定するようにしてもよい。また、第1推定部206は、追尾部205により追尾される同一人物が画像上の異なる位置で検出された回数が所定値に達した場合、該同一人物について蓄積された物体情報に基づき、ジオメトリ情報を推定するようにしてもよい。 When the following conditions are satisfied, the first estimation unit 206 may estimate the geometry information based on the object information of the same person accumulated by the storage unit 201. That is, the first estimation unit 206 may estimate the geometry information based on the object information accumulated for the same person whose distance on the image tracked by the tracking unit 205 is equal to or greater than a predetermined value. Further, when the distance from the first position on the locus of the same person tracked by the tracking unit 205 to the second position on the locus is equal to or greater than a predetermined value, the first estimation unit 206 is accumulated for the same person. Geometry information may be estimated based on the object information. Further, when the number of times that the same person tracked by the tracking unit 205 is detected at different positions on the image reaches a predetermined value, the first estimation unit 206 has a geometry based on the object information accumulated for the same person. The information may be estimated.

ここで、図5を参照して本実施形態における設定部207による複数の推定領域を設定する処理について説明する。図5(a)〜(c)は、撮像装置110により撮像された画像500に対し設定部207により複数の推定領域を設定する様子を示す図である。なお図5に示す例において、ジオメトリ情報が示す画像上の任意の位置における人物のサイズとして、画像500の水平方向において人物のサイズは略同一であり、画像500の垂直方向における下部から上部に向かうにつれ人物のサイズは小さくなるものとする。まず、本実施形態における設定部207は、図5(a)に示すように、画像500の下端に沿って複数の推定領域501を設定する。このとき推定領域501のサイズと、該推定領域501内の下端の座標においてジオメトリ情報が示す人物のサイズとの比率が学習データに対応する比率rと略同一になるように、設定部207は推定領域501を設定する。次に、設定部207は、図5(b)に示すように、複数の推定領域501の上端に沿って、複数の推定領域502を設定する。このとき推定領域502のサイズと、該推定領域502内の下端の座標においてジオメトリ情報が示す人物のサイズとの比率が学習データに対応する比率rと略同一になるように、設定部207は推定領域502を設定する。次に、設定部207は、図5(c)に示すように、複数の推定領域502の上端に沿って、複数の推定領域503を設定する。このとき推定領域503のサイズと、該推定領域503内の下端の座標においてジオメトリ情報が示す人物のサイズとの比率が学習データに対応する比率rと略同一になるように、設定部207は推定領域503を複数設定する。このように、本実施形態における設定部207は、推定領域のサイズと該推定領域における特定物体のサイズとの比率が、学習データである小画像のサイズと当該小画像に映る特定物体のサイズとの比率rと略同一になるよう、画像に対し推定領域を設定する。このように、学習データの環境に近づくよう画像に対し推定領域を設定することで、推定領域に含まれる特定物体の数の推定精度をより高めることができる。なお図5(a)〜(b)を参照した上述の説明において画像の下端から順番に推定領域を設定したが、これに限らず、他の位置から推定領域を設定してもよい。 Here, a process of setting a plurality of estimation regions by the setting unit 207 in the present embodiment will be described with reference to FIG. 5 (a) to 5 (c) are views showing a state in which a plurality of estimation regions are set by the setting unit 207 for the image 500 captured by the image pickup apparatus 110. In the example shown in FIG. 5, as the size of the person at an arbitrary position on the image indicated by the geometry information, the size of the person is substantially the same in the horizontal direction of the image 500, and the size of the person is from the lower part to the upper part in the vertical direction of the image 500. The size of the person shall decrease accordingly. First, as shown in FIG. 5A, the setting unit 207 in the present embodiment sets a plurality of estimation regions 501 along the lower end of the image 500. At this time, the setting unit 207 estimates so that the ratio between the size of the estimation area 501 and the size of the person indicated by the geometry information at the coordinates of the lower end in the estimation area 501 is substantially the same as the ratio r corresponding to the learning data. Region 501 is set. Next, as shown in FIG. 5B, the setting unit 207 sets a plurality of estimated regions 502 along the upper ends of the plurality of estimated regions 501. At this time, the setting unit 207 estimates so that the ratio between the size of the estimation area 502 and the size of the person indicated by the geometry information at the coordinates of the lower end in the estimation area 502 is substantially the same as the ratio r corresponding to the learning data. Region 502 is set. Next, as shown in FIG. 5C, the setting unit 207 sets a plurality of estimation regions 503 along the upper ends of the plurality of estimation regions 502. At this time, the setting unit 207 estimates so that the ratio between the size of the estimation area 503 and the size of the person indicated by the geometry information at the coordinates of the lower end in the estimation area 503 is substantially the same as the ratio r corresponding to the learning data. A plurality of areas 503 are set. As described above, in the setting unit 207 in the present embodiment, the ratio of the size of the estimated region to the size of the specific object in the estimated region is the size of the small image which is the learning data and the size of the specific object reflected in the small image. The estimation area is set for the image so as to be substantially the same as the ratio r of. By setting the estimation area for the image so as to approach the environment of the learning data in this way, the estimation accuracy of the number of specific objects included in the estimation area can be further improved. In the above description with reference to FIGS. 5A to 5B, the estimation area is set in order from the lower end of the image, but the estimation area is not limited to this, and the estimation area may be set from another position.

第2推定部208は、設定された複数の推定領域の各々について、推定領域の画像を固定サイズSにリサイズしたものを小画像とし、機械学習に基づき学習した回帰器に該小画像を入力することで「該推定領域内の人物の位置」を回帰器からの出力として求める。このとき、該推定領域内の人物の位置の個数が該推定領域に含まれる人物の数を示す、なお、該推定領域内の人物の位置の個数は、整数であってもよいし、小数点以下の数値を含む実数値であってもよい。図6は、画像600に対して設定部207により設定された複数の小領域の各々に対する第2推定部208による推定処理の結果を示す模式図である。なお、図6に示すように、推定領域601に含まれる数値602は、推定領域601に対し推定された人物の数を示している。計数部209は、撮像された画像に対し設定された複数の推定領域の各々に対する第2推定部208による推定処理に推定された人物の数を合算した計数結果である12.1人を取得する。出力制御部202は、複数の推定領域601と、当該複数の推定領域601に対する推定処理の結果を示す情報である数値602とを画像600に重畳することで出力画像を生成し、生成した出力画像を外部装置(ディスプレイ130)に出力する。このとき、出力制御部202は、生成した該出力画像をディスプレイ130に表示させてもよい。 The second estimation unit 208 uses a small image obtained by resizing the image of the estimation area to a fixed size S for each of the plurality of set estimation areas, and inputs the small image to the regressionr learned based on machine learning. Therefore, the "position of the person in the estimated area" is obtained as the output from the regression device. At this time, the number of positions of the person in the estimated area indicates the number of people included in the estimated area, and the number of positions of the person in the estimated area may be an integer or after the decimal point. It may be a real value including the value of. FIG. 6 is a schematic diagram showing the result of estimation processing by the second estimation unit 208 for each of the plurality of small regions set by the setting unit 207 for the image 600. As shown in FIG. 6, the numerical value 602 included in the estimation area 601 indicates the number of persons estimated with respect to the estimation area 601. The counting unit 209 acquires 12.1 people, which is the total number of people estimated in the estimation process by the second estimation unit 208 for each of the plurality of estimation regions set for the captured image. .. The output control unit 202 generates an output image by superimposing the plurality of estimation areas 601 and the numerical value 602 which is information indicating the result of the estimation processing on the plurality of estimation areas 601 on the image 600, and the generated output image. Is output to an external device (display 130). At this time, the output control unit 202 may display the generated output image on the display 130.

次に、図7を参照して、本実施形態における画像処理について更に詳細に説明する。なお、図7(a)に示すフローを実行することで、画像に対し複数の推定領域を設定することができる。また、図7(b)に示すフローを実行することで、画像に対し設定された複数の推定領域の各々に対し推定処理を実行することで画像に含まれる人物の数を推定することができる。なお、図7(a)に示すフローの処理は、例えば、ユーザによる指示に従って、開始又は終了するものとする。そして、図7(b)に示すフローの処理は、図7(a)に示すフロー処理が実行され複数の推定領域が設定されたのちに実行される。なお、図7に示すフローチャートの処理は、画像処理装置100のROM1202に格納されたコンピュータプログラムを画像処理装置100のCPU1200が実行して実現される図2に示す機能ブロックにより実行されるものとする。 Next, with reference to FIG. 7, the image processing in the present embodiment will be described in more detail. By executing the flow shown in FIG. 7A, a plurality of estimation regions can be set for the image. Further, by executing the flow shown in FIG. 7B, it is possible to estimate the number of people included in the image by executing the estimation process for each of the plurality of estimation areas set for the image. .. The flow processing shown in FIG. 7A shall be started or ended according to, for example, an instruction by the user. Then, the flow processing shown in FIG. 7B is executed after the flow processing shown in FIG. 7A is executed and a plurality of estimation regions are set. The processing of the flowchart shown in FIG. 7 is executed by the functional block shown in FIG. 2 realized by executing the computer program stored in the ROM 1202 of the image processing device 100 by the CPU 1200 of the image processing device 100. ..

まず、図7(a)に示すフローの処理について説明する。S701にて、通信部200は、撮像装置110により撮像された動画における1つのフレームの画像を処理対象の画像として取得する。なお、通信部200は、ネットワーク140を介して撮像装置110や記憶装置120から処理対象の画像を取得してもよいし、画像処理装置100の記憶部201から処理対象の画像を取得してもよい。 First, the flow processing shown in FIG. 7A will be described. In S701, the communication unit 200 acquires an image of one frame in the moving image captured by the imaging device 110 as an image to be processed. The communication unit 200 may acquire the image to be processed from the image pickup device 110 or the storage device 120 via the network 140, or may acquire the image to be processed from the storage unit 201 of the image processing device 100. Good.

次に、S702にて、検出部204は、画像における人物を検出する検出処理を実行する。本実施形態における検出部204は、照合パターン(辞書)を使用して、パターンマッチング等の処理を行うことで、人物の検出を行う。 Next, in S702, the detection unit 204 executes a detection process for detecting a person in the image. The detection unit 204 in the present embodiment detects a person by performing processing such as pattern matching using a collation pattern (dictionary).

次に、S703にて、記憶部201は、画像において人物が検出されるたびに人物の画像上の位置およびサイズを示す物体情報を蓄積していく。 Next, in S703, the storage unit 201 accumulates object information indicating the position and size of the person on the image each time a person is detected in the image.

次に、S704にて、追尾部205は、検出部204により検出された人物を追尾する。なお、追尾部205は、追尾する対象となる人物ごとにIDを付与する。例えば、追尾部205は、検出部204により新規に検出された人物について新規のIDとしてID“1”を付与。現在の処理対象とする画像のフレームよりも1つ以上前のフレームの画像から検出部204が検出した人物に対してID“1”を付与したとする。その場合において、検出部204が現在のフレームの画像からも当該人物を検出した場合、追尾部205は、当該人物にもID“1”を付与する。このように、追尾部205は、複数のフレームの画像にわたって同一の人物を追尾していく。 Next, in S704, the tracking unit 205 tracks the person detected by the detection unit 204. The tracking unit 205 assigns an ID to each person to be tracked. For example, the tracking unit 205 assigns an ID “1” as a new ID to a person newly detected by the detection unit 204. It is assumed that the ID "1" is assigned to the person detected by the detection unit 204 from the image of the frame one or more before the frame of the image to be processed at present. In that case, if the detection unit 204 also detects the person from the image of the current frame, the tracking unit 205 also assigns the ID "1" to the person. In this way, the tracking unit 205 tracks the same person over images of a plurality of frames.

次に、S705にて、第1推定部206は、追尾部206により追尾された同一人物が所定の条件を満たしたかを判定する。例えば、第1推定部206は、追尾部205により追尾された同一人物の画像上の距離が所定値以上かを判定する。そして、画像上の距離が所定値以上と判定された場合(S705にてYes)、S706へ遷移する。一方、画像上の距離が所定値未満と判定された場合(S705にてNo)、S701へ遷移し、通信部200は、撮像装置110により撮像された動画における次のフレームの画像を処理対象の画像として取得する。 Next, in S705, the first estimation unit 206 determines whether the same person tracked by the tracking unit 206 satisfies a predetermined condition. For example, the first estimation unit 206 determines whether the distance on the image of the same person tracked by the tracking unit 205 is equal to or greater than a predetermined value. Then, when it is determined that the distance on the image is equal to or greater than a predetermined value (Yes in S705), the process transitions to S706. On the other hand, when it is determined that the distance on the image is less than a predetermined value (No in S705), the transition to S701 occurs, and the communication unit 200 processes the image of the next frame in the moving image captured by the image pickup device 110. Get as an image.

また、S705にて、第1推定部206は、追尾部205により追尾される同一人物の軌跡における第1の位置から該軌跡における第2の位置までの距離が所定値以上かを判定するようにしてもよい。この場合、軌跡上の任意の位置である第1の位置から該軌跡上の任意の位置である第2の位置までの距離が所定値以上であると判定された場合(S705にてYes)、S706へ遷移する。一方、軌跡上の任意の位置である第1の位置から該軌跡上の任意の位置である第2の位置までの距離が所定値以上でないと判定された場合(S705にてNo)、S701へ遷移する。そして、通信部200は、撮像装置110により撮像された動画における次のフレームの画像を処理対象の画像として取得する。このように、追尾部205により追尾される同一人物が所定の条件を満たすまでS701〜S704の処理が繰り返され、記憶部201は、該同一人物が検出されるたびに該同一人物の物体情報を蓄積していく。 Further, in S705, the first estimation unit 206 determines whether the distance from the first position on the locus of the same person tracked by the tracking unit 205 to the second position on the locus is equal to or greater than a predetermined value. You may. In this case, when it is determined that the distance from the first position, which is an arbitrary position on the locus, to the second position, which is an arbitrary position on the locus, is equal to or greater than a predetermined value (Yes in S705). Transition to S706. On the other hand, when it is determined that the distance from the first position, which is an arbitrary position on the locus, to the second position, which is an arbitrary position on the locus, is not equal to or greater than a predetermined value (No in S705), the process proceeds to S701. Transition. Then, the communication unit 200 acquires the image of the next frame in the moving image captured by the imaging device 110 as the image to be processed. In this way, the processes of S701 to S704 are repeated until the same person tracked by the tracking unit 205 satisfies a predetermined condition, and the storage unit 201 obtains the object information of the same person each time the same person is detected. Accumulate.

そして、S706にて第1推定部206は、追尾部205により追尾された同一人物について記憶部201により蓄積された物体情報に基づき、画像上の任意の位置に映る人物のサイズを示すジオメトリ情報を推定する。 Then, in S706, the first estimation unit 206 provides geometry information indicating the size of the person appearing at an arbitrary position on the image based on the object information accumulated by the storage unit 201 for the same person tracked by the tracking unit 205. presume.

次に、S707にて、設定部207は、ジオメトリ情報に基づき、推定領域のサイズと該推定領域における特定物体のサイズとの比率が、学習データに対応する比率rと略同一になるよう、撮像装置110により撮像される画像に対し複数の推定領域を設定する。 Next, in S707, the setting unit 207 takes an image based on the geometry information so that the ratio between the size of the estimated region and the size of the specific object in the estimated region is substantially the same as the ratio r corresponding to the learning data. A plurality of estimation regions are set for the image captured by the device 110.

次に、図7(b)に示すフローの処理について説明する。まずS771にて、通信部200は、撮像装置110により撮像された動画における1つのフレームの画像を処理対象の画像として取得する。なお、通信部200は、ネットワーク140を介して撮像装置110や記憶装置120から処理対象の画像を取得してもよいし、画像処理装置100の記憶部201から処理対象の画像を取得してもよい。また、通信部200は、撮像装置110により撮像された静止画を処理対象の画像として取得してもよい。 Next, the flow processing shown in FIG. 7B will be described. First, in S771, the communication unit 200 acquires an image of one frame in the moving image captured by the imaging device 110 as an image to be processed. The communication unit 200 may acquire the image to be processed from the image pickup device 110 or the storage device 120 via the network 140, or may acquire the image to be processed from the storage unit 201 of the image processing device 100. Good. Further, the communication unit 200 may acquire a still image captured by the image pickup apparatus 110 as an image to be processed.

次に、S772にて、設定部207は、S707にて設定した複数の推定領域の情報を取得し、現在処理対象とする画像に対し該複数の推定領域を設定する。次に、S773にて、第2推定部208は、現在処理対象とする画像に対し設定された複数の推定領域の各々に対し人物の数を推定する推定処理を実行する。 Next, in S772, the setting unit 207 acquires the information of the plurality of estimation areas set in S707, and sets the plurality of estimation areas for the image to be processed at present. Next, in S773, the second estimation unit 208 executes an estimation process for estimating the number of people for each of the plurality of estimation areas set for the image to be processed at present.

次に、S774にて、計測部209は、撮像された画像に対し設定された複数の推定領域の各々に対する第2推定部208による推定処理に推定された特定物体の数を合算することで計数結果を取得する。次に、S775にて、出力制御部202は、推定領域の各々に対して推定された特定物体の数を合算した計数結果を示す情報を外部装置(ディスプレイ130等)へ出力する。次に、S776にて、ユーザによる終了の指示がない場合(S776にてNo)、S771へ遷移し、通信部200は、撮像装置110により撮像された動画における次のフレームの画像を処理対象の画像として取得する。一方、ユーザによる終了の指示がある場合(S776にてYes)、図7(b)に示す処理を終了する。 Next, in S774, the measurement unit 209 counts by adding up the number of specific objects estimated in the estimation process by the second estimation unit 208 for each of the plurality of estimation regions set for the captured image. Get the result. Next, in S775, the output control unit 202 outputs information indicating the counting result obtained by adding up the estimated number of specific objects for each of the estimation regions to an external device (display 130 or the like). Next, in S776, if there is no termination instruction by the user (No in S776), the transition to S771 occurs, and the communication unit 200 processes the image of the next frame in the moving image captured by the image pickup device 110. Get as an image. On the other hand, when the user gives an instruction to end (Yes in S776), the process shown in FIG. 7B ends.

なお、図7(a)に示すフローの処理は、例えば、撮像装置110のパンおよびチルトで示される撮像方向やズーム倍率が変化した場合に実行されるようにしてもよい。撮像装置110が撮像する範囲である撮像範囲(撮像方向およびズーム倍率により定まる)が変化した場合、画像上の任意の位置における人物のサイズ、すなわちジオメトリ情報が変化する。そのため図7(a)に示すフローの処理は、撮像装置110の撮像範囲の変化に伴って実行されるようにしてもよい。 The flow process shown in FIG. 7A may be executed, for example, when the imaging direction or zoom magnification indicated by the pan and tilt of the imaging device 110 changes. When the imaging range (determined by the imaging direction and the zoom magnification), which is the range to be imaged by the imaging device 110, changes, the size of the person at an arbitrary position on the image, that is, the geometry information changes. Therefore, the flow processing shown in FIG. 7A may be executed according to the change in the imaging range of the imaging apparatus 110.

なお、本実施形態における画像処理装置100では、1人の同一人物について追尾部205が追尾する過程で蓄積された物体情報に基づき、ジオメトリ情報を推定したが、これに限らない。例えば、本実施形態における画像処理装置100は、複数の人物各々について追尾部205は追尾を行い、複数の人物各々について追尾される過程で蓄積された物体情報に基づき、ジオメトリ情報を推定するようにしてもよい。例えば、図8に示す物体情報803〜808に基づき、第1推定部206は、ジオメトリ情報を推定する。具体的には、第1推定部206は、人物801が追尾される過程で蓄積された物体情報803〜805と、人物802が追尾される過程で蓄積された物体情報806〜808とに基づき、ジオメトリ情報を推定する。図9では、人物801に対応する物体情報803〜805に示す画像上の人物801の位置およびサイズと、人物802に対応する物体情報806〜808が示す画像上の人物802の位置およびサイズがプロットされている。そして、第1推定部206は、物体情報803〜808を用いて、最小二乗法やニュートン法等により図9に示すような曲線で示すジオメトリ情報を推定する。なお、図9に示す説明では、説明の簡略化のため、画像上の水平方向(x軸方向)では人物のサイズに変化はなく、画像上の垂直方向(y軸方向)にて人物のサイズに変化があるものとする。このように、本実施形態における画像処理装置100は、複数の人物各々について追尾部205は追尾を行い、複数の人物各々について追尾される過程で蓄積された物体情報に基づき、ジオメトリ情報を推定するようにしてもよい。 In the image processing apparatus 100 of the present embodiment, the geometry information is estimated based on the object information accumulated in the process of tracking the same person by the tracking unit 205, but the present invention is not limited to this. For example, in the image processing device 100 of the present embodiment, the tracking unit 205 tracks each of a plurality of persons, and estimates the geometry information based on the object information accumulated in the process of tracking each of the plurality of persons. You may. For example, based on the object information 803 to 808 shown in FIG. 8, the first estimation unit 206 estimates the geometry information. Specifically, the first estimation unit 206 is based on the object information 803 to 805 accumulated in the process of tracking the person 801 and the object information 806 to 808 accumulated in the process of tracking the person 802. Estimate geometry information. In FIG. 9, the position and size of the person 801 on the image shown in the object information 803 to 805 corresponding to the person 801 and the position and size of the person 802 on the image shown by the object information 806 to 808 corresponding to the person 802 are plotted. Has been done. Then, the first estimation unit 206 uses the object information 803 to 808 to estimate the geometry information shown by the curve as shown in FIG. 9 by the least squares method, Newton's method, or the like. In the description shown in FIG. 9, for simplification of the explanation, the size of the person does not change in the horizontal direction (x-axis direction) on the image, and the size of the person in the vertical direction (y-axis direction) on the image. Suppose there is a change in. As described above, in the image processing apparatus 100 of the present embodiment, the tracking unit 205 tracks each of the plurality of persons, and estimates the geometry information based on the object information accumulated in the process of tracking each of the plurality of persons. You may do so.

以上説明したように、本実施形態において、画像処理装置100は、追尾された同一人物について蓄積した物体情報に基づき、画像上の任意の位置における特定物体のサイズの情報であるジオメトリ情報を推定する。そして画像処理装置100は、ジオメトリ情報に従って、推定領域のサイズと該推定領域に含まれる特定物体のサイズとの比率が学習データに対応する比率rとなるよう画像に対し複数の推定領域を設定する。このようにすることで、推定領域をより適切に設定することができ、結果的に推定領域における特定物体の数を推定する精度を高くすることができる。 (実施形態2)
本実施形態では、画像に対して検出領域を設定し、該検出領域において検出された特定物体に対応する物体情報と、追尾された同一の特定物体に対応する物体情報とに基づき、ジオメトリ情報を推定し、該ジオメトリ情報に従い複数の推定領域を設定する。なお、実施形態1と異なる部分を主に説明し、実施形態1と同一または同等の構成要素、および処理には同一の符号を付すとともに、重複する説明は省略する。また実施形態1と同様、以下の説明において特定物体を人物として説明するが、人物に限定されるものではない。例えば、特定物体は、道路等を走行している各種車両、工場内のコンベアー上を流れている部品や製品、その他、動物等であってもよい。
As described above, in the present embodiment, the image processing apparatus 100 estimates geometry information which is information on the size of a specific object at an arbitrary position on the image based on the object information accumulated for the same tracked person. .. Then, the image processing device 100 sets a plurality of estimation regions for the image so that the ratio between the size of the estimation region and the size of the specific object included in the estimation region becomes the ratio r corresponding to the learning data according to the geometry information. .. By doing so, the estimation area can be set more appropriately, and as a result, the accuracy of estimating the number of specific objects in the estimation area can be improved. (Embodiment 2)
In the present embodiment, a detection area is set for the image, and geometry information is provided based on the object information corresponding to the specific object detected in the detection area and the object information corresponding to the same specific object tracked. Estimate and set a plurality of estimation areas according to the geometry information. The parts different from those of the first embodiment will be mainly described, and the same or equivalent components and the processes as those of the first embodiment are designated by the same reference numerals, and duplicate description will be omitted. Further, as in the first embodiment, the specific object will be described as a person in the following description, but the present invention is not limited to the person. For example, the specific object may be various vehicles traveling on a road or the like, parts or products flowing on a conveyor in a factory, or an animal or the like.

ここでまず図10を参照して本実施形態における画像処理装置100の処理について説明する。本実施形態における設定部207は、図7(a)に示すように、画像に対して検出領域1004を設定する。なお、設定部207により設定される検出領域1004は、画像における一部の領域であって、任意の位置であってもよい。また、設定部207は、例えば、画像上の一部の領域を指定するユーザ操作に従って、画像に対して検出領域1004を設定する。 Here, first, the processing of the image processing apparatus 100 in the present embodiment will be described with reference to FIG. As shown in FIG. 7A, the setting unit 207 in the present embodiment sets the detection area 1004 for the image. The detection area 1004 set by the setting unit 207 is a part of the image and may be at an arbitrary position. Further, the setting unit 207 sets the detection area 1004 for the image according to a user operation for designating a part of the area on the image, for example.

また、本実施形態における追尾部205は、複数のフレームの画像にわたって検出部204により検出された人物同士が同一であると判定することで、検出された人物の追尾を実行する。図10に示す例では、追尾部205は、人物1001と人物1011と人物1021とを同一人物と判定し、追尾を行っている。なお、以下の説明において人物1001、人物1011、および人物1021をある特定の人物Aとして説明する。なお、人物1001は、第1画像において人物Aが検出された位置およびサイズを示す。また、人物1011は、第1画像より後に撮像された第2画像から人物Aが検出された位置およびサイズを示す。また、人物1021は、第2画像より後に撮像された第3画像から人物Aが検出された位置およびサイズを示す。 Further, the tracking unit 205 in the present embodiment executes tracking of the detected person by determining that the persons detected by the detection unit 204 are the same over the images of a plurality of frames. In the example shown in FIG. 10, the tracking unit 205 determines that the person 1001, the person 1011 and the person 1021 are the same person, and performs tracking. In the following description, the person 1001, the person 1011 and the person 1021 will be described as a specific person A. The person 1001 indicates the position and size in which the person A is detected in the first image. Further, the person 1011 indicates the position and size in which the person A is detected from the second image captured after the first image. Further, the person 1021 indicates the position and size in which the person A is detected from the third image captured after the second image.

また、本実施形態における第1推定部206は、設定部204により設定された画像上の検出領域1004において検出部204により人物が検出された回数が所定値に達したかを判定する。またさらに、第1推定部206は、追尾部206により追尾された同一人物が所定の条件を満たしたかを判定する。ここでの所定の条件として、例えば、第1推定部206は、追尾部205により追尾された同一人物の画像上の距離が所定値以上かを判定する。また、所定の条件として、第1推定部206は、例えば、追尾部205により追尾される同一人物の軌跡における第1の位置から該軌跡における第2の位置までの距離が所定値以上かを判定するようにしてもよい。 In addition, the first estimation unit 206 in the present embodiment determines whether the number of times a person has been detected by the detection unit 204 in the detection area 1004 on the image set by the setting unit 204 has reached a predetermined value. Further, the first estimation unit 206 determines whether the same person tracked by the tracking unit 206 satisfies a predetermined condition. As a predetermined condition here, for example, the first estimation unit 206 determines whether the distance on the image of the same person tracked by the tracking unit 205 is equal to or greater than a predetermined value. Further, as a predetermined condition, the first estimation unit 206 determines, for example, whether the distance from the first position on the locus of the same person tracked by the tracking unit 205 to the second position on the locus is equal to or greater than a predetermined value. You may try to do it.

そして第1推定部206は、検出領域1004にて人物が検出された回数が所定値に達したと判定し、かつ、追尾された同一人物が所定の条件を満たしたと判定した場合、画像から検出された人物について蓄積された物体情報に基づき、ジオメトリ情報を推定する。ここで、図10(b)を参照して第1推定部206の処理について具体的に説明する。図10(b)における人物1002は、検出領域1004にて検出された或る特定の人物Bの位置およびサイズを示す。また図10(b)における人物1003は、検出領域1004にて検出された或る特定の人物Cの位置およびサイズを示す。本実施形態における第1推定部206は、追尾部205により追尾された人物Aの画像上におけるサイズの変化の度合いに基づき、検出領域1004にて検出された人物Bおよび人物Cが検出領域1004以外の画像上の領域にて映るサイズを推定する。 Then, the first estimation unit 206 detects from the image when it is determined that the number of times the person is detected in the detection area 1004 has reached a predetermined value and the same person who has been tracked satisfies the predetermined condition. Geometry information is estimated based on the object information accumulated for the person. Here, the processing of the first estimation unit 206 will be specifically described with reference to FIG. 10B. Person 1002 in FIG. 10B indicates the position and size of a specific person B detected in the detection area 1004. Further, the person 1003 in FIG. 10B indicates the position and size of a specific person C detected in the detection area 1004. In the first estimation unit 206 of the present embodiment, the person B and the person C detected in the detection area 1004 are other than the detection area 1004 based on the degree of change in the size of the person A tracked by the tracking unit 205 on the image. Estimate the size of the image in the area on the image.

第1推定部206は、例えば、次のような処理を実行する。第1推定部206は、物体情報1001a、1011aに基づき、人物1001(人物A)対して人物1011(人物A)は位置に関してx軸上ではx1からx2へa倍となりy軸上ではy1からy2へb倍となったことに伴い、サイズがc倍となったと判定する。これより、第1推定部206は、人物1002(人物B)の物体情報1002bから仮想的な物体情報である仮想物体情報1012bを生成し、人物1003(人物C)の物体情報1003Cから仮想物体情報1013cを生成する。具体的には、仮想物体情報1012bが示すx座標のx2’は、物体情報1002bが示すx座標のx1’に対しa倍した値であり、仮想物体情報1012bが示すy座標のy2’は、物体情報1002bが示すy座標のy1’に対しb倍した値である。また、仮想物体情報1012bが示すサイズであるsize2’は、size1’に対してc倍した値である。 The first estimation unit 206 executes the following processing, for example. Based on the object information 1001a and 1011a, the first estimation unit 206 increases the position of the person 1011 (person A) from x1 to x2 on the x-axis with respect to the person 1001 (person A), and y1 to y2 on the y-axis. It is determined that the size has increased c times as the size increases to b times. From this, the first estimation unit 206 generates virtual object information 1012b which is virtual object information from the object information 1002b of the person 1002 (person B), and virtual object information from the object information 1003C of the person 1003 (person C). Generate 1013c. Specifically, the x-coordinate x2'shown by the virtual object information 1012b is a value obtained by multiplying the x-coordinate x1'shown by the object information 1002b by a, and the y-coordinate y2'shown by the virtual object information 1012b is It is a value obtained by multiplying y1'of the y coordinate indicated by the object information 1002b by b. Further, size2', which is the size indicated by the virtual object information 1012b, is a value obtained by multiplying size1' by c.

同様に、仮想物体情報1013cが示すx座標のx2’’は、物体情報1003cが示すx座標のx1’’に対しa倍した値であり、仮想物体情報1013cが示すy座標のy2’’は、物体情報1003cが示すy座標のy1’’に対しb倍した値である。また、仮想物体情報1013cが示すサイズであるsize2’’は、size1’’に対してc倍した値である。 Similarly, the x-coordinate x2'' indicated by the virtual object information 1013c is a value obtained by multiplying the x-coordinate x1'' indicated by the object information 1003c by a, and the y-coordinate y2'' indicated by the virtual object information 1013c is , The value is b times the y1'' of the y coordinate indicated by the object information 1003c. Further, the size2 ″, which is the size indicated by the virtual object information 1013c, is a value c times the size1 ″.

更に、第1推定部206は、人物1001(人物A)対して人物1021(人物A)は位置に関してx軸上ではx1からx3へd倍となりy軸上ではy1からy2へe倍となったことに伴い、サイズがf倍となったと判定する。そして第1推定部206は、仮想物体情報1012bおよび仮想物体情報1013cを生成する上述の処理と同様にして、物体情報1002bから仮想物体情報1022bを生成し、物体情報1003cから仮想物体情報1023cを生成する。 Further, in the first estimation unit 206, the person 1021 (person A) is d times from x1 to x3 on the x-axis with respect to the person 1001 (person A), and is e-folded from y1 to y2 on the y-axis. Therefore, it is determined that the size has increased f times. Then, the first estimation unit 206 generates the virtual object information 1022b from the object information 1002b and generates the virtual object information 1023c from the object information 1003c in the same manner as the above-mentioned process for generating the virtual object information 1012b and the virtual object information 1013c. To do.

以上説明したように第1推定部206は、追尾された人物Aの画像上におけるサイズの変化に基づき、検出領域1004にて検出された少なくとも1人の人物が検出領域1004以外で映る場合の仮想的な物体情報である仮想物体情報を推定する。そして第1推定部206は、同一人物が追尾される過程で該同一人物について蓄積された物体情報と、生成した仮想物体情報とに基づき、ジオメトリ情報を推定する。このとき、実施形態1と同様に、画像上の任意の位置における人物のサイズであるf(x,y)は、例えば、x、y及び1個以上のパラメータによって表せると仮定する。例えば、f(x,y)=ax+by+cと仮定する。この例では、未知のパラメータはa、b及びcである。このとき第1推定部206は、同一人物が追尾される過程で該同一人物について蓄積された物体情報と、生成された仮想物体情報とを用いて、未知のパラメータを、例えば最小二乗法等の統計処理により求めることができる。このようにしてジオメトリ情報としてf(x,y)の関数を推定する。 As described above, the first estimation unit 206 is a virtual case where at least one person detected in the detection area 1004 appears in a region other than the detection area 1004 based on the change in size of the tracked person A on the image. Estimate virtual object information, which is typical object information. Then, the first estimation unit 206 estimates the geometry information based on the object information accumulated for the same person in the process of tracking the same person and the generated virtual object information. At this time, as in the first embodiment, it is assumed that f (x, y), which is the size of a person at an arbitrary position on the image, can be represented by, for example, x, y and one or more parameters. For example, assume that f (x, y) = ax + by + c. In this example, the unknown parameters are a, b and c. At this time, the first estimation unit 206 uses the object information accumulated for the same person in the process of tracking the same person and the generated virtual object information to set an unknown parameter, for example, the least squares method or the like. It can be obtained by statistical processing. In this way, the function of f (x, y) is estimated as the geometry information.

次に、図11に示すフローを参照して、本実施形態における画像処理装置100の画像処理について説明する。図12に示すフローの処理を実行することで、画像に対して複数の推定領域をより適切に設定することができる。なお、図12に示すフローチャートの処理は、画像処理装置100のROM1202に格納されたコンピュータプログラムを画像処理装置100のCPU1200が実行して実現される図2に示す機能ブロックにより実行されるものとする。 Next, the image processing of the image processing apparatus 100 in the present embodiment will be described with reference to the flow shown in FIG. By executing the flow processing shown in FIG. 12, a plurality of estimation regions can be set more appropriately for the image. The processing of the flowchart shown in FIG. 12 is executed by the functional block shown in FIG. 2 realized by executing the computer program stored in the ROM 1202 of the image processing device 100 by the CPU 1200 of the image processing device 100. ..

まず、S701にて、通信部200は、撮像装置110により撮像された動画における1つのフレームの画像を処理対象の画像として取得する。なお、通信部200は、ネットワーク140を介して撮像装置110や記憶装置120から処理対象の画像を取得してもよいし、画像処理装置100の記憶部201から処理対象の画像を取得してもよい。 First, in S701, the communication unit 200 acquires an image of one frame in the moving image captured by the imaging device 110 as an image to be processed. The communication unit 200 may acquire the image to be processed from the image pickup device 110 or the storage device 120 via the network 140, or may acquire the image to be processed from the storage unit 201 of the image processing device 100. Good.

次に、S1101にて、設定部207は、処理対象とする画像に対し検出領域を設定する。このとき、例えば、操作受付部203が受け付けた画像上の検出領域を指定する操作に基づき、設定部207は、図10に示すような検出領域1004を画像に対し設定する。S702〜S705の処理については実施形態1で説明した内容と同様であるため説明を省略する。S1102にて、第1推定部206は、設定部207にて設定された検出領域において人物が検出された回数が閾値以上かを判定する。検出領域において人物が検出された回数が閾値以上であると判定された場合(S1102にてYes)、S1103へ遷移する。一方、検出領域において人物が検出された回数が閾値未満であると判定された場合(S1102にてNo)、S701へ遷移し、通信部200は、撮像装置110により撮像された動画における次のフレームの画像を処理対象の画像として取得する。このように、追尾部205により追尾される同一人物が所定の条件を満たし、更に、検出領域において人物が検出された回数が閾値以上になるまでS701〜S704の処理が繰り返され、検出された人物について物体情報が蓄積される。 Next, in S1101, the setting unit 207 sets a detection area for the image to be processed. At this time, for example, based on the operation of designating the detection area on the image received by the operation reception unit 203, the setting unit 207 sets the detection area 1004 as shown in FIG. 10 for the image. Since the processes of S702 to S705 are the same as those described in the first embodiment, the description thereof will be omitted. In S1102, the first estimation unit 206 determines whether the number of times a person is detected in the detection area set by the setting unit 207 is equal to or greater than the threshold value. When it is determined that the number of times a person is detected in the detection area is equal to or greater than the threshold value (Yes in S1102), the transition to S1103 is performed. On the other hand, when it is determined that the number of times a person is detected in the detection area is less than the threshold value (No in S1102), the transition to S701 occurs, and the communication unit 200 moves to the next frame in the moving image captured by the image pickup device 110. Image is acquired as the image to be processed. In this way, the processes S701 to S704 are repeated until the same person tracked by the tracking unit 205 satisfies the predetermined condition and the number of times the person is detected in the detection area exceeds the threshold value, and the detected person is detected. Object information is accumulated about.

そして、S1103にて、第1推定部206は、追尾された同一人物の画像上におけるサイズの変化に基づき、検出領域にて検出された人物が検出領域1004以外で映る場合の仮想物体情報を生成する。例えば、第1推定部206は、検出領域1004にて検出された人物1002について仮想物体情報1012bおよび仮想物体情報1022bを生成する。さらに第1推定部206は、検出領域1004にて検出された人物1003について仮想物体情報1013cおよび仮想物体情報1023cを生成する。 Then, in S1103, the first estimation unit 206 generates virtual object information when the person detected in the detection area appears in a place other than the detection area 1004, based on the change in size on the image of the same person tracked. To do. For example, the first estimation unit 206 generates virtual object information 1012b and virtual object information 1022b for the person 1002 detected in the detection area 1004. Further, the first estimation unit 206 generates virtual object information 1013c and virtual object information 1023c for the person 1003 detected in the detection area 1004.

次に、S1104にて、第1推定部206は、同一人物が画像上で追尾される過程で蓄積された物体情報と、検出領域において検出された人物について蓄積された物体情報と、生成した仮想物体情報とから、ジオメトリ情報を推定する。次に、S707にて、設定部207は、S1104にて推定されたジオメトリ情報に基づき、画像に対して複数の推定領域を設定する。 Next, in S1104, the first estimation unit 206 generates the object information accumulated in the process of tracking the same person on the image, the object information accumulated about the person detected in the detection area, and the generated virtual. Geometry information is estimated from the object information. Next, in S707, the setting unit 207 sets a plurality of estimation regions for the image based on the geometry information estimated in S1104.

以上説明したように、本実施形態における画像処理装置100は、画像の一部領域において検出された人物について蓄積された物体情報と、同一人物が追尾される過程で蓄積された物体情報と、生成した仮想物体情報とからジオメトリ情報を推定する。そして、画像処理装置100は、推定したジオメトリ情報に基づき、画像に対して複数の推定領域を設定する。これより、より精度よくジオメトリ情報の推定が可能となるため、より適切に推定領域を設定することが可能となり、結果的に推定領域における特定物体の数を推定する精度を高くすることができる。 As described above, the image processing device 100 in the present embodiment generates object information accumulated for a person detected in a part of an image and object information accumulated in the process of tracking the same person. Geometry information is estimated from the virtual object information. Then, the image processing device 100 sets a plurality of estimation regions for the image based on the estimated geometry information. As a result, the geometry information can be estimated more accurately, so that the estimation area can be set more appropriately, and as a result, the accuracy of estimating the number of specific objects in the estimation area can be increased.

(その他の実施形態)
次に図12を参照して、各実施形態の各機能を実現するための画像処理装置100のハードウェア構成を説明する。なお、以降の説明において画像処理装置100のハードウェア構成について説明するが、記録装置120および撮像装置110も同様のハードウェア構成によって実現されるものとする。
(Other embodiments)
Next, with reference to FIG. 12, the hardware configuration of the image processing apparatus 100 for realizing each function of each embodiment will be described. Although the hardware configuration of the image processing device 100 will be described in the following description, it is assumed that the recording device 120 and the image pickup device 110 are also realized by the same hardware configuration.

本実施形態における画像処理装置100は、CPU1200と、RAM1201と、ROM1202、HDD1203と、I/F1204と、を有している。 The image processing device 100 in this embodiment includes a CPU 1200, a RAM 1201, a ROM 1202, an HDD 1203, and an I / F 1204.

CPU1200は画像処理装置100を統括制御する中央処理装置である。RAM1201は、CPU1200が実行するコンピュータプログラムを一時的に記憶する。また、RAM1201は、CPU1200が処理を実行する際に用いるワークエリアを提供する。また、RAM1201は、例えば、フレームメモリとして機能したり、バッファメモリとして機能したりする。 The CPU 1200 is a central processing unit that controls the image processing device 100 in an integrated manner. The RAM 1201 temporarily stores a computer program executed by the CPU 1200. The RAM 1201 also provides a work area used by the CPU 1200 to execute processing. Further, the RAM 1201 functions as, for example, a frame memory or a buffer memory.

ROM1202は、CPU1200が画像処理装置100を制御するためのプログラムなどを記憶する。HDD1203は、画像データ等を記録する記憶装置である。 The ROM 1202 stores a program or the like for the CPU 1200 to control the image processing device 100. HDD 1203 is a storage device for recording image data and the like.

I/F1204は、ネットワーク140を介して、TCP/IPやHTTPなどに従って、外部装置との通信を行う。 The I / F 1204 communicates with an external device via the network 140 according to TCP / IP, HTTP, or the like.

なお、上述した各実施形態の説明では、CPU1200が処理を実行する例について説明するが、CPU1200の処理のうち少なくとも一部を専用のハードウェアによって行うようにしてもよい。例えば、ディスプレイ130にGUI(GRAPHICAL USER INTERFACE)や画像データを表示する処理は、GPU(GRAPHICS PROCESSING UNIT)で実行してもよい。また、ROM1202からプログラムコードを読み出してRAM1201に展開する処理は、転送装置として機能するDMA(DIRECT MEMORY ACCESS)によって実行してもよい。 In the description of each of the above-described embodiments, an example in which the CPU 1200 executes the processing will be described, but at least a part of the processing of the CPU 1200 may be performed by dedicated hardware. For example, the process of displaying a GUI (GRAPHICAL USER INTERDEFACE) or image data on the display 130 may be executed by a GPU (GRAPHICS PROCESSING UNIT). Further, the process of reading the program code from the ROM 1202 and expanding it into the RAM 1201 may be executed by a DMA (Direct Memory Access) that functions as a transfer device.

なお、本発明は、上述の実施形態の1以上の機能を実現するプログラムを1つ以上のプロセッサが読出して実行する処理でも実現可能である。プログラムは、ネットワーク又は記憶媒体を介して、プロセッサを有するシステム又は装置に供給するようにしてもよい。また、本発明は、上述の実施形態の1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。また、画像処理装置100の各部は、図7に示すハードウェアにより実現してもよいし、ソフトウェアにより実現することもできる。 The present invention can also be realized by a process in which one or more processors read and execute a program that realizes one or more functions of the above-described embodiment. The program may be supplied to a system or device having a processor via a network or storage medium. The present invention can also be realized by a circuit (for example, an ASIC) that realizes one or more functions of the above-described embodiment. Further, each part of the image processing apparatus 100 may be realized by the hardware shown in FIG. 7 or by software.

なお、上述した各実施形態に係る画像処理装置100の1以上の機能を他の装置が有していてもよい。例えば、各実施形態に係る画像処理装置100の1以上の機能を撮像装置110が有していてもよい。なお、上述した各実施形態を組み合わせて、例えば、上述した実施形態を任意に組み合わせて実施してもよい。 In addition, another device may have one or more functions of the image processing device 100 according to each of the above-described embodiments. For example, the image pickup apparatus 110 may have one or more functions of the image processing apparatus 100 according to each embodiment. It should be noted that each of the above-described embodiments may be combined, for example, any combination of the above-described embodiments may be carried out.

以上、本発明を実施形態と共に説明したが、上記実施形態は本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲は限定的に解釈されるものではない。すなわち、本発明はその技術思想、又はその主要な特徴から逸脱しない範囲において、様々な形で実施することができる。例えば、各実施形態を組み合わせたものも本明細書の開示内容に含まれる。 Although the present invention has been described above with the embodiments, the above-described embodiments are merely examples of embodiment of the present invention, and the technical scope of the present invention is construed in a limited manner by these. It's not a thing. That is, the present invention can be implemented in various forms within a range that does not deviate from the technical idea or its main features. For example, a combination of the respective embodiments is also included in the disclosure contents of the present specification.

Claims (19)

撮像手段により撮像された画像から特定物体を検出する検出処理を実行する検出手段と、
前記特定物体の前記画像上の位置およびサイズを示す物体情報を保持する保持手段と、
前記撮像手段により異なる時刻に撮像された複数の画像各々に対する前記検出処理に基づき、同一の特定物体を追尾する追尾手段と、
前記追尾手段により追尾された前記同一の特定物体に対応する前記物体情報に基づき、前記撮像手段により撮像された画像に対して複数の推定領域を設定する設定手段と、
前記複数の推定領域の各々に含まれる前記特定物体の数を推定する推定処理を実行する推定手段と、を有することを特徴とする画像処理装置。
A detection means that executes a detection process that detects a specific object from an image captured by the imaging means,
A holding means for holding object information indicating the position and size of the specific object on the image, and
A tracking means that tracks the same specific object based on the detection process for each of a plurality of images captured at different times by the imaging means.
A setting means for setting a plurality of estimation regions for an image captured by the imaging means based on the object information corresponding to the same specific object tracked by the tracking means.
An image processing apparatus comprising: an estimation means for executing an estimation process for estimating the number of the specific object included in each of the plurality of estimation regions.
前記保持手段は、前記画像から前記特定物体が検出されるたびに該特定物体の物体情報を蓄積し、
前記設定手段は、前記追尾手段により追尾された前記同一の特定物体について蓄積された前記物体情報に基づき、前記撮像手段により撮像された画像に対して複数の推定領域を設定することを特徴とする請求項1に記載の画像処理装置。
The holding means accumulates the object information of the specific object each time the specific object is detected from the image.
The setting means is characterized in that a plurality of estimation regions are set for an image captured by the imaging means based on the object information accumulated for the same specific object tracked by the tracking means. The image processing apparatus according to claim 1.
前記設定手段は、前記追尾手段により追尾された距離が所定値以上である前記同一の特定物体に対応する前記物体情報に基づき、前記撮像手段により撮像された画像に対して複数の推定領域を設定することを特徴とする請求項1又は2に記載の画像処理装置。 The setting means sets a plurality of estimation regions for an image captured by the imaging means based on the object information corresponding to the same specific object whose distance tracked by the tracking means is equal to or greater than a predetermined value. The image processing apparatus according to claim 1 or 2. 前記設定手段は、前記追尾手段により追尾される前記同一の特定物体の軌跡における第1の位置から該軌跡における第2の位置までの距離が所定値以上である場合、該同一の特定物体に対応する前記物体情報に基づき、前記撮像手段により撮像された画像に対して複数の推定領域を設定することを特徴とする請求項1又は2に記載の画像処理装置。 When the distance from the first position in the locus of the same specific object tracked by the tracking means to the second position in the locus is a predetermined value or more, the setting means corresponds to the same specific object. The image processing apparatus according to claim 1 or 2, wherein a plurality of estimation regions are set for an image captured by the imaging means based on the object information. 前記設定手段は、前記画像上の検出領域において前記検出処理により検出された特定物体に対応する前記物体情報と、前記追尾手段により追尾された前記同一の特定物体に対応する前記物体情報とに基づき、前記撮像手段により撮像された画像に対して前記複数の推定領域を設定することを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。 The setting means is based on the object information corresponding to the specific object detected by the detection process in the detection region on the image and the object information corresponding to the same specific object tracked by the tracking means. The image processing apparatus according to any one of claims 1 to 4, wherein a plurality of estimation regions are set for an image captured by the imaging means. 前記画像上の検出領域において前記特定物体が検出された回数が所定値に達したかを判定する判定手段を更に有し、
前記検出領域において前記特定物体が検出された回数が前記所定値に達したと前記判定手段により判定された場合、前記設定手段は、前記検出領域において検出された前記特定物体に対応する前記物体情報と、前記追尾手段により追尾された前記同一の特定物体に対応する前記物体情報とに基づき、前記撮像手段により撮像された画像に対して前記複数の推定領域を設定することを特徴とする請求項5に記載の画像処理装置。
Further, it has a determination means for determining whether or not the number of times the specific object is detected in the detection region on the image has reached a predetermined value.
When the determination means determines that the number of times the specific object has been detected in the detection region has reached the predetermined value, the setting means has the object information corresponding to the specific object detected in the detection region. The claim is characterized in that a plurality of estimation regions are set for an image captured by the imaging means based on the object information corresponding to the same specific object tracked by the tracking means. The image processing apparatus according to 5.
前記推定手段は、前記特定物体に関する学習済みモデルを用いて、前記推定領域に含まれる前記特定物体の数を推定することを特徴とする請求項1乃至6のいずれか1項に記載の画像処理装置。 The image processing according to any one of claims 1 to 6, wherein the estimation means estimates the number of the specific objects included in the estimation region by using a trained model for the specific object. apparatus. 前記複数の推定領域の各々に対する前記推定処理の結果を示す情報を出力する出力手段を更に有することを特徴とする請求項1乃至7のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 7, further comprising an output means for outputting information indicating the result of the estimation processing for each of the plurality of estimation regions. 前記特定物体は、人物であることを特徴とする請求項1乃至8のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 8, wherein the specific object is a person. 撮像手段により撮像された画像から特定物体を検出する検出処理を実行する検出工程と、
前記特定物体の前記画像上の位置およびサイズを示す物体情報を保持する保持工程と、
前記撮像手段により異なる時刻に撮像された複数の画像各々に対する前記検出処理に基づき、同一の特定物体を追尾する追尾工程と、
前記追尾工程において追尾された前記同一の特定物体に対応する前記物体情報に基づき、前記撮像手段により撮像された画像に対して複数の推定領域を設定する設定工程と、
前記複数の推定領域の各々に含まれる前記特定物体の数を推定する推定処理を実行する推定工程と、を有することを特徴とする画像処理方法。
A detection step that executes a detection process to detect a specific object from an image captured by an imaging means,
A holding step of holding object information indicating the position and size of the specific object on the image, and
A tracking step of tracking the same specific object based on the detection process for each of a plurality of images captured at different times by the imaging means.
A setting step of setting a plurality of estimation regions for an image captured by the imaging means based on the object information corresponding to the same specific object tracked in the tracking step.
An image processing method comprising an estimation step of executing an estimation process for estimating the number of the specific object included in each of the plurality of estimation regions.
前記保持工程において、前記画像から前記特定物体が検出されるたびに該特定物体の物体情報を蓄積し、
前記設定工程において、前記追尾工程により追尾された前記同一の特定物体について蓄積された前記物体情報に基づき、前記撮像手段により撮像された画像に対して複数の推定領域を設定することを特徴とする請求項10に記載の画像処理方法。
In the holding step, each time the specific object is detected from the image, the object information of the specific object is accumulated.
The setting step is characterized in that a plurality of estimation regions are set for an image captured by the imaging means based on the object information accumulated for the same specific object tracked by the tracking step. The image processing method according to claim 10.
前記設定工程において、前記追尾工程において追尾された距離が所定値以上である前記同一の特定物体に対応する前記物体情報に基づき、前記撮像手段により撮像された画像に対して複数の推定領域を設定することを特徴とする請求項10又は11に記載の画像処理方法。 In the setting step, a plurality of estimation regions are set for an image captured by the imaging means based on the object information corresponding to the same specific object whose tracking distance is equal to or greater than a predetermined value in the tracking step. The image processing method according to claim 10 or 11, wherein the image processing method is performed. 前記設定工程において、前記追尾工程において追尾される前記同一の特定物体の軌跡における第1の位置から該軌跡における第2の位置までの距離が所定値以上である場合、該同一の特定物体に対応する前記物体情報に基づき、前記撮像手段により撮像された画像に対して複数の推定領域を設定することを特徴とする請求項10又は11に記載の画像処理方法。 In the setting step, when the distance from the first position in the locus of the same specific object tracked in the tracking step to the second position in the locus is a predetermined value or more, it corresponds to the same specific object. The image processing method according to claim 10 or 11, wherein a plurality of estimation regions are set for an image captured by the imaging means based on the object information. 前記設定工程において、前記画像上の検出領域において前記検出処理により検出された特定物体に対応する前記物体情報と、前記追尾工程において追尾された前記同一の特定物体に対応する前記物体情報とに基づき、前記撮像手段により撮像された画像に対して前記複数の推定領域を設定することを特徴とする請求項10乃至13のいずれか1項に記載の画像処理方法。 Based on the object information corresponding to the specific object detected by the detection process in the detection region on the image in the setting step and the object information corresponding to the same specific object tracked in the tracking step. The image processing method according to any one of claims 10 to 13, wherein a plurality of estimation regions are set for an image captured by the imaging means. 前記画像上の検出領域において前記特定物体が検出された回数が所定値に達したかを判定する判定工程を更に有し、
前記検出領域において前記特定物体が検出された回数が前記所定値に達したと前記判定工程において判定された場合、前記設定工程において、前記検出領域において検出された前記特定物体に対応する前記物体情報と、前記追尾工程において追尾された前記同一の特定物体に対応する前記物体情報とに基づき、前記撮像手段により撮像された画像に対して前記複数の推定領域を設定することを特徴とする請求項14に記載の画像処理方法。
Further, it has a determination step of determining whether or not the number of times the specific object is detected in the detection region on the image has reached a predetermined value.
When it is determined in the determination step that the number of times the specific object is detected in the detection region has reached the predetermined value, the object information corresponding to the specific object detected in the detection region in the setting step. The claim is characterized in that a plurality of estimation regions are set for an image captured by the imaging means based on the object information corresponding to the same specific object tracked in the tracking step. 14. The image processing method according to 14.
前記推定工程において、前記特定物体に関する学習済みモデルを用いて、前記推定領域に含まれる前記特定物体の数を推定することを特徴とする請求項10乃至15のいずれか1項に記載の画像処理方法。 The image processing according to any one of claims 10 to 15, wherein in the estimation step, the number of the specific objects included in the estimation region is estimated by using the trained model for the specific object. Method. 前記複数の推定領域の各々に対する前記推定処理の結果を示す情報を出力する出力工程を更に有することを特徴とする請求項10乃至16のいずれか1項に記載の画像処理方法。 The image processing method according to any one of claims 10 to 16, further comprising an output step of outputting information indicating the result of the estimation processing for each of the plurality of estimation regions. 前記特定物体は、人物であることを特徴とする請求項10乃至17のいずれか1項に記載の画像処理方法。 The image processing method according to any one of claims 10 to 17, wherein the specific object is a person. コンピュータを、請求項10乃至18のいずれか1項に記載された画像処理装置の各手段として機能させるためのプログラム。 A program for causing a computer to function as each means of the image processing apparatus according to any one of claims 10 to 18.
JP2019214782A 2019-11-27 2019-11-27 Image processing apparatus, image processing method, and program Pending JP2021086391A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019214782A JP2021086391A (en) 2019-11-27 2019-11-27 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019214782A JP2021086391A (en) 2019-11-27 2019-11-27 Image processing apparatus, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2021086391A true JP2021086391A (en) 2021-06-03

Family

ID=76087782

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019214782A Pending JP2021086391A (en) 2019-11-27 2019-11-27 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2021086391A (en)

Similar Documents

Publication Publication Date Title
US20200167554A1 (en) Gesture Recognition Method, Apparatus, And Device
JP6950692B2 (en) People flow estimation device, people flow estimation method and program
JP2022166067A (en) Information processing system, information processing method and program
JP5885398B2 (en) Image processing apparatus and image processing method
CN104811660A (en) Control apparatus and control method
JP6750385B2 (en) Image processing program, image processing method, and image processing apparatus
JP2022507128A (en) Intersection condition detection methods, devices, electronic devices and vehicles
KR20120044484A (en) Apparatus and method for tracking object in image processing system
CN111382637A (en) Pedestrian detection tracking method, device, terminal equipment and medium
KR102295183B1 (en) object tracking method for CCTV video by use of CCTV projection model
JP2017027197A (en) Monitoring program, monitoring device and monitoring method
CN111986229A (en) Video target detection method, device and computer system
JP7214437B2 (en) Information processing device, information processing method and program
JP2016525235A (en) Method and device for character input
JP2021086391A (en) Image processing apparatus, image processing method, and program
US11521330B2 (en) Image processing apparatus, image processing method, and storage medium
KR101909326B1 (en) User interface control method and system using triangular mesh model according to the change in facial motion
JP2022026849A (en) Information processing device, information processing method, and program
JP2022123391A (en) Information processing apparatus, information processing method, and program
JP2021125137A (en) Image processing apparatus and image processing method
JP2021077177A (en) Operation recognition apparatus, operation recognition method, and operation recognition program
JP2021056899A (en) Image processor, image processing method, and program
JP2020166653A (en) Information processing device, information processing method, and program
CN110736465A (en) Navigation method, navigation device, robot and computer readable storage medium
WO2024089855A1 (en) Point cloud movement estimation device, point cloud movement estimation method, and program