Video processing method and device
By analyzing the histogram information in the video frame and calculating the change information of the object, the problem of object performance classification in combat games is solved, and the accurate classification and processing convenience of objects is achieved.
Patent Information
- Application Number
- CN202010901502.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-31
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2040-12-27
AI Technical Summary
The prior art has failed to effectively handle the performance classification of objects in videos, especially in battle games, and it is difficult to accurately represent the performance of objects on both sides, which affects the convenience of subsequent processing.
By obtaining the initial and ending video frames of the target video, the object change information in the preset target area is determined, and the object information change of the object is calculated by using the histogram analysis method to determine the object classification result.
The accurate classification of objects in the target video is achieved, the fun and convenience of processing is increased, and the subsequent processing ability based on classification results is improved.
Smart Images

Figure CN112380390B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and specifically to a video processing method and device. Background Art
[0002] In many application scenarios, for the various videos obtained, we expect each video to have a classification result that characterizes the performance of the object in the video, so as to facilitate corresponding selection and processing according to the classification results of the objects in each video. As an example, in a battle game, for a video that characterizes the battle process, the classification results corresponding to each of the two battle parties can be determined to characterize the performance of both parties during the battle. In a video that characterizes the battle process, when one of the two parties outputs a skill, causing the other party's blood volume to drop sharply, the highlight classification result corresponding to the party's object can be used to characterize the battle process as the highlight moment of the party's object. However, at present, there is no video processing mechanism as described above. Summary of the invention
[0003] The embodiments of the present application provide a video processing method and device.
[0004] In a first aspect, an embodiment of the present application provides a video processing method, the method comprising: obtaining a target video; determining, based on an initial video frame and an ending video frame in the target video, change information of target information corresponding to multiple objects included in the target video and represented by a preset target area; and determining, based on the change information, a one-to-one classification result of the multiple objects included in the target video.
[0005] In some embodiments, the above-mentioned determining the change information of target information corresponding to multiple objects included in the target video and represented by the preset target area based on the initial video frame and the end video frame in the target video includes: obtaining a first histogram corresponding to multiple objects one by one based on the preset target area in the initial video frame; obtaining a second histogram corresponding to multiple objects one by one based on the preset target area in the end video frame; for each object among the multiple objects, determining the change information of the target information of the object according to the first histogram and the second histogram corresponding to the object.
[0006] In some embodiments, the above-mentioned determining, for each object among the multiple objects, change information of the target information of the object according to the first histogram and the second histogram corresponding to the object, includes: for each object among the multiple objects, performing the following operations: determining a preset number of rectangular bars of information that are ranked top in the first histogram corresponding to the object according to the order of the numerical values represented by each rectangular bar in the first histogram corresponding to the object; determining, in the second histogram corresponding to the object, a preset number of rectangular bars of information that correspond one-to-one to the preset number of rectangular bars of information in the first histogram; determining the change information of the target information of the object according to the preset number of rectangular bars in the first histogram corresponding to the object and the preset number of rectangular bars in the second histogram corresponding to the object.
[0007] In some embodiments, the above-mentioned determining the change information of the target information of the object according to the preset number of rectangular bars in the first histogram corresponding to the object and the preset number of rectangular bars in the second histogram corresponding to the object includes: determining the change information of the target information of the object by the following formula:
[0008]
[0009] Among them, S my represents the change information of the target information of the object, k represents the preset number, i represents the natural number from 1 to K, Represents the index number of the i-th rectangular bar in the first histogram corresponding to the object, The index number of the i-th rectangular bar in the second histogram corresponding to the object, Represents the value represented by the i-th rectangular bar in the first histogram corresponding to the object, Represents the value represented by the i-th rectangular bar in the second histogram corresponding to the object.
[0010] In some embodiments, the multiple objects are two objects fighting against each other in a game; the above-mentioned determining the one-to-one corresponding classification results of the multiple objects included in the target video based on the change information includes: for each of the two objects, determining the classification result characterizing the performance of the object in the target video based on the change information of the two objects.
[0011] In some embodiments, for each of the two objects, determining the classification result representing the performance of the object in the target video according to the change information of the two objects includes: for each of the two objects, determining the classification result representing the performance of the object in the target video by the following formula:
[0012]
[0013] Among them, S represents the classification result of the object in the target video, S my Characterizes the change information of the target information of the object, S env Characterizes the change information of the target information of the other party.
[0014] In some embodiments, the initial video frame is a video frame corresponding to a preset time after the target video starts, and the end video frame is a video frame corresponding to a preset time before the target video ends.
[0015] In a second aspect, an embodiment of the present application provides a video processing device, which includes: an acquisition unit, configured to acquire a target video; a determination unit, configured to determine, based on an initial video frame and an end video frame in the target video, change information of target information corresponding to multiple objects included in the target video and represented by a preset target area; and a classification unit, configured to determine, based on the change information, a one-to-one classification result of multiple objects included in the target video.
[0016] In some embodiments, the determination unit is further configured to obtain a first histogram corresponding to multiple objects one by one based on a preset target area in an initial video frame; obtain a second histogram corresponding to multiple objects one by one based on a preset target area in an ending video frame; and for each of the multiple objects, determine change information of the target information of the object according to the first histogram and the second histogram corresponding to the object.
[0017] In some embodiments, the determination unit is further configured to: perform the following operations for each object among multiple objects: determine a preset number of rectangular bars of information that are ranked top in the first histogram corresponding to the object according to the order of the numerical values represented by each rectangular bar in the first histogram corresponding to the object; determine a preset number of rectangular bars of information that correspond one-to-one to the preset number of rectangular bars of information in the first histogram in the second histogram corresponding to the object; determine the change information of the target information of the object based on the preset number of rectangular bars in the first histogram corresponding to the object and the preset number of rectangular bars in the second histogram corresponding to the object.
[0018] In some embodiments, the determining unit is further configured to: determine the change information of the target information of the object by the following formula:
[0019]
[0020] Among them, S my represents the change information of the target information of the object, k represents the preset number, i represents the natural number from 1 to K, Represents the index number of the i-th rectangular bar in the first histogram corresponding to the object, The index number of the i-th rectangular bar in the second histogram corresponding to the object, Represents the value represented by the i-th rectangular bar in the first histogram corresponding to the object, Represents the value represented by the i-th rectangular bar in the second histogram corresponding to the object.
[0021] In some embodiments, the multiple objects are two objects fighting in a game; the classification unit is further configured to: for each of the two objects, determine a classification result representing the performance of the object in the target video according to change information of the two objects.
[0022] In some embodiments, the classification unit is further configured to: for each of the two objects, determine a classification result representing the performance of the object in the target video by using the following formula:
[0023]
[0024] Among them, S represents the classification result of the object in the target video, S my Characterizes the change information of the target information of the object, S env Characterizes the change information of the target information of the other party.
[0025] In some embodiments, the initial video frame is a video frame corresponding to a preset time after the target video starts, and the end video frame is a video frame corresponding to a preset time before the target video ends.
[0026] In a third aspect, an embodiment of the present application provides a server, comprising: one or more processors; a storage device on which one or more programs are stored; when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation method in the first aspect.
[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0028] The video processing method and device provided by the embodiment of the present application first obtains the target video; then, according to the initial video frame and the end video frame in the target video, determines the change information of the target information corresponding to the multiple objects included in the target video represented by the preset target area; finally, according to the change information, determines the classification results of the multiple objects included in the target video. Thus, a video processing method is provided to accurately classify the objects in the target video, increase the fun; and improve the convenience of subsequent processing of the target video based on the classification results. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0030] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present application may be applied;
[0031] Figure 2 is a flow chart of an embodiment of a video processing method according to the present application;
[0032] Figure 3A is a schematic diagram of a first histogram according to an embodiment of the present application;
[0033] Figure 3B is a schematic diagram of a second histogram according to an embodiment of the present application;
[0034] Figure 4 is a schematic diagram of an application scenario of a video processing method according to an embodiment of the present application;
[0035] Figure 5 is a flow chart of an embodiment of a video processing method according to the present application;
[0036] Figure 6 is a structural schematic diagram of an embodiment of a video processing device according to the present application;
[0037] Figure 7 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION
[0038] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0039] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0040] Figure 1 An exemplary architecture 100 to which the video processing method or video processing device of the present application can be applied is shown.
[0041] like Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0042] The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send information, etc. Various communication client applications may be installed on the terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, reading applications, etc.
[0043] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with network connection, information interaction, and information processing functions, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, and desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0044] The server 105 may be a server that provides various services, such as a background server that classifies objects in the target video obtained by the terminal devices 101, 102, and 103. The background processing server may determine the change information of the target information corresponding to the multiple objects included in the target video represented by the preset target area based on the initial video frame and the end video frame in the target video; and determine the classification results of the multiple objects included in the target video based on the change information. Optionally, the background processing server may also feed back the classification results of each object to the terminal device for display by the terminal device. As an example, the server 105 may be a cloud server.
[0045] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0046] It should also be noted that the video processing method provided in the embodiments of the present disclosure can be executed by a server, or by a terminal device, or by a server and a terminal device in cooperation with each other. Accordingly, the various parts (such as various units, sub-units, modules, and sub-modules) included in the video processing device can be all arranged in the server, or all arranged in the terminal device, or respectively arranged in the server and the terminal device.
[0047] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0048] Continue to refer Figure 2 , shows a process 200 of an embodiment of a video processing method according to the present application. The video processing method comprises the following steps:
[0049] Step 201, obtaining a target video.
[0050] In this embodiment, the execution subject of the video processing method (such as Figure 1 The terminal device or server shown in the figure can obtain the target video remotely or locally through a wired connection or a wireless connection.
[0051] The target video may be a video stored in any video format and including any video content. The video format includes but is not limited to MPEG (Moving Picture Experts Group), AVI (Audio Video Interleaved), ASF (Advanced Streaming Format), RM (real media) and other formats, and the video content includes but is not limited to games, movies, sports, news and other content.
[0052] In this embodiment, the target video may be a video that meets the time length requirement. As an example, the time length requirement includes a minimum time length requirement (eg, 3 seconds) and a maximum time length requirement (eg, 15 seconds).
[0053] Step 202 : determining, according to an initial video frame and an end video frame in the target video, change information of target information corresponding to a plurality of objects included in the target video and represented by a preset target area.
[0054] In this embodiment, the execution subject may determine the change information of the target information corresponding to the multiple objects included in the target video and represented by the preset target area according to the initial video frame and the end video frame in the target video acquired in step 201 .
[0055] The target information may be any information corresponding to an object in the target video. As an example, the target video is a video representing the battle process between multiple objects in the battle, and the target information is information representing the remaining health of each object in the multiple objects. In game videos, the remaining health information of multiple objects is generally displayed in a specific area of the video interface, and the location where the remaining health information is displayed can be set as the preset target area.
[0056] It can be understood that there may be multiple preset target areas in the initial video frame and the end video frame, and one preset target area corresponds to one object. For each of the multiple objects, the initial target information corresponding to the object can be obtained according to the preset target area corresponding to the object in the initial video frame; the changed target information corresponding to the object can be obtained according to the preset target area corresponding to the object in the end video frame; and the change information of the target information corresponding to the object can be obtained through the initial target information and the changed target information.
[0057] In some optional implementations of this embodiment, the above step 202 may be performed in the following manner:
[0058] First, based on the preset target area in the initial video frame, a first histogram of multiple objects corresponding one to one is obtained.
[0059] The first histogram is a histogram used to represent the color distribution in the initial video frame, representing the number of pixels under a certain color or a certain range of colors in the image. The above-mentioned execution subject can accurately preset the color information of each pixel in the target area by identifying the preset target area in the initial video frame, and then obtain the one-to-one corresponding first histogram.
[0060] The first histogram can be a histogram obtained based on different color spaces and coordinate systems. As an example, the color space can be an RGB (Red, Green, Blue) color space, an HSV (Hue, Saturation, Value) color space, a Luv color space, and a Lab color space. Among them, compared with the RGB color space, the HSV color space is more in line with people's subjective judgment of color similarity. Therefore, the above-mentioned execution subject can convert the RGB color space of the initial video frame into the HSV color space, and then obtain the first histogram by statistics.
[0061] As an example, Figure 3A A schematic diagram of the first histogram is shown, wherein the horizontal axis represents the color types included in the preset target area, and the vertical axis represents the number of pixels of each color type in the preset target area.
[0062] Second, based on the preset target area in the end video frame, a second histogram corresponding to multiple objects is obtained.
[0063] Similarly, the execution subject can obtain a second histogram corresponding to multiple objects one by one based on the preset target area in the end video frame according to operations similar to the first step.
[0064] As an example, Figure 3B A schematic diagram of a second histogram is shown.
[0065] Third, for each object among the multiple objects, the change information of the target information of the object is determined according to the first histogram and the second histogram corresponding to the object.
[0066] In this implementation, for each object among the multiple objects included in the target video, the execution subject will obtain the first histogram and the second histogram corresponding to the object.
[0067] Continue with the above Figure 3A and Figure 3B For example, Figure 3A The first histogram in Figure 3B The second histogram in corresponds to the same object. According to the first histogram corresponding to the object ( Figure 3A ) and the second histogram ( Figure 3B ) to determine the change information of the target information of the object.
[0068] It can be understood that, generally speaking, in the first histogram and the second histogram for the same object, the color corresponding to the target information has the largest number of pixels or the largest change. For example, if the target video is a video representing the battle process between multiple objects in the battle, and the target information is the remaining blood volume information representing each of the multiple objects, in the first histogram and the second histogram for the same object, the number of pixels representing the blood volume is the largest or the largest change.
[0069] In order to improve the accuracy of the determination process for the change information, the execution subject does not simply collect information of the rectangular bar with the largest number of pixels or the largest change in the first histogram and the second histogram, but performs the following operations:
[0070] First, according to the order of the values represented by the rectangular bars in the first histogram corresponding to the object, a preset number of rectangular bar information ranked top in the first histogram corresponding to the object is determined.
[0071] Second, in the second histogram corresponding to the object, a preset number of rectangular pieces of information corresponding one-to-one to the preset number of rectangular pieces of information in the first histogram is determined.
[0072] The preset number of rectangular bars in the first histogram corresponds to the preset number of rectangular bars in the second histogram, and the information represented by the rectangular bars is the same. As an example, the rectangular bars representing red in the first histogram correspond to the rectangular bars representing red in the second histogram.
[0073] The preset number can be set according to actual conditions and is not limited here. As an example, the preset number can be 3.
[0074] Third, according to a preset number of rectangular bars in the first histogram corresponding to the object and a preset number of rectangular bars in the second histogram corresponding to the object, the change information of the target information of the object is determined.
[0075] Specifically, the execution subject can determine the change information of the target information of the object through the following formula:
[0076]
[0077] Among them, S my represents the change information of the target information of the object, k represents the preset number, i represents the natural number from 1 to K, Represents the index number of the i-th rectangular bar in the first histogram corresponding to the object, The index number of the i-th rectangular bar in the second histogram corresponding to the object, Represents the value represented by the i-th rectangular bar in the first histogram corresponding to the object, Represents the value represented by the i-th rectangular bar in the second histogram corresponding to the object.
[0078] In some optional implementations of this embodiment, the initial video frame is a video frame corresponding to a preset time after the start of the target video, and the end video frame is a video frame corresponding to a preset time before the end of the target video, so as to prevent the target video from adopting a fade-in and fade-out effect, resulting in the inability to accurately obtain the target information.
[0079] Step 203: Determine the one-to-one classification results of the multiple objects included in the target video according to the change information.
[0080] In this embodiment, the execution subject may determine the classification results of the multiple objects included in the target video in a one-to-one correspondence according to the change information obtained in step 202 .
[0081] As an example, for each object among the multiple objects, the execution entity may determine the change amount represented by the change information corresponding to the object as the classification result of the object.
[0082] In some optional implementations of this embodiment, the multiple objects included in the target video are two objects in the game. For each of the two objects, the execution subject can determine a classification result representing the performance of the object in the target video based on the change information of the two objects.
[0083] As an example, the execution subject may determine the sum of the absolute values of the change information of both objects, and for each of the two objects, determine the ratio of the change information of the object to the sum of the absolute values as the classification result of the object.
[0084] In some optional implementations, for each of the two objects, a classification result representing the performance of the object in the target video is determined by the following formula:
[0085]
[0086] Among them, S represents the classification result of the object in the target video, S my Characterizes the change information of the target information of the object, S env Characterizes the change information of the target information of the other object. When S is a positive number, it indicates that the object is a positive highlight moment. When S is closer to 1, the positive highlight is stronger; when S is closer to 0, the positive highlight is weaker. When S is a negative number, it indicates that the object is a negative highlight moment. When S is closer to -1, the negative highlight is stronger; when S is closer to 0, the negative highlight is weaker.
[0087] Continue to see Figure 4 , Figure 4 FIG. 1 is a schematic diagram of an application scenario of a video processing method according to an embodiment of the present application. Figure 4 In the application scenario, user 401 performs a video processing task through terminal device 402. Before performing the video processing task, the user needs to obtain the classification results of the objects in each video in the video library to facilitate video processing of the videos in the video library. User 401 sends multiple target videos in the video library to server 403 through terminal device 402. For each of the multiple target videos obtained, server 403 determines the change information of the target information corresponding to the multiple objects included in the target video represented by the preset target area according to the initial video frame and the end video frame in the target video; then, according to the change information, determines the one-to-one classification results of the multiple objects included in the target video. After obtaining the classification results of each target video, server 403 feeds back the classification results to terminal device 402, so that user 401 performs the video processing task according to the classification results of the objects in the target video.
[0088] At present, in many application scenarios, for various videos obtained, we expect each video to have a score that represents the performance of the object in the video, so as to facilitate the corresponding selection and processing according to the score of the object in each video. The method provided by the above-mentioned embodiment of the present application obtains the target video; according to the initial video frame and the end video frame in the target video, determines the change information of the target information corresponding to the multiple objects included in the target video represented by the preset target area; according to the change information, determines the one-to-one classification results of the multiple objects included in the target video. Thereby, a video processing method is provided to accurately classify the objects in the target video, increase the fun; and improve the convenience of subsequent processing of the target video based on the classification results.
[0089] Further references Figure 5 , which shows a process 500 of an embodiment of a video processing method. The process 400 of the video processing method includes the following steps:
[0090] Step 501, obtaining a target video.
[0091] Step 502: obtaining a first histogram of a plurality of objects in one-to-one correspondence based on a preset target area in the initial video frame.
[0092] Step 503: Based on the preset target area in the end video frame, a second histogram in one-to-one correspondence with multiple objects is obtained.
[0093] Step 504: for each of the multiple objects, perform the following operations:
[0094] Step 5041: Determine a preset number of top-ranked rectangular bar information in the first histogram corresponding to the object according to the order of the values represented by the rectangular bars in the first histogram corresponding to the object.
[0095] Step 5042: Determine, in the second histogram corresponding to the object, a preset number of rectangular pieces of information that correspond one-to-one to the preset number of rectangular pieces of information in the first histogram.
[0096] Step 5043: Determine the change information of the target information of the object according to the preset number of rectangular bars in the first histogram corresponding to the object and the preset number of rectangular bars in the second histogram corresponding to the object.
[0097] Step 505: Determine the one-to-one classification results of the multiple objects included in the target video according to the change information.
[0098] from Figure 5As can be seen, the process 500 of the video processing method in this embodiment highlights the process of obtaining the change information corresponding to each of the multiple objects in the target video. Therefore, the solution described in this embodiment improves the accuracy of obtaining the change information, thereby improving the accuracy of classifying the objects in the video.
[0099] Further references Figure 6 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a video processing device, which is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0100] like Figure 6 As shown, the video processing device 600 provided in this embodiment includes: an acquisition unit 601, a determination unit 602 and a classification unit 603. The acquisition unit 501 is configured to acquire a target video; the determination unit 602 is configured to determine, based on an initial video frame and an end video frame in the target video, change information of target information corresponding to multiple objects included in the target video represented by a preset target area; and the classification unit 503 is configured to determine, based on the change information, a one-to-one classification result of multiple objects included in the target video.
[0101] In some embodiments, the determination unit 602 is further configured to obtain a first histogram corresponding to multiple objects one by one based on a preset target area in the initial video frame; obtain a second histogram corresponding to multiple objects one by one based on the preset target area in the ending video frame; for each object among the multiple objects, determine the change information of the target information of the object according to the first histogram and the second histogram corresponding to the object.
[0102] In some embodiments, the determination unit 602 is further configured to: perform the following operations for each object among multiple objects: determine a preset number of rectangular bars of information that are ranked top in the first histogram corresponding to the object according to the order of the numerical values represented by each rectangular bar in the first histogram corresponding to the object; determine a preset number of rectangular bars of information that correspond one-to-one to the preset number of rectangular bars of information in the first histogram in the second histogram corresponding to the object; determine the change information of the target information of the object based on the preset number of rectangular bars in the first histogram corresponding to the object and the preset number of rectangular bars in the second histogram corresponding to the object.
[0103] In some embodiments, the determining unit 602 is further configured to: determine the change information of the target information of the object by the following formula:
[0104]
[0105] Among them, S my represents the change information of the target information of the object, k represents the preset number, i represents the natural number from 1 to K, Represents the index number of the i-th rectangular bar in the first histogram corresponding to the object, The index number of the i-th rectangular bar in the second histogram corresponding to the object, Represents the value represented by the i-th rectangular bar in the first histogram corresponding to the object, Represents the value represented by the i-th rectangular bar in the second histogram corresponding to the object.
[0106] In some embodiments, the multiple objects are two objects fighting in the game; the classification unit 603 is further configured to: for each of the two objects, determine a classification result representing the performance of the object in the target video according to the change information of the two objects.
[0107] In some embodiments, the classification unit 603 is further configured to: for each of the two objects, determine a classification result representing the performance of the object in the target video by using the following formula:
[0108]
[0109] Among them, S represents the classification result of the object in the target video, S my Characterizes the change information of the target information of the object, S env Characterizes the change information of the target information of the other party.
[0110] In some embodiments, the initial video frame is a video frame corresponding to a preset time after the target video starts, and the end video frame is a video frame corresponding to a preset time before the target video ends.
[0111] The device provided by the above embodiment of the present application obtains the target video through the acquisition unit; the determination unit determines the change information of the target information corresponding to the multiple objects included in the target video represented by the preset target area according to the initial video frame and the end video frame in the target video; the classification unit determines the classification results of the multiple objects included in the target video one by one according to the change information. Thus, a classification method is provided to accurately classify the objects in the target video, which increases the fun; and improves the convenience of subsequent processing of the target video based on the classification results.
[0112] Reference below Figure 7 , which shows an electronic device (eg Figure 1The terminal device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The server shown in FIG. 76 is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present application.
[0113] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0114] Typically, the following devices may be connected to the I / O interface 705: input devices 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 708 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0115] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present application are executed.
[0116] It should be noted that the computer-readable medium described in the embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage 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 memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present application, 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 an embodiment of the present application, 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 electromagnetic signals, optical signals, or any suitable combination of the above. The 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 for use 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 suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0117] The computer-readable medium may be included in the server; or it may exist independently without being installed in the server. The computer-readable medium carries one or more programs. When the one or more programs are executed by the server, the server: obtains a target video; determines, based on an initial video frame and an end video frame in the target video, change information of target information corresponding to multiple objects included in the target video represented by a preset target area; and determines, based on the change information, a one-to-one classification result of multiple objects included in the target video.
[0118] The computer program code for performing the operation of the embodiment of the present application can be written in one or more programming languages or a combination thereof, and the programming language includes an object-oriented programming language, such as Java, Smalltalk, C++, and also includes a conventional procedural programming language, such as "C" language or similar programming language. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer by any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect to the Internet).
[0119] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0120] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, may be described as: a processor comprising an acquisition unit, a determination unit, and a classification unit. The names of these units do not constitute a limitation on the units themselves in certain circumstances, for example, the classification unit may also be described as "a unit that determines the one-to-one classification results of multiple objects included in the target video according to the change information".
[0121] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present application is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present application.
Claims
1. A video processing method, comprising: Get the target video; Based on a preset target area in an initial video frame in the target video, obtaining a first histogram in which multiple objects correspond one to one; Based on a preset target area in an end video frame in the target video, obtaining a second histogram corresponding to the multiple objects one by one; For each of the multiple objects, perform the following operations: According to the order of the values represented by the rectangular bars in the first histogram corresponding to the object, determine the information of a preset number of rectangular bars ranked first in the first histogram corresponding to the object; In the second histogram corresponding to the object, determining a preset number of rectangular pieces of information corresponding one-to-one to the preset number of rectangular pieces of information in the first histogram; Determine change information of target information of the object according to a preset number of rectangular bars in the first histogram corresponding to the object and a preset number of rectangular bars in the second histogram corresponding to the object; According to the change information, a one-to-one classification result of multiple objects included in the target video is determined.
2. The method according to claim 1, wherein: The determining the change information of the target information of the object according to the preset number of rectangular bars in the first histogram corresponding to the object and the preset number of rectangular bars in the second histogram corresponding to the object includes: The change information of the target information of the object is determined by the following formula: Among them, S my represents the change information of the target information of the object, k represents the preset number, i represents the natural number from 1 to k, Represents the index number of the i-th rectangular bar in the first histogram corresponding to the object, The index number of the i-th rectangular bar in the second histogram corresponding to the object, Represents the value represented by the i-th rectangular bar in the first histogram corresponding to the object, Represents the value represented by the i-th rectangular bar in the second histogram corresponding to the object.
3. The method according to claim 1, wherein: The multiple objects are objects of both parties fighting in the game; Determining classification results corresponding to a plurality of objects included in the target video one by one according to the change information includes: For each of the two objects, a classification result representing the performance of the object in the target video is determined according to the change information of the two objects.
4. The method according to claim 3, wherein: The step of determining, for each of the two objects, a classification result representing the performance of the object in the target video according to the change information of the two objects includes: For each of the two objects, the classification result representing the performance of the object in the target video is determined by the following formula: Among them, S represents the classification result of the performance of the object in the target video, S my Characterizes the change information of the target information of the object, S env Characterizes the change information of the target information of the other party.
5. The method according to claim 1, wherein: The initial video frame is a video frame corresponding to a preset time after the target video starts, and the end video frame is a video frame corresponding to a preset time before the target video ends.
6. A video processing device, comprising: An acquisition unit, configured to acquire a target video; A determination unit is configured to obtain a first histogram of a plurality of objects in one-to-one correspondence based on a preset target area in an initial video frame in the target video; Based on the preset target area in the end video frame in the target video, a second histogram corresponding to the multiple objects is obtained; for each of the multiple objects, the following operations are performed: according to the order of the values represented by each rectangular bar in the first histogram corresponding to the object, a preset number of rectangular bar information ranked in the front is determined; in the second histogram corresponding to the object, a preset number of rectangular bar information corresponding to the preset number of rectangular bar information in the first histogram is determined; according to the preset number of rectangular bars in the first histogram corresponding to the object and the preset number of rectangular bars in the second histogram corresponding to the object, the change information of the target information of the object is determined; The classification unit is configured to determine a one-to-one classification result of multiple objects included in the target video according to the change information.
7. A server, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
