[go: up one dir, main page]

JP2024102674A - Setting device, counting system, setting method, and program - Google Patents

Setting device, counting system, setting method, and program Download PDF

Info

Publication number
JP2024102674A
JP2024102674A JP2023006729A JP2023006729A JP2024102674A JP 2024102674 A JP2024102674 A JP 2024102674A JP 2023006729 A JP2023006729 A JP 2023006729A JP 2023006729 A JP2023006729 A JP 2023006729A JP 2024102674 A JP2024102674 A JP 2024102674A
Authority
JP
Japan
Prior art keywords
trajectory
setting
counting
trajectories
route
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
JP2023006729A
Other languages
Japanese (ja)
Inventor
希武 田中
Nozomu Tanaka
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.)
Konica Minolta Inc
Original Assignee
Konica Minolta 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 Konica Minolta Inc filed Critical Konica Minolta Inc
Priority to JP2023006729A priority Critical patent/JP2024102674A/en
Publication of JP2024102674A publication Critical patent/JP2024102674A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

To provide a setting device capable of appropriately setting a path for counting a moving object, a counting system, a setting method, and a program.SOLUTION: A setting device sets a path for counting a moving object and includes: a clustering unit configured to classify a plurality of trajectories along which the object moves into a predetermined number of clusters by clustering based on trajectory information indicating the trajectories; and a path setting unit configured to set the path for each of the clusters.SELECTED DRAWING: Figure 13

Description

本開示は、物体を計数する経路を設定する設定装置、計数システム、設定方法、およびプログラムに関する。 The present disclosure relates to a setting device, a counting system, a setting method, and a program for setting a path for counting objects.

店舗などの各種施設において、施設内を移動する物体(人など)を計数する技術が開発されている。例えば特許文献1には、店舗や施設の画像内に設定した計測エリアを通過した人の数を計測する人数計測装置が開示されている。特許文献2には、所定の位置を通過した人物の人数を算出する際に、目的に適した人数を算出することができる画像処理システムが開示されている。 Technology has been developed for counting objects (such as people) moving within various facilities such as stores. For example, Patent Document 1 discloses a people counting device that counts the number of people who pass through a measurement area set within an image of a store or facility. Patent Document 2 discloses an image processing system that can calculate a number of people appropriate for the purpose when calculating the number of people who have passed through a specified position.

国際公開第2012/132437号International Publication No. 2012/132437 特開2019-061665号公報JP 2019-061665 A

例えば店舗において、通路毎に移動する顧客を計数し、計数結果を分析することで、店舗運営に役立つ情報を取得することができる場合がある。このため、施設に複数の移動経路が存在する場合、経路毎に移動する物体を計数したいという要望がある。 For example, in a store, it may be possible to obtain information that is useful for store management by counting the number of customers moving along each aisle and analyzing the counting results. For this reason, when a facility has multiple routes of movement, there is a demand to be able to count objects moving along each route.

施設内に複数の経路が存在する場合、より効果が高い情報を得るため、物体が移動する数が多い経路を計数対象の経路として設定することが望ましい。しかしながら、施設内に存在する経路の数が多い場合、いずれの経路を計数対象とすることが適切か判断することは難しい。 When multiple routes exist within a facility, it is desirable to set the route along which the greatest number of objects move as the route to be counted in order to obtain more effective information. However, when there are a large number of routes within a facility, it is difficult to determine which route is appropriate for counting.

本開示は、移動する物体を計数する経路を適切に設定することができる設定装置、計数システム、設定方法、およびプログラムを提供することを目的とする。 The present disclosure aims to provide a setting device, counting system, setting method, and program that can appropriately set a path for counting moving objects.

本開示の一態様に係る設定装置は、移動する物体を計数する経路を設定する設定装置であって、物体が移動する軌跡を示す軌跡情報に基づいて、複数の前記軌跡をクラスタリングにより所定数のクラスタに分類するクラスタリング部と、前記クラスタ毎に前記経路を設定する経路設定部と、を備える。 A setting device according to one aspect of the present disclosure is a setting device that sets a route for counting moving objects, and includes a clustering unit that classifies a plurality of trajectories into a predetermined number of clusters by clustering based on trajectory information indicating the trajectory of the object's movement, and a route setting unit that sets the route for each of the clusters.

本開示の一態様に係る計数システムは、移動する物体を撮影し画像を生成する画像生成装置と、前記画像に基づいて前記軌跡情報を生成する軌跡生成装置と、所定期間における前記軌跡情報に基づいて前記経路を設定する請求項1に記載の設定装置と、前記所定期間より後に新たに取得された軌跡情報に基づいて、前記経路に沿って移動した前記物体を計数する計数装置と、を備える。 A counting system according to one aspect of the present disclosure includes an image generating device that captures an image of a moving object and generates an image, a trajectory generating device that generates the trajectory information based on the image, a setting device according to claim 1 that sets the path based on the trajectory information for a predetermined period of time, and a counting device that counts the objects that have moved along the path based on trajectory information newly acquired after the predetermined period of time.

本開示の一態様に係る設定方法は、所定の経路を移動した物体を計数対象とするとき、前記経路を設定する設定装置が備えるコンピューターが実行する設定方法であって、前記コンピューターが、物体が移動する軌跡を示す軌跡情報を取得し、複数の前記軌跡情報に基づいて、クラスタリングにより前記軌跡を所定数のクラスタに分類し、分類された前記クラスタ毎に所定数の選択軌跡を選出し、前記選択軌跡に基づいて前記経路を設定する。 A setting method according to one aspect of the present disclosure is a setting method executed by a computer included in a setting device that sets a predetermined route when an object that has moved along the route is to be counted, in which the computer acquires trajectory information indicating the trajectory of the object's movement, classifies the trajectories into a predetermined number of clusters by clustering based on a plurality of pieces of trajectory information, selects a predetermined number of selected trajectories for each classified cluster, and sets the route based on the selected trajectories.

本開示の一態様に係るプログラムは、所定の経路を移動した物体を計数対象とするとき、前記経路を設定する設定装置が備えるコンピューターにより実行されるプログラムであって、物体が移動する軌跡を示す軌跡情報を取得し、複数の前記軌跡情報に基づいて、クラスタリングにより前記軌跡を所定数のクラスタに分類し、分類された前記クラスタ毎に所定数の選択軌跡を選出し、前記選択軌跡に基づいて前記経路を設定する、手順を前記コンピューターに実行させる。 A program according to one aspect of the present disclosure is a program executed by a computer included in a setting device that sets a predetermined path when counting an object that has moved along the path, and causes the computer to execute the following steps: acquire trajectory information indicating the trajectory along which the object moves, classify the trajectories into a predetermined number of clusters by clustering based on a plurality of pieces of trajectory information, select a predetermined number of selected trajectories for each of the classified clusters, and set the path based on the selected trajectories.

移動する物体を計数する経路を適切に設定することができる。 The route for counting moving objects can be set appropriately.

計数システムの全体構成について説明するための図FIG. 1 is a diagram for explaining the overall configuration of a counting system. 軌跡生成装置が備える機能構成について説明するための図FIG. 1 is a diagram for explaining a functional configuration of a trajectory generation device; 画像取得部が画像内に複数の領域を設定する様子を示す図FIG. 1 is a diagram showing how an image acquisition unit sets multiple regions within an image. 軌跡生成部が軌跡情報を生成する様子を示す図FIG. 1 is a diagram showing how a trajectory generating unit generates trajectory information; 同一の物体が同じ領域を複数回通過した場合の軌跡情報について説明するための図FIG. 1 is a diagram for explaining trajectory information when the same object passes through the same area multiple times; 設定装置が備える機能構成について説明するための図FIG. 2 is a diagram for explaining a functional configuration of a setting device; 軌跡の具体例について説明するための図FIG. 1 is a diagram for explaining a specific example of a trajectory; 軌跡1と軌跡4をmedoidとしたことを示す概念図A conceptual diagram showing that trajectories 1 and 4 are medoids. 軌跡1と軌跡2との距離を算出する様子を示す図FIG. 13 is a diagram showing how the distance between a trajectory 1 and a trajectory 2 is calculated. 軌跡1と軌跡5との距離を算出する様子を示す図FIG. 13 is a diagram showing how the distance between a trajectory 1 and a trajectory 5 is calculated; 計数装置が備える機能構成について説明するための図FIG. 1 is a diagram for explaining a functional configuration of a counting device. 計数システムの全体の動作例を説明するためのフローチャートA flowchart for explaining an example of the overall operation of the counting system. 計数システムの設定フェーズにおける設定装置の動作例を説明するためのフローチャートA flowchart for explaining an example of the operation of a setting device in a setting phase of a counting system. 計数システムの計数フェーズにおける計数装置の動作例を説明するためのフローチャートA flowchart for explaining an example of the operation of a counting device in a counting phase of a counting system.

以下、本開示の実施の形態について、図面を参照して説明する。ただし、発明の範囲は図示した例に限定されない。なお、以下の説明において、同一の機能および構成を有するものについては、同一の符号を付し、その説明を省略する。 Embodiments of the present disclosure will be described below with reference to the drawings. However, the scope of the invention is not limited to the examples shown in the drawings. In the following description, parts having the same functions and configurations are given the same reference numerals and their description will be omitted.

以下では、本開示の実施の形態に係る計数システム100について説明する。計数システム100は、所定の範囲内において、移動する各種物体を検知し、設定された経路を移動した物体を計数するシステムである。所定の範囲の例としては、小売店、銀行、駅、工場などの各種施設、または公道、私道、横断歩道などの道路、民家の出入口や集合住宅の廊下などが挙げられる。また、計数システム100が検知する物体の例としては、例えば人、動物、移動ロボット、自動車、または自転車などが挙げられる。 Below, a counting system 100 according to an embodiment of the present disclosure will be described. The counting system 100 is a system that detects various moving objects within a predetermined range and counts the objects that have moved along a set route. Examples of predetermined ranges include various facilities such as retail stores, banks, stations, and factories, as well as roads such as public roads, private roads, and crosswalks, entrances and exits of private homes, and corridors of apartment buildings. Examples of objects detected by the counting system 100 include people, animals, mobile robots, automobiles, and bicycles.

<計数システム100の全体構成>
図1は、計数システム100の全体構成について説明するための図である。計数システム100は、画像生成装置1と、軌跡生成装置2と、設定装置3と、計数装置4と、を備える。
<Overall configuration of counting system 100>
1 is a diagram for explaining the overall configuration of a counting system 100. The counting system 100 includes an image generating device 1, a trajectory generating device 2, a setting device 3, and a counting device 4.

計数システム100は、実際に計数を開始する前の所定期間において、移動する物体を計数の対象とする経路を設定する設定フェーズと、設定フェーズにおいて設定された経路を用いて実際に計数を行う計数フェーズと、のそれぞれにおいて動作が異なる。本開示において、経路とは、物体がその経路に沿って移動した場合に、計数装置4がその物体を計数する経路である。 The counting system 100 operates differently in a setting phase, in which a path along which moving objects are to be counted is set during a predetermined period before the actual start of counting, and in a counting phase, in which counting is actually performed using the path set in the setting phase. In this disclosure, a path is a path along which the counting device 4 counts an object when the object moves along that path.

設定フェーズは、システム設置後、計数装置4による計数が開始される前に、設定装置3が経路を決定するフェーズである。一方、計数フェーズは、経路設定後、その経路を用いて、計数装置4が実際に計数を行うフェーズである。 The setting phase is a phase in which the setting device 3 determines the route after the system is installed and before the counting device 4 starts counting. On the other hand, the counting phase is a phase in which the counting device 4 actually performs counting using the route after the route is set.

画像生成装置1は、例えば施設内外の各所に設けられるカメラである。計数システム100は、複数台のカメラを有していてもよい。1台または複数台の画像生成装置1は、計数システム100のユーザーが計数したい物体の移動可能な範囲を撮像できる位置に設置される。これにより、画像生成装置1は、1つまたは複数の範囲の画像を生成することができる。 The image generating device 1 is, for example, a camera installed in various locations inside and outside a facility. The counting system 100 may have multiple cameras. One or multiple image generating devices 1 are installed in positions that allow them to capture images of the range within which an object that a user of the counting system 100 wants to count can move. This allows the image generating device 1 to generate images of one or multiple ranges.

以下では、画像生成装置1の撮像範囲が固定されている場合について説明するが、本開示では、画像生成装置1の撮像範囲は時間によって変化してもよい。例えば、画像生成装置1は首振り機能を有していてもよい。 In the following, a case where the imaging range of the image generating device 1 is fixed will be described, but in this disclosure, the imaging range of the image generating device 1 may change over time. For example, the image generating device 1 may have a swivel function.

具体例として、画像生成装置1は、店舗の陳列棚が並ぶ通路の少なくとも一部を含む範囲を撮像できる位置に設置される。他の例として、画像生成装置1は、店舗の出入口を含む範囲を撮像できる位置に設置される。他の例として、画像生成装置1は、駅の改札口を含む範囲を撮像できる位置に設置される。他の例として、画像生成装置1は、横断歩道の少なくとも一部を撮像できる位置に設置される。 As a specific example, the image generating device 1 is installed in a position where it can capture an image of an area including at least a portion of an aisle in a store where display shelves are lined. As another example, the image generating device 1 is installed in a position where it can capture an image of an area including the entrance and exit of a store. As another example, the image generating device 1 is installed in a position where it can capture an image of an area including a ticket gate of a station. As another example, the image generating device 1 is installed in a position where it can capture an image of at least a portion of a pedestrian crossing.

画像生成装置1が生成する画像は、例えば動画像である。本開示において、動画像とは、同一範囲を互いに異なる時間に撮像した複数枚の画像が時系列に沿って含まれるものを意味する。動画像に含まれる時間あたりの画像(フレーム)の枚数については、本開示では限定しない。 The image generated by the image generating device 1 is, for example, a moving image. In this disclosure, a moving image means an image that includes multiple images captured at different times of the same area in a chronological order. This disclosure does not limit the number of images (frames) included per unit time in a moving image.

軌跡生成装置2は、画像生成装置1が生成した画像に基づいて、画像内を移動する物体を検知し、物体の軌跡を示す軌跡情報を生成する。軌跡生成装置2は、設定フェーズと計数フェーズの両方において軌跡情報を生成し、設定装置3および計数装置4の少なくともいずれかに軌跡情報を出力する。 The trajectory generating device 2 detects an object moving within the image generated by the image generating device 1, and generates trajectory information indicating the trajectory of the object. The trajectory generating device 2 generates trajectory information in both the setting phase and the counting phase, and outputs the trajectory information to at least one of the setting device 3 and the counting device 4.

設定装置3は、設定フェーズにおいて、軌跡情報に基づいて、移動する物体を計数対象とする経路を設定する。 In the setting phase, the setting device 3 sets a route for counting moving objects based on the trajectory information.

計数装置4は、計数フェーズにおいて、新たな軌跡情報に基づいて、経路を移動した物体を計数する。 In the counting phase, the counting device 4 counts the objects that have moved along the path based on the new trajectory information.

このような構成を備える計数システム100において、設定装置3が適切な経路を設定することにより、計数装置4の計数結果をより有用な情報とすることができる。以下では、軌跡生成装置2、設定装置3、および計数装置4の構成および動作について詳細に説明する。 In the counting system 100 having such a configuration, the setting device 3 sets an appropriate path, so that the counting results of the counting device 4 can be made into more useful information. The configurations and operations of the trajectory generating device 2, the setting device 3, and the counting device 4 are described in detail below.

<軌跡生成装置2>
軌跡生成装置2は、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)を備え、ROMに記憶されているシステムプログラムなどの各種処理プログラムを読み出してRAMに展開し、展開したプログラムを実行することで各種機能を実現する。ROMは、半導体などの不揮発メモリーなどにより構成され、システムプログラム及び該システムプログラム上で実行可能な各種処理プログラムなどを記憶する。これらのプログラムは、コンピューターが読み取り可能なプログラムコードの形態で格納され、CPUは、当該プログラムコードに従った動作を逐次実行する。RAMは、CPUにより実行される各種プログラム及びこれらプログラムに係るデータを一時的に記憶するワークエリアを形成する。
<Trajectory generating device 2>
The trajectory generating device 2 includes a CPU (Central Processing Unit), a ROM (Read Only Memory), and a RAM (Random Access Memory), and realizes various functions by reading out various processing programs such as a system program stored in the ROM, expanding them in the RAM, and executing the expanded programs. The ROM is made up of non-volatile memory such as a semiconductor, and stores the system program and various processing programs that can be executed on the system program. These programs are stored in the form of computer-readable program codes, and the CPU sequentially executes operations in accordance with the program codes. The RAM forms a work area that temporarily stores various programs executed by the CPU and data related to these programs.

図2は、軌跡生成装置2が備える機能構成について説明するための図である。軌跡生成装置2は、画像取得部21と、領域設定部22と、物体検出部23と、物体追跡部24と、軌跡生成部25と、操作部26と、表示部27と、記憶部28と、を備える。軌跡生成装置2が備えるこれらの機能構成は、プロセッサーによりプログラムが実行されることでソフトウェア的に実現されてもよいし、集積回路などのハードウェア回路として実現されてもよい。 FIG. 2 is a diagram for explaining the functional configuration of the trajectory generating device 2. The trajectory generating device 2 includes an image acquisition unit 21, an area setting unit 22, an object detection unit 23, an object tracking unit 24, a trajectory generating unit 25, an operation unit 26, a display unit 27, and a memory unit 28. These functional configurations of the trajectory generating device 2 may be realized in software by a processor executing a program, or may be realized as a hardware circuit such as an integrated circuit.

画像取得部21は、画像生成装置1から画像を取得する。画像取得部21は、例えば有線または無線通信により、画像生成装置1から画像を取得すればよい。また、画像取得部21は、複数の画像生成装置1から複数の範囲の画像を取得した場合、複数の範囲の画像を統合して統合画像を生成してもよい。 The image acquisition unit 21 acquires images from the image generation device 1. The image acquisition unit 21 may acquire images from the image generation device 1, for example, by wired or wireless communication. Furthermore, when the image acquisition unit 21 acquires images of multiple ranges from multiple image generation devices 1, it may integrate the images of the multiple ranges to generate an integrated image.

領域設定部22は、画像取得部21が取得した画像に複数の領域を設定する。図3は、画像取得部21が画像内に複数の領域を設定する様子を示す図である。図3Aには、長方形の画像Iにそれぞれ直線の格子線GLにより分割されることで、画像I内に複数の領域Aが設定された例が示されている。図3Bは、円形の画像Iがそれぞれ直線または曲線の格子線GLにより分割されることで複数の領域Aが設定された例が示されている。図3に示す画像Iには、3つの陳列棚と、レジとが含まれている。 The region setting unit 22 sets multiple regions in the image acquired by the image acquisition unit 21. FIG. 3 is a diagram showing how the image acquisition unit 21 sets multiple regions in an image. FIG. 3A shows an example in which a rectangular image I is divided by straight grid lines GL, thereby setting multiple regions A in the image I. FIG. 3B shows an example in which a circular image I is divided by straight or curved grid lines GL, thereby setting multiple regions A. The image I shown in FIG. 3 includes three display shelves and a cash register.

領域設定部22は、画像に設定した複数の領域を区別するため、それぞれの領域に識別情報を付与する。図3Aに示す例では、領域設定部22が識別情報[x,y]をそれぞれの領域に付与した様子が示されている。xは画像Iの左上が0に設定されており、領域A毎に右に向かうほど大きくなる値である。yは画像Iの左上が0に設定されており、領域A毎に下に向かうほど大きくなる値である。なお、図3Aでは説明の都合上、各領域内に識別情報[0,0]、[0,1]…を示しているが、実際には識別情報がそれぞれの領域内に表示される必要はない。 The region setting unit 22 assigns identification information to each region in order to distinguish between multiple regions set in the image. The example shown in FIG. 3A shows how the region setting unit 22 assigns identification information [x, y] to each region. x is set to 0 at the top left of image I, and the value increases toward the right for each region A. y is set to 0 at the top left of image I, and the value increases toward the bottom for each region A. Note that for the sake of explanation, FIG. 3A shows identification information [0,0], [0,1], etc. in each region, but in reality, identification information does not need to be displayed in each region.

領域設定部22は、画像生成装置1の撮像範囲が固定されている場合には、動画像の1フレームを用いて領域を設定してもよい。画像生成装置1の撮像範囲が時間によって変動する場合、領域設定部22は、動画像に含まれる全てのフレーム画像に対し、それぞれ領域を設定してもよいし、所定フレームおきの画像に対し領域を設定してもよい。 When the imaging range of the image generating device 1 is fixed, the region setting unit 22 may set a region using one frame of the moving image. When the imaging range of the image generating device 1 varies over time, the region setting unit 22 may set a region for each of all frame images included in the moving image, or may set a region for images at intervals of a predetermined number of frames.

領域設定部22は、複数の画像生成装置1から取得された複数の範囲の画像を統合した統合画像において領域設定を行う場合、統合画像にグローバル座標系を設定し、グローバル座標系に基づいて領域毎の識別情報を付与する。領域設定部22は、例えば画像生成装置1毎に設定されているローカル座標系における各領域の識別情報を、グローバル座標系に変換することで、統合画像における各領域の識別情報を設定すればよい。 When setting an area in an integrated image obtained by integrating images of multiple ranges acquired from multiple image generating devices 1, the area setting unit 22 sets a global coordinate system in the integrated image and assigns identification information for each area based on the global coordinate system. The area setting unit 22 may set the identification information for each area in the integrated image by, for example, converting the identification information for each area in a local coordinate system set for each image generating device 1 into the global coordinate system.

領域設定部22は、画像内に設定する1つの領域の大きさを、例えば計数システム100のユーザーの操作に基づいて決定すればよい。 The area setting unit 22 may determine the size of an area to be set within an image based on, for example, the operation of the user of the counting system 100.

物体検出部23は、画像生成装置1が生成した画像内を移動する物体を検出する。物体追跡部24は、物体検出部23が検出した物体を追跡し、物体の時間毎の位置情報を生成する。物体検出部23および物体追跡部24は、公知の物体検出方法および物体追跡方法(例えばSORT(Simple Online and Realtime Tracking)など)を利用して画像内を移動する物体の検出および追跡を行えばよい。 The object detection unit 23 detects objects moving within the image generated by the image generation device 1. The object tracking unit 24 tracks the objects detected by the object detection unit 23 and generates time-based position information of the objects. The object detection unit 23 and the object tracking unit 24 may detect and track objects moving within the image using a publicly known object detection method and object tracking method (e.g., SORT (Simple Online and Realtime Tracking)).

物体検出部23および物体追跡部24は、時間の経過に伴い同一の物体を追跡できなくなった場合、当該物体に関する検出および追跡を終了する。 When the object detection unit 23 and the object tracking unit 24 are no longer able to track the same object over time, they terminate detection and tracking of the object.

軌跡生成部25は、同一の物体の時間毎の位置情報に基づいて、当該物体の軌跡を特定し、軌跡を示す軌跡情報を生成する。図4は、図3Aに示す画像Iにおいて、軌跡生成部25が軌跡情報を生成する様子を示す図である。図4Aには、物体追跡部24により生成された位置情報の時間的な遷移が示されている。図4Bには、位置情報に基づいて軌跡生成部25により特定された物体の軌跡が示されている。図4Bに示すように、軌跡生成部25は、物体の位置が含まれる領域を繋ぎ合わせて当該物体の軌跡とする。図4Bでは、軌跡に該当する領域に斜線を付して示している。なお、図4Aおよび図4Bには、説明のため、領域毎のxの値およびyの値に対応する数字を画像Iの外縁部に示している。 The trajectory generating unit 25 identifies the trajectory of an object based on the position information of the same object over time, and generates trajectory information indicating the trajectory. FIG. 4 is a diagram showing how the trajectory generating unit 25 generates trajectory information for the image I shown in FIG. 3A. FIG. 4A shows the temporal transition of the position information generated by the object tracking unit 24. FIG. 4B shows the trajectory of an object identified by the trajectory generating unit 25 based on the position information. As shown in FIG. 4B, the trajectory generating unit 25 connects areas including the object's position to generate the trajectory of the object. In FIG. 4B, the area corresponding to the trajectory is shown with diagonal lines. Note that, for the purpose of explanation, in FIG. 4A and FIG. 4B, numbers corresponding to the x value and y value of each area are shown on the outer edge of the image I.

図4Aおよび図4Bに示すように、軌跡生成部25は、物体が通過した複数の領域を前記物体が移動した軌跡であるとする。すなわち、軌跡生成部25は、物体が通過した複数の領域を繋ぎ合わせたものを当該物体の移動した軌跡として特定する。図4Bに示す例では、物体の軌跡は、領域[0,5]、領域[1,5]、領域[2,5]、領域[3,5]、領域[4,5]、領域[5,5]、領域[5,4]、領域[6,4]、領域[6,3]、領域[6,2]、領域[6,1]、領域[7,1]、領域[8,1]、領域[9,1]、領域[10,1]、領域[11,1]により構成される。軌跡生成部25は、特定した軌跡を示す軌跡情報を、これらの領域の識別情報に基づいて生成する。軌跡生成部25は、物体が移動した領域の順番を軌跡情報に含めてもよい。 4A and 4B, the trajectory generating unit 25 determines that the multiple regions through which the object has passed are the trajectory of the object's movement. That is, the trajectory generating unit 25 identifies the trajectory of the object by connecting the multiple regions through which the object has passed. In the example shown in FIG. 4B, the trajectory of the object is composed of region [0,5], region [1,5], region [2,5], region [3,5], region [4,5], region [5,5], region [5,4], region [6,4], region [6,3], region [6,2], region [6,1], region [7,1], region [8,1], region [9,1], region [10,1], and region [11,1]. The trajectory generating unit 25 generates trajectory information indicating the identified trajectory based on the identification information of these regions. The trajectory generation unit 25 may include in the trajectory information the order of the areas through which the object has moved.

図5は、同一の物体が同じ領域を複数回通過した場合の軌跡情報について説明するための図である。図5Aには、物体が同じ領域を複数回移動した場合の、物体追跡部24により生成された位置情報の時間的な遷移の例が示されている。このような物体の動きは、例えば物体としての顧客が、店舗内の陳列棚の前を往復しながら商品を選んでいる場合などに生じうる。 Figure 5 is a diagram for explaining trajectory information when the same object passes through the same area multiple times. Figure 5A shows an example of the temporal transition of position information generated by the object tracking unit 24 when an object moves through the same area multiple times. Such object movement can occur, for example, when a customer, as an object, selects a product while walking back and forth in front of a display shelf in a store.

このような場合、図5Bに示すように、軌跡生成部25は、同一の物体が同じ領域を複数回通過した場合でも、当該領域をそれぞれ1回ずつ通過したものとして当該物体の軌跡を特定する。図5Bでは、特定された軌跡の例が斜線を付した領域の連続で示されている。これにより、軌跡情報が不要に複雑になってしまう事態を回避できるとともに、軌跡情報のデータ量を低減できる。 In such a case, as shown in FIG. 5B, even if the same object passes through the same area multiple times, the trajectory generation unit 25 identifies the trajectory of the object by treating each area as having passed through it once. In FIG. 5B, an example of an identified trajectory is shown as a series of shaded areas. This makes it possible to avoid a situation in which the trajectory information becomes unnecessarily complicated, and also reduces the amount of data in the trajectory information.

軌跡生成部25は、例えば始点から終点までの長さが所定未満、すなわち領域の数が所定数未満である軌跡については、軌跡情報を生成しないようにしてもよい。その理由は、長さが極端に短い軌跡は、例えば物体検出部23の誤検出により生じたものである可能性が高いためである。 The trajectory generating unit 25 may not generate trajectory information for a trajectory whose length from the start point to the end point is less than a predetermined value, i.e., whose number of regions is less than a predetermined number. This is because an extremely short trajectory is highly likely to have been generated by, for example, erroneous detection by the object detecting unit 23.

また、軌跡生成部25は、始点または終点が特定領域ではない軌跡については、軌跡情報を生成しないようにしてもよい。特定領域とは、画像生成装置1の撮像範囲の外部から撮像範囲の内部に物体が入ってくる、または撮像範囲の内部から撮像範囲の外部に物体が出て行く領域である。より具体的には、特定領域とは、例えば撮像範囲に写る通路が、画像の縁に到達するところに該当する領域である。または、特定領域とは、画像内に施設の出入口がある場合、その出入口に該当する領域である。 The trajectory generating unit 25 may also be configured not to generate trajectory information for a trajectory whose start point or end point is not in a specific area. A specific area is an area where an object enters the imaging range of the image generating device 1 from outside the imaging range into the imaging range, or an object exits from the imaging range to the outside of the imaging range. More specifically, a specific area is an area where, for example, a passageway captured in the imaging range reaches the edge of the image. Or, if there is an entrance to a facility in the image, a specific area is an area where the entrance is located.

このように、軌跡生成部25は、特定領域以外の領域が始点また終点となる軌跡については、軌跡情報を生成しない。その理由は、物体が撮像範囲の特定領域以外に現れて移動し始める、または特定領域以外から急に消えることは通常あり得ず、そのような軌跡は例えば物体検出部23の誤検出により生じたものである可能性が高いためである。 In this way, the trajectory generation unit 25 does not generate trajectory information for a trajectory that starts or ends in an area other than the specific area. The reason for this is that it is usually impossible for an object to appear and start moving outside the specific area of the imaging range, or to suddenly disappear from outside the specific area, and such a trajectory is highly likely to have been generated by, for example, erroneous detection by the object detection unit 23.

また、軌跡生成部25は、撮像範囲のうち、予め設定された除外領域の内部を移動する物体については、軌跡情報を生成しないようにしてもよい。除外領域とは、撮像範囲に含まれるいくつかの領域であって、物体を検出する必要がない領域である。具体例を挙げると、例えば、ガラス張りの小型の店舗内部が撮像範囲であるとき、ガラスを通して写る、店舗外部の道路が除外領域に設定されうる。これは、店舗外部の道路を移動する人物や自転車などは、店舗内部において検出すべき物体には該当しないからである。 The trajectory generating unit 25 may also be configured not to generate trajectory information for objects moving within a preset exclusion area within the imaging range. The exclusion area is a number of areas included in the imaging range in which it is not necessary to detect objects. As a specific example, when the imaging range is the interior of a small glass-walled store, the road outside the store that is visible through the glass may be set as the exclusion area. This is because people and bicycles moving on the road outside the store do not correspond to objects that should be detected inside the store.

特定領域や除外領域は、計数システム100のユーザーの操作に基づいて適宜設定されればよい。 The specific area and the excluded area may be set appropriately based on the operation of the user of the counting system 100.

操作部26は、例えばマウス、トラックボール、タッチパッド、ボタン、キーボードなどの各種操作デバイスである。表示部27は、液晶ディスプレイ、有機EL(Electro-Luminescence)ディスプレイ、CRT(Cathode Ray Tube)ディスプレイ等の各種表示デバイスである。軌跡生成装置2は、操作部26としてのタッチパッドと、表示部27としての液晶ディスプレイまたは有機ELディスプレイとが重ね合わされたタッチパネルを有していてもよい。 The operation unit 26 is, for example, any of various operation devices such as a mouse, a trackball, a touchpad, a button, or a keyboard. The display unit 27 is, for example, any of various display devices such as a liquid crystal display, an organic EL (Electro-Luminescence) display, or a CRT (Cathode Ray Tube) display. The trajectory generating device 2 may have a touch panel in which a touchpad as the operation unit 26 and a liquid crystal display or an organic EL display as the display unit 27 are superimposed.

記憶部28は、軌跡生成装置2の動作に必要な各種情報、具体的には軌跡情報、および各機能構成を実現するためのプログラムなどを記憶する。 The memory unit 28 stores various information necessary for the operation of the trajectory generating device 2, specifically trajectory information, and programs for implementing each functional configuration.

軌跡生成装置2は、生成した軌跡を示す軌跡情報を、設定装置3および計数装置4へ出力する。 The trajectory generating device 2 outputs trajectory information indicating the generated trajectory to the setting device 3 and the counting device 4.

<設定装置3>
設定装置3は、設定フェーズにおいて、計数装置4が移動する物体を計数する対象とする経路を設定する。
<Setting device 3>
In the setting phase, the setting device 3 sets a route along which the counting device 4 will count moving objects.

図6は、設定装置3が備える機能構成について説明するための図である。設定装置3は、クラスタリング部31と、経路設定部32と、操作部33と、表示部34と、記憶部35と、を備える。設定装置3は、軌跡生成装置2と同様に、ハードウェアまたはソフトウェア的に各種機能を実現すればよい。 FIG. 6 is a diagram for explaining the functional configuration of the setting device 3. The setting device 3 includes a clustering unit 31, a route setting unit 32, an operation unit 33, a display unit 34, and a storage unit 35. The setting device 3 may realize various functions in the form of hardware or software, similar to the trajectory generating device 2.

クラスタリング部31は、軌跡生成装置2が生成した軌跡情報に基づいて、複数の軌跡のクラスタリングを行う。クラスタリング部31によるクラスタリングの手法としては、例えばk-medoids、またはk-meansなどの既知の手法を採用することができる。 The clustering unit 31 performs clustering of multiple trajectories based on the trajectory information generated by the trajectory generating device 2. As a clustering method used by the clustering unit 31, a known method such as k-medoids or k-means can be adopted.

図7は、軌跡の具体例について説明するための図である。図7において、軌跡の例が各軌跡を構成する領域の中心点を結ぶ線で示されている。図7には、軌跡1~6の6本の軌跡が例示されている。なお、図7では異なる軌跡がそれぞれ重ならない例が示されているが、異なる軌跡同士の少なくとも一部が重なってもよい。言い換えると、異なる軌跡の少なくとも一部が同じ領域によって構成されてもよい。 Figure 7 is a diagram for explaining specific examples of trajectories. In Figure 7, examples of trajectories are shown by lines connecting the center points of the areas that make up each trajectory. Six trajectories, trajectories 1 to 6, are shown as examples in Figure 7. Note that while Figure 7 shows an example in which different trajectories do not overlap with each other, different trajectories may overlap at least in part. In other words, different trajectories may be at least in part made up of the same area.

一例として、クラスタリング部31がk-medoidsを採用した場合に図7の軌跡1~6をクラスタリングする動作について説明する。 As an example, we will explain the operation of clustering trajectories 1 to 6 in Figure 7 when the clustering unit 31 adopts k-medoids.

k-medoidsとは、複数のクラスタリング対象の点をk個のクラスタにクラスタリングする場合に用いられる手法の1つである。k-medoidsは、例えば以下のような処理を含む。
(1)複数の点のうち、k個の点をランダムに選択し、仮にmedoidとする。medoidは、クラスタ内の点であって、クラスタ内の他の点までの距離の総和が最小になる点である。
(2)k個のmedoid以外の各点を、一番近いmedoidのクラスタに仮に割り当てる。
(3)それぞれのクラスタ内において、クラスタ内の他の全ての点との距離の合計が最小になる点を新たにmedoidとする。
(4)(3)において新たなmedoidがあれば(2)に戻り、なければ処理を終了する。
The k-medoids method is a method used for clustering a plurality of clustering target points into k clusters. The k-medoids method includes, for example, the following process.
(1) Among a plurality of points, k points are randomly selected and are assumed to be medoids. A medoid is a point in a cluster that has a minimum sum of distances to other points in the cluster.
(2) Each point other than the k medoids is tentatively assigned to the cluster of the nearest medoid.
(3) In each cluster, the point with the smallest total distance to all other points in the cluster is determined as a new medoid.
(4) If there is a new medoid in (3), return to (2); if not, end the process.

以下では、k-medoidsの上記の工程(1)~(4)を図7に示す軌跡のクラスタリングに適用した場合の処理の具体例を説明する。クラスタ数であるkは、例えば計数システム100のユーザーの操作に基づいて適宜の数に設定されればよい。以下の例では、k=2に設定されているとする。 Below, a specific example of the process when the above steps (1) to (4) of k-medoids are applied to the clustering of the trajectories shown in FIG. 7 will be described. The number of clusters, k, may be set to an appropriate number based on, for example, the operation of the user of the counting system 100. In the following example, k is set to 2.

工程(1)において、medoidの初期設定において、図7に示す軌跡1~6のうち、軌跡1と軌跡4が選択されたとする。図8は、軌跡1と軌跡4をmedoidとしたことを示す概念図である。図8では、medoidとしての軌跡1および軌跡4を他の軌跡よりも太線で示している。以下の説明において、軌跡1が仮に属するクラスタをクラスタ1、軌跡6が仮に属するクラスタをクラスタ2とする。 In step (1), in the initial setting of medoids, it is assumed that trajectories 1 and 4 are selected from trajectories 1 to 6 shown in FIG. 7. FIG. 8 is a conceptual diagram showing that trajectories 1 and trajectory 4 are set as medoids. In FIG. 8, trajectories 1 and 4 as medoids are shown with thicker lines than the other trajectories. In the following explanation, the cluster to which trajectory 1 provisionally belongs is referred to as cluster 1, and the cluster to which trajectory 6 provisionally belongs is referred to as cluster 2.

工程(2)において、medoidとして設定された軌跡1および軌跡4と、他の軌跡2,3,5,6との距離をそれぞれ算出し、軌跡2,3,5,6をクラスタ1,2のいずれかに仮に割り当てる。図8に示す例では、軌跡2,3がクラスタ1に、軌跡5,6がクラスタ2に、それぞれ仮に割り当てられる。 In step (2), the distance between trajectory 1 and trajectory 4, which are set as medoids, and the other trajectories 2, 3, 5, and 6 is calculated, and trajectories 2, 3, 5, and 6 are provisionally assigned to either cluster 1 or 2. In the example shown in FIG. 8, trajectories 2 and 3 are provisionally assigned to cluster 1, and trajectories 5 and 6 are provisionally assigned to cluster 2.

図9および図10は、軌跡同士の距離の算出方法について説明するための概念図である。図9は、図7に示す軌跡1と軌跡2との距離を算出する様子を示す図である。図10は、図7に示す軌跡1と軌跡5との距離を算出する様子を示す図である。図9および図10に示すように、軌跡同士の距離は、それぞれの軌跡に含まれる領域同士を互いに対応付け、対応付けた領域の中心点同士の画像上における二次元距離を算出し、全領域における距離の合計を算出している。図9および図10において、矢印は対応付けられた領域の中心点同士を結んでいる。 Figures 9 and 10 are conceptual diagrams for explaining a method for calculating the distance between trajectories. Figure 9 is a diagram showing how the distance between trajectories 1 and 2 shown in Figure 7 is calculated. Figure 10 is a diagram showing how the distance between trajectories 1 and 5 shown in Figure 7 is calculated. As shown in Figures 9 and 10, the distance between trajectories is calculated by matching the areas included in each trajectory with each other, calculating the two-dimensional distance on the image between the center points of the matched areas, and calculating the sum of the distances in all areas. In Figures 9 and 10, arrows connect the center points of the matched areas.

図9に示す例のように、2つの軌跡に含まれる領域の数が同じである場合、2つの軌跡を構成する全ての領域同士を対応付け、中心点同士の距離を算出すればよい。図10に示す例のように、2つの軌跡に含まれる領域の数がそれぞれ異なる場合、図10Aのように1つの軌跡の1つの領域が、他の軌跡の複数の領域と対応付けられてもよいし、図10Bに示すように一部の領域の対応付けが行われなくてもよい。また、既知の技術である2次元DTW(Dynamic Time Warping:動的時間伸縮法)を用いて軌跡間の距離を算出してもよい。図10Aでは、2つの軌跡の始点の領域同士、終点の領域同士が互いに対応付けられ、始点と終点との間の領域は互いに均等に対応付けられた例が示されている。図10Bでは、軌跡1を構成する各領域と、それぞれの領域に最も近い軌跡2の領域とが互いに対応付けられた例が示されている。 9, when the number of regions included in the two trajectories is the same, all the regions constituting the two trajectories are associated with each other, and the distance between the center points is calculated. When the number of regions included in the two trajectories is different, as in the example shown in FIG. 10, one region of one trajectory may be associated with multiple regions of the other trajectory as in FIG. 10A, or some regions may not be associated as shown in FIG. 10B. The distance between the trajectories may also be calculated using a known technique, two-dimensional DTW (Dynamic Time Warping). FIG. 10A shows an example in which the regions of the start points and the regions of the end points of the two trajectories are associated with each other, and the regions between the start points and the end points are evenly associated with each other. FIG. 10B shows an example in which each region constituting trajectory 1 is associated with the region of trajectory 2 closest to each region.

工程(3)において、軌跡1,2,3からなる仮のクラスタ1の中で、軌跡2が新たなmedoidsとされたとする。また、軌跡4,5,6からなる仮のクラスタ2の中で、軌跡5が新たなmedoidsとされたとする。 In step (3), trajectory 2 is assumed to be a new medoid in provisional cluster 1 consisting of trajectories 1, 2, and 3. Also, in provisional cluster 2 consisting of trajectories 4, 5, and 6, trajectory 5 is assumed to be a new medoid.

工程(4)において、工程(3)で新たにmedoidsとされた軌跡があるため、工程(2)に戻り、今後は軌跡2および軌跡5と他の軌跡との距離が算出され、新たに仮のクラスタ分類が行われる。 In step (4), since there are trajectories that were newly designated as medoids in step (3), the process returns to step (2), and from now on, the distances between trajectories 2 and 5 and the other trajectories are calculated, and new provisional cluster classification is performed.

このような工程が繰り返されることにより、軌跡のクラスタリングが行われる。図7に示す例では、最終的に、軌跡2,5がそれぞれmedoidsとなり、軌跡1~6は、軌跡1,2,3からなるクラスタ1と、軌跡4,5,6からなるクラスタ2とに分類される。 By repeating this process, the trajectories are clustered. In the example shown in Figure 7, trajectories 2 and 5 are finally classified as medoids, and trajectories 1 to 6 are classified into cluster 1 consisting of trajectories 1, 2, and 3, and cluster 2 consisting of trajectories 4, 5, and 6.

なお、上述した例では、クラスタリング部31が、クラスタリングの手法としてk-medoidsを採用した例について説明した。本開示では、クラスタリング部は、例えばk個の仮のクラスタの中心点(centroids)と他の点との距離が最小となるようにcentroidsを更新し続ける手法(k-means)など、他の既知のクラスタリング手法を採用してもよい。 In the above example, the clustering unit 31 employs k-medoids as the clustering method. In the present disclosure, the clustering unit may employ other known clustering methods, such as k-means, a method in which the centroids of k temporary clusters are continually updated so that the distance between the centroids and other points is minimized.

経路設定部32は、クラスタリング部31が分類したクラスタ毎に、代表的な軌跡を選出し、選出した軌跡を、移動する物体を計数対象とする経路に設定する。 The route setting unit 32 selects a representative trajectory for each cluster classified by the clustering unit 31, and sets the selected trajectory as a route for counting moving objects.

経路設定部32がクラスタ毎に代表的な軌跡を選出する方法としては、例えば以下のような方法が採用されうる。 The route setting unit 32 may use the following method to select a representative trajectory for each cluster:

第1の方法として、クラスタリング部31がクラスタリングの手法としてk-medoidsまたはk-meansを用いた場合、最終的にmedoidsまたはcentroidsとなった軌跡を選出する方法がある。medoidsはクラスタに属する全軌跡の中で最も中央に近い位置に位置する軌跡であり、centroidsはクラスタ内の全ての軌跡の平均に近い位置に位置する軌跡である。このため、第1の方法により、各クラスタ内で中央値または平均値に近い軌跡を代表的な軌跡として選出することができる。 As a first method, when the clustering unit 31 uses k-medoids or k-means as a clustering method, there is a method of selecting trajectories that ultimately become medoids or centroids. Medoids are trajectories that are located closest to the center of all trajectories belonging to a cluster, and centroids are trajectories that are located closest to the average of all trajectories in the cluster. Therefore, by using the first method, a trajectory that is close to the median or average value within each cluster can be selected as a representative trajectory.

第2の方法として、各クラスタに分類される軌跡のうち、少なくともいずれかを表示部34に表示し、操作部33を介したユーザーの操作に基づいて軌跡を選出する方法がある。第2の方法において、各クラスタに含まれる軌跡の数が多い場合、全ての軌跡を表示部34に表示させるのではなく、クラスタリングにおいて最終的なmedoidsまたはcentroidsに近い所定数(2~3個)の軌跡のみを表示させることが、ユーザーの負荷低減の観点からより好ましい。 A second method is to display at least one of the trajectories classified into each cluster on the display unit 34, and select a trajectory based on the user's operation via the operation unit 33. In the second method, when the number of trajectories included in each cluster is large, it is more preferable from the viewpoint of reducing the load on the user to display only a predetermined number (2 to 3) of trajectories that are close to the final medoids or centroids in the clustering, rather than displaying all of the trajectories on the display unit 34.

経路設定部32は、第1の方法または第2の方法を用いて選出した軌跡を、移動する物体を計数対象とする経路として設定し、表示部34に表示させる。経路設定部32は、表示部34に表示された経路を見たユーザーが、操作部33を介して経路を修正する操作を行った場合、当該操作に基づいて経路を修正すればよい。 The route setting unit 32 sets the trajectory selected using the first method or the second method as a route for counting moving objects, and displays it on the display unit 34. When a user who has viewed the route displayed on the display unit 34 performs an operation to modify the route via the operation unit 33, the route setting unit 32 may modify the route based on the operation.

操作部33は、例えばマウス、トラックボール、タッチパッド、ボタン、キーボードなどの各種操作デバイスである。表示部34は、液晶ディスプレイ、有機ELディスプレイ、CRTディスプレイ等の各種表示デバイスである。設定装置3は、操作部33としてのタッチパッドと、表示部34としての液晶ディスプレイまたは有機ELディスプレイとが重ね合わされたタッチパネルを有していてもよい。 The operation unit 33 is, for example, various operation devices such as a mouse, a trackball, a touch pad, a button, a keyboard, etc. The display unit 34 is, for example, various display devices such as a liquid crystal display, an organic EL display, a CRT display, etc. The setting device 3 may have a touch panel in which a touch pad as the operation unit 33 and a liquid crystal display or an organic EL display as the display unit 34 are superimposed.

記憶部35は、設定装置3の動作に必要な各種情報、具体的には軌跡情報、経路情報、および各機能構成を実現するためのプログラムなどを記憶する。 The memory unit 35 stores various information necessary for the operation of the setting device 3, specifically, trajectory information, route information, and programs for implementing each functional configuration.

なお、画像の撮像領域内を移動する物体が複数種類(例えば人とロボット、または自転車と自動車、など)ある場合、設定装置3は、物体の種類毎に経路を設定するようにしてもよい。具体例を挙げると、設定装置3は、撮像範囲として道路を含む画像において、人、自転車、または自動車のそれぞれに対する経路を、別々に設定してもよい。 When there are multiple types of objects moving within the imaging area of the image (e.g., people and robots, or bicycles and automobiles, etc.), the setting device 3 may set a route for each type of object. As a specific example, in an image that includes a road as an imaging range, the setting device 3 may set separate routes for people, bicycles, and automobiles.

設定装置3は、設定した経路を示す経路情報を計数装置4に出力する。 The setting device 3 outputs route information indicating the set route to the counting device 4.

<計数装置4>
計数装置4は、設定装置3が経路を設定した後、経路情報に基づいて、経路を移動する物体を計数する。
<Counting device 4>
After the setting device 3 sets the route, the counting device 4 counts the number of objects moving along the route based on the route information.

図11は、計数装置4が備える機能構成について説明するための図である。計数装置4は、判定部41と、計数部42と、操作部43と、表示部44と、記憶部45と、を備える。計数装置4は、軌跡生成装置2および設定装置3と同様に、ハードウェアまたはソフトウェア的に各種機能を実現すればよい。 FIG. 11 is a diagram for explaining the functional configuration of the counting device 4. The counting device 4 includes a determination unit 41, a counting unit 42, an operation unit 43, a display unit 44, and a storage unit 45. The counting device 4 may realize various functions in a hardware or software manner, similar to the trajectory generating device 2 and the setting device 3.

判定部41は、軌跡生成装置2から取得した複数の軌跡情報および設定装置3から取得した経路情報に基づいて、物体の軌跡が設定された経路と一致するか否かを判定する。 The determination unit 41 determines whether the object's trajectory matches the set path based on multiple pieces of trajectory information acquired from the trajectory generating device 2 and the path information acquired from the setting device 3.

判定部41が、軌跡と経路とが一致するか否かを判定する方法としては、例えば以下のような方法が採用されうる。判定部41は、経路毎に、全ての軌跡との類似度を算出する。そして、判定部41は、軌跡毎に、類似度が所定の閾値より高いか否かを判定する。判定部41は、類似度が所定の閾値より高い全ての軌跡が、経路と一致すると判定すればよい。 As a method for the determination unit 41 to determine whether or not a trajectory and a route match, for example, the following method can be adopted. The determination unit 41 calculates the similarity between each route and all trajectories. Then, the determination unit 41 determines whether or not the similarity is higher than a predetermined threshold for each trajectory. The determination unit 41 may determine that all trajectories whose similarity is higher than the predetermined threshold match the route.

判定部41は、経路情報が示す経路と、軌跡情報が示す軌跡との距離を類似度とすればよい。経路と軌跡との距離は、図9および図10において説明した、軌跡同士の距離を算出する場合と同様の方法で算出することができる。 The determination unit 41 may determine the distance between the route indicated by the route information and the trajectory indicated by the trajectory information as the similarity. The distance between the route and the trajectory may be calculated in the same manner as in the case of calculating the distance between the trajectories described in FIG. 9 and FIG. 10.

計数部42は、設定装置3で設定された経路を移動した物体を計数する。より具体的には、計数部42は、判定部41によって経路との類似度が所定の閾値より高いと判定された軌跡を移動した物体(すなわち経路を移動した物体)を計数する。これにより、画像生成装置1が撮像する範囲内を移動する物体が、どの経路をどれだけ通って移動しているか、を精度よく計数することができる。計数部42は、計数した結果を示す計数結果情報を記憶部45に記憶させるとともに、表示部44に表示させる。 The counting unit 42 counts the objects that have moved along the path set by the setting device 3. More specifically, the counting unit 42 counts the objects that have moved along a trajectory that has been determined by the determination unit 41 to have a similarity to the path higher than a predetermined threshold (i.e., objects that have moved along a path). This makes it possible to accurately count which path and how much of an object moving within the range captured by the image generating device 1 has moved. The counting unit 42 stores counting result information indicating the counting result in the memory unit 45 and displays it on the display unit 44.

操作部43は、例えばマウス、トラックボール、タッチパッド、ボタン、キーボードなどの各種操作デバイスである。表示部44は、液晶ディスプレイ、有機ELディスプレイ、CRTディスプレイ等の各種表示デバイスである。計数装置4は、操作部43としてのタッチパッドと、表示部44としての液晶ディスプレイまたは有機ELディスプレイとが重ね合わされたタッチパネルを有していてもよい。 The operation unit 43 is, for example, various operation devices such as a mouse, a trackball, a touch pad, a button, a keyboard, etc. The display unit 44 is, for example, various display devices such as a liquid crystal display, an organic EL display, a CRT display, etc. The counting device 4 may have a touch panel in which a touch pad as the operation unit 43 and a liquid crystal display or an organic EL display as the display unit 44 are superimposed.

記憶部45は、計数装置4の動作に必要な各種情報、具体的には軌跡情報、経路情報、計数結果情報、および各機能構成を実現するためのプログラムなどを記憶する。 The memory unit 45 stores various information necessary for the operation of the counting device 4, specifically, trajectory information, route information, counting result information, and programs for implementing each functional configuration.

[計数システム100の動作例]
<全体動作>
図12は、計数システム100の全体の動作例を説明するためのフローチャートである。図12に示すように、ステップS1は設定フェーズであり、設定装置3が経路の設定を行う。そして、ステップS2は計数フェーズであり、計数装置4が経路に沿って移動する物体を計数する。ステップS2の計数フェーズは、例えば所定時間毎に繰り返し実行される。
[Operation example of counting system 100]
<Overall operation>
Fig. 12 is a flowchart for explaining an example of the overall operation of the counting system 100. As shown in Fig. 12, step S1 is a setting phase, in which the setting device 3 sets a route. Then, step S2 is a counting phase, in which the counting device 4 counts objects moving along the route. The counting phase of step S2 is executed repeatedly, for example, at predetermined time intervals.

例えば計数システム100の設置場所が変更された場合などには、ステップS1の設定フェーズが改めて行われることになる。 For example, if the installation location of the counting system 100 is changed, the setting phase of step S1 will be performed again.

なお、ステップS1の設定フェーズにおいて計数装置4は動作せず、ステップS2の計数フェーズにおいて設定装置3は動作しなくてもよい。ただし、本開示はこれに限定されず、例えば一度設定フェーズにおいて経路が設定され、計数フェーズが開始された後に、例えば所定時間経過後に再度設定フェーズが実行されて経路が再設定されてもよい。また、設定フェーズと計数フェーズとが常時平行して実行され、経路が実時間で更新され続けてもよい。 Note that the counting device 4 does not have to operate in the setting phase of step S1, and the setting device 3 does not have to operate in the counting phase of step S2. However, the present disclosure is not limited to this, and for example, after a route is set once in the setting phase and the counting phase is started, the setting phase may be executed again, for example, after a predetermined time has elapsed, to reset the route. Also, the setting phase and the counting phase may be executed in parallel at all times, and the route may be continuously updated in real time.

<設定フェーズにおける動作>
図13は、計数システム100の設定フェーズにおける設定装置3の動作例を説明するためのフローチャートである。
<Operation during the configuration phase>
FIG. 13 is a flowchart for explaining an example of the operation of the setting device 3 in the setting phase of the counting system 100.

ステップS11において、設定装置3は、軌跡生成装置2から所定期間における複数の軌跡情報を取得する。 In step S11, the setting device 3 acquires multiple pieces of trajectory information for a predetermined period from the trajectory generating device 2.

ステップS12において、設定装置3は、所定期間における複数の軌跡を所定数のクラスタにクラスタリングする。 In step S12, the setting device 3 clusters the multiple trajectories over a specified period into a specified number of clusters.

ステップS13において、設定装置3は、クラスタ毎に代表的な軌跡を選出する。 In step S13, the setting device 3 selects a representative trajectory for each cluster.

ステップS14において、設定装置3は、選出した軌跡を経路に設定し、経路情報を生成する。生成された経路情報は、計数装置4に出力される。 In step S14, the setting device 3 sets the selected trajectory as a route and generates route information. The generated route information is output to the counting device 4.

<計数フェーズにおける動作>
図14は、計数システム100の計数フェーズにおける計数装置4の動作例を説明するためのフローチャートである。
<Counting Phase Operation>
FIG. 14 is a flowchart for explaining an example of the operation of the counting device 4 in the counting phase of the counting system 100.

ステップS21において、計数装置4は、設定装置3から経路情報を取得する。なお、計数装置4は、経路情報を一度取得した後、新たな経路情報が設定装置3により生成されるまでは、本ステップを改めて実行しなくてもよい。 In step S21, the counting device 4 acquires the route information from the setting device 3. After acquiring the route information once, the counting device 4 does not need to execute this step again until new route information is generated by the setting device 3.

ステップS22において、計数装置4は、軌跡生成装置2から新たな軌跡情報を取得する。なお、本明細書において、新たな軌跡情報とは、計数フェーズにおける軌跡情報を意味しており、設定フェーズにおける軌跡情報とは区別される。 In step S22, the counting device 4 acquires new trajectory information from the trajectory generating device 2. Note that in this specification, new trajectory information refers to trajectory information in the counting phase, and is distinguished from trajectory information in the setting phase.

ステップS23において、計数装置4は、経路情報が示す経路と軌跡情報が示す軌跡との類似度を、軌跡毎に算出する。 In step S23, the counting device 4 calculates the similarity between the route indicated by the route information and the trajectory indicated by the trajectory information for each trajectory.

ステップS24において、計数装置4は、類似度が閾値より高い軌跡を計数する。計数の結果は、経路を移動した物体の数を示している。これにより、計数装置4は、設定フェーズにおいて設定された経路を移動する物体を精度よく計数することができる。 In step S24, the counting device 4 counts the trajectories whose similarity is higher than a threshold value. The counting result indicates the number of objects that have moved along the path. This allows the counting device 4 to accurately count the objects that move along the path set in the setting phase.

以上説明したように、本開示の計数システムによれば、設定装置が、設定フェーズにおいて、クラスタリングにより複数の軌跡を少なくとも1つのクラスタに分類した上で、クラスタ毎に代表的な軌跡を、移動する物体を計数対象とする経路に設定した上で、計数フェーズにおいて、計数装置が、経路を移動する物体を計数する。 As described above, according to the counting system of the present disclosure, in the setting phase, the setting device classifies multiple trajectories into at least one cluster by clustering, and then sets a representative trajectory for each cluster as a path for counting moving objects. In the counting phase, the counting device counts the objects moving along the path.

これにより、多数の画像から多数の軌跡が生成された場合でも、設定装置が自動的に経路を設定することができるので、ユーザーが多数の軌跡の中から経路を選択する場合と比較して、ユーザーの負担を大幅に軽減することができる。 This allows the setting device to automatically set a route even when multiple trajectories are generated from multiple images, significantly reducing the burden on the user compared to when the user selects a route from multiple trajectories.

また、設定装置は、複数の軌跡をクラスタリングし、各クラスタの代表的な軌跡を経路に設定するため、物体を計数することによる効果がより高い経路を適切に設定することができる。特に、クラスタリングの手法としてk-medoidsやk-meansなどの既知の手法を採用することにより、クラスタ毎の中央値または平均値に近い軌跡を適切に選出することができる。クラスタ毎の中央値または平均値に近い軌跡は、全ての軌跡の中でも、多くの物体が移動した可能性が高い軌跡であるため、このような軌跡を経路として設定することにより、クラスタ毎の周辺に位置する軌跡を経路として設定した場合と比較して、経路を移動する物体を計数することによる効果を高めることができる。 The setting device also clusters multiple trajectories and sets a representative trajectory of each cluster as a route, making it possible to appropriately set a route that is more effective in counting objects. In particular, by adopting known methods such as k-medoids and k-means as the clustering method, it is possible to appropriately select a trajectory that is close to the median or average value for each cluster. A trajectory that is close to the median or average value for each cluster is a trajectory that is likely to have been traveled by many objects among all the trajectories, so by setting such a trajectory as a route, it is possible to increase the effect of counting objects moving along the route compared to when a trajectory located in the periphery of each cluster is set as a route.

[変形例]
以上、本開示の実施の形態について説明したが、本開示は上述した実施の形態には限定されず、種々の変形を取りうる。
[Modification]
Although the embodiments of the present disclosure have been described above, the present disclosure is not limited to the above-described embodiments and may be modified in various ways.

上述した実施の形態において、設定装置3がクラスタリングする際、クラスタ数については計数システム100のユーザーが設定した値を採用していた。本開示に係る計数システムは、例えばクラスタ数を様々な数に設定して実際に経路を設定し、その経路を用いて計数した結果に基づいて、適切なクラスタ数を自動的に判別する機能を有していてもよい。具体的には、本開示の計数システムは、様々なクラスタ数を設定して設定装置に経路を設定させ、その経路を用いて計数装置が計数した結果を評価し、評価が最もよいクラスタ数を移行の設定フェーズにおけるクラスタ数として採用してもよい。 In the above-described embodiment, when the setting device 3 performs clustering, the number of clusters used is a value set by the user of the counting system 100. The counting system according to the present disclosure may have a function of automatically determining an appropriate number of clusters based on the results of counting using the route, for example by setting the number of clusters to various numbers and actually setting a route. Specifically, the counting system according to the present disclosure may set various numbers of clusters and have the setting device set a route, evaluate the results of counting by the counting device using the route, and use the number of clusters with the highest evaluation as the number of clusters in the transition setting phase.

本開示は、移動する物体を計数する経路を設定する設定装置に有用である。 The present disclosure is useful for setting devices that set paths for counting moving objects.

100 計数システム
1 画像生成装置
2 軌跡生成装置
21 画像取得部
22 領域設定部
23 物体検出部
24 物体追跡部
25 軌跡生成部
26 操作部
27 表示部
28 記憶部
3 設定装置
31 クラスタリング部
32 経路設定部
33 操作部
34 表示部
35 記憶部
4 計数装置
41 判定部
42 計数部
43 操作部
44 表示部
45 記憶部
REFERENCE SIGNS LIST 100 Counting system 1 Image generating device 2 Trajectory generating device 21 Image acquiring section 22 Area setting section 23 Object detecting section 24 Object tracking section 25 Trajectory generating section 26 Operation section 27 Display section 28 Memory section 3 Setting device 31 Clustering section 32 Path setting section 33 Operation section 34 Display section 35 Memory section 4 Counting device 41 Determination section 42 Counting section 43 Operation section 44 Display section 45 Memory section

Claims (12)

移動する物体を計数する経路を設定する設定装置であって、
物体が移動する軌跡を示す軌跡情報に基づいて、複数の前記軌跡をクラスタリングにより所定数のクラスタに分類するクラスタリング部と、
前記クラスタ毎に前記経路を設定する経路設定部と、
を備える、設定装置。
A setting device for setting a path for counting a moving object, comprising:
a clustering unit that classifies a plurality of trajectories into a predetermined number of clusters by clustering based on trajectory information indicating trajectories along which an object moves;
a route setting unit that sets the route for each of the clusters;
A setting device comprising:
前記経路設定部は、前記クラスタに含まれる前記軌跡同士の距離に基づいて前記複数の軌跡から選択した軌跡を前記経路に設定する、
請求項1に記載の設定装置。
the route setting unit sets, as the route, a trajectory selected from the plurality of trajectories based on a distance between the trajectories included in the cluster;
The setting device according to claim 1 .
前記経路設定部は、前記クラスタに含まれる前記軌跡の中で、他の全ての軌跡からの前記距離の合計が最小となる軌跡を前記経路として設定する、
請求項2に記載の設定装置。
the route setting unit sets, as the route, a trajectory among the trajectories included in the cluster, the trajectory having the smallest sum of the distances from all other trajectories;
The setting device according to claim 2 .
前記経路を修正する操作を受け付ける操作部をさらに備え、
前記経路設定部は、前記操作に基づいて、設定した前記経路を修正する、
請求項1に記載の設定装置。
An operation unit that accepts an operation to correct the route is further provided,
The route setting unit modifies the set route based on the operation.
The setting device according to claim 1 .
移動する物体を撮影し画像を生成する画像生成装置と、
前記画像に基づいて前記軌跡情報を生成する軌跡生成装置と、
所定期間における前記軌跡情報に基づいて前記経路を設定する請求項1に記載の設定装置と、
前記所定期間より後に新たに取得された軌跡情報に基づいて、前記経路に沿って移動した前記物体を計数する計数装置と、
を備える、計数システム。
An image generating device that captures an image of a moving object and generates an image of the object;
a trajectory generating device that generates the trajectory information based on the image;
The setting device according to claim 1 , wherein the route is set based on the trajectory information for a predetermined period of time;
A counting device that counts the number of objects that have moved along the path based on trajectory information newly acquired after the predetermined period of time;
A counting system comprising:
前記計数装置は、
前記新たに取得された軌跡情報が示す軌跡と、前記経路との類似度が閾値より高いか否かを判定する判定部と、
前記類似度が前記閾値より高いと判定された軌跡を移動した前記物体の数を計数する計数部と、
を有する、請求項5に記載の計数システム。
The counting device is
a determination unit that determines whether a similarity between the trajectory indicated by the newly acquired trajectory information and the route is higher than a threshold;
a counting unit that counts the number of the objects that have moved along a trajectory for which the similarity is determined to be higher than the threshold;
6. The counting system of claim 5, further comprising:
前記軌跡生成装置は、
移動する物体を撮影した画像内に複数の領域を設定する領域設定部と、
前記複数の領域のうち、前記物体が通過した前記軌跡が含まれる領域を示す情報を前記軌跡情報として生成する軌跡生成部と、
をさらに備える、請求項6に記載の計数システム。
The trajectory generating device is
A region setting unit that sets a plurality of regions within an image of a moving object;
a trajectory generating unit that generates, as the trajectory information, information indicating an area including the trajectory through which the object has passed, among the plurality of areas;
The counting system of claim 6 further comprising:
前記複数の領域は、前記画像を格子状に区切った領域である、
請求項7に記載の計数システム。
The plurality of regions are regions obtained by dividing the image into a grid pattern.
8. The counting system according to claim 7.
前記軌跡生成部は、前記軌跡の始点から終点までの間に含まれる前記領域の数が閾値未満である場合、前記軌跡情報を生成しない、
請求項7に記載の計数システム。
the trajectory generation unit does not generate the trajectory information when the number of the regions included between the start point and the end point of the trajectory is less than a threshold value;
8. The counting system according to claim 7.
前記軌跡生成部は、前記軌跡の始点または終点が、前記複数の領域のうちの特定領域に該当しない場合、前記軌跡情報を生成しない、
請求項7に記載の計数システム。
the trajectory generation unit does not generate the trajectory information when a start point or an end point of the trajectory does not correspond to a specific area among the plurality of areas;
8. The counting system according to claim 7.
所定の経路を移動した物体を計数対象とするとき、前記経路を設定する設定装置が備えるコンピューターが実行する設定方法であって、
前記コンピューターが、
物体が移動する軌跡を示す軌跡情報を取得し、
複数の前記軌跡情報に基づいて、クラスタリングにより前記軌跡を所定数のクラスタに分類し、
分類された前記クラスタ毎に所定数の選択軌跡を選出し、前記選択軌跡に基づいて前記経路を設定する、
設定方法。
A setting method executed by a computer included in a setting device for setting a predetermined path when counting an object that has moved along the path, comprising:
The computer,
Acquire trajectory information indicating a trajectory along which an object moves;
classifying the trajectories into a predetermined number of clusters by clustering based on a plurality of pieces of trajectory information;
selecting a predetermined number of selection trajectories for each of the classified clusters, and setting the route based on the selection trajectories;
Setting method.
所定の経路を移動した物体を計数対象とするとき、前記経路を設定する設定装置が備えるコンピューターにより実行されるプログラムであって、
物体が移動する軌跡を示す軌跡情報を取得し、
複数の前記軌跡情報に基づいて、クラスタリングにより前記軌跡を所定数のクラスタに分類し、
分類された前記クラスタ毎に所定数の選択軌跡を選出し、前記選択軌跡に基づいて前記経路を設定する、
手順を前記コンピューターに実行させる、プログラム。
A program executed by a computer included in a setting device for setting a predetermined path when counting an object that has moved along the predetermined path,
Acquire trajectory information indicating a trajectory along which an object moves;
classifying the trajectories into a predetermined number of clusters by clustering based on a plurality of pieces of trajectory information;
selecting a predetermined number of selection trajectories for each of the classified clusters, and setting the route based on the selection trajectories;
A program that causes the computer to execute the procedure.
JP2023006729A 2023-01-19 2023-01-19 Setting device, counting system, setting method, and program Pending JP2024102674A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023006729A JP2024102674A (en) 2023-01-19 2023-01-19 Setting device, counting system, setting method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2023006729A JP2024102674A (en) 2023-01-19 2023-01-19 Setting device, counting system, setting method, and program

Publications (1)

Publication Number Publication Date
JP2024102674A true JP2024102674A (en) 2024-07-31

Family

ID=91968647

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023006729A Pending JP2024102674A (en) 2023-01-19 2023-01-19 Setting device, counting system, setting method, and program

Country Status (1)

Country Link
JP (1) JP2024102674A (en)

Similar Documents

Publication Publication Date Title
JP6646176B1 (en) Autonomous store tracking system
US10915131B2 (en) System and method for managing energy
US9934447B2 (en) Object detection and classification
US10410048B2 (en) System and method for detecting, tracking and counting human objects of interest using a counting system and a data capture device
US20180300887A1 (en) System and process for detecting, tracking and counting human objects of interest
US20120020518A1 (en) Person tracking device and person tracking program
US10963893B1 (en) Personalized decision tree based on in-store behavior analysis
EP3355282B1 (en) System and method for detecting, tracking and counting human objects of interest using a counting system and a data capture device
JP2004534315A (en) Method and system for monitoring moving objects
US10936859B2 (en) Techniques for automatically identifying secondary objects in a stereo-optical counting system
CN112513870B (en) Systems and methods for detecting, tracking, and counting human subjects of interest using improved height calculations
JP4753975B2 (en) Product interest level measuring device
JP6912842B1 (en) Information processing equipment, information processing methods, and information processing programs
WO2022059223A1 (en) Video analyzing system and video analyzing method
JP2024102674A (en) Setting device, counting system, setting method, and program
JP6272158B2 (en) Human flow analysis system
WO2024111474A1 (en) Counting device, counting system, counting method, and program
Reddy et al. Crowd Control and Monitoring using Deep Learning
US12143756B2 (en) Multi-camera person re-identification
Lee et al. Understanding human-place interaction from tracking and identification of many users

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20250626