Motion Detection Method, Device, Electronic Device, and Storage Medium
By performing object detection and grid processing on video stream data, combined with current and historical trajectory grid data, the problem of motion detection in the prior art only recognizes motion but does not provide more information, and effective quantification and accurate detection of motion behavior is achieved.
Patent Information
- Application Number
- CN202210556500.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-20
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-05-20
AI Technical Summary
In the prior art, motion detection tasks only focus on the identification of movement and fail to effectively provide more information on motor behavior, resulting in poor application effects.
By acquiring video stream data, object detection is performed to determine the current motion trajectory, grid data is used to quantify the motion trajectory, and motion detection results are determined by comparing the current trajectory grid data with historical trajectory grid data.
Effective quantitative expression of motor behavior is achieved, accurately reflects the movement effect, and improves the accuracy and effect of motion detection.
Smart Images

Figure CN114926901B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer vision technology, and particularly to a motion detection method, apparatus, electronic device, and storage medium. Background Art
[0002] Motion detection is one of the most widely applied tasks in the field of computer vision (CV, Computer Vision). However, in related technologies, motion detection tasks often only focus on the recognition of motion. For example, abnormal behavior detection, motion trajectory detection, etc. These tasks only focus on identifying motion behaviors from video data, and do not provide more information about the motion behaviors themselves, such as motion effect expression, motion analysis, etc. Therefore, the application effect of motion detection in related technologies is poor. Summary of the Invention
[0003] Embodiments of the present disclosure provide a motion detection method, apparatus, electronic device, and storage medium.
[0004] In a first aspect, embodiments of the present disclosure provide a motion detection method, including:
[0005] Obtaining video stream data to be processed;
[0006] Performing object detection on the video stream data to determine the current motion trajectory of the target object within the target area;
[0007] Determining current trajectory grid data corresponding to the current motion trajectory according to the current motion trajectory and grid data corresponding to the target area;
[0008] Determining a motion detection result of the target object according to the current trajectory grid data and historical trajectory grid data; the historical trajectory grid data includes trajectory grid data corresponding to at least one historical motion trajectory of the target object, and the motion detection result is used to reflect the relationship between the current motion trajectory and at least one historical motion trajectory.
[0009] In some embodiments,
[0010] The grid data corresponding to the target area is determined according to the following method:
[0011] Determining a target scale of the grid unit according to the size of the target object;
[0012] Performing grid processing on the target area with the grid unit of the target scale size to obtain grid data corresponding to the target area.
[0013] In some embodiments,
[0014] The grid data corresponding to the target area includes a plurality of grid cells; determining the current trajectory grid data corresponding to the current movement trajectory according to the current movement trajectory and the grid data corresponding to the target area includes:
[0015] Determining the grid cells passed by the current movement trajectory based on the grid data;
[0016] Determining the current trajectory grid data corresponding to the current movement trajectory according to the grid cells passed by the current movement trajectory.
[0017] In some embodiments,
[0018] Determining the motion detection result of the target object according to the current trajectory grid data and the historical trajectory grid data includes:
[0019] Obtaining a first trajectory coincidence degree between the current movement trajectory and any one of the historical movement trajectories according to the current trajectory grid data and the trajectory grid data corresponding to any one of the historical movement trajectories; the motion detection result of the target object includes the first trajectory coincidence degree.
[0020] In some embodiments, determining the motion detection result of the target object according to the current trajectory grid data and the historical trajectory grid data set includes:
[0021] Obtaining a second trajectory coincidence degree according to the current trajectory grid data and the trajectory frequency data obtained based on the historical trajectory grid data; the motion detection result of the target object includes the second trajectory coincidence degree.
[0022] In some embodiments, the process of obtaining the trajectory frequency data based on the historical trajectory grid data includes:
[0023] Determining the frequency of the target object passing through each grid cell in the grid data according to the historical trajectory grid data;
[0024] Obtaining the trajectory frequency data according to the frequency of the target object passing through each grid cell.
[0025] In some embodiments, the method further includes:
[0026] Updating the trajectory frequency data according to the current trajectory grid data of the current movement trajectory to obtain updated trajectory frequency data; the motion detection result of the target object includes the updated trajectory frequency data.
[0027] In some embodiments, the target object includes a curling stone, and the target area includes a curling court.
[0028] Second aspect, an embodiment of the present disclosure provides a motion detection device, including:
[0029] A video acquisition module configured to acquire video stream data to be processed;
[0030] A target detection module configured to perform target detection on the video stream data to determine the current motion trajectory of a target object within a target area;
[0031] A trajectory grid module configured to determine current trajectory grid data corresponding to the current motion trajectory according to the current motion trajectory and grid data corresponding to the target area;
[0032] A result determination module configured to determine a motion detection result of the target object according to the current trajectory grid data and historical trajectory grid data; the historical trajectory grid data includes trajectory grid data corresponding to at least one historical motion trajectory of the target object, and the motion detection result is used to reflect the relationship between the current motion trajectory and at least one historical motion trajectory.
[0033] In some embodiments, the motion detection device according to the present disclosure further includes a grid processing module, and the grid processing module is configured to:
[0034] Determine a target scale of grid cells according to the size of the target object;
[0035] Perform grid processing on the target area with the grid cells of the target scale size to obtain grid data corresponding to the target area.
[0036] In some embodiments, the trajectory grid module is configured to:
[0037] Determine grid cells passed by the current motion trajectory based on the grid data;
[0038] Determine current trajectory grid data corresponding to the current motion trajectory according to the grid cells passed by the current motion trajectory.
[0039] In some embodiments, the result determination module is configured to:
[0040] Obtain a first trajectory coincidence degree between the current motion trajectory and any one of the historical motion trajectories according to the current trajectory grid data and trajectory grid data corresponding to any one of the historical motion trajectories; the motion detection result of the target object includes the first trajectory coincidence degree.
[0041] In some embodiments, the result determination module is configured to:
[0042] Based on the current trajectory grid data and the trajectory frequency data obtained based on the historical trajectory grid data, a second trajectory coincidence degree is obtained; the motion detection result of the target object includes the second trajectory coincidence degree.
[0043] In some embodiments, the motion detection device described in the present disclosure further includes a trajectory frequency module, and the trajectory frequency module is configured to:
[0044] Based on the historical trajectory grid data, determine the frequency of the target object passing through each grid unit in the grid data;
[0045] Based on the frequency of the target object passing through each grid unit, the trajectory frequency data is obtained.
[0046] In some embodiments, the result determination module is configured to:
[0047] Based on the current trajectory grid data of the current motion trajectory, update the trajectory frequency data to obtain updated trajectory frequency data; the motion detection result of the target object includes the updated trajectory frequency data.
[0048] In some embodiments, the target object includes a curling stone, and the target area includes a curling court.
[0049] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0050] A processor; and
[0051] A memory storing computer instructions for causing the processor to execute the method according to any embodiment of the first aspect.
[0052] In a fourth aspect, an embodiment of the present disclosure provides a storage medium storing computer instructions for causing a computer to execute the method according to any embodiment of the first aspect.
[0053] The motion detection method according to the embodiment of the present disclosure includes performing target detection on the video stream data to be processed, determining the current motion trajectory of the target object in the target area, determining the trajectory grid data corresponding to the current motion trajectory according to the current motion trajectory and the grid data corresponding to the target area, and determining the motion detection result of the target object according to the current trajectory grid data and the historical trajectory grid data set. In the embodiment of the present disclosure, by gridifying the target area to obtain grid data, the grid data can be used to effectively quantify and express the motion trajectory of the target object, and by comparing the current trajectory grid data and the historical trajectory grid data, the motion detection result of the current motion trajectory is determined, which can accurately reflect the motion effect of the current motion process of the target object and improve the motion detection effect. Brief Description of the Drawings
[0054] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0055] Figure 1 Structural schematic diagram of the motion detection system according to some embodiments of the present disclosure.
[0056] Figure 2 Is a flowchart of the motion detection method according to some embodiments of the present disclosure.
[0057] Figure 3 Is a schematic diagram of the principle of the motion detection method according to some embodiments of the present disclosure.
[0058] Figure 4 Is a schematic diagram of the principle of the motion detection method according to some embodiments of the present disclosure.
[0059] Figure 5 Is a flowchart of the motion detection method according to some embodiments of the present disclosure.
[0060] Figure 6 Is a flowchart of the motion detection method according to some embodiments of the present disclosure.
[0061] Figure 7 Is a flowchart of the motion detection method according to some embodiments of the present disclosure.
[0062] Figure 8 Is a schematic diagram of the principle of the motion detection method according to some embodiments of the present disclosure.
[0063] Figure 9 Is a flowchart of the motion detection method according to some embodiments of the present disclosure.
[0064] Figure 10 Is a schematic diagram of the principle of the motion detection method according to some embodiments of the present disclosure.
[0065] Figure 11 Is a schematic diagram of the principle of the motion detection method according to some embodiments of the present disclosure.
[0066] Figure 12 Is a flowchart of the motion detection method according to some embodiments of the present disclosure.
[0067] Figure 13 Is a flowchart of the motion detection method according to some embodiments of the present disclosure.
[0068] Figure 14 is a structural block diagram of a motion detection device according to some embodiments of the present disclosure.
[0069] Figure 15 is a structural block diagram of a motion detection device according to some embodiments of the present disclosure.
[0070] Figure 16 is a structural block diagram of an electronic device according to some embodiments of the present disclosure. Detailed Embodiments
[0071] The technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the protection scope of the present disclosure. In addition, the technical features involved in different embodiments of the present disclosure described below can be combined with each other as long as they do not conflict with each other.
[0072] Motion detection is one of the important tasks in the field of computer vision (CV, Computer Vision). Motion detection refers to detecting the motion trajectory of the same object in a video stream sequence and identifying the actions of the object.
[0073] In the motion detection scenarios in the related art, attention is often only paid to the recognition of motion, and no more effective information is provided for the motion behavior itself. For example, for the trajectory detection task, in the related art, only the motion trajectory of the object is recognized from the video stream data, and no effective information expression can be provided for the quality of the object's motion effect. However, it is of great significance to detect and analyze the motion behavior of the object.
[0074] For example, in one example, taking the curling motion scenario as an example, during the entire motion process of an athlete's curling operation, where the curling stone slides on the ice surface until it stops, the generated motion trajectory can directly reflect the quality of the curling effect of this operation.
[0075] For example, in another example, taking the motion performance detection scenario of a mobile robot as an example, the motion trajectory generated by the robot during one or more movements can directly reflect the quality of the robot's movement performance, such as whether there are problems such as trajectory deviation and trajectory error.
[0076] It can be seen that in these scenario requirements, not only attention is paid to identifying the motion of the object, but more attention is paid to obtaining an effective expression of the object's motion effect through motion detection. However, the current motion detection based on computer vision has not been able to effectively cover these scenarios, resulting in a lack of many real-world applications for motion detection.
[0077] Based on this, embodiments of the present disclosure provide a motion detection method, apparatus, electronic device, and storage medium, aiming to effectively quantify the motion effect of an object based on the motion trajectory of the moving object, and can more accurately reflect the motion effect of the object.
[0078] Embodiments of the present disclosure provide a motion detection method, which can be applied to an electronic device. The electronic device described in the present disclosure can be any suitable device type, such as a mobile terminal, a wearable device, a vehicle-mounted device, a personal computer, a server, a cloud platform, etc., and the present disclosure does not limit this.
[0079] Figure 1 FIG. shows a schematic structural diagram of a motion detection system 100 in some embodiments of the present disclosure. The motion detection system 100 can be deployed in a scenario where motion detection is required, such as a curling sports field, a robot motion detection field.
[0080] As Figure 1 shown, in some embodiments, the motion detection system 100 exemplified in the present disclosure includes a video acquisition device 110 and an electronic device 120.
[0081] The video acquisition device 110 can be a camera set in a natural scene. For example, in one example, the video acquisition device 110 can be a camera set in a curling sports field, so that the video acquisition device 100 can acquire video stream data in the motion scene. In the embodiments of the present disclosure, the number, position, and viewing angle of the video acquisition device 110 are not specifically limited, and can be set according to the corresponding scene requirements, and the present disclosure does not limit this.
[0082] The electronic device 120 can establish a communication connection with the video acquisition device 110 in a wireless or wired manner, so as to receive the video stream data acquired by the video acquisition device 110. After obtaining the video stream data, the electronic device 120 can use the method of the embodiments of the present disclosure to perform motion detection on the video stream data and obtain the motion detection result of the moving object. The following is described in conjunction with Figure 2 embodiments.
[0083] As Figure 2 shown, in some embodiments, the motion detection method exemplified in the present disclosure includes:
[0084] S210. Obtain the video stream data to be processed.
[0085] In the embodiments of the present disclosure, for example, it can be passed through Figure 1The video capture device 110 as shown is used to capture the video stream data of the current scene. For example, in one example, the video capture device 110 is a camera installed in a sports field. Thus, the video stream data captured by the video capture device 110 can be the scene video occurring in the field.
[0086] The electronic device 120 can receive the video stream data sent by the video capture device 110, and this video stream data is the video stream data to be processed described in the present disclosure.
[0087] S220. Perform object detection on the video stream data to determine the current motion trajectory of the target object within the target area.
[0088] The target object refers to the moving object to be subjected to motion detection. Depending on the application scenario, the target object can be any movable object suitable for implementation. The target area refers to the moving range of the target object. In some scenarios, the target object moves within a preset moving range, and the capture range of the video capture device 110 can include the entire target area. Thus, during the movement of the target object, complete video stream data can be captured.
[0089] For example, in one example, taking the curling sports scene as an example, the target object is the curling stone, and the target area is the curling court. The athlete throws the curling stone and the curling stone slides freely within the curling court range. Thus, the content of the video stream data captured by the video capture device 110 can record a complete curling throwing process.
[0090] For example, in another example, taking the detection of the moving performance of a robot as an example, the target object is the robot, and the target area is the detection area. The robot can move within the detection area range. Thus, the content of the video stream data captured by the video capture device 110 can record a motion process of the robot.
[0091] Of course, those skilled in the art can understand that the application scenarios of the method of the present disclosure are not limited to the above examples, and the present disclosure will not enumerate them here.
[0092] In the embodiment of the present disclosure, based on the video detection technology, object detection is performed on the above video stream data, and the current motion trajectory of the target object in the video stream data can be recognized.
[0093] It can be understood that the current motion trajectory is relative to the historical motion trajectory. The motion process of the target object can include multiple motions. For example, taking the curling sports scene as an example, the athlete can perform multiple curling throwing actions in the field, and thus multiple motion trajectories of the curling stone will also appear in the scene. In the embodiment of the present disclosure, the described current motion trajectory can be any motion trajectory identified from the video stream data, and is not limited to being understood as the motion trajectory generated at the current moment.
[0094] In some embodiments, the position of the target object on each frame of the video stream data may be tracked to determine the image coordinates of the target object on each frame of the image, and then based on the timing information of the image sequence, the complete movement path of the target object during the movement process, that is, the movement trajectory of the target object, may be obtained. The movement trajectory of the target object includes the image coordinates of the target object on each frame of the image.
[0095] For the principle and process of obtaining the movement trajectory of the target object through video detection, those skilled in the art can understand and fully implement it with reference to related technologies, and the present disclosure will not elaborate on this.
[0096] S230. Determine the current trajectory grid data corresponding to the current movement trajectory according to the current movement trajectory and the grid data corresponding to the target area.
[0097] In the embodiments of the present disclosure, the target area may be pre-gridded, that is, the target area where the target object moves is divided into a plurality of grid units. The grid data includes the image coordinates of each grid unit, and the image coordinates refer to the position coordinates of the grid unit in the image coordinate system.
[0098] In some embodiments, for example, Figure 1 the scene image including the target area may be collected by the video acquisition device 110 as shown, and then the image range of the target area may be determined from the scene image through image recognition, and then the image range of the target area may be divided into a grid map with grid units of a preset scale size.
[0099] For example, Figure 3 as shown, taking the scene of curling as an example, the curling venue may be as shown in (a) in Figure 3 In the example, the curling venue is the target area. In the embodiments of the present disclosure, after the target area is gridded, the grid map as shown in (b) in Figure 3 may be obtained. The grid map includes a total of m*n grid units, and the grid data includes the image coordinates corresponding to each grid unit. Figure 3 In the embodiments of the present disclosure, after the current movement trajectory is obtained by detecting the video stream data, the current trajectory grid data corresponding to the current movement trajectory may be determined according to the current movement trajectory and the pre-established grid data.
[0100] In the embodiments of the present disclosure, after the current movement trajectory is obtained by detecting the video stream data, the current trajectory grid data corresponding to the current movement trajectory may be determined according to the current movement trajectory and the pre-established grid data.
[0101] It can be understood that the current motion trajectory includes the image coordinates of the motion trajectory in the image coordinate system, and the grid data includes the image coordinates of each grid cell in the image coordinate system. In the embodiments of the present disclosure, based on the image coordinates corresponding to the current motion trajectory and the image coordinates of each grid cell in the grid data, all the grid cells passed by the current motion trajectory can be determined, and the trajectory grid data corresponding to the current motion trajectory can be obtained according to the grid cells passed by the current motion trajectory. That is to say, the trajectory grid data includes the grid cells passed by the motion trajectory and the image coordinates of these grid cells.
[0102] For example Figure 4 As shown, the motion trajectory during an athlete's one-time curling throwing process is as Figure 4 shown in (a). In the embodiments of the present disclosure, based on the image coordinates of the motion trajectory and the image coordinates of each grid cell in the grid data, the trajectory grid data corresponding to the motion trajectory can be determined, that is, as Figure 4 shown in (b). The trajectory grid data includes the grid cells passed by the motion trajectory and the image coordinates of the passed grid cells.
[0103] S240. Determine the motion detection result of the target object according to the current trajectory grid data and the historical trajectory grid data.
[0104] In the embodiments of the present disclosure, the historical trajectory grid data includes the trajectory grid data corresponding to the target object in at least one historical motion trajectory. The motion detection result of the current motion trajectory of the target object can be determined according to the current trajectory grid data corresponding to the current motion trajectory and the trajectory grid data corresponding to at least one historical motion trajectory.
[0105] Among them, the motion detection result of the target object can reflect the relationship between the current motion trajectory and at least one historical motion trajectory. Specifically, the motion detection result includes, but is not limited to: the first trajectory coincidence degree between the current motion trajectory and any one historical motion trajectory, and the second trajectory coincidence degree between the current motion trajectory and all historical motion trajectories.
[0106] Taking the curling sports scenario as an example, during the process of an athlete throwing a curling stone, based on the effect of the current curling throw, the athlete can rely on personal experience to judge the ice friction situation on the curling throw trajectory, so as to guide the next curling throw to make corresponding adjustments.
[0107] It can be seen that in this scenario, the motion analysis of the current motion trajectory of the curling stone is of great significance. However, in the related art, it can only rely on the personal experience of the athlete and cannot accurately quantify the effect of the current curling throw. In the embodiments of the present disclosure, through the current trajectory grid data of the current motion trajectory and the trajectory grid data of at least one historical motion trajectory, a motion detection result for quantitatively expressing the effect of the current motion trajectory is obtained.
[0108] In some embodiments, the first trajectory coincidence degree between the current trajectory grid data of the current motion trajectory and the trajectory grid data of the previous single historical motion trajectory can be calculated. Alternatively, the second trajectory coincidence degree can be calculated based on the current trajectory grid data of the current motion trajectory and the trajectory grid data of all historical motion trajectories. The first trajectory coincidence degree and / or the second trajectory coincidence degree can be used as the motion detection result of the current motion trajectory, which can reflect the motion effect of the current motion trajectory, such as whether there is a trajectory deviation.
[0109] Still taking the curling scenario described above as an example, based on the motion detection method described in the present disclosure, the coincidence degree between the current trajectory grid data of the current throwing process and the historical trajectory grid data of the previous throwing process can be calculated. This coincidence degree can effectively quantify the throwing effect of the athlete in the current throw. If the coincidence degree is high, it indicates that there are fewer mistakes in the current throw; conversely, if the coincidence degree is low, it indicates that there are more mistakes in the current throw. Based on this, the athlete can be effectively guided to make adjustments.
[0110] The process of calculating the first trajectory coincidence degree and the second trajectory coincidence degree will be described in the following embodiments of the present disclosure and will not be elaborated here for the time being.
[0111] Of course, the motion detection results of the embodiments of the present disclosure are not limited to the first coincidence degree and the second coincidence degree mentioned in the above examples, and may also include other detection results suitable for expressing the motion effect, such as the trajectory frequency data obtained from the historical motion trajectory. The present disclosure does not limit this.
[0112] It can be understood that in the embodiments of the present disclosure, the motion detection result obtained from the current trajectory grid data of the current motion trajectory and the trajectory grid data of the historical motion trajectory can effectively quantify the motion of the target object. For example, for the curling motion trajectory in the above example, the present disclosure method can effectively quantify the throwing effect of the athlete in the current throw, so that the athlete's training can be scientifically guided according to the motion detection result.
[0113] Of course, the above is only taking the curling scenario as an example. In fact, the method of the present disclosure is not limited to the curling scenario. For example, taking the scenario of detecting the moving performance of a mobile robot as an example, by using the method of the present disclosure to calculate the trajectory coincidence degree based on the current trajectory grid data of the current moving trajectory of the robot and the historical trajectory grid, the moving performance of the robot can be effectively reflected. For example, a lower coincidence degree indicates a larger moving error of the robot, and thus the moving performance of the robot is poor; conversely, it is the opposite. It can be seen that the method of the present disclosure can also quantify the moving performance of the robot, so that the R & D personnel can optimize and improve the moving performance of the robot according to the motion detection result.
[0114] As described above, in the embodiments of the present disclosure, grid data is obtained by meshing the target area. The grid data can be used to effectively quantify and represent the motion trajectory of the target object. By comparing the current trajectory grid data with the historical trajectory grid data, the motion detection result of the current motion trajectory can be determined, which can accurately reflect the motion effect of the target object in the current motion process and improve the motion detection effect.
[0115] In the embodiments of the present disclosure, before performing motion detection on the target object, it is necessary to mesh the target area where the target object moves. The following will be described in conjunction with Figure 5 this.
[0116] As Figure 5 shown, in some embodiments, the process of meshing the target area to obtain grid data includes:
[0117] S510. Determine the target scale of the grid cell according to the size of the target object.
[0118] S520. Mesh the target area with grid cells of the target scale size to obtain grid data corresponding to the target area.
[0119] In an example, still taking the curling sports scene as an example, the target object is the curling stone, and the target area is the Figure 3 curling stone venue shown in (a) in the figure. That is, in the embodiments of the present disclosure, it is necessary to mesh the curling stone venue.
[0120] In some embodiments, a scene image including the curling stone venue can be collected by, for example, Figure 1 the video capture device 110 shown in the figure, and then the image range of the curling stone venue can be determined from the scene image through image recognition. Before meshing the image range of the curling scene, the size of the grid cell can be determined first.
[0121] In the embodiments of the present disclosure, the target scale of the grid cell can be determined according to the size of the target object. It can be understood that the smaller the target scale of the grid cell, the higher the refinement effect on the target area, and the more accurate the obtained trajectory grid data, but the larger the amount of data calculated by the system, and vice versa.
[0122] Therefore, in some embodiments, the scale of the grid cell in the world coordinate system can be set to be basically the same as or close to the size of the curling stone, so as to balance accuracy and operation speed.
[0123] After determining the scale of the grid cell in the world coordinate system, based on the mapping relationship between the world coordinate system and the image coordinate system of the video acquisition device 110, the target scale of the grid cell in the image coordinate system can be obtained. Then, the grid cell with the target scale is used to perform grid processing on the image range of the curling scene.
[0124] For example Figure 3 As shown in (b), using the grid cell with the target scale to perform grid processing on the curling scene, a grid map of m*n as shown in the figure can be obtained. The grid data corresponding to the grid map includes the image coordinates of each grid cell in the image coordinate system.
[0125] As can be seen from the above, in the embodiments of the present disclosure, by performing grid processing on the target area of the object movement, the movement trajectory of the object can be effectively quantified and expressed using the grid data, and an accurate movement detection result can be obtained.
[0126] After obtaining the grid data of the target area, the grid data can be stored in the electronic device 120. Thus, when performing movement detection on a certain movement trajectory of the target object subsequently, the grid data can be retrieved to determine the trajectory grid data corresponding to the current movement trajectory of the target object. The following is described in conjunction with Figure 6 embodiments.
[0127] As Figure 6 shown, in some embodiments, the process of determining the current trajectory grid data according to the current movement trajectory and the grid data in the movement detection method of the present disclosure example includes:
[0128] S610. Determine the grid cells passed by the current movement trajectory based on the grid data.
[0129] S620. Determine the current trajectory grid data corresponding to the current movement trajectory according to the grid cells passed by the current movement trajectory.
[0130] It can be understood that each grid cell in the grid data represents a partial area in the target area. Thus, the movement trajectory generated by the target object moving in the target area will pass through some grid cells.
[0131] Therefore, in the embodiments of the present disclosure, after determining the current movement trajectory of the target object, according to the image coordinates of the current movement trajectory in the image coordinate system and the image coordinates of each grid cell in the grid data in the image coordinate system, each grid cell passed by the current movement trajectory is obtained. The current trajectory grid data includes each grid cell passed by the current movement trajectory and the image coordinates of the passed grid cells.
[0132] For example Figure 4 shown in the curling scene, the current movement trajectory of the athlete's current curling throw is asFigure 4 As shown in (a), based on the current motion trajectory and grid cells, the grid cells passed by the current motion trajectory are marked, and the obtained current trajectory grid data is as Figure 4 shown in (b). The current trajectory grid data includes the passed grid cells ( Figure 4 the shaded part in the figure), and the image coordinates corresponding to these grid cells.
[0133] As can be seen from the above, in the embodiments of the present disclosure, by performing grid processing on the target area of the object's motion, the motion trajectory of the object can be effectively quantified and expressed using grid data, and an accurate motion detection result can be obtained.
[0134] In some embodiments, the motion detection result of the target object may include the following types of data:
[0135] 1) The first trajectory coincidence degree between the current motion trajectory and any one of the historical motion trajectories.
[0136] For example, taking the scene of the pot - throwing sport as an example, the current pot - throwing corresponds to the current trajectory grid data A, and a certain historical pot - throwing corresponds to the trajectory grid data B. Thus, the trajectory coincidence degree of the two pot - throwings, that is, the first trajectory coincidence degree, can be obtained according to the current trajectory grid data A and the trajectory grid data B.
[0137] 2) The trajectory frequency data obtained according to multiple historical trajectory grid data.
[0138] The trajectory frequency data represents the frequency of each grid cell passed by multiple historical motion trajectories in the grid data. Still taking the pot - throwing sport scene as an example, assume that the athlete has carried out 10 pot - throwings in total, each pot - throwing corresponds to a trajectory grid data, and each trajectory grid data includes multiple grid cells. Different trajectory grid data may include the same grid cells or different grid cells. Thus, the frequency of each grid cell is statistically calculated according to the trajectory grid data of these 10 pot - throwings to obtain the trajectory frequency data.
[0139] 3) The second trajectory coincidence degree between the current trajectory grid data of the current motion trajectory and the trajectory frequency data.
[0140] Still taking the pot - throwing sport scene as an example, the current pot - throwing corresponds to the current trajectory grid data A, and the trajectory frequency data corresponding to multiple historical pot - throwings is Thus, according to the current trajectory grid data A and the trajectory frequency data the trajectory coincidence degree, that is, the second trajectory coincidence degree, is obtained.
[0141] Of course, those skilled in the art can understand that the motion detection results are not limited to the above several types of data, and may also include any other data suitable for quantitatively expressing the motion effect. The present disclosure does not limit this. Next, the determination processes of the above three types of motion detection result data will be described separately.
[0142] As Figure 7 shown, in some embodiments, the motion detection method exemplified by the present disclosure for obtaining the motion detection result of the target object includes:
[0143] S710. Obtain the first trajectory coincidence degree between the current motion trajectory and any one of the historical motion trajectories according to the current trajectory grid data of the current motion trajectory and the trajectory grid data corresponding to any one of the historical motion trajectories.
[0144] S720. Determine the first trajectory coincidence degree as the motion detection result of the target object.
[0145] In the embodiment of the present disclosure, based on the foregoing motion detection process, the trajectory grid data corresponding to each motion trajectory of the target object can be obtained. For example, the current trajectory grid data corresponding to the current motion trajectory T i of the target object is A, and the historical trajectory grid data corresponding to the previous motion trajectory T i-1 of the target object is B.
[0146] After obtaining the trajectory grid data A and B of the two motion trajectories, according to the trajectory grid data A and the trajectory grid data B, the first trajectory coincidence degree between the two is obtained, that is, the ratio of the intersection of the grid cells occupied by the trajectory grid data A and the grid cells occupied by the trajectory grid data B to the union of the two is the first trajectory coincidence degree of the motion trajectories A and B. Specifically expressed as:
[0147]
[0148] Taking the above-mentioned scene of the pot-throwing sport as an example, assume that the athlete has carried out 2 pot-throwing processes successively. Define the motion trajectory generated in the second pot-throwing process as the "current motion trajectory", and the motion trajectory generated in the first pot-throwing process as the "historical motion trajectory".
[0149] Based on the foregoing method process of the present disclosure, the historical trajectory grid data corresponding to the historical motion trajectory can be obtained. For example, the historical motion trajectory A is as Figure 4 shown in (a) below, and the corresponding historical trajectory grid data A is as Figure 4 shown in (b) below.
[0150] In addition, based on the foregoing method process, the current trajectory grid data corresponding to the current motion trajectory can be obtained. For example, the current motion trajectory B is as Figure 8As shown in (a), the corresponding current trajectory grid data B is as Figure 8 shown in (b).
[0151] After obtaining the trajectory grid data A and the trajectory grid data B, the first trajectory coincidence degree between the two can be calculated according to the above formula. In the curling sports scenario, athletes expect a high coincidence degree between the movement trajectories of two throws, so that more prior knowledge can be obtained from the previous throw. Therefore, if the first trajectory coincidence degree is large, it means that the effect of the current throw is good; on the contrary, if the first trajectory coincidence degree is small, it means that the effect of the current throw is poor. That is, the specific data of the first trajectory coincidence degree can be used to quantitatively express the movement effect of the athlete's throw. Based on this first trajectory coincidence degree, the throwing effect of the athlete can be effectively evaluated, and the athlete can be guided to make corresponding adjustments.
[0152] Therefore, in the embodiments of the present disclosure, the obtained first trajectory coincidence degree can be determined as the movement result of the target object.
[0153] Of course, it can be understood that the first trajectory coincidence degree in the embodiments of the present disclosure is not limited to the coincidence degree between two adjacent movement trajectories, but can also be the coincidence degree between any two movement trajectories, and the present disclosure does not limit this.
[0154] As can be seen from the above, in the embodiments of the present disclosure, based on the trajectory grid data, the first trajectory coincidence degree between the current movement trajectory and any historical movement trajectory can be obtained, which can effectively quantify and express the objective and effective effect of the object's movement, and improve the accuracy of movement detection.
[0155] As Figure 9 shown, in some embodiments, the process of obtaining the trajectory frequency data in the movement detection method exemplified in the present disclosure includes:
[0156] S910. Determine the frequency of the target object passing through each grid unit of the grid data according to the historical trajectory grid data.
[0157] S920. Obtain the trajectory frequency data according to the frequency of the target object passing through each grid unit.
[0158] In the embodiments of the present disclosure, as can be seen from the foregoing, the historical trajectory grid data includes the trajectory grid data corresponding to one or more historical movement trajectories, and each trajectory grid data includes a plurality of grid units. Different trajectory grid data may include the same grid units or different grid units. By counting the frequency of each grid unit appearing in the historical trajectory grid data set, the corresponding trajectory frequency data can be obtained.
[0159] Taking the above-mentioned curling scenario as an example, assume that the athlete has carried out 5 consecutive curling throws, and the corresponding trajectory grid data are respectively as Figure 10 shown in
[0160] It can be understood that each trajectory grid data is a grid area formed by a number of grid cells in sequence, and there may be the same grid cells in multiple trajectory grid data. In the embodiments of the present disclosure, the frequency of each grid cell being passed by these trajectory grid data can be counted to obtain a trajectory frequency map.
[0161] For example, for a certain grid cell, if the trajectory grid data of 5 consecutive curling throws do not pass through this grid cell, then the frequency corresponding to this grid cell is 0; if 2 of the 5 trajectory grid data of curling throws pass through this grid cell, then the frequency corresponding to this grid cell is 2; if the trajectory grid data of 5 consecutive curling throws all pass through this grid cell, then the frequency corresponding to this grid cell is 5... and so on. The frequencies of all grid cells in the grid data can be counted.
[0162] In this example, after obtaining the frequency of each grid cell in the grid data, the obtained trajectory frequency map can be as Figure 11 shown. The data corresponding to this trajectory frequency map is the trajectory frequency data, and the trajectory frequency data can be determined as the motion detection result.
[0163] It can be understood that in the trajectory frequency map as shown in Figure 11 , the frequency of each grid cell being passed can be intuitively seen, so that the multiple curling trajectories of the athlete can be comprehensively analyzed to obtain the ice surface condition or the curling effect. For example, it can be known from the trajectory frequency map which ice surface positions are passed more frequently, so the friction coefficient corresponding to this ice surface area is smaller, and vice versa. Also, for example, the effect of the athlete's multiple curling throws can be known through the degree of dispersion of the trajectory frequency map. The lower the degree of dispersion, the higher the coincidence degree of the multiple trajectories, and the better the curling effect, and vice versa.
[0164] As can be seen from the above, in the embodiments of the present disclosure, by obtaining the trajectory frequency data according to the trajectory grid data of the historical motion trajectory, the multiple motion conditions of the target object can be intuitively counted and expressed, which is beneficial to analyzing the motion effect of the object.
[0165] As Figure 12 shown, in some embodiments, the process of obtaining the motion detection result of the target object in the motion detection method of the present disclosure example includes:
[0166] S1210. Obtain a second trajectory coincidence degree according to the current trajectory network data of the current motion trajectory and the trajectory frequency data obtained based on the historical trajectory grid data.
[0167] S1220. Determine the second trajectory coincidence degree as the motion detection result of the target object.
[0168] In the embodiments of the present disclosure, after obtaining the current trajectory grid data corresponding to the current motion trajectory through the foregoing process, in addition to obtaining the first trajectory coincidence degree between the current motion trajectory and any one of the historical motion trajectories according to the process of the foregoing Figure 8 embodiments, the second trajectory coincidence degree between the two can also be obtained according to the current trajectory grid data of the current motion trajectory and the foregoing trajectory frequency data.
[0169] It can be understood that the trajectory frequency data represents the overall situation of one or more historical motion trajectories. By calculating the second trajectory coincidence degree between the current trajectory grid data of the current motion trajectory and the trajectory frequency data, the difference between the current motion trajectory and the overall motion situation in the past period can be reflected.
[0170] In some embodiments, the current trajectory grid data C corresponding to the current motion trajectory can be obtained through the foregoing method flow. The second trajectory coincidence degree between the current trajectory grid data C and the trajectory frequency data is obtained, that is, the ratio of the intersection of the grid cells occupied by the trajectory grid data C and the grid cells included in the trajectory frequency data to the grid cells occupied by the trajectory grid data C is the second trajectory coincidence degree. Specifically expressed as:
[0171]
[0172] Still taking the foregoing curling sports scenario as an example, the trajectory frequency data obtained based on the historical 5 curling processes can be as Figure 11 shown, which will not be elaborated herein by the present disclosure. On the basis of the Figure 11 embodiments, the athlete conducts the 6th curling process, and defines the motion trajectory generated in this curling process as the "current motion trajectory".
[0173] Based on the foregoing method process, the current trajectory grid data C corresponding to the current motion trajectory can be obtained, and then the second trajectory coincidence degree corresponding to the current motion trajectory can be calculated according to the above formula.
[0174] Based on the above, it can be seen that the current trajectory grid data C represents the movement trajectory of the athlete's current curling throw, and the trajectory frequency data represents the comprehensive situation of the historical curling process. Therefore, if the second trajectory coincidence degree is larger, it indicates that the movement trajectory of the current curling throw has a higher coincidence with the historical trajectory, and the effect of this curling throw is better. On the contrary, if the second trajectory coincidence degree is smaller, it indicates that the movement trajectory of the current curling throw has a lower coincidence with the historical trajectory, and the effect of this curling throw is worse. That is to say, the specific data of the second trajectory coincidence degree can be used to quantitatively express the movement effect of the athlete's curling throw. Based on this second trajectory coincidence degree, the curling throw effect of the athlete can be effectively evaluated, and the athlete can be guided to make corresponding adjustments.
[0175] Therefore, in the embodiments of the present disclosure, the obtained second trajectory coincidence degree can be determined as the movement result of the target object.
[0176] As can be seen from the above, in the embodiments of the present disclosure, based on the trajectory grid data, the second trajectory coincidence degree between the current movement trajectory and the historical movement trajectory can be obtained, which can effectively quantify and express the objective and effective effect of the object's movement, and improve the accuracy of movement detection.
[0177] In some embodiments, after obtaining the current trajectory grid data of the current movement trajectory, the trajectory frequency data can also be updated by using the current trajectory grid data of the current movement trajectory. For example Figure 12 In the embodiment, after obtaining the current trajectory grid data corresponding to the 6th curling throw process, the trajectory frequency data can also be updated by using the current trajectory grid data, for example Figure 11 shown in the trajectory frequency data. The following will be described in conjunction with Figure 13 the embodiment.
[0178] As Figure 13 shown, in some embodiments, the movement detection method of the present disclosure example includes:
[0179] S1310. Update the trajectory frequency data according to the current trajectory grid data of the current movement trajectory to obtain the updated trajectory frequency data.
[0180] S1320. Determine the updated trajectory frequency data as the movement detection result of the target object.
[0181] In the embodiments of the present disclosure, the current trajectory grid data of the current movement trajectory represents the grid cells passed by the current movement trajectory of the target object. The trajectory frequency data represents the grid cells passed by the target object within a previous period of time. The trajectory frequency data can be updated based on the trajectory grid data of the current movement trajectory, that is, the grid cells passed by the current trajectory grid data are counted in the trajectory frequency data to update the trajectory frequency.
[0182] For example, in the above curling example scenario, after obtaining the trajectory grid data of the current motion trajectory generated during the 6th curling throw, based on the trajectory frequency data as shown in Figure 11 the current trajectory grid data of the 6th curling throw can be counted in the trajectory frequency data, thereby updating the trajectory frequency data. That is, the updated trajectory frequency data includes the trajectory grid data corresponding to the 6 curling throws, and then the updated trajectory frequency data can be determined as the motion detection result of the target object.
[0183] It can be understood that in the embodiments of the present disclosure, motion detection can be performed on each motion trajectory in real time to obtain a motion detection result. For example, in one example, after an athlete completes a curling throw, the motion detection system 100 can obtain the trajectory grid data of this curling throw based on the above process, and then obtain the first trajectory coincidence degree based on the trajectory grid data of this curling throw and the trajectory grid data of the previous curling throw; obtain the second trajectory coincidence degree based on the trajectory grid data of this curling throw and the trajectory frequency data; update the trajectory frequency data based on the current trajectory grid data to obtain new trajectory frequency data. When the athlete performs the next curling throw, the same process is repeated, and the first trajectory coincidence degree, the second trajectory coincidence degree, and the trajectory frequency data corresponding to the next curling throw can be obtained.
[0184] As can be seen from the above, in the embodiments of the present disclosure, by gridifying the target area to obtain grid data, the motion trajectory of the target object can be effectively quantified and expressed using the grid data, and by comparing the current trajectory grid data with the historical trajectory grid data to determine the motion detection result of the current motion trajectory, the motion effect of the target object's current motion process can be accurately reflected, improving the motion detection effect. Especially for sports scenarios, based on the embodiments of the present disclosure, the motion trajectory effect can be quantitatively analyzed in real time to timely guide the athlete to make adjustments to ensure the optimal motion effect.
[0185] The embodiments of the present disclosure provide a motion detection device, which can be applied to an electronic device. The electronic device described in the present disclosure can be any suitable device type, such as a mobile terminal, a wearable device, a vehicle-mounted device, a personal computer, a server, a cloud platform, etc., and the present disclosure does not limit this.
[0186] As Figure 14 shown, in some embodiments, the motion detection device of the present disclosure example includes:
[0187] A video acquisition module 10, configured to acquire video stream data to be processed;
[0188] The target detection module 20 is configured to perform target detection on the video stream data and determine the current motion trajectory of the target object within the target area;
[0189] The trajectory grid module 30 is configured to determine the corresponding current trajectory grid data in the current motion trajectory according to the current motion trajectory and the grid data corresponding to the target area;
[0190] The result determination module 40 is configured to determine the motion detection result of the target object according to the current trajectory grid data and the historical trajectory grid data; the historical trajectory grid data includes the trajectory grid data corresponding to the target object in at least one historical motion trajectory, and the motion detection result is used to reflect the relationship between the current motion trajectory and at least one historical motion trajectory.
[0191] As can be seen from the above, in the embodiments of the present disclosure, by gridifying the target area to obtain grid data, the grid data can be used to effectively quantify and express the motion trajectory of the target object, and by comparing the current trajectory grid data and the historical trajectory grid data, the motion detection result of the current motion trajectory can be determined, which can accurately reflect the motion effect of the target object in the current motion process and improve the motion detection effect.
[0192] As Figure 15 shown, in some embodiments, the motion detection device of the present disclosure further includes a grid processing module 50, and the grid processing module 50 is configured to:
[0193] Determine the target scale of the grid unit according to the size of the target object;
[0194] Perform gridification processing on the target area according to the grid unit with the target scale size to obtain the grid data corresponding to the target area.
[0195] As can be seen from the above, in the embodiments of the present disclosure, by performing gridification processing on the target area of the object motion, the grid data can be used to effectively quantify and express the motion trajectory of the object and obtain an accurate motion detection result.
[0196] In some embodiments, the trajectory grid module 30 is configured to:
[0197] Determine the grid units passed by the current motion trajectory based on the grid data;
[0198] Determine the current trajectory grid data corresponding to the current motion trajectory according to the grid units passed by the current motion trajectory.
[0199] As described above, in the embodiments of the present disclosure, by performing grid processing on the target area of the object's movement, the movement trajectory of the object can be effectively quantified and expressed using grid data, and an accurate movement detection result can be obtained.
[0200] In some embodiments, the result determination module 40 is configured to:
[0201] According to the current trajectory grid data and the trajectory grid data corresponding to any historical movement trajectory, obtain the first trajectory coincidence degree between the current movement trajectory and the any historical movement trajectory; the movement detection result of the target object includes the first trajectory coincidence degree.
[0202] In some embodiments, the result determination module 40 is configured to:
[0203] According to the current trajectory grid data and the trajectory frequency data obtained based on the historical trajectory grid data, obtain the second trajectory coincidence degree; the movement detection result of the target object includes the second trajectory coincidence degree.
[0204] As described above, in the embodiments of the present disclosure, based on the trajectory grid data, the trajectory coincidence degree between the current movement trajectory and the historical movement trajectory can be obtained, which can effectively quantify and express the objective effect of the object's movement, and improve the accuracy of movement detection.
[0205] As Figure 15 shown, in some embodiments, the movement detection device of the present disclosure further includes a trajectory frequency module 60, and the trajectory frequency module 60 is configured to:
[0206] According to the historical trajectory grid data, determine the frequency of the target object passing through each grid unit in the grid data;
[0207] According to the frequency of the target object passing through each grid unit, obtain the trajectory frequency data.
[0208] In some embodiments, the result determination module 40 is configured to:
[0209] According to the current trajectory grid data of the current movement trajectory, update the trajectory frequency data to obtain the updated trajectory frequency data; the movement detection result of the target object includes the updated trajectory frequency data.
[0210] In some embodiments, the target object includes a curling stone, and the target area includes a curling court.
[0211] As described above, in the embodiments of the present disclosure, grid data is obtained by gridifying the target area. The grid data can be used to effectively quantify and represent the movement trajectory of the target object. And by comparing the current trajectory grid data with the historical trajectory grid data, the motion detection result of the current motion trajectory can be determined, which can accurately reflect the motion effect of the target object in the current motion process and improve the motion detection effect. Especially for sports scenarios, based on the embodiments of the present disclosure, the motion trajectory effect can be quantitatively analyzed in real time to timely guide the athlete to make adjustments to ensure the optimal motion effect.
[0212] Embodiments of the present disclosure provide an electronic device, including:
[0213] a processor; and
[0214] a memory storing computer instructions for causing the processor to execute the method of any of the above embodiments.
[0215] Embodiments of the present disclosure provide a storage medium storing computer instructions for causing a computer to execute the method of any of the above embodiments.
[0216] Specifically, Figure 16 FIG. shows a schematic structural diagram of an electronic device 600 suitable for implementing the method of the present disclosure. Through Figure 16 the shown electronic device, the corresponding functions of the above processor and storage medium can be realized.
[0217] As Figure 16 shown, the electronic device 600 includes a processor 601, which can perform various appropriate actions and processes according to a program stored in the memory 602 or a program loaded into the memory 602 from the storage section 608. In the memory 602, various programs and data required for the operation of the electronic device 600 are also stored. The processor 601 and the memory 602 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0218] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed so that a computer program read from it can be installed into the storage section 608 as needed.
[0219] In particular, according to an embodiment of the present disclosure, the above method process may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product that includes a computer program tangibly embodied on a machine-readable medium, the computer program including program code for performing the above method. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611.
[0220] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functions, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0221] Obviously, the above embodiments are only examples for clear illustration and are not limitations on the embodiments. For those of ordinary skill in the art, other different forms of changes or variations can be made based on the above description. It is not necessary and impossible to enumerate all the embodiments here. And the obvious changes or variations derived therefrom are still within the protection scope of the present disclosure.
Claims
1. A motion detection method, characterized in that, it includes: Obtain video stream data to be processed; Perform object detection on the video stream data to determine the current motion trajectory of the target object within the target area; According to the current motion trajectory and the grid data corresponding to the target area, determine the current trajectory grid data corresponding to the current motion trajectory; According to the current trajectory grid data and historical trajectory grid data, determine the motion detection result of the target object; the historical trajectory grid data includes the trajectory grid data corresponding to the target object's at least one historical motion trajectory, and the motion detection result is used to reflect the relationship between the current motion trajectory and at least one historical motion trajectory; The step of determining the motion detection result of the target object according to the current trajectory grid data and the historical trajectory grid data set includes: Obtain a second trajectory coincidence degree according to the current trajectory grid data and the trajectory frequency data obtained based on the historical trajectory grid data; The motion detection result of the target object includes the second trajectory coincidence degree, and the trajectory frequency data includes the frequency of the historical trajectory grid data passing through each grid cell.
2. The method according to claim 1, characterized in that, Determine the grid data corresponding to the target area in the following manner: Determine the target scale of the grid cell according to the size of the target object; Perform grid processing on the target area with the grid cells of the target scale size to obtain the grid data corresponding to the target area.
3. The method according to claim 1, characterized in that, The grid data corresponding to the target area includes multiple grid cells; the step of determining the current trajectory grid data corresponding to the current motion trajectory according to the current motion trajectory and the grid data corresponding to the target area includes: Determine the grid cells passed by the current motion trajectory based on the grid data; According to the grid cells passed by the current motion trajectory, determine the current trajectory grid data corresponding to the current motion trajectory.
4. The method according to any one of claims 1 to 3, characterized in that, The step of determining the motion detection result of the target object according to the current trajectory grid data and the historical trajectory grid data further includes: Obtain a first trajectory coincidence degree between the current motion trajectory and any one of the historical motion trajectories according to the current trajectory grid data and the trajectory grid data corresponding to any one of the historical motion trajectories; the motion detection result of the target object includes the first trajectory coincidence degree.
5. The method according to claim 1, characterized in that, The process of obtaining the trajectory frequency data based on the historical trajectory grid data includes: According to the historical trajectory grid data, determine the frequency of the target object passing through each grid cell in the grid data; According to the frequency of the target object passing through each grid cell, obtain the trajectory frequency data.
6. The method according to claim 1, characterized in that, The method further includes: Update the trajectory frequency data according to the current trajectory grid data of the current motion trajectory to obtain updated trajectory frequency data; the motion detection result of the target object includes the updated trajectory frequency data.
7. The method according to claim 6, wherein, the target object includes a curling stone, and the target area includes a curling court.
8. A motion detection device, wherein, it includes: a video acquisition module configured to acquire video stream data to be processed; a target detection module configured to perform target detection on the video stream data to determine the current motion trajectory of the target object within the target area; a trajectory grid module configured to determine the corresponding current trajectory grid data in the current motion trajectory according to the current motion trajectory and the grid data corresponding to the target area; a result determination module configured to determine the motion detection result of the target object according to the current trajectory grid data and the historical trajectory grid data; the historical trajectory grid data includes the trajectory grid data corresponding to at least one historical motion trajectory of the target object, and the motion detection result is used to reflect the relationship between the current motion trajectory and at least one historical motion trajectory; the result determination module is configured to: obtain a second trajectory coincidence degree according to the current trajectory grid data and the trajectory frequency data obtained based on the historical trajectory grid data; the motion detection result of the target object includes the second trajectory coincidence degree, and the trajectory frequency data includes the frequencies of the historical trajectory grid data passing through each grid unit.
9. An electronic device, wherein, it includes: a processor; and a memory storing computer instructions, and the computer instructions are used to cause the processor to execute the method according to any one of claims 1 to 7.
10. A storage medium, wherein, it stores computer instructions, and the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Target typical activity mode deviation warning method
CN111209457A
Motion track management method, device and equipment and computer readable storage medium
CN114359343A