Setting device, counting system, setting method, and program
The setting device and method address the challenge of selecting counting paths in facilities with multiple movement paths by clustering trajectories and setting paths based on trajectory information, improving counting accuracy and usability.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- KONICA MINOLTA INC
- Filing Date
- 2023-01-19
- Publication Date
- 2026-07-29
AI Technical Summary
In facilities with multiple movement paths, determining which paths to count for effective information gathering is challenging due to the difficulty in selecting appropriate counting targets.
A setting device and method that classify trajectories into clusters using clustering techniques like k-medoids or k-means, and set paths based on trajectory information to count moving objects effectively.
Enables appropriate path setting for counting, enhancing the accuracy and usability of counting results by automating the selection of representative trajectories as counting paths.
Smart Images

Figure 0007896501000001 
Figure 0007896501000002 
Figure 0007896501000003
Abstract
Description
Technical Field
[0001] The present disclosure relates to a setting device for setting a path for counting an object, a counting system, a setting method, and a program.
Background Art
[0002] In various facilities such as stores, technologies for counting objects (such as people) moving within the facility have been developed. For example, Patent Document 1 discloses a people counting device that measures the number of people who have passed through a measurement area set within an image of a store or facility. Patent Document 2 discloses an image processing system that can calculate an appropriate number of people when calculating the number of people who have passed through a predetermined position.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Patent Document 2
Summary of the Invention
Problems to be Solved by the Invention
[0004] For example, in a store, by counting customers moving along each passage and analyzing the counting results, information useful for store operation may be obtained. Therefore, when there are multiple movement paths in a facility, there is a desire to count the objects moving along each path.
[0005] When there are multiple paths in a facility, in order to obtain more effective information, it is desirable to set the path with a large number of moving objects as the path to be counted. However, when the number of paths existing in the facility is large, it is difficult to determine which path is appropriate to be the counting target.
[0006] This disclosure aims to provide a setting device, a counting system, a setting method, and a program that can appropriately set a path for counting moving objects. [Means for solving the problem]
[0007] A setting device according to one aspect of the present disclosure is a setting device for setting a path for counting moving objects, comprising: 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 moving object; and for each of the clusters Based on the trajectories included in the cluster, objects that moved along the path are to be counted. The system includes a route setting unit for setting the aforementioned route. Furthermore, a setting device according to one aspect of the present disclosure is a setting device for setting a path for counting moving objects, comprising: 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 movement of the object; and a path setting unit that sets the path for each cluster, wherein the path setting unit sets a trajectory selected from the plurality of trajectories based on the distance between the trajectories included in the cluster as the path.
[0008] A counting system according to one aspect of this disclosure includes an image generating device that photographs a moving object and generates an image, a trajectory generating device that generates trajectory information based on the image, and a system that sets the path based on the trajectory information over a predetermined period. the above The system includes a setting device and a counting device that counts the objects that have moved along the path based on trajectory information newly acquired after the predetermined period.
[0009] A setting method according to one aspect of the present disclosure is a setting method performed by a computer in a setting device that sets a path, when an object that has moved along a predetermined path is to be counted, wherein the computer acquires path information indicating the trajectory of the object's movement, classifies the trajectory into a predetermined number of clusters by clustering based on a plurality of such trajectory information, and for each of the classified clusters , for counting objects that have moved along the aforementioned path Set the aforementioned route.
[0010] A program according to one aspect of the present disclosure is a program that is executed by a computer in a setting device that sets a predetermined path, when an object that has moved along a predetermined path is to be counted, and acquires trajectory information showing the path the object has traveled, classifies the trajectory into a predetermined number of clusters by clustering based on a plurality of such trajectory information, and for each of the classified clusters , for counting objects that have moved along the aforementioned pathCause the computer to execute the procedure for setting the path.
Advantages of the Invention
[0011] An appropriate path for counting a moving object can be set.
Brief Description of the Drawings
[0012] [Figure 1] Diagram for explaining the overall configuration of the counting system [Figure 2] Diagram for explaining the functional configuration of the trajectory generation device [Figure 3] Diagram showing how the image acquisition unit sets a plurality of regions in an image [Figure 4] Diagram showing how the trajectory generation unit generates trajectory information [Figure 5] Diagram for explaining trajectory information when the same object passes through the same region multiple times [Figure 6] Diagram for explaining the functional configuration of the setting device [Figure 7] Diagram for explaining a specific example of a trajectory [Figure 8] Conceptual diagram showing that Trajectory 1 and Trajectory 4 are used as medoids [Figure 9] Diagram showing how to calculate the distance between Trajectory 1 and Trajectory 2 [Figure 10] Diagram showing how to calculate the distance between Trajectory 1 and Trajectory 5 [Figure 11] Diagram for explaining the functional configuration of the counting device [Figure 12] Flowchart for explaining an overall operation example of the counting system [Figure 13] Flowchart for explaining an operation example of the setting device in the setting phase of the counting system [Figure 14] Flowchart for explaining an operation example of the counting device in the counting phase of the counting system
Modes for Carrying Out the Invention
[0013] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. However, the scope of the invention is not limited to the illustrated examples. In the following description, those having the same functions and configurations are denoted by the same reference numerals, and the description thereof will be omitted.
[0014] Hereinafter, the 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 path. Examples of the predetermined range include various facilities such as retail stores, banks, stations, factories, etc., or roads such as public roads, private roads, crosswalks, etc., entrances and exits of houses, corridors of apartment buildings, etc. Examples of the objects detected by the counting system 100 include, for example, people, animals, mobile robots, automobiles, or bicycles.
[0015] <Overall Configuration of Counting System 100> FIG. 1 is a diagram for explaining the overall configuration of the counting system 100. The counting system 100 includes an image generation device 1, a trajectory generation device 2, a setting device 3, and a counting device 4.
[0016] The counting system 100 operates differently in each of a setting phase in which a path for counting moving objects is set during a predetermined period before actual counting starts, and a counting phase in which actual counting is performed using the path set in the setting phase. In the present disclosure, the path is a path along which when an object moves, the counting device 4 counts the object.
[0017] The setting phase is a phase in which the setting device 3 determines the path after the system is installed and before the counting by the counting device 4 starts. On the other hand, the counting phase is a phase in which the counting device 4 actually performs counting using the set path after the path is set.
[0018] The image generation device 1 is, for example, a camera installed in various locations inside and outside the facility. The counting system 100 may have multiple cameras. One or more image generation devices 1 are installed in positions that allow them to capture images of the movable range of the object that the user of the counting system 100 wants to count. As a result, the image generation device 1 can generate images of one or more ranges.
[0019] The following describes the case where the imaging range of the image generation device 1 is fixed, but in this disclosure, the imaging range of the image generation device 1 may change over time. For example, the image generation device 1 may have a pan / tilt function.
[0020] As a specific example, the image generating device 1 is installed in a position that can capture an area including at least a portion of the aisle where the store's display shelves are lined up. As another example, the image generating device 1 is installed in a position that can capture an area including the store's entrance and exit. As yet another example, the image generating device 1 is installed in a position that can capture an area including the ticket gates of a train station. As yet another example, the image generating device 1 is installed in a position that can capture at least a portion of a pedestrian crossing.
[0021] The images generated by the image generation device 1 are, for example, moving images. In this disclosure, a moving image means a video containing multiple images of the same area captured at different times, arranged in chronological order. The number of images (frames) per unit of time included in a moving image is not limited in this disclosure.
[0022] The trajectory generation device 2 detects objects moving within an image based on the image generated by the image generation device 1 and generates trajectory information indicating the object's trajectory. The trajectory generation 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.
[0023] In the setting phase, the setting device 3 sets a path for counting moving objects based on trajectory information.
[0024] In the counting phase, the counting device 4 counts the objects that have moved along the path based on the new trajectory information.
[0025] In a counting system 100 with such a configuration, the setting device 3 can set an appropriate path, thereby making the counting results of the counting device 4 more useful information. The configuration and operation of the trajectory generation device 2, the setting device 3, and the counting device 4 will be described in detail below.
[0026] <Trajectory generation device 2> The trajectory generation device 2 is equipped with a CPU (Central Processing Unit), ROM (Read Only Memory), and RAM (Random Access Memory). It reads various processing programs, such as system programs, stored in ROM, expands them into RAM, and executes the expanded programs to realize various functions. The ROM is composed of non-volatile memory such as semiconductors and stores system programs and various processing programs that can be executed on the system program. These programs are stored in the form of program code that can be read by a computer, and the CPU sequentially executes operations according to the program code. The RAM forms a work area that temporarily stores various programs executed by the CPU and data related to these programs.
[0027] Figure 2 is a diagram illustrating the functional configuration of the trajectory generation device 2. The trajectory generation device 2 comprises an image acquisition unit 21, a region setting unit 22, an object detection unit 23, an object tracking unit 24, a trajectory generation unit 25, an operation unit 26, a display unit 27, and a storage unit 28. These functional configurations of the trajectory generation device 2 may be implemented in software by a program executed by a processor, or they may be implemented as hardware circuits such as integrated circuits.
[0028] 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, if the image acquisition unit 21 acquires images from multiple ranges from multiple image generation devices 1, it may integrate the images from the multiple ranges to generate a combined image.
[0029] The region setting unit 22 sets multiple regions in the image acquired by the image acquisition unit 21. Figure 3 shows how the image acquisition unit 21 sets multiple regions within an image. Figure 3A shows an example in which multiple regions A are set within a rectangular image I by dividing it with straight grid lines GL. Figure 3B shows an example in which multiple regions A are set within a circular image I by dividing it with straight or curved grid lines GL. The image I shown in Figure 3 includes three display shelves and a cash register.
[0030] The region setting unit 22 assigns identification information to each region in order to distinguish between multiple regions set in the image. In the example shown in Figure 3A, 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 increases as you move to the right in each region A. y is also set to 0 at the top left of image I and increases as you move downwards in each region A. Note that in Figure 3A, for explanatory purposes, identification information [0,0], [0,1], etc. are shown within each region, but in reality, it is not necessary for the identification information to be displayed within each region.
[0031] The region setting unit 22 may set a region using one frame of the moving image if the imaging range of the image generation device 1 is fixed. If the imaging range of the image generation device 1 changes over time, the region setting unit 22 may set a region for each frame image included in the moving image, or it may set a region for images at predetermined intervals.
[0032] When performing region setting on an integrated image obtained by integrating images of multiple ranges acquired from multiple image generation devices 1, the region setting unit 22 sets a global coordinate system for the integrated image and assigns identification information for each region based on the global coordinate system. For example, the region setting unit 22 can set the identification information for each region in the integrated image by converting the identification information for each region in the local coordinate system set for each image generation device 1 to the global coordinate system.
[0033] The region setting unit 22 can determine the size of one region to be set within the image, for example, based on the user's operation of the counting system 100.
[0034] 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 for the objects. The object detection unit 23 and the object tracking unit 24 can use known object detection and object tracking methods (for example, SORT (Simple Online and Realtime Tracking)) to detect and track objects moving within the image.
[0035] If the object detection unit 23 and the object tracking unit 24 can no longer track the same object as time passes, they terminate detection and tracking of that object.
[0036] The trajectory generation unit 25 identifies the trajectory of an object based on its time-dependent position information and generates trajectory information to show the trajectory. Figure 4 shows how the trajectory generation unit 25 generates trajectory information in image I shown in Figure 3A. Figure 4A shows the temporal transition of position information generated by the object tracking unit 24. Figure 4B shows the trajectory of the object identified by the trajectory generation unit 25 based on the position information. As shown in Figure 4B, the trajectory generation unit 25 connects the regions containing the object's position to form the object's trajectory. In Figure 4B, the region corresponding to the trajectory is indicated by a diagonal line. For explanatory purposes, in Figures 4A and 4B, numbers corresponding to the x and y values for each region are shown on the outer edge of image I.
[0037] As shown in Figures 4A and 4B, the trajectory generation unit 25 considers the multiple regions that an object has passed through as the trajectory of the object's movement. That is, the trajectory generation unit 25 identifies the combination of the multiple regions that the object has passed through as the trajectory of the object's movement. In the example shown in Figure 4B, the object's trajectory consists of regions [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], and [11,1]. The trajectory generation unit 25 generates trajectory information indicating the identified trajectory based on the identification information of these regions. The trajectory generation unit 25 may also include the order of the regions the object moved through in the trajectory information.
[0038] Figure 5 illustrates 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 movement of an object can occur, for example, when a customer, as an object, walks back and forth in front of display shelves in a store while selecting products.
[0039] In such cases, as shown in Figure 5B, the trajectory generation unit 25 identifies the trajectory of an object as if it had passed through the same region only once, even if the same object passes through the same region multiple times. In Figure 5B, an example of an identified trajectory is shown as a series of shaded regions. This avoids situations where the trajectory information becomes unnecessarily complex and reduces the amount of data for the trajectory information.
[0040] The trajectory generation unit 25 may choose not to generate trajectory information for trajectories where the length from the starting point to the ending point is less than a predetermined number, i.e., the number of regions is less than a predetermined number. This is because extremely short trajectories are highly likely to be caused by, for example, a false detection by the object detection unit 23.
[0041] Furthermore, the trajectory generation unit 25 may choose not to generate trajectory information for trajectories whose starting or ending point is not within the specified region. The specified region is the region where an object enters the imaging range from outside the imaging range of the image generation device 1, or where an object exits the imaging range from inside the imaging range to outside the imaging range. More specifically, the specified region is, for example, the region where a passage within the imaging range reaches the edge of the image. Alternatively, if there is an entrance or exit to a facility within the image, the specified region is the region corresponding to that entrance or exit.
[0042] Thus, the trajectory generation unit 25 does not generate trajectory information for trajectories whose starting or ending point is outside the specified region. The reason for this is that it is not usually possible for an object to appear and start moving outside the specified region of the imaging range, or to suddenly disappear from outside the specified region, and such trajectories are highly likely to be caused by, for example, a false detection by the object detection unit 23.
[0043] Furthermore, the trajectory generation unit 25 may choose not to generate trajectory information for objects moving within a pre-set exclusion area within the imaging range. An exclusion area is a set of areas included in the imaging range that do not require object detection. For example, if the imaging range is the interior of a small glass-walled store, the road outside the store, which is visible through the glass, may be set as an exclusion area. This is because people, bicycles, etc., moving on the road outside the store do not fall under the category of objects that should be detected inside the store.
[0044] Specific areas and excluded areas can be set as appropriate based on the user's operation of the counting system 100.
[0045] The operation unit 26 is various operation devices such as a mouse, trackball, touchpad, buttons, and keyboard. The display unit 27 is various display devices such as a liquid crystal display, an organic EL (Electro-Luminescence) display, and a CRT (Cathode Ray Tube) display. The trajectory generation device 2 may have a touch panel in which a touchpad as the operation unit 26 and a liquid crystal display or organic EL display as the display unit 27 are superimposed.
[0046] The memory unit 28 stores various information necessary for the operation of the trajectory generation device 2, specifically trajectory information and programs for realizing each functional configuration.
[0047] The trajectory generation device 2 outputs trajectory information indicating the generated trajectory to the setting device 3 and the counting device 4.
[0048] <Setting device 3> In the setting phase, the setting device 3 sets the path for which the counting device 4 will count the moving objects.
[0049] Figure 6 is a diagram illustrating the functional configuration of the setting device 3. The setting device 3 comprises a clustering unit 31, a route setting unit 32, an operation unit 33, a display unit 34, and a storage unit 35. Similar to the trajectory generation device 2, the setting device 3 can implement various functions either in hardware or software.
[0050] The clustering unit 31 performs clustering of multiple trajectories based on the trajectory information generated by the trajectory generation device 2. The clustering method used by the clustering unit 31 can employ known methods such as k-medoids or k-means.
[0051] Figure 7 is a diagram illustrating specific examples of trajectories. In Figure 7, examples of trajectories are shown by lines connecting the center points of the regions that constitute each trajectory. Figure 7 shows six trajectories, trajectories 1 to 6, as examples. Note that Figure 7 shows examples where different trajectories do not overlap, but at least parts of different trajectories may overlap. In other words, at least parts of different trajectories may be composed of the same region.
[0052] As an example, we will explain the operation of clustering trajectories 1 to 6 in Figure 7 when the clustering unit 31 uses k-medoids.
[0053] k-medoids is a method used to cluster multiple points into k clusters. k-medoids involves processes such as the following: (1) Randomly select k points from a group of points and tentatively call them the medoid. The medoid is a point within a cluster that minimizes the sum of the distances to all other points within the cluster. (2) Assign each of the k points other than the medoid to the cluster of the nearest medoid. (3) Within each cluster, the point whose sum of distances to all other points within the cluster is minimized is newly defined as the medoid. (4) If a new medoid is found in (3), return to (2); otherwise, terminate the process.
[0054] The following describes a specific example of how the above steps (1) to (4) of k-medoids can be applied to clustering of the trajectory shown in Figure 7. The number of clusters, k, can be set to an appropriate number based on, for example, the user's operation of the counting system 100. In the following example, we assume that k is set to 2.
[0055] In step (1), during the initial setup of the medoid, assume that trajectories 1 and 4 were selected from trajectories 1 to 6 shown in Figure 7. Figure 8 is a conceptual diagram showing that trajectories 1 and 4 have been designated as medoids. In Figure 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 tentatively belongs will be called cluster 1, and the cluster to which trajectory 6 tentatively belongs will be called cluster 2.
[0056] In step (2), the distances between trajectories 1 and 4, which are set as medoids, and the other trajectories 2, 3, 5, and 6 are calculated, and trajectories 2, 3, 5, and 6 are tentatively assigned to either cluster 1 or cluster 2. In the example shown in Figure 8, trajectories 2 and 3 are tentatively assigned to cluster 1, and trajectories 5 and 6 are tentatively assigned to cluster 2.
[0057] Figures 9 and 10 are conceptual diagrams illustrating the method for calculating the distance between trajectories. Figure 9 shows the process of calculating the distance between trajectory 1 and trajectory 2, as shown in Figure 7. Figure 10 shows the process of calculating the distance between trajectory 1 and trajectory 5, as shown in Figure 7. As shown in Figures 9 and 10, the distance between trajectories is calculated by associating the regions contained in each trajectory with each other, calculating the two-dimensional distance on the image between the center points of the associated regions, and then calculating the sum of the distances across all regions. In Figures 9 and 10, the arrows connect the center points of the associated regions.
[0058] As shown in the example in Figure 9, if the number of regions included in the two trajectories is the same, all regions constituting the two trajectories can be associated with each other, and the distance between their center points can be calculated. As shown in the example in Figure 10, if the number of regions included in the two trajectories is different, one region of one trajectory can be associated with multiple regions of the other trajectory, as shown in Figure 10A, or some regions may not be associated, as shown in Figure 10B. Alternatively, the distance between trajectories can be calculated using the known technique of 2D DTW (Dynamic Time Warping). Figure 10A shows an example where the regions of the starting points and ending points of the two trajectories are associated with each other, and the regions between the starting and ending points are equally associated with each other. Figure 10B shows an example where each region constituting trajectory 1 is associated with the region of trajectory 2 that is closest to each region.
[0059] In step (3), let's assume that in a hypothetical cluster 1 consisting of trajectories 1, 2, and 3, trajectory 2 is designated as a new medoid. Also, let's assume that in a hypothetical cluster 2 consisting of trajectories 4, 5, and 6, trajectory 5 is designated as a new medoid.
[0060] In step (4), since there are trajectories that were newly designated as medoids in step (3), the process returns to step (2), and the distances between trajectories 2 and 5 and the other trajectories are calculated, and a new provisional cluster classification is performed.
[0061] This process is repeated to perform clustering of the trajectories. In the example shown in Figure 7, trajectories 2 and 5 ultimately become medoids, and trajectories 1 through 6 are classified into cluster 1, consisting of trajectories 1, 2, and 3, and cluster 2, consisting of trajectories 4, 5, and 6.
[0062] In the example described above, the clustering unit 31 adopted k-medoids as the clustering method. In this disclosure, the clustering unit may adopt other known clustering methods, such as the k-means method, which continuously updates the centroids so that the distance between the center points (centroids) of k provisional clusters and other points is minimized.
[0063] 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.
[0064] The routing unit 32 may employ methods such as the following to select a representative trajectory for each cluster.
[0065] As a first method, when the clustering unit 31 uses k-medoids or k-means as the clustering method, it can select trajectories that ultimately become medoids or centroids. Medioids are trajectories located closest to the center among all trajectories belonging to a cluster, while centroids are trajectories located close to the mean of all trajectories within a cluster. Therefore, using this first method, it is possible to select trajectories close to the median or mean within each cluster as representative trajectories.
[0066] A second method involves displaying at least one of the trajectories classified into each cluster on the display unit 34 and selecting a trajectory based on user operation via the operation unit 33. In the second method, if there are many trajectories in each cluster, it is preferable from the viewpoint of reducing the user load to display only a predetermined number (2-3) of trajectories that are close to the final medoids or centroids in the clustering, rather than displaying all of them on the display unit 34.
[0067] The route setting unit 32 sets the trajectory selected using the first or second method as a route for counting moving objects and displays it on the display unit 34. If a user who has seen 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 should modify the route based on that operation.
[0068] The operation unit 33 is, for example, various operation devices such as a mouse, trackball, touchpad, buttons, and keyboard. The display unit 34 is various display devices such as a liquid crystal display, organic EL display, and CRT display. The setting device 3 may have a touch panel in which a touchpad as the operation unit 33 and a liquid crystal display or organic EL display as the display unit 34 are superimposed.
[0069] The memory unit 35 stores various information necessary for the operation of the setting device 3, specifically trajectory information, route information, and programs for realizing each functional configuration.
[0070] Furthermore, if there are multiple types of objects moving within the image imaging area (for example, people and robots, or bicycles and cars), the setting device 3 may set a separate path for each type of object. For example, in an image where the imaging range includes a road, the setting device 3 may set separate paths for people, bicycles, and cars.
[0071] The setting device 3 outputs route information indicating the set route to the counting device 4.
[0072] <Counting device 4> After the setting device 3 has set the route, the counting device 4 counts the objects moving along the route based on the route information.
[0073] Figure 11 is a diagram illustrating the functional configuration of the counting device 4. The counting device 4 comprises 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, like the trajectory generation device 2 and the setting device 3, can implement various functions in hardware or software.
[0074] The determination unit 41 determines whether the object's trajectory matches the set path based on multiple trajectory information obtained from the trajectory generation device 2 and path information obtained from the setting device 3.
[0075] The determination unit 41 may employ, for example, the following method to determine whether a trajectory matches a path. The determination unit 41 calculates the similarity between each path and all trajectories. Then, the determination unit 41 determines whether the similarity is higher than a predetermined threshold for each trajectory. The determination unit 41 only needs to determine that all trajectories with a similarity higher than the predetermined threshold match the path.
[0076] The determination unit 41 can use the distance between the path indicated by the route information and the trajectory indicated by the trajectory information as the similarity. The distance between the path and the trajectory can be calculated in the same way as when calculating the distance between trajectories, as explained in Figures 9 and 10.
[0077] The counting unit 42 counts objects that have moved along a path set by the setting device 3. More specifically, the counting unit 42 counts objects that have moved along a trajectory determined by the determination unit 41 to have a similarity to a predetermined threshold (i.e., objects that have moved along a path). This makes it possible to accurately count which paths and for how long objects moving within the range captured by the image generation device 1 are traveling. The counting unit 42 stores the counting result information, which indicates the counting result, in the storage unit 45 and also displays it on the display unit 44.
[0078] The operation unit 43 is, for example, one of various operation devices such as a mouse, trackball, touchpad, buttons, or keyboard. The display unit 44 is one of various display devices such as a liquid crystal display, an organic EL display, or a CRT display. The counting device 4 may have a touch panel in which a touchpad as the operation unit 43 and a liquid crystal display or organic EL display as the display unit 44 are superimposed.
[0079] 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 realizing each functional configuration.
[0080] [Example of operation of counting system 100] <Overall Operation> Figure 12 is a flowchart illustrating an example of the overall operation of the counting system 100. As shown in Figure 12, step S1 is the setup phase, in which the setup device 3 sets the route. Then, step S2 is the counting phase, in which the counting device 4 counts the objects moving along the route. The counting phase of step S2 is repeated, for example, at predetermined intervals.
[0081] For example, if the installation location of the counting system 100 is changed, the setting phase of step S1 will be performed again.
[0082] Furthermore, the counting device 4 does not need to operate during the setting phase of step S1, and the setting device 3 does not need to operate during the counting phase of step S2. However, this disclosure is not limited thereto, and for example, once a route is set in the setting phase and the counting phase has started, the setting phase may be executed again after a predetermined time has elapsed, and the route may be reset. 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.
[0083] <Operation during the setup phase> Figure 13 is a flowchart illustrating an example of the operation of the setting device 3 during the setting phase of the counting system 100.
[0084] In step S11, the setting device 3 acquires multiple trajectory information for a predetermined period from the trajectory generation device 2.
[0085] In step S12, the setting device 3 clusters multiple trajectories over a predetermined period into a predetermined number of clusters.
[0086] In step S13, the setting device 3 selects a representative trajectory for each cluster.
[0087] In step S14, the setting device 3 sets the selected trajectory as the route and generates route information. The generated route information is output to the counting device 4.
[0088] <Operation during the counting phase> Figure 14 is a flowchart illustrating an example of the operation of the counting device 4 during the counting phase of the counting system 100.
[0089] In step S21, the counting device 4 obtains route information from the setting device 3. Note that after the counting device 4 has obtained route information once, it does not need to perform this step again until new route information is generated by the setting device 3.
[0090] In step S22, the counting device 4 acquires new trajectory information from the trajectory generation device 2. In this specification, "new trajectory information" refers to the trajectory information in the counting phase and is distinguished from the trajectory information in the setting phase.
[0091] In step S23, the counting device 4 calculates the degree of similarity between the route indicated by the route information and the trajectory indicated by the trajectory information for each trajectory.
[0092] In step S24, the counting device 4 counts trajectories whose similarity is higher than the threshold. The counting result indicates the number of objects that have traveled along the path. This allows the counting device 4 to accurately count the objects that have traveled along the path set in the setting phase.
[0093] As described above, according to the counting system of this disclosure, in the setting phase, the setting device classifies multiple trajectories into at least one cluster by clustering, sets a representative trajectory for each cluster as a path for counting moving objects, and in the counting phase, the counting device counts the objects moving along the path.
[0094] This allows the setting device to automatically configure the route even when numerous trajectories are generated from a large number of images, significantly reducing the burden on the user compared to when the user has to select a route from among many trajectories.
[0095] Furthermore, the setting device clusters multiple trajectories and sets a representative trajectory from each cluster as the path, thereby appropriately setting paths that offer a higher effect from counting objects. In particular, by employing known clustering methods such as k-medoids and k-means, trajectories close to the median or mean of each cluster can be appropriately selected. Since trajectories close to the median or mean of each cluster are likely to be trajectories where many objects have moved, setting such trajectories as paths can enhance the effect of counting objects moving along the paths compared to setting trajectories located around each cluster as paths.
[0096] [Differentiation] Although embodiments of this disclosure have been described above, this disclosure is not limited to the embodiments described above and can take various modifications.
[0097] In the embodiment described above, when the setting device 3 performs clustering, the number of clusters was set to a value set by the user of the counting system 100. The counting system according to this disclosure may have a function to automatically determine an appropriate number of clusters based on the results of counting using the routes, for example, by setting the number of clusters to various numbers and actually setting routes. Specifically, the counting system according to this disclosure may set various numbers of clusters and have the setting device set routes, evaluate the results of counting by the counting device using those routes, and adopt the number of clusters with the best evaluation as the number of clusters in the transition setting phase. [Industrial applicability]
[0098] This disclosure is useful for setting devices that set paths for counting moving objects. [Explanation of Symbols]
[0099] 100 Counting Systems 1. Image generation device 2 Trajectory generation device 21 Image acquisition unit 22 Area setting section 23 Object detection unit 24 Object Tracking Unit 25 Trajectory generation section 26 Control section 27 Display section 28 Memory section 3. Setting device 31 Clustering section 32 Route setting section 33 Operation section 34 Display section 35 Storage section 4. Counting device 41 Judgment section 42 Counting section 43 Operation section 44 Display section 45 Storage section
Claims
1. A setting device for setting a path for counting moving objects, A clustering unit that classifies multiple trajectories into a predetermined number of clusters by clustering, based on trajectory information that shows the trajectory of an object's movement, For each cluster, a path setting unit sets a path for counting objects that have moved along the path based on the trajectory included in the cluster, A setting device equipped with the following features.
2. A setting device for setting a path for counting moving objects, A clustering unit that classifies multiple trajectories into a predetermined number of clusters by clustering, based on trajectory information that shows the trajectory of an object's movement, A route setting unit that sets the route for each cluster, Equipped with, The route setting unit sets a route selected from the plurality of trajectories based on the distance between the trajectories included in the cluster. Setting device.
3. The route setting unit sets the route the trajectory that minimizes the sum of the distances from all other trajectories among the trajectories included in the cluster. The setting device according to claim 1 or 2.
4. The system further includes an operating unit that accepts operations to modify the aforementioned route, The route setting unit modifies the set route based on the operation. The setting device according to claim 1 or 2.
5. An image generation device that photographs moving objects and generates images, A trajectory generation device that generates the trajectory information based on the aforementioned image, A setting device according to claim 1 or 2, which sets the route based on the trajectory information over a predetermined period, A counting device that counts the objects that have moved along the path based on trajectory information newly acquired after the predetermined period, A counting system equipped with [a specific feature].
6. The aforementioned counting device is A determination unit that determines whether the similarity between the trajectory indicated by the newly acquired trajectory information and the aforementioned route is higher than a threshold, A counting unit that counts the number of objects that have moved along a trajectory determined to have a similarity higher than the threshold, The counting system according to claim 5, having the following features.
7. The trajectory generation device is A region setting unit that sets multiple regions within an image of a moving object, A trajectory generation unit generates information indicating the region among the plurality of regions that includes the trajectory through which the object passed, as trajectory information, The counting system according to claim 6, further comprising the above.
8. The aforementioned multiple regions are regions obtained by dividing the image into a grid. The counting system according to claim 7.
9. The trajectory generation unit does not generate the trajectory information if the number of regions included between the start point and the end point of the trajectory is less than a threshold. The counting system according to claim 7.
10. The trajectory generation unit does not generate the trajectory information if the start or end point of the trajectory does not fall within a specific region among the plurality of regions. The counting system according to claim 7.
11. When an object that has moved along a predetermined path is to be counted, a setting method is performed by a computer in a setting device that sets the path, The aforementioned computer, Obtain trajectory information that shows the path an object is moving along, Based on the multiple pieces of trajectory information, the trajectories are classified into a predetermined number of clusters by clustering. For each of the classified clusters, a path is set for counting objects that have moved along that path. How to set it up.
12. When an object that has moved along a predetermined path is to be counted, the program is executed by a computer provided in the setting device that sets the path, Obtain trajectory information that shows the path an object is moving along, Based on the multiple pieces of trajectory information, the trajectories are classified into a predetermined number of clusters by clustering. For each of the classified clusters, a path is set for counting objects that have moved along that path. A program that causes the computer to execute a procedure.