Video data processing method and electronic device
By identifying and filtering target objects and their motion trajectories in videos, and filtering and classifying video clips, the problem of low video data processing efficiency in the existing technology is solved, and the analysis efficiency and storage space utilization are improved.
Patent Information
- Application Number
- CN202011563793.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-25
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-12-25
AI Technical Summary
In the actual training of multi-player ball sports, existing technology is difficult to effectively edit and filter video data, resulting in coaches and players needing to view the entire video, lack of targeted guidance, heavy workload and low efficiency.
By identifying the target object and the movement trajectory of the target object in the video, the video clips are filtered based on the trajectory relationship, invalid clips are deleted, valid video clips are retained, interfering objects are further eliminated, and the remaining videos are classified and labeled.
It achieves more targeted analysis of target objects, improves analysis efficiency, reduces the storage space occupied by invalid videos, and simplifies the coach's review process.
Smart Images

Figure CN112765399B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a video data processing method and electronic device. Background Art
[0002] At present, there are more and more scenarios where video data is processed to assist in event analysis, such as solving criminal cases, dance training, etc., and this method is often used in multi-player ball sports. For multi-player ball sports, actual combat training is often required. During the actual combat training, the assistant coach needs to record the live video in order to analyze the actions of a certain player and the reasons for scoring / losing points, and to conduct review and guidance. However, most of the current methods use the entire recorded video for review, which not only increases the workload of coaches and players, but also lacks targeted guidance for a certain player because the entire video is watched. Therefore, the video needs to be edited for the observed player. Summary of the invention
[0003] The present application provides a video data processing method and electronic device that can edit and screen videos according to the motion trajectories of different target objects and target objects in the video to obtain effective video clips.
[0004] In order to solve the above technical problems, the embodiment of the present application provides a video data processing method, including:
[0005] Obtaining a plurality of video clips, each of the plurality of video clips including a target object and a first target object;
[0006] respectively determining the motion trajectories of the target object and the first target object in each of the video segments;
[0007] The plurality of video segments are screened based on the motion trajectory of the target object in each of the video segments and the relationship between the motion trajectories of the first target object to obtain valid video segments.
[0008] Preferably, the obtaining of multiple video clips comprises:
[0009] Get the original video;
[0010] Respectively obtaining first identification information and second identification information for tracking and identifying the target object and the first target object in the original data;
[0011] Clipping the original data based on the first identification information and a preset clipping duration to obtain a first number of video clips each containing the target object;
[0012] The first number of video clips are screened based on the second identification information to obtain a second number of video clips having both the target object and the first target object.
[0013] Preferably, the step of respectively determining the motion trajectories of the target object and the first target object in each of the video clips comprises:
[0014] respectively determining the motion trajectories of the target object and the first target object in each of the video segments;
[0015] Determine a first position coordinate set corresponding to the target object based on the motion trajectory of the target object in each of the video clips;
[0016] Determine a second position coordinate set corresponding to the first target object based on the motion trajectory of the first target object in each of the video clips;
[0017] Based on the first position coordinate set and the second position coordinate set in each of the video clips, the angular change direction and the position change rate of the motion trajectory of the target object and the first target object are respectively determined.
[0018] Preferably, the screening of the plurality of video clips based on the motion trajectory of the target object in each video clip and the relationship between the motion trajectories of the first target object comprises:
[0019] performing mean processing on the change direction angles of the motion trajectories of the target object and the first target object in each of the video clips respectively to obtain a plurality of first processing results;
[0020] Based on the plurality of the first processing results and the first preset threshold, respectively determining the consistency of the change direction angle of the motion trajectory of the target object and the first target object in each of the video clips, and correspondingly generating a plurality of first screening data;
[0021] performing mean processing on the position change rates of the target object and the first target object in each of the video clips respectively to obtain a plurality of second processing results;
[0022] Based on the plurality of second processing results and a second preset threshold, respectively determining the consistency of the position change rate of the target object and the first target object in each of the video clips, and correspondingly generating a plurality of second screening data;
[0023] The plurality of video clips are filtered based on the plurality of the first filtering data and the second filtering data.
[0024] Preferably, screening the plurality of video clips based on the plurality of the first screening data and the second screening data comprises:
[0025] Determine the correlation between the target object in the video segment and the first target object based on the first screening data and the second screening data corresponding to the same video segment;
[0026] The video segment is determined to be deleted or retained based on the relevance.
[0027] As a preference, it also includes:
[0028] Obtaining the filtered valid video clips;
[0029] Determining an interfering object in the valid video segment;
[0030] Eliminate interfering objects in the valid video segment.
[0031] Preferably, the determining the interference object in the candidate video segment comprises:
[0032] Determining a second target object in the valid video segment;
[0033] determining at least a motion trajectory of the second target object;
[0034] determining at least the motion trajectory of the second target object and a relationship between the motion trajectories of the target objects;
[0035] It is determined whether the second target object is the interference object based on the relationship.
[0036] As a preference, it also includes:
[0037] Obtaining labels for classifying the valid video clips;
[0038] Analyze and process the valid video segment based on the tag;
[0039] The valid video clips are classified based on the processing results and the labels.
[0040] Preferably, the analyzing and processing the valid video segment based on the tag comprises:
[0041] Determining feature information representing category features recorded in the tag, wherein the feature information is related to the first target object;
[0042] A feature analysis is performed on the first target object in the valid video segment based on the feature information, wherein the feature analysis includes an analysis of a posture of the first target object.
[0043] Another embodiment of the present invention also provides an electronic device, including:
[0044] A processor is used to obtain multiple video clips each including a target object and a first target object, and respectively determine the motion trajectories of the target object and the first target object in each of the video clips; based on the relationship between the motion trajectory of the target object in each of the video clips and the motion trajectory of the first target object, the multiple video clips are screened to obtain valid video clips.
[0045] Based on the disclosure of the above embodiments, it can be known that the beneficial effects of the embodiments of the present application include obtaining a video clip containing a target object and a first target object, then determining the motion trajectory of the target object and the first target object in each video clip, screening the obtained video clips based on the relationship between the motion trajectories of the two, and finally deleting invalid clips to obtain valid video clips. Based on the valid video clips, the user can analyze the performance of the first target object more specifically, improve analysis efficiency, and reduce the storage space occupied by invalid videos. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A method flow chart of a flow chart of a video data processing method in an embodiment of the present invention.
[0047] Figure 2 FIG. 4 is a flowchart of a video data processing method according to another embodiment of the present invention.
[0048] Figure 3 The figure is a practical application flow chart of the video data processing method in an embodiment of the present invention.
[0049] Figure 4 1 is a structural block diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] Below, specific embodiments of the present application are described in detail with reference to the accompanying drawings, but are not intended to limit the present application.
[0051] It should be understood that various modifications may be made to the embodiments disclosed herein. Therefore, the following description should not be considered as limiting, but merely as an example of an embodiment. Other modifications within the scope and spirit of the present disclosure will occur to those skilled in the art.
[0052] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the general description of the present disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the present disclosure.
[0053] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0054] It should also be understood that, although the present application has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the present application that have the features described in the claims and are therefore within the scope of protection defined thereby.
[0055] The above and other aspects, features and advantages of the present disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.
[0056] Specific embodiments of the present disclosure are described hereinafter with reference to the accompanying drawings; however, it should be understood that the disclosed embodiments are merely examples of the present disclosure, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid obscuring the present disclosure with unnecessary or redundant details. Therefore, the specific structural and functional details disclosed herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present disclosure in a variety of ways with substantially any suitable detailed structure.
[0057] This specification may use the phrases "in one embodiment," "in another embodiment," "in a further embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present disclosure.
[0058] Below, embodiments of the present application are described in detail with reference to the accompanying drawings.
[0059] like Figure 1 As shown, an embodiment of the present invention provides a video data processing method, including:
[0060] S100: obtaining a plurality of video clips, each of which includes a target object and a first target object;
[0061] S200: Determine the motion trajectory of the target object and the first target object in each video segment respectively;
[0062] S300: Screening multiple video segments based on the motion trajectory of the target object in each video segment and the relationship between the motion trajectories of the first target object to obtain valid video segments.
[0063] For example, taking a recorded video of a football actual combat training as an example, the multiple video clips obtained by the device are clips in the recorded video, and each clip includes a target object and a first target object. The target object can be a football in this embodiment, and the first target object can be a certain player, that is, a target player. The multiple video clips can be obtained by editing the recorded video, and the specific method is not fixed. After obtaining the multiple video clips, the device will respectively determine the movement trajectory of the target object and the first target object in each video clip, that is, the trajectory of the target player when moving on the court, and the trajectory of the football moving on the court. Afterwards, the movement trajectory of the football and the target player determined in each video clip is analyzed to determine their relationship, and finally the multiple video clips obtained are screened based on the relationship, and invalid video clips are removed, while valid video clips are retained for reference and analysis by coaches or players.
[0064] From the above content, it can be seen that the beneficial effects of this embodiment include obtaining a video clip containing a target object and a first target object, then determining the motion trajectory of the target object and the first target object in each video clip, screening the obtained video clips based on the relationship between the motion trajectories of the two, and finally deleting invalid clips to obtain valid video clips. Based on the valid video clips, the user can analyze the performance of the first target object more specifically, improve analysis efficiency, and reduce the storage space occupied by invalid videos.
[0065] Furthermore, if Figure 2 As shown, in this embodiment, when obtaining multiple video clips, it includes:
[0066] S101: obtaining an original video;
[0067] S102: Obtaining first identification information and second identification information for tracking and identifying a target object and a first target object in raw data respectively;
[0068] S103: editing the original data based on the first identification information and the preset editing duration to obtain a first number of video clips each containing the target object;
[0069] S104: Screening the first number of video clips based on the second identification information to obtain a second number of video clips having both the target object and the first target object.
[0070] For example, still taking the recorded video of the above-mentioned football actual training as an example, the recorded video is obtained, the first target object and the target object to be selected are determined, that is, the target player and the football are determined, and then the first identification information and the second identification information for tracking and identifying the target player and the football in the recorded video are respectively obtained, such as the number marked on the player's clothes, or facial features, body features, etc., and for football, it can be shape features, etc., and specifically CV calculation, that is, the coefficient of variation calculation method can be used to track and identify each identification information in the recorded video. After each identification information is determined, the device first edits the recorded video based on the first identification information of the target player to obtain a first number of video clips. Each video clip in the first number is 10 seconds before and after the start of editing, totaling 20 seconds. In actual application, the length can be adjusted according to actual needs. After the first number of video clips are edited, the first number of video clips are screened according to the second identification information to obtain a second number of video clips that contain both the target player and the football.
[0071] Furthermore, in this embodiment, when respectively determining the motion trajectory of the target object and the first target object in each video segment, it includes:
[0072] S201: Determine the motion trajectories of the target object and the first target object in each video segment respectively;
[0073] S202: Determine a first position coordinate set corresponding to the target object based on the motion trajectory of the target object in each video clip;
[0074] S203: determining a second position coordinate set corresponding to the first target object based on the motion trajectory of the first target object in each video clip;
[0075] S204: Determine the angle change direction and position change rate of the motion trajectory of the target object and the first target object based on the first position coordinate set and the second position coordinate set in each video segment.
[0076] Specifically, continuing the above example, for the coach, what needs to be observed is the contribution of the target player to the training session on the field, that is, the correlation between the player and the ball, so that the coach can guide the target player to score in a targeted manner. Other video clips with low correlation with the ball can be considered as invalid video clips, which are directly deleted without reference, so as to reduce the cost of the coach to carry out more detailed manual screening of the effective video clips in the later stage, and assist the coach to complete the technical analysis of the target player as soon as possible. As for the correlation between the target player and the ball, the angle change direction and position change rate of the motion trajectory of the ball and the target player are used to measure respectively in this embodiment. In order to obtain the angle change direction and position change rate of the motion trajectory of the ball and the target player, the method adopted in this embodiment is to determine the position coordinates of the ball and the target player in each video clip respectively, obtain the first coordinate set and the second coordinate set, and then determine the angle change direction and position change rate of the ball and the target player respectively based on the first position coordinate set and the second position coordinate set of each video clip.
[0077] Furthermore, the plurality of video clips are screened based on the motion trajectory of the target object in each video clip and the relationship between the motion trajectory of the first target object, including:
[0078] S301: performing mean processing on the angle change directions of the motion trajectories of the target object and the first target object in each video clip respectively to obtain a plurality of first processing results;
[0079] S302: determining the consistency of the change direction angle of the motion trajectory of the target object and the first target object in each video segment based on the multiple first processing results and the first preset threshold, and generating multiple first screening data accordingly;
[0080] S303: performing mean processing on the position change rates of the target object and the first target object in each video segment respectively to obtain a plurality of second processing results;
[0081] S304: Based on the plurality of second processing results and the second preset threshold, respectively determine the consistency of the position change rate of the target object and the first target object in each video segment, and generate a plurality of second screening data accordingly;
[0082] S305: Filter the plurality of video clips based on the plurality of first filtering data and the second filtering data.
[0083] For example, taking a video clip as an example, Figure 2 As shown, determine the position coordinate set of the ball and the target player in the video clip, such as the position coordinate set of the ball is (X, Y) Ball , the target player's position coordinate set is (X, Y) obj, the angle change directions of the ball and the target player are calculated respectively through the ball position coordinate set and the target player position coordinate set The average value of the two first processing results is then compared with the first preset threshold. If the absolute value of the difference between the average angle changes of the two is less than the first preset threshold, that is, ( The value is the first preset threshold value, which can be adjusted according to needs), then it is considered that the change directions of the two are consistent. Otherwise, it is considered that the angle change directions of the movement trajectory of the ball and the target player are inconsistent. Based on the above method, the above processing is performed on each video clip, and then a plurality of first screening data with consistent angle change directions are screened out. Further, the position change rates of the target object and the first target object in each video clip are respectively processed by averaging, such as calculating the position change rate of the ball and the position change rate of the target player respectively. The average value of |k is obtained to obtain multiple second processing results, that is, multiple average change rates. If the absolute value of the difference between the average change rates of the positions of the ball and the target player in the same video clip is less than the second preset threshold, that is, |k Ball -k Obj |<τ (τ value is a second preset threshold value, which can be adjusted according to demand), it is considered that the position change rate of the ball and the target player in the video clip is consistent, otherwise, it is considered inconsistent. Based on this judgment condition, multiple video clips are screened to obtain multiple video clips in which the position change rate of the ball and the target player is consistent as the second screening data. Finally, the device can perform comprehensive screening based on the first screening data and the second screening data to finally determine the valid video clip.
[0084] Specifically, in this embodiment, when screening multiple video clips based on multiple first screening data and second screening data, it includes:
[0085] S3051: Determine the correlation between the target object in the video segment and the first target object based on the first screening data and the second screening data corresponding to the same video segment;
[0086] S3052: Determine whether to delete or retain the video segment based on the relevance.
[0087] For example, based on the first screening data and the second screening data corresponding to the same video clip, when the angle direction and the motion change rate of the ball's motion trajectory and the target player's motion trajectory in the same video clip are consistent, or the difference meets the threshold range, that is, the fluctuation amplitude is not large, then it can be considered that the target player in the video clip is correlated with the ball's motion trajectory, that is, in the video clip, the target player is involved in the process of chasing or competing for the ball, which is valuable for guiding the target player's skills and studying the target player's scoring and losing situations. Therefore, this video clip is valid and can be retained, otherwise it is an invalid video clip, indicating that the video clip has no reference value for studying the target player, and this video needs to be deleted to reduce the video storage volume, and at the same time facilitate the coach to quickly query each video clip during subsequent review (that is, reduce the subsequent video screening cost and improve efficiency).
[0088] Furthermore, although the video clips obtained by the above-mentioned screening method have significant reference value for the coach to study the ball game competition skills and scoring of the target players, there are still some interferences in the screened video clips, which makes it impossible for the coach to watch and analyze the video content more intuitively and clearly. To solve this problem, this embodiment also includes:
[0089] S400: Obtaining the filtered valid video clips;
[0090] S500: Determine an interference object in a valid video segment;
[0091] S600: Eliminate interfering objects in the valid video segment.
[0092] That is, a video clip that is correlated with the movement trajectory of the ball and the target player is obtained through the first filtering data and the second filtering data, and then the obtained video clip is identified and analyzed to determine whether there is an interference object in the obtained video clip. If there is an interference object, the interference object is eliminated to obtain "interference-free" video content.
[0093] Specifically, in this embodiment, when determining the interference object in the candidate video segment, it includes:
[0094] S501: Determine a second target object in a valid video segment;
[0095] S502: Determine at least a motion trajectory of a second target object;
[0096] S503: Determine at least the motion trajectory of the second target object and the relationship between the motion trajectories of the target objects;
[0097] It is determined whether the second target object is an interfering object based on the relationship.
[0098] For example, there are many other players in the currently retained video clips, and inevitably many of them are irrelevant to the movement status of the target player to be observed. Therefore, in order to facilitate the coach to conduct more targeted technical analysis and guidance on the observed target player, this embodiment can identify and determine the irrelevant players, and then exclude the irrelevant players, that is, remove the irrelevant players from the video clips (perform "denoising"), and then obtain "de-interferenced" video clips, so that the coach will not be disturbed by irrelevant players when viewing the video clips later. Specifically, the method for determining irrelevant players used in this embodiment is similar to the method for determining valid videos mentioned above. First, each non-target player, that is, the second target object, is determined in the video clip. For example, their jersey numbers are determined to track and identify them in the video clip, and the position coordinate sets (X, Y) of each second target object are determined. Other , and then calculate the correlation between the motion trajectory of the second target object and the motion trajectory of the ball in the video clip. The specific method is the same as the method for determining the correlation between the motion trajectory of the target player and the ball described above. If it is determined that there is no correlation, the second target object can be directly determined as an interference object and can be eliminated. If it is determined that there is correlation, it can be further analyzed and processed. For example, based on the position coordinate set 2 of the second target object and the target player in the video clip, the Euclidean distance between the second target object and the target player in the video clip is calculated. When d<δ (δ value can be adjusted as needed), it can be considered that the second target object has a close action connection with the target player and should be retained and has reference value. Otherwise, it is determined to be a non-interference object and removed from the video clip. If player A and the target player appear in a video clip together, and the action performed by the two people in the video clip is to grab the ball, then the trajectory of player A and the ball are correlated, and the Euclidean distance with the target player meets the requirements. Player A is not an interference object and must be retained in the video clip. On the contrary, if player A always keeps a large distance from the target player, such as being 2-3 meters away, then it can be determined that it is an interference object and needs to be removed.
[0099] After the above screening and elimination steps, the target player is closely related to the movement trajectory of the ball, and the video clips that interfere with the player are eliminated, the number of video clips is streamlined, and the storage space is significantly reduced, so that the coach can be assisted in quickly searching and locating the effective video he needs in the later stage, so that he can provide more targeted guidance to the target player.
[0100] In order to further assist the coach to quickly find the required video clips, such as Figure 3 As shown, this embodiment also includes:
[0101] S600: Obtaining labels for classifying valid video clips;
[0102] S700: Analyze and process the valid video clips based on the tags;
[0103] S800: Classify valid video clips based on the processing results and labels.
[0104] The analysis and processing of valid video clips based on tags includes:
[0105] S701: Determine feature information representing a category feature recorded in a tag, where the feature information is related to a first target object;
[0106] S702: Performing feature analysis on the first target object in the valid video segment based on the feature information, where the feature analysis includes analyzing the posture of the first target object.
[0107] Specifically, in order to allow the coach to provide more targeted action guidance to the target players in the later stage, and to facilitate the coach to quickly query the required effective videos in the later stage, some tags can be set artificially. The tags are used to classify the effective video clips. For example, they can be classified according to the specified actions, and the tags are set to: receiving, passing, spiking, blocking and running, etc. By classifying the actions, the player's action posture recognition method can be used for accurate classification and marking. In this way, the effective and denoised video highlights can be classified according to different action category tags for the target players, which is convenient for the coach to quickly retrieve when providing action guidance in the later stage. In actual application, the determined tag can be input into the device, so that the device obtains the tag and determines the posture feature information recorded by the tag. Then the device uses the posture recognition method to identify and analyze the posture of the target player in the effective video clip, matches the analysis result with the feature information recorded on the tag, and classifies the video clips that match the analysis result with the feature information into one category, and sets the tag corresponding to the feature information. In this way, all effective video clips are processed and finally classified.
[0108] like Figure 4 As shown, this embodiment also provides an electronic device, including:
[0109] A processor is used to obtain multiple video clips each including a target object and a first target object, and respectively determine the motion trajectories of the target object and the first target object in each video clip; based on the relationship between the motion trajectory of the target object in each video clip and the motion trajectory of the first target object, multiple video clips are screened to obtain valid video clips.
[0110] In another implementation of the present invention, when the processor obtains the multiple video clips, the processor includes:
[0111] Get the original video;
[0112] Obtaining first identification information and second identification information for tracking and identifying the target object and the first target object in the original data respectively;
[0113] Editing the original data based on the first identification information and the preset editing duration to obtain a first number of video clips that all contain the target object;
[0114] The first number of video clips are screened based on the second identification information to obtain a second number of video clips having both the target object and the first target object.
[0115] In another implementation of the present invention, when the processor determines the motion trajectory of the target object and the first target object in each video segment respectively, it includes:
[0116] Determine the motion trajectory of the target object and the first target object in each video segment respectively;
[0117] Determine a first position coordinate set corresponding to the target object based on the motion trajectory of the target object in each video clip;
[0118] Determine a second position coordinate set corresponding to the first target object based on the motion trajectory of the first target object in each video clip;
[0119] The angle change direction and the position change rate of the motion trajectory of the target object and the first target object are determined based on the first position coordinate set and the second position coordinate set in each video segment.
[0120] In another implementation of the present invention, when the processor screens the plurality of video clips based on the motion trajectory of the target object in each video clip and the relationship between the motion trajectory of the first target object, the processor includes:
[0121] Performing mean processing on the change direction angles of the motion trajectories of the target object and the first target object in each video clip respectively to obtain a plurality of first processing results;
[0122] Determine the consistency of the change direction angle of the motion trajectory of the target object and the first target object in each video clip based on the multiple first processing results and the first preset threshold, and generate multiple first screening data accordingly;
[0123] Performing mean processing on the position change rates of the target object and the first target object in each video clip respectively to obtain a plurality of second processing results;
[0124] Based on the plurality of second processing results and the second preset threshold, respectively determining the consistency of the position change rate of the target object and the first target object in each video segment, and generating a plurality of second screening data accordingly;
[0125] The plurality of video clips are filtered based on the plurality of first filtering data and the second filtering data.
[0126] In another implementation of the present invention, when the processor screens a plurality of video clips based on a plurality of first screening data and a second screening data, the processor includes:
[0127] Determining a correlation between a target object in the video segment and a first target object based on first screening data and second screening data corresponding to the same video segment;
[0128] Based on the relevance, the video segment is determined to be either deleted or retained.
[0129] In another implementation of the present invention, it also includes:
[0130] Obtaining the filtered valid video clips;
[0131] Identify distracting objects in valid video clips;
[0132] Eliminate distracting objects from active video clips.
[0133] In another implementation of the present invention, when the processor determines the interference object in the candidate video segment, the processor includes:
[0134] determining a second target object in the valid video segment;
[0135] determining at least a motion trajectory of a second target object;
[0136] determining at least a motion trajectory of a second target object and a relationship between the motion trajectories of the target objects;
[0137] It is determined whether the second target object is an interfering object based on the relationship.
[0138] In another implementation of the present invention, the processor is further configured to:
[0139] Obtaining labels for classifying valid video clips;
[0140] Analyze and process valid video clips based on tags;
[0141] The valid video clips are classified based on the processing results and labels.
[0142] In another implementation of the present invention, when the processor analyzes and processes the valid video segment based on the tag, the process includes:
[0143] Determine feature information representing the category feature recorded in the tag, where the feature information is related to the first target object;
[0144] A feature analysis is performed on the first target object in the valid video segment based on the feature information, where the feature analysis includes analysis of the posture of the first target object.
[0145] As another aspect, the present invention further provides a computer-readable medium having a computer program stored thereon, which implements the method described in the above embodiment when the program is executed by a processor.
[0146] As another aspect, an embodiment of the present invention further provides a computer program product, which is tangibly stored on a computer-readable medium and includes computer-readable instructions, which, when executed, cause at least one processor to perform such as Figure 2 It should be understood that each solution in this embodiment has the corresponding technical effect in the above method embodiment, which will not be described in detail here.
[0147] It should be noted that the computer storage medium of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access storage medium (RAM), a read-only storage medium (ROM), an erasable programmable read-only storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only storage medium (CD-ROM), an optical storage medium, a magnetic storage medium, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program configured to be used by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, antenna, optical cable, RF, etc., or any suitable combination of the above.
[0148] It should be understood that although the present invention is described according to various embodiments, not every embodiment includes only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0149] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A video data processing method, comprising: Obtaining a plurality of video clips, each of the plurality of video clips including a target object and a first target object; respectively determining the motion trajectories of the target object and the first target object in each of the video segments; Screening the plurality of video clips based on the motion trajectory of the target object in each of the video clips and the relationship between the motion trajectories of the first target object to obtain a valid video clip; The screening of the plurality of video clips based on the motion trajectory of the target object in each of the video clips and the relationship between the motion trajectories of the first target object comprises: performing mean processing on the change direction angles of the motion trajectories of the target object and the first target object in each of the video clips respectively to obtain a plurality of first processing results; Based on the plurality of the first processing results and the first preset threshold, respectively determining the consistency of the change direction angle of the motion trajectory of the target object and the first target object in each of the video clips, and correspondingly generating a plurality of first screening data; performing mean processing on the position change rates of the target object and the first target object in each of the video clips respectively to obtain a plurality of second processing results; Based on the plurality of second processing results and a second preset threshold, respectively determining the consistency of the position change rate of the target object and the first target object in each of the video clips, and correspondingly generating a plurality of second screening data; The plurality of video clips are filtered based on the plurality of the first filtering data and the second filtering data.
2. The method according to claim 1, wherein: The obtaining of multiple video clips comprises: Get the original video; Respectively obtaining first identification information and second identification information for tracking and identifying the target object and the first target object in the original video; Editing the original video based on the first identification information and a preset editing duration to obtain a first number of video clips each containing the target object; The first number of video clips are screened based on the second identification information to obtain a second number of video clips having both the target object and the first target object.
3. The method according to claim 1, wherein: The step of respectively determining the motion trajectories of the target object and the first target object in each of the video clips includes: respectively determining the motion trajectories of the target object and the first target object in each of the video segments; Determine a first position coordinate set corresponding to the target object based on the motion trajectory of the target object in each of the video clips; Determine a second position coordinate set corresponding to the first target object based on the motion trajectory of the first target object in each of the video clips; Based on the first position coordinate set and the second position coordinate set in each of the video clips, the angular change direction and the position change rate of the motion trajectory of the target object and the first target object are respectively determined.
4. The method according to claim 1, wherein: The screening of the plurality of video clips based on the plurality of the first screening data and the second screening data comprises: Determine the correlation between the target object in the video segment and the first target object based on the first screening data and the second screening data corresponding to the same video segment; The video segment is determined to be deleted or retained based on the relevance.
5. The method according to claim 1, wherein: Also includes: Obtaining the filtered effective video clips; Determining an interfering object in the valid video segment; Eliminate interfering objects in the valid video segment.
6. The method according to claim 5, wherein: The determining of the interference object in the valid video segment includes: Determining a second target object in the valid video segment; determining at least a motion trajectory of the second target object; determining at least the motion trajectory of the second target object and a relationship between the motion trajectories of the target objects; It is determined whether the second target object is the interference object based on the relationship.
7. The method according to claim 1, wherein: Also includes: Obtaining labels for classifying the valid video clips; Analyze and process the valid video segment based on the tag; The valid video clips are classified based on the processing results and the labels.
8. The method according to claim 7, wherein: The analyzing and processing the valid video segment based on the tag includes: Determining feature information representing category features recorded in the tag, wherein the feature information is related to the first target object; A feature analysis is performed on the first target object in the valid video segment based on the feature information, wherein the feature analysis includes an analysis of a posture of the first target object.
9. An electronic device, comprising: A processor, configured to obtain a plurality of video clips each including a target object and a first target object, and respectively determine motion trajectories of the target object and the first target object in each of the video clips; and screen the plurality of video clips based on a relationship between the motion trajectory of the target object in each of the video clips and the motion trajectory of the first target object to obtain a valid video clip; The screening of the plurality of video clips based on the motion trajectory of the target object in each of the video clips and the relationship between the motion trajectories of the first target object comprises: performing mean processing on the change direction angles of the motion trajectories of the target object and the first target object in each of the video clips respectively to obtain a plurality of first processing results; Based on the plurality of the first processing results and the first preset threshold, respectively determining the consistency of the change direction angle of the motion trajectory of the target object and the first target object in each of the video clips, and correspondingly generating a plurality of first screening data; performing mean processing on the position change rates of the target object and the first target object in each of the video clips respectively to obtain a plurality of second processing results; Based on the plurality of second processing results and a second preset threshold, respectively determining the consistency of the position change rate of the target object and the first target object in each of the video clips, and correspondingly generating a plurality of second screening data; The plurality of video clips are filtered based on the plurality of the first filtering data and the second filtering data.
