Image processing device, image processing method, and program
The image processing device uses neural networks to estimate density and speed distributions for accurate object tracking and flow measurement, addressing the challenges of crowded scenes by generating precise movement trajectories.
Patent Information
- Application Number
- JP2020103229
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-06-15
- Publication Date
- 2024-08-22
- Estimated Expiration
- 2040-06-15
AI Technical Summary
Existing methods for tracking objects in crowded scenes suffer from decreased accuracy due to deteriorating image features and increased probability of point matching failures as the density of points increases, leading to poor object tracking precision.
An image processing device that estimates object movement using density distribution, position coordinates, speed distribution, and movement vectors based on neural networks to track objects accurately over time, even in crowded conditions.
Improves the accuracy of object tracking in crowded scenes by generating precise movement trajectories and flow measurements, enhancing the reliability of tracking and flow rate estimation.
Smart Images

Figure 0007538631000011 
Figure 0007538631000001 
Figure 0007538631000007
Abstract
Description
[Technical field]
[0001] The present invention relates to an image processing device, an image processing method, and a program, and more particularly to a technique for analyzing moving images captured by a video camera, a security camera, or the like. [Background technology]
[0002] In recent years, devices have been proposed that analyze the flow (e.g., number or direction) of objects (e.g., people) in a shooting area from video images captured by a camera or the like. In order to analyze such a flow, the person to be measured is first detected and tracked. Patent Document 1 proposes a method for tracking a person by determining whether the head in each frame is that of the same person based on the degree of agreement of the image features of the detected head. In addition, Non-Patent Document 1 discloses a method for tracking object points by associating object points detected in each frame with each other in a greedy manner. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2010-273112 A [Non-patent literature]
[0004] [Non-Patent Document 1] Khurram Shafique and Mubarak Shah. "A Non-Iterative Greedy Algorithm for Multi-frame Point Correspondence", IEEE transactions on pattern analysis and machine intelligence (2005). Summary of the Invention [Problem to be solved by the invention]
[0005] In order to measure the flow of objects with high accuracy, it is necessary to track the objects with high accuracy. In the method described in Patent Document 1, a person is tracked based on the degree of match of the image features of the head, but when the head is hidden, the quality of the image features decreases, so the degree of tracking is likely to decrease, especially in crowded scenes. In the method of matching points on different frames described in Non-Patent Document 1, if the time difference is Δt and the average moving speed of the points is v, the positions of the points will be shifted by vΔt on average. When the density of the points is small, the probability that other points exist in the surroundings vΔt of the points is small, so the matching is successful with a high probability. However, as the density of the points increases, the probability that other points appear in the surroundings vΔt of the points increases, so the matching is more likely to fail and the tracking accuracy of the points decreases.
[0006] The present invention aims to improve the accuracy of tracking objects in moving images, particularly in crowded conditions. [Means for solving the problem]
[0007] In order to achieve the object of the present invention, an image processing apparatus according to an embodiment of the present invention comprises the following arrangement: An acquisition means for acquiring a moving image; an estimation means for estimating a movement of an object during a specific period of time based on the moving image; a tracking means for generating a movement trajectory of the object over the first period and the second period by matching information indicating the movement of the object in a first period obtained by the estimation means with information indicating the movement of the object in a second period; Equipped with. Effect of the Invention
[0008] This can improve the accuracy of tracking objects in moving images, particularly in crowded conditions. [Brief description of the drawings]
[0009] [Figure 1]FIG. 2 is a diagram showing an example of a hardware configuration of an image processing apparatus. [Diagram 2] FIG. 2 is a diagram showing an example of the functional configuration of an image processing apparatus. [Diagram 3] FIG. 4 is a diagram showing an example of a processing flow of the image processing apparatus. [Figure 4] FIG. 11 is a diagram showing an example of a method for extracting a partial image from an input image. [Diagram 5] 5A and 5B are diagrams for explaining a central region and a marginal region of a partial image. [Figure 6] FIG. 13 is a diagram showing an example of estimation of a density distribution of people in an input image. [Figure 7] FIG. 13 is a diagram showing an example of estimating the position coordinates of a person from a density distribution. [Figure 8] FIG. 11 is a diagram showing an example of a process for determining the position coordinates of a person from a position map. [Figure 9] FIG. 11 is a diagram showing an example of a process for estimating a velocity distribution. [Figure 10] FIG. 11 is a diagram showing an example of a process for freeing a movement vector; [Figure 11] 11A and 11B are diagrams showing an example of a process for determining a movement trajectory of a person by matching. [Figure 12] 11A and 11B are diagrams showing an example of a cost matrix used in matching and a matching result. [Figure 13] FIG. 13 is a diagram showing a method for complementing a movement trajectory when the movement trajectory is interrupted. [Figure 14] FIG. 13 is a diagram showing an example of a method for measuring a flow rate from a movement trajectory of a person. [Figure 15] FIG. 13 is a diagram showing an example of a method for measuring a flow rate from a movement trajectory of a person. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, the embodiments will be described in detail with reference to the attached drawings. Note that the following embodiments do not limit the invention according to the claims. Although the embodiments describe a number of features, not all of these features are essential to the invention, and the features may be combined in any manner. Furthermore, in the attached drawings, the same reference numbers are used for the same or similar configurations, and duplicated descriptions are omitted.
[0011] [Embodiment 1] 1 shows an example of the hardware configuration of an image processing device 100 according to an embodiment of the present invention. The image processing device 100 includes a control device 11, a storage device 12, a calculation device 13, an input device 14, an output device 15, and an I / F device 16.
[0012] The control device 11 is a device that controls the entire image processing device 100. The storage device 12 holds programs and data necessary for the operation of the control device 11. The arithmetic device 13 executes necessary arithmetic processing based on the control from the control device 11. For example, the arithmetic device 13 may perform neural network calculations described below. The input device 14 is a human interface device or the like, and acquires input through user operations. The output device 15 is a display or the like, and presents the processing results generated by the image processing device 100 to the user.
[0013] The I / F device 16 is a wired interface such as a universal serial bus, Ethernet (registered trademark), or an optical cable, or a wireless interface such as Wi-Fi or Bluetooth (registered trademark). Other devices can be connected to the image processing device 100 via the I / F device 16. For example, an imaging device such as a camera can be connected to the I / F device 16, and the image processing device 100 can acquire an image via the I / F device 16. As another example, the image processing device 100 can transmit a processing result to the outside via the I / F device 16. As a further example, the image processing device 100 can acquire a program or data required for operation via the I / F device 16.
[0014] The functions of the image processing device 100 described below can be realized, for example, by a processor (e.g., control device 11) operating in accordance with a program on a memory (e.g., storage device 12). The storage device 12 or other storage media can store such programs. However, at least some of the functions of the image processing device 100 described below may be realized by dedicated hardware. Furthermore, an image processing device according to one embodiment of the present invention may be composed of multiple devices connected via a network, for example.
[0015] 2 shows an example of the functional configuration of an image processing device 100 according to an embodiment of the present invention. The image processing device 100 has, as its functional configuration, an acquisition unit 201, a density estimation unit 202, a coordinate estimation unit 203, a speed estimation unit 204, a movement estimation unit 205, a tracking unit 206, and a measurement unit 207.
[0016] The acquisition unit 201 acquires a moving image. The acquired moving image is analyzed to measure the flow of an object. The flow of an object may be the flow of an object on an image, or may be the flow of an object in real space estimated by image analysis. The object of the analysis is not particularly limited, and examples of the object include a person, a vehicle such as a bicycle or a motorbike, a vehicle such as a car or a truck, or an animal such as livestock.
[0017] The moving image may be, for example, streaming, a moving image file, a series of image files saved for each frame, or a moving image saved in a medium, which includes a plurality of frame images. Each of the plurality of images may be captured at a different time by an imaging device at the same location, for example. The acquisition unit 201 may acquire the moving image from a solid-state imaging element such as a CMOS sensor or a CCD sensor, or an imaging device such as a camera equipped with such a solid-state imaging element. The acquisition unit 201 may also acquire the moving image data from a storage device such as a hard disk or an SSD, or a recording medium, etc.
[0018] The density estimation unit 202, the coordinate estimation unit 203, the speed estimation unit 204, and the movement estimation unit 205 estimate the movement of the object in a specific period based on the moving image acquired by the acquisition unit 201. The method of estimating the movement of the object according to this embodiment will be described below. In this embodiment, the density estimation unit 202 and the coordinate estimation unit 203 estimate the position coordinates of the object, and the speed estimation unit 204 estimates the speed distribution of the object based on the moving image. Then, the movement estimation unit 205 estimates the movement of the object in a specific period based on the position coordinates and the speed distribution. However, the method of estimating the movement of the object is not limited to the following method.
[0019] The density estimation unit 202 and the coordinate estimation unit 203 estimate the position coordinates of an object in a moving image. In this embodiment, the density estimation unit 202 and the coordinate estimation unit 203 can estimate the position coordinates of an object on an image based on one or more images included in the moving image acquired by the acquisition unit 201. For example, the density estimation unit 202 and the coordinate estimation unit 203 can estimate the coordinates of an object on a first image based on a first image at time t1, and can estimate the coordinates of an object on a second image based on a second image at time t2. In this embodiment, the coordinates of an object are estimated based on the density distribution of the object, but the method of estimating the coordinates of the object is not limited to the following method.
[0020] The density estimation unit 202 estimates the density distribution of the object, which is the object of flow measurement, on the image included in the moving image by using an image included in the moving image acquired by the acquisition unit 201. The density distribution expresses a portion in the image where the object of flow measurement (e.g., a person's head, etc.) is estimated to exist. The density distribution can indicate a region in the image where the object is estimated to exist. The density distribution may be, for example, a uniform distribution according to the size of the object, centered on a position where the object is likely to exist. The density distribution may also be any distribution that has a maximum at a position where the object is likely to exist. An example of the latter is, for example, a Gaussian distribution. The density distribution may indicate the possibility that the object exists. The density estimation unit 202 can output a density map representing the density of the object at each position in the image as information representing the density distribution. The resolution of this density map may be the same as that of the image, or may be lower than that of the image.
[0021] When objects overlap in an image, the density estimation unit 202 may obtain a density distribution in which density distributions corresponding to each object are overlapped. This density distribution may be normalized so that the sum of densities in a density distribution corresponding to one object is 1. In this case, the sum of densities in the density distribution generated by the density estimation unit 202 corresponds to the number of objects in the image.
[0022] Various methods can be used as a method for the density estimation unit 202 to estimate the density distribution. For example, a method of inputting an image, or a feature amount extracted from an image, or both of these, into a neural network can be exemplified. Examples of such neural networks include a convolutional neural network, a deconvolutional neural network, an autoencoder in which both of these are connected, and a network with shortcuts such as U-Net. The neural network used by the density estimation unit 202 is trained in advance so as to output a density distribution of objects when an image is input. Such training can be performed using a training image and teacher data representing the density distribution of the image as described above. For example, training can be performed so that the sum of output values from the neural network is the number of objects, that is, the output value represents the density of objects at each position of the image.
[0023] The coordinate estimation unit 203 estimates the position coordinates of an object in an image from the density distribution obtained by the density estimation unit 202. For example, the coordinate estimation unit 203 can output the coordinates of the position of the estimated representative point of the object. The representative point of the object may be, for example, the center of the head of a person who is the object.
[0024] The method by which the coordinate estimation unit 203 estimates the position is not particularly limited, and for example, the center of gravity of the density distribution may be estimated as the position of the object. On the other hand, the coordinate estimation unit 203 may estimate the position coordinates of the object by performing two-class classification based on the density distribution to identify whether each position in the image represents a representative point of the object.
[0025] The boundary of the density distribution corresponding to one object output by the density estimation unit 202 may be blurred, and the boundary may have various shapes. Furthermore, the density distributions corresponding to one object may overlap with each other, resulting in a complex shape of the density distribution. Furthermore, the density estimation unit 202 may output an unexpected value in a specific situation. In one embodiment, the coordinate estimation unit 203 estimates the position of the object using a neural network. By using a neural network, it is possible to obtain an estimated position result with a certain amount of calculation defined in advance, regardless of the density distribution input. Therefore, the coordinate estimation unit 203 can handle various density distributions output by the density estimation unit 202.
[0026] For example, when a density map representing a density distribution is input, the neural network used by the coordinate estimation unit 203 can output a position map that represents the estimation result of two-class classification for each position of the density map as a probability. In this way, the coordinate estimation unit 203 can perform two-class classification to identify whether each position of the image represents a representative point of an object. In this two-class classification, if each position of the density map represents the position coordinate of an object, the estimation result is 1, and if it does not represent the position coordinate of an object, the estimation result is 0. The position map 701 can represent the probability that each position of the density map represents the position coordinate of an object. Since such a position map is sparse with most elements being 0, by reducing it to a two-class classification problem that can handle sparse output, it becomes easy to train the neural network that generates such a position map.
[0027] Examples of such neural networks include a convolutional neural network, a deconvolutional neural network, an autoencoder in which both of these are connected, and a network with shortcuts such as U-Net. The neural network used by the coordinate estimation unit 203 can have an output layer with a value range of 0 to 1. Examples of such an output layer include a step function, a sigmoid function, and a softmax function. A neural network with such an output layer can provide an output suitable for a two-class classification problem.
[0028] The neural network used by the coordinate estimation unit 203 is trained in advance so as to output the position of an object when a density map is input. Such training can be performed, for example, by using a density map for training and teacher data representing a position map corresponding to the density map, in which elements corresponding to the positions of people are 1 and other elements are 0.
[0029] The speed estimation unit 204 estimates a speed distribution that represents the amount of movement of the object in a specific period for each position of the moving image. In this embodiment, the speed estimation unit 204 estimates the speed distribution of the object on the image based on one or more images included in the moving image acquired by the acquisition unit 201. This speed distribution represents the moving direction and amount of movement of the object in a specific period. In the following example, the speed estimation unit 204 generates an X-direction speed distribution and a Y-direction speed distribution as the estimated speed distribution. The X-direction speed distribution represents the amount of movement of the object in the X-axis direction in a specific period for each position of the moving image, and the Y-direction speed distribution represents the amount of movement of the object in the Y-axis direction in a specific period for each position of the moving image. However, the configuration of the speed distribution is not limited to this example. For example, the speed distribution may be represented by a moving direction distribution that represents the moving direction of the object and a moving distance distribution that represents the absolute value of the moving distance of the object.
[0030] The velocity distribution will be described with reference to FIGS. 9(A) to 9(D). FIG. 9(A) shows the input image 900 at time t1, and FIG. 9(B) shows the input image 902 at time t2. The input image 900 and the input image 902 are images captured at different times included in the moving image. The X-direction velocity distribution 904 and the Y-direction velocity distribution 906 shown in FIGS. 9(C) and 9(D) respectively represent the amounts of movement of the object in the X-axis direction and the Y-axis direction between time t1 and time t2, and are obtained based on the input image 900 and the input image 902. In this specification, time t n represents a time after time t m (m < n).
[0031] The example of FIGS. 9(A) to 9(D) represents the case where the head i, which is the i-th head, exists at position 901 at time t1 and at position 903 at time t2. The coordinates of position 901 are (x i1 , y i1 ), and the coordinates of position 903 are (x i2 , y i2 ). Here, the region 905 in the X-direction velocity distribution 904 is a circle with a radius r i2 , y i2 ) centered at (x i and has a value represented by the function x i2 - x i1 . Also, the region 907 in the Y-direction velocity distribution 906 is a circle with a radius r i2 , y i2 ) centered at (x i and has a value represented by the function y i2 - y i1 . The value of the radius r i is not particularly limited and may be a fixed value or a value represented by a function of the size s i of the head i on the image.
[0032] Thus, the velocity distribution generated by the velocity estimation unit 204 is at a certain position (x i2 , y i2), the speed (amount of movement within a given time) of the subject can be represented. The specific format of the speed distribution generated by the speed estimation unit 204 is not limited to the examples shown in Figs. 9(A) to (D). The speed distribution generated by the speed estimation unit 204 is also expressed as i1 ,y i1 ), the velocity of the object may be represented. In this case, the areas 905 and 907 are each a region of the object at the position (x i1 ,y i1 ) may be a circle centered on the
[0033] Various methods can be used as a method for the speed estimation unit 204 to estimate the speed distribution. For example, a method of inputting an image, or a feature amount extracted from an image, or both of them into a neural network can be exemplified. Examples of such neural networks include a convolutional neural network, a deconvolutional neural network, an autoencoder in which both of them are connected, and a network with shortcuts such as U-Net. The neural network used by the speed estimation unit 204 is trained in advance to output the speed distribution of an object when an image is input. For example, the neural network may be trained to output the above-mentioned speed distribution when a first image captured at time t1 and a second image captured at time t2 are input. Such training can be performed using a training image and teacher data representing the above-mentioned speed distribution of the object. According to such a method, the speed estimation unit 204 can generate a speed distribution from two images included in a moving image.
[0034] On the other hand, the number of images used by the speed estimation unit 204 to estimate the speed distribution is not limited to two, and may be one or three or more. For example, the speed estimation unit 204 can estimate a speed distribution expressing the movement amount of an object between time t0, which is a fixed time width before time t2, and time t2, using one image captured at time t2. As another example, the speed estimation unit 204 can use a neural network trained to output a speed distribution expressing the speed of an object between the image capture time of the previously input image and the image capture time of the currently input image when one image is input. In this case, a recurrent neural network capable of handling states, such as LSTM or GRU, can be used as the neural network. Furthermore, the speed estimation unit 204 may estimate the speed distribution using three or more images. For example, the speed estimation unit 204 may estimate a speed distribution expressing the movement amount of an object between the image capture times of two of the images.
[0035] The movement estimation unit 205 derives a motion vector of the object in the video, which indicates the movement of the object during a specific period of time. In this embodiment, the movement estimation unit 205 estimates the movement vector of the object during a specific period of time, based on the position coordinates of the object estimated by the coordinate estimation unit 203 and the speed distribution of the object estimated by the speed estimation unit 204. As described above, the speed estimation unit 204 can estimate the speed distribution of the object between time t1 and time t2. In addition, the coordinate estimation unit 203 can estimate the position coordinates of the object at time t2. As described above, at time t1, the head i has coordinates (x i1 ,y i1 ), and at time t2, head i has coordinates (x i2 ,y i2 ) where the start point of the movement vector i of head i from time t1 to t2 estimated by the movement estimation unit 205 is the coordinates of head i at time t1, and the end point is the coordinates of head i at time t2. The movement estimation unit 205 can generate a list of movement vectors for all objects whose positions have been estimated by the coordinate estimation unit 203. An example of a method for obtaining the movement vector i will be described below.
[0036] The coordinates (x i2 ,y i2 The coordinate estimation unit 203 estimates the coordinates (x i1 ,y i1 ), first, the amount of movement (x id ,y id The movement estimation unit 205 can calculate the amount of movement of the head i by using the velocity distribution estimated by the velocity estimation unit 204.
[0037] As mentioned above, the coordinates (x i2 ,y i2 ) in the X-direction velocity distribution indicates the amount of movement of the head i. Therefore, the movement estimation unit 205 can estimate the amount of movement of the target object in a specific period based on the values of a region in the velocity distribution that is determined based on the position coordinates of the target object. For example, the movement estimation unit 205 estimates the amount of movement of the target object in a specific period based on the values of a region in the velocity distribution that is determined based on the position coordinates of the target object. i2 ,y i2 ) to find the mean or median of the elements in any region near x id This area can be calculated as, for example, the coordinates (x i2 ,y i2 ) may be a circular region having a fixed radius centered at y id Then, x i1 =x i2 -x id , y i1 =y i2 -y id Using the relationship, the coordinate (x i1 ,y i1 In this way, the movement estimation unit 205 can obtain a movement vector i corresponding to the head i, which indicates the estimated movement of the target object, based on the movement amount of the target object estimated based on the speed distribution and the position coordinates of the target object.
[0038] However, the method of calculating the movement vector by the movement estimation unit 205 is not limited to the above-mentioned method. For example, the movement estimation unit 205 may calculate the movement vector of the head based on the position coordinates of the head i at time t1 and the amount of movement of the head i between time t1 and time t2.
[0039] The tracking unit 206 generates a movement trajectory of the object over the first and second periods by matching information indicating the movement of the object in the first period with information indicating the movement of the object in the second period. In this embodiment, the movement estimation unit 205 can generate a first movement vector of the object in the first period (e.g., from time t1 to time t2) as information indicating the movement of the object. The movement estimation unit 205 can also generate a second movement vector of the object from time t2 to time t3. The tracking unit 206 can track the position coordinates of the object by matching these movement vectors.
[0040] The movement trajectory of the object can be represented by a list of the position coordinates of the object arranged in chronological order. The movement vectors estimated by the movement estimation unit 205 each represent the position of the object at a different time, and therefore can be interpreted as a movement trajectory of length 2. The tracking unit 206 uses lists of the movement vectors of the object for two or more different time periods to obtain a movement trajectory of length 3 or more. The tracking unit 206 matches the movement vectors between the lists of movement vectors for the different time periods, and connects the matched movement vectors to obtain a longer movement trajectory of the object.
[0041] The tracking unit 206 can track the position coordinates of the object over multiple time periods (or at three or more different times) by matching the movement vectors for different time periods that are estimated to be movement vectors for the same object. By repeating such matching for the movement vectors for multiple time periods, the tracking unit 206 can obtain the movement trajectory of the object. A specific matching method will be described later.
[0042] The measuring unit 207 measures the flow of the object using the movement trajectory of the object by the tracking unit 206. The measuring unit 207 can measure, for example, the flow rate of the object, or the direction of the flow of the object. The flow rate may be, for example, the number of objects passing through a measurement area or measurement line set in advance. For example, the measuring unit 207 can measure the number of objects that move from one area to another area separated by the measurement area. When a line segment (measurement line) is used as the measurement area, the measuring unit 207 can measure the number of objects that cross the measurement line.
[0043] Such a measurement area may be determined in advance based on the shooting scene. In this case, the measurement unit 207 may acquire the setting value of the predetermined measurement area from a memory such as the storage device 12. The measurement unit 207 may also acquire the setting value input by the user by operating a human interface device or the like connected to the input device 14 while referring to the image displayed on the output device 15.
[0044] The measurement area may be one or more. The shape of the measurement area is not particularly limited, and may be, for example, any broken line, curve, polygon, circle, or ellipse, or a figure consisting of any closed curve. The measurement area may be a line with no thickness, or a line with thickness (or a long rectangle). Such a measurement area may be set based on any guide figure such as a line or a rectangle. For example, a measurement area having a shape following the guide figure may be provided at a specific position in the image. Such a guide figure may be one or more. The guide figure may be expanded by a method such as increasing its width.
[0045] An example of processing by the image processing device 100 according to this embodiment will be described with reference to Fig. 3. In the following, an example of measuring the flow rate of people will be described. Specifically, the number of people passing through a preset measurement area is counted.
[0046] In step S301, the acquisition unit 201 acquires a moving image. The acquisition unit 201 also acquires a plurality of images used for flow measurement from the moving image. For example, the acquisition unit 201 can acquire a plurality of images obtained by capturing images a plurality of times between the measurement start time and the measurement end time. The acquisition unit 201 may sequentially acquire each frame image from the imaging device. Hereinafter, each of the plurality of images acquired in step S301 is referred to as an input image. The processes of steps S302 and S303 are performed for each of the input images. For example, the density distribution and position coordinates can be estimated in steps S302 and S303 for each of the second image captured at time t2 and the third image captured at time t3. In the following example, the processes of steps S304 and S305 are performed for each of the sets of input images captured consecutively. For example, based on a first image captured at time t1 and a second image captured at time t2, the velocity distribution and movement vector from time t1 to time t2 can be obtained in steps S304 and S305.
[0047] The acquisition unit 201 may extract one or more partial images from the input image. The acquisition unit 201 may extract one or more partial images that are parts of the image from each of the multiple images. By using a partial image having a size smaller than the input image in this way, the amount of processing after step S302 can be reduced. Such a configuration makes it easy to measure the flow rate in real time. The area of the partial image extracted from the input image may be set in advance. In addition, the area of the partial image may be set by the user. For example, the user can set a partial area on the input image displayed on the output device 15 by operating a human interface device or the like connected to the input device 14. The setting method and specific shape of the area of the partial image are not particularly limited. For example, the acquisition unit 201 may automatically determine the partial area to be extracted based on the area specified by the user. The acquisition unit 201 can acquire the user's designation of the measurement area as already described. In this case, the acquisition unit 201 may automatically set the area of the partial image based on the specified measurement area. For example, the acquisition unit 201 can extract the partial image from the input image so as to include the measurement area.
[0048] The acquisition unit 201 may also divide the entire input image 400 into a plurality of regions as shown in FIG. 4(A). In this case, a partial image may be extracted from each of one or more regions selected from the plurality of regions. For example, when a measurement region 401 is set in the input image 400 as shown in FIG. 4(A), a partial image to be used for flow measurement can be extracted from a rectangular region enclosed by a thick frame that includes the measurement region 401. Also, as shown in FIG. 4(B), one or more rectangular regions that include a measurement region 403 can be set in a part of the input image 402. Then, a partial image to be used for flow measurement can be extracted from the rectangular region thus set.
[0049] 4A and 4B, the shape of the partial image is rectangular, but the shape of the partial image may be, for example, any polygon, circle, or ellipse, or a figure consisting of any closed curve. Also, even if the shape of the measurement region is not a line segment but, for example, any broken line, curve, polygon, circle, or ellipse, or a figure consisting of any closed curve, the partial image can be extracted by a similar method.
[0050] Incidentally, in an input image obtained by an imaging device such as a camera, the size of a person to be measured may vary depending on the position. Therefore, the size of a partial image can be changed depending on the position in the image. For example, the size of a partial image can be determined so that the ratio between the size of the partial image and the size of the person is approximately constant, and the partial image can be extracted depending on this size. Here, the size of a person can be, for example, the size of a part including the head and shoulders of the person, the size of the head of the person, the size of the whole body of the person, etc. Figures 4(A) and (B) show an example of changing the size of a partial image in this way. That is, in Figures 4(A) and (B), the size of the partial image is small in the area where a distant person is shown, that is, in the upper part of the input image.
[0051] When partial images are set in this way, the processes of steps S302 to S305 can be performed for each partial image in the input image. That is, the density estimation unit 202 estimates the density distribution of the object in each partial image, and the coordinate estimation unit 203 can estimate the position of the object from the density distribution for each partial image. Furthermore, the speed estimation unit 204 estimates the speed distribution of the object for each partial image, and the movement estimation unit 205 can estimate the movement of the object in each partial image.
[0052] On the other hand, the accuracy of the estimation results in steps S302 to 305 tends to be low in the boundary region (peripheral region) of the partial image. For this reason, in one embodiment, a central region is defined in the partial image, and the flow measurement in step S307 can be performed for the person detected in this central region. With this configuration, the flow measurement is performed using the highly accurate person detection result, improving the measurement accuracy.
[0053] An example of a method for defining a central region in a partial image is a method for defining a central region 501 and a margin region 502 surrounded by the boundary line of the partial image 500 and the boundary line of the central region 501 inside the partial image 500, as shown in Fig. 5(A). In the example of Fig. 5(A), the central region 501 is rectangular, but the shape of the central region 501 is not particularly limited. For example, the shape of the central region 501 can be any shape included inside the partial image 500, such as a polygon, a circle, an ellipse, or any closed curve.
[0054] The size of the margin area can be set according to the size of the person who is the subject of flow measurement. For example, the margin area can be set to a size that can include a portion necessary for detecting a person. FIG. 5(B) shows an example. In FIG. 5(B), the margin area 502 of the partial image 500 is set to a size that can include a portion necessary for detecting the person 503 or person 504 who is the subject of flow measurement. More specifically, the size of the margin area is set so that it can include the person's head and shoulders. As another example, the margin area may be set so that only the person's head or the person's entire body is included in the margin area.
[0055] When extracting a plurality of partial images from an input image, the regions of the partial images can be set so that adjacent partial images overlap each other. For example, the acquisition unit 201 can divide the image into a plurality of regions. Then, for each of one or more regions selected from the plurality of regions, the acquisition unit 201 can extract a partial image from a region (central region) and a margin region around this region. FIG. 5(C) shows an example of such division. In FIG. 5(C), two adjacent partial images 505 and 506 partially overlap each other. More specifically, the partial images 505 and 506 are extracted so that no gap is formed between a central region 507 of the partial image 505 and a central region 508 of the partial image 506. Even if a person 510 to be detected is in a margin region 512 of the partial image 505, the person 510 can be detected from a central region 508 of the partial image 506 adjacent to the partial image 505.
[0056] As shown in FIG. 5(C), by making the central regions of each partial image adjacent to each other without any gaps, the person to be measured can be detected in the central region of one of the partial images, improving the measurement accuracy. As a method for extracting such partial images, a method is given in which the input image is divided into a plurality of regions, and one partial image is extracted from each region (corresponding to the central region) and the surrounding margin region. Furthermore, a division method that can cover the measurement region with the minimum necessary area while securing the margin region of each partial image may be determined by optimization calculation or the like. In FIG. 5(D), a plurality of partial images 522, each having a margin region, are extracted along a measurement region 521 set in an input image 520.
[0057] In the following description, the input image refers to the input image itself or a partial image. That is, the processes in steps S302 to S305 can be performed on the input image or on each of the partial images in the input image.
[0058] In step S302, as described above, the density estimation unit 202 estimates the density distribution of the person to be measured based on the input image acquired by the acquisition unit 201. In the example of Fig. 6(A), the density estimation unit 202 estimates the density distribution of the head position of a person 601 in an input image 600. The density estimation unit 202 generates a density map 602 indicating a density distribution 603 of the head position of the person 601, as shown in Fig. 6(B).
[0059] The input image used by the density estimation unit 202 is not limited to one, and the density estimation unit 202 may estimate the density distribution using multiple input images. For example, the density estimation unit 202 may estimate the density distribution by inputting multiple input images to a neural network. The multiple input images used by the density estimation unit 202 may be, for example, images of multiple different frames included in a moving image. The density distribution output by the density estimation unit 202 is also not limited to one. For example, the density estimation unit 202 may output multiple density distributions corresponding to multiple input images, respectively. When the density estimation unit 202 outputs multiple density distributions, all the density distributions may be input to the subsequent coordinate estimation unit 203, or a selected part of the density distributions may be input.
[0060] In step S303, the coordinate estimation unit 203 estimates the position coordinates of the person based on the density distribution output by the density estimation unit 202 as described above. For example, the coordinate estimation unit 203 can output the position map 701 shown in Fig. 7(B) by inputting the density map 700 shown in Fig. 7(A) to a neural network. The position map 701 shows a case where the position coordinates of a person match the positions of elements in the position map 701. In this case, the value (probability value) of one element for one person becomes large, and therefore the position of such an element can be determined as the position coordinates of the person.
[0061] On the other hand, as in the position map 702 shown in FIG. 7(C), when the position coordinates of a person deviate from the position of an element in the position map 702 (i.e., the position of a lattice point), the values (probability values) of multiple elements for one person become large. In this way, multiple adjacent positions in the input image may be estimated to represent the position of an object. In this case, the coordinate estimation unit 203 can determine the position of the object based on the multiple adjacent positions in the input image estimated to represent the position of the object. For example, the coordinate estimation unit 203 can determine the position coordinates of the person by combining the probability values divided into multiple elements into one.
[0062] For example, as shown in Figs. 8(A) to (C), the coordinate estimation unit 203 can obtain a map 801 by applying 3x3 max pooling to a position map 800 output from a neural network. Then, the coordinate estimation unit 203 can compare the position map 800 with the map 801 for each element. In this case, the coordinate estimation unit 203 can determine the coordinates of elements whose values match between the position map 800 and the map 801 as the position coordinates of the person, as shown in the map 802. The kernel size of max pooling is not limited to 3x3, and may be another size such as 5x5. In addition, the max pooling process may be performed independently, or may be performed by adding a max pooling layer next to the output layer of the neural network used by the coordinate estimation unit 203.
[0063] The method of consolidating a plurality of probability values is not limited to this method, and the coordinate estimation unit 203 may use other maximum value detection methods, such as watershed. The coordinate estimation unit 203 may also use a method of clustering a plurality of elements whose probability values have been detected, and setting the center coordinates of each cluster as the position coordinates of the person. Examples of the clustering method include hierarchical clustering and K-means. The center coordinates of the cluster may be a simple average of the element coordinates in the cluster, or may be the element coordinates having the maximum probability value among the elements in the cluster, or may be a weighted average value based on the existence probability of the element coordinates of each element, etc.
[0064] In the position map output by the neural network used by the coordinate estimation unit 203, elements that do not correspond to the position coordinates of a person may have a very small probability value that is noise. When the process of combining the probability values of adjacent elements into one point as shown in the example of Fig. 8 is performed in a state where such noise is present, the coordinates of the element with the very small noise may be determined as the position coordinates of a person. For this reason, the coordinate estimation unit 203 may correct the very small probability values that are below a threshold and can be considered as noise in the position map output by the neural network to zero, and then perform the process of combining the probability values into one point and the determination of the position coordinates of a person.
[0065] In step S304, the speed estimation unit 204 estimates the speed distribution of the person to be measured based on the input image acquired by the acquisition unit 201, as described above. In this example, the speed estimation unit 204 can estimate the speed distribution of the person from time t1 to time t2 based on the first image captured at time t1 and the second image captured at time t2. The speed estimation unit 204 can also estimate the speed distribution of the person from time t2 to time t3 based on the second image captured at time t2 and the third image captured at time t3.
[0066] In step S305, the movement estimation unit 205 obtains a movement vector list of the person as described above based on the position coordinates of the person who is the flow measurement target estimated by the coordinate estimation unit 203 and the speed distribution of the person who is the flow measurement target estimated by the speed estimation unit 204. Fig. 10(A) to (F) show an example of a calculation method of a movement vector. Fig. 10(A) shows a first image 1000 at time t1, and Fig. 10(B) shows a second image 1002 at time t2. A certain head i is located at a position 1001 at time t1 and at a position 1003 at time t2. A position coordinate map 1004 that the coordinate estimation unit 203 can generate based on the second image 1002, as shown in Fig. 10(C), shows the estimated position coordinates 1005 of the head i at time t2. An X-direction velocity distribution map 1006 and a Y-direction velocity distribution map 1009 between time t1 and time t2 shown in Figures 10(D) and 10(E) can be generated by the velocity estimation unit 204 based on the first image 1000 and the second image 1002.
[0067] The movement estimation unit 205 calculates the amount of movement (x id ,y id ) can be calculated from the average value in region 1007 of X-direction velocity distribution map 1006. Furthermore, movement estimation unit 205 can calculate the Y component of the movement amount of head i from the average value in region 1010 of Y-direction velocity distribution map 1009. Regions 1007 and 1010 can be set to be smaller than regions 1008 and 1011 corresponding to the velocity distribution of head i shown in the velocity distribution map obtained in step S304. Conversely, learning of velocity estimation unit 204 (or neural network used by velocity estimation unit 204) can be performed so that regions 1007 and 1010 have areas large enough not to exceed regions 1008 and 1011. With such a configuration, even if the velocity distribution estimated in step S304 has unevenness or abnormal output values, the influence of these is reduced, making it easy to stably calculate the movement amount of head i.
[0068] The movement estimation unit 205 can obtain a movement vector for each head detected from the second image at time t2 by the above method. In this way, the movement estimation unit 205 can generate a movement vector list 1012 that is a list of the movement vectors for all heads. In Fig. 10(F), the movement vector 1013 is the movement vector corresponding to the head i.
[0069] In step S306, the tracking unit 206 tracks the position coordinates of the person based on the movement vector list output by the movement estimation unit 205, and obtains the movement trajectory of the person. 12 1100 and the motion vector list V between time t2 and time t3 23 In this embodiment, the tracking unit 206 obtains the motion vector list V 12 1100 and Movement Vector List V 23 By performing matching 1102 on 1101, a movement trajectory 1103 of the person is obtained.
[0070] The matching method is not particularly limited. For example, the tracking unit 206 can perform matching so that the total sum of costs calculated based on the matching results is small. Examples of algorithms for performing such matching include Hungarian matching, linear programming, and neural networks.
[0071] In this embodiment, matching is performed based on the position of the end point of the first motion vector in the first period and the position of the start point of the second motion vector in the second period. Here, the second period (e.g., from time t2 to time t3) is a period later than the first period (e.g., from time t1 to time t2). More specifically, the tracking unit 206 performs matching so that the cost based on the distance between the position of the end point of the first motion vector and the position of the start point of the second motion vector becomes smaller. In this example, the matching cost is calculated by dividing the motion vector list V 12The motion vector v contained in a The end point p of and the motion vector list V 23 The motion vector v contained in b The distance between the start point q of the head movement vector v and the end point p of the first period from time t1 to time t2 is the same as the start point q of the second period from time t2 to time t3. In other words, both points p and q represent the estimated positions of the head at time t2. Therefore, the distance between the start point q of the head movement vector v and the end point p of the first period from time t1 to time t2 is the same as the start point q of the second period from time t2 to time t3. a and the movement vector v b If points p and q refer to the same person, then ideally points p and q would be located very close to each other. Therefore, by using the cost defined in this way, matching accuracy can be improved.
[0072] On the other hand, it is not necessary for the end time of the first period to coincide with the start time of the second period. Even in this case, the above-described method of matching motion vectors can improve matching accuracy compared to the method of matching the position coordinates of the object at the start time of the first period with the position coordinates of the object at the start time of the second period.
[0073] In the following, a case where the cost based on the above definition is used will be described, but other costs may be used. For example, the length or direction of the movement vector may be used to calculate the cost. Also, a feature amount of the image information of the person may be extracted based on the position of the movement vector, and the cost may be calculated based on the similarity of the feature amount. Furthermore, one type of cost may be used, or a combination of multiple types of costs may be used. For example, the cost may be calculated based on both the distance between point p and point q and the similarity of the image information of the person. The tracking unit 206 can perform matching so that such a cost is minimized.
[0074] Referring to FIG. 12, the motion vector list V 12 The end point of the motion vector contained in and the motion vector list V 2312A shows an area 1200 of an input image. The position coordinates b to d are each included in the motion vector list V 12 In addition, the position coordinates A to C are each included in the movement vector list V 23 Represents the start point of the motion vector contained in
[0075] In this case, for example, matching can be performed so as to minimize the total sum of costs. In this case, in the example of FIG. 12(A), (c, B) and (b, C) may be matched.
[0076] On the other hand, matching can be performed so that longer distances are emphasized. For example, the cost can be defined so that the cost for distance d is smaller than half the cost corresponding to distance 2d. As a specific example, the squared Euclidean distance between the end point p and the start point q can be used as the cost. When the squared Euclidean distance is used in this way, the sum of the distance bB and the distance cC is smaller than the sum of the distance cB and the distance Cb, and therefore (b,B) and (c,C) are matched. With this configuration, matching of distant coordinates such as (b,C) is less likely to occur, and it is expected that the matching result will be more accurate.
[0077] Also, in FIG. 12(A), a person at position coordinate A at time t2 was outside the area 1200 at time t1. Also, a person at position coordinate d at time t2 was outside the area 1200 at time t3. According to the method of this embodiment, a movement vector may occur with such isolated position coordinates A, d as a start point or end point. In such an example, if the position coordinates of the start points or end points of all movement vectors detected from within the area 1200 are matched so that the sum of the distances between the people is minimized, an incorrect matching result may be obtained. For example, in the example of FIG. 12(A), pairs of position coordinates (A, b), (B, c), and (C, d) may be obtained.
[0078] In one embodiment, the tracking unit 206 can perform matching so that isolated position coordinates such as the position coordinates A and d are not matched. For example, a maximum distance r for matching can be set. In this case, the tracking unit 206 can perform matching so that position coordinates that are farther apart than the maximum distance r are not matched.
[0079] 12B and 12C show examples of a cost matrix and a matching result used in Hungarian matching to prevent isolated position coordinates from being matched. In FIG. 12B, B, C, b, and c correspond to the position coordinates B, C, b, and c shown in FIG. 12A, respectively. The position coordinates A and d are isolated position coordinates whose distances from all position coordinates exceed the maximum distance r. Therefore, the costs related to the position coordinates A and d are excluded from the cost matrix in FIG. 12B so that the position coordinates A and d are not matched with other position coordinates. The tracking unit 206 can generate such a cost matrix based on, for example, the squared Euclidean distance. In the example of FIG. 12B, the pairs of position coordinates (B, b) and (C, c) shown in thick frames are obtained so that the total sum of costs is minimized.
[0080] In another example shown in FIG. 12(C), A, B, C, b, c, d respectively correspond to the position coordinates A, B, C, b, c, d (hereinafter referred to as actual coordinates) shown in FIG. 12(A). In the example of FIG. 12(C), the tracking unit 206 first generates a cost matrix between the actual coordinates, for example, based on the squared Euclidean distance. Subsequently, the tracking unit 206 adds columns corresponding to three dummies, namely x1, x2, and x3, which are the same number as the position coordinates A, B, C. Further, the tracking unit 206 adds rows corresponding to three dummies, namely X1, X2, and X3, which are the same number as the position coordinates b, c, d. Then, the tracking unit 206 sets the cost between a dummy and any actual coordinate using a value r1 greater than the maximum distance r, and sets the cost between actual coordinates with a distance greater than r using an r2 even greater than r1. That is, r < r1 < r2. The tracking unit 206 can generate such a cost matrix, for example, based on the squared Euclidean distance. When performing matching using such a cost matrix, isolated actual coordinates do not match with other actual coordinates but match with dummies. Also, the remaining dummies match with each other. In FIG. 12(C), the result of the matching using the cost matrix is shown by a thick frame. The tracking unit 206 can obtain the matching result by excluding the matching results with these dummies.
[0081] In yet another example, the tracking unit 206 may group position coordinates within a range of a maximum distance r before performing matching. In this case, the tracking unit 206 can perform matching between position coordinates included in each group for each group. For example, the tracking unit 206 can generate a cost matrix as shown in FIG. 12(B) or FIG. 12(C) for each group individually and perform matching. Isolated position coordinates A, d as shown in FIG. 12(A) are removed by such grouping. According to such a method, when the number of people, that is, the number of detected position coordinates, is large, the processing speed can be improved. The grouping method is not particularly limited, but examples include a method of searching for an independent graph that is not connected using a cost matrix or an adjacency graph including isolated position coordinates. In addition, a clustering method such as hierarchical clustering or K-means can also be used.
[0082] In this way, the tracking unit 206 calculates the movement vector v from time t1 to time t2 shown in FIG. a The end point of 1104 and the movement vector v from time t2 to time t3 b 1105. Then, the tracking unit 206 can match the movement vector v a Starting point of 1104, movement vector v a The end point of 1104, and the movement vector v b By connecting the three end points of 1105, a movement trajectory 1106 from time t1 to time t3 corresponding to a certain person can be obtained. By repeating this matching process for movement vectors at later times (for example, a movement vector from time t3 to time t4), a movement trajectory of the same person over a longer period of time can be obtained.
[0083] As described above, the method of matching movement vectors makes it possible to obtain a movement trajectory with greater accuracy than, for example, a method of matching people detected at time t1 and time t2, i.e., points.
[0084] For some reason, the input image acquired by the acquisition unit 201 may be missing, the density distribution of the person by the density estimation unit 202 may be missing, the coordinate estimation unit 203 may not detect the position coordinates of the person, or the speed distribution of the person by the speed estimation unit 204 may be missing. For these reasons, it is possible that the movement vector of a person between specific times cannot be obtained. For example, FIG. 13(A) shows a movement vector 1303 of a certain person between time t1 and time t2. FIG. 13(A) also shows a movement vector 1304 of the same person between time t2 and time t3, and a movement vector 1305 of the same person between time t3 and time t4. Ideally, these three movement vectors 1303 to 1305 are detected and matched to be connected to form one movement trajectory. However, if the movement vector 1304 is missing for some reason and the movement trajectory of the person is interrupted, it may be erroneously determined that the movement trajectory of this person does not pass through the line segment 1301 of the measurement area.
[0085] In order to avoid such an event, the tracking unit 206 can estimate the movement of the object in the second period based on information indicating the movement of the object in the first period. For example, as shown in FIG. 13(B), the tracking unit 206 can compensate for the interrupted movement trajectory by using a movement vector 1306 between time t2 and time t3 predicted using a movement vector 1303. With this method, even if the movement trajectory is interrupted, it is possible to determine that a person has passed through the measurement area. The tracking unit 206 may estimate the movement of the object in the second period when information indicating the movement of the object in the second period that matches the information indicating the movement of the object in the first period is not found.
[0086] Various methods can be used to predict the movement vector 1306. For example, the tracking unit 206 can determine a movement vector 1306 that has the same direction and magnitude as the movement vector 1303 and whose starting point coincides with the end point of the movement vector 1303. In addition, not only the movement vector 1303 but also a movement vector at an earlier time may be used to predict the movement vector 1306. Note that, if the movement vector 1306 generated in this way does not match the movement vector after time t3, the tracking unit 206 may exclude the movement vector 1306 from the movement trajectory of the person.
[0087] The method of estimating the position of a person when the movement trajectory of the person is interrupted is not limited to the method using the movement vector. For example, the movement trajectory of the person may be estimated by predicting the position of the person at time t3 using a known object tracking method such as template matching. Furthermore, even if the movement vector is missing for two or more frames, the movement trajectory of the person can be tracked by repeating the estimation of the movement vector.
[0088] In step S307, the measuring unit 207 measures the flow rate of people based on the movement trajectory of the person output by the tracking unit 206. For example, the measuring unit 207 can measure the flow rate of people by determining whether the movement trajectory of the person output by the tracking unit 206 intersects with the set measurement area. The method of setting the measurement area is as described above. As described with reference to Figs. 4(A) and (B), the measurement areas 401 and 403 may be set when setting the area from which the partial image is extracted in step S301.
[0089] An example of a method for measuring the flow rate of people when the measurement region is a line segment will be described with reference to Fig. 14. Fig. 14(A) shows an input image 1400 at time t1 and a line segment 1401 that is the measurement region. Furthermore, position coordinates 1403 of a person 1402 and position coordinates 1405 of a person 1404 are detected from the input image 1400. Similarly, Fig. 14(B) shows an input image 1406 at time t2. Position coordinates 1407 of the person 1402 are detected from the input image 1406, and a movement trajectory 1409 from the position coordinates 1403 to the position coordinates 1407 is obtained. Furthermore, position coordinates 1408 of the person 1404 are detected from the input image 1406, and a movement trajectory 1410 from the position coordinates 1405 to the position coordinates 1408 is obtained.
[0090] 14(B), the measurement unit 207 can determine that the movement trajectory 1409 intersects with the line segment 1401, and therefore can determine that the person 1402 has passed through the line segment 1401. Similarly, the measurement unit 207 can determine that the movement trajectory 1410 also intersects with the line segment 1401, and therefore can determine that the person 1404 has also passed through the line segment 1401. Here, the measurement unit 207 may further determine that the person 1404 has passed through the line segment 1401 in the opposite direction to the person 1402. The intersection determination between the movement trajectory and the line segment can be performed by a geometric method such as, for example, determining the intersection between line segments.
[0091] In one embodiment, the measurement unit 207 determines that a person has passed through a measurement area when the person moves from one area divided by the measurement area to the other area. On the other hand, the measurement unit 207 does not determine that the person has passed through the measurement area while the person is present on the measurement area. In other words, the measurement unit 207 counts the number of people who have moved from one area beyond the measurement area to the other area, but the number of people thus counted does not include the number of people who have moved from one area to the measurement area but have not moved to the other area.
[0092] For example, Fig. 15 shows a line segment 1500, which is a measurement region, and a person's movement trajectory 1501. In this example, the measurement unit 207 can determine that the person has passed the line segment 1500 from bottom to top at three points a, d, and f, and can determine that the person has passed the line segment 1500 from top to bottom at two points c and e. On the other hand, the measurement unit 207 can determine that the person has not passed the line segment 1500 at points b and g where the person is exactly on the line segment 1500. As described above, the line segment 1500 may be a line segment having a thickness (i.e., a rectangular region), and in this case, it is not determined that the person has passed the measurement region while the person is on the line segment 1500.
[0093] By performing such a determination for the movement trajectory of each person, the measurement unit 207 can measure the flow rate of people. In the example shown in Fig. 15, the measurement unit 207 can measure the cumulative number of passes from below to above the line segment 1500 and the cumulative number of passes from above to below as the flow rate of people in each direction. Here, as described with reference to Fig. 15, by not determining that a person has passed through the measurement area while the person is present on the measurement area, it is possible to avoid double counting of the cumulative number of passes resulting from small movements of the person near the measurement area.
[0094] The measuring unit 207 may calculate the difference in the cumulative number of passes of each person for each movement direction of the measurement area as the flow rate of the person. Specifically, the measuring unit 207 can calculate the difference between the number of passes from one area to the other area and the number of passes from the other area to the one area. For example, in the case of FIG. 15, the cumulative number of passes of the person represented by the movement trajectory 1501 from below to above the line segment 1500 is three times, and the cumulative number of passes from above to below is two times. The measuring unit 207 can determine that one person has passed from below to above the line segment 1500 by taking the difference in the cumulative number of passes for each movement direction. Such a pass determination based on the difference in the cumulative number of passes can be performed for each person (or movement trajectory).
[0095] As described above, the shape of the measurement area is not particularly limited. For example, when the measurement area is a closed curve surrounding a predetermined area, the measurement unit 207 can measure the flow rate of people entering this area and the flow rate of people leaving this area.
[0096] As described above, in this embodiment, matching between motion vectors is performed between image frames. Therefore, it is possible to improve the matching accuracy and to estimate the movement trajectory of the object more accurately. Furthermore, by using the movement trajectory estimated in this way, it is possible to improve the measurement accuracy of the flow rate of the object.
[0097] In the above example, the density estimation unit 202 and the coordinate estimation unit 203 estimated the position coordinates of the object in the video, and the speed estimation unit 204 estimated the speed distribution representing the movement amount of the object in a specific period for each position in the video. Then, the movement estimation unit 205 estimated the movement of the object in a specific period based on the position coordinates and the speed distribution. According to this method, it is possible to estimate the position coordinates and movement vector of the object by inputting an image in which objects overlap each other. Therefore, it is possible to obtain the effect that the coordinates and movement vector of the object can be obtained with high accuracy even in a crowded scene.
[0098] In the above embodiment, the flow rate of the object is measured based on the movement trajectory obtained by matching. On the other hand, the flow rate may be measured based on the movement vector between each time point estimated by the movement estimation unit 205. In this case, matching of the movement vector can be omitted.
[0099] [Embodiment 2] In the second embodiment, the speed estimation unit 204 simultaneously estimates the position coordinates and speed distribution of an object in a video. For this reason, the density estimation unit 202 can be omitted in this embodiment. In the following, the same parts as in the first embodiment will not be described, and only the different points will be described.
[0100] In this embodiment, the velocity estimation unit 204 simultaneously estimates the density distribution and velocity distribution of the object to be subjected to flow measurement based on the image acquired by the acquisition unit 201. The velocity estimation unit 204 can simultaneously estimate three things, the density distribution of the object, the X-direction velocity distribution of the object, and the Y-direction velocity distribution of the object, using two input images. For example, in step S302, the velocity estimation unit 204 can use a first image at time t1 and a second image at time t2. Then, the velocity estimation unit 204 can estimate the density distribution of the object of the person at time t2, and the X-direction velocity distribution and the Y-direction velocity distribution of the object from time t1 to time t2. In this case, step S304 can be omitted.
[0101] Various methods can be used as a method for the speed estimation unit 204 to estimate the density distribution and the speed distribution. For example, an image, or a feature amount extracted from the image, or both of them can be input to a neural network. Examples of such neural networks include a convolutional neural network, a deconvolutional neural network, an autoencoder in which both of them are connected, and a network with shortcuts such as U-Net. The neural network used by the speed estimation unit 204 is trained in advance so as to output the density distribution and the speed distribution of the target object when an image is input.
[0102] By simultaneously estimating the density distribution and the velocity distribution as in this embodiment, the time required to estimate the movement vector of the object can be reduced compared to the first embodiment.
[0103] [Embodiment 3] In the third embodiment, the coordinate estimation unit 203 estimates the position of the object without using the density distribution. Therefore, in this embodiment, the density estimation unit 202 can be omitted. In the following, the same parts as in the first or second embodiment will not be described, and only the different points will be described.
[0104] In this embodiment, the coordinate estimation unit 203 directly estimates the position coordinates of the object to be measured using the input image acquired by the acquisition unit 201, without using the density distribution of the object. For example, in step S303, the coordinate estimation unit 203 can generate a position map of the person at time t2 using the second image at time t2, without using a density map. Then, the coordinate estimation unit 203 can estimate the position coordinates of the person from the position map using the same process as in embodiment 1. In this case, step S302 can be omitted.
[0105] Various methods can be used as a method for the coordinate estimation unit 203 to estimate a position map from an input image. For example, an image, or a feature amount extracted from the image, or both of them are input to a neural network. The neural network used by the coordinate estimation unit 203 may have an output layer having a value range of 0 to 1 so as to obtain an output suitable for a two-class classification problem.
[0106] This embodiment may be combined with embodiment 2. In this case, the speed estimation unit 204 can estimate the position coordinates and speed distribution of the target object using the input image acquired by the acquisition unit 201.
[0107] By estimating position coordinates directly from an input image as in this embodiment, the time required to estimate the movement vector of an object can be reduced compared to the first embodiment.
[0108] (Other Examples) The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.
[0109] The invention is not limited to the above-described embodiments, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the following claims are appended to apprise the public of the scope of the invention. [Explanation of symbols]
[0110] 100: image processing device, 201: acquisition unit, 202: density estimation unit, 203: coordinate estimation unit, 204: speed estimation unit, 205: movement estimation unit, 206: tracking unit, 207: measurement unit
Claims
1. An acquisition means for acquiring a moving image; an estimation means for estimating a movement of an object during a specific period of time based on the moving image; a tracking means for generating a movement trajectory of the object over the first period and the second period by matching a first motion vector obtained by the estimation means, the first motion vector indicating a movement of the object in a first period, with a second motion vector indicating a movement of the object in a second period; The tracking means performs the matching so that a cost based at least on a distance between a position of an end point of the first motion vector and a position of a start point of the second motion vector becomes smaller.
13. An image processing device comprising:
2. The image processing device according to claim 1 , wherein the second period is a period subsequent to the first period.
3. 3. The image processing device according to claim 1, wherein an end time of the first period and a start time of the second period coincide with each other.
4. 4. The image processing device of claim 1, wherein the estimation means estimates the movement of an object during the first period based on an image included in the video captured at a start time of the first period and an image captured at an end time of the first period, and estimates the movement of an object during the second period based on an image included in the video captured at a start time of the second period and an image captured at an end time of the second period.
5. 5. The image processing device according to claim 1, wherein the tracking means estimates the movement of the object during the second period based on the first motion vector indicating the movement of the object during the first period when a motion vector indicating the movement of the object during the second period that matches the first motion vector indicating the movement of the object during the first period is not found.
6. 6. The image processing device according to claim 1, wherein the estimation means estimates position coordinates of the object in the moving image and a speed distribution representing the amount of movement of the object during the specific period for each position in the moving image, and estimates the movement of the object during the specific period based on the position coordinates and the speed distribution.
7. 7. The image processing device according to claim 6, wherein the estimation means estimates a density distribution of the object on an image included in the moving image, and estimates the position coordinates of the object by performing a two-class classification to identify whether each position of the image represents a representative point of the object based on the density distribution.
8. 8. The image processing apparatus according to claim 6, wherein the estimation means simultaneously estimates the position coordinates and the velocity distribution of the object in the moving image.
9. 9. The image processing device according to claim 6, wherein the velocity distribution includes an X-direction velocity distribution expressing an amount of movement of an object in an X-axis direction during the specific period for each position of the moving image, and a Y-direction velocity distribution expressing an amount of movement of an object in a Y-axis direction during the specific period for each position of the moving image.
10. 10. The image processing device according to claim 6, wherein the estimation means estimates the amount of movement of the object during the specific period based on values of an area in the speed distribution that is defined based on the position coordinates of the object, and estimates the motion of the object based on the position coordinates of the object and the amount of movement of the object.
11. 11. The image processing apparatus according to claim 6, wherein the estimation means estimates at least one of the position coordinates and the velocity distribution using a neural network.
12. The acquiring means extracts one or more partial images that are parts of each image included in the moving image, The image processing apparatus according to claim 1 , wherein the estimation means estimates a movement of an object in each of the partial images.
13. 13. The image processing device according to claim 12, wherein the acquisition means divides the image into a plurality of regions, and for each of one or more regions selected from the plurality of regions, extracts the partial image from the region and a margin region of the region.
14. The image processing device according to claim 1 , further comprising a measuring unit that measures a flow of one or more of the objects based on a movement trajectory of the object.
15. 15. The image processing device according to claim 14, wherein the measurement means calculates a difference between the number of the objects that have moved from one area to another area separated by a measurement area in which the flow of the objects is measured, and the number of the objects that have moved from the other area to the one area.
16. An image processing method performed by an image processing device, comprising: acquiring a video image; estimating a movement of an object during a specific period of time based on the video image; generating a movement trajectory of the object over the first period and the second period by matching a first motion vector obtained by estimation, the first motion vector indicating a movement of the object in the first period, with a second motion vector indicating a movement of the object in the second period; An image processing method characterized in that the process of generating the movement trajectory performs the matching so that a cost based on the distance between the end point position of the first movement vector and the start point position of the second movement vector is smaller.
17. A program for causing a computer to function as each of the means of the image processing device according to any one of claims 1 to 15.
Citation Information
Patent Citations
Person tracking method and person tracking device
JP2003346159A
Image processing device and method, and program
JP2007272733A
Person tracking method, person tracking device, and person tracking program
JP2010273112A
Moving image object detection device, method and program
JP2012073971A
Bed position determination device
JP2018139388A
